@bbn/bbn 1.0.25 → 1.0.27

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 (347) hide show
  1. package/dist/bundle.d.ts +226 -240
  2. package/dist/bundle.js +952 -919
  3. package/dist/fn/_addLoader.js +7 -4
  4. package/dist/fn/_compareValues.js +14 -11
  5. package/dist/fn/_deleteLoader.d.ts +1 -1
  6. package/dist/fn/_deleteLoader.js +12 -9
  7. package/dist/fn/abort.js +10 -7
  8. package/dist/fn/abortURL.js +8 -5
  9. package/dist/fn/addColors.d.ts +1 -1
  10. package/dist/fn/addColors.js +31 -11
  11. package/dist/fn/addInputs.d.ts +1 -2
  12. package/dist/fn/addInputs.js +10 -8
  13. package/dist/fn/addStyle.js +8 -5
  14. package/dist/fn/adjustHeight.js +8 -5
  15. package/dist/fn/adjustSize.js +9 -6
  16. package/dist/fn/adjustWidth.js +8 -5
  17. package/dist/fn/ajax.d.ts +1 -1
  18. package/dist/fn/ajax.js +40 -36
  19. package/dist/fn/analyzeFunction.js +11 -8
  20. package/dist/fn/animateCss.js +12 -8
  21. package/dist/fn/arrayBuffer2String.js +4 -1
  22. package/dist/fn/arrayFromProp.js +8 -5
  23. package/dist/fn/autoExtend.js +7 -4
  24. package/dist/fn/baseName.d.ts +1 -1
  25. package/dist/fn/baseName.js +10 -7
  26. package/dist/fn/br2nl.d.ts +1 -1
  27. package/dist/fn/br2nl.js +6 -3
  28. package/dist/fn/calendar.d.ts +1 -1
  29. package/dist/fn/calendar.js +21 -12
  30. package/dist/fn/callback.d.ts +1 -1
  31. package/dist/fn/callback.js +24 -21
  32. package/dist/fn/camelToCss.js +8 -3
  33. package/dist/fn/camelize.js +4 -1
  34. package/dist/fn/canvasToImage.js +5 -2
  35. package/dist/fn/center.js +7 -6
  36. package/dist/fn/checkProps.d.ts +1 -1
  37. package/dist/fn/checkProps.js +7 -4
  38. package/dist/fn/checkPropsDetails.d.ts +1 -4
  39. package/dist/fn/checkPropsDetails.js +21 -19
  40. package/dist/fn/checkPropsOrDie.d.ts +1 -1
  41. package/dist/fn/checkPropsOrDie.js +7 -4
  42. package/dist/fn/checkType.d.ts +1 -1
  43. package/dist/fn/checkType.js +20 -17
  44. package/dist/fn/chrono.d.ts +3 -0
  45. package/dist/fn/chrono.js +27 -0
  46. package/dist/fn/circularReplacer.js +11 -8
  47. package/dist/fn/clone.d.ts +0 -1
  48. package/dist/fn/clone.js +11 -8
  49. package/dist/fn/colorToHex.js +5 -2
  50. package/dist/fn/compare.js +65 -62
  51. package/dist/fn/compareConditions.d.ts +0 -1
  52. package/dist/fn/compareConditions.js +14 -11
  53. package/dist/fn/copy.js +16 -13
  54. package/dist/fn/correctCase.js +5 -2
  55. package/dist/fn/count.d.ts +1 -1
  56. package/dist/fn/count.js +7 -4
  57. package/dist/fn/crc32.js +15 -4
  58. package/dist/fn/createObject.d.ts +1 -1
  59. package/dist/fn/createObject.js +8 -5
  60. package/dist/fn/cssExists.js +12 -6
  61. package/dist/fn/date.js +13 -10
  62. package/dist/fn/dateSQL.d.ts +1 -1
  63. package/dist/fn/dateSQL.js +12 -4
  64. package/dist/fn/daysInMonth.d.ts +1 -1
  65. package/dist/fn/daysInMonth.js +11 -4
  66. package/dist/fn/deepPath.d.ts +1 -2
  67. package/dist/fn/deepPath.js +10 -7
  68. package/dist/fn/defaultAjaxAbortFunction.d.ts +1 -1
  69. package/dist/fn/defaultAjaxAbortFunction.js +7 -4
  70. package/dist/fn/defaultAjaxErrorFunction.d.ts +1 -1
  71. package/dist/fn/defaultAjaxErrorFunction.js +4 -13
  72. package/dist/fn/defaultAlertFunction.d.ts +1 -1
  73. package/dist/fn/defaultAlertFunction.js +6 -4
  74. package/dist/fn/defaultConfirmFunction.d.ts +1 -1
  75. package/dist/fn/defaultConfirmFunction.js +7 -4
  76. package/dist/fn/defaultEndLoadingFunction.d.ts +1 -1
  77. package/dist/fn/defaultEndLoadingFunction.js +5 -18
  78. package/dist/fn/defaultErrorFunction.js +6 -3
  79. package/dist/fn/defaultHistoryFunction.js +4 -1
  80. package/dist/fn/defaultLinkFunction.js +4 -1
  81. package/dist/fn/defaultPostLinkFunction.d.ts +1 -1
  82. package/dist/fn/defaultPostLinkFunction.js +5 -2
  83. package/dist/fn/defaultPreLinkFunction.d.ts +1 -1
  84. package/dist/fn/defaultPreLinkFunction.js +6 -11
  85. package/dist/fn/defaultResizeFunction.js +4 -1
  86. package/dist/fn/defaultStartLoadingFunction.d.ts +1 -1
  87. package/dist/fn/defaultStartLoadingFunction.js +6 -14
  88. package/dist/fn/deleteProp.d.ts +1 -1
  89. package/dist/fn/deleteProp.js +7 -3
  90. package/dist/fn/diffObj.d.ts +1 -2
  91. package/dist/fn/diffObj.js +30 -28
  92. package/dist/fn/dirName.d.ts +1 -1
  93. package/dist/fn/dirName.js +10 -7
  94. package/dist/fn/download.d.ts +1 -1
  95. package/dist/fn/download.js +21 -20
  96. package/dist/fn/downloadContent.d.ts +1 -1
  97. package/dist/fn/downloadContent.js +12 -9
  98. package/dist/fn/each.js +10 -7
  99. package/dist/fn/eraseCookie.js +4 -1
  100. package/dist/fn/error.js +8 -5
  101. package/dist/fn/escapeDquotes.js +6 -3
  102. package/dist/fn/escapeRegExp.js +5 -2
  103. package/dist/fn/escapeSquotes.js +6 -3
  104. package/dist/fn/escapeTicks.js +7 -4
  105. package/dist/fn/escapeUrl.js +11 -8
  106. package/dist/fn/extend.d.ts +1 -2
  107. package/dist/fn/extend.js +27 -24
  108. package/dist/fn/extendOut.d.ts +1 -2
  109. package/dist/fn/extendOut.js +10 -7
  110. package/dist/fn/fdate.d.ts +1 -1
  111. package/dist/fn/fdate.js +18 -11
  112. package/dist/fn/fdatetime.d.ts +1 -1
  113. package/dist/fn/fdatetime.js +17 -10
  114. package/dist/fn/fieldValue.js +6 -3
  115. package/dist/fn/fileExt.js +7 -4
  116. package/dist/fn/filter.d.ts +1 -2
  117. package/dist/fn/filter.js +26 -22
  118. package/dist/fn/filterToConditions.d.ts +11 -3
  119. package/dist/fn/filterToConditions.js +16 -13
  120. package/dist/fn/findAll.d.ts +0 -1
  121. package/dist/fn/findAll.js +10 -7
  122. package/dist/fn/fori.d.ts +1 -1
  123. package/dist/fn/fori.js +9 -6
  124. package/dist/fn/forir.d.ts +1 -1
  125. package/dist/fn/forir.js +9 -6
  126. package/dist/fn/format.js +6 -3
  127. package/dist/fn/formatBytes.js +4 -1
  128. package/dist/fn/formatDate.d.ts +1 -1
  129. package/dist/fn/formatDate.js +9 -2
  130. package/dist/fn/formatSize.js +8 -5
  131. package/dist/fn/formdata.d.ts +1 -1
  132. package/dist/fn/formdata.js +23 -21
  133. package/dist/fn/fromXml.js +10 -7
  134. package/dist/fn/ftime.js +18 -11
  135. package/dist/fn/getAllTags.d.ts +1 -1
  136. package/dist/fn/getAllTags.js +6 -3
  137. package/dist/fn/getAncestors.d.ts +1 -1
  138. package/dist/fn/getAncestors.js +11 -9
  139. package/dist/fn/getAttributes.js +7 -4
  140. package/dist/fn/getBrowserName.js +13 -10
  141. package/dist/fn/getBrowserVersion.js +6 -3
  142. package/dist/fn/getCookie.js +5 -2
  143. package/dist/fn/getCssVar.js +4 -1
  144. package/dist/fn/getDay.js +6 -3
  145. package/dist/fn/getDeviceType.js +7 -4
  146. package/dist/fn/getEventData.js +19 -13
  147. package/dist/fn/getField.d.ts +1 -1
  148. package/dist/fn/getField.js +8 -4
  149. package/dist/fn/getFieldValues.d.ts +1 -1
  150. package/dist/fn/getFieldValues.js +10 -7
  151. package/dist/fn/getHTMLOfSelection.d.ts +1 -1
  152. package/dist/fn/getHTMLOfSelection.js +14 -21
  153. package/dist/fn/getHtml.js +6 -3
  154. package/dist/fn/getLoader.d.ts +1 -1
  155. package/dist/fn/getLoader.js +6 -3
  156. package/dist/fn/getPath.d.ts +1 -1
  157. package/dist/fn/getPath.js +9 -6
  158. package/dist/fn/getProp.js +7 -3
  159. package/dist/fn/getProperty.js +5 -2
  160. package/dist/fn/getRequestId.js +8 -5
  161. package/dist/fn/getRow.d.ts +1 -1
  162. package/dist/fn/getRow.js +7 -4
  163. package/dist/fn/getScrollBarSize.js +13 -8
  164. package/dist/fn/getText.d.ts +1 -1
  165. package/dist/fn/getText.js +4 -1
  166. package/dist/fn/getTimeoff.js +5 -2
  167. package/dist/fn/happy.js +7 -4
  168. package/dist/fn/hash.d.ts +1 -1
  169. package/dist/fn/hash.js +14 -11
  170. package/dist/fn/hex2rgb.js +11 -6
  171. package/dist/fn/history.js +4 -1
  172. package/dist/fn/html2text.d.ts +1 -1
  173. package/dist/fn/html2text.js +4 -1
  174. package/dist/fn/imageToCanvas.js +6 -3
  175. package/dist/fn/imgToBase64.d.ts +1 -1
  176. package/dist/fn/imgToBase64.js +9 -6
  177. package/dist/fn/info.js +7 -4
  178. package/dist/fn/init.js +81 -54
  179. package/dist/fn/isActiveInterface.js +6 -3
  180. package/dist/fn/isArray.js +4 -1
  181. package/dist/fn/isBlob.js +4 -1
  182. package/dist/fn/isBoolean.js +4 -1
  183. package/dist/fn/isCanvas.js +4 -1
  184. package/dist/fn/isColor.d.ts +1 -1
  185. package/dist/fn/isColor.js +16 -6
  186. package/dist/fn/isComment.js +4 -1
  187. package/dist/fn/isCp.js +12 -9
  188. package/dist/fn/isDate.js +4 -1
  189. package/dist/fn/isDesktopDevice.js +4 -1
  190. package/dist/fn/isDimension.d.ts +1 -1
  191. package/dist/fn/isDimension.js +16 -6
  192. package/dist/fn/isDom.js +4 -1
  193. package/dist/fn/isEmail.d.ts +1 -1
  194. package/dist/fn/isEmail.js +16 -6
  195. package/dist/fn/isEmpty.js +9 -6
  196. package/dist/fn/isEvent.js +4 -1
  197. package/dist/fn/isFocused.d.ts +1 -1
  198. package/dist/fn/isFocused.js +5 -2
  199. package/dist/fn/isFunction.js +4 -1
  200. package/dist/fn/isHostname.js +8 -5
  201. package/dist/fn/isIP.js +6 -3
  202. package/dist/fn/isInside.js +10 -7
  203. package/dist/fn/isInt.js +4 -1
  204. package/dist/fn/isIterable.js +5 -2
  205. package/dist/fn/isMobile.js +7 -4
  206. package/dist/fn/isMobileDevice.js +4 -1
  207. package/dist/fn/isNull.js +4 -1
  208. package/dist/fn/isNumber.js +5 -2
  209. package/dist/fn/isObject.js +4 -1
  210. package/dist/fn/isPercent.js +5 -2
  211. package/dist/fn/isPrimitive.js +5 -2
  212. package/dist/fn/isPromise.js +4 -1
  213. package/dist/fn/isPropSize.js +6 -3
  214. package/dist/fn/isSQLDate.js +5 -2
  215. package/dist/fn/isSame.d.ts +1 -2
  216. package/dist/fn/isSame.js +10 -7
  217. package/dist/fn/isString.js +4 -1
  218. package/dist/fn/isSymbol.js +4 -1
  219. package/dist/fn/isTabletDevice.js +4 -1
  220. package/dist/fn/isURL.js +5 -2
  221. package/dist/fn/isValidDimension.js +7 -5
  222. package/dist/fn/isValidName.js +6 -3
  223. package/dist/fn/isValue.js +6 -3
  224. package/dist/fn/isVue.d.ts +1 -1
  225. package/dist/fn/isVue.js +9 -6
  226. package/dist/fn/iterate.d.ts +1 -1
  227. package/dist/fn/iterate.js +10 -7
  228. package/dist/fn/lightenDarkenHex.js +6 -3
  229. package/dist/fn/link.d.ts +1 -2
  230. package/dist/fn/link.js +35 -34
  231. package/dist/fn/log.js +10 -7
  232. package/dist/fn/makeReactive.d.ts +0 -1
  233. package/dist/fn/makeReactive.js +59 -44
  234. package/dist/fn/map.d.ts +0 -1
  235. package/dist/fn/map.js +6 -3
  236. package/dist/fn/md5.js +34 -11
  237. package/dist/fn/money.d.ts +1 -1
  238. package/dist/fn/money.js +53 -37
  239. package/dist/fn/move.d.ts +1 -1
  240. package/dist/fn/move.js +5 -2
  241. package/dist/fn/multiorder.d.ts +1 -1
  242. package/dist/fn/multiorder.js +11 -8
  243. package/dist/fn/nl2br.d.ts +1 -1
  244. package/dist/fn/nl2br.js +6 -3
  245. package/dist/fn/numProperties.d.ts +1 -1
  246. package/dist/fn/numProperties.js +5 -2
  247. package/dist/fn/objectToFormData.d.ts +1 -1
  248. package/dist/fn/objectToFormData.js +17 -14
  249. package/dist/fn/order.js +6 -3
  250. package/dist/fn/outerHeight.d.ts +1 -1
  251. package/dist/fn/outerHeight.js +11 -7
  252. package/dist/fn/outerWidth.d.ts +1 -1
  253. package/dist/fn/outerWidth.js +7 -5
  254. package/dist/fn/percent.js +4 -1
  255. package/dist/fn/pickValue.d.ts +1 -1
  256. package/dist/fn/pickValue.js +4 -1
  257. package/dist/fn/post.d.ts +1 -1
  258. package/dist/fn/post.js +11 -8
  259. package/dist/fn/postOut.d.ts +1 -1
  260. package/dist/fn/postOut.js +10 -7
  261. package/dist/fn/printf.js +5 -4
  262. package/dist/fn/quotes2html.d.ts +1 -1
  263. package/dist/fn/quotes2html.js +9 -6
  264. package/dist/fn/randomInt.d.ts +1 -1
  265. package/dist/fn/randomInt.js +4 -1
  266. package/dist/fn/randomString.d.ts +1 -1
  267. package/dist/fn/randomString.js +16 -12
  268. package/dist/fn/removeAccents.d.ts +1 -1
  269. package/dist/fn/removeAccents.js +9 -6
  270. package/dist/fn/removeEmpty.d.ts +1 -1
  271. package/dist/fn/removeEmpty.js +11 -8
  272. package/dist/fn/removeExtraSpaces.d.ts +1 -1
  273. package/dist/fn/removeExtraSpaces.js +4 -1
  274. package/dist/fn/removeHtmlComments.d.ts +1 -1
  275. package/dist/fn/removeHtmlComments.js +6 -3
  276. package/dist/fn/removePrivateProp.d.ts +1 -2
  277. package/dist/fn/removePrivateProp.js +11 -8
  278. package/dist/fn/removeTrailingChars.d.ts +1 -1
  279. package/dist/fn/removeTrailingChars.js +9 -6
  280. package/dist/fn/repeat.d.ts +1 -1
  281. package/dist/fn/repeat.js +5 -7
  282. package/dist/fn/replaceAll.d.ts +1 -1
  283. package/dist/fn/replaceAll.js +7 -7
  284. package/dist/fn/replaceSelection.js +5 -2
  285. package/dist/fn/resize.js +18 -13
  286. package/dist/fn/rgb2hex.js +10 -5
  287. package/dist/fn/riterate.d.ts +1 -1
  288. package/dist/fn/riterate.js +6 -3
  289. package/dist/fn/roundDecimal.d.ts +1 -1
  290. package/dist/fn/roundDecimal.js +5 -2
  291. package/dist/fn/sanitize.js +10 -5
  292. package/dist/fn/search.d.ts +2 -1
  293. package/dist/fn/search.js +41 -35
  294. package/dist/fn/selectElementText.d.ts +1 -1
  295. package/dist/fn/selectElementText.js +5 -2
  296. package/dist/fn/selector.d.ts +1 -1
  297. package/dist/fn/selector.js +5 -2
  298. package/dist/fn/setCookie.js +8 -5
  299. package/dist/fn/setCssVar.js +6 -2
  300. package/dist/fn/setNavigationVars.d.ts +1 -1
  301. package/dist/fn/setNavigationVars.js +18 -14
  302. package/dist/fn/setProp.d.ts +1 -1
  303. package/dist/fn/setProp.js +5 -4
  304. package/dist/fn/setProperty.d.ts +1 -1
  305. package/dist/fn/setProperty.js +8 -5
  306. package/dist/fn/shorten.d.ts +1 -1
  307. package/dist/fn/shorten.js +10 -7
  308. package/dist/fn/shortenObj.d.ts +1 -2
  309. package/dist/fn/shortenObj.js +13 -10
  310. package/dist/fn/shuffle.d.ts +1 -1
  311. package/dist/fn/shuffle.js +5 -4
  312. package/dist/fn/simpleHash.d.ts +1 -1
  313. package/dist/fn/simpleHash.js +8 -5
  314. package/dist/fn/simpleHash1.d.ts +1 -1
  315. package/dist/fn/simpleHash1.js +5 -2
  316. package/dist/fn/simpleHash2.d.ts +1 -1
  317. package/dist/fn/simpleHash2.js +4 -1
  318. package/dist/fn/stat.d.ts +1 -1
  319. package/dist/fn/stat.js +12 -9
  320. package/dist/fn/string2ArrayBuffer.d.ts +1 -1
  321. package/dist/fn/string2ArrayBuffer.js +4 -1
  322. package/dist/fn/submit.d.ts +1 -1
  323. package/dist/fn/submit.js +15 -27
  324. package/dist/fn/substr.d.ts +1 -1
  325. package/dist/fn/substr.js +11 -8
  326. package/dist/fn/sum.d.ts +1 -1
  327. package/dist/fn/sum.js +9 -7
  328. package/dist/fn/timestamp.d.ts +1 -1
  329. package/dist/fn/timestamp.js +5 -2
  330. package/dist/fn/toCSV.d.ts +1 -1
  331. package/dist/fn/toCSV.js +12 -9
  332. package/dist/fn/toggleFullScreen.js +19 -16
  333. package/dist/fn/translate.d.ts +1 -1
  334. package/dist/fn/translate.js +6 -3
  335. package/dist/fn/treatAjaxArguments.d.ts +1 -1
  336. package/dist/fn/treatAjaxArguments.js +28 -23
  337. package/dist/fn/trim.js +7 -4
  338. package/dist/fn/uniqString.js +12 -9
  339. package/dist/fn/unique.d.ts +1 -1
  340. package/dist/fn/unique.js +4 -1
  341. package/dist/fn/upload.d.ts +1 -1
  342. package/dist/fn/upload.js +37 -10
  343. package/dist/fn/warning.d.ts +1 -1
  344. package/dist/fn/warning.js +12 -9
  345. package/dist/index.d.ts +110 -112
  346. package/dist/index.js +474 -463
  347. package/package.json +3 -1
@@ -1,12 +1,15 @@
1
- import { isNull } from './isNull';
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isValue = void 0;
4
+ const isNull_1 = require("./isNull");
2
5
  const isValue = function (...args) {
3
6
  if (!args.length)
4
7
  return false;
5
8
  for (let a of args) {
6
- if ((typeof a === 'object') && !isNull(a)) {
9
+ if (typeof a === 'object' && !(0, isNull_1.isNull)(a)) {
7
10
  return false;
8
11
  }
9
12
  }
10
13
  return true;
11
14
  };
12
- export { isValue };
15
+ exports.isValue = isValue;
@@ -1,2 +1,2 @@
1
- declare const isVue: (...args: any[]) => any;
1
+ declare const isVue: (...args: any[]) => boolean;
2
2
  export { isVue };
package/dist/fn/isVue.js CHANGED
@@ -1,26 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isVue = void 0;
1
4
  const isVue = function (...args) {
2
5
  if (!args.length) {
3
6
  return false;
4
7
  }
5
- if (Object.hasOwn(bbn, 'vue')) {
6
- if (bbn.vue.app) {
8
+ if ('vue' in bbn && window['Vue']) {
9
+ if ('app' in bbn.vue) {
7
10
  for (let a of args) {
8
- if (!a || (typeof a.render !== 'function')) {
11
+ if (!a || typeof a.render !== 'function') {
9
12
  return false;
10
13
  }
11
14
  }
12
15
  }
13
16
  else {
14
17
  for (let a of args) {
15
- if (!(a instanceof Vue)) {
18
+ if (!(a instanceof window['Vue'])) {
16
19
  return false;
17
20
  }
18
21
  }
19
22
  }
20
23
  }
21
- if (Object.hasOwn(bbn, 'cp')) {
24
+ if ('cp' in bbn && 'isComponent' in bbn['cp'] && (typeof bbn['cp'].isComponent === 'function')) {
22
25
  return bbn.cp.isComponent(...args);
23
26
  }
24
27
  return true;
25
28
  };
26
- export { isVue };
29
+ exports.isVue = isVue;
@@ -1,2 +1,2 @@
1
- declare const iterate: (obj: any, fn: any, noPrivate: any, reverse: any) => any;
1
+ declare const iterate: (obj: object, fn: (a: any, b: string) => any, noPrivate?: boolean, reverse?: boolean) => object;
2
2
  export { iterate };
@@ -1,12 +1,15 @@
1
- import { removePrivateProp } from './removePrivateProp';
2
- import { each } from './each';
3
- const iterate = function (obj, fn, noPrivate, reverse) {
4
- if ((obj !== null) && (typeof obj === 'object')) {
5
- let iter = Object.keys(noPrivate ? removePrivateProp(obj) : obj);
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");
6
+ const iterate = function (obj, fn, noPrivate = false, reverse = false) {
7
+ if (obj !== null && typeof obj === 'object') {
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, reverse) {
14
17
  }
15
18
  return obj;
16
19
  };
17
- export { iterate };
20
+ exports.iterate = iterate;
@@ -1,8 +1,11 @@
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
- let ht = hex[0] === "#";
6
+ let ht = hex[0] === '#';
4
7
  hex = ht ? hex.slice(1) : hex;
5
- let num = parseInt(hex, 16), r = (num >> 16) + amt, b = ((num >> 8) & 0x00FF) + amt, g = (num & 0x0000FF) + amt;
8
+ let num = parseInt(hex, 16), r = (num >> 16) + amt, b = ((num >> 8) & 0x00ff) + amt, g = (num & 0x0000ff) + amt;
6
9
  if (r > 255) {
7
10
  r = 255;
8
11
  }
@@ -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.d.ts CHANGED
@@ -1,3 +1,2 @@
1
- import { link } from './link';
2
- declare const link: () => any;
1
+ declare const link: (...args: any[]) => any;
3
2
  export { link };
package/dist/fn/link.js CHANGED
@@ -1,17 +1,17 @@
1
- import { treatAjaxArguments } from './treatAjaxArguments';
2
- import { getLoader } from './getLoader';
3
- import { defaultPreLinkFunction } from './defaultPreLinkFunction';
4
- import { extend } from './extend';
5
- import { ajax } from './ajax';
6
- import { log } from './log';
7
- import { isObject } from './isObject';
8
- import { callback } from './callback';
9
- import { setNavigationVars } from './setNavigationVars';
10
- const link = function () {
11
- let cfg = treatAjaxArguments(arguments), ok = 1;
12
- if (cfg === true) {
13
- return true;
14
- }
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");
12
+ const link = function (...args) {
13
+ let cfg = (0, treatAjaxArguments_1.treatAjaxArguments)(args);
14
+ let ok = true;
15
15
  /* If we can't find a correct link we load the current URL */
16
16
  if (!cfg) {
17
17
  return link(window.location.href);
@@ -35,8 +35,8 @@ const link = function () {
35
35
  */
36
36
  return true;
37
37
  }
38
- /* Mail link */
39
38
  else if (cfg.url.indexOf('mailto:') === 0) {
39
+ /* Mail link */
40
40
  bbn.env.ignoreUnload = true;
41
41
  window.location.href = cfg.url;
42
42
  setTimeout(() => {
@@ -44,59 +44,60 @@ const link = function () {
44
44
  }, 0);
45
45
  return false;
46
46
  }
47
- if (getLoader(cfg.url)) {
47
+ if ((0, getLoader_1.getLoader)(cfg.url)) {
48
48
  return false;
49
49
  }
50
50
  /* Opens an external page in a new window */
51
- if (((cfg.url.indexOf("http://") === 0) || (cfg.url.indexOf("https://") === 0)) &&
52
- (cfg.url.indexOf(bbn.env.host) !== 0)) {
51
+ if ((cfg.url.indexOf('http://') === 0 || cfg.url.indexOf('https://') === 0) &&
52
+ cfg.url.indexOf(bbn.env.host) !== 0) {
53
53
  if (cfg.e) {
54
54
  cfg.e.preventDefault();
55
55
  }
56
56
  window.open(cfg.url);
57
57
  return false;
58
58
  }
59
- /* The URL is fine so go ahead if something is not already loading */
60
- else if ((cfg.url !== bbn.env.params.join("/")) || (cfg.force === 1)) {
59
+ else if (cfg.url !== bbn.env.params.join('/') || cfg.force) {
60
+ /* The URL is fine so go ahead if something is not already loading */
61
61
  /* If a second callback is defined, it is triggered instead of defaultPreLinkFunction */
62
62
  if (cfg.successFn) {
63
63
  ok = cfg.successFn(cfg.url);
64
64
  }
65
- else if (defaultPreLinkFunction) {
66
- 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);
67
+ /*
67
68
  if (ok.data !== undefined) {
68
69
  extend(cfg.obj, ok.data);
69
70
  ok = 1;
70
71
  }
72
+ */
71
73
  }
72
74
  if (ok) {
73
- if (ok !== 1 && (typeof ok === 'string')) {
75
+ if (ok !== 1 && typeof ok === 'string') {
74
76
  cfg.url = ok;
75
77
  }
76
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? */
77
- let errSt = bbn._("The Ajax call to") + ' ' + cfg.url + ' ';
78
- return ajax(cfg.url, cfg.datatype, cfg.obj, function (res) {
79
+ let errSt = bbn._('The Ajax call to') + ' ' + cfg.url + ' ';
80
+ return (0, ajax_1.ajax)(cfg.url, cfg.datatype, cfg.obj, function (res) {
79
81
  if (!res) {
80
- log(errSt + bbn._("returned no answer"));
82
+ (0, log_1.log)(errSt + bbn._('returned no answer'));
81
83
  }
82
- if (isObject(res)) {
84
+ if ((0, isObject_1.isObject)(res)) {
83
85
  // If there's nothing in the result, just an empty object, the callback stops here and the URL is not changed
84
- if ((Object.keys(res).length === 0)) {
85
- log(errSt + bbn._("returned an empty object"));
86
+ if (Object.keys(res).length === 0) {
87
+ (0, log_1.log)(errSt + bbn._('returned an empty object'));
86
88
  }
87
89
  if (res.new_url) {
88
90
  res.old_path = cfg.url;
89
91
  cfg.url = res.new_url;
90
92
  }
91
- else if (res.url && (cfg.url !== res.url)) {
93
+ else if (res.url && cfg.url !== res.url) {
92
94
  res.old_path = cfg.url;
93
95
  }
94
96
  }
95
- if (callback(cfg.url, res, cfg.successFn, null, cfg.ele) &&
96
- res.noNav === undefined) {
97
+ if ((0, callback_1.callback)(cfg.url, res, cfg.successFn, null, cfg.ele) && res.noNav === undefined) {
97
98
  // This solution is not very clean (we can't shorten a URL)
98
99
  if (bbn.env.path.indexOf(cfg.url) !== 0) {
99
- setNavigationVars(cfg.url, (res.title ? res.title + ' - ' : '') + bbn.env.siteTitle);
100
+ (0, setNavigationVars_1.setNavigationVars)(cfg.url, (res.title ? res.title + ' - ' : '') + bbn.env.siteTitle);
100
101
  }
101
102
  }
102
103
  }, cfg.errorFn || null);
@@ -104,4 +105,4 @@ const link = function () {
104
105
  }
105
106
  return true;
106
107
  };
107
- 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
- let fn = "log";
7
- 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])) {
9
+ let fn = 'log';
10
+ 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])) {
9
12
  fn = args[0]._bbn_console_mode;
10
13
  }
11
14
  else {
@@ -18,8 +21,8 @@ const log = function (...args) {
18
21
  let i = 0;
19
22
  while (i < args.length) {
20
23
  let t = typeof args[i];
21
- if ((t === 'string') || (t === 'number')) {
22
- window.console[fn]("%c %s ", cfg, args[i]);
24
+ if (t === 'string' || t === 'number') {
25
+ window.console[fn]('%c %s ', cfg, args[i]);
23
26
  }
24
27
  else {
25
28
  window.console[fn](args[i]);
@@ -30,4 +33,4 @@ const log = function (...args) {
30
33
  }
31
34
  return this;
32
35
  };
33
- export { log };
36
+ exports.log = log;
@@ -1,3 +1,2 @@
1
- import { makeReactive } from './makeReactive';
2
1
  declare const makeReactive: (obj: any, onSet: any, parent: any, parentProp: any) => any;
3
2
  export { makeReactive };
@@ -1,48 +1,52 @@
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 + '_' : '');
12
- if (obj && (typeof obj === 'object') && [undefined, Object, Array].includes(obj.constructor)) {
13
- if (obj.__bbnIsProxy && (obj.__bbnParent === parent)) {
15
+ if (obj && typeof obj === 'object' && [undefined, Object, Array].includes(obj.constructor)) {
16
+ if (obj.__bbnIsProxy && obj.__bbnParent === parent) {
14
17
  return obj;
15
18
  }
16
- if (parent && parent.$options && (parent.$options.name === 'bbn-loadbar')) {
17
- log(["MAKING bbn-loadbar", obj]);
19
+ if (parent && parent.$options && parent.$options.name === 'bbn-loadbar') {
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
- enumerable: false
27
+ enumerable: false,
25
28
  });
26
29
  }
27
30
  const handler = {
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);
36
- if (['fill', 'pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'].includes(key) && isArray(target)) {
38
+ const hiddenKey = prefix + ((0, isNumber_1.isNumber)(key) ? key.toString() : key);
39
+ if (['fill', 'pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'].includes(key) &&
40
+ (0, isArray_1.isArray)(target)) {
37
41
  return function (...args) {
38
42
  let res = realTarget[key](...args);
39
- warning("DOING ARRAY STUFF");
40
- log(target.__bbnParent);
43
+ (0, warning_1.warning)('DOING ARRAY STUFF');
44
+ (0, log_1.log)(target.__bbnParent);
41
45
  onSet(target, 'length', parent);
42
46
  return res;
43
47
  };
44
48
  }
45
- if (isFunction(realValue)) {
49
+ if ((0, isFunction_1.isFunction)(realValue)) {
46
50
  return realValue;
47
51
  }
48
52
  if (key === '__bbnRoot') {
@@ -67,22 +71,24 @@ const makeReactive = function (obj, onSet, parent, parentProp) {
67
71
  if (key.indexOf('__bbn_') === 0) {
68
72
  return Reflect.get(target, key);
69
73
  }
70
- if ((key === 'length') && isArray(target.__bbnRoot || target)) {
74
+ if (key === 'length' && (0, isArray_1.isArray)(target.__bbnRoot || target)) {
71
75
  return realTarget.length;
72
76
  }
73
- if (!Object.hasOwn(target, key)) {
77
+ if (!(key in target)) {
74
78
  return realValue;
75
79
  }
76
- if (realValue && (typeof realValue === 'object') && [undefined, Object, Array].includes(realValue.constructor)) {
77
- if (realValue.__bbnIsProxy && (realValue.__bbnParent === parent)) {
80
+ if (realValue &&
81
+ typeof realValue === 'object' &&
82
+ [undefined, Object, Array].includes(realValue.constructor)) {
83
+ if (realValue.__bbnIsProxy && realValue.__bbnParent === parent) {
78
84
  return realTarget[hiddenKey];
79
85
  }
80
- if (!Object.hasOwn(realTarget, hiddenKey)) {
86
+ if (!(hiddenKey in realTarget)) {
81
87
  Reflect.defineProperty(realTarget, hiddenKey, {
82
88
  value: makeReactive(realValue, onSet, parent, propName),
83
89
  writable: true,
84
90
  configurable: true,
85
- enumerable: false
91
+ enumerable: false,
86
92
  });
87
93
  }
88
94
  if (realTarget[hiddenKey].__bbnIsProxy && !realTarget.__bbnWatchers[parentString]) {
@@ -93,42 +99,51 @@ const makeReactive = function (obj, onSet, parent, parentProp) {
93
99
  return realValue;
94
100
  },
95
101
  set(target, key, value) {
96
- if (isSymbol(key)) {
102
+ if ((0, isSymbol_1.isSymbol)(key)) {
97
103
  return Reflect.get(target, key, value);
98
104
  }
99
105
  const realTarget = target.__bbnRoot || target;
100
106
  const propName = parentProp ? parentProp + '.' + key : key;
101
- if (isSymbol(key)) {
107
+ if ((0, isSymbol_1.isSymbol)(key)) {
102
108
  return Reflect.get(target, key);
103
109
  }
104
- if (parent && parent.$options && (parent.$options.name === 'bbn-loadbar')) {
105
- log(['Setting proxy prop in ' + parent.$options.name, target, key, value]);
110
+ if (parent && parent.$options && parent.$options.name === 'bbn-loadbar') {
111
+ (0, log_1.log)(['Setting proxy prop in ' + parent.$options.name, target, key, value]);
106
112
  }
107
- if (!isSame(realTarget[key], value)) {
113
+ if (!(0, isSame_1.isSame)(realTarget[key], value)) {
108
114
  if (key.indexOf('__bbn_') === 0) {
109
115
  Reflect.defineProperty(realTarget, key, {
110
116
  value: makeReactive(value, onSet, parent, propName),
111
117
  writable: true,
112
118
  configurable: true,
113
- enumerable: false
119
+ enumerable: false,
114
120
  });
115
121
  }
116
122
  else {
117
- if (value && (typeof value === 'object') && [undefined, Object, Array].includes(value.constructor)) {
118
- const hiddenKey = prefix + (isNumber(key) ? key.toString() : key);
123
+ if (value &&
124
+ typeof value === 'object' &&
125
+ [undefined, Object, Array].includes(value.constructor)) {
126
+ const hiddenKey = prefix + ((0, isNumber_1.isNumber)(key) ? key.toString() : key);
119
127
  Reflect.defineProperty(realTarget, hiddenKey, {
120
128
  value: makeReactive(value, onSet, parent, propName),
121
129
  writable: true,
122
130
  configurable: true,
123
- enumerable: false
131
+ enumerable: false,
124
132
  });
125
133
  if (realTarget[hiddenKey].__bbnIsProxy && !realTarget.__bbnWatchers[parentString]) {
126
134
  realTarget.__bbnWatchers[parentString] = propName;
127
135
  }
128
136
  }
129
137
  }
130
- if (parent && parent.$options && (parent.$options.name === 'bbn-loadbar')) {
131
- log(['Setting proxy prop in ' + parent.$options.name + ' ' + (isNumber(key) ? key.toString() : key), value, target]);
138
+ if (parent && parent.$options && parent.$options.name === 'bbn-loadbar') {
139
+ (0, log_1.log)([
140
+ 'Setting proxy prop in ' +
141
+ parent.$options.name +
142
+ ' ' +
143
+ ((0, isNumber_1.isNumber)(key) ? key.toString() : key),
144
+ value,
145
+ target,
146
+ ]);
132
147
  }
133
148
  Reflect.set(realTarget, key, value);
134
149
  onSet(target, key, parent);
@@ -138,16 +153,16 @@ const makeReactive = function (obj, onSet, parent, parentProp) {
138
153
  defineProperty(target, key, description) {
139
154
  const realTarget = target;
140
155
  const propName = parentProp ? parentProp + '.' + key : key;
141
- if ((key === '__bbnWatchers') || isSymbol(key) || (key.indexOf('__bbn_') === 0)) {
156
+ if (key === '__bbnWatchers' || (0, isSymbol_1.isSymbol)(key) || key.indexOf('__bbn_') === 0) {
142
157
  Reflect.defineProperty(realTarget, key, description);
143
158
  }
144
159
  else {
145
- const hiddenKey = prefix + (isNumber(key) ? key.toString() : key);
160
+ const hiddenKey = prefix + ((0, isNumber_1.isNumber)(key) ? key.toString() : key);
146
161
  Reflect.defineProperty(realTarget, hiddenKey, {
147
162
  value: makeReactive(description.value, onSet, parent, propName),
148
163
  writable: true,
149
164
  configurable: true,
150
- enumerable: false
165
+ enumerable: false,
151
166
  });
152
167
  }
153
168
  onSet(target, key, parent);
@@ -159,15 +174,15 @@ const makeReactive = function (obj, onSet, parent, parentProp) {
159
174
  Reflect.deleteProperty(realTarget, key);
160
175
  }
161
176
  else {
162
- const hiddenKey = prefix + (isNumber(key) ? key.toString() : key);
177
+ const hiddenKey = prefix + ((0, isNumber_1.isNumber)(key) ? key.toString() : key);
163
178
  Reflect.deleteProperty(realTarget, hiddenKey);
164
179
  Reflect.deleteProperty(target, key);
165
180
  }
166
181
  return true;
167
- }
182
+ },
168
183
  };
169
- return (new Proxy(obj, handler));
184
+ return new Proxy(obj, handler);
170
185
  }
171
186
  return obj;
172
187
  };
173
- export { makeReactive };
188
+ exports.makeReactive = makeReactive;
package/dist/fn/map.d.ts CHANGED
@@ -1,3 +1,2 @@
1
- import { map } from './map';
2
1
  declare const map: (arr: any, fn: any, deepProp: any, level?: number) => any;
3
2
  export { map };
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,14 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.md5 = void 0;
1
4
  const md5 = function (st) {
2
- var hc = "0123456789abcdef";
3
- function rh(n) { var j, s = ""; for (j = 0; j <= 3; j++)
4
- s += hc.charAt((n >> (j * 8 + 4)) & 0x0F) + hc.charAt((n >> (j * 8)) & 0x0F); return s; }
5
- function ad(x, y) { var l = (x & 0xFFFF) + (y & 0xFFFF); var m = (x >> 16) + (y >> 16) + (l >> 16); return (m << 16) | (l & 0xFFFF); }
6
- function rl(n, c) { return (n << c) | (n >>> (32 - c)); }
7
- function cm(q, a, b, x, s, t) { return ad(rl(ad(ad(a, q), ad(x, t)), s), b); }
8
- function ff(a, b, c, d, x, s, t) { return cm((b & c) | ((~b) & d), a, b, x, s, t); }
9
- function gg(a, b, c, d, x, s, t) { return cm((b & d) | (c & (~d)), a, b, x, s, t); }
10
- function hh(a, b, c, d, x, s, t) { return cm(b ^ c ^ d, a, b, x, s, t); }
11
- function ii(a, b, c, d, x, s, t) { return cm(c ^ (b | (~d)), a, b, x, s, t); }
5
+ var hc = '0123456789abcdef';
6
+ function rh(n) {
7
+ var j, s = '';
8
+ for (j = 0; j <= 3; j++)
9
+ s += hc.charAt((n >> (j * 8 + 4)) & 0x0f) + hc.charAt((n >> (j * 8)) & 0x0f);
10
+ return s;
11
+ }
12
+ function ad(x, y) {
13
+ var l = (x & 0xffff) + (y & 0xffff);
14
+ var m = (x >> 16) + (y >> 16) + (l >> 16);
15
+ return (m << 16) | (l & 0xffff);
16
+ }
17
+ function rl(n, c) {
18
+ return (n << c) | (n >>> (32 - c));
19
+ }
20
+ function cm(q, a, b, x, s, t) {
21
+ return ad(rl(ad(ad(a, q), ad(x, t)), s), b);
22
+ }
23
+ function ff(a, b, c, d, x, s, t) {
24
+ return cm((b & c) | (~b & d), a, b, x, s, t);
25
+ }
26
+ function gg(a, b, c, d, x, s, t) {
27
+ return cm((b & d) | (c & ~d), a, b, x, s, t);
28
+ }
29
+ function hh(a, b, c, d, x, s, t) {
30
+ return cm(b ^ c ^ d, a, b, x, s, t);
31
+ }
32
+ function ii(a, b, c, d, x, s, t) {
33
+ return cm(c ^ (b | ~d), a, b, x, s, t);
34
+ }
12
35
  function sb(x) {
13
36
  var i;
14
37
  var nblk = ((x.length + 8) >> 6) + 1;
@@ -98,4 +121,4 @@ const md5 = function (st) {
98
121
  }
99
122
  return rh(a) + rh(b) + rh(c) + rh(d);
100
123
  };
101
- export { md5 };
124
+ exports.md5 = md5;
@@ -1,2 +1,2 @@
1
- declare const money: (val: any, kilo: any, currency: any, novalue: any, decimal: any, thousands: any, precision: any) => any;
1
+ declare const money: (val: number, kilo?: boolean, currency?: string, novalue?: string | false, decimal?: string, thousands?: string, precision?: number) => string;
2
2
  export { money };