@salesforcedevs/dw-components 1.3.76-alpha.0 → 1.3.81

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforcedevs/dw-components",
3
- "version": "1.3.76-alpha.0",
3
+ "version": "1.3.81",
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": "3d618c9e70aadfa1f05276110b0024868a402442"
27
+ "gitHead": "92a788995a419856ee81fe2ea13f877865506a9b"
28
28
  }
@@ -76,9 +76,12 @@ export default class CodeSamplesGrid extends LightningElement {
76
76
  evaluateQueryParams(resetFilters: boolean): void {
77
77
  let page = "1";
78
78
  if (resetFilters) {
79
- this.selectedSourceFilter = this.filtersDefaultValue.selectedSourceFilter;
80
- this.selectedTypeFilter = this.filtersDefaultValue.selectedTypeFilter;
81
- this.selectedProductFilter = this.filtersDefaultValue.selectedProductFilter;
79
+ this.selectedSourceFilter =
80
+ this.filtersDefaultValue.selectedSourceFilter;
81
+ this.selectedTypeFilter =
82
+ this.filtersDefaultValue.selectedTypeFilter;
83
+ this.selectedProductFilter =
84
+ this.filtersDefaultValue.selectedProductFilter;
82
85
  }
83
86
  const urlParams = new URLSearchParams(window.location.search);
84
87
  if (urlParams.toString()) {
@@ -258,9 +258,8 @@ export default class ContentArchive extends LightningElement {
258
258
  }
259
259
 
260
260
  private async updateCheckedStatus() {
261
- const filterMenuElements = this.template.querySelectorAll(
262
- "dx-filter-menu"
263
- );
261
+ const filterMenuElements =
262
+ this.template.querySelectorAll("dx-filter-menu");
264
263
 
265
264
  filterMenuElements.forEach((filterMenuElement: any) =>
266
265
  filterMenuElement.updateCheckedStatus(this.selectedFilterMenuData)
@@ -76,14 +76,13 @@
76
76
  validity-on-blur={checkUsernameValidity}
77
77
  onchange={handleUsernameChange}
78
78
  ></dx-input>
79
-
80
79
  <dx-checkbox required name="eula" value="accepted">
81
80
  <span lwc:dom="manual" class="legal-terms"></span>
82
81
  </dx-checkbox>
83
82
  <dx-checkbox
84
83
  if:true={showMarketingCheckbox}
85
84
  name="opt_in"
86
- value="False"
85
+ value="explicit"
87
86
  >
88
87
  <span lwc:dom="manual" class="marketing-terms"></span>
89
88
  </dx-checkbox>
@@ -1,7 +1,13 @@
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 { submitForm, ErrorCode, SignupForm, UserData } from "./submitForm";
4
+ import {
5
+ submitForm,
6
+ ErrorCode,
7
+ SignupForm,
8
+ UserData,
9
+ OptIn
10
+ } from "./submitForm";
5
11
 
6
12
  type SelectOption = { value: string; label: string };
7
13
  type Country = SelectOption & {
@@ -151,6 +157,8 @@ export default class DeSignupForm extends LightningElement {
151
157
  value: element.value
152
158
  }));
153
159
 
160
+ console.log(fields);
161
+
154
162
  const checkboxes = this.getCheckboxesResult();
155
163
 
156
164
  if (fields.some((field) => !field.valid) || !checkboxes.valid) {
@@ -162,11 +170,13 @@ export default class DeSignupForm extends LightningElement {
162
170
  userData[field.name] = field.value;
163
171
  });
164
172
 
165
- (userData as UserData).consent = this.country.showMarketingCheckbox
166
- ? "Explicit"
167
- : "Implied ";
168
- const InfoEmail =
169
- this.country.showMarketingCheckbox && !checkboxes.values.opt_in
173
+ (userData as UserData).opt_in = this.country.showMarketingCheckbox
174
+ ? checkboxes.values.opt_in
175
+ : "implied";
176
+
177
+ const InfoEmail__c =
178
+ this.country.showMarketingCheckbox &&
179
+ checkboxes.values.opt_in === ""
170
180
  ? "False"
171
181
  : "True";
172
182
 
@@ -174,7 +184,7 @@ export default class DeSignupForm extends LightningElement {
174
184
  user: userData as UserData,
175
185
  eula: checkboxes.values.eula,
176
186
  default_driver: DEFAULT_DRIVER,
177
- info_email: InfoEmail
187
+ InfoEmail__c
178
188
  };
179
189
 
180
190
  return formData;
@@ -182,19 +192,19 @@ export default class DeSignupForm extends LightningElement {
182
192
 
183
193
  private getCheckboxesResult(): {
184
194
  valid: boolean;
185
- values: { eula: string; opt_in: "true" | "false" };
195
+ values: { eula: string; opt_in: OptIn };
186
196
  } {
187
197
  let valid = true;
188
- const values: { eula: string; opt_in: "true" | "false" } = {
198
+ const values: { eula: string; opt_in: OptIn } = {
189
199
  eula: "",
190
- opt_in: "false"
200
+ opt_in: ""
191
201
  };
192
202
 
193
203
  Array.from(
194
204
  this.template.querySelectorAll<HTMLInputElement>("dx-checkbox")
195
205
  ).forEach((checkbox) => {
196
206
  valid = valid && checkbox.reportValidity();
197
- values[checkbox.name] = checkbox.checked;
207
+ values[checkbox.name] = (checkbox.checked && checkbox.value) || "";
198
208
  });
199
209
 
200
210
  return { valid, values };
@@ -2,10 +2,9 @@ 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;
9
8
  company: string;
10
9
  country: string;
11
10
  email: string;
@@ -13,7 +12,7 @@ export type UserData = {
13
12
  job_role: string;
14
13
  job_title: string;
15
14
  last_name: string;
16
- opt_in: boolean;
15
+ opt_in: OptIn;
17
16
  postal_code: string;
18
17
  username: string;
19
18
  };
@@ -22,7 +21,7 @@ export type SignupForm = {
22
21
  user: UserData;
23
22
  eula: string;
24
23
  default_driver: string;
25
- info_email: "True" | "False";
24
+ InfoEmail__c: "True" | "False";
26
25
  };
27
26
 
28
27
  type OrgStatus = "New" | "In Progress" | "Error";
@@ -297,9 +297,10 @@ export default abstract class DocsGrid extends LightningElement {
297
297
  this.productFiltersList = json.available_services;
298
298
 
299
299
  if (!this.selectedProductFilters.length) {
300
- this.selectedProductFilters = this.productFiltersList.map(
301
- (filter) => filter.value
302
- );
300
+ this.selectedProductFilters =
301
+ this.productFiltersList.map(
302
+ (filter) => filter.value
303
+ );
303
304
  }
304
305
  }
305
306
 
@@ -3,14 +3,12 @@ import { LightningElement } from "lwc";
3
3
  export default class PodcastSubscription extends LightningElement {
4
4
  badgeLinks = [
5
5
  {
6
- href:
7
- "https://podcasts.apple.com/us/podcast/salesforce-developer-podcast/id1482325260",
6
+ href: "https://podcasts.apple.com/us/podcast/salesforce-developer-podcast/id1482325260",
8
7
  imgAlt: "Listen on Apple Podcasts",
9
8
  imgSrc: "/assets/svg/podcasts-subscription-apple.svg"
10
9
  },
11
10
  {
12
- href:
13
- "https://www.google.com/podcasts?feed=aHR0cHM6Ly9zYWxlc2ZvcmNlZGV2cG9kY2FzdC5saWJzeW4uY29tL3Jzcw%3D%3D",
11
+ href: "https://www.google.com/podcasts?feed=aHR0cHM6Ly9zYWxlc2ZvcmNlZGV2cG9kY2FzdC5saWJzeW4uY29tL3Jzcw%3D%3D",
14
12
  imgAlt: "Listen on Google Podcasts",
15
13
  imgSrc: "/assets/svg/podcasts-subscription-google.svg"
16
14
  },
@@ -27,23 +25,19 @@ export default class PodcastSubscription extends LightningElement {
27
25
  text: "Stitcher"
28
26
  },
29
27
  {
30
- href:
31
- "https://www.amazon.com/Emerald-City-Productions-Salesforce-Developer/dp/B082PPXMLN/",
28
+ href: "https://www.amazon.com/Emerald-City-Productions-Salesforce-Developer/dp/B082PPXMLN/",
32
29
  text: "Alexa"
33
30
  },
34
31
  {
35
- href:
36
- "https://www.pandora.com/podcast/salesforce-developer-podcast/PC:34746",
32
+ href: "https://www.pandora.com/podcast/salesforce-developer-podcast/PC:34746",
37
33
  text: "Pandora"
38
34
  },
39
35
  {
40
- href:
41
- "https://www.iheart.com/podcast/263-salesforce-developer-podca-56252827",
36
+ href: "https://www.iheart.com/podcast/263-salesforce-developer-podca-56252827",
42
37
  text: "iHeartRadio"
43
38
  },
44
39
  {
45
- href:
46
- "https://tunein.com/podcasts/Technology-Podcasts/Salesforce-Developer-Podcast-p1255006/",
40
+ href: "https://tunein.com/podcasts/Technology-Podcasts/Salesforce-Developer-Podcast-p1255006/",
47
41
  text: "Tune-in"
48
42
  },
49
43
  {
@@ -58,16 +58,14 @@ export default {
58
58
  type: "Modeler Installer",
59
59
  version: "238.00003.0.0",
60
60
  description: "RCG Mobility Modeler Installer v238 release",
61
- link:
62
- "/Modeler/238/modeler-build-000003-2022-05-12T07-10/CGCloudModelerSetup.v238.3.0.zip"
61
+ link: "/Modeler/238/modeler-build-000003-2022-05-12T07-10/CGCloudModelerSetup.v238.3.0.zip"
63
62
  },
64
63
  {
65
64
  id: "3",
66
65
  type: "Modeler Update Package",
67
66
  version: "238.00003.0.0",
68
67
  description: "RCG Mobility Modeler MUP v238 release",
69
- link:
70
- "/Modeler/238/modeler-build-000003-2022-05-12T07-10/MUP.v238.3.0.zip"
68
+ link: "/Modeler/238/modeler-build-000003-2022-05-12T07-10/MUP.v238.3.0.zip"
71
69
  },
72
70
  {
73
71
  id: "4",
@@ -88,16 +86,14 @@ export default {
88
86
  type: "Modeler Installer",
89
87
  version: "236.00019.0.0",
90
88
  description: "RCG Mobility Modeler Installer v236 release",
91
- link:
92
- "/Modeler/236/modeler-build-000019-2022-06-01T10-47/CGCloudModelerSetup.v236.19.0.zip"
89
+ link: "/Modeler/236/modeler-build-000019-2022-06-01T10-47/CGCloudModelerSetup.v236.19.0.zip"
93
90
  },
94
91
  {
95
92
  id: "7",
96
93
  type: "Modeler Update Package",
97
94
  version: "236.00019.0.0",
98
95
  description: "RCG Mobility Modeler MUP v236 release",
99
- link:
100
- "/Modeler/236/modeler-build-000019-2022-06-01T10-47/MUP.v236.19.0.zip"
96
+ link: "/Modeler/236/modeler-build-000019-2022-06-01T10-47/MUP.v236.19.0.zip"
101
97
  },
102
98
  {
103
99
  id: "8",
@@ -119,16 +115,14 @@ export default {
119
115
  type: "Modeler Installer",
120
116
  version: "234.00013.0.0",
121
117
  description: "Initial RCG Mobility Modeler Installer v234 release",
122
- link:
123
- "/Modeler/modeler-build-000013-2021-10-27T06-20/CGCloudModelerSetup.v234.13.0.zip"
118
+ link: "/Modeler/modeler-build-000013-2021-10-27T06-20/CGCloudModelerSetup.v234.13.0.zip"
124
119
  },
125
120
  {
126
121
  id: "11",
127
122
  type: "Modeler Update Package",
128
123
  version: "234.00013.0.0",
129
124
  description: "Initial RCG Mobility Modeler MUP v234 release",
130
- link:
131
- "/Modeler/modeler-build-000013-2021-10-27T06-20/MUP.v234.13.0.zip"
125
+ link: "/Modeler/modeler-build-000013-2021-10-27T06-20/MUP.v234.13.0.zip"
132
126
  },
133
127
  {
134
128
  id: "12",