* refactor: 💡 use hds app header and app side nav * style: 💄 fix dark-mode colors for side nav and app header * style: 💄 cleanup * style: 💄 simplify selector * refactor: 💡 move util (param finder) to core addon * refactor: 💡 move scope picker to core addon * refactor: 💡 use hds header and app side nav in ui/desktop * refactor: 💡 clean up ui/desktop files * refactor: 💡 remove uneeded header components * refactor: 💡 remove uneeded global layout * Add missing copyright headers * style: 💄 adjust foreground and background colors to fix contras * style: 💄 remove uneeded stylelint disables * style: 💄 fix dark mode styling in desktop ui * refactor: 💡 readd user-select style * test: 💍 fix tests + e2e tests for admin and desktop UIs * refactor: 💡 clean up uneeded main elements and fix color link * Add missing copyright headers * fix: 🐛 e2e test selectors for ui/desktop * style: 💄 revert link color change * refactor: 💡 remove hds override * fix: 🐛 scope dropdown for desktop * fix: 🐛 max-height to desktop scope dropdown * Add missing copyright headers * chore: 🤖 update lockfile due to webpack update
20 lines
620 B
JavaScript
20 lines
620 B
JavaScript
/**
|
|
* Copyright IBM Corp. 2021, 2026
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
// Traverses through a RouteInfo object in order to find
|
|
// the dynamic segments of a route and stops traversing when
|
|
// the route name of the caller is reached. In the RouteInfo
|
|
// object the params object contains the dynamic segment of
|
|
// a particular route.
|
|
|
|
export function paramValueFinder(routeName, parentInfo) {
|
|
if (!parentInfo?.params || parentInfo.localName === routeName) {
|
|
return [];
|
|
}
|
|
|
|
let otherParam = Object.values(parentInfo.params);
|
|
return [...paramValueFinder(routeName, parentInfo.parent), ...otherParam];
|
|
}
|