@realtek/core-theme 0.0.107 → 0.0.108

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
@@ -26519,16 +26519,19 @@ function Mx({ onLogout: e }) {
26519
26519
  return;
26520
26520
  }
26521
26521
  u(!0), Qv(x).then((e) => {
26522
- let t = Ox(e ?? []);
26523
- w(t.length > 0 ? t : _.flatMap((e) => y.map((t) => ({
26524
- key: `${e.menu_key ?? e.menu_name ?? e.menu_id}:${t.permissionId ?? t.permissionKey}`,
26525
- menuId: e.menu_id,
26526
- menuName: e.menu_name,
26527
- menuKey: e.menu_key,
26528
- permissionId: t.permissionId,
26529
- permissionKey: t.permissionKey,
26530
- accessValue: 0
26531
- }))));
26522
+ let t = Ox(e ?? []), n = new Map(t.map((e) => [`${kx(e)}:${String(e.permissionKey).toLowerCase()}`, e.accessValue]));
26523
+ w(_.flatMap((e) => y.map((t) => {
26524
+ let r = String(e.menu_key ?? e.menu_name ?? e.menu_id).trim().toLowerCase(), i = String(t.permissionKey).toLowerCase();
26525
+ return {
26526
+ key: `${e.menu_key ?? e.menu_name ?? e.menu_id}:${t.permissionId ?? t.permissionKey}`,
26527
+ menuId: e.menu_id,
26528
+ menuName: e.menu_name,
26529
+ menuKey: e.menu_key,
26530
+ permissionId: t.permissionId,
26531
+ permissionKey: t.permissionKey,
26532
+ accessValue: n.get(`${r}:${i}`) ?? 0
26533
+ };
26534
+ })));
26532
26535
  }).catch((e) => Y.error(e.message || "Unable to load role permissions")).finally(() => u(!1));
26533
26536
  });
26534
26537
  }, [