@softwareone/spi-sv5-library 1.7.4 → 1.7.6

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,13 +1,19 @@
1
1
  <script lang="ts">
2
2
  interface FooterProps {
3
3
  homeUrl?: string;
4
+ logoUrl?: string;
5
+ documentationUrl?: string;
4
6
  }
5
- let { homeUrl = '/' }: FooterProps = $props();
7
+ let {
8
+ homeUrl = '/',
9
+ logoUrl = '/softwareone-logo-white.svg',
10
+ documentationUrl = 'https://softwareone-internal.atlassian.net/wiki/spaces/ATM/pages/17961910574/Services+Portal+BackOffice'
11
+ }: FooterProps = $props();
6
12
  </script>
7
13
 
8
14
  <footer class="footer-section">
9
15
  <a href={homeUrl} title="Home">
10
- <img alt="SoftwareOne logo" class="logo-image" src="/softwareone-logo-white.svg" />
16
+ <img alt="SoftwareOne logo" class="logo-image" src={logoUrl} />
11
17
  </a>
12
18
  <ul class="links">
13
19
  <li>
@@ -15,8 +21,8 @@
15
21
  </li>
16
22
  <li>
17
23
  <a
18
- href="https://softwareone.atlassian.net/wiki/spaces/MA/pages/4642996240/GDAP+Manual"
19
- title="GDAP Manual"
24
+ href={documentationUrl}
25
+ title="Service Portal BackOffice"
20
26
  target="_blank"
21
27
  rel="noopener noreferrer">Documentation</a
22
28
  >
@@ -1,5 +1,7 @@
1
1
  interface FooterProps {
2
2
  homeUrl?: string;
3
+ logoUrl?: string;
4
+ documentationUrl?: string;
3
5
  }
4
6
  declare const Footer: import("svelte").Component<FooterProps, {}, "">;
5
7
  type Footer = ReturnType<typeof Footer>;
@@ -34,8 +34,7 @@
34
34
  }
35
35
 
36
36
  .home-container {
37
- --black-1: #434952;
38
- --black-2: #273444;
37
+ --black: #000;
39
38
  --white: #fff;
40
39
  }
41
40
 
@@ -63,18 +62,31 @@
63
62
  gap: 16px;
64
63
  padding: 12px;
65
64
  border-radius: 16px;
66
- background: var(--black-1);
67
- transition: background 0.2s ease-in-out;
65
+ background: var(--white);
66
+ transition:
67
+ box-shadow 0.2s ease-in-out,
68
+ transform 0.2s ease-in-out;
69
+ box-shadow:
70
+ 0 1px 16px 0 rgba(107, 113, 128, 0.1),
71
+ 0 1px 3px 0 rgba(107, 113, 128, 0.2);
72
+
73
+ &:hover {
74
+ transform: translateY(-2px);
75
+ box-shadow:
76
+ 0 4px 20px 0 rgba(71, 42, 255, 0.2),
77
+ 0 2px 6px 0 rgba(107, 113, 128, 0.25);
78
+ }
68
79
 
69
80
  > img {
70
81
  width: 36px;
71
82
  height: 36px;
72
83
  margin: auto 0;
73
- filter: invert(100%);
84
+ filter: invert(27%) sepia(99%) saturate(4729%) hue-rotate(240deg) brightness(101%)
85
+ contrast(106%);
74
86
  }
75
87
 
76
88
  > div {
77
- color: var(--white);
89
+ color: var(--black);
78
90
 
79
91
  > h2 {
80
92
  padding-bottom: 8px;
@@ -89,8 +101,4 @@
89
101
  }
90
102
  }
91
103
  }
92
-
93
- .home-container > .home-item:hover {
94
- background: var(--black-2);
95
- }
96
104
  </style>
@@ -19,7 +19,8 @@
19
19
  };
20
20
 
21
21
  const isActiveMenuItem = (url: string) => {
22
- const firstSegmentUrl = page.url.pathname.split('/')[1];
22
+ const pathname = page.url.pathname.replace(/^\/v\d+\//, '/');
23
+ const firstSegmentUrl = pathname.split('/')[1];
23
24
  return existRoute(`/${firstSegmentUrl}`, url);
24
25
  };
25
26
 
@@ -28,7 +29,6 @@
28
29
  return regex.test(pathname);
29
30
  };
30
31
 
31
-
32
32
  const onHandleMenu = () => {
33
33
  showMenu = !showMenu;
34
34
  };
@@ -1,7 +1,12 @@
1
1
  export const getSubMenuItemsFromMenu = (items, url, excludedRoutes) => {
2
- if (excludedRoutes?.includes(url))
2
+ const cleanUrl = url.replace(/^\/v\d+\//, '/');
3
+ if (excludedRoutes?.includes(cleanUrl))
3
4
  return [];
4
- const matchedPath = /^\/[^/]+/.exec(url);
5
+ const matchedPath = /^\/[^/]+/.exec(cleanUrl);
5
6
  const urlValue = matchedPath?.[0] ?? '';
6
- return items.find((menu) => menu.url.startsWith(urlValue))?.children ?? [];
7
+ const matchedMenu = items.find((menu) => {
8
+ const regex = new RegExp(`${urlValue}(?![\\w-])`);
9
+ return regex.test(menu.url);
10
+ });
11
+ return matchedMenu?.children ?? [];
7
12
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@softwareone/spi-sv5-library",
3
- "version": "1.7.4",
3
+ "version": "1.7.6",
4
4
  "description": "Svelte components",
5
5
  "keywords": [
6
6
  "svelte",