@formio/js 5.0.0-dev.5811.fd4868a → 5.0.0-dev.5813.012c686
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/formio.form.js +1 -1
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.full.js +1 -1
- package/dist/formio.full.min.js +1 -1
- package/lib/cjs/components/_classes/component/Component.js +1 -1
- package/lib/cjs/components/editgrid/fixtures/comp18.d.ts +38 -0
- package/lib/cjs/components/editgrid/fixtures/comp18.js +74 -0
- package/lib/cjs/components/editgrid/fixtures/index.d.ts +2 -1
- package/lib/cjs/components/editgrid/fixtures/index.js +3 -1
- package/lib/mjs/components/_classes/component/Component.js +1 -1
- package/lib/mjs/components/editgrid/fixtures/comp18.d.ts +38 -0
- package/lib/mjs/components/editgrid/fixtures/comp18.js +72 -0
- package/lib/mjs/components/editgrid/fixtures/index.d.ts +2 -1
- package/lib/mjs/components/editgrid/fixtures/index.js +2 -1
- package/package.json +1 -1
|
@@ -2206,7 +2206,7 @@ class Component extends Element_1.default {
|
|
|
2206
2206
|
this.addClass(this.getElement(), 'formio-modified');
|
|
2207
2207
|
}
|
|
2208
2208
|
// If we are supposed to validate on blur, then don't trigger validation yet.
|
|
2209
|
-
if (this.component.validateOn === 'blur') {
|
|
2209
|
+
if (this.component.validateOn === 'blur' || this.component.validateOn === 'submit') {
|
|
2210
2210
|
flags.noValidate = true;
|
|
2211
2211
|
}
|
|
2212
2212
|
if (this.component.onChange) {
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
let title: string;
|
|
3
|
+
let name: string;
|
|
4
|
+
let path: string;
|
|
5
|
+
let type: string;
|
|
6
|
+
let display: string;
|
|
7
|
+
let components: {
|
|
8
|
+
label: string;
|
|
9
|
+
tableView: boolean;
|
|
10
|
+
validateWhenHidden: boolean;
|
|
11
|
+
rowDrafts: boolean;
|
|
12
|
+
key: string;
|
|
13
|
+
validateOn: string;
|
|
14
|
+
type: string;
|
|
15
|
+
displayAsTable: boolean;
|
|
16
|
+
input: boolean;
|
|
17
|
+
components: {
|
|
18
|
+
label: string;
|
|
19
|
+
widget: string;
|
|
20
|
+
tableView: boolean;
|
|
21
|
+
data: {
|
|
22
|
+
values: {
|
|
23
|
+
label: string;
|
|
24
|
+
value: string;
|
|
25
|
+
}[];
|
|
26
|
+
};
|
|
27
|
+
validate: {
|
|
28
|
+
required: boolean;
|
|
29
|
+
};
|
|
30
|
+
validateWhenHidden: boolean;
|
|
31
|
+
validateOn: string;
|
|
32
|
+
key: string;
|
|
33
|
+
type: string;
|
|
34
|
+
input: boolean;
|
|
35
|
+
}[];
|
|
36
|
+
}[];
|
|
37
|
+
}
|
|
38
|
+
export default _default;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = {
|
|
4
|
+
title: "validate_submit",
|
|
5
|
+
name: "validate_submit",
|
|
6
|
+
path: "validate_submit",
|
|
7
|
+
type: "form",
|
|
8
|
+
display: "form",
|
|
9
|
+
components: [
|
|
10
|
+
{
|
|
11
|
+
label: "Edit Grid",
|
|
12
|
+
tableView: false,
|
|
13
|
+
validateWhenHidden: false,
|
|
14
|
+
rowDrafts: false,
|
|
15
|
+
key: "editGrid",
|
|
16
|
+
validateOn: 'submit',
|
|
17
|
+
type: "editgrid",
|
|
18
|
+
displayAsTable: false,
|
|
19
|
+
input: true,
|
|
20
|
+
components: [
|
|
21
|
+
{
|
|
22
|
+
label: "Select",
|
|
23
|
+
widget: "choicesjs",
|
|
24
|
+
tableView: true,
|
|
25
|
+
data: {
|
|
26
|
+
values: [
|
|
27
|
+
{
|
|
28
|
+
label: "one",
|
|
29
|
+
value: "one",
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
label: "two",
|
|
33
|
+
value: "two",
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
},
|
|
37
|
+
validate: {
|
|
38
|
+
required: true,
|
|
39
|
+
},
|
|
40
|
+
validateWhenHidden: false,
|
|
41
|
+
validateOn: 'submit',
|
|
42
|
+
key: "select1",
|
|
43
|
+
type: "select",
|
|
44
|
+
input: true,
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
label: "Select",
|
|
48
|
+
widget: "choicesjs",
|
|
49
|
+
tableView: true,
|
|
50
|
+
data: {
|
|
51
|
+
values: [
|
|
52
|
+
{
|
|
53
|
+
label: "three",
|
|
54
|
+
value: "three",
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
label: "four",
|
|
58
|
+
value: "four",
|
|
59
|
+
},
|
|
60
|
+
],
|
|
61
|
+
},
|
|
62
|
+
validate: {
|
|
63
|
+
required: true,
|
|
64
|
+
},
|
|
65
|
+
validateWhenHidden: false,
|
|
66
|
+
validateOn: 'submit',
|
|
67
|
+
key: "select2",
|
|
68
|
+
type: "select",
|
|
69
|
+
input: true,
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
};
|
|
@@ -15,8 +15,9 @@ import comp14 from './comp14';
|
|
|
15
15
|
import comp15 from './comp15';
|
|
16
16
|
import comp16 from './comp16';
|
|
17
17
|
import comp17 from './comp17';
|
|
18
|
+
import comp18 from './comp18';
|
|
18
19
|
import compOpenWhenEmpty from './comp-openWhenEmpty';
|
|
19
20
|
import withOpenWhenEmptyAndConditions from './comp-with-conditions-and-openWhenEmpty';
|
|
20
21
|
import compWithCustomDefaultValue from './comp-with-custom-default-value';
|
|
21
22
|
import compTestEvents from './comp-test-events';
|
|
22
|
-
export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, comp9, comp10, comp11, comp12, comp13, comp14, comp15, comp16, comp17, compOpenWhenEmpty, withOpenWhenEmptyAndConditions, compWithCustomDefaultValue, compTestEvents };
|
|
23
|
+
export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, comp9, comp10, comp11, comp12, comp13, comp14, comp15, comp16, comp17, comp18, compOpenWhenEmpty, withOpenWhenEmptyAndConditions, compWithCustomDefaultValue, compTestEvents };
|
|
@@ -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
|
-
exports.compTestEvents = exports.compWithCustomDefaultValue = exports.withOpenWhenEmptyAndConditions = exports.compOpenWhenEmpty = exports.comp17 = exports.comp16 = exports.comp15 = exports.comp14 = exports.comp13 = exports.comp12 = exports.comp11 = exports.comp10 = exports.comp9 = exports.comp8 = exports.comp7 = exports.comp6 = exports.comp5 = exports.comp4 = exports.comp3 = exports.comp2 = exports.comp1 = void 0;
|
|
6
|
+
exports.compTestEvents = exports.compWithCustomDefaultValue = exports.withOpenWhenEmptyAndConditions = exports.compOpenWhenEmpty = exports.comp18 = exports.comp17 = exports.comp16 = exports.comp15 = exports.comp14 = exports.comp13 = exports.comp12 = exports.comp11 = exports.comp10 = exports.comp9 = exports.comp8 = exports.comp7 = exports.comp6 = exports.comp5 = exports.comp4 = exports.comp3 = exports.comp2 = exports.comp1 = void 0;
|
|
7
7
|
const comp1_1 = __importDefault(require("./comp1"));
|
|
8
8
|
exports.comp1 = comp1_1.default;
|
|
9
9
|
const comp2_1 = __importDefault(require("./comp2"));
|
|
@@ -38,6 +38,8 @@ const comp16_1 = __importDefault(require("./comp16"));
|
|
|
38
38
|
exports.comp16 = comp16_1.default;
|
|
39
39
|
const comp17_1 = __importDefault(require("./comp17"));
|
|
40
40
|
exports.comp17 = comp17_1.default;
|
|
41
|
+
const comp18_1 = __importDefault(require("./comp18"));
|
|
42
|
+
exports.comp18 = comp18_1.default;
|
|
41
43
|
const comp_with_conditions_and_openWhenEmpty_1 = __importDefault(require("./comp-with-conditions-and-openWhenEmpty"));
|
|
42
44
|
exports.withOpenWhenEmptyAndConditions = comp_with_conditions_and_openWhenEmpty_1.default;
|
|
43
45
|
const comp_openWhenEmpty_1 = __importDefault(require("./comp-openWhenEmpty"));
|
|
@@ -2169,7 +2169,7 @@ export default class Component extends Element {
|
|
|
2169
2169
|
this.addClass(this.getElement(), 'formio-modified');
|
|
2170
2170
|
}
|
|
2171
2171
|
// If we are supposed to validate on blur, then don't trigger validation yet.
|
|
2172
|
-
if (this.component.validateOn === 'blur') {
|
|
2172
|
+
if (this.component.validateOn === 'blur' || this.component.validateOn === 'submit') {
|
|
2173
2173
|
flags.noValidate = true;
|
|
2174
2174
|
}
|
|
2175
2175
|
if (this.component.onChange) {
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
let title: string;
|
|
3
|
+
let name: string;
|
|
4
|
+
let path: string;
|
|
5
|
+
let type: string;
|
|
6
|
+
let display: string;
|
|
7
|
+
let components: {
|
|
8
|
+
label: string;
|
|
9
|
+
tableView: boolean;
|
|
10
|
+
validateWhenHidden: boolean;
|
|
11
|
+
rowDrafts: boolean;
|
|
12
|
+
key: string;
|
|
13
|
+
validateOn: string;
|
|
14
|
+
type: string;
|
|
15
|
+
displayAsTable: boolean;
|
|
16
|
+
input: boolean;
|
|
17
|
+
components: {
|
|
18
|
+
label: string;
|
|
19
|
+
widget: string;
|
|
20
|
+
tableView: boolean;
|
|
21
|
+
data: {
|
|
22
|
+
values: {
|
|
23
|
+
label: string;
|
|
24
|
+
value: string;
|
|
25
|
+
}[];
|
|
26
|
+
};
|
|
27
|
+
validate: {
|
|
28
|
+
required: boolean;
|
|
29
|
+
};
|
|
30
|
+
validateWhenHidden: boolean;
|
|
31
|
+
validateOn: string;
|
|
32
|
+
key: string;
|
|
33
|
+
type: string;
|
|
34
|
+
input: boolean;
|
|
35
|
+
}[];
|
|
36
|
+
}[];
|
|
37
|
+
}
|
|
38
|
+
export default _default;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
title: "validate_submit",
|
|
3
|
+
name: "validate_submit",
|
|
4
|
+
path: "validate_submit",
|
|
5
|
+
type: "form",
|
|
6
|
+
display: "form",
|
|
7
|
+
components: [
|
|
8
|
+
{
|
|
9
|
+
label: "Edit Grid",
|
|
10
|
+
tableView: false,
|
|
11
|
+
validateWhenHidden: false,
|
|
12
|
+
rowDrafts: false,
|
|
13
|
+
key: "editGrid",
|
|
14
|
+
validateOn: 'submit',
|
|
15
|
+
type: "editgrid",
|
|
16
|
+
displayAsTable: false,
|
|
17
|
+
input: true,
|
|
18
|
+
components: [
|
|
19
|
+
{
|
|
20
|
+
label: "Select",
|
|
21
|
+
widget: "choicesjs",
|
|
22
|
+
tableView: true,
|
|
23
|
+
data: {
|
|
24
|
+
values: [
|
|
25
|
+
{
|
|
26
|
+
label: "one",
|
|
27
|
+
value: "one",
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
label: "two",
|
|
31
|
+
value: "two",
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
validate: {
|
|
36
|
+
required: true,
|
|
37
|
+
},
|
|
38
|
+
validateWhenHidden: false,
|
|
39
|
+
validateOn: 'submit',
|
|
40
|
+
key: "select1",
|
|
41
|
+
type: "select",
|
|
42
|
+
input: true,
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
label: "Select",
|
|
46
|
+
widget: "choicesjs",
|
|
47
|
+
tableView: true,
|
|
48
|
+
data: {
|
|
49
|
+
values: [
|
|
50
|
+
{
|
|
51
|
+
label: "three",
|
|
52
|
+
value: "three",
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
label: "four",
|
|
56
|
+
value: "four",
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
},
|
|
60
|
+
validate: {
|
|
61
|
+
required: true,
|
|
62
|
+
},
|
|
63
|
+
validateWhenHidden: false,
|
|
64
|
+
validateOn: 'submit',
|
|
65
|
+
key: "select2",
|
|
66
|
+
type: "select",
|
|
67
|
+
input: true,
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
};
|
|
@@ -15,8 +15,9 @@ import comp14 from './comp14';
|
|
|
15
15
|
import comp15 from './comp15';
|
|
16
16
|
import comp16 from './comp16';
|
|
17
17
|
import comp17 from './comp17';
|
|
18
|
+
import comp18 from './comp18';
|
|
18
19
|
import compOpenWhenEmpty from './comp-openWhenEmpty';
|
|
19
20
|
import withOpenWhenEmptyAndConditions from './comp-with-conditions-and-openWhenEmpty';
|
|
20
21
|
import compWithCustomDefaultValue from './comp-with-custom-default-value';
|
|
21
22
|
import compTestEvents from './comp-test-events';
|
|
22
|
-
export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, comp9, comp10, comp11, comp12, comp13, comp14, comp15, comp16, comp17, compOpenWhenEmpty, withOpenWhenEmptyAndConditions, compWithCustomDefaultValue, compTestEvents };
|
|
23
|
+
export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, comp9, comp10, comp11, comp12, comp13, comp14, comp15, comp16, comp17, comp18, compOpenWhenEmpty, withOpenWhenEmptyAndConditions, compWithCustomDefaultValue, compTestEvents };
|
|
@@ -15,8 +15,9 @@ import comp14 from './comp14';
|
|
|
15
15
|
import comp15 from './comp15';
|
|
16
16
|
import comp16 from './comp16';
|
|
17
17
|
import comp17 from './comp17';
|
|
18
|
+
import comp18 from './comp18';
|
|
18
19
|
import withOpenWhenEmptyAndConditions from './comp-with-conditions-and-openWhenEmpty';
|
|
19
20
|
import compOpenWhenEmpty from './comp-openWhenEmpty';
|
|
20
21
|
import compWithCustomDefaultValue from './comp-with-custom-default-value';
|
|
21
22
|
import compTestEvents from './comp-test-events';
|
|
22
|
-
export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, comp9, comp10, comp11, comp12, comp13, comp14, comp15, comp16, comp17, compOpenWhenEmpty, withOpenWhenEmptyAndConditions, compWithCustomDefaultValue, compTestEvents };
|
|
23
|
+
export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, comp9, comp10, comp11, comp12, comp13, comp14, comp15, comp16, comp17, comp18, compOpenWhenEmpty, withOpenWhenEmptyAndConditions, compWithCustomDefaultValue, compTestEvents };
|