@updog/data-editor 0.1.39 → 0.1.41
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.css +1 -1
- package/index.d.ts +2 -2
- package/index.js +263 -254
- 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";
|
|
@@ -439,8 +439,8 @@ var Hr = {
|
|
|
439
439
|
text: "Map imported columns to existing columns",
|
|
440
440
|
banner: "Some columns could not be automatically matched",
|
|
441
441
|
importedColumns: "Imported columns",
|
|
442
|
+
matchedCount: "{{matched}}/{{total}} matched",
|
|
442
443
|
targetColumns: "Target columns",
|
|
443
|
-
unmatchedCount: "{{count}} unmatched",
|
|
444
444
|
selectColumnPlaceholder: "Select column",
|
|
445
445
|
bestMatch: "Best match",
|
|
446
446
|
createColumn: "Create column",
|
|
@@ -465,8 +465,8 @@ var Hr = {
|
|
|
465
465
|
title: "Match values",
|
|
466
466
|
text: "Review how imported values map to your column options. Adjust any mappings that need a different match.",
|
|
467
467
|
importedValues: "Imported values",
|
|
468
|
+
matchedCount: "{{matched}}/{{total}} matched",
|
|
468
469
|
targetValue: "Target value",
|
|
469
|
-
unmatchedCount: "{{count}} unmatched",
|
|
470
470
|
selectValuePlaceholder: "Select value",
|
|
471
471
|
showMatched: "Show matched",
|
|
472
472
|
allMatched: "All values are matched",
|
|
@@ -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"),
|
|
@@ -21401,7 +21401,7 @@ var Y_ = ({ text: e, onSelect: t }) => /* @__PURE__ */ C(J, {
|
|
|
21401
21401
|
s,
|
|
21402
21402
|
r,
|
|
21403
21403
|
t
|
|
21404
|
-
]), T = v(() => _.filter((e) =>
|
|
21404
|
+
]), T = v(() => _.filter((e) => a[e]).length, [_, a]), E = T === _.length, D = r("dataEditor.uploader.matchColumns.selectColumnPlaceholder");
|
|
21405
21405
|
return /* @__PURE__ */ w("div", {
|
|
21406
21406
|
className: "updog__column-matching",
|
|
21407
21407
|
children: [
|
|
@@ -21417,9 +21417,12 @@ var Y_ = ({ text: e, onSelect: t }) => /* @__PURE__ */ C(J, {
|
|
|
21417
21417
|
size: "sm",
|
|
21418
21418
|
weight: "medium",
|
|
21419
21419
|
children: r("dataEditor.uploader.matchColumns.importedColumns")
|
|
21420
|
-
}),
|
|
21421
|
-
color: "yellow",
|
|
21422
|
-
text: r("dataEditor.uploader.matchColumns.
|
|
21420
|
+
}), /* @__PURE__ */ C(ka, {
|
|
21421
|
+
color: E ? "green" : "yellow",
|
|
21422
|
+
text: r("dataEditor.uploader.matchColumns.matchedCount", {
|
|
21423
|
+
matched: T,
|
|
21424
|
+
total: _.length
|
|
21425
|
+
})
|
|
21423
21426
|
})]
|
|
21424
21427
|
}),
|
|
21425
21428
|
/* @__PURE__ */ C("div", { className: "updog__column-matching__header-spacer" }),
|
|
@@ -21443,7 +21446,7 @@ var Y_ = ({ text: e, onSelect: t }) => /* @__PURE__ */ C(J, {
|
|
|
21443
21446
|
mappedValue: a[e],
|
|
21444
21447
|
options: S[e],
|
|
21445
21448
|
autoMatchId: x.current?.[e],
|
|
21446
|
-
placeholder:
|
|
21449
|
+
placeholder: D,
|
|
21447
21450
|
onSelectChange: p,
|
|
21448
21451
|
onClear: o
|
|
21449
21452
|
}, e))
|
|
@@ -21542,7 +21545,7 @@ var Y_ = ({ text: e, onSelect: t }) => /* @__PURE__ */ C(J, {
|
|
|
21542
21545
|
return /* @__PURE__ */ C("div", {
|
|
21543
21546
|
className: "updog__value-matching",
|
|
21544
21547
|
children: h.map((e) => {
|
|
21545
|
-
let n = e.values.filter((e) => e.mapped
|
|
21548
|
+
let n = e.values.filter((e) => e.mapped !== void 0).length, r = n === e.values.length, i = e.values.filter((t) => (s[e.columnId] ?? !0) || t.mapped === void 0), a = l[e.columnId] ?? !1;
|
|
21546
21549
|
return /* @__PURE__ */ w("div", {
|
|
21547
21550
|
className: "updog__value-matching__section",
|
|
21548
21551
|
children: [/* @__PURE__ */ w("header", {
|
|
@@ -21557,9 +21560,12 @@ var Y_ = ({ text: e, onSelect: t }) => /* @__PURE__ */ C(J, {
|
|
|
21557
21560
|
size: "sm",
|
|
21558
21561
|
weight: "medium",
|
|
21559
21562
|
children: e.columnTitle
|
|
21560
|
-
}),
|
|
21561
|
-
color: "yellow",
|
|
21562
|
-
text: t("dataEditor.uploader.matchValues.
|
|
21563
|
+
}), /* @__PURE__ */ C(ka, {
|
|
21564
|
+
color: r ? "green" : "yellow",
|
|
21565
|
+
text: t("dataEditor.uploader.matchValues.matchedCount", {
|
|
21566
|
+
matched: n,
|
|
21567
|
+
total: e.values.length
|
|
21568
|
+
})
|
|
21563
21569
|
})]
|
|
21564
21570
|
}), /* @__PURE__ */ C(Mi, {
|
|
21565
21571
|
checked: s[e.columnId] ?? !0,
|
|
@@ -21575,23 +21581,23 @@ var Y_ = ({ text: e, onSelect: t }) => /* @__PURE__ */ C(J, {
|
|
|
21575
21581
|
}), /* @__PURE__ */ C(ua, {
|
|
21576
21582
|
content: /* @__PURE__ */ C(q, {
|
|
21577
21583
|
size: "sm",
|
|
21578
|
-
children: t(
|
|
21584
|
+
children: t(a ? "dataEditor.common.expand" : "dataEditor.common.collapse")
|
|
21579
21585
|
}),
|
|
21580
21586
|
placement: "bottom-end",
|
|
21581
21587
|
children: /* @__PURE__ */ C(Y, {
|
|
21582
21588
|
variant: "ghost",
|
|
21583
21589
|
color: "neutral",
|
|
21584
21590
|
className: "updog__value-matching__collapse-btn",
|
|
21585
|
-
"aria-label": t(
|
|
21591
|
+
"aria-label": t(a ? "dataEditor.common.expand" : "dataEditor.common.collapse"),
|
|
21586
21592
|
onClick: () => p(e.columnId),
|
|
21587
|
-
children: /* @__PURE__ */ C(R, { className: E("updog__value-matching__collapse-icon",
|
|
21593
|
+
children: /* @__PURE__ */ C(R, { className: E("updog__value-matching__collapse-icon", a && "updog__value-matching__collapse-icon--collapsed") })
|
|
21588
21594
|
})
|
|
21589
21595
|
})]
|
|
21590
21596
|
}), /* @__PURE__ */ C("div", {
|
|
21591
|
-
className: E("updog__value-matching__collapsible", !
|
|
21597
|
+
className: E("updog__value-matching__collapsible", !a && "updog__value-matching__collapsible--expanded"),
|
|
21592
21598
|
children: /* @__PURE__ */ w("div", {
|
|
21593
21599
|
className: "updog__value-matching__table",
|
|
21594
|
-
children: [
|
|
21600
|
+
children: [i.length === 0 ? /* @__PURE__ */ C("div", {
|
|
21595
21601
|
className: "updog__value-matching__empty",
|
|
21596
21602
|
children: /* @__PURE__ */ C(q, {
|
|
21597
21603
|
size: "sm",
|
|
@@ -21618,7 +21624,7 @@ var Y_ = ({ text: e, onSelect: t }) => /* @__PURE__ */ C(J, {
|
|
|
21618
21624
|
}),
|
|
21619
21625
|
/* @__PURE__ */ C("div", { className: "updog__value-matching__action" })
|
|
21620
21626
|
]
|
|
21621
|
-
}),
|
|
21627
|
+
}), i.map((n) => /* @__PURE__ */ w("div", {
|
|
21622
21628
|
className: "updog__value-matching__row",
|
|
21623
21629
|
children: [
|
|
21624
21630
|
/* @__PURE__ */ C("div", {
|
|
@@ -21682,7 +21688,7 @@ var Y_ = ({ text: e, onSelect: t }) => /* @__PURE__ */ C(J, {
|
|
|
21682
21688
|
children: /* @__PURE__ */ C(Pv, {})
|
|
21683
21689
|
}), /* @__PURE__ */ C(lv, {})] })] });
|
|
21684
21690
|
}, Iv = 20, Lv = () => {
|
|
21685
|
-
let { columns: e, store: t } = X(), { t: n } = K(), { primaryKey: r,
|
|
21691
|
+
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
21692
|
let e = {};
|
|
21687
21693
|
for (let [t, n] of Object.entries(o)) n && (e[n] = t);
|
|
21688
21694
|
return e;
|
|
@@ -21703,7 +21709,7 @@ var Y_ = ({ text: e, onSelect: t }) => /* @__PURE__ */ C(J, {
|
|
|
21703
21709
|
children: n("dataEditor.uploader.primaryKey.none")
|
|
21704
21710
|
}), /* @__PURE__ */ C(q, {
|
|
21705
21711
|
size: "sm",
|
|
21706
|
-
className: "updog__primary-key-selection__value-text",
|
|
21712
|
+
className: "updog__primary-key-selection__value-text updog__primary-key-selection__value-none",
|
|
21707
21713
|
children: n("dataEditor.uploader.primaryKey.noneHint")
|
|
21708
21714
|
})]
|
|
21709
21715
|
}), l.map((e) => {
|
|
@@ -22215,14 +22221,16 @@ var _y = 5e3, vy = 15, yy = 20, by = new Set([
|
|
|
22215
22221
|
"ods"
|
|
22216
22222
|
]);
|
|
22217
22223
|
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(() =>
|
|
22219
|
-
|
|
22220
|
-
|
|
22221
|
-
|
|
22222
|
-
let ce =
|
|
22224
|
+
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(() => r), [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) => {
|
|
22225
|
+
M || k(e);
|
|
22226
|
+
}, [M]), se = y(null);
|
|
22227
|
+
se.current ||= new Xl();
|
|
22228
|
+
let ce = se.current;
|
|
22229
|
+
m(() => () => ce.dispose(), [ce]);
|
|
22230
|
+
let le = v(() => {
|
|
22223
22231
|
let e = new Set(Object.values(T).filter(Boolean));
|
|
22224
22232
|
return n.some((t) => t.editor?.type === "select" && e.has(t.id));
|
|
22225
|
-
}, [T, n]),
|
|
22233
|
+
}, [T, n]), [ue] = b(() => e.getLocalRowCount() > 0), de = v(() => {
|
|
22226
22234
|
let e = [{
|
|
22227
22235
|
id: "select-files",
|
|
22228
22236
|
title: p("dataEditor.uploader.steps.selectFiles"),
|
|
@@ -22236,11 +22244,11 @@ function xy() {
|
|
|
22236
22244
|
id: "column-matching",
|
|
22237
22245
|
title: p("dataEditor.uploader.steps.matchColumns"),
|
|
22238
22246
|
content: /* @__PURE__ */ C(Nv, {})
|
|
22239
|
-
}),
|
|
22247
|
+
}), le && e.push({
|
|
22240
22248
|
id: "match-values",
|
|
22241
22249
|
title: p("dataEditor.uploader.steps.matchValues"),
|
|
22242
22250
|
content: /* @__PURE__ */ C(Fv, {})
|
|
22243
|
-
}), D.length > 0 && e.push({
|
|
22251
|
+
}), D.length > 0 && ue && e.push({
|
|
22244
22252
|
id: "primary-key",
|
|
22245
22253
|
title: p("dataEditor.uploader.steps.primaryKey"),
|
|
22246
22254
|
content: /* @__PURE__ */ C(Rv, {})
|
|
@@ -22248,56 +22256,57 @@ function xy() {
|
|
|
22248
22256
|
}, [
|
|
22249
22257
|
D.length,
|
|
22250
22258
|
I.length,
|
|
22251
|
-
|
|
22259
|
+
le,
|
|
22260
|
+
ue,
|
|
22252
22261
|
p
|
|
22253
|
-
]),
|
|
22254
|
-
e >= 0 && e <
|
|
22255
|
-
}, [
|
|
22262
|
+
]), fe = f((e) => {
|
|
22263
|
+
e >= 0 && e < de.length && g(e);
|
|
22264
|
+
}, [de.length]), pe = f(() => {
|
|
22256
22265
|
g((e) => {
|
|
22257
|
-
let t = Math.min(e + 1,
|
|
22266
|
+
let t = Math.min(e + 1, de.length - 1);
|
|
22258
22267
|
return x((e) => Math.max(e, t)), t;
|
|
22259
22268
|
});
|
|
22260
|
-
}, [
|
|
22269
|
+
}, [de.length]), me = f(() => {
|
|
22261
22270
|
g((e) => Math.max(e - 1, 0));
|
|
22262
|
-
}, []),
|
|
22271
|
+
}, []), he = h === 0, ge = h === de.length - 1, _e = f((e) => {
|
|
22263
22272
|
w(e), j(!1), kv(e.headers, n, s, l).then(E);
|
|
22264
22273
|
}, [
|
|
22265
22274
|
n,
|
|
22266
22275
|
s,
|
|
22267
22276
|
l
|
|
22268
|
-
]),
|
|
22269
|
-
|
|
22270
|
-
}, [
|
|
22271
|
-
F(e), L(t),
|
|
22272
|
-
}, []),
|
|
22273
|
-
!P || !R || (j(!0),
|
|
22277
|
+
]), ve = f(() => {
|
|
22278
|
+
ce.cancel(), w(null), j(!1), E({}), ne([]), re.current = null, ae(0), F(null), L([]), z(null), V([]);
|
|
22279
|
+
}, [ce]), ye = f((e, t, n) => {
|
|
22280
|
+
F(e), L(t), z(t[0]), V(n), j(!1);
|
|
22281
|
+
}, []), be = f(() => {
|
|
22282
|
+
!P || !R || (j(!0), ce.parse(P, {
|
|
22274
22283
|
format: "xlsx",
|
|
22275
22284
|
sheetName: R
|
|
22276
22285
|
}).then((e) => {
|
|
22277
22286
|
if (e.kind !== "rows") return;
|
|
22278
22287
|
let t = ay(e.rows);
|
|
22279
|
-
ae(t.headerRowIndex),
|
|
22288
|
+
ae(t.headerRowIndex), _e({
|
|
22280
22289
|
fileName: P.name,
|
|
22281
22290
|
headers: t.headers,
|
|
22282
22291
|
rows: t.rows,
|
|
22283
22292
|
isParsing: !1,
|
|
22284
22293
|
rawCells: t.rawCells,
|
|
22285
22294
|
delimiter: ","
|
|
22286
|
-
}),
|
|
22295
|
+
}), pe();
|
|
22287
22296
|
}).catch(() => {
|
|
22288
22297
|
j(!1);
|
|
22289
22298
|
}));
|
|
22290
22299
|
}, [
|
|
22291
22300
|
P,
|
|
22292
22301
|
R,
|
|
22293
|
-
|
|
22294
|
-
|
|
22295
|
-
|
|
22296
|
-
]),
|
|
22297
|
-
let t = await
|
|
22302
|
+
ce,
|
|
22303
|
+
_e,
|
|
22304
|
+
pe
|
|
22305
|
+
]), xe = f(async (e) => {
|
|
22306
|
+
let t = await ce.parse(e, { format: "csv" });
|
|
22298
22307
|
if (t.kind !== "rows") return;
|
|
22299
22308
|
let n = ay(t.rows);
|
|
22300
|
-
if (ae(n.headerRowIndex),
|
|
22309
|
+
if (ae(n.headerRowIndex), _e({
|
|
22301
22310
|
fileName: e.name,
|
|
22302
22311
|
headers: n.headers,
|
|
22303
22312
|
rows: n.rows,
|
|
@@ -22312,14 +22321,14 @@ function xy() {
|
|
|
22312
22321
|
}));
|
|
22313
22322
|
}
|
|
22314
22323
|
}, [
|
|
22315
|
-
|
|
22316
|
-
|
|
22324
|
+
ce,
|
|
22325
|
+
_e,
|
|
22317
22326
|
p
|
|
22318
|
-
]),
|
|
22327
|
+
]), Se = f(async (t) => {
|
|
22319
22328
|
try {
|
|
22320
|
-
let e = await
|
|
22329
|
+
let e = await ce.parse(t, { format: "json" });
|
|
22321
22330
|
if (e.kind !== "records") return;
|
|
22322
|
-
|
|
22331
|
+
_e({
|
|
22323
22332
|
fileName: t.name,
|
|
22324
22333
|
headers: e.headers,
|
|
22325
22334
|
rows: e.rows,
|
|
@@ -22334,15 +22343,15 @@ function xy() {
|
|
|
22334
22343
|
});
|
|
22335
22344
|
}
|
|
22336
22345
|
}, [
|
|
22337
|
-
|
|
22338
|
-
|
|
22346
|
+
ce,
|
|
22347
|
+
_e,
|
|
22339
22348
|
j,
|
|
22340
22349
|
e
|
|
22341
|
-
]),
|
|
22350
|
+
]), Ce = f(async (t) => {
|
|
22342
22351
|
try {
|
|
22343
|
-
let e = await
|
|
22352
|
+
let e = await ce.parse(t, { format: "xml" });
|
|
22344
22353
|
if (e.kind !== "records") return;
|
|
22345
|
-
|
|
22354
|
+
_e({
|
|
22346
22355
|
fileName: t.name,
|
|
22347
22356
|
headers: e.headers,
|
|
22348
22357
|
rows: e.rows,
|
|
@@ -22357,12 +22366,12 @@ function xy() {
|
|
|
22357
22366
|
});
|
|
22358
22367
|
}
|
|
22359
22368
|
}, [
|
|
22360
|
-
|
|
22361
|
-
|
|
22369
|
+
ce,
|
|
22370
|
+
_e,
|
|
22362
22371
|
j,
|
|
22363
22372
|
e
|
|
22364
|
-
]),
|
|
22365
|
-
|
|
22373
|
+
]), we = f((t) => {
|
|
22374
|
+
ce.parse(t, { format: "xlsx" }).then((e) => {
|
|
22366
22375
|
if (e.kind === "sheets") {
|
|
22367
22376
|
let n = e.sheets.map((e) => {
|
|
22368
22377
|
let { headers: t, rows: n } = ay(e.rows);
|
|
@@ -22373,12 +22382,12 @@ function xy() {
|
|
|
22373
22382
|
totalRows: e.totalRows - 1
|
|
22374
22383
|
};
|
|
22375
22384
|
});
|
|
22376
|
-
|
|
22385
|
+
ye(t, e.sheets.map((e) => e.name), n);
|
|
22377
22386
|
return;
|
|
22378
22387
|
}
|
|
22379
22388
|
if (e.kind !== "rows") return;
|
|
22380
22389
|
let n = ay(e.rows);
|
|
22381
|
-
ae(n.headerRowIndex),
|
|
22390
|
+
ae(n.headerRowIndex), _e({
|
|
22382
22391
|
fileName: t.name,
|
|
22383
22392
|
headers: n.headers,
|
|
22384
22393
|
rows: n.rows,
|
|
@@ -22395,39 +22404,39 @@ function xy() {
|
|
|
22395
22404
|
}), j(!1);
|
|
22396
22405
|
});
|
|
22397
22406
|
}, [
|
|
22398
|
-
|
|
22399
|
-
he,
|
|
22407
|
+
ce,
|
|
22400
22408
|
_e,
|
|
22409
|
+
ye,
|
|
22401
22410
|
j,
|
|
22402
22411
|
e
|
|
22403
|
-
]),
|
|
22412
|
+
]), Te = f((e) => {
|
|
22404
22413
|
j(!0), re.current = e;
|
|
22405
22414
|
let t = e.name.split(".").pop()?.toLowerCase();
|
|
22406
|
-
t && by.has(t) ?
|
|
22415
|
+
t && by.has(t) ? we(e) : t === "json" ? Se(e) : t === "xml" ? Ce(e) : xe(e);
|
|
22407
22416
|
}, [
|
|
22408
|
-
ye,
|
|
22409
|
-
be,
|
|
22410
|
-
Se,
|
|
22411
22417
|
xe,
|
|
22418
|
+
Se,
|
|
22419
|
+
we,
|
|
22420
|
+
Ce,
|
|
22412
22421
|
j
|
|
22413
22422
|
]);
|
|
22414
22423
|
m(() => {
|
|
22415
|
-
a && (
|
|
22424
|
+
a && (Te(a), o(null));
|
|
22416
22425
|
}, [
|
|
22417
22426
|
a,
|
|
22418
22427
|
o,
|
|
22419
|
-
|
|
22428
|
+
Te
|
|
22420
22429
|
]);
|
|
22421
|
-
let [
|
|
22422
|
-
|
|
22423
|
-
}, []),
|
|
22424
|
-
|
|
22430
|
+
let [Ee, De] = b(null), [Oe, ke] = b(null), Ae = f(() => {
|
|
22431
|
+
ke(null);
|
|
22432
|
+
}, []), je = f(async (e) => {
|
|
22433
|
+
De(e.id), ke(null);
|
|
22425
22434
|
try {
|
|
22426
22435
|
let t = await e.fetch();
|
|
22427
|
-
if (t instanceof File)
|
|
22436
|
+
if (t instanceof File) Te(t);
|
|
22428
22437
|
else if (Array.isArray(t)) {
|
|
22429
22438
|
if (t.length === 0) {
|
|
22430
|
-
|
|
22439
|
+
ke(p("dataEditor.uploader.remoteSources.emptyData"));
|
|
22431
22440
|
return;
|
|
22432
22441
|
}
|
|
22433
22442
|
let n = Object.keys(t[0]), r = t.map((e) => {
|
|
@@ -22438,7 +22447,7 @@ function xy() {
|
|
|
22438
22447
|
}
|
|
22439
22448
|
return t;
|
|
22440
22449
|
});
|
|
22441
|
-
|
|
22450
|
+
_e({
|
|
22442
22451
|
fileName: e.label,
|
|
22443
22452
|
headers: n,
|
|
22444
22453
|
rows: r,
|
|
@@ -22446,15 +22455,15 @@ function xy() {
|
|
|
22446
22455
|
});
|
|
22447
22456
|
}
|
|
22448
22457
|
} catch (e) {
|
|
22449
|
-
|
|
22458
|
+
ke(e instanceof Error ? e.message : String(e));
|
|
22450
22459
|
} finally {
|
|
22451
|
-
|
|
22460
|
+
De(null);
|
|
22452
22461
|
}
|
|
22453
22462
|
}, [
|
|
22454
|
-
|
|
22455
|
-
|
|
22463
|
+
Te,
|
|
22464
|
+
_e,
|
|
22456
22465
|
p
|
|
22457
|
-
]),
|
|
22466
|
+
]), Me = f((e, t) => {
|
|
22458
22467
|
E((n) => {
|
|
22459
22468
|
let r = {
|
|
22460
22469
|
...n,
|
|
@@ -22463,10 +22472,10 @@ function xy() {
|
|
|
22463
22472
|
if (t) for (let n in r) n !== e && r[n] === t && (r[n] = void 0);
|
|
22464
22473
|
return r;
|
|
22465
22474
|
});
|
|
22466
|
-
}, []), [
|
|
22475
|
+
}, []), [Ne, Pe] = b({}), Fe = y(0);
|
|
22467
22476
|
m(() => {
|
|
22468
22477
|
if (!S) {
|
|
22469
|
-
|
|
22478
|
+
Pe({});
|
|
22470
22479
|
return;
|
|
22471
22480
|
}
|
|
22472
22481
|
let e = {};
|
|
@@ -22485,12 +22494,12 @@ function xy() {
|
|
|
22485
22494
|
};
|
|
22486
22495
|
}
|
|
22487
22496
|
if (Object.keys(e).length === 0) {
|
|
22488
|
-
|
|
22497
|
+
Pe({});
|
|
22489
22498
|
return;
|
|
22490
22499
|
}
|
|
22491
|
-
let t = ++
|
|
22500
|
+
let t = ++Fe.current;
|
|
22492
22501
|
Cv(e, c).then((e) => {
|
|
22493
|
-
|
|
22502
|
+
Fe.current === t && Pe(e);
|
|
22494
22503
|
});
|
|
22495
22504
|
}, [
|
|
22496
22505
|
S,
|
|
@@ -22498,14 +22507,14 @@ function xy() {
|
|
|
22498
22507
|
n,
|
|
22499
22508
|
c
|
|
22500
22509
|
]);
|
|
22501
|
-
let
|
|
22510
|
+
let Ie = v(() => {
|
|
22502
22511
|
let e = {};
|
|
22503
|
-
for (let [t, n] of Object.entries(
|
|
22512
|
+
for (let [t, n] of Object.entries(Ne)) e[t] = {
|
|
22504
22513
|
...n,
|
|
22505
|
-
...
|
|
22514
|
+
...ee[t]
|
|
22506
22515
|
};
|
|
22507
22516
|
return e;
|
|
22508
|
-
}, [
|
|
22517
|
+
}, [Ne, ee]), Le = f((e, t, n) => {
|
|
22509
22518
|
te((r) => ({
|
|
22510
22519
|
...r,
|
|
22511
22520
|
[e]: {
|
|
@@ -22513,15 +22522,15 @@ function xy() {
|
|
|
22513
22522
|
[t]: n
|
|
22514
22523
|
}
|
|
22515
22524
|
}));
|
|
22516
|
-
}, []),
|
|
22525
|
+
}, []), Re = f((e) => {
|
|
22517
22526
|
let t = [];
|
|
22518
22527
|
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
22528
|
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 =
|
|
22529
|
+
}, [T, n]), ze = f(() => {
|
|
22530
|
+
let e = new Set(H.map((e) => e.id)), t = Kv(T, n, e), i = Ws(S?.rows ?? [], qv(t)), a = Re(e), o = Ys(S?.rows ?? [], a);
|
|
22522
22531
|
return {
|
|
22523
22532
|
columnMapping: T,
|
|
22524
|
-
valueMapping:
|
|
22533
|
+
valueMapping: Ie,
|
|
22525
22534
|
primaryKey: O ?? r,
|
|
22526
22535
|
selectedSheet: R ?? void 0,
|
|
22527
22536
|
headerRowIndex: ie,
|
|
@@ -22532,17 +22541,17 @@ function xy() {
|
|
|
22532
22541
|
}, [
|
|
22533
22542
|
S,
|
|
22534
22543
|
T,
|
|
22535
|
-
|
|
22544
|
+
Ie,
|
|
22536
22545
|
O,
|
|
22537
22546
|
R,
|
|
22538
22547
|
r,
|
|
22539
22548
|
ie,
|
|
22540
22549
|
H,
|
|
22541
22550
|
n,
|
|
22542
|
-
|
|
22543
|
-
]),
|
|
22551
|
+
Re
|
|
22552
|
+
]), Be = f(async () => {
|
|
22544
22553
|
if (!re.current || !d?.onFileImport) return;
|
|
22545
|
-
let t = new AbortController(), n =
|
|
22554
|
+
let t = new AbortController(), n = ze();
|
|
22546
22555
|
await d.onFileImport({
|
|
22547
22556
|
file: re.current,
|
|
22548
22557
|
mappings: n,
|
|
@@ -22551,17 +22560,17 @@ function xy() {
|
|
|
22551
22560
|
}), e.reloadServerData();
|
|
22552
22561
|
}, [
|
|
22553
22562
|
d,
|
|
22554
|
-
|
|
22563
|
+
ze,
|
|
22555
22564
|
e
|
|
22556
|
-
]),
|
|
22565
|
+
]), Ve = f(async () => {
|
|
22557
22566
|
if (!S || !d?.onRowsImport) return;
|
|
22558
22567
|
let t = S;
|
|
22559
22568
|
w(null);
|
|
22560
|
-
let r = crypto.randomUUID(), i =
|
|
22569
|
+
let r = crypto.randomUUID(), i = ze(), a = new AbortController(), o = d.importChunkSize ?? _y, s = Kv(T, n, new Set(H.map((e) => e.id))), c = {
|
|
22561
22570
|
numberFormat: i.numberFormat,
|
|
22562
22571
|
dateFormat: i.dateFormat,
|
|
22563
22572
|
monthTable: qs(p),
|
|
22564
|
-
valueMapping:
|
|
22573
|
+
valueMapping: Ie
|
|
22565
22574
|
}, l = t.rows, u = 0;
|
|
22566
22575
|
for (; u < l.length;) {
|
|
22567
22576
|
let e = Math.min(u + o, l.length), n = [];
|
|
@@ -22584,14 +22593,14 @@ function xy() {
|
|
|
22584
22593
|
}, [
|
|
22585
22594
|
S,
|
|
22586
22595
|
d,
|
|
22587
|
-
|
|
22596
|
+
ze,
|
|
22588
22597
|
T,
|
|
22589
22598
|
H,
|
|
22590
22599
|
n,
|
|
22591
|
-
|
|
22600
|
+
Ie,
|
|
22592
22601
|
e,
|
|
22593
22602
|
p
|
|
22594
|
-
]),
|
|
22603
|
+
]), He = f(() => new Promise((r) => {
|
|
22595
22604
|
if (!S) {
|
|
22596
22605
|
r();
|
|
22597
22606
|
return;
|
|
@@ -22604,9 +22613,9 @@ function xy() {
|
|
|
22604
22613
|
e.setSourceLoading(o, !0);
|
|
22605
22614
|
let s = Kv(T, n, a), c = {
|
|
22606
22615
|
numberFormat: Ws(i.rows, qv(s)),
|
|
22607
|
-
dateFormat: Ys(i.rows,
|
|
22616
|
+
dateFormat: Ys(i.rows, Re(a)),
|
|
22608
22617
|
monthTable: qs(p),
|
|
22609
|
-
valueMapping:
|
|
22618
|
+
valueMapping: Ie
|
|
22610
22619
|
}, l = i.rows, d = i.rawCells ?? [], f = i.delimiter ?? ",", m = i.headers, h = m.map((e) => {
|
|
22611
22620
|
let t = T[e];
|
|
22612
22621
|
return (t ? n.find((e) => e.id === t) : void 0) ?? {
|
|
@@ -22668,36 +22677,36 @@ function xy() {
|
|
|
22668
22677
|
t,
|
|
22669
22678
|
n,
|
|
22670
22679
|
u,
|
|
22671
|
-
Pe,
|
|
22672
22680
|
Ie,
|
|
22681
|
+
Re,
|
|
22673
22682
|
p
|
|
22674
22683
|
]);
|
|
22675
22684
|
return {
|
|
22676
|
-
steps:
|
|
22685
|
+
steps: de,
|
|
22677
22686
|
activeStepIndex: h,
|
|
22678
22687
|
currentStepIndex: _,
|
|
22679
|
-
isFirstStep:
|
|
22680
|
-
isLastStep:
|
|
22681
|
-
goToStep:
|
|
22682
|
-
nextStep:
|
|
22683
|
-
prevStep:
|
|
22688
|
+
isFirstStep: he,
|
|
22689
|
+
isLastStep: ge,
|
|
22690
|
+
goToStep: fe,
|
|
22691
|
+
nextStep: pe,
|
|
22692
|
+
prevStep: me,
|
|
22684
22693
|
parsedCsv: S,
|
|
22685
22694
|
columnMapping: T,
|
|
22686
|
-
handleFileParsed:
|
|
22687
|
-
handleFileRemoved:
|
|
22688
|
-
updateColumnMapping:
|
|
22689
|
-
valueMapping:
|
|
22690
|
-
autoValueMapping:
|
|
22691
|
-
updateValueMapping:
|
|
22695
|
+
handleFileParsed: _e,
|
|
22696
|
+
handleFileRemoved: ve,
|
|
22697
|
+
updateColumnMapping: Me,
|
|
22698
|
+
valueMapping: Ie,
|
|
22699
|
+
autoValueMapping: Ne,
|
|
22700
|
+
updateValueMapping: Le,
|
|
22692
22701
|
xlsxFile: P,
|
|
22693
22702
|
sheetNames: I,
|
|
22694
22703
|
selectedSheet: R,
|
|
22695
|
-
setSelectedSheet:
|
|
22696
|
-
handleSheetConfirmed:
|
|
22697
|
-
handleXlsxMultiSheet:
|
|
22698
|
-
sheetPreviews:
|
|
22704
|
+
setSelectedSheet: z,
|
|
22705
|
+
handleSheetConfirmed: be,
|
|
22706
|
+
handleXlsxMultiSheet: ye,
|
|
22707
|
+
sheetPreviews: B,
|
|
22699
22708
|
primaryKey: O,
|
|
22700
|
-
|
|
22709
|
+
onPrimaryKeyChange: oe,
|
|
22701
22710
|
pendingColumns: H,
|
|
22702
22711
|
setPendingColumns: ne,
|
|
22703
22712
|
isParsing: A,
|
|
@@ -22708,7 +22717,7 @@ function xy() {
|
|
|
22708
22717
|
N(!0);
|
|
22709
22718
|
try {
|
|
22710
22719
|
await qo(e, "importing", Infinity, async () => {
|
|
22711
|
-
d?.onFileImport ? await
|
|
22720
|
+
d?.onFileImport ? await Be() : d?.onRowsImport ? await Ve() : await He();
|
|
22712
22721
|
});
|
|
22713
22722
|
} finally {
|
|
22714
22723
|
w(null), N(!1), i(!1);
|
|
@@ -22718,16 +22727,16 @@ function xy() {
|
|
|
22718
22727
|
S,
|
|
22719
22728
|
e,
|
|
22720
22729
|
d,
|
|
22721
|
-
Re,
|
|
22722
|
-
ze,
|
|
22723
22730
|
Be,
|
|
22731
|
+
Ve,
|
|
22732
|
+
He,
|
|
22724
22733
|
i
|
|
22725
22734
|
]),
|
|
22726
|
-
parseFile:
|
|
22727
|
-
remoteSourceLoading:
|
|
22728
|
-
remoteSourceError:
|
|
22729
|
-
clearRemoteSourceError:
|
|
22730
|
-
handleRemoteSourceSelect:
|
|
22735
|
+
parseFile: Te,
|
|
22736
|
+
remoteSourceLoading: Ee,
|
|
22737
|
+
remoteSourceError: Oe,
|
|
22738
|
+
clearRemoteSourceError: Ae,
|
|
22739
|
+
handleRemoteSourceSelect: je
|
|
22731
22740
|
};
|
|
22732
22741
|
}
|
|
22733
22742
|
//#endregion
|