jk-vue-comps 0.2.7 → 0.2.8
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { nextTick as N, createVNode as h } from "vue";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { isObject as c, isString as l, isNumber as f, isHtmlStr as p, is as v, isArray as S, isBoolean as P, isClient as b, isDate as y, isDef as O, isEdgeBrowser as T, isElement as U, isEmail as $, isEmpty as E, isFunction as I, isInMobileBrowser as B, isIp as L, isMap as x, isNull as D, isNullAndUnDef as F, isNullOrUnDef as M, isPromise as R, isPromiseLink as V, isRegExp as W, isServer as _, isUnDef as k, isUrl as q, isValidPhoneNumber as j, isWindow as z, isZhLang as H } from "../utils/is.js";
|
|
3
|
+
import { isNanValue as m, toNum as g, BigNumber as A, DOWN as C, UP as G, add as Z, divide as J, eq as K, formatRate as Q, gt as X, gte as Y, helper as tt, isBigNum as et, isBool as it, isEqualTo as rt, isGreaterThan as nt, isGreaterThanOrEqualTo as ot, isInt as st, isLessThan as at, isLessThanOrEqualTo as ut, isNan as lt, isNum as ct, lt as ft, lte as pt, multiply as mt, power as gt, subtract as dt, toBigNum as wt, toDecimalPlaces as Nt, toInt as ht, toLocaleString as vt, toString as St, unFormatRate as Pt } from "../utils/math.js";
|
|
4
4
|
import { propTypes as bt } from "../utils/vuePropTypes.js";
|
|
5
5
|
import { timeZoneOptions as yt } from "../utils/timeZone.js";
|
|
6
6
|
import { withInstall as Ot } from "../utils/withInstall.js";
|
|
@@ -36,7 +36,7 @@ function Ut(t, e, r, o = "int", i = 6) {
|
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
38
|
function $t(t) {
|
|
39
|
-
return !l(t) || !
|
|
39
|
+
return !l(t) || !p(t) ? t : h("div", { innerHTML: t });
|
|
40
40
|
}
|
|
41
41
|
function Et() {
|
|
42
42
|
return window ? `${window.location.protocol}//${window.location.hostname}` : "";
|
|
@@ -60,7 +60,7 @@ function w(t = {}, e = {}) {
|
|
|
60
60
|
return t;
|
|
61
61
|
}
|
|
62
62
|
function Lt(t, e = 6, { showPrefix: r = !0, showSuffix: o = !0, middleStr: i = "****" } = {}) {
|
|
63
|
-
if (!l(t) && !
|
|
63
|
+
if (!l(t) && !f(t))
|
|
64
64
|
return t;
|
|
65
65
|
const n = String(t), a = n?.length ?? 0;
|
|
66
66
|
if (!n || !a || e <= 0)
|
|
@@ -70,7 +70,7 @@ function Lt(t, e = 6, { showPrefix: r = !0, showSuffix: o = !0, middleStr: i = "
|
|
|
70
70
|
}
|
|
71
71
|
function xt(t, e = "px") {
|
|
72
72
|
if (!(t === null || t === "" || t === void 0))
|
|
73
|
-
return
|
|
73
|
+
return m(t) ? String(t) : `${g(t)}${e}`;
|
|
74
74
|
}
|
|
75
75
|
function Dt(t) {
|
|
76
76
|
return t ? c(t) ? t : t.split(";").reduce((e, r) => {
|
|
@@ -117,7 +117,7 @@ const kt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
117
117
|
isFunction: I,
|
|
118
118
|
isGreaterThan: nt,
|
|
119
119
|
isGreaterThanOrEqualTo: ot,
|
|
120
|
-
isHtmlStr:
|
|
120
|
+
isHtmlStr: p,
|
|
121
121
|
isInMobileBrowser: B,
|
|
122
122
|
isInt: st,
|
|
123
123
|
isIp: L,
|
|
@@ -125,12 +125,12 @@ const kt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
125
125
|
isLessThanOrEqualTo: ut,
|
|
126
126
|
isMap: x,
|
|
127
127
|
isNan: lt,
|
|
128
|
-
isNanValue:
|
|
128
|
+
isNanValue: m,
|
|
129
129
|
isNull: D,
|
|
130
130
|
isNullAndUnDef: F,
|
|
131
131
|
isNullOrUnDef: M,
|
|
132
132
|
isNum: ct,
|
|
133
|
-
isNumber:
|
|
133
|
+
isNumber: f,
|
|
134
134
|
isObject: c,
|
|
135
135
|
isPromise: R,
|
|
136
136
|
isPromiseLink: V,
|
|
@@ -155,7 +155,7 @@ const kt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
155
155
|
toDecimalPlaces: Nt,
|
|
156
156
|
toInt: ht,
|
|
157
157
|
toLocaleString: vt,
|
|
158
|
-
toNum:
|
|
158
|
+
toNum: g,
|
|
159
159
|
toString: St,
|
|
160
160
|
toStyleObject: Dt,
|
|
161
161
|
toStyleUnit: xt,
|
|
@@ -164,15 +164,15 @@ const kt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
164
164
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
165
165
|
export {
|
|
166
166
|
kt as U,
|
|
167
|
-
|
|
167
|
+
Lt as a,
|
|
168
168
|
It as b,
|
|
169
|
-
|
|
169
|
+
Et as c,
|
|
170
170
|
w as d,
|
|
171
171
|
Tt as e,
|
|
172
172
|
d as f,
|
|
173
173
|
Ut as g,
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
174
|
+
$t as h,
|
|
175
|
+
xt as i,
|
|
176
|
+
Bt as r,
|
|
177
|
+
Dt as t
|
|
178
178
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as f, computed as p, onMounted as g, createVNode as h } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { c as w } from "../chunks/index-BAhOHrWo.js";
|
|
3
3
|
import { withInstall as b } from "../utils/withInstall.js";
|
|
4
4
|
import { isInMobileBrowser as l } from "../utils/is.js";
|
|
5
5
|
function u(t, a) {
|
|
@@ -1,26 +1,35 @@
|
|
|
1
|
-
import { ref as l, watch as
|
|
2
|
-
import { isDef as
|
|
3
|
-
function
|
|
4
|
-
const c = l(
|
|
5
|
-
return
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { ref as l, watch as s } from "vue";
|
|
2
|
+
import { isDef as i } from "../utils/is.js";
|
|
3
|
+
function m(n) {
|
|
4
|
+
const c = l(n || ""), e = l(!1), o = l(!1);
|
|
5
|
+
return s(c, (t) => {
|
|
6
|
+
if (i(t) && t !== "")
|
|
7
|
+
try {
|
|
8
|
+
e.value = u(t), o.value = !0;
|
|
9
|
+
} catch (a) {
|
|
10
|
+
e.value = !1, o.value = !1, console.error("Copy failed:", a);
|
|
11
|
+
}
|
|
12
|
+
}, { immediate: !!n, flush: "sync" }), { clipboardRef: c, isSuccessRef: e, copiedRef: o };
|
|
8
13
|
}
|
|
9
|
-
function
|
|
10
|
-
const e = document.createElement("textarea"),
|
|
11
|
-
e.value =
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
function u(n, { target: c = document.body } = {}) {
|
|
15
|
+
const e = document.createElement("textarea"), o = document.activeElement;
|
|
16
|
+
e.value = n, e.setAttribute("readonly", ""), Object.assign(e.style, {
|
|
17
|
+
contain: "strict",
|
|
18
|
+
position: "absolute",
|
|
19
|
+
left: "-9999px",
|
|
20
|
+
fontSize: "12pt"
|
|
21
|
+
});
|
|
22
|
+
const t = document.getSelection(), a = t && t.rangeCount > 0 ? t.getRangeAt(0) : null;
|
|
23
|
+
c.append(e), e.select(), e.selectionStart = 0, e.selectionEnd = n.length;
|
|
16
24
|
try {
|
|
17
|
-
|
|
18
|
-
} catch (
|
|
19
|
-
throw new Error(
|
|
25
|
+
return document.execCommand("copy");
|
|
26
|
+
} catch (r) {
|
|
27
|
+
throw new Error("Unable to copy text to clipboard", { cause: r });
|
|
28
|
+
} finally {
|
|
29
|
+
e.remove(), a && t && (t.removeAllRanges(), t.addRange(a)), o && o.focus && o.focus();
|
|
20
30
|
}
|
|
21
|
-
return e.remove(), s && t && (t.removeAllRanges(), t.addRange(s)), n && n.focus(), r;
|
|
22
31
|
}
|
|
23
32
|
export {
|
|
24
|
-
|
|
25
|
-
|
|
33
|
+
u as copyTextToClipboard,
|
|
34
|
+
m as useCopyToClipboard
|
|
26
35
|
};
|
package/dist/index.js
CHANGED
|
@@ -1,104 +1,104 @@
|
|
|
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 t } from "./chunks/index-
|
|
4
|
-
import { d as n,
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
3
|
+
import { U as t } from "./chunks/index-BAhOHrWo.js";
|
|
4
|
+
import { d as n, a as p, e as u, f, g, b as d, c as h, r as N, h as x, t as T, i as b } from "./chunks/index-BAhOHrWo.js";
|
|
5
|
+
import { BigNumber as U, DOWN as E, UP as y, add as P, divide as S, eq as A, formatRate as B, gt as C, gte as D, helper as I, isBigNum as O, isBool as w, isEqualTo as F, isGreaterThan as L, isGreaterThanOrEqualTo as q, isInt as v, isLessThan as G, isLessThanOrEqualTo as H, isNan as M, isNanValue as R, isNum as W, lt as V, lte as j, multiply as k, power as K, subtract as Z, toBigNum as z, toDecimalPlaces as J, toInt as Q, toLocaleString as X, toNum as Y, toString as _, unFormatRate as $ } from "./utils/math.js";
|
|
6
|
+
import { GoogleAuth as se, toGoogleAuth as te } from "./components/GoogleAuth.js";
|
|
7
|
+
import { TelegramAuth as oe, getTelegramAuthUrlParams as ie, toTelegramAuth as ae } from "./components/TelegramAuth.js";
|
|
8
|
+
import { copyTextToClipboard as le, useCopyToClipboard as ne } from "./hooks/useCopyToClipboard.js";
|
|
9
|
+
import { is as ue, isArray as fe, isBoolean as ge, isClient as de, isDate as he, isDef as Ne, isEdgeBrowser as xe, isElement as Te, isEmail as be, isEmpty as ce, isFunction as Ue, isHtmlStr as Ee, isInMobileBrowser as ye, isIp as Pe, isMap as Se, isNull as Ae, isNullAndUnDef as Be, isNullOrUnDef as Ce, isNumber as De, isObject as Ie, isPromise as Oe, isPromiseLink as we, isRegExp as Fe, isServer as Le, isString as qe, isUnDef as ve, isUrl as Ge, isValidPhoneNumber as He, isWindow as Me, isZhLang as Re } from "./utils/is.js";
|
|
10
|
+
import { propTypes as Ve } from "./utils/vuePropTypes.js";
|
|
11
|
+
import { timeZoneOptions as ke } from "./utils/timeZone.js";
|
|
12
|
+
import { useFormKeypressEnter as Ze } from "./hooks/useFormKeypressEnter.js";
|
|
13
|
+
import { useMemo as Je } from "./hooks/useMemo.js";
|
|
14
14
|
import { withInstall as Xe } from "./utils/withInstall.js";
|
|
15
15
|
const a = { ...e, ...s, ...t, Comps: e, Hooks: s, Utils: t };
|
|
16
16
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
U as BigNumber,
|
|
18
|
+
E as DOWN,
|
|
19
|
+
se as GoogleAuth,
|
|
20
|
+
oe as TelegramAuth,
|
|
21
|
+
y as UP,
|
|
22
|
+
P as add,
|
|
23
|
+
le as copyTextToClipboard,
|
|
24
24
|
n as deepMerge,
|
|
25
25
|
a as default,
|
|
26
26
|
p as desensitization,
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
S as divide,
|
|
28
|
+
A as eq,
|
|
29
29
|
u as evalPro,
|
|
30
30
|
f as filterInputNum,
|
|
31
|
-
|
|
31
|
+
B as formatRate,
|
|
32
32
|
g as generateFilterInputNumFn,
|
|
33
33
|
d as getRouterParams,
|
|
34
|
-
|
|
34
|
+
ie as getTelegramAuthUrlParams,
|
|
35
35
|
h as getWebsiteUrl,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
36
|
+
C as gt,
|
|
37
|
+
D as gte,
|
|
38
|
+
I as helper,
|
|
39
|
+
ue as is,
|
|
40
|
+
fe as isArray,
|
|
41
|
+
O as isBigNum,
|
|
42
|
+
w as isBool,
|
|
43
|
+
ge as isBoolean,
|
|
44
|
+
de as isClient,
|
|
45
|
+
he as isDate,
|
|
46
|
+
Ne as isDef,
|
|
47
|
+
xe as isEdgeBrowser,
|
|
48
|
+
Te as isElement,
|
|
49
|
+
be as isEmail,
|
|
50
|
+
ce as isEmpty,
|
|
51
|
+
F as isEqualTo,
|
|
52
|
+
Ue as isFunction,
|
|
53
|
+
L as isGreaterThan,
|
|
54
|
+
q as isGreaterThanOrEqualTo,
|
|
55
|
+
Ee as isHtmlStr,
|
|
56
|
+
ye as isInMobileBrowser,
|
|
57
|
+
v as isInt,
|
|
58
|
+
Pe as isIp,
|
|
59
|
+
G as isLessThan,
|
|
60
|
+
H as isLessThanOrEqualTo,
|
|
61
|
+
Se as isMap,
|
|
62
|
+
M as isNan,
|
|
63
|
+
R as isNanValue,
|
|
64
|
+
Ae as isNull,
|
|
65
|
+
Be as isNullAndUnDef,
|
|
66
|
+
Ce as isNullOrUnDef,
|
|
67
|
+
W as isNum,
|
|
68
|
+
De as isNumber,
|
|
69
|
+
Ie as isObject,
|
|
70
|
+
Oe as isPromise,
|
|
71
|
+
we as isPromiseLink,
|
|
72
|
+
Fe as isRegExp,
|
|
73
|
+
Le as isServer,
|
|
74
|
+
qe as isString,
|
|
75
|
+
ve as isUnDef,
|
|
76
|
+
Ge as isUrl,
|
|
77
|
+
He as isValidPhoneNumber,
|
|
78
|
+
Me as isWindow,
|
|
79
|
+
Re as isZhLang,
|
|
80
|
+
V as lt,
|
|
81
|
+
j as lte,
|
|
82
|
+
k as multiply,
|
|
83
|
+
K as power,
|
|
84
|
+
Ve as propTypes,
|
|
85
85
|
N as removeWhitespace,
|
|
86
86
|
x as renderHtmlStr,
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
87
|
+
Z as subtract,
|
|
88
|
+
ke as timeZoneOptions,
|
|
89
|
+
z as toBigNum,
|
|
90
|
+
J as toDecimalPlaces,
|
|
91
|
+
te as toGoogleAuth,
|
|
92
|
+
Q as toInt,
|
|
93
|
+
X as toLocaleString,
|
|
94
|
+
Y as toNum,
|
|
95
|
+
_ as toString,
|
|
96
96
|
T as toStyleObject,
|
|
97
97
|
b as toStyleUnit,
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
98
|
+
ae as toTelegramAuth,
|
|
99
|
+
$ as unFormatRate,
|
|
100
|
+
ne as useCopyToClipboard,
|
|
101
|
+
Ze as useFormKeypressEnter,
|
|
102
|
+
Je as useMemo,
|
|
103
103
|
Xe as withInstall
|
|
104
104
|
};
|
package/dist/utils/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { BigNumber as F, DOWN as R, UP as W, add as M, divide as j, eq as A, for
|
|
|
4
4
|
import { propTypes as fe } from "./vuePropTypes.js";
|
|
5
5
|
import { timeZoneOptions as he } from "./timeZone.js";
|
|
6
6
|
import { withInstall as ce } from "./withInstall.js";
|
|
7
|
-
import { d as Se,
|
|
7
|
+
import { d as Se, a as Te, e as xe, f as Be, g as De, b as Ie, c as Oe, r as Pe, h as Ue, t as ye, i as we } from "../chunks/index-BAhOHrWo.js";
|
|
8
8
|
export {
|
|
9
9
|
F as BigNumber,
|
|
10
10
|
R as DOWN,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jk-vue-comps",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.8",
|
|
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.
|
|
31
|
-
"vue-types": "
|
|
32
|
-
"bignumber.js": "
|
|
30
|
+
"vue": "3.5.28",
|
|
31
|
+
"vue-types": "6.0.0",
|
|
32
|
+
"bignumber.js": "9.3.1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
36
36
|
"@types/node": "22.18.0",
|
|
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": "^
|
|
37
|
+
"@vitejs/plugin-vue": "6.0.4",
|
|
38
|
+
"@vitejs/plugin-vue-jsx": "5.1.4",
|
|
39
|
+
"@typescript-eslint/eslint-plugin": "^8.56.1",
|
|
40
|
+
"@typescript-eslint/parser": "^8.56.1",
|
|
41
|
+
"eslint": "^10.0.2",
|
|
42
42
|
"eslint-config-prettier": "^10.1.8",
|
|
43
43
|
"eslint-plugin-import": "^2.32.0",
|
|
44
44
|
"eslint-plugin-prettier": "^5.5.5",
|
|
45
|
-
"eslint-plugin-vue": "^10.
|
|
46
|
-
"@eslint/js": "^
|
|
47
|
-
"globals": "^17.
|
|
48
|
-
"prettier": "^3.8.
|
|
45
|
+
"eslint-plugin-vue": "^10.8.0",
|
|
46
|
+
"@eslint/js": "^10.0.1",
|
|
47
|
+
"globals": "^17.3.0",
|
|
48
|
+
"prettier": "^3.8.1",
|
|
49
49
|
"tslib": "^2.8.1",
|
|
50
50
|
"typescript": "5.9.3",
|
|
51
51
|
"vite": "7.3.1",
|
|
52
|
-
"vue-tsc": "^3.2.
|
|
52
|
+
"vue-tsc": "^3.2.5"
|
|
53
53
|
}
|
|
54
54
|
}
|