@baishuyun/ai-design 1.1.0 → 1.1.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/.claude/settings.local.json +7 -0
- package/.turbo/turbo-build.log +5 -5
- package/CHANGELOG.md +20 -0
- package/dist/ai-design.js +2 -2
- package/dist/ai-design.js.map +1 -1
- package/dist/ai-design.umd.cjs +1 -1
- package/dist/ai-design.umd.cjs.map +1 -1
- package/package.json +6 -6
- package/src/components/output-config-editor.tsx +5 -5
- package/src/stories/OutputConfigEditor.stories.tsx +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@baishuyun/ai-design",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "AI 功能 UI 组件库 - 所有 AI 功能的 UI 表现唯一真相来源",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
"tw-animate-css": "^1.4.0",
|
|
61
61
|
"vaul": "^1.1.2",
|
|
62
62
|
"zod": "^4.1.13",
|
|
63
|
-
"@baishuyun/
|
|
64
|
-
"@baishuyun/
|
|
63
|
+
"@baishuyun/types": "2.1.2",
|
|
64
|
+
"@baishuyun/ai-feat-utils": "1.1.2"
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|
|
67
67
|
"react": "^19.0.0",
|
|
@@ -83,9 +83,9 @@
|
|
|
83
83
|
"typescript": "^5.5.0",
|
|
84
84
|
"vite": "^5.1.4",
|
|
85
85
|
"vite-plugin-dts": "^4.5.4",
|
|
86
|
-
"@baishuyun/tailwind-config": "2.1.
|
|
87
|
-
"@baishuyun/types": "2.1.
|
|
88
|
-
"@baishuyun/typescript-config": "1.1.
|
|
86
|
+
"@baishuyun/tailwind-config": "2.1.2",
|
|
87
|
+
"@baishuyun/types": "2.1.2",
|
|
88
|
+
"@baishuyun/typescript-config": "1.1.2"
|
|
89
89
|
},
|
|
90
90
|
"keywords": [],
|
|
91
91
|
"author": "",
|
|
@@ -65,8 +65,8 @@ function fieldsToOptions(fields: IField[]): OutputFieldOption[] {
|
|
|
65
65
|
fieldDesc: f.label,
|
|
66
66
|
type: f.widget.type,
|
|
67
67
|
children: subformItems?.length ? subformItems.map(s => ({
|
|
68
|
-
fieldName: s.widget.widgetName
|
|
69
|
-
fieldDesc: s.label
|
|
68
|
+
fieldName: `${f.widget.widgetName}.${s.widget.widgetName}`,
|
|
69
|
+
fieldDesc: `${s.label}`,
|
|
70
70
|
type: s.widget.type,
|
|
71
71
|
})) : undefined,
|
|
72
72
|
};
|
|
@@ -163,7 +163,7 @@ export function OutputConfigEditor({ value, onChange, sourceFields, targetFields
|
|
|
163
163
|
|
|
164
164
|
const flatSourceFields = flattenSourceFields(sourceOptions);
|
|
165
165
|
const filteredSourceFields = flatSourceFields.filter(
|
|
166
|
-
f => matchSearch(f.fieldDesc) || matchSearch(f.fieldName)
|
|
166
|
+
(f) => (matchSearch(f.fieldDesc) || matchSearch(f.fieldName)) && f.type !== 'subform'
|
|
167
167
|
);
|
|
168
168
|
|
|
169
169
|
const filteredTargetFields = filterFields(targetOptions);
|
|
@@ -360,7 +360,7 @@ export function OutputConfigEditor({ value, onChange, sourceFields, targetFields
|
|
|
360
360
|
'flex items-center w-full px-[10px] py-[7px] h-[34px] rounded-[4px]',
|
|
361
361
|
'text-[14px] text-[#030303] leading-normal',
|
|
362
362
|
'hover:bg-[#EFF0F6] bg-transparent border-0 cursor-pointer',
|
|
363
|
-
item.targetField.
|
|
363
|
+
item.targetField.fieldName === field.fieldName && 'bg-[#EFF0F6] text-[#0265ff]',
|
|
364
364
|
transCls,
|
|
365
365
|
)}
|
|
366
366
|
>
|
|
@@ -376,7 +376,7 @@ export function OutputConfigEditor({ value, onChange, sourceFields, targetFields
|
|
|
376
376
|
'flex items-center w-full pl-[34px] pr-[10px] py-[7px] h-[34px] rounded-[4px]',
|
|
377
377
|
'text-[14px] text-[#030303] leading-normal',
|
|
378
378
|
'hover:bg-[#EFF0F6] bg-transparent border-0 cursor-pointer',
|
|
379
|
-
item.targetField.
|
|
379
|
+
item.targetField.fieldName === child.fieldName && 'bg-[#EFF0F6] text-[#0265ff]',
|
|
380
380
|
transCls,
|
|
381
381
|
)}
|
|
382
382
|
>
|
|
@@ -40,7 +40,7 @@ const sourceFields: OutputParam[] = [
|
|
|
40
40
|
];
|
|
41
41
|
|
|
42
42
|
const targetFields: IField[] = [
|
|
43
|
-
{ label: '
|
|
43
|
+
{ label: '姓名', widget: { type: 'text', widgetName: 'className', value: '' } },
|
|
44
44
|
{ label: '学生人数', widget: { type: 'number', widgetName: 'studentCount', value: '' } },
|
|
45
45
|
{ label: '教师姓名', widget: { type: 'text', widgetName: 'teacherName', value: '' } },
|
|
46
46
|
{
|