@baishuyun/ui-base 6.4.2 → 6.5.0
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/Amap/{Amap-DL5dLiUm.js → Amap-Dnvu_pUP.js} +1 -1
- package/dist/Amap/AmapCircle/index.js +3 -3
- package/dist/Amap/{AmapCircle-mh92P2l6.js → AmapCircle-Wfn43qco.js} +1 -1
- package/dist/Amap/AmapMarker/index.js +4 -4
- package/dist/Amap/{AmapMarker-DYW0-8Hd.js → AmapMarker-CB66dQIG.js} +2 -2
- package/dist/Amap/AmapMarkerCluster/index.js +4 -4
- package/dist/Amap/{AmapMarkerCluster-BRVHHMbi.js → AmapMarkerCluster-DvXchCC0.js} +2 -2
- package/dist/Amap/AmapProvider/index.js +4 -4
- package/dist/Amap/{AmapProvider-CwKdpmCg.js → AmapProvider-XCrqzo9W.js} +2 -2
- package/dist/Amap/hooks/index.js +2 -2
- package/dist/Amap/{hooks-D1m8KgVM.js → hooks-DwRvpafb.js} +1 -1
- package/dist/Amap/index.js +10 -10
- package/dist/Calendar/{AllDaySection-CseF1DuB.js → AllDaySection-M-b9tRHh.js} +4 -4
- package/dist/Calendar/{Calendar-Yu2HfA5D.js → Calendar-C9PhASp0.js} +13 -13
- package/dist/Calendar/{CurrentTimeIndicator-CUeblc9r.js → CurrentTimeIndicator-Dpi36eVJ.js} +1 -1
- package/dist/Calendar/{EventCard-L6jaKgEw.js → EventCard-BIfRqCk5.js} +3 -3
- package/dist/Calendar/{TimeGrid-B8lvUb1W.js → TimeGrid-Dk3soSo4.js} +2 -2
- package/dist/Calendar/context/index.js +1 -1
- package/dist/Calendar/index.js +19 -19
- package/dist/Calendar/subcomponents/AllDaySection/index.js +7 -7
- package/dist/Calendar/subcomponents/CurrentTimeIndicator/index.js +4 -4
- package/dist/Calendar/subcomponents/EventCard/index.js +5 -5
- package/dist/Calendar/subcomponents/TimeAxis/index.js +3 -3
- package/dist/Calendar/subcomponents/TimeGrid/index.js +3 -3
- package/dist/Calendar/{theme-BzNDRi0U.js → theme-Cgn0zQoC.js} +2 -2
- package/dist/Calendar/utils/index.js +3 -3
- package/dist/Calendar/utils/layout/index.js +2 -2
- package/dist/Calendar/utils/theme/index.js +1 -1
- package/dist/Card/{Card-CRrtIjNT.js → Card-BjWdQRjq.js} +1 -1
- package/dist/Card/index.js +2 -2
- package/dist/CheckBox/{CheckBox-DIunYcfS.js → CheckBox-81R8QKHb.js} +1 -1
- package/dist/CheckBox/{CheckBox-CkVe5Boq.js → CheckBox-ejvbDr-a.js} +1 -1
- package/dist/CheckBox/index.js +3 -3
- package/dist/ColorPicker/{ColorPicker-By-Y8Tyz.js → ColorPicker-aj57lMA5.js} +5 -5
- package/dist/ColorPicker/index.js +6 -6
- package/dist/ConfigProvider/index.js +2 -2
- package/dist/DatePicker/{DatePicker-PCdNachD.js → DatePicker-EIFyC9zF.js} +6 -6
- package/dist/DatePicker/{DatePickerPanel-HoxXteK0.js → DatePickerPanel-BjnLfncu.js} +5 -5
- package/dist/DatePicker/index.js +7 -7
- package/dist/DatePicker/style/index.js +1 -1
- package/dist/DatePicker/{style-DZaSSoNs.js → style-BxWyBhZ3.js} +1 -1
- package/dist/DropDown/DropDown-B34vfoOs.js +172 -0
- package/dist/DropDown/index.js +8 -7
- package/dist/DropDown/style/index.js +2 -0
- package/dist/DropDown/style-4LK6rNHe.js +9 -0
- package/dist/Editor/{Buttons-DmSUkHWl.js → Buttons-Ds6bLmnl.js} +6 -6
- package/dist/Editor/ToolbarPlugin/Buttons/index.js +15 -14
- package/dist/Editor/index.js +15 -14
- package/dist/Gantt/GanttChart/index.js +15 -14
- package/dist/Gantt/{GanttChart-BgDJOyW1.js → GanttChart-CnIWe_wk.js} +672 -590
- package/dist/Gantt/GanttTable/index.js +9 -9
- package/dist/Gantt/{GanttTable-Di_p-0M1.js → GanttTable-C3PLGmKr.js} +20 -19
- package/dist/Gantt/GanttToolBar/index.js +11 -10
- package/dist/Gantt/GanttToolBar-8jPQ9BAG.js +121 -0
- package/dist/Gantt/{collapseKeys-C8139wvy.js → collapseKeys-1N9ci2oJ.js} +2 -2
- package/dist/Gantt/index.js +195 -162
- package/dist/Gantt/theme-C197Dtjy.js +31 -0
- package/dist/Gantt/{timelineViewConfig-BXl2UkN8.js → timelineViewConfig-Dl3AXO45.js} +1 -1
- package/dist/Gantt/utils/index.js +5 -5
- package/dist/Gantt/utils/theme/index.js +2 -0
- package/dist/Icon/index.js +1 -1
- package/dist/InputTag/InputTag-CGQ5dXyf.js +143 -0
- package/dist/InputTag/index.js +3 -2
- package/dist/Loading/index.js +1 -1
- package/dist/Modal/{Modal-D3LFqIV4.js → Modal-GGHNlZv3.js} +1 -1
- package/dist/Modal/index.js +2 -2
- package/dist/NotFoundContent/index.js +1 -1
- package/dist/Radio/index.js +1 -1
- package/dist/ScrollBar/ScrollBar-CSGBOE3e.js +68 -0
- package/dist/ScrollBar/index.js +2 -0
- package/dist/Segmented/{Segmented-BTW445jc.js → Segmented-CzVKrL6o.js} +1 -1
- package/dist/Segmented/index.js +1 -1
- package/dist/Select/{Select-OjCjCogR.js → Select-B0r9VgF6.js} +199 -200
- package/dist/Select/{SelectInputSearch-DXPTGSc2.js → SelectInputSearch-BDwg-Noi.js} +2 -2
- package/dist/Select/index.js +12 -11
- package/dist/Table/Table-BtH9Oa14.js +545 -0
- package/dist/Table/hooks/index.js +1 -1
- package/dist/Table/{hooks-CJ2CnSep.js → hooks-DK8Pf7iH.js} +1 -1
- package/dist/Table/index.js +8 -7
- package/dist/Table/{processRowspan-BCzfI5un.js → processRowspan-D4uv6zLk.js} +1 -1
- package/dist/Table/style/index.js +2 -0
- package/dist/Table/style-BwcnT2ee.js +9 -0
- package/dist/Table/utils/index.js +1 -1
- package/dist/Tabs/{Tabs-DVQcB3YG.js → Tabs-7wEcxUv6.js} +4 -4
- package/dist/Tabs/index.js +4 -4
- package/dist/Tooltip/{Tooltip-DW_XP13m.js → Tooltip-B_SZOy6k.js} +41 -44
- package/dist/Tooltip/index.js +1 -1
- package/dist/Tree/index.js +4 -4
- package/dist/components/DropDown/index.d.ts +1 -0
- package/dist/components/DropDown/interface.d.ts +45 -0
- package/dist/components/DropDown/style/__tests__/resolveDropDownThemeVars.test.d.ts +1 -0
- package/dist/components/DropDown/style/index.d.ts +1 -0
- package/dist/components/DropDown/style/resolveDropDownThemeVars.d.ts +2 -0
- package/dist/components/Gantt/Gantt.d.ts +1 -1
- package/dist/components/Gantt/GanttChart/hooks/useEdgeScroll.d.ts +1 -1
- package/dist/components/Gantt/GanttTable/GanttTable.d.ts +1 -1
- package/dist/components/Gantt/GanttThemeContext.d.ts +3 -0
- package/dist/components/Gantt/index.d.ts +2 -1
- package/dist/components/Gantt/interface.d.ts +39 -0
- package/dist/components/Gantt/internal/GanttLayout.d.ts +1 -1
- package/dist/components/Gantt/types.internal.d.ts +2 -0
- package/dist/components/Gantt/utils/theme/__tests__/resolveGanttTheme.test.d.ts +1 -0
- package/dist/components/Gantt/utils/theme/__tests__/resolveGanttThemeVars.test.d.ts +1 -0
- package/dist/components/Gantt/utils/theme/__tests__/resolveTableThemeFromGantt.test.d.ts +1 -0
- package/dist/components/Gantt/utils/theme/index.d.ts +3 -0
- package/dist/components/Gantt/utils/theme/resolveGanttTheme.d.ts +3 -0
- package/dist/components/Gantt/utils/theme/resolveGanttThemeVars.d.ts +5 -0
- package/dist/components/Gantt/utils/theme/resolveTableThemeFromGantt.d.ts +4 -0
- package/dist/components/ScrollBar/ScrollBar.d.ts +3 -0
- package/dist/components/ScrollBar/__tests__/ScrollBar.test.d.ts +1 -0
- package/dist/components/ScrollBar/index.d.ts +3 -0
- package/dist/components/ScrollBar/interface.d.ts +23 -0
- package/dist/components/Table/index.d.ts +2 -1
- package/dist/components/Table/interface.d.ts +17 -0
- package/dist/components/Table/style/__tests__/resolveTableThemeVars.test.d.ts +1 -0
- package/dist/components/Table/style/index.d.ts +1 -0
- package/dist/components/Table/style/resolveTableThemeVars.d.ts +3 -0
- package/dist/components/index.d.ts +5 -2
- package/dist/index.js +50 -47
- package/dist/style.css +1 -1
- package/dist/utils/mergeRefs.d.ts +1 -0
- package/dist/vendors/{ConfigProvider-DwmA94S2.js → ConfigProvider-AQTr7T_c.js} +1 -1
- package/dist/vendors/{Tree-C7BgkjCQ.js → Tree-DqnOGJtB.js} +3 -3
- package/dist/vendors/mergeRefs-TiJ0xjUN.js +9 -0
- package/dist/vendors/{useLocale-BTz4slNW.js → useLocale-DZ8XW2VL.js} +1 -1
- package/package.json +1 -2
- package/dist/DropDown/DropDown-CvQAbsEo.js +0 -168
- package/dist/Gantt/GanttToolBar-D5pQdrzv.js +0 -105
- package/dist/InputTag/InputTag-zP5QdId7.js +0 -139
- package/dist/Table/Table-3-kFIm5v.js +0 -543
- /package/dist/Amap/{AmapContext-JaYk1a3H.js → AmapContext-CFmsMycg.js} +0 -0
- /package/dist/Amap/{useMarkerInfoWindowController-CRgf2I0Q.js → useMarkerInfoWindowController-G-Bg-NDJ.js} +0 -0
- /package/dist/Calendar/{TimeAxis-cK2_3FeM.js → TimeAxis-Chwxo6Yj.js} +0 -0
- /package/dist/Calendar/{colorUtils-DcpqM3KR.js → colorUtils-FNbm3zBQ.js} +0 -0
- /package/dist/Calendar/{context-DNOJ9LW_.js → context-CzS6P3nk.js} +0 -0
- /package/dist/Calendar/{layout-CaPxiRd-.js → layout-Cb39seCc.js} +0 -0
- /package/dist/DatePicker/{ensureDayjsPlugins-C3aqki6i.js → ensureDayjsPlugins-DxqbKqon.js} +0 -0
- /package/dist/DatePicker/{pickerLocale-VqSP_iIm.js → pickerLocale-CtDOOxxD.js} +0 -0
- /package/dist/Gantt/{GanttHighlightContext-AIpN3-af.js → GanttHighlightContext-CtT98ZnK.js} +0 -0
- /package/dist/Gantt/{columnResize-By_1E48E.js → columnResize-DFe7F98O.js} +0 -0
- /package/dist/Gantt/{constants-D4ur8WRs.js → constants-CrBb5i5p.js} +0 -0
- /package/dist/Gantt/{highlightTarget-DmzCIiQb.js → highlightTarget-DtCe7zto.js} +0 -0
- /package/dist/Icon/{Icon-BQ3Whub2.js → Icon-SQ5tu-yG.js} +0 -0
- /package/dist/Loading/{Loading-WjmzBabh.js → Loading-ho-6d72M.js} +0 -0
- /package/dist/NotFoundContent/{NotFoundContent-7xV-zOG2.js → NotFoundContent-CV9fTylQ.js} +0 -0
- /package/dist/Radio/{Radio-DkrZHoG1.js → Radio-C2zJzZc3.js} +0 -0
- /package/dist/Table/{constants-CKqc9Os_.js → constants-CuBlYZLO.js} +0 -0
- /package/dist/vendors/{LocaleContext-BJdHS0sH.js → LocaleContext-CBcJzvUD.js} +0 -0
- /package/dist/vendors/{animations-BeI8JZp1.js → animations-Mlw78WYo.js} +0 -0
- /package/dist/vendors/{color-BeQo449h.js → color-BQYy0Wgy.js} +0 -0
- /package/dist/vendors/{cssVars-C4BlzyxA.js → cssVars-DoQgQ2CM.js} +0 -0
- /package/dist/vendors/{useFloatingOverlay-3KB88hpZ.js → useFloatingOverlay-WbbHmuT-.js} +0 -0
- /package/dist/vendors/{useFloatingPortal-DsEtsAGW.js → useFloatingPortal-B2SDNV5C.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "../Icon/Icon-
|
|
2
|
-
import { t } from "../vendors/useLocale-
|
|
1
|
+
import { t as e } from "../Icon/Icon-SQ5tu-yG.js";
|
|
2
|
+
import { t } from "../vendors/useLocale-DZ8XW2VL.js";
|
|
3
3
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/Select/SelectInputSearch/SelectInputSearch.tsx
|
|
5
5
|
var i = (i) => {
|
package/dist/Select/index.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import "../
|
|
3
|
-
import "../vendors/
|
|
4
|
-
import
|
|
5
|
-
import "./
|
|
6
|
-
import "
|
|
7
|
-
import "../
|
|
8
|
-
import "../CheckBox/CheckBox-
|
|
9
|
-
import "../
|
|
10
|
-
import "../
|
|
11
|
-
import "../
|
|
1
|
+
import "../ScrollBar/ScrollBar-CSGBOE3e.js";
|
|
2
|
+
import "../Icon/Icon-SQ5tu-yG.js";
|
|
3
|
+
import "../vendors/LocaleContext-CBcJzvUD.js";
|
|
4
|
+
import "../vendors/useLocale-DZ8XW2VL.js";
|
|
5
|
+
import { n as e, r as t, t as n } from "./Select-B0r9VgF6.js";
|
|
6
|
+
import "./SelectInputSearch-BDwg-Noi.js";
|
|
7
|
+
import "../vendors/Tree-DqnOGJtB.js";
|
|
8
|
+
import "../CheckBox/CheckBox-ejvbDr-a.js";
|
|
9
|
+
import "../CheckBox/CheckBox-81R8QKHb.js";
|
|
10
|
+
import "../Radio/Radio-C2zJzZc3.js";
|
|
11
|
+
import "../NotFoundContent/NotFoundContent-CV9fTylQ.js";
|
|
12
|
+
import "../vendors/useFloatingPortal-B2SDNV5C.js";
|
|
12
13
|
export { e as Mode, n as Select, t as SelectType };
|
|
@@ -0,0 +1,545 @@
|
|
|
1
|
+
import { t as e } from "../vendors/useLocale-DZ8XW2VL.js";
|
|
2
|
+
import { n as t, o as n, t as r } from "./constants-CuBlYZLO.js";
|
|
3
|
+
import { c as i, f as a, i as o, l as s, o as c, r as l, s as u, t as d, u as f } from "./processRowspan-D4uv6zLk.js";
|
|
4
|
+
import { n as p, t as m } from "./hooks-DK8Pf7iH.js";
|
|
5
|
+
import { t as h } from "./style-BwcnT2ee.js";
|
|
6
|
+
import { sumBy as g } from "lodash-es";
|
|
7
|
+
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
8
|
+
import y, { forwardRef as b, memo as x, useCallback as S, useEffect as ee, useImperativeHandle as te, useLayoutEffect as C, useMemo as w, useRef as T, useState as E } from "react";
|
|
9
|
+
import D from "clsx";
|
|
10
|
+
import { useMemoizedFn as O, useSize as k } from "ahooks";
|
|
11
|
+
import { useOverlayScrollbars as A } from "overlayscrollbars-react";
|
|
12
|
+
//#region src/components/Table/components/HeaderCell.tsx
|
|
13
|
+
var j = x(({ column: e, style: t = {}, className: n = "", onResizeStart: i, isResizing: a = !1, resizable: o = !0, colSpan: s = 1, rowSpan: c = 1 }) => {
|
|
14
|
+
let l = T(null), u = S((e) => {
|
|
15
|
+
l.current?.triggerClick?.(e);
|
|
16
|
+
}, []), d = S((t) => {
|
|
17
|
+
if (!o || !i) return;
|
|
18
|
+
t.preventDefault(), t.stopPropagation();
|
|
19
|
+
let n = (e) => {
|
|
20
|
+
e.preventDefault(), e.stopPropagation();
|
|
21
|
+
};
|
|
22
|
+
document.addEventListener("click", n, !0), document.addEventListener("mouseup", () => {
|
|
23
|
+
setTimeout(() => document.removeEventListener("click", n, !0), 0);
|
|
24
|
+
}, { once: !0 }), i(e.key, e.width || r.DEFAULT_WIDTH, t.clientX);
|
|
25
|
+
}, [
|
|
26
|
+
e.key,
|
|
27
|
+
e.width,
|
|
28
|
+
o,
|
|
29
|
+
i
|
|
30
|
+
]), f = typeof e.header == "function" ? e.header(e, { menuRef: l }) : e.title;
|
|
31
|
+
return /* @__PURE__ */ v("th", {
|
|
32
|
+
className: `custom-table-header-cell ${n} `,
|
|
33
|
+
style: t,
|
|
34
|
+
colSpan: s > 1 ? s : void 0,
|
|
35
|
+
rowSpan: c > 1 ? c : void 0,
|
|
36
|
+
onClick: u,
|
|
37
|
+
children: [/* @__PURE__ */ _("div", {
|
|
38
|
+
className: "header-cell-content",
|
|
39
|
+
children: f
|
|
40
|
+
}), o ? /* @__PURE__ */ _("div", {
|
|
41
|
+
className: `resize-handle ${a ? "resizing" : ""}`,
|
|
42
|
+
onMouseDown: d
|
|
43
|
+
}) : null]
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
j.displayName = "HeaderCell";
|
|
47
|
+
//#endregion
|
|
48
|
+
//#region src/components/Table/components/TableHeader.tsx
|
|
49
|
+
var M = b(({ columns: e = [], enableFixed: n = !1, height: i = t.HEADER_HEIGHT, resizingColumn: a = null, onResizeStart: c, disabledResizeColumns: l = [], totalColumnsWidth: d = 0, needSpacer: f = !1, headerRowSpan: p = 1 }, m) => {
|
|
50
|
+
let h = w(() => e.some((e) => e.children && e.children.length > 0), [e]), { flatColumns: g, headerRows: y } = w(() => {
|
|
51
|
+
if (h) return o(e);
|
|
52
|
+
let t = Math.max(1, p || 1);
|
|
53
|
+
if (t > 1) {
|
|
54
|
+
let n = [e.map((e) => ({
|
|
55
|
+
...e,
|
|
56
|
+
colSpan: 1,
|
|
57
|
+
rowSpan: t,
|
|
58
|
+
isLeaf: !0
|
|
59
|
+
}))];
|
|
60
|
+
for (let e = 1; e < t; e++) n.push([]);
|
|
61
|
+
return {
|
|
62
|
+
flatColumns: e,
|
|
63
|
+
headerRows: n
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
flatColumns: e,
|
|
68
|
+
headerRows: [e]
|
|
69
|
+
};
|
|
70
|
+
}, [
|
|
71
|
+
e,
|
|
72
|
+
h,
|
|
73
|
+
p
|
|
74
|
+
]), b = (e) => {
|
|
75
|
+
let t = u(e, g), n = e.align || "left", r = l.includes(e.key), i = {
|
|
76
|
+
textAlign: n,
|
|
77
|
+
...s(t, g, e.fixed)
|
|
78
|
+
}, o = `custom-table-header-cell ${e.className || ""}`.trim();
|
|
79
|
+
return e.fixed === "left" && (o += " fixed-left"), e.fixed === "right" && (o += " fixed-right"), t === 0 && (o += " first"), t === g.length - 1 && (o += " last"), /* @__PURE__ */ _(j, {
|
|
80
|
+
column: {
|
|
81
|
+
...e,
|
|
82
|
+
index: t
|
|
83
|
+
},
|
|
84
|
+
style: i,
|
|
85
|
+
className: o,
|
|
86
|
+
onResizeStart: c,
|
|
87
|
+
isResizing: a === e.key,
|
|
88
|
+
resizable: !e.children && !r,
|
|
89
|
+
colSpan: e.colSpan,
|
|
90
|
+
rowSpan: e.rowSpan
|
|
91
|
+
}, e.key);
|
|
92
|
+
};
|
|
93
|
+
return /* @__PURE__ */ _("div", {
|
|
94
|
+
ref: m,
|
|
95
|
+
className: "custom-table-header",
|
|
96
|
+
style: w(() => {
|
|
97
|
+
let e = { minWidth: d };
|
|
98
|
+
return n && (e.position = "sticky", e.top = 0, e.zIndex = 11), e;
|
|
99
|
+
}, [n, d]),
|
|
100
|
+
children: /* @__PURE__ */ v("table", {
|
|
101
|
+
style: {
|
|
102
|
+
tableLayout: "fixed",
|
|
103
|
+
minWidth: d
|
|
104
|
+
},
|
|
105
|
+
children: [/* @__PURE__ */ v("colgroup", { children: [g.map((e) => /* @__PURE__ */ _("col", { style: { width: e.width || r.DEFAULT_WIDTH } }, e.key)), f ? /* @__PURE__ */ _("col", {
|
|
106
|
+
className: "spacer-col",
|
|
107
|
+
style: { width: "auto" }
|
|
108
|
+
}) : null] }), /* @__PURE__ */ _("thead", { children: y.map((e, t) => e.length === 0 ? /* @__PURE__ */ _("tr", { style: { height: i } }, t) : /* @__PURE__ */ v("tr", {
|
|
109
|
+
style: { height: h || p > 1 ? i : "auto" },
|
|
110
|
+
children: [e.map((e) => b(e)), f && t === 0 ? /* @__PURE__ */ _("th", {
|
|
111
|
+
className: "custom-table-header-cell",
|
|
112
|
+
rowSpan: y.length
|
|
113
|
+
}) : null]
|
|
114
|
+
}, t)) })]
|
|
115
|
+
})
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
M.displayName = "TableHeader";
|
|
119
|
+
var ne = x(M), N = (e, t, n) => {
|
|
120
|
+
let r = u(e, t), i = e.align || "left", a = s(r, t, n);
|
|
121
|
+
return {
|
|
122
|
+
column: e,
|
|
123
|
+
className: D("custom-table-cell", {
|
|
124
|
+
first: r === 0,
|
|
125
|
+
fixed: !!n
|
|
126
|
+
}, e.className, e?.type || "", e?.colorEnable ? "color-enable" : "", e?.regex === "barcode" ? "bar-code" : "", e?.regex === "qrcode" ? "qr-code" : ""),
|
|
127
|
+
style: {
|
|
128
|
+
textAlign: i,
|
|
129
|
+
...a
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
}, P = ({ leftFixedColumns: e = [], normalColumns: n = [], rightFixedColumns: i = [], dataSource: a = [], rowKey: o = "id", rowHeight: s = t.ROW_HEIGHT, emptyText: u, onRowClick: p, onRow: m, onCell: h, totalColumnsWidth: g = 0, needSpacer: y = !1, rowRefCallback: b, isDynamicHeight: x = !1, emptyRowContent: ee, showEmptyRow: te = !0, startVirtualIndex: C, hideWhenEmpty: T = !1, wrapperClassName: E, forceRowHeight: O = !1 }) => {
|
|
133
|
+
let k = w(() => c(e), [e]), A = w(() => c(n), [n]), j = w(() => c(i), [i]), M = w(() => [
|
|
134
|
+
...k,
|
|
135
|
+
...A,
|
|
136
|
+
...j
|
|
137
|
+
], [
|
|
138
|
+
k,
|
|
139
|
+
A,
|
|
140
|
+
j
|
|
141
|
+
]), ne = w(() => {
|
|
142
|
+
let e = k.map((e) => N(e, M, "left")), t = A.map((e) => N(e, M, void 0)), n = j.map((e) => N(e, M, "right"));
|
|
143
|
+
return [
|
|
144
|
+
...e,
|
|
145
|
+
...t,
|
|
146
|
+
...n
|
|
147
|
+
];
|
|
148
|
+
}, [
|
|
149
|
+
M,
|
|
150
|
+
k,
|
|
151
|
+
A,
|
|
152
|
+
j
|
|
153
|
+
]), P = S((e) => {
|
|
154
|
+
e && b && b(e);
|
|
155
|
+
}, [b]), F = (e, t, n) => {
|
|
156
|
+
let { column: r, className: i, style: a } = e;
|
|
157
|
+
if (!l(t, r)) return null;
|
|
158
|
+
let o = d(t, r), s = r.dataIndex ? t[r.dataIndex] : void 0, c = r.render && typeof r.render == "function" ? r.render(s, t, n) : s, u = {
|
|
159
|
+
className: i,
|
|
160
|
+
style: a
|
|
161
|
+
};
|
|
162
|
+
return h && typeof h == "function" && (u = h(s, t, r, n, {
|
|
163
|
+
className: i,
|
|
164
|
+
style: a
|
|
165
|
+
}) || {}), /* @__PURE__ */ _("td", {
|
|
166
|
+
className: `${i} ${u.className || ""}`.trim(),
|
|
167
|
+
style: { ...a },
|
|
168
|
+
rowSpan: o > 1 ? o : void 0,
|
|
169
|
+
...u,
|
|
170
|
+
children: /* @__PURE__ */ _("div", {
|
|
171
|
+
className: D("cell-content", r.align),
|
|
172
|
+
children: c
|
|
173
|
+
})
|
|
174
|
+
}, r.key);
|
|
175
|
+
};
|
|
176
|
+
if (T && a.length === 0) return null;
|
|
177
|
+
let I = () => ee ?? /* @__PURE__ */ _("tr", {
|
|
178
|
+
className: "custom-table-empty-row",
|
|
179
|
+
children: /* @__PURE__ */ _("td", {
|
|
180
|
+
colSpan: M.length + (y ? 1 : 0),
|
|
181
|
+
style: {
|
|
182
|
+
textAlign: "center",
|
|
183
|
+
padding: "20px",
|
|
184
|
+
color: "#999"
|
|
185
|
+
},
|
|
186
|
+
children: u
|
|
187
|
+
})
|
|
188
|
+
}), re = O || !x;
|
|
189
|
+
return /* @__PURE__ */ _("div", {
|
|
190
|
+
className: D("custom-table-body", E),
|
|
191
|
+
style: { minWidth: g },
|
|
192
|
+
children: /* @__PURE__ */ v("table", {
|
|
193
|
+
style: {
|
|
194
|
+
tableLayout: "fixed",
|
|
195
|
+
minWidth: g
|
|
196
|
+
},
|
|
197
|
+
children: [/* @__PURE__ */ v("colgroup", { children: [M.map((e) => /* @__PURE__ */ _("col", { style: { width: e.width || r.DEFAULT_WIDTH } }, e.key)), y ? /* @__PURE__ */ _("col", {
|
|
198
|
+
className: "spacer-col",
|
|
199
|
+
style: { width: "auto" }
|
|
200
|
+
}) : null] }), /* @__PURE__ */ _("tbody", { children: a.length === 0 ? te ? I() : null : a.map((e, t) => {
|
|
201
|
+
let n = {};
|
|
202
|
+
if (m && typeof m == "function") {
|
|
203
|
+
let r = m(e, t, {
|
|
204
|
+
className: "",
|
|
205
|
+
style: {}
|
|
206
|
+
}) || {};
|
|
207
|
+
n = {
|
|
208
|
+
className: r.className,
|
|
209
|
+
style: r.style,
|
|
210
|
+
...r
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
let r = typeof C == "number" ? C + t : typeof e.dataIndex == "number" ? e.dataIndex : t;
|
|
214
|
+
return /* @__PURE__ */ v("tr", {
|
|
215
|
+
ref: x ? P : void 0,
|
|
216
|
+
style: {
|
|
217
|
+
height: re ? s : "auto",
|
|
218
|
+
...n.style
|
|
219
|
+
},
|
|
220
|
+
className: D("custom-table-row", n.className),
|
|
221
|
+
onClick: (n) => p?.(e, t, n),
|
|
222
|
+
"data-index": x ? r : void 0,
|
|
223
|
+
...n,
|
|
224
|
+
children: [ne.map((n) => F(n, e, t)), y ? /* @__PURE__ */ _("td", { className: "spacer-cell" }) : null]
|
|
225
|
+
}, f(e, o, t));
|
|
226
|
+
}) })]
|
|
227
|
+
})
|
|
228
|
+
});
|
|
229
|
+
};
|
|
230
|
+
P.displayName = "TableBody";
|
|
231
|
+
var F = x(P), I = ({ leftFixedColumns: e = [], normalColumns: t = [], rightFixedColumns: n = [], footerData: i = {}, summary: a, render: o, enableFixed: l = !0, totalColumnsWidth: d = 0, needSpacer: f = !1 }) => {
|
|
232
|
+
let p = w(() => c(e), [e]), m = w(() => c(t), [t]), h = w(() => c(n), [n]), g = w(() => [
|
|
233
|
+
...p,
|
|
234
|
+
...m,
|
|
235
|
+
...h
|
|
236
|
+
], [
|
|
237
|
+
p,
|
|
238
|
+
m,
|
|
239
|
+
h
|
|
240
|
+
]), y = (e) => {
|
|
241
|
+
let t = (e.dataIndex ? i?.[e.dataIndex] : void 0) ?? a?.[e.key], { renderFooter: n } = e, r = n && typeof n == "function" ? n(t, e) : o && typeof o == "function" ? o(t, e) : t, c = { textAlign: e.align || "left" }, d = "custom-table-footer-cell";
|
|
242
|
+
if (l && e.fixed) {
|
|
243
|
+
let t = s(u(e, g), g, e.fixed);
|
|
244
|
+
t && (c = {
|
|
245
|
+
...c,
|
|
246
|
+
...t
|
|
247
|
+
}, d += e.fixed === "left" ? " fixed-left" : " fixed-right");
|
|
248
|
+
}
|
|
249
|
+
return /* @__PURE__ */ _("td", {
|
|
250
|
+
className: d,
|
|
251
|
+
style: c,
|
|
252
|
+
children: /* @__PURE__ */ _("div", {
|
|
253
|
+
className: "cell-content",
|
|
254
|
+
children: r
|
|
255
|
+
})
|
|
256
|
+
}, e.key);
|
|
257
|
+
};
|
|
258
|
+
return /* @__PURE__ */ _("div", {
|
|
259
|
+
className: "custom-table-footer",
|
|
260
|
+
style: w(() => {
|
|
261
|
+
let e = { minWidth: d };
|
|
262
|
+
return l && (e.position = "sticky", e.bottom = 0, e.zIndex = 10), e;
|
|
263
|
+
}, [l, d]),
|
|
264
|
+
children: /* @__PURE__ */ v("table", {
|
|
265
|
+
style: {
|
|
266
|
+
tableLayout: "fixed",
|
|
267
|
+
minWidth: d
|
|
268
|
+
},
|
|
269
|
+
children: [/* @__PURE__ */ v("colgroup", { children: [g.map((e) => /* @__PURE__ */ _("col", { style: { width: e.width || r.DEFAULT_WIDTH } }, e.key)), f ? /* @__PURE__ */ _("col", {
|
|
270
|
+
className: "spacer-col",
|
|
271
|
+
style: { width: "auto" }
|
|
272
|
+
}) : null] }), /* @__PURE__ */ _("tfoot", { children: /* @__PURE__ */ v("tr", { children: [
|
|
273
|
+
p.map((e) => y(e)),
|
|
274
|
+
m.map((e) => y(e)),
|
|
275
|
+
h.map((e) => y(e)),
|
|
276
|
+
f ? /* @__PURE__ */ _("td", { className: "spacer-cell" }) : null
|
|
277
|
+
] }) })]
|
|
278
|
+
})
|
|
279
|
+
});
|
|
280
|
+
};
|
|
281
|
+
I.displayName = "TableFooter";
|
|
282
|
+
var re = x(I), ie = [], ae = {
|
|
283
|
+
left: !0,
|
|
284
|
+
right: !0
|
|
285
|
+
}, oe = {
|
|
286
|
+
low: {
|
|
287
|
+
className: "bsy-row-height-low",
|
|
288
|
+
height: 34
|
|
289
|
+
},
|
|
290
|
+
middle: {
|
|
291
|
+
className: "bsy-row-height-middle",
|
|
292
|
+
height: 68
|
|
293
|
+
},
|
|
294
|
+
high: {
|
|
295
|
+
className: "bsy-row-height-high",
|
|
296
|
+
height: 106
|
|
297
|
+
},
|
|
298
|
+
auto: {
|
|
299
|
+
className: "bsy-row-height-auto",
|
|
300
|
+
height: "auto"
|
|
301
|
+
}
|
|
302
|
+
}, L = b(({ columns: o = [], dataSource: s = [], rowKey: l = "id", height: u, bordered: d = !0, emptyText: f, onRowClick: b, scroll: x, footerData: S, footerSummary: D, renderFooter: j, hasFooter: M = !1, onRow: N, onCell: P, rowHeightStyle: I = "low", resizable: L = !0, disabledResizeColumns: se = ie, minColumnWidth: ce, maxColumnWidth: le, onColumnResize: ue, onColumnResizeEnd: de, renderBody: R, estimateSize: fe, virtualEnabled: z, dataProcessor: B, headerRowSpan: pe, fixedShadowMask: me = ae, onRenderEmpty: he, overlayScrollbarOptions: V, wrapperStyle: ge, theme: _e }, ve) => {
|
|
303
|
+
let { t: ye } = e(), be = w(() => h(_e), [_e]), H = T(null), xe = T(null), U = T(null), W = T(/* @__PURE__ */ new Map()), G = k(H), K = G?.width ?? 0, Se = G?.height ?? 0, [Ce, we] = E(0), [Te, Ee] = E(!1), [De, Oe] = E({
|
|
304
|
+
left: 0,
|
|
305
|
+
top: 0
|
|
306
|
+
}), [ke, Ae] = E(t.HEADER_HEIGHT), q = w(() => c(o), [o]);
|
|
307
|
+
ee(() => {
|
|
308
|
+
q.forEach((e) => {
|
|
309
|
+
W.current.set(e.key, e.width || r.DEFAULT_WIDTH);
|
|
310
|
+
});
|
|
311
|
+
}, [q]);
|
|
312
|
+
let je = O((e) => W.current.get(e.key) || e.width || r.DEFAULT_WIDTH), Me = O((e) => {
|
|
313
|
+
let t = q.findIndex((t) => t.key === e);
|
|
314
|
+
if (t === -1) return 0;
|
|
315
|
+
let n = q[t], r = g(q.slice(0, t + 1), (e) => je(e));
|
|
316
|
+
return n.fixed === "left" ? r : r - (H.current?.scrollLeft || 0);
|
|
317
|
+
}), Ne = O((e) => {
|
|
318
|
+
U.current && (U.current.style.display = "block", U.current.style.left = `${Me(e)}px`);
|
|
319
|
+
}), { isResizing: Pe, resizingColumn: Fe, startResize: Ie } = m({
|
|
320
|
+
minColumnWidth: ce || r.MIN_WIDTH,
|
|
321
|
+
maxColumnWidth: le || r.MAX_WIDTH,
|
|
322
|
+
onColumnResizeEnd: O((e, t) => {
|
|
323
|
+
W.current.set(e, t), de?.(e, t, W.current), U.current && (U.current.style.display = "none");
|
|
324
|
+
}),
|
|
325
|
+
onColumnResize: O((e, t, n) => {
|
|
326
|
+
W.current.set(t, n), ue?.(t, n, W.current), Ne(t);
|
|
327
|
+
})
|
|
328
|
+
}), Le = O((e, t, n) => {
|
|
329
|
+
Ne(e), Ie(e, t, n);
|
|
330
|
+
}), { className: Re, height: J } = oe[I] || oe.auto, { virtualRows: ze, totalHeight: Be, paddingTop: Ve, paddingBottom: He, remeasure: Y, rowRefCallback: Ue, isDynamicHeight: We, clearRowHeightCache: Ge, enabled: Ke } = p(s, w(() => ({
|
|
331
|
+
rowHeight: J,
|
|
332
|
+
overscan: n.DEFAULT_OVERSCAN,
|
|
333
|
+
estimateSize: fe,
|
|
334
|
+
...z === void 0 ? {} : { enabled: z }
|
|
335
|
+
}), [
|
|
336
|
+
J,
|
|
337
|
+
fe,
|
|
338
|
+
z
|
|
339
|
+
]), H);
|
|
340
|
+
te(ve, () => ({
|
|
341
|
+
clearRowHeightCache: Ge,
|
|
342
|
+
remeasure: Y
|
|
343
|
+
}), [Ge, Y]);
|
|
344
|
+
let qe = f || ye(t.EMPTY_TEXT_KEY);
|
|
345
|
+
ee(() => {
|
|
346
|
+
Y?.();
|
|
347
|
+
}, [J, Y]);
|
|
348
|
+
let { leftFixedColumns: X, normalColumns: Je, rightFixedColumns: Z } = w(() => a(o), [o]), Ye = w(() => i(X), [X]), Xe = w(() => i(Z), [Z]), { totalColumnsWidth: Q, needSpacer: $ } = w(() => {
|
|
349
|
+
let e = i(o);
|
|
350
|
+
return {
|
|
351
|
+
totalColumnsWidth: e,
|
|
352
|
+
needSpacer: e < K
|
|
353
|
+
};
|
|
354
|
+
}, [o, K]), [Ze] = A({ options: {
|
|
355
|
+
overflow: {
|
|
356
|
+
x: V?.overflowX ?? "scroll",
|
|
357
|
+
y: V?.overflowY ?? "scroll"
|
|
358
|
+
},
|
|
359
|
+
scrollbars: {
|
|
360
|
+
theme: V?.theme ?? "os-theme-bsy",
|
|
361
|
+
autoHide: V?.autoHide ?? "move",
|
|
362
|
+
autoHideDelay: 400
|
|
363
|
+
}
|
|
364
|
+
} });
|
|
365
|
+
C(() => {
|
|
366
|
+
if (!H.current) return;
|
|
367
|
+
let e = H.current, t = e.parentElement;
|
|
368
|
+
t && Ze({
|
|
369
|
+
target: t,
|
|
370
|
+
elements: { viewport: e }
|
|
371
|
+
});
|
|
372
|
+
}, [Ze]);
|
|
373
|
+
let Qe = w(() => {
|
|
374
|
+
let e = Ke ? ze.map((e) => {
|
|
375
|
+
let t = s[e.index];
|
|
376
|
+
return t && {
|
|
377
|
+
...t,
|
|
378
|
+
dataIndex: e.index
|
|
379
|
+
};
|
|
380
|
+
}) : s.map((e, t) => ({
|
|
381
|
+
...e,
|
|
382
|
+
dataIndex: t
|
|
383
|
+
}));
|
|
384
|
+
return B ? B(e) : e;
|
|
385
|
+
}, [
|
|
386
|
+
Ke,
|
|
387
|
+
ze,
|
|
388
|
+
s,
|
|
389
|
+
B
|
|
390
|
+
]), $e = w(() => {
|
|
391
|
+
let e = {};
|
|
392
|
+
return d ? e.border = "1px solid #e0e0e0" : e.border = "none", (u || x?.y) && (e.maxHeight = u || x?.y), e;
|
|
393
|
+
}, [
|
|
394
|
+
d,
|
|
395
|
+
u,
|
|
396
|
+
x
|
|
397
|
+
]);
|
|
398
|
+
C(() => {
|
|
399
|
+
let e = H.current;
|
|
400
|
+
e && (we(e.clientHeight), Oe({
|
|
401
|
+
left: e.offsetLeft,
|
|
402
|
+
top: e.offsetTop
|
|
403
|
+
}), Ae(xe.current?.clientHeight || t.HEADER_HEIGHT), Ee(e.scrollHeight > e.clientHeight));
|
|
404
|
+
}, [
|
|
405
|
+
G?.width,
|
|
406
|
+
G?.height,
|
|
407
|
+
s.length,
|
|
408
|
+
M,
|
|
409
|
+
pe
|
|
410
|
+
]);
|
|
411
|
+
let et = w(() => {
|
|
412
|
+
if (!Se || !Ce) return;
|
|
413
|
+
let e = d ? 2 : 0, n = Ce - ke - (M ? t.HEADER_HEIGHT : 0) - e;
|
|
414
|
+
return Math.max(0, n);
|
|
415
|
+
}, [
|
|
416
|
+
Se,
|
|
417
|
+
Ce,
|
|
418
|
+
ke,
|
|
419
|
+
M,
|
|
420
|
+
d
|
|
421
|
+
]), tt = !!(u || x?.y), nt, rt, it = !0;
|
|
422
|
+
if (!R && s.length === 0 && typeof he == "function") {
|
|
423
|
+
let e = he();
|
|
424
|
+
y.isValidElement(e) && e.type === "tr" ? nt = e : e && (rt = e, it = !1);
|
|
425
|
+
}
|
|
426
|
+
return /* @__PURE__ */ v("div", {
|
|
427
|
+
className: `custom-table ${Te ? "has-y-scroll" : ""}`,
|
|
428
|
+
style: {
|
|
429
|
+
position: "relative",
|
|
430
|
+
height: "100%",
|
|
431
|
+
...be
|
|
432
|
+
},
|
|
433
|
+
"data-overlayscrollbars-initialize": "",
|
|
434
|
+
children: [
|
|
435
|
+
/* @__PURE__ */ v("div", {
|
|
436
|
+
ref: H,
|
|
437
|
+
className: `custom-table-wrapper ${Pe ? "resizing" : ""} ${Re} os-enabled`,
|
|
438
|
+
style: {
|
|
439
|
+
...$e,
|
|
440
|
+
...ge
|
|
441
|
+
},
|
|
442
|
+
children: [
|
|
443
|
+
/* @__PURE__ */ _(ne, {
|
|
444
|
+
ref: xe,
|
|
445
|
+
columns: o,
|
|
446
|
+
enableFixed: tt,
|
|
447
|
+
height: t.HEADER_HEIGHT,
|
|
448
|
+
resizingColumn: Fe,
|
|
449
|
+
onResizeStart: L ? Le : void 0,
|
|
450
|
+
disabledResizeColumns: se,
|
|
451
|
+
totalColumnsWidth: Q,
|
|
452
|
+
needSpacer: $,
|
|
453
|
+
headerRowSpan: pe
|
|
454
|
+
}),
|
|
455
|
+
/* @__PURE__ */ _("div", {
|
|
456
|
+
className: "custom-table-body-wrapper",
|
|
457
|
+
style: { position: "relative" },
|
|
458
|
+
children: /* @__PURE__ */ _("div", {
|
|
459
|
+
style: {
|
|
460
|
+
minHeight: et,
|
|
461
|
+
height: Be,
|
|
462
|
+
paddingBottom: He > 0 ? `${He}px` : void 0,
|
|
463
|
+
paddingTop: Ve > 0 ? `${Ve}px` : void 0,
|
|
464
|
+
position: "relative"
|
|
465
|
+
},
|
|
466
|
+
children: R ? R({
|
|
467
|
+
columns: o,
|
|
468
|
+
flatColumns: q,
|
|
469
|
+
leftFixedColumns: X,
|
|
470
|
+
normalColumns: Je,
|
|
471
|
+
rightFixedColumns: Z,
|
|
472
|
+
totalColumnsWidth: Q,
|
|
473
|
+
needSpacer: $,
|
|
474
|
+
rowRefCallback: Ue,
|
|
475
|
+
isDynamicHeight: We,
|
|
476
|
+
rowHeight: J,
|
|
477
|
+
onRowClick: b,
|
|
478
|
+
scrollRef: H,
|
|
479
|
+
virtualRows: ze,
|
|
480
|
+
virtualEnabled: Ke
|
|
481
|
+
}) : /* @__PURE__ */ _(F, {
|
|
482
|
+
leftFixedColumns: X,
|
|
483
|
+
normalColumns: Je,
|
|
484
|
+
rightFixedColumns: Z,
|
|
485
|
+
dataSource: Qe,
|
|
486
|
+
rowKey: l,
|
|
487
|
+
rowHeight: J,
|
|
488
|
+
emptyText: qe,
|
|
489
|
+
emptyRowContent: nt,
|
|
490
|
+
showEmptyRow: it,
|
|
491
|
+
onRowClick: b,
|
|
492
|
+
onRow: N,
|
|
493
|
+
onCell: P,
|
|
494
|
+
totalColumnsWidth: Q,
|
|
495
|
+
needSpacer: $,
|
|
496
|
+
rowRefCallback: Ue,
|
|
497
|
+
isDynamicHeight: We
|
|
498
|
+
})
|
|
499
|
+
})
|
|
500
|
+
}),
|
|
501
|
+
M && (S || D || j) ? /* @__PURE__ */ _(re, {
|
|
502
|
+
leftFixedColumns: X,
|
|
503
|
+
normalColumns: Je,
|
|
504
|
+
rightFixedColumns: Z,
|
|
505
|
+
footerData: S,
|
|
506
|
+
summary: D,
|
|
507
|
+
render: j,
|
|
508
|
+
enableFixed: tt,
|
|
509
|
+
totalColumnsWidth: Q,
|
|
510
|
+
needSpacer: $
|
|
511
|
+
}) : null
|
|
512
|
+
]
|
|
513
|
+
}),
|
|
514
|
+
rt ? /* @__PURE__ */ _("div", {
|
|
515
|
+
className: "custom-table-empty-overlay",
|
|
516
|
+
style: {
|
|
517
|
+
height: et,
|
|
518
|
+
left: De.left,
|
|
519
|
+
top: De.top + ke + (d ? 1 : 0),
|
|
520
|
+
width: K || void 0
|
|
521
|
+
},
|
|
522
|
+
children: /* @__PURE__ */ _("div", {
|
|
523
|
+
className: "custom-table-empty-overlay-inner",
|
|
524
|
+
children: rt
|
|
525
|
+
})
|
|
526
|
+
}) : null,
|
|
527
|
+
L ? /* @__PURE__ */ _("div", {
|
|
528
|
+
className: "custom-table-resize-handle",
|
|
529
|
+
ref: U
|
|
530
|
+
}) : null,
|
|
531
|
+
me.left !== !1 && Ye > 0 ? /* @__PURE__ */ _("div", {
|
|
532
|
+
className: "fixed-shadow-mask left",
|
|
533
|
+
style: { width: Ye }
|
|
534
|
+
}) : null,
|
|
535
|
+
!$ && me.right !== !1 && Xe > 0 ? /* @__PURE__ */ _("div", {
|
|
536
|
+
className: "fixed-shadow-mask right",
|
|
537
|
+
style: { width: Xe }
|
|
538
|
+
}) : null
|
|
539
|
+
]
|
|
540
|
+
});
|
|
541
|
+
});
|
|
542
|
+
L.displayName = "Table";
|
|
543
|
+
var se = y.memo(L);
|
|
544
|
+
//#endregion
|
|
545
|
+
export { F as n, se as t };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "../hooks-
|
|
1
|
+
import { n as e, t } from "../hooks-DK8Pf7iH.js";
|
|
2
2
|
export { t as useColumnResize, e as useTableVirtual };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as e, r as t, t as n } from "./constants-
|
|
1
|
+
import { o as e, r as t, t as n } from "./constants-CuBlYZLO.js";
|
|
2
2
|
import { clamp as r } from "lodash-es";
|
|
3
3
|
import { useCallback as i, useEffect as a, useMemo as o, useRef as s, useState as c } from "react";
|
|
4
4
|
import { useEventListener as l, useLatest as u, useMemoizedFn as d } from "ahooks";
|
package/dist/Table/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import "../vendors/LocaleContext-
|
|
2
|
-
import "../vendors/useLocale-
|
|
3
|
-
import { a as e, n as t, t as n } from "./constants-
|
|
4
|
-
import { a as r, c as i, d as a, f as o, n as s, o as c, r as l, t as u, u as d } from "./processRowspan-
|
|
5
|
-
import { n as f, t as p } from "./Table-
|
|
6
|
-
import { n as m, t as h } from "./hooks-
|
|
7
|
-
|
|
1
|
+
import "../vendors/LocaleContext-CBcJzvUD.js";
|
|
2
|
+
import "../vendors/useLocale-DZ8XW2VL.js";
|
|
3
|
+
import { a as e, n as t, t as n } from "./constants-CuBlYZLO.js";
|
|
4
|
+
import { a as r, c as i, d as a, f as o, n as s, o as c, r as l, t as u, u as d } from "./processRowspan-D4uv6zLk.js";
|
|
5
|
+
import { n as f, t as p } from "./Table-BtH9Oa14.js";
|
|
6
|
+
import { n as m, t as h } from "./hooks-DK8Pf7iH.js";
|
|
7
|
+
import { t as g } from "./style-BwcnT2ee.js";
|
|
8
|
+
export { n as COLUMN_DEFAULTS, t as DEFAULT_CONFIG, e as TABLE_DOM, p as Table, p as default, f as TableBody, r as calculateFixedOffset, c as expandLeafColumns, u as getCellRowspan, i as getColumnsWidth, d as getRowKey, s as processRowspan, g as resolveTableThemeVars, l as shouldRenderCell, a as sortData, o as splitFixedColumns, h as useColumnResize, m as useTableVirtual };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as e, t } from "./constants-
|
|
1
|
+
import { i as e, t } from "./constants-CuBlYZLO.js";
|
|
2
2
|
import { groupBy as n, sumBy as r } from "lodash-es";
|
|
3
3
|
//#region src/components/Table/utils/tableUtils.ts
|
|
4
4
|
var i = (e = []) => e.flatMap((e) => e.children?.length ? e.children : [e]), a = (e, t) => t.findIndex((t) => e.isParent ? t.parentKey === e.key : t.key === e.key), o = (e, n, i, a = t.DEFAULT_WIDTH) => r(i === "left" ? n.slice(0, e) : n.slice(e + 1), (e) => e.width || a), s = (e, t, n) => n !== "left" && n !== "right" ? null : {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { t as e } from "../vendors/cssVars-DoQgQ2CM.js";
|
|
2
|
+
//#region src/components/Table/style/resolveTableThemeVars.ts
|
|
3
|
+
var t = (t) => {
|
|
4
|
+
if (!t) return {};
|
|
5
|
+
let n = {};
|
|
6
|
+
return e(n, "--bsy-table-color-border", t.colorBorder), e(n, "--bsy-table-color-bg-header", t.colorBgHeader), e(n, "--bsy-table-color-bg-container", t.colorBgContainer), e(n, "--bsy-table-color-text", t.colorText), e(n, "--bsy-table-color-text-heading", t.colorTextHeading), e(n, "--bsy-table-color-bg-row-hover", t.colorBgRowHover), n;
|
|
7
|
+
};
|
|
8
|
+
//#endregion
|
|
9
|
+
export { t };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, d as n, f as r, i, l as a, n as o, o as s, r as c, s as l, t as u, u as d } from "../processRowspan-
|
|
1
|
+
import { a as e, c as t, d as n, f as r, i, l as a, n as o, o as s, r as c, s as l, t as u, u as d } from "../processRowspan-D4uv6zLk.js";
|
|
2
2
|
export { e as calculateFixedOffset, s as expandLeafColumns, l as findFlatColumnIndex, i as flattenColumns, u as getCellRowspan, t as getColumnsWidth, a as getFixedStickyStyle, d as getRowKey, o as processRowspan, c as shouldRenderCell, n as sortData, r as splitFixedColumns };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as e } from "../Icon/Icon-
|
|
2
|
-
import { n as t } from "../vendors/color-
|
|
3
|
-
import { n } from "../vendors/animations-
|
|
4
|
-
import { t as r } from "../vendors/useFloatingPortal-
|
|
1
|
+
import { t as e } from "../Icon/Icon-SQ5tu-yG.js";
|
|
2
|
+
import { n as t } from "../vendors/color-BQYy0Wgy.js";
|
|
3
|
+
import { n } from "../vendors/animations-Mlw78WYo.js";
|
|
4
|
+
import { t as r } from "../vendors/useFloatingPortal-B2SDNV5C.js";
|
|
5
5
|
import { isString as i } from "lodash-es";
|
|
6
6
|
import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
7
7
|
import { createContext as c, useCallback as l, useContext as u, useLayoutEffect as d, useRef as f, useState as p } from "react";
|
package/dist/Tabs/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../Icon/Icon-
|
|
2
|
-
import "../vendors/color-
|
|
3
|
-
import "../vendors/useFloatingPortal-
|
|
4
|
-
import { i as e, n as t, r as n, t as r } from "./Tabs-
|
|
1
|
+
import "../Icon/Icon-SQ5tu-yG.js";
|
|
2
|
+
import "../vendors/color-BQYy0Wgy.js";
|
|
3
|
+
import "../vendors/useFloatingPortal-B2SDNV5C.js";
|
|
4
|
+
import { i as e, n as t, r as n, t as r } from "./Tabs-7wEcxUv6.js";
|
|
5
5
|
export { e as TABS_TYPE, n as TabPanel, r as TabSelect, t as default };
|