@bbn/bbn 1.0.89 → 1.0.91

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 (604) hide show
  1. package/dist/_.js +1 -1
  2. package/dist/bundle.js +775 -775
  3. package/dist/db.js +4 -4
  4. package/dist/fn/ajax/_addLoader.js +1 -1
  5. package/dist/fn/ajax/_deleteLoader.js +3 -3
  6. package/dist/fn/ajax/abort.js +1 -1
  7. package/dist/fn/ajax/abortURL.js +2 -2
  8. package/dist/fn/ajax/ajax.js +9 -9
  9. package/dist/fn/ajax/callback.js +3 -3
  10. package/dist/fn/ajax/download.js +6 -6
  11. package/dist/fn/ajax/downloadContent.js +4 -4
  12. package/dist/fn/ajax/getLoader.js +1 -1
  13. package/dist/fn/ajax/getRequestId.js +2 -2
  14. package/dist/fn/ajax/link.js +8 -8
  15. package/dist/fn/ajax/post.js +3 -3
  16. package/dist/fn/ajax/postOut.js +3 -3
  17. package/dist/fn/ajax/setNavigationVars.js +4 -4
  18. package/dist/fn/ajax/treatAjaxArguments.js +4 -4
  19. package/dist/fn/ajax/upload.js +2 -2
  20. package/dist/fn/browser/copy.js +2 -2
  21. package/dist/fn/browser/error.js +1 -1
  22. package/dist/fn/browser/getEventData.js +2 -2
  23. package/dist/fn/browser/happy.js +1 -1
  24. package/dist/fn/browser/info.js +1 -1
  25. package/dist/fn/browser/isDesktopDevice.js +1 -1
  26. package/dist/fn/browser/isMobile.js +2 -2
  27. package/dist/fn/browser/isMobileDevice.js +1 -1
  28. package/dist/fn/browser/isTabletDevice.js +1 -1
  29. package/dist/fn/browser/log.js +1 -1
  30. package/dist/fn/browser/toggleFullScreen.js +1 -1
  31. package/dist/fn/browser/warning.js +1 -1
  32. package/dist/fn/convert/imgToBase64.js +1 -1
  33. package/dist/fn/convert/toCSV.js +3 -3
  34. package/dist/fn/datetime/calendar.js +4 -4
  35. package/dist/fn/datetime/chrono.js +1 -1
  36. package/dist/fn/datetime/date.js +3 -3
  37. package/dist/fn/datetime/dateSQL.js +1 -1
  38. package/dist/fn/datetime/daysInMonth.js +1 -1
  39. package/dist/fn/datetime/fdate.js +4 -4
  40. package/dist/fn/datetime/fdatetime.js +3 -3
  41. package/dist/fn/datetime/ftime.js +3 -3
  42. package/dist/fn/datetime/getDay.js +1 -1
  43. package/dist/fn/default/defaultAjaxAbortFunction.js +1 -1
  44. package/dist/fn/default/defaultAjaxErrorFunction.js +1 -1
  45. package/dist/fn/default/defaultConfirmFunction.js +1 -1
  46. package/dist/fn/default/defaultErrorFunction.js +1 -1
  47. package/dist/fn/default/defaultPreLinkFunction.js +1 -1
  48. package/dist/fn/form/addInputs.js +1 -1
  49. package/dist/fn/form/formdata.js +4 -4
  50. package/dist/fn/form/objectToFormData.js +5 -5
  51. package/dist/fn/form/submit.js +2 -2
  52. package/dist/fn/html/adjustHeight.js +2 -2
  53. package/dist/fn/html/adjustSize.js +1 -1
  54. package/dist/fn/html/adjustWidth.js +2 -2
  55. package/dist/fn/html/getAllTags.js +1 -1
  56. package/dist/fn/html/getAttributes.js +1 -1
  57. package/dist/fn/html/getHTMLOfSelection.js +1 -1
  58. package/dist/fn/html/getHtml.js +1 -1
  59. package/dist/fn/html/getPath.js +1 -1
  60. package/dist/fn/html/isInside.js +3 -3
  61. package/dist/fn/html/makeReactive.js +8 -8
  62. package/dist/fn/init.js +11 -11
  63. package/dist/fn/loop/each.js +3 -3
  64. package/dist/fn/loop/fori.js +2 -2
  65. package/dist/fn/loop/forir.js +2 -2
  66. package/dist/fn/loop/iterate.js +1 -1
  67. package/dist/fn/loop/riterate.js +1 -1
  68. package/dist/fn/misc/analyzeFunction.js +1 -1
  69. package/dist/fn/misc/money.js +1 -1
  70. package/dist/fn/misc/translate.js +1 -1
  71. package/dist/fn/object/_compareValues.js +4 -4
  72. package/dist/fn/object/arrayFromProp.js +2 -2
  73. package/dist/fn/object/autoExtend.js +1 -1
  74. package/dist/fn/object/checkProps.js +1 -1
  75. package/dist/fn/object/checkPropsDetails.js +4 -4
  76. package/dist/fn/object/checkPropsOrDie.js +1 -1
  77. package/dist/fn/object/circularReplacer.js +3 -3
  78. package/dist/fn/object/clone.js +3 -3
  79. package/dist/fn/object/compare.js +5 -5
  80. package/dist/fn/object/compareConditions.js +4 -4
  81. package/dist/fn/object/count.js +1 -1
  82. package/dist/fn/object/createObject.js +1 -1
  83. package/dist/fn/object/deepPath.js +3 -3
  84. package/dist/fn/object/deleteProp.js +1 -1
  85. package/dist/fn/object/diffObj.js +6 -6
  86. package/dist/fn/object/extend.js +4 -4
  87. package/dist/fn/object/extendOut.js +1 -1
  88. package/dist/fn/object/filter.js +3 -3
  89. package/dist/fn/object/filterToConditions.js +3 -3
  90. package/dist/fn/object/findAll.js +3 -3
  91. package/dist/fn/object/getField.js +1 -1
  92. package/dist/fn/object/getFieldValues.js +3 -3
  93. package/dist/fn/object/getProp.js +1 -1
  94. package/dist/fn/object/getRow.js +1 -1
  95. package/dist/fn/object/map.js +1 -1
  96. package/dist/fn/object/multiorder.js +1 -1
  97. package/dist/fn/object/order.js +1 -1
  98. package/dist/fn/object/removeEmpty.js +3 -3
  99. package/dist/fn/object/removePrivateProp.js +1 -1
  100. package/dist/fn/object/search.js +5 -5
  101. package/dist/fn/object/setProperty.js +1 -1
  102. package/dist/fn/object/shortenObj.js +4 -4
  103. package/dist/fn/object/sum.js +2 -2
  104. package/dist/fn/string/baseName.js +2 -2
  105. package/dist/fn/string/br2nl.js +1 -1
  106. package/dist/fn/string/dirName.js +2 -2
  107. package/dist/fn/string/escapeDquotes.js +1 -1
  108. package/dist/fn/string/escapeSquotes.js +1 -1
  109. package/dist/fn/string/escapeTicks.js +1 -1
  110. package/dist/fn/string/escapeUrl.js +4 -4
  111. package/dist/fn/string/fileExt.js +1 -1
  112. package/dist/fn/string/format.js +1 -1
  113. package/dist/fn/string/formatSize.js +2 -2
  114. package/dist/fn/string/hash.js +5 -5
  115. package/dist/fn/string/nl2br.js +1 -1
  116. package/dist/fn/string/quotes2html.js +1 -1
  117. package/dist/fn/string/randomString.js +1 -1
  118. package/dist/fn/string/removeAccents.js +2 -2
  119. package/dist/fn/string/removeHtmlComments.js +1 -1
  120. package/dist/fn/string/removeTrailingChars.js +1 -1
  121. package/dist/fn/string/replaceAll.js +2 -2
  122. package/dist/fn/string/sanitize.js +2 -2
  123. package/dist/fn/string/shorten.js +2 -2
  124. package/dist/fn/string/simpleHash.js +2 -2
  125. package/dist/fn/string/substr.js +3 -3
  126. package/dist/fn/string/trim.js +1 -1
  127. package/dist/fn/string/uniqString.js +3 -3
  128. package/dist/fn/style/addColors.js +2 -2
  129. package/dist/fn/style/addStyle.js +2 -2
  130. package/dist/fn/style/cssExists.js +2 -2
  131. package/dist/fn/style/outerHeight.js +1 -1
  132. package/dist/fn/style/outerWidth.js +1 -1
  133. package/dist/fn/style/resize.js +2 -2
  134. package/dist/fn/type/checkType.js +7 -7
  135. package/dist/fn/type/isColor.js +1 -1
  136. package/dist/fn/type/isCp.js +1 -1
  137. package/dist/fn/type/isDimension.js +1 -1
  138. package/dist/fn/type/isEmail.js +1 -1
  139. package/dist/fn/type/isEmpty.js +2 -2
  140. package/dist/fn/type/isHostname.js +2 -2
  141. package/dist/fn/type/isIP.js +1 -1
  142. package/dist/fn/type/isPropSize.js +1 -1
  143. package/dist/fn/type/isSame.js +2 -2
  144. package/dist/fn/type/isValidDimension.js +2 -2
  145. package/dist/fn/type/isValidName.js +1 -1
  146. package/dist/fn/type/isValue.js +1 -1
  147. package/dist/fn.d.ts +3 -3
  148. package/dist/fn.js +226 -226
  149. package/dist/index.js +7 -7
  150. package/package.json +3 -2
  151. package/dist/fn/_addLoader.d.ts +0 -2
  152. package/dist/fn/_addLoader.js +0 -37
  153. package/dist/fn/_compareValues.d.ts +0 -2
  154. package/dist/fn/_compareValues.js +0 -40
  155. package/dist/fn/_deleteLoader.d.ts +0 -2
  156. package/dist/fn/_deleteLoader.js +0 -25
  157. package/dist/fn/abort.d.ts +0 -2
  158. package/dist/fn/abort.js +0 -14
  159. package/dist/fn/abortURL.d.ts +0 -2
  160. package/dist/fn/abortURL.js +0 -13
  161. package/dist/fn/addColors.d.ts +0 -2
  162. package/dist/fn/addColors.js +0 -41
  163. package/dist/fn/addInputs.d.ts +0 -2
  164. package/dist/fn/addInputs.js +0 -40
  165. package/dist/fn/addStyle.d.ts +0 -2
  166. package/dist/fn/addStyle.js +0 -10
  167. package/dist/fn/adjustHeight.d.ts +0 -2
  168. package/dist/fn/adjustHeight.js +0 -10
  169. package/dist/fn/adjustSize.d.ts +0 -2
  170. package/dist/fn/adjustSize.js +0 -21
  171. package/dist/fn/adjustWidth.d.ts +0 -2
  172. package/dist/fn/adjustWidth.js +0 -10
  173. package/dist/fn/ajax.d.ts +0 -2
  174. package/dist/fn/ajax.js +0 -114
  175. package/dist/fn/analyzeFunction.d.ts +0 -11
  176. package/dist/fn/analyzeFunction.js +0 -141
  177. package/dist/fn/animateCss.d.ts +0 -2
  178. package/dist/fn/animateCss.js +0 -20
  179. package/dist/fn/arrayBuffer2String.d.ts +0 -2
  180. package/dist/fn/arrayBuffer2String.js +0 -4
  181. package/dist/fn/arrayFromProp.d.ts +0 -2
  182. package/dist/fn/arrayFromProp.js +0 -10
  183. package/dist/fn/autoExtend.d.ts +0 -2
  184. package/dist/fn/autoExtend.js +0 -13
  185. package/dist/fn/baseName.d.ts +0 -2
  186. package/dist/fn/baseName.js +0 -17
  187. package/dist/fn/br2nl.d.ts +0 -2
  188. package/dist/fn/br2nl.js +0 -5
  189. package/dist/fn/calendar.d.ts +0 -2
  190. package/dist/fn/calendar.js +0 -23
  191. package/dist/fn/callback.d.ts +0 -2
  192. package/dist/fn/callback.js +0 -82
  193. package/dist/fn/camelToCss.d.ts +0 -2
  194. package/dist/fn/camelToCss.js +0 -10
  195. package/dist/fn/camelize.d.ts +0 -2
  196. package/dist/fn/camelize.js +0 -9
  197. package/dist/fn/canvasToImage.d.ts +0 -2
  198. package/dist/fn/canvasToImage.js +0 -6
  199. package/dist/fn/center.d.ts +0 -2
  200. package/dist/fn/center.js +0 -24
  201. package/dist/fn/checkProps.d.ts +0 -2
  202. package/dist/fn/checkProps.js +0 -5
  203. package/dist/fn/checkPropsDetails.d.ts +0 -2
  204. package/dist/fn/checkPropsDetails.js +0 -50
  205. package/dist/fn/checkPropsOrDie.d.ts +0 -2
  206. package/dist/fn/checkPropsOrDie.js +0 -9
  207. package/dist/fn/checkType.d.ts +0 -2
  208. package/dist/fn/checkType.js +0 -59
  209. package/dist/fn/chrono.d.ts +0 -3
  210. package/dist/fn/chrono.js +0 -23
  211. package/dist/fn/circularReplacer.d.ts +0 -2
  212. package/dist/fn/circularReplacer.js +0 -33
  213. package/dist/fn/clone.d.ts +0 -2
  214. package/dist/fn/clone.js +0 -16
  215. package/dist/fn/colorToHex.d.ts +0 -2
  216. package/dist/fn/colorToHex.js +0 -6
  217. package/dist/fn/compare.d.ts +0 -2
  218. package/dist/fn/compare.js +0 -99
  219. package/dist/fn/compareConditions.d.ts +0 -2
  220. package/dist/fn/compareConditions.js +0 -42
  221. package/dist/fn/copy.d.ts +0 -2
  222. package/dist/fn/copy.js +0 -37
  223. package/dist/fn/correctCase.d.ts +0 -2
  224. package/dist/fn/correctCase.js +0 -4
  225. package/dist/fn/count.d.ts +0 -2
  226. package/dist/fn/count.js +0 -5
  227. package/dist/fn/crc32.d.ts +0 -2
  228. package/dist/fn/crc32.js +0 -18
  229. package/dist/fn/createObject.d.ts +0 -2
  230. package/dist/fn/createObject.js +0 -9
  231. package/dist/fn/cssExists.d.ts +0 -2
  232. package/dist/fn/cssExists.js +0 -30
  233. package/dist/fn/date.d.ts +0 -2
  234. package/dist/fn/date.js +0 -28
  235. package/dist/fn/dateSQL.d.ts +0 -2
  236. package/dist/fn/dateSQL.js +0 -8
  237. package/dist/fn/daysInMonth.d.ts +0 -2
  238. package/dist/fn/daysInMonth.js +0 -9
  239. package/dist/fn/deepPath.d.ts +0 -2
  240. package/dist/fn/deepPath.js +0 -23
  241. package/dist/fn/defaultAjaxAbortFunction.d.ts +0 -2
  242. package/dist/fn/defaultAjaxAbortFunction.js +0 -5
  243. package/dist/fn/defaultAjaxErrorFunction.d.ts +0 -2
  244. package/dist/fn/defaultAjaxErrorFunction.js +0 -4
  245. package/dist/fn/defaultAlertFunction.d.ts +0 -2
  246. package/dist/fn/defaultAlertFunction.js +0 -5
  247. package/dist/fn/defaultConfirmFunction.d.ts +0 -2
  248. package/dist/fn/defaultConfirmFunction.js +0 -14
  249. package/dist/fn/defaultEndLoadingFunction.d.ts +0 -2
  250. package/dist/fn/defaultEndLoadingFunction.js +0 -4
  251. package/dist/fn/defaultErrorFunction.d.ts +0 -2
  252. package/dist/fn/defaultErrorFunction.js +0 -5
  253. package/dist/fn/defaultHistoryFunction.d.ts +0 -2
  254. package/dist/fn/defaultHistoryFunction.js +0 -4
  255. package/dist/fn/defaultLinkFunction.d.ts +0 -2
  256. package/dist/fn/defaultLinkFunction.js +0 -4
  257. package/dist/fn/defaultPostLinkFunction.d.ts +0 -2
  258. package/dist/fn/defaultPostLinkFunction.js +0 -4
  259. package/dist/fn/defaultPreLinkFunction.d.ts +0 -2
  260. package/dist/fn/defaultPreLinkFunction.js +0 -4
  261. package/dist/fn/defaultResizeFunction.d.ts +0 -2
  262. package/dist/fn/defaultResizeFunction.js +0 -4
  263. package/dist/fn/defaultStartLoadingFunction.d.ts +0 -2
  264. package/dist/fn/defaultStartLoadingFunction.js +0 -4
  265. package/dist/fn/deleteProp.d.ts +0 -2
  266. package/dist/fn/deleteProp.js +0 -7
  267. package/dist/fn/diffObj.d.ts +0 -2
  268. package/dist/fn/diffObj.js +0 -91
  269. package/dist/fn/dirName.d.ts +0 -2
  270. package/dist/fn/dirName.js +0 -18
  271. package/dist/fn/download.d.ts +0 -2
  272. package/dist/fn/download.js +0 -36
  273. package/dist/fn/downloadContent.d.ts +0 -2
  274. package/dist/fn/downloadContent.js +0 -48
  275. package/dist/fn/each.d.ts +0 -2
  276. package/dist/fn/each.js +0 -23
  277. package/dist/fn/eraseCookie.d.ts +0 -2
  278. package/dist/fn/eraseCookie.js +0 -4
  279. package/dist/fn/error.d.ts +0 -2
  280. package/dist/fn/error.js +0 -17
  281. package/dist/fn/escapeDquotes.d.ts +0 -2
  282. package/dist/fn/escapeDquotes.js +0 -8
  283. package/dist/fn/escapeRegExp.d.ts +0 -2
  284. package/dist/fn/escapeRegExp.js +0 -4
  285. package/dist/fn/escapeSquotes.d.ts +0 -2
  286. package/dist/fn/escapeSquotes.js +0 -8
  287. package/dist/fn/escapeTicks.d.ts +0 -2
  288. package/dist/fn/escapeTicks.js +0 -8
  289. package/dist/fn/escapeUrl.d.ts +0 -2
  290. package/dist/fn/escapeUrl.js +0 -40
  291. package/dist/fn/extend.d.ts +0 -2
  292. package/dist/fn/extend.js +0 -71
  293. package/dist/fn/extendOut.d.ts +0 -2
  294. package/dist/fn/extendOut.js +0 -24
  295. package/dist/fn/fdate.d.ts +0 -2
  296. package/dist/fn/fdate.js +0 -19
  297. package/dist/fn/fdatetime.d.ts +0 -2
  298. package/dist/fn/fdatetime.js +0 -23
  299. package/dist/fn/fieldValue.d.ts +0 -2
  300. package/dist/fn/fieldValue.js +0 -24
  301. package/dist/fn/fileExt.d.ts +0 -2
  302. package/dist/fn/fileExt.js +0 -11
  303. package/dist/fn/filter.d.ts +0 -3
  304. package/dist/fn/filter.js +0 -47
  305. package/dist/fn/filterToConditions.d.ts +0 -11
  306. package/dist/fn/filterToConditions.js +0 -31
  307. package/dist/fn/findAll.d.ts +0 -2
  308. package/dist/fn/findAll.js +0 -18
  309. package/dist/fn/fori.d.ts +0 -2
  310. package/dist/fn/fori.js +0 -19
  311. package/dist/fn/forir.d.ts +0 -2
  312. package/dist/fn/forir.js +0 -19
  313. package/dist/fn/format.d.ts +0 -2
  314. package/dist/fn/format.js +0 -14
  315. package/dist/fn/formatBytes.d.ts +0 -2
  316. package/dist/fn/formatBytes.js +0 -8
  317. package/dist/fn/formatDate.d.ts +0 -2
  318. package/dist/fn/formatDate.js +0 -4
  319. package/dist/fn/formatSize.d.ts +0 -2
  320. package/dist/fn/formatSize.js +0 -12
  321. package/dist/fn/formdata.d.ts +0 -2
  322. package/dist/fn/formdata.js +0 -52
  323. package/dist/fn/fromXml.d.ts +0 -2
  324. package/dist/fn/fromXml.js +0 -44
  325. package/dist/fn/ftime.d.ts +0 -2
  326. package/dist/fn/ftime.js +0 -15
  327. package/dist/fn/getAllTags.d.ts +0 -2
  328. package/dist/fn/getAllTags.js +0 -5
  329. package/dist/fn/getAncestors.d.ts +0 -2
  330. package/dist/fn/getAncestors.js +0 -25
  331. package/dist/fn/getAttributes.d.ts +0 -2
  332. package/dist/fn/getAttributes.js +0 -12
  333. package/dist/fn/getBrowserName.d.ts +0 -2
  334. package/dist/fn/getBrowserName.js +0 -21
  335. package/dist/fn/getBrowserVersion.d.ts +0 -2
  336. package/dist/fn/getBrowserVersion.js +0 -22
  337. package/dist/fn/getCookie.d.ts +0 -2
  338. package/dist/fn/getCookie.js +0 -18
  339. package/dist/fn/getCssVar.d.ts +0 -2
  340. package/dist/fn/getCssVar.js +0 -7
  341. package/dist/fn/getDay.d.ts +0 -2
  342. package/dist/fn/getDay.js +0 -17
  343. package/dist/fn/getDeviceType.d.ts +0 -2
  344. package/dist/fn/getDeviceType.js +0 -11
  345. package/dist/fn/getEventData.d.ts +0 -2
  346. package/dist/fn/getEventData.js +0 -102
  347. package/dist/fn/getField.d.ts +0 -2
  348. package/dist/fn/getField.js +0 -9
  349. package/dist/fn/getFieldValues.d.ts +0 -2
  350. package/dist/fn/getFieldValues.js +0 -13
  351. package/dist/fn/getHTMLOfSelection.d.ts +0 -2
  352. package/dist/fn/getHTMLOfSelection.js +0 -18
  353. package/dist/fn/getHtml.d.ts +0 -2
  354. package/dist/fn/getHtml.js +0 -9
  355. package/dist/fn/getLoader.d.ts +0 -2
  356. package/dist/fn/getLoader.js +0 -9
  357. package/dist/fn/getPath.d.ts +0 -2
  358. package/dist/fn/getPath.js +0 -42
  359. package/dist/fn/getProp.d.ts +0 -2
  360. package/dist/fn/getProp.js +0 -7
  361. package/dist/fn/getProperty.d.ts +0 -2
  362. package/dist/fn/getProperty.js +0 -11
  363. package/dist/fn/getRequestId.d.ts +0 -2
  364. package/dist/fn/getRequestId.js +0 -14
  365. package/dist/fn/getRow.d.ts +0 -2
  366. package/dist/fn/getRow.js +0 -9
  367. package/dist/fn/getScrollBarSize.d.ts +0 -2
  368. package/dist/fn/getScrollBarSize.js +0 -25
  369. package/dist/fn/getText.d.ts +0 -2
  370. package/dist/fn/getText.js +0 -4
  371. package/dist/fn/getTimeoff.d.ts +0 -2
  372. package/dist/fn/getTimeoff.js +0 -7
  373. package/dist/fn/happy.d.ts +0 -2
  374. package/dist/fn/happy.js +0 -10
  375. package/dist/fn/hash.d.ts +0 -2
  376. package/dist/fn/hash.js +0 -36
  377. package/dist/fn/hex2rgb.d.ts +0 -6
  378. package/dist/fn/hex2rgb.js +0 -11
  379. package/dist/fn/history.d.ts +0 -2
  380. package/dist/fn/history.js +0 -4
  381. package/dist/fn/html2text.d.ts +0 -2
  382. package/dist/fn/html2text.js +0 -7
  383. package/dist/fn/imageToCanvas.d.ts +0 -2
  384. package/dist/fn/imageToCanvas.js +0 -8
  385. package/dist/fn/imgToBase64.d.ts +0 -2
  386. package/dist/fn/imgToBase64.js +0 -7
  387. package/dist/fn/info.d.ts +0 -2
  388. package/dist/fn/info.js +0 -11
  389. package/dist/fn/isActiveInterface.d.ts +0 -2
  390. package/dist/fn/isActiveInterface.js +0 -8
  391. package/dist/fn/isArray.d.ts +0 -2
  392. package/dist/fn/isArray.js +0 -11
  393. package/dist/fn/isBlob.d.ts +0 -2
  394. package/dist/fn/isBlob.js +0 -11
  395. package/dist/fn/isBoolean.d.ts +0 -2
  396. package/dist/fn/isBoolean.js +0 -11
  397. package/dist/fn/isCanvas.d.ts +0 -2
  398. package/dist/fn/isCanvas.js +0 -11
  399. package/dist/fn/isColor.d.ts +0 -2
  400. package/dist/fn/isColor.js +0 -16
  401. package/dist/fn/isComment.d.ts +0 -2
  402. package/dist/fn/isComment.js +0 -11
  403. package/dist/fn/isCp.d.ts +0 -2
  404. package/dist/fn/isCp.js +0 -17
  405. package/dist/fn/isDate.d.ts +0 -2
  406. package/dist/fn/isDate.js +0 -11
  407. package/dist/fn/isDesktopDevice.d.ts +0 -2
  408. package/dist/fn/isDesktopDevice.js +0 -5
  409. package/dist/fn/isDimension.d.ts +0 -2
  410. package/dist/fn/isDimension.js +0 -15
  411. package/dist/fn/isDom.d.ts +0 -2
  412. package/dist/fn/isDom.js +0 -11
  413. package/dist/fn/isEmail.d.ts +0 -2
  414. package/dist/fn/isEmail.js +0 -16
  415. package/dist/fn/isEmpty.d.ts +0 -2
  416. package/dist/fn/isEmpty.js +0 -18
  417. package/dist/fn/isEvent.d.ts +0 -2
  418. package/dist/fn/isEvent.js +0 -11
  419. package/dist/fn/isFocused.d.ts +0 -2
  420. package/dist/fn/isFocused.js +0 -4
  421. package/dist/fn/isFunction.d.ts +0 -2
  422. package/dist/fn/isFunction.js +0 -11
  423. package/dist/fn/isHostname.d.ts +0 -2
  424. package/dist/fn/isHostname.js +0 -16
  425. package/dist/fn/isIP.d.ts +0 -2
  426. package/dist/fn/isIP.js +0 -12
  427. package/dist/fn/isInside.d.ts +0 -2
  428. package/dist/fn/isInside.js +0 -23
  429. package/dist/fn/isInt.d.ts +0 -2
  430. package/dist/fn/isInt.js +0 -11
  431. package/dist/fn/isIterable.d.ts +0 -2
  432. package/dist/fn/isIterable.js +0 -4
  433. package/dist/fn/isMobile.d.ts +0 -2
  434. package/dist/fn/isMobile.js +0 -6
  435. package/dist/fn/isMobileDevice.d.ts +0 -2
  436. package/dist/fn/isMobileDevice.js +0 -5
  437. package/dist/fn/isNull.d.ts +0 -2
  438. package/dist/fn/isNull.js +0 -11
  439. package/dist/fn/isNumber.d.ts +0 -2
  440. package/dist/fn/isNumber.js +0 -11
  441. package/dist/fn/isObject.d.ts +0 -2
  442. package/dist/fn/isObject.js +0 -11
  443. package/dist/fn/isPercent.d.ts +0 -2
  444. package/dist/fn/isPercent.js +0 -11
  445. package/dist/fn/isPrimitive.d.ts +0 -2
  446. package/dist/fn/isPrimitive.js +0 -11
  447. package/dist/fn/isPromise.d.ts +0 -2
  448. package/dist/fn/isPromise.js +0 -11
  449. package/dist/fn/isPropSize.d.ts +0 -2
  450. package/dist/fn/isPropSize.js +0 -12
  451. package/dist/fn/isSQLDate.d.ts +0 -2
  452. package/dist/fn/isSQLDate.js +0 -12
  453. package/dist/fn/isSame.d.ts +0 -2
  454. package/dist/fn/isSame.js +0 -33
  455. package/dist/fn/isString.d.ts +0 -2
  456. package/dist/fn/isString.js +0 -11
  457. package/dist/fn/isSymbol.d.ts +0 -2
  458. package/dist/fn/isSymbol.js +0 -11
  459. package/dist/fn/isTabletDevice.d.ts +0 -2
  460. package/dist/fn/isTabletDevice.js +0 -5
  461. package/dist/fn/isURL.d.ts +0 -2
  462. package/dist/fn/isURL.js +0 -11
  463. package/dist/fn/isValidDimension.d.ts +0 -2
  464. package/dist/fn/isValidDimension.js +0 -13
  465. package/dist/fn/isValidName.d.ts +0 -2
  466. package/dist/fn/isValidName.js +0 -13
  467. package/dist/fn/isValue.d.ts +0 -2
  468. package/dist/fn/isValue.js +0 -12
  469. package/dist/fn/isVue.d.ts +0 -2
  470. package/dist/fn/isVue.js +0 -26
  471. package/dist/fn/iterate.d.ts +0 -2
  472. package/dist/fn/iterate.js +0 -16
  473. package/dist/fn/lightenDarkenHex.d.ts +0 -2
  474. package/dist/fn/lightenDarkenHex.js +0 -27
  475. package/dist/fn/link.d.ts +0 -2
  476. package/dist/fn/link.js +0 -105
  477. package/dist/fn/log.d.ts +0 -2
  478. package/dist/fn/log.js +0 -33
  479. package/dist/fn/makeReactive.d.ts +0 -2
  480. package/dist/fn/makeReactive.js +0 -185
  481. package/dist/fn/map.d.ts +0 -2
  482. package/dist/fn/map.js +0 -11
  483. package/dist/fn/md5.d.ts +0 -2
  484. package/dist/fn/md5.js +0 -121
  485. package/dist/fn/money.d.ts +0 -2
  486. package/dist/fn/money.js +0 -101
  487. package/dist/fn/move.d.ts +0 -2
  488. package/dist/fn/move.js +0 -11
  489. package/dist/fn/multiorder.d.ts +0 -2
  490. package/dist/fn/multiorder.js +0 -22
  491. package/dist/fn/nl2br.d.ts +0 -2
  492. package/dist/fn/nl2br.js +0 -5
  493. package/dist/fn/numProperties.d.ts +0 -2
  494. package/dist/fn/numProperties.js +0 -7
  495. package/dist/fn/objectToFormData.d.ts +0 -2
  496. package/dist/fn/objectToFormData.js +0 -35
  497. package/dist/fn/order.d.ts +0 -2
  498. package/dist/fn/order.js +0 -10
  499. package/dist/fn/outerHeight.d.ts +0 -2
  500. package/dist/fn/outerHeight.js +0 -10
  501. package/dist/fn/outerWidth.d.ts +0 -2
  502. package/dist/fn/outerWidth.js +0 -8
  503. package/dist/fn/percent.d.ts +0 -2
  504. package/dist/fn/percent.js +0 -4
  505. package/dist/fn/pickValue.d.ts +0 -2
  506. package/dist/fn/pickValue.js +0 -6
  507. package/dist/fn/post.d.ts +0 -2
  508. package/dist/fn/post.js +0 -12
  509. package/dist/fn/postOut.d.ts +0 -2
  510. package/dist/fn/postOut.js +0 -30
  511. package/dist/fn/printf.d.ts +0 -2
  512. package/dist/fn/printf.js +0 -7
  513. package/dist/fn/quotes2html.d.ts +0 -2
  514. package/dist/fn/quotes2html.js +0 -11
  515. package/dist/fn/randomInt.d.ts +0 -2
  516. package/dist/fn/randomInt.js +0 -4
  517. package/dist/fn/randomString.d.ts +0 -2
  518. package/dist/fn/randomString.js +0 -46
  519. package/dist/fn/removeAccents.d.ts +0 -2
  520. package/dist/fn/removeAccents.js +0 -15
  521. package/dist/fn/removeEmpty.d.ts +0 -2
  522. package/dist/fn/removeEmpty.js +0 -31
  523. package/dist/fn/removeExtraSpaces.d.ts +0 -2
  524. package/dist/fn/removeExtraSpaces.js +0 -4
  525. package/dist/fn/removeHtmlComments.d.ts +0 -2
  526. package/dist/fn/removeHtmlComments.js +0 -8
  527. package/dist/fn/removePrivateProp.d.ts +0 -2
  528. package/dist/fn/removePrivateProp.js +0 -19
  529. package/dist/fn/removeTrailingChars.d.ts +0 -2
  530. package/dist/fn/removeTrailingChars.js +0 -16
  531. package/dist/fn/repeat.d.ts +0 -2
  532. package/dist/fn/repeat.js +0 -4
  533. package/dist/fn/replaceAll.d.ts +0 -2
  534. package/dist/fn/replaceAll.js +0 -6
  535. package/dist/fn/replaceSelection.d.ts +0 -2
  536. package/dist/fn/replaceSelection.js +0 -42
  537. package/dist/fn/resize.d.ts +0 -2
  538. package/dist/fn/resize.js +0 -39
  539. package/dist/fn/rgb2hex.d.ts +0 -2
  540. package/dist/fn/rgb2hex.js +0 -10
  541. package/dist/fn/riterate.d.ts +0 -2
  542. package/dist/fn/riterate.js +0 -5
  543. package/dist/fn/roundDecimal.d.ts +0 -2
  544. package/dist/fn/roundDecimal.js +0 -4
  545. package/dist/fn/sanitize.d.ts +0 -2
  546. package/dist/fn/sanitize.js +0 -19
  547. package/dist/fn/search.d.ts +0 -3
  548. package/dist/fn/search.js +0 -79
  549. package/dist/fn/selectElementText.d.ts +0 -2
  550. package/dist/fn/selectElementText.js +0 -23
  551. package/dist/fn/selector.d.ts +0 -2
  552. package/dist/fn/selector.js +0 -4
  553. package/dist/fn/setCookie.d.ts +0 -2
  554. package/dist/fn/setCookie.js +0 -11
  555. package/dist/fn/setCssVar.d.ts +0 -2
  556. package/dist/fn/setCssVar.js +0 -8
  557. package/dist/fn/setNavigationVars.d.ts +0 -2
  558. package/dist/fn/setNavigationVars.js +0 -57
  559. package/dist/fn/setProp.d.ts +0 -2
  560. package/dist/fn/setProp.js +0 -8
  561. package/dist/fn/setProperty.d.ts +0 -2
  562. package/dist/fn/setProperty.js +0 -22
  563. package/dist/fn/shorten.d.ts +0 -2
  564. package/dist/fn/shorten.js +0 -17
  565. package/dist/fn/shortenObj.d.ts +0 -2
  566. package/dist/fn/shortenObj.js +0 -17
  567. package/dist/fn/shuffle.d.ts +0 -2
  568. package/dist/fn/shuffle.js +0 -13
  569. package/dist/fn/simpleHash.d.ts +0 -2
  570. package/dist/fn/simpleHash.js +0 -8
  571. package/dist/fn/simpleHash1.d.ts +0 -2
  572. package/dist/fn/simpleHash1.js +0 -10
  573. package/dist/fn/simpleHash2.d.ts +0 -2
  574. package/dist/fn/simpleHash2.js +0 -10
  575. package/dist/fn/stat.d.ts +0 -2
  576. package/dist/fn/stat.js +0 -49
  577. package/dist/fn/string2ArrayBuffer.d.ts +0 -2
  578. package/dist/fn/string2ArrayBuffer.js +0 -9
  579. package/dist/fn/submit.d.ts +0 -2
  580. package/dist/fn/submit.js +0 -33
  581. package/dist/fn/substr.d.ts +0 -2
  582. package/dist/fn/substr.js +0 -17
  583. package/dist/fn/sum.d.ts +0 -2
  584. package/dist/fn/sum.js +0 -13
  585. package/dist/fn/timestamp.d.ts +0 -2
  586. package/dist/fn/timestamp.js +0 -5
  587. package/dist/fn/toCSV.d.ts +0 -2
  588. package/dist/fn/toCSV.js +0 -40
  589. package/dist/fn/toggleFullScreen.d.ts +0 -2
  590. package/dist/fn/toggleFullScreen.js +0 -39
  591. package/dist/fn/translate.d.ts +0 -2
  592. package/dist/fn/translate.js +0 -8
  593. package/dist/fn/treatAjaxArguments.d.ts +0 -2
  594. package/dist/fn/treatAjaxArguments.js +0 -76
  595. package/dist/fn/trim.d.ts +0 -2
  596. package/dist/fn/trim.js +0 -20
  597. package/dist/fn/uniqString.d.ts +0 -2
  598. package/dist/fn/uniqString.js +0 -33
  599. package/dist/fn/unique.d.ts +0 -2
  600. package/dist/fn/unique.js +0 -6
  601. package/dist/fn/upload.d.ts +0 -2
  602. package/dist/fn/upload.js +0 -36
  603. package/dist/fn/warning.d.ts +0 -2
  604. package/dist/fn/warning.js +0 -12
@@ -1,30 +0,0 @@
1
- //import { log } from './log';
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++) {
8
- ok = 1;
9
- try {
10
- rules = css[sx].rules || css[sx].cssRules;
11
- }
12
- catch (e) {
13
- ok = false;
14
- if (e.name !== 'SecurityError') {
15
- throw e;
16
- }
17
- }
18
- if (ok) {
19
- //log(rules);
20
- for (let cx = 0; cx < rules.length; cx++) {
21
- //log(rules[cx].selectorText);
22
- if (new RegExp('(^|\\s)' + escapeRegExp(f) + '(\\{|\\s)', 'g').test(rules[cx].selectorText)) {
23
- return true;
24
- }
25
- }
26
- }
27
- }
28
- return false;
29
- };
30
- export { cssExists };
package/dist/fn/date.d.ts DELETED
@@ -1,2 +0,0 @@
1
- declare const date: (v: any) => any;
2
- export { date };
package/dist/fn/date.js DELETED
@@ -1,28 +0,0 @@
1
- import { isNumber } from './isNumber';
2
- import { substr } from './substr';
3
- import { isDate } from './isDate';
4
- const date = function (v) {
5
- let d = false, t = typeof v;
6
- if (v === undefined) {
7
- return new Date();
8
- }
9
- if (t === 'number' || (isNumber(v) && v !== '')) {
10
- if (v < 10000000000) {
11
- v = v * 1000;
12
- }
13
- return new Date(v);
14
- }
15
- if (t === 'string') {
16
- if (v.length === 10) {
17
- return new Date(parseInt(substr(v, 0, 4)), parseInt(substr(v, 5, 2)) - 1, parseInt(substr(v, 8, 2)), 12);
18
- }
19
- else if (v.length === 19) {
20
- return new Date(parseInt(substr(v, 0, 4)), parseInt(substr(v, 5, 2)) - 1, parseInt(substr(v, 8, 2)), parseInt(substr(v, 11, 2)), parseInt(substr(v, 14, 2)), parseInt(substr(v, 17, 2)));
21
- }
22
- }
23
- else if (isDate(v)) {
24
- return v;
25
- }
26
- return d;
27
- };
28
- export { date };
@@ -1,2 +0,0 @@
1
- declare const dateSQL: (v: any, dayOnly: any) => string;
2
- export { dateSQL };
@@ -1,8 +0,0 @@
1
- import { date } from './date';
2
- const dateSQL = function (v, dayOnly) {
3
- let value = date(v);
4
- if (value) {
5
- return dayjs(value).format('YYYY-MM-DD' + (dayOnly ? '' : ' HH:mm:ss'));
6
- }
7
- };
8
- export { dateSQL };
@@ -1,2 +0,0 @@
1
- declare const daysInMonth: (v: any) => number | false;
2
- export { daysInMonth };
@@ -1,9 +0,0 @@
1
- import { date } from './date';
2
- const daysInMonth = function (v) {
3
- let d = date(v);
4
- if (d) {
5
- return dayjs(d).daysInMonth();
6
- }
7
- return false;
8
- };
9
- export { daysInMonth };
@@ -1,2 +0,0 @@
1
- declare const deepPath: (arr: any[], filter: object, deepProperty: string, res?: any[]) => false | any[];
2
- export { deepPath };
@@ -1,23 +0,0 @@
1
- import { search } from './search';
2
- import { each } from './each';
3
- import { isArray } from './isArray';
4
- const deepPath = function (arr, filter, deepProperty, res = []) {
5
- let idx;
6
- let start = 0;
7
- if ((idx = search(arr, filter, start)) > -1) {
8
- res.push(idx);
9
- return res;
10
- }
11
- each(arr, (it, i) => {
12
- if (isArray(it[deepProperty])) {
13
- let r = res.slice();
14
- r.push(i);
15
- let tmp = deepPath(it[deepProperty], filter, deepProperty, r);
16
- if (tmp !== false) {
17
- return tmp;
18
- }
19
- }
20
- });
21
- return false;
22
- };
23
- export { deepPath };
@@ -1,2 +0,0 @@
1
- declare const defaultAjaxAbortFunction: (message: string, url?: string) => void;
2
- export { defaultAjaxAbortFunction };
@@ -1,5 +0,0 @@
1
- import { log } from './log';
2
- const defaultAjaxAbortFunction = function (message, url = '') {
3
- log(message);
4
- };
5
- export { defaultAjaxAbortFunction };
@@ -1,2 +0,0 @@
1
- declare const defaultAjaxErrorFunction: (jqXHR: any, textStatus?: string, errorThrown?: object) => boolean;
2
- export { defaultAjaxErrorFunction };
@@ -1,4 +0,0 @@
1
- const defaultAjaxErrorFunction = function (jqXHR, textStatus, errorThrown) {
2
- return false;
3
- };
4
- export { defaultAjaxErrorFunction };
@@ -1,2 +0,0 @@
1
- declare const defaultAlertFunction: (msg: string, title?: string) => void;
2
- export { defaultAlertFunction };
@@ -1,5 +0,0 @@
1
- const defaultAlertFunction = function (msg, title) {
2
- /** @todo */
3
- alert(msg);
4
- };
5
- export { defaultAlertFunction };
@@ -1,2 +0,0 @@
1
- declare const defaultConfirmFunction: (text: string, yesFn: () => any, noFn: () => any) => void;
2
- export { defaultConfirmFunction };
@@ -1,14 +0,0 @@
1
- import { isFunction } from './isFunction';
2
- const defaultConfirmFunction = function (text, yesFn, noFn) {
3
- let ok = 0;
4
- if (confirm(text)) {
5
- if (isFunction(yesFn)) {
6
- yesFn();
7
- ok = 1;
8
- }
9
- }
10
- if (!ok && isFunction(noFn)) {
11
- noFn();
12
- }
13
- };
14
- export { defaultConfirmFunction };
@@ -1,2 +0,0 @@
1
- declare const defaultEndLoadingFunction: (url: string, timestamp: number, data?: object, res?: object) => boolean;
2
- export { defaultEndLoadingFunction };
@@ -1,4 +0,0 @@
1
- const defaultEndLoadingFunction = function (url, timestamp, data, res) {
2
- return true;
3
- };
4
- export { defaultEndLoadingFunction };
@@ -1,2 +0,0 @@
1
- declare const defaultErrorFunction: (message: any) => void;
2
- export { defaultErrorFunction };
@@ -1,5 +0,0 @@
1
- import { log } from './log';
2
- const defaultErrorFunction = function (message) {
3
- log(message);
4
- };
5
- export { defaultErrorFunction };
@@ -1,2 +0,0 @@
1
- declare const defaultHistoryFunction: (obj: any) => boolean;
2
- export { defaultHistoryFunction };
@@ -1,4 +0,0 @@
1
- const defaultHistoryFunction = function (obj) {
2
- return true;
3
- };
4
- export { defaultHistoryFunction };
@@ -1,2 +0,0 @@
1
- declare const defaultLinkFunction: (responseObj: any, ele: any) => boolean;
2
- export { defaultLinkFunction };
@@ -1,4 +0,0 @@
1
- const defaultLinkFunction = function (responseObj, ele) {
2
- return true;
3
- };
4
- export { defaultLinkFunction };
@@ -1,2 +0,0 @@
1
- declare const defaultPostLinkFunction: (r: object, ele?: HTMLElement) => boolean;
2
- export { defaultPostLinkFunction };
@@ -1,4 +0,0 @@
1
- const defaultPostLinkFunction = function (r, ele) {
2
- return true;
3
- };
4
- export { defaultPostLinkFunction };
@@ -1,2 +0,0 @@
1
- declare const defaultPreLinkFunction: (url: string, force?: boolean, ele?: HTMLElement) => string;
2
- export { defaultPreLinkFunction };
@@ -1,4 +0,0 @@
1
- const defaultPreLinkFunction = function (url, force, ele) {
2
- return url;
3
- };
4
- export { defaultPreLinkFunction };
@@ -1,2 +0,0 @@
1
- declare const defaultResizeFunction: () => boolean;
2
- export { defaultResizeFunction };
@@ -1,4 +0,0 @@
1
- const defaultResizeFunction = function () {
2
- return true;
3
- };
4
- export { defaultResizeFunction };
@@ -1,2 +0,0 @@
1
- declare const defaultStartLoadingFunction: (url: string, tst: number, data?: object, requestId?: string) => boolean;
2
- export { defaultStartLoadingFunction };
@@ -1,4 +0,0 @@
1
- const defaultStartLoadingFunction = function (url, tst, data, requestId = null) {
2
- return true;
3
- };
4
- export { defaultStartLoadingFunction };
@@ -1,2 +0,0 @@
1
- declare const deleteProp: (obj: object, prop: string) => void;
2
- export { deleteProp };
@@ -1,7 +0,0 @@
1
- import { checkType } from './checkType';
2
- const deleteProp = function (obj, prop) {
3
- checkType(obj, 'object', bbn._('The obj must be an object in setProp'));
4
- checkType(prop, 'string', bbn._('The prop must be a string in setProp'));
5
- delete obj[prop];
6
- };
7
- export { deleteProp };
@@ -1,2 +0,0 @@
1
- declare const diffObj: (obj1: object, obj2: object, unchanged?: boolean, notRoot?: boolean) => any;
2
- export { diffObj };
@@ -1,91 +0,0 @@
1
- import { isDate } from './isDate';
2
- import { createObject } from './createObject';
3
- import { isFunction } from './isFunction';
4
- import { isValue } from './isValue';
5
- import { isDom } from './isDom';
6
- import { numProperties } from './numProperties';
7
- let diffObjProcessed = [];
8
- const diffObj = function (obj1, obj2, unchanged = false, notRoot = false) {
9
- if (!notRoot) {
10
- diffObjProcessed = [];
11
- }
12
- let VALUE_CREATED = 'created', VALUE_UPDATED = 'updated', VALUE_DELETED = 'deleted', VALUE_UNCHANGED = 'unchanged', _compareValues = function (value1, value2) {
13
- if (value1 === value2) {
14
- return VALUE_UNCHANGED;
15
- }
16
- if (isDate(value1) && isDate(value2) && value1.getTime() === value2.getTime()) {
17
- return VALUE_UNCHANGED;
18
- }
19
- if ('undefined' == typeof value1) {
20
- return VALUE_CREATED;
21
- }
22
- if ('undefined' == typeof value2) {
23
- return VALUE_DELETED;
24
- }
25
- return VALUE_UPDATED;
26
- };
27
- if (notRoot === undefined) {
28
- notRoot = false;
29
- }
30
- let diff = createObject();
31
- if (!isFunction(obj1) && !isFunction(obj2)) {
32
- if (isValue(obj1) || isValue(obj2)) {
33
- let res = _compareValues(obj1, obj2);
34
- if (unchanged || res !== VALUE_UNCHANGED) {
35
- let ret = createObject();
36
- Object.defineProperty(ret, 'type', {
37
- value: res,
38
- enumerable: false,
39
- });
40
- Object.defineProperty(ret, 'data', {
41
- value: obj1 === undefined ? obj2 : obj1,
42
- enumerable: false,
43
- });
44
- Object.defineProperty(ret, '_bbnDiffObjProof', {
45
- value: true,
46
- enumerable: false,
47
- });
48
- if (obj1 !== undefined) {
49
- Object.defineProperty(ret, 'newData', {
50
- value: obj2,
51
- enumerable: false,
52
- });
53
- }
54
- return ret;
55
- }
56
- return false;
57
- }
58
- if (isDom(obj1) || isDom(obj2)) {
59
- return false;
60
- }
61
- if (diffObjProcessed.includes(obj1) || diffObjProcessed.includes(obj2)) {
62
- //error(bbn._("Can't compare objects because they contain circular references"));
63
- return false;
64
- }
65
- diffObjProcessed.push(obj1, obj2);
66
- for (let key in obj1) {
67
- if (isFunction(obj1[key])) {
68
- continue;
69
- }
70
- let value2 = undefined;
71
- if ('undefined' != typeof obj2[key]) {
72
- value2 = obj2[key];
73
- }
74
- let res = diffObj(obj1[key], value2, unchanged, true);
75
- if (res) {
76
- diff[key] = res;
77
- }
78
- }
79
- for (let key in obj2) {
80
- if (isFunction(obj2[key]) || 'undefined' != typeof obj1[key]) {
81
- continue;
82
- }
83
- let res = diffObj(undefined, obj2[key], unchanged, true);
84
- if (res) {
85
- diff[key] = res;
86
- }
87
- }
88
- }
89
- return !notRoot || unchanged || numProperties(diff) ? diff : false;
90
- };
91
- export { diffObj };
@@ -1,2 +0,0 @@
1
- declare const dirName: (path: any) => string;
2
- export { dirName };
@@ -1,18 +0,0 @@
1
- import { isString } from './isString';
2
- import { substr } from './substr';
3
- const dirName = function (path) {
4
- if (isString(path) && path) {
5
- while (substr(path, path.length - 1) === '/') {
6
- path = substr(path, 0, path.length - 1);
7
- }
8
- let pos = path.lastIndexOf('/');
9
- if (pos > 0) {
10
- return substr(path, 0, pos);
11
- }
12
- if (pos === 0) {
13
- return '/';
14
- }
15
- }
16
- return '';
17
- };
18
- export { dirName };
@@ -1,2 +0,0 @@
1
- declare const download: (url: string, filename?: string | object, params?: object) => any;
2
- export { download };
@@ -1,36 +0,0 @@
1
- import { ajax } from './ajax';
2
- import { substr } from './substr';
3
- import { baseName } from './baseName';
4
- import { isBlob } from './isBlob';
5
- import { fileExt } from './fileExt';
6
- import { downloadContent } from './downloadContent';
7
- import { defaultAjaxErrorFunction } from './defaultAjaxErrorFunction';
8
- const download = function (url, filename, params) {
9
- // We can intervert the arguments
10
- if (filename && (typeof (filename) === 'object')) {
11
- params = filename;
12
- filename = null;
13
- }
14
- return ajax(url, 'blob', params || { _bbn_download: 1 }, (d, headers) => {
15
- if (!filename) {
16
- let cd = 'attachment; filename=';
17
- if (headers && headers['content-disposition'] && headers['content-disposition'].indexOf(cd) === 0) {
18
- filename = substr(headers['content-disposition'], cd.length + 1, headers['content-disposition'].length - cd.length - 2);
19
- }
20
- else {
21
- filename = baseName(url);
22
- }
23
- }
24
- if (isBlob(d)) {
25
- let extension = fileExt(filename);
26
- let htmlExtensions = ['php', 'html'];
27
- if ((typeof filename === 'string') && ((('type' in d) && (d.type !== 'text/html')) || htmlExtensions.includes(extension))) {
28
- downloadContent(filename, d);
29
- return;
30
- }
31
- }
32
- }, e => {
33
- defaultAjaxErrorFunction(e);
34
- });
35
- };
36
- export { download };
@@ -1,2 +0,0 @@
1
- declare const downloadContent: (filename: string, content: any, type?: string) => void;
2
- export { downloadContent };
@@ -1,48 +0,0 @@
1
- import { isCanvas } from './isCanvas';
2
- import { isObject } from './isObject';
3
- import { isString } from './isString';
4
- import { log } from './log';
5
- const downloadContent = function (filename, content, type) {
6
- if (isCanvas(content)) {
7
- content.toBlob((blob) => {
8
- // blob ready, download it
9
- let a = document.createElement('a');
10
- a.download = filename;
11
- a.href = window.URL.createObjectURL(blob);
12
- a.className = 'bbn-no';
13
- a.click();
14
- // delete the internal blob reference, to let the browser clear memory from it
15
- window.URL.revokeObjectURL(a.href);
16
- }, type || 'image/png');
17
- return;
18
- }
19
- if (!type) {
20
- type = isObject(content) && content.type ? content.type : 'octet/stream';
21
- }
22
- else if (type.indexOf('/') === -1) {
23
- type = 'text/' + type;
24
- }
25
- let a = window.document.createElement('a');
26
- a.className = 'bbn-no';
27
- let src = null;
28
- if (isString(content)) {
29
- src = new Blob([content], { type: type });
30
- }
31
- else {
32
- try {
33
- src = content;
34
- }
35
- catch (e) {
36
- log(e);
37
- }
38
- }
39
- a.href = window.URL.createObjectURL(src);
40
- a.download = filename;
41
- // Append anchor to body.
42
- document.body.appendChild(a);
43
- a.click();
44
- window.URL.revokeObjectURL(a.href);
45
- // Remove anchor from body
46
- document.body.removeChild(a);
47
- };
48
- export { downloadContent };
package/dist/fn/each.d.ts DELETED
@@ -1,2 +0,0 @@
1
- declare const each: (arr: any, fn: any) => any;
2
- export { each };
package/dist/fn/each.js DELETED
@@ -1,23 +0,0 @@
1
- import { isNumber } from './isNumber';
2
- import { isIterable } from './isIterable';
3
- import { iterate } from './iterate';
4
- const each = function (arr, fn) {
5
- if (isNumber(arr) && arr > 0) {
6
- for (let i = 0; i < arr; i++) {
7
- if (fn(i, i) === false) {
8
- return;
9
- }
10
- }
11
- return;
12
- }
13
- if (isIterable(arr)) {
14
- for (let i = 0; i < arr.length; i++) {
15
- if (fn(arr[i], i) === false) {
16
- return;
17
- }
18
- }
19
- return arr;
20
- }
21
- return iterate(arr, fn);
22
- };
23
- export { each };
@@ -1,2 +0,0 @@
1
- declare const eraseCookie: (name: any) => void;
2
- export { eraseCookie };
@@ -1,4 +0,0 @@
1
- const eraseCookie = function (name) {
2
- document.cookie = name + '=; Max-Age=-99999999;';
3
- };
4
- export { eraseCookie };
@@ -1,2 +0,0 @@
1
- declare const error: (errorMsg: any) => never;
2
- export { error };
package/dist/fn/error.js DELETED
@@ -1,17 +0,0 @@
1
- import { log } from './log';
2
- const error = function (errorMsg) {
3
- if (arguments.length > 1) {
4
- const args = [];
5
- for (let i = 1; i < arguments.length; i++) {
6
- args.push(arguments[i]);
7
- }
8
- args.unshift({
9
- _bbn_console_mode: 'error',
10
- _bbn_console_level: 1,
11
- _bbn_console_style: 'color: #E64141; background: #F7E195; font-size: 14px',
12
- });
13
- log.apply(this, args);
14
- }
15
- throw new Error(errorMsg);
16
- };
17
- export { error };
@@ -1,2 +0,0 @@
1
- declare const escapeDquotes: (str: any) => any;
2
- export { escapeDquotes };
@@ -1,8 +0,0 @@
1
- import { isString } from './isString';
2
- const escapeDquotes = function (str) {
3
- if (!isString(str)) {
4
- return str;
5
- }
6
- return str.replace(/"/g, '\\"');
7
- };
8
- export { escapeDquotes };
@@ -1,2 +0,0 @@
1
- declare const escapeRegExp: (str: any) => any;
2
- export { escapeRegExp };
@@ -1,4 +0,0 @@
1
- const escapeRegExp = function (str) {
2
- return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&');
3
- };
4
- export { escapeRegExp };
@@ -1,2 +0,0 @@
1
- declare const escapeSquotes: (str: any) => any;
2
- export { escapeSquotes };
@@ -1,8 +0,0 @@
1
- import { isString } from './isString';
2
- const escapeSquotes = function (str) {
3
- if (!isString(str)) {
4
- return str;
5
- }
6
- return str.replace(/'/g, "\\'");
7
- };
8
- export { escapeSquotes };
@@ -1,2 +0,0 @@
1
- declare const escapeTicks: (str: any) => any;
2
- export { escapeTicks };
@@ -1,8 +0,0 @@
1
- import { isString } from './isString';
2
- const escapeTicks = function (str) {
3
- if (!isString(str)) {
4
- return str;
5
- }
6
- return str.replace(/`/g, '\\`');
7
- };
8
- export { escapeTicks };
@@ -1,2 +0,0 @@
1
- declare const escapeUrl: (url: any, params: any) => string;
2
- export { escapeUrl };
@@ -1,40 +0,0 @@
1
- import { each } from './each';
2
- import { dirName } from './dirName';
3
- import { baseName } from './baseName';
4
- import { isString } from './isString';
5
- const escapeUrl = function (url, params) {
6
- let st = '';
7
- if (url.match('^(http|https)://')) {
8
- st += 'http';
9
- url = url.substring(4);
10
- if (url.substr(0, 1) === 's') {
11
- st += 's';
12
- url = url.substring(1);
13
- }
14
- st += '://';
15
- url = url.substring(3);
16
- }
17
- each(dirName(url).split('/'), (a) => {
18
- st += encodeURIComponent(a) + '/';
19
- });
20
- let base = baseName(url);
21
- let sep = '?';
22
- let existingParams = '';
23
- if (base.indexOf(sep)) {
24
- let tmp = base.split('?');
25
- sep = '&';
26
- existingParams = '?' + tmp[1];
27
- base = tmp[0];
28
- }
29
- if (params && isString(params)) {
30
- if (params.match('^(\\&|\\?)')) {
31
- params = params.substring(1);
32
- }
33
- params = sep + params;
34
- }
35
- else {
36
- params = '';
37
- }
38
- return st + encodeURIComponent(base) + existingParams + params;
39
- };
40
- export { escapeUrl };
@@ -1,2 +0,0 @@
1
- declare const extend: (...originalArgs: (boolean | object)[]) => any;
2
- export { extend };