@wordrhyme/auto-crud 1.21.0 → 1.21.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 +5 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1814,6 +1814,11 @@ This provides a real **separate single-row** TanStack context, not the original
|
|
|
1814
1814
|
list's pagination, selection or row index. Reused custom cells retain their own
|
|
1815
1815
|
truncation and interaction behavior.
|
|
1816
1816
|
|
|
1817
|
+
When `fields[field].table.component` declares a component and the caller resolves it
|
|
1818
|
+
into a `table.overrides[field].cell`, that cell is preserved alongside `display`,
|
|
1819
|
+
`options` and `dataSource`. Without a resolved cell, default presentation still
|
|
1820
|
+
applies. Fields without `table.component` keep their existing presentation priority.
|
|
1821
|
+
|
|
1817
1822
|
### 状态徽标颜色
|
|
1818
1823
|
|
|
1819
1824
|
对于 `table.display: "badge"`,标量字段的 `table.options` 可设置 `badgeTone`,支持 `neutral`、`success`、`warning`、`info`。徽标保留文字标签并附带装饰圆点,未配置颜色时沿用原有徽标样式,纯文本展示不受影响。业务状态与颜色的对应关系由调用方配置。
|
package/dist/index.cjs
CHANGED
|
@@ -10194,7 +10194,7 @@ function buildTableOverrides(fields, legacyOverrides, dynamicFilterState, dynami
|
|
|
10194
10194
|
...tableProps
|
|
10195
10195
|
};
|
|
10196
10196
|
const hasTableLabels = config.table.options !== void 0 || config.table.dataSource !== void 0;
|
|
10197
|
-
if (display && display !== "auto" || hasTableLabels) {
|
|
10197
|
+
if (!(typeof config.table.component === "string" && result[key]?.cell !== void 0) && (display && display !== "auto" || hasTableLabels)) {
|
|
10198
10198
|
const options = tableConfig?.dataSource ? mergeFieldOptions(dynamicResolveOptions, presentationOptions) : presentationOptions ?? mergedSharedDynamicOptions;
|
|
10199
10199
|
result[key] = {
|
|
10200
10200
|
...result[key],
|
package/dist/index.d.cts
CHANGED
|
@@ -1880,7 +1880,7 @@ interface Field {
|
|
|
1880
1880
|
options?: FieldOption[];
|
|
1881
1881
|
/** 仅用于表格展示的动态值标签源 */
|
|
1882
1882
|
dataSource?: AutoCrudDataSourceConfig;
|
|
1883
|
-
/**
|
|
1883
|
+
/** 声明式展示模式;覆盖普通 cell,保留调用方已解析的 table.component 单元格 */
|
|
1884
1884
|
display?: FieldTableDisplay;
|
|
1885
1885
|
/** 该列的类名;th 应用于表头,td 应用于正文单元格 */
|
|
1886
1886
|
classNames?: ColumnMeta<unknown, unknown>['classNames'];
|
package/dist/index.d.ts
CHANGED
|
@@ -1880,7 +1880,7 @@ interface Field {
|
|
|
1880
1880
|
options?: FieldOption[];
|
|
1881
1881
|
/** 仅用于表格展示的动态值标签源 */
|
|
1882
1882
|
dataSource?: AutoCrudDataSourceConfig;
|
|
1883
|
-
/**
|
|
1883
|
+
/** 声明式展示模式;覆盖普通 cell,保留调用方已解析的 table.component 单元格 */
|
|
1884
1884
|
display?: FieldTableDisplay;
|
|
1885
1885
|
/** 该列的类名;th 应用于表头,td 应用于正文单元格 */
|
|
1886
1886
|
classNames?: ColumnMeta<unknown, unknown>['classNames'];
|
package/dist/index.js
CHANGED
|
@@ -10178,7 +10178,7 @@ function buildTableOverrides(fields, legacyOverrides, dynamicFilterState, dynami
|
|
|
10178
10178
|
...tableProps
|
|
10179
10179
|
};
|
|
10180
10180
|
const hasTableLabels = config.table.options !== void 0 || config.table.dataSource !== void 0;
|
|
10181
|
-
if (display && display !== "auto" || hasTableLabels) {
|
|
10181
|
+
if (!(typeof config.table.component === "string" && result[key]?.cell !== void 0) && (display && display !== "auto" || hasTableLabels)) {
|
|
10182
10182
|
const options = tableConfig?.dataSource ? mergeFieldOptions(dynamicResolveOptions, presentationOptions) : presentationOptions ?? mergedSharedDynamicOptions;
|
|
10183
10183
|
result[key] = {
|
|
10184
10184
|
...result[key],
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordrhyme/auto-crud",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.21.
|
|
4
|
+
"version": "1.21.1",
|
|
5
5
|
"description": "Schema-first CRUD components with auto-generated tables and forms",
|
|
6
6
|
"author": "wordrhyme",
|
|
7
7
|
"license": "MIT",
|
|
@@ -94,8 +94,8 @@
|
|
|
94
94
|
"tsdown": "^0.15.12",
|
|
95
95
|
"typescript": "^5.9.3",
|
|
96
96
|
"vitest": "^3.2.4",
|
|
97
|
-
"@internal/prettier-config": "0.0.1",
|
|
98
97
|
"@internal/eslint-config": "0.3.0",
|
|
98
|
+
"@internal/prettier-config": "0.0.1",
|
|
99
99
|
"@internal/tsconfig": "0.1.0",
|
|
100
100
|
"@internal/tsdown-config": "0.1.0",
|
|
101
101
|
"@internal/vitest-config": "0.1.0"
|