@salesforcedevs/dx-components 0.53.7 → 0.53.8
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/dx-components",
|
|
3
|
-
"version": "0.53.
|
|
3
|
+
"version": "0.53.8",
|
|
4
4
|
"description": "DX Lightning web components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -28,5 +28,5 @@
|
|
|
28
28
|
"@types/lodash.get": "^4.4.6",
|
|
29
29
|
"@types/vimeo__player": "^2.16.2"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "d35b6323942b0428d630c6cb9544a0e169510f5a"
|
|
32
32
|
}
|
|
@@ -28,7 +28,7 @@ export default class CardCallout extends LightningElement {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
private sendGtm(e: PointerEvent) {
|
|
31
|
-
track(e.currentTarget, "
|
|
31
|
+
track(e.currentTarget, "custEv_ctaLinkClick", {
|
|
32
32
|
content_type: "callout",
|
|
33
33
|
item_title: this.title,
|
|
34
34
|
item_location: this.href
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
>
|
|
22
22
|
<template for:each={options} for:item="option">
|
|
23
23
|
<dx-dropdown-option
|
|
24
|
+
suppress-gtm-nav-headings={suppressGtmNavHeadings}
|
|
24
25
|
analytics-event={analyticsEvent}
|
|
25
26
|
active={option.active}
|
|
26
27
|
key-value={option.keyValue}
|
|
@@ -40,6 +41,7 @@
|
|
|
40
41
|
<span class="menu_heading">{option.label}</span>
|
|
41
42
|
<template for:each={option.options} for:item="suboption">
|
|
42
43
|
<dx-dropdown-option
|
|
44
|
+
suppress-gtm-nav-headings={suppressGTMNavHeadings}
|
|
43
45
|
analytics-event={analyticsEvent}
|
|
44
46
|
active={suboption.active}
|
|
45
47
|
key={suboption.id}
|
|
@@ -18,6 +18,7 @@ export default class Dropdown extends LightningElement {
|
|
|
18
18
|
@api value: string | null = null; // "active option" id
|
|
19
19
|
@api valuePath: string = "id"; // path to match for the active value (useful for url matching)
|
|
20
20
|
@api stayOpenAfterChange?: boolean = false;
|
|
21
|
+
@api suppressGtmNavHeadings?: boolean = false;
|
|
21
22
|
|
|
22
23
|
// props forwarded to popover:
|
|
23
24
|
@api ariaLabel: string | null = null;
|
|
@@ -5,6 +5,7 @@ import { track } from "dx/instrumentation";
|
|
|
5
5
|
|
|
6
6
|
export default class DropdownOption extends LightningElement {
|
|
7
7
|
@api option!: Option;
|
|
8
|
+
@api suppressGtmNavHeadings: boolean = false;
|
|
8
9
|
@api keyValue!: string;
|
|
9
10
|
@api active: boolean = false;
|
|
10
11
|
@api navItemLabel: String | null = null;
|
|
@@ -27,13 +28,7 @@ export default class DropdownOption extends LightningElement {
|
|
|
27
28
|
new CustomEvent("select", { detail: this.keyValue })
|
|
28
29
|
);
|
|
29
30
|
|
|
30
|
-
const navHeading = this.navItemLabel || this.option.label || undefined;
|
|
31
|
-
const navSubHeading =
|
|
32
|
-
(this.navItemLabel ? this.option.label : undefined) || undefined;
|
|
33
|
-
|
|
34
31
|
const payload: any = {
|
|
35
|
-
navHeading,
|
|
36
|
-
navSubHeading,
|
|
37
32
|
clickText: this.keyValue || undefined,
|
|
38
33
|
pageLocation: window.location.pathname || undefined,
|
|
39
34
|
elementType: "dropdown",
|
|
@@ -43,6 +38,15 @@ export default class DropdownOption extends LightningElement {
|
|
|
43
38
|
clickUrl: e.target?.href || undefined
|
|
44
39
|
};
|
|
45
40
|
|
|
41
|
+
const navHeading = this.navItemLabel || this.option.label || undefined;
|
|
42
|
+
const navSubHeading =
|
|
43
|
+
(this.navItemLabel ? this.option.label : undefined) || undefined;
|
|
44
|
+
|
|
45
|
+
if (!this.suppressGtmNavHeadings) {
|
|
46
|
+
payload.navHeading = navHeading;
|
|
47
|
+
payload.navSubHeading = navSubHeading;
|
|
48
|
+
}
|
|
49
|
+
|
|
46
50
|
if (this.analyticsEvent && e.currentTarget) {
|
|
47
51
|
track(e.currentTarget, this.analyticsEvent, payload);
|
|
48
52
|
}
|