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