wg-design 0.7.3 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs
CHANGED
|
@@ -19036,27 +19036,722 @@ function AS({ className: e, ...t }) {
|
|
|
19036
19036
|
});
|
|
19037
19037
|
}
|
|
19038
19038
|
//#endregion
|
|
19039
|
+
//#region node_modules/@radix-ui/react-compose-refs/dist/index.mjs
|
|
19040
|
+
function jS(e, t) {
|
|
19041
|
+
if (typeof e == "function") return e(t);
|
|
19042
|
+
e != null && (e.current = t);
|
|
19043
|
+
}
|
|
19044
|
+
function MS(...e) {
|
|
19045
|
+
return (t) => {
|
|
19046
|
+
let n = !1, r = e.map((e) => {
|
|
19047
|
+
let r = jS(e, t);
|
|
19048
|
+
return !n && typeof r == "function" && (n = !0), r;
|
|
19049
|
+
});
|
|
19050
|
+
if (n) return () => {
|
|
19051
|
+
for (let t = 0; t < r.length; t++) {
|
|
19052
|
+
let n = r[t];
|
|
19053
|
+
typeof n == "function" ? n() : jS(e[t], null);
|
|
19054
|
+
}
|
|
19055
|
+
};
|
|
19056
|
+
};
|
|
19057
|
+
}
|
|
19058
|
+
function NS(...e) {
|
|
19059
|
+
return p.useCallback(MS(...e), e);
|
|
19060
|
+
}
|
|
19061
|
+
//#endregion
|
|
19062
|
+
//#region node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
19063
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
19064
|
+
function PS(e) {
|
|
19065
|
+
let t = /* @__PURE__ */ FS(e), n = p.forwardRef((e, n) => {
|
|
19066
|
+
let { children: r, ...i } = e, a = p.Children.toArray(r), o = a.find(LS);
|
|
19067
|
+
if (o) {
|
|
19068
|
+
let e = o.props.children, r = a.map((t) => t === o ? p.Children.count(e) > 1 ? p.Children.only(null) : p.isValidElement(e) ? e.props.children : null : t);
|
|
19069
|
+
return /* @__PURE__ */ D(t, {
|
|
19070
|
+
...i,
|
|
19071
|
+
ref: n,
|
|
19072
|
+
children: p.isValidElement(e) ? p.cloneElement(e, void 0, r) : null
|
|
19073
|
+
});
|
|
19074
|
+
}
|
|
19075
|
+
return /* @__PURE__ */ D(t, {
|
|
19076
|
+
...i,
|
|
19077
|
+
ref: n,
|
|
19078
|
+
children: r
|
|
19079
|
+
});
|
|
19080
|
+
});
|
|
19081
|
+
return n.displayName = `${e}.Slot`, n;
|
|
19082
|
+
}
|
|
19083
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
19084
|
+
function FS(e) {
|
|
19085
|
+
let t = p.forwardRef((e, t) => {
|
|
19086
|
+
let { children: n, ...r } = e;
|
|
19087
|
+
if (p.isValidElement(n)) {
|
|
19088
|
+
let e = zS(n), i = RS(r, n.props);
|
|
19089
|
+
return n.type !== p.Fragment && (i.ref = t ? MS(t, e) : e), p.cloneElement(n, i);
|
|
19090
|
+
}
|
|
19091
|
+
return p.Children.count(n) > 1 ? p.Children.only(null) : null;
|
|
19092
|
+
});
|
|
19093
|
+
return t.displayName = `${e}.SlotClone`, t;
|
|
19094
|
+
}
|
|
19095
|
+
var IS = Symbol("radix.slottable");
|
|
19096
|
+
function LS(e) {
|
|
19097
|
+
return p.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === IS;
|
|
19098
|
+
}
|
|
19099
|
+
function RS(e, t) {
|
|
19100
|
+
let n = { ...t };
|
|
19101
|
+
for (let r in t) {
|
|
19102
|
+
let i = e[r], a = t[r];
|
|
19103
|
+
/^on[A-Z]/.test(r) ? i && a ? n[r] = (...e) => {
|
|
19104
|
+
let t = a(...e);
|
|
19105
|
+
return i(...e), t;
|
|
19106
|
+
} : i && (n[r] = i) : r === "style" ? n[r] = {
|
|
19107
|
+
...i,
|
|
19108
|
+
...a
|
|
19109
|
+
} : r === "className" && (n[r] = [i, a].filter(Boolean).join(" "));
|
|
19110
|
+
}
|
|
19111
|
+
return {
|
|
19112
|
+
...e,
|
|
19113
|
+
...n
|
|
19114
|
+
};
|
|
19115
|
+
}
|
|
19116
|
+
function zS(e) {
|
|
19117
|
+
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
19118
|
+
return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
19119
|
+
}
|
|
19120
|
+
//#endregion
|
|
19121
|
+
//#region node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
19122
|
+
var BS = [
|
|
19123
|
+
"a",
|
|
19124
|
+
"button",
|
|
19125
|
+
"div",
|
|
19126
|
+
"form",
|
|
19127
|
+
"h2",
|
|
19128
|
+
"h3",
|
|
19129
|
+
"img",
|
|
19130
|
+
"input",
|
|
19131
|
+
"label",
|
|
19132
|
+
"li",
|
|
19133
|
+
"nav",
|
|
19134
|
+
"ol",
|
|
19135
|
+
"p",
|
|
19136
|
+
"select",
|
|
19137
|
+
"span",
|
|
19138
|
+
"svg",
|
|
19139
|
+
"ul"
|
|
19140
|
+
].reduce((e, t) => {
|
|
19141
|
+
let n = /* @__PURE__ */ PS(`Primitive.${t}`), r = p.forwardRef((e, r) => {
|
|
19142
|
+
let { asChild: i, ...a } = e, o = i ? n : t;
|
|
19143
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ D(o, {
|
|
19144
|
+
...a,
|
|
19145
|
+
ref: r
|
|
19146
|
+
});
|
|
19147
|
+
});
|
|
19148
|
+
return r.displayName = `Primitive.${t}`, {
|
|
19149
|
+
...e,
|
|
19150
|
+
[t]: r
|
|
19151
|
+
};
|
|
19152
|
+
}, {});
|
|
19153
|
+
//#endregion
|
|
19154
|
+
//#region node_modules/@radix-ui/react-context/dist/index.mjs
|
|
19155
|
+
function VS(e, t = []) {
|
|
19156
|
+
let n = [];
|
|
19157
|
+
function r(t, r) {
|
|
19158
|
+
let i = p.createContext(r), a = n.length;
|
|
19159
|
+
n = [...n, r];
|
|
19160
|
+
let o = (t) => {
|
|
19161
|
+
let { scope: n, children: r, ...o } = t, s = n?.[e]?.[a] || i, c = p.useMemo(() => o, Object.values(o));
|
|
19162
|
+
return /* @__PURE__ */ D(s.Provider, {
|
|
19163
|
+
value: c,
|
|
19164
|
+
children: r
|
|
19165
|
+
});
|
|
19166
|
+
};
|
|
19167
|
+
o.displayName = t + "Provider";
|
|
19168
|
+
function s(n, o) {
|
|
19169
|
+
let s = o?.[e]?.[a] || i, c = p.useContext(s);
|
|
19170
|
+
if (c) return c;
|
|
19171
|
+
if (r !== void 0) return r;
|
|
19172
|
+
throw Error(`\`${n}\` must be used within \`${t}\``);
|
|
19173
|
+
}
|
|
19174
|
+
return [o, s];
|
|
19175
|
+
}
|
|
19176
|
+
let i = () => {
|
|
19177
|
+
let t = n.map((e) => p.createContext(e));
|
|
19178
|
+
return function(n) {
|
|
19179
|
+
let r = n?.[e] || t;
|
|
19180
|
+
return p.useMemo(() => ({ [`__scope${e}`]: {
|
|
19181
|
+
...n,
|
|
19182
|
+
[e]: r
|
|
19183
|
+
} }), [n, r]);
|
|
19184
|
+
};
|
|
19185
|
+
};
|
|
19186
|
+
return i.scopeName = e, [r, HS(i, ...t)];
|
|
19187
|
+
}
|
|
19188
|
+
function HS(...e) {
|
|
19189
|
+
let t = e[0];
|
|
19190
|
+
if (e.length === 1) return t;
|
|
19191
|
+
let n = () => {
|
|
19192
|
+
let n = e.map((e) => ({
|
|
19193
|
+
useScope: e(),
|
|
19194
|
+
scopeName: e.scopeName
|
|
19195
|
+
}));
|
|
19196
|
+
return function(e) {
|
|
19197
|
+
let r = n.reduce((t, { useScope: n, scopeName: r }) => {
|
|
19198
|
+
let i = n(e)[`__scope${r}`];
|
|
19199
|
+
return {
|
|
19200
|
+
...t,
|
|
19201
|
+
...i
|
|
19202
|
+
};
|
|
19203
|
+
}, {});
|
|
19204
|
+
return p.useMemo(() => ({ [`__scope${t.scopeName}`]: r }), [r]);
|
|
19205
|
+
};
|
|
19206
|
+
};
|
|
19207
|
+
return n.scopeName = t.scopeName, n;
|
|
19208
|
+
}
|
|
19209
|
+
//#endregion
|
|
19210
|
+
//#region node_modules/@radix-ui/react-collection/dist/index.mjs
|
|
19211
|
+
function US(e) {
|
|
19212
|
+
let t = e + "CollectionProvider", [n, r] = VS(t), [i, a] = n(t, {
|
|
19213
|
+
collectionRef: { current: null },
|
|
19214
|
+
itemMap: /* @__PURE__ */ new Map()
|
|
19215
|
+
}), o = (e) => {
|
|
19216
|
+
let { scope: t, children: n } = e, r = m.useRef(null), a = m.useRef(/* @__PURE__ */ new Map()).current;
|
|
19217
|
+
return /* @__PURE__ */ D(i, {
|
|
19218
|
+
scope: t,
|
|
19219
|
+
itemMap: a,
|
|
19220
|
+
collectionRef: r,
|
|
19221
|
+
children: n
|
|
19222
|
+
});
|
|
19223
|
+
};
|
|
19224
|
+
o.displayName = t;
|
|
19225
|
+
let s = e + "CollectionSlot", c = /* @__PURE__ */ PS(s), l = m.forwardRef((e, t) => {
|
|
19226
|
+
let { scope: n, children: r } = e;
|
|
19227
|
+
return /* @__PURE__ */ D(c, {
|
|
19228
|
+
ref: NS(t, a(s, n).collectionRef),
|
|
19229
|
+
children: r
|
|
19230
|
+
});
|
|
19231
|
+
});
|
|
19232
|
+
l.displayName = s;
|
|
19233
|
+
let u = e + "CollectionItemSlot", d = "data-radix-collection-item", f = /* @__PURE__ */ PS(u), p = m.forwardRef((e, t) => {
|
|
19234
|
+
let { scope: n, children: r, ...i } = e, o = m.useRef(null), s = NS(t, o), c = a(u, n);
|
|
19235
|
+
return m.useEffect(() => (c.itemMap.set(o, {
|
|
19236
|
+
ref: o,
|
|
19237
|
+
...i
|
|
19238
|
+
}), () => void c.itemMap.delete(o))), /* @__PURE__ */ D(f, {
|
|
19239
|
+
[d]: "",
|
|
19240
|
+
ref: s,
|
|
19241
|
+
children: r
|
|
19242
|
+
});
|
|
19243
|
+
});
|
|
19244
|
+
p.displayName = u;
|
|
19245
|
+
function h(t) {
|
|
19246
|
+
let n = a(e + "CollectionConsumer", t);
|
|
19247
|
+
return m.useCallback(() => {
|
|
19248
|
+
let e = n.collectionRef.current;
|
|
19249
|
+
if (!e) return [];
|
|
19250
|
+
let t = Array.from(e.querySelectorAll(`[${d}]`));
|
|
19251
|
+
return Array.from(n.itemMap.values()).sort((e, n) => t.indexOf(e.ref.current) - t.indexOf(n.ref.current));
|
|
19252
|
+
}, [n.collectionRef, n.itemMap]);
|
|
19253
|
+
}
|
|
19254
|
+
return [
|
|
19255
|
+
{
|
|
19256
|
+
Provider: o,
|
|
19257
|
+
Slot: l,
|
|
19258
|
+
ItemSlot: p
|
|
19259
|
+
},
|
|
19260
|
+
h,
|
|
19261
|
+
r
|
|
19262
|
+
];
|
|
19263
|
+
}
|
|
19264
|
+
typeof window < "u" && window.document && window.document.createElement;
|
|
19265
|
+
function WS(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
19266
|
+
return function(r) {
|
|
19267
|
+
if (e?.(r), n === !1 || !r.defaultPrevented) return t?.(r);
|
|
19268
|
+
};
|
|
19269
|
+
}
|
|
19270
|
+
//#endregion
|
|
19271
|
+
//#region node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
|
|
19272
|
+
var GS = globalThis?.document ? p.useLayoutEffect : () => {}, KS = p.useInsertionEffect || GS;
|
|
19273
|
+
function qS({ prop: e, defaultProp: t, onChange: n = () => {}, caller: r }) {
|
|
19274
|
+
let [i, a, o] = JS({
|
|
19275
|
+
defaultProp: t,
|
|
19276
|
+
onChange: n
|
|
19277
|
+
}), s = e !== void 0, c = s ? e : i;
|
|
19278
|
+
{
|
|
19279
|
+
let t = p.useRef(e !== void 0);
|
|
19280
|
+
p.useEffect(() => {
|
|
19281
|
+
let e = t.current;
|
|
19282
|
+
e !== s && console.warn(`${r} is changing from ${e ? "controlled" : "uncontrolled"} to ${s ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`), t.current = s;
|
|
19283
|
+
}, [s, r]);
|
|
19284
|
+
}
|
|
19285
|
+
return [c, p.useCallback((t) => {
|
|
19286
|
+
if (s) {
|
|
19287
|
+
let n = YS(t) ? t(e) : t;
|
|
19288
|
+
n !== e && o.current?.(n);
|
|
19289
|
+
} else a(t);
|
|
19290
|
+
}, [
|
|
19291
|
+
s,
|
|
19292
|
+
e,
|
|
19293
|
+
a,
|
|
19294
|
+
o
|
|
19295
|
+
])];
|
|
19296
|
+
}
|
|
19297
|
+
function JS({ defaultProp: e, onChange: t }) {
|
|
19298
|
+
let [n, r] = p.useState(e), i = p.useRef(n), a = p.useRef(t);
|
|
19299
|
+
return KS(() => {
|
|
19300
|
+
a.current = t;
|
|
19301
|
+
}, [t]), p.useEffect(() => {
|
|
19302
|
+
i.current !== n && (a.current?.(n), i.current = n);
|
|
19303
|
+
}, [n, i]), [
|
|
19304
|
+
n,
|
|
19305
|
+
r,
|
|
19306
|
+
a
|
|
19307
|
+
];
|
|
19308
|
+
}
|
|
19309
|
+
function YS(e) {
|
|
19310
|
+
return typeof e == "function";
|
|
19311
|
+
}
|
|
19312
|
+
//#endregion
|
|
19313
|
+
//#region node_modules/@radix-ui/react-direction/dist/index.mjs
|
|
19314
|
+
var XS = p.createContext(void 0);
|
|
19315
|
+
function ZS(e) {
|
|
19316
|
+
let t = p.useContext(XS);
|
|
19317
|
+
return e || t || "ltr";
|
|
19318
|
+
}
|
|
19319
|
+
//#endregion
|
|
19320
|
+
//#region node_modules/@radix-ui/react-use-previous/dist/index.mjs
|
|
19321
|
+
function QS(e) {
|
|
19322
|
+
let t = p.useRef({
|
|
19323
|
+
value: e,
|
|
19324
|
+
previous: e
|
|
19325
|
+
});
|
|
19326
|
+
return p.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
|
|
19327
|
+
}
|
|
19328
|
+
//#endregion
|
|
19329
|
+
//#region node_modules/@radix-ui/react-use-size/dist/index.mjs
|
|
19330
|
+
function $S(e) {
|
|
19331
|
+
let [t, n] = p.useState(void 0);
|
|
19332
|
+
return GS(() => {
|
|
19333
|
+
if (e) {
|
|
19334
|
+
n({
|
|
19335
|
+
width: e.offsetWidth,
|
|
19336
|
+
height: e.offsetHeight
|
|
19337
|
+
});
|
|
19338
|
+
let t = new ResizeObserver((t) => {
|
|
19339
|
+
if (!Array.isArray(t) || !t.length) return;
|
|
19340
|
+
let r = t[0], i, a;
|
|
19341
|
+
if ("borderBoxSize" in r) {
|
|
19342
|
+
let e = r.borderBoxSize, t = Array.isArray(e) ? e[0] : e;
|
|
19343
|
+
i = t.inlineSize, a = t.blockSize;
|
|
19344
|
+
} else i = e.offsetWidth, a = e.offsetHeight;
|
|
19345
|
+
n({
|
|
19346
|
+
width: i,
|
|
19347
|
+
height: a
|
|
19348
|
+
});
|
|
19349
|
+
});
|
|
19350
|
+
return t.observe(e, { box: "border-box" }), () => t.unobserve(e);
|
|
19351
|
+
} else n(void 0);
|
|
19352
|
+
}, [e]), t;
|
|
19353
|
+
}
|
|
19354
|
+
//#endregion
|
|
19355
|
+
//#region node_modules/@radix-ui/number/dist/index.mjs
|
|
19356
|
+
function eC(e, [t, n]) {
|
|
19357
|
+
return Math.min(n, Math.max(t, e));
|
|
19358
|
+
}
|
|
19359
|
+
//#endregion
|
|
19360
|
+
//#region node_modules/@radix-ui/react-slider/dist/index.mjs
|
|
19361
|
+
var tC = ["PageUp", "PageDown"], nC = [
|
|
19362
|
+
"ArrowUp",
|
|
19363
|
+
"ArrowDown",
|
|
19364
|
+
"ArrowLeft",
|
|
19365
|
+
"ArrowRight"
|
|
19366
|
+
], rC = {
|
|
19367
|
+
"from-left": [
|
|
19368
|
+
"Home",
|
|
19369
|
+
"PageDown",
|
|
19370
|
+
"ArrowDown",
|
|
19371
|
+
"ArrowLeft"
|
|
19372
|
+
],
|
|
19373
|
+
"from-right": [
|
|
19374
|
+
"Home",
|
|
19375
|
+
"PageDown",
|
|
19376
|
+
"ArrowDown",
|
|
19377
|
+
"ArrowRight"
|
|
19378
|
+
],
|
|
19379
|
+
"from-bottom": [
|
|
19380
|
+
"Home",
|
|
19381
|
+
"PageDown",
|
|
19382
|
+
"ArrowDown",
|
|
19383
|
+
"ArrowLeft"
|
|
19384
|
+
],
|
|
19385
|
+
"from-top": [
|
|
19386
|
+
"Home",
|
|
19387
|
+
"PageDown",
|
|
19388
|
+
"ArrowUp",
|
|
19389
|
+
"ArrowLeft"
|
|
19390
|
+
]
|
|
19391
|
+
}, iC = "Slider", [aC, oC, sC] = US(iC), [cC, lC] = VS(iC, [sC]), [uC, dC] = cC(iC), fC = p.forwardRef((e, t) => {
|
|
19392
|
+
let { name: n, min: r = 0, max: i = 100, step: a = 1, orientation: o = "horizontal", disabled: s = !1, minStepsBetweenThumbs: c = 0, defaultValue: l = [r], value: u, onValueChange: d = () => {}, onValueCommit: f = () => {}, inverted: m = !1, form: h, ...g } = e, _ = p.useRef(/* @__PURE__ */ new Set()), v = p.useRef(0), y = o === "horizontal" ? hC : gC, [b = [], x] = qS({
|
|
19393
|
+
prop: u,
|
|
19394
|
+
defaultProp: l,
|
|
19395
|
+
onChange: (e) => {
|
|
19396
|
+
[..._.current][v.current]?.focus(), d(e);
|
|
19397
|
+
}
|
|
19398
|
+
}), S = p.useRef(b);
|
|
19399
|
+
function C(e) {
|
|
19400
|
+
E(e, AC(b, e));
|
|
19401
|
+
}
|
|
19402
|
+
function w(e) {
|
|
19403
|
+
E(e, v.current);
|
|
19404
|
+
}
|
|
19405
|
+
function T() {
|
|
19406
|
+
let e = S.current[v.current];
|
|
19407
|
+
b[v.current] !== e && f(b);
|
|
19408
|
+
}
|
|
19409
|
+
function E(e, t, { commit: n } = { commit: !1 }) {
|
|
19410
|
+
let o = FC(a), s = eC(IC(Math.round((e - r) / a) * a + r, o), [r, i]);
|
|
19411
|
+
x((e = []) => {
|
|
19412
|
+
let r = DC(e, s, t);
|
|
19413
|
+
if (NC(r, c * a)) {
|
|
19414
|
+
v.current = r.indexOf(s);
|
|
19415
|
+
let t = String(r) !== String(e);
|
|
19416
|
+
return t && n && f(r), t ? r : e;
|
|
19417
|
+
} else return e;
|
|
19418
|
+
});
|
|
19419
|
+
}
|
|
19420
|
+
return /* @__PURE__ */ D(uC, {
|
|
19421
|
+
scope: e.__scopeSlider,
|
|
19422
|
+
name: n,
|
|
19423
|
+
disabled: s,
|
|
19424
|
+
min: r,
|
|
19425
|
+
max: i,
|
|
19426
|
+
valueIndexToChangeRef: v,
|
|
19427
|
+
thumbs: _.current,
|
|
19428
|
+
values: b,
|
|
19429
|
+
orientation: o,
|
|
19430
|
+
form: h,
|
|
19431
|
+
children: /* @__PURE__ */ D(aC.Provider, {
|
|
19432
|
+
scope: e.__scopeSlider,
|
|
19433
|
+
children: /* @__PURE__ */ D(aC.Slot, {
|
|
19434
|
+
scope: e.__scopeSlider,
|
|
19435
|
+
children: /* @__PURE__ */ D(y, {
|
|
19436
|
+
"aria-disabled": s,
|
|
19437
|
+
"data-disabled": s ? "" : void 0,
|
|
19438
|
+
...g,
|
|
19439
|
+
ref: t,
|
|
19440
|
+
onPointerDown: WS(g.onPointerDown, () => {
|
|
19441
|
+
s || (S.current = b);
|
|
19442
|
+
}),
|
|
19443
|
+
min: r,
|
|
19444
|
+
max: i,
|
|
19445
|
+
inverted: m,
|
|
19446
|
+
onSlideStart: s ? void 0 : C,
|
|
19447
|
+
onSlideMove: s ? void 0 : w,
|
|
19448
|
+
onSlideEnd: s ? void 0 : T,
|
|
19449
|
+
onHomeKeyDown: () => !s && E(r, 0, { commit: !0 }),
|
|
19450
|
+
onEndKeyDown: () => !s && E(i, b.length - 1, { commit: !0 }),
|
|
19451
|
+
onStepKeyDown: ({ event: e, direction: t }) => {
|
|
19452
|
+
if (!s) {
|
|
19453
|
+
let n = tC.includes(e.key) || e.shiftKey && nC.includes(e.key) ? 10 : 1, r = v.current, i = b[r];
|
|
19454
|
+
E(i + a * n * t, r, { commit: !0 });
|
|
19455
|
+
}
|
|
19456
|
+
}
|
|
19457
|
+
})
|
|
19458
|
+
})
|
|
19459
|
+
})
|
|
19460
|
+
});
|
|
19461
|
+
});
|
|
19462
|
+
fC.displayName = iC;
|
|
19463
|
+
var [pC, mC] = cC(iC, {
|
|
19464
|
+
startEdge: "left",
|
|
19465
|
+
endEdge: "right",
|
|
19466
|
+
size: "width",
|
|
19467
|
+
direction: 1
|
|
19468
|
+
}), hC = p.forwardRef((e, t) => {
|
|
19469
|
+
let { min: n, max: r, dir: i, inverted: a, onSlideStart: o, onSlideMove: s, onSlideEnd: c, onStepKeyDown: l, ...u } = e, [d, f] = p.useState(null), m = NS(t, (e) => f(e)), h = p.useRef(void 0), g = ZS(i), _ = g === "ltr", v = _ && !a || !_ && a;
|
|
19470
|
+
function y(e) {
|
|
19471
|
+
let t = h.current || d.getBoundingClientRect(), i = PC([0, t.width], v ? [n, r] : [r, n]);
|
|
19472
|
+
return h.current = t, i(e - t.left);
|
|
19473
|
+
}
|
|
19474
|
+
return /* @__PURE__ */ D(pC, {
|
|
19475
|
+
scope: e.__scopeSlider,
|
|
19476
|
+
startEdge: v ? "left" : "right",
|
|
19477
|
+
endEdge: v ? "right" : "left",
|
|
19478
|
+
direction: v ? 1 : -1,
|
|
19479
|
+
size: "width",
|
|
19480
|
+
children: /* @__PURE__ */ D(_C, {
|
|
19481
|
+
dir: g,
|
|
19482
|
+
"data-orientation": "horizontal",
|
|
19483
|
+
...u,
|
|
19484
|
+
ref: m,
|
|
19485
|
+
style: {
|
|
19486
|
+
...u.style,
|
|
19487
|
+
"--radix-slider-thumb-transform": "translateX(-50%)"
|
|
19488
|
+
},
|
|
19489
|
+
onSlideStart: (e) => {
|
|
19490
|
+
let t = y(e.clientX);
|
|
19491
|
+
o?.(t);
|
|
19492
|
+
},
|
|
19493
|
+
onSlideMove: (e) => {
|
|
19494
|
+
let t = y(e.clientX);
|
|
19495
|
+
s?.(t);
|
|
19496
|
+
},
|
|
19497
|
+
onSlideEnd: () => {
|
|
19498
|
+
h.current = void 0, c?.();
|
|
19499
|
+
},
|
|
19500
|
+
onStepKeyDown: (e) => {
|
|
19501
|
+
let t = rC[v ? "from-left" : "from-right"].includes(e.key);
|
|
19502
|
+
l?.({
|
|
19503
|
+
event: e,
|
|
19504
|
+
direction: t ? -1 : 1
|
|
19505
|
+
});
|
|
19506
|
+
}
|
|
19507
|
+
})
|
|
19508
|
+
});
|
|
19509
|
+
}), gC = p.forwardRef((e, t) => {
|
|
19510
|
+
let { min: n, max: r, inverted: i, onSlideStart: a, onSlideMove: o, onSlideEnd: s, onStepKeyDown: c, ...l } = e, u = p.useRef(null), d = NS(t, u), f = p.useRef(void 0), m = !i;
|
|
19511
|
+
function h(e) {
|
|
19512
|
+
let t = f.current || u.current.getBoundingClientRect(), i = PC([0, t.height], m ? [r, n] : [n, r]);
|
|
19513
|
+
return f.current = t, i(e - t.top);
|
|
19514
|
+
}
|
|
19515
|
+
return /* @__PURE__ */ D(pC, {
|
|
19516
|
+
scope: e.__scopeSlider,
|
|
19517
|
+
startEdge: m ? "bottom" : "top",
|
|
19518
|
+
endEdge: m ? "top" : "bottom",
|
|
19519
|
+
size: "height",
|
|
19520
|
+
direction: m ? 1 : -1,
|
|
19521
|
+
children: /* @__PURE__ */ D(_C, {
|
|
19522
|
+
"data-orientation": "vertical",
|
|
19523
|
+
...l,
|
|
19524
|
+
ref: d,
|
|
19525
|
+
style: {
|
|
19526
|
+
...l.style,
|
|
19527
|
+
"--radix-slider-thumb-transform": "translateY(50%)"
|
|
19528
|
+
},
|
|
19529
|
+
onSlideStart: (e) => {
|
|
19530
|
+
let t = h(e.clientY);
|
|
19531
|
+
a?.(t);
|
|
19532
|
+
},
|
|
19533
|
+
onSlideMove: (e) => {
|
|
19534
|
+
let t = h(e.clientY);
|
|
19535
|
+
o?.(t);
|
|
19536
|
+
},
|
|
19537
|
+
onSlideEnd: () => {
|
|
19538
|
+
f.current = void 0, s?.();
|
|
19539
|
+
},
|
|
19540
|
+
onStepKeyDown: (e) => {
|
|
19541
|
+
let t = rC[m ? "from-bottom" : "from-top"].includes(e.key);
|
|
19542
|
+
c?.({
|
|
19543
|
+
event: e,
|
|
19544
|
+
direction: t ? -1 : 1
|
|
19545
|
+
});
|
|
19546
|
+
}
|
|
19547
|
+
})
|
|
19548
|
+
});
|
|
19549
|
+
}), _C = p.forwardRef((e, t) => {
|
|
19550
|
+
let { __scopeSlider: n, onSlideStart: r, onSlideMove: i, onSlideEnd: a, onHomeKeyDown: o, onEndKeyDown: s, onStepKeyDown: c, ...l } = e, u = dC(iC, n);
|
|
19551
|
+
return /* @__PURE__ */ D(BS.span, {
|
|
19552
|
+
...l,
|
|
19553
|
+
ref: t,
|
|
19554
|
+
onKeyDown: WS(e.onKeyDown, (e) => {
|
|
19555
|
+
e.key === "Home" ? (o(e), e.preventDefault()) : e.key === "End" ? (s(e), e.preventDefault()) : tC.concat(nC).includes(e.key) && (c(e), e.preventDefault());
|
|
19556
|
+
}),
|
|
19557
|
+
onPointerDown: WS(e.onPointerDown, (e) => {
|
|
19558
|
+
let t = e.target;
|
|
19559
|
+
t.setPointerCapture(e.pointerId), e.preventDefault(), u.thumbs.has(t) ? t.focus() : r(e);
|
|
19560
|
+
}),
|
|
19561
|
+
onPointerMove: WS(e.onPointerMove, (e) => {
|
|
19562
|
+
e.target.hasPointerCapture(e.pointerId) && i(e);
|
|
19563
|
+
}),
|
|
19564
|
+
onPointerUp: WS(e.onPointerUp, (e) => {
|
|
19565
|
+
let t = e.target;
|
|
19566
|
+
t.hasPointerCapture(e.pointerId) && (t.releasePointerCapture(e.pointerId), a(e));
|
|
19567
|
+
})
|
|
19568
|
+
});
|
|
19569
|
+
}), vC = "SliderTrack", yC = p.forwardRef((e, t) => {
|
|
19570
|
+
let { __scopeSlider: n, ...r } = e, i = dC(vC, n);
|
|
19571
|
+
return /* @__PURE__ */ D(BS.span, {
|
|
19572
|
+
"data-disabled": i.disabled ? "" : void 0,
|
|
19573
|
+
"data-orientation": i.orientation,
|
|
19574
|
+
...r,
|
|
19575
|
+
ref: t
|
|
19576
|
+
});
|
|
19577
|
+
});
|
|
19578
|
+
yC.displayName = vC;
|
|
19579
|
+
var bC = "SliderRange", xC = p.forwardRef((e, t) => {
|
|
19580
|
+
let { __scopeSlider: n, ...r } = e, i = dC(bC, n), a = mC(bC, n), o = NS(t, p.useRef(null)), s = i.values.length, c = i.values.map((e) => OC(e, i.min, i.max)), l = s > 1 ? Math.min(...c) : 0, u = 100 - Math.max(...c);
|
|
19581
|
+
return /* @__PURE__ */ D(BS.span, {
|
|
19582
|
+
"data-orientation": i.orientation,
|
|
19583
|
+
"data-disabled": i.disabled ? "" : void 0,
|
|
19584
|
+
...r,
|
|
19585
|
+
ref: o,
|
|
19586
|
+
style: {
|
|
19587
|
+
...e.style,
|
|
19588
|
+
[a.startEdge]: l + "%",
|
|
19589
|
+
[a.endEdge]: u + "%"
|
|
19590
|
+
}
|
|
19591
|
+
});
|
|
19592
|
+
});
|
|
19593
|
+
xC.displayName = bC;
|
|
19594
|
+
var SC = "SliderThumb", CC = p.forwardRef((e, t) => {
|
|
19595
|
+
let n = oC(e.__scopeSlider), [r, i] = p.useState(null), a = NS(t, (e) => i(e)), o = p.useMemo(() => r ? n().findIndex((e) => e.ref.current === r) : -1, [n, r]);
|
|
19596
|
+
return /* @__PURE__ */ D(wC, {
|
|
19597
|
+
...e,
|
|
19598
|
+
ref: a,
|
|
19599
|
+
index: o
|
|
19600
|
+
});
|
|
19601
|
+
}), wC = p.forwardRef((e, t) => {
|
|
19602
|
+
let { __scopeSlider: n, index: r, name: i, ...a } = e, o = dC(SC, n), s = mC(SC, n), [c, l] = p.useState(null), u = NS(t, (e) => l(e)), d = c ? o.form || !!c.closest("form") : !0, f = $S(c), m = o.values[r], h = m === void 0 ? 0 : OC(m, o.min, o.max), g = kC(r, o.values.length), _ = f?.[s.size], v = _ ? jC(_, h, s.direction) : 0;
|
|
19603
|
+
return p.useEffect(() => {
|
|
19604
|
+
if (c) return o.thumbs.add(c), () => {
|
|
19605
|
+
o.thumbs.delete(c);
|
|
19606
|
+
};
|
|
19607
|
+
}, [c, o.thumbs]), /* @__PURE__ */ O("span", {
|
|
19608
|
+
style: {
|
|
19609
|
+
transform: "var(--radix-slider-thumb-transform)",
|
|
19610
|
+
position: "absolute",
|
|
19611
|
+
[s.startEdge]: `calc(${h}% + ${v}px)`
|
|
19612
|
+
},
|
|
19613
|
+
children: [/* @__PURE__ */ D(aC.ItemSlot, {
|
|
19614
|
+
scope: e.__scopeSlider,
|
|
19615
|
+
children: /* @__PURE__ */ D(BS.span, {
|
|
19616
|
+
role: "slider",
|
|
19617
|
+
"aria-label": e["aria-label"] || g,
|
|
19618
|
+
"aria-valuemin": o.min,
|
|
19619
|
+
"aria-valuenow": m,
|
|
19620
|
+
"aria-valuemax": o.max,
|
|
19621
|
+
"aria-orientation": o.orientation,
|
|
19622
|
+
"data-orientation": o.orientation,
|
|
19623
|
+
"data-disabled": o.disabled ? "" : void 0,
|
|
19624
|
+
tabIndex: o.disabled ? void 0 : 0,
|
|
19625
|
+
...a,
|
|
19626
|
+
ref: u,
|
|
19627
|
+
style: m === void 0 ? { display: "none" } : e.style,
|
|
19628
|
+
onFocus: WS(e.onFocus, () => {
|
|
19629
|
+
o.valueIndexToChangeRef.current = r;
|
|
19630
|
+
})
|
|
19631
|
+
})
|
|
19632
|
+
}), d && /* @__PURE__ */ D(EC, {
|
|
19633
|
+
name: i ?? (o.name ? o.name + (o.values.length > 1 ? "[]" : "") : void 0),
|
|
19634
|
+
form: o.form,
|
|
19635
|
+
value: m
|
|
19636
|
+
}, r)]
|
|
19637
|
+
});
|
|
19638
|
+
});
|
|
19639
|
+
CC.displayName = SC;
|
|
19640
|
+
var TC = "RadioBubbleInput", EC = p.forwardRef(({ __scopeSlider: e, value: t, ...n }, r) => {
|
|
19641
|
+
let i = p.useRef(null), a = NS(i, r), o = QS(t);
|
|
19642
|
+
return p.useEffect(() => {
|
|
19643
|
+
let e = i.current;
|
|
19644
|
+
if (!e) return;
|
|
19645
|
+
let n = window.HTMLInputElement.prototype, r = Object.getOwnPropertyDescriptor(n, "value").set;
|
|
19646
|
+
if (o !== t && r) {
|
|
19647
|
+
let n = new Event("input", { bubbles: !0 });
|
|
19648
|
+
r.call(e, t), e.dispatchEvent(n);
|
|
19649
|
+
}
|
|
19650
|
+
}, [o, t]), /* @__PURE__ */ D(BS.input, {
|
|
19651
|
+
style: { display: "none" },
|
|
19652
|
+
...n,
|
|
19653
|
+
ref: a,
|
|
19654
|
+
defaultValue: t
|
|
19655
|
+
});
|
|
19656
|
+
});
|
|
19657
|
+
EC.displayName = TC;
|
|
19658
|
+
function DC(e = [], t, n) {
|
|
19659
|
+
let r = [...e];
|
|
19660
|
+
return r[n] = t, r.sort((e, t) => e - t);
|
|
19661
|
+
}
|
|
19662
|
+
function OC(e, t, n) {
|
|
19663
|
+
return eC(100 / (n - t) * (e - t), [0, 100]);
|
|
19664
|
+
}
|
|
19665
|
+
function kC(e, t) {
|
|
19666
|
+
if (t > 2) return `Value ${e + 1} of ${t}`;
|
|
19667
|
+
if (t === 2) return ["Minimum", "Maximum"][e];
|
|
19668
|
+
}
|
|
19669
|
+
function AC(e, t) {
|
|
19670
|
+
if (e.length === 1) return 0;
|
|
19671
|
+
let n = e.map((e) => Math.abs(e - t)), r = Math.min(...n);
|
|
19672
|
+
return n.indexOf(r);
|
|
19673
|
+
}
|
|
19674
|
+
function jC(e, t, n) {
|
|
19675
|
+
let r = e / 2;
|
|
19676
|
+
return (r - PC([0, 50], [0, r])(t) * n) * n;
|
|
19677
|
+
}
|
|
19678
|
+
function MC(e) {
|
|
19679
|
+
return e.slice(0, -1).map((t, n) => e[n + 1] - t);
|
|
19680
|
+
}
|
|
19681
|
+
function NC(e, t) {
|
|
19682
|
+
if (t > 0) {
|
|
19683
|
+
let n = MC(e);
|
|
19684
|
+
return Math.min(...n) >= t;
|
|
19685
|
+
}
|
|
19686
|
+
return !0;
|
|
19687
|
+
}
|
|
19688
|
+
function PC(e, t) {
|
|
19689
|
+
return (n) => {
|
|
19690
|
+
if (e[0] === e[1] || t[0] === t[1]) return t[0];
|
|
19691
|
+
let r = (t[1] - t[0]) / (e[1] - e[0]);
|
|
19692
|
+
return t[0] + r * (n - e[0]);
|
|
19693
|
+
};
|
|
19694
|
+
}
|
|
19695
|
+
function FC(e) {
|
|
19696
|
+
return (String(e).split(".")[1] || "").length;
|
|
19697
|
+
}
|
|
19698
|
+
function IC(e, t) {
|
|
19699
|
+
let n = 10 ** t;
|
|
19700
|
+
return Math.round(e * n) / n;
|
|
19701
|
+
}
|
|
19702
|
+
var LC = fC, RC = yC, zC = xC, BC = CC;
|
|
19703
|
+
//#endregion
|
|
19704
|
+
//#region src/components/Slider/slider.tsx
|
|
19705
|
+
function VC({ className: e, defaultValue: t, value: n, min: r = 0, max: i = 100, ...a }) {
|
|
19706
|
+
let o = p.useMemo(() => Array.isArray(n) ? n : Array.isArray(t) ? t : [r, i], [
|
|
19707
|
+
n,
|
|
19708
|
+
t,
|
|
19709
|
+
r,
|
|
19710
|
+
i
|
|
19711
|
+
]);
|
|
19712
|
+
return /* @__PURE__ */ O(LC, {
|
|
19713
|
+
"data-slot": "slider",
|
|
19714
|
+
defaultValue: t,
|
|
19715
|
+
value: n,
|
|
19716
|
+
min: r,
|
|
19717
|
+
max: i,
|
|
19718
|
+
className: W("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col", e),
|
|
19719
|
+
...a,
|
|
19720
|
+
children: [/* @__PURE__ */ D(RC, {
|
|
19721
|
+
"data-slot": "slider-track",
|
|
19722
|
+
className: W("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),
|
|
19723
|
+
children: /* @__PURE__ */ D(zC, {
|
|
19724
|
+
"data-slot": "slider-range",
|
|
19725
|
+
className: W("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")
|
|
19726
|
+
})
|
|
19727
|
+
}), Array.from({ length: o.length }, (e, t) => /* @__PURE__ */ D(BC, {
|
|
19728
|
+
"data-slot": "slider-thumb",
|
|
19729
|
+
className: "border-primary ring-ring/50 block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"
|
|
19730
|
+
}, t))]
|
|
19731
|
+
});
|
|
19732
|
+
}
|
|
19733
|
+
//#endregion
|
|
19039
19734
|
//#region node_modules/@base-ui/react/esm/switch/root/SwitchRootContext.js
|
|
19040
|
-
var
|
|
19041
|
-
process.env.NODE_ENV !== "production" && (
|
|
19042
|
-
function
|
|
19043
|
-
let e = p.useContext(
|
|
19735
|
+
var HC = /* @__PURE__ */ p.createContext(void 0);
|
|
19736
|
+
process.env.NODE_ENV !== "production" && (HC.displayName = "SwitchRootContext");
|
|
19737
|
+
function UC() {
|
|
19738
|
+
let e = p.useContext(HC);
|
|
19044
19739
|
if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? ue(63) : "Base UI: SwitchRootContext is missing. Switch parts must be placed within <Switch.Root>.");
|
|
19045
19740
|
return e;
|
|
19046
19741
|
}
|
|
19047
19742
|
//#endregion
|
|
19048
19743
|
//#region node_modules/@base-ui/react/esm/switch/root/SwitchRootDataAttributes.js
|
|
19049
|
-
var
|
|
19744
|
+
var WC = /* @__PURE__ */ function(e) {
|
|
19050
19745
|
return e.checked = "data-checked", e.unchecked = "data-unchecked", e.disabled = "data-disabled", e.readonly = "data-readonly", e.required = "data-required", e.valid = "data-valid", e.invalid = "data-invalid", e.touched = "data-touched", e.dirty = "data-dirty", e.filled = "data-filled", e.focused = "data-focused", e;
|
|
19051
|
-
}({}),
|
|
19746
|
+
}({}), GC = {
|
|
19052
19747
|
...js,
|
|
19053
19748
|
checked(e) {
|
|
19054
|
-
return e ? { [
|
|
19749
|
+
return e ? { [WC.checked]: "" } : { [WC.unchecked]: "" };
|
|
19055
19750
|
}
|
|
19056
19751
|
};
|
|
19057
19752
|
//#endregion
|
|
19058
19753
|
//#region node_modules/@base-ui/react/esm/internals/labelable-provider/useLabelableId.js
|
|
19059
|
-
function
|
|
19754
|
+
function KC(e = {}) {
|
|
19060
19755
|
let { id: t, implicit: n = !1, controlRef: r } = e, { controlId: i, registerControlId: a } = Ks(), o = Ls(t), s = n ? i : void 0, c = fe(() => Symbol("labelable-control")), l = p.useRef(!1), u = p.useRef(t != null), d = K(() => {
|
|
19061
19756
|
!l.current || a === we || (l.current = !1, a(c.current, void 0));
|
|
19062
19757
|
});
|
|
@@ -19090,8 +19785,8 @@ function FS(e = {}) {
|
|
|
19090
19785
|
}
|
|
19091
19786
|
//#endregion
|
|
19092
19787
|
//#region node_modules/@base-ui/react/esm/switch/root/SwitchRoot.js
|
|
19093
|
-
var
|
|
19094
|
-
let { checked: n, className: r, defaultChecked: i, "aria-labelledby": a, form: o, id: s, inputRef: c, name: l, nativeButton: u = !1, onCheckedChange: d, readOnly: f = !1, required: m = !1, disabled: h = !1, render: g, uncheckedValue: _, value: v, style: y, ...b } = e, { clearErrors: x } = Ws(), { state: S, setTouched: C, setDirty: w, validityData: T, setFilled: E, setFocused: k, shouldValidateOnChange: A, validationMode: j, disabled: M, name: N, validation: P } = zs(), { labelId: F } = Ks(), ee = M || h, te = N ?? l, ne = K(d), re = p.useRef(null), L = pe(re, c, P.inputRef), ie = p.useRef(null), R = Ls(), ae =
|
|
19788
|
+
var qC = /* @__PURE__ */ p.forwardRef(function(e, t) {
|
|
19789
|
+
let { checked: n, className: r, defaultChecked: i, "aria-labelledby": a, form: o, id: s, inputRef: c, name: l, nativeButton: u = !1, onCheckedChange: d, readOnly: f = !1, required: m = !1, disabled: h = !1, render: g, uncheckedValue: _, value: v, style: y, ...b } = e, { clearErrors: x } = Ws(), { state: S, setTouched: C, setDirty: w, validityData: T, setFilled: E, setFocused: k, shouldValidateOnChange: A, validationMode: j, disabled: M, name: N, validation: P } = zs(), { labelId: F } = Ks(), ee = M || h, te = N ?? l, ne = K(d), re = p.useRef(null), L = pe(re, c, P.inputRef), ie = p.useRef(null), R = Ls(), ae = KC({
|
|
19095
19790
|
id: s,
|
|
19096
19791
|
implicit: !1,
|
|
19097
19792
|
controlRef: ie
|
|
@@ -19197,9 +19892,9 @@ var IS = /* @__PURE__ */ p.forwardRef(function(e, t) {
|
|
|
19197
19892
|
b,
|
|
19198
19893
|
se
|
|
19199
19894
|
],
|
|
19200
|
-
stateAttributesMapping:
|
|
19895
|
+
stateAttributesMapping: GC
|
|
19201
19896
|
});
|
|
19202
|
-
return /* @__PURE__ */ O(
|
|
19897
|
+
return /* @__PURE__ */ O(HC.Provider, {
|
|
19203
19898
|
value: fe,
|
|
19204
19899
|
children: [
|
|
19205
19900
|
me,
|
|
@@ -19216,30 +19911,30 @@ var IS = /* @__PURE__ */ p.forwardRef(function(e, t) {
|
|
|
19216
19911
|
]
|
|
19217
19912
|
});
|
|
19218
19913
|
});
|
|
19219
|
-
process.env.NODE_ENV !== "production" && (
|
|
19914
|
+
process.env.NODE_ENV !== "production" && (qC.displayName = "SwitchRoot");
|
|
19220
19915
|
//#endregion
|
|
19221
19916
|
//#region node_modules/@base-ui/react/esm/switch/thumb/SwitchThumb.js
|
|
19222
|
-
var
|
|
19223
|
-
let { render: n, className: r, style: i, ...a } = e, { state: o } = zs(), s =
|
|
19917
|
+
var JC = /* @__PURE__ */ p.forwardRef(function(e, t) {
|
|
19918
|
+
let { render: n, className: r, style: i, ...a } = e, { state: o } = zs(), s = UC();
|
|
19224
19919
|
return ke("span", e, {
|
|
19225
19920
|
state: {
|
|
19226
19921
|
...o,
|
|
19227
19922
|
...s
|
|
19228
19923
|
},
|
|
19229
19924
|
ref: t,
|
|
19230
|
-
stateAttributesMapping:
|
|
19925
|
+
stateAttributesMapping: GC,
|
|
19231
19926
|
props: a
|
|
19232
19927
|
});
|
|
19233
19928
|
});
|
|
19234
|
-
process.env.NODE_ENV !== "production" && (
|
|
19929
|
+
process.env.NODE_ENV !== "production" && (JC.displayName = "SwitchThumb");
|
|
19235
19930
|
//#endregion
|
|
19236
19931
|
//#region src/components/Switch/switch.tsx
|
|
19237
|
-
function
|
|
19238
|
-
return /* @__PURE__ */ D(
|
|
19932
|
+
function YC({ className: e, ...t }) {
|
|
19933
|
+
return /* @__PURE__ */ D(qC, {
|
|
19239
19934
|
"data-slot": "switch",
|
|
19240
19935
|
className: W("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-xs transition-all outline-none", "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", "disabled:cursor-not-allowed disabled:opacity-50", "data-unchecked:bg-input dark:data-unchecked:bg-input/80", "data-checked:bg-primary", "aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40", e),
|
|
19241
19936
|
...t,
|
|
19242
|
-
children: /* @__PURE__ */ D(
|
|
19937
|
+
children: /* @__PURE__ */ D(JC, {
|
|
19243
19938
|
"data-slot": "switch-thumb",
|
|
19244
19939
|
className: W("bg-background pointer-events-none block size-4 rounded-full shadow-sm ring-0 transition-transform", "data-unchecked:translate-x-0", "data-checked:translate-x-4")
|
|
19245
19940
|
})
|
|
@@ -19247,7 +19942,7 @@ function RS({ className: e, ...t }) {
|
|
|
19247
19942
|
}
|
|
19248
19943
|
//#endregion
|
|
19249
19944
|
//#region src/components/Table/CheckFilter.tsx
|
|
19250
|
-
var
|
|
19945
|
+
var XC = ({ label: e, value: t, onChange: n, className: r }) => /* @__PURE__ */ O(ar, {
|
|
19251
19946
|
render: /* @__PURE__ */ D("span", {}),
|
|
19252
19947
|
variant: "outline",
|
|
19253
19948
|
className: W("cursor-pointer", r),
|
|
@@ -19262,24 +19957,24 @@ var zS = ({ label: e, value: t, onChange: n, className: r }) => /* @__PURE__ */
|
|
|
19262
19957
|
});
|
|
19263
19958
|
//#endregion
|
|
19264
19959
|
//#region node_modules/@tanstack/table-core/build/lib/index.mjs
|
|
19265
|
-
function
|
|
19960
|
+
function ZC(e, t) {
|
|
19266
19961
|
return typeof e == "function" ? e(t) : e;
|
|
19267
19962
|
}
|
|
19268
|
-
function
|
|
19963
|
+
function QC(e, t) {
|
|
19269
19964
|
return (n) => {
|
|
19270
19965
|
t.setState((t) => ({
|
|
19271
19966
|
...t,
|
|
19272
|
-
[e]:
|
|
19967
|
+
[e]: ZC(n, t[e])
|
|
19273
19968
|
}));
|
|
19274
19969
|
};
|
|
19275
19970
|
}
|
|
19276
|
-
function
|
|
19971
|
+
function $C(e) {
|
|
19277
19972
|
return e instanceof Function;
|
|
19278
19973
|
}
|
|
19279
|
-
function
|
|
19974
|
+
function ew(e) {
|
|
19280
19975
|
return Array.isArray(e) && e.every((e) => typeof e == "number");
|
|
19281
19976
|
}
|
|
19282
|
-
function
|
|
19977
|
+
function tw(e, t) {
|
|
19283
19978
|
let n = [], r = (e) => {
|
|
19284
19979
|
e.forEach((e) => {
|
|
19285
19980
|
n.push(e);
|
|
@@ -19318,7 +20013,7 @@ function $(e, t, n, r) {
|
|
|
19318
20013
|
onChange: r
|
|
19319
20014
|
};
|
|
19320
20015
|
}
|
|
19321
|
-
function
|
|
20016
|
+
function nw(e, t, n, r) {
|
|
19322
20017
|
let i = {
|
|
19323
20018
|
id: `${t.id}_${n.id}`,
|
|
19324
20019
|
row: t,
|
|
@@ -19343,7 +20038,7 @@ function GS(e, t, n, r) {
|
|
|
19343
20038
|
r.createCell == null || r.createCell(i, n, t, e);
|
|
19344
20039
|
}, {}), i;
|
|
19345
20040
|
}
|
|
19346
|
-
function
|
|
20041
|
+
function rw(e, t, n, r) {
|
|
19347
20042
|
let i = {
|
|
19348
20043
|
...e._getDefaultColumnDef(),
|
|
19349
20044
|
...t
|
|
@@ -19369,8 +20064,8 @@ function KS(e, t, n, r) {
|
|
|
19369
20064
|
for (let t of e._features) t.createColumn == null || t.createColumn(c, e);
|
|
19370
20065
|
return c;
|
|
19371
20066
|
}
|
|
19372
|
-
var
|
|
19373
|
-
function
|
|
20067
|
+
var iw = "debugHeaders";
|
|
20068
|
+
function aw(e, t, n) {
|
|
19374
20069
|
let r = {
|
|
19375
20070
|
id: n.id ?? t.id,
|
|
19376
20071
|
column: t,
|
|
@@ -19398,7 +20093,7 @@ function JS(e, t, n) {
|
|
|
19398
20093
|
t.createHeader == null || t.createHeader(r, e);
|
|
19399
20094
|
}), r;
|
|
19400
20095
|
}
|
|
19401
|
-
var
|
|
20096
|
+
var ow = { createTable: (e) => {
|
|
19402
20097
|
e.getHeaderGroups = Q(() => [
|
|
19403
20098
|
e.getAllColumns(),
|
|
19404
20099
|
e.getVisibleLeafColumns(),
|
|
@@ -19406,34 +20101,34 @@ var YS = { createTable: (e) => {
|
|
|
19406
20101
|
e.getState().columnPinning.right
|
|
19407
20102
|
], (t, n, r, i) => {
|
|
19408
20103
|
let a = r?.map((e) => n.find((t) => t.id === e)).filter(Boolean) ?? [], o = i?.map((e) => n.find((t) => t.id === e)).filter(Boolean) ?? [], s = n.filter((e) => !(r != null && r.includes(e.id)) && !(i != null && i.includes(e.id)));
|
|
19409
|
-
return
|
|
20104
|
+
return sw(t, [
|
|
19410
20105
|
...a,
|
|
19411
20106
|
...s,
|
|
19412
20107
|
...o
|
|
19413
20108
|
], e);
|
|
19414
|
-
}, $(e.options,
|
|
20109
|
+
}, $(e.options, iw, "getHeaderGroups")), e.getCenterHeaderGroups = Q(() => [
|
|
19415
20110
|
e.getAllColumns(),
|
|
19416
20111
|
e.getVisibleLeafColumns(),
|
|
19417
20112
|
e.getState().columnPinning.left,
|
|
19418
20113
|
e.getState().columnPinning.right
|
|
19419
|
-
], (t, n, r, i) => (n = n.filter((e) => !(r != null && r.includes(e.id)) && !(i != null && i.includes(e.id))),
|
|
20114
|
+
], (t, n, r, i) => (n = n.filter((e) => !(r != null && r.includes(e.id)) && !(i != null && i.includes(e.id))), sw(t, n, e, "center")), $(e.options, iw, "getCenterHeaderGroups")), e.getLeftHeaderGroups = Q(() => [
|
|
19420
20115
|
e.getAllColumns(),
|
|
19421
20116
|
e.getVisibleLeafColumns(),
|
|
19422
20117
|
e.getState().columnPinning.left
|
|
19423
|
-
], (t, n, r) =>
|
|
20118
|
+
], (t, n, r) => sw(t, r?.map((e) => n.find((t) => t.id === e)).filter(Boolean) ?? [], e, "left"), $(e.options, iw, "getLeftHeaderGroups")), e.getRightHeaderGroups = Q(() => [
|
|
19424
20119
|
e.getAllColumns(),
|
|
19425
20120
|
e.getVisibleLeafColumns(),
|
|
19426
20121
|
e.getState().columnPinning.right
|
|
19427
|
-
], (t, n, r) =>
|
|
20122
|
+
], (t, n, r) => sw(t, r?.map((e) => n.find((t) => t.id === e)).filter(Boolean) ?? [], e, "right"), $(e.options, iw, "getRightHeaderGroups")), e.getFooterGroups = Q(() => [e.getHeaderGroups()], (e) => [...e].reverse(), $(e.options, iw, "getFooterGroups")), e.getLeftFooterGroups = Q(() => [e.getLeftHeaderGroups()], (e) => [...e].reverse(), $(e.options, iw, "getLeftFooterGroups")), e.getCenterFooterGroups = Q(() => [e.getCenterHeaderGroups()], (e) => [...e].reverse(), $(e.options, iw, "getCenterFooterGroups")), e.getRightFooterGroups = Q(() => [e.getRightHeaderGroups()], (e) => [...e].reverse(), $(e.options, iw, "getRightFooterGroups")), e.getFlatHeaders = Q(() => [e.getHeaderGroups()], (e) => e.map((e) => e.headers).flat(), $(e.options, iw, "getFlatHeaders")), e.getLeftFlatHeaders = Q(() => [e.getLeftHeaderGroups()], (e) => e.map((e) => e.headers).flat(), $(e.options, iw, "getLeftFlatHeaders")), e.getCenterFlatHeaders = Q(() => [e.getCenterHeaderGroups()], (e) => e.map((e) => e.headers).flat(), $(e.options, iw, "getCenterFlatHeaders")), e.getRightFlatHeaders = Q(() => [e.getRightHeaderGroups()], (e) => e.map((e) => e.headers).flat(), $(e.options, iw, "getRightFlatHeaders")), e.getCenterLeafHeaders = Q(() => [e.getCenterFlatHeaders()], (e) => e.filter((e) => {
|
|
19428
20123
|
var t;
|
|
19429
20124
|
return !((t = e.subHeaders) != null && t.length);
|
|
19430
|
-
}), $(e.options,
|
|
20125
|
+
}), $(e.options, iw, "getCenterLeafHeaders")), e.getLeftLeafHeaders = Q(() => [e.getLeftFlatHeaders()], (e) => e.filter((e) => {
|
|
19431
20126
|
var t;
|
|
19432
20127
|
return !((t = e.subHeaders) != null && t.length);
|
|
19433
|
-
}), $(e.options,
|
|
20128
|
+
}), $(e.options, iw, "getLeftLeafHeaders")), e.getRightLeafHeaders = Q(() => [e.getRightFlatHeaders()], (e) => e.filter((e) => {
|
|
19434
20129
|
var t;
|
|
19435
20130
|
return !((t = e.subHeaders) != null && t.length);
|
|
19436
|
-
}), $(e.options,
|
|
20131
|
+
}), $(e.options, iw, "getRightLeafHeaders")), e.getLeafHeaders = Q(() => [
|
|
19437
20132
|
e.getLeftHeaderGroups(),
|
|
19438
20133
|
e.getCenterHeaderGroups(),
|
|
19439
20134
|
e.getRightHeaderGroups()
|
|
@@ -19441,9 +20136,9 @@ var YS = { createTable: (e) => {
|
|
|
19441
20136
|
...e[0]?.headers ?? [],
|
|
19442
20137
|
...t[0]?.headers ?? [],
|
|
19443
20138
|
...n[0]?.headers ?? []
|
|
19444
|
-
].map((e) => e.getLeafHeaders()).flat(), $(e.options,
|
|
20139
|
+
].map((e) => e.getLeafHeaders()).flat(), $(e.options, iw, "getLeafHeaders"));
|
|
19445
20140
|
} };
|
|
19446
|
-
function
|
|
20141
|
+
function sw(e, t, n, r) {
|
|
19447
20142
|
let i = 0, a = function(e, t) {
|
|
19448
20143
|
t === void 0 && (t = 1), i = Math.max(i, t), e.filter((e) => e.getIsVisible()).forEach((e) => {
|
|
19449
20144
|
var n;
|
|
@@ -19461,7 +20156,7 @@ function XS(e, t, n, r) {
|
|
|
19461
20156
|
let o = [...a].reverse()[0], s = e.column.depth === i.depth, c, l = !1;
|
|
19462
20157
|
if (s && e.column.parent ? c = e.column.parent : (c = e.column, l = !0), o && o?.column === c) o.subHeaders.push(e);
|
|
19463
20158
|
else {
|
|
19464
|
-
let i =
|
|
20159
|
+
let i = aw(n, c, {
|
|
19465
20160
|
id: [
|
|
19466
20161
|
r,
|
|
19467
20162
|
t,
|
|
@@ -19478,7 +20173,7 @@ function XS(e, t, n, r) {
|
|
|
19478
20173
|
i.headers.push(e), e.headerGroup = i;
|
|
19479
20174
|
}), o.push(i), t > 0 && s(a, t - 1);
|
|
19480
20175
|
};
|
|
19481
|
-
s(t.map((e, t) =>
|
|
20176
|
+
s(t.map((e, t) => aw(n, e, {
|
|
19482
20177
|
depth: i,
|
|
19483
20178
|
index: t
|
|
19484
20179
|
})), i - 1), o.reverse();
|
|
@@ -19496,7 +20191,7 @@ function XS(e, t, n, r) {
|
|
|
19496
20191
|
});
|
|
19497
20192
|
return c(o[0]?.headers ?? []), o;
|
|
19498
20193
|
}
|
|
19499
|
-
var
|
|
20194
|
+
var cw = (e, t, n, r, i, a, o) => {
|
|
19500
20195
|
let s = {
|
|
19501
20196
|
id: t,
|
|
19502
20197
|
index: r,
|
|
@@ -19517,7 +20212,7 @@ var ZS = (e, t, n, r, i, a, o) => {
|
|
|
19517
20212
|
},
|
|
19518
20213
|
renderValue: (t) => s.getValue(t) ?? e.options.renderFallbackValue,
|
|
19519
20214
|
subRows: a ?? [],
|
|
19520
|
-
getLeafRows: () =>
|
|
20215
|
+
getLeafRows: () => tw(s.subRows, (e) => e.subRows),
|
|
19521
20216
|
getParentRow: () => s.parentId ? e.getRow(s.parentId, !0) : void 0,
|
|
19522
20217
|
getParentRows: () => {
|
|
19523
20218
|
let e = [], t = s;
|
|
@@ -19528,7 +20223,7 @@ var ZS = (e, t, n, r, i, a, o) => {
|
|
|
19528
20223
|
}
|
|
19529
20224
|
return e.reverse();
|
|
19530
20225
|
},
|
|
19531
|
-
getAllCells: Q(() => [e.getAllLeafColumns()], (t) => t.map((t) =>
|
|
20226
|
+
getAllCells: Q(() => [e.getAllLeafColumns()], (t) => t.map((t) => nw(e, s, t, t.id)), $(e.options, "debugRows", "getAllCells")),
|
|
19532
20227
|
_getAllCellsByColumnId: Q(() => [s.getAllCells()], (e) => e.reduce((e, t) => (e[t.column.id] = t, e), {}), $(e.options, "debugRows", "getAllCellsByColumnId"))
|
|
19533
20228
|
};
|
|
19534
20229
|
for (let t = 0; t < e._features.length; t++) {
|
|
@@ -19536,87 +20231,87 @@ var ZS = (e, t, n, r, i, a, o) => {
|
|
|
19536
20231
|
n == null || n.createRow == null || n.createRow(s, e);
|
|
19537
20232
|
}
|
|
19538
20233
|
return s;
|
|
19539
|
-
},
|
|
20234
|
+
}, lw = { createColumn: (e, t) => {
|
|
19540
20235
|
e._getFacetedRowModel = t.options.getFacetedRowModel && t.options.getFacetedRowModel(t, e.id), e.getFacetedRowModel = () => e._getFacetedRowModel ? e._getFacetedRowModel() : t.getPreFilteredRowModel(), e._getFacetedUniqueValues = t.options.getFacetedUniqueValues && t.options.getFacetedUniqueValues(t, e.id), e.getFacetedUniqueValues = () => e._getFacetedUniqueValues ? e._getFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getFacetedMinMaxValues = t.options.getFacetedMinMaxValues && t.options.getFacetedMinMaxValues(t, e.id), e.getFacetedMinMaxValues = () => {
|
|
19541
20236
|
if (e._getFacetedMinMaxValues) return e._getFacetedMinMaxValues();
|
|
19542
20237
|
};
|
|
19543
|
-
} },
|
|
20238
|
+
} }, uw = (e, t, n) => {
|
|
19544
20239
|
var r, i;
|
|
19545
20240
|
let a = n == null || (r = n.toString()) == null ? void 0 : r.toLowerCase();
|
|
19546
20241
|
return !!(!((i = e.getValue(t)) == null || (i = i.toString()) == null || (i = i.toLowerCase()) == null) && i.includes(a));
|
|
19547
20242
|
};
|
|
19548
|
-
|
|
19549
|
-
var
|
|
20243
|
+
uw.autoRemove = (e) => bw(e);
|
|
20244
|
+
var dw = (e, t, n) => {
|
|
19550
20245
|
var r;
|
|
19551
20246
|
return !!(!((r = e.getValue(t)) == null || (r = r.toString()) == null) && r.includes(n));
|
|
19552
20247
|
};
|
|
19553
|
-
|
|
19554
|
-
var
|
|
20248
|
+
dw.autoRemove = (e) => bw(e);
|
|
20249
|
+
var fw = (e, t, n) => {
|
|
19555
20250
|
var r;
|
|
19556
20251
|
return ((r = e.getValue(t)) == null || (r = r.toString()) == null ? void 0 : r.toLowerCase()) === n?.toLowerCase();
|
|
19557
20252
|
};
|
|
19558
|
-
|
|
19559
|
-
var
|
|
19560
|
-
|
|
19561
|
-
var
|
|
20253
|
+
fw.autoRemove = (e) => bw(e);
|
|
20254
|
+
var pw = (e, t, n) => e.getValue(t)?.includes(n);
|
|
20255
|
+
pw.autoRemove = (e) => bw(e);
|
|
20256
|
+
var mw = (e, t, n) => !n.some((n) => {
|
|
19562
20257
|
var r;
|
|
19563
20258
|
return !((r = e.getValue(t)) != null && r.includes(n));
|
|
19564
20259
|
});
|
|
19565
|
-
|
|
19566
|
-
var
|
|
19567
|
-
|
|
19568
|
-
var
|
|
19569
|
-
|
|
19570
|
-
var
|
|
19571
|
-
|
|
19572
|
-
var
|
|
20260
|
+
mw.autoRemove = (e) => bw(e) || !(e != null && e.length);
|
|
20261
|
+
var hw = (e, t, n) => n.some((n) => e.getValue(t)?.includes(n));
|
|
20262
|
+
hw.autoRemove = (e) => bw(e) || !(e != null && e.length);
|
|
20263
|
+
var gw = (e, t, n) => e.getValue(t) === n;
|
|
20264
|
+
gw.autoRemove = (e) => bw(e);
|
|
20265
|
+
var _w = (e, t, n) => e.getValue(t) == n;
|
|
20266
|
+
_w.autoRemove = (e) => bw(e);
|
|
20267
|
+
var vw = (e, t, n) => {
|
|
19573
20268
|
let [r, i] = n, a = e.getValue(t);
|
|
19574
20269
|
return a >= r && a <= i;
|
|
19575
20270
|
};
|
|
19576
|
-
|
|
20271
|
+
vw.resolveFilterValue = (e) => {
|
|
19577
20272
|
let [t, n] = e, r = typeof t == "number" ? t : parseFloat(t), i = typeof n == "number" ? n : parseFloat(n), a = t === null || Number.isNaN(r) ? -Infinity : r, o = n === null || Number.isNaN(i) ? Infinity : i;
|
|
19578
20273
|
if (a > o) {
|
|
19579
20274
|
let e = a;
|
|
19580
20275
|
a = o, o = e;
|
|
19581
20276
|
}
|
|
19582
20277
|
return [a, o];
|
|
19583
|
-
},
|
|
19584
|
-
var
|
|
19585
|
-
includesString:
|
|
19586
|
-
includesStringSensitive:
|
|
19587
|
-
equalsString:
|
|
19588
|
-
arrIncludes:
|
|
19589
|
-
arrIncludesAll:
|
|
19590
|
-
arrIncludesSome:
|
|
19591
|
-
equals:
|
|
19592
|
-
weakEquals:
|
|
19593
|
-
inNumberRange:
|
|
20278
|
+
}, vw.autoRemove = (e) => bw(e) || bw(e[0]) && bw(e[1]);
|
|
20279
|
+
var yw = {
|
|
20280
|
+
includesString: uw,
|
|
20281
|
+
includesStringSensitive: dw,
|
|
20282
|
+
equalsString: fw,
|
|
20283
|
+
arrIncludes: pw,
|
|
20284
|
+
arrIncludesAll: mw,
|
|
20285
|
+
arrIncludesSome: hw,
|
|
20286
|
+
equals: gw,
|
|
20287
|
+
weakEquals: _w,
|
|
20288
|
+
inNumberRange: vw
|
|
19594
20289
|
};
|
|
19595
|
-
function
|
|
20290
|
+
function bw(e) {
|
|
19596
20291
|
return e == null || e === "";
|
|
19597
20292
|
}
|
|
19598
|
-
var
|
|
20293
|
+
var xw = {
|
|
19599
20294
|
getDefaultColumnDef: () => ({ filterFn: "auto" }),
|
|
19600
20295
|
getInitialState: (e) => ({
|
|
19601
20296
|
columnFilters: [],
|
|
19602
20297
|
...e
|
|
19603
20298
|
}),
|
|
19604
20299
|
getDefaultOptions: (e) => ({
|
|
19605
|
-
onColumnFiltersChange:
|
|
20300
|
+
onColumnFiltersChange: QC("columnFilters", e),
|
|
19606
20301
|
filterFromLeafRows: !1,
|
|
19607
20302
|
maxLeafRowFilterDepth: 100
|
|
19608
20303
|
}),
|
|
19609
20304
|
createColumn: (e, t) => {
|
|
19610
20305
|
e.getAutoFilterFn = () => {
|
|
19611
20306
|
let n = t.getCoreRowModel().flatRows[0]?.getValue(e.id);
|
|
19612
|
-
return typeof n == "string" ?
|
|
19613
|
-
}, e.getFilterFn = () =>
|
|
20307
|
+
return typeof n == "string" ? yw.includesString : typeof n == "number" ? yw.inNumberRange : typeof n == "boolean" || typeof n == "object" && n ? yw.equals : Array.isArray(n) ? yw.arrIncludes : yw.weakEquals;
|
|
20308
|
+
}, e.getFilterFn = () => $C(e.columnDef.filterFn) ? e.columnDef.filterFn : e.columnDef.filterFn === "auto" ? e.getAutoFilterFn() : t.options.filterFns?.[e.columnDef.filterFn] ?? yw[e.columnDef.filterFn], e.getCanFilter = () => (e.columnDef.enableColumnFilter ?? !0) && (t.options.enableColumnFilters ?? !0) && (t.options.enableFilters ?? !0) && !!e.accessorFn, e.getIsFiltered = () => e.getFilterIndex() > -1, e.getFilterValue = () => {
|
|
19614
20309
|
var n;
|
|
19615
20310
|
return (n = t.getState().columnFilters) == null || (n = n.find((t) => t.id === e.id)) == null ? void 0 : n.value;
|
|
19616
20311
|
}, e.getFilterIndex = () => t.getState().columnFilters?.findIndex((t) => t.id === e.id) ?? -1, e.setFilterValue = (n) => {
|
|
19617
20312
|
t.setColumnFilters((t) => {
|
|
19618
|
-
let r = e.getFilterFn(), i = t?.find((t) => t.id === e.id), a =
|
|
19619
|
-
if (
|
|
20313
|
+
let r = e.getFilterFn(), i = t?.find((t) => t.id === e.id), a = ZC(n, i ? i.value : void 0);
|
|
20314
|
+
if (Sw(r, a, e)) return t?.filter((t) => t.id !== e.id) ?? [];
|
|
19620
20315
|
let o = {
|
|
19621
20316
|
id: e.id,
|
|
19622
20317
|
value: a
|
|
@@ -19631,19 +20326,19 @@ var uC = {
|
|
|
19631
20326
|
createTable: (e) => {
|
|
19632
20327
|
e.setColumnFilters = (t) => {
|
|
19633
20328
|
let n = e.getAllLeafColumns();
|
|
19634
|
-
e.options.onColumnFiltersChange == null || e.options.onColumnFiltersChange((e) =>
|
|
20329
|
+
e.options.onColumnFiltersChange == null || e.options.onColumnFiltersChange((e) => ZC(t, e)?.filter((e) => {
|
|
19635
20330
|
let t = n.find((t) => t.id === e.id);
|
|
19636
|
-
return !(t &&
|
|
20331
|
+
return !(t && Sw(t.getFilterFn(), e.value, t));
|
|
19637
20332
|
}));
|
|
19638
20333
|
}, e.resetColumnFilters = (t) => {
|
|
19639
20334
|
e.setColumnFilters(t ? [] : e.initialState?.columnFilters ?? []);
|
|
19640
20335
|
}, e.getPreFilteredRowModel = () => e.getCoreRowModel(), e.getFilteredRowModel = () => (!e._getFilteredRowModel && e.options.getFilteredRowModel && (e._getFilteredRowModel = e.options.getFilteredRowModel(e)), e.options.manualFiltering || !e._getFilteredRowModel ? e.getPreFilteredRowModel() : e._getFilteredRowModel());
|
|
19641
20336
|
}
|
|
19642
20337
|
};
|
|
19643
|
-
function
|
|
20338
|
+
function Sw(e, t, n) {
|
|
19644
20339
|
return (e && e.autoRemove ? e.autoRemove(t, n) : !1) || t === void 0 || typeof t == "string" && !t;
|
|
19645
20340
|
}
|
|
19646
|
-
var
|
|
20341
|
+
var Cw = {
|
|
19647
20342
|
sum: (e, t, n) => n.reduce((t, n) => {
|
|
19648
20343
|
let r = n.getValue(e);
|
|
19649
20344
|
return t + (typeof r == "number" ? r : 0);
|
|
@@ -19679,7 +20374,7 @@ var fC = {
|
|
|
19679
20374
|
median: (e, t) => {
|
|
19680
20375
|
if (!t.length) return;
|
|
19681
20376
|
let n = t.map((t) => t.getValue(e));
|
|
19682
|
-
if (!
|
|
20377
|
+
if (!ew(n)) return;
|
|
19683
20378
|
if (n.length === 1) return n[0];
|
|
19684
20379
|
let r = Math.floor(n.length / 2), i = n.sort((e, t) => e - t);
|
|
19685
20380
|
return n.length % 2 == 0 ? (i[r - 1] + i[r]) / 2 : i[r];
|
|
@@ -19687,7 +20382,7 @@ var fC = {
|
|
|
19687
20382
|
unique: (e, t) => Array.from(new Set(t.map((t) => t.getValue(e))).values()),
|
|
19688
20383
|
uniqueCount: (e, t) => new Set(t.map((t) => t.getValue(e))).size,
|
|
19689
20384
|
count: (e, t) => t.length
|
|
19690
|
-
},
|
|
20385
|
+
}, ww = {
|
|
19691
20386
|
getDefaultColumnDef: () => ({
|
|
19692
20387
|
aggregatedCell: (e) => {
|
|
19693
20388
|
var t;
|
|
@@ -19700,7 +20395,7 @@ var fC = {
|
|
|
19700
20395
|
...e
|
|
19701
20396
|
}),
|
|
19702
20397
|
getDefaultOptions: (e) => ({
|
|
19703
|
-
onGroupingChange:
|
|
20398
|
+
onGroupingChange: QC("grouping", e),
|
|
19704
20399
|
groupedColumnMode: "reorder"
|
|
19705
20400
|
}),
|
|
19706
20401
|
createColumn: (e, t) => {
|
|
@@ -19713,11 +20408,11 @@ var fC = {
|
|
|
19713
20408
|
};
|
|
19714
20409
|
}, e.getAutoAggregationFn = () => {
|
|
19715
20410
|
let n = t.getCoreRowModel().flatRows[0]?.getValue(e.id);
|
|
19716
|
-
if (typeof n == "number") return
|
|
19717
|
-
if (Object.prototype.toString.call(n) === "[object Date]") return
|
|
20411
|
+
if (typeof n == "number") return Cw.sum;
|
|
20412
|
+
if (Object.prototype.toString.call(n) === "[object Date]") return Cw.extent;
|
|
19718
20413
|
}, e.getAggregationFn = () => {
|
|
19719
20414
|
if (!e) throw Error();
|
|
19720
|
-
return
|
|
20415
|
+
return $C(e.columnDef.aggregationFn) ? e.columnDef.aggregationFn : e.columnDef.aggregationFn === "auto" ? e.getAutoAggregationFn() : t.options.aggregationFns?.[e.columnDef.aggregationFn] ?? Cw[e.columnDef.aggregationFn];
|
|
19721
20416
|
};
|
|
19722
20417
|
},
|
|
19723
20418
|
createTable: (e) => {
|
|
@@ -19739,20 +20434,20 @@ var fC = {
|
|
|
19739
20434
|
};
|
|
19740
20435
|
}
|
|
19741
20436
|
};
|
|
19742
|
-
function
|
|
20437
|
+
function Tw(e, t, n) {
|
|
19743
20438
|
if (!(t != null && t.length) || !n) return e;
|
|
19744
20439
|
let r = e.filter((e) => !t.includes(e.id));
|
|
19745
20440
|
return n === "remove" ? r : [...t.map((t) => e.find((e) => e.id === t)).filter(Boolean), ...r];
|
|
19746
20441
|
}
|
|
19747
|
-
var
|
|
20442
|
+
var Ew = {
|
|
19748
20443
|
getInitialState: (e) => ({
|
|
19749
20444
|
columnOrder: [],
|
|
19750
20445
|
...e
|
|
19751
20446
|
}),
|
|
19752
|
-
getDefaultOptions: (e) => ({ onColumnOrderChange:
|
|
20447
|
+
getDefaultOptions: (e) => ({ onColumnOrderChange: QC("columnOrder", e) }),
|
|
19753
20448
|
createColumn: (e, t) => {
|
|
19754
|
-
e.getIndex = Q((e) => [
|
|
19755
|
-
let r =
|
|
20449
|
+
e.getIndex = Q((e) => [Lw(t, e)], (t) => t.findIndex((t) => t.id === e.id), $(t.options, "debugColumns", "getIndex")), e.getIsFirstColumn = (n) => Lw(t, n)[0]?.id === e.id, e.getIsLastColumn = (n) => {
|
|
20450
|
+
let r = Lw(t, n);
|
|
19756
20451
|
return r[r.length - 1]?.id === e.id;
|
|
19757
20452
|
};
|
|
19758
20453
|
},
|
|
@@ -19774,18 +20469,18 @@ var hC = {
|
|
|
19774
20469
|
}
|
|
19775
20470
|
i = [...i, ...n];
|
|
19776
20471
|
}
|
|
19777
|
-
return
|
|
20472
|
+
return Tw(i, t, n);
|
|
19778
20473
|
}, $(e.options, "debugTable", "_getOrderColumnsFn"));
|
|
19779
20474
|
}
|
|
19780
|
-
},
|
|
20475
|
+
}, Dw = () => ({
|
|
19781
20476
|
left: [],
|
|
19782
20477
|
right: []
|
|
19783
|
-
}),
|
|
20478
|
+
}), Ow = {
|
|
19784
20479
|
getInitialState: (e) => ({
|
|
19785
|
-
columnPinning:
|
|
20480
|
+
columnPinning: Dw(),
|
|
19786
20481
|
...e
|
|
19787
20482
|
}),
|
|
19788
|
-
getDefaultOptions: (e) => ({ onColumnPinningChange:
|
|
20483
|
+
getDefaultOptions: (e) => ({ onColumnPinningChange: QC("columnPinning", e) }),
|
|
19789
20484
|
createColumn: (e, t) => {
|
|
19790
20485
|
e.pin = (n) => {
|
|
19791
20486
|
let r = e.getLeafColumns().map((e) => e.id).filter(Boolean);
|
|
@@ -19825,7 +20520,7 @@ var hC = {
|
|
|
19825
20520
|
})), $(t.options, "debugRows", "getRightVisibleCells"));
|
|
19826
20521
|
},
|
|
19827
20522
|
createTable: (e) => {
|
|
19828
|
-
e.setColumnPinning = (t) => e.options.onColumnPinningChange == null ? void 0 : e.options.onColumnPinningChange(t), e.resetColumnPinning = (t) => e.setColumnPinning(t ?
|
|
20523
|
+
e.setColumnPinning = (t) => e.options.onColumnPinningChange == null ? void 0 : e.options.onColumnPinningChange(t), e.resetColumnPinning = (t) => e.setColumnPinning(t ? Dw() : e.initialState?.columnPinning ?? Dw()), e.getIsSomeColumnsPinned = (t) => {
|
|
19829
20524
|
let n = e.getState().columnPinning;
|
|
19830
20525
|
return t ? !!n[t]?.length : !!(n.left?.length || n.right?.length);
|
|
19831
20526
|
}, e.getLeftLeafColumns = Q(() => [e.getAllLeafColumns(), e.getState().columnPinning.left], (e, t) => (t ?? []).map((t) => e.find((e) => e.id === t)).filter(Boolean), $(e.options, "debugColumns", "getLeftLeafColumns")), e.getRightLeafColumns = Q(() => [e.getAllLeafColumns(), e.getState().columnPinning.right], (e, t) => (t ?? []).map((t) => e.find((e) => e.id === t)).filter(Boolean), $(e.options, "debugColumns", "getRightLeafColumns")), e.getCenterLeafColumns = Q(() => [
|
|
@@ -19838,44 +20533,44 @@ var hC = {
|
|
|
19838
20533
|
}, $(e.options, "debugColumns", "getCenterLeafColumns"));
|
|
19839
20534
|
}
|
|
19840
20535
|
};
|
|
19841
|
-
function
|
|
20536
|
+
function kw(e) {
|
|
19842
20537
|
return e || (typeof document < "u" ? document : null);
|
|
19843
20538
|
}
|
|
19844
|
-
var
|
|
20539
|
+
var Aw = {
|
|
19845
20540
|
size: 150,
|
|
19846
20541
|
minSize: 20,
|
|
19847
20542
|
maxSize: 2 ** 53 - 1
|
|
19848
|
-
},
|
|
20543
|
+
}, jw = () => ({
|
|
19849
20544
|
startOffset: null,
|
|
19850
20545
|
startSize: null,
|
|
19851
20546
|
deltaOffset: null,
|
|
19852
20547
|
deltaPercentage: null,
|
|
19853
20548
|
isResizingColumn: !1,
|
|
19854
20549
|
columnSizingStart: []
|
|
19855
|
-
}),
|
|
19856
|
-
getDefaultColumnDef: () =>
|
|
20550
|
+
}), Mw = {
|
|
20551
|
+
getDefaultColumnDef: () => Aw,
|
|
19857
20552
|
getInitialState: (e) => ({
|
|
19858
20553
|
columnSizing: {},
|
|
19859
|
-
columnSizingInfo:
|
|
20554
|
+
columnSizingInfo: jw(),
|
|
19860
20555
|
...e
|
|
19861
20556
|
}),
|
|
19862
20557
|
getDefaultOptions: (e) => ({
|
|
19863
20558
|
columnResizeMode: "onEnd",
|
|
19864
20559
|
columnResizeDirection: "ltr",
|
|
19865
|
-
onColumnSizingChange:
|
|
19866
|
-
onColumnSizingInfoChange:
|
|
20560
|
+
onColumnSizingChange: QC("columnSizing", e),
|
|
20561
|
+
onColumnSizingInfoChange: QC("columnSizingInfo", e)
|
|
19867
20562
|
}),
|
|
19868
20563
|
createColumn: (e, t) => {
|
|
19869
20564
|
e.getSize = () => {
|
|
19870
20565
|
let n = t.getState().columnSizing[e.id];
|
|
19871
|
-
return Math.min(Math.max(e.columnDef.minSize ??
|
|
20566
|
+
return Math.min(Math.max(e.columnDef.minSize ?? Aw.minSize, n ?? e.columnDef.size ?? Aw.size), e.columnDef.maxSize ?? Aw.maxSize);
|
|
19872
20567
|
}, e.getStart = Q((e) => [
|
|
19873
20568
|
e,
|
|
19874
|
-
|
|
20569
|
+
Lw(t, e),
|
|
19875
20570
|
t.getState().columnSizing
|
|
19876
20571
|
], (t, n) => n.slice(0, e.getIndex(t)).reduce((e, t) => e + t.getSize(), 0), $(t.options, "debugColumns", "getStart")), e.getAfter = Q((e) => [
|
|
19877
20572
|
e,
|
|
19878
|
-
|
|
20573
|
+
Lw(t, e),
|
|
19879
20574
|
t.getState().columnSizing
|
|
19880
20575
|
], (t, n) => n.slice(e.getIndex(t) + 1).reduce((e, t) => e + t.getSize(), 0), $(t.options, "debugColumns", "getAfter")), e.resetSize = () => {
|
|
19881
20576
|
t.setColumnSizing((t) => {
|
|
@@ -19899,8 +20594,8 @@ var yC = {
|
|
|
19899
20594
|
}, e.getResizeHandler = (n) => {
|
|
19900
20595
|
let r = t.getColumn(e.column.id), i = r?.getCanResize();
|
|
19901
20596
|
return (a) => {
|
|
19902
|
-
if (!r || !i || (a.persist == null || a.persist(),
|
|
19903
|
-
let o = e.getSize(), s = e ? e.getLeafHeaders().map((e) => [e.column.id, e.column.getSize()]) : [[r.id, r.getSize()]], c =
|
|
20597
|
+
if (!r || !i || (a.persist == null || a.persist(), Fw(a) && a.touches && a.touches.length > 1)) return;
|
|
20598
|
+
let o = e.getSize(), s = e ? e.getLeafHeaders().map((e) => [e.column.id, e.column.getSize()]) : [[r.id, r.getSize()]], c = Fw(a) ? Math.round(a.touches[0].clientX) : a.clientX, l = {}, u = (e, n) => {
|
|
19904
20599
|
typeof n == "number" && (t.setColumnSizingInfo((e) => {
|
|
19905
20600
|
let r = t.options.columnResizeDirection === "rtl" ? -1 : 1, i = (n - (e?.startOffset ?? 0)) * r, a = Math.max(i / (e?.startSize ?? 0), -.999999);
|
|
19906
20601
|
return e.columnSizingStart.forEach((e) => {
|
|
@@ -19925,7 +20620,7 @@ var yC = {
|
|
|
19925
20620
|
deltaPercentage: null,
|
|
19926
20621
|
columnSizingStart: []
|
|
19927
20622
|
}));
|
|
19928
|
-
}, p =
|
|
20623
|
+
}, p = kw(n), m = {
|
|
19929
20624
|
moveHandler: (e) => d(e.clientX),
|
|
19930
20625
|
upHandler: (e) => {
|
|
19931
20626
|
p?.removeEventListener("mousemove", m.moveHandler), p?.removeEventListener("mouseup", m.upHandler), f(e.clientX);
|
|
@@ -19935,8 +20630,8 @@ var yC = {
|
|
|
19935
20630
|
upHandler: (e) => {
|
|
19936
20631
|
p?.removeEventListener("touchmove", h.moveHandler), p?.removeEventListener("touchend", h.upHandler), e.cancelable && (e.preventDefault(), e.stopPropagation()), f(e.touches[0]?.clientX);
|
|
19937
20632
|
}
|
|
19938
|
-
}, g =
|
|
19939
|
-
|
|
20633
|
+
}, g = Pw() ? { passive: !1 } : !1;
|
|
20634
|
+
Fw(a) ? (p?.addEventListener("touchmove", h.moveHandler, g), p?.addEventListener("touchend", h.upHandler, g)) : (p?.addEventListener("mousemove", m.moveHandler, g), p?.addEventListener("mouseup", m.upHandler, g)), t.setColumnSizingInfo((e) => ({
|
|
19940
20635
|
...e,
|
|
19941
20636
|
startOffset: c,
|
|
19942
20637
|
startSize: o,
|
|
@@ -19952,12 +20647,12 @@ var yC = {
|
|
|
19952
20647
|
e.setColumnSizing = (t) => e.options.onColumnSizingChange == null ? void 0 : e.options.onColumnSizingChange(t), e.setColumnSizingInfo = (t) => e.options.onColumnSizingInfoChange == null ? void 0 : e.options.onColumnSizingInfoChange(t), e.resetColumnSizing = (t) => {
|
|
19953
20648
|
e.setColumnSizing(t ? {} : e.initialState.columnSizing ?? {});
|
|
19954
20649
|
}, e.resetHeaderSizeInfo = (t) => {
|
|
19955
|
-
e.setColumnSizingInfo(t ?
|
|
20650
|
+
e.setColumnSizingInfo(t ? jw() : e.initialState.columnSizingInfo ?? jw());
|
|
19956
20651
|
}, e.getTotalSize = () => e.getHeaderGroups()[0]?.headers.reduce((e, t) => e + t.getSize(), 0) ?? 0, e.getLeftTotalSize = () => e.getLeftHeaderGroups()[0]?.headers.reduce((e, t) => e + t.getSize(), 0) ?? 0, e.getCenterTotalSize = () => e.getCenterHeaderGroups()[0]?.headers.reduce((e, t) => e + t.getSize(), 0) ?? 0, e.getRightTotalSize = () => e.getRightHeaderGroups()[0]?.headers.reduce((e, t) => e + t.getSize(), 0) ?? 0;
|
|
19957
20652
|
}
|
|
19958
|
-
},
|
|
19959
|
-
function
|
|
19960
|
-
if (typeof
|
|
20653
|
+
}, Nw = null;
|
|
20654
|
+
function Pw() {
|
|
20655
|
+
if (typeof Nw == "boolean") return Nw;
|
|
19961
20656
|
let e = !1;
|
|
19962
20657
|
try {
|
|
19963
20658
|
let t = { get passive() {
|
|
@@ -19967,17 +20662,17 @@ function CC() {
|
|
|
19967
20662
|
} catch {
|
|
19968
20663
|
e = !1;
|
|
19969
20664
|
}
|
|
19970
|
-
return
|
|
20665
|
+
return Nw = e, Nw;
|
|
19971
20666
|
}
|
|
19972
|
-
function
|
|
20667
|
+
function Fw(e) {
|
|
19973
20668
|
return e.type === "touchstart";
|
|
19974
20669
|
}
|
|
19975
|
-
var
|
|
20670
|
+
var Iw = {
|
|
19976
20671
|
getInitialState: (e) => ({
|
|
19977
20672
|
columnVisibility: {},
|
|
19978
20673
|
...e
|
|
19979
20674
|
}),
|
|
19980
|
-
getDefaultOptions: (e) => ({ onColumnVisibilityChange:
|
|
20675
|
+
getDefaultOptions: (e) => ({ onColumnVisibilityChange: QC("columnVisibility", e) }),
|
|
19981
20676
|
createColumn: (e, t) => {
|
|
19982
20677
|
e.toggleVisibility = (n) => {
|
|
19983
20678
|
e.getCanHide() && t.setColumnVisibility((t) => ({
|
|
@@ -20016,20 +20711,20 @@ var TC = {
|
|
|
20016
20711
|
};
|
|
20017
20712
|
}
|
|
20018
20713
|
};
|
|
20019
|
-
function
|
|
20714
|
+
function Lw(e, t) {
|
|
20020
20715
|
return t ? t === "center" ? e.getCenterVisibleLeafColumns() : t === "left" ? e.getLeftVisibleLeafColumns() : e.getRightVisibleLeafColumns() : e.getVisibleLeafColumns();
|
|
20021
20716
|
}
|
|
20022
|
-
var
|
|
20717
|
+
var Rw = { createTable: (e) => {
|
|
20023
20718
|
e._getGlobalFacetedRowModel = e.options.getFacetedRowModel && e.options.getFacetedRowModel(e, "__global__"), e.getGlobalFacetedRowModel = () => e.options.manualFiltering || !e._getGlobalFacetedRowModel ? e.getPreFilteredRowModel() : e._getGlobalFacetedRowModel(), e._getGlobalFacetedUniqueValues = e.options.getFacetedUniqueValues && e.options.getFacetedUniqueValues(e, "__global__"), e.getGlobalFacetedUniqueValues = () => e._getGlobalFacetedUniqueValues ? e._getGlobalFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getGlobalFacetedMinMaxValues = e.options.getFacetedMinMaxValues && e.options.getFacetedMinMaxValues(e, "__global__"), e.getGlobalFacetedMinMaxValues = () => {
|
|
20024
20719
|
if (e._getGlobalFacetedMinMaxValues) return e._getGlobalFacetedMinMaxValues();
|
|
20025
20720
|
};
|
|
20026
|
-
} },
|
|
20721
|
+
} }, zw = {
|
|
20027
20722
|
getInitialState: (e) => ({
|
|
20028
20723
|
globalFilter: void 0,
|
|
20029
20724
|
...e
|
|
20030
20725
|
}),
|
|
20031
20726
|
getDefaultOptions: (e) => ({
|
|
20032
|
-
onGlobalFilterChange:
|
|
20727
|
+
onGlobalFilterChange: QC("globalFilter", e),
|
|
20033
20728
|
globalFilterFn: "auto",
|
|
20034
20729
|
getColumnCanGlobalFilter: (t) => {
|
|
20035
20730
|
var n;
|
|
@@ -20041,22 +20736,22 @@ var DC = { createTable: (e) => {
|
|
|
20041
20736
|
e.getCanGlobalFilter = () => (e.columnDef.enableGlobalFilter ?? !0) && (t.options.enableGlobalFilter ?? !0) && (t.options.enableFilters ?? !0) && ((t.options.getColumnCanGlobalFilter == null ? void 0 : t.options.getColumnCanGlobalFilter(e)) ?? !0) && !!e.accessorFn;
|
|
20042
20737
|
},
|
|
20043
20738
|
createTable: (e) => {
|
|
20044
|
-
e.getGlobalAutoFilterFn = () =>
|
|
20739
|
+
e.getGlobalAutoFilterFn = () => yw.includesString, e.getGlobalFilterFn = () => {
|
|
20045
20740
|
let { globalFilterFn: t } = e.options;
|
|
20046
|
-
return
|
|
20741
|
+
return $C(t) ? t : t === "auto" ? e.getGlobalAutoFilterFn() : e.options.filterFns?.[t] ?? yw[t];
|
|
20047
20742
|
}, e.setGlobalFilter = (t) => {
|
|
20048
20743
|
e.options.onGlobalFilterChange == null || e.options.onGlobalFilterChange(t);
|
|
20049
20744
|
}, e.resetGlobalFilter = (t) => {
|
|
20050
20745
|
e.setGlobalFilter(t ? void 0 : e.initialState.globalFilter);
|
|
20051
20746
|
};
|
|
20052
20747
|
}
|
|
20053
|
-
},
|
|
20748
|
+
}, Bw = {
|
|
20054
20749
|
getInitialState: (e) => ({
|
|
20055
20750
|
expanded: {},
|
|
20056
20751
|
...e
|
|
20057
20752
|
}),
|
|
20058
20753
|
getDefaultOptions: (e) => ({
|
|
20059
|
-
onExpandedChange:
|
|
20754
|
+
onExpandedChange: QC("expanded", e),
|
|
20060
20755
|
paginateExpandedRows: !0
|
|
20061
20756
|
}),
|
|
20062
20757
|
createTable: (e) => {
|
|
@@ -20127,18 +20822,18 @@ var DC = { createTable: (e) => {
|
|
|
20127
20822
|
};
|
|
20128
20823
|
};
|
|
20129
20824
|
}
|
|
20130
|
-
},
|
|
20131
|
-
pageIndex:
|
|
20132
|
-
pageSize:
|
|
20133
|
-
}),
|
|
20825
|
+
}, Vw = 0, Hw = 10, Uw = () => ({
|
|
20826
|
+
pageIndex: Vw,
|
|
20827
|
+
pageSize: Hw
|
|
20828
|
+
}), Ww = {
|
|
20134
20829
|
getInitialState: (e) => ({
|
|
20135
20830
|
...e,
|
|
20136
20831
|
pagination: {
|
|
20137
|
-
...
|
|
20832
|
+
...Uw(),
|
|
20138
20833
|
...e?.pagination
|
|
20139
20834
|
}
|
|
20140
20835
|
}),
|
|
20141
|
-
getDefaultOptions: (e) => ({ onPaginationChange:
|
|
20836
|
+
getDefaultOptions: (e) => ({ onPaginationChange: QC("pagination", e) }),
|
|
20142
20837
|
createTable: (e) => {
|
|
20143
20838
|
let t = !1, n = !1;
|
|
20144
20839
|
e._autoResetPageIndex = () => {
|
|
@@ -20154,11 +20849,11 @@ var DC = { createTable: (e) => {
|
|
|
20154
20849
|
e.resetPageIndex(), n = !1;
|
|
20155
20850
|
});
|
|
20156
20851
|
}
|
|
20157
|
-
}, e.setPagination = (t) => e.options.onPaginationChange == null ? void 0 : e.options.onPaginationChange((e) =>
|
|
20158
|
-
e.setPagination(t ?
|
|
20852
|
+
}, e.setPagination = (t) => e.options.onPaginationChange == null ? void 0 : e.options.onPaginationChange((e) => ZC(t, e)), e.resetPagination = (t) => {
|
|
20853
|
+
e.setPagination(t ? Uw() : e.initialState.pagination ?? Uw());
|
|
20159
20854
|
}, e.setPageIndex = (t) => {
|
|
20160
20855
|
e.setPagination((n) => {
|
|
20161
|
-
let r =
|
|
20856
|
+
let r = ZC(t, n.pageIndex), i = e.options.pageCount === void 0 || e.options.pageCount === -1 ? 2 ** 53 - 1 : e.options.pageCount - 1;
|
|
20162
20857
|
return r = Math.max(0, Math.min(r, i)), {
|
|
20163
20858
|
...n,
|
|
20164
20859
|
pageIndex: r
|
|
@@ -20166,13 +20861,13 @@ var DC = { createTable: (e) => {
|
|
|
20166
20861
|
});
|
|
20167
20862
|
}, e.resetPageIndex = (t) => {
|
|
20168
20863
|
var n;
|
|
20169
|
-
e.setPageIndex(t ?
|
|
20864
|
+
e.setPageIndex(t ? Vw : ((n = e.initialState) == null || (n = n.pagination) == null ? void 0 : n.pageIndex) ?? Vw);
|
|
20170
20865
|
}, e.resetPageSize = (t) => {
|
|
20171
20866
|
var n;
|
|
20172
|
-
e.setPageSize(t ?
|
|
20867
|
+
e.setPageSize(t ? Hw : ((n = e.initialState) == null || (n = n.pagination) == null ? void 0 : n.pageSize) ?? Hw);
|
|
20173
20868
|
}, e.setPageSize = (t) => {
|
|
20174
20869
|
e.setPagination((e) => {
|
|
20175
|
-
let n = Math.max(1,
|
|
20870
|
+
let n = Math.max(1, ZC(t, e.pageSize)), r = e.pageSize * e.pageIndex, i = Math.floor(r / n);
|
|
20176
20871
|
return {
|
|
20177
20872
|
...e,
|
|
20178
20873
|
pageIndex: i,
|
|
@@ -20180,7 +20875,7 @@ var DC = { createTable: (e) => {
|
|
|
20180
20875
|
};
|
|
20181
20876
|
});
|
|
20182
20877
|
}, e.setPageCount = (t) => e.setPagination((n) => {
|
|
20183
|
-
let r =
|
|
20878
|
+
let r = ZC(t, e.options.pageCount ?? -1);
|
|
20184
20879
|
return typeof r == "number" && (r = Math.max(-1, r)), {
|
|
20185
20880
|
...n,
|
|
20186
20881
|
pageCount: r
|
|
@@ -20193,15 +20888,15 @@ var DC = { createTable: (e) => {
|
|
|
20193
20888
|
return n === -1 ? !0 : n === 0 ? !1 : t < n - 1;
|
|
20194
20889
|
}, e.previousPage = () => e.setPageIndex((e) => e - 1), e.nextPage = () => e.setPageIndex((e) => e + 1), e.firstPage = () => e.setPageIndex(0), e.lastPage = () => e.setPageIndex(e.getPageCount() - 1), e.getPrePaginationRowModel = () => e.getExpandedRowModel(), e.getPaginationRowModel = () => (!e._getPaginationRowModel && e.options.getPaginationRowModel && (e._getPaginationRowModel = e.options.getPaginationRowModel(e)), e.options.manualPagination || !e._getPaginationRowModel ? e.getPrePaginationRowModel() : e._getPaginationRowModel()), e.getPageCount = () => e.options.pageCount ?? Math.ceil(e.getRowCount() / e.getState().pagination.pageSize), e.getRowCount = () => e.options.rowCount ?? e.getPrePaginationRowModel().rows.length;
|
|
20195
20890
|
}
|
|
20196
|
-
},
|
|
20891
|
+
}, Gw = () => ({
|
|
20197
20892
|
top: [],
|
|
20198
20893
|
bottom: []
|
|
20199
|
-
}),
|
|
20894
|
+
}), Kw = {
|
|
20200
20895
|
getInitialState: (e) => ({
|
|
20201
|
-
rowPinning:
|
|
20896
|
+
rowPinning: Gw(),
|
|
20202
20897
|
...e
|
|
20203
20898
|
}),
|
|
20204
|
-
getDefaultOptions: (e) => ({ onRowPinningChange:
|
|
20899
|
+
getDefaultOptions: (e) => ({ onRowPinningChange: QC("rowPinning", e) }),
|
|
20205
20900
|
createRow: (e, t) => {
|
|
20206
20901
|
e.pin = (n, r, i) => {
|
|
20207
20902
|
let a = r ? e.getLeafRows().map((e) => {
|
|
@@ -20240,7 +20935,7 @@ var DC = { createTable: (e) => {
|
|
|
20240
20935
|
};
|
|
20241
20936
|
},
|
|
20242
20937
|
createTable: (e) => {
|
|
20243
|
-
e.setRowPinning = (t) => e.options.onRowPinningChange == null ? void 0 : e.options.onRowPinningChange(t), e.resetRowPinning = (t) => e.setRowPinning(t ?
|
|
20938
|
+
e.setRowPinning = (t) => e.options.onRowPinningChange == null ? void 0 : e.options.onRowPinningChange(t), e.resetRowPinning = (t) => e.setRowPinning(t ? Gw() : e.initialState?.rowPinning ?? Gw()), e.getIsSomeRowsPinned = (t) => {
|
|
20244
20939
|
let n = e.getState().rowPinning;
|
|
20245
20940
|
return t ? !!n[t]?.length : !!(n.top?.length || n.bottom?.length);
|
|
20246
20941
|
}, e._getPinnedRows = (t, n, r) => (e.options.keepPinnedRows ?? !0 ? (n ?? []).map((t) => {
|
|
@@ -20258,13 +20953,13 @@ var DC = { createTable: (e) => {
|
|
|
20258
20953
|
return e.filter((e) => !r.has(e.id));
|
|
20259
20954
|
}, $(e.options, "debugRows", "getCenterRows"));
|
|
20260
20955
|
}
|
|
20261
|
-
},
|
|
20956
|
+
}, qw = {
|
|
20262
20957
|
getInitialState: (e) => ({
|
|
20263
20958
|
rowSelection: {},
|
|
20264
20959
|
...e
|
|
20265
20960
|
}),
|
|
20266
20961
|
getDefaultOptions: (e) => ({
|
|
20267
|
-
onRowSelectionChange:
|
|
20962
|
+
onRowSelectionChange: QC("rowSelection", e),
|
|
20268
20963
|
enableRowSelection: !0,
|
|
20269
20964
|
enableMultiRowSelection: !0,
|
|
20270
20965
|
enableSubRowSelection: !0
|
|
@@ -20283,17 +20978,17 @@ var DC = { createTable: (e) => {
|
|
|
20283
20978
|
}, e.toggleAllPageRowsSelected = (t) => e.setRowSelection((n) => {
|
|
20284
20979
|
let r = t === void 0 ? !e.getIsAllPageRowsSelected() : t, i = { ...n };
|
|
20285
20980
|
return e.getRowModel().rows.forEach((t) => {
|
|
20286
|
-
|
|
20981
|
+
Jw(i, t.id, r, !0, e);
|
|
20287
20982
|
}), i;
|
|
20288
|
-
}), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = Q(() => [e.getState().rowSelection, e.getCoreRowModel()], (t, n) => Object.keys(t).length ?
|
|
20983
|
+
}), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = Q(() => [e.getState().rowSelection, e.getCoreRowModel()], (t, n) => Object.keys(t).length ? Yw(e, n) : {
|
|
20289
20984
|
rows: [],
|
|
20290
20985
|
flatRows: [],
|
|
20291
20986
|
rowsById: {}
|
|
20292
|
-
}, $(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = Q(() => [e.getState().rowSelection, e.getFilteredRowModel()], (t, n) => Object.keys(t).length ?
|
|
20987
|
+
}, $(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = Q(() => [e.getState().rowSelection, e.getFilteredRowModel()], (t, n) => Object.keys(t).length ? Yw(e, n) : {
|
|
20293
20988
|
rows: [],
|
|
20294
20989
|
flatRows: [],
|
|
20295
20990
|
rowsById: {}
|
|
20296
|
-
}, $(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = Q(() => [e.getState().rowSelection, e.getSortedRowModel()], (t, n) => Object.keys(t).length ?
|
|
20991
|
+
}, $(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = Q(() => [e.getState().rowSelection, e.getSortedRowModel()], (t, n) => Object.keys(t).length ? Yw(e, n) : {
|
|
20297
20992
|
rows: [],
|
|
20298
20993
|
flatRows: [],
|
|
20299
20994
|
rowsById: {}
|
|
@@ -20321,17 +21016,17 @@ var DC = { createTable: (e) => {
|
|
|
20321
21016
|
t.setRowSelection((a) => {
|
|
20322
21017
|
if (n = n === void 0 ? !i : n, e.getCanSelect() && i === n) return a;
|
|
20323
21018
|
let o = { ...a };
|
|
20324
|
-
return
|
|
21019
|
+
return Jw(o, e.id, n, r?.selectChildren ?? !0, t), o;
|
|
20325
21020
|
});
|
|
20326
21021
|
}, e.getIsSelected = () => {
|
|
20327
21022
|
let { rowSelection: n } = t.getState();
|
|
20328
|
-
return
|
|
21023
|
+
return Xw(e, n);
|
|
20329
21024
|
}, e.getIsSomeSelected = () => {
|
|
20330
21025
|
let { rowSelection: n } = t.getState();
|
|
20331
|
-
return
|
|
21026
|
+
return Zw(e, n) === "some";
|
|
20332
21027
|
}, e.getIsAllSubRowsSelected = () => {
|
|
20333
21028
|
let { rowSelection: n } = t.getState();
|
|
20334
|
-
return
|
|
21029
|
+
return Zw(e, n) === "all";
|
|
20335
21030
|
}, e.getCanSelect = () => typeof t.options.enableRowSelection == "function" ? t.options.enableRowSelection(e) : t.options.enableRowSelection ?? !0, e.getCanSelectSubRows = () => typeof t.options.enableSubRowSelection == "function" ? t.options.enableSubRowSelection(e) : t.options.enableSubRowSelection ?? !0, e.getCanMultiSelect = () => typeof t.options.enableMultiRowSelection == "function" ? t.options.enableMultiRowSelection(e) : t.options.enableMultiRowSelection ?? !0, e.getToggleSelectedHandler = () => {
|
|
20336
21031
|
let t = e.getCanSelect();
|
|
20337
21032
|
return (n) => {
|
|
@@ -20339,16 +21034,16 @@ var DC = { createTable: (e) => {
|
|
|
20339
21034
|
};
|
|
20340
21035
|
};
|
|
20341
21036
|
}
|
|
20342
|
-
},
|
|
21037
|
+
}, Jw = (e, t, n, r, i) => {
|
|
20343
21038
|
var a;
|
|
20344
21039
|
let o = i.getRow(t, !0);
|
|
20345
|
-
n ? (o.getCanMultiSelect() || Object.keys(e).forEach((t) => delete e[t]), o.getCanSelect() && (e[t] = !0)) : delete e[t], r && (a = o.subRows) != null && a.length && o.getCanSelectSubRows() && o.subRows.forEach((t) =>
|
|
21040
|
+
n ? (o.getCanMultiSelect() || Object.keys(e).forEach((t) => delete e[t]), o.getCanSelect() && (e[t] = !0)) : delete e[t], r && (a = o.subRows) != null && a.length && o.getCanSelectSubRows() && o.subRows.forEach((t) => Jw(e, t.id, n, r, i));
|
|
20346
21041
|
};
|
|
20347
|
-
function
|
|
21042
|
+
function Yw(e, t) {
|
|
20348
21043
|
let n = e.getState().rowSelection, r = [], i = {}, a = function(e, t) {
|
|
20349
21044
|
return e.map((e) => {
|
|
20350
21045
|
var t;
|
|
20351
|
-
let o =
|
|
21046
|
+
let o = Xw(e, n);
|
|
20352
21047
|
if (o && (r.push(e), i[e.id] = e), (t = e.subRows) != null && t.length && (e = {
|
|
20353
21048
|
...e,
|
|
20354
21049
|
subRows: a(e.subRows)
|
|
@@ -20361,32 +21056,32 @@ function RC(e, t) {
|
|
|
20361
21056
|
rowsById: i
|
|
20362
21057
|
};
|
|
20363
21058
|
}
|
|
20364
|
-
function
|
|
21059
|
+
function Xw(e, t) {
|
|
20365
21060
|
return t[e.id] ?? !1;
|
|
20366
21061
|
}
|
|
20367
|
-
function
|
|
21062
|
+
function Zw(e, t, n) {
|
|
20368
21063
|
var r;
|
|
20369
21064
|
if (!((r = e.subRows) != null && r.length)) return !1;
|
|
20370
21065
|
let i = !0, a = !1;
|
|
20371
21066
|
return e.subRows.forEach((e) => {
|
|
20372
|
-
if (!(a && !i) && (e.getCanSelect() && (
|
|
20373
|
-
let n =
|
|
21067
|
+
if (!(a && !i) && (e.getCanSelect() && (Xw(e, t) ? a = !0 : i = !1), e.subRows && e.subRows.length)) {
|
|
21068
|
+
let n = Zw(e, t);
|
|
20374
21069
|
n === "all" ? a = !0 : (n === "some" && (a = !0), i = !1);
|
|
20375
21070
|
}
|
|
20376
21071
|
}), i ? "all" : a ? "some" : !1;
|
|
20377
21072
|
}
|
|
20378
|
-
var
|
|
21073
|
+
var Qw = /([0-9]+)/gm, $w = (e, t, n) => sT(oT(e.getValue(n)).toLowerCase(), oT(t.getValue(n)).toLowerCase()), eT = (e, t, n) => sT(oT(e.getValue(n)), oT(t.getValue(n))), tT = (e, t, n) => aT(oT(e.getValue(n)).toLowerCase(), oT(t.getValue(n)).toLowerCase()), nT = (e, t, n) => aT(oT(e.getValue(n)), oT(t.getValue(n))), rT = (e, t, n) => {
|
|
20379
21074
|
let r = e.getValue(n), i = t.getValue(n);
|
|
20380
21075
|
return r > i ? 1 : r < i ? -1 : 0;
|
|
20381
|
-
},
|
|
20382
|
-
function
|
|
21076
|
+
}, iT = (e, t, n) => aT(e.getValue(n), t.getValue(n));
|
|
21077
|
+
function aT(e, t) {
|
|
20383
21078
|
return e === t ? 0 : e > t ? 1 : -1;
|
|
20384
21079
|
}
|
|
20385
|
-
function
|
|
21080
|
+
function oT(e) {
|
|
20386
21081
|
return typeof e == "number" ? isNaN(e) || e === Infinity || e === -Infinity ? "" : String(e) : typeof e == "string" ? e : "";
|
|
20387
21082
|
}
|
|
20388
|
-
function
|
|
20389
|
-
let n = e.split(
|
|
21083
|
+
function sT(e, t) {
|
|
21084
|
+
let n = e.split(Qw).filter(Boolean), r = t.split(Qw).filter(Boolean);
|
|
20390
21085
|
for (; n.length && r.length;) {
|
|
20391
21086
|
let e = n.shift(), t = r.shift(), i = parseInt(e, 10), a = parseInt(t, 10), o = [i, a].sort();
|
|
20392
21087
|
if (isNaN(o[0])) {
|
|
@@ -20400,22 +21095,22 @@ function XC(e, t) {
|
|
|
20400
21095
|
}
|
|
20401
21096
|
return n.length - r.length;
|
|
20402
21097
|
}
|
|
20403
|
-
var
|
|
20404
|
-
alphanumeric:
|
|
20405
|
-
alphanumericCaseSensitive:
|
|
20406
|
-
text:
|
|
20407
|
-
textCaseSensitive:
|
|
20408
|
-
datetime:
|
|
20409
|
-
basic:
|
|
20410
|
-
},
|
|
20411
|
-
|
|
20412
|
-
|
|
20413
|
-
|
|
20414
|
-
|
|
20415
|
-
|
|
20416
|
-
|
|
20417
|
-
|
|
20418
|
-
|
|
21098
|
+
var cT = {
|
|
21099
|
+
alphanumeric: $w,
|
|
21100
|
+
alphanumericCaseSensitive: eT,
|
|
21101
|
+
text: tT,
|
|
21102
|
+
textCaseSensitive: nT,
|
|
21103
|
+
datetime: rT,
|
|
21104
|
+
basic: iT
|
|
21105
|
+
}, lT = [
|
|
21106
|
+
ow,
|
|
21107
|
+
Iw,
|
|
21108
|
+
Ew,
|
|
21109
|
+
Ow,
|
|
21110
|
+
lw,
|
|
21111
|
+
xw,
|
|
21112
|
+
Rw,
|
|
21113
|
+
zw,
|
|
20419
21114
|
{
|
|
20420
21115
|
getInitialState: (e) => ({
|
|
20421
21116
|
sorting: [],
|
|
@@ -20426,7 +21121,7 @@ var ZC = {
|
|
|
20426
21121
|
sortUndefined: 1
|
|
20427
21122
|
}),
|
|
20428
21123
|
getDefaultOptions: (e) => ({
|
|
20429
|
-
onSortingChange:
|
|
21124
|
+
onSortingChange: QC("sorting", e),
|
|
20430
21125
|
isMultiSortEvent: (e) => e.shiftKey
|
|
20431
21126
|
}),
|
|
20432
21127
|
createColumn: (e, t) => {
|
|
@@ -20434,13 +21129,13 @@ var ZC = {
|
|
|
20434
21129
|
let n = t.getFilteredRowModel().flatRows.slice(10), r = !1;
|
|
20435
21130
|
for (let t of n) {
|
|
20436
21131
|
let n = t?.getValue(e.id);
|
|
20437
|
-
if (Object.prototype.toString.call(n) === "[object Date]") return
|
|
20438
|
-
if (typeof n == "string" && (r = !0, n.split(
|
|
21132
|
+
if (Object.prototype.toString.call(n) === "[object Date]") return cT.datetime;
|
|
21133
|
+
if (typeof n == "string" && (r = !0, n.split(Qw).length > 1)) return cT.alphanumeric;
|
|
20439
21134
|
}
|
|
20440
|
-
return r ?
|
|
21135
|
+
return r ? cT.text : cT.basic;
|
|
20441
21136
|
}, e.getAutoSortDir = () => typeof t.getFilteredRowModel().flatRows[0]?.getValue(e.id) == "string" ? "asc" : "desc", e.getSortingFn = () => {
|
|
20442
21137
|
if (!e) throw Error();
|
|
20443
|
-
return
|
|
21138
|
+
return $C(e.columnDef.sortingFn) ? e.columnDef.sortingFn : e.columnDef.sortingFn === "auto" ? e.getAutoSortingFn() : t.options.sortingFns?.[e.columnDef.sortingFn] ?? cT[e.columnDef.sortingFn];
|
|
20444
21139
|
}, e.toggleSorting = (n, r) => {
|
|
20445
21140
|
let i = e.getNextSortingOrder(), a = n != null;
|
|
20446
21141
|
t.setSorting((o) => {
|
|
@@ -20477,16 +21172,16 @@ var ZC = {
|
|
|
20477
21172
|
}, e.getPreSortedRowModel = () => e.getGroupedRowModel(), e.getSortedRowModel = () => (!e._getSortedRowModel && e.options.getSortedRowModel && (e._getSortedRowModel = e.options.getSortedRowModel(e)), e.options.manualSorting || !e._getSortedRowModel ? e.getPreSortedRowModel() : e._getSortedRowModel());
|
|
20478
21173
|
}
|
|
20479
21174
|
},
|
|
20480
|
-
|
|
20481
|
-
|
|
20482
|
-
|
|
20483
|
-
|
|
20484
|
-
|
|
20485
|
-
|
|
21175
|
+
ww,
|
|
21176
|
+
Bw,
|
|
21177
|
+
Ww,
|
|
21178
|
+
Kw,
|
|
21179
|
+
qw,
|
|
21180
|
+
Mw
|
|
20486
21181
|
];
|
|
20487
|
-
function
|
|
21182
|
+
function uT(e) {
|
|
20488
21183
|
process.env.NODE_ENV !== "production" && (e.debugAll || e.debugTable) && console.info("Creating Table Instance...");
|
|
20489
|
-
let t = [...
|
|
21184
|
+
let t = [...lT, ...e._features ?? []], n = { _features: t }, r = n._features.reduce((e, t) => Object.assign(e, t.getDefaultOptions == null ? void 0 : t.getDefaultOptions(n)), {}), i = (e) => n.options.mergeOptions ? n.options.mergeOptions(r, e) : {
|
|
20490
21185
|
...r,
|
|
20491
21186
|
...e
|
|
20492
21187
|
}, a = { ...e.initialState ?? {} };
|
|
@@ -20512,7 +21207,7 @@ function $C(e) {
|
|
|
20512
21207
|
n.setState(n.initialState);
|
|
20513
21208
|
},
|
|
20514
21209
|
setOptions: (e) => {
|
|
20515
|
-
n.options = i(
|
|
21210
|
+
n.options = i(ZC(e, n.options));
|
|
20516
21211
|
},
|
|
20517
21212
|
getState: () => n.options.state,
|
|
20518
21213
|
setState: (e) => {
|
|
@@ -20542,7 +21237,7 @@ function $C(e) {
|
|
|
20542
21237
|
getAllColumns: Q(() => [n._getColumnDefs()], (e) => {
|
|
20543
21238
|
let t = function(e, r, i) {
|
|
20544
21239
|
return i === void 0 && (i = 0), e.map((e) => {
|
|
20545
|
-
let a =
|
|
21240
|
+
let a = rw(n, e, i, r), o = e;
|
|
20546
21241
|
return a.columns = o.columns ? t(o.columns, a, i + 1) : [], a;
|
|
20547
21242
|
});
|
|
20548
21243
|
};
|
|
@@ -20563,7 +21258,7 @@ function $C(e) {
|
|
|
20563
21258
|
}
|
|
20564
21259
|
return n;
|
|
20565
21260
|
}
|
|
20566
|
-
function
|
|
21261
|
+
function dT() {
|
|
20567
21262
|
return (e) => Q(() => [e.options.data], (t) => {
|
|
20568
21263
|
let n = {
|
|
20569
21264
|
rows: [],
|
|
@@ -20573,7 +21268,7 @@ function ew() {
|
|
|
20573
21268
|
i === void 0 && (i = 0);
|
|
20574
21269
|
let o = [];
|
|
20575
21270
|
for (let c = 0; c < t.length; c++) {
|
|
20576
|
-
let l =
|
|
21271
|
+
let l = cw(e, e._getRowId(t[c], c, a), t[c], c, i, void 0, a?.id);
|
|
20577
21272
|
if (n.flatRows.push(l), n.rowsById[l.id] = l, o.push(l), e.options.getSubRows) {
|
|
20578
21273
|
var s;
|
|
20579
21274
|
l.originalSubRows = e.options.getSubRows(t[c], c), (s = l.originalSubRows) != null && s.length && (l.subRows = r(l.originalSubRows, i + 1, l));
|
|
@@ -20584,7 +21279,7 @@ function ew() {
|
|
|
20584
21279
|
return n.rows = r(t), n;
|
|
20585
21280
|
}, $(e.options, "debugTable", "getRowModel", () => e._autoResetPageIndex()));
|
|
20586
21281
|
}
|
|
20587
|
-
function
|
|
21282
|
+
function fT() {
|
|
20588
21283
|
return (e) => Q(() => [e.getState().sorting, e.getPreSortedRowModel()], (t, n) => {
|
|
20589
21284
|
if (!n.rows.length || !(t != null && t.length)) return n;
|
|
20590
21285
|
let r = e.getState().sorting, i = [], a = r.filter((t) => e.getColumn(t.id)?.getCanSort()), o = {};
|
|
@@ -20626,28 +21321,28 @@ function tw() {
|
|
|
20626
21321
|
}
|
|
20627
21322
|
//#endregion
|
|
20628
21323
|
//#region node_modules/@tanstack/react-table/build/lib/index.mjs
|
|
20629
|
-
function
|
|
20630
|
-
return e ?
|
|
21324
|
+
function pT(e, t) {
|
|
21325
|
+
return e ? mT(e) ? /* @__PURE__ */ p.createElement(e, t) : e : null;
|
|
20631
21326
|
}
|
|
20632
|
-
function
|
|
20633
|
-
return
|
|
21327
|
+
function mT(e) {
|
|
21328
|
+
return hT(e) || typeof e == "function" || gT(e);
|
|
20634
21329
|
}
|
|
20635
|
-
function
|
|
21330
|
+
function hT(e) {
|
|
20636
21331
|
return typeof e == "function" && (() => {
|
|
20637
21332
|
let t = Object.getPrototypeOf(e);
|
|
20638
21333
|
return t.prototype && t.prototype.isReactComponent;
|
|
20639
21334
|
})();
|
|
20640
21335
|
}
|
|
20641
|
-
function
|
|
21336
|
+
function gT(e) {
|
|
20642
21337
|
return typeof e == "object" && typeof e.$$typeof == "symbol" && ["react.memo", "react.forward_ref"].includes(e.$$typeof.description);
|
|
20643
21338
|
}
|
|
20644
|
-
function
|
|
21339
|
+
function _T(e) {
|
|
20645
21340
|
let t = {
|
|
20646
21341
|
state: {},
|
|
20647
21342
|
onStateChange: () => {},
|
|
20648
21343
|
renderFallbackValue: null,
|
|
20649
21344
|
...e
|
|
20650
|
-
}, [n] = p.useState(() => ({ current:
|
|
21345
|
+
}, [n] = p.useState(() => ({ current: uT(t) })), [r, i] = p.useState(() => n.current.initialState);
|
|
20651
21346
|
return n.current.setOptions((t) => ({
|
|
20652
21347
|
...t,
|
|
20653
21348
|
...e,
|
|
@@ -20662,7 +21357,7 @@ function ow(e) {
|
|
|
20662
21357
|
}
|
|
20663
21358
|
//#endregion
|
|
20664
21359
|
//#region src/components/WgDesignProvider/WgDesignProvider.tsx
|
|
20665
|
-
var
|
|
21360
|
+
var vT = { table: {
|
|
20666
21361
|
noResults: "No results found",
|
|
20667
21362
|
filters: "Filters",
|
|
20668
21363
|
filter: "Filter",
|
|
@@ -20682,35 +21377,35 @@ var sw = { table: {
|
|
|
20682
21377
|
ascending: "Ascending",
|
|
20683
21378
|
descending: "Descending",
|
|
20684
21379
|
filterModalDescription: "Filter and sorting options"
|
|
20685
|
-
} },
|
|
20686
|
-
function
|
|
21380
|
+
} }, yT = p.createContext(vT);
|
|
21381
|
+
function bT({ labels: e, children: t }) {
|
|
20687
21382
|
let n = p.useMemo(() => ({ table: {
|
|
20688
|
-
...
|
|
21383
|
+
...vT.table,
|
|
20689
21384
|
...e?.table
|
|
20690
21385
|
} }), [e]);
|
|
20691
|
-
return /* @__PURE__ */ D(
|
|
21386
|
+
return /* @__PURE__ */ D(yT.Provider, {
|
|
20692
21387
|
value: n,
|
|
20693
21388
|
children: t
|
|
20694
21389
|
});
|
|
20695
21390
|
}
|
|
20696
|
-
function
|
|
20697
|
-
return p.useContext(
|
|
21391
|
+
function xT() {
|
|
21392
|
+
return p.useContext(yT);
|
|
20698
21393
|
}
|
|
20699
21394
|
//#endregion
|
|
20700
21395
|
//#region src/components/Table/DataTableMobile.tsx
|
|
20701
|
-
var
|
|
20702
|
-
let n =
|
|
21396
|
+
var ST = ({ table: e, noResultsLabel: t }) => {
|
|
21397
|
+
let n = xT().table, r = (e) => e.columnDef.meta || {}, i = (e) => r(e).mobile || {}, a = e.getAllLeafColumns().find((e) => i(e).cardTitle), o = a ? i(a).cardIcon : void 0, s = (e) => {
|
|
20703
21398
|
if (!a) return;
|
|
20704
21399
|
let t = i(a).cardTitle;
|
|
20705
21400
|
if (typeof t == "string") return t;
|
|
20706
21401
|
let n = e.getVisibleCells().find((e) => e.column.id === a.id);
|
|
20707
|
-
if (n) return
|
|
21402
|
+
if (n) return pT(n.column.columnDef.cell, n.getContext());
|
|
20708
21403
|
}, c = (e) => {
|
|
20709
21404
|
let t = e.getVisibleCells().find((e) => i(e.column).primary);
|
|
20710
|
-
return t ?
|
|
21405
|
+
return t ? pT(t.column.columnDef.cell, t.getContext()) : null;
|
|
20711
21406
|
}, l = (e) => {
|
|
20712
21407
|
let t = e.getVisibleCells().find((e) => i(e.column).action);
|
|
20713
|
-
return t ?
|
|
21408
|
+
return t ? pT(t.column.columnDef.cell, t.getContext()) : null;
|
|
20714
21409
|
}, u = (e, t) => {
|
|
20715
21410
|
let n = t.getVisibleCells().find((t) => t.column.id === e)?.column;
|
|
20716
21411
|
if (!n) return !1;
|
|
@@ -20737,7 +21432,7 @@ var dw = ({ table: e, noResultsLabel: t }) => {
|
|
|
20737
21432
|
children: n
|
|
20738
21433
|
}), /* @__PURE__ */ D("dd", {
|
|
20739
21434
|
className: "text-foreground text-sm font-medium",
|
|
20740
|
-
children:
|
|
21435
|
+
children: pT(t.columnDef.cell, e.getContext())
|
|
20741
21436
|
})]
|
|
20742
21437
|
});
|
|
20743
21438
|
}, p = e.getRowModel().rows;
|
|
@@ -20804,7 +21499,7 @@ var dw = ({ table: e, noResultsLabel: t }) => {
|
|
|
20804
21499
|
};
|
|
20805
21500
|
//#endregion
|
|
20806
21501
|
//#region src/components/Table/hooks.ts
|
|
20807
|
-
function
|
|
21502
|
+
function CT(e) {
|
|
20808
21503
|
return T(v((t) => {
|
|
20809
21504
|
let n = window.matchMedia(e);
|
|
20810
21505
|
return n.addEventListener("change", t), () => {
|
|
@@ -20812,10 +21507,10 @@ function fw(e) {
|
|
|
20812
21507
|
};
|
|
20813
21508
|
}, [e]), () => window.matchMedia(e).matches, () => !1);
|
|
20814
21509
|
}
|
|
20815
|
-
function
|
|
20816
|
-
return
|
|
21510
|
+
function wT() {
|
|
21511
|
+
return CT("only screen and (max-width: 767px)");
|
|
20817
21512
|
}
|
|
20818
|
-
function
|
|
21513
|
+
function TT(e, t) {
|
|
20819
21514
|
let [n, r] = w(e);
|
|
20820
21515
|
return b(() => {
|
|
20821
21516
|
let n = setTimeout(() => r(e), t);
|
|
@@ -20824,7 +21519,7 @@ function mw(e, t) {
|
|
|
20824
21519
|
}
|
|
20825
21520
|
//#endregion
|
|
20826
21521
|
//#region src/components/Table/Table.tsx
|
|
20827
|
-
function
|
|
21522
|
+
function ET({ className: e, ...t }) {
|
|
20828
21523
|
return /* @__PURE__ */ D("div", {
|
|
20829
21524
|
"data-slot": "table-container",
|
|
20830
21525
|
className: "relative w-full overflow-x-auto",
|
|
@@ -20835,49 +21530,49 @@ function hw({ className: e, ...t }) {
|
|
|
20835
21530
|
})
|
|
20836
21531
|
});
|
|
20837
21532
|
}
|
|
20838
|
-
function
|
|
21533
|
+
function DT({ className: e, ...t }) {
|
|
20839
21534
|
return /* @__PURE__ */ D("thead", {
|
|
20840
21535
|
"data-slot": "table-header",
|
|
20841
21536
|
className: W("[&_tr]:border-b", e),
|
|
20842
21537
|
...t
|
|
20843
21538
|
});
|
|
20844
21539
|
}
|
|
20845
|
-
function
|
|
21540
|
+
function OT({ className: e, ...t }) {
|
|
20846
21541
|
return /* @__PURE__ */ D("tbody", {
|
|
20847
21542
|
"data-slot": "table-body",
|
|
20848
21543
|
className: W("[&_tr:last-child]:border-0", e),
|
|
20849
21544
|
...t
|
|
20850
21545
|
});
|
|
20851
21546
|
}
|
|
20852
|
-
function
|
|
21547
|
+
function kT({ className: e, ...t }) {
|
|
20853
21548
|
return /* @__PURE__ */ D("tfoot", {
|
|
20854
21549
|
"data-slot": "table-footer",
|
|
20855
21550
|
className: W("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0", e),
|
|
20856
21551
|
...t
|
|
20857
21552
|
});
|
|
20858
21553
|
}
|
|
20859
|
-
function
|
|
21554
|
+
function AT({ className: e, ...t }) {
|
|
20860
21555
|
return /* @__PURE__ */ D("tr", {
|
|
20861
21556
|
"data-slot": "table-row",
|
|
20862
21557
|
className: W("data-[state=selected]:bg-muted border-b transition-colors", e),
|
|
20863
21558
|
...t
|
|
20864
21559
|
});
|
|
20865
21560
|
}
|
|
20866
|
-
function
|
|
21561
|
+
function jT({ className: e, ...t }) {
|
|
20867
21562
|
return /* @__PURE__ */ D("th", {
|
|
20868
21563
|
"data-slot": "table-head",
|
|
20869
21564
|
className: W("text-foreground h-10 px-3 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", e),
|
|
20870
21565
|
...t
|
|
20871
21566
|
});
|
|
20872
21567
|
}
|
|
20873
|
-
function
|
|
21568
|
+
function MT({ className: e, ...t }) {
|
|
20874
21569
|
return /* @__PURE__ */ D("td", {
|
|
20875
21570
|
"data-slot": "table-cell",
|
|
20876
21571
|
className: W("px-3 py-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", e),
|
|
20877
21572
|
...t
|
|
20878
21573
|
});
|
|
20879
21574
|
}
|
|
20880
|
-
function
|
|
21575
|
+
function NT({ className: e, ...t }) {
|
|
20881
21576
|
return /* @__PURE__ */ D("caption", {
|
|
20882
21577
|
"data-slot": "table-caption",
|
|
20883
21578
|
className: W("text-muted-foreground mt-4 text-sm", e),
|
|
@@ -20886,22 +21581,22 @@ function Sw({ className: e, ...t }) {
|
|
|
20886
21581
|
}
|
|
20887
21582
|
//#endregion
|
|
20888
21583
|
//#region src/components/Table/DataTable.tsx
|
|
20889
|
-
function
|
|
20890
|
-
let p =
|
|
21584
|
+
function PT({ columns: e, data: r, onRowClick: a, isLoading: o = !1, className: s, disableMobileList: c = !1, sorting: l, onSortingChange: u, skeletonRows: d = 4, noResultsLabel: f }) {
|
|
21585
|
+
let p = xT().table, m = f ?? p.noResults, h = wT(), g = !c && h, [_, v] = w([]), y = !!u, b = y ? l : _, x = y ? u : v, S = _T({
|
|
20891
21586
|
data: r,
|
|
20892
21587
|
columns: e,
|
|
20893
|
-
getCoreRowModel:
|
|
21588
|
+
getCoreRowModel: dT(),
|
|
20894
21589
|
...y ? {
|
|
20895
21590
|
manualSorting: !0,
|
|
20896
21591
|
onSortingChange: x,
|
|
20897
21592
|
state: { sorting: b }
|
|
20898
21593
|
} : {
|
|
20899
|
-
getSortedRowModel:
|
|
21594
|
+
getSortedRowModel: fT(),
|
|
20900
21595
|
onSortingChange: x,
|
|
20901
21596
|
state: { sorting: b }
|
|
20902
21597
|
}
|
|
20903
21598
|
});
|
|
20904
|
-
return g ? /* @__PURE__ */ D(
|
|
21599
|
+
return g ? /* @__PURE__ */ D(ST, {
|
|
20905
21600
|
table: S,
|
|
20906
21601
|
noResultsLabel: m
|
|
20907
21602
|
}) : /* @__PURE__ */ D("div", {
|
|
@@ -20909,26 +21604,26 @@ function Cw({ columns: e, data: r, onRowClick: a, isLoading: o = !1, className:
|
|
|
20909
21604
|
children: /* @__PURE__ */ D("div", {
|
|
20910
21605
|
"data-slot": "data-table",
|
|
20911
21606
|
className: "bg-card rounded-md border",
|
|
20912
|
-
children: /* @__PURE__ */ O(
|
|
21607
|
+
children: /* @__PURE__ */ O(ET, { children: [/* @__PURE__ */ D(DT, { children: S.getHeaderGroups().map((e) => /* @__PURE__ */ D(AT, { children: e.headers.filter((e) => !e.column.columnDef.meta?.desktopHidden).map((e) => /* @__PURE__ */ D(jT, { children: e.isPlaceholder ? null : /* @__PURE__ */ O("div", {
|
|
20913
21608
|
className: W(e.column.getCanSort() ? "cursor-pointer select-none" : "", "flex items-center space-x-2"),
|
|
20914
21609
|
onClick: e.column.getToggleSortingHandler(),
|
|
20915
|
-
children: [/* @__PURE__ */ D("div", { children:
|
|
21610
|
+
children: [/* @__PURE__ */ D("div", { children: pT(e.column.columnDef.header, e.getContext()) }), e.column.getCanSort() && /* @__PURE__ */ D("div", {
|
|
20916
21611
|
className: "flex size-4 items-center justify-center",
|
|
20917
21612
|
children: {
|
|
20918
21613
|
asc: /* @__PURE__ */ D(t, { className: "size-4" }),
|
|
20919
21614
|
desc: /* @__PURE__ */ D(i, { className: "size-4" })
|
|
20920
21615
|
}[e.column.getIsSorted()] ?? /* @__PURE__ */ D(n, { className: "text-muted-foreground size-4" })
|
|
20921
21616
|
})]
|
|
20922
|
-
}) }, e.id)) }, e.id)) }), /* @__PURE__ */ D(
|
|
21617
|
+
}) }, e.id)) }, e.id)) }), /* @__PURE__ */ D(OT, { children: o ? /* @__PURE__ */ D(E, { children: Array.from(Array(d)).map((e, t) => /* @__PURE__ */ D(AT, { children: S.getVisibleLeafColumns().filter((e) => !e.columnDef.meta?.desktopHidden).map((e) => /* @__PURE__ */ D(MT, { children: /* @__PURE__ */ D(AS, {
|
|
20923
21618
|
className: "rounded-full",
|
|
20924
21619
|
style: { maxWidth: `${Math.floor(Math.random() * 51) + 150}px` }
|
|
20925
|
-
}) }, e.id)) }, t)) }) : S.getRowModel().rows?.length ? S.getRowModel().rows.map((e) => /* @__PURE__ */ D(
|
|
21620
|
+
}) }, e.id)) }, t)) }) : S.getRowModel().rows?.length ? S.getRowModel().rows.map((e) => /* @__PURE__ */ D(AT, {
|
|
20926
21621
|
"data-testid": `row-${e.id}`,
|
|
20927
21622
|
"data-state": e.getIsSelected() && "selected",
|
|
20928
21623
|
onClick: () => a?.(e.original),
|
|
20929
21624
|
className: W(a && "hover:bg-muted/50 cursor-pointer"),
|
|
20930
|
-
children: e.getVisibleCells().filter((e) => !e.column.columnDef.meta?.desktopHidden).map((e) => /* @__PURE__ */ D(
|
|
20931
|
-
}, e.id)) : /* @__PURE__ */ D(
|
|
21625
|
+
children: e.getVisibleCells().filter((e) => !e.column.columnDef.meta?.desktopHidden).map((e) => /* @__PURE__ */ D(MT, { children: pT(e.column.columnDef.cell, e.getContext()) }, e.id))
|
|
21626
|
+
}, e.id)) : /* @__PURE__ */ D(AT, { children: /* @__PURE__ */ D(MT, {
|
|
20932
21627
|
colSpan: e.filter((e) => !e.meta?.desktopHidden).length,
|
|
20933
21628
|
className: "text-muted-foreground pointer-events-none h-24 text-center",
|
|
20934
21629
|
children: m
|
|
@@ -20938,8 +21633,8 @@ function Cw({ columns: e, data: r, onRowClick: a, isLoading: o = !1, className:
|
|
|
20938
21633
|
}
|
|
20939
21634
|
//#endregion
|
|
20940
21635
|
//#region src/components/Table/DataTableFilterHeaderMobileSorting.tsx
|
|
20941
|
-
var
|
|
20942
|
-
let l =
|
|
21636
|
+
var FT = ({ sorting: e, onSortingChange: t, sortableColumns: n = [], sortLabel: r, sortByLabel: i, selectFieldLabel: a, sortDirectionLabel: o, ascendingLabel: s, descendingLabel: c }) => {
|
|
21637
|
+
let l = xT().table, u = r ?? l.sort, d = i ?? l.sortBy, f = a ?? l.selectField, p = o ?? l.sortDirection, m = s ?? l.ascending, h = c ?? l.descending, g = e?.[0], _ = g && n.find((e) => e.id === g.id), v = g?.desc ? "desc" : "asc", [y, b] = w(_?.id), [x, S] = w(v), C = (e) => {
|
|
20943
21638
|
b(e), t && t([{
|
|
20944
21639
|
id: e,
|
|
20945
21640
|
desc: x === "desc"
|
|
@@ -20996,8 +21691,8 @@ var ww = ({ sorting: e, onSortingChange: t, sortableColumns: n = [], sortLabel:
|
|
|
20996
21691
|
};
|
|
20997
21692
|
//#endregion
|
|
20998
21693
|
//#region src/components/Table/FilterModal.tsx
|
|
20999
|
-
function
|
|
21000
|
-
let s =
|
|
21694
|
+
function IT({ open: e, onClose: t, title: n, children: r, footer: i, className: a, descriptionLabel: o }) {
|
|
21695
|
+
let s = xT().table;
|
|
21001
21696
|
return /* @__PURE__ */ D(mm, {
|
|
21002
21697
|
open: e,
|
|
21003
21698
|
onOpenChange: (e) => {
|
|
@@ -21027,8 +21722,8 @@ function Tw({ open: e, onClose: t, title: n, children: r, footer: i, className:
|
|
|
21027
21722
|
}
|
|
21028
21723
|
//#endregion
|
|
21029
21724
|
//#region src/components/Table/DateRangeFilter.tsx
|
|
21030
|
-
var
|
|
21031
|
-
let l =
|
|
21725
|
+
var LT = () => /* @__PURE__ */ D("span", { className: "bg-border inline-block h-5 w-px align-middle" }), RT = ({ from: e, to: t, label: n, onChange: i, filterLabel: a, clearLabel: o, applyLabel: s, formatDate: c = (e) => e.toLocaleDateString() }) => {
|
|
21726
|
+
let l = xT().table, d = a ?? l.dateRange, f = o ?? l.clear, p = s ?? l.apply, [m, h] = w(!1), g = wT(), [_, v] = w({
|
|
21032
21727
|
from: e,
|
|
21033
21728
|
to: t
|
|
21034
21729
|
}), y = () => {
|
|
@@ -21048,7 +21743,7 @@ var Ew = () => /* @__PURE__ */ D("span", { className: "bg-border inline-block h-
|
|
|
21048
21743
|
/* @__PURE__ */ D(u, { className: "size-4" }),
|
|
21049
21744
|
n || d,
|
|
21050
21745
|
e && t ? /* @__PURE__ */ O(E, { children: [
|
|
21051
|
-
/* @__PURE__ */ D(
|
|
21746
|
+
/* @__PURE__ */ D(LT, {}),
|
|
21052
21747
|
/* @__PURE__ */ O("span", { children: [c(e), " "] }),
|
|
21053
21748
|
/* @__PURE__ */ D(r, { className: "size-4" }),
|
|
21054
21749
|
/* @__PURE__ */ O("span", { children: [
|
|
@@ -21075,7 +21770,7 @@ var Ew = () => /* @__PURE__ */ D("span", { className: "bg-border inline-block h-
|
|
|
21075
21770
|
variant: "outline",
|
|
21076
21771
|
onClick: () => h(!0),
|
|
21077
21772
|
children: x
|
|
21078
|
-
}), /* @__PURE__ */ D(
|
|
21773
|
+
}), /* @__PURE__ */ D(IT, {
|
|
21079
21774
|
open: m,
|
|
21080
21775
|
onClose: () => h(!1),
|
|
21081
21776
|
title: n || d,
|
|
@@ -21112,8 +21807,8 @@ var Ew = () => /* @__PURE__ */ D("span", { className: "bg-border inline-block h-
|
|
|
21112
21807
|
})]
|
|
21113
21808
|
})]
|
|
21114
21809
|
});
|
|
21115
|
-
},
|
|
21116
|
-
let a =
|
|
21810
|
+
}, zT = ({ value: e, onChange: t, className: n, clearLabel: r, ...i }) => {
|
|
21811
|
+
let a = xT().table, [o, s] = w(e || ""), c = TT(o, 300);
|
|
21117
21812
|
return b(() => {
|
|
21118
21813
|
t(c || void 0);
|
|
21119
21814
|
}, [c]), /* @__PURE__ */ O("div", {
|
|
@@ -21138,8 +21833,8 @@ var Ew = () => /* @__PURE__ */ D("span", { className: "bg-border inline-block h-
|
|
|
21138
21833
|
})
|
|
21139
21834
|
]
|
|
21140
21835
|
});
|
|
21141
|
-
},
|
|
21142
|
-
let l =
|
|
21836
|
+
}, BT = () => /* @__PURE__ */ D("span", { className: "bg-border inline-block h-5 w-px align-middle" }), VT = ({ value: e = [], options: t, onChange: n, label: r, multiple: i = !0, filterLabel: a, selectedLabel: o, clearLabel: s, applyLabel: c }) => {
|
|
21837
|
+
let l = xT().table, [d, f] = w(!1), [p, m] = w(e), h = wT(), g = a ?? l.filter, _ = o ?? l.selected, v = s ?? l.clear, y = c ?? l.apply, b = () => {
|
|
21143
21838
|
n(p), f(!1);
|
|
21144
21839
|
}, x = () => {
|
|
21145
21840
|
m([]), n([]), f(!1);
|
|
@@ -21150,7 +21845,7 @@ var Ew = () => /* @__PURE__ */ D("span", { className: "bg-border inline-block h-
|
|
|
21150
21845
|
}, T = h && t.length > 1, k = /* @__PURE__ */ O(E, { children: [
|
|
21151
21846
|
/* @__PURE__ */ D(u, { className: "size-4" }),
|
|
21152
21847
|
r || g,
|
|
21153
|
-
p.length > 0 && /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D(
|
|
21848
|
+
p.length > 0 && /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D(BT, {}), /* @__PURE__ */ D("span", {
|
|
21154
21849
|
className: "inline-flex align-middle",
|
|
21155
21850
|
children: p.length === 1 ? (() => {
|
|
21156
21851
|
let e = t.find((e) => e.value === p[0]);
|
|
@@ -21187,7 +21882,7 @@ var Ew = () => /* @__PURE__ */ D("span", { className: "bg-border inline-block h-
|
|
|
21187
21882
|
className: "justify-start",
|
|
21188
21883
|
onClick: () => f(!0),
|
|
21189
21884
|
children: k
|
|
21190
|
-
}), /* @__PURE__ */ D(
|
|
21885
|
+
}), /* @__PURE__ */ D(IT, {
|
|
21191
21886
|
open: d,
|
|
21192
21887
|
onClose: () => f(!1),
|
|
21193
21888
|
title: r || g,
|
|
@@ -21232,22 +21927,22 @@ var Ew = () => /* @__PURE__ */ D("span", { className: "bg-border inline-block h-
|
|
|
21232
21927
|
})]
|
|
21233
21928
|
})]
|
|
21234
21929
|
});
|
|
21235
|
-
},
|
|
21236
|
-
let h =
|
|
21930
|
+
}, HT = _(({ query: e, placeholder: t, handleFilterChange: n, handleResetFilters: r, hasActiveFilters: i, filters: a = [], sorting: o, onSortingChange: s, sortableColumns: c = [], modalTitle: l, filtersLabel: d, clearLabel: f, applyLabel: p }, m) => {
|
|
21931
|
+
let h = xT().table, g = d ?? h.filters, _ = f ?? h.clear, v = p ?? h.apply, y = wT(), [b, x] = w(!1), S = (e, t) => e.type === "select" ? /* @__PURE__ */ D(VT, {
|
|
21237
21932
|
label: e.label,
|
|
21238
21933
|
value: e.value,
|
|
21239
21934
|
options: e.options,
|
|
21240
21935
|
onChange: e.onChange,
|
|
21241
21936
|
clearLabel: f,
|
|
21242
21937
|
applyLabel: p
|
|
21243
|
-
}, t) : e.type === "dateRange" ? /* @__PURE__ */ D(
|
|
21938
|
+
}, t) : e.type === "dateRange" ? /* @__PURE__ */ D(RT, {
|
|
21244
21939
|
label: e.label,
|
|
21245
21940
|
from: e.from,
|
|
21246
21941
|
to: e.to,
|
|
21247
21942
|
onChange: e.onChange,
|
|
21248
21943
|
clearLabel: f,
|
|
21249
21944
|
applyLabel: p
|
|
21250
|
-
}, t) : e.type === "check" ? /* @__PURE__ */ D(
|
|
21945
|
+
}, t) : e.type === "check" ? /* @__PURE__ */ D(XC, {
|
|
21251
21946
|
label: e.label,
|
|
21252
21947
|
value: e.value,
|
|
21253
21948
|
onChange: e.onChange
|
|
@@ -21259,7 +21954,7 @@ var Ew = () => /* @__PURE__ */ D("span", { className: "bg-border inline-block h-
|
|
|
21259
21954
|
className: "flex w-full flex-row flex-wrap items-stretch justify-end gap-2 md:items-center md:justify-between",
|
|
21260
21955
|
children: [/* @__PURE__ */ D("div", {
|
|
21261
21956
|
className: "flex-grow",
|
|
21262
|
-
children: /* @__PURE__ */ D(
|
|
21957
|
+
children: /* @__PURE__ */ D(zT, {
|
|
21263
21958
|
value: e,
|
|
21264
21959
|
placeholder: t,
|
|
21265
21960
|
onChange: (e) => n("q", e),
|
|
@@ -21282,7 +21977,7 @@ var Ew = () => /* @__PURE__ */ D("span", { className: "bg-border inline-block h-
|
|
|
21282
21977
|
className: "flex flex-0 items-center justify-end gap-2",
|
|
21283
21978
|
children: a.map((e, t) => S(e, t))
|
|
21284
21979
|
})]
|
|
21285
|
-
}), y && (a.length > 0 || c.length > 0) && /* @__PURE__ */ D(
|
|
21980
|
+
}), y && (a.length > 0 || c.length > 0) && /* @__PURE__ */ D(IT, {
|
|
21286
21981
|
open: b,
|
|
21287
21982
|
onClose: () => x(!1),
|
|
21288
21983
|
title: l || g,
|
|
@@ -21306,7 +22001,7 @@ var Ew = () => /* @__PURE__ */ D("span", { className: "bg-border inline-block h-
|
|
|
21306
22001
|
children: [a.length > 0 && /* @__PURE__ */ D("div", {
|
|
21307
22002
|
className: "flex flex-col space-y-4",
|
|
21308
22003
|
children: a.map((e, t) => S(e, t))
|
|
21309
|
-
}), /* @__PURE__ */ D(
|
|
22004
|
+
}), /* @__PURE__ */ D(FT, {
|
|
21310
22005
|
sorting: o,
|
|
21311
22006
|
onSortingChange: s,
|
|
21312
22007
|
sortableColumns: c
|
|
@@ -21315,11 +22010,11 @@ var Ew = () => /* @__PURE__ */ D("span", { className: "bg-border inline-block h-
|
|
|
21315
22010
|
})]
|
|
21316
22011
|
});
|
|
21317
22012
|
});
|
|
21318
|
-
|
|
22013
|
+
HT.displayName = "DataTableFilterHeader";
|
|
21319
22014
|
//#endregion
|
|
21320
22015
|
//#region src/components/Table/DataTableMobileSorting.tsx
|
|
21321
|
-
var
|
|
21322
|
-
let f =
|
|
22016
|
+
var UT = ({ table: e, sortLabel: r, sortByLabel: a, selectFieldLabel: o, sortDirectionLabel: s, ascendingLabel: c, descendingLabel: l, clearLabel: u, applyLabel: d }) => {
|
|
22017
|
+
let f = xT().table, p = r ?? f.sort, m = a ?? f.sortBy, h = o ?? f.selectField, g = s ?? f.sortDirection, _ = c ?? f.ascending, v = l ?? f.descending, y = u ?? f.clear, b = d ?? f.apply, [x, C] = w(!1), T = e.getState().sorting, E = e.options.onSortingChange, k = S(() => e.getAllLeafColumns().filter((e) => e.getCanSort()), [e]), A = T?.[0], j = A && k.find((e) => e.id === A.id), M = A?.desc ? "desc" : "asc", [N, P] = w(j?.id), [F, I] = w(M);
|
|
21323
22018
|
return k.length === 0 || !E ? null : /* @__PURE__ */ O(CS, {
|
|
21324
22019
|
open: x,
|
|
21325
22020
|
onOpenChange: (e) => {
|
|
@@ -21399,13 +22094,13 @@ var Mw = ({ table: e, sortLabel: r, sortByLabel: a, selectFieldLabel: o, sortDir
|
|
|
21399
22094
|
})
|
|
21400
22095
|
})]
|
|
21401
22096
|
});
|
|
21402
|
-
},
|
|
22097
|
+
}, WT = [
|
|
21403
22098
|
10,
|
|
21404
22099
|
25,
|
|
21405
22100
|
50,
|
|
21406
22101
|
100
|
|
21407
|
-
],
|
|
21408
|
-
let a =
|
|
22102
|
+
], GT = ({ value: e, onValueChange: t, className: n, options: r = WT, itemsPerPageLabel: i }) => {
|
|
22103
|
+
let a = xT().table, o = i ?? a.itemsPerPage;
|
|
21409
22104
|
return /* @__PURE__ */ D(Ox, {
|
|
21410
22105
|
size: "sm",
|
|
21411
22106
|
className: n,
|
|
@@ -21420,8 +22115,8 @@ var Mw = ({ table: e, sortLabel: r, sortByLabel: a, selectFieldLabel: o, sortDir
|
|
|
21420
22115
|
]
|
|
21421
22116
|
}, e))
|
|
21422
22117
|
});
|
|
21423
|
-
},
|
|
21424
|
-
let i =
|
|
22118
|
+
}, KT = ({ pagination: e, pageSize: t, className: n, formatLabel: r }) => {
|
|
22119
|
+
let i = xT().table;
|
|
21425
22120
|
if (!e || e.count === 0) return null;
|
|
21426
22121
|
let a = e.current, o = e.count, s = (a - 1) * t + 1, c = Math.min(a * t, o), l = (r ?? i.showingResults)({
|
|
21427
22122
|
from: s,
|
|
@@ -21432,17 +22127,17 @@ var Mw = ({ table: e, sortLabel: r, sortByLabel: a, selectFieldLabel: o, sortDir
|
|
|
21432
22127
|
className: W("text-muted-foreground text-sm whitespace-nowrap", n),
|
|
21433
22128
|
children: l
|
|
21434
22129
|
});
|
|
21435
|
-
},
|
|
21436
|
-
let c =
|
|
22130
|
+
}, qT = ({ pagination: e, onPageChange: t, pageSize: n = 10, onPageSizeChange: r, previousLabel: i, nextLabel: a, itemsPerPageLabel: o, formatResultsLabel: s }) => {
|
|
22131
|
+
let c = xT().table, u = wT(), d = e.current, f = e.pages, p = d - 1 > 4 / 2 && f > 4, m = f - d + 1 > 4 / 2 && f > 4;
|
|
21437
22132
|
return f <= 1 && e.count <= n ? null : /* @__PURE__ */ O("div", {
|
|
21438
22133
|
className: "flex items-center justify-between",
|
|
21439
22134
|
children: [!u && /* @__PURE__ */ O("div", {
|
|
21440
22135
|
className: "flex flex-shrink-0 items-center gap-4",
|
|
21441
|
-
children: [r && /* @__PURE__ */ D(
|
|
22136
|
+
children: [r && /* @__PURE__ */ D(GT, {
|
|
21442
22137
|
value: n,
|
|
21443
22138
|
onValueChange: r,
|
|
21444
22139
|
itemsPerPageLabel: o
|
|
21445
|
-
}), /* @__PURE__ */ D(
|
|
22140
|
+
}), /* @__PURE__ */ D(KT, {
|
|
21446
22141
|
pagination: e,
|
|
21447
22142
|
pageSize: n,
|
|
21448
22143
|
formatLabel: s
|
|
@@ -21482,4 +22177,13 @@ var Mw = ({ table: e, sortLabel: r, sortByLabel: a, selectFieldLabel: o, sortDir
|
|
|
21482
22177
|
});
|
|
21483
22178
|
};
|
|
21484
22179
|
//#endregion
|
|
21485
|
-
|
|
22180
|
+
//#region src/components/Textarea/textarea.tsx
|
|
22181
|
+
function JT({ className: e, ...t }) {
|
|
22182
|
+
return /* @__PURE__ */ D("textarea", {
|
|
22183
|
+
"data-slot": "textarea",
|
|
22184
|
+
className: W("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:bg-input/30 dark:aria-invalid:ring-destructive/40 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", e),
|
|
22185
|
+
...t
|
|
22186
|
+
});
|
|
22187
|
+
}
|
|
22188
|
+
//#endregion
|
|
22189
|
+
export { hn as Badge, ar as Button, rr as ButtonGroup, ys as Calendar, bs as CalendarDayButton, XC as CheckFilter, Oc as Checkbox, PT as DataTable, HT as DataTableFilterHeader, FT as DataTableFilterHeaderMobileSorting, ST as DataTableMobile, UT as DataTableMobileSorting, qT as DataTablePagination, RT as DateRangeFilter, zT as DebouncedSearchInput, mm as Dialog, gm as DialogClose, _m as DialogContent, xm as DialogDescription, ym as DialogFooter, vm as DialogHeader, bm as DialogTitle, hm as DialogTrigger, Tx as DynamicIcon, IT as FilterModal, Ex as IconButton, Dx as Input, Ox as NativeSelect, Ax as NativeSelectOptGroup, kx as NativeSelectOption, GT as PageSizeSelector, jx as Pagination, Mx as PaginationContent, Lx as PaginationEllipsis, Nx as PaginationItem, Px as PaginationLink, Ix as PaginationNext, Fx as PaginationPrevious, CS as Popover, ES as PopoverClose, TS as PopoverContent, wS as PopoverTrigger, KT as ResultsCounter, VT as SelectFilter, kS as Separator, AS as Skeleton, VC as Slider, YC as Switch, ET as Table, OT as TableBody, NT as TableCaption, MT as TableCell, kT as TableFooter, jT as TableHead, DT as TableHeader, AT as TableRow, JT as Textarea, bT as WgDesignProvider, mn as badgeVariants, er as buttonGroupVariants, ir as buttonVariants, vT as defaultWgDesignLabels, OS as separatorVariants, nr as useButtonGroup, TT as useDebounce, wT as useIsMobile, CT as useMediaQuery, xT as useWgDesignLabels };
|