formeo 3.0.2 → 3.0.3

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.1
4
+ Version: 3.0.2
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.1";
437
+ const version$2 = "3.0.2";
438
438
  const type = "module";
439
439
  const main = "dist/formeo.cjs.js";
440
440
  const module = "dist/formeo.es.js";
@@ -9739,7 +9739,7 @@ let FormeoEditor$1 = class FormeoEditor {
9739
9739
  * @return {Promise} asynchronously loaded remote resources
9740
9740
  */
9741
9741
  async loadResources() {
9742
- var _a, _b, _c;
9742
+ var _a;
9743
9743
  document.removeEventListener("DOMContentLoaded", this.loadResources);
9744
9744
  const promises = [];
9745
9745
  if (this.opts.polyfills) {
@@ -9748,11 +9748,10 @@ let FormeoEditor$1 = class FormeoEditor {
9748
9748
  await fetchIcons(this.opts.svgSprite);
9749
9749
  promises.push(fetchFormeoStyle(this.opts.style));
9750
9750
  promises.push(mi18n.init({ ...this.opts.i18n, locale: (_a = window.sessionStorage) == null ? void 0 : _a.getItem(SESSION_LOCALE_KEY) }));
9751
+ const resolvedPromises = await Promise.all(promises);
9751
9752
  if (this.opts.allowEdit) {
9752
- promises.push(this.init());
9753
+ this.init();
9753
9754
  }
9754
- const resolvedPromises = await Promise.all(promises);
9755
- (_c = (_b = this.opts).onLoad) == null ? void 0 : _c.call(_b, this);
9756
9755
  return resolvedPromises;
9757
9756
  }
9758
9757
  /**
@@ -9762,13 +9761,14 @@ let FormeoEditor$1 = class FormeoEditor {
9762
9761
  */
9763
9762
  init() {
9764
9763
  return Controls$2.init(this.opts.controls, this.opts.stickyControls).then((controls) => {
9764
+ var _a, _b;
9765
9765
  this.controls = controls;
9766
9766
  this.load(this.userFormData, this.opts);
9767
9767
  this.formId = components.get("id");
9768
9768
  this.i18n = {
9769
9769
  setLang: (formeoLocale) => {
9770
- var _a;
9771
- (_a = window.sessionStorage) == null ? void 0 : _a.setItem(SESSION_LOCALE_KEY, formeoLocale);
9770
+ var _a2;
9771
+ (_a2 = window.sessionStorage) == null ? void 0 : _a2.setItem(SESSION_LOCALE_KEY, formeoLocale);
9772
9772
  const loadLang = mi18n.setCurrent(formeoLocale);
9773
9773
  loadLang.then(() => {
9774
9774
  this.init();
@@ -9776,6 +9776,7 @@ let FormeoEditor$1 = class FormeoEditor {
9776
9776
  }
9777
9777
  };
9778
9778
  this.render();
9779
+ (_b = (_a = this.opts).onLoad) == null ? void 0 : _b.call(_a, this);
9779
9780
  });
9780
9781
  }
9781
9782
  load(formData = this.userFormData, opts = this.opts) {
@@ -1,7 +1,7 @@
1
1
 
2
2
  /**
3
3
  formeo - https://formeo.io
4
- Version: 3.0.1
4
+ Version: 3.0.2
5
5
  Author: Draggable https://draggable.io
6
6
  */
7
7