jk-vue-comps 0.1.13 → 0.1.15

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,11 +1,13 @@
1
1
  import { copyTextToClipboard as o, useCopyToClipboard as e } from "../hooks/useCopyToClipboard.js";
2
- import { useMemo as r } from "../hooks/useMemo.js";
3
- const l = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2
+ import { useFormKeypressEnter as r } from "../hooks/useFormKeypressEnter.js";
3
+ import { useMemo as t } from "../hooks/useMemo.js";
4
+ const i = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4
5
  __proto__: null,
5
6
  copyTextToClipboard: o,
6
7
  useCopyToClipboard: e,
7
- useMemo: r
8
+ useFormKeypressEnter: r,
9
+ useMemo: t
8
10
  }, Symbol.toStringTag, { value: "Module" }));
9
11
  export {
10
- l as H
12
+ i as H
11
13
  };
@@ -1,2 +1,3 @@
1
1
  export * from './useCopyToClipboard';
2
+ export * from './useFormKeypressEnter';
2
3
  export * from './useMemo';
@@ -1,7 +1,9 @@
1
- import { copyTextToClipboard as p, useCopyToClipboard as r } from "./useCopyToClipboard.js";
2
- import { useMemo as t } from "./useMemo.js";
1
+ import { copyTextToClipboard as r, useCopyToClipboard as p } from "./useCopyToClipboard.js";
2
+ import { useFormKeypressEnter as s } from "./useFormKeypressEnter.js";
3
+ import { useMemo as x } from "./useMemo.js";
3
4
  export {
4
- p as copyTextToClipboard,
5
- r as useCopyToClipboard,
6
- t as useMemo
5
+ r as copyTextToClipboard,
6
+ p as useCopyToClipboard,
7
+ s as useFormKeypressEnter,
8
+ x as useMemo
7
9
  };
@@ -0,0 +1,2 @@
1
+ import type { Ref, ComputedRef } from 'vue';
2
+ export declare function useFormKeypressEnter(fn: (...args: any[]) => any, loading: Ref<boolean> | ComputedRef<boolean> | (() => boolean)): (...args: any[]) => any;
@@ -0,0 +1,10 @@
1
+ import { isFunction as s } from "../utils/is.js";
2
+ function o(t, r) {
3
+ return function(...e) {
4
+ if (!(s(r) ? r == null ? void 0 : r() : r.value))
5
+ return t == null ? void 0 : t(...e);
6
+ };
7
+ }
8
+ export {
9
+ o as useFormKeypressEnter
10
+ };
package/dist/index.d.ts CHANGED
@@ -2,6 +2,7 @@ import * as Comps from './components';
2
2
  import * as Hooks from './hooks';
3
3
  import * as Utils from './utils';
4
4
  export * from './components';
5
+ export * from './hooks';
5
6
  export * from './utils';
6
7
  declare const JKVUEComps: {
7
8
  Comps: typeof Comps;
@@ -92,6 +93,7 @@ declare const JKVUEComps: {
92
93
  copyTextToClipboard(input: string, { target }?: {
93
94
  target?: HTMLElement | undefined;
94
95
  }): boolean;
96
+ useFormKeypressEnter(fn: (...args: any[]) => any, loading: import("vue").Ref<boolean> | import("vue").ComputedRef<boolean> | (() => boolean)): (...args: any[]) => any;
95
97
  useMemo<T_8>(getValue: () => T_8, condition: (object | import("vue").WatchSource<unknown>)[], shouldUpdate?: ((prev: any[], next: any[]) => boolean) | undefined): import("vue").Ref<T_8>;
96
98
  toGoogleAuth(clientId: string, redirectUri: string): void;
97
99
  GoogleAuth: {
package/dist/index.js CHANGED
@@ -1,98 +1,105 @@
1
1
  import { C as e } from "./chunks/index-DyiqKziC.js";
2
- import { H as s } from "./chunks/index-CB6PmcJE.js";
3
- import { U as t } from "./chunks/index-ChgNR2U8.js";
4
- import { d as n, h as p, e as u, f as g, g as f, b as h, a as N, c as d, r as T, i as U, t as c } from "./chunks/index-ChgNR2U8.js";
5
- import { GoogleAuth as b, toGoogleAuth as E } from "./components/GoogleAuth.js";
6
- import { TelegramAuth as S, getTelegramAuthUrlParams as A, toTelegramAuth as B } from "./components/TelegramAuth.js";
7
- import { is as I, isArray as O, isBoolean as y, isClient as w, isDate as L, isDef as v, isEdgeBrowser as C, isElement as F, isEmail as G, isEmpty as H, isFunction as R, isHtmlStr as W, isInMobileBrowser as q, isIp as M, isMap as V, isNull as j, isNullAndUnDef as k, isNullOrUnDef as Z, isNumber as z, isObject as J, isPromise as K, isPromiseLink as Q, isRegExp as X, isServer as Y, isString as _, isUnDef as $, isUrl as ee, isValidPhoneNumber as se, isWindow as te, isZhLang as ie } from "./utils/is.js";
8
- import { BigNumber as oe, DOWN as ae, UP as me, add as le, divide as ne, formatRate as pe, helper as ue, isBigNum as ge, isBool as fe, isEqualTo as he, isGreaterThan as Ne, isGreaterThanOrEqualTo as de, isInt as Te, isLessThan as Ue, isLessThanOrEqualTo as ce, isNanValue as xe, isNum as be, multiply as Ee, power as Pe, subtract as Se, toBigNum as Ae, toDecimalPlaces as Be, toInt as De, toLocaleString as Ie, toNum as Oe, toString as ye, unFormatRate as we } from "./utils/math.js";
9
- import { propTypes as ve } from "./utils/vuePropTypes.js";
10
- import { timeZoneOptions as Fe } from "./utils/timeZone.js";
11
- import { withInstall as He } from "./utils/withInstall.js";
2
+ import { H as s } from "./chunks/index-BXoUaF-m.js";
3
+ import { U as r } from "./chunks/index-ChgNR2U8.js";
4
+ import { d as n, h as p, e as u, f, g, b as d, a as h, c as x, r as N, i as T, t as b } from "./chunks/index-ChgNR2U8.js";
5
+ import { GoogleAuth as U, toGoogleAuth as E } from "./components/GoogleAuth.js";
6
+ import { TelegramAuth as P, getTelegramAuthUrlParams as S, toTelegramAuth as A } from "./components/TelegramAuth.js";
7
+ import { copyTextToClipboard as C, useCopyToClipboard as D } from "./hooks/useCopyToClipboard.js";
8
+ import { useFormKeypressEnter as O } from "./hooks/useFormKeypressEnter.js";
9
+ import { useMemo as F } from "./hooks/useMemo.js";
10
+ import { is as v, isArray as G, isBoolean as H, isClient as M, isDate as R, isDef as W, isEdgeBrowser as q, 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 re, isRegExp as oe, isServer as te, 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 xe, formatRate as Ne, helper as Te, isBigNum as be, isBool as ce, isEqualTo as Ue, isGreaterThan as Ee, isGreaterThanOrEqualTo as ye, isInt as Pe, isLessThan as Se, isLessThanOrEqualTo as Ae, isNanValue as Be, isNum as Ce, multiply as De, power as Ie, subtract as Oe, toBigNum as we, toDecimalPlaces as Fe, toInt as Le, toLocaleString as ve, toNum as Ge, toString as He, unFormatRate as Me } from "./utils/math.js";
12
+ import { propTypes as We } from "./utils/vuePropTypes.js";
13
+ import { timeZoneOptions as Ve } from "./utils/timeZone.js";
14
+ import { withInstall as ke } from "./utils/withInstall.js";
12
15
  const a = {
13
16
  ...e,
14
17
  ...s,
15
- ...t,
18
+ ...r,
16
19
  Comps: e,
17
20
  Hooks: s,
18
- Utils: t
21
+ Utils: r
19
22
  };
20
23
  export {
21
- oe as BigNumber,
22
- ae as DOWN,
23
- b as GoogleAuth,
24
- S as TelegramAuth,
25
- me as UP,
26
- le as add,
24
+ fe as BigNumber,
25
+ ge as DOWN,
26
+ U as GoogleAuth,
27
+ P as TelegramAuth,
28
+ de as UP,
29
+ he as add,
30
+ C as copyTextToClipboard,
27
31
  n as deepMerge,
28
32
  a as default,
29
33
  p as desensitization,
30
- ne as divide,
34
+ xe as divide,
31
35
  u as evalPro,
32
- g as filterInputNum,
33
- pe as formatRate,
34
- f as generateFilterInputNumFn,
35
- h as getRouterParams,
36
- A as getTelegramAuthUrlParams,
37
- N as getWebsiteUrl,
38
- ue as helper,
39
- I as is,
40
- O as isArray,
41
- ge as isBigNum,
42
- fe as isBool,
43
- y as isBoolean,
44
- w as isClient,
45
- L as isDate,
46
- v as isDef,
47
- C as isEdgeBrowser,
48
- F as isElement,
49
- G as isEmail,
50
- H as isEmpty,
51
- he as isEqualTo,
52
- R as isFunction,
53
- Ne as isGreaterThan,
54
- de as isGreaterThanOrEqualTo,
55
- W as isHtmlStr,
56
- q as isInMobileBrowser,
57
- Te as isInt,
58
- M as isIp,
59
- Ue as isLessThan,
60
- ce as isLessThanOrEqualTo,
61
- V as isMap,
62
- xe as isNanValue,
63
- j as isNull,
64
- k as isNullAndUnDef,
65
- Z as isNullOrUnDef,
66
- be as isNum,
67
- z as isNumber,
68
- J as isObject,
69
- K as isPromise,
70
- Q as isPromiseLink,
71
- X as isRegExp,
72
- Y as isServer,
73
- _ as isString,
74
- $ as isUnDef,
75
- ee as isUrl,
76
- se as isValidPhoneNumber,
77
- te as isWindow,
78
- ie as isZhLang,
79
- Ee as multiply,
80
- Pe as power,
81
- ve as propTypes,
82
- d as removeWhitespace,
83
- T as renderHtmlStr,
84
- Se as subtract,
85
- Fe as timeZoneOptions,
86
- Ae as toBigNum,
87
- Be as toDecimalPlaces,
36
+ f as filterInputNum,
37
+ Ne as formatRate,
38
+ g as generateFilterInputNumFn,
39
+ d as getRouterParams,
40
+ S as getTelegramAuthUrlParams,
41
+ h as getWebsiteUrl,
42
+ Te as helper,
43
+ v as is,
44
+ G as isArray,
45
+ be as isBigNum,
46
+ ce as isBool,
47
+ H as isBoolean,
48
+ M as isClient,
49
+ R as isDate,
50
+ W as isDef,
51
+ q as isEdgeBrowser,
52
+ V as isElement,
53
+ j as isEmail,
54
+ k as isEmpty,
55
+ Ue as isEqualTo,
56
+ K as isFunction,
57
+ Ee as isGreaterThan,
58
+ ye as isGreaterThanOrEqualTo,
59
+ Z as isHtmlStr,
60
+ z as isInMobileBrowser,
61
+ Pe as isInt,
62
+ J as isIp,
63
+ Se as isLessThan,
64
+ Ae as isLessThanOrEqualTo,
65
+ Q as isMap,
66
+ Be as isNanValue,
67
+ X as isNull,
68
+ Y as isNullAndUnDef,
69
+ _ as isNullOrUnDef,
70
+ Ce as isNum,
71
+ $ as isNumber,
72
+ ee as isObject,
73
+ se as isPromise,
74
+ re as isPromiseLink,
75
+ oe as isRegExp,
76
+ te as isServer,
77
+ ie as isString,
78
+ ae as isUnDef,
79
+ me as isUrl,
80
+ le as isValidPhoneNumber,
81
+ ne as isWindow,
82
+ pe as isZhLang,
83
+ De as multiply,
84
+ Ie as power,
85
+ We as propTypes,
86
+ x as removeWhitespace,
87
+ N as renderHtmlStr,
88
+ Oe as subtract,
89
+ Ve as timeZoneOptions,
90
+ we as toBigNum,
91
+ Fe as toDecimalPlaces,
88
92
  E as toGoogleAuth,
89
- De as toInt,
90
- Ie as toLocaleString,
91
- Oe as toNum,
92
- ye as toString,
93
- U as toStyleObject,
94
- c as toStyleUnit,
95
- B as toTelegramAuth,
96
- we as unFormatRate,
97
- He as withInstall
93
+ Le as toInt,
94
+ ve as toLocaleString,
95
+ Ge as toNum,
96
+ He as toString,
97
+ T as toStyleObject,
98
+ b as toStyleUnit,
99
+ A as toTelegramAuth,
100
+ Me as unFormatRate,
101
+ D as useCopyToClipboard,
102
+ O as useFormKeypressEnter,
103
+ F as useMemo,
104
+ ke as withInstall
98
105
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jk-vue-comps",
3
- "version": "0.1.13",
3
+ "version": "0.1.15",
4
4
  "description": "jk-vue-comps",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",