@bbn/bbn 1.0.28 → 1.0.29

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.
Files changed (231) hide show
  1. package/dist/bundle.d.ts +6 -6
  2. package/dist/fn/_addLoader.js +3 -6
  3. package/dist/fn/_compareValues.js +11 -14
  4. package/dist/fn/_deleteLoader.js +7 -10
  5. package/dist/fn/abort.js +3 -6
  6. package/dist/fn/abortURL.js +4 -7
  7. package/dist/fn/addColors.js +5 -8
  8. package/dist/fn/addInputs.js +3 -6
  9. package/dist/fn/addStyle.js +5 -8
  10. package/dist/fn/adjustHeight.js +5 -8
  11. package/dist/fn/adjustSize.js +5 -8
  12. package/dist/fn/adjustWidth.js +5 -8
  13. package/dist/fn/ajax.js +31 -34
  14. package/dist/fn/analyzeFunction.js +3 -6
  15. package/dist/fn/animateCss.js +1 -4
  16. package/dist/fn/arrayBuffer2String.js +1 -4
  17. package/dist/fn/arrayFromProp.js +5 -8
  18. package/dist/fn/autoExtend.js +4 -7
  19. package/dist/fn/baseName.js +6 -9
  20. package/dist/fn/br2nl.js +3 -6
  21. package/dist/fn/calendar.js +14 -20
  22. package/dist/fn/callback.js +16 -19
  23. package/dist/fn/camelToCss.js +1 -4
  24. package/dist/fn/camelize.js +1 -4
  25. package/dist/fn/canvasToImage.js +1 -4
  26. package/dist/fn/center.js +1 -4
  27. package/dist/fn/checkProps.js +3 -6
  28. package/dist/fn/checkPropsDetails.js +9 -12
  29. package/dist/fn/checkPropsOrDie.js +3 -6
  30. package/dist/fn/checkType.js +16 -19
  31. package/dist/fn/chrono.js +3 -7
  32. package/dist/fn/circularReplacer.js +7 -10
  33. package/dist/fn/clone.js +7 -10
  34. package/dist/fn/colorToHex.js +1 -4
  35. package/dist/fn/compare.js +18 -21
  36. package/dist/fn/compareConditions.js +10 -13
  37. package/dist/fn/copy.js +4 -7
  38. package/dist/fn/correctCase.js +1 -4
  39. package/dist/fn/count.js +3 -6
  40. package/dist/fn/crc32.js +1 -4
  41. package/dist/fn/createObject.js +3 -6
  42. package/dist/fn/cssExists.js +3 -6
  43. package/dist/fn/date.js +8 -11
  44. package/dist/fn/dateSQL.js +5 -11
  45. package/dist/fn/daysInMonth.js +5 -11
  46. package/dist/fn/deepPath.js +7 -10
  47. package/dist/fn/defaultAjaxAbortFunction.js +3 -6
  48. package/dist/fn/defaultAjaxErrorFunction.js +1 -4
  49. package/dist/fn/defaultAlertFunction.js +1 -4
  50. package/dist/fn/defaultConfirmFunction.js +4 -7
  51. package/dist/fn/defaultEndLoadingFunction.js +1 -4
  52. package/dist/fn/defaultErrorFunction.js +3 -6
  53. package/dist/fn/defaultHistoryFunction.js +1 -4
  54. package/dist/fn/defaultLinkFunction.js +1 -4
  55. package/dist/fn/defaultPostLinkFunction.js +1 -4
  56. package/dist/fn/defaultPreLinkFunction.js +1 -4
  57. package/dist/fn/defaultResizeFunction.js +1 -4
  58. package/dist/fn/defaultStartLoadingFunction.js +1 -4
  59. package/dist/fn/deleteProp.js +4 -7
  60. package/dist/fn/diffObj.js +16 -19
  61. package/dist/fn/dirName.js +7 -10
  62. package/dist/fn/download.js +15 -18
  63. package/dist/fn/downloadContent.js +9 -12
  64. package/dist/fn/each.js +7 -10
  65. package/dist/fn/eraseCookie.js +1 -4
  66. package/dist/fn/error.js +3 -6
  67. package/dist/fn/escapeDquotes.js +3 -6
  68. package/dist/fn/escapeRegExp.js +1 -4
  69. package/dist/fn/escapeSquotes.js +3 -6
  70. package/dist/fn/escapeTicks.js +3 -6
  71. package/dist/fn/escapeUrl.js +8 -11
  72. package/dist/fn/extend.js +13 -16
  73. package/dist/fn/extendOut.js +4 -7
  74. package/dist/fn/fdate.js +12 -18
  75. package/dist/fn/fdatetime.js +10 -16
  76. package/dist/fn/fieldValue.js +1 -4
  77. package/dist/fn/fileExt.js +3 -6
  78. package/dist/fn/filter.js +12 -15
  79. package/dist/fn/filterToConditions.js +8 -11
  80. package/dist/fn/findAll.js +7 -10
  81. package/dist/fn/fori.js +6 -9
  82. package/dist/fn/forir.js +6 -9
  83. package/dist/fn/format.js +3 -6
  84. package/dist/fn/formatBytes.js +1 -4
  85. package/dist/fn/formatDate.js +3 -9
  86. package/dist/fn/formatSize.js +5 -8
  87. package/dist/fn/formdata.js +11 -14
  88. package/dist/fn/fromXml.js +1 -4
  89. package/dist/fn/ftime.js +12 -18
  90. package/dist/fn/getAllTags.js +3 -6
  91. package/dist/fn/getAncestors.js +1 -4
  92. package/dist/fn/getAttributes.js +3 -6
  93. package/dist/fn/getBrowserName.js +1 -4
  94. package/dist/fn/getBrowserVersion.js +1 -4
  95. package/dist/fn/getCookie.js +1 -4
  96. package/dist/fn/getCssVar.js +1 -4
  97. package/dist/fn/getDay.js +3 -6
  98. package/dist/fn/getDeviceType.js +1 -4
  99. package/dist/fn/getEventData.js +7 -10
  100. package/dist/fn/getField.js +3 -6
  101. package/dist/fn/getFieldValues.js +7 -10
  102. package/dist/fn/getHTMLOfSelection.js +4 -7
  103. package/dist/fn/getHtml.js +3 -6
  104. package/dist/fn/getLoader.js +3 -6
  105. package/dist/fn/getPath.js +3 -6
  106. package/dist/fn/getProp.js +4 -7
  107. package/dist/fn/getProperty.js +1 -4
  108. package/dist/fn/getRequestId.js +5 -8
  109. package/dist/fn/getRow.js +3 -6
  110. package/dist/fn/getScrollBarSize.js +1 -4
  111. package/dist/fn/getText.js +1 -4
  112. package/dist/fn/getTimeoff.js +1 -4
  113. package/dist/fn/happy.js +3 -6
  114. package/dist/fn/hash.js +11 -14
  115. package/dist/fn/hex2rgb.js +1 -4
  116. package/dist/fn/history.js +1 -4
  117. package/dist/fn/html2text.js +1 -4
  118. package/dist/fn/imageToCanvas.js +1 -4
  119. package/dist/fn/imgToBase64.js +3 -6
  120. package/dist/fn/info.js +3 -6
  121. package/dist/fn/init.js +32 -58
  122. package/dist/fn/isActiveInterface.js +1 -4
  123. package/dist/fn/isArray.js +1 -4
  124. package/dist/fn/isBlob.js +1 -4
  125. package/dist/fn/isBoolean.js +1 -4
  126. package/dist/fn/isCanvas.js +1 -4
  127. package/dist/fn/isColor.js +3 -6
  128. package/dist/fn/isComment.js +1 -4
  129. package/dist/fn/isCp.js +3 -6
  130. package/dist/fn/isDate.js +1 -4
  131. package/dist/fn/isDesktopDevice.js +1 -4
  132. package/dist/fn/isDimension.js +3 -6
  133. package/dist/fn/isDom.js +1 -4
  134. package/dist/fn/isEmail.js +3 -6
  135. package/dist/fn/isEmpty.js +5 -8
  136. package/dist/fn/isEvent.js +1 -4
  137. package/dist/fn/isFocused.js +1 -4
  138. package/dist/fn/isFunction.js +1 -4
  139. package/dist/fn/isHostname.js +5 -8
  140. package/dist/fn/isIP.js +3 -6
  141. package/dist/fn/isInside.js +7 -10
  142. package/dist/fn/isInt.js +1 -4
  143. package/dist/fn/isIterable.js +1 -4
  144. package/dist/fn/isMobile.js +4 -7
  145. package/dist/fn/isMobileDevice.js +1 -4
  146. package/dist/fn/isNull.js +1 -4
  147. package/dist/fn/isNumber.js +1 -4
  148. package/dist/fn/isObject.js +1 -4
  149. package/dist/fn/isPercent.js +1 -4
  150. package/dist/fn/isPrimitive.js +1 -4
  151. package/dist/fn/isPromise.js +1 -4
  152. package/dist/fn/isPropSize.js +3 -6
  153. package/dist/fn/isSQLDate.js +1 -4
  154. package/dist/fn/isSame.js +5 -8
  155. package/dist/fn/isString.js +1 -4
  156. package/dist/fn/isSymbol.js +1 -4
  157. package/dist/fn/isTabletDevice.js +1 -4
  158. package/dist/fn/isURL.js +1 -4
  159. package/dist/fn/isValidDimension.js +4 -7
  160. package/dist/fn/isValidName.js +3 -6
  161. package/dist/fn/isValue.js +3 -6
  162. package/dist/fn/isVue.js +1 -4
  163. package/dist/fn/iterate.js +5 -8
  164. package/dist/fn/lightenDarkenHex.js +1 -4
  165. package/dist/fn/link.js +19 -22
  166. package/dist/fn/log.js +3 -6
  167. package/dist/fn/makeReactive.js +28 -31
  168. package/dist/fn/map.js +3 -6
  169. package/dist/fn/md5.js +1 -4
  170. package/dist/fn/money.js +3 -6
  171. package/dist/fn/move.js +1 -4
  172. package/dist/fn/multiorder.js +3 -6
  173. package/dist/fn/nl2br.js +3 -6
  174. package/dist/fn/numProperties.js +1 -4
  175. package/dist/fn/objectToFormData.js +12 -15
  176. package/dist/fn/order.js +3 -6
  177. package/dist/fn/outerHeight.js +3 -6
  178. package/dist/fn/outerWidth.js +3 -6
  179. package/dist/fn/percent.js +1 -4
  180. package/dist/fn/pickValue.js +1 -4
  181. package/dist/fn/post.js +7 -10
  182. package/dist/fn/postOut.js +5 -8
  183. package/dist/fn/printf.js +1 -4
  184. package/dist/fn/quotes2html.js +4 -7
  185. package/dist/fn/randomInt.js +1 -4
  186. package/dist/fn/randomString.js +4 -7
  187. package/dist/fn/removeAccents.js +5 -8
  188. package/dist/fn/removeEmpty.js +8 -11
  189. package/dist/fn/removeExtraSpaces.js +1 -4
  190. package/dist/fn/removeHtmlComments.js +3 -6
  191. package/dist/fn/removePrivateProp.js +3 -6
  192. package/dist/fn/removeTrailingChars.js +6 -9
  193. package/dist/fn/repeat.js +1 -4
  194. package/dist/fn/replaceAll.js +4 -7
  195. package/dist/fn/replaceSelection.js +1 -4
  196. package/dist/fn/resize.js +7 -10
  197. package/dist/fn/rgb2hex.js +1 -4
  198. package/dist/fn/riterate.js +3 -6
  199. package/dist/fn/roundDecimal.js +1 -4
  200. package/dist/fn/sanitize.js +5 -8
  201. package/dist/fn/search.js +15 -18
  202. package/dist/fn/selectElementText.js +1 -4
  203. package/dist/fn/selector.js +1 -4
  204. package/dist/fn/setCookie.js +1 -4
  205. package/dist/fn/setCssVar.js +1 -4
  206. package/dist/fn/setNavigationVars.js +10 -13
  207. package/dist/fn/setProp.js +1 -4
  208. package/dist/fn/setProperty.js +3 -6
  209. package/dist/fn/shorten.js +5 -8
  210. package/dist/fn/shortenObj.js +9 -12
  211. package/dist/fn/shuffle.js +1 -4
  212. package/dist/fn/simpleHash.js +5 -8
  213. package/dist/fn/simpleHash1.js +1 -4
  214. package/dist/fn/simpleHash2.js +1 -4
  215. package/dist/fn/stat.js +1 -4
  216. package/dist/fn/string2ArrayBuffer.js +1 -4
  217. package/dist/fn/submit.js +6 -9
  218. package/dist/fn/substr.js +7 -10
  219. package/dist/fn/sum.js +4 -7
  220. package/dist/fn/timestamp.js +1 -4
  221. package/dist/fn/toCSV.js +8 -11
  222. package/dist/fn/toggleFullScreen.js +3 -6
  223. package/dist/fn/translate.js +3 -6
  224. package/dist/fn/treatAjaxArguments.js +10 -13
  225. package/dist/fn/trim.js +4 -7
  226. package/dist/fn/uniqString.js +7 -10
  227. package/dist/fn/unique.js +1 -4
  228. package/dist/fn/upload.js +7 -33
  229. package/dist/fn/warning.js +3 -6
  230. package/dist/index.js +459 -471
  231. package/package.json +1 -1
@@ -1,6 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isSQLDate = void 0;
4
1
  const isSQLDate = function (...args) {
5
2
  if (!args.length)
6
3
  return false;
@@ -12,4 +9,4 @@ const isSQLDate = function (...args) {
12
9
  }
13
10
  return true;
14
11
  };
15
- exports.isSQLDate = isSQLDate;
12
+ export { isSQLDate };
package/dist/fn/isSame.js CHANGED
@@ -1,8 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isSame = void 0;
4
- const hash_1 = require("./hash");
5
- const each_1 = require("./each");
1
+ import { hash } from './hash';
2
+ import { each } from './each';
6
3
  const isSame = function (obj1, obj2, done) {
7
4
  if (!done) {
8
5
  done = [];
@@ -13,7 +10,7 @@ const isSame = function (obj1, obj2, done) {
13
10
  if (obj1 && obj2 && typeof obj1 === 'object' && typeof obj2 === 'object') {
14
11
  let tmp1 = Object.keys(obj1).sort(), tmp2 = Object.keys(obj2).sort();
15
12
  // Case where the keys are different
16
- if ((0, hash_1.hash)(tmp1) !== (0, hash_1.hash)(tmp2)) {
13
+ if (hash(tmp1) !== hash(tmp2)) {
17
14
  return false;
18
15
  }
19
16
  let ok = true;
@@ -23,7 +20,7 @@ const isSame = function (obj1, obj2, done) {
23
20
  }
24
21
  done.push(obj1);
25
22
  }
26
- (0, each_1.each)(tmp1, (a) => {
23
+ each(tmp1, (a) => {
27
24
  if (!isSame(obj1[a], obj2[a])) {
28
25
  ok = false;
29
26
  return false;
@@ -33,4 +30,4 @@ const isSame = function (obj1, obj2, done) {
33
30
  }
34
31
  return false;
35
32
  };
36
- exports.isSame = isSame;
33
+ export { isSame };
@@ -1,6 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isString = void 0;
4
1
  const isString = function (...args) {
5
2
  if (!args.length)
6
3
  return false;
@@ -11,4 +8,4 @@ const isString = function (...args) {
11
8
  }
12
9
  return true;
13
10
  };
14
- exports.isString = isString;
11
+ export { isString };
@@ -1,6 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isSymbol = void 0;
4
1
  const isSymbol = function (...args) {
5
2
  if (!args.length)
6
3
  return false;
@@ -11,4 +8,4 @@ const isSymbol = function (...args) {
11
8
  }
12
9
  return true;
13
10
  };
14
- exports.isSymbol = isSymbol;
11
+ export { isSymbol };
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isTabletDevice = void 0;
4
1
  const isTabletDevice = function () {
5
2
  return this.getDeviceType() === 'tablet';
6
3
  };
7
- exports.isTabletDevice = isTabletDevice;
4
+ export { isTabletDevice };
package/dist/fn/isURL.js CHANGED
@@ -1,6 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isURL = void 0;
4
1
  const isURL = function (...args) {
5
2
  if (!args.length)
6
3
  return false;
@@ -11,4 +8,4 @@ const isURL = function (...args) {
11
8
  }
12
9
  return true;
13
10
  };
14
- exports.isURL = isURL;
11
+ export { isURL };
@@ -1,10 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isValidDimension = void 0;
4
- const isNumber_1 = require("./isNumber");
5
- const substr_1 = require("./substr");
1
+ import { isNumber } from './isNumber';
2
+ import { substr } from './substr';
6
3
  const isValidDimension = function (st) {
7
- if (typeof st === 'string' && (st.length > 0) && ((st.indexOf('calc') === 0) || (0, isNumber_1.isNumber)((0, substr_1.substr)(st, 0, 1)))) {
4
+ if (typeof st === 'string' && (st.length > 0) && ((st.indexOf('calc') === 0) || isNumber(substr(st, 0, 1)))) {
8
5
  let el = document.createElement('div');
9
6
  el.style.width = st;
10
7
  let res = !!el.style.width.length;
@@ -13,4 +10,4 @@ const isValidDimension = function (st) {
13
10
  }
14
11
  return false;
15
12
  };
16
- exports.isValidDimension = isValidDimension;
13
+ export { isValidDimension };
@@ -1,16 +1,13 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isValidName = void 0;
4
- const isString_1 = require("./isString");
1
+ import { isString } from './isString';
5
2
  const isValidName = function (...args) {
6
3
  if (!args.length) {
7
4
  return false;
8
5
  }
9
6
  for (let arg of args) {
10
- if (!(0, isString_1.isString)(arg) || !/^[$A-Z_][0-9A-Z_$]*$/i.test(arg)) {
7
+ if (!isString(arg) || !/^[$A-Z_][0-9A-Z_$]*$/i.test(arg)) {
11
8
  return false;
12
9
  }
13
10
  }
14
11
  return true;
15
12
  };
16
- exports.isValidName = isValidName;
13
+ export { isValidName };
@@ -1,15 +1,12 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isValue = void 0;
4
- const isNull_1 = require("./isNull");
1
+ import { isNull } from './isNull';
5
2
  const isValue = function (...args) {
6
3
  if (!args.length)
7
4
  return false;
8
5
  for (let a of args) {
9
- if (typeof a === 'object' && !(0, isNull_1.isNull)(a)) {
6
+ if (typeof a === 'object' && !isNull(a)) {
10
7
  return false;
11
8
  }
12
9
  }
13
10
  return true;
14
11
  };
15
- exports.isValue = isValue;
12
+ export { isValue };
package/dist/fn/isVue.js CHANGED
@@ -1,6 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isVue = void 0;
4
1
  const isVue = function (...args) {
5
2
  if (!args.length) {
6
3
  return false;
@@ -26,4 +23,4 @@ const isVue = function (...args) {
26
23
  }
27
24
  return true;
28
25
  };
29
- exports.isVue = isVue;
26
+ export { isVue };
@@ -1,15 +1,12 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.iterate = void 0;
4
- const removePrivateProp_1 = require("./removePrivateProp");
5
- const each_1 = require("./each");
1
+ import { removePrivateProp } from './removePrivateProp';
2
+ import { each } from './each';
6
3
  const iterate = function (obj, fn, noPrivate = false, reverse = false) {
7
4
  if (obj !== null && typeof obj === 'object') {
8
- let iter = Object.keys(noPrivate ? (0, removePrivateProp_1.removePrivateProp)(obj) : obj);
5
+ let iter = Object.keys(noPrivate ? removePrivateProp(obj) : obj);
9
6
  if (reverse) {
10
7
  iter.reverse();
11
8
  }
12
- (0, each_1.each)(iter, (prop) => {
9
+ each(iter, (prop) => {
13
10
  if (fn(obj[prop], prop) === false) {
14
11
  return false;
15
12
  }
@@ -17,4 +14,4 @@ const iterate = function (obj, fn, noPrivate = false, reverse = false) {
17
14
  }
18
15
  return obj;
19
16
  };
20
- exports.iterate = iterate;
17
+ export { iterate };
@@ -1,6 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.lightenDarkenHex = void 0;
4
1
  const lightenDarkenHex = function (hex, amt) {
5
2
  if (hex && amt) {
6
3
  let ht = hex[0] === '#';
@@ -27,4 +24,4 @@ const lightenDarkenHex = function (hex, amt) {
27
24
  return (ht ? '#' : '') + (g | (b << 8) | (r << 16)).toString(16);
28
25
  }
29
26
  };
30
- exports.lightenDarkenHex = lightenDarkenHex;
27
+ export { lightenDarkenHex };
package/dist/fn/link.js CHANGED
@@ -1,16 +1,13 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.link = void 0;
4
- const treatAjaxArguments_1 = require("./treatAjaxArguments");
5
- const getLoader_1 = require("./getLoader");
6
- const defaultPreLinkFunction_1 = require("./defaultPreLinkFunction");
7
- const ajax_1 = require("./ajax");
8
- const log_1 = require("./log");
9
- const isObject_1 = require("./isObject");
10
- const callback_1 = require("./callback");
11
- const setNavigationVars_1 = require("./setNavigationVars");
1
+ import { treatAjaxArguments } from './treatAjaxArguments';
2
+ import { getLoader } from './getLoader';
3
+ import { defaultPreLinkFunction } from './defaultPreLinkFunction';
4
+ import { ajax } from './ajax';
5
+ import { log } from './log';
6
+ import { isObject } from './isObject';
7
+ import { callback } from './callback';
8
+ import { setNavigationVars } from './setNavigationVars';
12
9
  const link = function (...args) {
13
- let cfg = (0, treatAjaxArguments_1.treatAjaxArguments)(args);
10
+ let cfg = treatAjaxArguments(args);
14
11
  let ok = true;
15
12
  /* If we can't find a correct link we load the current URL */
16
13
  if (!cfg) {
@@ -44,7 +41,7 @@ const link = function (...args) {
44
41
  }, 0);
45
42
  return false;
46
43
  }
47
- if ((0, getLoader_1.getLoader)(cfg.url)) {
44
+ if (getLoader(cfg.url)) {
48
45
  return false;
49
46
  }
50
47
  /* Opens an external page in a new window */
@@ -62,8 +59,8 @@ const link = function (...args) {
62
59
  if (cfg.successFn) {
63
60
  ok = cfg.successFn(cfg.url);
64
61
  }
65
- else if (defaultPreLinkFunction_1.defaultPreLinkFunction) {
66
- ok = (0, defaultPreLinkFunction_1.defaultPreLinkFunction)(cfg.url, cfg.force, cfg.ele);
62
+ else if (defaultPreLinkFunction) {
63
+ ok = defaultPreLinkFunction(cfg.url, cfg.force, cfg.ele);
67
64
  /*
68
65
  if (ok.data !== undefined) {
69
66
  extend(cfg.obj, ok.data);
@@ -77,14 +74,14 @@ const link = function (...args) {
77
74
  }
78
75
  /** todo Do we keep obj in the unique string or do we make that only one concurrent connection to the same address can occur at the same time? */
79
76
  let errSt = bbn._('The Ajax call to') + ' ' + cfg.url + ' ';
80
- return (0, ajax_1.ajax)(cfg.url, cfg.datatype, cfg.obj, function (res) {
77
+ return ajax(cfg.url, cfg.datatype, cfg.obj, function (res) {
81
78
  if (!res) {
82
- (0, log_1.log)(errSt + bbn._('returned no answer'));
79
+ log(errSt + bbn._('returned no answer'));
83
80
  }
84
- if ((0, isObject_1.isObject)(res)) {
81
+ if (isObject(res)) {
85
82
  // If there's nothing in the result, just an empty object, the callback stops here and the URL is not changed
86
83
  if (Object.keys(res).length === 0) {
87
- (0, log_1.log)(errSt + bbn._('returned an empty object'));
84
+ log(errSt + bbn._('returned an empty object'));
88
85
  }
89
86
  if (res.new_url) {
90
87
  res.old_path = cfg.url;
@@ -94,10 +91,10 @@ const link = function (...args) {
94
91
  res.old_path = cfg.url;
95
92
  }
96
93
  }
97
- if ((0, callback_1.callback)(cfg.url, res, cfg.successFn, null, cfg.ele) && res.noNav === undefined) {
94
+ if (callback(cfg.url, res, cfg.successFn, null, cfg.ele) && res.noNav === undefined) {
98
95
  // This solution is not very clean (we can't shorten a URL)
99
96
  if (bbn.env.path.indexOf(cfg.url) !== 0) {
100
- (0, setNavigationVars_1.setNavigationVars)(cfg.url, (res.title ? res.title + ' - ' : '') + bbn.env.siteTitle);
97
+ setNavigationVars(cfg.url, (res.title ? res.title + ' - ' : '') + bbn.env.siteTitle);
101
98
  }
102
99
  }
103
100
  }, cfg.errorFn || null);
@@ -105,4 +102,4 @@ const link = function (...args) {
105
102
  }
106
103
  return true;
107
104
  };
108
- exports.link = link;
105
+ export { link };
package/dist/fn/log.js CHANGED
@@ -1,14 +1,11 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.log = void 0;
4
- const isFunction_1 = require("./isFunction");
1
+ import { isFunction } from './isFunction';
5
2
  const log = function (...args) {
6
3
  if (window.console !== undefined) {
7
4
  let cfg;
8
5
  let level = 5;
9
6
  let fn = 'log';
10
7
  if (args[0] && typeof args[0] === 'object' && args[0]._bbn_console_style) {
11
- if (args[0]._bbn_console_mode && (0, isFunction_1.isFunction)(console[args[0]._bbn_console_mode])) {
8
+ if (args[0]._bbn_console_mode && isFunction(console[args[0]._bbn_console_mode])) {
12
9
  fn = args[0]._bbn_console_mode;
13
10
  }
14
11
  else {
@@ -33,4 +30,4 @@ const log = function (...args) {
33
30
  }
34
31
  return this;
35
32
  };
36
- exports.log = log;
33
+ export { log };
@@ -1,14 +1,11 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.makeReactive = void 0;
4
- const log_1 = require("./log");
5
- const createObject_1 = require("./createObject");
6
- const isSymbol_1 = require("./isSymbol");
7
- const isNumber_1 = require("./isNumber");
8
- const isArray_1 = require("./isArray");
9
- const warning_1 = require("./warning");
10
- const isFunction_1 = require("./isFunction");
11
- const isSame_1 = require("./isSame");
1
+ import { log } from './log';
2
+ import { createObject } from './createObject';
3
+ import { isSymbol } from './isSymbol';
4
+ import { isNumber } from './isNumber';
5
+ import { isArray } from './isArray';
6
+ import { warning } from './warning';
7
+ import { isFunction } from './isFunction';
8
+ import { isSame } from './isSame';
12
9
  const makeReactive = function (obj, onSet, parent, parentProp) {
13
10
  const parentString = (parent === null || parent === void 0 ? void 0 : parent.$cid) || '';
14
11
  const prefix = '__bbn_' + (parentString ? parentString + '_' : '');
@@ -17,11 +14,11 @@ const makeReactive = function (obj, onSet, parent, parentProp) {
17
14
  return obj;
18
15
  }
19
16
  if (parent && parent.$options && parent.$options.name === 'bbn-loadbar') {
20
- (0, log_1.log)(['MAKING bbn-loadbar', obj]);
17
+ log(['MAKING bbn-loadbar', obj]);
21
18
  }
22
19
  if (!obj.__bbnWatchers) {
23
20
  Reflect.defineProperty(obj, '__bbnWatchers', {
24
- value: (0, createObject_1.createObject)(),
21
+ value: createObject(),
25
22
  writable: true,
26
23
  configurable: true,
27
24
  enumerable: false,
@@ -31,22 +28,22 @@ const makeReactive = function (obj, onSet, parent, parentProp) {
31
28
  get(target, key) {
32
29
  const realValue = Reflect.get(target, key);
33
30
  const realTarget = target.__bbnRoot || target;
34
- if ((0, isSymbol_1.isSymbol)(key)) {
31
+ if (isSymbol(key)) {
35
32
  return Reflect.get(realTarget, key);
36
33
  }
37
34
  const propName = parentProp ? parentProp + '.' + key : key;
38
- const hiddenKey = prefix + ((0, isNumber_1.isNumber)(key) ? key.toString() : key);
35
+ const hiddenKey = prefix + (isNumber(key) ? key.toString() : key);
39
36
  if (['fill', 'pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'].includes(key) &&
40
- (0, isArray_1.isArray)(target)) {
37
+ isArray(target)) {
41
38
  return function (...args) {
42
39
  let res = realTarget[key](...args);
43
- (0, warning_1.warning)('DOING ARRAY STUFF');
44
- (0, log_1.log)(target.__bbnParent);
40
+ warning('DOING ARRAY STUFF');
41
+ log(target.__bbnParent);
45
42
  onSet(target, 'length', parent);
46
43
  return res;
47
44
  };
48
45
  }
49
- if ((0, isFunction_1.isFunction)(realValue)) {
46
+ if (isFunction(realValue)) {
50
47
  return realValue;
51
48
  }
52
49
  if (key === '__bbnRoot') {
@@ -71,7 +68,7 @@ const makeReactive = function (obj, onSet, parent, parentProp) {
71
68
  if (key.indexOf('__bbn_') === 0) {
72
69
  return Reflect.get(target, key);
73
70
  }
74
- if (key === 'length' && (0, isArray_1.isArray)(target.__bbnRoot || target)) {
71
+ if (key === 'length' && isArray(target.__bbnRoot || target)) {
75
72
  return realTarget.length;
76
73
  }
77
74
  if (!(key in target)) {
@@ -99,18 +96,18 @@ const makeReactive = function (obj, onSet, parent, parentProp) {
99
96
  return realValue;
100
97
  },
101
98
  set(target, key, value) {
102
- if ((0, isSymbol_1.isSymbol)(key)) {
99
+ if (isSymbol(key)) {
103
100
  return Reflect.get(target, key, value);
104
101
  }
105
102
  const realTarget = target.__bbnRoot || target;
106
103
  const propName = parentProp ? parentProp + '.' + key : key;
107
- if ((0, isSymbol_1.isSymbol)(key)) {
104
+ if (isSymbol(key)) {
108
105
  return Reflect.get(target, key);
109
106
  }
110
107
  if (parent && parent.$options && parent.$options.name === 'bbn-loadbar') {
111
- (0, log_1.log)(['Setting proxy prop in ' + parent.$options.name, target, key, value]);
108
+ log(['Setting proxy prop in ' + parent.$options.name, target, key, value]);
112
109
  }
113
- if (!(0, isSame_1.isSame)(realTarget[key], value)) {
110
+ if (!isSame(realTarget[key], value)) {
114
111
  if (key.indexOf('__bbn_') === 0) {
115
112
  Reflect.defineProperty(realTarget, key, {
116
113
  value: makeReactive(value, onSet, parent, propName),
@@ -123,7 +120,7 @@ const makeReactive = function (obj, onSet, parent, parentProp) {
123
120
  if (value &&
124
121
  typeof value === 'object' &&
125
122
  [undefined, Object, Array].includes(value.constructor)) {
126
- const hiddenKey = prefix + ((0, isNumber_1.isNumber)(key) ? key.toString() : key);
123
+ const hiddenKey = prefix + (isNumber(key) ? key.toString() : key);
127
124
  Reflect.defineProperty(realTarget, hiddenKey, {
128
125
  value: makeReactive(value, onSet, parent, propName),
129
126
  writable: true,
@@ -136,11 +133,11 @@ const makeReactive = function (obj, onSet, parent, parentProp) {
136
133
  }
137
134
  }
138
135
  if (parent && parent.$options && parent.$options.name === 'bbn-loadbar') {
139
- (0, log_1.log)([
136
+ log([
140
137
  'Setting proxy prop in ' +
141
138
  parent.$options.name +
142
139
  ' ' +
143
- ((0, isNumber_1.isNumber)(key) ? key.toString() : key),
140
+ (isNumber(key) ? key.toString() : key),
144
141
  value,
145
142
  target,
146
143
  ]);
@@ -153,11 +150,11 @@ const makeReactive = function (obj, onSet, parent, parentProp) {
153
150
  defineProperty(target, key, description) {
154
151
  const realTarget = target;
155
152
  const propName = parentProp ? parentProp + '.' + key : key;
156
- if (key === '__bbnWatchers' || (0, isSymbol_1.isSymbol)(key) || key.indexOf('__bbn_') === 0) {
153
+ if (key === '__bbnWatchers' || isSymbol(key) || key.indexOf('__bbn_') === 0) {
157
154
  Reflect.defineProperty(realTarget, key, description);
158
155
  }
159
156
  else {
160
- const hiddenKey = prefix + ((0, isNumber_1.isNumber)(key) ? key.toString() : key);
157
+ const hiddenKey = prefix + (isNumber(key) ? key.toString() : key);
161
158
  Reflect.defineProperty(realTarget, hiddenKey, {
162
159
  value: makeReactive(description.value, onSet, parent, propName),
163
160
  writable: true,
@@ -174,7 +171,7 @@ const makeReactive = function (obj, onSet, parent, parentProp) {
174
171
  Reflect.deleteProperty(realTarget, key);
175
172
  }
176
173
  else {
177
- const hiddenKey = prefix + ((0, isNumber_1.isNumber)(key) ? key.toString() : key);
174
+ const hiddenKey = prefix + (isNumber(key) ? key.toString() : key);
178
175
  Reflect.deleteProperty(realTarget, hiddenKey);
179
176
  Reflect.deleteProperty(target, key);
180
177
  }
@@ -185,4 +182,4 @@ const makeReactive = function (obj, onSet, parent, parentProp) {
185
182
  }
186
183
  return obj;
187
184
  };
188
- exports.makeReactive = makeReactive;
185
+ export { makeReactive };
package/dist/fn/map.js CHANGED
@@ -1,14 +1,11 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.map = void 0;
4
- const isArray_1 = require("./isArray");
1
+ import { isArray } from './isArray';
5
2
  const map = function (arr, fn, deepProp, level = 0) {
6
3
  return arr.map((a, i) => {
7
4
  a = fn(a, i, level);
8
- if (deepProp && a[deepProp] && (0, isArray_1.isArray)(a[deepProp])) {
5
+ if (deepProp && a[deepProp] && isArray(a[deepProp])) {
9
6
  a[deepProp] = map(a[deepProp], fn, deepProp, level + 1);
10
7
  }
11
8
  return a;
12
9
  });
13
10
  };
14
- exports.map = map;
11
+ export { map };
package/dist/fn/md5.js CHANGED
@@ -1,6 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.md5 = void 0;
4
1
  const md5 = function (st) {
5
2
  var hc = '0123456789abcdef';
6
3
  function rh(n) {
@@ -121,4 +118,4 @@ const md5 = function (st) {
121
118
  }
122
119
  return rh(a) + rh(b) + rh(c) + rh(d);
123
120
  };
124
- exports.md5 = md5;
121
+ export { md5 };
package/dist/fn/money.js CHANGED
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.money = void 0;
4
- const isNumber_1 = require("./isNumber");
1
+ import { isNumber } from './isNumber';
5
2
  const money = function (val, kilo, currency, novalue, decimal, thousands, precision) {
6
3
  /*
7
4
  money(val, kilo){
@@ -60,7 +57,7 @@ const money = function (val, kilo, currency, novalue, decimal, thousands, precis
60
57
  ? bbn.env.money.novalue
61
58
  : false;
62
59
  }
63
- if (!(0, isNumber_1.isNumber)(precision)) {
60
+ if (!isNumber(precision)) {
64
61
  precision = kilo ? 3 : 0;
65
62
  }
66
63
  if ((val === 0) && (typeof precision === 'number') && (precision > 0)) {
@@ -101,4 +98,4 @@ const money = function (val, kilo, currency, novalue, decimal, thousands, precis
101
98
  return i && (a.length - i - decimalPosition) % 3 === 0 && i < decimalIdx ? thousands + c : c;
102
99
  }) + (currency ? ' ' + currency : ''));
103
100
  };
104
- exports.money = money;
101
+ export { money };
package/dist/fn/move.js CHANGED
@@ -1,6 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.move = void 0;
4
1
  const move = function (arr, fromIndex, toIndex) {
5
2
  if (toIndex >= arr.length) {
6
3
  let k = toIndex - arr.length;
@@ -11,4 +8,4 @@ const move = function (arr, fromIndex, toIndex) {
11
8
  arr.splice(toIndex, 0, arr.splice(fromIndex, 1)[0]);
12
9
  return arr;
13
10
  };
14
- exports.move = move;
11
+ export { move };
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.multiorder = void 0;
4
- const _compareValues_1 = require("./_compareValues");
1
+ import { _compareValues } from './_compareValues';
5
2
  const multiorder = function (arr, orders) {
6
3
  let currentOrders;
7
4
  if (!Array.isArray(orders) && typeof orders === 'object') {
@@ -14,7 +11,7 @@ const multiorder = function (arr, orders) {
14
11
  return r.sort((a, b) => {
15
12
  let res;
16
13
  for (let order of currentOrders) {
17
- res = (0, _compareValues_1._compareValues)(a, b, order.field, order.dir);
14
+ res = _compareValues(a, b, order.field, order.dir);
18
15
  if (res !== 0) {
19
16
  return res;
20
17
  }
@@ -22,4 +19,4 @@ const multiorder = function (arr, orders) {
22
19
  return 0;
23
20
  });
24
21
  };
25
- exports.multiorder = multiorder;
22
+ export { multiorder };
package/dist/fn/nl2br.js CHANGED
@@ -1,8 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.nl2br = void 0;
4
- const replaceAll_1 = require("./replaceAll");
1
+ import { replaceAll } from './replaceAll';
5
2
  const nl2br = function (st, keepNl) {
6
- return (0, replaceAll_1.replaceAll)('\n', '<br>' + (keepNl ? '\n' : ''), st);
3
+ return replaceAll('\n', '<br>' + (keepNl ? '\n' : ''), st);
7
4
  };
8
- exports.nl2br = nl2br;
5
+ export { nl2br };
@@ -1,10 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.numProperties = void 0;
4
1
  const numProperties = function (obj) {
5
2
  if (!obj || typeof obj !== 'object') {
6
3
  return 0;
7
4
  }
8
5
  return Object.keys(obj).length;
9
6
  };
10
- exports.numProperties = numProperties;
7
+ export { numProperties };
@@ -1,32 +1,29 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.objectToFormData = void 0;
4
- const isArray_1 = require("./isArray");
5
- const each_1 = require("./each");
6
- const isObject_1 = require("./isObject");
7
- const iterate_1 = require("./iterate");
8
- const isNull_1 = require("./isNull");
1
+ import { isArray } from './isArray';
2
+ import { each } from './each';
3
+ import { isObject } from './isObject';
4
+ import { iterate } from './iterate';
5
+ import { isNull } from './isNull';
9
6
  const objectToFormData = function (obj, key = '', ignoreList) {
10
7
  let formData = new FormData();
11
8
  let appendFormData = (data, key = '') => {
12
- if (!ignoreList || ((0, isArray_1.isArray)(ignoreList) && !ignoreList.includes(key))) {
9
+ if (!ignoreList || (isArray(ignoreList) && !ignoreList.includes(key))) {
13
10
  if (data instanceof File) {
14
11
  formData.append(key, data);
15
12
  }
16
- else if ((0, isArray_1.isArray)(data)) {
17
- (0, each_1.each)(data, (v, i) => {
13
+ else if (isArray(data)) {
14
+ each(data, (v, i) => {
18
15
  appendFormData(v, key + '[' + i + ']');
19
16
  });
20
17
  }
21
- else if ((0, isObject_1.isObject)(data) && Object.keys(data).length) {
22
- (0, iterate_1.iterate)(data, (v, i) => {
18
+ else if (isObject(data) && Object.keys(data).length) {
19
+ iterate(data, (v, i) => {
23
20
  if (i in data) {
24
21
  appendFormData(v, !key ? i : key + '[' + i + ']');
25
22
  }
26
23
  });
27
24
  }
28
25
  else {
29
- if (!(0, isNull_1.isNull)(data) && data !== undefined) {
26
+ if (!isNull(data) && data !== undefined) {
30
27
  formData.append(key, data);
31
28
  }
32
29
  }
@@ -35,4 +32,4 @@ const objectToFormData = function (obj, key = '', ignoreList) {
35
32
  appendFormData(obj, key);
36
33
  return formData;
37
34
  };
38
- exports.objectToFormData = objectToFormData;
35
+ export { objectToFormData };