jk-vue-comps 0.1.6 → 0.1.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.
package/README.md CHANGED
@@ -1,3 +1,3 @@
1
- # jk-vue-comps
2
-
3
- npm install jk-vue-comps
1
+ # jk-vue-comps
2
+
3
+ npm install jk-vue-comps
@@ -0,0 +1,154 @@
1
+ import { nextTick as p, createVNode as h } from "vue";
2
+ import { isString as u, isHtmlStr as l, isObject as f, isNumber as c, is as w, isArray as S, isBoolean as N, isClient as b, isDate as x, isDef as $, isEdgeBrowser as O, isElement as T, isEmail as P, isEmpty as v, isFunction as y, isInMobileBrowser as E, isIp as I, isMap as L, isNull as B, isNullAndUnDef as U, isNullOrUnDef as q, isPromise as D, isPromiseLink as F, isRegExp as M, isServer as R, isUnDef as k, isUrl as _, isValidPhoneNumber as j, isWindow as z, isZhLang as H } from "../utils/is.js";
3
+ import { add as V, divide as W, formatRate as A, helper as G, isBigNum as Z, isBool as C, isEqualTo as J, isGreaterThan as K, isGreaterThanOrEqualTo as Q, isInt as X, isLessThan as Y, isLessThanOrEqualTo as ee, isNanValue as ie, isNum as te, multiply as re, power as ne, subtract as se, toBigNum as oe, toDecimalPlaces as ue, toInt as ae, toLocaleString as le, toNum as fe, toString as ce, unFormatRate as me } from "../utils/math.js";
4
+ import { propTypes as de } from "../utils/vuePropTypes.js";
5
+ import { timeZoneOptions as ge } from "../utils/timeZone.js";
6
+ import { withInstall as pe } from "../utils/withInstall.js";
7
+ function a(i) {
8
+ try {
9
+ return new Function(`'use strict'; return (${i});`)();
10
+ } catch {
11
+ return null;
12
+ }
13
+ }
14
+ function m(i, r = "float", t = 6) {
15
+ let e = String(i);
16
+ if (e = e.replace(/(^\s*)|(\s*$)/g, ""), e !== "") {
17
+ const s = e.indexOf("0") === 0 && e.length > 1 && e.indexOf(".") !== 1, n = r === "int" ? /[^\d]/g : /[^\d.]/g;
18
+ if (e = e.replace(n, ""), s)
19
+ return "0";
20
+ if (r === "int")
21
+ e = e.indexOf("0") === 0 && e.length > 1 ? e.substring(0, e.length - 1) : e;
22
+ else {
23
+ const o = a(`/\\.{${t},}/g`), g = a(`/^(\\d?)+(\\.\\d{0,${t}})?$/`);
24
+ e.indexOf(".") === 0 ? (e = "", e = e.replace(/[^$#$]/g, "0."), e = e.replace(o, ".")) : g.test(e) || (e = e.substring(0, e.length - 1));
25
+ }
26
+ }
27
+ return e;
28
+ }
29
+ function he(i, r, t, e = "int", s = 6) {
30
+ return (n) => {
31
+ p().then(() => {
32
+ var o;
33
+ i[r] = m((o = n == null ? void 0 : n.target) == null ? void 0 : o.value, e, s), t == null || t();
34
+ });
35
+ };
36
+ }
37
+ function we(i) {
38
+ return !u(i) || !l(i) ? i : h("div", { innerHTML: i });
39
+ }
40
+ function Se() {
41
+ return window ? `${window.location.protocol}//${window.location.hostname}` : "";
42
+ }
43
+ function Ne() {
44
+ const i = new URLSearchParams(window.location.search);
45
+ if (!i.size)
46
+ return;
47
+ const r = {};
48
+ for (const [t, e] of i.entries())
49
+ r[t] = e;
50
+ return r;
51
+ }
52
+ function be(i) {
53
+ return u(i) ? i.replace(/\s+/g, "") : "";
54
+ }
55
+ function d(i = {}, r = {}) {
56
+ let t;
57
+ for (t in r)
58
+ i[t] = f(i[t]) ? d(i[t], r[t]) : i[t] = r[t];
59
+ return i;
60
+ }
61
+ function xe(i, r = 6, t = {
62
+ showPrefix: !0,
63
+ showSuffix: !0,
64
+ middleStr: "****"
65
+ }) {
66
+ if (!u(i) && !c(i))
67
+ return i;
68
+ const e = String(i), s = (e == null ? void 0 : e.length) ?? 0;
69
+ if (!e || !s || r <= 0)
70
+ return e;
71
+ const n = t.showPrefix ? e.substring(0, r) : "", o = t.showSuffix ? e.substring(s - r) : "";
72
+ return `${n}${t.middleStr}${o}`;
73
+ }
74
+ const Ee = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
75
+ __proto__: null,
76
+ add: V,
77
+ deepMerge: d,
78
+ desensitization: xe,
79
+ divide: W,
80
+ evalPro: a,
81
+ filterInputNum: m,
82
+ formatRate: A,
83
+ generateFilterInputNumFn: he,
84
+ getRouterParams: Ne,
85
+ getWebsiteUrl: Se,
86
+ helper: G,
87
+ is: w,
88
+ isArray: S,
89
+ isBigNum: Z,
90
+ isBool: C,
91
+ isBoolean: N,
92
+ isClient: b,
93
+ isDate: x,
94
+ isDef: $,
95
+ isEdgeBrowser: O,
96
+ isElement: T,
97
+ isEmail: P,
98
+ isEmpty: v,
99
+ isEqualTo: J,
100
+ isFunction: y,
101
+ isGreaterThan: K,
102
+ isGreaterThanOrEqualTo: Q,
103
+ isHtmlStr: l,
104
+ isInMobileBrowser: E,
105
+ isInt: X,
106
+ isIp: I,
107
+ isLessThan: Y,
108
+ isLessThanOrEqualTo: ee,
109
+ isMap: L,
110
+ isNanValue: ie,
111
+ isNull: B,
112
+ isNullAndUnDef: U,
113
+ isNullOrUnDef: q,
114
+ isNum: te,
115
+ isNumber: c,
116
+ isObject: f,
117
+ isPromise: D,
118
+ isPromiseLink: F,
119
+ isRegExp: M,
120
+ isServer: R,
121
+ isString: u,
122
+ isUnDef: k,
123
+ isUrl: _,
124
+ isValidPhoneNumber: j,
125
+ isWindow: z,
126
+ isZhLang: H,
127
+ multiply: re,
128
+ power: ne,
129
+ propTypes: de,
130
+ removeWhitespace: be,
131
+ renderHtmlStr: we,
132
+ subtract: se,
133
+ timeZoneOptions: ge,
134
+ toBigNum: oe,
135
+ toDecimalPlaces: ue,
136
+ toInt: ae,
137
+ toLocaleString: le,
138
+ toNum: fe,
139
+ toString: ce,
140
+ unFormatRate: me,
141
+ withInstall: pe
142
+ }, Symbol.toStringTag, { value: "Module" }));
143
+ export {
144
+ Se as a,
145
+ Ne as b,
146
+ be as c,
147
+ d,
148
+ a as e,
149
+ m as f,
150
+ he as g,
151
+ xe as h,
152
+ we as r,
153
+ Ee as u
154
+ };
@@ -1,11 +1,12 @@
1
1
  import { defineComponent as g, ref as p, onMounted as h, createVNode as C } from "vue";
2
- import { p as f } from "../chunks/vuePropTypes-BV0onEYv.js";
3
- import { C as w, A as _ } from "../chunks/is-bvgc5qxU.js";
4
- import { w as b } from "../chunks/withInstall-b5j1glXj.js";
2
+ import { propTypes as f } from "../utils/vuePropTypes.js";
3
+ import { isEdgeBrowser as w, isInMobileBrowser as _ } from "../utils/is.js";
4
+ import "../utils/math.js";
5
+ import { withInstall as b } from "../utils/withInstall.js";
5
6
  function v(o, r) {
6
7
  if (!o || !r)
7
8
  return;
8
- const c = encodeURIComponent(r), a = encodeURIComponent("email profile"), i = encodeURIComponent(o), n = `https://accounts.google.com/o/oauth2/v2/auth?response_type=code&redirect_uri=${c}&scope=${a}&client_id=${i}`;
9
+ const c = encodeURIComponent(r), s = encodeURIComponent("email profile"), i = encodeURIComponent(o), n = `https://accounts.google.com/o/oauth2/v2/auth?response_type=code&redirect_uri=${c}&scope=${s}&client_id=${i}`;
9
10
  w() ? window.open(n, "_self") : window.location.href = n;
10
11
  }
11
12
  const I = /* @__PURE__ */ g({
@@ -23,35 +24,35 @@ const I = /* @__PURE__ */ g({
23
24
  setup(o, {
24
25
  emit: r,
25
26
  slots: c,
26
- expose: a
27
+ expose: s
27
28
  }) {
28
- const i = p(null), n = p(!0), s = () => {
29
+ const i = p(null), n = p(!0), u = () => {
29
30
  var e, t, l;
30
31
  return (l = (t = (e = window == null ? void 0 : window.google) == null ? void 0 : e.accounts) == null ? void 0 : t.oauth2) == null ? void 0 : l.initCodeClient;
31
32
  };
32
33
  function d() {
33
34
  var e, t, l;
34
- (l = (t = (e = s()) == null ? void 0 : e({
35
+ (l = (t = (e = u()) == null ? void 0 : e({
35
36
  client_id: o.clientId,
36
37
  scope: "email profile",
37
38
  redirect_uri: o.redirectUri,
38
39
  ux_mode: _() ? "redirect" : "popup",
39
- callback(u) {
40
- u.error ? r("rejectCallback", u) : r("callback", u);
40
+ callback(a) {
41
+ a.error ? r("rejectCallback", a) : r("callback", a);
41
42
  }
42
43
  })) == null ? void 0 : t.requestCode) == null || l.call(t);
43
44
  }
44
45
  function m() {
45
- if (!(window != null && window.document) || s() || !i.value) {
46
- s() && (n.value = !1);
46
+ if (!(window != null && window.document) || u() || !i.value) {
47
+ u() && (n.value = !1);
47
48
  return;
48
49
  }
49
50
  const e = document.createElement("script");
50
51
  e.async = !0, e.defer = !0, e.src = "https://accounts.google.com/gsi/client", i.value.appendChild(e), e.onload = () => {
51
- s() && (n.value = !1);
52
+ u() && (n.value = !1);
52
53
  };
53
54
  }
54
- return h(m), a({
55
+ return h(m), s({
55
56
  startCheck: d
56
57
  }), () => {
57
58
  var e;
@@ -62,9 +63,9 @@ const I = /* @__PURE__ */ g({
62
63
  }))]);
63
64
  };
64
65
  }
65
- }), R = b(I);
66
+ }), j = b(I);
66
67
  export {
67
- R as GoogleAuth,
68
- R as default,
68
+ j as GoogleAuth,
69
+ j as default,
69
70
  v as toGoogleAuth
70
71
  };
@@ -1,13 +1,13 @@
1
1
  import { defineComponent as h, ref as g, onMounted as w, createVNode as b } from "vue";
2
- import { p as m } from "../chunks/vuePropTypes-BV0onEYv.js";
3
- import { a as A } from "../chunks/index-2VK0fFTB.js";
4
- import { w as C } from "../chunks/withInstall-b5j1glXj.js";
5
- import { C as _, A as p } from "../chunks/is-bvgc5qxU.js";
2
+ import { propTypes as m } from "../utils/vuePropTypes.js";
3
+ import { a as _ } from "../chunks/index-BPap5bmS.js";
4
+ import { withInstall as A } from "../utils/withInstall.js";
5
+ import { isEdgeBrowser as C, isInMobileBrowser as p } from "../utils/is.js";
6
6
  function d(r, o) {
7
7
  if (!r || !o)
8
8
  return;
9
- const t = encodeURIComponent(A()), n = encodeURIComponent(o), a = `https://oauth.telegram.org/auth?bot_id=${r}&origin=${t}&embed=1&request_access=write&return_to=${t}${n}`;
10
- _() ? window.open(a, "_self") : window.location.href = a;
9
+ const t = encodeURIComponent(_()), n = encodeURIComponent(o), a = `https://oauth.telegram.org/auth?bot_id=${r}&origin=${t}&embed=1&request_access=write&return_to=${t}${n}`;
10
+ C() ? window.open(a, "_self") : window.location.href = a;
11
11
  }
12
12
  function T() {
13
13
  const r = /[#\?\&]tgAuthResult=([A-Za-z0-9\-_=]*)$/;
@@ -41,23 +41,23 @@ const j = /* @__PURE__ */ h({
41
41
  slots: t,
42
42
  expose: n
43
43
  }) {
44
- const a = g(null), i = () => {
44
+ const a = g(null), l = () => {
45
45
  var e, c;
46
46
  return (c = (e = window == null ? void 0 : window.Telegram) == null ? void 0 : e.Login) == null ? void 0 : c.auth;
47
47
  };
48
- function l() {
48
+ function s() {
49
49
  const {
50
50
  botId: e,
51
51
  toPath: c
52
52
  } = r;
53
53
  if (!e)
54
54
  return;
55
- const s = i();
56
- if (p() || !s) {
55
+ const i = l();
56
+ if (p() || !i) {
57
57
  d(e, c);
58
58
  return;
59
59
  }
60
- s == null || s({
60
+ i == null || i({
61
61
  bot_id: e,
62
62
  request_access: !0
63
63
  }, (u) => {
@@ -66,23 +66,23 @@ const j = /* @__PURE__ */ h({
66
66
  }
67
67
  function f() {
68
68
  var c;
69
- if (!(window != null && window.document) || i() || p())
69
+ if (!(window != null && window.document) || l() || p())
70
70
  return;
71
71
  const e = document.createElement("script");
72
72
  e.async = !0, e.defer = !0, e.src = "https://telegram.org/js/telegram-widget.js", (c = a.value) == null || c.appendChild(e);
73
73
  }
74
74
  return w(f), n({
75
- startCheck: l
75
+ startCheck: s
76
76
  }), () => {
77
77
  var e;
78
78
  return b("div", {
79
79
  ref: a
80
80
  }, [(e = t.default) == null ? void 0 : e.call(t, {
81
- startCheck: l
81
+ startCheck: s
82
82
  })]);
83
83
  };
84
84
  }
85
- }), R = C(j);
85
+ }), R = A(j);
86
86
  export {
87
87
  R as TelegramAuth,
88
88
  R as default,
package/dist/index.d.ts CHANGED
@@ -3,24 +3,26 @@ import * as utils from './utils';
3
3
  export * from './components';
4
4
  export * from './utils';
5
5
  declare const JKVUEComps: {
6
- Utils: {
7
- is: typeof import("./utils/is");
8
- propTypes: typeof import("./utils/vuePropTypes");
9
- timeZone: typeof import("./utils/timeZone");
10
- withInstall: typeof import("./utils/withInstall");
11
- };
6
+ Utils: typeof utils;
12
7
  Comps: typeof comps;
13
8
  evalPro(str: string): any;
14
- filterInputNum(e: string | number, type?: "int" | "float", maxDecimal?: number): string;
15
- generateHandleInputFn<T extends object, K extends keyof T>(obj: T, key: K, fn?: (() => void) | undefined, type?: "int" | "float", maxDecimal?: number): (e: ChangeEvent) => void;
9
+ filterInputNum(eventVal: string | number, type?: "int" | "float", maxDecimal?: number): string;
10
+ generateFilterInputNumFn<T extends Record<string, any>, K extends keyof T>(obj: T, key: K, fn?: (() => void) | undefined, type?: "int" | "float", maxDecimal?: number): (e: ChangeEvent) => void;
16
11
  renderHtmlStr(html: string): string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
17
12
  [key: string]: any;
18
13
  }>;
19
14
  getWebsiteUrl(): string;
20
15
  getRouterParams(): Recordable<any> | undefined;
16
+ removeWhitespace(str: any): string;
17
+ deepMerge<T_1 = any>(src?: any, target?: any): T_1;
18
+ desensitization(str?: string | number | undefined, number?: number, options?: {
19
+ showPrefix?: boolean | undefined;
20
+ showSuffix?: boolean | undefined;
21
+ middleStr?: string | undefined;
22
+ }): string | undefined;
21
23
  is(val: unknown, type: string): boolean;
22
- isDef<T_1 = unknown>(val?: T_1 | undefined): val is T_1;
23
- isUnDef<T_2 = unknown>(val?: T_2 | undefined): val is T_2;
24
+ isDef<T_2 = unknown>(val?: T_2 | undefined): val is T_2;
25
+ isUnDef<T_3 = unknown>(val?: T_3 | undefined): val is T_3;
24
26
  isObject(val: any): val is Record<any, any>;
25
27
  isDate(val: unknown): val is Date;
26
28
  isNull(val: unknown): val is null;
@@ -32,9 +34,9 @@ declare const JKVUEComps: {
32
34
  isBoolean(val: unknown): val is boolean;
33
35
  isRegExp(val: unknown): val is RegExp;
34
36
  isArray(val: any): val is any[];
35
- isEmpty<T_3 = unknown>(val: T_3): val is T_3;
36
- isPromise<T_4 = any>(val: unknown): val is Promise<T_4>;
37
- isPromiseLink<T_5>(it: T_5 | PromiseLike<T_5>): it is PromiseLike<T_5>;
37
+ isEmpty<T_4 = unknown>(val: T_4): val is T_4;
38
+ isPromise<T_5 = any>(val: unknown): val is Promise<T_5>;
39
+ isPromiseLink<T_6>(it: T_6 | PromiseLike<T_6>): it is PromiseLike<T_6>;
38
40
  isWindow(val: any): val is Window;
39
41
  isElement(val: unknown): val is Element;
40
42
  isMap(val: unknown): val is Map<any, any>;
@@ -48,9 +50,33 @@ declare const JKVUEComps: {
48
50
  isIp: (ip: string) => boolean;
49
51
  isEmail: (email: string) => boolean;
50
52
  isHtmlStr: (str: string) => boolean;
53
+ helper(val: utils.BigNumValType): import("bignumber.js").BigNumber;
54
+ isBool(val: any): val is boolean;
55
+ isBigNum(val: any): val is import("bignumber.js").BigNumber;
56
+ isNum(val: any): val is number;
57
+ isNanValue(val: any): boolean;
58
+ isInt(val: any): boolean;
59
+ isGreaterThan(num1: import("bignumber.js").BigNumber.Value, num2: import("bignumber.js").BigNumber.Value): boolean;
60
+ isLessThan(num1: import("bignumber.js").BigNumber.Value, num2: import("bignumber.js").BigNumber.Value): boolean;
61
+ isEqualTo(num1: import("bignumber.js").BigNumber.Value, num2: import("bignumber.js").BigNumber.Value): boolean;
62
+ isGreaterThanOrEqualTo(num1: import("bignumber.js").BigNumber.Value, num2: import("bignumber.js").BigNumber.Value): boolean;
63
+ isLessThanOrEqualTo(num1: import("bignumber.js").BigNumber.Value, num2: import("bignumber.js").BigNumber.Value): boolean;
64
+ toBigNum(val: utils.BigNumValType): import("bignumber.js").BigNumber;
65
+ toNum(val: utils.BigNumValType): number;
66
+ toInt(val: utils.BigNumValType, isUp?: boolean): number;
67
+ toString(val: utils.BigNumValType): string;
68
+ toDecimalPlaces(val: utils.BigNumValType, decimal?: number | undefined, isUp?: boolean): number;
69
+ toLocaleString(val: utils.BigNumValType): string;
70
+ add(...vals: utils.BigNumValType[]): number;
71
+ subtract(...vals: utils.BigNumValType[]): number;
72
+ multiply(...vals: utils.BigNumValType[]): number;
73
+ divide(...vals: utils.BigNumValType[]): number;
74
+ power(base: utils.BigNumValType, exponent: utils.BigNumValType): number;
75
+ formatRate(val: utils.BigNumValType, unit?: string): string;
76
+ unFormatRate(val: utils.BigNumValType): number;
51
77
  propTypes: typeof import("./utils/vuePropTypes").default;
52
78
  timeZoneOptions: utils.TimeZoneItem[];
53
- withInstall<T_6>(component: T_6, alias?: string | undefined): T_6 & import("vue").Plugin;
79
+ withInstall<T_7>(component: T_7, alias?: string | undefined): T_7 & import("vue").Plugin;
54
80
  toGoogleAuth(clientId: string, redirectUri: string): void;
55
81
  GoogleAuth: {
56
82
  new (...args: any[]): import("vue").CreateComponentPublicInstance<Readonly<import("vue").ExtractPropTypes<{
package/dist/index.js CHANGED
@@ -1,63 +1,90 @@
1
- import { c as s } from "./chunks/index-BP9Q78TM.js";
2
- import { u as a, U as e } from "./chunks/index-2VK0fFTB.js";
3
- import { e as m, f as n, g as p, b as u, a as f, r as g } from "./chunks/index-2VK0fFTB.js";
4
- import { GoogleAuth as U, toGoogleAuth as h } from "./components/GoogleAuth.js";
5
- import { TelegramAuth as A, getTelegramAuthUrlParams as b, toTelegramAuth as c } from "./components/TelegramAuth.js";
6
- import { i as D, n as E, l as N, v as P, d as I, a as y, C as B, s as C, y as S, o as T, k as v, D as H, A as O, x as j, t as k, e as F, f as G, g as L, h as M, c as R, p as V, q as W, m as Z, u as q, j as z, b as J, w as K, z as Q, r as X, B as Y } from "./chunks/is-bvgc5qxU.js";
7
- import { p as $ } from "./chunks/vuePropTypes-BV0onEYv.js";
8
- import { t as as } from "./chunks/timeZone-CYGfhbdm.js";
9
- import { w as rs } from "./chunks/withInstall-b5j1glXj.js";
1
+ import { c as e } from "./chunks/index-BP9Q78TM.js";
2
+ import { u as s } from "./chunks/index-BPap5bmS.js";
3
+ import { d as l, h as m, e as n, f as u, g as p, b as g, a as f, c as h, r as d } from "./chunks/index-BPap5bmS.js";
4
+ import { GoogleAuth as c, toGoogleAuth as T } from "./components/GoogleAuth.js";
5
+ import { TelegramAuth as E, getTelegramAuthUrlParams as U, toTelegramAuth as b } from "./components/TelegramAuth.js";
6
+ import { is as I, isArray as P, isBoolean as B, isClient as D, isDate as S, isDef as w, isEdgeBrowser as L, isElement as O, isEmail as v, isEmpty as y, isFunction as F, isHtmlStr as G, isInMobileBrowser as R, isIp as q, isMap as C, isNull as M, isNullAndUnDef as V, isNullOrUnDef as W, isNumber as H, isObject as Z, isPromise as j, isPromiseLink as k, isRegExp as z, isServer as J, isString as K, isUnDef as Q, isUrl as X, isValidPhoneNumber as Y, isWindow as _, isZhLang as $ } from "./utils/is.js";
7
+ import { add as se, divide as ie, formatRate as re, helper as te, isBigNum as oe, isBool as ae, isEqualTo as le, isGreaterThan as me, isGreaterThanOrEqualTo as ne, isInt as ue, isLessThan as pe, isLessThanOrEqualTo as ge, isNanValue as fe, isNum as he, multiply as de, power as Ne, subtract as ce, toBigNum as Te, toDecimalPlaces as xe, toInt as Ee, toLocaleString as Ue, toNum as be, toString as Ae, unFormatRate as Ie } from "./utils/math.js";
8
+ import { propTypes as Be } from "./utils/vuePropTypes.js";
9
+ import { timeZoneOptions as Se } from "./utils/timeZone.js";
10
+ import { withInstall as Le } from "./utils/withInstall.js";
10
11
  const t = {
12
+ ...e,
11
13
  ...s,
12
- ...a,
13
- Utils: e,
14
- Comps: s
14
+ Utils: s,
15
+ Comps: e
15
16
  };
16
17
  export {
17
- U as GoogleAuth,
18
- A as TelegramAuth,
19
- e as Utils,
18
+ c as GoogleAuth,
19
+ E as TelegramAuth,
20
+ se as add,
21
+ l as deepMerge,
20
22
  t as default,
21
- m as evalPro,
22
- n as filterInputNum,
23
- p as generateHandleInputFn,
24
- u as getRouterParams,
25
- b as getTelegramAuthUrlParams,
23
+ m as desensitization,
24
+ ie as divide,
25
+ n as evalPro,
26
+ u as filterInputNum,
27
+ re as formatRate,
28
+ p as generateFilterInputNumFn,
29
+ g as getRouterParams,
30
+ U as getTelegramAuthUrlParams,
26
31
  f as getWebsiteUrl,
27
- D as is,
28
- E as isArray,
29
- N as isBoolean,
30
- P as isClient,
31
- I as isDate,
32
- y as isDef,
33
- B as isEdgeBrowser,
34
- C as isElement,
35
- S as isEmail,
36
- T as isEmpty,
37
- v as isFunction,
38
- H as isHtmlStr,
39
- O as isInMobileBrowser,
40
- j as isIp,
41
- k as isMap,
42
- F as isNull,
43
- G as isNullAndUnDef,
44
- L as isNullOrUnDef,
45
- M as isNumber,
46
- R as isObject,
47
- V as isPromise,
48
- W as isPromiseLink,
49
- Z as isRegExp,
50
- q as isServer,
51
- z as isString,
52
- J as isUnDef,
53
- K as isUrl,
54
- Q as isValidPhoneNumber,
55
- X as isWindow,
56
- Y as isZhLang,
57
- $ as propTypes,
58
- g as renderHtmlStr,
59
- as as timeZoneOptions,
60
- h as toGoogleAuth,
61
- c as toTelegramAuth,
62
- rs as withInstall
32
+ te as helper,
33
+ I as is,
34
+ P as isArray,
35
+ oe as isBigNum,
36
+ ae as isBool,
37
+ B as isBoolean,
38
+ D as isClient,
39
+ S as isDate,
40
+ w as isDef,
41
+ L as isEdgeBrowser,
42
+ O as isElement,
43
+ v as isEmail,
44
+ y as isEmpty,
45
+ le as isEqualTo,
46
+ F as isFunction,
47
+ me as isGreaterThan,
48
+ ne as isGreaterThanOrEqualTo,
49
+ G as isHtmlStr,
50
+ R as isInMobileBrowser,
51
+ ue as isInt,
52
+ q as isIp,
53
+ pe as isLessThan,
54
+ ge as isLessThanOrEqualTo,
55
+ C as isMap,
56
+ fe as isNanValue,
57
+ M as isNull,
58
+ V as isNullAndUnDef,
59
+ W as isNullOrUnDef,
60
+ he as isNum,
61
+ H as isNumber,
62
+ Z as isObject,
63
+ j as isPromise,
64
+ k as isPromiseLink,
65
+ z as isRegExp,
66
+ J as isServer,
67
+ K as isString,
68
+ Q as isUnDef,
69
+ X as isUrl,
70
+ Y as isValidPhoneNumber,
71
+ _ as isWindow,
72
+ $ as isZhLang,
73
+ de as multiply,
74
+ Ne as power,
75
+ Be as propTypes,
76
+ h as removeWhitespace,
77
+ d as renderHtmlStr,
78
+ ce as subtract,
79
+ Se as timeZoneOptions,
80
+ Te as toBigNum,
81
+ xe as toDecimalPlaces,
82
+ T as toGoogleAuth,
83
+ Ee as toInt,
84
+ Ue as toLocaleString,
85
+ be as toNum,
86
+ Ae as toString,
87
+ b as toTelegramAuth,
88
+ Ie as unFormatRate,
89
+ Le as withInstall
63
90
  };
@@ -1,24 +1,47 @@
1
- import * as is from './is';
2
- import * as propTypes from './vuePropTypes';
3
- import * as timeZone from './timeZone';
4
- import * as withInstall from './withInstall';
5
1
  export * from './is';
2
+ export * from './math';
6
3
  export * from './vuePropTypes';
7
4
  export * from './timeZone';
8
5
  export * from './withInstall';
9
- export declare const Utils: {
10
- is: typeof is;
11
- propTypes: typeof propTypes;
12
- timeZone: typeof timeZone;
13
- withInstall: typeof withInstall;
14
- };
6
+ /** 代替eval方法 */
15
7
  export declare function evalPro(str: string): any;
16
- export declare function filterInputNum(e: string | number, type?: 'int' | 'float', maxDecimal?: number): string;
17
- /** 生成输入数字过滤函数 */
18
- export declare function generateHandleInputFn<T extends object, K extends keyof T>(obj: T, key: K, fn?: () => void, type?: 'float' | 'int', maxDecimal?: number): (e: ChangeEvent) => void;
8
+ /** 数字输入过滤
9
+ * @param eventVal 输入的值
10
+ * @param type 输入类型,int整数,float,default: 'int'
11
+ * @param maxDecimal 最大小数位,default: 6
12
+ */
13
+ export declare function filterInputNum(eventVal: string | number, type?: 'int' | 'float', maxDecimal?: number): string;
14
+ /** 生成输入数字过滤函数
15
+ * @param obj 对象
16
+ * @param key 对象里面的字段名
17
+ * @param fn 输入过滤之后执行的函数
18
+ * @param type 输入类型,int整数,float,default: 'int'
19
+ * @param maxDecimal 最大小数位,default: 6
20
+ */
21
+ export declare function generateFilterInputNumFn<T extends Record<string, any>, K extends keyof T>(obj: T, key: K, fn?: () => void, type?: 'float' | 'int', maxDecimal?: number): (e: ChangeEvent) => void;
19
22
  /** 渲染Html字符串片段 */
20
23
  export declare function renderHtmlStr(html: string): string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
21
24
  [key: string]: any;
22
25
  }>;
26
+ /** 获取当前网站协议+域名 */
23
27
  export declare function getWebsiteUrl(): string;
28
+ /** 获取路由参数 */
24
29
  export declare function getRouterParams(): Recordable<any> | undefined;
30
+ /** 去除字符串里的所有空字符 */
31
+ export declare function removeWhitespace(str: any): string;
32
+ /** 深度合并 */
33
+ export declare function deepMerge<T = any>(src?: any, target?: any): T;
34
+ /** 字符串脱敏
35
+ * @param str 值
36
+ * @param number 可见的字符数,default: 6
37
+ * @param options = {
38
+ * showPrefix 显示前缀字符,default: true
39
+ * showSuffix 显示后缀字符,default: true
40
+ * middleStr 中间的字符串,default: '****'
41
+ * }
42
+ */
43
+ export declare function desensitization(str?: string | number, number?: number, options?: {
44
+ showPrefix?: boolean;
45
+ showSuffix?: boolean;
46
+ middleStr?: string;
47
+ }): string | undefined;