@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,20 +1,7 @@
1
- import { numProperties } from './numProperties';
2
- import { log } from './log';
3
- import { isCp } from './isCp';
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.defaultEndLoadingFunction = void 0;
4
4
  const defaultEndLoadingFunction = function (url, timestamp, data, res) {
5
- var _a;
6
- if (res && res.data && (numProperties(res.data) === 1) && res.data.disconnected) {
7
- window.location.reload();
8
- return;
9
- }
10
- if ((_a = window.appui) === null || _a === void 0 ? void 0 : _a.status) {
11
- this.$nextTick(() => {
12
- log("UPDATE LOADBAR");
13
- const loadBar = this.getRef('loading');
14
- if (isCp(loadBar)) {
15
- loadBar.$updateAllComputed();
16
- }
17
- });
18
- }
5
+ return true;
19
6
  };
20
- export { defaultEndLoadingFunction };
7
+ exports.defaultEndLoadingFunction = defaultEndLoadingFunction;
@@ -1,5 +1,8 @@
1
- import { log } from './log';
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.defaultErrorFunction = void 0;
4
+ const log_1 = require("./log");
2
5
  const defaultErrorFunction = function (message) {
3
- log(message);
6
+ (0, log_1.log)(message);
4
7
  };
5
- export { defaultErrorFunction };
8
+ exports.defaultErrorFunction = defaultErrorFunction;
@@ -1,4 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.defaultHistoryFunction = void 0;
1
4
  const defaultHistoryFunction = function (obj) {
2
5
  return true;
3
6
  };
4
- export { defaultHistoryFunction };
7
+ exports.defaultHistoryFunction = defaultHistoryFunction;
@@ -1,4 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.defaultLinkFunction = void 0;
1
4
  const defaultLinkFunction = function (responseObj, ele) {
2
5
  return true;
3
6
  };
4
- export { defaultLinkFunction };
7
+ exports.defaultLinkFunction = defaultLinkFunction;
@@ -1,2 +1,2 @@
1
- declare const defaultPostLinkFunction: (r: any) => boolean;
1
+ declare const defaultPostLinkFunction: (r: object, ele?: HTMLElement) => boolean;
2
2
  export { defaultPostLinkFunction };
@@ -1,4 +1,7 @@
1
- const defaultPostLinkFunction = function (r) {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.defaultPostLinkFunction = void 0;
4
+ const defaultPostLinkFunction = function (r, ele) {
2
5
  return true;
3
6
  };
4
- export { defaultPostLinkFunction };
7
+ exports.defaultPostLinkFunction = defaultPostLinkFunction;
@@ -1,2 +1,2 @@
1
- declare const defaultPreLinkFunction: (url: any) => boolean;
1
+ declare const defaultPreLinkFunction: (url: string, force?: boolean, ele?: HTMLElement) => string;
2
2
  export { defaultPreLinkFunction };
@@ -1,12 +1,7 @@
1
- import { isFunction } from './isFunction';
2
- const defaultPreLinkFunction = function (url) {
3
- let router = appui.getRef('router');
4
- if (router) {
5
- if (isFunction(router.route) && !router.disabled) {
6
- router.route(url);
7
- }
8
- return false;
9
- }
10
- return true;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.defaultPreLinkFunction = void 0;
4
+ const defaultPreLinkFunction = function (url, force, ele) {
5
+ return url;
11
6
  };
12
- export { defaultPreLinkFunction };
7
+ exports.defaultPreLinkFunction = defaultPreLinkFunction;
@@ -1,4 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.defaultResizeFunction = void 0;
1
4
  const defaultResizeFunction = function () {
2
5
  return true;
3
6
  };
4
- export { defaultResizeFunction };
7
+ exports.defaultResizeFunction = defaultResizeFunction;
@@ -1,2 +1,2 @@
1
- declare const defaultStartLoadingFunction: () => void;
1
+ declare const defaultStartLoadingFunction: (url: string, tst: number, data?: object, requestId?: string) => boolean;
2
2
  export { defaultStartLoadingFunction };
@@ -1,15 +1,7 @@
1
- import { log } from './log';
2
- import { isCp } from './isCp';
3
- const defaultStartLoadingFunction = function () {
4
- var _a;
5
- if ((_a = window.appui) === null || _a === void 0 ? void 0 : _a.status) {
6
- this.$nextTick(() => {
7
- log("UPDATE LOADBAR");
8
- const loadBar = this.getRef('loading');
9
- if (isCp(loadBar)) {
10
- loadBar.$updateAllComputed();
11
- }
12
- });
13
- }
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.defaultStartLoadingFunction = void 0;
4
+ const defaultStartLoadingFunction = function (url, tst, data, requestId = null) {
5
+ return true;
14
6
  };
15
- export { defaultStartLoadingFunction };
7
+ exports.defaultStartLoadingFunction = defaultStartLoadingFunction;
@@ -1,2 +1,2 @@
1
- declare const deleteProp: (obj: any, prop: any) => void;
1
+ declare const deleteProp: (obj: object, prop: string) => void;
2
2
  export { deleteProp };
@@ -1,6 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.deleteProp = void 0;
4
+ const checkType_1 = require("./checkType");
1
5
  const deleteProp = function (obj, prop) {
2
- checkType(obj, "object", bbn._("The obj must be an object in setProp"));
3
- checkType(prop, "string", bbn._("The prop must be a string in setProp"));
6
+ (0, checkType_1.checkType)(obj, 'object', bbn._('The obj must be an object in setProp'));
7
+ (0, checkType_1.checkType)(prop, 'string', bbn._('The prop must be a string in setProp'));
4
8
  delete obj[prop];
5
9
  };
6
- export { deleteProp };
10
+ exports.deleteProp = deleteProp;
@@ -1,3 +1,2 @@
1
- import { diffObj } from './diffObj';
2
- declare const diffObj: (obj1: any, obj2: any, unchanged: any, notRoot: any) => any;
1
+ declare const diffObj: (obj1: object, obj2: object, unchanged?: boolean, notRoot?: boolean) => any;
3
2
  export { diffObj };
@@ -1,10 +1,14 @@
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
- const diffObj = function (obj1, obj2, unchanged, notRoot) {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.diffObj = void 0;
4
+ const isDate_1 = require("./isDate");
5
+ const createObject_1 = require("./createObject");
6
+ const isFunction_1 = require("./isFunction");
7
+ const isValue_1 = require("./isValue");
8
+ const isDom_1 = require("./isDom");
9
+ const numProperties_1 = require("./numProperties");
10
+ let diffObjProcessed = [];
11
+ const diffObj = function (obj1, obj2, unchanged = false, notRoot = false) {
8
12
  if (!notRoot) {
9
13
  diffObjProcessed = [];
10
14
  }
@@ -12,15 +16,13 @@ const diffObj = function (obj1, obj2, unchanged, notRoot) {
12
16
  if (value1 === value2) {
13
17
  return VALUE_UNCHANGED;
14
18
  }
15
- if (isDate(value1) &&
16
- isDate(value2) &&
17
- (value1.getTime() === value2.getTime())) {
19
+ if ((0, isDate_1.isDate)(value1) && (0, isDate_1.isDate)(value2) && value1.getTime() === value2.getTime()) {
18
20
  return VALUE_UNCHANGED;
19
21
  }
20
- if ('undefined' == typeof (value1)) {
22
+ if ('undefined' == typeof value1) {
21
23
  return VALUE_CREATED;
22
24
  }
23
- if ('undefined' == typeof (value2)) {
25
+ if ('undefined' == typeof value2) {
24
26
  return VALUE_DELETED;
25
27
  }
26
28
  return VALUE_UPDATED;
@@ -28,35 +30,35 @@ const diffObj = function (obj1, obj2, unchanged, notRoot) {
28
30
  if (notRoot === undefined) {
29
31
  notRoot = false;
30
32
  }
31
- let diff = createObject();
32
- if (!isFunction(obj1) && !isFunction(obj2)) {
33
- if (isValue(obj1) || isValue(obj2)) {
33
+ let diff = (0, createObject_1.createObject)();
34
+ if (!(0, isFunction_1.isFunction)(obj1) && !(0, isFunction_1.isFunction)(obj2)) {
35
+ if ((0, isValue_1.isValue)(obj1) || (0, isValue_1.isValue)(obj2)) {
34
36
  let res = _compareValues(obj1, obj2);
35
- if (unchanged || (res !== VALUE_UNCHANGED)) {
36
- let ret = createObject();
37
+ if (unchanged || res !== VALUE_UNCHANGED) {
38
+ let ret = (0, createObject_1.createObject)();
37
39
  Object.defineProperty(ret, 'type', {
38
40
  value: res,
39
- enumerable: false
41
+ enumerable: false,
40
42
  });
41
43
  Object.defineProperty(ret, 'data', {
42
- value: (obj1 === undefined) ? obj2 : obj1,
43
- enumerable: false
44
+ value: obj1 === undefined ? obj2 : obj1,
45
+ enumerable: false,
44
46
  });
45
47
  Object.defineProperty(ret, '_bbnDiffObjProof', {
46
48
  value: true,
47
- enumerable: false
49
+ enumerable: false,
48
50
  });
49
51
  if (obj1 !== undefined) {
50
52
  Object.defineProperty(ret, 'newData', {
51
53
  value: obj2,
52
- enumerable: false
54
+ enumerable: false,
53
55
  });
54
56
  }
55
57
  return ret;
56
58
  }
57
59
  return false;
58
60
  }
59
- if (isDom(obj1) || isDom(obj2)) {
61
+ if ((0, isDom_1.isDom)(obj1) || (0, isDom_1.isDom)(obj2)) {
60
62
  return false;
61
63
  }
62
64
  if (diffObjProcessed.includes(obj1) || diffObjProcessed.includes(obj2)) {
@@ -65,11 +67,11 @@ const diffObj = function (obj1, obj2, unchanged, notRoot) {
65
67
  }
66
68
  diffObjProcessed.push(obj1, obj2);
67
69
  for (let key in obj1) {
68
- if (isFunction(obj1[key])) {
70
+ if ((0, isFunction_1.isFunction)(obj1[key])) {
69
71
  continue;
70
72
  }
71
73
  let value2 = undefined;
72
- if ('undefined' != typeof (obj2[key])) {
74
+ if ('undefined' != typeof obj2[key]) {
73
75
  value2 = obj2[key];
74
76
  }
75
77
  let res = diffObj(obj1[key], value2, unchanged, true);
@@ -78,7 +80,7 @@ const diffObj = function (obj1, obj2, unchanged, notRoot) {
78
80
  }
79
81
  }
80
82
  for (let key in obj2) {
81
- if (isFunction(obj2[key]) || ('undefined' != typeof (obj1[key]))) {
83
+ if ((0, isFunction_1.isFunction)(obj2[key]) || 'undefined' != typeof obj1[key]) {
82
84
  continue;
83
85
  }
84
86
  let res = diffObj(undefined, obj2[key], unchanged, true);
@@ -87,6 +89,6 @@ const diffObj = function (obj1, obj2, unchanged, notRoot) {
87
89
  }
88
90
  }
89
91
  }
90
- return !notRoot || unchanged || numProperties(diff) ? diff : false;
92
+ return !notRoot || unchanged || (0, numProperties_1.numProperties)(diff) ? diff : false;
91
93
  };
92
- export { diffObj };
94
+ exports.diffObj = diffObj;
@@ -1,2 +1,2 @@
1
- declare const dirName: (path: any) => any;
1
+ declare const dirName: (path: any) => string;
2
2
  export { dirName };
@@ -1,13 +1,16 @@
1
- import { isString } from './isString';
2
- import { substr } from './substr';
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.dirName = void 0;
4
+ const isString_1 = require("./isString");
5
+ const substr_1 = require("./substr");
3
6
  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
+ if ((0, isString_1.isString)(path) && path) {
8
+ while ((0, substr_1.substr)(path, path.length - 1) === '/') {
9
+ path = (0, substr_1.substr)(path, 0, path.length - 1);
7
10
  }
8
11
  let pos = path.lastIndexOf('/');
9
12
  if (pos > 0) {
10
- return substr(path, 0, pos);
13
+ return (0, substr_1.substr)(path, 0, pos);
11
14
  }
12
15
  if (pos === 0) {
13
16
  return '/';
@@ -15,4 +18,4 @@ const dirName = function (path) {
15
18
  }
16
19
  return '';
17
20
  };
18
- export { dirName };
21
+ exports.dirName = dirName;
@@ -1,2 +1,2 @@
1
- declare const download: (url: any, filename: any, params: any) => any;
1
+ declare const download: (url: string, filename?: string | object, params?: object) => any;
2
2
  export { download };
@@ -1,38 +1,39 @@
1
- import { isObject } from './isObject';
2
- import { ajax } from './ajax';
3
- import { substr } from './substr';
4
- import { baseName } from './baseName';
5
- import { isBlob } from './isBlob';
6
- import { fileExt } from './fileExt';
7
- import { downloadContent } from './downloadContent';
8
- import { defaultAjaxErrorFunction } from './defaultAjaxErrorFunction';
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.download = void 0;
4
+ const ajax_1 = require("./ajax");
5
+ const substr_1 = require("./substr");
6
+ const baseName_1 = require("./baseName");
7
+ const isBlob_1 = require("./isBlob");
8
+ const fileExt_1 = require("./fileExt");
9
+ const downloadContent_1 = require("./downloadContent");
10
+ const defaultAjaxErrorFunction_1 = require("./defaultAjaxErrorFunction");
9
11
  const download = function (url, filename, params) {
10
12
  // We can intervert the arguments
11
- if (isObject(filename)) {
13
+ if (filename && (typeof (filename) === 'object')) {
12
14
  params = filename;
13
15
  filename = null;
14
16
  }
15
- return ajax(url, 'blob', params || { _bbn_download: 1 }, (d, headers) => {
17
+ return (0, ajax_1.ajax)(url, 'blob', params || { _bbn_download: 1 }, (d, headers) => {
16
18
  if (!filename) {
17
19
  let cd = 'attachment; filename=';
18
- if (headers && headers['content-disposition'] && (headers['content-disposition'].indexOf(cd) === 0)) {
19
- filename = substr(headers['content-disposition'], cd.length + 1, headers['content-disposition'].length - cd.length - 2);
20
+ if (headers && headers['content-disposition'] && headers['content-disposition'].indexOf(cd) === 0) {
21
+ filename = (0, substr_1.substr)(headers['content-disposition'], cd.length + 1, headers['content-disposition'].length - cd.length - 2);
20
22
  }
21
23
  else {
22
- filename = baseName(url);
24
+ filename = (0, baseName_1.baseName)(url);
23
25
  }
24
26
  }
25
- if (isBlob(d)) {
26
- let extension = fileExt(filename);
27
+ if ((0, isBlob_1.isBlob)(d)) {
28
+ let extension = (0, fileExt_1.fileExt)(filename);
27
29
  let htmlExtensions = ['php', 'html'];
28
- if ((d.type !== 'text/html') || htmlExtensions.includes(extension)) {
29
- downloadContent(filename, d);
30
+ if ((typeof filename === 'string') && ((('type' in d) && (d.type !== 'text/html')) || htmlExtensions.includes(extension))) {
31
+ (0, downloadContent_1.downloadContent)(filename, d);
30
32
  return;
31
33
  }
32
34
  }
33
- defaultAjaxErrorFunction(e);
34
35
  }, e => {
35
- defaultAjaxErrorFunction(e);
36
+ (0, defaultAjaxErrorFunction_1.defaultAjaxErrorFunction)(e);
36
37
  });
37
38
  };
38
- export { download };
39
+ exports.download = download;
@@ -1,2 +1,2 @@
1
- declare const downloadContent: (filename: any, content: any, type: any) => void;
1
+ declare const downloadContent: (filename: string, content: any, type?: string) => void;
2
2
  export { downloadContent };
@@ -1,9 +1,12 @@
1
- import { isCanvas } from './isCanvas';
2
- import { isObject } from './isObject';
3
- import { isString } from './isString';
4
- import { log } from './log';
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.downloadContent = void 0;
4
+ const isCanvas_1 = require("./isCanvas");
5
+ const isObject_1 = require("./isObject");
6
+ const isString_1 = require("./isString");
7
+ const log_1 = require("./log");
5
8
  const downloadContent = function (filename, content, type) {
6
- if (isCanvas(content)) {
9
+ if ((0, isCanvas_1.isCanvas)(content)) {
7
10
  content.toBlob((blob) => {
8
11
  // blob ready, download it
9
12
  let a = document.createElement('a');
@@ -17,7 +20,7 @@ const downloadContent = function (filename, content, type) {
17
20
  return;
18
21
  }
19
22
  if (!type) {
20
- type = isObject(content) && content.type ? content.type : 'octet/stream';
23
+ type = (0, isObject_1.isObject)(content) && content.type ? content.type : 'octet/stream';
21
24
  }
22
25
  else if (type.indexOf('/') === -1) {
23
26
  type = 'text/' + type;
@@ -25,7 +28,7 @@ const downloadContent = function (filename, content, type) {
25
28
  let a = window.document.createElement('a');
26
29
  a.className = 'bbn-no';
27
30
  let src = null;
28
- if (isString(content)) {
31
+ if ((0, isString_1.isString)(content)) {
29
32
  src = new Blob([content], { type: type });
30
33
  }
31
34
  else {
@@ -33,7 +36,7 @@ const downloadContent = function (filename, content, type) {
33
36
  src = content;
34
37
  }
35
38
  catch (e) {
36
- log(e);
39
+ (0, log_1.log)(e);
37
40
  }
38
41
  }
39
42
  a.href = window.URL.createObjectURL(src);
@@ -45,4 +48,4 @@ const downloadContent = function (filename, content, type) {
45
48
  // Remove anchor from body
46
49
  document.body.removeChild(a);
47
50
  };
48
- export { downloadContent };
51
+ exports.downloadContent = downloadContent;
package/dist/fn/each.js CHANGED
@@ -1,8 +1,11 @@
1
- import { isNumber } from './isNumber';
2
- import { isIterable } from './isIterable';
3
- import { iterate } from './iterate';
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.each = void 0;
4
+ const isNumber_1 = require("./isNumber");
5
+ const isIterable_1 = require("./isIterable");
6
+ const iterate_1 = require("./iterate");
4
7
  const each = function (arr, fn) {
5
- if (isNumber(arr) && (arr > 0)) {
8
+ if ((0, isNumber_1.isNumber)(arr) && arr > 0) {
6
9
  for (let i = 0; i < arr; i++) {
7
10
  if (fn(i, i) === false) {
8
11
  return;
@@ -10,7 +13,7 @@ const each = function (arr, fn) {
10
13
  }
11
14
  return;
12
15
  }
13
- if (isIterable(arr)) {
16
+ if ((0, isIterable_1.isIterable)(arr)) {
14
17
  for (let i = 0; i < arr.length; i++) {
15
18
  if (fn(arr[i], i) === false) {
16
19
  return;
@@ -18,6 +21,6 @@ const each = function (arr, fn) {
18
21
  }
19
22
  return arr;
20
23
  }
21
- return iterate(arr, fn);
24
+ return (0, iterate_1.iterate)(arr, fn);
22
25
  };
23
- export { each };
26
+ exports.each = each;
@@ -1,4 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.eraseCookie = void 0;
1
4
  const eraseCookie = function (name) {
2
5
  document.cookie = name + '=; Max-Age=-99999999;';
3
6
  };
4
- export { eraseCookie };
7
+ exports.eraseCookie = eraseCookie;
package/dist/fn/error.js CHANGED
@@ -1,4 +1,7 @@
1
- import { log } from './log';
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.error = void 0;
4
+ const log_1 = require("./log");
2
5
  const error = function (errorMsg) {
3
6
  if (arguments.length > 1) {
4
7
  const args = [];
@@ -6,12 +9,12 @@ const error = function (errorMsg) {
6
9
  args.push(arguments[i]);
7
10
  }
8
11
  args.unshift({
9
- _bbn_console_mode: "error",
12
+ _bbn_console_mode: 'error',
10
13
  _bbn_console_level: 1,
11
- _bbn_console_style: "color: #E64141; background: #F7E195; font-size: 14px"
14
+ _bbn_console_style: 'color: #E64141; background: #F7E195; font-size: 14px',
12
15
  });
13
- log.apply(this, args);
16
+ log_1.log.apply(this, args);
14
17
  }
15
18
  throw new Error(errorMsg);
16
19
  };
17
- export { error };
20
+ exports.error = error;
@@ -1,8 +1,11 @@
1
- import { isString } from './isString';
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.escapeDquotes = void 0;
4
+ const isString_1 = require("./isString");
2
5
  const escapeDquotes = function (str) {
3
- if (!isString(str)) {
6
+ if (!(0, isString_1.isString)(str)) {
4
7
  return str;
5
8
  }
6
9
  return str.replace(/"/g, '\\"');
7
10
  };
8
- export { escapeDquotes };
11
+ exports.escapeDquotes = escapeDquotes;
@@ -1,4 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.escapeRegExp = void 0;
1
4
  const escapeRegExp = function (str) {
2
- return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
5
+ return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&');
3
6
  };
4
- export { escapeRegExp };
7
+ exports.escapeRegExp = escapeRegExp;
@@ -1,8 +1,11 @@
1
- import { isString } from './isString';
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.escapeSquotes = void 0;
4
+ const isString_1 = require("./isString");
2
5
  const escapeSquotes = function (str) {
3
- if (!isString(str)) {
6
+ if (!(0, isString_1.isString)(str)) {
4
7
  return str;
5
8
  }
6
9
  return str.replace(/'/g, "\\'");
7
10
  };
8
- export { escapeSquotes };
11
+ exports.escapeSquotes = escapeSquotes;
@@ -1,8 +1,11 @@
1
- import { isString } from './isString';
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.escapeTicks = void 0;
4
+ const isString_1 = require("./isString");
2
5
  const escapeTicks = function (str) {
3
- if (!isString(str)) {
6
+ if (!(0, isString_1.isString)(str)) {
4
7
  return str;
5
8
  }
6
- return str.replace(/`/g, "\\`");
9
+ return str.replace(/`/g, '\\`');
7
10
  };
8
- export { escapeTicks };
11
+ exports.escapeTicks = escapeTicks;
@@ -1,7 +1,10 @@
1
- import { each } from './each';
2
- import { dirName } from './dirName';
3
- import { baseName } from './baseName';
4
- import { isString } from './isString';
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.escapeUrl = void 0;
4
+ const each_1 = require("./each");
5
+ const dirName_1 = require("./dirName");
6
+ const baseName_1 = require("./baseName");
7
+ const isString_1 = require("./isString");
5
8
  const escapeUrl = function (url, params) {
6
9
  let st = '';
7
10
  if (url.match('^(http|https)://')) {
@@ -14,10 +17,10 @@ const escapeUrl = function (url, params) {
14
17
  st += '://';
15
18
  url = url.substring(3);
16
19
  }
17
- each(dirName(url).split('/'), a => {
20
+ (0, each_1.each)((0, dirName_1.dirName)(url).split('/'), (a) => {
18
21
  st += encodeURIComponent(a) + '/';
19
22
  });
20
- let base = baseName(url);
23
+ let base = (0, baseName_1.baseName)(url);
21
24
  let sep = '?';
22
25
  let existingParams = '';
23
26
  if (base.indexOf(sep)) {
@@ -26,7 +29,7 @@ const escapeUrl = function (url, params) {
26
29
  existingParams = '?' + tmp[1];
27
30
  base = tmp[0];
28
31
  }
29
- if (params && isString(params)) {
32
+ if (params && (0, isString_1.isString)(params)) {
30
33
  if (params.match('^(\\&|\\?)')) {
31
34
  params = params.substring(1);
32
35
  }
@@ -37,4 +40,4 @@ const escapeUrl = function (url, params) {
37
40
  }
38
41
  return st + encodeURIComponent(base) + existingParams + params;
39
42
  };
40
- export { escapeUrl };
43
+ exports.escapeUrl = escapeUrl;
@@ -1,3 +1,2 @@
1
- import { extend } from './extend';
2
- declare const extend: () => any;
1
+ declare const extend: (...originalArgs: (boolean | object)[]) => any;
3
2
  export { extend };