@shifl-inc/ui 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/shifl-ui.js CHANGED
@@ -1,454 +1,460 @@
1
- import { ref as b, computed as k, onMounted as de, onUnmounted as ge, watch as j, nextTick as Re, defineComponent as ze, createElementBlock as l, openBlock as o, withModifiers as q, createElementVNode as g, createCommentVNode as D, createTextVNode as se, toDisplayString as $, Fragment as x, renderList as V, normalizeClass as G, createBlock as Z, Teleport as He, normalizeStyle as K, createVNode as Ne, unref as E, resolveDynamicComponent as fe, createStaticVNode as Ft, provide as Kt, inject as Wt } from "vue";
2
- function Jt(a) {
3
- const r = (a.columns || []).map((_) => ({
4
- ..._,
5
- freeze: _.freeze ?? !1,
6
- visible: _.visible ?? !0,
7
- protected: _.protected ?? !1
8
- })), d = a.apiConfig ? "server" : a.searchMode || "client";
1
+ import { ref as _, computed as k, onMounted as ye, onUnmounted as be, watch as F, nextTick as Ie, defineComponent as Ze, createElementBlock as l, openBlock as a, withModifiers as K, createElementVNode as d, createCommentVNode as R, createTextVNode as ie, toDisplayString as L, Fragment as H, renderList as B, normalizeClass as Z, createBlock as I, Teleport as _e, normalizeStyle as j, createVNode as me, unref as V, resolveDynamicComponent as ve, createStaticVNode as en, provide as tn, inject as nn } from "vue";
2
+ function rn(o) {
3
+ const s = (o.columns || []).map((b) => ({
4
+ ...b,
5
+ freeze: b.freeze ?? !1,
6
+ visible: b.visible ?? !0,
7
+ protected: b.protected ?? !1
8
+ })), g = o.apiConfig ? "server" : o.searchMode || "client";
9
9
  return {
10
- ...a,
11
- columns: r,
12
- rows: a.rows ?? [],
13
- search: a.search ?? [],
14
- searchMode: d,
15
- filters: a.filters ?? [],
16
- paginationMeta: a.paginationMeta ? {
17
- show: a.paginationMeta.show ?? !0,
18
- currentPage: a.paginationMeta.currentPage ?? 1,
19
- perPage: a.paginationMeta.perPage ?? 20,
20
- total: a.paginationMeta.total ?? 0,
21
- from: a.paginationMeta.from,
22
- to: a.paginationMeta.to,
23
- ...a.paginationMeta
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
24
24
  } : void 0
25
25
  };
26
26
  }
27
- function qt(a) {
28
- const r = [...a], d = b([...a]);
29
- function _(h) {
30
- d.value = d.value.map(
31
- (u) => u.key === h ? { ...u, visible: !u.visible } : u
27
+ function sn(o) {
28
+ const s = [...o], g = _([...o]);
29
+ function b(p) {
30
+ g.value = g.value.map(
31
+ (c) => c.key === p ? { ...c, visible: !c.visible } : c
32
32
  );
33
33
  }
34
- function c(h) {
35
- d.value = d.value.map((u) => ({ ...u, visible: h }));
34
+ function f(p) {
35
+ g.value = g.value.map((c) => ({ ...c, visible: p }));
36
36
  }
37
- function v(h) {
38
- const u = d.value.map(
39
- (w) => w.key === h ? { ...w, freeze: !w.freeze } : w
40
- ), m = u.filter((w) => w.freeze), S = u.filter((w) => !w.freeze);
41
- d.value = [...m, ...S];
37
+ function y(p) {
38
+ const c = g.value.map(
39
+ (M) => M.key === p ? { ...M, freeze: !M.freeze } : M
40
+ ), m = c.filter((M) => M.freeze), T = c.filter((M) => !M.freeze);
41
+ g.value = [...m, ...T];
42
42
  }
43
- function T(h, u) {
44
- if (h === u || u < 0 || u >= d.value.length) return;
45
- const m = d.value.findIndex((p) => !p.freeze), S = m === -1 ? d.value.length : m;
46
- if (h < S || u < S) return;
47
- const w = [...d.value], [f] = w.splice(h, 1);
48
- w.splice(u, 0, f), d.value = w;
43
+ function P(p, c) {
44
+ if (p === c || c < 0 || c >= g.value.length) return;
45
+ const m = g.value.findIndex((h) => !h.freeze), T = m === -1 ? g.value.length : m;
46
+ if (p < T || c < T) return;
47
+ const M = [...g.value], [u] = M.splice(p, 1);
48
+ M.splice(c, 0, u), g.value = M;
49
49
  }
50
- function P() {
51
- d.value = [...r];
50
+ function S() {
51
+ g.value = [...s];
52
52
  }
53
- const M = k(() => d.value.filter((h) => h.visible));
53
+ const w = k(() => g.value.filter((p) => p.visible));
54
54
  return {
55
- columns: d,
56
- visibleColumns: M,
57
- toggleColumnVisibility: _,
58
- setAllVisible: c,
59
- toggleFreeze: v,
60
- moveColumn: T,
61
- resetColumns: P
55
+ columns: g,
56
+ visibleColumns: w,
57
+ toggleColumnVisibility: b,
58
+ setAllVisible: f,
59
+ toggleFreeze: y,
60
+ moveColumn: P,
61
+ resetColumns: S
62
62
  };
63
63
  }
64
- function Ut(a) {
65
- const r = b(a);
66
- function d(c) {
67
- var v;
68
- r.value = ((v = r.value) == null ? void 0 : v.key) === c && r.value.order === "asc" ? { key: c, order: "desc" } : { key: c, order: "asc" };
64
+ function on(o) {
65
+ const s = _(o);
66
+ function g(f) {
67
+ var y;
68
+ s.value = ((y = s.value) == null ? void 0 : y.key) === f && s.value.order === "asc" ? { key: f, order: "desc" } : { key: f, order: "asc" };
69
69
  }
70
- function _(c) {
71
- if (!r.value) return c;
72
- const { key: v, order: T } = r.value;
73
- return [...c].sort((P, M) => {
74
- const h = P[v], u = M[v];
75
- if (h === u) return 0;
76
- if (h == null) return 1;
77
- if (u == null) return -1;
78
- const m = String(h).localeCompare(String(u), void 0, {
70
+ function b(f) {
71
+ if (!s.value) return f;
72
+ const { key: y, order: P } = s.value;
73
+ return [...f].sort((S, w) => {
74
+ const p = S[y], c = w[y];
75
+ if (p === c) return 0;
76
+ if (p == null) return 1;
77
+ if (c == null) return -1;
78
+ const m = String(p).localeCompare(String(c), void 0, {
79
79
  numeric: !0
80
80
  });
81
- return T === "asc" ? m : -m;
81
+ return P === "asc" ? m : -m;
82
82
  });
83
83
  }
84
84
  return {
85
- sort: r,
86
- setSort: d,
87
- applySort: _
85
+ sort: s,
86
+ setSort: g,
87
+ applySort: b
88
88
  };
89
89
  }
90
- function Yt() {
91
- function a(r, d, _) {
92
- const c = (_ || "").trim().toLowerCase();
93
- return c ? r.filter((v) => (d && d.length ? d.map((P) => v[P]) : Object.values(v)).some(
94
- (P) => String(P ?? "").toLowerCase().includes(c)
95
- )) : r;
90
+ function an() {
91
+ function o(s, g, b) {
92
+ const f = (b || "").trim().toLowerCase();
93
+ return f ? s.filter((y) => (g && g.length ? g.map((S) => y[S]) : Object.values(y)).some(
94
+ (S) => String(S ?? "").toLowerCase().includes(f)
95
+ )) : s;
96
96
  }
97
97
  return {
98
- applyGlobalFilter: a
98
+ applyGlobalFilter: o
99
99
  };
100
100
  }
101
- function Qt() {
102
- const a = b({
101
+ function ln() {
102
+ const o = _({
103
103
  rowIndex: null,
104
104
  position: null
105
105
  });
106
- function r(v, T, P = 200) {
107
- const M = T.getBoundingClientRect();
108
- let h = M.left;
109
- h + P > window.innerWidth - 8 && (h = window.innerWidth - P + 8), a.value = {
110
- rowIndex: v,
106
+ function s(y, P, S = 200) {
107
+ const w = P.getBoundingClientRect();
108
+ let p = w.left;
109
+ p + S > window.innerWidth - 8 && (p = window.innerWidth - S + 8), o.value = {
110
+ rowIndex: y,
111
111
  position: {
112
- top: M.bottom,
112
+ top: w.bottom,
113
113
  // 4px below trigger
114
- left: h
114
+ left: p
115
115
  }
116
116
  };
117
117
  }
118
- function d() {
119
- a.value = {
118
+ function g() {
119
+ o.value = {
120
120
  rowIndex: null,
121
121
  position: null
122
122
  };
123
123
  }
124
- function _(v) {
125
- return a.value.rowIndex === v;
124
+ function b(y) {
125
+ return o.value.rowIndex === y;
126
126
  }
127
- function c(v) {
128
- v.key === "Escape" && a.value.rowIndex !== null && d();
127
+ function f(y) {
128
+ y.key === "Escape" && o.value.rowIndex !== null && g();
129
129
  }
130
- return de(() => {
131
- document.addEventListener("keydown", c);
132
- }), ge(() => {
133
- document.removeEventListener("keydown", c);
130
+ return ye(() => {
131
+ document.addEventListener("keydown", f);
132
+ }), be(() => {
133
+ document.removeEventListener("keydown", f);
134
134
  }), {
135
- menuState: a,
136
- openMenu: r,
137
- closeMenu: d,
138
- isMenuOpen: _
135
+ menuState: o,
136
+ openMenu: s,
137
+ closeMenu: g,
138
+ isMenuOpen: b
139
139
  };
140
140
  }
141
- function Xt(a, r) {
142
- const d = b(!1), _ = b(null), c = b([]), v = b(void 0);
143
- let T = null;
144
- function P(f) {
145
- const p = new URLSearchParams();
146
- if (f.search && p.append("search", f.search), f.page !== void 0 && p.append("page", String(f.page)), f.perPage !== void 0 && p.append("per_page", String(f.perPage)), f.sort && (p.append("sort", f.sort.key), p.append("order", f.sort.order)), f.filters && f.filters.length > 0 && f.filters.forEach((C) => {
141
+ function un(o, s) {
142
+ const g = _(!1), b = _(null), f = _([]), y = _(void 0);
143
+ let P = 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
147
  if (C.value !== void 0 && C.value !== null && C.value !== "") {
148
- const L = `filters[${C.key}]`;
149
- Array.isArray(C.value) ? C.value.forEach((A) => p.append(`${L}[]`, String(A))) : p.append(L, String(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));
150
150
  }
151
- }), r != null && r.additionalParams) {
152
- const C = typeof r.additionalParams == "function" ? r.additionalParams(f) : r.additionalParams;
153
- Object.entries(C).forEach(([L, A]) => {
154
- A != null && A !== "" && (Array.isArray(A) ? A.forEach((N) => p.append(`${L}[]`, String(N))) : p.append(L, String(A)));
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)));
155
155
  });
156
156
  }
157
- return p;
157
+ return h;
158
158
  }
159
- function M(f) {
160
- var p, C, L;
161
- return r != null && r.bodyBuilder ? r.bodyBuilder(f) : {
162
- search: f.search,
163
- page: f.page,
164
- per_page: f.perPage,
165
- sort: (p = f.sort) == null ? void 0 : p.key,
166
- order: (C = f.sort) == null ? void 0 : C.order,
167
- // tabName: context.tabName,
168
- filters: (L = f.filters) == null ? void 0 : L.reduce(
169
- (A, N) => (N.value !== void 0 && N.value !== null && N.value !== "" && (A[N.key] = N.value), A),
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,
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),
170
171
  {}
171
172
  ),
172
- ...typeof (r == null ? void 0 : r.additionalParams) == "function" ? r.additionalParams(f) : (r == null ? void 0 : r.additionalParams) || {}
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
177
+ )
178
+ ) || {}
173
179
  };
174
180
  }
175
- function h() {
176
- const f = {
181
+ function p() {
182
+ const u = {
177
183
  "Content-Type": "application/json",
178
- ...(r == null ? void 0 : r.headers) || {}
184
+ ...(s == null ? void 0 : s.headers) || {}
179
185
  };
180
- if (r != null && r.getAuthToken) {
181
- const p = r.getAuthToken();
182
- p && (f.Authorization = `Bearer ${p}`);
186
+ if (s != null && s.getAuthToken) {
187
+ const h = s.getAuthToken();
188
+ h && (u.Authorization = `Bearer ${h}`);
183
189
  }
184
- return f;
190
+ return u;
185
191
  }
186
- function u(f) {
187
- if (r != null && r.responseTransformer)
188
- return r.responseTransformer(f);
189
- const p = f;
192
+ function c(u) {
193
+ if (s != null && s.responseTransformer)
194
+ return s.responseTransformer(u);
195
+ const h = u;
190
196
  return {
191
- data: p.data || p.rows || [],
192
- meta: p.meta
197
+ data: h.data || h.rows || [],
198
+ meta: h.meta
193
199
  };
194
200
  }
195
- async function m(f) {
196
- if (!a) {
197
- _.value = new Error("API URL is required");
201
+ async function m(u) {
202
+ if (!o) {
203
+ b.value = new Error("API URL is required");
198
204
  return;
199
205
  }
200
- d.value = !0, _.value = null;
206
+ g.value = !0, b.value = null;
201
207
  try {
202
- const p = (r == null ? void 0 : r.method) || "GET", C = h();
203
- let L = a, A;
204
- if (p === "GET") {
205
- const ee = r != null && r.paramsBuilder ? r.paramsBuilder(f) : P(f);
206
- if (ee instanceof URLSearchParams) {
207
- const H = ee.toString();
208
- L = H ? `${a}?${H}` : a;
208
+ const h = (s == null ? void 0 : s.method) || "GET", C = p();
209
+ let A = o, N;
210
+ if (h === "GET") {
211
+ const te = s != null && s.paramsBuilder ? s.paramsBuilder(u) : S(u);
212
+ if (te instanceof URLSearchParams) {
213
+ const z = te.toString();
214
+ A = z ? `${o}?${z}` : o;
209
215
  } else {
210
- const H = new URLSearchParams();
211
- Object.entries(ee).forEach(([Y, I]) => {
212
- I != null && I !== "" && (Array.isArray(I) ? I.forEach((oe) => H.append(`${Y}[]`, String(oe))) : H.append(Y, String(I)));
216
+ const z = new URLSearchParams();
217
+ Object.entries(te).forEach(([Q, O]) => {
218
+ O != null && O !== "" && (Array.isArray(O) ? O.forEach((le) => z.append(`${Q}[]`, String(le))) : z.append(Q, String(O)));
213
219
  });
214
- const ae = H.toString();
215
- L = ae ? `${a}?${ae}` : a;
220
+ const ae = z.toString();
221
+ A = ae ? `${o}?${ae}` : o;
216
222
  }
217
223
  } else
218
- A = M(f);
219
- const N = await fetch(L, {
220
- method: p,
224
+ N = w(u);
225
+ const x = await fetch(A, {
226
+ method: h,
221
227
  headers: C,
222
- body: A ? JSON.stringify(A) : void 0
228
+ body: N ? JSON.stringify(N) : void 0
223
229
  });
224
- if (!N.ok)
225
- throw new Error(`API request failed: ${N.status} ${N.statusText}`);
226
- const he = await N.json(), ie = u(he);
227
- c.value = ie.data, v.value = ie.meta;
228
- } catch (p) {
229
- _.value = p instanceof Error ? p : new Error("Unknown error occurred"), c.value = [], v.value = void 0;
230
+ if (!x.ok)
231
+ throw new Error(`API request failed: ${x.status} ${x.statusText}`);
232
+ const ke = await x.json(), oe = c(ke);
233
+ f.value = oe.data, y.value = oe.meta;
234
+ } catch (h) {
235
+ b.value = h instanceof Error ? h : new Error("Unknown error occurred"), f.value = [], y.value = void 0;
230
236
  } finally {
231
- d.value = !1;
237
+ g.value = !1;
232
238
  }
233
239
  }
234
- function S(f, p = !1) {
235
- T && (clearTimeout(T), T = null);
236
- const C = (r == null ? void 0 : r.debounceMs) ?? 300;
237
- p || !f.search ? m(f) : T = setTimeout(() => {
238
- m(f);
240
+ function T(u, h = !1) {
241
+ P && (clearTimeout(P), P = null);
242
+ const C = (s == null ? void 0 : s.debounceMs) ?? 300;
243
+ h || !u.search ? m(u) : P = setTimeout(() => {
244
+ m(u);
239
245
  }, C);
240
246
  }
241
- function w(f) {
242
- S(f, !0);
247
+ function M(u) {
248
+ T(u, !0);
243
249
  }
244
250
  return {
245
- loading: k(() => d.value),
246
- error: k(() => _.value),
247
- data: k(() => c.value),
248
- paginationMeta: k(() => v.value),
251
+ loading: k(() => g.value),
252
+ error: k(() => b.value),
253
+ data: k(() => f.value),
254
+ paginationMeta: k(() => y.value),
249
255
  fetchData: m,
250
- fetchDataDebounced: S,
251
- refresh: w
256
+ fetchDataDebounced: T,
257
+ refresh: M
252
258
  };
253
259
  }
254
- function en(a, r) {
255
- var M, h;
256
- const d = (r == null ? void 0 : r.search) || b(void 0), _ = (r == null ? void 0 : r.filters) || b(a.filters), c = (r == null ? void 0 : r.sort) || b(a.sort), v = (r == null ? void 0 : r.pagination) || b({
257
- page: ((M = a.paginationMeta) == null ? void 0 : M.currentPage) || 1,
258
- perPage: ((h = a.paginationMeta) == null ? void 0 : h.perPage) || 20
259
- }), T = (r == null ? void 0 : r.extraState) || b(void 0), P = (r == null ? void 0 : r.tabName) || b(void 0);
260
- if (a.apiConfig && a.searchMode === "server") {
261
- let u = function() {
262
- var p, C;
260
+ function cn(o, s) {
261
+ var w, p;
262
+ const g = (s == null ? void 0 : s.search) || _(void 0), b = (s == null ? void 0 : s.filters) || _(o.filters), f = (s == null ? void 0 : s.sort) || _(o.sort), y = (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
+ }), P = (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 c = function() {
268
+ var h, C;
263
269
  return {
264
- search: d.value,
265
- filters: _.value,
266
- sort: c.value,
267
- page: (p = v.value) == null ? void 0 : p.page,
268
- perPage: (C = v.value) == null ? void 0 : C.perPage,
269
- extraState: T.value,
270
- tabName: P.value
270
+ search: g.value,
271
+ filters: b.value,
272
+ sort: f.value,
273
+ page: (h = y.value) == null ? void 0 : h.page,
274
+ perPage: (C = y.value) == null ? void 0 : C.perPage,
275
+ extraState: P.value,
276
+ tabName: S.value
271
277
  };
272
- }, m = function(p) {
273
- var C, L, A, N;
274
- return f ? p.search !== f.search || p.page !== f.page || p.perPage !== f.perPage || p.tabName !== f.tabName || ((C = p.sort) == null ? void 0 : C.key) !== ((L = f.sort) == null ? void 0 : L.key) || ((A = p.sort) == null ? void 0 : A.order) !== ((N = f.sort) == null ? void 0 : N.order) || JSON.stringify(p.filters) !== JSON.stringify(f.filters) || JSON.stringify(p.extraState) !== JSON.stringify(f.extraState) : !0;
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;
275
281
  };
276
- const S = Xt(a.apiConfig.apiUrl, a.apiConfig);
277
- let w = !1, f = null;
278
- return j(
279
- [d, _, c, v, T, P],
282
+ const T = un(o.apiConfig.apiUrl, o.apiConfig);
283
+ let M = !1, u = null;
284
+ return F(
285
+ [g, b, f, y, P, S],
280
286
  () => {
281
- if (w)
287
+ if (M)
282
288
  return;
283
- const p = u();
284
- if (!m(p))
289
+ const h = c();
290
+ if (!m(h))
285
291
  return;
286
- f = p;
287
- const C = d.value !== void 0;
288
- S.fetchDataDebounced(p, !C);
292
+ u = h;
293
+ const C = g.value !== void 0;
294
+ T.fetchDataDebounced(h, !C);
289
295
  },
290
296
  { immediate: !0, deep: !0 }
291
- ), j(S.paginationMeta, (p) => {
292
- if (p && v.value) {
293
- const C = p.perPage || v.value.perPage;
294
- C !== v.value.perPage && (w = !0, v.value.perPage = C, Re(() => {
295
- w = !1;
297
+ ), F(T.paginationMeta, (h) => {
298
+ if (h && y.value) {
299
+ const C = h.perPage || y.value.perPage;
300
+ C !== y.value.perPage && (M = !0, y.value.perPage = C, Ie(() => {
301
+ M = !1;
296
302
  }));
297
303
  }
298
304
  }), {
299
- rows: S.data,
300
- loading: S.loading,
301
- error: S.error,
302
- paginationMeta: S.paginationMeta,
305
+ rows: T.data,
306
+ loading: T.loading,
307
+ error: T.error,
308
+ paginationMeta: T.paginationMeta,
303
309
  refresh: () => {
304
- var C, L;
305
- const p = {
306
- search: d.value,
307
- filters: _.value,
308
- sort: c.value,
309
- page: (C = v.value) == null ? void 0 : C.page,
310
- perPage: (L = v.value) == null ? void 0 : L.perPage,
311
- extraState: T.value,
312
- tabName: P.value
310
+ var C, A;
311
+ const h = {
312
+ search: g.value,
313
+ filters: b.value,
314
+ sort: f.value,
315
+ page: (C = y.value) == null ? void 0 : C.page,
316
+ perPage: (A = y.value) == null ? void 0 : A.perPage,
317
+ extraState: P.value,
318
+ tabName: S.value
313
319
  };
314
- S.refresh(p);
320
+ T.refresh(h);
315
321
  }
316
322
  };
317
323
  }
318
324
  return {
319
- rows: k(() => a.rows),
325
+ rows: k(() => o.rows),
320
326
  loading: k(() => !1),
321
327
  error: k(() => null),
322
- paginationMeta: k(() => a.paginationMeta),
328
+ paginationMeta: k(() => o.paginationMeta),
323
329
  refresh: () => {
324
330
  }
325
331
  };
326
332
  }
327
- const tn = { class: "shifl-column-manager__header" }, nn = { class: "shifl-column-manager__title-wrapper" }, rn = { class: "shifl-column-manager__title" }, sn = { key: 0 }, an = { key: 1 }, on = { class: "shifl-column-manager__controls" }, ln = { class: "shifl-column-manager__controls-left" }, un = { class: "shifl-column-manager__content" }, cn = { class: "shifl-column-manager__list" }, fn = ["draggable", "onDragstart", "onDragover", "onDrop"], dn = ["aria-label", "disabled"], gn = ["checked", "disabled", "onChange"], hn = { class: "shifl-column-manager__label-text" }, pn = { class: "shifl-column-manager__footer" }, mn = /* @__PURE__ */ ze({
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__ */ Ze({
328
334
  __name: "GridColumnManager",
329
335
  props: {
330
336
  titlePrefix: {},
331
337
  columns: {}
332
338
  },
333
339
  emits: ["close", "toggle", "move", "toggleFreeze", "selectAll", "deselectAll", "restoreDefault"],
334
- setup(a, { emit: r }) {
335
- const d = a, _ = k(() => d.columns), c = r, v = b(null);
336
- function T(h) {
337
- var u, m;
338
- (u = d.columns[h]) != null && u.freeze || (m = d.columns[h]) != null && m.protected || (v.value = h);
340
+ setup(o, { emit: s }) {
341
+ const g = o, b = k(() => g.columns), f = s, y = _(null);
342
+ function P(p) {
343
+ var c, m;
344
+ (c = g.columns[p]) != null && c.freeze || (m = g.columns[p]) != null && m.protected || (y.value = p);
339
345
  }
340
- function P(h) {
346
+ function S(p) {
341
347
  }
342
- function M(h) {
343
- v.value === null || v.value === h || (c("move", v.value, h), v.value = null);
348
+ function w(p) {
349
+ y.value === null || y.value === p || (f("move", y.value, p), y.value = null);
344
350
  }
345
- return (h, u) => (o(), l("div", {
351
+ return (p, c) => (a(), l("div", {
346
352
  class: "shifl-column-manager__backdrop",
347
- onClick: u[7] || (u[7] = q((m) => h.$emit("close"), ["self"]))
353
+ onClick: c[7] || (c[7] = K((m) => p.$emit("close"), ["self"]))
348
354
  }, [
349
- g("div", {
355
+ d("div", {
350
356
  class: "shifl-column-manager__dialog",
351
357
  role: "dialog",
352
358
  "aria-modal": "true",
353
- onClick: u[6] || (u[6] = q(() => {
359
+ onClick: c[6] || (c[6] = K(() => {
354
360
  }, ["stop"]))
355
361
  }, [
356
- g("header", tn, [
357
- g("div", nn, [
358
- g("h2", rn, [
359
- a.titlePrefix ? (o(), l("span", sn, $(a.titlePrefix), 1)) : D("", !0),
360
- a.titlePrefix ? (o(), l("span", an, ">")) : D("", !0),
361
- u[8] || (u[8] = se("Edit Columns ", -1))
362
+ d("header", fn, [
363
+ d("div", dn, [
364
+ d("h2", gn, [
365
+ o.titlePrefix ? (a(), l("span", hn, L(o.titlePrefix), 1)) : R("", !0),
366
+ o.titlePrefix ? (a(), l("span", pn, ">")) : R("", !0),
367
+ c[8] || (c[8] = ie("Edit Columns ", -1))
362
368
  ])
363
369
  ]),
364
- g("button", {
370
+ d("button", {
365
371
  type: "button",
366
372
  class: "shifl-column-manager__close",
367
- onClick: u[0] || (u[0] = (m) => h.$emit("close"))
368
- }, [...u[9] || (u[9] = [
369
- g("span", null, "✕", -1)
373
+ onClick: c[0] || (c[0] = (m) => p.$emit("close"))
374
+ }, [...c[9] || (c[9] = [
375
+ d("span", null, "✕", -1)
370
376
  ])])
371
377
  ]),
372
- g("div", on, [
373
- g("div", ln, [
374
- g("button", {
378
+ d("div", mn, [
379
+ d("div", vn, [
380
+ d("button", {
375
381
  type: "button",
376
382
  class: "shifl-column-manager__link-button",
377
- onClick: u[1] || (u[1] = (m) => h.$emit("selectAll"))
383
+ onClick: c[1] || (c[1] = (m) => p.$emit("selectAll"))
378
384
  }, " Select All "),
379
- g("button", {
385
+ d("button", {
380
386
  type: "button",
381
387
  class: "shifl-column-manager__link-button",
382
- onClick: u[2] || (u[2] = (m) => h.$emit("deselectAll"))
388
+ onClick: c[2] || (c[2] = (m) => p.$emit("deselectAll"))
383
389
  }, " Deselect All ")
384
390
  ]),
385
- g("button", {
391
+ d("button", {
386
392
  type: "button",
387
393
  class: "shifl-column-manager__link-button shifl-column-manager__link-button--primary",
388
- onClick: u[3] || (u[3] = (m) => h.$emit("restoreDefault"))
394
+ onClick: c[3] || (c[3] = (m) => p.$emit("restoreDefault"))
389
395
  }, " Restore Default ")
390
396
  ]),
391
- g("div", un, [
392
- g("ul", cn, [
393
- (o(!0), l(x, null, V(_.value, (m, S) => (o(), l("li", {
397
+ d("div", _n, [
398
+ d("ul", yn, [
399
+ (a(!0), l(H, null, B(b.value, (m, T) => (a(), l("li", {
394
400
  key: m.key,
395
- class: G(["shifl-column-manager__item", {
401
+ class: Z(["shifl-column-manager__item", {
396
402
  "shifl-column-manager__item--disabled": m.freeze || m.protected
397
403
  }]),
398
404
  draggable: !m.freeze && !m.protected,
399
- onDragstart: (w) => T(S),
400
- onDragover: q((w) => void 0, ["prevent"]),
401
- onDrop: q((w) => M(S), ["prevent"])
405
+ onDragstart: (M) => P(T),
406
+ onDragover: K((M) => void 0, ["prevent"]),
407
+ onDrop: K((M) => w(T), ["prevent"])
402
408
  }, [
403
- g("button", {
409
+ d("button", {
404
410
  type: "button",
405
- class: G(["shifl-column-manager__drag-handle", {
411
+ class: Z(["shifl-column-manager__drag-handle", {
406
412
  "shifl-column-manager__drag-handle--disabled": m.freeze || m.protected
407
413
  }]),
408
414
  "aria-label": `Move ${m.label}`,
409
415
  disabled: m.freeze || m.protected
410
- }, [...u[10] || (u[10] = [
411
- g("span", null, "⋮⋮", -1)
412
- ])], 10, dn),
413
- g("label", {
414
- class: G(["shifl-column-manager__checkbox-label", {
416
+ }, [...c[10] || (c[10] = [
417
+ d("span", null, "⋮⋮", -1)
418
+ ])], 10, kn),
419
+ d("label", {
420
+ class: Z(["shifl-column-manager__checkbox-label", {
415
421
  "shifl-column-manager__checkbox-label--disabled": m.freeze || m.protected
416
422
  }])
417
423
  }, [
418
- g("input", {
424
+ d("input", {
419
425
  type: "checkbox",
420
426
  class: "shifl-column-manager__checkbox",
421
427
  checked: m.visible,
422
428
  disabled: m.freeze || m.protected,
423
- onChange: (w) => h.$emit("toggle", m.key)
424
- }, null, 40, gn),
425
- u[11] || (u[11] = g("span", { class: "shifl-column-manager__checkbox-custom" }, null, -1)),
426
- g("span", hn, $(m.label), 1)
429
+ onChange: (M) => p.$emit("toggle", m.key)
430
+ }, null, 40, Cn),
431
+ c[11] || (c[11] = d("span", { class: "shifl-column-manager__checkbox-custom" }, null, -1)),
432
+ d("span", wn, L(m.label), 1)
427
433
  ], 2)
428
- ], 42, fn))), 128))
434
+ ], 42, bn))), 128))
429
435
  ])
430
436
  ]),
431
- g("footer", pn, [
432
- g("button", {
437
+ d("footer", Mn, [
438
+ d("button", {
433
439
  type: "button",
434
440
  class: "shifl-column-manager__button shifl-column-manager__button--primary",
435
- onClick: u[4] || (u[4] = (m) => h.$emit("close"))
441
+ onClick: c[4] || (c[4] = (m) => p.$emit("close"))
436
442
  }, " Update "),
437
- g("button", {
443
+ d("button", {
438
444
  type: "button",
439
445
  class: "shifl-column-manager__button shifl-column-manager__button--secondary",
440
- onClick: u[5] || (u[5] = (m) => h.$emit("close"))
446
+ onClick: c[5] || (c[5] = (m) => p.$emit("close"))
441
447
  }, " Cancel ")
442
448
  ])
443
449
  ])
444
450
  ]));
445
451
  }
446
- }), U = (a, r) => {
447
- const d = a.__vccOpts || a;
448
- for (const [_, c] of r)
449
- d[_] = c;
450
- return d;
451
- }, vn = /* @__PURE__ */ U(mn, [["__scopeId", "data-v-40ca0ed0"]]), _n = { class: "shifl-grid__tooltip-content" }, yn = ["innerHTML"], bn = /* @__PURE__ */ ze({
452
+ }), J = (o, s) => {
453
+ const g = o.__vccOpts || o;
454
+ for (const [b, f] of s)
455
+ g[b] = f;
456
+ return g;
457
+ }, Sn = /* @__PURE__ */ J(Tn, [["__scopeId", "data-v-40ca0ed0"]]), Pn = { class: "shifl-grid__tooltip-content" }, $n = ["innerHTML"], Ln = /* @__PURE__ */ Ze({
452
458
  __name: "GridTooltip",
453
459
  props: {
454
460
  content: {},
@@ -456,60 +462,60 @@ const tn = { class: "shifl-column-manager__header" }, nn = { class: "shifl-colum
456
462
  triggerElement: {},
457
463
  isHtml: { type: Boolean }
458
464
  },
459
- setup(a) {
460
- const r = a, d = b(null), _ = b({}), c = k(() => r.content.includes(`
461
- `)), v = k(() => c.value ? r.content.split(`
462
- `).filter((h) => h.trim().length > 0) : []), T = b("top"), P = b({});
463
- function M() {
464
- if (!r.triggerElement || !d.value) return;
465
- const h = r.triggerElement.getBoundingClientRect(), u = d.value.getBoundingClientRect(), m = window.innerWidth, S = window.innerHeight;
466
- let w = h.bottom + 8, f = h.left + window.scrollX;
467
- f + u.width > m - 16 && (f = m - u.width - 16), f < 16 && (f = 16), w + u.height > S - 16 ? (w = h.top - u.height - 8, T.value = "bottom") : T.value = "top", _.value = {
465
+ setup(o) {
466
+ const s = o, g = _(null), b = _({}), f = k(() => s.content.includes(`
467
+ `)), y = k(() => f.value ? s.content.split(`
468
+ `).filter((p) => p.trim().length > 0) : []), P = _("top"), S = _({});
469
+ function w() {
470
+ if (!s.triggerElement || !g.value) return;
471
+ const p = s.triggerElement.getBoundingClientRect(), c = g.value.getBoundingClientRect(), m = window.innerWidth, T = window.innerHeight;
472
+ let M = p.bottom + 8, u = p.left + window.scrollX;
473
+ u + c.width > m - 16 && (u = m - c.width - 16), u < 16 && (u = 16), M + c.height > T - 16 ? (M = p.top - c.height - 8, P.value = "bottom") : P.value = "top", b.value = {
468
474
  position: "fixed",
469
- top: `${w}px`,
470
- left: `${f}px`,
475
+ top: `${M}px`,
476
+ left: `${u}px`,
471
477
  zIndex: "10000"
472
478
  };
473
- const p = h.left + h.width / 2 - f;
474
- P.value = {
475
- left: `${p}px`
479
+ const h = p.left + p.width / 2 - u;
480
+ S.value = {
481
+ left: `${h}px`
476
482
  };
477
483
  }
478
- return j(
479
- () => r.visible,
480
- async (h) => {
481
- h && (await Re(), M());
484
+ return F(
485
+ () => s.visible,
486
+ async (p) => {
487
+ p && (await Ie(), w());
482
488
  }
483
- ), de(() => {
484
- r.visible && Re(() => M());
485
- }), ge(() => {
486
- }), (h, u) => (o(), Z(He, { to: "body" }, [
487
- a.visible ? (o(), l("div", {
489
+ ), ye(() => {
490
+ s.visible && Ie(() => w());
491
+ }), be(() => {
492
+ }), (p, c) => (a(), I(_e, { to: "body" }, [
493
+ o.visible ? (a(), l("div", {
488
494
  key: 0,
489
495
  ref_key: "tooltipRef",
490
- ref: d,
496
+ ref: g,
491
497
  class: "shifl-grid__tooltip",
492
- style: K(_.value)
498
+ style: j(b.value)
493
499
  }, [
494
- g("div", {
495
- class: G(["shifl-grid__tooltip-arrow", T.value]),
496
- style: K(P.value)
500
+ d("div", {
501
+ class: Z(["shifl-grid__tooltip-arrow", P.value]),
502
+ style: j(S.value)
497
503
  }, null, 6),
498
- g("div", _n, [
499
- a.isHtml ? (o(), l("div", {
504
+ d("div", Pn, [
505
+ o.isHtml ? (a(), l("div", {
500
506
  key: 0,
501
- innerHTML: a.content
502
- }, null, 8, yn)) : c.value ? (o(!0), l(x, { key: 1 }, V(v.value, (m, S) => (o(), l("div", {
503
- key: S,
507
+ innerHTML: o.content
508
+ }, null, 8, $n)) : f.value ? (a(!0), l(H, { key: 1 }, B(y.value, (m, T) => (a(), l("div", {
509
+ key: T,
504
510
  class: "shifl-grid__tooltip-line"
505
- }, $(m), 1))), 128)) : (o(), l(x, { key: 2 }, [
506
- se($(a.content), 1)
511
+ }, L(m), 1))), 128)) : (a(), l(H, { key: 2 }, [
512
+ ie(L(o.content), 1)
507
513
  ], 64))
508
514
  ])
509
- ], 4)) : D("", !0)
515
+ ], 4)) : R("", !0)
510
516
  ]));
511
517
  }
512
- }), kn = /* @__PURE__ */ U(bn, [["__scopeId", "data-v-239005f1"]]), Cn = {}, Mn = {
518
+ }), Nn = /* @__PURE__ */ J(Ln, [["__scopeId", "data-v-239005f1"]]), An = {}, xn = {
513
519
  width: "14",
514
520
  height: "15",
515
521
  viewBox: "0 0 14 15",
@@ -517,24 +523,24 @@ const tn = { class: "shifl-column-manager__header" }, nn = { class: "shifl-colum
517
523
  xmlns: "http://www.w3.org/2000/svg",
518
524
  class: "shifl-smart-tracking-icon"
519
525
  };
520
- function wn(a, r) {
521
- return o(), l("svg", Mn, [...r[0] || (r[0] = [
522
- g("path", {
526
+ function Hn(o, s) {
527
+ return a(), l("svg", xn, [...s[0] || (s[0] = [
528
+ d("path", {
523
529
  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",
524
530
  fill: "#05963F"
525
531
  }, null, -1)
526
532
  ])]);
527
533
  }
528
- const Sn = /* @__PURE__ */ U(Cn, [["render", wn]]), Tn = {}, Pn = {
534
+ const En = /* @__PURE__ */ J(An, [["render", Hn]]), Rn = {}, zn = {
529
535
  width: "14",
530
536
  height: "10",
531
537
  viewBox: "0 0 14 10",
532
538
  fill: "none",
533
539
  xmlns: "http://www.w3.org/2000/svg"
534
540
  };
535
- function $n(a, r) {
536
- return o(), l("svg", Pn, [...r[0] || (r[0] = [
537
- g("path", {
541
+ function Dn(o, s) {
542
+ return a(), l("svg", zn, [...s[0] || (s[0] = [
543
+ d("path", {
538
544
  "fill-rule": "evenodd",
539
545
  "clip-rule": "evenodd",
540
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",
@@ -542,91 +548,106 @@ function $n(a, r) {
542
548
  }, null, -1)
543
549
  ])]);
544
550
  }
545
- const Ln = /* @__PURE__ */ U(Tn, [["render", $n]]), An = {}, Nn = {
551
+ const Vn = /* @__PURE__ */ J(Rn, [["render", Dn]]), Bn = {}, In = {
546
552
  width: "14",
547
553
  height: "10",
548
554
  viewBox: "0 0 14 10",
549
555
  fill: "none",
550
556
  xmlns: "http://www.w3.org/2000/svg"
551
557
  };
552
- function xn(a, r) {
553
- return o(), l("svg", Nn, [...r[0] || (r[0] = [
554
- g("path", {
558
+ function Zn(o, s) {
559
+ return a(), l("svg", In, [...s[0] || (s[0] = [
560
+ d("path", {
555
561
  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",
556
562
  fill: "#1A6D9E"
557
563
  }, null, -1)
558
564
  ])]);
559
565
  }
560
- const Rn = /* @__PURE__ */ U(An, [["render", xn]]), Hn = {}, zn = {
566
+ const On = /* @__PURE__ */ J(Bn, [["render", Zn]]), Gn = {}, jn = {
561
567
  width: "21",
562
568
  height: "13",
563
569
  viewBox: "0 0 21 13",
564
570
  fill: "none",
565
571
  xmlns: "http://www.w3.org/2000/svg"
566
572
  };
567
- function Dn(a, r) {
568
- return o(), l("svg", zn, [...r[0] || (r[0] = [
569
- g("path", {
573
+ function Fn(o, s) {
574
+ return a(), l("svg", jn, [...s[0] || (s[0] = [
575
+ d("path", {
570
576
  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",
571
577
  fill: "#9CA5B4"
572
578
  }, null, -1)
573
579
  ])]);
574
580
  }
575
- const lt = /* @__PURE__ */ U(Hn, [["render", Dn]]), En = {}, Vn = {
581
+ const ht = /* @__PURE__ */ J(Gn, [["render", Fn]]), Wn = {}, Kn = {
576
582
  width: "16",
577
583
  height: "16",
578
584
  viewBox: "0 0 16 16",
579
585
  fill: "none",
580
586
  xmlns: "http://www.w3.org/2000/svg"
581
587
  };
582
- function Bn(a, r) {
583
- return o(), l("svg", Vn, [...r[0] || (r[0] = [
584
- g("path", {
588
+ function Jn(o, s) {
589
+ return a(), l("svg", Kn, [...s[0] || (s[0] = [
590
+ d("path", {
585
591
  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",
586
592
  fill: "#69758C"
587
593
  }, null, -1)
588
594
  ])]);
589
595
  }
590
- const Gn = /* @__PURE__ */ U(En, [["render", Bn]]), In = { class: "shifl-grid relative" }, On = { class: "shifl-grid__controls" }, Zn = { class: "shifl-grid__table" }, jn = ["onClick"], Fn = { class: "shifl-grid__header-content" }, Kn = {
596
+ const qn = /* @__PURE__ */ J(Wn, [["render", Jn]]), Un = {}, Yn = {
597
+ width: "16",
598
+ height: "16",
599
+ viewBox: "0 0 24 24",
600
+ fill: "none",
601
+ xmlns: "http://www.w3.org/2000/svg"
602
+ };
603
+ function Qn(o, s) {
604
+ return a(), l("svg", Yn, [...s[0] || (s[0] = [
605
+ d("path", {
606
+ 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
+ fill: "#1A6D9E"
608
+ }, null, -1)
609
+ ])]);
610
+ }
611
+ const Xn = /* @__PURE__ */ J(Un, [["render", Qn]]), er = { class: "shifl-grid relative" }, tr = { class: "shifl-grid__controls" }, nr = { class: "shifl-grid__table" }, rr = ["onClick"], sr = { class: "shifl-grid__header-content" }, ir = {
591
612
  key: 0,
592
613
  class: "shifl-grid__header-label"
593
- }, Wn = {
614
+ }, or = {
594
615
  key: 1,
595
616
  class: "shifl-grid__sort-icon"
596
- }, Jn = { key: 0 }, qn = ["colspan"], Un = {
617
+ }, ar = { key: 0 }, lr = ["colspan"], ur = {
597
618
  key: 0,
598
619
  class: "shifl-grid__smart-tracking-icon"
599
- }, Yn = ["onClick"], Qn = { key: 0 }, Xn = ["innerHTML"], er = {
620
+ }, cr = ["onClick"], fr = { key: 0 }, dr = ["innerHTML"], gr = {
600
621
  key: 2,
601
622
  class: "shifl-grid__composite-cell"
602
- }, tr = {
623
+ }, hr = {
603
624
  key: 3,
604
625
  class: "shifl-grid__type-cell"
605
- }, nr = {
626
+ }, pr = {
606
627
  key: 0,
607
628
  class: "shifl-grid__container-badge"
608
- }, rr = {
629
+ }, mr = {
609
630
  key: 0,
610
631
  class: "shifl-grid__cell-blank"
611
- }, sr = {
632
+ }, vr = {
612
633
  key: 1,
613
634
  class: "shifl-grid__tags-cell"
614
- }, ir = { class: "shifl-grid__tags-wrapper" }, ar = ["onMouseenter"], or = {
635
+ }, _r = { class: "shifl-grid__tags-wrapper" }, yr = ["onMouseenter"], br = {
615
636
  key: 5,
616
637
  class: "shifl-grid__chips-container"
617
- }, lr = {
638
+ }, kr = {
618
639
  key: 6,
619
640
  class: "shifl-grid__truncated-cell"
620
- }, ur = ["onMouseenter"], cr = ["onMouseenter"], fr = ["href"], dr = {
641
+ }, Cr = ["onMouseenter"], wr = ["onMouseenter"], Mr = ["href"], Tr = {
621
642
  key: 8,
622
643
  class: "shifl-grid__progress-cell"
623
- }, gr = { class: "shifl-grid__progress-bar" }, hr = { class: "shifl-grid__progress-text" }, pr = {
644
+ }, Sr = { class: "shifl-grid__progress-bar" }, Pr = { class: "shifl-grid__progress-text" }, $r = ["onMouseenter"], Lr = { class: "shifl-grid__reference-value" }, Nr = ["onClick"], Ar = {
624
645
  key: 0,
625
646
  class: "shifl-grid__pagination"
626
- }, mr = { class: "shifl-grid__pagination-left" }, vr = { class: "shifl-grid__pagination-range" }, _r = { class: "shifl-grid__pagination-range-numbers" }, yr = { class: "shifl-grid__pagination-right" }, br = { class: "shifl-grid__pagination-rows" }, kr = ["value", "disabled"], Cr = { class: "shifl-grid__pagination-nav" }, Mr = ["disabled"], wr = { class: "shifl-grid__pagination-pages" }, Sr = ["disabled", "onClick"], Tr = {
647
+ }, xr = { class: "shifl-grid__pagination-left" }, Hr = { class: "shifl-grid__pagination-range" }, Er = { class: "shifl-grid__pagination-range-numbers" }, Rr = { class: "shifl-grid__pagination-right" }, zr = { class: "shifl-grid__pagination-rows" }, Dr = ["value", "disabled"], Vr = { class: "shifl-grid__pagination-nav" }, Br = ["disabled"], Ir = { class: "shifl-grid__pagination-pages" }, Zr = ["disabled", "onClick"], Or = {
627
648
  key: 1,
628
649
  class: "shifl-grid__pagination-ellipsis"
629
- }, Pr = ["disabled"], $r = ["onClick"], Lr = ["innerHTML"], Ar = /* @__PURE__ */ ze({
650
+ }, Gr = ["disabled"], jr = ["onClick"], Fr = ["innerHTML"], Wr = { class: "shifl-grid__copy-tooltip-content" }, Kr = /* @__PURE__ */ Ze({
630
651
  __name: "ShiflGrid",
631
652
  props: {
632
653
  config: {},
@@ -634,194 +655,194 @@ const Gn = /* @__PURE__ */ U(En, [["render", Bn]]), In = { class: "shifl-grid re
634
655
  loading: { type: Boolean }
635
656
  },
636
657
  emits: ["action-click", "search-change", "pagination-change"],
637
- setup(a, { emit: r }) {
638
- var rt, st, it, at, ot;
639
- const d = a, _ = r, c = k(() => Jt(d.config)), v = b(d.search), T = b(c.value.filters), P = b(c.value.sort), M = b({
640
- page: ((rt = c.value.paginationMeta) == null ? void 0 : rt.currentPage) || 1,
641
- perPage: ((st = c.value.paginationMeta) == null ? void 0 : st.perPage) || 20
642
- }), h = b(
643
- typeof ((it = c.value.apiConfig) == null ? void 0 : it.additionalParams) == "function" || (ot = (at = c.value.apiConfig) == null ? void 0 : at.additionalParams) == null ? void 0 : ot.tabName
644
- ), u = en(c.value, {
645
- search: v,
646
- filters: T,
647
- sort: P,
648
- pagination: M,
649
- tabName: h
650
- }), m = k(() => c.value.columns.filter((e) => !e.smartTrackingColumn)), {
651
- columns: S,
652
- visibleColumns: w,
653
- toggleColumnVisibility: f,
654
- setAllVisible: p,
658
+ setup(o, { emit: s }) {
659
+ var ut, ct, ft, dt, gt;
660
+ const g = o, b = s, f = k(() => rn(g.config)), y = _(g.search), P = _(f.value.filters), S = _(f.value.sort), w = _({
661
+ page: ((ut = f.value.paginationMeta) == null ? void 0 : ut.currentPage) || 1,
662
+ perPage: ((ct = f.value.paginationMeta) == null ? void 0 : ct.perPage) || 20
663
+ }), p = _(
664
+ typeof ((ft = f.value.apiConfig) == null ? void 0 : ft.additionalParams) == "function" || (gt = (dt = f.value.apiConfig) == null ? void 0 : dt.additionalParams) == null ? void 0 : gt.tabName
665
+ ), c = cn(f.value, {
666
+ search: y,
667
+ filters: P,
668
+ sort: S,
669
+ pagination: w,
670
+ tabName: p
671
+ }), m = k(() => f.value.columns.filter((e) => !e.smartTrackingColumn)), {
672
+ columns: T,
673
+ visibleColumns: M,
674
+ toggleColumnVisibility: u,
675
+ setAllVisible: h,
655
676
  toggleFreeze: C,
656
- moveColumn: L,
657
- resetColumns: A
658
- } = qt(m.value), { sort: N, setSort: he, applySort: ie } = Ut(c.value.sort), { applyGlobalFilter: ee } = Yt(), { menuState: H, openMenu: ae, closeMenu: Y } = Qt(), I = b(!1), oe = b({}), De = b(null), Ee = b(null), pe = b(null), me = b(!1), Ve = b(""), ve = b(null), _e = b(!1), ft = b({});
659
- b({});
660
- const Q = b(
677
+ moveColumn: A,
678
+ resetColumns: N
679
+ } = sn(m.value), { sort: x, setSort: ke, applySort: oe } = on(f.value.sort), { applyGlobalFilter: te } = an(), { menuState: z, openMenu: ae, closeMenu: Q } = ln(), O = _(!1), le = _({}), Oe = _(null), Ge = _(null), Ce = _(null), we = _(!1), je = _(""), Me = _(null), Te = _(!1), vt = _({});
680
+ _({});
681
+ const X = _(
661
682
  {}
662
- );
663
- j(
664
- () => c.value.filters,
665
- (e) => {
666
- T.value = e;
667
- },
668
- { deep: !0 }
669
- ), j(
670
- () => c.value.paginationMeta,
683
+ ), ue = _(!1), ce = _("Copy To Clipboard"), fe = _(null), Se = _({ top: 0, left: 0 });
684
+ function q() {
685
+ if (!fe.value || !ue.value) return;
686
+ const e = fe.value.getBoundingClientRect(), t = 120, n = 32, i = window.innerWidth, r = window.innerHeight, v = 4;
687
+ let $ = e.right + v, E = e.top + e.height / 2 - n / 2;
688
+ $ + t > i && ($ = e.left - t - v), $ < 0 && ($ = 10), E + n > r && (E = r - n - 10), E < 0 && (E = 10), Se.value = { top: E, left: $ };
689
+ }
690
+ F(
691
+ () => f.value.paginationMeta,
671
692
  (e) => {
672
- c.value.searchMode !== "server" && e && M.value && (M.value.page = e.currentPage || M.value.page, M.value.perPage = e.perPage || M.value.perPage);
693
+ f.value.searchMode !== "server" && e && w.value && (w.value.page = e.currentPage || w.value.page, w.value.perPage = e.perPage || w.value.perPage);
673
694
  },
674
695
  { deep: !0 }
675
- ), j(
676
- () => c.value.columns,
696
+ ), F(
697
+ () => f.value.columns,
677
698
  (e) => {
678
699
  const t = e.filter((n) => !n.smartTrackingColumn);
679
- S.value = [...t];
700
+ T.value = [...t];
680
701
  },
681
702
  { deep: !0 }
682
- ), j(
683
- () => c.value.sort,
703
+ ), F(
704
+ () => f.value.sort,
684
705
  (e) => {
685
- e && (N.value = e, P.value = e);
706
+ e && (x.value = e, S.value = e);
686
707
  },
687
708
  { deep: !0 }
688
- ), j(
709
+ ), F(
689
710
  () => {
690
711
  var e;
691
- return (e = c.value.apiConfig) == null ? void 0 : e.additionalParams;
712
+ return (e = f.value.apiConfig) == null ? void 0 : e.additionalParams;
692
713
  },
693
714
  (e) => {
694
715
  if (e && typeof e != "function") {
695
716
  const t = e;
696
- t.tabName !== void 0 && h.value !== t.tabName && (h.value = t.tabName);
717
+ t.tabName !== void 0 && p.value !== t.tabName && (p.value = t.tabName);
697
718
  }
698
719
  },
699
720
  { deep: !0 }
700
- ), j(
701
- () => d.search,
721
+ ), F(
722
+ () => g.search,
702
723
  (e, t) => {
703
724
  var n;
704
- if (v.value = e, c.value.searchMode === "server")
705
- _("search-change", e || "");
706
- else if (c.value.searchMode === "client" && e !== t) {
707
- const s = ((n = z.value) == null ? void 0 : n.perPage) || 20;
708
- M.value = { page: 1, perPage: s }, _("pagination-change", 1, s);
725
+ if (y.value = e, f.value.searchMode === "server")
726
+ b("search-change", e || "");
727
+ else if (f.value.searchMode === "client" && e !== t) {
728
+ const i = ((n = D.value) == null ? void 0 : n.perPage) || 20;
729
+ w.value = { page: 1, perPage: i }, b("pagination-change", 1, i);
709
730
  }
710
731
  },
711
732
  { immediate: !0 }
712
- ), j(
713
- () => N.value,
733
+ ), F(
734
+ () => x.value,
714
735
  (e) => {
715
- P.value = e;
736
+ S.value = e;
716
737
  }
717
738
  );
718
- const ye = k(() => u.rows.value || []), be = k(() => {
719
- if ((c.value.searchMode || "client") === "server")
720
- return ye.value;
721
- const t = d.search || "";
722
- return ee(ye.value, c.value.search, t);
723
- }), ke = k(() => {
739
+ const Pe = k(() => c.rows.value || []), $e = k(() => {
740
+ if ((f.value.searchMode || "client") === "server")
741
+ return Pe.value;
742
+ const t = g.search || "";
743
+ return te(Pe.value, f.value.search, t);
744
+ }), Le = k(() => {
724
745
  var t;
725
- return (c.value.searchMode || "client") === "client" ? be.value.length : ((t = u.paginationMeta.value) == null ? void 0 : t.total) || 0;
726
- }), Ce = k(() => (c.value.searchMode || "client") === "server" ? be.value : ie(be.value)), Be = k(() => {
727
- if ((c.value.searchMode || "client") === "server")
728
- return Ce.value;
729
- const t = z.value;
746
+ return (f.value.searchMode || "client") === "client" ? $e.value.length : ((t = c.paginationMeta.value) == null ? void 0 : t.total) || 0;
747
+ }), Ne = k(() => (f.value.searchMode || "client") === "server" ? $e.value : oe($e.value)), Fe = k(() => {
748
+ if ((f.value.searchMode || "client") === "server")
749
+ return Ne.value;
750
+ const t = D.value;
730
751
  if (!t || !t.show)
731
- return Ce.value;
732
- const n = t.perPage || 20, i = ((t.currentPage || 1) - 1) * n, y = i + n;
733
- return Ce.value.slice(i, y);
734
- }), z = k(() => {
752
+ return Ne.value;
753
+ const n = t.perPage || 20, r = ((t.currentPage || 1) - 1) * n, v = r + n;
754
+ return Ne.value.slice(r, v);
755
+ }), D = k(() => {
735
756
  var e;
736
- return c.value.searchMode === "server" && u.paginationMeta.value ? {
757
+ return f.value.searchMode === "server" && c.paginationMeta.value ? {
737
758
  show: !0,
738
759
  // Default to showing pagination
739
- ...u.paginationMeta.value,
740
- currentPage: ((e = M.value) == null ? void 0 : e.page) || u.paginationMeta.value.currentPage || 1
741
- } : c.value.paginationMeta;
742
- }), W = k(() => d.loading !== void 0 ? d.loading : u.loading.value), dt = k(() => {
760
+ ...c.paginationMeta.value,
761
+ currentPage: ((e = w.value) == null ? void 0 : e.page) || c.paginationMeta.value.currentPage || 1
762
+ } : f.value.paginationMeta;
763
+ }), U = k(() => g.loading !== void 0 ? g.loading : c.loading.value), _t = k(() => {
743
764
  var e;
744
- return ((e = z.value) == null ? void 0 : e.perPage) === 100;
745
- }), gt = k(() => {
765
+ return ((e = D.value) == null ? void 0 : e.perPage) === 100;
766
+ }), yt = k(() => {
746
767
  var e;
747
- return ((e = z.value) == null ? void 0 : e.perPage) || 10;
748
- }), Ge = k(() => {
749
- const e = z.value;
768
+ return ((e = D.value) == null ? void 0 : e.perPage) || 10;
769
+ }), We = k(() => {
770
+ const e = D.value;
750
771
  if (!e || e.show === !1)
751
772
  return { from: 0, to: 0 };
752
- const t = ke.value, n = e.perPage || 20, s = e.currentPage || 1;
753
- if ((c.value.searchMode || "client") === "server" && e.from !== void 0 && e.to !== void 0)
773
+ const t = Le.value, n = e.perPage || 20, i = e.currentPage || 1;
774
+ if ((f.value.searchMode || "client") === "server" && e.from !== void 0 && e.to !== void 0)
754
775
  return { from: e.from, to: e.to };
755
- const y = (s - 1) * n + 1, R = Math.min(s * n, t);
756
- return t === 0 ? { from: 0, to: 0 } : { from: y, to: R };
757
- }), J = k(() => {
776
+ const v = (i - 1) * n + 1, $ = Math.min(i * n, t);
777
+ return t === 0 ? { from: 0, to: 0 } : { from: v, to: $ };
778
+ }), Y = k(() => {
758
779
  var e;
759
- return ((e = z.value) == null ? void 0 : e.currentPage) || 1;
760
- }), Me = k(() => {
761
- const e = z.value;
780
+ return ((e = D.value) == null ? void 0 : e.currentPage) || 1;
781
+ }), Ae = k(() => {
782
+ const e = D.value;
762
783
  if (!e || e.show === !1) return 1;
763
- const t = ke.value;
784
+ const t = Le.value;
764
785
  if (t === 0) return 1;
765
- const n = e.perPage || 20, s = Math.ceil(t / n);
766
- return Math.max(1, s);
767
- }), Ie = k(() => J.value <= 1), Oe = k(() => J.value >= Me.value), ht = k(() => {
768
- const e = Me.value, t = J.value, n = [];
786
+ const n = e.perPage || 20, i = Math.ceil(t / n);
787
+ return Math.max(1, i);
788
+ }), Ke = k(() => Y.value <= 1), Je = k(() => Y.value >= Ae.value), bt = k(() => {
789
+ const e = Ae.value, t = Y.value, n = [];
769
790
  if (e <= 7)
770
- for (let s = 1; s <= e; s++)
771
- n.push(s);
791
+ for (let i = 1; i <= e; i++)
792
+ n.push(i);
772
793
  else if (t <= 4) {
773
- for (let s = 1; s <= 5; s++)
774
- n.push(s);
794
+ for (let i = 1; i <= 5; i++)
795
+ n.push(i);
775
796
  n.push(-1), n.push(e);
776
797
  } else if (t >= e - 3) {
777
798
  n.push(1), n.push(-1);
778
- for (let s = e - 4; s <= e; s++)
779
- n.push(s);
799
+ for (let i = e - 4; i <= e; i++)
800
+ n.push(i);
780
801
  } else {
781
802
  n.push(1), n.push(-1);
782
- for (let s = t - 1; s <= t + 1; s++)
783
- n.push(s);
803
+ for (let i = t - 1; i <= t + 1; i++)
804
+ n.push(i);
784
805
  n.push(-1), n.push(e);
785
806
  }
786
807
  return n;
787
808
  });
788
- function pt(e) {
809
+ function kt(e) {
789
810
  var n;
790
- if (e < 1 || e > Me.value || e === J.value || W.value) return;
791
- const t = ((n = z.value) == null ? void 0 : n.perPage) || 20;
792
- M.value = { page: e, perPage: t }, _("pagination-change", e, t);
811
+ if (e < 1 || e > Ae.value || e === Y.value || U.value) return;
812
+ const t = ((n = D.value) == null ? void 0 : n.perPage) || 20;
813
+ w.value = { page: e, perPage: t }, b("pagination-change", e, t);
793
814
  }
794
- function mt() {
815
+ function Ct() {
795
816
  var n;
796
- if (Ie.value || W.value) return;
797
- const e = ((n = z.value) == null ? void 0 : n.perPage) || 20, t = J.value - 1;
798
- M.value = { page: t, perPage: e }, _("pagination-change", t, e);
817
+ if (Ke.value || U.value) return;
818
+ const e = ((n = D.value) == null ? void 0 : n.perPage) || 20, t = Y.value - 1;
819
+ w.value = { page: t, perPage: e }, b("pagination-change", t, e);
799
820
  }
800
- function vt() {
821
+ function wt() {
801
822
  var n;
802
- if (Oe.value || W.value) return;
803
- const e = ((n = z.value) == null ? void 0 : n.perPage) || 20, t = J.value + 1;
804
- M.value = { page: t, perPage: e }, _("pagination-change", t, e);
823
+ if (Je.value || U.value) return;
824
+ const e = ((n = D.value) == null ? void 0 : n.perPage) || 20, t = Y.value + 1;
825
+ w.value = { page: t, perPage: e }, b("pagination-change", t, e);
805
826
  }
806
- function _t(e) {
807
- var s;
808
- if (W.value) return;
827
+ function Mt(e) {
828
+ var i;
829
+ if (U.value) return;
809
830
  const t = e.target, n = parseInt(t.value, 10);
810
- n && n !== (((s = z.value) == null ? void 0 : s.perPage) || 20) && (M.value = { page: 1, perPage: n }, _("pagination-change", 1, n));
831
+ n && n !== (((i = D.value) == null ? void 0 : i.perPage) || 20) && (w.value = { page: 1, perPage: n }, b("pagination-change", 1, n));
811
832
  }
812
- const yt = k(() => {
813
- const e = c.value.columns.find((n) => n.smartTrackingColumn);
833
+ const Tt = k(() => {
834
+ const e = f.value.columns.find((n) => n.smartTrackingColumn);
814
835
  if (!(e != null && e.smartTrackingColumn)) return !1;
815
836
  const t = e.smartTrackingColumn.dataKey;
816
- return ye.value.some((n) => {
817
- const s = n[t];
818
- return s === !0 || s === 1 || s === "true" || s === "1";
837
+ return Pe.value.some((n) => {
838
+ const i = n[t];
839
+ return i === !0 || i === 1 || i === "true" || i === "1";
819
840
  });
820
- }), we = k(() => c.value.columns.find((e) => e.smartTrackingColumn)), X = k(() => {
841
+ }), xe = k(() => f.value.columns.find((e) => e.smartTrackingColumn)), ee = k(() => {
821
842
  var n;
822
- const e = w.value.filter((s) => !s.smartTrackingColumn);
823
- if (yt.value && we.value) {
824
- const s = {
843
+ const e = M.value.filter((i) => !i.smartTrackingColumn);
844
+ if (Tt.value && xe.value) {
845
+ const i = {
825
846
  key: "_smart_tracking",
826
847
  label: "",
827
848
  // No label
@@ -831,57 +852,57 @@ const Gn = /* @__PURE__ */ U(En, [["render", Bn]]), In = { class: "shifl-grid re
831
852
  visible: !0,
832
853
  protected: !0,
833
854
  sortable: !1,
834
- width: ((n = we.value.smartTrackingColumn) == null ? void 0 : n.width) || "36px",
835
- smartTrackingColumn: we.value.smartTrackingColumn,
855
+ width: ((n = xe.value.smartTrackingColumn) == null ? void 0 : n.width) || "36px",
856
+ smartTrackingColumn: xe.value.smartTrackingColumn,
836
857
  cellType: "icon"
837
- }, i = e.findIndex((y) => y.key === "ref");
838
- i >= 0 ? e.splice(i, 0, s) : e.unshift(s);
858
+ }, r = e.findIndex((v) => v.key === "ref");
859
+ r >= 0 ? e.splice(r, 0, i) : e.unshift(i);
839
860
  }
840
- const t = e.find((s) => s.key === "ref");
861
+ const t = e.find((i) => i.key === "ref");
841
862
  return t && (t.freeze = !0, t.protected = !0), e;
842
- }), bt = k(() => {
863
+ }), St = k(() => {
843
864
  let e = 0;
844
865
  const t = {};
845
- for (const n of X.value) {
866
+ for (const n of ee.value) {
846
867
  n.freeze && (t[n.key] = e);
847
- const s = parseInt(n.width ?? "160", 10);
848
- Number.isNaN(s) || (e += s);
868
+ const i = parseInt(n.width ?? "160", 10);
869
+ Number.isNaN(i) || (e += i);
849
870
  }
850
871
  return t;
851
- }), Ze = b(0);
852
- function kt(e) {
872
+ }), qe = _(0);
873
+ function Pt(e) {
853
874
  const t = e.target;
854
- Ze.value = t.scrollLeft;
875
+ qe.value = t.scrollLeft;
855
876
  }
856
- function Ct(e) {
857
- const t = S.value.find((n) => n.key === e);
858
- !(t != null && t.sortable) || ue(t) || Ae(t) || he(e);
877
+ function $t(e) {
878
+ const t = T.value.find((n) => n.key === e);
879
+ !(t != null && t.sortable) || he(t) || Ve(t) || ke(e);
859
880
  }
860
- function Se(e, t) {
881
+ function de(e, t) {
861
882
  if (e == null || e === "" || e === void 0)
862
- return te(t.blankStyle);
883
+ return ne(t.blankStyle);
863
884
  const n = t.cellType;
864
885
  if (Array.isArray(n)) {
865
- const s = n.find((i) => typeof i == "string" && i !== "icon");
866
- return s && typeof s == "string" ? Ue(e, s, t) : "";
886
+ const i = n.find((r) => typeof r == "string" && r !== "icon");
887
+ return i && typeof i == "string" ? nt(e, i, t) : "";
867
888
  }
868
889
  if (!n)
869
890
  return typeof e == "object" ? JSON.stringify(e) : String(e);
870
891
  switch (n) {
871
892
  case "number":
872
- return je(e);
893
+ return Ue(e);
873
894
  case "currency":
874
- return Fe(e);
895
+ return Ye(e);
875
896
  case "date":
876
- return Ke(e);
897
+ return Qe(e);
877
898
  case "boolean":
878
- return We(e);
899
+ return Xe(e);
879
900
  case "text":
880
901
  default:
881
902
  return typeof e == "object" ? JSON.stringify(e) : String(e);
882
903
  }
883
904
  }
884
- function te(e) {
905
+ function ne(e) {
885
906
  switch (e) {
886
907
  case "dash":
887
908
  return "--";
@@ -894,13 +915,13 @@ const Gn = /* @__PURE__ */ U(En, [["render", Bn]]), In = { class: "shifl-grid re
894
915
  return "";
895
916
  }
896
917
  }
897
- function je(e) {
918
+ function Ue(e) {
898
919
  if (typeof e == "number")
899
920
  return e.toLocaleString();
900
921
  const t = Number(e);
901
922
  return Number.isNaN(t) ? String(e) : t.toLocaleString();
902
923
  }
903
- function Fe(e) {
924
+ function Ye(e) {
904
925
  if (typeof e == "number")
905
926
  return new Intl.NumberFormat("en-US", {
906
927
  style: "currency",
@@ -912,7 +933,7 @@ const Gn = /* @__PURE__ */ U(En, [["render", Bn]]), In = { class: "shifl-grid re
912
933
  currency: "USD"
913
934
  }).format(t);
914
935
  }
915
- function Ke(e) {
936
+ function Qe(e) {
916
937
  if (e instanceof Date)
917
938
  return e.toLocaleDateString();
918
939
  if (typeof e == "string") {
@@ -922,57 +943,57 @@ const Gn = /* @__PURE__ */ U(En, [["render", Bn]]), In = { class: "shifl-grid re
922
943
  }
923
944
  return String(e);
924
945
  }
925
- function We(e) {
946
+ function Xe(e) {
926
947
  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);
927
948
  }
928
- function Mt(e) {
949
+ function Lt(e) {
929
950
  if (typeof e == "number")
930
951
  return Math.min(100, Math.max(0, e));
931
952
  const t = Number(e);
932
953
  return Number.isNaN(t) ? 0 : Math.min(100, Math.max(0, t));
933
954
  }
934
- function Je(e) {
935
- return typeof e == "string" && e.toLowerCase() === "ocean", lt;
955
+ function et(e) {
956
+ return typeof e == "string" && e.toLowerCase() === "ocean", ht;
936
957
  }
937
- function wt(e) {
958
+ function Nt(e) {
938
959
  const t = e.toLowerCase();
939
960
  return ["supplier", "suppliers", "po", "pos", "product_description"].includes(t);
940
961
  }
941
- function qe(e) {
962
+ function tt(e) {
942
963
  if (e.cellType === "badge") return !0;
943
964
  const t = e.key.toLowerCase();
944
965
  return t === "tag" || t === "tags";
945
966
  }
946
- function St(e) {
967
+ function At(e) {
947
968
  return e.cellType === "status" ? !0 : e.key.toLowerCase() === "status";
948
969
  }
949
- function Tt(e) {
970
+ function xt(e) {
950
971
  return e.cellType === "icon" ? !0 : e.key.toLowerCase() === "type";
951
972
  }
952
- function Pt(e) {
973
+ function Ht(e) {
953
974
  return Array.isArray(e.cellType) && e.cellType.length > 0;
954
975
  }
955
- function $t(e) {
976
+ function Et(e) {
956
977
  return Array.isArray(e.cellType) ? e.cellType.filter((t) => typeof t == "string") : e.cellType && typeof e.cellType == "string" ? [e.cellType] : [];
957
978
  }
958
- function Ue(e, t, n) {
979
+ function nt(e, t, n) {
959
980
  if (e == null || e === "" || e === void 0)
960
- return te(n.blankStyle);
981
+ return ne(n.blankStyle);
961
982
  switch (t) {
962
983
  case "number":
963
- return je(e);
984
+ return Ue(e);
964
985
  case "currency":
965
- return Fe(e);
986
+ return Ye(e);
966
987
  case "date":
967
- return Ke(e);
988
+ return Qe(e);
968
989
  case "boolean":
969
- return We(e);
990
+ return Xe(e);
970
991
  case "text":
971
992
  default:
972
993
  return typeof e == "object" ? JSON.stringify(e) : String(e);
973
994
  }
974
995
  }
975
- function Lt(e) {
996
+ function Rt(e) {
976
997
  return {
977
998
  number: "shifl-grid__composite-number",
978
999
  currency: "shifl-grid__composite-currency",
@@ -981,66 +1002,85 @@ const Gn = /* @__PURE__ */ U(En, [["render", Bn]]), In = { class: "shifl-grid re
981
1002
  text: "shifl-grid__composite-text"
982
1003
  }[e] || "shifl-grid__composite-text";
983
1004
  }
984
- function At(e, t) {
1005
+ function zt(e, t) {
985
1006
  if (e == null || e === "")
986
- return te(t.blankStyle);
1007
+ return ne(t.blankStyle);
987
1008
  if (Array.isArray(e)) {
988
1009
  if (e.length === 0)
989
- return te(t.blankStyle);
1010
+ return ne(t.blankStyle);
990
1011
  const n = e.join(", ");
991
- return Ye(n, 45);
1012
+ return rt(n, 45);
992
1013
  }
993
- return typeof e == "string" ? Ye(e, 45) : String(e);
1014
+ return typeof e == "string" ? rt(e, 45) : String(e);
994
1015
  }
995
- function Ye(e, t) {
1016
+ function rt(e, t) {
996
1017
  return e.length <= t ? e : e.substring(0, t) + "...";
997
1018
  }
998
- function Te(e) {
1019
+ function He(e) {
999
1020
  const t = e.toLowerCase();
1000
1021
  return ["po", "pos", "supplier", "suppliers", "tag", "tags"].includes(t);
1001
1022
  }
1002
- function Nt(e, t) {
1003
- return e == null || Te(t) ? !1 : Array.isArray(e) ? e.length === 0 ? !1 : e.join(", ").length > 30 : typeof e == "string" ? e.length > 30 : !1;
1023
+ function Dt(e, t) {
1024
+ return e == null || He(t) ? !1 : Array.isArray(e) ? e.length === 0 ? !1 : e.join(", ").length > 30 : typeof e == "string" ? e.length > 30 : !1;
1004
1025
  }
1005
- function xt(e) {
1026
+ function Vt(e) {
1006
1027
  return e == null ? !1 : Array.isArray(e) ? e.length === 0 ? !1 : e.join(", ").length > 45 : typeof e == "string" ? e.length > 45 : !1;
1007
1028
  }
1008
- function Rt(e) {
1029
+ function Bt(e) {
1009
1030
  if (e == null) return 0;
1010
1031
  if (Array.isArray(e)) {
1011
1032
  if (e.length === 0 || e.join(", ").length <= 45) return 0;
1012
- let n = 0, s = 0;
1013
- for (let i = 0; i < e.length; i++) {
1014
- const y = String(e[i]), B = (i > 0 ? ", " : "").length + y.length;
1015
- if (n + B <= 45)
1016
- n += B, s++;
1033
+ let n = 0, i = 0;
1034
+ for (let r = 0; r < e.length; r++) {
1035
+ const v = String(e[r]), E = (r > 0 ? ", " : "").length + v.length;
1036
+ if (n + E <= 45)
1037
+ n += E, i++;
1017
1038
  else
1018
1039
  break;
1019
1040
  }
1020
- return e.length - s;
1041
+ return e.length - i;
1021
1042
  }
1022
1043
  return typeof e == "string" && e.length > 45 ? 1 : 0;
1023
1044
  }
1024
- function Pe(e, t, n, s) {
1025
- let i = "", y = !1;
1026
- const R = X.value.find((B) => B.key === e);
1027
- if (R && qe(R)) {
1028
- const B = Qe(n);
1029
- B.length > 0 && (y = !0, i = B.map((F) => `<span class="shifl-grid__tooltip-badge" style="border-left-color: ${tt(F)} !important">${F.name}</span>`).join(""));
1030
- } else Array.isArray(n) ? n.length > 0 && (i = n.join(`
1031
- `)) : n != null && (i = String(n));
1032
- Ve.value = i, _e.value = y, ve.value = s, me.value = !0;
1045
+ function Ee(e, t, n, i) {
1046
+ let r = "", v = !1;
1047
+ const $ = ee.value.find((E) => E.key === e);
1048
+ if ($ && tt($)) {
1049
+ const E = st(n);
1050
+ E.length > 0 && (v = !0, r = E.map((W) => `<span class="shifl-grid__tooltip-badge" style="border-left-color: ${at(W)} !important">${W.name}</span>`).join(""));
1051
+ } else Array.isArray(n) ? n.length > 0 && (r = n.join(`
1052
+ `)) : n != null && (r = String(n));
1053
+ je.value = r, Te.value = v, Me.value = i, we.value = !0;
1054
+ }
1055
+ function Re() {
1056
+ we.value = !1, Me.value = null, Te.value = !1;
1033
1057
  }
1034
- function $e() {
1035
- me.value = !1, ve.value = null, _e.value = !1;
1058
+ function It(e, t) {
1059
+ ce.value = "Copy To Clipboard", fe.value = t, ue.value = !0, q();
1060
+ }
1061
+ function ze() {
1062
+ ue.value = !1, fe.value = null;
1063
+ }
1064
+ async function Zt(e) {
1065
+ try {
1066
+ await navigator.clipboard.writeText(e), ce.value = "Copied!", setTimeout(() => {
1067
+ ze();
1068
+ }, 2e3);
1069
+ } catch (t) {
1070
+ console.error("Failed to copy text: ", t);
1071
+ const n = document.createElement("textarea");
1072
+ n.value = e, document.body.appendChild(n), n.select(), document.execCommand("copy"), document.body.removeChild(n), ce.value = "Copied!", setTimeout(() => {
1073
+ ze();
1074
+ }, 2e3);
1075
+ }
1036
1076
  }
1037
- function Ht(e, t, n) {
1038
- n && (ft.value[`${e}-${t}`] = n);
1077
+ function Ot(e, t, n) {
1078
+ n && (vt.value[`${e}-${t}`] = n);
1039
1079
  }
1040
- function le(e) {
1080
+ function ge(e) {
1041
1081
  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)];
1042
1082
  }
1043
- function Qe(e) {
1083
+ function st(e) {
1044
1084
  return e == null ? [] : Array.isArray(e) ? e.map((t) => typeof t == "object" && t !== null && "name" in t ? {
1045
1085
  name: String(t.name),
1046
1086
  color: "color" in t ? String(t.color) : void 0
@@ -1049,49 +1089,49 @@ const Gn = /* @__PURE__ */ U(En, [["render", Bn]]), In = { class: "shifl-grid re
1049
1089
  color: void 0
1050
1090
  }).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 }];
1051
1091
  }
1052
- function Xe(e, t, n) {
1053
- const s = le(e);
1054
- if (s.length === 0) return [];
1055
- const i = `${t}-${n}`;
1056
- if (Q.value[i])
1057
- return Q.value[i];
1058
- const y = 130, R = 8, B = 4;
1059
- let F = 0;
1060
- const O = [];
1061
- for (const ne of s) {
1062
- const re = ne.length * 8 + R + B;
1063
- if (F + re > y && O.length > 0)
1092
+ function it(e, t, n) {
1093
+ const i = ge(e);
1094
+ if (i.length === 0) return [];
1095
+ const r = `${t}-${n}`;
1096
+ if (X.value[r])
1097
+ return X.value[r];
1098
+ const v = 130, $ = 8, E = 4;
1099
+ let W = 0;
1100
+ const G = [];
1101
+ for (const re of i) {
1102
+ const se = re.length * 8 + $ + E;
1103
+ if (W + se > v && G.length > 0)
1064
1104
  break;
1065
- O.push(ne), F += re;
1105
+ G.push(re), W += se;
1066
1106
  }
1067
- return Q.value[i] = O, O;
1068
- }
1069
- function et(e, t, n) {
1070
- const s = Qe(e);
1071
- if (s.length === 0) return [];
1072
- const i = `${t}-${n}-objects`;
1073
- if (Q.value[i])
1074
- return Q.value[i];
1075
- const y = 130, R = 8, B = 4;
1076
- let F = 0;
1077
- const O = [];
1078
- for (const ne of s) {
1079
- const re = ne.name.length * 8 + R + B;
1080
- if (F + re > y && O.length > 0)
1107
+ return X.value[r] = G, G;
1108
+ }
1109
+ function ot(e, t, n) {
1110
+ const i = st(e);
1111
+ if (i.length === 0) return [];
1112
+ const r = `${t}-${n}-objects`;
1113
+ if (X.value[r])
1114
+ return X.value[r];
1115
+ const v = 130, $ = 8, E = 4;
1116
+ let W = 0;
1117
+ const G = [];
1118
+ for (const re of i) {
1119
+ const se = re.name.length * 8 + $ + E;
1120
+ if (W + se > v && G.length > 0)
1081
1121
  break;
1082
- O.push(ne), F += re;
1122
+ G.push(re), W += se;
1083
1123
  }
1084
- return Q.value[i] = O, O;
1124
+ return X.value[r] = G, G;
1085
1125
  }
1086
- function zt(e, t, n) {
1087
- const s = le(e), i = Xe(e, t, n);
1088
- return s.length > i.length;
1126
+ function Gt(e, t, n) {
1127
+ const i = ge(e), r = it(e, t, n);
1128
+ return i.length > r.length;
1089
1129
  }
1090
- function Dt(e, t, n) {
1091
- const s = le(e), i = Xe(e, t, n);
1092
- return s.length - i.length;
1130
+ function jt(e, t, n) {
1131
+ const i = ge(e), r = it(e, t, n);
1132
+ return i.length - r.length;
1093
1133
  }
1094
- function Et(e) {
1134
+ function Ft(e) {
1095
1135
  const t = e.toLowerCase(), n = {
1096
1136
  "high priority": "var(--shifl-color-error-r70)",
1097
1137
  express: "var(--shifl-color-primary-b80)",
@@ -1106,18 +1146,18 @@ const Gn = /* @__PURE__ */ U(En, [["render", Bn]]), In = { class: "shifl-grid re
1106
1146
  };
1107
1147
  if (n[t])
1108
1148
  return n[t];
1109
- for (const [s, i] of Object.entries(n))
1110
- if (t.includes(s) || s.includes(t))
1111
- return i;
1112
- return Vt(e);
1149
+ for (const [i, r] of Object.entries(n))
1150
+ if (t.includes(i) || i.includes(t))
1151
+ return r;
1152
+ return Wt(e);
1113
1153
  }
1114
- function tt(e) {
1115
- return e.color && e.color !== "" ? e.color : Et(e.name);
1154
+ function at(e) {
1155
+ return e.color && e.color !== "" ? e.color : Ft(e.name);
1116
1156
  }
1117
- function Vt(e) {
1157
+ function Wt(e) {
1118
1158
  let t = 0;
1119
- for (let s = 0; s < e.length; s++)
1120
- t = e.charCodeAt(s) + ((t << 5) - t);
1159
+ for (let i = 0; i < e.length; i++)
1160
+ t = e.charCodeAt(i) + ((t << 5) - t);
1121
1161
  const n = [
1122
1162
  "var(--shifl-color-primary-b80)",
1123
1163
  "var(--shifl-color-success-g70)",
@@ -1130,88 +1170,91 @@ const Gn = /* @__PURE__ */ U(En, [["render", Bn]]), In = { class: "shifl-grid re
1130
1170
  ];
1131
1171
  return n[Math.abs(t) % n.length];
1132
1172
  }
1133
- function Le(e, t = !0) {
1134
- const s = { ...{
1173
+ function De(e, t = !0) {
1174
+ const i = { ...{
1135
1175
  width: e.width ?? "160px",
1136
1176
  minWidth: e.width ?? "160px"
1137
- } }, i = Ze.value > 0;
1177
+ } }, r = qe.value > 0;
1138
1178
  if (e.freeze) {
1139
- const y = bt.value[e.key] ?? 0;
1140
- s.position = "sticky", s.left = `${y}px`, s.background = "#ffffff", s.boxShadow = i ? "2px 0 6px rgba(0, 0, 0, 0.12)" : "none", s.zIndex = t ? 40 : 10;
1179
+ const v = St.value[e.key] ?? 0;
1180
+ 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;
1141
1181
  }
1142
- return t && (s.position = "sticky", s.top = "0px"), s;
1182
+ return t && (i.position = "sticky", i.top = "0px"), i;
1143
1183
  }
1144
- const Bt = k(() => S.value.filter((e) => !e.smartTrackingColumn));
1145
- function ue(e) {
1184
+ const Kt = k(() => T.value.filter((e) => !e.smartTrackingColumn));
1185
+ function he(e) {
1146
1186
  return !!e.actionColumn;
1147
1187
  }
1148
- function Ae(e) {
1188
+ function Ve(e) {
1149
1189
  return !!e.smartTrackingColumn;
1150
1190
  }
1151
- function Gt(e, t) {
1191
+ function Jt(e) {
1192
+ return e.key === "ref";
1193
+ }
1194
+ function qt(e, t) {
1152
1195
  if (!e.smartTrackingColumn) return !1;
1153
- const n = e.smartTrackingColumn.dataKey, s = t[n];
1154
- if (s === !0 || s === 1) return !0;
1155
- if (typeof s == "string") {
1156
- const i = s.toLowerCase().trim();
1157
- return i === "true" || i === "1" || i === "yes";
1196
+ const n = e.smartTrackingColumn.dataKey, i = t[n];
1197
+ if (i === !0 || i === 1) return !0;
1198
+ if (typeof i == "string") {
1199
+ const r = i.toLowerCase().trim();
1200
+ return r === "true" || r === "1" || r === "yes";
1158
1201
  }
1159
1202
  return !1;
1160
1203
  }
1161
- function ce(e, t) {
1204
+ function pe(e, t) {
1162
1205
  if (!e.actionColumn) return null;
1163
1206
  const n = e.actionColumn.icon;
1164
1207
  return n ? typeof n == "function" ? n(t) : n : null;
1165
1208
  }
1166
- function It(e, t, n, s) {
1209
+ function Ut(e, t, n, i) {
1167
1210
  if (!n.actionColumn) return;
1168
- const i = s.currentTarget;
1169
- if (H.value.rowIndex === e) {
1170
- Y();
1211
+ const r = i.currentTarget;
1212
+ if (z.value.rowIndex === e) {
1213
+ Q();
1171
1214
  return;
1172
1215
  }
1173
- Ee.value = n, pe.value = t, ae(e, i);
1216
+ Ge.value = n, Ce.value = t, ae(e, r);
1174
1217
  }
1175
- function Ot(e, t) {
1176
- return !(e != null && e.actionColumn) || !t ? [] : (typeof e.actionColumn.actions == "function" ? e.actionColumn.actions(t) : e.actionColumn.actions).filter((s) => s.show ? s.show(t) : !0);
1218
+ function Yt(e, t) {
1219
+ 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);
1177
1220
  }
1178
- function Zt(e, t, n) {
1179
- _("action-click", e.key, t, n), Y();
1221
+ function Qt(e, t, n) {
1222
+ b("action-click", e.key, t, n), Q();
1180
1223
  }
1181
- function jt(e, t) {
1182
- t && (oe.value[e] = t);
1224
+ function Xt(e, t) {
1225
+ t && (le.value[e] = t);
1183
1226
  }
1184
- function nt(e) {
1185
- if (H.value.rowIndex === null) return;
1186
- const t = e.target, n = De.value, s = Object.values(oe.value), i = n == null ? void 0 : n.contains(t), y = s.some((R) => R.contains(t));
1187
- !i && !y && Y();
1227
+ function lt(e) {
1228
+ if (z.value.rowIndex === null) return;
1229
+ const t = e.target, n = Oe.value, i = Object.values(le.value), r = n == null ? void 0 : n.contains(t), v = i.some(($) => $.contains(t));
1230
+ !r && !v && Q();
1188
1231
  }
1189
- return de(() => {
1190
- document.addEventListener("click", nt);
1191
- }), ge(() => {
1192
- document.removeEventListener("click", nt);
1193
- }), (e, t) => (o(), l("div", In, [
1194
- g("div", On, [
1195
- g("button", {
1232
+ return ye(() => {
1233
+ document.addEventListener("click", lt), document.addEventListener("scroll", q), window.addEventListener("scroll", q), window.addEventListener("resize", q);
1234
+ }), be(() => {
1235
+ document.removeEventListener("click", lt), document.removeEventListener("scroll", q), window.removeEventListener("scroll", q), window.removeEventListener("resize", q);
1236
+ }), (e, t) => (a(), l("div", er, [
1237
+ d("div", tr, [
1238
+ d("button", {
1196
1239
  type: "button",
1197
1240
  class: "shifl-grid__pill-button whitespace-nowrap",
1198
- onClick: t[0] || (t[0] = (n) => I.value = !0)
1241
+ onClick: t[0] || (t[0] = (n) => O.value = !0)
1199
1242
  }, " Edit Column ")
1200
1243
  ]),
1201
- g("div", {
1202
- class: G(["shifl-grid__viewport", { "shifl-grid__viewport--scroll": dt.value }]),
1203
- onScroll: kt
1244
+ d("div", {
1245
+ class: Z(["shifl-grid__viewport", { "shifl-grid__viewport--scroll": _t.value }]),
1246
+ onScroll: Pt
1204
1247
  }, [
1205
- g("table", Zn, [
1206
- g("thead", null, [
1207
- g("tr", null, [
1208
- (o(!0), l(x, null, V(X.value, (n) => {
1209
- var s;
1210
- return o(), l("th", {
1248
+ d("table", nr, [
1249
+ d("thead", null, [
1250
+ d("tr", null, [
1251
+ (a(!0), l(H, null, B(ee.value, (n) => {
1252
+ var i;
1253
+ return a(), l("th", {
1211
1254
  key: n.key,
1212
- style: K(Le(n, !0)),
1213
- onClick: () => Ct(n.key),
1214
- class: G([
1255
+ style: j(De(n, !0)),
1256
+ onClick: () => $t(n.key),
1257
+ class: Z([
1215
1258
  "shifl-grid__header-cell",
1216
1259
  `shifl-grid__header-align-${n != null && n.align ? n.align : "left"}`,
1217
1260
  {
@@ -1221,163 +1264,178 @@ const Gn = /* @__PURE__ */ U(En, [["render", Bn]]), In = { class: "shifl-grid re
1221
1264
  }
1222
1265
  ])
1223
1266
  }, [
1224
- g("div", Fn, [
1225
- n.label ? (o(), l("span", Kn, $(n.label), 1)) : D("", !0),
1226
- ((s = E(N)) == null ? void 0 : s.key) === n.key && !ue(n) && !Ae(n) ? (o(), l("span", Wn, [
1227
- E(N).order === "asc" ? (o(), Z(Ln, { key: 0 })) : (o(), Z(Rn, { key: 1 }))
1228
- ])) : D("", !0)
1267
+ d("div", sr, [
1268
+ n.label ? (a(), l("span", ir, L(n.label), 1)) : R("", !0),
1269
+ ((i = V(x)) == null ? void 0 : i.key) === n.key && !he(n) && !Ve(n) ? (a(), l("span", or, [
1270
+ V(x).order === "asc" ? (a(), I(Vn, { key: 0 })) : (a(), I(On, { key: 1 }))
1271
+ ])) : R("", !0)
1229
1272
  ])
1230
- ], 14, jn);
1273
+ ], 14, rr);
1231
1274
  }), 128))
1232
1275
  ])
1233
1276
  ]),
1234
- g("tbody", null, [
1235
- W.value ? (o(!0), l(x, { key: 0 }, V(gt.value, (n) => (o(), l("tr", {
1277
+ d("tbody", null, [
1278
+ U.value ? (a(!0), l(H, { key: 0 }, B(yt.value, (n) => (a(), l("tr", {
1236
1279
  key: `skeleton-${n}`,
1237
1280
  class: "shifl-grid__skeleton-row"
1238
1281
  }, [
1239
- (o(!0), l(x, null, V(X.value, (s) => (o(), l("td", {
1240
- key: s.key,
1241
- style: K(Le(s, !1)),
1242
- class: G({ "shifl-grid__cell--sticky": s.freeze })
1282
+ (a(!0), l(H, null, B(ee.value, (i) => (a(), l("td", {
1283
+ key: i.key,
1284
+ style: j(De(i, !1)),
1285
+ class: Z({ "shifl-grid__cell--sticky": i.freeze })
1243
1286
  }, [...t[6] || (t[6] = [
1244
- g("div", { class: "shifl-grid__skeleton-cell" }, null, -1)
1287
+ d("div", { class: "shifl-grid__skeleton-cell" }, null, -1)
1245
1288
  ])], 6))), 128))
1246
- ]))), 128)) : (o(), l(x, { key: 1 }, [
1247
- Be.value.length ? D("", !0) : (o(), l("tr", Jn, [
1248
- g("td", {
1249
- colspan: X.value.length,
1289
+ ]))), 128)) : (a(), l(H, { key: 1 }, [
1290
+ Fe.value.length ? R("", !0) : (a(), l("tr", ar, [
1291
+ d("td", {
1292
+ colspan: ee.value.length,
1250
1293
  class: "text-center text-gray-500 py-6"
1251
- }, " No data ", 8, qn)
1294
+ }, " No data ", 8, lr)
1252
1295
  ])),
1253
- (o(!0), l(x, null, V(Be.value, (n, s) => (o(), l("tr", { key: s }, [
1254
- (o(!0), l(x, null, V(X.value, (i) => (o(), l("td", {
1255
- key: i.key,
1256
- style: K(Le(i, !1)),
1257
- class: G([
1258
- { "shifl-grid__cell--sticky": i.freeze },
1259
- { "shifl-grid__cell--action": ue(i) },
1260
- `shifl-grid__cell-align-${i != null && i.align ? i.align : "left"}`,
1261
- { "shifl-grid__icon": i.cellType === "icon" }
1296
+ (a(!0), l(H, null, B(Fe.value, (n, i) => (a(), l("tr", { key: i }, [
1297
+ (a(!0), l(H, null, B(ee.value, (r) => (a(), l("td", {
1298
+ key: r.key,
1299
+ style: j(De(r, !1)),
1300
+ class: Z([
1301
+ { "shifl-grid__cell--sticky": r.freeze },
1302
+ { "shifl-grid__cell--action": he(r) },
1303
+ `shifl-grid__cell-align-${r != null && r.align ? r.align : "left"}`,
1304
+ { "shifl-grid__icon": r.cellType === "icon" }
1262
1305
  ])
1263
1306
  }, [
1264
- Ae(i) ? (o(), l(x, { key: 0 }, [
1265
- Gt(i, n) ? (o(), l("div", Un, [
1266
- Ne(Sn)
1267
- ])) : D("", !0)
1268
- ], 64)) : ue(i) ? (o(), l("button", {
1307
+ Ve(r) ? (a(), l(H, { key: 0 }, [
1308
+ qt(r, n) ? (a(), l("div", ur, [
1309
+ me(En)
1310
+ ])) : R("", !0)
1311
+ ], 64)) : he(r) ? (a(), l("button", {
1269
1312
  key: 1,
1270
1313
  type: "button",
1271
1314
  class: "shifl-grid__action-icon",
1272
1315
  ref_for: !0,
1273
- ref: (y) => jt(s, y),
1274
- onClick: q((y) => It(s, n, i, y), ["stop"])
1316
+ ref: (v) => Xt(i, v),
1317
+ onClick: K((v) => Ut(i, n, r, v), ["stop"])
1275
1318
  }, [
1276
- ce(i, n) ? typeof ce(i, n) == "string" ? (o(), l("span", {
1319
+ pe(r, n) ? typeof pe(r, n) == "string" ? (a(), l("span", {
1277
1320
  key: 1,
1278
- innerHTML: ce(i, n),
1321
+ innerHTML: pe(r, n),
1279
1322
  class: "w-4 h-4 inline-block"
1280
- }, null, 8, Xn)) : (o(), Z(fe(ce(i, n)), {
1323
+ }, null, 8, dr)) : (a(), I(ve(pe(r, n)), {
1281
1324
  key: 2,
1282
1325
  class: "w-4 h-4"
1283
- })) : (o(), l("span", Qn, "⋯"))
1284
- ], 8, Yn)) : Pt(i) ? (o(), l("div", er, [
1285
- (o(!0), l(x, null, V($t(i), (y, R) => (o(), l(x, { key: R }, [
1286
- y === "icon" ? (o(), Z(fe(Je(n[i.key])), {
1326
+ })) : (a(), l("span", fr, "⋯"))
1327
+ ], 8, cr)) : Ht(r) ? (a(), l("div", gr, [
1328
+ (a(!0), l(H, null, B(Et(r), (v, $) => (a(), l(H, { key: $ }, [
1329
+ v === "icon" ? (a(), I(ve(et(n[r.key])), {
1287
1330
  key: 0,
1288
1331
  class: "shifl-grid__type-icon"
1289
- })) : (o(), l("span", {
1332
+ })) : (a(), l("span", {
1290
1333
  key: 1,
1291
- class: G(Lt(y))
1292
- }, $(Ue(n[i.key], y, i)), 3))
1334
+ class: Z(Rt(v))
1335
+ }, L(nt(n[r.key], v, r)), 3))
1293
1336
  ], 64))), 128))
1294
- ])) : Tt(i) ? (o(), l("div", tr, [
1295
- (o(), Z(fe(Je(n[i.key])), { class: "shifl-grid__type-icon" })),
1296
- n.container_count != null ? (o(), l("span", nr, " (" + $(n.container_count) + ") ", 1)) : D("", !0)
1297
- ])) : qe(i) ? (o(), l(x, { key: 4 }, [
1298
- n[i.key] == null || et(n[i.key], i.key, s).length === 0 ? (o(), l("div", rr, $(te(i.blankStyle)), 1)) : (o(), l("div", sr, [
1299
- g("div", ir, [
1300
- g("div", {
1337
+ ])) : xt(r) ? (a(), l("div", hr, [
1338
+ (a(), I(ve(et(n[r.key])), { class: "shifl-grid__type-icon" })),
1339
+ n.container_count != null ? (a(), l("span", pr, " (" + L(n.container_count) + ") ", 1)) : R("", !0)
1340
+ ])) : tt(r) ? (a(), l(H, { key: 4 }, [
1341
+ n[r.key] == null || ot(n[r.key], r.key, i).length === 0 ? (a(), l("div", mr, L(ne(r.blankStyle)), 1)) : (a(), l("div", vr, [
1342
+ d("div", _r, [
1343
+ d("div", {
1301
1344
  ref_for: !0,
1302
1345
  ref: "(el) => setTagsRef(col.key, rowIndex, el as HTMLElement)",
1303
1346
  class: "shifl-grid__chips-container shifl-grid__chips-container--single-line"
1304
1347
  }, [
1305
- (o(!0), l(x, null, V(et(
1306
- n[i.key],
1307
- i.key,
1308
- s
1309
- ), (y, R) => (o(), l("span", {
1310
- key: R,
1348
+ (a(!0), l(H, null, B(ot(
1349
+ n[r.key],
1350
+ r.key,
1351
+ i
1352
+ ), (v, $) => (a(), l("span", {
1353
+ key: $,
1311
1354
  class: "shifl-grid__chip shifl-grid__chip--tag",
1312
- style: K({ borderLeftColor: tt(y) })
1313
- }, $(y.name), 5))), 128))
1355
+ style: j({ borderLeftColor: at(v) })
1356
+ }, L(v.name), 5))), 128))
1314
1357
  ], 512)
1315
1358
  ]),
1316
- zt(n[i.key], i.key, s) ? (o(), l("button", {
1359
+ Gt(n[r.key], r.key, i) ? (a(), l("button", {
1317
1360
  key: 0,
1318
1361
  type: "button",
1319
1362
  class: "shifl-grid__counter-button",
1320
- onMouseenter: (y) => Pe(
1321
- i.key,
1322
- s,
1323
- n[i.key],
1324
- y.currentTarget
1363
+ onMouseenter: (v) => Ee(
1364
+ r.key,
1365
+ i,
1366
+ n[r.key],
1367
+ v.currentTarget
1325
1368
  ),
1326
- onMouseleave: $e
1327
- }, " +" + $(Dt(n[i.key], i.key, s)), 41, ar)) : D("", !0)
1369
+ onMouseleave: Re
1370
+ }, " +" + L(jt(n[r.key], r.key, i)), 41, yr)) : R("", !0)
1328
1371
  ]))
1329
- ], 64)) : St(i) ? (o(), l("div", or, [
1330
- (o(!0), l(x, null, V(le(n[i.key]), (y, R) => (o(), l("span", {
1331
- key: R,
1372
+ ], 64)) : At(r) ? (a(), l("div", br, [
1373
+ (a(!0), l(H, null, B(ge(n[r.key]), (v, $) => (a(), l("span", {
1374
+ key: $,
1332
1375
  class: "shifl-grid__chip shifl-grid__chip--status"
1333
- }, $(y), 1))), 128))
1334
- ])) : i.truncate !== !1 && (i.truncate === !0 || wt(i.key)) ? (o(), l("div", lr, [
1335
- g("span", {
1376
+ }, L(v), 1))), 128))
1377
+ ])) : r.truncate !== !1 && (r.truncate === !0 || Nt(r.key)) ? (a(), l("div", kr, [
1378
+ d("span", {
1336
1379
  class: "shifl-grid__truncated-text",
1337
1380
  ref_for: !0,
1338
- ref: (y) => Ht(i.key, s, y)
1339
- }, $(At(n[i.key], i)), 513),
1340
- Te(i.key) && xt(n[i.key]) ? (o(), l("button", {
1381
+ ref: (v) => Ot(r.key, i, v)
1382
+ }, L(zt(n[r.key], r)), 513),
1383
+ He(r.key) && Vt(n[r.key]) ? (a(), l("button", {
1341
1384
  key: 0,
1342
1385
  type: "button",
1343
1386
  class: "shifl-grid__counter-button",
1344
- onMouseenter: (y) => Pe(
1345
- i.key,
1346
- s,
1347
- n[i.key],
1348
- y.currentTarget
1387
+ onMouseenter: (v) => Ee(
1388
+ r.key,
1389
+ i,
1390
+ n[r.key],
1391
+ v.currentTarget
1349
1392
  ),
1350
- onMouseleave: $e
1351
- }, " +" + $(Rt(n[i.key])), 41, ur)) : !Te(i.key) && Nt(n[i.key], i.key) ? (o(), l("button", {
1393
+ onMouseleave: Re
1394
+ }, " +" + L(Bt(n[r.key])), 41, Cr)) : !He(r.key) && Dt(n[r.key], r.key) ? (a(), l("button", {
1352
1395
  key: 1,
1353
1396
  type: "button",
1354
1397
  class: "shifl-grid__info-icon-button",
1355
- onMouseenter: (y) => Pe(
1356
- i.key,
1357
- s,
1358
- n[i.key],
1359
- y.currentTarget
1398
+ onMouseenter: (v) => Ee(
1399
+ r.key,
1400
+ i,
1401
+ n[r.key],
1402
+ v.currentTarget
1360
1403
  ),
1361
- onMouseleave: $e
1404
+ onMouseleave: Re
1362
1405
  }, [
1363
- Ne(Gn)
1364
- ], 40, cr)) : D("", !0)
1365
- ])) : i.cellType === "link" ? (o(), l("a", {
1406
+ me(qn)
1407
+ ], 40, wr)) : R("", !0)
1408
+ ])) : r.cellType === "link" ? (a(), l("a", {
1366
1409
  key: 7,
1367
- href: String(n[i.key] || ""),
1410
+ href: String(n[r.key] || ""),
1368
1411
  class: "shifl-grid__link-cell",
1369
- onClick: t[1] || (t[1] = q(() => {
1412
+ onClick: t[1] || (t[1] = K(() => {
1370
1413
  }, ["stop"]))
1371
- }, $(Se(n[i.key], i)), 9, fr)) : i.cellType === "progress" ? (o(), l("div", dr, [
1372
- g("div", gr, [
1373
- g("div", {
1414
+ }, L(de(n[r.key], r)), 9, Mr)) : r.cellType === "progress" ? (a(), l("div", Tr, [
1415
+ d("div", Sr, [
1416
+ d("div", {
1374
1417
  class: "shifl-grid__progress-fill",
1375
- style: K({ width: `${Mt(n[i.key])}%` })
1418
+ style: j({ width: `${Lt(n[r.key])}%` })
1376
1419
  }, null, 4)
1377
1420
  ]),
1378
- g("span", hr, $(Se(n[i.key], i)), 1)
1379
- ])) : (o(), l(x, { key: 9 }, [
1380
- se($(Se(n[i.key], i)), 1)
1421
+ d("span", Pr, L(de(n[r.key], r)), 1)
1422
+ ])) : Jt(r) ? (a(), l("div", {
1423
+ key: 9,
1424
+ class: "shifl-grid__reference-cell",
1425
+ onMouseenter: (v) => It(String(n[r.key] || ""), v.currentTarget),
1426
+ onMouseleave: ze
1427
+ }, [
1428
+ d("span", Lr, L(de(n[r.key], r)), 1),
1429
+ n[r.key] ? (a(), l("button", {
1430
+ key: 0,
1431
+ class: "shifl-grid__copy-icon",
1432
+ onClick: K(() => Zt(String(n[r.key] || "")), ["stop"]),
1433
+ type: "button"
1434
+ }, [
1435
+ me(Xn)
1436
+ ], 8, Nr)) : R("", !0)
1437
+ ], 40, $r)) : (a(), l(H, { key: 10 }, [
1438
+ ie(L(de(n[r.key], r)), 1)
1381
1439
  ], 64))
1382
1440
  ], 6))), 128))
1383
1441
  ]))), 128))
@@ -1385,130 +1443,145 @@ const Gn = /* @__PURE__ */ U(En, [["render", Bn]]), In = { class: "shifl-grid re
1385
1443
  ])
1386
1444
  ])
1387
1445
  ], 34),
1388
- z.value && z.value.show !== !1 ? (o(), l("div", pr, [
1389
- g("div", mr, [
1390
- g("span", vr, [
1391
- t[7] || (t[7] = se(" Showing ", -1)),
1392
- g("span", _r, $(Ge.value.from) + "–" + $(Ge.value.to), 1),
1393
- se(" of " + $(ke.value), 1)
1446
+ D.value && D.value.show !== !1 ? (a(), l("div", Ar, [
1447
+ d("div", xr, [
1448
+ d("span", Hr, [
1449
+ t[7] || (t[7] = ie(" Showing ", -1)),
1450
+ d("span", Er, L(We.value.from) + "–" + L(We.value.to), 1),
1451
+ ie(" of " + L(Le.value), 1)
1394
1452
  ])
1395
1453
  ]),
1396
- g("div", yr, [
1397
- g("div", br, [
1398
- t[9] || (t[9] = g("label", { class: "shifl-grid__pagination-label" }, "Row per page", -1)),
1399
- g("select", {
1400
- value: z.value.perPage || 20,
1401
- disabled: W.value,
1402
- onChange: _t,
1454
+ d("div", Rr, [
1455
+ d("div", zr, [
1456
+ t[9] || (t[9] = d("label", { class: "shifl-grid__pagination-label" }, "Row per page", -1)),
1457
+ d("select", {
1458
+ value: D.value.perPage || 20,
1459
+ disabled: U.value,
1460
+ onChange: Mt,
1403
1461
  class: "shifl-grid__pagination-select"
1404
1462
  }, [...t[8] || (t[8] = [
1405
- Ft('<option value="20">20</option><option value="30">30</option><option value="50">50</option><option value="75">75</option><option value="100">100</option>', 5)
1406
- ])], 40, kr)
1463
+ 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)
1464
+ ])], 40, Dr)
1407
1465
  ]),
1408
- g("div", Cr, [
1409
- g("button", {
1466
+ d("div", Vr, [
1467
+ d("button", {
1410
1468
  type: "button",
1411
1469
  class: "shifl-grid__pagination-button",
1412
- disabled: Ie.value || d.loading,
1413
- onClick: mt,
1470
+ disabled: Ke.value || g.loading,
1471
+ onClick: Ct,
1414
1472
  "aria-label": "Previous page"
1415
- }, " ‹ ", 8, Mr),
1416
- g("div", wr, [
1417
- (o(!0), l(x, null, V(ht.value, (n) => (o(), l(x, { key: n }, [
1418
- n !== -1 ? (o(), l("button", {
1473
+ }, " ‹ ", 8, Br),
1474
+ d("div", Ir, [
1475
+ (a(!0), l(H, null, B(bt.value, (n) => (a(), l(H, { key: n }, [
1476
+ n !== -1 ? (a(), l("button", {
1419
1477
  key: 0,
1420
1478
  type: "button",
1421
- class: G(["shifl-grid__pagination-page", { "shifl-grid__pagination-page--active": n === J.value }]),
1422
- disabled: W.value,
1423
- onClick: (s) => pt(n)
1424
- }, $(n), 11, Sr)) : (o(), l("span", Tr, "…"))
1479
+ class: Z(["shifl-grid__pagination-page", { "shifl-grid__pagination-page--active": n === Y.value }]),
1480
+ disabled: U.value,
1481
+ onClick: (i) => kt(n)
1482
+ }, L(n), 11, Zr)) : (a(), l("span", Or, "…"))
1425
1483
  ], 64))), 128))
1426
1484
  ]),
1427
- g("button", {
1485
+ d("button", {
1428
1486
  type: "button",
1429
1487
  class: "shifl-grid__pagination-button",
1430
- disabled: Oe.value || d.loading,
1431
- onClick: vt,
1488
+ disabled: Je.value || g.loading,
1489
+ onClick: wt,
1432
1490
  "aria-label": "Next page"
1433
- }, " › ", 8, Pr)
1491
+ }, " › ", 8, Gr)
1434
1492
  ])
1435
1493
  ])
1436
- ])) : D("", !0),
1437
- (o(), Z(He, { to: "body" }, [
1438
- E(H).rowIndex !== null && E(H).position ? (o(), l("div", {
1494
+ ])) : R("", !0),
1495
+ (a(), I(_e, { to: "body" }, [
1496
+ V(z).rowIndex !== null && V(z).position ? (a(), l("div", {
1439
1497
  key: 0,
1440
1498
  ref_key: "actionMenuRef",
1441
- ref: De,
1499
+ ref: Oe,
1442
1500
  class: "shifl-grid__action-menu",
1443
- style: K(`
1501
+ style: j(`
1444
1502
  position: fixed !important;
1445
- top: ${E(H).position.top}px !important;
1446
- left: ${E(H).position.left}px !important;
1503
+ top: ${V(z).position.top}px !important;
1504
+ left: ${V(z).position.left}px !important;
1447
1505
  z-index: 1000 !important;`),
1448
- onClick: t[2] || (t[2] = q(() => {
1506
+ onClick: t[2] || (t[2] = K(() => {
1449
1507
  }, ["stop"]))
1450
1508
  }, [
1451
- (o(!0), l(x, null, V(Ot(Ee.value, pe.value), (n) => (o(), l("div", {
1509
+ (a(!0), l(H, null, B(Yt(Ge.value, Ce.value), (n) => (a(), l("div", {
1452
1510
  key: n.key,
1453
- class: G(["shifl-grid__action-menu-item", { "shifl-grid__action-menu-item--danger": n.danger }]),
1454
- onClick: () => Zt(n, pe.value, E(H).rowIndex)
1511
+ class: Z(["shifl-grid__action-menu-item", { "shifl-grid__action-menu-item--danger": n.danger }]),
1512
+ onClick: () => Qt(n, Ce.value, V(z).rowIndex)
1455
1513
  }, [
1456
- n.icon && typeof n.icon == "string" ? (o(), l("span", {
1514
+ n.icon && typeof n.icon == "string" ? (a(), l("span", {
1457
1515
  key: 0,
1458
1516
  innerHTML: n.icon,
1459
1517
  class: "w-4 h-4 inline-block"
1460
- }, null, 8, Lr)) : n.icon ? (o(), Z(fe(typeof n.icon == "function" ? n.icon() : n.icon), {
1518
+ }, null, 8, Fr)) : n.icon ? (a(), I(ve(typeof n.icon == "function" ? n.icon() : n.icon), {
1461
1519
  key: 1,
1462
1520
  class: "w-4 h-4"
1463
- })) : D("", !0),
1464
- g("span", null, $(n.label), 1)
1465
- ], 10, $r))), 128))
1466
- ], 4)) : D("", !0)
1521
+ })) : R("", !0),
1522
+ d("span", null, L(n.label), 1)
1523
+ ], 10, jr))), 128))
1524
+ ], 4)) : R("", !0)
1467
1525
  ])),
1468
- Ne(kn, {
1469
- content: Ve.value,
1470
- visible: me.value,
1471
- "trigger-element": ve.value,
1472
- "is-html": _e.value
1526
+ me(Nn, {
1527
+ content: je.value,
1528
+ visible: we.value,
1529
+ "trigger-element": Me.value,
1530
+ "is-html": Te.value
1473
1531
  }, null, 8, ["content", "visible", "trigger-element", "is-html"]),
1474
- (o(), Z(He, { to: "body" }, [
1475
- I.value ? (o(), Z(vn, {
1532
+ (a(), I(_e, { to: "body" }, [
1533
+ ue.value ? (a(), l("div", {
1534
+ key: 0,
1535
+ class: "shifl-grid__copy-tooltip",
1536
+ style: j({
1537
+ position: "fixed",
1538
+ top: `${Se.value.top}px`,
1539
+ left: `${Se.value.left}px`,
1540
+ zIndex: "10000"
1541
+ })
1542
+ }, [
1543
+ t[10] || (t[10] = d("div", { class: "shifl-grid__copy-tooltip-arrow" }, null, -1)),
1544
+ d("div", Wr, L(ce.value), 1)
1545
+ ], 4)) : R("", !0)
1546
+ ])),
1547
+ (a(), I(_e, { to: "body" }, [
1548
+ O.value ? (a(), I(Sn, {
1476
1549
  key: 0,
1477
- "title-prefix": a.config.name,
1478
- columns: Bt.value,
1479
- onClose: t[3] || (t[3] = (n) => I.value = !1),
1480
- onToggle: E(f),
1481
- onToggleFreeze: E(C),
1482
- onMove: E(L),
1483
- onSelectAll: t[4] || (t[4] = (n) => E(p)(!0)),
1484
- onDeselectAll: t[5] || (t[5] = (n) => E(p)(!1)),
1485
- onRestoreDefault: E(A)
1486
- }, null, 8, ["title-prefix", "columns", "onToggle", "onToggleFreeze", "onMove", "onRestoreDefault"])) : D("", !0)
1550
+ "title-prefix": o.config.name,
1551
+ columns: Kt.value,
1552
+ onClose: t[3] || (t[3] = (n) => O.value = !1),
1553
+ onToggle: V(u),
1554
+ onToggleFreeze: V(C),
1555
+ onMove: V(A),
1556
+ onSelectAll: t[4] || (t[4] = (n) => V(h)(!0)),
1557
+ onDeselectAll: t[5] || (t[5] = (n) => V(h)(!1)),
1558
+ onRestoreDefault: V(N)
1559
+ }, null, 8, ["title-prefix", "columns", "onToggle", "onToggleFreeze", "onMove", "onRestoreDefault"])) : R("", !0)
1487
1560
  ]))
1488
1561
  ]));
1489
1562
  }
1490
- }), xr = {
1491
- install(a) {
1492
- a.component("ShiflGrid", Ar);
1563
+ }), qr = {
1564
+ install(o) {
1565
+ o.component("ShiflGrid", Kr);
1493
1566
  }
1494
1567
  };
1495
- function Rr() {
1496
- const a = b(/* @__PURE__ */ new Set());
1497
- function r(d) {
1498
- const _ = d.id ?? JSON.stringify(d), c = new Set(a.value);
1499
- c.has(_) ? c.delete(_) : c.add(_), a.value = c;
1568
+ function Ur() {
1569
+ const o = _(/* @__PURE__ */ new Set());
1570
+ function s(g) {
1571
+ const b = g.id ?? JSON.stringify(g), f = new Set(o.value);
1572
+ f.has(b) ? f.delete(b) : f.add(b), o.value = f;
1500
1573
  }
1501
1574
  return {
1502
- selectedKeys: a,
1503
- toggleRow: r
1575
+ selectedKeys: o,
1576
+ toggleRow: s
1504
1577
  };
1505
1578
  }
1506
- function Hr() {
1579
+ function Yr() {
1507
1580
  return {
1508
1581
  // placeholder
1509
1582
  };
1510
1583
  }
1511
- const ut = Symbol("shifl-grid-theme"), ct = {
1584
+ const pt = Symbol("shifl-grid-theme"), mt = {
1512
1585
  surface: "var(--shifl-surface)",
1513
1586
  surfaceAlt: "var(--shifl-surface-alt)",
1514
1587
  border: "var(--shifl-border)",
@@ -1518,61 +1591,61 @@ const ut = Symbol("shifl-grid-theme"), ct = {
1518
1591
  accentStrong: "var(--shifl-accent-strong)",
1519
1592
  focus: "var(--shifl-focus)"
1520
1593
  };
1521
- function zr(a) {
1522
- const r = b({ ...ct, ...a });
1523
- return Kt(ut, r), r;
1594
+ function Qr(o) {
1595
+ const s = _({ ...mt, ...o });
1596
+ return tn(pt, s), s;
1524
1597
  }
1525
- function Dr() {
1526
- const a = Wt(ut);
1527
- return k(() => (a == null ? void 0 : a.value) ?? ct);
1598
+ function Xr() {
1599
+ const o = nn(pt);
1600
+ return k(() => (o == null ? void 0 : o.value) ?? mt);
1528
1601
  }
1529
- const xe = {
1602
+ const Be = {
1530
1603
  sm: 640,
1531
1604
  lg: 1024
1532
1605
  };
1533
- function Er() {
1534
- const a = b(typeof window < "u" ? window.innerWidth : 0);
1535
- function r() {
1536
- a.value = window.innerWidth;
1606
+ function es() {
1607
+ const o = _(typeof window < "u" ? window.innerWidth : 0);
1608
+ function s() {
1609
+ o.value = window.innerWidth;
1537
1610
  }
1538
- return de(() => {
1539
- window.addEventListener("resize", r);
1540
- }), ge(() => {
1541
- window.removeEventListener("resize", r);
1611
+ return ye(() => {
1612
+ window.addEventListener("resize", s);
1613
+ }), be(() => {
1614
+ window.removeEventListener("resize", s);
1542
1615
  }), {
1543
- width: a,
1544
- isMobile: k(() => a.value < xe.sm),
1545
- isTablet: k(() => a.value >= xe.sm && a.value < xe.lg)
1616
+ width: o,
1617
+ isMobile: k(() => o.value < Be.sm),
1618
+ isTablet: k(() => o.value >= Be.sm && o.value < Be.lg)
1546
1619
  };
1547
1620
  }
1548
- function Vr() {
1621
+ function ts() {
1549
1622
  return {
1550
1623
  // placeholder
1551
1624
  };
1552
1625
  }
1553
- function Br() {
1626
+ function ns() {
1554
1627
  return {
1555
1628
  // placeholder
1556
1629
  };
1557
1630
  }
1558
- function Gr() {
1631
+ function rs() {
1559
1632
  return {
1560
1633
  // placeholder
1561
1634
  };
1562
1635
  }
1563
1636
  export {
1564
- Ar as ShiflGrid,
1565
- xr as ShiflGridPlugin,
1566
- zr as provideGridTheme,
1567
- Er as useBreakpoints,
1568
- qt as useGridColumns,
1569
- en as useGridData,
1570
- Hr as useGridEditing,
1571
- Yt as useGridFilter,
1572
- Vr as useGridInfiniteScroll,
1573
- Rr as useGridSelection,
1574
- Ut as useGridSort,
1575
- Dr as useGridTheme,
1576
- Gr as useGridTour,
1577
- Br as useVirtualScroll
1637
+ Kr as ShiflGrid,
1638
+ qr as ShiflGridPlugin,
1639
+ Qr as provideGridTheme,
1640
+ es as useBreakpoints,
1641
+ sn as useGridColumns,
1642
+ cn as useGridData,
1643
+ Yr as useGridEditing,
1644
+ an as useGridFilter,
1645
+ ts as useGridInfiniteScroll,
1646
+ Ur as useGridSelection,
1647
+ on as useGridSort,
1648
+ Xr as useGridTheme,
1649
+ rs as useGridTour,
1650
+ ns as useVirtualScroll
1578
1651
  };