formeo 3.0.6 → 3.0.7

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/dist/formeo.es.js CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
2
  /**
3
3
  formeo - https://formeo.io
4
- Version: 3.0.5
4
+ Version: 3.0.6
5
5
  Author: Draggable https://draggable.io
6
6
  */
7
7
 
@@ -434,7 +434,7 @@ if (window !== void 0) {
434
434
  window.SmartTooltip = SmartTooltip;
435
435
  }
436
436
  const name$1 = "formeo";
437
- const version$2 = "3.0.5";
437
+ const version$2 = "3.0.6";
438
438
  const type = "module";
439
439
  const main = "dist/formeo.cjs.js";
440
440
  const module = "dist/formeo.es.js";
@@ -1821,6 +1821,7 @@ function parseData(data = /* @__PURE__ */ Object.create(null)) {
1821
1821
  }
1822
1822
  return data;
1823
1823
  }
1824
+ const cleanFormData = (formData) => formData ? clone$1(parseData(formData)) : {};
1824
1825
  var baseGetTag$1 = _baseGetTag, isObjectLike$1 = isObjectLike_1;
1825
1826
  var symbolTag$1 = "[object Symbol]";
1826
1827
  function isSymbol$3(value) {
@@ -9712,13 +9713,17 @@ let FormeoEditor$1 = class FormeoEditor {
9712
9713
  this.opts = opts;
9713
9714
  dom.setOptions = opts;
9714
9715
  components.config = config2;
9715
- this.userFormData = userFormData || formData;
9716
+ this.userFormData = cleanFormData(userFormData || formData);
9716
9717
  this.Components = components;
9717
9718
  this.dom = dom;
9718
9719
  events.init({ debug, ...events$1 });
9719
9720
  actions.init({ debug, sessionStorage: opts.sessionStorage, ...actions$1 });
9720
9721
  this.tooltip = new SmartTooltip();
9721
- document.addEventListener("DOMContentLoaded", this.loadResources.bind(this));
9722
+ if (document.readyState === "loading") {
9723
+ document.addEventListener("DOMContentLoaded", this.loadResources.bind(this));
9724
+ } else {
9725
+ this.loadResources();
9726
+ }
9722
9727
  }
9723
9728
  get formData() {
9724
9729
  return this.Components.formData;
@@ -9818,7 +9823,6 @@ let FormeoEditor$1 = class FormeoEditor {
9818
9823
  }
9819
9824
  };
9820
9825
  const RENDER_PREFIX = "f-";
9821
- const cleanFormData = (formData) => formData ? clone$1(parseData(formData)) : {};
9822
9826
  const containerLookup = (container) => typeof container === "string" ? document.querySelector(container) : container;
9823
9827
  const processOptions = ({ editorContainer, renderContainer, formData, ...opts }) => {
9824
9828
  const processedOptions = {
@@ -1,7 +1,7 @@
1
1
 
2
2
  /**
3
3
  formeo - https://formeo.io
4
- Version: 3.0.5
4
+ Version: 3.0.6
5
5
  Author: Draggable https://draggable.io
6
6
  */
7
7