@formio/js 5.0.0-dev.5839.ce94528 → 5.0.0-dev.5841.9817451
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/Changelog.md +26 -0
- package/dist/formio.form.js +3 -3
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.full.js +3 -3
- package/dist/formio.full.min.js +1 -1
- package/lib/cjs/components/_classes/component/Component.js +6 -4
- package/lib/cjs/components/_classes/list/ListComponent.js +1 -0
- package/lib/cjs/components/radio/Radio.js +0 -8
- package/lib/mjs/components/_classes/component/Component.js +3 -1
- package/lib/mjs/components/_classes/list/ListComponent.js +1 -0
- package/lib/mjs/components/radio/Radio.js +0 -8
- package/package.json +1 -1
|
@@ -3469,14 +3469,16 @@ class Component extends Element_1.default {
|
|
|
3469
3469
|
window.scrollTo(verticalOnly ? window.scrollX : left + window.scrollX, top + window.scrollY);
|
|
3470
3470
|
}
|
|
3471
3471
|
focus(index) {
|
|
3472
|
-
var _a, _b, _c;
|
|
3472
|
+
var _a, _b, _c, _d;
|
|
3473
3473
|
if ('beforeFocus' in this.parent) {
|
|
3474
3474
|
this.parent.beforeFocus(this);
|
|
3475
3475
|
}
|
|
3476
|
-
index
|
|
3477
|
-
|
|
3476
|
+
if (!index && !lodash_1.default.isNumber(index) && ((_b = (_a = this.refs) === null || _a === void 0 ? void 0 : _a.input) === null || _b === void 0 ? void 0 : _b.length)) {
|
|
3477
|
+
index = this.refs.input.length - 1;
|
|
3478
|
+
}
|
|
3479
|
+
if ((_c = this.refs.input) === null || _c === void 0 ? void 0 : _c.length) {
|
|
3478
3480
|
const focusingInput = this.refs.input[index];
|
|
3479
|
-
if (((
|
|
3481
|
+
if (((_d = this.component.widget) === null || _d === void 0 ? void 0 : _d.type) === 'calendar') {
|
|
3480
3482
|
const sibling = focusingInput.nextSibling;
|
|
3481
3483
|
if (sibling) {
|
|
3482
3484
|
sibling.focus();
|
|
@@ -79,14 +79,6 @@ class RadioComponent extends ListComponent_1.default {
|
|
|
79
79
|
}
|
|
80
80
|
return defaultValue;
|
|
81
81
|
}
|
|
82
|
-
resetValue() {
|
|
83
|
-
this.unset();
|
|
84
|
-
this.setValue(this.emptyValue, {
|
|
85
|
-
noUpdateEvent: true,
|
|
86
|
-
noValidate: true,
|
|
87
|
-
resetValue: true
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
82
|
get inputInfo() {
|
|
91
83
|
var _a;
|
|
92
84
|
const info = super.elementInfo();
|
|
@@ -3434,7 +3434,9 @@ export default class Component extends Element {
|
|
|
3434
3434
|
if ('beforeFocus' in this.parent) {
|
|
3435
3435
|
this.parent.beforeFocus(this);
|
|
3436
3436
|
}
|
|
3437
|
-
index
|
|
3437
|
+
if (!index && !_.isNumber(index) && this.refs?.input?.length) {
|
|
3438
|
+
index = this.refs.input.length - 1;
|
|
3439
|
+
}
|
|
3438
3440
|
if (this.refs.input?.length) {
|
|
3439
3441
|
const focusingInput = this.refs.input[index];
|
|
3440
3442
|
if (this.component.widget?.type === 'calendar') {
|
|
@@ -80,14 +80,6 @@ export default class RadioComponent extends ListComponent {
|
|
|
80
80
|
}
|
|
81
81
|
return defaultValue;
|
|
82
82
|
}
|
|
83
|
-
resetValue() {
|
|
84
|
-
this.unset();
|
|
85
|
-
this.setValue(this.emptyValue, {
|
|
86
|
-
noUpdateEvent: true,
|
|
87
|
-
noValidate: true,
|
|
88
|
-
resetValue: true
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
83
|
get inputInfo() {
|
|
92
84
|
const info = super.elementInfo();
|
|
93
85
|
info.type = 'input';
|