@formio/js 5.2.0-dev.6141.ebbe6dc → 5.2.0-rc.10

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 (43) hide show
  1. package/dist/formio.embed.js +1 -1
  2. package/dist/formio.embed.min.js +1 -1
  3. package/dist/formio.embed.min.js.LICENSE.txt +1 -1
  4. package/dist/formio.form.js +8 -8
  5. package/dist/formio.form.min.js +1 -1
  6. package/dist/formio.form.min.js.LICENSE.txt +1 -1
  7. package/dist/formio.full.js +10 -10
  8. package/dist/formio.full.min.js +1 -1
  9. package/dist/formio.full.min.js.LICENSE.txt +1 -1
  10. package/dist/formio.js +4 -4
  11. package/dist/formio.min.js +1 -1
  12. package/dist/formio.min.js.LICENSE.txt +1 -1
  13. package/dist/formio.utils.js +2 -2
  14. package/dist/formio.utils.min.js +1 -1
  15. package/dist/formio.utils.min.js.LICENSE.txt +1 -1
  16. package/lib/cjs/Embed.js +1 -1
  17. package/lib/cjs/Formio.js +1 -1
  18. package/lib/cjs/PDFBuilder.d.ts +1 -0
  19. package/lib/cjs/PDFBuilder.js +8 -8
  20. package/lib/cjs/WebformBuilder.d.ts +1 -1
  21. package/lib/cjs/WebformBuilder.js +20 -8
  22. package/lib/cjs/components/Components.js +6 -0
  23. package/lib/cjs/components/_classes/nested/NestedComponent.d.ts +1 -0
  24. package/lib/cjs/components/_classes/nested/NestedComponent.js +9 -1
  25. package/lib/cjs/components/button/Button.d.ts +1 -1
  26. package/lib/cjs/components/button/Button.js +4 -4
  27. package/lib/cjs/components/datamap/DataMap.d.ts +1 -1
  28. package/lib/cjs/components/datamap/DataMap.js +4 -4
  29. package/lib/mjs/Embed.js +1 -1
  30. package/lib/mjs/Formio.js +1 -1
  31. package/lib/mjs/PDFBuilder.d.ts +1 -0
  32. package/lib/mjs/PDFBuilder.js +8 -8
  33. package/lib/mjs/WebformBuilder.d.ts +1 -1
  34. package/lib/mjs/WebformBuilder.js +19 -8
  35. package/lib/mjs/components/Components.js +6 -0
  36. package/lib/mjs/components/_classes/nested/NestedComponent.d.ts +1 -0
  37. package/lib/mjs/components/_classes/nested/NestedComponent.js +9 -1
  38. package/lib/mjs/components/button/Button.d.ts +1 -1
  39. package/lib/mjs/components/button/Button.js +1 -1
  40. package/lib/mjs/components/datamap/DataMap.d.ts +1 -1
  41. package/lib/mjs/components/datamap/DataMap.js +1 -1
  42. package/package.json +2 -2
  43. package/Changelog.md +0 -6876
@@ -20,7 +20,7 @@
20
20
 
21
21
  /*! @license DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE */
22
22
 
23
- /*! formiojs v5.2.0-rc.5 | https://unpkg.com/formiojs@5.2.0-rc.5/LICENSE.txt */
23
+ /*! formiojs v5.2.0-rc.10 | https://unpkg.com/formiojs@5.2.0-rc.10/LICENSE.txt */
24
24
 
25
25
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
26
26
 
package/lib/cjs/Embed.js CHANGED
@@ -418,7 +418,7 @@ Formio.formioReady = new Promise((ready, reject) => {
418
418
  _a._formioReady = ready;
419
419
  _a._formioReadyReject = reject;
420
420
  });
421
- Formio.version = '5.2.0-rc.5';
421
+ Formio.version = '5.2.0-rc.10';
422
422
  // Create a report.
423
423
  Formio.Report = {
424
424
  create: (element, submission, options = {}) => __awaiter(void 0, void 0, void 0, function* () {
package/lib/cjs/Formio.js CHANGED
@@ -11,7 +11,7 @@ const CDN_1 = __importDefault(require("./CDN"));
11
11
  const providers_1 = __importDefault(require("./providers"));
12
12
  sdk_1.Formio.cdn = new CDN_1.default();
13
13
  sdk_1.Formio.Providers = providers_1.default;
14
- sdk_1.Formio.version = '5.2.0-rc.5';
14
+ sdk_1.Formio.version = '5.2.0-rc.10';
15
15
  CDN_1.default.defaultCDN = sdk_1.Formio.version.includes('rc') ? 'https://cdn.test-form.io' : 'https://cdn.form.io';
16
16
  const isNil = (val) => val === null || val === undefined;
17
17
  sdk_1.Formio.prototype.uploadFile = function (storage, file, fileName, dir, progressCallback, url, options, fileKey, groupPermissions, groupId, uploadStartCallback, abortCallback, multipartOptions) {
@@ -51,5 +51,6 @@ export default class PDFBuilder extends WebformBuilder {
51
51
  onDropzoneDrop(e: any): boolean;
52
52
  dropEvent: any;
53
53
  onDragEnd(e: any): void;
54
+ repeatablePathsComps: any[] | undefined;
54
55
  }
55
56
  import WebformBuilder from './WebformBuilder';
@@ -451,21 +451,21 @@ class PDFBuilder extends WebformBuilder_1.default {
451
451
  e.target.style.cursor = 'default';
452
452
  }
453
453
  highlightInvalidComponents() {
454
- const repeatablePaths = this.findRepeatablePaths();
454
+ const repeatablePathsComps = this.findComponentsWithRepeatablePaths();
455
455
  // update elements which path was duplicated if any pathes have been changed
456
- if (!lodash_1.default.isEqual(this.repeatablePaths, repeatablePaths)) {
457
- (0, utils_1.eachComponent)(this.webform.getComponents(), (comp, path) => {
458
- if (this.repeatablePaths.includes(path)) {
456
+ if (!lodash_1.default.isEqual(this.repeatablePathsComps, repeatablePathsComps)) {
457
+ (0, utils_1.eachComponent)(this.webform.getComponents(), (comp) => {
458
+ if (this.repeatablePathsComps.includes(comp.component)) {
459
459
  this.webform.postMessage({ name: 'updateElement', data: comp.component });
460
460
  }
461
461
  });
462
- this.repeatablePaths = repeatablePaths;
462
+ this.repeatablePathsComps = repeatablePathsComps;
463
463
  }
464
- if (!repeatablePaths.length) {
464
+ if (!repeatablePathsComps.length) {
465
465
  return;
466
466
  }
467
- (0, utils_1.eachComponent)(this.webform.getComponents(), (comp, path) => {
468
- if (this.repeatablePaths.includes(path)) {
467
+ (0, utils_1.eachComponent)(this.webform.getComponents(), (comp) => {
468
+ if (this.repeatablePathsComps.includes(comp)) {
469
469
  this.webform.postMessage({
470
470
  name: 'showBuilderErrors',
471
471
  data: {
@@ -77,7 +77,7 @@ export default class WebformBuilder extends Component {
77
77
  removeComponent(component: any, parent: any, original: any, componentInstance: any): boolean | undefined;
78
78
  replaceDoubleQuotes(data: any, fieldsToRemoveDoubleQuotes?: any[]): any;
79
79
  updateComponent(component: any, changed: any): void;
80
- findRepeatablePaths(): any[];
80
+ findComponentsWithRepeatablePaths(): any[];
81
81
  highlightInvalidComponents(): void;
82
82
  /**
83
83
  * Called when a new component is saved.
@@ -1126,25 +1126,37 @@ class WebformBuilder extends Component_1.default {
1126
1126
  // Called when we update a component.
1127
1127
  this.emit('updateComponent', component);
1128
1128
  }
1129
- findRepeatablePaths() {
1130
- const repeatablePaths = [];
1129
+ findComponentsWithRepeatablePaths() {
1130
+ const repeatablePaths = {};
1131
1131
  const keys = new Map();
1132
1132
  (0, utils_1.eachComponent)(this.form.components, (comp, path, components, parent, paths) => {
1133
+ var _a, _b;
1134
+ const isRadioCheckbox = comp.type === 'checkbox' && comp.inputType === 'radio';
1133
1135
  if (keys.has(paths.dataPath)) {
1134
- repeatablePaths.push(paths.dataPath);
1136
+ const onlyRadioCheckboxes = ((_a = repeatablePaths[paths.dataPath]) === null || _a === void 0 ? void 0 : _a.onlyRadioCheckboxes) === false ? false : isRadioCheckbox;
1137
+ repeatablePaths[paths.dataPath] = {
1138
+ comps: [...(((_b = repeatablePaths[paths.dataPath]) === null || _b === void 0 ? void 0 : _b.comps) || []), keys.get(paths.dataPath), comp],
1139
+ onlyRadioCheckboxes,
1140
+ };
1135
1141
  }
1136
1142
  else {
1137
- keys.set(paths.dataPath, true);
1143
+ keys.set(paths.dataPath, comp);
1138
1144
  }
1139
1145
  }, true);
1140
- return repeatablePaths;
1146
+ const componentsWithRepeatablePaths = [];
1147
+ Object.keys(repeatablePaths).forEach((path) => {
1148
+ const { comps, onlyRadioCheckboxes } = repeatablePaths[path];
1149
+ if (!onlyRadioCheckboxes) {
1150
+ componentsWithRepeatablePaths.push(...comps);
1151
+ }
1152
+ });
1153
+ return componentsWithRepeatablePaths;
1141
1154
  }
1142
1155
  highlightInvalidComponents() {
1143
- const repeatablePaths = this.findRepeatablePaths();
1156
+ const repeatablePathsComps = this.findComponentsWithRepeatablePaths();
1144
1157
  let hasInvalidComponents = false;
1145
1158
  this.webform.everyComponent((comp) => {
1146
- const path = comp.path;
1147
- if (repeatablePaths.includes(path)) {
1159
+ if (repeatablePathsComps.includes(comp.component)) {
1148
1160
  comp.setCustomValidity(this.t('apiKey', { key: comp.key }));
1149
1161
  hasInvalidComponents = true;
1150
1162
  }
@@ -75,6 +75,12 @@ class Components {
75
75
  if (comp.path) {
76
76
  comp.componentsMap[comp.path] = comp;
77
77
  }
78
+ // Reset the componentMatches on the root element if any new component is created.
79
+ let parent = comp.parent;
80
+ while (parent) {
81
+ parent.componentMatches = {};
82
+ parent = parent.parent;
83
+ }
78
84
  return comp;
79
85
  }
80
86
  }
@@ -108,6 +108,7 @@ export default class NestedComponent extends Field {
108
108
  * @returns {any} - The component that is located.
109
109
  */
110
110
  getComponent(path: string): any;
111
+ componentMatches: {} | undefined;
111
112
  /**
112
113
  * Return a component provided the Id of the component.
113
114
  * @param {string} id - The Id of the component.
@@ -311,6 +311,13 @@ class NestedComponent extends Field_1.default {
311
311
  */
312
312
  getComponent(path) {
313
313
  var _a;
314
+ // If the component is found
315
+ if (!this.componentMatches) {
316
+ this.componentMatches = {};
317
+ }
318
+ if (this.componentMatches && this.componentMatches[path]) {
319
+ return this.componentMatches[path];
320
+ }
314
321
  path = utils_1.default.getStringFromComponentPath(path);
315
322
  const matches = {
316
323
  path: undefined,
@@ -336,7 +343,8 @@ class NestedComponent extends Field_1.default {
336
343
  return match;
337
344
  });
338
345
  });
339
- return (_a = utils_1.default.getBestMatch(matches)) === null || _a === void 0 ? void 0 : _a.instance;
346
+ this.componentMatches[path] = (_a = utils_1.default.getBestMatch(matches)) === null || _a === void 0 ? void 0 : _a.instance;
347
+ return this.componentMatches[path];
340
348
  }
341
349
  /**
342
350
  * Return a component provided the Id of the component.
@@ -7,7 +7,7 @@ export default class ButtonComponent extends Field {
7
7
  weight: number;
8
8
  schema: any;
9
9
  };
10
- static savedValueTypes(schema: any): any;
10
+ static savedValueTypes(schema: any): string[];
11
11
  constructor(component: any, options: any, data: any);
12
12
  filesUploading: number;
13
13
  get inputInfo(): any;
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const lodash_1 = __importDefault(require("lodash"));
7
7
  const Field_1 = __importDefault(require("../_classes/field/Field"));
8
8
  const Input_1 = __importDefault(require("../_classes/input/Input"));
9
- const formUtils_1 = require("../../utils/formUtils");
9
+ const utils_1 = require("../../utils");
10
10
  class ButtonComponent extends Field_1.default {
11
11
  static schema(...extend) {
12
12
  return Input_1.default.schema({
@@ -35,7 +35,7 @@ class ButtonComponent extends Field_1.default {
35
35
  };
36
36
  }
37
37
  static savedValueTypes(schema) {
38
- return (0, formUtils_1.getComponentSavedTypes)(schema) || [formUtils_1.componentValueTypes.boolean];
38
+ return (0, utils_1.getComponentSavedTypes)(schema) || [utils_1.componentValueTypes.boolean];
39
39
  }
40
40
  constructor(component, options, data) {
41
41
  super(component, options, data);
@@ -306,7 +306,7 @@ class ButtonComponent extends Field_1.default {
306
306
  const form = this.getRoot();
307
307
  const flattened = {};
308
308
  const components = {};
309
- (0, formUtils_1.eachComponent)(form.components, (componentWrapper, path) => {
309
+ (0, utils_1.eachComponent)(form.components, (componentWrapper, path) => {
310
310
  const component = componentWrapper.component || componentWrapper;
311
311
  flattened[path] = component;
312
312
  components[component.key] = component;
@@ -447,7 +447,7 @@ class ButtonComponent extends Field_1.default {
447
447
  }, 100);
448
448
  }
449
449
  get oauthComponentPath() {
450
- const pathArray = (0, formUtils_1.getArrayFromComponentPath)(this.path);
450
+ const pathArray = (0, utils_1.getArrayFromComponentPath)(this.path);
451
451
  return lodash_1.default.chain(pathArray).filter(pathPart => !lodash_1.default.isNumber(pathPart)).join('.').value();
452
452
  }
453
453
  focus() {
@@ -1,5 +1,5 @@
1
1
  export default class DataMapComponent extends DataGridComponent {
2
- static savedValueTypes(schema: any): any;
2
+ static savedValueTypes(schema: any): string[];
3
3
  constructor(component: any, options: any, data: any);
4
4
  get schema(): any;
5
5
  get emptyValue(): {};
@@ -7,7 +7,7 @@ const Component_1 = __importDefault(require("../_classes/component/Component"));
7
7
  const DataGrid_1 = __importDefault(require("../datagrid/DataGrid"));
8
8
  const lodash_1 = __importDefault(require("lodash"));
9
9
  const eventemitter3_1 = __importDefault(require("eventemitter3"));
10
- const formUtils_1 = require("../../utils/formUtils");
10
+ const utils_1 = require("../../utils/utils");
11
11
  class DataMapComponent extends DataGrid_1.default {
12
12
  static schema(...extend) {
13
13
  return Component_1.default.schema({
@@ -50,7 +50,7 @@ class DataMapComponent extends DataGrid_1.default {
50
50
  return lodash_1.default.omit(schema, 'components');
51
51
  }
52
52
  static savedValueTypes(schema) {
53
- return (0, formUtils_1.getComponentSavedTypes)(schema) || [formUtils_1.componentValueTypes.object];
53
+ return (0, utils_1.getComponentSavedTypes)(schema) || [utils_1.componentValueTypes.object];
54
54
  }
55
55
  constructor(component, options, data) {
56
56
  super(component, options, data);
@@ -149,7 +149,7 @@ class DataMapComponent extends DataGrid_1.default {
149
149
  getRowKey(rowIndex) {
150
150
  const keys = Object.keys(this.dataValue);
151
151
  if (!keys[rowIndex]) {
152
- keys[rowIndex] = (0, formUtils_1.uniqueKey)(this.dataValue, this.defaultRowKey);
152
+ keys[rowIndex] = (0, utils_1.uniqueKey)(this.dataValue, this.defaultRowKey);
153
153
  }
154
154
  return keys[rowIndex];
155
155
  }
@@ -232,7 +232,7 @@ class DataMapComponent extends DataGrid_1.default {
232
232
  components['__key'] = this.createComponent(this.keySchema, options, { __key: this.builderMode ? this.defaultRowKey : key });
233
233
  components['__key'].on('componentChange', (event) => {
234
234
  const dataValue = this.dataValue;
235
- const newKey = (0, formUtils_1.uniqueKey)(dataValue, event.value);
235
+ const newKey = (0, utils_1.uniqueKey)(dataValue, event.value);
236
236
  dataValue[newKey] = dataValue[key];
237
237
  delete dataValue[key];
238
238
  const comp = components[this.valueKey];
package/lib/mjs/Embed.js CHANGED
@@ -14,7 +14,7 @@ export class Formio {
14
14
  Formio._formioReady = ready;
15
15
  Formio._formioReadyReject = reject;
16
16
  });
17
- static version = '5.2.0-rc.5';
17
+ static version = '5.2.0-rc.10';
18
18
  static setLicense(license, norecurse = false) {
19
19
  Formio.license = license;
20
20
  if (!norecurse && Formio.FormioClass) {
package/lib/mjs/Formio.js CHANGED
@@ -4,7 +4,7 @@ import CDN from './CDN';
4
4
  import Providers from './providers';
5
5
  FormioCore.cdn = new CDN();
6
6
  FormioCore.Providers = Providers;
7
- FormioCore.version = '5.2.0-rc.5';
7
+ FormioCore.version = '5.2.0-rc.10';
8
8
  CDN.defaultCDN = FormioCore.version.includes('rc') ? 'https://cdn.test-form.io' : 'https://cdn.form.io';
9
9
  const isNil = (val) => val === null || val === undefined;
10
10
  FormioCore.prototype.uploadFile = function (storage, file, fileName, dir, progressCallback, url, options, fileKey, groupPermissions, groupId, uploadStartCallback, abortCallback, multipartOptions) {
@@ -51,5 +51,6 @@ export default class PDFBuilder extends WebformBuilder {
51
51
  onDropzoneDrop(e: any): boolean;
52
52
  dropEvent: any;
53
53
  onDragEnd(e: any): void;
54
+ repeatablePathsComps: any[] | undefined;
54
55
  }
55
56
  import WebformBuilder from './WebformBuilder';
@@ -444,21 +444,21 @@ export default class PDFBuilder extends WebformBuilder {
444
444
  e.target.style.cursor = 'default';
445
445
  }
446
446
  highlightInvalidComponents() {
447
- const repeatablePaths = this.findRepeatablePaths();
447
+ const repeatablePathsComps = this.findComponentsWithRepeatablePaths();
448
448
  // update elements which path was duplicated if any pathes have been changed
449
- if (!_.isEqual(this.repeatablePaths, repeatablePaths)) {
450
- eachComponent(this.webform.getComponents(), (comp, path) => {
451
- if (this.repeatablePaths.includes(path)) {
449
+ if (!_.isEqual(this.repeatablePathsComps, repeatablePathsComps)) {
450
+ eachComponent(this.webform.getComponents(), (comp) => {
451
+ if (this.repeatablePathsComps.includes(comp.component)) {
452
452
  this.webform.postMessage({ name: 'updateElement', data: comp.component });
453
453
  }
454
454
  });
455
- this.repeatablePaths = repeatablePaths;
455
+ this.repeatablePathsComps = repeatablePathsComps;
456
456
  }
457
- if (!repeatablePaths.length) {
457
+ if (!repeatablePathsComps.length) {
458
458
  return;
459
459
  }
460
- eachComponent(this.webform.getComponents(), (comp, path) => {
461
- if (this.repeatablePaths.includes(path)) {
460
+ eachComponent(this.webform.getComponents(), (comp) => {
461
+ if (this.repeatablePathsComps.includes(comp)) {
462
462
  this.webform.postMessage({
463
463
  name: 'showBuilderErrors',
464
464
  data: {
@@ -77,7 +77,7 @@ export default class WebformBuilder extends Component {
77
77
  removeComponent(component: any, parent: any, original: any, componentInstance: any): boolean | undefined;
78
78
  replaceDoubleQuotes(data: any, fieldsToRemoveDoubleQuotes?: any[]): any;
79
79
  updateComponent(component: any, changed: any): void;
80
- findRepeatablePaths(): any[];
80
+ findComponentsWithRepeatablePaths(): any[];
81
81
  highlightInvalidComponents(): void;
82
82
  /**
83
83
  * Called when a new component is saved.
@@ -1110,25 +1110,36 @@ export default class WebformBuilder extends Component {
1110
1110
  // Called when we update a component.
1111
1111
  this.emit('updateComponent', component);
1112
1112
  }
1113
- findRepeatablePaths() {
1114
- const repeatablePaths = [];
1113
+ findComponentsWithRepeatablePaths() {
1114
+ const repeatablePaths = {};
1115
1115
  const keys = new Map();
1116
1116
  eachComponent(this.form.components, (comp, path, components, parent, paths) => {
1117
+ const isRadioCheckbox = comp.type === 'checkbox' && comp.inputType === 'radio';
1117
1118
  if (keys.has(paths.dataPath)) {
1118
- repeatablePaths.push(paths.dataPath);
1119
+ const onlyRadioCheckboxes = repeatablePaths[paths.dataPath]?.onlyRadioCheckboxes === false ? false : isRadioCheckbox;
1120
+ repeatablePaths[paths.dataPath] = {
1121
+ comps: [...(repeatablePaths[paths.dataPath]?.comps || []), keys.get(paths.dataPath), comp],
1122
+ onlyRadioCheckboxes,
1123
+ };
1119
1124
  }
1120
1125
  else {
1121
- keys.set(paths.dataPath, true);
1126
+ keys.set(paths.dataPath, comp);
1122
1127
  }
1123
1128
  }, true);
1124
- return repeatablePaths;
1129
+ const componentsWithRepeatablePaths = [];
1130
+ Object.keys(repeatablePaths).forEach((path) => {
1131
+ const { comps, onlyRadioCheckboxes } = repeatablePaths[path];
1132
+ if (!onlyRadioCheckboxes) {
1133
+ componentsWithRepeatablePaths.push(...comps);
1134
+ }
1135
+ });
1136
+ return componentsWithRepeatablePaths;
1125
1137
  }
1126
1138
  highlightInvalidComponents() {
1127
- const repeatablePaths = this.findRepeatablePaths();
1139
+ const repeatablePathsComps = this.findComponentsWithRepeatablePaths();
1128
1140
  let hasInvalidComponents = false;
1129
1141
  this.webform.everyComponent((comp) => {
1130
- const path = comp.path;
1131
- if (repeatablePaths.includes(path)) {
1142
+ if (repeatablePathsComps.includes(comp.component)) {
1132
1143
  comp.setCustomValidity(this.t('apiKey', { key: comp.key }));
1133
1144
  hasInvalidComponents = true;
1134
1145
  }
@@ -72,6 +72,12 @@ export default class Components {
72
72
  if (comp.path) {
73
73
  comp.componentsMap[comp.path] = comp;
74
74
  }
75
+ // Reset the componentMatches on the root element if any new component is created.
76
+ let parent = comp.parent;
77
+ while (parent) {
78
+ parent.componentMatches = {};
79
+ parent = parent.parent;
80
+ }
75
81
  return comp;
76
82
  }
77
83
  }
@@ -108,6 +108,7 @@ export default class NestedComponent extends Field {
108
108
  * @returns {any} - The component that is located.
109
109
  */
110
110
  getComponent(path: string): any;
111
+ componentMatches: {} | undefined;
111
112
  /**
112
113
  * Return a component provided the Id of the component.
113
114
  * @param {string} id - The Id of the component.
@@ -308,6 +308,13 @@ export default class NestedComponent extends Field {
308
308
  * @returns {any} - The component that is located.
309
309
  */
310
310
  getComponent(path) {
311
+ // If the component is found
312
+ if (!this.componentMatches) {
313
+ this.componentMatches = {};
314
+ }
315
+ if (this.componentMatches && this.componentMatches[path]) {
316
+ return this.componentMatches[path];
317
+ }
311
318
  path = FormioUtils.getStringFromComponentPath(path);
312
319
  const matches = {
313
320
  path: undefined,
@@ -332,7 +339,8 @@ export default class NestedComponent extends Field {
332
339
  return match;
333
340
  });
334
341
  });
335
- return FormioUtils.getBestMatch(matches)?.instance;
342
+ this.componentMatches[path] = FormioUtils.getBestMatch(matches)?.instance;
343
+ return this.componentMatches[path];
336
344
  }
337
345
  /**
338
346
  * Return a component provided the Id of the component.
@@ -7,7 +7,7 @@ export default class ButtonComponent extends Field {
7
7
  weight: number;
8
8
  schema: any;
9
9
  };
10
- static savedValueTypes(schema: any): any;
10
+ static savedValueTypes(schema: any): string[];
11
11
  constructor(component: any, options: any, data: any);
12
12
  filesUploading: number;
13
13
  get inputInfo(): any;
@@ -1,7 +1,7 @@
1
1
  import _ from 'lodash';
2
2
  import Field from '../_classes/field/Field';
3
3
  import Input from '../_classes/input/Input';
4
- import { componentValueTypes, eachComponent, getArrayFromComponentPath, getComponentSavedTypes } from '../../utils/formUtils';
4
+ import { componentValueTypes, eachComponent, getArrayFromComponentPath, getComponentSavedTypes } from '../../utils';
5
5
  export default class ButtonComponent extends Field {
6
6
  static schema(...extend) {
7
7
  return Input.schema({
@@ -1,5 +1,5 @@
1
1
  export default class DataMapComponent extends DataGridComponent {
2
- static savedValueTypes(schema: any): any;
2
+ static savedValueTypes(schema: any): string[];
3
3
  constructor(component: any, options: any, data: any);
4
4
  get schema(): any;
5
5
  get emptyValue(): {};
@@ -2,7 +2,7 @@ import Component from '../_classes/component/Component';
2
2
  import DataGridComponent from '../datagrid/DataGrid';
3
3
  import _ from 'lodash';
4
4
  import EventEmitter from 'eventemitter3';
5
- import { componentValueTypes, getComponentSavedTypes, uniqueKey } from '../../utils/formUtils';
5
+ import { componentValueTypes, getComponentSavedTypes, uniqueKey } from '../../utils/utils';
6
6
  export default class DataMapComponent extends DataGridComponent {
7
7
  static schema(...extend) {
8
8
  return Component.schema({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formio/js",
3
- "version": "5.2.0-dev.6141.ebbe6dc",
3
+ "version": "5.2.0-rc.10",
4
4
  "description": "JavaScript powered Forms with JSON Form Builder",
5
5
  "main": "lib/cjs/index.js",
6
6
  "exports": {
@@ -81,7 +81,7 @@
81
81
  "dependencies": {
82
82
  "@formio/bootstrap": "3.1.1",
83
83
  "@formio/choices.js": "^10.2.1",
84
- "@formio/core": "2.5.0-rc.3",
84
+ "@formio/core": "2.5.0-rc.5",
85
85
  "@formio/text-mask-addons": "^3.8.0-formio.4",
86
86
  "@formio/vanilla-text-mask": "^5.1.1-formio.1",
87
87
  "abortcontroller-polyfill": "^1.7.5",