@dcodegroup-au/dsg-vue 1.0.13-next → 1.0.15-next

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,11 +1,11 @@
1
- import { defineComponent as Z, useModel as ae, computed as W, withDirectives as Ie, openBlock as s, createElementBlock as d, normalizeClass as L, createVNode as V, createCommentVNode as m, createElementVNode as C, Fragment as q, renderList as Y, vShow as gt, mergeModels as le, ref as P, useTemplateRef as We, unref as G, withCtx as ne, renderSlot as E, toDisplayString as ve, createBlock as K, resolveDynamicComponent as vt, onMounted as qe, normalizeStyle as N, mergeProps as Se, watch as ie, onUnmounted as bt, withModifiers as ft, Transition as ht, createTextVNode as mt, useSlots as wt, createSlots as yt, normalizeProps as kt, guardReactiveProps as pt, nextTick as He } from "vue";
2
- import { _ as O, k as Pt, v as Ct, e as St, u as xt, c as ze, b as Ae, l as Oe, m as Ue, h as Ne, p as Dt, i as $t } from "./DsgTablePerPage.vue_vue_type_style_index_0_lang-o48o8k1B.js";
3
- import { ucfirst as Tt, ucwords as Ve, toSnakeCase as Rt } from "./dsg-vue.helpers-string.esm.js";
4
- import { data_get as Ce } from "./dsg-vue.helpers-object.esm.js";
5
- import { isEmpty as Mt } from "./dsg-vue.helpers.esm.js";
6
- const Et = { class: "dsg-table-pagination" }, Bt = ["disabled"], Lt = ["disabled"], Ft = ["onClick", "innerHTML"], Ht = ["onClick", "innerHTML"], At = ["disabled"], Ut = ["disabled"], Ke = /* @__PURE__ */ Z({
1
+ import { defineComponent as ae, useModel as se, computed as z, withDirectives as ze, openBlock as i, createElementBlock as d, normalizeClass as F, createVNode as V, createCommentVNode as m, createElementVNode as k, Fragment as N, renderList as Z, vShow as gt, mergeModels as oe, ref as y, useTemplateRef as Ne, unref as _, withCtx as ie, renderSlot as B, toDisplayString as ve, createBlock as Q, resolveDynamicComponent as vt, onMounted as Ke, normalizeStyle as j, mergeProps as Te, watch as de, onUnmounted as ft, withModifiers as bt, Transition as ht, createTextVNode as mt, useSlots as wt, createSlots as yt, normalizeProps as kt, guardReactiveProps as pt, nextTick as Ve } from "vue";
2
+ import { _ as K, D as Pt, v as St, f as Ct, u as Dt, b as je, a as We, m as Qe, n as qe, j as Ge, p as xt, k as $t } from "./DsgTablePerPage.vue_vue_type_style_index_0_lang-B--bn0YD.js";
3
+ import { ucfirst as Rt, ucwords as Oe, toSnakeCase as Tt } from "./dsg-vue.helpers-string.esm.js";
4
+ import { data_get as Re } from "./dsg-vue.helpers-object.esm.js";
5
+ import { isEmpty as Et } from "./dsg-vue.helpers.esm.js";
6
+ const Mt = { class: "dsg-table-pagination" }, Bt = ["disabled"], Lt = ["disabled"], Ft = ["onClick", "innerHTML"], At = ["onClick", "innerHTML"], Ht = ["disabled"], Ut = ["disabled"], Xe = /* @__PURE__ */ ae({
7
7
  __name: "DsgTablePagination",
8
- props: /* @__PURE__ */ le({
8
+ props: /* @__PURE__ */ oe({
9
9
  onEachSide: { default: 3 },
10
10
  firstPage: { default: 1 },
11
11
  showFirstLast: { type: Boolean, default: !0 },
@@ -17,82 +17,82 @@ const Et = { class: "dsg-table-pagination" }, Bt = ["disabled"], Lt = ["disabled
17
17
  pagination: { default: null },
18
18
  paginationModifiers: {}
19
19
  }),
20
- emits: /* @__PURE__ */ le(["dsg-table:change-page"], ["update:pagination"]),
21
- setup(e, { expose: B, emit: h }) {
22
- const u = ae(e, "pagination"), S = W(() => u.value === null ? 0 : u.value?.last_page - e.firstPage + 1), H = W(() => u.value === null ? 0 : u.value?.last_page), f = W(() => u.value === null ? !1 : u.value?.current_page === e.firstPage), g = W(() => u.value === null ? !1 : u.value?.current_page === H.value), A = W(() => S.value < e.onEachSide * 2 + 4), $ = W(() => e.onEachSide * 2 + 1), D = W(() => !u.value || u.value?.current_page <= e.onEachSide ? 1 : u.value?.current_page >= S.value - e.onEachSide ? S.value - e.onEachSide * 2 : u.value?.current_page - e.onEachSide), w = h, a = (R) => {
23
- w("dsg-table:change-page", R);
24
- }, T = (R) => R === u.value?.current_page;
25
- return B({
26
- loadPage: a
27
- }), (R, k) => Ie((s(), d("div", Et, [
28
- e.showFirstLast ? (s(), d("a", {
20
+ emits: /* @__PURE__ */ oe(["dsg-table:change-page"], ["update:pagination"]),
21
+ setup(e, { expose: L, emit: h }) {
22
+ const u = se(e, "pagination"), S = z(() => u.value === null ? 0 : u.value?.last_page - e.firstPage + 1), A = z(() => u.value === null ? 0 : u.value?.last_page), f = z(() => u.value === null ? !1 : u.value?.current_page === e.firstPage), g = z(() => u.value === null ? !1 : u.value?.current_page === A.value), q = z(() => S.value < e.onEachSide * 2 + 4), M = z(() => e.onEachSide * 2 + 1), C = z(() => !u.value || u.value?.current_page <= e.onEachSide ? 1 : u.value?.current_page >= S.value - e.onEachSide ? S.value - e.onEachSide * 2 : u.value?.current_page - e.onEachSide), R = h, s = (T) => {
23
+ R("dsg-table:change-page", T);
24
+ }, H = (T) => T === u.value?.current_page;
25
+ return L({
26
+ loadPage: s
27
+ }), (T, x) => ze((i(), d("div", Mt, [
28
+ e.showFirstLast ? (i(), d("a", {
29
29
  key: 0,
30
- onClick: k[0] || (k[0] = (p) => a(e.firstPage)),
31
- class: L(["dsg-table-pagination__link", { "dsg-table-pagination__link--disabled": f.value }]),
30
+ onClick: x[0] || (x[0] = (W) => s(e.firstPage)),
31
+ class: F(["dsg-table-pagination__link", { "dsg-table-pagination__link--disabled": f.value }]),
32
32
  disabled: f.value,
33
33
  title: "First",
34
34
  "aria-label": "First"
35
35
  }, [
36
- V(O, {
36
+ V(K, {
37
37
  icon: e.firstIcon,
38
38
  size: "sm"
39
39
  }, null, 8, ["icon"])
40
40
  ], 10, Bt)) : m("", !0),
41
- C("a", {
42
- onClick: k[1] || (k[1] = (p) => a("prev")),
43
- class: L(["dsg-table-pagination__link", { "dsg-table-pagination__link--disabled": f.value }]),
41
+ k("a", {
42
+ onClick: x[1] || (x[1] = (W) => s("prev")),
43
+ class: F(["dsg-table-pagination__link", { "dsg-table-pagination__link--disabled": f.value }]),
44
44
  disabled: f.value,
45
45
  title: "Previous",
46
46
  "aria-label": "Previous"
47
47
  }, [
48
- V(O, {
48
+ V(K, {
49
49
  icon: e.prevIcon,
50
50
  size: "sm"
51
51
  }, null, 8, ["icon"])
52
52
  ], 10, Lt),
53
- A.value ? (s(!0), d(q, { key: 1 }, Y(S.value, (p, I) => (s(), d("a", {
54
- key: I,
55
- onClick: (se) => a(I + e.firstPage),
56
- class: L(["dsg-table-pagination__link", { "dsg-table-pagination__link--active": T(I + e.firstPage) }]),
57
- innerHTML: p
58
- }, null, 10, Ft))), 128)) : (s(!0), d(q, { key: 2 }, Y($.value, (p, I) => (s(), d("a", {
59
- key: I,
60
- onClick: (se) => a(D.value + I + e.firstPage - 1),
61
- class: L(["dsg-table-pagination__link", { "dsg-table-pagination__link--active": T(D.value + I + e.firstPage - 1) }]),
62
- innerHTML: D.value + p - 1
63
- }, null, 10, Ht))), 128)),
64
- C("a", {
65
- onClick: k[2] || (k[2] = (p) => a("next")),
66
- class: L(["dsg-table-pagination__link", { "dsg-table-pagination__link--disabled": g.value }]),
53
+ q.value ? (i(!0), d(N, { key: 1 }, Z(S.value, (W, $) => (i(), d("a", {
54
+ key: $,
55
+ onClick: (D) => s($ + e.firstPage),
56
+ class: F(["dsg-table-pagination__link", { "dsg-table-pagination__link--active": H($ + e.firstPage) }]),
57
+ innerHTML: W
58
+ }, null, 10, Ft))), 128)) : (i(!0), d(N, { key: 2 }, Z(M.value, (W, $) => (i(), d("a", {
59
+ key: $,
60
+ onClick: (D) => s(C.value + $ + e.firstPage - 1),
61
+ class: F(["dsg-table-pagination__link", { "dsg-table-pagination__link--active": H(C.value + $ + e.firstPage - 1) }]),
62
+ innerHTML: C.value + W - 1
63
+ }, null, 10, At))), 128)),
64
+ k("a", {
65
+ onClick: x[2] || (x[2] = (W) => s("next")),
66
+ class: F(["dsg-table-pagination__link", { "dsg-table-pagination__link--disabled": g.value }]),
67
67
  disabled: g.value,
68
68
  title: "Next",
69
69
  "aria-label": "Next"
70
70
  }, [
71
- V(O, {
71
+ V(K, {
72
72
  icon: e.nextIcon,
73
73
  size: "sm"
74
74
  }, null, 8, ["icon"])
75
- ], 10, At),
76
- e.showFirstLast ? (s(), d("a", {
75
+ ], 10, Ht),
76
+ e.showFirstLast ? (i(), d("a", {
77
77
  key: 3,
78
- onClick: k[3] || (k[3] = (p) => a(H.value)),
79
- class: L(["dsg-table-pagination__link", { "dsg-table-pagination__link--disabled": g.value }]),
78
+ onClick: x[3] || (x[3] = (W) => s(A.value)),
79
+ class: F(["dsg-table-pagination__link", { "dsg-table-pagination__link--disabled": g.value }]),
80
80
  disabled: g.value,
81
81
  title: "Last",
82
82
  "aria-label": "Last"
83
83
  }, [
84
- V(O, {
84
+ V(K, {
85
85
  icon: e.lastIcon,
86
86
  size: "sm"
87
87
  }, null, 8, ["icon"])
88
88
  ], 10, Ut)) : m("", !0)
89
89
  ], 512)), [
90
- [gt, u.value && H.value > e.firstPage]
90
+ [gt, u.value && A.value > e.firstPage]
91
91
  ]);
92
92
  }
93
- }), Vt = ["innerHTML"], je = /* @__PURE__ */ Z({
93
+ }), It = ["innerHTML"], Ye = /* @__PURE__ */ ae({
94
94
  __name: "DsgTablePaginationInfo",
95
- props: /* @__PURE__ */ le({
95
+ props: /* @__PURE__ */ oe({
96
96
  infoTemplate: { default: "Displaying {from} to {to} of {total} items" },
97
97
  noDataTemplate: { default: "No relevant data" }
98
98
  }, {
@@ -101,19 +101,19 @@ const Et = { class: "dsg-table-pagination" }, Bt = ["disabled"], Lt = ["disabled
101
101
  }),
102
102
  emits: ["update:pagination"],
103
103
  setup(e) {
104
- const B = ae(e, "pagination"), h = W(() => B.value == null || B.value.total == 0 ? e.noDataTemplate : e.infoTemplate.replace("{from}", (B.value?.from || 0).toString()).replace("{to}", (B.value?.to || 0).toString()).replace("{total}", (B.value?.total || 0).toString()));
105
- return (u, S) => (s(), d("div", {
104
+ const L = se(e, "pagination"), h = z(() => L.value == null || L.value.total == 0 ? e.noDataTemplate : e.infoTemplate.replace("{from}", (L.value?.from || 0).toString()).replace("{to}", (L.value?.to || 0).toString()).replace("{total}", (L.value?.total || 0).toString()));
105
+ return (u, S) => (i(), d("div", {
106
106
  class: "dsg-table-pagination-info",
107
107
  innerHTML: h.value
108
- }, null, 8, Vt));
108
+ }, null, 8, It));
109
109
  }
110
- }), It = {
110
+ }), Vt = {
111
111
  class: "dsg-table-actions",
112
112
  ref: "dsgTableActions"
113
113
  }, Wt = { class: "dsg-table-action__trigger" }, qt = {
114
114
  key: 0,
115
115
  class: "dsg-table-actions__menu-wrapper"
116
- }, zt = ["href", "target", "onClick"], Ot = ["textContent"], Nt = { key: 0 }, Kt = { key: 1 }, jt = ["href", "target", "onClick"], Qt = { class: "flex-1" }, Qe = /* @__PURE__ */ Z({
116
+ }, Ot = ["href", "target", "onClick"], zt = ["textContent"], Nt = { key: 0 }, Kt = { key: 1 }, jt = ["href", "target", "onClick"], Qt = { class: "flex-1" }, Je = /* @__PURE__ */ ae({
117
117
  __name: "DsgTableActions",
118
118
  props: {
119
119
  placement: { default: "auto" },
@@ -121,11 +121,11 @@ const Et = { class: "dsg-table-pagination" }, Bt = ["disabled"], Lt = ["disabled
121
121
  } }
122
122
  },
123
123
  emits: ["dsg-table:action-edit", "dsg-table:action-view", "dsg-table:action-delete", "dsg-table:action-archive", "dsg-table:link-clicked"],
124
- setup(e, { emit: B }) {
125
- const h = P(!1);
126
- We("dsgTableActions");
127
- const u = W(() => e.data?.rowData ?? null), S = W(() => u.value?.actions ?? null), H = W(() => u.value?.links ?? null), f = (D) => {
128
- switch (D) {
124
+ setup(e, { emit: L }) {
125
+ const h = y(!1);
126
+ Ne("dsgTableActions");
127
+ const u = z(() => e.data?.rowData ?? null), S = z(() => u.value?.actions ?? null), A = z(() => u.value?.links ?? null), f = (C) => {
128
+ switch (C) {
129
129
  case "edit":
130
130
  return "edit-05";
131
131
  case "view":
@@ -137,95 +137,95 @@ const Et = { class: "dsg-table-pagination" }, Bt = ["disabled"], Lt = ["disabled
137
137
  default:
138
138
  return "dots-horizontal";
139
139
  }
140
- }, g = (D, w, a) => {
141
- switch (w) {
140
+ }, g = (C, R, s) => {
141
+ switch (R) {
142
142
  case "edit":
143
- $("dsg-table:action-edit", a, u.value);
143
+ M("dsg-table:action-edit", s, u.value);
144
144
  break;
145
145
  case "view":
146
- $("dsg-table:action-view", a, u.value);
146
+ M("dsg-table:action-view", s, u.value);
147
147
  break;
148
148
  case "delete":
149
- $("dsg-table:action-delete", a, u.value);
149
+ M("dsg-table:action-delete", s, u.value);
150
150
  break;
151
151
  case "archive":
152
- $("dsg-table:action-archive", a, u.value);
152
+ M("dsg-table:action-archive", s, u.value);
153
153
  break;
154
154
  }
155
- }, A = (D, w) => {
156
- const a = D.actionId || D.label.trim().toLowerCase().replace(/[^a-z0-9-]/g, "-").replace(/-+/g, "-");
157
- $("dsg-table:link-clicked", w, a, u.value);
158
- }, $ = B;
159
- return (D, w) => Ie((s(), d("div", It, [
160
- V(G(Pt), {
155
+ }, q = (C, R) => {
156
+ const s = C.actionId || C.label.trim().toLowerCase().replace(/[^a-z0-9-]/g, "-").replace(/-+/g, "-");
157
+ M("dsg-table:link-clicked", R, s, u.value);
158
+ }, M = L;
159
+ return (C, R) => ze((i(), d("div", Vt, [
160
+ V(_(Pt), {
161
161
  triggers: [],
162
162
  placement: e.placement,
163
163
  "handle-resize": !0,
164
164
  strategy: "absolute",
165
165
  shown: h.value,
166
166
  class: "dsg-table-actions__popper",
167
- onHide: w[1] || (w[1] = (a) => h.value = !1),
167
+ onHide: R[1] || (R[1] = (s) => h.value = !1),
168
168
  ref: "floatingVueFilterDropdown"
169
169
  }, {
170
- popper: ne(() => [
171
- h.value ? (s(), d("div", qt, [
172
- (s(!0), d(q, null, Y(S.value, (a, T) => (s(), d(q, null, [
173
- ["edit", "view", "delete", "archive"].includes(String(T)) ? (s(), d("a", {
174
- key: T,
175
- href: a?.link,
176
- target: a?.target || "_self",
177
- onClick: (R) => g(a, String(T), R)
170
+ popper: ie(() => [
171
+ h.value ? (i(), d("div", qt, [
172
+ (i(!0), d(N, null, Z(S.value, (s, H) => (i(), d(N, null, [
173
+ ["edit", "view", "delete", "archive"].includes(String(H)) ? (i(), d("a", {
174
+ key: H,
175
+ href: s?.link,
176
+ target: s?.target || "_self",
177
+ onClick: (T) => g(s, String(H), T)
178
178
  }, [
179
- C("div", {
180
- class: L(["dsg-table-actions__menu-item", `dsg-table-actions__menu-item--${String(T)}`])
179
+ k("div", {
180
+ class: F(["dsg-table-actions__menu-item", `dsg-table-actions__menu-item--${String(H)}`])
181
181
  }, [
182
- V(O, {
183
- icon: f(String(T)),
182
+ V(K, {
183
+ icon: f(String(H)),
184
184
  size: "sm"
185
185
  }, null, 8, ["icon"]),
186
- C("span", {
186
+ k("span", {
187
187
  class: "dsg-table-actions__menu-item-id",
188
- textContent: ve(a?.label || G(Tt)(String(T)))
189
- }, null, 8, Ot)
188
+ textContent: ve(s?.label || _(Rt)(String(H)))
189
+ }, null, 8, zt)
190
190
  ], 2)
191
- ], 8, zt)) : m("", !0)
191
+ ], 8, Ot)) : m("", !0)
192
192
  ], 64))), 256)),
193
- S.value && H.value ? (s(), d("hr", Nt)) : m("", !0),
194
- H.value ? (s(!0), d(q, { key: 1 }, Y(H.value, (a) => (s(), d(q, {
195
- key: a.label
193
+ S.value && A.value ? (i(), d("hr", Nt)) : m("", !0),
194
+ A.value ? (i(!0), d(N, { key: 1 }, Z(A.value, (s) => (i(), d(N, {
195
+ key: s.label
196
196
  }, [
197
- a.hasOwnProperty("component") ? (s(), K(vt(a.component), {
197
+ s.hasOwnProperty("component") ? (i(), Q(vt(s.component), {
198
198
  key: 0,
199
199
  quote: u.value,
200
200
  "row-data": u.value
201
- }, null, 8, ["quote", "row-data"])) : a.hasOwnProperty("type") && a.type == "break" ? (s(), d("hr", Kt)) : (s(), d("a", {
201
+ }, null, 8, ["quote", "row-data"])) : s.hasOwnProperty("type") && s.type == "break" ? (i(), d("hr", Kt)) : (i(), d("a", {
202
202
  key: 2,
203
- href: a.link,
204
- target: a.target || "_self",
205
- class: L(["dsg-table-actions__menu-item", a.class]),
206
- onClick: (T) => A(a, T)
203
+ href: s.link,
204
+ target: s.target || "_self",
205
+ class: F(["dsg-table-actions__menu-item", s.class]),
206
+ onClick: (H) => q(s, H)
207
207
  }, [
208
- a.icon ? (s(), K(O, {
208
+ s.icon ? (i(), Q(K, {
209
209
  key: 0,
210
- icon: a.icon,
210
+ icon: s.icon,
211
211
  size: "sm"
212
212
  }, null, 8, ["icon"])) : m("", !0),
213
- C("span", Qt, ve(a.label), 1)
213
+ k("span", Qt, ve(s.label), 1)
214
214
  ], 10, jt))
215
215
  ], 64))), 128)) : m("", !0)
216
216
  ])) : m("", !0)
217
217
  ]),
218
- default: ne(() => [
219
- C("div", Wt, [
220
- C("button", {
218
+ default: ie(() => [
219
+ k("div", Wt, [
220
+ k("button", {
221
221
  type: "button",
222
222
  class: "dsg-table-actions__button",
223
223
  "aria-expanded": "false",
224
224
  "aria-haspopup": "true",
225
- onClick: w[0] || (w[0] = (a) => h.value = !h.value)
225
+ onClick: R[0] || (R[0] = (s) => h.value = !h.value)
226
226
  }, [
227
- E(D.$slots, "dsg-table-action-button-content", {}, () => [
228
- V(O, {
227
+ B(C.$slots, "dsg-table-action-button-content", {}, () => [
228
+ V(K, {
229
229
  icon: "dots-vertical",
230
230
  size: "sm"
231
231
  })
@@ -236,10 +236,10 @@ const Et = { class: "dsg-table-pagination" }, Bt = ["disabled"], Lt = ["disabled
236
236
  _: 3
237
237
  }, 8, ["placement", "shown"])
238
238
  ])), [
239
- [G(Ct), () => h.value = !1]
239
+ [_(St), () => h.value = !1]
240
240
  ]);
241
241
  }
242
- }), Yt = { class: "dsg-table-search" }, Ye = /* @__PURE__ */ Z({
242
+ }), Gt = { class: "dsg-table-search" }, Ze = /* @__PURE__ */ ae({
243
243
  __name: "DsgTableSearch",
244
244
  props: {
245
245
  name: {},
@@ -254,21 +254,21 @@ const Et = { class: "dsg-table-pagination" }, Bt = ["disabled"], Lt = ["disabled
254
254
  replaceState: { type: Boolean, default: !0 }
255
255
  },
256
256
  emits: ["dsg-table:term-changed"],
257
- setup(e, { emit: B }) {
258
- const h = P("");
259
- qe(() => {
257
+ setup(e, { emit: L }) {
258
+ const h = y("");
259
+ Ke(() => {
260
260
  const f = new URL(window.location.href).searchParams.get("term");
261
261
  f && (h.value = f, u("dsg-table:term-changed", f));
262
262
  });
263
- const u = B, S = xt((H) => {
264
- if (h.value = H, e.replaceState) {
263
+ const u = L, S = Dt((A) => {
264
+ if (h.value = A, e.replaceState) {
265
265
  const f = new URL(window.location.href);
266
266
  h.value ? f.searchParams.set("term", h.value) : f.searchParams.delete("term"), window.history.pushState({}, "", f.toString());
267
267
  }
268
268
  u("dsg-table:term-changed", h.value);
269
269
  }, 300);
270
- return (H, f) => (s(), d("div", Yt, [
271
- V(St, {
270
+ return (A, f) => (i(), d("div", Gt, [
271
+ V(Ct, {
272
272
  modelValue: h.value,
273
273
  "onUpdate:modelValue": f[0] || (f[0] = (g) => h.value = g),
274
274
  name: e.name,
@@ -283,18 +283,18 @@ const Et = { class: "dsg-table-pagination" }, Bt = ["disabled"], Lt = ["disabled
283
283
  size: "sm",
284
284
  icon: "search-sm",
285
285
  "icon-clickable": !0,
286
- onIconClicked: f[1] || (f[1] = (g) => G(S)(g)),
287
- onEnterPressed: f[2] || (f[2] = (g) => G(S)(g)),
288
- onOnClear: f[3] || (f[3] = () => G(S)(""))
286
+ onIconClicked: f[1] || (f[1] = (g) => _(S)(g)),
287
+ onEnterPressed: f[2] || (f[2] = (g) => _(S)(g)),
288
+ onOnClear: f[3] || (f[3] = () => _(S)(""))
289
289
  }, null, 8, ["modelValue", "name", "id", "placeholder", "disabled", "required", "readonly", "hidden"])
290
290
  ]));
291
291
  }
292
- }), Gt = { class: "dsg-table-row-header" }, Jt = ["title", "id", "onClick"], Xt = {
292
+ }), Xt = { class: "dsg-table-row-header" }, Yt = ["title", "id", "onClick"], Jt = {
293
293
  key: 0,
294
294
  class: "dsg-table-row-header__sort-icon"
295
- }, Zt = ["innerHTML"], _t = ["innerHTML"], ea = ["innerHTML"], ta = ["innerHTML"], Ge = /* @__PURE__ */ Z({
295
+ }, Zt = ["innerHTML"], _t = ["innerHTML"], ea = ["innerHTML"], ta = ["innerHTML"], _e = /* @__PURE__ */ ae({
296
296
  __name: "DsgTableRowHeader",
297
- props: /* @__PURE__ */ le({
297
+ props: /* @__PURE__ */ oe({
298
298
  fields: {},
299
299
  scrollVisible: { type: Boolean },
300
300
  hasSelectAll: { type: Boolean, default: !1 },
@@ -310,126 +310,126 @@ const Et = { class: "dsg-table-pagination" }, Bt = ["disabled"], Lt = ["disabled
310
310
  hasSelected: { type: Boolean, default: !1 },
311
311
  hasSelectedModifiers: {}
312
312
  }),
313
- emits: /* @__PURE__ */ le(["dsg-table:sort-field", "dsg-table:on-select-all", "dsg-table:on-deselect-all"], ["update:sortField", "update:selectedRows", "update:hasSelected"]),
314
- setup(e, { emit: B }) {
315
- const h = ae(e, "sortField"), u = ae(e, "selectedRows"), S = ae(e, "hasSelected"), H = P("17px"), f = (D) => {
313
+ emits: /* @__PURE__ */ oe(["dsg-table:sort-field", "dsg-table:on-select-all", "dsg-table:on-deselect-all"], ["update:sortField", "update:selectedRows", "update:hasSelected"]),
314
+ setup(e, { emit: L }) {
315
+ const h = se(e, "sortField"), u = se(e, "selectedRows"), S = se(e, "hasSelected"), A = y("17px"), f = (C) => {
316
316
  S.value && u.value.length > 0 && u.value.length !== e.tableDataLength ? (S.value = !0, g("dsg-table:on-select-all")) : !S.value && u.value.length === 0 ? (S.value = !1, g("dsg-table:on-select-all")) : g("dsg-table:on-deselect-all");
317
- }, g = B, A = (D, w) => [
318
- D,
319
- D + "-" + Rt(String(w?.name)),
320
- w.titleClass || "",
321
- { "dsg-table-row-header__row--sortable": w.sortable },
322
- { "dsg-table-row-header__row--sort-active": h.value?.name === w.name }
323
- ], $ = (D) => {
324
- D.sortable && (h.value = {
325
- name: String(D?.name),
326
- field: String(D?.sortField),
327
- direction: h.value?.name === D.name && h.value?.direction === "asc" ? "desc" : "asc"
328
- }, g("dsg-table:sort-field", D));
317
+ }, g = L, q = (C, R) => [
318
+ C,
319
+ C + "-" + Tt(String(R?.name)),
320
+ R.titleClass || "",
321
+ { "dsg-table-row-header__row--sortable": R.sortable },
322
+ { "dsg-table-row-header__row--sort-active": h.value?.name === R.name }
323
+ ], M = (C) => {
324
+ C.sortable && (h.value = {
325
+ name: String(C?.name),
326
+ field: String(C?.sortField),
327
+ direction: h.value?.name === C.name && h.value?.direction === "asc" ? "desc" : "asc"
328
+ }, g("dsg-table:sort-field", C));
329
329
  };
330
- return (D, w) => (s(), d("tr", Gt, [
331
- e.hasSelectAll ? (s(), d("th", {
330
+ return (C, R) => (i(), d("tr", Xt, [
331
+ e.hasSelectAll ? (i(), d("th", {
332
332
  key: 0,
333
333
  class: "dsg-table-row-header__row dsg-table-row-header__row--checkbox",
334
- style: N({ width: e.selectableColumnWidth }),
334
+ style: j({ width: e.selectableColumnWidth }),
335
335
  scope: "col"
336
336
  }, [
337
- V(ze, {
337
+ V(je, {
338
338
  modelValue: S.value,
339
339
  "onUpdate:modelValue": [
340
- w[0] || (w[0] = (a) => S.value = a),
340
+ R[0] || (R[0] = (s) => S.value = s),
341
341
  f
342
342
  ],
343
343
  indeterminate: u.value.length > 0 && u.value.length !== e.tableDataLength
344
344
  }, null, 8, ["modelValue", "indeterminate"])
345
345
  ], 4)) : m("", !0),
346
- e.showExpandDetail ? (s(), d("th", {
346
+ e.showExpandDetail ? (i(), d("th", {
347
347
  key: 1,
348
348
  class: "dsg-table-row-header__row dsg-table-row-header__row--expand-detail",
349
- style: N({ width: e.expandableColumnWidth }),
349
+ style: j({ width: e.expandableColumnWidth }),
350
350
  scope: "col"
351
351
  }, null, 4)) : m("", !0),
352
- (s(!0), d(q, null, Y(e.fields, (a, T) => (s(), d(q, null, [
353
- a?.visible ? (s(), d("th", {
354
- key: T,
355
- class: L(A("dsg-table-row-header__row", a)),
356
- style: N([{ width: a.width || void 0 }, a.style]),
357
- title: a.title + (a.sortable ? " Sort" : ""),
358
- id: "_" + a.name,
359
- onClick: (R) => $(a),
352
+ (i(!0), d(N, null, Z(e.fields, (s, H) => (i(), d(N, null, [
353
+ s?.visible ? (i(), d("th", {
354
+ key: H,
355
+ class: F(q("dsg-table-row-header__row", s)),
356
+ style: j([{ width: s.width || void 0 }, s.style]),
357
+ title: s.title + (s.sortable ? " Sort" : ""),
358
+ id: "_" + s.name,
359
+ onClick: (T) => M(s),
360
360
  scope: "col"
361
361
  }, [
362
- a.sortable ? (s(), d("div", Xt, [
363
- a.tooltip ? (s(), K(Ae, Se({
362
+ s.sortable ? (i(), d("div", Jt, [
363
+ s.tooltip ? (i(), Q(We, Te({
364
364
  key: 0,
365
365
  ref_for: !0
366
- }, a.tooltip, { class: "dsg-table-row-header__tooltip" }), {
367
- "dsg-tooltip--trigger": ne(() => [
368
- a.title ? (s(), d("span", {
366
+ }, s.tooltip, { class: "dsg-table-row-header__tooltip" }), {
367
+ "dsg-tooltip--trigger": ie(() => [
368
+ s.title ? (i(), d("span", {
369
369
  key: 0,
370
370
  class: "dsg-table-row-header__title",
371
- innerHTML: a.title
371
+ innerHTML: s.title
372
372
  }, null, 8, Zt)) : m("", !0),
373
- a.tooltip.icon ? (s(), K(O, {
373
+ s.tooltip.icon ? (i(), Q(K, {
374
374
  key: 1,
375
- icon: a.tooltip.icon,
375
+ icon: s.tooltip.icon,
376
376
  class: "inline-flex",
377
377
  size: "xs"
378
378
  }, null, 8, ["icon"])) : m("", !0)
379
379
  ]),
380
380
  _: 2
381
- }, 1040)) : a.title ? (s(), d("span", {
381
+ }, 1040)) : s.title ? (i(), d("span", {
382
382
  key: 1,
383
383
  class: "dsg-table-row-header__title",
384
- innerHTML: a.title
384
+ innerHTML: s.title
385
385
  }, null, 8, _t)) : m("", !0),
386
- a.sortable && h.value?.name !== a.name ? (s(), K(O, {
386
+ s.sortable && h.value?.name !== s.name ? (i(), Q(K, {
387
387
  key: 2,
388
388
  icon: "chevron-selector-vertical",
389
389
  class: "inline-flex",
390
390
  size: "xs"
391
391
  })) : m("", !0),
392
- a.sortable && h.value?.name === a.name && h.value?.direction === "asc" ? (s(), K(O, {
392
+ s.sortable && h.value?.name === s.name && h.value?.direction === "asc" ? (i(), Q(K, {
393
393
  key: 3,
394
394
  icon: "chevron-down",
395
395
  class: "inline-flex",
396
396
  size: "xs"
397
397
  })) : m("", !0),
398
- a.sortable && h.value?.name === a.name && h.value?.direction === "desc" ? (s(), K(O, {
398
+ s.sortable && h.value?.name === s.name && h.value?.direction === "desc" ? (i(), Q(K, {
399
399
  key: 4,
400
400
  icon: "chevron-up",
401
401
  class: "inline-flex",
402
402
  size: "xs"
403
403
  })) : m("", !0)
404
- ])) : (s(), d(q, { key: 1 }, [
405
- a.tooltip ? (s(), K(Ae, Se({
404
+ ])) : (i(), d(N, { key: 1 }, [
405
+ s.tooltip ? (i(), Q(We, Te({
406
406
  key: 0,
407
407
  ref_for: !0
408
- }, a.tooltip, { class: "dsg-table-row-header__tooltip" }), {
409
- "dsg-tooltip--trigger": ne(() => [
410
- C("span", {
408
+ }, s.tooltip, { class: "dsg-table-row-header__tooltip" }), {
409
+ "dsg-tooltip--trigger": ie(() => [
410
+ k("span", {
411
411
  class: "dsg-table-row-header__title",
412
- innerHTML: G(Ve)(String(a?.title))
412
+ innerHTML: _(Oe)(String(s?.title))
413
413
  }, null, 8, ea),
414
- a.tooltip.icon ? (s(), K(O, {
414
+ s.tooltip.icon ? (i(), Q(K, {
415
415
  key: 0,
416
- icon: a.tooltip.icon,
416
+ icon: s.tooltip.icon,
417
417
  class: "inline-flex",
418
418
  size: "xs"
419
419
  }, null, 8, ["icon"])) : m("", !0)
420
420
  ]),
421
421
  _: 2
422
- }, 1040)) : (s(), d("span", {
422
+ }, 1040)) : (i(), d("span", {
423
423
  key: 1,
424
424
  class: "dsg-table-row-header__title",
425
- innerHTML: G(Ve)(String(a?.title))
425
+ innerHTML: _(Oe)(String(s?.title))
426
426
  }, null, 8, ta))
427
427
  ], 64))
428
- ], 14, Jt)) : m("", !0)
428
+ ], 14, Yt)) : m("", !0)
429
429
  ], 64))), 256)),
430
- e.scrollVisible ? (s(), d("th", {
430
+ e.scrollVisible ? (i(), d("th", {
431
431
  key: 2,
432
- style: N({ width: H.value }),
432
+ style: j({ width: A.value }),
433
433
  class: "dsg-table-row-header__col-gutter"
434
434
  }, null, 4)) : m("", !0)
435
435
  ]));
@@ -437,9 +437,9 @@ const Et = { class: "dsg-table-pagination" }, Bt = ["disabled"], Lt = ["disabled
437
437
  }), aa = ["span"], la = {
438
438
  key: 0,
439
439
  class: "dsg-table-component__loading"
440
- }, na = ["colspan"], sa = ["colspan"], oa = ["onClick", "onDblclick", "onMouseover", "onMouseenter"], ia = ["onClickCapture"], da = ["aria-expanded", "onClick"], ra = ["onClick", "onDblclick", "onContextmenu"], ua = ["innerHTML"], ca = ["onClick"], ga = ["colspan"], va = { key: 2 }, ba = ["colspan"], fa = { class: "dsg-table-component__footer" }, ha = /* @__PURE__ */ Z({
440
+ }, na = ["colspan"], sa = ["colspan"], oa = ["onClick", "onDblclick", "onMouseover", "onMouseenter"], ia = ["onClickCapture"], da = ["aria-expanded", "onClick"], ra = ["onClick", "onDblclick", "onContextmenu"], ua = ["innerHTML"], ca = ["onClick"], ga = ["colspan"], va = { key: 2 }, fa = ["colspan"], ba = { class: "dsg-table-component__footer" }, ha = /* @__PURE__ */ ae({
441
441
  __name: "DsgTableComponent",
442
- props: /* @__PURE__ */ le({
442
+ props: /* @__PURE__ */ oe({
443
443
  fields: { default: () => [] },
444
444
  isDraggable: { type: Boolean, default: !1 },
445
445
  dragApi: { default: "" },
@@ -505,28 +505,28 @@ const Et = { class: "dsg-table-pagination" }, Bt = ["disabled"], Lt = ["disabled
505
505
  perPage: { default: 20 },
506
506
  perPageModifiers: {}
507
507
  }),
508
- emits: /* @__PURE__ */ le(["dsg-table:loading", "dsg-table:loaded", "dsg-table:load-success", "dsg-table:load-error", "dsg-table:pagination-data", "dsg-table:rows-selected", "dsg-table:row-clicked", "dsg-table:row-hover", "dsg-table:row-dblclick", "dsg-table:row-expanded", "dsg-table:row-collapsed"], ["update:filterParams", "update:perPage"]),
509
- setup(e, { expose: B, emit: h }) {
510
- const u = (t) => t.map((l, n) => ({
511
- field: l.field || "",
512
- title: l.title || "",
513
- name: l.name || "",
514
- titleClass: l.titleClass || "",
515
- dataClass: l.dataClass || "",
516
- visible: l.visible ?? !0,
517
- width: l.width || void 0,
518
- sortField: l.sortField || null,
519
- sortable: l.sortField,
520
- formatter: l.formatter || null,
521
- tooltip: l.tooltip ?? null,
508
+ emits: /* @__PURE__ */ oe(["dsg-table:loading", "dsg-table:loaded", "dsg-table:load-success", "dsg-table:load-error", "dsg-table:pagination-data", "dsg-table:rows-selected", "dsg-table:row-clicked", "dsg-table:row-hover", "dsg-table:row-dblclick", "dsg-table:row-expanded", "dsg-table:row-collapsed"], ["update:filterParams", "update:perPage"]),
509
+ setup(e, { expose: L, emit: h }) {
510
+ const u = (t) => t.map((a, n) => ({
511
+ field: a.field || "",
512
+ title: a.title || "",
513
+ name: a.name || "",
514
+ titleClass: a.titleClass || "",
515
+ dataClass: a.dataClass || "",
516
+ visible: a.visible ?? !0,
517
+ width: a.width || void 0,
518
+ sortField: a.sortField || null,
519
+ sortable: a.sortField,
520
+ formatter: a.formatter || null,
521
+ tooltip: a.tooltip ?? null,
522
522
  $_index: n
523
523
  })), S = () => {
524
524
  if (!e.apiMode) return null;
525
- const l = Oe().find((n) => n.key === e.queryParams.sort);
526
- if (l && l.value.length > 0) {
527
- const n = l.value[0], v = n.startsWith("-"), c = v ? n.substring(1) : n, x = e.fields.find((Q) => Q.sortField === c || Q.name === c || Q.field === c);
528
- return x ? {
529
- name: String(x.name || x.field),
525
+ const a = Qe().find((n) => n.key === e.queryParams.sort);
526
+ if (a && a.value.length > 0) {
527
+ const n = a.value[0], v = n.startsWith("-"), c = v ? n.substring(1) : n, P = e.fields.find((X) => X.sortField === c || X.name === c || X.field === c);
528
+ return P ? {
529
+ name: String(P.name || P.field),
530
530
  field: c,
531
531
  direction: v ? "desc" : "asc"
532
532
  } : {
@@ -536,406 +536,406 @@ const Et = { class: "dsg-table-pagination" }, Bt = ["disabled"], Lt = ["disabled
536
536
  };
537
537
  }
538
538
  return null;
539
- }, H = () => {
539
+ }, A = () => {
540
540
  if (!(!e.apiMode || !e.replaceState) && e.replaceStrategy === "window") {
541
- const t = new URL(window.location.href), l = new URLSearchParams(t.search);
542
- if (l.delete(e.queryParams.sort), k.value) {
543
- const v = (k.value.direction === "desc" ? "-" : "") + k.value.field;
544
- l.set(e.queryParams.sort, v);
541
+ const t = new URL(window.location.href), a = new URLSearchParams(t.search);
542
+ if (a.delete(e.queryParams.sort), x.value) {
543
+ const v = (x.value.direction === "desc" ? "-" : "") + x.value.field;
544
+ a.set(e.queryParams.sort, v);
545
545
  }
546
- const n = `${t.pathname}${l.toString() ? "?" + l.toString() : ""}`;
546
+ const n = `${t.pathname}${a.toString() ? "?" + a.toString() : ""}`;
547
547
  window.history.pushState({}, "", n);
548
548
  }
549
- }, f = P(u(e.fields)), g = P(e.data), A = P(null), $ = P(e.initialPage), D = P("17px"), w = P(!1), a = P({}), T = P(0), R = P(!0), k = P(S()), p = P(null), I = P(0), se = ae(e, "filterParams"), re = ae(e, "perPage"), M = P([]), oe = P(!1), z = P(/* @__PURE__ */ new Set()), U = P(null), j = P(null), J = P(!1), _ = W(() => e.tableHeight != null), ee = W(() => {
550
- let t = f.value.filter((l) => l.visible).length;
549
+ }, f = y(u(e.fields)), g = y(e.data), q = y(null), M = y(e.initialPage), C = y("17px"), R = y(!1), s = y({}), H = y(0), T = y(!0), x = y(S()), W = y(null), $ = y(0), D = se(e, "filterParams"), Y = se(e, "perPage"), E = y([]), O = y(!1), p = y(/* @__PURE__ */ new Set()), U = y(null), G = y(null), ee = y(!1), J = z(() => e.tableHeight != null), le = z(() => {
550
+ let t = f.value.filter((a) => a.visible).length;
551
551
  return e.selectable && t++, e.hasDetailRow && e.expandableRows && t++, t;
552
- }), be = W(() => {
552
+ }), fe = z(() => {
553
553
  const t = {};
554
554
  return e.shiftSelectHighlight && (t["--dsg-shift-select-bg"] = e.shiftSelectHighlight), e.selectedRowHighlight && (t["--dsg-selected-row-bg"] = e.selectedRowHighlight), Object.keys(t).length > 0 ? t : void 0;
555
- }), fe = (t, l) => {
555
+ }), be = (t, a) => {
556
556
  const n = t?.[e.trackBy];
557
- return n ?? l;
557
+ return n ?? a;
558
558
  };
559
- ie(
560
- () => M.value.length,
559
+ de(
560
+ () => E.value.length,
561
561
  (t) => {
562
- oe.value = e.selectable && t > 0;
562
+ O.value = e.selectable && t > 0;
563
563
  },
564
564
  { immediate: !0 }
565
- ), ie(
565
+ ), de(
566
566
  () => e.fields,
567
567
  (t) => {
568
568
  f.value = u(t);
569
569
  },
570
570
  { immediate: !0, deep: !0 }
571
- ), ie(
572
- () => se.value,
571
+ ), de(
572
+ () => D.value,
573
573
  (t) => {
574
- te();
574
+ ne();
575
575
  },
576
576
  { deep: !0 }
577
- ), ie(
578
- () => re.value,
577
+ ), de(
578
+ () => Y.value,
579
579
  () => {
580
- te();
580
+ ne();
581
581
  }
582
- ), ie(
582
+ ), de(
583
583
  () => e.apiUrl,
584
- (t, l) => {
585
- e.apiMode && t !== l && t && te();
584
+ (t, a) => {
585
+ e.apiMode && t !== a && t && ne();
586
586
  }
587
- ), ie(
588
- () => k.value,
587
+ ), de(
588
+ () => x.value,
589
589
  () => {
590
- H();
590
+ A();
591
591
  },
592
592
  { deep: !0 }
593
593
  );
594
- const F = h, he = (t, l) => t.formatter && typeof t.formatter == "function" ? t.formatter(t, l) : Ce(l, String(t?.name), ""), me = (t) => "dsg-field--" + t.name?.toLowerCase().replaceAll(/[_ ]/g, "-"), we = (t, l) => {
594
+ const I = h, he = (t, a) => t.formatter && typeof t.formatter == "function" ? t.formatter(t, a) : Re(a, String(t?.name), ""), me = (t) => "dsg-field--" + t.name?.toLowerCase().replaceAll(/[_ ]/g, "-"), we = (t, a) => {
595
595
  const n = {
596
- odd: l % 2 === 0,
597
- even: l % 2 !== 0,
596
+ odd: a % 2 === 0,
597
+ even: a % 2 !== 0,
598
598
  "dsg-table-component__row--selected": t.selected
599
599
  };
600
600
  if (!e.rowClass)
601
601
  return n;
602
602
  let v = {};
603
603
  if (typeof e.rowClass == "function") {
604
- const c = e.rowClass(t, l);
605
- typeof c == "string" ? c.split(" ").forEach((x) => {
606
- x.trim() && (v[x.trim()] = !0);
607
- }) : Array.isArray(c) ? c.forEach((x) => {
608
- typeof x == "string" && x.trim() && (v[x.trim()] = !0);
604
+ const c = e.rowClass(t, a);
605
+ typeof c == "string" ? c.split(" ").forEach((P) => {
606
+ P.trim() && (v[P.trim()] = !0);
607
+ }) : Array.isArray(c) ? c.forEach((P) => {
608
+ typeof P == "string" && P.trim() && (v[P.trim()] = !0);
609
609
  }) : typeof c == "object" && c !== null && (v = c);
610
610
  } else typeof e.rowClass == "string" && e.rowClass.split(" ").forEach((c) => {
611
611
  c.trim() && (v[c.trim()] = !0);
612
612
  });
613
613
  return { ...n, ...v };
614
- }, X = (t) => z.value.has(t[e.trackBy]), ue = (t, l) => {
614
+ }, te = (t) => p.value.has(t[e.trackBy]), ue = (t, a) => {
615
615
  const n = t[e.trackBy];
616
- z.value.has(n) ? (z.value.delete(n), F("dsg-table:row-collapsed", t, l)) : (e.expandMultiple || z.value.clear(), z.value.add(n), F("dsg-table:row-expanded", t, l));
616
+ p.value.has(n) ? (p.value.delete(n), I("dsg-table:row-collapsed", t, a)) : (e.expandMultiple || p.value.clear(), p.value.add(n), I("dsg-table:row-expanded", t, a));
617
617
  }, ye = (t) => {
618
- const l = t[e.trackBy];
619
- z.value.has(l) || (e.expandMultiple || z.value.clear(), z.value.add(l));
618
+ const a = t[e.trackBy];
619
+ p.value.has(a) || (e.expandMultiple || p.value.clear(), p.value.add(a));
620
620
  }, ke = (t) => {
621
- z.value.delete(t[e.trackBy]);
622
- }, ce = () => {
621
+ p.value.delete(t[e.trackBy]);
622
+ }, pe = () => {
623
623
  g.value?.forEach((t) => {
624
- z.value.add(t[e.trackBy]);
624
+ p.value.add(t[e.trackBy]);
625
625
  });
626
- }, pe = () => {
627
- z.value.clear();
628
- }, o = () => z.value, i = (t, l) => {
626
+ }, Pe = () => {
627
+ p.value.clear();
628
+ }, Se = () => p.value, Ce = (t, a) => {
629
629
  if (e.selectable) {
630
- if (l !== void 0 && (U.value = l), t.selected)
631
- M.value.push(t);
630
+ if (a !== void 0 && (U.value = a), t.selected)
631
+ E.value.push(t);
632
632
  else {
633
- const n = M.value.findIndex((v) => v[e.trackBy] === t[e.trackBy]);
634
- n !== -1 && M.value.splice(n, 1);
633
+ const n = E.value.findIndex((v) => v[e.trackBy] === t[e.trackBy]);
634
+ n !== -1 && E.value.splice(n, 1);
635
635
  }
636
- F("dsg-table:rows-selected", M.value);
636
+ I("dsg-table:rows-selected", E.value);
637
637
  }
638
- }, r = (t, l, n) => {
638
+ }, De = (t, a, n) => {
639
639
  if (e.selectable && t.shiftKey && U.value !== null) {
640
640
  t.stopPropagation(), t.preventDefault();
641
- const v = Math.min(U.value, n), c = Math.max(U.value, n), x = !l.selected;
642
- for (let Q = v; Q <= c; Q++) {
643
- if (Q === U.value) continue;
644
- const de = g.value?.[Q];
645
- if (de) {
646
- const Le = de.selected;
647
- if (de.selected = x, x && !Le)
648
- M.value.push(de);
649
- else if (!x && Le) {
650
- const Fe = M.value.findIndex((ct) => ct[e.trackBy] === de[e.trackBy]);
651
- Fe !== -1 && M.value.splice(Fe, 1);
641
+ const v = Math.min(U.value, n), c = Math.max(U.value, n), P = !a.selected;
642
+ for (let X = v; X <= c; X++) {
643
+ if (X === U.value) continue;
644
+ const re = g.value?.[X];
645
+ if (re) {
646
+ const Ue = re.selected;
647
+ if (re.selected = P, P && !Ue)
648
+ E.value.push(re);
649
+ else if (!P && Ue) {
650
+ const Ie = E.value.findIndex((ct) => ct[e.trackBy] === re[e.trackBy]);
651
+ Ie !== -1 && E.value.splice(Ie, 1);
652
652
  }
653
653
  }
654
654
  }
655
- U.value = n, j.value = null, F("dsg-table:rows-selected", M.value);
655
+ U.value = n, G.value = null, I("dsg-table:rows-selected", E.value);
656
656
  }
657
- }, b = () => {
657
+ }, xe = () => {
658
658
  e.selectable && (g.value?.forEach((t) => {
659
659
  t.selected = !0;
660
- }), M.value = g.value?.filter((t) => t.selected) ?? [], U.value = null, F("dsg-table:rows-selected", M.value));
661
- }, y = () => {
660
+ }), E.value = g.value?.filter((t) => t.selected) ?? [], U.value = null, I("dsg-table:rows-selected", E.value));
661
+ }, ce = () => {
662
662
  e.selectable && (g.value?.forEach((t) => {
663
663
  t.selected = !1;
664
- }), M.value = [], U.value = null, F("dsg-table:rows-selected", M.value));
665
- }, Pe = () => M.value ?? [], Je = () => {
664
+ }), E.value = [], U.value = null, I("dsg-table:rows-selected", E.value));
665
+ }, $e = () => E.value ?? [], o = () => {
666
666
  e.selectable && g.value?.forEach((t) => {
667
667
  t.selected = !1;
668
- }), M.value = [], oe.value = !1, U.value = null, j.value = null, F("dsg-table:rows-selected", M.value);
669
- }, ge = (t) => {
670
- g.value = Array.isArray(t) ? t : [], e.selectable && (U.value = null, g.value.forEach((l) => {
671
- l.selected = l.selected ?? !1;
668
+ }), E.value = [], O.value = !1, U.value = null, G.value = null, I("dsg-table:rows-selected", E.value);
669
+ }, l = (t) => {
670
+ g.value = Array.isArray(t) ? t : [], e.selectable && (U.value = null, g.value.forEach((a) => {
671
+ a.selected = a.selected ?? !1;
672
672
  }));
673
- }, Xe = () => g.value ?? [], Ze = (t) => {
674
- t === "prev" ? $.value > e.firstPage && $.value-- : t === "next" ? $.value < (A.value?.last_page ?? 0) && $.value++ : t != $.value && t >= e.firstPage && t <= (A.value?.last_page ?? 0) && ($.value = t), te();
675
- }, _e = () => ({
676
- [e.queryParams?.sort]: k.value ? (k.value?.direction === "desc" ? "-" : "") + k.value?.field : void 0,
677
- [e.queryParams?.order]: k.value?.direction,
678
- [e.queryParams?.page]: $.value,
679
- [e.queryParams?.perPage]: re.value
680
- }), xe = () => {
681
- p.value && (p.value.abort(), p.value = null);
682
- }, et = (t, l) => {
683
- xe(), I.value++;
684
- const n = I.value, v = new AbortController();
685
- return l.signal = v.signal, p.value = v, (e.httpMethod.toLowerCase() === "get" ? Ue.get(t, l) : (() => {
686
- const x = l.params;
687
- return delete l.params, Ue.post(t, x, l);
673
+ }, r = () => g.value ?? [], b = (t) => {
674
+ t === "prev" ? M.value > e.firstPage && M.value-- : t === "next" ? M.value < (q.value?.last_page ?? 0) && M.value++ : t != M.value && t >= e.firstPage && t <= (q.value?.last_page ?? 0) && (M.value = t), ne();
675
+ }, w = () => ({
676
+ [e.queryParams?.sort]: x.value ? (x.value?.direction === "desc" ? "-" : "") + x.value?.field : void 0,
677
+ [e.queryParams?.order]: x.value?.direction,
678
+ [e.queryParams?.page]: M.value,
679
+ [e.queryParams?.perPage]: Y.value
680
+ }), ge = () => {
681
+ W.value && (W.value.abort(), W.value = null);
682
+ }, et = (t, a) => {
683
+ ge(), $.value++;
684
+ const n = $.value, v = new AbortController();
685
+ return a.signal = v.signal, W.value = v, (e.httpMethod.toLowerCase() === "get" ? qe.get(t, a) : (() => {
686
+ const P = a.params;
687
+ return delete a.params, qe.post(t, P, a);
688
688
  })()).then(
689
- (x) => ({ ...x, _requestId: n, _apiUrl: t }),
690
- (x) => {
691
- throw x.name === "AbortError" || x.code === "ERR_CANCELED" ? { ...x, _requestId: n, _cancelled: !0 } : { ...x, _requestId: n };
689
+ (P) => ({ ...P, _requestId: n, _apiUrl: t }),
690
+ (P) => {
691
+ throw P.name === "AbortError" || P.code === "ERR_CANCELED" ? { ...P, _requestId: n, _cancelled: !0 } : { ...P, _requestId: n };
692
692
  }
693
693
  );
694
- }, De = (t) => {
695
- if (t._requestId && t._requestId !== I.value || t._apiUrl && t._apiUrl !== e.apiUrl)
694
+ }, Ee = (t) => {
695
+ if (t._requestId && t._requestId !== $.value || t._apiUrl && t._apiUrl !== e.apiUrl)
696
696
  return;
697
- F("dsg-table:load-success", t);
698
- const l = e.transform ? e.transform(t.data) : t.data;
699
- g.value = Ce(l, e.dataPath, null), e.selectable && (U.value = null, g.value?.forEach((n) => {
697
+ I("dsg-table:load-success", t);
698
+ const a = e.transform ? e.transform(t.data) : t.data;
699
+ g.value = Re(a, e.dataPath, null), e.selectable && (U.value = null, g.value?.forEach((n) => {
700
700
  n.selected = n.selected ?? !1;
701
- })), A.value = Ce(l, e.paginationPath, null) ?? null, T.value = g.value?.length ? g.value[0].order : T, !Mt(e.paginationPath) && A.value === null && console.warn(
701
+ })), q.value = Re(a, e.paginationPath, null) ?? null, H.value = g.value?.length ? g.value[0].order : H, !Et(e.paginationPath) && q.value === null && console.warn(
702
702
  'DsgTable: pagination-path "' + e.paginationPath + `" not found. It looks like the data returned from the server does not have pagination information or you may have set it incorrectly.
703
703
  You can explicitly suppress this warning by setting pagination-path="".`
704
- ), p.value = null, F("dsg-table:pagination-data", A.value), A.value && $.value > (A.value?.last_page || 0) && g.value?.length === 0 && ($.value = e.initialPage, te()), F("dsg-table:loaded"), R.value = !1;
705
- }, $e = (t) => {
706
- t._requestId && t._requestId !== I.value || t._apiUrl && t._apiUrl !== e.apiUrl || t._cancelled || (console.error("load-error", t), p.value = null, F("dsg-table:load-error", t), F("dsg-table:loaded"), R.value = !1);
707
- }, Te = () => {
704
+ ), W.value = null, I("dsg-table:pagination-data", q.value), q.value && M.value > (q.value?.last_page || 0) && g.value?.length === 0 && (M.value = e.initialPage, ne()), I("dsg-table:loaded"), T.value = !1;
705
+ }, Me = (t) => {
706
+ t._requestId && t._requestId !== $.value || t._apiUrl && t._apiUrl !== e.apiUrl || t._cancelled || (console.error("load-error", t), W.value = null, I("dsg-table:load-error", t), I("dsg-table:loaded"), T.value = !1);
707
+ }, Be = () => {
708
708
  if (e.data !== null && Array.isArray(e.data)) {
709
- ge(e.data), R.value = !1;
709
+ l(e.data), T.value = !1;
710
710
  return;
711
711
  }
712
712
  if (e.dataManager && typeof e.dataManager == "function") {
713
713
  const t = e.dataManager();
714
- ge(t), R.value = !1;
714
+ l(t), T.value = !1;
715
715
  } else
716
- ge(e.data), R.value = !1;
717
- }, te = (t = De, l = $e, n = {}) => {
718
- const v = t || De, c = l || $e;
716
+ l(e.data), T.value = !1;
717
+ }, ne = (t = Ee, a = Me, n = {}) => {
718
+ const v = t || Ee, c = a || Me;
719
719
  if (!e.apiMode) {
720
- Te();
720
+ Be();
721
721
  return;
722
722
  }
723
- return R.value = !0, F("dsg-table:loading", R.value), e.httpOptions.params = {
724
- ..._e(),
725
- ...se.value
726
- }, et(e.apiUrl, e.httpOptions).then(v).catch((x) => c(x));
727
- }, tt = (t, l, n) => {
728
- F("dsg-table:row-clicked", t, l, n);
729
- }, at = (t, l, n) => {
730
- F("dsg-table:row-dblclick", t, l, n);
731
- }, lt = (t, l, n) => {
732
- }, nt = (t, l, n, v) => {
733
- }, st = (t, l, n, v) => {
734
- }, ot = (t, l, n, v) => {
735
- }, it = (t, l, n) => {
736
- }, Re = (t) => {
737
- t.key === "Shift" && (J.value = !0);
738
- }, Me = (t) => {
739
- t.key === "Shift" && (J.value = !1, j.value = null);
740
- }, Ee = () => {
741
- J.value = !1, j.value = null;
723
+ return T.value = !0, I("dsg-table:loading", T.value), e.httpOptions.params = {
724
+ ...w(),
725
+ ...D.value
726
+ }, et(e.apiUrl, e.httpOptions).then(v).catch((P) => c(P));
727
+ }, tt = (t, a, n) => {
728
+ I("dsg-table:row-clicked", t, a, n);
729
+ }, at = (t, a, n) => {
730
+ I("dsg-table:row-dblclick", t, a, n);
731
+ }, lt = (t, a, n) => {
732
+ }, nt = (t, a, n, v) => {
733
+ }, st = (t, a, n, v) => {
734
+ }, ot = (t, a, n, v) => {
735
+ }, it = (t, a, n) => {
736
+ }, Le = (t) => {
737
+ t.key === "Shift" && (ee.value = !0);
738
+ }, Fe = (t) => {
739
+ t.key === "Shift" && (ee.value = !1, G.value = null);
740
+ }, Ae = () => {
741
+ ee.value = !1, G.value = null;
742
742
  }, dt = (t) => {
743
- e.selectable && J.value && U.value !== null && (j.value = t);
743
+ e.selectable && ee.value && U.value !== null && (G.value = t);
744
744
  }, rt = () => {
745
- j.value = null;
745
+ G.value = null;
746
746
  }, ut = (t) => {
747
- if (!e.selectable || !J.value || U.value === null || j.value === null)
747
+ if (!e.selectable || !ee.value || U.value === null || G.value === null)
748
748
  return !1;
749
- const l = Math.min(U.value, j.value), n = Math.max(U.value, j.value);
750
- return t >= l && t <= n;
749
+ const a = Math.min(U.value, G.value), n = Math.max(U.value, G.value);
750
+ return t >= a && t <= n;
751
751
  };
752
- qe(() => {
753
- e.apiMode === !0 ? te() : Te(), e.selectable && (document.addEventListener("keydown", Re), document.addEventListener("keyup", Me), window.addEventListener("blur", Ee));
754
- }), bt(() => {
755
- e.selectable && (document.removeEventListener("keydown", Re), document.removeEventListener("keyup", Me), window.removeEventListener("blur", Ee));
752
+ Ke(() => {
753
+ e.apiMode === !0 ? ne() : Be(), e.selectable && (document.addEventListener("keydown", Le), document.addEventListener("keyup", Fe), window.addEventListener("blur", Ae));
754
+ }), ft(() => {
755
+ e.selectable && (document.removeEventListener("keydown", Le), document.removeEventListener("keyup", Fe), window.removeEventListener("blur", Ae));
756
756
  });
757
- const Be = () => {
758
- e.apiMode && (M.value = [], xe(), te());
757
+ const He = () => {
758
+ e.apiMode && (E.value = [], ge(), ne());
759
759
  };
760
- return B({
761
- changePage: Ze,
762
- reload: Be,
763
- getData: Xe,
764
- setData: ge,
760
+ return L({
761
+ changePage: b,
762
+ reload: He,
763
+ getData: r,
764
+ setData: l,
765
765
  setLoading: (t) => {
766
- R.value = t, F("dsg-table:loading", R.value);
766
+ T.value = t, I("dsg-table:loading", T.value);
767
767
  },
768
768
  expandRow: ye,
769
769
  collapseRow: ke,
770
770
  toggleRowExpand: ue,
771
- expandAllRows: ce,
772
- collapseAllRows: pe,
773
- getExpandedRows: o,
774
- isRowExpanded: X,
775
- getSelection: Pe,
776
- clearSelection: Je
777
- }), (t, l) => (s(), d("div", {
778
- class: L(["dsg-table-component", { "dsg-table-component--shift-active": e.selectable && J.value }]),
779
- style: N(be.value)
771
+ expandAllRows: pe,
772
+ collapseAllRows: Pe,
773
+ getExpandedRows: Se,
774
+ isRowExpanded: te,
775
+ getSelection: $e,
776
+ clearSelection: o
777
+ }), (t, a) => (i(), d("div", {
778
+ class: F(["dsg-table-component", { "dsg-table-component--shift-active": e.selectable && ee.value }]),
779
+ style: j(fe.value)
780
780
  }, [
781
- C("div", {
781
+ k("div", {
782
782
  ref: "dsgTableBodyWrapper",
783
- class: L(["dsg-table-component__body-wrapper", { "dsg-table-component__body-wrapper--fixed-header": _.value }]),
784
- style: N({ height: e.tableHeight || void 0 })
783
+ class: F(["dsg-table-component__body-wrapper", { "dsg-table-component__body-wrapper--fixed-header": J.value }]),
784
+ style: j({ height: e.tableHeight || void 0 })
785
785
  }, [
786
- C("table", {
787
- class: L([
786
+ k("table", {
787
+ class: F([
788
788
  "dsg-table-component__main",
789
- _.value ? "dsg-table-component__main--fixed-header" : "",
789
+ J.value ? "dsg-table-component__main--fixed-header" : "",
790
790
  "dsg-table-component__main--" + e.tableLayout,
791
- a.value.table
791
+ s.value.table
792
792
  ])
793
793
  }, [
794
- C("colgroup", { span: ee.value }, [
795
- e.selectable ? (s(), d("col", {
794
+ k("colgroup", { span: le.value }, [
795
+ e.selectable ? (i(), d("col", {
796
796
  key: 0,
797
- style: N({ width: e.selectableColumnWidth }),
797
+ style: j({ width: e.selectableColumnWidth }),
798
798
  class: "dsg-table-component__col-checkbox"
799
799
  }, null, 4)) : m("", !0),
800
- e.hasDetailRow && e.expandableRows ? (s(), d("col", {
800
+ e.hasDetailRow && e.expandableRows ? (i(), d("col", {
801
801
  key: 1,
802
- style: N({ width: e.expandableColumnWidth }),
802
+ style: j({ width: e.expandableColumnWidth }),
803
803
  class: "dsg-table-component__col-expand"
804
804
  }, null, 4)) : m("", !0),
805
- (s(!0), d(q, null, Y(f.value, (n, v) => (s(), d(q, null, [
806
- n?.visible ? (s(), d("col", {
805
+ (i(!0), d(N, null, Z(f.value, (n, v) => (i(), d(N, null, [
806
+ n?.visible ? (i(), d("col", {
807
807
  key: v,
808
- style: N({ width: n.width || void 0 }),
809
- class: L("dsg-table-component__col-" + n.name + " " + n.titleClass)
808
+ style: j({ width: n.width || void 0 }),
809
+ class: F("dsg-table-component__col-" + n.name + " " + n.titleClass)
810
810
  }, null, 6)) : m("", !0)
811
811
  ], 64))), 256)),
812
- !_.value && w.value ? (s(), d("col", {
812
+ !J.value && R.value ? (i(), d("col", {
813
813
  key: 2,
814
- style: N({ width: D.value }),
814
+ style: j({ width: C.value }),
815
815
  class: "dsg-table-component__col-gutter"
816
816
  }, null, 4)) : m("", !0)
817
817
  ], 8, aa),
818
- C("thead", {
819
- class: L([[a.value.thead, { sticky: _.value, "top-0": _.value }], "dsg-table-component__head"])
818
+ k("thead", {
819
+ class: F([[s.value.thead, { sticky: J.value, "top-0": J.value }], "dsg-table-component__head"])
820
820
  }, [
821
- E(t.$slots, "tableHeader", { fields: f.value }, () => [
822
- V(Ge, {
821
+ B(t.$slots, "tableHeader", { fields: f.value }, () => [
822
+ V(_e, {
823
823
  fields: f.value,
824
824
  "has-select-all": e.selectable,
825
825
  "selectable-column-width": e.selectableColumnWidth,
826
826
  "expandable-column-width": e.expandableColumnWidth,
827
- "selected-rows": M.value,
828
- "onUpdate:selectedRows": l[0] || (l[0] = (n) => M.value = n),
829
- "has-selected": oe.value,
830
- "onUpdate:hasSelected": l[1] || (l[1] = (n) => oe.value = n),
831
- "scroll-visible": w.value,
827
+ "selected-rows": E.value,
828
+ "onUpdate:selectedRows": a[0] || (a[0] = (n) => E.value = n),
829
+ "has-selected": O.value,
830
+ "onUpdate:hasSelected": a[1] || (a[1] = (n) => O.value = n),
831
+ "scroll-visible": R.value,
832
832
  "show-expand-detail": e.hasDetailRow && e.showExpandDetail,
833
833
  "table-data-length": g.value?.length,
834
- "sort-field": k.value,
835
- "onUpdate:sortField": l[2] || (l[2] = (n) => k.value = n),
836
- "onDsgTable:sortField": l[3] || (l[3] = (n) => Be()),
837
- "onDsgTable:onSelectAll": b,
838
- "onDsgTable:onDeselectAll": y
834
+ "sort-field": x.value,
835
+ "onUpdate:sortField": a[2] || (a[2] = (n) => x.value = n),
836
+ "onDsgTable:sortField": a[3] || (a[3] = (n) => He()),
837
+ "onDsgTable:onSelectAll": xe,
838
+ "onDsgTable:onDeselectAll": ce
839
839
  }, null, 8, ["fields", "has-select-all", "selectable-column-width", "expandable-column-width", "selected-rows", "has-selected", "scroll-visible", "show-expand-detail", "table-data-length", "sort-field"])
840
840
  ])
841
841
  ], 2),
842
- C("tbody", {
843
- class: L(["dsg-table-component__body", a.value.tbody])
842
+ k("tbody", {
843
+ class: F(["dsg-table-component__body", s.value.tbody])
844
844
  }, [
845
- R.value ? (s(), d("tr", la, [
846
- C("td", { colspan: ee.value }, [
847
- C("div", {
845
+ T.value ? (i(), d("tr", la, [
846
+ k("td", { colspan: le.value }, [
847
+ k("div", {
848
848
  "aria-label": "Loading...",
849
849
  role: "status",
850
850
  class: "flex items-center space-x-3 h-12 w-full justify-center",
851
- colspan: ee.value
851
+ colspan: le.value
852
852
  }, [
853
- E(t.$slots, "dsg-table-loading", {}, () => [
854
- V(O, {
853
+ B(t.$slots, "dsg-table-loading", {}, () => [
854
+ V(K, {
855
855
  icon: "loading-02",
856
856
  class: "animate-spin"
857
857
  }),
858
- l[5] || (l[5] = C("span", { class: "text-xs font-medium text-gray-500" }, "Loading...", -1))
858
+ a[5] || (a[5] = k("span", { class: "text-xs font-medium text-gray-500" }, "Loading...", -1))
859
859
  ])
860
860
  ], 8, sa)
861
861
  ], 8, na)
862
- ])) : (s(!0), d(q, { key: 1 }, Y(g.value, (n, v) => (s(), d(q, {
863
- key: fe(n, v)
862
+ ])) : (i(!0), d(N, { key: 1 }, Z(g.value, (n, v) => (i(), d(N, {
863
+ key: be(n, v)
864
864
  }, [
865
- C("tr", {
866
- class: L(["dsg-table-component__row", [we(n, v), { "dsg-table-component__row--shift-range": e.selectable && ut(v) }]]),
865
+ k("tr", {
866
+ class: F(["dsg-table-component__row", [we(n, v), { "dsg-table-component__row--shift-range": e.selectable && ut(v) }]]),
867
867
  onClick: (c) => tt(c, v, n),
868
868
  onDblclick: (c) => at(c, v, n),
869
869
  onMouseover: (c) => lt(),
870
870
  onMouseenter: (c) => dt(v),
871
- onMouseleave: l[4] || (l[4] = (c) => rt())
871
+ onMouseleave: a[4] || (a[4] = (c) => rt())
872
872
  }, [
873
- e.selectable ? (s(), d("td", {
873
+ e.selectable ? (i(), d("td", {
874
874
  key: 0,
875
875
  class: "dsg-table-component__cell dsg-table-component__cell--checkbox",
876
- style: N({ width: e.selectableColumnWidth }),
877
- onClickCapture: (c) => r(c, n, v)
876
+ style: j({ width: e.selectableColumnWidth }),
877
+ onClickCapture: (c) => De(c, n, v)
878
878
  }, [
879
- V(ze, {
879
+ V(je, {
880
880
  modelValue: n.selected,
881
- "onUpdate:modelValue": [(c) => n.selected = c, (c) => i(n, v)]
881
+ "onUpdate:modelValue": [(c) => n.selected = c, (c) => Ce(n, v)]
882
882
  }, null, 8, ["modelValue", "onUpdate:modelValue"])
883
883
  ], 44, ia)) : m("", !0),
884
- e.hasDetailRow && e.expandableRows ? (s(), d("td", {
884
+ e.hasDetailRow && e.expandableRows ? (i(), d("td", {
885
885
  key: 1,
886
886
  class: "dsg-table-component__cell dsg-table-component__cell--expand",
887
- style: N({ width: e.expandableColumnWidth })
887
+ style: j({ width: e.expandableColumnWidth })
888
888
  }, [
889
- C("button", {
889
+ k("button", {
890
890
  type: "button",
891
- class: L(["dsg-table-component__expand-toggle", { "dsg-table-component__expand-toggle--expanded": X(n) }]),
892
- "aria-expanded": X(n),
891
+ class: F(["dsg-table-component__expand-toggle", { "dsg-table-component__expand-toggle--expanded": te(n) }]),
892
+ "aria-expanded": te(n),
893
893
  "aria-label": "Toggle row details",
894
- onClick: ft((c) => ue(n, v), ["stop"])
894
+ onClick: bt((c) => ue(n, v), ["stop"])
895
895
  }, [
896
- V(O, {
896
+ V(K, {
897
897
  icon: "chevron-right",
898
898
  size: "sm",
899
899
  class: "dsg-table-component__expand-icon"
900
900
  })
901
901
  ], 10, da)
902
902
  ], 4)) : m("", !0),
903
- (s(!0), d(q, null, Y(f.value, (c, x) => (s(), d(q, { key: x }, [
904
- c.visible ? (s(), d("td", {
903
+ (i(!0), d(N, null, Z(f.value, (c, P) => (i(), d(N, { key: P }, [
904
+ c.visible ? (i(), d("td", {
905
905
  key: 0,
906
- class: L(["dsg-table-component__cell", c.dataClass]),
907
- style: N({ width: c.width || void 0 }),
908
- onClick: (Q) => nt(),
909
- onDblclick: (Q) => st(),
910
- onContextmenu: (Q) => ot()
906
+ class: F(["dsg-table-component__cell", c.dataClass]),
907
+ style: j({ width: c.width || void 0 }),
908
+ onClick: (X) => nt(),
909
+ onDblclick: (X) => st(),
910
+ onContextmenu: (X) => ot()
911
911
  }, [
912
- E(t.$slots, me(c), {
912
+ B(t.$slots, me(c), {
913
913
  rowData: n,
914
914
  rowIndex: v,
915
915
  rowField: c
916
916
  }, () => [
917
- C("span", {
917
+ k("span", {
918
918
  innerHTML: he(c, n)
919
919
  }, null, 8, ua)
920
920
  ])
921
921
  ], 46, ra)) : m("", !0)
922
922
  ], 64))), 128))
923
923
  ], 42, oa),
924
- e.hasDetailRow && (!e.expandableRows || X(n)) ? (s(), K(ht, {
924
+ e.hasDetailRow && (!e.expandableRows || te(n)) ? (i(), Q(ht, {
925
925
  key: 0,
926
926
  name: e.detailRowTransition
927
927
  }, {
928
- default: ne(() => [
929
- C("tr", {
930
- class: L(["dsg-table-component__detail", { "dsg-table-component__detail--expanded": e.expandableRows && X(n) }]),
928
+ default: ie(() => [
929
+ k("tr", {
930
+ class: F(["dsg-table-component__detail", { "dsg-table-component__detail--expanded": e.expandableRows && te(n) }]),
931
931
  onClick: (c) => it()
932
932
  }, [
933
- C("td", { colspan: ee.value }, [
934
- E(t.$slots, "dsg-table-detail-row", {
933
+ k("td", { colspan: le.value }, [
934
+ B(t.$slots, "dsg-table-detail-row", {
935
935
  rowData: n,
936
936
  rowIndex: v,
937
937
  options: e.detailRowOptions,
938
- isExpanded: e.expandableRows ? X(n) : !0
938
+ isExpanded: e.expandableRows ? te(n) : !0
939
939
  })
940
940
  ], 8, ga)
941
941
  ], 10, ca)
@@ -943,19 +943,19 @@ You can explicitly suppress this warning by setting pagination-path="".`
943
943
  _: 2
944
944
  }, 1032, ["name"])) : m("", !0)
945
945
  ], 64))), 128)),
946
- !R.value && !g.value?.length && e.noDataTemplate.length ? (s(), d("tr", va, [
947
- C("td", {
948
- colspan: ee.value,
946
+ !T.value && !g.value?.length && e.noDataTemplate.length ? (i(), d("tr", va, [
947
+ k("td", {
948
+ colspan: le.value,
949
949
  class: "dsg-table-component__empty-result"
950
950
  }, [
951
- E(t.$slots, "dsg-table-empty-result", {}, () => [
951
+ B(t.$slots, "dsg-table-empty-result", {}, () => [
952
952
  mt(ve(e.noDataTemplate), 1)
953
953
  ])
954
- ], 8, ba)
954
+ ], 8, fa)
955
955
  ])) : m("", !0)
956
956
  ], 2),
957
- C("tfoot", fa, [
958
- E(t.$slots, "dsg-table-footer", {
957
+ k("tfoot", ba, [
958
+ B(t.$slots, "dsg-table-footer", {
959
959
  fields: f.value,
960
960
  data: g.value
961
961
  })
@@ -971,11 +971,11 @@ You can explicitly suppress this warning by setting pagination-path="".`
971
971
  key: 1,
972
972
  class: "dsg-table__search-header",
973
973
  ref: "dsgTableSearchHeaderEl"
974
- }, Ca = { class: "dsg-table__search-top" }, Sa = {
974
+ }, Sa = { class: "dsg-table__search-top" }, Ca = {
975
975
  key: 2,
976
976
  class: "dsg-table__footer",
977
977
  ref: "dsgTableFooterEl"
978
- }, xa = { class: "dsg-table__footer-left" }, Da = { class: "dsg-table__footer-center" }, $a = { class: "dsg-table__footer-right" }, Ta = /* @__PURE__ */ Z({
978
+ }, Da = { class: "dsg-table__footer-left" }, xa = { class: "dsg-table__footer-center" }, $a = { class: "dsg-table__footer-right" }, Ra = "dsg-table-per-page", Ta = /* @__PURE__ */ ae({
979
979
  __name: "DsgTable",
980
980
  props: {
981
981
  getUrl: {},
@@ -1009,6 +1009,7 @@ You can explicitly suppress this warning by setting pagination-path="".`
1009
1009
  hasHeader: { type: Boolean, default: !0 },
1010
1010
  hasFooter: { type: Boolean, default: !0 },
1011
1011
  perPage: { default: 20 },
1012
+ rememberPerPage: { type: Boolean, default: !0 },
1012
1013
  pagination: {},
1013
1014
  paginationPath: { default: "meta" },
1014
1015
  css: { default: () => ({ tableWrapper: "border-b" }) },
@@ -1024,124 +1025,152 @@ You can explicitly suppress this warning by setting pagination-path="".`
1024
1025
  detailRowOptions: { default: () => ({}) }
1025
1026
  },
1026
1027
  emits: ["dsg-table:action-edit", "dsg-table:action-view", "dsg-table:action-delete", "dsg-table:action-archive", "dsg-table:link-clicked", "dsg-table:rows-selected", "dsg-table:row-clicked", "dsg-table:row-hover", "dsg-table:row-dblclick", "dsg-table:filter-updated", "dsg-table:save-as-default", "dsg-table:term-changed", "dsg-table:data-loaded", "dsg-table:row-expanded", "dsg-table:row-collapsed"],
1027
- setup(e, { expose: B, emit: h }) {
1028
- const u = (o) => {
1029
- R.value = o;
1030
- }, S = P(e.apiMode && !!(e.filterEntity || e.filterEndpoint || e.getUrl)), H = () => {
1031
- if (S.value) {
1028
+ setup(e, { expose: L, emit: h }) {
1029
+ const u = y(e.apiMode && !!(e.filterEntity || e.filterEndpoint || e.getUrl)), S = e.perPage, A = (o) => {
1030
+ const l = typeof o == "number" ? o : Number(o);
1031
+ return !Number.isInteger(l) || l <= 0 ? null : l;
1032
+ }, f = () => typeof window > "u" ? null : `${Ra}:${window.location.pathname}`, g = () => {
1033
+ if (!e.rememberPerPage)
1034
+ return null;
1035
+ const o = f();
1036
+ if (!o)
1037
+ return null;
1038
+ try {
1039
+ const l = window.localStorage.getItem(o);
1040
+ return l == null || l.trim() === "" ? null : A(l);
1041
+ } catch {
1042
+ return null;
1043
+ }
1044
+ }, q = (o) => {
1045
+ if (!e.rememberPerPage)
1046
+ return;
1047
+ const l = f();
1048
+ if (l)
1049
+ try {
1050
+ window.localStorage.setItem(l, String(o));
1051
+ } catch {
1052
+ }
1053
+ }, M = g() ?? S, C = (o) => {
1054
+ const l = A(o);
1055
+ l != null && (Y.value.perPage = o, E.value = l, q(l));
1056
+ }, R = () => {
1057
+ if (u.value) {
1032
1058
  let o = {};
1033
- return Oe().forEach((i) => {
1034
- const r = Dt(i.key);
1059
+ return Qe().forEach((l) => {
1060
+ const r = xt(l.key);
1035
1061
  if (!r)
1036
1062
  return;
1037
- const b = o[`filter[${r}]`], y = i.value.join(",");
1038
- o[`filter[${r}]`] = b ? `${b},${y}` : y;
1063
+ const b = o[`filter[${r}]`], w = l.value.join(",");
1064
+ o[`filter[${r}]`] = b ? `${b},${w}` : w;
1039
1065
  }), o;
1040
1066
  } else
1041
1067
  return {};
1042
- }, f = W(() => ({
1068
+ }, s = z(() => ({
1043
1069
  ...e.css,
1044
1070
  tableWrapper: "border-b " + (e.css?.tableWrapper || "")
1045
- })), g = wt(), A = P(!0), $ = P(null), D = P("<p>Showing {from} to {to} of {total}</p>"), w = P(null), a = We("dsgTable"), T = P({ perPage: e.perPage, change: u }), R = P(e.perPage), k = P({ ...H(), ...e.initialFilters }), p = h, I = (o) => {
1046
- a.value?.changePage(o);
1047
- }, se = (o) => {
1048
- w.value = o;
1049
- }, re = ({ data: o }) => {
1050
- $.value = o, p("dsg-table:data-loaded", o);
1051
- }, M = () => {
1052
- a.value?.reload();
1053
- }, oe = (o) => {
1054
- a.value?.setLoading(o);
1055
- }, z = (o) => {
1056
- const i = a.value?.getData?.() ?? [];
1057
- a.value?.setData(i.map((r) => r.id === o.id ? o : r));
1058
- }, U = (o) => {
1059
- const i = a.value?.getData?.() ?? [];
1060
- a.value?.setData([...i, o]);
1061
- }, j = (o) => {
1062
- const i = a.value?.getData?.() ?? [];
1063
- a.value?.setData(i.filter((r) => r.id !== o.id));
1064
- }, J = (o) => {
1065
- a.value?.setData(o);
1066
- }, _ = () => a.value?.getData() ?? [], ee = (o) => {
1067
- const i = a.value?.getData() ?? [], r = o(i);
1068
- r && a.value?.setData(r);
1069
- }, be = (o) => {
1070
- a.value?.expandRow(o);
1071
+ })), H = wt(), T = y(!0), x = y(null), W = y("<p>Showing {from} to {to} of {total}</p>"), $ = y(null), D = Ne("dsgTable"), Y = y({
1072
+ perPage: M,
1073
+ change: C
1074
+ }), E = y(M), O = y({ ...R(), ...e.initialFilters }), p = h, U = (o) => {
1075
+ D.value?.changePage(o);
1076
+ }, G = (o) => {
1077
+ $.value = o;
1078
+ }, ee = ({ data: o }) => {
1079
+ x.value = o, p("dsg-table:data-loaded", o);
1080
+ }, J = () => {
1081
+ D.value?.reload();
1082
+ }, le = (o) => {
1083
+ D.value?.setLoading(o);
1071
1084
  }, fe = (o) => {
1072
- a.value?.collapseRow(o);
1073
- }, F = (o, i) => {
1074
- a.value?.toggleRowExpand(o, i);
1075
- }, he = () => {
1076
- a.value?.expandAllRows();
1077
- }, me = () => {
1078
- a.value?.collapseAllRows();
1079
- }, we = () => a.value?.getExpandedRows() ?? /* @__PURE__ */ new Set(), X = () => a.value?.getSelection() ?? [], ue = () => {
1080
- a.value?.clearSelection();
1081
- }, ye = (o) => {
1082
- k.value = o;
1083
- }, ke = () => k.value ?? {}, ce = (o) => {
1084
- const i = { ...k.value };
1085
- !o || o.trim() === "" ? delete i["filter[term]"] : i["filter[term]"] = o, k.value = i, He(() => {
1086
- M();
1085
+ const l = D.value?.getData?.() ?? [];
1086
+ D.value?.setData(l.map((r) => r.id === o.id ? o : r));
1087
+ }, be = (o) => {
1088
+ const l = D.value?.getData?.() ?? [];
1089
+ D.value?.setData([...l, o]);
1090
+ }, I = (o) => {
1091
+ const l = D.value?.getData?.() ?? [];
1092
+ D.value?.setData(l.filter((r) => r.id !== o.id));
1093
+ }, he = (o) => {
1094
+ D.value?.setData(o);
1095
+ }, me = () => D.value?.getData() ?? [], we = (o) => {
1096
+ const l = D.value?.getData() ?? [], r = o(l);
1097
+ r && D.value?.setData(r);
1098
+ }, te = (o) => {
1099
+ D.value?.expandRow(o);
1100
+ }, ue = (o) => {
1101
+ D.value?.collapseRow(o);
1102
+ }, ye = (o, l) => {
1103
+ D.value?.toggleRowExpand(o, l);
1104
+ }, ke = () => {
1105
+ D.value?.expandAllRows();
1106
+ }, pe = () => {
1107
+ D.value?.collapseAllRows();
1108
+ }, Pe = () => D.value?.getExpandedRows() ?? /* @__PURE__ */ new Set(), Se = () => D.value?.getSelection() ?? [], Ce = () => {
1109
+ D.value?.clearSelection();
1110
+ }, De = (o) => {
1111
+ O.value = o;
1112
+ }, xe = () => O.value ?? {}, ce = (o) => {
1113
+ const l = { ...O.value };
1114
+ !o || o.trim() === "" ? delete l["filter[term]"] : l["filter[term]"] = o, O.value = l, Ve(() => {
1115
+ J();
1087
1116
  }), p("dsg-table:term-changed", o);
1088
- }, pe = (o, i, r) => {
1117
+ }, $e = (o, l, r) => {
1089
1118
  let b = {};
1090
- k.value["filter[term]"] && (b["filter[term]"] = k.value["filter[term]"]), Object.keys(o).forEach((y) => {
1091
- o[y] !== null && o[y] !== void 0 && o[y] !== "" && (b[y] = o[y]);
1092
- }), k.value = b, He(() => {
1093
- M();
1094
- }), p("dsg-table:filter-updated", k.value, i, r);
1119
+ O.value["filter[term]"] && (b["filter[term]"] = O.value["filter[term]"]), Object.keys(o).forEach((w) => {
1120
+ o[w] !== null && o[w] !== void 0 && o[w] !== "" && (b[w] = o[w]);
1121
+ }), O.value = b, Ve(() => {
1122
+ J();
1123
+ }), p("dsg-table:filter-updated", O.value, l, r);
1095
1124
  };
1096
- return B({
1097
- reloadTable: M,
1098
- updateRowTable: z,
1099
- addRowTable: U,
1100
- deleteRowTable: j,
1101
- setData: J,
1102
- getData: _,
1103
- mutateData: ee,
1125
+ return L({
1126
+ reloadTable: J,
1127
+ updateRowTable: fe,
1128
+ addRowTable: be,
1129
+ deleteRowTable: I,
1130
+ setData: he,
1131
+ getData: me,
1132
+ mutateData: we,
1104
1133
  termChanged: ce,
1105
- setFilters: ye,
1106
- getFilters: ke,
1107
- setLoading: oe,
1108
- expandRow: be,
1109
- collapseRow: fe,
1110
- toggleRowExpand: F,
1111
- expandAllRows: he,
1112
- collapseAllRows: me,
1113
- getExpandedRows: we,
1114
- getSelection: X,
1115
- clearSelection: ue,
1116
- changePage: I
1117
- }), (o, i) => (s(), d("div", ma, [
1118
- e.hasHeader ? (s(), d("div", wa, [
1119
- E(o.$slots, "dsg-table--pre-header", {}, () => [
1120
- C("div", ya, [
1121
- E(o.$slots, "dsg-table--page-title", {
1122
- data: $.value,
1134
+ setFilters: De,
1135
+ getFilters: xe,
1136
+ setLoading: le,
1137
+ expandRow: te,
1138
+ collapseRow: ue,
1139
+ toggleRowExpand: ye,
1140
+ expandAllRows: ke,
1141
+ collapseAllRows: pe,
1142
+ getExpandedRows: Pe,
1143
+ getSelection: Se,
1144
+ clearSelection: Ce,
1145
+ changePage: U
1146
+ }), (o, l) => (i(), d("div", ma, [
1147
+ e.hasHeader ? (i(), d("div", wa, [
1148
+ B(o.$slots, "dsg-table--pre-header", {}, () => [
1149
+ k("div", ya, [
1150
+ B(o.$slots, "dsg-table--page-title", {
1151
+ data: x.value,
1123
1152
  title: e.title
1124
1153
  }, () => [
1125
- e.title.length > 0 ? (s(), d("h1", {
1154
+ e.title.length > 0 ? (i(), d("h1", {
1126
1155
  key: 0,
1127
1156
  class: "dsg-table__title",
1128
1157
  textContent: ve(e.title)
1129
1158
  }, null, 8, ka)) : m("", !0)
1130
1159
  ])
1131
1160
  ]),
1132
- C("div", pa, [
1133
- E(o.$slots, "dsg-table--page-actions", { data: $.value })
1161
+ k("div", pa, [
1162
+ B(o.$slots, "dsg-table--page-actions", { data: x.value })
1134
1163
  ])
1135
1164
  ])
1136
1165
  ])) : m("", !0),
1137
- e.displaySearch ? (s(), d("div", Pa, [
1138
- C("div", Ca, [
1139
- E(o.$slots, "dsg-table--search-header", { data: $.value }, () => [
1140
- V(Ye, {
1166
+ e.displaySearch ? (i(), d("div", Pa, [
1167
+ k("div", Sa, [
1168
+ B(o.$slots, "dsg-table--search-header", { data: x.value }, () => [
1169
+ V(Ze, {
1141
1170
  name: "term",
1142
- "onDsgTable:termChanged": i[0] || (i[0] = (r) => ce(r))
1171
+ "onDsgTable:termChanged": l[0] || (l[0] = (r) => ce(r))
1143
1172
  }),
1144
- V(Ne, {
1173
+ V(Ge, {
1145
1174
  entity: e.filterEntity,
1146
1175
  "filter-endpoint": e.filterEndpoint,
1147
1176
  "search-endpoint": e.filterSearchEndpoint,
@@ -1151,21 +1180,21 @@ You can explicitly suppress this warning by setting pagination-path="".`
1151
1180
  "save-as-default-label": e.saveAsDefaultLabel,
1152
1181
  "show-clear-all": e.showClearAll,
1153
1182
  "clear-all-label": e.clearAllLabel,
1154
- "onDsgTable:filterUpdated": i[1] || (i[1] = (r, b, y) => pe(r, b, y)),
1155
- "onDsgTable:saveAsDefault": i[2] || (i[2] = (r, b, y) => p("dsg-table:save-as-default", r, b, y))
1183
+ "onDsgTable:filterUpdated": l[1] || (l[1] = (r, b, w) => $e(r, b, w)),
1184
+ "onDsgTable:saveAsDefault": l[2] || (l[2] = (r, b, w) => p("dsg-table:save-as-default", r, b, w))
1156
1185
  }, null, 8, ["entity", "filter-endpoint", "search-endpoint", "auto-sort", "filters", "show-save-as-default", "save-as-default-label", "show-clear-all", "clear-all-label"]),
1157
- E(o.$slots, "dsg-table--search-actions", { data: $.value })
1186
+ B(o.$slots, "dsg-table--search-actions", { data: x.value })
1158
1187
  ])
1159
1188
  ]),
1160
- E(o.$slots, "dsg-table--search-navigation")
1189
+ B(o.$slots, "dsg-table--search-navigation")
1161
1190
  ], 512)) : m("", !0),
1162
1191
  V(ha, {
1163
1192
  ref: "dsgTable",
1164
1193
  "api-url": e.getUrl,
1165
- "filter-params": k.value,
1166
- "onUpdate:filterParams": i[8] || (i[8] = (r) => k.value = r),
1167
- "per-page": R.value,
1168
- "onUpdate:perPage": i[9] || (i[9] = (r) => R.value = r),
1194
+ "filter-params": O.value,
1195
+ "onUpdate:filterParams": l[8] || (l[8] = (r) => O.value = r),
1196
+ "per-page": E.value,
1197
+ "onUpdate:perPage": l[9] || (l[9] = (r) => E.value = r),
1169
1198
  fields: e.fields,
1170
1199
  "load-on-start": e.loadOnStart,
1171
1200
  "pagination-path": e.paginationPath,
@@ -1176,10 +1205,10 @@ You can explicitly suppress this warning by setting pagination-path="".`
1176
1205
  "selected-row-highlight": e.selectedRowHighlight,
1177
1206
  "track-by": e.trackBy,
1178
1207
  "table-layout": e.tableLayout,
1179
- css: f.value,
1208
+ css: s.value,
1180
1209
  data: e.data,
1181
1210
  "row-class": e.rowClass,
1182
- "api-mode": S.value,
1211
+ "api-mode": u.value,
1183
1212
  "replace-state": e.replaceState,
1184
1213
  "replace-strategy": e.replaceStrategy,
1185
1214
  "has-detail-row": e.hasDetailRow,
@@ -1188,91 +1217,91 @@ You can explicitly suppress this warning by setting pagination-path="".`
1188
1217
  "show-expand-detail": e.showExpandDetail,
1189
1218
  "detail-row-transition": e.detailRowTransition,
1190
1219
  "detail-row-options": e.detailRowOptions,
1191
- "onDsgTable:loading": i[10] || (i[10] = (r) => A.value = !0),
1192
- "onDsgTable:loaded": i[11] || (i[11] = (r) => A.value = !1),
1193
- "onDsgTable:paginationData": se,
1194
- "onDsgTable:loadSuccess": re,
1195
- "onDsgTable:rowsSelected": i[12] || (i[12] = (r) => p("dsg-table:rows-selected", r)),
1196
- "onDsgTable:rowClicked": i[13] || (i[13] = (r, b, y) => p("dsg-table:row-clicked", r, b, y)),
1197
- "onDsgTable:rowHover": i[14] || (i[14] = (r, b, y) => p("dsg-table:row-hover", r, b, y)),
1198
- "onDsgTable:rowDblclick": i[15] || (i[15] = (r, b, y) => p("dsg-table:row-dblclick", r, b, y)),
1199
- "onDsgTable:rowExpanded": i[16] || (i[16] = (r, b) => p("dsg-table:row-expanded", r, b)),
1200
- "onDsgTable:rowCollapsed": i[17] || (i[17] = (r, b) => p("dsg-table:row-collapsed", r, b))
1220
+ "onDsgTable:loading": l[10] || (l[10] = (r) => T.value = !0),
1221
+ "onDsgTable:loaded": l[11] || (l[11] = (r) => T.value = !1),
1222
+ "onDsgTable:paginationData": G,
1223
+ "onDsgTable:loadSuccess": ee,
1224
+ "onDsgTable:rowsSelected": l[12] || (l[12] = (r) => p("dsg-table:rows-selected", r)),
1225
+ "onDsgTable:rowClicked": l[13] || (l[13] = (r, b, w) => p("dsg-table:row-clicked", r, b, w)),
1226
+ "onDsgTable:rowHover": l[14] || (l[14] = (r, b, w) => p("dsg-table:row-hover", r, b, w)),
1227
+ "onDsgTable:rowDblclick": l[15] || (l[15] = (r, b, w) => p("dsg-table:row-dblclick", r, b, w)),
1228
+ "onDsgTable:rowExpanded": l[16] || (l[16] = (r, b) => p("dsg-table:row-expanded", r, b)),
1229
+ "onDsgTable:rowCollapsed": l[17] || (l[17] = (r, b) => p("dsg-table:row-collapsed", r, b))
1201
1230
  }, yt({
1202
- "dsg-field--actions": ne((r) => [
1203
- E(o.$slots, "dsg-table-actions", { data: r }, () => [
1204
- (s(), K(Qe, {
1231
+ "dsg-field--actions": ie((r) => [
1232
+ B(o.$slots, "dsg-table-actions", { data: r }, () => [
1233
+ (i(), Q(Je, {
1205
1234
  key: r.rowData?.[e.trackBy] ?? r.rowIndex,
1206
1235
  data: r,
1207
- "onDsgTable:actionEdit": i[3] || (i[3] = (b, y) => p("dsg-table:action-edit", b, y)),
1208
- "onDsgTable:actionView": i[4] || (i[4] = (b, y) => p("dsg-table:action-view", b, y)),
1209
- "onDsgTable:actionDelete": i[5] || (i[5] = (b, y) => p("dsg-table:action-delete", b, y)),
1210
- "onDsgTable:actionArchive": i[6] || (i[6] = (b, y) => p("dsg-table:action-archive", b, y)),
1211
- "onDsgTable:linkClicked": i[7] || (i[7] = (b, y, Pe) => p("dsg-table:link-clicked", b, y, Pe))
1236
+ "onDsgTable:actionEdit": l[3] || (l[3] = (b, w) => p("dsg-table:action-edit", b, w)),
1237
+ "onDsgTable:actionView": l[4] || (l[4] = (b, w) => p("dsg-table:action-view", b, w)),
1238
+ "onDsgTable:actionDelete": l[5] || (l[5] = (b, w) => p("dsg-table:action-delete", b, w)),
1239
+ "onDsgTable:actionArchive": l[6] || (l[6] = (b, w) => p("dsg-table:action-archive", b, w)),
1240
+ "onDsgTable:linkClicked": l[7] || (l[7] = (b, w, ge) => p("dsg-table:link-clicked", b, w, ge))
1212
1241
  }, null, 8, ["data"]))
1213
1242
  ])
1214
1243
  ]),
1215
1244
  _: 2
1216
1245
  }, [
1217
- Y(G(g), (r, b) => ({
1246
+ Z(_(H), (r, b) => ({
1218
1247
  name: b,
1219
- fn: ne((y) => [
1220
- String(b) !== "dsg-field--actions" ? E(o.$slots, b, kt(pt(y)), void 0, void 0, 0) : m("", !0)
1248
+ fn: ie((w) => [
1249
+ String(b) !== "dsg-field--actions" ? B(o.$slots, b, kt(pt(w)), void 0, void 0, 0) : m("", !0)
1221
1250
  ])
1222
1251
  }))
1223
1252
  ]), 1032, ["api-url", "filter-params", "per-page", "fields", "load-on-start", "pagination-path", "selectable", "selectable-column-width", "expandable-column-width", "shift-select-highlight", "selected-row-highlight", "track-by", "table-layout", "css", "data", "row-class", "api-mode", "replace-state", "replace-strategy", "has-detail-row", "expandable-rows", "expand-multiple", "show-expand-detail", "detail-row-transition", "detail-row-options"]),
1224
- e.hasFooter ? (s(), d("div", Sa, [
1225
- C("div", xa, [
1226
- E(o.$slots, "dsg-table--footer-left", {
1227
- data: w.value,
1228
- perPage: T.value
1253
+ e.hasFooter ? (i(), d("div", Ca, [
1254
+ k("div", Da, [
1255
+ B(o.$slots, "dsg-table--footer-left", {
1256
+ data: $.value,
1257
+ perPage: Y.value
1229
1258
  }, () => [
1230
- e.displayPaginationInfo ? (s(), K(je, {
1259
+ e.displayPaginationInfo ? (i(), Q(Ye, {
1231
1260
  key: 0,
1232
1261
  ref: "paginationInfoStart",
1233
- pagination: w.value,
1234
- "onUpdate:pagination": i[18] || (i[18] = (r) => w.value = r),
1235
- "info-template": D.value
1262
+ pagination: $.value,
1263
+ "onUpdate:pagination": l[18] || (l[18] = (r) => $.value = r),
1264
+ "info-template": W.value
1236
1265
  }, null, 8, ["pagination", "info-template"])) : m("", !0),
1237
- E(o.$slots, "dsg-table--footer-left-extras", {
1238
- data: w.value,
1239
- perPage: T.value
1266
+ B(o.$slots, "dsg-table--footer-left-extras", {
1267
+ data: $.value,
1268
+ perPage: Y.value
1240
1269
  })
1241
1270
  ])
1242
1271
  ]),
1243
- C("div", Da, [
1244
- E(o.$slots, "dsg-table--footer-center", {
1245
- data: w.value,
1246
- perPage: T.value
1272
+ k("div", xa, [
1273
+ B(o.$slots, "dsg-table--footer-center", {
1274
+ data: $.value,
1275
+ perPage: Y.value
1247
1276
  }, () => [
1248
- E(o.$slots, "dsg-table--footer-center-extras", {
1249
- data: w.value,
1250
- perPage: T.value
1277
+ B(o.$slots, "dsg-table--footer-center-extras", {
1278
+ data: $.value,
1279
+ perPage: Y.value
1251
1280
  })
1252
1281
  ])
1253
1282
  ]),
1254
- C("div", $a, [
1255
- E(o.$slots, "dsg-table--footer-right", {
1256
- data: w.value,
1257
- perPage: T.value
1283
+ k("div", $a, [
1284
+ B(o.$slots, "dsg-table--footer-right", {
1285
+ data: $.value,
1286
+ perPage: Y.value
1258
1287
  }, () => [
1259
- A.value === !1 && e.displayPaginationInfo ? (s(), K(Ke, Se({
1288
+ T.value === !1 && e.displayPaginationInfo ? (i(), Q(Xe, Te({
1260
1289
  key: 0,
1261
1290
  ref: "pagination",
1262
- pagination: w.value,
1263
- "onUpdate:pagination": i[19] || (i[19] = (r) => w.value = r),
1264
- "onDsgTable:changePage": I
1291
+ pagination: $.value,
1292
+ "onUpdate:pagination": l[19] || (l[19] = (r) => $.value = r),
1293
+ "onDsgTable:changePage": U
1265
1294
  }, e.pagination), null, 16, ["pagination"])) : m("", !0),
1266
- E(o.$slots, "dsg-table--footer-right-extras", {
1267
- data: w.value,
1268
- perPage: T.value
1295
+ B(o.$slots, "dsg-table--footer-right-extras", {
1296
+ data: $.value,
1297
+ perPage: Y.value
1269
1298
  })
1270
1299
  ])
1271
1300
  ])
1272
1301
  ], 512)) : m("", !0)
1273
1302
  ]));
1274
1303
  }
1275
- }), Ra = { class: "dsg-table-per-page" }, Ma = /* @__PURE__ */ Z({
1304
+ }), Ea = { class: "dsg-table-per-page" }, Ma = /* @__PURE__ */ ae({
1276
1305
  __name: "DsgTablePerPage",
1277
1306
  props: {
1278
1307
  perPageOptions: { default: () => [
@@ -1285,12 +1314,12 @@ You can explicitly suppress this warning by setting pagination-path="".`
1285
1314
  perPage: {}
1286
1315
  },
1287
1316
  setup(e) {
1288
- const B = (u) => e.perPageOptions.find((S) => S.label === u), h = (u) => {
1317
+ const L = (u) => e.perPageOptions.find((S) => S.label === u), h = (u) => {
1289
1318
  e.perPage.perPage = u.label, e.perPage.change(u.label);
1290
1319
  };
1291
- return (u, S) => (s(), d("div", Ra, [
1320
+ return (u, S) => (i(), d("div", Ea, [
1292
1321
  V($t, {
1293
- modelValue: B(e.perPage.perPage),
1322
+ modelValue: L(e.perPage.perPage),
1294
1323
  "onUpdate:modelValue": h,
1295
1324
  options: e.perPageOptions,
1296
1325
  size: "sm",
@@ -1298,24 +1327,24 @@ You can explicitly suppress this warning by setting pagination-path="".`
1298
1327
  }, null, 8, ["modelValue", "options"])
1299
1328
  ]));
1300
1329
  }
1301
- }), Ea = Ta, Ba = Qe, La = Ma, Fa = Ne, Ha = Ke, Aa = je, Ua = Ye, Va = Ge, Ka = {
1302
- DsgTable: Ea,
1303
- DsgTableActions: Ba,
1304
- DsgTablePerPage: La,
1305
- DsgTableFilter: Fa,
1330
+ }), Ba = Ta, La = Je, Fa = Ma, Aa = Ge, Ha = Xe, Ua = Ye, Ia = Ze, Va = _e, ja = {
1331
+ DsgTable: Ba,
1332
+ DsgTableActions: La,
1333
+ DsgTablePerPage: Fa,
1334
+ DsgTableFilter: Aa,
1306
1335
  DsgTablePagination: Ha,
1307
- DsgTablePaginationInfo: Aa,
1308
- DsgTableSearch: Ua,
1336
+ DsgTablePaginationInfo: Ua,
1337
+ DsgTableSearch: Ia,
1309
1338
  DsgTableRowHeader: Va
1310
1339
  };
1311
1340
  export {
1312
- Ea as DsgTable,
1313
- Ba as DsgTableActions,
1314
- Fa as DsgTableFilter,
1341
+ Ba as DsgTable,
1342
+ La as DsgTableActions,
1343
+ Aa as DsgTableFilter,
1315
1344
  Ha as DsgTablePagination,
1316
- Aa as DsgTablePaginationInfo,
1317
- La as DsgTablePerPage,
1345
+ Ua as DsgTablePaginationInfo,
1346
+ Fa as DsgTablePerPage,
1318
1347
  Va as DsgTableRowHeader,
1319
- Ua as DsgTableSearch,
1320
- Ka as default
1348
+ Ia as DsgTableSearch,
1349
+ ja as default
1321
1350
  };