@bbn/bbn 1.0.29 → 1.0.30

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