@jnrs/vue-core 1.2.33 → 1.2.34

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,115 @@
1
1
  declare const _default: {
2
- '@jnrs/vue-core': {
3
- components: {
4
- GlobalSetting: {
5
- title: string;
6
- isMockServer: string;
7
- language: string;
8
- languageOptions: {
9
- zhCn: string;
10
- en: string;
11
- };
12
- theme: string;
13
- themeOptions: {
14
- light: string;
15
- dark: string;
16
- auto: string;
17
- };
18
- primaryColor: string;
19
- primaryColorOptions: {
20
- jnrs: string;
21
- azure: string;
22
- moonYellow: string;
23
- jdRed: string;
24
- taobaoRed: string;
25
- dingtalkBlue: string;
26
- wechatGreen: string;
27
- };
2
+ components: {
3
+ GlobalSetting: {
4
+ title: string;
5
+ isMockServer: string;
6
+ language: string;
7
+ languageOptions: {
8
+ zhCn: string;
9
+ en: string;
28
10
  };
29
- JnImageView: {
30
- noDisplay: string;
11
+ theme: string;
12
+ themeOptions: {
13
+ light: string;
14
+ dark: string;
15
+ auto: string;
31
16
  };
32
- JnPdfView: {
33
- viewPDF: string;
34
- downloadFile: string;
17
+ primaryColor: string;
18
+ primaryColorOptions: {
19
+ jnrs: string;
20
+ azure: string;
21
+ moonYellow: string;
22
+ jdRed: string;
23
+ taobaoRed: string;
24
+ dingtalkBlue: string;
25
+ wechatGreen: string;
35
26
  };
36
- JnImportAndExport: {
37
- dialogTitle: string;
38
- dialogFormItem: string;
39
- downloadImportTemplate: string;
40
- submit: string;
41
- loading: string;
42
- noImportApi: string;
43
- rulesImport: string;
44
- exportDynamicTitle: string;
45
- confirmButtonText: string;
46
- cancelButtonText: string;
47
- messageBoxConfirm: string;
48
- messageBoxConfirmTitle: string;
49
- importSuccess: string;
27
+ };
28
+ JnImageView: {
29
+ noDisplay: string;
30
+ };
31
+ JnPdfView: {
32
+ viewPDF: string;
33
+ downloadFile: string;
34
+ };
35
+ JnImportAndExport: {
36
+ dialogTitle: string;
37
+ dialogFormItem: string;
38
+ downloadImportTemplate: string;
39
+ submit: string;
40
+ loading: string;
41
+ noImportApi: string;
42
+ rulesImport: string;
43
+ exportDynamicTitle: string;
44
+ confirmButtonText: string;
45
+ cancelButtonText: string;
46
+ messageBoxConfirm: string;
47
+ messageBoxConfirmTitle: string;
48
+ importSuccess: string;
49
+ };
50
+ JnDateQuery: {
51
+ typeLabels: {
52
+ date: string;
53
+ week: string;
54
+ month: string;
55
+ year: string;
56
+ datetime: string;
57
+ daterange: string;
58
+ datetimerange: string;
59
+ };
60
+ quickButtons: {
61
+ today: string;
62
+ yesterday: string;
63
+ tomorrow: string;
64
+ thisWeek: string;
65
+ lastWeek: string;
66
+ nextWeek: string;
67
+ thisMonth: string;
68
+ lastMonth: string;
69
+ nextMonth: string;
70
+ thisYear: string;
71
+ lastYear: string;
72
+ nextYear: string;
50
73
  };
74
+ formats: {
75
+ month: string;
76
+ year: string;
77
+ datetime: string;
78
+ datetimerange: string;
79
+ week: string;
80
+ daterange: string;
81
+ date: string;
82
+ };
83
+ placeholder: string;
84
+ startPlaceholder: string;
85
+ endPlaceholder: string;
86
+ rangeSeparator: string;
87
+ };
88
+ JnFileUpload: {
89
+ upload: string;
90
+ fileType: string;
91
+ fileSize: string;
92
+ fileSizeLimit: string;
93
+ errorMessages: {
94
+ maxFiles: string;
95
+ invalidType: string;
96
+ maxSize: string;
97
+ };
98
+ };
99
+ JnSelectTemplate: {
100
+ moreData: string;
101
+ singleSelect: string;
102
+ multipleSelect: string;
103
+ selected: string;
104
+ index: string;
105
+ select: string;
106
+ confirm: string;
107
+ cancel: string;
108
+ clear: string;
109
+ all: string;
110
+ };
111
+ JnTable: {
112
+ index: string;
51
113
  };
52
114
  };
53
115
  };
@@ -1,5 +1,5 @@
1
1
  import "pinia-plugin-persistedstate";
2
- import { b as r, u as t, a as u } from "../index-DRbGqK4D.js";
2
+ import { b as r, u as t, a as u } from "../index-qf5rNcN2.js";
3
3
  export {
4
4
  r as useMenuStore,
5
5
  t as useMockStore,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jnrs/vue-core",
3
- "version": "1.2.33",
3
+ "version": "1.2.34",
4
4
  "description": "巨能(JNRS)前端工程化开发,Vue 专用核心功能包。",
5
5
  "keywords": [
6
6
  "jnrs",
@@ -1,167 +0,0 @@
1
- import "pinia-plugin-persistedstate";
2
- import { defineStore as m } from "pinia";
3
- import { ref as u, computed as b, watch as h } from "vue";
4
- import { Fullscreen as S } from "@jnrs/shared";
5
- import { usePreferredDark as f } from "@vueuse/core";
6
- import { a as k } from "./index-GnfhAnhF.js";
7
- const O = m(
8
- "@jnrs/vue-core/pinia:mock",
9
- () => ({ useMockServe: u(!1) }),
10
- {
11
- persist: {
12
- pick: ["useMockServe"]
13
- }
14
- }
15
- ), j = [
16
- { value: "zhCn", label: "@jnrs/vue-core.components.GlobalSetting.languageOptions.zhCn" },
17
- { value: "en", label: "@jnrs/vue-core.components.GlobalSetting.languageOptions.en" }
18
- ], C = [
19
- { value: "auto", label: "@jnrs/vue-core.components.GlobalSetting.themeOptions.auto" },
20
- { value: "light", label: "@jnrs/vue-core.components.GlobalSetting.themeOptions.light" },
21
- { value: "dark", label: "@jnrs/vue-core.components.GlobalSetting.themeOptions.dark" }
22
- ], M = [
23
- { value: "oklch(0.6 0.19 41)", label: "@jnrs/vue-core.components.GlobalSetting.primaryColorOptions.jnrs" },
24
- {
25
- value: "oklch(0.51 0.21 264)",
26
- label: "@jnrs/vue-core.components.GlobalSetting.primaryColorOptions.azure"
27
- },
28
- {
29
- value: "oklch(0.90 0.16 98)",
30
- label: "@jnrs/vue-core.components.GlobalSetting.primaryColorOptions.moonYellow"
31
- },
32
- { value: "oklch(0.63 0.25 27)", label: "@jnrs/vue-core.components.GlobalSetting.primaryColorOptions.jdRed" },
33
- {
34
- value: "oklch(0.65 0.24 33)",
35
- label: "@jnrs/vue-core.components.GlobalSetting.primaryColorOptions.taobaoRed"
36
- },
37
- {
38
- value: "oklch(0.61 0.20 261)",
39
- label: "@jnrs/vue-core.components.GlobalSetting.primaryColorOptions.dingtalkBlue"
40
- },
41
- {
42
- value: "oklch(0.70 0.12 152)",
43
- label: "@jnrs/vue-core.components.GlobalSetting.primaryColorOptions.wechatGreen"
44
- }
45
- ];
46
- function w(e) {
47
- return e === "zhCn" || e === "en";
48
- }
49
- function G(e) {
50
- return e === "light" || e === "dark" || e === "auto";
51
- }
52
- function U(e) {
53
- return typeof e == "string" && e.trim() !== "";
54
- }
55
- const x = m(
56
- "@jnrs/vue-core/pinia:system",
57
- () => {
58
- const e = u(!1), o = () => e.value = !e.value, s = new S(), r = u(!1), p = async () => {
59
- await s.toggle(), r.value = s.isFullscreen();
60
- }, t = u({
61
- locale: j[0].value,
62
- mode: C[0].value,
63
- primaryColor: M[0].value
64
- }), a = b(() => t.value.mode === "auto" ? d.value ? "dark" : "light" : t.value.mode), d = f();
65
- return h(
66
- [() => t.value.mode, d, () => t.value.primaryColor],
67
- ([l, y, v]) => {
68
- const c = document.documentElement;
69
- c.classList.remove("light", "dark"), l === "auto" ? c.classList.add(y ? "dark" : "light") : c.classList.add(l), v ? c.style.setProperty("--jnrs-color-primary", v) : c.style.removeProperty("--jnrs-color-primary");
70
- },
71
- { immediate: !0 }
72
- ), {
73
- theme: t,
74
- computedThemeMode: a,
75
- menuCollapse: e,
76
- documentFullscreen: r,
77
- toggleCollapse: o,
78
- toggleFullScreen: p,
79
- setLocale: (l) => {
80
- w(l) && (t.value.locale = l);
81
- },
82
- setMode: (l) => {
83
- G(l) && (t.value.mode = l);
84
- },
85
- setPrimaryColor: (l) => {
86
- U(l) && (t.value.primaryColor = l);
87
- }
88
- };
89
- },
90
- {
91
- persist: {
92
- pick: ["theme", "menuCollapse"]
93
- }
94
- }
95
- ), n = [];
96
- for (let e = 0; e < 256; ++e)
97
- n.push((e + 256).toString(16).slice(1));
98
- function L(e, o = 0) {
99
- return (n[e[o + 0]] + n[e[o + 1]] + n[e[o + 2]] + n[e[o + 3]] + "-" + n[e[o + 4]] + n[e[o + 5]] + "-" + n[e[o + 6]] + n[e[o + 7]] + "-" + n[e[o + 8]] + n[e[o + 9]] + "-" + n[e[o + 10]] + n[e[o + 11]] + n[e[o + 12]] + n[e[o + 13]] + n[e[o + 14]] + n[e[o + 15]]).toLowerCase();
100
- }
101
- let i;
102
- const P = new Uint8Array(16);
103
- function R() {
104
- if (!i) {
105
- if (typeof crypto > "u" || !crypto.getRandomValues)
106
- throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
107
- i = crypto.getRandomValues.bind(crypto);
108
- }
109
- return i(P);
110
- }
111
- const D = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), g = { randomUUID: D };
112
- function I(e, o, s) {
113
- e = e || {};
114
- const r = e.random ?? e.rng?.() ?? R();
115
- if (r.length < 16)
116
- throw new Error("Random bytes length must be >= 16");
117
- return r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, L(r);
118
- }
119
- function _(e, o, s) {
120
- return g.randomUUID && !e ? g.randomUUID() : I(e);
121
- }
122
- const T = m(
123
- "@jnrs/vue-core/pinia:menu",
124
- () => {
125
- const e = u(!1), o = u([]), s = async (t) => {
126
- if (e.value)
127
- return o.value;
128
- r(t), o.value = t, e.value = !0;
129
- try {
130
- await k(o.value);
131
- } catch (a) {
132
- throw a;
133
- }
134
- return o.value;
135
- }, r = (t) => {
136
- for (const a of t)
137
- a.meta.uuid = _(), a.children && r(a.children);
138
- };
139
- return { hasFetchedAsyncMenus: e, menus: o, asyncSetMenus: s, clearMenu: () => {
140
- e.value = !1, o.value = [];
141
- } };
142
- }
143
- // {
144
- // persist: {
145
- // pick: ['menus']
146
- // }
147
- // }
148
- );
149
- console.log(
150
- "%c✨ 欢迎使用 @jnrs/vue-core/pinia",
151
- 'background: #42B883; color: #39495C; font-weight: bold; padding: 4px 8px; border-radius: 4px; font-family: "Helvetica Neue", sans-serif;'
152
- );
153
- const q = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
154
- __proto__: null,
155
- useMenuStore: T,
156
- useMockStore: O,
157
- useSystemStore: x
158
- }, Symbol.toStringTag, { value: "Module" }));
159
- export {
160
- M as C,
161
- j as L,
162
- C as M,
163
- x as a,
164
- T as b,
165
- q as i,
166
- O as u
167
- };