@duxweb/dvha-core 1.0.22 → 1.0.24

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.
Files changed (85) hide show
  1. package/dist/cjs/components/auth/can.cjs +1 -1
  2. package/dist/cjs/components/loader/iframe.cjs +1 -1
  3. package/dist/cjs/components/loader/remote/loader.cjs +1 -1
  4. package/dist/cjs/components/loader/remote/render.cjs +1 -1
  5. package/dist/cjs/components/overlay/overlay.cjs +1 -1
  6. package/dist/cjs/components/status/exception.cjs +1 -1
  7. package/dist/cjs/directive/permission.cjs +1 -1
  8. package/dist/cjs/hooks/auth.cjs +1 -1
  9. package/dist/cjs/hooks/data.cjs +1 -1
  10. package/dist/cjs/hooks/export.cjs +1 -1
  11. package/dist/cjs/hooks/exportCsv.cjs +2 -2
  12. package/dist/cjs/hooks/form.cjs +1 -1
  13. package/dist/cjs/hooks/formExtend.cjs +1 -1
  14. package/dist/cjs/hooks/i18n.cjs +1 -1
  15. package/dist/cjs/hooks/import.cjs +1 -1
  16. package/dist/cjs/hooks/importCsv.cjs +2 -2
  17. package/dist/cjs/hooks/json/utils/expressionParser.cjs +1 -1
  18. package/dist/cjs/hooks/json/vFor.cjs +1 -1
  19. package/dist/cjs/hooks/json/vOn.cjs +1 -1
  20. package/dist/cjs/hooks/json/vShow.cjs +1 -1
  21. package/dist/cjs/hooks/json.cjs +1 -1
  22. package/dist/cjs/hooks/list.cjs +1 -1
  23. package/dist/cjs/hooks/manage.cjs +1 -1
  24. package/dist/cjs/hooks/menu.cjs +1 -1
  25. package/dist/cjs/hooks/select.cjs +1 -1
  26. package/dist/cjs/hooks/theme.cjs +3 -3
  27. package/dist/cjs/hooks/tree.cjs +1 -1
  28. package/dist/cjs/hooks/upload/s3.cjs +1 -1
  29. package/dist/cjs/hooks/upload.cjs +1 -1
  30. package/dist/cjs/preset/authProvider.cjs +1 -1
  31. package/dist/cjs/preset/dataProvider.cjs +1 -1
  32. package/dist/cjs/preset/i18nProvider.cjs +1 -1
  33. package/dist/cjs/provider/app.cjs +1 -1
  34. package/dist/cjs/router/route.cjs +1 -1
  35. package/dist/cjs/stores/auth.cjs +1 -1
  36. package/dist/cjs/stores/i18n.cjs +1 -1
  37. package/dist/cjs/stores/jsonSchema.cjs +1 -1
  38. package/dist/cjs/stores/manage.cjs +1 -1
  39. package/dist/cjs/stores/route.cjs +1 -1
  40. package/dist/cjs/stores/tab.cjs +1 -1
  41. package/dist/cjs/stores/theme.cjs +1 -1
  42. package/dist/cjs/utils/tree.cjs +1 -1
  43. package/dist/esm/components/auth/can.js +8 -11
  44. package/dist/esm/components/loader/iframe.js +14 -17
  45. package/dist/esm/components/loader/remote/loader.js +103 -105
  46. package/dist/esm/components/loader/remote/render.js +10 -11
  47. package/dist/esm/components/overlay/overlay.js +7 -7
  48. package/dist/esm/components/status/exception.js +10 -13
  49. package/dist/esm/directive/permission.js +6 -7
  50. package/dist/esm/hooks/auth.js +73 -83
  51. package/dist/esm/hooks/data.js +290 -345
  52. package/dist/esm/hooks/export.js +16 -17
  53. package/dist/esm/hooks/exportCsv.js +26 -27
  54. package/dist/esm/hooks/form.js +49 -54
  55. package/dist/esm/hooks/formExtend.js +24 -25
  56. package/dist/esm/hooks/i18n.js +11 -29
  57. package/dist/esm/hooks/import.js +31 -32
  58. package/dist/esm/hooks/importCsv.js +24 -25
  59. package/dist/esm/hooks/json/utils/expressionParser.js +36 -42
  60. package/dist/esm/hooks/json/vFor.js +15 -16
  61. package/dist/esm/hooks/json/vOn.js +17 -18
  62. package/dist/esm/hooks/json/vShow.js +9 -10
  63. package/dist/esm/hooks/json.js +88 -94
  64. package/dist/esm/hooks/list.js +100 -127
  65. package/dist/esm/hooks/manage.js +13 -17
  66. package/dist/esm/hooks/menu.js +39 -52
  67. package/dist/esm/hooks/select.js +35 -40
  68. package/dist/esm/hooks/theme.js +127 -141
  69. package/dist/esm/hooks/tree.js +22 -28
  70. package/dist/esm/hooks/upload/s3.js +22 -23
  71. package/dist/esm/hooks/upload.js +152 -159
  72. package/dist/esm/preset/authProvider.js +63 -117
  73. package/dist/esm/preset/dataProvider.js +69 -76
  74. package/dist/esm/preset/i18nProvider.js +18 -18
  75. package/dist/esm/provider/app.js +74 -81
  76. package/dist/esm/router/route.js +16 -24
  77. package/dist/esm/stores/auth.js +17 -20
  78. package/dist/esm/stores/i18n.js +10 -10
  79. package/dist/esm/stores/jsonSchema.js +20 -23
  80. package/dist/esm/stores/manage.js +33 -33
  81. package/dist/esm/stores/route.js +38 -50
  82. package/dist/esm/stores/tab.js +38 -54
  83. package/dist/esm/stores/theme.js +28 -29
  84. package/dist/esm/utils/tree.js +23 -24
  85. package/package.json +1 -1
@@ -1,21 +1,20 @@
1
- import p from "jsep";
2
- import { unref as c } from "vue";
3
- p.addIdentifierChar("$");
4
- p.addIdentifierChar("@");
1
+ import l from "jsep";
2
+ import { unref as n } from "vue";
3
+ l.addIdentifierChar("$");
4
+ l.addIdentifierChar("@");
5
5
  function y(r) {
6
6
  try {
7
- return p(r);
7
+ return l(r);
8
8
  } catch (e) {
9
9
  return console.warn(`Expression parsing failed: ${r}`, e), null;
10
10
  }
11
11
  }
12
12
  function m(r, e) {
13
- const n = y(r);
14
- if (n)
15
- return i(n, e);
13
+ const t = y(r);
14
+ if (t)
15
+ return i(t, e);
16
16
  }
17
17
  function i(r, e) {
18
- var n, l;
19
18
  if (!(!r || typeof r != "object"))
20
19
  switch (r.type) {
21
20
  case "Literal":
@@ -26,11 +25,12 @@ function i(r, e) {
26
25
  const t = i(r.object, e);
27
26
  if (t == null)
28
27
  return;
29
- const s = r.computed ? i(r.property, e) : (n = r.property) == null ? void 0 : n.name, a = c(t);
30
- return a == null ? void 0 : a[s];
28
+ const s = r.computed ? i(r.property, e) : r.property?.name;
29
+ return n(t)?.[s];
31
30
  }
32
31
  case "BinaryExpression": {
33
- const t = i(r.left, e), s = i(r.right, e), a = {
32
+ const t = i(r.left, e), s = i(r.right, e);
33
+ return {
34
34
  "+": () => t + s,
35
35
  "-": () => t - s,
36
36
  "*": () => t * s,
@@ -44,8 +44,7 @@ function i(r, e) {
44
44
  ">": () => t > s,
45
45
  "<=": () => t <= s,
46
46
  ">=": () => t >= s
47
- };
48
- return ((l = a[r.operator]) == null ? void 0 : l.call(a)) ?? void 0;
47
+ }[r.operator]?.() ?? void 0;
49
48
  }
50
49
  case "LogicalExpression": {
51
50
  const t = i(r.left, e);
@@ -60,24 +59,24 @@ function i(r, e) {
60
59
  return i(t ? r.consequent : r.alternate, e);
61
60
  }
62
61
  case "CallExpression": {
63
- const t = i(r.callee, e), s = c(t);
62
+ const t = i(r.callee, e), s = n(t);
64
63
  if (typeof s != "function") {
65
64
  console.warn("Attempting to call non-function value:", s);
66
65
  return;
67
66
  }
68
- const a = Array.isArray(r.arguments) ? r.arguments.map((u) => {
69
- const o = i(u, e);
70
- return c(o);
67
+ const u = Array.isArray(r.arguments) ? r.arguments.map((a) => {
68
+ const p = i(a, e);
69
+ return n(p);
71
70
  }) : [];
72
71
  try {
73
- let u;
72
+ let a;
74
73
  if (r.callee.type === "MemberExpression") {
75
- const o = i(r.callee.object, e);
76
- u = c(o);
74
+ const p = i(r.callee.object, e);
75
+ a = n(p);
77
76
  }
78
- return s.apply(u, a);
79
- } catch (u) {
80
- console.warn("Function call error:", u);
77
+ return s.apply(a, u);
78
+ } catch (a) {
79
+ console.warn("Function call error:", a);
81
80
  return;
82
81
  }
83
82
  }
@@ -86,7 +85,7 @@ function i(r, e) {
86
85
  if (!t)
87
86
  return;
88
87
  const s = i(t, e);
89
- return c(s);
88
+ return n(s);
90
89
  }) : [];
91
90
  default:
92
91
  console.warn(`Unsupported expression type: ${r.type}`);
@@ -96,32 +95,27 @@ function i(r, e) {
96
95
  function v(r, e) {
97
96
  if (!(!e || !r))
98
97
  try {
99
- return e.split(".").reduce((n, l) => {
100
- if (n == null)
101
- return;
102
- const t = c(n);
103
- return t == null ? void 0 : t[l];
104
- }, r);
98
+ return e.split(".").reduce((t, s) => t == null ? void 0 : n(t)?.[s], r);
105
99
  } catch {
106
100
  return;
107
101
  }
108
102
  }
109
- function g(r, e) {
110
- const n = r.trim(), l = n.match(/^\((\w+),\s*(\w+)\) in (.+)$/);
111
- if (l) {
112
- const [, s, a, u] = l, o = m(u, e), f = c(o);
103
+ function E(r, e) {
104
+ const t = r.trim(), s = t.match(/^\((\w+),\s*(\w+)\) in (.+)$/);
105
+ if (s) {
106
+ const [, a, p, c] = s, o = m(c, e), f = n(o);
113
107
  return {
114
108
  items: Array.isArray(f) ? f : [],
115
- itemName: s,
116
- indexName: a
109
+ itemName: a,
110
+ indexName: p
117
111
  };
118
112
  }
119
- const t = n.match(/^(\w+) in (.+)$/);
120
- if (t) {
121
- const [, s, a] = t, u = m(a, e), o = c(u);
113
+ const u = t.match(/^(\w+) in (.+)$/);
114
+ if (u) {
115
+ const [, a, p] = u, c = m(p, e), o = n(c);
122
116
  return {
123
117
  items: Array.isArray(o) ? o : [],
124
- itemName: s,
118
+ itemName: a,
125
119
  indexName: "index"
126
120
  };
127
121
  }
@@ -130,5 +124,5 @@ function g(r, e) {
130
124
  export {
131
125
  m as evaluateExpression,
132
126
  y as parseExpression,
133
- g as parseVForExpression
127
+ E as parseVForExpression
134
128
  };
@@ -1,16 +1,15 @@
1
- import { extractContext as x, injectContext as u, cleanProps as d } from "./utils/contextManager.js";
2
- import { parseVForExpression as v } from "./utils/expressionParser.js";
3
- const A = {
1
+ import { extractContext as c, injectContext as f, cleanProps as x } from "./utils/contextManager.js";
2
+ import { parseVForExpression as u } from "./utils/expressionParser.js";
3
+ const y = {
4
4
  name: "v-for",
5
5
  priority: 90,
6
6
  process(r, n) {
7
- var a, m;
8
- const e = ((a = r.attrs) == null ? void 0 : a["v-for"]) || ((m = r.attrs) == null ? void 0 : m.vFor);
7
+ const e = r.attrs?.["v-for"] || r.attrs?.vFor;
9
8
  if (!e)
10
9
  return null;
11
10
  const o = { ...r.attrs };
12
11
  delete o["v-for"], delete o.vFor;
13
- const i = x(n);
12
+ const i = c(n);
14
13
  let t;
15
14
  try {
16
15
  if (Array.isArray(e))
@@ -26,32 +25,32 @@ const A = {
26
25
  indexName: e.index || "index"
27
26
  };
28
27
  else if (typeof e == "string")
29
- t = v(e, i);
28
+ t = u(e, i);
30
29
  else
31
30
  return console.warn("Unsupported v-for format:", e), null;
32
31
  } catch (s) {
33
32
  return console.warn("v-for parsing failed:", s), null;
34
33
  }
35
- const p = t.items.map((s, l) => {
36
- const c = {
34
+ const m = t.items.map((s, a) => {
35
+ const l = {
37
36
  [t.itemName]: s,
38
- [t.indexName]: l
39
- }, f = { ...i, ...c };
37
+ [t.indexName]: a
38
+ }, p = { ...i, ...l };
40
39
  return {
41
40
  ...r,
42
41
  attrs: {
43
42
  ...o,
44
- key: `${t.itemName}_${l}`,
45
- ...u({}, f)
43
+ key: `${t.itemName}_${a}`,
44
+ ...f({}, p)
46
45
  }
47
46
  };
48
47
  });
49
48
  return {
50
- props: d(n),
51
- nodes: p
49
+ props: x(n),
50
+ nodes: m
52
51
  };
53
52
  }
54
53
  };
55
54
  export {
56
- A as vForAdaptor
55
+ y as vForAdaptor
57
56
  };
@@ -1,32 +1,31 @@
1
- const P = {
1
+ const u = {
2
2
  name: "v-on",
3
3
  priority: 60,
4
- process($, p) {
5
- const n = {}, e = {};
4
+ process(v, c) {
5
+ const o = {}, s = {};
6
6
  let i = !1;
7
- return Object.entries(p).forEach(([r, o]) => {
8
- if (r.startsWith("@") || r.startsWith("v-on:")) {
7
+ return Object.entries(c).forEach(([t, e]) => {
8
+ if (t.startsWith("@") || t.startsWith("v-on:")) {
9
9
  i = !0;
10
- const f = r.startsWith("@") ? r.slice(1) : r.slice(5), [s, ...a] = f.split(".");
11
- if (!s) {
12
- console.warn(`Invalid event name: ${r}`);
10
+ const l = t.startsWith("@") ? t.slice(1) : t.slice(5), [n, ...a] = l.split(".");
11
+ if (!n) {
12
+ console.warn(`Invalid event name: ${t}`);
13
13
  return;
14
14
  }
15
- const d = `on${s.charAt(0).toUpperCase()}${s.slice(1)}`, h = (t, ...u) => {
16
- var c, l;
17
- a.includes("prevent") && ((c = t.preventDefault) == null || c.call(t)), a.includes("stop") && ((l = t.stopPropagation) == null || l.call(t));
15
+ const p = `on${n.charAt(0).toUpperCase()}${n.slice(1)}`, f = (r, ...d) => {
16
+ a.includes("prevent") && r.preventDefault?.(), a.includes("stop") && r.stopPropagation?.();
18
17
  try {
19
- typeof o == "function" ? o(t, ...u) : console.warn(`Invalid event handler type: ${typeof o}`);
20
- } catch (m) {
21
- console.error(`Event handler execution error (${s}):`, m);
18
+ typeof e == "function" ? e(r, ...d) : console.warn(`Invalid event handler type: ${typeof e}`);
19
+ } catch (h) {
20
+ console.error(`Event handler execution error (${n}):`, h);
22
21
  }
23
22
  };
24
- n[d] = h;
23
+ o[p] = f;
25
24
  } else
26
- e[r] = o;
27
- }), i ? { props: { ...e, ...n } } : null;
25
+ s[t] = e;
26
+ }), i ? { props: { ...s, ...o } } : null;
28
27
  }
29
28
  };
30
29
  export {
31
- P as vOnAdaptor
30
+ u as vOnAdaptor
32
31
  };
@@ -1,24 +1,23 @@
1
- import { extractContext as a, evaluateCondition as p } from "./utils/contextManager.js";
2
- import { evaluateExpression as v } from "./utils/expressionParser.js";
3
- const u = {
1
+ import { extractContext as l, evaluateCondition as a } from "./utils/contextManager.js";
2
+ import { evaluateExpression as p } from "./utils/expressionParser.js";
3
+ const y = {
4
4
  name: "v-show",
5
5
  priority: 95,
6
- process(c, t) {
7
- var r;
8
- const e = (r = c.attrs) == null ? void 0 : r["v-show"];
6
+ process(r, t) {
7
+ const e = r.attrs?.["v-show"];
9
8
  if (e === void 0)
10
9
  return null;
11
- const i = a(t), n = p(e, i, v), o = { ...t };
10
+ const c = l(t), n = a(e, c, p), o = { ...t };
12
11
  delete o["v-show"];
13
- const s = o.style || {}, l = typeof s == "object" ? { ...s, display: n ? void 0 : "none" } : { display: n ? void 0 : "none" };
12
+ const s = o.style || {}, i = typeof s == "object" ? { ...s, display: n ? void 0 : "none" } : { display: n ? void 0 : "none" };
14
13
  return {
15
14
  props: {
16
15
  ...o,
17
- style: l
16
+ style: i
18
17
  }
19
18
  };
20
19
  }
21
20
  };
22
21
  export {
23
- u as vShowAdaptor
22
+ y as vShowAdaptor
24
23
  };
@@ -1,132 +1,126 @@
1
- import { computed as U, isRef as _, defineComponent as R, markRaw as E, h as v, unref as D } from "vue";
2
- import { useJsonSchemaStore as z } from "../stores/jsonSchema.js";
3
- import { useConfig as F } from "./config.js";
4
- import { defaultAdaptors as G } from "./json/index.js";
5
- import { injectContext as L } from "./json/utils/contextManager.js";
6
- function W(e) {
7
- return e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
1
+ import { computed as w, isRef as S, defineComponent as M, markRaw as A, h as b, unref as T } from "vue";
2
+ import { useJsonSchemaStore as N } from "../stores/jsonSchema.js";
3
+ import { useConfig as U } from "./config.js";
4
+ import { defaultAdaptors as D } from "./json/index.js";
5
+ import { injectContext as F } from "./json/utils/contextManager.js";
6
+ function G(n) {
7
+ return n.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
8
8
  }
9
- function J(e, s) {
10
- Array.isArray(e) ? e.forEach((c) => {
11
- const f = c;
12
- let i = f.name;
13
- !i && f.__name && (i = f.__name.replace(/\.(vue|ts|tsx|js|jsx)$/, "").split("/").pop()), i && s.addComponent(E(c), i);
14
- }) : typeof e == "object" && e !== null && Object.entries(e).forEach(([c, f]) => {
15
- s.addComponent(E(f), c);
9
+ function B(n, u) {
10
+ Array.isArray(n) ? n.forEach((s) => {
11
+ const c = s;
12
+ let m = c.name;
13
+ !m && c.__name && (m = c.__name.replace(/\.(vue|ts|tsx|js|jsx)$/, "").split("/").pop()), m && u.addComponent(A(s), m);
14
+ }) : typeof n == "object" && n !== null && Object.entries(n).forEach(([s, c]) => {
15
+ u.addComponent(A(c), s);
16
16
  });
17
17
  }
18
- function X(e, s) {
19
- var f, i;
20
- const c = z(s);
21
- (f = e.jsonSchema) != null && f.components && J(e.jsonSchema.components, c), (i = e.manages) == null || i.forEach((y) => {
22
- var S;
23
- (S = y.jsonSchema) != null && S.components && J(y.jsonSchema.components, c);
18
+ function K(n, u) {
19
+ const s = N(u);
20
+ n.jsonSchema?.components && B(n.jsonSchema.components, s), n.manages?.forEach((c) => {
21
+ c.jsonSchema?.components && B(c.jsonSchema.components, s);
24
22
  });
25
23
  }
26
- function Y(e) {
27
- var M;
28
- const s = F(), c = z(), f = [...G, ...((M = s.jsonSchema) == null ? void 0 : M.adaptors) || [], ...(e == null ? void 0 : e.adaptors) || []];
29
- e != null && e.components && J(e.components, c);
30
- const i = U(() => _(e == null ? void 0 : e.data) ? e == null ? void 0 : e.data.value : e == null ? void 0 : e.data);
31
- function y() {
32
- return (_(e == null ? void 0 : e.context) ? e == null ? void 0 : e.context.value : e == null ? void 0 : e.context) || {};
24
+ function Q(n) {
25
+ const u = U(), s = N(), c = [...D, ...u.jsonSchema?.adaptors || [], ...n?.adaptors || []];
26
+ n?.components && B(n.components, s);
27
+ const m = w(() => S(n?.data) ? n?.data.value : n?.data);
28
+ function _() {
29
+ return (S(n?.context) ? n?.context.value : n?.context) || {};
33
30
  }
34
- function S(n) {
35
- const r = {};
36
- return Object.entries(n).forEach(([t, a]) => {
31
+ function O(e) {
32
+ const o = {};
33
+ return Object.entries(e).forEach(([t, a]) => {
37
34
  if (t === "_context") return;
38
- const A = t === "modelValue" || t.startsWith("modelValue") || t !== "value" && (t.includes("model") || t.includes("Model"));
39
- r[t] = A && _(a) ? D(a) : a;
40
- }), r;
35
+ const h = t === "modelValue" || t.startsWith("modelValue") || t !== "value" && (t.includes("model") || t.includes("Model"));
36
+ o[t] = h && S(a) ? T(a) : a;
37
+ }), o;
41
38
  }
42
- function b(n, r, t) {
43
- return typeof n == "string" ? n : typeof n == "function" ? b(n(r), r, t) : Array.isArray(n) ? n.flatMap((a) => b(a, r, t)).filter(Boolean) : n != null && n.tag ? d(n, !0, t) : n;
39
+ function j(e, o, t) {
40
+ return typeof e == "string" ? e : typeof e == "function" ? j(e(o), o, t) : Array.isArray(e) ? e.flatMap((a) => j(a, o, t)).filter(Boolean) : e?.tag ? p(e, !0, t) : e;
44
41
  }
45
- function P(n, r, t) {
46
- if (n)
47
- return typeof n == "string" ? n : Array.isArray(n) ? n.flatMap((a) => typeof a == "string" ? a : d(a, r, t)).filter(Boolean) : d(n, r, t);
42
+ function R(e, o, t) {
43
+ if (e)
44
+ return typeof e == "string" ? e : Array.isArray(e) ? e.flatMap((a) => typeof a == "string" ? a : p(a, o, t)).filter(Boolean) : p(e, o, t);
48
45
  }
49
- function d(n, r = !1, t = {}) {
46
+ function p(e, o = !1, t = {}) {
50
47
  const {
51
48
  tag: a,
52
- attrs: A = {},
53
- children: w,
54
- slots: N
55
- } = n, g = {
56
- ...y(),
49
+ attrs: h = {},
50
+ children: V,
51
+ slots: v
52
+ } = e, l = {
53
+ ..._(),
57
54
  ...t
58
55
  };
59
- let j = {
60
- ...A
56
+ let y = {
57
+ ...h
61
58
  };
62
- Object.keys(g).length > 0 && (j = {
63
- ...j,
64
- ...L({}, g)
59
+ Object.keys(l).length > 0 && (y = {
60
+ ...y,
61
+ ...F({}, l)
65
62
  });
66
- for (const m of f) {
67
- const o = m.process(n, j);
68
- if (o) {
69
- if (j = o.props, o.skip) return null;
70
- if (o.nodes)
71
- return o.nodes.map((l) => {
72
- var x;
73
- const h = ((x = l.attrs) == null ? void 0 : x._context) || {};
74
- return d(l, r, {
75
- ...g,
76
- ...h
63
+ for (const i of c) {
64
+ const r = i.process(e, y);
65
+ if (r) {
66
+ if (y = r.props, r.skip) return null;
67
+ if (r.nodes)
68
+ return r.nodes.map((d) => {
69
+ const g = d.attrs?._context || {};
70
+ return p(d, o, {
71
+ ...l,
72
+ ...g
77
73
  });
78
74
  }).filter(Boolean);
79
75
  }
80
76
  }
81
- let u = typeof a == "string" && ((m) => {
82
- let o = c.getComponentByName(m);
83
- if (o)
84
- return o;
85
- const l = W(m);
86
- if (o = c.getComponentByName(l), o)
87
- return o;
88
- const h = m.replace(/-([a-z])/g, (x, T) => T.toUpperCase()).replace(/^[a-z]/, (x) => x.toUpperCase());
89
- return o = c.getComponentByName(h), o || null;
77
+ let f = typeof a == "string" && ((i) => {
78
+ let r = s.getComponentByName(i);
79
+ if (r)
80
+ return r;
81
+ const d = G(i);
82
+ if (r = s.getComponentByName(d), r)
83
+ return r;
84
+ const g = i.replace(/-([a-z])/g, (J, $) => $.toUpperCase()).replace(/^[a-z]/, (J) => J.toUpperCase());
85
+ return r = s.getComponentByName(g), r || null;
90
86
  })(a) || a;
91
- typeof u != "string" && typeof u == "object" && (u = E(u));
92
- const O = typeof u != "string", C = S(j);
93
- if (N && O && !r) {
94
- const m = {};
95
- return Object.entries(N).forEach(([o, l]) => {
96
- m[o] = (h = {}) => b(l, h, g);
97
- }), v(u, C, m);
87
+ typeof f != "string" && typeof f == "object" && (f = A(f));
88
+ const E = typeof f != "string", x = O(y);
89
+ if (v && E && !o) {
90
+ const i = {};
91
+ return Object.entries(v).forEach(([r, d]) => {
92
+ i[r] = (g = {}) => j(d, g, l);
93
+ }), b(f, x, i);
98
94
  }
99
- const B = P(w, r, g);
100
- return O && B !== void 0 ? v(u, C, {
101
- default: () => B
102
- }) : v(u, C, B);
95
+ const C = R(V, o, l);
96
+ return E && C !== void 0 ? b(f, x, {
97
+ default: () => C
98
+ }) : b(f, x, C);
103
99
  }
104
- const V = /* @__PURE__ */ R({
100
+ const z = /* @__PURE__ */ M({
105
101
  name: "JsonSchemaRenderer",
106
102
  render() {
107
- var n;
108
- return ((n = i.value) == null ? void 0 : n.map((r) => d(r)).filter(Boolean)) || [];
103
+ return m.value?.map((e) => p(e)).filter(Boolean) || [];
109
104
  }
110
105
  });
111
- function $(n) {
112
- return /* @__PURE__ */ R({
106
+ function P(e) {
107
+ return /* @__PURE__ */ M({
113
108
  name: "DynamicJsonSchemaRenderer",
114
109
  render() {
115
- var t;
116
- const r = {
117
- ...y(),
118
- ...n.context
110
+ const o = {
111
+ ..._(),
112
+ ...e.context
119
113
  };
120
- return (t = n.data) == null ? void 0 : t.map((a) => d(a, !1, r)).filter(Boolean);
114
+ return e.data?.map((t) => p(t, !1, o)).filter(Boolean);
121
115
  }
122
116
  });
123
117
  }
124
118
  return {
125
- render: V,
126
- renderAsync: $
119
+ render: z,
120
+ renderAsync: P
127
121
  };
128
122
  }
129
123
  export {
130
- X as initJsonSchemaComponents,
131
- Y as useJsonSchema
124
+ K as initJsonSchemaComponents,
125
+ Q as useJsonSchema
132
126
  };