jk-vue-comps 0.2.2 → 0.2.4
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 +55 -71
- package/dist/components/GoogleAuth.js +41 -35
- package/dist/components/TelegramAuth.d.ts +47 -55
- package/dist/components/TelegramAuth.js +45 -40
- package/dist/index.d.ts +80 -102
- 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 +15 -15
- package/dist/chunks/index-CAW2nf5W.js +0 -168
|
@@ -1,58 +1,16 @@
|
|
|
1
1
|
import type { CSSProperties, VNode, VNodeChild } from 'vue';
|
|
2
|
+
import type { VueTypeValidableDef } from 'vue-types';
|
|
2
3
|
import * as VueTypes from 'vue-types';
|
|
3
|
-
declare const VuePropTypes_base:
|
|
4
|
-
new (): {};
|
|
5
|
-
defaults: Partial<import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").f>;
|
|
6
|
-
sensibleDefaults: boolean | Partial<import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").f>;
|
|
7
|
-
config: import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").g;
|
|
8
|
-
readonly any: VueTypes.VueTypeValidableDef<any, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<any>>;
|
|
9
|
-
readonly func: VueTypes.VueTypeValidableDef<(...args: any[]) => any, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<(...args: any[]) => any>> & {
|
|
10
|
-
default: (...args: any[]) => any;
|
|
11
|
-
};
|
|
12
|
-
readonly bool: VueTypes.VueTypeValidableDef<boolean, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<boolean>>;
|
|
13
|
-
readonly string: VueTypes.VueTypeValidableDef<string, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<string>> & {
|
|
14
|
-
default: string;
|
|
15
|
-
};
|
|
16
|
-
readonly number: VueTypes.VueTypeValidableDef<number, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<number>> & {
|
|
17
|
-
default: number;
|
|
18
|
-
};
|
|
19
|
-
readonly array: VueTypes.VueTypeValidableDef<unknown[], import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<unknown[]>> & {
|
|
20
|
-
default: () => unknown[];
|
|
21
|
-
};
|
|
22
|
-
readonly object: VueTypes.VueTypeValidableDef<Record<string, any>, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<Record<string, any>>> & {
|
|
23
|
-
default: () => Record<string, any>;
|
|
24
|
-
};
|
|
25
|
-
readonly integer: VueTypes.VueTypeDef<number> & {
|
|
26
|
-
default: number;
|
|
27
|
-
};
|
|
28
|
-
readonly symbol: VueTypes.VueTypeDef<symbol>;
|
|
29
|
-
readonly nullable: import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").P<null, null>;
|
|
30
|
-
readonly custom: typeof VueTypes.custom;
|
|
31
|
-
readonly oneOf: typeof VueTypes.oneOf;
|
|
32
|
-
readonly instanceOf: typeof VueTypes.instanceOf;
|
|
33
|
-
readonly oneOfType: typeof VueTypes.oneOfType;
|
|
34
|
-
readonly arrayOf: typeof VueTypes.arrayOf;
|
|
35
|
-
readonly objectOf: typeof VueTypes.objectOf;
|
|
36
|
-
readonly shape: typeof VueTypes.shape;
|
|
37
|
-
extend(...args: any[]): void;
|
|
38
|
-
utils: {
|
|
39
|
-
validate<T, U>(value: T, type: U): boolean;
|
|
40
|
-
toType<T = unknown, Validable extends boolean = false>(name: string, obj: import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").P<T>, validable?: Validable): Validable extends true ? VueTypes.VueTypeValidableDef<T> : VueTypes.VueTypeDef<T>;
|
|
41
|
-
};
|
|
42
|
-
};
|
|
4
|
+
declare const VuePropTypes_base: ReturnType<typeof VueTypes.createTypes>;
|
|
43
5
|
declare class VuePropTypes extends VuePropTypes_base {
|
|
44
6
|
static vueTypes: typeof VueTypes;
|
|
45
|
-
static anyType:
|
|
46
|
-
static stringType:
|
|
47
|
-
static boolType:
|
|
48
|
-
static numberType:
|
|
49
|
-
static funcType:
|
|
50
|
-
static get style():
|
|
51
|
-
static get vueNode():
|
|
52
|
-
[key: string]: any;
|
|
53
|
-
}> | VNodeChild, import("node_modules/vue-types/dist/shared/vue-types.d8e57a80.mjs").b<VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
54
|
-
[key: string]: any;
|
|
55
|
-
}> | VNodeChild>>;
|
|
7
|
+
static anyType: typeof VueTypes.any;
|
|
8
|
+
static stringType: typeof VueTypes.string;
|
|
9
|
+
static boolType: typeof VueTypes.bool;
|
|
10
|
+
static numberType: typeof VueTypes.number;
|
|
11
|
+
static funcType: typeof VueTypes.func;
|
|
12
|
+
static get style(): VueTypeValidableDef<CSSProperties>;
|
|
13
|
+
static get vueNode(): VueTypeValidableDef<VNode | VNodeChild>;
|
|
56
14
|
}
|
|
57
15
|
/** vue-types类型工具 */
|
|
58
16
|
export declare const propTypes: typeof VuePropTypes;
|
|
@@ -1,31 +1,33 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
const
|
|
3
|
-
class
|
|
4
|
-
func:
|
|
5
|
-
bool:
|
|
6
|
-
string:
|
|
7
|
-
number:
|
|
8
|
-
object:
|
|
9
|
-
integer:
|
|
1
|
+
import * as e from "vue-types";
|
|
2
|
+
const t = void 0;
|
|
3
|
+
class s extends e.createTypes({
|
|
4
|
+
func: t,
|
|
5
|
+
bool: t,
|
|
6
|
+
string: t,
|
|
7
|
+
number: t,
|
|
8
|
+
object: t,
|
|
9
|
+
integer: t
|
|
10
10
|
}) {
|
|
11
|
-
static vueTypes =
|
|
12
|
-
static anyType =
|
|
13
|
-
static stringType =
|
|
14
|
-
static boolType =
|
|
15
|
-
static numberType =
|
|
16
|
-
static funcType =
|
|
11
|
+
static vueTypes = e;
|
|
12
|
+
static anyType = e.any;
|
|
13
|
+
static stringType = e.string;
|
|
14
|
+
static boolType = e.bool;
|
|
15
|
+
static numberType = e.number;
|
|
16
|
+
static funcType = e.func;
|
|
17
17
|
static get style() {
|
|
18
|
-
return
|
|
18
|
+
return e.toValidableType("style", {
|
|
19
19
|
type: [Object],
|
|
20
|
-
default:
|
|
20
|
+
default: t
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
static get vueNode() {
|
|
24
|
-
return
|
|
24
|
+
return e.toValidableType("vueNode", {
|
|
25
|
+
default: t
|
|
26
|
+
});
|
|
25
27
|
}
|
|
26
28
|
}
|
|
27
|
-
const
|
|
29
|
+
const o = s;
|
|
28
30
|
export {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
s as default,
|
|
32
|
+
o as propTypes
|
|
31
33
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jk-vue-comps",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "jk-vue-comps",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -27,28 +27,28 @@
|
|
|
27
27
|
"check-types": "tsc --project tsconfig.json --noEmitOnError"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"vue": "3.5.
|
|
30
|
+
"vue": "3.5.25",
|
|
31
31
|
"vue-types": "^6.0.0",
|
|
32
32
|
"bignumber.js": "^9.3.1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@rollup/plugin-typescript": "^12.
|
|
36
|
-
"@types/node": "
|
|
37
|
-
"@vitejs/plugin-vue": "6.0.
|
|
38
|
-
"@vitejs/plugin-vue-jsx": "5.1.
|
|
39
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
40
|
-
"@typescript-eslint/parser": "^8.
|
|
41
|
-
"eslint": "^9.
|
|
35
|
+
"@rollup/plugin-typescript": "^12.3.0",
|
|
36
|
+
"@types/node": "22.18.0",
|
|
37
|
+
"@vitejs/plugin-vue": "6.0.2",
|
|
38
|
+
"@vitejs/plugin-vue-jsx": "5.1.2",
|
|
39
|
+
"@typescript-eslint/eslint-plugin": "^8.47.0",
|
|
40
|
+
"@typescript-eslint/parser": "^8.47.0",
|
|
41
|
+
"eslint": "^9.39.1",
|
|
42
42
|
"eslint-config-prettier": "^10.1.8",
|
|
43
43
|
"eslint-plugin-import": "^2.32.0",
|
|
44
44
|
"eslint-plugin-prettier": "^5.5.4",
|
|
45
|
-
"eslint-plugin-vue": "^10.
|
|
46
|
-
"@eslint/js": "^9.
|
|
47
|
-
"globals": "^16.
|
|
45
|
+
"eslint-plugin-vue": "^10.6.0",
|
|
46
|
+
"@eslint/js": "^9.39.1",
|
|
47
|
+
"globals": "^16.5.0",
|
|
48
48
|
"prettier": "^3.6.2",
|
|
49
49
|
"tslib": "^2.8.1",
|
|
50
|
-
"typescript": "5.9.
|
|
51
|
-
"vite": "7.
|
|
52
|
-
"vue-tsc": "^3.
|
|
50
|
+
"typescript": "5.9.3",
|
|
51
|
+
"vite": "7.2.4",
|
|
52
|
+
"vue-tsc": "^3.1.5"
|
|
53
53
|
}
|
|
54
54
|
}
|
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
import { createVNode as N } from "vue";
|
|
2
|
-
import { isString as l, isHtmlStr as p, isObject as c, isNumber as m, is as S, isArray as $, isBoolean as b, isClient as v, isDate as O, 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 { 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 fe, toDecimalPlaces as ce, toInt as pe, toLocaleString as me, toString as ge, unFormatRate as de } from "../utils/math.js";
|
|
4
|
-
import { propTypes as he } from "../utils/vuePropTypes.js";
|
|
5
|
-
import { timeZoneOptions as we } from "../utils/timeZone.js";
|
|
6
|
-
import { withInstall as Ne } from "../utils/withInstall.js";
|
|
7
|
-
function f(e) {
|
|
8
|
-
try {
|
|
9
|
-
return new Function(`'use strict'; return (${e});`)();
|
|
10
|
-
} catch {
|
|
11
|
-
return null;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
function h(e, t = "float", n = 6) {
|
|
15
|
-
let i = String(e);
|
|
16
|
-
if (i = i.replace(/(^\s*)|(\s*$)/g, ""), i !== "") {
|
|
17
|
-
const o = i.indexOf("0") === 0 && i.length > 1 && i.indexOf(".") !== 1, r = t === "int" ? /[^\d]/g : /[^\d.]/g;
|
|
18
|
-
if (i = i.replace(r, ""), o)
|
|
19
|
-
return "0";
|
|
20
|
-
if (t === "int")
|
|
21
|
-
i = i.indexOf("0") === 0 && i.length > 1 ? i.substring(0, i.length - 1) : i;
|
|
22
|
-
else {
|
|
23
|
-
const s = f(`/\\.{${n},}/g`), u = f(`/^(\\d?)+(\\.\\d{0,${n}})?$/`);
|
|
24
|
-
i.indexOf(".") === 0 ? (i = "", i = i.replace(/[^$#$]/g, "0."), i = i.replace(s, ".")) : u.test(i) || (i = i.substring(0, i.length - 1));
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
return i;
|
|
28
|
-
}
|
|
29
|
-
function Se(e, t, n, i = "int", o = 6) {
|
|
30
|
-
return (r) => {
|
|
31
|
-
e[t] = h(r?.target?.value, i, o), n?.();
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
function $e(e) {
|
|
35
|
-
return !l(e) || !p(e) ? e : N("div", { innerHTML: e });
|
|
36
|
-
}
|
|
37
|
-
function be() {
|
|
38
|
-
return window ? `${window.location.protocol}//${window.location.hostname}` : "";
|
|
39
|
-
}
|
|
40
|
-
function ve() {
|
|
41
|
-
const e = new URLSearchParams(window.location.search);
|
|
42
|
-
if (!e.size)
|
|
43
|
-
return;
|
|
44
|
-
const t = {};
|
|
45
|
-
for (const [n, i] of e.entries())
|
|
46
|
-
t[n] = i;
|
|
47
|
-
return t;
|
|
48
|
-
}
|
|
49
|
-
function Oe(e) {
|
|
50
|
-
return l(e) ? e.replace(/\s+/g, "") : "";
|
|
51
|
-
}
|
|
52
|
-
function w(e = {}, t = {}) {
|
|
53
|
-
let n;
|
|
54
|
-
for (n in t)
|
|
55
|
-
e[n] = c(e[n]) ? w(e[n], t[n]) : e[n] = t[n];
|
|
56
|
-
return e;
|
|
57
|
-
}
|
|
58
|
-
function Ue(e, t = 6, { showPrefix: n = !0, showSuffix: i = !0, middleStr: o = "****" } = {}) {
|
|
59
|
-
if (!l(e) && !m(e))
|
|
60
|
-
return e;
|
|
61
|
-
const r = String(e), s = r?.length ?? 0;
|
|
62
|
-
if (!r || !s || t <= 0)
|
|
63
|
-
return r;
|
|
64
|
-
const u = n ? r.substring(0, t) : "", a = i ? r.substring(s - t) : "";
|
|
65
|
-
return `${u}${o}${a}`;
|
|
66
|
-
}
|
|
67
|
-
function Te(e, t = "px") {
|
|
68
|
-
if (!(e === null || e === "" || e === void 0))
|
|
69
|
-
return d(e) ? String(e) : `${g(e)}${t}`;
|
|
70
|
-
}
|
|
71
|
-
function ye(e) {
|
|
72
|
-
return e ? c(e) ? e : e.split(";").reduce((t, n) => {
|
|
73
|
-
const [i, o] = n.trim().split(":");
|
|
74
|
-
if (i) {
|
|
75
|
-
const s = i.trim().replace(/-(\w)/g, (u, a) => a ? a.toUpperCase() : "");
|
|
76
|
-
t[s] = o.trim();
|
|
77
|
-
}
|
|
78
|
-
return t;
|
|
79
|
-
}, {}) : {};
|
|
80
|
-
}
|
|
81
|
-
const De = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
82
|
-
__proto__: null,
|
|
83
|
-
BigNumber: A,
|
|
84
|
-
DOWN: C,
|
|
85
|
-
UP: G,
|
|
86
|
-
add: Z,
|
|
87
|
-
deepMerge: w,
|
|
88
|
-
desensitization: Ue,
|
|
89
|
-
divide: J,
|
|
90
|
-
evalPro: f,
|
|
91
|
-
filterInputNum: h,
|
|
92
|
-
formatRate: K,
|
|
93
|
-
generateFilterInputNumFn: Se,
|
|
94
|
-
getRouterParams: ve,
|
|
95
|
-
getWebsiteUrl: be,
|
|
96
|
-
helper: Q,
|
|
97
|
-
is: S,
|
|
98
|
-
isArray: $,
|
|
99
|
-
isBigNum: X,
|
|
100
|
-
isBool: Y,
|
|
101
|
-
isBoolean: b,
|
|
102
|
-
isClient: v,
|
|
103
|
-
isDate: O,
|
|
104
|
-
isDef: U,
|
|
105
|
-
isEdgeBrowser: T,
|
|
106
|
-
isElement: y,
|
|
107
|
-
isEmail: P,
|
|
108
|
-
isEmpty: x,
|
|
109
|
-
isEqualTo: ee,
|
|
110
|
-
isFunction: E,
|
|
111
|
-
isGreaterThan: ie,
|
|
112
|
-
isGreaterThanOrEqualTo: te,
|
|
113
|
-
isHtmlStr: p,
|
|
114
|
-
isInMobileBrowser: B,
|
|
115
|
-
isInt: ne,
|
|
116
|
-
isIp: I,
|
|
117
|
-
isLessThan: re,
|
|
118
|
-
isLessThanOrEqualTo: oe,
|
|
119
|
-
isMap: L,
|
|
120
|
-
isNanValue: d,
|
|
121
|
-
isNull: D,
|
|
122
|
-
isNullAndUnDef: q,
|
|
123
|
-
isNullOrUnDef: F,
|
|
124
|
-
isNum: se,
|
|
125
|
-
isNumber: m,
|
|
126
|
-
isObject: c,
|
|
127
|
-
isPromise: M,
|
|
128
|
-
isPromiseLink: R,
|
|
129
|
-
isRegExp: _,
|
|
130
|
-
isServer: k,
|
|
131
|
-
isString: l,
|
|
132
|
-
isUnDef: W,
|
|
133
|
-
isUrl: j,
|
|
134
|
-
isValidPhoneNumber: z,
|
|
135
|
-
isWindow: H,
|
|
136
|
-
isZhLang: V,
|
|
137
|
-
multiply: ue,
|
|
138
|
-
power: ae,
|
|
139
|
-
propTypes: he,
|
|
140
|
-
removeWhitespace: Oe,
|
|
141
|
-
renderHtmlStr: $e,
|
|
142
|
-
subtract: le,
|
|
143
|
-
timeZoneOptions: we,
|
|
144
|
-
toBigNum: fe,
|
|
145
|
-
toDecimalPlaces: ce,
|
|
146
|
-
toInt: pe,
|
|
147
|
-
toLocaleString: me,
|
|
148
|
-
toNum: g,
|
|
149
|
-
toString: ge,
|
|
150
|
-
toStyleObject: ye,
|
|
151
|
-
toStyleUnit: Te,
|
|
152
|
-
unFormatRate: de,
|
|
153
|
-
withInstall: Ne
|
|
154
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
155
|
-
export {
|
|
156
|
-
De as U,
|
|
157
|
-
be as a,
|
|
158
|
-
ve as b,
|
|
159
|
-
Oe as c,
|
|
160
|
-
w as d,
|
|
161
|
-
f as e,
|
|
162
|
-
h as f,
|
|
163
|
-
Se as g,
|
|
164
|
-
Ue as h,
|
|
165
|
-
ye as i,
|
|
166
|
-
$e as r,
|
|
167
|
-
Te as t
|
|
168
|
-
};
|