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