@triptease/tt-navbar 0.0.71 → 0.0.73
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/CHANGELOG.md +14 -0
- package/dist/src/urlMappings.js +7 -0
- package/dist/src/urlMappings.js.map +1 -1
- package/dist/test/tt-navbar.test.js +6 -0
- package/dist/test/tt-navbar.test.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/web/Config.js +1 -1
- package/dist/web/Routes.js +1 -1
- package/dist/web/TtNavbar.js +17 -10
- package/dist/web/TtNavbar.js.map +3 -3
- package/dist/web/getInitialNavbarState.js +1 -1
- package/dist/web/global.d.js +1 -1
- package/dist/web/index.js +17 -10
- package/dist/web/index.js.map +3 -3
- package/dist/web/styles.js +1 -1
- package/dist/web/triptease-logo.js +1 -1
- package/dist/web/tt-navbar.js +17 -10
- package/dist/web/tt-navbar.js.map +3 -3
- package/dist/web/urlMappings.js +9 -2
- package/dist/web/urlMappings.js.map +2 -2
- package/package.json +3 -3
- package/src/urlMappings.ts +7 -0
- package/test/tt-navbar.test.ts +7 -0
package/dist/web/global.d.js
CHANGED
package/dist/web/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @triptease/tt-navbar v0.0.
|
|
2
|
+
* @triptease/tt-navbar v0.0.73
|
|
3
3
|
*/
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -2056,7 +2056,14 @@ var urlMappings = {
|
|
|
2056
2056
|
"/:clientKey/email": "/channels",
|
|
2057
2057
|
"/pricematch/:clientKey/*": "/channels",
|
|
2058
2058
|
"/chat/insights/:clientKey": "/channels",
|
|
2059
|
-
"
|
|
2059
|
+
"/:clientKey/meta/*": "/channels",
|
|
2060
|
+
"/:clientKey/paidsearch/*": "/channels",
|
|
2061
|
+
"/:clientKey/retargeting/*": "/channels",
|
|
2062
|
+
"/:clientKey/messages/*": "/channels",
|
|
2063
|
+
"/:clientKey/pricematch/*": "/channels",
|
|
2064
|
+
"/:clientKey/chat/insights": "/channels",
|
|
2065
|
+
"/settings/:clientKey/*": "/settings/$CLIENT_KEY/guides",
|
|
2066
|
+
"/:clientKey/settings/*": "/$CLIENT_KEY/settings/guides"
|
|
2060
2067
|
};
|
|
2061
2068
|
|
|
2062
2069
|
// src/Routes.ts
|
|
@@ -2126,24 +2133,24 @@ var TtNavbar = class extends i4 {
|
|
|
2126
2133
|
if (mappedUrl) {
|
|
2127
2134
|
const clientSpecificUrl = mappedUrl.replace("$CLIENT_KEY", this.clientKey);
|
|
2128
2135
|
const links = Object.values(this.allNavLinks);
|
|
2129
|
-
bestMatch = links.find((
|
|
2136
|
+
bestMatch = links.find((link2) => link2.href.includes(clientSpecificUrl));
|
|
2130
2137
|
}
|
|
2131
2138
|
}
|
|
2132
2139
|
if (!bestMatch) {
|
|
2133
|
-
for (const
|
|
2134
|
-
const linkPath = new URL(
|
|
2140
|
+
for (const link2 of this.allNavLinks) {
|
|
2141
|
+
const linkPath = new URL(link2.href).pathname;
|
|
2135
2142
|
if (currentPath.startsWith(linkPath)) {
|
|
2136
2143
|
if (linkPath.length > bestMatchLength) {
|
|
2137
|
-
bestMatch =
|
|
2144
|
+
bestMatch = link2;
|
|
2138
2145
|
bestMatchLength = linkPath.length;
|
|
2139
2146
|
}
|
|
2140
2147
|
}
|
|
2141
2148
|
}
|
|
2142
2149
|
}
|
|
2143
|
-
for (const
|
|
2144
|
-
|
|
2145
|
-
if (
|
|
2146
|
-
|
|
2150
|
+
for (const link2 of this.allNavLinks) {
|
|
2151
|
+
link2.classList.remove("current-page");
|
|
2152
|
+
if (link2.hasAttribute("aria-current")) {
|
|
2153
|
+
link2.attributes.removeNamedItem("aria-current");
|
|
2147
2154
|
}
|
|
2148
2155
|
}
|
|
2149
2156
|
if (bestMatch) {
|