@salesforcedevs/dw-components 0.75.2 → 0.79.3
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/LICENSE +12 -0
- package/package.json +3 -2
- package/src/modules/dw/blogsGrid/blogsGrid.css +1 -1
- package/src/modules/dw/blogsGrid/blogsGrid.html +3 -2
- package/src/modules/dw/codeSamplesGrid/codeSamplesGrid.css +0 -5
- package/src/modules/dw/codeSamplesGrid/codeSamplesGrid.html +3 -3
- package/src/modules/dw/codeSamplesGrid/codeSamplesGrid.ts +7 -6
- package/src/modules/dw/contentArchive/utils.ts +1 -1
- package/src/modules/dw/deSignupForm/deSignupForm.ts +1 -1
- package/src/modules/dw/deSignupForm/submitForm.ts +5 -2
- package/src/modules/dw/docsGrid/docsGrid.html +7 -2
- package/src/modules/dw/eventsList/eventsList.html +5 -1
- package/src/modules/dw/podcastSubscription/podcastSubscription.ts +1 -1
- package/src/modules/dw/podcastsGrid/podcastsGrid.html +1 -1
- package/src/modules/dw/podcastsPromo/podcastsPromo.html +12 -6
- package/src/modules/dw/slackSuccess/slackSuccess.ts +3 -1
- package/src/modules/dw/searchResults/coveo.css +0 -18989
package/LICENSE
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Copyright (c) 2020, Salesforce.com, Inc.
|
|
2
|
+
All rights reserved.
|
|
3
|
+
|
|
4
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
5
|
+
|
|
6
|
+
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
7
|
+
|
|
8
|
+
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
9
|
+
|
|
10
|
+
* Neither the name of Salesforce.com nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
|
11
|
+
|
|
12
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforcedevs/dw-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.79.3",
|
|
4
4
|
"description": "Lightning web components for https://developer.salesforce.com",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -21,5 +21,6 @@
|
|
|
21
21
|
"@types/lodash.clonedeep": "^4.5.7",
|
|
22
22
|
"@types/lodash.orderby": "^4.6.7",
|
|
23
23
|
"@types/lodash.uniqby": "^4.7.7"
|
|
24
|
-
}
|
|
24
|
+
},
|
|
25
|
+
"gitHead": "1ac28eaeb46528d77fbaabad4471b9e87e39d08e"
|
|
25
26
|
}
|
|
@@ -73,7 +73,7 @@ dx-section.section-reduced-padding {
|
|
|
73
73
|
|
|
74
74
|
.box {
|
|
75
75
|
background-image: url("/assets/svg/subscribe-background-left.svg"),
|
|
76
|
-
|
|
76
|
+
url("/assets/svg/subscribe-background-right.svg");
|
|
77
77
|
background-position: 4% 25%, 90% 60%;
|
|
78
78
|
background-repeat: no-repeat;
|
|
79
79
|
width: 100%;
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
<div class="box">
|
|
7
7
|
<div class="content">
|
|
8
8
|
<h2 class="title">
|
|
9
|
-
Get the latest Salesforce Developer blog posts and
|
|
9
|
+
Get the latest Salesforce Developer blog posts and
|
|
10
|
+
podcast episodes via Slack or RSS.
|
|
10
11
|
</h2>
|
|
11
12
|
<div class="cta-container">
|
|
12
13
|
<dx-button
|
|
@@ -65,7 +66,7 @@
|
|
|
65
66
|
if:true={showArchives}
|
|
66
67
|
onclick={onClick}
|
|
67
68
|
variant="link"
|
|
68
|
-
href=
|
|
69
|
+
href="/content-archive?content-type=Blogs"
|
|
69
70
|
text="VIEW ARCHIVES"
|
|
70
71
|
></dx-hr>
|
|
71
72
|
</div>
|
|
@@ -83,11 +83,6 @@ dx-section:first-of-type {
|
|
|
83
83
|
margin: 50px auto;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
dx-type-badge.platform {
|
|
87
|
-
--dx-c-type-badge-color: var(--dx-g-green-vibrant-40);
|
|
88
|
-
--dx-c-type-badge-background: var(--dx-g-green-vibrant-90);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
86
|
@media screen and (max-width: 1024px) {
|
|
92
87
|
.code-samples-feature {
|
|
93
88
|
--dx-c-feature-description-font-size: 14px;
|
|
@@ -102,10 +102,10 @@
|
|
|
102
102
|
>
|
|
103
103
|
<div class="badge-link-container">
|
|
104
104
|
<div class="badge-container">
|
|
105
|
-
<dx-
|
|
105
|
+
<dx-metadata-badge
|
|
106
106
|
value={item.product}
|
|
107
|
-
|
|
108
|
-
></dx-
|
|
107
|
+
size="small"
|
|
108
|
+
></dx-metadata-badge>
|
|
109
109
|
</div>
|
|
110
110
|
<div class="external-link-container">
|
|
111
111
|
<dx-button
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { api, LightningElement } from "lwc";
|
|
2
|
-
import { DocsTile, DropdownItem, CodeSample } from "typings/custom";
|
|
3
2
|
import qs from "query-string";
|
|
4
3
|
import uniqBy from "lodash.uniqby";
|
|
5
4
|
import orderBy from "lodash.orderby";
|
|
6
5
|
import cloneDeep from "lodash.clonedeep";
|
|
6
|
+
import { DocsTile, DropdownItem, CodeSample } from "typings/custom";
|
|
7
|
+
import { toJson } from "dxUtils/normalizers";
|
|
7
8
|
|
|
8
9
|
const PRODUCT_FILTER_ALL_PRODUCTS = "all products";
|
|
9
10
|
const LANGUAGE_FILTER_LABEL = "Type";
|
|
@@ -114,7 +115,7 @@ export default class CodeSamplesGrid extends LightningElement {
|
|
|
114
115
|
|
|
115
116
|
@api
|
|
116
117
|
set featuredCodeSample(value: string) {
|
|
117
|
-
this._featuredCodeSample =
|
|
118
|
+
this._featuredCodeSample = toJson(value);
|
|
118
119
|
}
|
|
119
120
|
get featuredCodeSample(): CodeSample {
|
|
120
121
|
return this._featuredCodeSample;
|
|
@@ -122,7 +123,7 @@ export default class CodeSamplesGrid extends LightningElement {
|
|
|
122
123
|
|
|
123
124
|
@api
|
|
124
125
|
set samples(value: string) {
|
|
125
|
-
const jsonSamples =
|
|
126
|
+
const jsonSamples = toJson(value) || [];
|
|
126
127
|
this._samplesList = jsonSamples.map((sample, i) => ({
|
|
127
128
|
id: i,
|
|
128
129
|
title: sample.title,
|
|
@@ -144,7 +145,7 @@ export default class CodeSamplesGrid extends LightningElement {
|
|
|
144
145
|
|
|
145
146
|
@api
|
|
146
147
|
set products(value: string) {
|
|
147
|
-
const productsFilters =
|
|
148
|
+
const productsFilters = toJson(value).map((sample: string) => ({
|
|
148
149
|
label: sample,
|
|
149
150
|
value: sample.toLowerCase()
|
|
150
151
|
}));
|
|
@@ -167,7 +168,7 @@ export default class CodeSamplesGrid extends LightningElement {
|
|
|
167
168
|
|
|
168
169
|
@api
|
|
169
170
|
set types(value: string) {
|
|
170
|
-
const typesFilter =
|
|
171
|
+
const typesFilter = toJson(value).map((sample: string) => ({
|
|
171
172
|
label: sample,
|
|
172
173
|
value: sample.toLowerCase()
|
|
173
174
|
}));
|
|
@@ -190,7 +191,7 @@ export default class CodeSamplesGrid extends LightningElement {
|
|
|
190
191
|
|
|
191
192
|
@api
|
|
192
193
|
set sources(value: string) {
|
|
193
|
-
const parsedValues =
|
|
194
|
+
const parsedValues = toJson(value);
|
|
194
195
|
this.showSourcesFilter = parsedValues.length > 0;
|
|
195
196
|
const sourcesFilter = parsedValues.map((sample: string) => ({
|
|
196
197
|
label: sample,
|
|
@@ -60,7 +60,7 @@ function normalizePosts(posts: Array<ArchivePost>, contentType: string) {
|
|
|
60
60
|
id: post.id,
|
|
61
61
|
title: post.title.rendered,
|
|
62
62
|
date: post.date,
|
|
63
|
-
contentType: post.sitename,
|
|
63
|
+
contentType: post.sitename.toLowerCase(),
|
|
64
64
|
href: post.link,
|
|
65
65
|
...(contentType === "expanded" && {
|
|
66
66
|
excerpt: post.excerpt,
|
|
@@ -164,7 +164,7 @@ export default class DeSignupForm extends LightningElement {
|
|
|
164
164
|
.then(() => {
|
|
165
165
|
trackGtm(event.target!, "custEv_signUp", {
|
|
166
166
|
...ANALYTICS_INFO,
|
|
167
|
-
formId:
|
|
167
|
+
formId: "form-builder|DEVELOPER:xx:signup|<null>"
|
|
168
168
|
});
|
|
169
169
|
window.location.href = ANALYTICS_INFO.clickUrl;
|
|
170
170
|
})
|
|
@@ -41,10 +41,13 @@ const fetchOrgStatus = async (id: string): Promise<OrgStatus> => {
|
|
|
41
41
|
throw new Error("Something went wrong");
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
const { Status: status, ErrorCode: errorCode }: OrgStatusResponse =
|
|
44
|
+
const { Status: status, ErrorCode: errorCode }: OrgStatusResponse =
|
|
45
|
+
await response.json();
|
|
45
46
|
|
|
46
47
|
if (status === "Error") {
|
|
47
|
-
throw new Error(
|
|
48
|
+
throw new Error(
|
|
49
|
+
errorCode === "C-1007" ? ErrorCode.DUPLICATE : ErrorCode.GENERIC
|
|
50
|
+
);
|
|
48
51
|
}
|
|
49
52
|
|
|
50
53
|
return status;
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
<div class="docs-action-bar">
|
|
4
4
|
<div class="records-container">
|
|
5
5
|
<span if:true={endingRecord}>
|
|
6
|
-
Showing { startingRecord } to { endingRecord } of {
|
|
6
|
+
Showing { startingRecord } to { endingRecord } of {
|
|
7
|
+
filteredDocs.length }
|
|
7
8
|
</span>
|
|
8
9
|
</div>
|
|
9
10
|
<div class="filters-container">
|
|
@@ -50,7 +51,11 @@
|
|
|
50
51
|
class="docs-card"
|
|
51
52
|
target={item.target}
|
|
52
53
|
>
|
|
53
|
-
<dx-button
|
|
54
|
+
<dx-button
|
|
55
|
+
variant="inline"
|
|
56
|
+
href={item.guidesHref}
|
|
57
|
+
if:false={item.links}
|
|
58
|
+
>
|
|
54
59
|
Read It
|
|
55
60
|
</dx-button>
|
|
56
61
|
<template if:true={item.links}>
|
|
@@ -69,7 +69,11 @@
|
|
|
69
69
|
|
|
70
70
|
<dx-hr spacing="2xl"></dx-hr>
|
|
71
71
|
|
|
72
|
-
<dx-section
|
|
72
|
+
<dx-section
|
|
73
|
+
class="events-list past-events"
|
|
74
|
+
title="Past Events"
|
|
75
|
+
if:true={pastEvents.length}
|
|
76
|
+
>
|
|
73
77
|
<dx-card-event
|
|
74
78
|
for:each={pastEvents}
|
|
75
79
|
for:item="item"
|
|
@@ -21,7 +21,7 @@ export default class PodcastSubscription extends LightningElement {
|
|
|
21
21
|
|
|
22
22
|
secondaryLinks = [
|
|
23
23
|
{
|
|
24
|
-
href: "https://
|
|
24
|
+
href: "https://www.stitcher.com/show/salesforce-developer-podcast",
|
|
25
25
|
text: "Stitcher"
|
|
26
26
|
},
|
|
27
27
|
{
|
|
@@ -13,18 +13,24 @@
|
|
|
13
13
|
/>
|
|
14
14
|
</a>
|
|
15
15
|
<span class="dx-text-body-2">
|
|
16
|
-
Tune in to the Developer Podcast to hear short and
|
|
17
|
-
developers, from developers. Join
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
Tune in to the Developer Podcast to hear short and
|
|
17
|
+
insightful stories for developers, from developers. Join
|
|
18
|
+
Joshua Birk, Developer Evangelist and Godfather of
|
|
19
|
+
Trailhead, as he hosts developer trailblazers from
|
|
20
|
+
around the world as they share their stories of
|
|
21
|
+
learning, building, and integrating with Salesforce.
|
|
21
22
|
</span>
|
|
22
23
|
</div>
|
|
23
24
|
<dx-grid columns="one">
|
|
24
25
|
<slot></slot>
|
|
25
26
|
</dx-grid>
|
|
26
27
|
</dx-grid>
|
|
27
|
-
<dx-hr
|
|
28
|
+
<dx-hr
|
|
29
|
+
part="hr"
|
|
30
|
+
variant="link"
|
|
31
|
+
href="/podcast"
|
|
32
|
+
text="More Episodes"
|
|
33
|
+
></dx-hr>
|
|
28
34
|
</dx-grid>
|
|
29
35
|
</dx-section>
|
|
30
36
|
</template>
|
|
@@ -17,7 +17,9 @@ export default class SlackSuccess extends LightningElement {
|
|
|
17
17
|
"https://developer.salesforce.com";
|
|
18
18
|
|
|
19
19
|
try {
|
|
20
|
-
const response = await fetch(
|
|
20
|
+
const response = await fetch(
|
|
21
|
+
`${slackApiBaseUrl}/slack/api/oauth?code=${code}`
|
|
22
|
+
);
|
|
21
23
|
const { url } = await response.json();
|
|
22
24
|
|
|
23
25
|
if (url) {
|