@silver-formily/vue 2.3.3 → 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.
- package/esm/components/ArrayField.d.ts +67 -60
- package/esm/components/ArrayField.mjs +23 -23
- package/esm/components/ArrayField.mjs.map +1 -1
- package/esm/components/ExpressionScope.d.ts +21 -16
- package/esm/components/ExpressionScope.mjs +22 -24
- package/esm/components/ExpressionScope.mjs.map +1 -1
- package/esm/components/Field.d.ts +67 -60
- package/esm/components/Field.mjs +23 -23
- package/esm/components/Field.mjs.map +1 -1
- package/esm/components/FormConsumer.d.ts +9 -4
- package/esm/components/FormConsumer.mjs +17 -18
- package/esm/components/FormConsumer.mjs.map +1 -1
- package/esm/components/FormProvider.d.ts +21 -16
- package/esm/components/FormProvider.mjs +26 -26
- package/esm/components/FormProvider.mjs.map +1 -1
- package/esm/components/ObjectField.d.ts +68 -60
- package/esm/components/ObjectField.mjs +23 -23
- package/esm/components/ObjectField.mjs.map +1 -1
- package/esm/components/ReactiveField.mjs +103 -83
- package/esm/components/ReactiveField.mjs.map +1 -1
- package/esm/components/RecursionField.d.ts +142 -134
- package/esm/components/RecursionField.mjs +123 -125
- package/esm/components/RecursionField.mjs.map +1 -1
- package/esm/components/SchemaField.d.ts +3041 -3030
- package/esm/components/SchemaField.mjs +104 -99
- package/esm/components/SchemaField.mjs.map +1 -1
- package/esm/components/VoidField.d.ts +48 -42
- package/esm/components/VoidField.mjs +23 -23
- package/esm/components/VoidField.mjs.map +1 -1
- package/esm/components/index.d.ts +9 -9
- package/esm/components/index.mjs +10 -21
- package/esm/hooks/index.d.ts +5 -5
- package/esm/hooks/index.mjs +6 -13
- package/esm/hooks/useAttach.mjs +21 -13
- package/esm/hooks/useAttach.mjs.map +1 -1
- package/esm/hooks/useField.d.ts +8 -3
- package/esm/hooks/useField.mjs +9 -8
- package/esm/hooks/useField.mjs.map +1 -1
- package/esm/hooks/useFieldSchema.d.ts +8 -1
- package/esm/hooks/useFieldSchema.mjs +9 -8
- package/esm/hooks/useFieldSchema.mjs.map +1 -1
- package/esm/hooks/useForm.d.ts +8 -3
- package/esm/hooks/useForm.mjs +9 -8
- package/esm/hooks/useForm.mjs.map +1 -1
- package/esm/hooks/useFormEffects.d.ts +7 -2
- package/esm/hooks/useFormEffects.mjs +18 -15
- package/esm/hooks/useFormEffects.mjs.map +1 -1
- package/esm/hooks/useInjectionCleaner.mjs +8 -7
- package/esm/hooks/useInjectionCleaner.mjs.map +1 -1
- package/esm/hooks/useParentForm.d.ts +8 -3
- package/esm/hooks/useParentForm.mjs +18 -11
- package/esm/hooks/useParentForm.mjs.map +1 -1
- package/esm/index.d.ts +19 -4
- package/esm/index.mjs +20 -42
- package/esm/shared/connect.d.ts +10 -5
- package/esm/shared/connect.mjs +69 -63
- package/esm/shared/connect.mjs.map +1 -1
- package/esm/shared/context.d.ts +15 -10
- package/esm/shared/context.mjs +11 -10
- package/esm/shared/context.mjs.map +1 -1
- package/esm/shared/index.d.ts +2 -2
- package/esm/shared/index.mjs +3 -14
- package/esm/types/index.d.ts +72 -70
- package/esm/types/validator.d.ts +39 -35
- package/esm/utils/fieldProps.mjs +53 -52
- package/esm/utils/fieldProps.mjs.map +1 -1
- package/esm/utils/getRawComponent.mjs +16 -12
- package/esm/utils/getRawComponent.mjs.map +1 -1
- package/esm/utils/reactiveFieldHelpers.mjs +116 -94
- package/esm/utils/reactiveFieldHelpers.mjs.map +1 -1
- package/esm/utils/recursionFieldProps.mjs +14 -13
- package/esm/utils/recursionFieldProps.mjs.map +1 -1
- package/esm/utils/resolveSchemaProps.mjs +13 -10
- package/esm/utils/resolveSchemaProps.mjs.map +1 -1
- package/esm/utils/runtimeProps.d.ts +10 -7
- package/esm/utils/runtimeProps.mjs +15 -15
- package/esm/utils/runtimeProps.mjs.map +1 -1
- package/esm/utils/schemaFieldProps.mjs +63 -62
- package/esm/utils/schemaFieldProps.mjs.map +1 -1
- package/package.json +13 -10
- package/esm/components/ReactiveField.d.ts +0 -16
- package/esm/components/index.mjs.map +0 -1
- package/esm/global.d.d.ts +0 -1
- package/esm/global.d.mjs +0 -2
- package/esm/global.d.mjs.map +0 -1
- package/esm/hooks/index.mjs.map +0 -1
- package/esm/hooks/useAttach.d.ts +0 -7
- package/esm/hooks/useInjectionCleaner.d.ts +0 -2
- package/esm/index.mjs.map +0 -1
- package/esm/shared/index.mjs.map +0 -1
- package/esm/types/index.mjs +0 -2
- package/esm/types/index.mjs.map +0 -1
- package/esm/types/validator.mjs +0 -2
- package/esm/types/validator.mjs.map +0 -1
- package/esm/utils/fieldProps.d.ts +0 -52
- package/esm/utils/getRawComponent.d.ts +0 -8
- package/esm/utils/reactiveFieldHelpers.d.ts +0 -17
- package/esm/utils/recursionFieldProps.d.ts +0 -67
- package/esm/utils/resolveSchemaProps.d.ts +0 -1
- package/esm/utils/schemaFieldProps.d.ts +0 -232
- package/esm/utils/slotMap.d.ts +0 -1
- package/esm/utils/slotMap.mjs +0 -2
- package/esm/utils/slotMap.mjs.map +0 -1
|
@@ -1,101 +1,106 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import "
|
|
5
|
-
import "
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
function P() {
|
|
14
|
-
return `NO_NAME_FIELD_$${b.nonameId++}`;
|
|
1
|
+
import { SchemaExpressionScopeSymbol, SchemaMarkupSymbol, SchemaOptionsSymbol } from "../shared/context.mjs";
|
|
2
|
+
import "../shared/index.mjs";
|
|
3
|
+
import RecursionField from "./RecursionField.mjs";
|
|
4
|
+
import { resolveSchemaProps } from "../utils/resolveSchemaProps.mjs";
|
|
5
|
+
import { markupSchemaProps, schemaFieldProps } from "../utils/schemaFieldProps.mjs";
|
|
6
|
+
import { Fragment, computed, defineComponent, h, inject, provide, shallowRef, watch } from "vue";
|
|
7
|
+
import { lazyMerge } from "@formily/shared";
|
|
8
|
+
import { Schema } from "@formily/json-schema";
|
|
9
|
+
//#region src/components/SchemaField.ts
|
|
10
|
+
const env = { nonameId: 0 };
|
|
11
|
+
function getRandomName() {
|
|
12
|
+
return `NO_NAME_FIELD_$${env.nonameId++}`;
|
|
15
13
|
}
|
|
16
|
-
function
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
14
|
+
function createSchemaField(options = {}) {
|
|
15
|
+
const SchemaField = defineComponent({
|
|
16
|
+
name: "SchemaField",
|
|
17
|
+
inheritAttrs: false,
|
|
18
|
+
props: schemaFieldProps,
|
|
19
|
+
setup(props, { slots }) {
|
|
20
|
+
const schemaRef = computed(() => Schema.isSchemaInstance(props.schema) ? props.schema : new Schema({
|
|
21
|
+
type: "object",
|
|
22
|
+
...props.schema
|
|
23
|
+
}));
|
|
24
|
+
const scopeRef = computed(() => lazyMerge({}, options.scope ?? {}, props.scope ?? {}));
|
|
25
|
+
const optionsRef = computed(() => ({
|
|
26
|
+
...options,
|
|
27
|
+
components: {
|
|
28
|
+
...options.components,
|
|
29
|
+
...props.components
|
|
30
|
+
}
|
|
31
|
+
}));
|
|
32
|
+
provide(SchemaMarkupSymbol, schemaRef);
|
|
33
|
+
provide(SchemaOptionsSymbol, optionsRef);
|
|
34
|
+
provide(SchemaExpressionScopeSymbol, scopeRef);
|
|
35
|
+
return () => {
|
|
36
|
+
env.nonameId = 0;
|
|
37
|
+
const normalizedSlots = slots.default?.() ?? [];
|
|
38
|
+
const recursionNode = h(RecursionField, {
|
|
39
|
+
...props,
|
|
40
|
+
schema: schemaRef.value
|
|
41
|
+
});
|
|
42
|
+
return h(Fragment, null, [...normalizedSlots, recursionNode]);
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
const MarkupField = defineComponent({
|
|
47
|
+
name: "MarkupField",
|
|
48
|
+
props: {
|
|
49
|
+
type: String,
|
|
50
|
+
...markupSchemaProps
|
|
51
|
+
},
|
|
52
|
+
setup(props, { slots }) {
|
|
53
|
+
const parentRef = inject(SchemaMarkupSymbol, null);
|
|
54
|
+
let render = () => null;
|
|
55
|
+
if (parentRef?.value) {
|
|
56
|
+
const name = props.name || getRandomName();
|
|
57
|
+
const appendArraySchema = (schema) => {
|
|
58
|
+
if (parentRef.value.items) return parentRef.value.addProperty(name, schema);
|
|
59
|
+
else return parentRef.value.setItems(resolveSchemaProps(props));
|
|
60
|
+
};
|
|
61
|
+
const schemaRef = shallowRef(parentRef.value);
|
|
62
|
+
watch(parentRef, () => {
|
|
63
|
+
if (parentRef.value.type === "object" || parentRef.value.type === "void") schemaRef.value = parentRef.value.addProperty(name, resolveSchemaProps(props));
|
|
64
|
+
else if (parentRef.value.type === "array") {
|
|
65
|
+
const schema = appendArraySchema(resolveSchemaProps(props));
|
|
66
|
+
schemaRef.value = Array.isArray(schema) ? schema[0] : schema;
|
|
67
|
+
}
|
|
68
|
+
}, {
|
|
69
|
+
immediate: true,
|
|
70
|
+
flush: "sync"
|
|
71
|
+
});
|
|
72
|
+
provide(SchemaMarkupSymbol, schemaRef);
|
|
73
|
+
render = () => h(Fragment, null, slots.default?.() ?? []);
|
|
74
|
+
}
|
|
75
|
+
return render;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
const SchemaFieldFactory = (type, name) => {
|
|
79
|
+
return defineComponent({
|
|
80
|
+
name,
|
|
81
|
+
props: { ...markupSchemaProps },
|
|
82
|
+
setup(props, { slots }) {
|
|
83
|
+
return () => h(MarkupField, {
|
|
84
|
+
...props,
|
|
85
|
+
type
|
|
86
|
+
}, slots);
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
return {
|
|
91
|
+
SchemaField,
|
|
92
|
+
SchemaMarkupField: MarkupField,
|
|
93
|
+
SchemaStringField: SchemaFieldFactory("string", "SchemaStringField"),
|
|
94
|
+
SchemaObjectField: SchemaFieldFactory("object", "SchemaObjectField"),
|
|
95
|
+
SchemaArrayField: SchemaFieldFactory("array", "SchemaArrayField"),
|
|
96
|
+
SchemaBooleanField: SchemaFieldFactory("boolean", "SchemaBooleanField"),
|
|
97
|
+
SchemaDateField: SchemaFieldFactory("date", "SchemaDateField"),
|
|
98
|
+
SchemaDateTimeField: SchemaFieldFactory("datetime", "SchemaDatetimeField"),
|
|
99
|
+
SchemaVoidField: SchemaFieldFactory("void", "SchemaVoidField"),
|
|
100
|
+
SchemaNumberField: SchemaFieldFactory("number", "SchemaNumberField")
|
|
101
|
+
};
|
|
97
102
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
//# sourceMappingURL=SchemaField.mjs.map
|
|
103
|
+
//#endregion
|
|
104
|
+
export { createSchemaField };
|
|
105
|
+
|
|
106
|
+
//# sourceMappingURL=SchemaField.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaField.mjs","sources":["../../src/components/SchemaField.ts"],"sourcesContent":["import type { ISchema, SchemaTypes } from '@formily/json-schema'\nimport type { VNode } from 'vue'\nimport type {\n ISchemaFieldVueFactoryOptions,\n SchemaExpressionScope,\n SchemaVueComponents,\n} from '../types'\nimport { Schema } from '@formily/json-schema'\nimport { lazyMerge } from '@formily/shared'\nimport { computed, defineComponent, Fragment, h, inject, provide, shallowRef, watch } from 'vue'\nimport { SchemaExpressionScopeSymbol, SchemaMarkupSymbol, SchemaOptionsSymbol } from '../shared'\nimport { resolveSchemaProps } from '../utils/resolveSchemaProps'\nimport { markupSchemaProps, schemaFieldProps } from '../utils/schemaFieldProps'\nimport RecursionField from './RecursionField'\n\ntype SchemaFieldProps = import('../utils/schemaFieldProps').SchemaFieldProps\ntype MarkupSchemaProps = import('../utils/schemaFieldProps').MarkupSchemaProps\n\nconst env = {\n nonameId: 0,\n}\n\nfunction getRandomName() {\n return `NO_NAME_FIELD_$${env.nonameId++}`\n}\n\nexport function createSchemaField<Components extends SchemaVueComponents = SchemaVueComponents>(\n options: ISchemaFieldVueFactoryOptions<Components> = {},\n) {\n const SchemaField = defineComponent({\n name: 'SchemaField',\n inheritAttrs: false,\n props: schemaFieldProps,\n setup(props: SchemaFieldProps, { slots }) {\n const schemaRef = computed<Schema>(() =>\n Schema.isSchemaInstance(props.schema)\n ? props.schema\n : new Schema({\n type: 'object',\n ...props.schema,\n }),\n )\n\n const scopeRef = computed<SchemaExpressionScope>(() =>\n lazyMerge({} as SchemaExpressionScope, options.scope ?? {}, props.scope ?? {}),\n )\n\n const optionsRef = computed<ISchemaFieldVueFactoryOptions>(() => ({\n ...options,\n components: {\n ...options.components,\n ...props.components,\n },\n }))\n\n provide(SchemaMarkupSymbol, schemaRef)\n provide(SchemaOptionsSymbol, optionsRef)\n provide(SchemaExpressionScopeSymbol, scopeRef)\n\n return () => {\n env.nonameId = 0\n\n const normalizedSlots = slots.default?.() ?? []\n\n const recursionNode = h(RecursionField, {\n ...props,\n schema: schemaRef.value,\n })\n\n return h(Fragment, null, [...normalizedSlots, recursionNode])\n }\n },\n })\n\n const MarkupField = defineComponent({\n name: 'MarkupField',\n props: {\n type: String,\n ...markupSchemaProps,\n },\n setup(props: MarkupSchemaProps, { slots }) {\n const parentRef = inject(SchemaMarkupSymbol, null)\n let render: () => VNode | null = () => null\n\n if (parentRef?.value) {\n const name = props.name || getRandomName()\n const appendArraySchema = (schema: ISchema) => {\n if (parentRef.value.items) {\n return parentRef.value.addProperty(name, schema)\n }\n else {\n return parentRef.value.setItems(resolveSchemaProps(props))\n }\n }\n\n const schemaRef = shallowRef<Schema>(parentRef.value)\n\n watch(\n parentRef,\n () => {\n if (parentRef.value.type === 'object' || parentRef.value.type === 'void') {\n schemaRef.value = parentRef.value.addProperty(name, resolveSchemaProps(props))\n }\n else if (parentRef.value.type === 'array') {\n const schema = appendArraySchema(resolveSchemaProps(props))\n schemaRef.value = Array.isArray(schema) ? schema[0] : schema\n }\n },\n { immediate: true, flush: 'sync' },\n )\n provide(SchemaMarkupSymbol, schemaRef)\n\n render = () => h(Fragment, null, slots.default?.() ?? [])\n }\n\n return render\n },\n })\n\n const SchemaFieldFactory = (type: SchemaTypes, name: string) => {\n return defineComponent({\n name,\n props: { ...markupSchemaProps },\n setup(props, { slots }) {\n return () =>\n h(\n MarkupField,\n {\n ...props,\n type,\n },\n slots,\n )\n },\n })\n }\n\n return {\n SchemaField,\n SchemaMarkupField: MarkupField,\n SchemaStringField: SchemaFieldFactory('string', 'SchemaStringField'),\n SchemaObjectField: SchemaFieldFactory('object', 'SchemaObjectField'),\n SchemaArrayField: SchemaFieldFactory('array', 'SchemaArrayField'),\n SchemaBooleanField: SchemaFieldFactory('boolean', 'SchemaBooleanField'),\n SchemaDateField: SchemaFieldFactory('date', 'SchemaDateField'),\n SchemaDateTimeField: SchemaFieldFactory('datetime', 'SchemaDatetimeField'),\n SchemaVoidField: SchemaFieldFactory('void', 'SchemaVoidField'),\n SchemaNumberField: SchemaFieldFactory('number', 'SchemaNumberField'),\n }\n}\n"],"
|
|
1
|
+
{"version":3,"file":"SchemaField.mjs","names":[],"sources":["../../src/components/SchemaField.ts"],"sourcesContent":["import type { ISchema, SchemaTypes } from '@formily/json-schema'\nimport type { VNode } from 'vue'\nimport type {\n ISchemaFieldVueFactoryOptions,\n SchemaExpressionScope,\n SchemaVueComponents,\n} from '../types'\nimport { Schema } from '@formily/json-schema'\nimport { lazyMerge } from '@formily/shared'\nimport { computed, defineComponent, Fragment, h, inject, provide, shallowRef, watch } from 'vue'\nimport { SchemaExpressionScopeSymbol, SchemaMarkupSymbol, SchemaOptionsSymbol } from '../shared'\nimport { resolveSchemaProps } from '../utils/resolveSchemaProps'\nimport { markupSchemaProps, schemaFieldProps } from '../utils/schemaFieldProps'\nimport RecursionField from './RecursionField'\n\ntype SchemaFieldProps = import('../utils/schemaFieldProps').SchemaFieldProps\ntype MarkupSchemaProps = import('../utils/schemaFieldProps').MarkupSchemaProps\n\nconst env = {\n nonameId: 0,\n}\n\nfunction getRandomName() {\n return `NO_NAME_FIELD_$${env.nonameId++}`\n}\n\nexport function createSchemaField<Components extends SchemaVueComponents = SchemaVueComponents>(\n options: ISchemaFieldVueFactoryOptions<Components> = {},\n) {\n const SchemaField = defineComponent({\n name: 'SchemaField',\n inheritAttrs: false,\n props: schemaFieldProps,\n setup(props: SchemaFieldProps, { slots }) {\n const schemaRef = computed<Schema>(() =>\n Schema.isSchemaInstance(props.schema)\n ? props.schema\n : new Schema({\n type: 'object',\n ...props.schema,\n }),\n )\n\n const scopeRef = computed<SchemaExpressionScope>(() =>\n lazyMerge({} as SchemaExpressionScope, options.scope ?? {}, props.scope ?? {}),\n )\n\n const optionsRef = computed<ISchemaFieldVueFactoryOptions>(() => ({\n ...options,\n components: {\n ...options.components,\n ...props.components,\n },\n }))\n\n provide(SchemaMarkupSymbol, schemaRef)\n provide(SchemaOptionsSymbol, optionsRef)\n provide(SchemaExpressionScopeSymbol, scopeRef)\n\n return () => {\n env.nonameId = 0\n\n const normalizedSlots = slots.default?.() ?? []\n\n const recursionNode = h(RecursionField, {\n ...props,\n schema: schemaRef.value,\n })\n\n return h(Fragment, null, [...normalizedSlots, recursionNode])\n }\n },\n })\n\n const MarkupField = defineComponent({\n name: 'MarkupField',\n props: {\n type: String,\n ...markupSchemaProps,\n },\n setup(props: MarkupSchemaProps, { slots }) {\n const parentRef = inject(SchemaMarkupSymbol, null)\n let render: () => VNode | null = () => null\n\n if (parentRef?.value) {\n const name = props.name || getRandomName()\n const appendArraySchema = (schema: ISchema) => {\n if (parentRef.value.items) {\n return parentRef.value.addProperty(name, schema)\n }\n else {\n return parentRef.value.setItems(resolveSchemaProps(props))\n }\n }\n\n const schemaRef = shallowRef<Schema>(parentRef.value)\n\n watch(\n parentRef,\n () => {\n if (parentRef.value.type === 'object' || parentRef.value.type === 'void') {\n schemaRef.value = parentRef.value.addProperty(name, resolveSchemaProps(props))\n }\n else if (parentRef.value.type === 'array') {\n const schema = appendArraySchema(resolveSchemaProps(props))\n schemaRef.value = Array.isArray(schema) ? schema[0] : schema\n }\n },\n { immediate: true, flush: 'sync' },\n )\n provide(SchemaMarkupSymbol, schemaRef)\n\n render = () => h(Fragment, null, slots.default?.() ?? [])\n }\n\n return render\n },\n })\n\n const SchemaFieldFactory = (type: SchemaTypes, name: string) => {\n return defineComponent({\n name,\n props: { ...markupSchemaProps },\n setup(props, { slots }) {\n return () =>\n h(\n MarkupField,\n {\n ...props,\n type,\n },\n slots,\n )\n },\n })\n }\n\n return {\n SchemaField,\n SchemaMarkupField: MarkupField,\n SchemaStringField: SchemaFieldFactory('string', 'SchemaStringField'),\n SchemaObjectField: SchemaFieldFactory('object', 'SchemaObjectField'),\n SchemaArrayField: SchemaFieldFactory('array', 'SchemaArrayField'),\n SchemaBooleanField: SchemaFieldFactory('boolean', 'SchemaBooleanField'),\n SchemaDateField: SchemaFieldFactory('date', 'SchemaDateField'),\n SchemaDateTimeField: SchemaFieldFactory('datetime', 'SchemaDatetimeField'),\n SchemaVoidField: SchemaFieldFactory('void', 'SchemaVoidField'),\n SchemaNumberField: SchemaFieldFactory('number', 'SchemaNumberField'),\n }\n}\n"],"mappings":";;;;;;;;;AAkBA,MAAM,MAAM,EACV,UAAU,GACX;AAED,SAAS,gBAAgB;AACvB,QAAO,kBAAkB,IAAI;;AAG/B,SAAgB,kBACd,UAAqD,EAAE,EACvD;CACA,MAAM,cAAc,gBAAgB;EAClC,MAAM;EACN,cAAc;EACd,OAAO;EACP,MAAM,OAAyB,EAAE,SAAS;GACxC,MAAM,YAAY,eAChB,OAAO,iBAAiB,MAAM,OAAO,GACjC,MAAM,SACN,IAAI,OAAO;IACT,MAAM;IACN,GAAG,MAAM;IACV,CAAC,CACP;GAED,MAAM,WAAW,eACf,UAAU,EAAE,EAA2B,QAAQ,SAAS,EAAE,EAAE,MAAM,SAAS,EAAE,CAAC,CAC/E;GAED,MAAM,aAAa,gBAA+C;IAChE,GAAG;IACH,YAAY;KACV,GAAG,QAAQ;KACX,GAAG,MAAM;KACV;IACF,EAAE;AAEH,WAAQ,oBAAoB,UAAU;AACtC,WAAQ,qBAAqB,WAAW;AACxC,WAAQ,6BAA6B,SAAS;AAE9C,gBAAa;AACX,QAAI,WAAW;IAEf,MAAM,kBAAkB,MAAM,WAAW,IAAI,EAAE;IAE/C,MAAM,gBAAgB,EAAE,gBAAgB;KACtC,GAAG;KACH,QAAQ,UAAU;KACnB,CAAC;AAEF,WAAO,EAAE,UAAU,MAAM,CAAC,GAAG,iBAAiB,cAAc,CAAC;;;EAGlE,CAAC;CAEF,MAAM,cAAc,gBAAgB;EAClC,MAAM;EACN,OAAO;GACL,MAAM;GACN,GAAG;GACJ;EACD,MAAM,OAA0B,EAAE,SAAS;GACzC,MAAM,YAAY,OAAO,oBAAoB,KAAK;GAClD,IAAI,eAAmC;AAEvC,OAAI,WAAW,OAAO;IACpB,MAAM,OAAO,MAAM,QAAQ,eAAe;IAC1C,MAAM,qBAAqB,WAAoB;AAC7C,SAAI,UAAU,MAAM,MAClB,QAAO,UAAU,MAAM,YAAY,MAAM,OAAO;SAGhD,QAAO,UAAU,MAAM,SAAS,mBAAmB,MAAM,CAAC;;IAI9D,MAAM,YAAY,WAAmB,UAAU,MAAM;AAErD,UACE,iBACM;AACJ,SAAI,UAAU,MAAM,SAAS,YAAY,UAAU,MAAM,SAAS,OAChE,WAAU,QAAQ,UAAU,MAAM,YAAY,MAAM,mBAAmB,MAAM,CAAC;cAEvE,UAAU,MAAM,SAAS,SAAS;MACzC,MAAM,SAAS,kBAAkB,mBAAmB,MAAM,CAAC;AAC3D,gBAAU,QAAQ,MAAM,QAAQ,OAAO,GAAG,OAAO,KAAK;;OAG1D;KAAE,WAAW;KAAM,OAAO;KAAQ,CACnC;AACD,YAAQ,oBAAoB,UAAU;AAEtC,mBAAe,EAAE,UAAU,MAAM,MAAM,WAAW,IAAI,EAAE,CAAC;;AAG3D,UAAO;;EAEV,CAAC;CAEF,MAAM,sBAAsB,MAAmB,SAAiB;AAC9D,SAAO,gBAAgB;GACrB;GACA,OAAO,EAAE,GAAG,mBAAmB;GAC/B,MAAM,OAAO,EAAE,SAAS;AACtB,iBACE,EACE,aACA;KACE,GAAG;KACH;KACD,EACD,MACD;;GAEN,CAAC;;AAGJ,QAAO;EACL;EACA,mBAAmB;EACnB,mBAAmB,mBAAmB,UAAU,oBAAoB;EACpE,mBAAmB,mBAAmB,UAAU,oBAAoB;EACpE,kBAAkB,mBAAmB,SAAS,mBAAmB;EACjE,oBAAoB,mBAAmB,WAAW,qBAAqB;EACvE,iBAAiB,mBAAmB,QAAQ,kBAAkB;EAC9D,qBAAqB,mBAAmB,YAAY,sBAAsB;EAC1E,iBAAiB,mBAAmB,QAAQ,kBAAkB;EAC9D,mBAAmB,mBAAmB,UAAU,oBAAoB;EACrE"}
|
|
@@ -1,42 +1,48 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
1
|
+
import * as _$vue from "vue";
|
|
2
|
+
import * as _$_formily_core0 from "@formily/core";
|
|
3
|
+
|
|
4
|
+
//#region src/components/VoidField.d.ts
|
|
5
|
+
declare const _default: _$vue.DefineComponent<{
|
|
6
|
+
name: _$_formily_core0.FormPathPattern;
|
|
7
|
+
basePath?: _$_formily_core0.FormPathPattern | undefined;
|
|
8
|
+
title?: any;
|
|
9
|
+
description?: any;
|
|
10
|
+
display?: string | undefined;
|
|
11
|
+
pattern?: string | undefined;
|
|
12
|
+
hidden?: boolean | undefined;
|
|
13
|
+
visible?: boolean | undefined;
|
|
14
|
+
editable?: boolean | undefined;
|
|
15
|
+
disabled?: boolean | undefined;
|
|
16
|
+
readOnly?: boolean | undefined;
|
|
17
|
+
readPretty?: boolean | undefined;
|
|
18
|
+
decorator?: boolean | any[] | undefined;
|
|
19
|
+
component?: boolean | any[] | undefined;
|
|
20
|
+
reactions?: (_$_formily_core0.FieldReaction[] | _$_formily_core0.FieldReaction) | undefined;
|
|
21
|
+
content?: any;
|
|
22
|
+
data?: any;
|
|
23
|
+
decoratorContent?: any;
|
|
24
|
+
}, () => _$vue.VNode<_$vue.RendererNode, _$vue.RendererElement, {
|
|
25
|
+
[key: string]: any;
|
|
26
|
+
}>, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<{
|
|
27
|
+
name: _$_formily_core0.FormPathPattern;
|
|
28
|
+
basePath?: _$_formily_core0.FormPathPattern | undefined;
|
|
29
|
+
title?: any;
|
|
30
|
+
description?: any;
|
|
31
|
+
display?: string | undefined;
|
|
32
|
+
pattern?: string | undefined;
|
|
33
|
+
hidden?: boolean | undefined;
|
|
34
|
+
visible?: boolean | undefined;
|
|
35
|
+
editable?: boolean | undefined;
|
|
36
|
+
disabled?: boolean | undefined;
|
|
37
|
+
readOnly?: boolean | undefined;
|
|
38
|
+
readPretty?: boolean | undefined;
|
|
39
|
+
decorator?: boolean | any[] | undefined;
|
|
40
|
+
component?: boolean | any[] | undefined;
|
|
41
|
+
reactions?: (_$_formily_core0.FieldReaction[] | _$_formily_core0.FieldReaction) | undefined;
|
|
42
|
+
content?: any;
|
|
43
|
+
data?: any;
|
|
44
|
+
decoratorContent?: any;
|
|
45
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>;
|
|
46
|
+
//#endregion
|
|
47
|
+
export { _default };
|
|
48
|
+
//# sourceMappingURL=VoidField.d.ts.map
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
import { voidFieldProps } from "../utils/fieldProps.mjs";
|
|
2
|
+
import { getRawComponent } from "../utils/getRawComponent.mjs";
|
|
3
|
+
import ReactiveField_default from "./ReactiveField.mjs";
|
|
4
|
+
import { defineComponent, h } from "vue";
|
|
5
|
+
//#region src/components/VoidField.ts
|
|
6
|
+
var VoidField_default = defineComponent({
|
|
7
|
+
name: "VoidField",
|
|
8
|
+
props: voidFieldProps,
|
|
9
|
+
setup(props, { slots }) {
|
|
10
|
+
return () => {
|
|
11
|
+
return h(ReactiveField_default, {
|
|
12
|
+
fieldType: "VoidField",
|
|
13
|
+
fieldProps: {
|
|
14
|
+
...props,
|
|
15
|
+
...getRawComponent(props)
|
|
16
|
+
}
|
|
17
|
+
}, slots);
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
20
|
});
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
//# sourceMappingURL=VoidField.mjs.map
|
|
21
|
+
//#endregion
|
|
22
|
+
export { VoidField_default as default };
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=VoidField.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VoidField.mjs","sources":["../../src/components/VoidField.ts"],"sourcesContent":["import type { IReactiveFieldProps, IVoidFieldProps } from '../types'\nimport { defineComponent, h } from 'vue'\nimport { voidFieldProps } from '../utils/fieldProps'\nimport { getRawComponent } from '../utils/getRawComponent'\nimport ReactiveField from './ReactiveField'\n\nexport default defineComponent({\n name: 'VoidField',\n props: voidFieldProps,\n setup(props: IVoidFieldProps, { slots }) {\n return () => {\n const componentData: IReactiveFieldProps = {\n fieldType: 'VoidField',\n fieldProps: {\n ...props,\n ...getRawComponent(props),\n },\n }\n return h(ReactiveField, componentData, slots)\n }\n },\n})\n"],"
|
|
1
|
+
{"version":3,"file":"VoidField.mjs","names":["ReactiveField"],"sources":["../../src/components/VoidField.ts"],"sourcesContent":["import type { IReactiveFieldProps, IVoidFieldProps } from '../types'\nimport { defineComponent, h } from 'vue'\nimport { voidFieldProps } from '../utils/fieldProps'\nimport { getRawComponent } from '../utils/getRawComponent'\nimport ReactiveField from './ReactiveField'\n\nexport default defineComponent({\n name: 'VoidField',\n props: voidFieldProps,\n setup(props: IVoidFieldProps, { slots }) {\n return () => {\n const componentData: IReactiveFieldProps = {\n fieldType: 'VoidField',\n fieldProps: {\n ...props,\n ...getRawComponent(props),\n },\n }\n return h(ReactiveField, componentData, slots)\n }\n },\n})\n"],"mappings":";;;;;AAMA,IAAA,oBAAe,gBAAgB;CAC7B,MAAM;CACN,OAAO;CACP,MAAM,OAAwB,EAAE,SAAS;AACvC,eAAa;AAQX,UAAO,EAAEA,uBAPkC;IACzC,WAAW;IACX,YAAY;KACV,GAAG;KACH,GAAG,gBAAgB,MAAM;KAC1B;IACF,EACsC,MAAM;;;CAGlD,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { _default } from "./ArrayField.js";
|
|
2
|
+
import { _default as _default$1 } from "./ExpressionScope.js";
|
|
3
|
+
import { _default as _default$2 } from "./Field.js";
|
|
4
|
+
import { _default as _default$3 } from "./FormConsumer.js";
|
|
5
|
+
import { _default as _default$4 } from "./FormProvider.js";
|
|
6
|
+
import { _default as _default$5 } from "./ObjectField.js";
|
|
7
|
+
import { RecursionField } from "./RecursionField.js";
|
|
8
|
+
import { createSchemaField } from "./SchemaField.js";
|
|
9
|
+
import { _default as _default$6 } from "./VoidField.js";
|
package/esm/components/index.mjs
CHANGED
|
@@ -1,21 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
export {
|
|
11
|
-
o as ArrayField,
|
|
12
|
-
t as ExpressionScope,
|
|
13
|
-
d as Field,
|
|
14
|
-
m as FormConsumer,
|
|
15
|
-
p as FormProvider,
|
|
16
|
-
u as ObjectField,
|
|
17
|
-
F as RecursionField,
|
|
18
|
-
b as VoidField,
|
|
19
|
-
n as createSchemaField
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=index.mjs.map
|
|
1
|
+
import "./ArrayField.mjs";
|
|
2
|
+
import "./ExpressionScope.mjs";
|
|
3
|
+
import "./Field.mjs";
|
|
4
|
+
import "./FormConsumer.mjs";
|
|
5
|
+
import "./FormProvider.mjs";
|
|
6
|
+
import "./ObjectField.mjs";
|
|
7
|
+
import "./VoidField.mjs";
|
|
8
|
+
import "./RecursionField.mjs";
|
|
9
|
+
import "./SchemaField.mjs";
|
|
10
|
+
export {};
|
package/esm/hooks/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { useField } from "./useField.js";
|
|
2
|
+
import { useFieldSchema } from "./useFieldSchema.js";
|
|
3
|
+
import { useForm } from "./useForm.js";
|
|
4
|
+
import { useFormEffects } from "./useFormEffects.js";
|
|
5
|
+
import { useParentForm } from "./useParentForm.js";
|
package/esm/hooks/index.mjs
CHANGED
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
export {
|
|
7
|
-
o as useField,
|
|
8
|
-
f as useFieldSchema,
|
|
9
|
-
s as useForm,
|
|
10
|
-
u as useFormEffects,
|
|
11
|
-
F as useParentForm
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=index.mjs.map
|
|
1
|
+
import "./useField.mjs";
|
|
2
|
+
import "./useFieldSchema.mjs";
|
|
3
|
+
import "./useForm.mjs";
|
|
4
|
+
import "./useFormEffects.mjs";
|
|
5
|
+
import "./useParentForm.mjs";
|
|
6
|
+
export {};
|
package/esm/hooks/useAttach.mjs
CHANGED
|
@@ -1,14 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { nextTick, onMounted, onUnmounted, watch } from "vue";
|
|
2
|
+
//#region src/hooks/useAttach.ts
|
|
3
|
+
function useAttach(target) {
|
|
4
|
+
watch(target, (v, old, onInvalidate) => {
|
|
5
|
+
if (v && v !== old) {
|
|
6
|
+
old?.onUnmount();
|
|
7
|
+
nextTick(() => v.onMount());
|
|
8
|
+
onInvalidate(() => v.onUnmount());
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
onMounted(() => {
|
|
12
|
+
target.value?.onMount();
|
|
13
|
+
});
|
|
14
|
+
onUnmounted(() => {
|
|
15
|
+
target.value?.onUnmount();
|
|
16
|
+
});
|
|
17
|
+
return target;
|
|
10
18
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
//# sourceMappingURL=useAttach.mjs.map
|
|
19
|
+
//#endregion
|
|
20
|
+
export { useAttach };
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=useAttach.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAttach.mjs","sources":["../../src/hooks/useAttach.ts"],"sourcesContent":["import type { Ref } from 'vue'\nimport { nextTick, onMounted, onUnmounted, watch } from 'vue'\n\ninterface IRecycleTarget {\n onMount: () => void\n onUnmount: () => void\n}\n\nexport function useAttach<T extends IRecycleTarget>(target: Ref<T>): Ref<T> {\n watch(target, (v, old, onInvalidate) => {\n if (v && v !== old) {\n old?.onUnmount()\n nextTick(() => v.onMount())\n onInvalidate(() => v.onUnmount())\n }\n })\n onMounted(() => {\n target.value?.onMount()\n })\n onUnmounted(() => {\n target.value?.onUnmount()\n })\n return target\n}\n"],"
|
|
1
|
+
{"version":3,"file":"useAttach.mjs","names":[],"sources":["../../src/hooks/useAttach.ts"],"sourcesContent":["import type { Ref } from 'vue'\nimport { nextTick, onMounted, onUnmounted, watch } from 'vue'\n\ninterface IRecycleTarget {\n onMount: () => void\n onUnmount: () => void\n}\n\nexport function useAttach<T extends IRecycleTarget>(target: Ref<T>): Ref<T> {\n watch(target, (v, old, onInvalidate) => {\n if (v && v !== old) {\n old?.onUnmount()\n nextTick(() => v.onMount())\n onInvalidate(() => v.onUnmount())\n }\n })\n onMounted(() => {\n target.value?.onMount()\n })\n onUnmounted(() => {\n target.value?.onUnmount()\n })\n return target\n}\n"],"mappings":";;AAQA,SAAgB,UAAoC,QAAwB;AAC1E,OAAM,SAAS,GAAG,KAAK,iBAAiB;AACtC,MAAI,KAAK,MAAM,KAAK;AAClB,QAAK,WAAW;AAChB,kBAAe,EAAE,SAAS,CAAC;AAC3B,sBAAmB,EAAE,WAAW,CAAC;;GAEnC;AACF,iBAAgB;AACd,SAAO,OAAO,SAAS;GACvB;AACF,mBAAkB;AAChB,SAAO,OAAO,WAAW;GACzB;AACF,QAAO"}
|
package/esm/hooks/useField.d.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { Ref } from "vue";
|
|
2
|
+
import { GeneralField } from "@formily/core";
|
|
3
|
+
|
|
4
|
+
//#region src/hooks/useField.d.ts
|
|
5
|
+
declare function useField<T = GeneralField>(): Ref<T>;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { useField };
|
|
8
|
+
//# sourceMappingURL=useField.d.ts.map
|
package/esm/hooks/useField.mjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { FieldSymbol } from "../shared/context.mjs";
|
|
2
|
+
import { inject, ref } from "vue";
|
|
3
|
+
//#region src/hooks/useField.ts
|
|
4
|
+
function useField() {
|
|
5
|
+
return inject(FieldSymbol, ref());
|
|
5
6
|
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
//# sourceMappingURL=useField.mjs.map
|
|
7
|
+
//#endregion
|
|
8
|
+
export { useField };
|
|
9
|
+
|
|
10
|
+
//# sourceMappingURL=useField.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useField.mjs","sources":["../../src/hooks/useField.ts"],"sourcesContent":["import type { GeneralField } from '@formily/core'\nimport type { Ref } from 'vue'\nimport { inject, ref } from 'vue'\nimport { FieldSymbol } from '../shared/context'\n\nexport function useField<T = GeneralField>() {\n return inject(FieldSymbol, ref()) as Ref<T>\n}\n"],"
|
|
1
|
+
{"version":3,"file":"useField.mjs","names":[],"sources":["../../src/hooks/useField.ts"],"sourcesContent":["import type { GeneralField } from '@formily/core'\nimport type { Ref } from 'vue'\nimport { inject, ref } from 'vue'\nimport { FieldSymbol } from '../shared/context'\n\nexport function useField<T = GeneralField>() {\n return inject(FieldSymbol, ref()) as Ref<T>\n}\n"],"mappings":";;;AAKA,SAAgB,WAA6B;AAC3C,QAAO,OAAO,aAAa,KAAK,CAAC"}
|
|
@@ -1 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import * as _$vue from "vue";
|
|
2
|
+
import * as _$_formily_json_schema0 from "@formily/json-schema";
|
|
3
|
+
|
|
4
|
+
//#region src/hooks/useFieldSchema.d.ts
|
|
5
|
+
declare function useFieldSchema(): _$vue.Ref<_$_formily_json_schema0.Schema<any, any, any, any, any, any, any, any, any> | undefined, _$_formily_json_schema0.Schema<any, any, any, any, any, any, any, any, any> | undefined>;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { useFieldSchema };
|
|
8
|
+
//# sourceMappingURL=useFieldSchema.d.ts.map
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { SchemaSymbol } from "../shared/context.mjs";
|
|
2
|
+
import { inject, ref } from "vue";
|
|
3
|
+
//#region src/hooks/useFieldSchema.ts
|
|
4
|
+
function useFieldSchema() {
|
|
5
|
+
return inject(SchemaSymbol, ref());
|
|
5
6
|
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
//# sourceMappingURL=useFieldSchema.mjs.map
|
|
7
|
+
//#endregion
|
|
8
|
+
export { useFieldSchema };
|
|
9
|
+
|
|
10
|
+
//# sourceMappingURL=useFieldSchema.mjs.map
|