@salesforcedevs/docs-components 1.2.18-lightdom → 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/package.json +1 -1
- package/src/modules/doc/breadcrumbItem/{breadcrumbItem.scoped.css → breadcrumbItem.css} +3 -0
- package/src/modules/doc/breadcrumbItem/breadcrumbItem.html +1 -1
- package/src/modules/doc/breadcrumbItem/breadcrumbItem.ts +0 -2
- package/src/modules/doc/header/header.css +3 -3
- package/src/modules/doc/xmlContent/{xmlContent.scoped.css → xmlContent.css} +9 -1
- package/src/modules/doc/xmlContent/xmlContent.html +1 -1
- package/src/modules/doc/xmlContent/xmlContent.ts +14 -2
package/package.json
CHANGED
|
@@ -7,8 +7,6 @@ const BREADCRUMB_BACK_ARROW = "breadcrumb_back-arrow";
|
|
|
7
7
|
|
|
8
8
|
const LONG_LABEL_NUMBER = 30;
|
|
9
9
|
export default class BreadcrumbItem extends LightningElement {
|
|
10
|
-
static renderMode = 'light';
|
|
11
|
-
|
|
12
10
|
@api href?: string;
|
|
13
11
|
@api analyticsEvent!: string;
|
|
14
12
|
@api analyticsBasePayload!: AnalyticsPayload;
|
|
@@ -43,7 +43,7 @@ header:not(.has-brand) > .header_l2 {
|
|
|
43
43
|
--button-primary-color-hover: var(--dx-g-blue-vibrant-40);
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
.header_lang-dropdown dx-button {
|
|
46
|
+
.header_lang-dropdown > dx-button {
|
|
47
47
|
--dx-c-button-primary-color: var(--button-primary-color);
|
|
48
48
|
--dx-c-button-primary-color-hover: var(--button-primary-color-hover);
|
|
49
49
|
--dx-c-slot-empty-width: min-content;
|
|
@@ -89,11 +89,11 @@ header:not(.has-brand) > .header_l2 {
|
|
|
89
89
|
margin-left: auto;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
.header_lang-dropdown dx-button {
|
|
92
|
+
.header_lang-dropdown > dx-button {
|
|
93
93
|
padding: var(--dx-g-spacing-2xs) 0;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
.has-scoped-nav-items .header_l2 {
|
|
96
|
+
.has-scoped-nav-items > .header_l2 {
|
|
97
97
|
height: unset;
|
|
98
98
|
}
|
|
99
99
|
|
|
@@ -7,13 +7,21 @@ doc-breadcrumbs {
|
|
|
7
7
|
--dx-c-popover-z-index: 5;
|
|
8
8
|
|
|
9
9
|
display: block;
|
|
10
|
-
margin-bottom: var(--dx-g-spacing-
|
|
10
|
+
margin-bottom: var(--dx-g-spacing-md);
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
dx-dropdown {
|
|
14
14
|
--dx-c-dropdown-option-font-size: var(--dx-g-text-sm);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
dx-dropdown > dx-button {
|
|
18
|
+
--dx-c-button-primary-color: var(--button-primary-color);
|
|
19
|
+
--dx-c-button-primary-color-hover: var(--button-primary-color-hover);
|
|
20
|
+
--border-color: var(--button-primary-color);
|
|
21
|
+
|
|
22
|
+
border-bottom: 1px dashed var(--border-color);
|
|
23
|
+
}
|
|
24
|
+
|
|
17
25
|
dx-dropdown > dx-button:hover {
|
|
18
26
|
--border-color: var(--button-primary-color-hover);
|
|
19
27
|
}
|
|
@@ -28,8 +28,6 @@ export default class DocXmlContent extends LightningElementWithState<{
|
|
|
28
28
|
isFetchingContent: boolean;
|
|
29
29
|
lastHighlightedSearch: string;
|
|
30
30
|
}> {
|
|
31
|
-
static renderMode = 'light';
|
|
32
|
-
|
|
33
31
|
@api apiDomain = "https://developer.salesforce.com";
|
|
34
32
|
@api coveoOrganizationId!: string;
|
|
35
33
|
@api coveoPublicAccessToken!: string;
|
|
@@ -617,6 +615,17 @@ export default class DocXmlContent extends LightningElementWithState<{
|
|
|
617
615
|
return [item];
|
|
618
616
|
}
|
|
619
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
|
+
|
|
620
629
|
addMetatags(): void {
|
|
621
630
|
const div = document.createElement("div");
|
|
622
631
|
div.innerHTML = this.docContent;
|
|
@@ -648,6 +657,9 @@ export default class DocXmlContent extends LightningElementWithState<{
|
|
|
648
657
|
'link[rel="canonical"]'
|
|
649
658
|
);
|
|
650
659
|
if (metadescription) {
|
|
660
|
+
this.pageReference.docId = this.pageReference.docId
|
|
661
|
+
? this.dropVersionFromDocId(this.pageReference.docId)
|
|
662
|
+
: this.pageReference.docId;
|
|
651
663
|
metadescription.setAttribute(
|
|
652
664
|
"href",
|
|
653
665
|
window.location.protocol +
|