jk-vue-comps 0.1.18 → 0.2.1
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-DbH4ILBY.js → index-DiBTCIdi.js} +4 -4
- package/dist/components/GoogleAuth.d.ts +55 -51
- package/dist/components/GoogleAuth.js +84 -56
- package/dist/components/TelegramAuth.d.ts +49 -49
- package/dist/components/TelegramAuth.js +89 -68
- package/dist/hooks/useCopyToClipboard.d.ts +3 -3
- package/dist/hooks/useFormKeypressEnter.js +3 -3
- package/dist/hooks/useMemo.d.ts +1 -1
- package/dist/index.d.ts +101 -127
- package/dist/index.js +3 -10
- package/dist/utils/index.js +1 -1
- package/dist/utils/is.d.ts +6 -6
- package/dist/utils/is.js +33 -21
- package/dist/utils/math.js +85 -164
- package/dist/utils/vuePropTypes.d.ts +22 -28
- package/dist/utils/vuePropTypes.js +1 -1
- package/package.json +25 -24
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createVNode as N } from "vue";
|
|
2
2
|
import { isString as l, isHtmlStr as p, isObject as f, isNumber as m, is as S, isArray as $, isBoolean as b, isClient as O, isDate as v, isDef as U, isEdgeBrowser as T, isElement as y, isEmail as P, isEmpty as x, isFunction as E, isInMobileBrowser as B, isIp as I, isMap as L, isNull as D, isNullAndUnDef as q, isNullOrUnDef as F, isPromise as M, isPromiseLink as R, isRegExp as _, isServer as k, isUnDef as W, isUrl as j, isValidPhoneNumber as z, isWindow as H, isZhLang as V } from "../utils/is.js";
|
|
3
|
-
import {
|
|
3
|
+
import { toNum as g, isNanValue as d, BigNumber as A, DOWN as C, UP as G, add as Z, divide as J, formatRate as K, helper as Q, isBigNum as X, isBool as Y, isEqualTo as ee, isGreaterThan as ie, isGreaterThanOrEqualTo as te, isInt as ne, isLessThan as re, isLessThanOrEqualTo as oe, isNum as se, multiply as ue, power as ae, subtract as le, toBigNum as ce, toDecimalPlaces as fe, toInt as pe, toLocaleString as me, toString as ge, unFormatRate as de } from "../utils/math.js";
|
|
4
4
|
import { propTypes as he } from "../utils/vuePropTypes.js";
|
|
5
5
|
import { timeZoneOptions as we } from "../utils/timeZone.js";
|
|
6
6
|
import { withInstall as Ne } from "../utils/withInstall.js";
|
|
@@ -67,7 +67,7 @@ function Ue(e, t = 6, { showPrefix: n = !0, showSuffix: i = !0, middleStr: s = "
|
|
|
67
67
|
}
|
|
68
68
|
function Te(e, t = "px") {
|
|
69
69
|
if (!(e === null || e === "" || e === void 0))
|
|
70
|
-
return
|
|
70
|
+
return d(e) ? String(e) : `${g(e)}${t}`;
|
|
71
71
|
}
|
|
72
72
|
function ye(e) {
|
|
73
73
|
return e ? f(e) ? e : e.split(";").reduce((t, n) => {
|
|
@@ -118,7 +118,7 @@ const De = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
118
118
|
isLessThan: re,
|
|
119
119
|
isLessThanOrEqualTo: oe,
|
|
120
120
|
isMap: L,
|
|
121
|
-
isNanValue:
|
|
121
|
+
isNanValue: d,
|
|
122
122
|
isNull: D,
|
|
123
123
|
isNullAndUnDef: q,
|
|
124
124
|
isNullOrUnDef: F,
|
|
@@ -146,7 +146,7 @@ const De = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
146
146
|
toDecimalPlaces: fe,
|
|
147
147
|
toInt: pe,
|
|
148
148
|
toLocaleString: me,
|
|
149
|
-
toNum:
|
|
149
|
+
toNum: g,
|
|
150
150
|
toString: ge,
|
|
151
151
|
toStyleObject: ye,
|
|
152
152
|
toStyleUnit: Te,
|
|
@@ -1,95 +1,99 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { SlotsType, ExtractPropTypes } from 'vue';
|
|
2
2
|
/** 跳转谷歌身份检查 */
|
|
3
3
|
export declare function toGoogleAuth(clientId: string, redirectUri: string): void;
|
|
4
|
+
declare const _comp_props: {
|
|
5
|
+
clientId: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<string>> & {
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
8
|
+
redirectUri: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<string>> & {
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
11
|
+
defaultLoad: import("vue-types").VueTypeValidableDef<boolean, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<boolean>>;
|
|
12
|
+
getPopupContainer: import("vue-types").VueTypeValidableDef<() => HTMLElement | Element, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<() => HTMLElement | Element>>;
|
|
13
|
+
onCallback: import("vue-types").VueTypeValidableDef<(data: {
|
|
14
|
+
code: string;
|
|
15
|
+
}) => void, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<(data: {
|
|
16
|
+
code: string;
|
|
17
|
+
}) => void>>;
|
|
18
|
+
onRejectCallback: import("vue-types").VueTypeValidableDef<(error: any) => void, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<(error: any) => void>>;
|
|
19
|
+
};
|
|
20
|
+
export type GoogleAuthProps = ExtractPropTypes<typeof _comp_props>;
|
|
4
21
|
/** 谷歌身份检查 */
|
|
5
22
|
export declare const GoogleAuth: {
|
|
6
|
-
new (...args: any[]): import("vue").
|
|
7
|
-
clientId: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/types").
|
|
23
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<ExtractPropTypes<{
|
|
24
|
+
clientId: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<string>> & {
|
|
8
25
|
default: string;
|
|
9
26
|
};
|
|
10
|
-
redirectUri: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/types").
|
|
27
|
+
redirectUri: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<string>> & {
|
|
11
28
|
default: string;
|
|
12
29
|
};
|
|
13
|
-
|
|
14
|
-
|
|
30
|
+
defaultLoad: import("vue-types").VueTypeValidableDef<boolean, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<boolean>>;
|
|
31
|
+
getPopupContainer: import("vue-types").VueTypeValidableDef<() => HTMLElement | Element, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<() => HTMLElement | Element>>;
|
|
32
|
+
onCallback: import("vue-types").VueTypeValidableDef<(data: {
|
|
15
33
|
code: string;
|
|
16
|
-
}) =>
|
|
17
|
-
onRejectCallback?: ((_data: any) => any) | undefined;
|
|
18
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
|
-
callback: (_data: {
|
|
34
|
+
}) => void, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<(data: {
|
|
20
35
|
code: string;
|
|
21
|
-
}) =>
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
clientId: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/types").ValidatorFunction<string>> & {
|
|
25
|
-
default: string;
|
|
26
|
-
};
|
|
27
|
-
redirectUri: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/types").ValidatorFunction<string>> & {
|
|
28
|
-
default: string;
|
|
29
|
-
};
|
|
30
|
-
}>> & {
|
|
31
|
-
onCallback?: ((_data: {
|
|
32
|
-
code: string;
|
|
33
|
-
}) => any) | undefined;
|
|
34
|
-
onRejectCallback?: ((_data: any) => any) | undefined;
|
|
35
|
-
}, {
|
|
36
|
+
}) => void>>;
|
|
37
|
+
onRejectCallback: import("vue-types").VueTypeValidableDef<(error: any) => void, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<(error: any) => void>>;
|
|
38
|
+
}>> & Readonly<{}>, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
|
|
36
39
|
clientId: string;
|
|
37
40
|
redirectUri: string;
|
|
38
41
|
}, true, {}, SlotsType<{
|
|
39
42
|
default: {
|
|
40
43
|
startCheck: () => void;
|
|
41
44
|
};
|
|
42
|
-
}>, {
|
|
45
|
+
}>, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
43
46
|
P: {};
|
|
44
47
|
B: {};
|
|
45
48
|
D: {};
|
|
46
49
|
C: {};
|
|
47
50
|
M: {};
|
|
48
51
|
Defaults: {};
|
|
49
|
-
}, Readonly<
|
|
50
|
-
clientId: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/types").
|
|
52
|
+
}, Readonly<ExtractPropTypes<{
|
|
53
|
+
clientId: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<string>> & {
|
|
51
54
|
default: string;
|
|
52
55
|
};
|
|
53
|
-
redirectUri: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/types").
|
|
56
|
+
redirectUri: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<string>> & {
|
|
54
57
|
default: string;
|
|
55
58
|
};
|
|
56
|
-
|
|
57
|
-
|
|
59
|
+
defaultLoad: import("vue-types").VueTypeValidableDef<boolean, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<boolean>>;
|
|
60
|
+
getPopupContainer: import("vue-types").VueTypeValidableDef<() => HTMLElement | Element, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<() => HTMLElement | Element>>;
|
|
61
|
+
onCallback: import("vue-types").VueTypeValidableDef<(data: {
|
|
62
|
+
code: string;
|
|
63
|
+
}) => void, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<(data: {
|
|
58
64
|
code: string;
|
|
59
|
-
}) =>
|
|
60
|
-
onRejectCallback
|
|
61
|
-
}
|
|
65
|
+
}) => void>>;
|
|
66
|
+
onRejectCallback: import("vue-types").VueTypeValidableDef<(error: any) => void, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<(error: any) => void>>;
|
|
67
|
+
}>> & Readonly<{}>, () => JSX.Element, {}, {}, {}, {
|
|
62
68
|
clientId: string;
|
|
63
69
|
redirectUri: string;
|
|
64
70
|
}>;
|
|
65
|
-
__isFragment?:
|
|
66
|
-
__isTeleport?:
|
|
67
|
-
__isSuspense?:
|
|
68
|
-
} & import("vue").ComponentOptionsBase<Readonly<
|
|
69
|
-
clientId: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/types").
|
|
71
|
+
__isFragment?: never;
|
|
72
|
+
__isTeleport?: never;
|
|
73
|
+
__isSuspense?: never;
|
|
74
|
+
} & import("vue").ComponentOptionsBase<Readonly<ExtractPropTypes<{
|
|
75
|
+
clientId: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<string>> & {
|
|
70
76
|
default: string;
|
|
71
77
|
};
|
|
72
|
-
redirectUri: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/types").
|
|
78
|
+
redirectUri: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<string>> & {
|
|
73
79
|
default: string;
|
|
74
80
|
};
|
|
75
|
-
|
|
76
|
-
|
|
81
|
+
defaultLoad: import("vue-types").VueTypeValidableDef<boolean, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<boolean>>;
|
|
82
|
+
getPopupContainer: import("vue-types").VueTypeValidableDef<() => HTMLElement | Element, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<() => HTMLElement | Element>>;
|
|
83
|
+
onCallback: import("vue-types").VueTypeValidableDef<(data: {
|
|
77
84
|
code: string;
|
|
78
|
-
}) =>
|
|
79
|
-
onRejectCallback?: ((_data: any) => any) | undefined;
|
|
80
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
81
|
-
callback: (_data: {
|
|
85
|
+
}) => void, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<(data: {
|
|
82
86
|
code: string;
|
|
83
|
-
}) =>
|
|
84
|
-
|
|
85
|
-
}, string, {
|
|
87
|
+
}) => void>>;
|
|
88
|
+
onRejectCallback: import("vue-types").VueTypeValidableDef<(error: any) => void, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<(error: any) => void>>;
|
|
89
|
+
}>> & Readonly<{}>, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
86
90
|
clientId: string;
|
|
87
91
|
redirectUri: string;
|
|
88
92
|
}, {}, string, SlotsType<{
|
|
89
93
|
default: {
|
|
90
94
|
startCheck: () => void;
|
|
91
95
|
};
|
|
92
|
-
}
|
|
96
|
+
}>, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
|
|
93
97
|
readonly toGoogleAuth: typeof toGoogleAuth;
|
|
94
|
-
} & import("vue").Plugin
|
|
98
|
+
} & import("vue").Plugin;
|
|
95
99
|
export default GoogleAuth;
|
|
@@ -1,71 +1,99 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import { isEdgeBrowser as w, isInMobileBrowser as _ } from "../utils/is.js";
|
|
1
|
+
import { defineComponent as _, computed as w, onMounted as y, createVNode as I } from "vue";
|
|
2
|
+
import { isInMobileBrowser as f } from "../utils/is.js";
|
|
4
3
|
import "../utils/math.js";
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
|
|
4
|
+
import { propTypes as l } from "../utils/vuePropTypes.js";
|
|
5
|
+
import { withInstall as k } from "../utils/withInstall.js";
|
|
6
|
+
function g(t, i) {
|
|
7
|
+
if (!t || !i) return;
|
|
8
|
+
const d = encodeURIComponent(i), a = encodeURIComponent("email profile"), r = encodeURIComponent(t), m = `https://accounts.google.com/o/oauth2/v2/auth?response_type=code&redirect_uri=${d}&scope=${a}&client_id=${r}`;
|
|
9
|
+
window.location.href = m;
|
|
11
10
|
}
|
|
12
|
-
const
|
|
11
|
+
const R = {
|
|
12
|
+
clientId: l.string,
|
|
13
|
+
redirectUri: l.string,
|
|
14
|
+
defaultLoad: l.bool,
|
|
15
|
+
getPopupContainer: l.funcType(),
|
|
16
|
+
onCallback: l.funcType(),
|
|
17
|
+
onRejectCallback: l.funcType()
|
|
18
|
+
}, G = /* @__PURE__ */ _({
|
|
13
19
|
name: "GoogleAuth",
|
|
14
|
-
toGoogleAuth:
|
|
15
|
-
props:
|
|
16
|
-
clientId: f.string,
|
|
17
|
-
redirectUri: f.string
|
|
18
|
-
},
|
|
19
|
-
emits: {
|
|
20
|
-
callback: (o) => !0,
|
|
21
|
-
rejectCallback: (o) => !0
|
|
22
|
-
},
|
|
20
|
+
toGoogleAuth: g,
|
|
21
|
+
props: R,
|
|
23
22
|
slots: Object,
|
|
24
|
-
setup(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
expose: s
|
|
23
|
+
setup(t, {
|
|
24
|
+
slots: i,
|
|
25
|
+
expose: d
|
|
28
26
|
}) {
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
};
|
|
33
|
-
function
|
|
34
|
-
var
|
|
35
|
-
(
|
|
36
|
-
client_id: o.clientId,
|
|
37
|
-
scope: "email profile",
|
|
38
|
-
redirect_uri: o.redirectUri,
|
|
39
|
-
ux_mode: _() ? "redirect" : "popup",
|
|
40
|
-
callback(a) {
|
|
41
|
-
a.error ? r("rejectCallback", a) : r("callback", a);
|
|
42
|
-
}
|
|
43
|
-
})) == null ? void 0 : t.requestCode) == null || l.call(t);
|
|
27
|
+
const a = w(() => ({
|
|
28
|
+
id: t.clientId,
|
|
29
|
+
uri: t.redirectUri
|
|
30
|
+
}));
|
|
31
|
+
function r() {
|
|
32
|
+
var o, e, n;
|
|
33
|
+
return (n = (e = (o = window == null ? void 0 : window.google) == null ? void 0 : o.accounts) == null ? void 0 : e.oauth2) == null ? void 0 : n.initCodeClient;
|
|
44
34
|
}
|
|
45
35
|
function m() {
|
|
46
|
-
|
|
47
|
-
|
|
36
|
+
var e;
|
|
37
|
+
return ((e = t.getPopupContainer) == null ? void 0 : e.call(t)) || document.body;
|
|
38
|
+
}
|
|
39
|
+
function s() {
|
|
40
|
+
return new Promise((o) => {
|
|
41
|
+
var n, c;
|
|
42
|
+
if (!document) {
|
|
43
|
+
o(!1);
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
if (f() || r()) {
|
|
47
|
+
o(!0);
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
const e = document.createElement("script");
|
|
51
|
+
e.async = !0, e.defer = !0, e.src = "https://accounts.google.com/gsi/client", (c = (n = m()) == null ? void 0 : n.appendChild) == null || c.call(n, e), e.onload = () => {
|
|
52
|
+
o(!!r());
|
|
53
|
+
}, e.onerror = () => {
|
|
54
|
+
e.remove(), o(!1);
|
|
55
|
+
};
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
async function C() {
|
|
59
|
+
var n, c, h;
|
|
60
|
+
const {
|
|
61
|
+
id: o,
|
|
62
|
+
uri: e
|
|
63
|
+
} = a.value;
|
|
64
|
+
if (!f() && !await s()) {
|
|
65
|
+
g(o || "", e || "");
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
if (f() || !r()) {
|
|
69
|
+
g(o || "", e || "");
|
|
48
70
|
return;
|
|
49
71
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
72
|
+
(h = (c = (n = r()) == null ? void 0 : n({
|
|
73
|
+
client_id: o,
|
|
74
|
+
scope: "email profile",
|
|
75
|
+
redirect_uri: e,
|
|
76
|
+
ux_mode: f() ? "redirect" : "popup",
|
|
77
|
+
callback(u) {
|
|
78
|
+
var p, b;
|
|
79
|
+
u != null && u.error ? (p = t.onRejectCallback) == null || p.call(t, u.error) : (b = t.onCallback) == null || b.call(t, u);
|
|
80
|
+
}
|
|
81
|
+
})) == null ? void 0 : c.requestCode) == null || h.call(c);
|
|
54
82
|
}
|
|
55
|
-
return
|
|
56
|
-
|
|
83
|
+
return y(() => {
|
|
84
|
+
t.defaultLoad && s();
|
|
85
|
+
}), d({
|
|
86
|
+
startCheck: C
|
|
57
87
|
}), () => {
|
|
58
|
-
var
|
|
59
|
-
return
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
startCheck: d
|
|
63
|
-
}))]);
|
|
88
|
+
var o;
|
|
89
|
+
return I("div", null, [(o = i.default) == null ? void 0 : o.call(i, {
|
|
90
|
+
startCheck: C
|
|
91
|
+
})]);
|
|
64
92
|
};
|
|
65
93
|
}
|
|
66
|
-
}),
|
|
94
|
+
}), $ = k(G);
|
|
67
95
|
export {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
96
|
+
$ as GoogleAuth,
|
|
97
|
+
$ as default,
|
|
98
|
+
g as toGoogleAuth
|
|
71
99
|
};
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { SlotsType, ExtractPropTypes } from 'vue';
|
|
2
|
+
/** 跳转Telegram身份检查 */
|
|
3
|
+
export declare function toTelegramAuth(botId: number, toPath: string): void;
|
|
4
|
+
/** 获取路由中的Telegram身份检查回调参数 */
|
|
5
|
+
export declare function getTelegramAuthUrlParams(): TgUserData | null;
|
|
2
6
|
/** tg用户信息 */
|
|
3
|
-
export
|
|
7
|
+
export interface TgUserData {
|
|
4
8
|
auth_date: number;
|
|
5
9
|
first_name: string;
|
|
6
10
|
hash: string;
|
|
@@ -8,89 +12,85 @@ export type TgUserData = {
|
|
|
8
12
|
last_name: string;
|
|
9
13
|
photo_url: string;
|
|
10
14
|
username: string;
|
|
15
|
+
}
|
|
16
|
+
declare const _comp_props: {
|
|
17
|
+
botId: import("vue-types").VueTypeValidableDef<number, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<number>> & {
|
|
18
|
+
default: number;
|
|
19
|
+
};
|
|
20
|
+
toPath: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<string>> & {
|
|
21
|
+
default: string;
|
|
22
|
+
};
|
|
23
|
+
defaultLoad: import("vue-types").VueTypeValidableDef<boolean, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<boolean>>;
|
|
24
|
+
getPopupContainer: import("vue-types").VueTypeValidableDef<() => HTMLElement | Element, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<() => HTMLElement | Element>>;
|
|
25
|
+
onCallback: import("vue-types").VueTypeValidableDef<(user: TgUserData) => void, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<(user: TgUserData) => void>>;
|
|
26
|
+
onRejectCallback: import("vue-types").VueTypeValidableDef<() => void, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<() => void>>;
|
|
11
27
|
};
|
|
12
|
-
|
|
13
|
-
export declare function toTelegramAuth(botId: number, toPath: string): void;
|
|
14
|
-
/** 获取路由中的Telegram身份检查回调参数 */
|
|
15
|
-
export declare function getTelegramAuthUrlParams(): TgUserData | null;
|
|
28
|
+
export type TelegramAuthProps = ExtractPropTypes<typeof _comp_props>;
|
|
16
29
|
/** Telegram身份检查 */
|
|
17
30
|
export declare const TelegramAuth: {
|
|
18
|
-
new (...args: any[]): import("vue").
|
|
19
|
-
botId: import("vue-types").VueTypeValidableDef<number, import("node_modules/vue-types/dist/types").
|
|
20
|
-
default: number;
|
|
21
|
-
};
|
|
22
|
-
toPath: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/types").ValidatorFunction<string>> & {
|
|
23
|
-
default: string;
|
|
24
|
-
};
|
|
25
|
-
}>> & {
|
|
26
|
-
onCallback?: ((_user: TgUserData) => any) | undefined;
|
|
27
|
-
onRejectCallback?: (() => any) | undefined;
|
|
28
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
29
|
-
callback: (_user: TgUserData) => true;
|
|
30
|
-
rejectCallback: () => true;
|
|
31
|
-
}, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
|
|
32
|
-
botId: import("vue-types").VueTypeValidableDef<number, import("node_modules/vue-types/dist/types").ValidatorFunction<number>> & {
|
|
31
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<ExtractPropTypes<{
|
|
32
|
+
botId: import("vue-types").VueTypeValidableDef<number, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<number>> & {
|
|
33
33
|
default: number;
|
|
34
34
|
};
|
|
35
|
-
toPath: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/types").
|
|
35
|
+
toPath: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<string>> & {
|
|
36
36
|
default: string;
|
|
37
37
|
};
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
defaultLoad: import("vue-types").VueTypeValidableDef<boolean, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<boolean>>;
|
|
39
|
+
getPopupContainer: import("vue-types").VueTypeValidableDef<() => HTMLElement | Element, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<() => HTMLElement | Element>>;
|
|
40
|
+
onCallback: import("vue-types").VueTypeValidableDef<(user: TgUserData) => void, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<(user: TgUserData) => void>>;
|
|
41
|
+
onRejectCallback: import("vue-types").VueTypeValidableDef<() => void, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<() => void>>;
|
|
42
|
+
}>> & Readonly<{}>, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
|
|
42
43
|
botId: number;
|
|
43
44
|
toPath: string;
|
|
44
45
|
}, true, {}, SlotsType<{
|
|
45
46
|
default: {
|
|
46
47
|
startCheck: () => void;
|
|
47
48
|
};
|
|
48
|
-
}>, {
|
|
49
|
+
}>, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
49
50
|
P: {};
|
|
50
51
|
B: {};
|
|
51
52
|
D: {};
|
|
52
53
|
C: {};
|
|
53
54
|
M: {};
|
|
54
55
|
Defaults: {};
|
|
55
|
-
}, Readonly<
|
|
56
|
-
botId: import("vue-types").VueTypeValidableDef<number, import("node_modules/vue-types/dist/types").
|
|
56
|
+
}, Readonly<ExtractPropTypes<{
|
|
57
|
+
botId: import("vue-types").VueTypeValidableDef<number, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<number>> & {
|
|
57
58
|
default: number;
|
|
58
59
|
};
|
|
59
|
-
toPath: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/types").
|
|
60
|
+
toPath: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<string>> & {
|
|
60
61
|
default: string;
|
|
61
62
|
};
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
defaultLoad: import("vue-types").VueTypeValidableDef<boolean, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<boolean>>;
|
|
64
|
+
getPopupContainer: import("vue-types").VueTypeValidableDef<() => HTMLElement | Element, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<() => HTMLElement | Element>>;
|
|
65
|
+
onCallback: import("vue-types").VueTypeValidableDef<(user: TgUserData) => void, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<(user: TgUserData) => void>>;
|
|
66
|
+
onRejectCallback: import("vue-types").VueTypeValidableDef<() => void, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<() => void>>;
|
|
67
|
+
}>> & Readonly<{}>, () => JSX.Element, {}, {}, {}, {
|
|
66
68
|
botId: number;
|
|
67
69
|
toPath: string;
|
|
68
70
|
}>;
|
|
69
|
-
__isFragment?:
|
|
70
|
-
__isTeleport?:
|
|
71
|
-
__isSuspense?:
|
|
72
|
-
} & import("vue").ComponentOptionsBase<Readonly<
|
|
73
|
-
botId: import("vue-types").VueTypeValidableDef<number, import("node_modules/vue-types/dist/types").
|
|
71
|
+
__isFragment?: never;
|
|
72
|
+
__isTeleport?: never;
|
|
73
|
+
__isSuspense?: never;
|
|
74
|
+
} & import("vue").ComponentOptionsBase<Readonly<ExtractPropTypes<{
|
|
75
|
+
botId: import("vue-types").VueTypeValidableDef<number, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<number>> & {
|
|
74
76
|
default: number;
|
|
75
77
|
};
|
|
76
|
-
toPath: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/types").
|
|
78
|
+
toPath: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<string>> & {
|
|
77
79
|
default: string;
|
|
78
80
|
};
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
rejectCallback: () => true;
|
|
85
|
-
}, string, {
|
|
81
|
+
defaultLoad: import("vue-types").VueTypeValidableDef<boolean, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<boolean>>;
|
|
82
|
+
getPopupContainer: import("vue-types").VueTypeValidableDef<() => HTMLElement | Element, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<() => HTMLElement | Element>>;
|
|
83
|
+
onCallback: import("vue-types").VueTypeValidableDef<(user: TgUserData) => void, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<(user: TgUserData) => void>>;
|
|
84
|
+
onRejectCallback: import("vue-types").VueTypeValidableDef<() => void, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<() => void>>;
|
|
85
|
+
}>> & Readonly<{}>, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
86
86
|
botId: number;
|
|
87
87
|
toPath: string;
|
|
88
88
|
}, {}, string, SlotsType<{
|
|
89
89
|
default: {
|
|
90
90
|
startCheck: () => void;
|
|
91
91
|
};
|
|
92
|
-
}
|
|
92
|
+
}>, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
|
|
93
93
|
readonly toTelegramAuth: typeof toTelegramAuth;
|
|
94
94
|
readonly getTelegramAuthUrlParams: typeof getTelegramAuthUrlParams;
|
|
95
|
-
} & import("vue").Plugin
|
|
95
|
+
} & import("vue").Plugin;
|
|
96
96
|
export default TelegramAuth;
|