@admin-layout/client 7.0.1-alpha.3 → 7.0.1-alpha.5
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.
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const defaultSettings = {
|
|
2
2
|
logo: 'https://cdmbase.s3.ca-central-1.amazonaws.com/favicon-new-128.svg',
|
|
3
|
-
navTheme: 'light',
|
|
4
|
-
primaryColor: '#1890ff',
|
|
5
|
-
colorPrimary: '#1677FF',
|
|
3
|
+
navTheme: 'light',
|
|
4
|
+
primaryColor: '#1890ff',
|
|
5
|
+
colorPrimary: '#1677FF',
|
|
6
6
|
layout: 'mix',
|
|
7
7
|
contentWidth: 'Fluid',
|
|
8
8
|
fixedHeader: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/redux/settings.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAmBhD,QAAA,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/redux/settings.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAmBhD,QAAA,MAAM,eAAe;UAEe,MAAM;aAAW,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyBnE,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parentRoute.d.ts","sourceRoot":"","sources":["../../src/utils/parentRoute.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"parentRoute.d.ts","sourceRoot":"","sources":["../../src/utils/parentRoute.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,4CAqB5B,CAAC"}
|
package/lib/utils/parentRoute.js
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
1
|
const matchParentRoute = function (allRoutes, selectedPath) {
|
|
2
|
-
|
|
2
|
+
// Helper function to recursively search for the route
|
|
3
|
+
const findRoute = (routes, path) => {
|
|
4
|
+
for (const route of routes) {
|
|
5
|
+
// Check if the current route's path matches the selected path
|
|
6
|
+
if (route.path === path) {
|
|
7
|
+
return route;
|
|
8
|
+
}
|
|
9
|
+
// If the current route has nested routes, search within them recursively
|
|
10
|
+
if (route.routes) {
|
|
11
|
+
const found = findRoute(route.routes, path);
|
|
12
|
+
if (found) {
|
|
13
|
+
return found;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return null; // Return null if no matching route is found
|
|
18
|
+
};
|
|
19
|
+
// Start the recursive search from the top-level routes
|
|
20
|
+
return findRoute(allRoutes, selectedPath);
|
|
3
21
|
};export{matchParentRoute};//# sourceMappingURL=parentRoute.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parentRoute.js","sources":["../../src/utils/parentRoute.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAO,MAAA,gBAAsB,GAAA,UAAA,SAAA,EAAA,YAAA,EAAA
|
|
1
|
+
{"version":3,"file":"parentRoute.js","sources":["../../src/utils/parentRoute.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAO,MAAA,gBAAsB,GAAA,UAAA,SAAA,EAAA,YAAA,EAAA;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@admin-layout/client",
|
|
3
|
-
"version": "7.0.1-alpha.
|
|
3
|
+
"version": "7.0.1-alpha.5",
|
|
4
4
|
"description": "Sample client for higher packages to depend on",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "CDMBase LLC",
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"typescript": {
|
|
37
37
|
"definition": "lib/index.d.ts"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "7ffca877cfbc92f1b5bc2fba68dcd9e370f9b790"
|
|
40
40
|
}
|