@baishuyun/ai-design 2.0.0 → 2.0.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/.turbo/turbo-build.log +0 -0
- package/CHANGELOG.md +18 -0
- package/dist/ai-design.js +36 -31
- 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/dist/src/components/bs-entry-select/build-tree.d.ts.map +1 -1
- package/package.json +6 -6
- package/src/components/bs-entry-select/build-tree.ts +12 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-tree.d.ts","sourceRoot":"","sources":["../../../../src/components/bs-entry-select/build-tree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"build-tree.d.ts","sourceRoot":"","sources":["../../../../src/components/bs-entry-select/build-tree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAmB,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAClF,OAAO,KAAK,EAAE,aAAa,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAExE,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAOhD,CAAC;AAEF,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAErD;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,CAI7D;AAED,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,UAAU,EACrB,WAAW,EAAE,MAAM,GAClB,aAAa,EAAE,CAmFjB;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,aAAa,EAAE,EAAE,WAAW,EAAE,MAAM,GAAG,aAAa,EAAE,CAoB/F;AAED,wBAAgB,YAAY,CAC1B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,EACtC,OAAO,EAAE,MAAM,EACf,YAAY,CAAC,EAAE,MAAM,GACpB,yBAAyB,GAAG,IAAI,CAWlC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@baishuyun/ai-design",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.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/ai-feat-utils": "2.0.2",
|
|
64
|
+
"@baishuyun/types": "3.0.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/
|
|
87
|
-
"@baishuyun/
|
|
88
|
-
"@baishuyun/
|
|
86
|
+
"@baishuyun/tailwind-config": "3.0.2",
|
|
87
|
+
"@baishuyun/typescript-config": "2.0.2",
|
|
88
|
+
"@baishuyun/types": "3.0.2"
|
|
89
89
|
},
|
|
90
90
|
"keywords": [],
|
|
91
91
|
"author": "",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IAppDetail, IEntryDetail } from '@baishuyun/types';
|
|
1
|
+
import type { IAppDetail, IEntryAliasItem, IEntryDetail } from '@baishuyun/types';
|
|
2
2
|
import type { EntryTreeItem, BsEntrySelectChangeResult } from './types';
|
|
3
3
|
|
|
4
4
|
export const DEPTH_PADDING: Record<number, string> = {
|
|
@@ -24,7 +24,16 @@ export function buildEntryTreeFromAliasMap(
|
|
|
24
24
|
appDetail: IAppDetail,
|
|
25
25
|
searchQuery: string
|
|
26
26
|
): EntryTreeItem[] {
|
|
27
|
-
const { entryIdAliasMap, entryMap } = appDetail;
|
|
27
|
+
const { entryIdAliasMap: originMap, entryMap } = appDetail;
|
|
28
|
+
|
|
29
|
+
const entryIdAliasMap: Record<string, IEntryAliasItem> = {
|
|
30
|
+
// ...originMap,
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
for (const [_, v] of Object.entries(originMap ?? {})) {
|
|
34
|
+
entryIdAliasMap[v.formId as string] = v;
|
|
35
|
+
}
|
|
36
|
+
|
|
28
37
|
const aliasKeys = Object.keys(entryIdAliasMap);
|
|
29
38
|
if (aliasKeys.length === 0) return [];
|
|
30
39
|
|
|
@@ -35,7 +44,7 @@ export function buildEntryTreeFromAliasMap(
|
|
|
35
44
|
if (!childrenByParent.has(parentKey)) {
|
|
36
45
|
childrenByParent.set(parentKey, []);
|
|
37
46
|
}
|
|
38
|
-
childrenByParent.get(parentKey)!.push(
|
|
47
|
+
childrenByParent.get(parentKey)!.push(aliasItem.formId);
|
|
39
48
|
}
|
|
40
49
|
|
|
41
50
|
// Root parents: any parent value that is not itself a key in entryIdAliasMap.
|