@shifl-inc/ui 0.6.0 → 0.8.0

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