@ukpc-lib/react 0.3.39 → 0.3.41
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/components/index.cjs +27 -27
- package/dist/components/index.js +730 -699
- package/dist/{index.module-c6ce8374.js → index.module-b7d2d67a.js} +5765 -5796
- package/dist/{index.module-986c6dde.cjs → index.module-edaf6f24.cjs} +81 -81
- package/dist/share/index.cjs +1 -1
- package/dist/share/index.js +1 -1
- package/package.json +1 -1
- package/web-components-bundle/global-menu/index.cjs +1 -1
- package/web-components-bundle/global-menu/index.js +1 -1
- package/web-components-bundle/global-topbar/index.cjs +1 -1
- package/web-components-bundle/global-topbar/index.js +2 -2
- package/web-components-bundle/has-permission/index.cjs +1 -1
- package/web-components-bundle/has-permission/index.js +2 -2
- package/web-components-bundle/{index-3e7c8d0a.cjs → index-6c2bc04a.cjs} +1 -1
- package/web-components-bundle/index-abae7804.cjs +1096 -0
- package/web-components-bundle/{index-de94b904.js → index-bc5f0a32.js} +6197 -6191
- package/web-components-bundle/{index-3db2035e.js → index-f9a0dd02.js} +14 -13
- package/web-components-bundle/index-8b489d35.cjs +0 -1096
|
@@ -10714,23 +10714,24 @@ function tw(e, t) {
|
|
|
10714
10714
|
).length;
|
|
10715
10715
|
}
|
|
10716
10716
|
function Kf(e, t) {
|
|
10717
|
+
var l;
|
|
10717
10718
|
const n = new URL(t);
|
|
10718
|
-
let r = e.filter((
|
|
10719
|
-
item:
|
|
10720
|
-
itemUrl: new URL(
|
|
10721
|
-
matchingParamsCount: tw(t,
|
|
10722
|
-
})).sort((
|
|
10723
|
-
const
|
|
10724
|
-
return Array.from(
|
|
10725
|
-
}).filter(({ itemUrl:
|
|
10726
|
-
const i = r.filter(({ itemUrl:
|
|
10727
|
-
r = i.length > 0 ? i : o, r = r.sort((
|
|
10728
|
-
let s = r.length > 0 ? r
|
|
10719
|
+
let r = e.filter((u) => u.path && u.path.includes("http")).map((u) => ({
|
|
10720
|
+
item: u,
|
|
10721
|
+
itemUrl: new URL(u.path),
|
|
10722
|
+
matchingParamsCount: tw(t, u.path)
|
|
10723
|
+
})).sort((u, f) => {
|
|
10724
|
+
const c = new URL(u.itemUrl).searchParams, d = new URL(f.itemUrl).searchParams;
|
|
10725
|
+
return Array.from(c).length - Array.from(d).length;
|
|
10726
|
+
}).filter(({ itemUrl: u }) => n.origin === u.origin);
|
|
10727
|
+
const i = r.filter(({ itemUrl: u }) => n.pathname === u.pathname), o = r.filter(({ itemUrl: u }) => n.pathname.includes(u.pathname));
|
|
10728
|
+
r = i.length > 0 ? i : o, r = r.sort((u, f) => f.matchingParamsCount - u.matchingParamsCount);
|
|
10729
|
+
let s = r.length > 0 ? (l = r.find((u) => u.item.parentKey)) == null ? void 0 : l.item : null;
|
|
10729
10730
|
console.log("matchingItems:", r);
|
|
10730
10731
|
let a = [];
|
|
10731
10732
|
for (; s; )
|
|
10732
|
-
a = [s, ...a], s = e.find((
|
|
10733
|
-
return a;
|
|
10733
|
+
a = [s, ...a], s = e.find((u) => u.id === (s == null ? void 0 : s.parentKey)) || null;
|
|
10734
|
+
return console.log("parents:", a), a;
|
|
10734
10735
|
}
|
|
10735
10736
|
function Yf(e, t) {
|
|
10736
10737
|
return e.map((n) => (n.path && (n.path = t(n.path)), n.children && n.children.length > 0 && (n.children = Yf(n.children, t)), n));
|