jk-vue-comps 0.2.2 → 0.2.3
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-CHtnAuFs.js +174 -0
- package/dist/components/GoogleAuth.d.ts +23 -78
- package/dist/components/GoogleAuth.js +59 -47
- package/dist/components/TelegramAuth.d.ts +21 -62
- package/dist/components/TelegramAuth.js +51 -40
- package/dist/index.d.ts +12 -118
- package/dist/index.js +52 -46
- package/dist/utils/index.js +54 -48
- package/dist/utils/math.d.ts +6 -0
- package/dist/utils/math.js +213 -206
- package/dist/utils/vuePropTypes.d.ts +9 -51
- package/dist/utils/vuePropTypes.js +23 -21
- package/package.json +14 -14
- package/dist/chunks/index-CAW2nf5W.js +0 -168
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { defineComponent as p, computed as
|
|
2
|
-
import { a as w } from "../chunks/index-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
function s(t, a) {
|
|
1
|
+
import { defineComponent as p, computed as f, onMounted as g, createVNode as h } from "vue";
|
|
2
|
+
import { a as w } from "../chunks/index-CHtnAuFs.js";
|
|
3
|
+
import { withInstall as b } from "../utils/withInstall.js";
|
|
4
|
+
import { isInMobileBrowser as l } from "../utils/is.js";
|
|
5
|
+
function u(t, a) {
|
|
7
6
|
if (!t || !a) return;
|
|
8
7
|
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
8
|
window.location.href = n;
|
|
10
9
|
}
|
|
11
|
-
function
|
|
10
|
+
function C() {
|
|
12
11
|
const t = /[#\?\&]tgAuthResult=([A-Za-z0-9\-_=]*)$/;
|
|
13
12
|
try {
|
|
14
13
|
const a = window.location.hash.toString(), c = a.match(t);
|
|
@@ -22,83 +21,95 @@ function _() {
|
|
|
22
21
|
return null;
|
|
23
22
|
}
|
|
24
23
|
}
|
|
25
|
-
const
|
|
26
|
-
botId:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
24
|
+
const y = {
|
|
25
|
+
botId: {
|
|
26
|
+
type: Number
|
|
27
|
+
},
|
|
28
|
+
toPath: {
|
|
29
|
+
type: String
|
|
30
|
+
},
|
|
31
|
+
defaultLoad: {
|
|
32
|
+
type: Boolean
|
|
33
|
+
},
|
|
34
|
+
getPopupContainer: {
|
|
35
|
+
type: Function
|
|
36
|
+
},
|
|
37
|
+
onCallback: {
|
|
38
|
+
type: Function
|
|
39
|
+
},
|
|
40
|
+
onRejectCallback: {
|
|
41
|
+
type: Function
|
|
42
|
+
}
|
|
43
|
+
}, _ = /* @__PURE__ */ p({
|
|
33
44
|
name: "TelegramAuth",
|
|
34
|
-
toTelegramAuth:
|
|
35
|
-
getTelegramAuthUrlParams:
|
|
36
|
-
props:
|
|
45
|
+
toTelegramAuth: u,
|
|
46
|
+
getTelegramAuthUrlParams: C,
|
|
47
|
+
props: y,
|
|
37
48
|
slots: Object,
|
|
38
49
|
setup(t, {
|
|
39
50
|
slots: a,
|
|
40
51
|
expose: c
|
|
41
52
|
}) {
|
|
42
|
-
const r =
|
|
53
|
+
const r = f(() => ({
|
|
43
54
|
id: t.botId,
|
|
44
55
|
path: t.toPath
|
|
45
56
|
}));
|
|
46
57
|
function n() {
|
|
47
58
|
return window?.Telegram?.Login?.auth;
|
|
48
59
|
}
|
|
49
|
-
function
|
|
60
|
+
function m() {
|
|
50
61
|
return t.getPopupContainer?.() || document.body;
|
|
51
62
|
}
|
|
52
|
-
function
|
|
63
|
+
function s() {
|
|
53
64
|
return new Promise((o) => {
|
|
54
65
|
if (!document) {
|
|
55
66
|
o(!1);
|
|
56
67
|
return;
|
|
57
68
|
}
|
|
58
|
-
if (
|
|
69
|
+
if (l() || n()) {
|
|
59
70
|
o(!0);
|
|
60
71
|
return;
|
|
61
72
|
}
|
|
62
73
|
const e = document.createElement("script");
|
|
63
|
-
e.async = !0, e.defer = !0, e.src = "https://telegram.org/js/telegram-widget.js",
|
|
74
|
+
e.async = !0, e.defer = !0, e.src = "https://telegram.org/js/telegram-widget.js", m()?.appendChild?.(e), e.onload = () => {
|
|
64
75
|
o(!!n());
|
|
65
76
|
}, e.onerror = () => {
|
|
66
77
|
e.remove(), o(!1);
|
|
67
78
|
};
|
|
68
79
|
});
|
|
69
80
|
}
|
|
70
|
-
async function
|
|
81
|
+
async function d() {
|
|
71
82
|
const {
|
|
72
83
|
id: o,
|
|
73
84
|
path: e
|
|
74
85
|
} = r.value;
|
|
75
|
-
if (!
|
|
76
|
-
|
|
86
|
+
if (!l() && !await s()) {
|
|
87
|
+
u(o || 0, e || "");
|
|
77
88
|
return;
|
|
78
89
|
}
|
|
79
|
-
if (
|
|
80
|
-
|
|
90
|
+
if (l() || !n()) {
|
|
91
|
+
u(o || 0, e || "");
|
|
81
92
|
return;
|
|
82
93
|
}
|
|
83
94
|
n()?.({
|
|
84
95
|
bot_id: o,
|
|
85
96
|
request_access: !0
|
|
86
|
-
}, (
|
|
87
|
-
|
|
97
|
+
}, (i) => {
|
|
98
|
+
i ? t.onCallback?.(i) : t.onRejectCallback?.();
|
|
88
99
|
});
|
|
89
100
|
}
|
|
90
|
-
return
|
|
91
|
-
t.defaultLoad &&
|
|
101
|
+
return g(() => {
|
|
102
|
+
t.defaultLoad && s();
|
|
92
103
|
}), c({
|
|
93
|
-
startCheck:
|
|
94
|
-
}), () =>
|
|
95
|
-
startCheck:
|
|
104
|
+
startCheck: d
|
|
105
|
+
}), () => h("div", null, [a.default?.({
|
|
106
|
+
startCheck: d
|
|
96
107
|
})]);
|
|
97
108
|
}
|
|
98
|
-
}),
|
|
109
|
+
}), U = b(_);
|
|
99
110
|
export {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
111
|
+
U as TelegramAuth,
|
|
112
|
+
U as default,
|
|
113
|
+
C as getTelegramAuthUrlParams,
|
|
114
|
+
u as toTelegramAuth
|
|
104
115
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -82,6 +82,12 @@ declare const JKVUEComps: {
|
|
|
82
82
|
DOWN: 1;
|
|
83
83
|
UP: 0;
|
|
84
84
|
BigNumber: typeof BigNumber;
|
|
85
|
+
gt: typeof Utils.isGreaterThan;
|
|
86
|
+
gte: typeof Utils.isGreaterThanOrEqualTo;
|
|
87
|
+
lt: typeof Utils.isLessThan;
|
|
88
|
+
lte: typeof Utils.isLessThanOrEqualTo;
|
|
89
|
+
eq: typeof Utils.isEqualTo;
|
|
90
|
+
isNan: typeof Utils.isNanValue;
|
|
85
91
|
propTypes: typeof import("./utils/vuePropTypes").default;
|
|
86
92
|
timeZoneOptions: Utils.TimeZoneItem[];
|
|
87
93
|
withInstall<T>(component: T, alias?: string): T & import("vue").Plugin;
|
|
@@ -97,147 +103,35 @@ declare const JKVUEComps: {
|
|
|
97
103
|
useMemo<T>(getValue: () => T, condition: (import("vue").WatchSource<unknown> | object)[], shouldUpdate?: (prev: any[], next: any[]) => boolean): import("vue").Ref<T, T>;
|
|
98
104
|
toGoogleAuth(clientId: string, redirectUri: string): void;
|
|
99
105
|
GoogleAuth: {
|
|
100
|
-
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").
|
|
101
|
-
clientId: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<string>> & {
|
|
102
|
-
default: string;
|
|
103
|
-
};
|
|
104
|
-
redirectUri: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<string>> & {
|
|
105
|
-
default: string;
|
|
106
|
-
};
|
|
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: {
|
|
110
|
-
code: string;
|
|
111
|
-
}) => void, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<(data: {
|
|
112
|
-
code: string;
|
|
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, {
|
|
116
|
-
clientId: string;
|
|
117
|
-
redirectUri: string;
|
|
118
|
-
}, true, {}, import("vue").SlotsType<{
|
|
119
|
-
default: {
|
|
120
|
-
startCheck: () => void;
|
|
121
|
-
};
|
|
122
|
-
}>, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
106
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<Comps.GoogleAuthProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
123
107
|
P: {};
|
|
124
108
|
B: {};
|
|
125
109
|
D: {};
|
|
126
110
|
C: {};
|
|
127
111
|
M: {};
|
|
128
112
|
Defaults: {};
|
|
129
|
-
}, Readonly<
|
|
130
|
-
clientId: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<string>> & {
|
|
131
|
-
default: string;
|
|
132
|
-
};
|
|
133
|
-
redirectUri: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<string>> & {
|
|
134
|
-
default: string;
|
|
135
|
-
};
|
|
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: {
|
|
139
|
-
code: string;
|
|
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, {}, {}, {}, {
|
|
145
|
-
clientId: string;
|
|
146
|
-
redirectUri: string;
|
|
147
|
-
}>;
|
|
113
|
+
}, Readonly<Comps.GoogleAuthProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
148
114
|
__isFragment?: never;
|
|
149
115
|
__isTeleport?: never;
|
|
150
116
|
__isSuspense?: never;
|
|
151
|
-
} & import("vue").ComponentOptionsBase<Readonly<import("vue").
|
|
152
|
-
clientId: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<string>> & {
|
|
153
|
-
default: string;
|
|
154
|
-
};
|
|
155
|
-
redirectUri: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<string>> & {
|
|
156
|
-
default: string;
|
|
157
|
-
};
|
|
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: {
|
|
161
|
-
code: string;
|
|
162
|
-
}) => void, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<(data: {
|
|
163
|
-
code: 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, {
|
|
167
|
-
clientId: string;
|
|
168
|
-
redirectUri: string;
|
|
169
|
-
}, {}, string, import("vue").SlotsType<{
|
|
170
|
-
default: {
|
|
171
|
-
startCheck: () => void;
|
|
172
|
-
};
|
|
173
|
-
}>, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
|
|
117
|
+
} & import("vue").ComponentOptionsBase<Readonly<Comps.GoogleAuthProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
|
|
174
118
|
readonly toGoogleAuth: typeof Comps.toGoogleAuth;
|
|
175
119
|
} & import("vue").Plugin;
|
|
176
120
|
toTelegramAuth(botId: number, toPath: string): void;
|
|
177
121
|
getTelegramAuthUrlParams(): Comps.TgUserData | null;
|
|
178
122
|
TelegramAuth: {
|
|
179
|
-
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").
|
|
180
|
-
botId: import("vue-types").VueTypeValidableDef<number, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<number>> & {
|
|
181
|
-
default: number;
|
|
182
|
-
};
|
|
183
|
-
toPath: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<string>> & {
|
|
184
|
-
default: string;
|
|
185
|
-
};
|
|
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, {
|
|
191
|
-
botId: number;
|
|
192
|
-
toPath: string;
|
|
193
|
-
}, true, {}, import("vue").SlotsType<{
|
|
194
|
-
default: {
|
|
195
|
-
startCheck: () => void;
|
|
196
|
-
};
|
|
197
|
-
}>, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
123
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<Comps.TelegramAuthProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
198
124
|
P: {};
|
|
199
125
|
B: {};
|
|
200
126
|
D: {};
|
|
201
127
|
C: {};
|
|
202
128
|
M: {};
|
|
203
129
|
Defaults: {};
|
|
204
|
-
}, Readonly<
|
|
205
|
-
botId: import("vue-types").VueTypeValidableDef<number, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<number>> & {
|
|
206
|
-
default: number;
|
|
207
|
-
};
|
|
208
|
-
toPath: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<string>> & {
|
|
209
|
-
default: string;
|
|
210
|
-
};
|
|
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, {}, {}, {}, {
|
|
216
|
-
botId: number;
|
|
217
|
-
toPath: string;
|
|
218
|
-
}>;
|
|
130
|
+
}, Readonly<Comps.TelegramAuthProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
219
131
|
__isFragment?: never;
|
|
220
132
|
__isTeleport?: never;
|
|
221
133
|
__isSuspense?: never;
|
|
222
|
-
} & import("vue").ComponentOptionsBase<Readonly<import("vue").
|
|
223
|
-
botId: import("vue-types").VueTypeValidableDef<number, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<number>> & {
|
|
224
|
-
default: number;
|
|
225
|
-
};
|
|
226
|
-
toPath: import("vue-types").VueTypeValidableDef<string, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<string>> & {
|
|
227
|
-
default: string;
|
|
228
|
-
};
|
|
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, {
|
|
234
|
-
botId: number;
|
|
235
|
-
toPath: string;
|
|
236
|
-
}, {}, string, import("vue").SlotsType<{
|
|
237
|
-
default: {
|
|
238
|
-
startCheck: () => void;
|
|
239
|
-
};
|
|
240
|
-
}>, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
|
|
134
|
+
} & import("vue").ComponentOptionsBase<Readonly<Comps.TelegramAuthProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
|
|
241
135
|
readonly toTelegramAuth: typeof Comps.toTelegramAuth;
|
|
242
136
|
readonly getTelegramAuthUrlParams: typeof Comps.getTelegramAuthUrlParams;
|
|
243
137
|
} & import("vue").Plugin;
|
package/dist/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
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
|
|
4
|
-
import { d as n, h as p, e as u, f, g, b as d, a as h, c as
|
|
3
|
+
import { U as t } from "./chunks/index-CHtnAuFs.js";
|
|
4
|
+
import { d as n, h as p, e as u, f, g, b as d, a as h, c as N, r as x, i as T, t as b } from "./chunks/index-CHtnAuFs.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";
|
|
8
8
|
import { useFormKeypressEnter as O } from "./hooks/useFormKeypressEnter.js";
|
|
9
9
|
import { useMemo as F } from "./hooks/useMemo.js";
|
|
10
|
-
import { is as
|
|
11
|
-
import { BigNumber as fe, DOWN as ge, UP as de, add as he, divide as xe, formatRate as
|
|
12
|
-
import { propTypes as
|
|
13
|
-
import { timeZoneOptions as
|
|
14
|
-
import { withInstall as
|
|
15
|
-
const a = { ...e, ...s, ...
|
|
10
|
+
import { is as q, isArray as v, isBoolean as G, isClient as H, isDate as M, isDef as R, isEdgeBrowser as W, isElement as V, isEmail as j, isEmpty as k, isFunction as K, isHtmlStr as Z, isInMobileBrowser as z, isIp as J, isMap as Q, isNull as X, isNullAndUnDef as Y, isNullOrUnDef as _, isNumber as $, isObject as ee, isPromise as se, isPromiseLink as te, isRegExp as re, isServer as oe, isString as ie, isUnDef as ae, isUrl as me, isValidPhoneNumber as le, isWindow as ne, isZhLang as pe } from "./utils/is.js";
|
|
11
|
+
import { BigNumber as fe, DOWN as ge, UP as de, add as he, divide as Ne, eq as xe, formatRate as Te, gt as be, gte as ce, helper as Ue, isBigNum as Ee, isBool as ye, isEqualTo as Pe, isGreaterThan as Se, isGreaterThanOrEqualTo as Ae, isInt as Be, isLessThan as Ce, isLessThanOrEqualTo as De, isNan as Ie, isNanValue as Oe, isNum as we, lt as Fe, lte as Le, multiply as qe, power as ve, subtract as Ge, toBigNum as He, toDecimalPlaces as Me, toInt as Re, toLocaleString as We, toNum as Ve, toString as je, unFormatRate as ke } from "./utils/math.js";
|
|
12
|
+
import { propTypes as Ze } from "./utils/vuePropTypes.js";
|
|
13
|
+
import { timeZoneOptions as Je } from "./utils/timeZone.js";
|
|
14
|
+
import { withInstall as Xe } from "./utils/withInstall.js";
|
|
15
|
+
const a = { ...e, ...s, ...t, Comps: e, Hooks: s, Utils: t };
|
|
16
16
|
export {
|
|
17
17
|
fe as BigNumber,
|
|
18
18
|
ge as DOWN,
|
|
@@ -24,75 +24,81 @@ export {
|
|
|
24
24
|
n as deepMerge,
|
|
25
25
|
a as default,
|
|
26
26
|
p as desensitization,
|
|
27
|
-
|
|
27
|
+
Ne as divide,
|
|
28
|
+
xe as eq,
|
|
28
29
|
u as evalPro,
|
|
29
30
|
f as filterInputNum,
|
|
30
|
-
|
|
31
|
+
Te as formatRate,
|
|
31
32
|
g as generateFilterInputNumFn,
|
|
32
33
|
d as getRouterParams,
|
|
33
34
|
S as getTelegramAuthUrlParams,
|
|
34
35
|
h as getWebsiteUrl,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
36
|
+
be as gt,
|
|
37
|
+
ce as gte,
|
|
38
|
+
Ue as helper,
|
|
39
|
+
q as is,
|
|
40
|
+
v as isArray,
|
|
41
|
+
Ee as isBigNum,
|
|
42
|
+
ye as isBool,
|
|
43
|
+
G as isBoolean,
|
|
44
|
+
H as isClient,
|
|
45
|
+
M as isDate,
|
|
46
|
+
R as isDef,
|
|
47
|
+
W as isEdgeBrowser,
|
|
45
48
|
V as isElement,
|
|
46
49
|
j as isEmail,
|
|
47
50
|
k as isEmpty,
|
|
48
|
-
|
|
51
|
+
Pe as isEqualTo,
|
|
49
52
|
K as isFunction,
|
|
50
|
-
|
|
51
|
-
|
|
53
|
+
Se as isGreaterThan,
|
|
54
|
+
Ae as isGreaterThanOrEqualTo,
|
|
52
55
|
Z as isHtmlStr,
|
|
53
56
|
z as isInMobileBrowser,
|
|
54
|
-
|
|
57
|
+
Be as isInt,
|
|
55
58
|
J as isIp,
|
|
56
|
-
|
|
57
|
-
|
|
59
|
+
Ce as isLessThan,
|
|
60
|
+
De as isLessThanOrEqualTo,
|
|
58
61
|
Q as isMap,
|
|
59
|
-
|
|
62
|
+
Ie as isNan,
|
|
63
|
+
Oe as isNanValue,
|
|
60
64
|
X as isNull,
|
|
61
65
|
Y as isNullAndUnDef,
|
|
62
66
|
_ as isNullOrUnDef,
|
|
63
|
-
|
|
67
|
+
we as isNum,
|
|
64
68
|
$ as isNumber,
|
|
65
69
|
ee as isObject,
|
|
66
70
|
se as isPromise,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
71
|
+
te as isPromiseLink,
|
|
72
|
+
re as isRegExp,
|
|
73
|
+
oe as isServer,
|
|
70
74
|
ie as isString,
|
|
71
75
|
ae as isUnDef,
|
|
72
76
|
me as isUrl,
|
|
73
77
|
le as isValidPhoneNumber,
|
|
74
78
|
ne as isWindow,
|
|
75
79
|
pe as isZhLang,
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
80
|
+
Fe as lt,
|
|
81
|
+
Le as lte,
|
|
82
|
+
qe as multiply,
|
|
83
|
+
ve as power,
|
|
84
|
+
Ze as propTypes,
|
|
85
|
+
N as removeWhitespace,
|
|
86
|
+
x as renderHtmlStr,
|
|
87
|
+
Ge as subtract,
|
|
88
|
+
Je as timeZoneOptions,
|
|
89
|
+
He as toBigNum,
|
|
90
|
+
Me as toDecimalPlaces,
|
|
85
91
|
E as toGoogleAuth,
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
92
|
+
Re as toInt,
|
|
93
|
+
We as toLocaleString,
|
|
94
|
+
Ve as toNum,
|
|
95
|
+
je as toString,
|
|
90
96
|
T as toStyleObject,
|
|
91
97
|
b as toStyleUnit,
|
|
92
98
|
A as toTelegramAuth,
|
|
93
|
-
|
|
99
|
+
ke as unFormatRate,
|
|
94
100
|
D as useCopyToClipboard,
|
|
95
101
|
O as useFormKeypressEnter,
|
|
96
102
|
F as useMemo,
|
|
97
|
-
|
|
103
|
+
Xe as withInstall
|
|
98
104
|
};
|
package/dist/utils/index.js
CHANGED
|
@@ -1,53 +1,57 @@
|
|
|
1
1
|
import "vue";
|
|
2
|
-
import { is as t, isArray as r, isBoolean as
|
|
3
|
-
import { BigNumber as
|
|
4
|
-
import { propTypes as
|
|
5
|
-
import { timeZoneOptions as
|
|
6
|
-
import { withInstall as
|
|
7
|
-
import { d as
|
|
2
|
+
import { is as t, isArray as r, isBoolean as a, isClient as o, isDate as n, isDef as l, isEdgeBrowser as m, isElement as u, isEmail as p, isEmpty as g, isFunction as N, isHtmlStr as f, isInMobileBrowser as d, isIp as h, isMap as b, isNull as c, isNullAndUnDef as E, isNullOrUnDef as S, isNumber as T, isObject as x, isPromise as B, isPromiseLink as D, isRegExp as I, isServer as O, isString as P, isUnDef as U, isUrl as y, isValidPhoneNumber as w, isWindow as L, isZhLang as q } from "./is.js";
|
|
3
|
+
import { BigNumber as F, DOWN as R, UP as W, add as M, divide as j, eq as A, formatRate as G, gt as H, gte as V, helper as Z, isBigNum as k, isBool as z, isEqualTo as C, isGreaterThan as J, isGreaterThanOrEqualTo as K, isInt as Q, isLessThan as X, isLessThanOrEqualTo as Y, isNan as _, isNanValue as $, isNum as ee, lt as ie, lte as se, multiply as te, power as re, subtract as ae, toBigNum as oe, toDecimalPlaces as ne, toInt as le, toLocaleString as me, toNum as ue, toString as pe, unFormatRate as ge } from "./math.js";
|
|
4
|
+
import { propTypes as fe } from "./vuePropTypes.js";
|
|
5
|
+
import { timeZoneOptions as he } from "./timeZone.js";
|
|
6
|
+
import { withInstall as ce } from "./withInstall.js";
|
|
7
|
+
import { d as Se, h as Te, e as xe, f as Be, g as De, b as Ie, a as Oe, c as Pe, r as Ue, i as ye, t as we } from "../chunks/index-CHtnAuFs.js";
|
|
8
8
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
F as BigNumber,
|
|
10
|
+
R as DOWN,
|
|
11
|
+
W as UP,
|
|
12
12
|
M as add,
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
Se as deepMerge,
|
|
14
|
+
Te as desensitization,
|
|
15
15
|
j as divide,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
A as eq,
|
|
17
|
+
xe as evalPro,
|
|
18
|
+
Be as filterInputNum,
|
|
19
|
+
G as formatRate,
|
|
20
|
+
De as generateFilterInputNumFn,
|
|
21
|
+
Ie as getRouterParams,
|
|
22
|
+
Oe as getWebsiteUrl,
|
|
23
|
+
H as gt,
|
|
24
|
+
V as gte,
|
|
25
|
+
Z as helper,
|
|
23
26
|
t as is,
|
|
24
27
|
r as isArray,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
k as isBigNum,
|
|
29
|
+
z as isBool,
|
|
30
|
+
a as isBoolean,
|
|
31
|
+
o as isClient,
|
|
29
32
|
n as isDate,
|
|
30
33
|
l as isDef,
|
|
31
34
|
m as isEdgeBrowser,
|
|
32
35
|
u as isElement,
|
|
33
36
|
p as isEmail,
|
|
34
37
|
g as isEmpty,
|
|
35
|
-
|
|
38
|
+
C as isEqualTo,
|
|
36
39
|
N as isFunction,
|
|
37
|
-
|
|
38
|
-
|
|
40
|
+
J as isGreaterThan,
|
|
41
|
+
K as isGreaterThanOrEqualTo,
|
|
39
42
|
f as isHtmlStr,
|
|
40
43
|
d as isInMobileBrowser,
|
|
41
|
-
|
|
44
|
+
Q as isInt,
|
|
42
45
|
h as isIp,
|
|
43
|
-
|
|
44
|
-
|
|
46
|
+
X as isLessThan,
|
|
47
|
+
Y as isLessThanOrEqualTo,
|
|
45
48
|
b as isMap,
|
|
46
|
-
|
|
49
|
+
_ as isNan,
|
|
50
|
+
$ as isNanValue,
|
|
47
51
|
c as isNull,
|
|
48
52
|
E as isNullAndUnDef,
|
|
49
53
|
S as isNullOrUnDef,
|
|
50
|
-
|
|
54
|
+
ee as isNum,
|
|
51
55
|
T as isNumber,
|
|
52
56
|
x as isObject,
|
|
53
57
|
B as isPromise,
|
|
@@ -59,22 +63,24 @@ export {
|
|
|
59
63
|
y as isUrl,
|
|
60
64
|
w as isValidPhoneNumber,
|
|
61
65
|
L as isWindow,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
66
|
+
q as isZhLang,
|
|
67
|
+
ie as lt,
|
|
68
|
+
se as lte,
|
|
69
|
+
te as multiply,
|
|
70
|
+
re as power,
|
|
71
|
+
fe as propTypes,
|
|
72
|
+
Pe as removeWhitespace,
|
|
73
|
+
Ue as renderHtmlStr,
|
|
74
|
+
ae as subtract,
|
|
75
|
+
he as timeZoneOptions,
|
|
76
|
+
oe as toBigNum,
|
|
77
|
+
ne as toDecimalPlaces,
|
|
78
|
+
le as toInt,
|
|
79
|
+
me as toLocaleString,
|
|
80
|
+
ue as toNum,
|
|
81
|
+
pe as toString,
|
|
82
|
+
ye as toStyleObject,
|
|
83
|
+
we as toStyleUnit,
|
|
84
|
+
ge as unFormatRate,
|
|
85
|
+
ce as withInstall
|
|
80
86
|
};
|
package/dist/utils/math.d.ts
CHANGED
|
@@ -105,3 +105,9 @@ export declare function formatRate(val: BigNumValType, unit?: string): string;
|
|
|
105
105
|
* @example 22.22 => 0.2222
|
|
106
106
|
*/
|
|
107
107
|
export declare function unFormatRate(val: BigNumValType): number;
|
|
108
|
+
export declare const gt: typeof isGreaterThan;
|
|
109
|
+
export declare const gte: typeof isGreaterThanOrEqualTo;
|
|
110
|
+
export declare const lt: typeof isLessThan;
|
|
111
|
+
export declare const lte: typeof isLessThanOrEqualTo;
|
|
112
|
+
export declare const eq: typeof isEqualTo;
|
|
113
|
+
export declare const isNan: typeof isNanValue;
|