@salesforcedevs/dx-components 1.3.52-alpha → 1.3.52
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 +2 -0
- package/package.json +7 -3
- package/src/assets/icons/salesforcebrand-sprite/svg/symbols.svg +125 -7
- package/src/assets/svg/privacyicon.png +0 -0
- package/src/modules/dx/banner/banner.ts +1 -1
- package/src/modules/dx/cardBlogPost/cardBlogPost.html +1 -3
- package/src/modules/dx/cardBlogPost/cardBlogPost.ts +1 -3
- package/src/modules/dx/cardContent/cardContent.css +5 -0
- package/src/modules/dx/cardContent/cardContent.html +10 -6
- package/src/modules/dx/cardContent/cardContent.ts +22 -7
- package/src/modules/dx/cardExpanded/cardExpanded.css +15 -5
- package/src/modules/dx/cardExpanded/cardExpanded.html +9 -5
- package/src/modules/dx/cardExpanded/cardExpanded.ts +24 -8
- package/src/modules/dx/cardNews/cardNews.css +14 -0
- package/src/modules/dx/cardNews/cardNews.ts +2 -1
- package/src/modules/dx/cardTrial/cardTrial.html +2 -0
- package/src/modules/dx/cardTrial/cardTrial.ts +32 -1
- package/src/modules/dx/cardTrialExpanded/cardTrialExpanded.html +1 -0
- package/src/modules/dx/cardTrialExpanded/cardTrialExpanded.ts +13 -0
- package/src/modules/dx/codeBlock/codeBlock.ts +6 -1
- package/src/modules/dx/codeBlock/darkTheme.css +8 -1
- package/src/modules/dx/codeBlock/lightTheme.css +8 -2
- package/src/modules/dx/dropdownOption/dropdownOption.html +2 -2
- package/src/modules/dx/featuredContentHeader/featuredContentHeader.css +18 -10
- package/src/modules/dx/featuredContentHeader/featuredContentHeader.html +109 -107
- package/src/modules/dx/featuredContentHeader/featuredContentHeader.ts +17 -9
- package/src/modules/dx/footer/footer.css +9 -0
- package/src/modules/dx/footer/footer.html +6 -0
- package/src/modules/dx/footer/footer.ts +5 -2
- package/src/modules/dx/footer/links.ts +11 -0
- package/src/modules/dx/formattedDateTime/formattedDateTime.ts +3 -3
- package/src/modules/dx/header/header.html +2 -2
- package/src/modules/dx/header/header.ts +4 -0
- package/src/modules/dx/headerSearch/headerSearch.html +0 -2
- package/src/modules/dx/headerSearch/headerSearch.ts +0 -1
- package/src/modules/dx/hr/hr.css +0 -3
- package/src/modules/dx/hr/hr.ts +7 -1
- package/src/modules/dx/input/input.ts +0 -2
- package/src/modules/dx/mainContentHeader/mainContentHeader.css +102 -0
- package/src/modules/dx/mainContentHeader/mainContentHeader.html +23 -0
- package/src/modules/dx/mainContentHeader/mainContentHeader.ts +35 -0
- package/src/modules/dx/scrollManager/scrollManager.html +1 -0
- package/src/modules/dx/scrollManager/scrollManager.ts +110 -0
- package/src/modules/dx/searchResults/searchResults.css +2 -2
- package/src/modules/dx/section/section.css +9 -0
- package/src/modules/dx/section/section.html +10 -0
- package/src/modules/dx/section/section.ts +5 -0
- package/src/modules/dx/sidebar/sidebar.css +4 -0
- package/src/modules/dx/sidebar/sidebar.html +1 -0
- package/src/modules/dx/sidebar/sidebar.ts +8 -0
- package/src/modules/dx/sidebarOld/sidebarOld.ts +2 -0
- package/src/modules/dx/sidebarSearch/sidebarSearch.html +0 -1
- package/src/modules/dx/sidebarSearch/sidebarSearch.ts +5 -1
- package/src/modules/dx/tbidAvatarButton/tbidAvatarButton.css +2 -2
- package/src/modules/dx/tbidAvatarButton/tbidAvatarButton.ts +3 -2
- package/src/modules/dx/toc/toc.ts +13 -0
- package/src/modules/dx/treeItem/treeItem.html +3 -2
- package/src/modules/dx/treeItem/treeItem.ts +18 -8
- package/src/modules/dx/typeBadge/typeBadge.ts +2 -2
- package/src/modules/dxBaseElements/headerBase/headerBase.ts +18 -8
- package/src/modules/dxHelpers/card/card.css +4 -0
- package/src/modules/dxHelpers/table/table.css +1 -10
- package/src/modules/dxUtils/dates/dates.ts +22 -1
- package/src/modules/dxUtils/normalizers/normalizers.ts +1 -3
- package/src/modules/dxUtils/prismjs/prismjs.ts +132 -14
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { LightningElement, api } from "lwc";
|
|
2
2
|
import cx from "classnames";
|
|
3
3
|
import { toJson } from "dxUtils/normalizers";
|
|
4
|
+
import { track } from "dxUtils/analytics";
|
|
4
5
|
|
|
5
6
|
export default class CardTrial extends LightningElement {
|
|
6
7
|
@api badgeBackgroundColor?: string = "indigo-vibrant-90";
|
|
@@ -71,6 +72,10 @@ export default class CardTrial extends LightningElement {
|
|
|
71
72
|
return this.hasButtons ? "menu" : "link";
|
|
72
73
|
}
|
|
73
74
|
|
|
75
|
+
get buttonOneTarget() {
|
|
76
|
+
return this.isExternalURL(this.buttonOneHref) ? "_blank" : null;
|
|
77
|
+
}
|
|
78
|
+
|
|
74
79
|
private _details!: string[];
|
|
75
80
|
private _modalDetails!: [{ title: string; subtitle: string }];
|
|
76
81
|
private _modalOpen = false;
|
|
@@ -93,10 +98,36 @@ export default class CardTrial extends LightningElement {
|
|
|
93
98
|
this._modalOpen = !this._modalOpen;
|
|
94
99
|
}
|
|
95
100
|
|
|
96
|
-
private handleClick() {
|
|
101
|
+
private handleClick(e: PointerEvent) {
|
|
97
102
|
// card is clickable only if it doesn't contain buttons (for accessibility reasons)
|
|
98
103
|
if (!this.hasButtons) {
|
|
99
104
|
window.location.assign(this.href);
|
|
105
|
+
if (this.href.includes("signup")) {
|
|
106
|
+
this.handleSignUpClick(e);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
private handleSignUpClick(e: PointerEvent) {
|
|
112
|
+
track(e.currentTarget!, "custEv_signupStart", {
|
|
113
|
+
click_text: this.label,
|
|
114
|
+
element_title: this.title,
|
|
115
|
+
element_type: "card",
|
|
116
|
+
click_url: this.href,
|
|
117
|
+
content_category: "cta"
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
private isExternalURL(url: string | undefined): boolean {
|
|
122
|
+
if (!url) {
|
|
123
|
+
return false;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
try {
|
|
127
|
+
const value = new URL(url);
|
|
128
|
+
return value.host !== window.location.host;
|
|
129
|
+
} catch (e) {
|
|
130
|
+
return false;
|
|
100
131
|
}
|
|
101
132
|
}
|
|
102
133
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { LightningElement, api } from "lwc";
|
|
2
2
|
import { toJson } from "dxUtils/normalizers";
|
|
3
|
+
import { track } from "dxUtils/analytics";
|
|
3
4
|
|
|
4
5
|
export default class CardTrial extends LightningElement {
|
|
5
6
|
@api badgeBackgroundColor?: string = "indigo-vibrant-90";
|
|
@@ -64,4 +65,16 @@ export default class CardTrial extends LightningElement {
|
|
|
64
65
|
private handleModalClose() {
|
|
65
66
|
this.dispatchEvent(new CustomEvent("togglemodal"));
|
|
66
67
|
}
|
|
68
|
+
|
|
69
|
+
private handleSignUpClick(e: PointerEvent) {
|
|
70
|
+
if (this.href.includes("signup")) {
|
|
71
|
+
track(e.currentTarget!, "custEv_signupStart", {
|
|
72
|
+
click_text: this.buttonCta,
|
|
73
|
+
element_title: this.title,
|
|
74
|
+
element_type: "card",
|
|
75
|
+
click_url: this.href,
|
|
76
|
+
content_category: "cta"
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
}
|
|
67
80
|
}
|
|
@@ -48,8 +48,13 @@ export default class CodeBlock extends LightningElement {
|
|
|
48
48
|
{ label: "Kotlin", id: "kotlin" },
|
|
49
49
|
{ label: "Python", id: "python" },
|
|
50
50
|
{ label: "Bash", id: "bash" },
|
|
51
|
+
{ label: "Shell", id: "shell" },
|
|
52
|
+
{ label: "Shell", id: "sh" },
|
|
51
53
|
{ label: "SQL", id: "sql" },
|
|
52
|
-
{ label: "YAML", id: "yaml" }
|
|
54
|
+
{ label: "YAML", id: "yaml" },
|
|
55
|
+
{ label: "Markdown", id: "markdown" },
|
|
56
|
+
{ label: "Markdown", id: "md" },
|
|
57
|
+
{ label: "JSX", id: "jsx" }
|
|
53
58
|
];
|
|
54
59
|
|
|
55
60
|
connectedCallback() {
|
|
@@ -54,6 +54,14 @@
|
|
|
54
54
|
color: var(--dx-g-purple-vibrant-70);
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
+
.dx-theme-dark .token.atrule {
|
|
58
|
+
color: var(--dx-g-purple-vibrant-70);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.dx-theme-dark .token.builtin {
|
|
62
|
+
color: var(--dx-g-purple-vibrant-70);
|
|
63
|
+
}
|
|
64
|
+
|
|
57
65
|
.dx-theme-dark .token.entity {
|
|
58
66
|
color: #fff;
|
|
59
67
|
background: var(--dx-g-blue-vibrant-10);
|
|
@@ -68,7 +76,6 @@
|
|
|
68
76
|
.dx-theme-dark .token.deleted,
|
|
69
77
|
.dx-theme-dark .token.constant,
|
|
70
78
|
.dx-theme-dark .token.number,
|
|
71
|
-
.dx-theme-dark .token.builtin,
|
|
72
79
|
.dx-theme-dark .token.important .dx-theme-dark .token.boolean,
|
|
73
80
|
.dx-theme-dark .token.symbol,
|
|
74
81
|
.dx-theme-dark .token.inserted,
|
|
@@ -30,6 +30,14 @@
|
|
|
30
30
|
color: var(--dx-g-teal-vibrant-40);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
.dx-theme-light .token.atrule {
|
|
34
|
+
color: var(--dx-g-pink-vibrant-40);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.dx-theme-light .token.builtin {
|
|
38
|
+
color: var(--dx-g-pink-vibrant-40);
|
|
39
|
+
}
|
|
40
|
+
|
|
33
41
|
.dx-theme-light .token.tag {
|
|
34
42
|
color: rgb(75, 36, 219);
|
|
35
43
|
}
|
|
@@ -55,9 +63,7 @@
|
|
|
55
63
|
.dx-theme-light .token.deleted,
|
|
56
64
|
.dx-theme-light .token.string,
|
|
57
65
|
.dx-theme-light .token.char,
|
|
58
|
-
.dx-theme-light .token.builtin,
|
|
59
66
|
.dx-theme-light .token.inserted,
|
|
60
|
-
.dx-theme-light .token.atrule,
|
|
61
67
|
.dx-theme-light .token.regex,
|
|
62
68
|
.dx-theme-light .token.important {
|
|
63
69
|
color: var(--dx-g-gray-10);
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
target={option.link.target}
|
|
7
7
|
key={option.id}
|
|
8
8
|
role="menuitem"
|
|
9
|
-
tabindex="
|
|
9
|
+
tabindex="0"
|
|
10
10
|
data-index={indexPosition}
|
|
11
11
|
onclick={onClick}
|
|
12
12
|
>
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
if:false={option.link}
|
|
36
36
|
class={className}
|
|
37
37
|
role="menuitem"
|
|
38
|
-
tabindex="
|
|
38
|
+
tabindex="0"
|
|
39
39
|
data-index={indexPosition}
|
|
40
40
|
onclick={onClick}
|
|
41
41
|
>
|
|
@@ -36,26 +36,34 @@
|
|
|
36
36
|
--swoop-height: var(--dx-c-featured-content-header-swoop-height);
|
|
37
37
|
--swoop-inset: calc(2.5 * var(--vertical-padding));
|
|
38
38
|
--swoop-z-index: 11;
|
|
39
|
+
--label-color: var(--dx-g-indigo-vibrant-40);
|
|
39
40
|
|
|
40
41
|
position: relative;
|
|
41
|
-
padding: var(--dx-c-featured-content-header-padding-vertical)
|
|
42
|
-
var(--dx-c-featured-content-header-padding-horizontal);
|
|
43
42
|
background: var(
|
|
44
43
|
--dx-c-featured-content-header-background-color,
|
|
45
44
|
var(--dx-g-indigo-vibrant-90)
|
|
46
45
|
);
|
|
47
46
|
}
|
|
48
47
|
|
|
48
|
+
.container-layout {
|
|
49
|
+
padding: var(--dx-c-featured-content-header-padding-vertical)
|
|
50
|
+
var(--dx-c-featured-content-header-padding-horizontal);
|
|
51
|
+
background-image: var(--background-image);
|
|
52
|
+
background-repeat: no-repeat;
|
|
53
|
+
background-position: top right;
|
|
54
|
+
background-size: contain;
|
|
55
|
+
}
|
|
56
|
+
|
|
49
57
|
/* LAYOUTS */
|
|
50
58
|
|
|
51
|
-
.img-placement_inline {
|
|
59
|
+
.img-placement_inline .container-layout {
|
|
52
60
|
display: grid;
|
|
53
61
|
grid-template-areas: "label label" "main image";
|
|
54
62
|
grid-template-columns: 50% auto;
|
|
55
63
|
grid-gap: 0 80px;
|
|
56
64
|
}
|
|
57
65
|
|
|
58
|
-
.img-placement_below {
|
|
66
|
+
.img-placement_below .container-layout {
|
|
59
67
|
--swoop-inset: calc(80px + 38vw);
|
|
60
68
|
|
|
61
69
|
margin-bottom: calc(var(--dx-c-bottom-image-height) / 2);
|
|
@@ -278,6 +286,7 @@
|
|
|
278
286
|
left: unset;
|
|
279
287
|
width: 126px;
|
|
280
288
|
height: 126px;
|
|
289
|
+
z-index: 1;
|
|
281
290
|
}
|
|
282
291
|
|
|
283
292
|
@media screen and (max-width: 1230px) {
|
|
@@ -356,7 +365,7 @@ a.image-container > img {
|
|
|
356
365
|
|
|
357
366
|
.label {
|
|
358
367
|
grid-area: label;
|
|
359
|
-
color: var(--dx-
|
|
368
|
+
color: var(--dx-c-featured-content-label-color, var(--label-color));
|
|
360
369
|
padding-bottom: var(--dx-g-spacing-lg);
|
|
361
370
|
}
|
|
362
371
|
|
|
@@ -380,7 +389,10 @@ dx-image-and-label {
|
|
|
380
389
|
}
|
|
381
390
|
|
|
382
391
|
/* DARK VARIANT */
|
|
392
|
+
|
|
383
393
|
.variant_dark {
|
|
394
|
+
--label-color: rgb(190, 199, 246);
|
|
395
|
+
|
|
384
396
|
background: var(
|
|
385
397
|
--dx-c-featured-content-header-background-color,
|
|
386
398
|
linear-gradient(-180deg, rgb(40, 23, 153) 0%, rgb(46, 43, 182) 100%)
|
|
@@ -391,10 +403,6 @@ dx-image-and-label {
|
|
|
391
403
|
--dx-c-image-and-label-text-color: white;
|
|
392
404
|
}
|
|
393
405
|
|
|
394
|
-
.variant_dark .label {
|
|
395
|
-
color: rgb(190, 199, 246);
|
|
396
|
-
}
|
|
397
|
-
|
|
398
406
|
.variant_dark .title,
|
|
399
407
|
.variant_dark .body {
|
|
400
408
|
color: white;
|
|
@@ -457,7 +465,7 @@ dx-image-and-label {
|
|
|
457
465
|
--swoop-inset: 64px;
|
|
458
466
|
}
|
|
459
467
|
|
|
460
|
-
.img-placement_inline {
|
|
468
|
+
.img-placement_inline .container-layout {
|
|
461
469
|
display: grid;
|
|
462
470
|
grid-template-areas: "label" "image" "main";
|
|
463
471
|
grid-template-columns: 100%;
|
|
@@ -1,117 +1,119 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class={classname} part="container">
|
|
3
|
-
<
|
|
4
|
-
<h1 if:true={label} class="label dx-text-heading-4">{label}</h1>
|
|
5
|
-
</template>
|
|
6
|
-
<template if:false={labelAsPrimaryHeading}>
|
|
7
|
-
<p if:true={label} class="label dx-text-heading-4">{label}</p>
|
|
8
|
-
</template>
|
|
9
|
-
<div class="featured-content-main-content">
|
|
10
|
-
<template if:false={labelAsPrimaryHeading}>
|
|
11
|
-
<h1 class="title dx-text-heading-2">
|
|
12
|
-
<a
|
|
13
|
-
class="title-link"
|
|
14
|
-
if:true={href}
|
|
15
|
-
href={href}
|
|
16
|
-
target={target}
|
|
17
|
-
onmouseenter={setLinkHovered}
|
|
18
|
-
onmouseleave={setLinkInactive}
|
|
19
|
-
>
|
|
20
|
-
{title}
|
|
21
|
-
</a>
|
|
22
|
-
<template if:false={href}>{title}</template>
|
|
23
|
-
</h1>
|
|
24
|
-
</template>
|
|
2
|
+
<div class={classname} part="container" style={style}>
|
|
3
|
+
<div class="container-layout">
|
|
25
4
|
<template if:true={labelAsPrimaryHeading}>
|
|
26
|
-
<
|
|
27
|
-
<a
|
|
28
|
-
class="title-link"
|
|
29
|
-
if:true={href}
|
|
30
|
-
href={href}
|
|
31
|
-
target={target}
|
|
32
|
-
onmouseenter={setLinkHovered}
|
|
33
|
-
onmouseleave={setLinkInactive}
|
|
34
|
-
>
|
|
35
|
-
{title}
|
|
36
|
-
</a>
|
|
37
|
-
<template if:false={href}>{title}</template>
|
|
38
|
-
</h2>
|
|
5
|
+
<h1 if:true={label} class="label dx-text-heading-4">{label}</h1>
|
|
39
6
|
</template>
|
|
40
|
-
<
|
|
41
|
-
<
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
7
|
+
<template if:false={labelAsPrimaryHeading}>
|
|
8
|
+
<p if:true={label} class="label dx-text-heading-4">{label}</p>
|
|
9
|
+
</template>
|
|
10
|
+
<div class="featured-content-main-content">
|
|
11
|
+
<template if:false={labelAsPrimaryHeading}>
|
|
12
|
+
<h1 class="title dx-text-heading-2">
|
|
13
|
+
<a
|
|
14
|
+
class="title-link"
|
|
15
|
+
if:true={href}
|
|
16
|
+
href={href}
|
|
17
|
+
target={target}
|
|
18
|
+
onmouseenter={setLinkHovered}
|
|
19
|
+
onmouseleave={setLinkInactive}
|
|
20
|
+
>
|
|
21
|
+
{title}
|
|
22
|
+
</a>
|
|
23
|
+
<template if:false={href}>{title}</template>
|
|
24
|
+
</h1>
|
|
25
|
+
</template>
|
|
26
|
+
<template if:true={labelAsPrimaryHeading}>
|
|
27
|
+
<h2 class="title dx-text-heading-2">
|
|
28
|
+
<a
|
|
29
|
+
class="title-link"
|
|
30
|
+
if:true={href}
|
|
31
|
+
href={href}
|
|
32
|
+
target={target}
|
|
33
|
+
onmouseenter={setLinkHovered}
|
|
34
|
+
onmouseleave={setLinkInactive}
|
|
35
|
+
>
|
|
36
|
+
{title}
|
|
37
|
+
</a>
|
|
38
|
+
<template if:false={href}>{title}</template>
|
|
39
|
+
</h2>
|
|
49
40
|
</template>
|
|
41
|
+
<div class="authors" if:true={authors}>
|
|
42
|
+
<template for:each={authors} for:item="author">
|
|
43
|
+
<dx-image-and-label
|
|
44
|
+
key={author.key}
|
|
45
|
+
img-src={author.imgSrc}
|
|
46
|
+
img-size={author.imgSize}
|
|
47
|
+
label={author.name}
|
|
48
|
+
href={author.href}
|
|
49
|
+
></dx-image-and-label>
|
|
50
|
+
</template>
|
|
51
|
+
</div>
|
|
52
|
+
<span class="body dx-text-body-1">{body}</span>
|
|
53
|
+
<div class="slot-container">
|
|
54
|
+
<slot onslotchange={onSlotChange}></slot>
|
|
55
|
+
</div>
|
|
56
|
+
<div
|
|
57
|
+
class={backgroundImageClass}
|
|
58
|
+
if:true={hasBackgroundImage}
|
|
59
|
+
lwc:dom="manual"
|
|
60
|
+
></div>
|
|
50
61
|
</div>
|
|
51
|
-
<
|
|
52
|
-
|
|
53
|
-
<slot onslotchange={onSlotChange}></slot>
|
|
62
|
+
<div if:true={hasPlainImage} class="image-container">
|
|
63
|
+
<img src={imgSrc} alt={imgAlt} />
|
|
54
64
|
</div>
|
|
55
|
-
<
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
<img src={imgSrc} alt={imgAlt} />
|
|
63
|
-
</div>
|
|
64
|
-
<a
|
|
65
|
-
if:true={hasLinkedImage}
|
|
66
|
-
href={href}
|
|
67
|
-
target={target}
|
|
68
|
-
class="image-container"
|
|
69
|
-
onmouseenter={setLinkHovered}
|
|
70
|
-
onmouseleave={setLinkInactive}
|
|
71
|
-
>
|
|
72
|
-
<img src={imgSrc} alt={imgAlt} />
|
|
73
|
-
</a>
|
|
74
|
-
<template if:false={noSwoop}>
|
|
75
|
-
<svg
|
|
76
|
-
class="swoop-silhouette"
|
|
77
|
-
width="1920px"
|
|
78
|
-
height="331px"
|
|
79
|
-
viewBox="0 0 1920 331"
|
|
80
|
-
version="1.1"
|
|
81
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
82
|
-
preserveAspectRatio="none"
|
|
65
|
+
<a
|
|
66
|
+
if:true={hasLinkedImage}
|
|
67
|
+
href={href}
|
|
68
|
+
target={target}
|
|
69
|
+
class="image-container"
|
|
70
|
+
onmouseenter={setLinkHovered}
|
|
71
|
+
onmouseleave={setLinkInactive}
|
|
83
72
|
>
|
|
84
|
-
<
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
fill-rule="evenodd"
|
|
73
|
+
<img src={imgSrc} alt={imgAlt} />
|
|
74
|
+
</a>
|
|
75
|
+
<template if:false={noSwoop}>
|
|
76
|
+
<svg
|
|
77
|
+
class="swoop-silhouette"
|
|
78
|
+
width="1920px"
|
|
79
|
+
height="331px"
|
|
80
|
+
viewBox="0 0 1920 331"
|
|
81
|
+
version="1.1"
|
|
82
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
83
|
+
preserveAspectRatio="none"
|
|
96
84
|
>
|
|
97
|
-
<
|
|
98
|
-
<
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
85
|
+
<defs>
|
|
86
|
+
<path
|
|
87
|
+
d="M1920,330 L76.7313881,330.008182 C51.2800917,330.255837 25.7029624,330.372286 0,330.357528 L0,330 L76.7313881,330.008182 C789.975765,323.067922 1404.39864,213.086385 1920,0.0635708029 L1920,0.0635708029 L1920,330 Z"
|
|
88
|
+
id="path-1"
|
|
89
|
+
></path>
|
|
90
|
+
</defs>
|
|
91
|
+
<g
|
|
92
|
+
id="Documentation-landing-page"
|
|
93
|
+
stroke="none"
|
|
94
|
+
stroke-width="1"
|
|
95
|
+
fill="none"
|
|
96
|
+
fill-rule="evenodd"
|
|
97
|
+
>
|
|
98
|
+
<mask id="mask-2" fill="white">
|
|
99
|
+
<use xlink:href="#path-1"></use>
|
|
100
|
+
</mask>
|
|
101
|
+
<use
|
|
102
|
+
id="Combined-Shape"
|
|
103
|
+
fill="#FFFFFF"
|
|
104
|
+
xlink:href="#path-1"
|
|
105
|
+
></use>
|
|
106
|
+
</g>
|
|
107
|
+
</svg>
|
|
108
|
+
</template>
|
|
109
|
+
</div>
|
|
110
|
+
<div class="blue-circle" if:true={hasIcon}>
|
|
111
|
+
<dx-icon
|
|
112
|
+
class="icon"
|
|
113
|
+
size="2xlarge"
|
|
114
|
+
symbol={icon}
|
|
115
|
+
sprite="salesforcebrand"
|
|
116
|
+
></dx-icon>
|
|
117
|
+
</div>
|
|
116
118
|
</div>
|
|
117
119
|
</template>
|
|
@@ -17,7 +17,8 @@ export default class FeaturedContentHeader extends LightningElement {
|
|
|
17
17
|
@api href?: string;
|
|
18
18
|
@api target?: string | null = null;
|
|
19
19
|
@api title!: string;
|
|
20
|
-
@api backgroundImg?:
|
|
20
|
+
@api backgroundImg?: string;
|
|
21
|
+
@api backgroundImgId?:
|
|
21
22
|
| "trees"
|
|
22
23
|
| "codey"
|
|
23
24
|
| "blog"
|
|
@@ -38,7 +39,7 @@ export default class FeaturedContentHeader extends LightningElement {
|
|
|
38
39
|
if (this._authors && this._authors.length) {
|
|
39
40
|
return this._authors!.map((author, index) => ({
|
|
40
41
|
...author,
|
|
41
|
-
imgSrc: author.
|
|
42
|
+
imgSrc: author.image_src,
|
|
42
43
|
key: index
|
|
43
44
|
}));
|
|
44
45
|
}
|
|
@@ -58,7 +59,14 @@ export default class FeaturedContentHeader extends LightningElement {
|
|
|
58
59
|
this.dark && "variant_dark",
|
|
59
60
|
this.isLinkHovered && "link-hovered",
|
|
60
61
|
!this.isSlotEmpty && "has-slotted",
|
|
61
|
-
this.
|
|
62
|
+
this.backgroundImgId && `custom-bg-${this.backgroundImgId}`
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
private get style() {
|
|
67
|
+
return cx(
|
|
68
|
+
this.backgroundImg &&
|
|
69
|
+
`--background-image: url(${this.backgroundImg});`
|
|
62
70
|
);
|
|
63
71
|
}
|
|
64
72
|
|
|
@@ -71,17 +79,17 @@ export default class FeaturedContentHeader extends LightningElement {
|
|
|
71
79
|
}
|
|
72
80
|
|
|
73
81
|
private get hasBackgroundImage() {
|
|
74
|
-
return this.
|
|
82
|
+
return this.backgroundImgId !== null;
|
|
75
83
|
}
|
|
76
84
|
|
|
77
85
|
private get hasIcon(): boolean {
|
|
78
|
-
return this.icon !== "" && this.
|
|
86
|
+
return this.icon !== "" && this.backgroundImgId === "big-moon";
|
|
79
87
|
}
|
|
80
88
|
|
|
81
89
|
private get backgroundImageClass() {
|
|
82
90
|
return cx(
|
|
83
91
|
"bg-image-container",
|
|
84
|
-
this.
|
|
92
|
+
this.backgroundImgId && `bg-${this.backgroundImgId}`
|
|
85
93
|
);
|
|
86
94
|
}
|
|
87
95
|
|
|
@@ -100,13 +108,13 @@ export default class FeaturedContentHeader extends LightningElement {
|
|
|
100
108
|
renderedCallback(): void {
|
|
101
109
|
// Setting the svgs with innerHTML prevents their IDs from being rewritten
|
|
102
110
|
// which is necessary to preserve the svg masking and other effects
|
|
103
|
-
if (this.
|
|
111
|
+
if (this.backgroundImgId && svgs[this.backgroundImgId]) {
|
|
104
112
|
const bgSvg = this.template.querySelector(".bg-image-container");
|
|
105
113
|
if (bgSvg) {
|
|
106
114
|
// eslint-disable-next-line @lwc/lwc/no-inner-html
|
|
107
115
|
bgSvg.innerHTML = `
|
|
108
|
-
${svgs[this.
|
|
109
|
-
${svgs[this.
|
|
116
|
+
${svgs[this.backgroundImgId].desktop}
|
|
117
|
+
${svgs[this.backgroundImgId].mobile}
|
|
110
118
|
`;
|
|
111
119
|
}
|
|
112
120
|
}
|
|
@@ -44,6 +44,11 @@ footer.signup-variant-no-signup {
|
|
|
44
44
|
color: var(--dx-g-blue-vibrant-20);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
.term-icon {
|
|
48
|
+
width: 35px;
|
|
49
|
+
margin: 0 var(--dx-g-spacing-xs);
|
|
50
|
+
}
|
|
51
|
+
|
|
47
52
|
/* TOP */
|
|
48
53
|
|
|
49
54
|
.content-container_top {
|
|
@@ -402,4 +407,8 @@ footer.signup-variant-no-signup {
|
|
|
402
407
|
.subscription dx-input {
|
|
403
408
|
width: 100%;
|
|
404
409
|
}
|
|
410
|
+
|
|
411
|
+
.term-icon {
|
|
412
|
+
margin-left: 0;
|
|
413
|
+
}
|
|
405
414
|
}
|
|
@@ -139,6 +139,12 @@
|
|
|
139
139
|
</template>
|
|
140
140
|
<template if:false={term.onclick}>
|
|
141
141
|
<a href={term.href} key={term.label} rel={term.rel}>
|
|
142
|
+
<img
|
|
143
|
+
if:true={term.img}
|
|
144
|
+
class="term-icon"
|
|
145
|
+
src={term.img}
|
|
146
|
+
alt="Footer Term Icon"
|
|
147
|
+
/>
|
|
142
148
|
{term.label}
|
|
143
149
|
</a>
|
|
144
150
|
</template>
|
|
@@ -12,8 +12,11 @@ import {
|
|
|
12
12
|
import { track } from "dxUtils/analytics";
|
|
13
13
|
|
|
14
14
|
const PATH = "/newsletter";
|
|
15
|
-
const
|
|
16
|
-
|
|
15
|
+
const LOCAL_STORAGE_KEY = "subscriberEmail";
|
|
16
|
+
const createNewsletterSignupHref = (email: string): string => {
|
|
17
|
+
window.localStorage.setItem(LOCAL_STORAGE_KEY, email);
|
|
18
|
+
return PATH;
|
|
19
|
+
};
|
|
17
20
|
|
|
18
21
|
const ANALYTICS_INFO = {
|
|
19
22
|
itemTitle: "Newsletter Sign Up Footer",
|
|
@@ -167,6 +167,11 @@ export const termsLinks = [
|
|
|
167
167
|
rel: "nofollow",
|
|
168
168
|
label: "Cookie Preferences",
|
|
169
169
|
onclick: openOneTrustInfoDisplay
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
href: "https://www.salesforce.com/form/other/privacy-request/",
|
|
173
|
+
label: "Your Privacy Choices",
|
|
174
|
+
img: "/assets/svg/privacyicon.png"
|
|
170
175
|
}
|
|
171
176
|
];
|
|
172
177
|
|
|
@@ -206,5 +211,11 @@ export const socialLinks = [
|
|
|
206
211
|
iconSymbol: "rss",
|
|
207
212
|
iconSprite: "general",
|
|
208
213
|
label: "RSS"
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
href: "https://www.instagram.com/salesforcedevs",
|
|
217
|
+
iconSymbol: "instagram",
|
|
218
|
+
iconSprite: "brand",
|
|
219
|
+
label: "Instagram"
|
|
209
220
|
}
|
|
210
221
|
];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { LightningElement, api } from "lwc";
|
|
2
|
+
import { convertForDaylightSavings } from "dxUtils/dates";
|
|
2
3
|
import {
|
|
3
4
|
formattedDateDay,
|
|
4
5
|
formattedDateHour,
|
|
@@ -27,7 +28,7 @@ export default class FormattedDateTime extends LightningElement {
|
|
|
27
28
|
return;
|
|
28
29
|
}
|
|
29
30
|
|
|
30
|
-
this._unformattedDate =
|
|
31
|
+
this._unformattedDate = convertForDaylightSavings(value).toJSDate();
|
|
31
32
|
|
|
32
33
|
if (this._unformattedDate.toString() === "Invalid Date") {
|
|
33
34
|
// this is a fix for Safari since it doesn't support date strings with 'yyyy/mm/dd' patterns
|
|
@@ -62,7 +63,7 @@ export default class FormattedDateTime extends LightningElement {
|
|
|
62
63
|
}
|
|
63
64
|
|
|
64
65
|
getOptions() {
|
|
65
|
-
|
|
66
|
+
return {
|
|
66
67
|
weekday: this.weekday || undefined,
|
|
67
68
|
year: this.year || undefined,
|
|
68
69
|
month: this.month || undefined,
|
|
@@ -72,6 +73,5 @@ export default class FormattedDateTime extends LightningElement {
|
|
|
72
73
|
second: this.second,
|
|
73
74
|
timeZoneName: this.timeZoneName || undefined
|
|
74
75
|
};
|
|
75
|
-
return options;
|
|
76
76
|
}
|
|
77
77
|
}
|