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