@duxweb/dvha-core 1.0.31 → 1.0.33

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.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("vue"),O=require("@tanstack/vue-query"),x=require("@vueuse/core"),M=require("axios"),y=require("crypto-js"),D=require("dayjs"),k=require("lodash-es"),E=require("mathjs"),p=require("mime"),L=require("mitt"),T=require("pinia"),J=require("vue3-sfc-loader"),N=require("vue-router"),V=require("../../../hooks/manage.cjs"),W=require("../../../hooks/data.cjs");require("json-2-csv");require("@vee-validate/rules");require("vee-validate");const F=require("../../../hooks/i18n.cjs"),Q=require("../../../hooks/json.cjs");require("../../../hooks/json/index.cjs");require("../../../utils/bus.cjs");require("@overlastic/vue");require("clsx");require("colorizr");const U=require("../../../index.cjs");function u(n){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const a in n)if(a!=="default"){const o=Object.getOwnPropertyDescriptor(n,a);Object.defineProperty(s,a,o.get?o:{enumerable:!0,get:()=>n[a]})}}return s.default=n,Object.freeze(s)}const z=u(q),A=u(O),B=u(x),H=u(k),I=u(E),G=u(T),K=u(N),f=new Map;function X(n){return y.MD5(n).toString().substring(0,10)}function Y(n){const s=W.useClient(),{mergeLocale:a}=F.useI18n(),{config:o}=V.useManage(),v={moduleCache:{vue:z,"@duxweb/dvha-core":U,"@vueuse/core":B,"@tanstack/vue-query":A,axios:M,crypto:y,mime:p,math:I,mitt:L,"lodash-es":H,pinia:G,dayjs:D,"vue-router":K,...o?.remote?.packages,"static!":function(e,r,t){const i=p.getType(t);if(i?.startsWith("image"))return`data:${i};charset=utf-8;base64,${btoa(e)}`;if(t===".json")return JSON.parse(e);throw new Error(`${t} unable to parse`)}},async handleModule(e,r){if(e!==".vue"){if(e===".json"){const t=await r(),{render:i}=Q.useJsonSchema({data:t?.nodes||{},context:t?.data||{}});return()=>q.createVNode(i,null,null)}return r()}},customBlockHandler(e){if(e.type==="i18n"){const r=JSON.parse(e.content);for(const t in r)a(t,r[t])}},getFile:async e=>{e=g(e,".vue"),e=g(e,".json");const r=await s.request({path:typeof o?.remote?.apiRoutePath=="function"?o?.remote?.apiRoutePath(e):o?.remote?.apiRoutePath||"static",payload:{path:e},method:o?.remote?.apiMethod||"POST"}).then(t=>t?.data).catch(t=>{throw new Error(`${t?.message} ${e}`)});return{getContentData:()=>r?.content,type:`${r?.type||"vue"}`}},getResource({refPath:e,relPath:r},t){const{moduleCache:i,pathResolve:_,getFile:w}=t,[b,...l]=r.match(/([^!]+!)|[^!]+$/g).reverse(),S=(c,h,m,$)=>l.reduce((R,C)=>i[C](R,h,m,$),c),d=_({refPath:e,relPath:b},t),j=l.join("")+d,P=c=>c.startsWith("@")?!0:!c.includes("/")&&!c.startsWith(".");return{id:j,path:d,async getContent(){if(P(d))throw new Error(`Package ${d} not imported`);const{getContentData:c,type:h}=await w(d);return{getContentData:async m=>S(await c(m),d,h,t),type:h}}}},addStyle(e){const r=X(e);if(f.has(r))return;f.set(r,!0);const t=document.createElement("style");t.textContent=e,t.setAttribute("data-hash",r),document.head.appendChild(t)}};return()=>J.loadModule(`${n}`,{...v})}function g(n,s){const a=new RegExp(`${s}$`);return n.replace(a,"")}exports.sfcLoader=Y;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("vue"),O=require("@tanstack/vue-query"),M=require("@vueuse/core"),C=require("axios"),q=require("crypto-js"),W=require("dayjs"),T=require("lodash-es"),k=require("mathjs"),l=require("mime"),E=require("mitt"),L=require("pinia"),D=require("vue3-sfc-loader"),J=require("vue-router"),N=require("../../../hooks/manage.cjs"),V=require("../../../hooks/data.cjs");require("json-2-csv");require("@vee-validate/rules");require("vee-validate");const B=require("../../../hooks/i18n.cjs"),F=require("../../../hooks/json.cjs");require("../../../hooks/json/index.cjs");require("../../../utils/bus.cjs");require("@overlastic/vue");require("clsx");require("colorizr");const Q=require("../../../index.cjs");function i(n){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const o in n)if(o!=="default"){const a=Object.getOwnPropertyDescriptor(n,o);Object.defineProperty(c,o,a.get?a:{enumerable:!0,get:()=>n[o]})}}return c.default=n,Object.freeze(c)}const U=i(y),z=i(O),A=i(M),H=i(T),I=i(k),G=i(L),K=i(J),f=new Map;function X(n){return q.MD5(n).toString().substring(0,10)}function Y(n){const c=V.useClient(),{mergeLocale:o}=B.useI18n(),{config:a}=N.useManage(),v={moduleCache:{vue:U,"@duxweb/dvha-core":Q,"@vueuse/core":A,"@tanstack/vue-query":z,axios:C,crypto:q,mime:l,math:I,mitt:E,"lodash-es":H,pinia:G,dayjs:W,"vue-router":K,...a?.remote?.packages,"static!":function(e,r,t){const s=l.getType(t);if(s?.startsWith("image"))return`data:${s};charset=utf-8;base64,${btoa(e)}`;if(t===".json")return JSON.parse(e);throw new Error(`${t} unable to parse`)}},async handleModule(e,r){if(e!==".vue"){if(e===".json"){const t=await r(),{render:s}=F.useJsonSchema({data:t?.nodes||{},context:t?.data||{}});return()=>y.createVNode(s,null,null)}if(e!==".mjs")return r()}},customBlockHandler(e){if(e.type==="i18n"){const r=JSON.parse(e.content);for(const t in r)o(t,r[t])}},getFile:async e=>{e=g(e,".vue"),e=g(e,".json");const r=await c.request({path:typeof a?.remote?.apiRoutePath=="function"?a?.remote?.apiRoutePath(e):a?.remote?.apiRoutePath||"static",payload:{path:e},method:a?.remote?.apiMethod||"POST"}).then(s=>s?.data).catch(s=>{throw new Error(`${s?.message} ${e}`)});let t=r?.type||".vue";return(r?.type?.endsWith("js")||r?.type?.endsWith("ts")||r?.type?.endsWith("jsx")||r?.type?.endsWith("tsx"))&&(t=".mjs"),{content:r?.content,type:t}},getResource({refPath:e,relPath:r},t){const{moduleCache:s,pathResolve:_,getFile:j}=t,[b,...m]=r.match(/([^!]+!)|[^!]+$/g).reverse(),w=(u,h,p,x)=>m.reduce((R,$)=>s[$](R,h,p,x),u),d=_({refPath:e,relPath:b},t),S=m.join("")+d,P=u=>u.startsWith("@")?!0:!u.includes("/")&&!u.startsWith(".");return{id:S,path:d,async getContent(){if(P(d))throw new Error(`Package ${d} not imported`);const{content:u,type:h}=await j(d);return{getContentData:async p=>w(u,d,h,t),type:h}}}},addStyle(e){const r=X(e);if(f.has(r))return;f.set(r,!0);const t=document.createElement("style");t.textContent=e,t.setAttribute("data-hash",r),document.head.appendChild(t)}};return()=>D.loadModule(`${n}`,{...v})}function g(n,c){const o=new RegExp(`${c}$`);return n.replace(o,"")}exports.sfcLoader=Y;
@@ -1,59 +1,59 @@
1
- import * as M from "vue";
2
- import { createVNode as b } from "vue";
3
- import * as E from "@tanstack/vue-query";
4
- import * as k from "@vueuse/core";
5
- import D from "axios";
6
- import g from "crypto-js";
1
+ import * as W from "vue";
2
+ import { createVNode as M } from "vue";
3
+ import * as b from "@tanstack/vue-query";
4
+ import * as E from "@vueuse/core";
5
+ import k from "axios";
6
+ import y from "crypto-js";
7
7
  import J from "dayjs";
8
- import * as L from "lodash-es";
9
- import * as N from "mathjs";
10
- import d from "mime";
11
- import O from "mitt";
12
- import * as T from "pinia";
13
- import { loadModule as W } from "vue3-sfc-loader";
8
+ import * as T from "lodash-es";
9
+ import * as L from "mathjs";
10
+ import h from "mime";
11
+ import N from "mitt";
12
+ import * as O from "pinia";
13
+ import { loadModule as _ } from "vue3-sfc-loader";
14
14
  import * as q from "vue-router";
15
- import { useManage as F } from "../../../hooks/manage.js";
16
- import { useClient as V } from "../../../hooks/data.js";
15
+ import { useManage as B } from "../../../hooks/manage.js";
16
+ import { useClient as D } from "../../../hooks/data.js";
17
17
  import "json-2-csv";
18
18
  import "@vee-validate/rules";
19
19
  import "vee-validate";
20
- import { useI18n as _ } from "../../../hooks/i18n.js";
21
- import { useJsonSchema as A } from "../../../hooks/json.js";
20
+ import { useI18n as F } from "../../../hooks/i18n.js";
21
+ import { useJsonSchema as V } from "../../../hooks/json.js";
22
22
  import "../../../hooks/json/index.js";
23
23
  import "../../../utils/bus.js";
24
24
  import "@overlastic/vue";
25
25
  import "clsx";
26
26
  import "colorizr";
27
- import * as B from "../../../index.js";
27
+ import * as A from "../../../index.js";
28
28
  const f = /* @__PURE__ */ new Map();
29
29
  function H(s) {
30
- return g.MD5(s).toString().substring(0, 10);
30
+ return y.MD5(s).toString().substring(0, 10);
31
31
  }
32
32
  function ut(s) {
33
- const c = V(), {
33
+ const c = D(), {
34
34
  mergeLocale: u
35
- } = _(), {
35
+ } = F(), {
36
36
  config: i
37
- } = F(), y = {
37
+ } = B(), g = {
38
38
  moduleCache: {
39
- vue: M,
40
- "@duxweb/dvha-core": B,
41
- "@vueuse/core": k,
42
- "@tanstack/vue-query": E,
43
- axios: D,
44
- crypto: g,
45
- mime: d,
46
- math: N,
47
- mitt: O,
48
- "lodash-es": L,
49
- pinia: T,
39
+ vue: W,
40
+ "@duxweb/dvha-core": A,
41
+ "@vueuse/core": E,
42
+ "@tanstack/vue-query": b,
43
+ axios: k,
44
+ crypto: y,
45
+ mime: h,
46
+ math: L,
47
+ mitt: N,
48
+ "lodash-es": T,
49
+ pinia: O,
50
50
  dayjs: J,
51
51
  "vue-router": q,
52
52
  ...i?.remote?.packages,
53
53
  "static!": function(t, r, e) {
54
- const a = d.getType(e);
55
- if (a?.startsWith("image"))
56
- return `data:${a};charset=utf-8;base64,${btoa(t)}`;
54
+ const o = h.getType(e);
55
+ if (o?.startsWith("image"))
56
+ return `data:${o};charset=utf-8;base64,${btoa(t)}`;
57
57
  if (e === ".json")
58
58
  return JSON.parse(t);
59
59
  throw new Error(`${e} unable to parse`);
@@ -63,14 +63,15 @@ function ut(s) {
63
63
  if (t !== ".vue") {
64
64
  if (t === ".json") {
65
65
  const e = await r(), {
66
- render: a
67
- } = A({
66
+ render: o
67
+ } = V({
68
68
  data: e?.nodes || {},
69
69
  context: e?.data || {}
70
70
  });
71
- return () => b(a, null, null);
71
+ return () => M(o, null, null);
72
72
  }
73
- return r();
73
+ if (t !== ".mjs")
74
+ return r();
74
75
  }
75
76
  },
76
77
  customBlockHandler(t) {
@@ -88,12 +89,13 @@ function ut(s) {
88
89
  path: t
89
90
  },
90
91
  method: i?.remote?.apiMethod || "POST"
91
- }).then((e) => e?.data).catch((e) => {
92
- throw new Error(`${e?.message} ${t}`);
92
+ }).then((o) => o?.data).catch((o) => {
93
+ throw new Error(`${o?.message} ${t}`);
93
94
  });
94
- return {
95
- getContentData: () => r?.content,
96
- type: `${r?.type || "vue"}`
95
+ let e = r?.type || ".vue";
96
+ return (r?.type?.endsWith("js") || r?.type?.endsWith("ts") || r?.type?.endsWith("jsx") || r?.type?.endsWith("tsx")) && (e = ".mjs"), {
97
+ content: r?.content,
98
+ type: e
97
99
  };
98
100
  },
99
101
  getResource({
@@ -101,25 +103,25 @@ function ut(s) {
101
103
  relPath: r
102
104
  }, e) {
103
105
  const {
104
- moduleCache: a,
106
+ moduleCache: o,
105
107
  pathResolve: v,
106
108
  getFile: w
107
- } = e, [$, ...h] = r.match(/([^!]+!)|[^!]+$/g).reverse(), x = (o, m, p, P) => h.reduce((S, j) => a[j](S, m, p, P), o), n = v({
109
+ } = e, [x, ...p] = r.match(/([^!]+!)|[^!]+$/g).reverse(), j = (n, m, d, P) => p.reduce((S, C) => o[C](S, m, d, P), n), a = v({
108
110
  refPath: t,
109
- relPath: $
110
- }, e), C = h.join("") + n, R = (o) => o.startsWith("@") ? !0 : !o.includes("/") && !o.startsWith(".");
111
+ relPath: x
112
+ }, e), $ = p.join("") + a, R = (n) => n.startsWith("@") ? !0 : !n.includes("/") && !n.startsWith(".");
111
113
  return {
112
- id: C,
113
- path: n,
114
+ id: $,
115
+ path: a,
114
116
  async getContent() {
115
- if (R(n))
116
- throw new Error(`Package ${n} not imported`);
117
+ if (R(a))
118
+ throw new Error(`Package ${a} not imported`);
117
119
  const {
118
- getContentData: o,
120
+ content: n,
119
121
  type: m
120
- } = await w(n);
122
+ } = await w(a);
121
123
  return {
122
- getContentData: async (p) => x(await o(p), n, m, e),
124
+ getContentData: async (d) => j(n, a, m, e),
123
125
  type: m
124
126
  };
125
127
  }
@@ -134,8 +136,8 @@ function ut(s) {
134
136
  e.textContent = t, e.setAttribute("data-hash", r), document.head.appendChild(e);
135
137
  }
136
138
  };
137
- return () => W(`${s}`, {
138
- ...y
139
+ return () => _(`${s}`, {
140
+ ...g
139
141
  });
140
142
  }
141
143
  function l(s, c) {
@@ -11,7 +11,6 @@ export interface UseExtendListProps {
11
11
  totalField?: string;
12
12
  filters?: Record<string, any>;
13
13
  sorters?: Record<string, 'asc' | 'desc'>;
14
- expanded?: boolean;
15
14
  pagination?: boolean | IListPagination;
16
15
  exportFilename?: string;
17
16
  exportMaxPage?: number;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@duxweb/dvha-core",
3
3
  "type": "module",
4
- "version": "1.0.31",
4
+ "version": "1.0.33",
5
5
  "author": "DuxWeb",
6
6
  "license": "MIT",
7
7
  "repository": {