formeo 5.1.0 → 5.1.1

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.
Binary file
@@ -1,7 +1,7 @@
1
1
 
2
2
  /**
3
3
  formeo - https://formeo.io
4
- Version: 5.0.3
4
+ Version: 5.1.0
5
5
  Author: Draggable https://draggable.io
6
6
  */
7
7
 
@@ -1,7 +1,7 @@
1
1
 
2
2
  /**
3
3
  formeo - https://formeo.io
4
- Version: 5.0.3
4
+ Version: 5.1.0
5
5
  Author: Draggable https://draggable.io
6
6
  */
7
7
 
@@ -6061,7 +6061,7 @@ if (globalThis !== void 0) globalThis.SmartTooltip = SmartTooltip;
6061
6061
  var name$1, version$2, type, main, module$1, unpkg, exports$1, files, homepage, repository, author, contributors, bugs, description, keywords, ignore, config, scripts, devDependencies, dependencies, release, commitlint, package_default;
6062
6062
  var init_package = __esmMin((() => {
6063
6063
  name$1 = "formeo";
6064
- version$2 = "5.0.3";
6064
+ version$2 = "5.1.0";
6065
6065
  type = "module";
6066
6066
  main = "dist/formeo.cjs.js";
6067
6067
  module$1 = "dist/formeo.es.js";
@@ -11981,7 +11981,7 @@ var init_helpers$2 = __esmMin((() => {
11981
11981
  }));
11982
11982
  //#endregion
11983
11983
  //#region src/lib/js/common/loaders.js
11984
- var loaded, ajax, onLoadStylesheet, onLoadJavascript, insertScript, insertStyle, insertScripts, insertStyles, insertIcons, fetchIcons, LOADER_MAP, fetchDependencies, fetchFormeoStyle;
11984
+ var loaded, AJAX_TIMEOUT_MS, ajax, onLoadStylesheet, onLoadJavascript, insertScript, insertStyle, insertScripts, insertStyles, insertIcons, fetchIcons, LOADER_MAP, fetchDependencies, fetchFormeoStyle;
11985
11985
  var init_loaders = __esmMin((() => {
11986
11986
  init_constants();
11987
11987
  init_dom();
@@ -11991,12 +11991,14 @@ var init_loaders = __esmMin((() => {
11991
11991
  css: /* @__PURE__ */ new Set(),
11992
11992
  formeoSprite: null
11993
11993
  };
11994
- ajax = (fileUrl, callback, onError = noop) => {
11994
+ AJAX_TIMEOUT_MS = 1e4;
11995
+ ajax = (fileUrl, callback, onError = noop, timeoutMs = AJAX_TIMEOUT_MS) => {
11995
11996
  return new Promise((resolve) => {
11996
- return fetch(fileUrl).then((data) => {
11997
+ const signal = typeof AbortSignal !== "undefined" && AbortSignal.timeout ? AbortSignal.timeout(timeoutMs) : void 0;
11998
+ return fetch(fileUrl, signal ? { signal } : void 0).then((data) => {
11997
11999
  if (!data.ok) return resolve(onError(data));
11998
12000
  resolve(callback ? callback(data) : data);
11999
- }).catch((err) => onError(err));
12001
+ }).catch((err) => resolve(onError(err)));
12000
12002
  });
12001
12003
  };
12002
12004
  onLoadStylesheet = (elem, cb) => {
@@ -1,7 +1,7 @@
1
1
 
2
2
  /**
3
3
  formeo - https://formeo.io
4
- Version: 5.0.3
4
+ Version: 5.1.0
5
5
  Author: Draggable https://draggable.io
6
6
  */
7
7
 
@@ -6060,7 +6060,7 @@ if (globalThis !== void 0) globalThis.SmartTooltip = SmartTooltip;
6060
6060
  var name$1, version$2, type, main, module$1, unpkg, exports$1, files, homepage, repository, author, contributors, bugs, description, keywords, ignore, config, scripts, devDependencies, dependencies, release, commitlint, package_default;
6061
6061
  var init_package = __esmMin((() => {
6062
6062
  name$1 = "formeo";
6063
- version$2 = "5.0.3";
6063
+ version$2 = "5.1.0";
6064
6064
  type = "module";
6065
6065
  main = "dist/formeo.cjs.js";
6066
6066
  module$1 = "dist/formeo.es.js";
@@ -11980,7 +11980,7 @@ var init_helpers$2 = __esmMin((() => {
11980
11980
  }));
11981
11981
  //#endregion
11982
11982
  //#region src/lib/js/common/loaders.js
11983
- var loaded, ajax, onLoadStylesheet, onLoadJavascript, insertScript, insertStyle, insertScripts, insertStyles, insertIcons, fetchIcons, LOADER_MAP, fetchDependencies, fetchFormeoStyle;
11983
+ var loaded, AJAX_TIMEOUT_MS, ajax, onLoadStylesheet, onLoadJavascript, insertScript, insertStyle, insertScripts, insertStyles, insertIcons, fetchIcons, LOADER_MAP, fetchDependencies, fetchFormeoStyle;
11984
11984
  var init_loaders = __esmMin((() => {
11985
11985
  init_constants();
11986
11986
  init_dom();
@@ -11990,12 +11990,14 @@ var init_loaders = __esmMin((() => {
11990
11990
  css: /* @__PURE__ */ new Set(),
11991
11991
  formeoSprite: null
11992
11992
  };
11993
- ajax = (fileUrl, callback, onError = noop) => {
11993
+ AJAX_TIMEOUT_MS = 1e4;
11994
+ ajax = (fileUrl, callback, onError = noop, timeoutMs = AJAX_TIMEOUT_MS) => {
11994
11995
  return new Promise((resolve) => {
11995
- return fetch(fileUrl).then((data) => {
11996
+ const signal = typeof AbortSignal !== "undefined" && AbortSignal.timeout ? AbortSignal.timeout(timeoutMs) : void 0;
11997
+ return fetch(fileUrl, signal ? { signal } : void 0).then((data) => {
11996
11998
  if (!data.ok) return resolve(onError(data));
11997
11999
  resolve(callback ? callback(data) : data);
11998
- }).catch((err) => onError(err));
12000
+ }).catch((err) => resolve(onError(err)));
11999
12001
  });
12000
12002
  };
12001
12003
  onLoadStylesheet = (elem, cb) => {