@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.
- package/README.en.md +6 -6
- package/README.md +6 -6
- package/esm/components/ArrayField.d.ts +67 -58
- 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 -58
- 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 -58
- package/esm/components/ObjectField.mjs +23 -23
- package/esm/components/ObjectField.mjs.map +1 -1
- package/esm/components/ReactiveField.mjs +103 -75
- package/esm/components/ReactiveField.mjs.map +1 -1
- package/esm/components/RecursionField.d.ts +142 -22
- package/esm/components/RecursionField.mjs +123 -127
- package/esm/components/RecursionField.mjs.map +1 -1
- package/esm/components/SchemaField.d.ts +3041 -2919
- package/esm/components/SchemaField.mjs +104 -97
- 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 -68
- package/esm/types/validator.d.ts +39 -35
- package/esm/utils/fieldProps.mjs +53 -51
- 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 -12
- 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 -51
- package/esm/utils/getRawComponent.d.ts +0 -8
- package/esm/utils/reactiveFieldHelpers.d.ts +0 -16
- package/esm/utils/recursionFieldProps.d.ts +0 -67
- package/esm/utils/resolveSchemaProps.d.ts +0 -1
- package/esm/utils/schemaFieldProps.d.ts +0 -232
|
@@ -1,22 +1,142 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
import { ISchemaFilter, ISchemaMapper } from "../types/index.js";
|
|
2
|
+
import * as _$vue from "vue";
|
|
3
|
+
import { VNode } from "vue";
|
|
4
|
+
import * as _$_formily_shared0 from "@formily/shared";
|
|
5
|
+
import * as _$_formily_json_schema0 from "@formily/json-schema";
|
|
6
|
+
import { Schema } from "@formily/json-schema";
|
|
7
|
+
|
|
8
|
+
//#region src/components/RecursionField.d.ts
|
|
9
|
+
declare const RecursionField: _$vue.DefineComponent<{
|
|
10
|
+
readonly name?: _$_formily_json_schema0.SchemaKey | undefined;
|
|
11
|
+
readonly basePath?: _$_formily_shared0.FormPathPattern | undefined;
|
|
12
|
+
readonly schema?: Schema<any, any, any, any, any, any, any, any, any> | _$_formily_json_schema0.Stringify<{
|
|
13
|
+
[key: symbol]: any;
|
|
14
|
+
[key: `x-${string}`]: any;
|
|
15
|
+
[key: `x-${number}`]: any;
|
|
16
|
+
version?: string;
|
|
17
|
+
name?: _$_formily_json_schema0.SchemaKey;
|
|
18
|
+
title?: any;
|
|
19
|
+
description?: any;
|
|
20
|
+
default?: any;
|
|
21
|
+
readOnly?: boolean;
|
|
22
|
+
writeOnly?: boolean;
|
|
23
|
+
type?: _$_formily_json_schema0.SchemaTypes;
|
|
24
|
+
enum?: _$_formily_json_schema0.SchemaEnum<any> | undefined;
|
|
25
|
+
const?: any;
|
|
26
|
+
multipleOf?: number;
|
|
27
|
+
maximum?: number;
|
|
28
|
+
exclusiveMaximum?: number;
|
|
29
|
+
minimum?: number;
|
|
30
|
+
exclusiveMinimum?: number;
|
|
31
|
+
maxLength?: number;
|
|
32
|
+
minLength?: number;
|
|
33
|
+
pattern?: string | RegExp;
|
|
34
|
+
maxItems?: number;
|
|
35
|
+
minItems?: number;
|
|
36
|
+
uniqueItems?: boolean;
|
|
37
|
+
maxProperties?: number;
|
|
38
|
+
minProperties?: number;
|
|
39
|
+
required?: string[] | boolean | string;
|
|
40
|
+
format?: string;
|
|
41
|
+
$ref?: string;
|
|
42
|
+
$namespace?: string;
|
|
43
|
+
definitions?: _$_formily_json_schema0.SchemaProperties<any, any, any, any, any, any, any, any> | undefined;
|
|
44
|
+
properties?: _$_formily_json_schema0.SchemaProperties<any, any, any, any, any, any, any, any> | undefined;
|
|
45
|
+
items?: _$_formily_json_schema0.SchemaItems<any, any, any, any, any, any, any, any> | undefined;
|
|
46
|
+
additionalItems?: _$_formily_json_schema0.Stringify< /*elided*/any> | undefined;
|
|
47
|
+
patternProperties?: _$_formily_json_schema0.SchemaProperties<any, any, any, any, any, any, any, any> | undefined;
|
|
48
|
+
additionalProperties?: _$_formily_json_schema0.Stringify< /*elided*/any> | undefined;
|
|
49
|
+
"x-value"?: any;
|
|
50
|
+
"x-index"?: number;
|
|
51
|
+
"x-pattern"?: any;
|
|
52
|
+
"x-display"?: any;
|
|
53
|
+
"x-validator"?: any;
|
|
54
|
+
"x-decorator"?: any;
|
|
55
|
+
"x-decorator-props"?: any;
|
|
56
|
+
"x-component"?: any;
|
|
57
|
+
"x-component-props"?: any;
|
|
58
|
+
"x-reactions"?: _$_formily_json_schema0.SchemaReactions<any> | undefined;
|
|
59
|
+
"x-content"?: any;
|
|
60
|
+
"x-data"?: any;
|
|
61
|
+
"x-visible"?: boolean;
|
|
62
|
+
"x-hidden"?: boolean;
|
|
63
|
+
"x-disabled"?: boolean;
|
|
64
|
+
"x-editable"?: boolean;
|
|
65
|
+
"x-read-only"?: boolean;
|
|
66
|
+
"x-read-pretty"?: boolean;
|
|
67
|
+
"x-compile-omitted"?: string[];
|
|
68
|
+
}> | undefined;
|
|
69
|
+
readonly mapProperties?: ISchemaMapper | undefined;
|
|
70
|
+
readonly filterProperties?: ISchemaFilter | undefined;
|
|
71
|
+
readonly onlyRenderProperties?: boolean | undefined;
|
|
72
|
+
readonly onlyRenderSelf?: boolean | undefined;
|
|
73
|
+
}, () => VNode<_$vue.RendererNode, _$vue.RendererElement, {
|
|
74
|
+
[key: string]: any;
|
|
75
|
+
}> | null, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<{
|
|
76
|
+
readonly name?: _$_formily_json_schema0.SchemaKey | undefined;
|
|
77
|
+
readonly basePath?: _$_formily_shared0.FormPathPattern | undefined;
|
|
78
|
+
readonly schema?: Schema<any, any, any, any, any, any, any, any, any> | _$_formily_json_schema0.Stringify<{
|
|
79
|
+
[key: symbol]: any;
|
|
80
|
+
[key: `x-${string}`]: any;
|
|
81
|
+
[key: `x-${number}`]: any;
|
|
82
|
+
version?: string;
|
|
83
|
+
name?: _$_formily_json_schema0.SchemaKey;
|
|
84
|
+
title?: any;
|
|
85
|
+
description?: any;
|
|
86
|
+
default?: any;
|
|
87
|
+
readOnly?: boolean;
|
|
88
|
+
writeOnly?: boolean;
|
|
89
|
+
type?: _$_formily_json_schema0.SchemaTypes;
|
|
90
|
+
enum?: _$_formily_json_schema0.SchemaEnum<any> | undefined;
|
|
91
|
+
const?: any;
|
|
92
|
+
multipleOf?: number;
|
|
93
|
+
maximum?: number;
|
|
94
|
+
exclusiveMaximum?: number;
|
|
95
|
+
minimum?: number;
|
|
96
|
+
exclusiveMinimum?: number;
|
|
97
|
+
maxLength?: number;
|
|
98
|
+
minLength?: number;
|
|
99
|
+
pattern?: string | RegExp;
|
|
100
|
+
maxItems?: number;
|
|
101
|
+
minItems?: number;
|
|
102
|
+
uniqueItems?: boolean;
|
|
103
|
+
maxProperties?: number;
|
|
104
|
+
minProperties?: number;
|
|
105
|
+
required?: string[] | boolean | string;
|
|
106
|
+
format?: string;
|
|
107
|
+
$ref?: string;
|
|
108
|
+
$namespace?: string;
|
|
109
|
+
definitions?: _$_formily_json_schema0.SchemaProperties<any, any, any, any, any, any, any, any> | undefined;
|
|
110
|
+
properties?: _$_formily_json_schema0.SchemaProperties<any, any, any, any, any, any, any, any> | undefined;
|
|
111
|
+
items?: _$_formily_json_schema0.SchemaItems<any, any, any, any, any, any, any, any> | undefined;
|
|
112
|
+
additionalItems?: _$_formily_json_schema0.Stringify< /*elided*/any> | undefined;
|
|
113
|
+
patternProperties?: _$_formily_json_schema0.SchemaProperties<any, any, any, any, any, any, any, any> | undefined;
|
|
114
|
+
additionalProperties?: _$_formily_json_schema0.Stringify< /*elided*/any> | undefined;
|
|
115
|
+
"x-value"?: any;
|
|
116
|
+
"x-index"?: number;
|
|
117
|
+
"x-pattern"?: any;
|
|
118
|
+
"x-display"?: any;
|
|
119
|
+
"x-validator"?: any;
|
|
120
|
+
"x-decorator"?: any;
|
|
121
|
+
"x-decorator-props"?: any;
|
|
122
|
+
"x-component"?: any;
|
|
123
|
+
"x-component-props"?: any;
|
|
124
|
+
"x-reactions"?: _$_formily_json_schema0.SchemaReactions<any> | undefined;
|
|
125
|
+
"x-content"?: any;
|
|
126
|
+
"x-data"?: any;
|
|
127
|
+
"x-visible"?: boolean;
|
|
128
|
+
"x-hidden"?: boolean;
|
|
129
|
+
"x-disabled"?: boolean;
|
|
130
|
+
"x-editable"?: boolean;
|
|
131
|
+
"x-read-only"?: boolean;
|
|
132
|
+
"x-read-pretty"?: boolean;
|
|
133
|
+
"x-compile-omitted"?: string[];
|
|
134
|
+
}> | undefined;
|
|
135
|
+
readonly mapProperties?: ISchemaMapper | undefined;
|
|
136
|
+
readonly filterProperties?: ISchemaFilter | undefined;
|
|
137
|
+
readonly onlyRenderProperties?: boolean | undefined;
|
|
138
|
+
readonly onlyRenderSelf?: boolean | undefined;
|
|
139
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>;
|
|
140
|
+
//#endregion
|
|
141
|
+
export { RecursionField };
|
|
142
|
+
//# sourceMappingURL=RecursionField.d.ts.map
|
|
@@ -1,129 +1,125 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import "
|
|
7
|
-
import "
|
|
8
|
-
import { recursionFieldProps
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
return u(z, null, i);
|
|
1
|
+
import { SchemaExpressionScopeSymbol, SchemaOptionsSymbol, SchemaSymbol } from "../shared/context.mjs";
|
|
2
|
+
import { useField } from "../hooks/useField.mjs";
|
|
3
|
+
import "../hooks/index.mjs";
|
|
4
|
+
import "../shared/index.mjs";
|
|
5
|
+
import ArrayField_default from "./ArrayField.mjs";
|
|
6
|
+
import Field_default from "./Field.mjs";
|
|
7
|
+
import ObjectField_default from "./ObjectField.mjs";
|
|
8
|
+
import { recursionFieldProps } from "../utils/recursionFieldProps.mjs";
|
|
9
|
+
import VoidField_default from "./VoidField.mjs";
|
|
10
|
+
import { Fragment, computed, defineComponent, h, inject, markRaw, provide, shallowRef, watch } from "vue";
|
|
11
|
+
import { isFn, isValid, lazyMerge } from "@formily/shared";
|
|
12
|
+
import { Schema } from "@formily/json-schema";
|
|
13
|
+
//#region src/components/RecursionField.ts
|
|
14
|
+
function resolveEmptySlot(slots) {
|
|
15
|
+
const slotKeys = Object.keys(slots);
|
|
16
|
+
if (!slotKeys.length) return null;
|
|
17
|
+
const children = slotKeys.reduce((acc, key) => {
|
|
18
|
+
const slot = slots[key];
|
|
19
|
+
if (!slot) return acc;
|
|
20
|
+
const result = slot();
|
|
21
|
+
if (!result?.length) return acc;
|
|
22
|
+
const validChildren = result.filter((child) => isValid(child));
|
|
23
|
+
acc.push(...validChildren);
|
|
24
|
+
return acc;
|
|
25
|
+
}, []);
|
|
26
|
+
if (!children.length) return null;
|
|
27
|
+
return h(Fragment, null, children);
|
|
29
28
|
}
|
|
30
|
-
const
|
|
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
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
return O();
|
|
123
|
-
};
|
|
124
|
-
}
|
|
29
|
+
const RecursionField = defineComponent({
|
|
30
|
+
name: "RecursionField",
|
|
31
|
+
inheritAttrs: false,
|
|
32
|
+
props: recursionFieldProps,
|
|
33
|
+
setup(props) {
|
|
34
|
+
const parentRef = useField();
|
|
35
|
+
const optionsRef = inject(SchemaOptionsSymbol);
|
|
36
|
+
const scopeRef = inject(SchemaExpressionScopeSymbol);
|
|
37
|
+
if (!optionsRef || !scopeRef) throw new Error("RecursionField must be used under SchemaField.");
|
|
38
|
+
const createSchema = (schemaProp) => markRaw(Schema.isSchemaInstance(schemaProp) ? schemaProp : new Schema(schemaProp));
|
|
39
|
+
const fieldSchemaRef = computed(() => createSchema(props.schema ?? {}));
|
|
40
|
+
const getPropsFromSchema = (schema) => schema?.toFieldProps?.({
|
|
41
|
+
...optionsRef.value,
|
|
42
|
+
get scope() {
|
|
43
|
+
return lazyMerge({}, optionsRef.value.scope ?? {}, scopeRef.value);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
const fieldPropsRef = shallowRef(getPropsFromSchema(fieldSchemaRef.value));
|
|
47
|
+
watch([fieldSchemaRef, optionsRef], () => {
|
|
48
|
+
fieldPropsRef.value = getPropsFromSchema(fieldSchemaRef.value);
|
|
49
|
+
});
|
|
50
|
+
const getBasePath = () => {
|
|
51
|
+
if (props.onlyRenderProperties) return props.basePath ?? parentRef?.value?.address.concat(props.name);
|
|
52
|
+
return props.basePath ?? parentRef?.value?.address;
|
|
53
|
+
};
|
|
54
|
+
provide(SchemaSymbol, fieldSchemaRef);
|
|
55
|
+
return () => {
|
|
56
|
+
const basePath = getBasePath();
|
|
57
|
+
const fieldProps = fieldPropsRef.value;
|
|
58
|
+
const generateSlotsByProperties = (scoped = false) => {
|
|
59
|
+
if (props.onlyRenderSelf) return {};
|
|
60
|
+
const properties = Schema.getOrderProperties(fieldSchemaRef.value);
|
|
61
|
+
if (!properties.length) return {};
|
|
62
|
+
const renderMap = {};
|
|
63
|
+
const setRender = (key, value) => {
|
|
64
|
+
if (!renderMap[key]) renderMap[key] = [];
|
|
65
|
+
renderMap[key].push(value);
|
|
66
|
+
};
|
|
67
|
+
for (const [index, { schema: item, key: name }] of properties.entries()) {
|
|
68
|
+
let schema = item;
|
|
69
|
+
if (isFn(props.mapProperties)) {
|
|
70
|
+
const mapped = props.mapProperties(item, name);
|
|
71
|
+
if (mapped) schema = mapped;
|
|
72
|
+
}
|
|
73
|
+
if (isFn(props.filterProperties) && props.filterProperties(schema, name) === false) continue;
|
|
74
|
+
setRender(schema["x-slot"] ?? "default", (field) => h(RecursionField, {
|
|
75
|
+
key: `${index}-${name}`,
|
|
76
|
+
schema,
|
|
77
|
+
name,
|
|
78
|
+
basePath: field?.address ?? basePath,
|
|
79
|
+
slot: schema["x-slot"]
|
|
80
|
+
}));
|
|
81
|
+
}
|
|
82
|
+
const slots = {};
|
|
83
|
+
for (const key of Object.keys(renderMap)) {
|
|
84
|
+
const renderFns = renderMap[key];
|
|
85
|
+
slots[key] = scoped ? (payload) => renderFns.map((fn) => fn(payload?.field)) : () => renderFns.map((fn) => fn());
|
|
86
|
+
}
|
|
87
|
+
return slots;
|
|
88
|
+
};
|
|
89
|
+
const render = () => {
|
|
90
|
+
if (!isValid(props.name)) return resolveEmptySlot(generateSlotsByProperties());
|
|
91
|
+
if (fieldSchemaRef.value.type === "object") {
|
|
92
|
+
if (props.onlyRenderProperties) return resolveEmptySlot(generateSlotsByProperties());
|
|
93
|
+
return h(ObjectField_default, {
|
|
94
|
+
...fieldProps,
|
|
95
|
+
name: props.name,
|
|
96
|
+
basePath
|
|
97
|
+
}, generateSlotsByProperties(true));
|
|
98
|
+
} else if (fieldSchemaRef.value.type === "array") return h(ArrayField_default, {
|
|
99
|
+
...fieldProps,
|
|
100
|
+
name: props.name,
|
|
101
|
+
basePath
|
|
102
|
+
});
|
|
103
|
+
else if (fieldSchemaRef.value.type === "void") {
|
|
104
|
+
if (props.onlyRenderProperties) return resolveEmptySlot(generateSlotsByProperties());
|
|
105
|
+
const slots = generateSlotsByProperties(true);
|
|
106
|
+
return h(VoidField_default, {
|
|
107
|
+
...fieldProps,
|
|
108
|
+
name: props.name,
|
|
109
|
+
basePath
|
|
110
|
+
}, slots);
|
|
111
|
+
}
|
|
112
|
+
return h(Field_default, {
|
|
113
|
+
...fieldProps,
|
|
114
|
+
name: props.name,
|
|
115
|
+
basePath
|
|
116
|
+
});
|
|
117
|
+
};
|
|
118
|
+
return render();
|
|
119
|
+
};
|
|
120
|
+
}
|
|
125
121
|
});
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
//# sourceMappingURL=RecursionField.mjs.map
|
|
122
|
+
//#endregion
|
|
123
|
+
export { RecursionField as default };
|
|
124
|
+
|
|
125
|
+
//# sourceMappingURL=RecursionField.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RecursionField.mjs","sources":["../../src/components/RecursionField.ts"],"sourcesContent":["import type { GeneralField } from '@formily/core'\nimport type { Slots, VNode } from 'vue'\nimport type { IRecursionFieldProps, SchemaExpressionScope } from '../types'\nimport { Schema } from '@formily/json-schema'\nimport { isFn, isValid, lazyMerge } from '@formily/shared'\nimport { computed, defineComponent, Fragment, h, inject, markRaw, provide, shallowRef, watch } from 'vue'\nimport { useField } from '../hooks'\nimport { SchemaExpressionScopeSymbol, SchemaOptionsSymbol, SchemaSymbol } from '../shared'\nimport { recursionFieldProps } from '../utils/recursionFieldProps'\nimport ArrayField from './ArrayField'\nimport Field from './Field'\n\nimport ObjectField from './ObjectField'\nimport VoidField from './VoidField'\n\ntype PropertyRenderFn = (field?: GeneralField) => VNode\ninterface ScopedSlotPayload { field?: GeneralField }\ntype SlotRender = (payload?: ScopedSlotPayload) => VNode[] | undefined\ntype SlotMap = Record<string, SlotRender>\n\nfunction resolveEmptySlot(slots: SlotMap) {\n const slotKeys = Object.keys(slots)\n if (!slotKeys.length)\n return undefined\n const children = slotKeys.reduce<VNode[]>((acc, key) => {\n const slot = slots[key]\n if (!slot)\n return acc\n const result = slot()\n if (!result?.length)\n return acc\n const validChildren = result.filter(child => isValid(child))\n acc.push(...validChildren)\n return acc\n }, [])\n if (!children.length)\n return undefined\n return h(Fragment, null, children)\n}\n\nconst RecursionField = defineComponent({\n name: 'RecursionField',\n inheritAttrs: false,\n props: recursionFieldProps,\n setup(props: IRecursionFieldProps) {\n const parentRef = useField()\n const optionsRef = inject(SchemaOptionsSymbol)\n const scopeRef = inject(SchemaExpressionScopeSymbol)\n\n if (!optionsRef || !scopeRef) {\n throw new Error('RecursionField must be used under SchemaField.')\n }\n const createSchema = (schemaProp: IRecursionFieldProps['schema']) =>\n markRaw(Schema.isSchemaInstance(schemaProp) ? schemaProp : new Schema(schemaProp))\n const fieldSchemaRef = computed(() => createSchema(props.schema))\n\n const getPropsFromSchema = (schema: Schema) =>\n schema?.toFieldProps?.({\n ...optionsRef.value,\n get scope() {\n return lazyMerge(\n {} as SchemaExpressionScope,\n optionsRef.value.scope ?? {},\n scopeRef.value,\n )\n },\n })\n const fieldPropsRef = shallowRef(getPropsFromSchema(fieldSchemaRef.value))\n\n watch([fieldSchemaRef, optionsRef], () => {\n fieldPropsRef.value = getPropsFromSchema(fieldSchemaRef.value)\n })\n\n const getBasePath = () => {\n if (props.onlyRenderProperties) {\n return props.basePath ?? parentRef?.value?.address.concat(props.name!)\n }\n return props.basePath ?? parentRef?.value?.address\n }\n\n provide(SchemaSymbol, fieldSchemaRef)\n\n return () => {\n const basePath = getBasePath()\n const fieldProps = fieldPropsRef.value\n\n const generateSlotsByProperties = (scoped = false): SlotMap => {\n if (props.onlyRenderSelf)\n return {}\n const properties = Schema.getOrderProperties(fieldSchemaRef.value)\n if (!properties.length)\n return {}\n const renderMap: Record<string, PropertyRenderFn[]> = {}\n const setRender = (key: string, value: PropertyRenderFn) => {\n if (!renderMap[key]) {\n renderMap[key] = []\n }\n renderMap[key].push(value)\n }\n for (const [index, { schema: item, key: name }] of properties.entries()) {\n let schema: Schema = item\n if (isFn(props.mapProperties)) {\n const mapped = props.mapProperties(item, name)\n if (mapped) {\n schema = mapped\n }\n }\n if (isFn(props.filterProperties) && props.filterProperties(schema, name) === false) {\n continue\n }\n setRender(schema['x-slot'] ?? 'default', (field?: GeneralField) =>\n h(RecursionField, {\n key: `${index}-${name}`,\n schema,\n name,\n basePath: field?.address ?? basePath,\n slot: schema['x-slot'],\n }))\n }\n const slots: SlotMap = {}\n for (const key of Object.keys(renderMap)) {\n const renderFns = renderMap[key]\n const slotRender: SlotRender = scoped\n ? payload => renderFns!.map(fn => fn(payload?.field))\n : () => renderFns!.map(fn => fn())\n slots[key] = slotRender\n }\n return slots\n }\n\n const render = () => {\n if (!isValid(props.name))\n return resolveEmptySlot(generateSlotsByProperties())\n if (fieldSchemaRef.value.type === 'object') {\n if (props.onlyRenderProperties)\n return resolveEmptySlot(generateSlotsByProperties())\n return h(\n ObjectField,\n {\n ...fieldProps,\n name: props.name!,\n basePath,\n },\n generateSlotsByProperties(true) as Slots,\n )\n }\n else if (fieldSchemaRef.value.type === 'array') {\n return h(ArrayField, {\n ...fieldProps,\n name: props.name!,\n basePath,\n })\n }\n else if (fieldSchemaRef.value.type === 'void') {\n if (props.onlyRenderProperties)\n return resolveEmptySlot(generateSlotsByProperties())\n const slots = generateSlotsByProperties(true)\n return h(\n VoidField,\n {\n ...fieldProps,\n name: props.name!,\n basePath,\n },\n slots as Slots,\n )\n }\n\n return h(Field, {\n ...fieldProps,\n name: props.name!,\n basePath,\n })\n }\n\n if (!fieldSchemaRef.value)\n return\n\n return render()\n }\n },\n})\n\nexport default RecursionField\n"],"names":["resolveEmptySlot","slots","slotKeys","children","acc","key","slot","result","validChildren","child","isValid","h","Fragment","RecursionField","defineComponent","recursionFieldProps","props","parentRef","useField","optionsRef","inject","SchemaOptionsSymbol","scopeRef","SchemaExpressionScopeSymbol","createSchema","schemaProp","markRaw","Schema","fieldSchemaRef","computed","getPropsFromSchema","schema","lazyMerge","fieldPropsRef","shallowRef","watch","getBasePath","provide","SchemaSymbol","basePath","fieldProps","generateSlotsByProperties","scoped","properties","renderMap","setRender","value","index","item","name","isFn","mapped","field","renderFns","slotRender","payload","fn","render","ObjectField","ArrayField","VoidField","Field"],"mappings":";;;;;;;;;;;;AAoBA,SAASA,EAAiBC,GAAgB;AACxC,QAAMC,IAAW,OAAO,KAAKD,CAAK;AAClC,MAAI,CAACC,EAAS;AACZ;AACF,QAAMC,IAAWD,EAAS,OAAgB,CAACE,GAAKC,MAAQ;AACtD,UAAMC,IAAOL,EAAMI,CAAG;AACtB,QAAI,CAACC;AACH,aAAOF;AACT,UAAMG,IAASD,EAAA;AACf,QAAI,CAACC,GAAQ;AACX,aAAOH;AACT,UAAMI,IAAgBD,EAAO,OAAO,CAAAE,MAASC,EAAQD,CAAK,CAAC;AAC3D,WAAAL,EAAI,KAA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b,EAAe,MAAM,SAAS;AAChC,iBAAIZ,EAAM,uBACDhB,EAAiByC,GAA2B,IAC9C9B;AAAA,YACL+C;AAAA,YACA;AAAA,cACE,GAAGlB;AAAA,cACH,MAAMxB,EAAM;AAAA,cACZ,UAAAuB;AAAA,YAAA;AAAA,YAEFE,EAA0B,EAAI;AAAA,UAAA;AAElC,YACSb,EAAe,MAAM,SAAS;AACrC,iBAAOjB,EAAEgD,GAAY;AAAA,YACnB,GAAGnB;AAAA,YACH,MAAMxB,EAAM;AAAA,YACZ,UAAAuB;AAAA,UAAA,CACD;AACH,YACSX,EAAe,MAAM,SAAS,QAAQ;AAC7C,cAAIZ,EAAM;AACR,mBAAOhB,EAAiByC,GAA2B;AACrD,gBAAMxC,IAAQwC,EAA0B,EAAI;AAC5C,iBAAO9B;AAAA,YACLiD;AAAA,YACA;AAAA,cACE,GAAGpB;AAAA,cACH,MAAMxB,EAAM;AAAA,cACZ,UAAAuB;AAAA,YAAA;AAAA,YAEFtC;AAAA,UAAA;AAAA,QAEJ;AAEA,eAAOU,EAAEkD,GAAO;AAAA,UACd,GAAGrB;AAAA,UACH,MAAMxB,EAAM;AAAA,UACZ,UAAAuB;AAAA,QAAA,CACD;AAAA,MACH;AAEA,UAAKX,EAAe;AAGpB,eAAO6B,EAAA;AAAA,IACT;AAAA,EACF;AACF,CAAC;"}
|
|
1
|
+
{"version":3,"file":"RecursionField.mjs","names":["ObjectField","ArrayField","VoidField","Field"],"sources":["../../src/components/RecursionField.ts"],"sourcesContent":["import type { GeneralField } from '@formily/core'\nimport type { Slots, VNode } from 'vue'\nimport type { IRecursionFieldProps, SchemaExpressionScope } from '../types'\nimport type { RecursionFieldProps } from '../utils/recursionFieldProps'\nimport type { NamedSlotMap } from '../utils/slotMap'\nimport { Schema } from '@formily/json-schema'\nimport { isFn, isValid, lazyMerge } from '@formily/shared'\nimport { computed, defineComponent, Fragment, h, inject, markRaw, provide, shallowRef, watch } from 'vue'\nimport { useField } from '../hooks'\nimport { SchemaExpressionScopeSymbol, SchemaOptionsSymbol, SchemaSymbol } from '../shared'\nimport { recursionFieldProps } from '../utils/recursionFieldProps'\nimport ArrayField from './ArrayField'\nimport Field from './Field'\n\nimport ObjectField from './ObjectField'\nimport VoidField from './VoidField'\n\ntype PropertyRenderFn = (field?: GeneralField) => VNode\ninterface ScopedSlotPayload { field?: GeneralField }\ntype SlotRender = (payload?: ScopedSlotPayload) => VNode[]\ntype SlotMap = NamedSlotMap<SlotRender>\n\nfunction resolveEmptySlot(slots: SlotMap) {\n const slotKeys = Object.keys(slots)\n if (!slotKeys.length)\n return null\n const children = slotKeys.reduce<VNode[]>((acc, key) => {\n const slot = slots[key]\n if (!slot)\n return acc\n const result = slot()\n if (!result?.length)\n return acc\n const validChildren = result.filter(child => isValid(child))\n acc.push(...validChildren)\n return acc\n }, [])\n if (!children.length)\n return null\n return h(Fragment, null, children)\n}\n\nconst RecursionField = defineComponent({\n name: 'RecursionField',\n inheritAttrs: false,\n props: recursionFieldProps,\n setup(props: RecursionFieldProps) {\n const parentRef = useField()\n const optionsRef = inject(SchemaOptionsSymbol)\n const scopeRef = inject(SchemaExpressionScopeSymbol)\n\n if (!optionsRef || !scopeRef) {\n throw new Error('RecursionField must be used under SchemaField.')\n }\n const createSchema = (schemaProp: IRecursionFieldProps['schema']) =>\n markRaw(Schema.isSchemaInstance(schemaProp) ? schemaProp : new Schema(schemaProp))\n const fieldSchemaRef = computed<Schema>(() => createSchema(props.schema ?? {}))\n\n const getPropsFromSchema = (schema: Schema) =>\n schema?.toFieldProps?.({\n ...optionsRef.value,\n get scope() {\n return lazyMerge(\n {} as SchemaExpressionScope,\n optionsRef.value.scope ?? {},\n scopeRef.value,\n )\n },\n })\n const fieldPropsRef = shallowRef(getPropsFromSchema(fieldSchemaRef.value))\n\n watch([fieldSchemaRef, optionsRef], () => {\n fieldPropsRef.value = getPropsFromSchema(fieldSchemaRef.value)\n })\n\n const getBasePath = () => {\n if (props.onlyRenderProperties) {\n return props.basePath ?? parentRef?.value?.address.concat(props.name!)\n }\n return props.basePath ?? parentRef?.value?.address\n }\n\n provide(SchemaSymbol, fieldSchemaRef)\n\n return () => {\n const basePath = getBasePath()\n const fieldProps = fieldPropsRef.value\n\n const generateSlotsByProperties = (scoped = false): SlotMap => {\n if (props.onlyRenderSelf)\n return {}\n const properties = Schema.getOrderProperties(fieldSchemaRef.value)\n if (!properties.length)\n return {}\n const renderMap: Record<string, PropertyRenderFn[]> = {}\n const setRender = (key: string, value: PropertyRenderFn) => {\n if (!renderMap[key]) {\n renderMap[key] = []\n }\n renderMap[key].push(value)\n }\n for (const [index, { schema: item, key: name }] of properties.entries()) {\n let schema: Schema = item\n if (isFn(props.mapProperties)) {\n const mapped = props.mapProperties(item, name)\n if (mapped) {\n schema = mapped\n }\n }\n if (isFn(props.filterProperties) && props.filterProperties(schema, name) === false) {\n continue\n }\n setRender(schema['x-slot'] ?? 'default', (field?: GeneralField) =>\n h(RecursionField, {\n key: `${index}-${name}`,\n schema,\n name,\n basePath: field?.address ?? basePath,\n slot: schema['x-slot'],\n }))\n }\n const slots: SlotMap = {}\n for (const key of Object.keys(renderMap)) {\n const renderFns = renderMap[key]\n const slotRender: SlotRender = scoped\n ? payload => renderFns!.map(fn => fn(payload?.field))\n : () => renderFns!.map(fn => fn())\n slots[key] = slotRender\n }\n return slots\n }\n\n const render = () => {\n if (!isValid(props.name))\n return resolveEmptySlot(generateSlotsByProperties())\n if (fieldSchemaRef.value.type === 'object') {\n if (props.onlyRenderProperties)\n return resolveEmptySlot(generateSlotsByProperties())\n return h(\n ObjectField,\n {\n ...fieldProps,\n name: props.name!,\n basePath,\n },\n generateSlotsByProperties(true) as Slots,\n )\n }\n else if (fieldSchemaRef.value.type === 'array') {\n return h(ArrayField, {\n ...fieldProps,\n name: props.name!,\n basePath,\n })\n }\n else if (fieldSchemaRef.value.type === 'void') {\n if (props.onlyRenderProperties)\n return resolveEmptySlot(generateSlotsByProperties())\n const slots = generateSlotsByProperties(true)\n return h(\n VoidField,\n {\n ...fieldProps,\n name: props.name!,\n basePath,\n },\n slots as Slots,\n )\n }\n\n return h(Field, {\n ...fieldProps,\n name: props.name!,\n basePath,\n })\n }\n\n return render()\n }\n },\n})\n\nexport default RecursionField\n"],"mappings":";;;;;;;;;;;;;AAsBA,SAAS,iBAAiB,OAAgB;CACxC,MAAM,WAAW,OAAO,KAAK,MAAM;AACnC,KAAI,CAAC,SAAS,OACZ,QAAO;CACT,MAAM,WAAW,SAAS,QAAiB,KAAK,QAAQ;EACtD,MAAM,OAAO,MAAM;AACnB,MAAI,CAAC,KACH,QAAO;EACT,MAAM,SAAS,MAAM;AACrB,MAAI,CAAC,QAAQ,OACX,QAAO;EACT,MAAM,gBAAgB,OAAO,QAAO,UAAS,QAAQ,MAAM,CAAC;AAC5D,MAAI,KAAK,GAAG,cAAc;AAC1B,SAAO;IACN,EAAE,CAAC;AACN,KAAI,CAAC,SAAS,OACZ,QAAO;AACT,QAAO,EAAE,UAAU,MAAM,SAAS;;AAGpC,MAAM,iBAAiB,gBAAgB;CACrC,MAAM;CACN,cAAc;CACd,OAAO;CACP,MAAM,OAA4B;EAChC,MAAM,YAAY,UAAU;EAC5B,MAAM,aAAa,OAAO,oBAAoB;EAC9C,MAAM,WAAW,OAAO,4BAA4B;AAEpD,MAAI,CAAC,cAAc,CAAC,SAClB,OAAM,IAAI,MAAM,iDAAiD;EAEnE,MAAM,gBAAgB,eACpB,QAAQ,OAAO,iBAAiB,WAAW,GAAG,aAAa,IAAI,OAAO,WAAW,CAAC;EACpF,MAAM,iBAAiB,eAAuB,aAAa,MAAM,UAAU,EAAE,CAAC,CAAC;EAE/E,MAAM,sBAAsB,WAC1B,QAAQ,eAAe;GACrB,GAAG,WAAW;GACd,IAAI,QAAQ;AACV,WAAO,UACL,EAAE,EACF,WAAW,MAAM,SAAS,EAAE,EAC5B,SAAS,MACV;;GAEJ,CAAC;EACJ,MAAM,gBAAgB,WAAW,mBAAmB,eAAe,MAAM,CAAC;AAE1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