@baishuyun/ui-base 6.29.1 → 6.29.2
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/index.js +1 -1
- package/dist/Calendar/{Calendar-cXOw65UG.js → Calendar-MCtQbn-u.js} +1 -1
- package/dist/Calendar/index.js +3 -3
- package/dist/Card/index.js +1 -1
- package/dist/CheckBox/index.js +1 -1
- package/dist/ColorPicker/index.js +1 -1
- package/dist/ConfigProvider/index.js +1 -1
- package/dist/DatePicker/{DatePicker-TimXurVT.js → DatePicker-CRnA0EoA.js} +1 -1
- package/dist/DatePicker/{DatePickerPanel-CfnP7Cpa.js → DatePickerPanel-DFk0OP4X.js} +1 -1
- package/dist/DatePicker/index.js +2 -2
- package/dist/DropDown/index.js +1 -1
- package/dist/Editor/index.js +1 -1
- package/dist/FieldCard/index.js +1 -1
- package/dist/Gantt/index.js +2 -2
- package/dist/Icon/index.js +1 -1
- package/dist/InputTag/index.js +1 -1
- package/dist/Kanban/index.js +8 -3
- package/dist/Loading/index.js +1 -1
- package/dist/Modal/index.js +1 -1
- package/dist/NotFoundContent/index.js +1 -1
- package/dist/Overlay/index.js +1 -1
- package/dist/Radio/index.js +1 -1
- package/dist/ScrollBar/index.js +1 -1
- package/dist/Segmented/index.js +1 -1
- package/dist/Select/index.js +1 -1
- package/dist/Table/{Table-BMqJZqBK.js → Table-B8381Lni.js} +3 -3
- package/dist/Table/index.js +2 -2
- package/dist/Tabs/index.js +1 -1
- package/dist/Tooltip/index.js +1 -1
- package/dist/Tree/index.js +1 -1
- package/dist/components/Table/components/TableFooter.d.ts +3 -3
- package/dist/components/Table/components/TableHeader.d.ts +2 -2
- package/dist/components/Table/hooks/useTableColumnWidths.d.ts +2 -2
- package/dist/components/Table/hooks/useTableVirtual.d.ts +2 -2
- package/dist/components/Table/interface.d.ts +15 -15
- package/dist/components/Table/utils/flattenColumns.d.ts +1 -1
- package/dist/components/Table/utils/processRowspan.d.ts +1 -1
- package/dist/components/Table/utils/tableUtils.d.ts +8 -8
- package/dist/index.js +4 -4
- package/dist/vendors/{version-Foao691n.js → version-CohiolFd.js} +1 -1
- package/package.json +1 -1
package/dist/Amap/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { t } from "../vendors/useLocale-3oUjPb-k.js";
|
|
|
3
3
|
import { t as n } from "../vendors/cssVars-UpriQzph.js";
|
|
4
4
|
import { t as r } from "../Segmented/Segmented-BMwjhsZw.js";
|
|
5
5
|
import { t as i } from "../Tooltip/Tooltip-N06Os8rG.js";
|
|
6
|
-
import { t as a } from "../DatePicker/DatePicker-
|
|
6
|
+
import { t as a } from "../DatePicker/DatePicker-CRnA0EoA.js";
|
|
7
7
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
8
8
|
import { memo as c, useCallback as l, useEffect as u, useLayoutEffect as d, useMemo as f, useRef as p, useState as m } from "react";
|
|
9
9
|
import h from "clsx";
|
package/dist/Calendar/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../vendors/version-
|
|
1
|
+
import "../vendors/version-CohiolFd.js";
|
|
2
2
|
import "../Icon/Icon-CcKDWNGy.js";
|
|
3
3
|
import "../vendors/LocaleContext-CsTLO_Y2.js";
|
|
4
4
|
import "../Overlay/OverlayContext-CVSFoyqN.js";
|
|
@@ -7,7 +7,7 @@ import "../vendors/useLocale-3oUjPb-k.js";
|
|
|
7
7
|
import "../vendors/useLatchedPopupPortalRoot-CC6af8t-.js";
|
|
8
8
|
import "../Segmented/Segmented-BMwjhsZw.js";
|
|
9
9
|
import "../Tooltip/Tooltip-N06Os8rG.js";
|
|
10
|
-
import { n as e, r as t, t as n } from "./Calendar-
|
|
11
|
-
import "../DatePicker/DatePicker-
|
|
10
|
+
import { n as e, r as t, t as n } from "./Calendar-MCtQbn-u.js";
|
|
11
|
+
import "../DatePicker/DatePicker-CRnA0EoA.js";
|
|
12
12
|
import "../DatePicker/pickerLocale-Brf7_Tnd.js";
|
|
13
13
|
export { n as Calendar, n as default, t as resolveCalendarThemeVars, e as resolvePlatformCalendarTheme };
|
package/dist/Card/index.js
CHANGED
package/dist/CheckBox/index.js
CHANGED
|
@@ -48,7 +48,7 @@ var w = {
|
|
|
48
48
|
"bsy-date-picker__content": "_bsy-date-picker__content_1i2le_33",
|
|
49
49
|
"bsy-date-picker__divider": "_bsy-date-picker__divider_1i2le_43",
|
|
50
50
|
"bsy-date-picker__panel-loading": "_bsy-date-picker__panel-loading_1i2le_49"
|
|
51
|
-
}, j = m(() => import("./DatePickerPanel-
|
|
51
|
+
}, j = m(() => import("./DatePickerPanel-DFk0OP4X.js")), M = (o) => {
|
|
52
52
|
let { children: m, picker: S = "date", theme: w, getPopupContainer: D, triggerActiveClassName: O, zIndex: M } = o, { locale: N } = r(), P = e(M), [F, I] = v(o, {
|
|
53
53
|
defaultValuePropName: "defaultValue",
|
|
54
54
|
valuePropName: "value",
|
package/dist/DatePicker/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "../vendors/version-
|
|
1
|
+
import "../vendors/version-CohiolFd.js";
|
|
2
2
|
import "../vendors/LocaleContext-CsTLO_Y2.js";
|
|
3
3
|
import "../Overlay/OverlayContext-CVSFoyqN.js";
|
|
4
4
|
import "../vendors/useFloatingOverlay-B66lOL8v.js";
|
|
5
5
|
import "../vendors/useLocale-3oUjPb-k.js";
|
|
6
6
|
import "../vendors/useLatchedPopupPortalRoot-CC6af8t-.js";
|
|
7
|
-
import { t as e } from "./DatePicker-
|
|
7
|
+
import { t as e } from "./DatePicker-CRnA0EoA.js";
|
|
8
8
|
import "./pickerLocale-Brf7_Tnd.js";
|
|
9
9
|
export { e as default };
|
package/dist/DropDown/index.js
CHANGED
package/dist/Editor/index.js
CHANGED
package/dist/FieldCard/index.js
CHANGED
package/dist/Gantt/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../vendors/version-
|
|
1
|
+
import "../vendors/version-CohiolFd.js";
|
|
2
2
|
import "../ScrollBar/style-D26azwz6.js";
|
|
3
3
|
import { t as e } from "../Icon/Icon-CcKDWNGy.js";
|
|
4
4
|
import "../vendors/LocaleContext-CsTLO_Y2.js";
|
|
@@ -12,7 +12,7 @@ import "../NotFoundContent/NotFoundContent-DJUQ0_2D.js";
|
|
|
12
12
|
import "../ScrollBar/ScrollBar-IMTuAOF5.js";
|
|
13
13
|
import "../vendors/useFloatingPortal-DJ1iKmW-.js";
|
|
14
14
|
import { t as i } from "../DropDown/DropDown-B3VFy5GF.js";
|
|
15
|
-
import { r as a } from "../Table/Table-
|
|
15
|
+
import { r as a } from "../Table/Table-B8381Lni.js";
|
|
16
16
|
import { isFunction as o, isNumber as s, isString as c } from "lodash-es";
|
|
17
17
|
import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
18
18
|
import f, { createContext as p, forwardRef as m, memo as h, useCallback as g, useContext as _, useEffect as v, useImperativeHandle as y, useLayoutEffect as b, useMemo as x, useRef as S, useState as C } from "react";
|
package/dist/Icon/index.js
CHANGED
package/dist/InputTag/index.js
CHANGED
package/dist/Kanban/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../vendors/version-
|
|
1
|
+
import "../vendors/version-CohiolFd.js";
|
|
2
2
|
import "../ScrollBar/style-D26azwz6.js";
|
|
3
3
|
import { t as e } from "../Icon/Icon-CcKDWNGy.js";
|
|
4
4
|
import "../vendors/LocaleContext-CsTLO_Y2.js";
|
|
@@ -209,7 +209,9 @@ function J({ column: e, estimate: n, selectedIds: r, loadingIds: a, footer: o, o
|
|
|
209
209
|
return () => window.clearTimeout(e);
|
|
210
210
|
}, [j]);
|
|
211
211
|
let P = d((e) => {
|
|
212
|
-
M(e), v(e)
|
|
212
|
+
M(e), v(e);
|
|
213
|
+
let t = e?.clientHeight ?? 0;
|
|
214
|
+
t > 0 && x(t);
|
|
213
215
|
}, [M]), { t: F } = t(), L = g(e.paging?.loading), R = g(e.items.length);
|
|
214
216
|
p(() => {
|
|
215
217
|
let t = L.current && !e.paging?.loading, n = R.current !== e.items.length;
|
|
@@ -237,7 +239,10 @@ function J({ column: e, estimate: n, selectedIds: r, loadingIds: a, footer: o, o
|
|
|
237
239
|
]);
|
|
238
240
|
p(() => {
|
|
239
241
|
if (!h) return;
|
|
240
|
-
let e = new ResizeObserver(() =>
|
|
242
|
+
let e = new ResizeObserver(() => {
|
|
243
|
+
let e = h.clientHeight;
|
|
244
|
+
e > 0 && x(e);
|
|
245
|
+
});
|
|
241
246
|
return e.observe(h), () => e.disconnect();
|
|
242
247
|
}, [h]);
|
|
243
248
|
let V = !!e.paging?.loading, J = !!(e.paging?.noMore && !e.paging?.loading), oe = V || J, Y = N.getTotalSize(), se = Y, X = Y + (oe ? q : 0), Z = !!o && y > 0 && X + K > y, ce = X + (o && !Z ? K : 0);
|
package/dist/Loading/index.js
CHANGED
package/dist/Modal/index.js
CHANGED
package/dist/Overlay/index.js
CHANGED
package/dist/Radio/index.js
CHANGED
package/dist/ScrollBar/index.js
CHANGED
package/dist/Segmented/index.js
CHANGED
package/dist/Select/index.js
CHANGED
|
@@ -605,12 +605,12 @@ function ye(e, t, n) {
|
|
|
605
605
|
};
|
|
606
606
|
}
|
|
607
607
|
function be(e, t, n, r) {
|
|
608
|
-
let i = n ? t.
|
|
608
|
+
let i = n ? t.flatMap((t) => {
|
|
609
609
|
let n = e[t.index];
|
|
610
|
-
return n
|
|
610
|
+
return n ? [{
|
|
611
611
|
...n,
|
|
612
612
|
dataIndex: t.index
|
|
613
|
-
};
|
|
613
|
+
}] : [];
|
|
614
614
|
}) : e.map((e, t) => ({
|
|
615
615
|
...e,
|
|
616
616
|
dataIndex: t
|
package/dist/Table/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "../vendors/version-
|
|
1
|
+
import "../vendors/version-CohiolFd.js";
|
|
2
2
|
import "../ScrollBar/style-D26azwz6.js";
|
|
3
3
|
import "../Icon/Icon-CcKDWNGy.js";
|
|
4
4
|
import "../vendors/LocaleContext-CsTLO_Y2.js";
|
|
5
5
|
import "../vendors/useLocale-3oUjPb-k.js";
|
|
6
|
-
import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, r as p, s as m, t as h, u as g, v as _, y as v } from "./Table-
|
|
6
|
+
import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, r as p, s as m, t as h, u as g, v as _, y as v } from "./Table-B8381Lni.js";
|
|
7
7
|
export { e as COLUMN_DEFAULTS, _ as DEFAULT_CONFIG, h as HierarchyCell, v as TABLE_DOM, p as Table, p as default, m as TableBody, u as buildHierarchyTreeMeta, r as calculateFixedOffset, i as expandLeafColumns, n as getCellRowspan, f as getColumnsWidth, l as getRowKey, c as processRowspan, s as resolveTableThemeVars, g as shouldRenderCell, o as sortData, a as splitFixedColumns, t as useColumnResize, d as useTableVirtual };
|
package/dist/Tabs/index.js
CHANGED
package/dist/Tooltip/index.js
CHANGED
package/dist/Tree/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { ColumnConfig } from '../interface';
|
|
3
3
|
export interface TableFooterProps {
|
|
4
|
-
leftFixedColumns?: ColumnConfig[];
|
|
5
|
-
normalColumns?: ColumnConfig[];
|
|
6
|
-
rightFixedColumns?: ColumnConfig[];
|
|
4
|
+
leftFixedColumns?: readonly ColumnConfig[];
|
|
5
|
+
normalColumns?: readonly ColumnConfig[];
|
|
6
|
+
rightFixedColumns?: readonly ColumnConfig[];
|
|
7
7
|
footerData?: Record<string, unknown>;
|
|
8
8
|
summary?: Record<string, ReactNode>;
|
|
9
9
|
render?: (value: unknown, column: ColumnConfig) => ReactNode;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ColumnConfig } from '../interface';
|
|
2
2
|
export interface TableHeaderProps {
|
|
3
|
-
columns?: ColumnConfig[];
|
|
3
|
+
columns?: readonly ColumnConfig[];
|
|
4
4
|
enableFixed?: boolean;
|
|
5
5
|
height?: number;
|
|
6
6
|
resizingColumn?: string | null;
|
|
7
7
|
onResizeStart?: (columnKey: string, startWidth: number, startX: number) => void;
|
|
8
8
|
resizable?: boolean;
|
|
9
|
-
disabledResizeColumns?: string[];
|
|
9
|
+
disabledResizeColumns?: readonly string[];
|
|
10
10
|
totalColumnsWidth?: number;
|
|
11
11
|
needSpacer?: boolean;
|
|
12
12
|
headerRowSpan?: number;
|
|
@@ -6,14 +6,14 @@ import { ColumnConfig, TableProps } from '../interface';
|
|
|
6
6
|
* 数字没变时保留拖拽结果,避免父组件重渲染把列宽弹回去。
|
|
7
7
|
*/
|
|
8
8
|
export declare function useTableColumnWidths({ columns, scrollRef, minColumnWidth, maxColumnWidth, onColumnResize, onColumnResizeEnd, }: {
|
|
9
|
-
columns: ColumnConfig[];
|
|
9
|
+
columns: readonly ColumnConfig[];
|
|
10
10
|
scrollRef: RefObject<HTMLDivElement | null>;
|
|
11
11
|
minColumnWidth?: number;
|
|
12
12
|
maxColumnWidth?: number;
|
|
13
13
|
onColumnResize?: TableProps['onColumnResize'];
|
|
14
14
|
onColumnResizeEnd?: TableProps['onColumnResizeEnd'];
|
|
15
15
|
}): {
|
|
16
|
-
sizedColumns: ColumnConfig[];
|
|
16
|
+
sizedColumns: readonly ColumnConfig[];
|
|
17
17
|
flatColumns: ColumnConfig[];
|
|
18
18
|
isResizing: boolean;
|
|
19
19
|
resizingColumn: string | undefined;
|
|
@@ -11,7 +11,7 @@ export interface UseTableVirtualOptions {
|
|
|
11
11
|
minRowHeight?: number;
|
|
12
12
|
maxRowHeight?: number;
|
|
13
13
|
}
|
|
14
|
-
export declare function useTableVirtual(rows: Record<string, unknown>[], options: UseTableVirtualOptions, containerRef: React.RefObject<HTMLElement | null>): {
|
|
14
|
+
export declare function useTableVirtual(rows: readonly Record<string, unknown>[], options: UseTableVirtualOptions, containerRef: React.RefObject<HTMLElement | null>): {
|
|
15
15
|
enabled: boolean;
|
|
16
16
|
virtualRows: VirtualItem[];
|
|
17
17
|
rowRefCallback: (node: Element | null) => void;
|
|
@@ -23,7 +23,7 @@ export declare function useTableVirtual(rows: Record<string, unknown>[], options
|
|
|
23
23
|
isDynamicHeight: boolean;
|
|
24
24
|
};
|
|
25
25
|
/** 虚拟滚动只切当前窗口;未开启时给每行补 dataIndex。dataProcessor 吃切完的结果 */
|
|
26
|
-
export declare function sliceTableData(dataSource: Record<string, unknown>[], virtualRows: Array<{
|
|
26
|
+
export declare function sliceTableData(dataSource: readonly Record<string, unknown>[], virtualRows: Array<{
|
|
27
27
|
index: number;
|
|
28
28
|
}>, virtualEnabled: boolean, dataProcessor?: (rows: Record<string, unknown>[]) => Record<string, unknown>[]): Record<string, unknown>[] | {
|
|
29
29
|
dataIndex: number;
|
|
@@ -24,7 +24,7 @@ export interface ColumnConfig {
|
|
|
24
24
|
isLeaf?: boolean;
|
|
25
25
|
colSpan?: number;
|
|
26
26
|
rowSpan?: number;
|
|
27
|
-
children?: ColumnConfig[];
|
|
27
|
+
children?: readonly ColumnConfig[];
|
|
28
28
|
/** 自定义表头;第二个参数含 menuRef,供外部挂载 triggerClick */
|
|
29
29
|
header?: (column: ColumnConfig, api: HeaderRenderApi) => ReactNode;
|
|
30
30
|
render?: (value: unknown, record: Record<string, unknown>, index: number) => ReactNode;
|
|
@@ -54,11 +54,11 @@ export interface TableTheme {
|
|
|
54
54
|
}
|
|
55
55
|
/** renderBody 注入上下文:分组等自定义 body 应复用已拆分列,避免二次 splitFixedColumns */
|
|
56
56
|
export interface TableRenderBodyContext {
|
|
57
|
-
columns: ColumnConfig[];
|
|
58
|
-
flatColumns: ColumnConfig[];
|
|
59
|
-
leftFixedColumns: ColumnConfig[];
|
|
60
|
-
normalColumns: ColumnConfig[];
|
|
61
|
-
rightFixedColumns: ColumnConfig[];
|
|
57
|
+
columns: readonly ColumnConfig[];
|
|
58
|
+
flatColumns: readonly ColumnConfig[];
|
|
59
|
+
leftFixedColumns: readonly ColumnConfig[];
|
|
60
|
+
normalColumns: readonly ColumnConfig[];
|
|
61
|
+
rightFixedColumns: readonly ColumnConfig[];
|
|
62
62
|
totalColumnsWidth: number;
|
|
63
63
|
needSpacer: boolean;
|
|
64
64
|
rowRefCallback: (element: HTMLElement) => void;
|
|
@@ -76,8 +76,8 @@ export interface TableRenderBodyContext {
|
|
|
76
76
|
virtualEnabled: boolean;
|
|
77
77
|
}
|
|
78
78
|
export interface TableProps {
|
|
79
|
-
columns?: ColumnConfig[];
|
|
80
|
-
dataSource?: Record<string, unknown>[];
|
|
79
|
+
columns?: readonly ColumnConfig[];
|
|
80
|
+
dataSource?: readonly Record<string, unknown>[];
|
|
81
81
|
rowKey?: string;
|
|
82
82
|
height?: number | string;
|
|
83
83
|
bordered?: boolean;
|
|
@@ -101,7 +101,7 @@ export interface TableProps {
|
|
|
101
101
|
}) => Record<string, unknown>;
|
|
102
102
|
rowHeightStyle?: 'low' | 'middle' | 'high' | 'auto';
|
|
103
103
|
resizable?: boolean;
|
|
104
|
-
disabledResizeColumns?: string[];
|
|
104
|
+
disabledResizeColumns?: readonly string[];
|
|
105
105
|
minColumnWidth?: number;
|
|
106
106
|
maxColumnWidth?: number;
|
|
107
107
|
onColumnResize?: (columnKey: string, newWidth: number, widths: Map<string, number>) => void;
|
|
@@ -131,10 +131,10 @@ export interface TableRef {
|
|
|
131
131
|
}
|
|
132
132
|
/** 可组合表体。分组等自定义 body 复用表格已拆分的列。 */
|
|
133
133
|
export interface TableBodyProps {
|
|
134
|
-
leftFixedColumns?: ColumnConfig[];
|
|
135
|
-
normalColumns?: ColumnConfig[];
|
|
136
|
-
rightFixedColumns?: ColumnConfig[];
|
|
137
|
-
dataSource?: Record<string, unknown>[];
|
|
134
|
+
leftFixedColumns?: readonly ColumnConfig[];
|
|
135
|
+
normalColumns?: readonly ColumnConfig[];
|
|
136
|
+
rightFixedColumns?: readonly ColumnConfig[];
|
|
137
|
+
dataSource?: readonly Record<string, unknown>[];
|
|
138
138
|
rowKey?: string;
|
|
139
139
|
rowHeight?: number | string;
|
|
140
140
|
emptyText?: ReactNode;
|
|
@@ -163,8 +163,8 @@ export interface TableBodyProps {
|
|
|
163
163
|
/** 追加到 .custom-table-body */
|
|
164
164
|
wrapperClassName?: string;
|
|
165
165
|
/**
|
|
166
|
-
*
|
|
167
|
-
*
|
|
166
|
+
* 动态测量开启时仍使用数字 rowHeight。
|
|
167
|
+
* 测量 ref 与 data-index 照常挂上。默认 false 时,动态测量的行高为 auto。
|
|
168
168
|
*/
|
|
169
169
|
forceRowHeight?: boolean;
|
|
170
170
|
}
|
|
@@ -8,7 +8,7 @@ type HeaderCell = ColumnConfig & {
|
|
|
8
8
|
/**
|
|
9
9
|
* 扁平化列配置,计算多级表头的 colspan 和 rowspan
|
|
10
10
|
*/
|
|
11
|
-
export declare const flattenColumns: (columns: ColumnConfig[]) => {
|
|
11
|
+
export declare const flattenColumns: (columns: readonly ColumnConfig[]) => {
|
|
12
12
|
flatColumns: HeaderCell[];
|
|
13
13
|
headerRows: HeaderCell[][];
|
|
14
14
|
};
|
|
@@ -10,7 +10,7 @@ type RowRecord = Record<string, unknown> & {
|
|
|
10
10
|
* 处理 tbody 数据的 rowspan。
|
|
11
11
|
* 主表字段与子表单字段同屏时,主表字段按组合并。
|
|
12
12
|
*/
|
|
13
|
-
export declare const processRowspan: (flatDataSource: RowRecord[] | null | undefined, columns: ColumnConfig[], data_key?: string) => RowRecord[];
|
|
13
|
+
export declare const processRowspan: (flatDataSource: RowRecord[] | null | undefined, columns: readonly ColumnConfig[], data_key?: string) => RowRecord[];
|
|
14
14
|
export declare const getCellRowspan: (record: RowRecord, column: ColumnConfig) => number;
|
|
15
15
|
export declare const shouldRenderCell: (record: RowRecord, column: ColumnConfig) => boolean;
|
|
16
16
|
export {};
|
|
@@ -3,26 +3,26 @@ import { ColumnConfig } from '../interface';
|
|
|
3
3
|
import { CSSProperties } from 'react';
|
|
4
4
|
type SortDirection = (typeof SORT_DIRECTION)[keyof typeof SORT_DIRECTION];
|
|
5
5
|
/** 展开一级 children,得到叶列(非多级表头算法) */
|
|
6
|
-
export declare const expandLeafColumns: (columns?: ColumnConfig[]) => ColumnConfig[];
|
|
7
|
-
export declare const findFlatColumnIndex: (column: ColumnConfig, flatColumns: ColumnConfig[]) => number;
|
|
8
|
-
export declare const calculateFixedOffset: (columnIndex: number, columns: ColumnConfig[], fixedType: "left" | "right", defaultWidth?: number) => number;
|
|
6
|
+
export declare const expandLeafColumns: (columns?: readonly ColumnConfig[]) => ColumnConfig[];
|
|
7
|
+
export declare const findFlatColumnIndex: (column: ColumnConfig, flatColumns: readonly ColumnConfig[]) => number;
|
|
8
|
+
export declare const calculateFixedOffset: (columnIndex: number, columns: readonly ColumnConfig[], fixedType: "left" | "right", defaultWidth?: number) => number;
|
|
9
9
|
/** 固定列 sticky 定位样式;非固定返回 null */
|
|
10
|
-
export declare const getFixedStickyStyle: (columnIndex: number, flatColumns: ColumnConfig[], fixed: "left" | "right" | undefined) => CSSProperties | null;
|
|
10
|
+
export declare const getFixedStickyStyle: (columnIndex: number, flatColumns: readonly ColumnConfig[], fixed: "left" | "right" | undefined) => CSSProperties | null;
|
|
11
11
|
/**
|
|
12
12
|
* 排序数据。compareFn 按升序编写,降序由内部 reverse。
|
|
13
13
|
*/
|
|
14
14
|
export declare const sortData: <T extends Record<string, unknown>>(data: T[], key: string, direction: SortDirection, compareFn?: (aVal: unknown, bVal: unknown, a: T, b: T) => number) => T[];
|
|
15
15
|
export declare const getRowKey: (record: Record<string, unknown> | undefined, rowKey: string | undefined, index: number) => string | number;
|
|
16
|
-
export declare const splitFixedColumns: (columns: ColumnConfig[]) => {
|
|
16
|
+
export declare const splitFixedColumns: (columns: readonly ColumnConfig[]) => {
|
|
17
17
|
leftFixedColumns: ColumnConfig[];
|
|
18
18
|
normalColumns: ColumnConfig[];
|
|
19
19
|
rightFixedColumns: ColumnConfig[];
|
|
20
20
|
};
|
|
21
|
-
export declare const getColumnsWidth: (columns: ColumnConfig[], defaultWidth?: number) => number;
|
|
21
|
+
export declare const getColumnsWidth: (columns: readonly ColumnConfig[], defaultWidth?: number) => number;
|
|
22
22
|
/** 把拖拽中的列宽写回列树;没有覆盖时返回原数组 */
|
|
23
|
-
export declare const applyColumnWidths: (columns: ColumnConfig[], overrides: Record<string, number>) => ColumnConfig[];
|
|
23
|
+
export declare const applyColumnWidths: (columns: readonly ColumnConfig[], overrides: Record<string, number>) => readonly ColumnConfig[];
|
|
24
24
|
/** 固定列拆分、总宽和是否需要撑开空白列 */
|
|
25
|
-
export declare const getTableColumnLayout: (columns: ColumnConfig[], elementWidth: number) => {
|
|
25
|
+
export declare const getTableColumnLayout: (columns: readonly ColumnConfig[], elementWidth: number) => {
|
|
26
26
|
fixedLeftWidth: number;
|
|
27
27
|
fixedRightWidth: number;
|
|
28
28
|
totalColumnsWidth: number;
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./vendors/version-
|
|
1
|
+
import "./vendors/version-CohiolFd.js";
|
|
2
2
|
import "./ScrollBar/style-D26azwz6.js";
|
|
3
3
|
import { t as e } from "./Icon/Icon-CcKDWNGy.js";
|
|
4
4
|
import "./vendors/LocaleContext-CsTLO_Y2.js";
|
|
@@ -29,10 +29,10 @@ import { t as O } from "./DropDown/DropDown-B3VFy5GF.js";
|
|
|
29
29
|
import { t as k } from "./Loading/Loading-Dm4i0lYd.js";
|
|
30
30
|
import "./NotFoundContent/index.js";
|
|
31
31
|
import { t as A } from "./InputTag/InputTag-C1WA6sDA.js";
|
|
32
|
-
import { t as j } from "./Calendar/Calendar-
|
|
33
|
-
import { t as M } from "./DatePicker/DatePicker-
|
|
32
|
+
import { t as j } from "./Calendar/Calendar-MCtQbn-u.js";
|
|
33
|
+
import { t as M } from "./DatePicker/DatePicker-CRnA0EoA.js";
|
|
34
34
|
import "./DatePicker/pickerLocale-Brf7_Tnd.js";
|
|
35
|
-
import { a as N, c as P, d as F, f as I, g as L, h as R, i as z, l as B, m as V, n as H, o as U, p as W, r as G, t as K, u as q } from "./Table/Table-
|
|
35
|
+
import { a as N, c as P, d as F, f as I, g as L, h as R, i as z, l as B, m as V, n as H, o as U, p as W, r as G, t as K, u as q } from "./Table/Table-B8381Lni.js";
|
|
36
36
|
import { t as J } from "./FieldCard/FieldCard-CCv4nLpH.js";
|
|
37
37
|
import "overlayscrollbars/overlayscrollbars.css";
|
|
38
38
|
export { u as Amap, d as AmapCircle, l as AmapMarker, p as AmapMarkerCluster, f as AmapProvider, j as Calendar, m as Card, S as Checkbox, g as ColorPicker, n as ConfigProvider, M as DatePicker, O as DropDown, J as FieldCard, K as HierarchyCell, e as Icon, A as InputTag, k as Loading, t as LocalTheme, h as Modal, w as NotFoundContent, o as OVERLAY_Z_BASE, a as OVERLAY_Z_STEP, i as OverlayProvider, C as Radio, C as Ratio, T as ScrollBar, _ as Segmented, b as Select, D as TabSelect, G as Table, E as Tabs, y as Tooltip, v as TooltipFloatingContext, x as Tree, H as buildHierarchyTreeMeta, F as calculateFixedOffset, I as expandLeafColumns, P as getCellRowspan, W as getColumnsWidth, V as getRowKey, B as processRowspan, z as resolveTableThemeVars, q as shouldRenderCell, R as sortData, L as splitFixedColumns, s as useAmap, N as useColumnResize, c as useCurrentLocation, r as useOverlayZIndex, U as useTableVirtual };
|