@salesforcedevs/dw-components 1.16.2 → 1.17.0
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 +0 -1
- package/package.json +2 -2
- package/src/modules/dw/blogsGrid/blogsGrid.css +0 -74
- package/src/modules/dw/blogsGrid/blogsGrid.html +0 -40
- package/src/modules/dw/blogsGrid/blogsGrid.ts +0 -26
- package/src/modules/dw/newsletterForm/newsletterForm.ts +1 -1
- package/src/modules/dw/slackCta/slackCta.css +0 -46
- package/src/modules/dw/slackCta/slackCta.html +0 -17
- package/src/modules/dw/slackCta/slackCta.ts +0 -12
package/lwc.config.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforcedevs/dw-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.17.0",
|
|
4
4
|
"description": "Lightning web components for https://developer.salesforce.com",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"@types/setimmediate": "1.0.4",
|
|
27
27
|
"setimmediate": "1.0.5"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "1ffac16d66295e04f390e3240328e7f7a9541268"
|
|
30
30
|
}
|
|
@@ -5,80 +5,6 @@
|
|
|
5
5
|
--dx-c-post-list-padding-horizontal: var(--dx-g-page-padding-horizontal);
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
.title {
|
|
9
|
-
font-family: var(--dx-g-font-display);
|
|
10
|
-
color: var(--dx-g-blue-vibrant-20);
|
|
11
|
-
font-weight: 500;
|
|
12
|
-
text-align: center;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
dx-section.section-reduced-padding {
|
|
16
|
-
--dx-c-section-padding-vertical: unset;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
@media only screen and (min-width: 640px) {
|
|
20
|
-
.title {
|
|
21
|
-
font-size: 24px;
|
|
22
|
-
height: 64px;
|
|
23
|
-
letter-spacing: -0.5px;
|
|
24
|
-
line-height: 32px;
|
|
25
|
-
width: 500px;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
@media only screen and (max-width: 640px) {
|
|
30
|
-
.title {
|
|
31
|
-
font-size: 20px;
|
|
32
|
-
height: 84px;
|
|
33
|
-
letter-spacing: -0.4px;
|
|
34
|
-
line-height: 28px;
|
|
35
|
-
width: 321px;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.box {
|
|
39
|
-
background-position: 0% 25%, 90% 75%;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.button {
|
|
44
|
-
font-size: 14px;
|
|
45
|
-
font-weight: 500;
|
|
46
|
-
letter-spacing: 0;
|
|
47
|
-
height: 48px;
|
|
48
|
-
padding: 10px;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.subscription-box {
|
|
52
|
-
align-items: center;
|
|
53
|
-
display: flex;
|
|
54
|
-
flex-direction: column;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.subscription-box > .box > .content > .title {
|
|
58
|
-
color: var(--dx-g-text-heading-color);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.content {
|
|
62
|
-
align-items: center;
|
|
63
|
-
display: flex;
|
|
64
|
-
flex-direction: column;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.cta-container {
|
|
68
|
-
width: 100%;
|
|
69
|
-
display: flex;
|
|
70
|
-
align-items: center;
|
|
71
|
-
justify-content: center;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.box {
|
|
75
|
-
background-image: var(--dx-blog-grid-themed-left-subscribe-image),
|
|
76
|
-
var(--dx-blog-grid-themed-right-subscribe-image);
|
|
77
|
-
background-position: 4% 25%, 90% 60%;
|
|
78
|
-
background-repeat: no-repeat;
|
|
79
|
-
width: 100%;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
8
|
.icon {
|
|
83
9
|
float: right;
|
|
84
10
|
margin-left: 6px;
|
|
@@ -1,44 +1,4 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<dx-hr spacing="2xl"></dx-hr>
|
|
3
|
-
|
|
4
|
-
<dx-section class="section-padding-lg section-reduced-padding">
|
|
5
|
-
<div class="subscription-box">
|
|
6
|
-
<div class="box">
|
|
7
|
-
<div class="content">
|
|
8
|
-
<h2 class="title">{rssTitle}</h2>
|
|
9
|
-
<p lwc:if={rssBody}>{rssBody}</p>
|
|
10
|
-
<div class="cta-container">
|
|
11
|
-
<dx-button
|
|
12
|
-
size="small"
|
|
13
|
-
variant="secondary"
|
|
14
|
-
icon-symbol="slack"
|
|
15
|
-
icon-sprite="salesforcebrand"
|
|
16
|
-
icon-position="left"
|
|
17
|
-
href="/slack/install"
|
|
18
|
-
class="button"
|
|
19
|
-
>
|
|
20
|
-
{rssBtnOneLabel}
|
|
21
|
-
</dx-button>
|
|
22
|
-
<dx-button
|
|
23
|
-
size="small"
|
|
24
|
-
variant="secondary"
|
|
25
|
-
icon-symbol="rss"
|
|
26
|
-
icon-position="left"
|
|
27
|
-
icon-sprite="general"
|
|
28
|
-
href="https://developer.salesforce.com/blogs/feed"
|
|
29
|
-
class="button"
|
|
30
|
-
onclick={rssOnClick}
|
|
31
|
-
>
|
|
32
|
-
{rssBtnTwoLabel}
|
|
33
|
-
</dx-button>
|
|
34
|
-
</div>
|
|
35
|
-
</div>
|
|
36
|
-
</div>
|
|
37
|
-
</div>
|
|
38
|
-
</dx-section>
|
|
39
|
-
|
|
40
|
-
<dx-hr spacing="2xl"></dx-hr>
|
|
41
|
-
|
|
42
2
|
<div class="container">
|
|
43
3
|
<dx-grid columns={columns}>
|
|
44
4
|
<template for:each={postList} for:item="post">
|
|
@@ -1,26 +1,11 @@
|
|
|
1
1
|
import { api } from "lwc";
|
|
2
2
|
import { normalizePost } from "dxUtils/normalizers";
|
|
3
|
-
import { track } from "dxUtils/analytics";
|
|
4
3
|
import { WordpressBlogPost, NormalizedPost } from "typings/custom";
|
|
5
4
|
import { PostsGrid } from "dwUtils/postsGrid";
|
|
6
5
|
|
|
7
|
-
const BLOG_SUBSCRIBE_HREF = "https://developer.salesforce.com/blogs/feed";
|
|
8
|
-
|
|
9
|
-
const ANALYTICS_INFO = {
|
|
10
|
-
click_text: "Subscribe to RSS",
|
|
11
|
-
element_title: "Subscribe to RSS",
|
|
12
|
-
click_url: BLOG_SUBSCRIBE_HREF,
|
|
13
|
-
content_category: "cta"
|
|
14
|
-
};
|
|
15
|
-
|
|
16
6
|
export default class BlogsGrid extends PostsGrid {
|
|
17
7
|
@api showMoreLabel = "SHOW MORE";
|
|
18
8
|
@api viewArchivesLabel = "VIEW ARCHIVES";
|
|
19
|
-
@api rssTitle =
|
|
20
|
-
"Get the latest Salesforce Developer blog posts and podcast episodes via Slack or RSS.";
|
|
21
|
-
@api rssBody?: string;
|
|
22
|
-
@api rssBtnOneLabel = "Add to Slack";
|
|
23
|
-
@api rssBtnTwoLabel = "Subscribe to RSS";
|
|
24
9
|
@api archiveCta = "/content-archive?content-type=Blogs";
|
|
25
10
|
|
|
26
11
|
_loadMoreAmount = 21;
|
|
@@ -28,15 +13,4 @@ export default class BlogsGrid extends PostsGrid {
|
|
|
28
13
|
normalizePost(post: WordpressBlogPost): NormalizedPost {
|
|
29
14
|
return normalizePost(post);
|
|
30
15
|
}
|
|
31
|
-
|
|
32
|
-
rssOnClick(event: Event): void {
|
|
33
|
-
track(event.target!, "custEv_ctaButtonClick", {
|
|
34
|
-
...ANALYTICS_INFO,
|
|
35
|
-
element_type: "button"
|
|
36
|
-
});
|
|
37
|
-
track(event.target!, "custEv_linkClick", {
|
|
38
|
-
...ANALYTICS_INFO,
|
|
39
|
-
element_type: "link"
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
16
|
}
|
|
@@ -168,7 +168,7 @@ export default class Form extends LightningElement {
|
|
|
168
168
|
) as HTMLFormElement;
|
|
169
169
|
|
|
170
170
|
submitButtonEl.setAttribute("disabled", "true");
|
|
171
|
-
submitButtonEl.textContent = "...Processing request";
|
|
171
|
+
submitButtonEl.textContent = "... Processing request";
|
|
172
172
|
|
|
173
173
|
try {
|
|
174
174
|
const res = await fetch(
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
@import "dxHelpers/reset";
|
|
2
|
-
@import "dxHelpers/text";
|
|
3
|
-
|
|
4
|
-
.container {
|
|
5
|
-
background-repeat: no-repeat;
|
|
6
|
-
display: flex;
|
|
7
|
-
flex-flow: column wrap;
|
|
8
|
-
align-items: center;
|
|
9
|
-
justify-content: center;
|
|
10
|
-
text-align: center;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.button {
|
|
14
|
-
padding: 10px;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.podcast {
|
|
18
|
-
background-image: url("https://a.sfdcstatic.com/developer-website/images/slack-cta-podcast-background-left.svg"),
|
|
19
|
-
url("https://a.sfdcstatic.com/developer-website/images/slack-cta-podcast-background-right.svg");
|
|
20
|
-
background-position: 20% 0%, 80% 100%;
|
|
21
|
-
padding-top: 20px;
|
|
22
|
-
margin-top: -20px;
|
|
23
|
-
padding-bottom: var(--dx-g-spacing-2xl);
|
|
24
|
-
margin-bottom: calc(var(--dx-g-spacing-2xl) * -1);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.dx-text-display-6 {
|
|
28
|
-
font-size: var(--dx-g-text-xl);
|
|
29
|
-
max-width: 370px;
|
|
30
|
-
}
|
|
31
|
-
@media screen and (max-width: 1000px) {
|
|
32
|
-
.podcast {
|
|
33
|
-
background-position: 10% 10%, 90% 100%;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
@media screen and (max-width: 768px) {
|
|
38
|
-
.dx-text-display-6 {
|
|
39
|
-
max-width: 28ex;
|
|
40
|
-
font-size: var(--dx-g-text-lg);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.podcast {
|
|
44
|
-
background-image: none;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class={containerClass}>
|
|
3
|
-
<h2 class="dx-text-display-6"><slot></slot></h2>
|
|
4
|
-
|
|
5
|
-
<dx-button
|
|
6
|
-
size="small"
|
|
7
|
-
variant="secondary"
|
|
8
|
-
icon-symbol="slack"
|
|
9
|
-
icon-sprite="salesforcebrand"
|
|
10
|
-
icon-position="left"
|
|
11
|
-
href="/slack/install"
|
|
12
|
-
class="button"
|
|
13
|
-
>
|
|
14
|
-
{innerText}
|
|
15
|
-
</dx-button>
|
|
16
|
-
</div>
|
|
17
|
-
</template>
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { LightningElement, api } from "lwc";
|
|
2
|
-
import { SlackCtaBackgroundVariant } from "typings/custom";
|
|
3
|
-
import cx from "classnames";
|
|
4
|
-
|
|
5
|
-
export default class SlackAdd extends LightningElement {
|
|
6
|
-
@api innerText?: string = "Add to Slack";
|
|
7
|
-
@api background?: SlackCtaBackgroundVariant;
|
|
8
|
-
|
|
9
|
-
get containerClass() {
|
|
10
|
-
return cx("container", this.background);
|
|
11
|
-
}
|
|
12
|
-
}
|