@salesforcedevs/dw-components 0.75.2 → 1.1.2-alpha.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 +1 -0
- package/package.json +1 -1
- package/src/modules/dw/blogsGrid/blogsGrid.css +1 -1
- package/src/modules/dw/blogsGrid/blogsGrid.html +3 -2
- package/src/modules/dw/browseTrials/browseTrials.css +33 -0
- package/src/modules/dw/browseTrials/browseTrials.html +72 -0
- package/src/modules/dw/browseTrials/browseTrials.ts +45 -0
- package/src/modules/dw/codeSamplesGrid/codeSamplesGrid.ts +8 -6
- 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/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/lwc.config.json
CHANGED
package/package.json
CHANGED
|
@@ -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>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
dx-section.browse {
|
|
2
|
+
--dx-c-section-heading-font-color: var(--dx-g-blue-vibrant-20);
|
|
3
|
+
--dx-c-section-heading-font-family: var(--dx-g-font-display);
|
|
4
|
+
--dx-c-section-heading-font-size: 32px;
|
|
5
|
+
--dx-c-section-padding-top: 0;
|
|
6
|
+
--dx-c-section-heading-margin-bottom: var(--dx-g-spacing-md);
|
|
7
|
+
z-index: 1;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
dx-tab-panel-list {
|
|
11
|
+
--dx-c-tab-panel-list-horizontal-padding: 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
dx-section.section-container {
|
|
15
|
+
--dx-c-section-padding-vertical: 0;
|
|
16
|
+
--dx-c-section-padding-horizontal: 0;
|
|
17
|
+
width: 100%;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
dx-section.section-container:not(:first-of-type) {
|
|
21
|
+
margin-top: var(--dx-g-spacing-4xl);
|
|
22
|
+
z-index: 1;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.button-toggle-container {
|
|
26
|
+
margin-bottom: var(--dx-g-spacing-4xl);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.card-container {
|
|
30
|
+
display: flex;
|
|
31
|
+
flex-wrap: wrap;
|
|
32
|
+
gap: 40px;
|
|
33
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<dx-section title="Browse Trials" heading-level="custom" class="browse">
|
|
3
|
+
<dx-tab-panel-list tabs={_tabs} onchange={handleTabChange}>
|
|
4
|
+
<template for:each={trials} for:item="trial">
|
|
5
|
+
<dx-tab-panel key={trial.label}>
|
|
6
|
+
<div
|
|
7
|
+
key={trial.label}
|
|
8
|
+
class="button-toggle-container"
|
|
9
|
+
if:false={trial.hideFilters}
|
|
10
|
+
for:each={buttonLabels}
|
|
11
|
+
for:item="buttonLabel"
|
|
12
|
+
>
|
|
13
|
+
<dx-button-toggle
|
|
14
|
+
label={buttonLabel.title}
|
|
15
|
+
key={buttonLabel.title}
|
|
16
|
+
ontoggle={handleFilters}
|
|
17
|
+
></dx-button-toggle>
|
|
18
|
+
</div>
|
|
19
|
+
<template for:each={trial.categories} for:item="category">
|
|
20
|
+
<dx-section
|
|
21
|
+
key={category.title}
|
|
22
|
+
class="section-container"
|
|
23
|
+
title={category.title}
|
|
24
|
+
heading-level="4"
|
|
25
|
+
>
|
|
26
|
+
<div class="card-container">
|
|
27
|
+
<template
|
|
28
|
+
for:each={category.cards}
|
|
29
|
+
for:item="card"
|
|
30
|
+
>
|
|
31
|
+
<template if:true={card.hasModal}>
|
|
32
|
+
<dx-card-trial
|
|
33
|
+
key={card.title}
|
|
34
|
+
badge-symbol={card.badgeSymbol}
|
|
35
|
+
body={card.body}
|
|
36
|
+
details={card.details}
|
|
37
|
+
modal-title={card.modalTitle}
|
|
38
|
+
modal-details={card.modalDetails}
|
|
39
|
+
href={card.href}
|
|
40
|
+
label={card.label}
|
|
41
|
+
terms={card.terms}
|
|
42
|
+
title={card.title}
|
|
43
|
+
button-one-cta={card.buttonOneCta}
|
|
44
|
+
button-one-href={card.buttonOneHref}
|
|
45
|
+
button-one-icon={card.buttonOneIcon}
|
|
46
|
+
button-two-cta={card.buttonTwoCta}
|
|
47
|
+
hide-card-details="true"
|
|
48
|
+
></dx-card-trial>
|
|
49
|
+
</template>
|
|
50
|
+
<template if:false={card.hasModal}>
|
|
51
|
+
<dx-card-trial
|
|
52
|
+
key={card.title}
|
|
53
|
+
badge-symbol={card.badgeSymbol}
|
|
54
|
+
body={card.body}
|
|
55
|
+
href={card.href}
|
|
56
|
+
label={card.label}
|
|
57
|
+
terms={card.terms}
|
|
58
|
+
title={card.title}
|
|
59
|
+
button-one-cta={card.buttonOneCta}
|
|
60
|
+
button-one-href={card.buttonOneHref}
|
|
61
|
+
button-one-icon={card.buttonOneIcon}
|
|
62
|
+
></dx-card-trial>
|
|
63
|
+
</template>
|
|
64
|
+
</template>
|
|
65
|
+
</div>
|
|
66
|
+
</dx-section>
|
|
67
|
+
</template>
|
|
68
|
+
</dx-tab-panel>
|
|
69
|
+
</template>
|
|
70
|
+
</dx-tab-panel-list>
|
|
71
|
+
</dx-section>
|
|
72
|
+
</template>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { LightningElement, api, track } from "lwc";
|
|
2
|
+
import { toJson } from "dxUtils/normalizers";
|
|
3
|
+
|
|
4
|
+
export default class BrowseTrials extends LightningElement {
|
|
5
|
+
@api
|
|
6
|
+
get trials() {
|
|
7
|
+
return this._trials;
|
|
8
|
+
}
|
|
9
|
+
set trials(value: [{ label: string }]) {
|
|
10
|
+
this._trials = toJson(value);
|
|
11
|
+
this._tabs = this._trials.map((trial) => ({ label: trial.label }));
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@track
|
|
15
|
+
private _trials!: [{ label: string; categories: Array<{ title: string }> }];
|
|
16
|
+
private buttonLabels!: Array<{ title: string }>;
|
|
17
|
+
|
|
18
|
+
private _tabs!: Array<{ label: string }>;
|
|
19
|
+
private filters: Array<{ label: string }> = [];
|
|
20
|
+
private activeTabIndex = 0;
|
|
21
|
+
|
|
22
|
+
handleTabChange(e: CustomEvent) {
|
|
23
|
+
this.activeTabIndex = e.detail;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
handleFilters(e: CustomEvent) {
|
|
27
|
+
const { label, value } = e.detail;
|
|
28
|
+
|
|
29
|
+
if (value) {
|
|
30
|
+
this.filters.push(label);
|
|
31
|
+
this._trials[this.activeTabIndex].categories = this._trials[
|
|
32
|
+
this.activeTabIndex
|
|
33
|
+
].categories.filter((category) =>
|
|
34
|
+
this.filters.includes(category.title)
|
|
35
|
+
);
|
|
36
|
+
} else {
|
|
37
|
+
this.filters = this.filters.filter((filter) => filter !== label);
|
|
38
|
+
this._trials[this.activeTabIndex].categories = this._trials[
|
|
39
|
+
this.activeTabIndex
|
|
40
|
+
].categories.filter(
|
|
41
|
+
(category) => !this.filters.includes(category.title)
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -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,8 @@ export default class CodeSamplesGrid extends LightningElement {
|
|
|
122
123
|
|
|
123
124
|
@api
|
|
124
125
|
set samples(value: string) {
|
|
125
|
-
|
|
126
|
+
console.log(value);
|
|
127
|
+
const jsonSamples = toJson(value) || [];
|
|
126
128
|
this._samplesList = jsonSamples.map((sample, i) => ({
|
|
127
129
|
id: i,
|
|
128
130
|
title: sample.title,
|
|
@@ -144,7 +146,7 @@ export default class CodeSamplesGrid extends LightningElement {
|
|
|
144
146
|
|
|
145
147
|
@api
|
|
146
148
|
set products(value: string) {
|
|
147
|
-
const productsFilters =
|
|
149
|
+
const productsFilters = toJson(value).map((sample: string) => ({
|
|
148
150
|
label: sample,
|
|
149
151
|
value: sample.toLowerCase()
|
|
150
152
|
}));
|
|
@@ -167,7 +169,7 @@ export default class CodeSamplesGrid extends LightningElement {
|
|
|
167
169
|
|
|
168
170
|
@api
|
|
169
171
|
set types(value: string) {
|
|
170
|
-
const typesFilter =
|
|
172
|
+
const typesFilter = toJson(value).map((sample: string) => ({
|
|
171
173
|
label: sample,
|
|
172
174
|
value: sample.toLowerCase()
|
|
173
175
|
}));
|
|
@@ -190,7 +192,7 @@ export default class CodeSamplesGrid extends LightningElement {
|
|
|
190
192
|
|
|
191
193
|
@api
|
|
192
194
|
set sources(value: string) {
|
|
193
|
-
const parsedValues =
|
|
195
|
+
const parsedValues = toJson(value);
|
|
194
196
|
this.showSourcesFilter = parsedValues.length > 0;
|
|
195
197
|
const sourcesFilter = parsedValues.map((sample: string) => ({
|
|
196
198
|
label: sample,
|
|
@@ -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"
|
|
@@ -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) {
|