@boomerang-io/carbon-addons-boomerang-react 4.6.21-beta.43 → 4.6.21-beta.45

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.
@@ -141,14 +141,20 @@ function AdvantageSideNav(props) {
141
141
  const chatSideNavLink = (React__default.default.createElement(react.SideNavLink, { "data-testid": "sidenav-chat-link", className: !enableChatButton ? `${settings.prefix}--bmrg-advantage-sidenav__inactive-link` : "", isActive: windowLocation.href.includes(`${baseEnvUrl}/chat`), disabled: Boolean(!enableChatButton), renderIcon: icons.ChatBot, href: enableChatButton && chatLink, onClick: enableChatButton ? handleChatClick : (e) => e.preventDefault() }, "Chat"));
142
142
  const showSecondDivider = showChatButton || toolsLink || agentAssistantStudioLink || agentAssistantLibraryLink || documentCollectionsLink;
143
143
  const navigateInternal = (url) => {
144
+ console.log("url", url);
144
145
  const target = new URL(url, window.location.origin);
146
+ console.log("target", target.origin);
147
+ console.log("window.location.origin", window.location.origin);
145
148
  if (target.origin === window.location.origin) {
149
+ console.log("target.pathname", target.pathname);
146
150
  const pathname = target.pathname.startsWith("/ica")
147
151
  ? target.pathname.slice(4) // removes "/ica"
148
152
  : target.pathname;
153
+ console.log("pathname", pathname);
149
154
  history.push(pathname + target.search + target.hash);
150
155
  }
151
156
  else {
157
+ console.log("direct url navgation", url);
152
158
  window.location.href = url;
153
159
  }
154
160
  };
@@ -132,14 +132,20 @@ function AdvantageSideNav(props) {
132
132
  const chatSideNavLink = (React.createElement(SideNavLink, { "data-testid": "sidenav-chat-link", className: !enableChatButton ? `${prefix}--bmrg-advantage-sidenav__inactive-link` : "", isActive: windowLocation.href.includes(`${baseEnvUrl}/chat`), disabled: Boolean(!enableChatButton), renderIcon: ChatBot, href: enableChatButton && chatLink, onClick: enableChatButton ? handleChatClick : (e) => e.preventDefault() }, "Chat"));
133
133
  const showSecondDivider = showChatButton || toolsLink || agentAssistantStudioLink || agentAssistantLibraryLink || documentCollectionsLink;
134
134
  const navigateInternal = (url) => {
135
+ console.log("url", url);
135
136
  const target = new URL(url, window.location.origin);
137
+ console.log("target", target.origin);
138
+ console.log("window.location.origin", window.location.origin);
136
139
  if (target.origin === window.location.origin) {
140
+ console.log("target.pathname", target.pathname);
137
141
  const pathname = target.pathname.startsWith("/ica")
138
142
  ? target.pathname.slice(4) // removes "/ica"
139
143
  : target.pathname;
144
+ console.log("pathname", pathname);
140
145
  history.push(pathname + target.search + target.hash);
141
146
  }
142
147
  else {
148
+ console.log("direct url navgation", url);
143
149
  window.location.href = url;
144
150
  }
145
151
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@boomerang-io/carbon-addons-boomerang-react",
3
3
  "description": "Carbon Addons for Boomerang apps",
4
- "version": "4.6.21-beta.43",
4
+ "version": "4.6.21-beta.45",
5
5
  "author": {
6
6
  "name": "Tim Bula",
7
7
  "email": "timrbula@gmail.com"