@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.
@@ -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 = index || ((_a = this.refs.input) === null || _a === void 0 ? void 0 : _a.length) - 1;
3477
- if ((_b = this.refs.input) === null || _b === void 0 ? void 0 : _b.length) {
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 (((_c = this.component.widget) === null || _c === void 0 ? void 0 : _c.type) === 'calendar') {
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();
@@ -190,6 +190,7 @@ class ListComponent extends Field_1.default {
190
190
  return;
191
191
  }
192
192
  let { url } = this.component.data;
193
+ url = lodash_1.default.trim(url);
193
194
  let method;
194
195
  let body;
195
196
  if (url.startsWith('/')) {
@@ -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 = index || this.refs.input?.length - 1;
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') {
@@ -185,6 +185,7 @@ export default class ListComponent extends Field {
185
185
  return;
186
186
  }
187
187
  let { url } = this.component.data;
188
+ url = _.trim(url);
188
189
  let method;
189
190
  let body;
190
191
  if (url.startsWith('/')) {
@@ -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';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formio/js",
3
- "version": "5.0.0-dev.5839.ce94528",
3
+ "version": "5.0.0-dev.5841.9817451",
4
4
  "description": "JavaScript powered Forms with JSON Form Builder",
5
5
  "main": "lib/cjs/index.js",
6
6
  "exports": {