@salesforcedevs/dw-components 1.3.86 → 1.3.88
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 +2 -2
- package/src/modules/dw/browseTrials/browseTrials.css +4 -27
- package/src/modules/dw/browseTrials/browseTrials.html +53 -56
- package/src/modules/dw/deSignupForm/deSignupForm.html +2 -1
- package/src/modules/dw/deSignupForm/deSignupForm.ts +11 -19
- package/src/modules/dw/deSignupForm/submitForm.ts +6 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforcedevs/dw-components",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.88",
|
|
4
4
|
"description": "Lightning web components for https://developer.salesforce.com",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"@types/setimmediate": "^1.0.2",
|
|
25
25
|
"setimmediate": "^1.0.5"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "0fd9edba15fb1e8120046a70384598e805388237"
|
|
28
28
|
}
|
|
@@ -6,14 +6,10 @@
|
|
|
6
6
|
--dw-browse-trials-padding-bottom: 0;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
font-size: 32px;
|
|
14
|
-
letter-spacing: -0.4px;
|
|
15
|
-
line-height: 40px;
|
|
16
|
-
margin-bottom: var(--dx-g-spacing-md);
|
|
9
|
+
.category-section {
|
|
10
|
+
--dx-c-section-padding-horizontal: 0;
|
|
11
|
+
--dx-c-section-padding-bottom: 0;
|
|
12
|
+
--dx-c-section-padding-top: var(--dx-g-spacing-4xl);
|
|
17
13
|
}
|
|
18
14
|
|
|
19
15
|
.panel-list-container {
|
|
@@ -27,32 +23,13 @@ dx-tab-panel-list {
|
|
|
27
23
|
--dx-c-tab-panel-list-horizontal-padding: 0;
|
|
28
24
|
}
|
|
29
25
|
|
|
30
|
-
dx-card-trial {
|
|
31
|
-
width: 400px;
|
|
32
|
-
max-width: 100%;
|
|
33
|
-
min-width: 240px;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
26
|
.category-text-container {
|
|
37
27
|
width: 100%;
|
|
38
28
|
}
|
|
39
29
|
|
|
40
|
-
.category-subtitle {
|
|
41
|
-
color: var(--dx-g-font-sans);
|
|
42
|
-
margin-top: var(--dx-g-spacing-smd);
|
|
43
|
-
max-width: 560px;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
30
|
.button-toggle-container {
|
|
47
31
|
display: flex;
|
|
48
32
|
flex-wrap: wrap;
|
|
49
33
|
gap: var(--dx-g-spacing-md);
|
|
50
34
|
margin-top: var(--dx-g-spacing-3xl);
|
|
51
35
|
}
|
|
52
|
-
|
|
53
|
-
.category-container {
|
|
54
|
-
display: flex;
|
|
55
|
-
flex-wrap: wrap;
|
|
56
|
-
gap: 40px;
|
|
57
|
-
margin-top: var(--dx-g-spacing-4xl);
|
|
58
|
-
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<h2 class="title">{title}</h2>
|
|
2
|
+
<dx-section title={title}>
|
|
4
3
|
<dx-tab-panel-list
|
|
5
4
|
tabs={tabLabels}
|
|
6
5
|
onchange={handleTabChange}
|
|
@@ -26,64 +25,62 @@
|
|
|
26
25
|
</template>
|
|
27
26
|
</div>
|
|
28
27
|
<template for:each={filteredCategories} for:item="category">
|
|
29
|
-
<
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
28
|
+
<dx-section
|
|
29
|
+
title={category.title}
|
|
30
|
+
subtitle={category.subtitle}
|
|
31
|
+
heading-level="4"
|
|
32
|
+
subtitle-level="2"
|
|
33
|
+
key={category.title}
|
|
34
|
+
class="category-section"
|
|
35
|
+
>
|
|
36
|
+
<dx-grid columns="three">
|
|
37
|
+
<template
|
|
38
|
+
for:each={category.cards}
|
|
39
|
+
for:item="card"
|
|
40
40
|
>
|
|
41
|
-
{
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
button-one-href={card.buttonOneHref}
|
|
79
|
-
button-one-icon={card.buttonOneIcon}
|
|
80
|
-
></dx-card-trial>
|
|
41
|
+
<template if:true={card.hasModal}>
|
|
42
|
+
<dx-card-trial
|
|
43
|
+
key={card.title}
|
|
44
|
+
badge-background-color={card.badgeBackgroundColor}
|
|
45
|
+
badge-symbol={card.badgeSymbol}
|
|
46
|
+
body={card.body}
|
|
47
|
+
details={card.details}
|
|
48
|
+
modal-title={card.modalTitle}
|
|
49
|
+
modal-details={card.modalDetails}
|
|
50
|
+
href={card.href}
|
|
51
|
+
label={card.label}
|
|
52
|
+
terms={card.terms}
|
|
53
|
+
title={card.title}
|
|
54
|
+
button-one-cta={card.buttonOneCta}
|
|
55
|
+
button-one-href={card.buttonOneHref}
|
|
56
|
+
button-one-icon={card.buttonOneIcon}
|
|
57
|
+
button-two-cta={card.buttonTwoCta}
|
|
58
|
+
modal-type-badge-value={card.modalTypeBadgeValue}
|
|
59
|
+
modal-type-badge-dark={card.modalTypeBadgeDark}
|
|
60
|
+
hide-card-details="true"
|
|
61
|
+
></dx-card-trial>
|
|
62
|
+
</template>
|
|
63
|
+
<template if:false={card.hasModal}>
|
|
64
|
+
<dx-card-trial
|
|
65
|
+
key={card.title}
|
|
66
|
+
badge-background-color={card.badgeBackgroundColor}
|
|
67
|
+
badge-symbol={card.badgeSymbol}
|
|
68
|
+
body={card.body}
|
|
69
|
+
href={card.href}
|
|
70
|
+
label={card.label}
|
|
71
|
+
terms={card.terms}
|
|
72
|
+
title={card.title}
|
|
73
|
+
button-one-cta={card.buttonOneCta}
|
|
74
|
+
button-one-href={card.buttonOneHref}
|
|
75
|
+
button-one-icon={card.buttonOneIcon}
|
|
76
|
+
></dx-card-trial>
|
|
77
|
+
</template>
|
|
81
78
|
</template>
|
|
82
|
-
</
|
|
83
|
-
</
|
|
79
|
+
</dx-grid>
|
|
80
|
+
</dx-section>
|
|
84
81
|
</template>
|
|
85
82
|
</dx-tab-panel>
|
|
86
83
|
</template>
|
|
87
84
|
</dx-tab-panel-list>
|
|
88
|
-
</
|
|
85
|
+
</dx-section>
|
|
89
86
|
</template>
|
|
@@ -76,13 +76,14 @@
|
|
|
76
76
|
validity-on-blur={checkUsernameValidity}
|
|
77
77
|
onchange={handleUsernameChange}
|
|
78
78
|
></dx-input>
|
|
79
|
+
|
|
79
80
|
<dx-checkbox required name="eula" value="accepted">
|
|
80
81
|
<span lwc:dom="manual" class="legal-terms"></span>
|
|
81
82
|
</dx-checkbox>
|
|
82
83
|
<dx-checkbox
|
|
83
84
|
if:true={showMarketingCheckbox}
|
|
84
85
|
name="opt_in"
|
|
85
|
-
value="
|
|
86
|
+
value="False"
|
|
86
87
|
>
|
|
87
88
|
<span lwc:dom="manual" class="marketing-terms"></span>
|
|
88
89
|
</dx-checkbox>
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import { LightningElement, api, track } from "lwc";
|
|
2
2
|
import { toJson } from "dxUtils/normalizers";
|
|
3
3
|
import { track as trackGtm } from "dxUtils/analytics";
|
|
4
|
-
import {
|
|
5
|
-
submitForm,
|
|
6
|
-
ErrorCode,
|
|
7
|
-
SignupForm,
|
|
8
|
-
UserData,
|
|
9
|
-
OptIn
|
|
10
|
-
} from "./submitForm";
|
|
4
|
+
import { submitForm, ErrorCode, SignupForm, UserData } from "./submitForm";
|
|
11
5
|
|
|
12
6
|
type SelectOption = { value: string; label: string };
|
|
13
7
|
type Country = SelectOption & {
|
|
@@ -176,13 +170,11 @@ export default class DeSignupForm extends LightningElement {
|
|
|
176
170
|
userData[field.name] = field.value;
|
|
177
171
|
});
|
|
178
172
|
|
|
179
|
-
(userData as UserData).
|
|
180
|
-
?
|
|
181
|
-
: "
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
this.country.showMarketingCheckbox &&
|
|
185
|
-
checkboxes.values.opt_in === ""
|
|
173
|
+
(userData as UserData).consent = this.country.showMarketingCheckbox
|
|
174
|
+
? "Explicit"
|
|
175
|
+
: "Implied ";
|
|
176
|
+
const InfoEmail =
|
|
177
|
+
this.country.showMarketingCheckbox && !checkboxes.values.opt_in
|
|
186
178
|
? "False"
|
|
187
179
|
: "True";
|
|
188
180
|
|
|
@@ -190,7 +182,7 @@ export default class DeSignupForm extends LightningElement {
|
|
|
190
182
|
user: userData as UserData,
|
|
191
183
|
eula: checkboxes.values.eula,
|
|
192
184
|
default_driver: DEFAULT_DRIVER,
|
|
193
|
-
|
|
185
|
+
info_email: InfoEmail
|
|
194
186
|
};
|
|
195
187
|
|
|
196
188
|
return formData;
|
|
@@ -198,19 +190,19 @@ export default class DeSignupForm extends LightningElement {
|
|
|
198
190
|
|
|
199
191
|
private getCheckboxesResult(): {
|
|
200
192
|
valid: boolean;
|
|
201
|
-
values: { eula: string; opt_in:
|
|
193
|
+
values: { eula: string; opt_in: "true" | "false" };
|
|
202
194
|
} {
|
|
203
195
|
let valid = true;
|
|
204
|
-
const values: { eula: string; opt_in:
|
|
196
|
+
const values: { eula: string; opt_in: "true" | "false" } = {
|
|
205
197
|
eula: "",
|
|
206
|
-
opt_in: ""
|
|
198
|
+
opt_in: "false"
|
|
207
199
|
};
|
|
208
200
|
|
|
209
201
|
Array.from(
|
|
210
202
|
this.template.querySelectorAll<HTMLInputElement>("dx-checkbox")
|
|
211
203
|
).forEach((checkbox) => {
|
|
212
204
|
valid = valid && checkbox.reportValidity();
|
|
213
|
-
values[checkbox.name] =
|
|
205
|
+
values[checkbox.name] = checkbox.checked;
|
|
214
206
|
});
|
|
215
207
|
|
|
216
208
|
return { valid, values };
|
|
@@ -2,9 +2,10 @@ const CREATE_PATH = `/deorgs/trialforce`;
|
|
|
2
2
|
const BASE_STATUS_PATH = `/deorgs/check_org_status`;
|
|
3
3
|
const WAIT_TIME = 200;
|
|
4
4
|
|
|
5
|
-
export type OptIn = "" | "implied" | "explicit";
|
|
5
|
+
// export type OptIn = "" | "implied" | "explicit";
|
|
6
6
|
|
|
7
7
|
export type UserData = {
|
|
8
|
+
consent: string;
|
|
8
9
|
company: string;
|
|
9
10
|
country: string;
|
|
10
11
|
email: string;
|
|
@@ -12,7 +13,7 @@ export type UserData = {
|
|
|
12
13
|
job_role: string;
|
|
13
14
|
job_title: string;
|
|
14
15
|
last_name: string;
|
|
15
|
-
opt_in:
|
|
16
|
+
opt_in: boolean;
|
|
16
17
|
postal_code: string;
|
|
17
18
|
username: string;
|
|
18
19
|
};
|
|
@@ -21,7 +22,7 @@ export type SignupForm = {
|
|
|
21
22
|
user: UserData;
|
|
22
23
|
eula: string;
|
|
23
24
|
default_driver: string;
|
|
24
|
-
|
|
25
|
+
info_email: "True" | "False";
|
|
25
26
|
};
|
|
26
27
|
|
|
27
28
|
type OrgStatus = "New" | "In Progress" | "Error";
|
|
@@ -43,10 +44,8 @@ const fetchOrgStatus = async (id: string): Promise<OrgStatus> => {
|
|
|
43
44
|
throw new Error("Something went wrong");
|
|
44
45
|
}
|
|
45
46
|
|
|
46
|
-
const {
|
|
47
|
-
|
|
48
|
-
ErrorCode: errorCode
|
|
49
|
-
}: OrgStatusResponse = await response.json();
|
|
47
|
+
const { Status: status, ErrorCode: errorCode }: OrgStatusResponse =
|
|
48
|
+
await response.json();
|
|
50
49
|
|
|
51
50
|
if (status === "Error") {
|
|
52
51
|
throw new Error(
|