@scbt-ecom/ui 0.89.0 → 0.89.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.js.map +1 -1
- package/dist/config.js.map +1 -1
- package/dist/constants.js.map +1 -1
- package/dist/hooks.js.map +1 -1
- package/dist/index-Bu5RfW_Z.js.map +1 -1
- package/dist/{index-BFZfRLgg.js → index-DM5UjNZl.js} +506 -506
- package/dist/{index-BFZfRLgg.js.map → index-DM5UjNZl.js.map} +1 -1
- package/dist/lib/shared/ui/chips/Chips.d.ts +11 -0
- package/dist/lib/shared/ui/chips/index.d.ts +1 -0
- package/dist/lib/shared/ui/index.d.ts +1 -0
- package/dist/lib/widgets/model/helpers.d.ts +2 -1
- package/dist/lib/widgets/userFeedback/UserFeedback.d.ts +1 -0
- package/dist/lib/widgets/userFeedback/ui/Success.d.ts +0 -2
- package/dist/mergeRefs-Danc3mp8.js.map +1 -1
- package/dist/next.js.map +1 -1
- package/dist/renderImage-ViVSYcgG.js.map +1 -1
- package/dist/typeGuards-BHbj394R.js.map +1 -1
- package/dist/ui.js +349 -334
- package/dist/ui.js.map +1 -1
- package/dist/useDebounce-5MeprqTX.js.map +1 -1
- package/dist/useFieldsProgress-C918amw-.js.map +1 -1
- package/dist/utils-BAhmwXLC.js.map +1 -1
- package/dist/utils.js.map +1 -1
- package/dist/validation.js.map +1 -1
- package/dist/widget.js +361 -356
- package/dist/widget.js.map +1 -1
- package/package.json +3 -2
package/dist/ui.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { c as Ze, R as et, B as D, u as tt, a as nt, b as ot, d as rt, P as
|
|
2
|
-
import { s as
|
|
1
|
+
import { c as Ze, R as et, B as D, u as tt, a as nt, b as ot, d as rt, P as K, e as Fe, f as it, I as lt, g as Q, h as ut, A as st, i as B, D as at, V as gt, O as dt } from "./index-DM5UjNZl.js";
|
|
2
|
+
import { s as Yn, o as Zn, C as eo, r as to, y as no, t as oo, U as ro, Q as io, z as lo, v as uo, E as so, H as ao, T as go, L as co, M as fo, N as po, n as mo, p as So, q as ho, x as Co, w as wo, S as Ro, W as vo, F as xo, j as _o, l as Fo, k as yo, m as $o, X as Vo, G as Mo, J as Io, K as Po } from "./index-DM5UjNZl.js";
|
|
3
3
|
import { j as S, m as ct } from "./mergeRefs-Danc3mp8.js";
|
|
4
4
|
import * as E from "react";
|
|
5
|
-
import { forwardRef as M, useState as z, useRef as we, useEffect as ft, isValidElement as
|
|
5
|
+
import { forwardRef as M, useState as z, useRef as we, useEffect as ft, isValidElement as q, cloneElement as ye, Children as b } from "react";
|
|
6
6
|
import { c as v, T as Re } from "./typeGuards-BHbj394R.js";
|
|
7
|
-
import { aQ as
|
|
7
|
+
import { aQ as Do, aT as Lo, aP as Ao, aS as Ho, aR as Go } from "./utils-BAhmwXLC.js";
|
|
8
8
|
import { u as $e, a as pt } from "./useDebounce-5MeprqTX.js";
|
|
9
9
|
const mt = Ze(
|
|
10
10
|
"group flex items-center justify-center cursor-pointer rounded-full outline-offset-[3px] outline-transparent outline-2 transition duration-12 active:scale-[0.97] disabled:pointer-events-none",
|
|
@@ -157,9 +157,9 @@ const mt = Ze(
|
|
|
157
157
|
"status/succesCircle"
|
|
158
158
|
]
|
|
159
159
|
};
|
|
160
|
-
var
|
|
160
|
+
var X = "Tabs", [St, kn] = ot(X, [
|
|
161
161
|
Fe
|
|
162
|
-
]), Ve = Fe(), [ht, de] = St(
|
|
162
|
+
]), Ve = Fe(), [ht, de] = St(X), Me = E.forwardRef(
|
|
163
163
|
(e, o) => {
|
|
164
164
|
const {
|
|
165
165
|
__scopeTabs: t,
|
|
@@ -167,14 +167,14 @@ var K = "Tabs", [St, Bn] = ot(K, [
|
|
|
167
167
|
onValueChange: r,
|
|
168
168
|
defaultValue: i,
|
|
169
169
|
orientation: l = "horizontal",
|
|
170
|
-
dir:
|
|
171
|
-
activationMode:
|
|
170
|
+
dir: u,
|
|
171
|
+
activationMode: s = "automatic",
|
|
172
172
|
...g
|
|
173
|
-
} = e, d = tt(
|
|
173
|
+
} = e, d = tt(u), [f, c] = nt({
|
|
174
174
|
prop: n,
|
|
175
175
|
onChange: r,
|
|
176
176
|
defaultProp: i ?? "",
|
|
177
|
-
caller:
|
|
177
|
+
caller: X
|
|
178
178
|
});
|
|
179
179
|
return /* @__PURE__ */ S.jsx(
|
|
180
180
|
ht,
|
|
@@ -185,9 +185,9 @@ var K = "Tabs", [St, Bn] = ot(K, [
|
|
|
185
185
|
onValueChange: c,
|
|
186
186
|
orientation: l,
|
|
187
187
|
dir: d,
|
|
188
|
-
activationMode:
|
|
188
|
+
activationMode: s,
|
|
189
189
|
children: /* @__PURE__ */ S.jsx(
|
|
190
|
-
|
|
190
|
+
K.div,
|
|
191
191
|
{
|
|
192
192
|
dir: d,
|
|
193
193
|
"data-orientation": l,
|
|
@@ -199,7 +199,7 @@ var K = "Tabs", [St, Bn] = ot(K, [
|
|
|
199
199
|
);
|
|
200
200
|
}
|
|
201
201
|
);
|
|
202
|
-
Me.displayName =
|
|
202
|
+
Me.displayName = X;
|
|
203
203
|
var Ie = "TabsList", Pe = E.forwardRef(
|
|
204
204
|
(e, o) => {
|
|
205
205
|
const { __scopeTabs: t, loop: n = !0, ...r } = e, i = de(Ie, t), l = Ve(t);
|
|
@@ -212,7 +212,7 @@ var Ie = "TabsList", Pe = E.forwardRef(
|
|
|
212
212
|
dir: i.dir,
|
|
213
213
|
loop: n,
|
|
214
214
|
children: /* @__PURE__ */ S.jsx(
|
|
215
|
-
|
|
215
|
+
K.div,
|
|
216
216
|
{
|
|
217
217
|
role: "tablist",
|
|
218
218
|
"aria-orientation": i.orientation,
|
|
@@ -227,16 +227,16 @@ var Ie = "TabsList", Pe = E.forwardRef(
|
|
|
227
227
|
Pe.displayName = Ie;
|
|
228
228
|
var Ee = "TabsTrigger", De = E.forwardRef(
|
|
229
229
|
(e, o) => {
|
|
230
|
-
const { __scopeTabs: t, value: n, disabled: r = !1, ...i } = e, l = de(Ee, t),
|
|
230
|
+
const { __scopeTabs: t, value: n, disabled: r = !1, ...i } = e, l = de(Ee, t), u = Ve(t), s = He(l.baseId, n), g = Ge(l.baseId, n), d = n === l.value;
|
|
231
231
|
return /* @__PURE__ */ S.jsx(
|
|
232
232
|
lt,
|
|
233
233
|
{
|
|
234
234
|
asChild: !0,
|
|
235
|
-
...
|
|
235
|
+
...u,
|
|
236
236
|
focusable: !r,
|
|
237
237
|
active: d,
|
|
238
238
|
children: /* @__PURE__ */ S.jsx(
|
|
239
|
-
|
|
239
|
+
K.button,
|
|
240
240
|
{
|
|
241
241
|
type: "button",
|
|
242
242
|
role: "tab",
|
|
@@ -245,16 +245,16 @@ var Ee = "TabsTrigger", De = E.forwardRef(
|
|
|
245
245
|
"data-state": d ? "active" : "inactive",
|
|
246
246
|
"data-disabled": r ? "" : void 0,
|
|
247
247
|
disabled: r,
|
|
248
|
-
id:
|
|
248
|
+
id: s,
|
|
249
249
|
...i,
|
|
250
250
|
ref: o,
|
|
251
|
-
onMouseDown:
|
|
251
|
+
onMouseDown: Q(e.onMouseDown, (f) => {
|
|
252
252
|
!r && f.button === 0 && f.ctrlKey === !1 ? l.onValueChange(n) : f.preventDefault();
|
|
253
253
|
}),
|
|
254
|
-
onKeyDown:
|
|
254
|
+
onKeyDown: Q(e.onKeyDown, (f) => {
|
|
255
255
|
[" ", "Enter"].includes(f.key) && l.onValueChange(n);
|
|
256
256
|
}),
|
|
257
|
-
onFocus:
|
|
257
|
+
onFocus: Q(e.onFocus, () => {
|
|
258
258
|
const f = l.activationMode !== "manual";
|
|
259
259
|
!d && !r && f && l.onValueChange(n);
|
|
260
260
|
})
|
|
@@ -267,17 +267,17 @@ var Ee = "TabsTrigger", De = E.forwardRef(
|
|
|
267
267
|
De.displayName = Ee;
|
|
268
268
|
var Le = "TabsContent", Ae = E.forwardRef(
|
|
269
269
|
(e, o) => {
|
|
270
|
-
const { __scopeTabs: t, value: n, forceMount: r, children: i, ...l } = e,
|
|
270
|
+
const { __scopeTabs: t, value: n, forceMount: r, children: i, ...l } = e, u = de(Le, t), s = He(u.baseId, n), g = Ge(u.baseId, n), d = n === u.value, f = E.useRef(d);
|
|
271
271
|
return E.useEffect(() => {
|
|
272
272
|
const c = requestAnimationFrame(() => f.current = !1);
|
|
273
273
|
return () => cancelAnimationFrame(c);
|
|
274
|
-
}, []), /* @__PURE__ */ S.jsx(
|
|
275
|
-
|
|
274
|
+
}, []), /* @__PURE__ */ S.jsx(ut, { present: r || d, children: ({ present: c }) => /* @__PURE__ */ S.jsx(
|
|
275
|
+
K.div,
|
|
276
276
|
{
|
|
277
277
|
"data-state": d ? "active" : "inactive",
|
|
278
|
-
"data-orientation":
|
|
278
|
+
"data-orientation": u.orientation,
|
|
279
279
|
role: "tabpanel",
|
|
280
|
-
"aria-labelledby":
|
|
280
|
+
"aria-labelledby": s,
|
|
281
281
|
hidden: !c,
|
|
282
282
|
id: g,
|
|
283
283
|
tabIndex: 0,
|
|
@@ -300,7 +300,7 @@ function Ge(e, o) {
|
|
|
300
300
|
return `${e}-content-${o}`;
|
|
301
301
|
}
|
|
302
302
|
var Ct = Me, wt = Pe, Rt = De, ve = Ae;
|
|
303
|
-
const vt = ({ classes: e, contents: o }) => /* @__PURE__ */ S.jsx("div", { className: v("flex flex-col gap-4", e == null ? void 0 : e.contentsWrapper), children: o == null ? void 0 : o.map(({ id: t, body: n, accordion: r }) => r && (r != null && r.title) ? /* @__PURE__ */ S.jsx(ve, { value: t, className: v("py-8", e == null ? void 0 : e.content), children: /* @__PURE__ */ S.jsx(
|
|
303
|
+
const vt = ({ classes: e, contents: o }) => /* @__PURE__ */ S.jsx("div", { className: v("flex flex-col gap-4", e == null ? void 0 : e.contentsWrapper), children: o == null ? void 0 : o.map(({ id: t, body: n, accordion: r }) => r && (r != null && r.title) ? /* @__PURE__ */ S.jsx(ve, { value: t, className: v("py-8", e == null ? void 0 : e.content), children: /* @__PURE__ */ S.jsx(st, { label: r == null ? void 0 : r.title, children: n }) }, t) : /* @__PURE__ */ S.jsx(ve, { value: t, className: v("py-8", e == null ? void 0 : e.content), children: n }, t)) }), Bn = ({ renderContent: e, defaultActiveTabId: o = "1", value: t, onChangeTab: n, classes: r }) => {
|
|
304
304
|
var i;
|
|
305
305
|
return /* @__PURE__ */ S.jsxs(
|
|
306
306
|
Ct,
|
|
@@ -310,7 +310,7 @@ const vt = ({ classes: e, contents: o }) => /* @__PURE__ */ S.jsx("div", { class
|
|
|
310
310
|
defaultValue: o,
|
|
311
311
|
className: v("flex flex-col", r == null ? void 0 : r.root),
|
|
312
312
|
children: [
|
|
313
|
-
/* @__PURE__ */ S.jsx(wt, { className: v("flex items-center gap-4", r == null ? void 0 : r.list), children: (i = e == null ? void 0 : e.triggers) == null ? void 0 : i.map(({ id: l, label:
|
|
313
|
+
/* @__PURE__ */ S.jsx(wt, { className: v("flex items-center gap-4", r == null ? void 0 : r.list), children: (i = e == null ? void 0 : e.triggers) == null ? void 0 : i.map(({ id: l, label: u }) => /* @__PURE__ */ S.jsx(
|
|
314
314
|
Rt,
|
|
315
315
|
{
|
|
316
316
|
value: l,
|
|
@@ -318,7 +318,7 @@ const vt = ({ classes: e, contents: o }) => /* @__PURE__ */ S.jsx("div", { class
|
|
|
318
318
|
'desk-body-regular-l cursor-pointer rounded-sm bg-color-blue-grey-100 px-4 py-2 text-color-secondary outline outline-2 outline-offset-2 outline-transparent transition-colors hover:bg-color-blue-grey-200 hover:text-color-secondary data-[state="active"]:!bg-color-primary-default data-[state="active"]:!text-color-white',
|
|
319
319
|
r == null ? void 0 : r.trigger
|
|
320
320
|
),
|
|
321
|
-
children:
|
|
321
|
+
children: u
|
|
322
322
|
},
|
|
323
323
|
l
|
|
324
324
|
)) }),
|
|
@@ -334,8 +334,8 @@ const Ne = M((e, o) => /* @__PURE__ */ S.jsx("tbody", { ref: o, ...e }));
|
|
|
334
334
|
Ne.displayName = "TableBody";
|
|
335
335
|
const xt = M((e, o) => /* @__PURE__ */ S.jsx("tfoot", { ref: o, ...e }));
|
|
336
336
|
xt.displayName = "TableFooter";
|
|
337
|
-
const
|
|
338
|
-
|
|
337
|
+
const k = M((e, o) => /* @__PURE__ */ S.jsx("tr", { ref: o, ...e }));
|
|
338
|
+
k.displayName = "TableRow";
|
|
339
339
|
const je = M((e, o) => /* @__PURE__ */ S.jsx("th", { ref: o, ...e }));
|
|
340
340
|
je.displayName = "TableHead";
|
|
341
341
|
const re = M((e, o) => /* @__PURE__ */ S.jsx("td", { ref: o, ...e }));
|
|
@@ -350,7 +350,7 @@ const Ft = ({
|
|
|
350
350
|
isSorted: r,
|
|
351
351
|
classes: i
|
|
352
352
|
}) => {
|
|
353
|
-
const { root: l, content:
|
|
353
|
+
const { root: l, content: u, icon: s } = i || {}, { isDesktop: g } = $e(), d = o && g;
|
|
354
354
|
return /* @__PURE__ */ S.jsxs(
|
|
355
355
|
"button",
|
|
356
356
|
{
|
|
@@ -359,9 +359,9 @@ const Ft = ({
|
|
|
359
359
|
onClick: () => t(!r),
|
|
360
360
|
disabled: !d,
|
|
361
361
|
children: [
|
|
362
|
-
/* @__PURE__ */ S.jsx("span", { className: v("",
|
|
362
|
+
/* @__PURE__ */ S.jsx("span", { className: v("", u), children: e }),
|
|
363
363
|
d && /* @__PURE__ */ S.jsx(
|
|
364
|
-
|
|
364
|
+
B,
|
|
365
365
|
{
|
|
366
366
|
name: "arrows/arrowRight",
|
|
367
367
|
className: v(
|
|
@@ -369,7 +369,7 @@ const Ft = ({
|
|
|
369
369
|
{
|
|
370
370
|
"-rotate-90": !n
|
|
371
371
|
},
|
|
372
|
-
|
|
372
|
+
s
|
|
373
373
|
)
|
|
374
374
|
}
|
|
375
375
|
)
|
|
@@ -383,11 +383,11 @@ const Ft = ({
|
|
|
383
383
|
target: n,
|
|
384
384
|
rowIndex: r = -1
|
|
385
385
|
}) => {
|
|
386
|
-
const [i, l] = z(!1), [
|
|
387
|
-
|
|
386
|
+
const [i, l] = z(!1), [u, s] = z(o()), g = we(!1), d = we(null), { original: f } = e, c = (p) => {
|
|
387
|
+
s(p.target.value), g.current = !0;
|
|
388
388
|
}, a = () => {
|
|
389
389
|
if (g.current) {
|
|
390
|
-
const p = { ...f, [n]:
|
|
390
|
+
const p = { ...f, [n]: u };
|
|
391
391
|
t(r, p), g.current = !1;
|
|
392
392
|
}
|
|
393
393
|
l(!1);
|
|
@@ -398,7 +398,7 @@ const Ft = ({
|
|
|
398
398
|
ref: d,
|
|
399
399
|
className: "mr-2 w-full outline-none",
|
|
400
400
|
type: "text",
|
|
401
|
-
value:
|
|
401
|
+
value: u,
|
|
402
402
|
onChange: c,
|
|
403
403
|
onKeyDown: (p) => {
|
|
404
404
|
p.key === "Enter" && (p.preventDefault(), a());
|
|
@@ -440,7 +440,7 @@ function $(e, o) {
|
|
|
440
440
|
}));
|
|
441
441
|
};
|
|
442
442
|
}
|
|
443
|
-
function
|
|
443
|
+
function W(e) {
|
|
444
444
|
return e instanceof Function;
|
|
445
445
|
}
|
|
446
446
|
function $t(e) {
|
|
@@ -461,12 +461,12 @@ function h(e, o, t) {
|
|
|
461
461
|
return (i) => {
|
|
462
462
|
let l;
|
|
463
463
|
t.key && t.debug && (l = Date.now());
|
|
464
|
-
const
|
|
465
|
-
if (!(
|
|
464
|
+
const u = e(i);
|
|
465
|
+
if (!(u.length !== n.length || u.some((d, f) => n[f] !== d)))
|
|
466
466
|
return r;
|
|
467
|
-
n =
|
|
467
|
+
n = u;
|
|
468
468
|
let g;
|
|
469
|
-
if (t.key && t.debug && (g = Date.now()), r = o(...
|
|
469
|
+
if (t.key && t.debug && (g = Date.now()), r = o(...u), t == null || t.onChange == null || t.onChange(r), t.key && t.debug && t != null && t.debug()) {
|
|
470
470
|
const d = Math.round((Date.now() - l) * 100) / 100, f = Math.round((Date.now() - g) * 100) / 100, c = f / 16, a = (p, m) => {
|
|
471
471
|
for (p = String(p); p.length < m; )
|
|
472
472
|
p = " " + p;
|
|
@@ -500,10 +500,10 @@ function Mt(e, o, t, n) {
|
|
|
500
500
|
column: t,
|
|
501
501
|
getValue: () => o.getValue(n),
|
|
502
502
|
renderValue: r,
|
|
503
|
-
getContext: h(() => [e, t, o, i], (l,
|
|
503
|
+
getContext: h(() => [e, t, o, i], (l, u, s, g) => ({
|
|
504
504
|
table: l,
|
|
505
|
-
column:
|
|
506
|
-
row:
|
|
505
|
+
column: u,
|
|
506
|
+
row: s,
|
|
507
507
|
cell: g,
|
|
508
508
|
getValue: g.getValue,
|
|
509
509
|
renderValue: g.renderValue
|
|
@@ -515,26 +515,26 @@ function Mt(e, o, t, n) {
|
|
|
515
515
|
}
|
|
516
516
|
function It(e, o, t, n) {
|
|
517
517
|
var r, i;
|
|
518
|
-
const
|
|
518
|
+
const u = {
|
|
519
519
|
...e._getDefaultColumnDef(),
|
|
520
520
|
...o
|
|
521
|
-
},
|
|
522
|
-
let g = (r = (i =
|
|
523
|
-
if (
|
|
521
|
+
}, s = u.accessorKey;
|
|
522
|
+
let g = (r = (i = u.id) != null ? i : s ? typeof String.prototype.replaceAll == "function" ? s.replaceAll(".", "_") : s.replace(/\./g, "_") : void 0) != null ? r : typeof u.header == "string" ? u.header : void 0, d;
|
|
523
|
+
if (u.accessorFn ? d = u.accessorFn : s && (s.includes(".") ? d = (c) => {
|
|
524
524
|
let a = c;
|
|
525
|
-
for (const m of
|
|
525
|
+
for (const m of s.split(".")) {
|
|
526
526
|
var p;
|
|
527
|
-
a = (p = a) == null ? void 0 : p[m], process.env.NODE_ENV !== "production" && a === void 0 && console.warn(`"${m}" in deeply nested key "${
|
|
527
|
+
a = (p = a) == null ? void 0 : p[m], process.env.NODE_ENV !== "production" && a === void 0 && console.warn(`"${m}" in deeply nested key "${s}" returned undefined.`);
|
|
528
528
|
}
|
|
529
529
|
return a;
|
|
530
|
-
} : d = (c) => c[
|
|
531
|
-
throw process.env.NODE_ENV !== "production" ? new Error(
|
|
530
|
+
} : d = (c) => c[u.accessorKey]), !g)
|
|
531
|
+
throw process.env.NODE_ENV !== "production" ? new Error(u.accessorFn ? "Columns require an id when using an accessorFn" : "Columns require an id when using a non-string header") : new Error();
|
|
532
532
|
let f = {
|
|
533
533
|
id: `${String(g)}`,
|
|
534
534
|
accessorFn: d,
|
|
535
535
|
parent: n,
|
|
536
536
|
depth: t,
|
|
537
|
-
columnDef:
|
|
537
|
+
columnDef: u,
|
|
538
538
|
columns: [],
|
|
539
539
|
getFlatColumns: h(() => [!0], () => {
|
|
540
540
|
var c;
|
|
@@ -568,10 +568,10 @@ function xe(e, o, t) {
|
|
|
568
568
|
rowSpan: 0,
|
|
569
569
|
headerGroup: null,
|
|
570
570
|
getLeafHeaders: () => {
|
|
571
|
-
const l = [],
|
|
572
|
-
|
|
571
|
+
const l = [], u = (s) => {
|
|
572
|
+
s.subHeaders && s.subHeaders.length && s.subHeaders.map(u), l.push(s);
|
|
573
573
|
};
|
|
574
|
-
return
|
|
574
|
+
return u(i), l;
|
|
575
575
|
},
|
|
576
576
|
getContext: () => ({
|
|
577
577
|
table: e,
|
|
@@ -587,15 +587,15 @@ const Pt = {
|
|
|
587
587
|
createTable: (e) => {
|
|
588
588
|
e.getHeaderGroups = h(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n, r) => {
|
|
589
589
|
var i, l;
|
|
590
|
-
const
|
|
591
|
-
return j(o, [...
|
|
590
|
+
const u = (i = n == null ? void 0 : n.map((f) => t.find((c) => c.id === f)).filter(Boolean)) != null ? i : [], s = (l = r == null ? void 0 : r.map((f) => t.find((c) => c.id === f)).filter(Boolean)) != null ? l : [], g = t.filter((f) => !(n != null && n.includes(f.id)) && !(r != null && r.includes(f.id)));
|
|
591
|
+
return j(o, [...u, ...g, ...s], e);
|
|
592
592
|
}, C(e.options, F, "getHeaderGroups")), e.getCenterHeaderGroups = h(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n, r) => (t = t.filter((i) => !(n != null && n.includes(i.id)) && !(r != null && r.includes(i.id))), j(o, t, e, "center")), C(e.options, F, "getCenterHeaderGroups")), e.getLeftHeaderGroups = h(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left], (o, t, n) => {
|
|
593
593
|
var r;
|
|
594
|
-
const i = (r = n == null ? void 0 : n.map((l) => t.find((
|
|
594
|
+
const i = (r = n == null ? void 0 : n.map((l) => t.find((u) => u.id === l)).filter(Boolean)) != null ? r : [];
|
|
595
595
|
return j(o, i, e, "left");
|
|
596
596
|
}, C(e.options, F, "getLeftHeaderGroups")), e.getRightHeaderGroups = h(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.right], (o, t, n) => {
|
|
597
597
|
var r;
|
|
598
|
-
const i = (r = n == null ? void 0 : n.map((l) => t.find((
|
|
598
|
+
const i = (r = n == null ? void 0 : n.map((l) => t.find((u) => u.id === l)).filter(Boolean)) != null ? r : [];
|
|
599
599
|
return j(o, i, e, "right");
|
|
600
600
|
}, C(e.options, F, "getRightHeaderGroups")), e.getFooterGroups = h(() => [e.getHeaderGroups()], (o) => [...o].reverse(), C(e.options, F, "getFooterGroups")), e.getLeftFooterGroups = h(() => [e.getLeftHeaderGroups()], (o) => [...o].reverse(), C(e.options, F, "getLeftFooterGroups")), e.getCenterFooterGroups = h(() => [e.getCenterHeaderGroups()], (o) => [...o].reverse(), C(e.options, F, "getCenterFooterGroups")), e.getRightFooterGroups = h(() => [e.getRightHeaderGroups()], (o) => [...o].reverse(), C(e.options, F, "getRightFooterGroups")), e.getFlatHeaders = h(() => [e.getHeaderGroups()], (o) => o.map((t) => t.headers).flat(), C(e.options, F, "getFlatHeaders")), e.getLeftFlatHeaders = h(() => [e.getLeftHeaderGroups()], (o) => o.map((t) => t.headers).flat(), C(e.options, F, "getLeftFlatHeaders")), e.getCenterFlatHeaders = h(() => [e.getCenterHeaderGroups()], (o) => o.map((t) => t.headers).flat(), C(e.options, F, "getCenterFlatHeaders")), e.getRightFlatHeaders = h(() => [e.getRightHeaderGroups()], (o) => o.map((t) => t.headers).flat(), C(e.options, F, "getRightFlatHeaders")), e.getCenterLeafHeaders = h(() => [e.getCenterFlatHeaders()], (o) => o.filter((t) => {
|
|
601
601
|
var n;
|
|
@@ -607,22 +607,22 @@ const Pt = {
|
|
|
607
607
|
var n;
|
|
608
608
|
return !((n = t.subHeaders) != null && n.length);
|
|
609
609
|
}), C(e.options, F, "getRightLeafHeaders")), e.getLeafHeaders = h(() => [e.getLeftHeaderGroups(), e.getCenterHeaderGroups(), e.getRightHeaderGroups()], (o, t, n) => {
|
|
610
|
-
var r, i, l,
|
|
611
|
-
return [...(r = (i = o[0]) == null ? void 0 : i.headers) != null ? r : [], ...(l = (
|
|
610
|
+
var r, i, l, u, s, g;
|
|
611
|
+
return [...(r = (i = o[0]) == null ? void 0 : i.headers) != null ? r : [], ...(l = (u = t[0]) == null ? void 0 : u.headers) != null ? l : [], ...(s = (g = n[0]) == null ? void 0 : g.headers) != null ? s : []].map((d) => d.getLeafHeaders()).flat();
|
|
612
612
|
}, C(e.options, F, "getLeafHeaders"));
|
|
613
613
|
}
|
|
614
614
|
};
|
|
615
615
|
function j(e, o, t, n) {
|
|
616
616
|
var r, i;
|
|
617
617
|
let l = 0;
|
|
618
|
-
const
|
|
618
|
+
const u = function(c, a) {
|
|
619
619
|
a === void 0 && (a = 1), l = Math.max(l, a), c.filter((p) => p.getIsVisible()).forEach((p) => {
|
|
620
620
|
var m;
|
|
621
|
-
(m = p.columns) != null && m.length &&
|
|
621
|
+
(m = p.columns) != null && m.length && u(p.columns, a + 1);
|
|
622
622
|
}, 0);
|
|
623
623
|
};
|
|
624
|
-
|
|
625
|
-
let
|
|
624
|
+
u(e);
|
|
625
|
+
let s = [];
|
|
626
626
|
const g = (c, a) => {
|
|
627
627
|
const p = {
|
|
628
628
|
depth: a,
|
|
@@ -645,12 +645,12 @@ function j(e, o, t, n) {
|
|
|
645
645
|
y.subHeaders.push(w), m.push(y);
|
|
646
646
|
}
|
|
647
647
|
p.headers.push(w), w.headerGroup = p;
|
|
648
|
-
}),
|
|
648
|
+
}), s.push(p), a > 0 && g(m, a - 1);
|
|
649
649
|
}, d = o.map((c, a) => xe(t, c, {
|
|
650
650
|
depth: l,
|
|
651
651
|
index: a
|
|
652
652
|
}));
|
|
653
|
-
g(d, l - 1),
|
|
653
|
+
g(d, l - 1), s.reverse();
|
|
654
654
|
const f = (c) => c.filter((p) => p.column.getIsVisible()).map((p) => {
|
|
655
655
|
let m = 0, w = 0, R = [0];
|
|
656
656
|
p.subHeaders && p.subHeaders.length ? (R = [], f(p.subHeaders).forEach((_) => {
|
|
@@ -666,10 +666,10 @@ function j(e, o, t, n) {
|
|
|
666
666
|
rowSpan: w
|
|
667
667
|
};
|
|
668
668
|
});
|
|
669
|
-
return f((r = (i =
|
|
669
|
+
return f((r = (i = s[0]) == null ? void 0 : i.headers) != null ? r : []), s;
|
|
670
670
|
}
|
|
671
671
|
const ce = (e, o, t, n, r, i, l) => {
|
|
672
|
-
let
|
|
672
|
+
let u = {
|
|
673
673
|
id: o,
|
|
674
674
|
index: n,
|
|
675
675
|
original: t,
|
|
@@ -677,44 +677,44 @@ const ce = (e, o, t, n, r, i, l) => {
|
|
|
677
677
|
parentId: l,
|
|
678
678
|
_valuesCache: {},
|
|
679
679
|
_uniqueValuesCache: {},
|
|
680
|
-
getValue: (
|
|
681
|
-
if (
|
|
682
|
-
return
|
|
683
|
-
const g = e.getColumn(
|
|
680
|
+
getValue: (s) => {
|
|
681
|
+
if (u._valuesCache.hasOwnProperty(s))
|
|
682
|
+
return u._valuesCache[s];
|
|
683
|
+
const g = e.getColumn(s);
|
|
684
684
|
if (g != null && g.accessorFn)
|
|
685
|
-
return
|
|
685
|
+
return u._valuesCache[s] = g.accessorFn(u.original, n), u._valuesCache[s];
|
|
686
686
|
},
|
|
687
|
-
getUniqueValues: (
|
|
688
|
-
if (
|
|
689
|
-
return
|
|
690
|
-
const g = e.getColumn(
|
|
687
|
+
getUniqueValues: (s) => {
|
|
688
|
+
if (u._uniqueValuesCache.hasOwnProperty(s))
|
|
689
|
+
return u._uniqueValuesCache[s];
|
|
690
|
+
const g = e.getColumn(s);
|
|
691
691
|
if (g != null && g.accessorFn)
|
|
692
|
-
return g.columnDef.getUniqueValues ? (
|
|
692
|
+
return g.columnDef.getUniqueValues ? (u._uniqueValuesCache[s] = g.columnDef.getUniqueValues(u.original, n), u._uniqueValuesCache[s]) : (u._uniqueValuesCache[s] = [u.getValue(s)], u._uniqueValuesCache[s]);
|
|
693
693
|
},
|
|
694
|
-
renderValue: (
|
|
694
|
+
renderValue: (s) => {
|
|
695
695
|
var g;
|
|
696
|
-
return (g =
|
|
696
|
+
return (g = u.getValue(s)) != null ? g : e.options.renderFallbackValue;
|
|
697
697
|
},
|
|
698
698
|
subRows: [],
|
|
699
|
-
getLeafRows: () => Vt(
|
|
700
|
-
getParentRow: () =>
|
|
699
|
+
getLeafRows: () => Vt(u.subRows, (s) => s.subRows),
|
|
700
|
+
getParentRow: () => u.parentId ? e.getRow(u.parentId, !0) : void 0,
|
|
701
701
|
getParentRows: () => {
|
|
702
|
-
let
|
|
702
|
+
let s = [], g = u;
|
|
703
703
|
for (; ; ) {
|
|
704
704
|
const d = g.getParentRow();
|
|
705
705
|
if (!d) break;
|
|
706
|
-
|
|
706
|
+
s.push(d), g = d;
|
|
707
707
|
}
|
|
708
|
-
return
|
|
708
|
+
return s.reverse();
|
|
709
709
|
},
|
|
710
|
-
getAllCells: h(() => [e.getAllLeafColumns()], (
|
|
711
|
-
_getAllCellsByColumnId: h(() => [
|
|
710
|
+
getAllCells: h(() => [e.getAllLeafColumns()], (s) => s.map((g) => Mt(e, u, g, g.id)), C(e.options, "debugRows", "getAllCells")),
|
|
711
|
+
_getAllCellsByColumnId: h(() => [u.getAllCells()], (s) => s.reduce((g, d) => (g[d.column.id] = d, g), {}), C(e.options, "debugRows", "getAllCellsByColumnId"))
|
|
712
712
|
};
|
|
713
|
-
for (let
|
|
714
|
-
const g = e._features[
|
|
715
|
-
g == null || g.createRow == null || g.createRow(
|
|
713
|
+
for (let s = 0; s < e._features.length; s++) {
|
|
714
|
+
const g = e._features[s];
|
|
715
|
+
g == null || g.createRow == null || g.createRow(u, e);
|
|
716
716
|
}
|
|
717
|
-
return
|
|
717
|
+
return u;
|
|
718
718
|
}, Et = {
|
|
719
719
|
createColumn: (e, o) => {
|
|
720
720
|
e._getFacetedRowModel = o.options.getFacetedRowModel && o.options.getFacetedRowModel(o, e.id), e.getFacetedRowModel = () => e._getFacetedRowModel ? e._getFacetedRowModel() : o.getPreFilteredRowModel(), e._getFacetedUniqueValues = o.options.getFacetedUniqueValues && o.options.getFacetedUniqueValues(o, e.id), e.getFacetedUniqueValues = () => e._getFacetedUniqueValues ? e._getFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getFacetedMinMaxValues = o.options.getFacetedMinMaxValues && o.options.getFacetedMinMaxValues(o, e.id), e.getFacetedMinMaxValues = () => {
|
|
@@ -733,16 +733,16 @@ const Oe = (e, o, t) => {
|
|
|
733
733
|
return !!(!((n = e.getValue(o)) == null || (n = n.toString()) == null) && n.includes(t));
|
|
734
734
|
};
|
|
735
735
|
Oe.autoRemove = (e) => V(e);
|
|
736
|
-
const
|
|
736
|
+
const ke = (e, o, t) => {
|
|
737
737
|
var n;
|
|
738
738
|
return ((n = e.getValue(o)) == null || (n = n.toString()) == null ? void 0 : n.toLowerCase()) === (t == null ? void 0 : t.toLowerCase());
|
|
739
739
|
};
|
|
740
|
-
|
|
741
|
-
const
|
|
740
|
+
ke.autoRemove = (e) => V(e);
|
|
741
|
+
const Be = (e, o, t) => {
|
|
742
742
|
var n;
|
|
743
743
|
return (n = e.getValue(o)) == null ? void 0 : n.includes(t);
|
|
744
744
|
};
|
|
745
|
-
|
|
745
|
+
Be.autoRemove = (e) => V(e);
|
|
746
746
|
const qe = (e, o, t) => !t.some((n) => {
|
|
747
747
|
var r;
|
|
748
748
|
return !((r = e.getValue(o)) != null && r.includes(n));
|
|
@@ -765,8 +765,8 @@ const fe = (e, o, t) => {
|
|
|
765
765
|
fe.resolveFilterValue = (e) => {
|
|
766
766
|
let [o, t] = e, n = typeof o != "number" ? parseFloat(o) : o, r = typeof t != "number" ? parseFloat(t) : t, i = o === null || Number.isNaN(n) ? -1 / 0 : n, l = t === null || Number.isNaN(r) ? 1 / 0 : r;
|
|
767
767
|
if (i > l) {
|
|
768
|
-
const
|
|
769
|
-
i = l, l =
|
|
768
|
+
const u = i;
|
|
769
|
+
i = l, l = u;
|
|
770
770
|
}
|
|
771
771
|
return [i, l];
|
|
772
772
|
};
|
|
@@ -774,8 +774,8 @@ fe.autoRemove = (e) => V(e) || V(e[0]) && V(e[1]);
|
|
|
774
774
|
const P = {
|
|
775
775
|
includesString: Te,
|
|
776
776
|
includesStringSensitive: Oe,
|
|
777
|
-
equalsString:
|
|
778
|
-
arrIncludes:
|
|
777
|
+
equalsString: ke,
|
|
778
|
+
arrIncludes: Be,
|
|
779
779
|
arrIncludesAll: qe,
|
|
780
780
|
arrIncludesSome: Ue,
|
|
781
781
|
equals: Ke,
|
|
@@ -804,7 +804,7 @@ const Dt = {
|
|
|
804
804
|
return typeof n == "string" ? P.includesString : typeof n == "number" ? P.inNumberRange : typeof n == "boolean" || n !== null && typeof n == "object" ? P.equals : Array.isArray(n) ? P.arrIncludes : P.weakEquals;
|
|
805
805
|
}, e.getFilterFn = () => {
|
|
806
806
|
var t, n;
|
|
807
|
-
return
|
|
807
|
+
return W(e.columnDef.filterFn) ? e.columnDef.filterFn : e.columnDef.filterFn === "auto" ? e.getAutoFilterFn() : (
|
|
808
808
|
// @ts-ignore
|
|
809
809
|
(t = (n = o.options.filterFns) == null ? void 0 : n[e.columnDef.filterFn]) != null ? t : P[e.columnDef.filterFn]
|
|
810
810
|
);
|
|
@@ -821,18 +821,18 @@ const Dt = {
|
|
|
821
821
|
o.setColumnFilters((n) => {
|
|
822
822
|
const r = e.getFilterFn(), i = n == null ? void 0 : n.find((d) => d.id === e.id), l = L(t, i ? i.value : void 0);
|
|
823
823
|
if (_e(r, l, e)) {
|
|
824
|
-
var
|
|
825
|
-
return (
|
|
824
|
+
var u;
|
|
825
|
+
return (u = n == null ? void 0 : n.filter((d) => d.id !== e.id)) != null ? u : [];
|
|
826
826
|
}
|
|
827
|
-
const
|
|
827
|
+
const s = {
|
|
828
828
|
id: e.id,
|
|
829
829
|
value: l
|
|
830
830
|
};
|
|
831
831
|
if (i) {
|
|
832
832
|
var g;
|
|
833
|
-
return (g = n == null ? void 0 : n.map((d) => d.id === e.id ?
|
|
833
|
+
return (g = n == null ? void 0 : n.map((d) => d.id === e.id ? s : d)) != null ? g : [];
|
|
834
834
|
}
|
|
835
|
-
return n != null && n.length ? [...n,
|
|
835
|
+
return n != null && n.length ? [...n, s] : [s];
|
|
836
836
|
});
|
|
837
837
|
};
|
|
838
838
|
},
|
|
@@ -844,10 +844,10 @@ const Dt = {
|
|
|
844
844
|
const t = e.getAllLeafColumns(), n = (r) => {
|
|
845
845
|
var i;
|
|
846
846
|
return (i = L(o, r)) == null ? void 0 : i.filter((l) => {
|
|
847
|
-
const
|
|
848
|
-
if (
|
|
849
|
-
const
|
|
850
|
-
if (_e(
|
|
847
|
+
const u = t.find((s) => s.id === l.id);
|
|
848
|
+
if (u) {
|
|
849
|
+
const s = u.getFilterFn();
|
|
850
|
+
if (_e(s, l.value, u))
|
|
851
851
|
return !1;
|
|
852
852
|
}
|
|
853
853
|
return !0;
|
|
@@ -900,7 +900,7 @@ const Lt = (e, o, t) => t.reduce((n, r) => {
|
|
|
900
900
|
return t[0];
|
|
901
901
|
const n = Math.floor(t.length / 2), r = t.sort((i, l) => i - l);
|
|
902
902
|
return t.length % 2 !== 0 ? r[n] : (r[n - 1] + r[n]) / 2;
|
|
903
|
-
}, Nt = (e, o) => Array.from(new Set(o.map((t) => t.getValue(e))).values()), jt = (e, o) => new Set(o.map((t) => t.getValue(e))).size, Tt = (e, o) => o.length,
|
|
903
|
+
}, Nt = (e, o) => Array.from(new Set(o.map((t) => t.getValue(e))).values()), jt = (e, o) => new Set(o.map((t) => t.getValue(e))).size, Tt = (e, o) => o.length, J = {
|
|
904
904
|
sum: Lt,
|
|
905
905
|
min: At,
|
|
906
906
|
max: Ht,
|
|
@@ -946,14 +946,14 @@ const Lt = (e, o, t) => t.reduce((n, r) => {
|
|
|
946
946
|
}, e.getAutoAggregationFn = () => {
|
|
947
947
|
const t = o.getCoreRowModel().flatRows[0], n = t == null ? void 0 : t.getValue(e.id);
|
|
948
948
|
if (typeof n == "number")
|
|
949
|
-
return
|
|
949
|
+
return J.sum;
|
|
950
950
|
if (Object.prototype.toString.call(n) === "[object Date]")
|
|
951
|
-
return
|
|
951
|
+
return J.extent;
|
|
952
952
|
}, e.getAggregationFn = () => {
|
|
953
953
|
var t, n;
|
|
954
954
|
if (!e)
|
|
955
955
|
throw new Error();
|
|
956
|
-
return
|
|
956
|
+
return W(e.columnDef.aggregationFn) ? e.columnDef.aggregationFn : e.columnDef.aggregationFn === "auto" ? e.getAutoAggregationFn() : (t = (n = o.options.aggregationFns) == null ? void 0 : n[e.columnDef.aggregationFn]) != null ? t : J[e.columnDef.aggregationFn];
|
|
957
957
|
};
|
|
958
958
|
},
|
|
959
959
|
createTable: (e) => {
|
|
@@ -977,13 +977,13 @@ const Lt = (e, o, t) => t.reduce((n, r) => {
|
|
|
977
977
|
};
|
|
978
978
|
}
|
|
979
979
|
};
|
|
980
|
-
function
|
|
980
|
+
function kt(e, o, t) {
|
|
981
981
|
if (!(o != null && o.length) || !t)
|
|
982
982
|
return e;
|
|
983
983
|
const n = e.filter((i) => !o.includes(i.id));
|
|
984
984
|
return t === "remove" ? n : [...o.map((i) => e.find((l) => l.id === i)).filter(Boolean), ...n];
|
|
985
985
|
}
|
|
986
|
-
const
|
|
986
|
+
const Bt = {
|
|
987
987
|
getInitialState: (e) => ({
|
|
988
988
|
columnOrder: [],
|
|
989
989
|
...e
|
|
@@ -1010,22 +1010,22 @@ const kt = {
|
|
|
1010
1010
|
if (!(o != null && o.length))
|
|
1011
1011
|
i = r;
|
|
1012
1012
|
else {
|
|
1013
|
-
const l = [...o],
|
|
1014
|
-
for (;
|
|
1015
|
-
const
|
|
1016
|
-
g > -1 && i.push(
|
|
1013
|
+
const l = [...o], u = [...r];
|
|
1014
|
+
for (; u.length && l.length; ) {
|
|
1015
|
+
const s = l.shift(), g = u.findIndex((d) => d.id === s);
|
|
1016
|
+
g > -1 && i.push(u.splice(g, 1)[0]);
|
|
1017
1017
|
}
|
|
1018
|
-
i = [...i, ...
|
|
1018
|
+
i = [...i, ...u];
|
|
1019
1019
|
}
|
|
1020
|
-
return
|
|
1020
|
+
return kt(i, t, n);
|
|
1021
1021
|
}, C(e.options, "debugTable", "_getOrderColumnsFn"));
|
|
1022
1022
|
}
|
|
1023
|
-
},
|
|
1023
|
+
}, Y = () => ({
|
|
1024
1024
|
left: [],
|
|
1025
1025
|
right: []
|
|
1026
1026
|
}), qt = {
|
|
1027
1027
|
getInitialState: (e) => ({
|
|
1028
|
-
columnPinning:
|
|
1028
|
+
columnPinning: Y(),
|
|
1029
1029
|
...e
|
|
1030
1030
|
}),
|
|
1031
1031
|
getDefaultOptions: (e) => ({
|
|
@@ -1037,10 +1037,10 @@ const kt = {
|
|
|
1037
1037
|
o.setColumnPinning((r) => {
|
|
1038
1038
|
var i, l;
|
|
1039
1039
|
if (t === "right") {
|
|
1040
|
-
var
|
|
1040
|
+
var u, s;
|
|
1041
1041
|
return {
|
|
1042
|
-
left: ((
|
|
1043
|
-
right: [...((
|
|
1042
|
+
left: ((u = r == null ? void 0 : r.left) != null ? u : []).filter((f) => !(n != null && n.includes(f))),
|
|
1043
|
+
right: [...((s = r == null ? void 0 : r.right) != null ? s : []).filter((f) => !(n != null && n.includes(f))), ...n]
|
|
1044
1044
|
};
|
|
1045
1045
|
}
|
|
1046
1046
|
if (t === "left") {
|
|
@@ -1059,10 +1059,10 @@ const kt = {
|
|
|
1059
1059
|
var r, i, l;
|
|
1060
1060
|
return ((r = n.columnDef.enablePinning) != null ? r : !0) && ((i = (l = o.options.enableColumnPinning) != null ? l : o.options.enablePinning) != null ? i : !0);
|
|
1061
1061
|
}), e.getIsPinned = () => {
|
|
1062
|
-
const t = e.getLeafColumns().map((
|
|
1062
|
+
const t = e.getLeafColumns().map((u) => u.id), {
|
|
1063
1063
|
left: n,
|
|
1064
1064
|
right: r
|
|
1065
|
-
} = o.getState().columnPinning, i = t.some((
|
|
1065
|
+
} = o.getState().columnPinning, i = t.some((u) => n == null ? void 0 : n.includes(u)), l = t.some((u) => r == null ? void 0 : r.includes(u));
|
|
1066
1066
|
return i ? "left" : l ? "right" : !1;
|
|
1067
1067
|
}, e.getPinnedIndex = () => {
|
|
1068
1068
|
var t, n;
|
|
@@ -1085,7 +1085,7 @@ const kt = {
|
|
|
1085
1085
|
createTable: (e) => {
|
|
1086
1086
|
e.setColumnPinning = (o) => e.options.onColumnPinningChange == null ? void 0 : e.options.onColumnPinningChange(o), e.resetColumnPinning = (o) => {
|
|
1087
1087
|
var t, n;
|
|
1088
|
-
return e.setColumnPinning(o ?
|
|
1088
|
+
return e.setColumnPinning(o ? Y() : (t = (n = e.initialState) == null ? void 0 : n.columnPinning) != null ? t : Y());
|
|
1089
1089
|
}, e.getIsSomeColumnsPinned = (o) => {
|
|
1090
1090
|
var t;
|
|
1091
1091
|
const n = e.getState().columnPinning;
|
|
@@ -1107,7 +1107,7 @@ const T = {
|
|
|
1107
1107
|
size: 150,
|
|
1108
1108
|
minSize: 20,
|
|
1109
1109
|
maxSize: Number.MAX_SAFE_INTEGER
|
|
1110
|
-
},
|
|
1110
|
+
}, Z = () => ({
|
|
1111
1111
|
startOffset: null,
|
|
1112
1112
|
startSize: null,
|
|
1113
1113
|
deltaOffset: null,
|
|
@@ -1118,7 +1118,7 @@ const T = {
|
|
|
1118
1118
|
getDefaultColumnDef: () => T,
|
|
1119
1119
|
getInitialState: (e) => ({
|
|
1120
1120
|
columnSizing: {},
|
|
1121
|
-
columnSizingInfo:
|
|
1121
|
+
columnSizingInfo: Z(),
|
|
1122
1122
|
...e
|
|
1123
1123
|
}),
|
|
1124
1124
|
getDefaultOptions: (e) => ({
|
|
@@ -1166,9 +1166,9 @@ const T = {
|
|
|
1166
1166
|
}, e.getResizeHandler = (t) => {
|
|
1167
1167
|
const n = o.getColumn(e.column.id), r = n == null ? void 0 : n.getCanResize();
|
|
1168
1168
|
return (i) => {
|
|
1169
|
-
if (!n || !r || (i.persist == null || i.persist(),
|
|
1169
|
+
if (!n || !r || (i.persist == null || i.persist(), ee(i) && i.touches && i.touches.length > 1))
|
|
1170
1170
|
return;
|
|
1171
|
-
const l = e.getSize(),
|
|
1171
|
+
const l = e.getSize(), u = e ? e.getLeafHeaders().map((R) => [R.column.id, R.column.getSize()]) : [[n.id, n.getSize()]], s = ee(i) ? Math.round(i.touches[0].clientX) : i.clientX, g = {}, d = (R, x) => {
|
|
1172
1172
|
typeof x == "number" && (o.setColumnSizingInfo((_) => {
|
|
1173
1173
|
var I, y;
|
|
1174
1174
|
const H = o.options.columnResizeDirection === "rtl" ? -1 : 1, Se = (x - ((I = _ == null ? void 0 : _.startOffset) != null ? I : 0)) * H, he = Math.max(Se / ((y = _ == null ? void 0 : _.startSize) != null ? y : 0), -0.999999);
|
|
@@ -1208,13 +1208,13 @@ const T = {
|
|
|
1208
1208
|
}, w = Xt() ? {
|
|
1209
1209
|
passive: !1
|
|
1210
1210
|
} : !1;
|
|
1211
|
-
|
|
1211
|
+
ee(i) ? (a == null || a.addEventListener("touchmove", m.moveHandler, w), a == null || a.addEventListener("touchend", m.upHandler, w)) : (a == null || a.addEventListener("mousemove", p.moveHandler, w), a == null || a.addEventListener("mouseup", p.upHandler, w)), o.setColumnSizingInfo((R) => ({
|
|
1212
1212
|
...R,
|
|
1213
|
-
startOffset:
|
|
1213
|
+
startOffset: s,
|
|
1214
1214
|
startSize: l,
|
|
1215
1215
|
deltaOffset: 0,
|
|
1216
1216
|
deltaPercentage: 0,
|
|
1217
|
-
columnSizingStart:
|
|
1217
|
+
columnSizingStart: u,
|
|
1218
1218
|
isResizingColumn: n.id
|
|
1219
1219
|
}));
|
|
1220
1220
|
};
|
|
@@ -1226,7 +1226,7 @@ const T = {
|
|
|
1226
1226
|
e.setColumnSizing(o ? {} : (t = e.initialState.columnSizing) != null ? t : {});
|
|
1227
1227
|
}, e.resetHeaderSizeInfo = (o) => {
|
|
1228
1228
|
var t;
|
|
1229
|
-
e.setColumnSizingInfo(o ?
|
|
1229
|
+
e.setColumnSizingInfo(o ? Z() : (t = e.initialState.columnSizingInfo) != null ? t : Z());
|
|
1230
1230
|
}, e.getTotalSize = () => {
|
|
1231
1231
|
var o, t;
|
|
1232
1232
|
return (o = (t = e.getHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n, r) => n + r.getSize(), 0)) != null ? o : 0;
|
|
@@ -1259,7 +1259,7 @@ function Xt() {
|
|
|
1259
1259
|
}
|
|
1260
1260
|
return O = e, O;
|
|
1261
1261
|
}
|
|
1262
|
-
function
|
|
1262
|
+
function ee(e) {
|
|
1263
1263
|
return e.type === "touchstart";
|
|
1264
1264
|
}
|
|
1265
1265
|
const Wt = {
|
|
@@ -1343,7 +1343,7 @@ const Qt = {
|
|
|
1343
1343
|
const {
|
|
1344
1344
|
globalFilterFn: n
|
|
1345
1345
|
} = e.options;
|
|
1346
|
-
return
|
|
1346
|
+
return W(n) ? n : n === "auto" ? e.getGlobalAutoFilterFn() : (o = (t = e.options.filterFns) == null ? void 0 : t[n]) != null ? o : P[n];
|
|
1347
1347
|
}, e.setGlobalFilter = (o) => {
|
|
1348
1348
|
e.options.onGlobalFilterChange == null || e.options.onGlobalFilterChange(o);
|
|
1349
1349
|
}, e.resetGlobalFilter = (o) => {
|
|
@@ -1402,8 +1402,8 @@ const Qt = {
|
|
|
1402
1402
|
var r;
|
|
1403
1403
|
const i = n === !0 ? !0 : !!(n != null && n[e.id]);
|
|
1404
1404
|
let l = {};
|
|
1405
|
-
if (n === !0 ? Object.keys(o.getRowModel().rowsById).forEach((
|
|
1406
|
-
l[
|
|
1405
|
+
if (n === !0 ? Object.keys(o.getRowModel().rowsById).forEach((u) => {
|
|
1406
|
+
l[u] = !0;
|
|
1407
1407
|
}) : l = n, t = (r = t) != null ? r : !i, !i && t)
|
|
1408
1408
|
return {
|
|
1409
1409
|
...l,
|
|
@@ -1411,10 +1411,10 @@ const Qt = {
|
|
|
1411
1411
|
};
|
|
1412
1412
|
if (i && !t) {
|
|
1413
1413
|
const {
|
|
1414
|
-
[e.id]:
|
|
1415
|
-
...
|
|
1414
|
+
[e.id]: u,
|
|
1415
|
+
...s
|
|
1416
1416
|
} = l;
|
|
1417
|
-
return
|
|
1417
|
+
return s;
|
|
1418
1418
|
}
|
|
1419
1419
|
return n;
|
|
1420
1420
|
});
|
|
@@ -1437,14 +1437,14 @@ const Qt = {
|
|
|
1437
1437
|
};
|
|
1438
1438
|
};
|
|
1439
1439
|
}
|
|
1440
|
-
}, ie = 0, le = 10,
|
|
1440
|
+
}, ie = 0, le = 10, te = () => ({
|
|
1441
1441
|
pageIndex: ie,
|
|
1442
1442
|
pageSize: le
|
|
1443
1443
|
}), Zt = {
|
|
1444
1444
|
getInitialState: (e) => ({
|
|
1445
1445
|
...e,
|
|
1446
1446
|
pagination: {
|
|
1447
|
-
...
|
|
1447
|
+
...te(),
|
|
1448
1448
|
...e == null ? void 0 : e.pagination
|
|
1449
1449
|
}
|
|
1450
1450
|
}),
|
|
@@ -1472,7 +1472,7 @@ const Qt = {
|
|
|
1472
1472
|
return e.options.onPaginationChange == null ? void 0 : e.options.onPaginationChange(r);
|
|
1473
1473
|
}, e.resetPagination = (n) => {
|
|
1474
1474
|
var r;
|
|
1475
|
-
e.setPagination(n ?
|
|
1475
|
+
e.setPagination(n ? te() : (r = e.initialState.pagination) != null ? r : te());
|
|
1476
1476
|
}, e.setPageIndex = (n) => {
|
|
1477
1477
|
e.setPagination((r) => {
|
|
1478
1478
|
let i = L(n, r.pageIndex);
|
|
@@ -1490,10 +1490,10 @@ const Qt = {
|
|
|
1490
1490
|
e.setPageSize(n ? le : (r = (i = e.initialState) == null || (i = i.pagination) == null ? void 0 : i.pageSize) != null ? r : le);
|
|
1491
1491
|
}, e.setPageSize = (n) => {
|
|
1492
1492
|
e.setPagination((r) => {
|
|
1493
|
-
const i = Math.max(1, L(n, r.pageSize)), l = r.pageSize * r.pageIndex,
|
|
1493
|
+
const i = Math.max(1, L(n, r.pageSize)), l = r.pageSize * r.pageIndex, u = Math.floor(l / i);
|
|
1494
1494
|
return {
|
|
1495
1495
|
...r,
|
|
1496
|
-
pageIndex:
|
|
1496
|
+
pageIndex: u,
|
|
1497
1497
|
pageSize: i
|
|
1498
1498
|
};
|
|
1499
1499
|
});
|
|
@@ -1520,12 +1520,12 @@ const Qt = {
|
|
|
1520
1520
|
return (n = e.options.rowCount) != null ? n : e.getPrePaginationRowModel().rows.length;
|
|
1521
1521
|
};
|
|
1522
1522
|
}
|
|
1523
|
-
},
|
|
1523
|
+
}, ne = () => ({
|
|
1524
1524
|
top: [],
|
|
1525
1525
|
bottom: []
|
|
1526
1526
|
}), en = {
|
|
1527
1527
|
getInitialState: (e) => ({
|
|
1528
|
-
rowPinning:
|
|
1528
|
+
rowPinning: ne(),
|
|
1529
1529
|
...e
|
|
1530
1530
|
}),
|
|
1531
1531
|
getDefaultOptions: (e) => ({
|
|
@@ -1533,36 +1533,36 @@ const Qt = {
|
|
|
1533
1533
|
}),
|
|
1534
1534
|
createRow: (e, o) => {
|
|
1535
1535
|
e.pin = (t, n, r) => {
|
|
1536
|
-
const i = n ? e.getLeafRows().map((
|
|
1536
|
+
const i = n ? e.getLeafRows().map((s) => {
|
|
1537
1537
|
let {
|
|
1538
1538
|
id: g
|
|
1539
|
-
} =
|
|
1539
|
+
} = s;
|
|
1540
1540
|
return g;
|
|
1541
|
-
}) : [], l = r ? e.getParentRows().map((
|
|
1541
|
+
}) : [], l = r ? e.getParentRows().map((s) => {
|
|
1542
1542
|
let {
|
|
1543
1543
|
id: g
|
|
1544
|
-
} =
|
|
1544
|
+
} = s;
|
|
1545
1545
|
return g;
|
|
1546
|
-
}) : [],
|
|
1547
|
-
o.setRowPinning((
|
|
1546
|
+
}) : [], u = /* @__PURE__ */ new Set([...l, e.id, ...i]);
|
|
1547
|
+
o.setRowPinning((s) => {
|
|
1548
1548
|
var g, d;
|
|
1549
1549
|
if (t === "bottom") {
|
|
1550
1550
|
var f, c;
|
|
1551
1551
|
return {
|
|
1552
|
-
top: ((f =
|
|
1553
|
-
bottom: [...((c =
|
|
1552
|
+
top: ((f = s == null ? void 0 : s.top) != null ? f : []).filter((m) => !(u != null && u.has(m))),
|
|
1553
|
+
bottom: [...((c = s == null ? void 0 : s.bottom) != null ? c : []).filter((m) => !(u != null && u.has(m))), ...Array.from(u)]
|
|
1554
1554
|
};
|
|
1555
1555
|
}
|
|
1556
1556
|
if (t === "top") {
|
|
1557
1557
|
var a, p;
|
|
1558
1558
|
return {
|
|
1559
|
-
top: [...((a =
|
|
1560
|
-
bottom: ((p =
|
|
1559
|
+
top: [...((a = s == null ? void 0 : s.top) != null ? a : []).filter((m) => !(u != null && u.has(m))), ...Array.from(u)],
|
|
1560
|
+
bottom: ((p = s == null ? void 0 : s.bottom) != null ? p : []).filter((m) => !(u != null && u.has(m)))
|
|
1561
1561
|
};
|
|
1562
1562
|
}
|
|
1563
1563
|
return {
|
|
1564
|
-
top: ((g =
|
|
1565
|
-
bottom: ((d =
|
|
1564
|
+
top: ((g = s == null ? void 0 : s.top) != null ? g : []).filter((m) => !(u != null && u.has(m))),
|
|
1565
|
+
bottom: ((d = s == null ? void 0 : s.bottom) != null ? d : []).filter((m) => !(u != null && u.has(m)))
|
|
1566
1566
|
};
|
|
1567
1567
|
});
|
|
1568
1568
|
}, e.getCanPin = () => {
|
|
@@ -1576,7 +1576,7 @@ const Qt = {
|
|
|
1576
1576
|
const t = [e.id], {
|
|
1577
1577
|
top: n,
|
|
1578
1578
|
bottom: r
|
|
1579
|
-
} = o.getState().rowPinning, i = t.some((
|
|
1579
|
+
} = o.getState().rowPinning, i = t.some((u) => n == null ? void 0 : n.includes(u)), l = t.some((u) => r == null ? void 0 : r.includes(u));
|
|
1580
1580
|
return i ? "top" : l ? "bottom" : !1;
|
|
1581
1581
|
}, e.getPinnedIndex = () => {
|
|
1582
1582
|
var t, n;
|
|
@@ -1584,9 +1584,9 @@ const Qt = {
|
|
|
1584
1584
|
if (!r) return -1;
|
|
1585
1585
|
const i = (t = r === "top" ? o.getTopRows() : o.getBottomRows()) == null ? void 0 : t.map((l) => {
|
|
1586
1586
|
let {
|
|
1587
|
-
id:
|
|
1587
|
+
id: u
|
|
1588
1588
|
} = l;
|
|
1589
|
-
return
|
|
1589
|
+
return u;
|
|
1590
1590
|
});
|
|
1591
1591
|
return (n = i == null ? void 0 : i.indexOf(e.id)) != null ? n : -1;
|
|
1592
1592
|
};
|
|
@@ -1594,7 +1594,7 @@ const Qt = {
|
|
|
1594
1594
|
createTable: (e) => {
|
|
1595
1595
|
e.setRowPinning = (o) => e.options.onRowPinningChange == null ? void 0 : e.options.onRowPinningChange(o), e.resetRowPinning = (o) => {
|
|
1596
1596
|
var t, n;
|
|
1597
|
-
return e.setRowPinning(o ?
|
|
1597
|
+
return e.setRowPinning(o ? ne() : (t = (n = e.initialState) == null ? void 0 : n.rowPinning) != null ? t : ne());
|
|
1598
1598
|
}, e.getIsSomeRowsPinned = (o) => {
|
|
1599
1599
|
var t;
|
|
1600
1600
|
const n = e.getState().rowPinning;
|
|
@@ -1609,12 +1609,12 @@ const Qt = {
|
|
|
1609
1609
|
//get all rows that are pinned even if they would not be otherwise visible
|
|
1610
1610
|
//account for expanded parent rows, but not pagination or filtering
|
|
1611
1611
|
(t ?? []).map((l) => {
|
|
1612
|
-
const
|
|
1613
|
-
return
|
|
1612
|
+
const u = e.getRow(l, !0);
|
|
1613
|
+
return u.getIsAllParentsExpanded() ? u : null;
|
|
1614
1614
|
})
|
|
1615
1615
|
) : (
|
|
1616
1616
|
//else get only visible rows that are pinned
|
|
1617
|
-
(t ?? []).map((l) => o.find((
|
|
1617
|
+
(t ?? []).map((l) => o.find((u) => u.id === l))
|
|
1618
1618
|
)).filter(Boolean).map((l) => ({
|
|
1619
1619
|
...l,
|
|
1620
1620
|
position: n
|
|
@@ -1659,17 +1659,17 @@ const Qt = {
|
|
|
1659
1659
|
...t
|
|
1660
1660
|
};
|
|
1661
1661
|
return e.getRowModel().rows.forEach((i) => {
|
|
1662
|
-
|
|
1662
|
+
ue(r, i.id, n, !0, e);
|
|
1663
1663
|
}), r;
|
|
1664
|
-
}), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = h(() => [e.getState().rowSelection, e.getCoreRowModel()], (o, t) => Object.keys(o).length ?
|
|
1664
|
+
}), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = h(() => [e.getState().rowSelection, e.getCoreRowModel()], (o, t) => Object.keys(o).length ? oe(e, t) : {
|
|
1665
1665
|
rows: [],
|
|
1666
1666
|
flatRows: [],
|
|
1667
1667
|
rowsById: {}
|
|
1668
|
-
}, C(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = h(() => [e.getState().rowSelection, e.getFilteredRowModel()], (o, t) => Object.keys(o).length ?
|
|
1668
|
+
}, C(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = h(() => [e.getState().rowSelection, e.getFilteredRowModel()], (o, t) => Object.keys(o).length ? oe(e, t) : {
|
|
1669
1669
|
rows: [],
|
|
1670
1670
|
flatRows: [],
|
|
1671
1671
|
rowsById: {}
|
|
1672
|
-
}, C(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = h(() => [e.getState().rowSelection, e.getSortedRowModel()], (o, t) => Object.keys(o).length ?
|
|
1672
|
+
}, C(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = h(() => [e.getState().rowSelection, e.getSortedRowModel()], (o, t) => Object.keys(o).length ? oe(e, t) : {
|
|
1673
1673
|
rows: [],
|
|
1674
1674
|
flatRows: [],
|
|
1675
1675
|
rowsById: {}
|
|
@@ -1705,10 +1705,10 @@ const Qt = {
|
|
|
1705
1705
|
var l;
|
|
1706
1706
|
if (t = typeof t < "u" ? t : !r, e.getCanSelect() && r === t)
|
|
1707
1707
|
return i;
|
|
1708
|
-
const
|
|
1708
|
+
const u = {
|
|
1709
1709
|
...i
|
|
1710
1710
|
};
|
|
1711
|
-
return
|
|
1711
|
+
return ue(u, e.id, t, (l = n == null ? void 0 : n.selectChildren) != null ? l : !0, o), u;
|
|
1712
1712
|
});
|
|
1713
1713
|
}, e.getIsSelected = () => {
|
|
1714
1714
|
const {
|
|
@@ -1719,12 +1719,12 @@ const Qt = {
|
|
|
1719
1719
|
const {
|
|
1720
1720
|
rowSelection: t
|
|
1721
1721
|
} = o.getState();
|
|
1722
|
-
return
|
|
1722
|
+
return se(e, t) === "some";
|
|
1723
1723
|
}, e.getIsAllSubRowsSelected = () => {
|
|
1724
1724
|
const {
|
|
1725
1725
|
rowSelection: t
|
|
1726
1726
|
} = o.getState();
|
|
1727
|
-
return
|
|
1727
|
+
return se(e, t) === "all";
|
|
1728
1728
|
}, e.getCanSelect = () => {
|
|
1729
1729
|
var t;
|
|
1730
1730
|
return typeof o.options.enableRowSelection == "function" ? o.options.enableRowSelection(e) : (t = o.options.enableRowSelection) != null ? t : !0;
|
|
@@ -1742,21 +1742,21 @@ const Qt = {
|
|
|
1742
1742
|
};
|
|
1743
1743
|
};
|
|
1744
1744
|
}
|
|
1745
|
-
},
|
|
1745
|
+
}, ue = (e, o, t, n, r) => {
|
|
1746
1746
|
var i;
|
|
1747
1747
|
const l = r.getRow(o, !0);
|
|
1748
|
-
t ? (l.getCanMultiSelect() || Object.keys(e).forEach((
|
|
1748
|
+
t ? (l.getCanMultiSelect() || Object.keys(e).forEach((u) => delete e[u]), l.getCanSelect() && (e[o] = !0)) : delete e[o], n && (i = l.subRows) != null && i.length && l.getCanSelectSubRows() && l.subRows.forEach((u) => ue(e, u.id, t, n, r));
|
|
1749
1749
|
};
|
|
1750
|
-
function
|
|
1751
|
-
const t = e.getState().rowSelection, n = [], r = {}, i = function(l,
|
|
1752
|
-
return l.map((
|
|
1750
|
+
function oe(e, o) {
|
|
1751
|
+
const t = e.getState().rowSelection, n = [], r = {}, i = function(l, u) {
|
|
1752
|
+
return l.map((s) => {
|
|
1753
1753
|
var g;
|
|
1754
|
-
const d = pe(
|
|
1755
|
-
if (d && (n.push(
|
|
1756
|
-
...
|
|
1757
|
-
subRows: i(
|
|
1754
|
+
const d = pe(s, t);
|
|
1755
|
+
if (d && (n.push(s), r[s.id] = s), (g = s.subRows) != null && g.length && (s = {
|
|
1756
|
+
...s,
|
|
1757
|
+
subRows: i(s.subRows)
|
|
1758
1758
|
}), d)
|
|
1759
|
-
return
|
|
1759
|
+
return s;
|
|
1760
1760
|
}).filter(Boolean);
|
|
1761
1761
|
};
|
|
1762
1762
|
return {
|
|
@@ -1769,21 +1769,21 @@ function pe(e, o) {
|
|
|
1769
1769
|
var t;
|
|
1770
1770
|
return (t = o[e.id]) != null ? t : !1;
|
|
1771
1771
|
}
|
|
1772
|
-
function
|
|
1772
|
+
function se(e, o, t) {
|
|
1773
1773
|
var n;
|
|
1774
1774
|
if (!((n = e.subRows) != null && n.length)) return !1;
|
|
1775
1775
|
let r = !0, i = !1;
|
|
1776
1776
|
return e.subRows.forEach((l) => {
|
|
1777
1777
|
if (!(i && !r) && (l.getCanSelect() && (pe(l, o) ? i = !0 : r = !1), l.subRows && l.subRows.length)) {
|
|
1778
|
-
const
|
|
1779
|
-
|
|
1778
|
+
const u = se(l, o);
|
|
1779
|
+
u === "all" ? i = !0 : (u === "some" && (i = !0), r = !1);
|
|
1780
1780
|
}
|
|
1781
1781
|
}), r ? "all" : i ? "some" : !1;
|
|
1782
1782
|
}
|
|
1783
|
-
const ae = /([0-9]+)/gm, nn = (e, o, t) => We(A(e.getValue(t)).toLowerCase(), A(o.getValue(t)).toLowerCase()), on = (e, o, t) => We(A(e.getValue(t)), A(o.getValue(t))), rn = (e, o, t) => me(A(e.getValue(t)).toLowerCase(), A(o.getValue(t)).toLowerCase()), ln = (e, o, t) => me(A(e.getValue(t)), A(o.getValue(t))),
|
|
1783
|
+
const ae = /([0-9]+)/gm, nn = (e, o, t) => We(A(e.getValue(t)).toLowerCase(), A(o.getValue(t)).toLowerCase()), on = (e, o, t) => We(A(e.getValue(t)), A(o.getValue(t))), rn = (e, o, t) => me(A(e.getValue(t)).toLowerCase(), A(o.getValue(t)).toLowerCase()), ln = (e, o, t) => me(A(e.getValue(t)), A(o.getValue(t))), un = (e, o, t) => {
|
|
1784
1784
|
const n = e.getValue(t), r = o.getValue(t);
|
|
1785
1785
|
return n > r ? 1 : n < r ? -1 : 0;
|
|
1786
|
-
},
|
|
1786
|
+
}, sn = (e, o, t) => me(e.getValue(t), o.getValue(t));
|
|
1787
1787
|
function me(e, o) {
|
|
1788
1788
|
return e === o ? 0 : e > o ? 1 : -1;
|
|
1789
1789
|
}
|
|
@@ -1793,19 +1793,19 @@ function A(e) {
|
|
|
1793
1793
|
function We(e, o) {
|
|
1794
1794
|
const t = e.split(ae).filter(Boolean), n = o.split(ae).filter(Boolean);
|
|
1795
1795
|
for (; t.length && n.length; ) {
|
|
1796
|
-
const r = t.shift(), i = n.shift(), l = parseInt(r, 10),
|
|
1797
|
-
if (isNaN(
|
|
1796
|
+
const r = t.shift(), i = n.shift(), l = parseInt(r, 10), u = parseInt(i, 10), s = [l, u].sort();
|
|
1797
|
+
if (isNaN(s[0])) {
|
|
1798
1798
|
if (r > i)
|
|
1799
1799
|
return 1;
|
|
1800
1800
|
if (i > r)
|
|
1801
1801
|
return -1;
|
|
1802
1802
|
continue;
|
|
1803
1803
|
}
|
|
1804
|
-
if (isNaN(
|
|
1804
|
+
if (isNaN(s[1]))
|
|
1805
1805
|
return isNaN(l) ? -1 : 1;
|
|
1806
|
-
if (l >
|
|
1806
|
+
if (l > u)
|
|
1807
1807
|
return 1;
|
|
1808
|
-
if (
|
|
1808
|
+
if (u > l)
|
|
1809
1809
|
return -1;
|
|
1810
1810
|
}
|
|
1811
1811
|
return t.length - n.length;
|
|
@@ -1815,8 +1815,8 @@ const G = {
|
|
|
1815
1815
|
alphanumericCaseSensitive: on,
|
|
1816
1816
|
text: rn,
|
|
1817
1817
|
textCaseSensitive: ln,
|
|
1818
|
-
datetime:
|
|
1819
|
-
basic:
|
|
1818
|
+
datetime: un,
|
|
1819
|
+
basic: sn
|
|
1820
1820
|
}, an = {
|
|
1821
1821
|
getInitialState: (e) => ({
|
|
1822
1822
|
sorting: [],
|
|
@@ -1849,13 +1849,13 @@ const G = {
|
|
|
1849
1849
|
var t, n;
|
|
1850
1850
|
if (!e)
|
|
1851
1851
|
throw new Error();
|
|
1852
|
-
return
|
|
1852
|
+
return W(e.columnDef.sortingFn) ? e.columnDef.sortingFn : e.columnDef.sortingFn === "auto" ? e.getAutoSortingFn() : (t = (n = o.options.sortingFns) == null ? void 0 : n[e.columnDef.sortingFn]) != null ? t : G[e.columnDef.sortingFn];
|
|
1853
1853
|
}, e.toggleSorting = (t, n) => {
|
|
1854
1854
|
const r = e.getNextSortingOrder(), i = typeof t < "u" && t !== null;
|
|
1855
1855
|
o.setSorting((l) => {
|
|
1856
|
-
const
|
|
1856
|
+
const u = l == null ? void 0 : l.find((a) => a.id === e.id), s = l == null ? void 0 : l.findIndex((a) => a.id === e.id);
|
|
1857
1857
|
let g = [], d, f = i ? t : r === "desc";
|
|
1858
|
-
if (l != null && l.length && e.getCanMultiSort() && n ?
|
|
1858
|
+
if (l != null && l.length && e.getCanMultiSort() && n ? u ? d = "toggle" : d = "add" : l != null && l.length && s !== l.length - 1 ? d = "replace" : u ? d = "toggle" : d = "replace", d === "toggle" && (i || r || (d = "remove")), d === "add") {
|
|
1859
1859
|
var c;
|
|
1860
1860
|
g = [...l, {
|
|
1861
1861
|
id: e.id,
|
|
@@ -1909,7 +1909,7 @@ const G = {
|
|
|
1909
1909
|
}, gn = [
|
|
1910
1910
|
Pt,
|
|
1911
1911
|
Wt,
|
|
1912
|
-
|
|
1912
|
+
Bt,
|
|
1913
1913
|
qt,
|
|
1914
1914
|
Et,
|
|
1915
1915
|
Dt,
|
|
@@ -1937,13 +1937,13 @@ function dn(e) {
|
|
|
1937
1937
|
...i,
|
|
1938
1938
|
...c
|
|
1939
1939
|
};
|
|
1940
|
-
let
|
|
1940
|
+
let s = {
|
|
1941
1941
|
...{},
|
|
1942
1942
|
...(t = e.initialState) != null ? t : {}
|
|
1943
1943
|
};
|
|
1944
1944
|
r._features.forEach((c) => {
|
|
1945
1945
|
var a;
|
|
1946
|
-
|
|
1946
|
+
s = (a = c.getInitialState == null ? void 0 : c.getInitialState(s)) != null ? a : s;
|
|
1947
1947
|
});
|
|
1948
1948
|
const g = [];
|
|
1949
1949
|
let d = !1;
|
|
@@ -1953,7 +1953,7 @@ function dn(e) {
|
|
|
1953
1953
|
...i,
|
|
1954
1954
|
...e
|
|
1955
1955
|
},
|
|
1956
|
-
initialState:
|
|
1956
|
+
initialState: s,
|
|
1957
1957
|
_queue: (c) => {
|
|
1958
1958
|
g.push(c), d || (d = !0, Promise.resolve().then(() => {
|
|
1959
1959
|
for (; g.length; )
|
|
@@ -2041,15 +2041,15 @@ function cn() {
|
|
|
2041
2041
|
rowsById: {}
|
|
2042
2042
|
}, n = function(r, i, l) {
|
|
2043
2043
|
i === void 0 && (i = 0);
|
|
2044
|
-
const
|
|
2044
|
+
const u = [];
|
|
2045
2045
|
for (let g = 0; g < r.length; g++) {
|
|
2046
2046
|
const d = ce(e, e._getRowId(r[g], g, l), r[g], g, i, void 0, l == null ? void 0 : l.id);
|
|
2047
|
-
if (t.flatRows.push(d), t.rowsById[d.id] = d,
|
|
2048
|
-
var
|
|
2049
|
-
d.originalSubRows = e.options.getSubRows(r[g], g), (
|
|
2047
|
+
if (t.flatRows.push(d), t.rowsById[d.id] = d, u.push(d), e.options.getSubRows) {
|
|
2048
|
+
var s;
|
|
2049
|
+
d.originalSubRows = e.options.getSubRows(r[g], g), (s = d.originalSubRows) != null && s.length && (d.subRows = n(d.originalSubRows, i + 1, d));
|
|
2050
2050
|
}
|
|
2051
2051
|
}
|
|
2052
|
-
return
|
|
2052
|
+
return u;
|
|
2053
2053
|
};
|
|
2054
2054
|
return t.rows = n(o), t;
|
|
2055
2055
|
}, C(e.options, "debugTable", "getRowModel", () => e._autoResetPageIndex()));
|
|
@@ -2070,15 +2070,15 @@ function Qe(e, o, t) {
|
|
|
2070
2070
|
}
|
|
2071
2071
|
function pn(e, o, t) {
|
|
2072
2072
|
var n;
|
|
2073
|
-
const r = [], i = {}, l = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100,
|
|
2073
|
+
const r = [], i = {}, l = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, u = function(s, g) {
|
|
2074
2074
|
g === void 0 && (g = 0);
|
|
2075
2075
|
const d = [];
|
|
2076
|
-
for (let c = 0; c <
|
|
2076
|
+
for (let c = 0; c < s.length; c++) {
|
|
2077
2077
|
var f;
|
|
2078
|
-
let a =
|
|
2078
|
+
let a = s[c];
|
|
2079
2079
|
const p = ce(t, a.id, a.original, a.index, a.depth, void 0, a.parentId);
|
|
2080
2080
|
if (p.columnFilters = a.columnFilters, (f = a.subRows) != null && f.length && g < l) {
|
|
2081
|
-
if (p.subRows =
|
|
2081
|
+
if (p.subRows = u(a.subRows, g + 1), a = p, o(a) && !p.subRows.length) {
|
|
2082
2082
|
d.push(a), i[a.id] = a, r.push(a);
|
|
2083
2083
|
continue;
|
|
2084
2084
|
}
|
|
@@ -2092,23 +2092,23 @@ function pn(e, o, t) {
|
|
|
2092
2092
|
return d;
|
|
2093
2093
|
};
|
|
2094
2094
|
return {
|
|
2095
|
-
rows:
|
|
2095
|
+
rows: u(e),
|
|
2096
2096
|
flatRows: r,
|
|
2097
2097
|
rowsById: i
|
|
2098
2098
|
};
|
|
2099
2099
|
}
|
|
2100
2100
|
function mn(e, o, t) {
|
|
2101
2101
|
var n;
|
|
2102
|
-
const r = [], i = {}, l = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100,
|
|
2102
|
+
const r = [], i = {}, l = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, u = function(s, g) {
|
|
2103
2103
|
g === void 0 && (g = 0);
|
|
2104
2104
|
const d = [];
|
|
2105
|
-
for (let c = 0; c <
|
|
2106
|
-
let a =
|
|
2105
|
+
for (let c = 0; c < s.length; c++) {
|
|
2106
|
+
let a = s[c];
|
|
2107
2107
|
if (o(a)) {
|
|
2108
2108
|
var f;
|
|
2109
2109
|
if ((f = a.subRows) != null && f.length && g < l) {
|
|
2110
2110
|
const m = ce(t, a.id, a.original, a.index, a.depth, void 0, a.parentId);
|
|
2111
|
-
m.subRows =
|
|
2111
|
+
m.subRows = u(a.subRows, g + 1), a = m;
|
|
2112
2112
|
}
|
|
2113
2113
|
d.push(a), r.push(a), i[a.id] = a;
|
|
2114
2114
|
}
|
|
@@ -2116,7 +2116,7 @@ function mn(e, o, t) {
|
|
|
2116
2116
|
return d;
|
|
2117
2117
|
};
|
|
2118
2118
|
return {
|
|
2119
|
-
rows:
|
|
2119
|
+
rows: u(e),
|
|
2120
2120
|
flatRows: r,
|
|
2121
2121
|
rowsById: i
|
|
2122
2122
|
};
|
|
@@ -2125,9 +2125,9 @@ function Sn() {
|
|
|
2125
2125
|
return (e, o) => h(() => [e.getPreFilteredRowModel(), e.getState().columnFilters, e.getState().globalFilter, e.getFilteredRowModel()], (t, n, r) => {
|
|
2126
2126
|
if (!t.rows.length || !(n != null && n.length) && !r)
|
|
2127
2127
|
return t;
|
|
2128
|
-
const i = [...n.map((
|
|
2129
|
-
for (let
|
|
2130
|
-
if (
|
|
2128
|
+
const i = [...n.map((u) => u.id).filter((u) => u !== o), r ? "__global__" : void 0].filter(Boolean), l = (u) => {
|
|
2129
|
+
for (let s = 0; s < i.length; s++)
|
|
2130
|
+
if (u.columnFilters[i[s]] === !1)
|
|
2131
2131
|
return !1;
|
|
2132
2132
|
return !0;
|
|
2133
2133
|
};
|
|
@@ -2143,13 +2143,13 @@ function hn() {
|
|
|
2143
2143
|
let n = /* @__PURE__ */ new Map();
|
|
2144
2144
|
for (let i = 0; i < t.flatRows.length; i++) {
|
|
2145
2145
|
const l = t.flatRows[i].getUniqueValues(o);
|
|
2146
|
-
for (let
|
|
2147
|
-
const
|
|
2148
|
-
if (n.has(
|
|
2146
|
+
for (let u = 0; u < l.length; u++) {
|
|
2147
|
+
const s = l[u];
|
|
2148
|
+
if (n.has(s)) {
|
|
2149
2149
|
var r;
|
|
2150
|
-
n.set(
|
|
2150
|
+
n.set(s, ((r = n.get(s)) != null ? r : 0) + 1);
|
|
2151
2151
|
} else
|
|
2152
|
-
n.set(
|
|
2152
|
+
n.set(s, 1);
|
|
2153
2153
|
}
|
|
2154
2154
|
}
|
|
2155
2155
|
return n;
|
|
@@ -2179,13 +2179,13 @@ function Cn() {
|
|
|
2179
2179
|
resolvedValue: (a = m.resolveFilterValue == null ? void 0 : m.resolveFilterValue(c.value)) != null ? a : c.value
|
|
2180
2180
|
});
|
|
2181
2181
|
});
|
|
2182
|
-
const l = (t ?? []).map((c) => c.id),
|
|
2183
|
-
n &&
|
|
2182
|
+
const l = (t ?? []).map((c) => c.id), u = e.getGlobalFilterFn(), s = e.getAllLeafColumns().filter((c) => c.getCanGlobalFilter());
|
|
2183
|
+
n && u && s.length && (l.push("__global__"), s.forEach((c) => {
|
|
2184
2184
|
var a;
|
|
2185
2185
|
i.push({
|
|
2186
2186
|
id: c.id,
|
|
2187
|
-
filterFn:
|
|
2188
|
-
resolvedValue: (a =
|
|
2187
|
+
filterFn: u,
|
|
2188
|
+
resolvedValue: (a = u.resolveFilterValue == null ? void 0 : u.resolveFilterValue(n)) != null ? a : n
|
|
2189
2189
|
});
|
|
2190
2190
|
}));
|
|
2191
2191
|
let g, d;
|
|
@@ -2232,20 +2232,20 @@ function wn(e) {
|
|
|
2232
2232
|
} = t;
|
|
2233
2233
|
let {
|
|
2234
2234
|
rows: l,
|
|
2235
|
-
flatRows:
|
|
2236
|
-
rowsById:
|
|
2235
|
+
flatRows: u,
|
|
2236
|
+
rowsById: s
|
|
2237
2237
|
} = n;
|
|
2238
2238
|
const g = r * i, d = g + r;
|
|
2239
2239
|
l = l.slice(g, d);
|
|
2240
2240
|
let f;
|
|
2241
2241
|
o.options.paginateExpandedRows ? f = {
|
|
2242
2242
|
rows: l,
|
|
2243
|
-
flatRows:
|
|
2244
|
-
rowsById:
|
|
2243
|
+
flatRows: u,
|
|
2244
|
+
rowsById: s
|
|
2245
2245
|
} : f = fn({
|
|
2246
2246
|
rows: l,
|
|
2247
|
-
flatRows:
|
|
2248
|
-
rowsById:
|
|
2247
|
+
flatRows: u,
|
|
2248
|
+
rowsById: s
|
|
2249
2249
|
}), f.flatRows = [];
|
|
2250
2250
|
const c = (a) => {
|
|
2251
2251
|
f.flatRows.push(a), a.subRows.length && a.subRows.forEach(c);
|
|
@@ -2257,20 +2257,20 @@ function Rn() {
|
|
|
2257
2257
|
return (e) => h(() => [e.getState().sorting, e.getPreSortedRowModel()], (o, t) => {
|
|
2258
2258
|
if (!t.rows.length || !(o != null && o.length))
|
|
2259
2259
|
return t;
|
|
2260
|
-
const n = e.getState().sorting, r = [], i = n.filter((
|
|
2260
|
+
const n = e.getState().sorting, r = [], i = n.filter((s) => {
|
|
2261
2261
|
var g;
|
|
2262
|
-
return (g = e.getColumn(
|
|
2262
|
+
return (g = e.getColumn(s.id)) == null ? void 0 : g.getCanSort();
|
|
2263
2263
|
}), l = {};
|
|
2264
|
-
i.forEach((
|
|
2265
|
-
const g = e.getColumn(
|
|
2266
|
-
g && (l[
|
|
2264
|
+
i.forEach((s) => {
|
|
2265
|
+
const g = e.getColumn(s.id);
|
|
2266
|
+
g && (l[s.id] = {
|
|
2267
2267
|
sortUndefined: g.columnDef.sortUndefined,
|
|
2268
2268
|
invertSorting: g.columnDef.invertSorting,
|
|
2269
2269
|
sortingFn: g.getSortingFn()
|
|
2270
2270
|
});
|
|
2271
2271
|
});
|
|
2272
|
-
const
|
|
2273
|
-
const g =
|
|
2272
|
+
const u = (s) => {
|
|
2273
|
+
const g = s.map((d) => ({
|
|
2274
2274
|
...d
|
|
2275
2275
|
}));
|
|
2276
2276
|
return g.sort((d, f) => {
|
|
@@ -2292,11 +2292,11 @@ function Rn() {
|
|
|
2292
2292
|
return d.index - f.index;
|
|
2293
2293
|
}), g.forEach((d) => {
|
|
2294
2294
|
var f;
|
|
2295
|
-
r.push(d), (f = d.subRows) != null && f.length && (d.subRows =
|
|
2295
|
+
r.push(d), (f = d.subRows) != null && f.length && (d.subRows = u(d.subRows));
|
|
2296
2296
|
}), g;
|
|
2297
2297
|
};
|
|
2298
2298
|
return {
|
|
2299
|
-
rows:
|
|
2299
|
+
rows: u(t.rows),
|
|
2300
2300
|
flatRows: r,
|
|
2301
2301
|
rowsById: t.rowsById
|
|
2302
2302
|
};
|
|
@@ -2312,7 +2312,7 @@ function Rn() {
|
|
|
2312
2312
|
*
|
|
2313
2313
|
* @license MIT
|
|
2314
2314
|
*/
|
|
2315
|
-
function
|
|
2315
|
+
function U(e, o) {
|
|
2316
2316
|
return e ? vn(e) ? /* @__PURE__ */ E.createElement(e, o) : e : null;
|
|
2317
2317
|
}
|
|
2318
2318
|
function vn(e) {
|
|
@@ -2363,9 +2363,9 @@ const yn = ({
|
|
|
2363
2363
|
classes: l
|
|
2364
2364
|
}) => {
|
|
2365
2365
|
o = o < 1 ? 1 : o, e = Math.min(Math.max(e, 1), t), i = Math.min(Math.max(i, 0), o - 2);
|
|
2366
|
-
const
|
|
2366
|
+
const u = Array.from({ length: t }, (d, f) => f), s = o * 2 + 1;
|
|
2367
2367
|
let g;
|
|
2368
|
-
return t <
|
|
2368
|
+
return t < s ? g = u : e - 1 <= o ? g = u.slice(0, s - (i > 0 ? i + 1 : 0)) : e + o >= t ? g = u.slice(t - s + (i > 0 ? i + 1 : 0), t) : g = u.slice(
|
|
2369
2369
|
e - 1 - (o - (i > 0 ? i + 1 : 0)),
|
|
2370
2370
|
e + (o - (i > 0 ? i + 1 : 0))
|
|
2371
2371
|
), /* @__PURE__ */ S.jsxs("div", { className: v("flex", l == null ? void 0 : l.root), children: [
|
|
@@ -2377,10 +2377,10 @@ const yn = ({
|
|
|
2377
2377
|
className: v("mob-body-regular-l w-[40px] p-0 text-color-dark disabled:text-icon-disabled", l == null ? void 0 : l.button),
|
|
2378
2378
|
disabled: e <= 1,
|
|
2379
2379
|
onClick: () => e > 1 && n(e - 2),
|
|
2380
|
-
children: /* @__PURE__ */ S.jsx(
|
|
2380
|
+
children: /* @__PURE__ */ S.jsx(B, { name: "arrows/arrowRight", className: "rotate-180" })
|
|
2381
2381
|
}
|
|
2382
2382
|
),
|
|
2383
|
-
t >
|
|
2383
|
+
t > s && i > 0 && u.slice(0, e - 1 <= o ? 0 : i).map((d) => /* @__PURE__ */ S.jsx(
|
|
2384
2384
|
D,
|
|
2385
2385
|
{
|
|
2386
2386
|
size: "sm",
|
|
@@ -2391,7 +2391,7 @@ const yn = ({
|
|
|
2391
2391
|
},
|
|
2392
2392
|
d
|
|
2393
2393
|
)),
|
|
2394
|
-
t >
|
|
2394
|
+
t > s && i > 0 && e - 1 > o && /* @__PURE__ */ S.jsx(
|
|
2395
2395
|
D,
|
|
2396
2396
|
{
|
|
2397
2397
|
size: "sm",
|
|
@@ -2420,7 +2420,7 @@ const yn = ({
|
|
|
2420
2420
|
d
|
|
2421
2421
|
);
|
|
2422
2422
|
}),
|
|
2423
|
-
t >
|
|
2423
|
+
t > s && i > 0 && e < t - o && /* @__PURE__ */ S.jsx(
|
|
2424
2424
|
D,
|
|
2425
2425
|
{
|
|
2426
2426
|
size: "sm",
|
|
@@ -2429,7 +2429,7 @@ const yn = ({
|
|
|
2429
2429
|
children: "..."
|
|
2430
2430
|
}
|
|
2431
2431
|
),
|
|
2432
|
-
t >
|
|
2432
|
+
t > s && i > 0 && u.slice(e >= t - o ? t : t - i, t).map((d) => /* @__PURE__ */ S.jsx(
|
|
2433
2433
|
D,
|
|
2434
2434
|
{
|
|
2435
2435
|
size: "sm",
|
|
@@ -2448,16 +2448,16 @@ const yn = ({
|
|
|
2448
2448
|
className: v("mob-body-regular-l w-[40px] p-0 text-color-dark disabled:text-icon-disabled", l == null ? void 0 : l.button),
|
|
2449
2449
|
disabled: e >= t,
|
|
2450
2450
|
onClick: () => e < t && n(e),
|
|
2451
|
-
children: /* @__PURE__ */ S.jsx(
|
|
2451
|
+
children: /* @__PURE__ */ S.jsx(B, { name: "arrows/arrowRight" })
|
|
2452
2452
|
}
|
|
2453
2453
|
)
|
|
2454
2454
|
] });
|
|
2455
2455
|
}, $n = ({ page: e, pageCount: o, pageSize: t, onPageIndexChange: n, rowsCount: r, classes: i }) => {
|
|
2456
|
-
const l = t * e,
|
|
2456
|
+
const l = t * e, u = l > r ? r : l;
|
|
2457
2457
|
return /* @__PURE__ */ S.jsxs("div", { className: v("flex w-full items-center justify-between", i == null ? void 0 : i.root), children: [
|
|
2458
2458
|
/* @__PURE__ */ S.jsxs("span", { className: v("desk-body-regular-m text-color-tetriary", i == null ? void 0 : i.displayShown), children: [
|
|
2459
2459
|
"Показано ",
|
|
2460
|
-
|
|
2460
|
+
u,
|
|
2461
2461
|
" из ",
|
|
2462
2462
|
r
|
|
2463
2463
|
] }),
|
|
@@ -2465,7 +2465,7 @@ const yn = ({
|
|
|
2465
2465
|
yn,
|
|
2466
2466
|
{
|
|
2467
2467
|
totalPages: o,
|
|
2468
|
-
changePage: (
|
|
2468
|
+
changePage: (s) => n(s),
|
|
2469
2469
|
page: e,
|
|
2470
2470
|
ellipsis: 1,
|
|
2471
2471
|
classes: i == null ? void 0 : i.pagination
|
|
@@ -2480,7 +2480,7 @@ const yn = ({
|
|
|
2480
2480
|
pagination: r,
|
|
2481
2481
|
empty: i = "Not found"
|
|
2482
2482
|
}) => {
|
|
2483
|
-
const l = r !== !1 && t.getPageCount() > 1,
|
|
2483
|
+
const l = r !== !1 && t.getPageCount() > 1, u = {
|
|
2484
2484
|
pageCount: t.getPageCount(),
|
|
2485
2485
|
rowsCount: t.getCoreRowModel().rows.length,
|
|
2486
2486
|
pageSize: t.getState().pagination.pageSize,
|
|
@@ -2490,8 +2490,8 @@ const yn = ({
|
|
|
2490
2490
|
};
|
|
2491
2491
|
return /* @__PURE__ */ S.jsxs("div", { className: v("flex w-full flex-col gap-y-4", n == null ? void 0 : n.root), children: [
|
|
2492
2492
|
/* @__PURE__ */ S.jsxs(ze, { className: v("w-full", n == null ? void 0 : n.table), children: [
|
|
2493
|
-
o && /* @__PURE__ */ S.jsx(be, { className: "px-2", children: t.getHeaderGroups().map((
|
|
2494
|
-
|
|
2493
|
+
o && /* @__PURE__ */ S.jsx(be, { className: "px-2", children: t.getHeaderGroups().map((s) => /* @__PURE__ */ S.jsx(
|
|
2494
|
+
k,
|
|
2495
2495
|
{
|
|
2496
2496
|
className: v(
|
|
2497
2497
|
"w-full",
|
|
@@ -2500,7 +2500,7 @@ const yn = ({
|
|
|
2500
2500
|
},
|
|
2501
2501
|
n == null ? void 0 : n.tableHeader
|
|
2502
2502
|
),
|
|
2503
|
-
children:
|
|
2503
|
+
children: s.headers.map((g) => /* @__PURE__ */ S.jsx(
|
|
2504
2504
|
je,
|
|
2505
2505
|
{
|
|
2506
2506
|
className: v(
|
|
@@ -2510,15 +2510,15 @@ const yn = ({
|
|
|
2510
2510
|
},
|
|
2511
2511
|
n == null ? void 0 : n.tableHead
|
|
2512
2512
|
),
|
|
2513
|
-
children: g.isPlaceholder ? null :
|
|
2513
|
+
children: g.isPlaceholder ? null : U(g.column.columnDef.header, g.getContext())
|
|
2514
2514
|
},
|
|
2515
2515
|
g.id
|
|
2516
2516
|
))
|
|
2517
2517
|
},
|
|
2518
|
-
|
|
2518
|
+
s.id
|
|
2519
2519
|
)) }),
|
|
2520
|
-
/* @__PURE__ */ S.jsx(Ne, { children: t.getRowModel().rows.length ? t.getRowModel().rows.map((
|
|
2521
|
-
|
|
2520
|
+
/* @__PURE__ */ S.jsx(Ne, { children: t.getRowModel().rows.length ? t.getRowModel().rows.map((s, g) => /* @__PURE__ */ S.jsx(
|
|
2521
|
+
k,
|
|
2522
2522
|
{
|
|
2523
2523
|
className: v(
|
|
2524
2524
|
"w-full",
|
|
@@ -2528,7 +2528,7 @@ const yn = ({
|
|
|
2528
2528
|
},
|
|
2529
2529
|
n == null ? void 0 : n.tableRow
|
|
2530
2530
|
),
|
|
2531
|
-
children:
|
|
2531
|
+
children: s.getVisibleCells().map((d, f) => /* @__PURE__ */ S.jsx(
|
|
2532
2532
|
re,
|
|
2533
2533
|
{
|
|
2534
2534
|
className: v(
|
|
@@ -2539,15 +2539,15 @@ const yn = ({
|
|
|
2539
2539
|
},
|
|
2540
2540
|
n == null ? void 0 : n.tableCell
|
|
2541
2541
|
),
|
|
2542
|
-
children:
|
|
2542
|
+
children: U(d.column.columnDef.cell, { ...d.getContext(), rowIndex: g })
|
|
2543
2543
|
},
|
|
2544
2544
|
d.id
|
|
2545
2545
|
))
|
|
2546
2546
|
},
|
|
2547
|
-
|
|
2548
|
-
)) : /* @__PURE__ */ S.jsx(
|
|
2547
|
+
s.id
|
|
2548
|
+
)) : /* @__PURE__ */ S.jsx(k, { children: /* @__PURE__ */ S.jsx(re, { className: "py-4 text-center", colSpan: t.getAllColumns().length, children: i }) }) })
|
|
2549
2549
|
] }),
|
|
2550
|
-
l ? typeof r == "function" ? r(
|
|
2550
|
+
l ? typeof r == "function" ? r(u) : /* @__PURE__ */ S.jsx($n, { ...u }) : null
|
|
2551
2551
|
] });
|
|
2552
2552
|
}, Mn = ({
|
|
2553
2553
|
mode: e,
|
|
@@ -2565,8 +2565,8 @@ const yn = ({
|
|
|
2565
2565
|
},
|
|
2566
2566
|
n == null ? void 0 : n.tableRow
|
|
2567
2567
|
),
|
|
2568
|
-
children: i.getVisibleCells().map((l,
|
|
2569
|
-
const
|
|
2568
|
+
children: i.getVisibleCells().map((l, u) => {
|
|
2569
|
+
const s = t.getHeaderGroups()[0].headers[u];
|
|
2570
2570
|
return /* @__PURE__ */ S.jsxs(
|
|
2571
2571
|
"div",
|
|
2572
2572
|
{
|
|
@@ -2574,13 +2574,13 @@ const yn = ({
|
|
|
2574
2574
|
"grid grid-cols-2 p-2",
|
|
2575
2575
|
{
|
|
2576
2576
|
"px-2": e === "odd",
|
|
2577
|
-
"font-medium":
|
|
2577
|
+
"font-medium": u !== 0
|
|
2578
2578
|
},
|
|
2579
2579
|
n == null ? void 0 : n.tableCell
|
|
2580
2580
|
),
|
|
2581
2581
|
children: [
|
|
2582
|
-
o && /* @__PURE__ */ S.jsx("p", { className: "font-bold", children:
|
|
2583
|
-
/* @__PURE__ */ S.jsx("p", { children:
|
|
2582
|
+
o && /* @__PURE__ */ S.jsx("p", { className: "font-bold", children: U(s.column.columnDef.header, s.getContext()) }),
|
|
2583
|
+
/* @__PURE__ */ S.jsx("p", { children: U(l.column.columnDef.cell, l.getContext()) })
|
|
2584
2584
|
]
|
|
2585
2585
|
},
|
|
2586
2586
|
l.id
|
|
@@ -2596,15 +2596,15 @@ const yn = ({
|
|
|
2596
2596
|
classes: r,
|
|
2597
2597
|
pagination: i = !0,
|
|
2598
2598
|
empty: l,
|
|
2599
|
-
pageSize:
|
|
2599
|
+
pageSize: u = 10
|
|
2600
2600
|
}) => {
|
|
2601
|
-
const [
|
|
2601
|
+
const [s, g] = z([]), [d, f] = z([]), [c, a] = z({
|
|
2602
2602
|
pageIndex: 0,
|
|
2603
|
-
pageSize:
|
|
2603
|
+
pageSize: u
|
|
2604
2604
|
}), p = Fn({
|
|
2605
2605
|
data: o,
|
|
2606
2606
|
columns: e,
|
|
2607
|
-
state: { columnFilters:
|
|
2607
|
+
state: { columnFilters: s, sorting: d, pagination: c },
|
|
2608
2608
|
enableRowSelection: !0,
|
|
2609
2609
|
onSortingChange: f,
|
|
2610
2610
|
onColumnFiltersChange: g,
|
|
@@ -2628,11 +2628,11 @@ class Kn {
|
|
|
2628
2628
|
enableColumnFilter: r = !1,
|
|
2629
2629
|
enableSorting: i = !1,
|
|
2630
2630
|
cellAccessor: l,
|
|
2631
|
-
headerAccessor:
|
|
2631
|
+
headerAccessor: u
|
|
2632
2632
|
} = t || {};
|
|
2633
2633
|
return Object.keys(o).map((g) => n.accessor(g, {
|
|
2634
2634
|
header: (d) => {
|
|
2635
|
-
const { column: f } = d, c =
|
|
2635
|
+
const { column: f } = d, c = u ? u[g] : null;
|
|
2636
2636
|
return /* @__PURE__ */ S.jsx(
|
|
2637
2637
|
Ft,
|
|
2638
2638
|
{
|
|
@@ -2667,7 +2667,7 @@ const Xn = ({ maxToastViewLimit: e = 2, toastDuration: o = 5e3 }) => {
|
|
|
2667
2667
|
}
|
|
2668
2668
|
);
|
|
2669
2669
|
}, In = ({ children: e }) => /* @__PURE__ */ S.jsx(S.Fragment, { children: e }), ge = M(({ children: e, ...o }, t) => {
|
|
2670
|
-
if (
|
|
2670
|
+
if (q(e)) {
|
|
2671
2671
|
const n = En(e);
|
|
2672
2672
|
return ye(e, {
|
|
2673
2673
|
...Dn(o, e.props),
|
|
@@ -2679,7 +2679,7 @@ const Xn = ({ maxToastViewLimit: e = 2, toastDuration: o = 5e3 }) => {
|
|
|
2679
2679
|
return b.count(e) > 1 ? b.only(null) : null;
|
|
2680
2680
|
});
|
|
2681
2681
|
ge.displayName = "SlotClone";
|
|
2682
|
-
const Pn = (e) =>
|
|
2682
|
+
const Pn = (e) => q(e) && e.type === In, En = (e) => {
|
|
2683
2683
|
var n, r;
|
|
2684
2684
|
let o = (n = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : n.get, t = o && "isReactWarning" in o && o.isReactWarning;
|
|
2685
2685
|
return t ? e.ref : (o = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, t = o && "isReactWarning" in o && o.isReactWarning, t ? e.props.ref : e.props.ref || e.ref);
|
|
@@ -2695,48 +2695,63 @@ const Pn = (e) => k(e) && e.type === In, En = (e) => {
|
|
|
2695
2695
|
}, Ln = M(({ children: e, ...o }, t) => {
|
|
2696
2696
|
const n = b.toArray(e), r = n.find(Pn);
|
|
2697
2697
|
if (r) {
|
|
2698
|
-
const i = r.props.children, l = n.map((
|
|
2699
|
-
return /* @__PURE__ */ S.jsx(ge, { ...o, ref: t, children:
|
|
2698
|
+
const i = r.props.children, l = n.map((u) => u === r ? b.count(i) > 1 ? b.only(null) : q(i) ? i.props.children : null : u);
|
|
2699
|
+
return /* @__PURE__ */ S.jsx(ge, { ...o, ref: t, children: q(i) ? ye(i, void 0, l) : null });
|
|
2700
2700
|
}
|
|
2701
2701
|
return /* @__PURE__ */ S.jsx(ge, { ...o, ref: t, children: e });
|
|
2702
2702
|
});
|
|
2703
2703
|
Ln.displayName = "Slot";
|
|
2704
|
+
const Wn = ({ icon: e, children: o, classes: t, ...n }) => /* @__PURE__ */ S.jsxs(
|
|
2705
|
+
"div",
|
|
2706
|
+
{
|
|
2707
|
+
...n,
|
|
2708
|
+
className: v(
|
|
2709
|
+
"desk-body-regular-l flex gap-x-1 rounded-sm bg-color-blue-grey-100 px-2 py-1 text-color-tetriary",
|
|
2710
|
+
t == null ? void 0 : t.root
|
|
2711
|
+
),
|
|
2712
|
+
children: [
|
|
2713
|
+
e && /* @__PURE__ */ S.jsx(B, { name: e, className: v("size-6", t == null ? void 0 : t.icon) }),
|
|
2714
|
+
o
|
|
2715
|
+
]
|
|
2716
|
+
}
|
|
2717
|
+
);
|
|
2704
2718
|
export {
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2719
|
+
st as Accordion,
|
|
2720
|
+
Yn as ArrowNavigationButton,
|
|
2721
|
+
Zn as Badge,
|
|
2708
2722
|
D as Button,
|
|
2709
2723
|
Nn as ButtonIcon,
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
ro as
|
|
2716
|
-
|
|
2724
|
+
eo as Calendar,
|
|
2725
|
+
to as CarouselBase,
|
|
2726
|
+
no as CarouselContent,
|
|
2727
|
+
oo as CarouselSlide,
|
|
2728
|
+
Wn as Chips,
|
|
2729
|
+
ro as Controlled,
|
|
2730
|
+
io as CustomLink,
|
|
2731
|
+
Do as DATE_VISIBLE_PATTERN,
|
|
2717
2732
|
Un as DataTable,
|
|
2718
2733
|
Ft as DataTableColumnHeader,
|
|
2719
|
-
|
|
2720
|
-
|
|
2734
|
+
lo as Dialog,
|
|
2735
|
+
uo as DotsNavigations,
|
|
2721
2736
|
qn as EditableCell,
|
|
2722
2737
|
Tn as FloatButton,
|
|
2723
2738
|
so as Heading,
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2739
|
+
ao as Hint,
|
|
2740
|
+
B as Icon,
|
|
2741
|
+
go as KeyboardShortcuts,
|
|
2742
|
+
co as Loader,
|
|
2743
|
+
fo as Modal,
|
|
2744
|
+
po as Notification,
|
|
2730
2745
|
Xn as NotificationProvider,
|
|
2731
2746
|
yn as Pagination,
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2747
|
+
mo as PhoneView,
|
|
2748
|
+
So as Popover,
|
|
2749
|
+
ho as ProgressBar,
|
|
2735
2750
|
et as ResponsiveContainer,
|
|
2736
2751
|
jn as Skeleton,
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2752
|
+
Co as SlideFullScreen,
|
|
2753
|
+
wo as SlideOnlyImage,
|
|
2754
|
+
Ro as SlideProductCard,
|
|
2740
2755
|
Ln as Slot,
|
|
2741
2756
|
ze as Table,
|
|
2742
2757
|
Ne as TableBody,
|
|
@@ -2745,23 +2760,23 @@ export {
|
|
|
2745
2760
|
xt as TableFooter,
|
|
2746
2761
|
je as TableHead,
|
|
2747
2762
|
be as TableHeader,
|
|
2748
|
-
|
|
2763
|
+
k as TableRow,
|
|
2749
2764
|
Kn as TableUtils,
|
|
2750
|
-
|
|
2751
|
-
|
|
2765
|
+
Bn as TabsSwitcher,
|
|
2766
|
+
vo as Uncontrolled,
|
|
2752
2767
|
On as allowedIcons,
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2768
|
+
xo as brandLogos,
|
|
2769
|
+
_o as buttonPrimitiveIntent,
|
|
2770
|
+
Fo as buttonPrimitiveSize,
|
|
2771
|
+
yo as buttonPrimitiveTextFormat,
|
|
2772
|
+
$o as buttonPrimitiveType,
|
|
2773
|
+
Lo as defaultClassNames,
|
|
2774
|
+
Ao as formatDateToLocaleString,
|
|
2775
|
+
Ho as formatDateToMonthString,
|
|
2776
|
+
Go as formatDateToYearString,
|
|
2777
|
+
Vo as isSingleOption,
|
|
2778
|
+
Mo as linkPrimitiveIconIntent,
|
|
2779
|
+
Io as linkPrimitiveIntent,
|
|
2780
|
+
Po as linkPrimitiveSize
|
|
2766
2781
|
};
|
|
2767
2782
|
//# sourceMappingURL=ui.js.map
|