@formio/js 5.0.0-dev.5594.b3f7e58 → 5.0.0-dev.5595.8e56e8f
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 +2 -2
- package/dist/formio.full.min.js +1 -1
- package/lib/cjs/components/checkbox/Checkbox.js +9 -2
- package/lib/cjs/components/checkbox/fixtures/index.d.ts +1 -2
- package/lib/cjs/components/checkbox/fixtures/index.js +1 -3
- package/lib/cjs/components/recaptcha/editForm/ReCaptcha.edit.display.d.ts +5 -0
- package/lib/cjs/components/recaptcha/editForm/ReCaptcha.edit.display.js +3 -0
- package/lib/mjs/components/checkbox/Checkbox.js +9 -2
- package/lib/mjs/components/checkbox/fixtures/index.d.ts +1 -2
- package/lib/mjs/components/checkbox/fixtures/index.js +1 -2
- package/lib/mjs/components/recaptcha/editForm/ReCaptcha.edit.display.d.ts +5 -0
- package/lib/mjs/components/recaptcha/editForm/ReCaptcha.edit.display.js +3 -0
- package/package.json +1 -1
- package/lib/cjs/components/checkbox/fixtures/comp5.d.ts +0 -34
- package/lib/cjs/components/checkbox/fixtures/comp5.js +0 -55
- package/lib/mjs/components/checkbox/fixtures/comp5.d.ts +0 -34
- package/lib/mjs/components/checkbox/fixtures/comp5.js +0 -53
|
@@ -179,8 +179,15 @@ class CheckBoxComponent extends Field_1.default {
|
|
|
179
179
|
return value;
|
|
180
180
|
}
|
|
181
181
|
setValue(value, flags = {}) {
|
|
182
|
-
this.setCheckedState(value)
|
|
183
|
-
|
|
182
|
+
if (this.setCheckedState(value) !== undefined ||
|
|
183
|
+
(!this.input && value !== undefined && (this.visible || this.conditionallyVisible() || !this.component.clearOnHide))) {
|
|
184
|
+
const changed = this.updateValue(value, flags);
|
|
185
|
+
if (this.isHtmlRenderMode() && flags && flags.fromSubmission && changed) {
|
|
186
|
+
this.redraw();
|
|
187
|
+
}
|
|
188
|
+
return changed;
|
|
189
|
+
}
|
|
190
|
+
return false;
|
|
184
191
|
}
|
|
185
192
|
getValueAsString(value) {
|
|
186
193
|
const { name: componentName, value: componentValue } = this.component;
|
|
@@ -2,6 +2,5 @@ import comp1 from './comp1';
|
|
|
2
2
|
import comp2 from './comp2';
|
|
3
3
|
import comp3 from './comp3';
|
|
4
4
|
import comp4 from './comp4';
|
|
5
|
-
import comp5 from './comp5';
|
|
6
5
|
import customDefaultComponent from './customDefaultComponent';
|
|
7
|
-
export { comp1, comp2, comp3, comp4,
|
|
6
|
+
export { comp1, comp2, comp3, comp4, customDefaultComponent };
|
|
@@ -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.customDefaultComponent = exports.
|
|
6
|
+
exports.customDefaultComponent = 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 customDefaultComponent_1 = __importDefault(require("./customDefaultComponent"));
|
|
@@ -14,5 +14,3 @@ const comp3_1 = __importDefault(require("./comp3"));
|
|
|
14
14
|
exports.comp3 = comp3_1.default;
|
|
15
15
|
const comp4_1 = __importDefault(require("./comp4"));
|
|
16
16
|
exports.comp4 = comp4_1.default;
|
|
17
|
-
const comp5_1 = __importDefault(require("./comp5"));
|
|
18
|
-
exports.comp5 = comp5_1.default;
|
|
@@ -7,6 +7,9 @@ declare const _default: ({
|
|
|
7
7
|
label: string;
|
|
8
8
|
value: string;
|
|
9
9
|
}[];
|
|
10
|
+
validate: {
|
|
11
|
+
required: boolean;
|
|
12
|
+
};
|
|
10
13
|
weight: number;
|
|
11
14
|
input?: undefined;
|
|
12
15
|
dataSrc?: undefined;
|
|
@@ -28,6 +31,7 @@ declare const _default: ({
|
|
|
28
31
|
custom(context: any): any[];
|
|
29
32
|
};
|
|
30
33
|
values?: undefined;
|
|
34
|
+
validate?: undefined;
|
|
31
35
|
ignore?: undefined;
|
|
32
36
|
} | {
|
|
33
37
|
key: string;
|
|
@@ -36,6 +40,7 @@ declare const _default: ({
|
|
|
36
40
|
tooltip?: undefined;
|
|
37
41
|
type?: undefined;
|
|
38
42
|
values?: undefined;
|
|
43
|
+
validate?: undefined;
|
|
39
44
|
weight?: undefined;
|
|
40
45
|
input?: undefined;
|
|
41
46
|
dataSrc?: undefined;
|
|
@@ -178,8 +178,15 @@ export default class CheckBoxComponent extends Field {
|
|
|
178
178
|
return value;
|
|
179
179
|
}
|
|
180
180
|
setValue(value, flags = {}) {
|
|
181
|
-
this.setCheckedState(value)
|
|
182
|
-
|
|
181
|
+
if (this.setCheckedState(value) !== undefined ||
|
|
182
|
+
(!this.input && value !== undefined && (this.visible || this.conditionallyVisible() || !this.component.clearOnHide))) {
|
|
183
|
+
const changed = this.updateValue(value, flags);
|
|
184
|
+
if (this.isHtmlRenderMode() && flags && flags.fromSubmission && changed) {
|
|
185
|
+
this.redraw();
|
|
186
|
+
}
|
|
187
|
+
return changed;
|
|
188
|
+
}
|
|
189
|
+
return false;
|
|
183
190
|
}
|
|
184
191
|
getValueAsString(value) {
|
|
185
192
|
const { name: componentName, value: componentValue } = this.component;
|
|
@@ -2,6 +2,5 @@ import comp1 from './comp1';
|
|
|
2
2
|
import comp2 from './comp2';
|
|
3
3
|
import comp3 from './comp3';
|
|
4
4
|
import comp4 from './comp4';
|
|
5
|
-
import comp5 from './comp5';
|
|
6
5
|
import customDefaultComponent from './customDefaultComponent';
|
|
7
|
-
export { comp1, comp2, comp3, comp4,
|
|
6
|
+
export { comp1, comp2, comp3, comp4, customDefaultComponent };
|
|
@@ -3,5 +3,4 @@ import customDefaultComponent from './customDefaultComponent';
|
|
|
3
3
|
import comp2 from './comp2';
|
|
4
4
|
import comp3 from './comp3';
|
|
5
5
|
import comp4 from './comp4';
|
|
6
|
-
|
|
7
|
-
export { comp1, comp2, comp3, comp4, comp5, customDefaultComponent };
|
|
6
|
+
export { comp1, comp2, comp3, comp4, customDefaultComponent };
|
|
@@ -7,6 +7,9 @@ declare const _default: ({
|
|
|
7
7
|
label: string;
|
|
8
8
|
value: string;
|
|
9
9
|
}[];
|
|
10
|
+
validate: {
|
|
11
|
+
required: boolean;
|
|
12
|
+
};
|
|
10
13
|
weight: number;
|
|
11
14
|
input?: undefined;
|
|
12
15
|
dataSrc?: undefined;
|
|
@@ -28,6 +31,7 @@ declare const _default: ({
|
|
|
28
31
|
custom(context: any): any[];
|
|
29
32
|
};
|
|
30
33
|
values?: undefined;
|
|
34
|
+
validate?: undefined;
|
|
31
35
|
ignore?: undefined;
|
|
32
36
|
} | {
|
|
33
37
|
key: string;
|
|
@@ -36,6 +40,7 @@ declare const _default: ({
|
|
|
36
40
|
tooltip?: undefined;
|
|
37
41
|
type?: undefined;
|
|
38
42
|
values?: undefined;
|
|
43
|
+
validate?: undefined;
|
|
39
44
|
weight?: undefined;
|
|
40
45
|
input?: undefined;
|
|
41
46
|
dataSrc?: undefined;
|
package/package.json
CHANGED
|
@@ -1,34 +0,0 @@
|
|
|
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
|
-
key: string;
|
|
12
|
-
conditional: {
|
|
13
|
-
show: boolean;
|
|
14
|
-
conjunction: string;
|
|
15
|
-
conditions: {
|
|
16
|
-
component: string;
|
|
17
|
-
operator: string;
|
|
18
|
-
}[];
|
|
19
|
-
};
|
|
20
|
-
type: string;
|
|
21
|
-
input: boolean;
|
|
22
|
-
applyMaskOn?: undefined;
|
|
23
|
-
} | {
|
|
24
|
-
label: string;
|
|
25
|
-
applyMaskOn: string;
|
|
26
|
-
tableView: boolean;
|
|
27
|
-
key: string;
|
|
28
|
-
type: string;
|
|
29
|
-
input: boolean;
|
|
30
|
-
validateWhenHidden?: undefined;
|
|
31
|
-
conditional?: undefined;
|
|
32
|
-
})[];
|
|
33
|
-
}
|
|
34
|
-
export default _default;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = {
|
|
4
|
-
title: '7595',
|
|
5
|
-
name: '7595',
|
|
6
|
-
path: '7595',
|
|
7
|
-
type: 'form',
|
|
8
|
-
display: 'form',
|
|
9
|
-
components: [
|
|
10
|
-
{
|
|
11
|
-
label: 'Checkbox',
|
|
12
|
-
tableView: false,
|
|
13
|
-
validateWhenHidden: false,
|
|
14
|
-
key: 'checkboxBefore',
|
|
15
|
-
conditional: {
|
|
16
|
-
show: true,
|
|
17
|
-
conjunction: 'all',
|
|
18
|
-
conditions: [
|
|
19
|
-
{
|
|
20
|
-
component: 'textField',
|
|
21
|
-
operator: 'isNotEmpty'
|
|
22
|
-
}
|
|
23
|
-
]
|
|
24
|
-
},
|
|
25
|
-
type: 'checkbox',
|
|
26
|
-
input: true
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
label: 'Text Field',
|
|
30
|
-
applyMaskOn: 'change',
|
|
31
|
-
tableView: true,
|
|
32
|
-
key: 'textField',
|
|
33
|
-
type: 'textfield',
|
|
34
|
-
input: true
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
label: 'Checkbox',
|
|
38
|
-
tableView: false,
|
|
39
|
-
validateWhenHidden: false,
|
|
40
|
-
key: 'checkboxAfter',
|
|
41
|
-
conditional: {
|
|
42
|
-
show: true,
|
|
43
|
-
conjunction: 'all',
|
|
44
|
-
conditions: [
|
|
45
|
-
{
|
|
46
|
-
component: 'textField',
|
|
47
|
-
operator: 'isNotEmpty'
|
|
48
|
-
}
|
|
49
|
-
]
|
|
50
|
-
},
|
|
51
|
-
type: 'checkbox',
|
|
52
|
-
input: true
|
|
53
|
-
},
|
|
54
|
-
]
|
|
55
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
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
|
-
key: string;
|
|
12
|
-
conditional: {
|
|
13
|
-
show: boolean;
|
|
14
|
-
conjunction: string;
|
|
15
|
-
conditions: {
|
|
16
|
-
component: string;
|
|
17
|
-
operator: string;
|
|
18
|
-
}[];
|
|
19
|
-
};
|
|
20
|
-
type: string;
|
|
21
|
-
input: boolean;
|
|
22
|
-
applyMaskOn?: undefined;
|
|
23
|
-
} | {
|
|
24
|
-
label: string;
|
|
25
|
-
applyMaskOn: string;
|
|
26
|
-
tableView: boolean;
|
|
27
|
-
key: string;
|
|
28
|
-
type: string;
|
|
29
|
-
input: boolean;
|
|
30
|
-
validateWhenHidden?: undefined;
|
|
31
|
-
conditional?: undefined;
|
|
32
|
-
})[];
|
|
33
|
-
}
|
|
34
|
-
export default _default;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
title: '7595',
|
|
3
|
-
name: '7595',
|
|
4
|
-
path: '7595',
|
|
5
|
-
type: 'form',
|
|
6
|
-
display: 'form',
|
|
7
|
-
components: [
|
|
8
|
-
{
|
|
9
|
-
label: 'Checkbox',
|
|
10
|
-
tableView: false,
|
|
11
|
-
validateWhenHidden: false,
|
|
12
|
-
key: 'checkboxBefore',
|
|
13
|
-
conditional: {
|
|
14
|
-
show: true,
|
|
15
|
-
conjunction: 'all',
|
|
16
|
-
conditions: [
|
|
17
|
-
{
|
|
18
|
-
component: 'textField',
|
|
19
|
-
operator: 'isNotEmpty'
|
|
20
|
-
}
|
|
21
|
-
]
|
|
22
|
-
},
|
|
23
|
-
type: 'checkbox',
|
|
24
|
-
input: true
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
label: 'Text Field',
|
|
28
|
-
applyMaskOn: 'change',
|
|
29
|
-
tableView: true,
|
|
30
|
-
key: 'textField',
|
|
31
|
-
type: 'textfield',
|
|
32
|
-
input: true
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
label: 'Checkbox',
|
|
36
|
-
tableView: false,
|
|
37
|
-
validateWhenHidden: false,
|
|
38
|
-
key: 'checkboxAfter',
|
|
39
|
-
conditional: {
|
|
40
|
-
show: true,
|
|
41
|
-
conjunction: 'all',
|
|
42
|
-
conditions: [
|
|
43
|
-
{
|
|
44
|
-
component: 'textField',
|
|
45
|
-
operator: 'isNotEmpty'
|
|
46
|
-
}
|
|
47
|
-
]
|
|
48
|
-
},
|
|
49
|
-
type: 'checkbox',
|
|
50
|
-
input: true
|
|
51
|
-
},
|
|
52
|
-
]
|
|
53
|
-
};
|