jk-vue-comps 0.1.0
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/README.md +3 -0
- package/dist/chunks/index-BP9Q78TM.js +13 -0
- package/dist/chunks/index-CA5i_Cgq.js +104 -0
- package/dist/chunks/is-bvgc5qxU.js +153 -0
- package/dist/chunks/timeZone-CYGfhbdm.js +843 -0
- package/dist/chunks/useDomId-D5qLoFSQ.js +8 -0
- package/dist/chunks/vuePropTypes-zy5Iwonj.js +34 -0
- package/dist/chunks/withInstall-b5j1glXj.js +14 -0
- package/dist/components/GoogleAuth.js +81 -0
- package/dist/components/TelegramAuth.js +99 -0
- package/dist/components/index.js +9 -0
- package/dist/index.js +63 -0
- package/dist/types/components/GoogleAuth.d.ts +107 -0
- package/dist/types/components/TelegramAuth.d.ts +105 -0
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/hooks/useDomId.d.ts +1 -0
- package/dist/types/index.d.ts +248 -0
- package/dist/types/utils/index.d.ts +24 -0
- package/dist/types/utils/is.d.ts +59 -0
- package/dist/types/utils/timeZone.d.ts +9 -0
- package/dist/types/utils/vuePropTypes.d.ts +65 -0
- package/dist/types/utils/withInstall.d.ts +3 -0
- package/dist/utils/index.js +48 -0
- package/dist/utils/is.js +33 -0
- package/dist/utils/timeZone.js +4 -0
- package/dist/utils/vuePropTypes.js +6 -0
- package/dist/utils/withInstall.js +4 -0
- package/package.json +91 -0
package/README.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { GoogleAuth as e, toGoogleAuth as o } from "../components/GoogleAuth.js";
|
|
2
|
+
import { TelegramAuth as t, getTelegramAuthUrlParams as r, toTelegramAuth as l } from "../components/TelegramAuth.js";
|
|
3
|
+
const g = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4
|
+
__proto__: null,
|
|
5
|
+
GoogleAuth: e,
|
|
6
|
+
TelegramAuth: t,
|
|
7
|
+
getTelegramAuthUrlParams: r,
|
|
8
|
+
toGoogleAuth: o,
|
|
9
|
+
toTelegramAuth: l
|
|
10
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
11
|
+
export {
|
|
12
|
+
g as c
|
|
13
|
+
};
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { nextTick as p, createVNode as g } from "vue";
|
|
2
|
+
import { E as d, j as l, D as u, i as m, n as w, l as b, v as h, d as $, a as y, C as O, s as v, y as S, o as U, k as x, A as I, x as N, t as P, e as E, f as T, g as D, h as j, c as k, p as B, q as H, m as L, u as M, b as _, w as q, z, r as A, B as F } from "./is-bvgc5qxU.js";
|
|
3
|
+
import { a as R, p as Z } from "./vuePropTypes-zy5Iwonj.js";
|
|
4
|
+
import { a as C, t as V } from "./timeZone-CYGfhbdm.js";
|
|
5
|
+
import { a as W, w as G } from "./withInstall-b5j1glXj.js";
|
|
6
|
+
const J = { is: d, propTypes: R, timeZone: C, withInstall: W };
|
|
7
|
+
function o(e) {
|
|
8
|
+
try {
|
|
9
|
+
return new Function(`'use strict'; return (${e});`)();
|
|
10
|
+
} catch {
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
function c(e, t = "float", i = 6) {
|
|
15
|
+
let s = String(e);
|
|
16
|
+
if (s = s.replace(/(^\s*)|(\s*$)/g, ""), s !== "") {
|
|
17
|
+
const a = s.indexOf("0") === 0 && s.length > 1 && s.indexOf(".") !== 1, n = t === "int" ? /[^\d]/g : /[^\d.]/g;
|
|
18
|
+
if (s = s.replace(n, ""), a)
|
|
19
|
+
return "0";
|
|
20
|
+
if (t === "int")
|
|
21
|
+
s = s.indexOf("0") === 0 && s.length > 1 ? s.substring(0, s.length - 1) : s;
|
|
22
|
+
else {
|
|
23
|
+
const r = o(`/\\.{${i},}/g`), f = o(`/^(\\d?)+(\\.\\d{0,${i}})?$/`);
|
|
24
|
+
s.indexOf(".") === 0 ? (s = "", s = s.replace(/[^$#$]/g, "0."), s = s.replace(r, ".")) : f.test(s) || (s = s.substring(0, s.length - 1));
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return s;
|
|
28
|
+
}
|
|
29
|
+
function K(e, t, i, s = "int", a = 6) {
|
|
30
|
+
return (n) => {
|
|
31
|
+
p().then(() => {
|
|
32
|
+
var r;
|
|
33
|
+
e[t] = c((r = n == null ? void 0 : n.target) == null ? void 0 : r.value, s, a), i == null || i();
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
function Q(e) {
|
|
38
|
+
return !l(e) || !u(e) ? e : g("div", { innerHTML: e });
|
|
39
|
+
}
|
|
40
|
+
function X() {
|
|
41
|
+
return window ? `${window.location.protocol}//${window.location.hostname}` : "";
|
|
42
|
+
}
|
|
43
|
+
function Y() {
|
|
44
|
+
const e = new URLSearchParams(window.location.search);
|
|
45
|
+
if (!e.size)
|
|
46
|
+
return;
|
|
47
|
+
const t = {};
|
|
48
|
+
for (const [i, s] of e.entries())
|
|
49
|
+
t[i] = s;
|
|
50
|
+
return t;
|
|
51
|
+
}
|
|
52
|
+
const rs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
53
|
+
__proto__: null,
|
|
54
|
+
Utils: J,
|
|
55
|
+
evalPro: o,
|
|
56
|
+
filterInputNum: c,
|
|
57
|
+
generateHandleInputFn: K,
|
|
58
|
+
getRouterParams: Y,
|
|
59
|
+
getWebsiteUrl: X,
|
|
60
|
+
is: m,
|
|
61
|
+
isArray: w,
|
|
62
|
+
isBoolean: b,
|
|
63
|
+
isClient: h,
|
|
64
|
+
isDate: $,
|
|
65
|
+
isDef: y,
|
|
66
|
+
isEdgeBrowser: O,
|
|
67
|
+
isElement: v,
|
|
68
|
+
isEmail: S,
|
|
69
|
+
isEmpty: U,
|
|
70
|
+
isFunction: x,
|
|
71
|
+
isHtmlStr: u,
|
|
72
|
+
isInMobileBrowser: I,
|
|
73
|
+
isIp: N,
|
|
74
|
+
isMap: P,
|
|
75
|
+
isNull: E,
|
|
76
|
+
isNullAndUnDef: T,
|
|
77
|
+
isNullOrUnDef: D,
|
|
78
|
+
isNumber: j,
|
|
79
|
+
isObject: k,
|
|
80
|
+
isPromise: B,
|
|
81
|
+
isPromiseLink: H,
|
|
82
|
+
isRegExp: L,
|
|
83
|
+
isServer: M,
|
|
84
|
+
isString: l,
|
|
85
|
+
isUnDef: _,
|
|
86
|
+
isUrl: q,
|
|
87
|
+
isValidPhoneNumber: z,
|
|
88
|
+
isWindow: A,
|
|
89
|
+
isZhLang: F,
|
|
90
|
+
propTypes: Z,
|
|
91
|
+
renderHtmlStr: Q,
|
|
92
|
+
timeZoneOptions: V,
|
|
93
|
+
withInstall: G
|
|
94
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
95
|
+
export {
|
|
96
|
+
J as U,
|
|
97
|
+
X as a,
|
|
98
|
+
Y as b,
|
|
99
|
+
o as e,
|
|
100
|
+
c as f,
|
|
101
|
+
K as g,
|
|
102
|
+
Q as r,
|
|
103
|
+
rs as u
|
|
104
|
+
};
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
function t(n, e) {
|
|
2
|
+
return Object.prototype.toString.call(n) === `[object ${e}]`;
|
|
3
|
+
}
|
|
4
|
+
function g(n) {
|
|
5
|
+
return typeof n < "u";
|
|
6
|
+
}
|
|
7
|
+
function a(n) {
|
|
8
|
+
return !g(n);
|
|
9
|
+
}
|
|
10
|
+
function i(n) {
|
|
11
|
+
return n !== null && t(n, "Object");
|
|
12
|
+
}
|
|
13
|
+
function l(n) {
|
|
14
|
+
return t(n, "Date");
|
|
15
|
+
}
|
|
16
|
+
function f(n) {
|
|
17
|
+
return n === null;
|
|
18
|
+
}
|
|
19
|
+
function m(n) {
|
|
20
|
+
return a(n) && f(n);
|
|
21
|
+
}
|
|
22
|
+
function y(n) {
|
|
23
|
+
return a(n) || f(n);
|
|
24
|
+
}
|
|
25
|
+
function A(n) {
|
|
26
|
+
return t(n, "Number");
|
|
27
|
+
}
|
|
28
|
+
function c(n) {
|
|
29
|
+
return t(n, "String");
|
|
30
|
+
}
|
|
31
|
+
function u(n) {
|
|
32
|
+
return typeof n == "function";
|
|
33
|
+
}
|
|
34
|
+
function h(n) {
|
|
35
|
+
return t(n, "Boolean");
|
|
36
|
+
}
|
|
37
|
+
function E(n) {
|
|
38
|
+
return t(n, "RegExp");
|
|
39
|
+
}
|
|
40
|
+
function p(n) {
|
|
41
|
+
return n && Array.isArray(n);
|
|
42
|
+
}
|
|
43
|
+
function P(n) {
|
|
44
|
+
return p(n) || c(n) ? n.length === 0 : n instanceof Map || n instanceof Set ? n.size === 0 : i(n) ? Object.keys(n).length === 0 : !1;
|
|
45
|
+
}
|
|
46
|
+
function S(n) {
|
|
47
|
+
return t(n, "Promise") && i(n) && u(n.then) && u(n.catch);
|
|
48
|
+
}
|
|
49
|
+
function N(n) {
|
|
50
|
+
return n instanceof Promise || typeof (n == null ? void 0 : n.then) == "function";
|
|
51
|
+
}
|
|
52
|
+
function O(n) {
|
|
53
|
+
return typeof window < "u" && t(n, "Window");
|
|
54
|
+
}
|
|
55
|
+
function _(n) {
|
|
56
|
+
return i(n) && !!n.tagName;
|
|
57
|
+
}
|
|
58
|
+
function j(n) {
|
|
59
|
+
return t(n, "Map");
|
|
60
|
+
}
|
|
61
|
+
const w = typeof window > "u", z = !w;
|
|
62
|
+
function D(n) {
|
|
63
|
+
return /^(((^https?:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?(\/#\/)?(?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)$/.test(n);
|
|
64
|
+
}
|
|
65
|
+
const M = (n) => /\b(?:\d{1,3}.){3}\d{1,3}\b/.test(n), Z = (n) => /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(n);
|
|
66
|
+
function $(n) {
|
|
67
|
+
const e = /^1[3456789]\d{9}$/, r = /^(\d{3,4}-)?\d{7,8}$/;
|
|
68
|
+
return !!(e.test(n) || r.test(n));
|
|
69
|
+
}
|
|
70
|
+
function x() {
|
|
71
|
+
return typeof navigator < "u" && navigator.userAgent.match(/Android|webOS|iPhone|iPad|iPod|BlackBerry|Windows Phone/i);
|
|
72
|
+
}
|
|
73
|
+
function B(n) {
|
|
74
|
+
var s, d;
|
|
75
|
+
const e = (d = (s = n == null ? void 0 : n.replace(/\s+/g, "")) == null ? void 0 : s.toUpperCase) == null ? void 0 : d.call(s), r = ["ZH-CN", "ZH_CH", "ZH"], b = ["EN", "EN-US"];
|
|
76
|
+
return r.some((o) => o === e) || !b.some((o) => o === e);
|
|
77
|
+
}
|
|
78
|
+
function U() {
|
|
79
|
+
var e;
|
|
80
|
+
if (navigator.userAgent.indexOf("Edge") > -1)
|
|
81
|
+
return !0;
|
|
82
|
+
const n = ((e = navigator == null ? void 0 : navigator.userAgentData) == null ? void 0 : e.brands) ?? [];
|
|
83
|
+
for (const r of n)
|
|
84
|
+
if ((r == null ? void 0 : r.brand) === "Microsoft Edge")
|
|
85
|
+
return !0;
|
|
86
|
+
return !1;
|
|
87
|
+
}
|
|
88
|
+
const C = (n) => c(n) && /<[^>]+>/g.test(n), H = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
89
|
+
__proto__: null,
|
|
90
|
+
is: t,
|
|
91
|
+
isArray: p,
|
|
92
|
+
isBoolean: h,
|
|
93
|
+
isClient: z,
|
|
94
|
+
isDate: l,
|
|
95
|
+
isDef: g,
|
|
96
|
+
isEdgeBrowser: U,
|
|
97
|
+
isElement: _,
|
|
98
|
+
isEmail: Z,
|
|
99
|
+
isEmpty: P,
|
|
100
|
+
isFunction: u,
|
|
101
|
+
isHtmlStr: C,
|
|
102
|
+
isInMobileBrowser: x,
|
|
103
|
+
isIp: M,
|
|
104
|
+
isMap: j,
|
|
105
|
+
isNull: f,
|
|
106
|
+
isNullAndUnDef: m,
|
|
107
|
+
isNullOrUnDef: y,
|
|
108
|
+
isNumber: A,
|
|
109
|
+
isObject: i,
|
|
110
|
+
isPromise: S,
|
|
111
|
+
isPromiseLink: N,
|
|
112
|
+
isRegExp: E,
|
|
113
|
+
isServer: w,
|
|
114
|
+
isString: c,
|
|
115
|
+
isUnDef: a,
|
|
116
|
+
isUrl: D,
|
|
117
|
+
isValidPhoneNumber: $,
|
|
118
|
+
isWindow: O,
|
|
119
|
+
isZhLang: B
|
|
120
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
121
|
+
export {
|
|
122
|
+
x as A,
|
|
123
|
+
B,
|
|
124
|
+
U as C,
|
|
125
|
+
C as D,
|
|
126
|
+
H as E,
|
|
127
|
+
g as a,
|
|
128
|
+
a as b,
|
|
129
|
+
i as c,
|
|
130
|
+
l as d,
|
|
131
|
+
f as e,
|
|
132
|
+
m as f,
|
|
133
|
+
y as g,
|
|
134
|
+
A as h,
|
|
135
|
+
t as i,
|
|
136
|
+
c as j,
|
|
137
|
+
u as k,
|
|
138
|
+
h as l,
|
|
139
|
+
E as m,
|
|
140
|
+
p as n,
|
|
141
|
+
P as o,
|
|
142
|
+
S as p,
|
|
143
|
+
N as q,
|
|
144
|
+
O as r,
|
|
145
|
+
_ as s,
|
|
146
|
+
j as t,
|
|
147
|
+
w as u,
|
|
148
|
+
z as v,
|
|
149
|
+
D as w,
|
|
150
|
+
M as x,
|
|
151
|
+
Z as y,
|
|
152
|
+
$ as z
|
|
153
|
+
};
|