@salesforcedevs/dw-components 1.3.298 → 1.3.302

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.298",
3
+ "version": "1.3.302",
4
4
  "description": "Lightning web components for https://developer.salesforce.com",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -26,5 +26,5 @@
26
26
  "@types/setimmediate": "^1.0.2",
27
27
  "setimmediate": "^1.0.5"
28
28
  },
29
- "gitHead": "51a41a0cbf0ad684b636a1b9671c7686d1bfd986"
29
+ "gitHead": "c3601af5d8b2307e904fcbf63e4ae0ab997f5eaf"
30
30
  }
@@ -45,7 +45,6 @@
45
45
  </div>
46
46
  <div slot="primary-action-section">
47
47
  <dx-button
48
- if:true={showPrimaryAction}
49
48
  class="primary-action"
50
49
  disabled={isPrimaryActionDisabled}
51
50
  href={primaryActionLink}
@@ -16,17 +16,15 @@ export default class J2sCardSequenceStep extends LightningElement {
16
16
 
17
17
  @api
18
18
  public notifyFormSubmitFailure(formFailureData: Partial<DrmFormData>) {
19
- ((this.template.querySelector(
20
- "dw-j2s-form"
21
- ) as unknown) as J2sForm)?.notifySubmitFailure(formFailureData);
19
+ (
20
+ this.template.querySelector("dw-j2s-form") as unknown as J2sForm
21
+ )?.notifySubmitFailure(formFailureData);
22
22
  }
23
23
 
24
24
  private isJ2sFormInvalid = false;
25
25
 
26
26
  private get stepClassName() {
27
- return this.stepIndex === 2 && this.selectedCountry === "IN"
28
- ? "final-card-with-action"
29
- : "";
27
+ return this.stepIndex === 2 ? "final-card-with-action" : "";
30
28
  }
31
29
 
32
30
  private get isPrimaryActionDisabled() {
@@ -60,14 +58,6 @@ export default class J2sCardSequenceStep extends LightningElement {
60
58
  return this.stepDatum.primaryAction.linkTarget || "_blank";
61
59
  }
62
60
 
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
-
71
61
  renderedCallback() {
72
62
  this.updateStaticInnerHtml();
73
63
  }
@@ -86,9 +76,9 @@ export default class J2sCardSequenceStep extends LightningElement {
86
76
  if (this.stepIndex === 0) {
87
77
  this.dispatchEvent(new CustomEvent("getstarted"));
88
78
  } else if (this.stepIndex === 1) {
89
- const j2sFormEl = (this.template.querySelector(
79
+ const j2sFormEl = this.template.querySelector(
90
80
  "dw-j2s-form"
91
- ) as unknown) as J2sForm;
81
+ ) as unknown as J2sForm;
92
82
  const formData = j2sFormEl.formDataForDrm;
93
83
 
94
84
  // For some countries, explicit approvals will be present; for others, it is implicitly assumed
@@ -109,9 +99,8 @@ export default class J2sCardSequenceStep extends LightningElement {
109
99
 
110
100
  private updateStaticInnerHtml() {
111
101
  const { bodyHtml, secondaryActionHtml } = this.stepDatum;
112
- const bodyMarkupContainer = this.template.querySelector(
113
- "span.body-markup"
114
- );
102
+ const bodyMarkupContainer =
103
+ this.template.querySelector("span.body-markup");
115
104
  const secondaryActionMarkupContainer = this.template.querySelector(
116
105
  "span.secondary-action-markup"
117
106
  );
@@ -135,11 +124,7 @@ export default class J2sCardSequenceStep extends LightningElement {
135
124
  }
136
125
 
137
126
  if (secondaryActionMarkupContainer) {
138
- // new special exception on step 2 to only show secondary action for IN
139
- secondaryActionMarkupContainer.innerHTML =
140
- secondaryActionHtml && this.showSecondaryAction
141
- ? secondaryActionHtml
142
- : "";
127
+ secondaryActionMarkupContainer.innerHTML = secondaryActionHtml || "";
143
128
  }
144
129
  }
145
130