@sia.soul/sia-react-ui 0.1.44 → 0.1.46
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/{chunk-QIXU7N4X.js → chunk-E4RMSZOC.js} +20 -1
- package/dist/core.css +14 -3
- package/dist/index.cjs +1656 -1481
- package/dist/index.css +26 -3
- package/dist/index.d.cts +19 -6
- package/dist/index.d.ts +19 -6
- package/dist/index.js +324 -168
- package/dist/{select-date-range-Dtj6XF9I.d.ts → select-date-range-B1ZWIHoe.d.ts} +1 -1
- package/dist/{select-date-range-2galnCvZ.d.cts → select-date-range-CyfCT32j.d.cts} +1 -1
- package/dist/select-date-range.cjs +19 -0
- package/dist/select-date-range.d.cts +1 -1
- package/dist/select-date-range.d.ts +1 -1
- package/dist/select-date-range.js +1 -1
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -121,15 +121,26 @@ fieldset:disabled .sia-input-number__floating-placeholder {
|
|
|
121
121
|
min-width: 0;
|
|
122
122
|
height: 100%;
|
|
123
123
|
}
|
|
124
|
-
.sia-picker-range-
|
|
125
|
-
|
|
124
|
+
.sia-picker-range-control > .sia-picker__trigger {
|
|
125
|
+
position: relative;
|
|
126
|
+
}
|
|
127
|
+
.sia-picker-range-control__indicator {
|
|
126
128
|
position: absolute;
|
|
127
|
-
right: 0;
|
|
128
129
|
bottom: -1px;
|
|
129
130
|
left: 0;
|
|
130
131
|
height: 3px;
|
|
131
132
|
background: var(--sia-color-primary);
|
|
132
133
|
pointer-events: none;
|
|
134
|
+
visibility: hidden;
|
|
135
|
+
}
|
|
136
|
+
.sia-picker-range-control.is-open .sia-picker-range-control__indicator {
|
|
137
|
+
visibility: visible;
|
|
138
|
+
transition: transform 220ms ease, width 220ms ease;
|
|
139
|
+
}
|
|
140
|
+
@media (prefers-reduced-motion: reduce) {
|
|
141
|
+
.sia-picker-range-control.is-open .sia-picker-range-control__indicator {
|
|
142
|
+
transition: none;
|
|
143
|
+
}
|
|
133
144
|
}
|
|
134
145
|
.sia-picker-range-control__field.sia-placeholder-floating > .is-placeholder {
|
|
135
146
|
color: transparent;
|
|
@@ -10224,6 +10235,18 @@ body > .sia-title-tooltip[data-sia-popup-layer] {
|
|
|
10224
10235
|
white-space: pre-wrap;
|
|
10225
10236
|
}
|
|
10226
10237
|
|
|
10238
|
+
/* src/components/Table/canvas.css */
|
|
10239
|
+
.sia-table__canvas-layer {
|
|
10240
|
+
position: absolute;
|
|
10241
|
+
top: 0;
|
|
10242
|
+
left: 0;
|
|
10243
|
+
z-index: 3;
|
|
10244
|
+
pointer-events: none;
|
|
10245
|
+
}
|
|
10246
|
+
.sia-table[data-render-mode=canvas] .sia-table__head {
|
|
10247
|
+
z-index: 5;
|
|
10248
|
+
}
|
|
10249
|
+
|
|
10227
10250
|
/* src/breadcrumb.css */
|
|
10228
10251
|
.sia-breadcrumb {
|
|
10229
10252
|
color: var(--sia-color-text-secondary);
|
package/dist/index.d.cts
CHANGED
|
@@ -5,7 +5,7 @@ import { HTMLAttributes, ReactNode, CSSProperties, ElementType, FormHTMLAttribut
|
|
|
5
5
|
import { C as ControlSize, I as InputPlaceholderMode, a as ControlStatus } from './shared-Bx4B28Wh.cjs';
|
|
6
6
|
import { O as OverlayContainer, a as OverlayApiHandle, M as ModalOpenConfig, S as SelectOption, b as SelectChangeValue, c as SelectProps, d as ModalActionResult, B as ButtonProps, e as ButtonSize } from './Select-YJbT-MF1.cjs';
|
|
7
7
|
export { f as Button, g as ButtonVariant, h as Modal, i as ModalProps, j as ModalType, k as Select, l as SelectMode, m as SelectValue } from './Select-YJbT-MF1.cjs';
|
|
8
|
-
export { D as DatePicker, a as DatePickerDisabledInfo, b as DatePickerPreset, c as DatePickerProps, d as DatePickerShowTime, e as DatePickerType, f as DatePickerValue, g as DateRangePickerPreset, h as DateRangePickerProps, S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-
|
|
8
|
+
export { D as DatePicker, a as DatePickerDisabledInfo, b as DatePickerPreset, c as DatePickerProps, d as DatePickerShowTime, e as DatePickerType, f as DatePickerValue, g as DateRangePickerPreset, h as DateRangePickerProps, S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-CyfCT32j.cjs';
|
|
9
9
|
export { RichTextContent, RichTextContentFormat, RichTextContentProps, RichTextEditor, RichTextEditorProps, RichTextImagePasteHandler, RichTextToolbar } from './rich-text-editor.cjs';
|
|
10
10
|
export { MarkdownEditor, MarkdownEditorMode, MarkdownEditorProps } from './markdown-editor.cjs';
|
|
11
11
|
import * as Monaco from 'monaco-editor';
|
|
@@ -1836,6 +1836,15 @@ type TableFixed = "left" | "right";
|
|
|
1836
1836
|
type TableAlign = "left" | "center" | "right";
|
|
1837
1837
|
/** 表格行高和字号的尺寸等级。 */
|
|
1838
1838
|
type TableSize = "small" | "medium" | "large";
|
|
1839
|
+
/** Canvas 单元格的绘制内容,不创建 React 子树。 */
|
|
1840
|
+
interface TableCanvasCell {
|
|
1841
|
+
/** 单行显示文本;超出列宽时自动省略。 */
|
|
1842
|
+
text: string;
|
|
1843
|
+
/** 文本颜色;默认使用表格主题文字色。 */
|
|
1844
|
+
color?: string;
|
|
1845
|
+
/** 标签背景色;设置后以圆角标签绘制,未设置时绘制普通文本。 */
|
|
1846
|
+
background?: string;
|
|
1847
|
+
}
|
|
1839
1848
|
/** 经过表格插件处理的行数据及其层级和索引信息。 */
|
|
1840
1849
|
interface TableRow<T> {
|
|
1841
1850
|
/** 唯一标识;同一集合内应保持唯一且稳定,用于定位、渲染和状态关联。 */
|
|
@@ -1927,6 +1936,8 @@ interface TableColumn<T = Record<string, unknown>> {
|
|
|
1927
1936
|
children?: readonly TableColumn<T>[];
|
|
1928
1937
|
/** 自定义数据单元格内容,接收该列的值、行数据和单元格上下文。 */
|
|
1929
1938
|
render?: (value: unknown, record: T, index: number, info: TableCellRenderInfo<T>) => ReactNode;
|
|
1939
|
+
/** Canvas 模式的纯绘制回调;返回 null 不绘制内容。未提供时,普通值直接绘制,自定义 render 仍以可见区域内的 Sia/React 组件显示。 */
|
|
1940
|
+
canvasRender?: (value: unknown, record: T, index: number, info: TableCellRenderInfo<T>) => TableCanvasCell | null;
|
|
1930
1941
|
/** 自定义列头内容,接收当前列及插件上下文;外层保持单行省略,悬停提示从 title 提取文本,无法提取时回退到 name 或 key。 */
|
|
1931
1942
|
renderHeader?: (column: TableColumn<T>, context: TablePluginContext<T, any>) => ReactNode;
|
|
1932
1943
|
/** 数据单元格的 CSS 类名,也可按单元格计算。 */
|
|
@@ -2018,7 +2029,7 @@ interface TablePlugin<T, S = unknown, Api = unknown> {
|
|
|
2018
2029
|
id: string;
|
|
2019
2030
|
/** 排序位置或排序方向。 */
|
|
2020
2031
|
order?: number;
|
|
2021
|
-
/**
|
|
2032
|
+
/** 是否禁用虚拟渲染;仅在实际展示行数不超过 100 时生效,超过 100 行由表格强制启用。 */
|
|
2022
2033
|
disableVirtual?: boolean;
|
|
2023
2034
|
/** 插件或功能初始化时的状态。 */
|
|
2024
2035
|
initialState?: S | (() => S);
|
|
@@ -2117,9 +2128,11 @@ interface TableProps<T extends Record<string, unknown> = Record<string, unknown>
|
|
|
2117
2128
|
toolbarBordered?: boolean;
|
|
2118
2129
|
/** 是否显示隔行背景。 */
|
|
2119
2130
|
striped?: boolean;
|
|
2120
|
-
/**
|
|
2131
|
+
/** 是否启用窗口化渲染;未指定时按 virtualThreshold 判断。筛选、分页及树展开后的实际展示行数超过 100 时强制启用,优先于 false 和插件的 disableVirtual。 */
|
|
2121
2132
|
virtual?: boolean;
|
|
2122
|
-
/**
|
|
2133
|
+
/** 内容渲染方式,默认 dom;canvas 使用画布绘制文本,并保留可见交互组件及 DOM 单元格语义。Canvas 强制固定行高和行虚拟化;不支持虚拟化的插件自动回退 DOM。 */
|
|
2134
|
+
renderMode?: "dom" | "canvas";
|
|
2135
|
+
/** 自动启用虚拟滚动的展示行数阈值(含该值),默认 100;仅在未指定 virtual 时使用,实际展示超过 100 行始终强制启用。 */
|
|
2123
2136
|
virtualThreshold?: number;
|
|
2124
2137
|
/** 行高度,单位为 px,虚拟滚动用其计算行位置;默认随 size 取 small 28、medium 36、large 46。自定义内容应适配行高,避免撑高后导致虚拟滚动位置偏差。 */
|
|
2125
2138
|
rowHeight?: number;
|
|
@@ -2367,7 +2380,7 @@ interface TableRowSpanPluginOptions<T> {
|
|
|
2367
2380
|
columns?: readonly string[];
|
|
2368
2381
|
/** 自定义两个值的相等性判断。 */
|
|
2369
2382
|
equals?: (left: unknown, right: unknown, column: TableColumn<T>) => boolean;
|
|
2370
|
-
/**
|
|
2383
|
+
/** 是否禁用虚拟渲染,默认 true;仅在展示行数不超过 100 时生效,超过 100 行由表格强制启用。 */
|
|
2371
2384
|
disableVirtual?: boolean;
|
|
2372
2385
|
}
|
|
2373
2386
|
/** 创建表格跨行合并插件。将返回值加入 Table 的 plugins 后生效。 */
|
|
@@ -3161,4 +3174,4 @@ interface QueryFormProps<T extends FormValues = FormValues> extends Omit<FormPro
|
|
|
3161
3174
|
/** 可复用的业务查询表单;快捷查询的存储和结果数据由业务方管理。 */
|
|
3162
3175
|
declare function QueryForm<T extends FormValues = FormValues>({ fields, children, form: providedForm, onSearch, loading, fieldWidth, collapsible, collapsed: controlledCollapsed, defaultCollapsed, collapsedCount, onCollapsedChange, quickQueries, quickQuerySize, savedQueries, shortcutsLoading, onSaveQuery, onRemoveQuery, onError, searchText, resetText, saveText, resetSearch, actionsExtra, disabled, className, placeholderMode, onValuesChange, onFinishFailed, ...formProps }: QueryFormProps<T>): react.JSX.Element;
|
|
3163
3176
|
|
|
3164
|
-
export { Alert, type AlertProps, type AlertStatus, type AnyTablePlugin, BadgeProps, ButtonProps, ButtonSize, Cascader, type CascaderFieldNames, type CascaderOption, type CascaderProps, type CascaderValue, Checkbox, type CheckboxGroupProps, type CheckboxOption, type CheckboxProps, type CheckboxValue, Col, type ColProps, type ColSize, ColorPicker, type ColorPickerMode, type ColorPickerPreset, type ColorPickerProps, ControlSize, ControlStatus, DEFAULT_PAGE_SIZE_OPTIONS, Divider, type DividerProps, Drawer, type DrawerOpenConfig, type DrawerPlacement, type DrawerProps, type DrawerPush, type DrawerPushConfig, Editor, type EditorCommand, type EditorCompletionContext, type EditorCompletionItem, type EditorCompletionItemKind, type EditorCompletionProvider, type EditorContextMenuItem, type EditorHandle, type EditorKeyDownEvent, type EditorLanguage, type EditorMarker, type EditorProps, type EditorRange, type EditorSelectionChange, type EditorTheme, type FlatTreeNode, type FlatTreeOptions, Flex, type FlexProps, FloatingScrollbarProvider, type FloatingScrollbarProviderProps, Form, type FormErrorField, type FormInstance, type FormItemProps, type FormListField, type FormListOperation, type FormListProps, type FormProps, type FormRule, type FormValues, type GridBreakpoint, InputNumber, type InputNumberProps, InputPlaceholderMode, InputSelect, type InputSelectProps, type LayoutGap, Markdown, type MarkdownProps, ModalActionResult, ModalOpenConfig, type NamePath, OverlayApiHandle, Pagination, type PaginationProps, QueryForm, type QueryFormField, type QueryFormProps, type QueryFormSearchInfo, type QueryFormShortcut, Radio, type RadioGroupProps, type RadioOption, type RadioProps, type RadioValue, Row, type RowProps, SIA_THEME, SelectChangeValue, type SelectModalConfig, SelectOption, SelectProps, type SelectionOption, SelectionPanel, type SelectionPanelProps, type SelectionValue, type SiaThemeMode, Slider, type SliderMark, type SliderProps, type SliderValue, Space, type SpaceCompactProps, type SpaceProps, Splitter, type SplitterPanelProps, type SplitterProps, Switch, type SwitchProps, type SwitchVariant, Table, type TableAlign, type TableCellAddress, type TableCellRange, type TableCellRenderInfo, type TableCellSelectionApi, type TableCellSelectionPluginOptions, type TableColumn, type TableColumnSettingApi, type TableColumnSettingItem, type TableColumnSettingPluginOptions, type TableColumnTransformPluginOptions, type TableEditableApi, type TableEditableCellConfig, type TableEditableCellType, type TableEditablePluginOptions, type TableExportApi, type TableExportPluginOptions, type TableExportScope, type TableFilterApi, type TableFilterPluginOptions, type TableFilterValues, type TableFixed, type TableHighlightPluginOptions, type TableHighlightValue, type TableIndexPluginOptions, type TableKey, type TableMergeStickyConfig, type TablePageParams, type TablePaginationApi, type TablePaginationPluginOptions, type TablePlugin, type TablePluginCellProps, type TablePluginContext, type TablePluginEvent, type TableProps, type TableRef, type TableResizeApi, type TableResizePluginOptions, type TableRow, type TableRowSpanPluginOptions, type TableSelectedCell, type TableSelectionApi, type TableSelectionMode, type TableSelectionPluginOptions, type TableSettingsAdapter, type TableSettingsSnapshot, type TableSize, type TableSortApi, type TableSortInfo, type TableSortPluginOptions, type TableSummaryPluginOptions, type TableSummaryRow, type TableToolbarItem, type TableToolbarPluginOptions, type TableTreeApi, type TableTreePluginOptions, TagStatus, TextArea, type TextAreaProps, ThemeSwitch, type ThemeSwitchProps, TimePicker, type TimePickerProps, type TimeRangePickerProps, ToolPanel, type ToolPanelItem, type ToolPanelPlacement, type ToolPanelProps, TreeSelect, type TreeSelectNode, type TreeSelectProps, type TreeSelectValue, Treemap, type TreemapNode, type TreemapNodeClickInfo, type TreemapNodeKind, type TreemapProps, type WindowAction, type WindowActionHandler, type WindowControlAction, type WindowControlLabels, WindowControls, type WindowControlsProps, WindowFrame, type WindowFrameProps, WindowTitleBar, type WindowTitleBarActionsAlign, type WindowTitleBarProps, applySiaTheme, buildFlatTree, createCellSelectionPlugin, createColumnSettingPlugin, createColumnTransformPlugin, createEditablePlugin, createExportPlugin, createFilterPlugin, createHighlightPlugin, createIndexPlugin, createLocalStorageTableSettingsAdapter, createPaginationPlugin, createResizePlugin, createRowSpanPlugin, createSelectionPlugin, createSortPlugin, createSummaryPlugin, createToolbarPlugin, createTreePlugin, openSelectModal, useForm };
|
|
3177
|
+
export { Alert, type AlertProps, type AlertStatus, type AnyTablePlugin, BadgeProps, ButtonProps, ButtonSize, Cascader, type CascaderFieldNames, type CascaderOption, type CascaderProps, type CascaderValue, Checkbox, type CheckboxGroupProps, type CheckboxOption, type CheckboxProps, type CheckboxValue, Col, type ColProps, type ColSize, ColorPicker, type ColorPickerMode, type ColorPickerPreset, type ColorPickerProps, ControlSize, ControlStatus, DEFAULT_PAGE_SIZE_OPTIONS, Divider, type DividerProps, Drawer, type DrawerOpenConfig, type DrawerPlacement, type DrawerProps, type DrawerPush, type DrawerPushConfig, Editor, type EditorCommand, type EditorCompletionContext, type EditorCompletionItem, type EditorCompletionItemKind, type EditorCompletionProvider, type EditorContextMenuItem, type EditorHandle, type EditorKeyDownEvent, type EditorLanguage, type EditorMarker, type EditorProps, type EditorRange, type EditorSelectionChange, type EditorTheme, type FlatTreeNode, type FlatTreeOptions, Flex, type FlexProps, FloatingScrollbarProvider, type FloatingScrollbarProviderProps, Form, type FormErrorField, type FormInstance, type FormItemProps, type FormListField, type FormListOperation, type FormListProps, type FormProps, type FormRule, type FormValues, type GridBreakpoint, InputNumber, type InputNumberProps, InputPlaceholderMode, InputSelect, type InputSelectProps, type LayoutGap, Markdown, type MarkdownProps, ModalActionResult, ModalOpenConfig, type NamePath, OverlayApiHandle, Pagination, type PaginationProps, QueryForm, type QueryFormField, type QueryFormProps, type QueryFormSearchInfo, type QueryFormShortcut, Radio, type RadioGroupProps, type RadioOption, type RadioProps, type RadioValue, Row, type RowProps, SIA_THEME, SelectChangeValue, type SelectModalConfig, SelectOption, SelectProps, type SelectionOption, SelectionPanel, type SelectionPanelProps, type SelectionValue, type SiaThemeMode, Slider, type SliderMark, type SliderProps, type SliderValue, Space, type SpaceCompactProps, type SpaceProps, Splitter, type SplitterPanelProps, type SplitterProps, Switch, type SwitchProps, type SwitchVariant, Table, type TableAlign, type TableCanvasCell, type TableCellAddress, type TableCellRange, type TableCellRenderInfo, type TableCellSelectionApi, type TableCellSelectionPluginOptions, type TableColumn, type TableColumnSettingApi, type TableColumnSettingItem, type TableColumnSettingPluginOptions, type TableColumnTransformPluginOptions, type TableEditableApi, type TableEditableCellConfig, type TableEditableCellType, type TableEditablePluginOptions, type TableExportApi, type TableExportPluginOptions, type TableExportScope, type TableFilterApi, type TableFilterPluginOptions, type TableFilterValues, type TableFixed, type TableHighlightPluginOptions, type TableHighlightValue, type TableIndexPluginOptions, type TableKey, type TableMergeStickyConfig, type TablePageParams, type TablePaginationApi, type TablePaginationPluginOptions, type TablePlugin, type TablePluginCellProps, type TablePluginContext, type TablePluginEvent, type TableProps, type TableRef, type TableResizeApi, type TableResizePluginOptions, type TableRow, type TableRowSpanPluginOptions, type TableSelectedCell, type TableSelectionApi, type TableSelectionMode, type TableSelectionPluginOptions, type TableSettingsAdapter, type TableSettingsSnapshot, type TableSize, type TableSortApi, type TableSortInfo, type TableSortPluginOptions, type TableSummaryPluginOptions, type TableSummaryRow, type TableToolbarItem, type TableToolbarPluginOptions, type TableTreeApi, type TableTreePluginOptions, TagStatus, TextArea, type TextAreaProps, ThemeSwitch, type ThemeSwitchProps, TimePicker, type TimePickerProps, type TimeRangePickerProps, ToolPanel, type ToolPanelItem, type ToolPanelPlacement, type ToolPanelProps, TreeSelect, type TreeSelectNode, type TreeSelectProps, type TreeSelectValue, Treemap, type TreemapNode, type TreemapNodeClickInfo, type TreemapNodeKind, type TreemapProps, type WindowAction, type WindowActionHandler, type WindowControlAction, type WindowControlLabels, WindowControls, type WindowControlsProps, WindowFrame, type WindowFrameProps, WindowTitleBar, type WindowTitleBarActionsAlign, type WindowTitleBarProps, applySiaTheme, buildFlatTree, createCellSelectionPlugin, createColumnSettingPlugin, createColumnTransformPlugin, createEditablePlugin, createExportPlugin, createFilterPlugin, createHighlightPlugin, createIndexPlugin, createLocalStorageTableSettingsAdapter, createPaginationPlugin, createResizePlugin, createRowSpanPlugin, createSelectionPlugin, createSortPlugin, createSummaryPlugin, createToolbarPlugin, createTreePlugin, openSelectModal, useForm };
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { HTMLAttributes, ReactNode, CSSProperties, ElementType, FormHTMLAttribut
|
|
|
5
5
|
import { C as ControlSize, I as InputPlaceholderMode, a as ControlStatus } from './shared-Bx4B28Wh.js';
|
|
6
6
|
import { O as OverlayContainer, a as OverlayApiHandle, M as ModalOpenConfig, S as SelectOption, b as SelectChangeValue, c as SelectProps, d as ModalActionResult, B as ButtonProps, e as ButtonSize } from './Select-CCrPqULn.js';
|
|
7
7
|
export { f as Button, g as ButtonVariant, h as Modal, i as ModalProps, j as ModalType, k as Select, l as SelectMode, m as SelectValue } from './Select-CCrPqULn.js';
|
|
8
|
-
export { D as DatePicker, a as DatePickerDisabledInfo, b as DatePickerPreset, c as DatePickerProps, d as DatePickerShowTime, e as DatePickerType, f as DatePickerValue, g as DateRangePickerPreset, h as DateRangePickerProps, S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-
|
|
8
|
+
export { D as DatePicker, a as DatePickerDisabledInfo, b as DatePickerPreset, c as DatePickerProps, d as DatePickerShowTime, e as DatePickerType, f as DatePickerValue, g as DateRangePickerPreset, h as DateRangePickerProps, S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-B1ZWIHoe.js';
|
|
9
9
|
export { RichTextContent, RichTextContentFormat, RichTextContentProps, RichTextEditor, RichTextEditorProps, RichTextImagePasteHandler, RichTextToolbar } from './rich-text-editor.js';
|
|
10
10
|
export { MarkdownEditor, MarkdownEditorMode, MarkdownEditorProps } from './markdown-editor.js';
|
|
11
11
|
import * as Monaco from 'monaco-editor';
|
|
@@ -1836,6 +1836,15 @@ type TableFixed = "left" | "right";
|
|
|
1836
1836
|
type TableAlign = "left" | "center" | "right";
|
|
1837
1837
|
/** 表格行高和字号的尺寸等级。 */
|
|
1838
1838
|
type TableSize = "small" | "medium" | "large";
|
|
1839
|
+
/** Canvas 单元格的绘制内容,不创建 React 子树。 */
|
|
1840
|
+
interface TableCanvasCell {
|
|
1841
|
+
/** 单行显示文本;超出列宽时自动省略。 */
|
|
1842
|
+
text: string;
|
|
1843
|
+
/** 文本颜色;默认使用表格主题文字色。 */
|
|
1844
|
+
color?: string;
|
|
1845
|
+
/** 标签背景色;设置后以圆角标签绘制,未设置时绘制普通文本。 */
|
|
1846
|
+
background?: string;
|
|
1847
|
+
}
|
|
1839
1848
|
/** 经过表格插件处理的行数据及其层级和索引信息。 */
|
|
1840
1849
|
interface TableRow<T> {
|
|
1841
1850
|
/** 唯一标识;同一集合内应保持唯一且稳定,用于定位、渲染和状态关联。 */
|
|
@@ -1927,6 +1936,8 @@ interface TableColumn<T = Record<string, unknown>> {
|
|
|
1927
1936
|
children?: readonly TableColumn<T>[];
|
|
1928
1937
|
/** 自定义数据单元格内容,接收该列的值、行数据和单元格上下文。 */
|
|
1929
1938
|
render?: (value: unknown, record: T, index: number, info: TableCellRenderInfo<T>) => ReactNode;
|
|
1939
|
+
/** Canvas 模式的纯绘制回调;返回 null 不绘制内容。未提供时,普通值直接绘制,自定义 render 仍以可见区域内的 Sia/React 组件显示。 */
|
|
1940
|
+
canvasRender?: (value: unknown, record: T, index: number, info: TableCellRenderInfo<T>) => TableCanvasCell | null;
|
|
1930
1941
|
/** 自定义列头内容,接收当前列及插件上下文;外层保持单行省略,悬停提示从 title 提取文本,无法提取时回退到 name 或 key。 */
|
|
1931
1942
|
renderHeader?: (column: TableColumn<T>, context: TablePluginContext<T, any>) => ReactNode;
|
|
1932
1943
|
/** 数据单元格的 CSS 类名,也可按单元格计算。 */
|
|
@@ -2018,7 +2029,7 @@ interface TablePlugin<T, S = unknown, Api = unknown> {
|
|
|
2018
2029
|
id: string;
|
|
2019
2030
|
/** 排序位置或排序方向。 */
|
|
2020
2031
|
order?: number;
|
|
2021
|
-
/**
|
|
2032
|
+
/** 是否禁用虚拟渲染;仅在实际展示行数不超过 100 时生效,超过 100 行由表格强制启用。 */
|
|
2022
2033
|
disableVirtual?: boolean;
|
|
2023
2034
|
/** 插件或功能初始化时的状态。 */
|
|
2024
2035
|
initialState?: S | (() => S);
|
|
@@ -2117,9 +2128,11 @@ interface TableProps<T extends Record<string, unknown> = Record<string, unknown>
|
|
|
2117
2128
|
toolbarBordered?: boolean;
|
|
2118
2129
|
/** 是否显示隔行背景。 */
|
|
2119
2130
|
striped?: boolean;
|
|
2120
|
-
/**
|
|
2131
|
+
/** 是否启用窗口化渲染;未指定时按 virtualThreshold 判断。筛选、分页及树展开后的实际展示行数超过 100 时强制启用,优先于 false 和插件的 disableVirtual。 */
|
|
2121
2132
|
virtual?: boolean;
|
|
2122
|
-
/**
|
|
2133
|
+
/** 内容渲染方式,默认 dom;canvas 使用画布绘制文本,并保留可见交互组件及 DOM 单元格语义。Canvas 强制固定行高和行虚拟化;不支持虚拟化的插件自动回退 DOM。 */
|
|
2134
|
+
renderMode?: "dom" | "canvas";
|
|
2135
|
+
/** 自动启用虚拟滚动的展示行数阈值(含该值),默认 100;仅在未指定 virtual 时使用,实际展示超过 100 行始终强制启用。 */
|
|
2123
2136
|
virtualThreshold?: number;
|
|
2124
2137
|
/** 行高度,单位为 px,虚拟滚动用其计算行位置;默认随 size 取 small 28、medium 36、large 46。自定义内容应适配行高,避免撑高后导致虚拟滚动位置偏差。 */
|
|
2125
2138
|
rowHeight?: number;
|
|
@@ -2367,7 +2380,7 @@ interface TableRowSpanPluginOptions<T> {
|
|
|
2367
2380
|
columns?: readonly string[];
|
|
2368
2381
|
/** 自定义两个值的相等性判断。 */
|
|
2369
2382
|
equals?: (left: unknown, right: unknown, column: TableColumn<T>) => boolean;
|
|
2370
|
-
/**
|
|
2383
|
+
/** 是否禁用虚拟渲染,默认 true;仅在展示行数不超过 100 时生效,超过 100 行由表格强制启用。 */
|
|
2371
2384
|
disableVirtual?: boolean;
|
|
2372
2385
|
}
|
|
2373
2386
|
/** 创建表格跨行合并插件。将返回值加入 Table 的 plugins 后生效。 */
|
|
@@ -3161,4 +3174,4 @@ interface QueryFormProps<T extends FormValues = FormValues> extends Omit<FormPro
|
|
|
3161
3174
|
/** 可复用的业务查询表单;快捷查询的存储和结果数据由业务方管理。 */
|
|
3162
3175
|
declare function QueryForm<T extends FormValues = FormValues>({ fields, children, form: providedForm, onSearch, loading, fieldWidth, collapsible, collapsed: controlledCollapsed, defaultCollapsed, collapsedCount, onCollapsedChange, quickQueries, quickQuerySize, savedQueries, shortcutsLoading, onSaveQuery, onRemoveQuery, onError, searchText, resetText, saveText, resetSearch, actionsExtra, disabled, className, placeholderMode, onValuesChange, onFinishFailed, ...formProps }: QueryFormProps<T>): react.JSX.Element;
|
|
3163
3176
|
|
|
3164
|
-
export { Alert, type AlertProps, type AlertStatus, type AnyTablePlugin, BadgeProps, ButtonProps, ButtonSize, Cascader, type CascaderFieldNames, type CascaderOption, type CascaderProps, type CascaderValue, Checkbox, type CheckboxGroupProps, type CheckboxOption, type CheckboxProps, type CheckboxValue, Col, type ColProps, type ColSize, ColorPicker, type ColorPickerMode, type ColorPickerPreset, type ColorPickerProps, ControlSize, ControlStatus, DEFAULT_PAGE_SIZE_OPTIONS, Divider, type DividerProps, Drawer, type DrawerOpenConfig, type DrawerPlacement, type DrawerProps, type DrawerPush, type DrawerPushConfig, Editor, type EditorCommand, type EditorCompletionContext, type EditorCompletionItem, type EditorCompletionItemKind, type EditorCompletionProvider, type EditorContextMenuItem, type EditorHandle, type EditorKeyDownEvent, type EditorLanguage, type EditorMarker, type EditorProps, type EditorRange, type EditorSelectionChange, type EditorTheme, type FlatTreeNode, type FlatTreeOptions, Flex, type FlexProps, FloatingScrollbarProvider, type FloatingScrollbarProviderProps, Form, type FormErrorField, type FormInstance, type FormItemProps, type FormListField, type FormListOperation, type FormListProps, type FormProps, type FormRule, type FormValues, type GridBreakpoint, InputNumber, type InputNumberProps, InputPlaceholderMode, InputSelect, type InputSelectProps, type LayoutGap, Markdown, type MarkdownProps, ModalActionResult, ModalOpenConfig, type NamePath, OverlayApiHandle, Pagination, type PaginationProps, QueryForm, type QueryFormField, type QueryFormProps, type QueryFormSearchInfo, type QueryFormShortcut, Radio, type RadioGroupProps, type RadioOption, type RadioProps, type RadioValue, Row, type RowProps, SIA_THEME, SelectChangeValue, type SelectModalConfig, SelectOption, SelectProps, type SelectionOption, SelectionPanel, type SelectionPanelProps, type SelectionValue, type SiaThemeMode, Slider, type SliderMark, type SliderProps, type SliderValue, Space, type SpaceCompactProps, type SpaceProps, Splitter, type SplitterPanelProps, type SplitterProps, Switch, type SwitchProps, type SwitchVariant, Table, type TableAlign, type TableCellAddress, type TableCellRange, type TableCellRenderInfo, type TableCellSelectionApi, type TableCellSelectionPluginOptions, type TableColumn, type TableColumnSettingApi, type TableColumnSettingItem, type TableColumnSettingPluginOptions, type TableColumnTransformPluginOptions, type TableEditableApi, type TableEditableCellConfig, type TableEditableCellType, type TableEditablePluginOptions, type TableExportApi, type TableExportPluginOptions, type TableExportScope, type TableFilterApi, type TableFilterPluginOptions, type TableFilterValues, type TableFixed, type TableHighlightPluginOptions, type TableHighlightValue, type TableIndexPluginOptions, type TableKey, type TableMergeStickyConfig, type TablePageParams, type TablePaginationApi, type TablePaginationPluginOptions, type TablePlugin, type TablePluginCellProps, type TablePluginContext, type TablePluginEvent, type TableProps, type TableRef, type TableResizeApi, type TableResizePluginOptions, type TableRow, type TableRowSpanPluginOptions, type TableSelectedCell, type TableSelectionApi, type TableSelectionMode, type TableSelectionPluginOptions, type TableSettingsAdapter, type TableSettingsSnapshot, type TableSize, type TableSortApi, type TableSortInfo, type TableSortPluginOptions, type TableSummaryPluginOptions, type TableSummaryRow, type TableToolbarItem, type TableToolbarPluginOptions, type TableTreeApi, type TableTreePluginOptions, TagStatus, TextArea, type TextAreaProps, ThemeSwitch, type ThemeSwitchProps, TimePicker, type TimePickerProps, type TimeRangePickerProps, ToolPanel, type ToolPanelItem, type ToolPanelPlacement, type ToolPanelProps, TreeSelect, type TreeSelectNode, type TreeSelectProps, type TreeSelectValue, Treemap, type TreemapNode, type TreemapNodeClickInfo, type TreemapNodeKind, type TreemapProps, type WindowAction, type WindowActionHandler, type WindowControlAction, type WindowControlLabels, WindowControls, type WindowControlsProps, WindowFrame, type WindowFrameProps, WindowTitleBar, type WindowTitleBarActionsAlign, type WindowTitleBarProps, applySiaTheme, buildFlatTree, createCellSelectionPlugin, createColumnSettingPlugin, createColumnTransformPlugin, createEditablePlugin, createExportPlugin, createFilterPlugin, createHighlightPlugin, createIndexPlugin, createLocalStorageTableSettingsAdapter, createPaginationPlugin, createResizePlugin, createRowSpanPlugin, createSelectionPlugin, createSortPlugin, createSummaryPlugin, createToolbarPlugin, createTreePlugin, openSelectModal, useForm };
|
|
3177
|
+
export { Alert, type AlertProps, type AlertStatus, type AnyTablePlugin, BadgeProps, ButtonProps, ButtonSize, Cascader, type CascaderFieldNames, type CascaderOption, type CascaderProps, type CascaderValue, Checkbox, type CheckboxGroupProps, type CheckboxOption, type CheckboxProps, type CheckboxValue, Col, type ColProps, type ColSize, ColorPicker, type ColorPickerMode, type ColorPickerPreset, type ColorPickerProps, ControlSize, ControlStatus, DEFAULT_PAGE_SIZE_OPTIONS, Divider, type DividerProps, Drawer, type DrawerOpenConfig, type DrawerPlacement, type DrawerProps, type DrawerPush, type DrawerPushConfig, Editor, type EditorCommand, type EditorCompletionContext, type EditorCompletionItem, type EditorCompletionItemKind, type EditorCompletionProvider, type EditorContextMenuItem, type EditorHandle, type EditorKeyDownEvent, type EditorLanguage, type EditorMarker, type EditorProps, type EditorRange, type EditorSelectionChange, type EditorTheme, type FlatTreeNode, type FlatTreeOptions, Flex, type FlexProps, FloatingScrollbarProvider, type FloatingScrollbarProviderProps, Form, type FormErrorField, type FormInstance, type FormItemProps, type FormListField, type FormListOperation, type FormListProps, type FormProps, type FormRule, type FormValues, type GridBreakpoint, InputNumber, type InputNumberProps, InputPlaceholderMode, InputSelect, type InputSelectProps, type LayoutGap, Markdown, type MarkdownProps, ModalActionResult, ModalOpenConfig, type NamePath, OverlayApiHandle, Pagination, type PaginationProps, QueryForm, type QueryFormField, type QueryFormProps, type QueryFormSearchInfo, type QueryFormShortcut, Radio, type RadioGroupProps, type RadioOption, type RadioProps, type RadioValue, Row, type RowProps, SIA_THEME, SelectChangeValue, type SelectModalConfig, SelectOption, SelectProps, type SelectionOption, SelectionPanel, type SelectionPanelProps, type SelectionValue, type SiaThemeMode, Slider, type SliderMark, type SliderProps, type SliderValue, Space, type SpaceCompactProps, type SpaceProps, Splitter, type SplitterPanelProps, type SplitterProps, Switch, type SwitchProps, type SwitchVariant, Table, type TableAlign, type TableCanvasCell, type TableCellAddress, type TableCellRange, type TableCellRenderInfo, type TableCellSelectionApi, type TableCellSelectionPluginOptions, type TableColumn, type TableColumnSettingApi, type TableColumnSettingItem, type TableColumnSettingPluginOptions, type TableColumnTransformPluginOptions, type TableEditableApi, type TableEditableCellConfig, type TableEditableCellType, type TableEditablePluginOptions, type TableExportApi, type TableExportPluginOptions, type TableExportScope, type TableFilterApi, type TableFilterPluginOptions, type TableFilterValues, type TableFixed, type TableHighlightPluginOptions, type TableHighlightValue, type TableIndexPluginOptions, type TableKey, type TableMergeStickyConfig, type TablePageParams, type TablePaginationApi, type TablePaginationPluginOptions, type TablePlugin, type TablePluginCellProps, type TablePluginContext, type TablePluginEvent, type TableProps, type TableRef, type TableResizeApi, type TableResizePluginOptions, type TableRow, type TableRowSpanPluginOptions, type TableSelectedCell, type TableSelectionApi, type TableSelectionMode, type TableSelectionPluginOptions, type TableSettingsAdapter, type TableSettingsSnapshot, type TableSize, type TableSortApi, type TableSortInfo, type TableSortPluginOptions, type TableSummaryPluginOptions, type TableSummaryRow, type TableToolbarItem, type TableToolbarPluginOptions, type TableTreeApi, type TableTreePluginOptions, TagStatus, TextArea, type TextAreaProps, ThemeSwitch, type ThemeSwitchProps, TimePicker, type TimePickerProps, type TimeRangePickerProps, ToolPanel, type ToolPanelItem, type ToolPanelPlacement, type ToolPanelProps, TreeSelect, type TreeSelectNode, type TreeSelectProps, type TreeSelectValue, Treemap, type TreemapNode, type TreemapNodeClickInfo, type TreemapNodeKind, type TreemapProps, type WindowAction, type WindowActionHandler, type WindowControlAction, type WindowControlLabels, WindowControls, type WindowControlsProps, WindowFrame, type WindowFrameProps, WindowTitleBar, type WindowTitleBarActionsAlign, type WindowTitleBarProps, applySiaTheme, buildFlatTree, createCellSelectionPlugin, createColumnSettingPlugin, createColumnTransformPlugin, createEditablePlugin, createExportPlugin, createFilterPlugin, createHighlightPlugin, createIndexPlugin, createLocalStorageTableSettingsAdapter, createPaginationPlugin, createResizePlugin, createRowSpanPlugin, createSelectionPlugin, createSortPlugin, createSummaryPlugin, createToolbarPlugin, createTreePlugin, openSelectModal, useForm };
|