vuesp-components 1.3.0 → 1.3.2
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 +185 -1
- package/dist/components/app/AppAside.vue.d.ts.map +1 -1
- package/dist/components/ui/drag-drop/VDragDrop.vue.d.ts +4 -4
- package/dist/components/ui/drag-drop/types.d.ts +2 -2
- package/dist/components/ui/drag-drop/types.d.ts.map +1 -1
- package/dist/components/ui/func/VFunc.vue.d.ts.map +1 -1
- package/dist/composables/index.es.js +1 -1
- package/dist/composables/types.d.ts +2 -2
- package/dist/composables/types.d.ts.map +1 -1
- package/dist/dashboard/index.d.ts +3 -3
- package/dist/dashboard/index.d.ts.map +1 -1
- package/dist/dashboard/index.es.js +23 -23
- package/dist/helpers/index.d.ts +0 -2
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/helpers/index.es.js +50 -50
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +994 -962
- package/dist/plugins/i18n/index.d.ts +2 -2
- package/dist/plugins/i18n/index.d.ts.map +1 -1
- package/dist/plugins/index.es.js +18 -13
- package/package.json +6 -6
- package/dist/helpers/fetch.d.ts +0 -14
- package/dist/helpers/fetch.d.ts.map +0 -1
- package/dist/helpers/utils.d.ts +0 -2
- package/dist/helpers/utils.d.ts.map +0 -1
- package/dist/utils-DxCyEA-K.js +0 -62
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/i18n/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/i18n/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,MAAM,EAAE,MAAM,KAAK,CAAC;AAMtD,QAAA,MAAM,UAAU,EAAE,MAiDjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
package/dist/plugins/index.es.js
CHANGED
|
@@ -1,19 +1,24 @@
|
|
|
1
|
-
import { reactive as
|
|
2
|
-
const
|
|
3
|
-
install(
|
|
4
|
-
const
|
|
1
|
+
import { reactive as g, readonly as L } from "vue";
|
|
2
|
+
const b = { en: {} }, d = "en", y = {
|
|
3
|
+
install(a, l = {}) {
|
|
4
|
+
const r = (l == null ? void 0 : l.locales) || b, s = (l == null ? void 0 : l.defaultLocale) || d, t = g({
|
|
5
5
|
locale: s
|
|
6
|
-
}),
|
|
7
|
-
state:
|
|
6
|
+
}), n = {
|
|
7
|
+
state: L(t),
|
|
8
8
|
$t(c, f = {}) {
|
|
9
9
|
const i = c.split(".");
|
|
10
|
-
let
|
|
11
|
-
for (const
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
let e = r[t.locale];
|
|
11
|
+
for (const o of i)
|
|
12
|
+
if (typeof e == "object" && e !== null)
|
|
13
|
+
e = e[o];
|
|
14
|
+
else {
|
|
15
|
+
e = void 0;
|
|
16
|
+
break;
|
|
17
|
+
}
|
|
18
|
+
return typeof e != "string" ? c : e.replace(/{(\w+)}/g, (o, u) => f[u] || o);
|
|
14
19
|
},
|
|
15
20
|
setLocale(c) {
|
|
16
|
-
if (
|
|
21
|
+
if (r[c]) {
|
|
17
22
|
t.locale = c;
|
|
18
23
|
return;
|
|
19
24
|
}
|
|
@@ -23,10 +28,10 @@ const d = { en: {} }, $ = "en", y = {
|
|
|
23
28
|
return t.locale;
|
|
24
29
|
},
|
|
25
30
|
getListLocales() {
|
|
26
|
-
return Object.keys(
|
|
31
|
+
return Object.keys(r);
|
|
27
32
|
}
|
|
28
33
|
};
|
|
29
|
-
|
|
34
|
+
a.config.globalProperties.$t = n.$t, a.config.globalProperties.$i18n = n, a.provide("i18n", n);
|
|
30
35
|
}
|
|
31
36
|
};
|
|
32
37
|
export {
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.3.
|
|
2
|
+
"version": "1.3.2",
|
|
3
3
|
"name": "vuesp-components",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
@@ -61,12 +61,11 @@
|
|
|
61
61
|
"author": "bondrogeen",
|
|
62
62
|
"license": "MIT",
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@tailwindcss/vite": "4.1.6",
|
|
65
64
|
"@vueuse/core": "^13.9.0",
|
|
66
|
-
"
|
|
67
|
-
"vue": "3.5.0"
|
|
65
|
+
"tslib": "^2.3.0"
|
|
68
66
|
},
|
|
69
67
|
"devDependencies": {
|
|
68
|
+
"@tailwindcss/vite": "4.1.6",
|
|
70
69
|
"@eslint/js": "^9.39.1",
|
|
71
70
|
"@types/node": "^18.11.18",
|
|
72
71
|
"@typescript-eslint/parser": "^8.46.3",
|
|
@@ -77,16 +76,17 @@
|
|
|
77
76
|
"eslint-plugin-vue": "^10.5.1",
|
|
78
77
|
"globals": "^16.5.0",
|
|
79
78
|
"tsconfig-paths": "^4.2.0",
|
|
80
|
-
"
|
|
79
|
+
"tailwindcss": "4.1.6",
|
|
81
80
|
"typescript": "~5.9.2",
|
|
82
81
|
"typescript-eslint": "^8.46.3",
|
|
83
82
|
"vite": "^5.0.0",
|
|
84
83
|
"vite-plugin-dts": "~4.5.0",
|
|
85
84
|
"vite-svg-loader": "^5.1.0",
|
|
86
85
|
"vite-svg-sprite-wrapper": "^1.5.0",
|
|
86
|
+
"vue": "3.5.0",
|
|
87
87
|
"vue-tsc": "^2.2.8"
|
|
88
88
|
},
|
|
89
89
|
"peerDependencies": {
|
|
90
|
-
"vue": "3.5.0"
|
|
90
|
+
"vue": "^3.5.0"
|
|
91
91
|
}
|
|
92
92
|
}
|
package/dist/helpers/fetch.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export declare const useFetch: {
|
|
2
|
-
get: (url: string, init?: RequestInit) => Promise<Response>;
|
|
3
|
-
post: (url: string, init?: RequestInit) => Promise<Response>;
|
|
4
|
-
put: (url: string, init?: RequestInit) => Promise<Response>;
|
|
5
|
-
delete: (url: string, init?: RequestInit) => Promise<Response>;
|
|
6
|
-
$get: (url: string, init?: RequestInit) => Promise<unknown>;
|
|
7
|
-
$post: (url: string, init?: RequestInit) => Promise<unknown>;
|
|
8
|
-
$put: (url: string, init?: RequestInit) => Promise<unknown>;
|
|
9
|
-
$delete: (url: string, init?: RequestInit) => Promise<unknown>;
|
|
10
|
-
};
|
|
11
|
-
export declare const downloadBinary: (path: string) => Promise<number[]>;
|
|
12
|
-
export declare const uploadBinary: (path: string, buffer: BlobPart) => Promise<unknown>;
|
|
13
|
-
export declare const uploadJson: (path: string, data: object) => Promise<unknown>;
|
|
14
|
-
//# sourceMappingURL=fetch.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../src/helpers/fetch.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,QAAQ;eACR,MAAM,SAAS,WAAW;gBACzB,MAAM,SAAS,WAAW;eAC3B,MAAM,SAAS,WAAW;kBACvB,MAAM,SAAS,WAAW;gBAC5B,MAAM,SAAS,WAAW;iBACzB,MAAM,SAAS,WAAW;gBAC3B,MAAM,SAAS,WAAW;mBACvB,MAAM,SAAS,WAAW;CAC1C,CAAC;AAEF,eAAO,MAAM,cAAc,GAAU,MAAM,MAAM,sBAMhD,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,EAAE,QAAQ,QAAQ,qBAI1D,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,MAAM,MAAM,EAAE,MAAM,MAAM,qBAIpD,CAAC"}
|
package/dist/helpers/utils.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/helpers/utils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,GAAI,CAAC,SAAS,OAAO,EAAE,EAAE,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,IAAI,EAAE,WAAQ,MAE7D,MAAM,OAAO,EAAE,GAAG,MAAM,CAAC,SAI3C,CAAC"}
|
package/dist/utils-DxCyEA-K.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
const r = (t) => {
|
|
2
|
-
try {
|
|
3
|
-
return t ? JSON.parse(t) : null;
|
|
4
|
-
} catch (e) {
|
|
5
|
-
return console.warn(e), t;
|
|
6
|
-
}
|
|
7
|
-
}, c = (t) => typeof t == "object" ? JSON.stringify(t) : t, h = (t) => r(c(t)), g = (t) => {
|
|
8
|
-
const e = ["B", "KB", "MB"];
|
|
9
|
-
if (t == 0) return "0 B";
|
|
10
|
-
let o = Math.floor(Math.log(t) / Math.log(1024));
|
|
11
|
-
return o > 1 && (o = 1), Math.round(t / Math.pow(1024, o)) + " " + e[o];
|
|
12
|
-
}, f = (t, e = { year: "numeric", month: "numeric", day: "numeric" }, o = []) => new Date(t).toLocaleDateString(o, e), p = (t, e = { minute: "2-digit", hour: "2-digit" }, o = []) => new Date(t).toLocaleTimeString(o, e), s = (t) => t >= 10 ? t : `0${t}`, S = (t) => {
|
|
13
|
-
const e = Math.floor(t % 31536e3 % 2628e3 / 86400), o = Math.floor(t % (3600 * 24) / 3600), n = Math.floor(t % 3600 / 60), m = Math.floor(t % 60);
|
|
14
|
-
return `${e ? e + " days " : ""} ${s(o)}:${s(n)}:${s(m)}`;
|
|
15
|
-
}, w = (t) => t.join("."), y = (t) => t.split(".").map((e) => +e), M = (t, e = "file") => {
|
|
16
|
-
const o = document.createElement("a");
|
|
17
|
-
o.setAttribute("download", e), o.href = t, document.body.appendChild(o), o.click(), o.remove();
|
|
18
|
-
}, T = (t) => new Promise((e, o) => {
|
|
19
|
-
const n = document.createElement("script");
|
|
20
|
-
n.src = t, n.type = "text/javascript", n.async = !0, n.onload = () => e(n), n.onerror = () => o(new Error(`Ошибка загрузки скрипта: ${t}`)), document.head.appendChild(n);
|
|
21
|
-
}), a = (t) => (e) => r(t.getItem(e)), i = (t) => (e, o) => {
|
|
22
|
-
t && t.setItem(e, c(o));
|
|
23
|
-
}, u = a(localStorage), l = i(localStorage), j = a(sessionStorage), E = i(sessionStorage), L = (t = "isShow") => {
|
|
24
|
-
const e = u(t);
|
|
25
|
-
return e || l(t, !0), !e;
|
|
26
|
-
}, $ = (t) => {
|
|
27
|
-
l("theme", t), document.documentElement.classList.remove("dark"), document.documentElement.classList.remove("light"), document.documentElement.classList.add(t);
|
|
28
|
-
}, d = (t, e) => {
|
|
29
|
-
if (!t) return null;
|
|
30
|
-
for (const o of t)
|
|
31
|
-
if (!(e === "/" || o.path === "/") && (o.path === e || e.includes(o.path)))
|
|
32
|
-
return o;
|
|
33
|
-
return null;
|
|
34
|
-
}, b = (t, e) => d(t, e), k = (t, e = 300) => {
|
|
35
|
-
let o;
|
|
36
|
-
return function(...n) {
|
|
37
|
-
clearTimeout(o), o = setTimeout(() => t.apply(this, n), e);
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
export {
|
|
41
|
-
k as a,
|
|
42
|
-
$ as b,
|
|
43
|
-
h as c,
|
|
44
|
-
f as d,
|
|
45
|
-
c as e,
|
|
46
|
-
d as f,
|
|
47
|
-
b as g,
|
|
48
|
-
g as h,
|
|
49
|
-
L as i,
|
|
50
|
-
r as j,
|
|
51
|
-
s as k,
|
|
52
|
-
w as l,
|
|
53
|
-
y as m,
|
|
54
|
-
M as n,
|
|
55
|
-
T as o,
|
|
56
|
-
u as p,
|
|
57
|
-
l as q,
|
|
58
|
-
j as r,
|
|
59
|
-
S as s,
|
|
60
|
-
p as t,
|
|
61
|
-
E as u
|
|
62
|
-
};
|