@shifl-inc/ui 0.4.0 → 0.6.0

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.
package/dist/shifl-ui.js CHANGED
@@ -1,508 +1,515 @@
1
- import { ref as k, computed as b, onMounted as le, onUnmounted as ue, watch as O, nextTick as Le, defineComponent as xe, createElementBlock as u, openBlock as a, withModifiers as J, createElementVNode as h, createCommentVNode as D, createTextVNode as ee, toDisplayString as L, Fragment as x, renderList as H, normalizeClass as I, createBlock as G, Teleport as Ae, normalizeStyle as j, createVNode as Pe, unref as E, resolveDynamicComponent as ae, createStaticVNode as Ht, provide as Vt, inject as Bt } from "vue";
2
- function It(o) {
3
- const s = (o.columns || []).map((_) => ({
1
+ import { ref as b, computed as k, onMounted as de, onUnmounted as ge, watch as j, nextTick as He, defineComponent as De, createElementBlock as l, openBlock as o, withModifiers as q, createElementVNode as h, createCommentVNode as D, createTextVNode as re, toDisplayString as $, Fragment as R, renderList as V, normalizeClass as G, createBlock as Z, Teleport as ze, normalizeStyle as K, createVNode as Re, unref as E, resolveDynamicComponent as fe, createStaticVNode as Ft, provide as Kt, inject as Wt } from "vue";
2
+ function Jt(a) {
3
+ const r = (a.columns || []).map((_) => ({
4
4
  ..._,
5
5
  freeze: _.freeze ?? !1,
6
6
  visible: _.visible ?? !0,
7
7
  protected: _.protected ?? !1
8
- })), g = o.apiConfig ? "server" : o.searchMode || "client";
8
+ })), d = a.apiConfig ? "server" : a.searchMode || "client";
9
9
  return {
10
- ...o,
11
- columns: s,
12
- rows: o.rows ?? [],
13
- search: o.search ?? [],
14
- searchMode: g,
15
- filters: o.filters ?? [],
16
- paginationMeta: o.paginationMeta ? {
17
- show: o.paginationMeta.show ?? !0,
18
- currentPage: o.paginationMeta.currentPage ?? 1,
19
- perPage: o.paginationMeta.perPage ?? 20,
20
- total: o.paginationMeta.total ?? 0,
21
- from: o.paginationMeta.from,
22
- to: o.paginationMeta.to,
23
- ...o.paginationMeta
10
+ ...a,
11
+ columns: r,
12
+ rows: a.rows ?? [],
13
+ search: a.search ?? [],
14
+ searchMode: d,
15
+ filters: a.filters ?? [],
16
+ paginationMeta: a.paginationMeta ? {
17
+ show: a.paginationMeta.show ?? !0,
18
+ currentPage: a.paginationMeta.currentPage ?? 1,
19
+ perPage: a.paginationMeta.perPage ?? 20,
20
+ total: a.paginationMeta.total ?? 0,
21
+ from: a.paginationMeta.from,
22
+ to: a.paginationMeta.to,
23
+ ...a.paginationMeta
24
24
  } : void 0
25
25
  };
26
26
  }
27
- function Gt(o) {
28
- const s = [...o], g = k([...o]);
29
- function _(d) {
30
- g.value = g.value.map(
31
- (f) => f.key === d ? { ...f, visible: !f.visible } : f
27
+ function qt(a) {
28
+ const r = [...a], d = b([...a]);
29
+ function _(p) {
30
+ d.value = d.value.map(
31
+ (u) => u.key === p ? { ...u, visible: !u.visible } : u
32
32
  );
33
33
  }
34
- function c(d) {
35
- g.value = g.value.map((f) => ({ ...f, visible: d }));
34
+ function f(p) {
35
+ d.value = d.value.map((u) => ({ ...u, visible: p }));
36
36
  }
37
- function v(d) {
38
- const f = g.value.map(
39
- (C) => C.key === d ? { ...C, freeze: !C.freeze } : C
40
- ), p = f.filter((C) => C.freeze), $ = f.filter((C) => !C.freeze);
41
- g.value = [...p, ...$];
37
+ function v(p) {
38
+ const u = d.value.map(
39
+ (w) => w.key === p ? { ...w, freeze: !w.freeze } : w
40
+ ), m = u.filter((w) => w.freeze), S = u.filter((w) => !w.freeze);
41
+ d.value = [...m, ...S];
42
42
  }
43
- function M(d, f) {
44
- if (d === f || f < 0 || f >= g.value.length) return;
45
- const p = g.value.findIndex((m) => !m.freeze), $ = p === -1 ? g.value.length : p;
46
- if (d < $ || f < $) return;
47
- const C = [...g.value], [l] = C.splice(d, 1);
48
- C.splice(f, 0, l), g.value = C;
43
+ function T(p, u) {
44
+ if (p === u || u < 0 || u >= d.value.length) return;
45
+ const m = d.value.findIndex((g) => !g.freeze), S = m === -1 ? d.value.length : m;
46
+ if (p < S || u < S) return;
47
+ const w = [...d.value], [c] = w.splice(p, 1);
48
+ w.splice(u, 0, c), d.value = w;
49
49
  }
50
- function T() {
51
- g.value = [...s];
50
+ function P() {
51
+ d.value = [...r];
52
52
  }
53
- const w = b(() => g.value.filter((d) => d.visible));
53
+ const M = k(() => d.value.filter((p) => p.visible));
54
54
  return {
55
- columns: g,
56
- visibleColumns: w,
55
+ columns: d,
56
+ visibleColumns: M,
57
57
  toggleColumnVisibility: _,
58
- setAllVisible: c,
58
+ setAllVisible: f,
59
59
  toggleFreeze: v,
60
- moveColumn: M,
61
- resetColumns: T
60
+ moveColumn: T,
61
+ resetColumns: P
62
62
  };
63
63
  }
64
- function Zt(o) {
65
- const s = k(o);
66
- function g(c) {
64
+ function Ut(a) {
65
+ const r = b(a);
66
+ function d(f) {
67
67
  var v;
68
- s.value = ((v = s.value) == null ? void 0 : v.key) === c && s.value.order === "asc" ? { key: c, order: "desc" } : { key: c, order: "asc" };
68
+ r.value = ((v = r.value) == null ? void 0 : v.key) === f && r.value.order === "asc" ? { key: f, order: "desc" } : { key: f, order: "asc" };
69
69
  }
70
- function _(c) {
71
- if (!s.value) return c;
72
- const { key: v, order: M } = s.value;
73
- return [...c].sort((T, w) => {
74
- const d = T[v], f = w[v];
75
- if (d === f) return 0;
76
- if (d == null) return 1;
77
- if (f == null) return -1;
78
- const p = String(d).localeCompare(String(f), void 0, {
70
+ function _(f) {
71
+ if (!r.value) return f;
72
+ const { key: v, order: T } = r.value;
73
+ return [...f].sort((P, M) => {
74
+ const p = P[v], u = M[v];
75
+ if (p === u) return 0;
76
+ if (p == null) return 1;
77
+ if (u == null) return -1;
78
+ const m = String(p).localeCompare(String(u), void 0, {
79
79
  numeric: !0
80
80
  });
81
- return M === "asc" ? p : -p;
81
+ return T === "asc" ? m : -m;
82
82
  });
83
83
  }
84
84
  return {
85
- sort: s,
86
- setSort: g,
85
+ sort: r,
86
+ setSort: d,
87
87
  applySort: _
88
88
  };
89
89
  }
90
- function Ot() {
91
- function o(s, g, _) {
92
- const c = (_ || "").trim().toLowerCase();
93
- return c ? s.filter((v) => (g && g.length ? g.map((T) => v[T]) : Object.values(v)).some(
94
- (T) => String(T ?? "").toLowerCase().includes(c)
95
- )) : s;
90
+ function Yt() {
91
+ function a(r, d, _) {
92
+ const f = (_ || "").trim().toLowerCase();
93
+ return f ? r.filter((v) => (d && d.length ? d.map((P) => v[P]) : Object.values(v)).some(
94
+ (P) => String(P ?? "").toLowerCase().includes(f)
95
+ )) : r;
96
96
  }
97
97
  return {
98
- applyGlobalFilter: o
98
+ applyGlobalFilter: a
99
99
  };
100
100
  }
101
- function Ft() {
102
- const o = k({
101
+ function Qt() {
102
+ const a = b({
103
103
  rowIndex: null,
104
104
  position: null
105
105
  });
106
- function s(v, M, T = 200) {
107
- const w = M.getBoundingClientRect();
108
- let d = w.left;
109
- d + T > window.innerWidth - 8 && (d = window.innerWidth - T + 8), o.value = {
106
+ function r(v, T, P = 200) {
107
+ const M = T.getBoundingClientRect();
108
+ let p = M.left;
109
+ p + P > window.innerWidth - 8 && (p = window.innerWidth - P + 8), a.value = {
110
110
  rowIndex: v,
111
111
  position: {
112
- top: w.bottom,
112
+ top: M.bottom,
113
113
  // 4px below trigger
114
- left: d
114
+ left: p
115
115
  }
116
116
  };
117
117
  }
118
- function g() {
119
- o.value = {
118
+ function d() {
119
+ a.value = {
120
120
  rowIndex: null,
121
121
  position: null
122
122
  };
123
123
  }
124
124
  function _(v) {
125
- return o.value.rowIndex === v;
125
+ return a.value.rowIndex === v;
126
126
  }
127
- function c(v) {
128
- v.key === "Escape" && o.value.rowIndex !== null && g();
127
+ function f(v) {
128
+ v.key === "Escape" && a.value.rowIndex !== null && d();
129
129
  }
130
- return le(() => {
131
- document.addEventListener("keydown", c);
132
- }), ue(() => {
133
- document.removeEventListener("keydown", c);
130
+ return de(() => {
131
+ document.addEventListener("keydown", f);
132
+ }), ge(() => {
133
+ document.removeEventListener("keydown", f);
134
134
  }), {
135
- menuState: o,
136
- openMenu: s,
137
- closeMenu: g,
135
+ menuState: a,
136
+ openMenu: r,
137
+ closeMenu: d,
138
138
  isMenuOpen: _
139
139
  };
140
140
  }
141
- function jt(o, s) {
142
- const g = k(!1), _ = k(null), c = k([]), v = k(void 0);
143
- let M = null;
144
- function T(l) {
145
- const m = new URLSearchParams();
146
- if (l.search && m.append("search", l.search), l.page !== void 0 && m.append("page", String(l.page)), l.perPage !== void 0 && m.append("per_page", String(l.perPage)), l.sort && (m.append("sort", l.sort.key), m.append("order", l.sort.order)), l.filters && l.filters.length > 0 && l.filters.forEach((S) => {
147
- if (S.value !== void 0 && S.value !== null && S.value !== "") {
148
- const N = `filters[${S.key}]`;
149
- Array.isArray(S.value) ? S.value.forEach((P) => m.append(`${N}[]`, String(P))) : m.append(N, String(S.value));
141
+ function Xt(a, r) {
142
+ const d = b(!1), _ = b(null), f = b([]), v = b(void 0);
143
+ let T = null;
144
+ function P(c) {
145
+ const g = new URLSearchParams();
146
+ if (c.search && g.append("search", c.search), c.page !== void 0 && g.append("page", String(c.page)), c.perPage !== void 0 && g.append("per_page", String(c.perPage)), c.sort && (g.append("sort", c.sort.key), g.append("order", c.sort.order)), c.filters && c.filters.length > 0 && c.filters.forEach((C) => {
147
+ if (C.value !== void 0 && C.value !== null && C.value !== "") {
148
+ const L = `filters[${C.key}]`;
149
+ Array.isArray(C.value) ? C.value.forEach((A) => g.append(`${L}[]`, String(A))) : g.append(L, String(C.value));
150
150
  }
151
- }), s != null && s.additionalParams) {
152
- const S = typeof s.additionalParams == "function" ? s.additionalParams(l) : s.additionalParams;
153
- Object.entries(S).forEach(([N, P]) => {
154
- P != null && P !== "" && (Array.isArray(P) ? P.forEach((R) => m.append(`${N}[]`, String(R))) : m.append(N, String(P)));
151
+ }), c.tabName && g.append("tabName", c.tabName), r != null && r.additionalParams) {
152
+ const C = typeof r.additionalParams == "function" ? r.additionalParams(c) : r.additionalParams;
153
+ Object.entries(C).forEach(([L, A]) => {
154
+ A != null && A !== "" && (Array.isArray(A) ? A.forEach((N) => g.append(`${L}[]`, String(N))) : g.append(L, String(A)));
155
155
  });
156
156
  }
157
- return m;
157
+ return g;
158
158
  }
159
- function w(l) {
160
- var m, S, N;
161
- return s != null && s.bodyBuilder ? s.bodyBuilder(l) : {
162
- search: l.search,
163
- page: l.page,
164
- per_page: l.perPage,
165
- sort: (m = l.sort) == null ? void 0 : m.key,
166
- order: (S = l.sort) == null ? void 0 : S.order,
167
- filters: (N = l.filters) == null ? void 0 : N.reduce(
168
- (P, R) => (R.value !== void 0 && R.value !== null && R.value !== "" && (P[R.key] = R.value), P),
159
+ function M(c) {
160
+ var g, C, L;
161
+ return r != null && r.bodyBuilder ? r.bodyBuilder(c) : {
162
+ search: c.search,
163
+ page: c.page,
164
+ per_page: c.perPage,
165
+ sort: (g = c.sort) == null ? void 0 : g.key,
166
+ order: (C = c.sort) == null ? void 0 : C.order,
167
+ tabName: c.tabName,
168
+ filters: (L = c.filters) == null ? void 0 : L.reduce(
169
+ (A, N) => (N.value !== void 0 && N.value !== null && N.value !== "" && (A[N.key] = N.value), A),
169
170
  {}
170
171
  ),
171
- ...typeof (s == null ? void 0 : s.additionalParams) == "function" ? s.additionalParams(l) : (s == null ? void 0 : s.additionalParams) || {}
172
+ ...typeof (r == null ? void 0 : r.additionalParams) == "function" ? r.additionalParams(c) : (r == null ? void 0 : r.additionalParams) || {}
172
173
  };
173
174
  }
174
- function d() {
175
- const l = {
175
+ function p() {
176
+ const c = {
176
177
  "Content-Type": "application/json",
177
- ...(s == null ? void 0 : s.headers) || {}
178
+ ...(r == null ? void 0 : r.headers) || {}
178
179
  };
179
- if (s != null && s.getAuthToken) {
180
- const m = s.getAuthToken();
181
- m && (l.Authorization = `Bearer ${m}`);
180
+ if (r != null && r.getAuthToken) {
181
+ const g = r.getAuthToken();
182
+ g && (c.Authorization = `Bearer ${g}`);
182
183
  }
183
- return l;
184
+ return c;
184
185
  }
185
- function f(l) {
186
- if (s != null && s.responseTransformer)
187
- return s.responseTransformer(l);
188
- const m = l;
186
+ function u(c) {
187
+ if (r != null && r.responseTransformer)
188
+ return r.responseTransformer(c);
189
+ const g = c;
189
190
  return {
190
- data: m.data || m.rows || [],
191
- meta: m.meta
191
+ data: g.data || g.rows || [],
192
+ meta: g.meta
192
193
  };
193
194
  }
194
- async function p(l) {
195
- if (!o) {
195
+ async function m(c) {
196
+ if (!a) {
196
197
  _.value = new Error("API URL is required");
197
198
  return;
198
199
  }
199
- g.value = !0, _.value = null;
200
+ d.value = !0, _.value = null;
200
201
  try {
201
- const m = (s == null ? void 0 : s.method) || "GET", S = d();
202
- let N = o, P;
203
- if (m === "GET") {
204
- const V = s != null && s.paramsBuilder ? s.paramsBuilder(l) : T(l);
205
- if (V instanceof URLSearchParams) {
206
- const F = V.toString();
207
- N = F ? `${o}?${F}` : o;
202
+ const g = (r == null ? void 0 : r.method) || "GET", C = p();
203
+ let L = a, A;
204
+ if (g === "GET") {
205
+ const ee = r != null && r.paramsBuilder ? r.paramsBuilder(c) : P(c);
206
+ if (ee instanceof URLSearchParams) {
207
+ const H = ee.toString();
208
+ L = H ? `${a}?${H}` : a;
208
209
  } else {
209
- const F = new URLSearchParams();
210
- Object.entries(V).forEach(([Y, Z]) => {
211
- Z != null && Z !== "" && (Array.isArray(Z) ? Z.forEach((ne) => F.append(`${Y}[]`, String(ne))) : F.append(Y, String(Z)));
210
+ const H = new URLSearchParams();
211
+ Object.entries(ee).forEach(([Y, I]) => {
212
+ I != null && I !== "" && (Array.isArray(I) ? I.forEach((ae) => H.append(`${Y}[]`, String(ae))) : H.append(Y, String(I)));
212
213
  });
213
- const U = F.toString();
214
- N = U ? `${o}?${U}` : o;
214
+ const ie = H.toString();
215
+ L = ie ? `${a}?${ie}` : a;
215
216
  }
216
217
  } else
217
- P = w(l);
218
- const R = await fetch(N, {
219
- method: m,
220
- headers: S,
221
- body: P ? JSON.stringify(P) : void 0
218
+ A = M(c);
219
+ const N = await fetch(L, {
220
+ method: g,
221
+ headers: C,
222
+ body: A ? JSON.stringify(A) : void 0
222
223
  });
223
- if (!R.ok)
224
- throw new Error(`API request failed: ${R.status} ${R.statusText}`);
225
- const ce = await R.json(), te = f(ce);
226
- c.value = te.data, v.value = te.meta;
227
- } catch (m) {
228
- _.value = m instanceof Error ? m : new Error("Unknown error occurred"), c.value = [], v.value = void 0;
224
+ if (!N.ok)
225
+ throw new Error(`API request failed: ${N.status} ${N.statusText}`);
226
+ const he = await N.json(), se = u(he);
227
+ f.value = se.data, v.value = se.meta;
228
+ } catch (g) {
229
+ _.value = g instanceof Error ? g : new Error("Unknown error occurred"), f.value = [], v.value = void 0;
229
230
  } finally {
230
- g.value = !1;
231
+ d.value = !1;
231
232
  }
232
233
  }
233
- function $(l, m = !1) {
234
- M && (clearTimeout(M), M = null);
235
- const S = (s == null ? void 0 : s.debounceMs) ?? 300;
236
- m || !l.search ? p(l) : M = setTimeout(() => {
237
- p(l);
238
- }, S);
234
+ function S(c, g = !1) {
235
+ T && (clearTimeout(T), T = null);
236
+ const C = (r == null ? void 0 : r.debounceMs) ?? 300;
237
+ g || !c.search ? m(c) : T = setTimeout(() => {
238
+ m(c);
239
+ }, C);
239
240
  }
240
- function C(l) {
241
- $(l, !0);
241
+ function w(c) {
242
+ S(c, !0);
242
243
  }
243
244
  return {
244
- loading: b(() => g.value),
245
- error: b(() => _.value),
246
- data: b(() => c.value),
247
- paginationMeta: b(() => v.value),
248
- fetchData: p,
249
- fetchDataDebounced: $,
250
- refresh: C
245
+ loading: k(() => d.value),
246
+ error: k(() => _.value),
247
+ data: k(() => f.value),
248
+ paginationMeta: k(() => v.value),
249
+ fetchData: m,
250
+ fetchDataDebounced: S,
251
+ refresh: w
251
252
  };
252
253
  }
253
- function Wt(o, s) {
254
- var T, w;
255
- const g = (s == null ? void 0 : s.search) || k(void 0), _ = (s == null ? void 0 : s.filters) || k(o.filters), c = (s == null ? void 0 : s.sort) || k(o.sort), v = (s == null ? void 0 : s.pagination) || k({
256
- page: ((T = o.paginationMeta) == null ? void 0 : T.currentPage) || 1,
257
- perPage: ((w = o.paginationMeta) == null ? void 0 : w.perPage) || 20
258
- }), M = (s == null ? void 0 : s.extraState) || k(void 0);
259
- if (o.apiConfig && o.searchMode === "server") {
260
- let d = function() {
261
- var l, m;
254
+ function en(a, r) {
255
+ var M, p;
256
+ const d = (r == null ? void 0 : r.search) || b(void 0), _ = (r == null ? void 0 : r.filters) || b(a.filters), f = (r == null ? void 0 : r.sort) || b(a.sort), v = (r == null ? void 0 : r.pagination) || b({
257
+ page: ((M = a.paginationMeta) == null ? void 0 : M.currentPage) || 1,
258
+ perPage: ((p = a.paginationMeta) == null ? void 0 : p.perPage) || 20
259
+ }), T = (r == null ? void 0 : r.extraState) || b(void 0), P = (r == null ? void 0 : r.tabName) || b(void 0);
260
+ if (a.apiConfig && a.searchMode === "server") {
261
+ let u = function() {
262
+ var g, C;
262
263
  return {
263
- search: g.value,
264
+ search: d.value,
264
265
  filters: _.value,
265
- sort: c.value,
266
- page: (l = v.value) == null ? void 0 : l.page,
267
- perPage: (m = v.value) == null ? void 0 : m.perPage,
268
- extraState: M.value
266
+ sort: f.value,
267
+ page: (g = v.value) == null ? void 0 : g.page,
268
+ perPage: (C = v.value) == null ? void 0 : C.perPage,
269
+ extraState: T.value,
270
+ tabName: P.value
269
271
  };
270
- }, f = function(l) {
271
- var m, S, N, P;
272
- return C ? l.search !== C.search || l.page !== C.page || l.perPage !== C.perPage || ((m = l.sort) == null ? void 0 : m.key) !== ((S = C.sort) == null ? void 0 : S.key) || ((N = l.sort) == null ? void 0 : N.order) !== ((P = C.sort) == null ? void 0 : P.order) || JSON.stringify(l.filters) !== JSON.stringify(C.filters) || JSON.stringify(l.extraState) !== JSON.stringify(C.extraState) : !0;
272
+ }, m = function(g) {
273
+ var C, L, A, N;
274
+ return c ? g.search !== c.search || g.page !== c.page || g.perPage !== c.perPage || g.tabName !== c.tabName || ((C = g.sort) == null ? void 0 : C.key) !== ((L = c.sort) == null ? void 0 : L.key) || ((A = g.sort) == null ? void 0 : A.order) !== ((N = c.sort) == null ? void 0 : N.order) || JSON.stringify(g.filters) !== JSON.stringify(c.filters) || JSON.stringify(g.extraState) !== JSON.stringify(c.extraState) : !0;
273
275
  };
274
- const p = jt(o.apiConfig.apiUrl, o.apiConfig);
275
- let $ = !1, C = null;
276
- return O(
277
- [g, _, c, v, M],
276
+ const S = Xt(a.apiConfig.apiUrl, a.apiConfig);
277
+ let w = !1, c = null;
278
+ return j(
279
+ [d, _, f, v, T, P],
278
280
  () => {
279
- if ($)
281
+ if (w)
280
282
  return;
281
- const l = d();
282
- if (!f(l))
283
+ const g = u();
284
+ if (!m(g))
283
285
  return;
284
- C = l;
285
- const m = g.value !== void 0;
286
- p.fetchDataDebounced(l, !m);
286
+ c = g;
287
+ const C = d.value !== void 0;
288
+ S.fetchDataDebounced(g, !C);
287
289
  },
288
290
  { immediate: !0, deep: !0 }
289
- ), O(p.paginationMeta, (l) => {
290
- if (l && v.value) {
291
- const m = l.perPage || v.value.perPage;
292
- m !== v.value.perPage && ($ = !0, v.value.perPage = m, Le(() => {
293
- $ = !1;
291
+ ), j(S.paginationMeta, (g) => {
292
+ if (g && v.value) {
293
+ const C = g.perPage || v.value.perPage;
294
+ C !== v.value.perPage && (w = !0, v.value.perPage = C, He(() => {
295
+ w = !1;
294
296
  }));
295
297
  }
296
298
  }), {
297
- rows: p.data,
298
- loading: p.loading,
299
- error: p.error,
300
- paginationMeta: p.paginationMeta,
299
+ rows: S.data,
300
+ loading: S.loading,
301
+ error: S.error,
302
+ paginationMeta: S.paginationMeta,
301
303
  refresh: () => {
302
- var m, S;
303
- const l = {
304
- search: g.value,
304
+ var C, L;
305
+ const g = {
306
+ search: d.value,
305
307
  filters: _.value,
306
- sort: c.value,
307
- page: (m = v.value) == null ? void 0 : m.page,
308
- perPage: (S = v.value) == null ? void 0 : S.perPage,
309
- extraState: M.value
308
+ sort: f.value,
309
+ page: (C = v.value) == null ? void 0 : C.page,
310
+ perPage: (L = v.value) == null ? void 0 : L.perPage,
311
+ extraState: T.value,
312
+ tabName: P.value
310
313
  };
311
- p.refresh(l);
314
+ S.refresh(g);
312
315
  }
313
316
  };
314
317
  }
315
318
  return {
316
- rows: b(() => o.rows),
317
- loading: b(() => !1),
318
- error: b(() => null),
319
- paginationMeta: b(() => o.paginationMeta),
319
+ rows: k(() => a.rows),
320
+ loading: k(() => !1),
321
+ error: k(() => null),
322
+ paginationMeta: k(() => a.paginationMeta),
320
323
  refresh: () => {
321
324
  }
322
325
  };
323
326
  }
324
- const Kt = { class: "shifl-column-manager__header" }, Jt = { class: "shifl-column-manager__title-wrapper" }, qt = { class: "shifl-column-manager__title" }, Ut = { key: 0 }, Yt = { key: 1 }, Qt = { class: "shifl-column-manager__controls" }, Xt = { class: "shifl-column-manager__controls-left" }, en = { class: "shifl-column-manager__content" }, tn = { class: "shifl-column-manager__list" }, nn = ["draggable", "onDragstart", "onDragover", "onDrop"], rn = ["aria-label", "disabled"], sn = ["checked", "disabled", "onChange"], on = { class: "shifl-column-manager__label-text" }, an = { class: "shifl-column-manager__footer" }, ln = /* @__PURE__ */ xe({
327
+ const tn = { class: "shifl-column-manager__header" }, nn = { class: "shifl-column-manager__title-wrapper" }, rn = { class: "shifl-column-manager__title" }, sn = { key: 0 }, an = { key: 1 }, on = { class: "shifl-column-manager__controls" }, ln = { class: "shifl-column-manager__controls-left" }, un = { class: "shifl-column-manager__content" }, cn = { class: "shifl-column-manager__list" }, fn = ["draggable", "onDragstart", "onDragover", "onDrop"], dn = ["aria-label", "disabled"], gn = ["checked", "disabled", "onChange"], hn = { class: "shifl-column-manager__label-text" }, pn = { class: "shifl-column-manager__footer" }, mn = /* @__PURE__ */ De({
325
328
  __name: "GridColumnManager",
326
329
  props: {
327
330
  titlePrefix: {},
328
331
  columns: {}
329
332
  },
330
333
  emits: ["close", "toggle", "move", "toggleFreeze", "selectAll", "deselectAll", "restoreDefault"],
331
- setup(o, { emit: s }) {
332
- const g = o, _ = b(() => g.columns), c = s, v = k(null);
333
- function M(d) {
334
- var f, p;
335
- (f = g.columns[d]) != null && f.freeze || (p = g.columns[d]) != null && p.protected || (v.value = d);
334
+ setup(a, { emit: r }) {
335
+ const d = a, _ = k(() => d.columns), f = r, v = b(null);
336
+ function T(p) {
337
+ var u, m;
338
+ (u = d.columns[p]) != null && u.freeze || (m = d.columns[p]) != null && m.protected || (v.value = p);
336
339
  }
337
- function T(d) {
340
+ function P(p) {
338
341
  }
339
- function w(d) {
340
- v.value === null || v.value === d || (c("move", v.value, d), v.value = null);
342
+ function M(p) {
343
+ v.value === null || v.value === p || (f("move", v.value, p), v.value = null);
341
344
  }
342
- return (d, f) => (a(), u("div", {
345
+ return (p, u) => (o(), l("div", {
343
346
  class: "shifl-column-manager__backdrop",
344
- onClick: f[7] || (f[7] = J((p) => d.$emit("close"), ["self"]))
347
+ onClick: u[7] || (u[7] = q((m) => p.$emit("close"), ["self"]))
345
348
  }, [
346
349
  h("div", {
347
350
  class: "shifl-column-manager__dialog",
348
351
  role: "dialog",
349
352
  "aria-modal": "true",
350
- onClick: f[6] || (f[6] = J(() => {
353
+ onClick: u[6] || (u[6] = q(() => {
351
354
  }, ["stop"]))
352
355
  }, [
353
- h("header", Kt, [
354
- h("div", Jt, [
355
- h("h2", qt, [
356
- o.titlePrefix ? (a(), u("span", Ut, L(o.titlePrefix), 1)) : D("", !0),
357
- o.titlePrefix ? (a(), u("span", Yt, ">")) : D("", !0),
358
- f[8] || (f[8] = ee("Edit Columns ", -1))
356
+ h("header", tn, [
357
+ h("div", nn, [
358
+ h("h2", rn, [
359
+ a.titlePrefix ? (o(), l("span", sn, $(a.titlePrefix), 1)) : D("", !0),
360
+ a.titlePrefix ? (o(), l("span", an, ">")) : D("", !0),
361
+ u[8] || (u[8] = re("Edit Columns ", -1))
359
362
  ])
360
363
  ]),
361
364
  h("button", {
362
365
  type: "button",
363
366
  class: "shifl-column-manager__close",
364
- onClick: f[0] || (f[0] = (p) => d.$emit("close"))
365
- }, [...f[9] || (f[9] = [
367
+ onClick: u[0] || (u[0] = (m) => p.$emit("close"))
368
+ }, [...u[9] || (u[9] = [
366
369
  h("span", null, "✕", -1)
367
370
  ])])
368
371
  ]),
369
- h("div", Qt, [
370
- h("div", Xt, [
372
+ h("div", on, [
373
+ h("div", ln, [
371
374
  h("button", {
372
375
  type: "button",
373
376
  class: "shifl-column-manager__link-button",
374
- onClick: f[1] || (f[1] = (p) => d.$emit("selectAll"))
377
+ onClick: u[1] || (u[1] = (m) => p.$emit("selectAll"))
375
378
  }, " Select All "),
376
379
  h("button", {
377
380
  type: "button",
378
381
  class: "shifl-column-manager__link-button",
379
- onClick: f[2] || (f[2] = (p) => d.$emit("deselectAll"))
382
+ onClick: u[2] || (u[2] = (m) => p.$emit("deselectAll"))
380
383
  }, " Deselect All ")
381
384
  ]),
382
385
  h("button", {
383
386
  type: "button",
384
387
  class: "shifl-column-manager__link-button shifl-column-manager__link-button--primary",
385
- onClick: f[3] || (f[3] = (p) => d.$emit("restoreDefault"))
388
+ onClick: u[3] || (u[3] = (m) => p.$emit("restoreDefault"))
386
389
  }, " Restore Default ")
387
390
  ]),
388
- h("div", en, [
389
- h("ul", tn, [
390
- (a(!0), u(x, null, H(_.value, (p, $) => (a(), u("li", {
391
- key: p.key,
392
- class: I(["shifl-column-manager__item", {
393
- "shifl-column-manager__item--disabled": p.freeze || p.protected
391
+ h("div", un, [
392
+ h("ul", cn, [
393
+ (o(!0), l(R, null, V(_.value, (m, S) => (o(), l("li", {
394
+ key: m.key,
395
+ class: G(["shifl-column-manager__item", {
396
+ "shifl-column-manager__item--disabled": m.freeze || m.protected
394
397
  }]),
395
- draggable: !p.freeze && !p.protected,
396
- onDragstart: (C) => M($),
397
- onDragover: J((C) => void 0, ["prevent"]),
398
- onDrop: J((C) => w($), ["prevent"])
398
+ draggable: !m.freeze && !m.protected,
399
+ onDragstart: (w) => T(S),
400
+ onDragover: q((w) => void 0, ["prevent"]),
401
+ onDrop: q((w) => M(S), ["prevent"])
399
402
  }, [
400
403
  h("button", {
401
404
  type: "button",
402
- class: I(["shifl-column-manager__drag-handle", {
403
- "shifl-column-manager__drag-handle--disabled": p.freeze || p.protected
405
+ class: G(["shifl-column-manager__drag-handle", {
406
+ "shifl-column-manager__drag-handle--disabled": m.freeze || m.protected
404
407
  }]),
405
- "aria-label": `Move ${p.label}`,
406
- disabled: p.freeze || p.protected
407
- }, [...f[10] || (f[10] = [
408
+ "aria-label": `Move ${m.label}`,
409
+ disabled: m.freeze || m.protected
410
+ }, [...u[10] || (u[10] = [
408
411
  h("span", null, "⋮⋮", -1)
409
- ])], 10, rn),
412
+ ])], 10, dn),
410
413
  h("label", {
411
- class: I(["shifl-column-manager__checkbox-label", {
412
- "shifl-column-manager__checkbox-label--disabled": p.freeze || p.protected
414
+ class: G(["shifl-column-manager__checkbox-label", {
415
+ "shifl-column-manager__checkbox-label--disabled": m.freeze || m.protected
413
416
  }])
414
417
  }, [
415
418
  h("input", {
416
419
  type: "checkbox",
417
420
  class: "shifl-column-manager__checkbox",
418
- checked: p.visible,
419
- disabled: p.freeze || p.protected,
420
- onChange: (C) => d.$emit("toggle", p.key)
421
- }, null, 40, sn),
422
- f[11] || (f[11] = h("span", { class: "shifl-column-manager__checkbox-custom" }, null, -1)),
423
- h("span", on, L(p.label), 1)
421
+ checked: m.visible,
422
+ disabled: m.freeze || m.protected,
423
+ onChange: (w) => p.$emit("toggle", m.key)
424
+ }, null, 40, gn),
425
+ u[11] || (u[11] = h("span", { class: "shifl-column-manager__checkbox-custom" }, null, -1)),
426
+ h("span", hn, $(m.label), 1)
424
427
  ], 2)
425
- ], 42, nn))), 128))
428
+ ], 42, fn))), 128))
426
429
  ])
427
430
  ]),
428
- h("footer", an, [
431
+ h("footer", pn, [
429
432
  h("button", {
430
433
  type: "button",
431
434
  class: "shifl-column-manager__button shifl-column-manager__button--primary",
432
- onClick: f[4] || (f[4] = (p) => d.$emit("close"))
435
+ onClick: u[4] || (u[4] = (m) => p.$emit("close"))
433
436
  }, " Update "),
434
437
  h("button", {
435
438
  type: "button",
436
439
  class: "shifl-column-manager__button shifl-column-manager__button--secondary",
437
- onClick: f[5] || (f[5] = (p) => d.$emit("close"))
440
+ onClick: u[5] || (u[5] = (m) => p.$emit("close"))
438
441
  }, " Cancel ")
439
442
  ])
440
443
  ])
441
444
  ]));
442
445
  }
443
- }), q = (o, s) => {
444
- const g = o.__vccOpts || o;
445
- for (const [_, c] of s)
446
- g[_] = c;
447
- return g;
448
- }, un = /* @__PURE__ */ q(ln, [["__scopeId", "data-v-40ca0ed0"]]), cn = { class: "shifl-grid__tooltip-content" }, fn = /* @__PURE__ */ xe({
446
+ }), U = (a, r) => {
447
+ const d = a.__vccOpts || a;
448
+ for (const [_, f] of r)
449
+ d[_] = f;
450
+ return d;
451
+ }, vn = /* @__PURE__ */ U(mn, [["__scopeId", "data-v-40ca0ed0"]]), _n = { class: "shifl-grid__tooltip-content" }, yn = ["innerHTML"], bn = /* @__PURE__ */ De({
449
452
  __name: "GridTooltip",
450
453
  props: {
451
454
  content: {},
452
455
  visible: { type: Boolean },
453
- triggerElement: {}
456
+ triggerElement: {},
457
+ isHtml: { type: Boolean }
454
458
  },
455
- setup(o) {
456
- const s = o, g = k(null), _ = k({}), c = b(() => s.content.includes(`
457
- `)), v = b(() => c.value ? s.content.split(`
458
- `).filter((d) => d.trim().length > 0) : []), M = k("top"), T = k({});
459
- function w() {
460
- if (!s.triggerElement || !g.value) return;
461
- const d = s.triggerElement.getBoundingClientRect(), f = g.value.getBoundingClientRect(), p = window.innerWidth, $ = window.innerHeight;
462
- let C = d.bottom + 8, l = d.left + window.scrollX;
463
- l + f.width > p - 16 && (l = p - f.width - 16), l < 16 && (l = 16), C + f.height > $ - 16 ? (C = d.top - f.height - 8, M.value = "bottom") : M.value = "top", _.value = {
459
+ setup(a) {
460
+ const r = a, d = b(null), _ = b({}), f = k(() => r.content.includes(`
461
+ `)), v = k(() => f.value ? r.content.split(`
462
+ `).filter((p) => p.trim().length > 0) : []), T = b("top"), P = b({});
463
+ function M() {
464
+ if (!r.triggerElement || !d.value) return;
465
+ const p = r.triggerElement.getBoundingClientRect(), u = d.value.getBoundingClientRect(), m = window.innerWidth, S = window.innerHeight;
466
+ let w = p.bottom + 8, c = p.left + window.scrollX;
467
+ c + u.width > m - 16 && (c = m - u.width - 16), c < 16 && (c = 16), w + u.height > S - 16 ? (w = p.top - u.height - 8, T.value = "bottom") : T.value = "top", _.value = {
464
468
  position: "fixed",
465
- top: `${C}px`,
466
- left: `${l}px`,
469
+ top: `${w}px`,
470
+ left: `${c}px`,
467
471
  zIndex: "10000"
468
472
  };
469
- const m = d.left + d.width / 2 - l;
470
- T.value = {
471
- left: `${m}px`
473
+ const g = p.left + p.width / 2 - c;
474
+ P.value = {
475
+ left: `${g}px`
472
476
  };
473
477
  }
474
- return O(
475
- () => s.visible,
476
- async (d) => {
477
- d && (await Le(), w());
478
+ return j(
479
+ () => r.visible,
480
+ async (p) => {
481
+ p && (await He(), M());
478
482
  }
479
- ), le(() => {
480
- s.visible && Le(() => w());
481
- }), ue(() => {
482
- }), (d, f) => (a(), G(Ae, { to: "body" }, [
483
- o.visible ? (a(), u("div", {
483
+ ), de(() => {
484
+ r.visible && He(() => M());
485
+ }), ge(() => {
486
+ }), (p, u) => (o(), Z(ze, { to: "body" }, [
487
+ a.visible ? (o(), l("div", {
484
488
  key: 0,
485
489
  ref_key: "tooltipRef",
486
- ref: g,
490
+ ref: d,
487
491
  class: "shifl-grid__tooltip",
488
- style: j(_.value)
492
+ style: K(_.value)
489
493
  }, [
490
494
  h("div", {
491
- class: I(["shifl-grid__tooltip-arrow", M.value]),
492
- style: j(T.value)
495
+ class: G(["shifl-grid__tooltip-arrow", T.value]),
496
+ style: K(P.value)
493
497
  }, null, 6),
494
- h("div", cn, [
495
- c.value ? (a(!0), u(x, { key: 0 }, H(v.value, (p, $) => (a(), u("div", {
496
- key: $,
498
+ h("div", _n, [
499
+ a.isHtml ? (o(), l("div", {
500
+ key: 0,
501
+ innerHTML: a.content
502
+ }, null, 8, yn)) : f.value ? (o(!0), l(R, { key: 1 }, V(v.value, (m, S) => (o(), l("div", {
503
+ key: S,
497
504
  class: "shifl-grid__tooltip-line"
498
- }, L(p), 1))), 128)) : (a(), u(x, { key: 1 }, [
499
- ee(L(o.content), 1)
505
+ }, $(m), 1))), 128)) : (o(), l(R, { key: 2 }, [
506
+ re($(a.content), 1)
500
507
  ], 64))
501
508
  ])
502
509
  ], 4)) : D("", !0)
503
510
  ]));
504
511
  }
505
- }), dn = /* @__PURE__ */ q(fn, [["__scopeId", "data-v-f9f586fc"]]), gn = {}, hn = {
512
+ }), kn = /* @__PURE__ */ U(bn, [["__scopeId", "data-v-239005f1"]]), Cn = {}, Mn = {
506
513
  width: "14",
507
514
  height: "15",
508
515
  viewBox: "0 0 14 15",
@@ -510,23 +517,23 @@ const Kt = { class: "shifl-column-manager__header" }, Jt = { class: "shifl-colum
510
517
  xmlns: "http://www.w3.org/2000/svg",
511
518
  class: "shifl-smart-tracking-icon"
512
519
  };
513
- function pn(o, s) {
514
- return a(), u("svg", hn, [...s[0] || (s[0] = [
520
+ function wn(a, r) {
521
+ return o(), l("svg", Mn, [...r[0] || (r[0] = [
515
522
  h("path", {
516
523
  d: "M1.03223 9.27441C1.22778 9.27445 1.40954 9.32951 1.57812 9.43066L3.86523 10.8594C4.1957 11.0618 4.3916 11.4202 4.3916 11.8047C4.39151 12.189 4.19562 12.5467 3.86523 12.749L1.57812 14.1797C1.41642 14.2806 1.22754 14.334 1.03223 14.334V14.3408C0.465713 14.3408 0.000165713 13.8751 0 13.3086V10.3066C0.000236867 9.74022 0.465756 9.27443 1.03223 9.27441ZM1.01172 13.3018L3.3252 11.8916C3.32796 11.8884 3.3728 11.8374 3.37305 11.8047C3.37305 11.771 3.35218 11.737 3.3252 11.7168L1.03906 10.2871L1.01172 13.3018ZM6.07129 3.37305C6.35041 3.37318 6.5771 3.59977 6.57715 3.87891C6.57715 4.15809 6.35044 4.38463 6.07129 4.38477H5.05957C4.03708 4.38477 3.20433 5.06537 3.2041 5.90234C3.2041 6.73947 4.03694 7.4209 5.05957 7.4209H7.08301C8.66344 7.42096 9.95019 8.55525 9.9502 9.9502C9.95009 11.3451 8.66338 12.4794 7.08301 12.4795H6.07129C5.79202 12.4795 5.56543 12.2529 5.56543 11.9736C5.56548 11.6944 5.79205 11.4678 6.07129 11.4678H7.08301C8.10552 11.4677 8.93739 10.7872 8.9375 9.9502C8.93749 9.11311 8.10558 8.43267 7.08301 8.43262H5.05957C3.47908 8.43262 2.19238 7.29733 2.19238 5.90234C2.19259 4.50751 3.4792 3.37305 5.05957 3.37305H6.07129ZM10.7939 0C12.0694 0.000131868 13.2591 0.779675 13.7549 1.94043C14.6093 3.9666 13.0453 5.42741 11.9033 6.49316L11.8818 6.51367C11.7964 6.59308 11.711 6.67193 11.6289 6.75C11.4057 6.96444 11.1095 7.08195 10.7939 7.08203C10.4783 7.08203 10.1803 6.9642 9.95703 6.74902C9.86266 6.65937 9.76511 6.56666 9.66602 6.47363L9.66016 6.46875C8.53029 5.40836 6.98418 3.95585 7.83203 1.94238C8.32854 0.77953 9.51841 6.29203e-06 10.7939 0ZM10.7939 1.01172C9.91775 1.01173 9.10234 1.54537 8.76367 2.33789C8.22961 3.60525 9.04604 4.50453 10.3525 5.73145L10.4229 5.79688C10.5024 5.87104 10.5804 5.94604 10.6572 6.01953C10.7267 6.08617 10.861 6.08446 10.9277 6.02051L10.9307 6.01758C11.0223 5.93066 11.1172 5.84284 11.2129 5.75391C12.5356 4.51951 13.3612 3.61352 12.8223 2.33594C12.4849 1.54493 11.6691 1.0127 10.793 1.0127L10.7939 1.01172ZM10.7998 2.53027C11.1719 2.53041 11.4734 2.83199 11.4736 3.2041C11.4736 3.57637 11.172 3.87877 10.7998 3.87891C10.4275 3.87882 10.1221 3.57641 10.1221 3.2041C10.1223 2.8319 10.4207 2.53027 10.793 2.53027H10.7998Z",
517
524
  fill: "#05963F"
518
525
  }, null, -1)
519
526
  ])]);
520
527
  }
521
- const mn = /* @__PURE__ */ q(gn, [["render", pn]]), vn = {}, _n = {
528
+ const Sn = /* @__PURE__ */ U(Cn, [["render", wn]]), Tn = {}, Pn = {
522
529
  width: "14",
523
530
  height: "10",
524
531
  viewBox: "0 0 14 10",
525
532
  fill: "none",
526
533
  xmlns: "http://www.w3.org/2000/svg"
527
534
  };
528
- function yn(o, s) {
529
- return a(), u("svg", _n, [...s[0] || (s[0] = [
535
+ function $n(a, r) {
536
+ return o(), l("svg", Pn, [...r[0] || (r[0] = [
530
537
  h("path", {
531
538
  "fill-rule": "evenodd",
532
539
  "clip-rule": "evenodd",
@@ -535,88 +542,91 @@ function yn(o, s) {
535
542
  }, null, -1)
536
543
  ])]);
537
544
  }
538
- const bn = /* @__PURE__ */ q(vn, [["render", yn]]), kn = {}, Cn = {
545
+ const Ln = /* @__PURE__ */ U(Tn, [["render", $n]]), An = {}, Nn = {
539
546
  width: "14",
540
547
  height: "10",
541
548
  viewBox: "0 0 14 10",
542
549
  fill: "none",
543
550
  xmlns: "http://www.w3.org/2000/svg"
544
551
  };
545
- function wn(o, s) {
546
- return a(), u("svg", Cn, [...s[0] || (s[0] = [
552
+ function Rn(a, r) {
553
+ return o(), l("svg", Nn, [...r[0] || (r[0] = [
547
554
  h("path", {
548
555
  d: "M4.28125 8C4.66872 8.00011 4.98242 8.29887 4.98242 8.66699C4.98242 9.03511 4.66872 9.33387 4.28125 9.33398H0.702148C0.314581 9.33398 8.1338e-07 9.03518 0 8.66699C0 8.2988 0.31458 8 0.702148 8H4.28125ZM10.5264 0C10.9139 0 11.2285 0.298802 11.2285 0.666992V7.05762L12.1357 6.19531C12.4097 5.93519 12.8539 5.93524 13.1279 6.19531C13.402 6.45566 13.402 6.87832 13.1279 7.13867L11.0225 9.13867C10.7484 9.39867 10.3042 9.39886 10.0303 9.13867L7.9248 7.13867C7.65082 6.87834 7.65082 6.45565 7.9248 6.19531C8.19886 5.93496 8.64392 5.93496 8.91797 6.19531L9.8252 7.05762V0.666992C9.8252 0.298891 10.1389 0.000143144 10.5264 0ZM5.61426 4C6.00183 4 6.31641 4.2988 6.31641 4.66699C6.31641 5.03518 6.00183 5.33398 5.61426 5.33398H0.702148C0.314581 5.33398 6.77817e-07 5.03518 0 4.66699C0 4.2988 0.31458 4 0.702148 4H5.61426ZM7.01758 0C7.40515 0 7.71973 0.298802 7.71973 0.666992C7.71973 1.03518 7.40515 1.33398 7.01758 1.33398H0.702148C0.31458 1.33398 5.42254e-07 1.03518 0 0.666992C0 0.298802 0.31458 0 0.702148 0H7.01758Z",
549
556
  fill: "#1A6D9E"
550
557
  }, null, -1)
551
558
  ])]);
552
559
  }
553
- const Mn = /* @__PURE__ */ q(kn, [["render", wn]]), Sn = {}, Tn = {
560
+ const xn = /* @__PURE__ */ U(An, [["render", Rn]]), Hn = {}, zn = {
554
561
  width: "21",
555
562
  height: "13",
556
563
  viewBox: "0 0 21 13",
557
564
  fill: "none",
558
565
  xmlns: "http://www.w3.org/2000/svg"
559
566
  };
560
- function Pn(o, s) {
561
- return a(), u("svg", Tn, [...s[0] || (s[0] = [
567
+ function Dn(a, r) {
568
+ return o(), l("svg", zn, [...r[0] || (r[0] = [
562
569
  h("path", {
563
570
  d: "M19.6426 4.61523C19.9311 4.61524 20.1317 4.90139 20.0342 5.17285L17.499 12.2246C17.4395 12.3899 17.2821 12.5 17.1064 12.5H1.5459C1.35628 12.5 1.19044 12.3719 1.14258 12.1885L0.0136719 7.83887C-0.0548101 7.575 0.14438 7.31738 0.416992 7.31738H12.6016L14.71 4.61523H19.6426ZM3.51465 8.82324C3.11322 8.82324 2.78728 9.15265 2.78711 9.55859C2.78711 9.96468 3.11312 10.2939 3.51465 10.2939C3.9161 10.2938 4.24121 9.96462 4.24121 9.55859C4.24104 9.15271 3.91599 8.82334 3.51465 8.82324ZM7.87695 8.82324C7.47553 8.82324 7.14958 9.15265 7.14941 9.55859C7.14941 9.96468 7.47542 10.2939 7.87695 10.2939C8.27846 10.2939 8.60352 9.96466 8.60352 9.55859C8.60335 9.15267 8.27835 8.82327 7.87695 8.82324ZM12.2393 8.82324C11.8378 8.82324 11.5119 9.15265 11.5117 9.55859C11.5117 9.96468 11.8377 10.2939 12.2393 10.2939C12.6407 10.2938 12.9658 9.96458 12.9658 9.55859C12.9657 9.15275 12.6405 8.82341 12.2393 8.82324ZM10.3291 3.67676C10.5591 3.67679 10.7459 3.86283 10.7461 4.09277V5.46582C10.746 5.69585 10.5591 5.88278 10.3291 5.88281H1.75C1.51993 5.88281 1.33309 5.69587 1.33301 5.46582V4.09277C1.3332 3.86282 1.52 3.67676 1.75 3.67676H10.3291ZM8.91406 0C9.14418 0 9.33105 0.186874 9.33105 0.416992V1.78906C9.33105 2.01918 9.14418 2.20605 8.91406 2.20605H3.2041C2.97398 2.20605 2.78711 2.01918 2.78711 1.78906V0.416992C2.78711 0.186874 2.97398 1.52829e-06 3.2041 0H8.91406Z",
564
571
  fill: "#9CA5B4"
565
572
  }, null, -1)
566
573
  ])]);
567
574
  }
568
- const Ye = /* @__PURE__ */ q(Sn, [["render", Pn]]), $n = {}, Ln = {
575
+ const ot = /* @__PURE__ */ U(Hn, [["render", Dn]]), En = {}, Vn = {
569
576
  width: "16",
570
577
  height: "16",
571
578
  viewBox: "0 0 16 16",
572
579
  fill: "none",
573
580
  xmlns: "http://www.w3.org/2000/svg"
574
581
  };
575
- function An(o, s) {
576
- return a(), u("svg", Ln, [...s[0] || (s[0] = [
582
+ function Bn(a, r) {
583
+ return o(), l("svg", Vn, [...r[0] || (r[0] = [
577
584
  h("path", {
578
585
  d: "M7.99976 0.799561C11.9761 0.799561 15.1998 4.0234 15.2 7.99976C15.2 11.9762 11.9762 15.2 7.99976 15.2C4.0234 15.1998 0.799561 11.9761 0.799561 7.99976C0.799666 4.02346 4.02346 0.799666 7.99976 0.799561ZM7.99976 1.87964C4.61984 1.87974 1.87974 4.61984 1.87964 7.99976C1.87964 11.3798 4.61977 14.1198 7.99976 14.1199C11.3798 14.1199 14.1199 11.3798 14.1199 7.99976C14.1198 4.61977 11.3798 1.87964 7.99976 1.87964ZM7.9978 6.91968C8.27087 6.91973 8.49698 7.12223 8.53296 7.3855L8.53784 7.45874L8.53979 11.4197C8.5399 11.7178 8.29882 11.9595 8.00073 11.9597C7.72754 11.9599 7.50169 11.7572 7.46558 11.4939L7.46069 11.4207L7.45776 7.45972C7.45757 7.16153 7.69962 6.91987 7.9978 6.91968ZM8.00073 4.40112C8.39742 4.40137 8.71923 4.72319 8.71948 5.11987C8.71948 5.51677 8.39757 5.83935 8.00073 5.8396C7.60368 5.8396 7.28101 5.51692 7.28101 5.11987C7.28126 4.72304 7.60384 4.40112 8.00073 4.40112Z",
579
586
  fill: "#69758C"
580
587
  }, null, -1)
581
588
  ])]);
582
589
  }
583
- const xn = /* @__PURE__ */ q($n, [["render", An]]), Nn = { class: "shifl-grid relative" }, Rn = { class: "shifl-grid__controls" }, zn = { class: "shifl-grid__table" }, Dn = ["onClick"], En = { class: "shifl-grid__header-content" }, Hn = {
590
+ const Gn = /* @__PURE__ */ U(En, [["render", Bn]]), In = { class: "shifl-grid relative" }, On = { class: "shifl-grid__controls" }, Zn = { class: "shifl-grid__table" }, jn = ["onClick"], Fn = { class: "shifl-grid__header-content" }, Kn = {
584
591
  key: 0,
585
592
  class: "shifl-grid__header-label"
586
- }, Vn = {
593
+ }, Wn = {
587
594
  key: 1,
588
595
  class: "shifl-grid__sort-icon"
589
- }, Bn = { key: 0 }, In = ["colspan"], Gn = {
596
+ }, Jn = { key: 0 }, qn = ["colspan"], Un = {
590
597
  key: 0,
591
598
  class: "shifl-grid__smart-tracking-icon"
592
- }, Zn = ["onClick"], On = { key: 0 }, Fn = ["innerHTML"], jn = {
599
+ }, Yn = ["onClick"], Qn = { key: 0 }, Xn = ["innerHTML"], er = {
593
600
  key: 2,
594
601
  class: "shifl-grid__composite-cell"
595
- }, Wn = {
602
+ }, tr = {
596
603
  key: 3,
597
604
  class: "shifl-grid__type-cell"
598
- }, Kn = {
605
+ }, nr = {
599
606
  key: 0,
600
607
  class: "shifl-grid__container-badge"
601
- }, Jn = {
602
- key: 4,
608
+ }, rr = {
609
+ key: 0,
610
+ class: "shifl-grid__cell-blank"
611
+ }, sr = {
612
+ key: 1,
603
613
  class: "shifl-grid__tags-cell"
604
- }, qn = { class: "shifl-grid__tags-wrapper" }, Un = ["onMouseenter"], Yn = {
614
+ }, ir = { class: "shifl-grid__tags-wrapper" }, ar = ["onMouseenter"], or = {
605
615
  key: 5,
606
616
  class: "shifl-grid__chips-container"
607
- }, Qn = {
617
+ }, lr = {
608
618
  key: 6,
609
619
  class: "shifl-grid__truncated-cell"
610
- }, Xn = ["onMouseenter"], er = ["onMouseenter"], tr = ["href"], nr = {
620
+ }, ur = ["onMouseenter"], cr = ["onMouseenter"], fr = ["href"], dr = {
611
621
  key: 8,
612
622
  class: "shifl-grid__progress-cell"
613
- }, rr = { class: "shifl-grid__progress-bar" }, sr = { class: "shifl-grid__progress-text" }, ir = {
623
+ }, gr = { class: "shifl-grid__progress-bar" }, hr = { class: "shifl-grid__progress-text" }, pr = {
614
624
  key: 0,
615
625
  class: "shifl-grid__pagination"
616
- }, or = { class: "shifl-grid__pagination-left" }, ar = { class: "shifl-grid__pagination-range" }, lr = { class: "shifl-grid__pagination-range-numbers" }, ur = { class: "shifl-grid__pagination-right" }, cr = { class: "shifl-grid__pagination-rows" }, fr = ["value", "disabled"], dr = { class: "shifl-grid__pagination-nav" }, gr = ["disabled"], hr = { class: "shifl-grid__pagination-pages" }, pr = ["disabled", "onClick"], mr = {
626
+ }, mr = { class: "shifl-grid__pagination-left" }, vr = { class: "shifl-grid__pagination-range" }, _r = { class: "shifl-grid__pagination-range-numbers" }, yr = { class: "shifl-grid__pagination-right" }, br = { class: "shifl-grid__pagination-rows" }, kr = ["value", "disabled"], Cr = { class: "shifl-grid__pagination-nav" }, Mr = ["disabled"], wr = { class: "shifl-grid__pagination-pages" }, Sr = ["disabled", "onClick"], Tr = {
617
627
  key: 1,
618
628
  class: "shifl-grid__pagination-ellipsis"
619
- }, vr = ["disabled"], _r = ["onClick"], yr = ["innerHTML"], br = /* @__PURE__ */ xe({
629
+ }, Pr = ["disabled"], $r = ["onClick"], Lr = ["innerHTML"], Ar = /* @__PURE__ */ De({
620
630
  __name: "ShiflGrid",
621
631
  props: {
622
632
  config: {},
@@ -624,177 +634,194 @@ const xn = /* @__PURE__ */ q($n, [["render", An]]), Nn = { class: "shifl-grid re
624
634
  loading: { type: Boolean }
625
635
  },
626
636
  emits: ["action-click", "search-change", "pagination-change"],
627
- setup(o, { emit: s }) {
628
- var qe, Ue;
629
- const g = o, _ = s, c = b(() => It(g.config)), v = k(g.search), M = k(c.value.filters), T = k(c.value.sort), w = k({
630
- page: ((qe = c.value.paginationMeta) == null ? void 0 : qe.currentPage) || 1,
631
- perPage: ((Ue = c.value.paginationMeta) == null ? void 0 : Ue.perPage) || 20
632
- }), d = Wt(c.value, {
637
+ setup(a, { emit: r }) {
638
+ var nt, rt, st, it, at;
639
+ const d = a, _ = r, f = k(() => Jt(d.config)), v = b(d.search), T = b(f.value.filters), P = b(f.value.sort), M = b({
640
+ page: ((nt = f.value.paginationMeta) == null ? void 0 : nt.currentPage) || 1,
641
+ perPage: ((rt = f.value.paginationMeta) == null ? void 0 : rt.perPage) || 20
642
+ }), p = b(
643
+ typeof ((st = f.value.apiConfig) == null ? void 0 : st.additionalParams) == "function" || (at = (it = f.value.apiConfig) == null ? void 0 : it.additionalParams) == null ? void 0 : at.tabName
644
+ ), u = en(f.value, {
633
645
  search: v,
634
- filters: M,
635
- sort: T,
636
- pagination: w
637
- }), f = b(() => c.value.columns.filter((e) => !e.smartTrackingColumn)), {
638
- columns: p,
639
- visibleColumns: $,
640
- toggleColumnVisibility: C,
641
- setAllVisible: l,
642
- toggleFreeze: m,
643
- moveColumn: S,
644
- resetColumns: N
645
- } = Gt(f.value), { sort: P, setSort: R, applySort: ce } = Zt(c.value.sort), { applyGlobalFilter: te } = Ot(), { menuState: V, openMenu: F, closeMenu: U } = Ft(), Y = k(!1), Z = k({}), ne = k(null), Ne = k(null), fe = k(null), de = k(!1), Re = k(""), ge = k(null), et = k({});
646
- k({});
647
- const he = k({});
648
- O(
649
- () => c.value.filters,
646
+ filters: T,
647
+ sort: P,
648
+ pagination: M,
649
+ tabName: p
650
+ }), m = k(() => f.value.columns.filter((e) => !e.smartTrackingColumn)), {
651
+ columns: S,
652
+ visibleColumns: w,
653
+ toggleColumnVisibility: c,
654
+ setAllVisible: g,
655
+ toggleFreeze: C,
656
+ moveColumn: L,
657
+ resetColumns: A
658
+ } = qt(m.value), { sort: N, setSort: he, applySort: se } = Ut(f.value.sort), { applyGlobalFilter: ee } = Yt(), { menuState: H, openMenu: ie, closeMenu: Y } = Qt(), I = b(!1), ae = b({}), Ee = b(null), Ve = b(null), pe = b(null), me = b(!1), Be = b(""), ve = b(null), _e = b(!1), ct = b({});
659
+ b({});
660
+ const Q = b(
661
+ {}
662
+ );
663
+ j(
664
+ () => f.value.filters,
665
+ (e) => {
666
+ T.value = e;
667
+ },
668
+ { deep: !0 }
669
+ ), j(
670
+ () => f.value.paginationMeta,
650
671
  (e) => {
651
- M.value = e;
672
+ f.value.searchMode !== "server" && e && M.value && (M.value.page = e.currentPage || M.value.page, M.value.perPage = e.perPage || M.value.perPage);
652
673
  },
653
674
  { deep: !0 }
654
- ), O(
655
- () => c.value.paginationMeta,
675
+ ), j(
676
+ () => f.value.columns,
656
677
  (e) => {
657
- c.value.searchMode !== "server" && e && w.value && (w.value.page = e.currentPage || w.value.page, w.value.perPage = e.perPage || w.value.perPage);
678
+ const t = e.filter((n) => !n.smartTrackingColumn);
679
+ S.value = [...t];
658
680
  },
659
681
  { deep: !0 }
660
- ), O(
661
- () => c.value.columns,
682
+ ), j(
683
+ () => f.value.sort,
662
684
  (e) => {
663
- const n = e.filter((t) => !t.smartTrackingColumn);
664
- p.value = [...n];
685
+ e && (N.value = e, P.value = e);
665
686
  },
666
687
  { deep: !0 }
667
- ), O(
668
- () => c.value.sort,
688
+ ), j(
689
+ () => {
690
+ var e;
691
+ return (e = f.value.apiConfig) == null ? void 0 : e.additionalParams;
692
+ },
669
693
  (e) => {
670
- e && (P.value = e, T.value = e);
694
+ if (e && typeof e != "function") {
695
+ const t = e;
696
+ t.tabName !== void 0 && p.value !== t.tabName && (p.value = t.tabName);
697
+ }
671
698
  },
672
699
  { deep: !0 }
673
- ), O(
674
- () => g.search,
675
- (e, n) => {
676
- var t;
677
- if (v.value = e, c.value.searchMode === "server")
700
+ ), j(
701
+ () => d.search,
702
+ (e, t) => {
703
+ var n;
704
+ if (v.value = e, f.value.searchMode === "server")
678
705
  _("search-change", e || "");
679
- else if (c.value.searchMode === "client" && e !== n) {
680
- const r = ((t = z.value) == null ? void 0 : t.perPage) || 20;
681
- w.value = { page: 1, perPage: r }, _("pagination-change", 1, r);
706
+ else if (f.value.searchMode === "client" && e !== t) {
707
+ const s = ((n = z.value) == null ? void 0 : n.perPage) || 20;
708
+ M.value = { page: 1, perPage: s }, _("pagination-change", 1, s);
682
709
  }
683
710
  },
684
711
  { immediate: !0 }
685
- ), O(
686
- () => P.value,
712
+ ), j(
713
+ () => N.value,
687
714
  (e) => {
688
- T.value = e;
715
+ P.value = e;
689
716
  }
690
717
  );
691
- const ze = b(() => d.rows.value || []), pe = b(() => {
692
- if ((c.value.searchMode || "client") === "server")
693
- return ze.value;
694
- const n = g.search || "";
695
- return te(ze.value, c.value.search, n);
696
- }), me = b(() => {
697
- var n;
698
- return (c.value.searchMode || "client") === "client" ? pe.value.length : ((n = d.paginationMeta.value) == null ? void 0 : n.total) || 0;
699
- }), ve = b(() => (c.value.searchMode || "client") === "server" ? pe.value : ce(pe.value)), De = b(() => {
700
- if ((c.value.searchMode || "client") === "server")
701
- return ve.value;
702
- const n = z.value;
703
- if (!n || !n.show)
704
- return ve.value;
705
- const t = n.perPage || 20, i = ((n.currentPage || 1) - 1) * t, y = i + t;
706
- return ve.value.slice(i, y);
707
- }), z = b(() => {
718
+ const ye = k(() => u.rows.value || []), be = k(() => {
719
+ if ((f.value.searchMode || "client") === "server")
720
+ return ye.value;
721
+ const t = d.search || "";
722
+ return ee(ye.value, f.value.search, t);
723
+ }), ke = k(() => {
724
+ var t;
725
+ return (f.value.searchMode || "client") === "client" ? be.value.length : ((t = u.paginationMeta.value) == null ? void 0 : t.total) || 0;
726
+ }), Ce = k(() => (f.value.searchMode || "client") === "server" ? be.value : se(be.value)), Ge = k(() => {
727
+ if ((f.value.searchMode || "client") === "server")
728
+ return Ce.value;
729
+ const t = z.value;
730
+ if (!t || !t.show)
731
+ return Ce.value;
732
+ const n = t.perPage || 20, i = ((t.currentPage || 1) - 1) * n, y = i + n;
733
+ return Ce.value.slice(i, y);
734
+ }), z = k(() => {
708
735
  var e;
709
- return c.value.searchMode === "server" && d.paginationMeta.value ? {
736
+ return f.value.searchMode === "server" && u.paginationMeta.value ? {
710
737
  show: !0,
711
738
  // Default to showing pagination
712
- ...d.paginationMeta.value,
713
- currentPage: ((e = w.value) == null ? void 0 : e.page) || d.paginationMeta.value.currentPage || 1
714
- } : c.value.paginationMeta;
715
- }), W = b(() => g.loading !== void 0 ? g.loading : d.loading.value), tt = b(() => {
739
+ ...u.paginationMeta.value,
740
+ currentPage: ((e = M.value) == null ? void 0 : e.page) || u.paginationMeta.value.currentPage || 1
741
+ } : f.value.paginationMeta;
742
+ }), W = k(() => d.loading !== void 0 ? d.loading : u.loading.value), ft = k(() => {
716
743
  var e;
717
744
  return ((e = z.value) == null ? void 0 : e.perPage) === 100;
718
- }), nt = b(() => {
745
+ }), dt = k(() => {
719
746
  var e;
720
747
  return ((e = z.value) == null ? void 0 : e.perPage) || 10;
721
- }), Ee = b(() => {
748
+ }), Ie = k(() => {
722
749
  const e = z.value;
723
750
  if (!e || e.show === !1)
724
751
  return { from: 0, to: 0 };
725
- const n = me.value, t = e.perPage || 20, r = e.currentPage || 1;
726
- if ((c.value.searchMode || "client") === "server" && e.from !== void 0 && e.to !== void 0)
752
+ const t = ke.value, n = e.perPage || 20, s = e.currentPage || 1;
753
+ if ((f.value.searchMode || "client") === "server" && e.from !== void 0 && e.to !== void 0)
727
754
  return { from: e.from, to: e.to };
728
- const y = (r - 1) * t + 1, A = Math.min(r * t, n);
729
- return n === 0 ? { from: 0, to: 0 } : { from: y, to: A };
730
- }), K = b(() => {
755
+ const y = (s - 1) * n + 1, x = Math.min(s * n, t);
756
+ return t === 0 ? { from: 0, to: 0 } : { from: y, to: x };
757
+ }), J = k(() => {
731
758
  var e;
732
759
  return ((e = z.value) == null ? void 0 : e.currentPage) || 1;
733
- }), _e = b(() => {
760
+ }), Me = k(() => {
734
761
  const e = z.value;
735
762
  if (!e || e.show === !1) return 1;
736
- const n = me.value;
737
- if (n === 0) return 1;
738
- const t = e.perPage || 20, r = Math.ceil(n / t);
739
- return Math.max(1, r);
740
- }), He = b(() => K.value <= 1), Ve = b(() => K.value >= _e.value), rt = b(() => {
741
- const e = _e.value, n = K.value, t = [];
763
+ const t = ke.value;
764
+ if (t === 0) return 1;
765
+ const n = e.perPage || 20, s = Math.ceil(t / n);
766
+ return Math.max(1, s);
767
+ }), Oe = k(() => J.value <= 1), Ze = k(() => J.value >= Me.value), gt = k(() => {
768
+ const e = Me.value, t = J.value, n = [];
742
769
  if (e <= 7)
743
- for (let r = 1; r <= e; r++)
744
- t.push(r);
745
- else if (n <= 4) {
746
- for (let r = 1; r <= 5; r++)
747
- t.push(r);
748
- t.push(-1), t.push(e);
749
- } else if (n >= e - 3) {
750
- t.push(1), t.push(-1);
751
- for (let r = e - 4; r <= e; r++)
752
- t.push(r);
770
+ for (let s = 1; s <= e; s++)
771
+ n.push(s);
772
+ else if (t <= 4) {
773
+ for (let s = 1; s <= 5; s++)
774
+ n.push(s);
775
+ n.push(-1), n.push(e);
776
+ } else if (t >= e - 3) {
777
+ n.push(1), n.push(-1);
778
+ for (let s = e - 4; s <= e; s++)
779
+ n.push(s);
753
780
  } else {
754
- t.push(1), t.push(-1);
755
- for (let r = n - 1; r <= n + 1; r++)
756
- t.push(r);
757
- t.push(-1), t.push(e);
781
+ n.push(1), n.push(-1);
782
+ for (let s = t - 1; s <= t + 1; s++)
783
+ n.push(s);
784
+ n.push(-1), n.push(e);
758
785
  }
759
- return t;
786
+ return n;
760
787
  });
761
- function st(e) {
762
- var t;
763
- if (e < 1 || e > _e.value || e === K.value || W.value) return;
764
- const n = ((t = z.value) == null ? void 0 : t.perPage) || 20;
765
- w.value = { page: e, perPage: n }, _("pagination-change", e, n);
788
+ function ht(e) {
789
+ var n;
790
+ if (e < 1 || e > Me.value || e === J.value || W.value) return;
791
+ const t = ((n = z.value) == null ? void 0 : n.perPage) || 20;
792
+ M.value = { page: e, perPage: t }, _("pagination-change", e, t);
766
793
  }
767
- function it() {
768
- var t;
769
- if (He.value || W.value) return;
770
- const e = ((t = z.value) == null ? void 0 : t.perPage) || 20, n = K.value - 1;
771
- w.value = { page: n, perPage: e }, _("pagination-change", n, e);
794
+ function pt() {
795
+ var n;
796
+ if (Oe.value || W.value) return;
797
+ const e = ((n = z.value) == null ? void 0 : n.perPage) || 20, t = J.value - 1;
798
+ M.value = { page: t, perPage: e }, _("pagination-change", t, e);
772
799
  }
773
- function ot() {
774
- var t;
775
- if (Ve.value || W.value) return;
776
- const e = ((t = z.value) == null ? void 0 : t.perPage) || 20, n = K.value + 1;
777
- w.value = { page: n, perPage: e }, _("pagination-change", n, e);
800
+ function mt() {
801
+ var n;
802
+ if (Ze.value || W.value) return;
803
+ const e = ((n = z.value) == null ? void 0 : n.perPage) || 20, t = J.value + 1;
804
+ M.value = { page: t, perPage: e }, _("pagination-change", t, e);
778
805
  }
779
- function at(e) {
780
- var r;
806
+ function vt(e) {
807
+ var s;
781
808
  if (W.value) return;
782
- const n = e.target, t = parseInt(n.value, 10);
783
- t && t !== (((r = z.value) == null ? void 0 : r.perPage) || 20) && (w.value = { page: 1, perPage: t }, _("pagination-change", 1, t));
809
+ const t = e.target, n = parseInt(t.value, 10);
810
+ n && n !== (((s = z.value) == null ? void 0 : s.perPage) || 20) && (M.value = { page: 1, perPage: n }, _("pagination-change", 1, n));
784
811
  }
785
- const lt = b(() => {
786
- const e = c.value.columns.find((t) => t.smartTrackingColumn);
812
+ const _t = k(() => {
813
+ const e = f.value.columns.find((n) => n.smartTrackingColumn);
787
814
  if (!(e != null && e.smartTrackingColumn)) return !1;
788
- const n = e.smartTrackingColumn.dataKey;
789
- return c.value.rows.some((t) => {
790
- const r = t[n];
791
- return r === !0 || r === 1 || r === "true" || r === "1";
815
+ const t = e.smartTrackingColumn.dataKey;
816
+ return ye.value.some((n) => {
817
+ const s = n[t];
818
+ return s === !0 || s === 1 || s === "true" || s === "1";
792
819
  });
793
- }), ye = b(() => c.value.columns.find((e) => e.smartTrackingColumn)), Q = b(() => {
794
- var t;
795
- const e = $.value.filter((r) => !r.smartTrackingColumn);
796
- if (lt.value && ye.value) {
797
- const r = {
820
+ }), we = k(() => f.value.columns.find((e) => e.smartTrackingColumn)), X = k(() => {
821
+ var n;
822
+ const e = w.value.filter((s) => !s.smartTrackingColumn);
823
+ if (_t.value && we.value) {
824
+ const s = {
798
825
  key: "_smart_tracking",
799
826
  label: "",
800
827
  // No label
@@ -804,57 +831,57 @@ const xn = /* @__PURE__ */ q($n, [["render", An]]), Nn = { class: "shifl-grid re
804
831
  visible: !0,
805
832
  protected: !0,
806
833
  sortable: !1,
807
- width: ((t = ye.value.smartTrackingColumn) == null ? void 0 : t.width) || "36px",
808
- smartTrackingColumn: ye.value.smartTrackingColumn,
834
+ width: ((n = we.value.smartTrackingColumn) == null ? void 0 : n.width) || "36px",
835
+ smartTrackingColumn: we.value.smartTrackingColumn,
809
836
  cellType: "icon"
810
837
  }, i = e.findIndex((y) => y.key === "ref");
811
- i >= 0 ? e.splice(i, 0, r) : e.unshift(r);
838
+ i >= 0 ? e.splice(i, 0, s) : e.unshift(s);
812
839
  }
813
- const n = e.find((r) => r.key === "ref");
814
- return n && (n.freeze = !0, n.protected = !0), e;
815
- }), ut = b(() => {
840
+ const t = e.find((s) => s.key === "ref");
841
+ return t && (t.freeze = !0, t.protected = !0), e;
842
+ }), yt = k(() => {
816
843
  let e = 0;
817
- const n = {};
818
- for (const t of Q.value) {
819
- t.freeze && (n[t.key] = e);
820
- const r = parseInt(t.width ?? "160", 10);
821
- Number.isNaN(r) || (e += r);
844
+ const t = {};
845
+ for (const n of X.value) {
846
+ n.freeze && (t[n.key] = e);
847
+ const s = parseInt(n.width ?? "160", 10);
848
+ Number.isNaN(s) || (e += s);
822
849
  }
823
- return n;
824
- }), Be = k(0);
825
- function ct(e) {
826
- const n = e.target;
827
- Be.value = n.scrollLeft;
850
+ return t;
851
+ }), je = b(0);
852
+ function bt(e) {
853
+ const t = e.target;
854
+ je.value = t.scrollLeft;
828
855
  }
829
- function ft(e) {
830
- const n = p.value.find((t) => t.key === e);
831
- !(n != null && n.sortable) || se(n) || Te(n) || R(e);
856
+ function kt(e) {
857
+ const t = S.value.find((n) => n.key === e);
858
+ !(t != null && t.sortable) || ue(t) || Ne(t) || he(e);
832
859
  }
833
- function be(e, n) {
860
+ function Se(e, t) {
834
861
  if (e == null || e === "" || e === void 0)
835
- return Ie(n.blankStyle);
836
- const t = n.cellType;
837
- if (Array.isArray(t)) {
838
- const r = t.find((i) => typeof i == "string" && i !== "icon");
839
- return r && typeof r == "string" ? We(e, r, n) : "";
862
+ return oe(t.blankStyle);
863
+ const n = t.cellType;
864
+ if (Array.isArray(n)) {
865
+ const s = n.find((i) => typeof i == "string" && i !== "icon");
866
+ return s && typeof s == "string" ? Ye(e, s, t) : "";
840
867
  }
841
- if (!t)
868
+ if (!n)
842
869
  return typeof e == "object" ? JSON.stringify(e) : String(e);
843
- switch (t) {
870
+ switch (n) {
844
871
  case "number":
845
- return Ge(e);
872
+ return Fe(e);
846
873
  case "currency":
847
- return Ze(e);
874
+ return Ke(e);
848
875
  case "date":
849
- return Oe(e);
876
+ return We(e);
850
877
  case "boolean":
851
- return Fe(e);
878
+ return Je(e);
852
879
  case "text":
853
880
  default:
854
881
  return typeof e == "object" ? JSON.stringify(e) : String(e);
855
882
  }
856
883
  }
857
- function Ie(e) {
884
+ function oe(e) {
858
885
  switch (e) {
859
886
  case "dash":
860
887
  return "--";
@@ -867,85 +894,85 @@ const xn = /* @__PURE__ */ q($n, [["render", An]]), Nn = { class: "shifl-grid re
867
894
  return "";
868
895
  }
869
896
  }
870
- function Ge(e) {
897
+ function Fe(e) {
871
898
  if (typeof e == "number")
872
899
  return e.toLocaleString();
873
- const n = Number(e);
874
- return Number.isNaN(n) ? String(e) : n.toLocaleString();
900
+ const t = Number(e);
901
+ return Number.isNaN(t) ? String(e) : t.toLocaleString();
875
902
  }
876
- function Ze(e) {
903
+ function Ke(e) {
877
904
  if (typeof e == "number")
878
905
  return new Intl.NumberFormat("en-US", {
879
906
  style: "currency",
880
907
  currency: "USD"
881
908
  }).format(e);
882
- const n = Number(e);
883
- return Number.isNaN(n) ? String(e) : new Intl.NumberFormat("en-US", {
909
+ const t = Number(e);
910
+ return Number.isNaN(t) ? String(e) : new Intl.NumberFormat("en-US", {
884
911
  style: "currency",
885
912
  currency: "USD"
886
- }).format(n);
913
+ }).format(t);
887
914
  }
888
- function Oe(e) {
915
+ function We(e) {
889
916
  if (e instanceof Date)
890
917
  return e.toLocaleDateString();
891
918
  if (typeof e == "string") {
892
- const n = new Date(e);
893
- if (!Number.isNaN(n.getTime()))
894
- return n.toLocaleDateString();
919
+ const t = new Date(e);
920
+ if (!Number.isNaN(t.getTime()))
921
+ return t.toLocaleDateString();
895
922
  }
896
923
  return String(e);
897
924
  }
898
- function Fe(e) {
925
+ function Je(e) {
899
926
  return typeof e == "boolean" ? e ? "Yes" : "No" : e === 1 || e === "1" || e === "true" || e === "True" ? "Yes" : e === 0 || e === "0" || e === "false" || e === "False" ? "No" : String(e);
900
927
  }
901
- function dt(e) {
928
+ function Ct(e) {
902
929
  if (typeof e == "number")
903
930
  return Math.min(100, Math.max(0, e));
904
- const n = Number(e);
905
- return Number.isNaN(n) ? 0 : Math.min(100, Math.max(0, n));
931
+ const t = Number(e);
932
+ return Number.isNaN(t) ? 0 : Math.min(100, Math.max(0, t));
906
933
  }
907
- function je(e) {
908
- return typeof e == "string" && e.toLowerCase() === "ocean", Ye;
934
+ function qe(e) {
935
+ return typeof e == "string" && e.toLowerCase() === "ocean", ot;
909
936
  }
910
- function gt(e) {
911
- const n = e.toLowerCase();
912
- return ["supplier", "suppliers", "po", "pos", "product_description"].includes(n);
937
+ function Mt(e) {
938
+ const t = e.toLowerCase();
939
+ return ["supplier", "suppliers", "po", "pos", "product_description"].includes(t);
913
940
  }
914
- function ht(e) {
941
+ function Ue(e) {
915
942
  if (e.cellType === "badge") return !0;
916
- const n = e.key.toLowerCase();
917
- return n === "tag" || n === "tags";
943
+ const t = e.key.toLowerCase();
944
+ return t === "tag" || t === "tags";
918
945
  }
919
- function pt(e) {
946
+ function wt(e) {
920
947
  return e.cellType === "status" ? !0 : e.key.toLowerCase() === "status";
921
948
  }
922
- function mt(e) {
949
+ function St(e) {
923
950
  return e.cellType === "icon" ? !0 : e.key.toLowerCase() === "type";
924
951
  }
925
- function vt(e) {
952
+ function Tt(e) {
926
953
  return Array.isArray(e.cellType) && e.cellType.length > 0;
927
954
  }
928
- function _t(e) {
929
- return Array.isArray(e.cellType) ? e.cellType.filter((n) => typeof n == "string") : e.cellType && typeof e.cellType == "string" ? [e.cellType] : [];
955
+ function Pt(e) {
956
+ return Array.isArray(e.cellType) ? e.cellType.filter((t) => typeof t == "string") : e.cellType && typeof e.cellType == "string" ? [e.cellType] : [];
930
957
  }
931
- function We(e, n, t) {
958
+ function Ye(e, t, n) {
932
959
  if (e == null || e === "" || e === void 0)
933
- return Ie(t.blankStyle);
934
- switch (n) {
960
+ return oe(n.blankStyle);
961
+ switch (t) {
935
962
  case "number":
936
- return Ge(e);
963
+ return Fe(e);
937
964
  case "currency":
938
- return Ze(e);
965
+ return Ke(e);
939
966
  case "date":
940
- return Oe(e);
967
+ return We(e);
941
968
  case "boolean":
942
- return Fe(e);
969
+ return Je(e);
943
970
  case "text":
944
971
  default:
945
972
  return typeof e == "object" ? JSON.stringify(e) : String(e);
946
973
  }
947
974
  }
948
- function yt(e) {
975
+ function $t(e) {
949
976
  return {
950
977
  number: "shifl-grid__composite-number",
951
978
  currency: "shifl-grid__composite-currency",
@@ -954,95 +981,117 @@ const xn = /* @__PURE__ */ q($n, [["render", An]]), Nn = { class: "shifl-grid re
954
981
  text: "shifl-grid__composite-text"
955
982
  }[e] || "shifl-grid__composite-text";
956
983
  }
957
- function bt(e) {
958
- if (e == null) return "";
984
+ function Lt(e, t) {
985
+ if (e == null || e === "")
986
+ return oe(t.blankStyle);
959
987
  if (Array.isArray(e)) {
960
988
  if (e.length === 0) return "";
961
989
  const n = e.join(", ");
962
- return Ke(n, 45);
990
+ return Qe(n, 45);
963
991
  }
964
- return typeof e == "string" ? Ke(e, 45) : String(e);
992
+ return typeof e == "string" ? Qe(e, 45) : String(e);
965
993
  }
966
- function Ke(e, n) {
967
- return e.length <= n ? e : e.substring(0, n) + "...";
994
+ function Qe(e, t) {
995
+ return e.length <= t ? e : e.substring(0, t) + "...";
968
996
  }
969
- function ke(e) {
970
- const n = e.toLowerCase();
971
- return ["po", "pos", "supplier", "suppliers", "tag", "tags"].includes(n);
997
+ function Te(e) {
998
+ const t = e.toLowerCase();
999
+ return ["po", "pos", "supplier", "suppliers", "tag", "tags"].includes(t);
972
1000
  }
973
- function kt(e, n) {
974
- return e == null || ke(n) ? !1 : Array.isArray(e) ? e.length === 0 ? !1 : e.join(", ").length > 30 : typeof e == "string" ? e.length > 30 : !1;
1001
+ function At(e, t) {
1002
+ return e == null || Te(t) ? !1 : Array.isArray(e) ? e.length === 0 ? !1 : e.join(", ").length > 30 : typeof e == "string" ? e.length > 30 : !1;
975
1003
  }
976
- function Ct(e) {
1004
+ function Nt(e) {
977
1005
  return e == null ? !1 : Array.isArray(e) ? e.length === 0 ? !1 : e.join(", ").length > 45 : typeof e == "string" ? e.length > 45 : !1;
978
1006
  }
979
- function wt(e) {
1007
+ function Rt(e) {
980
1008
  if (e == null) return 0;
981
1009
  if (Array.isArray(e)) {
982
1010
  if (e.length === 0 || e.join(", ").length <= 45) return 0;
983
- let t = 0, r = 0;
1011
+ let n = 0, s = 0;
984
1012
  for (let i = 0; i < e.length; i++) {
985
1013
  const y = String(e[i]), B = (i > 0 ? ", " : "").length + y.length;
986
- if (t + B <= 45)
987
- t += B, r++;
1014
+ if (n + B <= 45)
1015
+ n += B, s++;
988
1016
  else
989
1017
  break;
990
1018
  }
991
- return e.length - r;
1019
+ return e.length - s;
992
1020
  }
993
1021
  return typeof e == "string" && e.length > 45 ? 1 : 0;
994
1022
  }
995
- function Ce(e, n, t, r) {
996
- let i = "";
997
- Array.isArray(t) ? t.length > 0 && (i = t.join(`
998
- `)) : t != null && (i = String(t)), Re.value = i, ge.value = r, de.value = !0;
1023
+ function Pe(e, t, n, s) {
1024
+ let i = "", y = !1;
1025
+ const x = X.value.find((B) => B.key === e);
1026
+ if (x && Ue(x)) {
1027
+ const B = Xe(n);
1028
+ B.length > 0 && (y = !0, i = B.map((F) => `<span class="shifl-grid__tooltip-badge" style="border-left-color: ${et(F)} !important">${F.name}</span>`).join(""));
1029
+ } else Array.isArray(n) ? n.length > 0 && (i = n.join(`
1030
+ `)) : n != null && (i = String(n));
1031
+ Be.value = i, _e.value = y, ve.value = s, me.value = !0;
999
1032
  }
1000
- function we() {
1001
- de.value = !1, ge.value = null;
1033
+ function $e() {
1034
+ me.value = !1, ve.value = null, _e.value = !1;
1002
1035
  }
1003
- function Mt(e, n, t) {
1004
- t && (et.value[`${e}-${n}`] = t);
1036
+ function xt(e, t, n) {
1037
+ n && (ct.value[`${e}-${t}`] = n);
1005
1038
  }
1006
- function re(e) {
1007
- return e == null ? [] : Array.isArray(e) ? e.map((n) => String(n)).filter((n) => n.length > 0) : typeof e == "string" ? e.split(",").map((n) => n.trim()).filter((n) => n.length > 0) : [String(e)];
1039
+ function le(e) {
1040
+ return e == null ? [] : Array.isArray(e) ? e.map((t) => typeof t == "object" && t !== null && "name" in t ? String(t.name) : String(t)).filter((t) => t.length > 0) : typeof e == "string" ? e.split(",").map((t) => t.trim()).filter((t) => t.length > 0) : [String(e)];
1008
1041
  }
1009
- function Me(e, n, t) {
1010
- const r = re(e);
1011
- if (r.length === 0) return [];
1012
- const i = `${n}-${t}`;
1013
- if (he.value[i])
1014
- return he.value[i];
1015
- const y = Q.value.find((oe) => oe.key === n), B = (y != null && y.width ? parseInt(y.width) : 200) - 32, X = St(r, B);
1016
- return he.value[i] = X, X;
1042
+ function Xe(e) {
1043
+ return e == null ? [] : Array.isArray(e) ? e.map((t) => typeof t == "object" && t !== null && "name" in t ? {
1044
+ name: String(t.name),
1045
+ color: "color" in t ? String(t.color) : void 0
1046
+ } : {
1047
+ name: String(t),
1048
+ color: void 0
1049
+ }).filter((t) => t.name.length > 0) : typeof e == "string" ? e.split(",").map((t) => t.trim()).filter((t) => t.length > 0).map((t) => ({ name: t, color: void 0 })) : [{ name: String(e), color: void 0 }];
1017
1050
  }
1018
- function St(e, n) {
1019
- if (e.length === 0) return [];
1020
- const t = document.createElement("div");
1021
- t.style.cssText = "position: absolute; visibility: hidden; display: flex; flex-wrap: nowrap; gap: 6px;", t.className = "shifl-grid__chips-container", document.body.appendChild(t);
1022
- let r = 0, i = 0;
1023
- const y = 40;
1024
- for (let A = 0; A < e.length; A++) {
1025
- const B = document.createElement("span");
1026
- B.className = "shifl-grid__chip shifl-grid__chip--tag", B.textContent = e[A], B.style.cssText = "padding: 4px 8px; border-left: 3px solid; border: 1px solid; background: white; white-space: nowrap;", t.appendChild(B);
1027
- const X = B.offsetWidth, oe = A > 0 ? 6 : 0, Et = A < e.length - 1;
1028
- if (i + oe + X + (Et ? y : 0) > n && A > 0) {
1029
- t.removeChild(B);
1051
+ function Le(e, t, n) {
1052
+ const s = le(e);
1053
+ if (s.length === 0) return [];
1054
+ const i = `${t}-${n}`;
1055
+ if (Q.value[i])
1056
+ return Q.value[i];
1057
+ const y = 130, x = 8, B = 4;
1058
+ let F = 0;
1059
+ const O = [];
1060
+ for (const te of s) {
1061
+ const ne = te.length * 8 + x + B;
1062
+ if (F + ne > y && O.length > 0)
1030
1063
  break;
1031
- }
1032
- i += oe + X, r++;
1064
+ O.push(te), F += ne;
1033
1065
  }
1034
- return document.body.removeChild(t), e.slice(0, r);
1066
+ return Q.value[i] = O, O;
1035
1067
  }
1036
- function Tt(e, n, t) {
1037
- const r = re(e), i = Me(e, n, t);
1038
- return r.length > i.length;
1068
+ function Ht(e, t, n) {
1069
+ const s = Xe(e);
1070
+ if (s.length === 0) return [];
1071
+ const i = `${t}-${n}-objects`;
1072
+ if (Q.value[i])
1073
+ return Q.value[i];
1074
+ const y = 130, x = 8, B = 4;
1075
+ let F = 0;
1076
+ const O = [];
1077
+ for (const te of s) {
1078
+ const ne = te.name.length * 8 + x + B;
1079
+ if (F + ne > y && O.length > 0)
1080
+ break;
1081
+ O.push(te), F += ne;
1082
+ }
1083
+ return Q.value[i] = O, O;
1039
1084
  }
1040
- function Pt(e, n, t) {
1041
- const r = re(e), i = Me(e, n, t);
1042
- return r.length - i.length;
1085
+ function zt(e, t, n) {
1086
+ const s = le(e), i = Le(e, t, n);
1087
+ return s.length > i.length;
1043
1088
  }
1044
- function $t(e) {
1045
- const n = e.toLowerCase(), t = {
1089
+ function Dt(e, t, n) {
1090
+ const s = le(e), i = Le(e, t, n);
1091
+ return s.length - i.length;
1092
+ }
1093
+ function Et(e) {
1094
+ const t = e.toLowerCase(), n = {
1046
1095
  "high priority": "var(--shifl-color-error-r70)",
1047
1096
  express: "var(--shifl-color-primary-b80)",
1048
1097
  fragile: "var(--shifl-color-warning-o70)",
@@ -1054,18 +1103,21 @@ const xn = /* @__PURE__ */ q($n, [["render", An]]), Nn = { class: "shifl-grid re
1054
1103
  normal: "var(--shifl-color-neutral-n60)",
1055
1104
  low: "var(--shifl-color-neutral-n50)"
1056
1105
  };
1057
- if (t[n])
1058
- return t[n];
1059
- for (const [r, i] of Object.entries(t))
1060
- if (n.includes(r) || r.includes(n))
1106
+ if (n[t])
1107
+ return n[t];
1108
+ for (const [s, i] of Object.entries(n))
1109
+ if (t.includes(s) || s.includes(t))
1061
1110
  return i;
1062
- return Lt(e);
1111
+ return Vt(e);
1063
1112
  }
1064
- function Lt(e) {
1065
- let n = 0;
1066
- for (let r = 0; r < e.length; r++)
1067
- n = e.charCodeAt(r) + ((n << 5) - n);
1068
- const t = [
1113
+ function et(e) {
1114
+ return e.color && e.color !== "" ? e.color : Et(e.name);
1115
+ }
1116
+ function Vt(e) {
1117
+ let t = 0;
1118
+ for (let s = 0; s < e.length; s++)
1119
+ t = e.charCodeAt(s) + ((t << 5) - t);
1120
+ const n = [
1069
1121
  "var(--shifl-color-primary-b80)",
1070
1122
  "var(--shifl-color-success-g70)",
1071
1123
  "var(--shifl-color-warning-o70)",
@@ -1075,254 +1127,256 @@ const xn = /* @__PURE__ */ q($n, [["render", An]]), Nn = { class: "shifl-grid re
1075
1127
  "var(--shifl-color-success-g60)",
1076
1128
  "var(--shifl-color-warning-o60)"
1077
1129
  ];
1078
- return t[Math.abs(n) % t.length];
1130
+ return n[Math.abs(t) % n.length];
1079
1131
  }
1080
- function Se(e, n = !0) {
1081
- const r = { ...{
1132
+ function Ae(e, t = !0) {
1133
+ const s = { ...{
1082
1134
  width: e.width ?? "160px",
1083
1135
  minWidth: e.width ?? "160px"
1084
- } }, i = Be.value > 0;
1136
+ } }, i = je.value > 0;
1085
1137
  if (e.freeze) {
1086
- const y = ut.value[e.key] ?? 0;
1087
- r.position = "sticky", r.left = `${y}px`, r.background = "#ffffff", r.boxShadow = i ? "2px 0 6px rgba(0, 0, 0, 0.12)" : "none", r.zIndex = n ? 40 : 10;
1138
+ const y = yt.value[e.key] ?? 0;
1139
+ s.position = "sticky", s.left = `${y}px`, s.background = "#ffffff", s.boxShadow = i ? "2px 0 6px rgba(0, 0, 0, 0.12)" : "none", s.zIndex = t ? 40 : 10;
1088
1140
  }
1089
- return n && (r.position = "sticky", r.top = "0px"), r;
1141
+ return t && (s.position = "sticky", s.top = "0px"), s;
1090
1142
  }
1091
- const At = b(() => p.value.filter((e) => !e.smartTrackingColumn));
1092
- function se(e) {
1143
+ const Bt = k(() => S.value.filter((e) => !e.smartTrackingColumn));
1144
+ function ue(e) {
1093
1145
  return !!e.actionColumn;
1094
1146
  }
1095
- function Te(e) {
1147
+ function Ne(e) {
1096
1148
  return !!e.smartTrackingColumn;
1097
1149
  }
1098
- function xt(e, n) {
1150
+ function Gt(e, t) {
1099
1151
  if (!e.smartTrackingColumn) return !1;
1100
- const t = e.smartTrackingColumn.dataKey, r = n[t];
1101
- if (r === !0 || r === 1) return !0;
1102
- if (typeof r == "string") {
1103
- const i = r.toLowerCase().trim();
1152
+ const n = e.smartTrackingColumn.dataKey, s = t[n];
1153
+ if (s === !0 || s === 1) return !0;
1154
+ if (typeof s == "string") {
1155
+ const i = s.toLowerCase().trim();
1104
1156
  return i === "true" || i === "1" || i === "yes";
1105
1157
  }
1106
1158
  return !1;
1107
1159
  }
1108
- function ie(e, n) {
1160
+ function ce(e, t) {
1109
1161
  if (!e.actionColumn) return null;
1110
- const t = e.actionColumn.icon;
1111
- return t ? typeof t == "function" ? t(n) : t : null;
1162
+ const n = e.actionColumn.icon;
1163
+ return n ? typeof n == "function" ? n(t) : n : null;
1112
1164
  }
1113
- function Nt(e, n, t, r) {
1114
- if (!t.actionColumn) return;
1115
- const i = r.currentTarget;
1116
- if (V.value.rowIndex === e) {
1117
- U();
1165
+ function It(e, t, n, s) {
1166
+ if (!n.actionColumn) return;
1167
+ const i = s.currentTarget;
1168
+ if (H.value.rowIndex === e) {
1169
+ Y();
1118
1170
  return;
1119
1171
  }
1120
- Ne.value = t, fe.value = n, F(e, i);
1172
+ Ve.value = n, pe.value = t, ie(e, i);
1121
1173
  }
1122
- function Rt(e, n) {
1123
- return !(e != null && e.actionColumn) || !n ? [] : (typeof e.actionColumn.actions == "function" ? e.actionColumn.actions(n) : e.actionColumn.actions).filter((r) => r.show ? r.show(n) : !0);
1174
+ function Ot(e, t) {
1175
+ return !(e != null && e.actionColumn) || !t ? [] : (typeof e.actionColumn.actions == "function" ? e.actionColumn.actions(t) : e.actionColumn.actions).filter((s) => s.show ? s.show(t) : !0);
1124
1176
  }
1125
- function zt(e, n, t) {
1126
- _("action-click", e.key, n, t), U();
1177
+ function Zt(e, t, n) {
1178
+ _("action-click", e.key, t, n), Y();
1127
1179
  }
1128
- function Dt(e, n) {
1129
- n && (Z.value[e] = n);
1180
+ function jt(e, t) {
1181
+ t && (ae.value[e] = t);
1130
1182
  }
1131
- function Je(e) {
1132
- if (V.value.rowIndex === null) return;
1133
- const n = e.target, t = ne.value, r = Object.values(Z.value), i = t == null ? void 0 : t.contains(n), y = r.some((A) => A.contains(n));
1134
- !i && !y && U();
1183
+ function tt(e) {
1184
+ if (H.value.rowIndex === null) return;
1185
+ const t = e.target, n = Ee.value, s = Object.values(ae.value), i = n == null ? void 0 : n.contains(t), y = s.some((x) => x.contains(t));
1186
+ !i && !y && Y();
1135
1187
  }
1136
- return le(() => {
1137
- document.addEventListener("click", Je);
1138
- }), ue(() => {
1139
- document.removeEventListener("click", Je);
1140
- }), (e, n) => (a(), u("div", Nn, [
1141
- h("div", Rn, [
1188
+ return de(() => {
1189
+ document.addEventListener("click", tt);
1190
+ }), ge(() => {
1191
+ document.removeEventListener("click", tt);
1192
+ }), (e, t) => (o(), l("div", In, [
1193
+ h("div", On, [
1142
1194
  h("button", {
1143
1195
  type: "button",
1144
1196
  class: "shifl-grid__pill-button whitespace-nowrap",
1145
- onClick: n[0] || (n[0] = (t) => Y.value = !0)
1197
+ onClick: t[0] || (t[0] = (n) => I.value = !0)
1146
1198
  }, " Edit Column ")
1147
1199
  ]),
1148
1200
  h("div", {
1149
- class: I(["shifl-grid__viewport", { "shifl-grid__viewport--scroll": tt.value }]),
1150
- onScroll: ct
1201
+ class: G(["shifl-grid__viewport", { "shifl-grid__viewport--scroll": ft.value }]),
1202
+ onScroll: bt
1151
1203
  }, [
1152
- h("table", zn, [
1204
+ h("table", Zn, [
1153
1205
  h("thead", null, [
1154
1206
  h("tr", null, [
1155
- (a(!0), u(x, null, H(Q.value, (t) => {
1156
- var r;
1157
- return a(), u("th", {
1158
- key: t.key,
1159
- style: j(Se(t, !0)),
1160
- onClick: () => ft(t.key),
1161
- class: I([
1207
+ (o(!0), l(R, null, V(X.value, (n) => {
1208
+ var s;
1209
+ return o(), l("th", {
1210
+ key: n.key,
1211
+ style: K(Ae(n, !0)),
1212
+ onClick: () => kt(n.key),
1213
+ class: G([
1162
1214
  "shifl-grid__header-cell",
1163
- `shifl-grid__header-align-${t != null && t.align ? t.align : "left"}`,
1215
+ `shifl-grid__header-align-${n != null && n.align ? n.align : "left"}`,
1164
1216
  {
1165
- "shifl-grid__cell--sticky": t.freeze,
1166
- "shifl-grid__sortable-col": t.sortable,
1167
- "shifl-grid__icon": t.cellType === "icon"
1217
+ "shifl-grid__cell--sticky": n.freeze,
1218
+ "shifl-grid__sortable-col": n.sortable,
1219
+ "shifl-grid__icon": n.cellType === "icon"
1168
1220
  }
1169
1221
  ])
1170
1222
  }, [
1171
- h("div", En, [
1172
- t.label ? (a(), u("span", Hn, L(t.label), 1)) : D("", !0),
1173
- ((r = E(P)) == null ? void 0 : r.key) === t.key && !se(t) && !Te(t) ? (a(), u("span", Vn, [
1174
- E(P).order === "asc" ? (a(), G(bn, { key: 0 })) : (a(), G(Mn, { key: 1 }))
1223
+ h("div", Fn, [
1224
+ n.label ? (o(), l("span", Kn, $(n.label), 1)) : D("", !0),
1225
+ ((s = E(N)) == null ? void 0 : s.key) === n.key && !ue(n) && !Ne(n) ? (o(), l("span", Wn, [
1226
+ E(N).order === "asc" ? (o(), Z(Ln, { key: 0 })) : (o(), Z(xn, { key: 1 }))
1175
1227
  ])) : D("", !0)
1176
1228
  ])
1177
- ], 14, Dn);
1229
+ ], 14, jn);
1178
1230
  }), 128))
1179
1231
  ])
1180
1232
  ]),
1181
1233
  h("tbody", null, [
1182
- W.value ? (a(!0), u(x, { key: 0 }, H(nt.value, (t) => (a(), u("tr", {
1183
- key: `skeleton-${t}`,
1234
+ W.value ? (o(!0), l(R, { key: 0 }, V(dt.value, (n) => (o(), l("tr", {
1235
+ key: `skeleton-${n}`,
1184
1236
  class: "shifl-grid__skeleton-row"
1185
1237
  }, [
1186
- (a(!0), u(x, null, H(Q.value, (r) => (a(), u("td", {
1187
- key: r.key,
1188
- style: j(Se(r, !1)),
1189
- class: I({ "shifl-grid__cell--sticky": r.freeze })
1190
- }, [...n[6] || (n[6] = [
1238
+ (o(!0), l(R, null, V(X.value, (s) => (o(), l("td", {
1239
+ key: s.key,
1240
+ style: K(Ae(s, !1)),
1241
+ class: G({ "shifl-grid__cell--sticky": s.freeze })
1242
+ }, [...t[6] || (t[6] = [
1191
1243
  h("div", { class: "shifl-grid__skeleton-cell" }, null, -1)
1192
1244
  ])], 6))), 128))
1193
- ]))), 128)) : (a(), u(x, { key: 1 }, [
1194
- De.value.length ? D("", !0) : (a(), u("tr", Bn, [
1245
+ ]))), 128)) : (o(), l(R, { key: 1 }, [
1246
+ Ge.value.length ? D("", !0) : (o(), l("tr", Jn, [
1195
1247
  h("td", {
1196
- colspan: Q.value.length,
1248
+ colspan: X.value.length,
1197
1249
  class: "text-center text-gray-500 py-6"
1198
- }, " No data ", 8, In)
1250
+ }, " No data ", 8, qn)
1199
1251
  ])),
1200
- (a(!0), u(x, null, H(De.value, (t, r) => (a(), u("tr", { key: r }, [
1201
- (a(!0), u(x, null, H(Q.value, (i) => (a(), u("td", {
1252
+ (o(!0), l(R, null, V(Ge.value, (n, s) => (o(), l("tr", { key: s }, [
1253
+ (o(!0), l(R, null, V(X.value, (i) => (o(), l("td", {
1202
1254
  key: i.key,
1203
- style: j(Se(i, !1)),
1204
- class: I([
1255
+ style: K(Ae(i, !1)),
1256
+ class: G([
1205
1257
  { "shifl-grid__cell--sticky": i.freeze },
1206
- { "shifl-grid__cell--action": se(i) },
1258
+ { "shifl-grid__cell--action": ue(i) },
1207
1259
  `shifl-grid__cell-align-${i != null && i.align ? i.align : "left"}`,
1208
1260
  { "shifl-grid__icon": i.cellType === "icon" }
1209
1261
  ])
1210
1262
  }, [
1211
- Te(i) ? (a(), u(x, { key: 0 }, [
1212
- xt(i, t) ? (a(), u("div", Gn, [
1213
- Pe(mn)
1263
+ Ne(i) ? (o(), l(R, { key: 0 }, [
1264
+ Gt(i, n) ? (o(), l("div", Un, [
1265
+ Re(Sn)
1214
1266
  ])) : D("", !0)
1215
- ], 64)) : se(i) ? (a(), u("button", {
1267
+ ], 64)) : ue(i) ? (o(), l("button", {
1216
1268
  key: 1,
1217
1269
  type: "button",
1218
1270
  class: "shifl-grid__action-icon",
1219
1271
  ref_for: !0,
1220
- ref: (y) => Dt(r, y),
1221
- onClick: J((y) => Nt(r, t, i, y), ["stop"])
1272
+ ref: (y) => jt(s, y),
1273
+ onClick: q((y) => It(s, n, i, y), ["stop"])
1222
1274
  }, [
1223
- ie(i, t) ? typeof ie(i, t) == "string" ? (a(), u("span", {
1275
+ ce(i, n) ? typeof ce(i, n) == "string" ? (o(), l("span", {
1224
1276
  key: 1,
1225
- innerHTML: ie(i, t),
1277
+ innerHTML: ce(i, n),
1226
1278
  class: "w-4 h-4 inline-block"
1227
- }, null, 8, Fn)) : (a(), G(ae(ie(i, t)), {
1279
+ }, null, 8, Xn)) : (o(), Z(fe(ce(i, n)), {
1228
1280
  key: 2,
1229
1281
  class: "w-4 h-4"
1230
- })) : (a(), u("span", On, "⋯"))
1231
- ], 8, Zn)) : vt(i) ? (a(), u("div", jn, [
1232
- (a(!0), u(x, null, H(_t(i), (y, A) => (a(), u(x, { key: A }, [
1233
- y === "icon" ? (a(), G(ae(je(t[i.key])), {
1282
+ })) : (o(), l("span", Qn, "⋯"))
1283
+ ], 8, Yn)) : Tt(i) ? (o(), l("div", er, [
1284
+ (o(!0), l(R, null, V(Pt(i), (y, x) => (o(), l(R, { key: x }, [
1285
+ y === "icon" ? (o(), Z(fe(qe(n[i.key])), {
1234
1286
  key: 0,
1235
1287
  class: "shifl-grid__type-icon"
1236
- })) : (a(), u("span", {
1288
+ })) : (o(), l("span", {
1237
1289
  key: 1,
1238
- class: I(yt(y))
1239
- }, L(We(t[i.key], y, i)), 3))
1290
+ class: G($t(y))
1291
+ }, $(Ye(n[i.key], y, i)), 3))
1240
1292
  ], 64))), 128))
1241
- ])) : mt(i) ? (a(), u("div", Wn, [
1242
- (a(), G(ae(je(t[i.key])), { class: "shifl-grid__type-icon" })),
1243
- t.container_count != null ? (a(), u("span", Kn, " (" + L(t.container_count) + ") ", 1)) : D("", !0)
1244
- ])) : ht(i) ? (a(), u("div", Jn, [
1245
- h("div", qn, [
1246
- h("div", {
1247
- ref_for: !0,
1248
- ref: "(el) => setTagsRef(col.key, rowIndex, el as HTMLElement)",
1249
- class: "shifl-grid__chips-container shifl-grid__chips-container--single-line"
1250
- }, [
1251
- (a(!0), u(x, null, H(Me(
1252
- t[i.key],
1293
+ ])) : St(i) ? (o(), l("div", tr, [
1294
+ (o(), Z(fe(qe(n[i.key])), { class: "shifl-grid__type-icon" })),
1295
+ n.container_count != null ? (o(), l("span", nr, " (" + $(n.container_count) + ") ", 1)) : D("", !0)
1296
+ ])) : Ue(i) ? (o(), l(R, { key: 4 }, [
1297
+ n[i.key] == null || Le(n[i.key], i.key, s).length === 0 ? (o(), l("div", rr, $(oe(i.blankStyle)), 1)) : (o(), l("div", sr, [
1298
+ h("div", ir, [
1299
+ h("div", {
1300
+ ref_for: !0,
1301
+ ref: "(el) => setTagsRef(col.key, rowIndex, el as HTMLElement)",
1302
+ class: "shifl-grid__chips-container shifl-grid__chips-container--single-line"
1303
+ }, [
1304
+ (o(!0), l(R, null, V(Ht(
1305
+ n[i.key],
1306
+ i.key,
1307
+ s
1308
+ ), (y, x) => (o(), l("span", {
1309
+ key: x,
1310
+ class: "shifl-grid__chip shifl-grid__chip--tag",
1311
+ style: K({ borderLeftColor: et(y) })
1312
+ }, $(y.name), 5))), 128))
1313
+ ], 512)
1314
+ ]),
1315
+ zt(n[i.key], i.key, s) ? (o(), l("button", {
1316
+ key: 0,
1317
+ type: "button",
1318
+ class: "shifl-grid__counter-button",
1319
+ onMouseenter: (y) => Pe(
1253
1320
  i.key,
1254
- r
1255
- ), (y, A) => (a(), u("span", {
1256
- key: A,
1257
- class: "shifl-grid__chip shifl-grid__chip--tag",
1258
- style: j({ borderLeftColor: $t(y) })
1259
- }, L(y), 5))), 128))
1260
- ], 512)
1261
- ]),
1262
- Tt(t[i.key], i.key, r) ? (a(), u("button", {
1263
- key: 0,
1264
- type: "button",
1265
- class: "shifl-grid__counter-button",
1266
- onMouseenter: (y) => Ce(
1267
- i.key,
1268
- r,
1269
- t[i.key],
1270
- y.currentTarget
1271
- ),
1272
- onMouseleave: we
1273
- }, " +" + L(Pt(t[i.key], i.key, r)), 41, Un)) : D("", !0)
1274
- ])) : pt(i) ? (a(), u("div", Yn, [
1275
- (a(!0), u(x, null, H(re(t[i.key]), (y, A) => (a(), u("span", {
1276
- key: A,
1321
+ s,
1322
+ n[i.key],
1323
+ y.currentTarget
1324
+ ),
1325
+ onMouseleave: $e
1326
+ }, " +" + $(Dt(n[i.key], i.key, s)), 41, ar)) : D("", !0)
1327
+ ]))
1328
+ ], 64)) : wt(i) ? (o(), l("div", or, [
1329
+ (o(!0), l(R, null, V(le(n[i.key]), (y, x) => (o(), l("span", {
1330
+ key: x,
1277
1331
  class: "shifl-grid__chip shifl-grid__chip--status"
1278
- }, L(y), 1))), 128))
1279
- ])) : i.truncate !== !1 && (i.truncate === !0 || gt(i.key)) ? (a(), u("div", Qn, [
1332
+ }, $(y), 1))), 128))
1333
+ ])) : i.truncate !== !1 && (i.truncate === !0 || Mt(i.key)) ? (o(), l("div", lr, [
1280
1334
  h("span", {
1281
1335
  class: "shifl-grid__truncated-text",
1282
1336
  ref_for: !0,
1283
- ref: (y) => Mt(i.key, r, y)
1284
- }, L(bt(t[i.key])), 513),
1285
- ke(i.key) && Ct(t[i.key]) ? (a(), u("button", {
1337
+ ref: (y) => xt(i.key, s, y)
1338
+ }, $(Lt(n[i.key], i)), 513),
1339
+ Te(i.key) && Nt(n[i.key]) ? (o(), l("button", {
1286
1340
  key: 0,
1287
1341
  type: "button",
1288
1342
  class: "shifl-grid__counter-button",
1289
- onMouseenter: (y) => Ce(
1343
+ onMouseenter: (y) => Pe(
1290
1344
  i.key,
1291
- r,
1292
- t[i.key],
1345
+ s,
1346
+ n[i.key],
1293
1347
  y.currentTarget
1294
1348
  ),
1295
- onMouseleave: we
1296
- }, " +" + L(wt(t[i.key])), 41, Xn)) : !ke(i.key) && kt(t[i.key], i.key) ? (a(), u("button", {
1349
+ onMouseleave: $e
1350
+ }, " +" + $(Rt(n[i.key])), 41, ur)) : !Te(i.key) && At(n[i.key], i.key) ? (o(), l("button", {
1297
1351
  key: 1,
1298
1352
  type: "button",
1299
1353
  class: "shifl-grid__info-icon-button",
1300
- onMouseenter: (y) => Ce(
1354
+ onMouseenter: (y) => Pe(
1301
1355
  i.key,
1302
- r,
1303
- t[i.key],
1356
+ s,
1357
+ n[i.key],
1304
1358
  y.currentTarget
1305
1359
  ),
1306
- onMouseleave: we
1360
+ onMouseleave: $e
1307
1361
  }, [
1308
- Pe(xn)
1309
- ], 40, er)) : D("", !0)
1310
- ])) : i.cellType === "link" ? (a(), u("a", {
1362
+ Re(Gn)
1363
+ ], 40, cr)) : D("", !0)
1364
+ ])) : i.cellType === "link" ? (o(), l("a", {
1311
1365
  key: 7,
1312
- href: String(t[i.key] || ""),
1366
+ href: String(n[i.key] || ""),
1313
1367
  class: "shifl-grid__link-cell",
1314
- onClick: n[1] || (n[1] = J(() => {
1368
+ onClick: t[1] || (t[1] = q(() => {
1315
1369
  }, ["stop"]))
1316
- }, L(be(t[i.key], i)), 9, tr)) : i.cellType === "progress" ? (a(), u("div", nr, [
1317
- h("div", rr, [
1370
+ }, $(Se(n[i.key], i)), 9, fr)) : i.cellType === "progress" ? (o(), l("div", dr, [
1371
+ h("div", gr, [
1318
1372
  h("div", {
1319
1373
  class: "shifl-grid__progress-fill",
1320
- style: j({ width: `${dt(t[i.key])}%` })
1374
+ style: K({ width: `${Ct(n[i.key])}%` })
1321
1375
  }, null, 4)
1322
1376
  ]),
1323
- h("span", sr, L(be(t[i.key], i)), 1)
1324
- ])) : (a(), u(x, { key: 9 }, [
1325
- ee(L(be(t[i.key], i)), 1)
1377
+ h("span", hr, $(Se(n[i.key], i)), 1)
1378
+ ])) : (o(), l(R, { key: 9 }, [
1379
+ re($(Se(n[i.key], i)), 1)
1326
1380
  ], 64))
1327
1381
  ], 6))), 128))
1328
1382
  ]))), 128))
@@ -1330,129 +1384,130 @@ const xn = /* @__PURE__ */ q($n, [["render", An]]), Nn = { class: "shifl-grid re
1330
1384
  ])
1331
1385
  ])
1332
1386
  ], 34),
1333
- z.value && z.value.show !== !1 ? (a(), u("div", ir, [
1334
- h("div", or, [
1335
- h("span", ar, [
1336
- n[7] || (n[7] = ee(" Showing ", -1)),
1337
- h("span", lr, L(Ee.value.from) + "–" + L(Ee.value.to), 1),
1338
- ee(" of " + L(me.value), 1)
1387
+ z.value && z.value.show !== !1 ? (o(), l("div", pr, [
1388
+ h("div", mr, [
1389
+ h("span", vr, [
1390
+ t[7] || (t[7] = re(" Showing ", -1)),
1391
+ h("span", _r, $(Ie.value.from) + "–" + $(Ie.value.to), 1),
1392
+ re(" of " + $(ke.value), 1)
1339
1393
  ])
1340
1394
  ]),
1341
- h("div", ur, [
1342
- h("div", cr, [
1343
- n[9] || (n[9] = h("label", { class: "shifl-grid__pagination-label" }, "Row per page", -1)),
1395
+ h("div", yr, [
1396
+ h("div", br, [
1397
+ t[9] || (t[9] = h("label", { class: "shifl-grid__pagination-label" }, "Row per page", -1)),
1344
1398
  h("select", {
1345
1399
  value: z.value.perPage || 20,
1346
1400
  disabled: W.value,
1347
- onChange: at,
1401
+ onChange: vt,
1348
1402
  class: "shifl-grid__pagination-select"
1349
- }, [...n[8] || (n[8] = [
1350
- Ht('<option value="20">20</option><option value="30">30</option><option value="50">50</option><option value="75">75</option><option value="100">100</option>', 5)
1351
- ])], 40, fr)
1403
+ }, [...t[8] || (t[8] = [
1404
+ Ft('<option value="20">20</option><option value="30">30</option><option value="50">50</option><option value="75">75</option><option value="100">100</option>', 5)
1405
+ ])], 40, kr)
1352
1406
  ]),
1353
- h("div", dr, [
1407
+ h("div", Cr, [
1354
1408
  h("button", {
1355
1409
  type: "button",
1356
1410
  class: "shifl-grid__pagination-button",
1357
- disabled: He.value || g.loading,
1358
- onClick: it,
1411
+ disabled: Oe.value || d.loading,
1412
+ onClick: pt,
1359
1413
  "aria-label": "Previous page"
1360
- }, " ‹ ", 8, gr),
1361
- h("div", hr, [
1362
- (a(!0), u(x, null, H(rt.value, (t) => (a(), u(x, { key: t }, [
1363
- t !== -1 ? (a(), u("button", {
1414
+ }, " ‹ ", 8, Mr),
1415
+ h("div", wr, [
1416
+ (o(!0), l(R, null, V(gt.value, (n) => (o(), l(R, { key: n }, [
1417
+ n !== -1 ? (o(), l("button", {
1364
1418
  key: 0,
1365
1419
  type: "button",
1366
- class: I(["shifl-grid__pagination-page", { "shifl-grid__pagination-page--active": t === K.value }]),
1420
+ class: G(["shifl-grid__pagination-page", { "shifl-grid__pagination-page--active": n === J.value }]),
1367
1421
  disabled: W.value,
1368
- onClick: (r) => st(t)
1369
- }, L(t), 11, pr)) : (a(), u("span", mr, "…"))
1422
+ onClick: (s) => ht(n)
1423
+ }, $(n), 11, Sr)) : (o(), l("span", Tr, "…"))
1370
1424
  ], 64))), 128))
1371
1425
  ]),
1372
1426
  h("button", {
1373
1427
  type: "button",
1374
1428
  class: "shifl-grid__pagination-button",
1375
- disabled: Ve.value || g.loading,
1376
- onClick: ot,
1429
+ disabled: Ze.value || d.loading,
1430
+ onClick: mt,
1377
1431
  "aria-label": "Next page"
1378
- }, " › ", 8, vr)
1432
+ }, " › ", 8, Pr)
1379
1433
  ])
1380
1434
  ])
1381
1435
  ])) : D("", !0),
1382
- (a(), G(Ae, { to: "body" }, [
1383
- E(V).rowIndex !== null && E(V).position ? (a(), u("div", {
1436
+ (o(), Z(ze, { to: "body" }, [
1437
+ E(H).rowIndex !== null && E(H).position ? (o(), l("div", {
1384
1438
  key: 0,
1385
1439
  ref_key: "actionMenuRef",
1386
- ref: ne,
1440
+ ref: Ee,
1387
1441
  class: "shifl-grid__action-menu",
1388
- style: j(`
1442
+ style: K(`
1389
1443
  position: fixed !important;
1390
- top: ${E(V).position.top}px !important;
1391
- left: ${E(V).position.left}px !important;
1444
+ top: ${E(H).position.top}px !important;
1445
+ left: ${E(H).position.left}px !important;
1392
1446
  z-index: 1000 !important;`),
1393
- onClick: n[2] || (n[2] = J(() => {
1447
+ onClick: t[2] || (t[2] = q(() => {
1394
1448
  }, ["stop"]))
1395
1449
  }, [
1396
- (a(!0), u(x, null, H(Rt(Ne.value, fe.value), (t) => (a(), u("div", {
1397
- key: t.key,
1398
- class: I(["shifl-grid__action-menu-item", { "shifl-grid__action-menu-item--danger": t.danger }]),
1399
- onClick: () => zt(t, fe.value, E(V).rowIndex)
1450
+ (o(!0), l(R, null, V(Ot(Ve.value, pe.value), (n) => (o(), l("div", {
1451
+ key: n.key,
1452
+ class: G(["shifl-grid__action-menu-item", { "shifl-grid__action-menu-item--danger": n.danger }]),
1453
+ onClick: () => Zt(n, pe.value, E(H).rowIndex)
1400
1454
  }, [
1401
- t.icon && typeof t.icon == "string" ? (a(), u("span", {
1455
+ n.icon && typeof n.icon == "string" ? (o(), l("span", {
1402
1456
  key: 0,
1403
- innerHTML: t.icon,
1457
+ innerHTML: n.icon,
1404
1458
  class: "w-4 h-4 inline-block"
1405
- }, null, 8, yr)) : t.icon ? (a(), G(ae(typeof t.icon == "function" ? t.icon() : t.icon), {
1459
+ }, null, 8, Lr)) : n.icon ? (o(), Z(fe(typeof n.icon == "function" ? n.icon() : n.icon), {
1406
1460
  key: 1,
1407
1461
  class: "w-4 h-4"
1408
1462
  })) : D("", !0),
1409
- h("span", null, L(t.label), 1)
1410
- ], 10, _r))), 128))
1463
+ h("span", null, $(n.label), 1)
1464
+ ], 10, $r))), 128))
1411
1465
  ], 4)) : D("", !0)
1412
1466
  ])),
1413
- Pe(dn, {
1414
- content: Re.value,
1415
- visible: de.value,
1416
- "trigger-element": ge.value
1417
- }, null, 8, ["content", "visible", "trigger-element"]),
1418
- (a(), G(Ae, { to: "body" }, [
1419
- Y.value ? (a(), G(un, {
1467
+ Re(kn, {
1468
+ content: Be.value,
1469
+ visible: me.value,
1470
+ "trigger-element": ve.value,
1471
+ "is-html": _e.value
1472
+ }, null, 8, ["content", "visible", "trigger-element", "is-html"]),
1473
+ (o(), Z(ze, { to: "body" }, [
1474
+ I.value ? (o(), Z(vn, {
1420
1475
  key: 0,
1421
- "title-prefix": o.config.name,
1422
- columns: At.value,
1423
- onClose: n[3] || (n[3] = (t) => Y.value = !1),
1424
- onToggle: E(C),
1425
- onToggleFreeze: E(m),
1426
- onMove: E(S),
1427
- onSelectAll: n[4] || (n[4] = (t) => E(l)(!0)),
1428
- onDeselectAll: n[5] || (n[5] = (t) => E(l)(!1)),
1429
- onRestoreDefault: E(N)
1476
+ "title-prefix": a.config.name,
1477
+ columns: Bt.value,
1478
+ onClose: t[3] || (t[3] = (n) => I.value = !1),
1479
+ onToggle: E(c),
1480
+ onToggleFreeze: E(C),
1481
+ onMove: E(L),
1482
+ onSelectAll: t[4] || (t[4] = (n) => E(g)(!0)),
1483
+ onDeselectAll: t[5] || (t[5] = (n) => E(g)(!1)),
1484
+ onRestoreDefault: E(A)
1430
1485
  }, null, 8, ["title-prefix", "columns", "onToggle", "onToggleFreeze", "onMove", "onRestoreDefault"])) : D("", !0)
1431
1486
  ]))
1432
1487
  ]));
1433
1488
  }
1434
- }), wr = {
1435
- install(o) {
1436
- o.component("ShiflGrid", br);
1489
+ }), Rr = {
1490
+ install(a) {
1491
+ a.component("ShiflGrid", Ar);
1437
1492
  }
1438
1493
  };
1439
- function Mr() {
1440
- const o = k(/* @__PURE__ */ new Set());
1441
- function s(g) {
1442
- const _ = g.id ?? JSON.stringify(g), c = new Set(o.value);
1443
- c.has(_) ? c.delete(_) : c.add(_), o.value = c;
1494
+ function xr() {
1495
+ const a = b(/* @__PURE__ */ new Set());
1496
+ function r(d) {
1497
+ const _ = d.id ?? JSON.stringify(d), f = new Set(a.value);
1498
+ f.has(_) ? f.delete(_) : f.add(_), a.value = f;
1444
1499
  }
1445
1500
  return {
1446
- selectedKeys: o,
1447
- toggleRow: s
1501
+ selectedKeys: a,
1502
+ toggleRow: r
1448
1503
  };
1449
1504
  }
1450
- function Sr() {
1505
+ function Hr() {
1451
1506
  return {
1452
1507
  // placeholder
1453
1508
  };
1454
1509
  }
1455
- const Qe = Symbol("shifl-grid-theme"), Xe = {
1510
+ const lt = Symbol("shifl-grid-theme"), ut = {
1456
1511
  surface: "var(--shifl-surface)",
1457
1512
  surfaceAlt: "var(--shifl-surface-alt)",
1458
1513
  border: "var(--shifl-border)",
@@ -1462,61 +1517,61 @@ const Qe = Symbol("shifl-grid-theme"), Xe = {
1462
1517
  accentStrong: "var(--shifl-accent-strong)",
1463
1518
  focus: "var(--shifl-focus)"
1464
1519
  };
1465
- function Tr(o) {
1466
- const s = k({ ...Xe, ...o });
1467
- return Vt(Qe, s), s;
1520
+ function zr(a) {
1521
+ const r = b({ ...ut, ...a });
1522
+ return Kt(lt, r), r;
1468
1523
  }
1469
- function Pr() {
1470
- const o = Bt(Qe);
1471
- return b(() => (o == null ? void 0 : o.value) ?? Xe);
1524
+ function Dr() {
1525
+ const a = Wt(lt);
1526
+ return k(() => (a == null ? void 0 : a.value) ?? ut);
1472
1527
  }
1473
- const $e = {
1528
+ const xe = {
1474
1529
  sm: 640,
1475
1530
  lg: 1024
1476
1531
  };
1477
- function $r() {
1478
- const o = k(typeof window < "u" ? window.innerWidth : 0);
1479
- function s() {
1480
- o.value = window.innerWidth;
1532
+ function Er() {
1533
+ const a = b(typeof window < "u" ? window.innerWidth : 0);
1534
+ function r() {
1535
+ a.value = window.innerWidth;
1481
1536
  }
1482
- return le(() => {
1483
- window.addEventListener("resize", s);
1484
- }), ue(() => {
1485
- window.removeEventListener("resize", s);
1537
+ return de(() => {
1538
+ window.addEventListener("resize", r);
1539
+ }), ge(() => {
1540
+ window.removeEventListener("resize", r);
1486
1541
  }), {
1487
- width: o,
1488
- isMobile: b(() => o.value < $e.sm),
1489
- isTablet: b(() => o.value >= $e.sm && o.value < $e.lg)
1542
+ width: a,
1543
+ isMobile: k(() => a.value < xe.sm),
1544
+ isTablet: k(() => a.value >= xe.sm && a.value < xe.lg)
1490
1545
  };
1491
1546
  }
1492
- function Lr() {
1547
+ function Vr() {
1493
1548
  return {
1494
1549
  // placeholder
1495
1550
  };
1496
1551
  }
1497
- function Ar() {
1552
+ function Br() {
1498
1553
  return {
1499
1554
  // placeholder
1500
1555
  };
1501
1556
  }
1502
- function xr() {
1557
+ function Gr() {
1503
1558
  return {
1504
1559
  // placeholder
1505
1560
  };
1506
1561
  }
1507
1562
  export {
1508
- br as ShiflGrid,
1509
- wr as ShiflGridPlugin,
1510
- Tr as provideGridTheme,
1511
- $r as useBreakpoints,
1512
- Gt as useGridColumns,
1513
- Wt as useGridData,
1514
- Sr as useGridEditing,
1515
- Ot as useGridFilter,
1516
- Lr as useGridInfiniteScroll,
1517
- Mr as useGridSelection,
1518
- Zt as useGridSort,
1519
- Pr as useGridTheme,
1520
- xr as useGridTour,
1521
- Ar as useVirtualScroll
1563
+ Ar as ShiflGrid,
1564
+ Rr as ShiflGridPlugin,
1565
+ zr as provideGridTheme,
1566
+ Er as useBreakpoints,
1567
+ qt as useGridColumns,
1568
+ en as useGridData,
1569
+ Hr as useGridEditing,
1570
+ Yt as useGridFilter,
1571
+ Vr as useGridInfiniteScroll,
1572
+ xr as useGridSelection,
1573
+ Ut as useGridSort,
1574
+ Dr as useGridTheme,
1575
+ Gr as useGridTour,
1576
+ Br as useVirtualScroll
1522
1577
  };