@duxweb/dvha-core 1.1.19 → 1.1.21
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 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("../status/exception.cjs");require("@tanstack/vue-query");require("@vueuse/core");require("axios");require("crypto-js");require("dayjs");require("lodash-es");require("mathjs");require("mime");require("mitt");require("pinia");require("vue3-sfc-loader");require("vue-router");require("json-2-csv");require("@vee-validate/rules");require("vee-validate");require("../../hooks/json/index.cjs");require("../../utils/bus.cjs");require("@overlastic/vue");require("clsx");require("colorizr");require("pinia-plugin-persistedstate");require("vue-i18n");const u=require("./remote/render.cjs"),i=e.defineComponent({name:"DuxLoaderRemote",setup(q){return()=>e.createVNode("div",{class:"app-remote-loader"},[e.createVNode(r.DuxException,null,{default:()=>[e.createVNode(u.DuxRemoteRender,null,null)]})])}});exports.default=i;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("../status/exception.cjs");require("@microsoft/fetch-event-source");require("@tanstack/vue-query");require("@vueuse/core");require("axios");require("crypto-js");require("dayjs");require("lodash-es");require("marked");require("mathjs");require("mime");require("mitt");require("pinia");require("vue3-sfc-loader");require("vue-router");require("json-2-csv");require("@vee-validate/rules");require("vee-validate");require("../../hooks/json/index.cjs");require("../../utils/bus.cjs");require("@overlastic/vue");require("clsx");require("colorizr");require("pinia-plugin-persistedstate");require("vue-i18n");const u=require("./remote/render.cjs"),i=e.defineComponent({name:"DuxLoaderRemote",setup(q){return()=>e.createVNode("div",{class:"app-remote-loader"},[e.createVNode(r.DuxException,null,{default:()=>[e.createVNode(u.DuxRemoteRender,null,null)]})])}});exports.default=i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("vue"),M=require("@microsoft/fetch-event-source"),$=require("@tanstack/vue-query"),C=require("@vueuse/core"),W=require("axios"),v=require("crypto-js"),E=require("dayjs"),T=require("lodash-es"),L=require("marked"),D=require("mathjs"),q=require("mime"),J=require("mitt"),N=require("pinia"),V=require("vue3-sfc-loader"),B=require("vue-router"),F=require("../../../hooks/auth.cjs"),Q=require("../../../hooks/data.cjs");require("json-2-csv");require("@vee-validate/rules");require("vee-validate");const U=require("../../../hooks/i18n.cjs"),z=require("../../../hooks/json.cjs");require("../../../hooks/json/index.cjs");const A=require("../../../hooks/manage.cjs");require("../../../utils/bus.cjs");require("@overlastic/vue");require("clsx");require("colorizr");const H=require("../../../index.cjs");function o(n){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const a in n)if(a!=="default"){const m=Object.getOwnPropertyDescriptor(n,a);Object.defineProperty(c,a,m.get?m:{enumerable:!0,get:()=>n[a]})}}return c.default=n,Object.freeze(c)}const I=o(_),G=o(M),K=o($),X=o(C),Y=o(T),Z=o(L),ee=o(D),te=o(N),re=o(B),y=new Map;function ne(n){return v.MD5(n).toString().substring(0,10)}function se(n){const c=Q.useClient(),{mutate:a}=F.useError(),{mergeLocale:m}=U.useI18n(),{config:d}=A.useManage(),j={moduleCache:{vue:I,"@duxweb/dvha-core":H,"@vueuse/core":X,"@tanstack/vue-query":K,axios:W,"crypto-js":v,mime:q,math:ee,mitt:J,"lodash-es":Y,pinia:te,dayjs:E,"vue-router":re,marked:Z,"@microsoft/fetch-event-source":G,...d?.remote?.packages,"static!":function(e,t,r){const s=q.getType(r);if(s?.startsWith("image"))return`data:${s};charset=utf-8;base64,${btoa(e)}`;if(r===".json")return JSON.parse(e);throw new Error(`${r} unable to parse`)}},async handleModule(e,t){if(e!==".vue"){if(e===".json"){const r=await t(),{render:s}=z.useJsonSchema({data:r?.nodes||{},context:r?.data||{}});return()=>_.createVNode(s,null,null)}if(e!==".mjs")return t()}},customBlockHandler(e){if(e.type==="i18n"){const t=JSON.parse(e.content);for(const r in t)m(r,t[r])}},getFile:async e=>{e=g(e,".vue"),e=g(e,".json");const t=await c.request({path:typeof d?.remote?.apiRoutePath=="function"?d?.remote?.apiRoutePath(e):d?.remote?.apiRoutePath||"static",payload:{path:e},method:d?.remote?.apiMethod||"POST"}).then(s=>s?.data).catch(s=>{a(s)});if(!t)return;let r=t?.type||".vue";return(t?.type?.endsWith("js")||t?.type?.endsWith("ts")||t?.type?.endsWith("jsx")||t?.type?.endsWith("tsx"))&&(r=".mjs"),{content:t?.content,type:r}},getResource({refPath:e,relPath:t},r){const{moduleCache:s,pathResolve:b,getFile:S}=r,[w,...l]=t.match(/([^!]+!)|[^!]+$/g).reverse(),P=(u,p,h,f)=>l.reduce((O,k)=>s[k](O,p,h,f),u),i=b({refPath:e,relPath:w},r),x=l.join("")+i,R=u=>u.startsWith("@")?!0:!u.includes("/")&&!u.startsWith(".");return{id:x,path:i,async getContent(){if(R(i))throw new Error(`Package ${i} not imported`);const u=await S(i),{content:p,type:h}=u||{};return{getContentData:async f=>P(p,i,h,r),type:h}}}},addStyle(e){const t=ne(e);if(y.has(t))return;y.set(t,!0);const r=document.createElement("style");r.textContent=e,r.setAttribute("data-hash",t),document.head.appendChild(r)}};return()=>V.loadModule(`${n}`,{...j})}function g(n,c){const a=new RegExp(`${c}$`);return n.replace(a,"")}exports.sfcLoader=se;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { defineComponent as r, createVNode as o } from "vue";
|
|
2
2
|
import { DuxException as t } from "../status/exception.js";
|
|
3
|
+
import "@microsoft/fetch-event-source";
|
|
3
4
|
import "@tanstack/vue-query";
|
|
4
5
|
import "@vueuse/core";
|
|
5
6
|
import "axios";
|
|
6
7
|
import "crypto-js";
|
|
7
8
|
import "dayjs";
|
|
8
9
|
import "lodash-es";
|
|
10
|
+
import "marked";
|
|
9
11
|
import "mathjs";
|
|
10
12
|
import "mime";
|
|
11
13
|
import "mitt";
|
|
@@ -23,7 +25,7 @@ import "colorizr";
|
|
|
23
25
|
import "pinia-plugin-persistedstate";
|
|
24
26
|
import "vue-i18n";
|
|
25
27
|
import { DuxRemoteRender as m } from "./remote/render.js";
|
|
26
|
-
const
|
|
28
|
+
const y = /* @__PURE__ */ r({
|
|
27
29
|
name: "DuxLoaderRemote",
|
|
28
30
|
setup(p) {
|
|
29
31
|
return () => o("div", {
|
|
@@ -34,5 +36,5 @@ const q = /* @__PURE__ */ r({
|
|
|
34
36
|
}
|
|
35
37
|
});
|
|
36
38
|
export {
|
|
37
|
-
|
|
39
|
+
y as default
|
|
38
40
|
};
|
|
@@ -1,57 +1,61 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { createVNode as
|
|
1
|
+
import * as k from "vue";
|
|
2
|
+
import { createVNode as E } from "vue";
|
|
3
|
+
import * as M from "@microsoft/fetch-event-source";
|
|
3
4
|
import * as b from "@tanstack/vue-query";
|
|
4
|
-
import * as
|
|
5
|
-
import
|
|
5
|
+
import * as J from "@vueuse/core";
|
|
6
|
+
import T from "axios";
|
|
6
7
|
import g from "crypto-js";
|
|
7
|
-
import
|
|
8
|
-
import * as
|
|
9
|
-
import * as
|
|
8
|
+
import L from "dayjs";
|
|
9
|
+
import * as N from "lodash-es";
|
|
10
|
+
import * as O from "marked";
|
|
11
|
+
import * as _ from "mathjs";
|
|
10
12
|
import h from "mime";
|
|
11
|
-
import
|
|
12
|
-
import * as
|
|
13
|
-
import { loadModule as
|
|
14
|
-
import * as
|
|
15
|
-
import { useError as
|
|
16
|
-
import { useClient as
|
|
13
|
+
import q from "mitt";
|
|
14
|
+
import * as B from "pinia";
|
|
15
|
+
import { loadModule as D } from "vue3-sfc-loader";
|
|
16
|
+
import * as F from "vue-router";
|
|
17
|
+
import { useError as V } from "../../../hooks/auth.js";
|
|
18
|
+
import { useClient as A } from "../../../hooks/data.js";
|
|
17
19
|
import "json-2-csv";
|
|
18
20
|
import "@vee-validate/rules";
|
|
19
21
|
import "vee-validate";
|
|
20
|
-
import { useI18n as
|
|
21
|
-
import { useJsonSchema as
|
|
22
|
+
import { useI18n as H } from "../../../hooks/i18n.js";
|
|
23
|
+
import { useJsonSchema as I } from "../../../hooks/json.js";
|
|
22
24
|
import "../../../hooks/json/index.js";
|
|
23
|
-
import { useManage as
|
|
25
|
+
import { useManage as Q } from "../../../hooks/manage.js";
|
|
24
26
|
import "../../../utils/bus.js";
|
|
25
27
|
import "@overlastic/vue";
|
|
26
28
|
import "clsx";
|
|
27
29
|
import "colorizr";
|
|
28
|
-
import * as
|
|
30
|
+
import * as U from "../../../index.js";
|
|
29
31
|
const l = /* @__PURE__ */ new Map();
|
|
30
|
-
function
|
|
32
|
+
function z(s) {
|
|
31
33
|
return g.MD5(s).toString().substring(0, 10);
|
|
32
34
|
}
|
|
33
|
-
function
|
|
34
|
-
const c =
|
|
35
|
+
function lt(s) {
|
|
36
|
+
const c = A(), {
|
|
35
37
|
mutate: u
|
|
36
|
-
} = D(), {
|
|
37
|
-
mergeLocale: v
|
|
38
38
|
} = V(), {
|
|
39
|
+
mergeLocale: v
|
|
40
|
+
} = H(), {
|
|
39
41
|
config: i
|
|
40
|
-
} =
|
|
42
|
+
} = Q(), j = {
|
|
41
43
|
moduleCache: {
|
|
42
|
-
vue:
|
|
43
|
-
"@duxweb/dvha-core":
|
|
44
|
-
"@vueuse/core":
|
|
44
|
+
vue: k,
|
|
45
|
+
"@duxweb/dvha-core": U,
|
|
46
|
+
"@vueuse/core": J,
|
|
45
47
|
"@tanstack/vue-query": b,
|
|
46
|
-
axios:
|
|
48
|
+
axios: T,
|
|
47
49
|
"crypto-js": g,
|
|
48
50
|
mime: h,
|
|
49
|
-
math:
|
|
50
|
-
mitt:
|
|
51
|
-
"lodash-es":
|
|
52
|
-
pinia:
|
|
53
|
-
dayjs:
|
|
54
|
-
"vue-router":
|
|
51
|
+
math: _,
|
|
52
|
+
mitt: q,
|
|
53
|
+
"lodash-es": N,
|
|
54
|
+
pinia: B,
|
|
55
|
+
dayjs: L,
|
|
56
|
+
"vue-router": F,
|
|
57
|
+
marked: O,
|
|
58
|
+
"@microsoft/fetch-event-source": M,
|
|
55
59
|
...i?.remote?.packages,
|
|
56
60
|
"static!": function(t, e, r) {
|
|
57
61
|
const o = h.getType(r);
|
|
@@ -67,11 +71,11 @@ function ft(s) {
|
|
|
67
71
|
if (t === ".json") {
|
|
68
72
|
const r = await e(), {
|
|
69
73
|
render: o
|
|
70
|
-
} =
|
|
74
|
+
} = I({
|
|
71
75
|
data: r?.nodes || {},
|
|
72
76
|
context: r?.data || {}
|
|
73
77
|
});
|
|
74
|
-
return () =>
|
|
78
|
+
return () => E(o, null, null);
|
|
75
79
|
}
|
|
76
80
|
if (t !== ".mjs")
|
|
77
81
|
return e();
|
|
@@ -111,10 +115,10 @@ function ft(s) {
|
|
|
111
115
|
moduleCache: o,
|
|
112
116
|
pathResolve: x,
|
|
113
117
|
getFile: w
|
|
114
|
-
} = r, [R, ...
|
|
118
|
+
} = r, [R, ...f] = e.match(/([^!]+!)|[^!]+$/g).reverse(), P = (n, p, m, d) => f.reduce((C, W) => o[W](C, p, m, d), n), a = x({
|
|
115
119
|
refPath: t,
|
|
116
120
|
relPath: R
|
|
117
|
-
}, r), S =
|
|
121
|
+
}, r), S = f.join("") + a, $ = (n) => n.startsWith("@") ? !0 : !n.includes("/") && !n.startsWith(".");
|
|
118
122
|
return {
|
|
119
123
|
id: S,
|
|
120
124
|
path: a,
|
|
@@ -126,14 +130,14 @@ function ft(s) {
|
|
|
126
130
|
type: m
|
|
127
131
|
} = n || {};
|
|
128
132
|
return {
|
|
129
|
-
getContentData: async (
|
|
133
|
+
getContentData: async (d) => P(p, a, m, r),
|
|
130
134
|
type: m
|
|
131
135
|
};
|
|
132
136
|
}
|
|
133
137
|
};
|
|
134
138
|
},
|
|
135
139
|
addStyle(t) {
|
|
136
|
-
const e =
|
|
140
|
+
const e = z(t);
|
|
137
141
|
if (l.has(e))
|
|
138
142
|
return;
|
|
139
143
|
l.set(e, !0);
|
|
@@ -141,7 +145,7 @@ function ft(s) {
|
|
|
141
145
|
r.textContent = t, r.setAttribute("data-hash", e), document.head.appendChild(r);
|
|
142
146
|
}
|
|
143
147
|
};
|
|
144
|
-
return () =>
|
|
148
|
+
return () => D(`${s}`, {
|
|
145
149
|
...j
|
|
146
150
|
});
|
|
147
151
|
}
|
|
@@ -150,5 +154,5 @@ function y(s, c) {
|
|
|
150
154
|
return s.replace(u, "");
|
|
151
155
|
}
|
|
152
156
|
export {
|
|
153
|
-
|
|
157
|
+
lt as sfcLoader
|
|
154
158
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@duxweb/dvha-core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.21",
|
|
5
5
|
"author": "DuxWeb",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"dist"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
+
"@microsoft/fetch-event-source": "^2.0.1",
|
|
31
32
|
"@overlastic/vue": "^0.8.3",
|
|
32
33
|
"@tanstack/vue-query": "^5.90.7",
|
|
33
34
|
"@vee-validate/rules": "^4.15.1",
|
|
@@ -41,6 +42,7 @@
|
|
|
41
42
|
"jsep": "^1.4.0",
|
|
42
43
|
"json-2-csv": "^5.5.10",
|
|
43
44
|
"lodash-es": "^4.17.21",
|
|
45
|
+
"marked": "^17.0.1",
|
|
44
46
|
"mathjs": "^15.1.0",
|
|
45
47
|
"mime": "^4.1.0",
|
|
46
48
|
"mitt": "^3.0.1",
|