@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.
- package/dist/bundle.d.ts +6 -6
- package/dist/fn/_addLoader.js +3 -6
- package/dist/fn/_compareValues.js +11 -14
- package/dist/fn/_deleteLoader.js +7 -10
- package/dist/fn/abort.js +3 -6
- package/dist/fn/abortURL.js +4 -7
- package/dist/fn/addColors.js +5 -8
- package/dist/fn/addInputs.js +3 -6
- package/dist/fn/addStyle.js +5 -8
- package/dist/fn/adjustHeight.js +5 -8
- package/dist/fn/adjustSize.js +5 -8
- package/dist/fn/adjustWidth.js +5 -8
- package/dist/fn/ajax.js +31 -34
- package/dist/fn/analyzeFunction.js +3 -6
- package/dist/fn/animateCss.js +1 -4
- package/dist/fn/arrayBuffer2String.js +1 -4
- package/dist/fn/arrayFromProp.js +5 -8
- package/dist/fn/autoExtend.js +4 -7
- package/dist/fn/baseName.js +6 -9
- package/dist/fn/br2nl.js +3 -6
- package/dist/fn/calendar.js +14 -20
- package/dist/fn/callback.js +16 -19
- package/dist/fn/camelToCss.js +1 -4
- package/dist/fn/camelize.js +1 -4
- package/dist/fn/canvasToImage.js +1 -4
- package/dist/fn/center.js +1 -4
- package/dist/fn/checkProps.js +3 -6
- package/dist/fn/checkPropsDetails.js +9 -12
- package/dist/fn/checkPropsOrDie.js +3 -6
- package/dist/fn/checkType.js +16 -19
- package/dist/fn/chrono.js +3 -7
- package/dist/fn/circularReplacer.js +7 -10
- package/dist/fn/clone.js +7 -10
- package/dist/fn/colorToHex.js +1 -4
- package/dist/fn/compare.js +18 -21
- package/dist/fn/compareConditions.js +10 -13
- package/dist/fn/copy.js +4 -7
- package/dist/fn/correctCase.js +1 -4
- package/dist/fn/count.js +3 -6
- package/dist/fn/crc32.js +1 -4
- package/dist/fn/createObject.js +3 -6
- package/dist/fn/cssExists.js +3 -6
- package/dist/fn/date.js +8 -11
- package/dist/fn/dateSQL.js +5 -11
- package/dist/fn/daysInMonth.js +5 -11
- package/dist/fn/deepPath.js +7 -10
- package/dist/fn/defaultAjaxAbortFunction.js +3 -6
- package/dist/fn/defaultAjaxErrorFunction.js +1 -4
- package/dist/fn/defaultAlertFunction.js +1 -4
- package/dist/fn/defaultConfirmFunction.js +4 -7
- package/dist/fn/defaultEndLoadingFunction.js +1 -4
- package/dist/fn/defaultErrorFunction.js +3 -6
- package/dist/fn/defaultHistoryFunction.js +1 -4
- package/dist/fn/defaultLinkFunction.js +1 -4
- package/dist/fn/defaultPostLinkFunction.js +1 -4
- package/dist/fn/defaultPreLinkFunction.js +1 -4
- package/dist/fn/defaultResizeFunction.js +1 -4
- package/dist/fn/defaultStartLoadingFunction.js +1 -4
- package/dist/fn/deleteProp.js +4 -7
- package/dist/fn/diffObj.js +16 -19
- package/dist/fn/dirName.js +7 -10
- package/dist/fn/download.js +15 -18
- package/dist/fn/downloadContent.js +9 -12
- package/dist/fn/each.js +7 -10
- package/dist/fn/eraseCookie.js +1 -4
- package/dist/fn/error.js +3 -6
- package/dist/fn/escapeDquotes.js +3 -6
- package/dist/fn/escapeRegExp.js +1 -4
- package/dist/fn/escapeSquotes.js +3 -6
- package/dist/fn/escapeTicks.js +3 -6
- package/dist/fn/escapeUrl.js +8 -11
- package/dist/fn/extend.js +13 -16
- package/dist/fn/extendOut.js +4 -7
- package/dist/fn/fdate.js +12 -18
- package/dist/fn/fdatetime.js +10 -16
- package/dist/fn/fieldValue.js +1 -4
- package/dist/fn/fileExt.js +3 -6
- package/dist/fn/filter.js +12 -15
- package/dist/fn/filterToConditions.js +8 -11
- package/dist/fn/findAll.js +7 -10
- package/dist/fn/fori.js +6 -9
- package/dist/fn/forir.js +6 -9
- package/dist/fn/format.js +3 -6
- package/dist/fn/formatBytes.js +1 -4
- package/dist/fn/formatDate.js +3 -9
- package/dist/fn/formatSize.js +5 -8
- package/dist/fn/formdata.js +11 -14
- package/dist/fn/fromXml.js +1 -4
- package/dist/fn/ftime.js +12 -18
- package/dist/fn/getAllTags.js +3 -6
- package/dist/fn/getAncestors.js +1 -4
- package/dist/fn/getAttributes.js +3 -6
- package/dist/fn/getBrowserName.js +1 -4
- package/dist/fn/getBrowserVersion.js +1 -4
- package/dist/fn/getCookie.js +1 -4
- package/dist/fn/getCssVar.js +1 -4
- package/dist/fn/getDay.js +3 -6
- package/dist/fn/getDeviceType.js +1 -4
- package/dist/fn/getEventData.js +7 -10
- package/dist/fn/getField.js +3 -6
- package/dist/fn/getFieldValues.js +7 -10
- package/dist/fn/getHTMLOfSelection.js +4 -7
- package/dist/fn/getHtml.js +3 -6
- package/dist/fn/getLoader.js +3 -6
- package/dist/fn/getPath.js +3 -6
- package/dist/fn/getProp.js +4 -7
- package/dist/fn/getProperty.js +1 -4
- package/dist/fn/getRequestId.js +5 -8
- package/dist/fn/getRow.js +3 -6
- package/dist/fn/getScrollBarSize.js +1 -4
- package/dist/fn/getText.js +1 -4
- package/dist/fn/getTimeoff.js +1 -4
- package/dist/fn/happy.js +3 -6
- package/dist/fn/hash.js +11 -14
- package/dist/fn/hex2rgb.js +1 -4
- package/dist/fn/history.js +1 -4
- package/dist/fn/html2text.js +1 -4
- package/dist/fn/imageToCanvas.js +1 -4
- package/dist/fn/imgToBase64.js +3 -6
- package/dist/fn/info.js +3 -6
- package/dist/fn/init.js +32 -58
- package/dist/fn/isActiveInterface.js +1 -4
- package/dist/fn/isArray.js +1 -4
- package/dist/fn/isBlob.js +1 -4
- package/dist/fn/isBoolean.js +1 -4
- package/dist/fn/isCanvas.js +1 -4
- package/dist/fn/isColor.js +3 -6
- package/dist/fn/isComment.js +1 -4
- package/dist/fn/isCp.js +3 -6
- package/dist/fn/isDate.js +1 -4
- package/dist/fn/isDesktopDevice.js +1 -4
- package/dist/fn/isDimension.js +3 -6
- package/dist/fn/isDom.js +1 -4
- package/dist/fn/isEmail.js +3 -6
- package/dist/fn/isEmpty.js +5 -8
- package/dist/fn/isEvent.js +1 -4
- package/dist/fn/isFocused.js +1 -4
- package/dist/fn/isFunction.js +1 -4
- package/dist/fn/isHostname.js +5 -8
- package/dist/fn/isIP.js +3 -6
- package/dist/fn/isInside.js +7 -10
- package/dist/fn/isInt.js +1 -4
- package/dist/fn/isIterable.js +1 -4
- package/dist/fn/isMobile.js +4 -7
- package/dist/fn/isMobileDevice.js +1 -4
- package/dist/fn/isNull.js +1 -4
- package/dist/fn/isNumber.js +1 -4
- package/dist/fn/isObject.js +1 -4
- package/dist/fn/isPercent.js +1 -4
- package/dist/fn/isPrimitive.js +1 -4
- package/dist/fn/isPromise.js +1 -4
- package/dist/fn/isPropSize.js +3 -6
- package/dist/fn/isSQLDate.js +1 -4
- package/dist/fn/isSame.js +5 -8
- package/dist/fn/isString.js +1 -4
- package/dist/fn/isSymbol.js +1 -4
- package/dist/fn/isTabletDevice.js +1 -4
- package/dist/fn/isURL.js +1 -4
- package/dist/fn/isValidDimension.js +4 -7
- package/dist/fn/isValidName.js +3 -6
- package/dist/fn/isValue.js +3 -6
- package/dist/fn/isVue.js +1 -4
- package/dist/fn/iterate.js +5 -8
- package/dist/fn/lightenDarkenHex.js +1 -4
- package/dist/fn/link.js +19 -22
- package/dist/fn/log.js +3 -6
- package/dist/fn/makeReactive.js +28 -31
- package/dist/fn/map.js +3 -6
- package/dist/fn/md5.js +1 -4
- package/dist/fn/money.js +3 -6
- package/dist/fn/move.js +1 -4
- package/dist/fn/multiorder.js +3 -6
- package/dist/fn/nl2br.js +3 -6
- package/dist/fn/numProperties.js +1 -4
- package/dist/fn/objectToFormData.js +12 -15
- package/dist/fn/order.js +3 -6
- package/dist/fn/outerHeight.js +3 -6
- package/dist/fn/outerWidth.js +3 -6
- package/dist/fn/percent.js +1 -4
- package/dist/fn/pickValue.js +1 -4
- package/dist/fn/post.js +7 -10
- package/dist/fn/postOut.js +5 -8
- package/dist/fn/printf.js +1 -4
- package/dist/fn/quotes2html.js +4 -7
- package/dist/fn/randomInt.js +1 -4
- package/dist/fn/randomString.js +4 -7
- package/dist/fn/removeAccents.js +5 -8
- package/dist/fn/removeEmpty.js +8 -11
- package/dist/fn/removeExtraSpaces.js +1 -4
- package/dist/fn/removeHtmlComments.js +3 -6
- package/dist/fn/removePrivateProp.js +3 -6
- package/dist/fn/removeTrailingChars.js +6 -9
- package/dist/fn/repeat.js +1 -4
- package/dist/fn/replaceAll.js +4 -7
- package/dist/fn/replaceSelection.js +1 -4
- package/dist/fn/resize.js +7 -10
- package/dist/fn/rgb2hex.js +1 -4
- package/dist/fn/riterate.js +3 -6
- package/dist/fn/roundDecimal.js +1 -4
- package/dist/fn/sanitize.js +5 -8
- package/dist/fn/search.js +15 -18
- package/dist/fn/selectElementText.js +1 -4
- package/dist/fn/selector.js +1 -4
- package/dist/fn/setCookie.js +1 -4
- package/dist/fn/setCssVar.js +1 -4
- package/dist/fn/setNavigationVars.js +10 -13
- package/dist/fn/setProp.js +1 -4
- package/dist/fn/setProperty.js +3 -6
- package/dist/fn/shorten.js +5 -8
- package/dist/fn/shortenObj.js +9 -12
- package/dist/fn/shuffle.js +1 -4
- package/dist/fn/simpleHash.js +5 -8
- package/dist/fn/simpleHash1.js +1 -4
- package/dist/fn/simpleHash2.js +1 -4
- package/dist/fn/stat.js +1 -4
- package/dist/fn/string2ArrayBuffer.js +1 -4
- package/dist/fn/submit.js +6 -9
- package/dist/fn/substr.js +7 -10
- package/dist/fn/sum.js +4 -7
- package/dist/fn/timestamp.js +1 -4
- package/dist/fn/toCSV.js +8 -11
- package/dist/fn/toggleFullScreen.js +3 -6
- package/dist/fn/translate.js +3 -6
- package/dist/fn/treatAjaxArguments.js +10 -13
- package/dist/fn/trim.js +4 -7
- package/dist/fn/uniqString.js +7 -10
- package/dist/fn/unique.js +1 -4
- package/dist/fn/upload.js +7 -33
- package/dist/fn/warning.js +3 -6
- package/dist/index.js +459 -471
- package/package.json +1 -1
package/dist/fn/init.js
CHANGED
|
@@ -1,51 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
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 &&
|
|
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
|
-
|
|
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
|
-
|
|
64
|
+
extend(true, bbn, cfg);
|
|
91
65
|
}
|
|
92
|
-
bbn.env.path =
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
118
|
+
link(target.getAttribute('href'));
|
|
145
119
|
return false;
|
|
146
120
|
}
|
|
147
121
|
});
|
|
148
|
-
|
|
122
|
+
each(document.querySelectorAll('form:not(.bbn-no), form:not(.bbn-form)'), (ele) => {
|
|
149
123
|
ele.addEventListener('submit', (e) => {
|
|
150
|
-
|
|
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
|
-
|
|
131
|
+
resize();
|
|
158
132
|
});
|
|
159
133
|
window.addEventListener('orientationchange', () => {
|
|
160
|
-
|
|
134
|
+
resize();
|
|
161
135
|
});
|
|
162
|
-
|
|
163
|
-
if (
|
|
136
|
+
resize();
|
|
137
|
+
if (isMobile()) {
|
|
164
138
|
document.body.classList.add('bbn-mobile');
|
|
165
|
-
if (
|
|
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 (
|
|
150
|
+
if (defaultHistoryFunction(state)) {
|
|
177
151
|
//link(substr(state.url, bbn.env.root.length), $.extend({title: state.title}, state.data));
|
|
178
|
-
|
|
152
|
+
link(state.url, extend({ title: state.title || bbn.env.siteTitle }, state.data || {}));
|
|
179
153
|
}
|
|
180
|
-
else if (state && state.data &&
|
|
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
|
-
|
|
164
|
+
log('Logging in bbn is enabled');
|
|
191
165
|
}
|
|
192
166
|
}
|
|
193
167
|
};
|
|
194
|
-
|
|
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
|
-
|
|
8
|
+
export { isActiveInterface };
|
package/dist/fn/isArray.js
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
11
|
+
export { isBlob };
|
package/dist/fn/isBoolean.js
CHANGED
|
@@ -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
|
-
|
|
11
|
+
export { isBoolean };
|
package/dist/fn/isCanvas.js
CHANGED
|
@@ -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
|
-
|
|
11
|
+
export { isCanvas };
|
package/dist/fn/isColor.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
|
|
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 (!
|
|
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
|
-
|
|
16
|
+
export { isColor };
|
package/dist/fn/isComment.js
CHANGED
|
@@ -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
|
-
|
|
11
|
+
export { isComment };
|
package/dist/fn/isCp.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
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 ||
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
4
|
+
export { isDesktopDevice };
|
package/dist/fn/isDimension.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
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 (!
|
|
9
|
+
if (!isValidDimension(st)) {
|
|
13
10
|
return false;
|
|
14
11
|
}
|
|
15
12
|
}
|
|
16
13
|
return true;
|
|
17
14
|
};
|
|
18
|
-
|
|
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
|
-
|
|
11
|
+
export { isDom };
|
package/dist/fn/isEmail.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
|
|
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 (!
|
|
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
|
-
|
|
16
|
+
export { isEmail };
|
package/dist/fn/isEmpty.js
CHANGED
|
@@ -1,21 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 (
|
|
7
|
+
if (isArray(obj)) {
|
|
11
8
|
return obj.length ? false : true;
|
|
12
9
|
}
|
|
13
10
|
if (typeof obj === 'object') {
|
|
14
|
-
if (
|
|
11
|
+
if (numProperties(obj)) {
|
|
15
12
|
return false;
|
|
16
13
|
}
|
|
17
14
|
return true;
|
|
18
15
|
}
|
|
19
16
|
return false;
|
|
20
17
|
};
|
|
21
|
-
|
|
18
|
+
export { isEmpty };
|
package/dist/fn/isEvent.js
CHANGED
|
@@ -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
|
-
|
|
11
|
+
export { isEvent };
|
package/dist/fn/isFocused.js
CHANGED
|
@@ -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
|
-
|
|
4
|
+
export { isFocused };
|
package/dist/fn/isFunction.js
CHANGED
|
@@ -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
|
-
|
|
11
|
+
export { isFunction };
|
package/dist/fn/isHostname.js
CHANGED
|
@@ -1,19 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 (!
|
|
7
|
+
if (!isString(st)) {
|
|
11
8
|
return false;
|
|
12
9
|
}
|
|
13
|
-
if (!
|
|
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
|
-
|
|
16
|
+
export { isHostname };
|
package/dist/fn/isIP.js
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
|
|
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 (!
|
|
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
|
-
|
|
12
|
+
export { isIP };
|
package/dist/fn/isInside.js
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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 =
|
|
5
|
+
let ancestors = getAncestors(ele);
|
|
9
6
|
if (ancestors.length) {
|
|
10
|
-
if (
|
|
7
|
+
if (isString(ancestor)) {
|
|
11
8
|
let ok = false;
|
|
12
|
-
|
|
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
|
-
|
|
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
|
-
|
|
11
|
+
export { isInt };
|
package/dist/fn/isIterable.js
CHANGED
|
@@ -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
|
-
|
|
4
|
+
export { isIterable };
|
package/dist/fn/isMobile.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
|
4
|
+
return isMobileDevice() || isTabletDevice();
|
|
8
5
|
};
|
|
9
|
-
|
|
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
|
-
|
|
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
|
-
|
|
11
|
+
export { isNull };
|
package/dist/fn/isNumber.js
CHANGED
|
@@ -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
|
-
|
|
11
|
+
export { isNumber };
|
package/dist/fn/isObject.js
CHANGED
|
@@ -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
|
-
|
|
11
|
+
export { isObject };
|
package/dist/fn/isPercent.js
CHANGED
|
@@ -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
|
-
|
|
11
|
+
export { isPercent };
|
package/dist/fn/isPrimitive.js
CHANGED
|
@@ -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
|
-
|
|
11
|
+
export { isPrimitive };
|
package/dist/fn/isPromise.js
CHANGED
|
@@ -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
|
-
|
|
11
|
+
export { isPromise };
|
package/dist/fn/isPropSize.js
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
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
|
-
|
|
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
|
-
|
|
12
|
+
export { isPropSize };
|