@formio/js 5.0.0-dev.5772.7636454 → 5.0.0-dev.5778.eb7f268

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.
@@ -403,6 +403,7 @@ class PDFBuilder extends WebformBuilder_1.default {
403
403
  return false;
404
404
  }
405
405
  onDragEnd(e) {
406
+ var _a;
406
407
  // IMPORTANT - must retrieve offsets BEFORE disabling the dropzone - offsets will
407
408
  // reflect absolute positioning if accessed after the target element is hidden
408
409
  const iframeRect = this.webform.refs.iframeContainer.getBoundingClientRect();
@@ -435,7 +436,7 @@ class PDFBuilder extends WebformBuilder_1.default {
435
436
  lodash_1.default.merge(schema, info);
436
437
  }
437
438
  // Set a unique key for this component.
438
- builder_1.default.uniquify([this.webform._form], schema);
439
+ builder_1.default.uniquify(((_a = this.webform._form) === null || _a === void 0 ? void 0 : _a.components) || [], schema);
439
440
  this.webform._form.components.push(schema);
440
441
  schema.overlay = {
441
442
  top: layerY ? (layerY - this.itemOffsetY + HEIGHT) : (e.clientY - iframeRect.top - (this.itemOffsetY - HEIGHT) * 2),
@@ -436,7 +436,7 @@ class DataGridComponent extends NestedArrayComponent_1.default {
436
436
  }
437
437
  removeRow(index) {
438
438
  const makeEmpty = index === 0 && this.rows.length === 1;
439
- const flags = { isReordered: !makeEmpty, resetValue: makeEmpty };
439
+ const flags = { isReordered: !makeEmpty, resetValue: makeEmpty, modified: true };
440
440
  this.splice(index, flags);
441
441
  this.emit('dataGridDeleteRow', { index });
442
442
  const [row] = this.rows.splice(index, 1);
@@ -429,7 +429,7 @@ export default class PDFBuilder extends WebformBuilder {
429
429
  _.merge(schema, info);
430
430
  }
431
431
  // Set a unique key for this component.
432
- BuilderUtils.uniquify([this.webform._form], schema);
432
+ BuilderUtils.uniquify(this.webform._form?.components || [], schema);
433
433
  this.webform._form.components.push(schema);
434
434
  schema.overlay = {
435
435
  top: layerY ? (layerY - this.itemOffsetY + HEIGHT) : (e.clientY - iframeRect.top - (this.itemOffsetY - HEIGHT) * 2),
@@ -432,7 +432,7 @@ export default class DataGridComponent extends NestedArrayComponent {
432
432
  }
433
433
  removeRow(index) {
434
434
  const makeEmpty = index === 0 && this.rows.length === 1;
435
- const flags = { isReordered: !makeEmpty, resetValue: makeEmpty };
435
+ const flags = { isReordered: !makeEmpty, resetValue: makeEmpty, modified: true };
436
436
  this.splice(index, flags);
437
437
  this.emit('dataGridDeleteRow', { index });
438
438
  const [row] = this.rows.splice(index, 1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formio/js",
3
- "version": "5.0.0-dev.5772.7636454",
3
+ "version": "5.0.0-dev.5778.eb7f268",
4
4
  "description": "JavaScript powered Forms with JSON Form Builder",
5
5
  "main": "lib/cjs/index.js",
6
6
  "exports": {
@@ -90,7 +90,7 @@
90
90
  "browser-cookies": "^1.2.0",
91
91
  "browser-md5-file": "^1.1.1",
92
92
  "compare-versions": "^6.1.1",
93
- "core-js": "^3.37.1",
93
+ "core-js": "^3.38.0",
94
94
  "dialog-polyfill": "^0.5.6",
95
95
  "dom-autoscroller": "^2.3.4",
96
96
  "dompurify": "^3.1.6",