jk-vue-comps 0.1.7 → 0.1.9
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/chunks/index-aaoImdl9.js +157 -0
- package/dist/components/GoogleAuth.js +4 -3
- package/dist/components/TelegramAuth.js +1 -1
- package/dist/index.d.ts +28 -1
- package/dist/index.js +73 -45
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/index.js +70 -42
- package/dist/utils/math.d.ts +107 -0
- package/dist/utils/math.js +821 -0
- package/package.json +12 -6
- package/dist/chunks/index-C_baUQWz.js +0 -129
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jk-vue-comps",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "jk-vue-comps",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -40,16 +40,21 @@
|
|
|
40
40
|
"require": "./dist/utils/is.js",
|
|
41
41
|
"types": "./dist/utils/is.d.ts"
|
|
42
42
|
},
|
|
43
|
-
"./dist/utils/
|
|
44
|
-
"import": "./dist/utils/
|
|
45
|
-
"require": "./dist/utils/
|
|
46
|
-
"types": "./dist/utils/
|
|
43
|
+
"./dist/utils/math": {
|
|
44
|
+
"import": "./dist/utils/math.js",
|
|
45
|
+
"require": "./dist/utils/math.js",
|
|
46
|
+
"types": "./dist/utils/math.d.ts"
|
|
47
47
|
},
|
|
48
48
|
"./dist/utils/timeZone": {
|
|
49
49
|
"import": "./dist/utils/timeZone.js",
|
|
50
50
|
"require": "./dist/utils/timeZone.js",
|
|
51
51
|
"types": "./dist/utils/timeZone.d.ts"
|
|
52
52
|
},
|
|
53
|
+
"./dist/utils/vuePropTypes": {
|
|
54
|
+
"import": "./dist/utils/vuePropTypes.js",
|
|
55
|
+
"require": "./dist/utils/vuePropTypes.js",
|
|
56
|
+
"types": "./dist/utils/vuePropTypes.d.ts"
|
|
57
|
+
},
|
|
53
58
|
"./dist/utils/withInstall": {
|
|
54
59
|
"import": "./dist/utils/withInstall.js",
|
|
55
60
|
"require": "./dist/utils/withInstall.js",
|
|
@@ -74,7 +79,8 @@
|
|
|
74
79
|
},
|
|
75
80
|
"dependencies": {
|
|
76
81
|
"vue": "^3.4.21",
|
|
77
|
-
"vue-types": "^5.1.2"
|
|
82
|
+
"vue-types": "^5.1.2",
|
|
83
|
+
"bignumber.js": "^9.1.1"
|
|
78
84
|
},
|
|
79
85
|
"devDependencies": {
|
|
80
86
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
import { nextTick as m, createVNode as w } from "vue";
|
|
2
|
-
import { isString as u, isHtmlStr as f, isObject as a, isNumber as c, is as h, isArray as S, isBoolean as x, isClient as $, isDate as b, isDef as O, isEdgeBrowser as P, isElement as N, isEmail as v, isEmpty as y, isFunction as U, isInMobileBrowser as E, isIp as I, isMap as M, isNull as k, isNullAndUnDef as D, isNullOrUnDef as F, isPromise as L, isPromiseLink as T, isRegExp as _, isServer as j, isUnDef as z, isUrl as B, isValidPhoneNumber as H, isWindow as R, isZhLang as W } from "../utils/is.js";
|
|
3
|
-
import { propTypes as q } from "../utils/vuePropTypes.js";
|
|
4
|
-
import { timeZoneOptions as A } from "../utils/timeZone.js";
|
|
5
|
-
import { withInstall as V } from "../utils/withInstall.js";
|
|
6
|
-
function l(i) {
|
|
7
|
-
try {
|
|
8
|
-
return new Function(`'use strict'; return (${i});`)();
|
|
9
|
-
} catch {
|
|
10
|
-
return null;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
function d(i, t = "float", n = 6) {
|
|
14
|
-
let e = String(i);
|
|
15
|
-
if (e = e.replace(/(^\s*)|(\s*$)/g, ""), e !== "") {
|
|
16
|
-
const s = e.indexOf("0") === 0 && e.length > 1 && e.indexOf(".") !== 1, r = t === "int" ? /[^\d]/g : /[^\d.]/g;
|
|
17
|
-
if (e = e.replace(r, ""), s)
|
|
18
|
-
return "0";
|
|
19
|
-
if (t === "int")
|
|
20
|
-
e = e.indexOf("0") === 0 && e.length > 1 ? e.substring(0, e.length - 1) : e;
|
|
21
|
-
else {
|
|
22
|
-
const o = l(`/\\.{${n},}/g`), p = l(`/^(\\d?)+(\\.\\d{0,${n}})?$/`);
|
|
23
|
-
e.indexOf(".") === 0 ? (e = "", e = e.replace(/[^$#$]/g, "0."), e = e.replace(o, ".")) : p.test(e) || (e = e.substring(0, e.length - 1));
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
return e;
|
|
27
|
-
}
|
|
28
|
-
function Z(i, t, n, e = "int", s = 6) {
|
|
29
|
-
return (r) => {
|
|
30
|
-
m().then(() => {
|
|
31
|
-
var o;
|
|
32
|
-
i[t] = d((o = r == null ? void 0 : r.target) == null ? void 0 : o.value, e, s), n == null || n();
|
|
33
|
-
});
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
function C(i) {
|
|
37
|
-
return !u(i) || !f(i) ? i : w("div", { innerHTML: i });
|
|
38
|
-
}
|
|
39
|
-
function G() {
|
|
40
|
-
return window ? `${window.location.protocol}//${window.location.hostname}` : "";
|
|
41
|
-
}
|
|
42
|
-
function J() {
|
|
43
|
-
const i = new URLSearchParams(window.location.search);
|
|
44
|
-
if (!i.size)
|
|
45
|
-
return;
|
|
46
|
-
const t = {};
|
|
47
|
-
for (const [n, e] of i.entries())
|
|
48
|
-
t[n] = e;
|
|
49
|
-
return t;
|
|
50
|
-
}
|
|
51
|
-
function K(i) {
|
|
52
|
-
return u(i) ? i.replace(/\s+/g, "") : "";
|
|
53
|
-
}
|
|
54
|
-
function g(i = {}, t = {}) {
|
|
55
|
-
let n;
|
|
56
|
-
for (n in t)
|
|
57
|
-
i[n] = a(i[n]) ? g(i[n], t[n]) : i[n] = t[n];
|
|
58
|
-
return i;
|
|
59
|
-
}
|
|
60
|
-
function Q(i, t = 6, n = {
|
|
61
|
-
showPrefix: !0,
|
|
62
|
-
showSuffix: !0,
|
|
63
|
-
middleStr: "****"
|
|
64
|
-
}) {
|
|
65
|
-
if (!u(i) || !c(i))
|
|
66
|
-
return i;
|
|
67
|
-
const e = String(i), s = (e == null ? void 0 : e.length) ?? 0;
|
|
68
|
-
if (!e || !s || t <= 0)
|
|
69
|
-
return e;
|
|
70
|
-
const r = n.showPrefix ? e.substring(0, t) : "", o = n.showSuffix ? e.substring(s - t) : "";
|
|
71
|
-
return `${r}${n.middleStr}${o}`;
|
|
72
|
-
}
|
|
73
|
-
const te = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
74
|
-
__proto__: null,
|
|
75
|
-
deepMerge: g,
|
|
76
|
-
desensitization: Q,
|
|
77
|
-
evalPro: l,
|
|
78
|
-
filterInputNum: d,
|
|
79
|
-
generateFilterInputNumFn: Z,
|
|
80
|
-
getRouterParams: J,
|
|
81
|
-
getWebsiteUrl: G,
|
|
82
|
-
is: h,
|
|
83
|
-
isArray: S,
|
|
84
|
-
isBoolean: x,
|
|
85
|
-
isClient: $,
|
|
86
|
-
isDate: b,
|
|
87
|
-
isDef: O,
|
|
88
|
-
isEdgeBrowser: P,
|
|
89
|
-
isElement: N,
|
|
90
|
-
isEmail: v,
|
|
91
|
-
isEmpty: y,
|
|
92
|
-
isFunction: U,
|
|
93
|
-
isHtmlStr: f,
|
|
94
|
-
isInMobileBrowser: E,
|
|
95
|
-
isIp: I,
|
|
96
|
-
isMap: M,
|
|
97
|
-
isNull: k,
|
|
98
|
-
isNullAndUnDef: D,
|
|
99
|
-
isNullOrUnDef: F,
|
|
100
|
-
isNumber: c,
|
|
101
|
-
isObject: a,
|
|
102
|
-
isPromise: L,
|
|
103
|
-
isPromiseLink: T,
|
|
104
|
-
isRegExp: _,
|
|
105
|
-
isServer: j,
|
|
106
|
-
isString: u,
|
|
107
|
-
isUnDef: z,
|
|
108
|
-
isUrl: B,
|
|
109
|
-
isValidPhoneNumber: H,
|
|
110
|
-
isWindow: R,
|
|
111
|
-
isZhLang: W,
|
|
112
|
-
propTypes: q,
|
|
113
|
-
removeWhitespace: K,
|
|
114
|
-
renderHtmlStr: C,
|
|
115
|
-
timeZoneOptions: A,
|
|
116
|
-
withInstall: V
|
|
117
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
118
|
-
export {
|
|
119
|
-
G as a,
|
|
120
|
-
J as b,
|
|
121
|
-
K as c,
|
|
122
|
-
g as d,
|
|
123
|
-
l as e,
|
|
124
|
-
d as f,
|
|
125
|
-
Z as g,
|
|
126
|
-
Q as h,
|
|
127
|
-
C as r,
|
|
128
|
-
te as u
|
|
129
|
-
};
|