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