@vtj/renderer 0.12.37 → 0.12.39
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.cjs +6 -6
- package/dist/index.mjs +226 -222
- package/package.json +6 -6
- package/types/version.d.ts +2 -2
package/dist/index.mjs
CHANGED
@@ -1,16 +1,16 @@
|
|
1
|
-
import { Base as
|
2
|
-
import { isUrl as
|
1
|
+
import { Base as Ue, BUILT_IN_COMPONENTS as Le, ProjectModel as B, HistoryModel as ge } from "@vtj/core";
|
2
|
+
import { isUrl as qe, url as C, dedupArray as Je, isString as P, isFunction as U, logger as k, storage as W, cookie as G, toArray as le, unRSA as ue, delay as ne, createRequest as ve, jsonp as ye, merge as Ke, pathToRegexp as ze, pathToRegexpMatch as Ve, formDataToJson as We, Queue as Ge, cloneDeep as pe, camelCase as b, upperFirst as Qe, pick as Ye, request as Y, loadScript as fe, Storage as Xe, mapToObject as ie } from "@vtj/utils";
|
3
3
|
import * as L from "vue";
|
4
|
-
import { inject as _e, defineComponent as we, h as X, ref as Z, defineAsyncComponent as de, watchEffect as
|
4
|
+
import { inject as _e, defineComponent as we, h as X, ref as Z, defineAsyncComponent as de, watchEffect as Ze } from "vue";
|
5
5
|
import { useRoute as Se } from "vue-router";
|
6
6
|
/**!
|
7
7
|
* Copyright (c) 2025, VTJ.PRO All rights reserved.
|
8
8
|
* @name @vtj/renderer
|
9
9
|
* @author CHC chenhuachun1549@dingtalk.com
|
10
|
-
* @version 0.12.
|
10
|
+
* @version 0.12.39
|
11
11
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
12
12
|
*/
|
13
|
-
const I = "0.12.
|
13
|
+
const I = "0.12.39";
|
14
14
|
var w = /* @__PURE__ */ ((r) => (r.Runtime = "Runtime", r.Design = "Design", r.Raw = "Raw", r.VNode = "VNode", r))(w || {});
|
15
15
|
const he = [
|
16
16
|
"$el",
|
@@ -24,7 +24,7 @@ const he = [
|
|
24
24
|
"$props",
|
25
25
|
"$options",
|
26
26
|
"$forceUpdate"
|
27
|
-
],
|
27
|
+
], is = [
|
28
28
|
"beforeCreate",
|
29
29
|
"created",
|
30
30
|
"beforeMount",
|
@@ -38,7 +38,7 @@ const he = [
|
|
38
38
|
"renderTriggered",
|
39
39
|
"activated",
|
40
40
|
"deactivated"
|
41
|
-
],
|
41
|
+
], et = [
|
42
42
|
"vIf",
|
43
43
|
"vElseIf",
|
44
44
|
"vElse",
|
@@ -47,7 +47,7 @@ const he = [
|
|
47
47
|
"vFor",
|
48
48
|
"vBind",
|
49
49
|
"vHtml"
|
50
|
-
],
|
50
|
+
], tt = {
|
51
51
|
String,
|
52
52
|
Number,
|
53
53
|
Boolean,
|
@@ -55,11 +55,11 @@ const he = [
|
|
55
55
|
Object,
|
56
56
|
Function,
|
57
57
|
Date
|
58
|
-
}, M = "VtjPage", N = "VtjHomepage",
|
58
|
+
}, M = "VtjPage", N = "VtjHomepage", st = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot".split(
|
59
59
|
","
|
60
|
-
),
|
60
|
+
), rt = "component,slot".split(",");
|
61
61
|
function O(r, e) {
|
62
|
-
return r.map((t) =>
|
62
|
+
return r.map((t) => qe(t) || t.startsWith("/") ? t : `${e}${t}`);
|
63
63
|
}
|
64
64
|
function q(r) {
|
65
65
|
return /\.css$/.test(r);
|
@@ -67,28 +67,28 @@ function q(r) {
|
|
67
67
|
function J(r) {
|
68
68
|
return /\.js$/.test(r);
|
69
69
|
}
|
70
|
-
function
|
70
|
+
function nt(r) {
|
71
71
|
return /\.json$/.test(r);
|
72
72
|
}
|
73
|
-
function
|
73
|
+
function os(r) {
|
74
74
|
return r.map(
|
75
75
|
(e) => `<script src="${C.append(e, { v: I })}"><\/script>`
|
76
76
|
).join("");
|
77
77
|
}
|
78
|
-
function
|
78
|
+
function as(r = []) {
|
79
79
|
return r.map(
|
80
80
|
(e) => `<link rel="stylesheet" href="${C.append(e, { v: I })}" />`
|
81
81
|
).join("");
|
82
82
|
}
|
83
|
-
function
|
83
|
+
function it(r, e = !1) {
|
84
84
|
return e && r.endsWith(".prod.js") ? r.replace(".prod.js", ".js") : r;
|
85
85
|
}
|
86
|
-
function
|
86
|
+
function ot(r, e, t = !1) {
|
87
87
|
const s = r.filter((h) => !!h.enabled), n = [], i = [], a = [], o = [], p = {}, c = {}, u = [], l = {};
|
88
88
|
return s.forEach(
|
89
89
|
({ urls: h, assetsUrl: f, library: d, assetsLibrary: m, localeLibrary: y }) => {
|
90
90
|
h?.forEach((g) => {
|
91
|
-
J(g) && n.push(
|
91
|
+
J(g) && n.push(it(g, t)), q(g) && i.push(g);
|
92
92
|
}), d && (o.push(d), p[d] = O(h || [], e), y && (c[d] = y)), f && a.push(f), m && u.push(m), d && m && (l[m] = d);
|
93
93
|
}
|
94
94
|
), {
|
@@ -96,24 +96,24 @@ function nt(r, e, t = !1) {
|
|
96
96
|
css: O(i, e),
|
97
97
|
materials: O(a, e),
|
98
98
|
libraryExports: o,
|
99
|
-
materialExports:
|
99
|
+
materialExports: Je(u),
|
100
100
|
materialMapLibrary: l,
|
101
101
|
libraryMap: p,
|
102
102
|
libraryLocaleMap: c
|
103
103
|
};
|
104
104
|
}
|
105
|
-
function
|
105
|
+
function at(r, e) {
|
106
106
|
const { name: t, parent: s, alias: n } = r;
|
107
107
|
return s ? e[s]?.[n || t] : e[n || t];
|
108
108
|
}
|
109
|
-
function
|
109
|
+
function ct(r = []) {
|
110
110
|
const e = r.filter((s) => q(s)), t = r.filter((s) => J(s));
|
111
111
|
return {
|
112
112
|
css: e,
|
113
113
|
js: t
|
114
114
|
};
|
115
115
|
}
|
116
|
-
function
|
116
|
+
function lt(r, e) {
|
117
117
|
const t = (c) => {
|
118
118
|
const u = [];
|
119
119
|
let l = 0;
|
@@ -141,9 +141,9 @@ function at(r, e) {
|
|
141
141
|
}), l++;
|
142
142
|
else if (c[l] === "{") {
|
143
143
|
const K = l + 1;
|
144
|
-
let
|
145
|
-
for (l++; l < c.length &&
|
146
|
-
c[l] === "{" ?
|
144
|
+
let F = 1;
|
145
|
+
for (l++; l < c.length && F > 0; )
|
146
|
+
c[l] === "{" ? F++ : c[l] === "}" && F--, l++;
|
147
147
|
const z = c.substring(g, l), E = c.substring(K, l - 1);
|
148
148
|
u.push({
|
149
149
|
type: v ? "keyframes" : "at-rule",
|
@@ -231,7 +231,7 @@ function $e(r) {
|
|
231
231
|
return P(r) ? r : JSON.stringify(r);
|
232
232
|
}
|
233
233
|
function je(r, e, t, s = !1) {
|
234
|
-
const n = r.CSSStyleSheet, i = s ? `data-v-${e}` : e, a = s ?
|
234
|
+
const n = r.CSSStyleSheet, i = s ? `data-v-${e}` : e, a = s ? lt(t, i) : t;
|
235
235
|
if (n.prototype.replaceSync) {
|
236
236
|
const o = new n();
|
237
237
|
o.id = e, o.replaceSync(a);
|
@@ -245,7 +245,7 @@ function je(r, e, t, s = !1) {
|
|
245
245
|
p ? p.innerHTML = a : (p = o.createElement("style"), p.id = e, p.innerHTML = a, o.head.appendChild(p));
|
246
246
|
}
|
247
247
|
}
|
248
|
-
async function
|
248
|
+
async function ut(r, e) {
|
249
249
|
const t = await window.fetch(e).then((s) => s.text()).catch(() => "");
|
250
250
|
t && je(window, r, t);
|
251
251
|
}
|
@@ -271,14 +271,14 @@ async function be(r, e, t = window) {
|
|
271
271
|
}
|
272
272
|
});
|
273
273
|
}
|
274
|
-
function
|
274
|
+
function pt(r) {
|
275
275
|
return U(r) || U(r?.install);
|
276
276
|
}
|
277
|
-
function
|
278
|
-
return
|
277
|
+
function ft(r) {
|
278
|
+
return rt.includes(r);
|
279
279
|
}
|
280
|
-
function
|
281
|
-
return
|
280
|
+
function dt(r) {
|
281
|
+
return st.includes(r);
|
282
282
|
}
|
283
283
|
function D(r = window) {
|
284
284
|
const e = window?.Mock;
|
@@ -287,7 +287,7 @@ function D(r = window) {
|
|
287
287
|
if (t && window)
|
288
288
|
return window.Mock = t, t;
|
289
289
|
}
|
290
|
-
function
|
290
|
+
function cs(r, e, t) {
|
291
291
|
Object.assign(e.meta, t.meta);
|
292
292
|
const s = r?._container;
|
293
293
|
t?.type === "page" && s.classList.add("is-page"), t?.pure && s.classList.add("is-pure");
|
@@ -323,13 +323,13 @@ function S(r) {
|
|
323
323
|
function H(r) {
|
324
324
|
return typeof r == "object" && r && r.type === "JSFunction";
|
325
325
|
}
|
326
|
-
function
|
326
|
+
function ht(r) {
|
327
327
|
return S(r) || H(r);
|
328
328
|
}
|
329
|
-
function
|
330
|
-
return
|
329
|
+
function ls(r) {
|
330
|
+
return ht(r) ? r.value : JSON.stringify(r);
|
331
331
|
}
|
332
|
-
const
|
332
|
+
const mt = {
|
333
333
|
session: !1,
|
334
334
|
authKey: "Authorization",
|
335
335
|
storageKey: "ACCESS_STORAGE",
|
@@ -349,7 +349,7 @@ class Re {
|
|
349
349
|
mode = w.Raw;
|
350
350
|
interceptResponse = !0;
|
351
351
|
constructor(e) {
|
352
|
-
this.options = Object.assign({},
|
352
|
+
this.options = Object.assign({}, mt, e), this.loadData();
|
353
353
|
}
|
354
354
|
enableIntercept() {
|
355
355
|
this.interceptResponse = !0;
|
@@ -496,10 +496,10 @@ class Re {
|
|
496
496
|
);
|
497
497
|
}
|
498
498
|
}
|
499
|
-
function
|
499
|
+
function gt() {
|
500
500
|
return _e(Pe, null);
|
501
501
|
}
|
502
|
-
function
|
502
|
+
function us(r = {}) {
|
503
503
|
const {
|
504
504
|
notify: e,
|
505
505
|
loading: t,
|
@@ -539,10 +539,10 @@ function cs(r = {}) {
|
|
539
539
|
access: i ? new Re({ alert: o, ...i }) : void 0
|
540
540
|
};
|
541
541
|
}
|
542
|
-
function
|
542
|
+
function ps(r = {}) {
|
543
543
|
return new Re(r);
|
544
544
|
}
|
545
|
-
function
|
545
|
+
function vt(r, e) {
|
546
546
|
const { jsonp: t, request: s } = e;
|
547
547
|
if (r.method === "jsonp")
|
548
548
|
return (n = {}) => t(r.url, {
|
@@ -558,10 +558,10 @@ function mt(r, e) {
|
|
558
558
|
headers: n
|
559
559
|
}
|
560
560
|
};
|
561
|
-
return (a, o) => (delete i.data, s.send(
|
561
|
+
return (a, o) => (delete i.data, s.send(Ke(i, o || {}, { data: a })));
|
562
562
|
}
|
563
563
|
}
|
564
|
-
function
|
564
|
+
function yt(r, e) {
|
565
565
|
const { metaQuery: t } = e;
|
566
566
|
if (!t) return;
|
567
567
|
const { code: s, queryCode: n } = r;
|
@@ -573,19 +573,19 @@ function gt(r, e) {
|
|
573
573
|
return t(s, n, i, a);
|
574
574
|
};
|
575
575
|
}
|
576
|
-
function
|
576
|
+
function _t(r = [], e = [], t) {
|
577
577
|
const s = {};
|
578
578
|
for (const n of r)
|
579
|
-
s[n.id] =
|
579
|
+
s[n.id] = vt(n, t);
|
580
580
|
for (const n of e)
|
581
|
-
s[n.id] =
|
581
|
+
s[n.id] = yt(n, t);
|
582
582
|
return s;
|
583
583
|
}
|
584
|
-
async function
|
584
|
+
async function wt(r = [], e = window) {
|
585
585
|
const t = D(e);
|
586
|
-
t && (Ce(e), r.forEach((s) =>
|
586
|
+
t && (Ce(e), r.forEach((s) => $t(t, s)));
|
587
587
|
}
|
588
|
-
function
|
588
|
+
function St(r, e = window) {
|
589
589
|
const t = H(r.mockTemplate) && r.mockTemplate.value ? ee(r.mockTemplate, {}, !0) : void 0, s = D(e);
|
590
590
|
return async (...n) => {
|
591
591
|
let i = {};
|
@@ -598,13 +598,13 @@ function _t(r, e = window) {
|
|
598
598
|
return s?.mock(i);
|
599
599
|
};
|
600
600
|
}
|
601
|
-
function
|
601
|
+
function $t(r, e) {
|
602
602
|
if (!e.mock) return;
|
603
603
|
const { url: t, mockTemplate: s } = e;
|
604
604
|
if (t && s) {
|
605
|
-
const n =
|
605
|
+
const n = ze(`${t}(.*)`), i = Ve(t, { decode: decodeURIComponent }), a = T(s, {}, !0);
|
606
606
|
r.mock(n, (o) => {
|
607
|
-
const p = C.parse(o.url) || {}, c = o.body instanceof FormData ?
|
607
|
+
const p = C.parse(o.url) || {}, c = o.body instanceof FormData ? We(o.body) : o.body, u = i(o.url)?.params;
|
608
608
|
return Object.assign(o, { data: c, params: p, query: u }), r.mock(a(o));
|
609
609
|
});
|
610
610
|
}
|
@@ -613,7 +613,7 @@ function Ce(r = window) {
|
|
613
613
|
const e = D(r);
|
614
614
|
e && (e._mocked = {});
|
615
615
|
}
|
616
|
-
class
|
616
|
+
class jt {
|
617
617
|
__id = null;
|
618
618
|
__mode;
|
619
619
|
__instance = null;
|
@@ -724,7 +724,7 @@ function te(r) {
|
|
724
724
|
$components: s,
|
725
725
|
$libs: n,
|
726
726
|
$apis: i
|
727
|
-
}, c = new
|
727
|
+
}, c = new jt({
|
728
728
|
mode: t,
|
729
729
|
dsl: o.value,
|
730
730
|
attrs: p
|
@@ -732,7 +732,7 @@ function te(r) {
|
|
732
732
|
name: o.value.name,
|
733
733
|
__scopeId: o.value.id ? `data-v-${o.value.id}` : void 0,
|
734
734
|
props: {
|
735
|
-
...
|
735
|
+
...bt(o.value.props ?? [], c)
|
736
736
|
},
|
737
737
|
setup(l) {
|
738
738
|
c.$props = l, c.props = l, o.value.id && je(
|
@@ -740,11 +740,11 @@ function te(r) {
|
|
740
740
|
o.value.id,
|
741
741
|
o.value.css || "",
|
742
742
|
!0
|
743
|
-
), c.state =
|
744
|
-
const h =
|
743
|
+
), c.state = Pt(e, o.value.state ?? {}, c);
|
744
|
+
const h = Rt(e, o.value.computed ?? {}, c), f = Ct(o.value.methods ?? {}, c), d = kt(e, o.value.inject, c);
|
745
745
|
for (const [g, $] of Object.entries(d || {}))
|
746
746
|
d[g] = e.inject(g, $);
|
747
|
-
const m =
|
747
|
+
const m = At(
|
748
748
|
o.value.dataSources || {},
|
749
749
|
c
|
750
750
|
), y = {
|
@@ -753,31 +753,31 @@ function te(r) {
|
|
753
753
|
...f,
|
754
754
|
...m
|
755
755
|
};
|
756
|
-
return c.setup(y, e),
|
756
|
+
return c.setup(y, e), Ft(e, o.value.watch ?? [], c), {
|
757
757
|
vtj: c
|
758
758
|
};
|
759
759
|
},
|
760
|
-
emits:
|
760
|
+
emits: Et(o.value.emits),
|
761
761
|
expose: ["vtj"],
|
762
762
|
render() {
|
763
763
|
if (!o.value.nodes) return null;
|
764
764
|
const l = o.value.nodes || [];
|
765
|
-
return l.length === 1 ?
|
766
|
-
(h) =>
|
765
|
+
return l.length === 1 ? A(l[0], c, e, a, l) : l.map(
|
766
|
+
(h) => A(h, c, e, a, l)
|
767
767
|
);
|
768
768
|
},
|
769
|
-
...
|
769
|
+
...It(o.value.lifeCycles ?? {}, c)
|
770
770
|
});
|
771
771
|
return {
|
772
772
|
renderer: e.markRaw(u),
|
773
773
|
context: c
|
774
774
|
};
|
775
775
|
}
|
776
|
-
function
|
776
|
+
function Et(r = []) {
|
777
777
|
return r.map((e) => P(e) ? e : e.name);
|
778
778
|
}
|
779
|
-
function
|
780
|
-
const t = (s) => s ? (Array.isArray(s) ? s : [s]).map((i) =>
|
779
|
+
function bt(r = [], e) {
|
780
|
+
const t = (s) => s ? (Array.isArray(s) ? s : [s]).map((i) => tt[i]) : void 0;
|
781
781
|
return r.map((s) => P(s) ? {
|
782
782
|
name: s
|
783
783
|
} : {
|
@@ -794,7 +794,7 @@ function jt(r = [], e) {
|
|
794
794
|
{}
|
795
795
|
);
|
796
796
|
}
|
797
|
-
function
|
797
|
+
function Pt(r, e, t) {
|
798
798
|
return r.reactive(
|
799
799
|
Object.keys(e || {}).reduce(
|
800
800
|
(s, n) => {
|
@@ -805,19 +805,19 @@ function Et(r, e, t) {
|
|
805
805
|
)
|
806
806
|
);
|
807
807
|
}
|
808
|
-
function
|
808
|
+
function Rt(r, e, t) {
|
809
809
|
return Object.entries(e ?? {}).reduce(
|
810
810
|
(s, [n, i]) => (s[n] = r.computed(t.__parseFunction(i)), s),
|
811
811
|
{}
|
812
812
|
);
|
813
813
|
}
|
814
|
-
function
|
814
|
+
function Ct(r, e) {
|
815
815
|
return Object.entries(r ?? {}).reduce(
|
816
816
|
(t, [s, n]) => (t[s] = e.__parseFunction(n), t),
|
817
817
|
{}
|
818
818
|
);
|
819
819
|
}
|
820
|
-
function
|
820
|
+
function kt(r, e = [], t) {
|
821
821
|
return e.reduce(
|
822
822
|
(s, n) => {
|
823
823
|
const { name: i, from: a } = n || {};
|
@@ -828,12 +828,12 @@ function Rt(r, e = [], t) {
|
|
828
828
|
{}
|
829
829
|
);
|
830
830
|
}
|
831
|
-
function
|
831
|
+
function At(r, e) {
|
832
832
|
return Object.keys(r).reduce(
|
833
833
|
(t, s) => {
|
834
834
|
const n = r[s];
|
835
835
|
if (n.type === "mock")
|
836
|
-
t[s] =
|
836
|
+
t[s] = St(n);
|
837
837
|
else if (n.ref) {
|
838
838
|
const i = e.$apis[n.ref], a = H(n.transform) ? n.transform.value ? e.__parseFunction(n.transform) : void 0 : n.transform;
|
839
839
|
t[s] = async (...o) => {
|
@@ -846,7 +846,7 @@ function Ct(r, e) {
|
|
846
846
|
{}
|
847
847
|
);
|
848
848
|
}
|
849
|
-
function
|
849
|
+
function Ft(r, e = [], t) {
|
850
850
|
e.forEach((s) => {
|
851
851
|
r.watch(
|
852
852
|
t.__parseExpression(s.source),
|
@@ -858,7 +858,7 @@ function kt(r, e = [], t) {
|
|
858
858
|
);
|
859
859
|
});
|
860
860
|
}
|
861
|
-
function
|
861
|
+
function It(r, e) {
|
862
862
|
return Object.entries(r ?? {}).reduce(
|
863
863
|
(t, [s, n]) => {
|
864
864
|
const i = e.__parseFunction(n);
|
@@ -869,9 +869,10 @@ function Ft(r, e) {
|
|
869
869
|
{}
|
870
870
|
);
|
871
871
|
}
|
872
|
-
|
873
|
-
|
874
|
-
|
872
|
+
const ke = new Ge();
|
873
|
+
let Q = [], R = {};
|
874
|
+
const Mt = (r) => r;
|
875
|
+
async function Ae(r, e = window) {
|
875
876
|
const { urls: t = [], library: s } = r, n = t.filter((o) => J(o));
|
876
877
|
if (n.length === 0 || !s) return null;
|
877
878
|
const i = t.filter((o) => q(o));
|
@@ -881,13 +882,16 @@ async function ke(r, e = window) {
|
|
881
882
|
}
|
882
883
|
function se(r) {
|
883
884
|
const { getDsl: e, getDslByUrl: t, options: s } = r;
|
884
|
-
return s.window && (
|
885
|
+
return s.window && (Q.forEach((n) => {
|
885
886
|
delete s.window[n];
|
886
|
-
}),
|
887
|
+
}), Q = []), (n, i, a = L) => {
|
887
888
|
if (!i || typeof i == "string") return n;
|
888
889
|
if (i.type === "Schema" && i.id)
|
889
890
|
return a.defineAsyncComponent(async () => {
|
890
|
-
const o = R[i.id] || await
|
891
|
+
const o = R[i.id] || await ke.add(
|
892
|
+
i.id,
|
893
|
+
() => e(i.id)
|
894
|
+
);
|
891
895
|
return o && (o.name = n, R[i.id] = o), o ? te({
|
892
896
|
...s,
|
893
897
|
Vue: a,
|
@@ -909,9 +913,9 @@ function se(r) {
|
|
909
913
|
});
|
910
914
|
if (i.type === "Plugin") {
|
911
915
|
let o = i.library ? R[i.library] : null;
|
912
|
-
return o || (i.library &&
|
916
|
+
return o || (i.library && Q.push(i.library), o = R[i.library || Symbol()] = a.defineAsyncComponent(
|
913
917
|
async () => {
|
914
|
-
const p = await
|
918
|
+
const p = await Ae(i, s.window);
|
915
919
|
return p || (console.warn("getPlugin result is null", i), null);
|
916
920
|
}
|
917
921
|
), o);
|
@@ -919,50 +923,50 @@ function se(r) {
|
|
919
923
|
return n;
|
920
924
|
};
|
921
925
|
}
|
922
|
-
function
|
923
|
-
R = {};
|
926
|
+
function fs() {
|
927
|
+
R = {}, ke.clearAllCache();
|
924
928
|
}
|
925
|
-
function
|
929
|
+
function A(r, e, t = L, s = Mt, n = [], i = !1) {
|
926
930
|
if (!r || !r.name || r.invisible) return null;
|
927
931
|
const a = t.getCurrentInstance()?.appContext, { id: o = null, directives: p = [] } = r, { vIf: c, vElseIf: u, vElse: l, vFor: h, vShow: f, vModels: d, vBind: m, vHtml: y, others: g } = Fe(p);
|
928
932
|
if (!i && (u || l))
|
929
933
|
return null;
|
930
|
-
if (c && !
|
931
|
-
return
|
934
|
+
if (c && !Tt(c, e))
|
935
|
+
return Nt(r, e, t, s, n);
|
932
936
|
const $ = (v, K = 0) => {
|
933
|
-
const
|
937
|
+
const F = v.$components, z = (() => {
|
934
938
|
if (r.name === "component")
|
935
|
-
return
|
939
|
+
return Ht(v, r.props?.is);
|
936
940
|
if (r.name === "slot") return r.name;
|
937
941
|
const j = s(r.name, r.from, t);
|
938
|
-
return P(j) ?
|
939
|
-
})(), E =
|
942
|
+
return P(j) ? ft(j) || dt(j) ? j : F[j] ?? a?.app?.component(j) ?? j : j;
|
943
|
+
})(), E = Ot(o, r.props ?? {}, v), xe = xt(t, r.events ?? {}, v);
|
940
944
|
if (r.name === "slot")
|
941
|
-
return
|
945
|
+
return Bt(t, r, E, v, s);
|
942
946
|
m && Object.assign(E, v.__parseExpression(m.value)), f && (E.style = Object.assign(
|
943
947
|
E.style ?? {},
|
944
|
-
|
945
|
-
)), y && Object.assign(E,
|
946
|
-
Object.assign(E,
|
948
|
+
Lt(f, v)
|
949
|
+
)), y && Object.assign(E, qt(y, v)), d.forEach((j) => {
|
950
|
+
Object.assign(E, Jt(t, j, v));
|
947
951
|
});
|
948
|
-
const
|
952
|
+
const Ne = Kt(
|
949
953
|
t,
|
950
954
|
r.children ?? [],
|
951
955
|
v,
|
952
956
|
s,
|
953
957
|
r
|
954
|
-
), ae = v?.__id ? `data-v-${v.__id}` : void 0,
|
958
|
+
), ae = v?.__id ? `data-v-${v.__id}` : void 0, Be = ae ? { [ae]: "" } : {};
|
955
959
|
let V = t.createVNode(
|
956
960
|
z,
|
957
|
-
{ key: `${o}_${K}`, ...
|
958
|
-
|
961
|
+
{ key: `${o}_${K}`, ...Be, ...E, ...xe },
|
962
|
+
Ne
|
959
963
|
);
|
960
|
-
const ce = a ?
|
964
|
+
const ce = a ? Dt(a, g, v) : [];
|
961
965
|
return ce.length && (V = t.withDirectives(V, ce)), V;
|
962
966
|
};
|
963
|
-
return h ?
|
967
|
+
return h ? Wt(h, $, e) : $(e);
|
964
968
|
}
|
965
|
-
function
|
969
|
+
function Dt(r, e, t) {
|
966
970
|
const s = r.app;
|
967
971
|
return e.map((n) => {
|
968
972
|
const i = typeof n.name == "string" ? s.directive(n.name) : t.__parseExpression(n.name);
|
@@ -977,7 +981,7 @@ function Fe(r = []) {
|
|
977
981
|
), s = r.find((u) => b(u.name) === "vElse"), n = r.find((u) => b(u.name) === "vFor"), i = r.find((u) => b(u.name) === "vShow"), a = r.find((u) => b(u.name) === "vBind"), o = r.find((u) => b(u.name) === "vHtml"), p = r.filter(
|
978
982
|
(u) => b(u.name) === "vModel"
|
979
983
|
), c = r.filter(
|
980
|
-
(u) => !
|
984
|
+
(u) => !et.includes(b(u.name))
|
981
985
|
);
|
982
986
|
return {
|
983
987
|
vIf: e,
|
@@ -991,13 +995,13 @@ function Fe(r = []) {
|
|
991
995
|
vHtml: o
|
992
996
|
};
|
993
997
|
}
|
994
|
-
function
|
998
|
+
function Tt(r, e) {
|
995
999
|
return !!e.__parseExpression(r.value);
|
996
1000
|
}
|
997
|
-
function
|
1001
|
+
function Ht(r, e) {
|
998
1002
|
return e ? S(e) ? r.__parseExpression(e) : e : "div";
|
999
1003
|
}
|
1000
|
-
function
|
1004
|
+
function Ot(r, e, t) {
|
1001
1005
|
const s = re(e, t);
|
1002
1006
|
return s.ref = t.__ref(r, s.ref), s;
|
1003
1007
|
}
|
@@ -1010,7 +1014,7 @@ function re(r, e) {
|
|
1010
1014
|
{}
|
1011
1015
|
) : r;
|
1012
1016
|
}
|
1013
|
-
function
|
1017
|
+
function xt(r, e, t) {
|
1014
1018
|
const s = ["passive", "capture", "once"], n = {
|
1015
1019
|
capture: "Capture",
|
1016
1020
|
once: "Once",
|
@@ -1018,62 +1022,62 @@ function Ht(r, e, t) {
|
|
1018
1022
|
};
|
1019
1023
|
return Object.keys(e || {}).reduce(
|
1020
1024
|
(i, a) => {
|
1021
|
-
const o = e[a], p =
|
1025
|
+
const o = e[a], p = Ie(o.modifiers), c = p.find((h) => s.includes(h)), u = "on" + Qe(a) + (c && n[c] || ""), l = t.__parseFunction(o.handler);
|
1022
1026
|
return l && (i[u] = r.withModifiers(l, p)), i;
|
1023
1027
|
},
|
1024
1028
|
{}
|
1025
1029
|
);
|
1026
1030
|
}
|
1027
|
-
function
|
1031
|
+
function Nt(r, e, t, s, n = []) {
|
1028
1032
|
let i = n.findIndex((a) => a.id === r.id);
|
1029
1033
|
for (let a = ++i; a < n.length; a++) {
|
1030
1034
|
const { directives: o = [] } = n[a], { vElseIf: p, vElse: c } = Fe(o);
|
1031
1035
|
if (p) {
|
1032
1036
|
if (e.__parseExpression(p.value))
|
1033
|
-
return
|
1037
|
+
return A(n[a], e, t, s, n, !0);
|
1034
1038
|
continue;
|
1035
1039
|
}
|
1036
1040
|
if (c)
|
1037
|
-
return
|
1041
|
+
return A(n[a], e, t, s, n, !0);
|
1038
1042
|
}
|
1039
1043
|
return null;
|
1040
1044
|
}
|
1041
|
-
function
|
1045
|
+
function Ie(r = {}, e = !1) {
|
1042
1046
|
const t = Object.keys(r);
|
1043
1047
|
return e ? t.map((s) => "." + s) : t;
|
1044
1048
|
}
|
1045
|
-
function
|
1046
|
-
const { children: i } = e, a =
|
1049
|
+
function Bt(r, e, t, s, n) {
|
1050
|
+
const { children: i } = e, a = Ut(e, s), o = s.$slots?.[a.name];
|
1047
1051
|
return o ? o(t) : i ? P(i) ? r.createTextVNode(i) : S(i) ? r.createTextVNode(
|
1048
1052
|
$e(s.__parseExpression(i))
|
1049
1053
|
) : Array.isArray(i) ? i.map(
|
1050
|
-
(p) =>
|
1054
|
+
(p) => A(p, s, r, n, i)
|
1051
1055
|
) : null : null;
|
1052
1056
|
}
|
1053
|
-
function
|
1057
|
+
function Ut(r, e) {
|
1054
1058
|
const { props: t } = r, s = t?.name || "default";
|
1055
1059
|
return {
|
1056
1060
|
name: S(s) ? e.__parseExpression(s) : s,
|
1057
1061
|
params: []
|
1058
1062
|
};
|
1059
1063
|
}
|
1060
|
-
function
|
1064
|
+
function Lt(r, e) {
|
1061
1065
|
return e.__parseExpression(r.value) ? {} : {
|
1062
1066
|
display: "none"
|
1063
1067
|
};
|
1064
1068
|
}
|
1065
|
-
function
|
1069
|
+
function qt(r, e) {
|
1066
1070
|
return {
|
1067
1071
|
innerHTML: e.__parseExpression(r.value) || ""
|
1068
1072
|
};
|
1069
1073
|
}
|
1070
|
-
function
|
1074
|
+
function Jt(r, e, t) {
|
1071
1075
|
const s = {
|
1072
1076
|
type: "JSFunction",
|
1073
1077
|
value: e.value?.value ? `(v) => {
|
1074
1078
|
${e.value.value} = v;
|
1075
1079
|
}` : "(v) => {}"
|
1076
|
-
}, n = t.__parseFunction(s), i =
|
1080
|
+
}, n = t.__parseFunction(s), i = Ie(
|
1077
1081
|
S(e.modifiers) ? t.__parseExpression(e.modifiers) : e.modifiers
|
1078
1082
|
), a = S(e.arg) ? t.__parseExpression(e.arg) : e.arg || "modelValue";
|
1079
1083
|
return {
|
@@ -1081,7 +1085,7 @@ function Lt(r, e, t) {
|
|
1081
1085
|
[`onUpdate:${a}`]: i.length && n ? r.withModifiers(n, i) : n
|
1082
1086
|
};
|
1083
1087
|
}
|
1084
|
-
function
|
1088
|
+
function Kt(r, e, t, s, n) {
|
1085
1089
|
if (!e) return null;
|
1086
1090
|
if (P(e))
|
1087
1091
|
return { default: () => e };
|
@@ -1090,22 +1094,22 @@ function qt(r, e, t, s, n) {
|
|
1090
1094
|
default: () => $e(t.__parseExpression(e))
|
1091
1095
|
};
|
1092
1096
|
if (Array.isArray(e) && e.length > 0) {
|
1093
|
-
const i =
|
1097
|
+
const i = zt(e), a = (o) => !o || !n ? {} : n?.id && Object.keys(o).length ? {
|
1094
1098
|
[`scope_${n.id}`]: o
|
1095
1099
|
} : {};
|
1096
1100
|
return Object.entries(i).reduce((o, [p, { nodes: c, params: u }]) => (o[p] = (l) => {
|
1097
|
-
const h = u.length ?
|
1101
|
+
const h = u.length ? Ye(l ?? {}, u) : a(l);
|
1098
1102
|
return c.map(
|
1099
|
-
(f) =>
|
1103
|
+
(f) => A(f, t.__clone(h), r, s, c)
|
1100
1104
|
);
|
1101
1105
|
}, o), {});
|
1102
1106
|
}
|
1103
1107
|
return null;
|
1104
1108
|
}
|
1105
|
-
function
|
1109
|
+
function zt(r) {
|
1106
1110
|
const e = {};
|
1107
1111
|
for (const t of r) {
|
1108
|
-
const s =
|
1112
|
+
const s = Vt(t.slot), n = s.name;
|
1109
1113
|
e[n] ? (e[n].nodes.push(t), e[n].params = e[n].params.concat(s.params)) : e[n] = {
|
1110
1114
|
nodes: [t],
|
1111
1115
|
params: s.params
|
@@ -1113,10 +1117,10 @@ function Jt(r) {
|
|
1113
1117
|
}
|
1114
1118
|
return e;
|
1115
1119
|
}
|
1116
|
-
function
|
1120
|
+
function Vt(r = "default") {
|
1117
1121
|
return P(r) ? { name: r, params: [] } : { params: [], ...r };
|
1118
1122
|
}
|
1119
|
-
function
|
1123
|
+
function Wt(r, e, t) {
|
1120
1124
|
const { value: s, iterator: n } = r, { item: i = "item", index: a = "index" } = n || {};
|
1121
1125
|
let o = t.__parseExpression(s) || [];
|
1122
1126
|
return Number.isInteger(o) && (o = new Array(o).fill(!0).map((p, c) => c + 1)), Array.isArray(o) ? o.map((p, c) => e(t.__clone({ [i]: p, [a]: c }), c)) : (console.warn("[vForRender]:", `${s?.value} is not a Arrary`), []);
|
@@ -1124,7 +1128,7 @@ function zt(r, e, t) {
|
|
1124
1128
|
const me = we({
|
1125
1129
|
name: "VtjPageContainer",
|
1126
1130
|
async setup() {
|
1127
|
-
const r =
|
1131
|
+
const r = De(), e = Se(), t = e.params.id, s = t ? r.getPage(t) : r.getHomepage(), n = s ? await r.getRenderComponent(s.id) : null, i = Z(Symbol());
|
1128
1132
|
if (s) {
|
1129
1133
|
Object.assign(e.meta, s.meta || {}, { cache: s.cache });
|
1130
1134
|
const { useTitle: a } = r?.adapter;
|
@@ -1147,14 +1151,14 @@ const me = we({
|
|
1147
1151
|
activated() {
|
1148
1152
|
this.meta.cache === !1 && (this.sid = Symbol());
|
1149
1153
|
}
|
1150
|
-
}),
|
1154
|
+
}), Gt = we({
|
1151
1155
|
name: "VtjStartupContainer",
|
1152
1156
|
render() {
|
1153
1157
|
return X("div", "page not found!");
|
1154
1158
|
}
|
1155
|
-
}),
|
1156
|
-
var
|
1157
|
-
class
|
1159
|
+
}), Me = Symbol("Provider");
|
1160
|
+
var Qt = /* @__PURE__ */ ((r) => (r.Production = "production", r.Development = "development", r))(Qt || {});
|
1161
|
+
class Yt extends Ue {
|
1158
1162
|
// DSL缓存
|
1159
1163
|
/**
|
1160
1164
|
* 创建Provider实例
|
@@ -1186,7 +1190,7 @@ class Gt extends Be {
|
|
1186
1190
|
// 全局变量
|
1187
1191
|
modules = {};
|
1188
1192
|
// 异步模块加载器
|
1189
|
-
adapter = { request:
|
1193
|
+
adapter = { request: Y, jsonp: ye };
|
1190
1194
|
// 适配器接口
|
1191
1195
|
apis = {};
|
1192
1196
|
// API集合
|
@@ -1235,7 +1239,7 @@ class Gt extends Be {
|
|
1235
1239
|
if (this.project = t ? await t() : await this.service.init(e), !this.project)
|
1236
1240
|
throw new Error("project is null");
|
1237
1241
|
const { apis: s = [], meta: n = [] } = this.project, i = window;
|
1238
|
-
i && (i.CKEDITOR_VERSION = void 0), this.mode === w.Raw ? await this.loadDependencies(i) : await this.loadAssets(i), this.initMock(i), this.apis =
|
1242
|
+
i && (i.CKEDITOR_VERSION = void 0), this.mode === w.Raw ? await this.loadDependencies(i) : await this.loadAssets(i), this.initMock(i), this.apis = _t(s, n, this.adapter), Ce(i), wt(s, i), e.platform !== "uniapp" && this.initRouter(), this.triggerReady();
|
1239
1243
|
}
|
1240
1244
|
initMock(e) {
|
1241
1245
|
const t = D(e);
|
@@ -1255,7 +1259,7 @@ class Gt extends Be {
|
|
1255
1259
|
materials: u,
|
1256
1260
|
materialExports: l,
|
1257
1261
|
materialMapLibrary: h
|
1258
|
-
} =
|
1262
|
+
} = ot(
|
1259
1263
|
t,
|
1260
1264
|
a,
|
1261
1265
|
o === "development"
|
@@ -1270,7 +1274,7 @@ class Gt extends Be {
|
|
1270
1274
|
else {
|
1271
1275
|
const y = c[f] || [];
|
1272
1276
|
for (const g of y)
|
1273
|
-
q(g) && await
|
1277
|
+
q(g) && await ut(f, C.append(g, { v: I })), J(g) && await fe(C.append(g, { v: I }));
|
1274
1278
|
n[f] = e[f];
|
1275
1279
|
}
|
1276
1280
|
}
|
@@ -1279,7 +1283,7 @@ class Gt extends Be {
|
|
1279
1283
|
await fe(C.append(d, { v: I }));
|
1280
1284
|
const f = this.materials || {};
|
1281
1285
|
for (const d of l) {
|
1282
|
-
const m = e[h[d]], y =
|
1286
|
+
const m = e[h[d]], y = Le[d];
|
1283
1287
|
if (y)
|
1284
1288
|
m && y.forEach((g) => {
|
1285
1289
|
i[g] = m[g];
|
@@ -1287,7 +1291,7 @@ class Gt extends Be {
|
|
1287
1291
|
else {
|
1288
1292
|
const g = f[d] ? (await f[d]()).default : e[d];
|
1289
1293
|
g && m && (g.components || []).forEach(($) => {
|
1290
|
-
i[$.name] =
|
1294
|
+
i[$.name] = at($, m);
|
1291
1295
|
});
|
1292
1296
|
}
|
1293
1297
|
}
|
@@ -1307,7 +1311,7 @@ class Gt extends Be {
|
|
1307
1311
|
}, l = {
|
1308
1312
|
path: c,
|
1309
1313
|
name: N,
|
1310
|
-
component: t?.homepage ? me : n.startupComponent ||
|
1314
|
+
component: t?.homepage ? me : n.startupComponent || Gt,
|
1311
1315
|
meta: p
|
1312
1316
|
};
|
1313
1317
|
e.hasRoute(M) && e.removeRoute(M), e.hasRoute(N) && e.removeRoute(N), a ? (e.addRoute(a, u), e.addRoute(a, l)) : (e.addRoute(u), e.addRoute(l));
|
@@ -1325,8 +1329,8 @@ class Gt extends Be {
|
|
1325
1329
|
install(e) {
|
1326
1330
|
const t = e.config.globalProperties.installed || {};
|
1327
1331
|
for (const [s, n] of Object.entries(this.library))
|
1328
|
-
!t[s] &&
|
1329
|
-
this.options.install && e.use(this.options.install), this.adapter.access && e.use(this.adapter.access), e.provide(
|
1332
|
+
!t[s] && pt(n) && (e.use(n), t[s] = !0);
|
1333
|
+
this.options.install && e.use(this.options.install), this.adapter.access && e.use(this.adapter.access), e.provide(Me, this), e.config.globalProperties.$provider = this, e.config.globalProperties.installed = t, this.mode === w.Design && (e.config.errorHandler = (s, n, i) => {
|
1330
1334
|
const a = n?.$options.name, o = typeof s == "string" ? s : s?.message || s?.msg || "未知错误", p = `[ ${a} ] ${o} ${i}`;
|
1331
1335
|
console.error(
|
1332
1336
|
"[VTJ Error]:",
|
@@ -1449,18 +1453,18 @@ class Gt extends Be {
|
|
1449
1453
|
* @returns Vue异步组件
|
1450
1454
|
*/
|
1451
1455
|
definePluginComponent(e) {
|
1452
|
-
return de(async () => await
|
1456
|
+
return de(async () => await Ae(e, window));
|
1453
1457
|
}
|
1454
1458
|
}
|
1455
|
-
function
|
1456
|
-
const e = new
|
1459
|
+
function ds(r) {
|
1460
|
+
const e = new Yt(r);
|
1457
1461
|
return {
|
1458
1462
|
provider: e,
|
1459
1463
|
onReady: (s) => e.ready(s)
|
1460
1464
|
};
|
1461
1465
|
}
|
1462
|
-
function
|
1463
|
-
const e = _e(
|
1466
|
+
function De(r = {}) {
|
1467
|
+
const e = _e(Me, null);
|
1464
1468
|
if (!e)
|
1465
1469
|
throw new Error("Can not find provider");
|
1466
1470
|
if (e.nodeEnv === "development") {
|
@@ -1476,21 +1480,21 @@ function Me(r = {}) {
|
|
1476
1480
|
}
|
1477
1481
|
return e;
|
1478
1482
|
}
|
1479
|
-
async function
|
1480
|
-
const { name: t, urls: s = [] } = r || {}, n = s.map((o) => e + o), { css: i, js: a } =
|
1483
|
+
async function hs(r, e = "") {
|
1484
|
+
const { name: t, urls: s = [] } = r || {}, n = s.map((o) => e + o), { css: i, js: a } = ct(n);
|
1481
1485
|
if (i.length && Ee(i), a.length)
|
1482
1486
|
return await be(a, t).catch(
|
1483
1487
|
() => {
|
1484
1488
|
}
|
1485
1489
|
);
|
1486
1490
|
}
|
1487
|
-
const
|
1491
|
+
const Te = {
|
1488
1492
|
type: "json",
|
1489
1493
|
validSuccess: !0,
|
1490
1494
|
originResponse: !1,
|
1491
1495
|
failMessage: !0,
|
1492
1496
|
validate: (r) => r.data?.code === 0
|
1493
|
-
},
|
1497
|
+
}, Xt = (r, e = "/__vtj__/api/:type.json") => (t, s, n) => r.send({
|
1494
1498
|
url: e,
|
1495
1499
|
method: "post",
|
1496
1500
|
params: { type: t },
|
@@ -1499,8 +1503,8 @@ const De = {
|
|
1499
1503
|
type: t,
|
1500
1504
|
data: s
|
1501
1505
|
},
|
1502
|
-
settings:
|
1503
|
-
}),
|
1506
|
+
settings: Te
|
1507
|
+
}), Zt = (r, e = "/__vtj__/api/uploader.json") => async (t, s) => await r.send({
|
1504
1508
|
url: e,
|
1505
1509
|
method: "post",
|
1506
1510
|
data: {
|
@@ -1508,11 +1512,11 @@ const De = {
|
|
1508
1512
|
projectId: s
|
1509
1513
|
},
|
1510
1514
|
settings: {
|
1511
|
-
...
|
1515
|
+
...Te,
|
1512
1516
|
type: "data"
|
1513
1517
|
}
|
1514
1518
|
}).then((n) => n && n[0] ? n[0] : null).catch(() => null);
|
1515
|
-
function
|
1519
|
+
function ms(r) {
|
1516
1520
|
return ve({
|
1517
1521
|
settings: {
|
1518
1522
|
type: "json",
|
@@ -1527,8 +1531,8 @@ function ds(r) {
|
|
1527
1531
|
});
|
1528
1532
|
}
|
1529
1533
|
class oe {
|
1530
|
-
constructor(e =
|
1531
|
-
this.req = e, this.api =
|
1534
|
+
constructor(e = Y) {
|
1535
|
+
this.req = e, this.api = Xt(e), this.uploader = Zt(e);
|
1532
1536
|
}
|
1533
1537
|
api;
|
1534
1538
|
pluginCaches = {};
|
@@ -1612,10 +1616,10 @@ class oe {
|
|
1612
1616
|
return await this.api("clearStaticFiles", e).catch(() => "");
|
1613
1617
|
}
|
1614
1618
|
async getPluginMaterial(e) {
|
1615
|
-
const { urls: t = [] } = e, s = t.filter((i) =>
|
1619
|
+
const { urls: t = [] } = e, s = t.filter((i) => nt(i))[0];
|
1616
1620
|
if (!s) return null;
|
1617
1621
|
const n = this.pluginCaches[s];
|
1618
|
-
return n || (this.pluginCaches[s] =
|
1622
|
+
return n || (this.pluginCaches[s] = Y.send({
|
1619
1623
|
url: s,
|
1620
1624
|
method: "get",
|
1621
1625
|
settings: {
|
@@ -1628,12 +1632,12 @@ class oe {
|
|
1628
1632
|
return console.log("BaseService.genSource", e), "";
|
1629
1633
|
}
|
1630
1634
|
}
|
1631
|
-
const _ = new
|
1635
|
+
const _ = new Xe({
|
1632
1636
|
type: "local",
|
1633
1637
|
expired: 0,
|
1634
1638
|
prefix: "__VTJ_"
|
1635
1639
|
});
|
1636
|
-
class
|
1640
|
+
class gs extends oe {
|
1637
1641
|
init(e) {
|
1638
1642
|
const t = new B(e), s = _.get(`project_${t.id}`), n = Object.assign(t.toDsl(), s || {});
|
1639
1643
|
return _.save(`project_${t.id}`, n), Promise.resolve(n);
|
@@ -1683,7 +1687,7 @@ class hs extends oe {
|
|
1683
1687
|
}), Promise.resolve(!0);
|
1684
1688
|
}
|
1685
1689
|
}
|
1686
|
-
class
|
1690
|
+
class es extends oe {
|
1687
1691
|
projects = {};
|
1688
1692
|
materials = {};
|
1689
1693
|
files = {};
|
@@ -1741,10 +1745,10 @@ class Xt extends oe {
|
|
1741
1745
|
}
|
1742
1746
|
}
|
1743
1747
|
let x = null;
|
1744
|
-
function
|
1745
|
-
return x || (x = new
|
1748
|
+
function vs() {
|
1749
|
+
return x || (x = new es(), x);
|
1746
1750
|
}
|
1747
|
-
class
|
1751
|
+
class ys extends oe {
|
1748
1752
|
getFileCaches = {};
|
1749
1753
|
async getExtension() {
|
1750
1754
|
return await this.api("getExtension", {}).catch(() => {
|
@@ -1801,7 +1805,7 @@ class gs extends oe {
|
|
1801
1805
|
);
|
1802
1806
|
}
|
1803
1807
|
}
|
1804
|
-
function
|
1808
|
+
function He(r, e, t = []) {
|
1805
1809
|
return t.map((s) => {
|
1806
1810
|
const { id: n, title: i, icon: a, children: o, hidden: p } = s;
|
1807
1811
|
return {
|
@@ -1810,28 +1814,28 @@ function Te(r, e, t = []) {
|
|
1810
1814
|
icon: a,
|
1811
1815
|
hidden: p,
|
1812
1816
|
url: `${r}/${e}/${n}`,
|
1813
|
-
children: o && o.length ?
|
1817
|
+
children: o && o.length ? He(r, e, o) : void 0
|
1814
1818
|
};
|
1815
1819
|
});
|
1816
1820
|
}
|
1817
|
-
function
|
1821
|
+
function Oe(r, e) {
|
1818
1822
|
if (!e) return r;
|
1819
1823
|
let t = [];
|
1820
1824
|
for (const s of r)
|
1821
1825
|
if (s.children && s.children.length) {
|
1822
|
-
const n =
|
1826
|
+
const n = Oe(s.children, e);
|
1823
1827
|
n.length && (s.children = n, t.push(s));
|
1824
1828
|
} else
|
1825
1829
|
e.can(s.id.toString()) && t.push(s);
|
1826
1830
|
return t;
|
1827
1831
|
}
|
1828
|
-
function
|
1832
|
+
function _s(r) {
|
1829
1833
|
const {
|
1830
1834
|
menuPathPrefix: e = "",
|
1831
1835
|
pageRouteName: t = "page",
|
1832
1836
|
disableMenusFilter: s = !1
|
1833
|
-
} = r || {}, n =
|
1834
|
-
|
1837
|
+
} = r || {}, n = De(), i = Se(), a = gt(), o = Z(!1), p = Z(!1), c = n.project;
|
1838
|
+
Ze(() => {
|
1835
1839
|
const { name: h, params: f, meta: d } = i;
|
1836
1840
|
if (h === M) {
|
1837
1841
|
const m = n.getPage(f.id);
|
@@ -1842,7 +1846,7 @@ function vs(r) {
|
|
1842
1846
|
} else
|
1843
1847
|
o.value = !d.mask, p.value = !!d.pure;
|
1844
1848
|
});
|
1845
|
-
const u =
|
1849
|
+
const u = He(
|
1846
1850
|
e,
|
1847
1851
|
t,
|
1848
1852
|
c?.pages
|
@@ -1852,80 +1856,80 @@ function vs(r) {
|
|
1852
1856
|
logo: l?.logo,
|
1853
1857
|
themeSwitchable: l?.themeSwitchable,
|
1854
1858
|
title: l?.title || c?.description || c?.name || "VTJ App",
|
1855
|
-
menus: s ? u :
|
1859
|
+
menus: s ? u : Oe(u, a),
|
1856
1860
|
pure: p
|
1857
1861
|
};
|
1858
1862
|
}
|
1859
1863
|
export {
|
1860
1864
|
Pe as ACCESS_KEY,
|
1861
1865
|
Re as Access,
|
1862
|
-
|
1863
|
-
|
1866
|
+
rt as BUILD_IN_TAGS,
|
1867
|
+
et as BUILT_IN_DIRECTIVES,
|
1864
1868
|
oe as BaseService,
|
1865
1869
|
he as CONTEXT_HOST,
|
1866
|
-
|
1870
|
+
jt as Context,
|
1867
1871
|
w as ContextMode,
|
1868
|
-
|
1872
|
+
tt as DATA_TYPES,
|
1869
1873
|
N as HOMEPAGE_ROUTE_NAME,
|
1870
|
-
|
1871
|
-
|
1872
|
-
|
1873
|
-
|
1874
|
-
|
1875
|
-
|
1874
|
+
st as HTML_TAGS,
|
1875
|
+
ls as JSCodeToString,
|
1876
|
+
is as LIFE_CYCLES_LIST,
|
1877
|
+
ys as LocalService,
|
1878
|
+
es as MemoryService,
|
1879
|
+
Qt as NodeEnv,
|
1876
1880
|
M as PAGE_ROUTE_NAME,
|
1877
|
-
|
1878
|
-
|
1881
|
+
Yt as Provider,
|
1882
|
+
gs as StorageService,
|
1879
1883
|
I as VTJ_RENDERER_VERSION,
|
1880
1884
|
je as adoptedStyleSheets,
|
1881
|
-
|
1882
|
-
|
1883
|
-
|
1884
|
-
|
1885
|
-
|
1886
|
-
|
1887
|
-
|
1885
|
+
fs as clearLoaderCache,
|
1886
|
+
lt as compileScopedCSS,
|
1887
|
+
ps as createAccess,
|
1888
|
+
us as createAdapter,
|
1889
|
+
os as createAssetScripts,
|
1890
|
+
as as createAssetsCss,
|
1891
|
+
At as createDataSources,
|
1888
1892
|
se as createLoader,
|
1889
|
-
|
1890
|
-
|
1891
|
-
|
1892
|
-
|
1893
|
+
vs as createMemoryService,
|
1894
|
+
yt as createMetaApi,
|
1895
|
+
St as createMock,
|
1896
|
+
ds as createProvider,
|
1893
1897
|
te as createRenderer,
|
1894
|
-
|
1895
|
-
|
1896
|
-
|
1897
|
-
|
1898
|
+
vt as createSchemaApi,
|
1899
|
+
_t as createSchemaApis,
|
1900
|
+
ms as createServiceRequest,
|
1901
|
+
Mt as defaultLoader,
|
1898
1902
|
O as fillBasePath,
|
1899
1903
|
D as getMock,
|
1900
|
-
|
1901
|
-
|
1902
|
-
|
1903
|
-
|
1904
|
+
Ie as getModifiers,
|
1905
|
+
Ae as getPlugin,
|
1906
|
+
at as getRawComponent,
|
1907
|
+
ft as isBuiltInTag,
|
1904
1908
|
q as isCSSUrl,
|
1905
|
-
|
1909
|
+
ht as isJSCode,
|
1906
1910
|
S as isJSExpression,
|
1907
1911
|
H as isJSFunction,
|
1908
|
-
|
1912
|
+
nt as isJSON,
|
1909
1913
|
J as isJSUrl,
|
1910
|
-
|
1911
|
-
|
1912
|
-
|
1914
|
+
dt as isNativeTag,
|
1915
|
+
pt as isVuePlugin,
|
1916
|
+
ut as loadCss,
|
1913
1917
|
Ee as loadCssUrl,
|
1914
|
-
|
1918
|
+
hs as loadEnhance,
|
1915
1919
|
be as loadScriptUrl,
|
1916
|
-
|
1917
|
-
|
1920
|
+
$t as mockApi,
|
1921
|
+
wt as mockApis,
|
1918
1922
|
Ce as mockCleanup,
|
1919
|
-
|
1920
|
-
|
1923
|
+
A as nodeRender,
|
1924
|
+
ot as parseDeps,
|
1921
1925
|
T as parseExpression,
|
1922
1926
|
ee as parseFunction,
|
1923
|
-
|
1924
|
-
|
1925
|
-
|
1926
|
-
|
1927
|
+
ct as parseUrls,
|
1928
|
+
Me as providerKey,
|
1929
|
+
it as removeProdFlag,
|
1930
|
+
cs as setupPageSetting,
|
1927
1931
|
$e as toString,
|
1928
|
-
|
1929
|
-
|
1930
|
-
|
1932
|
+
gt as useAccess,
|
1933
|
+
_s as useMask,
|
1934
|
+
De as useProvider
|
1931
1935
|
};
|