@shifl-inc/ui 0.7.0 → 0.9.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 tn, provide as nn, inject as rn } from "vue";
2
+ function sn(o) {
3
+ const s = (o.columns || []).map((y) => ({
4
+ ...y,
5
+ freeze: y.freeze ?? !1,
6
+ visible: y.visible ?? !0,
7
+ protected: y.protected ?? !1
8
+ })), g = o.apiConfig ? "server" : o.searchMode || "client";
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 on(o) {
28
+ const s = [...o], g = _([...o]);
29
+ function y(p) {
30
+ g.value = g.value.map(
31
+ (f) => f.key === p ? { ...f, visible: !f.visible } : f
32
32
  );
33
33
  }
34
- function c(h) {
35
- d.value = d.value.map((u) => ({ ...u, visible: h }));
34
+ function c(p) {
35
+ g.value = g.value.map((f) => ({ ...f, 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 b(p) {
38
+ const f = g.value.map(
39
+ (M) => M.key === p ? { ...M, freeze: !M.freeze } : M
40
+ ), m = f.filter((M) => M.freeze), T = f.filter((M) => !M.freeze);
41
+ g.value = [...m, ...T];
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, f) {
44
+ if (p === f || f < 0 || f >= g.value.length) return;
45
+ const m = g.value.findIndex((h) => !h.freeze), T = m === -1 ? g.value.length : m;
46
+ if (p < T || f < T) return;
47
+ const M = [...g.value], [u] = M.splice(p, 1);
48
+ M.splice(f, 0, u), g.value = M;
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: _,
55
+ columns: g,
56
+ visibleColumns: w,
57
+ toggleColumnVisibility: y,
58
58
  setAllVisible: c,
59
- toggleFreeze: v,
60
- moveColumn: T,
61
- resetColumns: P
59
+ toggleFreeze: b,
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 an(o) {
65
+ const s = _(o);
66
+ function g(c) {
67
+ var b;
68
+ s.value = ((b = s.value) == null ? void 0 : b.key) === c && s.value.order === "asc" ? { key: c, order: "desc" } : { key: c, order: "asc" };
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 y(c) {
71
+ if (!s.value) return c;
72
+ const { key: b, order: P } = s.value;
73
+ return [...c].sort((S, w) => {
74
+ const p = S[b], f = w[b];
75
+ if (p === f) return 0;
76
+ if (p == null) return 1;
77
+ if (f == null) return -1;
78
+ const m = String(p).localeCompare(String(f), void 0, {
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: y
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 ln() {
91
+ function o(s, g, y) {
92
+ const c = (y || "").trim().toLowerCase();
93
+ return c ? s.filter((b) => (g && g.length ? g.map((S) => b[S]) : Object.values(b)).some(
94
+ (S) => String(S ?? "").toLowerCase().includes(c)
95
+ )) : s;
96
96
  }
97
97
  return {
98
- applyGlobalFilter: a
98
+ applyGlobalFilter: o
99
99
  };
100
100
  }
101
- function Qt() {
102
- const a = b({
101
+ function un() {
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(b, 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: b,
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 y(b) {
125
+ return o.value.rowIndex === b;
126
126
  }
127
- function c(v) {
128
- v.key === "Escape" && a.value.rowIndex !== null && d();
127
+ function c(b) {
128
+ b.key === "Escape" && o.value.rowIndex !== null && g();
129
129
  }
130
- return de(() => {
130
+ return ye(() => {
131
131
  document.addEventListener("keydown", c);
132
- }), ge(() => {
132
+ }), be(() => {
133
133
  document.removeEventListener("keydown", c);
134
134
  }), {
135
- menuState: a,
136
- openMenu: r,
137
- closeMenu: d,
138
- isMenuOpen: _
135
+ menuState: o,
136
+ openMenu: s,
137
+ closeMenu: g,
138
+ isMenuOpen: y
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 cn(o, s) {
142
+ const g = _(!1), y = _(null), c = _([]), b = _(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 f(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
+ y.value = new Error("API URL is required");
198
204
  return;
199
205
  }
200
- d.value = !0, _.value = null;
206
+ g.value = !0, y.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, G]) => {
218
+ G != null && G !== "" && (Array.isArray(G) ? G.forEach((le) => z.append(`${Q}[]`, String(le))) : z.append(Q, String(G)));
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 = f(ke);
233
+ c.value = oe.data, b.value = oe.meta;
234
+ } catch (h) {
235
+ y.value = h instanceof Error ? h : new Error("Unknown error occurred"), c.value = [], b.value = void 0;
230
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),
251
+ loading: k(() => g.value),
252
+ error: k(() => y.value),
247
253
  data: k(() => c.value),
248
- paginationMeta: k(() => v.value),
254
+ paginationMeta: k(() => b.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 fn(o, s) {
261
+ var w, p;
262
+ const g = (s == null ? void 0 : s.search) || _(void 0), y = (s == null ? void 0 : s.filters) || _(o.filters), c = (s == null ? void 0 : s.sort) || _(o.sort), b = (s == null ? void 0 : s.pagination) || _({
263
+ page: ((w = o.paginationMeta) == null ? void 0 : w.currentPage) || 1,
264
+ perPage: ((p = o.paginationMeta) == null ? void 0 : p.perPage) || 20
265
+ }), 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 f = function() {
268
+ var h, C;
263
269
  return {
264
- search: d.value,
265
- filters: _.value,
270
+ search: g.value,
271
+ filters: y.value,
266
272
  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
273
+ page: (h = b.value) == null ? void 0 : h.page,
274
+ perPage: (C = b.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 = cn(o.apiConfig.apiUrl, o.apiConfig);
283
+ let M = !1, u = null;
284
+ return F(
285
+ [g, y, c, b, P, S],
280
286
  () => {
281
- if (w)
287
+ if (M)
282
288
  return;
283
- const p = u();
284
- if (!m(p))
289
+ const h = f();
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 && b.value) {
299
+ const C = h.perPage || b.value.perPage;
300
+ C !== b.value.perPage && (M = !0, b.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,
310
+ var C, A;
311
+ const h = {
312
+ search: g.value,
313
+ filters: y.value,
308
314
  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
315
+ page: (C = b.value) == null ? void 0 : C.page,
316
+ perPage: (A = b.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 dn = { class: "shifl-column-manager__header" }, gn = { class: "shifl-column-manager__title-wrapper" }, hn = { class: "shifl-column-manager__title" }, pn = { key: 0 }, mn = { key: 1 }, vn = { class: "shifl-column-manager__controls" }, _n = { class: "shifl-column-manager__controls-left" }, yn = { class: "shifl-column-manager__content" }, bn = { class: "shifl-column-manager__list" }, kn = ["draggable", "onDragstart", "onDragover", "onDrop"], Cn = ["aria-label", "disabled"], wn = ["checked", "disabled", "onChange"], Mn = { class: "shifl-column-manager__label-text" }, Tn = { class: "shifl-column-manager__footer" }, Sn = /* @__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, y = k(() => g.columns), c = s, b = _(null);
342
+ function P(p) {
343
+ var f, m;
344
+ (f = g.columns[p]) != null && f.freeze || (m = g.columns[p]) != null && m.protected || (b.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
+ b.value === null || b.value === p || (c("move", b.value, p), b.value = null);
344
350
  }
345
- return (h, u) => (o(), l("div", {
351
+ return (p, f) => (a(), l("div", {
346
352
  class: "shifl-column-manager__backdrop",
347
- onClick: u[7] || (u[7] = q((m) => h.$emit("close"), ["self"]))
353
+ onClick: f[7] || (f[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: f[6] || (f[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", dn, [
363
+ d("div", gn, [
364
+ d("h2", hn, [
365
+ o.titlePrefix ? (a(), l("span", pn, L(o.titlePrefix), 1)) : R("", !0),
366
+ o.titlePrefix ? (a(), l("span", mn, ">")) : R("", !0),
367
+ f[8] || (f[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: f[0] || (f[0] = (m) => p.$emit("close"))
374
+ }, [...f[9] || (f[9] = [
375
+ d("span", null, "✕", -1)
370
376
  ])])
371
377
  ]),
372
- g("div", on, [
373
- g("div", ln, [
374
- g("button", {
378
+ d("div", vn, [
379
+ d("div", _n, [
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: f[1] || (f[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: f[2] || (f[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: f[3] || (f[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", yn, [
398
+ d("ul", bn, [
399
+ (a(!0), l(H, null, B(y.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
+ }, [...f[10] || (f[10] = [
417
+ d("span", null, "⋮⋮", -1)
418
+ ])], 10, Cn),
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, wn),
431
+ f[11] || (f[11] = d("span", { class: "shifl-column-manager__checkbox-custom" }, null, -1)),
432
+ d("span", Mn, L(m.label), 1)
427
433
  ], 2)
428
- ], 42, fn))), 128))
434
+ ], 42, kn))), 128))
429
435
  ])
430
436
  ]),
431
- g("footer", pn, [
432
- g("button", {
437
+ d("footer", Tn, [
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: f[4] || (f[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: f[5] || (f[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 [y, c] of s)
455
+ g[y] = c;
456
+ return g;
457
+ }, Pn = /* @__PURE__ */ J(Sn, [["__scopeId", "data-v-40ca0ed0"]]), $n = { class: "shifl-grid__tooltip-content" }, Ln = ["innerHTML"], Nn = /* @__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), y = _({}), c = k(() => s.content.includes(`
467
+ `)), b = k(() => c.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(), f = g.value.getBoundingClientRect(), m = window.innerWidth, T = window.innerHeight;
472
+ let M = p.bottom + 8, u = p.left + window.scrollX;
473
+ u + f.width > m - 16 && (u = m - f.width - 16), u < 16 && (u = 16), M + f.height > T - 16 ? (M = p.top - f.height - 8, P.value = "bottom") : P.value = "top", y.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, f) => (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(y.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", $n, [
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, Ln)) : c.value ? (a(!0), l(H, { key: 1 }, B(b.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
+ }), An = /* @__PURE__ */ J(Nn, [["__scopeId", "data-v-239005f1"]]), xn = {}, Hn = {
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 En(o, s) {
527
+ return a(), l("svg", Hn, [...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 Rn = /* @__PURE__ */ J(xn, [["render", En]]), zn = {}, Dn = {
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 Vn(o, s) {
542
+ return a(), l("svg", Dn, [...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 Bn = /* @__PURE__ */ J(zn, [["render", Vn]]), In = {}, Zn = {
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 Gn(o, s) {
559
+ return a(), l("svg", Zn, [...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(In, [["render", Gn]]), jn = {}, Fn = {
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 Wn(o, s) {
574
+ return a(), l("svg", Fn, [...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(jn, [["render", Wn]]), Kn = {}, Jn = {
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 qn(o, s) {
589
+ return a(), l("svg", Jn, [...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 Un = /* @__PURE__ */ J(Kn, [["render", qn]]), Yn = {}, Qn = {
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 Xn(o, s) {
604
+ return a(), l("svg", Qn, [...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 er = /* @__PURE__ */ J(Yn, [["render", Xn]]), tr = { class: "shifl-grid relative" }, nr = { class: "shifl-grid__controls" }, rr = { class: "shifl-grid__table" }, sr = ["onClick"], ir = { class: "shifl-grid__header-content" }, or = {
591
612
  key: 0,
592
613
  class: "shifl-grid__header-label"
593
- }, Wn = {
614
+ }, ar = {
594
615
  key: 1,
595
616
  class: "shifl-grid__sort-icon"
596
- }, Jn = { key: 0 }, qn = ["colspan"], Un = {
617
+ }, lr = { key: 0 }, ur = ["colspan"], cr = {
597
618
  key: 0,
598
619
  class: "shifl-grid__smart-tracking-icon"
599
- }, Yn = ["onClick"], Qn = { key: 0 }, Xn = ["innerHTML"], er = {
620
+ }, fr = ["onClick"], dr = { key: 0 }, gr = ["innerHTML"], hr = {
600
621
  key: 2,
601
622
  class: "shifl-grid__composite-cell"
602
- }, tr = {
623
+ }, pr = {
603
624
  key: 3,
604
625
  class: "shifl-grid__type-cell"
605
- }, nr = {
626
+ }, mr = {
606
627
  key: 0,
607
628
  class: "shifl-grid__container-badge"
608
- }, rr = {
629
+ }, vr = {
609
630
  key: 0,
610
631
  class: "shifl-grid__cell-blank"
611
- }, sr = {
632
+ }, _r = {
612
633
  key: 1,
613
634
  class: "shifl-grid__tags-cell"
614
- }, ir = { class: "shifl-grid__tags-wrapper" }, ar = ["onMouseenter"], or = {
635
+ }, yr = { class: "shifl-grid__tags-wrapper" }, br = ["onMouseenter"], kr = {
615
636
  key: 5,
616
637
  class: "shifl-grid__chips-container"
617
- }, lr = {
638
+ }, Cr = {
618
639
  key: 6,
619
640
  class: "shifl-grid__truncated-cell"
620
- }, ur = ["onMouseenter"], cr = ["onMouseenter"], fr = ["href"], dr = {
641
+ }, wr = ["onMouseenter"], Mr = ["onMouseenter"], Tr = ["href"], Sr = {
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
+ }, Pr = { class: "shifl-grid__progress-bar" }, $r = { class: "shifl-grid__progress-text" }, Lr = ["onMouseenter"], Nr = { class: "shifl-grid__reference-value" }, Ar = ["onClick"], xr = {
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
+ }, Hr = { class: "shifl-grid__pagination-left" }, Er = { class: "shifl-grid__pagination-range" }, Rr = { class: "shifl-grid__pagination-range-numbers" }, zr = { class: "shifl-grid__pagination-right" }, Dr = { class: "shifl-grid__pagination-rows" }, Vr = ["value", "disabled"], Br = { class: "shifl-grid__pagination-nav" }, Ir = ["disabled"], Zr = { class: "shifl-grid__pagination-pages" }, Gr = ["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
+ }, jr = ["disabled"], Fr = ["onClick"], Wr = ["innerHTML"], Kr = { class: "shifl-grid__copy-tooltip-content" }, Jr = /* @__PURE__ */ Ze({
630
651
  __name: "ShiflGrid",
631
652
  props: {
632
653
  config: {},
@@ -634,58 +655,58 @@ 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
658
+ setup(o, { emit: s }) {
659
+ var ut, ct, ft, dt, gt;
660
+ const g = o, y = s, c = k(() => sn(g.config)), b = _(g.search), P = _(c.value.filters), S = _(c.value.sort), w = _({
661
+ page: ((ut = c.value.paginationMeta) == null ? void 0 : ut.currentPage) || 1,
662
+ perPage: ((ct = c.value.paginationMeta) == null ? void 0 : ct.perPage) || 20
663
+ }), p = _(
664
+ typeof ((ft = c.value.apiConfig) == null ? void 0 : ft.additionalParams) == "function" || (gt = (dt = c.value.apiConfig) == null ? void 0 : dt.additionalParams) == null ? void 0 : gt.tabName
665
+ ), f = fn(c.value, {
666
+ search: b,
667
+ filters: P,
668
+ sort: S,
669
+ pagination: w,
670
+ tabName: p
650
671
  }), m = k(() => c.value.columns.filter((e) => !e.smartTrackingColumn)), {
651
- columns: S,
652
- visibleColumns: w,
653
- toggleColumnVisibility: f,
654
- setAllVisible: p,
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
+ } = on(m.value), { sort: x, setSort: ke, applySort: oe } = an(c.value.sort), { applyGlobalFilter: te } = ln(), { menuState: z, openMenu: ae, closeMenu: Q } = un(), G = _(!1), le = _({}), Ge = _(null), Oe = _(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(
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(
670
691
  () => c.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
+ c.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(
696
+ ), F(
676
697
  () => c.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(
703
+ ), F(
683
704
  () => c.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
712
  return (e = c.value.apiConfig) == null ? void 0 : e.additionalParams;
@@ -693,135 +714,141 @@ const Gn = /* @__PURE__ */ U(En, [["render", Bn]]), In = { class: "shifl-grid re
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 && (_t(), p.value = t.tabName);
697
718
  }
698
719
  },
699
720
  { deep: !0 }
700
- ), j(
701
- () => d.search,
721
+ );
722
+ function _t() {
723
+ var t;
724
+ const e = ((t = c.value.paginationMeta) == null ? void 0 : t.perPage) || 20;
725
+ w.value = { page: 1, perPage: e }, b.value = void 0, S.value = c.value.sort, P.value = c.value.filters, y("search-change", ""), y("pagination-change", 1, e);
726
+ }
727
+ F(
728
+ () => g.search,
702
729
  (e, t) => {
703
730
  var n;
704
- if (v.value = e, c.value.searchMode === "server")
705
- _("search-change", e || "");
731
+ if (b.value = e, c.value.searchMode === "server")
732
+ y("search-change", e || "");
706
733
  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);
734
+ const i = ((n = D.value) == null ? void 0 : n.perPage) || 20;
735
+ w.value = { page: 1, perPage: i }, y("pagination-change", 1, i);
709
736
  }
710
737
  },
711
738
  { immediate: !0 }
712
- ), j(
713
- () => N.value,
739
+ ), F(
740
+ () => x.value,
714
741
  (e) => {
715
- P.value = e;
742
+ S.value = e;
716
743
  }
717
744
  );
718
- const ye = k(() => u.rows.value || []), be = k(() => {
745
+ const Pe = k(() => f.rows.value || []), $e = k(() => {
719
746
  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(() => {
747
+ return Pe.value;
748
+ const t = g.search || "";
749
+ return te(Pe.value, c.value.search, t);
750
+ }), Le = k(() => {
724
751
  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(() => {
752
+ return (c.value.searchMode || "client") === "client" ? $e.value.length : ((t = f.paginationMeta.value) == null ? void 0 : t.total) || 0;
753
+ }), Ne = k(() => (c.value.searchMode || "client") === "server" ? $e.value : oe($e.value)), Fe = k(() => {
727
754
  if ((c.value.searchMode || "client") === "server")
728
- return Ce.value;
729
- const t = z.value;
755
+ return Ne.value;
756
+ const t = D.value;
730
757
  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(() => {
758
+ return Ne.value;
759
+ const n = t.perPage || 20, r = ((t.currentPage || 1) - 1) * n, v = r + n;
760
+ return Ne.value.slice(r, v);
761
+ }), D = k(() => {
735
762
  var e;
736
- return c.value.searchMode === "server" && u.paginationMeta.value ? {
763
+ return c.value.searchMode === "server" && f.paginationMeta.value ? {
737
764
  show: !0,
738
765
  // Default to showing pagination
739
- ...u.paginationMeta.value,
740
- currentPage: ((e = M.value) == null ? void 0 : e.page) || u.paginationMeta.value.currentPage || 1
766
+ ...f.paginationMeta.value,
767
+ currentPage: ((e = w.value) == null ? void 0 : e.page) || f.paginationMeta.value.currentPage || 1
741
768
  } : c.value.paginationMeta;
742
- }), W = k(() => d.loading !== void 0 ? d.loading : u.loading.value), dt = k(() => {
769
+ }), U = k(() => g.loading !== void 0 ? g.loading : f.loading.value), yt = k(() => {
743
770
  var e;
744
- return ((e = z.value) == null ? void 0 : e.perPage) === 100;
745
- }), gt = k(() => {
771
+ return ((e = D.value) == null ? void 0 : e.perPage) === 100;
772
+ }), bt = k(() => {
746
773
  var e;
747
- return ((e = z.value) == null ? void 0 : e.perPage) || 10;
748
- }), Ge = k(() => {
749
- const e = z.value;
774
+ return ((e = D.value) == null ? void 0 : e.perPage) || 10;
775
+ }), We = k(() => {
776
+ const e = D.value;
750
777
  if (!e || e.show === !1)
751
778
  return { from: 0, to: 0 };
752
- const t = ke.value, n = e.perPage || 20, s = e.currentPage || 1;
779
+ const t = Le.value, n = e.perPage || 20, i = e.currentPage || 1;
753
780
  if ((c.value.searchMode || "client") === "server" && e.from !== void 0 && e.to !== void 0)
754
781
  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(() => {
782
+ const v = (i - 1) * n + 1, $ = Math.min(i * n, t);
783
+ return t === 0 ? { from: 0, to: 0 } : { from: v, to: $ };
784
+ }), Y = k(() => {
758
785
  var e;
759
- return ((e = z.value) == null ? void 0 : e.currentPage) || 1;
760
- }), Me = k(() => {
761
- const e = z.value;
786
+ return ((e = D.value) == null ? void 0 : e.currentPage) || 1;
787
+ }), Ae = k(() => {
788
+ const e = D.value;
762
789
  if (!e || e.show === !1) return 1;
763
- const t = ke.value;
790
+ const t = Le.value;
764
791
  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 = [];
792
+ const n = e.perPage || 20, i = Math.ceil(t / n);
793
+ return Math.max(1, i);
794
+ }), Ke = k(() => Y.value <= 1), Je = k(() => Y.value >= Ae.value), kt = k(() => {
795
+ const e = Ae.value, t = Y.value, n = [];
769
796
  if (e <= 7)
770
- for (let s = 1; s <= e; s++)
771
- n.push(s);
797
+ for (let i = 1; i <= e; i++)
798
+ n.push(i);
772
799
  else if (t <= 4) {
773
- for (let s = 1; s <= 5; s++)
774
- n.push(s);
800
+ for (let i = 1; i <= 5; i++)
801
+ n.push(i);
775
802
  n.push(-1), n.push(e);
776
803
  } else if (t >= e - 3) {
777
804
  n.push(1), n.push(-1);
778
- for (let s = e - 4; s <= e; s++)
779
- n.push(s);
805
+ for (let i = e - 4; i <= e; i++)
806
+ n.push(i);
780
807
  } else {
781
808
  n.push(1), n.push(-1);
782
- for (let s = t - 1; s <= t + 1; s++)
783
- n.push(s);
809
+ for (let i = t - 1; i <= t + 1; i++)
810
+ n.push(i);
784
811
  n.push(-1), n.push(e);
785
812
  }
786
813
  return n;
787
814
  });
788
- function pt(e) {
815
+ function Ct(e) {
789
816
  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);
817
+ if (e < 1 || e > Ae.value || e === Y.value || U.value) return;
818
+ const t = ((n = D.value) == null ? void 0 : n.perPage) || 20;
819
+ w.value = { page: e, perPage: t }, y("pagination-change", e, t);
793
820
  }
794
- function mt() {
821
+ function wt() {
795
822
  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);
823
+ if (Ke.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 }, y("pagination-change", t, e);
799
826
  }
800
- function vt() {
827
+ function Mt() {
801
828
  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);
829
+ if (Je.value || U.value) return;
830
+ const e = ((n = D.value) == null ? void 0 : n.perPage) || 20, t = Y.value + 1;
831
+ w.value = { page: t, perPage: e }, y("pagination-change", t, e);
805
832
  }
806
- function _t(e) {
807
- var s;
808
- if (W.value) return;
833
+ function Tt(e) {
834
+ var i;
835
+ if (U.value) return;
809
836
  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));
837
+ n && n !== (((i = D.value) == null ? void 0 : i.perPage) || 20) && (w.value = { page: 1, perPage: n }, y("pagination-change", 1, n));
811
838
  }
812
- const yt = k(() => {
839
+ const St = k(() => {
813
840
  const e = c.value.columns.find((n) => n.smartTrackingColumn);
814
841
  if (!(e != null && e.smartTrackingColumn)) return !1;
815
842
  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";
843
+ return Pe.value.some((n) => {
844
+ const i = n[t];
845
+ return i === !0 || i === 1 || i === "true" || i === "1";
819
846
  });
820
- }), we = k(() => c.value.columns.find((e) => e.smartTrackingColumn)), X = k(() => {
847
+ }), xe = k(() => c.value.columns.find((e) => e.smartTrackingColumn)), ee = k(() => {
821
848
  var n;
822
- const e = w.value.filter((s) => !s.smartTrackingColumn);
823
- if (yt.value && we.value) {
824
- const s = {
849
+ const e = M.value.filter((i) => !i.smartTrackingColumn);
850
+ if (St.value && xe.value) {
851
+ const i = {
825
852
  key: "_smart_tracking",
826
853
  label: "",
827
854
  // No label
@@ -831,57 +858,57 @@ const Gn = /* @__PURE__ */ U(En, [["render", Bn]]), In = { class: "shifl-grid re
831
858
  visible: !0,
832
859
  protected: !0,
833
860
  sortable: !1,
834
- width: ((n = we.value.smartTrackingColumn) == null ? void 0 : n.width) || "36px",
835
- smartTrackingColumn: we.value.smartTrackingColumn,
861
+ width: ((n = xe.value.smartTrackingColumn) == null ? void 0 : n.width) || "36px",
862
+ smartTrackingColumn: xe.value.smartTrackingColumn,
836
863
  cellType: "icon"
837
- }, i = e.findIndex((y) => y.key === "ref");
838
- i >= 0 ? e.splice(i, 0, s) : e.unshift(s);
864
+ }, r = e.findIndex((v) => v.key === "ref");
865
+ r >= 0 ? e.splice(r, 0, i) : e.unshift(i);
839
866
  }
840
- const t = e.find((s) => s.key === "ref");
867
+ const t = e.find((i) => i.key === "ref");
841
868
  return t && (t.freeze = !0, t.protected = !0), e;
842
- }), bt = k(() => {
869
+ }), Pt = k(() => {
843
870
  let e = 0;
844
871
  const t = {};
845
- for (const n of X.value) {
872
+ for (const n of ee.value) {
846
873
  n.freeze && (t[n.key] = e);
847
- const s = parseInt(n.width ?? "160", 10);
848
- Number.isNaN(s) || (e += s);
874
+ const i = parseInt(n.width ?? "160", 10);
875
+ Number.isNaN(i) || (e += i);
849
876
  }
850
877
  return t;
851
- }), Ze = b(0);
852
- function kt(e) {
878
+ }), qe = _(0);
879
+ function $t(e) {
853
880
  const t = e.target;
854
- Ze.value = t.scrollLeft;
881
+ qe.value = t.scrollLeft;
855
882
  }
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);
883
+ function Lt(e) {
884
+ const t = T.value.find((n) => n.key === e);
885
+ !(t != null && t.sortable) || he(t) || Ve(t) || ke(e);
859
886
  }
860
- function Se(e, t) {
887
+ function de(e, t) {
861
888
  if (e == null || e === "" || e === void 0)
862
- return te(t.blankStyle);
889
+ return ne(t.blankStyle);
863
890
  const n = t.cellType;
864
891
  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) : "";
892
+ const i = n.find((r) => typeof r == "string" && r !== "icon");
893
+ return i && typeof i == "string" ? nt(e, i, t) : "";
867
894
  }
868
895
  if (!n)
869
896
  return typeof e == "object" ? JSON.stringify(e) : String(e);
870
897
  switch (n) {
871
898
  case "number":
872
- return je(e);
899
+ return Ue(e);
873
900
  case "currency":
874
- return Fe(e);
901
+ return Ye(e);
875
902
  case "date":
876
- return Ke(e);
903
+ return Qe(e);
877
904
  case "boolean":
878
- return We(e);
905
+ return Xe(e);
879
906
  case "text":
880
907
  default:
881
908
  return typeof e == "object" ? JSON.stringify(e) : String(e);
882
909
  }
883
910
  }
884
- function te(e) {
911
+ function ne(e) {
885
912
  switch (e) {
886
913
  case "dash":
887
914
  return "--";
@@ -894,13 +921,13 @@ const Gn = /* @__PURE__ */ U(En, [["render", Bn]]), In = { class: "shifl-grid re
894
921
  return "";
895
922
  }
896
923
  }
897
- function je(e) {
924
+ function Ue(e) {
898
925
  if (typeof e == "number")
899
926
  return e.toLocaleString();
900
927
  const t = Number(e);
901
928
  return Number.isNaN(t) ? String(e) : t.toLocaleString();
902
929
  }
903
- function Fe(e) {
930
+ function Ye(e) {
904
931
  if (typeof e == "number")
905
932
  return new Intl.NumberFormat("en-US", {
906
933
  style: "currency",
@@ -912,7 +939,7 @@ const Gn = /* @__PURE__ */ U(En, [["render", Bn]]), In = { class: "shifl-grid re
912
939
  currency: "USD"
913
940
  }).format(t);
914
941
  }
915
- function Ke(e) {
942
+ function Qe(e) {
916
943
  if (e instanceof Date)
917
944
  return e.toLocaleDateString();
918
945
  if (typeof e == "string") {
@@ -922,57 +949,57 @@ const Gn = /* @__PURE__ */ U(En, [["render", Bn]]), In = { class: "shifl-grid re
922
949
  }
923
950
  return String(e);
924
951
  }
925
- function We(e) {
952
+ function Xe(e) {
926
953
  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
954
  }
928
- function Mt(e) {
955
+ function Nt(e) {
929
956
  if (typeof e == "number")
930
957
  return Math.min(100, Math.max(0, e));
931
958
  const t = Number(e);
932
959
  return Number.isNaN(t) ? 0 : Math.min(100, Math.max(0, t));
933
960
  }
934
- function Je(e) {
935
- return typeof e == "string" && e.toLowerCase() === "ocean", lt;
961
+ function et(e) {
962
+ return typeof e == "string" && e.toLowerCase() === "ocean", ht;
936
963
  }
937
- function wt(e) {
964
+ function At(e) {
938
965
  const t = e.toLowerCase();
939
966
  return ["supplier", "suppliers", "po", "pos", "product_description"].includes(t);
940
967
  }
941
- function qe(e) {
968
+ function tt(e) {
942
969
  if (e.cellType === "badge") return !0;
943
970
  const t = e.key.toLowerCase();
944
971
  return t === "tag" || t === "tags";
945
972
  }
946
- function St(e) {
973
+ function xt(e) {
947
974
  return e.cellType === "status" ? !0 : e.key.toLowerCase() === "status";
948
975
  }
949
- function Tt(e) {
976
+ function Ht(e) {
950
977
  return e.cellType === "icon" ? !0 : e.key.toLowerCase() === "type";
951
978
  }
952
- function Pt(e) {
979
+ function Et(e) {
953
980
  return Array.isArray(e.cellType) && e.cellType.length > 0;
954
981
  }
955
- function $t(e) {
982
+ function Rt(e) {
956
983
  return Array.isArray(e.cellType) ? e.cellType.filter((t) => typeof t == "string") : e.cellType && typeof e.cellType == "string" ? [e.cellType] : [];
957
984
  }
958
- function Ue(e, t, n) {
985
+ function nt(e, t, n) {
959
986
  if (e == null || e === "" || e === void 0)
960
- return te(n.blankStyle);
987
+ return ne(n.blankStyle);
961
988
  switch (t) {
962
989
  case "number":
963
- return je(e);
990
+ return Ue(e);
964
991
  case "currency":
965
- return Fe(e);
992
+ return Ye(e);
966
993
  case "date":
967
- return Ke(e);
994
+ return Qe(e);
968
995
  case "boolean":
969
- return We(e);
996
+ return Xe(e);
970
997
  case "text":
971
998
  default:
972
999
  return typeof e == "object" ? JSON.stringify(e) : String(e);
973
1000
  }
974
1001
  }
975
- function Lt(e) {
1002
+ function zt(e) {
976
1003
  return {
977
1004
  number: "shifl-grid__composite-number",
978
1005
  currency: "shifl-grid__composite-currency",
@@ -981,66 +1008,85 @@ const Gn = /* @__PURE__ */ U(En, [["render", Bn]]), In = { class: "shifl-grid re
981
1008
  text: "shifl-grid__composite-text"
982
1009
  }[e] || "shifl-grid__composite-text";
983
1010
  }
984
- function At(e, t) {
1011
+ function Dt(e, t) {
985
1012
  if (e == null || e === "")
986
- return te(t.blankStyle);
1013
+ return ne(t.blankStyle);
987
1014
  if (Array.isArray(e)) {
988
1015
  if (e.length === 0)
989
- return te(t.blankStyle);
1016
+ return ne(t.blankStyle);
990
1017
  const n = e.join(", ");
991
- return Ye(n, 45);
1018
+ return rt(n, 45);
992
1019
  }
993
- return typeof e == "string" ? Ye(e, 45) : String(e);
1020
+ return typeof e == "string" ? rt(e, 45) : String(e);
994
1021
  }
995
- function Ye(e, t) {
1022
+ function rt(e, t) {
996
1023
  return e.length <= t ? e : e.substring(0, t) + "...";
997
1024
  }
998
- function Te(e) {
1025
+ function He(e) {
999
1026
  const t = e.toLowerCase();
1000
1027
  return ["po", "pos", "supplier", "suppliers", "tag", "tags"].includes(t);
1001
1028
  }
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;
1029
+ function Vt(e, t) {
1030
+ 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
1031
  }
1005
- function xt(e) {
1032
+ function Bt(e) {
1006
1033
  return e == null ? !1 : Array.isArray(e) ? e.length === 0 ? !1 : e.join(", ").length > 45 : typeof e == "string" ? e.length > 45 : !1;
1007
1034
  }
1008
- function Rt(e) {
1035
+ function It(e) {
1009
1036
  if (e == null) return 0;
1010
1037
  if (Array.isArray(e)) {
1011
1038
  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++;
1039
+ let n = 0, i = 0;
1040
+ for (let r = 0; r < e.length; r++) {
1041
+ const v = String(e[r]), E = (r > 0 ? ", " : "").length + v.length;
1042
+ if (n + E <= 45)
1043
+ n += E, i++;
1017
1044
  else
1018
1045
  break;
1019
1046
  }
1020
- return e.length - s;
1047
+ return e.length - i;
1021
1048
  }
1022
1049
  return typeof e == "string" && e.length > 45 ? 1 : 0;
1023
1050
  }
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;
1051
+ function Ee(e, t, n, i) {
1052
+ let r = "", v = !1;
1053
+ const $ = ee.value.find((E) => E.key === e);
1054
+ if ($ && tt($)) {
1055
+ const E = st(n);
1056
+ 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(""));
1057
+ } else Array.isArray(n) ? n.length > 0 && (r = n.join(`
1058
+ `)) : n != null && (r = String(n));
1059
+ je.value = r, Te.value = v, Me.value = i, we.value = !0;
1060
+ }
1061
+ function Re() {
1062
+ we.value = !1, Me.value = null, Te.value = !1;
1063
+ }
1064
+ function Zt(e, t) {
1065
+ ce.value = "Copy To Clipboard", fe.value = t, ue.value = !0, q();
1066
+ }
1067
+ function ze() {
1068
+ ue.value = !1, fe.value = null;
1033
1069
  }
1034
- function $e() {
1035
- me.value = !1, ve.value = null, _e.value = !1;
1070
+ async function Gt(e) {
1071
+ try {
1072
+ await navigator.clipboard.writeText(e), ce.value = "Copied!", setTimeout(() => {
1073
+ ze();
1074
+ }, 2e3);
1075
+ } catch (t) {
1076
+ console.error("Failed to copy text: ", t);
1077
+ const n = document.createElement("textarea");
1078
+ n.value = e, document.body.appendChild(n), n.select(), document.execCommand("copy"), document.body.removeChild(n), ce.value = "Copied!", setTimeout(() => {
1079
+ ze();
1080
+ }, 2e3);
1081
+ }
1036
1082
  }
1037
- function Ht(e, t, n) {
1038
- n && (ft.value[`${e}-${t}`] = n);
1083
+ function Ot(e, t, n) {
1084
+ n && (vt.value[`${e}-${t}`] = n);
1039
1085
  }
1040
- function le(e) {
1086
+ function ge(e) {
1041
1087
  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
1088
  }
1043
- function Qe(e) {
1089
+ function st(e) {
1044
1090
  return e == null ? [] : Array.isArray(e) ? e.map((t) => typeof t == "object" && t !== null && "name" in t ? {
1045
1091
  name: String(t.name),
1046
1092
  color: "color" in t ? String(t.color) : void 0
@@ -1049,49 +1095,49 @@ const Gn = /* @__PURE__ */ U(En, [["render", Bn]]), In = { class: "shifl-grid re
1049
1095
  color: void 0
1050
1096
  }).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
1097
  }
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;
1098
+ function it(e, t, n) {
1099
+ const i = ge(e);
1100
+ if (i.length === 0) return [];
1101
+ const r = `${t}-${n}`;
1102
+ if (X.value[r])
1103
+ return X.value[r];
1104
+ const v = 130, $ = 8, E = 4;
1105
+ let W = 0;
1060
1106
  const O = [];
1061
- for (const ne of s) {
1062
- const re = ne.length * 8 + R + B;
1063
- if (F + re > y && O.length > 0)
1107
+ for (const re of i) {
1108
+ const se = re.length * 8 + $ + E;
1109
+ if (W + se > v && O.length > 0)
1064
1110
  break;
1065
- O.push(ne), F += re;
1111
+ O.push(re), W += se;
1066
1112
  }
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;
1113
+ return X.value[r] = O, O;
1114
+ }
1115
+ function ot(e, t, n) {
1116
+ const i = st(e);
1117
+ if (i.length === 0) return [];
1118
+ const r = `${t}-${n}-objects`;
1119
+ if (X.value[r])
1120
+ return X.value[r];
1121
+ const v = 130, $ = 8, E = 4;
1122
+ let W = 0;
1077
1123
  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)
1124
+ for (const re of i) {
1125
+ const se = re.name.length * 8 + $ + E;
1126
+ if (W + se > v && O.length > 0)
1081
1127
  break;
1082
- O.push(ne), F += re;
1128
+ O.push(re), W += se;
1083
1129
  }
1084
- return Q.value[i] = O, O;
1130
+ return X.value[r] = O, O;
1085
1131
  }
1086
- function zt(e, t, n) {
1087
- const s = le(e), i = Xe(e, t, n);
1088
- return s.length > i.length;
1132
+ function jt(e, t, n) {
1133
+ const i = ge(e), r = it(e, t, n);
1134
+ return i.length > r.length;
1089
1135
  }
1090
- function Dt(e, t, n) {
1091
- const s = le(e), i = Xe(e, t, n);
1092
- return s.length - i.length;
1136
+ function Ft(e, t, n) {
1137
+ const i = ge(e), r = it(e, t, n);
1138
+ return i.length - r.length;
1093
1139
  }
1094
- function Et(e) {
1140
+ function Wt(e) {
1095
1141
  const t = e.toLowerCase(), n = {
1096
1142
  "high priority": "var(--shifl-color-error-r70)",
1097
1143
  express: "var(--shifl-color-primary-b80)",
@@ -1106,18 +1152,18 @@ const Gn = /* @__PURE__ */ U(En, [["render", Bn]]), In = { class: "shifl-grid re
1106
1152
  };
1107
1153
  if (n[t])
1108
1154
  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);
1155
+ for (const [i, r] of Object.entries(n))
1156
+ if (t.includes(i) || i.includes(t))
1157
+ return r;
1158
+ return Kt(e);
1113
1159
  }
1114
- function tt(e) {
1115
- return e.color && e.color !== "" ? e.color : Et(e.name);
1160
+ function at(e) {
1161
+ return e.color && e.color !== "" ? e.color : Wt(e.name);
1116
1162
  }
1117
- function Vt(e) {
1163
+ function Kt(e) {
1118
1164
  let t = 0;
1119
- for (let s = 0; s < e.length; s++)
1120
- t = e.charCodeAt(s) + ((t << 5) - t);
1165
+ for (let i = 0; i < e.length; i++)
1166
+ t = e.charCodeAt(i) + ((t << 5) - t);
1121
1167
  const n = [
1122
1168
  "var(--shifl-color-primary-b80)",
1123
1169
  "var(--shifl-color-success-g70)",
@@ -1130,88 +1176,91 @@ const Gn = /* @__PURE__ */ U(En, [["render", Bn]]), In = { class: "shifl-grid re
1130
1176
  ];
1131
1177
  return n[Math.abs(t) % n.length];
1132
1178
  }
1133
- function Le(e, t = !0) {
1134
- const s = { ...{
1179
+ function De(e, t = !0) {
1180
+ const i = { ...{
1135
1181
  width: e.width ?? "160px",
1136
1182
  minWidth: e.width ?? "160px"
1137
- } }, i = Ze.value > 0;
1183
+ } }, r = qe.value > 0;
1138
1184
  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;
1185
+ const v = Pt.value[e.key] ?? 0;
1186
+ 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
1187
  }
1142
- return t && (s.position = "sticky", s.top = "0px"), s;
1188
+ return t && (i.position = "sticky", i.top = "0px"), i;
1143
1189
  }
1144
- const Bt = k(() => S.value.filter((e) => !e.smartTrackingColumn));
1145
- function ue(e) {
1190
+ const Jt = k(() => T.value.filter((e) => !e.smartTrackingColumn));
1191
+ function he(e) {
1146
1192
  return !!e.actionColumn;
1147
1193
  }
1148
- function Ae(e) {
1194
+ function Ve(e) {
1149
1195
  return !!e.smartTrackingColumn;
1150
1196
  }
1151
- function Gt(e, t) {
1197
+ function qt(e) {
1198
+ return e.key === "ref";
1199
+ }
1200
+ function Ut(e, t) {
1152
1201
  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";
1202
+ const n = e.smartTrackingColumn.dataKey, i = t[n];
1203
+ if (i === !0 || i === 1) return !0;
1204
+ if (typeof i == "string") {
1205
+ const r = i.toLowerCase().trim();
1206
+ return r === "true" || r === "1" || r === "yes";
1158
1207
  }
1159
1208
  return !1;
1160
1209
  }
1161
- function ce(e, t) {
1210
+ function pe(e, t) {
1162
1211
  if (!e.actionColumn) return null;
1163
1212
  const n = e.actionColumn.icon;
1164
1213
  return n ? typeof n == "function" ? n(t) : n : null;
1165
1214
  }
1166
- function It(e, t, n, s) {
1215
+ function Yt(e, t, n, i) {
1167
1216
  if (!n.actionColumn) return;
1168
- const i = s.currentTarget;
1169
- if (H.value.rowIndex === e) {
1170
- Y();
1217
+ const r = i.currentTarget;
1218
+ if (z.value.rowIndex === e) {
1219
+ Q();
1171
1220
  return;
1172
1221
  }
1173
- Ee.value = n, pe.value = t, ae(e, i);
1222
+ Oe.value = n, Ce.value = t, ae(e, r);
1174
1223
  }
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);
1224
+ function Qt(e, t) {
1225
+ 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
1226
  }
1178
- function Zt(e, t, n) {
1179
- _("action-click", e.key, t, n), Y();
1227
+ function Xt(e, t, n) {
1228
+ y("action-click", e.key, t, n), Q();
1180
1229
  }
1181
- function jt(e, t) {
1182
- t && (oe.value[e] = t);
1230
+ function en(e, t) {
1231
+ t && (le.value[e] = t);
1183
1232
  }
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();
1233
+ function lt(e) {
1234
+ if (z.value.rowIndex === null) return;
1235
+ const t = e.target, n = Ge.value, i = Object.values(le.value), r = n == null ? void 0 : n.contains(t), v = i.some(($) => $.contains(t));
1236
+ !r && !v && Q();
1188
1237
  }
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", {
1238
+ return ye(() => {
1239
+ document.addEventListener("click", lt), document.addEventListener("scroll", q), window.addEventListener("scroll", q), window.addEventListener("resize", q);
1240
+ }), be(() => {
1241
+ document.removeEventListener("click", lt), document.removeEventListener("scroll", q), window.removeEventListener("scroll", q), window.removeEventListener("resize", q);
1242
+ }), (e, t) => (a(), l("div", tr, [
1243
+ d("div", nr, [
1244
+ d("button", {
1196
1245
  type: "button",
1197
1246
  class: "shifl-grid__pill-button whitespace-nowrap",
1198
- onClick: t[0] || (t[0] = (n) => I.value = !0)
1247
+ onClick: t[0] || (t[0] = (n) => G.value = !0)
1199
1248
  }, " Edit Column ")
1200
1249
  ]),
1201
- g("div", {
1202
- class: G(["shifl-grid__viewport", { "shifl-grid__viewport--scroll": dt.value }]),
1203
- onScroll: kt
1250
+ d("div", {
1251
+ class: Z(["shifl-grid__viewport", { "shifl-grid__viewport--scroll": yt.value }]),
1252
+ onScroll: $t
1204
1253
  }, [
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", {
1254
+ d("table", rr, [
1255
+ d("thead", null, [
1256
+ d("tr", null, [
1257
+ (a(!0), l(H, null, B(ee.value, (n) => {
1258
+ var i;
1259
+ return a(), l("th", {
1211
1260
  key: n.key,
1212
- style: K(Le(n, !0)),
1213
- onClick: () => Ct(n.key),
1214
- class: G([
1261
+ style: j(De(n, !0)),
1262
+ onClick: () => Lt(n.key),
1263
+ class: Z([
1215
1264
  "shifl-grid__header-cell",
1216
1265
  `shifl-grid__header-align-${n != null && n.align ? n.align : "left"}`,
1217
1266
  {
@@ -1221,163 +1270,178 @@ const Gn = /* @__PURE__ */ U(En, [["render", Bn]]), In = { class: "shifl-grid re
1221
1270
  }
1222
1271
  ])
1223
1272
  }, [
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)
1273
+ d("div", ir, [
1274
+ n.label ? (a(), l("span", or, L(n.label), 1)) : R("", !0),
1275
+ ((i = V(x)) == null ? void 0 : i.key) === n.key && !he(n) && !Ve(n) ? (a(), l("span", ar, [
1276
+ V(x).order === "asc" ? (a(), I(Bn, { key: 0 })) : (a(), I(On, { key: 1 }))
1277
+ ])) : R("", !0)
1229
1278
  ])
1230
- ], 14, jn);
1279
+ ], 14, sr);
1231
1280
  }), 128))
1232
1281
  ])
1233
1282
  ]),
1234
- g("tbody", null, [
1235
- W.value ? (o(!0), l(x, { key: 0 }, V(gt.value, (n) => (o(), l("tr", {
1283
+ d("tbody", null, [
1284
+ U.value ? (a(!0), l(H, { key: 0 }, B(bt.value, (n) => (a(), l("tr", {
1236
1285
  key: `skeleton-${n}`,
1237
1286
  class: "shifl-grid__skeleton-row"
1238
1287
  }, [
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 })
1288
+ (a(!0), l(H, null, B(ee.value, (i) => (a(), l("td", {
1289
+ key: i.key,
1290
+ style: j(De(i, !1)),
1291
+ class: Z({ "shifl-grid__cell--sticky": i.freeze })
1243
1292
  }, [...t[6] || (t[6] = [
1244
- g("div", { class: "shifl-grid__skeleton-cell" }, null, -1)
1293
+ d("div", { class: "shifl-grid__skeleton-cell" }, null, -1)
1245
1294
  ])], 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,
1295
+ ]))), 128)) : (a(), l(H, { key: 1 }, [
1296
+ Fe.value.length ? R("", !0) : (a(), l("tr", lr, [
1297
+ d("td", {
1298
+ colspan: ee.value.length,
1250
1299
  class: "text-center text-gray-500 py-6"
1251
- }, " No data ", 8, qn)
1300
+ }, " No data ", 8, ur)
1252
1301
  ])),
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" }
1302
+ (a(!0), l(H, null, B(Fe.value, (n, i) => (a(), l("tr", { key: i }, [
1303
+ (a(!0), l(H, null, B(ee.value, (r) => (a(), l("td", {
1304
+ key: r.key,
1305
+ style: j(De(r, !1)),
1306
+ class: Z([
1307
+ { "shifl-grid__cell--sticky": r.freeze },
1308
+ { "shifl-grid__cell--action": he(r) },
1309
+ `shifl-grid__cell-align-${r != null && r.align ? r.align : "left"}`,
1310
+ { "shifl-grid__icon": r.cellType === "icon" }
1262
1311
  ])
1263
1312
  }, [
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", {
1313
+ Ve(r) ? (a(), l(H, { key: 0 }, [
1314
+ Ut(r, n) ? (a(), l("div", cr, [
1315
+ me(Rn)
1316
+ ])) : R("", !0)
1317
+ ], 64)) : he(r) ? (a(), l("button", {
1269
1318
  key: 1,
1270
1319
  type: "button",
1271
1320
  class: "shifl-grid__action-icon",
1272
1321
  ref_for: !0,
1273
- ref: (y) => jt(s, y),
1274
- onClick: q((y) => It(s, n, i, y), ["stop"])
1322
+ ref: (v) => en(i, v),
1323
+ onClick: K((v) => Yt(i, n, r, v), ["stop"])
1275
1324
  }, [
1276
- ce(i, n) ? typeof ce(i, n) == "string" ? (o(), l("span", {
1325
+ pe(r, n) ? typeof pe(r, n) == "string" ? (a(), l("span", {
1277
1326
  key: 1,
1278
- innerHTML: ce(i, n),
1327
+ innerHTML: pe(r, n),
1279
1328
  class: "w-4 h-4 inline-block"
1280
- }, null, 8, Xn)) : (o(), Z(fe(ce(i, n)), {
1329
+ }, null, 8, gr)) : (a(), I(ve(pe(r, n)), {
1281
1330
  key: 2,
1282
1331
  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])), {
1332
+ })) : (a(), l("span", dr, "⋯"))
1333
+ ], 8, fr)) : Et(r) ? (a(), l("div", hr, [
1334
+ (a(!0), l(H, null, B(Rt(r), (v, $) => (a(), l(H, { key: $ }, [
1335
+ v === "icon" ? (a(), I(ve(et(n[r.key])), {
1287
1336
  key: 0,
1288
1337
  class: "shifl-grid__type-icon"
1289
- })) : (o(), l("span", {
1338
+ })) : (a(), l("span", {
1290
1339
  key: 1,
1291
- class: G(Lt(y))
1292
- }, $(Ue(n[i.key], y, i)), 3))
1340
+ class: Z(zt(v))
1341
+ }, L(nt(n[r.key], v, r)), 3))
1293
1342
  ], 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", {
1343
+ ])) : Ht(r) ? (a(), l("div", pr, [
1344
+ (a(), I(ve(et(n[r.key])), { class: "shifl-grid__type-icon" })),
1345
+ n.container_count != null ? (a(), l("span", mr, " (" + L(n.container_count) + ") ", 1)) : R("", !0)
1346
+ ])) : tt(r) ? (a(), l(H, { key: 4 }, [
1347
+ n[r.key] == null || ot(n[r.key], r.key, i).length === 0 ? (a(), l("div", vr, L(ne(r.blankStyle)), 1)) : (a(), l("div", _r, [
1348
+ d("div", yr, [
1349
+ d("div", {
1301
1350
  ref_for: !0,
1302
1351
  ref: "(el) => setTagsRef(col.key, rowIndex, el as HTMLElement)",
1303
1352
  class: "shifl-grid__chips-container shifl-grid__chips-container--single-line"
1304
1353
  }, [
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,
1354
+ (a(!0), l(H, null, B(ot(
1355
+ n[r.key],
1356
+ r.key,
1357
+ i
1358
+ ), (v, $) => (a(), l("span", {
1359
+ key: $,
1311
1360
  class: "shifl-grid__chip shifl-grid__chip--tag",
1312
- style: K({ borderLeftColor: tt(y) })
1313
- }, $(y.name), 5))), 128))
1361
+ style: j({ borderLeftColor: at(v) })
1362
+ }, L(v.name), 5))), 128))
1314
1363
  ], 512)
1315
1364
  ]),
1316
- zt(n[i.key], i.key, s) ? (o(), l("button", {
1365
+ jt(n[r.key], r.key, i) ? (a(), l("button", {
1317
1366
  key: 0,
1318
1367
  type: "button",
1319
1368
  class: "shifl-grid__counter-button",
1320
- onMouseenter: (y) => Pe(
1321
- i.key,
1322
- s,
1323
- n[i.key],
1324
- y.currentTarget
1369
+ onMouseenter: (v) => Ee(
1370
+ r.key,
1371
+ i,
1372
+ n[r.key],
1373
+ v.currentTarget
1325
1374
  ),
1326
- onMouseleave: $e
1327
- }, " +" + $(Dt(n[i.key], i.key, s)), 41, ar)) : D("", !0)
1375
+ onMouseleave: Re
1376
+ }, " +" + L(Ft(n[r.key], r.key, i)), 41, br)) : R("", !0)
1328
1377
  ]))
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,
1378
+ ], 64)) : xt(r) ? (a(), l("div", kr, [
1379
+ (a(!0), l(H, null, B(ge(n[r.key]), (v, $) => (a(), l("span", {
1380
+ key: $,
1332
1381
  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", {
1382
+ }, L(v), 1))), 128))
1383
+ ])) : r.truncate !== !1 && (r.truncate === !0 || At(r.key)) ? (a(), l("div", Cr, [
1384
+ d("span", {
1336
1385
  class: "shifl-grid__truncated-text",
1337
1386
  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", {
1387
+ ref: (v) => Ot(r.key, i, v)
1388
+ }, L(Dt(n[r.key], r)), 513),
1389
+ He(r.key) && Bt(n[r.key]) ? (a(), l("button", {
1341
1390
  key: 0,
1342
1391
  type: "button",
1343
1392
  class: "shifl-grid__counter-button",
1344
- onMouseenter: (y) => Pe(
1345
- i.key,
1346
- s,
1347
- n[i.key],
1348
- y.currentTarget
1393
+ onMouseenter: (v) => Ee(
1394
+ r.key,
1395
+ i,
1396
+ n[r.key],
1397
+ v.currentTarget
1349
1398
  ),
1350
- onMouseleave: $e
1351
- }, " +" + $(Rt(n[i.key])), 41, ur)) : !Te(i.key) && Nt(n[i.key], i.key) ? (o(), l("button", {
1399
+ onMouseleave: Re
1400
+ }, " +" + L(It(n[r.key])), 41, wr)) : !He(r.key) && Vt(n[r.key], r.key) ? (a(), l("button", {
1352
1401
  key: 1,
1353
1402
  type: "button",
1354
1403
  class: "shifl-grid__info-icon-button",
1355
- onMouseenter: (y) => Pe(
1356
- i.key,
1357
- s,
1358
- n[i.key],
1359
- y.currentTarget
1404
+ onMouseenter: (v) => Ee(
1405
+ r.key,
1406
+ i,
1407
+ n[r.key],
1408
+ v.currentTarget
1360
1409
  ),
1361
- onMouseleave: $e
1410
+ onMouseleave: Re
1362
1411
  }, [
1363
- Ne(Gn)
1364
- ], 40, cr)) : D("", !0)
1365
- ])) : i.cellType === "link" ? (o(), l("a", {
1412
+ me(Un)
1413
+ ], 40, Mr)) : R("", !0)
1414
+ ])) : r.cellType === "link" ? (a(), l("a", {
1366
1415
  key: 7,
1367
- href: String(n[i.key] || ""),
1416
+ href: String(n[r.key] || ""),
1368
1417
  class: "shifl-grid__link-cell",
1369
- onClick: t[1] || (t[1] = q(() => {
1418
+ onClick: t[1] || (t[1] = K(() => {
1370
1419
  }, ["stop"]))
1371
- }, $(Se(n[i.key], i)), 9, fr)) : i.cellType === "progress" ? (o(), l("div", dr, [
1372
- g("div", gr, [
1373
- g("div", {
1420
+ }, L(de(n[r.key], r)), 9, Tr)) : r.cellType === "progress" ? (a(), l("div", Sr, [
1421
+ d("div", Pr, [
1422
+ d("div", {
1374
1423
  class: "shifl-grid__progress-fill",
1375
- style: K({ width: `${Mt(n[i.key])}%` })
1424
+ style: j({ width: `${Nt(n[r.key])}%` })
1376
1425
  }, null, 4)
1377
1426
  ]),
1378
- g("span", hr, $(Se(n[i.key], i)), 1)
1379
- ])) : (o(), l(x, { key: 9 }, [
1380
- se($(Se(n[i.key], i)), 1)
1427
+ d("span", $r, L(de(n[r.key], r)), 1)
1428
+ ])) : qt(r) ? (a(), l("div", {
1429
+ key: 9,
1430
+ class: "shifl-grid__reference-cell",
1431
+ onMouseenter: (v) => Zt(String(n[r.key] || ""), v.currentTarget),
1432
+ onMouseleave: ze
1433
+ }, [
1434
+ d("span", Nr, L(de(n[r.key], r)), 1),
1435
+ n[r.key] ? (a(), l("button", {
1436
+ key: 0,
1437
+ class: "shifl-grid__copy-icon",
1438
+ onClick: K(() => Gt(String(n[r.key] || "")), ["stop"]),
1439
+ type: "button"
1440
+ }, [
1441
+ me(er)
1442
+ ], 8, Ar)) : R("", !0)
1443
+ ], 40, Lr)) : (a(), l(H, { key: 10 }, [
1444
+ ie(L(de(n[r.key], r)), 1)
1381
1445
  ], 64))
1382
1446
  ], 6))), 128))
1383
1447
  ]))), 128))
@@ -1385,130 +1449,145 @@ const Gn = /* @__PURE__ */ U(En, [["render", Bn]]), In = { class: "shifl-grid re
1385
1449
  ])
1386
1450
  ])
1387
1451
  ], 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)
1452
+ D.value && D.value.show !== !1 ? (a(), l("div", xr, [
1453
+ d("div", Hr, [
1454
+ d("span", Er, [
1455
+ t[7] || (t[7] = ie(" Showing ", -1)),
1456
+ d("span", Rr, L(We.value.from) + "–" + L(We.value.to), 1),
1457
+ ie(" of " + L(Le.value), 1)
1394
1458
  ])
1395
1459
  ]),
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,
1460
+ d("div", zr, [
1461
+ d("div", Dr, [
1462
+ t[9] || (t[9] = d("label", { class: "shifl-grid__pagination-label" }, "Row per page", -1)),
1463
+ d("select", {
1464
+ value: D.value.perPage || 20,
1465
+ disabled: U.value,
1466
+ onChange: Tt,
1403
1467
  class: "shifl-grid__pagination-select"
1404
1468
  }, [...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)
1469
+ tn('<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)
1470
+ ])], 40, Vr)
1407
1471
  ]),
1408
- g("div", Cr, [
1409
- g("button", {
1472
+ d("div", Br, [
1473
+ d("button", {
1410
1474
  type: "button",
1411
1475
  class: "shifl-grid__pagination-button",
1412
- disabled: Ie.value || d.loading,
1413
- onClick: mt,
1476
+ disabled: Ke.value || g.loading,
1477
+ onClick: wt,
1414
1478
  "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", {
1479
+ }, " ‹ ", 8, Ir),
1480
+ d("div", Zr, [
1481
+ (a(!0), l(H, null, B(kt.value, (n) => (a(), l(H, { key: n }, [
1482
+ n !== -1 ? (a(), l("button", {
1419
1483
  key: 0,
1420
1484
  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, "…"))
1485
+ class: Z(["shifl-grid__pagination-page", { "shifl-grid__pagination-page--active": n === Y.value }]),
1486
+ disabled: U.value,
1487
+ onClick: (i) => Ct(n)
1488
+ }, L(n), 11, Gr)) : (a(), l("span", Or, "…"))
1425
1489
  ], 64))), 128))
1426
1490
  ]),
1427
- g("button", {
1491
+ d("button", {
1428
1492
  type: "button",
1429
1493
  class: "shifl-grid__pagination-button",
1430
- disabled: Oe.value || d.loading,
1431
- onClick: vt,
1494
+ disabled: Je.value || g.loading,
1495
+ onClick: Mt,
1432
1496
  "aria-label": "Next page"
1433
- }, " › ", 8, Pr)
1497
+ }, " › ", 8, jr)
1434
1498
  ])
1435
1499
  ])
1436
- ])) : D("", !0),
1437
- (o(), Z(He, { to: "body" }, [
1438
- E(H).rowIndex !== null && E(H).position ? (o(), l("div", {
1500
+ ])) : R("", !0),
1501
+ (a(), I(_e, { to: "body" }, [
1502
+ V(z).rowIndex !== null && V(z).position ? (a(), l("div", {
1439
1503
  key: 0,
1440
1504
  ref_key: "actionMenuRef",
1441
- ref: De,
1505
+ ref: Ge,
1442
1506
  class: "shifl-grid__action-menu",
1443
- style: K(`
1507
+ style: j(`
1444
1508
  position: fixed !important;
1445
- top: ${E(H).position.top}px !important;
1446
- left: ${E(H).position.left}px !important;
1509
+ top: ${V(z).position.top}px !important;
1510
+ left: ${V(z).position.left}px !important;
1447
1511
  z-index: 1000 !important;`),
1448
- onClick: t[2] || (t[2] = q(() => {
1512
+ onClick: t[2] || (t[2] = K(() => {
1449
1513
  }, ["stop"]))
1450
1514
  }, [
1451
- (o(!0), l(x, null, V(Ot(Ee.value, pe.value), (n) => (o(), l("div", {
1515
+ (a(!0), l(H, null, B(Qt(Oe.value, Ce.value), (n) => (a(), l("div", {
1452
1516
  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)
1517
+ class: Z(["shifl-grid__action-menu-item", { "shifl-grid__action-menu-item--danger": n.danger }]),
1518
+ onClick: () => Xt(n, Ce.value, V(z).rowIndex)
1455
1519
  }, [
1456
- n.icon && typeof n.icon == "string" ? (o(), l("span", {
1520
+ n.icon && typeof n.icon == "string" ? (a(), l("span", {
1457
1521
  key: 0,
1458
1522
  innerHTML: n.icon,
1459
1523
  class: "w-4 h-4 inline-block"
1460
- }, null, 8, Lr)) : n.icon ? (o(), Z(fe(typeof n.icon == "function" ? n.icon() : n.icon), {
1524
+ }, null, 8, Wr)) : n.icon ? (a(), I(ve(typeof n.icon == "function" ? n.icon() : n.icon), {
1461
1525
  key: 1,
1462
1526
  class: "w-4 h-4"
1463
- })) : D("", !0),
1464
- g("span", null, $(n.label), 1)
1465
- ], 10, $r))), 128))
1466
- ], 4)) : D("", !0)
1527
+ })) : R("", !0),
1528
+ d("span", null, L(n.label), 1)
1529
+ ], 10, Fr))), 128))
1530
+ ], 4)) : R("", !0)
1467
1531
  ])),
1468
- Ne(kn, {
1469
- content: Ve.value,
1470
- visible: me.value,
1471
- "trigger-element": ve.value,
1472
- "is-html": _e.value
1532
+ me(An, {
1533
+ content: je.value,
1534
+ visible: we.value,
1535
+ "trigger-element": Me.value,
1536
+ "is-html": Te.value
1473
1537
  }, null, 8, ["content", "visible", "trigger-element", "is-html"]),
1474
- (o(), Z(He, { to: "body" }, [
1475
- I.value ? (o(), Z(vn, {
1538
+ (a(), I(_e, { to: "body" }, [
1539
+ ue.value ? (a(), l("div", {
1540
+ key: 0,
1541
+ class: "shifl-grid__copy-tooltip",
1542
+ style: j({
1543
+ position: "fixed",
1544
+ top: `${Se.value.top}px`,
1545
+ left: `${Se.value.left}px`,
1546
+ zIndex: "10000"
1547
+ })
1548
+ }, [
1549
+ t[10] || (t[10] = d("div", { class: "shifl-grid__copy-tooltip-arrow" }, null, -1)),
1550
+ d("div", Kr, L(ce.value), 1)
1551
+ ], 4)) : R("", !0)
1552
+ ])),
1553
+ (a(), I(_e, { to: "body" }, [
1554
+ G.value ? (a(), I(Pn, {
1476
1555
  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)
1556
+ "title-prefix": o.config.name,
1557
+ columns: Jt.value,
1558
+ onClose: t[3] || (t[3] = (n) => G.value = !1),
1559
+ onToggle: V(u),
1560
+ onToggleFreeze: V(C),
1561
+ onMove: V(A),
1562
+ onSelectAll: t[4] || (t[4] = (n) => V(h)(!0)),
1563
+ onDeselectAll: t[5] || (t[5] = (n) => V(h)(!1)),
1564
+ onRestoreDefault: V(N)
1565
+ }, null, 8, ["title-prefix", "columns", "onToggle", "onToggleFreeze", "onMove", "onRestoreDefault"])) : R("", !0)
1487
1566
  ]))
1488
1567
  ]));
1489
1568
  }
1490
- }), xr = {
1491
- install(a) {
1492
- a.component("ShiflGrid", Ar);
1569
+ }), Ur = {
1570
+ install(o) {
1571
+ o.component("ShiflGrid", Jr);
1493
1572
  }
1494
1573
  };
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;
1574
+ function Yr() {
1575
+ const o = _(/* @__PURE__ */ new Set());
1576
+ function s(g) {
1577
+ const y = g.id ?? JSON.stringify(g), c = new Set(o.value);
1578
+ c.has(y) ? c.delete(y) : c.add(y), o.value = c;
1500
1579
  }
1501
1580
  return {
1502
- selectedKeys: a,
1503
- toggleRow: r
1581
+ selectedKeys: o,
1582
+ toggleRow: s
1504
1583
  };
1505
1584
  }
1506
- function Hr() {
1585
+ function Qr() {
1507
1586
  return {
1508
1587
  // placeholder
1509
1588
  };
1510
1589
  }
1511
- const ut = Symbol("shifl-grid-theme"), ct = {
1590
+ const pt = Symbol("shifl-grid-theme"), mt = {
1512
1591
  surface: "var(--shifl-surface)",
1513
1592
  surfaceAlt: "var(--shifl-surface-alt)",
1514
1593
  border: "var(--shifl-border)",
@@ -1518,61 +1597,61 @@ const ut = Symbol("shifl-grid-theme"), ct = {
1518
1597
  accentStrong: "var(--shifl-accent-strong)",
1519
1598
  focus: "var(--shifl-focus)"
1520
1599
  };
1521
- function zr(a) {
1522
- const r = b({ ...ct, ...a });
1523
- return Kt(ut, r), r;
1600
+ function Xr(o) {
1601
+ const s = _({ ...mt, ...o });
1602
+ return nn(pt, s), s;
1524
1603
  }
1525
- function Dr() {
1526
- const a = Wt(ut);
1527
- return k(() => (a == null ? void 0 : a.value) ?? ct);
1604
+ function es() {
1605
+ const o = rn(pt);
1606
+ return k(() => (o == null ? void 0 : o.value) ?? mt);
1528
1607
  }
1529
- const xe = {
1608
+ const Be = {
1530
1609
  sm: 640,
1531
1610
  lg: 1024
1532
1611
  };
1533
- function Er() {
1534
- const a = b(typeof window < "u" ? window.innerWidth : 0);
1535
- function r() {
1536
- a.value = window.innerWidth;
1612
+ function ts() {
1613
+ const o = _(typeof window < "u" ? window.innerWidth : 0);
1614
+ function s() {
1615
+ o.value = window.innerWidth;
1537
1616
  }
1538
- return de(() => {
1539
- window.addEventListener("resize", r);
1540
- }), ge(() => {
1541
- window.removeEventListener("resize", r);
1617
+ return ye(() => {
1618
+ window.addEventListener("resize", s);
1619
+ }), be(() => {
1620
+ window.removeEventListener("resize", s);
1542
1621
  }), {
1543
- width: a,
1544
- isMobile: k(() => a.value < xe.sm),
1545
- isTablet: k(() => a.value >= xe.sm && a.value < xe.lg)
1622
+ width: o,
1623
+ isMobile: k(() => o.value < Be.sm),
1624
+ isTablet: k(() => o.value >= Be.sm && o.value < Be.lg)
1546
1625
  };
1547
1626
  }
1548
- function Vr() {
1627
+ function ns() {
1549
1628
  return {
1550
1629
  // placeholder
1551
1630
  };
1552
1631
  }
1553
- function Br() {
1632
+ function rs() {
1554
1633
  return {
1555
1634
  // placeholder
1556
1635
  };
1557
1636
  }
1558
- function Gr() {
1637
+ function ss() {
1559
1638
  return {
1560
1639
  // placeholder
1561
1640
  };
1562
1641
  }
1563
1642
  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
1643
+ Jr as ShiflGrid,
1644
+ Ur as ShiflGridPlugin,
1645
+ Xr as provideGridTheme,
1646
+ ts as useBreakpoints,
1647
+ on as useGridColumns,
1648
+ fn as useGridData,
1649
+ Qr as useGridEditing,
1650
+ ln as useGridFilter,
1651
+ ns as useGridInfiniteScroll,
1652
+ Yr as useGridSelection,
1653
+ an as useGridSort,
1654
+ es as useGridTheme,
1655
+ ss as useGridTour,
1656
+ rs as useVirtualScroll
1578
1657
  };