jk-vue-comps 0.1.19 → 0.2.2
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-CAW2nf5W.js} +35 -36
- package/dist/components/GoogleAuth.d.ts +55 -51
- package/dist/components/GoogleAuth.js +75 -55
- package/dist/components/TelegramAuth.d.ts +49 -49
- package/dist/components/TelegramAuth.js +83 -70
- package/dist/hooks/useCopyToClipboard.d.ts +3 -3
- package/dist/hooks/useFormKeypressEnter.js +5 -5
- 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 +75 -65
- package/dist/utils/math.js +92 -171
- package/dist/utils/vuePropTypes.d.ts +22 -28
- package/dist/utils/vuePropTypes.js +21 -19
- package/package.json +25 -24
|
@@ -1,91 +1,104 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { withInstall as
|
|
5
|
-
import {
|
|
6
|
-
function
|
|
7
|
-
if (!
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
C() ? window.open(a, "_self") : window.location.href = a;
|
|
1
|
+
import { defineComponent as p, computed as g, onMounted as h, createVNode as b } from "vue";
|
|
2
|
+
import { a as w } from "../chunks/index-CAW2nf5W.js";
|
|
3
|
+
import { propTypes as l } from "../utils/vuePropTypes.js";
|
|
4
|
+
import { withInstall as C } from "../utils/withInstall.js";
|
|
5
|
+
import { isInMobileBrowser as i } from "../utils/is.js";
|
|
6
|
+
function s(t, a) {
|
|
7
|
+
if (!t || !a) return;
|
|
8
|
+
const c = encodeURIComponent(w()), r = encodeURIComponent(a), n = `https://oauth.telegram.org/auth?bot_id=${t}&origin=${c}&embed=1&request_access=write&return_to=${c}${r}`;
|
|
9
|
+
window.location.href = n;
|
|
11
10
|
}
|
|
12
|
-
function
|
|
13
|
-
const
|
|
11
|
+
function _() {
|
|
12
|
+
const t = /[#\?\&]tgAuthResult=([A-Za-z0-9\-_=]*)$/;
|
|
14
13
|
try {
|
|
15
|
-
const
|
|
16
|
-
if (!
|
|
14
|
+
const a = window.location.hash.toString(), c = a.match(t);
|
|
15
|
+
if (!c)
|
|
17
16
|
return null;
|
|
18
|
-
window.location.hash =
|
|
19
|
-
let
|
|
20
|
-
const
|
|
21
|
-
return
|
|
17
|
+
window.location.hash = a.replace(t, "");
|
|
18
|
+
let r = c[1].replace(/-/g, "+").replace(/_/g, "/");
|
|
19
|
+
const n = r.length % 4;
|
|
20
|
+
return n > 1 && (r += new Array(5 - n).join("=")), r ? JSON.parse(window.atob(r)) : null;
|
|
22
21
|
} catch {
|
|
23
22
|
return null;
|
|
24
23
|
}
|
|
25
24
|
}
|
|
26
|
-
const
|
|
25
|
+
const T = {
|
|
26
|
+
botId: l.number,
|
|
27
|
+
toPath: l.string,
|
|
28
|
+
defaultLoad: l.bool,
|
|
29
|
+
getPopupContainer: l.funcType(),
|
|
30
|
+
onCallback: l.funcType(),
|
|
31
|
+
onRejectCallback: l.funcType()
|
|
32
|
+
}, y = /* @__PURE__ */ p({
|
|
27
33
|
name: "TelegramAuth",
|
|
28
|
-
toTelegramAuth:
|
|
29
|
-
getTelegramAuthUrlParams:
|
|
30
|
-
props:
|
|
31
|
-
botId: m.number,
|
|
32
|
-
toPath: m.string
|
|
33
|
-
},
|
|
34
|
-
emits: {
|
|
35
|
-
callback: (r) => !0,
|
|
36
|
-
rejectCallback: () => !0
|
|
37
|
-
},
|
|
34
|
+
toTelegramAuth: s,
|
|
35
|
+
getTelegramAuthUrlParams: _,
|
|
36
|
+
props: T,
|
|
38
37
|
slots: Object,
|
|
39
|
-
setup(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
expose: n
|
|
38
|
+
setup(t, {
|
|
39
|
+
slots: a,
|
|
40
|
+
expose: c
|
|
43
41
|
}) {
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
};
|
|
48
|
-
function
|
|
42
|
+
const r = g(() => ({
|
|
43
|
+
id: t.botId,
|
|
44
|
+
path: t.toPath
|
|
45
|
+
}));
|
|
46
|
+
function n() {
|
|
47
|
+
return window?.Telegram?.Login?.auth;
|
|
48
|
+
}
|
|
49
|
+
function d() {
|
|
50
|
+
return t.getPopupContainer?.() || document.body;
|
|
51
|
+
}
|
|
52
|
+
function m() {
|
|
53
|
+
return new Promise((o) => {
|
|
54
|
+
if (!document) {
|
|
55
|
+
o(!1);
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
if (i() || n()) {
|
|
59
|
+
o(!0);
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
const e = document.createElement("script");
|
|
63
|
+
e.async = !0, e.defer = !0, e.src = "https://telegram.org/js/telegram-widget.js", d()?.appendChild?.(e), e.onload = () => {
|
|
64
|
+
o(!!n());
|
|
65
|
+
}, e.onerror = () => {
|
|
66
|
+
e.remove(), o(!1);
|
|
67
|
+
};
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
async function f() {
|
|
49
71
|
const {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
} = r;
|
|
53
|
-
if (!
|
|
72
|
+
id: o,
|
|
73
|
+
path: e
|
|
74
|
+
} = r.value;
|
|
75
|
+
if (!i() && !await m()) {
|
|
76
|
+
s(o || 0, e || "");
|
|
54
77
|
return;
|
|
55
|
-
|
|
56
|
-
if (
|
|
57
|
-
|
|
78
|
+
}
|
|
79
|
+
if (i() || !n()) {
|
|
80
|
+
s(o || 0, e || "");
|
|
58
81
|
return;
|
|
59
82
|
}
|
|
60
|
-
|
|
61
|
-
bot_id:
|
|
83
|
+
n()?.({
|
|
84
|
+
bot_id: o,
|
|
62
85
|
request_access: !0
|
|
63
86
|
}, (u) => {
|
|
64
|
-
u ?
|
|
87
|
+
u ? t.onCallback?.(u) : t.onRejectCallback?.();
|
|
65
88
|
});
|
|
66
89
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
return w(f), n({
|
|
75
|
-
startCheck: s
|
|
76
|
-
}), () => {
|
|
77
|
-
var e;
|
|
78
|
-
return b("div", {
|
|
79
|
-
ref: a
|
|
80
|
-
}, [(e = t.default) == null ? void 0 : e.call(t, {
|
|
81
|
-
startCheck: s
|
|
82
|
-
})]);
|
|
83
|
-
};
|
|
90
|
+
return h(() => {
|
|
91
|
+
t.defaultLoad && m();
|
|
92
|
+
}), c({
|
|
93
|
+
startCheck: f
|
|
94
|
+
}), () => b("div", null, [a.default?.({
|
|
95
|
+
startCheck: f
|
|
96
|
+
})]);
|
|
84
97
|
}
|
|
85
|
-
}),
|
|
98
|
+
}), I = C(y);
|
|
86
99
|
export {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
100
|
+
I as TelegramAuth,
|
|
101
|
+
I as default,
|
|
102
|
+
_ as getTelegramAuthUrlParams,
|
|
103
|
+
s as toTelegramAuth
|
|
91
104
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare function useCopyToClipboard(initial?: string): {
|
|
2
|
-
clipboardRef: import("vue").Ref<string>;
|
|
3
|
-
isSuccessRef: import("vue").Ref<boolean>;
|
|
4
|
-
copiedRef: import("vue").Ref<boolean>;
|
|
2
|
+
clipboardRef: import("vue").Ref<string, string>;
|
|
3
|
+
isSuccessRef: import("vue").Ref<boolean, boolean>;
|
|
4
|
+
copiedRef: import("vue").Ref<boolean, boolean>;
|
|
5
5
|
};
|
|
6
6
|
export declare function copyTextToClipboard(input: string, { target }?: {
|
|
7
7
|
target?: HTMLElement;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { isFunction as e } from "../utils/is.js";
|
|
2
|
-
import {
|
|
3
|
-
function
|
|
2
|
+
import { toValue as n } from "vue";
|
|
3
|
+
function f(o, r) {
|
|
4
4
|
return function(...t) {
|
|
5
|
-
if (!(e(
|
|
6
|
-
return
|
|
5
|
+
if (!(e(r) ? r() : n(r)))
|
|
6
|
+
return o?.(...t);
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
9
|
export {
|
|
10
|
-
|
|
10
|
+
f as useFormKeypressEnter
|
|
11
11
|
};
|
package/dist/hooks/useMemo.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { type Ref, type WatchSource } from 'vue';
|
|
2
|
-
export declare function useMemo<T>(getValue: () => T, condition: (WatchSource<unknown> | object)[], shouldUpdate?: (prev: any[], next: any[]) => boolean): Ref<T>;
|
|
2
|
+
export declare function useMemo<T>(getValue: () => T, condition: (WatchSource<unknown> | object)[], shouldUpdate?: (prev: any[], next: any[]) => boolean): Ref<T, T>;
|
package/dist/index.d.ts
CHANGED
|
@@ -10,24 +10,24 @@ declare const JKVUEComps: {
|
|
|
10
10
|
Utils: typeof Utils;
|
|
11
11
|
evalPro(str: string): any;
|
|
12
12
|
filterInputNum(eventVal: string | number, type?: "int" | "float", maxDecimal?: number): string;
|
|
13
|
-
generateFilterInputNumFn<T extends Recordable
|
|
13
|
+
generateFilterInputNumFn<T extends Recordable, K extends keyof T>(obj: T, key: K, fn?: () => void, type?: "float" | "int", maxDecimal?: number): (e: ChangeEvent) => void;
|
|
14
14
|
renderHtmlStr(html: string): string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
15
15
|
[key: string]: any;
|
|
16
16
|
}>;
|
|
17
17
|
getWebsiteUrl(): string;
|
|
18
18
|
getRouterParams(): Recordable<any> | undefined;
|
|
19
19
|
removeWhitespace(str: any): string;
|
|
20
|
-
deepMerge<
|
|
21
|
-
desensitization(str?: string | number
|
|
22
|
-
showPrefix?: boolean
|
|
23
|
-
showSuffix?: boolean
|
|
24
|
-
middleStr?: string
|
|
20
|
+
deepMerge<T = any>(src?: any, target?: any): T;
|
|
21
|
+
desensitization(str?: string | number, number?: number, { showPrefix, showSuffix, middleStr }?: {
|
|
22
|
+
showPrefix?: boolean;
|
|
23
|
+
showSuffix?: boolean;
|
|
24
|
+
middleStr?: string;
|
|
25
25
|
}): string | undefined;
|
|
26
|
-
toStyleUnit(str?: string | number | null
|
|
27
|
-
toStyleObject(style?: string | Recordable
|
|
26
|
+
toStyleUnit(str?: string | number | null, unit?: string): string | undefined;
|
|
27
|
+
toStyleObject(style?: string | Recordable | null): Recordable<any>;
|
|
28
28
|
is(val: unknown, type: string): boolean;
|
|
29
|
-
isDef<
|
|
30
|
-
isUnDef<
|
|
29
|
+
isDef<T = unknown>(val?: T): val is T;
|
|
30
|
+
isUnDef<T = unknown>(val?: T): val is T;
|
|
31
31
|
isObject(val: any): val is Record<any, any>;
|
|
32
32
|
isDate(val: unknown): val is Date;
|
|
33
33
|
isNull(val: unknown): val is null;
|
|
@@ -35,42 +35,42 @@ declare const JKVUEComps: {
|
|
|
35
35
|
isNullOrUnDef(val: unknown): val is null | undefined;
|
|
36
36
|
isNumber(val: unknown): val is number;
|
|
37
37
|
isString(val: unknown): val is string;
|
|
38
|
-
isFunction(val: unknown): val is
|
|
38
|
+
isFunction(val: unknown): val is (...args: any[]) => any;
|
|
39
39
|
isBoolean(val: unknown): val is boolean;
|
|
40
40
|
isRegExp(val: unknown): val is RegExp;
|
|
41
|
-
isArray(val: any): val is any
|
|
42
|
-
isEmpty<
|
|
43
|
-
isPromise<
|
|
44
|
-
isPromiseLink<
|
|
41
|
+
isArray(val: any): val is Array<any>;
|
|
42
|
+
isEmpty<T = unknown>(val: T): val is T;
|
|
43
|
+
isPromise<T = any>(val: unknown): val is Promise<T>;
|
|
44
|
+
isPromiseLink<T>(it: T | PromiseLike<T>): it is PromiseLike<T>;
|
|
45
45
|
isWindow(val: any): val is Window;
|
|
46
46
|
isElement(val: unknown): val is Element;
|
|
47
47
|
isMap(val: unknown): val is Map<any, any>;
|
|
48
|
+
isServer(): boolean;
|
|
49
|
+
isClient(): boolean;
|
|
48
50
|
isUrl(path: string): boolean;
|
|
51
|
+
isIp(ip: string): boolean;
|
|
52
|
+
isEmail(email: string): boolean;
|
|
49
53
|
isValidPhoneNumber(phoneNumber: string): boolean;
|
|
50
54
|
isInMobileBrowser(): false | RegExpMatchArray | null;
|
|
51
55
|
isZhLang(lang: string): boolean;
|
|
52
56
|
isEdgeBrowser(): boolean;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
isIp: (ip: string) => boolean;
|
|
56
|
-
isEmail: (email: string) => boolean;
|
|
57
|
-
isHtmlStr: (str: string) => boolean;
|
|
58
|
-
helper(val: Utils.BigNumValType): import("bignumber.js").BigNumber;
|
|
57
|
+
isHtmlStr(str: string): boolean;
|
|
58
|
+
helper(val: Utils.BigNumValType): Utils.BigNumObj;
|
|
59
59
|
isBool(val: any): val is boolean;
|
|
60
|
-
isBigNum(val: any): val is
|
|
60
|
+
isBigNum(val: any): val is Utils.BigNumObj;
|
|
61
61
|
isNum(val: any): val is number;
|
|
62
62
|
isNanValue(val: any): boolean;
|
|
63
63
|
isInt(val: any): boolean;
|
|
64
|
-
isGreaterThan(num1:
|
|
65
|
-
isLessThan(num1:
|
|
66
|
-
isEqualTo(num1:
|
|
67
|
-
isGreaterThanOrEqualTo(num1:
|
|
68
|
-
isLessThanOrEqualTo(num1:
|
|
69
|
-
toBigNum(val: Utils.BigNumValType):
|
|
64
|
+
isGreaterThan(num1: Utils.BigNumVal, num2: Utils.BigNumVal): boolean;
|
|
65
|
+
isLessThan(num1: Utils.BigNumVal, num2: Utils.BigNumVal): boolean;
|
|
66
|
+
isEqualTo(num1: Utils.BigNumVal, num2: Utils.BigNumVal): boolean;
|
|
67
|
+
isGreaterThanOrEqualTo(num1: Utils.BigNumVal, num2: Utils.BigNumVal): boolean;
|
|
68
|
+
isLessThanOrEqualTo(num1: Utils.BigNumVal, num2: Utils.BigNumVal): boolean;
|
|
69
|
+
toBigNum(val: Utils.BigNumValType): BigNumber;
|
|
70
70
|
toNum(val: Utils.BigNumValType): number;
|
|
71
71
|
toInt(val: Utils.BigNumValType, isUp?: boolean): number;
|
|
72
72
|
toString(val: Utils.BigNumValType): string;
|
|
73
|
-
toDecimalPlaces(val: Utils.BigNumValType, decimal?: number
|
|
73
|
+
toDecimalPlaces(val: Utils.BigNumValType, decimal?: number, isUp?: boolean): number;
|
|
74
74
|
toLocaleString(val: Utils.BigNumValType): string;
|
|
75
75
|
add(...vals: Utils.BigNumValType[]): number;
|
|
76
76
|
subtract(...vals: Utils.BigNumValType[]): number;
|
|
@@ -81,59 +81,45 @@ declare const JKVUEComps: {
|
|
|
81
81
|
unFormatRate(val: Utils.BigNumValType): number;
|
|
82
82
|
DOWN: 1;
|
|
83
83
|
UP: 0;
|
|
84
|
-
BigNumber: typeof
|
|
84
|
+
BigNumber: typeof BigNumber;
|
|
85
85
|
propTypes: typeof import("./utils/vuePropTypes").default;
|
|
86
86
|
timeZoneOptions: Utils.TimeZoneItem[];
|
|
87
|
-
withInstall<
|
|
88
|
-
useCopyToClipboard(initial?: string
|
|
89
|
-
clipboardRef: import("vue").Ref<string>;
|
|
90
|
-
isSuccessRef: import("vue").Ref<boolean>;
|
|
91
|
-
copiedRef: import("vue").Ref<boolean>;
|
|
87
|
+
withInstall<T>(component: T, alias?: string): T & import("vue").Plugin;
|
|
88
|
+
useCopyToClipboard(initial?: string): {
|
|
89
|
+
clipboardRef: import("vue").Ref<string, string>;
|
|
90
|
+
isSuccessRef: import("vue").Ref<boolean, boolean>;
|
|
91
|
+
copiedRef: import("vue").Ref<boolean, boolean>;
|
|
92
92
|
};
|
|
93
93
|
copyTextToClipboard(input: string, { target }?: {
|
|
94
|
-
target?: HTMLElement
|
|
94
|
+
target?: HTMLElement;
|
|
95
95
|
}): boolean;
|
|
96
|
-
useFormKeypressEnter<
|
|
97
|
-
useMemo<
|
|
96
|
+
useFormKeypressEnter<T extends (...args: any[]) => any, L extends import("vue").WatchSource<boolean>>(fn: T, loading: L): (...args: any[]) => any;
|
|
97
|
+
useMemo<T>(getValue: () => T, condition: (import("vue").WatchSource<unknown> | object)[], shouldUpdate?: (prev: any[], next: any[]) => boolean): import("vue").Ref<T, T>;
|
|
98
98
|
toGoogleAuth(clientId: string, redirectUri: string): void;
|
|
99
99
|
GoogleAuth: {
|
|
100
|
-
new (...args: any[]): import("vue").
|
|
101
|
-
clientId: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/types").
|
|
100
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
101
|
+
clientId: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<string>> & {
|
|
102
102
|
default: string;
|
|
103
103
|
};
|
|
104
|
-
redirectUri: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/types").
|
|
104
|
+
redirectUri: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<string>> & {
|
|
105
105
|
default: string;
|
|
106
106
|
};
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
defaultLoad: import("vue-types").VueTypeValidableDef<boolean, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<boolean>>;
|
|
108
|
+
getPopupContainer: import("vue-types").VueTypeValidableDef<() => HTMLElement | Element, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<() => HTMLElement | Element>>;
|
|
109
|
+
onCallback: import("vue-types").VueTypeValidableDef<(data: {
|
|
109
110
|
code: string;
|
|
110
|
-
}) =>
|
|
111
|
-
onRejectCallback?: ((_data: any) => any) | undefined;
|
|
112
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
113
|
-
callback: (_data: {
|
|
111
|
+
}) => void, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<(data: {
|
|
114
112
|
code: string;
|
|
115
|
-
}) =>
|
|
116
|
-
|
|
117
|
-
}
|
|
118
|
-
clientId: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/types").ValidatorFunction<string>> & {
|
|
119
|
-
default: string;
|
|
120
|
-
};
|
|
121
|
-
redirectUri: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/types").ValidatorFunction<string>> & {
|
|
122
|
-
default: string;
|
|
123
|
-
};
|
|
124
|
-
}>> & {
|
|
125
|
-
onCallback?: ((_data: {
|
|
126
|
-
code: string;
|
|
127
|
-
}) => any) | undefined;
|
|
128
|
-
onRejectCallback?: ((_data: any) => any) | undefined;
|
|
129
|
-
}, {
|
|
113
|
+
}) => void>>;
|
|
114
|
+
onRejectCallback: import("vue-types").VueTypeValidableDef<(error: any) => void, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<(error: any) => void>>;
|
|
115
|
+
}>> & Readonly<{}>, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
|
|
130
116
|
clientId: string;
|
|
131
117
|
redirectUri: string;
|
|
132
118
|
}, true, {}, import("vue").SlotsType<{
|
|
133
119
|
default: {
|
|
134
120
|
startCheck: () => void;
|
|
135
121
|
};
|
|
136
|
-
}>, {
|
|
122
|
+
}>, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
137
123
|
P: {};
|
|
138
124
|
B: {};
|
|
139
125
|
D: {};
|
|
@@ -141,85 +127,74 @@ declare const JKVUEComps: {
|
|
|
141
127
|
M: {};
|
|
142
128
|
Defaults: {};
|
|
143
129
|
}, Readonly<import("vue").ExtractPropTypes<{
|
|
144
|
-
clientId: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/types").
|
|
130
|
+
clientId: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<string>> & {
|
|
145
131
|
default: string;
|
|
146
132
|
};
|
|
147
|
-
redirectUri: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/types").
|
|
133
|
+
redirectUri: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<string>> & {
|
|
148
134
|
default: string;
|
|
149
135
|
};
|
|
150
|
-
|
|
151
|
-
|
|
136
|
+
defaultLoad: import("vue-types").VueTypeValidableDef<boolean, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<boolean>>;
|
|
137
|
+
getPopupContainer: import("vue-types").VueTypeValidableDef<() => HTMLElement | Element, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<() => HTMLElement | Element>>;
|
|
138
|
+
onCallback: import("vue-types").VueTypeValidableDef<(data: {
|
|
152
139
|
code: string;
|
|
153
|
-
}) =>
|
|
154
|
-
|
|
155
|
-
|
|
140
|
+
}) => void, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<(data: {
|
|
141
|
+
code: string;
|
|
142
|
+
}) => void>>;
|
|
143
|
+
onRejectCallback: import("vue-types").VueTypeValidableDef<(error: any) => void, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<(error: any) => void>>;
|
|
144
|
+
}>> & Readonly<{}>, () => JSX.Element, {}, {}, {}, {
|
|
156
145
|
clientId: string;
|
|
157
146
|
redirectUri: string;
|
|
158
147
|
}>;
|
|
159
|
-
__isFragment?:
|
|
160
|
-
__isTeleport?:
|
|
161
|
-
__isSuspense?:
|
|
148
|
+
__isFragment?: never;
|
|
149
|
+
__isTeleport?: never;
|
|
150
|
+
__isSuspense?: never;
|
|
162
151
|
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
163
|
-
clientId: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/types").
|
|
152
|
+
clientId: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<string>> & {
|
|
164
153
|
default: string;
|
|
165
154
|
};
|
|
166
|
-
redirectUri: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/types").
|
|
155
|
+
redirectUri: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<string>> & {
|
|
167
156
|
default: string;
|
|
168
157
|
};
|
|
169
|
-
|
|
170
|
-
|
|
158
|
+
defaultLoad: import("vue-types").VueTypeValidableDef<boolean, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<boolean>>;
|
|
159
|
+
getPopupContainer: import("vue-types").VueTypeValidableDef<() => HTMLElement | Element, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<() => HTMLElement | Element>>;
|
|
160
|
+
onCallback: import("vue-types").VueTypeValidableDef<(data: {
|
|
171
161
|
code: string;
|
|
172
|
-
}) =>
|
|
173
|
-
onRejectCallback?: ((_data: any) => any) | undefined;
|
|
174
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
175
|
-
callback: (_data: {
|
|
162
|
+
}) => void, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<(data: {
|
|
176
163
|
code: string;
|
|
177
|
-
}) =>
|
|
178
|
-
|
|
179
|
-
}, string, {
|
|
164
|
+
}) => void>>;
|
|
165
|
+
onRejectCallback: import("vue-types").VueTypeValidableDef<(error: any) => void, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<(error: any) => void>>;
|
|
166
|
+
}>> & Readonly<{}>, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
180
167
|
clientId: string;
|
|
181
168
|
redirectUri: string;
|
|
182
169
|
}, {}, string, import("vue").SlotsType<{
|
|
183
170
|
default: {
|
|
184
171
|
startCheck: () => void;
|
|
185
172
|
};
|
|
186
|
-
}
|
|
173
|
+
}>, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
|
|
187
174
|
readonly toGoogleAuth: typeof Comps.toGoogleAuth;
|
|
188
|
-
} & import("vue").Plugin
|
|
175
|
+
} & import("vue").Plugin;
|
|
189
176
|
toTelegramAuth(botId: number, toPath: string): void;
|
|
190
177
|
getTelegramAuthUrlParams(): Comps.TgUserData | null;
|
|
191
178
|
TelegramAuth: {
|
|
192
|
-
new (...args: any[]): import("vue").
|
|
193
|
-
botId: import("vue-types").VueTypeValidableDef<number, import("node_modules/vue-types/dist/types").
|
|
194
|
-
default: number;
|
|
195
|
-
};
|
|
196
|
-
toPath: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/types").ValidatorFunction<string>> & {
|
|
197
|
-
default: string;
|
|
198
|
-
};
|
|
199
|
-
}>> & {
|
|
200
|
-
onCallback?: ((_user: Comps.TgUserData) => any) | undefined;
|
|
201
|
-
onRejectCallback?: (() => any) | undefined;
|
|
202
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
203
|
-
callback: (_user: Comps.TgUserData) => true;
|
|
204
|
-
rejectCallback: () => true;
|
|
205
|
-
}, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
|
|
206
|
-
botId: import("vue-types").VueTypeValidableDef<number, import("node_modules/vue-types/dist/types").ValidatorFunction<number>> & {
|
|
179
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
180
|
+
botId: import("vue-types").VueTypeValidableDef<number, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<number>> & {
|
|
207
181
|
default: number;
|
|
208
182
|
};
|
|
209
|
-
toPath: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/types").
|
|
183
|
+
toPath: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<string>> & {
|
|
210
184
|
default: string;
|
|
211
185
|
};
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
186
|
+
defaultLoad: import("vue-types").VueTypeValidableDef<boolean, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<boolean>>;
|
|
187
|
+
getPopupContainer: import("vue-types").VueTypeValidableDef<() => HTMLElement | Element, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<() => HTMLElement | Element>>;
|
|
188
|
+
onCallback: import("vue-types").VueTypeValidableDef<(user: Comps.TgUserData) => void, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<(user: Comps.TgUserData) => void>>;
|
|
189
|
+
onRejectCallback: import("vue-types").VueTypeValidableDef<() => void, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<() => void>>;
|
|
190
|
+
}>> & Readonly<{}>, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
|
|
216
191
|
botId: number;
|
|
217
192
|
toPath: string;
|
|
218
193
|
}, true, {}, import("vue").SlotsType<{
|
|
219
194
|
default: {
|
|
220
195
|
startCheck: () => void;
|
|
221
196
|
};
|
|
222
|
-
}>, {
|
|
197
|
+
}>, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
223
198
|
P: {};
|
|
224
199
|
B: {};
|
|
225
200
|
D: {};
|
|
@@ -227,45 +202,44 @@ declare const JKVUEComps: {
|
|
|
227
202
|
M: {};
|
|
228
203
|
Defaults: {};
|
|
229
204
|
}, Readonly<import("vue").ExtractPropTypes<{
|
|
230
|
-
botId: import("vue-types").VueTypeValidableDef<number, import("node_modules/vue-types/dist/types").
|
|
205
|
+
botId: import("vue-types").VueTypeValidableDef<number, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<number>> & {
|
|
231
206
|
default: number;
|
|
232
207
|
};
|
|
233
|
-
toPath: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/types").
|
|
208
|
+
toPath: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<string>> & {
|
|
234
209
|
default: string;
|
|
235
210
|
};
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
211
|
+
defaultLoad: import("vue-types").VueTypeValidableDef<boolean, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<boolean>>;
|
|
212
|
+
getPopupContainer: import("vue-types").VueTypeValidableDef<() => HTMLElement | Element, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<() => HTMLElement | Element>>;
|
|
213
|
+
onCallback: import("vue-types").VueTypeValidableDef<(user: Comps.TgUserData) => void, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<(user: Comps.TgUserData) => void>>;
|
|
214
|
+
onRejectCallback: import("vue-types").VueTypeValidableDef<() => void, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<() => void>>;
|
|
215
|
+
}>> & Readonly<{}>, () => JSX.Element, {}, {}, {}, {
|
|
240
216
|
botId: number;
|
|
241
217
|
toPath: string;
|
|
242
218
|
}>;
|
|
243
|
-
__isFragment?:
|
|
244
|
-
__isTeleport?:
|
|
245
|
-
__isSuspense?:
|
|
219
|
+
__isFragment?: never;
|
|
220
|
+
__isTeleport?: never;
|
|
221
|
+
__isSuspense?: never;
|
|
246
222
|
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
247
|
-
botId: import("vue-types").VueTypeValidableDef<number, import("node_modules/vue-types/dist/types").
|
|
223
|
+
botId: import("vue-types").VueTypeValidableDef<number, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<number>> & {
|
|
248
224
|
default: number;
|
|
249
225
|
};
|
|
250
|
-
toPath: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/types").
|
|
226
|
+
toPath: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<string>> & {
|
|
251
227
|
default: string;
|
|
252
228
|
};
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
rejectCallback: () => true;
|
|
259
|
-
}, string, {
|
|
229
|
+
defaultLoad: import("vue-types").VueTypeValidableDef<boolean, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<boolean>>;
|
|
230
|
+
getPopupContainer: import("vue-types").VueTypeValidableDef<() => HTMLElement | Element, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<() => HTMLElement | Element>>;
|
|
231
|
+
onCallback: import("vue-types").VueTypeValidableDef<(user: Comps.TgUserData) => void, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<(user: Comps.TgUserData) => void>>;
|
|
232
|
+
onRejectCallback: import("vue-types").VueTypeValidableDef<() => void, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<() => void>>;
|
|
233
|
+
}>> & Readonly<{}>, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
260
234
|
botId: number;
|
|
261
235
|
toPath: string;
|
|
262
236
|
}, {}, string, import("vue").SlotsType<{
|
|
263
237
|
default: {
|
|
264
238
|
startCheck: () => void;
|
|
265
239
|
};
|
|
266
|
-
}
|
|
240
|
+
}>, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
|
|
267
241
|
readonly toTelegramAuth: typeof Comps.toTelegramAuth;
|
|
268
242
|
readonly getTelegramAuthUrlParams: typeof Comps.getTelegramAuthUrlParams;
|
|
269
|
-
} & import("vue").Plugin
|
|
243
|
+
} & import("vue").Plugin;
|
|
270
244
|
};
|
|
271
245
|
export default JKVUEComps;
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { C as e } from "./chunks/index-DyiqKziC.js";
|
|
2
2
|
import { H as s } from "./chunks/index-BXoUaF-m.js";
|
|
3
|
-
import { U as r } from "./chunks/index-
|
|
4
|
-
import { d as n, h as p, e as u, f, g, b as d, a as h, c as x, r as N, i as T, t as b } from "./chunks/index-
|
|
3
|
+
import { U as r } from "./chunks/index-CAW2nf5W.js";
|
|
4
|
+
import { d as n, h as p, e as u, f, g, b as d, a as h, c as x, r as N, i as T, t as b } from "./chunks/index-CAW2nf5W.js";
|
|
5
5
|
import { GoogleAuth as U, toGoogleAuth as E } from "./components/GoogleAuth.js";
|
|
6
6
|
import { TelegramAuth as P, getTelegramAuthUrlParams as S, toTelegramAuth as A } from "./components/TelegramAuth.js";
|
|
7
7
|
import { copyTextToClipboard as C, useCopyToClipboard as D } from "./hooks/useCopyToClipboard.js";
|
|
@@ -12,14 +12,7 @@ import { BigNumber as fe, DOWN as ge, UP as de, add as he, divide as xe, formatR
|
|
|
12
12
|
import { propTypes as We } from "./utils/vuePropTypes.js";
|
|
13
13
|
import { timeZoneOptions as Ve } from "./utils/timeZone.js";
|
|
14
14
|
import { withInstall as ke } from "./utils/withInstall.js";
|
|
15
|
-
const a = {
|
|
16
|
-
...e,
|
|
17
|
-
...s,
|
|
18
|
-
...r,
|
|
19
|
-
Comps: e,
|
|
20
|
-
Hooks: s,
|
|
21
|
-
Utils: r
|
|
22
|
-
};
|
|
15
|
+
const a = { ...e, ...s, ...r, Comps: e, Hooks: s, Utils: r };
|
|
23
16
|
export {
|
|
24
17
|
fe as BigNumber,
|
|
25
18
|
ge as DOWN,
|
package/dist/utils/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { BigNumber as R, DOWN as W, UP as q, add as M, divide as j, formatRate a
|
|
|
4
4
|
import { propTypes as le } from "./vuePropTypes.js";
|
|
5
5
|
import { timeZoneOptions as ue } from "./timeZone.js";
|
|
6
6
|
import { withInstall as ge } from "./withInstall.js";
|
|
7
|
-
import { d as fe, h as de, e as he, f as be, g as ce, b as Ee, a as Se, c as Te, r as xe, i as Be, t as De } from "../chunks/index-
|
|
7
|
+
import { d as fe, h as de, e as he, f as be, g as ce, b as Ee, a as Se, c as Te, r as xe, i as Be, t as De } from "../chunks/index-CAW2nf5W.js";
|
|
8
8
|
export {
|
|
9
9
|
R as BigNumber,
|
|
10
10
|
W as DOWN,
|