@formio/js 5.1.0-dev.6104.98e707b → 5.1.0-dev.6107.3898f3a
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/radio/Radio.d.ts +0 -8
- package/lib/cjs/components/radio/Radio.js +5 -15
- package/lib/cjs/components/selectboxes/SelectBoxes.d.ts +0 -6
- package/lib/mjs/components/radio/Radio.d.ts +0 -8
- package/lib/mjs/components/radio/Radio.js +5 -15
- package/lib/mjs/components/selectboxes/SelectBoxes.d.ts +0 -6
- package/package.json +2 -2
@@ -28,7 +28,6 @@ export default class RadioComponent extends ListComponent {
|
|
28
28
|
optionsLoaded: boolean | undefined;
|
29
29
|
loadedOptions: any[] | undefined;
|
30
30
|
beforeSubmit(): Promise<any>;
|
31
|
-
convertValues(values: any): any;
|
32
31
|
render(): string;
|
33
32
|
attach(element: any): Promise<void>;
|
34
33
|
detach(element: any): void;
|
@@ -42,12 +41,5 @@ export default class RadioComponent extends ListComponent {
|
|
42
41
|
setSelectedClasses(): void;
|
43
42
|
updateValue(value: any, flags: any): boolean;
|
44
43
|
currentValue: any;
|
45
|
-
/**
|
46
|
-
* Normalize values coming into updateValue. For example, depending on the configuration, string value `"true"` will be normalized to boolean `true`.
|
47
|
-
* @param {*} value - The value to normalize
|
48
|
-
* @returns {*} - Returns the normalized value
|
49
|
-
*/
|
50
|
-
convertByDataType(value: any): any;
|
51
|
-
normalizeValue(value: any): any;
|
52
44
|
}
|
53
45
|
import ListComponent from '../_classes/list/ListComponent';
|
@@ -153,12 +153,6 @@ class RadioComponent extends ListComponent_1.default {
|
|
153
153
|
this.dataReady.then(() => res(true));
|
154
154
|
});
|
155
155
|
}
|
156
|
-
convertValues(values) {
|
157
|
-
if (this.options.renderMode === 'html' && this.type === 'radio') {
|
158
|
-
return values.map(x => (Object.assign(Object.assign({}, x), { value: this.convertByDataType(x.value) })));
|
159
|
-
}
|
160
|
-
return values;
|
161
|
-
}
|
162
156
|
render() {
|
163
157
|
if (!this.optionsLoaded) {
|
164
158
|
return super.render(this.renderTemplate('loader'));
|
@@ -166,7 +160,7 @@ class RadioComponent extends ListComponent_1.default {
|
|
166
160
|
return super.render(this.renderTemplate('radio', {
|
167
161
|
input: this.inputInfo,
|
168
162
|
inline: this.component.inline,
|
169
|
-
values: this.component.dataSrc === 'values' ? this.
|
163
|
+
values: this.component.dataSrc === 'values' ? this.component.values : this.loadedOptions,
|
170
164
|
value: this.dataValue,
|
171
165
|
row: this.row,
|
172
166
|
}));
|
@@ -412,7 +406,7 @@ class RadioComponent extends ListComponent_1.default {
|
|
412
406
|
* @param {*} value - The value to normalize
|
413
407
|
* @returns {*} - Returns the normalized value
|
414
408
|
*/
|
415
|
-
|
409
|
+
normalizeValue(value) {
|
416
410
|
const dataType = this.component.dataType || 'auto';
|
417
411
|
if (value === this.emptyValue) {
|
418
412
|
return value;
|
@@ -444,18 +438,14 @@ class RadioComponent extends ListComponent_1.default {
|
|
444
438
|
value = !(!value || value.toString() === 'false');
|
445
439
|
break;
|
446
440
|
}
|
447
|
-
|
448
|
-
}
|
449
|
-
normalizeValue(value) {
|
450
|
-
const valueConverted = this.convertByDataType(value);
|
451
|
-
if (this.isSelectURL && this.templateData && this.templateData[valueConverted]) {
|
441
|
+
if (this.isSelectURL && this.templateData && this.templateData[value]) {
|
452
442
|
const submission = this.root.submission;
|
453
443
|
if (!submission.metadata.selectData) {
|
454
444
|
submission.metadata.selectData = {};
|
455
445
|
}
|
456
|
-
lodash_1.default.set(submission.metadata.selectData, this.path, this.templateData[
|
446
|
+
lodash_1.default.set(submission.metadata.selectData, this.path, this.templateData[value]);
|
457
447
|
}
|
458
|
-
return super.normalizeValue(
|
448
|
+
return super.normalizeValue(value);
|
459
449
|
}
|
460
450
|
}
|
461
451
|
exports.default = RadioComponent;
|
@@ -8,12 +8,6 @@ export default class SelectBoxesComponent extends RadioComponent {
|
|
8
8
|
* @returns {boolean} - If the value is empty.
|
9
9
|
*/
|
10
10
|
isEmpty(value?: any): boolean;
|
11
|
-
/**
|
12
|
-
* Normalize values coming into updateValue.
|
13
|
-
* @param {any} value - The value to normalize.
|
14
|
-
* @returns {*} - The normalized value
|
15
|
-
*/
|
16
|
-
normalizeValue(value: any): any;
|
17
11
|
setInputsDisabled(value: any, onlyUnchecked: any): void;
|
18
12
|
checkComponentValidity(data: any, dirty: any, rowData: any, options: any, errors?: any[]): boolean;
|
19
13
|
}
|
@@ -28,7 +28,6 @@ export default class RadioComponent extends ListComponent {
|
|
28
28
|
optionsLoaded: boolean | undefined;
|
29
29
|
loadedOptions: any[] | undefined;
|
30
30
|
beforeSubmit(): Promise<any>;
|
31
|
-
convertValues(values: any): any;
|
32
31
|
render(): string;
|
33
32
|
attach(element: any): Promise<void>;
|
34
33
|
detach(element: any): void;
|
@@ -42,12 +41,5 @@ export default class RadioComponent extends ListComponent {
|
|
42
41
|
setSelectedClasses(): void;
|
43
42
|
updateValue(value: any, flags: any): boolean;
|
44
43
|
currentValue: any;
|
45
|
-
/**
|
46
|
-
* Normalize values coming into updateValue. For example, depending on the configuration, string value `"true"` will be normalized to boolean `true`.
|
47
|
-
* @param {*} value - The value to normalize
|
48
|
-
* @returns {*} - Returns the normalized value
|
49
|
-
*/
|
50
|
-
convertByDataType(value: any): any;
|
51
|
-
normalizeValue(value: any): any;
|
52
44
|
}
|
53
45
|
import ListComponent from '../_classes/list/ListComponent';
|
@@ -153,12 +153,6 @@ export default class RadioComponent extends ListComponent {
|
|
153
153
|
this.dataReady.then(() => res(true));
|
154
154
|
});
|
155
155
|
}
|
156
|
-
convertValues(values) {
|
157
|
-
if (this.options.renderMode === 'html' && this.type === 'radio') {
|
158
|
-
return values.map(x => ({ ...x, value: this.convertByDataType(x.value) }));
|
159
|
-
}
|
160
|
-
return values;
|
161
|
-
}
|
162
156
|
render() {
|
163
157
|
if (!this.optionsLoaded) {
|
164
158
|
return super.render(this.renderTemplate('loader'));
|
@@ -166,7 +160,7 @@ export default class RadioComponent extends ListComponent {
|
|
166
160
|
return super.render(this.renderTemplate('radio', {
|
167
161
|
input: this.inputInfo,
|
168
162
|
inline: this.component.inline,
|
169
|
-
values: this.component.dataSrc === 'values' ? this.
|
163
|
+
values: this.component.dataSrc === 'values' ? this.component.values : this.loadedOptions,
|
170
164
|
value: this.dataValue,
|
171
165
|
row: this.row,
|
172
166
|
}));
|
@@ -412,7 +406,7 @@ export default class RadioComponent extends ListComponent {
|
|
412
406
|
* @param {*} value - The value to normalize
|
413
407
|
* @returns {*} - Returns the normalized value
|
414
408
|
*/
|
415
|
-
|
409
|
+
normalizeValue(value) {
|
416
410
|
const dataType = this.component.dataType || 'auto';
|
417
411
|
if (value === this.emptyValue) {
|
418
412
|
return value;
|
@@ -444,17 +438,13 @@ export default class RadioComponent extends ListComponent {
|
|
444
438
|
value = !(!value || value.toString() === 'false');
|
445
439
|
break;
|
446
440
|
}
|
447
|
-
|
448
|
-
}
|
449
|
-
normalizeValue(value) {
|
450
|
-
const valueConverted = this.convertByDataType(value);
|
451
|
-
if (this.isSelectURL && this.templateData && this.templateData[valueConverted]) {
|
441
|
+
if (this.isSelectURL && this.templateData && this.templateData[value]) {
|
452
442
|
const submission = this.root.submission;
|
453
443
|
if (!submission.metadata.selectData) {
|
454
444
|
submission.metadata.selectData = {};
|
455
445
|
}
|
456
|
-
_.set(submission.metadata.selectData, this.path, this.templateData[
|
446
|
+
_.set(submission.metadata.selectData, this.path, this.templateData[value]);
|
457
447
|
}
|
458
|
-
return super.normalizeValue(
|
448
|
+
return super.normalizeValue(value);
|
459
449
|
}
|
460
450
|
}
|
@@ -8,12 +8,6 @@ export default class SelectBoxesComponent extends RadioComponent {
|
|
8
8
|
* @returns {boolean} - If the value is empty.
|
9
9
|
*/
|
10
10
|
isEmpty(value?: any): boolean;
|
11
|
-
/**
|
12
|
-
* Normalize values coming into updateValue.
|
13
|
-
* @param {any} value - The value to normalize.
|
14
|
-
* @returns {*} - The normalized value
|
15
|
-
*/
|
16
|
-
normalizeValue(value: any): any;
|
17
11
|
setInputsDisabled(value: any, onlyUnchecked: any): void;
|
18
12
|
checkComponentValidity(data: any, dirty: any, rowData: any, options: any, errors?: any[]): boolean;
|
19
13
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@formio/js",
|
3
|
-
"version": "5.1.0-dev.
|
3
|
+
"version": "5.1.0-dev.6107.3898f3a",
|
4
4
|
"description": "JavaScript powered Forms with JSON Form Builder",
|
5
5
|
"main": "lib/cjs/index.js",
|
6
6
|
"exports": {
|
@@ -86,7 +86,7 @@
|
|
86
86
|
"@formio/vanilla-text-mask": "^5.1.1-formio.1",
|
87
87
|
"abortcontroller-polyfill": "^1.7.5",
|
88
88
|
"autocompleter": "^8.0.4",
|
89
|
-
"bootstrap": "^5.3.
|
89
|
+
"bootstrap": "^5.3.4",
|
90
90
|
"browser-cookies": "^1.2.0",
|
91
91
|
"browser-md5-file": "^1.1.1",
|
92
92
|
"choices.js": "^11.0.6",
|