Skip to content

Commit b519591

Browse files
committed
Version bump.
1 parent d1540ef commit b519591

13 files changed

+127
-78
lines changed

Changelog.md

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file
44
The format is based on [Keep a Changelog](http://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](http://semver.org/).
66

7+
## 2.29.6
8+
### Fixed
9+
- Fix validation and nested form issues with wizard.
10+
711
## 2.29.5
812
### Fixed
913
- Ensure that the form components do not load if conditions on the component return false.

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "formiojs",
33
"description": "Common js library for client side interaction with <form.io>",
4-
"version": "2.29.5",
4+
"version": "2.29.6",
55
"main": "dist/formio.min.js",
66
"license": "MIT",
77
"homepage": "https://github.com/formio/formio.js",

dist/formio.embed.js

+23-14
Original file line numberDiff line numberDiff line change
@@ -7473,9 +7473,9 @@ var FormComponent = exports.FormComponent = function (_FormioForm) {
74737473
}
74747474
}, {
74757475
key: 'checkValidity',
7476-
value: function checkValidity() {
7476+
value: function checkValidity(data, dirty) {
74777477
// Maintain isolated data scope when passing root data for validity checks.
7478-
return _get(FormComponent.prototype.__proto__ || Object.getPrototypeOf(FormComponent.prototype), 'checkValidity', this).call(this, this.subData);
7478+
return _get(FormComponent.prototype.__proto__ || Object.getPrototypeOf(FormComponent.prototype), 'checkValidity', this).call(this, this.subData, dirty);
74797479
}
74807480
}, {
74817481
key: 'checkConditions',
@@ -7503,10 +7503,15 @@ var FormComponent = exports.FormComponent = function (_FormioForm) {
75037503
}, {
75047504
key: 'beforeNext',
75057505
value: function beforeNext() {
7506+
var _this2 = this;
7507+
75067508
// If we wish to submit the form on next page, then do that here.
75077509
if (this.component.submit) {
75087510
this.submitted = true;
7509-
return this.submit(true);
7511+
return this.submit(true).then(function (submission) {
7512+
// Set data to submission.
7513+
return _this2.data[_this2.component.key] = submission;
7514+
});
75107515
} else {
75117516
return _get(FormComponent.prototype.__proto__ || Object.getPrototypeOf(FormComponent.prototype), 'beforeNext', this).call(this);
75127517
}
@@ -7519,17 +7524,17 @@ var FormComponent = exports.FormComponent = function (_FormioForm) {
75197524
}, {
75207525
key: 'beforeSubmit',
75217526
value: function beforeSubmit() {
7522-
var _this2 = this;
7527+
var _this3 = this;
75237528

75247529
// Ensure we submit the form.
75257530
if (this.component.submit && !this.submitted) {
75267531
return this.submit(true).then(function (submission) {
75277532
// Before we submit, we need to filter out the references.
7528-
_this2.data[_this2.component.key] = _this2.component.reference ? {
7533+
_this3.data[_this3.component.key] = _this3.component.reference ? {
75297534
_id: submission._id,
75307535
form: submission.form
75317536
} : submission;
7532-
return _this2.data[_this2.component.key];
7537+
return _this3.data[_this3.component.key];
75337538
});
75347539
} else {
75357540
return _get(FormComponent.prototype.__proto__ || Object.getPrototypeOf(FormComponent.prototype), 'beforeSubmit', this).call(this);
@@ -7578,10 +7583,10 @@ var FormComponent = exports.FormComponent = function (_FormioForm) {
75787583
}, {
75797584
key: 'whenReady',
75807585
value: function whenReady() {
7581-
var _this3 = this;
7586+
var _this4 = this;
75827587

75837588
return this.ready.then(function () {
7584-
return _this3.readyPromise;
7589+
return _this4.readyPromise;
75857590
});
75867591
}
75877592
}, {
@@ -7607,7 +7612,7 @@ var FormComponent = exports.FormComponent = function (_FormioForm) {
76077612
}, {
76087613
key: 'setValue',
76097614
value: function setValue(submission, flags) {
7610-
var _this4 = this;
7615+
var _this5 = this;
76117616

76127617
flags = this.getFlags.apply(this, arguments);
76137618
if (!submission) {
@@ -7632,11 +7637,11 @@ var FormComponent = exports.FormComponent = function (_FormioForm) {
76327637
this.formio.submissionId = submission._id;
76337638
this.formio.submissionUrl = this.formio.submissionsUrl + '/' + submission._id;
76347639
this.formReady.then(function () {
7635-
_this4._loading = false;
7636-
_this4.loading = true;
7637-
_this4.formio.loadSubmission().then(function (result) {
7638-
_this4.loading = false;
7639-
_this4.setValue(result, {
7640+
_this5._loading = false;
7641+
_this5.loading = true;
7642+
_this5.formio.loadSubmission().then(function (result) {
7643+
_this5.loading = false;
7644+
_this5.setValue(result, {
76407645
noload: true
76417646
});
76427647
});
@@ -12006,6 +12011,10 @@ var FormioForm = function (_FormioComponents) {
1200612011
error = { message: error };
1200712012
}
1200812013

12014+
if ('details' in error) {
12015+
error = error.details;
12016+
}
12017+
1200912018
return this.showErrors(error);
1201012019
}
1201112020

dist/formio.embed.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/formio.form.js

+23-14
Original file line numberDiff line numberDiff line change
@@ -7473,9 +7473,9 @@ var FormComponent = exports.FormComponent = function (_FormioForm) {
74737473
}
74747474
}, {
74757475
key: 'checkValidity',
7476-
value: function checkValidity() {
7476+
value: function checkValidity(data, dirty) {
74777477
// Maintain isolated data scope when passing root data for validity checks.
7478-
return _get(FormComponent.prototype.__proto__ || Object.getPrototypeOf(FormComponent.prototype), 'checkValidity', this).call(this, this.subData);
7478+
return _get(FormComponent.prototype.__proto__ || Object.getPrototypeOf(FormComponent.prototype), 'checkValidity', this).call(this, this.subData, dirty);
74797479
}
74807480
}, {
74817481
key: 'checkConditions',
@@ -7503,10 +7503,15 @@ var FormComponent = exports.FormComponent = function (_FormioForm) {
75037503
}, {
75047504
key: 'beforeNext',
75057505
value: function beforeNext() {
7506+
var _this2 = this;
7507+
75067508
// If we wish to submit the form on next page, then do that here.
75077509
if (this.component.submit) {
75087510
this.submitted = true;
7509-
return this.submit(true);
7511+
return this.submit(true).then(function (submission) {
7512+
// Set data to submission.
7513+
return _this2.data[_this2.component.key] = submission;
7514+
});
75107515
} else {
75117516
return _get(FormComponent.prototype.__proto__ || Object.getPrototypeOf(FormComponent.prototype), 'beforeNext', this).call(this);
75127517
}
@@ -7519,17 +7524,17 @@ var FormComponent = exports.FormComponent = function (_FormioForm) {
75197524
}, {
75207525
key: 'beforeSubmit',
75217526
value: function beforeSubmit() {
7522-
var _this2 = this;
7527+
var _this3 = this;
75237528

75247529
// Ensure we submit the form.
75257530
if (this.component.submit && !this.submitted) {
75267531
return this.submit(true).then(function (submission) {
75277532
// Before we submit, we need to filter out the references.
7528-
_this2.data[_this2.component.key] = _this2.component.reference ? {
7533+
_this3.data[_this3.component.key] = _this3.component.reference ? {
75297534
_id: submission._id,
75307535
form: submission.form
75317536
} : submission;
7532-
return _this2.data[_this2.component.key];
7537+
return _this3.data[_this3.component.key];
75337538
});
75347539
} else {
75357540
return _get(FormComponent.prototype.__proto__ || Object.getPrototypeOf(FormComponent.prototype), 'beforeSubmit', this).call(this);
@@ -7578,10 +7583,10 @@ var FormComponent = exports.FormComponent = function (_FormioForm) {
75787583
}, {
75797584
key: 'whenReady',
75807585
value: function whenReady() {
7581-
var _this3 = this;
7586+
var _this4 = this;
75827587

75837588
return this.ready.then(function () {
7584-
return _this3.readyPromise;
7589+
return _this4.readyPromise;
75857590
});
75867591
}
75877592
}, {
@@ -7607,7 +7612,7 @@ var FormComponent = exports.FormComponent = function (_FormioForm) {
76077612
}, {
76087613
key: 'setValue',
76097614
value: function setValue(submission, flags) {
7610-
var _this4 = this;
7615+
var _this5 = this;
76117616

76127617
flags = this.getFlags.apply(this, arguments);
76137618
if (!submission) {
@@ -7632,11 +7637,11 @@ var FormComponent = exports.FormComponent = function (_FormioForm) {
76327637
this.formio.submissionId = submission._id;
76337638
this.formio.submissionUrl = this.formio.submissionsUrl + '/' + submission._id;
76347639
this.formReady.then(function () {
7635-
_this4._loading = false;
7636-
_this4.loading = true;
7637-
_this4.formio.loadSubmission().then(function (result) {
7638-
_this4.loading = false;
7639-
_this4.setValue(result, {
7640+
_this5._loading = false;
7641+
_this5.loading = true;
7642+
_this5.formio.loadSubmission().then(function (result) {
7643+
_this5.loading = false;
7644+
_this5.setValue(result, {
76407645
noload: true
76417646
});
76427647
});
@@ -11872,6 +11877,10 @@ var FormioForm = function (_FormioComponents) {
1187211877
error = { message: error };
1187311878
}
1187411879

11880+
if ('details' in error) {
11881+
error = error.details;
11882+
}
11883+
1187511884
return this.showErrors(error);
1187611885
}
1187711886

dist/formio.form.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/formio.full.js

+23-14
Original file line numberDiff line numberDiff line change
@@ -7473,9 +7473,9 @@ var FormComponent = exports.FormComponent = function (_FormioForm) {
74737473
}
74747474
}, {
74757475
key: 'checkValidity',
7476-
value: function checkValidity() {
7476+
value: function checkValidity(data, dirty) {
74777477
// Maintain isolated data scope when passing root data for validity checks.
7478-
return _get(FormComponent.prototype.__proto__ || Object.getPrototypeOf(FormComponent.prototype), 'checkValidity', this).call(this, this.subData);
7478+
return _get(FormComponent.prototype.__proto__ || Object.getPrototypeOf(FormComponent.prototype), 'checkValidity', this).call(this, this.subData, dirty);
74797479
}
74807480
}, {
74817481
key: 'checkConditions',
@@ -7503,10 +7503,15 @@ var FormComponent = exports.FormComponent = function (_FormioForm) {
75037503
}, {
75047504
key: 'beforeNext',
75057505
value: function beforeNext() {
7506+
var _this2 = this;
7507+
75067508
// If we wish to submit the form on next page, then do that here.
75077509
if (this.component.submit) {
75087510
this.submitted = true;
7509-
return this.submit(true);
7511+
return this.submit(true).then(function (submission) {
7512+
// Set data to submission.
7513+
return _this2.data[_this2.component.key] = submission;
7514+
});
75107515
} else {
75117516
return _get(FormComponent.prototype.__proto__ || Object.getPrototypeOf(FormComponent.prototype), 'beforeNext', this).call(this);
75127517
}
@@ -7519,17 +7524,17 @@ var FormComponent = exports.FormComponent = function (_FormioForm) {
75197524
}, {
75207525
key: 'beforeSubmit',
75217526
value: function beforeSubmit() {
7522-
var _this2 = this;
7527+
var _this3 = this;
75237528

75247529
// Ensure we submit the form.
75257530
if (this.component.submit && !this.submitted) {
75267531
return this.submit(true).then(function (submission) {
75277532
// Before we submit, we need to filter out the references.
7528-
_this2.data[_this2.component.key] = _this2.component.reference ? {
7533+
_this3.data[_this3.component.key] = _this3.component.reference ? {
75297534
_id: submission._id,
75307535
form: submission.form
75317536
} : submission;
7532-
return _this2.data[_this2.component.key];
7537+
return _this3.data[_this3.component.key];
75337538
});
75347539
} else {
75357540
return _get(FormComponent.prototype.__proto__ || Object.getPrototypeOf(FormComponent.prototype), 'beforeSubmit', this).call(this);
@@ -7578,10 +7583,10 @@ var FormComponent = exports.FormComponent = function (_FormioForm) {
75787583
}, {
75797584
key: 'whenReady',
75807585
value: function whenReady() {
7581-
var _this3 = this;
7586+
var _this4 = this;
75827587

75837588
return this.ready.then(function () {
7584-
return _this3.readyPromise;
7589+
return _this4.readyPromise;
75857590
});
75867591
}
75877592
}, {
@@ -7607,7 +7612,7 @@ var FormComponent = exports.FormComponent = function (_FormioForm) {
76077612
}, {
76087613
key: 'setValue',
76097614
value: function setValue(submission, flags) {
7610-
var _this4 = this;
7615+
var _this5 = this;
76117616

76127617
flags = this.getFlags.apply(this, arguments);
76137618
if (!submission) {
@@ -7632,11 +7637,11 @@ var FormComponent = exports.FormComponent = function (_FormioForm) {
76327637
this.formio.submissionId = submission._id;
76337638
this.formio.submissionUrl = this.formio.submissionsUrl + '/' + submission._id;
76347639
this.formReady.then(function () {
7635-
_this4._loading = false;
7636-
_this4.loading = true;
7637-
_this4.formio.loadSubmission().then(function (result) {
7638-
_this4.loading = false;
7639-
_this4.setValue(result, {
7640+
_this5._loading = false;
7641+
_this5.loading = true;
7642+
_this5.formio.loadSubmission().then(function (result) {
7643+
_this5.loading = false;
7644+
_this5.setValue(result, {
76407645
noload: true
76417646
});
76427647
});
@@ -11964,6 +11969,10 @@ var FormioForm = function (_FormioComponents) {
1196411969
error = { message: error };
1196511970
}
1196611971

11972+
if ('details' in error) {
11973+
error = error.details;
11974+
}
11975+
1196711976
return this.showErrors(error);
1196811977
}
1196911978

dist/formio.full.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)