@bbn/bbn 1.0.83 → 1.0.85

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/bundle.js CHANGED
@@ -2131,7 +2131,7 @@
2131
2131
  * @memberof bbn.fn
2132
2132
  *
2133
2133
  * @param {String} requestId The unique ID of the request sent
2134
- * @param {*} res The result of the request
2134
+ * @param {String|Object} res The result of the request
2135
2135
  * @param {Boolean} isAbort True if the deletion comes from abortion
2136
2136
  *
2137
2137
  * @returns {Boolean} True if the loader was found
@@ -2196,7 +2196,7 @@
2196
2196
  *
2197
2197
  * @param {String} requestId The unique ID of the request as used in bbn.env.loaders
2198
2198
  *
2199
- * @returns {false|Object} The corresponding loader Object if it exists, false otherwise
2199
+ * @returns {null|Object} The corresponding loader Object if it exists, false otherwise
2200
2200
  */
2201
2201
  const getLoader = function (requestId) {
2202
2202
  let idx = (0, search_3.search)(bbn.env.loaders, { key: requestId });
@@ -3105,7 +3105,7 @@
3105
3105
  *
3106
3106
  * @returns {Promise} The Promise created by the generated XHR.
3107
3107
  */
3108
- const ajax = function (url, datatype, data, success, failure, abort) {
3108
+ const ajax = function (url, datatype = null, data = null, success = null, failure = null, abort = null) {
3109
3109
  if (arguments.length === 1 && url && typeof url === "object" && url.url) {
3110
3110
  if (url.abort) {
3111
3111
  abort = url.abort;
@@ -3151,7 +3151,7 @@
3151
3151
  cancelToken: source.token,
3152
3152
  };
3153
3153
  if (datatype === "text") {
3154
- options.headers = {
3154
+ options['headers'] = {
3155
3155
  accept: "text/javascript",
3156
3156
  "Content-Type": "text/javascript",
3157
3157
  };
@@ -3728,7 +3728,7 @@
3728
3728
  *
3729
3729
  * @returns {*} The result of the main callback function: res.script, fn, or bbn.fn.defaultLinkFunction
3730
3730
  */
3731
- const callback = function (url, res, fn = null, fn2 = null, ele = null) {
3731
+ const callback = function (url, res = null, fn = null, fn2 = null, ele = null) {
3732
3732
  let tmp = false;
3733
3733
  if (res) {
3734
3734
  tmp = true;
@@ -4926,7 +4926,7 @@
4926
4926
  *
4927
4927
  * @returns {undefined}
4928
4928
  */
4929
- const downloadContent = function (filename, content, type) {
4929
+ const downloadContent = function (filename, content, type = null) {
4930
4930
  if ((0, isCanvas_1.isCanvas)(content)) {
4931
4931
  content.toBlob((blob) => {
4932
4932
  // blob ready, download it
@@ -6420,7 +6420,7 @@
6420
6420
  * @global
6421
6421
  * @memberof bbn.fn
6422
6422
  * @param {HTMLElement} img
6423
- * @returns
6423
+ * @returns {HTMLCanvasElement}
6424
6424
  */
6425
6425
  const imageToCanvas = function (img) {
6426
6426
  let canvas = document.createElement('canvas');
@@ -6437,7 +6437,6 @@
6437
6437
  exports.imgToBase64 = void 0;
6438
6438
  const imgToBase64 = function (img, type = 'image/png') {
6439
6439
  let canvas = (0, imageToCanvas_1.imageToCanvas)(img);
6440
- //return canvasToImage(canvas);
6441
6440
  return canvas.toDataURL(type);
6442
6441
  };
6443
6442
  exports.imgToBase64 = imgToBase64;
@@ -6532,62 +6531,63 @@
6532
6531
  t = t.toLowerCase();
6533
6532
  /* Callbacks */
6534
6533
  if ((0, isFunction_8.isFunction)(args[i])) {
6535
- if (cfg.errorFn && !cfg.abortFn) {
6536
- cfg.abortFn = args[i];
6534
+ if (cfg["errorFn"] && !cfg["abortFn"]) {
6535
+ cfg["abortFn"] = args[i];
6537
6536
  }
6538
- if (cfg.successFn && !cfg.errorFn) {
6539
- cfg.errorFn = args[i];
6537
+ if (cfg["successFn"] && !cfg["errorFn"]) {
6538
+ cfg["errorFn"] = args[i];
6540
6539
  }
6541
- else if (!cfg.successFn) {
6542
- cfg.successFn = args[i];
6540
+ else if (!cfg["successFn"]) {
6541
+ cfg["successFn"] = args[i];
6543
6542
  }
6544
6543
  }
6545
6544
  else if (args[i] === 1 || args[i] === true) {
6546
6545
  /* Force */
6547
- cfg.force = true;
6546
+ cfg["force"] = true;
6548
6547
  }
6549
- else if (t === 'string') {
6550
- if (!cfg.url) {
6548
+ else if (t === "string") {
6549
+ if (!cfg["url"]) {
6551
6550
  /* Hash */
6552
- if (args[i].indexOf('#') === 0 || args[i].indexOf(bbn.env.root + '#') === 0) {
6553
- cfg.url = (0, substr_9.substr)(args[i], bbn.env.root.length);
6551
+ if (args[i].indexOf("#") === 0 ||
6552
+ args[i].indexOf(bbn.env.root + "#") === 0) {
6553
+ cfg["url"] = (0, substr_9.substr)(args[i], bbn.env.root.length);
6554
6554
  }
6555
6555
  else {
6556
6556
  /* Link */
6557
- cfg.url = args[i];
6558
- if (cfg.url.indexOf(bbn.env.root) === 0) {
6559
- cfg.url = (0, substr_9.substr)(cfg.url, bbn.env.root.length);
6557
+ cfg["url"] = args[i];
6558
+ if (cfg["url"].indexOf(bbn.env.root) === 0) {
6559
+ cfg["url"] = (0, substr_9.substr)(cfg["url"], bbn.env.root.length);
6560
6560
  }
6561
6561
  }
6562
6562
  }
6563
6563
  else {
6564
6564
  /* Ajax datatype */
6565
- cfg.datatype = args[i];
6565
+ cfg["datatype"] = args[i];
6566
6566
  }
6567
6567
  }
6568
- else if (args[i] && t === 'object') {
6568
+ else if (args[i] && t === "object") {
6569
6569
  /* Event */
6570
6570
  if (args[i] instanceof Event) {
6571
- cfg.e = args[i];
6571
+ cfg["e"] = args[i];
6572
6572
  }
6573
- else if (!cfg.ele && args[i].nodeType === 1) {
6573
+ else if (!cfg["ele"] && args[i].nodeType === 1) {
6574
6574
  /* HTML Element */
6575
- cfg.ele = args[i];
6575
+ cfg["ele"] = args[i];
6576
6576
  }
6577
- else if (t.toLowerCase() === 'object') {
6577
+ else if (t.toLowerCase() === "object") {
6578
6578
  /* An object to post */
6579
- cfg.obj = args[i];
6579
+ cfg["obj"] = args[i];
6580
6580
  }
6581
6581
  }
6582
6582
  }
6583
- if (!cfg.url && (0, numProperties_6.numProperties)(cfg)) {
6584
- cfg.url = bbn.env.path;
6583
+ if (!cfg["url"] && (0, numProperties_6.numProperties)(cfg)) {
6584
+ cfg["url"] = bbn.env.path;
6585
6585
  }
6586
- if (cfg.obj === undefined) {
6587
- cfg.obj = { _bbn: 'public' };
6586
+ if (cfg["obj"] === undefined) {
6587
+ cfg["obj"] = { _bbn: "public" };
6588
6588
  }
6589
- if (!cfg.datatype) {
6590
- cfg.datatype = 'json';
6589
+ if (!cfg["datatype"]) {
6590
+ cfg["datatype"] = "json";
6591
6591
  }
6592
6592
  return cfg;
6593
6593
  };
@@ -6618,9 +6618,9 @@
6618
6618
  * @param {Object} data The data if any
6619
6619
  * @param {Boolean} repl If true the history state object will replace the current one, will be added otherwise
6620
6620
  *
6621
- * @returns {undefined}
6621
+ * @returns {void}
6622
6622
  */
6623
- const setNavigationVars = function (url, title, data, repl) {
6623
+ const setNavigationVars = function (url, title, data = null, repl = false) {
6624
6624
  // Current path becomes old path
6625
6625
  bbn.env.old_path = bbn.env.path;
6626
6626
  // URL includes the domain
@@ -6704,7 +6704,7 @@
6704
6704
  */
6705
6705
  const link = function (...args) {
6706
6706
  let cfg = (0, treatAjaxArguments_1.treatAjaxArguments)(args);
6707
- let ok = true;
6707
+ let ok = 1;
6708
6708
  /* If we can't find a correct link we load the current URL */
6709
6709
  if (!cfg) {
6710
6710
  return link(window.location.href);
@@ -6756,9 +6756,9 @@
6756
6756
  ok = cfg.successFn(cfg.url);
6757
6757
  }
6758
6758
  else if (bbn.fn.defaultPreLinkFunction) {
6759
- ok = bbn.fn.defaultPreLinkFunction(cfg.url, cfg.force, cfg.ele);
6760
- if (ok.data !== undefined) {
6761
- (0, extend_6.extend)(cfg.obj, ok.data);
6759
+ let tmp = bbn.fn.defaultPreLinkFunction(cfg.url, cfg.force, cfg.ele);
6760
+ if (tmp.data !== undefined) {
6761
+ (0, extend_6.extend)(cfg.obj, tmp.data);
6762
6762
  ok = 1;
6763
6763
  }
6764
6764
  }
@@ -7459,7 +7459,7 @@
7459
7459
  *
7460
7460
  * @returns {Boolean} True if focused
7461
7461
  */
7462
- const isFocused = function (ele, contain) {
7462
+ const isFocused = function (ele, contain = false) {
7463
7463
  return ele === document.activeElement || (contain && ele.contains && ele.contains(document.activeElement));
7464
7464
  };
7465
7465
  exports.isFocused = isFocused;
@@ -8595,7 +8595,61 @@
8595
8595
  };
8596
8596
  exports.pickValue = pickValue;
8597
8597
  });
8598
- define("fn/ajax/postOut", ["require", "exports", "fn/object/createObject", "fn/form/addInputs"], function (require, exports, createObject_3, addInputs_1) {
8598
+ define("fn/object/setProperty", ["require", "exports", "fn/loop/each"], function (require, exports, each_22) {
8599
+ "use strict";
8600
+ Object.defineProperty(exports, "__esModule", { value: true });
8601
+ exports.setProperty = void 0;
8602
+ /**
8603
+ * Returns the value of the given property from the given object.
8604
+ *
8605
+ * Looks for the given property in the given object, accepting dot (.) separator
8606
+ * for deep property access, and returns its value if found and undefined otherwise.
8607
+ *
8608
+ * @method getProperty
8609
+ * @global
8610
+ * @example
8611
+ * ```javascript
8612
+ * bbn.fn.getProperty({a: 1, b: 2}, 'b');
8613
+ * // 2
8614
+ * ```
8615
+ * @example
8616
+ * ```javascript
8617
+ * bbn.fn.getProperty({a: 1, b: {o: {a: 33, h: 5}}}, 'b.o.a');
8618
+ * // 33
8619
+ * ```
8620
+ * @example
8621
+ * ```javascript
8622
+ * bbn.fn.getProperty({a: 1, b: {o: {a: 33, h: 5}}}, 'b.h.a');
8623
+ * // undefined
8624
+ * ```
8625
+ * @memberof bbn.fn
8626
+ * @param {Object} obj
8627
+ * @param {String} prop
8628
+ * @returns {*} The property's value or undefined
8629
+ */
8630
+ const setProperty = function (obj, prop, value, force) {
8631
+ if (typeof obj === 'object' && typeof prop === 'string') {
8632
+ let o = obj;
8633
+ const bits = prop.split('.');
8634
+ (0, each_22.each)(bits, (v, i) => {
8635
+ if (!o) {
8636
+ if (!force) {
8637
+ throw new Error(bbn._('The object is invalid'));
8638
+ }
8639
+ o = {};
8640
+ }
8641
+ if (bits.length - 1 === i) {
8642
+ o[v] = value;
8643
+ }
8644
+ else {
8645
+ o = o[v];
8646
+ }
8647
+ });
8648
+ }
8649
+ };
8650
+ exports.setProperty = setProperty;
8651
+ });
8652
+ define("fn/ajax/postOut", ["require", "exports", "fn/object/createObject", "fn/form/addInputs", "fn/object/setProperty"], function (require, exports, createObject_3, addInputs_1, setProperty_1) {
8599
8653
  "use strict";
8600
8654
  Object.defineProperty(exports, "__esModule", { value: true });
8601
8655
  exports.postOut = void 0;
@@ -8616,33 +8670,35 @@
8616
8670
  * @param {Function} success A function to execute in case of success
8617
8671
  * @param {String} target The target attribute of the form
8618
8672
  *
8619
- * @returns {undefined}
8673
+ * @returns {void}
8620
8674
  */
8621
- const postOut = function (url, data, success, target) {
8622
- let form = document.body.querySelector('form#bbn-form_out');
8675
+ const postOut = function (url, data, success = null, target = "") {
8676
+ let form = document.body.querySelector("form#bbn-form_out");
8623
8677
  if (!form) {
8624
- form = document.createElement('form');
8625
- form.classList.add('bbn-no');
8626
- form.setAttribute('id', 'bbn-form_out');
8627
- form.setAttribute('method', 'post');
8628
- form.setAttribute('enctype', 'multipart/form-data-encoded');
8629
- form.style.display = 'none';
8678
+ form = document.createElement("form");
8679
+ form.classList.add("bbn-no");
8680
+ form.setAttribute("id", "bbn-form_out");
8681
+ form.setAttribute("method", "post");
8682
+ form.setAttribute("enctype", "multipart/form-data-encoded");
8683
+ (0, setProperty_1.setProperty)(form, "style.display", "none");
8630
8684
  document.body.appendChild(form);
8631
8685
  }
8632
- form.innerHTML = '';
8633
- form.setAttribute('action', url);
8634
- form.setAttribute('target', target || '_blank');
8635
- if (!data) {
8636
- data = {};
8637
- }
8638
- data = (0, createObject_3.createObject)(data);
8639
- if (!data.bbn) {
8640
- data.bbn = 'public';
8641
- }
8642
- (0, addInputs_1.addInputs)(form, data);
8643
- form.submit();
8644
- if (success) {
8645
- success();
8686
+ if (form instanceof HTMLFormElement) {
8687
+ form.innerHTML = "";
8688
+ form.setAttribute("action", url);
8689
+ form.setAttribute("target", target || "_blank");
8690
+ if (!data) {
8691
+ data = {};
8692
+ }
8693
+ data = (0, createObject_3.createObject)(data);
8694
+ if (!data.bbn) {
8695
+ data.bbn = "public";
8696
+ }
8697
+ (0, addInputs_1.addInputs)(form, data);
8698
+ form.submit();
8699
+ if (success) {
8700
+ success();
8701
+ }
8646
8702
  }
8647
8703
  };
8648
8704
  exports.postOut = postOut;
@@ -9140,7 +9196,7 @@
9140
9196
  *
9141
9197
  * @returns {Boolean} True if focused
9142
9198
  */
9143
- const selectElementText = function (ele, win) {
9199
+ const selectElementText = function (ele, win = null) {
9144
9200
  win = win || window;
9145
9201
  if (ele instanceof HTMLInputElement) {
9146
9202
  ele.select();
@@ -9235,60 +9291,6 @@
9235
9291
  };
9236
9292
  exports.setProp = setProp;
9237
9293
  });
9238
- define("fn/object/setProperty", ["require", "exports", "fn/loop/each"], function (require, exports, each_22) {
9239
- "use strict";
9240
- Object.defineProperty(exports, "__esModule", { value: true });
9241
- exports.setProperty = void 0;
9242
- /**
9243
- * Returns the value of the given property from the given object.
9244
- *
9245
- * Looks for the given property in the given object, accepting dot (.) separator
9246
- * for deep property access, and returns its value if found and undefined otherwise.
9247
- *
9248
- * @method getProperty
9249
- * @global
9250
- * @example
9251
- * ```javascript
9252
- * bbn.fn.getProperty({a: 1, b: 2}, 'b');
9253
- * // 2
9254
- * ```
9255
- * @example
9256
- * ```javascript
9257
- * bbn.fn.getProperty({a: 1, b: {o: {a: 33, h: 5}}}, 'b.o.a');
9258
- * // 33
9259
- * ```
9260
- * @example
9261
- * ```javascript
9262
- * bbn.fn.getProperty({a: 1, b: {o: {a: 33, h: 5}}}, 'b.h.a');
9263
- * // undefined
9264
- * ```
9265
- * @memberof bbn.fn
9266
- * @param {Object} obj
9267
- * @param {String} prop
9268
- * @returns {*} The property's value or undefined
9269
- */
9270
- const setProperty = function (obj, prop, value, force) {
9271
- if (typeof obj === 'object' && typeof prop === 'string') {
9272
- let o = obj;
9273
- const bits = prop.split('.');
9274
- (0, each_22.each)(bits, (v, i) => {
9275
- if (!o) {
9276
- if (!force) {
9277
- throw new Error(bbn._('The object is invalid'));
9278
- }
9279
- o = {};
9280
- }
9281
- if (bits.length - 1 === i) {
9282
- o[v] = value;
9283
- }
9284
- else {
9285
- o = o[v];
9286
- }
9287
- });
9288
- }
9289
- };
9290
- exports.setProperty = setProperty;
9291
- });
9292
9294
  define("fn/string/shorten", ["require", "exports", "fn/type/isString", "fn/string/substr"], function (require, exports, isString_25, substr_15) {
9293
9295
  "use strict";
9294
9296
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -9732,7 +9734,7 @@
9732
9734
  *
9733
9735
  * @returns {Promise}
9734
9736
  */
9735
- const upload = function (url, file, success, failure, progress) {
9737
+ const upload = function (url, file, success = null, failure = null, progress = null) {
9736
9738
  let fn = () => {
9737
9739
  return axios.post(url || bbn.env.path, (0, objectToFormData_1.objectToFormData)(file), {
9738
9740
  headers: {
@@ -9767,7 +9769,7 @@
9767
9769
  };
9768
9770
  exports.upload = upload;
9769
9771
  });
9770
- define("fn", ["require", "exports", "fn/ajax/_addLoader", "fn/object/_compareValues", "fn/ajax/_deleteLoader", "fn/ajax/abort", "fn/ajax/abortURL", "fn/style/addColors", "fn/form/addInputs", "fn/style/addStyle", "fn/html/adjustHeight", "fn/html/adjustSize", "fn/html/adjustWidth", "fn/ajax/ajax", "fn/misc/analyzeFunction", "fn/style/animateCss", "fn/convert/arrayBuffer2String", "fn/object/arrayFromProp", "fn/object/autoExtend", "fn/string/baseName", "fn/string/br2nl", "fn/datetime/calendar", "fn/ajax/callback", "fn/string/camelize", "fn/string/camelToCss", "fn/convert/canvasToImage", "fn/style/center", "fn/object/checkProps", "fn/object/checkPropsDetails", "fn/object/checkPropsOrDie", "fn/type/checkType", "fn/object/circularReplacer", "fn/object/clone", "fn/convert/colorToHex", "fn/object/compare", "fn/object/compareConditions", "fn/browser/copy", "fn/string/correctCase", "fn/object/count", "fn/string/crc32", "fn/object/createObject", "fn/style/cssExists", "fn/datetime/date", "fn/datetime/dateSQL", "fn/datetime/daysInMonth", "fn/object/deepPath", "fn/default/defaultAjaxAbortFunction", "fn/default/defaultAjaxErrorFunction", "fn/default/defaultAlertFunction", "fn/default/defaultConfirmFunction", "fn/default/defaultEndLoadingFunction", "fn/default/defaultErrorFunction", "fn/default/defaultHistoryFunction", "fn/default/defaultLinkFunction", "fn/default/defaultPostLinkFunction", "fn/default/defaultPreLinkFunction", "fn/default/defaultResizeFunction", "fn/default/defaultStartLoadingFunction", "fn/object/deleteProp", "fn/object/diffObj", "fn/string/dirName", "fn/ajax/download", "fn/ajax/downloadContent", "fn/loop/each", "fn/browser/eraseCookie", "fn/browser/error", "fn/string/escapeDquotes", "fn/string/escapeRegExp", "fn/string/escapeSquotes", "fn/string/escapeTicks", "fn/string/escapeUrl", "fn/object/extend", "fn/object/extendOut", "fn/datetime/fdate", "fn/datetime/fdatetime", "fn/form/fieldValue", "fn/string/fileExt", "fn/object/filter", "fn/object/filterToConditions", "fn/object/findAll", "fn/loop/fori", "fn/loop/forir", "fn/string/format", "fn/string/formatBytes", "fn/datetime/formatDate", "fn/string/formatSize", "fn/form/formdata", "fn/convert/fromXml", "fn/datetime/ftime", "fn/html/getAllTags", "fn/html/getAncestors", "fn/html/getAttributes", "fn/browser/getBrowserName", "fn/browser/getBrowserVersion", "fn/browser/getCookie", "fn/style/getCssVar", "fn/datetime/getDay", "fn/browser/getDeviceType", "fn/browser/getEventData", "fn/object/getField", "fn/object/getFieldValues", "fn/html/getHtml", "fn/html/getHTMLOfSelection", "fn/ajax/getLoader", "fn/html/getPath", "fn/object/getProp", "fn/object/getProperty", "fn/ajax/getRequestId", "fn/object/getRow", "fn/style/getScrollBarSize", "fn/html/getText", "fn/misc/getTimeoff", "fn/browser/happy", "fn/string/hash", "fn/convert/hex2rgb", "fn/browser/history", "fn/html/html2text", "fn/convert/imageToCanvas", "fn/convert/imgToBase64", "fn/browser/info", "fn/init", "fn/browser/isActiveInterface", "fn/type/isArray", "fn/type/isBlob", "fn/type/isBoolean", "fn/type/isCanvas", "fn/type/isColor", "fn/type/isComment", "fn/type/isCp", "fn/type/isDate", "fn/browser/isDesktopDevice", "fn/type/isDimension", "fn/type/isDom", "fn/type/isEmail", "fn/type/isEmpty", "fn/type/isEvent", "fn/browser/isFocused", "fn/type/isFunction", "fn/type/isHostname", "fn/html/isInside", "fn/type/isInt", "fn/type/isIP", "fn/type/isIterable", "fn/browser/isMobile", "fn/browser/isMobileDevice", "fn/type/isNull", "fn/type/isNumber", "fn/type/isObject", "fn/type/isPercent", "fn/type/isPrimitive", "fn/type/isPromise", "fn/type/isPropSize", "fn/type/isSame", "fn/type/isSQLDate", "fn/type/isString", "fn/type/isSymbol", "fn/browser/isTabletDevice", "fn/type/isURL", "fn/type/isValidDimension", "fn/type/isValidName", "fn/type/isValue", "fn/type/isVue", "fn/loop/iterate", "fn/style/lightenDarkenHex", "fn/ajax/link", "fn/browser/log", "fn/html/makeReactive", "fn/object/map", "fn/string/md5", "fn/misc/money", "fn/object/move", "fn/object/multiorder", "fn/string/nl2br", "fn/object/numProperties", "fn/form/objectToFormData", "fn/object/order", "fn/style/outerHeight", "fn/style/outerWidth", "fn/misc/percent", "fn/object/pickValue", "fn/ajax/post", "fn/ajax/postOut", "fn/string/printf", "fn/string/quotes2html", "fn/misc/randomInt", "fn/string/randomString", "fn/string/removeAccents", "fn/object/removeEmpty", "fn/string/removeExtraSpaces", "fn/string/removeHtmlComments", "fn/object/removePrivateProp", "fn/string/removeTrailingChars", "fn/string/repeat", "fn/string/replaceAll", "fn/browser/replaceSelection", "fn/style/resize", "fn/convert/rgb2hex", "fn/loop/riterate", "fn/misc/roundDecimal", "fn/string/sanitize", "fn/object/search", "fn/browser/selectElementText", "fn/html/selector", "fn/browser/setCookie", "fn/style/setCssVar", "fn/ajax/setNavigationVars", "fn/object/setProp", "fn/object/setProperty", "fn/string/shorten", "fn/object/shortenObj", "fn/object/shuffle", "fn/string/simpleHash", "fn/string/simpleHash1", "fn/string/simpleHash2", "fn/datetime/chrono", "fn/convert/string2ArrayBuffer", "fn/form/submit", "fn/string/substr", "fn/object/sum", "fn/datetime/timestamp", "fn/convert/toCSV", "fn/browser/toggleFullScreen", "fn/misc/translate", "fn/ajax/treatAjaxArguments", "fn/string/trim", "fn/string/uniqString", "fn/object/unique", "fn/ajax/upload", "fn/browser/warning"], function (require, exports, _addLoader_2, _compareValues_3, _deleteLoader_2, abort_1, abortURL_1, addColors_2, addInputs_2, addStyle_1, adjustHeight_1, adjustSize_3, adjustWidth_1, ajax_4, analyzeFunction_1, animateCss_1, arrayBuffer2String_1, arrayFromProp_1, autoExtend_1, baseName_3, br2nl_1, calendar_1, callback_3, camelize_1, camelToCss_1, canvasToImage_1, center_1, checkProps_1, checkPropsDetails_3, checkPropsOrDie_1, checkType_6, circularReplacer_2, clone_2, colorToHex_1, compare_2, compareConditions_3, copy_1, correctCase_2, count_1, crc32_1, createObject_4, cssExists_1, date_8, dateSQL_1, daysInMonth_1, deepPath_1, defaultAjaxAbortFunction_1, defaultAjaxErrorFunction_1, defaultAlertFunction_1, defaultConfirmFunction_1, defaultEndLoadingFunction_1, defaultErrorFunction_2, defaultHistoryFunction_2, defaultLinkFunction_1, defaultPostLinkFunction_1, defaultPreLinkFunction_1, defaultResizeFunction_2, defaultStartLoadingFunction_1, deleteProp_1, diffObj_1, dirName_2, download_1, downloadContent_2, each_28, eraseCookie_1, error_4, escapeDquotes_1, escapeRegExp_3, escapeSquotes_1, escapeTicks_1, escapeUrl_1, extend_8, extendOut_1, fdate_2, fdatetime_2, fieldValue_2, fileExt_2, filter_6, filterToConditions_3, findAll_1, fori_1, forir_1, format_1, formatBytes_1, formatDate_1, formatSize_1, formdata_2, fromXml_1, ftime_1, getAllTags_1, getAncestors_2, getAttributes_1, getBrowserName_1, getBrowserVersion_1, getCookie_1, getCssVar_2, getDay_1, getDeviceType_4, getEventData_1, getField_1, getFieldValues_1, getHtml_1, getHTMLOfSelection_2, getLoader_4, getPath_1, getProp_1, getProperty_4, getRequestId_2, getRow_3, getScrollBarSize_1, getText_1, getTimeoff_1, happy_1, hash_2, hex2rgb_1, history_1, html2text_2, imageToCanvas_2, imgToBase64_1, info_1, init_1, isActiveInterface_1, isArray_19, isBlob_2, isBoolean_1, isCanvas_2, isColor_1, isComment_1, isCp_3, isDate_8, isDesktopDevice_1, isDimension_1, isDom_5, isEmail_1, isEmpty_2, isEvent_1, isFocused_1, isFunction_11, isHostname_1, isInside_1, isInt_2, isIP_2, isIterable_5, isMobile_2, isMobileDevice_2, isNull_4, isNumber_10, isObject_18, isPercent_1, isPrimitive_1, isPromise_1, isPropSize_1, isSame_3, isSQLDate_1, isString_27, isSymbol_2, isTabletDevice_3, isURL_1, isValidDimension_2, isValidName_1, isValue_2, isVue_1, iterate_12, lightenDarkenHex_1, link_2, log_22, makeReactive_1, map_1, md5_4, money_1, move_1, multiorder_1, nl2br_1, numProperties_8, objectToFormData_2, order_1, outerHeight_1, outerWidth_1, percent_1, pickValue_1, post_2, postOut_1, printf_1, quotes2html_1, randomInt_2, randomString_1, removeAccents_4, removeEmpty_1, removeExtraSpaces_1, removeHtmlComments_2, removePrivateProp_2, removeTrailingChars_1, repeat_1, replaceAll_8, replaceSelection_1, resize_3, rgb2hex_1, riterate_1, roundDecimal_1, sanitize_1, search_6, selectElementText_1, selector_3, setCookie_1, setCssVar_1, setNavigationVars_2, setProp_1, setProperty_1, shorten_2, shortenObj_1, shuffle_1, simpleHash_2, simpleHash1_2, simpleHash2_2, chrono_1, string2ArrayBuffer_1, submit_2, substr_16, sum_1, timestamp_1, toCSV_1, toggleFullScreen_1, translate_1, treatAjaxArguments_3, trim_2, uniqString_1, unique_2, upload_1, warning_2) {
9772
+ define("fn", ["require", "exports", "fn/ajax/_addLoader", "fn/object/_compareValues", "fn/ajax/_deleteLoader", "fn/ajax/abort", "fn/ajax/abortURL", "fn/style/addColors", "fn/form/addInputs", "fn/style/addStyle", "fn/html/adjustHeight", "fn/html/adjustSize", "fn/html/adjustWidth", "fn/ajax/ajax", "fn/misc/analyzeFunction", "fn/style/animateCss", "fn/convert/arrayBuffer2String", "fn/object/arrayFromProp", "fn/object/autoExtend", "fn/string/baseName", "fn/string/br2nl", "fn/datetime/calendar", "fn/ajax/callback", "fn/string/camelize", "fn/string/camelToCss", "fn/convert/canvasToImage", "fn/style/center", "fn/object/checkProps", "fn/object/checkPropsDetails", "fn/object/checkPropsOrDie", "fn/type/checkType", "fn/object/circularReplacer", "fn/object/clone", "fn/convert/colorToHex", "fn/object/compare", "fn/object/compareConditions", "fn/browser/copy", "fn/string/correctCase", "fn/object/count", "fn/string/crc32", "fn/object/createObject", "fn/style/cssExists", "fn/datetime/date", "fn/datetime/dateSQL", "fn/datetime/daysInMonth", "fn/object/deepPath", "fn/default/defaultAjaxAbortFunction", "fn/default/defaultAjaxErrorFunction", "fn/default/defaultAlertFunction", "fn/default/defaultConfirmFunction", "fn/default/defaultEndLoadingFunction", "fn/default/defaultErrorFunction", "fn/default/defaultHistoryFunction", "fn/default/defaultLinkFunction", "fn/default/defaultPostLinkFunction", "fn/default/defaultPreLinkFunction", "fn/default/defaultResizeFunction", "fn/default/defaultStartLoadingFunction", "fn/object/deleteProp", "fn/object/diffObj", "fn/string/dirName", "fn/ajax/download", "fn/ajax/downloadContent", "fn/loop/each", "fn/browser/eraseCookie", "fn/browser/error", "fn/string/escapeDquotes", "fn/string/escapeRegExp", "fn/string/escapeSquotes", "fn/string/escapeTicks", "fn/string/escapeUrl", "fn/object/extend", "fn/object/extendOut", "fn/datetime/fdate", "fn/datetime/fdatetime", "fn/form/fieldValue", "fn/string/fileExt", "fn/object/filter", "fn/object/filterToConditions", "fn/object/findAll", "fn/loop/fori", "fn/loop/forir", "fn/string/format", "fn/string/formatBytes", "fn/datetime/formatDate", "fn/string/formatSize", "fn/form/formdata", "fn/convert/fromXml", "fn/datetime/ftime", "fn/html/getAllTags", "fn/html/getAncestors", "fn/html/getAttributes", "fn/browser/getBrowserName", "fn/browser/getBrowserVersion", "fn/browser/getCookie", "fn/style/getCssVar", "fn/datetime/getDay", "fn/browser/getDeviceType", "fn/browser/getEventData", "fn/object/getField", "fn/object/getFieldValues", "fn/html/getHtml", "fn/html/getHTMLOfSelection", "fn/ajax/getLoader", "fn/html/getPath", "fn/object/getProp", "fn/object/getProperty", "fn/ajax/getRequestId", "fn/object/getRow", "fn/style/getScrollBarSize", "fn/html/getText", "fn/misc/getTimeoff", "fn/browser/happy", "fn/string/hash", "fn/convert/hex2rgb", "fn/browser/history", "fn/html/html2text", "fn/convert/imageToCanvas", "fn/convert/imgToBase64", "fn/browser/info", "fn/init", "fn/browser/isActiveInterface", "fn/type/isArray", "fn/type/isBlob", "fn/type/isBoolean", "fn/type/isCanvas", "fn/type/isColor", "fn/type/isComment", "fn/type/isCp", "fn/type/isDate", "fn/browser/isDesktopDevice", "fn/type/isDimension", "fn/type/isDom", "fn/type/isEmail", "fn/type/isEmpty", "fn/type/isEvent", "fn/browser/isFocused", "fn/type/isFunction", "fn/type/isHostname", "fn/html/isInside", "fn/type/isInt", "fn/type/isIP", "fn/type/isIterable", "fn/browser/isMobile", "fn/browser/isMobileDevice", "fn/type/isNull", "fn/type/isNumber", "fn/type/isObject", "fn/type/isPercent", "fn/type/isPrimitive", "fn/type/isPromise", "fn/type/isPropSize", "fn/type/isSame", "fn/type/isSQLDate", "fn/type/isString", "fn/type/isSymbol", "fn/browser/isTabletDevice", "fn/type/isURL", "fn/type/isValidDimension", "fn/type/isValidName", "fn/type/isValue", "fn/type/isVue", "fn/loop/iterate", "fn/style/lightenDarkenHex", "fn/ajax/link", "fn/browser/log", "fn/html/makeReactive", "fn/object/map", "fn/string/md5", "fn/misc/money", "fn/object/move", "fn/object/multiorder", "fn/string/nl2br", "fn/object/numProperties", "fn/form/objectToFormData", "fn/object/order", "fn/style/outerHeight", "fn/style/outerWidth", "fn/misc/percent", "fn/object/pickValue", "fn/ajax/post", "fn/ajax/postOut", "fn/string/printf", "fn/string/quotes2html", "fn/misc/randomInt", "fn/string/randomString", "fn/string/removeAccents", "fn/object/removeEmpty", "fn/string/removeExtraSpaces", "fn/string/removeHtmlComments", "fn/object/removePrivateProp", "fn/string/removeTrailingChars", "fn/string/repeat", "fn/string/replaceAll", "fn/browser/replaceSelection", "fn/style/resize", "fn/convert/rgb2hex", "fn/loop/riterate", "fn/misc/roundDecimal", "fn/string/sanitize", "fn/object/search", "fn/browser/selectElementText", "fn/html/selector", "fn/browser/setCookie", "fn/style/setCssVar", "fn/ajax/setNavigationVars", "fn/object/setProp", "fn/object/setProperty", "fn/string/shorten", "fn/object/shortenObj", "fn/object/shuffle", "fn/string/simpleHash", "fn/string/simpleHash1", "fn/string/simpleHash2", "fn/datetime/chrono", "fn/convert/string2ArrayBuffer", "fn/form/submit", "fn/string/substr", "fn/object/sum", "fn/datetime/timestamp", "fn/convert/toCSV", "fn/browser/toggleFullScreen", "fn/misc/translate", "fn/ajax/treatAjaxArguments", "fn/string/trim", "fn/string/uniqString", "fn/object/unique", "fn/ajax/upload", "fn/browser/warning"], function (require, exports, _addLoader_2, _compareValues_3, _deleteLoader_2, abort_1, abortURL_1, addColors_2, addInputs_2, addStyle_1, adjustHeight_1, adjustSize_3, adjustWidth_1, ajax_4, analyzeFunction_1, animateCss_1, arrayBuffer2String_1, arrayFromProp_1, autoExtend_1, baseName_3, br2nl_1, calendar_1, callback_3, camelize_1, camelToCss_1, canvasToImage_1, center_1, checkProps_1, checkPropsDetails_3, checkPropsOrDie_1, checkType_6, circularReplacer_2, clone_2, colorToHex_1, compare_2, compareConditions_3, copy_1, correctCase_2, count_1, crc32_1, createObject_4, cssExists_1, date_8, dateSQL_1, daysInMonth_1, deepPath_1, defaultAjaxAbortFunction_1, defaultAjaxErrorFunction_1, defaultAlertFunction_1, defaultConfirmFunction_1, defaultEndLoadingFunction_1, defaultErrorFunction_2, defaultHistoryFunction_2, defaultLinkFunction_1, defaultPostLinkFunction_1, defaultPreLinkFunction_1, defaultResizeFunction_2, defaultStartLoadingFunction_1, deleteProp_1, diffObj_1, dirName_2, download_1, downloadContent_2, each_28, eraseCookie_1, error_4, escapeDquotes_1, escapeRegExp_3, escapeSquotes_1, escapeTicks_1, escapeUrl_1, extend_8, extendOut_1, fdate_2, fdatetime_2, fieldValue_2, fileExt_2, filter_6, filterToConditions_3, findAll_1, fori_1, forir_1, format_1, formatBytes_1, formatDate_1, formatSize_1, formdata_2, fromXml_1, ftime_1, getAllTags_1, getAncestors_2, getAttributes_1, getBrowserName_1, getBrowserVersion_1, getCookie_1, getCssVar_2, getDay_1, getDeviceType_4, getEventData_1, getField_1, getFieldValues_1, getHtml_1, getHTMLOfSelection_2, getLoader_4, getPath_1, getProp_1, getProperty_4, getRequestId_2, getRow_3, getScrollBarSize_1, getText_1, getTimeoff_1, happy_1, hash_2, hex2rgb_1, history_1, html2text_2, imageToCanvas_2, imgToBase64_1, info_1, init_1, isActiveInterface_1, isArray_19, isBlob_2, isBoolean_1, isCanvas_2, isColor_1, isComment_1, isCp_3, isDate_8, isDesktopDevice_1, isDimension_1, isDom_5, isEmail_1, isEmpty_2, isEvent_1, isFocused_1, isFunction_11, isHostname_1, isInside_1, isInt_2, isIP_2, isIterable_5, isMobile_2, isMobileDevice_2, isNull_4, isNumber_10, isObject_18, isPercent_1, isPrimitive_1, isPromise_1, isPropSize_1, isSame_3, isSQLDate_1, isString_27, isSymbol_2, isTabletDevice_3, isURL_1, isValidDimension_2, isValidName_1, isValue_2, isVue_1, iterate_12, lightenDarkenHex_1, link_2, log_22, makeReactive_1, map_1, md5_4, money_1, move_1, multiorder_1, nl2br_1, numProperties_8, objectToFormData_2, order_1, outerHeight_1, outerWidth_1, percent_1, pickValue_1, post_2, postOut_1, printf_1, quotes2html_1, randomInt_2, randomString_1, removeAccents_4, removeEmpty_1, removeExtraSpaces_1, removeHtmlComments_2, removePrivateProp_2, removeTrailingChars_1, repeat_1, replaceAll_8, replaceSelection_1, resize_3, rgb2hex_1, riterate_1, roundDecimal_1, sanitize_1, search_6, selectElementText_1, selector_3, setCookie_1, setCssVar_1, setNavigationVars_2, setProp_1, setProperty_2, shorten_2, shortenObj_1, shuffle_1, simpleHash_2, simpleHash1_2, simpleHash2_2, chrono_1, string2ArrayBuffer_1, submit_2, substr_16, sum_1, timestamp_1, toCSV_1, toggleFullScreen_1, translate_1, treatAjaxArguments_3, trim_2, uniqString_1, unique_2, upload_1, warning_2) {
9771
9773
  "use strict";
9772
9774
  Object.defineProperty(exports, "__esModule", { value: true });
9773
9775
  exports.fn = void 0;
@@ -9977,7 +9979,7 @@
9977
9979
  setCssVar: setCssVar_1.setCssVar,
9978
9980
  setNavigationVars: setNavigationVars_2.setNavigationVars,
9979
9981
  setProp: setProp_1.setProp,
9980
- setProperty: setProperty_1.setProperty,
9982
+ setProperty: setProperty_2.setProperty,
9981
9983
  shorten: shorten_2.shorten,
9982
9984
  shortenObj: shortenObj_1.shortenObj,
9983
9985
  shuffle: shuffle_1.shuffle,
@@ -7,10 +7,10 @@
7
7
  * @memberof bbn.fn
8
8
  *
9
9
  * @param {String} requestId The unique ID of the request sent
10
- * @param {*} res The result of the request
10
+ * @param {String|Object} res The result of the request
11
11
  * @param {Boolean} isAbort True if the deletion comes from abortion
12
12
  *
13
13
  * @returns {Boolean} True if the loader was found
14
14
  */
15
- declare const _deleteLoader: (requestId: string, res?: any, isAbort?: boolean) => boolean;
15
+ declare const _deleteLoader: (requestId: any, res?: any, isAbort?: boolean) => boolean;
16
16
  export { _deleteLoader };
@@ -10,7 +10,7 @@ import { isObject } from '../type/isObject';
10
10
  * @memberof bbn.fn
11
11
  *
12
12
  * @param {String} requestId The unique ID of the request sent
13
- * @param {*} res The result of the request
13
+ * @param {String|Object} res The result of the request
14
14
  * @param {Boolean} isAbort True if the deletion comes from abortion
15
15
  *
16
16
  * @returns {Boolean} True if the loader was found
@@ -54,5 +54,5 @@
54
54
  *
55
55
  * @returns {Promise} The Promise created by the generated XHR.
56
56
  */
57
- declare const ajax: (url: any, datatype: string, data: any, success?: (data: object, headers?: object) => any, failure?: (url: string, o?: object) => any, abort?: (message: string, url: string) => any) => any;
57
+ declare const ajax: (url: any, datatype?: any, data?: any, success?: any, failure?: any, abort?: any) => any;
58
58
  export { ajax };
@@ -63,7 +63,7 @@ import { _addLoader } from "./_addLoader";
63
63
  *
64
64
  * @returns {Promise} The Promise created by the generated XHR.
65
65
  */
66
- const ajax = function (url, datatype, data, success, failure, abort) {
66
+ const ajax = function (url, datatype = null, data = null, success = null, failure = null, abort = null) {
67
67
  if (arguments.length === 1 && url && typeof url === "object" && url.url) {
68
68
  if (url.abort) {
69
69
  abort = url.abort;
@@ -109,7 +109,7 @@ const ajax = function (url, datatype, data, success, failure, abort) {
109
109
  cancelToken: source.token,
110
110
  };
111
111
  if (datatype === "text") {
112
- options.headers = {
112
+ options['headers'] = {
113
113
  accept: "text/javascript",
114
114
  "Content-Type": "text/javascript",
115
115
  };
@@ -33,5 +33,5 @@
33
33
  *
34
34
  * @returns {*} The result of the main callback function: res.script, fn, or bbn.fn.defaultLinkFunction
35
35
  */
36
- declare const callback: (url: any, res: any, fn?: any, fn2?: any, ele?: any) => boolean;
36
+ declare const callback: (url: any, res?: any, fn?: any, fn2?: any, ele?: any) => boolean;
37
37
  export { callback };
@@ -36,7 +36,7 @@ import { log } from '../browser/log';
36
36
  *
37
37
  * @returns {*} The result of the main callback function: res.script, fn, or bbn.fn.defaultLinkFunction
38
38
  */
39
- const callback = function (url, res, fn = null, fn2 = null, ele = null) {
39
+ const callback = function (url, res = null, fn = null, fn2 = null, ele = null) {
40
40
  let tmp = false;
41
41
  if (res) {
42
42
  tmp = true;
@@ -24,5 +24,5 @@
24
24
  *
25
25
  * @returns {undefined}
26
26
  */
27
- declare const downloadContent: (filename: string, content: any, type?: string) => void;
27
+ declare const downloadContent: (filename: any, content: any, type?: any) => void;
28
28
  export { downloadContent };
@@ -28,7 +28,7 @@ import { log } from '../browser/log';
28
28
  *
29
29
  * @returns {undefined}
30
30
  */
31
- const downloadContent = function (filename, content, type) {
31
+ const downloadContent = function (filename, content, type = null) {
32
32
  if (isCanvas(content)) {
33
33
  content.toBlob((blob) => {
34
34
  // blob ready, download it
@@ -31,7 +31,7 @@
31
31
  *
32
32
  * @param {String} requestId The unique ID of the request as used in bbn.env.loaders
33
33
  *
34
- * @returns {false|Object} The corresponding loader Object if it exists, false otherwise
34
+ * @returns {null|Object} The corresponding loader Object if it exists, false otherwise
35
35
  */
36
- declare const getLoader: (requestId: string) => BbnLoader | null;
36
+ declare const getLoader: (requestId: any) => BbnLoader;
37
37
  export { getLoader };
@@ -32,7 +32,7 @@ import { search } from '../object/search';
32
32
  *
33
33
  * @param {String} requestId The unique ID of the request as used in bbn.env.loaders
34
34
  *
35
- * @returns {false|Object} The corresponding loader Object if it exists, false otherwise
35
+ * @returns {null|Object} The corresponding loader Object if it exists, false otherwise
36
36
  */
37
37
  const getLoader = function (requestId) {
38
38
  let idx = search(bbn.env.loaders, { key: requestId });
@@ -32,7 +32,7 @@ import { setNavigationVars } from './setNavigationVars';
32
32
  */
33
33
  const link = function (...args) {
34
34
  let cfg = treatAjaxArguments(args);
35
- let ok = true;
35
+ let ok = 1;
36
36
  /* If we can't find a correct link we load the current URL */
37
37
  if (!cfg) {
38
38
  return link(window.location.href);
@@ -84,9 +84,9 @@ const link = function (...args) {
84
84
  ok = cfg.successFn(cfg.url);
85
85
  }
86
86
  else if (bbn.fn.defaultPreLinkFunction) {
87
- ok = bbn.fn.defaultPreLinkFunction(cfg.url, cfg.force, cfg.ele);
88
- if (ok.data !== undefined) {
89
- extend(cfg.obj, ok.data);
87
+ let tmp = bbn.fn.defaultPreLinkFunction(cfg.url, cfg.force, cfg.ele);
88
+ if (tmp.data !== undefined) {
89
+ extend(cfg.obj, tmp.data);
90
90
  ok = 1;
91
91
  }
92
92
  }
@@ -15,7 +15,7 @@
15
15
  * @param {Function} success A function to execute in case of success
16
16
  * @param {String} target The target attribute of the form
17
17
  *
18
- * @returns {undefined}
18
+ * @returns {void}
19
19
  */
20
- declare const postOut: (url: string, data: BbnBasicObject, success?: () => any, target?: string) => void;
20
+ declare const postOut: (url: any, data: any, success?: any, target?: string) => void;
21
21
  export { postOut };