@salesforcedevs/dw-components 1.3.188 → 1.3.191-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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforcedevs/dw-components",
3
- "version": "1.3.188",
3
+ "version": "1.3.191-alpha.0",
4
4
  "description": "Lightning web components for https://developer.salesforce.com",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -23,6 +23,5 @@
23
23
  "@types/lodash.uniqby": "^4.7.7",
24
24
  "@types/setimmediate": "^1.0.2",
25
25
  "setimmediate": "^1.0.5"
26
- },
27
- "gitHead": "f0b1c1b1d73f174466f05835689705ad459ccce4"
26
+ }
28
27
  }
@@ -83,7 +83,6 @@ dx-section {
83
83
 
84
84
  .pagination-container {
85
85
  max-width: fit-content;
86
- max-width: -moz-fit-content;
87
86
  margin: 50px auto;
88
87
  }
89
88
 
@@ -158,13 +157,13 @@ dx-section {
158
157
  }
159
158
 
160
159
  @media screen and (min-width: 1025px) {
161
- .item-container:not(:nth-child(1)):not(:nth-child(2)):not(:nth-child(3)) {
160
+ .item-container:not(:nth-child(1), :nth-child(2), :nth-child(3)) {
162
161
  margin-top: 70px;
163
162
  }
164
163
  }
165
164
 
166
165
  @media screen and (max-width: 1024px) and (min-width: 768px) {
167
- .item-container:not(:nth-child(1)):not(:nth-child(2)) {
166
+ .item-container:not(:nth-child(1), :nth-child(2)) {
168
167
  margin-top: 51px;
169
168
  }
170
169
  }
@@ -182,13 +182,13 @@ dx-filter-menu {
182
182
 
183
183
  .chip-title {
184
184
  font-weight: bold;
185
- color: rgb(24, 24, 24);
185
+ color: rgb(24 24 24);
186
186
  }
187
187
 
188
188
  .chip-item {
189
- border: 2px solid rgb(92, 92, 92);
189
+ border: 2px solid rgb(92 92 92);
190
190
  border-radius: 4px;
191
- color: rgb(92, 92, 92);
191
+ color: rgb(92 92 92);
192
192
  font-weight: 600;
193
193
  padding: 2px 4px;
194
194
  }
@@ -82,6 +82,22 @@ export default class DeSignupForm extends LightningElement {
82
82
  this.updateInnerHtml("span.legal-checkbox", this.privacyText);
83
83
  }
84
84
 
85
+ createUUID() {
86
+ if ("crypto" in window && "randomUUID" in crypto) {
87
+ return crypto.randomUUID();
88
+ }
89
+ let dt = new Date().getTime();
90
+ const uuid = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
91
+ /[xy]/g,
92
+ function (c) {
93
+ var r = (dt + Math.random() * 16) % 16 | 0;
94
+ dt = Math.floor(dt / 16);
95
+ return (c === "x" ? r : (r & 0x3) | 0x8).toString(16);
96
+ }
97
+ );
98
+ return uuid;
99
+ }
100
+
85
101
  handleSubmit(event: Event): void {
86
102
  event.preventDefault();
87
103
 
@@ -112,8 +128,10 @@ export default class DeSignupForm extends LightningElement {
112
128
  form_country: formData.user.country,
113
129
  form_name: "Dev Edition Signup",
114
130
  form_primary_product_interest: "Developer Edition",
131
+ offer_id: `form-builder|dev-edition-signup|${DEFAULT_DRIVER}AAA`,
115
132
  offer_type: "free trial",
116
- name_capture_campaign_id: `${DEFAULT_DRIVER}AAA`
133
+ name_capture_campaign_id: `${DEFAULT_DRIVER}AAA`,
134
+ form_join_id_unique: this.createUUID()
117
135
  });
118
136
  window.location.href = "/signup/success";
119
137
  })
@@ -33,7 +33,6 @@
33
33
 
34
34
  .pagination-container {
35
35
  max-width: fit-content;
36
- max-width: -moz-fit-content;
37
36
  margin: var(--dx-g-spacing-lg) auto;
38
37
  }
39
38
 
@@ -23,7 +23,7 @@ dx-section.events-action-bar::part(container) {
23
23
 
24
24
  dx-section.upcoming-events::part(container)::before {
25
25
  content: "";
26
- background-image: url(https://a.sfdcstatic.com/developer-website/images/events-cloud1.svg);
26
+ background-image: url("https://a.sfdcstatic.com/developer-website/images/events-cloud1.svg");
27
27
  width: 146px;
28
28
  height: 106px;
29
29
  position: absolute;
@@ -34,7 +34,7 @@ dx-section.upcoming-events::part(container)::before {
34
34
 
35
35
  dx-section.upcoming-events::part(container)::after {
36
36
  content: "";
37
- background-image: url(https://a.sfdcstatic.com/developer-website/images/events-cloud2.svg);
37
+ background-image: url("https://a.sfdcstatic.com/developer-website/images/events-cloud2.svg");
38
38
  width: 152px;
39
39
  height: 111px;
40
40
  position: absolute;
@@ -45,7 +45,7 @@ dx-section.upcoming-events::part(container)::after {
45
45
 
46
46
  dx-section.past-events::part(container)::before {
47
47
  content: "";
48
- background-image: url(https://a.sfdcstatic.com/developer-website/images/events-gradient-elipse.svg);
48
+ background-image: url("https://a.sfdcstatic.com/developer-website/images/events-gradient-elipse.svg");
49
49
  width: 2991px;
50
50
  height: 839px;
51
51
  position: absolute;
@@ -56,7 +56,7 @@ dx-section.past-events::part(container)::before {
56
56
 
57
57
  dx-section:not(:nth-child(2)).past-events::part(container)::after {
58
58
  content: "";
59
- background-image: url(https://a.sfdcstatic.com/developer-website/images/events-cloud3.svg);
59
+ background-image: url("https://a.sfdcstatic.com/developer-website/images/events-cloud3.svg");
60
60
  width: 655px;
61
61
  height: 270px;
62
62
  position: absolute;
@@ -141,8 +141,8 @@ export default class J2sCardSequence extends LightningElement {
141
141
  Company__c: this.tbidUserInfo.custom_attributes?.CompanyName,
142
142
  MailingCountry: this.tbidUserInfo.custom_attributes?.Country,
143
143
  MailingState: this.tbidUserInfo.address?.region,
144
- RelationshipToSalesforce:
145
- this.tbidUserInfo.custom_attributes?.RelationshipToSalesforce
144
+ RelationshipToSalesforce: this.tbidUserInfo.custom_attributes
145
+ ?.RelationshipToSalesforce
146
146
  };
147
147
 
148
148
  // Return above object but only with keys that have a truthy value, and with any URI-encoded values decoded
@@ -219,20 +219,18 @@ export default class J2sCardSequence extends LightningElement {
219
219
 
220
220
  renderedCallback() {
221
221
  if (!this.isLoading) {
222
- (
223
- this.template.querySelector(
224
- "dx-step-sequence"
225
- ) as unknown as StepSequence
226
- )?.remeasureSteps();
222
+ ((this.template.querySelector(
223
+ "dx-step-sequence"
224
+ ) as unknown) as StepSequence)?.remeasureSteps();
227
225
  }
228
226
 
229
227
  if (
230
228
  this.formSubmissionFailureState &&
231
229
  this.stepsData[this.currentSequenceStep].formData
232
230
  ) {
233
- const j2sCardStep = this.template.querySelectorAll(
231
+ const j2sCardStep = (this.template.querySelectorAll(
234
232
  "dw-j2s-card-sequence-step"
235
- ) as unknown as J2sCardSequenceStep[];
233
+ ) as unknown) as J2sCardSequenceStep[];
236
234
  j2sCardStep[this.currentSequenceStep]?.notifyFormSubmitFailure(
237
235
  this.formSubmissionFailureState
238
236
  );
@@ -245,6 +243,12 @@ export default class J2sCardSequence extends LightningElement {
245
243
  }
246
244
 
247
245
  handleStepSequenceChange({ detail }: CustomEvent) {
246
+ if (detail.stepIndex === 1 && this.currentSequenceStep === 2) {
247
+ // User is going back after submitting the form; ensure that `selectedCountry` is reset, since this impacts form behavior
248
+ this.selectedCountry =
249
+ this.formIncomingUserInfo.MailingCountry || "";
250
+ }
251
+
248
252
  this.currentSequenceStep = detail.stepIndex;
249
253
  this.resetCustomButtonColors();
250
254
 
@@ -314,8 +318,6 @@ export default class J2sCardSequence extends LightningElement {
314
318
  this.jumpToStepIndex(2, false);
315
319
  this.initialStepIndex = 0; // don't save final step in storage; rather, reset the starting step
316
320
  this.resetRecaptcha();
317
- this.selectedCountry =
318
- this.formIncomingUserInfo.MailingCountry || ""; // reset selected country after form submission since this impact's form behavior
319
321
  this.hasAlreadyRegistered = true;
320
322
  } else {
321
323
  throw new Error(
@@ -372,11 +374,9 @@ export default class J2sCardSequence extends LightningElement {
372
374
  if (andStoreIndex) {
373
375
  this.initialStepIndex = stepIndex; // update sessionStorage value
374
376
  }
375
- (
376
- this.template.querySelector(
377
- "dx-step-sequence"
378
- ) as unknown as StepSequence
379
- )?.jumpToStep(stepIndex);
377
+ ((this.template.querySelector(
378
+ "dx-step-sequence"
379
+ ) as unknown) as StepSequence)?.jumpToStep(stepIndex);
380
380
  }
381
381
 
382
382
  private async getCountryList() {
@@ -6,7 +6,7 @@
6
6
  dx-card-step.final-card-with-action::part(footer-container) {
7
7
  background-color: var(--dx-g-indigo-vibrant-95);
8
8
  border-radius: 8px;
9
- margin: 0 30px 30px 30px;
9
+ margin: 0 30px 30px;
10
10
  }
11
11
 
12
12
  [slot="secondary-action-section"] {
@@ -71,6 +71,6 @@ dx-card-step.final-card-with-action::part(footer-container) {
71
71
  @media screen and (max-width: 320px) {
72
72
  /* Special styling for the final step's actions if they are shown */
73
73
  dx-card-step.final-card-with-action::part(footer-container) {
74
- margin: 0 20px 30px 20px;
74
+ margin: 0 20px 30px;
75
75
  }
76
76
  }
@@ -16,9 +16,9 @@ export default class J2sCardSequenceStep extends LightningElement {
16
16
 
17
17
  @api
18
18
  public notifyFormSubmitFailure(formFailureData: Partial<DrmFormData>) {
19
- (
20
- this.template.querySelector("dw-j2s-form") as unknown as J2sForm
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;
@@ -86,9 +86,9 @@ export default class J2sCardSequenceStep extends LightningElement {
86
86
  if (this.stepIndex === 0) {
87
87
  this.dispatchEvent(new CustomEvent("getstarted"));
88
88
  } else if (this.stepIndex === 1) {
89
- const j2sFormEl = this.template.querySelector(
89
+ const j2sFormEl = (this.template.querySelector(
90
90
  "dw-j2s-form"
91
- ) as unknown as J2sForm;
91
+ ) as unknown) as J2sForm;
92
92
  const formData = j2sFormEl.formDataForDrm;
93
93
 
94
94
  // For some countries, explicit approvals will be present; for others, it is implicitly assumed
@@ -109,8 +109,9 @@ export default class J2sCardSequenceStep extends LightningElement {
109
109
 
110
110
  private updateStaticInnerHtml() {
111
111
  const { bodyHtml, secondaryActionHtml } = this.stepDatum;
112
- const bodyMarkupContainer =
113
- this.template.querySelector("span.body-markup");
112
+ const bodyMarkupContainer = this.template.querySelector(
113
+ "span.body-markup"
114
+ );
114
115
  const secondaryActionMarkupContainer = this.template.querySelector(
115
116
  "span.secondary-action-markup"
116
117
  );
@@ -253,8 +253,10 @@ export default class J2sForm extends LightningElementWithState<J2sFormState> {
253
253
  handleFormFieldChange = (evt: CustomEvent) => {
254
254
  // Event target information must be read prior to debouncing; the target is gone after the debounce.
255
255
  const { target = {}, detail } = evt;
256
- const { name: targetName, required: isRequiredField } =
257
- target as HTMLInputElement;
256
+ const {
257
+ name: targetName,
258
+ required: isRequiredField
259
+ } = target as HTMLInputElement;
258
260
  const value =
259
261
  typeof detail === "string"
260
262
  ? detail
@@ -3049,21 +3049,28 @@ const tbidUserInfo = {
3049
3049
  "https://trailblazer-identity--Dev1.cs192.my.salesforce.com/services/Soap/m/42.0/herherwe0823",
3050
3050
  partner:
3051
3051
  "https://trailblazer-identity--Dev1.cs192.my.salesforce.com/services/Soap/u/42.0/herherwe0823",
3052
- rest: "https://trailblazer-identity--Dev1.cs192.my.salesforce.com/services/data/v42.0/",
3052
+ rest:
3053
+ "https://trailblazer-identity--Dev1.cs192.my.salesforce.com/services/data/v42.0/",
3053
3054
  sobjects:
3054
3055
  "https://trailblazer-identity--Dev1.cs192.my.salesforce.com/services/data/v42.0/sobjects/",
3055
- search: "https://trailblazer-identity--Dev1.cs192.my.salesforce.com/services/data/v42.0/search/",
3056
- query: "https://trailblazer-identity--Dev1.cs192.my.salesforce.com/services/data/v42.0/query/",
3057
- recent: "https://trailblazer-identity--Dev1.cs192.my.salesforce.com/services/data/v42.0/recent/",
3056
+ search:
3057
+ "https://trailblazer-identity--Dev1.cs192.my.salesforce.com/services/data/v42.0/search/",
3058
+ query:
3059
+ "https://trailblazer-identity--Dev1.cs192.my.salesforce.com/services/data/v42.0/query/",
3060
+ recent:
3061
+ "https://trailblazer-identity--Dev1.cs192.my.salesforce.com/services/data/v42.0/recent/",
3058
3062
  tooling_soap:
3059
3063
  "https://trailblazer-identity--Dev1.cs192.my.salesforce.com/services/Soap/T/42.0/herherwe0823",
3060
3064
  tooling_rest:
3061
3065
  "https://trailblazer-identity--Dev1.cs192.my.salesforce.com/services/data/v42.0/tooling/",
3062
3066
  profile:
3063
3067
  "https://trailblazer-identity--Dev1.cs192.my.salesforce.com/oooooo",
3064
- feeds: "https://trailblazer-identity--Dev1.cs192.my.salesforce.com/services/data/v42.0/chatter/feeds",
3065
- groups: "https://trailblazer-identity--Dev1.cs192.my.salesforce.com/services/data/v42.0/chatter/groups",
3066
- users: "https://trailblazer-identity--Dev1.cs192.my.salesforce.com/services/data/v42.0/chatter/users",
3068
+ feeds:
3069
+ "https://trailblazer-identity--Dev1.cs192.my.salesforce.com/services/data/v42.0/chatter/feeds",
3070
+ groups:
3071
+ "https://trailblazer-identity--Dev1.cs192.my.salesforce.com/services/data/v42.0/chatter/groups",
3072
+ users:
3073
+ "https://trailblazer-identity--Dev1.cs192.my.salesforce.com/services/data/v42.0/chatter/users",
3067
3074
  feed_items:
3068
3075
  "https://trailblazer-identity--Dev1.cs192.my.salesforce.com/services/data/v42.0/chatter/feed-elements",
3069
3076
  feed_elements:
@@ -3079,7 +3086,8 @@ export const formMetadata = {
3079
3086
  'I agree to the Journey to Salesforce Program Terms, subject to the <a href="http://www.google.com">Salesforce Program Agreement</a>.',
3080
3087
  notAvailableAlertInfo: {
3081
3088
  title: "Not Available",
3082
- body: 'The Journey to Salesforce program is not currently available in your country. See the <a href="https://www.google.com/">program FAQs</a> for a list of participating countries.'
3089
+ body:
3090
+ 'The Journey to Salesforce program is not currently available in your country. See the <a href="https://www.google.com/">program FAQs</a> for a list of participating countries.'
3083
3091
  },
3084
3092
  participatingCountryCodes: ["US", "CA", "IN"]
3085
3093
  };
@@ -11,7 +11,7 @@
11
11
 
12
12
  h4 {
13
13
  font-size: 20px;
14
- margin: 0 0 28px 0;
14
+ margin: 0 0 28px;
15
15
  text-align: center;
16
16
  }
17
17
 
@@ -55,7 +55,7 @@ dx-checkbox:last-of-type {
55
55
  .marketing-text,
56
56
  .legal-text {
57
57
  font-size: 14px;
58
- margin: 0 0 16px 0;
58
+ margin: 0 0 16px;
59
59
  }
60
60
 
61
61
  @media screen and (max-width: 360px) {
@@ -5,8 +5,7 @@
5
5
  background-repeat: no-repeat;
6
6
  background-position: center;
7
7
  display: flex;
8
- flex-direction: column;
9
- flex-wrap: wrap;
8
+ flex-flow: column wrap;
10
9
  align-items: center;
11
10
  justify-content: center;
12
11
  text-align: center;
@@ -24,7 +23,7 @@
24
23
  }
25
24
 
26
25
  .badges {
27
- margin: 8px auto 6px auto;
26
+ margin: 8px auto 6px;
28
27
  text-align: center;
29
28
  }
30
29
 
@@ -59,7 +58,7 @@
59
58
 
60
59
  .badges a {
61
60
  display: inline-block;
62
- margin: 22px 13px 8px 13px;
61
+ margin: 22px 13px 8px;
63
62
  }
64
63
 
65
64
  .badges img {
@@ -4,8 +4,7 @@
4
4
  .container {
5
5
  background-repeat: no-repeat;
6
6
  display: flex;
7
- flex-direction: column;
8
- flex-wrap: wrap;
7
+ flex-flow: column wrap;
9
8
  align-items: center;
10
9
  justify-content: center;
11
10
  text-align: center;
package/LICENSE DELETED
@@ -1,12 +0,0 @@
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.