@realtek/core-theme 0.0.90 → 0.0.92

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-lib/index.js CHANGED
@@ -4649,29 +4649,29 @@ async function Bc(e, t = 10, n = 0, r = {}) {
4649
4649
  module: e,
4650
4650
  limit: String(t),
4651
4651
  offset: String(n)
4652
- });
4653
- l.set("scope", i || "internal"), a && l.set("sort", a), s && l.set("sortDir", s);
4654
- let u = Kc(c.filter((e) => e?.field));
4655
- u.length && l.set("filters", JSON.stringify(u));
4656
- let d = await Mc(o, `/module-data-list?${l.toString()}`), f = Vc(d), p = f.some((e) => Wc(e)), m = f.some((e) => Gc(e));
4657
- if (p || m) try {
4658
- let { transformDiceResponseToInternalFormat: e } = await Promise.resolve().then(() => $r), r = e(d, d), a = r?.data?.data ?? [];
4652
+ }), u = String(i ?? "").trim();
4653
+ a && l.set("sort", a), s && l.set("sortDir", s);
4654
+ let d = Kc(c.filter((e) => e?.field));
4655
+ d.length && l.set("filters", JSON.stringify(d));
4656
+ let f = await Mc(o, `/module-data-list?${l.toString()}`), p = Vc(f), m = p.some((e) => Wc(e)), h = p.some((e) => Gc(e));
4657
+ if (m || h) try {
4658
+ let { transformDiceResponseToInternalFormat: e } = await Promise.resolve().then(() => $r), r = e(f, f), i = r?.data?.data ?? [];
4659
4659
  return {
4660
- items: a,
4661
- total: Uc(d, i || "internal") || Uc(r, i || "internal") || a.length,
4660
+ items: i,
4661
+ total: Uc(f, u) || Uc(r, u) || i.length,
4662
4662
  limit: t,
4663
4663
  offset: n,
4664
- tabs: r?.data?.tabs ?? d?.tabs ?? d?.data?.tabs ?? [],
4665
- fields: r?.data?.fields ?? d?.fields ?? d?.data?.fields ?? [],
4666
- tabField: r?.data?.tabField ?? d?.tabField ?? d?.data?.tabField ?? "",
4667
- actionRules: r?.data?.actionRules ?? d?.data?.actionRules ?? [],
4668
- actions: r?.data?.actions ?? d?.data?.actions ?? [],
4669
- columnActions: r?.data?.columnActions ?? d?.data?.columnActions ?? []
4664
+ tabs: r?.data?.tabs ?? f?.tabs ?? f?.data?.tabs ?? [],
4665
+ fields: r?.data?.fields ?? f?.fields ?? f?.data?.fields ?? [],
4666
+ tabField: r?.data?.tabField ?? f?.tabField ?? f?.data?.tabField ?? "",
4667
+ actionRules: r?.data?.actionRules ?? f?.data?.actionRules ?? [],
4668
+ actions: r?.data?.actions ?? f?.data?.actions ?? [],
4669
+ columnActions: r?.data?.columnActions ?? f?.data?.columnActions ?? []
4670
4670
  };
4671
4671
  } catch (e) {
4672
4672
  console.error("[getModuleDataList] Dice transformation failed:", e);
4673
4673
  }
4674
- return d;
4674
+ return f;
4675
4675
  }
4676
4676
  function Vc(e) {
4677
4677
  let t = e?.data ?? e, n = Array.isArray(t) ? t : t?.rows ?? t?.records ?? t?.items ?? t?.list ?? t?.data ?? e?.items ?? e?.records ?? [];