@salesforcedevs/dw-components 1.3.304-alpha.0 → 1.3.304-alpha.1
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 +1 -1
- package/src/modules/dw/blogsGrid/blogsGrid.html +1 -1
- package/src/modules/dw/browseTrials/browseTrials.html +4 -4
- package/src/modules/dw/browseTrials/browseTrials.ts +1 -1
- package/src/modules/dw/cardBlogPostProvider/cardBlogPostProvider.html +1 -1
- package/src/modules/dw/cardPodcastEpisodeProvider/cardPodcastEpisodeProvider.html +1 -1
- package/src/modules/dw/codeSamplesGrid/codeSamplesGrid.html +4 -4
- package/src/modules/dw/contentArchive/contentArchive.html +15 -15
- package/src/modules/dw/docsGrid/docsGrid.html +2 -2
- package/src/modules/dw/eventsList/eventsList.html +5 -5
- package/src/modules/dw/j2sCardSequence/j2sCardSequence.ts +3 -2
- package/src/modules/dw/j2sCardSequenceStep/j2sCardSequenceStep.html +1 -0
- package/src/modules/dw/j2sCardSequenceStep/j2sCardSequenceStep.ts +24 -9
- package/src/modules/dw/j2sForm/j2sForm.ts +16 -3
- package/src/modules/dw/podcastsGrid/podcastsGrid.html +1 -1
- package/src/modules/dw/podcastsPromo/podcastsPromo.html +1 -1
- package/src/modules/dw/videoGrid/videoGrid.html +2 -2
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<dx-section
|
|
2
|
+
<dx-section title={title}>
|
|
3
3
|
<dx-tab-panel-list
|
|
4
4
|
tabs={tabLabels}
|
|
5
5
|
onchange={handleTabChange}
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
</div>
|
|
27
27
|
<template for:each={filteredCategories} for:item="category">
|
|
28
28
|
<dx-section
|
|
29
|
-
|
|
29
|
+
title={category.title}
|
|
30
30
|
subtitle={category.subtitle}
|
|
31
31
|
heading-level="4"
|
|
32
32
|
subtitle-level="2"
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
href={card.href}
|
|
51
51
|
label={card.label}
|
|
52
52
|
terms={card.terms}
|
|
53
|
-
|
|
53
|
+
title={card.title}
|
|
54
54
|
button-one-cta={card.buttonOneCta}
|
|
55
55
|
button-one-href={card.buttonOneHref}
|
|
56
56
|
button-one-icon={card.buttonOneIcon}
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
href={card.href}
|
|
70
70
|
label={card.label}
|
|
71
71
|
terms={card.terms}
|
|
72
|
-
|
|
72
|
+
title={card.title}
|
|
73
73
|
button-one-cta={card.buttonOneCta}
|
|
74
74
|
button-one-href={card.buttonOneHref}
|
|
75
75
|
button-one-icon={card.buttonOneIcon}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<dx-section>
|
|
3
3
|
<dx-feature
|
|
4
|
-
|
|
4
|
+
title={featuredCodeSample.title}
|
|
5
5
|
button-href={featuredCodeSample.href}
|
|
6
6
|
button-label="Explore on GitHub"
|
|
7
7
|
image-src={featuredCodeSample.imgSrc}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
</dx-feature>
|
|
15
15
|
</dx-section>
|
|
16
16
|
|
|
17
|
-
<dx-section
|
|
17
|
+
<dx-section title="Browse Demos">
|
|
18
18
|
<div class="docs-action-bar">
|
|
19
19
|
<div class="records-container">
|
|
20
20
|
<span if:true={endingRecord}>
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
key={item.id}
|
|
98
98
|
body={item.body}
|
|
99
99
|
label={item.type}
|
|
100
|
-
|
|
100
|
+
title={item.title}
|
|
101
101
|
href={item.href}
|
|
102
102
|
>
|
|
103
103
|
<div class="badge-link-container">
|
|
@@ -132,7 +132,7 @@
|
|
|
132
132
|
</div>
|
|
133
133
|
<dx-empty-state
|
|
134
134
|
variant="alt"
|
|
135
|
-
|
|
135
|
+
title="Beep boop. That did not compute."
|
|
136
136
|
subtitle={emptyStateSubtitle}
|
|
137
137
|
body={emptyStateBody}
|
|
138
138
|
suggestions={emptyStateSuggestions}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<dx-featured-content-header
|
|
3
3
|
class="documentation_header"
|
|
4
|
-
|
|
4
|
+
title="Content Archive"
|
|
5
5
|
body="Learn more about the topics that interest you most by exploring the full collection of Salesforce Developers blog and podcast content."
|
|
6
6
|
dark="true"
|
|
7
7
|
no-swoop={isMobile}
|
|
@@ -27,13 +27,13 @@
|
|
|
27
27
|
</div>
|
|
28
28
|
<dx-filter-menu
|
|
29
29
|
name="content-type"
|
|
30
|
-
|
|
30
|
+
title={contentTypeTitle}
|
|
31
31
|
options={contentTypeList}
|
|
32
32
|
onchange={handleUpdateSiteFilter}
|
|
33
33
|
></dx-filter-menu>
|
|
34
34
|
<dx-filter-menu
|
|
35
35
|
name="dates"
|
|
36
|
-
|
|
36
|
+
title={dateTitle}
|
|
37
37
|
options={dateList}
|
|
38
38
|
variant="nested"
|
|
39
39
|
filters-dates-loading={filtersDatesLoading}
|
|
@@ -42,20 +42,20 @@
|
|
|
42
42
|
<template if:false={hideBlogFilters}>
|
|
43
43
|
<dx-filter-menu
|
|
44
44
|
name="authors"
|
|
45
|
-
|
|
45
|
+
title={authorTitle}
|
|
46
46
|
options={authorList}
|
|
47
47
|
onchange={handleFiltersEvent}
|
|
48
48
|
></dx-filter-menu>
|
|
49
49
|
</template>
|
|
50
50
|
<dx-filter-menu
|
|
51
51
|
name="categories"
|
|
52
|
-
|
|
52
|
+
title={categoryTitle}
|
|
53
53
|
options={categoryList}
|
|
54
54
|
onchange={handleFiltersEvent}
|
|
55
55
|
></dx-filter-menu>
|
|
56
56
|
<dx-filter-menu
|
|
57
57
|
name="language"
|
|
58
|
-
|
|
58
|
+
title={languageTitle}
|
|
59
59
|
options={languagesList}
|
|
60
60
|
onchange={handleFiltersEvent}
|
|
61
61
|
></dx-filter-menu>
|
|
@@ -81,13 +81,13 @@
|
|
|
81
81
|
</div>
|
|
82
82
|
<dx-filter-menu
|
|
83
83
|
name="contentType"
|
|
84
|
-
|
|
84
|
+
title={contentTypeTitle}
|
|
85
85
|
options={contentTypeList}
|
|
86
86
|
onchange={handleUpdateSiteFilter}
|
|
87
87
|
></dx-filter-menu>
|
|
88
88
|
<dx-filter-menu
|
|
89
89
|
name="dates"
|
|
90
|
-
|
|
90
|
+
title={dateTitle}
|
|
91
91
|
options={dateList}
|
|
92
92
|
filters-dates-loading={filtersDatesLoading}
|
|
93
93
|
variant="nested"
|
|
@@ -96,20 +96,20 @@
|
|
|
96
96
|
<template if:false={hideBlogFilters}>
|
|
97
97
|
<dx-filter-menu
|
|
98
98
|
name="authors"
|
|
99
|
-
|
|
99
|
+
title={authorTitle}
|
|
100
100
|
options={authorList}
|
|
101
101
|
onchange={handleFiltersEvent}
|
|
102
102
|
></dx-filter-menu>
|
|
103
103
|
</template>
|
|
104
104
|
<dx-filter-menu
|
|
105
105
|
name="categories"
|
|
106
|
-
|
|
106
|
+
title={categoryTitle}
|
|
107
107
|
options={categoryList}
|
|
108
108
|
onchange={handleFiltersEvent}
|
|
109
109
|
></dx-filter-menu>
|
|
110
110
|
<dx-filter-menu
|
|
111
111
|
name="language"
|
|
112
|
-
|
|
112
|
+
title={languageTitle}
|
|
113
113
|
options={languagesList}
|
|
114
114
|
onchange={handleFiltersEvent}
|
|
115
115
|
></dx-filter-menu>
|
|
@@ -312,7 +312,7 @@
|
|
|
312
312
|
<dx-card-minimal
|
|
313
313
|
key={post.id}
|
|
314
314
|
content-type={post.contentType}
|
|
315
|
-
|
|
315
|
+
title={post.title}
|
|
316
316
|
href={post.href}
|
|
317
317
|
></dx-card-minimal>
|
|
318
318
|
</template>
|
|
@@ -324,7 +324,7 @@
|
|
|
324
324
|
<template if:true={post.authors}>
|
|
325
325
|
<dx-card-expanded
|
|
326
326
|
key={post.id}
|
|
327
|
-
|
|
327
|
+
title={post.title}
|
|
328
328
|
content-type={post.contentType}
|
|
329
329
|
href={post.href}
|
|
330
330
|
date={post.date}
|
|
@@ -337,7 +337,7 @@
|
|
|
337
337
|
<template if:false={post.authors}>
|
|
338
338
|
<dx-card-expanded
|
|
339
339
|
key={post.id}
|
|
340
|
-
|
|
340
|
+
title={post.title}
|
|
341
341
|
content-type={post.contentType}
|
|
342
342
|
href={post.href}
|
|
343
343
|
date={post.date}
|
|
@@ -363,7 +363,7 @@
|
|
|
363
363
|
<template if:true={isEmptyState}>
|
|
364
364
|
<dx-empty-state
|
|
365
365
|
variant="alt"
|
|
366
|
-
|
|
366
|
+
title="Beep boop. That did not compute."
|
|
367
367
|
subtitle={emptyStateSubtitle}
|
|
368
368
|
body={emptyStateBody}
|
|
369
369
|
suggestions={emptyStateSuggestions}
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
for:item="item"
|
|
46
46
|
for:index="i"
|
|
47
47
|
key={item.id}
|
|
48
|
-
|
|
48
|
+
title={item.title}
|
|
49
49
|
body={item.description}
|
|
50
50
|
href={item.guidesHref}
|
|
51
51
|
class="docs-card"
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
</div>
|
|
85
85
|
<dx-empty-state
|
|
86
86
|
variant="alt"
|
|
87
|
-
|
|
87
|
+
title="Beep boop. That did not compute."
|
|
88
88
|
subtitle={emptyStateSubtitle}
|
|
89
89
|
body={emptyStateBody}
|
|
90
90
|
suggestions={emptyStateSuggestions}
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
</dx-section>
|
|
50
50
|
<dx-section
|
|
51
51
|
class="events-list upcoming-events"
|
|
52
|
-
|
|
52
|
+
title="Upcoming Events"
|
|
53
53
|
if:true={upcomingEvents.length}
|
|
54
54
|
>
|
|
55
55
|
<dx-card-event
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
for:item="item"
|
|
58
58
|
key={item.id}
|
|
59
59
|
href={item.urlStub}
|
|
60
|
-
|
|
60
|
+
title={item.name}
|
|
61
61
|
end-datetime={item.endDate}
|
|
62
62
|
start-datetime={item.startDate}
|
|
63
63
|
short-description={item.shortDescription}
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
|
|
72
72
|
<dx-section
|
|
73
73
|
class="events-list past-events"
|
|
74
|
-
|
|
74
|
+
title="Past Events"
|
|
75
75
|
if:true={pastEvents.length}
|
|
76
76
|
>
|
|
77
77
|
<dx-card-event
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
for:item="item"
|
|
80
80
|
key={item.id}
|
|
81
81
|
href={item.urlStub}
|
|
82
|
-
|
|
82
|
+
title={item.name}
|
|
83
83
|
end-datetime={item.endDate}
|
|
84
84
|
start-datetime={item.startDate}
|
|
85
85
|
short-description={item.shortDescription}
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
</dx-section>
|
|
91
91
|
<div class="events-empty" if:true={showEmptyState}>
|
|
92
92
|
<dx-empty-state
|
|
93
|
-
|
|
93
|
+
title="Beep boop. That did not compute."
|
|
94
94
|
subtitle={emptyStateSubtitle}
|
|
95
95
|
></dx-empty-state>
|
|
96
96
|
</div>
|
|
@@ -3,6 +3,7 @@ import StepSequence from "dx/stepSequence";
|
|
|
3
3
|
import { getListWithUuids } from "dxUtils/list";
|
|
4
4
|
import { toJson } from "dxUtils/normalizers";
|
|
5
5
|
import J2sCardSequenceStep from "dw/j2sCardSequenceStep";
|
|
6
|
+
import { AlertInfo } from "typings/custom";
|
|
6
7
|
|
|
7
8
|
const DRM_SUCCESS_STRING = "success";
|
|
8
9
|
|
|
@@ -18,8 +19,8 @@ export type StepDatum = {
|
|
|
18
19
|
formId?: string;
|
|
19
20
|
j2sTerms?: string;
|
|
20
21
|
notAvailableAlertInfo?: {
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
default: AlertInfo;
|
|
23
|
+
[key: string]: AlertInfo;
|
|
23
24
|
};
|
|
24
25
|
participatingCountryCodes?: string[];
|
|
25
26
|
salesforceEmployeeAlertInfo?: {
|
|
@@ -16,15 +16,17 @@ export default class J2sCardSequenceStep extends LightningElement {
|
|
|
16
16
|
|
|
17
17
|
@api
|
|
18
18
|
public notifyFormSubmitFailure(formFailureData: Partial<DrmFormData>) {
|
|
19
|
-
(
|
|
20
|
-
|
|
21
|
-
)?.notifySubmitFailure(formFailureData);
|
|
19
|
+
((this.template.querySelector(
|
|
20
|
+
"dw-j2s-form"
|
|
21
|
+
) as unknown) as J2sForm)?.notifySubmitFailure(formFailureData);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
private isJ2sFormInvalid = false;
|
|
25
25
|
|
|
26
26
|
private get stepClassName() {
|
|
27
|
-
return this.stepIndex === 2
|
|
27
|
+
return this.stepIndex === 2 && this.selectedCountry === "IN"
|
|
28
|
+
? "final-card-with-action"
|
|
29
|
+
: "";
|
|
28
30
|
}
|
|
29
31
|
|
|
30
32
|
private get isPrimaryActionDisabled() {
|
|
@@ -58,6 +60,14 @@ export default class J2sCardSequenceStep extends LightningElement {
|
|
|
58
60
|
return this.stepDatum.primaryAction.linkTarget || "_blank";
|
|
59
61
|
}
|
|
60
62
|
|
|
63
|
+
private get showPrimaryAction() {
|
|
64
|
+
return this.stepIndex !== 2 || this.selectedCountry === "IN";
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
private get showSecondaryAction() {
|
|
68
|
+
return this.showPrimaryAction; // same requirement as above for now
|
|
69
|
+
}
|
|
70
|
+
|
|
61
71
|
renderedCallback() {
|
|
62
72
|
this.updateStaticInnerHtml();
|
|
63
73
|
}
|
|
@@ -76,9 +86,9 @@ export default class J2sCardSequenceStep extends LightningElement {
|
|
|
76
86
|
if (this.stepIndex === 0) {
|
|
77
87
|
this.dispatchEvent(new CustomEvent("getstarted"));
|
|
78
88
|
} else if (this.stepIndex === 1) {
|
|
79
|
-
const j2sFormEl = this.template.querySelector(
|
|
89
|
+
const j2sFormEl = (this.template.querySelector(
|
|
80
90
|
"dw-j2s-form"
|
|
81
|
-
) as unknown as J2sForm;
|
|
91
|
+
) as unknown) as J2sForm;
|
|
82
92
|
const formData = j2sFormEl.formDataForDrm;
|
|
83
93
|
|
|
84
94
|
// For some countries, explicit approvals will be present; for others, it is implicitly assumed
|
|
@@ -99,8 +109,9 @@ export default class J2sCardSequenceStep extends LightningElement {
|
|
|
99
109
|
|
|
100
110
|
private updateStaticInnerHtml() {
|
|
101
111
|
const { bodyHtml, secondaryActionHtml } = this.stepDatum;
|
|
102
|
-
const bodyMarkupContainer =
|
|
103
|
-
|
|
112
|
+
const bodyMarkupContainer = this.template.querySelector(
|
|
113
|
+
"span.body-markup"
|
|
114
|
+
);
|
|
104
115
|
const secondaryActionMarkupContainer = this.template.querySelector(
|
|
105
116
|
"span.secondary-action-markup"
|
|
106
117
|
);
|
|
@@ -124,7 +135,11 @@ export default class J2sCardSequenceStep extends LightningElement {
|
|
|
124
135
|
}
|
|
125
136
|
|
|
126
137
|
if (secondaryActionMarkupContainer) {
|
|
127
|
-
|
|
138
|
+
// new special exception on step 2 to only show secondary action for IN
|
|
139
|
+
secondaryActionMarkupContainer.innerHTML =
|
|
140
|
+
secondaryActionHtml && this.showSecondaryAction
|
|
141
|
+
? secondaryActionHtml
|
|
142
|
+
: "";
|
|
128
143
|
}
|
|
129
144
|
}
|
|
130
145
|
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import { toJson } from "dxUtils/normalizers";
|
|
2
2
|
import { stateMap } from "dwUtils/forms";
|
|
3
|
+
import { DateTime } from "luxon";
|
|
3
4
|
import { api } from "lwc";
|
|
4
5
|
import debounce from "debounce";
|
|
5
6
|
import { LightningElementWithState } from "dxBaseElements/lightningElementWithState";
|
|
6
7
|
import { DrmFormData } from "dw/j2sCardSequence";
|
|
7
8
|
|
|
9
|
+
const closingTimeUSCanada = DateTime.fromISO("2024-05-09", {
|
|
10
|
+
zone: "America/Los_Angeles"
|
|
11
|
+
});
|
|
12
|
+
|
|
8
13
|
// Hard-coding for now because we can't get information about an endpoint for this
|
|
9
14
|
const tbidValidRoles = [
|
|
10
15
|
"Developer",
|
|
@@ -96,11 +101,17 @@ export default class J2sForm extends LightningElementWithState<J2sFormState> {
|
|
|
96
101
|
}
|
|
97
102
|
}
|
|
98
103
|
|
|
99
|
-
private
|
|
100
|
-
private countriesWithReferralInput = ["US", "CA", "IN"];
|
|
104
|
+
private countriesWithReferralInput = ["IN"];
|
|
101
105
|
private requiredFormFields: HTMLElement[] = [];
|
|
102
106
|
private showSubmitFailureAlert = false;
|
|
103
107
|
|
|
108
|
+
get participatingCountryCodes() {
|
|
109
|
+
if (DateTime.local() >= closingTimeUSCanada) {
|
|
110
|
+
return ["IN"];
|
|
111
|
+
}
|
|
112
|
+
return ["US", "CA", "IN"];
|
|
113
|
+
}
|
|
114
|
+
|
|
104
115
|
get isNotParticipatingCountry() {
|
|
105
116
|
return !this.isParticipatingCountry(this.state.MailingCountry);
|
|
106
117
|
}
|
|
@@ -124,7 +135,9 @@ export default class J2sForm extends LightningElementWithState<J2sFormState> {
|
|
|
124
135
|
}
|
|
125
136
|
|
|
126
137
|
get notAvailableAlertInfo() {
|
|
127
|
-
return this.formMetadata.notAvailableAlertInfo
|
|
138
|
+
return this.formMetadata.notAvailableAlertInfo[
|
|
139
|
+
this.state.MailingCountry || "default"
|
|
140
|
+
];
|
|
128
141
|
}
|
|
129
142
|
|
|
130
143
|
get salesforceEmployeeAlertInfo() {
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
key={cardData.id}
|
|
7
7
|
type="twitter"
|
|
8
8
|
video-id={cardData.videoId}
|
|
9
|
-
|
|
9
|
+
title={cardData.title}
|
|
10
10
|
body={cardData.body}
|
|
11
11
|
has-social={cardData.hasSocial}
|
|
12
12
|
social-name={cardData.socialName}
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
key={cardData.id}
|
|
21
21
|
type="linkedin"
|
|
22
22
|
video-id={cardData.videoId}
|
|
23
|
-
|
|
23
|
+
title={cardData.title}
|
|
24
24
|
body={cardData.body}
|
|
25
25
|
has-social={cardData.hasSocial}
|
|
26
26
|
social-name={cardData.socialName}
|