@bbn/bbn 1.0.32 → 1.0.34
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.
- package/dist/bundle.d.ts +3 -373
- package/dist/bundle.js +400 -406
- package/dist/fn/getLoader.d.ts +1 -1
- package/dist/index.d.ts +2 -372
- package/dist/index.js +396 -393
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -226,401 +226,404 @@ import { uniqString } from './fn/uniqString';
|
|
|
226
226
|
import { unique } from './fn/unique';
|
|
227
227
|
import { upload } from './fn/upload';
|
|
228
228
|
import { warning } from './fn/warning';
|
|
229
|
-
const
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
}
|
|
233
|
-
/**
|
|
234
|
-
* Translate an expression using the object bbn.lng
|
|
235
|
-
*
|
|
236
|
-
* @param {String} st
|
|
237
|
-
* @returns {String}
|
|
238
|
-
*/
|
|
239
|
-
const _ = (...args) => {
|
|
240
|
-
let st = args.shift();
|
|
241
|
-
let res = bbn.lng[st] || st;
|
|
242
|
-
if (args.length) {
|
|
243
|
-
let i = 0;
|
|
244
|
-
return res.replace(/\%([d|s])/g, (match, type) => {
|
|
245
|
-
let tmp = args[i++];
|
|
246
|
-
if (!tmp) {
|
|
247
|
-
tmp = type === 'd' ? 0 : '';
|
|
248
|
-
}
|
|
249
|
-
checkType(tmp, type === 'd' ? 'number' : 'string', bbn._("The value you gave did not correspond, check the loggg"));
|
|
250
|
-
return tmp;
|
|
251
|
-
});
|
|
252
|
-
}
|
|
253
|
-
return res;
|
|
254
|
-
};
|
|
255
|
-
const $ = (selector, context) => {
|
|
256
|
-
if (context && context.querySelectorAll) {
|
|
257
|
-
return context.querySelectorAll(selector);
|
|
258
|
-
}
|
|
259
|
-
return document.body.querySelectorAll(selector);
|
|
260
|
-
};
|
|
261
|
-
const _popups = [];
|
|
262
|
-
const lng = {
|
|
263
|
-
/* User-defined languages elements */
|
|
264
|
-
select_unselect_all: "Select/Clear all",
|
|
265
|
-
select_all: "Select all",
|
|
266
|
-
search: 'Search',
|
|
267
|
-
loading: 'Loading...',
|
|
268
|
-
choose: 'Choose',
|
|
269
|
-
error: 'Error',
|
|
270
|
-
server_response: 'Server response',
|
|
271
|
-
reload: 'Reload',
|
|
272
|
-
errorText: 'Something went wrong',
|
|
273
|
-
closeAll: "Close all",
|
|
274
|
-
closeOthers: "Close others",
|
|
275
|
-
pin: "Pin",
|
|
276
|
-
arrange: "Arrange",
|
|
277
|
-
cancel: "Cancel",
|
|
278
|
-
unpin: "Unpin",
|
|
279
|
-
yes: "Yes",
|
|
280
|
-
no: "No",
|
|
281
|
-
unknown: "Unknown",
|
|
282
|
-
untitled: "Untitled",
|
|
283
|
-
confirmation: "Confirmation",
|
|
284
|
-
Today: "Today",
|
|
285
|
-
Tomorrow: "Tomorrow",
|
|
286
|
-
Yesterday: "Yesterday"
|
|
287
|
-
};
|
|
288
|
-
const app = {
|
|
289
|
-
popups: [],
|
|
290
|
-
};
|
|
291
|
-
const vars = {
|
|
292
|
-
loggers: {
|
|
293
|
-
_num: 0
|
|
229
|
+
const bbn = {
|
|
230
|
+
version: "1.0.1",
|
|
231
|
+
opt: {
|
|
232
|
+
_cat: {}
|
|
294
233
|
},
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
234
|
+
/**
|
|
235
|
+
* Translate an expression using the object bbn.lng
|
|
236
|
+
*
|
|
237
|
+
* @param {String} st
|
|
238
|
+
* @returns {String}
|
|
239
|
+
*/
|
|
240
|
+
_: (...args) => {
|
|
241
|
+
let st = args.shift();
|
|
242
|
+
let res = bbn.lng[st] || st;
|
|
243
|
+
if (args.length) {
|
|
244
|
+
let i = 0;
|
|
245
|
+
return res.replace(/\%([d|s])/g, (match, type) => {
|
|
246
|
+
let tmp = args[i++];
|
|
247
|
+
if (!tmp) {
|
|
248
|
+
tmp = type === 'd' ? 0 : '';
|
|
249
|
+
}
|
|
250
|
+
checkType(tmp, type === 'd' ? 'number' : 'string', bbn._("The value you gave did not correspond, check the loggg"));
|
|
251
|
+
return tmp;
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
return res;
|
|
308
255
|
},
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
black: '#000000',
|
|
315
|
-
anthracite: '#454545',
|
|
316
|
-
grey: '#d3d3d3',
|
|
317
|
-
white: '#ffffff',
|
|
318
|
-
beige: '#fdfdfd',
|
|
319
|
-
lightgrey: '#dcdcdc',
|
|
320
|
-
pastelblue: '#ddebf6',
|
|
321
|
-
cyan: '#00c8f8',
|
|
322
|
-
blue: '#6e9ecf',
|
|
323
|
-
indigo: '#3f51b5',
|
|
324
|
-
navy: '#354458',
|
|
325
|
-
webblue: '#2196f3',
|
|
326
|
-
teal: '#009688',
|
|
327
|
-
turquoise: '#1fda9a',
|
|
328
|
-
pastelgreen: '#e2efda',
|
|
329
|
-
palegreen: '#ccffcc',
|
|
330
|
-
green: '#00a03e',
|
|
331
|
-
olive: '#92b06a',
|
|
332
|
-
pastelorange: '#fff2cc',
|
|
333
|
-
yellow: '#fdf200',
|
|
334
|
-
orange: '#ff9900',
|
|
335
|
-
pink: '#eb65a0',
|
|
336
|
-
purple: '#a333c8',
|
|
337
|
-
red: '#db3340',
|
|
338
|
-
brown: '#8c6954'
|
|
256
|
+
$: (selector, context) => {
|
|
257
|
+
if (context && context.querySelectorAll) {
|
|
258
|
+
return context.querySelectorAll(selector);
|
|
259
|
+
}
|
|
260
|
+
return document.body.querySelectorAll(selector);
|
|
339
261
|
},
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
262
|
+
_popups: [],
|
|
263
|
+
lng: {
|
|
264
|
+
/* User-defined languages elements */
|
|
265
|
+
select_unselect_all: "Select/Clear all",
|
|
266
|
+
select_all: "Select all",
|
|
267
|
+
search: 'Search',
|
|
268
|
+
loading: 'Loading...',
|
|
269
|
+
choose: 'Choose',
|
|
270
|
+
error: 'Error',
|
|
271
|
+
server_response: 'Server response',
|
|
272
|
+
reload: 'Reload',
|
|
273
|
+
errorText: 'Something went wrong',
|
|
274
|
+
closeAll: "Close all",
|
|
275
|
+
closeOthers: "Close others",
|
|
276
|
+
pin: "Pin",
|
|
277
|
+
arrange: "Arrange",
|
|
278
|
+
cancel: "Cancel",
|
|
279
|
+
unpin: "Unpin",
|
|
280
|
+
yes: "Yes",
|
|
281
|
+
no: "No",
|
|
282
|
+
unknown: "Unknown",
|
|
283
|
+
untitled: "Untitled",
|
|
284
|
+
confirmation: "Confirmation",
|
|
285
|
+
Today: "Today",
|
|
286
|
+
Tomorrow: "Tomorrow",
|
|
287
|
+
Yesterday: "Yesterday"
|
|
288
|
+
},
|
|
289
|
+
app: {
|
|
290
|
+
popups: [],
|
|
291
|
+
},
|
|
292
|
+
vars: {
|
|
293
|
+
loggers: {
|
|
294
|
+
_num: 0
|
|
295
|
+
},
|
|
296
|
+
/* Usable datatypes through Ajax function */
|
|
297
|
+
datatypes: ['xml', 'html', 'script', 'json', 'jsonp', 'text', 'blob'],
|
|
298
|
+
/* The default value used by the function shorten */
|
|
299
|
+
shortenLen: 30,
|
|
300
|
+
/* Categorizing keyboard map */
|
|
301
|
+
keys: {
|
|
302
|
+
upDown: [33, 34, 35, 36, 38, 40],
|
|
303
|
+
leftRight: [36, 35, 37, 39],
|
|
304
|
+
dels: [8, 46, 45],
|
|
305
|
+
confirm: [13, 9],
|
|
306
|
+
alt: [20, 16, 17, 18, 144],
|
|
307
|
+
numbers: [48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105],
|
|
308
|
+
numsigns: [109, 110, 189, 190]
|
|
309
|
+
},
|
|
310
|
+
comparators: [">=", "<=", ">", "<", "="],
|
|
311
|
+
operators: ["+", "-", "/", "*"],
|
|
312
|
+
tags: ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'menu', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'slot', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr'],
|
|
313
|
+
colors: {
|
|
314
|
+
darkgrey: '#5a6a62',
|
|
315
|
+
black: '#000000',
|
|
316
|
+
anthracite: '#454545',
|
|
317
|
+
grey: '#d3d3d3',
|
|
318
|
+
white: '#ffffff',
|
|
319
|
+
beige: '#fdfdfd',
|
|
320
|
+
lightgrey: '#dcdcdc',
|
|
321
|
+
pastelblue: '#ddebf6',
|
|
322
|
+
cyan: '#00c8f8',
|
|
323
|
+
blue: '#6e9ecf',
|
|
324
|
+
indigo: '#3f51b5',
|
|
325
|
+
navy: '#354458',
|
|
326
|
+
webblue: '#2196f3',
|
|
327
|
+
teal: '#009688',
|
|
328
|
+
turquoise: '#1fda9a',
|
|
329
|
+
pastelgreen: '#e2efda',
|
|
330
|
+
palegreen: '#ccffcc',
|
|
331
|
+
green: '#00a03e',
|
|
332
|
+
olive: '#92b06a',
|
|
333
|
+
pastelorange: '#fff2cc',
|
|
334
|
+
yellow: '#fdf200',
|
|
335
|
+
orange: '#ff9900',
|
|
336
|
+
pink: '#eb65a0',
|
|
337
|
+
purple: '#a333c8',
|
|
338
|
+
red: '#db3340',
|
|
339
|
+
brown: '#8c6954'
|
|
340
|
+
},
|
|
341
|
+
reserved: ['abstract', 'boolean', 'break', 'byte', 'case', 'catch', 'char', 'class', 'continue', 'const', 'debugger', 'default', 'delete', 'do', 'double', 'else', 'enum', 'export', 'extends', 'false', 'final', 'finally', 'float', 'for', 'function', 'goto', 'if', 'implements', 'import', 'in', 'instanceof', 'int', 'interface', 'long', 'native', 'new', 'null', 'package', 'private', 'protected', 'public', 'return', 'short', 'static', 'super', 'switch', 'synchronized', 'this', 'throw', 'throws', 'transient', 'true', 'try', 'typeof', 'var', 'void', 'while', 'with'],
|
|
342
|
+
mockText: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
|
|
343
|
+
regexp: {
|
|
344
|
+
url: new RegExp('^(https?:\\/\\/)?' + // protocol
|
|
345
|
+
'((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.?)+[a-z]{2,}|' + // domain name
|
|
346
|
+
'((\\d{1,3}\\.){3}\\d{1,3}))' + // OR ip (v4) address
|
|
347
|
+
'(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*' + // port and path
|
|
348
|
+
'(\\?[;&a-z\\d%_.~+=-]*)?' + // query string
|
|
349
|
+
'(\\#[-a-z\\d_]*)?$', 'i'),
|
|
350
|
+
ip: new RegExp("^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$"),
|
|
351
|
+
hostname: new RegExp("^[a-z\\d]([a-z\\d\\-]{0,61}[a-z\\d])?(\\.[a-z\\d]([a-z\\d\\-]{0,61}[a-z\\d])?)*$", 'i'),
|
|
352
|
+
}
|
|
353
|
+
},
|
|
354
|
+
env: {
|
|
355
|
+
siteTitle: window.document.title,
|
|
356
|
+
/* This variable should be set to true in debugging mode only */
|
|
357
|
+
logging: false,
|
|
358
|
+
/* Address of the CDN (where this file should be hosted) */
|
|
359
|
+
cdn: '',
|
|
360
|
+
/* Default language */
|
|
361
|
+
lang: 'en',
|
|
362
|
+
host: window.location.protocol + '//' + window.location.hostname,
|
|
363
|
+
url: window.location.href,
|
|
364
|
+
old_path: null,
|
|
365
|
+
/* True when non asynchronous Ajax loads */
|
|
366
|
+
loading: false,
|
|
367
|
+
/* Window width */
|
|
368
|
+
width: 0,
|
|
369
|
+
/* Window height */
|
|
370
|
+
height: 0,
|
|
371
|
+
/* Element currently focused (Element object) */
|
|
372
|
+
focused: false,
|
|
373
|
+
/* Last time user has been active */
|
|
374
|
+
last_focus: (new Date()).getTime(),
|
|
375
|
+
/* Sleep mode (tab or window unfocused */
|
|
376
|
+
sleep: false,
|
|
377
|
+
/**
|
|
378
|
+
* @var bbn.env.loaders Object where the props are MD5 of data and url while the values are the requests,
|
|
379
|
+
* for preventing the same call to be made at the same time
|
|
380
|
+
**/
|
|
381
|
+
loaders: [],
|
|
382
|
+
loadersHistory: [],
|
|
383
|
+
maxLoadersHistory: 20,
|
|
384
|
+
/* bbn.env.params is an array of each element of the path */
|
|
385
|
+
resizeTimer: false,
|
|
386
|
+
hashChanged: 0,
|
|
387
|
+
params: [],
|
|
388
|
+
isInit: false,
|
|
389
|
+
isFocused: false,
|
|
390
|
+
timeoff: Math.round((new Date()).getTime() / 1000),
|
|
391
|
+
loggingLevel: 5,
|
|
392
|
+
ignoreUnload: false,
|
|
393
|
+
historyDisabled: false,
|
|
394
|
+
nav: 'ajax'
|
|
395
|
+
},
|
|
396
|
+
fn: {
|
|
397
|
+
_addLoader,
|
|
398
|
+
_compareValues,
|
|
399
|
+
_deleteLoader,
|
|
400
|
+
abort,
|
|
401
|
+
abortURL,
|
|
402
|
+
addColors,
|
|
403
|
+
addInputs,
|
|
404
|
+
addStyle,
|
|
405
|
+
adjustHeight,
|
|
406
|
+
adjustSize,
|
|
407
|
+
adjustWidth,
|
|
408
|
+
ajax,
|
|
409
|
+
analyzeFunction,
|
|
410
|
+
animateCss,
|
|
411
|
+
arrayBuffer2String,
|
|
412
|
+
arrayFromProp,
|
|
413
|
+
autoExtend,
|
|
414
|
+
baseName,
|
|
415
|
+
br2nl,
|
|
416
|
+
calendar,
|
|
417
|
+
callback,
|
|
418
|
+
camelize,
|
|
419
|
+
camelToCss,
|
|
420
|
+
canvasToImage,
|
|
421
|
+
center,
|
|
422
|
+
checkProps,
|
|
423
|
+
checkPropsDetails,
|
|
424
|
+
checkPropsOrDie,
|
|
425
|
+
checkType,
|
|
426
|
+
circularReplacer,
|
|
427
|
+
clone,
|
|
428
|
+
colorToHex,
|
|
429
|
+
compare,
|
|
430
|
+
compareConditions,
|
|
431
|
+
copy,
|
|
432
|
+
correctCase,
|
|
433
|
+
count,
|
|
434
|
+
crc32,
|
|
435
|
+
createObject,
|
|
436
|
+
cssExists,
|
|
437
|
+
date,
|
|
438
|
+
dateSQL,
|
|
439
|
+
daysInMonth,
|
|
440
|
+
deepPath,
|
|
441
|
+
defaultAjaxAbortFunction,
|
|
442
|
+
defaultAjaxErrorFunction,
|
|
443
|
+
defaultAlertFunction,
|
|
444
|
+
defaultConfirmFunction,
|
|
445
|
+
defaultEndLoadingFunction,
|
|
446
|
+
defaultErrorFunction,
|
|
447
|
+
defaultHistoryFunction,
|
|
448
|
+
defaultLinkFunction,
|
|
449
|
+
defaultPostLinkFunction,
|
|
450
|
+
defaultPreLinkFunction,
|
|
451
|
+
defaultResizeFunction,
|
|
452
|
+
defaultStartLoadingFunction,
|
|
453
|
+
deleteProp,
|
|
454
|
+
diffObj,
|
|
455
|
+
dirName,
|
|
456
|
+
download,
|
|
457
|
+
downloadContent,
|
|
458
|
+
each,
|
|
459
|
+
eraseCookie,
|
|
460
|
+
error,
|
|
461
|
+
escapeDquotes,
|
|
462
|
+
escapeRegExp,
|
|
463
|
+
escapeSquotes,
|
|
464
|
+
escapeTicks,
|
|
465
|
+
escapeUrl,
|
|
466
|
+
extend,
|
|
467
|
+
extendOut,
|
|
468
|
+
fdate,
|
|
469
|
+
fdatetime,
|
|
470
|
+
fieldValue,
|
|
471
|
+
fileExt,
|
|
472
|
+
filter,
|
|
473
|
+
filterToConditions,
|
|
474
|
+
findAll,
|
|
475
|
+
fori,
|
|
476
|
+
forir,
|
|
477
|
+
format,
|
|
478
|
+
formatBytes,
|
|
479
|
+
formatDate,
|
|
480
|
+
formatSize,
|
|
481
|
+
formdata,
|
|
482
|
+
fromXml,
|
|
483
|
+
ftime,
|
|
484
|
+
getAllTags,
|
|
485
|
+
getAncestors,
|
|
486
|
+
getAttributes,
|
|
487
|
+
getBrowserName,
|
|
488
|
+
getBrowserVersion,
|
|
489
|
+
getCookie,
|
|
490
|
+
getCssVar,
|
|
491
|
+
getDay,
|
|
492
|
+
getDeviceType,
|
|
493
|
+
getEventData,
|
|
494
|
+
getField,
|
|
495
|
+
getFieldValues,
|
|
496
|
+
getHtml,
|
|
497
|
+
getHTMLOfSelection,
|
|
498
|
+
getLoader,
|
|
499
|
+
getPath,
|
|
500
|
+
getProp,
|
|
501
|
+
getProperty,
|
|
502
|
+
getRequestId,
|
|
503
|
+
getRow,
|
|
504
|
+
getScrollBarSize,
|
|
505
|
+
getText,
|
|
506
|
+
getTimeoff,
|
|
507
|
+
happy,
|
|
508
|
+
hash,
|
|
509
|
+
hex2rgb,
|
|
510
|
+
history,
|
|
511
|
+
html2text,
|
|
512
|
+
imageToCanvas,
|
|
513
|
+
imgToBase64,
|
|
514
|
+
info,
|
|
515
|
+
init,
|
|
516
|
+
isActiveInterface,
|
|
517
|
+
isArray,
|
|
518
|
+
isBlob,
|
|
519
|
+
isBoolean,
|
|
520
|
+
isCanvas,
|
|
521
|
+
isColor,
|
|
522
|
+
isComment,
|
|
523
|
+
isCp,
|
|
524
|
+
isDate,
|
|
525
|
+
isDesktopDevice,
|
|
526
|
+
isDimension,
|
|
527
|
+
isDom,
|
|
528
|
+
isEmail,
|
|
529
|
+
isEmpty,
|
|
530
|
+
isEvent,
|
|
531
|
+
isFocused,
|
|
532
|
+
isFunction,
|
|
533
|
+
isHostname,
|
|
534
|
+
isInside,
|
|
535
|
+
isInt,
|
|
536
|
+
isIP,
|
|
537
|
+
isIterable,
|
|
538
|
+
isMobile,
|
|
539
|
+
isMobileDevice,
|
|
540
|
+
isNull,
|
|
541
|
+
isNumber,
|
|
542
|
+
isObject,
|
|
543
|
+
isPercent,
|
|
544
|
+
isPrimitive,
|
|
545
|
+
isPromise,
|
|
546
|
+
isPropSize,
|
|
547
|
+
isSame,
|
|
548
|
+
isSQLDate,
|
|
549
|
+
isString,
|
|
550
|
+
isSymbol,
|
|
551
|
+
isTabletDevice,
|
|
552
|
+
isURL,
|
|
553
|
+
isValidDimension,
|
|
554
|
+
isValidName,
|
|
555
|
+
isValue,
|
|
556
|
+
isVue,
|
|
557
|
+
iterate,
|
|
558
|
+
lightenDarkenHex,
|
|
559
|
+
link,
|
|
560
|
+
log,
|
|
561
|
+
makeReactive,
|
|
562
|
+
map,
|
|
563
|
+
md5,
|
|
564
|
+
money,
|
|
565
|
+
move,
|
|
566
|
+
multiorder,
|
|
567
|
+
nl2br,
|
|
568
|
+
numProperties,
|
|
569
|
+
objectToFormData,
|
|
570
|
+
order,
|
|
571
|
+
outerHeight,
|
|
572
|
+
outerWidth,
|
|
573
|
+
percent,
|
|
574
|
+
pickValue,
|
|
575
|
+
post,
|
|
576
|
+
postOut,
|
|
577
|
+
printf,
|
|
578
|
+
quotes2html,
|
|
579
|
+
randomInt,
|
|
580
|
+
randomString,
|
|
581
|
+
removeAccents,
|
|
582
|
+
removeEmpty,
|
|
583
|
+
removeExtraSpaces,
|
|
584
|
+
removeHtmlComments,
|
|
585
|
+
removePrivateProp,
|
|
586
|
+
removeTrailingChars,
|
|
587
|
+
repeat,
|
|
588
|
+
replaceAll,
|
|
589
|
+
replaceSelection,
|
|
590
|
+
resize,
|
|
591
|
+
rgb2hex,
|
|
592
|
+
riterate,
|
|
593
|
+
roundDecimal,
|
|
594
|
+
sanitize,
|
|
595
|
+
search,
|
|
596
|
+
selectElementText,
|
|
597
|
+
selector,
|
|
598
|
+
setCookie,
|
|
599
|
+
setCssVar,
|
|
600
|
+
setNavigationVars,
|
|
601
|
+
setProp,
|
|
602
|
+
setProperty,
|
|
603
|
+
shorten,
|
|
604
|
+
shortenObj,
|
|
605
|
+
shuffle,
|
|
606
|
+
simpleHash,
|
|
607
|
+
simpleHash1,
|
|
608
|
+
simpleHash2,
|
|
609
|
+
startChrono,
|
|
610
|
+
stat,
|
|
611
|
+
stopChrono,
|
|
612
|
+
string2ArrayBuffer,
|
|
613
|
+
submit,
|
|
614
|
+
substr,
|
|
615
|
+
sum,
|
|
616
|
+
timestamp,
|
|
617
|
+
toCSV,
|
|
618
|
+
toggleFullScreen,
|
|
619
|
+
translate,
|
|
620
|
+
treatAjaxArguments,
|
|
621
|
+
trim,
|
|
622
|
+
uniqString,
|
|
623
|
+
unique,
|
|
624
|
+
upload,
|
|
625
|
+
warning,
|
|
351
626
|
}
|
|
352
627
|
};
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
/* This variable should be set to true in debugging mode only */
|
|
356
|
-
logging: false,
|
|
357
|
-
/* Address of the CDN (where this file should be hosted) */
|
|
358
|
-
cdn: '',
|
|
359
|
-
/* Default language */
|
|
360
|
-
lang: 'en',
|
|
361
|
-
host: window.location.protocol + '//' + window.location.hostname,
|
|
362
|
-
url: window.location.href,
|
|
363
|
-
old_path: null,
|
|
364
|
-
/* True when non asynchronous Ajax loads */
|
|
365
|
-
loading: false,
|
|
366
|
-
/* Window width */
|
|
367
|
-
width: 0,
|
|
368
|
-
/* Window height */
|
|
369
|
-
height: 0,
|
|
370
|
-
/* Element currently focused (Element object) */
|
|
371
|
-
focused: false,
|
|
372
|
-
/* Last time user has been active */
|
|
373
|
-
last_focus: (new Date()).getTime(),
|
|
374
|
-
/* Sleep mode (tab or window unfocused */
|
|
375
|
-
sleep: false,
|
|
376
|
-
/**
|
|
377
|
-
* @var bbn.env.loaders Object where the props are MD5 of data and url while the values are the requests,
|
|
378
|
-
* for preventing the same call to be made at the same time
|
|
379
|
-
**/
|
|
380
|
-
loaders: [],
|
|
381
|
-
loadersHistory: [],
|
|
382
|
-
maxLoadersHistory: 20,
|
|
383
|
-
/* bbn.env.params is an array of each element of the path */
|
|
384
|
-
resizeTimer: false,
|
|
385
|
-
hashChanged: 0,
|
|
386
|
-
params: [],
|
|
387
|
-
isInit: false,
|
|
388
|
-
isFocused: false,
|
|
389
|
-
timeoff: Math.round((new Date()).getTime() / 1000),
|
|
390
|
-
loggingLevel: 5,
|
|
391
|
-
ignoreUnload: false,
|
|
392
|
-
historyDisabled: false,
|
|
393
|
-
nav: 'ajax'
|
|
394
|
-
};
|
|
395
|
-
const fn = {
|
|
396
|
-
_addLoader,
|
|
397
|
-
_compareValues,
|
|
398
|
-
_deleteLoader,
|
|
399
|
-
abort,
|
|
400
|
-
abortURL,
|
|
401
|
-
addColors,
|
|
402
|
-
addInputs,
|
|
403
|
-
addStyle,
|
|
404
|
-
adjustHeight,
|
|
405
|
-
adjustSize,
|
|
406
|
-
adjustWidth,
|
|
407
|
-
ajax,
|
|
408
|
-
analyzeFunction,
|
|
409
|
-
animateCss,
|
|
410
|
-
arrayBuffer2String,
|
|
411
|
-
arrayFromProp,
|
|
412
|
-
autoExtend,
|
|
413
|
-
baseName,
|
|
414
|
-
br2nl,
|
|
415
|
-
calendar,
|
|
416
|
-
callback,
|
|
417
|
-
camelize,
|
|
418
|
-
camelToCss,
|
|
419
|
-
canvasToImage,
|
|
420
|
-
center,
|
|
421
|
-
checkProps,
|
|
422
|
-
checkPropsDetails,
|
|
423
|
-
checkPropsOrDie,
|
|
424
|
-
checkType,
|
|
425
|
-
circularReplacer,
|
|
426
|
-
clone,
|
|
427
|
-
colorToHex,
|
|
428
|
-
compare,
|
|
429
|
-
compareConditions,
|
|
430
|
-
copy,
|
|
431
|
-
correctCase,
|
|
432
|
-
count,
|
|
433
|
-
crc32,
|
|
434
|
-
createObject,
|
|
435
|
-
cssExists,
|
|
436
|
-
date,
|
|
437
|
-
dateSQL,
|
|
438
|
-
daysInMonth,
|
|
439
|
-
deepPath,
|
|
440
|
-
defaultAjaxAbortFunction,
|
|
441
|
-
defaultAjaxErrorFunction,
|
|
442
|
-
defaultAlertFunction,
|
|
443
|
-
defaultConfirmFunction,
|
|
444
|
-
defaultEndLoadingFunction,
|
|
445
|
-
defaultErrorFunction,
|
|
446
|
-
defaultHistoryFunction,
|
|
447
|
-
defaultLinkFunction,
|
|
448
|
-
defaultPostLinkFunction,
|
|
449
|
-
defaultPreLinkFunction,
|
|
450
|
-
defaultResizeFunction,
|
|
451
|
-
defaultStartLoadingFunction,
|
|
452
|
-
deleteProp,
|
|
453
|
-
diffObj,
|
|
454
|
-
dirName,
|
|
455
|
-
download,
|
|
456
|
-
downloadContent,
|
|
457
|
-
each,
|
|
458
|
-
eraseCookie,
|
|
459
|
-
error,
|
|
460
|
-
escapeDquotes,
|
|
461
|
-
escapeRegExp,
|
|
462
|
-
escapeSquotes,
|
|
463
|
-
escapeTicks,
|
|
464
|
-
escapeUrl,
|
|
465
|
-
extend,
|
|
466
|
-
extendOut,
|
|
467
|
-
fdate,
|
|
468
|
-
fdatetime,
|
|
469
|
-
fieldValue,
|
|
470
|
-
fileExt,
|
|
471
|
-
filter,
|
|
472
|
-
filterToConditions,
|
|
473
|
-
findAll,
|
|
474
|
-
fori,
|
|
475
|
-
forir,
|
|
476
|
-
format,
|
|
477
|
-
formatBytes,
|
|
478
|
-
formatDate,
|
|
479
|
-
formatSize,
|
|
480
|
-
formdata,
|
|
481
|
-
fromXml,
|
|
482
|
-
ftime,
|
|
483
|
-
getAllTags,
|
|
484
|
-
getAncestors,
|
|
485
|
-
getAttributes,
|
|
486
|
-
getBrowserName,
|
|
487
|
-
getBrowserVersion,
|
|
488
|
-
getCookie,
|
|
489
|
-
getCssVar,
|
|
490
|
-
getDay,
|
|
491
|
-
getDeviceType,
|
|
492
|
-
getEventData,
|
|
493
|
-
getField,
|
|
494
|
-
getFieldValues,
|
|
495
|
-
getHtml,
|
|
496
|
-
getHTMLOfSelection,
|
|
497
|
-
getLoader,
|
|
498
|
-
getPath,
|
|
499
|
-
getProp,
|
|
500
|
-
getProperty,
|
|
501
|
-
getRequestId,
|
|
502
|
-
getRow,
|
|
503
|
-
getScrollBarSize,
|
|
504
|
-
getText,
|
|
505
|
-
getTimeoff,
|
|
506
|
-
happy,
|
|
507
|
-
hash,
|
|
508
|
-
hex2rgb,
|
|
509
|
-
history,
|
|
510
|
-
html2text,
|
|
511
|
-
imageToCanvas,
|
|
512
|
-
imgToBase64,
|
|
513
|
-
info,
|
|
514
|
-
init,
|
|
515
|
-
isActiveInterface,
|
|
516
|
-
isArray,
|
|
517
|
-
isBlob,
|
|
518
|
-
isBoolean,
|
|
519
|
-
isCanvas,
|
|
520
|
-
isColor,
|
|
521
|
-
isComment,
|
|
522
|
-
isCp,
|
|
523
|
-
isDate,
|
|
524
|
-
isDesktopDevice,
|
|
525
|
-
isDimension,
|
|
526
|
-
isDom,
|
|
527
|
-
isEmail,
|
|
528
|
-
isEmpty,
|
|
529
|
-
isEvent,
|
|
530
|
-
isFocused,
|
|
531
|
-
isFunction,
|
|
532
|
-
isHostname,
|
|
533
|
-
isInside,
|
|
534
|
-
isInt,
|
|
535
|
-
isIP,
|
|
536
|
-
isIterable,
|
|
537
|
-
isMobile,
|
|
538
|
-
isMobileDevice,
|
|
539
|
-
isNull,
|
|
540
|
-
isNumber,
|
|
541
|
-
isObject,
|
|
542
|
-
isPercent,
|
|
543
|
-
isPrimitive,
|
|
544
|
-
isPromise,
|
|
545
|
-
isPropSize,
|
|
546
|
-
isSame,
|
|
547
|
-
isSQLDate,
|
|
548
|
-
isString,
|
|
549
|
-
isSymbol,
|
|
550
|
-
isTabletDevice,
|
|
551
|
-
isURL,
|
|
552
|
-
isValidDimension,
|
|
553
|
-
isValidName,
|
|
554
|
-
isValue,
|
|
555
|
-
isVue,
|
|
556
|
-
iterate,
|
|
557
|
-
lightenDarkenHex,
|
|
558
|
-
link,
|
|
559
|
-
log,
|
|
560
|
-
makeReactive,
|
|
561
|
-
map,
|
|
562
|
-
md5,
|
|
563
|
-
money,
|
|
564
|
-
move,
|
|
565
|
-
multiorder,
|
|
566
|
-
nl2br,
|
|
567
|
-
numProperties,
|
|
568
|
-
objectToFormData,
|
|
569
|
-
order,
|
|
570
|
-
outerHeight,
|
|
571
|
-
outerWidth,
|
|
572
|
-
percent,
|
|
573
|
-
pickValue,
|
|
574
|
-
post,
|
|
575
|
-
postOut,
|
|
576
|
-
printf,
|
|
577
|
-
quotes2html,
|
|
578
|
-
randomInt,
|
|
579
|
-
randomString,
|
|
580
|
-
removeAccents,
|
|
581
|
-
removeEmpty,
|
|
582
|
-
removeExtraSpaces,
|
|
583
|
-
removeHtmlComments,
|
|
584
|
-
removePrivateProp,
|
|
585
|
-
removeTrailingChars,
|
|
586
|
-
repeat,
|
|
587
|
-
replaceAll,
|
|
588
|
-
replaceSelection,
|
|
589
|
-
resize,
|
|
590
|
-
rgb2hex,
|
|
591
|
-
riterate,
|
|
592
|
-
roundDecimal,
|
|
593
|
-
sanitize,
|
|
594
|
-
search,
|
|
595
|
-
selectElementText,
|
|
596
|
-
selector,
|
|
597
|
-
setCookie,
|
|
598
|
-
setCssVar,
|
|
599
|
-
setNavigationVars,
|
|
600
|
-
setProp,
|
|
601
|
-
setProperty,
|
|
602
|
-
shorten,
|
|
603
|
-
shortenObj,
|
|
604
|
-
shuffle,
|
|
605
|
-
simpleHash,
|
|
606
|
-
simpleHash1,
|
|
607
|
-
simpleHash2,
|
|
608
|
-
startChrono,
|
|
609
|
-
stat,
|
|
610
|
-
stopChrono,
|
|
611
|
-
string2ArrayBuffer,
|
|
612
|
-
submit,
|
|
613
|
-
substr,
|
|
614
|
-
sum,
|
|
615
|
-
timestamp,
|
|
616
|
-
toCSV,
|
|
617
|
-
toggleFullScreen,
|
|
618
|
-
translate,
|
|
619
|
-
treatAjaxArguments,
|
|
620
|
-
trim,
|
|
621
|
-
uniqString,
|
|
622
|
-
unique,
|
|
623
|
-
upload,
|
|
624
|
-
warning,
|
|
625
|
-
};
|
|
626
|
-
export { version, opt, _, $, _popups, lng, app, vars, env, fn };
|
|
628
|
+
window.bbn = bbn;
|
|
629
|
+
export { bbn };
|