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