jk-vue-comps 0.2.6 → 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 { isString as l, isHtmlStr as f, isObject as c, isNumber 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 { toNum as m, isNanValue 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";
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) || !f(t) ? t : h("div", { innerHTML: 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) && !p(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 g(t) ? String(t) : `${m(t)}${e}`;
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: f,
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: g,
128
+ isNanValue: m,
129
129
  isNull: D,
130
130
  isNullAndUnDef: F,
131
131
  isNullOrUnDef: M,
132
132
  isNum: ct,
133
- isNumber: p,
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: m,
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
- Et as a,
167
+ Lt as a,
168
168
  It as b,
169
- Bt as c,
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
- Lt as h,
175
- Dt as i,
176
- $t as r,
177
- xt as t
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 { a as w } from "../chunks/index-C5FNYxxn.js";
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 i } from "vue";
2
- import { isDef as u } from "../utils/is.js";
3
- function p(o) {
4
- const c = l(o || ""), e = l(!1), n = l(!1);
5
- return i(c, (t) => {
6
- u(t) && (n.value = !0, e.value = f(t));
7
- }, { immediate: !!o, flush: "sync" }), { clipboardRef: c, isSuccessRef: e, copiedRef: n };
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 f(o, { target: c = document.body } = {}) {
10
- const e = document.createElement("textarea"), n = document.activeElement;
11
- e.value = o, e.setAttribute("readonly", ""), e.style.contain = "strict", e.style.position = "absolute", e.style.left = "-9999px", e.style.fontSize = "12pt";
12
- const t = document.getSelection();
13
- let s;
14
- t && t.rangeCount > 0 && (s = t.getRangeAt(0)), c.append(e), e.select(), e.selectionStart = 0, e.selectionEnd = o.length;
15
- let r = !1;
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
- r = document.execCommand("copy");
18
- } catch (a) {
19
- throw new Error(a);
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
- f as copyTextToClipboard,
25
- p as useCopyToClipboard
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-C5FNYxxn.js";
4
- import { d as n, h as p, e as u, f, g, b as d, a as h, c as N, r as x, i as T, t as b } from "./chunks/index-C5FNYxxn.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 q, isArray as v, isBoolean as G, isClient as H, isDate as M, isDef as R, isEdgeBrowser as W, 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 te, isRegExp as re, isServer as oe, 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 Ne, eq as xe, formatRate as Te, gt as be, gte as ce, helper as Ue, isBigNum as Ee, isBool as ye, isEqualTo as Pe, isGreaterThan as Se, isGreaterThanOrEqualTo as Ae, isInt as Be, isLessThan as Ce, isLessThanOrEqualTo as De, isNan as Ie, isNanValue as Oe, isNum as we, lt as Fe, lte as Le, multiply as qe, power as ve, subtract as Ge, toBigNum as He, toDecimalPlaces as Me, toInt as Re, toLocaleString as We, toNum as Ve, toString as je, unFormatRate as ke } from "./utils/math.js";
12
- import { propTypes as Ze } from "./utils/vuePropTypes.js";
13
- import { timeZoneOptions as Je } from "./utils/timeZone.js";
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
- fe as BigNumber,
18
- ge as DOWN,
19
- U as GoogleAuth,
20
- P as TelegramAuth,
21
- de as UP,
22
- he as add,
23
- C as copyTextToClipboard,
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
- Ne as divide,
28
- xe as eq,
27
+ S as divide,
28
+ A as eq,
29
29
  u as evalPro,
30
30
  f as filterInputNum,
31
- Te as formatRate,
31
+ B as formatRate,
32
32
  g as generateFilterInputNumFn,
33
33
  d as getRouterParams,
34
- S as getTelegramAuthUrlParams,
34
+ ie as getTelegramAuthUrlParams,
35
35
  h as getWebsiteUrl,
36
- be as gt,
37
- ce as gte,
38
- Ue as helper,
39
- q as is,
40
- v as isArray,
41
- Ee as isBigNum,
42
- ye as isBool,
43
- G as isBoolean,
44
- H as isClient,
45
- M as isDate,
46
- R as isDef,
47
- W as isEdgeBrowser,
48
- V as isElement,
49
- j as isEmail,
50
- k as isEmpty,
51
- Pe as isEqualTo,
52
- K as isFunction,
53
- Se as isGreaterThan,
54
- Ae as isGreaterThanOrEqualTo,
55
- Z as isHtmlStr,
56
- z as isInMobileBrowser,
57
- Be as isInt,
58
- J as isIp,
59
- Ce as isLessThan,
60
- De as isLessThanOrEqualTo,
61
- Q as isMap,
62
- Ie as isNan,
63
- Oe as isNanValue,
64
- X as isNull,
65
- Y as isNullAndUnDef,
66
- _ as isNullOrUnDef,
67
- we as isNum,
68
- $ as isNumber,
69
- ee as isObject,
70
- se as isPromise,
71
- te as isPromiseLink,
72
- re as isRegExp,
73
- oe as isServer,
74
- ie as isString,
75
- ae as isUnDef,
76
- me as isUrl,
77
- le as isValidPhoneNumber,
78
- ne as isWindow,
79
- pe as isZhLang,
80
- Fe as lt,
81
- Le as lte,
82
- qe as multiply,
83
- ve as power,
84
- Ze as propTypes,
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
- Ge as subtract,
88
- Je as timeZoneOptions,
89
- He as toBigNum,
90
- Me as toDecimalPlaces,
91
- E as toGoogleAuth,
92
- Re as toInt,
93
- We as toLocaleString,
94
- Ve as toNum,
95
- je as toString,
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
- A as toTelegramAuth,
99
- ke as unFormatRate,
100
- D as useCopyToClipboard,
101
- O as useFormKeypressEnter,
102
- F as useMemo,
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
  };
@@ -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, 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-C5FNYxxn.js";
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,
@@ -0,0 +1,39 @@
1
+ /** 代替lodash.clone */
2
+ export declare function clone<T>(value: T): T;
3
+ /** 深拷贝 */
4
+ export declare function cloneDeep<T>(target: T, map?: WeakMap<object, any>): T;
5
+ /** 代替lodash.pick */
6
+ export declare function pick<T extends object, K extends keyof T>(obj: T | null | undefined, keys: K | K[]): Pick<T, K>;
7
+ /** 代替lodash.pickBy */
8
+ export declare function pickBy<T extends object, S extends T[keyof T]>(obj: T | null | undefined, predicate: (value: T[keyof T], key: keyof T) => value is S): {
9
+ [K in keyof T]?: S;
10
+ };
11
+ export declare function pickBy<T extends object>(obj: T | null | undefined, predicate: (value: T[keyof T], key: keyof T) => any): Partial<T>;
12
+ /** 代替lodash.omit */
13
+ export declare function omit<T extends object, K extends keyof T = keyof T>(obj: T, keys: K | K[]): Omit<T, K>;
14
+ export declare function omit<T extends object>(obj: T): T;
15
+ export declare function omit<T extends null | undefined>(obj: T, keys?: any): T;
16
+ export declare function omit<T extends string | number | boolean | symbol>(obj: T, keys?: any): T;
17
+ type GetPathValue<T, P extends string> = P extends `${infer Key}.${infer Rest}` ? Key extends keyof T ? GetPathValue<Exclude<T[Key], undefined | null>, Rest> : undefined : P extends keyof T ? T[P] : undefined;
18
+ /** 代替lodash.get */
19
+ export declare function get<T extends object, P extends string>(obj: T, path: P): GetPathValue<T, P>;
20
+ export declare function get<T extends object, P extends string, D>(obj: T, path: P, defaultValue: D): Exclude<GetPathValue<T, P>, undefined> | D;
21
+ /** 代替lodash.set */
22
+ export declare function set<T>(obj: T, path: string | number, value: any): T;
23
+ /** 代替lodash.isNil */
24
+ export declare function isNil(value: any): value is null | undefined;
25
+ /** 代替lodash.isEqual */
26
+ export declare function isEqual(value: any, other: any): boolean;
27
+ /** 代替lodash.uniq */
28
+ export declare function uniq<T>(array: T[] | null | undefined): T[];
29
+ /** 代替lodash.uniqBy */
30
+ export declare function uniqBy<T>(array: T[] | null | undefined, iteratee: ((item: T) => any) | keyof T): T[];
31
+ /** 代替lodash.upperFirst */
32
+ export declare function upperFirst(str: string | null | undefined): string;
33
+ /** 代替lodash.merge */
34
+ export declare function merge<T extends object, S extends object[]>(target: T, ...sources: S): T & any;
35
+ /** 代替lodash.difference */
36
+ export declare function difference<T>(array: T[] | null | undefined, ...values: T[][]): T[];
37
+ /** 代替lodash.intersection */
38
+ export declare function intersection<T>(...arrays: T[][]): T[];
39
+ export {};
@@ -0,0 +1,217 @@
1
+ function a(t) {
2
+ if (t === null || typeof t != "object")
3
+ return t;
4
+ let e = t;
5
+ return e?.__v_isRef && (e = e.value), e?.__v_raw && (e = e.__v_raw), e !== t ? a(e) : e;
6
+ }
7
+ function g(t) {
8
+ const e = a(t);
9
+ if (e === null || typeof e != "object")
10
+ return e;
11
+ if (Array.isArray(e))
12
+ return [...e];
13
+ if (e instanceof Date)
14
+ return new Date(e.getTime());
15
+ if (e instanceof RegExp) {
16
+ const r = new RegExp(e.source, e.flags);
17
+ return r.lastIndex = e.lastIndex, r;
18
+ }
19
+ if (e instanceof Map)
20
+ return new Map(e);
21
+ if (e instanceof Set)
22
+ return new Set(e);
23
+ const n = Object.getPrototypeOf(e), i = Object.create(n);
24
+ return Object.assign(i, e);
25
+ }
26
+ function u(t, e = /* @__PURE__ */ new WeakMap()) {
27
+ const n = a(t);
28
+ if (typeof n != "object" || n === null)
29
+ return n;
30
+ if (n instanceof Date)
31
+ return new Date(n);
32
+ if (n instanceof RegExp)
33
+ return new RegExp(n.source, n.flags);
34
+ if (e.has(n))
35
+ return e.get(n);
36
+ if (n instanceof Map) {
37
+ const s = /* @__PURE__ */ new Map();
38
+ return e.set(n, s), n.forEach((f, c) => s.set(u(c, e), u(f, e))), s;
39
+ }
40
+ if (n instanceof Set) {
41
+ const s = /* @__PURE__ */ new Set();
42
+ return e.set(n, s), n.forEach((f) => s.add(u(f, e))), s;
43
+ }
44
+ let i;
45
+ if (Array.isArray(n))
46
+ i = [];
47
+ else if (Object.prototype.toString.call(n) === "[object Object]")
48
+ i = {};
49
+ else
50
+ return n;
51
+ e.set(n, i);
52
+ const r = Array.isArray(n) ? void 0 : Object.keys(n);
53
+ return (r || n).forEach((s, f) => {
54
+ const c = r ? s : f;
55
+ try {
56
+ i[c] = u(n[c], e);
57
+ } catch (l) {
58
+ console.warn(`Property ${String(c)} could not be cloned.`, l);
59
+ }
60
+ }), i;
61
+ }
62
+ function w(t, e) {
63
+ const n = {};
64
+ if (t == null)
65
+ return n;
66
+ const i = Array.isArray(e) ? e : [e];
67
+ for (const r of i)
68
+ r in t && (n[r] = t[r]);
69
+ return n;
70
+ }
71
+ function O(t, e) {
72
+ const n = {};
73
+ return t == null || Object.keys(t).forEach((i) => {
74
+ const r = t[i];
75
+ e(r, i) && (n[i] = r);
76
+ }), n;
77
+ }
78
+ function d(t, e) {
79
+ if (t == null || typeof t != "object")
80
+ return t;
81
+ if (e === void 0 || e === "" || Array.isArray(e) && !e.length)
82
+ return { ...t };
83
+ const n = Array.isArray(e) ? e : [e], i = {}, r = Reflect.ownKeys(t);
84
+ for (const s of r)
85
+ n.includes(s) || (i[s] = t[s]);
86
+ return i;
87
+ }
88
+ function S(t, e, n) {
89
+ if (t == null)
90
+ return n;
91
+ if (!e)
92
+ return t;
93
+ const i = e.replace(/\[(\d+)\]/g, ".$1").split(".").filter(Boolean);
94
+ let r = t;
95
+ for (const s of i) {
96
+ if (r == null)
97
+ return n;
98
+ r = r[s];
99
+ }
100
+ return r === void 0 ? n : r;
101
+ }
102
+ function h(t, e, n) {
103
+ if (Object(t) !== t)
104
+ return t;
105
+ const i = e.toString().replace(/\[(\d+)\]/g, ".$1").split(".").filter(Boolean);
106
+ let r = t;
107
+ for (let f = 0; f < i.length - 1; f++) {
108
+ const c = i[f], l = i[f + 1];
109
+ if (!(c in r) || r[c] === null || typeof r[c] != "object") {
110
+ const A = /^\d+$/.test(l);
111
+ r[c] = A ? [] : {};
112
+ }
113
+ r = r[c];
114
+ }
115
+ const s = i[i.length - 1];
116
+ return r[s] = n, t;
117
+ }
118
+ function E(t) {
119
+ return t == null;
120
+ }
121
+ function p(t, e) {
122
+ if (t === e || typeof t == "number" && typeof e == "number" && isNaN(t) && isNaN(e))
123
+ return !0;
124
+ if (typeof t != "object" || t === null || typeof e != "object" || e === null || Object.prototype.toString.call(t) !== Object.prototype.toString.call(e))
125
+ return !1;
126
+ if (t instanceof Date)
127
+ return t.getTime() === e.getTime();
128
+ if (t instanceof RegExp)
129
+ return t.toString() === e.toString();
130
+ const n = Array.isArray(t), i = Array.isArray(e);
131
+ if (n !== i)
132
+ return !1;
133
+ if (n) {
134
+ if (t.length !== e.length)
135
+ return !1;
136
+ for (let f = 0; f < t.length; f++)
137
+ if (!p(t[f], e[f]))
138
+ return !1;
139
+ return !0;
140
+ }
141
+ const r = Object.keys(t), s = Object.keys(e);
142
+ if (r.length !== s.length)
143
+ return !1;
144
+ for (const f of r)
145
+ if (!Object.prototype.hasOwnProperty.call(e, f) || !p(t[f], e[f]))
146
+ return !1;
147
+ return !0;
148
+ }
149
+ function _(t) {
150
+ return Array.isArray(t) ? [...new Set(t)] : [];
151
+ }
152
+ function b(t, e) {
153
+ if (!Array.isArray(t))
154
+ return [];
155
+ const n = [], i = /* @__PURE__ */ new Set();
156
+ for (const r of t) {
157
+ const s = typeof e == "function" ? e(r) : r[e];
158
+ i.has(s) || (i.add(s), n.push(r));
159
+ }
160
+ return n;
161
+ }
162
+ function k(t) {
163
+ if (!t)
164
+ return "";
165
+ const e = String(t);
166
+ return e.charAt(0).toUpperCase() + e.slice(1);
167
+ }
168
+ function o(t) {
169
+ return t !== null && typeof t == "object" && !Array.isArray(t);
170
+ }
171
+ function y(t, ...e) {
172
+ if (!e.length)
173
+ return t;
174
+ const n = e.shift();
175
+ if (o(t) && o(n)) {
176
+ for (const i in n)
177
+ if (Object.prototype.hasOwnProperty.call(n, i)) {
178
+ const r = n[i], s = t[i];
179
+ o(r) ? ((!s || !o(s)) && (t[i] = {}), y(t[i], r)) : Array.isArray(r) ? (Array.isArray(s) || (t[i] = []), r.forEach((f, c) => {
180
+ o(f) ? (t[i][c] || (t[i][c] = {}), y(t[i][c], f)) : t[i][c] = f;
181
+ })) : r !== void 0 && (t[i] = r);
182
+ }
183
+ }
184
+ return y(t, ...e);
185
+ }
186
+ function x(t, ...e) {
187
+ if (!Array.isArray(t))
188
+ return [];
189
+ const n = new Set(e.flat());
190
+ return t.filter((i) => !n.has(i));
191
+ }
192
+ function N(...t) {
193
+ if (t.length === 0)
194
+ return [];
195
+ const e = [...new Set(t[0])], n = t.slice(1);
196
+ if (n.length === 0)
197
+ return e;
198
+ const i = n.map((r) => new Set(r));
199
+ return e.filter((r) => i.every((s) => s.has(r)));
200
+ }
201
+ export {
202
+ g as clone,
203
+ u as cloneDeep,
204
+ x as difference,
205
+ S as get,
206
+ N as intersection,
207
+ p as isEqual,
208
+ E as isNil,
209
+ y as merge,
210
+ d as omit,
211
+ w as pick,
212
+ O as pickBy,
213
+ h as set,
214
+ _ as uniq,
215
+ b as uniqBy,
216
+ k as upperFirst
217
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jk-vue-comps",
3
- "version": "0.2.6",
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.26",
31
- "vue-types": "^6.0.0",
32
- "bignumber.js": "^9.3.1"
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.3",
38
- "@vitejs/plugin-vue-jsx": "5.1.2",
39
- "@typescript-eslint/eslint-plugin": "^8.50.1",
40
- "@typescript-eslint/parser": "^8.50.1",
41
- "eslint": "^9.39.1",
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
- "eslint-plugin-prettier": "^5.5.4",
45
- "eslint-plugin-vue": "^10.6.2",
46
- "@eslint/js": "^9.39.2",
47
- "globals": "^16.5.0",
48
- "prettier": "^3.7.4",
44
+ "eslint-plugin-prettier": "^5.5.5",
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
- "vite": "7.3.0",
52
- "vue-tsc": "^3.2.1"
51
+ "vite": "7.3.1",
52
+ "vue-tsc": "^3.2.5"
53
53
  }
54
54
  }