@3sc/common-component 0.0.308 → 0.0.309

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/dist/index.es.js CHANGED
@@ -43463,20 +43463,20 @@ const Hc = {
43463
43463
  })());
43464
43464
  }
43465
43465
  a = (d == null ? void 0 : d.columns) ?? a ?? Cy({ definitions: i });
43466
- const f = a.reduce((x, w) => (x[w.id] = w, x), {}), p = l.reduce((x, w) => (x[w.id] = w, x), {}), h = [];
43466
+ const f = a.reduce((x, w) => (x[w.key] = w, x), {}), p = l.reduce((x, w) => (x[w.key] = w, x), {}), h = [];
43467
43467
  for (const x of i) {
43468
- const w = f[x.id] || {}, C = p[x.id] || {};
43468
+ const w = f[x.key] || {}, C = p[x.key] || {};
43469
43469
  let O = {
43470
43470
  ...x,
43471
43471
  ...w,
43472
43472
  ...C
43473
43473
  };
43474
43474
  if ((b = x.children) != null && b.length) {
43475
- const v = w.children || [], k = C.children || [];
43476
- O.children = x.children.map((E, P) => ({
43475
+ const v = (w.children || []).reduce((E, P) => (P != null && P.key && (E[P.key] = P), E), {}), k = (C.children || []).reduce((E, P) => (P != null && P.key && (E[P.key] = P), E), {});
43476
+ O.children = x.children.map((E) => ({
43477
43477
  ...E,
43478
- ...v[P],
43479
- ...k[P]
43478
+ ...v[E.key],
43479
+ ...k[E.key]
43480
43480
  }));
43481
43481
  }
43482
43482
  h.push(O);