@creopse/bridge 0.1.0 → 0.1.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/dist/index-BWhWXGj9.js +13 -0
- package/dist/react/bridge.js +27 -0
- package/dist/react/bridge10.js +24 -0
- package/dist/react/bridge11.js +32 -0
- package/dist/react/bridge12.js +23 -0
- package/dist/react/bridge13.js +18 -0
- package/dist/react/bridge2.js +66 -0
- package/dist/react/bridge3.js +37 -0
- package/dist/react/bridge4.js +20 -0
- package/dist/react/bridge5.js +54 -0
- package/dist/react/bridge6.js +54 -0
- package/dist/react/bridge7.js +70 -0
- package/dist/react/bridge8.js +54 -0
- package/dist/react/bridge9.js +37 -0
- package/dist/vite/index.js +6 -2
- package/dist/vite/react.js +131 -147
- package/dist/vite/vue.js +123 -138
- package/dist/vue/bridge.js +15 -0
- package/dist/vue/bridge2.js +27 -0
- package/dist/vue/bridge3.js +1 -0
- package/dist/vue/bridge4.js +18 -0
- package/dist/vue/bridge5.js +1 -0
- package/dist/vue/bridge6.js +41 -0
- package/dist/vue/bridge7.js +16 -0
- package/package.json +38 -12
- package/dist/react/components/AsyncImg/AsyncImg.d.ts +0 -12
- package/dist/react/components/AsyncImg/AsyncImg.js +0 -20
- package/dist/react/components/AsyncImg/index.d.ts +0 -1
- package/dist/react/components/AsyncImg/index.js +0 -1
- package/dist/react/components/CustomTransition/CustomTransition.d.ts +0 -12
- package/dist/react/components/CustomTransition/CustomTransition.js +0 -48
- package/dist/react/components/CustomTransition/index.d.ts +0 -1
- package/dist/react/components/CustomTransition/index.js +0 -1
- package/dist/react/components/Image/Image.d.ts +0 -14
- package/dist/react/components/Image/Image.js +0 -20
- package/dist/react/components/Image/index.d.ts +0 -1
- package/dist/react/components/Image/index.js +0 -1
- package/dist/react/components/MountedTeleport/MountedTeleport.d.ts +0 -8
- package/dist/react/components/MountedTeleport/MountedTeleport.js +0 -43
- package/dist/react/components/MountedTeleport/index.d.ts +0 -1
- package/dist/react/components/MountedTeleport/index.js +0 -1
- package/dist/react/components/PageLayout/PageLayout.d.ts +0 -20
- package/dist/react/components/PageLayout/PageLayout.js +0 -30
- package/dist/react/components/PageLayout/index.d.ts +0 -1
- package/dist/react/components/PageLayout/index.js +0 -1
- package/dist/react/components/ReadMore/ReadMore.d.ts +0 -12
- package/dist/react/components/ReadMore/ReadMore.js +0 -33
- package/dist/react/components/ReadMore/index.d.ts +0 -1
- package/dist/react/components/ReadMore/index.js +0 -1
- package/dist/react/components/StickyBottom/StickyBottom.d.ts +0 -9
- package/dist/react/components/StickyBottom/StickyBottom.js +0 -57
- package/dist/react/components/StickyBottom/index.d.ts +0 -1
- package/dist/react/components/StickyBottom/index.js +0 -1
- package/dist/react/components/StickyTop/StickyTop.d.ts +0 -9
- package/dist/react/components/StickyTop/StickyTop.js +0 -56
- package/dist/react/components/StickyTop/index.d.ts +0 -1
- package/dist/react/components/StickyTop/index.js +0 -1
- package/dist/react/components/index.d.ts +0 -8
- package/dist/react/components/index.js +0 -8
- package/dist/react/hooks/access.d.ts +0 -25
- package/dist/react/hooks/access.js +0 -41
- package/dist/react/hooks/core-bridge.d.ts +0 -13
- package/dist/react/hooks/core-bridge.js +0 -19
- package/dist/react/hooks/responsive.d.ts +0 -15
- package/dist/react/hooks/responsive.js +0 -42
- package/dist/react/hooks/user-preference.d.ts +0 -4
- package/dist/react/hooks/user-preference.js +0 -17
- package/dist/utils/constants.d.ts +0 -2
- package/dist/utils/constants.js +0 -3
- package/dist/utils/functions.d.ts +0 -33
- package/dist/utils/functions.js +0 -53
- package/dist/vite/index.d.ts +0 -2
- package/dist/vite/react.d.ts +0 -45
- package/dist/vite/vue.d.ts +0 -40
- package/dist/vue/composables/access.d.ts +0 -25
- package/dist/vue/composables/access.js +0 -58
- package/dist/vue/composables/core-bridge.d.ts +0 -12
- package/dist/vue/composables/core-bridge.js +0 -15
- package/dist/vue/composables/responsive.d.ts +0 -15
- package/dist/vue/composables/responsive.js +0 -35
- package/dist/vue/composables/user-preference.d.ts +0 -12
- package/dist/vue/composables/user-preference.js +0 -14
package/dist/vite/react.js
CHANGED
|
@@ -1,151 +1,135 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
1
|
+
import { D as y, S as b, s as D } from "../index-BWhWXGj9.js";
|
|
2
|
+
import L from "@originjs/vite-plugin-federation";
|
|
3
|
+
import C from "@vitejs/plugin-basic-ssl";
|
|
4
|
+
import x from "@vitejs/plugin-react";
|
|
5
|
+
import { stringify as M, parse as O } from "comment-json";
|
|
6
|
+
import j from "fs";
|
|
7
|
+
import s from "path";
|
|
8
|
+
import k from "rollup-plugin-copy";
|
|
9
|
+
import N from "unocss/vite";
|
|
10
|
+
import B from "vite-plugin-auto-import-lite";
|
|
11
|
+
import $ from "vite-plugin-i18next-loader";
|
|
12
|
+
import z from "vite-plugin-json5";
|
|
13
|
+
import R from "vite-plugin-top-level-await";
|
|
14
|
+
function Z(A = {}) {
|
|
15
|
+
const {
|
|
16
|
+
manifestPath: p = "./manifest.jsonc",
|
|
17
|
+
srcDir: c = "./src",
|
|
18
|
+
outDir: d = "frontend",
|
|
19
|
+
i18nLocalesPath: f,
|
|
20
|
+
hooksDirs: _ = ["src/hooks"],
|
|
21
|
+
shared: E = [],
|
|
22
|
+
unocss: S = !1,
|
|
23
|
+
eslintAutoImport: w = !1
|
|
24
|
+
} = A;
|
|
25
|
+
let r, e, u, g, t, v, P, h;
|
|
26
|
+
function I() {
|
|
27
|
+
const l = s.resolve(r, p), m = j.readFileSync(l, "utf-8");
|
|
28
|
+
if (e = O(m || "{}"), t = {}, e.pages && Array.isArray(e.pages))
|
|
29
|
+
for (const a of e.pages)
|
|
30
|
+
t[`./${a.name}`] = a.module;
|
|
31
|
+
const n = e.dashboard;
|
|
32
|
+
n?.module && (t[`./${y}`] = n.module);
|
|
33
|
+
const i = e.settings;
|
|
34
|
+
i?.module && (t[`./${b}`] = i.module);
|
|
35
|
+
const o = e.development;
|
|
36
|
+
u = D(String(e.id)) || "creopse-plugin", g = e.entry || "remoteEntry.js", v = o?.previewPort || 2160, P = o?.serverPort || 2161, h = o?.ssl || !1;
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
name: "creopse-react-plugin",
|
|
40
|
+
config(l) {
|
|
41
|
+
r = l.root || process.cwd(), I();
|
|
42
|
+
const m = process.env.APP_IS_PREVIEW === "true", n = f ? s.resolve(r, f) : s.resolve(r, c, "i18n/locales"), i = ["react", "react-dom", "zustand", ...E];
|
|
43
|
+
return {
|
|
44
|
+
envPrefix: "APP_",
|
|
45
|
+
plugins: [
|
|
46
|
+
x(),
|
|
47
|
+
L({
|
|
48
|
+
name: u,
|
|
49
|
+
filename: g,
|
|
50
|
+
exposes: t,
|
|
51
|
+
shared: i
|
|
52
|
+
}),
|
|
53
|
+
R({
|
|
54
|
+
promiseExportName: "__tla",
|
|
55
|
+
promiseImportName: (o) => `__tla_${o}`
|
|
56
|
+
}),
|
|
57
|
+
z(),
|
|
58
|
+
$({
|
|
59
|
+
paths: [n],
|
|
60
|
+
include: ["**/*.json"]
|
|
61
|
+
}),
|
|
62
|
+
B({
|
|
63
|
+
dirs: _,
|
|
64
|
+
imports: ["react"],
|
|
65
|
+
vueTemplate: !1,
|
|
66
|
+
...w ? {
|
|
67
|
+
eslintrc: {
|
|
68
|
+
enabled: !0,
|
|
69
|
+
filepath: "./.eslintrc-auto-import.json",
|
|
70
|
+
globalsPropValue: !0
|
|
71
|
+
}
|
|
72
|
+
} : {}
|
|
73
|
+
}),
|
|
74
|
+
...S ? [N()] : [],
|
|
75
|
+
...h ? [C()] : []
|
|
76
|
+
],
|
|
77
|
+
resolve: {
|
|
78
|
+
alias: [
|
|
79
|
+
{
|
|
80
|
+
find: "@",
|
|
81
|
+
replacement: s.resolve(r, c)
|
|
33
82
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
const isPreview = process.env.APP_IS_PREVIEW === 'true';
|
|
56
|
-
const localesPath = i18nLocalesPath
|
|
57
|
-
? path.resolve(root, i18nLocalesPath)
|
|
58
|
-
: path.resolve(root, srcDir, 'i18n/locales');
|
|
59
|
-
const sharedModules = ['react', 'react-dom', 'zustand', ...shared];
|
|
60
|
-
return {
|
|
61
|
-
envPrefix: 'APP_',
|
|
62
|
-
plugins: [
|
|
63
|
-
react(),
|
|
64
|
-
federation({
|
|
65
|
-
name: pluginId,
|
|
66
|
-
filename: pluginEntry,
|
|
67
|
-
exposes,
|
|
68
|
-
shared: sharedModules,
|
|
69
|
-
}),
|
|
70
|
-
topLevelAwait({
|
|
71
|
-
promiseExportName: '__tla',
|
|
72
|
-
promiseImportName: (i) => `__tla_${i}`,
|
|
73
|
-
}),
|
|
74
|
-
json5Plugin(),
|
|
75
|
-
i18nextLoader({
|
|
76
|
-
paths: [localesPath],
|
|
77
|
-
include: ['**/*.json'],
|
|
78
|
-
}),
|
|
79
|
-
AutoImportPlugin({
|
|
80
|
-
dirs: hooksDirs,
|
|
81
|
-
imports: ['react'],
|
|
82
|
-
vueTemplate: false,
|
|
83
|
-
...(eslintAutoImport
|
|
84
|
-
? {
|
|
85
|
-
eslintrc: {
|
|
86
|
-
enabled: true,
|
|
87
|
-
filepath: './.eslintrc-auto-import.json',
|
|
88
|
-
globalsPropValue: true,
|
|
89
|
-
},
|
|
90
|
-
}
|
|
91
|
-
: {}),
|
|
92
|
-
}),
|
|
93
|
-
...(unocss ? [UnoCSS()] : []),
|
|
94
|
-
...(sslEnabled ? [basicSsl()] : []),
|
|
83
|
+
],
|
|
84
|
+
dedupe: ["react", "react-dom", "zustand"]
|
|
85
|
+
},
|
|
86
|
+
build: {
|
|
87
|
+
target: "esnext",
|
|
88
|
+
outDir: d,
|
|
89
|
+
rollupOptions: {
|
|
90
|
+
plugins: [
|
|
91
|
+
k({
|
|
92
|
+
targets: [
|
|
93
|
+
{
|
|
94
|
+
src: s.resolve(r, p),
|
|
95
|
+
dest: d,
|
|
96
|
+
transform() {
|
|
97
|
+
return e?.mode && (e.mode = m ? "development" : "production"), ((a) => a.replace(/(,)\s*\n/g, `,
|
|
98
|
+
|
|
99
|
+
`))(
|
|
100
|
+
M(e, null, 2)
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
95
104
|
],
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
{
|
|
113
|
-
src: path.resolve(root, manifestPath),
|
|
114
|
-
dest: outDir,
|
|
115
|
-
transform() {
|
|
116
|
-
if (manifest?.mode) {
|
|
117
|
-
manifest.mode = isPreview ? 'development' : 'production';
|
|
118
|
-
}
|
|
119
|
-
const addBlankLineAfterCommas = (jsonc) => jsonc.replace(/(,)\s*\n/g, ',\n\n');
|
|
120
|
-
return addBlankLineAfterCommas(stringify(manifest, null, 2));
|
|
121
|
-
},
|
|
122
|
-
},
|
|
123
|
-
],
|
|
124
|
-
hook: 'writeBundle',
|
|
125
|
-
verbose: false,
|
|
126
|
-
flatten: true,
|
|
127
|
-
}),
|
|
128
|
-
],
|
|
129
|
-
},
|
|
130
|
-
assetsInlineLimit: Infinity,
|
|
131
|
-
cssCodeSplit: false,
|
|
132
|
-
},
|
|
133
|
-
preview: {
|
|
134
|
-
port: previewPort,
|
|
135
|
-
strictPort: true,
|
|
136
|
-
cors: true,
|
|
137
|
-
headers: {
|
|
138
|
-
'Access-Control-Allow-Origin': '*',
|
|
139
|
-
},
|
|
140
|
-
},
|
|
141
|
-
server: {
|
|
142
|
-
port: serverPort,
|
|
143
|
-
cors: true,
|
|
144
|
-
headers: {
|
|
145
|
-
'Access-Control-Allow-Origin': '*',
|
|
146
|
-
},
|
|
147
|
-
},
|
|
148
|
-
};
|
|
105
|
+
hook: "writeBundle",
|
|
106
|
+
verbose: !1,
|
|
107
|
+
flatten: !0
|
|
108
|
+
})
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
assetsInlineLimit: 1 / 0,
|
|
112
|
+
cssCodeSplit: !1
|
|
113
|
+
},
|
|
114
|
+
preview: {
|
|
115
|
+
port: v,
|
|
116
|
+
strictPort: !0,
|
|
117
|
+
cors: !0,
|
|
118
|
+
headers: {
|
|
119
|
+
"Access-Control-Allow-Origin": "*"
|
|
120
|
+
}
|
|
149
121
|
},
|
|
150
|
-
|
|
122
|
+
server: {
|
|
123
|
+
port: P,
|
|
124
|
+
cors: !0,
|
|
125
|
+
headers: {
|
|
126
|
+
"Access-Control-Allow-Origin": "*"
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
};
|
|
151
132
|
}
|
|
133
|
+
export {
|
|
134
|
+
Z as CreopseReactPlugin
|
|
135
|
+
};
|
package/dist/vite/vue.js
CHANGED
|
@@ -1,142 +1,127 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
1
|
+
import { D as y, S as I, s as b } from "../index-BWhWXGj9.js";
|
|
2
|
+
import D from "@originjs/vite-plugin-federation";
|
|
3
|
+
import L from "@vitejs/plugin-basic-ssl";
|
|
4
|
+
import C from "@vitejs/plugin-vue";
|
|
5
|
+
import { stringify as x, parse as M } from "comment-json";
|
|
6
|
+
import O from "fs";
|
|
7
|
+
import t from "path";
|
|
8
|
+
import N from "rollup-plugin-copy";
|
|
9
|
+
import j from "unocss/vite";
|
|
10
|
+
import B from "vite-plugin-auto-import-lite";
|
|
11
|
+
import $ from "vite-plugin-i18next-loader";
|
|
12
|
+
import k from "vite-plugin-json5";
|
|
13
|
+
import T from "vite-plugin-top-level-await";
|
|
14
|
+
function Y(h = {}) {
|
|
15
|
+
const {
|
|
16
|
+
manifestPath: p = "./manifest.jsonc",
|
|
17
|
+
srcDir: c = "./src",
|
|
18
|
+
outDir: u = "frontend",
|
|
19
|
+
i18nLocalesPath: d,
|
|
20
|
+
composablesDirs: _ = ["src/composables"],
|
|
21
|
+
shared: E = [],
|
|
22
|
+
unocss: S = !1
|
|
23
|
+
} = h;
|
|
24
|
+
let r, e, f, v, s, g, P, A;
|
|
25
|
+
function w() {
|
|
26
|
+
const a = t.resolve(r, p), m = O.readFileSync(a, "utf-8");
|
|
27
|
+
if (e = M(m || "{}"), s = {}, e.pages && Array.isArray(e.pages))
|
|
28
|
+
for (const l of e.pages)
|
|
29
|
+
s[`./${l.name}`] = l.module;
|
|
30
|
+
const n = e.dashboard;
|
|
31
|
+
n?.module && (s[`./${y}`] = n.module);
|
|
32
|
+
const i = e.settings;
|
|
33
|
+
i?.module && (s[`./${I}`] = i.module);
|
|
34
|
+
const o = e.development;
|
|
35
|
+
f = b(String(e.id)) || "creopse-plugin", v = e.entry || "remoteEntry.js", g = o?.previewPort || 2160, P = o?.serverPort || 2161, A = o?.ssl || !1;
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
name: "creopse-vue-plugin",
|
|
39
|
+
config(a) {
|
|
40
|
+
r = a.root || process.cwd(), w();
|
|
41
|
+
const m = process.env.APP_IS_PREVIEW === "true", n = d ? t.resolve(r, d) : t.resolve(r, c, "i18n/locales"), i = ["vue", "pinia", ...E];
|
|
42
|
+
return {
|
|
43
|
+
envPrefix: "APP_",
|
|
44
|
+
plugins: [
|
|
45
|
+
C(),
|
|
46
|
+
D({
|
|
47
|
+
name: f,
|
|
48
|
+
filename: v,
|
|
49
|
+
exposes: s,
|
|
50
|
+
shared: i
|
|
51
|
+
}),
|
|
52
|
+
T({
|
|
53
|
+
promiseExportName: "__tla",
|
|
54
|
+
promiseImportName: (o) => `__tla_${o}`
|
|
55
|
+
}),
|
|
56
|
+
k(),
|
|
57
|
+
$({
|
|
58
|
+
paths: [n],
|
|
59
|
+
include: ["**/*.json"]
|
|
60
|
+
}),
|
|
61
|
+
B({
|
|
62
|
+
dirs: _,
|
|
63
|
+
imports: ["vue", "pinia"],
|
|
64
|
+
vueTemplate: !0
|
|
65
|
+
}),
|
|
66
|
+
...S ? [j()] : [],
|
|
67
|
+
...A ? [L()] : []
|
|
68
|
+
],
|
|
69
|
+
resolve: {
|
|
70
|
+
alias: [
|
|
71
|
+
{
|
|
72
|
+
find: "@",
|
|
73
|
+
replacement: t.resolve(r, c)
|
|
33
74
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
const isPreview = process.env.APP_IS_PREVIEW === 'true';
|
|
56
|
-
const localesPath = i18nLocalesPath
|
|
57
|
-
? path.resolve(root, i18nLocalesPath)
|
|
58
|
-
: path.resolve(root, srcDir, 'i18n/locales');
|
|
59
|
-
const sharedModules = ['vue', 'pinia', ...shared];
|
|
60
|
-
return {
|
|
61
|
-
envPrefix: 'APP_',
|
|
62
|
-
plugins: [
|
|
63
|
-
vue(),
|
|
64
|
-
federation({
|
|
65
|
-
name: pluginId,
|
|
66
|
-
filename: pluginEntry,
|
|
67
|
-
exposes,
|
|
68
|
-
shared: sharedModules,
|
|
69
|
-
}),
|
|
70
|
-
topLevelAwait({
|
|
71
|
-
promiseExportName: '__tla',
|
|
72
|
-
promiseImportName: (i) => `__tla_${i}`,
|
|
73
|
-
}),
|
|
74
|
-
json5Plugin(),
|
|
75
|
-
i18nextLoader({
|
|
76
|
-
paths: [localesPath],
|
|
77
|
-
include: ['**/*.json'],
|
|
78
|
-
}),
|
|
79
|
-
AutoImportPlugin({
|
|
80
|
-
dirs: composablesDirs,
|
|
81
|
-
imports: ['vue', 'pinia'],
|
|
82
|
-
vueTemplate: true,
|
|
83
|
-
}),
|
|
84
|
-
...(unocss ? [UnoCSS()] : []),
|
|
85
|
-
...(sslEnabled ? [basicSsl()] : []),
|
|
75
|
+
],
|
|
76
|
+
dedupe: ["vue"]
|
|
77
|
+
},
|
|
78
|
+
build: {
|
|
79
|
+
target: "esnext",
|
|
80
|
+
outDir: u,
|
|
81
|
+
rollupOptions: {
|
|
82
|
+
plugins: [
|
|
83
|
+
N({
|
|
84
|
+
targets: [
|
|
85
|
+
{
|
|
86
|
+
src: t.resolve(r, p),
|
|
87
|
+
dest: u,
|
|
88
|
+
transform() {
|
|
89
|
+
return e?.mode && (e.mode = m ? "development" : "production"), ((l) => l.replace(/(,)\s*\n/g, `,
|
|
90
|
+
|
|
91
|
+
`))(
|
|
92
|
+
x(e, null, 2)
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
86
96
|
],
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
{
|
|
104
|
-
src: path.resolve(root, manifestPath),
|
|
105
|
-
dest: outDir,
|
|
106
|
-
transform() {
|
|
107
|
-
if (manifest?.mode) {
|
|
108
|
-
manifest.mode = isPreview ? 'development' : 'production';
|
|
109
|
-
}
|
|
110
|
-
const addBlankLineAfterCommas = (jsonc) => jsonc.replace(/(,)\s*\n/g, ',\n\n');
|
|
111
|
-
return addBlankLineAfterCommas(stringify(manifest, null, 2));
|
|
112
|
-
},
|
|
113
|
-
},
|
|
114
|
-
],
|
|
115
|
-
hook: 'writeBundle',
|
|
116
|
-
verbose: false,
|
|
117
|
-
flatten: true,
|
|
118
|
-
}),
|
|
119
|
-
],
|
|
120
|
-
},
|
|
121
|
-
assetsInlineLimit: Infinity,
|
|
122
|
-
cssCodeSplit: false,
|
|
123
|
-
},
|
|
124
|
-
preview: {
|
|
125
|
-
port: previewPort,
|
|
126
|
-
strictPort: true,
|
|
127
|
-
cors: true,
|
|
128
|
-
headers: {
|
|
129
|
-
'Access-Control-Allow-Origin': '*',
|
|
130
|
-
},
|
|
131
|
-
},
|
|
132
|
-
server: {
|
|
133
|
-
port: serverPort,
|
|
134
|
-
cors: true,
|
|
135
|
-
headers: {
|
|
136
|
-
'Access-Control-Allow-Origin': '*',
|
|
137
|
-
},
|
|
138
|
-
},
|
|
139
|
-
};
|
|
97
|
+
hook: "writeBundle",
|
|
98
|
+
verbose: !1,
|
|
99
|
+
flatten: !0
|
|
100
|
+
})
|
|
101
|
+
]
|
|
102
|
+
},
|
|
103
|
+
assetsInlineLimit: 1 / 0,
|
|
104
|
+
cssCodeSplit: !1
|
|
105
|
+
},
|
|
106
|
+
preview: {
|
|
107
|
+
port: g,
|
|
108
|
+
strictPort: !0,
|
|
109
|
+
cors: !0,
|
|
110
|
+
headers: {
|
|
111
|
+
"Access-Control-Allow-Origin": "*"
|
|
112
|
+
}
|
|
140
113
|
},
|
|
141
|
-
|
|
114
|
+
server: {
|
|
115
|
+
port: P,
|
|
116
|
+
cors: !0,
|
|
117
|
+
headers: {
|
|
118
|
+
"Access-Control-Allow-Origin": "*"
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
};
|
|
142
124
|
}
|
|
125
|
+
export {
|
|
126
|
+
Y as CreopseVuePlugin
|
|
127
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import "vue";
|
|
2
|
+
import "@iconify/vue";
|
|
3
|
+
import "naive-ui";
|
|
4
|
+
import { useResponsive as i } from "./bridge2.js";
|
|
5
|
+
import "./bridge3.js";
|
|
6
|
+
import { useCoreBridge as u } from "./bridge4.js";
|
|
7
|
+
import "./bridge5.js";
|
|
8
|
+
import { useAccess as c } from "./bridge6.js";
|
|
9
|
+
import { useUserPreference as d } from "./bridge7.js";
|
|
10
|
+
export {
|
|
11
|
+
c as useAccess,
|
|
12
|
+
u as useCoreBridge,
|
|
13
|
+
i as useResponsive,
|
|
14
|
+
d as useUserPreference
|
|
15
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { useMediaQuery as i } from "@vueuse/core";
|
|
2
|
+
import { computed as o } from "vue";
|
|
3
|
+
const f = () => {
|
|
4
|
+
const s = i("(min-width: 1536px)"), e = i(
|
|
5
|
+
"(min-width: 1280px) and (max-width: 1535px)"
|
|
6
|
+
), m = i(
|
|
7
|
+
"(min-width: 1024px) and (max-width: 1279px)"
|
|
8
|
+
), c = i("(min-width: 768px) and (max-width: 1023px)"), d = i("(max-width: 767px)"), p = i("(min-width: 640px)"), t = i("(min-width: 768px)"), n = i("(min-width: 1024px)"), r = i("(min-width: 1280px)"), x = i("(min-width: 1536px)"), a = o(() => !t.value), h = o(() => t.value && !n.value), w = o(() => n.value);
|
|
9
|
+
return {
|
|
10
|
+
is2XlScreen: s,
|
|
11
|
+
isXlScreen: e,
|
|
12
|
+
isLgScreen: m,
|
|
13
|
+
isMdScreen: c,
|
|
14
|
+
isSmScreen: d,
|
|
15
|
+
fromSm: p,
|
|
16
|
+
fromMd: t,
|
|
17
|
+
fromLg: n,
|
|
18
|
+
fromXl: r,
|
|
19
|
+
from2Xl: x,
|
|
20
|
+
isMobile: a,
|
|
21
|
+
isTablet: h,
|
|
22
|
+
isDesktop: w
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export {
|
|
26
|
+
f as useResponsive
|
|
27
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const t = () => {
|
|
2
|
+
const { sharedData: e, api: o, i18n: a, router: s, helpers: n, stores: r } = window.__creopse__;
|
|
3
|
+
return {
|
|
4
|
+
locale: e?.locale,
|
|
5
|
+
env: e?.env,
|
|
6
|
+
appConfig: e?.appConfig,
|
|
7
|
+
api: o,
|
|
8
|
+
i18n: a,
|
|
9
|
+
router: s,
|
|
10
|
+
helpers: n,
|
|
11
|
+
auth: r.auth,
|
|
12
|
+
server: r.server,
|
|
13
|
+
ui: r.ui
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
t as useCoreBridge
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { AccessGuard as a, UserRole as i, Permission as d } from "@creopse/utils/enums";
|
|
2
|
+
import { useI18n as g } from "vue-i18n";
|
|
3
|
+
const I = () => {
|
|
4
|
+
const { t: u } = g(), c = (e, s) => (e?.findIndex(
|
|
5
|
+
(n) => n.name === s
|
|
6
|
+
) ?? -1) > -1, t = (e, s) => (e?.findIndex((n) => n.name === s) ?? -1) > -1, l = (e) => t(e, i.SUPER_ADMIN), o = (e) => Object.values(d).includes(e), r = [
|
|
7
|
+
{
|
|
8
|
+
label: "API",
|
|
9
|
+
value: a.API,
|
|
10
|
+
tagType: "warning"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
label: "Web",
|
|
14
|
+
value: a.WEB,
|
|
15
|
+
tagType: "info"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
label: "Admin",
|
|
19
|
+
value: a.ADMIN,
|
|
20
|
+
tagType: "success"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
label: "Mobile",
|
|
24
|
+
value: a.MOBILE,
|
|
25
|
+
tagType: "error"
|
|
26
|
+
}
|
|
27
|
+
];
|
|
28
|
+
return {
|
|
29
|
+
accessGuards: r,
|
|
30
|
+
getAccessGuardLabel: (e) => r.find((s) => s.value === e)?.label,
|
|
31
|
+
getAccessGuardTagType: (e) => r.find((s) => s.value === e)?.tagType || "default",
|
|
32
|
+
getRoleName: (e, s) => e?.find((n) => n.id === s)?.name || u("undefined"),
|
|
33
|
+
isPermissionNative: o,
|
|
34
|
+
userIsSuperAdmin: l,
|
|
35
|
+
userCan: c,
|
|
36
|
+
userIs: t
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export {
|
|
40
|
+
I as useAccess
|
|
41
|
+
};
|