@dcodegroup-au/dsg-vue 1.0.10-next → 1.0.11-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 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({
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({
7
7
  __name: "DsgTablePagination",
8
8
  props: /* @__PURE__ */ le({
9
9
  onEachSide: { default: 3 },
@@ -24,7 +24,7 @@ const Mt = { class: "dsg-table-pagination" }, Et = ["disabled"], Bt = ["disabled
24
24
  }, T = (R) => R === u.value?.current_page;
25
25
  return B({
26
26
  loadPage: a
27
- }), (R, k) => Ie((s(), d("div", Mt, [
27
+ }), (R, k) => Ie((s(), d("div", Et, [
28
28
  e.showFirstLast ? (s(), d("a", {
29
29
  key: 0,
30
30
  onClick: k[0] || (k[0] = (p) => a(e.firstPage)),
@@ -37,7 +37,7 @@ const Mt = { class: "dsg-table-pagination" }, Et = ["disabled"], Bt = ["disabled
37
37
  icon: e.firstIcon,
38
38
  size: "sm"
39
39
  }, null, 8, ["icon"])
40
- ], 10, Et)) : m("", !0),
40
+ ], 10, Bt)) : m("", !0),
41
41
  C("a", {
42
42
  onClick: k[1] || (k[1] = (p) => a("prev")),
43
43
  class: L(["dsg-table-pagination__link", { "dsg-table-pagination__link--disabled": f.value }]),
@@ -49,18 +49,18 @@ const Mt = { class: "dsg-table-pagination" }, Et = ["disabled"], Bt = ["disabled
49
49
  icon: e.prevIcon,
50
50
  size: "sm"
51
51
  }, null, 8, ["icon"])
52
- ], 10, Bt),
52
+ ], 10, Lt),
53
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
56
  class: L(["dsg-table-pagination__link", { "dsg-table-pagination__link--active": T(I + e.firstPage) }]),
57
57
  innerHTML: p
58
- }, null, 10, Lt))), 128)) : (s(!0), d(q, { key: 2 }, Y($.value, (p, I) => (s(), d("a", {
58
+ }, null, 10, Ft))), 128)) : (s(!0), d(q, { key: 2 }, Y($.value, (p, I) => (s(), d("a", {
59
59
  key: I,
60
60
  onClick: (se) => a(D.value + I + e.firstPage - 1),
61
61
  class: L(["dsg-table-pagination__link", { "dsg-table-pagination__link--active": T(D.value + I + e.firstPage - 1) }]),
62
62
  innerHTML: D.value + p - 1
63
- }, null, 10, Ft))), 128)),
63
+ }, null, 10, Ht))), 128)),
64
64
  C("a", {
65
65
  onClick: k[2] || (k[2] = (p) => a("next")),
66
66
  class: L(["dsg-table-pagination__link", { "dsg-table-pagination__link--disabled": g.value }]),
@@ -72,7 +72,7 @@ const Mt = { class: "dsg-table-pagination" }, Et = ["disabled"], Bt = ["disabled
72
72
  icon: e.nextIcon,
73
73
  size: "sm"
74
74
  }, null, 8, ["icon"])
75
- ], 10, Ht),
75
+ ], 10, At),
76
76
  e.showFirstLast ? (s(), d("a", {
77
77
  key: 3,
78
78
  onClick: k[3] || (k[3] = (p) => a(H.value)),
@@ -85,12 +85,12 @@ const Mt = { class: "dsg-table-pagination" }, Et = ["disabled"], Bt = ["disabled
85
85
  icon: e.lastIcon,
86
86
  size: "sm"
87
87
  }, null, 8, ["icon"])
88
- ], 10, At)) : m("", !0)
88
+ ], 10, Ut)) : m("", !0)
89
89
  ], 512)), [
90
90
  [gt, u.value && H.value > e.firstPage]
91
91
  ]);
92
92
  }
93
- }), Ut = ["innerHTML"], je = /* @__PURE__ */ Z({
93
+ }), Vt = ["innerHTML"], je = /* @__PURE__ */ Z({
94
94
  __name: "DsgTablePaginationInfo",
95
95
  props: /* @__PURE__ */ le({
96
96
  infoTemplate: { default: "Displaying {from} to {to} of {total} items" },
@@ -105,15 +105,15 @@ const Mt = { class: "dsg-table-pagination" }, Et = ["disabled"], Bt = ["disabled
105
105
  return (u, S) => (s(), d("div", {
106
106
  class: "dsg-table-pagination-info",
107
107
  innerHTML: h.value
108
- }, null, 8, Ut));
108
+ }, null, 8, Vt));
109
109
  }
110
- }), Vt = {
110
+ }), It = {
111
111
  class: "dsg-table-actions",
112
112
  ref: "dsgTableActions"
113
- }, It = { class: "dsg-table-action__trigger" }, Wt = {
113
+ }, Wt = { class: "dsg-table-action__trigger" }, qt = {
114
114
  key: 0,
115
115
  class: "dsg-table-actions__menu-wrapper"
116
- }, qt = ["href", "target", "onClick"], zt = ["textContent"], Ot = { key: 0 }, Nt = { key: 1 }, Kt = ["href", "target", "onClick"], jt = { class: "flex-1" }, Qe = /* @__PURE__ */ Z({
116
+ }, zt = ["href", "target", "onClick"], Ot = ["textContent"], Nt = { key: 0 }, Kt = { key: 1 }, jt = ["href", "target", "onClick"], Qt = { class: "flex-1" }, Qe = /* @__PURE__ */ Z({
117
117
  __name: "DsgTableActions",
118
118
  props: {
119
119
  placement: { default: "auto" },
@@ -156,8 +156,8 @@ const Mt = { class: "dsg-table-pagination" }, Et = ["disabled"], Bt = ["disabled
156
156
  const a = D.actionId || D.label.trim().toLowerCase().replace(/[^a-z0-9-]/g, "-").replace(/-+/g, "-");
157
157
  $("dsg-table:link-clicked", w, a, u.value);
158
158
  }, $ = B;
159
- return (D, w) => Ie((s(), d("div", Vt, [
160
- V(G(pt), {
159
+ return (D, w) => Ie((s(), d("div", It, [
160
+ V(G(Pt), {
161
161
  triggers: [],
162
162
  placement: e.placement,
163
163
  "handle-resize": !0,
@@ -168,7 +168,7 @@ const Mt = { class: "dsg-table-pagination" }, Et = ["disabled"], Bt = ["disabled
168
168
  ref: "floatingVueFilterDropdown"
169
169
  }, {
170
170
  popper: ne(() => [
171
- h.value ? (s(), d("div", Wt, [
171
+ h.value ? (s(), d("div", qt, [
172
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,
@@ -185,12 +185,12 @@ const Mt = { class: "dsg-table-pagination" }, Et = ["disabled"], Bt = ["disabled
185
185
  }, null, 8, ["icon"]),
186
186
  C("span", {
187
187
  class: "dsg-table-actions__menu-item-id",
188
- textContent: ve(a?.label || G($t)(String(T)))
189
- }, null, 8, zt)
188
+ textContent: ve(a?.label || G(Tt)(String(T)))
189
+ }, null, 8, Ot)
190
190
  ], 2)
191
- ], 8, qt)) : m("", !0)
191
+ ], 8, zt)) : m("", !0)
192
192
  ], 64))), 256)),
193
- S.value && H.value ? (s(), d("hr", Ot)) : m("", !0),
193
+ S.value && H.value ? (s(), d("hr", Nt)) : m("", !0),
194
194
  H.value ? (s(!0), d(q, { key: 1 }, Y(H.value, (a) => (s(), d(q, {
195
195
  key: a.label
196
196
  }, [
@@ -198,7 +198,7 @@ const Mt = { class: "dsg-table-pagination" }, Et = ["disabled"], Bt = ["disabled
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", Nt)) : (s(), d("a", {
201
+ }, null, 8, ["quote", "row-data"])) : a.hasOwnProperty("type") && a.type == "break" ? (s(), d("hr", Kt)) : (s(), d("a", {
202
202
  key: 2,
203
203
  href: a.link,
204
204
  target: a.target || "_self",
@@ -210,13 +210,13 @@ const Mt = { class: "dsg-table-pagination" }, Et = ["disabled"], Bt = ["disabled
210
210
  icon: a.icon,
211
211
  size: "sm"
212
212
  }, null, 8, ["icon"])) : m("", !0),
213
- C("span", jt, ve(a.label), 1)
214
- ], 10, Kt))
213
+ C("span", Qt, ve(a.label), 1)
214
+ ], 10, jt))
215
215
  ], 64))), 128)) : m("", !0)
216
216
  ])) : m("", !0)
217
217
  ]),
218
218
  default: ne(() => [
219
- C("div", It, [
219
+ C("div", Wt, [
220
220
  C("button", {
221
221
  type: "button",
222
222
  class: "dsg-table-actions__button",
@@ -236,10 +236,10 @@ const Mt = { class: "dsg-table-pagination" }, Et = ["disabled"], Bt = ["disabled
236
236
  _: 3
237
237
  }, 8, ["placement", "shown"])
238
238
  ])), [
239
- [G(Pt), () => h.value = !1]
239
+ [G(Ct), () => h.value = !1]
240
240
  ]);
241
241
  }
242
- }), Qt = { class: "dsg-table-search" }, Ye = /* @__PURE__ */ Z({
242
+ }), Yt = { class: "dsg-table-search" }, Ye = /* @__PURE__ */ Z({
243
243
  __name: "DsgTableSearch",
244
244
  props: {
245
245
  name: {},
@@ -260,15 +260,15 @@ const Mt = { class: "dsg-table-pagination" }, Et = ["disabled"], Bt = ["disabled
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 = St((H) => {
263
+ const u = B, S = xt((H) => {
264
264
  if (h.value = H, 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", Qt, [
271
- V(Ct, {
270
+ return (H, f) => (s(), d("div", Yt, [
271
+ V(St, {
272
272
  modelValue: h.value,
273
273
  "onUpdate:modelValue": f[0] || (f[0] = (g) => h.value = g),
274
274
  name: e.name,
@@ -289,10 +289,10 @@ const Mt = { class: "dsg-table-pagination" }, Et = ["disabled"], Bt = ["disabled
289
289
  }, null, 8, ["modelValue", "name", "id", "placeholder", "disabled", "required", "readonly", "hidden"])
290
290
  ]));
291
291
  }
292
- }), Yt = { class: "dsg-table-row-header" }, Gt = ["title", "id", "onClick"], Jt = {
292
+ }), Gt = { class: "dsg-table-row-header" }, Jt = ["title", "id", "onClick"], Xt = {
293
293
  key: 0,
294
294
  class: "dsg-table-row-header__sort-icon"
295
- }, Xt = ["innerHTML"], Zt = ["innerHTML"], _t = ["innerHTML"], ea = ["innerHTML"], Ge = /* @__PURE__ */ Z({
295
+ }, Zt = ["innerHTML"], _t = ["innerHTML"], ea = ["innerHTML"], ta = ["innerHTML"], Ge = /* @__PURE__ */ Z({
296
296
  __name: "DsgTableRowHeader",
297
297
  props: /* @__PURE__ */ le({
298
298
  fields: {},
@@ -316,7 +316,7 @@ const Mt = { class: "dsg-table-pagination" }, Et = ["disabled"], Bt = ["disabled
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
317
  }, g = B, A = (D, w) => [
318
318
  D,
319
- D + "-" + Tt(String(w?.name)),
319
+ D + "-" + Rt(String(w?.name)),
320
320
  w.titleClass || "",
321
321
  { "dsg-table-row-header__row--sortable": w.sortable },
322
322
  { "dsg-table-row-header__row--sort-active": h.value?.name === w.name }
@@ -327,7 +327,7 @@ const Mt = { class: "dsg-table-pagination" }, Et = ["disabled"], Bt = ["disabled
327
327
  direction: h.value?.name === D.name && h.value?.direction === "asc" ? "desc" : "asc"
328
328
  }, g("dsg-table:sort-field", D));
329
329
  };
330
- return (D, w) => (s(), d("tr", Yt, [
330
+ return (D, w) => (s(), d("tr", Gt, [
331
331
  e.hasSelectAll ? (s(), d("th", {
332
332
  key: 0,
333
333
  class: "dsg-table-row-header__row dsg-table-row-header__row--checkbox",
@@ -359,8 +359,8 @@ const Mt = { class: "dsg-table-pagination" }, Et = ["disabled"], Bt = ["disabled
359
359
  onClick: (R) => $(a),
360
360
  scope: "col"
361
361
  }, [
362
- a.sortable ? (s(), d("div", Jt, [
363
- a.tooltip ? (s(), K(Ae, be({
362
+ a.sortable ? (s(), d("div", Xt, [
363
+ a.tooltip ? (s(), K(Ae, Se({
364
364
  key: 0,
365
365
  ref_for: !0
366
366
  }, a.tooltip, { class: "dsg-table-row-header__tooltip" }), {
@@ -369,7 +369,7 @@ const Mt = { class: "dsg-table-pagination" }, Et = ["disabled"], Bt = ["disabled
369
369
  key: 0,
370
370
  class: "dsg-table-row-header__title",
371
371
  innerHTML: a.title
372
- }, null, 8, Xt)) : m("", !0),
372
+ }, null, 8, Zt)) : m("", !0),
373
373
  a.tooltip.icon ? (s(), K(O, {
374
374
  key: 1,
375
375
  icon: a.tooltip.icon,
@@ -382,7 +382,7 @@ const Mt = { class: "dsg-table-pagination" }, Et = ["disabled"], Bt = ["disabled
382
382
  key: 1,
383
383
  class: "dsg-table-row-header__title",
384
384
  innerHTML: a.title
385
- }, null, 8, Zt)) : m("", !0),
385
+ }, null, 8, _t)) : m("", !0),
386
386
  a.sortable && h.value?.name !== a.name ? (s(), K(O, {
387
387
  key: 2,
388
388
  icon: "chevron-selector-vertical",
@@ -402,7 +402,7 @@ const Mt = { class: "dsg-table-pagination" }, Et = ["disabled"], Bt = ["disabled
402
402
  size: "xs"
403
403
  })) : m("", !0)
404
404
  ])) : (s(), d(q, { key: 1 }, [
405
- a.tooltip ? (s(), K(Ae, be({
405
+ a.tooltip ? (s(), K(Ae, Se({
406
406
  key: 0,
407
407
  ref_for: !0
408
408
  }, a.tooltip, { class: "dsg-table-row-header__tooltip" }), {
@@ -410,7 +410,7 @@ const Mt = { class: "dsg-table-pagination" }, Et = ["disabled"], Bt = ["disabled
410
410
  C("span", {
411
411
  class: "dsg-table-row-header__title",
412
412
  innerHTML: G(Ve)(String(a?.title))
413
- }, null, 8, _t),
413
+ }, null, 8, ea),
414
414
  a.tooltip.icon ? (s(), K(O, {
415
415
  key: 0,
416
416
  icon: a.tooltip.icon,
@@ -423,9 +423,9 @@ const Mt = { class: "dsg-table-pagination" }, Et = ["disabled"], Bt = ["disabled
423
423
  key: 1,
424
424
  class: "dsg-table-row-header__title",
425
425
  innerHTML: G(Ve)(String(a?.title))
426
- }, null, 8, ea))
426
+ }, null, 8, ta))
427
427
  ], 64))
428
- ], 14, Gt)) : m("", !0)
428
+ ], 14, Jt)) : m("", !0)
429
429
  ], 64))), 256)),
430
430
  e.scrollVisible ? (s(), d("th", {
431
431
  key: 2,
@@ -434,10 +434,10 @@ const Mt = { class: "dsg-table-pagination" }, Et = ["disabled"], Bt = ["disabled
434
434
  }, null, 4)) : m("", !0)
435
435
  ]));
436
436
  }
437
- }), ta = ["span"], aa = {
437
+ }), aa = ["span"], la = {
438
438
  key: 0,
439
439
  class: "dsg-table-component__loading"
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
+ }, 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({
441
441
  __name: "DsgTableComponent",
442
442
  props: /* @__PURE__ */ le({
443
443
  fields: { default: () => [] },
@@ -549,10 +549,10 @@ const Mt = { class: "dsg-table-pagination" }, Et = ["disabled"], Bt = ["disabled
549
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
550
  let t = f.value.filter((l) => l.visible).length;
551
551
  return e.selectable && t++, e.hasDetailRow && e.expandableRows && t++, t;
552
- }), fe = W(() => {
552
+ }), be = W(() => {
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
- }), he = (t, l) => {
555
+ }), fe = (t, l) => {
556
556
  const n = t?.[e.trackBy];
557
557
  return n ?? l;
558
558
  };
@@ -591,7 +591,7 @@ const Mt = { class: "dsg-table-pagination" }, Et = ["disabled"], Bt = ["disabled
591
591
  },
592
592
  { deep: !0 }
593
593
  );
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) => {
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) => {
595
595
  const n = {
596
596
  odd: l % 2 === 0,
597
597
  even: l % 2 !== 0,
@@ -614,16 +614,16 @@ const Mt = { class: "dsg-table-pagination" }, Et = ["disabled"], Bt = ["disabled
614
614
  }, X = (t) => z.value.has(t[e.trackBy]), ue = (t, l) => {
615
615
  const n = t[e.trackBy];
616
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
- }, ke = (t) => {
617
+ }, ye = (t) => {
618
618
  const l = t[e.trackBy];
619
619
  z.value.has(l) || (e.expandMultiple || z.value.clear(), z.value.add(l));
620
- }, pe = (t) => {
620
+ }, ke = (t) => {
621
621
  z.value.delete(t[e.trackBy]);
622
622
  }, ce = () => {
623
623
  g.value?.forEach((t) => {
624
624
  z.value.add(t[e.trackBy]);
625
625
  });
626
- }, Pe = () => {
626
+ }, pe = () => {
627
627
  z.value.clear();
628
628
  }, o = () => z.value, i = (t, l) => {
629
629
  if (e.selectable) {
@@ -662,7 +662,7 @@ const Mt = { class: "dsg-table-pagination" }, Et = ["disabled"], Bt = ["disabled
662
662
  e.selectable && (g.value?.forEach((t) => {
663
663
  t.selected = !1;
664
664
  }), M.value = [], U.value = null, F("dsg-table:rows-selected", M.value));
665
- }, Ce = () => M.value ?? [], Je = () => {
665
+ }, Pe = () => M.value ?? [], Je = () => {
666
666
  e.selectable && g.value?.forEach((t) => {
667
667
  t.selected = !1;
668
668
  }), M.value = [], oe.value = !1, U.value = null, j.value = null, F("dsg-table:rows-selected", M.value);
@@ -696,9 +696,9 @@ const Mt = { class: "dsg-table-pagination" }, Et = ["disabled"], Bt = ["disabled
696
696
  return;
697
697
  F("dsg-table:load-success", t);
698
698
  const l = e.transform ? e.transform(t.data) : t.data;
699
- g.value = Se(l, e.dataPath, null), e.selectable && (U.value = null, g.value?.forEach((n) => {
699
+ g.value = Ce(l, e.dataPath, null), e.selectable && (U.value = null, g.value?.forEach((n) => {
700
700
  n.selected = n.selected ?? !1;
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(
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(
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
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;
@@ -765,18 +765,18 @@ You can explicitly suppress this warning by setting pagination-path="".`
765
765
  setLoading: (t) => {
766
766
  R.value = t, F("dsg-table:loading", R.value);
767
767
  },
768
- expandRow: ke,
769
- collapseRow: pe,
768
+ expandRow: ye,
769
+ collapseRow: ke,
770
770
  toggleRowExpand: ue,
771
771
  expandAllRows: ce,
772
- collapseAllRows: Pe,
772
+ collapseAllRows: pe,
773
773
  getExpandedRows: o,
774
774
  isRowExpanded: X,
775
- getSelection: Ce,
775
+ getSelection: Pe,
776
776
  clearSelection: Je
777
777
  }), (t, l) => (s(), d("div", {
778
778
  class: L(["dsg-table-component", { "dsg-table-component--shift-active": e.selectable && J.value }]),
779
- style: N(fe.value)
779
+ style: N(be.value)
780
780
  }, [
781
781
  C("div", {
782
782
  ref: "dsgTableBodyWrapper",
@@ -814,7 +814,7 @@ You can explicitly suppress this warning by setting pagination-path="".`
814
814
  style: N({ width: D.value }),
815
815
  class: "dsg-table-component__col-gutter"
816
816
  }, null, 4)) : m("", !0)
817
- ], 8, ta),
817
+ ], 8, aa),
818
818
  C("thead", {
819
819
  class: L([[a.value.thead, { sticky: _.value, "top-0": _.value }], "dsg-table-component__head"])
820
820
  }, [
@@ -842,7 +842,7 @@ You can explicitly suppress this warning by setting pagination-path="".`
842
842
  C("tbody", {
843
843
  class: L(["dsg-table-component__body", a.value.tbody])
844
844
  }, [
845
- R.value ? (s(), d("tr", aa, [
845
+ R.value ? (s(), d("tr", la, [
846
846
  C("td", { colspan: ee.value }, [
847
847
  C("div", {
848
848
  "aria-label": "Loading...",
@@ -857,13 +857,13 @@ You can explicitly suppress this warning by setting pagination-path="".`
857
857
  }),
858
858
  l[5] || (l[5] = C("span", { class: "text-xs font-medium text-gray-500" }, "Loading...", -1))
859
859
  ])
860
- ], 8, na)
861
- ], 8, la)
860
+ ], 8, sa)
861
+ ], 8, na)
862
862
  ])) : (s(!0), d(q, { key: 1 }, Y(g.value, (n, v) => (s(), d(q, {
863
- key: he(n, v)
863
+ key: fe(n, v)
864
864
  }, [
865
865
  C("tr", {
866
- class: L(["dsg-table-component__row", [ye(n, v), { "dsg-table-component__row--shift-range": e.selectable && ut(v) }]]),
866
+ class: L(["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(),
@@ -880,7 +880,7 @@ You can explicitly suppress this warning by setting pagination-path="".`
880
880
  modelValue: n.selected,
881
881
  "onUpdate:modelValue": [(c) => n.selected = c, (c) => i(n, v)]
882
882
  }, null, 8, ["modelValue", "onUpdate:modelValue"])
883
- ], 44, oa)) : m("", !0),
883
+ ], 44, ia)) : m("", !0),
884
884
  e.hasDetailRow && e.expandableRows ? (s(), d("td", {
885
885
  key: 1,
886
886
  class: "dsg-table-component__cell dsg-table-component__cell--expand",
@@ -898,7 +898,7 @@ You can explicitly suppress this warning by setting pagination-path="".`
898
898
  size: "sm",
899
899
  class: "dsg-table-component__expand-icon"
900
900
  })
901
- ], 10, ia)
901
+ ], 10, da)
902
902
  ], 4)) : m("", !0),
903
903
  (s(!0), d(q, null, Y(f.value, (c, x) => (s(), d(q, { key: x }, [
904
904
  c.visible ? (s(), d("td", {
@@ -909,18 +909,18 @@ You can explicitly suppress this warning by setting pagination-path="".`
909
909
  onDblclick: (Q) => st(),
910
910
  onContextmenu: (Q) => ot()
911
911
  }, [
912
- E(t.$slots, we(c), {
912
+ E(t.$slots, me(c), {
913
913
  rowData: n,
914
914
  rowIndex: v,
915
915
  rowField: c
916
916
  }, () => [
917
917
  C("span", {
918
- innerHTML: me(c, n)
919
- }, null, 8, ra)
918
+ innerHTML: he(c, n)
919
+ }, null, 8, ua)
920
920
  ])
921
- ], 46, da)) : m("", !0)
921
+ ], 46, ra)) : m("", !0)
922
922
  ], 64))), 128))
923
- ], 42, sa),
923
+ ], 42, oa),
924
924
  e.hasDetailRow && (!e.expandableRows || X(n)) ? (s(), K(ht, {
925
925
  key: 0,
926
926
  name: e.detailRowTransition
@@ -937,13 +937,13 @@ You can explicitly suppress this warning by setting pagination-path="".`
937
937
  options: e.detailRowOptions,
938
938
  isExpanded: e.expandableRows ? X(n) : !0
939
939
  })
940
- ], 8, ca)
941
- ], 10, ua)
940
+ ], 8, ga)
941
+ ], 10, ca)
942
942
  ]),
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", ga, [
946
+ !R.value && !g.value?.length && e.noDataTemplate.length ? (s(), d("tr", va, [
947
947
  C("td", {
948
948
  colspan: ee.value,
949
949
  class: "dsg-table-component__empty-result"
@@ -951,10 +951,10 @@ You can explicitly suppress this warning by setting pagination-path="".`
951
951
  E(t.$slots, "dsg-table-empty-result", {}, () => [
952
952
  mt(ve(e.noDataTemplate), 1)
953
953
  ])
954
- ], 8, va)
954
+ ], 8, ba)
955
955
  ])) : m("", !0)
956
956
  ], 2),
957
- C("tfoot", ba, [
957
+ C("tfoot", fa, [
958
958
  E(t.$slots, "dsg-table-footer", {
959
959
  fields: f.value,
960
960
  data: g.value
@@ -964,18 +964,18 @@ You can explicitly suppress this warning by setting pagination-path="".`
964
964
  ], 6)
965
965
  ], 6));
966
966
  }
967
- }), ha = { class: "dsg-table" }, ma = {
967
+ }), ma = { class: "dsg-table" }, wa = {
968
968
  key: 0,
969
969
  class: "dsg-table__pre-header"
970
- }, wa = { class: "dsg-table--pre-header-left" }, ya = ["textContent"], ka = { class: "dsg-table__pre-header-right" }, pa = {
970
+ }, ya = { class: "dsg-table--pre-header-left" }, ka = ["textContent"], pa = { class: "dsg-table__pre-header-right" }, Pa = {
971
971
  key: 1,
972
972
  class: "dsg-table__search-header",
973
973
  ref: "dsgTableSearchHeaderEl"
974
- }, Pa = { class: "dsg-table__search-top" }, Ca = {
974
+ }, Ca = { class: "dsg-table__search-top" }, Sa = {
975
975
  key: 2,
976
976
  class: "dsg-table__footer",
977
977
  ref: "dsgTableFooterEl"
978
- }, Sa = { class: "dsg-table__footer-left" }, xa = { class: "dsg-table__footer-center" }, Da = { class: "dsg-table__footer-right" }, $a = /* @__PURE__ */ Z({
978
+ }, xa = { class: "dsg-table__footer-left" }, Da = { class: "dsg-table__footer-center" }, $a = { class: "dsg-table__footer-right" }, Ta = /* @__PURE__ */ Z({
979
979
  __name: "DsgTable",
980
980
  props: {
981
981
  getUrl: {},
@@ -1031,7 +1031,7 @@ You can explicitly suppress this warning by setting pagination-path="".`
1031
1031
  if (S.value) {
1032
1032
  let o = {};
1033
1033
  return Oe().forEach((i) => {
1034
- const r = xt(i.key);
1034
+ const r = Dt(i.key);
1035
1035
  if (!r)
1036
1036
  return;
1037
1037
  const b = o[`filter[${r}]`], y = i.value.join(",");
@@ -1066,26 +1066,26 @@ You can explicitly suppress this warning by setting pagination-path="".`
1066
1066
  }, _ = () => a.value?.getData() ?? [], ee = (o) => {
1067
1067
  const i = a.value?.getData() ?? [], r = o(i);
1068
1068
  r && a.value?.setData(r);
1069
- }, fe = (o) => {
1069
+ }, be = (o) => {
1070
1070
  a.value?.expandRow(o);
1071
- }, he = (o) => {
1071
+ }, fe = (o) => {
1072
1072
  a.value?.collapseRow(o);
1073
1073
  }, F = (o, i) => {
1074
1074
  a.value?.toggleRowExpand(o, i);
1075
- }, me = () => {
1075
+ }, he = () => {
1076
1076
  a.value?.expandAllRows();
1077
- }, we = () => {
1077
+ }, me = () => {
1078
1078
  a.value?.collapseAllRows();
1079
- }, ye = () => a.value?.getExpandedRows() ?? /* @__PURE__ */ new Set(), X = () => a.value?.getSelection() ?? [], ue = () => {
1079
+ }, we = () => a.value?.getExpandedRows() ?? /* @__PURE__ */ new Set(), X = () => a.value?.getSelection() ?? [], ue = () => {
1080
1080
  a.value?.clearSelection();
1081
- }, ke = (o) => {
1081
+ }, ye = (o) => {
1082
1082
  k.value = o;
1083
- }, pe = () => k.value ?? {}, ce = (o) => {
1083
+ }, ke = () => k.value ?? {}, ce = (o) => {
1084
1084
  const i = { ...k.value };
1085
1085
  !o || o.trim() === "" ? delete i["filter[term]"] : i["filter[term]"] = o, k.value = i, He(() => {
1086
1086
  M();
1087
1087
  }), p("dsg-table:term-changed", o);
1088
- }, Pe = (o, i, r) => {
1088
+ }, pe = (o, i, r) => {
1089
1089
  let b = {};
1090
1090
  k.value["filter[term]"] && (b["filter[term]"] = k.value["filter[term]"]), Object.keys(o).forEach((y) => {
1091
1091
  o[y] !== null && o[y] !== void 0 && o[y] !== "" && (b[y] = o[y]);
@@ -1102,22 +1102,22 @@ You can explicitly suppress this warning by setting pagination-path="".`
1102
1102
  getData: _,
1103
1103
  mutateData: ee,
1104
1104
  termChanged: ce,
1105
- setFilters: ke,
1106
- getFilters: pe,
1105
+ setFilters: ye,
1106
+ getFilters: ke,
1107
1107
  setLoading: oe,
1108
- expandRow: fe,
1109
- collapseRow: he,
1108
+ expandRow: be,
1109
+ collapseRow: fe,
1110
1110
  toggleRowExpand: F,
1111
- expandAllRows: me,
1112
- collapseAllRows: we,
1113
- getExpandedRows: ye,
1111
+ expandAllRows: he,
1112
+ collapseAllRows: me,
1113
+ getExpandedRows: we,
1114
1114
  getSelection: X,
1115
1115
  clearSelection: ue,
1116
1116
  changePage: I
1117
- }), (o, i) => (s(), d("div", ha, [
1118
- e.hasHeader ? (s(), d("div", ma, [
1117
+ }), (o, i) => (s(), d("div", ma, [
1118
+ e.hasHeader ? (s(), d("div", wa, [
1119
1119
  E(o.$slots, "dsg-table--pre-header", {}, () => [
1120
- C("div", wa, [
1120
+ C("div", ya, [
1121
1121
  E(o.$slots, "dsg-table--page-title", {
1122
1122
  data: $.value,
1123
1123
  title: e.title
@@ -1126,16 +1126,16 @@ You can explicitly suppress this warning by setting pagination-path="".`
1126
1126
  key: 0,
1127
1127
  class: "dsg-table__title",
1128
1128
  textContent: ve(e.title)
1129
- }, null, 8, ya)) : m("", !0)
1129
+ }, null, 8, ka)) : m("", !0)
1130
1130
  ])
1131
1131
  ]),
1132
- C("div", ka, [
1132
+ C("div", pa, [
1133
1133
  E(o.$slots, "dsg-table--page-actions", { data: $.value })
1134
1134
  ])
1135
1135
  ])
1136
1136
  ])) : m("", !0),
1137
- e.displaySearch ? (s(), d("div", pa, [
1138
- C("div", Pa, [
1137
+ e.displaySearch ? (s(), d("div", Pa, [
1138
+ C("div", Ca, [
1139
1139
  E(o.$slots, "dsg-table--search-header", { data: $.value }, () => [
1140
1140
  V(Ye, {
1141
1141
  name: "term",
@@ -1151,7 +1151,7 @@ You can explicitly suppress this warning by setting pagination-path="".`
1151
1151
  "save-as-default-label": e.saveAsDefaultLabel,
1152
1152
  "show-clear-all": e.showClearAll,
1153
1153
  "clear-all-label": e.clearAllLabel,
1154
- "onDsgTable:filterUpdated": i[1] || (i[1] = (r, b, y) => Pe(r, b, y)),
1154
+ "onDsgTable:filterUpdated": i[1] || (i[1] = (r, b, y) => pe(r, b, y)),
1155
1155
  "onDsgTable:saveAsDefault": i[2] || (i[2] = (r, b, y) => p("dsg-table:save-as-default", r, b, y))
1156
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
1157
  E(o.$slots, "dsg-table--search-actions", { data: $.value })
@@ -1159,7 +1159,7 @@ You can explicitly suppress this warning by setting pagination-path="".`
1159
1159
  ]),
1160
1160
  E(o.$slots, "dsg-table--search-navigation")
1161
1161
  ], 512)) : m("", !0),
1162
- V(fa, {
1162
+ V(ha, {
1163
1163
  ref: "dsgTable",
1164
1164
  "api-url": e.getUrl,
1165
1165
  "filter-params": k.value,
@@ -1208,7 +1208,7 @@ You can explicitly suppress this warning by setting pagination-path="".`
1208
1208
  "onDsgTable:actionView": i[4] || (i[4] = (b, y) => p("dsg-table:action-view", b, y)),
1209
1209
  "onDsgTable:actionDelete": i[5] || (i[5] = (b, y) => p("dsg-table:action-delete", b, y)),
1210
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))
1211
+ "onDsgTable:linkClicked": i[7] || (i[7] = (b, y, Pe) => p("dsg-table:link-clicked", b, y, Pe))
1212
1212
  }, null, 8, ["data"]))
1213
1213
  ])
1214
1214
  ]),
@@ -1217,12 +1217,12 @@ You can explicitly suppress this warning by setting pagination-path="".`
1217
1217
  Y(G(g), (r, b) => ({
1218
1218
  name: b,
1219
1219
  fn: ne((y) => [
1220
- String(b) !== "dsg-field--actions" ? E(o.$slots, b, kt(be({ key: 0 }, y))) : m("", !0)
1220
+ String(b) !== "dsg-field--actions" ? E(o.$slots, b, kt(pt(y)), void 0, void 0, 0) : m("", !0)
1221
1221
  ])
1222
1222
  }))
1223
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, [
1224
+ e.hasFooter ? (s(), d("div", Sa, [
1225
+ C("div", xa, [
1226
1226
  E(o.$slots, "dsg-table--footer-left", {
1227
1227
  data: w.value,
1228
1228
  perPage: T.value
@@ -1240,7 +1240,7 @@ You can explicitly suppress this warning by setting pagination-path="".`
1240
1240
  })
1241
1241
  ])
1242
1242
  ]),
1243
- C("div", xa, [
1243
+ C("div", Da, [
1244
1244
  E(o.$slots, "dsg-table--footer-center", {
1245
1245
  data: w.value,
1246
1246
  perPage: T.value
@@ -1251,12 +1251,12 @@ You can explicitly suppress this warning by setting pagination-path="".`
1251
1251
  })
1252
1252
  ])
1253
1253
  ]),
1254
- C("div", Da, [
1254
+ C("div", $a, [
1255
1255
  E(o.$slots, "dsg-table--footer-right", {
1256
1256
  data: w.value,
1257
1257
  perPage: T.value
1258
1258
  }, () => [
1259
- A.value === !1 && e.displayPaginationInfo ? (s(), K(Ke, be({
1259
+ A.value === !1 && e.displayPaginationInfo ? (s(), K(Ke, Se({
1260
1260
  key: 0,
1261
1261
  ref: "pagination",
1262
1262
  pagination: w.value,
@@ -1272,7 +1272,7 @@ You can explicitly suppress this warning by setting pagination-path="".`
1272
1272
  ], 512)) : m("", !0)
1273
1273
  ]));
1274
1274
  }
1275
- }), Ta = { class: "dsg-table-per-page" }, Ra = /* @__PURE__ */ Z({
1275
+ }), Ra = { class: "dsg-table-per-page" }, Ma = /* @__PURE__ */ Z({
1276
1276
  __name: "DsgTablePerPage",
1277
1277
  props: {
1278
1278
  perPageOptions: { default: () => [
@@ -1288,8 +1288,8 @@ You can explicitly suppress this warning by setting pagination-path="".`
1288
1288
  const B = (u) => e.perPageOptions.find((S) => S.label === u), h = (u) => {
1289
1289
  e.perPage.perPage = u.label, e.perPage.change(u.label);
1290
1290
  };
1291
- return (u, S) => (s(), d("div", Ta, [
1292
- V(Dt, {
1291
+ return (u, S) => (s(), d("div", Ra, [
1292
+ V($t, {
1293
1293
  modelValue: B(e.perPage.perPage),
1294
1294
  "onUpdate:modelValue": h,
1295
1295
  options: e.perPageOptions,
@@ -1298,24 +1298,24 @@ You can explicitly suppress this warning by setting pagination-path="".`
1298
1298
  }, null, 8, ["modelValue", "options"])
1299
1299
  ]));
1300
1300
  }
1301
- }), Ma = $a, Ea = Qe, Ba = Ra, La = Ne, Fa = Ke, Ha = je, Aa = Ye, Ua = Ge, Na = {
1302
- DsgTable: Ma,
1303
- DsgTableActions: Ea,
1304
- DsgTablePerPage: Ba,
1305
- DsgTableFilter: La,
1306
- DsgTablePagination: Fa,
1307
- DsgTablePaginationInfo: Ha,
1308
- DsgTableSearch: Aa,
1309
- DsgTableRowHeader: Ua
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,
1306
+ DsgTablePagination: Ha,
1307
+ DsgTablePaginationInfo: Aa,
1308
+ DsgTableSearch: Ua,
1309
+ DsgTableRowHeader: Va
1310
1310
  };
1311
1311
  export {
1312
- Ma as DsgTable,
1313
- Ea as DsgTableActions,
1314
- La as DsgTableFilter,
1315
- Fa as DsgTablePagination,
1316
- Ha as DsgTablePaginationInfo,
1317
- Ba as DsgTablePerPage,
1318
- Ua as DsgTableRowHeader,
1319
- Aa as DsgTableSearch,
1320
- Na as default
1312
+ Ea as DsgTable,
1313
+ Ba as DsgTableActions,
1314
+ Fa as DsgTableFilter,
1315
+ Ha as DsgTablePagination,
1316
+ Aa as DsgTablePaginationInfo,
1317
+ La as DsgTablePerPage,
1318
+ Va as DsgTableRowHeader,
1319
+ Ua as DsgTableSearch,
1320
+ Ka as default
1321
1321
  };