jk-vue-comps 0.2.1 → 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.
@@ -1,53 +1,57 @@
1
1
  import "vue";
2
- import { is as t, isArray as r, isBoolean as o, isClient as a, 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 v } from "./is.js";
3
- import { BigNumber as R, DOWN as W, UP as q, add as M, divide as j, formatRate as A, helper as G, isBigNum as H, isBool as V, isEqualTo as Z, isGreaterThan as k, isGreaterThanOrEqualTo as z, isInt as C, isLessThan as J, isLessThanOrEqualTo as K, isNanValue as Q, isNum as X, multiply as Y, power as _, subtract as $, toBigNum as ee, toDecimalPlaces as ie, toInt as se, toLocaleString as te, toNum as re, toString as oe, unFormatRate as ae } from "./math.js";
4
- import { propTypes as le } from "./vuePropTypes.js";
5
- import { timeZoneOptions as ue } from "./timeZone.js";
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-DiBTCIdi.js";
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
- R as BigNumber,
10
- W as DOWN,
11
- q as UP,
9
+ F as BigNumber,
10
+ R as DOWN,
11
+ W as UP,
12
12
  M as add,
13
- fe as deepMerge,
14
- de as desensitization,
13
+ Se as deepMerge,
14
+ Te as desensitization,
15
15
  j as divide,
16
- he as evalPro,
17
- be as filterInputNum,
18
- A as formatRate,
19
- ce as generateFilterInputNumFn,
20
- Ee as getRouterParams,
21
- Se as getWebsiteUrl,
22
- G as helper,
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
- H as isBigNum,
26
- V as isBool,
27
- o as isBoolean,
28
- a as isClient,
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
- Z as isEqualTo,
38
+ C as isEqualTo,
36
39
  N as isFunction,
37
- k as isGreaterThan,
38
- z as isGreaterThanOrEqualTo,
40
+ J as isGreaterThan,
41
+ K as isGreaterThanOrEqualTo,
39
42
  f as isHtmlStr,
40
43
  d as isInMobileBrowser,
41
- C as isInt,
44
+ Q as isInt,
42
45
  h as isIp,
43
- J as isLessThan,
44
- K as isLessThanOrEqualTo,
46
+ X as isLessThan,
47
+ Y as isLessThanOrEqualTo,
45
48
  b as isMap,
46
- Q as isNanValue,
49
+ _ as isNan,
50
+ $ as isNanValue,
47
51
  c as isNull,
48
52
  E as isNullAndUnDef,
49
53
  S as isNullOrUnDef,
50
- X as isNum,
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
- v as isZhLang,
63
- Y as multiply,
64
- _ as power,
65
- le as propTypes,
66
- Te as removeWhitespace,
67
- xe as renderHtmlStr,
68
- $ as subtract,
69
- ue as timeZoneOptions,
70
- ee as toBigNum,
71
- ie as toDecimalPlaces,
72
- se as toInt,
73
- te as toLocaleString,
74
- re as toNum,
75
- oe as toString,
76
- Be as toStyleObject,
77
- De as toStyleUnit,
78
- ae as unFormatRate,
79
- ge as withInstall
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/is.js CHANGED
@@ -1,132 +1,130 @@
1
- function t(n, e) {
2
- return Object.prototype.toString.call(n) === `[object ${e}]`;
1
+ function e(n, t) {
2
+ return Object.prototype.toString.call(n) === `[object ${t}]`;
3
3
  }
4
- function p(n) {
4
+ function d(n) {
5
5
  return typeof n < "u";
6
6
  }
7
- function c(n) {
8
- return !p(n);
7
+ function s(n) {
8
+ return !d(n);
9
9
  }
10
- function u(n) {
11
- return n !== null && t(n, "Object");
10
+ function o(n) {
11
+ return n !== null && e(n, "Object");
12
12
  }
13
- function m(n) {
14
- return t(n, "Date");
13
+ function w(n) {
14
+ return e(n, "Date");
15
15
  }
16
- function d(n) {
16
+ function f(n) {
17
17
  return n === null;
18
18
  }
19
19
  function l(n) {
20
- return c(n) && d(n);
20
+ return s(n) && f(n);
21
21
  }
22
- function y(n) {
23
- return c(n) || d(n);
22
+ function m(n) {
23
+ return s(n) || f(n);
24
24
  }
25
- function A(n) {
26
- return t(n, "Number");
25
+ function b(n) {
26
+ return e(n, "Number");
27
27
  }
28
- function a(n) {
29
- return t(n, "String");
28
+ function c(n) {
29
+ return e(n, "String");
30
30
  }
31
- function f(n) {
31
+ function u(n) {
32
32
  return typeof n == "function";
33
33
  }
34
- function h(n) {
35
- return t(n, "Boolean");
34
+ function y(n) {
35
+ return e(n, "Boolean");
36
36
  }
37
- function E(n) {
38
- return t(n, "RegExp");
37
+ function A(n) {
38
+ return e(n, "RegExp");
39
39
  }
40
- function w(n) {
40
+ function g(n) {
41
41
  return n && Array.isArray(n);
42
42
  }
43
+ function h(n) {
44
+ return g(n) || c(n) ? n.length === 0 : n instanceof Map || n instanceof Set ? n.size === 0 : o(n) ? Object.keys(n).length === 0 : !1;
45
+ }
46
+ function E(n) {
47
+ return e(n, "Promise") && o(n) && u(n.then) && u(n.catch);
48
+ }
43
49
  function N(n) {
44
- return w(n) || a(n) ? n.length === 0 : n instanceof Map || n instanceof Set ? n.size === 0 : u(n) ? Object.keys(n).length === 0 : !1;
50
+ return n instanceof Promise || typeof n?.then == "function";
45
51
  }
46
52
  function P(n) {
47
- return t(n, "Promise") && u(n) && f(n.then) && f(n.catch);
53
+ return typeof window < "u" && e(n, "Window");
48
54
  }
49
55
  function S(n) {
50
- return n instanceof Promise || typeof (n == null ? void 0 : n.then) == "function";
56
+ return o(n) && !!n.tagName;
51
57
  }
52
58
  function Z(n) {
53
- return typeof window < "u" && t(n, "Window");
54
- }
55
- function D(n) {
56
- return u(n) && !!n.tagName;
59
+ return e(n, "Map");
57
60
  }
58
- function M(n) {
59
- return t(n, "Map");
60
- }
61
- function b() {
61
+ function p() {
62
62
  return typeof window > "u";
63
63
  }
64
- function O() {
65
- return !b();
64
+ function D() {
65
+ return !p();
66
66
  }
67
- function $(n) {
67
+ function M(n) {
68
68
  return /^(((^https?:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?(\/#\/)?(?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)$/.test(n);
69
69
  }
70
- function x(n) {
70
+ function O(n) {
71
71
  return /\b(?:\d{1,3}.){3}\d{1,3}\b/.test(n);
72
72
  }
73
- function z(n) {
73
+ function $(n) {
74
74
  return /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(n);
75
75
  }
76
- function B(n) {
77
- const e = /^1[3456789]\d{9}$/, r = /^(\d{3,4}-)?\d{7,8}$/;
78
- return !!(e.test(n) || r.test(n));
76
+ function x(n) {
77
+ const t = /^1[3456789]\d{9}$/, r = /^(\d{3,4}-)?\d{7,8}$/;
78
+ return !!(t.test(n) || r.test(n));
79
79
  }
80
- function U() {
80
+ function z() {
81
81
  return typeof navigator < "u" && navigator.userAgent.match(/Android|webOS|iPhone|iPad|iPod|BlackBerry|Windows Phone/i);
82
82
  }
83
- function j(n) {
84
- var i, s;
85
- const e = (s = (i = n == null ? void 0 : n.replace(/\s+/g, "")) == null ? void 0 : i.toUpperCase) == null ? void 0 : s.call(i), r = ["ZH-CN", "ZH_CH", "ZH"], g = ["EN", "EN-US"];
86
- return r.some((o) => o === e) || !g.some((o) => o === e);
83
+ function B(n) {
84
+ const t = n?.replace(/\s+/g, "")?.toUpperCase?.(), r = ["ZH-CN", "ZH_CH", "ZH"], a = ["EN", "EN-US"];
85
+ return r.some((i) => i === t) || !a.some((i) => i === t);
87
86
  }
88
- function H() {
89
- var e;
87
+ function U() {
90
88
  if (navigator.userAgent.indexOf("Edge") > -1)
91
89
  return !0;
92
- const n = ((e = navigator == null ? void 0 : navigator.userAgentData) == null ? void 0 : e.brands) ?? [];
93
- for (const r of n)
94
- if ((r == null ? void 0 : r.brand) === "Microsoft Edge")
90
+ const n = navigator?.userAgentData?.brands ?? [];
91
+ for (const t of n)
92
+ if (t?.brand === "Microsoft Edge")
95
93
  return !0;
96
94
  return !1;
97
95
  }
98
- function _(n) {
99
- return a(n) && /<[^>]+>/g.test(n);
96
+ function j(n) {
97
+ return c(n) && /<[^>]+>/g.test(n);
100
98
  }
101
99
  export {
102
- t as is,
103
- w as isArray,
104
- h as isBoolean,
105
- O as isClient,
106
- m as isDate,
107
- p as isDef,
108
- H as isEdgeBrowser,
109
- D as isElement,
110
- z as isEmail,
111
- N as isEmpty,
112
- f as isFunction,
113
- _ as isHtmlStr,
114
- U as isInMobileBrowser,
115
- x as isIp,
116
- M as isMap,
117
- d as isNull,
100
+ e as is,
101
+ g as isArray,
102
+ y as isBoolean,
103
+ D as isClient,
104
+ w as isDate,
105
+ d as isDef,
106
+ U as isEdgeBrowser,
107
+ S as isElement,
108
+ $ as isEmail,
109
+ h as isEmpty,
110
+ u as isFunction,
111
+ j as isHtmlStr,
112
+ z as isInMobileBrowser,
113
+ O as isIp,
114
+ Z as isMap,
115
+ f as isNull,
118
116
  l as isNullAndUnDef,
119
- y as isNullOrUnDef,
120
- A as isNumber,
121
- u as isObject,
122
- P as isPromise,
123
- S as isPromiseLink,
124
- E as isRegExp,
125
- b as isServer,
126
- a as isString,
127
- c as isUnDef,
128
- $ as isUrl,
129
- B as isValidPhoneNumber,
130
- Z as isWindow,
131
- j as isZhLang
117
+ m as isNullOrUnDef,
118
+ b as isNumber,
119
+ o as isObject,
120
+ E as isPromise,
121
+ N as isPromiseLink,
122
+ A as isRegExp,
123
+ p as isServer,
124
+ c as isString,
125
+ s as isUnDef,
126
+ M as isUrl,
127
+ x as isValidPhoneNumber,
128
+ P as isWindow,
129
+ B as isZhLang
132
130
  };
@@ -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;