@formio/js 5.0.0-dev.5792.f0b98eb → 5.0.0-dev.5796.ee2613b

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.
Files changed (49) hide show
  1. package/dist/formio.form.js +8 -8
  2. package/dist/formio.form.min.js +1 -1
  3. package/dist/formio.full.js +9 -9
  4. package/dist/formio.full.min.js +1 -1
  5. package/dist/formio.utils.js +1 -1
  6. package/dist/formio.utils.min.js +1 -1
  7. package/lib/cjs/Webform.js +2 -2
  8. package/lib/cjs/components/_classes/component/Component.d.ts +1 -1
  9. package/lib/cjs/components/_classes/component/Component.js +7 -6
  10. package/lib/cjs/components/address/Address.d.ts +6 -0
  11. package/lib/cjs/components/address/Address.js +7 -1
  12. package/lib/cjs/components/day/Day.d.ts +0 -1
  13. package/lib/cjs/components/editgrid/fixtures/index.d.ts +7 -7
  14. package/lib/cjs/components/editgrid/fixtures/index.js +1 -1
  15. package/lib/cjs/components/html/HTML.js +1 -1
  16. package/lib/cjs/components/radio/Radio.js +1 -1
  17. package/lib/cjs/components/select/Select.js +4 -1
  18. package/lib/cjs/components/select/editForm/Select.edit.validation.js +2 -1
  19. package/lib/cjs/components/select/fixtures/comp25.d.ts +43 -28
  20. package/lib/cjs/components/select/fixtures/comp25.js +56 -49
  21. package/lib/cjs/components/select/fixtures/comp26.d.ts +44 -0
  22. package/lib/cjs/components/select/fixtures/comp26.js +59 -0
  23. package/lib/cjs/components/select/fixtures/index.d.ts +2 -1
  24. package/lib/cjs/components/select/fixtures/index.js +3 -1
  25. package/lib/cjs/components/selectboxes/SelectBoxes.js +1 -1
  26. package/lib/cjs/utils/utils.d.ts +1 -1
  27. package/lib/cjs/utils/utils.js +1 -13
  28. package/lib/mjs/Webform.js +6 -2
  29. package/lib/mjs/components/_classes/component/Component.d.ts +1 -1
  30. package/lib/mjs/components/_classes/component/Component.js +4 -3
  31. package/lib/mjs/components/address/Address.d.ts +6 -0
  32. package/lib/mjs/components/address/Address.js +10 -1
  33. package/lib/mjs/components/day/Day.d.ts +0 -1
  34. package/lib/mjs/components/editgrid/fixtures/index.d.ts +7 -7
  35. package/lib/mjs/components/editgrid/fixtures/index.js +1 -1
  36. package/lib/mjs/components/html/HTML.js +1 -1
  37. package/lib/mjs/components/radio/Radio.js +1 -1
  38. package/lib/mjs/components/select/Select.js +4 -1
  39. package/lib/mjs/components/select/editForm/Select.edit.validation.js +2 -1
  40. package/lib/mjs/components/select/fixtures/comp25.d.ts +43 -28
  41. package/lib/mjs/components/select/fixtures/comp25.js +56 -49
  42. package/lib/mjs/components/select/fixtures/comp26.d.ts +44 -0
  43. package/lib/mjs/components/select/fixtures/comp26.js +57 -0
  44. package/lib/mjs/components/select/fixtures/index.d.ts +2 -1
  45. package/lib/mjs/components/select/fixtures/index.js +2 -1
  46. package/lib/mjs/components/selectboxes/SelectBoxes.js +1 -1
  47. package/lib/mjs/utils/utils.d.ts +1 -1
  48. package/lib/mjs/utils/utils.js +1 -2
  49. package/package.json +1 -1
@@ -1245,10 +1245,10 @@ class Webform extends NestedDataComponent_1.default {
1245
1245
  }
1246
1246
  this.checkData(value.data, flags);
1247
1247
  const shouldValidate = !flags.noValidate ||
1248
- flags.fromIFrame ||
1248
+ flags.fromIframe ||
1249
1249
  (flags.fromSubmission && this.rootPristine && this.pristine && flags.changed);
1250
1250
  const errors = shouldValidate
1251
- ? this.validate(value.data, Object.assign(Object.assign({}, flags), { process: "change" }))
1251
+ ? this.validate(value.data, Object.assign(Object.assign({}, flags), { noValidate: false, process: 'change' }))
1252
1252
  : [];
1253
1253
  value.isValid = errors.length === 0;
1254
1254
  this.loading = false;
@@ -1076,7 +1076,7 @@ declare class Component extends Element {
1076
1076
  elementInfo(): any;
1077
1077
  autofocus(): void;
1078
1078
  scrollIntoView(element?: any): void;
1079
- focus(index?: number): void;
1079
+ focus(index: any): void;
1080
1080
  /**
1081
1081
  * Get `Formio` instance for working with files
1082
1082
  * @returns {import('@formio/core').Formio} - The Formio instance file service.
@@ -3024,7 +3024,7 @@ class Component extends Element_1.default {
3024
3024
  this.parent.childErrors.push(...errors);
3025
3025
  }
3026
3026
  else {
3027
- lodash_1.default.remove(this.parent.childErrors, (err) => err.component.key === this.component.key);
3027
+ lodash_1.default.remove(this.parent.childErrors, (err) => { var _a, _b; return (((_a = err === null || err === void 0 ? void 0 : err.component) === null || _a === void 0 ? void 0 : _a.key) || ((_b = err === null || err === void 0 ? void 0 : err.context) === null || _b === void 0 ? void 0 : _b.key)) === this.component.key; });
3028
3028
  }
3029
3029
  }
3030
3030
  this.showValidationErrors(errors, data, row, flags);
@@ -3040,7 +3040,7 @@ class Component extends Element_1.default {
3040
3040
  this.parent.childErrors.push(...errors);
3041
3041
  }
3042
3042
  else {
3043
- lodash_1.default.remove(this.parent.childErrors, (err) => err.component.key === this.component.key);
3043
+ lodash_1.default.remove(this.parent.childErrors, (err) => { var _a, _b; return (((_a = err === null || err === void 0 ? void 0 : err.component) === null || _a === void 0 ? void 0 : _a.key) || ((_b = err === null || err === void 0 ? void 0 : err.context) === null || _b === void 0 ? void 0 : _b.key)) === this.component.key; });
3044
3044
  }
3045
3045
  }
3046
3046
  return errors.length === 0;
@@ -3463,14 +3463,15 @@ class Component extends Element_1.default {
3463
3463
  const { left, top } = element.getBoundingClientRect();
3464
3464
  window.scrollTo(left + window.scrollX, top + window.scrollY);
3465
3465
  }
3466
- focus(index = (this.refs.input.length - 1)) {
3467
- var _a, _b;
3466
+ focus(index) {
3467
+ var _a, _b, _c;
3468
3468
  if ('beforeFocus' in this.parent) {
3469
3469
  this.parent.beforeFocus(this);
3470
3470
  }
3471
- if ((_a = this.refs.input) === null || _a === void 0 ? void 0 : _a.length) {
3471
+ index = index || ((_a = this.refs.input) === null || _a === void 0 ? void 0 : _a.length) - 1;
3472
+ if ((_b = this.refs.input) === null || _b === void 0 ? void 0 : _b.length) {
3472
3473
  const focusingInput = this.refs.input[index];
3473
- if (((_b = this.component.widget) === null || _b === void 0 ? void 0 : _b.type) === 'calendar') {
3474
+ if (((_c = this.component.widget) === null || _c === void 0 ? void 0 : _c.type) === 'calendar') {
3474
3475
  const sibling = focusingInput.nextSibling;
3475
3476
  if (sibling) {
3476
3477
  sibling.focus();
@@ -11,6 +11,12 @@ export default class AddressComponent extends ContainerComponent {
11
11
  weight: number;
12
12
  schema: any;
13
13
  };
14
+ static get serverConditionSettings(): {
15
+ operators: string[];
16
+ };
17
+ static get conditionOperatorsSettings(): {
18
+ operators: string[];
19
+ };
14
20
  static get modeSwitcherRef(): string;
15
21
  static get removeValueIconRef(): string;
16
22
  static get searchInputRef(): string;
@@ -97,6 +97,12 @@ class AddressComponent extends Container_1.default {
97
97
  schema: AddressComponent.schema(),
98
98
  };
99
99
  }
100
+ static get serverConditionSettings() {
101
+ return AddressComponent.conditionOperatorsSettings;
102
+ }
103
+ static get conditionOperatorsSettings() {
104
+ return Object.assign(Object.assign({}, super.conditionOperatorsSettings), { operators: ['isEmpty', 'isNotEmpty'] });
105
+ }
100
106
  mergeSchema(component = {}) {
101
107
  let { defaultSchema } = this;
102
108
  if (component.components) {
@@ -188,7 +194,7 @@ class AddressComponent extends Container_1.default {
188
194
  return (this.manualModeEnabled && this.dataValue) ? this.dataValue.address : this.dataValue;
189
195
  }
190
196
  set address(value) {
191
- if (this.manualModeEnabled && !this.isMultiple) {
197
+ if (this.manualModeEnabled && !this.isMultiple && !lodash_1.default.isEqual(value, this.emptyValue)) {
192
198
  this.dataValue.address = value;
193
199
  }
194
200
  else {
@@ -130,7 +130,6 @@ export default class DayComponent extends Field {
130
130
  * @returns {string|null} - The string value of the date.
131
131
  */
132
132
  getValueAsString(value: any): string | null;
133
- focus(field: any): void;
134
133
  isPartialDay(value: any): boolean;
135
134
  getValidationFormat(): string;
136
135
  }
@@ -1,22 +1,22 @@
1
1
  import comp1 from './comp1';
2
2
  import comp2 from './comp2';
3
3
  import comp3 from './comp3';
4
- import comp10 from './comp10';
5
- import comp11 from './comp11';
6
- import comp12 from './comp12';
7
- import comp13 from './comp13';
8
- import comp14 from './comp14';
9
- import comp15 from './comp15';
10
4
  import comp4 from './comp4';
11
5
  import comp5 from './comp5';
12
6
  import comp6 from './comp6';
13
7
  import comp7 from './comp7';
14
8
  import comp8 from './comp8';
15
9
  import comp9 from './comp9';
10
+ import comp10 from './comp10';
11
+ import comp11 from './comp11';
12
+ import comp12 from './comp12';
13
+ import comp13 from './comp13';
14
+ import comp14 from './comp14';
15
+ import comp15 from './comp15';
16
16
  import comp16 from './comp16';
17
17
  import comp17 from './comp17';
18
18
  import compOpenWhenEmpty from './comp-openWhenEmpty';
19
19
  import withOpenWhenEmptyAndConditions from './comp-with-conditions-and-openWhenEmpty';
20
20
  import compWithCustomDefaultValue from './comp-with-custom-default-value';
21
21
  import compTestEvents from './comp-test-events';
22
- export { comp1, comp2, comp3, comp10, comp11, comp12, comp13, comp14, comp15, comp4, comp5, comp6, comp7, comp8, comp9, comp16, comp17, compOpenWhenEmpty, withOpenWhenEmptyAndConditions, compWithCustomDefaultValue, compTestEvents };
22
+ export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, comp9, comp10, comp11, comp12, comp13, comp14, comp15, comp16, comp17, compOpenWhenEmpty, withOpenWhenEmptyAndConditions, compWithCustomDefaultValue, compTestEvents };
@@ -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.compTestEvents = exports.compWithCustomDefaultValue = exports.withOpenWhenEmptyAndConditions = exports.compOpenWhenEmpty = exports.comp17 = exports.comp16 = exports.comp9 = exports.comp8 = exports.comp7 = exports.comp6 = exports.comp5 = exports.comp4 = exports.comp15 = exports.comp14 = exports.comp13 = exports.comp12 = exports.comp11 = exports.comp10 = exports.comp3 = exports.comp2 = exports.comp1 = void 0;
6
+ exports.compTestEvents = exports.compWithCustomDefaultValue = exports.withOpenWhenEmptyAndConditions = exports.compOpenWhenEmpty = exports.comp17 = exports.comp16 = exports.comp15 = exports.comp14 = exports.comp13 = exports.comp12 = exports.comp11 = exports.comp10 = exports.comp9 = 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"));
@@ -10,7 +10,7 @@ class HTMLComponent extends Component_1.default {
10
10
  return Component_1.default.schema({
11
11
  label: 'HTML',
12
12
  type: 'htmlelement',
13
- tag: 'div',
13
+ tag: 'p',
14
14
  attrs: [],
15
15
  content: '',
16
16
  input: false,
@@ -212,7 +212,7 @@ class RadioComponent extends ListComponent_1.default {
212
212
  if (!(0, utils_1.boolValue)(setting) || !value) {
213
213
  return true;
214
214
  }
215
- const values = this.component.values;
215
+ const values = this.component.dataSrc === 'values' ? this.component.values : this.loadedOptions;
216
216
  if (values) {
217
217
  return values.findIndex(({ value: optionValue }) => this.normalizeValue(optionValue) === value) !== -1;
218
218
  }
@@ -1429,6 +1429,9 @@ class SelectComponent extends ListComponent_1.default {
1429
1429
  case 'custom':
1430
1430
  rawItems = this.getCustomItems();
1431
1431
  break;
1432
+ case 'url':
1433
+ rawItems = this.selectItems;
1434
+ break;
1432
1435
  }
1433
1436
  if (typeof rawItems === 'string') {
1434
1437
  try {
@@ -1567,8 +1570,8 @@ class SelectComponent extends ListComponent_1.default {
1567
1570
  super.detach();
1568
1571
  }
1569
1572
  focus() {
1573
+ super.focus.call(this);
1570
1574
  if (this.focusableElement) {
1571
- super.focus.call(this);
1572
1575
  this.focusableElement.focus();
1573
1576
  }
1574
1577
  }
@@ -26,7 +26,8 @@ exports.default = [
26
26
  [
27
27
  'values',
28
28
  'json',
29
- 'custom'
29
+ 'custom',
30
+ 'url'
30
31
  ],
31
32
  ],
32
33
  },
@@ -1,44 +1,59 @@
1
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
2
  let components: ({
8
3
  label: string;
9
- widget: string;
10
4
  tableView: boolean;
11
- data: {
12
- values: {
13
- label: string;
14
- value: string;
15
- }[];
16
- };
17
- dataType: string;
5
+ modal: boolean;
6
+ rowDrafts: boolean;
18
7
  key: string;
19
8
  type: string;
9
+ displayAsTable: boolean;
20
10
  input: boolean;
21
- applyMaskOn?: undefined;
22
- conditional?: undefined;
11
+ components: ({
12
+ label: string;
13
+ widget: string;
14
+ tableView: boolean;
15
+ data: {
16
+ values: {
17
+ label: string;
18
+ value: string;
19
+ }[];
20
+ };
21
+ validate: {
22
+ required: boolean;
23
+ };
24
+ key: string;
25
+ type: string;
26
+ input: boolean;
27
+ applyMaskOn?: undefined;
28
+ validateWhenHidden?: undefined;
29
+ } | {
30
+ label: string;
31
+ applyMaskOn: string;
32
+ tableView: boolean;
33
+ validate: {
34
+ required: boolean;
35
+ };
36
+ validateWhenHidden: boolean;
37
+ key: string;
38
+ type: string;
39
+ input: boolean;
40
+ widget?: undefined;
41
+ data?: undefined;
42
+ })[];
43
+ showValidations?: undefined;
44
+ saveOnEnter?: undefined;
23
45
  } | {
24
46
  label: string;
25
- applyMaskOn: string;
47
+ showValidations: boolean;
26
48
  tableView: boolean;
27
49
  key: string;
28
50
  type: string;
29
51
  input: boolean;
30
- conditional: {
31
- show: boolean;
32
- conjunction: string;
33
- conditions: {
34
- component: string;
35
- operator: string;
36
- value: number;
37
- }[];
38
- };
39
- widget?: undefined;
40
- data?: undefined;
41
- dataType?: undefined;
52
+ saveOnEnter: boolean;
53
+ modal?: undefined;
54
+ rowDrafts?: undefined;
55
+ displayAsTable?: undefined;
56
+ components?: undefined;
42
57
  })[];
43
58
  }
44
59
  export default _default;
@@ -1,59 +1,66 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = {
4
- title: 'FIO-8072',
5
- name: 'fio8072',
6
- path: 'fio8072',
7
- type: 'form',
8
- display: 'form',
9
- components: [
4
+ "components": [
10
5
  {
11
- label: 'Select',
12
- widget: 'choicesjs',
13
- tableView: true,
14
- data: {
15
- values: [
16
- {
17
- label: 'A',
18
- value: '1',
6
+ "label": "Edit Grid",
7
+ "tableView": false,
8
+ "modal": true,
9
+ "rowDrafts": true,
10
+ "key": "editGrid",
11
+ "type": "editgrid",
12
+ "displayAsTable": false,
13
+ "input": true,
14
+ "components": [
15
+ {
16
+ "label": "Select",
17
+ "widget": "choicesjs",
18
+ "tableView": true,
19
+ "data": {
20
+ "values": [
21
+ {
22
+ "label": "a",
23
+ "value": "a"
24
+ },
25
+ {
26
+ "label": "b",
27
+ "value": "b"
28
+ },
29
+ {
30
+ "label": "c",
31
+ "value": "c"
32
+ }
33
+ ]
19
34
  },
20
- {
21
- label: 'B',
22
- value: '2',
35
+ "validate": {
36
+ "required": true
23
37
  },
24
- {
25
- label: 'C',
26
- value: '10',
38
+ "key": "select",
39
+ "type": "select",
40
+ "input": true
41
+ },
42
+ {
43
+ "label": "Text Field",
44
+ "applyMaskOn": "change",
45
+ "tableView": true,
46
+ "validate": {
47
+ "required": true
27
48
  },
28
- {
29
- label: 'D',
30
- value: '1d',
31
- },
32
- ],
33
- },
34
- dataType: 'number',
35
- key: 'select',
36
- type: 'select',
37
- input: true,
49
+ "validateWhenHidden": false,
50
+ "key": "textField",
51
+ "type": "textfield",
52
+ "input": true
53
+ }
54
+ ]
38
55
  },
39
56
  {
40
- label: 'Text Field',
41
- applyMaskOn: 'change',
42
- tableView: true,
43
- key: 'textField',
44
- type: 'textfield',
45
- input: true,
46
- conditional: {
47
- show: true,
48
- conjunction: 'all',
49
- conditions: [
50
- {
51
- component: 'select',
52
- operator: 'lessThan',
53
- value: 5,
54
- },
55
- ],
56
- },
57
- },
58
- ],
57
+ "label": "Submit",
58
+ "showValidations": false,
59
+ "tableView": false,
60
+ "key": "submit",
61
+ "type": "button",
62
+ "input": true,
63
+ "saveOnEnter": false
64
+ }
65
+ ]
59
66
  };
@@ -0,0 +1,44 @@
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
+ widget: string;
10
+ tableView: boolean;
11
+ data: {
12
+ values: {
13
+ label: string;
14
+ value: string;
15
+ }[];
16
+ };
17
+ dataType: string;
18
+ key: string;
19
+ type: string;
20
+ input: boolean;
21
+ applyMaskOn?: undefined;
22
+ conditional?: undefined;
23
+ } | {
24
+ label: string;
25
+ applyMaskOn: string;
26
+ tableView: boolean;
27
+ key: string;
28
+ type: string;
29
+ input: boolean;
30
+ conditional: {
31
+ show: boolean;
32
+ conjunction: string;
33
+ conditions: {
34
+ component: string;
35
+ operator: string;
36
+ value: number;
37
+ }[];
38
+ };
39
+ widget?: undefined;
40
+ data?: undefined;
41
+ dataType?: undefined;
42
+ })[];
43
+ }
44
+ export default _default;
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = {
4
+ title: 'FIO-8072',
5
+ name: 'fio8072',
6
+ path: 'fio8072',
7
+ type: 'form',
8
+ display: 'form',
9
+ components: [
10
+ {
11
+ label: 'Select',
12
+ widget: 'choicesjs',
13
+ tableView: true,
14
+ data: {
15
+ values: [
16
+ {
17
+ label: 'A',
18
+ value: '1',
19
+ },
20
+ {
21
+ label: 'B',
22
+ value: '2',
23
+ },
24
+ {
25
+ label: 'C',
26
+ value: '10',
27
+ },
28
+ {
29
+ label: 'D',
30
+ value: '1d',
31
+ },
32
+ ],
33
+ },
34
+ dataType: 'number',
35
+ key: 'select',
36
+ type: 'select',
37
+ input: true,
38
+ },
39
+ {
40
+ label: 'Text Field',
41
+ applyMaskOn: 'change',
42
+ tableView: true,
43
+ key: 'textField',
44
+ type: 'textfield',
45
+ input: true,
46
+ conditional: {
47
+ show: true,
48
+ conjunction: 'all',
49
+ conditions: [
50
+ {
51
+ component: 'select',
52
+ operator: 'lessThan',
53
+ value: 5,
54
+ },
55
+ ],
56
+ },
57
+ },
58
+ ],
59
+ };
@@ -22,5 +22,6 @@ import comp22 from './comp22';
22
22
  import comp23 from './comp23';
23
23
  import comp24 from './comp24';
24
24
  import comp25 from './comp25';
25
- export { comp1, comp2, comp4, comp5, comp6, comp7, comp8, comp9, comp10, comp11, comp12, comp13, comp14, comp15, comp16, comp17, comp18, comp19, comp20, comp21, comp22, comp23, comp24, comp25 };
25
+ import comp26 from './comp26';
26
+ export { comp1, comp2, comp4, comp5, comp6, comp7, comp8, comp9, comp10, comp11, comp12, comp13, comp14, comp15, comp16, comp17, comp18, comp19, comp20, comp21, comp22, comp23, comp24, comp25, comp26 };
26
27
  export { multiSelect, multiSelectOptions } from "./comp3";
@@ -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.comp25 = exports.comp24 = exports.comp23 = exports.comp22 = exports.comp21 = exports.comp20 = exports.comp19 = exports.comp18 = exports.comp17 = exports.comp16 = exports.comp15 = exports.comp14 = exports.comp13 = exports.comp12 = exports.comp11 = exports.comp10 = exports.comp9 = exports.comp8 = exports.comp7 = exports.comp6 = exports.comp5 = exports.comp4 = exports.comp2 = exports.comp1 = exports.multiSelectOptions = exports.multiSelect = void 0;
6
+ exports.comp26 = exports.comp25 = exports.comp24 = exports.comp23 = exports.comp22 = exports.comp21 = exports.comp20 = exports.comp19 = exports.comp18 = exports.comp17 = exports.comp16 = exports.comp15 = exports.comp14 = exports.comp13 = exports.comp12 = exports.comp11 = exports.comp10 = exports.comp9 = exports.comp8 = exports.comp7 = exports.comp6 = exports.comp5 = exports.comp4 = exports.comp2 = exports.comp1 = exports.multiSelectOptions = exports.multiSelect = 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"));
@@ -55,3 +55,5 @@ const comp24_1 = __importDefault(require("./comp24"));
55
55
  exports.comp24 = comp24_1.default;
56
56
  const comp25_1 = __importDefault(require("./comp25"));
57
57
  exports.comp25 = comp25_1.default;
58
+ const comp26_1 = __importDefault(require("./comp26"));
59
+ exports.comp26 = comp26_1.default;
@@ -254,7 +254,7 @@ class SelectBoxesComponent extends Radio_1.default {
254
254
  if (!(0, utils_1.boolValue)(setting) || !value) {
255
255
  return true;
256
256
  }
257
- const values = this.component.values;
257
+ const values = this.component.dataSrc === 'values' ? this.component.values : this.loadedOptions;
258
258
  const availableValueKeys = (values || []).map(({ value: optionValue }) => optionValue);
259
259
  const valueKeys = Object.keys(value);
260
260
  return valueKeys.every((key) => availableValueKeys.includes(key));
@@ -523,4 +523,4 @@ import jsonLogic from 'json-logic-js';
523
523
  import ConditionOperators from './conditionOperators';
524
524
  import { Evaluator } from './Evaluator';
525
525
  export const interpolate: typeof Evaluator.interpolate;
526
- export { jsonLogic, ConditionOperators, Evaluator, _ };
526
+ export { jsonLogic, ConditionOperators, moment, Evaluator, _ };
@@ -11,21 +11,9 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
11
11
  if (k2 === undefined) k2 = k;
12
12
  o[k2] = m[k];
13
13
  }));
14
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
- Object.defineProperty(o, "default", { enumerable: true, value: v });
16
- }) : function(o, v) {
17
- o["default"] = v;
18
- });
19
14
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
20
15
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
21
16
  };
22
- var __importStar = (this && this.__importStar) || function (mod) {
23
- if (mod && mod.__esModule) return mod;
24
- var result = {};
25
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
26
- __setModuleDefault(result, mod);
27
- return result;
28
- };
29
17
  var __importDefault = (this && this.__importDefault) || function (mod) {
30
18
  return (mod && mod.__esModule) ? mod : { "default": mod };
31
19
  };
@@ -37,6 +25,7 @@ exports._ = lodash_1.default;
37
25
  const json_logic_js_1 = __importDefault(require("json-logic-js"));
38
26
  exports.jsonLogic = json_logic_js_1.default;
39
27
  const moment_timezone_1 = __importDefault(require("moment-timezone/moment-timezone"));
28
+ exports.moment = moment_timezone_1.default;
40
29
  const jstimezonedetect_1 = __importDefault(require("jstimezonedetect"));
41
30
  const operators_1 = require("./jsonlogic/operators");
42
31
  const dompurify_1 = __importDefault(require("dompurify"));
@@ -62,7 +51,6 @@ json_logic_js_1.default.add_operation('relativeMinDate', (relativeMinDate) => {
62
51
  json_logic_js_1.default.add_operation('relativeMaxDate', (relativeMaxDate) => {
63
52
  return (0, moment_timezone_1.default)().add(relativeMaxDate, 'days').toISOString();
64
53
  });
65
- exports.moment = __importStar(require("moment-timezone/moment-timezone"));
66
54
  /**
67
55
  * Sets the path to the component and parent schema.
68
56
  * @param {import('@formio/core').Component} component - The component to set the path for.
@@ -1247,10 +1247,14 @@ export default class Webform extends NestedDataComponent {
1247
1247
  }
1248
1248
  this.checkData(value.data, flags);
1249
1249
  const shouldValidate = !flags.noValidate ||
1250
- flags.fromIFrame ||
1250
+ flags.fromIframe ||
1251
1251
  (flags.fromSubmission && this.rootPristine && this.pristine && flags.changed);
1252
1252
  const errors = shouldValidate
1253
- ? this.validate(value.data, { ...flags, process: "change" })
1253
+ ? this.validate(value.data, {
1254
+ ...flags,
1255
+ noValidate: false,
1256
+ process: 'change'
1257
+ })
1254
1258
  : [];
1255
1259
  value.isValid = errors.length === 0;
1256
1260
  this.loading = false;
@@ -1076,7 +1076,7 @@ declare class Component extends Element {
1076
1076
  elementInfo(): any;
1077
1077
  autofocus(): void;
1078
1078
  scrollIntoView(element?: any): void;
1079
- focus(index?: number): void;
1079
+ focus(index: any): void;
1080
1080
  /**
1081
1081
  * Get `Formio` instance for working with files
1082
1082
  * @returns {import('@formio/core').Formio} - The Formio instance file service.
@@ -2988,7 +2988,7 @@ export default class Component extends Element {
2988
2988
  this.parent.childErrors.push(...errors);
2989
2989
  }
2990
2990
  else {
2991
- _.remove(this.parent.childErrors, (err) => err.component.key === this.component.key);
2991
+ _.remove(this.parent.childErrors, (err) => (err?.component?.key || err?.context?.key) === this.component.key);
2992
2992
  }
2993
2993
  }
2994
2994
  this.showValidationErrors(errors, data, row, flags);
@@ -3004,7 +3004,7 @@ export default class Component extends Element {
3004
3004
  this.parent.childErrors.push(...errors);
3005
3005
  }
3006
3006
  else {
3007
- _.remove(this.parent.childErrors, (err) => err.component.key === this.component.key);
3007
+ _.remove(this.parent.childErrors, (err) => (err?.component?.key || err?.context?.key) === this.component.key);
3008
3008
  }
3009
3009
  }
3010
3010
  return errors.length === 0;
@@ -3425,10 +3425,11 @@ export default class Component extends Element {
3425
3425
  const { left, top } = element.getBoundingClientRect();
3426
3426
  window.scrollTo(left + window.scrollX, top + window.scrollY);
3427
3427
  }
3428
- focus(index = (this.refs.input.length - 1)) {
3428
+ focus(index) {
3429
3429
  if ('beforeFocus' in this.parent) {
3430
3430
  this.parent.beforeFocus(this);
3431
3431
  }
3432
+ index = index || this.refs.input?.length - 1;
3432
3433
  if (this.refs.input?.length) {
3433
3434
  const focusingInput = this.refs.input[index];
3434
3435
  if (this.component.widget?.type === 'calendar') {