@salesforcedevs/dw-components 1.3.298 → 1.3.304
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/j2sCardSequenceStep/j2sCardSequenceStep.html +0 -1
- package/src/modules/dw/j2sCardSequenceStep/j2sCardSequenceStep.ts +9 -24
- package/src/modules/dw/languageSelector/languageSelector.html +1 -1
- package/src/modules/dw/languageSelector/languageSelector.ts +4 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforcedevs/dw-components",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.304",
|
|
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": "
|
|
29
|
+
"gitHead": "00f26c1df5e3db652f423fdf880224e65ca6a4f6"
|
|
30
30
|
}
|
|
@@ -16,17 +16,15 @@ export default class J2sCardSequenceStep extends LightningElement {
|
|
|
16
16
|
|
|
17
17
|
@api
|
|
18
18
|
public notifyFormSubmitFailure(formFailureData: Partial<DrmFormData>) {
|
|
19
|
-
(
|
|
20
|
-
"dw-j2s-form"
|
|
21
|
-
)
|
|
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
|
|
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 =
|
|
79
|
+
const j2sFormEl = this.template.querySelector(
|
|
90
80
|
"dw-j2s-form"
|
|
91
|
-
) as unknown
|
|
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 =
|
|
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
|
-
|
|
139
|
-
secondaryActionMarkupContainer.innerHTML =
|
|
140
|
-
secondaryActionHtml && this.showSecondaryAction
|
|
141
|
-
? secondaryActionHtml
|
|
142
|
-
: "";
|
|
127
|
+
secondaryActionMarkupContainer.innerHTML = secondaryActionHtml || "";
|
|
143
128
|
}
|
|
144
129
|
}
|
|
145
130
|
|
|
@@ -26,7 +26,8 @@ export const normalizePostLink = (post: {
|
|
|
26
26
|
|
|
27
27
|
export default class LanguageSelector extends LightningElement {
|
|
28
28
|
@track languages = [] as SelectOption[];
|
|
29
|
-
|
|
29
|
+
selectedLanguage?: string;
|
|
30
|
+
loading = true;
|
|
30
31
|
@api postAcf!: string;
|
|
31
32
|
@api postId?: string;
|
|
32
33
|
|
|
@@ -69,6 +70,8 @@ export default class LanguageSelector extends LightningElement {
|
|
|
69
70
|
});
|
|
70
71
|
} catch (e) {
|
|
71
72
|
console.error(e);
|
|
73
|
+
} finally {
|
|
74
|
+
this.loading = false;
|
|
72
75
|
}
|
|
73
76
|
|
|
74
77
|
this.selectedLanguage =
|