@triptease/tt-navbar 0.0.37 → 0.0.39

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,5 +1,5 @@
1
1
  /**
2
- * @triptease/tt-navbar v0.0.37
2
+ * @triptease/tt-navbar v0.0.39
3
3
  */
4
4
 
5
5
  // ../../node_modules/@lit/reactive-element/css-tag.js
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @triptease/tt-navbar v0.0.37
2
+ * @triptease/tt-navbar v0.0.39
3
3
  */
4
4
 
5
5
  // src/triptease-logo.ts
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @triptease/tt-navbar v0.0.37
2
+ * @triptease/tt-navbar v0.0.39
3
3
  */
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -2010,7 +2010,12 @@ var urlMappings = {
2010
2010
  "/messages/$CLIENT_KEY/messages": "/channels",
2011
2011
  "/$CLIENT_KEY/email": "/channels",
2012
2012
  "/pricematch/$CLIENT_KEY/performance": "/channels",
2013
- "/chat/insights/$CLIENT_KEY": "/channels"
2013
+ "/chat/insights/$CLIENT_KEY": "/channels",
2014
+ "/settings/$CLIENT_KEY/branding": "/settings/$CLIENT_KEY/guides",
2015
+ "/settings/$CLIENT_KEY/price-check": "/settings/$CLIENT_KEY/guides",
2016
+ "/settings/$CLIENT_KEY/price-config": "/settings/$CLIENT_KEY/guides",
2017
+ "/settings/$CLIENT_KEY/hotel-details-finder": "/settings/$CLIENT_KEY/guides",
2018
+ "/settings/$CLIENT_KEY/deactivation-center": "/settings/$CLIENT_KEY/guides"
2014
2019
  };
2015
2020
 
2016
2021
  // src/Routes.ts
@@ -2105,8 +2110,10 @@ var TtNavbar = class extends i4 {
2105
2110
  const parsedPath = currentPath.replace(this.clientKey, "$CLIENT_KEY");
2106
2111
  const mappedUrl = urlMappings[parsedPath];
2107
2112
  if (mappedUrl) {
2113
+ const clientSpecificUrl = mappedUrl.includes("$CLIENT_KEY") ? mappedUrl.replace("$CLIENT_KEY", this.clientKey) : mappedUrl;
2108
2114
  const links = Object.values(this.allNavLinks);
2109
- bestMatch = links.find((link) => link.href.includes(mappedUrl));
2115
+ bestMatch = links.find((link) => link.href.includes(clientSpecificUrl));
2116
+ console.log({ mappedUrl, clientSpecificUrl, bestMatch });
2110
2117
  }
2111
2118
  }
2112
2119
  if (!bestMatch) {
@@ -2355,24 +2362,24 @@ var TtNavbar = class extends i4 {
2355
2362
  <div class='nav-items'>
2356
2363
  <div id="client-selector">
2357
2364
  ${this.clients.length > 1 ? x`
2358
- <tt-combobox
2359
- .openUpward=${true}
2360
- .value=${this.clientKey ? [this.clientKey] : []}
2361
- @change=${this.handleClientChange}
2362
- >
2363
- ${this.clients.map(
2365
+ <tt-combobox
2366
+ .openUpward=${true}
2367
+ .value=${this.clientKey ? [this.clientKey] : []}
2368
+ @change=${this.handleClientChange}
2369
+ >
2370
+ ${this.clients.map(
2364
2371
  (client) => x`
2365
- <option slot="option" value=${client.clientKey}>
2366
- ${client.displayName}
2367
- </option>
2368
- `
2372
+ <option slot="option" value=${client.clientKey}>
2373
+ ${client.displayName}
2374
+ </option>
2375
+ `
2369
2376
  )}
2370
- </tt-combobox>
2371
- ` : x`
2372
- <div class="single-client-name">
2373
- ${this.clients.find((m3) => m3.clientKey === this.clientKey)?.displayName}
2374
- </div>
2375
- `}
2377
+ </tt-combobox>
2378
+ ` : x`
2379
+ <div class="single-client-name">
2380
+ ${this.clients.find((m3) => m3.clientKey === this.clientKey)?.displayName}
2381
+ </div>
2382
+ `}
2376
2383
  </div>
2377
2384
  <a
2378
2385
  id="logout-link"