@bbn/bbn 1.0.28 → 1.0.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (231) hide show
  1. package/dist/bundle.d.ts +6 -6
  2. package/dist/fn/_addLoader.js +3 -6
  3. package/dist/fn/_compareValues.js +11 -14
  4. package/dist/fn/_deleteLoader.js +7 -10
  5. package/dist/fn/abort.js +3 -6
  6. package/dist/fn/abortURL.js +4 -7
  7. package/dist/fn/addColors.js +5 -8
  8. package/dist/fn/addInputs.js +3 -6
  9. package/dist/fn/addStyle.js +5 -8
  10. package/dist/fn/adjustHeight.js +5 -8
  11. package/dist/fn/adjustSize.js +5 -8
  12. package/dist/fn/adjustWidth.js +5 -8
  13. package/dist/fn/ajax.js +31 -34
  14. package/dist/fn/analyzeFunction.js +3 -6
  15. package/dist/fn/animateCss.js +1 -4
  16. package/dist/fn/arrayBuffer2String.js +1 -4
  17. package/dist/fn/arrayFromProp.js +5 -8
  18. package/dist/fn/autoExtend.js +4 -7
  19. package/dist/fn/baseName.js +6 -9
  20. package/dist/fn/br2nl.js +3 -6
  21. package/dist/fn/calendar.js +14 -20
  22. package/dist/fn/callback.js +16 -19
  23. package/dist/fn/camelToCss.js +1 -4
  24. package/dist/fn/camelize.js +1 -4
  25. package/dist/fn/canvasToImage.js +1 -4
  26. package/dist/fn/center.js +1 -4
  27. package/dist/fn/checkProps.js +3 -6
  28. package/dist/fn/checkPropsDetails.js +9 -12
  29. package/dist/fn/checkPropsOrDie.js +3 -6
  30. package/dist/fn/checkType.js +16 -19
  31. package/dist/fn/chrono.js +3 -7
  32. package/dist/fn/circularReplacer.js +7 -10
  33. package/dist/fn/clone.js +7 -10
  34. package/dist/fn/colorToHex.js +1 -4
  35. package/dist/fn/compare.js +18 -21
  36. package/dist/fn/compareConditions.js +10 -13
  37. package/dist/fn/copy.js +4 -7
  38. package/dist/fn/correctCase.js +1 -4
  39. package/dist/fn/count.js +3 -6
  40. package/dist/fn/crc32.js +1 -4
  41. package/dist/fn/createObject.js +3 -6
  42. package/dist/fn/cssExists.js +3 -6
  43. package/dist/fn/date.js +8 -11
  44. package/dist/fn/dateSQL.js +5 -11
  45. package/dist/fn/daysInMonth.js +5 -11
  46. package/dist/fn/deepPath.js +7 -10
  47. package/dist/fn/defaultAjaxAbortFunction.js +3 -6
  48. package/dist/fn/defaultAjaxErrorFunction.js +1 -4
  49. package/dist/fn/defaultAlertFunction.js +1 -4
  50. package/dist/fn/defaultConfirmFunction.js +4 -7
  51. package/dist/fn/defaultEndLoadingFunction.js +1 -4
  52. package/dist/fn/defaultErrorFunction.js +3 -6
  53. package/dist/fn/defaultHistoryFunction.js +1 -4
  54. package/dist/fn/defaultLinkFunction.js +1 -4
  55. package/dist/fn/defaultPostLinkFunction.js +1 -4
  56. package/dist/fn/defaultPreLinkFunction.js +1 -4
  57. package/dist/fn/defaultResizeFunction.js +1 -4
  58. package/dist/fn/defaultStartLoadingFunction.js +1 -4
  59. package/dist/fn/deleteProp.js +4 -7
  60. package/dist/fn/diffObj.js +16 -19
  61. package/dist/fn/dirName.js +7 -10
  62. package/dist/fn/download.js +15 -18
  63. package/dist/fn/downloadContent.js +9 -12
  64. package/dist/fn/each.js +7 -10
  65. package/dist/fn/eraseCookie.js +1 -4
  66. package/dist/fn/error.js +3 -6
  67. package/dist/fn/escapeDquotes.js +3 -6
  68. package/dist/fn/escapeRegExp.js +1 -4
  69. package/dist/fn/escapeSquotes.js +3 -6
  70. package/dist/fn/escapeTicks.js +3 -6
  71. package/dist/fn/escapeUrl.js +8 -11
  72. package/dist/fn/extend.js +13 -16
  73. package/dist/fn/extendOut.js +4 -7
  74. package/dist/fn/fdate.js +12 -18
  75. package/dist/fn/fdatetime.js +10 -16
  76. package/dist/fn/fieldValue.js +1 -4
  77. package/dist/fn/fileExt.js +3 -6
  78. package/dist/fn/filter.js +12 -15
  79. package/dist/fn/filterToConditions.js +8 -11
  80. package/dist/fn/findAll.js +7 -10
  81. package/dist/fn/fori.js +6 -9
  82. package/dist/fn/forir.js +6 -9
  83. package/dist/fn/format.js +3 -6
  84. package/dist/fn/formatBytes.js +1 -4
  85. package/dist/fn/formatDate.js +3 -9
  86. package/dist/fn/formatSize.js +5 -8
  87. package/dist/fn/formdata.js +11 -14
  88. package/dist/fn/fromXml.js +1 -4
  89. package/dist/fn/ftime.js +12 -18
  90. package/dist/fn/getAllTags.js +3 -6
  91. package/dist/fn/getAncestors.js +1 -4
  92. package/dist/fn/getAttributes.js +3 -6
  93. package/dist/fn/getBrowserName.js +1 -4
  94. package/dist/fn/getBrowserVersion.js +1 -4
  95. package/dist/fn/getCookie.js +1 -4
  96. package/dist/fn/getCssVar.js +1 -4
  97. package/dist/fn/getDay.js +3 -6
  98. package/dist/fn/getDeviceType.js +1 -4
  99. package/dist/fn/getEventData.js +7 -10
  100. package/dist/fn/getField.js +3 -6
  101. package/dist/fn/getFieldValues.js +7 -10
  102. package/dist/fn/getHTMLOfSelection.js +4 -7
  103. package/dist/fn/getHtml.js +3 -6
  104. package/dist/fn/getLoader.js +3 -6
  105. package/dist/fn/getPath.js +3 -6
  106. package/dist/fn/getProp.js +4 -7
  107. package/dist/fn/getProperty.js +1 -4
  108. package/dist/fn/getRequestId.js +5 -8
  109. package/dist/fn/getRow.js +3 -6
  110. package/dist/fn/getScrollBarSize.js +1 -4
  111. package/dist/fn/getText.js +1 -4
  112. package/dist/fn/getTimeoff.js +1 -4
  113. package/dist/fn/happy.js +3 -6
  114. package/dist/fn/hash.js +11 -14
  115. package/dist/fn/hex2rgb.js +1 -4
  116. package/dist/fn/history.js +1 -4
  117. package/dist/fn/html2text.js +1 -4
  118. package/dist/fn/imageToCanvas.js +1 -4
  119. package/dist/fn/imgToBase64.js +3 -6
  120. package/dist/fn/info.js +3 -6
  121. package/dist/fn/init.js +32 -58
  122. package/dist/fn/isActiveInterface.js +1 -4
  123. package/dist/fn/isArray.js +1 -4
  124. package/dist/fn/isBlob.js +1 -4
  125. package/dist/fn/isBoolean.js +1 -4
  126. package/dist/fn/isCanvas.js +1 -4
  127. package/dist/fn/isColor.js +3 -6
  128. package/dist/fn/isComment.js +1 -4
  129. package/dist/fn/isCp.js +3 -6
  130. package/dist/fn/isDate.js +1 -4
  131. package/dist/fn/isDesktopDevice.js +1 -4
  132. package/dist/fn/isDimension.js +3 -6
  133. package/dist/fn/isDom.js +1 -4
  134. package/dist/fn/isEmail.js +3 -6
  135. package/dist/fn/isEmpty.js +5 -8
  136. package/dist/fn/isEvent.js +1 -4
  137. package/dist/fn/isFocused.js +1 -4
  138. package/dist/fn/isFunction.js +1 -4
  139. package/dist/fn/isHostname.js +5 -8
  140. package/dist/fn/isIP.js +3 -6
  141. package/dist/fn/isInside.js +7 -10
  142. package/dist/fn/isInt.js +1 -4
  143. package/dist/fn/isIterable.js +1 -4
  144. package/dist/fn/isMobile.js +4 -7
  145. package/dist/fn/isMobileDevice.js +1 -4
  146. package/dist/fn/isNull.js +1 -4
  147. package/dist/fn/isNumber.js +1 -4
  148. package/dist/fn/isObject.js +1 -4
  149. package/dist/fn/isPercent.js +1 -4
  150. package/dist/fn/isPrimitive.js +1 -4
  151. package/dist/fn/isPromise.js +1 -4
  152. package/dist/fn/isPropSize.js +3 -6
  153. package/dist/fn/isSQLDate.js +1 -4
  154. package/dist/fn/isSame.js +5 -8
  155. package/dist/fn/isString.js +1 -4
  156. package/dist/fn/isSymbol.js +1 -4
  157. package/dist/fn/isTabletDevice.js +1 -4
  158. package/dist/fn/isURL.js +1 -4
  159. package/dist/fn/isValidDimension.js +4 -7
  160. package/dist/fn/isValidName.js +3 -6
  161. package/dist/fn/isValue.js +3 -6
  162. package/dist/fn/isVue.js +1 -4
  163. package/dist/fn/iterate.js +5 -8
  164. package/dist/fn/lightenDarkenHex.js +1 -4
  165. package/dist/fn/link.js +19 -22
  166. package/dist/fn/log.js +3 -6
  167. package/dist/fn/makeReactive.js +28 -31
  168. package/dist/fn/map.js +3 -6
  169. package/dist/fn/md5.js +1 -4
  170. package/dist/fn/money.js +3 -6
  171. package/dist/fn/move.js +1 -4
  172. package/dist/fn/multiorder.js +3 -6
  173. package/dist/fn/nl2br.js +3 -6
  174. package/dist/fn/numProperties.js +1 -4
  175. package/dist/fn/objectToFormData.js +12 -15
  176. package/dist/fn/order.js +3 -6
  177. package/dist/fn/outerHeight.js +3 -6
  178. package/dist/fn/outerWidth.js +3 -6
  179. package/dist/fn/percent.js +1 -4
  180. package/dist/fn/pickValue.js +1 -4
  181. package/dist/fn/post.js +7 -10
  182. package/dist/fn/postOut.js +5 -8
  183. package/dist/fn/printf.js +1 -4
  184. package/dist/fn/quotes2html.js +4 -7
  185. package/dist/fn/randomInt.js +1 -4
  186. package/dist/fn/randomString.js +4 -7
  187. package/dist/fn/removeAccents.js +5 -8
  188. package/dist/fn/removeEmpty.js +8 -11
  189. package/dist/fn/removeExtraSpaces.js +1 -4
  190. package/dist/fn/removeHtmlComments.js +3 -6
  191. package/dist/fn/removePrivateProp.js +3 -6
  192. package/dist/fn/removeTrailingChars.js +6 -9
  193. package/dist/fn/repeat.js +1 -4
  194. package/dist/fn/replaceAll.js +4 -7
  195. package/dist/fn/replaceSelection.js +1 -4
  196. package/dist/fn/resize.js +7 -10
  197. package/dist/fn/rgb2hex.js +1 -4
  198. package/dist/fn/riterate.js +3 -6
  199. package/dist/fn/roundDecimal.js +1 -4
  200. package/dist/fn/sanitize.js +5 -8
  201. package/dist/fn/search.js +15 -18
  202. package/dist/fn/selectElementText.js +1 -4
  203. package/dist/fn/selector.js +1 -4
  204. package/dist/fn/setCookie.js +1 -4
  205. package/dist/fn/setCssVar.js +1 -4
  206. package/dist/fn/setNavigationVars.js +10 -13
  207. package/dist/fn/setProp.js +1 -4
  208. package/dist/fn/setProperty.js +3 -6
  209. package/dist/fn/shorten.js +5 -8
  210. package/dist/fn/shortenObj.js +9 -12
  211. package/dist/fn/shuffle.js +1 -4
  212. package/dist/fn/simpleHash.js +5 -8
  213. package/dist/fn/simpleHash1.js +1 -4
  214. package/dist/fn/simpleHash2.js +1 -4
  215. package/dist/fn/stat.js +1 -4
  216. package/dist/fn/string2ArrayBuffer.js +1 -4
  217. package/dist/fn/submit.js +6 -9
  218. package/dist/fn/substr.js +7 -10
  219. package/dist/fn/sum.js +4 -7
  220. package/dist/fn/timestamp.js +1 -4
  221. package/dist/fn/toCSV.js +8 -11
  222. package/dist/fn/toggleFullScreen.js +3 -6
  223. package/dist/fn/translate.js +3 -6
  224. package/dist/fn/treatAjaxArguments.js +10 -13
  225. package/dist/fn/trim.js +4 -7
  226. package/dist/fn/uniqString.js +7 -10
  227. package/dist/fn/unique.js +1 -4
  228. package/dist/fn/upload.js +7 -33
  229. package/dist/fn/warning.js +3 -6
  230. package/dist/index.js +459 -471
  231. package/package.json +1 -1
package/dist/fn/init.js CHANGED
@@ -1,51 +1,25 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.init = void 0;
27
- const dayjs = __importStar(require("../../node_modules/dayjs/index"));
28
- const substr_1 = require("./substr");
29
- const each_1 = require("./each");
30
- const extend_1 = require("./extend");
31
- const addColors_1 = require("./addColors");
32
- const link_1 = require("./link");
33
- const submit_1 = require("./submit");
34
- const resize_1 = require("./resize");
35
- const isMobile_1 = require("./isMobile");
36
- const isTabletDevice_1 = require("./isTabletDevice");
37
- const defaultHistoryFunction_1 = require("./defaultHistoryFunction");
38
- const isFunction_1 = require("./isFunction");
39
- const log_1 = require("./log");
1
+ import * as dayjs from '../../node_modules/dayjs/index';
2
+ import { substr } from './substr';
3
+ import { each } from './each';
4
+ import { extend } from './extend';
5
+ import { addColors } from './addColors';
6
+ import { link } from './link';
7
+ import { submit } from './submit';
8
+ import { resize } from './resize';
9
+ import { isMobile } from './isMobile';
10
+ import { isTabletDevice } from './isTabletDevice';
11
+ import { defaultHistoryFunction } from './defaultHistoryFunction';
12
+ import { isFunction } from './isFunction';
13
+ import { log } from './log';
40
14
  const init = function (cfg, force) {
41
15
  let parts;
42
16
  if (!bbn.env.isInit || force) {
43
17
  bbn.env.root = document.baseURI.length > 0 ? document.baseURI : bbn.env.host;
44
- if (bbn.env.root.length && (0, substr_1.substr)(bbn.env.root, -1) !== '/') {
18
+ if (bbn.env.root.length && substr(bbn.env.root, -1) !== '/') {
45
19
  bbn.env.root += '/';
46
20
  }
47
21
  if (!bbn.env.isInit && typeof dayjs !== 'undefined') {
48
- (0, each_1.each)([
22
+ each([
49
23
  'advancedFormat',
50
24
  'arraySupport',
51
25
  'badMutable',
@@ -87,19 +61,19 @@ const init = function (cfg, force) {
87
61
  }
88
62
  /* The server's path (difference between the host and the current dir */
89
63
  if (typeof cfg === 'object') {
90
- (0, extend_1.extend)(true, bbn, cfg);
64
+ extend(true, bbn, cfg);
91
65
  }
92
- bbn.env.path = (0, substr_1.substr)(bbn.env.url, bbn.env.root.length);
66
+ bbn.env.path = substr(bbn.env.url, bbn.env.root.length);
93
67
  parts = bbn.env.path.split('/');
94
68
  //$.each(parts, function(i, v){
95
- (0, each_1.each)(parts, (v, i) => {
69
+ each(parts, (v, i) => {
96
70
  v = decodeURI(v.trim());
97
71
  if (v !== '') {
98
72
  bbn.env.params.push(v);
99
73
  }
100
74
  });
101
75
  if (bbn.vars.colors) {
102
- (0, addColors_1.addColors)(bbn.vars.colors);
76
+ addColors(bbn.vars.colors);
103
77
  }
104
78
  if (bbn.env.lang && undefined !== dayjs) {
105
79
  dayjs.locale(bbn.env.lang);
@@ -141,28 +115,28 @@ const init = function (cfg, force) {
141
115
  if (target instanceof HTMLElement && target.hasAttribute('href') && !target.hasAttribute('target') && !target.classList.contains('bbn-no')) {
142
116
  e.preventDefault();
143
117
  e.stopPropagation();
144
- (0, link_1.link)(target.getAttribute('href'));
118
+ link(target.getAttribute('href'));
145
119
  return false;
146
120
  }
147
121
  });
148
- (0, each_1.each)(document.querySelectorAll('form:not(.bbn-no), form:not(.bbn-form)'), (ele) => {
122
+ each(document.querySelectorAll('form:not(.bbn-no), form:not(.bbn-form)'), (ele) => {
149
123
  ele.addEventListener('submit', (e) => {
150
- (0, submit_1.submit)(ele, e);
124
+ submit(ele, e);
151
125
  });
152
126
  });
153
127
  window.addEventListener('hashchange', () => {
154
128
  bbn.env.hashChanged = new Date().getTime();
155
129
  }, false);
156
130
  window.addEventListener('resize', () => {
157
- (0, resize_1.resize)();
131
+ resize();
158
132
  });
159
133
  window.addEventListener('orientationchange', () => {
160
- (0, resize_1.resize)();
134
+ resize();
161
135
  });
162
- (0, resize_1.resize)();
163
- if ((0, isMobile_1.isMobile)()) {
136
+ resize();
137
+ if (isMobile()) {
164
138
  document.body.classList.add('bbn-mobile');
165
- if ((0, isTabletDevice_1.isTabletDevice)()) {
139
+ if (isTabletDevice()) {
166
140
  document.body.classList.add('bbn-tablet');
167
141
  }
168
142
  }
@@ -173,11 +147,11 @@ const init = function (cfg, force) {
173
147
  //e.preventDefault();
174
148
  let state = h.state;
175
149
  if (state) {
176
- if ((0, defaultHistoryFunction_1.defaultHistoryFunction)(state)) {
150
+ if (defaultHistoryFunction(state)) {
177
151
  //link(substr(state.url, bbn.env.root.length), $.extend({title: state.title}, state.data));
178
- (0, link_1.link)(state.url, (0, extend_1.extend)({ title: state.title || bbn.env.siteTitle }, state.data || {}));
152
+ link(state.url, extend({ title: state.title || bbn.env.siteTitle }, state.data || {}));
179
153
  }
180
- else if (state && state.data && (0, isFunction_1.isFunction)(state.data.script)) {
154
+ else if (state && state.data && isFunction(state.data.script)) {
181
155
  state.data.script();
182
156
  }
183
157
  }
@@ -187,8 +161,8 @@ const init = function (cfg, force) {
187
161
  bbn.env.isInit = true;
188
162
  document.dispatchEvent(new Event('bbninit'));
189
163
  if (bbn.env.logging) {
190
- (0, log_1.log)('Logging in bbn is enabled');
164
+ log('Logging in bbn is enabled');
191
165
  }
192
166
  }
193
167
  };
194
- exports.init = init;
168
+ export { init };
@@ -1,6 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isActiveInterface = void 0;
4
1
  const isActiveInterface = function (secs = 600) {
5
2
  if (!bbn.env.last_focus) {
6
3
  return false;
@@ -8,4 +5,4 @@ const isActiveInterface = function (secs = 600) {
8
5
  let t = new Date().getTime();
9
6
  return t - bbn.env.last_focus < secs * 1000;
10
7
  };
11
- exports.isActiveInterface = isActiveInterface;
8
+ export { isActiveInterface };
@@ -1,6 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isArray = void 0;
4
1
  const isArray = function (...args) {
5
2
  if (!args.length)
6
3
  return false;
@@ -11,4 +8,4 @@ const isArray = function (...args) {
11
8
  }
12
9
  return true;
13
10
  };
14
- exports.isArray = isArray;
11
+ export { isArray };
package/dist/fn/isBlob.js CHANGED
@@ -1,6 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isBlob = void 0;
4
1
  const isBlob = function (...args) {
5
2
  if (!args.length)
6
3
  return false;
@@ -11,4 +8,4 @@ const isBlob = function (...args) {
11
8
  }
12
9
  return true;
13
10
  };
14
- exports.isBlob = isBlob;
11
+ export { isBlob };
@@ -1,6 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isBoolean = void 0;
4
1
  const isBoolean = function (...args) {
5
2
  if (!args.length)
6
3
  return false;
@@ -11,4 +8,4 @@ const isBoolean = function (...args) {
11
8
  }
12
9
  return true;
13
10
  };
14
- exports.isBoolean = isBoolean;
11
+ export { isBoolean };
@@ -1,6 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isCanvas = void 0;
4
1
  const isCanvas = function (...args) {
5
2
  if (!args.length)
6
3
  return false;
@@ -11,4 +8,4 @@ const isCanvas = function (...args) {
11
8
  }
12
9
  return true;
13
10
  };
14
- exports.isCanvas = isCanvas;
11
+ export { isCanvas };
@@ -1,13 +1,10 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isColor = void 0;
4
- const isString_1 = require("./isString");
1
+ import { isString } from './isString';
5
2
  const isColor = function (...args) {
6
3
  if (!args.length)
7
4
  return false;
8
5
  var reg = new RegExp('^(#[a-f0-9]{6}|#[a-f0-9]{3}|rgb *( *[0-9]{1,3}%? *, *[0-9]{1,3}%? *, *[0-9]{1,3}%? *)|rgba *( *[0-9]{1,3}%? *, *[0-9]{1,3}%? *, *[0-9]{1,3}%? *, *[0-9]{1,3}%? *)|black|green|silver|gray|olive|white|yellow|maroon|navy|red|blue|purple|teal|fuchsia|aqua)$', 'i');
9
6
  for (let st of args) {
10
- if (!(0, isString_1.isString)(st)) {
7
+ if (!isString(st)) {
11
8
  return false;
12
9
  }
13
10
  if (!reg.test(st)) {
@@ -16,4 +13,4 @@ const isColor = function (...args) {
16
13
  }
17
14
  return true;
18
15
  };
19
- exports.isColor = isColor;
16
+ export { isColor };
@@ -1,6 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isComment = void 0;
4
1
  const isComment = function (...args) {
5
2
  if (!args.length)
6
3
  return false;
@@ -11,4 +8,4 @@ const isComment = function (...args) {
11
8
  }
12
9
  return true;
13
10
  };
14
- exports.isComment = isComment;
11
+ export { isComment };
package/dist/fn/isCp.js CHANGED
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isCp = void 0;
4
- const isDom_1 = require("./isDom");
1
+ import { isDom } from './isDom';
5
2
  const isCp = function (...args) {
6
3
  if (!args.length) {
7
4
  return false;
@@ -9,7 +6,7 @@ const isCp = function (...args) {
9
6
  if ('cp' in bbn && 'isComponent' in bbn['cp'] && (typeof bbn['cp'].isComponent === 'function')) {
10
7
  for (let a of args) {
11
8
  let res = bbn.cp.isComponent(a);
12
- if (!res || (0, isDom_1.isDom)(res) || !res.$el) {
9
+ if (!res || isDom(res) || !res.$el) {
13
10
  return false;
14
11
  }
15
12
  }
@@ -17,4 +14,4 @@ const isCp = function (...args) {
17
14
  }
18
15
  return true;
19
16
  };
20
- exports.isCp = isCp;
17
+ export { isCp };
package/dist/fn/isDate.js CHANGED
@@ -1,6 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isDate = void 0;
4
1
  const isDate = function (...args) {
5
2
  if (!args.length)
6
3
  return false;
@@ -11,4 +8,4 @@ const isDate = function (...args) {
11
8
  }
12
9
  return true;
13
10
  };
14
- exports.isDate = isDate;
11
+ export { isDate };
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isDesktopDevice = void 0;
4
1
  const isDesktopDevice = function () {
5
2
  return this.getDeviceType() === 'desktop';
6
3
  };
7
- exports.isDesktopDevice = isDesktopDevice;
4
+ export { isDesktopDevice };
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isDimension = void 0;
4
- const isValidDimension_1 = require("./isValidDimension");
1
+ import { isValidDimension } from './isValidDimension';
5
2
  const isDimension = function (...args) {
6
3
  if (!args.length)
7
4
  return false;
@@ -9,10 +6,10 @@ const isDimension = function (...args) {
9
6
  if ((typeof st !== 'number') || (st < 0)) {
10
7
  return false;
11
8
  }
12
- if (!(0, isValidDimension_1.isValidDimension)(st)) {
9
+ if (!isValidDimension(st)) {
13
10
  return false;
14
11
  }
15
12
  }
16
13
  return true;
17
14
  };
18
- exports.isDimension = isDimension;
15
+ export { isDimension };
package/dist/fn/isDom.js CHANGED
@@ -1,6 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isDom = void 0;
4
1
  const isDom = function (...args) {
5
2
  if (!args.length)
6
3
  return false;
@@ -11,4 +8,4 @@ const isDom = function (...args) {
11
8
  }
12
9
  return true;
13
10
  };
14
- exports.isDom = isDom;
11
+ export { isDom };
@@ -1,13 +1,10 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isEmail = void 0;
4
- const isString_1 = require("./isString");
1
+ import { isString } from './isString';
5
2
  const isEmail = function (...args) {
6
3
  if (!args.length)
7
4
  return false;
8
5
  let regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;
9
6
  for (let st of args) {
10
- if (!(0, isString_1.isString)(st)) {
7
+ if (!isString(st)) {
11
8
  return false;
12
9
  }
13
10
  if (!regex.test(st)) {
@@ -16,4 +13,4 @@ const isEmail = function (...args) {
16
13
  }
17
14
  return true;
18
15
  };
19
- exports.isEmail = isEmail;
16
+ export { isEmail };
@@ -1,21 +1,18 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isEmpty = void 0;
4
- const isArray_1 = require("./isArray");
5
- const numProperties_1 = require("./numProperties");
1
+ import { isArray } from './isArray';
2
+ import { numProperties } from './numProperties';
6
3
  const isEmpty = function (obj) {
7
4
  if (!obj) {
8
5
  return true;
9
6
  }
10
- if ((0, isArray_1.isArray)(obj)) {
7
+ if (isArray(obj)) {
11
8
  return obj.length ? false : true;
12
9
  }
13
10
  if (typeof obj === 'object') {
14
- if ((0, numProperties_1.numProperties)(obj)) {
11
+ if (numProperties(obj)) {
15
12
  return false;
16
13
  }
17
14
  return true;
18
15
  }
19
16
  return false;
20
17
  };
21
- exports.isEmpty = isEmpty;
18
+ export { isEmpty };
@@ -1,6 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isEvent = void 0;
4
1
  const isEvent = function (...args) {
5
2
  if (!args.length)
6
3
  return false;
@@ -11,4 +8,4 @@ const isEvent = function (...args) {
11
8
  }
12
9
  return true;
13
10
  };
14
- exports.isEvent = isEvent;
11
+ export { isEvent };
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isFocused = void 0;
4
1
  const isFocused = function (ele, contain) {
5
2
  return ele === document.activeElement || (contain && ele.contains && ele.contains(document.activeElement));
6
3
  };
7
- exports.isFocused = isFocused;
4
+ export { isFocused };
@@ -1,6 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isFunction = void 0;
4
1
  const isFunction = function (...args) {
5
2
  if (!args.length)
6
3
  return false;
@@ -11,4 +8,4 @@ const isFunction = function (...args) {
11
8
  }
12
9
  return true;
13
10
  };
14
- exports.isFunction = isFunction;
11
+ export { isFunction };
@@ -1,19 +1,16 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isHostname = void 0;
4
- const isString_1 = require("./isString");
5
- const isIP_1 = require("./isIP");
1
+ import { isString } from './isString';
2
+ import { isIP } from './isIP';
6
3
  const isHostname = function (...args) {
7
4
  if (!args.length)
8
5
  return false;
9
6
  for (let st of args) {
10
- if (!(0, isString_1.isString)(st)) {
7
+ if (!isString(st)) {
11
8
  return false;
12
9
  }
13
- if (!(0, isIP_1.isIP)(st) && !bbn.vars.regexp.hostname.test(st)) {
10
+ if (!isIP(st) && !bbn.vars.regexp.hostname.test(st)) {
14
11
  return false;
15
12
  }
16
13
  }
17
14
  return true;
18
15
  };
19
- exports.isHostname = isHostname;
16
+ export { isHostname };
package/dist/fn/isIP.js CHANGED
@@ -1,15 +1,12 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isIP = void 0;
4
- const isString_1 = require("./isString");
1
+ import { isString } from './isString';
5
2
  const isIP = function (...args) {
6
3
  if (!args.length)
7
4
  return false;
8
5
  for (let st of args) {
9
- if (!(0, isString_1.isString)(st) || !bbn.vars.regexp.ip.test(st)) {
6
+ if (!isString(st) || !bbn.vars.regexp.ip.test(st)) {
10
7
  return false;
11
8
  }
12
9
  }
13
10
  return true;
14
11
  };
15
- exports.isIP = isIP;
12
+ export { isIP };
@@ -1,15 +1,12 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isInside = void 0;
4
- const getAncestors_1 = require("./getAncestors");
5
- const isString_1 = require("./isString");
6
- const each_1 = require("./each");
1
+ import { getAncestors } from './getAncestors';
2
+ import { isString } from './isString';
3
+ import { each } from './each';
7
4
  const isInside = function (ele, ancestor) {
8
- let ancestors = (0, getAncestors_1.getAncestors)(ele);
5
+ let ancestors = getAncestors(ele);
9
6
  if (ancestors.length) {
10
- if ((0, isString_1.isString)(ancestor)) {
7
+ if (isString(ancestor)) {
11
8
  let ok = false;
12
- (0, each_1.each)(ancestors, (a) => {
9
+ each(ancestors, (a) => {
13
10
  if (a.matches && a.matches(ancestor)) {
14
11
  ok = true;
15
12
  return false;
@@ -23,4 +20,4 @@ const isInside = function (ele, ancestor) {
23
20
  }
24
21
  return false;
25
22
  };
26
- exports.isInside = isInside;
23
+ export { isInside };
package/dist/fn/isInt.js CHANGED
@@ -1,6 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isInt = void 0;
4
1
  const isInt = function (...args) {
5
2
  if (!args.length)
6
3
  return false;
@@ -11,4 +8,4 @@ const isInt = function (...args) {
11
8
  }
12
9
  return true;
13
10
  };
14
- exports.isInt = isInt;
11
+ export { isInt };
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isIterable = void 0;
4
1
  const isIterable = function (v) {
5
2
  return v && typeof v === 'object' && Symbol.iterator in Object(v);
6
3
  };
7
- exports.isIterable = isIterable;
4
+ export { isIterable };
@@ -1,9 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isMobile = void 0;
4
- const isMobileDevice_1 = require("./isMobileDevice");
5
- const isTabletDevice_1 = require("./isTabletDevice");
1
+ import { isMobileDevice } from './isMobileDevice';
2
+ import { isTabletDevice } from './isTabletDevice';
6
3
  const isMobile = function () {
7
- return (0, isMobileDevice_1.isMobileDevice)() || (0, isTabletDevice_1.isTabletDevice)();
4
+ return isMobileDevice() || isTabletDevice();
8
5
  };
9
- exports.isMobile = isMobile;
6
+ export { isMobile };
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isMobileDevice = void 0;
4
1
  const isMobileDevice = function () {
5
2
  return this.getDeviceType() === 'mobile';
6
3
  };
7
- exports.isMobileDevice = isMobileDevice;
4
+ export { isMobileDevice };
package/dist/fn/isNull.js CHANGED
@@ -1,6 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isNull = void 0;
4
1
  const isNull = function (...args) {
5
2
  if (!args.length)
6
3
  return false;
@@ -11,4 +8,4 @@ const isNull = function (...args) {
11
8
  }
12
9
  return true;
13
10
  };
14
- exports.isNull = isNull;
11
+ export { isNull };
@@ -1,6 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isNumber = void 0;
4
1
  const isNumber = function (...args) {
5
2
  if (!args.length)
6
3
  return false;
@@ -11,4 +8,4 @@ const isNumber = function (...args) {
11
8
  }
12
9
  return true;
13
10
  };
14
- exports.isNumber = isNumber;
11
+ export { isNumber };
@@ -1,6 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isObject = void 0;
4
1
  const isObject = function (...args) {
5
2
  if (!args.length)
6
3
  return false;
@@ -11,4 +8,4 @@ const isObject = function (...args) {
11
8
  }
12
9
  return true;
13
10
  };
14
- exports.isObject = isObject;
11
+ export { isObject };
@@ -1,6 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isPercent = void 0;
4
1
  const isPercent = function (...args) {
5
2
  if (!args.length)
6
3
  return false;
@@ -11,4 +8,4 @@ const isPercent = function (...args) {
11
8
  }
12
9
  return true;
13
10
  };
14
- exports.isPercent = isPercent;
11
+ export { isPercent };
@@ -1,6 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isPrimitive = void 0;
4
1
  const isPrimitive = function (...args) {
5
2
  if (!args.length)
6
3
  return false;
@@ -11,4 +8,4 @@ const isPrimitive = function (...args) {
11
8
  }
12
9
  return true;
13
10
  };
14
- exports.isPrimitive = isPrimitive;
11
+ export { isPrimitive };
@@ -1,6 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isPromise = void 0;
4
1
  const isPromise = function (...args) {
5
2
  if (!args.length)
6
3
  return false;
@@ -11,4 +8,4 @@ const isPromise = function (...args) {
11
8
  }
12
9
  return true;
13
10
  };
14
- exports.isPromise = isPromise;
11
+ export { isPromise };
@@ -1,10 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isPropSize = void 0;
4
- const each_1 = require("./each");
1
+ import { each } from './each';
5
2
  const isPropSize = function (name) {
6
3
  let isTrue = false;
7
- (0, each_1.each)(['width', 'height', 'gap', 'margin', 'padding', 'top', 'left', 'right', 'bottom'], (a) => {
4
+ each(['width', 'height', 'gap', 'margin', 'padding', 'top', 'left', 'right', 'bottom'], (a) => {
8
5
  if (name.indexOf(a) !== -1) {
9
6
  isTrue = true;
10
7
  return false;
@@ -12,4 +9,4 @@ const isPropSize = function (name) {
12
9
  });
13
10
  return isTrue;
14
11
  };
15
- exports.isPropSize = isPropSize;
12
+ export { isPropSize };