@sitecore-jss/sitecore-jss-forms 16.0.0 → 16.0.2
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/dist/serializeForm.js +4 -6
- package/package.json +3 -3
package/dist/serializeForm.js
CHANGED
|
@@ -31,9 +31,7 @@ exports.serializeForm = serializeForm;
|
|
|
31
31
|
* @param {Array<FormField<any>>} fields
|
|
32
32
|
* @param {SerializeFormOptions} options
|
|
33
33
|
*/
|
|
34
|
-
function pushFields(result,
|
|
35
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
36
|
-
fields, options) {
|
|
34
|
+
function pushFields(result, fields, options) {
|
|
37
35
|
fields.forEach(function (field) {
|
|
38
36
|
if (FormField_1.instanceOfButtonFormField(field) &&
|
|
39
37
|
(!options.submitButtonName || field.buttonField.name === options.submitButtonName)) {
|
|
@@ -42,14 +40,14 @@ fields, options) {
|
|
|
42
40
|
pushField(result, field.navigationStepField);
|
|
43
41
|
}
|
|
44
42
|
else if (FormField_1.instanceOfValueFormField(field)) {
|
|
43
|
+
pushField(result, field.indexField);
|
|
44
|
+
pushField(result, field.fieldIdField);
|
|
45
45
|
if (field.valueField.name.endsWith('.Files')) {
|
|
46
46
|
var fileUploadField = field;
|
|
47
|
-
if (!fileUploadField.
|
|
47
|
+
if (!fileUploadField.model.files) {
|
|
48
48
|
return;
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
pushField(result, field.indexField);
|
|
52
|
-
pushField(result, field.fieldIdField);
|
|
53
51
|
// get stored value (i.e. if a multistep form)
|
|
54
52
|
if (ViewModel_1.instanceOfInputViewModel(field.model) && options.fieldValueParser) {
|
|
55
53
|
var fieldValue = options.fieldValueParser(field);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sitecore-jss/sitecore-jss-forms",
|
|
3
|
-
"version": "16.0.
|
|
3
|
+
"version": "16.0.2",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "npm run clean && tsc",
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
"typescript": "^3.6.3"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@sitecore-jss/sitecore-jss": "^16.0.
|
|
45
|
+
"@sitecore-jss/sitecore-jss": "^16.0.2"
|
|
46
46
|
},
|
|
47
47
|
"description": "",
|
|
48
48
|
"types": "types/index.d.ts",
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "df2bcfa413fe031676fc2f5282b96ab21cbf02cc"
|
|
50
50
|
}
|