@bbn/bbn 1.0.26 → 1.0.28
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 +8 -8
- package/dist/bundle.js +12 -12
- package/dist/fn/_addLoader.js +6 -3
- package/dist/fn/_compareValues.js +14 -11
- package/dist/fn/_deleteLoader.js +10 -7
- package/dist/fn/abort.js +6 -3
- package/dist/fn/abortURL.js +7 -4
- package/dist/fn/addColors.js +8 -5
- package/dist/fn/addInputs.js +6 -3
- package/dist/fn/addStyle.js +8 -5
- package/dist/fn/adjustHeight.js +8 -5
- package/dist/fn/adjustSize.js +8 -5
- package/dist/fn/adjustWidth.js +8 -5
- package/dist/fn/ajax.js +34 -31
- package/dist/fn/analyzeFunction.js +6 -3
- package/dist/fn/animateCss.js +4 -1
- package/dist/fn/arrayBuffer2String.js +4 -1
- package/dist/fn/arrayFromProp.js +8 -5
- package/dist/fn/autoExtend.js +7 -4
- package/dist/fn/baseName.js +9 -6
- package/dist/fn/br2nl.js +6 -3
- package/dist/fn/calendar.d.ts +1 -1
- package/dist/fn/calendar.js +20 -11
- package/dist/fn/callback.js +19 -16
- package/dist/fn/camelToCss.js +4 -1
- package/dist/fn/camelize.js +4 -1
- package/dist/fn/canvasToImage.js +4 -1
- package/dist/fn/center.js +4 -1
- package/dist/fn/checkProps.js +6 -3
- package/dist/fn/checkPropsDetails.js +12 -9
- package/dist/fn/checkPropsOrDie.js +6 -3
- package/dist/fn/checkType.js +19 -16
- package/dist/fn/chrono.js +7 -3
- package/dist/fn/circularReplacer.js +10 -7
- package/dist/fn/clone.js +10 -7
- package/dist/fn/colorToHex.js +4 -1
- package/dist/fn/compare.js +21 -18
- package/dist/fn/compareConditions.js +13 -10
- package/dist/fn/copy.js +7 -4
- package/dist/fn/correctCase.js +4 -1
- package/dist/fn/count.js +6 -3
- package/dist/fn/crc32.js +4 -1
- package/dist/fn/createObject.js +6 -3
- package/dist/fn/cssExists.js +6 -3
- package/dist/fn/date.js +11 -8
- package/dist/fn/dateSQL.d.ts +1 -1
- package/dist/fn/dateSQL.js +11 -4
- package/dist/fn/daysInMonth.d.ts +1 -1
- package/dist/fn/daysInMonth.js +11 -4
- package/dist/fn/deepPath.js +10 -7
- package/dist/fn/defaultAjaxAbortFunction.js +6 -3
- package/dist/fn/defaultAjaxErrorFunction.js +4 -1
- package/dist/fn/defaultAlertFunction.js +4 -1
- package/dist/fn/defaultConfirmFunction.js +7 -4
- package/dist/fn/defaultEndLoadingFunction.js +4 -1
- package/dist/fn/defaultErrorFunction.js +6 -3
- package/dist/fn/defaultHistoryFunction.js +4 -1
- package/dist/fn/defaultLinkFunction.js +4 -1
- package/dist/fn/defaultPostLinkFunction.js +4 -1
- package/dist/fn/defaultPreLinkFunction.js +4 -1
- package/dist/fn/defaultResizeFunction.js +4 -1
- package/dist/fn/defaultStartLoadingFunction.js +4 -1
- package/dist/fn/deleteProp.js +7 -4
- package/dist/fn/diffObj.js +19 -16
- package/dist/fn/dirName.js +10 -7
- package/dist/fn/download.js +18 -15
- package/dist/fn/downloadContent.js +12 -9
- package/dist/fn/each.js +10 -7
- package/dist/fn/eraseCookie.js +4 -1
- package/dist/fn/error.js +6 -3
- package/dist/fn/escapeDquotes.js +6 -3
- package/dist/fn/escapeRegExp.js +4 -1
- package/dist/fn/escapeSquotes.js +6 -3
- package/dist/fn/escapeTicks.js +6 -3
- package/dist/fn/escapeUrl.js +11 -8
- package/dist/fn/extend.js +16 -13
- package/dist/fn/extendOut.js +7 -4
- package/dist/fn/fdate.js +18 -11
- package/dist/fn/fdatetime.js +16 -9
- package/dist/fn/fieldValue.js +4 -1
- package/dist/fn/fileExt.js +6 -3
- package/dist/fn/filter.js +15 -12
- package/dist/fn/filterToConditions.js +11 -8
- package/dist/fn/findAll.js +10 -7
- package/dist/fn/fori.js +9 -6
- package/dist/fn/forir.js +9 -6
- package/dist/fn/format.js +6 -3
- package/dist/fn/formatBytes.js +4 -1
- package/dist/fn/formatDate.d.ts +1 -1
- package/dist/fn/formatDate.js +9 -2
- package/dist/fn/formatSize.js +8 -5
- package/dist/fn/formdata.js +14 -11
- package/dist/fn/fromXml.js +4 -1
- package/dist/fn/ftime.js +18 -11
- package/dist/fn/getAllTags.js +6 -3
- package/dist/fn/getAncestors.js +4 -1
- package/dist/fn/getAttributes.js +6 -3
- package/dist/fn/getBrowserName.js +4 -1
- package/dist/fn/getBrowserVersion.js +4 -1
- package/dist/fn/getCookie.js +4 -1
- package/dist/fn/getCssVar.js +4 -1
- package/dist/fn/getDay.js +6 -3
- package/dist/fn/getDeviceType.js +4 -1
- package/dist/fn/getEventData.js +10 -7
- package/dist/fn/getField.js +6 -3
- package/dist/fn/getFieldValues.js +10 -7
- package/dist/fn/getHTMLOfSelection.js +7 -4
- package/dist/fn/getHtml.js +6 -3
- package/dist/fn/getLoader.js +6 -3
- package/dist/fn/getPath.js +6 -3
- package/dist/fn/getProp.js +7 -4
- package/dist/fn/getProperty.js +4 -1
- package/dist/fn/getRequestId.js +8 -5
- package/dist/fn/getRow.js +6 -3
- package/dist/fn/getScrollBarSize.js +4 -1
- package/dist/fn/getText.js +4 -1
- package/dist/fn/getTimeoff.js +4 -1
- package/dist/fn/happy.js +6 -3
- package/dist/fn/hash.js +14 -11
- package/dist/fn/hex2rgb.js +4 -1
- package/dist/fn/history.js +4 -1
- package/dist/fn/html2text.js +4 -1
- package/dist/fn/imageToCanvas.js +4 -1
- package/dist/fn/imgToBase64.js +6 -3
- package/dist/fn/info.js +6 -3
- package/dist/fn/init.js +58 -31
- package/dist/fn/isActiveInterface.js +4 -1
- package/dist/fn/isArray.js +4 -1
- package/dist/fn/isBlob.js +4 -1
- package/dist/fn/isBoolean.js +4 -1
- package/dist/fn/isCanvas.js +4 -1
- package/dist/fn/isColor.js +6 -3
- package/dist/fn/isComment.js +4 -1
- package/dist/fn/isCp.js +6 -3
- package/dist/fn/isDate.js +4 -1
- package/dist/fn/isDesktopDevice.js +4 -1
- package/dist/fn/isDimension.js +6 -3
- package/dist/fn/isDom.js +4 -1
- package/dist/fn/isEmail.js +6 -3
- package/dist/fn/isEmpty.js +8 -5
- package/dist/fn/isEvent.js +4 -1
- package/dist/fn/isFocused.js +4 -1
- package/dist/fn/isFunction.js +4 -1
- package/dist/fn/isHostname.js +8 -5
- package/dist/fn/isIP.js +6 -3
- package/dist/fn/isInside.js +10 -7
- package/dist/fn/isInt.js +4 -1
- package/dist/fn/isIterable.js +4 -1
- package/dist/fn/isMobile.js +7 -4
- package/dist/fn/isMobileDevice.js +4 -1
- package/dist/fn/isNull.js +4 -1
- package/dist/fn/isNumber.js +4 -1
- package/dist/fn/isObject.js +4 -1
- package/dist/fn/isPercent.js +4 -1
- package/dist/fn/isPrimitive.js +4 -1
- package/dist/fn/isPromise.js +4 -1
- package/dist/fn/isPropSize.js +6 -3
- package/dist/fn/isSQLDate.js +4 -1
- package/dist/fn/isSame.js +8 -5
- package/dist/fn/isString.js +4 -1
- package/dist/fn/isSymbol.js +4 -1
- package/dist/fn/isTabletDevice.js +4 -1
- package/dist/fn/isURL.js +4 -1
- package/dist/fn/isValidDimension.js +7 -4
- package/dist/fn/isValidName.js +6 -3
- package/dist/fn/isValue.js +6 -3
- package/dist/fn/isVue.js +4 -1
- package/dist/fn/iterate.js +8 -5
- package/dist/fn/lightenDarkenHex.js +4 -1
- package/dist/fn/link.js +22 -19
- package/dist/fn/log.js +6 -3
- package/dist/fn/makeReactive.js +31 -28
- package/dist/fn/map.js +6 -3
- package/dist/fn/md5.js +4 -1
- package/dist/fn/money.js +6 -3
- package/dist/fn/move.js +4 -1
- package/dist/fn/multiorder.js +6 -3
- package/dist/fn/nl2br.js +6 -3
- package/dist/fn/numProperties.js +4 -1
- package/dist/fn/objectToFormData.js +15 -12
- package/dist/fn/order.js +6 -3
- package/dist/fn/outerHeight.js +6 -3
- package/dist/fn/outerWidth.js +6 -3
- package/dist/fn/percent.js +4 -1
- package/dist/fn/pickValue.js +4 -1
- package/dist/fn/post.js +10 -7
- package/dist/fn/postOut.js +8 -5
- package/dist/fn/printf.js +4 -1
- package/dist/fn/quotes2html.js +7 -4
- package/dist/fn/randomInt.js +4 -1
- package/dist/fn/randomString.js +7 -4
- package/dist/fn/removeAccents.js +8 -5
- package/dist/fn/removeEmpty.js +11 -8
- package/dist/fn/removeExtraSpaces.js +4 -1
- package/dist/fn/removeHtmlComments.js +6 -3
- package/dist/fn/removePrivateProp.js +6 -3
- package/dist/fn/removeTrailingChars.js +9 -6
- package/dist/fn/repeat.js +4 -1
- package/dist/fn/replaceAll.js +7 -4
- package/dist/fn/replaceSelection.js +4 -1
- package/dist/fn/resize.js +10 -7
- package/dist/fn/rgb2hex.js +4 -1
- package/dist/fn/riterate.js +6 -3
- package/dist/fn/roundDecimal.js +4 -1
- package/dist/fn/sanitize.js +8 -5
- package/dist/fn/search.js +18 -15
- package/dist/fn/selectElementText.js +4 -1
- package/dist/fn/selector.js +4 -1
- package/dist/fn/setCookie.js +4 -1
- package/dist/fn/setCssVar.js +4 -1
- package/dist/fn/setNavigationVars.js +13 -10
- package/dist/fn/setProp.js +4 -1
- package/dist/fn/setProperty.js +6 -3
- package/dist/fn/shorten.js +8 -5
- package/dist/fn/shortenObj.js +12 -9
- package/dist/fn/shuffle.js +4 -1
- package/dist/fn/simpleHash.js +8 -5
- package/dist/fn/simpleHash1.js +4 -1
- package/dist/fn/simpleHash2.js +4 -1
- package/dist/fn/stat.js +4 -1
- package/dist/fn/string2ArrayBuffer.js +4 -1
- package/dist/fn/submit.js +9 -6
- package/dist/fn/substr.js +10 -7
- package/dist/fn/sum.js +7 -4
- package/dist/fn/timestamp.js +4 -1
- package/dist/fn/toCSV.js +11 -8
- package/dist/fn/toggleFullScreen.js +6 -3
- package/dist/fn/translate.js +6 -3
- package/dist/fn/treatAjaxArguments.js +13 -10
- package/dist/fn/trim.js +7 -4
- package/dist/fn/uniqString.js +10 -7
- package/dist/fn/unique.js +4 -1
- package/dist/fn/upload.js +33 -6
- package/dist/fn/warning.js +6 -3
- package/dist/index.d.ts +4 -4
- package/dist/index.js +471 -459
- package/package.json +1 -1
package/dist/fn/init.js
CHANGED
|
@@ -1,24 +1,51 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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");
|
|
13
40
|
const init = function (cfg, force) {
|
|
14
41
|
let parts;
|
|
15
42
|
if (!bbn.env.isInit || force) {
|
|
16
43
|
bbn.env.root = document.baseURI.length > 0 ? document.baseURI : bbn.env.host;
|
|
17
|
-
if (bbn.env.root.length && substr(bbn.env.root, -1) !== '/') {
|
|
44
|
+
if (bbn.env.root.length && (0, substr_1.substr)(bbn.env.root, -1) !== '/') {
|
|
18
45
|
bbn.env.root += '/';
|
|
19
46
|
}
|
|
20
47
|
if (!bbn.env.isInit && typeof dayjs !== 'undefined') {
|
|
21
|
-
each([
|
|
48
|
+
(0, each_1.each)([
|
|
22
49
|
'advancedFormat',
|
|
23
50
|
'arraySupport',
|
|
24
51
|
'badMutable',
|
|
@@ -60,19 +87,19 @@ const init = function (cfg, force) {
|
|
|
60
87
|
}
|
|
61
88
|
/* The server's path (difference between the host and the current dir */
|
|
62
89
|
if (typeof cfg === 'object') {
|
|
63
|
-
extend(true, bbn, cfg);
|
|
90
|
+
(0, extend_1.extend)(true, bbn, cfg);
|
|
64
91
|
}
|
|
65
|
-
bbn.env.path = substr(bbn.env.url, bbn.env.root.length);
|
|
92
|
+
bbn.env.path = (0, substr_1.substr)(bbn.env.url, bbn.env.root.length);
|
|
66
93
|
parts = bbn.env.path.split('/');
|
|
67
94
|
//$.each(parts, function(i, v){
|
|
68
|
-
each(parts, (v, i) => {
|
|
95
|
+
(0, each_1.each)(parts, (v, i) => {
|
|
69
96
|
v = decodeURI(v.trim());
|
|
70
97
|
if (v !== '') {
|
|
71
98
|
bbn.env.params.push(v);
|
|
72
99
|
}
|
|
73
100
|
});
|
|
74
101
|
if (bbn.vars.colors) {
|
|
75
|
-
addColors(bbn.vars.colors);
|
|
102
|
+
(0, addColors_1.addColors)(bbn.vars.colors);
|
|
76
103
|
}
|
|
77
104
|
if (bbn.env.lang && undefined !== dayjs) {
|
|
78
105
|
dayjs.locale(bbn.env.lang);
|
|
@@ -114,28 +141,28 @@ const init = function (cfg, force) {
|
|
|
114
141
|
if (target instanceof HTMLElement && target.hasAttribute('href') && !target.hasAttribute('target') && !target.classList.contains('bbn-no')) {
|
|
115
142
|
e.preventDefault();
|
|
116
143
|
e.stopPropagation();
|
|
117
|
-
link(target.getAttribute('href'));
|
|
144
|
+
(0, link_1.link)(target.getAttribute('href'));
|
|
118
145
|
return false;
|
|
119
146
|
}
|
|
120
147
|
});
|
|
121
|
-
each(document.querySelectorAll('form:not(.bbn-no), form:not(.bbn-form)'), (ele) => {
|
|
148
|
+
(0, each_1.each)(document.querySelectorAll('form:not(.bbn-no), form:not(.bbn-form)'), (ele) => {
|
|
122
149
|
ele.addEventListener('submit', (e) => {
|
|
123
|
-
submit(ele, e);
|
|
150
|
+
(0, submit_1.submit)(ele, e);
|
|
124
151
|
});
|
|
125
152
|
});
|
|
126
153
|
window.addEventListener('hashchange', () => {
|
|
127
154
|
bbn.env.hashChanged = new Date().getTime();
|
|
128
155
|
}, false);
|
|
129
156
|
window.addEventListener('resize', () => {
|
|
130
|
-
resize();
|
|
157
|
+
(0, resize_1.resize)();
|
|
131
158
|
});
|
|
132
159
|
window.addEventListener('orientationchange', () => {
|
|
133
|
-
resize();
|
|
160
|
+
(0, resize_1.resize)();
|
|
134
161
|
});
|
|
135
|
-
resize();
|
|
136
|
-
if (isMobile()) {
|
|
162
|
+
(0, resize_1.resize)();
|
|
163
|
+
if ((0, isMobile_1.isMobile)()) {
|
|
137
164
|
document.body.classList.add('bbn-mobile');
|
|
138
|
-
if (isTabletDevice()) {
|
|
165
|
+
if ((0, isTabletDevice_1.isTabletDevice)()) {
|
|
139
166
|
document.body.classList.add('bbn-tablet');
|
|
140
167
|
}
|
|
141
168
|
}
|
|
@@ -146,11 +173,11 @@ const init = function (cfg, force) {
|
|
|
146
173
|
//e.preventDefault();
|
|
147
174
|
let state = h.state;
|
|
148
175
|
if (state) {
|
|
149
|
-
if (defaultHistoryFunction(state)) {
|
|
176
|
+
if ((0, defaultHistoryFunction_1.defaultHistoryFunction)(state)) {
|
|
150
177
|
//link(substr(state.url, bbn.env.root.length), $.extend({title: state.title}, state.data));
|
|
151
|
-
link(state.url, extend({ title: state.title || bbn.env.siteTitle }, state.data || {}));
|
|
178
|
+
(0, link_1.link)(state.url, (0, extend_1.extend)({ title: state.title || bbn.env.siteTitle }, state.data || {}));
|
|
152
179
|
}
|
|
153
|
-
else if (state && state.data && isFunction(state.data.script)) {
|
|
180
|
+
else if (state && state.data && (0, isFunction_1.isFunction)(state.data.script)) {
|
|
154
181
|
state.data.script();
|
|
155
182
|
}
|
|
156
183
|
}
|
|
@@ -160,8 +187,8 @@ const init = function (cfg, force) {
|
|
|
160
187
|
bbn.env.isInit = true;
|
|
161
188
|
document.dispatchEvent(new Event('bbninit'));
|
|
162
189
|
if (bbn.env.logging) {
|
|
163
|
-
log('Logging in bbn is enabled');
|
|
190
|
+
(0, log_1.log)('Logging in bbn is enabled');
|
|
164
191
|
}
|
|
165
192
|
}
|
|
166
193
|
};
|
|
167
|
-
|
|
194
|
+
exports.init = init;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isActiveInterface = void 0;
|
|
1
4
|
const isActiveInterface = function (secs = 600) {
|
|
2
5
|
if (!bbn.env.last_focus) {
|
|
3
6
|
return false;
|
|
@@ -5,4 +8,4 @@ const isActiveInterface = function (secs = 600) {
|
|
|
5
8
|
let t = new Date().getTime();
|
|
6
9
|
return t - bbn.env.last_focus < secs * 1000;
|
|
7
10
|
};
|
|
8
|
-
|
|
11
|
+
exports.isActiveInterface = isActiveInterface;
|
package/dist/fn/isArray.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isArray = void 0;
|
|
1
4
|
const isArray = function (...args) {
|
|
2
5
|
if (!args.length)
|
|
3
6
|
return false;
|
|
@@ -8,4 +11,4 @@ const isArray = function (...args) {
|
|
|
8
11
|
}
|
|
9
12
|
return true;
|
|
10
13
|
};
|
|
11
|
-
|
|
14
|
+
exports.isArray = isArray;
|
package/dist/fn/isBlob.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isBlob = void 0;
|
|
1
4
|
const isBlob = function (...args) {
|
|
2
5
|
if (!args.length)
|
|
3
6
|
return false;
|
|
@@ -8,4 +11,4 @@ const isBlob = function (...args) {
|
|
|
8
11
|
}
|
|
9
12
|
return true;
|
|
10
13
|
};
|
|
11
|
-
|
|
14
|
+
exports.isBlob = isBlob;
|
package/dist/fn/isBoolean.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isBoolean = void 0;
|
|
1
4
|
const isBoolean = function (...args) {
|
|
2
5
|
if (!args.length)
|
|
3
6
|
return false;
|
|
@@ -8,4 +11,4 @@ const isBoolean = function (...args) {
|
|
|
8
11
|
}
|
|
9
12
|
return true;
|
|
10
13
|
};
|
|
11
|
-
|
|
14
|
+
exports.isBoolean = isBoolean;
|
package/dist/fn/isCanvas.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isCanvas = void 0;
|
|
1
4
|
const isCanvas = function (...args) {
|
|
2
5
|
if (!args.length)
|
|
3
6
|
return false;
|
|
@@ -8,4 +11,4 @@ const isCanvas = function (...args) {
|
|
|
8
11
|
}
|
|
9
12
|
return true;
|
|
10
13
|
};
|
|
11
|
-
|
|
14
|
+
exports.isCanvas = isCanvas;
|
package/dist/fn/isColor.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isColor = void 0;
|
|
4
|
+
const isString_1 = require("./isString");
|
|
2
5
|
const isColor = function (...args) {
|
|
3
6
|
if (!args.length)
|
|
4
7
|
return false;
|
|
5
8
|
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');
|
|
6
9
|
for (let st of args) {
|
|
7
|
-
if (!isString(st)) {
|
|
10
|
+
if (!(0, isString_1.isString)(st)) {
|
|
8
11
|
return false;
|
|
9
12
|
}
|
|
10
13
|
if (!reg.test(st)) {
|
|
@@ -13,4 +16,4 @@ const isColor = function (...args) {
|
|
|
13
16
|
}
|
|
14
17
|
return true;
|
|
15
18
|
};
|
|
16
|
-
|
|
19
|
+
exports.isColor = isColor;
|
package/dist/fn/isComment.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isComment = void 0;
|
|
1
4
|
const isComment = function (...args) {
|
|
2
5
|
if (!args.length)
|
|
3
6
|
return false;
|
|
@@ -8,4 +11,4 @@ const isComment = function (...args) {
|
|
|
8
11
|
}
|
|
9
12
|
return true;
|
|
10
13
|
};
|
|
11
|
-
|
|
14
|
+
exports.isComment = isComment;
|
package/dist/fn/isCp.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isCp = void 0;
|
|
4
|
+
const isDom_1 = require("./isDom");
|
|
2
5
|
const isCp = function (...args) {
|
|
3
6
|
if (!args.length) {
|
|
4
7
|
return false;
|
|
@@ -6,7 +9,7 @@ const isCp = function (...args) {
|
|
|
6
9
|
if ('cp' in bbn && 'isComponent' in bbn['cp'] && (typeof bbn['cp'].isComponent === 'function')) {
|
|
7
10
|
for (let a of args) {
|
|
8
11
|
let res = bbn.cp.isComponent(a);
|
|
9
|
-
if (!res || isDom(res) || !res.$el) {
|
|
12
|
+
if (!res || (0, isDom_1.isDom)(res) || !res.$el) {
|
|
10
13
|
return false;
|
|
11
14
|
}
|
|
12
15
|
}
|
|
@@ -14,4 +17,4 @@ const isCp = function (...args) {
|
|
|
14
17
|
}
|
|
15
18
|
return true;
|
|
16
19
|
};
|
|
17
|
-
|
|
20
|
+
exports.isCp = isCp;
|
package/dist/fn/isDate.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isDate = void 0;
|
|
1
4
|
const isDate = function (...args) {
|
|
2
5
|
if (!args.length)
|
|
3
6
|
return false;
|
|
@@ -8,4 +11,4 @@ const isDate = function (...args) {
|
|
|
8
11
|
}
|
|
9
12
|
return true;
|
|
10
13
|
};
|
|
11
|
-
|
|
14
|
+
exports.isDate = isDate;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isDesktopDevice = void 0;
|
|
1
4
|
const isDesktopDevice = function () {
|
|
2
5
|
return this.getDeviceType() === 'desktop';
|
|
3
6
|
};
|
|
4
|
-
|
|
7
|
+
exports.isDesktopDevice = isDesktopDevice;
|
package/dist/fn/isDimension.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isDimension = void 0;
|
|
4
|
+
const isValidDimension_1 = require("./isValidDimension");
|
|
2
5
|
const isDimension = function (...args) {
|
|
3
6
|
if (!args.length)
|
|
4
7
|
return false;
|
|
@@ -6,10 +9,10 @@ const isDimension = function (...args) {
|
|
|
6
9
|
if ((typeof st !== 'number') || (st < 0)) {
|
|
7
10
|
return false;
|
|
8
11
|
}
|
|
9
|
-
if (!isValidDimension(st)) {
|
|
12
|
+
if (!(0, isValidDimension_1.isValidDimension)(st)) {
|
|
10
13
|
return false;
|
|
11
14
|
}
|
|
12
15
|
}
|
|
13
16
|
return true;
|
|
14
17
|
};
|
|
15
|
-
|
|
18
|
+
exports.isDimension = isDimension;
|
package/dist/fn/isDom.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isDom = void 0;
|
|
1
4
|
const isDom = function (...args) {
|
|
2
5
|
if (!args.length)
|
|
3
6
|
return false;
|
|
@@ -8,4 +11,4 @@ const isDom = function (...args) {
|
|
|
8
11
|
}
|
|
9
12
|
return true;
|
|
10
13
|
};
|
|
11
|
-
|
|
14
|
+
exports.isDom = isDom;
|
package/dist/fn/isEmail.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isEmail = void 0;
|
|
4
|
+
const isString_1 = require("./isString");
|
|
2
5
|
const isEmail = function (...args) {
|
|
3
6
|
if (!args.length)
|
|
4
7
|
return false;
|
|
5
8
|
let regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;
|
|
6
9
|
for (let st of args) {
|
|
7
|
-
if (!isString(st)) {
|
|
10
|
+
if (!(0, isString_1.isString)(st)) {
|
|
8
11
|
return false;
|
|
9
12
|
}
|
|
10
13
|
if (!regex.test(st)) {
|
|
@@ -13,4 +16,4 @@ const isEmail = function (...args) {
|
|
|
13
16
|
}
|
|
14
17
|
return true;
|
|
15
18
|
};
|
|
16
|
-
|
|
19
|
+
exports.isEmail = isEmail;
|
package/dist/fn/isEmpty.js
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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");
|
|
3
6
|
const isEmpty = function (obj) {
|
|
4
7
|
if (!obj) {
|
|
5
8
|
return true;
|
|
6
9
|
}
|
|
7
|
-
if (isArray(obj)) {
|
|
10
|
+
if ((0, isArray_1.isArray)(obj)) {
|
|
8
11
|
return obj.length ? false : true;
|
|
9
12
|
}
|
|
10
13
|
if (typeof obj === 'object') {
|
|
11
|
-
if (numProperties(obj)) {
|
|
14
|
+
if ((0, numProperties_1.numProperties)(obj)) {
|
|
12
15
|
return false;
|
|
13
16
|
}
|
|
14
17
|
return true;
|
|
15
18
|
}
|
|
16
19
|
return false;
|
|
17
20
|
};
|
|
18
|
-
|
|
21
|
+
exports.isEmpty = isEmpty;
|
package/dist/fn/isEvent.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isEvent = void 0;
|
|
1
4
|
const isEvent = function (...args) {
|
|
2
5
|
if (!args.length)
|
|
3
6
|
return false;
|
|
@@ -8,4 +11,4 @@ const isEvent = function (...args) {
|
|
|
8
11
|
}
|
|
9
12
|
return true;
|
|
10
13
|
};
|
|
11
|
-
|
|
14
|
+
exports.isEvent = isEvent;
|
package/dist/fn/isFocused.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isFocused = void 0;
|
|
1
4
|
const isFocused = function (ele, contain) {
|
|
2
5
|
return ele === document.activeElement || (contain && ele.contains && ele.contains(document.activeElement));
|
|
3
6
|
};
|
|
4
|
-
|
|
7
|
+
exports.isFocused = isFocused;
|
package/dist/fn/isFunction.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isFunction = void 0;
|
|
1
4
|
const isFunction = function (...args) {
|
|
2
5
|
if (!args.length)
|
|
3
6
|
return false;
|
|
@@ -8,4 +11,4 @@ const isFunction = function (...args) {
|
|
|
8
11
|
}
|
|
9
12
|
return true;
|
|
10
13
|
};
|
|
11
|
-
|
|
14
|
+
exports.isFunction = isFunction;
|
package/dist/fn/isHostname.js
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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");
|
|
3
6
|
const isHostname = function (...args) {
|
|
4
7
|
if (!args.length)
|
|
5
8
|
return false;
|
|
6
9
|
for (let st of args) {
|
|
7
|
-
if (!isString(st)) {
|
|
10
|
+
if (!(0, isString_1.isString)(st)) {
|
|
8
11
|
return false;
|
|
9
12
|
}
|
|
10
|
-
if (!isIP(st) && !bbn.vars.regexp.hostname.test(st)) {
|
|
13
|
+
if (!(0, isIP_1.isIP)(st) && !bbn.vars.regexp.hostname.test(st)) {
|
|
11
14
|
return false;
|
|
12
15
|
}
|
|
13
16
|
}
|
|
14
17
|
return true;
|
|
15
18
|
};
|
|
16
|
-
|
|
19
|
+
exports.isHostname = isHostname;
|
package/dist/fn/isIP.js
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isIP = void 0;
|
|
4
|
+
const isString_1 = require("./isString");
|
|
2
5
|
const isIP = function (...args) {
|
|
3
6
|
if (!args.length)
|
|
4
7
|
return false;
|
|
5
8
|
for (let st of args) {
|
|
6
|
-
if (!isString(st) || !bbn.vars.regexp.ip.test(st)) {
|
|
9
|
+
if (!(0, isString_1.isString)(st) || !bbn.vars.regexp.ip.test(st)) {
|
|
7
10
|
return false;
|
|
8
11
|
}
|
|
9
12
|
}
|
|
10
13
|
return true;
|
|
11
14
|
};
|
|
12
|
-
|
|
15
|
+
exports.isIP = isIP;
|
package/dist/fn/isInside.js
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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");
|
|
4
7
|
const isInside = function (ele, ancestor) {
|
|
5
|
-
let ancestors = getAncestors(ele);
|
|
8
|
+
let ancestors = (0, getAncestors_1.getAncestors)(ele);
|
|
6
9
|
if (ancestors.length) {
|
|
7
|
-
if (isString(ancestor)) {
|
|
10
|
+
if ((0, isString_1.isString)(ancestor)) {
|
|
8
11
|
let ok = false;
|
|
9
|
-
each(ancestors, (a) => {
|
|
12
|
+
(0, each_1.each)(ancestors, (a) => {
|
|
10
13
|
if (a.matches && a.matches(ancestor)) {
|
|
11
14
|
ok = true;
|
|
12
15
|
return false;
|
|
@@ -20,4 +23,4 @@ const isInside = function (ele, ancestor) {
|
|
|
20
23
|
}
|
|
21
24
|
return false;
|
|
22
25
|
};
|
|
23
|
-
|
|
26
|
+
exports.isInside = isInside;
|
package/dist/fn/isInt.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isInt = void 0;
|
|
1
4
|
const isInt = function (...args) {
|
|
2
5
|
if (!args.length)
|
|
3
6
|
return false;
|
|
@@ -8,4 +11,4 @@ const isInt = function (...args) {
|
|
|
8
11
|
}
|
|
9
12
|
return true;
|
|
10
13
|
};
|
|
11
|
-
|
|
14
|
+
exports.isInt = isInt;
|
package/dist/fn/isIterable.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isIterable = void 0;
|
|
1
4
|
const isIterable = function (v) {
|
|
2
5
|
return v && typeof v === 'object' && Symbol.iterator in Object(v);
|
|
3
6
|
};
|
|
4
|
-
|
|
7
|
+
exports.isIterable = isIterable;
|
package/dist/fn/isMobile.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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");
|
|
3
6
|
const isMobile = function () {
|
|
4
|
-
return isMobileDevice() || isTabletDevice();
|
|
7
|
+
return (0, isMobileDevice_1.isMobileDevice)() || (0, isTabletDevice_1.isTabletDevice)();
|
|
5
8
|
};
|
|
6
|
-
|
|
9
|
+
exports.isMobile = isMobile;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isMobileDevice = void 0;
|
|
1
4
|
const isMobileDevice = function () {
|
|
2
5
|
return this.getDeviceType() === 'mobile';
|
|
3
6
|
};
|
|
4
|
-
|
|
7
|
+
exports.isMobileDevice = isMobileDevice;
|
package/dist/fn/isNull.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isNull = void 0;
|
|
1
4
|
const isNull = function (...args) {
|
|
2
5
|
if (!args.length)
|
|
3
6
|
return false;
|
|
@@ -8,4 +11,4 @@ const isNull = function (...args) {
|
|
|
8
11
|
}
|
|
9
12
|
return true;
|
|
10
13
|
};
|
|
11
|
-
|
|
14
|
+
exports.isNull = isNull;
|
package/dist/fn/isNumber.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isNumber = void 0;
|
|
1
4
|
const isNumber = function (...args) {
|
|
2
5
|
if (!args.length)
|
|
3
6
|
return false;
|
|
@@ -8,4 +11,4 @@ const isNumber = function (...args) {
|
|
|
8
11
|
}
|
|
9
12
|
return true;
|
|
10
13
|
};
|
|
11
|
-
|
|
14
|
+
exports.isNumber = isNumber;
|
package/dist/fn/isObject.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isObject = void 0;
|
|
1
4
|
const isObject = function (...args) {
|
|
2
5
|
if (!args.length)
|
|
3
6
|
return false;
|
|
@@ -8,4 +11,4 @@ const isObject = function (...args) {
|
|
|
8
11
|
}
|
|
9
12
|
return true;
|
|
10
13
|
};
|
|
11
|
-
|
|
14
|
+
exports.isObject = isObject;
|
package/dist/fn/isPercent.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isPercent = void 0;
|
|
1
4
|
const isPercent = function (...args) {
|
|
2
5
|
if (!args.length)
|
|
3
6
|
return false;
|
|
@@ -8,4 +11,4 @@ const isPercent = function (...args) {
|
|
|
8
11
|
}
|
|
9
12
|
return true;
|
|
10
13
|
};
|
|
11
|
-
|
|
14
|
+
exports.isPercent = isPercent;
|
package/dist/fn/isPrimitive.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isPrimitive = void 0;
|
|
1
4
|
const isPrimitive = function (...args) {
|
|
2
5
|
if (!args.length)
|
|
3
6
|
return false;
|
|
@@ -8,4 +11,4 @@ const isPrimitive = function (...args) {
|
|
|
8
11
|
}
|
|
9
12
|
return true;
|
|
10
13
|
};
|
|
11
|
-
|
|
14
|
+
exports.isPrimitive = isPrimitive;
|
package/dist/fn/isPromise.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isPromise = void 0;
|
|
1
4
|
const isPromise = function (...args) {
|
|
2
5
|
if (!args.length)
|
|
3
6
|
return false;
|
|
@@ -8,4 +11,4 @@ const isPromise = function (...args) {
|
|
|
8
11
|
}
|
|
9
12
|
return true;
|
|
10
13
|
};
|
|
11
|
-
|
|
14
|
+
exports.isPromise = isPromise;
|
package/dist/fn/isPropSize.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isPropSize = void 0;
|
|
4
|
+
const each_1 = require("./each");
|
|
2
5
|
const isPropSize = function (name) {
|
|
3
6
|
let isTrue = false;
|
|
4
|
-
each(['width', 'height', 'gap', 'margin', 'padding', 'top', 'left', 'right', 'bottom'], (a) => {
|
|
7
|
+
(0, each_1.each)(['width', 'height', 'gap', 'margin', 'padding', 'top', 'left', 'right', 'bottom'], (a) => {
|
|
5
8
|
if (name.indexOf(a) !== -1) {
|
|
6
9
|
isTrue = true;
|
|
7
10
|
return false;
|
|
@@ -9,4 +12,4 @@ const isPropSize = function (name) {
|
|
|
9
12
|
});
|
|
10
13
|
return isTrue;
|
|
11
14
|
};
|
|
12
|
-
|
|
15
|
+
exports.isPropSize = isPropSize;
|