@salesforcedevs/docs-components 1.2.13-canary.1 → 1.2.19-alpha
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/lwc.config.json
CHANGED
package/package.json
CHANGED
|
@@ -37,9 +37,6 @@
|
|
|
37
37
|
onstatechange={handleStateChange}
|
|
38
38
|
></dx-header-search>
|
|
39
39
|
</div>
|
|
40
|
-
<div if:true={showTbidLogin} class="header-tbid-login">
|
|
41
|
-
<dw-tbid-login-menu></dw-tbid-login-menu>
|
|
42
|
-
</div>
|
|
43
40
|
<div if:true={showSignup} class="header-login-signup">
|
|
44
41
|
<dx-button
|
|
45
42
|
aria-label="Sign Up For Salesforce Developer Edition"
|
|
@@ -62,10 +62,6 @@ export default class Header extends HeaderBase {
|
|
|
62
62
|
return !this.mobile && this.hasNavItems;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
private get showTbidLogin(): boolean {
|
|
66
|
-
return this.showSignup;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
65
|
private get showSignup(): boolean {
|
|
70
66
|
return this.signupLink
|
|
71
67
|
? (this.tablet && !this.isSearchOpen) || !this.tablet
|
|
@@ -615,6 +615,17 @@ export default class DocXmlContent extends LightningElementWithState<{
|
|
|
615
615
|
return [item];
|
|
616
616
|
}
|
|
617
617
|
|
|
618
|
+
dropVersionFromDocId(docId: string): string {
|
|
619
|
+
const docIdElemets = docId.split(".");
|
|
620
|
+
const filteredDocId = docIdElemets.filter((docIdElement) => {
|
|
621
|
+
if (docIdElement.match(/^[0-9]+$/) === null) {
|
|
622
|
+
return docIdElement;
|
|
623
|
+
}
|
|
624
|
+
return "";
|
|
625
|
+
});
|
|
626
|
+
return filteredDocId.join(".");
|
|
627
|
+
}
|
|
628
|
+
|
|
618
629
|
addMetatags(): void {
|
|
619
630
|
const div = document.createElement("div");
|
|
620
631
|
div.innerHTML = this.docContent;
|
|
@@ -646,6 +657,9 @@ export default class DocXmlContent extends LightningElementWithState<{
|
|
|
646
657
|
'link[rel="canonical"]'
|
|
647
658
|
);
|
|
648
659
|
if (metadescription) {
|
|
660
|
+
this.pageReference.docId = this.pageReference.docId
|
|
661
|
+
? this.dropVersionFromDocId(this.pageReference.docId)
|
|
662
|
+
: this.pageReference.docId;
|
|
649
663
|
metadescription.setAttribute(
|
|
650
664
|
"href",
|
|
651
665
|
window.location.protocol +
|