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