@formio/js 5.0.0-dev.5643.17b8168 → 5.0.0-dev.5647.4cf82e8
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/datagrid/fixtures/index.d.ts +1 -2
- package/lib/cjs/components/datagrid/fixtures/index.js +1 -3
- package/lib/cjs/components/radio/Radio.js +2 -3
- package/lib/mjs/components/datagrid/fixtures/index.d.ts +1 -2
- package/lib/mjs/components/datagrid/fixtures/index.js +1 -2
- package/lib/mjs/components/radio/Radio.js +2 -3
- package/package.json +1 -1
- package/lib/cjs/components/datagrid/fixtures/comp-with-checkboxes.d.ts +0 -29
- package/lib/cjs/components/datagrid/fixtures/comp-with-checkboxes.js +0 -36
- package/lib/mjs/components/datagrid/fixtures/comp-with-checkboxes.d.ts +0 -29
- package/lib/mjs/components/datagrid/fixtures/comp-with-checkboxes.js +0 -34
|
@@ -14,5 +14,4 @@ import withRowGroupsAndDefValue from './comp-row-groups-with-def-value';
|
|
|
14
14
|
import modalWithRequiredFields from './comp-modal-with-required-fields';
|
|
15
15
|
import withAllowCalculateOverride from './comp-with-allow-calculate-override';
|
|
16
16
|
import twoWithAllowCalculatedOverride from './two-comp-with-allow-calculate-override';
|
|
17
|
-
|
|
18
|
-
export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, withCollapsibleRowGroups, withConditionalFieldsAndValidations, withDefValue, withLogic, withRowGroupsAndDefValue, modalWithRequiredFields, withAllowCalculateOverride, twoWithAllowCalculatedOverride, withCheckboxes };
|
|
17
|
+
export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, withCollapsibleRowGroups, withConditionalFieldsAndValidations, withDefValue, withLogic, withRowGroupsAndDefValue, modalWithRequiredFields, withAllowCalculateOverride, twoWithAllowCalculatedOverride };
|
|
@@ -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.
|
|
6
|
+
exports.twoWithAllowCalculatedOverride = exports.withAllowCalculateOverride = exports.modalWithRequiredFields = exports.withRowGroupsAndDefValue = exports.withLogic = exports.withDefValue = exports.withConditionalFieldsAndValidations = exports.withCollapsibleRowGroups = 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"));
|
|
@@ -36,5 +36,3 @@ const comp_with_allow_calculate_override_1 = __importDefault(require("./comp-wit
|
|
|
36
36
|
exports.withAllowCalculateOverride = comp_with_allow_calculate_override_1.default;
|
|
37
37
|
const two_comp_with_allow_calculate_override_1 = __importDefault(require("./two-comp-with-allow-calculate-override"));
|
|
38
38
|
exports.twoWithAllowCalculatedOverride = two_comp_with_allow_calculate_override_1.default;
|
|
39
|
-
const comp_with_checkboxes_1 = __importDefault(require("./comp-with-checkboxes"));
|
|
40
|
-
exports.withCheckboxes = comp_with_checkboxes_1.default;
|
|
@@ -200,8 +200,7 @@ class RadioComponent extends ListComponent_1.default {
|
|
|
200
200
|
if (this.viewOnly || !this.refs.input || !this.refs.input.length) {
|
|
201
201
|
return this.dataValue;
|
|
202
202
|
}
|
|
203
|
-
|
|
204
|
-
let value = this.component.inputType === 'checkbox' ? '' : this.dataValue;
|
|
203
|
+
let value = this.dataValue;
|
|
205
204
|
this.refs.input.forEach((input, index) => {
|
|
206
205
|
if (input.checked) {
|
|
207
206
|
value = (this.isSelectURL && lodash_1.default.isObject(this.loadedOptions[index].value)) ?
|
|
@@ -323,7 +322,7 @@ class RadioComponent extends ListComponent_1.default {
|
|
|
323
322
|
const value = this.dataValue;
|
|
324
323
|
this.refs.wrapper.forEach((wrapper, index) => {
|
|
325
324
|
const input = this.refs.input[index];
|
|
326
|
-
const checked = (input.type === 'checkbox') ? value[input.value]
|
|
325
|
+
const checked = (input.type === 'checkbox') ? value[input.value] : (input.value.toString() === value.toString());
|
|
327
326
|
if (checked) {
|
|
328
327
|
//add class to container when selected
|
|
329
328
|
this.addClass(wrapper, this.optionSelectedClass);
|
|
@@ -14,5 +14,4 @@ import withRowGroupsAndDefValue from './comp-row-groups-with-def-value';
|
|
|
14
14
|
import modalWithRequiredFields from './comp-modal-with-required-fields';
|
|
15
15
|
import withAllowCalculateOverride from './comp-with-allow-calculate-override';
|
|
16
16
|
import twoWithAllowCalculatedOverride from './two-comp-with-allow-calculate-override';
|
|
17
|
-
|
|
18
|
-
export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, withCollapsibleRowGroups, withConditionalFieldsAndValidations, withDefValue, withLogic, withRowGroupsAndDefValue, modalWithRequiredFields, withAllowCalculateOverride, twoWithAllowCalculatedOverride, withCheckboxes };
|
|
17
|
+
export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, withCollapsibleRowGroups, withConditionalFieldsAndValidations, withDefValue, withLogic, withRowGroupsAndDefValue, modalWithRequiredFields, withAllowCalculateOverride, twoWithAllowCalculatedOverride };
|
|
@@ -14,5 +14,4 @@ import withLogic from './comp-with-logic';
|
|
|
14
14
|
import withCollapsibleRowGroups from './comp-with-collapsible-groups';
|
|
15
15
|
import withAllowCalculateOverride from './comp-with-allow-calculate-override';
|
|
16
16
|
import twoWithAllowCalculatedOverride from './two-comp-with-allow-calculate-override';
|
|
17
|
-
|
|
18
|
-
export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, withCollapsibleRowGroups, withConditionalFieldsAndValidations, withDefValue, withLogic, withRowGroupsAndDefValue, modalWithRequiredFields, withAllowCalculateOverride, twoWithAllowCalculatedOverride, withCheckboxes };
|
|
17
|
+
export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, withCollapsibleRowGroups, withConditionalFieldsAndValidations, withDefValue, withLogic, withRowGroupsAndDefValue, modalWithRequiredFields, withAllowCalculateOverride, twoWithAllowCalculatedOverride };
|
|
@@ -200,8 +200,7 @@ export default class RadioComponent extends ListComponent {
|
|
|
200
200
|
if (this.viewOnly || !this.refs.input || !this.refs.input.length) {
|
|
201
201
|
return this.dataValue;
|
|
202
202
|
}
|
|
203
|
-
|
|
204
|
-
let value = this.component.inputType === 'checkbox' ? '' : this.dataValue;
|
|
203
|
+
let value = this.dataValue;
|
|
205
204
|
this.refs.input.forEach((input, index) => {
|
|
206
205
|
if (input.checked) {
|
|
207
206
|
value = (this.isSelectURL && _.isObject(this.loadedOptions[index].value)) ?
|
|
@@ -323,7 +322,7 @@ export default class RadioComponent extends ListComponent {
|
|
|
323
322
|
const value = this.dataValue;
|
|
324
323
|
this.refs.wrapper.forEach((wrapper, index) => {
|
|
325
324
|
const input = this.refs.input[index];
|
|
326
|
-
const checked = (input.type === 'checkbox') ? value[input.value]
|
|
325
|
+
const checked = (input.type === 'checkbox') ? value[input.value] : (input.value.toString() === value.toString());
|
|
327
326
|
if (checked) {
|
|
328
327
|
//add class to container when selected
|
|
329
328
|
this.addClass(wrapper, this.optionSelectedClass);
|
package/package.json
CHANGED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
declare namespace _default {
|
|
2
|
-
let label: string;
|
|
3
|
-
let reorder: boolean;
|
|
4
|
-
let addAnotherPosition: string;
|
|
5
|
-
let layoutFixed: boolean;
|
|
6
|
-
let enableRowGroups: boolean;
|
|
7
|
-
let initEmpty: boolean;
|
|
8
|
-
let tableView: boolean;
|
|
9
|
-
let defaultValue: {}[];
|
|
10
|
-
let key: string;
|
|
11
|
-
let type: string;
|
|
12
|
-
let input: boolean;
|
|
13
|
-
let components: {
|
|
14
|
-
label: string;
|
|
15
|
-
optionsLabelPosition: string;
|
|
16
|
-
inline: boolean;
|
|
17
|
-
tableView: boolean;
|
|
18
|
-
values: {
|
|
19
|
-
label: string;
|
|
20
|
-
value: string;
|
|
21
|
-
shortcut: string;
|
|
22
|
-
}[];
|
|
23
|
-
key: string;
|
|
24
|
-
type: string;
|
|
25
|
-
input: boolean;
|
|
26
|
-
inputType: string;
|
|
27
|
-
}[];
|
|
28
|
-
}
|
|
29
|
-
export default _default;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = {
|
|
4
|
-
'label': 'Data Grid',
|
|
5
|
-
'reorder': false,
|
|
6
|
-
'addAnotherPosition': 'bottom',
|
|
7
|
-
'layoutFixed': false,
|
|
8
|
-
'enableRowGroups': false,
|
|
9
|
-
'initEmpty': false,
|
|
10
|
-
'tableView': false,
|
|
11
|
-
'defaultValue': [
|
|
12
|
-
{}
|
|
13
|
-
],
|
|
14
|
-
'key': 'dataGrid',
|
|
15
|
-
'type': 'datagrid',
|
|
16
|
-
'input': true,
|
|
17
|
-
'components': [
|
|
18
|
-
{
|
|
19
|
-
'label': 'Radio',
|
|
20
|
-
'optionsLabelPosition': 'right',
|
|
21
|
-
'inline': false,
|
|
22
|
-
'tableView': false,
|
|
23
|
-
'values': [
|
|
24
|
-
{
|
|
25
|
-
'label': 'yes',
|
|
26
|
-
'value': 'yes',
|
|
27
|
-
'shortcut': ''
|
|
28
|
-
}
|
|
29
|
-
],
|
|
30
|
-
'key': 'radio',
|
|
31
|
-
'type': 'radio',
|
|
32
|
-
'input': true,
|
|
33
|
-
'inputType': 'checkbox'
|
|
34
|
-
}
|
|
35
|
-
]
|
|
36
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
declare namespace _default {
|
|
2
|
-
let label: string;
|
|
3
|
-
let reorder: boolean;
|
|
4
|
-
let addAnotherPosition: string;
|
|
5
|
-
let layoutFixed: boolean;
|
|
6
|
-
let enableRowGroups: boolean;
|
|
7
|
-
let initEmpty: boolean;
|
|
8
|
-
let tableView: boolean;
|
|
9
|
-
let defaultValue: {}[];
|
|
10
|
-
let key: string;
|
|
11
|
-
let type: string;
|
|
12
|
-
let input: boolean;
|
|
13
|
-
let components: {
|
|
14
|
-
label: string;
|
|
15
|
-
optionsLabelPosition: string;
|
|
16
|
-
inline: boolean;
|
|
17
|
-
tableView: boolean;
|
|
18
|
-
values: {
|
|
19
|
-
label: string;
|
|
20
|
-
value: string;
|
|
21
|
-
shortcut: string;
|
|
22
|
-
}[];
|
|
23
|
-
key: string;
|
|
24
|
-
type: string;
|
|
25
|
-
input: boolean;
|
|
26
|
-
inputType: string;
|
|
27
|
-
}[];
|
|
28
|
-
}
|
|
29
|
-
export default _default;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
'label': 'Data Grid',
|
|
3
|
-
'reorder': false,
|
|
4
|
-
'addAnotherPosition': 'bottom',
|
|
5
|
-
'layoutFixed': false,
|
|
6
|
-
'enableRowGroups': false,
|
|
7
|
-
'initEmpty': false,
|
|
8
|
-
'tableView': false,
|
|
9
|
-
'defaultValue': [
|
|
10
|
-
{}
|
|
11
|
-
],
|
|
12
|
-
'key': 'dataGrid',
|
|
13
|
-
'type': 'datagrid',
|
|
14
|
-
'input': true,
|
|
15
|
-
'components': [
|
|
16
|
-
{
|
|
17
|
-
'label': 'Radio',
|
|
18
|
-
'optionsLabelPosition': 'right',
|
|
19
|
-
'inline': false,
|
|
20
|
-
'tableView': false,
|
|
21
|
-
'values': [
|
|
22
|
-
{
|
|
23
|
-
'label': 'yes',
|
|
24
|
-
'value': 'yes',
|
|
25
|
-
'shortcut': ''
|
|
26
|
-
}
|
|
27
|
-
],
|
|
28
|
-
'key': 'radio',
|
|
29
|
-
'type': 'radio',
|
|
30
|
-
'input': true,
|
|
31
|
-
'inputType': 'checkbox'
|
|
32
|
-
}
|
|
33
|
-
]
|
|
34
|
-
};
|