@scm-manager/ui-components 4.0.0-REACT19-20251102-220352 → 4.0.0-REACT19-20251103-141810

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scm-manager/ui-components",
3
- "version": "4.0.0-REACT19-20251102-220352",
3
+ "version": "4.0.0-REACT19-20251103-141810",
4
4
  "description": "UI Components for SCM-Manager and its plugins",
5
5
  "main": "src/index.ts",
6
6
  "files": [
@@ -34,8 +34,8 @@
34
34
  "@scm-manager/eslint-config": "^2.18.2",
35
35
  "@scm-manager/prettier-config": "^2.12.0",
36
36
  "@scm-manager/tsconfig": "^2.13.0",
37
- "@scm-manager/ui-syntaxhighlighting": "4.0.0-REACT19-20251102-220352",
38
- "@scm-manager/ui-types": "4.0.0-REACT19-20251102-220352",
37
+ "@scm-manager/ui-syntaxhighlighting": "4.0.0-REACT19-20251103-141810",
38
+ "@scm-manager/ui-types": "4.0.0-REACT19-20251103-141810",
39
39
  "@storybook/addon-actions": "^9.0.8",
40
40
  "@storybook/addon-docs": "^9.1.5",
41
41
  "@storybook/addon-essentials": "^9.0.0-alpha.12",
@@ -66,9 +66,9 @@
66
66
  "vitest": "^3.2.4"
67
67
  },
68
68
  "dependencies": {
69
- "@scm-manager/ui-api": "4.0.0-REACT19-20251102-220352",
70
- "@scm-manager/ui-core": "4.0.0-REACT19-20251102-220352",
71
- "@scm-manager/ui-extensions": "4.0.0-REACT19-20251102-220352",
69
+ "@scm-manager/ui-api": "4.0.0-REACT19-20251103-141810",
70
+ "@scm-manager/ui-core": "4.0.0-REACT19-20251103-141810",
71
+ "@scm-manager/ui-extensions": "4.0.0-REACT19-20251103-141810",
72
72
  "deepmerge": "^4.2.2",
73
73
  "hast-util-sanitize": "^3.0.2",
74
74
  "react-diff-view": "2.6.0",
@@ -29,16 +29,13 @@ const useMatchesRoute = (pattern?: string) => {
29
29
  const useActiveMatch = ({ to, activeWhenMatch, activeOnlyWhenExact = true }: RoutingProps) => {
30
30
  const location = useLocation();
31
31
  const resolved = useResolvedPath(to);
32
- const isActive = new RegExp(resolved.pathname).test(location.pathname);
32
+ const isActive = !resolved.hash && location.pathname.startsWith(resolved.pathname);
33
33
  const match = useMatchesRoute(activeWhenMatch);
34
34
 
35
35
  if (activeOnlyWhenExact) {
36
36
  return isActive;
37
37
  } else if (activeWhenMatch) {
38
- if (isActive) {
39
- return true;
40
- }
41
- return match;
38
+ return isActive || match;
42
39
  }
43
40
  return false;
44
41
  };