@3sc/common-component 0.0.586 → 0.0.587

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.
@@ -30561,9 +30561,9 @@ const UD = Q(jf)(({ theme: e }) => ({
30561
30561
  async function JD(e) {
30562
30562
  switch (e.split("-")[0]) {
30563
30563
  case "tr":
30564
- return (await import("./tr-DAgjGztB.js")).tr;
30564
+ return (await import("./tr-CVmDXLZf.js")).tr;
30565
30565
  case "nl":
30566
- return (await import("./nl-DJhVGE01.js")).nl;
30566
+ return (await import("./nl-CUvDoRuI.js")).nl;
30567
30567
  default:
30568
30568
  return (await Promise.resolve().then(() => e4)).enUS;
30569
30569
  }
@@ -40648,26 +40648,35 @@ const J$ = ({
40648
40648
  } catch (r) {
40649
40649
  console.error("saveColumnSettings failed:", r);
40650
40650
  }
40651
- }, rB = async ({ groupBy: e, gridPath: t, baseUrl: n }) => {
40651
+ }, rB = async ({ groupBy: e, gridPath: t, baseUrl: n, childUniqueKey: r }) => {
40652
40652
  if (!(!t || !Array.isArray(e)))
40653
40653
  try {
40654
- const r = JSON.parse(localStorage.getItem(wn.SETTINGS)) ?? {
40654
+ const o = JSON.parse(localStorage.getItem(wn.SETTINGS)) ?? {
40655
40655
  platform: { theme: "light" }
40656
- }, o = t.split("/").filter(Boolean);
40657
- let s = r;
40658
- for (let a = 0; a < o.length; a++) {
40659
- const l = o[a];
40660
- if (a === o.length - 1) {
40661
- const c = s[l]?.groupBy;
40662
- if (Array.isArray(c) && JSON.stringify(c) === JSON.stringify(e) || !c && e.length === 0)
40656
+ }, s = t.split("/").filter(Boolean);
40657
+ let a = o;
40658
+ for (let l = 0; l < s.length; l++) {
40659
+ const c = s[l];
40660
+ if (l === s.length - 1) {
40661
+ const d = a[c]?.groupBy, u = r ? a[c]?.groupByBySnop?.[r] : null;
40662
+ if (r && Array.isArray(u) && JSON.stringify(u) === JSON.stringify(e) || !r && Array.isArray(d) && JSON.stringify(d) === JSON.stringify(e) || !d && e.length === 0)
40663
40663
  return;
40664
- s[l] = { ...s[l] ?? {}, groupBy: e };
40664
+ a[c] = {
40665
+ ...a[c] ?? {},
40666
+ groupBy: e,
40667
+ ...r ? {
40668
+ groupByBySnop: {
40669
+ ...a[c]?.groupByBySnop || {},
40670
+ [r]: e
40671
+ }
40672
+ } : {}
40673
+ };
40665
40674
  } else
40666
- s[l] = { ...s[l] ?? {} }, s = s[l];
40675
+ a[c] = { ...a[c] ?? {} }, a = a[c];
40667
40676
  }
40668
- localStorage.setItem(wn.SETTINGS, JSON.stringify(r)), n && await Ls({ baseUrl: n, payload: r });
40669
- } catch (r) {
40670
- console.error("saveGroupBySettings failed:", r);
40677
+ localStorage.setItem(wn.SETTINGS, JSON.stringify(o)), n && await Ls({ baseUrl: n, payload: o });
40678
+ } catch (o) {
40679
+ console.error("saveGroupBySettings failed:", o);
40671
40680
  }
40672
40681
  }, oB = (e) => {
40673
40682
  if (!e) return null;
@@ -41991,9 +42000,10 @@ function yL(e) {
41991
42000
  z !== S.current && (S.current = z, rB({
41992
42001
  groupBy: C,
41993
42002
  gridPath: c,
41994
- baseUrl: d
42003
+ baseUrl: d,
42004
+ childUniqueKey: l
41995
42005
  }));
41996
- }, [C, c, d]);
42006
+ }, [C, c, d, l]);
41997
42007
  const E = fe(l);
41998
42008
  E.current !== l && (E.current = l, w.current = b, x.current = null);
41999
42009
  const O = (z) => {
@@ -45129,4 +45139,4 @@ export {
45129
45139
  qB as t,
45130
45140
  xL as u
45131
45141
  };
45132
- //# sourceMappingURL=index-C0_QMaXz.js.map
45142
+ //# sourceMappingURL=index-DtcJG2c_.js.map