@serkonda7/solid-components 0.4.0 → 0.4.1
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/combobox.d.ts +5 -0
- package/dist/data-table.d.ts +5 -0
- package/dist/index.js +524 -492
- package/dist/styles.css +9 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { Dynamic as e, className as t, createComponent as n, delegateEvents as r, effect as i, insert as a, memo as o, mergeProps as s, setAttribute as c, spread as l, style as u, template as d, use as f } from "solid-js/web";
|
|
2
|
-
import { For as p, Show as m, children as h, createEffect as g, createMemo as _, createSignal as v, createUniqueId as
|
|
3
|
-
import { columnFilteringFeature as
|
|
2
|
+
import { For as p, Show as m, children as h, createEffect as g, createMemo as _, createSignal as v, createUniqueId as y, on as b, onCleanup as x, onMount as S, splitProps as C, untrack as w } from "solid-js";
|
|
3
|
+
import { columnFilteringFeature as T, columnOrderingFeature as E, columnSizingFeature as D, columnVisibilityFeature as O, createFilteredRowModel as k, createSortedRowModel as A, createTable as ee, filterFn_includesString as j, functionalUpdate as M, globalFilteringFeature as te, rowSortingFeature as N, tableFeatures as P } from "@tanstack/solid-table";
|
|
4
4
|
// src/color-input.tsx
|
|
5
|
-
var
|
|
6
|
-
function
|
|
5
|
+
var F = /*#__PURE__*/ d("<div><input type=color class=color-input-picker><input class=color-input-text autocomplete=off>");
|
|
6
|
+
function ne(e) {
|
|
7
7
|
let t = /^#?([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(e.trim())?.[1]?.toLowerCase();
|
|
8
8
|
if (t) return `#${t.length === 3 ? t.replace(/./g, "$&$&") : t}`;
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function I(e) {
|
|
11
11
|
let [n, r] = v();
|
|
12
12
|
return (() => {
|
|
13
|
-
var a =
|
|
13
|
+
var a = F(), o = a.firstChild, s = o.nextSibling;
|
|
14
14
|
return o.$$input = (t) => e.onInput(t.currentTarget.value), s.addEventListener("blur", () => r(void 0)), s.$$input = (t) => {
|
|
15
15
|
let n = t.currentTarget.value;
|
|
16
16
|
r(n);
|
|
17
|
-
let i =
|
|
17
|
+
let i = ne(n);
|
|
18
18
|
i && e.onInput(i);
|
|
19
19
|
}, c(s, "spellcheck", !1), i((n) => {
|
|
20
20
|
var r = e.class ? `color-input ${e.class}` : "color-input", i = e.pickerLabel ?? "Pick color", l = e.disabled, u = e.ariaLabel ?? "Color", d = e.disabled;
|
|
@@ -25,12 +25,12 @@ function ie(e) {
|
|
|
25
25
|
a: void 0,
|
|
26
26
|
o: void 0,
|
|
27
27
|
i: void 0
|
|
28
|
-
}), i(() => o.value =
|
|
28
|
+
}), i(() => o.value = ne(e.value) ?? "#000000"), i(() => s.value = n() ?? e.value), a;
|
|
29
29
|
})();
|
|
30
30
|
}
|
|
31
31
|
r(["input"]);
|
|
32
32
|
// node_modules/@tabler/icons-solidjs/dist/source/defaultAttributes.js
|
|
33
|
-
var
|
|
33
|
+
var L = {
|
|
34
34
|
outline: {
|
|
35
35
|
xmlns: "http://www.w3.org/2000/svg",
|
|
36
36
|
width: 24,
|
|
@@ -50,9 +50,9 @@ var ae = {
|
|
|
50
50
|
fill: "currentColor",
|
|
51
51
|
stroke: "none"
|
|
52
52
|
}
|
|
53
|
-
},
|
|
53
|
+
}, re = /*#__PURE__*/ d("<svg>"), ie = /*#__PURE__*/ d("<title>"), R = (t, r, i, c) => {
|
|
54
54
|
let u = (i) => {
|
|
55
|
-
let [u, d] =
|
|
55
|
+
let [u, d] = C(i, [
|
|
56
56
|
"color",
|
|
57
57
|
"size",
|
|
58
58
|
"stroke",
|
|
@@ -60,9 +60,9 @@ var ae = {
|
|
|
60
60
|
"title",
|
|
61
61
|
"children",
|
|
62
62
|
"class"
|
|
63
|
-
]), f =
|
|
63
|
+
]), f = L[t], p = u.stroke ?? u.strokeWidth;
|
|
64
64
|
return (() => {
|
|
65
|
-
var i =
|
|
65
|
+
var i = re();
|
|
66
66
|
return l(i, s(f, d, {
|
|
67
67
|
get width() {
|
|
68
68
|
return o(() => u.size != null)() ? u.size : f.width;
|
|
@@ -79,58 +79,58 @@ var ae = {
|
|
|
79
79
|
}), !0, !0), a(i, (() => {
|
|
80
80
|
var e = o(() => u.title != null);
|
|
81
81
|
return () => e() && (() => {
|
|
82
|
-
var e =
|
|
82
|
+
var e = ie();
|
|
83
83
|
return a(e, () => u.title), e;
|
|
84
84
|
})();
|
|
85
85
|
})(), null), a(i, () => c.map(([t, r]) => n(e, s({ component: t }, r))), null), a(i, () => u.children, null), i;
|
|
86
86
|
})();
|
|
87
87
|
};
|
|
88
88
|
return u.displayName = `${i}`, u;
|
|
89
|
-
},
|
|
90
|
-
function
|
|
91
|
-
let s, l,
|
|
89
|
+
}, ae = R("outline", "chevron-down", "ChevronDown", [["path", { d: "M6 9l6 6l6 -6" }]]), oe = R("outline", "plus", "Plus", [["path", { d: "M12 5l0 14" }], ["path", { d: "M5 12l14 0" }]]), se = /*#__PURE__*/ d("<span class=combobox-detail>"), ce = /*#__PURE__*/ d("<div role=option class=combobox-option><span class=combobox-option-label>"), le = /*#__PURE__*/ d("<span class=combobox-option-icon aria-hidden=true>"), ue = /*#__PURE__*/ d("<div role=option class=\"combobox-option combobox-option-add\">"), de = /*#__PURE__*/ d("<div class=combobox-list role=listbox>"), z = /*#__PURE__*/ d("<div class=combobox-empty>"), B = /*#__PURE__*/ d("<span class=combobox-value aria-hidden=true><span class=combobox-option-label></span><span class=combobox-detail>"), fe = /*#__PURE__*/ d("<div><input class=combobox-input role=combobox aria-autocomplete=list autocomplete=off>"), V = /*#__PURE__*/ d("<span class=combobox-icon aria-hidden=true>"), pe = /*#__PURE__*/ d("<div class=combobox-preview aria-hidden=true>");
|
|
90
|
+
function H(r) {
|
|
91
|
+
let s, l, d = y(), h = () => r.id ?? d, b = () => `${h()}-listbox`, x = (e) => `${h()}-option-${e}`, [C, w] = v(!1), [T, E] = v(""), [D, O] = v(0), [k, A] = v(), ee = _(() => r.emptyLabel === void 0 ? r.options : [{
|
|
92
92
|
value: "",
|
|
93
93
|
label: r.emptyLabel
|
|
94
|
-
}, ...r.options]),
|
|
95
|
-
let e =
|
|
96
|
-
return e === "" ?
|
|
97
|
-
}), te = () => r.options.some((e) => e.detail !== void 0),
|
|
98
|
-
|
|
94
|
+
}, ...r.options]), j = _(() => r.value === "" ? void 0 : ee().find((e) => String(e.value) === r.value)), M = _(() => {
|
|
95
|
+
let e = T().trim().toLowerCase();
|
|
96
|
+
return e === "" ? ee() : ee().filter((t) => t.label.toLowerCase().includes(e) || (t.detail?.toLowerCase().includes(e) ?? !1));
|
|
97
|
+
}), te = () => r.options.some((e) => e.detail !== void 0), N = () => M().length, P = () => M().length + +!!r.onAdd, F = () => !r.disabled && r.onChange !== void 0, ne = () => M()[D()]?.preview;
|
|
98
|
+
S(() => {
|
|
99
99
|
r.autofocus === !0 && s?.focus();
|
|
100
100
|
}), g(() => {
|
|
101
|
-
|
|
101
|
+
C() && l?.querySelector(`[data-index="${D()}"]`)?.scrollIntoView({ block: "nearest" });
|
|
102
102
|
});
|
|
103
|
-
function
|
|
104
|
-
if (
|
|
105
|
-
|
|
106
|
-
let e =
|
|
107
|
-
|
|
108
|
-
}
|
|
109
|
-
function
|
|
110
|
-
if (
|
|
111
|
-
r.onAdd(
|
|
103
|
+
function I() {
|
|
104
|
+
if (C() || !F()) return;
|
|
105
|
+
E("");
|
|
106
|
+
let e = ee().findIndex((e) => String(e.value) === r.value);
|
|
107
|
+
O(Math.max(e, 0)), A(void 0), w(!0), r.onOpen?.();
|
|
108
|
+
}
|
|
109
|
+
function L(e) {
|
|
110
|
+
if (w(!1), r.onAdd && e === N()) {
|
|
111
|
+
r.onAdd(T().trim());
|
|
112
112
|
return;
|
|
113
113
|
}
|
|
114
|
-
let t =
|
|
114
|
+
let t = M()[e];
|
|
115
115
|
t && String(t.value) !== r.value && r.onChange?.(String(t.value));
|
|
116
116
|
}
|
|
117
|
-
function
|
|
118
|
-
let t =
|
|
119
|
-
|
|
117
|
+
function re(e) {
|
|
118
|
+
let t = P();
|
|
119
|
+
C() ? t > 0 && O((D() + e + t) % t) : I();
|
|
120
120
|
}
|
|
121
121
|
function ie(e) {
|
|
122
|
-
e.key === "ArrowDown" || e.key === "ArrowUp" ? (e.preventDefault(),
|
|
122
|
+
e.key === "ArrowDown" || e.key === "ArrowUp" ? (e.preventDefault(), A(void 0), re(e.key === "ArrowDown" ? 1 : -1)) : C() && (e.key === "Enter" ? (e.preventDefault(), L(D())) : e.key === "Tab" ? r.onAdd && D() === N() ? w(!1) : L(D()) : e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), w(!1)));
|
|
123
123
|
}
|
|
124
|
-
let
|
|
125
|
-
function
|
|
124
|
+
let R = () => C() ? j()?.label ?? r.emptyLabel ?? r.searchLabel ?? "Search" : r.emptyLabel ?? r.placeholder;
|
|
125
|
+
function H(t, o) {
|
|
126
126
|
return (() => {
|
|
127
|
-
var s =
|
|
128
|
-
return s.$$click = () =>
|
|
127
|
+
var s = ce(), l = s.firstChild;
|
|
128
|
+
return s.$$click = () => L(o()), s.$$mousemove = () => O(o()), s.$$mousedown = (e) => e.preventDefault(), a(l, n(m, {
|
|
129
129
|
get when() {
|
|
130
130
|
return t.icon;
|
|
131
131
|
},
|
|
132
132
|
children: (t) => (() => {
|
|
133
|
-
var r =
|
|
133
|
+
var r = le();
|
|
134
134
|
return a(r, n(e, {
|
|
135
135
|
get component() {
|
|
136
136
|
return t();
|
|
@@ -143,11 +143,11 @@ function V(r) {
|
|
|
143
143
|
return t.detail;
|
|
144
144
|
},
|
|
145
145
|
get children() {
|
|
146
|
-
var e =
|
|
146
|
+
var e = se();
|
|
147
147
|
return a(e, () => t.detail), e;
|
|
148
148
|
}
|
|
149
149
|
}), null), i((e) => {
|
|
150
|
-
var n =
|
|
150
|
+
var n = x(o()), i = o(), a = String(t.value) === r.value, l = o() === D(), u = t.value === "";
|
|
151
151
|
return n !== e.e && c(s, "id", e.e = n), i !== e.t && c(s, "data-index", e.t = i), a !== e.a && c(s, "aria-selected", e.a = a), l !== e.o && s.classList.toggle("combobox-option-active", e.o = l), u !== e.i && s.classList.toggle("combobox-option-empty", e.i = u), e;
|
|
152
152
|
}, {
|
|
153
153
|
e: void 0,
|
|
@@ -158,14 +158,14 @@ function V(r) {
|
|
|
158
158
|
}), s;
|
|
159
159
|
})();
|
|
160
160
|
}
|
|
161
|
-
function
|
|
161
|
+
function me() {
|
|
162
162
|
return (() => {
|
|
163
|
-
var e =
|
|
164
|
-
return e.$$click = () => N(
|
|
163
|
+
var e = ue();
|
|
164
|
+
return e.$$click = () => L(N()), e.$$mousemove = () => O(N()), e.$$mousedown = (e) => e.preventDefault(), c(e, "aria-selected", !1), a(e, n(oe, {
|
|
165
165
|
size: 14,
|
|
166
166
|
"aria-hidden": "true"
|
|
167
167
|
}), null), a(e, () => r.addLabel ?? "Add", null), i((t) => {
|
|
168
|
-
var n =
|
|
168
|
+
var n = x(N()), r = N(), i = N() === D();
|
|
169
169
|
return n !== t.e && c(e, "id", t.e = n), r !== t.t && c(e, "data-index", t.t = r), i !== t.a && e.classList.toggle("combobox-option-active", t.a = i), t;
|
|
170
170
|
}, {
|
|
171
171
|
e: void 0,
|
|
@@ -174,29 +174,37 @@ function V(r) {
|
|
|
174
174
|
}), e;
|
|
175
175
|
})();
|
|
176
176
|
}
|
|
177
|
-
|
|
177
|
+
let U = () => r.previewAtCursor === !0 ? k() : void 0;
|
|
178
|
+
function he() {
|
|
178
179
|
return (() => {
|
|
179
|
-
var e =
|
|
180
|
+
var e = de();
|
|
181
|
+
e.$$mousemove = (e) => {
|
|
182
|
+
r.previewAtCursor === !0 && A({
|
|
183
|
+
x: e.clientX,
|
|
184
|
+
y: e.clientY
|
|
185
|
+
});
|
|
186
|
+
};
|
|
187
|
+
var t = l;
|
|
180
188
|
return typeof t == "function" ? f(t, e) : l = e, a(e, n(p, {
|
|
181
189
|
get each() {
|
|
182
|
-
return
|
|
190
|
+
return M();
|
|
183
191
|
},
|
|
184
192
|
get fallback() {
|
|
185
193
|
return (() => {
|
|
186
|
-
var e =
|
|
194
|
+
var e = z();
|
|
187
195
|
return a(e, () => r.noMatchesLabel ?? "No matching objects"), e;
|
|
188
196
|
})();
|
|
189
197
|
},
|
|
190
|
-
children:
|
|
198
|
+
children: H
|
|
191
199
|
}), null), a(e, n(m, {
|
|
192
200
|
get when() {
|
|
193
201
|
return r.onAdd;
|
|
194
202
|
},
|
|
195
203
|
get children() {
|
|
196
|
-
return
|
|
204
|
+
return me();
|
|
197
205
|
}
|
|
198
206
|
}), null), i((t) => {
|
|
199
|
-
var n = !!te(), r =
|
|
207
|
+
var n = !!te(), r = b();
|
|
200
208
|
return n !== t.e && e.classList.toggle("combobox-list-detail", t.e = n), r !== t.t && c(e, "id", t.t = r), t;
|
|
201
209
|
}, {
|
|
202
210
|
e: void 0,
|
|
@@ -205,18 +213,18 @@ function V(r) {
|
|
|
205
213
|
})();
|
|
206
214
|
}
|
|
207
215
|
return (() => {
|
|
208
|
-
var l =
|
|
209
|
-
|
|
216
|
+
var l = fe(), d = l.firstChild;
|
|
217
|
+
d.addEventListener("blur", () => w(!1)), d.$$keydown = ie, d.$$input = (e) => {
|
|
210
218
|
let t = e.currentTarget.value;
|
|
211
|
-
|
|
212
|
-
},
|
|
219
|
+
I(), E(t), O(0);
|
|
220
|
+
}, d.$$click = I;
|
|
213
221
|
var p = s;
|
|
214
|
-
return typeof p == "function" ? f(p,
|
|
222
|
+
return typeof p == "function" ? f(p, d) : s = d, a(l, n(m, {
|
|
215
223
|
get when() {
|
|
216
|
-
return o(() => !
|
|
224
|
+
return o(() => !C())() && j()?.icon;
|
|
217
225
|
},
|
|
218
226
|
children: (t) => (() => {
|
|
219
|
-
var r =
|
|
227
|
+
var r = V();
|
|
220
228
|
return a(r, n(e, {
|
|
221
229
|
get component() {
|
|
222
230
|
return t();
|
|
@@ -226,36 +234,45 @@ function V(r) {
|
|
|
226
234
|
})()
|
|
227
235
|
}), null), a(l, n(m, {
|
|
228
236
|
get when() {
|
|
229
|
-
return o(() => !
|
|
237
|
+
return o(() => !C())() && j()?.detail;
|
|
230
238
|
},
|
|
231
239
|
get children() {
|
|
232
|
-
var e =
|
|
233
|
-
return a(t, () =>
|
|
240
|
+
var e = B(), t = e.firstChild, n = t.nextSibling;
|
|
241
|
+
return a(t, () => j()?.label), a(n, () => j()?.detail), e;
|
|
234
242
|
}
|
|
235
|
-
}), null), a(l, n(
|
|
243
|
+
}), null), a(l, n(ae, {
|
|
236
244
|
class: "combobox-chevron",
|
|
237
245
|
size: 16,
|
|
238
246
|
"aria-hidden": "true"
|
|
239
247
|
}), null), a(l, n(m, {
|
|
240
248
|
get when() {
|
|
241
|
-
return
|
|
249
|
+
return C();
|
|
242
250
|
},
|
|
243
251
|
get children() {
|
|
244
|
-
return
|
|
252
|
+
return he();
|
|
245
253
|
}
|
|
246
254
|
}), null), a(l, n(m, {
|
|
247
255
|
get when() {
|
|
248
|
-
return o(() => !!
|
|
256
|
+
return o(() => !!C())() && ne();
|
|
249
257
|
},
|
|
250
258
|
children: (t) => (() => {
|
|
251
|
-
var r =
|
|
259
|
+
var r = pe();
|
|
252
260
|
return a(r, n(e, { get component() {
|
|
253
261
|
return t();
|
|
254
|
-
} })),
|
|
262
|
+
} })), i((e) => {
|
|
263
|
+
var t = U() !== void 0, n = U() ? {
|
|
264
|
+
"--combobox-cursor-x": `${U()?.x}px`,
|
|
265
|
+
"--combobox-cursor-y": `${U()?.y}px`
|
|
266
|
+
} : void 0;
|
|
267
|
+
return t !== e.e && r.classList.toggle("combobox-preview-cursor", e.e = t), e.t = u(r, n, e.t), e;
|
|
268
|
+
}, {
|
|
269
|
+
e: void 0,
|
|
270
|
+
t: void 0
|
|
271
|
+
}), r;
|
|
255
272
|
})()
|
|
256
273
|
}), null), i((e) => {
|
|
257
|
-
var n = r.class ? `combobox ${r.class}` : "combobox", i = !!
|
|
258
|
-
return n !== e.e && t(l, e.e = n), i !== e.t && l.classList.toggle("combobox-open", e.t = i), a !== e.a && l.classList.toggle("combobox-with-detail", e.a = a), o !== e.o && l.classList.toggle("combobox-with-icon", e.o = o), s !== e.i && c(
|
|
274
|
+
var n = r.class ? `combobox ${r.class}` : "combobox", i = !!C(), a = !(C() || !j()?.detail), o = !(C() || j()?.icon === void 0), s = h(), u = C(), f = b(), p = C() && P() > 0 ? x(D()) : void 0, m = r.ariaLabel, g = r.describedBy, _ = r.required, v = r.disabled, y = r.onChange === void 0, S = r.value, w = R();
|
|
275
|
+
return n !== e.e && t(l, e.e = n), i !== e.t && l.classList.toggle("combobox-open", e.t = i), a !== e.a && l.classList.toggle("combobox-with-detail", e.a = a), o !== e.o && l.classList.toggle("combobox-with-icon", e.o = o), s !== e.i && c(d, "id", e.i = s), u !== e.n && c(d, "aria-expanded", e.n = u), f !== e.s && c(d, "aria-controls", e.s = f), p !== e.h && c(d, "aria-activedescendant", e.h = p), m !== e.r && c(d, "aria-label", e.r = m), g !== e.d && c(d, "aria-describedby", e.d = g), _ !== e.l && (d.required = e.l = _), v !== e.u && (d.disabled = e.u = v), y !== e.c && (d.readOnly = e.c = y), S !== e.w && c(d, "data-value", e.w = S), w !== e.m && c(d, "placeholder", e.m = w), e;
|
|
259
276
|
}, {
|
|
260
277
|
e: void 0,
|
|
261
278
|
t: void 0,
|
|
@@ -272,7 +289,7 @@ function V(r) {
|
|
|
272
289
|
c: void 0,
|
|
273
290
|
w: void 0,
|
|
274
291
|
m: void 0
|
|
275
|
-
}), i(() =>
|
|
292
|
+
}), i(() => d.value = C() ? T() : j()?.label ?? ""), l;
|
|
276
293
|
})();
|
|
277
294
|
}
|
|
278
295
|
r([
|
|
@@ -283,19 +300,34 @@ r([
|
|
|
283
300
|
"keydown"
|
|
284
301
|
]);
|
|
285
302
|
// node_modules/@tabler/icons-solidjs/dist/source/icons/IconChevronLeft.js
|
|
286
|
-
var
|
|
287
|
-
rowSortingFeature:
|
|
288
|
-
sortedRowModel:
|
|
289
|
-
columnVisibilityFeature:
|
|
290
|
-
columnOrderingFeature:
|
|
291
|
-
columnSizingFeature:
|
|
303
|
+
var me = R("outline", "chevron-left", "ChevronLeft", [["path", { d: "M15 6l-6 6l6 6" }]]), U = R("outline", "chevron-right", "ChevronRight", [["path", { d: "M9 6l6 6l-6 6" }]]), he = R("outline", "menu", "Menu", [["path", { d: "M4 8l16 0" }], ["path", { d: "M4 16l16 0" }]]), ge = /*#__PURE__*/ d("<li class=data-table-customizer-item draggable=true><span class=data-table-customizer-grip role=button aria-keyshortcuts=\"Alt+ArrowUp Alt+ArrowDown\"></span><label class=data-table-customizer-option><input type=checkbox aria-keyshortcuts=\"Alt+ArrowUp Alt+ArrowDown\">"), _e = /*#__PURE__*/ d("<div role=dialog class=data-table-customizer-panel><p class=data-table-customizer-title></p><ul class=data-table-customizer-list></ul><div class=data-table-customizer-actions><button type=button></button><button type=button>"), ve = /*#__PURE__*/ d("<div class=data-table-customizer><button type=button class=data-table-customizer-button aria-haspopup=dialog><span aria-hidden=true>⚙</span> "), ye = /*#__PURE__*/ d("<button type=button class=data-table-sort><span class=data-table-sort-indicator aria-hidden=true>"), W = /*#__PURE__*/ d("<span class=data-table-resize-handle role=separator aria-orientation=vertical tabindex=0>"), be = /*#__PURE__*/ d("<th>"), xe = /*#__PURE__*/ d("<td class=data-table-actions>"), G = /*#__PURE__*/ d("<tr>"), K = /*#__PURE__*/ d("<td>"), Se = /*#__PURE__*/ d("<td class=data-table-actions><span class=data-table-skeleton>"), Ce = /*#__PURE__*/ d("<tr aria-hidden=true>"), we = /*#__PURE__*/ d("<td><span class=data-table-skeleton>"), q = /*#__PURE__*/ d("<nav class=data-table-pagination><span aria-live=polite></span><button type=button></button><button type=button>"), Te = /*#__PURE__*/ d("<label class=data-table-page-size><select>"), Ee = /*#__PURE__*/ d("<option>"), De = /*#__PURE__*/ d("<div class=data-table-toolbar-start>"), Oe = /*#__PURE__*/ d("<div class=data-table-toolbar>"), ke = /*#__PURE__*/ d("<th class=data-table-actions>Actions"), Ae = /*#__PURE__*/ d("<div><div class=data-table-scroll><table class=data-table><thead><tr></tr></thead><tbody>"), je = /*#__PURE__*/ d("<p class=data-table-status role=status>Loading…"), Me = /*#__PURE__*/ d("<p class=data-table-status>No results."), J = 40, Ne = 5, Pe = P({
|
|
304
|
+
rowSortingFeature: N,
|
|
305
|
+
sortedRowModel: A(),
|
|
306
|
+
columnVisibilityFeature: O,
|
|
307
|
+
columnOrderingFeature: E,
|
|
308
|
+
columnSizingFeature: D
|
|
292
309
|
});
|
|
293
|
-
function
|
|
310
|
+
function Fe(e, t) {
|
|
294
311
|
return e === t ? 0 : e == null ? -1 : t == null ? 1 : typeof e == "number" && typeof t == "number" ? e - t : String(e).localeCompare(String(t), void 0, { numeric: !0 });
|
|
295
312
|
}
|
|
296
|
-
function
|
|
313
|
+
function Y(e) {
|
|
297
314
|
return typeof e == "function" ? e() : e;
|
|
298
315
|
}
|
|
316
|
+
function Ie(e) {
|
|
317
|
+
if (e !== void 0) try {
|
|
318
|
+
let t = globalThis.localStorage?.getItem(e);
|
|
319
|
+
if (!t) return;
|
|
320
|
+
let n = JSON.parse(t);
|
|
321
|
+
return Array.isArray(n) && n.every((e) => typeof e == "string") ? n : void 0;
|
|
322
|
+
} catch {
|
|
323
|
+
return;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
function Le(e, t) {
|
|
327
|
+
if (e !== void 0) try {
|
|
328
|
+
t === void 0 ? globalThis.localStorage?.removeItem(e) : globalThis.localStorage?.setItem(e, JSON.stringify(t));
|
|
329
|
+
} catch {}
|
|
330
|
+
}
|
|
299
331
|
function Re(e, t) {
|
|
300
332
|
if (t !== void 0) return {
|
|
301
333
|
width: `${t}px`,
|
|
@@ -305,116 +337,116 @@ function Re(e, t) {
|
|
|
305
337
|
let n = (e) => typeof e == "number" ? `${e}px` : e, r = {};
|
|
306
338
|
return e.width !== void 0 && (r.width = n(e.width)), e.minWidth !== void 0 && (r["min-width"] = n(e.minWidth)), e.maxWidth !== void 0 && (r["max-width"] = n(e.maxWidth)), Object.keys(r).length > 0 ? r : void 0;
|
|
307
339
|
}
|
|
308
|
-
function
|
|
309
|
-
let r = _(() =>
|
|
310
|
-
let t = new Set(
|
|
340
|
+
function ze(e) {
|
|
341
|
+
let r = _(() => Y(e.rows)), o = () => Y(e.loading ?? !1), s = e.sortKey !== void 0 || e.sortDirection !== void 0, [l, d] = v(e.defaultSort), b = () => s ? Y(e.sortKey ?? void 0) : l()?.key, S = () => s ? Y(e.sortDirection ?? "asc") : l()?.direction ?? "asc", C = () => Y(e.showColumnCustomizer ?? !1), T = h(() => e.toolbar), E = _(() => e.defaultVisibleColumns ?? e.columns.filter((e) => e.defaultVisible !== !1).map((e) => e.key)), D = w(() => e.storageKey), [O, k] = v(w(() => e.visibleColumns === void 0 ? Ie(D) : void 0)), A = () => e.visibleColumns === void 0 ? O() ?? E() : Y(e.visibleColumns), j = _(() => {
|
|
342
|
+
let t = new Set(A());
|
|
311
343
|
return Object.fromEntries(e.columns.map((e) => [e.key, e.toggleable === !1 || t.has(e.key)]));
|
|
312
|
-
}), [
|
|
313
|
-
let e =
|
|
344
|
+
}), [te, N] = v(void 0), P = () => e.columnOrder === void 0 ? te() ?? e.defaultColumnOrder ?? [] : Y(e.columnOrder), F = _(() => {
|
|
345
|
+
let e = b();
|
|
314
346
|
return e === void 0 ? [] : [{
|
|
315
347
|
id: e,
|
|
316
|
-
desc:
|
|
348
|
+
desc: S() === "desc"
|
|
317
349
|
}];
|
|
318
|
-
}),
|
|
350
|
+
}), ne = _(() => e.columns.map((e) => ({
|
|
319
351
|
id: e.key,
|
|
320
352
|
accessorFn: (t) => e.sortValue ? e.sortValue(t) : t[e.key],
|
|
321
353
|
enableHiding: e.toggleable !== !1,
|
|
322
|
-
sortFn: (e, t, n) =>
|
|
323
|
-
}))),
|
|
324
|
-
features:
|
|
354
|
+
sortFn: (e, t, n) => Fe(e.getValue(n), t.getValue(n))
|
|
355
|
+
}))), I = ee({
|
|
356
|
+
features: Pe,
|
|
325
357
|
get data() {
|
|
326
358
|
return r();
|
|
327
359
|
},
|
|
328
360
|
get columns() {
|
|
329
|
-
return
|
|
361
|
+
return ne();
|
|
330
362
|
},
|
|
331
363
|
getRowId: (t) => String(e.getRowId(t)),
|
|
332
364
|
manualSorting: s,
|
|
333
365
|
enableMultiSort: !1,
|
|
334
366
|
sortDescFirst: !1,
|
|
335
|
-
defaultColumn: { minSize:
|
|
367
|
+
defaultColumn: { minSize: J },
|
|
336
368
|
state: {
|
|
337
369
|
get sorting() {
|
|
338
|
-
return
|
|
370
|
+
return F();
|
|
339
371
|
},
|
|
340
372
|
get columnVisibility() {
|
|
341
|
-
return
|
|
373
|
+
return j();
|
|
342
374
|
},
|
|
343
375
|
get columnOrder() {
|
|
344
|
-
return
|
|
376
|
+
return P();
|
|
345
377
|
}
|
|
346
378
|
},
|
|
347
|
-
onSortingChange:
|
|
348
|
-
onColumnVisibilityChange:
|
|
349
|
-
onColumnOrderChange: (e) =>
|
|
350
|
-
}),
|
|
351
|
-
function
|
|
352
|
-
let [n] =
|
|
379
|
+
onSortingChange: ce,
|
|
380
|
+
onColumnVisibilityChange: de,
|
|
381
|
+
onColumnOrderChange: (e) => z(M(e, P()))
|
|
382
|
+
}), L = _(() => new Map(e.columns.map((e) => [e.key, e]))), re = (e) => e.flatMap((e) => L().get(e.id) ?? []), ie = _(() => re(I.getAllLeafColumns())), R = _(() => re(I.getVisibleLeafColumns())), ae = _(() => I.getRowModel().rows.map((e) => e.original)), oe = _(() => e.columns.filter((e) => e.toggleable !== !1)), se = _(() => oe().map((e) => e.key));
|
|
383
|
+
function ce(t) {
|
|
384
|
+
let [n] = M(t, F()), r = n && {
|
|
353
385
|
key: n.id,
|
|
354
386
|
direction: n.desc ? "desc" : "asc"
|
|
355
|
-
}, i = r?.key ??
|
|
387
|
+
}, i = r?.key ?? b();
|
|
356
388
|
s || d(r), i !== void 0 && e.onSort?.(i), r || e.onSortClear?.(), e.onSortChange?.(r);
|
|
357
389
|
}
|
|
358
|
-
function
|
|
390
|
+
function le(t) {
|
|
359
391
|
let n = new Map(e.columns.map((e, t) => [e.key, t]));
|
|
360
392
|
return [...t].sort((e, t) => (n.get(e) ?? 0) - (n.get(t) ?? 0));
|
|
361
393
|
}
|
|
362
|
-
function
|
|
363
|
-
let n =
|
|
364
|
-
e.visibleColumns === void 0 &&
|
|
394
|
+
function ue(t) {
|
|
395
|
+
let n = le(t);
|
|
396
|
+
e.visibleColumns === void 0 && (k(n), Le(D, n)), e.onVisibleColumnsChange?.(n);
|
|
365
397
|
}
|
|
366
|
-
function
|
|
367
|
-
let t =
|
|
368
|
-
|
|
398
|
+
function de(e) {
|
|
399
|
+
let t = M(e, j());
|
|
400
|
+
ue(se().filter((e) => t[e]));
|
|
369
401
|
}
|
|
370
|
-
function
|
|
371
|
-
e.columnOrder === void 0 &&
|
|
402
|
+
function z(t) {
|
|
403
|
+
e.columnOrder === void 0 && N(t), e.onColumnOrderChange?.(t);
|
|
372
404
|
}
|
|
373
|
-
function
|
|
374
|
-
let n =
|
|
375
|
-
r === -1 || t < 0 || t >= n.length || t === r || (n.splice(r, 1), n.splice(t, 0, e),
|
|
405
|
+
function B(e, t) {
|
|
406
|
+
let n = I.getAllLeafColumns().map((e) => e.id), r = n.indexOf(e);
|
|
407
|
+
r === -1 || t < 0 || t >= n.length || t === r || (n.splice(r, 1), n.splice(t, 0, e), I.setColumnOrder(n));
|
|
376
408
|
}
|
|
377
|
-
function
|
|
378
|
-
|
|
409
|
+
function fe() {
|
|
410
|
+
ue(E()), e.visibleColumns === void 0 && Le(D, void 0);
|
|
379
411
|
let t = e.columns.map((e) => e.key), n = (e.defaultColumnOrder ?? []).filter((e) => t.includes(e));
|
|
380
|
-
|
|
381
|
-
}
|
|
382
|
-
let
|
|
383
|
-
let e =
|
|
384
|
-
return e === void 0 ? void 0 :
|
|
385
|
-
},
|
|
386
|
-
function
|
|
387
|
-
|
|
388
|
-
}
|
|
389
|
-
function
|
|
390
|
-
if (!
|
|
391
|
-
let t =
|
|
412
|
+
z([.../* @__PURE__ */ new Set([...n, ...t])]), Be(), e.onColumnWidthsChange?.({});
|
|
413
|
+
}
|
|
414
|
+
let V = () => I.atoms.columnSizing.get(), [pe, H] = v(), ze = () => {
|
|
415
|
+
let e = pe();
|
|
416
|
+
return e === void 0 ? void 0 : I.getTotalSize() + e;
|
|
417
|
+
}, X;
|
|
418
|
+
function Be() {
|
|
419
|
+
H(void 0), I.setColumnSizing({});
|
|
420
|
+
}
|
|
421
|
+
function Z(e) {
|
|
422
|
+
if (!X) return 0;
|
|
423
|
+
let t = X.cloneNode(!1);
|
|
392
424
|
t.classList.remove("data-table-resized"), t.style.cssText = "position:absolute;visibility:hidden;width:max-content;max-width:none";
|
|
393
|
-
for (let n of
|
|
425
|
+
for (let n of X.rows) {
|
|
394
426
|
let r = n.cells[e]?.cloneNode(!0);
|
|
395
427
|
r && (r.removeAttribute("style"), t.insertRow().append(r));
|
|
396
428
|
}
|
|
397
|
-
|
|
429
|
+
X.after(t);
|
|
398
430
|
let n = t.getBoundingClientRect().width;
|
|
399
431
|
return t.remove(), Math.ceil(n);
|
|
400
432
|
}
|
|
401
|
-
let
|
|
433
|
+
let Ve = () => R().length;
|
|
402
434
|
g(() => {
|
|
403
435
|
if (e.columnWidths === void 0) return;
|
|
404
|
-
let t =
|
|
405
|
-
Object.keys(t).length === 0 ?
|
|
436
|
+
let t = Y(e.columnWidths);
|
|
437
|
+
Object.keys(t).length === 0 ? Be() : (I.setColumnSizing(t), H((t) => t ?? (e.rowActions ? Z(w(Ve)) : 0)));
|
|
406
438
|
}), g(() => {
|
|
407
|
-
let e =
|
|
408
|
-
if (
|
|
439
|
+
let e = R().map((e) => e.key), t = V();
|
|
440
|
+
if (pe() === void 0 || e.every((e) => t[e] !== void 0)) return;
|
|
409
441
|
let n = { ...t };
|
|
410
|
-
for (let [t, r] of e.entries()) n[r] ??= Math.max(
|
|
411
|
-
|
|
442
|
+
for (let [t, r] of e.entries()) n[r] ??= Math.max(J, Z(t));
|
|
443
|
+
I.setColumnSizing(n);
|
|
412
444
|
}), g(() => {
|
|
413
|
-
|
|
414
|
-
let t =
|
|
415
|
-
e.rowActions && t !== void 0 &&
|
|
445
|
+
ae();
|
|
446
|
+
let t = w(pe);
|
|
447
|
+
e.rowActions && t !== void 0 && H(Math.max(t, Z(w(Ve))));
|
|
416
448
|
});
|
|
417
|
-
function
|
|
449
|
+
function He(e) {
|
|
418
450
|
let t = {};
|
|
419
451
|
for (let n of e.querySelectorAll("th[data-column-key]")) t[n.dataset.columnKey] = n.getBoundingClientRect().width;
|
|
420
452
|
let n = Object.values(t).reduce((e, t) => e + t, 0);
|
|
@@ -423,167 +455,167 @@ function J(e) {
|
|
|
423
455
|
extra: e.getBoundingClientRect().width - n
|
|
424
456
|
};
|
|
425
457
|
}
|
|
426
|
-
function
|
|
427
|
-
|
|
458
|
+
function Ue(e, t) {
|
|
459
|
+
I.setColumnSizing(e), H(t);
|
|
428
460
|
}
|
|
429
|
-
function
|
|
430
|
-
if (!
|
|
461
|
+
function We(t, n) {
|
|
462
|
+
if (!X) return;
|
|
431
463
|
t.preventDefault(), t.stopPropagation();
|
|
432
464
|
let r = t.currentTarget;
|
|
433
465
|
r.setPointerCapture(t.pointerId);
|
|
434
|
-
let i = t.clientX, { sizing: a, extra: o } =
|
|
466
|
+
let i = t.clientX, { sizing: a, extra: o } = He(X), s = a[n] ?? J, c = !1;
|
|
435
467
|
function l(e) {
|
|
436
468
|
if (!c && Math.abs(e.clientX - i) < 2) return;
|
|
437
469
|
c = !0;
|
|
438
|
-
let t = Math.max(
|
|
439
|
-
|
|
470
|
+
let t = Math.max(J, s + e.clientX - i);
|
|
471
|
+
Ue({
|
|
440
472
|
...a,
|
|
441
473
|
[n]: t
|
|
442
474
|
}, o);
|
|
443
475
|
}
|
|
444
476
|
function u() {
|
|
445
|
-
r.removeEventListener("pointermove", l), r.removeEventListener("pointerup", u), r.removeEventListener("pointercancel", u), c && e.onColumnWidthsChange?.(
|
|
477
|
+
r.removeEventListener("pointermove", l), r.removeEventListener("pointerup", u), r.removeEventListener("pointercancel", u), c && e.onColumnWidthsChange?.(V());
|
|
446
478
|
}
|
|
447
479
|
r.addEventListener("pointermove", l), r.addEventListener("pointerup", u), r.addEventListener("pointercancel", u);
|
|
448
480
|
}
|
|
449
|
-
function
|
|
450
|
-
if (!
|
|
451
|
-
let n =
|
|
452
|
-
|
|
481
|
+
function Ge(t) {
|
|
482
|
+
if (!X) return;
|
|
483
|
+
let n = R().findIndex((e) => e.key === t), { sizing: r, extra: i } = He(X);
|
|
484
|
+
Ue({
|
|
453
485
|
...r,
|
|
454
|
-
[t]: Math.max(
|
|
455
|
-
}, i), e.onColumnWidthsChange?.(
|
|
486
|
+
[t]: Math.max(J, Z(n))
|
|
487
|
+
}, i), e.onColumnWidthsChange?.(V());
|
|
456
488
|
}
|
|
457
|
-
function
|
|
489
|
+
function Ke(t, n) {
|
|
458
490
|
if (t.key === "Enter") {
|
|
459
|
-
t.preventDefault(),
|
|
491
|
+
t.preventDefault(), Ge(n);
|
|
460
492
|
return;
|
|
461
493
|
}
|
|
462
494
|
let r = t.key === "ArrowLeft" ? -10 : t.key === "ArrowRight" ? 10 : 0;
|
|
463
|
-
if (!r || !
|
|
495
|
+
if (!r || !X) return;
|
|
464
496
|
t.preventDefault();
|
|
465
|
-
let { sizing: i, extra: a } =
|
|
466
|
-
|
|
497
|
+
let { sizing: i, extra: a } = He(X), o = i[n] ?? J;
|
|
498
|
+
Ue({
|
|
467
499
|
...i,
|
|
468
|
-
[n]: Math.max(
|
|
469
|
-
}, a), e.onColumnWidthsChange?.(
|
|
500
|
+
[n]: Math.max(J, o + r)
|
|
501
|
+
}, a), e.onColumnWidthsChange?.(V());
|
|
470
502
|
}
|
|
471
|
-
let [
|
|
503
|
+
let [qe, Je] = v(), Ye = `${y()}-panel`, [Xe, Ze] = v(!1), Qe;
|
|
472
504
|
g(() => {
|
|
473
|
-
if (!
|
|
505
|
+
if (!Xe() || !C()) return;
|
|
474
506
|
function e(e) {
|
|
475
|
-
|
|
507
|
+
Qe && !Qe.contains(e.target) && Ze(!1);
|
|
476
508
|
}
|
|
477
509
|
function t(e) {
|
|
478
|
-
e.key === "Escape" &&
|
|
510
|
+
e.key === "Escape" && Ze(!1);
|
|
479
511
|
}
|
|
480
|
-
document.addEventListener("pointerdown", e), document.addEventListener("keydown", t),
|
|
512
|
+
document.addEventListener("pointerdown", e), document.addEventListener("keydown", t), x(() => {
|
|
481
513
|
document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t);
|
|
482
514
|
});
|
|
483
515
|
});
|
|
484
|
-
function
|
|
516
|
+
function $e(t, n) {
|
|
485
517
|
return e.getCell?.(t, n) ?? n.getValue?.(t) ?? null;
|
|
486
518
|
}
|
|
487
|
-
function
|
|
488
|
-
if (e.sortable) return
|
|
519
|
+
function et(e) {
|
|
520
|
+
if (e.sortable) return b() === e.key ? S() === "asc" ? "ascending" : "descending" : "none";
|
|
489
521
|
}
|
|
490
|
-
function
|
|
491
|
-
return
|
|
522
|
+
function tt(e) {
|
|
523
|
+
return b() === e.key ? S() === "asc" ? "▲" : "▼" : "";
|
|
492
524
|
}
|
|
493
|
-
let
|
|
494
|
-
function
|
|
495
|
-
|
|
525
|
+
let nt = (t) => !!t.sortable && (!s || !!(e.onSort || e.onSortChange));
|
|
526
|
+
function rt(e, t) {
|
|
527
|
+
Je(t.key), e.dataTransfer?.setData("text/plain", t.key), e.dataTransfer && (e.dataTransfer.effectAllowed = "move");
|
|
496
528
|
}
|
|
497
|
-
function
|
|
498
|
-
let n =
|
|
499
|
-
n !== void 0 && (e.preventDefault(),
|
|
529
|
+
function it(e, t) {
|
|
530
|
+
let n = qe();
|
|
531
|
+
n !== void 0 && (e.preventDefault(), B(n, t));
|
|
500
532
|
}
|
|
501
|
-
function
|
|
533
|
+
function at(e, t, n) {
|
|
502
534
|
let r = e.key === "ArrowUp" ? -1 : +(e.key === "ArrowDown");
|
|
503
535
|
if (!e.altKey || !r) return;
|
|
504
536
|
e.preventDefault();
|
|
505
537
|
let i = document.activeElement;
|
|
506
|
-
|
|
538
|
+
B(t.key, n + r), i?.focus();
|
|
507
539
|
}
|
|
508
|
-
function
|
|
540
|
+
function ot(e, t) {
|
|
509
541
|
if (e.pointerType === "mouse") return;
|
|
510
|
-
|
|
542
|
+
Je(t.key);
|
|
511
543
|
function n(e) {
|
|
512
544
|
let n = document.elementFromPoint(e.clientX, e.clientY)?.closest(".data-table-customizer-item");
|
|
513
|
-
n?.parentElement &&
|
|
545
|
+
n?.parentElement && B(t.key, Array.prototype.indexOf.call(n.parentElement.children, n));
|
|
514
546
|
}
|
|
515
547
|
function r() {
|
|
516
|
-
document.removeEventListener("pointermove", n), document.removeEventListener("pointerup", r), document.removeEventListener("pointercancel", r),
|
|
548
|
+
document.removeEventListener("pointermove", n), document.removeEventListener("pointerup", r), document.removeEventListener("pointercancel", r), Je(void 0);
|
|
517
549
|
}
|
|
518
550
|
document.addEventListener("pointermove", n), document.addEventListener("pointerup", r), document.addEventListener("pointercancel", r);
|
|
519
551
|
}
|
|
520
|
-
function
|
|
552
|
+
function st(e, t) {
|
|
521
553
|
let r = e.ariaLabel ?? e.label;
|
|
522
554
|
return (() => {
|
|
523
|
-
var o =
|
|
524
|
-
return o.$$keydown = (n) =>
|
|
555
|
+
var o = ge(), s = o.firstChild, l = s.nextSibling, u = l.firstChild;
|
|
556
|
+
return o.$$keydown = (n) => at(n, e, t()), o.addEventListener("dragend", () => Je(void 0)), o.addEventListener("drop", (e) => e.preventDefault()), o.addEventListener("dragover", (e) => it(e, t())), o.addEventListener("dragstart", (t) => rt(t, e)), s.$$pointerdown = (t) => ot(t, e), c(s, "aria-label", `Reorder ${r}`), a(s, n(he, {
|
|
525
557
|
size: 14,
|
|
526
558
|
"aria-hidden": "true"
|
|
527
|
-
})), u.addEventListener("change", (t) =>
|
|
528
|
-
var n =
|
|
559
|
+
})), u.addEventListener("change", (t) => I.getColumn(e.key)?.toggleVisibility(t.currentTarget.checked)), a(l, r, null), i((t) => {
|
|
560
|
+
var n = qe() === e.key, r = e.toggleable === !1 ? 0 : -1, i = e.toggleable === !1;
|
|
529
561
|
return n !== t.e && o.classList.toggle("data-table-customizer-item-dragging", t.e = n), r !== t.t && c(s, "tabindex", t.t = r), i !== t.a && (u.disabled = t.a = i), t;
|
|
530
562
|
}, {
|
|
531
563
|
e: void 0,
|
|
532
564
|
t: void 0,
|
|
533
565
|
a: void 0
|
|
534
|
-
}), i(() => u.checked =
|
|
566
|
+
}), i(() => u.checked = j()[e.key]), o;
|
|
535
567
|
})();
|
|
536
568
|
}
|
|
537
|
-
function
|
|
569
|
+
function ct() {
|
|
538
570
|
return (() => {
|
|
539
|
-
var t =
|
|
540
|
-
return c(t, "id",
|
|
571
|
+
var t = _e(), r = t.firstChild, o = r.nextSibling, s = o.nextSibling.firstChild, l = s.nextSibling;
|
|
572
|
+
return c(t, "id", Ye), a(r, () => e.columnCustomizerTitle ?? "Shown columns"), a(o, n(p, {
|
|
541
573
|
get each() {
|
|
542
|
-
return
|
|
574
|
+
return ie();
|
|
543
575
|
},
|
|
544
|
-
children: (e, t) =>
|
|
545
|
-
})), s.$$click = () =>
|
|
576
|
+
children: (e, t) => st(e, t)
|
|
577
|
+
})), s.$$click = () => I.toggleAllColumnsVisible(!0), a(s, () => e.columnCustomizerShowAllLabel ?? "Show all"), l.$$click = fe, a(l, () => e.columnCustomizerResetLabel ?? "Reset"), i(() => c(t, "aria-label", e.columnCustomizerTitle ?? "Customize columns")), t;
|
|
546
578
|
})();
|
|
547
579
|
}
|
|
548
|
-
function
|
|
580
|
+
function lt() {
|
|
549
581
|
return (() => {
|
|
550
|
-
var t =
|
|
582
|
+
var t = ve(), r = t.firstChild;
|
|
551
583
|
r.firstChild.nextSibling;
|
|
552
|
-
var o =
|
|
553
|
-
return typeof o == "function" ? f(o, t) :
|
|
584
|
+
var o = Qe;
|
|
585
|
+
return typeof o == "function" ? f(o, t) : Qe = t, r.$$click = () => Ze((e) => !e), c(r, "aria-controls", Ye), a(r, () => e.columnCustomizerLabel ?? "Columns", null), a(t, n(m, {
|
|
554
586
|
get when() {
|
|
555
|
-
return
|
|
587
|
+
return Xe();
|
|
556
588
|
},
|
|
557
589
|
get children() {
|
|
558
|
-
return
|
|
590
|
+
return ct();
|
|
559
591
|
}
|
|
560
|
-
}), null), i(() => c(r, "aria-expanded",
|
|
592
|
+
}), null), i(() => c(r, "aria-expanded", Xe())), t;
|
|
561
593
|
})();
|
|
562
594
|
}
|
|
563
|
-
function
|
|
595
|
+
function ut(r) {
|
|
564
596
|
return (() => {
|
|
565
|
-
var o =
|
|
597
|
+
var o = be();
|
|
566
598
|
return a(o, n(m, {
|
|
567
599
|
get when() {
|
|
568
|
-
return
|
|
600
|
+
return nt(r);
|
|
569
601
|
},
|
|
570
602
|
get fallback() {
|
|
571
603
|
return r.label;
|
|
572
604
|
},
|
|
573
605
|
get children() {
|
|
574
|
-
var e =
|
|
575
|
-
return e.$$click = () =>
|
|
606
|
+
var e = ye(), t = e.firstChild;
|
|
607
|
+
return e.$$click = () => I.getColumn(r.key)?.toggleSorting(), a(e, () => r.label, t), a(t, () => tt(r)), e;
|
|
576
608
|
}
|
|
577
609
|
}), null), a(o, n(m, {
|
|
578
610
|
get when() {
|
|
579
611
|
return e.resizableColumns;
|
|
580
612
|
},
|
|
581
613
|
get children() {
|
|
582
|
-
var e =
|
|
583
|
-
return e.$$dblclick = () =>
|
|
614
|
+
var e = W();
|
|
615
|
+
return e.$$dblclick = () => Ge(r.key), e.$$keydown = (e) => Ke(e, r.key), e.$$pointerdown = (e) => We(e, r.key), i(() => c(e, "aria-label", `Resize ${r.ariaLabel ?? r.label}`)), e;
|
|
584
616
|
}
|
|
585
617
|
}), null), i((e) => {
|
|
586
|
-
var n = r.class, i = r.key, a = Re(r,
|
|
618
|
+
var n = r.class, i = r.key, a = Re(r, V()[r.key]), s = et(r);
|
|
587
619
|
return n !== e.e && t(o, e.e = n), i !== e.t && c(o, "data-column-key", e.t = i), e.a = u(o, a, e.a), s !== e.o && c(o, "aria-sort", e.o = s), e;
|
|
588
620
|
}, {
|
|
589
621
|
e: void 0,
|
|
@@ -593,17 +625,17 @@ function J(e) {
|
|
|
593
625
|
}), o;
|
|
594
626
|
})();
|
|
595
627
|
}
|
|
596
|
-
function
|
|
628
|
+
function dt(r) {
|
|
597
629
|
return (() => {
|
|
598
|
-
var o =
|
|
630
|
+
var o = G();
|
|
599
631
|
return a(o, n(p, {
|
|
600
632
|
get each() {
|
|
601
|
-
return
|
|
633
|
+
return R();
|
|
602
634
|
},
|
|
603
635
|
children: (e) => (() => {
|
|
604
|
-
var n =
|
|
605
|
-
return a(n, () =>
|
|
606
|
-
var i = e.class, a = Re(e,
|
|
636
|
+
var n = K();
|
|
637
|
+
return a(n, () => $e(r, e)), i((r) => {
|
|
638
|
+
var i = e.class, a = Re(e, V()[e.key]);
|
|
607
639
|
return i !== r.e && t(n, r.e = i), r.t = u(n, a, r.t), r;
|
|
608
640
|
}, {
|
|
609
641
|
e: void 0,
|
|
@@ -615,23 +647,23 @@ function J(e) {
|
|
|
615
647
|
return e.rowActions;
|
|
616
648
|
},
|
|
617
649
|
get children() {
|
|
618
|
-
var t =
|
|
650
|
+
var t = xe();
|
|
619
651
|
return a(t, () => e.rowActions?.(r)), t;
|
|
620
652
|
}
|
|
621
653
|
}), null), o;
|
|
622
654
|
})();
|
|
623
655
|
}
|
|
624
|
-
function
|
|
656
|
+
function ft() {
|
|
625
657
|
return (() => {
|
|
626
|
-
var r =
|
|
658
|
+
var r = Ce();
|
|
627
659
|
return a(r, n(p, {
|
|
628
660
|
get each() {
|
|
629
|
-
return
|
|
661
|
+
return R();
|
|
630
662
|
},
|
|
631
663
|
children: (e) => (() => {
|
|
632
|
-
var n =
|
|
664
|
+
var n = we();
|
|
633
665
|
return i((r) => {
|
|
634
|
-
var i = e.class, a = Re(e,
|
|
666
|
+
var i = e.class, a = Re(e, V()[e.key]);
|
|
635
667
|
return i !== r.e && t(n, r.e = i), r.t = u(n, a, r.t), r;
|
|
636
668
|
}, {
|
|
637
669
|
e: void 0,
|
|
@@ -643,35 +675,35 @@ function J(e) {
|
|
|
643
675
|
return e.rowActions;
|
|
644
676
|
},
|
|
645
677
|
get children() {
|
|
646
|
-
return
|
|
678
|
+
return Se();
|
|
647
679
|
}
|
|
648
680
|
}), null), r;
|
|
649
681
|
})();
|
|
650
682
|
}
|
|
651
|
-
let
|
|
652
|
-
let e =
|
|
683
|
+
let pt = () => Y(e.pagination), Q = () => {
|
|
684
|
+
let e = pt();
|
|
653
685
|
return e ? Math.max(1, Math.ceil(e.rowCount / e.pageSize)) : 1;
|
|
654
686
|
};
|
|
655
|
-
function
|
|
656
|
-
let n =
|
|
687
|
+
function mt(t) {
|
|
688
|
+
let n = pt();
|
|
657
689
|
n && e.onPaginationChange?.({
|
|
658
690
|
page: t,
|
|
659
691
|
pageSize: n.pageSize
|
|
660
692
|
});
|
|
661
693
|
}
|
|
662
|
-
function
|
|
694
|
+
function ht(t) {
|
|
663
695
|
let n = Math.min((t.page - 1) * t.pageSize + 1, t.rowCount), r = Math.min(t.page * t.pageSize, t.rowCount), i = e.paginationLabels?.range;
|
|
664
696
|
return i ? i(n, r, t.rowCount) : `${n}–${r} of ${t.rowCount}`;
|
|
665
697
|
}
|
|
666
|
-
function
|
|
698
|
+
function gt(t) {
|
|
667
699
|
return (() => {
|
|
668
|
-
var r =
|
|
700
|
+
var r = q(), o = r.firstChild, s = o.nextSibling, l = s.nextSibling;
|
|
669
701
|
return a(r, n(m, {
|
|
670
702
|
get when() {
|
|
671
703
|
return t().pageSizeOptions;
|
|
672
704
|
},
|
|
673
705
|
children: (r) => (() => {
|
|
674
|
-
var o =
|
|
706
|
+
var o = Te(), s = o.firstChild;
|
|
675
707
|
return a(o, () => e.paginationLabels?.pageSize ?? "Rows per page", s), s.addEventListener("change", (t) => e.onPaginationChange?.({
|
|
676
708
|
page: 1,
|
|
677
709
|
pageSize: Number(t.currentTarget.value)
|
|
@@ -680,19 +712,19 @@ function J(e) {
|
|
|
680
712
|
return r();
|
|
681
713
|
},
|
|
682
714
|
children: (e) => (() => {
|
|
683
|
-
var n =
|
|
715
|
+
var n = Ee();
|
|
684
716
|
return n.value = e, a(n, e), i(() => n.selected = e === t().pageSize), n;
|
|
685
717
|
})()
|
|
686
718
|
})), i(() => s.value = t().pageSize), o;
|
|
687
719
|
})()
|
|
688
|
-
}), o), a(o, () =>
|
|
720
|
+
}), o), a(o, () => ht(t())), s.$$click = () => mt(t().page - 1), a(s, n(me, {
|
|
689
721
|
size: 16,
|
|
690
722
|
"aria-hidden": "true"
|
|
691
|
-
})), l.$$click = () =>
|
|
723
|
+
})), l.$$click = () => mt(t().page + 1), a(l, n(U, {
|
|
692
724
|
size: 16,
|
|
693
725
|
"aria-hidden": "true"
|
|
694
726
|
})), i((n) => {
|
|
695
|
-
var i = e.paginationLabels?.navigation ?? "Pagination", a = e.paginationLabels?.previous ?? "Previous page", o = t().page <= 1, u = e.paginationLabels?.next ?? "Next page", d = t().page >=
|
|
727
|
+
var i = e.paginationLabels?.navigation ?? "Pagination", a = e.paginationLabels?.previous ?? "Previous page", o = t().page <= 1, u = e.paginationLabels?.next ?? "Next page", d = t().page >= Q();
|
|
696
728
|
return i !== n.e && c(r, "aria-label", n.e = i), a !== n.t && c(s, "aria-label", n.t = a), o !== n.a && (s.disabled = n.a = o), u !== n.o && c(l, "aria-label", n.o = u), d !== n.i && (l.disabled = n.i = d), n;
|
|
697
729
|
}, {
|
|
698
730
|
e: void 0,
|
|
@@ -703,61 +735,61 @@ function J(e) {
|
|
|
703
735
|
}), r;
|
|
704
736
|
})();
|
|
705
737
|
}
|
|
706
|
-
let
|
|
738
|
+
let $ = () => !o() && (e.empty === void 0 ? r().length === 0 : Y(e.empty)), _t = () => o() && ae().length === 0 && e.loadingContent === void 0;
|
|
707
739
|
return (() => {
|
|
708
|
-
var r =
|
|
740
|
+
var r = Ae(), s = r.firstChild, l = s.firstChild, d = l.firstChild, h = d.firstChild, g = d.nextSibling;
|
|
709
741
|
a(r, n(m, {
|
|
710
742
|
get when() {
|
|
711
|
-
return
|
|
743
|
+
return C() || T.toArray().length > 0;
|
|
712
744
|
},
|
|
713
745
|
get children() {
|
|
714
|
-
var e =
|
|
746
|
+
var e = Oe();
|
|
715
747
|
return a(e, n(m, {
|
|
716
748
|
get when() {
|
|
717
|
-
return
|
|
749
|
+
return T.toArray().length > 0;
|
|
718
750
|
},
|
|
719
751
|
get children() {
|
|
720
|
-
var e =
|
|
721
|
-
return a(e,
|
|
752
|
+
var e = De();
|
|
753
|
+
return a(e, T), e;
|
|
722
754
|
}
|
|
723
755
|
}), null), a(e, n(m, {
|
|
724
756
|
get when() {
|
|
725
|
-
return
|
|
757
|
+
return C();
|
|
726
758
|
},
|
|
727
759
|
get children() {
|
|
728
|
-
return
|
|
760
|
+
return lt();
|
|
729
761
|
}
|
|
730
762
|
}), null), e;
|
|
731
763
|
}
|
|
732
764
|
}), s);
|
|
733
|
-
var _ =
|
|
734
|
-
return typeof _ == "function" ? f(_, l) :
|
|
765
|
+
var _ = X;
|
|
766
|
+
return typeof _ == "function" ? f(_, l) : X = l, a(h, n(p, {
|
|
735
767
|
get each() {
|
|
736
|
-
return
|
|
768
|
+
return R();
|
|
737
769
|
},
|
|
738
|
-
children:
|
|
770
|
+
children: ut
|
|
739
771
|
}), null), a(h, n(m, {
|
|
740
772
|
get when() {
|
|
741
773
|
return e.rowActions;
|
|
742
774
|
},
|
|
743
775
|
get children() {
|
|
744
|
-
return
|
|
776
|
+
return ke();
|
|
745
777
|
}
|
|
746
778
|
}), null), a(g, n(p, {
|
|
747
779
|
get each() {
|
|
748
|
-
return
|
|
780
|
+
return ae();
|
|
749
781
|
},
|
|
750
|
-
children:
|
|
782
|
+
children: dt
|
|
751
783
|
}), null), a(g, n(m, {
|
|
752
784
|
get when() {
|
|
753
|
-
return
|
|
785
|
+
return _t();
|
|
754
786
|
},
|
|
755
787
|
get children() {
|
|
756
788
|
return n(p, {
|
|
757
789
|
get each() {
|
|
758
|
-
return Array.from({ length: e.skeletonRows ??
|
|
790
|
+
return Array.from({ length: e.skeletonRows ?? Ne });
|
|
759
791
|
},
|
|
760
|
-
children:
|
|
792
|
+
children: ft
|
|
761
793
|
});
|
|
762
794
|
}
|
|
763
795
|
}), null), a(r, n(m, {
|
|
@@ -766,24 +798,24 @@ function J(e) {
|
|
|
766
798
|
},
|
|
767
799
|
get children() {
|
|
768
800
|
return e.loadingContent ?? (() => {
|
|
769
|
-
var e =
|
|
770
|
-
return i(() => e.classList.toggle("data-table-visually-hidden",
|
|
801
|
+
var e = je();
|
|
802
|
+
return i(() => e.classList.toggle("data-table-visually-hidden", !!_t())), e;
|
|
771
803
|
})();
|
|
772
804
|
}
|
|
773
805
|
}), null), a(r, n(m, {
|
|
774
806
|
get when() {
|
|
775
|
-
return
|
|
807
|
+
return $();
|
|
776
808
|
},
|
|
777
809
|
get children() {
|
|
778
|
-
return e.emptyContent ??
|
|
810
|
+
return e.emptyContent ?? Me();
|
|
779
811
|
}
|
|
780
812
|
}), null), a(r, n(m, {
|
|
781
813
|
get when() {
|
|
782
|
-
return
|
|
814
|
+
return pt();
|
|
783
815
|
},
|
|
784
|
-
children:
|
|
816
|
+
children: gt
|
|
785
817
|
}), null), i((n) => {
|
|
786
|
-
var i = `data-table-wrap${e.class ? ` ${e.class}` : ""}`, a =
|
|
818
|
+
var i = `data-table-wrap${e.class ? ` ${e.class}` : ""}`, a = ze() !== void 0, s = !!e.stickyHeader, d = !!e.stickyActions, f = o(), p = ze() === void 0 ? void 0 : { width: `${ze()}px` };
|
|
787
819
|
return i !== n.e && t(r, n.e = i), a !== n.t && l.classList.toggle("data-table-resized", n.t = a), s !== n.a && l.classList.toggle("data-table-sticky-header", n.a = s), d !== n.o && l.classList.toggle("data-table-sticky-actions", n.o = d), f !== n.i && c(l, "aria-busy", n.i = f), n.n = u(l, p, n.n), n;
|
|
788
820
|
}, {
|
|
789
821
|
e: void 0,
|
|
@@ -802,37 +834,37 @@ r([
|
|
|
802
834
|
"dblclick"
|
|
803
835
|
]);
|
|
804
836
|
// node_modules/@tabler/icons-solidjs/dist/source/icons/IconDeviceFloppy.js
|
|
805
|
-
var
|
|
837
|
+
var X = R("outline", "device-floppy", "DeviceFloppy", [
|
|
806
838
|
["path", { d: "M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2" }],
|
|
807
839
|
["path", { d: "M10 14a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" }],
|
|
808
840
|
["path", { d: "M14 4l0 4l-6 0l0 -4" }]
|
|
809
|
-
]),
|
|
810
|
-
columnFilteringFeature:
|
|
811
|
-
globalFilteringFeature:
|
|
812
|
-
filteredRowModel:
|
|
841
|
+
]), Be = R("outline", "search", "Search", [["path", { d: "M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" }], ["path", { d: "M21 21l-6 -6" }]]), Z = R("outline", "x", "X", [["path", { d: "M18 6l-12 12" }], ["path", { d: "M6 6l12 12" }]]), Ve = /*#__PURE__*/ d("<li class=filter-table-chip><button type=button class=filter-table-chip-remove>"), He = /*#__PURE__*/ d("<ul class=filter-table-chips>"), Ue = /*#__PURE__*/ d("<div class=filter-table-multi>"), We = /*#__PURE__*/ d("<div class=filter-table-range><input class=filter-table-input step=any><input class=filter-table-input step=any>"), Ge = /*#__PURE__*/ d("<input class=filter-table-input type=text>"), Ke = /*#__PURE__*/ d("<div class=filter-table-search><input type=search class=filter-table-input>"), qe = /*#__PURE__*/ d("<div class=filter-table-saved>"), Je = /*#__PURE__*/ d("<button type=button class=filter-table-chip-remove>"), Ye = /*#__PURE__*/ d("<li><button type=button class=filter-table-pill>"), Xe = /*#__PURE__*/ d("<li><button type=button class=\"filter-table-pill filter-table-pill-save\">"), Ze = /*#__PURE__*/ d("<ul class=filter-table-pills aria-label=\"Applied filters\"><li><button type=button class=\"filter-table-pill filter-table-pill-clear\">"), Qe = /*#__PURE__*/ d("<form class=filter-table-save><input type=text class=filter-table-input><button type=submit class=\"filter-table-button filter-table-button-primary\"></button><button type=button class=filter-table-button>"), $e = /*#__PURE__*/ d("<div class=filter-table-toolbar>"), et = /*#__PURE__*/ d("<span class=filter-table-badge>"), tt = /*#__PURE__*/ d("<button type=button role=tab class=filter-table-tab>"), nt = /*#__PURE__*/ d("<div class=filter-table-field><label class=filter-table-label>"), rt = /*#__PURE__*/ d("<legend class=filter-table-legend>"), it = /*#__PURE__*/ d("<fieldset class=filter-table-fieldset>"), at = /*#__PURE__*/ d("<form class=filter-table-form><div class=filter-table-form-actions><button type=button class=filter-table-button></button><button type=submit class=\"filter-table-button filter-table-button-primary\">"), ot = /*#__PURE__*/ d("<div><div class=filter-table-tabs role=tablist></div><div role=tabpanel></div><div role=tabpanel>"), st = "q", ct = 300, lt = "..", ut = "__search__", dt = P({
|
|
842
|
+
columnFilteringFeature: T,
|
|
843
|
+
globalFilteringFeature: te,
|
|
844
|
+
filteredRowModel: k()
|
|
813
845
|
});
|
|
814
|
-
function
|
|
815
|
-
let [t = "", n = ""] = e.split(
|
|
846
|
+
function ft(e) {
|
|
847
|
+
let [t = "", n = ""] = e.split(lt);
|
|
816
848
|
return {
|
|
817
849
|
min: t,
|
|
818
850
|
max: n
|
|
819
851
|
};
|
|
820
852
|
}
|
|
821
|
-
function
|
|
822
|
-
return e === "" && t === "" ? "" : `${e}${
|
|
853
|
+
function pt(e, t) {
|
|
854
|
+
return e === "" && t === "" ? "" : `${e}${lt}${t}`;
|
|
823
855
|
}
|
|
824
856
|
function Q(e) {
|
|
825
857
|
return typeof e == "function" ? e() : e;
|
|
826
858
|
}
|
|
827
|
-
function
|
|
859
|
+
function mt(e) {
|
|
828
860
|
return Array.isArray(e) ? e.length > 0 : (e ?? "").trim() !== "";
|
|
829
861
|
}
|
|
830
|
-
function
|
|
862
|
+
function ht(e) {
|
|
831
863
|
let t = {};
|
|
832
|
-
for (let [n, r] of Object.entries(e))
|
|
864
|
+
for (let [n, r] of Object.entries(e)) mt(r) && (t[n] = Array.isArray(r) ? r : r.trim());
|
|
833
865
|
return t;
|
|
834
866
|
}
|
|
835
|
-
function
|
|
867
|
+
function gt(e, t) {
|
|
836
868
|
let n = Object.keys(e);
|
|
837
869
|
return n.length === Object.keys(t).length && n.every((n) => {
|
|
838
870
|
let r = e[n], i = t[n];
|
|
@@ -842,7 +874,7 @@ function mt(e, t) {
|
|
|
842
874
|
function $(e) {
|
|
843
875
|
return typeof e == "string" || typeof e == "number" || typeof e == "boolean" ? String(e) : "";
|
|
844
876
|
}
|
|
845
|
-
function
|
|
877
|
+
function _t(e) {
|
|
846
878
|
if (typeof e == "string" && /^\d{4}-\d{2}-\d{2}$/.test(e)) return e;
|
|
847
879
|
if (!(e instanceof Date || typeof e == "string" || typeof e == "number")) return;
|
|
848
880
|
let t = new Date(e);
|
|
@@ -850,116 +882,116 @@ function ht(e) {
|
|
|
850
882
|
let n = String(t.getMonth() + 1).padStart(2, "0"), r = String(t.getDate()).padStart(2, "0");
|
|
851
883
|
return `${t.getFullYear()}-${n}-${r}`;
|
|
852
884
|
}
|
|
853
|
-
function
|
|
885
|
+
function vt(e, t, n) {
|
|
854
886
|
if (e == null || e === "") return !1;
|
|
855
887
|
let r = Number(e);
|
|
856
888
|
return !Number.isNaN(r) && (t === "" || r >= Number(t)) && (n === "" || r <= Number(n));
|
|
857
889
|
}
|
|
858
|
-
function
|
|
859
|
-
let r =
|
|
890
|
+
function yt(e, t, n) {
|
|
891
|
+
let r = _t(e);
|
|
860
892
|
return r !== void 0 && (t === "" || r >= t) && (n === "" || r <= n);
|
|
861
893
|
}
|
|
862
|
-
function
|
|
863
|
-
let [r, l] =
|
|
864
|
-
function
|
|
865
|
-
let t =
|
|
866
|
-
|
|
867
|
-
let n =
|
|
894
|
+
function bt(e) {
|
|
895
|
+
let [r, l] = C(e, /* @__PURE__ */ "rows.filters.filterValues.defaultFilterValues.onFilterValuesChange.savedFilters.onSavedFiltersChange.manualFiltering.totalCount.quickSearch.quickSearchDebounce.getSearchText.quickSearchLabel.resultsLabel.filtersLabel.applyLabel.resetLabel.clearAllLabel.anyLabel.yesLabel.noLabel.fromLabel.toLabel.savedFiltersLabel.saveLabel.saveNameLabel.cancelLabel.clearSavedFilterLabel.class".split(".")), u = _(() => Q(r.rows)), [d, h] = v(ht(r.defaultFilterValues ?? {})), S = _(() => r.filterValues === void 0 ? d() : ht(Q(r.filterValues)));
|
|
896
|
+
function w(e) {
|
|
897
|
+
let t = k !== void 0;
|
|
898
|
+
A();
|
|
899
|
+
let n = ht(t ? {
|
|
868
900
|
...e,
|
|
869
|
-
[
|
|
901
|
+
[st]: D()
|
|
870
902
|
} : e);
|
|
871
903
|
r.filterValues === void 0 && h(n), r.onFilterValuesChange?.(n);
|
|
872
904
|
}
|
|
873
|
-
function
|
|
874
|
-
|
|
875
|
-
...
|
|
905
|
+
function T(e, t) {
|
|
906
|
+
w({
|
|
907
|
+
...S(),
|
|
876
908
|
[e]: t
|
|
877
909
|
});
|
|
878
910
|
}
|
|
879
|
-
let
|
|
880
|
-
function
|
|
881
|
-
clearTimeout(
|
|
911
|
+
let E = () => $(S()[st]), [D, O] = v(E()), k;
|
|
912
|
+
function A() {
|
|
913
|
+
clearTimeout(k), k = void 0;
|
|
882
914
|
}
|
|
883
|
-
|
|
884
|
-
function
|
|
885
|
-
|
|
915
|
+
x(A);
|
|
916
|
+
function M() {
|
|
917
|
+
D().trim() !== E() && T(st, D());
|
|
886
918
|
}
|
|
887
|
-
function
|
|
888
|
-
|
|
919
|
+
function te() {
|
|
920
|
+
k !== void 0 && (A(), M());
|
|
889
921
|
}
|
|
890
|
-
function
|
|
891
|
-
|
|
892
|
-
let t = r.quickSearchDebounce ?? (r.manualFiltering ?
|
|
893
|
-
t <= 0 ?
|
|
894
|
-
|
|
922
|
+
function N(e) {
|
|
923
|
+
O(e), A();
|
|
924
|
+
let t = r.quickSearchDebounce ?? (r.manualFiltering ? ct : 0);
|
|
925
|
+
t <= 0 ? M() : k = setTimeout(() => {
|
|
926
|
+
k = void 0, M();
|
|
895
927
|
}, t);
|
|
896
928
|
}
|
|
897
|
-
g(
|
|
898
|
-
|
|
929
|
+
g(b(E, (e) => {
|
|
930
|
+
k === void 0 && e !== D().trim() && O(e);
|
|
899
931
|
}));
|
|
900
|
-
let
|
|
901
|
-
function
|
|
932
|
+
let P = _(() => r.filters.filter((e) => mt(S()[e.key])));
|
|
933
|
+
function F(e, t) {
|
|
902
934
|
return t.getValue ? t.getValue(e) : e[t.key];
|
|
903
935
|
}
|
|
904
|
-
function
|
|
936
|
+
function ne(e, t, n) {
|
|
905
937
|
if (t.match) return t.match(e, n);
|
|
906
|
-
let r =
|
|
938
|
+
let r = F(e, t);
|
|
907
939
|
if (t.type === "select") {
|
|
908
940
|
let e = Array.isArray(n) ? n : [n];
|
|
909
941
|
return (Array.isArray(r) ? r : [r]).some((t) => e.includes($(t)));
|
|
910
942
|
}
|
|
911
943
|
if (t.type === "boolean") return !!r == (n === "true");
|
|
912
944
|
if (t.type === "number-range" || t.type === "date-range") {
|
|
913
|
-
let { min: e, max: i } =
|
|
914
|
-
return (t.type === "date-range" ?
|
|
945
|
+
let { min: e, max: i } = ft($(n));
|
|
946
|
+
return (t.type === "date-range" ? yt : vt)(r, e, i);
|
|
915
947
|
}
|
|
916
948
|
return $(r).toLowerCase().includes($(n).toLowerCase());
|
|
917
949
|
}
|
|
918
|
-
function
|
|
950
|
+
function I(e) {
|
|
919
951
|
return r.getSearchText ? r.getSearchText(e) : l.columns.map((t) => $(t.sortValue?.(e) ?? e[t.key])).join(" ");
|
|
920
952
|
}
|
|
921
|
-
let
|
|
953
|
+
let L = _(() => P().map((e) => ({
|
|
922
954
|
id: e.key,
|
|
923
|
-
value:
|
|
924
|
-
}))),
|
|
955
|
+
value: S()[e.key]
|
|
956
|
+
}))), re = _(() => {
|
|
925
957
|
let e = r.filters.map((e) => ({
|
|
926
958
|
id: e.key,
|
|
927
|
-
accessorFn: (t) =>
|
|
928
|
-
filterFn: (t, n, r) =>
|
|
959
|
+
accessorFn: (t) => F(t, e),
|
|
960
|
+
filterFn: (t, n, r) => ne(t.original, e, r)
|
|
929
961
|
}));
|
|
930
962
|
return e.push({
|
|
931
|
-
id:
|
|
932
|
-
accessorFn:
|
|
963
|
+
id: ut,
|
|
964
|
+
accessorFn: I
|
|
933
965
|
}), e;
|
|
934
|
-
}),
|
|
935
|
-
features:
|
|
966
|
+
}), ie = ee({
|
|
967
|
+
features: dt,
|
|
936
968
|
get data() {
|
|
937
969
|
return u();
|
|
938
970
|
},
|
|
939
971
|
get columns() {
|
|
940
|
-
return
|
|
972
|
+
return re();
|
|
941
973
|
},
|
|
942
974
|
getRowId: (e) => String(l.getRowId(e)),
|
|
943
975
|
get manualFiltering() {
|
|
944
976
|
return r.manualFiltering;
|
|
945
977
|
},
|
|
946
|
-
globalFilterFn:
|
|
947
|
-
getColumnCanGlobalFilter: (e) => e.id ===
|
|
978
|
+
globalFilterFn: j,
|
|
979
|
+
getColumnCanGlobalFilter: (e) => e.id === ut,
|
|
948
980
|
state: {
|
|
949
981
|
get columnFilters() {
|
|
950
|
-
return
|
|
982
|
+
return L();
|
|
951
983
|
},
|
|
952
984
|
get globalFilter() {
|
|
953
|
-
return
|
|
985
|
+
return E();
|
|
954
986
|
}
|
|
955
987
|
}
|
|
956
|
-
}),
|
|
988
|
+
}), R = _(() => ie.getRowModel().rows.map((e) => e.original)), ae = _((e) => {
|
|
957
989
|
let t = /* @__PURE__ */ new Map();
|
|
958
990
|
for (let n of r.filters) {
|
|
959
991
|
if (n.type !== "select" || n.options) continue;
|
|
960
992
|
let i = new Set(r.manualFiltering ? e.get(n.key) : void 0);
|
|
961
993
|
for (let e of u()) {
|
|
962
|
-
let t =
|
|
994
|
+
let t = F(e, n);
|
|
963
995
|
for (let e of Array.isArray(t) ? t : [t]) {
|
|
964
996
|
let t = $(e);
|
|
965
997
|
t !== "" && i.add(t);
|
|
@@ -969,108 +1001,108 @@ function vt(e) {
|
|
|
969
1001
|
}
|
|
970
1002
|
return t;
|
|
971
1003
|
}, /* @__PURE__ */ new Map());
|
|
972
|
-
function
|
|
973
|
-
return e.options ? e.options : (
|
|
1004
|
+
function oe(e) {
|
|
1005
|
+
return e.options ? e.options : (ae().get(e.key) ?? []).map((e) => ({
|
|
974
1006
|
value: e,
|
|
975
1007
|
label: e
|
|
976
1008
|
}));
|
|
977
1009
|
}
|
|
978
|
-
function
|
|
979
|
-
let n = e.formatValue ?? ((e) => e), { min: r, max: i } =
|
|
1010
|
+
function se(e, t) {
|
|
1011
|
+
let n = e.formatValue ?? ((e) => e), { min: r, max: i } = ft(t);
|
|
980
1012
|
return i === "" ? `≥ ${n(r)}` : r === "" ? `≤ ${n(i)}` : `${n(r)} – ${n(i)}`;
|
|
981
1013
|
}
|
|
982
|
-
function
|
|
983
|
-
return e.type === "boolean" ? t === "true" ? r.yesLabel ?? "Yes" : r.noLabel ?? "No" : e.type === "number-range" || e.type === "date-range" ?
|
|
1014
|
+
function ce(e, t) {
|
|
1015
|
+
return e.type === "boolean" ? t === "true" ? r.yesLabel ?? "Yes" : r.noLabel ?? "No" : e.type === "number-range" || e.type === "date-range" ? se(e, t) : e.type === "select" ? oe(e).find((e) => String(e.value) === t)?.label ?? t : t;
|
|
984
1016
|
}
|
|
985
|
-
let
|
|
986
|
-
let t =
|
|
1017
|
+
let le = _(() => P().flatMap((e) => {
|
|
1018
|
+
let t = S()[e.key];
|
|
987
1019
|
return (Array.isArray(t) ? t : [t]).map((t) => ({
|
|
988
1020
|
filter: e,
|
|
989
1021
|
item: t,
|
|
990
|
-
text: `${e.label}: ${
|
|
1022
|
+
text: `${e.label}: ${ce(e, t)}`
|
|
991
1023
|
}));
|
|
992
1024
|
}));
|
|
993
|
-
function
|
|
994
|
-
let n =
|
|
995
|
-
|
|
1025
|
+
function ue(e, t) {
|
|
1026
|
+
let n = S()[e.key];
|
|
1027
|
+
T(e.key, Array.isArray(n) ? n.filter((e) => e !== t) : "");
|
|
996
1028
|
}
|
|
997
|
-
function
|
|
998
|
-
|
|
1029
|
+
function de() {
|
|
1030
|
+
w({ [st]: E() });
|
|
999
1031
|
}
|
|
1000
|
-
let
|
|
1001
|
-
function
|
|
1002
|
-
let t =
|
|
1003
|
-
t && (
|
|
1032
|
+
let z = _(() => r.savedFilters === void 0 ? void 0 : Q(r.savedFilters)), B = _(() => z()?.find((e) => gt(ht(e.values), S()))), [fe, V] = v(!1), [pe, me] = v("");
|
|
1033
|
+
function U(e) {
|
|
1034
|
+
let t = z()?.find((t) => t.name === e);
|
|
1035
|
+
t && (A(), O($(t.values[st])), w(t.values));
|
|
1004
1036
|
}
|
|
1005
|
-
function
|
|
1006
|
-
|
|
1037
|
+
function he() {
|
|
1038
|
+
te(), me(B()?.name ?? ""), V(!0);
|
|
1007
1039
|
}
|
|
1008
|
-
function
|
|
1040
|
+
function ge(e) {
|
|
1009
1041
|
e.preventDefault();
|
|
1010
|
-
let t =
|
|
1042
|
+
let t = pe().trim();
|
|
1011
1043
|
if (t === "") return;
|
|
1012
|
-
let n = (
|
|
1044
|
+
let n = (z() ?? []).filter((e) => e.name !== t);
|
|
1013
1045
|
r.onSavedFiltersChange?.([...n, {
|
|
1014
1046
|
name: t,
|
|
1015
|
-
values:
|
|
1016
|
-
}]),
|
|
1047
|
+
values: S()
|
|
1048
|
+
}]), V(!1);
|
|
1017
1049
|
}
|
|
1018
|
-
let [
|
|
1019
|
-
g(
|
|
1020
|
-
function
|
|
1021
|
-
return
|
|
1050
|
+
let [_e, ve] = v(S());
|
|
1051
|
+
g(b(S, (e) => ve(e)));
|
|
1052
|
+
function ye(e) {
|
|
1053
|
+
return _e()[e];
|
|
1022
1054
|
}
|
|
1023
|
-
function
|
|
1024
|
-
|
|
1055
|
+
function W(e, t) {
|
|
1056
|
+
ve((n) => ({
|
|
1025
1057
|
...n,
|
|
1026
1058
|
[e]: t
|
|
1027
1059
|
}));
|
|
1028
1060
|
}
|
|
1029
|
-
let
|
|
1061
|
+
let be = _(() => {
|
|
1030
1062
|
let e = /* @__PURE__ */ new Map([[void 0, []]]);
|
|
1031
1063
|
for (let t of r.filters) e.set(t.group, [...e.get(t.group) ?? [], t]);
|
|
1032
1064
|
return [...e.entries()].filter(([, e]) => e.length > 0).map(([e, t]) => ({
|
|
1033
1065
|
name: e,
|
|
1034
1066
|
filters: t
|
|
1035
1067
|
}));
|
|
1036
|
-
}),
|
|
1037
|
-
function
|
|
1038
|
-
e === "filters" &&
|
|
1068
|
+
}), xe = y(), G = ["results", "filters"], [K, Se] = v("results"), Ce = (e) => `${xe}-tab-${e}`, we = (e) => `${xe}-panel-${e}`, q = (e) => `${xe}-filter-${e}`;
|
|
1069
|
+
function Te(e) {
|
|
1070
|
+
e === "filters" && ve(S()), Se(e);
|
|
1039
1071
|
}
|
|
1040
|
-
function
|
|
1072
|
+
function Ee(e) {
|
|
1041
1073
|
let t = e.key === "ArrowRight" ? 1 : e.key === "ArrowLeft" ? -1 : 0;
|
|
1042
1074
|
if (t === 0) return;
|
|
1043
1075
|
e.preventDefault();
|
|
1044
|
-
let n =
|
|
1045
|
-
|
|
1076
|
+
let n = G[(G.indexOf(K()) + t + G.length) % G.length];
|
|
1077
|
+
Te(n), document.getElementById(Ce(n))?.focus();
|
|
1046
1078
|
}
|
|
1047
|
-
function
|
|
1048
|
-
e.preventDefault(),
|
|
1079
|
+
function De(e) {
|
|
1080
|
+
e.preventDefault(), w(_e()), Se("results");
|
|
1049
1081
|
}
|
|
1050
|
-
function
|
|
1051
|
-
|
|
1082
|
+
function Oe() {
|
|
1083
|
+
de(), Se("results");
|
|
1052
1084
|
}
|
|
1053
|
-
function
|
|
1085
|
+
function ke(e) {
|
|
1054
1086
|
let t = () => {
|
|
1055
|
-
let t =
|
|
1087
|
+
let t = ye(e.key);
|
|
1056
1088
|
return Array.isArray(t) ? t : [];
|
|
1057
1089
|
}, o = (r) => (() => {
|
|
1058
|
-
var o =
|
|
1059
|
-
return a(o, () =>
|
|
1090
|
+
var o = Ve(), s = o.firstChild;
|
|
1091
|
+
return a(o, () => ce(e, r), s), s.$$click = () => W(e.key, t().filter((e) => e !== r)), a(s, n(Z, {
|
|
1060
1092
|
size: 12,
|
|
1061
1093
|
"aria-hidden": "true"
|
|
1062
|
-
})), i(() => c(s, "aria-label", `Remove ${
|
|
1094
|
+
})), i(() => c(s, "aria-label", `Remove ${ce(e, r)}`)), o;
|
|
1063
1095
|
})();
|
|
1064
1096
|
return (() => {
|
|
1065
|
-
var i =
|
|
1066
|
-
return a(i, n(
|
|
1097
|
+
var i = Ue();
|
|
1098
|
+
return a(i, n(H, {
|
|
1067
1099
|
get id() {
|
|
1068
|
-
return
|
|
1100
|
+
return q(e.key);
|
|
1069
1101
|
},
|
|
1070
1102
|
value: "",
|
|
1071
|
-
onChange: (n) =>
|
|
1103
|
+
onChange: (n) => W(e.key, [...t(), n]),
|
|
1072
1104
|
get options() {
|
|
1073
|
-
return
|
|
1105
|
+
return oe(e).filter((e) => !t().includes(String(e.value)));
|
|
1074
1106
|
},
|
|
1075
1107
|
get placeholder() {
|
|
1076
1108
|
return e.placeholder ?? r.anyLabel ?? "Any";
|
|
@@ -1080,7 +1112,7 @@ function vt(e) {
|
|
|
1080
1112
|
return t().length > 0;
|
|
1081
1113
|
},
|
|
1082
1114
|
get children() {
|
|
1083
|
-
var e =
|
|
1115
|
+
var e = He();
|
|
1084
1116
|
return a(e, n(p, {
|
|
1085
1117
|
get each() {
|
|
1086
1118
|
return t();
|
|
@@ -1091,12 +1123,12 @@ function vt(e) {
|
|
|
1091
1123
|
}), null), i;
|
|
1092
1124
|
})();
|
|
1093
1125
|
}
|
|
1094
|
-
function
|
|
1095
|
-
let t = e.type === "date-range" ? "date" : "number", n = () =>
|
|
1126
|
+
function Ae(e) {
|
|
1127
|
+
let t = e.type === "date-range" ? "date" : "number", n = () => ft($(ye(e.key))), a = _(() => n().min), o = _(() => n().max), s = () => r.fromLabel ?? "From", l = () => r.toLabel ?? "To";
|
|
1096
1128
|
return (() => {
|
|
1097
|
-
var n =
|
|
1098
|
-
return r.$$input = (t) =>
|
|
1099
|
-
var n =
|
|
1129
|
+
var n = We(), r = n.firstChild, u = r.nextSibling;
|
|
1130
|
+
return r.$$input = (t) => W(e.key, pt(t.currentTarget.value, o())), c(r, "type", t), u.$$input = (t) => W(e.key, pt(a(), t.currentTarget.value)), c(u, "type", t), i((t) => {
|
|
1131
|
+
var n = q(e.key), i = o() || void 0, d = `${e.label} ${s()}`, f = s(), p = a() || void 0, m = `${e.label} ${l()}`, h = l();
|
|
1100
1132
|
return n !== t.e && c(r, "id", t.e = n), i !== t.t && c(r, "max", t.t = i), d !== t.a && c(r, "aria-label", t.a = d), f !== t.o && c(r, "placeholder", t.o = f), p !== t.i && c(u, "min", t.i = p), m !== t.n && c(u, "aria-label", t.n = m), h !== t.s && c(u, "placeholder", t.s = h), t;
|
|
1101
1133
|
}, {
|
|
1102
1134
|
e: void 0,
|
|
@@ -1109,24 +1141,24 @@ function vt(e) {
|
|
|
1109
1141
|
}), i(() => r.value = a()), i(() => u.value = o()), n;
|
|
1110
1142
|
})();
|
|
1111
1143
|
}
|
|
1112
|
-
function
|
|
1113
|
-
return e.type === "number-range" || e.type === "date-range" ?
|
|
1114
|
-
var t =
|
|
1115
|
-
return t.$$input = (t) =>
|
|
1116
|
-
var r =
|
|
1144
|
+
function je(e) {
|
|
1145
|
+
return e.type === "number-range" || e.type === "date-range" ? Ae(e) : e.type === "text" ? (() => {
|
|
1146
|
+
var t = Ge();
|
|
1147
|
+
return t.$$input = (t) => W(e.key, t.currentTarget.value), i((n) => {
|
|
1148
|
+
var r = q(e.key), i = e.placeholder;
|
|
1117
1149
|
return r !== n.e && c(t, "id", n.e = r), i !== n.t && c(t, "placeholder", n.t = i), n;
|
|
1118
1150
|
}, {
|
|
1119
1151
|
e: void 0,
|
|
1120
1152
|
t: void 0
|
|
1121
|
-
}), i(() => t.value = $(
|
|
1122
|
-
})() : e.type === "boolean" ? n(
|
|
1153
|
+
}), i(() => t.value = $(ye(e.key))), t;
|
|
1154
|
+
})() : e.type === "boolean" ? n(H, {
|
|
1123
1155
|
get id() {
|
|
1124
|
-
return
|
|
1156
|
+
return q(e.key);
|
|
1125
1157
|
},
|
|
1126
1158
|
get value() {
|
|
1127
|
-
return $(
|
|
1159
|
+
return $(ye(e.key));
|
|
1128
1160
|
},
|
|
1129
|
-
onChange: (t) =>
|
|
1161
|
+
onChange: (t) => W(e.key, t),
|
|
1130
1162
|
get emptyLabel() {
|
|
1131
1163
|
return r.anyLabel ?? "Any";
|
|
1132
1164
|
},
|
|
@@ -1139,36 +1171,36 @@ function vt(e) {
|
|
|
1139
1171
|
label: r.noLabel ?? "No"
|
|
1140
1172
|
}];
|
|
1141
1173
|
}
|
|
1142
|
-
}) :
|
|
1174
|
+
}) : ke(e);
|
|
1143
1175
|
}
|
|
1144
|
-
function
|
|
1176
|
+
function Me() {
|
|
1145
1177
|
return (() => {
|
|
1146
|
-
var e =
|
|
1147
|
-
return a(e, n(
|
|
1178
|
+
var e = Ke(), t = e.firstChild;
|
|
1179
|
+
return a(e, n(Be, {
|
|
1148
1180
|
class: "filter-table-search-icon",
|
|
1149
1181
|
size: 16,
|
|
1150
1182
|
"aria-hidden": "true"
|
|
1151
1183
|
}), t), t.$$keydown = (e) => {
|
|
1152
|
-
e.key === "Enter" &&
|
|
1153
|
-
}, t.$$input = (e) =>
|
|
1184
|
+
e.key === "Enter" && te();
|
|
1185
|
+
}, t.$$input = (e) => N(e.currentTarget.value), i((e) => {
|
|
1154
1186
|
var n = r.quickSearchLabel ?? "Quick search", i = r.quickSearchLabel ?? "Quick search";
|
|
1155
1187
|
return n !== e.e && c(t, "aria-label", e.e = n), i !== e.t && c(t, "placeholder", e.t = i), e;
|
|
1156
1188
|
}, {
|
|
1157
1189
|
e: void 0,
|
|
1158
1190
|
t: void 0
|
|
1159
|
-
}), i(() => t.value =
|
|
1191
|
+
}), i(() => t.value = D()), e;
|
|
1160
1192
|
})();
|
|
1161
1193
|
}
|
|
1162
|
-
function
|
|
1194
|
+
function J() {
|
|
1163
1195
|
return (() => {
|
|
1164
|
-
var e =
|
|
1165
|
-
return a(e, n(
|
|
1196
|
+
var e = qe();
|
|
1197
|
+
return a(e, n(H, {
|
|
1166
1198
|
get value() {
|
|
1167
|
-
return
|
|
1199
|
+
return B()?.name ?? "";
|
|
1168
1200
|
},
|
|
1169
|
-
onChange:
|
|
1201
|
+
onChange: U,
|
|
1170
1202
|
get options() {
|
|
1171
|
-
return (
|
|
1203
|
+
return (z() ?? []).map((e) => ({
|
|
1172
1204
|
value: e.name,
|
|
1173
1205
|
label: e.name
|
|
1174
1206
|
}));
|
|
@@ -1181,11 +1213,11 @@ function vt(e) {
|
|
|
1181
1213
|
}
|
|
1182
1214
|
}), null), a(e, n(m, {
|
|
1183
1215
|
get when() {
|
|
1184
|
-
return
|
|
1216
|
+
return B();
|
|
1185
1217
|
},
|
|
1186
1218
|
children: (e) => (() => {
|
|
1187
|
-
var t =
|
|
1188
|
-
return t.$$click =
|
|
1219
|
+
var t = Je();
|
|
1220
|
+
return t.$$click = de, a(t, n(Z, {
|
|
1189
1221
|
size: 14,
|
|
1190
1222
|
"aria-hidden": "true"
|
|
1191
1223
|
})), i(() => c(t, "aria-label", `${r.clearSavedFilterLabel ?? "Clear saved filter"} ${e().name}`)), t;
|
|
@@ -1193,30 +1225,30 @@ function vt(e) {
|
|
|
1193
1225
|
}), null), e;
|
|
1194
1226
|
})();
|
|
1195
1227
|
}
|
|
1196
|
-
function
|
|
1228
|
+
function Ne(e) {
|
|
1197
1229
|
return (() => {
|
|
1198
|
-
var t =
|
|
1199
|
-
return r.$$click = () =>
|
|
1230
|
+
var t = Ye(), r = t.firstChild;
|
|
1231
|
+
return r.$$click = () => ue(e.filter, e.item), a(r, () => e.text, null), a(r, n(Z, {
|
|
1200
1232
|
size: 12,
|
|
1201
1233
|
"aria-hidden": "true"
|
|
1202
1234
|
}), null), i(() => c(r, "aria-label", `Remove filter ${e.text}`)), t;
|
|
1203
1235
|
})();
|
|
1204
1236
|
}
|
|
1205
|
-
function
|
|
1237
|
+
function Pe() {
|
|
1206
1238
|
return (() => {
|
|
1207
|
-
var e =
|
|
1239
|
+
var e = Ze(), t = e.firstChild, i = t.firstChild;
|
|
1208
1240
|
return a(e, n(p, {
|
|
1209
1241
|
get each() {
|
|
1210
|
-
return
|
|
1242
|
+
return le();
|
|
1211
1243
|
},
|
|
1212
|
-
children:
|
|
1213
|
-
}), t), i.$$click =
|
|
1244
|
+
children: Ne
|
|
1245
|
+
}), t), i.$$click = de, a(i, () => r.clearAllLabel ?? "Clear all"), a(e, n(m, {
|
|
1214
1246
|
get when() {
|
|
1215
|
-
return o(() =>
|
|
1247
|
+
return o(() => z() !== void 0)() && !fe();
|
|
1216
1248
|
},
|
|
1217
1249
|
get children() {
|
|
1218
|
-
var e =
|
|
1219
|
-
return t.$$click =
|
|
1250
|
+
var e = Xe(), t = e.firstChild;
|
|
1251
|
+
return t.$$click = he, a(t, n(X, {
|
|
1220
1252
|
size: 12,
|
|
1221
1253
|
"aria-hidden": "true"
|
|
1222
1254
|
}), null), a(t, () => r.saveLabel ?? "Save", null), e;
|
|
@@ -1224,74 +1256,74 @@ function vt(e) {
|
|
|
1224
1256
|
}), null), e;
|
|
1225
1257
|
})();
|
|
1226
1258
|
}
|
|
1227
|
-
function
|
|
1259
|
+
function Fe() {
|
|
1228
1260
|
return (() => {
|
|
1229
|
-
var e =
|
|
1261
|
+
var e = Qe(), t = e.firstChild, o = t.nextSibling, s = o.nextSibling;
|
|
1230
1262
|
return e.$$keydown = (e) => {
|
|
1231
|
-
e.key === "Escape" &&
|
|
1232
|
-
}, e.addEventListener("submit",
|
|
1263
|
+
e.key === "Escape" && V(!1);
|
|
1264
|
+
}, e.addEventListener("submit", ge), t.$$input = (e) => me(e.currentTarget.value), f((e) => queueMicrotask(() => e.focus()), t), a(o, n(X, {
|
|
1233
1265
|
size: 16,
|
|
1234
1266
|
"aria-hidden": "true"
|
|
1235
|
-
}), null), a(o, () => r.saveLabel ?? "Save", null), s.$$click = () =>
|
|
1267
|
+
}), null), a(o, () => r.saveLabel ?? "Save", null), s.$$click = () => V(!1), a(s, () => r.cancelLabel ?? "Cancel"), i((e) => {
|
|
1236
1268
|
var n = r.saveNameLabel ?? "Filter name", i = r.saveNameLabel ?? "Filter name";
|
|
1237
1269
|
return n !== e.e && c(t, "aria-label", e.e = n), i !== e.t && c(t, "placeholder", e.t = i), e;
|
|
1238
1270
|
}, {
|
|
1239
1271
|
e: void 0,
|
|
1240
1272
|
t: void 0
|
|
1241
|
-
}), i(() => t.value =
|
|
1273
|
+
}), i(() => t.value = pe()), e;
|
|
1242
1274
|
})();
|
|
1243
1275
|
}
|
|
1244
|
-
let
|
|
1245
|
-
var e =
|
|
1276
|
+
let Y = (() => {
|
|
1277
|
+
var e = $e();
|
|
1246
1278
|
return a(e, n(m, {
|
|
1247
1279
|
get when() {
|
|
1248
1280
|
return r.quickSearch !== !1;
|
|
1249
1281
|
},
|
|
1250
1282
|
get children() {
|
|
1251
|
-
return
|
|
1283
|
+
return Me();
|
|
1252
1284
|
}
|
|
1253
1285
|
}), null), a(e, n(m, {
|
|
1254
1286
|
get when() {
|
|
1255
|
-
return (
|
|
1287
|
+
return (z()?.length ?? 0) > 0;
|
|
1256
1288
|
},
|
|
1257
1289
|
get children() {
|
|
1258
|
-
return
|
|
1290
|
+
return J();
|
|
1259
1291
|
}
|
|
1260
1292
|
}), null), a(e, n(m, {
|
|
1261
1293
|
get when() {
|
|
1262
|
-
return
|
|
1294
|
+
return le().length > 0;
|
|
1263
1295
|
},
|
|
1264
1296
|
get children() {
|
|
1265
|
-
return
|
|
1297
|
+
return Pe();
|
|
1266
1298
|
}
|
|
1267
1299
|
}), null), a(e, n(m, {
|
|
1268
1300
|
get when() {
|
|
1269
|
-
return o(() => !!
|
|
1301
|
+
return o(() => !!fe())() && le().length > 0;
|
|
1270
1302
|
},
|
|
1271
1303
|
get children() {
|
|
1272
|
-
return
|
|
1304
|
+
return Fe();
|
|
1273
1305
|
}
|
|
1274
1306
|
}), null), e;
|
|
1275
1307
|
})();
|
|
1276
|
-
function
|
|
1308
|
+
function Ie(e) {
|
|
1277
1309
|
return e === "results" ? r.resultsLabel ?? "Results" : r.filtersLabel ?? "Filters";
|
|
1278
1310
|
}
|
|
1279
|
-
function
|
|
1280
|
-
return e === "results" ? Q(r.totalCount) ?? Q(l.pagination)?.rowCount ??
|
|
1311
|
+
function Le(e) {
|
|
1312
|
+
return e === "results" ? Q(r.totalCount) ?? Q(l.pagination)?.rowCount ?? R().length : P().length;
|
|
1281
1313
|
}
|
|
1282
|
-
function
|
|
1314
|
+
function Re(e) {
|
|
1283
1315
|
return (() => {
|
|
1284
|
-
var t =
|
|
1285
|
-
return t.$$keydown =
|
|
1316
|
+
var t = tt();
|
|
1317
|
+
return t.$$keydown = Ee, t.$$click = () => Te(e), a(t, () => Ie(e), null), a(t, n(m, {
|
|
1286
1318
|
get when() {
|
|
1287
|
-
return e === "results" ||
|
|
1319
|
+
return e === "results" || P().length > 0;
|
|
1288
1320
|
},
|
|
1289
1321
|
get children() {
|
|
1290
|
-
var t =
|
|
1291
|
-
return a(t, () =>
|
|
1322
|
+
var t = et();
|
|
1323
|
+
return a(t, () => Le(e)), t;
|
|
1292
1324
|
}
|
|
1293
1325
|
}), null), i((n) => {
|
|
1294
|
-
var r =
|
|
1326
|
+
var r = Ce(e), i = K() === e, a = we(e), o = K() === e ? 0 : -1;
|
|
1295
1327
|
return r !== n.e && c(t, "id", n.e = r), i !== n.t && c(t, "aria-selected", n.t = i), a !== n.a && c(t, "aria-controls", n.a = a), o !== n.o && c(t, "tabindex", n.o = o), n;
|
|
1296
1328
|
}, {
|
|
1297
1329
|
e: void 0,
|
|
@@ -1301,58 +1333,58 @@ function vt(e) {
|
|
|
1301
1333
|
}), t;
|
|
1302
1334
|
})();
|
|
1303
1335
|
}
|
|
1304
|
-
function
|
|
1336
|
+
function lt(e) {
|
|
1305
1337
|
return (() => {
|
|
1306
|
-
var t =
|
|
1307
|
-
return a(n, () => e.label), a(t, () =>
|
|
1338
|
+
var t = nt(), n = t.firstChild;
|
|
1339
|
+
return a(n, () => e.label), a(t, () => je(e), null), i(() => c(n, "for", q(e.key))), t;
|
|
1308
1340
|
})();
|
|
1309
1341
|
}
|
|
1310
|
-
function
|
|
1342
|
+
function _t(e) {
|
|
1311
1343
|
return (() => {
|
|
1312
|
-
var t =
|
|
1344
|
+
var t = it();
|
|
1313
1345
|
return a(t, n(m, {
|
|
1314
1346
|
get when() {
|
|
1315
1347
|
return e.name;
|
|
1316
1348
|
},
|
|
1317
1349
|
get children() {
|
|
1318
|
-
var t =
|
|
1350
|
+
var t = rt();
|
|
1319
1351
|
return a(t, () => e.name), t;
|
|
1320
1352
|
}
|
|
1321
1353
|
}), null), a(t, n(p, {
|
|
1322
1354
|
get each() {
|
|
1323
1355
|
return e.filters;
|
|
1324
1356
|
},
|
|
1325
|
-
children:
|
|
1357
|
+
children: lt
|
|
1326
1358
|
}), null), t;
|
|
1327
1359
|
})();
|
|
1328
1360
|
}
|
|
1329
1361
|
function bt() {
|
|
1330
1362
|
return (() => {
|
|
1331
|
-
var e =
|
|
1332
|
-
return e.addEventListener("submit",
|
|
1363
|
+
var e = at(), t = e.firstChild, i = t.firstChild, o = i.nextSibling;
|
|
1364
|
+
return e.addEventListener("submit", De), a(e, n(p, {
|
|
1333
1365
|
get each() {
|
|
1334
|
-
return
|
|
1366
|
+
return be();
|
|
1335
1367
|
},
|
|
1336
|
-
children:
|
|
1337
|
-
}), t), i.$$click =
|
|
1368
|
+
children: _t
|
|
1369
|
+
}), t), i.$$click = Oe, a(i, n(Z, {
|
|
1338
1370
|
size: 16,
|
|
1339
1371
|
"aria-hidden": "true"
|
|
1340
|
-
}), null), a(i, () => r.resetLabel ?? "Reset", null), a(o, n(
|
|
1372
|
+
}), null), a(i, () => r.resetLabel ?? "Reset", null), a(o, n(Be, {
|
|
1341
1373
|
size: 16,
|
|
1342
1374
|
"aria-hidden": "true"
|
|
1343
1375
|
}), null), a(o, () => r.applyLabel ?? "Search", null), e;
|
|
1344
1376
|
})();
|
|
1345
1377
|
}
|
|
1346
1378
|
return (() => {
|
|
1347
|
-
var e =
|
|
1379
|
+
var e = ot(), o = e.firstChild, u = o.nextSibling, d = u.nextSibling;
|
|
1348
1380
|
return a(o, n(p, {
|
|
1349
|
-
each:
|
|
1350
|
-
children:
|
|
1351
|
-
})), a(u, n(
|
|
1352
|
-
rows:
|
|
1353
|
-
toolbar:
|
|
1381
|
+
each: G,
|
|
1382
|
+
children: Re
|
|
1383
|
+
})), a(u, n(ze, s(l, {
|
|
1384
|
+
rows: R,
|
|
1385
|
+
toolbar: Y
|
|
1354
1386
|
}))), a(d, bt), i((n) => {
|
|
1355
|
-
var i = `filter-table${r.class ? ` ${r.class}` : ""}`, a =
|
|
1387
|
+
var i = `filter-table${r.class ? ` ${r.class}` : ""}`, a = we("results"), o = Ce("results"), s = K() !== "results", l = we("filters"), f = Ce("filters"), p = K() !== "filters";
|
|
1356
1388
|
return i !== n.e && t(e, n.e = i), a !== n.t && c(u, "id", n.t = a), o !== n.a && c(u, "aria-labelledby", n.a = o), s !== n.o && (u.hidden = n.o = s), l !== n.i && c(d, "id", n.i = l), f !== n.n && c(d, "aria-labelledby", n.n = f), p !== n.s && (d.hidden = n.s = p), n;
|
|
1357
1389
|
}, {
|
|
1358
1390
|
e: void 0,
|
|
@@ -1371,23 +1403,23 @@ r([
|
|
|
1371
1403
|
"keydown"
|
|
1372
1404
|
]);
|
|
1373
1405
|
// src/modal.tsx
|
|
1374
|
-
var
|
|
1375
|
-
function
|
|
1406
|
+
var xt = /*#__PURE__*/ d("<h2 class=modal-title>"), St = /*#__PURE__*/ d("<button type=button class=modal-close>"), Ct = /*#__PURE__*/ d("<div class=modal-header>"), wt = /*#__PURE__*/ d("<div class=modal-footer>"), Tt = /*#__PURE__*/ d("<dialog><div class=modal-panel><div class=modal-body>");
|
|
1407
|
+
function Et(e) {
|
|
1376
1408
|
return n(m, {
|
|
1377
1409
|
get when() {
|
|
1378
1410
|
return e.open;
|
|
1379
1411
|
},
|
|
1380
1412
|
get children() {
|
|
1381
|
-
return n(
|
|
1413
|
+
return n(Dt, e);
|
|
1382
1414
|
}
|
|
1383
1415
|
});
|
|
1384
1416
|
}
|
|
1385
|
-
function
|
|
1386
|
-
let r, o =
|
|
1387
|
-
|
|
1417
|
+
function Dt(e) {
|
|
1418
|
+
let r, o = y(), s = !1, l = !1, u = !1;
|
|
1419
|
+
S(() => {
|
|
1388
1420
|
if (!r) return;
|
|
1389
1421
|
let e = document.activeElement;
|
|
1390
|
-
r.showModal(),
|
|
1422
|
+
r.showModal(), x(() => {
|
|
1391
1423
|
l = !0, r?.close(), e instanceof HTMLElement && e.isConnected && e.focus();
|
|
1392
1424
|
});
|
|
1393
1425
|
});
|
|
@@ -1404,7 +1436,7 @@ function Tt(e) {
|
|
|
1404
1436
|
t.key === "Escape" && (t.preventDefault(), t.stopPropagation(), e.closeOnEscape !== !1 && d());
|
|
1405
1437
|
}
|
|
1406
1438
|
return (() => {
|
|
1407
|
-
var u =
|
|
1439
|
+
var u = Tt(), h = u.firstChild, g = h.firstChild;
|
|
1408
1440
|
u.$$click = (t) => {
|
|
1409
1441
|
s && t.target === r && e.closeOnBackdrop !== !1 && d(), s = !1;
|
|
1410
1442
|
}, u.$$pointerdown = (e) => {
|
|
@@ -1420,13 +1452,13 @@ function Tt(e) {
|
|
|
1420
1452
|
return e.title !== void 0 || !e.hideCloseButton;
|
|
1421
1453
|
},
|
|
1422
1454
|
get children() {
|
|
1423
|
-
var t =
|
|
1455
|
+
var t = Ct();
|
|
1424
1456
|
return a(t, n(m, {
|
|
1425
1457
|
get when() {
|
|
1426
1458
|
return e.title !== void 0;
|
|
1427
1459
|
},
|
|
1428
1460
|
get children() {
|
|
1429
|
-
var t =
|
|
1461
|
+
var t = xt();
|
|
1430
1462
|
return c(t, "id", o), a(t, () => e.title), t;
|
|
1431
1463
|
}
|
|
1432
1464
|
}), null), a(t, n(m, {
|
|
@@ -1434,8 +1466,8 @@ function Tt(e) {
|
|
|
1434
1466
|
return !e.hideCloseButton;
|
|
1435
1467
|
},
|
|
1436
1468
|
get children() {
|
|
1437
|
-
var t =
|
|
1438
|
-
return t.$$click = d, a(t, n(
|
|
1469
|
+
var t = St();
|
|
1470
|
+
return t.$$click = d, a(t, n(Z, {
|
|
1439
1471
|
size: 18,
|
|
1440
1472
|
"aria-hidden": "true"
|
|
1441
1473
|
})), i(() => c(t, "aria-label", e.closeLabel ?? "Close")), t;
|
|
@@ -1447,7 +1479,7 @@ function Tt(e) {
|
|
|
1447
1479
|
return e.footer !== void 0;
|
|
1448
1480
|
},
|
|
1449
1481
|
get children() {
|
|
1450
|
-
var t =
|
|
1482
|
+
var t = wt();
|
|
1451
1483
|
return a(t, () => e.footer), t;
|
|
1452
1484
|
}
|
|
1453
1485
|
}), null), i((n) => {
|
|
@@ -1467,18 +1499,18 @@ r([
|
|
|
1467
1499
|
"click"
|
|
1468
1500
|
]);
|
|
1469
1501
|
// src/search-bar.tsx
|
|
1470
|
-
var
|
|
1471
|
-
function
|
|
1502
|
+
var Ot = /*#__PURE__*/ d("<kbd class=search-bar-shortcut>"), kt = /*#__PURE__*/ d("<button type=button class=search-bar-clear>"), At = /*#__PURE__*/ d("<div><input class=search-bar-input>");
|
|
1503
|
+
function jt(e) {
|
|
1472
1504
|
let r, s = () => e.shortcutKey ?? "k", l = () => e.shortcutLabel ?? `Ctrl ${String(s()).toUpperCase()}`;
|
|
1473
|
-
return
|
|
1505
|
+
return S(() => {
|
|
1474
1506
|
let e = (e) => {
|
|
1475
1507
|
let t = s();
|
|
1476
1508
|
t !== !1 && r && (!(e.ctrlKey || e.metaKey) || e.altKey || e.shiftKey || e.key.toLowerCase() === t.toLowerCase() && (e.preventDefault(), r.focus(), r.select()));
|
|
1477
1509
|
};
|
|
1478
|
-
document.addEventListener("keydown", e),
|
|
1510
|
+
document.addEventListener("keydown", e), x(() => document.removeEventListener("keydown", e));
|
|
1479
1511
|
}), (() => {
|
|
1480
|
-
var u =
|
|
1481
|
-
a(u, n(
|
|
1512
|
+
var u = At(), d = u.firstChild;
|
|
1513
|
+
a(u, n(Be, {
|
|
1482
1514
|
size: 17,
|
|
1483
1515
|
class: "search-bar-icon",
|
|
1484
1516
|
"aria-hidden": "true"
|
|
@@ -1489,7 +1521,7 @@ function kt(e) {
|
|
|
1489
1521
|
return o(() => !e.value)() && s() !== !1;
|
|
1490
1522
|
},
|
|
1491
1523
|
get children() {
|
|
1492
|
-
var e =
|
|
1524
|
+
var e = Ot();
|
|
1493
1525
|
return a(e, l), e;
|
|
1494
1526
|
}
|
|
1495
1527
|
}), null), a(u, n(m, {
|
|
@@ -1497,8 +1529,8 @@ function kt(e) {
|
|
|
1497
1529
|
return e.value;
|
|
1498
1530
|
},
|
|
1499
1531
|
get children() {
|
|
1500
|
-
var t =
|
|
1501
|
-
return t.$$click = () => e.onInput(""), a(t, n(
|
|
1532
|
+
var t = kt();
|
|
1533
|
+
return t.$$click = () => e.onInput(""), a(t, n(Z, {
|
|
1502
1534
|
size: 15,
|
|
1503
1535
|
"aria-hidden": "true"
|
|
1504
1536
|
})), i(() => c(t, "aria-label", e.clearLabel ?? "Clear search")), t;
|
|
@@ -1515,4 +1547,4 @@ function kt(e) {
|
|
|
1515
1547
|
})();
|
|
1516
1548
|
}
|
|
1517
1549
|
r(["input", "click"]);
|
|
1518
|
-
export {
|
|
1550
|
+
export { I as ColorInput, H as Combobox, ze as DataTable, bt as FilterTable, Et as Modal, jt as SearchBar, ft as parseFilterTableRange };
|