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.
@@ -1,22 +1,22 @@
1
- import G from "../../LaravelVuePagination/TailwindPagination.vue.js";
1
+ import q from "../../LaravelVuePagination/TailwindPagination.vue.js";
2
2
  import j from "../GlTextInput.vue.js";
3
- import T from "../GlDropdown.vue.js";
4
- import U from "../GlDateRangePicker.vue.js";
5
- import M from "../GLButton.vue.js";
6
- import q from "../DynamicConfirmation.vue.js";
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 p, resolveDirective as H, createElementBlock as o, openBlock as a, Fragment as h, createVNode as v, createElementVNode as t, toDisplayString as g, withDirectives as A, vModelText as R, normalizeClass as D, renderList as k, createBlock as m, createCommentVNode as c, withCtx as x, createTextVNode as y, vModelCheckbox as z, vShow as N, normalizeStyle as Z, resolveDynamicComponent as Q } from "vue";
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: G,
14
+ TailwindPagination: q,
15
15
  GlTextInput: j,
16
- GlDropdown: T,
17
- GlDateRangePicker: U,
18
- GlButton: M,
19
- DynamicConfirmation: q
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 i = this.generateRandomString(6);
49
+ const t = this.generateRandomString(6);
50
50
  return {
51
- Random_string: i,
51
+ Random_string: t,
52
52
  printObj: {
53
- id: "print_" + i,
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 i = this.search.toLowerCase();
95
- return this.sortData(this.data).filter((l) => Object.values(l).some(
96
- (_) => _.toString().toLowerCase().includes(i)
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((i) => this.columnVisibility[i.field_name]);
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(i) {
119
- this.dynamicQueryString = i;
127
+ setDynamicQueryString(t) {
128
+ this.dynamicQueryString = t;
120
129
  },
121
- generateRandomString(i) {
130
+ generateRandomString(t) {
122
131
  let s = "";
123
- const l = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", _ = l.length;
124
- for (let n = 0; n < i; n++)
125
- s += l.charAt(
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((l) => axios.delete(`${this.xprops.route}/${l}`))
148
- )).forEach((l, _) => {
149
- l.status === "rejected" && console.log(`Error deleting ID ${this.checkedIds[_]}:`, l.reason);
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((i) => i.id), this.$emit("checkedIdsAction", this.checkedIds);
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(i) {
165
- this.checkedIds.includes(i) ? this.checkedIds = this.checkedIds.filter((s) => s !== i) : this.checkedIds.push(i), this.$emit("checkedIdsAction", this.checkedIds);
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(i) {
168
- this.$emit("editAction", i);
176
+ editAction(t) {
177
+ this.$emit("editAction", t);
169
178
  },
170
- generalAction(i) {
171
- this.$emit("generalAction", i);
179
+ generalAction(t) {
180
+ this.$emit("generalAction", t);
172
181
  },
173
- generalAction1(i) {
174
- this.$emit("generalAction1", i);
182
+ generalAction1(t) {
183
+ this.$emit("generalAction1", t);
175
184
  },
176
- generalAction2(i) {
177
- this.$emit("generalAction2", i);
185
+ generalAction2(t) {
186
+ this.$emit("generalAction2", t);
178
187
  },
179
- forDynCompIs(i) {
180
- return typeof i == "object" ? i : null;
188
+ forDynCompIs(t) {
189
+ return typeof t == "object" ? t : null;
181
190
  },
182
- GetItemLists(i = 1) {
183
- this.isLoading = !0, this.page = i;
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
- axios.get(this.xprops.route_get_data, { params: s }).then((l) => {
194
- this.itemLists = l.data, this.isLoading = !1;
195
- }).catch((l) => {
196
- console.error(l), this.isLoading = !1;
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(i, s) {
200
- s && (i === this.sortField ? this.sortOrder = this.sortOrder === "asc" ? "desc" : "asc" : (this.sortField = i, this.sortOrder = "asc"), this.GetItemLists(this.page));
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 i = await import("xlsx"), s = i.default || i, l = document.querySelector("#table" + this.Random_string), _ = Array.from(l.querySelectorAll("thead th")).map((f) => f.innerText), d = ["", ...["action"]], C = _.map((f, e) => d.includes(f) ? e : -1).filter((f) => f !== -1), F = Array.from(l.querySelectorAll("tbody tr")).map((f) => Array.from(f.querySelectorAll("td")).map((u) => u.innerText).filter((u, r) => !C.includes(r))), w = [_.filter((f, e) => !C.includes(e)), ...F], L = s.utils.aoa_to_sheet(w), b = s.utils.book_new();
207
- s.utils.book_append_sheet(b, L, "Sheet1"), s.writeFile(b, "exported-file.xlsx");
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((i) => {
212
- this.columnVisibility[i.field_name] = !0;
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(i) {
220
- this.page = 1, this.perPage = i, this.GetItemLists(this.page);
274
+ perPage(t) {
275
+ this.applyingState || (this.page = 1, this.perPage = t, this.GetItemLists(this.page));
221
276
  },
222
- refreshData(i, s) {
223
- this.isMounted && i !== s && this.GetItemLists();
277
+ refreshData(t, s) {
278
+ this.isMounted && t !== s && this.GetItemLists();
224
279
  },
225
280
  dynamicFilters: {
226
- handler(i) {
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" }, J = { class: "flex flex-col flex-wrap gap-4 pb-4 xl:flex-row xl:items-center xl:justify-between" }, K = { class: "flex items-center gap-2" }, $ = { class: "font-medium" }, ee = { class: "mt-[3px]" }, te = { class: "font-medium" }, le = { class: "relative" }, ie = ["placeholder"], se = { class: "flex flex-wrap mb-3 gap-1 lg:gap-0!" }, ne = ["id"], ae = ["aria-labelledby"], re = { class: "flex items-center p-2 rounded-sm hover:bg-gray-100 dark:hover:bg-gray-600" }, de = ["id", "onUpdate:modelValue"], oe = ["for"], ce = ["id"], ge = ["id"], ue = { 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]!" }, he = {
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
- }, me = ["onClick"], fe = { class: "inline-flex items-center justify-center gap-1" }, _e = {
296
+ }, fe = ["onClick"], _e = { class: "inline-flex items-center justify-center gap-1" }, pe = {
239
297
  key: 0,
240
298
  class: "print:hidden!"
241
- }, be = { class: "bg-white dark:bg-gray-900" }, pe = { key: 0 }, ye = ["colspan"], we = {
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
- }, ke = ["checked", "onChange"], ve = ["data-label"], xe = { class: "flex items-center justify-between bg-white border-gray-200 dark:text-gray-400 dark:bg-gray-800" };
246
- function Ce(i, s, l, _, n, d) {
247
- const C = p("DynamicConfirmation"), F = p("dropdown"), I = p("GlDropdown"), w = p("GlTextInput"), L = p("GlDateRangePicker"), b = p("gl-button"), S = p("TailwindPagination"), f = H("click-outside");
248
- return a(), o(h, null, [
249
- v(C, { ref: "ConfirmationDelete" }, null, 512),
250
- t("div", Y, [
251
- t("div", J, [
252
- t("div", K, [
253
- t("span", $, g(l.language?.show ?? "Show"), 1),
254
- t("div", ee, [
255
- v(F, {
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: n.pageOptions,
259
- modelValue: n.perPage,
260
- "onUpdate:modelValue": s[0] || (s[0] = (e) => n.perPage = 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
- t("span", te, g(l.language?.entries ?? "Entries"), 1)
333
+ l("span", le, u(i.language?.entries ?? "Entries"), 1)
270
334
  ]),
271
- s[6] || (s[6] = t("label", {
335
+ s[5] || (s[5] = l("label", {
272
336
  for: "table-search",
273
337
  class: "sr-only"
274
338
  }, "Search", -1)),
275
- t("div", le, [
276
- s[5] || (s[5] = t("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)),
277
- A(t("input", {
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) => n.search = 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: l.language?.search ? l.language?.search + " ..." : "Search ..."
283
- }, null, 40, ie), [
284
- [R, n.search]
346
+ placeholder: i.language?.search ? i.language?.search + " ..." : "Search ..."
347
+ }, null, 40, se), [
348
+ [R, r.search]
285
349
  ])
286
350
  ])
287
351
  ]),
288
- t("div", {
289
- class: D(["grid gap-4 mb-3 xs:grid-cols-1 xl:grid-cols-2", l.xprops?.customFiltersMainClass])
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(h, null, k(d.customFilters, (e, u) => (a(), o(h, { key: u }, [
292
- e.type == "dropdown" ? (a(), m(I, {
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: n.dynamicFilters[e.field_name],
297
- "onUpdate:modelValue": (r) => n.dynamicFilters[e.field_name] = r,
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: l.language?.please_select_an_option ?? "Please select an option"
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(), m(w, {
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: n.dynamicFilters[e.field_name],
310
- "onUpdate:modelValue": (r) => n.dynamicFilters[e.field_name] = r,
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(), m(w, {
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: n.dynamicFilters[e.field_name],
320
- "onUpdate:modelValue": (r) => n.dynamicFilters[e.field_name] = r,
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(), m(L, {
388
+ e.type == "date_range" ? (a(), _(D, {
325
389
  key: 3,
326
390
  is_required: !1,
327
391
  show: !1,
328
- modelValue: n.dynamicFilters[e.field_name],
329
- "onUpdate:modelValue": (r) => n.dynamicFilters[e.field_name] = r,
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(h, null, k(l.columns, (e, u) => (a(), o(h, { key: u }, [
335
- e.hasOwnFilter && Object.keys(e.hasOwnFilter).length > 0 ? (a(), o(h, { key: 0 }, [
336
- e.hasOwnFilter.type == "dropdown" ? (a(), m(I, {
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: n.dynamicFilters[e.field_name],
341
- "onUpdate:modelValue": (r) => n.dynamicFilters[e.field_name] = r,
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: l.language?.please_select_an_option ?? "Please select an option"
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(), m(w, {
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: n.dynamicFilters[e.field_name],
354
- "onUpdate:modelValue": (r) => n.dynamicFilters[e.field_name] = r,
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(), m(w, {
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: n.dynamicFilters[e.field_name],
364
- "onUpdate:modelValue": (r) => n.dynamicFilters[e.field_name] = r,
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
- t("div", se, [
372
- l.enable_select_deselect_delete ? (a(), m(b, {
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: x(() => [
381
- y(g(l.language?.select_all ?? "Select all"), 1)
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
- l.enable_select_deselect_delete ? (a(), m(b, {
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: x(() => [
394
- y(g(l.language?.deselect_all ?? "Deselect all"), 1)
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
- v(b, {
462
+ x(y, {
399
463
  onClick: d.delayedPrint,
400
464
  tag: "button",
401
- is_loading: n.isLoadinPrint,
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: x(() => [
410
- y(g(l.language?.print ?? "Print"), 1)
473
+ default: C(() => [
474
+ b(u(i.language?.print ?? "Print"), 1)
411
475
  ]),
412
476
  _: 1
413
477
  }, 8, ["onClick", "is_loading"]),
414
- v(b, {
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: x(() => [
426
- y(g(l.language?.excel ?? "Excel"), 1)
489
+ default: C(() => [
490
+ b(u(i.language?.excel ?? "Excel"), 1)
427
491
  ]),
428
492
  _: 1
429
493
  }, 8, ["onClick"]),
430
- A((a(), o("div", null, [
431
- t("button", {
432
- class: D([!l.enable_select_deselect_delete || !l.enable_delete || !i.can(`delete_${l.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!"]),
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[7] || (s[7] = t("svg", {
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
- t("path", {
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
- t("path", {
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
- y(" " + g(l.language?.column_visibility ?? "Column visibility") + " ", 1),
455
- s[8] || (s[8] = t("svg", {
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
- t("path", {
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
- A(t("div", {
472
- id: "db_" + n.Random_string,
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
- t("ul", {
539
+ l("ul", {
476
540
  class: "p-3 space-y-1 text-sm text-gray-700 dark:text-gray-200",
477
- "aria-labelledby": "db_" + n.Random_string
541
+ "aria-labelledby": "db_" + r.Random_string
478
542
  }, [
479
- (a(!0), o(h, null, k(l.columns, (e, u) => (a(), o("li", null, [
480
- t("div", re, [
481
- A(t("input", {
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": (r) => n.columnVisibility[e.field_name] = r,
548
+ "onUpdate:modelValue": (n) => r.columnVisibility[e.field_name] = n,
485
549
  class: "w-4 h-4 rounded-sm"
486
- }, null, 8, de), [
487
- [z, n.columnVisibility[e.field_name]]
550
+ }, null, 8, oe), [
551
+ [z, r.columnVisibility[e.field_name]]
488
552
  ]),
489
- t("label", {
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
- }, g(e.field_label), 9, oe)
556
+ }, u(e.field_label), 9, ce)
493
557
  ])
494
558
  ]))), 256))
495
559
  ], 8, ae)
496
560
  ], 8, ne), [
497
- [N, n.isOpenColumnVisibility]
561
+ [Z, r.isOpenColumnVisibility]
498
562
  ])
499
563
  ])), [
500
- [f, d.closeColumnVisibilityDropdown]
564
+ [p, d.closeColumnVisibilityDropdown]
501
565
  ]),
502
- l.enable_select_deselect_delete && l.enable_delete && i.can(`delete_${l.xprops?.permission}`) ? (a(), m(b, {
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: n.checkedIds.length <= 0,
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: x(() => [
515
- y(g(l.language?.delete_selected ?? "Delete selected") + " " + g(n.checkedIds.length > 0 ? `(${n.checkedIds.length})` : ""), 1)
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
- t("div", {
521
- id: "print_" + n.Random_string,
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
- t("table", {
525
- id: "table" + n.Random_string,
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
- t("thead", ue, [
529
- t("tr", null, [
530
- l.enable_select_deselect_delete ? (a(), o("th", he)) : c("", !0),
531
- (a(!0), o(h, null, k(d.visibleColumns, (e, u) => (a(), o("th", {
532
- key: u,
533
- onClick: (r) => d.updateSortColumn(e.field_name, e.sortable),
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
- t("div", fe, [
537
- t("span", null, g(e.field_label), 1),
538
- n.sortField === e.field_name ? (a(), o("span", _e, s[9] || (s[9] = [
539
- t("svg", {
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
- t("path", {
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, me))), 128))
620
+ ], 8, fe))), 128))
557
621
  ])
558
622
  ]),
559
- t("tbody", be, [
560
- n.isLoading ? (a(), o("tr", pe, [
561
- t("td", {
562
- colspan: l.columns.length + (l.enable_select_deselect_delete ? 1 : 0)
563
- }, s[10] || (s[10] = [
564
- t("div", {
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
- t("div", { class: "flex items-center justify-between" }, [
569
- t("div", null, [
570
- t("div", { class: "w-24 h-3 mb-3 bg-gray-300 rounded-full dark:bg-gray-600" }),
571
- t("div", { class: "w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700" })
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
- t("div", { class: "w-12 h-3 bg-gray-300 rounded-full dark:bg-gray-700" })
637
+ l("div", { class: "w-12 h-3 bg-gray-300 rounded-full dark:bg-gray-700" })
574
638
  ]),
575
- t("div", { class: "flex items-center justify-between pt-4" }, [
576
- t("div", null, [
577
- t("div", { class: "w-24 h-3 mb-3 bg-gray-300 rounded-full dark:bg-gray-600" }),
578
- t("div", { class: "w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700" })
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
- t("div", { class: "w-12 h-3 bg-gray-300 rounded-full dark:bg-gray-700" })
644
+ l("div", { class: "w-12 h-3 bg-gray-300 rounded-full dark:bg-gray-700" })
581
645
  ]),
582
- t("div", { class: "flex items-center justify-between pt-4" }, [
583
- t("div", null, [
584
- t("div", { class: "w-24 h-3 mb-3 bg-gray-300 rounded-full dark:bg-gray-600" }),
585
- t("div", { class: "w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700" })
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
- t("div", { class: "w-12 h-3 bg-gray-300 rounded-full dark:bg-gray-700" })
651
+ l("div", { class: "w-12 h-3 bg-gray-300 rounded-full dark:bg-gray-700" })
588
652
  ]),
589
- t("div", { class: "flex items-center justify-between pt-4" }, [
590
- t("div", null, [
591
- t("div", { class: "w-24 h-3 mb-3 bg-gray-300 rounded-full dark:bg-gray-600" }),
592
- t("div", { class: "w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700" })
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
- t("div", { class: "w-12 h-3 bg-gray-300 rounded-full dark:bg-gray-700" })
658
+ l("div", { class: "w-12 h-3 bg-gray-300 rounded-full dark:bg-gray-700" })
595
659
  ]),
596
- t("div", { class: "flex items-center justify-between pt-4" }, [
597
- t("div", null, [
598
- t("div", { class: "w-24 h-3 mb-3 bg-gray-300 rounded-full dark:bg-gray-600" }),
599
- t("div", { class: "w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700" })
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
- t("div", { class: "w-12 h-3 bg-gray-300 rounded-full dark:bg-gray-700" })
665
+ l("div", { class: "w-12 h-3 bg-gray-300 rounded-full dark:bg-gray-700" })
602
666
  ]),
603
- t("span", { class: "sr-only" }, "Loading...")
667
+ l("span", { class: "sr-only" }, "Loading...")
604
668
  ], -1)
605
- ]), 8, ye)
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
- n.isLoading ? c("", !0) : (a(!0), o(h, { key: 1 }, k(n.itemLists.data, (e, u) => (a(), o("tr", {
608
- key: u,
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
- l.enable_select_deselect_delete ? (a(), o("td", we, [
612
- t("input", {
613
- checked: n.checkedIds.includes(e.id),
614
- onChange: (r) => d.toggleCheck(e.id),
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, ke)
703
+ }, null, 40, Se)
619
704
  ])) : c("", !0),
620
- (a(!0), o(h, null, k(d.visibleColumns, (r, P) => (a(), o("td", {
621
- style: Z(r?.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": r.field_label,
624
- class: D(["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", {
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 === l.columns.length - 1
711
+ "rounded-b-lg lg:rounded-b-none!": P === i.columns.length - 1
627
712
  }])
628
713
  }, [
629
- t("div", {
630
- class: D([r.field_name === "action" ? "" : "overflow-auto", "td_overflow_auto max-h-40 max-w-100"])
714
+ l("div", {
715
+ class: S([n.field_name === "action" ? "" : "overflow-auto", "td_overflow_auto max-h-40 max-w-100"])
631
716
  }, [
632
- r.tdComp ? (a(), m(Q(d.forDynCompIs(r.tdComp)), {
717
+ n.tdComp ? (a(), _(J(d.forDynCompIs(n.tdComp)), {
633
718
  key: 0,
634
- language: l.language,
719
+ language: i.language,
635
720
  row: e,
636
- field: r.field_name,
637
- xprops: l.xprops,
638
- tdProps: r.tdProps,
639
- onDeleteAction: s[4] || (s[4] = (V) => d.GetItemLists()),
640
- onEditAction: (V) => d.editAction(e),
641
- onGeneralAction: (V) => d.generalAction(e),
642
- onGeneralAction1: (V) => d.generalAction1(e),
643
- onGeneralAction2: (V) => d.generalAction2(e)
644
- }, null, 40, ["language", "row", "field", "xprops", "tdProps", "onEditAction", "onGeneralAction", "onGeneralAction1", "onGeneralAction2"])) : (a(), o(h, { key: 1 }, [
645
- y(g(e[r.field_name]), 1)
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, ve))), 128))
649
- ]))), 128))
744
+ ], 14, Fe))), 128))
745
+ ]))), 128)) : c("", !0)
650
746
  ])
651
- ], 8, ge)
652
- ], 8, ce),
653
- t("div", xe, [
654
- v(S, {
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: n.itemLists,
658
- limit: n.limit,
659
- size: n.size,
660
- align: n.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 Te = /* @__PURE__ */ X(W, [["render", Ce], ["__scopeId", "data-v-7c8a37f5"]]);
763
+ const Ee = /* @__PURE__ */ X(W, [["render", De], ["__scopeId", "data-v-03e2d4b4"]]);
668
764
  export {
669
- Te as default
765
+ Ee as default
670
766
  };