@bbn/bbn 1.0.34 → 1.0.35

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.js +1105 -824
  2. package/dist/fn/_addLoader.js +5 -5
  3. package/dist/fn/_compareValues.js +3 -2
  4. package/dist/fn/_deleteLoader.js +13 -11
  5. package/dist/fn/abort.js +2 -2
  6. package/dist/fn/abortURL.js +2 -2
  7. package/dist/fn/addColors.js +12 -12
  8. package/dist/fn/addInputs.js +12 -10
  9. package/dist/fn/addStyle.js +2 -2
  10. package/dist/fn/adjustHeight.js +2 -2
  11. package/dist/fn/adjustSize.js +6 -6
  12. package/dist/fn/adjustWidth.js +2 -2
  13. package/dist/fn/ajax.js +21 -21
  14. package/dist/fn/analyzeFunction.js +28 -28
  15. package/dist/fn/animateCss.js +6 -5
  16. package/dist/fn/arrayBuffer2String.js +1 -1
  17. package/dist/fn/arrayFromProp.js +3 -3
  18. package/dist/fn/autoExtend.js +1 -1
  19. package/dist/fn/baseName.js +4 -4
  20. package/dist/fn/br2nl.js +1 -1
  21. package/dist/fn/calendar.js +2 -2
  22. package/dist/fn/callback.js +11 -7
  23. package/dist/fn/camelToCss.js +1 -1
  24. package/dist/fn/camelize.js +1 -1
  25. package/dist/fn/canvasToImage.js +2 -2
  26. package/dist/fn/center.js +2 -2
  27. package/dist/fn/checkProps.js +2 -1
  28. package/dist/fn/checkPropsDetails.js +9 -8
  29. package/dist/fn/checkPropsOrDie.js +3 -2
  30. package/dist/fn/checkType.js +9 -5
  31. package/dist/fn/chrono.js +8 -8
  32. package/dist/fn/circularReplacer.js +3 -3
  33. package/dist/fn/clone.js +3 -3
  34. package/dist/fn/colorToHex.js +2 -2
  35. package/dist/fn/compare.js +1 -1
  36. package/dist/fn/compareConditions.js +7 -7
  37. package/dist/fn/copy.js +8 -6
  38. package/dist/fn/correctCase.js +2 -2
  39. package/dist/fn/count.js +3 -1
  40. package/dist/fn/crc32.js +8 -8
  41. package/dist/fn/createObject.js +16 -3
  42. package/dist/fn/cssExists.js +6 -6
  43. package/dist/fn/date.js +2 -2
  44. package/dist/fn/dateSQL.js +2 -2
  45. package/dist/fn/daysInMonth.js +2 -2
  46. package/dist/fn/deepPath.js +7 -6
  47. package/dist/fn/defaultAjaxAbortFunction.js +2 -1
  48. package/dist/fn/defaultAjaxErrorFunction.js +1 -1
  49. package/dist/fn/defaultAlertFunction.js +1 -1
  50. package/dist/fn/defaultConfirmFunction.js +2 -2
  51. package/dist/fn/defaultEndLoadingFunction.js +1 -1
  52. package/dist/fn/defaultErrorFunction.js +1 -1
  53. package/dist/fn/defaultHistoryFunction.js +1 -1
  54. package/dist/fn/defaultLinkFunction.js +1 -1
  55. package/dist/fn/defaultPostLinkFunction.js +1 -1
  56. package/dist/fn/defaultPreLinkFunction.js +1 -1
  57. package/dist/fn/defaultResizeFunction.js +1 -1
  58. package/dist/fn/defaultStartLoadingFunction.js +2 -1
  59. package/dist/fn/deleteProp.js +1 -1
  60. package/dist/fn/diffObj.js +13 -11
  61. package/dist/fn/dirName.js +2 -2
  62. package/dist/fn/download.js +6 -6
  63. package/dist/fn/downloadContent.js +5 -5
  64. package/dist/fn/each.js +3 -3
  65. package/dist/fn/eraseCookie.js +1 -1
  66. package/dist/fn/error.js +3 -3
  67. package/dist/fn/escapeDquotes.js +1 -1
  68. package/dist/fn/escapeRegExp.js +1 -1
  69. package/dist/fn/escapeSquotes.js +1 -1
  70. package/dist/fn/escapeTicks.js +1 -1
  71. package/dist/fn/escapeUrl.js +7 -7
  72. package/dist/fn/extend.js +13 -9
  73. package/dist/fn/extendOut.js +9 -4
  74. package/dist/fn/fdate.js +2 -2
  75. package/dist/fn/fdatetime.js +2 -2
  76. package/dist/fn/fieldValue.js +2 -2
  77. package/dist/fn/fileExt.js +2 -2
  78. package/dist/fn/filter.js +8 -6
  79. package/dist/fn/filterToConditions.js +7 -6
  80. package/dist/fn/findAll.js +5 -4
  81. package/dist/fn/fori.js +5 -3
  82. package/dist/fn/forir.js +5 -3
  83. package/dist/fn/format.js +5 -5
  84. package/dist/fn/formatBytes.js +3 -2
  85. package/dist/fn/formatDate.js +1 -1
  86. package/dist/fn/formatSize.js +1 -1
  87. package/dist/fn/formdata.js +25 -25
  88. package/dist/fn/fromXml.js +14 -8
  89. package/dist/fn/ftime.js +2 -2
  90. package/dist/fn/getAllTags.js +2 -2
  91. package/dist/fn/getAncestors.js +2 -2
  92. package/dist/fn/getAttributes.js +3 -3
  93. package/dist/fn/getBrowserName.js +2 -2
  94. package/dist/fn/getBrowserVersion.js +2 -2
  95. package/dist/fn/getCookie.js +6 -6
  96. package/dist/fn/getCssVar.js +1 -1
  97. package/dist/fn/getDay.js +4 -4
  98. package/dist/fn/getDeviceType.js +2 -2
  99. package/dist/fn/getEventData.js +31 -31
  100. package/dist/fn/getField.js +5 -2
  101. package/dist/fn/getFieldValues.js +3 -3
  102. package/dist/fn/getHTMLOfSelection.js +5 -5
  103. package/dist/fn/getHtml.js +3 -2
  104. package/dist/fn/getLoader.js +2 -2
  105. package/dist/fn/getPath.js +23 -16
  106. package/dist/fn/getProp.js +1 -1
  107. package/dist/fn/getProperty.js +2 -2
  108. package/dist/fn/getRequestId.js +3 -3
  109. package/dist/fn/getRow.js +3 -1
  110. package/dist/fn/getScrollBarSize.js +6 -6
  111. package/dist/fn/getText.js +1 -1
  112. package/dist/fn/getTimeoff.js +1 -1
  113. package/dist/fn/happy.js +5 -1
  114. package/dist/fn/hash.js +4 -4
  115. package/dist/fn/hex2rgb.js +1 -1
  116. package/dist/fn/history.js +1 -1
  117. package/dist/fn/html2text.js +2 -2
  118. package/dist/fn/imageToCanvas.js +2 -2
  119. package/dist/fn/imgToBase64.js +3 -2
  120. package/dist/fn/info.js +5 -1
  121. package/dist/fn/init.js +17 -17
  122. package/dist/fn/isActiveInterface.js +3 -2
  123. package/dist/fn/isArray.js +7 -2
  124. package/dist/fn/isBlob.js +7 -2
  125. package/dist/fn/isBoolean.js +7 -2
  126. package/dist/fn/isCanvas.js +7 -2
  127. package/dist/fn/isColor.js +7 -2
  128. package/dist/fn/isComment.js +7 -2
  129. package/dist/fn/isCp.js +8 -3
  130. package/dist/fn/isDate.js +7 -2
  131. package/dist/fn/isDesktopDevice.js +1 -1
  132. package/dist/fn/isDimension.js +7 -2
  133. package/dist/fn/isDom.js +7 -2
  134. package/dist/fn/isEmail.js +8 -3
  135. package/dist/fn/isEmpty.js +1 -1
  136. package/dist/fn/isEvent.js +7 -2
  137. package/dist/fn/isFocused.js +1 -1
  138. package/dist/fn/isFunction.js +7 -2
  139. package/dist/fn/isHostname.js +7 -2
  140. package/dist/fn/isIP.js +7 -2
  141. package/dist/fn/isInside.js +6 -6
  142. package/dist/fn/isInt.js +7 -2
  143. package/dist/fn/isIterable.js +1 -1
  144. package/dist/fn/isMobile.js +1 -1
  145. package/dist/fn/isMobileDevice.js +1 -1
  146. package/dist/fn/isNull.js +7 -2
  147. package/dist/fn/isNumber.js +7 -2
  148. package/dist/fn/isObject.js +7 -2
  149. package/dist/fn/isPercent.js +7 -2
  150. package/dist/fn/isPrimitive.js +7 -2
  151. package/dist/fn/isPromise.js +7 -2
  152. package/dist/fn/isPropSize.js +3 -3
  153. package/dist/fn/isSQLDate.js +7 -2
  154. package/dist/fn/isSame.js +7 -7
  155. package/dist/fn/isString.js +7 -2
  156. package/dist/fn/isSymbol.js +7 -2
  157. package/dist/fn/isTabletDevice.js +1 -1
  158. package/dist/fn/isURL.js +7 -2
  159. package/dist/fn/isValidDimension.js +3 -3
  160. package/dist/fn/isValidName.js +7 -2
  161. package/dist/fn/isValue.js +7 -2
  162. package/dist/fn/isVue.js +11 -4
  163. package/dist/fn/iterate.js +5 -3
  164. package/dist/fn/lightenDarkenHex.js +3 -3
  165. package/dist/fn/link.js +11 -7
  166. package/dist/fn/log.js +10 -6
  167. package/dist/fn/makeReactive.js +27 -23
  168. package/dist/fn/map.js +3 -2
  169. package/dist/fn/md5.js +1 -1
  170. package/dist/fn/money.js +5 -5
  171. package/dist/fn/move.js +2 -2
  172. package/dist/fn/multiorder.js +7 -6
  173. package/dist/fn/nl2br.js +1 -1
  174. package/dist/fn/numProperties.js +1 -1
  175. package/dist/fn/objectToFormData.js +7 -5
  176. package/dist/fn/order.js +2 -1
  177. package/dist/fn/outerHeight.js +3 -3
  178. package/dist/fn/outerWidth.js +3 -3
  179. package/dist/fn/percent.js +1 -1
  180. package/dist/fn/pickValue.js +1 -1
  181. package/dist/fn/post.js +7 -3
  182. package/dist/fn/postOut.js +2 -2
  183. package/dist/fn/printf.js +1 -1
  184. package/dist/fn/quotes2html.js +1 -1
  185. package/dist/fn/randomInt.js +1 -1
  186. package/dist/fn/randomString.js +6 -6
  187. package/dist/fn/removeAccents.js +1 -1
  188. package/dist/fn/removeEmpty.js +3 -3
  189. package/dist/fn/removeExtraSpaces.js +1 -1
  190. package/dist/fn/removeHtmlComments.js +1 -1
  191. package/dist/fn/removePrivateProp.js +3 -2
  192. package/dist/fn/removeTrailingChars.js +1 -1
  193. package/dist/fn/repeat.js +1 -1
  194. package/dist/fn/replaceAll.js +2 -1
  195. package/dist/fn/replaceSelection.js +6 -6
  196. package/dist/fn/resize.js +15 -15
  197. package/dist/fn/rgb2hex.js +1 -1
  198. package/dist/fn/riterate.js +1 -1
  199. package/dist/fn/roundDecimal.js +1 -1
  200. package/dist/fn/sanitize.js +7 -6
  201. package/dist/fn/search.js +9 -6
  202. package/dist/fn/selectElementText.js +4 -4
  203. package/dist/fn/selector.js +1 -1
  204. package/dist/fn/setCookie.js +4 -4
  205. package/dist/fn/setCssVar.js +1 -1
  206. package/dist/fn/setNavigationVars.js +5 -5
  207. package/dist/fn/setProp.js +3 -1
  208. package/dist/fn/setProperty.js +9 -9
  209. package/dist/fn/shorten.js +1 -1
  210. package/dist/fn/shortenObj.js +4 -3
  211. package/dist/fn/shuffle.js +4 -3
  212. package/dist/fn/simpleHash.js +3 -3
  213. package/dist/fn/simpleHash1.js +4 -4
  214. package/dist/fn/simpleHash2.js +4 -4
  215. package/dist/fn/stat.js +1 -1
  216. package/dist/fn/string2ArrayBuffer.js +1 -1
  217. package/dist/fn/submit.js +3 -3
  218. package/dist/fn/substr.js +1 -1
  219. package/dist/fn/sum.js +4 -4
  220. package/dist/fn/timestamp.js +1 -1
  221. package/dist/fn/toCSV.js +10 -7
  222. package/dist/fn/toggleFullScreen.js +1 -1
  223. package/dist/fn/translate.js +3 -3
  224. package/dist/fn/treatAjaxArguments.js +4 -4
  225. package/dist/fn/trim.js +2 -1
  226. package/dist/fn/uniqString.js +14 -7
  227. package/dist/fn/unique.js +1 -1
  228. package/dist/fn/upload.js +6 -6
  229. package/dist/fn/warning.js +3 -3
  230. package/dist/index.js +241 -237
  231. package/package.json +1 -1
@@ -1,6 +1,7 @@
1
1
  import { checkPropsDetails } from './checkPropsDetails';
2
- const checkPropsOrDie = function (obj, props, checkEmpty = false) {
3
- let res = checkPropsDetails(obj, props, checkEmpty);
2
+ var checkPropsOrDie = function (obj, props, checkEmpty) {
3
+ if (checkEmpty === void 0) { checkEmpty = false; }
4
+ var res = checkPropsDetails(obj, props, checkEmpty);
4
5
  if (res.error) {
5
6
  throw new Error(res.error);
6
7
  }
@@ -5,13 +5,17 @@ import { isString } from './isString';
5
5
  import { correctCase } from './correctCase';
6
6
  import { error } from './error';
7
7
  import { log } from './log';
8
- const checkType = function (value, type, msg, ...logs) {
9
- let ok = false;
8
+ var checkType = function (value, type, msg) {
9
+ var logs = [];
10
+ for (var _i = 3; _i < arguments.length; _i++) {
11
+ logs[_i - 3] = arguments[_i];
12
+ }
13
+ var ok = false;
10
14
  if (!isArray(type)) {
11
15
  type = [type];
12
16
  }
13
- const typesList = [];
14
- each(type, (t) => {
17
+ var typesList = [];
18
+ each(type, function (t) {
15
19
  var _a;
16
20
  if (t === String) {
17
21
  t = 'string';
@@ -39,7 +43,7 @@ const checkType = function (value, type, msg, ...logs) {
39
43
  }
40
44
  }
41
45
  else if (!isString(t) || !isFunction(bbn.fn['is' + correctCase(t)])) {
42
- error(`The type ${t} is not recognized`);
46
+ error("The type ".concat(t, " is not recognized"));
43
47
  }
44
48
  else if (bbn.fn['is' + correctCase(t)](value)) {
45
49
  ok = true;
package/dist/fn/chrono.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { each } from './each';
2
- const _private = [];
3
- const startChrono = function (name) {
4
- let now = new Date().getTime();
5
- let h1 = 3600 * 1000;
2
+ var _private = [];
3
+ var startChrono = function (name) {
4
+ var now = new Date().getTime();
5
+ var h1 = 3600 * 1000;
6
6
  if (_private.length) {
7
- each(_private, (t, n) => {
7
+ each(_private, function (t, n) {
8
8
  if (now - t > h1) {
9
9
  delete _private[n];
10
10
  }
@@ -13,10 +13,10 @@ const startChrono = function (name) {
13
13
  }
14
14
  _private[name] = now;
15
15
  };
16
- const stopChrono = function (name) {
16
+ var stopChrono = function (name) {
17
17
  if (_private[name]) {
18
- let now = new Date().getTime();
19
- let diff = now - _private[name];
18
+ var now = new Date().getTime();
19
+ var diff = now - _private[name];
20
20
  return diff;
21
21
  }
22
22
  };
@@ -1,9 +1,9 @@
1
1
  import { isDom } from './isDom';
2
2
  import { isCp } from './isCp';
3
3
  import { log } from './log';
4
- const circularReplacer = function () {
5
- const visited = new WeakSet();
6
- return (key, value) => {
4
+ var circularReplacer = function () {
5
+ var visited = new WeakSet();
6
+ return function (key, value) {
7
7
  if (typeof value === 'object' && value !== null) {
8
8
  if (visited.has(value)) {
9
9
  return;
package/dist/fn/clone.js CHANGED
@@ -1,14 +1,14 @@
1
1
  import { isArray } from './isArray';
2
2
  import { isObject } from './isObject';
3
3
  import { extend } from './extend';
4
- const clone = function (obj) {
4
+ var clone = function (obj) {
5
5
  if (isArray(obj)) {
6
- return obj.slice().map((a) => {
6
+ return obj.slice().map(function (a) {
7
7
  return typeof a === 'object' ? clone(a) : a;
8
8
  });
9
9
  }
10
10
  if (isObject(obj)) {
11
- const o = Object.create(Object.getPrototypeOf(obj));
11
+ var o = Object.create(Object.getPrototypeOf(obj));
12
12
  return extend(true, o, obj);
13
13
  }
14
14
  return obj;
@@ -1,5 +1,5 @@
1
- const colorToHex = function (color) {
2
- let canvas = document.createElement('canvas').getContext('2d');
1
+ var colorToHex = function (color) {
2
+ var canvas = document.createElement('canvas').getContext('2d');
3
3
  canvas.fillStyle = color;
4
4
  return canvas.fillStyle;
5
5
  };
@@ -3,7 +3,7 @@ import { removeAccents } from './removeAccents';
3
3
  import { isNull } from './isNull';
4
4
  import { isObject } from './isObject';
5
5
  import { isSame } from './isSame';
6
- const compare = function (v1, v2, operator) {
6
+ var compare = function (v1, v2, operator) {
7
7
  switch (operator) {
8
8
  case '===':
9
9
  case '=':
@@ -1,23 +1,23 @@
1
1
  import { isArray } from './isArray';
2
2
  import { each } from './each';
3
3
  import { getProperty } from './getProperty';
4
- const compareConditions = function (data, filter) {
4
+ var compareConditions = function (data, filter) {
5
5
  if (!filter.conditions || !filter.logic || !isArray(filter.conditions)) {
6
6
  throw new Error('Error in compareConditions: the filter should an abject with conditions and logic properties and conditions should be an array of objects');
7
7
  }
8
- let ok = filter.logic === 'AND' ? true : false;
9
- each(filter.conditions, (a) => {
10
- let compare;
8
+ var ok = filter.logic === 'AND' ? true : false;
9
+ each(filter.conditions, function (a) {
10
+ var compare;
11
11
  if (a.conditions && isArray(a.conditions)) {
12
12
  compare = compareConditions(data, a);
13
13
  }
14
14
  else {
15
15
  compare = compare(getProperty(data, a.field), a.value, a.operator);
16
16
  if (compare) {
17
- let bits = a.field.split('.');
18
- let prop = bits.pop();
17
+ var bits = a.field.split('.');
18
+ var prop = bits.pop();
19
19
  if (bits.length) {
20
- each(bits, (b) => (data = data[b]));
20
+ each(bits, function (b) { return (data = data[b]); });
21
21
  }
22
22
  // Case where both are undefined: value and prop which doesn't exist; they are not the same!
23
23
  if (getProperty(data, prop) === undefined && a.value !== undefined) {
package/dist/fn/copy.js CHANGED
@@ -1,17 +1,19 @@
1
1
  import { isObject } from './isObject';
2
2
  import { isFunction } from './isFunction';
3
- const copy = function (st) {
4
- return new Promise((resolve) => {
3
+ var copy = function (st) {
4
+ return new Promise(function (resolve) {
5
+ var _a;
5
6
  if (st) {
6
7
  if (navigator && navigator.clipboard) {
7
8
  if (st instanceof Blob) {
8
- navigator.clipboard.write([new ClipboardItem({ [st.type.toString()]: st })]).then(() => {
9
+ navigator.clipboard.write([new ClipboardItem((_a = {}, _a[st.type.toString()] = st, _a))]).then(function () {
9
10
  resolve(true);
10
11
  });
11
12
  }
12
13
  else if (isObject(st) && isFunction(st.toBlob)) {
13
- st.toBlob((blob) => {
14
- navigator.clipboard.write([new ClipboardItem({ [blob.type.toString()]: blob })]).then(() => {
14
+ st.toBlob(function (blob) {
15
+ var _a;
16
+ navigator.clipboard.write([new ClipboardItem((_a = {}, _a[blob.type.toString()] = blob, _a))]).then(function () {
15
17
  resolve(true);
16
18
  });
17
19
  });
@@ -22,7 +24,7 @@ const copy = function (st) {
22
24
  }
23
25
  return;
24
26
  }
25
- let input = document.createElement('textarea');
27
+ var input = document.createElement('textarea');
26
28
  input.style.opacity = '0';
27
29
  input.value = st;
28
30
  document.body.appendChild(input);
@@ -1,4 +1,4 @@
1
- const correctCase = function (str) {
2
- return str.replace(/[A-z]{1}/, (c) => c.toUpperCase());
1
+ var correctCase = function (str) {
2
+ return str.replace(/[A-z]{1}/, function (c) { return c.toUpperCase(); });
3
3
  };
4
4
  export { correctCase };
package/dist/fn/count.js CHANGED
@@ -1,5 +1,7 @@
1
1
  import { filter } from './filter';
2
- const count = function (arr, prop, val = null, operator = '=') {
2
+ var count = function (arr, prop, val, operator) {
3
+ if (val === void 0) { val = null; }
4
+ if (operator === void 0) { operator = '='; }
3
5
  return filter(arr, prop, val, operator).length || 0;
4
6
  };
5
7
  export { count };
package/dist/fn/crc32.js CHANGED
@@ -1,16 +1,16 @@
1
1
  // this is a test
2
- const crc32Table = [];
3
- for (let i = 0; i < 256; i++) {
4
- let c = i;
5
- for (let j = 0; j < 8; j++) {
2
+ var crc32Table = [];
3
+ for (var i = 0; i < 256; i++) {
4
+ var c = i;
5
+ for (var j = 0; j < 8; j++) {
6
6
  c = c & 1 ? 0xedb88320 ^ (c >>> 1) : c >>> 1;
7
7
  }
8
8
  crc32Table.push(c);
9
9
  }
10
- const crc32 = function (str) {
11
- let crc = 0 ^ -1;
12
- for (let i = 0; i < str.length; i++) {
13
- const charCode = str.charCodeAt(i);
10
+ var crc32 = function (str) {
11
+ var crc = 0 ^ -1;
12
+ for (var i = 0; i < str.length; i++) {
13
+ var charCode = str.charCodeAt(i);
14
14
  crc = (crc >>> 8) ^ crc32Table[(crc ^ charCode) & 0xff];
15
15
  }
16
16
  return (crc ^ -1) >>> 0; // Make sure the result is a 32-bit positive integer
@@ -1,8 +1,21 @@
1
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
2
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
3
+ if (ar || !(i in from)) {
4
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
5
+ ar[i] = from[i];
6
+ }
7
+ }
8
+ return to.concat(ar || Array.prototype.slice.call(from));
9
+ };
1
10
  import { extend } from './extend';
2
- const createObject = function (...args) {
3
- const obj = Object.create(null);
11
+ var createObject = function () {
12
+ var args = [];
13
+ for (var _i = 0; _i < arguments.length; _i++) {
14
+ args[_i] = arguments[_i];
15
+ }
16
+ var obj = Object.create(null);
4
17
  if (args.length) {
5
- extend(obj, ...args);
18
+ extend.apply(void 0, __spreadArray([obj], args, false));
6
19
  }
7
20
  return obj;
8
21
  };
@@ -1,10 +1,10 @@
1
1
  //import { log } from './log';
2
2
  import { escapeRegExp } from './escapeRegExp';
3
- const cssExists = function (f) {
4
- let ok;
5
- let rules;
6
- let css = document.styleSheets;
7
- for (let sx = 0; sx < css.length; sx++) {
3
+ var cssExists = function (f) {
4
+ var ok;
5
+ var rules;
6
+ var css = document.styleSheets;
7
+ for (var sx = 0; sx < css.length; sx++) {
8
8
  ok = 1;
9
9
  try {
10
10
  rules = css[sx].rules || css[sx].cssRules;
@@ -17,7 +17,7 @@ const cssExists = function (f) {
17
17
  }
18
18
  if (ok) {
19
19
  //log(rules);
20
- for (let cx = 0; cx < rules.length; cx++) {
20
+ for (var cx = 0; cx < rules.length; cx++) {
21
21
  //log(rules[cx].selectorText);
22
22
  if (new RegExp('(^|\\s)' + escapeRegExp(f) + '(\\{|\\s)', 'g').test(rules[cx].selectorText)) {
23
23
  return true;
package/dist/fn/date.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { isNumber } from './isNumber';
2
2
  import { substr } from './substr';
3
3
  import { isDate } from './isDate';
4
- const date = function (v) {
5
- let d = false, t = typeof v;
4
+ var date = function (v) {
5
+ var d = false, t = typeof v;
6
6
  if (v === undefined) {
7
7
  return new Date();
8
8
  }
@@ -1,6 +1,6 @@
1
1
  import { date } from './date';
2
- const dateSQL = function (v, dayOnly) {
3
- let value = date(v);
2
+ var dateSQL = function (v, dayOnly) {
3
+ var value = date(v);
4
4
  if (value) {
5
5
  return dayjs(value).format('YYYY-MM-DD' + (dayOnly ? '' : ' HH:mm:ss'));
6
6
  }
@@ -1,6 +1,6 @@
1
1
  import { date } from './date';
2
- const daysInMonth = function (v) {
3
- let d = date(v);
2
+ var daysInMonth = function (v) {
3
+ var d = date(v);
4
4
  if (d) {
5
5
  return dayjs(d).daysInMonth();
6
6
  }
@@ -1,18 +1,19 @@
1
1
  import { search } from './search';
2
2
  import { each } from './each';
3
3
  import { isArray } from './isArray';
4
- const deepPath = function (arr, filter, deepProperty, res = []) {
5
- let idx;
6
- let start = 0;
4
+ var deepPath = function (arr, filter, deepProperty, res) {
5
+ if (res === void 0) { res = []; }
6
+ var idx;
7
+ var start = 0;
7
8
  if ((idx = search(arr, filter, start)) > -1) {
8
9
  res.push(idx);
9
10
  return res;
10
11
  }
11
- each(arr, (it, i) => {
12
+ each(arr, function (it, i) {
12
13
  if (isArray(it[deepProperty])) {
13
- let r = res.slice();
14
+ var r = res.slice();
14
15
  r.push(i);
15
- let tmp = deepPath(it[deepProperty], filter, deepProperty, r);
16
+ var tmp = deepPath(it[deepProperty], filter, deepProperty, r);
16
17
  if (tmp !== false) {
17
18
  return tmp;
18
19
  }
@@ -1,5 +1,6 @@
1
1
  import { log } from './log';
2
- const defaultAjaxAbortFunction = function (message, url = '') {
2
+ var defaultAjaxAbortFunction = function (message, url) {
3
+ if (url === void 0) { url = ''; }
3
4
  log(message);
4
5
  };
5
6
  export { defaultAjaxAbortFunction };
@@ -1,4 +1,4 @@
1
- const defaultAjaxErrorFunction = function (jqXHR, textStatus, errorThrown) {
1
+ var defaultAjaxErrorFunction = function (jqXHR, textStatus, errorThrown) {
2
2
  return false;
3
3
  };
4
4
  export { defaultAjaxErrorFunction };
@@ -1,4 +1,4 @@
1
- const defaultAlertFunction = function (msg, title) {
1
+ var defaultAlertFunction = function (msg, title) {
2
2
  /** @todo */
3
3
  alert(msg);
4
4
  };
@@ -1,6 +1,6 @@
1
1
  import { isFunction } from './isFunction';
2
- const defaultConfirmFunction = function (text, yesFn, noFn) {
3
- let ok = 0;
2
+ var defaultConfirmFunction = function (text, yesFn, noFn) {
3
+ var ok = 0;
4
4
  if (confirm(text)) {
5
5
  if (isFunction(yesFn)) {
6
6
  yesFn();
@@ -1,4 +1,4 @@
1
- const defaultEndLoadingFunction = function (url, timestamp, data, res) {
1
+ var defaultEndLoadingFunction = function (url, timestamp, data, res) {
2
2
  return true;
3
3
  };
4
4
  export { defaultEndLoadingFunction };
@@ -1,5 +1,5 @@
1
1
  import { log } from './log';
2
- const defaultErrorFunction = function (message) {
2
+ var defaultErrorFunction = function (message) {
3
3
  log(message);
4
4
  };
5
5
  export { defaultErrorFunction };
@@ -1,4 +1,4 @@
1
- const defaultHistoryFunction = function (obj) {
1
+ var defaultHistoryFunction = function (obj) {
2
2
  return true;
3
3
  };
4
4
  export { defaultHistoryFunction };
@@ -1,4 +1,4 @@
1
- const defaultLinkFunction = function (responseObj, ele) {
1
+ var defaultLinkFunction = function (responseObj, ele) {
2
2
  return true;
3
3
  };
4
4
  export { defaultLinkFunction };
@@ -1,4 +1,4 @@
1
- const defaultPostLinkFunction = function (r, ele) {
1
+ var defaultPostLinkFunction = function (r, ele) {
2
2
  return true;
3
3
  };
4
4
  export { defaultPostLinkFunction };
@@ -1,4 +1,4 @@
1
- const defaultPreLinkFunction = function (url, force, ele) {
1
+ var defaultPreLinkFunction = function (url, force, ele) {
2
2
  return url;
3
3
  };
4
4
  export { defaultPreLinkFunction };
@@ -1,4 +1,4 @@
1
- const defaultResizeFunction = function () {
1
+ var defaultResizeFunction = function () {
2
2
  return true;
3
3
  };
4
4
  export { defaultResizeFunction };
@@ -1,4 +1,5 @@
1
- const defaultStartLoadingFunction = function (url, tst, data, requestId = null) {
1
+ var defaultStartLoadingFunction = function (url, tst, data, requestId) {
2
+ if (requestId === void 0) { requestId = null; }
2
3
  return true;
3
4
  };
4
5
  export { defaultStartLoadingFunction };
@@ -1,5 +1,5 @@
1
1
  import { checkType } from './checkType';
2
- const deleteProp = function (obj, prop) {
2
+ var deleteProp = function (obj, prop) {
3
3
  checkType(obj, 'object', bbn._('The obj must be an object in setProp'));
4
4
  checkType(prop, 'string', bbn._('The prop must be a string in setProp'));
5
5
  delete obj[prop];
@@ -4,12 +4,14 @@ import { isFunction } from './isFunction';
4
4
  import { isValue } from './isValue';
5
5
  import { isDom } from './isDom';
6
6
  import { numProperties } from './numProperties';
7
- let diffObjProcessed = [];
8
- const diffObj = function (obj1, obj2, unchanged = false, notRoot = false) {
7
+ var diffObjProcessed = [];
8
+ var diffObj = function (obj1, obj2, unchanged, notRoot) {
9
+ if (unchanged === void 0) { unchanged = false; }
10
+ if (notRoot === void 0) { notRoot = false; }
9
11
  if (!notRoot) {
10
12
  diffObjProcessed = [];
11
13
  }
12
- let VALUE_CREATED = 'created', VALUE_UPDATED = 'updated', VALUE_DELETED = 'deleted', VALUE_UNCHANGED = 'unchanged', _compareValues = function (value1, value2) {
14
+ var VALUE_CREATED = 'created', VALUE_UPDATED = 'updated', VALUE_DELETED = 'deleted', VALUE_UNCHANGED = 'unchanged', _compareValues = function (value1, value2) {
13
15
  if (value1 === value2) {
14
16
  return VALUE_UNCHANGED;
15
17
  }
@@ -27,12 +29,12 @@ const diffObj = function (obj1, obj2, unchanged = false, notRoot = false) {
27
29
  if (notRoot === undefined) {
28
30
  notRoot = false;
29
31
  }
30
- let diff = createObject();
32
+ var diff = createObject();
31
33
  if (!isFunction(obj1) && !isFunction(obj2)) {
32
34
  if (isValue(obj1) || isValue(obj2)) {
33
- let res = _compareValues(obj1, obj2);
35
+ var res = _compareValues(obj1, obj2);
34
36
  if (unchanged || res !== VALUE_UNCHANGED) {
35
- let ret = createObject();
37
+ var ret = createObject();
36
38
  Object.defineProperty(ret, 'type', {
37
39
  value: res,
38
40
  enumerable: false,
@@ -63,24 +65,24 @@ const diffObj = function (obj1, obj2, unchanged = false, notRoot = false) {
63
65
  return false;
64
66
  }
65
67
  diffObjProcessed.push(obj1, obj2);
66
- for (let key in obj1) {
68
+ for (var key in obj1) {
67
69
  if (isFunction(obj1[key])) {
68
70
  continue;
69
71
  }
70
- let value2 = undefined;
72
+ var value2 = undefined;
71
73
  if ('undefined' != typeof obj2[key]) {
72
74
  value2 = obj2[key];
73
75
  }
74
- let res = diffObj(obj1[key], value2, unchanged, true);
76
+ var res = diffObj(obj1[key], value2, unchanged, true);
75
77
  if (res) {
76
78
  diff[key] = res;
77
79
  }
78
80
  }
79
- for (let key in obj2) {
81
+ for (var key in obj2) {
80
82
  if (isFunction(obj2[key]) || 'undefined' != typeof obj1[key]) {
81
83
  continue;
82
84
  }
83
- let res = diffObj(undefined, obj2[key], unchanged, true);
85
+ var res = diffObj(undefined, obj2[key], unchanged, true);
84
86
  if (res) {
85
87
  diff[key] = res;
86
88
  }
@@ -1,11 +1,11 @@
1
1
  import { isString } from './isString';
2
2
  import { substr } from './substr';
3
- const dirName = function (path) {
3
+ var dirName = function (path) {
4
4
  if (isString(path) && path) {
5
5
  while (substr(path, path.length - 1) === '/') {
6
6
  path = substr(path, 0, path.length - 1);
7
7
  }
8
- let pos = path.lastIndexOf('/');
8
+ var pos = path.lastIndexOf('/');
9
9
  if (pos > 0) {
10
10
  return substr(path, 0, pos);
11
11
  }
@@ -5,15 +5,15 @@ import { isBlob } from './isBlob';
5
5
  import { fileExt } from './fileExt';
6
6
  import { downloadContent } from './downloadContent';
7
7
  import { defaultAjaxErrorFunction } from './defaultAjaxErrorFunction';
8
- const download = function (url, filename, params) {
8
+ var download = function (url, filename, params) {
9
9
  // We can intervert the arguments
10
10
  if (filename && (typeof (filename) === 'object')) {
11
11
  params = filename;
12
12
  filename = null;
13
13
  }
14
- return ajax(url, 'blob', params || { _bbn_download: 1 }, (d, headers) => {
14
+ return ajax(url, 'blob', params || { _bbn_download: 1 }, function (d, headers) {
15
15
  if (!filename) {
16
- let cd = 'attachment; filename=';
16
+ var cd = 'attachment; filename=';
17
17
  if (headers && headers['content-disposition'] && headers['content-disposition'].indexOf(cd) === 0) {
18
18
  filename = substr(headers['content-disposition'], cd.length + 1, headers['content-disposition'].length - cd.length - 2);
19
19
  }
@@ -22,14 +22,14 @@ const download = function (url, filename, params) {
22
22
  }
23
23
  }
24
24
  if (isBlob(d)) {
25
- let extension = fileExt(filename);
26
- let htmlExtensions = ['php', 'html'];
25
+ var extension = fileExt(filename);
26
+ var htmlExtensions = ['php', 'html'];
27
27
  if ((typeof filename === 'string') && ((('type' in d) && (d.type !== 'text/html')) || htmlExtensions.includes(extension))) {
28
28
  downloadContent(filename, d);
29
29
  return;
30
30
  }
31
31
  }
32
- }, e => {
32
+ }, function (e) {
33
33
  defaultAjaxErrorFunction(e);
34
34
  });
35
35
  };
@@ -2,11 +2,11 @@ import { isCanvas } from './isCanvas';
2
2
  import { isObject } from './isObject';
3
3
  import { isString } from './isString';
4
4
  import { log } from './log';
5
- const downloadContent = function (filename, content, type) {
5
+ var downloadContent = function (filename, content, type) {
6
6
  if (isCanvas(content)) {
7
- content.toBlob((blob) => {
7
+ content.toBlob(function (blob) {
8
8
  // blob ready, download it
9
- let a = document.createElement('a');
9
+ var a = document.createElement('a');
10
10
  a.download = filename;
11
11
  a.href = window.URL.createObjectURL(blob);
12
12
  a.className = 'bbn-no';
@@ -22,9 +22,9 @@ const downloadContent = function (filename, content, type) {
22
22
  else if (type.indexOf('/') === -1) {
23
23
  type = 'text/' + type;
24
24
  }
25
- let a = window.document.createElement('a');
25
+ var a = window.document.createElement('a');
26
26
  a.className = 'bbn-no';
27
- let src = null;
27
+ var src = null;
28
28
  if (isString(content)) {
29
29
  src = new Blob([content], { type: type });
30
30
  }
package/dist/fn/each.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { isNumber } from './isNumber';
2
2
  import { isIterable } from './isIterable';
3
3
  import { iterate } from './iterate';
4
- const each = function (arr, fn) {
4
+ var each = function (arr, fn) {
5
5
  if (isNumber(arr) && arr > 0) {
6
- for (let i = 0; i < arr; i++) {
6
+ for (var i = 0; i < arr; i++) {
7
7
  if (fn(i, i) === false) {
8
8
  return;
9
9
  }
@@ -11,7 +11,7 @@ const each = function (arr, fn) {
11
11
  return;
12
12
  }
13
13
  if (isIterable(arr)) {
14
- for (let i = 0; i < arr.length; i++) {
14
+ for (var i = 0; i < arr.length; i++) {
15
15
  if (fn(arr[i], i) === false) {
16
16
  return;
17
17
  }
@@ -1,4 +1,4 @@
1
- const eraseCookie = function (name) {
1
+ var eraseCookie = function (name) {
2
2
  document.cookie = name + '=; Max-Age=-99999999;';
3
3
  };
4
4
  export { eraseCookie };
package/dist/fn/error.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { log } from './log';
2
- const error = function (errorMsg) {
2
+ var error = function (errorMsg) {
3
3
  if (arguments.length > 1) {
4
- const args = [];
5
- for (let i = 1; i < arguments.length; i++) {
4
+ var args = [];
5
+ for (var i = 1; i < arguments.length; i++) {
6
6
  args.push(arguments[i]);
7
7
  }
8
8
  args.unshift({
@@ -1,5 +1,5 @@
1
1
  import { isString } from './isString';
2
- const escapeDquotes = function (str) {
2
+ var escapeDquotes = function (str) {
3
3
  if (!isString(str)) {
4
4
  return str;
5
5
  }