@silver-formily/vue 2.3.2 → 2.3.4

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 (102) hide show
  1. package/README.en.md +6 -6
  2. package/README.md +6 -6
  3. package/esm/components/ArrayField.d.ts +67 -58
  4. package/esm/components/ArrayField.mjs +23 -23
  5. package/esm/components/ArrayField.mjs.map +1 -1
  6. package/esm/components/ExpressionScope.d.ts +21 -16
  7. package/esm/components/ExpressionScope.mjs +22 -24
  8. package/esm/components/ExpressionScope.mjs.map +1 -1
  9. package/esm/components/Field.d.ts +67 -58
  10. package/esm/components/Field.mjs +23 -23
  11. package/esm/components/Field.mjs.map +1 -1
  12. package/esm/components/FormConsumer.d.ts +9 -4
  13. package/esm/components/FormConsumer.mjs +17 -18
  14. package/esm/components/FormConsumer.mjs.map +1 -1
  15. package/esm/components/FormProvider.d.ts +21 -16
  16. package/esm/components/FormProvider.mjs +26 -26
  17. package/esm/components/FormProvider.mjs.map +1 -1
  18. package/esm/components/ObjectField.d.ts +68 -58
  19. package/esm/components/ObjectField.mjs +23 -23
  20. package/esm/components/ObjectField.mjs.map +1 -1
  21. package/esm/components/ReactiveField.mjs +103 -75
  22. package/esm/components/ReactiveField.mjs.map +1 -1
  23. package/esm/components/RecursionField.d.ts +142 -22
  24. package/esm/components/RecursionField.mjs +123 -127
  25. package/esm/components/RecursionField.mjs.map +1 -1
  26. package/esm/components/SchemaField.d.ts +3041 -2919
  27. package/esm/components/SchemaField.mjs +104 -97
  28. package/esm/components/SchemaField.mjs.map +1 -1
  29. package/esm/components/VoidField.d.ts +48 -42
  30. package/esm/components/VoidField.mjs +23 -23
  31. package/esm/components/VoidField.mjs.map +1 -1
  32. package/esm/components/index.d.ts +9 -9
  33. package/esm/components/index.mjs +10 -21
  34. package/esm/hooks/index.d.ts +5 -5
  35. package/esm/hooks/index.mjs +6 -13
  36. package/esm/hooks/useAttach.mjs +21 -13
  37. package/esm/hooks/useAttach.mjs.map +1 -1
  38. package/esm/hooks/useField.d.ts +8 -3
  39. package/esm/hooks/useField.mjs +9 -8
  40. package/esm/hooks/useField.mjs.map +1 -1
  41. package/esm/hooks/useFieldSchema.d.ts +8 -1
  42. package/esm/hooks/useFieldSchema.mjs +9 -8
  43. package/esm/hooks/useFieldSchema.mjs.map +1 -1
  44. package/esm/hooks/useForm.d.ts +8 -3
  45. package/esm/hooks/useForm.mjs +9 -8
  46. package/esm/hooks/useForm.mjs.map +1 -1
  47. package/esm/hooks/useFormEffects.d.ts +7 -2
  48. package/esm/hooks/useFormEffects.mjs +18 -15
  49. package/esm/hooks/useFormEffects.mjs.map +1 -1
  50. package/esm/hooks/useInjectionCleaner.mjs +8 -7
  51. package/esm/hooks/useInjectionCleaner.mjs.map +1 -1
  52. package/esm/hooks/useParentForm.d.ts +8 -3
  53. package/esm/hooks/useParentForm.mjs +18 -11
  54. package/esm/hooks/useParentForm.mjs.map +1 -1
  55. package/esm/index.d.ts +19 -4
  56. package/esm/index.mjs +20 -42
  57. package/esm/shared/connect.d.ts +10 -5
  58. package/esm/shared/connect.mjs +69 -63
  59. package/esm/shared/connect.mjs.map +1 -1
  60. package/esm/shared/context.d.ts +15 -10
  61. package/esm/shared/context.mjs +11 -10
  62. package/esm/shared/context.mjs.map +1 -1
  63. package/esm/shared/index.d.ts +2 -2
  64. package/esm/shared/index.mjs +3 -14
  65. package/esm/types/index.d.ts +72 -68
  66. package/esm/types/validator.d.ts +39 -35
  67. package/esm/utils/fieldProps.mjs +53 -51
  68. package/esm/utils/fieldProps.mjs.map +1 -1
  69. package/esm/utils/getRawComponent.mjs +16 -12
  70. package/esm/utils/getRawComponent.mjs.map +1 -1
  71. package/esm/utils/reactiveFieldHelpers.mjs +116 -94
  72. package/esm/utils/reactiveFieldHelpers.mjs.map +1 -1
  73. package/esm/utils/recursionFieldProps.mjs +14 -13
  74. package/esm/utils/recursionFieldProps.mjs.map +1 -1
  75. package/esm/utils/resolveSchemaProps.mjs +13 -10
  76. package/esm/utils/resolveSchemaProps.mjs.map +1 -1
  77. package/esm/utils/runtimeProps.d.ts +10 -7
  78. package/esm/utils/runtimeProps.mjs +15 -15
  79. package/esm/utils/runtimeProps.mjs.map +1 -1
  80. package/esm/utils/schemaFieldProps.mjs +63 -62
  81. package/esm/utils/schemaFieldProps.mjs.map +1 -1
  82. package/package.json +13 -12
  83. package/esm/components/ReactiveField.d.ts +0 -16
  84. package/esm/components/index.mjs.map +0 -1
  85. package/esm/global.d.d.ts +0 -1
  86. package/esm/global.d.mjs +0 -2
  87. package/esm/global.d.mjs.map +0 -1
  88. package/esm/hooks/index.mjs.map +0 -1
  89. package/esm/hooks/useAttach.d.ts +0 -7
  90. package/esm/hooks/useInjectionCleaner.d.ts +0 -2
  91. package/esm/index.mjs.map +0 -1
  92. package/esm/shared/index.mjs.map +0 -1
  93. package/esm/types/index.mjs +0 -2
  94. package/esm/types/index.mjs.map +0 -1
  95. package/esm/types/validator.mjs +0 -2
  96. package/esm/types/validator.mjs.map +0 -1
  97. package/esm/utils/fieldProps.d.ts +0 -51
  98. package/esm/utils/getRawComponent.d.ts +0 -8
  99. package/esm/utils/reactiveFieldHelpers.d.ts +0 -16
  100. package/esm/utils/recursionFieldProps.d.ts +0 -67
  101. package/esm/utils/resolveSchemaProps.d.ts +0 -1
  102. package/esm/utils/schemaFieldProps.d.ts +0 -232
@@ -1,106 +1,128 @@
1
- import { createTextVNode as y, h as p, Fragment as h } from "vue";
2
- const l = () => [];
3
- function m(t) {
4
- return t ? Array.isArray(t) ? t.map((n) => String(n)) : typeof t == "object" ? Object.keys(t) : null : null;
1
+ import { Fragment, createTextVNode, h } from "vue";
2
+ //#region src/utils/reactiveFieldHelpers.ts
3
+ const EMPTY_SLOT = () => [];
4
+ function normalizePropKeys(propsDef) {
5
+ if (!propsDef) return null;
6
+ if (Array.isArray(propsDef)) return propsDef.map((key) => String(key));
7
+ if (typeof propsDef === "object") return Object.keys(propsDef);
8
+ return null;
5
9
  }
6
- function b(t) {
7
- return !t || typeof t == "string" ? null : m(t.props);
10
+ function extractComponentPropKeys(component) {
11
+ if (!component || typeof component === "string") return null;
12
+ return normalizePropKeys(component.props);
8
13
  }
9
- function j(t, n) {
10
- if (!t)
11
- return;
12
- if (!n || !n.length)
13
- return t;
14
- const r = {};
15
- if (n.forEach((e) => {
16
- e in t && (r[e] = t[e]);
17
- }), !!Object.keys(r).length)
18
- return r;
14
+ function pickScopedProps(scopedProps, propKeys) {
15
+ if (!scopedProps) return void 0;
16
+ if (!propKeys || !propKeys.length) return scopedProps;
17
+ const picked = {};
18
+ propKeys.forEach((key) => {
19
+ if (key in scopedProps) picked[key] = scopedProps[key];
20
+ });
21
+ if (!Object.keys(picked).length) return void 0;
22
+ return picked;
19
23
  }
20
- function g(t) {
21
- if (typeof t != "object" || t === null)
22
- return !1;
23
- const n = t;
24
- return typeof n.template == "string" || typeof n.render == "function" || typeof n.setup == "function";
24
+ function isVueOptions(options) {
25
+ if (typeof options !== "object" || options === null) return false;
26
+ const candidates = options;
27
+ return typeof candidates.template === "string" || typeof candidates.render === "function" || typeof candidates.setup === "function";
25
28
  }
26
- function E(t) {
27
- return typeof t != "object" || t === null ? !1 : !g(t);
29
+ function isSlotContentMap(content) {
30
+ if (typeof content !== "object" || content === null) return false;
31
+ return !isVueOptions(content);
28
32
  }
29
- function A(t) {
30
- return t ? Array.isArray(t) ? t.length === 0 ? null : t.length === 1 ? t[0] ?? null : p(h, null, t) : t : null;
33
+ function wrapFragment(childNodes) {
34
+ if (!childNodes) return null;
35
+ if (!Array.isArray(childNodes)) return childNodes;
36
+ if (childNodes.length === 0) return null;
37
+ if (childNodes.length === 1) return childNodes[0] ?? null;
38
+ return h(Fragment, null, childNodes);
31
39
  }
32
- function a(t, n) {
33
- if (n == null)
34
- return t;
35
- if (typeof n == "string")
36
- return () => [...t(), y(n)];
37
- const r = n, e = b(r);
38
- return typeof r == "function" && r.length > 1 || g(r) && typeof r.render == "function" && r.render.length > 1 || !!(e && e.length) ? (u) => [
39
- ...t(),
40
- p(r, j(u, e) ?? {})
41
- ] : () => [...t(), p(r)];
40
+ function resolveComponent(render, extra) {
41
+ if (extra === void 0 || extra === null) return render;
42
+ if (typeof extra === "string") return () => [...render(), createTextVNode(extra)];
43
+ const component = extra;
44
+ const propKeys = extractComponentPropKeys(component);
45
+ if (typeof component === "function" && component.length > 1 || isVueOptions(component) && typeof component.render === "function" && component.render.length > 1 || !!(propKeys && propKeys.length)) return (scopedProps) => [...render(), h(component, pickScopedProps(scopedProps, propKeys) ?? {})];
46
+ return () => [...render(), h(component)];
42
47
  }
43
- function P(t, n, r) {
44
- const e = Object.keys(n);
45
- if (!e.length) {
46
- if (!r)
47
- return {};
48
- if (typeof r == "string")
49
- return {
50
- default: a(l, r)
51
- };
52
- }
53
- const s = (o) => (...f) => {
54
- const i = f[0], c = typeof i == "object" && i !== null ? i : {};
55
- return n[o]?.({ field: t, form: t.form, ...c }) ?? [];
56
- }, u = {};
57
- return e.forEach((o) => {
58
- u[o] = s(o);
59
- }), E(r) ? (Object.keys(r).forEach((o) => {
60
- const f = r[o], i = u[o] ?? l;
61
- u[o] = a(i, f);
62
- }), u) : (u.default = a(u.default ?? l, r), u);
48
+ function mergeSlots(field, slots, content) {
49
+ const slotNames = Object.keys(slots);
50
+ if (!slotNames.length) {
51
+ if (!content) return {};
52
+ if (typeof content === "string") return { default: resolveComponent(EMPTY_SLOT, content) };
53
+ }
54
+ const patchSlot = (slotName) => (...originArgs) => {
55
+ const firstArg = originArgs[0];
56
+ const scopedProps = typeof firstArg === "object" && firstArg !== null ? firstArg : {};
57
+ return slots[slotName]?.({
58
+ field,
59
+ form: field.form,
60
+ ...scopedProps
61
+ }) ?? [];
62
+ };
63
+ const patchedSlots = {};
64
+ slotNames.forEach((name) => {
65
+ patchedSlots[name] = patchSlot(name);
66
+ });
67
+ if (isSlotContentMap(content)) {
68
+ Object.keys(content).forEach((key) => {
69
+ const child = content[key];
70
+ patchedSlots[key] = resolveComponent(patchedSlots[key] ?? EMPTY_SLOT, child);
71
+ });
72
+ return patchedSlots;
73
+ }
74
+ patchedSlots.default = resolveComponent(patchedSlots.default ?? EMPTY_SLOT, content);
75
+ return patchedSlots;
63
76
  }
64
- function d(t) {
65
- if (t.length <= 2)
66
- return "";
67
- const n = t.slice(2);
68
- return n.charAt(0).toLowerCase() + n.slice(1);
77
+ function normalizeOnEventName(eventKey) {
78
+ if (eventKey.length <= 2) return "";
79
+ const rawName = eventKey.slice(2);
80
+ return rawName.charAt(0).toLowerCase() + rawName.slice(1);
69
81
  }
70
- function O(t) {
71
- return t ? `on${t.charAt(0).toUpperCase()}${t.slice(1)}` : "";
82
+ function toEventPropKey(eventName) {
83
+ if (!eventName) return "";
84
+ return `on${eventName.charAt(0).toUpperCase()}${eventName.slice(1)}`;
72
85
  }
73
- function C(t = {}) {
74
- const n = { ...t }, r = {};
75
- return Object.keys(t).forEach((e) => {
76
- const s = t[e], u = e.startsWith("on"), o = e.startsWith("@");
77
- if (!u && !o)
78
- return;
79
- if (o) {
80
- const i = e.slice(1);
81
- delete n[e], typeof s == "function" && (r[i] = s);
82
- return;
83
- }
84
- const f = d(e);
85
- f && (!r[f] && typeof s == "function" && (r[f] = s), delete n[e]);
86
- }), { attrs: n, events: r };
86
+ function extractAttrsAndEvents(rawAttrs = {}) {
87
+ const normalizedAttrs = { ...rawAttrs };
88
+ const events = {};
89
+ Object.keys(rawAttrs).forEach((eventKey) => {
90
+ const value = rawAttrs[eventKey];
91
+ const onEvent = eventKey.startsWith("on");
92
+ const atEvent = eventKey.startsWith("@");
93
+ if (!onEvent && !atEvent) return;
94
+ if (atEvent) {
95
+ const eventName = eventKey.slice(1);
96
+ delete normalizedAttrs[eventKey];
97
+ if (typeof value === "function") events[eventName] = value;
98
+ return;
99
+ }
100
+ const eventName = normalizeOnEventName(eventKey);
101
+ if (!eventName) return;
102
+ if (!events[eventName] && typeof value === "function") events[eventName] = value;
103
+ delete normalizedAttrs[eventKey];
104
+ });
105
+ return {
106
+ attrs: normalizedAttrs,
107
+ events
108
+ };
87
109
  }
88
- function k(t, n) {
89
- const { style: r, class: e, ...s } = t, u = Object.keys(n).reduce((o, f) => {
90
- const i = O(f), c = n[f];
91
- return i && c && (o[i] = c), o;
92
- }, {});
93
- return {
94
- ...s,
95
- style: r,
96
- class: e,
97
- ...u
98
- };
110
+ function createVNodeProps(attrs, events) {
111
+ const { style, class: className, ...rest } = attrs;
112
+ const eventProps = Object.keys(events).reduce((acc, eventName) => {
113
+ const propKey = toEventPropKey(eventName);
114
+ const handler = events[eventName];
115
+ if (propKey && handler) acc[propKey] = handler;
116
+ return acc;
117
+ }, {});
118
+ return {
119
+ ...rest,
120
+ style,
121
+ class: className,
122
+ ...eventProps
123
+ };
99
124
  }
100
- export {
101
- k as createVNodeProps,
102
- C as extractAttrsAndEvents,
103
- P as mergeSlots,
104
- A as wrapFragment
105
- };
106
- //# sourceMappingURL=reactiveFieldHelpers.mjs.map
125
+ //#endregion
126
+ export { createVNodeProps, extractAttrsAndEvents, mergeSlots, wrapFragment };
127
+
128
+ //# sourceMappingURL=reactiveFieldHelpers.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"reactiveFieldHelpers.mjs","sources":["../../src/utils/reactiveFieldHelpers.ts"],"sourcesContent":["import type { GeneralField } from '@formily/core'\nimport type { Component, Slot, Slots, VNode } from 'vue'\nimport { createTextVNode, Fragment, h } from 'vue'\n\ninterface VueLikeOptions {\n template?: string\n render?: (...args: unknown[]) => unknown\n setup?: (...args: unknown[]) => unknown\n}\n\ntype SlotContent = string | Component | null | undefined\ntype SlotContentMap = Record<string, SlotContent>\ntype FieldContent = SlotContent | SlotContentMap | null | undefined\n\ntype EventHandler = (...args: unknown[]) => unknown\ntype EventMap = Partial<Record<string, EventHandler>>\ntype Attrs = Record<string, unknown>\n\nconst EMPTY_SLOT: Slot = () => []\n\ntype ComponentWithProps = Component & { props?: unknown }\n\nfunction normalizePropKeys(propsDef: unknown): string[] | null {\n if (!propsDef)\n return null\n if (Array.isArray(propsDef))\n return propsDef.map(key => String(key))\n if (typeof propsDef === 'object')\n return Object.keys(propsDef as Record<string, unknown>)\n return null\n}\n\nfunction extractComponentPropKeys(component: SlotContent): string[] | null {\n if (!component || typeof component === 'string')\n return null\n const target = component as ComponentWithProps\n return normalizePropKeys(target.props)\n}\n\nfunction pickScopedProps(\n scopedProps: Record<string, unknown> | undefined,\n propKeys: string[] | null | undefined,\n) {\n if (!scopedProps)\n return undefined\n if (!propKeys || !propKeys.length)\n return scopedProps\n const picked: Record<string, unknown> = {}\n propKeys.forEach((key) => {\n if (key in scopedProps)\n picked[key] = scopedProps[key]\n })\n if (!Object.keys(picked).length)\n return undefined\n return picked\n}\n\nfunction isVueOptions(options: unknown): options is VueLikeOptions {\n if (typeof options !== 'object' || options === null) {\n return false\n }\n const candidates = options as Record<string, unknown>\n return (\n typeof candidates.template === 'string'\n || typeof candidates.render === 'function'\n || typeof candidates.setup === 'function'\n )\n}\n\nfunction isSlotContentMap(content: unknown): content is SlotContentMap {\n if (typeof content !== 'object' || content === null) {\n return false\n }\n return !isVueOptions(content)\n}\n\nexport function wrapFragment(childNodes?: VNode[] | VNode | null): VNode | null {\n if (!childNodes) {\n return null\n }\n if (!Array.isArray(childNodes)) {\n return childNodes\n }\n if (childNodes.length === 0) {\n return null\n }\n if (childNodes.length === 1) {\n return childNodes[0] ?? null\n }\n return h(Fragment, null, childNodes)\n}\n\nfunction resolveComponent(render: Slot, extra?: SlotContent): Slot {\n if (extra === undefined || extra === null) {\n return render\n }\n if (typeof extra === 'string') {\n return () => [...render(), createTextVNode(extra)]\n }\n\n const component = extra\n const propKeys = extractComponentPropKeys(component)\n const needsScopedProps\n = (typeof component === 'function' && component.length > 1)\n || (isVueOptions(component)\n && typeof component.render === 'function'\n && component.render.length > 1)\n || !!(propKeys && propKeys.length)\n\n if (needsScopedProps) {\n return (scopedProps?: Record<string, unknown>) => [\n ...render(),\n h(component, pickScopedProps(scopedProps, propKeys) ?? {}),\n ]\n }\n\n return () => [...render(), h(component)]\n}\n\nexport function mergeSlots(field: GeneralField, slots: Slots, content: FieldContent): Slots {\n const slotNames = Object.keys(slots)\n if (!slotNames.length) {\n if (!content) {\n return {}\n }\n if (typeof content === 'string') {\n return {\n default: resolveComponent(EMPTY_SLOT, content),\n }\n }\n }\n const patchSlot\n = (slotName: string): Slot =>\n (...originArgs: Parameters<Slot>) => {\n const firstArg = originArgs[0]\n const scopedProps\n = typeof firstArg === 'object' && firstArg !== null\n ? (firstArg as Record<string, unknown>)\n : {}\n return slots[slotName]?.({ field, form: field.form, ...scopedProps }) ?? []\n }\n\n const patchedSlots: Record<string, Slot> = {}\n slotNames.forEach((name) => {\n patchedSlots[name] = patchSlot(name)\n })\n\n if (isSlotContentMap(content)) {\n Object.keys(content).forEach((key) => {\n const child = content[key]\n const slot = patchedSlots[key] ?? EMPTY_SLOT\n patchedSlots[key] = resolveComponent(slot, child)\n })\n return patchedSlots\n }\n patchedSlots.default = resolveComponent(patchedSlots.default ?? EMPTY_SLOT, content)\n return patchedSlots\n}\n\nfunction normalizeOnEventName(eventKey: string) {\n if (eventKey.length <= 2)\n return ''\n const rawName = eventKey.slice(2)\n return rawName.charAt(0).toLowerCase() + rawName.slice(1)\n}\n\nfunction toEventPropKey(eventName: string) {\n if (!eventName)\n return ''\n return `on${eventName.charAt(0).toUpperCase()}${eventName.slice(1)}`\n}\n\nexport function extractAttrsAndEvents(rawAttrs: Attrs = {}): { attrs: Attrs, events: EventMap } {\n const normalizedAttrs: Attrs = { ...rawAttrs }\n const events: EventMap = {}\n\n Object.keys(rawAttrs).forEach((eventKey) => {\n const value = rawAttrs[eventKey]\n const onEvent = eventKey.startsWith('on')\n const atEvent = eventKey.startsWith('@')\n if (!onEvent && !atEvent)\n return\n if (atEvent) {\n const eventName = eventKey.slice(1)\n delete normalizedAttrs[eventKey]\n if (typeof value === 'function') {\n events[eventName] = value as EventHandler\n }\n return\n }\n const eventName = normalizeOnEventName(eventKey)\n if (!eventName)\n return\n if (!events[eventName] && typeof value === 'function') {\n events[eventName] = value as EventHandler\n }\n delete normalizedAttrs[eventKey]\n })\n\n return { attrs: normalizedAttrs, events }\n}\n\nexport function createVNodeProps(attrs: Attrs, events: EventMap): Attrs {\n const { style, class: className, ...rest } = attrs\n const eventProps = Object.keys(events).reduce<Record<string, EventHandler>>((acc, eventName) => {\n const propKey = toEventPropKey(eventName)\n const handler = events[eventName]\n if (propKey && handler) {\n acc[propKey] = handler\n }\n return acc\n }, {})\n\n return {\n ...rest,\n style,\n class: className,\n ...eventProps,\n }\n}\n"],"names":["EMPTY_SLOT","normalizePropKeys","propsDef","key","extractComponentPropKeys","component","pickScopedProps","scopedProps","propKeys","picked","isVueOptions","options","candidates","isSlotContentMap","content","wrapFragment","childNodes","h","Fragment","resolveComponent","render","extra","createTextVNode","mergeSlots","field","slots","slotNames","patchSlot","slotName","originArgs","firstArg","patchedSlots","name","child","slot","normalizeOnEventName","eventKey","rawName","toEventPropKey","eventName","extractAttrsAndEvents","rawAttrs","normalizedAttrs","events","value","onEvent","atEvent","createVNodeProps","attrs","style","className","rest","eventProps","acc","propKey","handler"],"mappings":";AAkBA,MAAMA,IAAmB,MAAM,CAAA;AAI/B,SAASC,EAAkBC,GAAoC;AAC7D,SAAKA,IAED,MAAM,QAAQA,CAAQ,IACjBA,EAAS,IAAI,CAAAC,MAAO,OAAOA,CAAG,CAAC,IACpC,OAAOD,KAAa,WACf,OAAO,KAAKA,CAAmC,IACjD,OALE;AAMX;AAEA,SAASE,EAAyBC,GAAyC;AACzE,SAAI,CAACA,KAAa,OAAOA,KAAc,WAC9B,OAEFJ,EADQI,EACiB,KAAK;AACvC;AAEA,SAASC,EACPC,GACAC,GACA;AACA,MAAI,CAACD;AACH;AACF,MAAI,CAACC,KAAY,CAACA,EAAS;AACzB,WAAOD;AACT,QAAME,IAAkC,CAAA;AAKxC,MAJAD,EAAS,QAAQ,CAACL,MAAQ;AACxB,IAAIA,KAAOI,MACTE,EAAON,CAAG,IAA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,gBAAO,KAAKF,CAAQ,EAAE,QAAQ,CAACL,MAAa;AAC1C,UAAMQ,IAAQH,EAASL,CAAQ,GACzBS,IAAUT,EAAS,WAAW,IAAI,GAClCU,IAAUV,EAAS,WAAW,GAAG;AACvC,QAAI,CAACS,KAAW,CAACC;AACf;AACF,QAAIA,GAAS;AACX,YAAMP,IAAYH,EAAS,MAAM,CAAC;AAClC,aAAOM,EAAgBN,CAAQ,GAC3B,OAAOQ,KAAU,eACnBD,EAAOJ,CAAS,IAAIK;AAEtB;AAAA,IACF;AACA,UAAML,IAAYJ,EAAqBC,CAAQ;AAC/C,IAAKG,MAED,CAACI,EAAOJ,CAAS,KAAK,OAAOK,KAAU,eACzCD,EAAOJ,CAAS,IAAIK,IAEtB,OAAOF,EAAgBN,CAAQ;AAAA,EACjC,CAAC,GAEM,EAAE,OAAOM,GAAiB,QAAAC,EAAA;AACnC;AAEO,SAASI,EAAiBC,GAAcL,GAAyB;AACtE,QAAM,EAAE,OAAAM,GAAO,OAAOC,GAAW,GAAGC,MAASH,GACvCI,IAAa,OAAO,KAAKT,CAAM,EAAE,OAAqC,CAACU,GAAKd,MAAc;AAC9F,UAAMe,IAAUhB,EAAeC,CAAS,GAClCgB,IAAUZ,EAAOJ,CAAS;AAChC,WAAIe,KAAWC,MACbF,EAAIC,CAAO,IAAIC,IAEVF;AAAA,EACT,GAAG,CAAA,CAAE;AAEL,SAAO;AAAA,IACL,GAAGF;AAAA,IACH,OAAAF;AAAA,IACA,OAAOC;AAAA,IACP,GAAGE;AAAA,EAAA;AAEP;"}
1
+ {"version":3,"file":"reactiveFieldHelpers.mjs","names":[],"sources":["../../src/utils/reactiveFieldHelpers.ts"],"sourcesContent":["import type { GeneralField } from '@formily/core'\nimport type { Component, Slot, Slots, VNode } from 'vue'\nimport type { NamedSlotMap } from './slotMap'\nimport { createTextVNode, Fragment, h } from 'vue'\n\ninterface VueLikeOptions {\n template?: string\n render?: (...args: unknown[]) => unknown\n setup?: (...args: unknown[]) => unknown\n}\n\ntype SlotContent = string | Component | null | undefined\ntype SlotContentMap = NamedSlotMap<SlotContent>\ntype FieldContent = SlotContent | SlotContentMap | null | undefined\n\ntype EventHandler = (...args: unknown[]) => unknown\ntype EventMap = Partial<Record<string, EventHandler>>\ntype Attrs = Record<string, unknown>\n\nconst EMPTY_SLOT: Slot = () => []\n\ntype ComponentWithProps = Component & { props?: unknown }\n\nfunction normalizePropKeys(propsDef: unknown): string[] | null {\n if (!propsDef)\n return null\n if (Array.isArray(propsDef))\n return propsDef.map(key => String(key))\n if (typeof propsDef === 'object')\n return Object.keys(propsDef as Record<string, unknown>)\n return null\n}\n\nfunction extractComponentPropKeys(component: SlotContent): string[] | null {\n if (!component || typeof component === 'string')\n return null\n const target = component as ComponentWithProps\n return normalizePropKeys(target.props)\n}\n\nfunction pickScopedProps(\n scopedProps: Record<string, unknown> | undefined,\n propKeys: string[] | null | undefined,\n) {\n if (!scopedProps)\n return undefined\n if (!propKeys || !propKeys.length)\n return scopedProps\n const picked: Record<string, unknown> = {}\n propKeys.forEach((key) => {\n if (key in scopedProps)\n picked[key] = scopedProps[key]\n })\n if (!Object.keys(picked).length)\n return undefined\n return picked\n}\n\nfunction isVueOptions(options: unknown): options is VueLikeOptions {\n if (typeof options !== 'object' || options === null) {\n return false\n }\n const candidates = options as Record<string, unknown>\n return (\n typeof candidates.template === 'string'\n || typeof candidates.render === 'function'\n || typeof candidates.setup === 'function'\n )\n}\n\nfunction isSlotContentMap(content: unknown): content is SlotContentMap {\n if (typeof content !== 'object' || content === null) {\n return false\n }\n return !isVueOptions(content)\n}\n\nexport function wrapFragment(childNodes?: VNode[] | VNode | null): VNode | null {\n if (!childNodes) {\n return null\n }\n if (!Array.isArray(childNodes)) {\n return childNodes\n }\n if (childNodes.length === 0) {\n return null\n }\n if (childNodes.length === 1) {\n return childNodes[0] ?? null\n }\n return h(Fragment, null, childNodes)\n}\n\nfunction resolveComponent(render: Slot, extra?: SlotContent): Slot {\n if (extra === undefined || extra === null) {\n return render\n }\n if (typeof extra === 'string') {\n return () => [...render(), createTextVNode(extra)]\n }\n\n const component = extra\n const propKeys = extractComponentPropKeys(component)\n const needsScopedProps\n = (typeof component === 'function' && component.length > 1)\n || (isVueOptions(component)\n && typeof component.render === 'function'\n && component.render.length > 1)\n || !!(propKeys && propKeys.length)\n\n if (needsScopedProps) {\n return (scopedProps?: Record<string, unknown>) => [\n ...render(),\n h(component, pickScopedProps(scopedProps, propKeys) ?? {}),\n ]\n }\n\n return () => [...render(), h(component)]\n}\n\nexport function mergeSlots(field: GeneralField, slots: Slots, content: FieldContent): Slots {\n const slotNames = Object.keys(slots)\n if (!slotNames.length) {\n if (!content) {\n return {}\n }\n if (typeof content === 'string') {\n return {\n default: resolveComponent(EMPTY_SLOT, content),\n }\n }\n }\n const patchSlot\n = (slotName: string): Slot =>\n (...originArgs: Parameters<Slot>) => {\n const firstArg = originArgs[0]\n const scopedProps\n = typeof firstArg === 'object' && firstArg !== null\n ? (firstArg as Record<string, unknown>)\n : {}\n return slots[slotName]?.({ field, form: field.form, ...scopedProps }) ?? []\n }\n\n const patchedSlots: NamedSlotMap<Slot> = {}\n slotNames.forEach((name) => {\n patchedSlots[name] = patchSlot(name)\n })\n\n if (isSlotContentMap(content)) {\n Object.keys(content).forEach((key) => {\n const child = content[key]\n const slot = patchedSlots[key] ?? EMPTY_SLOT\n patchedSlots[key] = resolveComponent(slot, child)\n })\n return patchedSlots\n }\n patchedSlots.default = resolveComponent(patchedSlots.default ?? EMPTY_SLOT, content)\n return patchedSlots\n}\n\nfunction normalizeOnEventName(eventKey: string) {\n if (eventKey.length <= 2)\n return ''\n const rawName = eventKey.slice(2)\n return rawName.charAt(0).toLowerCase() + rawName.slice(1)\n}\n\nfunction toEventPropKey(eventName: string) {\n if (!eventName)\n return ''\n return `on${eventName.charAt(0).toUpperCase()}${eventName.slice(1)}`\n}\n\nexport function extractAttrsAndEvents(rawAttrs: Attrs = {}): { attrs: Attrs, events: EventMap } {\n const normalizedAttrs: Attrs = { ...rawAttrs }\n const events: EventMap = {}\n\n Object.keys(rawAttrs).forEach((eventKey) => {\n const value = rawAttrs[eventKey]\n const onEvent = eventKey.startsWith('on')\n const atEvent = eventKey.startsWith('@')\n if (!onEvent && !atEvent)\n return\n if (atEvent) {\n const eventName = eventKey.slice(1)\n delete normalizedAttrs[eventKey]\n if (typeof value === 'function') {\n events[eventName] = value as EventHandler\n }\n return\n }\n const eventName = normalizeOnEventName(eventKey)\n if (!eventName)\n return\n if (!events[eventName] && typeof value === 'function') {\n events[eventName] = value as EventHandler\n }\n delete normalizedAttrs[eventKey]\n })\n\n return { attrs: normalizedAttrs, events }\n}\n\nexport function createVNodeProps(attrs: Attrs, events: EventMap): Attrs {\n const { style, class: className, ...rest } = attrs\n const eventProps = Object.keys(events).reduce<Record<string, EventHandler>>((acc, eventName) => {\n const propKey = toEventPropKey(eventName)\n const handler = events[eventName]\n if (propKey && handler) {\n acc[propKey] = handler\n }\n return acc\n }, {})\n\n return {\n ...rest,\n style,\n class: className,\n ...eventProps,\n }\n}\n"],"mappings":";;AAmBA,MAAM,mBAAyB,EAAE;AAIjC,SAAS,kBAAkB,UAAoC;AAC7D,KAAI,CAAC,SACH,QAAO;AACT,KAAI,MAAM,QAAQ,SAAS,CACzB,QAAO,SAAS,KAAI,QAAO,OAAO,IAAI,CAAC;AACzC,KAAI,OAAO,aAAa,SACtB,QAAO,OAAO,KAAK,SAAoC;AACzD,QAAO;;AAGT,SAAS,yBAAyB,WAAyC;AACzE,KAAI,CAAC,aAAa,OAAO,cAAc,SACrC,QAAO;AAET,QAAO,kBADQ,UACiB,MAAM;;AAGxC,SAAS,gBACP,aACA,UACA;AACA,KAAI,CAAC,YACH,QAAO,KAAA;AACT,KAAI,CAAC,YAAY,CAAC,SAAS,OACzB,QAAO;CACT,MAAM,SAAkC,EAAE;AAC1C,UAAS,SAAS,QAAQ;AACxB,MAAI,OAAO,YACT,QAAO,OAAO,YAAY;GAC5B;AACF,KAAI,CAAC,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AE;AACnC,UAAO,gBAAgB;AACvB,OAAI,OAAO,UAAU,WACnB,QAAO,aAAa;AAEtB;;EAEF,MAAM,YAAY,qBAAqB,SAAS;AAChD,MAAI,CAAC,UACH;AACF,MAAI,CAAC,OAAO,cAAc,OAAO,UAAU,WACzC,QAAO,aAAa;AAEtB,SAAO,gBAAgB;GACvB;AAEF,QAAO;EAAE,OAAO;EAAiB;EAAQ;;AAG3C,SAAgB,iBAAiB,OAAc,QAAyB;CACtE,MAAM,EAAE,OAAO,OAAO,WAAW,GAAG,SAAS;CAC7C,MAAM,aAAa,OAAO,KAAK,OAAO,CAAC,QAAsC,KAAK,cAAc;EAC9F,MAAM,UAAU,eAAe,UAAU;EACzC,MAAM,UAAU,OAAO;AACvB,MAAI,WAAW,QACb,KAAI,WAAW;AAEjB,SAAO;IACN,EAAE,CAAC;AAEN,QAAO;EACL,GAAG;EACH;EACA,OAAO;EACP,GAAG;EACJ"}
@@ -1,14 +1,15 @@
1
- import { createProp as e, createBooleanProp as r } from "./runtimeProps.mjs";
2
- const t = {
3
- schema: e({ required: !0 }),
4
- name: e(),
5
- basePath: e(),
6
- onlyRenderProperties: r(),
7
- onlyRenderSelf: r(),
8
- mapProperties: e(),
9
- filterProperties: e()
1
+ import { createBooleanProp, createProp } from "./runtimeProps.mjs";
2
+ //#region src/utils/recursionFieldProps.ts
3
+ const recursionFieldProps = {
4
+ schema: createProp({ required: true }),
5
+ name: createProp(),
6
+ basePath: createProp(),
7
+ onlyRenderProperties: createBooleanProp(),
8
+ onlyRenderSelf: createBooleanProp(),
9
+ mapProperties: createProp(),
10
+ filterProperties: createProp()
10
11
  };
11
- export {
12
- t as recursionFieldProps
13
- };
14
- //# sourceMappingURL=recursionFieldProps.mjs.map
12
+ //#endregion
13
+ export { recursionFieldProps };
14
+
15
+ //# sourceMappingURL=recursionFieldProps.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"recursionFieldProps.mjs","sources":["../../src/utils/recursionFieldProps.ts"],"sourcesContent":["import type { ComponentObjectPropsOptions, ExtractPropTypes } from 'vue'\nimport type { IRecursionFieldProps } from '../types'\nimport { createBooleanProp, createProp } from './runtimeProps'\n\nexport const recursionFieldProps = {\n schema: createProp<IRecursionFieldProps['schema']>({ required: true }),\n name: createProp<IRecursionFieldProps['name']>(),\n basePath: createProp<IRecursionFieldProps['basePath']>(),\n onlyRenderProperties: createBooleanProp(),\n onlyRenderSelf: createBooleanProp(),\n mapProperties: createProp<IRecursionFieldProps['mapProperties']>(),\n filterProperties: createProp<IRecursionFieldProps['filterProperties']>(),\n} as const satisfies ComponentObjectPropsOptions<IRecursionFieldProps>\n\nexport type RecursionFieldProps = ExtractPropTypes<typeof recursionFieldProps>\n"],"names":["recursionFieldProps","createProp","createBooleanProp"],"mappings":";AAIO,MAAMA,IAAsB;AAAA,EACjC,QAAQC,EAA2C,EAAE,UAAU,IAAM;AAAA,EACrE,MAAMA,EAAA;AAAA,EACN,UAAUA,EAAA;AAAA,EACV,sBAAsBC,EAAA;AAAA,EACtB,gBAAgBA,EAAA;AAAA,EAChB,eAAeD,EAAA;AAAA,EACf,kBAAkBA,EAAA;AACpB;"}
1
+ {"version":3,"file":"recursionFieldProps.mjs","names":[],"sources":["../../src/utils/recursionFieldProps.ts"],"sourcesContent":["import type { ComponentObjectPropsOptions, ExtractPropTypes } from 'vue'\nimport type { IRecursionFieldProps } from '../types'\nimport { createBooleanProp, createProp } from './runtimeProps'\n\nexport const recursionFieldProps = {\n schema: createProp<IRecursionFieldProps['schema']>({ required: true }),\n name: createProp<IRecursionFieldProps['name']>(),\n basePath: createProp<IRecursionFieldProps['basePath']>(),\n onlyRenderProperties: createBooleanProp(),\n onlyRenderSelf: createBooleanProp(),\n mapProperties: createProp<IRecursionFieldProps['mapProperties']>(),\n filterProperties: createProp<IRecursionFieldProps['filterProperties']>(),\n} as const satisfies ComponentObjectPropsOptions<IRecursionFieldProps>\n\nexport type RecursionFieldProps = ExtractPropTypes<typeof recursionFieldProps>\n"],"mappings":";;AAIA,MAAa,sBAAsB;CACjC,QAAQ,WAA2C,EAAE,UAAU,MAAM,CAAC;CACtE,MAAM,YAA0C;CAChD,UAAU,YAA8C;CACxD,sBAAsB,mBAAmB;CACzC,gBAAgB,mBAAmB;CACnC,eAAe,YAAmD;CAClE,kBAAkB,YAAsD;CACzE"}
@@ -1,11 +1,14 @@
1
- import { paramCase as o } from "@formily/shared";
2
- function s(r) {
3
- const n = {};
4
- return Object.keys(r).forEach((e) => {
5
- e.indexOf("x") === 0 && !e.includes("x-") ? n[o(e)] = r[e] : n[e] = r[e];
6
- }), n;
1
+ import { paramCase } from "@formily/shared";
2
+ //#region src/utils/resolveSchemaProps.ts
3
+ function resolveSchemaProps(props) {
4
+ const newProps = {};
5
+ Object.keys(props).forEach((key) => {
6
+ if (key.indexOf("x") === 0 && !key.includes("x-")) newProps[paramCase(key)] = props[key];
7
+ else newProps[key] = props[key];
8
+ });
9
+ return newProps;
7
10
  }
8
- export {
9
- s as resolveSchemaProps
10
- };
11
- //# sourceMappingURL=resolveSchemaProps.mjs.map
11
+ //#endregion
12
+ export { resolveSchemaProps };
13
+
14
+ //# sourceMappingURL=resolveSchemaProps.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"resolveSchemaProps.mjs","sources":["../../src/utils/resolveSchemaProps.ts"],"sourcesContent":["import { paramCase } from '@formily/shared'\n\nexport function resolveSchemaProps(props: Record<string, unknown>) {\n const newProps = {} as Record<string, unknown>\n Object.keys(props).forEach((key) => {\n if (key.indexOf('x') === 0 && !key.includes('x-')) {\n newProps[paramCase(key)] = props[key]\n }\n else {\n newProps[key] = props[key]\n }\n })\n return newProps\n}\n"],"names":["resolveSchemaProps","props","newProps","key","paramCase"],"mappings":";AAEO,SAASA,EAAmBC,GAAgC;AACjE,QAAMC,IAAW,CAAA;AACjB,gBAAO,KAAKD,CAAK,EAAE,QAAQ,CAACE,MAAQ;AAClC,IAAIA,EAAI,QAAQ,GAAG,MAAM,KAAK,CAACA,EAAI,SAAS,IAAI,IAC9CD,EAASE,EAAUD,CAAG,CAAC,IAAIF,EAAME,CAAG,IAGpCD,EAASC,CAAG,IAAIF,EAAME,CAAG;AAAA,EAE7B,CAAC,GACMD;AACT;"}
1
+ {"version":3,"file":"resolveSchemaProps.mjs","names":[],"sources":["../../src/utils/resolveSchemaProps.ts"],"sourcesContent":["import { paramCase } from '@formily/shared'\n\nexport function resolveSchemaProps(props: Record<string, unknown>) {\n const newProps = {} as Record<string, unknown>\n Object.keys(props).forEach((key) => {\n if (key.indexOf('x') === 0 && !key.includes('x-')) {\n newProps[paramCase(key)] = props[key]\n }\n else {\n newProps[key] = props[key]\n }\n })\n return newProps\n}\n"],"mappings":";;AAEA,SAAgB,mBAAmB,OAAgC;CACjE,MAAM,WAAW,EAAE;AACnB,QAAO,KAAK,MAAM,CAAC,SAAS,QAAQ;AAClC,MAAI,IAAI,QAAQ,IAAI,KAAK,KAAK,CAAC,IAAI,SAAS,KAAK,CAC/C,UAAS,UAAU,IAAI,IAAI,MAAM;MAGjC,UAAS,OAAO,MAAM;GAExB;AACF,QAAO"}
@@ -1,8 +1,11 @@
1
- import { PropType } from 'vue';
2
- export interface RuntimeProp<T> {
3
- type: PropType<T> | null;
4
- required?: boolean;
5
- default?: T | (() => T);
1
+ import { PropType } from "vue";
2
+
3
+ //#region src/utils/runtimeProps.d.ts
4
+ interface RuntimeProp<T> {
5
+ type: PropType<T> | null;
6
+ required?: boolean;
7
+ default?: T | (() => T);
6
8
  }
7
- export declare function createProp<T>(options?: Partial<RuntimeProp<T>>): RuntimeProp<T>;
8
- export declare function createBooleanProp(): RuntimeProp<boolean>;
9
+ //#endregion
10
+ export { RuntimeProp };
11
+ //# sourceMappingURL=runtimeProps.d.ts.map
@@ -1,17 +1,17 @@
1
- function t(e = {}) {
2
- return {
3
- type: e.type ?? null,
4
- ...e
5
- };
1
+ //#region src/utils/runtimeProps.ts
2
+ function createProp(options = {}) {
3
+ return {
4
+ type: options.type ?? null,
5
+ ...options
6
+ };
6
7
  }
7
- function r() {
8
- return t({
9
- type: Boolean,
10
- default: void 0
11
- });
8
+ function createBooleanProp() {
9
+ return createProp({
10
+ type: Boolean,
11
+ default: void 0
12
+ });
12
13
  }
13
- export {
14
- r as createBooleanProp,
15
- t as createProp
16
- };
17
- //# sourceMappingURL=runtimeProps.mjs.map
14
+ //#endregion
15
+ export { createBooleanProp, createProp };
16
+
17
+ //# sourceMappingURL=runtimeProps.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"runtimeProps.mjs","sources":["../../src/utils/runtimeProps.ts"],"sourcesContent":["import type { PropType } from 'vue'\n\nexport interface RuntimeProp<T> {\n type: PropType<T> | null\n required?: boolean\n default?: T | (() => T)\n}\n\nexport function createProp<T>(options: Partial<RuntimeProp<T>> = {}): RuntimeProp<T> {\n return {\n type: options.type ?? (null as unknown as PropType<T>),\n ...options,\n }\n}\n\nexport function createBooleanProp() {\n return createProp<boolean>({\n type: Boolean as PropType<boolean>,\n default: undefined,\n })\n}\n"],"names":["createProp","options","createBooleanProp"],"mappings":"AAQO,SAASA,EAAcC,IAAmC,IAAoB;AACnF,SAAO;AAAA,IACL,MAAMA,EAAQ,QAAS;AAAA,IACvB,GAAGA;AAAA,EAAA;AAEP;AAEO,SAASC,IAAoB;AAClC,SAAOF,EAAoB;AAAA,IACzB,MAAM;AAAA,IACN,SAAS;AAAA,EAAA,CACV;AACH;"}
1
+ {"version":3,"file":"runtimeProps.mjs","names":[],"sources":["../../src/utils/runtimeProps.ts"],"sourcesContent":["import type { PropType } from 'vue'\n\nexport interface RuntimeProp<T> {\n type: PropType<T> | null\n required?: boolean\n default?: T | (() => T)\n}\n\nexport function createProp<T>(options: Partial<RuntimeProp<T>> = {}): RuntimeProp<T> {\n return {\n type: options.type ?? (null as unknown as PropType<T>),\n ...options,\n }\n}\n\nexport function createBooleanProp() {\n return createProp<boolean>({\n type: Boolean as PropType<boolean>,\n default: undefined,\n })\n}\n"],"mappings":";AAQA,SAAgB,WAAc,UAAmC,EAAE,EAAkB;AACnF,QAAO;EACL,MAAM,QAAQ,QAAS;EACvB,GAAG;EACJ;;AAGH,SAAgB,oBAAoB;AAClC,QAAO,WAAoB;EACzB,MAAM;EACN,SAAS,KAAA;EACV,CAAC"}
@@ -1,64 +1,65 @@
1
- import { createProp as e, createBooleanProp as t } from "./runtimeProps.mjs";
2
- const o = {
3
- schema: e(),
4
- scope: e(),
5
- components: e(),
6
- name: e(),
7
- basePath: e(),
8
- onlyRenderProperties: t(),
9
- onlyRenderSelf: t(),
10
- mapProperties: e(),
11
- filterProperties: e()
12
- }, i = {
13
- version: e(),
14
- name: e(),
15
- title: e(),
16
- description: e(),
17
- default: e(),
18
- readOnly: t(),
19
- writeOnly: t(),
20
- enum: e(),
21
- const: e(),
22
- multipleOf: e(),
23
- maximum: e(),
24
- exclusiveMaximum: e(),
25
- minimum: e(),
26
- exclusiveMinimum: e(),
27
- maxLength: e(),
28
- minLength: e(),
29
- pattern: e(),
30
- maxItems: e(),
31
- minItems: e(),
32
- uniqueItems: t(),
33
- maxProperties: e(),
34
- minProperties: e(),
35
- required: e(),
36
- format: e(),
37
- properties: e(),
38
- items: e(),
39
- additionalItems: e(),
40
- patternProperties: e(),
41
- additionalProperties: e(),
42
- "x-index": e(),
43
- "x-pattern": e(),
44
- "x-display": e(),
45
- "x-validator": e(),
46
- "x-decorator": e(),
47
- "x-decorator-props": e(),
48
- "x-decorator-content": e(),
49
- "x-component": e(),
50
- "x-component-props": e(),
51
- "x-reactions": e(),
52
- "x-content": e(),
53
- "x-visible": t(),
54
- "x-hidden": t(),
55
- "x-disabled": t(),
56
- "x-editable": t(),
57
- "x-read-only": t(),
58
- "x-read-pretty": t()
1
+ import { createBooleanProp, createProp } from "./runtimeProps.mjs";
2
+ //#region src/utils/schemaFieldProps.ts
3
+ const schemaFieldProps = {
4
+ schema: createProp(),
5
+ scope: createProp(),
6
+ components: createProp(),
7
+ name: createProp(),
8
+ basePath: createProp(),
9
+ onlyRenderProperties: createBooleanProp(),
10
+ onlyRenderSelf: createBooleanProp(),
11
+ mapProperties: createProp(),
12
+ filterProperties: createProp()
59
13
  };
60
- export {
61
- i as markupSchemaProps,
62
- o as schemaFieldProps
14
+ const markupSchemaProps = {
15
+ "version": createProp(),
16
+ "name": createProp(),
17
+ "title": createProp(),
18
+ "description": createProp(),
19
+ "default": createProp(),
20
+ "readOnly": createBooleanProp(),
21
+ "writeOnly": createBooleanProp(),
22
+ "enum": createProp(),
23
+ "const": createProp(),
24
+ "multipleOf": createProp(),
25
+ "maximum": createProp(),
26
+ "exclusiveMaximum": createProp(),
27
+ "minimum": createProp(),
28
+ "exclusiveMinimum": createProp(),
29
+ "maxLength": createProp(),
30
+ "minLength": createProp(),
31
+ "pattern": createProp(),
32
+ "maxItems": createProp(),
33
+ "minItems": createProp(),
34
+ "uniqueItems": createBooleanProp(),
35
+ "maxProperties": createProp(),
36
+ "minProperties": createProp(),
37
+ "required": createProp(),
38
+ "format": createProp(),
39
+ "properties": createProp(),
40
+ "items": createProp(),
41
+ "additionalItems": createProp(),
42
+ "patternProperties": createProp(),
43
+ "additionalProperties": createProp(),
44
+ "x-index": createProp(),
45
+ "x-pattern": createProp(),
46
+ "x-display": createProp(),
47
+ "x-validator": createProp(),
48
+ "x-decorator": createProp(),
49
+ "x-decorator-props": createProp(),
50
+ "x-decorator-content": createProp(),
51
+ "x-component": createProp(),
52
+ "x-component-props": createProp(),
53
+ "x-reactions": createProp(),
54
+ "x-content": createProp(),
55
+ "x-visible": createBooleanProp(),
56
+ "x-hidden": createBooleanProp(),
57
+ "x-disabled": createBooleanProp(),
58
+ "x-editable": createBooleanProp(),
59
+ "x-read-only": createBooleanProp(),
60
+ "x-read-pretty": createBooleanProp()
63
61
  };
64
- //# sourceMappingURL=schemaFieldProps.mjs.map
62
+ //#endregion
63
+ export { markupSchemaProps, schemaFieldProps };
64
+
65
+ //# sourceMappingURL=schemaFieldProps.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"schemaFieldProps.mjs","sources":["../../src/utils/schemaFieldProps.ts"],"sourcesContent":["import type { ComponentObjectPropsOptions, ExtractPropTypes } from 'vue'\nimport type {\n ISchemaFieldProps,\n ISchemaMarkupFieldProps,\n SchemaMarkupValidator,\n} from '../types'\nimport { createBooleanProp, createProp } from './runtimeProps'\n\nexport const schemaFieldProps = {\n schema: createProp<ISchemaFieldProps['schema']>(),\n scope: createProp<ISchemaFieldProps['scope']>(),\n components: createProp<ISchemaFieldProps['components']>(),\n name: createProp<ISchemaFieldProps['name']>(),\n basePath: createProp<ISchemaFieldProps['basePath']>(),\n onlyRenderProperties: createBooleanProp(),\n onlyRenderSelf: createBooleanProp(),\n mapProperties: createProp<ISchemaFieldProps['mapProperties']>(),\n filterProperties: createProp<ISchemaFieldProps['filterProperties']>(),\n} as const satisfies ComponentObjectPropsOptions<ISchemaFieldProps>\n\nexport const markupSchemaProps = {\n 'version': createProp<ISchemaMarkupFieldProps['version']>(),\n 'name': createProp<ISchemaMarkupFieldProps['name']>(),\n 'title': createProp<ISchemaMarkupFieldProps['title']>(),\n 'description': createProp<ISchemaMarkupFieldProps['description']>(),\n 'default': createProp<ISchemaMarkupFieldProps['default']>(),\n 'readOnly': createBooleanProp(),\n 'writeOnly': createBooleanProp(),\n 'enum': createProp<ISchemaMarkupFieldProps['enum']>(),\n 'const': createProp<ISchemaMarkupFieldProps['const']>(),\n 'multipleOf': createProp<ISchemaMarkupFieldProps['multipleOf']>(),\n 'maximum': createProp<ISchemaMarkupFieldProps['maximum']>(),\n 'exclusiveMaximum': createProp<ISchemaMarkupFieldProps['exclusiveMaximum']>(),\n 'minimum': createProp<ISchemaMarkupFieldProps['minimum']>(),\n 'exclusiveMinimum': createProp<ISchemaMarkupFieldProps['exclusiveMinimum']>(),\n 'maxLength': createProp<ISchemaMarkupFieldProps['maxLength']>(),\n 'minLength': createProp<ISchemaMarkupFieldProps['minLength']>(),\n 'pattern': createProp<ISchemaMarkupFieldProps['pattern']>(),\n 'maxItems': createProp<ISchemaMarkupFieldProps['maxItems']>(),\n 'minItems': createProp<ISchemaMarkupFieldProps['minItems']>(),\n 'uniqueItems': createBooleanProp(),\n 'maxProperties': createProp<ISchemaMarkupFieldProps['maxProperties']>(),\n 'minProperties': createProp<ISchemaMarkupFieldProps['minProperties']>(),\n 'required': createProp<ISchemaMarkupFieldProps['required']>(),\n 'format': createProp<ISchemaMarkupFieldProps['format']>(),\n 'properties': createProp<ISchemaMarkupFieldProps['properties']>(),\n 'items': createProp<ISchemaMarkupFieldProps['items']>(),\n 'additionalItems': createProp<ISchemaMarkupFieldProps['additionalItems']>(),\n 'patternProperties': createProp<ISchemaMarkupFieldProps['patternProperties']>(),\n 'additionalProperties': createProp<ISchemaMarkupFieldProps['additionalProperties']>(),\n 'x-index': createProp<ISchemaMarkupFieldProps['x-index']>(),\n 'x-pattern': createProp<ISchemaMarkupFieldProps['x-pattern']>(),\n 'x-display': createProp<ISchemaMarkupFieldProps['x-display']>(),\n 'x-validator': createProp<SchemaMarkupValidator>(),\n 'x-decorator': createProp<ISchemaMarkupFieldProps['x-decorator']>(),\n 'x-decorator-props': createProp<ISchemaMarkupFieldProps['x-decorator-props']>(),\n 'x-decorator-content': createProp<ISchemaMarkupFieldProps['x-decorator-content']>(),\n 'x-component': createProp<ISchemaMarkupFieldProps['x-component']>(),\n 'x-component-props': createProp<ISchemaMarkupFieldProps['x-component-props']>(),\n 'x-reactions': createProp<ISchemaMarkupFieldProps['x-reactions']>(),\n 'x-content': createProp<ISchemaMarkupFieldProps['x-content']>(),\n 'x-visible': createBooleanProp(),\n 'x-hidden': createBooleanProp(),\n 'x-disabled': createBooleanProp(),\n 'x-editable': createBooleanProp(),\n 'x-read-only': createBooleanProp(),\n 'x-read-pretty': createBooleanProp(),\n} as const satisfies ComponentObjectPropsOptions<ISchemaMarkupFieldProps>\n\nexport type SchemaFieldProps = ExtractPropTypes<typeof schemaFieldProps>\nexport type MarkupSchemaProps = ExtractPropTypes<typeof markupSchemaProps>\n"],"names":["schemaFieldPro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AAA,EACf,qBAAqBA,EAAA;AAAA,EACrB,eAAeA,EAAA;AAAA,EACf,aAAaA,EAAA;AAAA,EACb,aAAaC,EAAA;AAAA,EACb,YAAYA,EAAA;AAAA,EACZ,cAAcA,EAAA;AAAA,EACd,cAAcA,EAAA;AAAA,EACd,eAAeA,EAAA;AAAA,EACf,iBAAiBA,EAAA;AACnB;"}
1
+ {"version":3,"file":"schemaFieldProps.mjs","names":[],"sources":["../../src/utils/schemaFieldProps.ts"],"sourcesContent":["import type { ComponentObjectPropsOptions, ExtractPropTypes } from 'vue'\nimport type {\n ISchemaFieldProps,\n ISchemaMarkupFieldProps,\n SchemaMarkupValidator,\n} from '../types'\nimport { createBooleanProp, createProp } from './runtimeProps'\n\nexport const schemaFieldProps = {\n schema: createProp<ISchemaFieldProps['schema']>(),\n scope: createProp<ISchemaFieldProps['scope']>(),\n components: createProp<ISchemaFieldProps['components']>(),\n name: createProp<ISchemaFieldProps['name']>(),\n basePath: createProp<ISchemaFieldProps['basePath']>(),\n onlyRenderProperties: createBooleanProp(),\n onlyRenderSelf: createBooleanProp(),\n mapProperties: createProp<ISchemaFieldProps['mapProperties']>(),\n filterProperties: createProp<ISchemaFieldProps['filterProperties']>(),\n} as const satisfies ComponentObjectPropsOptions<ISchemaFieldProps>\n\nexport const markupSchemaProps = {\n 'version': createProp<ISchemaMarkupFieldProps['version']>(),\n 'name': createProp<ISchemaMarkupFieldProps['name']>(),\n 'title': createProp<ISchemaMarkupFieldProps['title']>(),\n 'description': createProp<ISchemaMarkupFieldProps['description']>(),\n 'default': createProp<ISchemaMarkupFieldProps['default']>(),\n 'readOnly': createBooleanProp(),\n 'writeOnly': createBooleanProp(),\n 'enum': createProp<ISchemaMarkupFieldProps['enum']>(),\n 'const': createProp<ISchemaMarkupFieldProps['const']>(),\n 'multipleOf': createProp<ISchemaMarkupFieldProps['multipleOf']>(),\n 'maximum': createProp<ISchemaMarkupFieldProps['maximum']>(),\n 'exclusiveMaximum': createProp<ISchemaMarkupFieldProps['exclusiveMaximum']>(),\n 'minimum': createProp<ISchemaMarkupFieldProps['minimum']>(),\n 'exclusiveMinimum': createProp<ISchemaMarkupFieldProps['exclusiveMinimum']>(),\n 'maxLength': createProp<ISchemaMarkupFieldProps['maxLength']>(),\n 'minLength': createProp<ISchemaMarkupFieldProps['minLength']>(),\n 'pattern': createProp<ISchemaMarkupFieldProps['pattern']>(),\n 'maxItems': createProp<ISchemaMarkupFieldProps['maxItems']>(),\n 'minItems': createProp<ISchemaMarkupFieldProps['minItems']>(),\n 'uniqueItems': createBooleanProp(),\n 'maxProperties': createProp<ISchemaMarkupFieldProps['maxProperties']>(),\n 'minProperties': createProp<ISchemaMarkupFieldProps['minProperties']>(),\n 'required': createProp<ISchemaMarkupFieldProps['required']>(),\n 'format': createProp<ISchemaMarkupFieldProps['format']>(),\n 'properties': createProp<ISchemaMarkupFieldProps['properties']>(),\n 'items': createProp<ISchemaMarkupFieldProps['items']>(),\n 'additionalItems': createProp<ISchemaMarkupFieldProps['additionalItems']>(),\n 'patternProperties': createProp<ISchemaMarkupFieldProps['patternProperties']>(),\n 'additionalProperties': createProp<ISchemaMarkupFieldProps['additionalProperties']>(),\n 'x-index': createProp<ISchemaMarkupFieldProps['x-index']>(),\n 'x-pattern': createProp<ISchemaMarkupFieldProps['x-pattern']>(),\n 'x-display': createProp<ISchemaMarkupFieldProps['x-display']>(),\n 'x-validator': createProp<SchemaMarkupValidator>(),\n 'x-decorator': createProp<ISchemaMarkupFieldProps['x-decorator']>(),\n 'x-decorator-props': createProp<ISchemaMarkupFieldProps['x-decorator-props']>(),\n 'x-decorator-content': createProp<ISchemaMarkupFieldProps['x-decorator-content']>(),\n 'x-component': createProp<ISchemaMarkupFieldProps['x-component']>(),\n 'x-component-props': createProp<ISchemaMarkupFieldProps['x-component-props']>(),\n 'x-reactions': createProp<ISchemaMarkupFieldProps['x-reactions']>(),\n 'x-content': createProp<ISchemaMarkupFieldProps['x-content']>(),\n 'x-visible': createBooleanProp(),\n 'x-hidden': createBooleanProp(),\n 'x-disabled': createBooleanProp(),\n 'x-editable': createBooleanProp(),\n 'x-read-only': createBooleanProp(),\n 'x-read-pretty': createBooleanProp(),\n} as const satisfies ComponentObjectPropsOptions<ISchemaMarkupFieldProps>\n\nexport type SchemaFieldProps = ExtractPropTypes<typeof schemaFieldProps>\nexport type MarkupSchemaProps = ExtractPropTypes<typeof markupSchemaProps>\n"],"mappings":";;AAQA,MAAa,mBAAmB;CAC9B,QAAQ,YAAyC;CACjD,OAAO,YAAwC;CAC/C,YAAY,YAA6C;CACzD,MAAM,YAAuC;CAC7C,UAAU,YAA2C;CACrD,sBAAsB,mBAAmB;CACzC,gBAAgB,mBAAmB;CACnC,eAAe,YAAgD;CAC/D,kBAAkB,YAAmD;CACtE;AAED,MAAa,oBAAoB;CAC/B,WAAW,YAAgD;CAC3D,QAAQ,YAA6C;CACrD,SAAS,YAA8C;CACvD,eAAe,YAAoD;CACnE,WAAW,YAAgD;CAC3D,YAAY,mBAAmB;CAC/B,aAAa,mBAAmB;CAChC,QAAQ,YAA6C;CACrD,SAAS,YAA8C;CACvD,cAAc,YAAmD;CACjE,WAAW,YAAgD;CAC3D,oBAAoB,YAAyD;CAC7E,WAAW,YAAgD;CAC3D,oBAAoB,YAAyD;CAC7E,aAAa,YAAkD;CAC/D,aAAa,YAAkD;CAC/D,WAAW,YAAgD;CAC3D,YAAY,YAAiD;CAC7D,YAAY,YAAiD;CAC7D,eAAe,mBAAmB;CAClC,iBAAiB,YAAsD;CACvE,iBAAiB,YAAsD;CACvE,YAAY,YAAiD;CAC7D,UAAU,YAA+C;CACzD,cAAc,YAAmD;CACjE,SAAS,YAA8C;CACvD,mBAAmB,YAAwD;CAC3E,qBAAqB,YAA0D;CAC/E,wBAAwB,YAA6D;CACrF,WAAW,YAAgD;CAC3D,aAAa,YAAkD;CAC/D,aAAa,YAAkD;CAC/D,eAAe,YAAmC;CAClD,eAAe,YAAoD;CACnE,qBAAqB,YAA0D;CAC/E,uB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