@updog/data-editor 0.1.39 → 0.1.40
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/encoding-DUtZMwy0.js +64 -0
- package/index.js +237 -235
- package/package.json +2 -2
- package/parsers-5PN17pZs.js +63 -0
- package/serializers-5crNcEYa.js +51 -0
- package/sheetWorkerSource.generated-FdsWe6Di.js +4 -0
package/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { i as e } from "./encoding-DUtZMwy0.js";
|
|
|
2
2
|
import t, { Children as n, Component as r, Fragment as i, Suspense as a, cloneElement as o, createContext as s, createElement as c, forwardRef as l, isValidElement as u, memo as d, useCallback as f, useContext as p, useEffect as m, useId as h, useImperativeHandle as g, useLayoutEffect as _, useMemo as v, useRef as y, useState as b, useSyncExternalStore as x } from "react";
|
|
3
3
|
import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
4
4
|
import T, { clsx as E } from "clsx";
|
|
5
|
-
import { AlertTriangleIcon as D, ArrowDown as O, ArrowDownZA as k, ArrowRightIcon as A, ArrowUp as j, ArrowUpAZ as M, CalendarIcon as N, CaseSensitiveIcon as P, Check as F, CheckIcon as I, ChevronDown as L, ChevronDownIcon as R, ChevronLeft as
|
|
5
|
+
import { AlertTriangleIcon as D, ArrowDown as O, ArrowDownZA as k, ArrowRightIcon as A, ArrowUp as j, ArrowUpAZ as M, CalendarIcon as N, CaseSensitiveIcon as P, Check as F, CheckIcon as I, ChevronDown as L, ChevronDownIcon as R, ChevronLeft as z, ChevronLeftIcon as B, ChevronRight as V, ChevronRightIcon as ee, CircleAlertIcon as te, CircleCheck as H, CircleX as ne, ClipboardPaste as re, Copy as ie, CopyPlus as ae, DownloadIcon as oe, Eraser as se, Eye as ce, EyeOff as le, FunctionSquare as ue, FunnelIcon as de, Info as fe, InfoIcon as pe, LayoutGridIcon as me, ListPlus as he, LockKeyholeIcon as ge, LockKeyholeOpen as _e, Merge as ve, Minus as ye, Pencil as be, PinIcon as xe, PinOffIcon as Se, PlusIcon as Ce, Redo2Icon as we, ReplaceIcon as Te, RotateCcwIcon as Ee, Scissors as De, SearchIcon as Oe, SendIcon as ke, Split as Ae, SquareIcon as je, Trash2 as Me, Trash2Icon as Ne, TriangleAlert as Pe, Undo2 as Fe, Undo2Icon as Ie, UploadIcon as Le, Wand2 as Re, WholeWordIcon as ze, X as Be, XIcon as Ve } from "lucide-react";
|
|
6
6
|
import { FloatingFocusManager as He, FloatingNode as Ue, FloatingOverlay as We, FloatingPortal as Ge, FloatingTree as Ke, autoPlacement as qe, autoUpdate as Je, flip as Ye, offset as Xe, safePolygon as Ze, shift as Qe, size as $e, useClick as et, useDismiss as tt, useFloating as nt, useFloatingNodeId as rt, useFloatingTree as it, useFocus as at, useHover as ot, useInteractions as st, useListNavigation as ct, useRole as lt, useTransitionStyles as ut, useTypeahead as dt } from "@floating-ui/react";
|
|
7
7
|
import { useDropzone as ft } from "react-dropzone";
|
|
8
8
|
import { v4 as pt } from "uuid";
|
|
@@ -1010,7 +1010,7 @@ var Ci = () => {
|
|
|
1010
1010
|
variant: "filled",
|
|
1011
1011
|
color: "neutral",
|
|
1012
1012
|
onClick: a(-1),
|
|
1013
|
-
content: /* @__PURE__ */ C(
|
|
1013
|
+
content: /* @__PURE__ */ C(z, {
|
|
1014
1014
|
className: "rtl-mirror",
|
|
1015
1015
|
size: "1rem"
|
|
1016
1016
|
}),
|
|
@@ -1019,7 +1019,7 @@ var Ci = () => {
|
|
|
1019
1019
|
variant: "filled",
|
|
1020
1020
|
color: "neutral",
|
|
1021
1021
|
onClick: a(1),
|
|
1022
|
-
content: /* @__PURE__ */ C(
|
|
1022
|
+
content: /* @__PURE__ */ C(V, {
|
|
1023
1023
|
className: "rtl-mirror",
|
|
1024
1024
|
size: "1rem"
|
|
1025
1025
|
}),
|
|
@@ -1462,27 +1462,27 @@ var Qi = l(({ children: e, ...t }, r) => {
|
|
|
1462
1462
|
if (!e) throw Error("useDropdownContext must be used within a DropdownProvider");
|
|
1463
1463
|
return e;
|
|
1464
1464
|
}, na = s({}), ra = () => p(na), ia = (e) => {
|
|
1465
|
-
let { open: t, onOpenChange: n, defaultIsOpen: r, disabled: i = !1, animation: a = !0, placement: o = "bottom", offset: s = 8, flip: c = !0, shift: l = !0, autoPlacement: u = !1, interactions: d = ["click", "dismiss"], role: p = "dialog", minWidth: g, maxWidth: _, minHeight: v, maxHeight: x, matchTriggerWidth: S = !1, typeaheadListRef: C, triggerId: w, contentId: T, middleware: E, clickOptions: D, hoverOptions: O, focusOptions: k, dismissOptions: A, roleOptions: j, listNavigationOptions: M, typeaheadOptions: N } = e, P = h(), F = `${P}-trigger`, I = `${P}-content`, L = w || F, R = T || I, { value:
|
|
1465
|
+
let { open: t, onOpenChange: n, defaultIsOpen: r, disabled: i = !1, animation: a = !0, placement: o = "bottom", offset: s = 8, flip: c = !0, shift: l = !0, autoPlacement: u = !1, interactions: d = ["click", "dismiss"], role: p = "dialog", minWidth: g, maxWidth: _, minHeight: v, maxHeight: x, matchTriggerWidth: S = !1, typeaheadListRef: C, triggerId: w, contentId: T, middleware: E, clickOptions: D, hoverOptions: O, focusOptions: k, dismissOptions: A, roleOptions: j, listNavigationOptions: M, typeaheadOptions: N } = e, P = h(), F = `${P}-trigger`, I = `${P}-content`, L = w || F, R = T || I, { value: z, onChange: B } = Ai({
|
|
1466
1466
|
controlledValue: t,
|
|
1467
1467
|
controlledOnChange: n,
|
|
1468
1468
|
defaultValue: r
|
|
1469
|
-
}),
|
|
1470
|
-
|
|
1471
|
-
}, [
|
|
1469
|
+
}), V = it(), ee = f(() => {
|
|
1470
|
+
B(!1), V && V.events.emit("dismissAll");
|
|
1471
|
+
}, [B, V]);
|
|
1472
1472
|
m(() => {
|
|
1473
|
-
if (!
|
|
1473
|
+
if (!V) return;
|
|
1474
1474
|
let e = () => {
|
|
1475
|
-
|
|
1475
|
+
B(!1);
|
|
1476
1476
|
};
|
|
1477
|
-
return
|
|
1478
|
-
|
|
1477
|
+
return V.events.on("dismissAll", e), () => {
|
|
1478
|
+
V.events.off("dismissAll", e);
|
|
1479
1479
|
};
|
|
1480
|
-
}, [
|
|
1480
|
+
}, [V, B]);
|
|
1481
1481
|
let te = y([]), H = f((e) => (t) => {
|
|
1482
1482
|
te.current[e] = t;
|
|
1483
1483
|
}, []), [ne, re] = b(null), { refs: ie, floatingStyles: ae, context: oe, placement: se } = nt({
|
|
1484
|
-
open:
|
|
1485
|
-
onOpenChange:
|
|
1484
|
+
open: z,
|
|
1485
|
+
onOpenChange: B,
|
|
1486
1486
|
placement: o,
|
|
1487
1487
|
middleware: E ?? [
|
|
1488
1488
|
Xe(s),
|
|
@@ -1562,14 +1562,14 @@ var Qi = l(({ children: e, ...t }, r) => {
|
|
|
1562
1562
|
getReferenceProps: fe,
|
|
1563
1563
|
getFloatingProps: pe,
|
|
1564
1564
|
getItemProps: de("listNavigation") ? me : void 0,
|
|
1565
|
-
open: !!
|
|
1566
|
-
setOpen:
|
|
1565
|
+
open: !!z,
|
|
1566
|
+
setOpen: B,
|
|
1567
1567
|
placement: se,
|
|
1568
1568
|
activeIndex: ne,
|
|
1569
1569
|
setActiveIndex: re,
|
|
1570
1570
|
navigationRef: H,
|
|
1571
1571
|
props: e,
|
|
1572
|
-
dismiss:
|
|
1572
|
+
dismiss: ee,
|
|
1573
1573
|
isMounted: le,
|
|
1574
1574
|
transitionStyles: ue,
|
|
1575
1575
|
triggerId: L,
|
|
@@ -1618,7 +1618,7 @@ var Qi = l(({ children: e, ...t }, r) => {
|
|
|
1618
1618
|
s && e.stopPropagation(), o && e.preventDefault();
|
|
1619
1619
|
}, [s, o]), R = f((e) => {
|
|
1620
1620
|
u.setReference(e);
|
|
1621
|
-
}, [u.setReference]),
|
|
1621
|
+
}, [u.setReference]), z = v(() => {
|
|
1622
1622
|
let { onClick: e, ...n } = I, r = Ui(Ui(t.props.onClick, e), L);
|
|
1623
1623
|
return /* @__PURE__ */ C(Qi, {
|
|
1624
1624
|
ref: R,
|
|
@@ -1635,7 +1635,7 @@ var Qi = l(({ children: e, ...t }, r) => {
|
|
|
1635
1635
|
j,
|
|
1636
1636
|
I,
|
|
1637
1637
|
L
|
|
1638
|
-
]),
|
|
1638
|
+
]), B = v(() => {
|
|
1639
1639
|
if (!k) return null;
|
|
1640
1640
|
let e = /* @__PURE__ */ C("div", {
|
|
1641
1641
|
ref: u.setFloating,
|
|
@@ -1675,10 +1675,10 @@ var Qi = l(({ children: e, ...t }, r) => {
|
|
|
1675
1675
|
value: P,
|
|
1676
1676
|
children: /* @__PURE__ */ w(Ue, {
|
|
1677
1677
|
id: N,
|
|
1678
|
-
children: [/* @__PURE__ */ C(S, { children:
|
|
1678
|
+
children: [/* @__PURE__ */ C(S, { children: z }), c ? /* @__PURE__ */ C(Ge, {
|
|
1679
1679
|
root: typeof c == "boolean" ? void 0 : c,
|
|
1680
|
-
children:
|
|
1681
|
-
}) : /* @__PURE__ */ C(S, { children:
|
|
1680
|
+
children: B
|
|
1681
|
+
}) : /* @__PURE__ */ C(S, { children: B })]
|
|
1682
1682
|
})
|
|
1683
1683
|
});
|
|
1684
1684
|
}, oa = ({ item: e }) => /* @__PURE__ */ C("div", {
|
|
@@ -1736,26 +1736,26 @@ function la(e, t) {
|
|
|
1736
1736
|
onTouchCancel: (e) => {
|
|
1737
1737
|
k.onTouchCancel();
|
|
1738
1738
|
}
|
|
1739
|
-
} : {}, [S, k]), { onClick: R, ...
|
|
1739
|
+
} : {}, [S, k]), { onClick: R, ...z } = x, B = f((e) => {
|
|
1740
1740
|
R?.(e), N();
|
|
1741
1741
|
}, [R, N]);
|
|
1742
1742
|
return /* @__PURE__ */ C(aa, {
|
|
1743
1743
|
portal: g,
|
|
1744
1744
|
trigger: v(() => /* @__PURE__ */ C(Qi, {
|
|
1745
1745
|
ref: t,
|
|
1746
|
-
...
|
|
1746
|
+
...z,
|
|
1747
1747
|
...D ? { "aria-describedby": M } : {},
|
|
1748
|
-
onClick:
|
|
1748
|
+
onClick: B,
|
|
1749
1749
|
onBlur: P,
|
|
1750
1750
|
onMouseLeave: F,
|
|
1751
1751
|
...L,
|
|
1752
1752
|
children: I
|
|
1753
1753
|
}), [
|
|
1754
1754
|
t,
|
|
1755
|
-
|
|
1755
|
+
z,
|
|
1756
1756
|
D,
|
|
1757
1757
|
M,
|
|
1758
|
-
|
|
1758
|
+
B,
|
|
1759
1759
|
P,
|
|
1760
1760
|
F,
|
|
1761
1761
|
L,
|
|
@@ -1824,7 +1824,7 @@ var ua = l(la), da = (e) => !("type" in e), fa = (e) => "type" in e && e.type ==
|
|
|
1824
1824
|
e.accessory && e.accessory,
|
|
1825
1825
|
e.options && !e.disabled && /* @__PURE__ */ C("span", {
|
|
1826
1826
|
className: "updog-menu__option-endAccessory",
|
|
1827
|
-
children: C(i ?
|
|
1827
|
+
children: C(i ? B : ee, { size: "1rem" })
|
|
1828
1828
|
})
|
|
1829
1829
|
]
|
|
1830
1830
|
});
|
|
@@ -1902,11 +1902,11 @@ var ua = l(la), da = (e) => !("type" in e), fa = (e) => "type" in e && e.type ==
|
|
|
1902
1902
|
N.events.off("dismissAll", e);
|
|
1903
1903
|
};
|
|
1904
1904
|
}, [N]);
|
|
1905
|
-
let I = h(), L = `${I}-context-trigger`, R = `${I}-context-content`,
|
|
1906
|
-
|
|
1907
|
-
}, []),
|
|
1908
|
-
|
|
1909
|
-
let { refs:
|
|
1905
|
+
let I = h(), L = `${I}-context-trigger`, R = `${I}-context-content`, z = y([]), B = f((e) => (t) => {
|
|
1906
|
+
z.current[e] = t;
|
|
1907
|
+
}, []), V = y([]);
|
|
1908
|
+
V.current = n.filter(da).map((e) => e.text);
|
|
1909
|
+
let { refs: ee, floatingStyles: te, context: H, placement: ne } = nt({
|
|
1910
1910
|
open: k,
|
|
1911
1911
|
onOpenChange: A,
|
|
1912
1912
|
placement: p,
|
|
@@ -1928,7 +1928,7 @@ var ua = l(la), da = (e) => !("type" in e), fa = (e) => "type" in e && e.type ==
|
|
|
1928
1928
|
whileElementsMounted: Je
|
|
1929
1929
|
});
|
|
1930
1930
|
m(() => {
|
|
1931
|
-
D &&
|
|
1931
|
+
D && ee.setPositionReference({ getBoundingClientRect: () => ({
|
|
1932
1932
|
x: D.x,
|
|
1933
1933
|
y: D.y,
|
|
1934
1934
|
width: 0,
|
|
@@ -1938,7 +1938,7 @@ var ua = l(la), da = (e) => !("type" in e), fa = (e) => "type" in e && e.type ==
|
|
|
1938
1938
|
bottom: D.y,
|
|
1939
1939
|
left: D.x
|
|
1940
1940
|
}) });
|
|
1941
|
-
}, [D,
|
|
1941
|
+
}, [D, ee]);
|
|
1942
1942
|
let re = typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches, { isMounted: ie, styles: ae } = ut(H, {
|
|
1943
1943
|
duration: !a || re ? 0 : 100,
|
|
1944
1944
|
initial: { opacity: 0 }
|
|
@@ -1950,7 +1950,7 @@ var ua = l(la), da = (e) => !("type" in e), fa = (e) => "type" in e && e.type ==
|
|
|
1950
1950
|
}),
|
|
1951
1951
|
lt(H, { role: "menu" }),
|
|
1952
1952
|
ct(H, {
|
|
1953
|
-
listRef:
|
|
1953
|
+
listRef: z,
|
|
1954
1954
|
activeIndex: j,
|
|
1955
1955
|
onNavigate: M,
|
|
1956
1956
|
loop: !0,
|
|
@@ -1958,13 +1958,13 @@ var ua = l(la), da = (e) => !("type" in e), fa = (e) => "type" in e && e.type ==
|
|
|
1958
1958
|
rtl: O
|
|
1959
1959
|
}),
|
|
1960
1960
|
dt(H, {
|
|
1961
|
-
listRef:
|
|
1961
|
+
listRef: V,
|
|
1962
1962
|
activeIndex: j,
|
|
1963
1963
|
onMatch: M,
|
|
1964
1964
|
resetMs: 750
|
|
1965
1965
|
})
|
|
1966
1966
|
]), le = y(null), ue = f((e) => {
|
|
1967
|
-
i || (g !== !1 && e.preventDefault(), _ && e.stopPropagation(),
|
|
1967
|
+
i || (g !== !1 && e.preventDefault(), _ && e.stopPropagation(), ee.setPositionReference({ getBoundingClientRect() {
|
|
1968
1968
|
return {
|
|
1969
1969
|
x: e.clientX,
|
|
1970
1970
|
y: e.clientY,
|
|
@@ -1980,7 +1980,7 @@ var ua = l(la), da = (e) => !("type" in e), fa = (e) => "type" in e && e.type ==
|
|
|
1980
1980
|
i,
|
|
1981
1981
|
g,
|
|
1982
1982
|
_,
|
|
1983
|
-
|
|
1983
|
+
ee
|
|
1984
1984
|
]), de = v(() => ({
|
|
1985
1985
|
open: k ?? !1,
|
|
1986
1986
|
setOpen: A,
|
|
@@ -1988,15 +1988,15 @@ var ua = l(la), da = (e) => !("type" in e), fa = (e) => "type" in e && e.type ==
|
|
|
1988
1988
|
placement: ne,
|
|
1989
1989
|
floatingStyles: te,
|
|
1990
1990
|
refs: {
|
|
1991
|
-
setReference:
|
|
1992
|
-
setFloating:
|
|
1991
|
+
setReference: ee.setReference,
|
|
1992
|
+
setFloating: ee.setFloating
|
|
1993
1993
|
},
|
|
1994
1994
|
getReferenceProps: oe,
|
|
1995
1995
|
getFloatingProps: se,
|
|
1996
1996
|
getItemProps: ce,
|
|
1997
1997
|
activeIndex: j,
|
|
1998
1998
|
setActiveIndex: M,
|
|
1999
|
-
navigationRef:
|
|
1999
|
+
navigationRef: B,
|
|
2000
2000
|
context: H,
|
|
2001
2001
|
isMounted: ie,
|
|
2002
2002
|
transitionStyles: ae,
|
|
@@ -2008,13 +2008,13 @@ var ua = l(la), da = (e) => !("type" in e), fa = (e) => "type" in e && e.type ==
|
|
|
2008
2008
|
F,
|
|
2009
2009
|
ne,
|
|
2010
2010
|
te,
|
|
2011
|
-
|
|
2012
|
-
|
|
2011
|
+
ee.setReference,
|
|
2012
|
+
ee.setFloating,
|
|
2013
2013
|
oe,
|
|
2014
2014
|
se,
|
|
2015
2015
|
ce,
|
|
2016
2016
|
j,
|
|
2017
|
-
|
|
2017
|
+
B,
|
|
2018
2018
|
H,
|
|
2019
2019
|
ie,
|
|
2020
2020
|
ae,
|
|
@@ -2040,7 +2040,7 @@ var ua = l(la), da = (e) => !("type" in e), fa = (e) => "type" in e && e.type ==
|
|
|
2040
2040
|
restoreFocus: !1,
|
|
2041
2041
|
modal: !1,
|
|
2042
2042
|
children: /* @__PURE__ */ C("div", {
|
|
2043
|
-
ref:
|
|
2043
|
+
ref: ee.setFloating,
|
|
2044
2044
|
style: {
|
|
2045
2045
|
...te,
|
|
2046
2046
|
...ae
|
|
@@ -2054,7 +2054,7 @@ var ua = l(la), da = (e) => !("type" in e), fa = (e) => "type" in e && e.type ==
|
|
|
2054
2054
|
})
|
|
2055
2055
|
}) : null, [
|
|
2056
2056
|
ie,
|
|
2057
|
-
|
|
2057
|
+
ee.setFloating,
|
|
2058
2058
|
te,
|
|
2059
2059
|
ae,
|
|
2060
2060
|
o,
|
|
@@ -2141,7 +2141,7 @@ var ua = l(la), da = (e) => !("type" in e), fa = (e) => "type" in e && e.type ==
|
|
|
2141
2141
|
e.stopPropagation(), e.preventDefault();
|
|
2142
2142
|
}, []), L = f((e) => {
|
|
2143
2143
|
e.stopPropagation();
|
|
2144
|
-
}, []), R = Object.fromEntries(Object.entries(v).filter(([e]) => e.startsWith("data-"))),
|
|
2144
|
+
}, []), R = Object.fromEntries(Object.entries(v).filter(([e]) => e.startsWith("data-"))), z = /* @__PURE__ */ C("span", {
|
|
2145
2145
|
className: "updog-datepicker__trigger-placeholder updog-text--sm",
|
|
2146
2146
|
children: o || T("ui.datePicker.placeholder")
|
|
2147
2147
|
});
|
|
@@ -2165,7 +2165,7 @@ var ua = l(la), da = (e) => !("type" in e), fa = (e) => "type" in e && e.type ==
|
|
|
2165
2165
|
children: s ? /* @__PURE__ */ C(Ca, {
|
|
2166
2166
|
className: E("updog-datepicker__trigger-value", M[x]),
|
|
2167
2167
|
content: s
|
|
2168
|
-
}) :
|
|
2168
|
+
}) : z
|
|
2169
2169
|
}), /* @__PURE__ */ w("div", {
|
|
2170
2170
|
className: "updog-datepicker__trigger-actions",
|
|
2171
2171
|
children: [
|
|
@@ -2418,7 +2418,7 @@ var Da = ({ text: e, direction: t = "horizontal", width: n, height: r, className
|
|
|
2418
2418
|
}), L = f((e) => {
|
|
2419
2419
|
let t = e.currentTarget.value;
|
|
2420
2420
|
i && (t = t.split("").filter((e) => i.test(e)).join("")), r && r(t, e);
|
|
2421
|
-
}, [r, i]), R = v(() => g?.toString() || "", [g]),
|
|
2421
|
+
}, [r, i]), R = v(() => g?.toString() || "", [g]), z = f((e) => {
|
|
2422
2422
|
i && !i.test(e.key) && ![
|
|
2423
2423
|
"Backspace",
|
|
2424
2424
|
"Delete",
|
|
@@ -2429,7 +2429,7 @@ var Da = ({ text: e, direction: t = "horizontal", width: n, height: r, className
|
|
|
2429
2429
|
"Tab",
|
|
2430
2430
|
"Enter"
|
|
2431
2431
|
].includes(e.key) && e.preventDefault();
|
|
2432
|
-
}, [i]),
|
|
2432
|
+
}, [i]), B = v(() => Ui(_, z), [_, z]);
|
|
2433
2433
|
return /* @__PURE__ */ w("div", {
|
|
2434
2434
|
className: A,
|
|
2435
2435
|
children: [
|
|
@@ -2443,7 +2443,7 @@ var Da = ({ text: e, direction: t = "horizontal", width: n, height: r, className
|
|
|
2443
2443
|
size: void 0,
|
|
2444
2444
|
className: j,
|
|
2445
2445
|
onChange: L,
|
|
2446
|
-
onKeyDown:
|
|
2446
|
+
onKeyDown: B,
|
|
2447
2447
|
value: g,
|
|
2448
2448
|
"aria-invalid": l
|
|
2449
2449
|
}),
|
|
@@ -2575,11 +2575,11 @@ var Da = ({ text: e, direction: t = "horizontal", width: n, height: r, className
|
|
|
2575
2575
|
//#endregion
|
|
2576
2576
|
//#region ../ui-kit/src/components/Menu/index.tsx
|
|
2577
2577
|
function Na(e, t) {
|
|
2578
|
-
let { open: n, onOpenChange: r, defaultIsOpen: i, trigger: a, children: o, options: s, onSelect: c, placement: l = "bottom-start", offset: u = 8, contentClassName: d, preventDefaultOnTrigger: p, stopPropagationOnTrigger: m, minHeight: g, maxHeight: _, minWidth: b, maxWidth: x, disabled: S, middleware: w, flip: T, shift: D, autoPlacement: O, clickOptions: k, hoverOptions: A, focusOptions: j, dismissOptions: M, roleOptions: N, listNavigationOptions: P, typeaheadOptions: F, floatingFocusManager: I, ariaLabel: L, triggerId: R, contentId:
|
|
2578
|
+
let { open: n, onOpenChange: r, defaultIsOpen: i, trigger: a, children: o, options: s, onSelect: c, placement: l = "bottom-start", offset: u = 8, contentClassName: d, preventDefaultOnTrigger: p, stopPropagationOnTrigger: m, minHeight: g, maxHeight: _, minWidth: b, maxWidth: x, disabled: S, middleware: w, flip: T, shift: D, autoPlacement: O, clickOptions: k, hoverOptions: A, focusOptions: j, dismissOptions: M, roleOptions: N, listNavigationOptions: P, typeaheadOptions: F, floatingFocusManager: I, ariaLabel: L, triggerId: R, contentId: z, matchTriggerWidth: B, typeaheadListRef: V, portal: ee, ...te } = e, { rtl: H } = K(), { value: ne, onChange: re } = Ai({
|
|
2579
2579
|
controlledValue: n,
|
|
2580
2580
|
controlledOnChange: r,
|
|
2581
2581
|
defaultValue: i
|
|
2582
|
-
}), ie = y(null), ae = h(), oe = o.props.id || R || `${ae}-trigger`, se =
|
|
2582
|
+
}), ie = y(null), ae = h(), oe = o.props.id || R || `${ae}-trigger`, se = z || (o.props.id ? `${o.props.id}-content` : `${ae}-content`), ce = y([]);
|
|
2583
2583
|
v(() => {
|
|
2584
2584
|
ce.current = s.filter(da).map((e) => e.text);
|
|
2585
2585
|
}, [s]);
|
|
@@ -2600,11 +2600,11 @@ function Na(e, t) {
|
|
|
2600
2600
|
options: s,
|
|
2601
2601
|
rtl: H,
|
|
2602
2602
|
rootTriggerRef: ie,
|
|
2603
|
-
portal:
|
|
2603
|
+
portal: ee,
|
|
2604
2604
|
minWidth: b
|
|
2605
2605
|
},
|
|
2606
2606
|
children: /* @__PURE__ */ C(aa, {
|
|
2607
|
-
portal:
|
|
2607
|
+
portal: ee,
|
|
2608
2608
|
trigger: de,
|
|
2609
2609
|
content: /* @__PURE__ */ C(ga, { options: s }),
|
|
2610
2610
|
triggerId: oe,
|
|
@@ -2632,7 +2632,7 @@ function Na(e, t) {
|
|
|
2632
2632
|
roleOptions: N,
|
|
2633
2633
|
typeaheadOptions: F,
|
|
2634
2634
|
ariaLabel: L,
|
|
2635
|
-
matchTriggerWidth:
|
|
2635
|
+
matchTriggerWidth: B,
|
|
2636
2636
|
floatingFocusManager: {
|
|
2637
2637
|
initialFocus: -1,
|
|
2638
2638
|
returnFocus: !0,
|
|
@@ -2647,7 +2647,7 @@ function Na(e, t) {
|
|
|
2647
2647
|
loop: !0,
|
|
2648
2648
|
...P
|
|
2649
2649
|
},
|
|
2650
|
-
typeaheadListRef:
|
|
2650
|
+
typeaheadListRef: V ?? ce,
|
|
2651
2651
|
preventDefaultOnTrigger: p,
|
|
2652
2652
|
stopPropagationOnTrigger: m,
|
|
2653
2653
|
minHeight: g,
|
|
@@ -2661,7 +2661,7 @@ var Pa = l(Na);
|
|
|
2661
2661
|
//#endregion
|
|
2662
2662
|
//#region ../ui-kit/src/components/Popover/index.tsx
|
|
2663
2663
|
function Fa(e, t) {
|
|
2664
|
-
let { trigger: n, children: r, content: i, open: a, onOpenChange: o, defaultIsOpen: s, placement: c = "bottom-start", offset: l = 8, maxWidth: d = 320, contentClassName: f, flip: p, shift: m, autoPlacement: g, middleware: _, clickOptions: v, hoverOptions: y, focusOptions: b, dismissOptions: x, roleOptions: S, listNavigationOptions: w, typeaheadOptions: T, floatingFocusManager: D, ariaLabel: O, triggerId: k, contentId: A, minWidth: j, minHeight: M, maxHeight: N, matchTriggerWidth: P, typeaheadListRef: F, disabled: I, preventDefaultOnTrigger: L, stopPropagationOnTrigger: R, portal:
|
|
2664
|
+
let { trigger: n, children: r, content: i, open: a, onOpenChange: o, defaultIsOpen: s, placement: c = "bottom-start", offset: l = 8, maxWidth: d = 320, contentClassName: f, flip: p, shift: m, autoPlacement: g, middleware: _, clickOptions: v, hoverOptions: y, focusOptions: b, dismissOptions: x, roleOptions: S, listNavigationOptions: w, typeaheadOptions: T, floatingFocusManager: D, ariaLabel: O, triggerId: k, contentId: A, minWidth: j, minHeight: M, maxHeight: N, matchTriggerWidth: P, typeaheadListRef: F, disabled: I, preventDefaultOnTrigger: L, stopPropagationOnTrigger: R, portal: z, ...B } = e, { value: V, onChange: ee } = Ai({
|
|
2665
2665
|
controlledValue: a,
|
|
2666
2666
|
controlledOnChange: o,
|
|
2667
2667
|
defaultValue: s
|
|
@@ -2669,14 +2669,14 @@ function Fa(e, t) {
|
|
|
2669
2669
|
return /* @__PURE__ */ C(aa, {
|
|
2670
2670
|
trigger: /* @__PURE__ */ C(Qi, {
|
|
2671
2671
|
ref: t,
|
|
2672
|
-
...
|
|
2672
|
+
...B,
|
|
2673
2673
|
children: re
|
|
2674
2674
|
}),
|
|
2675
2675
|
content: i,
|
|
2676
2676
|
triggerId: H,
|
|
2677
2677
|
contentId: ne,
|
|
2678
|
-
open:
|
|
2679
|
-
onOpenChange:
|
|
2678
|
+
open: V,
|
|
2679
|
+
onOpenChange: ee,
|
|
2680
2680
|
interactions: ["click", "dismiss"],
|
|
2681
2681
|
role: "dialog",
|
|
2682
2682
|
placement: c,
|
|
@@ -2710,7 +2710,7 @@ function Fa(e, t) {
|
|
|
2710
2710
|
disabled: I,
|
|
2711
2711
|
preventDefaultOnTrigger: L,
|
|
2712
2712
|
stopPropagationOnTrigger: R,
|
|
2713
|
-
portal:
|
|
2713
|
+
portal: z
|
|
2714
2714
|
});
|
|
2715
2715
|
}
|
|
2716
2716
|
l(Fa);
|
|
@@ -2890,7 +2890,7 @@ var Ba = () => {
|
|
|
2890
2890
|
size: s
|
|
2891
2891
|
};
|
|
2892
2892
|
}, Ha = l((e = {}, t) => {
|
|
2893
|
-
let { t: n } = K(), { disabled: r, size: i, placeholder: a, inputId: o, searchValue: s, setSearchValue: c, onClear: l, showClearButton: u, invalid: d, loading: p, onSelect: m, multiple: h, value: g, open: _, contentId: y, activeDescId: b, onInputKeyDownCapture: x, onInputFocus: S, dataAttributes: T, searchInputRef: D } = Va(), O = v(() => !h || !g ? [] : Array.isArray(g) ? g : [g], [h, g]), { onClick: k, onFocus: A, onKeyDown: j, onMouseDown: M, onPointerDown: N, onPointerEnter: P, id: F, className: I, role: L, tabIndex: R, "aria-expanded":
|
|
2893
|
+
let { t: n } = K(), { disabled: r, size: i, placeholder: a, inputId: o, searchValue: s, setSearchValue: c, onClear: l, showClearButton: u, invalid: d, loading: p, onSelect: m, multiple: h, value: g, open: _, contentId: y, activeDescId: b, onInputKeyDownCapture: x, onInputFocus: S, dataAttributes: T, searchInputRef: D } = Va(), O = v(() => !h || !g ? [] : Array.isArray(g) ? g : [g], [h, g]), { onClick: k, onFocus: A, onKeyDown: j, onMouseDown: M, onPointerDown: N, onPointerEnter: P, id: F, className: I, role: L, tabIndex: R, "aria-expanded": z, "aria-haspopup": B, "aria-controls": V, "aria-activedescendant": ee, ...te } = e, H = f((e) => {
|
|
2894
2894
|
let t = O.find((t) => t.id === e);
|
|
2895
2895
|
t && (m(t), D.current?.focus());
|
|
2896
2896
|
}, [
|
|
@@ -3106,11 +3106,11 @@ var Wa = s(void 0), Ga = Wa.Provider, Ka = () => {
|
|
|
3106
3106
|
if (!_) return [];
|
|
3107
3107
|
let e = Array.isArray(_) ? _ : [_];
|
|
3108
3108
|
return b.filter(Ya).filter((t) => e.includes(t.id));
|
|
3109
|
-
}, [_, b]), L = E("updog-select__trigger", `updog-select__trigger--${O}`, i && "updog-select__trigger--disabled", r && "updog-select__trigger--invalid", A && "updog-select__trigger--focused", g && I.length > 0 && "updog-select__trigger--with-tags", n),
|
|
3109
|
+
}, [_, b]), L = E("updog-select__trigger", `updog-select__trigger--${O}`, i && "updog-select__trigger--disabled", r && "updog-select__trigger--invalid", A && "updog-select__trigger--focused", g && I.length > 0 && "updog-select__trigger--with-tags", n), z = u ? n : L, B = f((e) => {
|
|
3110
3110
|
e.stopPropagation(), e.preventDefault(), l?.(), j.current?.focus();
|
|
3111
|
-
}, [l]),
|
|
3111
|
+
}, [l]), V = f((e) => {
|
|
3112
3112
|
e.stopPropagation(), e.preventDefault();
|
|
3113
|
-
}, []),
|
|
3113
|
+
}, []), ee = f((e) => {
|
|
3114
3114
|
e.stopPropagation();
|
|
3115
3115
|
}, []), te = Object.fromEntries(Object.entries(T).filter(([e]) => e.startsWith("data-"))), H = /* @__PURE__ */ C("span", {
|
|
3116
3116
|
className: "updog-select__trigger-placeholder updog-text--sm",
|
|
@@ -3120,7 +3120,7 @@ var Wa = s(void 0), Ga = Wa.Provider, Ka = () => {
|
|
|
3120
3120
|
...e,
|
|
3121
3121
|
...te,
|
|
3122
3122
|
ref: M,
|
|
3123
|
-
className:
|
|
3123
|
+
className: z,
|
|
3124
3124
|
tabIndex: u || i ? -1 : 0,
|
|
3125
3125
|
role: "button",
|
|
3126
3126
|
"aria-haspopup": "listbox",
|
|
@@ -3152,9 +3152,9 @@ var Wa = s(void 0), Ga = Wa.Provider, Ka = () => {
|
|
|
3152
3152
|
variant: "filled",
|
|
3153
3153
|
size: Hi[O],
|
|
3154
3154
|
color: "neutral",
|
|
3155
|
-
onClick:
|
|
3156
|
-
onKeyDown:
|
|
3157
|
-
onMouseDown:
|
|
3155
|
+
onClick: B,
|
|
3156
|
+
onKeyDown: ee,
|
|
3157
|
+
onMouseDown: V,
|
|
3158
3158
|
onPointerDown: (e) => e.stopPropagation(),
|
|
3159
3159
|
content: /* @__PURE__ */ C(Ve, {}),
|
|
3160
3160
|
"aria-label": k("ui.select.clearSelection"),
|
|
@@ -3182,19 +3182,19 @@ var Wa = s(void 0), Ga = Wa.Provider, Ka = () => {
|
|
|
3182
3182
|
controlledValue: t,
|
|
3183
3183
|
controlledOnChange: n,
|
|
3184
3184
|
defaultValue: !1
|
|
3185
|
-
}), L = h(), R = S || L,
|
|
3185
|
+
}), L = h(), R = S || L, z = `${R}-trigger`, B = `${R}-content`, V = y([]);
|
|
3186
3186
|
m(() => {
|
|
3187
|
-
|
|
3187
|
+
V.current = r.filter(Ya).map((e) => e.text ?? null);
|
|
3188
3188
|
}, [r]);
|
|
3189
|
-
let
|
|
3189
|
+
let ee = v(() => {
|
|
3190
3190
|
if (!s) return [];
|
|
3191
3191
|
let e = Array.isArray(s) ? s : [s];
|
|
3192
3192
|
return r.filter(Ya).filter((t) => e.includes(t.id));
|
|
3193
3193
|
}, [s, r]), te = v(() => {
|
|
3194
|
-
if (
|
|
3195
|
-
let e =
|
|
3194
|
+
if (ee.length === 0) return "";
|
|
3195
|
+
let e = ee.map((e) => e.text).join(", ");
|
|
3196
3196
|
return u ? u(e) : e;
|
|
3197
|
-
}, [
|
|
3197
|
+
}, [ee, u]), H = f((e) => {
|
|
3198
3198
|
let t = r.filter(Ya).find((t) => t.id === e);
|
|
3199
3199
|
if (o) {
|
|
3200
3200
|
let n = Array.isArray(s) ? s : [];
|
|
@@ -3214,15 +3214,15 @@ var Wa = s(void 0), Ga = Wa.Provider, Ka = () => {
|
|
|
3214
3214
|
hasValue: ne,
|
|
3215
3215
|
showClearButton: re,
|
|
3216
3216
|
onSelect: H,
|
|
3217
|
-
contentId:
|
|
3217
|
+
contentId: B,
|
|
3218
3218
|
maxHeight: _
|
|
3219
3219
|
},
|
|
3220
3220
|
children: /* @__PURE__ */ C(aa, {
|
|
3221
3221
|
portal: E,
|
|
3222
3222
|
trigger: /* @__PURE__ */ C(Qa, {}),
|
|
3223
3223
|
content: /* @__PURE__ */ C(Za, {}),
|
|
3224
|
-
triggerId:
|
|
3225
|
-
contentId:
|
|
3224
|
+
triggerId: z,
|
|
3225
|
+
contentId: B,
|
|
3226
3226
|
open: F,
|
|
3227
3227
|
onOpenChange: I,
|
|
3228
3228
|
disabled: a,
|
|
@@ -3257,7 +3257,7 @@ var Wa = s(void 0), Ga = Wa.Provider, Ka = () => {
|
|
|
3257
3257
|
maxWidth: p,
|
|
3258
3258
|
minHeight: g,
|
|
3259
3259
|
maxHeight: _,
|
|
3260
|
-
typeaheadListRef:
|
|
3260
|
+
typeaheadListRef: V,
|
|
3261
3261
|
preventDefaultOnTrigger: w,
|
|
3262
3262
|
stopPropagationOnTrigger: T
|
|
3263
3263
|
})
|
|
@@ -10252,7 +10252,7 @@ function zl({ columns: e, primaryKey: t, loadData: n, scaleClient: r, onComplete
|
|
|
10252
10252
|
N.setSchemaColumns(e);
|
|
10253
10253
|
let { addDynamicColumns: P, removeDynamicColumn: F, updateColumn: I } = Nl(N), L = f((e) => {
|
|
10254
10254
|
N.setDynamicColumns(e);
|
|
10255
|
-
}, [N]), R = x(N.subscribe, N.getEffectiveColumns), { navigateToCell:
|
|
10255
|
+
}, [N]), R = x(N.subscribe, N.getEffectiveColumns), { navigateToCell: z, navigateByIndex: B, navigateToCellRef: V, resetScrollRef: ee, scrollToGridTop: te } = Pl(N), { validator: H, validatorRef: ne, findReplace: re } = Rl(N, R, r?.findAndReplace, B), { search: ie, setSearch: ae, matchCase: oe, setMatchCase: se, matchEntireCell: ce, setMatchEntireCell: le, searchMode: ue, setSearchMode: de, filterColumns: fe, setFilterColumns: pe, filtersResetKey: me, resetFilters: he } = Il(N, re, z, te);
|
|
10256
10256
|
Ml(N, ne, n, M);
|
|
10257
10257
|
let { onVisibleRangeChange: ge } = Ll(N, M), { portalRef: _e } = Fl(), [ve, ye] = b(null), [be, xe] = b(null), Se = f((e) => {
|
|
10258
10258
|
xe(e), s(!0);
|
|
@@ -10294,9 +10294,9 @@ function zl({ columns: e, primaryKey: t, loadData: n, scaleClient: r, onComplete
|
|
|
10294
10294
|
setSearchMode: de,
|
|
10295
10295
|
filterColumns: fe,
|
|
10296
10296
|
setFilterColumns: pe,
|
|
10297
|
-
navigateToCell:
|
|
10298
|
-
navigateToCellRef:
|
|
10299
|
-
resetScrollRef:
|
|
10297
|
+
navigateToCell: z,
|
|
10298
|
+
navigateToCellRef: V,
|
|
10299
|
+
resetScrollRef: ee,
|
|
10300
10300
|
scrollToGridTop: te,
|
|
10301
10301
|
portalRef: _e,
|
|
10302
10302
|
readonly: y ?? !1,
|
|
@@ -10645,11 +10645,11 @@ var au = ({ open: e, onClose: t, onConfirm: n, loading: r = !1 }) => {
|
|
|
10645
10645
|
e,
|
|
10646
10646
|
n,
|
|
10647
10647
|
N
|
|
10648
|
-
]), L = s("dataEditor.footer.export"),
|
|
10648
|
+
]), L = s("dataEditor.footer.export"), z = s("dataEditor.footer.exportAll"), B = s("dataEditor.footer.exportFiltered"), V = s("dataEditor.footer.csvFormat"), ee = s("dataEditor.footer.excelFormat"), te = s("dataEditor.footer.jsonFormat"), H = s("dataEditor.footer.tsvFormat"), ne = s("dataEditor.footer.xmlFormat"), re = v(() => [
|
|
10649
10649
|
{
|
|
10650
10650
|
menuId: "csv",
|
|
10651
10651
|
format: "csv",
|
|
10652
|
-
text:
|
|
10652
|
+
text: V
|
|
10653
10653
|
},
|
|
10654
10654
|
{
|
|
10655
10655
|
menuId: "tsv",
|
|
@@ -10659,7 +10659,7 @@ var au = ({ open: e, onClose: t, onConfirm: n, loading: r = !1 }) => {
|
|
|
10659
10659
|
{
|
|
10660
10660
|
menuId: "excel",
|
|
10661
10661
|
format: "xlsx",
|
|
10662
|
-
text:
|
|
10662
|
+
text: ee
|
|
10663
10663
|
},
|
|
10664
10664
|
{
|
|
10665
10665
|
menuId: "json",
|
|
@@ -10672,31 +10672,31 @@ var au = ({ open: e, onClose: t, onConfirm: n, loading: r = !1 }) => {
|
|
|
10672
10672
|
text: ne
|
|
10673
10673
|
}
|
|
10674
10674
|
], [
|
|
10675
|
-
B,
|
|
10676
|
-
H,
|
|
10677
10675
|
V,
|
|
10676
|
+
H,
|
|
10677
|
+
ee,
|
|
10678
10678
|
te,
|
|
10679
10679
|
ne
|
|
10680
10680
|
]), ie = r !== !1 && (!e.isServer() || e.hasServerExport), ae = v(() => {
|
|
10681
10681
|
let e = r === !1 ? [] : re.filter((e) => r.includes(e.format));
|
|
10682
10682
|
return [{
|
|
10683
10683
|
id: "export-all",
|
|
10684
|
-
text:
|
|
10684
|
+
text: z,
|
|
10685
10685
|
options: e.map((e) => ({
|
|
10686
10686
|
id: `all-${e.menuId}`,
|
|
10687
10687
|
text: e.text
|
|
10688
10688
|
}))
|
|
10689
10689
|
}, {
|
|
10690
10690
|
id: "export-filtered",
|
|
10691
|
-
text:
|
|
10691
|
+
text: B,
|
|
10692
10692
|
options: e.map((e) => ({
|
|
10693
10693
|
id: `filtered-${e.menuId}`,
|
|
10694
10694
|
text: e.text
|
|
10695
10695
|
}))
|
|
10696
10696
|
}];
|
|
10697
10697
|
}, [
|
|
10698
|
-
ee,
|
|
10699
10698
|
z,
|
|
10699
|
+
B,
|
|
10700
10700
|
re,
|
|
10701
10701
|
r
|
|
10702
10702
|
]), oe = f((n) => {
|
|
@@ -17009,7 +17009,7 @@ var Dg = ({ controller: e, store: t, columnSnapshot: n, readonly: r, enableDelet
|
|
|
17009
17009
|
e,
|
|
17010
17010
|
C,
|
|
17011
17011
|
I
|
|
17012
|
-
]),
|
|
17012
|
+
]), z = f((t) => {
|
|
17013
17013
|
let n = A;
|
|
17014
17014
|
D(), n && e.actions.applyFormula(t, {}, n);
|
|
17015
17015
|
}, [
|
|
@@ -17032,7 +17032,7 @@ var Dg = ({ controller: e, store: t, columnSnapshot: n, readonly: r, enableDelet
|
|
|
17032
17032
|
closeTransformModal: I,
|
|
17033
17033
|
showFormulaModal: T,
|
|
17034
17034
|
closeFormulaModal: D,
|
|
17035
|
-
handleApplyFormula:
|
|
17035
|
+
handleApplyFormula: z,
|
|
17036
17036
|
formulaColumnIds: O,
|
|
17037
17037
|
formulaScope: A
|
|
17038
17038
|
};
|
|
@@ -19065,9 +19065,9 @@ var f_ = {
|
|
|
19065
19065
|
"--marker-width": "76px",
|
|
19066
19066
|
"--track-size": "12px"
|
|
19067
19067
|
}, p_ = () => {
|
|
19068
|
-
let { columns: e, store: t, readonly: n, enableDeleteRow: r, enableAddRow: i, validator: a, navigateToCellRef: o, resetScrollRef: s, findReplace: c, dynamicColumns: l, updateColumn: u, enableCreateColumn: d, onVisibleRangeChange: p } = X(), { filteredCount: h, sortState: g, showOnlyDeletedRows: E, phase: D, isLoading: O, processing: k, filterCriteriaVersion: A } = Bo(t), j = O && h === 0 ? 30 : h, { t: M, rtl: N } = K(), P = x(t.subscribe, t.getSnapshot, t.getSnapshot).version, F = y(null), I = y(null), L = y(null), R = i_(t, e, n, a, E, N),
|
|
19068
|
+
let { columns: e, store: t, readonly: n, enableDeleteRow: r, enableAddRow: i, validator: a, navigateToCellRef: o, resetScrollRef: s, findReplace: c, dynamicColumns: l, updateColumn: u, enableCreateColumn: d, onVisibleRangeChange: p } = X(), { filteredCount: h, sortState: g, showOnlyDeletedRows: E, phase: D, isLoading: O, processing: k, filterCriteriaVersion: A } = Bo(t), j = O && h === 0 ? 30 : h, { t: M, rtl: N } = K(), P = x(t.subscribe, t.getSnapshot, t.getSnapshot).version, F = y(null), I = y(null), L = y(null), R = i_(t, e, n, a, E, N), z = o_(R), B = a_(R), V = wg(R), { editing: ee } = R, te = y(null), H = y(null);
|
|
19069
19069
|
if (te.current === null) {
|
|
19070
|
-
let { columns: e, pinnedColumnIds: t, stickyOffsets: n } =
|
|
19070
|
+
let { columns: e, pinnedColumnIds: t, stickyOffsets: n } = V;
|
|
19071
19071
|
te.current = new rd(e, new Set(t), n, N);
|
|
19072
19072
|
}
|
|
19073
19073
|
let ne = te.current;
|
|
@@ -19087,17 +19087,17 @@ var f_ = {
|
|
|
19087
19087
|
}, [R, g]), m(() => {
|
|
19088
19088
|
R.clipboard.setTranslate(M);
|
|
19089
19089
|
}, [R, M]), m(() => {
|
|
19090
|
-
R.setBounds(h,
|
|
19090
|
+
R.setBounds(h, V.columns.length);
|
|
19091
19091
|
}, [
|
|
19092
19092
|
R,
|
|
19093
19093
|
h,
|
|
19094
|
-
|
|
19094
|
+
V.columns.length
|
|
19095
19095
|
]), m(() => {
|
|
19096
|
-
c.updateColumns(
|
|
19097
|
-
}, [c,
|
|
19098
|
-
let e =
|
|
19096
|
+
c.updateColumns(V.columns);
|
|
19097
|
+
}, [c, V.columns]), m(() => {
|
|
19098
|
+
let e = V.columns;
|
|
19099
19099
|
R.actions.updateColumns(e), R.editing.updateColumns(e), R.clipboard.updateColumns(e);
|
|
19100
|
-
}, [R,
|
|
19100
|
+
}, [R, V.columns]);
|
|
19101
19101
|
let re = v(() => new Set(l.map((e) => e.id)), [l]), [ie, ae] = b(null), oe = f((e) => {
|
|
19102
19102
|
ae(e);
|
|
19103
19103
|
}, []), se = f(() => {
|
|
@@ -19107,10 +19107,10 @@ var f_ = {
|
|
|
19107
19107
|
...ie,
|
|
19108
19108
|
...e
|
|
19109
19109
|
}), ae(null);
|
|
19110
|
-
}, [ie, u]), le = v(() =>
|
|
19110
|
+
}, [ie, u]), le = v(() => V.columns.map((e) => e.title), [V.columns]), { anchor: ue, items: de, handleCanvasContextMenu: fe, handleSelect: pe, handleOpenChange: me, transformModal: he, transformModalColIds: ge, transformModalScope: _e, handleApplyMerge: ve, handleApplySplit: ye, closeTransformModal: be, showFormulaModal: xe, closeFormulaModal: Se, handleApplyFormula: Ce, formulaColumnIds: we, formulaScope: Te } = Dg({
|
|
19111
19111
|
controller: R,
|
|
19112
19112
|
store: t,
|
|
19113
|
-
columnSnapshot:
|
|
19113
|
+
columnSnapshot: V,
|
|
19114
19114
|
readonly: n,
|
|
19115
19115
|
enableDeleteRow: r,
|
|
19116
19116
|
enableAddRow: i,
|
|
@@ -19127,10 +19127,10 @@ var f_ = {
|
|
|
19127
19127
|
e?.removeEventListener("scroll", n), t?.removeEventListener("scroll", n);
|
|
19128
19128
|
};
|
|
19129
19129
|
}, [ue, me]);
|
|
19130
|
-
let Ee = !
|
|
19130
|
+
let Ee = !B.isEditing && ue === null, De = c_(F, z.focusCell, Ee, ne, h, H, I, L), Oe = f((e) => {
|
|
19131
19131
|
R.keyboard.handleKeyDown(e.nativeEvent);
|
|
19132
19132
|
}, [R]);
|
|
19133
|
-
d_(F, R, ne, h,
|
|
19133
|
+
d_(F, R, ne, h, V.columns.length, n, fe, H, I, L);
|
|
19134
19134
|
let ke = f(() => {
|
|
19135
19135
|
F.current?.focus();
|
|
19136
19136
|
}, []);
|
|
@@ -19153,7 +19153,7 @@ var f_ = {
|
|
|
19153
19153
|
controller: R,
|
|
19154
19154
|
store: t,
|
|
19155
19155
|
filteredCount: j,
|
|
19156
|
-
columnSnapshot:
|
|
19156
|
+
columnSnapshot: V,
|
|
19157
19157
|
containerRef: F,
|
|
19158
19158
|
sortState: g,
|
|
19159
19159
|
engine: ne,
|
|
@@ -19165,7 +19165,7 @@ var f_ = {
|
|
|
19165
19165
|
}), /* @__PURE__ */ C(pu, {
|
|
19166
19166
|
engine: ne,
|
|
19167
19167
|
controller: R,
|
|
19168
|
-
columns:
|
|
19168
|
+
columns: V.columns,
|
|
19169
19169
|
filteredCount: h,
|
|
19170
19170
|
containerRef: F
|
|
19171
19171
|
})]
|
|
@@ -19175,19 +19175,19 @@ var f_ = {
|
|
|
19175
19175
|
target: De,
|
|
19176
19176
|
containerRef: F,
|
|
19177
19177
|
store: t,
|
|
19178
|
-
columns:
|
|
19178
|
+
columns: V.columns,
|
|
19179
19179
|
storeVersion: P,
|
|
19180
19180
|
engine: ne,
|
|
19181
19181
|
disabled: he !== null || ie !== null || xe
|
|
19182
19182
|
}),
|
|
19183
|
-
|
|
19184
|
-
editing:
|
|
19185
|
-
editingSnapshot:
|
|
19183
|
+
B.isEditing && /* @__PURE__ */ C(gd, {
|
|
19184
|
+
editing: ee,
|
|
19185
|
+
editingSnapshot: B,
|
|
19186
19186
|
layout: ne.layout,
|
|
19187
19187
|
viewport: ne.viewport,
|
|
19188
19188
|
onAfterEdit: ke,
|
|
19189
|
-
columns:
|
|
19190
|
-
},
|
|
19189
|
+
columns: V.columns
|
|
19190
|
+
}, B.version),
|
|
19191
19191
|
/* @__PURE__ */ C("div", {
|
|
19192
19192
|
ref: I,
|
|
19193
19193
|
className: "updog-grid__vtrack",
|
|
@@ -20019,7 +20019,7 @@ var f_ = {
|
|
|
20019
20019
|
y
|
|
20020
20020
|
]), L = f(() => {
|
|
20021
20021
|
n.replaceAll(y);
|
|
20022
|
-
}, [n, y]), R = h > 0,
|
|
20022
|
+
}, [n, y]), R = h > 0, z = _ ? `${h}...` : `${g + 1}/${h}`;
|
|
20023
20023
|
return /* @__PURE__ */ w("div", {
|
|
20024
20024
|
className: "updog__search-section",
|
|
20025
20025
|
children: [
|
|
@@ -20051,7 +20051,7 @@ var f_ = {
|
|
|
20051
20051
|
/* @__PURE__ */ C(q, {
|
|
20052
20052
|
size: "sm",
|
|
20053
20053
|
className: "updog__search-section__counter-text",
|
|
20054
|
-
children:
|
|
20054
|
+
children: z
|
|
20055
20055
|
}),
|
|
20056
20056
|
/* @__PURE__ */ C(ua, {
|
|
20057
20057
|
content: p("dataEditor.filters.previousOccurrence"),
|
|
@@ -21682,7 +21682,7 @@ var Y_ = ({ text: e, onSelect: t }) => /* @__PURE__ */ C(J, {
|
|
|
21682
21682
|
children: /* @__PURE__ */ C(Pv, {})
|
|
21683
21683
|
}), /* @__PURE__ */ C(lv, {})] })] });
|
|
21684
21684
|
}, Iv = 20, Lv = () => {
|
|
21685
|
-
let { columns: e, store: t } = X(), { t: n } = K(), { primaryKey: r,
|
|
21685
|
+
let { columns: e, store: t } = X(), { t: n } = K(), { primaryKey: r, onPrimaryKeyChange: i, parsedCsv: a, columnMapping: o } = wy(), s = t.isClient(), c = f(() => i(null), [i]), l = e.filter((e) => e.unique), u = v(() => {
|
|
21686
21686
|
let e = {};
|
|
21687
21687
|
for (let [t, n] of Object.entries(o)) n && (e[n] = t);
|
|
21688
21688
|
return e;
|
|
@@ -22215,14 +22215,16 @@ var _y = 5e3, vy = 15, yy = 20, by = new Set([
|
|
|
22215
22215
|
"ods"
|
|
22216
22216
|
]);
|
|
22217
22217
|
function xy() {
|
|
22218
|
-
let { store: e, validator: t, columns: n, primaryKey: r, setShowUploader: i, pendingImportFile: a, setPendingImportFile: o, onColumnMatch: s, onValueMatch: c, synonyms: l, addDynamicColumns: u, scaleClient: d } = X(), { t: p } = K(), [h, g] = b(0), [_, x] = b(0), [S, w] = b(null), [T, E] = b({}), D = n.filter((e) => e.unique), [O, k] = b(() => e.isClient() ? null : r ?? (D.length === 1 ? D[0].id : null)), [A, j] = b(!1), [M, N] = b(!1), [P, F] = b(null), [I, L] = b([]), [R,
|
|
22219
|
-
|
|
22220
|
-
|
|
22221
|
-
|
|
22222
|
-
let ce =
|
|
22218
|
+
let { store: e, validator: t, columns: n, primaryKey: r, setShowUploader: i, pendingImportFile: a, setPendingImportFile: o, onColumnMatch: s, onValueMatch: c, synonyms: l, addDynamicColumns: u, scaleClient: d } = X(), { t: p } = K(), [h, g] = b(0), [_, x] = b(0), [S, w] = b(null), [T, E] = b({}), D = n.filter((e) => e.unique), [O, k] = b(() => e.isClient() ? null : r ?? (D.length === 1 ? D[0].id : null)), [A, j] = b(!1), [M, N] = b(!1), [P, F] = b(null), [I, L] = b([]), [R, z] = b(null), [B, V] = b([]), [ee, te] = b({}), [H, ne] = b([]), re = y(null), [ie, ae] = b(0), oe = f((e) => {
|
|
22219
|
+
M || k(e);
|
|
22220
|
+
}, [M]), se = y(null);
|
|
22221
|
+
se.current ||= new Xl();
|
|
22222
|
+
let ce = se.current;
|
|
22223
|
+
m(() => () => ce.dispose(), [ce]);
|
|
22224
|
+
let le = v(() => {
|
|
22223
22225
|
let e = new Set(Object.values(T).filter(Boolean));
|
|
22224
22226
|
return n.some((t) => t.editor?.type === "select" && e.has(t.id));
|
|
22225
|
-
}, [T, n]),
|
|
22227
|
+
}, [T, n]), ue = v(() => {
|
|
22226
22228
|
let e = [{
|
|
22227
22229
|
id: "select-files",
|
|
22228
22230
|
title: p("dataEditor.uploader.steps.selectFiles"),
|
|
@@ -22236,7 +22238,7 @@ function xy() {
|
|
|
22236
22238
|
id: "column-matching",
|
|
22237
22239
|
title: p("dataEditor.uploader.steps.matchColumns"),
|
|
22238
22240
|
content: /* @__PURE__ */ C(Nv, {})
|
|
22239
|
-
}),
|
|
22241
|
+
}), le && e.push({
|
|
22240
22242
|
id: "match-values",
|
|
22241
22243
|
title: p("dataEditor.uploader.steps.matchValues"),
|
|
22242
22244
|
content: /* @__PURE__ */ C(Fv, {})
|
|
@@ -22248,56 +22250,56 @@ function xy() {
|
|
|
22248
22250
|
}, [
|
|
22249
22251
|
D.length,
|
|
22250
22252
|
I.length,
|
|
22251
|
-
|
|
22253
|
+
le,
|
|
22252
22254
|
p
|
|
22253
|
-
]),
|
|
22254
|
-
e >= 0 && e <
|
|
22255
|
-
}, [
|
|
22255
|
+
]), de = f((e) => {
|
|
22256
|
+
e >= 0 && e < ue.length && g(e);
|
|
22257
|
+
}, [ue.length]), fe = f(() => {
|
|
22256
22258
|
g((e) => {
|
|
22257
|
-
let t = Math.min(e + 1,
|
|
22259
|
+
let t = Math.min(e + 1, ue.length - 1);
|
|
22258
22260
|
return x((e) => Math.max(e, t)), t;
|
|
22259
22261
|
});
|
|
22260
|
-
}, [
|
|
22262
|
+
}, [ue.length]), pe = f(() => {
|
|
22261
22263
|
g((e) => Math.max(e - 1, 0));
|
|
22262
|
-
}, []),
|
|
22264
|
+
}, []), me = h === 0, he = h === ue.length - 1, ge = f((e) => {
|
|
22263
22265
|
w(e), j(!1), kv(e.headers, n, s, l).then(E);
|
|
22264
22266
|
}, [
|
|
22265
22267
|
n,
|
|
22266
22268
|
s,
|
|
22267
22269
|
l
|
|
22268
|
-
]),
|
|
22269
|
-
|
|
22270
|
-
}, [
|
|
22271
|
-
F(e), L(t),
|
|
22272
|
-
}, []),
|
|
22273
|
-
!P || !R || (j(!0),
|
|
22270
|
+
]), _e = f(() => {
|
|
22271
|
+
ce.cancel(), w(null), j(!1), E({}), ne([]), re.current = null, ae(0), F(null), L([]), z(null), V([]);
|
|
22272
|
+
}, [ce]), ve = f((e, t, n) => {
|
|
22273
|
+
F(e), L(t), z(t[0]), V(n), j(!1);
|
|
22274
|
+
}, []), ye = f(() => {
|
|
22275
|
+
!P || !R || (j(!0), ce.parse(P, {
|
|
22274
22276
|
format: "xlsx",
|
|
22275
22277
|
sheetName: R
|
|
22276
22278
|
}).then((e) => {
|
|
22277
22279
|
if (e.kind !== "rows") return;
|
|
22278
22280
|
let t = ay(e.rows);
|
|
22279
|
-
ae(t.headerRowIndex),
|
|
22281
|
+
ae(t.headerRowIndex), ge({
|
|
22280
22282
|
fileName: P.name,
|
|
22281
22283
|
headers: t.headers,
|
|
22282
22284
|
rows: t.rows,
|
|
22283
22285
|
isParsing: !1,
|
|
22284
22286
|
rawCells: t.rawCells,
|
|
22285
22287
|
delimiter: ","
|
|
22286
|
-
}),
|
|
22288
|
+
}), fe();
|
|
22287
22289
|
}).catch(() => {
|
|
22288
22290
|
j(!1);
|
|
22289
22291
|
}));
|
|
22290
22292
|
}, [
|
|
22291
22293
|
P,
|
|
22292
22294
|
R,
|
|
22293
|
-
|
|
22294
|
-
|
|
22295
|
-
|
|
22296
|
-
]),
|
|
22297
|
-
let t = await
|
|
22295
|
+
ce,
|
|
22296
|
+
ge,
|
|
22297
|
+
fe
|
|
22298
|
+
]), be = f(async (e) => {
|
|
22299
|
+
let t = await ce.parse(e, { format: "csv" });
|
|
22298
22300
|
if (t.kind !== "rows") return;
|
|
22299
22301
|
let n = ay(t.rows);
|
|
22300
|
-
if (ae(n.headerRowIndex),
|
|
22302
|
+
if (ae(n.headerRowIndex), ge({
|
|
22301
22303
|
fileName: e.name,
|
|
22302
22304
|
headers: n.headers,
|
|
22303
22305
|
rows: n.rows,
|
|
@@ -22312,14 +22314,14 @@ function xy() {
|
|
|
22312
22314
|
}));
|
|
22313
22315
|
}
|
|
22314
22316
|
}, [
|
|
22315
|
-
|
|
22316
|
-
|
|
22317
|
+
ce,
|
|
22318
|
+
ge,
|
|
22317
22319
|
p
|
|
22318
|
-
]),
|
|
22320
|
+
]), xe = f(async (t) => {
|
|
22319
22321
|
try {
|
|
22320
|
-
let e = await
|
|
22322
|
+
let e = await ce.parse(t, { format: "json" });
|
|
22321
22323
|
if (e.kind !== "records") return;
|
|
22322
|
-
|
|
22324
|
+
ge({
|
|
22323
22325
|
fileName: t.name,
|
|
22324
22326
|
headers: e.headers,
|
|
22325
22327
|
rows: e.rows,
|
|
@@ -22334,15 +22336,15 @@ function xy() {
|
|
|
22334
22336
|
});
|
|
22335
22337
|
}
|
|
22336
22338
|
}, [
|
|
22337
|
-
|
|
22338
|
-
|
|
22339
|
+
ce,
|
|
22340
|
+
ge,
|
|
22339
22341
|
j,
|
|
22340
22342
|
e
|
|
22341
|
-
]),
|
|
22343
|
+
]), Se = f(async (t) => {
|
|
22342
22344
|
try {
|
|
22343
|
-
let e = await
|
|
22345
|
+
let e = await ce.parse(t, { format: "xml" });
|
|
22344
22346
|
if (e.kind !== "records") return;
|
|
22345
|
-
|
|
22347
|
+
ge({
|
|
22346
22348
|
fileName: t.name,
|
|
22347
22349
|
headers: e.headers,
|
|
22348
22350
|
rows: e.rows,
|
|
@@ -22357,12 +22359,12 @@ function xy() {
|
|
|
22357
22359
|
});
|
|
22358
22360
|
}
|
|
22359
22361
|
}, [
|
|
22360
|
-
|
|
22361
|
-
|
|
22362
|
+
ce,
|
|
22363
|
+
ge,
|
|
22362
22364
|
j,
|
|
22363
22365
|
e
|
|
22364
|
-
]),
|
|
22365
|
-
|
|
22366
|
+
]), Ce = f((t) => {
|
|
22367
|
+
ce.parse(t, { format: "xlsx" }).then((e) => {
|
|
22366
22368
|
if (e.kind === "sheets") {
|
|
22367
22369
|
let n = e.sheets.map((e) => {
|
|
22368
22370
|
let { headers: t, rows: n } = ay(e.rows);
|
|
@@ -22373,12 +22375,12 @@ function xy() {
|
|
|
22373
22375
|
totalRows: e.totalRows - 1
|
|
22374
22376
|
};
|
|
22375
22377
|
});
|
|
22376
|
-
|
|
22378
|
+
ve(t, e.sheets.map((e) => e.name), n);
|
|
22377
22379
|
return;
|
|
22378
22380
|
}
|
|
22379
22381
|
if (e.kind !== "rows") return;
|
|
22380
22382
|
let n = ay(e.rows);
|
|
22381
|
-
ae(n.headerRowIndex),
|
|
22383
|
+
ae(n.headerRowIndex), ge({
|
|
22382
22384
|
fileName: t.name,
|
|
22383
22385
|
headers: n.headers,
|
|
22384
22386
|
rows: n.rows,
|
|
@@ -22395,39 +22397,39 @@ function xy() {
|
|
|
22395
22397
|
}), j(!1);
|
|
22396
22398
|
});
|
|
22397
22399
|
}, [
|
|
22398
|
-
|
|
22399
|
-
|
|
22400
|
-
|
|
22400
|
+
ce,
|
|
22401
|
+
ge,
|
|
22402
|
+
ve,
|
|
22401
22403
|
j,
|
|
22402
22404
|
e
|
|
22403
|
-
]),
|
|
22405
|
+
]), we = f((e) => {
|
|
22404
22406
|
j(!0), re.current = e;
|
|
22405
22407
|
let t = e.name.split(".").pop()?.toLowerCase();
|
|
22406
|
-
t && by.has(t) ?
|
|
22408
|
+
t && by.has(t) ? Ce(e) : t === "json" ? xe(e) : t === "xml" ? Se(e) : be(e);
|
|
22407
22409
|
}, [
|
|
22408
|
-
ye,
|
|
22409
22410
|
be,
|
|
22410
|
-
Se,
|
|
22411
22411
|
xe,
|
|
22412
|
+
Ce,
|
|
22413
|
+
Se,
|
|
22412
22414
|
j
|
|
22413
22415
|
]);
|
|
22414
22416
|
m(() => {
|
|
22415
|
-
a && (
|
|
22417
|
+
a && (we(a), o(null));
|
|
22416
22418
|
}, [
|
|
22417
22419
|
a,
|
|
22418
22420
|
o,
|
|
22419
|
-
|
|
22421
|
+
we
|
|
22420
22422
|
]);
|
|
22421
|
-
let [
|
|
22422
|
-
|
|
22423
|
-
}, []),
|
|
22424
|
-
|
|
22423
|
+
let [Te, Ee] = b(null), [De, Oe] = b(null), ke = f(() => {
|
|
22424
|
+
Oe(null);
|
|
22425
|
+
}, []), Ae = f(async (e) => {
|
|
22426
|
+
Ee(e.id), Oe(null);
|
|
22425
22427
|
try {
|
|
22426
22428
|
let t = await e.fetch();
|
|
22427
|
-
if (t instanceof File)
|
|
22429
|
+
if (t instanceof File) we(t);
|
|
22428
22430
|
else if (Array.isArray(t)) {
|
|
22429
22431
|
if (t.length === 0) {
|
|
22430
|
-
|
|
22432
|
+
Oe(p("dataEditor.uploader.remoteSources.emptyData"));
|
|
22431
22433
|
return;
|
|
22432
22434
|
}
|
|
22433
22435
|
let n = Object.keys(t[0]), r = t.map((e) => {
|
|
@@ -22438,7 +22440,7 @@ function xy() {
|
|
|
22438
22440
|
}
|
|
22439
22441
|
return t;
|
|
22440
22442
|
});
|
|
22441
|
-
|
|
22443
|
+
ge({
|
|
22442
22444
|
fileName: e.label,
|
|
22443
22445
|
headers: n,
|
|
22444
22446
|
rows: r,
|
|
@@ -22446,15 +22448,15 @@ function xy() {
|
|
|
22446
22448
|
});
|
|
22447
22449
|
}
|
|
22448
22450
|
} catch (e) {
|
|
22449
|
-
|
|
22451
|
+
Oe(e instanceof Error ? e.message : String(e));
|
|
22450
22452
|
} finally {
|
|
22451
|
-
|
|
22453
|
+
Ee(null);
|
|
22452
22454
|
}
|
|
22453
22455
|
}, [
|
|
22454
|
-
|
|
22455
|
-
|
|
22456
|
+
we,
|
|
22457
|
+
ge,
|
|
22456
22458
|
p
|
|
22457
|
-
]),
|
|
22459
|
+
]), je = f((e, t) => {
|
|
22458
22460
|
E((n) => {
|
|
22459
22461
|
let r = {
|
|
22460
22462
|
...n,
|
|
@@ -22463,10 +22465,10 @@ function xy() {
|
|
|
22463
22465
|
if (t) for (let n in r) n !== e && r[n] === t && (r[n] = void 0);
|
|
22464
22466
|
return r;
|
|
22465
22467
|
});
|
|
22466
|
-
}, []), [
|
|
22468
|
+
}, []), [Me, Ne] = b({}), Pe = y(0);
|
|
22467
22469
|
m(() => {
|
|
22468
22470
|
if (!S) {
|
|
22469
|
-
|
|
22471
|
+
Ne({});
|
|
22470
22472
|
return;
|
|
22471
22473
|
}
|
|
22472
22474
|
let e = {};
|
|
@@ -22485,12 +22487,12 @@ function xy() {
|
|
|
22485
22487
|
};
|
|
22486
22488
|
}
|
|
22487
22489
|
if (Object.keys(e).length === 0) {
|
|
22488
|
-
|
|
22490
|
+
Ne({});
|
|
22489
22491
|
return;
|
|
22490
22492
|
}
|
|
22491
|
-
let t = ++
|
|
22493
|
+
let t = ++Pe.current;
|
|
22492
22494
|
Cv(e, c).then((e) => {
|
|
22493
|
-
|
|
22495
|
+
Pe.current === t && Ne(e);
|
|
22494
22496
|
});
|
|
22495
22497
|
}, [
|
|
22496
22498
|
S,
|
|
@@ -22498,14 +22500,14 @@ function xy() {
|
|
|
22498
22500
|
n,
|
|
22499
22501
|
c
|
|
22500
22502
|
]);
|
|
22501
|
-
let
|
|
22503
|
+
let Fe = v(() => {
|
|
22502
22504
|
let e = {};
|
|
22503
|
-
for (let [t, n] of Object.entries(
|
|
22505
|
+
for (let [t, n] of Object.entries(Me)) e[t] = {
|
|
22504
22506
|
...n,
|
|
22505
|
-
...
|
|
22507
|
+
...ee[t]
|
|
22506
22508
|
};
|
|
22507
22509
|
return e;
|
|
22508
|
-
}, [
|
|
22510
|
+
}, [Me, ee]), Ie = f((e, t, n) => {
|
|
22509
22511
|
te((r) => ({
|
|
22510
22512
|
...r,
|
|
22511
22513
|
[e]: {
|
|
@@ -22513,15 +22515,15 @@ function xy() {
|
|
|
22513
22515
|
[t]: n
|
|
22514
22516
|
}
|
|
22515
22517
|
}));
|
|
22516
|
-
}, []),
|
|
22518
|
+
}, []), Le = f((e) => {
|
|
22517
22519
|
let t = [];
|
|
22518
22520
|
for (let [r, i] of Object.entries(T)) !i || e.has(i) || n.find((e) => e.id === i)?.editor?.type === "date" && t.push(r);
|
|
22519
22521
|
return t;
|
|
22520
|
-
}, [T, n]),
|
|
22521
|
-
let e = new Set(H.map((e) => e.id)), t = Kv(T, n, e), i = Ws(S?.rows ?? [], qv(t)), a =
|
|
22522
|
+
}, [T, n]), Re = f(() => {
|
|
22523
|
+
let e = new Set(H.map((e) => e.id)), t = Kv(T, n, e), i = Ws(S?.rows ?? [], qv(t)), a = Le(e), o = Ys(S?.rows ?? [], a);
|
|
22522
22524
|
return {
|
|
22523
22525
|
columnMapping: T,
|
|
22524
|
-
valueMapping:
|
|
22526
|
+
valueMapping: Fe,
|
|
22525
22527
|
primaryKey: O ?? r,
|
|
22526
22528
|
selectedSheet: R ?? void 0,
|
|
22527
22529
|
headerRowIndex: ie,
|
|
@@ -22532,17 +22534,17 @@ function xy() {
|
|
|
22532
22534
|
}, [
|
|
22533
22535
|
S,
|
|
22534
22536
|
T,
|
|
22535
|
-
|
|
22537
|
+
Fe,
|
|
22536
22538
|
O,
|
|
22537
22539
|
R,
|
|
22538
22540
|
r,
|
|
22539
22541
|
ie,
|
|
22540
22542
|
H,
|
|
22541
22543
|
n,
|
|
22542
|
-
|
|
22543
|
-
]),
|
|
22544
|
+
Le
|
|
22545
|
+
]), ze = f(async () => {
|
|
22544
22546
|
if (!re.current || !d?.onFileImport) return;
|
|
22545
|
-
let t = new AbortController(), n =
|
|
22547
|
+
let t = new AbortController(), n = Re();
|
|
22546
22548
|
await d.onFileImport({
|
|
22547
22549
|
file: re.current,
|
|
22548
22550
|
mappings: n,
|
|
@@ -22551,17 +22553,17 @@ function xy() {
|
|
|
22551
22553
|
}), e.reloadServerData();
|
|
22552
22554
|
}, [
|
|
22553
22555
|
d,
|
|
22554
|
-
|
|
22556
|
+
Re,
|
|
22555
22557
|
e
|
|
22556
|
-
]),
|
|
22558
|
+
]), Be = f(async () => {
|
|
22557
22559
|
if (!S || !d?.onRowsImport) return;
|
|
22558
22560
|
let t = S;
|
|
22559
22561
|
w(null);
|
|
22560
|
-
let r = crypto.randomUUID(), i =
|
|
22562
|
+
let r = crypto.randomUUID(), i = Re(), a = new AbortController(), o = d.importChunkSize ?? _y, s = Kv(T, n, new Set(H.map((e) => e.id))), c = {
|
|
22561
22563
|
numberFormat: i.numberFormat,
|
|
22562
22564
|
dateFormat: i.dateFormat,
|
|
22563
22565
|
monthTable: qs(p),
|
|
22564
|
-
valueMapping:
|
|
22566
|
+
valueMapping: Fe
|
|
22565
22567
|
}, l = t.rows, u = 0;
|
|
22566
22568
|
for (; u < l.length;) {
|
|
22567
22569
|
let e = Math.min(u + o, l.length), n = [];
|
|
@@ -22584,14 +22586,14 @@ function xy() {
|
|
|
22584
22586
|
}, [
|
|
22585
22587
|
S,
|
|
22586
22588
|
d,
|
|
22587
|
-
|
|
22589
|
+
Re,
|
|
22588
22590
|
T,
|
|
22589
22591
|
H,
|
|
22590
22592
|
n,
|
|
22591
|
-
|
|
22593
|
+
Fe,
|
|
22592
22594
|
e,
|
|
22593
22595
|
p
|
|
22594
|
-
]),
|
|
22596
|
+
]), Ve = f(() => new Promise((r) => {
|
|
22595
22597
|
if (!S) {
|
|
22596
22598
|
r();
|
|
22597
22599
|
return;
|
|
@@ -22604,9 +22606,9 @@ function xy() {
|
|
|
22604
22606
|
e.setSourceLoading(o, !0);
|
|
22605
22607
|
let s = Kv(T, n, a), c = {
|
|
22606
22608
|
numberFormat: Ws(i.rows, qv(s)),
|
|
22607
|
-
dateFormat: Ys(i.rows,
|
|
22609
|
+
dateFormat: Ys(i.rows, Le(a)),
|
|
22608
22610
|
monthTable: qs(p),
|
|
22609
|
-
valueMapping:
|
|
22611
|
+
valueMapping: Fe
|
|
22610
22612
|
}, l = i.rows, d = i.rawCells ?? [], f = i.delimiter ?? ",", m = i.headers, h = m.map((e) => {
|
|
22611
22613
|
let t = T[e];
|
|
22612
22614
|
return (t ? n.find((e) => e.id === t) : void 0) ?? {
|
|
@@ -22668,36 +22670,36 @@ function xy() {
|
|
|
22668
22670
|
t,
|
|
22669
22671
|
n,
|
|
22670
22672
|
u,
|
|
22671
|
-
|
|
22672
|
-
|
|
22673
|
+
Fe,
|
|
22674
|
+
Le,
|
|
22673
22675
|
p
|
|
22674
22676
|
]);
|
|
22675
22677
|
return {
|
|
22676
|
-
steps:
|
|
22678
|
+
steps: ue,
|
|
22677
22679
|
activeStepIndex: h,
|
|
22678
22680
|
currentStepIndex: _,
|
|
22679
|
-
isFirstStep:
|
|
22680
|
-
isLastStep:
|
|
22681
|
-
goToStep:
|
|
22682
|
-
nextStep:
|
|
22683
|
-
prevStep:
|
|
22681
|
+
isFirstStep: me,
|
|
22682
|
+
isLastStep: he,
|
|
22683
|
+
goToStep: de,
|
|
22684
|
+
nextStep: fe,
|
|
22685
|
+
prevStep: pe,
|
|
22684
22686
|
parsedCsv: S,
|
|
22685
22687
|
columnMapping: T,
|
|
22686
|
-
handleFileParsed:
|
|
22687
|
-
handleFileRemoved:
|
|
22688
|
-
updateColumnMapping:
|
|
22689
|
-
valueMapping:
|
|
22690
|
-
autoValueMapping:
|
|
22691
|
-
updateValueMapping:
|
|
22688
|
+
handleFileParsed: ge,
|
|
22689
|
+
handleFileRemoved: _e,
|
|
22690
|
+
updateColumnMapping: je,
|
|
22691
|
+
valueMapping: Fe,
|
|
22692
|
+
autoValueMapping: Me,
|
|
22693
|
+
updateValueMapping: Ie,
|
|
22692
22694
|
xlsxFile: P,
|
|
22693
22695
|
sheetNames: I,
|
|
22694
22696
|
selectedSheet: R,
|
|
22695
|
-
setSelectedSheet:
|
|
22696
|
-
handleSheetConfirmed:
|
|
22697
|
-
handleXlsxMultiSheet:
|
|
22698
|
-
sheetPreviews:
|
|
22697
|
+
setSelectedSheet: z,
|
|
22698
|
+
handleSheetConfirmed: ye,
|
|
22699
|
+
handleXlsxMultiSheet: ve,
|
|
22700
|
+
sheetPreviews: B,
|
|
22699
22701
|
primaryKey: O,
|
|
22700
|
-
|
|
22702
|
+
onPrimaryKeyChange: oe,
|
|
22701
22703
|
pendingColumns: H,
|
|
22702
22704
|
setPendingColumns: ne,
|
|
22703
22705
|
isParsing: A,
|
|
@@ -22708,7 +22710,7 @@ function xy() {
|
|
|
22708
22710
|
N(!0);
|
|
22709
22711
|
try {
|
|
22710
22712
|
await qo(e, "importing", Infinity, async () => {
|
|
22711
|
-
d?.onFileImport ? await
|
|
22713
|
+
d?.onFileImport ? await ze() : d?.onRowsImport ? await Be() : await Ve();
|
|
22712
22714
|
});
|
|
22713
22715
|
} finally {
|
|
22714
22716
|
w(null), N(!1), i(!1);
|
|
@@ -22718,16 +22720,16 @@ function xy() {
|
|
|
22718
22720
|
S,
|
|
22719
22721
|
e,
|
|
22720
22722
|
d,
|
|
22721
|
-
Re,
|
|
22722
22723
|
ze,
|
|
22723
22724
|
Be,
|
|
22725
|
+
Ve,
|
|
22724
22726
|
i
|
|
22725
22727
|
]),
|
|
22726
|
-
parseFile:
|
|
22727
|
-
remoteSourceLoading:
|
|
22728
|
-
remoteSourceError:
|
|
22729
|
-
clearRemoteSourceError:
|
|
22730
|
-
handleRemoteSourceSelect:
|
|
22728
|
+
parseFile: we,
|
|
22729
|
+
remoteSourceLoading: Te,
|
|
22730
|
+
remoteSourceError: De,
|
|
22731
|
+
clearRemoteSourceError: ke,
|
|
22732
|
+
handleRemoteSourceSelect: Ae
|
|
22731
22733
|
};
|
|
22732
22734
|
}
|
|
22733
22735
|
//#endregion
|