@baishuyun/ai-design 2.0.1 → 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.
Binary file
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @baishuyun/ai-design
2
2
 
3
+ ## 2.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - bump
8
+ - Updated dependencies
9
+ - @baishuyun/ai-feat-utils@2.0.2
10
+ - @baishuyun/types@3.0.2
11
+
3
12
  ## 2.0.1
4
13
 
5
14
  ### Patch Changes
package/dist/ai-design.js CHANGED
@@ -16182,44 +16182,49 @@ function b0(e) {
16182
16182
  return `node-icon icon-bsy-form${n} icon${n}-bsy-form-${e.icon}`;
16183
16183
  }
16184
16184
  function ol(e, t) {
16185
- const { entryIdAliasMap: n, entryMap: r } = e, o = Object.keys(n);
16186
- if (o.length === 0) return [];
16187
- const s = /* @__PURE__ */ new Map();
16188
- for (const f of o) {
16189
- const h = n[f].parent || "0";
16190
- s.has(h) || s.set(h, []), s.get(h).push(f);
16191
- }
16192
- const a = new Set(s.keys()), l = Array.from(a).filter((f) => f === "0" || !n[f]), c = t.toLowerCase().trim();
16193
- function u(f, p) {
16194
- const h = s.get(f) || [], x = [];
16195
- for (const m of h) {
16196
- const g = n[m], C = r[m] || null, y = (C == null ? void 0 : C.name) || m, b = (C == null ? void 0 : C.icon) || 0, w = g.type === "group", j = u(m, p + 1), k = !c || (y == null ? void 0 : y.toLowerCase().includes(c));
16197
- w ? (k || j.length > 0) && x.push({
16198
- id: m,
16199
- name: y,
16200
- icon: b,
16185
+ const { entryIdAliasMap: n, entryMap: r } = e, o = {
16186
+ // ...originMap,
16187
+ };
16188
+ for (const [p, h] of Object.entries(n != null ? n : {}))
16189
+ o[h.formId] = h;
16190
+ const s = Object.keys(o);
16191
+ if (s.length === 0) return [];
16192
+ const a = /* @__PURE__ */ new Map();
16193
+ for (const p of s) {
16194
+ const h = o[p], x = h.parent || "0";
16195
+ a.has(x) || a.set(x, []), a.get(x).push(h.formId);
16196
+ }
16197
+ const l = new Set(a.keys()), c = Array.from(l).filter((p) => p === "0" || !o[p]), u = t.toLowerCase().trim();
16198
+ function d(p, h) {
16199
+ const x = a.get(p) || [], m = [];
16200
+ for (const g of x) {
16201
+ const C = o[g], y = r[g] || null, b = (y == null ? void 0 : y.name) || g, w = (y == null ? void 0 : y.icon) || 0, j = C.type === "group", k = d(g, h + 1), S = !u || (b == null ? void 0 : b.toLowerCase().includes(u));
16202
+ j ? (S || k.length > 0) && m.push({
16203
+ id: g,
16204
+ name: b,
16205
+ icon: w,
16201
16206
  type: "group",
16202
- children: j,
16203
- depth: p,
16207
+ children: k,
16208
+ depth: h,
16204
16209
  isSelectable: !1,
16205
- entry: C
16206
- }) : k && x.push({
16207
- id: m,
16208
- name: y,
16209
- icon: b,
16210
- type: g.type,
16210
+ entry: y
16211
+ }) : S && m.push({
16212
+ id: g,
16213
+ name: b,
16214
+ icon: w,
16215
+ type: C.type,
16211
16216
  children: [],
16212
- depth: p,
16217
+ depth: h,
16213
16218
  isSelectable: !0,
16214
- entry: C
16219
+ entry: y
16215
16220
  });
16216
16221
  }
16217
- return x;
16222
+ return m;
16218
16223
  }
16219
- const d = [];
16220
- for (const f of l)
16221
- d.push(...u(f, 0));
16222
- return d;
16224
+ const f = [];
16225
+ for (const p of c)
16226
+ f.push(...d(p, 0));
16227
+ return f;
16223
16228
  }
16224
16229
  function w0(e, t) {
16225
16230
  const n = t.toLowerCase().trim();