@salesforcedevs/docs-components 1.3.209-lang3-alpha → 1.3.209-lang5-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
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
:host {
|
|
4
4
|
--button-primary-color: var(--dx-g-blue-vibrant-50);
|
|
5
5
|
--button-primary-color-hover: var(--dx-g-cloud-blue-vibrant-95);
|
|
6
|
+
--popover-container-open-transform: translateX(-4px) translateY(-8px);
|
|
7
|
+
--popover-transition: none;
|
|
8
|
+
--dx-c-dropdown-option-font-weight: normal;
|
|
9
|
+
--dx-c-dropdown-option-label-color: var(--dx-g-gray-10);
|
|
6
10
|
}
|
|
7
11
|
|
|
8
12
|
.footer-display {
|
|
@@ -10,6 +14,9 @@
|
|
|
10
14
|
}
|
|
11
15
|
|
|
12
16
|
.footer_lang-dropdown {
|
|
17
|
+
--dx-c-button-primary-color: var(--button-primary-color);
|
|
18
|
+
--border-color: var(--button-primary-color);
|
|
19
|
+
|
|
13
20
|
display: flex;
|
|
14
21
|
padding: 0 var(--dx-g-spacing-md);
|
|
15
22
|
margin-left: var(--dx-g-spacing-sm);
|
|
@@ -18,10 +25,10 @@
|
|
|
18
25
|
align-items: center;
|
|
19
26
|
}
|
|
20
27
|
|
|
21
|
-
.footer_lang-dropdown
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
--border-color: var(--
|
|
28
|
+
.footer_lang-dropdown[aria-expanded="true"] {
|
|
29
|
+
background-color: var(--dx-g-cloud-blue-vibrant-95);
|
|
30
|
+
|
|
31
|
+
--border-color: var(--dx-g-cloud-blue-vibrant-95);
|
|
25
32
|
}
|
|
26
33
|
|
|
27
34
|
.footer_lang-dropdown:hover,
|
|
@@ -35,6 +42,7 @@
|
|
|
35
42
|
|
|
36
43
|
.pdf_bail-link {
|
|
37
44
|
--dx-c-button-horizontal-spacing: var(--dx-g-spacing-sm);
|
|
45
|
+
--dx-c-button-priamry-color-hover: var(--dx-g-cloud-blue-vibrant-95);
|
|
38
46
|
|
|
39
47
|
padding: 0 var(--dx-g-spacing-md);
|
|
40
48
|
border-radius: var(--dx-g-spacing-xs);
|
|
@@ -15,16 +15,14 @@
|
|
|
15
15
|
</dx-button>
|
|
16
16
|
<dx-dropdown
|
|
17
17
|
if:true={hasLanguages}
|
|
18
|
-
class="footer_lang-dropdown"
|
|
19
18
|
options={languages}
|
|
20
19
|
small
|
|
21
20
|
value-path={langValuePath}
|
|
22
21
|
value={language}
|
|
23
22
|
onchange={onLangChange}
|
|
24
|
-
variant="docoption"
|
|
25
|
-
lang-picker="true"
|
|
26
23
|
>
|
|
27
24
|
<dx-button
|
|
25
|
+
class="footer_lang-dropdown"
|
|
28
26
|
aria-label="Select Language"
|
|
29
27
|
variant="inline"
|
|
30
28
|
icon-size="medium"
|
|
@@ -37,16 +35,14 @@
|
|
|
37
35
|
<div if:true={mobile} class="footer-display">
|
|
38
36
|
<dx-dropdown
|
|
39
37
|
if:true={hasLanguages}
|
|
40
|
-
class="footer_lang-dropdown"
|
|
41
38
|
options={languages}
|
|
42
39
|
small
|
|
43
40
|
value-path={langValuePath}
|
|
44
41
|
value={language}
|
|
45
42
|
onchange={onLangChange}
|
|
46
|
-
variant="docoption"
|
|
47
|
-
lang-picker="true"
|
|
48
43
|
>
|
|
49
44
|
<dx-button
|
|
45
|
+
class="footer_lang-dropdown"
|
|
50
46
|
aria-label="Select Language"
|
|
51
47
|
variant="inline"
|
|
52
48
|
icon-size="small"
|
|
@@ -27,9 +27,7 @@ export default class SidebarFooterNav extends LightningElement {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
set language(value) {
|
|
30
|
-
|
|
31
|
-
this._language = value;
|
|
32
|
-
}
|
|
30
|
+
this._language = value;
|
|
33
31
|
}
|
|
34
32
|
|
|
35
33
|
private _languages!: OptionWithLink[];
|
|
@@ -38,17 +36,16 @@ export default class SidebarFooterNav extends LightningElement {
|
|
|
38
36
|
private matchMedia!: MediaQueryList;
|
|
39
37
|
|
|
40
38
|
private get hasLanguages(): boolean {
|
|
41
|
-
return
|
|
39
|
+
return this.languages?.length > 1;
|
|
42
40
|
}
|
|
43
41
|
|
|
44
42
|
private get languageLabel(): string {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
);
|
|
43
|
+
const matchingLanguageData = this.language
|
|
44
|
+
? this.languages.find(
|
|
45
|
+
(lang) => get(lang, this.langValuePath) === this.language
|
|
46
|
+
)
|
|
47
|
+
: null;
|
|
48
|
+
return matchingLanguageData?.label || this.languages[0].label;
|
|
52
49
|
}
|
|
53
50
|
|
|
54
51
|
get hasBailLink(): boolean {
|
|
@@ -17,6 +17,7 @@ import { SearchSyncer } from "docUtils/searchSyncer";
|
|
|
17
17
|
import { LightningElementWithState } from "dxBaseElements/lightningElementWithState";
|
|
18
18
|
import { logCoveoPageView, oldVersionDocInfo } from "docUtils/utils";
|
|
19
19
|
import { Breadcrumb, DocPhaseInfo, Language } from "typings/custom";
|
|
20
|
+
import { track as trackGTM } from "dxUtils/analytics";
|
|
20
21
|
|
|
21
22
|
// TODO: Imitating from actual implementation as doc-content use it like this. We should refactor it later.
|
|
22
23
|
const handleContentError = (error: any): void => console.log(error);
|
|
@@ -371,6 +372,17 @@ export default class DocXmlContent extends LightningElementWithState<{
|
|
|
371
372
|
({ id }) => id === event.detail
|
|
372
373
|
);
|
|
373
374
|
this.pageReference.docId = this.language!.url;
|
|
375
|
+
|
|
376
|
+
trackGTM(event.target!, "custEv_ctaLinkClick", {
|
|
377
|
+
click_text: event.detail,
|
|
378
|
+
element_title: "language selector",
|
|
379
|
+
click_url: `${window.location.origin}${this.pageReferenceToString(
|
|
380
|
+
this.pageReference
|
|
381
|
+
)}`,
|
|
382
|
+
element_type: "link",
|
|
383
|
+
content_category: "cta"
|
|
384
|
+
});
|
|
385
|
+
|
|
374
386
|
this.updateUrl();
|
|
375
387
|
this.fetchDocument();
|
|
376
388
|
};
|