@shifl-inc/ui 0.9.1 → 0.9.3

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 _, computed as k, onMounted as be, onUnmounted as ke, watch as W, nextTick as Ze, defineComponent as je, createElementBlock as l, openBlock as a, withModifiers as J, createElementVNode as d, createCommentVNode as z, createTextVNode as ie, toDisplayString as P, Fragment as H, renderList as B, normalizeClass as Z, createBlock as I, Teleport as ye, normalizeStyle as F, createVNode as ve, unref as V, resolveDynamicComponent as _e, createStaticVNode as en, provide as tn, inject as nn } from "vue";
2
- function rn(o) {
3
- const s = (o.columns || []).map((y) => ({
4
- ...y,
5
- freeze: y.freeze ?? !1,
6
- visible: y.visible ?? !0,
7
- protected: y.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 R, createTextVNode as se, toDisplayString as P, Fragment as H, renderList as j, normalizeClass as I, createBlock as B, Teleport as Ce, normalizeStyle as F, unref as V, resolveDynamicComponent as ue, createVNode as te, 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 sn(o) {
28
- const s = [...o], g = _([...o]);
29
- function y(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 c(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 b(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 $(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], [u] = M.splice(p, 1);
48
- M.splice(f, 0, u), 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 S() {
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: y,
58
- setAllVisible: c,
59
- toggleFreeze: b,
60
- moveColumn: $,
61
- resetColumns: S
57
+ toggleColumnVisibility: h,
58
+ setAllVisible: l,
59
+ toggleFreeze: m,
60
+ moveColumn: T,
61
+ resetColumns: k
62
62
  };
63
63
  }
64
- function on(o) {
65
- const s = _(o);
66
- function g(c) {
67
- var b;
68
- s.value = ((b = s.value) == null ? void 0 : b.key) === c && s.value.order === "asc" ? { key: c, order: "desc" } : { key: c, 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 y(c) {
71
- if (!s.value) return c;
72
- const { key: b, order: $ } = s.value;
73
- return [...c].sort((S, w) => {
74
- const p = S[b], f = w[b];
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 $ === "asc" ? m : -m;
81
+ return T === "asc" ? _ : -_;
82
82
  });
83
83
  }
84
84
  return {
85
- sort: s,
86
- setSort: g,
87
- applySort: y
85
+ sort: r,
86
+ setSort: f,
87
+ applySort: h
88
88
  };
89
89
  }
90
- function an() {
91
- function o(s, g, y) {
92
- const c = (y || "").trim().toLowerCase();
93
- return c ? s.filter((b) => (g && g.length ? g.map((S) => b[S]) : Object.values(b)).some(
94
- (S) => String(S ?? "").toLowerCase().includes(c)
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 ln() {
102
- const o = _({
101
+ function yn() {
102
+ const i = b({
103
103
  rowIndex: null,
104
104
  position: null
105
105
  });
106
- function s(b, $, S = 200) {
107
- const w = $.getBoundingClientRect();
108
- let p = w.left;
109
- p + S > window.innerWidth - 8 && (p = window.innerWidth - S + 8), o.value = {
110
- rowIndex: b,
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(b) {
125
- return o.value.rowIndex === b;
124
+ function h(m) {
125
+ return i.value.rowIndex === m;
126
126
  }
127
- function c(b) {
128
- b.key === "Escape" && o.value.rowIndex !== null && g();
127
+ function l(m) {
128
+ m.key === "Escape" && i.value.rowIndex !== null && f();
129
129
  }
130
- return be(() => {
131
- document.addEventListener("keydown", c);
132
- }), ke(() => {
133
- document.removeEventListener("keydown", c);
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: y
135
+ menuState: i,
136
+ openMenu: r,
137
+ closeMenu: f,
138
+ isMenuOpen: h
139
139
  };
140
140
  }
141
- function un(o, s) {
142
- const g = _(!1), y = _(null), c = _([]), b = _(void 0);
143
- let $ = null;
144
- function S(u) {
145
- const h = new URLSearchParams();
146
- if (u.search && h.append("search", u.search), u.page !== void 0 && h.append("page", String(u.page)), u.perPage !== void 0 && h.append("per_page", String(u.perPage)), u.sort && (h.append("sort", u.sort.key), h.append("order", u.sort.order)), u.filters && u.filters.length > 0 && u.filters.forEach((C) => {
147
- if (C.value !== void 0 && C.value !== null && C.value !== "") {
148
- const A = `filters[${C.key}]`;
149
- Array.isArray(C.value) ? C.value.forEach((N) => h.append(`${A}[]`, String(N))) : h.append(A, 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
- }), u.tabName && h.append("tabName", u.tabName), s != null && s.additionalParams) {
152
- const C = typeof s.additionalParams == "function" ? s.additionalParams(u) : s.additionalParams;
153
- Object.entries(C).forEach(([A, N]) => {
154
- A === "tabName" && u.tabName || N != null && N !== "" && (Array.isArray(N) ? N.forEach((x) => h.append(`${A}[]`, String(x))) : h.append(A, String(N)));
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(u) {
160
- var h, C, A;
161
- return s != null && s.bodyBuilder ? s.bodyBuilder(u) : {
162
- search: u.search,
163
- page: u.page,
164
- per_page: u.perPage,
165
- sort: (h = u.sort) == null ? void 0 : h.key,
166
- order: (C = u.sort) == null ? void 0 : C.order,
167
- tabName: u.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: (A = u.filters) == null ? void 0 : A.reduce(
170
- (N, x) => (x.value !== void 0 && x.value !== null && x.value !== "" && (N[x.key] = x.value), N),
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(u) : Object.fromEntries(
175
- Object.entries((s == null ? void 0 : s.additionalParams) || {}).filter(
176
- ([N]) => N !== "tabName" || !u.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 u = {
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 && (u.Authorization = `Bearer ${h}`);
186
+ if (r != null && r.getAuthToken) {
187
+ const v = r.getAuthToken();
188
+ v && (p.Authorization = `Bearer ${v}`);
189
189
  }
190
- return u;
190
+ return p;
191
191
  }
192
- function f(u) {
193
- if (s != null && s.responseTransformer)
194
- return s.responseTransformer(u);
195
- const h = u;
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(u) {
202
- if (!o) {
203
- y.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, y.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 A = o, N;
210
- if (h === "GET") {
211
- const ne = s != null && s.paramsBuilder ? s.paramsBuilder(u) : S(u);
212
- if (ne instanceof URLSearchParams) {
213
- const E = ne.toString();
214
- A = E ? `${o}?${E}` : 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
- const E = new URLSearchParams();
217
- Object.entries(ne).forEach(([X, j]) => {
218
- j != null && j !== "" && (Array.isArray(j) ? j.forEach((le) => E.append(`${X}[]`, String(le))) : E.append(X, String(j)));
216
+ const z = new URLSearchParams();
217
+ Object.entries(ie).forEach(([ne, O]) => {
218
+ O != null && O !== "" && (Array.isArray(O) ? O.forEach((ge) => z.append(`${ne}[]`, String(ge))) : z.append(ne, String(O)));
219
219
  });
220
- const ae = E.toString();
221
- A = ae ? `${o}?${ae}` : o;
220
+ const fe = z.toString();
221
+ E = fe ? `${i}?${fe}` : i;
222
222
  }
223
223
  } else
224
- N = w(u);
225
- const x = await fetch(A, {
226
- method: h,
227
- headers: C,
228
- body: N ? JSON.stringify(N) : 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 Ce = await x.json(), oe = f(Ce);
233
- c.value = oe.data, b.value = oe.meta;
234
- } catch (h) {
235
- y.value = h instanceof Error ? h : new Error("Unknown error occurred"), c.value = [], b.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(u, h = !1) {
241
- $ && (clearTimeout($), $ = null);
242
- const C = (s == null ? void 0 : s.debounceMs) ?? 300;
243
- h || !u.search ? m(u) : $ = setTimeout(() => {
244
- m(u);
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(u) {
248
- T(u, !0);
247
+ function x(p) {
248
+ M(p, !0);
249
249
  }
250
250
  return {
251
- loading: k(() => g.value),
252
- error: k(() => y.value),
253
- data: k(() => c.value),
254
- paginationMeta: k(() => b.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 cn(o, s) {
261
- var w, p;
262
- const g = (s == null ? void 0 : s.search) || _(void 0), y = (s == null ? void 0 : s.filters) || _(o.filters), c = (s == null ? void 0 : s.sort) || _(o.sort), b = (s == null ? void 0 : s.pagination) || _({
263
- page: ((w = o.paginationMeta) == null ? void 0 : w.currentPage) || 1,
264
- perPage: ((p = o.paginationMeta) == null ? void 0 : p.perPage) || 20
265
- }), $ = (s == null ? void 0 : s.extraState) || _(void 0), S = (s == null ? void 0 : s.tabName) || _(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: y.value,
272
- sort: c.value,
273
- page: (h = b.value) == null ? void 0 : h.page,
274
- perPage: (C = b.value) == null ? void 0 : C.perPage,
275
- extraState: $.value,
276
- tabName: S.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, A, N, x;
280
- return u ? h.search !== u.search || h.page !== u.page || h.perPage !== u.perPage || h.tabName !== u.tabName || ((C = h.sort) == null ? void 0 : C.key) !== ((A = u.sort) == null ? void 0 : A.key) || ((N = h.sort) == null ? void 0 : N.order) !== ((x = u.sort) == null ? void 0 : x.order) || JSON.stringify(h.filters) !== JSON.stringify(u.filters) || JSON.stringify(h.extraState) !== JSON.stringify(u.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 = un(o.apiConfig.apiUrl, o.apiConfig);
283
- let M = !1, u = null;
282
+ const M = bn(i.apiConfig.apiUrl, i.apiConfig);
283
+ let x = !1, p = null;
284
284
  return W(
285
- [g, y, c, b, $, S],
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
- u = 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 && b.value) {
299
- const C = h.perPage || b.value.perPage;
300
- C !== b.value.perPage && (M = !0, b.value.perPage = C, Ze(() => {
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, A;
311
- const h = {
312
- search: g.value,
313
- filters: y.value,
314
- sort: c.value,
315
- page: (C = b.value) == null ? void 0 : C.page,
316
- perPage: (A = b.value) == null ? void 0 : A.perPage,
317
- extraState: $.value,
318
- tabName: S.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 fn = { class: "shifl-column-manager__header" }, dn = { class: "shifl-column-manager__title-wrapper" }, gn = { class: "shifl-column-manager__title" }, hn = { key: 0 }, pn = { key: 1 }, mn = { class: "shifl-column-manager__controls" }, vn = { class: "shifl-column-manager__controls-left" }, _n = { class: "shifl-column-manager__content" }, yn = { class: "shifl-column-manager__list" }, bn = ["draggable", "onDragstart", "onDragover", "onDrop"], kn = ["aria-label", "disabled"], Cn = ["checked", "disabled", "onChange"], wn = { class: "shifl-column-manager__label-text" }, Mn = { class: "shifl-column-manager__footer" }, Tn = /* @__PURE__ */ je({
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 yt(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 ht(i, r) {
357
+ const f = Cn(i), h = r.endsWith(".csv") ? r : `${r}.csv`;
358
+ yt(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>${mt(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>${mt(_)}</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
+ yt(m, T, "application/vnd.ms-excel");
432
+ }
433
+ function mt(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
+ ht(h, f);
446
+ break;
447
+ case "excel":
448
+ case "xlsx":
449
+ wn(h, f);
450
+ break;
451
+ default:
452
+ ht(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 vt(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, y = k(() => g.columns), c = s, b = _(null);
342
- function $(p) {
343
- var f, m;
344
- (f = g.columns[p]) != null && f.freeze || (m = g.columns[p]) != null && m.protected || (b.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 S(p) {
484
+ function k(u) {
347
485
  }
348
- function w(p) {
349
- b.value === null || b.value === p || (c("move", b.value, p), b.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", fn, [
363
- d("div", dn, [
364
- d("h2", gn, [
365
- o.titlePrefix ? (a(), l("span", hn, P(o.titlePrefix), 1)) : z("", !0),
366
- o.titlePrefix ? (a(), l("span", pn, ">")) : z("", !0),
367
- f[8] || (f[8] = ie("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)) : R("", !0),
504
+ i.titlePrefix ? (a(), d("span", Ln, ">")) : R("", !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", mn, [
379
- d("div", vn, [
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", _n, [
398
- d("ul", yn, [
399
- (a(!0), l(H, null, B(y.value, (m, T) => (a(), l("li", {
400
- key: m.key,
401
- class: Z(["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(H, 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) => $(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: Z(["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, kn),
419
- d("label", {
420
- class: Z(["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, Cn),
431
- f[11] || (f[11] = d("span", { class: "shifl-column-manager__checkbox-custom" }, null, -1)),
432
- d("span", wn, P(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, bn))), 128))
572
+ ], 42, Rn))), 128))
435
573
  ])
436
574
  ]),
437
- d("footer", Mn, [
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
- }), O = (o, s) => {
453
- const g = o.__vccOpts || o;
454
- for (const [y, c] of s)
455
- g[y] = c;
456
- return g;
457
- }, Sn = /* @__PURE__ */ O(Tn, [["__scopeId", "data-v-40ca0ed0"]]), Pn = { class: "shifl-grid__tooltip-content" }, $n = ["innerHTML"], Ln = /* @__PURE__ */ je({
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 fn = { class: "shifl-column-manager__header" }, dn = { class: "shifl-colum
462
600
  triggerElement: {},
463
601
  isHtml: { type: Boolean }
464
602
  },
465
- setup(o) {
466
- const s = o, g = _(null), y = _({}), c = k(() => s.content.includes(`
467
- `)), b = k(() => c.value ? s.content.split(`
468
- `).filter((p) => p.trim().length > 0) : []), $ = _("top"), S = _({});
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, u = p.left + window.scrollX;
473
- u + f.width > m - 16 && (u = m - f.width - 16), u < 16 && (u = 16), M + f.height > T - 16 ? (M = p.top - f.height - 8, $.value = "bottom") : $.value = "top", y.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: `${u}px`,
613
+ top: `${x}px`,
614
+ left: `${p}px`,
477
615
  zIndex: "10000"
478
616
  };
479
- const h = p.left + p.width / 2 - u;
480
- S.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 Ze(), w());
623
+ () => r.visible,
624
+ async (u) => {
625
+ u && (await Ze(), w());
488
626
  }
489
- ), be(() => {
490
- s.visible && Ze(() => w());
491
- }), ke(() => {
492
- }), (p, f) => (a(), I(ye, { 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(y.value)
636
+ style: F(h.value)
499
637
  }, [
500
- d("div", {
501
- class: Z(["shifl-grid__tooltip-arrow", $.value]),
502
- style: F(S.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", Pn, [
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, $n)) : c.value ? (a(!0), l(H, { key: 1 }, B(b.value, (m, T) => (a(), l("div", {
509
- key: T,
645
+ innerHTML: i.content
646
+ }, null, 8, Zn)) : l.value ? (a(!0), d(H, { key: 1 }, j(m.value, (_, M) => (a(), d("div", {
647
+ key: M,
510
648
  class: "shifl-grid__tooltip-line"
511
- }, P(m), 1))), 128)) : (a(), l(H, { key: 2 }, [
512
- ie(P(o.content), 1)
649
+ }, P(_), 1))), 128)) : (a(), d(H, { key: 2 }, [
650
+ se(P(i.content), 1)
513
651
  ], 64))
514
652
  ])
515
- ], 4)) : z("", !0)
653
+ ], 4)) : R("", !0)
516
654
  ]));
517
655
  }
518
- }), Nn = /* @__PURE__ */ O(Ln, [["__scopeId", "data-v-239005f1"]]), An = {}, xn = {
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,92 +661,100 @@ const fn = { class: "shifl-column-manager__header" }, dn = { class: "shifl-colum
523
661
  xmlns: "http://www.w3.org/2000/svg",
524
662
  class: "shifl-smart-tracking-icon"
525
663
  };
526
- function Hn(o, s) {
527
- return a(), l("svg", xn, [...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 Rn = /* @__PURE__ */ O(An, [["render", Hn]]), zn = {}, En = {
672
+ const Jn = /* @__PURE__ */ G(Wn, [["render", Kn]]), qn = {
673
+ name: "SortAscendingIcon",
674
+ props: {
675
+ color: {
676
+ type: String,
677
+ default: "#1A6D9E"
678
+ }
679
+ }
680
+ }, Yn = {
535
681
  width: "14",
536
682
  height: "10",
537
683
  viewBox: "0 0 14 10",
538
684
  fill: "none",
539
685
  xmlns: "http://www.w3.org/2000/svg"
540
- };
541
- function Dn(o, s) {
542
- return a(), l("svg", En, [...s[0] || (s[0] = [
543
- d("path", {
686
+ }, Xn = ["fill"];
687
+ function Qn(i, r, f, h, l, m) {
688
+ return a(), d("svg", Yn, [
689
+ g("path", {
544
690
  "fill-rule": "evenodd",
545
691
  "clip-rule": "evenodd",
546
- 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",
547
- fill: "#1A6D9E"
548
- }, null, -1)
549
- ])]);
692
+ fill: f.color,
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"
694
+ }, null, 8, Xn)
695
+ ]);
550
696
  }
551
- const Vn = /* @__PURE__ */ O(zn, [["render", Dn]]), Bn = {}, In = {
697
+ const _t = /* @__PURE__ */ G(qn, [["render", Qn]]), er = {}, tr = {
552
698
  width: "14",
553
699
  height: "10",
554
700
  viewBox: "0 0 14 10",
555
701
  fill: "none",
556
702
  xmlns: "http://www.w3.org/2000/svg"
557
703
  };
558
- function Zn(o, s) {
559
- return a(), l("svg", In, [...s[0] || (s[0] = [
560
- d("path", {
704
+ function nr(i, r) {
705
+ return a(), d("svg", tr, [...r[0] || (r[0] = [
706
+ g("path", {
561
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",
562
708
  fill: "#1A6D9E"
563
709
  }, null, -1)
564
710
  ])]);
565
711
  }
566
- const jn = /* @__PURE__ */ O(Bn, [["render", Zn]]), Gn = {}, On = {
712
+ const rr = /* @__PURE__ */ G(er, [["render", nr]]), sr = {}, ir = {
567
713
  width: "21",
568
714
  height: "13",
569
715
  viewBox: "0 0 21 13",
570
716
  fill: "none",
571
717
  xmlns: "http://www.w3.org/2000/svg"
572
718
  };
573
- function Fn(o, s) {
574
- return a(), l("svg", On, [...s[0] || (s[0] = [
575
- d("path", {
719
+ function or(i, r) {
720
+ return a(), d("svg", ir, [...r[0] || (r[0] = [
721
+ g("path", {
576
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",
577
- fill: "#9CA5B4"
723
+ fill: "#69758C"
578
724
  }, null, -1)
579
725
  ])]);
580
726
  }
581
- const Wn = /* @__PURE__ */ O(Gn, [["render", Fn]]), Kn = {}, Jn = {
727
+ const bt = /* @__PURE__ */ G(sr, [["render", or]]), ar = {}, lr = {
582
728
  width: "16",
583
729
  height: "16",
584
730
  viewBox: "0 0 16 16",
585
731
  fill: "none",
586
732
  xmlns: "http://www.w3.org/2000/svg"
587
733
  };
588
- function qn(o, s) {
589
- return a(), l("svg", Jn, [...s[0] || (s[0] = [
590
- d("path", {
734
+ function ur(i, r) {
735
+ return a(), d("svg", lr, [...r[0] || (r[0] = [
736
+ g("path", {
591
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",
592
738
  fill: "#69758C"
593
739
  }, null, -1)
594
740
  ])]);
595
741
  }
596
- const Un = /* @__PURE__ */ O(Kn, [["render", qn]]), Yn = {}, Qn = {
742
+ const cr = /* @__PURE__ */ G(ar, [["render", ur]]), dr = {}, fr = {
597
743
  width: "16",
598
744
  height: "16",
599
745
  viewBox: "0 0 24 24",
600
746
  fill: "none",
601
747
  xmlns: "http://www.w3.org/2000/svg"
602
748
  };
603
- function Xn(o, s) {
604
- return a(), l("svg", Qn, [...s[0] || (s[0] = [
605
- d("path", {
749
+ function gr(i, r) {
750
+ return a(), d("svg", fr, [...r[0] || (r[0] = [
751
+ g("path", {
606
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",
607
753
  fill: "#1A6D9E"
608
754
  }, null, -1)
609
755
  ])]);
610
756
  }
611
- const er = /* @__PURE__ */ O(Yn, [["render", Xn]]), tr = {}, nr = {
757
+ const pr = /* @__PURE__ */ G(dr, [["render", gr]]), hr = {}, mr = {
612
758
  xmlns: "http://www.w3.org/2000/svg",
613
759
  fill: "none",
614
760
  viewBox: "0 0 24 24",
@@ -618,9 +764,9 @@ const er = /* @__PURE__ */ O(Yn, [["render", Xn]]), tr = {}, nr = {
618
764
  class: "inline-block text-green-500",
619
765
  role: "presentation"
620
766
  };
621
- function rr(o, s) {
622
- return a(), l("svg", nr, [...s[0] || (s[0] = [
623
- d("path", {
767
+ function vr(i, r) {
768
+ return a(), d("svg", mr, [...r[0] || (r[0] = [
769
+ g("path", {
624
770
  "stroke-linecap": "round",
625
771
  "stroke-linejoin": "round",
626
772
  "stroke-width": "2",
@@ -628,7 +774,7 @@ function rr(o, s) {
628
774
  }, null, -1)
629
775
  ])]);
630
776
  }
631
- const sr = /* @__PURE__ */ O(tr, [["render", rr]]), ir = {}, or = {
777
+ const _r = /* @__PURE__ */ G(hr, [["render", vr]]), yr = {}, br = {
632
778
  xmlns: "http://www.w3.org/2000/svg",
633
779
  fill: "none",
634
780
  viewBox: "0 0 24 24",
@@ -638,9 +784,9 @@ const sr = /* @__PURE__ */ O(tr, [["render", rr]]), ir = {}, or = {
638
784
  class: "inline-block text-red-500",
639
785
  role: "presentation"
640
786
  };
641
- function ar(o, s) {
642
- return a(), l("svg", or, [...s[0] || (s[0] = [
643
- d("path", {
787
+ function kr(i, r) {
788
+ return a(), d("svg", br, [...r[0] || (r[0] = [
789
+ g("path", {
644
790
  "stroke-linecap": "round",
645
791
  "stroke-linejoin": "round",
646
792
  "stroke-width": "2",
@@ -648,253 +794,298 @@ function ar(o, s) {
648
794
  }, null, -1)
649
795
  ])]);
650
796
  }
651
- const lr = /* @__PURE__ */ O(ir, [["render", ar]]), ur = { class: "shifl-grid relative" }, cr = { class: "shifl-grid__controls" }, fr = { class: "shifl-grid__table" }, dr = ["onClick"], gr = { class: "shifl-grid__header-content" }, hr = {
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: bt
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 })) : R("", !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 = {
652
837
  key: 0,
653
838
  class: "shifl-grid__header-label"
654
- }, pr = {
839
+ }, Dr = {
655
840
  key: 1,
656
- class: "shifl-grid__sort-icon"
657
- }, mr = { key: 0 }, vr = ["colspan"], _r = {
841
+ class: "shifl-grid__sort-icon shifl-grid__sort-icon--active"
842
+ }, jr = {
843
+ key: 2,
844
+ class: "shifl-grid__sort-icon shifl-grid__sort-icon--hover"
845
+ }, Br = { key: 0 }, Ir = ["colspan"], Or = { key: 1 }, Zr = ["colspan"], Gr = ["onClick"], Fr = {
658
846
  key: 0,
659
847
  class: "shifl-grid__smart-tracking-icon"
660
- }, yr = ["onClick"], br = { key: 0 }, kr = ["innerHTML"], Cr = {
848
+ }, Wr = {
849
+ key: 1,
850
+ class: "shifl-grid__action-icon-wrapper"
851
+ }, Ur = ["onClick"], Kr = { key: 0 }, Jr = ["innerHTML"], qr = {
661
852
  key: 2,
662
853
  class: "shifl-grid__composite-cell"
663
- }, wr = {
854
+ }, Yr = {
664
855
  key: 1,
665
856
  class: "shifl-grid__cell-blank"
666
- }, Mr = {
857
+ }, Xr = {
667
858
  key: 3,
668
859
  class: "shifl-grid__type-cell"
669
- }, Tr = {
860
+ }, Qr = {
670
861
  key: 1,
671
862
  class: "shifl-grid__cell-blank"
672
- }, Sr = {
863
+ }, es = {
673
864
  key: 2,
674
865
  class: "shifl-grid__container-badge"
675
- }, Pr = {
866
+ }, ts = {
676
867
  key: 0,
677
868
  class: "shifl-grid__cell-blank"
678
- }, $r = {
869
+ }, ns = {
679
870
  key: 1,
680
871
  class: "shifl-grid__tags-cell"
681
- }, Lr = { class: "shifl-grid__tags-wrapper" }, Nr = ["onMouseenter"], Ar = {
872
+ }, rs = { class: "shifl-grid__tags-wrapper" }, ss = ["onMouseenter"], is = {
682
873
  key: 5,
683
874
  class: "shifl-grid__chips-container"
684
- }, xr = {
875
+ }, os = {
685
876
  key: 6,
686
877
  class: "shifl-grid__truncated-cell"
687
- }, Hr = ["onMouseenter"], Rr = ["onMouseenter"], zr = ["href"], Er = {
878
+ }, as = ["onMouseenter"], ls = ["onMouseenter"], us = ["href"], cs = {
688
879
  key: 8,
689
880
  class: "shifl-grid__progress-cell"
690
- }, Dr = { class: "shifl-grid__progress-bar" }, Vr = { class: "shifl-grid__progress-text" }, Br = ["onMouseenter"], Ir = { class: "shifl-grid__reference-value" }, Zr = ["onClick"], jr = {
881
+ }, ds = { class: "shifl-grid__progress-bar" }, fs = { class: "shifl-grid__progress-text" }, gs = ["onMouseenter"], ps = { class: "shifl-grid__reference-value" }, hs = ["onClick"], ms = {
691
882
  key: 0,
692
883
  class: "shifl-grid__pagination"
693
- }, Gr = { class: "shifl-grid__pagination-left" }, Or = { class: "shifl-grid__pagination-range" }, Fr = { class: "shifl-grid__pagination-range-numbers" }, Wr = { class: "shifl-grid__pagination-right" }, Kr = { class: "shifl-grid__pagination-rows" }, Jr = ["value", "disabled"], qr = { class: "shifl-grid__pagination-nav" }, Ur = ["disabled"], Yr = { class: "shifl-grid__pagination-pages" }, Qr = ["disabled", "onClick"], Xr = {
884
+ }, vs = { class: "shifl-grid__pagination-left" }, _s = { class: "shifl-grid__pagination-range" }, ys = { class: "shifl-grid__pagination-range-numbers" }, bs = { class: "shifl-grid__pagination-right" }, ks = { class: "shifl-grid__pagination-rows" }, Cs = ["value", "disabled"], ws = { class: "shifl-grid__pagination-nav" }, Ms = ["disabled"], Ts = { class: "shifl-grid__pagination-pages" }, Ss = ["disabled", "onClick"], xs = {
694
885
  key: 1,
695
886
  class: "shifl-grid__pagination-ellipsis"
696
- }, es = ["disabled"], ts = ["onClick"], ns = ["innerHTML"], rs = { class: "shifl-grid__copy-tooltip-content" }, ss = /* @__PURE__ */ je({
887
+ }, $s = ["disabled"], Ps = ["onClick"], Ls = ["innerHTML"], Ns = { class: "shifl-grid__copy-tooltip-content" }, Es = /* @__PURE__ */ ce({
697
888
  __name: "ShiflGrid",
698
889
  props: {
699
890
  config: {},
700
891
  search: {},
701
892
  loading: { type: Boolean }
702
893
  },
703
- emits: ["action-click", "search-change", "pagination-change"],
704
- setup(o, { emit: s }) {
705
- var ut, ct, ft, dt, gt;
706
- const g = o, y = s, c = k(() => rn(g.config)), b = _(g.search), $ = _(c.value.filters), S = _(c.value.sort), w = _({
707
- page: ((ut = c.value.paginationMeta) == null ? void 0 : ut.currentPage) || 1,
708
- perPage: ((ct = c.value.paginationMeta) == null ? void 0 : ct.perPage) || 20
709
- }), p = _(
710
- typeof ((ft = c.value.apiConfig) == null ? void 0 : ft.additionalParams) == "function" || (gt = (dt = c.value.apiConfig) == null ? void 0 : dt.additionalParams) == null ? void 0 : gt.tabName
711
- ), f = cn(c.value, {
712
- search: b,
713
- filters: $,
714
- sort: S,
894
+ emits: ["action-click", "search-change", "pagination-change", "row-click"],
895
+ setup(i, { emit: r }) {
896
+ var ct, dt, ft, gt, pt;
897
+ 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({
898
+ page: ((ct = l.value.paginationMeta) == null ? void 0 : ct.currentPage) || 1,
899
+ perPage: ((dt = l.value.paginationMeta) == null ? void 0 : dt.perPage) || 20
900
+ }), u = b(
901
+ typeof ((ft = l.value.apiConfig) == null ? void 0 : ft.additionalParams) == "function" || (pt = (gt = l.value.apiConfig) == null ? void 0 : gt.additionalParams) == null ? void 0 : pt.tabName
902
+ ), c = kn(l.value, {
903
+ search: m,
904
+ filters: T,
905
+ sort: k,
715
906
  pagination: w,
716
- tabName: p
717
- }), m = k(() => c.value.columns.filter((e) => !e.smartTrackingColumn)), {
718
- columns: T,
719
- visibleColumns: M,
720
- toggleColumnVisibility: u,
721
- setAllVisible: h,
722
- toggleFreeze: C,
723
- moveColumn: A,
724
- resetColumns: N
725
- } = sn(m.value), { sort: x, setSort: Ce, applySort: oe } = on(c.value.sort), { applyGlobalFilter: ne } = an(), { menuState: E, openMenu: ae, closeMenu: X } = ln(), j = _(!1), le = _({}), Ge = _(null), Oe = _(null), we = _(null), Me = _(!1), Fe = _(""), Te = _(null), Se = _(!1), mt = _({});
726
- _({});
727
- const ee = _(
907
+ tabName: u
908
+ }), _ = C(() => l.value.columns.filter((e) => !e.smartTrackingColumn)), {
909
+ columns: M,
910
+ visibleColumns: x,
911
+ toggleColumnVisibility: p,
912
+ setAllVisible: v,
913
+ toggleFreeze: S,
914
+ moveColumn: E,
915
+ resetColumns: L
916
+ } = mn(_.value), { sort: N, setSort: Te, applySort: de } = vn(l.value.sort), { applyGlobalFilter: ie } = _n(), { menuState: z, openMenu: fe, closeMenu: ne } = 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), wt = b({});
917
+ b({});
918
+ const re = b(
728
919
  {}
729
- ), ue = _(!1), ce = _("Copy To Clipboard"), fe = _(null), Pe = _({ top: 0, left: 0 });
920
+ ), pe = b(!1), he = b("Copy To Clipboard"), me = b(null), Le = b({ top: 0, left: 0 });
730
921
  function q() {
731
- if (!fe.value || !ue.value) return;
732
- const e = fe.value.getBoundingClientRect(), t = 120, n = 32, i = window.innerWidth, r = window.innerHeight, v = 4;
733
- let L = e.right + v, R = e.top + e.height / 2 - n / 2;
734
- L + t > i && (L = e.left - t - v), L < 0 && (L = 10), R + n > r && (R = r - n - 10), R < 0 && (R = 10), Pe.value = { top: R, left: L };
922
+ if (!me.value || !pe.value) return;
923
+ const e = me.value.getBoundingClientRect(), t = 120, n = 32, o = window.innerWidth, s = window.innerHeight, y = 4;
924
+ let $ = e.right + y, A = e.top + e.height / 2 - n / 2;
925
+ $ + t > o && ($ = e.left - t - y), $ < 0 && ($ = 10), A + n > s && (A = s - n - 10), A < 0 && (A = 10), Le.value = { top: A, left: $ };
735
926
  }
736
927
  W(
737
- () => c.value.paginationMeta,
928
+ () => l.value.paginationMeta,
738
929
  (e) => {
739
- c.value.searchMode !== "server" && e && w.value && (w.value.page = e.currentPage || w.value.page, w.value.perPage = e.perPage || w.value.perPage);
930
+ l.value.searchMode !== "server" && e && w.value && (w.value.page = e.currentPage || w.value.page, w.value.perPage = e.perPage || w.value.perPage);
740
931
  },
741
932
  { deep: !0 }
742
933
  ), W(
743
- () => c.value.columns,
934
+ () => l.value.columns,
744
935
  (e) => {
745
936
  const t = e.filter((n) => !n.smartTrackingColumn);
746
- T.value = [...t];
937
+ M.value = [...t];
747
938
  },
748
939
  { deep: !0 }
749
940
  ), W(
750
- () => c.value.sort,
941
+ () => l.value.sort,
751
942
  (e) => {
752
- e && (x.value = e, S.value = e);
943
+ e && (N.value = e, k.value = e);
753
944
  },
754
945
  { deep: !0 }
755
946
  ), W(
756
947
  () => {
757
948
  var e;
758
- return (e = c.value.apiConfig) == null ? void 0 : e.additionalParams;
949
+ return (e = l.value.apiConfig) == null ? void 0 : e.additionalParams;
759
950
  },
760
951
  (e) => {
761
952
  if (e && typeof e != "function") {
762
953
  const t = e;
763
- t.tabName !== void 0 && p.value !== t.tabName && (vt(), p.value = t.tabName);
954
+ t.tabName !== void 0 && u.value !== t.tabName && (Mt(), u.value = t.tabName);
764
955
  }
765
956
  },
766
957
  { deep: !0 }
767
958
  );
768
- function vt() {
959
+ function Mt() {
769
960
  var t;
770
- const e = ((t = c.value.paginationMeta) == null ? void 0 : t.perPage) || 20;
771
- w.value = { page: 1, perPage: e }, b.value = void 0, S.value = c.value.sort, $.value = c.value.filters, y("search-change", ""), y("pagination-change", 1, e);
961
+ const e = ((t = l.value.paginationMeta) == null ? void 0 : t.perPage) || 20;
962
+ 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);
772
963
  }
773
964
  W(
774
- () => g.search,
965
+ () => f.search,
775
966
  (e, t) => {
776
967
  var n;
777
- if (b.value = e, c.value.searchMode === "server")
778
- y("search-change", e || "");
779
- else if (c.value.searchMode === "client" && e !== t) {
780
- const i = ((n = D.value) == null ? void 0 : n.perPage) || 20;
781
- w.value = { page: 1, perPage: i }, y("pagination-change", 1, i);
968
+ if (m.value = e, l.value.searchMode === "server")
969
+ h("search-change", e || "");
970
+ else if (l.value.searchMode === "client" && e !== t) {
971
+ const o = ((n = w.value) == null ? void 0 : n.perPage) || 20;
972
+ w.value = { page: 1, perPage: o }, h("pagination-change", 1, o);
782
973
  }
783
974
  },
784
975
  { immediate: !0 }
785
976
  ), W(
786
- () => x.value,
977
+ () => N.value,
787
978
  (e) => {
788
- S.value = e;
979
+ k.value = e;
789
980
  }
790
981
  );
791
- const $e = k(() => f.rows.value || []), Le = k(() => {
792
- if ((c.value.searchMode || "client") === "server")
793
- return $e.value;
794
- const t = g.search || "";
795
- return ne($e.value, c.value.search, t);
796
- }), Ne = k(() => {
982
+ const Ne = C(() => c.rows.value || []), Ee = C(() => {
983
+ if ((l.value.searchMode || "client") === "server")
984
+ return Ne.value;
985
+ const t = f.search || "";
986
+ return ie(Ne.value, l.value.search, t);
987
+ }), Ae = C(() => {
797
988
  var t;
798
- return (c.value.searchMode || "client") === "client" ? Le.value.length : ((t = f.paginationMeta.value) == null ? void 0 : t.total) || 0;
799
- }), Ae = k(() => (c.value.searchMode || "client") === "server" ? Le.value : oe(Le.value)), We = k(() => {
800
- if ((c.value.searchMode || "client") === "server")
801
- return Ae.value;
989
+ return (l.value.searchMode || "client") === "client" ? Ee.value.length : ((t = c.paginationMeta.value) == null ? void 0 : t.total) || 0;
990
+ }), He = C(() => (l.value.searchMode || "client") === "server" ? Ee.value : de(Ee.value)), Y = C(() => {
991
+ if ((l.value.searchMode || "client") === "server")
992
+ return He.value;
802
993
  const t = D.value;
803
994
  if (!t || !t.show)
804
- return Ae.value;
805
- const n = t.perPage || 20, r = ((t.currentPage || 1) - 1) * n, v = r + n;
806
- return Ae.value.slice(r, v);
807
- }), D = k(() => {
995
+ return He.value;
996
+ const n = t.perPage || 20, s = ((t.currentPage || 1) - 1) * n, y = s + n;
997
+ return He.value.slice(s, y);
998
+ }), D = C(() => {
808
999
  var e;
809
- return c.value.searchMode === "server" && f.paginationMeta.value ? {
1000
+ return l.value.searchMode === "server" && c.paginationMeta.value ? {
810
1001
  show: !0,
811
1002
  // Default to showing pagination
812
- ...f.paginationMeta.value,
813
- currentPage: ((e = w.value) == null ? void 0 : e.page) || f.paginationMeta.value.currentPage || 1
814
- } : c.value.paginationMeta;
815
- }), U = k(() => g.loading !== void 0 ? g.loading : f.loading.value), _t = k(() => {
1003
+ ...c.paginationMeta.value,
1004
+ currentPage: ((e = w.value) == null ? void 0 : e.page) || c.paginationMeta.value.currentPage || 1
1005
+ } : l.value.paginationMeta;
1006
+ }), X = C(() => f.loading !== void 0 ? f.loading : c.loading.value), Tt = C(() => {
816
1007
  var e;
817
1008
  return ((e = D.value) == null ? void 0 : e.perPage) === 100;
818
- }), yt = k(() => {
1009
+ }), St = C(() => {
819
1010
  var e;
820
1011
  return ((e = D.value) == null ? void 0 : e.perPage) || 10;
821
- }), Ke = k(() => {
1012
+ }), Ue = C(() => {
822
1013
  const e = D.value;
823
1014
  if (!e || e.show === !1)
824
1015
  return { from: 0, to: 0 };
825
- const t = Ne.value, n = e.perPage || 20, i = e.currentPage || 1;
826
- if ((c.value.searchMode || "client") === "server" && e.from !== void 0 && e.to !== void 0)
1016
+ const t = Ae.value, n = e.perPage || 20, o = e.currentPage || 1;
1017
+ if ((l.value.searchMode || "client") === "server" && e.from !== void 0 && e.to !== void 0)
827
1018
  return { from: e.from, to: e.to };
828
- const v = (i - 1) * n + 1, L = Math.min(i * n, t);
829
- return t === 0 ? { from: 0, to: 0 } : { from: v, to: L };
830
- }), Y = k(() => {
1019
+ const y = (o - 1) * n + 1, $ = Math.min(o * n, t);
1020
+ return t === 0 ? { from: 0, to: 0 } : { from: y, to: $ };
1021
+ }), Q = C(() => {
831
1022
  var e;
832
1023
  return ((e = D.value) == null ? void 0 : e.currentPage) || 1;
833
- }), xe = k(() => {
1024
+ }), Re = C(() => {
834
1025
  const e = D.value;
835
1026
  if (!e || e.show === !1) return 1;
836
- const t = Ne.value;
1027
+ const t = Ae.value;
837
1028
  if (t === 0) return 1;
838
- const n = e.perPage || 20, i = Math.ceil(t / n);
839
- return Math.max(1, i);
840
- }), Je = k(() => Y.value <= 1), qe = k(() => Y.value >= xe.value), bt = k(() => {
841
- const e = xe.value, t = Y.value, n = [];
1029
+ const n = e.perPage || 20, o = Math.ceil(t / n);
1030
+ return Math.max(1, o);
1031
+ }), Ke = C(() => Q.value <= 1), Je = C(() => Q.value >= Re.value), xt = C(() => {
1032
+ const e = Re.value, t = Q.value, n = [];
842
1033
  if (e <= 7)
843
- for (let i = 1; i <= e; i++)
844
- n.push(i);
1034
+ for (let o = 1; o <= e; o++)
1035
+ n.push(o);
845
1036
  else if (t <= 4) {
846
- for (let i = 1; i <= 5; i++)
847
- n.push(i);
1037
+ for (let o = 1; o <= 5; o++)
1038
+ n.push(o);
848
1039
  n.push(-1), n.push(e);
849
1040
  } else if (t >= e - 3) {
850
1041
  n.push(1), n.push(-1);
851
- for (let i = e - 4; i <= e; i++)
852
- n.push(i);
1042
+ for (let o = e - 4; o <= e; o++)
1043
+ n.push(o);
853
1044
  } else {
854
1045
  n.push(1), n.push(-1);
855
- for (let i = t - 1; i <= t + 1; i++)
856
- n.push(i);
1046
+ for (let o = t - 1; o <= t + 1; o++)
1047
+ n.push(o);
857
1048
  n.push(-1), n.push(e);
858
1049
  }
859
1050
  return n;
860
1051
  });
861
- function kt(e) {
1052
+ function $t(e) {
862
1053
  var n;
863
- if (e < 1 || e > xe.value || e === Y.value || U.value) return;
1054
+ if (e < 1 || e > Re.value || e === Q.value || X.value) return;
864
1055
  const t = ((n = D.value) == null ? void 0 : n.perPage) || 20;
865
- w.value = { page: e, perPage: t }, y("pagination-change", e, t);
1056
+ w.value = { page: e, perPage: t }, h("pagination-change", e, t);
866
1057
  }
867
- function Ct() {
1058
+ function Pt() {
868
1059
  var n;
869
- if (Je.value || U.value) return;
870
- const e = ((n = D.value) == null ? void 0 : n.perPage) || 20, t = Y.value - 1;
871
- w.value = { page: t, perPage: e }, y("pagination-change", t, e);
1060
+ if (Ke.value || X.value) return;
1061
+ const e = ((n = D.value) == null ? void 0 : n.perPage) || 20, t = Q.value - 1;
1062
+ w.value = { page: t, perPage: e }, h("pagination-change", t, e);
872
1063
  }
873
- function wt() {
1064
+ function Lt() {
874
1065
  var n;
875
- if (qe.value || U.value) return;
876
- const e = ((n = D.value) == null ? void 0 : n.perPage) || 20, t = Y.value + 1;
877
- w.value = { page: t, perPage: e }, y("pagination-change", t, e);
1066
+ if (Je.value || X.value) return;
1067
+ const e = ((n = D.value) == null ? void 0 : n.perPage) || 20, t = Q.value + 1;
1068
+ w.value = { page: t, perPage: e }, h("pagination-change", t, e);
878
1069
  }
879
- function Mt(e) {
880
- var i;
881
- if (U.value) return;
1070
+ function Nt(e) {
1071
+ var o;
1072
+ if (X.value) return;
882
1073
  const t = e.target, n = parseInt(t.value, 10);
883
- n && n !== (((i = D.value) == null ? void 0 : i.perPage) || 20) && (w.value = { page: 1, perPage: n }, y("pagination-change", 1, n));
1074
+ n && n !== (((o = D.value) == null ? void 0 : o.perPage) || 20) && (w.value = { page: 1, perPage: n }, h("pagination-change", 1, n));
884
1075
  }
885
- const Tt = k(() => {
886
- const e = c.value.columns.find((n) => n.smartTrackingColumn);
1076
+ const Et = C(() => {
1077
+ const e = l.value.columns.find((n) => n.smartTrackingColumn);
887
1078
  if (!(e != null && e.smartTrackingColumn)) return !1;
888
1079
  const t = e.smartTrackingColumn.dataKey;
889
- return $e.value.some((n) => {
890
- const i = n[t];
891
- return i === !0 || i === 1 || i === "true" || i === "1";
1080
+ return Ne.value.some((n) => {
1081
+ const o = n[t];
1082
+ return o === !0 || o === 1 || o === "true" || o === "1";
892
1083
  });
893
- }), He = k(() => c.value.columns.find((e) => e.smartTrackingColumn)), te = k(() => {
1084
+ }), Ve = C(() => l.value.columns.find((e) => e.smartTrackingColumn)), U = C(() => {
894
1085
  var n;
895
- const e = M.value.filter((i) => !i.smartTrackingColumn);
896
- if (Tt.value && He.value) {
897
- const i = {
1086
+ const e = x.value.filter((o) => !o.smartTrackingColumn);
1087
+ if (Et.value && Ve.value) {
1088
+ const o = {
898
1089
  key: "_smart_tracking",
899
1090
  label: "",
900
1091
  // No label
@@ -904,57 +1095,84 @@ const lr = /* @__PURE__ */ O(ir, [["render", ar]]), ur = { class: "shifl-grid re
904
1095
  visible: !0,
905
1096
  protected: !0,
906
1097
  sortable: !1,
907
- width: ((n = He.value.smartTrackingColumn) == null ? void 0 : n.width) || "36px",
908
- smartTrackingColumn: He.value.smartTrackingColumn,
1098
+ width: ((n = Ve.value.smartTrackingColumn) == null ? void 0 : n.width) || "36px",
1099
+ smartTrackingColumn: Ve.value.smartTrackingColumn,
909
1100
  cellType: "icon"
910
- }, r = e.findIndex((v) => v.key === "ref");
911
- r >= 0 ? e.splice(r, 0, i) : e.unshift(i);
1101
+ }, s = e.findIndex((y) => y.key === "ref");
1102
+ s >= 0 ? e.splice(s, 0, o) : e.unshift(o);
912
1103
  }
913
- const t = e.find((i) => i.key === "ref");
1104
+ const t = e.find((o) => o.key === "ref");
914
1105
  return t && (t.freeze = !0, t.protected = !0), e;
915
- }), St = k(() => {
1106
+ }), At = C(() => {
916
1107
  let e = 0;
917
1108
  const t = {};
918
- for (const n of te.value) {
1109
+ for (const n of U.value) {
919
1110
  n.freeze && (t[n.key] = e);
920
- const i = parseInt(n.width ?? "160", 10);
921
- Number.isNaN(i) || (e += i);
1111
+ const o = parseInt(n.width ?? "160", 10);
1112
+ Number.isNaN(o) || (e += o);
922
1113
  }
923
1114
  return t;
924
- }), Ue = _(0);
925
- function Pt(e) {
1115
+ }), Ht = C(() => {
1116
+ const e = l.value.exportConfig;
1117
+ return (e == null ? void 0 : e.show) === !0;
1118
+ }), Rt = C(() => {
1119
+ const e = l.value.exportConfig;
1120
+ return !(e != null && e.show) || !Y.value || Y.value.length === 0 ? !0 : !vt(e).isValid;
1121
+ });
1122
+ function Vt() {
1123
+ const e = l.value.exportConfig;
1124
+ if (!e) return;
1125
+ const t = vt(e);
1126
+ if (!t.isValid) {
1127
+ console.error("Export configuration is invalid:", t.errors);
1128
+ return;
1129
+ }
1130
+ const n = Tn(
1131
+ Y.value,
1132
+ U.value,
1133
+ N.value,
1134
+ T.value
1135
+ );
1136
+ e.source === "client" ? Mn({
1137
+ exportType: e.exportType || "csv",
1138
+ fileName: e.exportFileName || "export",
1139
+ data: n
1140
+ }) : e.source === "server" && console.log("Server-side export not yet implemented");
1141
+ }
1142
+ const qe = C(() => !!f.search && f.search.trim().length > 0), Ye = b(0);
1143
+ function zt(e) {
926
1144
  const t = e.target;
927
- Ue.value = t.scrollLeft;
1145
+ Ye.value = t.scrollLeft;
928
1146
  }
929
- function $t(e) {
930
- const t = T.value.find((n) => n.key === e);
931
- !(t != null && t.sortable) || pe(t) || Be(t) || Ce(e);
1147
+ function Dt(e) {
1148
+ const t = M.value.find((n) => n.key === e);
1149
+ !(t != null && t.sortable) || oe(t) || be(t) || Te(e);
932
1150
  }
933
- function de(e, t) {
1151
+ function ve(e, t) {
934
1152
  if (e == null || e === "" || e === void 0)
935
- return Q(t.blankStyle);
1153
+ return ee(t.blankStyle);
936
1154
  const n = t.cellType;
937
1155
  if (Array.isArray(n)) {
938
- const i = n.find((r) => typeof r == "string" && r !== "icon");
939
- return i && typeof i == "string" ? nt(e, i, t) : "";
1156
+ const o = n.find((s) => typeof s == "string" && s !== "icon");
1157
+ return o && typeof o == "string" ? rt(e, o, t) : "";
940
1158
  }
941
1159
  if (!n)
942
1160
  return typeof e == "object" ? JSON.stringify(e) : String(e);
943
1161
  switch (n) {
944
1162
  case "number":
945
- return Ye(e);
1163
+ return Xe(e);
946
1164
  case "currency":
947
1165
  return Qe(e);
948
1166
  case "date":
949
- return Xe(e);
950
- case "boolean":
951
1167
  return et(e);
1168
+ case "boolean":
1169
+ return tt(e);
952
1170
  case "text":
953
1171
  default:
954
1172
  return typeof e == "object" ? JSON.stringify(e) : String(e);
955
1173
  }
956
1174
  }
957
- function Q(e) {
1175
+ function ee(e) {
958
1176
  switch (e) {
959
1177
  case "dash":
960
1178
  return "--";
@@ -967,7 +1185,7 @@ const lr = /* @__PURE__ */ O(ir, [["render", ar]]), ur = { class: "shifl-grid re
967
1185
  return "";
968
1186
  }
969
1187
  }
970
- function Ye(e) {
1188
+ function Xe(e) {
971
1189
  if (typeof e == "number")
972
1190
  return e.toLocaleString();
973
1191
  const t = Number(e);
@@ -985,7 +1203,7 @@ const lr = /* @__PURE__ */ O(ir, [["render", ar]]), ur = { class: "shifl-grid re
985
1203
  currency: "USD"
986
1204
  }).format(t);
987
1205
  }
988
- function Xe(e) {
1206
+ function et(e) {
989
1207
  if (e instanceof Date)
990
1208
  return e.toLocaleDateString();
991
1209
  if (typeof e == "string") {
@@ -995,57 +1213,57 @@ const lr = /* @__PURE__ */ O(ir, [["render", ar]]), ur = { class: "shifl-grid re
995
1213
  }
996
1214
  return String(e);
997
1215
  }
998
- function et(e) {
1216
+ function tt(e) {
999
1217
  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);
1000
1218
  }
1001
- function Lt(e) {
1219
+ function jt(e) {
1002
1220
  if (typeof e == "number")
1003
1221
  return Math.min(100, Math.max(0, e));
1004
1222
  const t = Number(e);
1005
1223
  return Number.isNaN(t) ? 0 : Math.min(100, Math.max(0, t));
1006
1224
  }
1007
- function ge(e) {
1008
- return typeof e == "boolean" ? e ? sr : lr : typeof e == "string" && e.toLowerCase() === "ocean" ? Wn : null;
1225
+ function _e(e) {
1226
+ return typeof e == "boolean" ? e ? _r : Cr : typeof e == "string" && e.toLowerCase() === "ocean" ? bt : null;
1009
1227
  }
1010
- function Nt(e) {
1228
+ function Bt(e) {
1011
1229
  const t = e.toLowerCase();
1012
1230
  return ["supplier", "suppliers", "po", "pos", "product_description"].includes(t);
1013
1231
  }
1014
- function tt(e) {
1232
+ function nt(e) {
1015
1233
  if (e.cellType === "badge") return !0;
1016
1234
  const t = e.key.toLowerCase();
1017
1235
  return t === "tag" || t === "tags";
1018
1236
  }
1019
- function At(e) {
1237
+ function It(e) {
1020
1238
  return e.cellType === "status" ? !0 : e.key.toLowerCase() === "status";
1021
1239
  }
1022
- function xt(e) {
1240
+ function Ot(e) {
1023
1241
  return e.cellType === "icon" ? !0 : e.key.toLowerCase() === "type";
1024
1242
  }
1025
- function Ht(e) {
1243
+ function Zt(e) {
1026
1244
  return Array.isArray(e.cellType) && e.cellType.length > 0;
1027
1245
  }
1028
- function Rt(e) {
1246
+ function Gt(e) {
1029
1247
  return Array.isArray(e.cellType) ? e.cellType.filter((t) => typeof t == "string") : e.cellType && typeof e.cellType == "string" ? [e.cellType] : [];
1030
1248
  }
1031
- function nt(e, t, n) {
1249
+ function rt(e, t, n) {
1032
1250
  if (e == null || e === "" || e === void 0)
1033
- return Q(n.blankStyle);
1251
+ return ee(n.blankStyle);
1034
1252
  switch (t) {
1035
1253
  case "number":
1036
- return Ye(e);
1254
+ return Xe(e);
1037
1255
  case "currency":
1038
1256
  return Qe(e);
1039
1257
  case "date":
1040
- return Xe(e);
1041
- case "boolean":
1042
1258
  return et(e);
1259
+ case "boolean":
1260
+ return tt(e);
1043
1261
  case "text":
1044
1262
  default:
1045
1263
  return typeof e == "object" ? JSON.stringify(e) : String(e);
1046
1264
  }
1047
1265
  }
1048
- function zt(e) {
1266
+ function Ft(e) {
1049
1267
  return {
1050
1268
  number: "shifl-grid__composite-number",
1051
1269
  currency: "shifl-grid__composite-currency",
@@ -1054,85 +1272,85 @@ const lr = /* @__PURE__ */ O(ir, [["render", ar]]), ur = { class: "shifl-grid re
1054
1272
  text: "shifl-grid__composite-text"
1055
1273
  }[e] || "shifl-grid__composite-text";
1056
1274
  }
1057
- function Et(e, t) {
1275
+ function Wt(e, t) {
1058
1276
  if (e == null || e === "")
1059
- return Q(t.blankStyle);
1277
+ return ee(t.blankStyle);
1060
1278
  if (Array.isArray(e)) {
1061
1279
  if (e.length === 0)
1062
- return Q(t.blankStyle);
1280
+ return ee(t.blankStyle);
1063
1281
  const n = e.join(", ");
1064
- return rt(n, 45);
1282
+ return st(n, 45);
1065
1283
  }
1066
- return typeof e == "string" ? rt(e, 45) : String(e);
1284
+ return typeof e == "string" ? st(e, 45) : String(e);
1067
1285
  }
1068
- function rt(e, t) {
1286
+ function st(e, t) {
1069
1287
  return e.length <= t ? e : e.substring(0, t) + "...";
1070
1288
  }
1071
- function Re(e) {
1289
+ function ze(e) {
1072
1290
  const t = e.toLowerCase();
1073
1291
  return ["po", "pos", "supplier", "suppliers", "tag", "tags"].includes(t);
1074
1292
  }
1075
- function Dt(e, t) {
1076
- return e == null || Re(t) ? !1 : Array.isArray(e) ? e.length === 0 ? !1 : e.join(", ").length > 30 : typeof e == "string" ? e.length > 30 : !1;
1293
+ function Ut(e, t) {
1294
+ return e == null || ze(t) ? !1 : Array.isArray(e) ? e.length === 0 ? !1 : e.join(", ").length > 30 : typeof e == "string" ? e.length > 30 : !1;
1077
1295
  }
1078
- function Vt(e) {
1296
+ function Kt(e) {
1079
1297
  return e == null ? !1 : Array.isArray(e) ? e.length === 0 ? !1 : e.join(", ").length > 45 : typeof e == "string" ? e.length > 45 : !1;
1080
1298
  }
1081
- function Bt(e) {
1299
+ function Jt(e) {
1082
1300
  if (e == null) return 0;
1083
1301
  if (Array.isArray(e)) {
1084
1302
  if (e.length === 0 || e.join(", ").length <= 45) return 0;
1085
- let n = 0, i = 0;
1086
- for (let r = 0; r < e.length; r++) {
1087
- const v = String(e[r]), R = (r > 0 ? ", " : "").length + v.length;
1088
- if (n + R <= 45)
1089
- n += R, i++;
1303
+ let n = 0, o = 0;
1304
+ for (let s = 0; s < e.length; s++) {
1305
+ const y = String(e[s]), A = (s > 0 ? ", " : "").length + y.length;
1306
+ if (n + A <= 45)
1307
+ n += A, o++;
1090
1308
  else
1091
1309
  break;
1092
1310
  }
1093
- return e.length - i;
1311
+ return e.length - o;
1094
1312
  }
1095
1313
  return typeof e == "string" && e.length > 45 ? 1 : 0;
1096
1314
  }
1097
- function ze(e, t, n, i) {
1098
- let r = "", v = !1;
1099
- const L = te.value.find((R) => R.key === e);
1100
- if (L && tt(L)) {
1101
- const R = st(n);
1102
- R.length > 0 && (v = !0, r = R.map((K) => `<span class="shifl-grid__tooltip-badge" style="border-left-color: ${at(K)} !important">${K.name}</span>`).join(""));
1103
- } else Array.isArray(n) ? n.length > 0 && (r = n.join(`
1104
- `)) : n != null && (r = String(n));
1105
- Fe.value = r, Se.value = v, Te.value = i, Me.value = !0;
1315
+ function De(e, t, n, o) {
1316
+ let s = "", y = !1;
1317
+ const $ = U.value.find((A) => A.key === e);
1318
+ if ($ && nt($)) {
1319
+ const A = it(n);
1320
+ A.length > 0 && (y = !0, s = A.map((K) => `<span class="shifl-grid__tooltip-badge" style="border-left-color: ${lt(K)} !important">${K.name}</span>`).join(""));
1321
+ } else Array.isArray(n) ? n.length > 0 && (s = n.join(`
1322
+ `)) : n != null && (s = String(n));
1323
+ We.value = s, Pe.value = y, $e.value = o, xe.value = !0;
1106
1324
  }
1107
- function Ee() {
1108
- Me.value = !1, Te.value = null, Se.value = !1;
1325
+ function je() {
1326
+ xe.value = !1, $e.value = null, Pe.value = !1;
1109
1327
  }
1110
- function It(e, t) {
1111
- ce.value = "Copy To Clipboard", fe.value = t, ue.value = !0, q();
1328
+ function qt(e, t) {
1329
+ he.value = "Copy To Clipboard", me.value = t, pe.value = !0, q();
1112
1330
  }
1113
- function De() {
1114
- ue.value = !1, fe.value = null;
1331
+ function Be() {
1332
+ pe.value = !1, me.value = null;
1115
1333
  }
1116
- async function Zt(e) {
1334
+ async function Yt(e) {
1117
1335
  try {
1118
- await navigator.clipboard.writeText(e), ce.value = "Copied!", setTimeout(() => {
1119
- De();
1336
+ await navigator.clipboard.writeText(e), he.value = "Copied!", setTimeout(() => {
1337
+ Be();
1120
1338
  }, 2e3);
1121
1339
  } catch (t) {
1122
1340
  console.error("Failed to copy text: ", t);
1123
1341
  const n = document.createElement("textarea");
1124
- n.value = e, document.body.appendChild(n), n.select(), document.execCommand("copy"), document.body.removeChild(n), ce.value = "Copied!", setTimeout(() => {
1125
- De();
1342
+ n.value = e, document.body.appendChild(n), n.select(), document.execCommand("copy"), document.body.removeChild(n), he.value = "Copied!", setTimeout(() => {
1343
+ Be();
1126
1344
  }, 2e3);
1127
1345
  }
1128
1346
  }
1129
- function jt(e, t, n) {
1130
- n && (mt.value[`${e}-${t}`] = n);
1347
+ function Xt(e, t, n) {
1348
+ n && (wt.value[`${e}-${t}`] = n);
1131
1349
  }
1132
- function he(e) {
1350
+ function ye(e) {
1133
1351
  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)];
1134
1352
  }
1135
- function st(e) {
1353
+ function it(e) {
1136
1354
  return e == null ? [] : Array.isArray(e) ? e.map((t) => typeof t == "object" && t !== null && "name" in t ? {
1137
1355
  name: String(t.name),
1138
1356
  color: "color" in t ? String(t.color) : void 0
@@ -1141,49 +1359,49 @@ const lr = /* @__PURE__ */ O(ir, [["render", ar]]), ur = { class: "shifl-grid re
1141
1359
  color: void 0
1142
1360
  }).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 }];
1143
1361
  }
1144
- function it(e, t, n) {
1145
- const i = he(e);
1146
- if (i.length === 0) return [];
1147
- const r = `${t}-${n}`;
1148
- if (ee.value[r])
1149
- return ee.value[r];
1150
- const v = 130, L = 8, R = 4;
1362
+ function ot(e, t, n) {
1363
+ const o = ye(e);
1364
+ if (o.length === 0) return [];
1365
+ const s = `${t}-${n}`;
1366
+ if (re.value[s])
1367
+ return re.value[s];
1368
+ const y = 130, $ = 8, A = 4;
1151
1369
  let K = 0;
1152
- const G = [];
1153
- for (const re of i) {
1154
- const se = re.length * 8 + L + R;
1155
- if (K + se > v && G.length > 0)
1370
+ const Z = [];
1371
+ for (const ae of o) {
1372
+ const le = ae.length * 8 + $ + A;
1373
+ if (K + le > y && Z.length > 0)
1156
1374
  break;
1157
- G.push(re), K += se;
1375
+ Z.push(ae), K += le;
1158
1376
  }
1159
- return ee.value[r] = G, G;
1160
- }
1161
- function ot(e, t, n) {
1162
- const i = st(e);
1163
- if (i.length === 0) return [];
1164
- const r = `${t}-${n}-objects`;
1165
- if (ee.value[r])
1166
- return ee.value[r];
1167
- const v = 130, L = 8, R = 4;
1377
+ return re.value[s] = Z, Z;
1378
+ }
1379
+ function at(e, t, n) {
1380
+ const o = it(e);
1381
+ if (o.length === 0) return [];
1382
+ const s = `${t}-${n}-objects`;
1383
+ if (re.value[s])
1384
+ return re.value[s];
1385
+ const y = 130, $ = 8, A = 4;
1168
1386
  let K = 0;
1169
- const G = [];
1170
- for (const re of i) {
1171
- const se = re.name.length * 8 + L + R;
1172
- if (K + se > v && G.length > 0)
1387
+ const Z = [];
1388
+ for (const ae of o) {
1389
+ const le = ae.name.length * 8 + $ + A;
1390
+ if (K + le > y && Z.length > 0)
1173
1391
  break;
1174
- G.push(re), K += se;
1392
+ Z.push(ae), K += le;
1175
1393
  }
1176
- return ee.value[r] = G, G;
1394
+ return re.value[s] = Z, Z;
1177
1395
  }
1178
- function Gt(e, t, n) {
1179
- const i = he(e), r = it(e, t, n);
1180
- return i.length > r.length;
1396
+ function Qt(e, t, n) {
1397
+ const o = ye(e), s = ot(e, t, n);
1398
+ return o.length > s.length;
1181
1399
  }
1182
- function Ot(e, t, n) {
1183
- const i = he(e), r = it(e, t, n);
1184
- return i.length - r.length;
1400
+ function en(e, t, n) {
1401
+ const o = ye(e), s = ot(e, t, n);
1402
+ return o.length - s.length;
1185
1403
  }
1186
- function Ft(e) {
1404
+ function tn(e) {
1187
1405
  const t = e.toLowerCase(), n = {
1188
1406
  "high priority": "var(--shifl-color-error-r70)",
1189
1407
  express: "var(--shifl-color-primary-b80)",
@@ -1198,18 +1416,18 @@ const lr = /* @__PURE__ */ O(ir, [["render", ar]]), ur = { class: "shifl-grid re
1198
1416
  };
1199
1417
  if (n[t])
1200
1418
  return n[t];
1201
- for (const [i, r] of Object.entries(n))
1202
- if (t.includes(i) || i.includes(t))
1203
- return r;
1204
- return Wt(e);
1419
+ for (const [o, s] of Object.entries(n))
1420
+ if (t.includes(o) || o.includes(t))
1421
+ return s;
1422
+ return nn(e);
1205
1423
  }
1206
- function at(e) {
1207
- return e.color && e.color !== "" ? e.color : Ft(e.name);
1424
+ function lt(e) {
1425
+ return e.color && e.color !== "" ? e.color : tn(e.name);
1208
1426
  }
1209
- function Wt(e) {
1427
+ function nn(e) {
1210
1428
  let t = 0;
1211
- for (let i = 0; i < e.length; i++)
1212
- t = e.charCodeAt(i) + ((t << 5) - t);
1429
+ for (let o = 0; o < e.length; o++)
1430
+ t = e.charCodeAt(o) + ((t << 5) - t);
1213
1431
  const n = [
1214
1432
  "var(--shifl-color-primary-b80)",
1215
1433
  "var(--shifl-color-success-g70)",
@@ -1222,421 +1440,456 @@ const lr = /* @__PURE__ */ O(ir, [["render", ar]]), ur = { class: "shifl-grid re
1222
1440
  ];
1223
1441
  return n[Math.abs(t) % n.length];
1224
1442
  }
1225
- function Ve(e, t = !0) {
1226
- const i = { ...{
1443
+ function Ie(e, t = !0) {
1444
+ const o = { ...{
1227
1445
  width: e.width ?? "160px",
1228
1446
  minWidth: e.width ?? "160px"
1229
- } }, r = Ue.value > 0;
1447
+ } }, s = Ye.value > 0, y = M.value.filter((A) => A.freeze), $ = y[y.length - 1];
1230
1448
  if (e.freeze) {
1231
- const v = St.value[e.key] ?? 0;
1232
- i.position = "sticky", i.left = `${v}px`, i.background = "#ffffff", i.boxShadow = r ? "2px 0 6px rgba(0, 0, 0, 0.12)" : "none", i.zIndex = t ? 40 : 10;
1449
+ const A = At.value[e.key] ?? 0;
1450
+ 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";
1233
1451
  }
1234
- return t && (i.position = "sticky", i.top = "0px"), i;
1452
+ return t && (o.position = "sticky", o.top = "0px"), o;
1235
1453
  }
1236
- const Kt = k(() => T.value.filter((e) => !e.smartTrackingColumn));
1237
- function pe(e) {
1454
+ const rn = C(() => M.value.filter((e) => !e.smartTrackingColumn));
1455
+ function oe(e) {
1238
1456
  return !!e.actionColumn;
1239
1457
  }
1240
- function Be(e) {
1458
+ function be(e) {
1241
1459
  return !!e.smartTrackingColumn;
1242
1460
  }
1243
- function Jt(e) {
1461
+ function sn(e) {
1244
1462
  return e.key === "ref";
1245
1463
  }
1246
- function qt(e, t) {
1464
+ function on(e, t) {
1247
1465
  if (!e.smartTrackingColumn) return !1;
1248
- const n = e.smartTrackingColumn.dataKey, i = t[n];
1249
- if (i === !0 || i === 1) return !0;
1250
- if (typeof i == "string") {
1251
- const r = i.toLowerCase().trim();
1252
- return r === "true" || r === "1" || r === "yes";
1466
+ const n = e.smartTrackingColumn.dataKey, o = t[n];
1467
+ if (o === !0 || o === 1) return !0;
1468
+ if (typeof o == "string") {
1469
+ const s = o.toLowerCase().trim();
1470
+ return s === "true" || s === "1" || s === "yes";
1253
1471
  }
1254
1472
  return !1;
1255
1473
  }
1256
- function me(e, t) {
1474
+ function ke(e, t) {
1257
1475
  if (!e.actionColumn) return null;
1258
1476
  const n = e.actionColumn.icon;
1259
1477
  return n ? typeof n == "function" ? n(t) : n : null;
1260
1478
  }
1261
- function Ut(e, t, n, i) {
1479
+ function an(e, t, n, o) {
1262
1480
  if (!n.actionColumn) return;
1263
- const r = i.currentTarget;
1264
- if (E.value.rowIndex === e) {
1265
- X();
1481
+ const s = o.currentTarget;
1482
+ if (z.value.rowIndex === e) {
1483
+ ne();
1266
1484
  return;
1267
1485
  }
1268
- Oe.value = n, we.value = t, ae(e, r);
1269
- }
1270
- function Yt(e, t) {
1271
- return !(e != null && e.actionColumn) || !t ? [] : (typeof e.actionColumn.actions == "function" ? e.actionColumn.actions(t) : e.actionColumn.actions).filter((i) => i.show ? i.show(t) : !0);
1486
+ Fe.value = n, Se.value = t, fe(e, s);
1272
1487
  }
1273
- function Qt(e, t, n) {
1274
- y("action-click", e.key, t, n), X();
1488
+ function ln(e, t) {
1489
+ 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);
1275
1490
  }
1276
- function Xt(e, t) {
1277
- t && (le.value[e] = t);
1491
+ function un(e, t, n) {
1492
+ h("action-click", e.key, t, n), ne();
1278
1493
  }
1279
- function lt(e) {
1280
- if (E.value.rowIndex === null) return;
1281
- const t = e.target, n = Ge.value, i = Object.values(le.value), r = n == null ? void 0 : n.contains(t), v = i.some((L) => L.contains(t));
1282
- !r && !v && X();
1283
- }
1284
- return be(() => {
1285
- document.addEventListener("click", lt), document.addEventListener("scroll", q), window.addEventListener("scroll", q), window.addEventListener("resize", q);
1286
- }), ke(() => {
1287
- document.removeEventListener("click", lt), document.removeEventListener("scroll", q), window.removeEventListener("scroll", q), window.removeEventListener("resize", q);
1288
- }), (e, t) => (a(), l("div", ur, [
1289
- d("div", cr, [
1290
- d("button", {
1494
+ const cn = (e, t) => {
1495
+ ["BUTTON", "A", "INPUT", "SELECT", "TEXTAREA", "SVG", "PATH"].includes(t.target.tagName) || h("row-click", e);
1496
+ };
1497
+ function dn(e, t) {
1498
+ t && (ge.value[e] = t);
1499
+ }
1500
+ function ut(e) {
1501
+ if (z.value.rowIndex === null) return;
1502
+ 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));
1503
+ !s && !y && ne();
1504
+ }
1505
+ return we(() => {
1506
+ document.addEventListener("click", ut), document.addEventListener("scroll", q), window.addEventListener("scroll", q), window.addEventListener("resize", q);
1507
+ }), Me(() => {
1508
+ document.removeEventListener("click", ut), document.removeEventListener("scroll", q), window.removeEventListener("scroll", q), window.removeEventListener("resize", q);
1509
+ }), (e, t) => (a(), d("div", Nr, [
1510
+ g("div", Er, [
1511
+ g("button", {
1291
1512
  type: "button",
1292
1513
  class: "shifl-grid__pill-button whitespace-nowrap",
1293
- onClick: t[0] || (t[0] = (n) => j.value = !0)
1294
- }, " Edit Column ")
1514
+ onClick: t[0] || (t[0] = (n) => O.value = !0)
1515
+ }, " Edit Column "),
1516
+ Ht.value ? (a(), d("button", {
1517
+ key: 0,
1518
+ type: "button",
1519
+ class: "shifl-grid__pill-button whitespace-nowrap flex items-center gap-2",
1520
+ disabled: Rt.value,
1521
+ onClick: Vt,
1522
+ title: "Export Data"
1523
+ }, [
1524
+ te(Tr),
1525
+ t[6] || (t[6] = se(" Export ", -1))
1526
+ ], 8, Ar)) : R("", !0)
1295
1527
  ]),
1296
- d("div", {
1297
- class: Z(["shifl-grid__viewport", { "shifl-grid__viewport--scroll": _t.value }]),
1298
- onScroll: Pt
1528
+ g("div", {
1529
+ class: I(["shifl-grid__viewport", {
1530
+ "shifl-grid__viewport--scroll": Tt.value,
1531
+ "shifl-grid__viewport--empty": !Y.value.length && qe.value && l.value.emptyState
1532
+ }]),
1533
+ onScroll: zt
1299
1534
  }, [
1300
- d("table", fr, [
1301
- d("thead", null, [
1302
- d("tr", null, [
1303
- (a(!0), l(H, null, B(te.value, (n) => {
1304
- var i;
1305
- return a(), l("th", {
1535
+ g("table", Hr, [
1536
+ g("thead", null, [
1537
+ g("tr", null, [
1538
+ (a(!0), d(H, null, j(U.value, (n) => {
1539
+ var o;
1540
+ return a(), d("th", {
1306
1541
  key: n.key,
1307
- style: F(Ve(n, !0)),
1308
- onClick: () => $t(n.key),
1309
- class: Z([
1542
+ style: F(Ie(n, !0)),
1543
+ onClick: () => Dt(n.key),
1544
+ class: I([
1310
1545
  "shifl-grid__header-cell",
1311
1546
  `shifl-grid__header-align-${n != null && n.align ? n.align : "left"}`,
1312
1547
  {
1313
1548
  "shifl-grid__cell--sticky": n.freeze,
1314
1549
  "shifl-grid__sortable-col": n.sortable,
1315
- "shifl-grid__icon": n.cellType === "icon"
1550
+ "shifl-grid__icon": n.cellType === "icon",
1551
+ "shifl-grid__hover-sortable": n.sortable && !oe(n) && !be(n)
1316
1552
  }
1317
1553
  ])
1318
1554
  }, [
1319
- d("div", gr, [
1320
- n.label ? (a(), l("span", hr, P(n.label), 1)) : z("", !0),
1321
- ((i = V(x)) == null ? void 0 : i.key) === n.key && !pe(n) && !Be(n) ? (a(), l("span", pr, [
1322
- V(x).order === "asc" ? (a(), I(Vn, { key: 0 })) : (a(), I(jn, { key: 1 }))
1323
- ])) : z("", !0)
1555
+ g("div", Vr, [
1556
+ n.label ? (a(), d("span", zr, P(n.label), 1)) : R("", !0),
1557
+ ((o = V(N)) == null ? void 0 : o.key) === n.key && V(N).order ? (a(), d("span", Dr, [
1558
+ V(N).order === "asc" ? (a(), B(_t, { key: 0 })) : (a(), B(rr, { key: 1 }))
1559
+ ])) : n.sortable && !oe(n) && !be(n) ? (a(), d("span", jr, [
1560
+ te(_t, { color: "#69758C" })
1561
+ ])) : R("", !0)
1324
1562
  ])
1325
- ], 14, dr);
1563
+ ], 14, Rr);
1326
1564
  }), 128))
1327
1565
  ])
1328
1566
  ]),
1329
- d("tbody", null, [
1330
- U.value ? (a(!0), l(H, { key: 0 }, B(yt.value, (n) => (a(), l("tr", {
1567
+ g("tbody", null, [
1568
+ X.value ? (a(!0), d(H, { key: 0 }, j(St.value, (n) => (a(), d("tr", {
1331
1569
  key: `skeleton-${n}`,
1332
1570
  class: "shifl-grid__skeleton-row"
1333
1571
  }, [
1334
- (a(!0), l(H, null, B(te.value, (i) => (a(), l("td", {
1335
- key: i.key,
1336
- style: F(Ve(i, !1)),
1337
- class: Z({ "shifl-grid__cell--sticky": i.freeze })
1338
- }, [...t[6] || (t[6] = [
1339
- d("div", { class: "shifl-grid__skeleton-cell" }, null, -1)
1572
+ (a(!0), d(H, null, j(U.value, (o) => (a(), d("td", {
1573
+ key: o.key,
1574
+ style: F(Ie(o, !1)),
1575
+ class: I({ "shifl-grid__cell--sticky": o.freeze })
1576
+ }, [...t[7] || (t[7] = [
1577
+ g("div", { class: "shifl-grid__skeleton-cell" }, null, -1)
1340
1578
  ])], 6))), 128))
1341
- ]))), 128)) : (a(), l(H, { key: 1 }, [
1342
- We.value.length ? z("", !0) : (a(), l("tr", mr, [
1343
- d("td", {
1344
- colspan: te.value.length,
1579
+ ]))), 128)) : (a(), d(H, { key: 1 }, [
1580
+ !Y.value.length && qe.value && l.value.emptyState ? (a(), d("tr", Br, [
1581
+ g("td", {
1582
+ colspan: U.value.length,
1583
+ style: { height: "200px !important", "border-right": "none !important" }
1584
+ }, [
1585
+ te(Lr, {
1586
+ "icon-name": l.value.emptyState.iconName,
1587
+ title: l.value.emptyState.title,
1588
+ description: l.value.emptyState.description
1589
+ }, null, 8, ["icon-name", "title", "description"])
1590
+ ], 8, Ir)
1591
+ ])) : Y.value.length ? R("", !0) : (a(), d("tr", Or, [
1592
+ g("td", {
1593
+ colspan: U.value.length,
1345
1594
  class: "text-center text-gray-500 py-6"
1346
- }, " No data ", 8, vr)
1595
+ }, " No data ", 8, Zr)
1347
1596
  ])),
1348
- (a(!0), l(H, null, B(We.value, (n, i) => (a(), l("tr", { key: i }, [
1349
- (a(!0), l(H, null, B(te.value, (r) => (a(), l("td", {
1350
- key: r.key,
1351
- style: F(Ve(r, !1)),
1352
- class: Z([
1353
- { "shifl-grid__cell--sticky": r.freeze },
1354
- { "shifl-grid__cell--action": pe(r) },
1355
- `shifl-grid__cell-align-${r != null && r.align ? r.align : "left"}`,
1356
- { "shifl-grid__icon": r.cellType === "icon" }
1597
+ (a(!0), d(H, null, j(Y.value, (n, o) => (a(), d("tr", {
1598
+ key: o,
1599
+ onClick: (s) => cn(n, s)
1600
+ }, [
1601
+ (a(!0), d(H, null, j(U.value, (s) => (a(), d("td", {
1602
+ key: s.key,
1603
+ style: F(Ie(s, !1)),
1604
+ class: I([
1605
+ { "shifl-grid__cell--sticky": s.freeze },
1606
+ { "shifl-grid__cell--action": oe(s) },
1607
+ `shifl-grid__cell-align-${s != null && s.align ? s.align : "left"}`,
1608
+ { "shifl-grid__icon": s.cellType === "icon" }
1357
1609
  ])
1358
1610
  }, [
1359
- Be(r) ? (a(), l(H, { key: 0 }, [
1360
- qt(r, n) ? (a(), l("div", _r, [
1361
- ve(Rn)
1362
- ])) : z("", !0)
1363
- ], 64)) : pe(r) ? (a(), l("button", {
1364
- key: 1,
1365
- type: "button",
1366
- class: "shifl-grid__action-icon",
1367
- ref_for: !0,
1368
- ref: (v) => Xt(i, v),
1369
- onClick: J((v) => Ut(i, n, r, v), ["stop"])
1370
- }, [
1371
- me(r, n) ? typeof me(r, n) == "string" ? (a(), l("span", {
1372
- key: 1,
1373
- innerHTML: me(r, n),
1374
- class: "w-4 h-4 inline-block"
1375
- }, null, 8, kr)) : (a(), I(_e(me(r, n)), {
1376
- key: 2,
1377
- class: "w-4 h-4"
1378
- })) : (a(), l("span", br, "⋯"))
1379
- ], 8, yr)) : Ht(r) ? (a(), l("div", Cr, [
1380
- (a(!0), l(H, null, B(Rt(r), (v, L) => (a(), l(H, { key: L }, [
1381
- v === "icon" && ge(n[r.key]) ? (a(), I(_e(ge(n[r.key])), {
1611
+ be(s) ? (a(), d(H, { key: 0 }, [
1612
+ on(s, n) ? (a(), d("div", Fr, [
1613
+ te(Jn)
1614
+ ])) : R("", !0)
1615
+ ], 64)) : oe(s) ? (a(), d("div", Wr, [
1616
+ g("button", {
1617
+ type: "button",
1618
+ class: "shifl-grid__action-icon",
1619
+ ref_for: !0,
1620
+ ref: (y) => dn(o, y),
1621
+ onClick: J((y) => an(o, n, s, y), ["stop"])
1622
+ }, [
1623
+ ke(s, n) ? typeof ke(s, n) == "string" ? (a(), d("span", {
1624
+ key: 1,
1625
+ innerHTML: ke(s, n),
1626
+ class: "w-4 h-4 inline-block"
1627
+ }, null, 8, Jr)) : (a(), B(ue(ke(s, n)), {
1628
+ key: 2,
1629
+ class: "w-4 h-4"
1630
+ })) : (a(), d("span", Kr, "⋯"))
1631
+ ], 8, Ur)
1632
+ ])) : Zt(s) ? (a(), d("div", qr, [
1633
+ (a(!0), d(H, null, j(Gt(s), (y, $) => (a(), d(H, { key: $ }, [
1634
+ y === "icon" && _e(n[s.key]) ? (a(), B(ue(_e(n[s.key])), {
1382
1635
  key: 0,
1383
1636
  class: "shifl-grid__type-icon"
1384
- })) : v === "icon" ? (a(), l("span", wr, P(Q(r.blankStyle)), 1)) : (a(), l("span", {
1637
+ })) : y === "icon" ? (a(), d("span", Yr, P(ee(s.blankStyle)), 1)) : (a(), d("span", {
1385
1638
  key: 2,
1386
- class: Z(zt(v))
1387
- }, P(nt(n[r.key], v, r)), 3))
1639
+ class: I(Ft(y))
1640
+ }, P(rt(n[s.key], y, s)), 3))
1388
1641
  ], 64))), 128))
1389
- ])) : xt(r) ? (a(), l("div", Mr, [
1390
- ge(n[r.key]) ? (a(), I(_e(ge(n[r.key])), {
1642
+ ])) : Ot(s) ? (a(), d("div", Xr, [
1643
+ _e(n[s.key]) ? (a(), B(ue(_e(n[s.key])), {
1391
1644
  key: 0,
1392
1645
  class: "shifl-grid__type-icon"
1393
- })) : (a(), l("span", Tr, P(Q(r.blankStyle)), 1)),
1394
- n.container_count != null ? (a(), l("span", Sr, " (" + P(n.container_count) + ") ", 1)) : z("", !0)
1395
- ])) : tt(r) ? (a(), l(H, { key: 4 }, [
1396
- n[r.key] == null || ot(n[r.key], r.key, i).length === 0 ? (a(), l("div", Pr, P(Q(r.blankStyle)), 1)) : (a(), l("div", $r, [
1397
- d("div", Lr, [
1398
- d("div", {
1646
+ })) : (a(), d("span", Qr, P(ee(s.blankStyle)), 1)),
1647
+ n.container_count != null ? (a(), d("span", es, " (" + P(n.container_count) + ") ", 1)) : R("", !0)
1648
+ ])) : nt(s) ? (a(), d(H, { key: 4 }, [
1649
+ n[s.key] == null || at(n[s.key], s.key, o).length === 0 ? (a(), d("div", ts, P(ee(s.blankStyle)), 1)) : (a(), d("div", ns, [
1650
+ g("div", rs, [
1651
+ g("div", {
1399
1652
  ref_for: !0,
1400
1653
  ref: "(el) => setTagsRef(col.key, rowIndex, el as HTMLElement)",
1401
1654
  class: "shifl-grid__chips-container shifl-grid__chips-container--single-line"
1402
1655
  }, [
1403
- (a(!0), l(H, null, B(ot(
1404
- n[r.key],
1405
- r.key,
1406
- i
1407
- ), (v, L) => (a(), l("span", {
1408
- key: L,
1656
+ (a(!0), d(H, null, j(at(
1657
+ n[s.key],
1658
+ s.key,
1659
+ o
1660
+ ), (y, $) => (a(), d("span", {
1661
+ key: $,
1409
1662
  class: "shifl-grid__chip shifl-grid__chip--tag",
1410
- style: F({ borderLeftColor: at(v) })
1411
- }, P(v.name), 5))), 128))
1663
+ style: F({ borderLeftColor: lt(y) })
1664
+ }, P(y.name), 5))), 128))
1412
1665
  ], 512)
1413
1666
  ]),
1414
- Gt(n[r.key], r.key, i) ? (a(), l("button", {
1667
+ Qt(n[s.key], s.key, o) ? (a(), d("button", {
1415
1668
  key: 0,
1416
1669
  type: "button",
1417
1670
  class: "shifl-grid__counter-button",
1418
- onMouseenter: (v) => ze(
1419
- r.key,
1420
- i,
1421
- n[r.key],
1422
- v.currentTarget
1671
+ onMouseenter: (y) => De(
1672
+ s.key,
1673
+ o,
1674
+ n[s.key],
1675
+ y.currentTarget
1423
1676
  ),
1424
- onMouseleave: Ee
1425
- }, " +" + P(Ot(n[r.key], r.key, i)), 41, Nr)) : z("", !0)
1677
+ onMouseleave: je
1678
+ }, " +" + P(en(n[s.key], s.key, o)), 41, ss)) : R("", !0)
1426
1679
  ]))
1427
- ], 64)) : At(r) ? (a(), l("div", Ar, [
1428
- (a(!0), l(H, null, B(he(n[r.key]), (v, L) => (a(), l("span", {
1429
- key: L,
1680
+ ], 64)) : It(s) ? (a(), d("div", is, [
1681
+ (a(!0), d(H, null, j(ye(n[s.key]), (y, $) => (a(), d("span", {
1682
+ key: $,
1430
1683
  class: "shifl-grid__chip shifl-grid__chip--status"
1431
- }, P(v), 1))), 128))
1432
- ])) : r.truncate !== !1 && (r.truncate === !0 || Nt(r.key)) ? (a(), l("div", xr, [
1433
- d("span", {
1684
+ }, P(y), 1))), 128))
1685
+ ])) : s.truncate !== !1 && (s.truncate === !0 || Bt(s.key)) ? (a(), d("div", os, [
1686
+ g("span", {
1434
1687
  class: "shifl-grid__truncated-text",
1435
1688
  ref_for: !0,
1436
- ref: (v) => jt(r.key, i, v)
1437
- }, P(Et(n[r.key], r)), 513),
1438
- Re(r.key) && Vt(n[r.key]) ? (a(), l("button", {
1689
+ ref: (y) => Xt(s.key, o, y)
1690
+ }, P(Wt(n[s.key], s)), 513),
1691
+ ze(s.key) && Kt(n[s.key]) ? (a(), d("button", {
1439
1692
  key: 0,
1440
1693
  type: "button",
1441
1694
  class: "shifl-grid__counter-button",
1442
- onMouseenter: (v) => ze(
1443
- r.key,
1444
- i,
1445
- n[r.key],
1446
- v.currentTarget
1695
+ onMouseenter: (y) => De(
1696
+ s.key,
1697
+ o,
1698
+ n[s.key],
1699
+ y.currentTarget
1447
1700
  ),
1448
- onMouseleave: Ee
1449
- }, " +" + P(Bt(n[r.key])), 41, Hr)) : !Re(r.key) && Dt(n[r.key], r.key) ? (a(), l("button", {
1701
+ onMouseleave: je
1702
+ }, " +" + P(Jt(n[s.key])), 41, as)) : !ze(s.key) && Ut(n[s.key], s.key) ? (a(), d("button", {
1450
1703
  key: 1,
1451
1704
  type: "button",
1452
1705
  class: "shifl-grid__info-icon-button",
1453
- onMouseenter: (v) => ze(
1454
- r.key,
1455
- i,
1456
- n[r.key],
1457
- v.currentTarget
1706
+ onMouseenter: (y) => De(
1707
+ s.key,
1708
+ o,
1709
+ n[s.key],
1710
+ y.currentTarget
1458
1711
  ),
1459
- onMouseleave: Ee
1712
+ onMouseleave: je
1460
1713
  }, [
1461
- ve(Un)
1462
- ], 40, Rr)) : z("", !0)
1463
- ])) : r.cellType === "link" ? (a(), l("a", {
1714
+ te(cr)
1715
+ ], 40, ls)) : R("", !0)
1716
+ ])) : s.cellType === "link" ? (a(), d("a", {
1464
1717
  key: 7,
1465
- href: String(n[r.key] || ""),
1718
+ href: String(n[s.key] || ""),
1466
1719
  class: "shifl-grid__link-cell",
1467
1720
  onClick: t[1] || (t[1] = J(() => {
1468
1721
  }, ["stop"]))
1469
- }, P(de(n[r.key], r)), 9, zr)) : r.cellType === "progress" ? (a(), l("div", Er, [
1470
- d("div", Dr, [
1471
- d("div", {
1722
+ }, P(ve(n[s.key], s)), 9, us)) : s.cellType === "progress" ? (a(), d("div", cs, [
1723
+ g("div", ds, [
1724
+ g("div", {
1472
1725
  class: "shifl-grid__progress-fill",
1473
- style: F({ width: `${Lt(n[r.key])}%` })
1726
+ style: F({ width: `${jt(n[s.key])}%` })
1474
1727
  }, null, 4)
1475
1728
  ]),
1476
- d("span", Vr, P(de(n[r.key], r)), 1)
1477
- ])) : Jt(r) ? (a(), l("div", {
1729
+ g("span", fs, P(ve(n[s.key], s)), 1)
1730
+ ])) : sn(s) ? (a(), d("div", {
1478
1731
  key: 9,
1479
1732
  class: "shifl-grid__reference-cell",
1480
- onMouseenter: (v) => It(String(n[r.key] || ""), v.currentTarget),
1481
- onMouseleave: De
1733
+ onMouseenter: (y) => qt(String(n[s.key] || ""), y.currentTarget),
1734
+ onMouseleave: Be
1482
1735
  }, [
1483
- d("span", Ir, P(de(n[r.key], r)), 1),
1484
- n[r.key] ? (a(), l("button", {
1736
+ g("span", ps, P(ve(n[s.key], s)), 1),
1737
+ n[s.key] ? (a(), d("button", {
1485
1738
  key: 0,
1486
1739
  class: "shifl-grid__copy-icon",
1487
- onClick: J(() => Zt(String(n[r.key] || "")), ["stop"]),
1740
+ onClick: J(() => Yt(String(n[s.key] || "")), ["stop"]),
1488
1741
  type: "button"
1489
1742
  }, [
1490
- ve(er)
1491
- ], 8, Zr)) : z("", !0)
1492
- ], 40, Br)) : (a(), l(H, { key: 10 }, [
1493
- ie(P(de(n[r.key], r)), 1)
1743
+ te(pr)
1744
+ ], 8, hs)) : R("", !0)
1745
+ ], 40, gs)) : (a(), d(H, { key: 10 }, [
1746
+ se(P(ve(n[s.key], s)), 1)
1494
1747
  ], 64))
1495
1748
  ], 6))), 128))
1496
- ]))), 128))
1749
+ ], 8, Gr))), 128))
1497
1750
  ], 64))
1498
1751
  ])
1499
1752
  ])
1500
1753
  ], 34),
1501
- D.value && D.value.show !== !1 ? (a(), l("div", jr, [
1502
- d("div", Gr, [
1503
- d("span", Or, [
1504
- t[7] || (t[7] = ie(" Showing ", -1)),
1505
- d("span", Fr, P(Ke.value.from) + "–" + P(Ke.value.to), 1),
1506
- ie(" of " + P(Ne.value), 1)
1754
+ D.value && D.value.show !== !1 ? (a(), d("div", ms, [
1755
+ g("div", vs, [
1756
+ g("span", _s, [
1757
+ t[8] || (t[8] = se(" Showing ", -1)),
1758
+ g("span", ys, P(Ue.value.from) + "–" + P(Ue.value.to), 1),
1759
+ se(" of " + P(Ae.value), 1)
1507
1760
  ])
1508
1761
  ]),
1509
- d("div", Wr, [
1510
- d("div", Kr, [
1511
- t[9] || (t[9] = d("label", { class: "shifl-grid__pagination-label" }, "Row per page", -1)),
1512
- d("select", {
1762
+ g("div", bs, [
1763
+ g("div", ks, [
1764
+ t[10] || (t[10] = g("label", { class: "shifl-grid__pagination-label" }, "Row per page", -1)),
1765
+ g("select", {
1513
1766
  value: D.value.perPage || 20,
1514
- disabled: U.value,
1515
- onChange: Mt,
1767
+ disabled: X.value,
1768
+ onChange: Nt,
1516
1769
  class: "shifl-grid__pagination-select"
1517
- }, [...t[8] || (t[8] = [
1518
- en('<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)
1519
- ])], 40, Jr)
1770
+ }, [...t[9] || (t[9] = [
1771
+ 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)
1772
+ ])], 40, Cs)
1520
1773
  ]),
1521
- d("div", qr, [
1522
- d("button", {
1774
+ g("div", ws, [
1775
+ g("button", {
1523
1776
  type: "button",
1524
1777
  class: "shifl-grid__pagination-button",
1525
- disabled: Je.value || g.loading,
1526
- onClick: Ct,
1778
+ disabled: Ke.value || f.loading,
1779
+ onClick: Pt,
1527
1780
  "aria-label": "Previous page"
1528
- }, " ‹ ", 8, Ur),
1529
- d("div", Yr, [
1530
- (a(!0), l(H, null, B(bt.value, (n) => (a(), l(H, { key: n }, [
1531
- n !== -1 ? (a(), l("button", {
1781
+ }, " ‹ ", 8, Ms),
1782
+ g("div", Ts, [
1783
+ (a(!0), d(H, null, j(xt.value, (n) => (a(), d(H, { key: n }, [
1784
+ n !== -1 ? (a(), d("button", {
1532
1785
  key: 0,
1533
1786
  type: "button",
1534
- class: Z(["shifl-grid__pagination-page", { "shifl-grid__pagination-page--active": n === Y.value }]),
1535
- disabled: U.value,
1536
- onClick: (i) => kt(n)
1537
- }, P(n), 11, Qr)) : (a(), l("span", Xr, "…"))
1787
+ class: I(["shifl-grid__pagination-page", { "shifl-grid__pagination-page--active": n === Q.value }]),
1788
+ disabled: X.value,
1789
+ onClick: (o) => $t(n)
1790
+ }, P(n), 11, Ss)) : (a(), d("span", xs, "…"))
1538
1791
  ], 64))), 128))
1539
1792
  ]),
1540
- d("button", {
1793
+ g("button", {
1541
1794
  type: "button",
1542
1795
  class: "shifl-grid__pagination-button",
1543
- disabled: qe.value || g.loading,
1544
- onClick: wt,
1796
+ disabled: Je.value || f.loading,
1797
+ onClick: Lt,
1545
1798
  "aria-label": "Next page"
1546
- }, " › ", 8, es)
1799
+ }, " › ", 8, $s)
1547
1800
  ])
1548
1801
  ])
1549
- ])) : z("", !0),
1550
- (a(), I(ye, { to: "body" }, [
1551
- V(E).rowIndex !== null && V(E).position ? (a(), l("div", {
1802
+ ])) : R("", !0),
1803
+ (a(), B(Ce, { to: "body" }, [
1804
+ V(z).rowIndex !== null && V(z).position ? (a(), d("div", {
1552
1805
  key: 0,
1553
1806
  ref_key: "actionMenuRef",
1554
1807
  ref: Ge,
1555
1808
  class: "shifl-grid__action-menu",
1556
1809
  style: F(`
1557
1810
  position: fixed !important;
1558
- top: ${V(E).position.top}px !important;
1559
- left: ${V(E).position.left}px !important;
1811
+ top: ${V(z).position.top}px !important;
1812
+ left: ${V(z).position.left}px !important;
1560
1813
  z-index: 1000 !important;`),
1561
1814
  onClick: t[2] || (t[2] = J(() => {
1562
1815
  }, ["stop"]))
1563
1816
  }, [
1564
- (a(!0), l(H, null, B(Yt(Oe.value, we.value), (n) => (a(), l("div", {
1817
+ (a(!0), d(H, null, j(ln(Fe.value, Se.value), (n) => (a(), d("div", {
1565
1818
  key: n.key,
1566
- class: Z(["shifl-grid__action-menu-item", { "shifl-grid__action-menu-item--danger": n.danger }]),
1567
- onClick: () => Qt(n, we.value, V(E).rowIndex)
1819
+ class: I(["shifl-grid__action-menu-item", { "shifl-grid__action-menu-item--danger": n.danger }]),
1820
+ onClick: () => un(n, Se.value, V(z).rowIndex)
1568
1821
  }, [
1569
- n.icon && typeof n.icon == "string" ? (a(), l("span", {
1822
+ n.icon && typeof n.icon == "string" ? (a(), d("span", {
1570
1823
  key: 0,
1571
1824
  innerHTML: n.icon,
1572
1825
  class: "w-4 h-4 inline-block"
1573
- }, null, 8, ns)) : n.icon ? (a(), I(_e(typeof n.icon == "function" ? n.icon() : n.icon), {
1826
+ }, null, 8, Ls)) : n.icon ? (a(), B(ue(typeof n.icon == "function" ? n.icon() : n.icon), {
1574
1827
  key: 1,
1575
1828
  class: "w-4 h-4"
1576
- })) : z("", !0),
1577
- d("span", null, P(n.label), 1)
1578
- ], 10, ts))), 128))
1579
- ], 4)) : z("", !0)
1829
+ })) : R("", !0),
1830
+ g("span", null, P(n.label), 1)
1831
+ ], 10, Ps))), 128))
1832
+ ], 4)) : R("", !0)
1580
1833
  ])),
1581
- ve(Nn, {
1582
- content: Fe.value,
1583
- visible: Me.value,
1584
- "trigger-element": Te.value,
1585
- "is-html": Se.value
1834
+ te(Fn, {
1835
+ content: We.value,
1836
+ visible: xe.value,
1837
+ "trigger-element": $e.value,
1838
+ "is-html": Pe.value
1586
1839
  }, null, 8, ["content", "visible", "trigger-element", "is-html"]),
1587
- (a(), I(ye, { to: "body" }, [
1588
- ue.value ? (a(), l("div", {
1840
+ (a(), B(Ce, { to: "body" }, [
1841
+ pe.value ? (a(), d("div", {
1589
1842
  key: 0,
1590
1843
  class: "shifl-grid__copy-tooltip",
1591
1844
  style: F({
1592
1845
  position: "fixed",
1593
- top: `${Pe.value.top}px`,
1594
- left: `${Pe.value.left}px`,
1846
+ top: `${Le.value.top}px`,
1847
+ left: `${Le.value.left}px`,
1595
1848
  zIndex: "10000"
1596
1849
  })
1597
1850
  }, [
1598
- t[10] || (t[10] = d("div", { class: "shifl-grid__copy-tooltip-arrow" }, null, -1)),
1599
- d("div", rs, P(ce.value), 1)
1600
- ], 4)) : z("", !0)
1851
+ t[11] || (t[11] = g("div", { class: "shifl-grid__copy-tooltip-arrow" }, null, -1)),
1852
+ g("div", Ns, P(he.value), 1)
1853
+ ], 4)) : R("", !0)
1601
1854
  ])),
1602
- (a(), I(ye, { to: "body" }, [
1603
- j.value ? (a(), I(Sn, {
1855
+ (a(), B(Ce, { to: "body" }, [
1856
+ O.value ? (a(), B(In, {
1604
1857
  key: 0,
1605
- "title-prefix": o.config.name,
1606
- columns: Kt.value,
1607
- onClose: t[3] || (t[3] = (n) => j.value = !1),
1608
- onToggle: V(u),
1609
- onToggleFreeze: V(C),
1610
- onMove: V(A),
1611
- onSelectAll: t[4] || (t[4] = (n) => V(h)(!0)),
1612
- onDeselectAll: t[5] || (t[5] = (n) => V(h)(!1)),
1613
- onRestoreDefault: V(N)
1614
- }, null, 8, ["title-prefix", "columns", "onToggle", "onToggleFreeze", "onMove", "onRestoreDefault"])) : z("", !0)
1858
+ "title-prefix": i.config.name,
1859
+ columns: rn.value,
1860
+ onClose: t[3] || (t[3] = (n) => O.value = !1),
1861
+ onToggle: V(p),
1862
+ onToggleFreeze: V(S),
1863
+ onMove: V(E),
1864
+ onSelectAll: t[4] || (t[4] = (n) => V(v)(!0)),
1865
+ onDeselectAll: t[5] || (t[5] = (n) => V(v)(!1)),
1866
+ onRestoreDefault: V(L)
1867
+ }, null, 8, ["title-prefix", "columns", "onToggle", "onToggleFreeze", "onMove", "onRestoreDefault"])) : R("", !0)
1615
1868
  ]))
1616
1869
  ]));
1617
1870
  }
1618
- }), os = {
1619
- install(o) {
1620
- o.component("ShiflGrid", ss);
1871
+ }), Hs = {
1872
+ install(i) {
1873
+ i.component("ShiflGrid", Es);
1621
1874
  }
1622
1875
  };
1623
- function as() {
1624
- const o = _(/* @__PURE__ */ new Set());
1625
- function s(g) {
1626
- const y = g.id ?? JSON.stringify(g), c = new Set(o.value);
1627
- c.has(y) ? c.delete(y) : c.add(y), o.value = c;
1876
+ function Rs() {
1877
+ const i = b(/* @__PURE__ */ new Set());
1878
+ function r(f) {
1879
+ const h = f.id ?? JSON.stringify(f), l = new Set(i.value);
1880
+ l.has(h) ? l.delete(h) : l.add(h), i.value = l;
1628
1881
  }
1629
1882
  return {
1630
- selectedKeys: o,
1631
- toggleRow: s
1883
+ selectedKeys: i,
1884
+ toggleRow: r
1632
1885
  };
1633
1886
  }
1634
- function ls() {
1887
+ function Vs() {
1635
1888
  return {
1636
1889
  // placeholder
1637
1890
  };
1638
1891
  }
1639
- const ht = Symbol("shifl-grid-theme"), pt = {
1892
+ const kt = Symbol("shifl-grid-theme"), Ct = {
1640
1893
  surface: "var(--shifl-surface)",
1641
1894
  surfaceAlt: "var(--shifl-surface-alt)",
1642
1895
  border: "var(--shifl-border)",
@@ -1646,61 +1899,61 @@ const ht = Symbol("shifl-grid-theme"), pt = {
1646
1899
  accentStrong: "var(--shifl-accent-strong)",
1647
1900
  focus: "var(--shifl-focus)"
1648
1901
  };
1649
- function us(o) {
1650
- const s = _({ ...pt, ...o });
1651
- return tn(ht, s), s;
1902
+ function zs(i) {
1903
+ const r = b({ ...Ct, ...i });
1904
+ return gn(kt, r), r;
1652
1905
  }
1653
- function cs() {
1654
- const o = nn(ht);
1655
- return k(() => (o == null ? void 0 : o.value) ?? pt);
1906
+ function Ds() {
1907
+ const i = pn(kt);
1908
+ return C(() => (i == null ? void 0 : i.value) ?? Ct);
1656
1909
  }
1657
- const Ie = {
1910
+ const Oe = {
1658
1911
  sm: 640,
1659
1912
  lg: 1024
1660
1913
  };
1661
- function fs() {
1662
- const o = _(typeof window < "u" ? window.innerWidth : 0);
1663
- function s() {
1664
- o.value = window.innerWidth;
1914
+ function js() {
1915
+ const i = b(typeof window < "u" ? window.innerWidth : 0);
1916
+ function r() {
1917
+ i.value = window.innerWidth;
1665
1918
  }
1666
- return be(() => {
1667
- window.addEventListener("resize", s);
1668
- }), ke(() => {
1669
- window.removeEventListener("resize", s);
1919
+ return we(() => {
1920
+ window.addEventListener("resize", r);
1921
+ }), Me(() => {
1922
+ window.removeEventListener("resize", r);
1670
1923
  }), {
1671
- width: o,
1672
- isMobile: k(() => o.value < Ie.sm),
1673
- isTablet: k(() => o.value >= Ie.sm && o.value < Ie.lg)
1924
+ width: i,
1925
+ isMobile: C(() => i.value < Oe.sm),
1926
+ isTablet: C(() => i.value >= Oe.sm && i.value < Oe.lg)
1674
1927
  };
1675
1928
  }
1676
- function ds() {
1929
+ function Bs() {
1677
1930
  return {
1678
1931
  // placeholder
1679
1932
  };
1680
1933
  }
1681
- function gs() {
1934
+ function Is() {
1682
1935
  return {
1683
1936
  // placeholder
1684
1937
  };
1685
1938
  }
1686
- function hs() {
1939
+ function Os() {
1687
1940
  return {
1688
1941
  // placeholder
1689
1942
  };
1690
1943
  }
1691
1944
  export {
1692
- ss as ShiflGrid,
1693
- os as ShiflGridPlugin,
1694
- us as provideGridTheme,
1695
- fs as useBreakpoints,
1696
- sn as useGridColumns,
1697
- cn as useGridData,
1698
- ls as useGridEditing,
1699
- an as useGridFilter,
1700
- ds as useGridInfiniteScroll,
1701
- as as useGridSelection,
1702
- on as useGridSort,
1703
- cs as useGridTheme,
1704
- hs as useGridTour,
1705
- gs as useVirtualScroll
1945
+ Es as ShiflGrid,
1946
+ Hs as ShiflGridPlugin,
1947
+ zs as provideGridTheme,
1948
+ js as useBreakpoints,
1949
+ mn as useGridColumns,
1950
+ kn as useGridData,
1951
+ Vs as useGridEditing,
1952
+ _n as useGridFilter,
1953
+ Bs as useGridInfiniteScroll,
1954
+ Rs as useGridSelection,
1955
+ vn as useGridSort,
1956
+ Ds as useGridTheme,
1957
+ Os as useGridTour,
1958
+ Is as useVirtualScroll
1706
1959
  };