@salesforcedevs/docs-components 1.27.22-banner11 → 1.27.22-banner12

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.27.22-banner11",
3
+ "version": "1.27.22-banner12",
4
4
  "description": "Docs Lightning web components for DSC",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
@@ -25,5 +25,5 @@
25
25
  "@types/lodash.orderby": "4.6.9",
26
26
  "@types/lodash.uniqby": "4.7.9"
27
27
  },
28
- "gitHead": "ea29a6b1c177ea33e34105b1ad4a1ec3e9bb4b54"
28
+ "gitHead": "cf63c528f12a0f9cf613d107953efe71886f8979"
29
29
  }
@@ -80,7 +80,6 @@ export default class DocXmlContent extends LightningElementWithState<{
80
80
  private docTitle = "";
81
81
  private _pathName = "";
82
82
  private listenerAttached = false;
83
- private _xmlLocaleBannerDispatched = false;
84
83
  private sidebarFooterContent: SiderbarFooter = { ...defaultSidebarFooter };
85
84
  private latestVersion = false;
86
85
  private previewVersion = false;
@@ -222,15 +221,6 @@ export default class DocXmlContent extends LightningElementWithState<{
222
221
  this.setState({ internalLinkClicked: false });
223
222
  }
224
223
 
225
- if (
226
- this.displayContent &&
227
- !normalizeBoolean(this.localeBannerEnabled) &&
228
- this.shouldShowLocaleBanner &&
229
- !this._xmlLocaleBannerDispatched
230
- ) {
231
- this.injectLocaleBannerIntoThemeHost();
232
- }
233
-
234
224
  if (
235
225
  (this.prevState.isFetchingContent &&
236
226
  !this.state.isFetchingContent) ||
@@ -303,54 +293,6 @@ export default class DocXmlContent extends LightningElementWithState<{
303
293
  });
304
294
  }
305
295
 
306
- private injectLocaleBannerIntoThemeHost(retryCount = 0): void {
307
- if (typeof document === "undefined") {
308
- return;
309
- }
310
- const host = document.getElementById("doc-xml-locale-banner-host");
311
- if (!host) {
312
- const maxRetries = 5;
313
- const delays = [100, 300, 500, 800, 1200];
314
- if (retryCount < maxRetries) {
315
- const delay = delays[retryCount] ?? 1200;
316
- setTimeout(
317
- () => this.injectLocaleBannerIntoThemeHost(retryCount + 1),
318
- delay
319
- );
320
- }
321
- return;
322
- }
323
- if (host.hasChildNodes()) {
324
- return;
325
- }
326
- const banner = document.createElement("doc-banner");
327
- banner.setAttribute(
328
- "message-text",
329
- "This text was translated using Salesforce's machine translation system. More details can be found "
330
- );
331
- banner.setAttribute(
332
- "message-link-url",
333
- "https://help.salesforce.com/s/articleView?id=sf.machine_translation.htm"
334
- );
335
- banner.setAttribute("message-link-text", "here");
336
- banner.setAttribute("button-label", "Switch to English");
337
- banner.setAttribute("button-href", this.localeBannerEnUsHref);
338
- banner.setAttribute("secondary-label", "Not Now");
339
- banner.setAttribute("show-close-button", "true");
340
- banner.setAttribute(
341
- "dismiss-storage-key",
342
- this.deliverable || "default"
343
- );
344
- host.setAttribute("aria-hidden", "false");
345
- this._xmlLocaleBannerDispatched = true;
346
- // Defer append so custom element can upgrade and host :empty state updates next frame
347
- requestAnimationFrame(() => {
348
- if (!host.hasChildNodes()) {
349
- host.appendChild(banner);
350
- }
351
- });
352
- }
353
-
354
296
  private get useOldSidebar(): boolean {
355
297
  // Coveo is enabled and the version is greater than 51 (within the latest 3 versions)
356
298
  // TODO: we need a better fix for version number check