@shifl-inc/ui 0.9.2 → 0.9.4

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,460 +1,598 @@
1
- import { ref as b, computed as k, onMounted as ke, onUnmounted as Ce, watch as W, nextTick as Ge, defineComponent as Oe, createElementBlock as l, openBlock as a, withModifiers as J, createElementVNode as d, createCommentVNode as R, createTextVNode as ae, toDisplayString as $, Fragment as E, renderList as B, normalizeClass as G, createBlock as I, Teleport as be, normalizeStyle as F, createVNode as oe, unref as V, resolveDynamicComponent as ye, createStaticVNode as nn, provide as rn, inject as sn } from "vue";
2
- function on(o) {
3
- const s = (o.columns || []).map((_) => ({
4
- ..._,
5
- freeze: _.freeze ?? !1,
6
- visible: _.visible ?? !0,
7
- protected: _.protected ?? !1
8
- })), g = o.apiConfig ? "server" : o.searchMode || "client";
1
+ import { ref as b, computed as C, onMounted as we, onUnmounted as Me, watch as W, nextTick as Ze, defineComponent as ce, createElementBlock as d, openBlock as a, withModifiers as J, createElementVNode as g, createCommentVNode as H, createTextVNode as se, toDisplayString as P, Fragment as R, renderList as j, normalizeClass as I, createBlock as B, Teleport as Ce, normalizeStyle as F, unref as V, resolveDynamicComponent as ue, createVNode as ee, createStaticVNode as fn, provide as gn, inject as pn } from "vue";
2
+ function hn(i) {
3
+ const r = (i.columns || []).map((h) => ({
4
+ ...h,
5
+ freeze: h.freeze ?? !1,
6
+ visible: h.visible ?? !0,
7
+ protected: h.protected ?? !1
8
+ })), f = i.apiConfig ? "server" : i.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
+ ...i,
11
+ columns: r,
12
+ rows: i.rows ?? [],
13
+ search: i.search ?? [],
14
+ searchMode: f,
15
+ filters: i.filters ?? [],
16
+ paginationMeta: i.paginationMeta ? {
17
+ show: i.paginationMeta.show ?? !0,
18
+ currentPage: i.paginationMeta.currentPage ?? 1,
19
+ perPage: i.paginationMeta.perPage ?? 20,
20
+ total: i.paginationMeta.total ?? 0,
21
+ from: i.paginationMeta.from,
22
+ to: i.paginationMeta.to,
23
+ ...i.paginationMeta
24
24
  } : void 0
25
25
  };
26
26
  }
27
- function an(o) {
28
- const s = [...o], g = b([...o]);
29
- function _(p) {
30
- g.value = g.value.map(
31
- (f) => f.key === p ? { ...f, visible: !f.visible } : f
27
+ function mn(i) {
28
+ const r = [...i], f = b([...i]);
29
+ function h(u) {
30
+ f.value = f.value.map(
31
+ (c) => c.key === u ? { ...c, visible: !c.visible } : c
32
32
  );
33
33
  }
34
- function u(p) {
35
- g.value = g.value.map((f) => ({ ...f, visible: p }));
34
+ function l(u) {
35
+ f.value = f.value.map((c) => ({ ...c, visible: u }));
36
36
  }
37
- function y(p) {
38
- const f = g.value.map(
39
- (M) => M.key === p ? { ...M, freeze: !M.freeze } : M
40
- ), m = f.filter((M) => M.freeze), T = f.filter((M) => !M.freeze);
41
- g.value = [...m, ...T];
37
+ function m(u) {
38
+ const c = f.value.map(
39
+ (x) => x.key === u ? { ...x, freeze: !x.freeze } : x
40
+ ), _ = c.filter((x) => x.freeze), M = c.filter((x) => !x.freeze);
41
+ f.value = [..._, ...M];
42
42
  }
43
- function L(p, f) {
44
- if (p === f || f < 0 || f >= g.value.length) return;
45
- const m = g.value.findIndex((h) => !h.freeze), T = m === -1 ? g.value.length : m;
46
- if (p < T || f < T) return;
47
- const M = [...g.value], [c] = M.splice(p, 1);
48
- M.splice(f, 0, c), g.value = M;
43
+ function T(u, c) {
44
+ if (u === c || c < 0 || c >= f.value.length) return;
45
+ const _ = f.value.findIndex((v) => !v.freeze), M = _ === -1 ? f.value.length : _;
46
+ if (u < M || c < M) return;
47
+ const x = [...f.value], [p] = x.splice(u, 1);
48
+ x.splice(c, 0, p), f.value = x;
49
49
  }
50
- function P() {
51
- g.value = [...s];
50
+ function k() {
51
+ f.value = [...r];
52
52
  }
53
- const w = k(() => g.value.filter((p) => p.visible));
53
+ const w = C(() => f.value.filter((u) => u.visible));
54
54
  return {
55
- columns: g,
55
+ columns: f,
56
56
  visibleColumns: w,
57
- toggleColumnVisibility: _,
58
- setAllVisible: u,
59
- toggleFreeze: y,
60
- moveColumn: L,
61
- resetColumns: P
57
+ toggleColumnVisibility: h,
58
+ setAllVisible: l,
59
+ toggleFreeze: m,
60
+ moveColumn: T,
61
+ resetColumns: k
62
62
  };
63
63
  }
64
- function ln(o) {
65
- const s = b(o);
66
- function g(u) {
67
- var y;
68
- s.value = ((y = s.value) == null ? void 0 : y.key) === u && s.value.order === "asc" ? { key: u, order: "desc" } : { key: u, order: "asc" };
64
+ function vn(i) {
65
+ const r = b(i);
66
+ function f(l) {
67
+ var m;
68
+ r.value = ((m = r.value) == null ? void 0 : m.key) === l && r.value.order === "asc" ? { key: l, order: "desc" } : { key: l, order: "asc" };
69
69
  }
70
- function _(u) {
71
- if (!s.value) return u;
72
- const { key: y, order: L } = s.value;
73
- return [...u].sort((P, w) => {
74
- const p = P[y], f = w[y];
75
- if (p === f) return 0;
76
- if (p == null) return 1;
77
- if (f == null) return -1;
78
- const m = String(p).localeCompare(String(f), void 0, {
70
+ function h(l) {
71
+ if (!r.value) return l;
72
+ const { key: m, order: T } = r.value;
73
+ return [...l].sort((k, w) => {
74
+ const u = k[m], c = w[m];
75
+ if (u === c) return 0;
76
+ if (u == null) return 1;
77
+ if (c == null) return -1;
78
+ const _ = String(u).localeCompare(String(c), void 0, {
79
79
  numeric: !0
80
80
  });
81
- return L === "asc" ? m : -m;
81
+ return T === "asc" ? _ : -_;
82
82
  });
83
83
  }
84
84
  return {
85
- sort: s,
86
- setSort: g,
87
- applySort: _
85
+ sort: r,
86
+ setSort: f,
87
+ applySort: h
88
88
  };
89
89
  }
90
- function un() {
91
- function o(s, g, _) {
92
- const u = (_ || "").trim().toLowerCase();
93
- return u ? s.filter((y) => (g && g.length ? g.map((P) => y[P]) : Object.values(y)).some(
94
- (P) => String(P ?? "").toLowerCase().includes(u)
95
- )) : s;
90
+ function _n() {
91
+ function i(r, f, h) {
92
+ const l = (h || "").trim().toLowerCase();
93
+ return l ? r.filter((m) => (f && f.length ? f.map((k) => m[k]) : Object.values(m)).some(
94
+ (k) => String(k ?? "").toLowerCase().includes(l)
95
+ )) : r;
96
96
  }
97
97
  return {
98
- applyGlobalFilter: o
98
+ applyGlobalFilter: i
99
99
  };
100
100
  }
101
- function cn() {
102
- const o = b({
101
+ function yn() {
102
+ const i = b({
103
103
  rowIndex: null,
104
104
  position: null
105
105
  });
106
- function s(y, L, P = 200) {
107
- const w = L.getBoundingClientRect();
108
- let p = w.left;
109
- p + P > window.innerWidth - 8 && (p = window.innerWidth - P + 8), o.value = {
110
- rowIndex: y,
106
+ function r(m, T, k = 200) {
107
+ const w = T.getBoundingClientRect();
108
+ let u = w.left;
109
+ u + k > window.innerWidth - 8 && (u = window.innerWidth - k + 8), i.value = {
110
+ rowIndex: m,
111
111
  position: {
112
112
  top: w.bottom,
113
113
  // 4px below trigger
114
- left: p
114
+ left: u
115
115
  }
116
116
  };
117
117
  }
118
- function g() {
119
- o.value = {
118
+ function f() {
119
+ i.value = {
120
120
  rowIndex: null,
121
121
  position: null
122
122
  };
123
123
  }
124
- function _(y) {
125
- return o.value.rowIndex === y;
124
+ function h(m) {
125
+ return i.value.rowIndex === m;
126
126
  }
127
- function u(y) {
128
- y.key === "Escape" && o.value.rowIndex !== null && g();
127
+ function l(m) {
128
+ m.key === "Escape" && i.value.rowIndex !== null && f();
129
129
  }
130
- return ke(() => {
131
- document.addEventListener("keydown", u);
132
- }), Ce(() => {
133
- document.removeEventListener("keydown", u);
130
+ return we(() => {
131
+ document.addEventListener("keydown", l);
132
+ }), Me(() => {
133
+ document.removeEventListener("keydown", l);
134
134
  }), {
135
- menuState: o,
136
- openMenu: s,
137
- closeMenu: g,
138
- isMenuOpen: _
135
+ menuState: i,
136
+ openMenu: r,
137
+ closeMenu: f,
138
+ isMenuOpen: h
139
139
  };
140
140
  }
141
- function fn(o, s) {
142
- const g = b(!1), _ = b(null), u = b([]), y = b(void 0);
143
- let L = null;
144
- function P(c) {
145
- const h = new URLSearchParams();
146
- if (c.search && h.append("search", c.search), c.page !== void 0 && h.append("page", String(c.page)), c.perPage !== void 0 && h.append("per_page", String(c.perPage)), c.sort && (h.append("sort", c.sort.key), h.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 N = `filters[${C.key}]`;
149
- Array.isArray(C.value) ? C.value.forEach((A) => h.append(`${N}[]`, String(A))) : h.append(N, String(C.value));
141
+ function bn(i, r) {
142
+ const f = b(!1), h = b(null), l = b([]), m = b(void 0);
143
+ let T = null;
144
+ function k(p) {
145
+ const v = new URLSearchParams();
146
+ if (p.search && v.append("search", p.search), p.page !== void 0 && v.append("page", String(p.page)), p.perPage !== void 0 && v.append("per_page", String(p.perPage)), p.sort && (v.append("sort", p.sort.key), v.append("order", p.sort.order)), p.filters && p.filters.length > 0 && p.filters.forEach((S) => {
147
+ if (S.value !== void 0 && S.value !== null && S.value !== "") {
148
+ const E = `filters[${S.key}]`;
149
+ Array.isArray(S.value) ? S.value.forEach((L) => v.append(`${E}[]`, String(L))) : v.append(E, String(S.value));
150
150
  }
151
- }), c.tabName && h.append("tabName", c.tabName), s != null && s.additionalParams) {
152
- const C = typeof s.additionalParams == "function" ? s.additionalParams(c) : s.additionalParams;
153
- Object.entries(C).forEach(([N, A]) => {
154
- N === "tabName" && c.tabName || A != null && A !== "" && (Array.isArray(A) ? A.forEach((x) => h.append(`${N}[]`, String(x))) : h.append(N, String(A)));
151
+ }), p.tabName && v.append("tabName", p.tabName), r != null && r.additionalParams) {
152
+ const S = typeof r.additionalParams == "function" ? r.additionalParams(p) : r.additionalParams;
153
+ Object.entries(S).forEach(([E, L]) => {
154
+ E === "tabName" && p.tabName || L != null && L !== "" && (Array.isArray(L) ? L.forEach((N) => v.append(`${E}[]`, String(N))) : v.append(E, String(L)));
155
155
  });
156
156
  }
157
- return h;
157
+ return v;
158
158
  }
159
- function w(c) {
160
- var h, C, N;
161
- return s != null && s.bodyBuilder ? s.bodyBuilder(c) : {
162
- search: c.search,
163
- page: c.page,
164
- per_page: c.perPage,
165
- sort: (h = c.sort) == null ? void 0 : h.key,
166
- order: (C = c.sort) == null ? void 0 : C.order,
167
- tabName: c.tabName,
159
+ function w(p) {
160
+ var v, S, E;
161
+ return r != null && r.bodyBuilder ? r.bodyBuilder(p) : {
162
+ search: p.search,
163
+ page: p.page,
164
+ per_page: p.perPage,
165
+ sort: (v = p.sort) == null ? void 0 : v.key,
166
+ order: (S = p.sort) == null ? void 0 : S.order,
167
+ tabName: p.tabName,
168
168
  // Use tabName from context
169
- filters: (N = c.filters) == null ? void 0 : N.reduce(
170
- (A, x) => (x.value !== void 0 && x.value !== null && x.value !== "" && (A[x.key] = x.value), A),
169
+ filters: (E = p.filters) == null ? void 0 : E.reduce(
170
+ (L, N) => (N.value !== void 0 && N.value !== null && N.value !== "" && (L[N.key] = N.value), L),
171
171
  {}
172
172
  ),
173
173
  // Merge additional params, but don't override tabName if context has it
174
- ...typeof (s == null ? void 0 : s.additionalParams) == "function" ? s.additionalParams(c) : Object.fromEntries(
175
- Object.entries((s == null ? void 0 : s.additionalParams) || {}).filter(
176
- ([A]) => A !== "tabName" || !c.tabName
174
+ ...typeof (r == null ? void 0 : r.additionalParams) == "function" ? r.additionalParams(p) : Object.fromEntries(
175
+ Object.entries((r == null ? void 0 : r.additionalParams) || {}).filter(
176
+ ([L]) => L !== "tabName" || !p.tabName
177
177
  )
178
178
  ) || {}
179
179
  };
180
180
  }
181
- function p() {
182
- const c = {
181
+ function u() {
182
+ const p = {
183
183
  "Content-Type": "application/json",
184
- ...(s == null ? void 0 : s.headers) || {}
184
+ ...(r == null ? void 0 : r.headers) || {}
185
185
  };
186
- if (s != null && s.getAuthToken) {
187
- const h = s.getAuthToken();
188
- h && (c.Authorization = `Bearer ${h}`);
186
+ if (r != null && r.getAuthToken) {
187
+ const v = r.getAuthToken();
188
+ v && (p.Authorization = `Bearer ${v}`);
189
189
  }
190
- return c;
190
+ return p;
191
191
  }
192
- function f(c) {
193
- if (s != null && s.responseTransformer)
194
- return s.responseTransformer(c);
195
- const h = c;
192
+ function c(p) {
193
+ if (r != null && r.responseTransformer)
194
+ return r.responseTransformer(p);
195
+ const v = p;
196
196
  return {
197
- data: h.data || h.rows || [],
198
- meta: h.meta
197
+ data: v.data || v.rows || [],
198
+ meta: v.meta
199
199
  };
200
200
  }
201
- async function m(c) {
202
- if (!o) {
203
- _.value = new Error("API URL is required");
201
+ async function _(p) {
202
+ if (!i) {
203
+ h.value = new Error("API URL is required");
204
204
  return;
205
205
  }
206
- g.value = !0, _.value = null;
206
+ f.value = !0, h.value = null;
207
207
  try {
208
- const h = (s == null ? void 0 : s.method) || "GET", C = p();
209
- let N = o, A;
210
- if (h === "GET") {
211
- const ne = s != null && s.paramsBuilder ? s.paramsBuilder(c) : P(c);
212
- if (ne instanceof URLSearchParams) {
213
- const z = ne.toString();
214
- N = z ? `${o}?${z}` : o;
208
+ const v = (r == null ? void 0 : r.method) || "GET", S = u();
209
+ let E = i, L;
210
+ if (v === "GET") {
211
+ const ie = r != null && r.paramsBuilder ? r.paramsBuilder(p) : k(p);
212
+ if (ie instanceof URLSearchParams) {
213
+ const z = ie.toString();
214
+ E = z ? `${i}?${z}` : i;
215
215
  } else {
216
216
  const z = new URLSearchParams();
217
- Object.entries(ne).forEach(([Q, O]) => {
218
- O != null && O !== "" && (Array.isArray(O) ? O.forEach((ce) => z.append(`${Q}[]`, String(ce))) : z.append(Q, String(O)));
217
+ Object.entries(ie).forEach(([te, O]) => {
218
+ O != null && O !== "" && (Array.isArray(O) ? O.forEach((ge) => z.append(`${te}[]`, String(ge))) : z.append(te, String(O)));
219
219
  });
220
- const ue = z.toString();
221
- N = ue ? `${o}?${ue}` : o;
220
+ const fe = z.toString();
221
+ E = fe ? `${i}?${fe}` : i;
222
222
  }
223
223
  } else
224
- A = w(c);
225
- const x = await fetch(N, {
226
- method: h,
227
- headers: C,
228
- body: A ? JSON.stringify(A) : void 0
224
+ L = w(p);
225
+ const N = await fetch(E, {
226
+ method: v,
227
+ headers: S,
228
+ body: L ? JSON.stringify(L) : void 0
229
229
  });
230
- if (!x.ok)
231
- throw new Error(`API request failed: ${x.status} ${x.statusText}`);
232
- const we = await x.json(), le = f(we);
233
- u.value = le.data, y.value = le.meta;
234
- } catch (h) {
235
- _.value = h instanceof Error ? h : new Error("Unknown error occurred"), u.value = [], y.value = void 0;
230
+ if (!N.ok)
231
+ throw new Error(`API request failed: ${N.status} ${N.statusText}`);
232
+ const Te = await N.json(), de = c(Te);
233
+ l.value = de.data, m.value = de.meta;
234
+ } catch (v) {
235
+ h.value = v instanceof Error ? v : new Error("Unknown error occurred"), l.value = [], m.value = void 0;
236
236
  } finally {
237
- g.value = !1;
237
+ f.value = !1;
238
238
  }
239
239
  }
240
- function T(c, h = !1) {
241
- L && (clearTimeout(L), L = null);
242
- const C = (s == null ? void 0 : s.debounceMs) ?? 300;
243
- h || !c.search ? m(c) : L = setTimeout(() => {
244
- m(c);
245
- }, C);
240
+ function M(p, v = !1) {
241
+ T && (clearTimeout(T), T = null);
242
+ const S = (r == null ? void 0 : r.debounceMs) ?? 300;
243
+ v || !p.search ? _(p) : T = setTimeout(() => {
244
+ _(p);
245
+ }, S);
246
246
  }
247
- function M(c) {
248
- T(c, !0);
247
+ function x(p) {
248
+ M(p, !0);
249
249
  }
250
250
  return {
251
- loading: k(() => g.value),
252
- error: k(() => _.value),
253
- data: k(() => u.value),
254
- paginationMeta: k(() => y.value),
255
- fetchData: m,
256
- fetchDataDebounced: T,
257
- refresh: M
251
+ loading: C(() => f.value),
252
+ error: C(() => h.value),
253
+ data: C(() => l.value),
254
+ paginationMeta: C(() => m.value),
255
+ fetchData: _,
256
+ fetchDataDebounced: M,
257
+ refresh: x
258
258
  };
259
259
  }
260
- function dn(o, s) {
261
- var w, p;
262
- const g = (s == null ? void 0 : s.search) || b(void 0), _ = (s == null ? void 0 : s.filters) || b(o.filters), u = (s == null ? void 0 : s.sort) || b(o.sort), y = (s == null ? void 0 : s.pagination) || b({
263
- page: ((w = o.paginationMeta) == null ? void 0 : w.currentPage) || 1,
264
- perPage: ((p = o.paginationMeta) == null ? void 0 : p.perPage) || 20
265
- }), L = (s == null ? void 0 : s.extraState) || b(void 0), P = (s == null ? void 0 : s.tabName) || b(void 0);
266
- if (o.apiConfig && o.searchMode === "server") {
267
- let f = function() {
268
- var h, C;
260
+ function kn(i, r) {
261
+ var w, u;
262
+ const f = (r == null ? void 0 : r.search) || b(void 0), h = (r == null ? void 0 : r.filters) || b(i.filters), l = (r == null ? void 0 : r.sort) || b(i.sort), m = (r == null ? void 0 : r.pagination) || b({
263
+ page: ((w = i.paginationMeta) == null ? void 0 : w.currentPage) || 1,
264
+ perPage: ((u = i.paginationMeta) == null ? void 0 : u.perPage) || 20
265
+ }), T = (r == null ? void 0 : r.extraState) || b(void 0), k = (r == null ? void 0 : r.tabName) || b(void 0);
266
+ if (i.apiConfig && i.searchMode === "server") {
267
+ let c = function() {
268
+ var v, S;
269
269
  return {
270
- search: g.value,
271
- filters: _.value,
272
- sort: u.value,
273
- page: (h = y.value) == null ? void 0 : h.page,
274
- perPage: (C = y.value) == null ? void 0 : C.perPage,
275
- extraState: L.value,
276
- tabName: P.value
270
+ search: f.value,
271
+ filters: h.value,
272
+ sort: l.value,
273
+ page: (v = m.value) == null ? void 0 : v.page,
274
+ perPage: (S = m.value) == null ? void 0 : S.perPage,
275
+ extraState: T.value,
276
+ tabName: k.value
277
277
  };
278
- }, m = function(h) {
279
- var C, N, A, x;
280
- return c ? h.search !== c.search || h.page !== c.page || h.perPage !== c.perPage || h.tabName !== c.tabName || ((C = h.sort) == null ? void 0 : C.key) !== ((N = c.sort) == null ? void 0 : N.key) || ((A = h.sort) == null ? void 0 : A.order) !== ((x = c.sort) == null ? void 0 : x.order) || JSON.stringify(h.filters) !== JSON.stringify(c.filters) || JSON.stringify(h.extraState) !== JSON.stringify(c.extraState) : !0;
278
+ }, _ = function(v) {
279
+ var S, E, L, N;
280
+ return p ? v.search !== p.search || v.page !== p.page || v.perPage !== p.perPage || v.tabName !== p.tabName || ((S = v.sort) == null ? void 0 : S.key) !== ((E = p.sort) == null ? void 0 : E.key) || ((L = v.sort) == null ? void 0 : L.order) !== ((N = p.sort) == null ? void 0 : N.order) || JSON.stringify(v.filters) !== JSON.stringify(p.filters) || JSON.stringify(v.extraState) !== JSON.stringify(p.extraState) : !0;
281
281
  };
282
- const T = fn(o.apiConfig.apiUrl, o.apiConfig);
283
- let M = !1, c = null;
282
+ const M = bn(i.apiConfig.apiUrl, i.apiConfig);
283
+ let x = !1, p = null;
284
284
  return W(
285
- [g, _, u, y, L, P],
285
+ [f, h, l, m, T, k],
286
286
  () => {
287
- if (M)
287
+ if (x)
288
288
  return;
289
- const h = f();
290
- if (!m(h))
289
+ const v = c();
290
+ if (!_(v))
291
291
  return;
292
- c = h;
293
- const C = g.value !== void 0;
294
- T.fetchDataDebounced(h, !C);
292
+ p = v;
293
+ const S = f.value !== void 0;
294
+ M.fetchDataDebounced(v, !S);
295
295
  },
296
296
  { immediate: !0, deep: !0 }
297
- ), W(T.paginationMeta, (h) => {
298
- if (h && y.value) {
299
- const C = h.perPage || y.value.perPage;
300
- C !== y.value.perPage && (M = !0, y.value.perPage = C, Ge(() => {
301
- M = !1;
297
+ ), W(M.paginationMeta, (v) => {
298
+ if (v && m.value) {
299
+ const S = v.perPage || m.value.perPage;
300
+ S !== m.value.perPage && (x = !0, m.value.perPage = S, Ze(() => {
301
+ x = !1;
302
302
  }));
303
303
  }
304
304
  }), {
305
- rows: T.data,
306
- loading: T.loading,
307
- error: T.error,
308
- paginationMeta: T.paginationMeta,
305
+ rows: M.data,
306
+ loading: M.loading,
307
+ error: M.error,
308
+ paginationMeta: M.paginationMeta,
309
309
  refresh: () => {
310
- var C, N;
311
- const h = {
312
- search: g.value,
313
- filters: _.value,
314
- sort: u.value,
315
- page: (C = y.value) == null ? void 0 : C.page,
316
- perPage: (N = y.value) == null ? void 0 : N.perPage,
317
- extraState: L.value,
318
- tabName: P.value
310
+ var S, E;
311
+ const v = {
312
+ search: f.value,
313
+ filters: h.value,
314
+ sort: l.value,
315
+ page: (S = m.value) == null ? void 0 : S.page,
316
+ perPage: (E = m.value) == null ? void 0 : E.perPage,
317
+ extraState: T.value,
318
+ tabName: k.value
319
319
  };
320
- T.refresh(h);
320
+ M.refresh(v);
321
321
  }
322
322
  };
323
323
  }
324
324
  return {
325
- rows: k(() => o.rows),
326
- loading: k(() => !1),
327
- error: k(() => null),
328
- paginationMeta: k(() => o.paginationMeta),
325
+ rows: C(() => i.rows),
326
+ loading: C(() => !1),
327
+ error: C(() => null),
328
+ paginationMeta: C(() => i.paginationMeta),
329
329
  refresh: () => {
330
330
  }
331
331
  };
332
332
  }
333
- const gn = { class: "shifl-column-manager__header" }, hn = { class: "shifl-column-manager__title-wrapper" }, pn = { class: "shifl-column-manager__title" }, mn = { key: 0 }, vn = { key: 1 }, _n = { class: "shifl-column-manager__controls" }, yn = { class: "shifl-column-manager__controls-left" }, bn = { class: "shifl-column-manager__content" }, kn = { class: "shifl-column-manager__list" }, Cn = ["draggable", "onDragstart", "onDragover", "onDrop"], wn = ["aria-label", "disabled"], Mn = ["checked", "disabled", "onChange"], Tn = { class: "shifl-column-manager__label-text" }, Sn = { class: "shifl-column-manager__footer" }, Pn = /* @__PURE__ */ Oe({
333
+ function Cn(i) {
334
+ const { rows: r, columns: f } = i;
335
+ if (r.length === 0)
336
+ return "";
337
+ const h = f.filter((T) => T.visible && T.key !== "_actions").sort((T, k) => (T.order || 0) - (k.order || 0)), m = [h.map((T) => `"${T.label || T.key}"`).join(",")];
338
+ return r.forEach((T) => {
339
+ const k = h.map((w) => {
340
+ const u = T[w.key];
341
+ let c = "";
342
+ u == null ? c = "" : Array.isArray(u) ? c = u.map(
343
+ (M) => typeof M == "object" && M !== null && "name" in M ? M.name : String(M)
344
+ ).join(", ") : typeof u == "object" && u !== null ? c = "name" in u ? String(u.name) : JSON.stringify(u) : c = String(u);
345
+ const _ = c.replace(/\r?\n/g, " ");
346
+ return _.includes('"') || _.includes(",") ? c = `"${_.replace(/"/g, '""')}"` : c = _, c;
347
+ });
348
+ m.push(k.join(","));
349
+ }), m.join(`
350
+ `);
351
+ }
352
+ function _t(i, r, f) {
353
+ const h = new Blob([i], { type: f }), l = window.URL.createObjectURL(h), m = document.createElement("a");
354
+ m.href = l, m.download = r, document.body.appendChild(m), m.click(), document.body.removeChild(m), window.URL.revokeObjectURL(l);
355
+ }
356
+ function pt(i, r) {
357
+ const f = Cn(i), h = r.endsWith(".csv") ? r : `${r}.csv`;
358
+ _t(f, h, "text/csv;charset=utf-8;");
359
+ }
360
+ function wn(i, r) {
361
+ const { rows: f, columns: h } = i, l = h.filter((k) => k.visible && k.key !== "_actions").sort((k, w) => (k.order || 0) - (w.order || 0));
362
+ let m = `
363
+ <!DOCTYPE html>
364
+ <html>
365
+ <head>
366
+ <meta charset="utf-8">
367
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
368
+ <title>Export Data</title>
369
+ <style>
370
+ table {
371
+ border-collapse: collapse;
372
+ width: 100%;
373
+ font-size: 14px;
374
+ }
375
+ th, td {
376
+ border: 1px solid #ddd;
377
+ padding: 8px;
378
+ vertical-align: top;
379
+ word-wrap: break-word;
380
+ white-space: pre-wrap; /* Preserve line breaks in Excel */
381
+ }
382
+ th {
383
+ background-color: #f5f5f5;
384
+ font-weight: normal;
385
+ text-align: left;
386
+ }
387
+ td {
388
+ text-align: left;
389
+ }
390
+ </style>
391
+ </head>
392
+ <body>
393
+ <table>
394
+ <colgroup>
395
+ `;
396
+ l.forEach((k) => {
397
+ const w = k.width || "auto", u = k.align || "left";
398
+ m += ` <col style="width: ${w}; text-align: ${u};">
399
+ `;
400
+ }), m += `
401
+ </colgroup>
402
+ <thead>
403
+ <tr>
404
+ `, l.forEach((k) => {
405
+ m += ` <th>${ht(k.label || k.key)}</th>
406
+ `;
407
+ }), m += `
408
+ </tr>
409
+ </thead>
410
+ <tbody>
411
+ `, f.forEach((k) => {
412
+ m += ` <tr>
413
+ `, l.forEach((w) => {
414
+ const u = k[w.key];
415
+ let c = "";
416
+ u == null ? c = "" : Array.isArray(u) ? c = u.map(
417
+ (M) => typeof M == "object" && M !== null && "name" in M ? M.name : String(M)
418
+ ).join(", ") : typeof u == "object" && u !== null ? c = "name" in u ? String(u.name) : JSON.stringify(u) : c = String(u);
419
+ const _ = c.replace(/\r?\n/g, `
420
+ `);
421
+ m += ` <td>${ht(_)}</td>
422
+ `;
423
+ }), m += ` </tr>
424
+ `;
425
+ }), m += `
426
+ </tbody>
427
+ </table>
428
+ </body>
429
+ </html>`;
430
+ const T = r.endsWith(".xlsx") ? r : `${r}.xlsx`;
431
+ _t(m, T, "application/vnd.ms-excel");
432
+ }
433
+ function ht(i) {
434
+ const r = document.createElement("div");
435
+ return r.textContent = i, r.innerHTML;
436
+ }
437
+ function Mn(i) {
438
+ const { exportType: r, fileName: f, data: h } = i;
439
+ if (!h.rows || h.rows.length === 0) {
440
+ console.warn("No data to export");
441
+ return;
442
+ }
443
+ switch (r) {
444
+ case "csv":
445
+ pt(h, f);
446
+ break;
447
+ case "excel":
448
+ case "xlsx":
449
+ wn(h, f);
450
+ break;
451
+ default:
452
+ pt(h, f);
453
+ break;
454
+ }
455
+ }
456
+ function Tn(i, r, f, h) {
457
+ return {
458
+ rows: [...i],
459
+ columns: [...r],
460
+ sort: f,
461
+ filters: h
462
+ };
463
+ }
464
+ function mt(i) {
465
+ const r = [];
466
+ return (!i.exportFileName || i.exportFileName.trim() === "") && r.push("Export file name is required"), i.exportType ? ["csv", "excel", "xlsx"].includes(i.exportType) || r.push("Invalid export type. Must be csv, excel, or xlsx") : r.push("Export type is required"), i.source ? ["client", "server"].includes(i.source) || r.push("Invalid export source. Must be client or server") : r.push("Export source is required"), {
467
+ isValid: r.length === 0,
468
+ errors: r
469
+ };
470
+ }
471
+ const Sn = { class: "shifl-column-manager__header" }, xn = { class: "shifl-column-manager__title-wrapper" }, $n = { class: "shifl-column-manager__title" }, Pn = { key: 0 }, Ln = { key: 1 }, Nn = { class: "shifl-column-manager__controls" }, En = { class: "shifl-column-manager__controls-left" }, An = { class: "shifl-column-manager__content" }, Hn = { class: "shifl-column-manager__list" }, Rn = ["draggable", "onDragstart", "onDragover", "onDrop"], Vn = ["aria-label", "disabled"], zn = ["checked", "disabled", "onChange"], Dn = { class: "shifl-column-manager__label-text" }, jn = { class: "shifl-column-manager__footer" }, Bn = /* @__PURE__ */ ce({
334
472
  __name: "GridColumnManager",
335
473
  props: {
336
474
  titlePrefix: {},
337
475
  columns: {}
338
476
  },
339
477
  emits: ["close", "toggle", "move", "toggleFreeze", "selectAll", "deselectAll", "restoreDefault"],
340
- setup(o, { emit: s }) {
341
- const g = o, _ = k(() => g.columns), u = s, y = b(null);
342
- function L(p) {
343
- var f, m;
344
- (f = g.columns[p]) != null && f.freeze || (m = g.columns[p]) != null && m.protected || (y.value = p);
478
+ setup(i, { emit: r }) {
479
+ const f = i, h = C(() => f.columns), l = r, m = b(null);
480
+ function T(u) {
481
+ var c, _;
482
+ (c = f.columns[u]) != null && c.freeze || (_ = f.columns[u]) != null && _.protected || (m.value = u);
345
483
  }
346
- function P(p) {
484
+ function k(u) {
347
485
  }
348
- function w(p) {
349
- y.value === null || y.value === p || (u("move", y.value, p), y.value = null);
486
+ function w(u) {
487
+ m.value === null || m.value === u || (l("move", m.value, u), m.value = null);
350
488
  }
351
- return (p, f) => (a(), l("div", {
489
+ return (u, c) => (a(), d("div", {
352
490
  class: "shifl-column-manager__backdrop",
353
- onClick: f[7] || (f[7] = J((m) => p.$emit("close"), ["self"]))
491
+ onClick: c[7] || (c[7] = J((_) => u.$emit("close"), ["self"]))
354
492
  }, [
355
- d("div", {
493
+ g("div", {
356
494
  class: "shifl-column-manager__dialog",
357
495
  role: "dialog",
358
496
  "aria-modal": "true",
359
- onClick: f[6] || (f[6] = J(() => {
497
+ onClick: c[6] || (c[6] = J(() => {
360
498
  }, ["stop"]))
361
499
  }, [
362
- d("header", gn, [
363
- d("div", hn, [
364
- d("h2", pn, [
365
- o.titlePrefix ? (a(), l("span", mn, $(o.titlePrefix), 1)) : R("", !0),
366
- o.titlePrefix ? (a(), l("span", vn, ">")) : R("", !0),
367
- f[8] || (f[8] = ae("Edit Columns ", -1))
500
+ g("header", Sn, [
501
+ g("div", xn, [
502
+ g("h2", $n, [
503
+ i.titlePrefix ? (a(), d("span", Pn, P(i.titlePrefix), 1)) : H("", !0),
504
+ i.titlePrefix ? (a(), d("span", Ln, ">")) : H("", !0),
505
+ c[8] || (c[8] = se("Edit Columns ", -1))
368
506
  ])
369
507
  ]),
370
- d("button", {
508
+ g("button", {
371
509
  type: "button",
372
510
  class: "shifl-column-manager__close",
373
- onClick: f[0] || (f[0] = (m) => p.$emit("close"))
374
- }, [...f[9] || (f[9] = [
375
- d("span", null, "✕", -1)
511
+ onClick: c[0] || (c[0] = (_) => u.$emit("close"))
512
+ }, [...c[9] || (c[9] = [
513
+ g("span", null, "✕", -1)
376
514
  ])])
377
515
  ]),
378
- d("div", _n, [
379
- d("div", yn, [
380
- d("button", {
516
+ g("div", Nn, [
517
+ g("div", En, [
518
+ g("button", {
381
519
  type: "button",
382
520
  class: "shifl-column-manager__link-button",
383
- onClick: f[1] || (f[1] = (m) => p.$emit("selectAll"))
521
+ onClick: c[1] || (c[1] = (_) => u.$emit("selectAll"))
384
522
  }, " Select All "),
385
- d("button", {
523
+ g("button", {
386
524
  type: "button",
387
525
  class: "shifl-column-manager__link-button",
388
- onClick: f[2] || (f[2] = (m) => p.$emit("deselectAll"))
526
+ onClick: c[2] || (c[2] = (_) => u.$emit("deselectAll"))
389
527
  }, " Deselect All ")
390
528
  ]),
391
- d("button", {
529
+ g("button", {
392
530
  type: "button",
393
531
  class: "shifl-column-manager__link-button shifl-column-manager__link-button--primary",
394
- onClick: f[3] || (f[3] = (m) => p.$emit("restoreDefault"))
532
+ onClick: c[3] || (c[3] = (_) => u.$emit("restoreDefault"))
395
533
  }, " Restore Default ")
396
534
  ]),
397
- d("div", bn, [
398
- d("ul", kn, [
399
- (a(!0), l(E, null, B(_.value, (m, T) => (a(), l("li", {
400
- key: m.key,
401
- class: G(["shifl-column-manager__item", {
402
- "shifl-column-manager__item--disabled": m.freeze || m.protected
535
+ g("div", An, [
536
+ g("ul", Hn, [
537
+ (a(!0), d(R, null, j(h.value, (_, M) => (a(), d("li", {
538
+ key: _.key,
539
+ class: I(["shifl-column-manager__item", {
540
+ "shifl-column-manager__item--disabled": _.freeze || _.protected
403
541
  }]),
404
- draggable: !m.freeze && !m.protected,
405
- onDragstart: (M) => L(T),
406
- onDragover: J((M) => void 0, ["prevent"]),
407
- onDrop: J((M) => w(T), ["prevent"])
542
+ draggable: !_.freeze && !_.protected,
543
+ onDragstart: (x) => T(M),
544
+ onDragover: J((x) => void 0, ["prevent"]),
545
+ onDrop: J((x) => w(M), ["prevent"])
408
546
  }, [
409
- d("button", {
547
+ g("button", {
410
548
  type: "button",
411
- class: G(["shifl-column-manager__drag-handle", {
412
- "shifl-column-manager__drag-handle--disabled": m.freeze || m.protected
549
+ class: I(["shifl-column-manager__drag-handle", {
550
+ "shifl-column-manager__drag-handle--disabled": _.freeze || _.protected
413
551
  }]),
414
- "aria-label": `Move ${m.label}`,
415
- disabled: m.freeze || m.protected
416
- }, [...f[10] || (f[10] = [
417
- d("span", null, "⋮⋮", -1)
418
- ])], 10, wn),
419
- d("label", {
420
- class: G(["shifl-column-manager__checkbox-label", {
421
- "shifl-column-manager__checkbox-label--disabled": m.freeze || m.protected
552
+ "aria-label": `Move ${_.label}`,
553
+ disabled: _.freeze || _.protected
554
+ }, [...c[10] || (c[10] = [
555
+ g("span", null, "⋮⋮", -1)
556
+ ])], 10, Vn),
557
+ g("label", {
558
+ class: I(["shifl-column-manager__checkbox-label", {
559
+ "shifl-column-manager__checkbox-label--disabled": _.freeze || _.protected
422
560
  }])
423
561
  }, [
424
- d("input", {
562
+ g("input", {
425
563
  type: "checkbox",
426
564
  class: "shifl-column-manager__checkbox",
427
- checked: m.visible,
428
- disabled: m.freeze || m.protected,
429
- onChange: (M) => p.$emit("toggle", m.key)
430
- }, null, 40, Mn),
431
- f[11] || (f[11] = d("span", { class: "shifl-column-manager__checkbox-custom" }, null, -1)),
432
- d("span", Tn, $(m.label), 1)
565
+ checked: _.visible,
566
+ disabled: _.freeze || _.protected,
567
+ onChange: (x) => u.$emit("toggle", _.key)
568
+ }, null, 40, zn),
569
+ c[11] || (c[11] = g("span", { class: "shifl-column-manager__checkbox-custom" }, null, -1)),
570
+ g("span", Dn, P(_.label), 1)
433
571
  ], 2)
434
- ], 42, Cn))), 128))
572
+ ], 42, Rn))), 128))
435
573
  ])
436
574
  ]),
437
- d("footer", Sn, [
438
- d("button", {
575
+ g("footer", jn, [
576
+ g("button", {
439
577
  type: "button",
440
578
  class: "shifl-column-manager__button shifl-column-manager__button--primary",
441
- onClick: f[4] || (f[4] = (m) => p.$emit("close"))
579
+ onClick: c[4] || (c[4] = (_) => u.$emit("close"))
442
580
  }, " Update "),
443
- d("button", {
581
+ g("button", {
444
582
  type: "button",
445
583
  class: "shifl-column-manager__button shifl-column-manager__button--secondary",
446
- onClick: f[5] || (f[5] = (m) => p.$emit("close"))
584
+ onClick: c[5] || (c[5] = (_) => u.$emit("close"))
447
585
  }, " Cancel ")
448
586
  ])
449
587
  ])
450
588
  ]));
451
589
  }
452
- }), j = (o, s) => {
453
- const g = o.__vccOpts || o;
454
- for (const [_, u] of s)
455
- g[_] = u;
456
- return g;
457
- }, $n = /* @__PURE__ */ j(Pn, [["__scopeId", "data-v-40ca0ed0"]]), Ln = { class: "shifl-grid__tooltip-content" }, An = ["innerHTML"], Nn = /* @__PURE__ */ Oe({
590
+ }), G = (i, r) => {
591
+ const f = i.__vccOpts || i;
592
+ for (const [h, l] of r)
593
+ f[h] = l;
594
+ return f;
595
+ }, In = /* @__PURE__ */ G(Bn, [["__scopeId", "data-v-40ca0ed0"]]), On = { class: "shifl-grid__tooltip-content" }, Zn = ["innerHTML"], Gn = /* @__PURE__ */ ce({
458
596
  __name: "GridTooltip",
459
597
  props: {
460
598
  content: {},
@@ -462,60 +600,60 @@ const gn = { class: "shifl-column-manager__header" }, hn = { class: "shifl-colum
462
600
  triggerElement: {},
463
601
  isHtml: { type: Boolean }
464
602
  },
465
- setup(o) {
466
- const s = o, g = b(null), _ = b({}), u = k(() => s.content.includes(`
467
- `)), y = k(() => u.value ? s.content.split(`
468
- `).filter((p) => p.trim().length > 0) : []), L = b("top"), P = b({});
603
+ setup(i) {
604
+ const r = i, f = b(null), h = b({}), l = C(() => r.content.includes(`
605
+ `)), m = C(() => l.value ? r.content.split(`
606
+ `).filter((u) => u.trim().length > 0) : []), T = b("top"), k = b({});
469
607
  function w() {
470
- if (!s.triggerElement || !g.value) return;
471
- const p = s.triggerElement.getBoundingClientRect(), f = g.value.getBoundingClientRect(), m = window.innerWidth, T = window.innerHeight;
472
- let M = p.bottom + 8, c = p.left + window.scrollX;
473
- c + f.width > m - 16 && (c = m - f.width - 16), c < 16 && (c = 16), M + f.height > T - 16 ? (M = p.top - f.height - 8, L.value = "bottom") : L.value = "top", _.value = {
608
+ if (!r.triggerElement || !f.value) return;
609
+ const u = r.triggerElement.getBoundingClientRect(), c = f.value.getBoundingClientRect(), _ = window.innerWidth, M = window.innerHeight;
610
+ let x = u.bottom + 8, p = u.left + window.scrollX;
611
+ p + c.width > _ - 16 && (p = _ - c.width - 16), p < 16 && (p = 16), x + c.height > M - 16 ? (x = u.top - c.height - 8, T.value = "bottom") : T.value = "top", h.value = {
474
612
  position: "fixed",
475
- top: `${M}px`,
476
- left: `${c}px`,
613
+ top: `${x}px`,
614
+ left: `${p}px`,
477
615
  zIndex: "10000"
478
616
  };
479
- const h = p.left + p.width / 2 - c;
480
- P.value = {
481
- left: `${h}px`
617
+ const v = u.left + u.width / 2 - p;
618
+ k.value = {
619
+ left: `${v}px`
482
620
  };
483
621
  }
484
622
  return W(
485
- () => s.visible,
486
- async (p) => {
487
- p && (await Ge(), w());
623
+ () => r.visible,
624
+ async (u) => {
625
+ u && (await Ze(), w());
488
626
  }
489
- ), ke(() => {
490
- s.visible && Ge(() => w());
491
- }), Ce(() => {
492
- }), (p, f) => (a(), I(be, { to: "body" }, [
493
- o.visible ? (a(), l("div", {
627
+ ), we(() => {
628
+ r.visible && Ze(() => w());
629
+ }), Me(() => {
630
+ }), (u, c) => (a(), B(Ce, { to: "body" }, [
631
+ i.visible ? (a(), d("div", {
494
632
  key: 0,
495
633
  ref_key: "tooltipRef",
496
- ref: g,
634
+ ref: f,
497
635
  class: "shifl-grid__tooltip",
498
- style: F(_.value)
636
+ style: F(h.value)
499
637
  }, [
500
- d("div", {
501
- class: G(["shifl-grid__tooltip-arrow", L.value]),
502
- style: F(P.value)
638
+ g("div", {
639
+ class: I(["shifl-grid__tooltip-arrow", T.value]),
640
+ style: F(k.value)
503
641
  }, null, 6),
504
- d("div", Ln, [
505
- o.isHtml ? (a(), l("div", {
642
+ g("div", On, [
643
+ i.isHtml ? (a(), d("div", {
506
644
  key: 0,
507
- innerHTML: o.content
508
- }, null, 8, An)) : u.value ? (a(!0), l(E, { key: 1 }, B(y.value, (m, T) => (a(), l("div", {
509
- key: T,
645
+ innerHTML: i.content
646
+ }, null, 8, Zn)) : l.value ? (a(!0), d(R, { key: 1 }, j(m.value, (_, M) => (a(), d("div", {
647
+ key: M,
510
648
  class: "shifl-grid__tooltip-line"
511
- }, $(m), 1))), 128)) : (a(), l(E, { key: 2 }, [
512
- ae($(o.content), 1)
649
+ }, P(_), 1))), 128)) : (a(), d(R, { key: 2 }, [
650
+ se(P(i.content), 1)
513
651
  ], 64))
514
652
  ])
515
- ], 4)) : R("", !0)
653
+ ], 4)) : H("", !0)
516
654
  ]));
517
655
  }
518
- }), xn = /* @__PURE__ */ j(Nn, [["__scopeId", "data-v-239005f1"]]), Hn = {}, En = {
656
+ }), Fn = /* @__PURE__ */ G(Gn, [["__scopeId", "data-v-239005f1"]]), Wn = {}, Un = {
519
657
  width: "14",
520
658
  height: "15",
521
659
  viewBox: "0 0 14 15",
@@ -523,15 +661,15 @@ const gn = { class: "shifl-column-manager__header" }, hn = { class: "shifl-colum
523
661
  xmlns: "http://www.w3.org/2000/svg",
524
662
  class: "shifl-smart-tracking-icon"
525
663
  };
526
- function Rn(o, s) {
527
- return a(), l("svg", En, [...s[0] || (s[0] = [
528
- d("path", {
664
+ function Kn(i, r) {
665
+ return a(), d("svg", Un, [...r[0] || (r[0] = [
666
+ g("path", {
529
667
  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",
530
668
  fill: "#05963F"
531
669
  }, null, -1)
532
670
  ])]);
533
671
  }
534
- const zn = /* @__PURE__ */ j(Hn, [["render", Rn]]), Dn = {
672
+ const Jn = /* @__PURE__ */ G(Wn, [["render", Kn]]), qn = {
535
673
  name: "SortAscendingIcon",
536
674
  props: {
537
675
  color: {
@@ -539,84 +677,84 @@ const zn = /* @__PURE__ */ j(Hn, [["render", Rn]]), Dn = {
539
677
  default: "#1A6D9E"
540
678
  }
541
679
  }
542
- }, Vn = {
680
+ }, Yn = {
543
681
  width: "14",
544
682
  height: "10",
545
683
  viewBox: "0 0 14 10",
546
684
  fill: "none",
547
685
  xmlns: "http://www.w3.org/2000/svg"
548
- }, Bn = ["fill"];
549
- function In(o, s, g, _, u, y) {
550
- return a(), l("svg", Vn, [
551
- d("path", {
686
+ }, Xn = ["fill"];
687
+ function Qn(i, r, f, h, l, m) {
688
+ return a(), d("svg", Yn, [
689
+ g("path", {
552
690
  "fill-rule": "evenodd",
553
691
  "clip-rule": "evenodd",
554
- fill: g.color,
692
+ fill: f.color,
555
693
  d: "M0 0.666667C0 0.298477 0.314186 2.98023e-08 0.701754 2.98023e-08H4.2807C4.66827 2.98023e-08 4.98246 0.298477 4.98246 0.666667C4.98246 1.03486 4.66827 1.33333 4.2807 1.33333H0.701754C0.314186 1.33333 0 1.03486 0 0.666667ZM10.0301 0.195262C10.3042 -0.0650874 10.7485 -0.0650874 11.0225 0.195262L13.1278 2.19526C13.4018 2.45561 13.4018 2.87772 13.1278 3.13807C12.8537 3.39842 12.4094 3.39842 12.1354 3.13807L11.2281 2.27614V8.66667C11.2281 9.03486 10.9139 9.33333 10.5263 9.33333C10.1387 9.33333 9.82456 9.03486 9.82456 8.66667V2.27614L8.91727 3.13807C8.64322 3.39842 8.19889 3.39842 7.92484 3.13807C7.65079 2.87772 7.65079 2.45561 7.92484 2.19526L10.0301 0.195262ZM0 4.66667C0 4.29848 0.314186 4 0.701754 4H5.61404C6.0016 4 6.31579 4.29848 6.31579 4.66667C6.31579 5.03486 6.0016 5.33333 5.61404 5.33333H0.701754C0.314186 5.33333 0 5.03486 0 4.66667ZM0 8.66667C0 8.29848 0.314186 8 0.701754 8H7.01754C7.40511 8 7.7193 8.29848 7.7193 8.66667C7.7193 9.03486 7.40511 9.33333 7.01754 9.33333H0.701754C0.314186 9.33333 0 9.03486 0 8.66667Z"
556
- }, null, 8, Bn)
694
+ }, null, 8, Xn)
557
695
  ]);
558
696
  }
559
- const ht = /* @__PURE__ */ j(Dn, [["render", In]]), Gn = {}, On = {
697
+ const vt = /* @__PURE__ */ G(qn, [["render", Qn]]), er = {}, tr = {
560
698
  width: "14",
561
699
  height: "10",
562
700
  viewBox: "0 0 14 10",
563
701
  fill: "none",
564
702
  xmlns: "http://www.w3.org/2000/svg"
565
703
  };
566
- function Zn(o, s) {
567
- return a(), l("svg", On, [...s[0] || (s[0] = [
568
- d("path", {
704
+ function nr(i, r) {
705
+ return a(), d("svg", tr, [...r[0] || (r[0] = [
706
+ g("path", {
569
707
  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",
570
708
  fill: "#1A6D9E"
571
709
  }, null, -1)
572
710
  ])]);
573
711
  }
574
- const jn = /* @__PURE__ */ j(Gn, [["render", Zn]]), Fn = {}, Wn = {
712
+ const rr = /* @__PURE__ */ G(er, [["render", nr]]), sr = {}, ir = {
575
713
  width: "21",
576
714
  height: "13",
577
715
  viewBox: "0 0 21 13",
578
716
  fill: "none",
579
717
  xmlns: "http://www.w3.org/2000/svg"
580
718
  };
581
- function Kn(o, s) {
582
- return a(), l("svg", Wn, [...s[0] || (s[0] = [
583
- d("path", {
719
+ function or(i, r) {
720
+ return a(), d("svg", ir, [...r[0] || (r[0] = [
721
+ g("path", {
584
722
  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",
585
- fill: "#9CA5B4"
723
+ fill: "#69758C"
586
724
  }, null, -1)
587
725
  ])]);
588
726
  }
589
- const Jn = /* @__PURE__ */ j(Fn, [["render", Kn]]), Un = {}, qn = {
727
+ const yt = /* @__PURE__ */ G(sr, [["render", or]]), ar = {}, lr = {
590
728
  width: "16",
591
729
  height: "16",
592
730
  viewBox: "0 0 16 16",
593
731
  fill: "none",
594
732
  xmlns: "http://www.w3.org/2000/svg"
595
733
  };
596
- function Yn(o, s) {
597
- return a(), l("svg", qn, [...s[0] || (s[0] = [
598
- d("path", {
734
+ function ur(i, r) {
735
+ return a(), d("svg", lr, [...r[0] || (r[0] = [
736
+ g("path", {
599
737
  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",
600
738
  fill: "#69758C"
601
739
  }, null, -1)
602
740
  ])]);
603
741
  }
604
- const Xn = /* @__PURE__ */ j(Un, [["render", Yn]]), Qn = {}, er = {
742
+ const cr = /* @__PURE__ */ G(ar, [["render", ur]]), dr = {}, fr = {
605
743
  width: "16",
606
744
  height: "16",
607
745
  viewBox: "0 0 24 24",
608
746
  fill: "none",
609
747
  xmlns: "http://www.w3.org/2000/svg"
610
748
  };
611
- function tr(o, s) {
612
- return a(), l("svg", er, [...s[0] || (s[0] = [
613
- d("path", {
749
+ function gr(i, r) {
750
+ return a(), d("svg", fr, [...r[0] || (r[0] = [
751
+ g("path", {
614
752
  d: "M6.00044 6.12787L6 15.75C6 17.7382 7.5473 19.3651 9.50344 19.492L9.75 19.5L16.3716 19.5011C16.0624 20.3744 15.2293 21 14.25 21H9C6.51472 21 4.5 18.9853 4.5 16.5V8.25C4.5 7.27017 5.12631 6.43663 6.00044 6.12787ZM17.25 3C18.4926 3 19.5 4.00736 19.5 5.25V15.75C19.5 16.9926 18.4926 18 17.25 18H9.75C8.50736 18 7.5 16.9926 7.5 15.75V5.25C7.5 4.00736 8.50736 3 9.75 3H17.25ZM17.25 4.5H9.75C9.33579 4.5 9 4.83579 9 5.25V15.75C9 16.1642 9.33579 16.5 9.75 16.5H17.25C17.6642 16.5 18 16.1642 18 15.75V5.25C18 4.83579 17.6642 4.5 17.25 4.5Z",
615
753
  fill: "#1A6D9E"
616
754
  }, null, -1)
617
755
  ])]);
618
756
  }
619
- const nr = /* @__PURE__ */ j(Qn, [["render", tr]]), rr = {}, sr = {
757
+ const pr = /* @__PURE__ */ G(dr, [["render", gr]]), hr = {}, mr = {
620
758
  xmlns: "http://www.w3.org/2000/svg",
621
759
  fill: "none",
622
760
  viewBox: "0 0 24 24",
@@ -626,9 +764,9 @@ const nr = /* @__PURE__ */ j(Qn, [["render", tr]]), rr = {}, sr = {
626
764
  class: "inline-block text-green-500",
627
765
  role: "presentation"
628
766
  };
629
- function ir(o, s) {
630
- return a(), l("svg", sr, [...s[0] || (s[0] = [
631
- d("path", {
767
+ function vr(i, r) {
768
+ return a(), d("svg", mr, [...r[0] || (r[0] = [
769
+ g("path", {
632
770
  "stroke-linecap": "round",
633
771
  "stroke-linejoin": "round",
634
772
  "stroke-width": "2",
@@ -636,7 +774,7 @@ function ir(o, s) {
636
774
  }, null, -1)
637
775
  ])]);
638
776
  }
639
- const or = /* @__PURE__ */ j(rr, [["render", ir]]), ar = {}, lr = {
777
+ const _r = /* @__PURE__ */ G(hr, [["render", vr]]), yr = {}, br = {
640
778
  xmlns: "http://www.w3.org/2000/svg",
641
779
  fill: "none",
642
780
  viewBox: "0 0 24 24",
@@ -646,9 +784,9 @@ const or = /* @__PURE__ */ j(rr, [["render", ir]]), ar = {}, lr = {
646
784
  class: "inline-block text-red-500",
647
785
  role: "presentation"
648
786
  };
649
- function ur(o, s) {
650
- return a(), l("svg", lr, [...s[0] || (s[0] = [
651
- d("path", {
787
+ function kr(i, r) {
788
+ return a(), d("svg", br, [...r[0] || (r[0] = [
789
+ g("path", {
652
790
  "stroke-linecap": "round",
653
791
  "stroke-linejoin": "round",
654
792
  "stroke-width": "2",
@@ -656,58 +794,103 @@ function ur(o, s) {
656
794
  }, null, -1)
657
795
  ])]);
658
796
  }
659
- const cr = /* @__PURE__ */ j(ar, [["render", ur]]), fr = { class: "shifl-grid relative" }, dr = { class: "shifl-grid__controls" }, gr = { class: "shifl-grid__table" }, hr = ["onClick"], pr = { class: "shifl-grid__header-content" }, mr = {
797
+ const Cr = /* @__PURE__ */ G(yr, [["render", kr]]), wr = {
798
+ width: "9",
799
+ height: "11",
800
+ viewBox: "0 0 9 11",
801
+ fill: "none",
802
+ xmlns: "http://www.w3.org/2000/svg"
803
+ }, Mr = ["fill"], Tr = /* @__PURE__ */ ce({
804
+ __name: "ExportIcon",
805
+ props: {
806
+ color: { default: "#253041" }
807
+ },
808
+ setup(i) {
809
+ return (r, f) => (a(), d("svg", wr, [
810
+ g("path", {
811
+ d: "M7.89355 9.78711C8.17317 9.78711 8.40039 10.0134 8.40039 10.293C8.40039 10.5493 8.20906 10.7614 7.96191 10.7949L7.89355 10.7988H0.505859C0.226345 10.7987 0 10.5726 0 10.293C1.00773e-06 10.0367 0.190375 9.82457 0.4375 9.79102L0.505859 9.78711H7.89355ZM4.22559 0C4.48191 0 4.69399 0.190367 4.72754 0.4375L4.73242 0.505859L4.73145 7.38672L6.73438 5.38184C6.91401 5.20192 7.19522 5.18515 7.39355 5.33203L7.4502 5.38086C7.63007 5.5604 7.64681 5.84171 7.5 6.04004L7.45117 6.09668L4.58691 8.9668L4.53906 9.00879L4.47754 9.04785L4.45312 9.0625L4.3916 9.08789L4.31055 9.1084L4.26367 9.11426L4.22266 9.11523C4.1889 9.11522 4.15458 9.11156 4.12109 9.10449L4.06641 9.08887C4.00161 9.06794 3.94262 9.03397 3.89258 8.99023L0.99707 6.09766C0.799322 5.90018 0.798882 5.57976 0.996094 5.38184C1.17562 5.20205 1.45697 5.18536 1.65527 5.33203L1.71289 5.38086L3.71973 7.38379V0.505859C3.71976 0.226386 3.94619 0.000201029 4.22559 0Z",
812
+ fill: i.color
813
+ }, null, 8, Mr)
814
+ ]));
815
+ }
816
+ }), Sr = { class: "shifl-grid__empty-state" }, xr = { class: "shifl-grid__empty-state-icon" }, $r = { class: "shifl-grid__empty-state-title" }, Pr = { class: "shifl-grid__empty-state-description" }, Lr = /* @__PURE__ */ ce({
817
+ __name: "GridEmptyState",
818
+ props: {
819
+ iconName: {},
820
+ title: {},
821
+ description: {}
822
+ },
823
+ setup(i) {
824
+ const h = {
825
+ OceanIcon: yt
826
+ // add other icons here...
827
+ }[i.iconName] ?? null;
828
+ return (l, m) => (a(), d("div", Sr, [
829
+ g("div", xr, [
830
+ V(h) ? (a(), B(ue(V(h)), { key: 0 })) : H("", !0)
831
+ ]),
832
+ g("p", $r, P(i.title), 1),
833
+ g("p", Pr, P(i.description), 1)
834
+ ]));
835
+ }
836
+ }), Nr = { class: "shifl-grid relative" }, Er = { class: "shifl-grid__controls" }, Ar = ["disabled"], Hr = { class: "shifl-grid__table" }, Rr = ["onClick"], Vr = { class: "shifl-grid__header-content" }, zr = {
660
837
  key: 0,
661
838
  class: "shifl-grid__header-label"
662
- }, vr = {
839
+ }, Dr = {
663
840
  key: 1,
664
841
  class: "shifl-grid__sort-icon shifl-grid__sort-icon--active"
665
- }, _r = {
842
+ }, jr = {
666
843
  key: 2,
667
844
  class: "shifl-grid__sort-icon shifl-grid__sort-icon--hover"
668
- }, yr = { key: 0 }, br = ["colspan"], kr = ["onClick"], Cr = {
845
+ }, Br = ["onClick"], Ir = {
669
846
  key: 0,
670
847
  class: "shifl-grid__smart-tracking-icon"
671
- }, wr = {
848
+ }, Or = {
672
849
  key: 1,
673
850
  class: "shifl-grid__action-icon-wrapper"
674
- }, Mr = ["onClick"], Tr = { key: 0 }, Sr = ["innerHTML"], Pr = {
851
+ }, Zr = ["onClick"], Gr = { key: 0 }, Fr = ["innerHTML"], Wr = {
675
852
  key: 2,
676
853
  class: "shifl-grid__composite-cell"
677
- }, $r = {
854
+ }, Ur = {
678
855
  key: 1,
679
856
  class: "shifl-grid__cell-blank"
680
- }, Lr = {
857
+ }, Kr = {
681
858
  key: 3,
682
859
  class: "shifl-grid__type-cell"
683
- }, Ar = {
860
+ }, Jr = {
684
861
  key: 1,
685
862
  class: "shifl-grid__cell-blank"
686
- }, Nr = {
863
+ }, qr = {
687
864
  key: 2,
688
865
  class: "shifl-grid__container-badge"
689
- }, xr = {
866
+ }, Yr = {
690
867
  key: 0,
691
868
  class: "shifl-grid__cell-blank"
692
- }, Hr = {
869
+ }, Xr = {
693
870
  key: 1,
694
871
  class: "shifl-grid__tags-cell"
695
- }, Er = { class: "shifl-grid__tags-wrapper" }, Rr = ["onMouseenter"], zr = {
872
+ }, Qr = { class: "shifl-grid__tags-wrapper" }, es = ["onMouseenter"], ts = {
696
873
  key: 5,
697
874
  class: "shifl-grid__chips-container"
698
- }, Dr = {
875
+ }, ns = {
699
876
  key: 6,
700
877
  class: "shifl-grid__truncated-cell"
701
- }, Vr = ["onMouseenter"], Br = ["onMouseenter"], Ir = ["href"], Gr = {
878
+ }, rs = ["onMouseenter"], ss = ["onMouseenter"], is = ["href"], os = {
702
879
  key: 8,
703
880
  class: "shifl-grid__progress-cell"
704
- }, Or = { class: "shifl-grid__progress-bar" }, Zr = { class: "shifl-grid__progress-text" }, jr = ["onMouseenter"], Fr = { class: "shifl-grid__reference-value" }, Wr = ["onClick"], Kr = {
881
+ }, as = { class: "shifl-grid__progress-bar" }, ls = { class: "shifl-grid__progress-text" }, us = ["onMouseenter"], cs = { class: "shifl-grid__reference-value" }, ds = ["onClick"], fs = { key: 0 }, gs = {
882
+ key: 0,
883
+ class: "shifl-grid__empty-state-wrapper"
884
+ }, ps = {
885
+ key: 1,
886
+ class: "text-center text-gray-500 py-6 shifl-grid__empty-state-wrapper empty--rows"
887
+ }, hs = {
705
888
  key: 0,
706
889
  class: "shifl-grid__pagination"
707
- }, Jr = { class: "shifl-grid__pagination-left" }, Ur = { class: "shifl-grid__pagination-range" }, qr = { class: "shifl-grid__pagination-range-numbers" }, Yr = { class: "shifl-grid__pagination-right" }, Xr = { class: "shifl-grid__pagination-rows" }, Qr = ["value", "disabled"], es = { class: "shifl-grid__pagination-nav" }, ts = ["disabled"], ns = { class: "shifl-grid__pagination-pages" }, rs = ["disabled", "onClick"], ss = {
890
+ }, ms = { class: "shifl-grid__pagination-left" }, vs = { class: "shifl-grid__pagination-range" }, _s = { class: "shifl-grid__pagination-range-numbers" }, ys = { class: "shifl-grid__pagination-right" }, bs = { class: "shifl-grid__pagination-rows" }, ks = ["value", "disabled"], Cs = { class: "shifl-grid__pagination-nav" }, ws = ["disabled"], Ms = { class: "shifl-grid__pagination-pages" }, Ts = ["disabled", "onClick"], Ss = {
708
891
  key: 1,
709
892
  class: "shifl-grid__pagination-ellipsis"
710
- }, is = ["disabled"], os = ["onClick"], as = ["innerHTML"], ls = { class: "shifl-grid__copy-tooltip-content" }, us = /* @__PURE__ */ Oe({
893
+ }, xs = ["disabled"], $s = ["onClick"], Ps = ["innerHTML"], Ls = { class: "shifl-grid__copy-tooltip-content" }, Ns = /* @__PURE__ */ ce({
711
894
  __name: "ShiflGrid",
712
895
  props: {
713
896
  config: {},
@@ -715,200 +898,200 @@ const cr = /* @__PURE__ */ j(ar, [["render", ur]]), fr = { class: "shifl-grid re
715
898
  loading: { type: Boolean }
716
899
  },
717
900
  emits: ["action-click", "search-change", "pagination-change", "row-click"],
718
- setup(o, { emit: s }) {
719
- var ut, ct, ft, dt, gt;
720
- const g = o, _ = s, u = k(() => on(g.config)), y = b(g.search), L = b(u.value.filters), P = b(u.value.sort), w = b({
721
- page: ((ut = u.value.paginationMeta) == null ? void 0 : ut.currentPage) || 1,
722
- perPage: ((ct = u.value.paginationMeta) == null ? void 0 : ct.perPage) || 20
723
- }), p = b(
724
- typeof ((ft = u.value.apiConfig) == null ? void 0 : ft.additionalParams) == "function" || (gt = (dt = u.value.apiConfig) == null ? void 0 : dt.additionalParams) == null ? void 0 : gt.tabName
725
- ), f = dn(u.value, {
726
- search: y,
727
- filters: L,
728
- sort: P,
901
+ setup(i, { emit: r }) {
902
+ var ut, ct, dt, ft, gt;
903
+ const f = i, h = r, l = C(() => hn(f.config)), m = b(f.search), T = b(l.value.filters), k = b(l.value.sort), w = b({
904
+ page: ((ut = l.value.paginationMeta) == null ? void 0 : ut.currentPage) || 1,
905
+ perPage: ((ct = l.value.paginationMeta) == null ? void 0 : ct.perPage) || 20
906
+ }), u = b(
907
+ typeof ((dt = l.value.apiConfig) == null ? void 0 : dt.additionalParams) == "function" || (gt = (ft = l.value.apiConfig) == null ? void 0 : ft.additionalParams) == null ? void 0 : gt.tabName
908
+ ), c = kn(l.value, {
909
+ search: m,
910
+ filters: T,
911
+ sort: k,
729
912
  pagination: w,
730
- tabName: p
731
- }), m = k(() => u.value.columns.filter((e) => !e.smartTrackingColumn)), {
732
- columns: T,
733
- visibleColumns: M,
734
- toggleColumnVisibility: c,
735
- setAllVisible: h,
736
- toggleFreeze: C,
737
- moveColumn: N,
738
- resetColumns: A
739
- } = an(m.value), { sort: x, setSort: we, applySort: le } = ln(u.value.sort), { applyGlobalFilter: ne } = un(), { menuState: z, openMenu: ue, closeMenu: Q } = cn(), O = b(!1), ce = b({}), Ze = b(null), je = b(null), Me = b(null), Te = b(!1), Fe = b(""), Se = b(null), Pe = b(!1), vt = b({});
913
+ tabName: u
914
+ }), _ = C(() => l.value.columns.filter((e) => !e.smartTrackingColumn)), {
915
+ columns: M,
916
+ visibleColumns: x,
917
+ toggleColumnVisibility: p,
918
+ setAllVisible: v,
919
+ toggleFreeze: S,
920
+ moveColumn: E,
921
+ resetColumns: L
922
+ } = mn(_.value), { sort: N, setSort: Te, applySort: de } = vn(l.value.sort), { applyGlobalFilter: ie } = _n(), { menuState: z, openMenu: fe, closeMenu: te } = yn(), O = b(!1), ge = b({}), Ge = b(null), Fe = b(null), Se = b(null), xe = b(!1), We = b(""), $e = b(null), Pe = b(!1), Ct = b({});
740
923
  b({});
741
- const ee = b(
924
+ const ne = b(
742
925
  {}
743
- ), fe = b(!1), de = b("Copy To Clipboard"), ge = b(null), $e = b({ top: 0, left: 0 });
744
- function U() {
745
- if (!ge.value || !fe.value) return;
746
- const e = ge.value.getBoundingClientRect(), n = 120, t = 32, i = window.innerWidth, r = window.innerHeight, v = 4;
747
- let S = e.right + v, H = e.top + e.height / 2 - t / 2;
748
- S + n > i && (S = e.left - n - v), S < 0 && (S = 10), H + t > r && (H = r - t - 10), H < 0 && (H = 10), $e.value = { top: H, left: S };
926
+ ), pe = b(!1), he = b("Copy To Clipboard"), me = b(null), Le = b({ top: 0, left: 0 });
927
+ function q() {
928
+ if (!me.value || !pe.value) return;
929
+ const e = me.value.getBoundingClientRect(), t = 120, n = 32, o = window.innerWidth, s = window.innerHeight, y = 4;
930
+ let $ = e.right + y, A = e.top + e.height / 2 - n / 2;
931
+ $ + t > o && ($ = e.left - t - y), $ < 0 && ($ = 10), A + n > s && (A = s - n - 10), A < 0 && (A = 10), Le.value = { top: A, left: $ };
749
932
  }
750
933
  W(
751
- () => u.value.paginationMeta,
934
+ () => l.value.paginationMeta,
752
935
  (e) => {
753
- u.value.searchMode !== "server" && e && w.value && (w.value.page = e.currentPage || w.value.page, w.value.perPage = e.perPage || w.value.perPage);
936
+ l.value.searchMode !== "server" && e && w.value && (w.value.page = e.currentPage || w.value.page, w.value.perPage = e.perPage || w.value.perPage);
754
937
  },
755
938
  { deep: !0 }
756
939
  ), W(
757
- () => u.value.columns,
940
+ () => l.value.columns,
758
941
  (e) => {
759
- const n = e.filter((t) => !t.smartTrackingColumn);
760
- T.value = [...n];
942
+ const t = e.filter((n) => !n.smartTrackingColumn);
943
+ M.value = [...t];
761
944
  },
762
945
  { deep: !0 }
763
946
  ), W(
764
- () => u.value.sort,
947
+ () => l.value.sort,
765
948
  (e) => {
766
- e && (x.value = e, P.value = e);
949
+ e && (N.value = e, k.value = e);
767
950
  },
768
951
  { deep: !0 }
769
952
  ), W(
770
953
  () => {
771
954
  var e;
772
- return (e = u.value.apiConfig) == null ? void 0 : e.additionalParams;
955
+ return (e = l.value.apiConfig) == null ? void 0 : e.additionalParams;
773
956
  },
774
957
  (e) => {
775
958
  if (e && typeof e != "function") {
776
- const n = e;
777
- n.tabName !== void 0 && p.value !== n.tabName && (_t(), p.value = n.tabName);
959
+ const t = e;
960
+ t.tabName !== void 0 && u.value !== t.tabName && (wt(), u.value = t.tabName);
778
961
  }
779
962
  },
780
963
  { deep: !0 }
781
964
  );
782
- function _t() {
783
- var n;
784
- const e = ((n = u.value.paginationMeta) == null ? void 0 : n.perPage) || 20;
785
- w.value = { page: 1, perPage: e }, y.value = void 0, P.value = u.value.sort, L.value = u.value.filters, _("search-change", ""), _("pagination-change", 1, e);
965
+ function wt() {
966
+ var t;
967
+ const e = ((t = l.value.paginationMeta) == null ? void 0 : t.perPage) || 20;
968
+ w.value = { page: 1, perPage: e }, m.value = void 0, k.value = l.value.sort, T.value = l.value.filters, h("search-change", ""), h("pagination-change", 1, e);
786
969
  }
787
970
  W(
788
- () => g.search,
789
- (e, n) => {
790
- var t;
791
- if (y.value = e, u.value.searchMode === "server")
792
- _("search-change", e || "");
793
- else if (u.value.searchMode === "client" && e !== n) {
794
- const i = ((t = D.value) == null ? void 0 : t.perPage) || 20;
795
- w.value = { page: 1, perPage: i }, _("pagination-change", 1, i);
971
+ () => f.search,
972
+ (e, t) => {
973
+ var n;
974
+ if (m.value = e, l.value.searchMode === "server")
975
+ h("search-change", e || "");
976
+ else if (l.value.searchMode === "client" && e !== t) {
977
+ const o = ((n = w.value) == null ? void 0 : n.perPage) || 20;
978
+ w.value = { page: 1, perPage: o }, h("pagination-change", 1, o);
796
979
  }
797
980
  },
798
981
  { immediate: !0 }
799
982
  ), W(
800
- () => x.value,
983
+ () => N.value,
801
984
  (e) => {
802
- P.value = e;
985
+ k.value = e;
803
986
  }
804
987
  );
805
- const Le = k(() => f.rows.value || []), Ae = k(() => {
806
- if ((u.value.searchMode || "client") === "server")
807
- return Le.value;
808
- const n = g.search || "";
809
- return ne(Le.value, u.value.search, n);
810
- }), Ne = k(() => {
811
- var n;
812
- return (u.value.searchMode || "client") === "client" ? Ae.value.length : ((n = f.paginationMeta.value) == null ? void 0 : n.total) || 0;
813
- }), xe = k(() => (u.value.searchMode || "client") === "server" ? Ae.value : le(Ae.value)), We = k(() => {
814
- if ((u.value.searchMode || "client") === "server")
815
- return xe.value;
816
- const n = D.value;
817
- if (!n || !n.show)
818
- return xe.value;
819
- const t = n.perPage || 20, r = ((n.currentPage || 1) - 1) * t, v = r + t;
820
- return xe.value.slice(r, v);
821
- }), D = k(() => {
988
+ const Ne = C(() => c.rows.value || []), Ee = C(() => {
989
+ if ((l.value.searchMode || "client") === "server")
990
+ return Ne.value;
991
+ const t = f.search || "";
992
+ return ie(Ne.value, l.value.search, t);
993
+ }), Ae = C(() => {
994
+ var t;
995
+ return (l.value.searchMode || "client") === "client" ? Ee.value.length : ((t = c.paginationMeta.value) == null ? void 0 : t.total) || 0;
996
+ }), He = C(() => (l.value.searchMode || "client") === "server" ? Ee.value : de(Ee.value)), Y = C(() => {
997
+ if ((l.value.searchMode || "client") === "server")
998
+ return He.value;
999
+ const t = D.value;
1000
+ if (!t || !t.show)
1001
+ return He.value;
1002
+ const n = t.perPage || 20, s = ((t.currentPage || 1) - 1) * n, y = s + n;
1003
+ return He.value.slice(s, y);
1004
+ }), D = C(() => {
822
1005
  var e;
823
- return u.value.searchMode === "server" && f.paginationMeta.value ? {
1006
+ return l.value.searchMode === "server" && c.paginationMeta.value ? {
824
1007
  show: !0,
825
1008
  // Default to showing pagination
826
- ...f.paginationMeta.value,
827
- currentPage: ((e = w.value) == null ? void 0 : e.page) || f.paginationMeta.value.currentPage || 1
828
- } : u.value.paginationMeta;
829
- }), q = k(() => g.loading !== void 0 ? g.loading : f.loading.value), yt = k(() => {
1009
+ ...c.paginationMeta.value,
1010
+ currentPage: ((e = w.value) == null ? void 0 : e.page) || c.paginationMeta.value.currentPage || 1
1011
+ } : l.value.paginationMeta;
1012
+ }), U = C(() => f.loading !== void 0 ? f.loading : c.loading.value), Mt = C(() => {
830
1013
  var e;
831
1014
  return ((e = D.value) == null ? void 0 : e.perPage) === 100;
832
- }), bt = k(() => {
1015
+ }), Tt = C(() => {
833
1016
  var e;
834
1017
  return ((e = D.value) == null ? void 0 : e.perPage) || 10;
835
- }), Ke = k(() => {
1018
+ }), Ue = C(() => {
836
1019
  const e = D.value;
837
1020
  if (!e || e.show === !1)
838
1021
  return { from: 0, to: 0 };
839
- const n = Ne.value, t = e.perPage || 20, i = e.currentPage || 1;
840
- if ((u.value.searchMode || "client") === "server" && e.from !== void 0 && e.to !== void 0)
1022
+ const t = Ae.value, n = e.perPage || 20, o = e.currentPage || 1;
1023
+ if ((l.value.searchMode || "client") === "server" && e.from !== void 0 && e.to !== void 0)
841
1024
  return { from: e.from, to: e.to };
842
- const v = (i - 1) * t + 1, S = Math.min(i * t, n);
843
- return n === 0 ? { from: 0, to: 0 } : { from: v, to: S };
844
- }), Y = k(() => {
1025
+ const y = (o - 1) * n + 1, $ = Math.min(o * n, t);
1026
+ return t === 0 ? { from: 0, to: 0 } : { from: y, to: $ };
1027
+ }), X = C(() => {
845
1028
  var e;
846
1029
  return ((e = D.value) == null ? void 0 : e.currentPage) || 1;
847
- }), He = k(() => {
1030
+ }), Re = C(() => {
848
1031
  const e = D.value;
849
1032
  if (!e || e.show === !1) return 1;
850
- const n = Ne.value;
851
- if (n === 0) return 1;
852
- const t = e.perPage || 20, i = Math.ceil(n / t);
853
- return Math.max(1, i);
854
- }), Je = k(() => Y.value <= 1), Ue = k(() => Y.value >= He.value), kt = k(() => {
855
- const e = He.value, n = Y.value, t = [];
1033
+ const t = Ae.value;
1034
+ if (t === 0) return 1;
1035
+ const n = e.perPage || 20, o = Math.ceil(t / n);
1036
+ return Math.max(1, o);
1037
+ }), Ke = C(() => X.value <= 1), Je = C(() => X.value >= Re.value), St = C(() => {
1038
+ const e = Re.value, t = X.value, n = [];
856
1039
  if (e <= 7)
857
- for (let i = 1; i <= e; i++)
858
- t.push(i);
859
- else if (n <= 4) {
860
- for (let i = 1; i <= 5; i++)
861
- t.push(i);
862
- t.push(-1), t.push(e);
863
- } else if (n >= e - 3) {
864
- t.push(1), t.push(-1);
865
- for (let i = e - 4; i <= e; i++)
866
- t.push(i);
1040
+ for (let o = 1; o <= e; o++)
1041
+ n.push(o);
1042
+ else if (t <= 4) {
1043
+ for (let o = 1; o <= 5; o++)
1044
+ n.push(o);
1045
+ n.push(-1), n.push(e);
1046
+ } else if (t >= e - 3) {
1047
+ n.push(1), n.push(-1);
1048
+ for (let o = e - 4; o <= e; o++)
1049
+ n.push(o);
867
1050
  } else {
868
- t.push(1), t.push(-1);
869
- for (let i = n - 1; i <= n + 1; i++)
870
- t.push(i);
871
- t.push(-1), t.push(e);
1051
+ n.push(1), n.push(-1);
1052
+ for (let o = t - 1; o <= t + 1; o++)
1053
+ n.push(o);
1054
+ n.push(-1), n.push(e);
872
1055
  }
873
- return t;
1056
+ return n;
874
1057
  });
875
- function Ct(e) {
876
- var t;
877
- if (e < 1 || e > He.value || e === Y.value || q.value) return;
878
- const n = ((t = D.value) == null ? void 0 : t.perPage) || 20;
879
- w.value = { page: e, perPage: n }, _("pagination-change", e, n);
1058
+ function xt(e) {
1059
+ var n;
1060
+ if (e < 1 || e > Re.value || e === X.value || U.value) return;
1061
+ const t = ((n = D.value) == null ? void 0 : n.perPage) || 20;
1062
+ w.value = { page: e, perPage: t }, h("pagination-change", e, t);
880
1063
  }
881
- function wt() {
882
- var t;
883
- if (Je.value || q.value) return;
884
- const e = ((t = D.value) == null ? void 0 : t.perPage) || 20, n = Y.value - 1;
885
- w.value = { page: n, perPage: e }, _("pagination-change", n, e);
1064
+ function $t() {
1065
+ var n;
1066
+ if (Ke.value || U.value) return;
1067
+ const e = ((n = D.value) == null ? void 0 : n.perPage) || 20, t = X.value - 1;
1068
+ w.value = { page: t, perPage: e }, h("pagination-change", t, e);
886
1069
  }
887
- function Mt() {
888
- var t;
889
- if (Ue.value || q.value) return;
890
- const e = ((t = D.value) == null ? void 0 : t.perPage) || 20, n = Y.value + 1;
891
- w.value = { page: n, perPage: e }, _("pagination-change", n, e);
892
- }
893
- function Tt(e) {
894
- var i;
895
- if (q.value) return;
896
- const n = e.target, t = parseInt(n.value, 10);
897
- t && t !== (((i = D.value) == null ? void 0 : i.perPage) || 20) && (w.value = { page: 1, perPage: t }, _("pagination-change", 1, t));
898
- }
899
- const St = k(() => {
900
- const e = u.value.columns.find((t) => t.smartTrackingColumn);
1070
+ function Pt() {
1071
+ var n;
1072
+ if (Je.value || U.value) return;
1073
+ const e = ((n = D.value) == null ? void 0 : n.perPage) || 20, t = X.value + 1;
1074
+ w.value = { page: t, perPage: e }, h("pagination-change", t, e);
1075
+ }
1076
+ function Lt(e) {
1077
+ var o;
1078
+ if (U.value) return;
1079
+ const t = e.target, n = parseInt(t.value, 10);
1080
+ n && n !== (((o = D.value) == null ? void 0 : o.perPage) || 20) && (w.value = { page: 1, perPage: n }, h("pagination-change", 1, n));
1081
+ }
1082
+ const Nt = C(() => {
1083
+ const e = l.value.columns.find((n) => n.smartTrackingColumn);
901
1084
  if (!(e != null && e.smartTrackingColumn)) return !1;
902
- const n = e.smartTrackingColumn.dataKey;
903
- return Le.value.some((t) => {
904
- const i = t[n];
905
- return i === !0 || i === 1 || i === "true" || i === "1";
1085
+ const t = e.smartTrackingColumn.dataKey;
1086
+ return Ne.value.some((n) => {
1087
+ const o = n[t];
1088
+ return o === !0 || o === 1 || o === "true" || o === "1";
906
1089
  });
907
- }), Ee = k(() => u.value.columns.find((e) => e.smartTrackingColumn)), te = k(() => {
908
- var t;
909
- const e = M.value.filter((i) => !i.smartTrackingColumn);
910
- if (St.value && Ee.value) {
911
- const i = {
1090
+ }), Ve = C(() => l.value.columns.find((e) => e.smartTrackingColumn)), re = C(() => {
1091
+ var n;
1092
+ const e = x.value.filter((o) => !o.smartTrackingColumn);
1093
+ if (Nt.value && Ve.value) {
1094
+ const o = {
912
1095
  key: "_smart_tracking",
913
1096
  label: "",
914
1097
  // No label
@@ -918,43 +1101,70 @@ const cr = /* @__PURE__ */ j(ar, [["render", ur]]), fr = { class: "shifl-grid re
918
1101
  visible: !0,
919
1102
  protected: !0,
920
1103
  sortable: !1,
921
- width: ((t = Ee.value.smartTrackingColumn) == null ? void 0 : t.width) || "36px",
922
- smartTrackingColumn: Ee.value.smartTrackingColumn,
1104
+ width: ((n = Ve.value.smartTrackingColumn) == null ? void 0 : n.width) || "36px",
1105
+ smartTrackingColumn: Ve.value.smartTrackingColumn,
923
1106
  cellType: "icon"
924
- }, r = e.findIndex((v) => v.key === "ref");
925
- r >= 0 ? e.splice(r, 0, i) : e.unshift(i);
1107
+ }, s = e.findIndex((y) => y.key === "ref");
1108
+ s >= 0 ? e.splice(s, 0, o) : e.unshift(o);
926
1109
  }
927
- const n = e.find((i) => i.key === "ref");
928
- return n && (n.freeze = !0, n.protected = !0), e;
929
- }), Pt = k(() => {
1110
+ const t = e.find((o) => o.key === "ref");
1111
+ return t && (t.freeze = !0, t.protected = !0), e;
1112
+ }), Et = C(() => {
930
1113
  let e = 0;
931
- const n = {};
932
- for (const t of te.value) {
933
- t.freeze && (n[t.key] = e);
934
- const i = parseInt(t.width ?? "160", 10);
935
- Number.isNaN(i) || (e += i);
1114
+ const t = {};
1115
+ for (const n of re.value) {
1116
+ n.freeze && (t[n.key] = e);
1117
+ const o = parseInt(n.width ?? "160", 10);
1118
+ Number.isNaN(o) || (e += o);
936
1119
  }
937
- return n;
938
- }), qe = b(0);
939
- function $t(e) {
940
- const n = e.target;
941
- qe.value = n.scrollLeft;
1120
+ return t;
1121
+ }), At = C(() => {
1122
+ const e = l.value.exportConfig;
1123
+ return (e == null ? void 0 : e.show) === !0;
1124
+ }), Ht = C(() => {
1125
+ const e = l.value.exportConfig;
1126
+ return !(e != null && e.show) || !Y.value || Y.value.length === 0 ? !0 : !mt(e).isValid;
1127
+ });
1128
+ function Rt() {
1129
+ const e = l.value.exportConfig;
1130
+ if (!e) return;
1131
+ const t = mt(e);
1132
+ if (!t.isValid) {
1133
+ console.error("Export configuration is invalid:", t.errors);
1134
+ return;
1135
+ }
1136
+ const n = Tn(
1137
+ Y.value,
1138
+ re.value,
1139
+ N.value,
1140
+ T.value
1141
+ );
1142
+ e.source === "client" ? Mn({
1143
+ exportType: e.exportType || "csv",
1144
+ fileName: e.exportFileName || "export",
1145
+ data: n
1146
+ }) : e.source === "server" && console.log("Server-side export not yet implemented");
1147
+ }
1148
+ const Vt = C(() => !!f.search && f.search.trim().length > 0), qe = b(0);
1149
+ function zt(e) {
1150
+ const t = e.target;
1151
+ qe.value = t.scrollLeft;
942
1152
  }
943
- function Lt(e) {
944
- const n = T.value.find((t) => t.key === e);
945
- !(n != null && n.sortable) || re(n) || ve(n) || we(e);
1153
+ function Dt(e) {
1154
+ const t = M.value.find((n) => n.key === e);
1155
+ !(t != null && t.sortable) || oe(t) || be(t) || Te(e);
946
1156
  }
947
- function he(e, n) {
1157
+ function ve(e, t) {
948
1158
  if (e == null || e === "" || e === void 0)
949
- return X(n.blankStyle);
950
- const t = n.cellType;
951
- if (Array.isArray(t)) {
952
- const i = t.find((r) => typeof r == "string" && r !== "icon");
953
- return i && typeof i == "string" ? nt(e, i, n) : "";
1159
+ return Q(t.blankStyle);
1160
+ const n = t.cellType;
1161
+ if (Array.isArray(n)) {
1162
+ const o = n.find((s) => typeof s == "string" && s !== "icon");
1163
+ return o && typeof o == "string" ? nt(e, o, t) : "";
954
1164
  }
955
- if (!t)
1165
+ if (!n)
956
1166
  return typeof e == "object" ? JSON.stringify(e) : String(e);
957
- switch (t) {
1167
+ switch (n) {
958
1168
  case "number":
959
1169
  return Ye(e);
960
1170
  case "currency":
@@ -968,7 +1178,7 @@ const cr = /* @__PURE__ */ j(ar, [["render", ur]]), fr = { class: "shifl-grid re
968
1178
  return typeof e == "object" ? JSON.stringify(e) : String(e);
969
1179
  }
970
1180
  }
971
- function X(e) {
1181
+ function Q(e) {
972
1182
  switch (e) {
973
1183
  case "dash":
974
1184
  return "--";
@@ -984,8 +1194,8 @@ const cr = /* @__PURE__ */ j(ar, [["render", ur]]), fr = { class: "shifl-grid re
984
1194
  function Ye(e) {
985
1195
  if (typeof e == "number")
986
1196
  return e.toLocaleString();
987
- const n = Number(e);
988
- return Number.isNaN(n) ? String(e) : n.toLocaleString();
1197
+ const t = Number(e);
1198
+ return Number.isNaN(t) ? String(e) : t.toLocaleString();
989
1199
  }
990
1200
  function Xe(e) {
991
1201
  if (typeof e == "number")
@@ -993,59 +1203,59 @@ const cr = /* @__PURE__ */ j(ar, [["render", ur]]), fr = { class: "shifl-grid re
993
1203
  style: "currency",
994
1204
  currency: "USD"
995
1205
  }).format(e);
996
- const n = Number(e);
997
- return Number.isNaN(n) ? String(e) : new Intl.NumberFormat("en-US", {
1206
+ const t = Number(e);
1207
+ return Number.isNaN(t) ? String(e) : new Intl.NumberFormat("en-US", {
998
1208
  style: "currency",
999
1209
  currency: "USD"
1000
- }).format(n);
1210
+ }).format(t);
1001
1211
  }
1002
1212
  function Qe(e) {
1003
1213
  if (e instanceof Date)
1004
1214
  return e.toLocaleDateString();
1005
1215
  if (typeof e == "string") {
1006
- const n = new Date(e);
1007
- if (!Number.isNaN(n.getTime()))
1008
- return n.toLocaleDateString();
1216
+ const t = new Date(e);
1217
+ if (!Number.isNaN(t.getTime()))
1218
+ return t.toLocaleDateString();
1009
1219
  }
1010
1220
  return String(e);
1011
1221
  }
1012
1222
  function et(e) {
1013
1223
  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);
1014
1224
  }
1015
- function At(e) {
1225
+ function jt(e) {
1016
1226
  if (typeof e == "number")
1017
1227
  return Math.min(100, Math.max(0, e));
1018
- const n = Number(e);
1019
- return Number.isNaN(n) ? 0 : Math.min(100, Math.max(0, n));
1228
+ const t = Number(e);
1229
+ return Number.isNaN(t) ? 0 : Math.min(100, Math.max(0, t));
1020
1230
  }
1021
- function pe(e) {
1022
- return typeof e == "boolean" ? e ? or : cr : typeof e == "string" && e.toLowerCase() === "ocean" ? Jn : null;
1231
+ function _e(e) {
1232
+ return typeof e == "boolean" ? e ? _r : Cr : typeof e == "string" && e.toLowerCase() === "ocean" ? yt : null;
1023
1233
  }
1024
- function Nt(e) {
1025
- const n = e.toLowerCase();
1026
- return ["supplier", "suppliers", "po", "pos", "product_description"].includes(n);
1234
+ function Bt(e) {
1235
+ const t = e.toLowerCase();
1236
+ return ["supplier", "suppliers", "po", "pos", "product_description"].includes(t);
1027
1237
  }
1028
1238
  function tt(e) {
1029
1239
  if (e.cellType === "badge") return !0;
1030
- const n = e.key.toLowerCase();
1031
- return n === "tag" || n === "tags";
1240
+ const t = e.key.toLowerCase();
1241
+ return t === "tag" || t === "tags";
1032
1242
  }
1033
- function xt(e) {
1243
+ function It(e) {
1034
1244
  return e.cellType === "status" ? !0 : e.key.toLowerCase() === "status";
1035
1245
  }
1036
- function Ht(e) {
1246
+ function Ot(e) {
1037
1247
  return e.cellType === "icon" ? !0 : e.key.toLowerCase() === "type";
1038
1248
  }
1039
- function Et(e) {
1249
+ function Zt(e) {
1040
1250
  return Array.isArray(e.cellType) && e.cellType.length > 0;
1041
1251
  }
1042
- function Rt(e) {
1043
- return Array.isArray(e.cellType) ? e.cellType.filter((n) => typeof n == "string") : e.cellType && typeof e.cellType == "string" ? [e.cellType] : [];
1252
+ function Gt(e) {
1253
+ return Array.isArray(e.cellType) ? e.cellType.filter((t) => typeof t == "string") : e.cellType && typeof e.cellType == "string" ? [e.cellType] : [];
1044
1254
  }
1045
- function nt(e, n, t) {
1255
+ function nt(e, t, n) {
1046
1256
  if (e == null || e === "" || e === void 0)
1047
- return X(t.blankStyle);
1048
- switch (n) {
1257
+ return Q(n.blankStyle);
1258
+ switch (t) {
1049
1259
  case "number":
1050
1260
  return Ye(e);
1051
1261
  case "currency":
@@ -1059,7 +1269,7 @@ const cr = /* @__PURE__ */ j(ar, [["render", ur]]), fr = { class: "shifl-grid re
1059
1269
  return typeof e == "object" ? JSON.stringify(e) : String(e);
1060
1270
  }
1061
1271
  }
1062
- function zt(e) {
1272
+ function Ft(e) {
1063
1273
  return {
1064
1274
  number: "shifl-grid__composite-number",
1065
1275
  currency: "shifl-grid__composite-currency",
@@ -1068,137 +1278,137 @@ const cr = /* @__PURE__ */ j(ar, [["render", ur]]), fr = { class: "shifl-grid re
1068
1278
  text: "shifl-grid__composite-text"
1069
1279
  }[e] || "shifl-grid__composite-text";
1070
1280
  }
1071
- function Dt(e, n) {
1281
+ function Wt(e, t) {
1072
1282
  if (e == null || e === "")
1073
- return X(n.blankStyle);
1283
+ return Q(t.blankStyle);
1074
1284
  if (Array.isArray(e)) {
1075
1285
  if (e.length === 0)
1076
- return X(n.blankStyle);
1077
- const t = e.join(", ");
1078
- return rt(t, 45);
1286
+ return Q(t.blankStyle);
1287
+ const n = e.join(", ");
1288
+ return rt(n, 45);
1079
1289
  }
1080
1290
  return typeof e == "string" ? rt(e, 45) : String(e);
1081
1291
  }
1082
- function rt(e, n) {
1083
- return e.length <= n ? e : e.substring(0, n) + "...";
1292
+ function rt(e, t) {
1293
+ return e.length <= t ? e : e.substring(0, t) + "...";
1084
1294
  }
1085
- function Re(e) {
1086
- const n = e.toLowerCase();
1087
- return ["po", "pos", "supplier", "suppliers", "tag", "tags"].includes(n);
1295
+ function ze(e) {
1296
+ const t = e.toLowerCase();
1297
+ return ["po", "pos", "supplier", "suppliers", "tag", "tags"].includes(t);
1088
1298
  }
1089
- function Vt(e, n) {
1090
- return e == null || Re(n) ? !1 : Array.isArray(e) ? e.length === 0 ? !1 : e.join(", ").length > 30 : typeof e == "string" ? e.length > 30 : !1;
1299
+ function Ut(e, t) {
1300
+ return e == null || ze(t) ? !1 : Array.isArray(e) ? e.length === 0 ? !1 : e.join(", ").length > 30 : typeof e == "string" ? e.length > 30 : !1;
1091
1301
  }
1092
- function Bt(e) {
1302
+ function Kt(e) {
1093
1303
  return e == null ? !1 : Array.isArray(e) ? e.length === 0 ? !1 : e.join(", ").length > 45 : typeof e == "string" ? e.length > 45 : !1;
1094
1304
  }
1095
- function It(e) {
1305
+ function Jt(e) {
1096
1306
  if (e == null) return 0;
1097
1307
  if (Array.isArray(e)) {
1098
1308
  if (e.length === 0 || e.join(", ").length <= 45) return 0;
1099
- let t = 0, i = 0;
1100
- for (let r = 0; r < e.length; r++) {
1101
- const v = String(e[r]), H = (r > 0 ? ", " : "").length + v.length;
1102
- if (t + H <= 45)
1103
- t += H, i++;
1309
+ let n = 0, o = 0;
1310
+ for (let s = 0; s < e.length; s++) {
1311
+ const y = String(e[s]), A = (s > 0 ? ", " : "").length + y.length;
1312
+ if (n + A <= 45)
1313
+ n += A, o++;
1104
1314
  else
1105
1315
  break;
1106
1316
  }
1107
- return e.length - i;
1317
+ return e.length - o;
1108
1318
  }
1109
1319
  return typeof e == "string" && e.length > 45 ? 1 : 0;
1110
1320
  }
1111
- function ze(e, n, t, i) {
1112
- let r = "", v = !1;
1113
- const S = te.value.find((H) => H.key === e);
1114
- if (S && tt(S)) {
1115
- const H = st(t);
1116
- H.length > 0 && (v = !0, r = H.map((K) => `<span class="shifl-grid__tooltip-badge" style="border-left-color: ${at(K)} !important">${K.name}</span>`).join(""));
1117
- } else Array.isArray(t) ? t.length > 0 && (r = t.join(`
1118
- `)) : t != null && (r = String(t));
1119
- Fe.value = r, Pe.value = v, Se.value = i, Te.value = !0;
1321
+ function De(e, t, n, o) {
1322
+ let s = "", y = !1;
1323
+ const $ = re.value.find((A) => A.key === e);
1324
+ if ($ && tt($)) {
1325
+ const A = st(n);
1326
+ A.length > 0 && (y = !0, s = A.map((K) => `<span class="shifl-grid__tooltip-badge" style="border-left-color: ${at(K)} !important">${K.name}</span>`).join(""));
1327
+ } else Array.isArray(n) ? n.length > 0 && (s = n.join(`
1328
+ `)) : n != null && (s = String(n));
1329
+ We.value = s, Pe.value = y, $e.value = o, xe.value = !0;
1120
1330
  }
1121
- function De() {
1122
- Te.value = !1, Se.value = null, Pe.value = !1;
1331
+ function je() {
1332
+ xe.value = !1, $e.value = null, Pe.value = !1;
1123
1333
  }
1124
- function Gt(e, n) {
1125
- de.value = "Copy To Clipboard", ge.value = n, fe.value = !0, U();
1334
+ function qt(e, t) {
1335
+ he.value = "Copy To Clipboard", me.value = t, pe.value = !0, q();
1126
1336
  }
1127
- function Ve() {
1128
- fe.value = !1, ge.value = null;
1337
+ function Be() {
1338
+ pe.value = !1, me.value = null;
1129
1339
  }
1130
- async function Ot(e) {
1340
+ async function Yt(e) {
1131
1341
  try {
1132
- await navigator.clipboard.writeText(e), de.value = "Copied!", setTimeout(() => {
1133
- Ve();
1342
+ await navigator.clipboard.writeText(e), he.value = "Copied!", setTimeout(() => {
1343
+ Be();
1134
1344
  }, 2e3);
1135
- } catch (n) {
1136
- console.error("Failed to copy text: ", n);
1137
- const t = document.createElement("textarea");
1138
- t.value = e, document.body.appendChild(t), t.select(), document.execCommand("copy"), document.body.removeChild(t), de.value = "Copied!", setTimeout(() => {
1139
- Ve();
1345
+ } catch (t) {
1346
+ console.error("Failed to copy text: ", t);
1347
+ const n = document.createElement("textarea");
1348
+ n.value = e, document.body.appendChild(n), n.select(), document.execCommand("copy"), document.body.removeChild(n), he.value = "Copied!", setTimeout(() => {
1349
+ Be();
1140
1350
  }, 2e3);
1141
1351
  }
1142
1352
  }
1143
- function Zt(e, n, t) {
1144
- t && (vt.value[`${e}-${n}`] = t);
1353
+ function Xt(e, t, n) {
1354
+ n && (Ct.value[`${e}-${t}`] = n);
1145
1355
  }
1146
- function me(e) {
1147
- return e == null ? [] : Array.isArray(e) ? e.map((n) => typeof n == "object" && n !== null && "name" in n ? String(n.name) : String(n)).filter((n) => n.length > 0) : typeof e == "string" ? e.split(",").map((n) => n.trim()).filter((n) => n.length > 0) : [String(e)];
1356
+ function ye(e) {
1357
+ 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)];
1148
1358
  }
1149
1359
  function st(e) {
1150
- return e == null ? [] : Array.isArray(e) ? e.map((n) => typeof n == "object" && n !== null && "name" in n ? {
1151
- name: String(n.name),
1152
- color: "color" in n ? String(n.color) : void 0
1360
+ return e == null ? [] : Array.isArray(e) ? e.map((t) => typeof t == "object" && t !== null && "name" in t ? {
1361
+ name: String(t.name),
1362
+ color: "color" in t ? String(t.color) : void 0
1153
1363
  } : {
1154
- name: String(n),
1364
+ name: String(t),
1155
1365
  color: void 0
1156
- }).filter((n) => n.name.length > 0) : typeof e == "string" ? e.split(",").map((n) => n.trim()).filter((n) => n.length > 0).map((n) => ({ name: n, color: void 0 })) : [{ name: String(e), color: void 0 }];
1157
- }
1158
- function it(e, n, t) {
1159
- const i = me(e);
1160
- if (i.length === 0) return [];
1161
- const r = `${n}-${t}`;
1162
- if (ee.value[r])
1163
- return ee.value[r];
1164
- const v = 130, S = 8, H = 4;
1366
+ }).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 }];
1367
+ }
1368
+ function it(e, t, n) {
1369
+ const o = ye(e);
1370
+ if (o.length === 0) return [];
1371
+ const s = `${t}-${n}`;
1372
+ if (ne.value[s])
1373
+ return ne.value[s];
1374
+ const y = 130, $ = 8, A = 4;
1165
1375
  let K = 0;
1166
1376
  const Z = [];
1167
- for (const se of i) {
1168
- const ie = se.length * 8 + S + H;
1169
- if (K + ie > v && Z.length > 0)
1377
+ for (const ae of o) {
1378
+ const le = ae.length * 8 + $ + A;
1379
+ if (K + le > y && Z.length > 0)
1170
1380
  break;
1171
- Z.push(se), K += ie;
1381
+ Z.push(ae), K += le;
1172
1382
  }
1173
- return ee.value[r] = Z, Z;
1174
- }
1175
- function ot(e, n, t) {
1176
- const i = st(e);
1177
- if (i.length === 0) return [];
1178
- const r = `${n}-${t}-objects`;
1179
- if (ee.value[r])
1180
- return ee.value[r];
1181
- const v = 130, S = 8, H = 4;
1383
+ return ne.value[s] = Z, Z;
1384
+ }
1385
+ function ot(e, t, n) {
1386
+ const o = st(e);
1387
+ if (o.length === 0) return [];
1388
+ const s = `${t}-${n}-objects`;
1389
+ if (ne.value[s])
1390
+ return ne.value[s];
1391
+ const y = 130, $ = 8, A = 4;
1182
1392
  let K = 0;
1183
1393
  const Z = [];
1184
- for (const se of i) {
1185
- const ie = se.name.length * 8 + S + H;
1186
- if (K + ie > v && Z.length > 0)
1394
+ for (const ae of o) {
1395
+ const le = ae.name.length * 8 + $ + A;
1396
+ if (K + le > y && Z.length > 0)
1187
1397
  break;
1188
- Z.push(se), K += ie;
1398
+ Z.push(ae), K += le;
1189
1399
  }
1190
- return ee.value[r] = Z, Z;
1400
+ return ne.value[s] = Z, Z;
1191
1401
  }
1192
- function jt(e, n, t) {
1193
- const i = me(e), r = it(e, n, t);
1194
- return i.length > r.length;
1402
+ function Qt(e, t, n) {
1403
+ const o = ye(e), s = it(e, t, n);
1404
+ return o.length > s.length;
1195
1405
  }
1196
- function Ft(e, n, t) {
1197
- const i = me(e), r = it(e, n, t);
1198
- return i.length - r.length;
1406
+ function en(e, t, n) {
1407
+ const o = ye(e), s = it(e, t, n);
1408
+ return o.length - s.length;
1199
1409
  }
1200
- function Wt(e) {
1201
- const n = e.toLowerCase(), t = {
1410
+ function tn(e) {
1411
+ const t = e.toLowerCase(), n = {
1202
1412
  "high priority": "var(--shifl-color-error-r70)",
1203
1413
  express: "var(--shifl-color-primary-b80)",
1204
1414
  fragile: "var(--shifl-color-warning-o70)",
@@ -1210,21 +1420,21 @@ const cr = /* @__PURE__ */ j(ar, [["render", ur]]), fr = { class: "shifl-grid re
1210
1420
  normal: "var(--shifl-color-neutral-n60)",
1211
1421
  low: "var(--shifl-color-neutral-n50)"
1212
1422
  };
1213
- if (t[n])
1214
- return t[n];
1215
- for (const [i, r] of Object.entries(t))
1216
- if (n.includes(i) || i.includes(n))
1217
- return r;
1218
- return Kt(e);
1423
+ if (n[t])
1424
+ return n[t];
1425
+ for (const [o, s] of Object.entries(n))
1426
+ if (t.includes(o) || o.includes(t))
1427
+ return s;
1428
+ return nn(e);
1219
1429
  }
1220
1430
  function at(e) {
1221
- return e.color && e.color !== "" ? e.color : Wt(e.name);
1431
+ return e.color && e.color !== "" ? e.color : tn(e.name);
1222
1432
  }
1223
- function Kt(e) {
1224
- let n = 0;
1225
- for (let i = 0; i < e.length; i++)
1226
- n = e.charCodeAt(i) + ((n << 5) - n);
1227
- const t = [
1433
+ function nn(e) {
1434
+ let t = 0;
1435
+ for (let o = 0; o < e.length; o++)
1436
+ t = e.charCodeAt(o) + ((t << 5) - t);
1437
+ const n = [
1228
1438
  "var(--shifl-color-primary-b80)",
1229
1439
  "var(--shifl-color-success-g70)",
1230
1440
  "var(--shifl-color-warning-o70)",
@@ -1234,433 +1444,448 @@ const cr = /* @__PURE__ */ j(ar, [["render", ur]]), fr = { class: "shifl-grid re
1234
1444
  "var(--shifl-color-success-g60)",
1235
1445
  "var(--shifl-color-warning-o60)"
1236
1446
  ];
1237
- return t[Math.abs(n) % t.length];
1447
+ return n[Math.abs(t) % n.length];
1238
1448
  }
1239
- function Be(e, n = !0) {
1240
- const i = { ...{
1449
+ function Ie(e, t = !0) {
1450
+ const o = { ...{
1241
1451
  width: e.width ?? "160px",
1242
1452
  minWidth: e.width ?? "160px"
1243
- } }, r = qe.value > 0, v = T.value.filter((H) => H.freeze), S = v[v.length - 1];
1453
+ } }, s = qe.value > 0, y = M.value.filter((A) => A.freeze), $ = y[y.length - 1];
1244
1454
  if (e.freeze) {
1245
- const H = Pt.value[e.key] ?? 0;
1246
- i.position = "sticky", i.left = `${H}px`, i.background = "#ffffff", i.zIndex = n ? 40 : 10, e.key === (S == null ? void 0 : S.key) && r ? i.boxShadow = "2px 0px 4px -2px #121b2b0d, 2px 0px 2px 0px #121b2b0d" : i.boxShadow = "none";
1455
+ const A = Et.value[e.key] ?? 0;
1456
+ o.position = "sticky", o.left = `${A}px`, o.background = "#ffffff", o.zIndex = t ? 40 : 10, e.key === ($ == null ? void 0 : $.key) && s ? o.boxShadow = "2px 0px 4px -2px #121b2b0d, 2px 0px 2px 0px #121b2b0d" : o.boxShadow = "none";
1247
1457
  }
1248
- return n && (i.position = "sticky", i.top = "0px"), i;
1458
+ return t && (o.position = "sticky", o.top = "0px"), o;
1249
1459
  }
1250
- const Jt = k(() => T.value.filter((e) => !e.smartTrackingColumn));
1251
- function re(e) {
1460
+ const rn = C(() => M.value.filter((e) => !e.smartTrackingColumn));
1461
+ function oe(e) {
1252
1462
  return !!e.actionColumn;
1253
1463
  }
1254
- function ve(e) {
1464
+ function be(e) {
1255
1465
  return !!e.smartTrackingColumn;
1256
1466
  }
1257
- function Ut(e) {
1467
+ function sn(e) {
1258
1468
  return e.key === "ref";
1259
1469
  }
1260
- function qt(e, n) {
1470
+ function on(e, t) {
1261
1471
  if (!e.smartTrackingColumn) return !1;
1262
- const t = e.smartTrackingColumn.dataKey, i = n[t];
1263
- if (i === !0 || i === 1) return !0;
1264
- if (typeof i == "string") {
1265
- const r = i.toLowerCase().trim();
1266
- return r === "true" || r === "1" || r === "yes";
1472
+ const n = e.smartTrackingColumn.dataKey, o = t[n];
1473
+ if (o === !0 || o === 1) return !0;
1474
+ if (typeof o == "string") {
1475
+ const s = o.toLowerCase().trim();
1476
+ return s === "true" || s === "1" || s === "yes";
1267
1477
  }
1268
1478
  return !1;
1269
1479
  }
1270
- function _e(e, n) {
1480
+ function ke(e, t) {
1271
1481
  if (!e.actionColumn) return null;
1272
- const t = e.actionColumn.icon;
1273
- return t ? typeof t == "function" ? t(n) : t : null;
1482
+ const n = e.actionColumn.icon;
1483
+ return n ? typeof n == "function" ? n(t) : n : null;
1274
1484
  }
1275
- function Yt(e, n, t, i) {
1276
- if (!t.actionColumn) return;
1277
- const r = i.currentTarget;
1485
+ function an(e, t, n, o) {
1486
+ if (!n.actionColumn) return;
1487
+ const s = o.currentTarget;
1278
1488
  if (z.value.rowIndex === e) {
1279
- Q();
1489
+ te();
1280
1490
  return;
1281
1491
  }
1282
- je.value = t, Me.value = n, ue(e, r);
1492
+ Fe.value = n, Se.value = t, fe(e, s);
1283
1493
  }
1284
- function Xt(e, n) {
1285
- return !(e != null && e.actionColumn) || !n ? [] : (typeof e.actionColumn.actions == "function" ? e.actionColumn.actions(n) : e.actionColumn.actions).filter((i) => i.show ? i.show(n) : !0);
1494
+ function ln(e, t) {
1495
+ return !(e != null && e.actionColumn) || !t ? [] : (typeof e.actionColumn.actions == "function" ? e.actionColumn.actions(t) : e.actionColumn.actions).filter((o) => o.show ? o.show(t) : !0);
1286
1496
  }
1287
- function Qt(e, n, t) {
1288
- _("action-click", e.key, n, t), Q();
1497
+ function un(e, t, n) {
1498
+ h("action-click", e.key, t, n), te();
1289
1499
  }
1290
- const en = (e, n) => {
1291
- ["BUTTON", "A", "INPUT", "SELECT", "TEXTAREA", "SVG", "PATH"].includes(n.target.tagName) || _("row-click", e);
1500
+ const cn = (e, t) => {
1501
+ ["BUTTON", "A", "INPUT", "SELECT", "TEXTAREA", "SVG", "PATH"].includes(t.target.tagName) || h("row-click", e);
1292
1502
  };
1293
- function tn(e, n) {
1294
- n && (ce.value[e] = n);
1503
+ function dn(e, t) {
1504
+ t && (ge.value[e] = t);
1295
1505
  }
1296
1506
  function lt(e) {
1297
1507
  if (z.value.rowIndex === null) return;
1298
- const n = e.target, t = Ze.value, i = Object.values(ce.value), r = t == null ? void 0 : t.contains(n), v = i.some((S) => S.contains(n));
1299
- !r && !v && Q();
1300
- }
1301
- return ke(() => {
1302
- document.addEventListener("click", lt), document.addEventListener("scroll", U), window.addEventListener("scroll", U), window.addEventListener("resize", U);
1303
- }), Ce(() => {
1304
- document.removeEventListener("click", lt), document.removeEventListener("scroll", U), window.removeEventListener("scroll", U), window.removeEventListener("resize", U);
1305
- }), (e, n) => (a(), l("div", fr, [
1306
- d("div", dr, [
1307
- d("button", {
1508
+ const t = e.target, n = Ge.value, o = Object.values(ge.value), s = n == null ? void 0 : n.contains(t), y = o.some(($) => $.contains(t));
1509
+ !s && !y && te();
1510
+ }
1511
+ return we(() => {
1512
+ document.addEventListener("click", lt), document.addEventListener("scroll", q), window.addEventListener("scroll", q), window.addEventListener("resize", q);
1513
+ }), Me(() => {
1514
+ document.removeEventListener("click", lt), document.removeEventListener("scroll", q), window.removeEventListener("scroll", q), window.removeEventListener("resize", q);
1515
+ }), (e, t) => (a(), d("div", Nr, [
1516
+ g("div", Er, [
1517
+ g("button", {
1308
1518
  type: "button",
1309
1519
  class: "shifl-grid__pill-button whitespace-nowrap",
1310
- onClick: n[0] || (n[0] = (t) => O.value = !0)
1311
- }, " Edit Column ")
1520
+ onClick: t[0] || (t[0] = (n) => O.value = !0)
1521
+ }, " Edit Column "),
1522
+ At.value ? (a(), d("button", {
1523
+ key: 0,
1524
+ type: "button",
1525
+ class: "shifl-grid__pill-button whitespace-nowrap flex items-center gap-2",
1526
+ disabled: Ht.value,
1527
+ onClick: Rt,
1528
+ title: "Export Data"
1529
+ }, [
1530
+ ee(Tr),
1531
+ t[6] || (t[6] = se(" Export ", -1))
1532
+ ], 8, Ar)) : H("", !0)
1312
1533
  ]),
1313
- d("div", {
1314
- class: G(["shifl-grid__viewport", { "shifl-grid__viewport--scroll": yt.value }]),
1315
- onScroll: $t
1534
+ g("div", {
1535
+ class: I(["shifl-grid__viewport", {
1536
+ "shifl-grid__viewport--scroll": Mt.value,
1537
+ "shifl-grid__viewport--empty": !Y.value.length
1538
+ }]),
1539
+ onScroll: zt
1316
1540
  }, [
1317
- d("table", gr, [
1318
- d("thead", null, [
1319
- d("tr", null, [
1320
- (a(!0), l(E, null, B(te.value, (t) => {
1321
- var i;
1322
- return a(), l("th", {
1323
- key: t.key,
1324
- style: F(Be(t, !0)),
1325
- onClick: () => Lt(t.key),
1326
- class: G([
1541
+ g("table", Hr, [
1542
+ g("thead", null, [
1543
+ g("tr", null, [
1544
+ (a(!0), d(R, null, j(re.value, (n) => {
1545
+ var o;
1546
+ return a(), d("th", {
1547
+ key: n.key,
1548
+ style: F(Ie(n, !0)),
1549
+ onClick: () => Dt(n.key),
1550
+ class: I([
1327
1551
  "shifl-grid__header-cell",
1328
- `shifl-grid__header-align-${t != null && t.align ? t.align : "left"}`,
1552
+ `shifl-grid__header-align-${n != null && n.align ? n.align : "left"}`,
1329
1553
  {
1330
- "shifl-grid__cell--sticky": t.freeze,
1331
- "shifl-grid__sortable-col": t.sortable,
1332
- "shifl-grid__icon": t.cellType === "icon",
1333
- "shifl-grid__hover-sortable": t.sortable && !re(t) && !ve(t)
1554
+ "shifl-grid__cell--sticky": n.freeze,
1555
+ "shifl-grid__sortable-col": n.sortable,
1556
+ "shifl-grid__icon": n.cellType === "icon",
1557
+ "shifl-grid__hover-sortable": n.sortable && !oe(n) && !be(n)
1334
1558
  }
1335
1559
  ])
1336
1560
  }, [
1337
- d("div", pr, [
1338
- t.label ? (a(), l("span", mr, $(t.label), 1)) : R("", !0),
1339
- ((i = V(x)) == null ? void 0 : i.key) === t.key && V(x).order ? (a(), l("span", vr, [
1340
- V(x).order === "asc" ? (a(), I(ht, { key: 0 })) : (a(), I(jn, { key: 1 }))
1341
- ])) : t.sortable && !re(t) && !ve(t) ? (a(), l("span", _r, [
1342
- oe(ht, { color: "#69758C" })
1343
- ])) : R("", !0)
1561
+ g("div", Vr, [
1562
+ n.label ? (a(), d("span", zr, P(n.label), 1)) : H("", !0),
1563
+ ((o = V(N)) == null ? void 0 : o.key) === n.key && V(N).order ? (a(), d("span", Dr, [
1564
+ V(N).order === "asc" ? (a(), B(vt, { key: 0 })) : (a(), B(rr, { key: 1 }))
1565
+ ])) : n.sortable && !oe(n) && !be(n) ? (a(), d("span", jr, [
1566
+ ee(vt, { color: "#69758C" })
1567
+ ])) : H("", !0)
1344
1568
  ])
1345
- ], 14, hr);
1569
+ ], 14, Rr);
1346
1570
  }), 128))
1347
1571
  ])
1348
1572
  ]),
1349
- d("tbody", null, [
1350
- q.value ? (a(!0), l(E, { key: 0 }, B(bt.value, (t) => (a(), l("tr", {
1351
- key: `skeleton-${t}`,
1573
+ g("tbody", null, [
1574
+ U.value ? (a(!0), d(R, { key: 0 }, j(Tt.value, (n) => (a(), d("tr", {
1575
+ key: `skeleton-${n}`,
1352
1576
  class: "shifl-grid__skeleton-row"
1353
1577
  }, [
1354
- (a(!0), l(E, null, B(te.value, (i) => (a(), l("td", {
1355
- key: i.key,
1356
- style: F(Be(i, !1)),
1357
- class: G({ "shifl-grid__cell--sticky": i.freeze })
1358
- }, [...n[6] || (n[6] = [
1359
- d("div", { class: "shifl-grid__skeleton-cell" }, null, -1)
1578
+ (a(!0), d(R, null, j(re.value, (o) => (a(), d("td", {
1579
+ key: o.key,
1580
+ style: F(Ie(o, !1)),
1581
+ class: I({ "shifl-grid__cell--sticky": o.freeze })
1582
+ }, [...t[7] || (t[7] = [
1583
+ g("div", { class: "shifl-grid__skeleton-cell" }, null, -1)
1360
1584
  ])], 6))), 128))
1361
- ]))), 128)) : (a(), l(E, { key: 1 }, [
1362
- We.value.length ? R("", !0) : (a(), l("tr", yr, [
1363
- d("td", {
1364
- colspan: te.value.length,
1365
- class: "text-center text-gray-500 py-6"
1366
- }, " No data ", 8, br)
1367
- ])),
1368
- (a(!0), l(E, null, B(We.value, (t, i) => (a(), l("tr", {
1369
- key: i,
1370
- onClick: (r) => en(t, r)
1585
+ ]))), 128)) : (a(!0), d(R, { key: 1 }, j(Y.value, (n, o) => (a(), d("tr", {
1586
+ key: o,
1587
+ onClick: (s) => cn(n, s)
1588
+ }, [
1589
+ (a(!0), d(R, null, j(re.value, (s) => (a(), d("td", {
1590
+ key: s.key,
1591
+ style: F(Ie(s, !1)),
1592
+ class: I([
1593
+ { "shifl-grid__cell--sticky": s.freeze },
1594
+ { "shifl-grid__cell--action": oe(s) },
1595
+ `shifl-grid__cell-align-${s != null && s.align ? s.align : "left"}`,
1596
+ { "shifl-grid__icon": s.cellType === "icon" }
1597
+ ])
1371
1598
  }, [
1372
- (a(!0), l(E, null, B(te.value, (r) => (a(), l("td", {
1373
- key: r.key,
1374
- style: F(Be(r, !1)),
1375
- class: G([
1376
- { "shifl-grid__cell--sticky": r.freeze },
1377
- { "shifl-grid__cell--action": re(r) },
1378
- `shifl-grid__cell-align-${r != null && r.align ? r.align : "left"}`,
1379
- { "shifl-grid__icon": r.cellType === "icon" }
1380
- ])
1381
- }, [
1382
- ve(r) ? (a(), l(E, { key: 0 }, [
1383
- qt(r, t) ? (a(), l("div", Cr, [
1384
- oe(zn)
1385
- ])) : R("", !0)
1386
- ], 64)) : re(r) ? (a(), l("div", wr, [
1387
- d("button", {
1388
- type: "button",
1389
- class: "shifl-grid__action-icon",
1390
- ref_for: !0,
1391
- ref: (v) => tn(i, v),
1392
- onClick: J((v) => Yt(i, t, r, v), ["stop"])
1393
- }, [
1394
- _e(r, t) ? typeof _e(r, t) == "string" ? (a(), l("span", {
1395
- key: 1,
1396
- innerHTML: _e(r, t),
1397
- class: "w-4 h-4 inline-block"
1398
- }, null, 8, Sr)) : (a(), I(ye(_e(r, t)), {
1399
- key: 2,
1400
- class: "w-4 h-4"
1401
- })) : (a(), l("span", Tr, "⋯"))
1402
- ], 8, Mr)
1403
- ])) : Et(r) ? (a(), l("div", Pr, [
1404
- (a(!0), l(E, null, B(Rt(r), (v, S) => (a(), l(E, { key: S }, [
1405
- v === "icon" && pe(t[r.key]) ? (a(), I(ye(pe(t[r.key])), {
1406
- key: 0,
1407
- class: "shifl-grid__type-icon"
1408
- })) : v === "icon" ? (a(), l("span", $r, $(X(r.blankStyle)), 1)) : (a(), l("span", {
1409
- key: 2,
1410
- class: G(zt(v))
1411
- }, $(nt(t[r.key], v, r)), 3))
1412
- ], 64))), 128))
1413
- ])) : Ht(r) ? (a(), l("div", Lr, [
1414
- pe(t[r.key]) ? (a(), I(ye(pe(t[r.key])), {
1599
+ be(s) ? (a(), d(R, { key: 0 }, [
1600
+ on(s, n) ? (a(), d("div", Ir, [
1601
+ ee(Jn)
1602
+ ])) : H("", !0)
1603
+ ], 64)) : oe(s) ? (a(), d("div", Or, [
1604
+ g("button", {
1605
+ type: "button",
1606
+ class: "shifl-grid__action-icon",
1607
+ ref_for: !0,
1608
+ ref: (y) => dn(o, y),
1609
+ onClick: J((y) => an(o, n, s, y), ["stop"])
1610
+ }, [
1611
+ ke(s, n) ? typeof ke(s, n) == "string" ? (a(), d("span", {
1612
+ key: 1,
1613
+ innerHTML: ke(s, n),
1614
+ class: "w-4 h-4 inline-block"
1615
+ }, null, 8, Fr)) : (a(), B(ue(ke(s, n)), {
1616
+ key: 2,
1617
+ class: "w-4 h-4"
1618
+ })) : (a(), d("span", Gr, "⋯"))
1619
+ ], 8, Zr)
1620
+ ])) : Zt(s) ? (a(), d("div", Wr, [
1621
+ (a(!0), d(R, null, j(Gt(s), (y, $) => (a(), d(R, { key: $ }, [
1622
+ y === "icon" && _e(n[s.key]) ? (a(), B(ue(_e(n[s.key])), {
1415
1623
  key: 0,
1416
1624
  class: "shifl-grid__type-icon"
1417
- })) : (a(), l("span", Ar, $(X(r.blankStyle)), 1)),
1418
- t.container_count != null ? (a(), l("span", Nr, " (" + $(t.container_count) + ") ", 1)) : R("", !0)
1419
- ])) : tt(r) ? (a(), l(E, { key: 4 }, [
1420
- t[r.key] == null || ot(t[r.key], r.key, i).length === 0 ? (a(), l("div", xr, $(X(r.blankStyle)), 1)) : (a(), l("div", Hr, [
1421
- d("div", Er, [
1422
- d("div", {
1423
- ref_for: !0,
1424
- ref: "(el) => setTagsRef(col.key, rowIndex, el as HTMLElement)",
1425
- class: "shifl-grid__chips-container shifl-grid__chips-container--single-line"
1426
- }, [
1427
- (a(!0), l(E, null, B(ot(
1428
- t[r.key],
1429
- r.key,
1430
- i
1431
- ), (v, S) => (a(), l("span", {
1432
- key: S,
1433
- class: "shifl-grid__chip shifl-grid__chip--tag",
1434
- style: F({ borderLeftColor: at(v) })
1435
- }, $(v.name), 5))), 128))
1436
- ], 512)
1437
- ]),
1438
- jt(t[r.key], r.key, i) ? (a(), l("button", {
1439
- key: 0,
1440
- type: "button",
1441
- class: "shifl-grid__counter-button",
1442
- onMouseenter: (v) => ze(
1443
- r.key,
1444
- i,
1445
- t[r.key],
1446
- v.currentTarget
1447
- ),
1448
- onMouseleave: De
1449
- }, " +" + $(Ft(t[r.key], r.key, i)), 41, Rr)) : R("", !0)
1450
- ]))
1451
- ], 64)) : xt(r) ? (a(), l("div", zr, [
1452
- (a(!0), l(E, null, B(me(t[r.key]), (v, S) => (a(), l("span", {
1453
- key: S,
1454
- class: "shifl-grid__chip shifl-grid__chip--status"
1455
- }, $(v), 1))), 128))
1456
- ])) : r.truncate !== !1 && (r.truncate === !0 || Nt(r.key)) ? (a(), l("div", Dr, [
1457
- d("span", {
1458
- class: "shifl-grid__truncated-text",
1459
- ref_for: !0,
1460
- ref: (v) => Zt(r.key, i, v)
1461
- }, $(Dt(t[r.key], r)), 513),
1462
- Re(r.key) && Bt(t[r.key]) ? (a(), l("button", {
1625
+ })) : y === "icon" ? (a(), d("span", Ur, P(Q(s.blankStyle)), 1)) : (a(), d("span", {
1626
+ key: 2,
1627
+ class: I(Ft(y))
1628
+ }, P(nt(n[s.key], y, s)), 3))
1629
+ ], 64))), 128))
1630
+ ])) : Ot(s) ? (a(), d("div", Kr, [
1631
+ _e(n[s.key]) ? (a(), B(ue(_e(n[s.key])), {
1632
+ key: 0,
1633
+ class: "shifl-grid__type-icon"
1634
+ })) : (a(), d("span", Jr, P(Q(s.blankStyle)), 1)),
1635
+ n.container_count != null ? (a(), d("span", qr, " (" + P(n.container_count) + ") ", 1)) : H("", !0)
1636
+ ])) : tt(s) ? (a(), d(R, { key: 4 }, [
1637
+ n[s.key] == null || ot(n[s.key], s.key, o).length === 0 ? (a(), d("div", Yr, P(Q(s.blankStyle)), 1)) : (a(), d("div", Xr, [
1638
+ g("div", Qr, [
1639
+ g("div", {
1640
+ ref_for: !0,
1641
+ ref: "(el) => setTagsRef(col.key, rowIndex, el as HTMLElement)",
1642
+ class: "shifl-grid__chips-container shifl-grid__chips-container--single-line"
1643
+ }, [
1644
+ (a(!0), d(R, null, j(ot(
1645
+ n[s.key],
1646
+ s.key,
1647
+ o
1648
+ ), (y, $) => (a(), d("span", {
1649
+ key: $,
1650
+ class: "shifl-grid__chip shifl-grid__chip--tag",
1651
+ style: F({ borderLeftColor: at(y) })
1652
+ }, P(y.name), 5))), 128))
1653
+ ], 512)
1654
+ ]),
1655
+ Qt(n[s.key], s.key, o) ? (a(), d("button", {
1463
1656
  key: 0,
1464
1657
  type: "button",
1465
1658
  class: "shifl-grid__counter-button",
1466
- onMouseenter: (v) => ze(
1467
- r.key,
1468
- i,
1469
- t[r.key],
1470
- v.currentTarget
1471
- ),
1472
- onMouseleave: De
1473
- }, " +" + $(It(t[r.key])), 41, Vr)) : !Re(r.key) && Vt(t[r.key], r.key) ? (a(), l("button", {
1474
- key: 1,
1475
- type: "button",
1476
- class: "shifl-grid__info-icon-button",
1477
- onMouseenter: (v) => ze(
1478
- r.key,
1479
- i,
1480
- t[r.key],
1481
- v.currentTarget
1659
+ onMouseenter: (y) => De(
1660
+ s.key,
1661
+ o,
1662
+ n[s.key],
1663
+ y.currentTarget
1482
1664
  ),
1483
- onMouseleave: De
1484
- }, [
1485
- oe(Xn)
1486
- ], 40, Br)) : R("", !0)
1487
- ])) : r.cellType === "link" ? (a(), l("a", {
1488
- key: 7,
1489
- href: String(t[r.key] || ""),
1490
- class: "shifl-grid__link-cell",
1491
- onClick: n[1] || (n[1] = J(() => {
1492
- }, ["stop"]))
1493
- }, $(he(t[r.key], r)), 9, Ir)) : r.cellType === "progress" ? (a(), l("div", Gr, [
1494
- d("div", Or, [
1495
- d("div", {
1496
- class: "shifl-grid__progress-fill",
1497
- style: F({ width: `${At(t[r.key])}%` })
1498
- }, null, 4)
1499
- ]),
1500
- d("span", Zr, $(he(t[r.key], r)), 1)
1501
- ])) : Ut(r) ? (a(), l("div", {
1502
- key: 9,
1503
- class: "shifl-grid__reference-cell",
1504
- onMouseenter: (v) => Gt(String(t[r.key] || ""), v.currentTarget),
1505
- onMouseleave: Ve
1665
+ onMouseleave: je
1666
+ }, " +" + P(en(n[s.key], s.key, o)), 41, es)) : H("", !0)
1667
+ ]))
1668
+ ], 64)) : It(s) ? (a(), d("div", ts, [
1669
+ (a(!0), d(R, null, j(ye(n[s.key]), (y, $) => (a(), d("span", {
1670
+ key: $,
1671
+ class: "shifl-grid__chip shifl-grid__chip--status"
1672
+ }, P(y), 1))), 128))
1673
+ ])) : s.truncate !== !1 && (s.truncate === !0 || Bt(s.key)) ? (a(), d("div", ns, [
1674
+ g("span", {
1675
+ class: "shifl-grid__truncated-text",
1676
+ ref_for: !0,
1677
+ ref: (y) => Xt(s.key, o, y)
1678
+ }, P(Wt(n[s.key], s)), 513),
1679
+ ze(s.key) && Kt(n[s.key]) ? (a(), d("button", {
1680
+ key: 0,
1681
+ type: "button",
1682
+ class: "shifl-grid__counter-button",
1683
+ onMouseenter: (y) => De(
1684
+ s.key,
1685
+ o,
1686
+ n[s.key],
1687
+ y.currentTarget
1688
+ ),
1689
+ onMouseleave: je
1690
+ }, " +" + P(Jt(n[s.key])), 41, rs)) : !ze(s.key) && Ut(n[s.key], s.key) ? (a(), d("button", {
1691
+ key: 1,
1692
+ type: "button",
1693
+ class: "shifl-grid__info-icon-button",
1694
+ onMouseenter: (y) => De(
1695
+ s.key,
1696
+ o,
1697
+ n[s.key],
1698
+ y.currentTarget
1699
+ ),
1700
+ onMouseleave: je
1506
1701
  }, [
1507
- d("span", Fr, $(he(t[r.key], r)), 1),
1508
- t[r.key] ? (a(), l("button", {
1509
- key: 0,
1510
- class: "shifl-grid__copy-icon",
1511
- onClick: J(() => Ot(String(t[r.key] || "")), ["stop"]),
1512
- type: "button"
1513
- }, [
1514
- oe(nr)
1515
- ], 8, Wr)) : R("", !0)
1516
- ], 40, jr)) : (a(), l(E, { key: 10 }, [
1517
- ae($(he(t[r.key], r)), 1)
1518
- ], 64))
1519
- ], 6))), 128))
1520
- ], 8, kr))), 128))
1521
- ], 64))
1702
+ ee(cr)
1703
+ ], 40, ss)) : H("", !0)
1704
+ ])) : s.cellType === "link" ? (a(), d("a", {
1705
+ key: 7,
1706
+ href: String(n[s.key] || ""),
1707
+ class: "shifl-grid__link-cell",
1708
+ onClick: t[1] || (t[1] = J(() => {
1709
+ }, ["stop"]))
1710
+ }, P(ve(n[s.key], s)), 9, is)) : s.cellType === "progress" ? (a(), d("div", os, [
1711
+ g("div", as, [
1712
+ g("div", {
1713
+ class: "shifl-grid__progress-fill",
1714
+ style: F({ width: `${jt(n[s.key])}%` })
1715
+ }, null, 4)
1716
+ ]),
1717
+ g("span", ls, P(ve(n[s.key], s)), 1)
1718
+ ])) : sn(s) ? (a(), d("div", {
1719
+ key: 9,
1720
+ class: "shifl-grid__reference-cell",
1721
+ onMouseenter: (y) => qt(String(n[s.key] || ""), y.currentTarget),
1722
+ onMouseleave: Be
1723
+ }, [
1724
+ g("span", cs, P(ve(n[s.key], s)), 1),
1725
+ n[s.key] ? (a(), d("button", {
1726
+ key: 0,
1727
+ class: "shifl-grid__copy-icon",
1728
+ onClick: J(() => Yt(String(n[s.key] || "")), ["stop"]),
1729
+ type: "button"
1730
+ }, [
1731
+ ee(pr)
1732
+ ], 8, ds)) : H("", !0)
1733
+ ], 40, us)) : (a(), d(R, { key: 10 }, [
1734
+ se(P(ve(n[s.key], s)), 1)
1735
+ ], 64))
1736
+ ], 6))), 128))
1737
+ ], 8, Br))), 128))
1522
1738
  ])
1523
- ])
1739
+ ]),
1740
+ U.value ? H("", !0) : (a(), d("div", fs, [
1741
+ !Y.value.length && Vt.value && l.value.emptyState ? (a(), d("div", gs, [
1742
+ ee(Lr, {
1743
+ "icon-name": l.value.emptyState.iconName,
1744
+ title: l.value.emptyState.title,
1745
+ description: l.value.emptyState.description
1746
+ }, null, 8, ["icon-name", "title", "description"])
1747
+ ])) : Y.value.length ? H("", !0) : (a(), d("div", ps, " No data available "))
1748
+ ]))
1524
1749
  ], 34),
1525
- D.value && D.value.show !== !1 ? (a(), l("div", Kr, [
1526
- d("div", Jr, [
1527
- d("span", Ur, [
1528
- n[7] || (n[7] = ae(" Showing ", -1)),
1529
- d("span", qr, $(Ke.value.from) + "–" + $(Ke.value.to), 1),
1530
- ae(" of " + $(Ne.value), 1)
1750
+ D.value && D.value.show !== !1 ? (a(), d("div", hs, [
1751
+ g("div", ms, [
1752
+ g("span", vs, [
1753
+ t[8] || (t[8] = se(" Showing ", -1)),
1754
+ g("span", _s, P(Ue.value.from) + "–" + P(Ue.value.to), 1),
1755
+ se(" of " + P(Ae.value), 1)
1531
1756
  ])
1532
1757
  ]),
1533
- d("div", Yr, [
1534
- d("div", Xr, [
1535
- n[9] || (n[9] = d("label", { class: "shifl-grid__pagination-label" }, "Row per page", -1)),
1536
- d("select", {
1758
+ g("div", ys, [
1759
+ g("div", bs, [
1760
+ t[10] || (t[10] = g("label", { class: "shifl-grid__pagination-label" }, "Row per page", -1)),
1761
+ g("select", {
1537
1762
  value: D.value.perPage || 20,
1538
- disabled: q.value,
1539
- onChange: Tt,
1763
+ disabled: U.value,
1764
+ onChange: Lt,
1540
1765
  class: "shifl-grid__pagination-select"
1541
- }, [...n[8] || (n[8] = [
1542
- nn('<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)
1543
- ])], 40, Qr)
1766
+ }, [...t[9] || (t[9] = [
1767
+ fn('<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)
1768
+ ])], 40, ks)
1544
1769
  ]),
1545
- d("div", es, [
1546
- d("button", {
1770
+ g("div", Cs, [
1771
+ g("button", {
1547
1772
  type: "button",
1548
1773
  class: "shifl-grid__pagination-button",
1549
- disabled: Je.value || g.loading,
1550
- onClick: wt,
1774
+ disabled: Ke.value || f.loading,
1775
+ onClick: $t,
1551
1776
  "aria-label": "Previous page"
1552
- }, " ‹ ", 8, ts),
1553
- d("div", ns, [
1554
- (a(!0), l(E, null, B(kt.value, (t) => (a(), l(E, { key: t }, [
1555
- t !== -1 ? (a(), l("button", {
1777
+ }, " ‹ ", 8, ws),
1778
+ g("div", Ms, [
1779
+ (a(!0), d(R, null, j(St.value, (n) => (a(), d(R, { key: n }, [
1780
+ n !== -1 ? (a(), d("button", {
1556
1781
  key: 0,
1557
1782
  type: "button",
1558
- class: G(["shifl-grid__pagination-page", { "shifl-grid__pagination-page--active": t === Y.value }]),
1559
- disabled: q.value,
1560
- onClick: (i) => Ct(t)
1561
- }, $(t), 11, rs)) : (a(), l("span", ss, "…"))
1783
+ class: I(["shifl-grid__pagination-page", { "shifl-grid__pagination-page--active": n === X.value }]),
1784
+ disabled: U.value,
1785
+ onClick: (o) => xt(n)
1786
+ }, P(n), 11, Ts)) : (a(), d("span", Ss, "…"))
1562
1787
  ], 64))), 128))
1563
1788
  ]),
1564
- d("button", {
1789
+ g("button", {
1565
1790
  type: "button",
1566
1791
  class: "shifl-grid__pagination-button",
1567
- disabled: Ue.value || g.loading,
1568
- onClick: Mt,
1792
+ disabled: Je.value || f.loading,
1793
+ onClick: Pt,
1569
1794
  "aria-label": "Next page"
1570
- }, " › ", 8, is)
1795
+ }, " › ", 8, xs)
1571
1796
  ])
1572
1797
  ])
1573
- ])) : R("", !0),
1574
- (a(), I(be, { to: "body" }, [
1575
- V(z).rowIndex !== null && V(z).position ? (a(), l("div", {
1798
+ ])) : H("", !0),
1799
+ (a(), B(Ce, { to: "body" }, [
1800
+ V(z).rowIndex !== null && V(z).position ? (a(), d("div", {
1576
1801
  key: 0,
1577
1802
  ref_key: "actionMenuRef",
1578
- ref: Ze,
1803
+ ref: Ge,
1579
1804
  class: "shifl-grid__action-menu",
1580
1805
  style: F(`
1581
1806
  position: fixed !important;
1582
1807
  top: ${V(z).position.top}px !important;
1583
1808
  left: ${V(z).position.left}px !important;
1584
1809
  z-index: 1000 !important;`),
1585
- onClick: n[2] || (n[2] = J(() => {
1810
+ onClick: t[2] || (t[2] = J(() => {
1586
1811
  }, ["stop"]))
1587
1812
  }, [
1588
- (a(!0), l(E, null, B(Xt(je.value, Me.value), (t) => (a(), l("div", {
1589
- key: t.key,
1590
- class: G(["shifl-grid__action-menu-item", { "shifl-grid__action-menu-item--danger": t.danger }]),
1591
- onClick: () => Qt(t, Me.value, V(z).rowIndex)
1813
+ (a(!0), d(R, null, j(ln(Fe.value, Se.value), (n) => (a(), d("div", {
1814
+ key: n.key,
1815
+ class: I(["shifl-grid__action-menu-item", { "shifl-grid__action-menu-item--danger": n.danger }]),
1816
+ onClick: () => un(n, Se.value, V(z).rowIndex)
1592
1817
  }, [
1593
- t.icon && typeof t.icon == "string" ? (a(), l("span", {
1818
+ n.icon && typeof n.icon == "string" ? (a(), d("span", {
1594
1819
  key: 0,
1595
- innerHTML: t.icon,
1820
+ innerHTML: n.icon,
1596
1821
  class: "w-4 h-4 inline-block"
1597
- }, null, 8, as)) : t.icon ? (a(), I(ye(typeof t.icon == "function" ? t.icon() : t.icon), {
1822
+ }, null, 8, Ps)) : n.icon ? (a(), B(ue(typeof n.icon == "function" ? n.icon() : n.icon), {
1598
1823
  key: 1,
1599
1824
  class: "w-4 h-4"
1600
- })) : R("", !0),
1601
- d("span", null, $(t.label), 1)
1602
- ], 10, os))), 128))
1603
- ], 4)) : R("", !0)
1825
+ })) : H("", !0),
1826
+ g("span", null, P(n.label), 1)
1827
+ ], 10, $s))), 128))
1828
+ ], 4)) : H("", !0)
1604
1829
  ])),
1605
- oe(xn, {
1606
- content: Fe.value,
1607
- visible: Te.value,
1608
- "trigger-element": Se.value,
1830
+ ee(Fn, {
1831
+ content: We.value,
1832
+ visible: xe.value,
1833
+ "trigger-element": $e.value,
1609
1834
  "is-html": Pe.value
1610
1835
  }, null, 8, ["content", "visible", "trigger-element", "is-html"]),
1611
- (a(), I(be, { to: "body" }, [
1612
- fe.value ? (a(), l("div", {
1836
+ (a(), B(Ce, { to: "body" }, [
1837
+ pe.value ? (a(), d("div", {
1613
1838
  key: 0,
1614
1839
  class: "shifl-grid__copy-tooltip",
1615
1840
  style: F({
1616
1841
  position: "fixed",
1617
- top: `${$e.value.top}px`,
1618
- left: `${$e.value.left}px`,
1842
+ top: `${Le.value.top}px`,
1843
+ left: `${Le.value.left}px`,
1619
1844
  zIndex: "10000"
1620
1845
  })
1621
1846
  }, [
1622
- n[10] || (n[10] = d("div", { class: "shifl-grid__copy-tooltip-arrow" }, null, -1)),
1623
- d("div", ls, $(de.value), 1)
1624
- ], 4)) : R("", !0)
1847
+ t[11] || (t[11] = g("div", { class: "shifl-grid__copy-tooltip-arrow" }, null, -1)),
1848
+ g("div", Ls, P(he.value), 1)
1849
+ ], 4)) : H("", !0)
1625
1850
  ])),
1626
- (a(), I(be, { to: "body" }, [
1627
- O.value ? (a(), I($n, {
1851
+ (a(), B(Ce, { to: "body" }, [
1852
+ O.value ? (a(), B(In, {
1628
1853
  key: 0,
1629
- "title-prefix": o.config.name,
1630
- columns: Jt.value,
1631
- onClose: n[3] || (n[3] = (t) => O.value = !1),
1632
- onToggle: V(c),
1633
- onToggleFreeze: V(C),
1634
- onMove: V(N),
1635
- onSelectAll: n[4] || (n[4] = (t) => V(h)(!0)),
1636
- onDeselectAll: n[5] || (n[5] = (t) => V(h)(!1)),
1637
- onRestoreDefault: V(A)
1638
- }, null, 8, ["title-prefix", "columns", "onToggle", "onToggleFreeze", "onMove", "onRestoreDefault"])) : R("", !0)
1854
+ "title-prefix": i.config.name,
1855
+ columns: rn.value,
1856
+ onClose: t[3] || (t[3] = (n) => O.value = !1),
1857
+ onToggle: V(p),
1858
+ onToggleFreeze: V(S),
1859
+ onMove: V(E),
1860
+ onSelectAll: t[4] || (t[4] = (n) => V(v)(!0)),
1861
+ onDeselectAll: t[5] || (t[5] = (n) => V(v)(!1)),
1862
+ onRestoreDefault: V(L)
1863
+ }, null, 8, ["title-prefix", "columns", "onToggle", "onToggleFreeze", "onMove", "onRestoreDefault"])) : H("", !0)
1639
1864
  ]))
1640
1865
  ]));
1641
1866
  }
1642
- }), fs = {
1643
- install(o) {
1644
- o.component("ShiflGrid", us);
1867
+ }), As = {
1868
+ install(i) {
1869
+ i.component("ShiflGrid", Ns);
1645
1870
  }
1646
1871
  };
1647
- function ds() {
1648
- const o = b(/* @__PURE__ */ new Set());
1649
- function s(g) {
1650
- const _ = g.id ?? JSON.stringify(g), u = new Set(o.value);
1651
- u.has(_) ? u.delete(_) : u.add(_), o.value = u;
1872
+ function Hs() {
1873
+ const i = b(/* @__PURE__ */ new Set());
1874
+ function r(f) {
1875
+ const h = f.id ?? JSON.stringify(f), l = new Set(i.value);
1876
+ l.has(h) ? l.delete(h) : l.add(h), i.value = l;
1652
1877
  }
1653
1878
  return {
1654
- selectedKeys: o,
1655
- toggleRow: s
1879
+ selectedKeys: i,
1880
+ toggleRow: r
1656
1881
  };
1657
1882
  }
1658
- function gs() {
1883
+ function Rs() {
1659
1884
  return {
1660
1885
  // placeholder
1661
1886
  };
1662
1887
  }
1663
- const pt = Symbol("shifl-grid-theme"), mt = {
1888
+ const bt = Symbol("shifl-grid-theme"), kt = {
1664
1889
  surface: "var(--shifl-surface)",
1665
1890
  surfaceAlt: "var(--shifl-surface-alt)",
1666
1891
  border: "var(--shifl-border)",
@@ -1670,61 +1895,61 @@ const pt = Symbol("shifl-grid-theme"), mt = {
1670
1895
  accentStrong: "var(--shifl-accent-strong)",
1671
1896
  focus: "var(--shifl-focus)"
1672
1897
  };
1673
- function hs(o) {
1674
- const s = b({ ...mt, ...o });
1675
- return rn(pt, s), s;
1898
+ function Vs(i) {
1899
+ const r = b({ ...kt, ...i });
1900
+ return gn(bt, r), r;
1676
1901
  }
1677
- function ps() {
1678
- const o = sn(pt);
1679
- return k(() => (o == null ? void 0 : o.value) ?? mt);
1902
+ function zs() {
1903
+ const i = pn(bt);
1904
+ return C(() => (i == null ? void 0 : i.value) ?? kt);
1680
1905
  }
1681
- const Ie = {
1906
+ const Oe = {
1682
1907
  sm: 640,
1683
1908
  lg: 1024
1684
1909
  };
1685
- function ms() {
1686
- const o = b(typeof window < "u" ? window.innerWidth : 0);
1687
- function s() {
1688
- o.value = window.innerWidth;
1910
+ function Ds() {
1911
+ const i = b(typeof window < "u" ? window.innerWidth : 0);
1912
+ function r() {
1913
+ i.value = window.innerWidth;
1689
1914
  }
1690
- return ke(() => {
1691
- window.addEventListener("resize", s);
1692
- }), Ce(() => {
1693
- window.removeEventListener("resize", s);
1915
+ return we(() => {
1916
+ window.addEventListener("resize", r);
1917
+ }), Me(() => {
1918
+ window.removeEventListener("resize", r);
1694
1919
  }), {
1695
- width: o,
1696
- isMobile: k(() => o.value < Ie.sm),
1697
- isTablet: k(() => o.value >= Ie.sm && o.value < Ie.lg)
1920
+ width: i,
1921
+ isMobile: C(() => i.value < Oe.sm),
1922
+ isTablet: C(() => i.value >= Oe.sm && i.value < Oe.lg)
1698
1923
  };
1699
1924
  }
1700
- function vs() {
1925
+ function js() {
1701
1926
  return {
1702
1927
  // placeholder
1703
1928
  };
1704
1929
  }
1705
- function _s() {
1930
+ function Bs() {
1706
1931
  return {
1707
1932
  // placeholder
1708
1933
  };
1709
1934
  }
1710
- function ys() {
1935
+ function Is() {
1711
1936
  return {
1712
1937
  // placeholder
1713
1938
  };
1714
1939
  }
1715
1940
  export {
1716
- us as ShiflGrid,
1717
- fs as ShiflGridPlugin,
1718
- hs as provideGridTheme,
1719
- ms as useBreakpoints,
1720
- an as useGridColumns,
1721
- dn as useGridData,
1722
- gs as useGridEditing,
1723
- un as useGridFilter,
1724
- vs as useGridInfiniteScroll,
1725
- ds as useGridSelection,
1726
- ln as useGridSort,
1727
- ps as useGridTheme,
1728
- ys as useGridTour,
1729
- _s as useVirtualScroll
1941
+ Ns as ShiflGrid,
1942
+ As as ShiflGridPlugin,
1943
+ Vs as provideGridTheme,
1944
+ Ds as useBreakpoints,
1945
+ mn as useGridColumns,
1946
+ kn as useGridData,
1947
+ Rs as useGridEditing,
1948
+ _n as useGridFilter,
1949
+ js as useGridInfiniteScroll,
1950
+ Hs as useGridSelection,
1951
+ vn as useGridSort,
1952
+ zs as useGridTheme,
1953
+ Is as useGridTour,
1954
+ Bs as useVirtualScroll
1730
1955
  };