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.
@@ -1,5 +1,5 @@
1
1
  import M from "../../../node_modules/vue3-print-nb/dist/vue3-print-nb.es.js";
2
- import { resolveComponent as D, resolveDirective as E, createElementBlock as g, openBlock as d, withDirectives as j, createElementVNode as e, createCommentVNode as v, createVNode as _, vModelText as S, withCtx as L, createTextVNode as f, Fragment as b, renderList as w, toDisplayString as y, normalizeClass as k, createBlock as I, resolveDynamicComponent as O, withModifiers as P } from "vue";
2
+ import { resolveComponent as D, resolveDirective as E, createElementBlock as g, openBlock as d, withDirectives as j, createElementVNode as e, createCommentVNode as v, createVNode as _, vModelText as S, withCtx as L, createTextVNode as y, Fragment as b, renderList as w, toDisplayString as h, normalizeClass as k, createBlock as I, resolveDynamicComponent as O, withModifiers as P } from "vue";
3
3
  /* empty css */
4
4
  import B from "../../../_virtual/_plugin-vue_export-helper.js";
5
5
  const H = {
@@ -24,21 +24,21 @@ const H = {
24
24
  }
25
25
  },
26
26
  data() {
27
- const r = this.generateRandomString(6);
27
+ const t = this.generateRandomString(6);
28
28
  return {
29
29
  isLoadinPrint: !1,
30
- Random_string: r,
30
+ Random_string: t,
31
31
  printObj: {
32
- id: "print_" + r,
32
+ id: "print_" + t,
33
33
  popTitle: "",
34
34
  // preview:true,
35
- beforeOpenCallback(t) {
35
+ beforeOpenCallback(r) {
36
36
  },
37
- openCallback(t) {
38
- t.isLoadinPrint = !1;
37
+ openCallback(r) {
38
+ r.isLoadinPrint = !1;
39
39
  },
40
- closeCallback(t) {
41
- t.isLoadinPrint = !1;
40
+ closeCallback(r) {
41
+ r.isLoadinPrint = !1;
42
42
  }
43
43
  },
44
44
  isLoading: !1,
@@ -60,87 +60,87 @@ const H = {
60
60
  return this.data;
61
61
  },
62
62
  filteredData() {
63
- const r = this.search.toLowerCase(), t = this.sortData(this.itemLists);
64
- return r ? t.filter((n) => this.columns.some((c) => {
65
- const l = n[c.field_name];
66
- return l != null && String(l).toLowerCase().includes(r);
67
- })) : t;
63
+ const t = this.search.toLowerCase(), r = this.sortData(this.itemLists);
64
+ return t ? r.filter((l) => this.columns.some((c) => {
65
+ const n = l[c.field_name];
66
+ return n != null && String(n).toLowerCase().includes(t);
67
+ })) : r;
68
68
  },
69
69
  totalPages() {
70
70
  return Math.ceil(this.filteredData.length / this.itemsPerPage);
71
71
  },
72
72
  paginatedData() {
73
- const r = (this.currentPage - 1) * this.itemsPerPage, t = r + this.itemsPerPage;
74
- return this.filteredData.slice(r, t);
73
+ const t = (this.currentPage - 1) * this.itemsPerPage, r = t + this.itemsPerPage;
74
+ return this.filteredData.slice(t, r);
75
75
  },
76
76
  displayedPageNumbers() {
77
- let r = Math.max(
77
+ let t = Math.max(
78
78
  this.currentPage - Math.floor(this.maxDisplayedPages / 2),
79
79
  1
80
- ), t = r + this.maxDisplayedPages - 1;
81
- return t > this.totalPages && (t = this.totalPages, r = Math.max(t - this.maxDisplayedPages + 1, 1)), Array.from(
82
- { length: t - r + 1 },
83
- (n, c) => r + c
80
+ ), r = t + this.maxDisplayedPages - 1;
81
+ return r > this.totalPages && (r = this.totalPages, t = Math.max(r - this.maxDisplayedPages + 1, 1)), Array.from(
82
+ { length: r - t + 1 },
83
+ (l, c) => t + c
84
84
  );
85
85
  },
86
86
  firstItemIndex() {
87
87
  return this.itemsPerPage * (this.currentPage - 1) + 1;
88
88
  },
89
89
  lastItemIndex() {
90
- const r = this.itemsPerPage * this.currentPage;
91
- return r > this.filteredData.length ? this.filteredData.length : r;
90
+ const t = this.itemsPerPage * this.currentPage;
91
+ return t > this.filteredData.length ? this.filteredData.length : t;
92
92
  }
93
93
  },
94
94
  methods: {
95
95
  async exportToExcel() {
96
- const r = await import("xlsx"), t = r.default || r, n = document.querySelector("#table" + this.Random_string), c = Array.from(n.querySelectorAll("thead th")).map((o) => o.innerText), a = ["", ...["action"]], p = c.map((o, u) => a.includes(o) ? u : -1).filter((o) => o !== -1), x = Array.from(n.querySelectorAll("tbody tr")).map((o) => Array.from(o.querySelectorAll("td")).map((C) => C.innerText).filter((C, T) => !p.includes(T))), s = [c.filter((o, u) => !p.includes(u)), ...x], h = t.utils.aoa_to_sheet(s), i = t.utils.book_new();
97
- t.utils.book_append_sheet(i, h, "Sheet1"), t.writeFile(i, "exported-file.xlsx");
96
+ const t = await import("xlsx"), r = t.default || t, l = document.querySelector("#table" + this.Random_string), c = Array.from(l.querySelectorAll("thead th")).map((o) => o.innerText), s = ["", ...["action"]], p = c.map((o, f) => s.includes(o) ? f : -1).filter((o) => o !== -1), x = Array.from(l.querySelectorAll("tbody tr")).map((o) => Array.from(o.querySelectorAll("td")).map((C) => C.innerText).filter((C, T) => !p.includes(T))), a = [c.filter((o, f) => !p.includes(f)), ...x], u = r.utils.aoa_to_sheet(a), i = r.utils.book_new();
97
+ r.utils.book_append_sheet(i, u, "Sheet1"), r.writeFile(i, "exported-file.xlsx");
98
98
  },
99
- generateRandomString(r) {
100
- let t = "";
101
- const n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", c = n.length;
102
- for (let l = 0; l < r; l++)
103
- t += n.charAt(
99
+ generateRandomString(t) {
100
+ let r = "";
101
+ const l = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", c = l.length;
102
+ for (let n = 0; n < t; n++)
103
+ r += l.charAt(
104
104
  Math.floor(Math.random() * c)
105
105
  );
106
- return t;
106
+ return r;
107
107
  },
108
108
  delayedPrint() {
109
109
  this.isLoadinPrint = !0, this.$nextTick(() => {
110
110
  this.$refs.hiddenPrintBtn?.click(), this.isLoadinPrint = !1;
111
111
  });
112
112
  },
113
- editAction(r) {
114
- this.$emit("editAction", r);
113
+ editAction(t) {
114
+ this.$emit("editAction", t);
115
115
  },
116
116
  deleteAction() {
117
117
  this.$emit("deleteAction");
118
118
  },
119
- generalAction(r) {
120
- this.$emit("generalAction", r);
119
+ generalAction(t) {
120
+ this.$emit("generalAction", t);
121
121
  },
122
122
  // Every cell event, with whatever the cell sent along. Cells can also emit
123
123
  // their own named actions: emit('cellAction', 'restart', payload).
124
- cellAction(r, t, n, c) {
125
- this.$emit("cell-action", { action: r, row: t, payload: n, field: c?.field_name });
124
+ cellAction(t, r, l, c) {
125
+ this.$emit("cell-action", { action: t, row: r, payload: l, field: c?.field_name });
126
126
  },
127
- isEscapedColumn(r) {
128
- return r?.html === !1 ? !0 : r?.html === !0 ? !1 : this.escape_html;
127
+ isEscapedColumn(t) {
128
+ return t?.html === !1 ? !0 : t?.html === !0 ? !1 : this.escape_html;
129
129
  },
130
- forDynCompIs(r) {
131
- return typeof r == "object" ? r : null;
130
+ forDynCompIs(t) {
131
+ return typeof t == "object" ? t : null;
132
132
  },
133
- handleItemsPerPageChange(r) {
134
- this.itemsPerPage = r;
133
+ handleItemsPerPageChange(t) {
134
+ this.itemsPerPage = t;
135
135
  },
136
- goToPage(r) {
137
- r >= 1 && r <= this.totalPages && (this.currentPage = r);
136
+ goToPage(t) {
137
+ t >= 1 && t <= this.totalPages && (this.currentPage = t);
138
138
  },
139
- sort(r) {
140
- r === this.sortKey ? this.sortOrder *= -1 : (this.sortKey = r, this.sortOrder = 1);
139
+ sort(t) {
140
+ t === this.sortKey ? this.sortOrder *= -1 : (this.sortKey = t, this.sortOrder = 1);
141
141
  },
142
- sortData(r) {
143
- return this.sortKey ? r.slice().sort((t, n) => (t[this.sortKey] < n[this.sortKey] ? -1 : 1) * this.sortOrder) : r;
142
+ sortData(t) {
143
+ return this.sortKey ? t.slice().sort((r, l) => (r[this.sortKey] < l[this.sortKey] ? -1 : 1) * this.sortOrder) : t;
144
144
  },
145
145
  previousPage() {
146
146
  this.currentPage > 1 && this.currentPage--;
@@ -154,14 +154,14 @@ const H = {
154
154
  lastPage() {
155
155
  this.currentPage = this.totalPages;
156
156
  },
157
- goToPage(r) {
158
- r >= 1 && r <= this.totalPages && (this.currentPage = r);
157
+ goToPage(t) {
158
+ t >= 1 && t <= this.totalPages && (this.currentPage = t);
159
159
  },
160
160
  GetItemLists() {
161
- this.isLoading = !0, axios.get(this.xprops.route_get_data).then((r) => {
162
- this.itemLists = r.data, this.isLoading = !1;
163
- }).catch((r) => {
164
- console.error(r), this.isLoading = !1;
161
+ this.isLoading = !0, axios.get(this.xprops.route_get_data).then((t) => {
162
+ this.itemLists = t.data, this.isLoading = !1;
163
+ }).catch((t) => {
164
+ console.error(t), this.isLoading = !1;
165
165
  });
166
166
  }
167
167
  },
@@ -179,25 +179,25 @@ const H = {
179
179
  }, Q = { class: "bg-white dark:bg-gray-900" }, Y = { key: 0 }, $ = ["colspan"], ee = ["data-label"], te = {
180
180
  key: 0,
181
181
  class: "text-pretty"
182
- }, re = ["innerHTML"], se = {
182
+ }, re = ["innerHTML"], ae = {
183
183
  key: 0,
184
184
  class: "flex items-center justify-between px-4 py-3 bg-white border-gray-200 sm:px-6 dark:text-gray-400 dark:bg-gray-800"
185
- }, ae = { class: "flex flex-col items-center w-full gap-2" }, le = { class: "text-sm text-gray-700 dark:text-gray-400" }, ne = { class: "font-semibold text-gray-900 dark:text-white" }, ie = { class: "font-semibold text-gray-900 dark:text-white" }, oe = { class: "font-semibold text-gray-900 dark:text-white" }, de = { "aria-label": "Page navigation" }, ge = { class: "flex items-center h-8 -space-x-px text-sm" }, ce = ["onClick", "aria-current"];
186
- function he(r, t, n, c, l, a) {
185
+ }, se = { class: "flex flex-col items-center w-full gap-2" }, le = { class: "text-sm text-gray-700 dark:text-gray-400" }, ne = { class: "font-semibold text-gray-900 dark:text-white" }, ie = { class: "font-semibold text-gray-900 dark:text-white" }, oe = { class: "font-semibold text-gray-900 dark:text-white" }, de = { "aria-label": "Page navigation" }, ge = { class: "flex items-center h-8 -space-x-px text-sm" }, ce = ["onClick", "aria-current"];
186
+ function he(t, r, l, c, n, s) {
187
187
  const p = D("dropdown"), x = D("gl-button"), A = E("print");
188
188
  return d(), g("div", V, [
189
189
  j(e("button", K, null, 512), [
190
- [A, l.printObj]
190
+ [A, n.printObj]
191
191
  ]),
192
192
  e("div", q, [
193
193
  e("div", R, [
194
- t[4] || (t[4] = e("span", { class: "font-medium" }, " Show ", -1)),
194
+ r[4] || (r[4] = e("span", { class: "font-medium" }, " Show ", -1)),
195
195
  e("div", G, [
196
196
  _(p, {
197
197
  has_cancel: !1,
198
- options: l.showNoOfEntries,
199
- modelValue: l.itemsPerPage,
200
- "onUpdate:modelValue": t[0] || (t[0] = (s) => l.itemsPerPage = s),
198
+ options: n.showNoOfEntries,
199
+ modelValue: n.itemsPerPage,
200
+ "onUpdate:modelValue": r[0] || (r[0] = (a) => n.itemsPerPage = a),
201
201
  is_required: !1,
202
202
  field_name: "NoOfEntries",
203
203
  label_name: "",
@@ -206,29 +206,29 @@ function he(r, t, n, c, l, a) {
206
206
  placeholder: "Please select an option"
207
207
  }, null, 8, ["options", "modelValue"])
208
208
  ]),
209
- t[5] || (t[5] = e("span", { class: "font-medium" }, " Entries ", -1))
209
+ r[5] || (r[5] = e("span", { class: "font-medium" }, " Entries ", -1))
210
210
  ]),
211
- t[7] || (t[7] = e("label", {
211
+ r[7] || (r[7] = e("label", {
212
212
  for: "table-search",
213
213
  class: "sr-only"
214
214
  }, "Search", -1)),
215
215
  e("div", N, [
216
- t[6] || (t[6] = e("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)),
216
+ r[6] || (r[6] = e("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)),
217
217
  j(e("input", {
218
218
  type: "text",
219
- "onUpdate:modelValue": t[1] || (t[1] = (s) => l.search = s),
219
+ "onUpdate:modelValue": r[1] || (r[1] = (a) => n.search = a),
220
220
  class: "gl-input-form",
221
221
  placeholder: "Search ..."
222
222
  }, null, 512), [
223
- [S, l.search]
223
+ [S, n.search]
224
224
  ])
225
225
  ])
226
226
  ]),
227
227
  e("div", F, [
228
228
  _(x, {
229
- onClick: a.delayedPrint,
229
+ onClick: s.delayedPrint,
230
230
  tag: "button",
231
- is_loading: r.isLoadingPrint,
231
+ is_loading: t.isLoadingPrint,
232
232
  button_type: "light",
233
233
  has_border_reduced: !1,
234
234
  classes: "rounded-s-lg",
@@ -236,13 +236,13 @@ function he(r, t, n, c, l, a) {
236
236
  <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"/>
237
237
  </svg>`
238
238
  }, {
239
- default: L(() => t[8] || (t[8] = [
240
- f(" Print ")
239
+ default: L(() => r[8] || (r[8] = [
240
+ y(" Print ")
241
241
  ])),
242
242
  _: 1
243
243
  }, 8, ["onClick", "is_loading"]),
244
244
  _(x, {
245
- onClick: a.exportToExcel,
245
+ onClick: s.exportToExcel,
246
246
  tag: "button",
247
247
  button_type: "light",
248
248
  has_border_reduced: !1,
@@ -252,30 +252,30 @@ function he(r, t, n, c, l, a) {
252
252
  </svg>
253
253
  `
254
254
  }, {
255
- default: L(() => t[9] || (t[9] = [
256
- f(" Excel ")
255
+ default: L(() => r[9] || (r[9] = [
256
+ y(" Excel ")
257
257
  ])),
258
258
  _: 1
259
259
  }, 8, ["onClick"])
260
260
  ]),
261
261
  e("div", {
262
- id: "print_" + l.Random_string,
262
+ id: "print_" + n.Random_string,
263
263
  class: "overflow-auto rounded-lg dark:text-gray-400 dark:bg-gray-800"
264
264
  }, [
265
265
  e("table", {
266
- id: "table" + l.Random_string,
266
+ id: "table" + n.Random_string,
267
267
  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"
268
268
  }, [
269
269
  e("thead", U, [
270
270
  e("tr", null, [
271
- (d(!0), g(b, null, w(n.columns, (s, h) => (d(), g("th", {
272
- key: h,
273
- onClick: (i) => a.sort(s.field_name, s.sortable),
271
+ (d(!0), g(b, null, w(l.columns, (a, u) => (d(), g("th", {
272
+ key: u,
273
+ onClick: (i) => s.sort(a.field_name, a.sortable),
274
274
  class: "w-full px-4 py-2 lg:w-2/12 print:w-2/12! print:border!"
275
275
  }, [
276
276
  e("div", W, [
277
- e("span", null, y(s.field_label), 1),
278
- l.sortKey === s.field_name ? (d(), g("span", J, t[10] || (t[10] = [
277
+ e("span", null, h(a.field_label), 1),
278
+ n.sortKey === a.field_name ? (d(), g("span", J, r[10] || (r[10] = [
279
279
  e("svg", {
280
280
  class: "w-4 h-4",
281
281
  "aria-hidden": "true",
@@ -297,10 +297,10 @@ function he(r, t, n, c, l, a) {
297
297
  ])
298
298
  ]),
299
299
  e("tbody", Q, [
300
- l.isLoading ? (d(), g("tr", Y, [
300
+ n.isLoading ? (d(), g("tr", Y, [
301
301
  e("td", {
302
- colspan: n.columns.length
303
- }, t[11] || (t[11] = [
302
+ colspan: l.columns.length
303
+ }, r[11] || (r[11] = [
304
304
  e("div", {
305
305
  role: "status",
306
306
  class: "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"
@@ -344,40 +344,40 @@ function he(r, t, n, c, l, a) {
344
344
  ], -1)
345
345
  ]), 8, $)
346
346
  ])) : v("", !0),
347
- l.isLoading ? v("", !0) : (d(!0), g(b, { key: 1 }, w(a.paginatedData, (s, h) => (d(), g("tr", {
348
- key: h,
347
+ n.isLoading ? v("", !0) : (d(!0), g(b, { key: 1 }, w(s.paginatedData, (a, u) => (d(), g("tr", {
348
+ key: u,
349
349
  class: "text-gray-500 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-800 dark:hover:text-gray-200"
350
350
  }, [
351
- (d(!0), g(b, null, w(n.columns, (i, m) => (d(), g("td", {
351
+ (d(!0), g(b, null, w(l.columns, (i, m) => (d(), g("td", {
352
352
  key: m,
353
353
  "data-label": i.field_label,
354
354
  class: k(["text-pretty before:content-[attr(data-label)] before:font-bold dark:before:text-gray-400 lg:before:content-[''] print:before:content-['']! 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-[1px]! dark:border-gray-700", {
355
355
  "rounded-t-lg lg:rounded-t-none!": m === 0,
356
- "rounded-b-lg lg:rounded-b-none!": m === n.columns.length - 1
356
+ "rounded-b-lg lg:rounded-b-none!": m === l.columns.length - 1
357
357
  }])
358
358
  }, [
359
359
  e("div", {
360
360
  class: k([i.field_name === "action" ? "" : "overflow-auto", "td_overflow_auto max-h-40 max-w-100"])
361
361
  }, [
362
- i.tdComp ? (d(), I(O(a.forDynCompIs(i.tdComp)), {
362
+ i.tdComp ? (d(), I(O(s.forDynCompIs(i.tdComp)), {
363
363
  key: 0,
364
- row: s,
364
+ row: a,
365
365
  field: i.field_name,
366
- xprops: n.xprops,
366
+ xprops: l.xprops,
367
367
  tdProps: i.tdProps,
368
368
  onEditAction: (o) => {
369
- a.editAction(s), a.cellAction("editAction", s, o, i);
369
+ s.editAction(a), s.cellAction("editAction", a, o, i);
370
370
  },
371
371
  onGeneralAction: (o) => {
372
- a.generalAction(s), a.cellAction("generalAction", s, o, i);
372
+ s.generalAction(a), s.cellAction("generalAction", a, o, i);
373
373
  },
374
- onDeleteAction: (o) => a.cellAction("deleteAction", s, o, i),
375
- onCellAction: (o, u) => a.cellAction(o, s, u, i)
374
+ onDeleteAction: (o) => s.cellAction("deleteAction", a, o, i),
375
+ onCellAction: (o, f) => s.cellAction(o, a, f, i)
376
376
  }, null, 40, ["row", "field", "xprops", "tdProps", "onEditAction", "onGeneralAction", "onDeleteAction", "onCellAction"])) : (d(), g(b, { key: 1 }, [
377
- a.isEscapedColumn(i) ? (d(), g("p", te, y(s[i.field_name]), 1)) : (d(), g("p", {
377
+ s.isEscapedColumn(i) ? (d(), g("p", te, h(a[i.field_name]), 1)) : (d(), g("p", {
378
378
  key: 1,
379
379
  class: "text-pretty",
380
- innerHTML: s[i.field_name]
380
+ innerHTML: a[i.field_name]
381
381
  }, null, 8, re))
382
382
  ], 64))
383
383
  ], 2)
@@ -386,25 +386,25 @@ function he(r, t, n, c, l, a) {
386
386
  ])
387
387
  ], 8, z)
388
388
  ], 8, Z),
389
- a.paginatedData.length > 0 ? (d(), g("div", se, [
390
- e("div", ae, [
389
+ s.paginatedData.length > 0 ? (d(), g("div", ae, [
390
+ e("div", se, [
391
391
  e("p", le, [
392
- t[12] || (t[12] = f(" Showing ")),
393
- e("span", ne, y(a.firstItemIndex), 1),
394
- t[13] || (t[13] = f(" to ")),
395
- e("span", ie, y(a.lastItemIndex), 1),
396
- t[14] || (t[14] = f(" of ")),
397
- e("span", oe, y(a.filteredData.length), 1),
398
- t[15] || (t[15] = f(" entries "))
392
+ y(h(l.language?.showing ?? "Showing") + " ", 1),
393
+ e("span", ne, h(s.firstItemIndex), 1),
394
+ y(" " + h(l.language?.to ?? "to") + " ", 1),
395
+ e("span", ie, h(s.lastItemIndex), 1),
396
+ y(" " + h(l.language?.of ?? "of") + " ", 1),
397
+ e("span", oe, h(s.filteredData.length), 1),
398
+ y(" " + h(l.language?.entries ?? "entries"), 1)
399
399
  ]),
400
400
  e("nav", de, [
401
401
  e("ul", ge, [
402
402
  e("li", null, [
403
403
  e("a", {
404
404
  href: "#",
405
- onClick: t[2] || (t[2] = P((...s) => a.previousPage && a.previousPage(...s), ["prevent"])),
405
+ onClick: r[2] || (r[2] = P((...a) => s.previousPage && s.previousPage(...a), ["prevent"])),
406
406
  class: "flex items-center justify-center h-8 px-3 leading-tight text-gray-500 bg-white border border-gray-300 ms-0 border-e-0 rounded-s-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"
407
- }, t[16] || (t[16] = [
407
+ }, r[12] || (r[12] = [
408
408
  e("span", { class: "sr-only" }, "Previous", -1),
409
409
  e("svg", {
410
410
  class: "w-2.5 h-2.5 rtl:rotate-180",
@@ -423,23 +423,23 @@ function he(r, t, n, c, l, a) {
423
423
  ], -1)
424
424
  ]))
425
425
  ]),
426
- (d(!0), g(b, null, w(a.displayedPageNumbers, (s) => (d(), g("li", {
427
- key: s,
428
- class: k(Math.abs(s - l.currentPage) > 2 ? "hidden sm:block" : "")
426
+ (d(!0), g(b, null, w(s.displayedPageNumbers, (a) => (d(), g("li", {
427
+ key: a,
428
+ class: k(Math.abs(a - n.currentPage) > 2 ? "hidden sm:block" : "")
429
429
  }, [
430
430
  e("a", {
431
431
  href: "#",
432
- onClick: P((h) => a.goToPage(s), ["prevent"]),
433
- class: k(l.currentPage === s ? "z-10 flex items-center justify-center h-8 px-3 leading-tight text-blue-600 border border-blue-300 bg-blue-50 hover:bg-blue-100 hover:text-blue-700 dark:border-gray-700 dark:bg-gray-700 dark:text-white" : "flex items-center justify-center h-8 px-3 leading-tight text-gray-500 bg-white border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"),
434
- "aria-current": l.currentPage === s ? "page" : void 0
435
- }, y(s), 11, ce)
432
+ onClick: P((u) => s.goToPage(a), ["prevent"]),
433
+ class: k(n.currentPage === a ? "z-10 flex items-center justify-center h-8 px-3 leading-tight text-blue-600 border border-blue-300 bg-blue-50 hover:bg-blue-100 hover:text-blue-700 dark:border-gray-700 dark:bg-gray-700 dark:text-white" : "flex items-center justify-center h-8 px-3 leading-tight text-gray-500 bg-white border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"),
434
+ "aria-current": n.currentPage === a ? "page" : void 0
435
+ }, h(a), 11, ce)
436
436
  ], 2))), 128)),
437
437
  e("li", null, [
438
438
  e("a", {
439
439
  href: "#",
440
- onClick: t[3] || (t[3] = P((...s) => a.nextPage && a.nextPage(...s), ["prevent"])),
440
+ onClick: r[3] || (r[3] = P((...a) => s.nextPage && s.nextPage(...a), ["prevent"])),
441
441
  class: "flex items-center justify-center h-8 px-3 leading-tight text-gray-500 bg-white border border-gray-300 rounded-e-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"
442
- }, t[17] || (t[17] = [
442
+ }, r[13] || (r[13] = [
443
443
  e("span", { class: "sr-only" }, "Next", -1),
444
444
  e("svg", {
445
445
  class: "w-2.5 h-2.5 rtl:rotate-180",
@@ -464,7 +464,7 @@ function he(r, t, n, c, l, a) {
464
464
  ])) : v("", !0)
465
465
  ]);
466
466
  }
467
- const pe = /* @__PURE__ */ B(H, [["render", he], ["__scopeId", "data-v-d7a78d8a"]]);
467
+ const pe = /* @__PURE__ */ B(H, [["render", he], ["__scopeId", "data-v-79c3e2ab"]]);
468
468
  export {
469
469
  pe as default
470
470
  };
@@ -1,7 +1,7 @@
1
1
  import L from "../../LaravelVuePagination/TailwindPagination.vue.js";
2
- import { resolveComponent as y, createElementBlock as i, openBlock as l, createElementVNode as e, toDisplayString as c, createVNode as m, withDirectives as P, vModelText as C, Fragment as u, renderList as h, createCommentVNode as b, normalizeClass as D, createBlock as I, resolveDynamicComponent as j, createTextVNode as O } from "vue";
2
+ import { resolveComponent as y, createElementBlock as i, openBlock as l, createElementVNode as e, toDisplayString as c, createVNode as m, withDirectives as P, vModelText as C, Fragment as u, renderList as p, createCommentVNode as b, normalizeClass as D, createBlock as I, resolveDynamicComponent as j, createTextVNode as S } from "vue";
3
3
  /* empty css */
4
- import S from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ import O from "../../../_virtual/_plugin-vue_export-helper.js";
5
5
  const F = {
6
6
  components: { TailwindPagination: L },
7
7
  props: {
@@ -33,6 +33,15 @@ const F = {
33
33
  },
34
34
  emits: ["editAction"],
35
35
  computed: {
36
+ // "Showing 1 to 10 of 50 Entries" in the table's language.
37
+ paginationTranslation() {
38
+ return {
39
+ showing: this.language?.showing ?? "Showing",
40
+ to: this.language?.to ?? "to",
41
+ of: this.language?.of ?? "of",
42
+ entries: this.language?.entries ?? "Entries"
43
+ };
44
+ },
36
45
  filteredData() {
37
46
  const r = this.search.toLowerCase();
38
47
  return this.sortData(this.data).filter((a) => Object.values(a).some(
@@ -94,18 +103,18 @@ const F = {
94
103
  this.isMounted && r !== t && this.GetItemLists();
95
104
  }
96
105
  }
97
- }, G = { class: "p-0" }, A = { class: "flex flex-col flex-wrap gap-4 pb-4 xl:flex-row xl:items-center xl:justify-between" }, V = { class: "flex items-center gap-2" }, B = { class: "font-medium" }, T = { class: "mt-[3px]" }, z = { class: "font-medium" }, E = { class: "relative" }, M = ["placeholder"], N = { class: "overflow-auto rounded-lg dark:text-gray-400 dark:bg-gray-800" }, U = { 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" }, q = { 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]!" }, H = ["onClick"], J = { class: "inline-flex items-center justify-center gap-1" }, K = {
106
+ }, G = { class: "p-0" }, A = { class: "flex flex-col flex-wrap gap-4 pb-4 xl:flex-row xl:items-center xl:justify-between" }, T = { class: "flex items-center gap-2" }, V = { class: "font-medium" }, B = { class: "mt-[3px]" }, z = { class: "font-medium" }, E = { class: "relative" }, M = ["placeholder"], N = { class: "overflow-auto rounded-lg dark:text-gray-400 dark:bg-gray-800" }, U = { 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" }, q = { 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]!" }, H = ["onClick"], J = { class: "inline-flex items-center justify-center gap-1" }, K = {
98
107
  key: 0,
99
108
  class: "print:hidden!"
100
109
  }, Q = { class: "bg-white dark:bg-gray-900" }, R = { key: 0 }, W = ["colspan"], X = { class: "text-gray-500 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-800 dark:hover:text-gray-200" }, Y = ["colspan"], Z = ["data-label"], $ = { class: "flex items-center justify-between px-4 py-3 bg-white border-gray-200 sm:px-6 dark:text-gray-400 dark:bg-gray-800" };
101
- function ee(r, t, a, g, s, d) {
102
- const v = y("dropdown"), w = y("TailwindPagination");
110
+ function ee(r, t, a, g, s, n) {
111
+ const w = y("dropdown"), v = y("TailwindPagination");
103
112
  return l(), i("div", G, [
104
113
  e("div", A, [
105
- e("div", V, [
106
- e("span", B, c(r.language?.show ?? "Show"), 1),
107
- e("div", T, [
108
- m(v, {
114
+ e("div", T, [
115
+ e("span", V, c(r.language?.show ?? "Show"), 1),
116
+ e("div", B, [
117
+ m(w, {
109
118
  options_top_size: 0,
110
119
  has_cancel: !1,
111
120
  options: s.pageOptions,
@@ -130,7 +139,7 @@ function ee(r, t, a, g, s, d) {
130
139
  P(e("input", {
131
140
  type: "text",
132
141
  "onUpdate:modelValue": t[1] || (t[1] = (o) => s.search = o),
133
- onInput: t[2] || (t[2] = (o) => d.handleSearch()),
142
+ onInput: t[2] || (t[2] = (o) => n.handleSearch()),
134
143
  class: "gl-input-form",
135
144
  placeholder: r.language?.search ? r.language?.search + " ..." : "Search ..."
136
145
  }, null, 40, M), [
@@ -142,9 +151,9 @@ function ee(r, t, a, g, s, d) {
142
151
  e("table", U, [
143
152
  e("thead", q, [
144
153
  e("tr", null, [
145
- (l(!0), i(u, null, h(a.columns, (o, f) => (l(), i("th", {
154
+ (l(!0), i(u, null, p(a.columns, (o, f) => (l(), i("th", {
146
155
  key: f,
147
- onClick: (p) => d.updateSortColumn(o.field_name, o.sortable),
156
+ onClick: (h) => n.updateSortColumn(o.field_name, o.sortable),
148
157
  class: "w-full px-4 py-2 lg:w-2/12"
149
158
  }, [
150
159
  e("div", J, [
@@ -218,35 +227,35 @@ function ee(r, t, a, g, s, d) {
218
227
  ], -1)
219
228
  ]), 8, W)
220
229
  ])) : b("", !0),
221
- s.isLoading ? b("", !0) : (l(!0), i(u, { key: 1 }, h(d.groupedItems, (o, f) => (l(), i(u, null, [
230
+ s.isLoading ? b("", !0) : (l(!0), i(u, { key: 1 }, p(n.groupedItems, (o, f) => (l(), i(u, null, [
222
231
  e("tr", X, [
223
232
  e("td", {
224
233
  colspan: a.columns.length,
225
234
  class: "text-pretty before:content-[attr(data-label)] before:font-bold lg:before:content-none flex md:flex-row flex-col justify-between gap-2 lg:table-cell py-4 px-5 lg:py-3 lg:px-4 border dark:border-gray-700"
226
235
  }, c(f), 9, Y)
227
236
  ]),
228
- (l(!0), i(u, null, h(o, (p, x) => (l(), i("tr", {
237
+ (l(!0), i(u, null, p(o, (h, x) => (l(), i("tr", {
229
238
  key: x,
230
239
  class: "text-gray-500 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-800 dark:hover:text-gray-200"
231
240
  }, [
232
- (l(!0), i(u, null, h(a.columns, (n, _) => (l(), i("td", {
241
+ (l(!0), i(u, null, p(a.columns, (d, _) => (l(), i("td", {
233
242
  key: _,
234
- "data-label": n.field_label,
243
+ "data-label": d.field_label,
235
244
  class: "text-pretty before:content-[attr(data-label)] before:font-bold lg:before:content-none flex md:flex-row flex-col justify-between gap-2 lg:table-cell py-4 px-5 lg:py-3 lg:px-4 border-[1px]! dark:border-gray-700"
236
245
  }, [
237
246
  e("div", {
238
- class: D([n.field_name === "action" ? "" : "overflow-auto", "td_overflow_auto max-h-40 max-w-100"])
247
+ class: D([d.field_name === "action" ? "" : "overflow-auto", "td_overflow_auto max-h-40 max-w-100"])
239
248
  }, [
240
- n.tdComp ? (l(), I(j(d.forDynCompIs(n.tdComp)), {
249
+ d.tdComp ? (l(), I(j(n.forDynCompIs(d.tdComp)), {
241
250
  key: 0,
242
- row: p,
243
- field: n.field_name,
251
+ row: h,
252
+ field: d.field_name,
244
253
  xprops: a.xprops,
245
- tdProps: n.tdProps,
246
- onDeleteAction: t[3] || (t[3] = (k) => d.GetItemLists()),
247
- onEditAction: (k) => d.editAction(p)
254
+ tdProps: d.tdProps,
255
+ onDeleteAction: t[3] || (t[3] = (k) => n.GetItemLists()),
256
+ onEditAction: (k) => n.editAction(h)
248
257
  }, null, 40, ["row", "field", "xprops", "tdProps", "onEditAction"])) : (l(), i(u, { key: 1 }, [
249
- O(c(p[n.field_name]), 1)
258
+ S(c(h[d.field_name]), 1)
250
259
  ], 64))
251
260
  ], 2)
252
261
  ], 8, Z))), 128))
@@ -256,18 +265,19 @@ function ee(r, t, a, g, s, d) {
256
265
  ])
257
266
  ]),
258
267
  e("div", $, [
259
- m(w, {
268
+ m(v, {
260
269
  class: "mt-3 mb-0",
261
270
  data: s.itemLists,
262
271
  limit: s.limit,
263
272
  size: s.size,
264
273
  align: s.align,
265
- onPaginationChangePage: d.GetItemLists
266
- }, null, 8, ["data", "limit", "size", "align", "onPaginationChangePage"])
274
+ translation: n.paginationTranslation,
275
+ onPaginationChangePage: n.GetItemLists
276
+ }, null, 8, ["data", "limit", "size", "align", "translation", "onPaginationChangePage"])
267
277
  ])
268
278
  ]);
269
279
  }
270
- const le = /* @__PURE__ */ S(F, [["render", ee], ["__scopeId", "data-v-5dea3705"]]);
280
+ const le = /* @__PURE__ */ O(F, [["render", ee], ["__scopeId", "data-v-dd7a738c"]]);
271
281
  export {
272
282
  le as default
273
283
  };