@agile-team/mach-table 0.40.2 → 0.41.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/README.md +2 -2
- package/dist/adapter.d.cts +2 -2
- package/dist/adapter.d.ts +2 -2
- package/dist/analysis.d.cts +2 -2
- package/dist/analysis.d.ts +2 -2
- package/dist/{colDef-BiwNRXwf.d.cts → colDef-CrzNjIXe.d.cts} +2 -2
- package/dist/{colDef-BiwNRXwf.d.ts → colDef-CrzNjIXe.d.ts} +2 -2
- package/dist/{configuration-ZGE-MtGs.d.ts → configuration-BOLDHb5S.d.ts} +1 -1
- package/dist/{configuration-D57x5Ovu.d.cts → configuration-DUubqwfv.d.cts} +1 -1
- package/dist/import.d.cts +1 -1
- package/dist/import.d.ts +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +4 -4
- package/dist/mach-table.css +1 -1
- package/dist/multi-range.d.cts +1 -1
- package/dist/multi-range.d.ts +1 -1
- package/dist/ordering.d.cts +1 -1
- package/dist/ordering.d.ts +1 -1
- package/dist/preferences.d.cts +1 -1
- package/dist/preferences.d.ts +1 -1
- package/dist/server-side.d.cts +1 -1
- package/dist/server-side.d.ts +1 -1
- package/dist/{shared-C9SPn-Hh.d.ts → shared-CEihWWC5.d.ts} +1 -1
- package/dist/{shared-TcluaEBe.d.cts → shared-DBW62DHt.d.cts} +1 -1
- package/dist/workbench.d.cts +3 -3
- package/dist/workbench.d.ts +3 -3
- package/dist/worker.d.cts +2 -2
- package/dist/worker.d.ts +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# @agile-team/mach-table
|
|
6
6
|
|
|
7
|
-
MachTable 0.
|
|
7
|
+
MachTable 0.41.1 的框架无关 TypeScript Core,零运行时依赖。提供行列双虚拟化、编辑、树与分组、随机访问远程数据和区段隔离状态持久化。裸 `createGrid()` 保留原有低层默认值:分页开启,序号按 `rowNumber: true` 启用。通过 `createMachTablePreset("list" | "detail", options)` 可显式使用与适配器一致的场景。
|
|
8
8
|
|
|
9
9
|
`list` 提供序号、列筛选、列设置与列宽调整;`detail` 保留序号、默认只读和纯文字表头,关闭分页并按内容收起,表体超过 330px 后使用虚拟滚动。表内筛选无匹配时,默认空态提供清除筛选;业务自定义空态优先。
|
|
10
10
|
|
|
@@ -173,7 +173,7 @@ const columns = [
|
|
|
173
173
|
|
|
174
174
|
`status` 复用主题标签,支持 `success/warning/danger/info/neutral` 及 CSS 颜色;未知代码保持中性,`0/false` 保留。formatter 的文字可参与默认语义匹配;显式 renderer 优先。状态配置只控制展示,导出继续遵循原有列值政策。
|
|
175
175
|
|
|
176
|
-
|
|
176
|
+
默认 `columnLayout: "auto"`:自动业务列空间充足时按表头与内容基准比例铺满,列多时保留基准宽度并横向滚动;序号、多选和操作等结构列保持紧凑。显式 `normal` 保留按内容呈现,`fit` 保留整表比例分配。显式 `width` 和拖动后的宽度保持用户偏好;`autoWidth: false` 保留原默认 150px。显式选择 `columnLayout: "fit"` 时仍按首选宽度比例铺满,360px 限制的是内容首选宽度,实际铺满仍遵循显式 minWidth/maxWidth;配置 `flex` 则主动允许本列吸收余量。手动调宽只改变目标列,其他列保持当前宽度及自动模式;纯文本缩窄后保留开头并在尾部省略,完整内容可通过提示查看,行背景持续覆盖中心可用区;容器实际宽度、列结构或测量内容变化时再重新分配。列状态恢复及主动 `columns.fit()` 不受自动默认上限限制。更新数据或刷新单元格会重新测量,普通布局刷新复用结果。
|
|
177
177
|
|
|
178
178
|
表头默认完整展示,不省略。初始布局、fit、列宽恢复、API、鼠标和 Alt+方向键统一以完整标题及排序/筛选/列工具控件为最小宽度;显式 width/minWidth/maxWidth 不能把标题压窄,空间不足时表格内部横向滚动。360px 上限仅作用于数据内容的首选宽度,不截断表头。复杂自定义表头请显式提供 minWidth。
|
|
179
179
|
|
package/dist/adapter.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as GridOptions, b as GridApi, k as GridEventType } from './colDef-
|
|
2
|
-
export { M as MachTableOptionExplanation, R as ResolvedMachTableConfig, a as ResolvedMachTableGridOptions, m as mergeMachTableConfig, n as normalizeMachTableConfig, r as resolveMachTableGridOptions } from './configuration-
|
|
1
|
+
import { c as GridOptions, b as GridApi, k as GridEventType } from './colDef-CrzNjIXe.cjs';
|
|
2
|
+
export { M as MachTableOptionExplanation, R as ResolvedMachTableConfig, a as ResolvedMachTableGridOptions, m as mergeMachTableConfig, n as normalizeMachTableConfig, r as resolveMachTableGridOptions } from './configuration-DUubqwfv.cjs';
|
|
3
3
|
|
|
4
4
|
/** Bounded structural comparison for small immutable config values, never row data. */
|
|
5
5
|
declare function equivalentConfigValue(left: unknown, right: unknown, depth?: number): boolean;
|
package/dist/adapter.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as GridOptions, b as GridApi, k as GridEventType } from './colDef-
|
|
2
|
-
export { M as MachTableOptionExplanation, R as ResolvedMachTableConfig, a as ResolvedMachTableGridOptions, m as mergeMachTableConfig, n as normalizeMachTableConfig, r as resolveMachTableGridOptions } from './configuration-
|
|
1
|
+
import { c as GridOptions, b as GridApi, k as GridEventType } from './colDef-CrzNjIXe.js';
|
|
2
|
+
export { M as MachTableOptionExplanation, R as ResolvedMachTableConfig, a as ResolvedMachTableGridOptions, m as mergeMachTableConfig, n as normalizeMachTableConfig, r as resolveMachTableGridOptions } from './configuration-BOLDHb5S.js';
|
|
3
3
|
|
|
4
4
|
/** Bounded structural comparison for small immutable config values, never row data. */
|
|
5
5
|
declare function equivalentConfigValue(left: unknown, right: unknown, depth?: number): boolean;
|
package/dist/analysis.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { W as WorkbenchOptions, a as WorkbenchHandle } from './shared-
|
|
2
|
-
import './colDef-
|
|
1
|
+
import { W as WorkbenchOptions, a as WorkbenchHandle } from './shared-DBW62DHt.cjs';
|
|
2
|
+
import './colDef-CrzNjIXe.cjs';
|
|
3
3
|
|
|
4
4
|
type PivotAggregate = "sum" | "count" | "avg" | "min" | "max";
|
|
5
5
|
type PivotDimension = string | number | boolean | null;
|
package/dist/analysis.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { W as WorkbenchOptions, a as WorkbenchHandle } from './shared-
|
|
2
|
-
import './colDef-
|
|
1
|
+
import { W as WorkbenchOptions, a as WorkbenchHandle } from './shared-CEihWWC5.js';
|
|
2
|
+
import './colDef-CrzNjIXe.js';
|
|
3
3
|
|
|
4
4
|
type PivotAggregate = "sum" | "count" | "avg" | "min" | "max";
|
|
5
5
|
type PivotDimension = string | number | boolean | null;
|
|
@@ -525,7 +525,7 @@ type EventHandlers<TData = any> = {
|
|
|
525
525
|
};
|
|
526
526
|
type RowSelectionMode = "none" | "single" | "multiple";
|
|
527
527
|
type GridSize = "compact" | "normal" | "large";
|
|
528
|
-
type ColumnLayoutMode = "normal" | "fit";
|
|
528
|
+
type ColumnLayoutMode = "auto" | "normal" | "fit";
|
|
529
529
|
type DomLayoutMode = "normal" | "autoHeight";
|
|
530
530
|
type ThemeMode = "light" | "dark" | "auto";
|
|
531
531
|
type GridEditType = "cell" | "fullRow";
|
|
@@ -626,7 +626,7 @@ interface GridOptions<TData = any> extends EventHandlers<TData> {
|
|
|
626
626
|
rowHeight?: number;
|
|
627
627
|
headerHeight?: number;
|
|
628
628
|
rowBuffer?: number;
|
|
629
|
-
/** `
|
|
629
|
+
/** 默认 `auto` 按内容基准比例扩张,空间不足保留横滚;`normal` 保留自然宽,`fit` 可按比例收缩。 */
|
|
630
630
|
columnLayout?: ColumnLayoutMode;
|
|
631
631
|
/** Enables pointer, double-click and Alt+Arrow column resizing. Disabled by default. */
|
|
632
632
|
enableColumnResize?: boolean;
|
|
@@ -525,7 +525,7 @@ type EventHandlers<TData = any> = {
|
|
|
525
525
|
};
|
|
526
526
|
type RowSelectionMode = "none" | "single" | "multiple";
|
|
527
527
|
type GridSize = "compact" | "normal" | "large";
|
|
528
|
-
type ColumnLayoutMode = "normal" | "fit";
|
|
528
|
+
type ColumnLayoutMode = "auto" | "normal" | "fit";
|
|
529
529
|
type DomLayoutMode = "normal" | "autoHeight";
|
|
530
530
|
type ThemeMode = "light" | "dark" | "auto";
|
|
531
531
|
type GridEditType = "cell" | "fullRow";
|
|
@@ -626,7 +626,7 @@ interface GridOptions<TData = any> extends EventHandlers<TData> {
|
|
|
626
626
|
rowHeight?: number;
|
|
627
627
|
headerHeight?: number;
|
|
628
628
|
rowBuffer?: number;
|
|
629
|
-
/** `
|
|
629
|
+
/** 默认 `auto` 按内容基准比例扩张,空间不足保留横滚;`normal` 保留自然宽,`fit` 可按比例收缩。 */
|
|
630
630
|
columnLayout?: ColumnLayoutMode;
|
|
631
631
|
/** Enables pointer, double-click and Alt+Arrow column resizing. Disabled by default. */
|
|
632
632
|
enableColumnResize?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as GridOptions, d as GridDataProcessor, C as ColDef, e as GridComponents } from './colDef-
|
|
1
|
+
import { c as GridOptions, d as GridDataProcessor, C as ColDef, e as GridComponents } from './colDef-CrzNjIXe.js';
|
|
2
2
|
|
|
3
3
|
type MachTablePresetSelection = string | readonly string[] | false;
|
|
4
4
|
type MachTableInstanceOptionKey = "rowData" | "columnDefs" | "datasource" | "loading" | "error" | "initialState" | "persistence" | "components" | "columnTypes";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as GridOptions, d as GridDataProcessor, C as ColDef, e as GridComponents } from './colDef-
|
|
1
|
+
import { c as GridOptions, d as GridDataProcessor, C as ColDef, e as GridComponents } from './colDef-CrzNjIXe.cjs';
|
|
2
2
|
|
|
3
3
|
type MachTablePresetSelection = string | readonly string[] | false;
|
|
4
4
|
type MachTableInstanceOptionKey = "rowData" | "columnDefs" | "datasource" | "loading" | "error" | "initialState" | "persistence" | "components" | "columnTypes";
|
package/dist/import.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as ImportMatrixOptions, b as GridApi } from './colDef-
|
|
1
|
+
import { I as ImportMatrixOptions, b as GridApi } from './colDef-CrzNjIXe.cjs';
|
|
2
2
|
|
|
3
3
|
interface ImportIssue {
|
|
4
4
|
/** Zero-based data-row index, excluding the header. -1 denotes the complete plan. */
|
package/dist/import.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as ImportMatrixOptions, b as GridApi } from './colDef-
|
|
1
|
+
import { I as ImportMatrixOptions, b as GridApi } from './colDef-CrzNjIXe.js';
|
|
2
2
|
|
|
3
3
|
interface ImportIssue {
|
|
4
4
|
/** Zero-based data-row index, excluding the header. -1 denotes the complete plan. */
|