@salesforcedevs/docs-components 1.33.2-alpha-iphone-scroll-7 → 1.33.2-alpha1

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": "@salesforcedevs/docs-components",
3
- "version": "1.33.2-alpha-iphone-scroll-7",
3
+ "version": "1.33.2-alpha1",
4
4
  "description": "Docs Lightning web components for DSC",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
@@ -26,5 +26,5 @@
26
26
  "@types/lodash.uniqby": "4.7.9"
27
27
  },
28
28
  "gitHead": "4629fdd9ca18a13480044ad43515b91945d16aad",
29
- "stableVersion": "1.33.1"
29
+ "stableVersion": "1.33.2"
30
30
  }
@@ -205,7 +205,10 @@ export default class Content extends LightningElement {
205
205
  );
206
206
  // anchor href event is not propagated here as we want SPA nature.
207
207
  // But in prerender.io - as javascript is not executed, we want the anchor links are proper (absolute urls).
208
- anchorEl.setAttribute("href", "/docs/" + updatedURL);
208
+ // Deploy base path (e.g. "/PR-123"); empty in local dev.
209
+ const basePath =
210
+ (globalThis as any)?.LWR?.env?.basePath || "";
211
+ anchorEl.setAttribute("href", basePath + "/docs/" + updatedURL);
209
212
  anchorEl.setAttribute("data-id", "docs/" + updatedURL);
210
213
  return;
211
214
  }
@@ -82,10 +82,13 @@ export default class Header extends HeaderBase {
82
82
  this.onTabletChange(this.tabletMatchMedia);
83
83
  this.tabletMatchMedia.addEventListener("change", this.onTabletChange);
84
84
 
85
+ // Deploy base path (e.g. "/PR-123"); empty in local dev. The runtime pathname is
86
+ // served under this prefix, so the exact-match exclusion must include it.
87
+ const basePath = (globalThis as any)?.LWR?.env?.basePath || "";
85
88
  if (
86
89
  (!this.shouldHideHeader &&
87
90
  window.location.pathname.includes("/docs/") &&
88
- window.location.pathname !== "/docs/apis") ||
91
+ window.location.pathname !== `${basePath}/docs/apis`) ||
89
92
  window.location.pathname ===
90
93
  "/tableau/embedding-playground/overview" ||
91
94
  isStorybook()
@@ -13,7 +13,6 @@
13
13
  margin: 20px 0;
14
14
  }
15
15
 
16
- /* when phone size, make the survey container a column */
17
16
  @media screen and (max-width: 768px) {
18
17
  :host .survey-container {
19
18
  flex-direction: column;