@formio/js 5.0.0-rc.73 → 5.0.0-rc.75
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/formio.embed.js +1 -1
- package/dist/formio.embed.min.js +1 -1
- package/dist/formio.embed.min.js.LICENSE.txt +1 -1
- package/dist/formio.form.js +9 -9
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.form.min.js.LICENSE.txt +1 -1
- package/dist/formio.full.js +10 -10
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.full.min.js.LICENSE.txt +1 -1
- package/dist/formio.js +4 -4
- package/dist/formio.min.js +1 -1
- package/dist/formio.min.js.LICENSE.txt +1 -1
- package/dist/formio.utils.js +2 -2
- package/dist/formio.utils.min.js +1 -1
- package/dist/formio.utils.min.js.LICENSE.txt +1 -1
- package/lib/cjs/CDN.js +1 -2
- package/lib/cjs/Form.js +2 -2
- package/lib/cjs/Wizard.js +1 -1
- package/lib/cjs/components/day/Day.d.ts +2 -2
- package/lib/cjs/components/day/Day.js +3 -3
- package/lib/cjs/components/form/fixtures/index.d.ts +2 -1
- package/lib/cjs/components/form/fixtures/index.js +3 -1
- package/lib/cjs/components/form/fixtures/nestedWizardForm.d.ts +771 -0
- package/lib/cjs/components/form/fixtures/nestedWizardForm.js +765 -0
- package/lib/cjs/components/time/Time.form.js +2 -2
- package/lib/cjs/translations/en.d.ts +1 -0
- package/lib/cjs/translations/en.js +1 -0
- package/lib/mjs/CDN.js +1 -2
- package/lib/mjs/Form.js +2 -2
- package/lib/mjs/Wizard.js +1 -1
- package/lib/mjs/components/day/Day.d.ts +2 -2
- package/lib/mjs/components/day/Day.js +3 -3
- package/lib/mjs/components/form/fixtures/index.d.ts +2 -1
- package/lib/mjs/components/form/fixtures/index.js +2 -1
- package/lib/mjs/components/form/fixtures/nestedWizardForm.d.ts +771 -0
- package/lib/mjs/components/form/fixtures/nestedWizardForm.js +763 -0
- package/lib/mjs/components/time/Time.form.js +2 -2
- package/lib/mjs/translations/en.d.ts +1 -0
- package/lib/mjs/translations/en.js +1 -0
- package/package.json +2 -2
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
const
|
6
|
+
const Components_1 = __importDefault(require("../Components"));
|
7
7
|
const Time_edit_data_1 = __importDefault(require("./editForm/Time.edit.data"));
|
8
8
|
const Time_edit_display_1 = __importDefault(require("./editForm/Time.edit.display"));
|
9
9
|
/**
|
@@ -12,7 +12,7 @@ const Time_edit_display_1 = __importDefault(require("./editForm/Time.edit.displa
|
|
12
12
|
* @returns {import('@formio/core').Component[]} - The edit form components.
|
13
13
|
*/
|
14
14
|
function default_1(...extend) {
|
15
|
-
return
|
15
|
+
return Components_1.default.baseEditForm([
|
16
16
|
{
|
17
17
|
key: 'data',
|
18
18
|
components: Time_edit_data_1.default,
|
@@ -77,6 +77,7 @@ exports.default = {
|
|
77
77
|
typeRemaining: '{{ remaining }} {{ type }} remaining.',
|
78
78
|
typeCount: '{{ count }} {{ type }}',
|
79
79
|
requiredDayField: '{{ field }} is required',
|
80
|
+
requiredDayEmpty: '{{ field }} is required',
|
80
81
|
requiredMonthField: '{{ field }} is required',
|
81
82
|
requiredYearField: '{{ field }} is required'
|
82
83
|
};
|
package/lib/mjs/CDN.js
CHANGED
@@ -62,8 +62,7 @@ class CDN {
|
|
62
62
|
url += `/${lib}`;
|
63
63
|
}
|
64
64
|
// Only attach the version if this is the hosted cdn.
|
65
|
-
if (cdnUrl.
|
66
|
-
version && version !== 'latest') {
|
65
|
+
if (cdnUrl.match(/cdn\.(test-)?form.io/) && version && version !== 'latest') {
|
67
66
|
url += `/${version}`;
|
68
67
|
}
|
69
68
|
return url;
|
package/lib/mjs/Form.js
CHANGED
@@ -134,13 +134,13 @@ export default class Form extends Element {
|
|
134
134
|
else {
|
135
135
|
this.element = null;
|
136
136
|
}
|
137
|
+
this.options = formOptions;
|
138
|
+
this.options.events = this.events;
|
137
139
|
if (form) {
|
138
140
|
this.setForm(form)
|
139
141
|
.then(() => this.readyResolve(this.instance))
|
140
142
|
.catch(this.readyReject);
|
141
143
|
}
|
142
|
-
this.options = formOptions;
|
143
|
-
this.options.events = this.events;
|
144
144
|
this.display = '';
|
145
145
|
}
|
146
146
|
createElement(tag, attrs, children) {
|
package/lib/mjs/Wizard.js
CHANGED
@@ -13,7 +13,7 @@ export default class Wizard extends Webform {
|
|
13
13
|
*/
|
14
14
|
constructor(elementOrOptions = undefined, _options = undefined) {
|
15
15
|
let element, options;
|
16
|
-
if (elementOrOptions instanceof HTMLElement ||
|
16
|
+
if (elementOrOptions instanceof HTMLElement || _options) {
|
17
17
|
element = elementOrOptions;
|
18
18
|
options = _options || {};
|
19
19
|
}
|
@@ -17,9 +17,9 @@ export default class DayComponent extends Field {
|
|
17
17
|
constructor(component: any, options: any, data: any);
|
18
18
|
/**
|
19
19
|
* The empty value for day component.
|
20
|
-
* @returns {'
|
20
|
+
* @returns {''} - The empty value of the day component.
|
21
21
|
*/
|
22
|
-
get emptyValue(): "
|
22
|
+
get emptyValue(): "";
|
23
23
|
get valueMask(): RegExp;
|
24
24
|
get dayRequired(): any;
|
25
25
|
get showDay(): boolean;
|
@@ -62,10 +62,10 @@ export default class DayComponent extends Field {
|
|
62
62
|
}
|
63
63
|
/**
|
64
64
|
* The empty value for day component.
|
65
|
-
* @returns {'
|
65
|
+
* @returns {''} - The empty value of the day component.
|
66
66
|
*/
|
67
67
|
get emptyValue() {
|
68
|
-
return '
|
68
|
+
return '';
|
69
69
|
}
|
70
70
|
get valueMask() {
|
71
71
|
return /^\d{2}\/\d{2}\/\d{4}$/;
|
@@ -361,7 +361,7 @@ export default class DayComponent extends Field {
|
|
361
361
|
setValueAt(index, value) {
|
362
362
|
// temporary solution to avoid input reset
|
363
363
|
// on invalid date.
|
364
|
-
if (
|
364
|
+
if (value === 'Invalid date') {
|
365
365
|
return null;
|
366
366
|
}
|
367
367
|
const parts = value.split('/');
|
@@ -7,4 +7,5 @@ import comp5 from './comp5';
|
|
7
7
|
import comp6 from './comp6';
|
8
8
|
import comp7 from './comp7';
|
9
9
|
import comp8 from './comp8';
|
10
|
-
|
10
|
+
import nestedWizardForm from './nestedWizardForm';
|
11
|
+
export { formModalEdit, comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, nestedWizardForm };
|
@@ -7,4 +7,5 @@ import comp5 from './comp5';
|
|
7
7
|
import comp6 from './comp6';
|
8
8
|
import comp7 from './comp7';
|
9
9
|
import comp8 from './comp8';
|
10
|
-
|
10
|
+
import nestedWizardForm from './nestedWizardForm';
|
11
|
+
export { formModalEdit, comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, nestedWizardForm };
|