@baishuyun/ui-base 6.29.0 → 6.29.1
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-DHRiaiXw.js → Calendar-cXOw65UG.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-BfyiYmTl.js → DatePicker-TimXurVT.js} +1 -1
- package/dist/DatePicker/{DatePickerPanel-D8qVQZ0a.js → DatePickerPanel-CfnP7Cpa.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 +1 -1
- 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-BmPAWvbO.js → Table-BMqJZqBK.js} +396 -305
- 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/TableBody.d.ts +1 -40
- package/dist/components/Table/hooks/useTableVirtual.d.ts +5 -1
- package/dist/components/Table/index.d.ts +1 -2
- package/dist/components/Table/interface.d.ts +39 -0
- package/dist/components/Table/utils/tableUtils.d.ts +1 -1
- package/dist/index.js +4 -4
- package/dist/style.css +1 -1
- package/dist/vendors/{version-BovtV-fV.js → version-Foao691n.js} +1 -1
- package/package.json +1 -1
package/dist/Table/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "../vendors/version-
|
|
1
|
+
import "../vendors/version-Foao691n.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-BMqJZqBK.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,43 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ColumnConfig } from '../interface';
|
|
3
|
-
export interface TableBodyProps {
|
|
4
|
-
leftFixedColumns?: ColumnConfig[];
|
|
5
|
-
normalColumns?: ColumnConfig[];
|
|
6
|
-
rightFixedColumns?: ColumnConfig[];
|
|
7
|
-
dataSource?: Record<string, unknown>[];
|
|
8
|
-
rowKey?: string;
|
|
9
|
-
rowHeight?: number | string;
|
|
10
|
-
emptyText?: ReactNode;
|
|
11
|
-
onRowClick?: (record: Record<string, unknown>, index: number, e: MouseEvent) => void;
|
|
12
|
-
onRow?: (record: Record<string, unknown>, index: number, defaults: {
|
|
13
|
-
className: string;
|
|
14
|
-
style: CSSProperties;
|
|
15
|
-
}) => Record<string, unknown>;
|
|
16
|
-
onCell?: (value: unknown, record: Record<string, unknown>, column: ColumnConfig, rowIndex: number, cellProps: {
|
|
17
|
-
className: string;
|
|
18
|
-
style: CSSProperties;
|
|
19
|
-
}) => Record<string, unknown>;
|
|
20
|
-
totalColumnsWidth?: number;
|
|
21
|
-
needSpacer?: boolean;
|
|
22
|
-
rowRefCallback?: (element: HTMLElement) => void;
|
|
23
|
-
isDynamicHeight?: boolean;
|
|
24
|
-
emptyRowContent?: ReactNode;
|
|
25
|
-
showEmptyRow?: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* 分组数据块在全局虚拟列表中的起始下标。
|
|
28
|
-
* 传入(含 0)时强制 data-index = startVirtualIndex + rowIndex,不与 record.dataIndex 混用。
|
|
29
|
-
*/
|
|
30
|
-
startVirtualIndex?: number;
|
|
31
|
-
/** 无数据时返回 null(分组块常用);优先于 showEmptyRow */
|
|
32
|
-
hideWhenEmpty?: boolean;
|
|
33
|
-
/** 追加到 .custom-table-body */
|
|
34
|
-
wrapperClassName?: string;
|
|
35
|
-
/**
|
|
36
|
-
* 为 true 时即使 isDynamicHeight 也使用 rowHeight(对齐 Gantt 分组块现状)。
|
|
37
|
-
* 默认 false:平坦路径保持 isDynamicHeight ? 'auto' : rowHeight。
|
|
38
|
-
*/
|
|
39
|
-
forceRowHeight?: boolean;
|
|
40
|
-
}
|
|
1
|
+
import { TableBodyProps } from '../interface';
|
|
41
2
|
declare const _default: import('react').MemoExoticComponent<{
|
|
42
3
|
({ leftFixedColumns, normalColumns, rightFixedColumns, dataSource, rowKey, rowHeight, emptyText, onRowClick, onRow, onCell, totalColumnsWidth, needSpacer, rowRefCallback, isDynamicHeight, emptyRowContent, showEmptyRow, startVirtualIndex, hideWhenEmpty, wrapperClassName, forceRowHeight, }: TableBodyProps): import("react").JSX.Element | null;
|
|
43
4
|
displayName: string;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { VirtualItem } from '@tanstack/react-virtual';
|
|
2
2
|
export interface UseTableVirtualOptions {
|
|
3
|
-
rowHeight?: number | string | ((index: number) => number);
|
|
3
|
+
rowHeight?: number | 'auto' | string | ((index: number) => number);
|
|
4
|
+
/** 是否开启自适应/动态行高测量,默认在 rowHeight === 'auto' 时自动开启 */
|
|
5
|
+
dynamicHeight?: boolean;
|
|
6
|
+
/** 行主键字段,对齐 TableProps.rowKey */
|
|
7
|
+
rowKey?: string;
|
|
4
8
|
enabled?: boolean;
|
|
5
9
|
overscan?: number;
|
|
6
10
|
estimateSize?: (index: number, row?: Record<string, unknown>) => number;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
export { default as Table } from './Table';
|
|
2
2
|
export { default } from './Table';
|
|
3
3
|
export { default as TableBody } from './components/TableBody';
|
|
4
|
-
export type { TableBodyProps } from './
|
|
5
|
-
export type { TableProps, TableTheme, ColumnConfig, HeaderRenderApi, TableRenderBodyContext, } from './interface';
|
|
4
|
+
export type { TableProps, TableTheme, ColumnConfig, HeaderRenderApi, TableRenderBodyContext, TableBodyProps, TableRef, } from './interface';
|
|
6
5
|
export { resolveTableThemeVars } from './style';
|
|
7
6
|
export { processRowspan, shouldRenderCell, getCellRowspan } from './utils/processRowspan';
|
|
8
7
|
export { getRowKey, calculateFixedOffset, splitFixedColumns, getColumnsWidth, expandLeafColumns, sortData, } from './utils/tableUtils';
|
|
@@ -129,3 +129,42 @@ export interface TableRef {
|
|
|
129
129
|
clearRowHeightCache: (rowIds?: string | number | Array<string | number>) => void;
|
|
130
130
|
remeasure: () => void;
|
|
131
131
|
}
|
|
132
|
+
/** 可组合表体。分组等自定义 body 复用表格已拆分的列。 */
|
|
133
|
+
export interface TableBodyProps {
|
|
134
|
+
leftFixedColumns?: ColumnConfig[];
|
|
135
|
+
normalColumns?: ColumnConfig[];
|
|
136
|
+
rightFixedColumns?: ColumnConfig[];
|
|
137
|
+
dataSource?: Record<string, unknown>[];
|
|
138
|
+
rowKey?: string;
|
|
139
|
+
rowHeight?: number | string;
|
|
140
|
+
emptyText?: ReactNode;
|
|
141
|
+
onRowClick?: (record: Record<string, unknown>, index: number, e: MouseEvent) => void;
|
|
142
|
+
onRow?: (record: Record<string, unknown>, index: number, defaults: {
|
|
143
|
+
className: string;
|
|
144
|
+
style: CSSProperties;
|
|
145
|
+
}) => Record<string, unknown>;
|
|
146
|
+
onCell?: (value: unknown, record: Record<string, unknown>, column: ColumnConfig, rowIndex: number, cellProps: {
|
|
147
|
+
className: string;
|
|
148
|
+
style: CSSProperties;
|
|
149
|
+
}) => Record<string, unknown>;
|
|
150
|
+
totalColumnsWidth?: number;
|
|
151
|
+
needSpacer?: boolean;
|
|
152
|
+
rowRefCallback?: (element: HTMLElement) => void;
|
|
153
|
+
isDynamicHeight?: boolean;
|
|
154
|
+
emptyRowContent?: ReactNode;
|
|
155
|
+
showEmptyRow?: boolean;
|
|
156
|
+
/**
|
|
157
|
+
* 分组数据块在全局虚拟列表中的起始下标。
|
|
158
|
+
* 传入(含 0)时强制 data-index = startVirtualIndex + rowIndex,不与 record.dataIndex 混用。
|
|
159
|
+
*/
|
|
160
|
+
startVirtualIndex?: number;
|
|
161
|
+
/** 无数据时返回 null(分组块常用);优先于 showEmptyRow */
|
|
162
|
+
hideWhenEmpty?: boolean;
|
|
163
|
+
/** 追加到 .custom-table-body */
|
|
164
|
+
wrapperClassName?: string;
|
|
165
|
+
/**
|
|
166
|
+
* 为 true 时即使 isDynamicHeight 也使用 rowHeight(对齐 Gantt 分组块现状)。
|
|
167
|
+
* 默认 false:平坦路径保持 isDynamicHeight ? 'auto' : rowHeight。
|
|
168
|
+
*/
|
|
169
|
+
forceRowHeight?: boolean;
|
|
170
|
+
}
|
|
@@ -12,7 +12,7 @@ export declare const getFixedStickyStyle: (columnIndex: number, flatColumns: Col
|
|
|
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
|
-
export declare const getRowKey: (record: Record<string, unknown
|
|
15
|
+
export declare const getRowKey: (record: Record<string, unknown> | undefined, rowKey: string | undefined, index: number) => string | number;
|
|
16
16
|
export declare const splitFixedColumns: (columns: ColumnConfig[]) => {
|
|
17
17
|
leftFixedColumns: ColumnConfig[];
|
|
18
18
|
normalColumns: ColumnConfig[];
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./vendors/version-
|
|
1
|
+
import "./vendors/version-Foao691n.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-cXOw65UG.js";
|
|
33
|
+
import { t as M } from "./DatePicker/DatePicker-TimXurVT.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-BMqJZqBK.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 };
|