@epam/ai-dial-ui-kit 0.6.0-rc.14 → 0.6.0-rc.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dial-ui-kit.cjs.js +1 -1
- package/dist/dial-ui-kit.es.js +97 -93
- package/package.json +1 -1
package/dist/dial-ui-kit.es.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as m, jsxs as z, Fragment as Be } from "react/jsx-runtime";
|
|
|
2
2
|
import ee from "classnames";
|
|
3
3
|
import { useFloating as ud, offset as jg, flip as Kg, shift as qg, arrow as yv, autoUpdate as Yg, useHover as Zg, useFocus as Rv, useDismiss as hd, useRole as gd, useInteractions as pd, useMergeRefs as fd, FloatingPortal as md, FloatingArrow as xv, autoPlacement as Fv, size as Ev, useClick as Dv, FloatingFocusManager as Qg, FloatingOverlay as Pv } from "@floating-ui/react";
|
|
4
4
|
import * as ye from "react";
|
|
5
|
-
import q, { createContext as wa, useState as I, useRef as L, useEffect as
|
|
5
|
+
import q, { createContext as wa, useState as I, useRef as L, useEffect as Re, useMemo as B, useContext as st, isValidElement as Cd, cloneElement as gc, useCallback as D, memo as mt, useLayoutEffect as qt, PureComponent as Tv, Component as Mv, forwardRef as vd, useImperativeHandle as Dn, createElement as Xo, Suspense as Iv, useId as wd, Children as Av } from "react";
|
|
6
6
|
import { IconInfoCircle as bd, IconCircleCheck as kv, IconAlertTriangle as Lv, IconAlertCircle as Ov, IconX as fo, IconMinus as Nv, IconCheck as Xg, IconExclamationCircle as Sd, IconClipboardX as Jg, IconChevronsLeft as Hv, IconChevronsRight as Gv, IconGripVertical as Bv, IconFile as ep, IconFileTypeZip as Vv, IconFileTypeXml as zv, IconFileTypeXls as Wv, IconFileTypeVue as _v, IconFileTypeTxt as Uv, IconFileTypeTsx as $v, IconFileTypeTs as jv, IconFileTypeSvg as Kv, IconFileTypeSql as qv, IconFileTypeRs as Yv, IconFileTypePpt as Zv, IconFileTypePng as Qv, IconFileTypePhp as Xv, IconFileTypePdf as Jv, IconFileTypeJsx as ew, IconFileTypeJs as tw, IconFileTypeJpg as sw, IconFileTypeHtml as iw, IconFileTypeDocx as ow, IconFileTypeDoc as nw, IconFileTypeCsv as rw, IconFileTypeCss as aw, IconFileTypeBmp as lw, IconArrowUpRight as cw, IconFolder as yd, IconChevronLeft as dw, IconChevronRight as tp, IconZoomCancel as uw, IconChevronDown as ba, IconDotsVertical as Pn, IconDots as hw, IconTrashX as Tn, IconEyeOff as sp, IconEye as ip, IconSearch as gw, IconPlus as pw, IconChevronUp as fw, IconAlertCircleFilled as mw, IconCaretRightFilled as Cw, IconArrowLeft as vw, IconFileZip as ww, IconCopyMinus as bw, IconFolderPlus as Sw, IconCopy as Rd, IconDownload as xd, IconPencilMinus as op, IconCircleFilled as Rr, IconFileDescription as yw } from "@tabler/icons-react";
|
|
7
7
|
import Rw, { flushSync as xw, createPortal as Fd } from "react-dom";
|
|
8
8
|
const Ed = "-", Fw = (e) => {
|
|
@@ -2779,7 +2779,7 @@ const gi = ({
|
|
|
2779
2779
|
}), h = Rv(d.context, {
|
|
2780
2780
|
enabled: i == null
|
|
2781
2781
|
}), g = hd(d.context), p = gd(d.context, { role: "tooltip" }), f = pd([u, h, g, p]);
|
|
2782
|
-
return
|
|
2782
|
+
return Re(() => {
|
|
2783
2783
|
if (!l) return;
|
|
2784
2784
|
const C = d.refs.reference.current;
|
|
2785
2785
|
if (!(C instanceof Element)) return;
|
|
@@ -3056,7 +3056,7 @@ const c1 = (e) => ({
|
|
|
3056
3056
|
}, g = D(() => {
|
|
3057
3057
|
u.current && cancelAnimationFrame(u.current), u.current = requestAnimationFrame(h);
|
|
3058
3058
|
}, []);
|
|
3059
|
-
|
|
3059
|
+
Re(() => {
|
|
3060
3060
|
g();
|
|
3061
3061
|
const C = () => g();
|
|
3062
3062
|
window.addEventListener("resize", C);
|
|
@@ -3516,7 +3516,7 @@ const y1 = "flex", R1 = "pb-1 mt-2", x1 = {
|
|
|
3516
3516
|
onToggle: c
|
|
3517
3517
|
}) => {
|
|
3518
3518
|
const [d, u] = I(s), [h, g] = I(!0), p = B(() => typeof l == "boolean", [l]), f = p ? l : h;
|
|
3519
|
-
|
|
3519
|
+
Re(() => {
|
|
3520
3520
|
p && u(l ? s : wl);
|
|
3521
3521
|
}, [p, l, s]);
|
|
3522
3522
|
const C = ee([
|
|
@@ -4698,7 +4698,7 @@ var Kb = /* @__PURE__ */ mt(function(t) {
|
|
|
4698
4698
|
"children"
|
|
4699
4699
|
]);
|
|
4700
4700
|
const [o, n] = qb(i);
|
|
4701
|
-
return
|
|
4701
|
+
return Re(() => {
|
|
4702
4702
|
if (n) {
|
|
4703
4703
|
const r = Dp();
|
|
4704
4704
|
return ++ju, () => {
|
|
@@ -4765,7 +4765,7 @@ function Qb() {
|
|
|
4765
4765
|
}), bl;
|
|
4766
4766
|
}
|
|
4767
4767
|
var Xb = Qb();
|
|
4768
|
-
const Jb = /* @__PURE__ */ Zb(Xb), pi = typeof window < "u" ? qt :
|
|
4768
|
+
const Jb = /* @__PURE__ */ Zb(Xb), pi = typeof window < "u" ? qt : Re;
|
|
4769
4769
|
function e0(e, t, s) {
|
|
4770
4770
|
const [i, o] = I(
|
|
4771
4771
|
() => t(e)
|
|
@@ -5238,7 +5238,7 @@ function m0(e, t, s) {
|
|
|
5238
5238
|
s
|
|
5239
5239
|
]
|
|
5240
5240
|
);
|
|
5241
|
-
return
|
|
5241
|
+
return Re(() => {
|
|
5242
5242
|
i.spec = e;
|
|
5243
5243
|
}, [
|
|
5244
5244
|
e
|
|
@@ -5338,7 +5338,7 @@ function F0(e, t) {
|
|
|
5338
5338
|
t
|
|
5339
5339
|
]
|
|
5340
5340
|
);
|
|
5341
|
-
return
|
|
5341
|
+
return Re(() => {
|
|
5342
5342
|
s.spec = e;
|
|
5343
5343
|
}, [
|
|
5344
5344
|
e
|
|
@@ -42946,7 +42946,7 @@ var _C = vd((e, t) => {
|
|
|
42946
42946
|
}
|
|
42947
42947
|
}), $A = (e) => {
|
|
42948
42948
|
const { initialProps: t, addUpdateCallback: s, CustomComponentClass: i, setMethods: o } = e, [{ key: n, ...r }, a] = I(t);
|
|
42949
|
-
return
|
|
42949
|
+
return Re(() => {
|
|
42950
42950
|
s((l) => a(l));
|
|
42951
42951
|
}, []), /* @__PURE__ */ q.createElement(Tu.Provider, { value: { setMethods: o } }, /* @__PURE__ */ q.createElement(i, { key: n, ...r }));
|
|
42952
42952
|
}, jA = mt($A), KA = 0;
|
|
@@ -43420,7 +43420,7 @@ var lk = 1e3, ck = class {
|
|
|
43420
43420
|
qt(
|
|
43421
43421
|
() => Hn(i, s, d.current, u),
|
|
43422
43422
|
[i]
|
|
43423
|
-
),
|
|
43423
|
+
), Re(() => {
|
|
43424
43424
|
e.setDragSource(l.current);
|
|
43425
43425
|
}, [i]);
|
|
43426
43426
|
const p = B(() => !!(i?.componentFromFramework && Ro(i.componentClass)), [i]), f = i?.componentFromFramework, C = i?.componentClass;
|
|
@@ -43477,7 +43477,7 @@ var lk = 1e3, ck = class {
|
|
|
43477
43477
|
[g]
|
|
43478
43478
|
);
|
|
43479
43479
|
const T = B(() => n.toString(), [n]), k = B(() => a.toString(), [a]), F = B(() => c.toString(), [c]), P = B(() => !!(g && g.componentFromFramework && Ro(g.componentClass)), [g]), G = B(() => s.get("reactiveCustomComponents"), []), _ = B(() => s.get("enableFilterHandlers"), []), [H, ie] = I();
|
|
43480
|
-
|
|
43480
|
+
Re(() => {
|
|
43481
43481
|
if (g?.componentFromFramework)
|
|
43482
43482
|
if (G) {
|
|
43483
43483
|
const U = _ ? hk : JA, se = new U(g.params, () => f((te) => te + 1));
|
|
@@ -43543,7 +43543,7 @@ var lk = 1e3, ck = class {
|
|
|
43543
43543
|
};
|
|
43544
43544
|
e.setComp(k, T, C.current, v.current, p.current);
|
|
43545
43545
|
}, []);
|
|
43546
|
-
qt(() => Hn(h, t, v.current), [h]),
|
|
43546
|
+
qt(() => Hn(h, t, v.current), [h]), Re(() => {
|
|
43547
43547
|
f.current && e.setDragSource(f.current);
|
|
43548
43548
|
}, [h]);
|
|
43549
43549
|
const S = B(() => !!(h?.componentFromFramework && Ro(h.componentClass)), [h]), y = B(() => "ag-header-group-cell " + o.toString(), [o]), R = B(
|
|
@@ -43647,7 +43647,7 @@ var lk = 1e3, ck = class {
|
|
|
43647
43647
|
);
|
|
43648
43648
|
return /* @__PURE__ */ q.createElement("div", { ref: a, className: l, style: c, role: "presentation" }, /* @__PURE__ */ q.createElement(oc, { pinned: "left" }), /* @__PURE__ */ q.createElement(oc, { pinned: null }), /* @__PURE__ */ q.createElement(oc, { pinned: "right" }));
|
|
43649
43649
|
}, Sk = mt(bk), yk = (e, t) => {
|
|
43650
|
-
|
|
43650
|
+
Re(() => {
|
|
43651
43651
|
const s = t.current;
|
|
43652
43652
|
if (s) {
|
|
43653
43653
|
const i = s.parentElement;
|
|
@@ -43704,7 +43704,7 @@ var lk = 1e3, ck = class {
|
|
|
43704
43704
|
}
|
|
43705
43705
|
}, xk = (e) => {
|
|
43706
43706
|
const t = L(e), s = L(), i = L(!1), o = L(!1), [, n] = I(0);
|
|
43707
|
-
i.current && (o.current = !0),
|
|
43707
|
+
i.current && (o.current = !0), Re(() => (i.current || (s.current = t.current(), i.current = !0), n((r) => r + 1), () => {
|
|
43708
43708
|
o.current && s.current?.();
|
|
43709
43709
|
}), []);
|
|
43710
43710
|
}, Fk = (e) => {
|
|
@@ -43778,7 +43778,7 @@ var lk = 1e3, ck = class {
|
|
|
43778
43778
|
const c = l.getGui();
|
|
43779
43779
|
c && c.parentElement && c.remove(), r.destroyBean(l), o.current = void 0;
|
|
43780
43780
|
}, []);
|
|
43781
|
-
|
|
43781
|
+
Re(() => {
|
|
43782
43782
|
const l = e != null, c = e?.compDetails && !e.compDetails.componentFromFramework, d = t && s == null;
|
|
43783
43783
|
if (!(l && c && !d)) {
|
|
43784
43784
|
a();
|
|
@@ -43799,7 +43799,7 @@ var lk = 1e3, ck = class {
|
|
|
43799
43799
|
return;
|
|
43800
43800
|
(t ? s : n.current).appendChild(f), o.current = p;
|
|
43801
43801
|
});
|
|
43802
|
-
}, [e, t, i]),
|
|
43802
|
+
}, [e, t, i]), Re(() => a, []);
|
|
43803
43803
|
}, jC = Pk, Tk = ({
|
|
43804
43804
|
cellCtrl: e,
|
|
43805
43805
|
parent: t
|
|
@@ -43965,7 +43965,7 @@ var lk = 1e3, ck = class {
|
|
|
43965
43965
|
const { current: me } = fe;
|
|
43966
43966
|
me.toggleCss("ag-cell-value", !Z), me.toggleCss("ag-cell-inline-editing", !!d && !d.popup), me.toggleCss("ag-cell-popup-editing", !!d && !!d.popup), me.toggleCss("ag-cell-not-inline-editing", !d || !!d.popup);
|
|
43967
43967
|
});
|
|
43968
|
-
const
|
|
43968
|
+
const xe = () => {
|
|
43969
43969
|
const { compDetails: me, value: be } = l;
|
|
43970
43970
|
if (!me)
|
|
43971
43971
|
return be?.toString?.() ?? be;
|
|
@@ -43974,7 +43974,7 @@ var lk = 1e3, ck = class {
|
|
|
43974
43974
|
return /* @__PURE__ */ q.createElement(Iv, { fallback: /* @__PURE__ */ q.createElement(Tk, { cellCtrl: e, parent: k }) }, le ? /* @__PURE__ */ q.createElement($, { ...me.params, key: h }) : /* @__PURE__ */ q.createElement($, { ...me.params, key: h, ref: P }));
|
|
43975
43975
|
}
|
|
43976
43976
|
}, Ee = () => {
|
|
43977
|
-
const me = () => l == null ? null : Z ? /* @__PURE__ */ q.createElement("span", { role: "presentation", id: `cell-${r}`, className: X, ref: se },
|
|
43977
|
+
const me = () => l == null ? null : Z ? /* @__PURE__ */ q.createElement("span", { role: "presentation", id: `cell-${r}`, className: X, ref: se }, xe()) : xe(), be = ($) => Dk($, oe, k.current, e, R);
|
|
43978
43978
|
return d != null ? d.popup ? /* @__PURE__ */ q.createElement(q.Fragment, null, me(), be(d)) : be(d) : me();
|
|
43979
43979
|
}, ke = () => /* @__PURE__ */ q.createElement("div", { ref: K, style: p, role: T, "col-id": n }, Z ? /* @__PURE__ */ q.createElement("div", { className: "ag-cell-wrapper", role: "presentation", ref: A }, Ee()) : Ee());
|
|
43980
43980
|
return e.isCellSpanning() ? /* @__PURE__ */ q.createElement("div", { ref: Ce, className: "ag-spanned-cell-wrapper", role: "presentation" }, ke()) : ke();
|
|
@@ -43986,7 +43986,7 @@ var lk = 1e3, ck = class {
|
|
|
43986
43986
|
), [T, k] = I(
|
|
43987
43987
|
() => c ? e.getInitialTransform(t) : void 0
|
|
43988
43988
|
), F = L(null), P = L(), G = L(), _ = L(!1), [H, ie] = I(0);
|
|
43989
|
-
|
|
43989
|
+
Re(() => {
|
|
43990
43990
|
if (_.current || !y || H > 10)
|
|
43991
43991
|
return;
|
|
43992
43992
|
const K = F.current?.firstChild;
|
|
@@ -44016,7 +44016,7 @@ var lk = 1e3, ck = class {
|
|
|
44016
44016
|
setTransform: k,
|
|
44017
44017
|
// i found using React for managing classes at the row level was to slow, as modifying classes caused a lot of
|
|
44018
44018
|
// React code to execute, so avoiding React for managing CSS Classes made the grid go much faster.
|
|
44019
|
-
toggleCss: (le,
|
|
44019
|
+
toggleCss: (le, xe) => ne.current.toggleCss(le, xe),
|
|
44020
44020
|
setDomOrder: (le) => a.current = le,
|
|
44021
44021
|
setRowIndex: u,
|
|
44022
44022
|
setRowId: g,
|
|
@@ -44024,9 +44024,9 @@ var lk = 1e3, ck = class {
|
|
|
44024
44024
|
setUserStyles: v,
|
|
44025
44025
|
// if we don't maintain the order, then cols will be ripped out and into the dom
|
|
44026
44026
|
// when cols reordered, which would stop the CSS transitions from working
|
|
44027
|
-
setCellCtrls: (le,
|
|
44027
|
+
setCellCtrls: (le, xe) => {
|
|
44028
44028
|
const Ee = w.current, ke = fa(Ee, le, a.current);
|
|
44029
|
-
ke !== Ee && (w.current = ke, n ? N.current() : Fn(
|
|
44029
|
+
ke !== Ee && (w.current = ke, n ? N.current() : Fn(xe, () => S(ke)));
|
|
44030
44030
|
},
|
|
44031
44031
|
showFullWidth: (le) => {
|
|
44032
44032
|
G.current = le.params, R(le);
|
|
@@ -44034,11 +44034,11 @@ var lk = 1e3, ck = class {
|
|
|
44034
44034
|
getFullWidthCellRenderer: () => P.current,
|
|
44035
44035
|
getFullWidthCellRendererParams: () => G.current,
|
|
44036
44036
|
refreshFullWidth: (le) => {
|
|
44037
|
-
const
|
|
44038
|
-
return G.current =
|
|
44037
|
+
const xe = le();
|
|
44038
|
+
return G.current = xe, V.current ? (R((Ee) => ({
|
|
44039
44039
|
...Ee,
|
|
44040
|
-
params:
|
|
44041
|
-
})), !0) : !P.current || !P.current.refresh ? !1 : P.current.refresh(
|
|
44040
|
+
params: xe
|
|
44041
|
+
})), !0) : !P.current || !P.current.refresh ? !1 : P.current.refresh(xe);
|
|
44042
44042
|
}
|
|
44043
44043
|
};
|
|
44044
44044
|
e.setComp(Ce, K, t, r.current);
|
|
@@ -44051,7 +44051,7 @@ var lk = 1e3, ck = class {
|
|
|
44051
44051
|
const K = { top: x, transform: T };
|
|
44052
44052
|
return Object.assign(K, C), K;
|
|
44053
44053
|
}, [x, T, C]), X = l && y?.componentFromFramework, oe = !l && se != null, fe = B(() => !!(y?.componentFromFramework && Ro(y.componentClass)), [y]), V = L(!1);
|
|
44054
|
-
|
|
44054
|
+
Re(() => {
|
|
44055
44055
|
V.current = fe && !!y && !!i.get("reactiveCustomComponents");
|
|
44056
44056
|
}, [fe, y]);
|
|
44057
44057
|
const A = () => se?.map((K) => /* @__PURE__ */ q.createElement(
|
|
@@ -44239,7 +44239,7 @@ var lk = 1e3, ck = class {
|
|
|
44239
44239
|
), K = B(() => Ht("ag-body", H), [H]), Ce = B(
|
|
44240
44240
|
() => Ht("ag-floating-top", y ? "ag-invisible" : null, G),
|
|
44241
44241
|
[G, y]
|
|
44242
|
-
), le = B(() => Ht("ag-sticky-top", G), [G]),
|
|
44242
|
+
), le = B(() => Ht("ag-sticky-top", G), [G]), xe = B(
|
|
44243
44243
|
() => Ht("ag-sticky-bottom", f === "0px" ? "ag-invisible" : null, G),
|
|
44244
44244
|
[G, f]
|
|
44245
44245
|
), Ee = B(
|
|
@@ -44295,7 +44295,7 @@ var lk = 1e3, ck = class {
|
|
|
44295
44295
|
children: ["stickyTopLeft", "stickyTopCenter", "stickyTopRight", "stickyTopFullWidth"]
|
|
44296
44296
|
}), ve({
|
|
44297
44297
|
section: se,
|
|
44298
|
-
className:
|
|
44298
|
+
className: xe,
|
|
44299
44299
|
style: be,
|
|
44300
44300
|
children: ["stickyBottomLeft", "stickyBottomCenter", "stickyBottomRight", "stickyBottomFullWidth"]
|
|
44301
44301
|
}), ve({
|
|
@@ -44395,7 +44395,7 @@ var lk = 1e3, ck = class {
|
|
|
44395
44395
|
};
|
|
44396
44396
|
G.setComp(_, P, P), d(!0);
|
|
44397
44397
|
}, []);
|
|
44398
|
-
|
|
44398
|
+
Re(() => {
|
|
44399
44399
|
const P = g.current, G = p.current;
|
|
44400
44400
|
if (!u || !P || !C || !G || e.isDestroyed())
|
|
44401
44401
|
return;
|
|
@@ -44581,7 +44581,7 @@ var lk = 1e3, ck = class {
|
|
|
44581
44581
|
}), [e.containerStyle]), f = D((v) => {
|
|
44582
44582
|
c.current && !a.current?.shouldQueueUpdates() ? v() : n.current.push(v);
|
|
44583
44583
|
}, []);
|
|
44584
|
-
|
|
44584
|
+
Re(() => {
|
|
44585
44585
|
const v = $k(r.current, e);
|
|
44586
44586
|
r.current = e, f(() => {
|
|
44587
44587
|
t.current && gy(v, t.current);
|
|
@@ -44883,7 +44883,7 @@ const Qk = ee(
|
|
|
44883
44883
|
},
|
|
44884
44884
|
[C, n, se, R, i, E]
|
|
44885
44885
|
);
|
|
44886
|
-
|
|
44886
|
+
Re(() => {
|
|
44887
44887
|
n && R && E(!1);
|
|
44888
44888
|
}, [n, R, E]);
|
|
44889
44889
|
const X = D(
|
|
@@ -44956,7 +44956,7 @@ const Qk = ee(
|
|
|
44956
44956
|
onContextMenu: te,
|
|
44957
44957
|
onMouseDown: Z
|
|
44958
44958
|
});
|
|
44959
|
-
return
|
|
44959
|
+
return Re(() => {
|
|
44960
44960
|
if (!R) return;
|
|
44961
44961
|
const V = P.reference.current;
|
|
44962
44962
|
let A = null;
|
|
@@ -45062,7 +45062,7 @@ const Qk = ee(
|
|
|
45062
45062
|
() => o.filter((v) => !u(v)),
|
|
45063
45063
|
[o, u]
|
|
45064
45064
|
), g = e !== void 0 || t !== void 0;
|
|
45065
|
-
|
|
45065
|
+
Re(() => {
|
|
45066
45066
|
if (e !== void 0 && !t) {
|
|
45067
45067
|
const v = /* @__PURE__ */ new Map();
|
|
45068
45068
|
o.forEach((b) => {
|
|
@@ -45252,8 +45252,8 @@ const QC = ({
|
|
|
45252
45252
|
!u && "dial-row-select-visible",
|
|
45253
45253
|
Ce && "opacity-50 cursor-not-allowed"
|
|
45254
45254
|
),
|
|
45255
|
-
onChange: (
|
|
45256
|
-
Ce || !A.data || G(A.data, !!
|
|
45255
|
+
onChange: (xe) => {
|
|
45256
|
+
Ce || !A.data || G(A.data, !!xe);
|
|
45257
45257
|
}
|
|
45258
45258
|
},
|
|
45259
45259
|
`${Y}-${K}`
|
|
@@ -45275,7 +45275,7 @@ const QC = ({
|
|
|
45275
45275
|
return A;
|
|
45276
45276
|
const K = A.cellRenderer;
|
|
45277
45277
|
return { ...A, cellRenderer: (le) => {
|
|
45278
|
-
const
|
|
45278
|
+
const xe = le.data ? i?.(le.data) ?? [] : [];
|
|
45279
45279
|
let Ee = null;
|
|
45280
45280
|
typeof K == "function" ? Ee = /* @__PURE__ */ m(K, { ...le }) : Ee = U(le);
|
|
45281
45281
|
const ke = le.data ? p(le.data) : null, me = ke ? l?.has(ke) : !1;
|
|
@@ -45283,7 +45283,7 @@ const QC = ({
|
|
|
45283
45283
|
It,
|
|
45284
45284
|
{
|
|
45285
45285
|
trigger: [Vt.ContextMenu],
|
|
45286
|
-
menu: { items:
|
|
45286
|
+
menu: { items: xe },
|
|
45287
45287
|
anchorToMouse: !0,
|
|
45288
45288
|
matchReferenceWidth: !0,
|
|
45289
45289
|
className: "w-full h-full",
|
|
@@ -45340,7 +45340,7 @@ const QC = ({
|
|
|
45340
45340
|
}));
|
|
45341
45341
|
A.api.updateGridOptions({ columnDefs: Y, rowData: t }), A.api.sizeColumnsToFit(), k(A.api), s?.onGridReady?.(A);
|
|
45342
45342
|
};
|
|
45343
|
-
|
|
45343
|
+
Re(() => {
|
|
45344
45344
|
T && T.redrawRows();
|
|
45345
45345
|
}, [T, P]);
|
|
45346
45346
|
const V = D(
|
|
@@ -45460,7 +45460,7 @@ const Mg = () => typeof window < "u" && window.innerWidth < 640, Ig = () => {
|
|
|
45460
45460
|
return e >= 1024 ? ni.Desktop : e < 640 ? ni.Mobile : ni.Tablet;
|
|
45461
45461
|
}, r8 = () => {
|
|
45462
45462
|
const [e, t] = I(Ig());
|
|
45463
|
-
return
|
|
45463
|
+
return Re(() => {
|
|
45464
45464
|
const s = () => t(Ig());
|
|
45465
45465
|
return window.addEventListener("resize", s), () => window.removeEventListener("resize", s);
|
|
45466
45466
|
}, []), e;
|
|
@@ -45483,11 +45483,11 @@ const Mg = () => typeof window < "u" && window.innerWidth < 640, Ig = () => {
|
|
|
45483
45483
|
const R = v.current;
|
|
45484
45484
|
R && h(R.scrollWidth > R.clientWidth);
|
|
45485
45485
|
}, []);
|
|
45486
|
-
return
|
|
45486
|
+
return Re(() => {
|
|
45487
45487
|
y();
|
|
45488
45488
|
const R = new ResizeObserver(() => y()), x = v.current;
|
|
45489
45489
|
return x && R.observe(x), () => R.disconnect();
|
|
45490
|
-
}, [e, y]),
|
|
45490
|
+
}, [e, y]), Re(() => {
|
|
45491
45491
|
const R = w.current, x = v.current;
|
|
45492
45492
|
if (!R || !x) return;
|
|
45493
45493
|
const E = R.offsetLeft, T = E + R.offsetWidth, k = x.scrollLeft, F = k + x.clientWidth;
|
|
@@ -45878,7 +45878,7 @@ const Mg = () => typeof window < "u" && window.innerWidth < 640, Ig = () => {
|
|
|
45878
45878
|
inputRef: E
|
|
45879
45879
|
}) => {
|
|
45880
45880
|
const T = L(null), k = fd([E, T]);
|
|
45881
|
-
|
|
45881
|
+
Re(() => {
|
|
45882
45882
|
const _ = T.current;
|
|
45883
45883
|
if (!_) return;
|
|
45884
45884
|
const H = (ie) => {
|
|
@@ -46621,7 +46621,7 @@ const G8 = {
|
|
|
46621
46621
|
allowClear: u = !0
|
|
46622
46622
|
}) => {
|
|
46623
46623
|
const [h, g] = I(t || "");
|
|
46624
|
-
|
|
46624
|
+
Re(() => {
|
|
46625
46625
|
g(t || "");
|
|
46626
46626
|
}, [t]);
|
|
46627
46627
|
const p = D(
|
|
@@ -46768,7 +46768,7 @@ const G8 = {
|
|
|
46768
46768
|
const S = d.filter((y, R) => R !== b);
|
|
46769
46769
|
u(S), l?.(S);
|
|
46770
46770
|
};
|
|
46771
|
-
return
|
|
46771
|
+
return Re(() => {
|
|
46772
46772
|
const b = new ResizeObserver(() => {
|
|
46773
46773
|
if (c.current) {
|
|
46774
46774
|
const S = c.current.scrollHeight > c.current.clientHeight + 10;
|
|
@@ -46884,9 +46884,9 @@ const $8 = ({
|
|
|
46884
46884
|
const $ = _.trim().toLowerCase();
|
|
46885
46885
|
return $ ? e.filter((Se) => Se.label.toLowerCase().includes($)) : e;
|
|
46886
46886
|
}, [e, _]);
|
|
46887
|
-
|
|
46887
|
+
Re(() => {
|
|
46888
46888
|
!P && !E && H("");
|
|
46889
|
-
}, [E, P]),
|
|
46889
|
+
}, [E, P]), Re(() => {
|
|
46890
46890
|
E && H(l || "");
|
|
46891
46891
|
}, [l, E]);
|
|
46892
46892
|
const Z = D(
|
|
@@ -46928,7 +46928,7 @@ const $8 = ({
|
|
|
46928
46928
|
fe.forEach((Se) => $.add(Se.value)), Z(Array.from($));
|
|
46929
46929
|
}
|
|
46930
46930
|
}, le = se.length > 0;
|
|
46931
|
-
|
|
46931
|
+
Re(() => {
|
|
46932
46932
|
P && E && !t && !v && requestAnimationFrame(() => {
|
|
46933
46933
|
const $ = ie.current;
|
|
46934
46934
|
if (!$) return;
|
|
@@ -46937,9 +46937,9 @@ const $8 = ({
|
|
|
46937
46937
|
$.setSelectionRange?.(Se, Se);
|
|
46938
46938
|
});
|
|
46939
46939
|
}, [P, E, t, v]);
|
|
46940
|
-
const
|
|
46941
|
-
() =>
|
|
46942
|
-
[e,
|
|
46940
|
+
const xe = !t && le ? se[0] : void 0, Ee = B(
|
|
46941
|
+
() => xe ? e.find(($) => $.value === xe) : void 0,
|
|
46942
|
+
[e, xe]
|
|
46943
46943
|
), ke = D(() => !t || se.length === 0 ? null : /* @__PURE__ */ m(
|
|
46944
46944
|
nv,
|
|
46945
46945
|
{
|
|
@@ -47816,7 +47816,7 @@ const nL = function(t, s, i) {
|
|
|
47816
47816
|
), w = B(() => p || v(h), [p, h, v]), b = () => {
|
|
47817
47817
|
g([]), f(!1);
|
|
47818
47818
|
};
|
|
47819
|
-
|
|
47819
|
+
Re(() => {
|
|
47820
47820
|
b();
|
|
47821
47821
|
}, [o]);
|
|
47822
47822
|
const [{ isOver: S, canDrop: y }, R] = Ip(
|
|
@@ -48235,18 +48235,18 @@ function AL({
|
|
|
48235
48235
|
}, [p, o, r]), v = D(() => {
|
|
48236
48236
|
s && a(e), g(), n?.();
|
|
48237
48237
|
}, [e, n, s, g]);
|
|
48238
|
-
return
|
|
48238
|
+
return Re(() => {
|
|
48239
48239
|
t && (a(e), g(), requestAnimationFrame(() => {
|
|
48240
48240
|
h.current?.focus(), h.current?.select();
|
|
48241
48241
|
}));
|
|
48242
|
-
}, [t, e, g]),
|
|
48242
|
+
}, [t, e, g]), Re(() => {
|
|
48243
48243
|
const w = h.current;
|
|
48244
48244
|
if (!t || !w) return;
|
|
48245
48245
|
const b = (S) => {
|
|
48246
48246
|
S.key === "Enter" ? (S.preventDefault(), h.current?.blur()) : S.key === "Escape" && (S.preventDefault(), v());
|
|
48247
48247
|
};
|
|
48248
48248
|
return w.addEventListener("keydown", b), () => w.removeEventListener("keydown", b);
|
|
48249
|
-
}, [t, C, v]),
|
|
48249
|
+
}, [t, C, v]), Re(() => {
|
|
48250
48250
|
if (!t) return;
|
|
48251
48251
|
const w = h.current;
|
|
48252
48252
|
if (!w) return;
|
|
@@ -48319,7 +48319,11 @@ const va = ({
|
|
|
48319
48319
|
), o = B(
|
|
48320
48320
|
() => i ? e?.expandedPaths ?? /* @__PURE__ */ new Set() : t,
|
|
48321
48321
|
[i, e?.expandedPaths, t]
|
|
48322
|
-
)
|
|
48322
|
+
);
|
|
48323
|
+
Re(() => {
|
|
48324
|
+
i && e?.expandedPaths && s(new Set(e.expandedPaths));
|
|
48325
|
+
}, [i, e?.expandedPaths]);
|
|
48326
|
+
const n = D(
|
|
48323
48327
|
(d) => {
|
|
48324
48328
|
i ? e?.onExpandedPathsChange?.(d) : s(d);
|
|
48325
48329
|
},
|
|
@@ -48624,7 +48628,7 @@ const va = ({
|
|
|
48624
48628
|
var dd = /* @__PURE__ */ ((e) => (e.MyFiles = "my_files", e.Shared = "shared", e.Organization = "organization", e))(dd || {}), he = /* @__PURE__ */ ((e) => (e.Duplicate = "duplicate", e.Copy = "copy", e.Move = "move", e.Download = "download", e.Delete = "delete", e.Rename = "rename", e.Info = "info", e.Unshare = "unshare", e))(he || {}), pt = /* @__PURE__ */ ((e) => (e.Replace = "replace", e.Duplicate = "duplicate", e.Cancel = "cancel", e))(pt || {}), Ot = /* @__PURE__ */ ((e) => (e.ReplaceAll = "replaceAll", e.DuplicateAll = "duplicateAll", e.DecideForEach = "decideForEach", e))(Ot || {}), tt = /* @__PURE__ */ ((e) => (e.Copy = "copy", e.Move = "move", e))(tt || {}), no = /* @__PURE__ */ ((e) => (e.Tree = "tree", e.Grid = "grid", e))(no || {}), gt = /* @__PURE__ */ ((e) => (e.Name = "name", e.UpdatedAt = "updatedAt", e.Size = "size", e.Author = "author", e.Owner = "owner", e.Path = "path", e.Actions = "__actions", e))(gt || {});
|
|
48625
48629
|
const pv = () => {
|
|
48626
48630
|
const [e, t] = I(Mg());
|
|
48627
|
-
return
|
|
48631
|
+
return Re(() => {
|
|
48628
48632
|
const s = () => t(Mg());
|
|
48629
48633
|
return window.addEventListener("resize", s), () => window.removeEventListener("resize", s);
|
|
48630
48634
|
}, []), e;
|
|
@@ -48736,7 +48740,7 @@ function zL({
|
|
|
48736
48740
|
d.current = f.map(
|
|
48737
48741
|
(C) => Math.ceil(C.getBoundingClientRect().width)
|
|
48738
48742
|
);
|
|
48739
|
-
}, [e, ...n]),
|
|
48743
|
+
}, [e, ...n]), Re(() => {
|
|
48740
48744
|
if (!r.current) return;
|
|
48741
48745
|
let f = null;
|
|
48742
48746
|
const C = () => {
|
|
@@ -49254,10 +49258,10 @@ const WL = ({ getSelectionLabel: e, onClearSelection: t, actions: s, selectedCou
|
|
|
49254
49258
|
const le = f.get(Ce.sourceUrl);
|
|
49255
49259
|
if (!le)
|
|
49256
49260
|
return;
|
|
49257
|
-
const
|
|
49261
|
+
const xe = Ce.destinationUrl.split("/").pop();
|
|
49258
49262
|
return {
|
|
49259
49263
|
fileContent: le.fileContent,
|
|
49260
|
-
name:
|
|
49264
|
+
name: xe
|
|
49261
49265
|
};
|
|
49262
49266
|
}).filter(Boolean);
|
|
49263
49267
|
K.length > 0 && e?.(K, Y), G();
|
|
@@ -49265,16 +49269,16 @@ const WL = ({ getSelectionLabel: e, onClearSelection: t, actions: s, selectedCou
|
|
|
49265
49269
|
}), G = D(() => {
|
|
49266
49270
|
C(/* @__PURE__ */ new Map()), w(null);
|
|
49267
49271
|
}, []);
|
|
49268
|
-
|
|
49272
|
+
Re(() => {
|
|
49269
49273
|
let A = 0;
|
|
49270
|
-
const Y = (
|
|
49271
|
-
YL(
|
|
49274
|
+
const Y = (xe) => {
|
|
49275
|
+
YL(xe) && xe.dataTransfer.types.includes(vL) && (A++, c(!0));
|
|
49272
49276
|
}, K = () => {
|
|
49273
49277
|
A--, A === 0 && c(!1);
|
|
49274
49278
|
}, Ce = () => {
|
|
49275
49279
|
A = 0, c(!1);
|
|
49276
|
-
}, le = (
|
|
49277
|
-
|
|
49280
|
+
}, le = (xe) => {
|
|
49281
|
+
xe.preventDefault();
|
|
49278
49282
|
};
|
|
49279
49283
|
return window.addEventListener("dragenter", Y), window.addEventListener("dragleave", K), window.addEventListener("drop", Ce), window.addEventListener("dragover", le), () => {
|
|
49280
49284
|
window.removeEventListener("dragenter", Y), window.removeEventListener("dragleave", K), window.removeEventListener("drop", Ce), window.removeEventListener("dragover", le);
|
|
@@ -49320,8 +49324,8 @@ const WL = ({ getSelectionLabel: e, onClearSelection: t, actions: s, selectedCou
|
|
|
49320
49324
|
}
|
|
49321
49325
|
const le = new Map(A.map((ke) => [ke.name, ke]));
|
|
49322
49326
|
C(le);
|
|
49323
|
-
const
|
|
49324
|
-
return w({ destinationFolder: Y }), x(Y,
|
|
49327
|
+
const xe = H(A, Y);
|
|
49328
|
+
return w({ destinationFolder: Y }), x(Y, xe, {
|
|
49325
49329
|
destinationFolder: Y
|
|
49326
49330
|
}).hasConflicts ? !1 : (e?.(A, Y), G(), !0);
|
|
49327
49331
|
},
|
|
@@ -49364,25 +49368,25 @@ const WL = ({ getSelectionLabel: e, onClearSelection: t, actions: s, selectedCou
|
|
|
49364
49368
|
const le = Ce.map((Ee) => ({
|
|
49365
49369
|
fileContent: Ee,
|
|
49366
49370
|
name: Ee.name
|
|
49367
|
-
})),
|
|
49368
|
-
if (
|
|
49371
|
+
})), xe = b(le);
|
|
49372
|
+
if (xe.length === 0) {
|
|
49369
49373
|
u(
|
|
49370
49374
|
o.unsupportedFiles || "Selected files are not supported"
|
|
49371
49375
|
);
|
|
49372
49376
|
return;
|
|
49373
49377
|
}
|
|
49374
|
-
await ie(
|
|
49378
|
+
await ie(xe, Y, K);
|
|
49375
49379
|
},
|
|
49376
49380
|
[ie, b, o]
|
|
49377
49381
|
);
|
|
49378
|
-
|
|
49382
|
+
Re(() => {
|
|
49379
49383
|
let A = h.current;
|
|
49380
49384
|
A || (A = document.createElement("input"), A.type = "file", A.multiple = !0, A.style.display = "none", document.body.appendChild(A), h.current = A), i && i.length > 0 ? A.accept = i.join(",") : A.removeAttribute("accept");
|
|
49381
49385
|
const Y = async () => {
|
|
49382
49386
|
if (!A?.files?.length) return;
|
|
49383
|
-
const Ce = Array.from(A.files).map((
|
|
49384
|
-
fileContent:
|
|
49385
|
-
name:
|
|
49387
|
+
const Ce = Array.from(A.files).map((xe) => ({
|
|
49388
|
+
fileContent: xe,
|
|
49389
|
+
name: xe.name
|
|
49386
49390
|
})), le = b(Ce);
|
|
49387
49391
|
if (le.length === 0) {
|
|
49388
49392
|
u(
|
|
@@ -49416,17 +49420,17 @@ const WL = ({ getSelectionLabel: e, onClearSelection: t, actions: s, selectedCou
|
|
|
49416
49420
|
document.body.removeChild(K);
|
|
49417
49421
|
return;
|
|
49418
49422
|
}
|
|
49419
|
-
const
|
|
49423
|
+
const xe = le.name.replace(/\.zip$/i, "");
|
|
49420
49424
|
if (Y.some(
|
|
49421
|
-
(ke) => ke.nodeType === Ne.FOLDER && ke.name.toLowerCase() ===
|
|
49425
|
+
(ke) => ke.nodeType === Ne.FOLDER && ke.name.toLowerCase() === xe.toLowerCase()
|
|
49422
49426
|
)) {
|
|
49423
49427
|
u(
|
|
49424
|
-
o.validationFailed || `Folder with name "${
|
|
49428
|
+
o.validationFailed || `Folder with name "${xe}" already exists`
|
|
49425
49429
|
), document.body.removeChild(K);
|
|
49426
49430
|
return;
|
|
49427
49431
|
}
|
|
49428
49432
|
try {
|
|
49429
|
-
n(le,
|
|
49433
|
+
n(le, xe, A);
|
|
49430
49434
|
} finally {
|
|
49431
49435
|
document.body.removeChild(K);
|
|
49432
49436
|
}
|
|
@@ -49617,7 +49621,7 @@ const t7 = ({
|
|
|
49617
49621
|
}),
|
|
49618
49622
|
[i]
|
|
49619
49623
|
);
|
|
49620
|
-
|
|
49624
|
+
Re(() => {
|
|
49621
49625
|
const p = e?.path;
|
|
49622
49626
|
l.current !== p && o && (n(!1), a(null)), l.current = p;
|
|
49623
49627
|
}, [e?.path, o]);
|
|
@@ -49732,7 +49736,7 @@ function l7({
|
|
|
49732
49736
|
allItems: a = []
|
|
49733
49737
|
}) {
|
|
49734
49738
|
const [l, c] = I(""), d = L(!1), u = L(!1), h = L([]), g = L(s);
|
|
49735
|
-
|
|
49739
|
+
Re(() => {
|
|
49736
49740
|
n != null && c(String(n));
|
|
49737
49741
|
}, [n]);
|
|
49738
49742
|
const p = String(
|
|
@@ -49756,9 +49760,9 @@ function l7({
|
|
|
49756
49760
|
},
|
|
49757
49761
|
[r, C, v]
|
|
49758
49762
|
);
|
|
49759
|
-
|
|
49763
|
+
Re(() => {
|
|
49760
49764
|
g.current !== s && (g.current = s, (u.current || p) && v());
|
|
49761
|
-
}, [s, v, p]),
|
|
49765
|
+
}, [s, v, p]), Re(() => {
|
|
49762
49766
|
i.length > 0 && h.current.length === 0 && (h.current = i);
|
|
49763
49767
|
}, [i]);
|
|
49764
49768
|
const b = B(() => {
|
|
@@ -49858,7 +49862,7 @@ const d7 = ({
|
|
|
49858
49862
|
emptyStateDescription: le
|
|
49859
49863
|
}) => {
|
|
49860
49864
|
const {
|
|
49861
|
-
selectedPaths:
|
|
49865
|
+
selectedPaths: xe,
|
|
49862
49866
|
clearSelection: Ee,
|
|
49863
49867
|
setSelectedPaths: ke
|
|
49864
49868
|
} = c7({
|
|
@@ -49867,11 +49871,11 @@ const d7 = ({
|
|
|
49867
49871
|
onSelectedPathsChange: c
|
|
49868
49872
|
}), me = B(() => {
|
|
49869
49873
|
const Oe = /* @__PURE__ */ new Map();
|
|
49870
|
-
return
|
|
49874
|
+
return xe.forEach((kt) => {
|
|
49871
49875
|
const ts = yi(s, kt);
|
|
49872
49876
|
ts && Oe.set(kt, ts);
|
|
49873
49877
|
}), Oe;
|
|
49874
|
-
}, [
|
|
49878
|
+
}, [xe, s]), { currentPath: be, setCurrentPath: $, handlePathChange: Se } = jL({
|
|
49875
49879
|
path: o,
|
|
49876
49880
|
defaultPath: n,
|
|
49877
49881
|
onPathChange: S,
|
|
@@ -49946,7 +49950,7 @@ const d7 = ({
|
|
|
49946
49950
|
getCopyHeader: w?.getCopyHeader,
|
|
49947
49951
|
getMoveHeader: w?.getMoveHeader
|
|
49948
49952
|
});
|
|
49949
|
-
|
|
49953
|
+
Re(() => {
|
|
49950
49954
|
Qs && !Ze && dt(be ?? i?.path ?? "/");
|
|
49951
49955
|
}, [
|
|
49952
49956
|
Qs,
|
|
@@ -49954,7 +49958,7 @@ const d7 = ({
|
|
|
49954
49958
|
be,
|
|
49955
49959
|
i?.path,
|
|
49956
49960
|
dt
|
|
49957
|
-
]),
|
|
49961
|
+
]), Re(() => {
|
|
49958
49962
|
Qs || dt(void 0);
|
|
49959
49963
|
}, [Qs, dt]);
|
|
49960
49964
|
const {
|
|
@@ -50159,7 +50163,7 @@ const d7 = ({
|
|
|
50159
50163
|
isTreeCollapsed: Pi,
|
|
50160
50164
|
toggleTreeCollapse: Ti,
|
|
50161
50165
|
setIsTreeCollapsed: Ge,
|
|
50162
|
-
selectedPaths:
|
|
50166
|
+
selectedPaths: xe,
|
|
50163
50167
|
selectedFiles: me,
|
|
50164
50168
|
setSelectedPaths: ke,
|
|
50165
50169
|
clearSelection: Ee,
|
|
@@ -50921,7 +50925,7 @@ const vv = ({
|
|
|
50921
50925
|
) }) });
|
|
50922
50926
|
function b7(e) {
|
|
50923
50927
|
const t = L(null), [s, i] = I(!1);
|
|
50924
|
-
return
|
|
50928
|
+
return Re(() => {
|
|
50925
50929
|
if (!t.current) return;
|
|
50926
50930
|
const o = new ResizeObserver(([n]) => {
|
|
50927
50931
|
const r = n.contentRect.width;
|
|
@@ -51149,7 +51153,7 @@ const S7 = ({
|
|
|
51149
51153
|
renamedItem: K,
|
|
51150
51154
|
onRename: Ce,
|
|
51151
51155
|
onRenameSave: le,
|
|
51152
|
-
onRenameCancel:
|
|
51156
|
+
onRenameCancel: xe,
|
|
51153
51157
|
onRenameValidate: Ee,
|
|
51154
51158
|
getDisplayName: ke,
|
|
51155
51159
|
isDragging: me,
|
|
@@ -51560,7 +51564,7 @@ const S7 = ({
|
|
|
51560
51564
|
getContextMenuItems: Xn,
|
|
51561
51565
|
renamedPath: Mo === no.Tree ? Y : void 0,
|
|
51562
51566
|
onRenameSave: le,
|
|
51563
|
-
onRenameCancel:
|
|
51567
|
+
onRenameCancel: xe,
|
|
51564
51568
|
onRenameValidate: Ee
|
|
51565
51569
|
}
|
|
51566
51570
|
)
|
|
@@ -51581,7 +51585,7 @@ const S7 = ({
|
|
|
51581
51585
|
v,
|
|
51582
51586
|
t,
|
|
51583
51587
|
s,
|
|
51584
|
-
|
|
51588
|
+
xe,
|
|
51585
51589
|
le,
|
|
51586
51590
|
Ee,
|
|
51587
51591
|
Mo,
|
|
@@ -51731,7 +51735,7 @@ const S7 = ({
|
|
|
51731
51735
|
cancelFolderCreation: Ge,
|
|
51732
51736
|
saveFolderCreation: rt,
|
|
51733
51737
|
getDisplayName: ke,
|
|
51734
|
-
onRenameCancel:
|
|
51738
|
+
onRenameCancel: xe,
|
|
51735
51739
|
onRenameSave: le,
|
|
51736
51740
|
onRenameValidate: Ee,
|
|
51737
51741
|
renameTriggerView: Mo,
|