@silver-formily/vue 2.0.4 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,77 +1,75 @@
|
|
|
1
|
-
import { Schema as
|
|
1
|
+
import { Schema as f } from "@formily/json-schema";
|
|
2
2
|
import { lazyMerge as R } from "@formily/shared";
|
|
3
|
-
import { defineComponent as
|
|
3
|
+
import { defineComponent as u, computed as h, provide as i, h as l, Fragment as y, inject as g, shallowRef as j, watch as I } from "vue";
|
|
4
4
|
import "@formily/core";
|
|
5
5
|
import "@formily/reactive-vue";
|
|
6
|
-
import { SchemaMarkupSymbol as
|
|
7
|
-
import { resolveSchemaProps as
|
|
8
|
-
import { schemaFieldProps as k, markupSchemaProps as
|
|
6
|
+
import { SchemaMarkupSymbol as S, SchemaOptionsSymbol as M, SchemaExpressionScopeSymbol as N } from "../shared/context.mjs";
|
|
7
|
+
import { resolveSchemaProps as p } from "../utils/resolveSchemaProps.mjs";
|
|
8
|
+
import { schemaFieldProps as k, markupSchemaProps as v } from "../utils/schemaFieldProps.mjs";
|
|
9
9
|
import D from "./RecursionField.mjs";
|
|
10
|
-
const
|
|
10
|
+
const b = {
|
|
11
11
|
nonameId: 0
|
|
12
12
|
};
|
|
13
13
|
function P() {
|
|
14
|
-
return `NO_NAME_FIELD_$${
|
|
14
|
+
return `NO_NAME_FIELD_$${b.nonameId++}`;
|
|
15
15
|
}
|
|
16
|
-
function $(
|
|
17
|
-
const
|
|
16
|
+
function $(s = {}) {
|
|
17
|
+
const A = u({
|
|
18
18
|
name: "SchemaField",
|
|
19
19
|
inheritAttrs: !1,
|
|
20
20
|
props: k,
|
|
21
21
|
setup(a, { slots: n }) {
|
|
22
|
-
const e =
|
|
23
|
-
() =>
|
|
22
|
+
const e = h(
|
|
23
|
+
() => f.isSchemaInstance(a.schema) ? a.schema : new f({
|
|
24
24
|
type: "object",
|
|
25
25
|
...a.schema
|
|
26
26
|
})
|
|
27
|
-
), o =
|
|
28
|
-
() => R({},
|
|
29
|
-
),
|
|
30
|
-
...
|
|
27
|
+
), o = h(
|
|
28
|
+
() => R({}, s.scope ?? {}, a.scope ?? {})
|
|
29
|
+
), d = h(() => ({
|
|
30
|
+
...s,
|
|
31
31
|
components: {
|
|
32
|
-
...
|
|
32
|
+
...s.components,
|
|
33
33
|
...a.components
|
|
34
34
|
}
|
|
35
35
|
}));
|
|
36
|
-
return
|
|
37
|
-
|
|
38
|
-
const r = n.default?.(),
|
|
36
|
+
return i(S, e), i(M, d), i(N, o), () => {
|
|
37
|
+
b.nonameId = 0;
|
|
38
|
+
const r = n.default?.(), c = Array.isArray(r) ? r : r ? [r] : [], m = l(D, {
|
|
39
39
|
...a,
|
|
40
40
|
schema: e.value
|
|
41
41
|
});
|
|
42
|
-
return
|
|
42
|
+
return l(y, null, [...c, m]);
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
|
-
}),
|
|
45
|
+
}), F = u({
|
|
46
46
|
name: "MarkupField",
|
|
47
47
|
props: {
|
|
48
48
|
type: String,
|
|
49
|
-
...
|
|
49
|
+
...v
|
|
50
50
|
},
|
|
51
51
|
setup(a, { slots: n }) {
|
|
52
|
-
const e = g(
|
|
52
|
+
const e = g(S, null);
|
|
53
53
|
if (!e || !e.value)
|
|
54
54
|
return () => null;
|
|
55
|
-
const o = a.name || P(),
|
|
56
|
-
|
|
57
|
-
e,
|
|
58
|
-
() => {
|
|
55
|
+
const o = a.name || P(), d = (m) => e.value.items ? e.value.addProperty(o, m) : e.value.setItems(p(a)), r = j(), c = () => {
|
|
56
|
+
if (e.value) {
|
|
59
57
|
if (e.value.type === "object" || e.value.type === "void")
|
|
60
|
-
r.value = e.value.addProperty(o,
|
|
58
|
+
r.value = e.value.addProperty(o, p(a));
|
|
61
59
|
else if (e.value.type === "array") {
|
|
62
|
-
const m =
|
|
60
|
+
const m = d(p(a));
|
|
63
61
|
r.value = Array.isArray(m) ? m[0] : m;
|
|
64
62
|
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
), c(
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
return c(), I(e, c), i(S, r), () => l(y, null, n.default?.() ?? []);
|
|
68
66
|
}
|
|
69
|
-
}), t = (a, n) =>
|
|
67
|
+
}), t = (a, n) => u({
|
|
70
68
|
name: n,
|
|
71
|
-
props: { ...
|
|
69
|
+
props: { ...v },
|
|
72
70
|
setup(e, { slots: o }) {
|
|
73
|
-
return () =>
|
|
74
|
-
|
|
71
|
+
return () => l(
|
|
72
|
+
F,
|
|
75
73
|
{
|
|
76
74
|
...e,
|
|
77
75
|
type: a
|
|
@@ -81,8 +79,8 @@ function $(l = {}) {
|
|
|
81
79
|
}
|
|
82
80
|
});
|
|
83
81
|
return {
|
|
84
|
-
SchemaField:
|
|
85
|
-
SchemaMarkupField:
|
|
82
|
+
SchemaField: A,
|
|
83
|
+
SchemaMarkupField: F,
|
|
86
84
|
SchemaStringField: t("string", "SchemaStringField"),
|
|
87
85
|
SchemaObjectField: t("object", "SchemaObjectField"),
|
|
88
86
|
SchemaArrayField: t("array", "SchemaArrayField"),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaField.mjs","sources":["../../src/components/SchemaField.ts"],"sourcesContent":["import type { ISchema, SchemaTypes } from '@formily/json-schema'\r\nimport type {\r\n ISchemaFieldProps,\r\n ISchemaFieldVueFactoryOptions,\r\n SchemaExpressionScope,\r\n SchemaVueComponents,\r\n} from '../types'\r\nimport type { MarkupSchemaProps } from '../utils/schemaFieldProps'\r\nimport { Schema } from '@formily/json-schema'\r\nimport { lazyMerge } from '@formily/shared'\r\nimport { computed, defineComponent, Fragment, h, inject, provide, shallowRef, watch } from 'vue'\r\nimport { SchemaExpressionScopeSymbol, SchemaMarkupSymbol, SchemaOptionsSymbol } from '../shared'\r\nimport { resolveSchemaProps } from '../utils/resolveSchemaProps'\r\nimport { markupSchemaProps, schemaFieldProps } from '../utils/schemaFieldProps'\r\nimport RecursionField from './RecursionField'\r\n\r\nconst env = {\r\n nonameId: 0,\r\n}\r\n\r\nfunction getRandomName() {\r\n return `NO_NAME_FIELD_$${env.nonameId++}`\r\n}\r\n\r\nexport function createSchemaField<Components extends SchemaVueComponents = SchemaVueComponents>(\r\n options: ISchemaFieldVueFactoryOptions<Components> = {},\r\n) {\r\n const SchemaField = defineComponent({\r\n name: 'SchemaField',\r\n inheritAttrs: false,\r\n props: schemaFieldProps,\r\n setup(props: ISchemaFieldProps, { slots }) {\r\n const schemaRef = computed(() =>\r\n Schema.isSchemaInstance(props.schema)\r\n ? props.schema\r\n : new Schema({\r\n type: 'object',\r\n ...props.schema,\r\n }),\r\n )\r\n\r\n const scopeRef = computed<SchemaExpressionScope>(() =>\r\n lazyMerge({} as SchemaExpressionScope, options.scope ?? {}, props.scope ?? {}),\r\n )\r\n\r\n const optionsRef = computed(() => ({\r\n ...options,\r\n components: {\r\n ...options.components,\r\n ...props.components,\r\n },\r\n }))\r\n\r\n provide(SchemaMarkupSymbol, schemaRef)\r\n provide(SchemaOptionsSymbol, optionsRef)\r\n provide(SchemaExpressionScopeSymbol, scopeRef)\r\n\r\n return () => {\r\n env.nonameId = 0\r\n\r\n const slotContent = slots.default?.()\r\n const normalizedSlots = Array.isArray(slotContent)\r\n ? slotContent\r\n : slotContent\r\n ? [slotContent]\r\n : []\r\n\r\n const recursionNode = h(RecursionField, {\r\n ...props,\r\n schema: schemaRef.value,\r\n })\r\n\r\n return h(Fragment, null, [...normalizedSlots, recursionNode])\r\n }\r\n },\r\n })\r\n\r\n const MarkupField = defineComponent({\r\n name: 'MarkupField',\r\n props: {\r\n type: String,\r\n ...markupSchemaProps,\r\n },\r\n setup(props: MarkupSchemaProps, { slots }) {\r\n const parentRef = inject(SchemaMarkupSymbol, null)\r\n if (!parentRef || !parentRef.value)\r\n return () => null\r\n\r\n const name = props.name || getRandomName()\r\n const appendArraySchema = (schema: ISchema) => {\r\n if (parentRef.value.items) {\r\n return parentRef.value.addProperty(name, schema)\r\n }\r\n else {\r\n return parentRef.value.setItems(resolveSchemaProps(props))\r\n }\r\n }\r\n\r\n const schemaRef = shallowRef()\
|
|
1
|
+
{"version":3,"file":"SchemaField.mjs","sources":["../../src/components/SchemaField.ts"],"sourcesContent":["import type { ISchema, SchemaTypes } from '@formily/json-schema'\r\nimport type {\r\n ISchemaFieldProps,\r\n ISchemaFieldVueFactoryOptions,\r\n SchemaExpressionScope,\r\n SchemaVueComponents,\r\n} from '../types'\r\nimport type { MarkupSchemaProps } from '../utils/schemaFieldProps'\r\nimport { Schema } from '@formily/json-schema'\r\nimport { lazyMerge } from '@formily/shared'\r\nimport { computed, defineComponent, Fragment, h, inject, provide, shallowRef, watch } from 'vue'\r\nimport { SchemaExpressionScopeSymbol, SchemaMarkupSymbol, SchemaOptionsSymbol } from '../shared'\r\nimport { resolveSchemaProps } from '../utils/resolveSchemaProps'\r\nimport { markupSchemaProps, schemaFieldProps } from '../utils/schemaFieldProps'\r\nimport RecursionField from './RecursionField'\r\n\r\nconst env = {\r\n nonameId: 0,\r\n}\r\n\r\nfunction getRandomName() {\r\n return `NO_NAME_FIELD_$${env.nonameId++}`\r\n}\r\n\r\nexport function createSchemaField<Components extends SchemaVueComponents = SchemaVueComponents>(\r\n options: ISchemaFieldVueFactoryOptions<Components> = {},\r\n) {\r\n const SchemaField = defineComponent({\r\n name: 'SchemaField',\r\n inheritAttrs: false,\r\n props: schemaFieldProps,\r\n setup(props: ISchemaFieldProps, { slots }) {\r\n const schemaRef = computed(() =>\r\n Schema.isSchemaInstance(props.schema)\r\n ? props.schema\r\n : new Schema({\r\n type: 'object',\r\n ...props.schema,\r\n }),\r\n )\r\n\r\n const scopeRef = computed<SchemaExpressionScope>(() =>\r\n lazyMerge({} as SchemaExpressionScope, options.scope ?? {}, props.scope ?? {}),\r\n )\r\n\r\n const optionsRef = computed(() => ({\r\n ...options,\r\n components: {\r\n ...options.components,\r\n ...props.components,\r\n },\r\n }))\r\n\r\n provide(SchemaMarkupSymbol, schemaRef)\r\n provide(SchemaOptionsSymbol, optionsRef)\r\n provide(SchemaExpressionScopeSymbol, scopeRef)\r\n\r\n return () => {\r\n env.nonameId = 0\r\n\r\n const slotContent = slots.default?.()\r\n const normalizedSlots = Array.isArray(slotContent)\r\n ? slotContent\r\n : slotContent\r\n ? [slotContent]\r\n : []\r\n\r\n const recursionNode = h(RecursionField, {\r\n ...props,\r\n schema: schemaRef.value,\r\n })\r\n\r\n return h(Fragment, null, [...normalizedSlots, recursionNode])\r\n }\r\n },\r\n })\r\n\r\n const MarkupField = defineComponent({\r\n name: 'MarkupField',\r\n props: {\r\n type: String,\r\n ...markupSchemaProps,\r\n },\r\n setup(props: MarkupSchemaProps, { slots }) {\r\n const parentRef = inject(SchemaMarkupSymbol, null)\r\n if (!parentRef || !parentRef.value)\r\n return () => null\r\n\r\n const name = props.name || getRandomName()\r\n const appendArraySchema = (schema: ISchema) => {\r\n if (parentRef.value.items) {\r\n return parentRef.value.addProperty(name, schema)\r\n }\r\n else {\r\n return parentRef.value.setItems(resolveSchemaProps(props))\r\n }\r\n }\r\n\r\n const schemaRef = shallowRef()\n const updateSchema = () => {\n if (!parentRef.value)\n return\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\n // Ensure schema exists before rendering slots during SSR.\n updateSchema()\n watch(parentRef, updateSchema)\n provide(SchemaMarkupSymbol, schemaRef)\r\n\r\n return () => h(Fragment, null, slots.default?.() ?? [])\n },\n })\n\r\n const SchemaFieldFactory = (type: SchemaTypes, name: string) => {\r\n return defineComponent({\r\n name,\r\n props: { ...markupSchemaProps },\r\n setup(props, { slots }) {\r\n return () =>\r\n h(\r\n MarkupField,\r\n {\r\n ...props,\r\n type,\r\n },\r\n slots,\r\n )\r\n },\r\n })\r\n }\r\n\r\n return {\r\n SchemaField,\r\n SchemaMarkupField: MarkupField,\r\n SchemaStringField: SchemaFieldFactory('string', 'SchemaStringField'),\r\n SchemaObjectField: SchemaFieldFactory('object', 'SchemaObjectField'),\r\n SchemaArrayField: SchemaFieldFactory('array', 'SchemaArrayField'),\r\n SchemaBooleanField: SchemaFieldFactory('boolean', 'SchemaBooleanField'),\r\n SchemaDateField: SchemaFieldFactory('date', 'SchemaDateField'),\r\n SchemaDateTimeField: SchemaFieldFactory('datetime', 'SchemaDatetimeField'),\r\n SchemaVoidField: SchemaFieldFactory('void', 'SchemaVoidField'),\r\n SchemaNumberField: SchemaFieldFactory('number', 'SchemaNumberField'),\r\n }\r\n}\r\n"],"names":["env","getRandomName","createSchemaField","options","SchemaField","defineComponent","schemaFieldProps","props","slots","schemaRef","computed","Schema","scopeRef","lazyMerge","optionsRef","provide","SchemaMarkupSymbol","SchemaOptionsSymbol","SchemaExpressionScopeSymbol","slotContent","normalizedSlots","recursionNode","h","RecursionField","Fragment","MarkupField","markupSchemaProps","parentRef","inject","name","appendArraySchema","schema","resolveSchemaProps","shallowRef","updateSchema","watch","SchemaFieldFactory","type"],"mappings":";;;;;;;;;AAgBA,MAAMA,IAAM;AAAA,EACV,UAAU;AACZ;AAEA,SAASC,IAAgB;AACvB,SAAO,kBAAkBD,EAAI,UAAU;AACzC;AAEO,SAASE,EACdC,IAAqD,IACrD;AACA,QAAMC,IAAcC,EAAgB;AAAA,IAClC,MAAM;AAAA,IACN,cAAc;AAAA,IACd,OAAOC;AAAA,IACP,MAAMC,GAA0B,EAAE,OAAAC,KAAS;AACzC,YAAMC,IAAYC;AAAA,QAAS,MACzBC,EAAO,iBAAiBJ,EAAM,MAAM,IAChCA,EAAM,SACN,IAAII,EAAO;AAAA,UACX,MAAM;AAAA,UACN,GAAGJ,EAAM;AAAA,QAAA,CACV;AAAA,MAAA,GAGCK,IAAWF;AAAA,QAAgC,MAC/CG,EAAU,CAAA,GAA6BV,EAAQ,SA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-
"description": "Vue3 版本的 @formily/vue",
|
|
6
|
-
"author": "hezhengxu",
|
|
7
|
-
"license": "MIT",
|
|
8
|
-
"exports": {
|
|
9
|
-
".":
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"lint
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"@formily/
|
|
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
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@silver-formily/vue",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "2.1.1",
|
|
5
|
+
"description": "Vue3 版本的 @formily/vue",
|
|
6
|
+
"author": "hezhengxu",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./esm/index.d.ts",
|
|
11
|
+
"import": "./esm/index.mjs",
|
|
12
|
+
"default": "./esm/index.mjs"
|
|
13
|
+
},
|
|
14
|
+
"./*": "./esm/*"
|
|
15
|
+
},
|
|
16
|
+
"main": "./esm/index.mjs",
|
|
17
|
+
"types": "./esm/index.d.ts",
|
|
18
|
+
"files": [
|
|
19
|
+
"esm"
|
|
20
|
+
],
|
|
21
|
+
"scripts": {
|
|
22
|
+
"build": "vite build",
|
|
23
|
+
"lint": "eslint .",
|
|
24
|
+
"lint:fix": "eslint . --fix",
|
|
25
|
+
"docs:dev": "vitepress dev docs",
|
|
26
|
+
"docs:build": "vitepress build docs",
|
|
27
|
+
"commit": "czg",
|
|
28
|
+
"lint-staged": "lint-staged",
|
|
29
|
+
"release": "release-it",
|
|
30
|
+
"prepare": "husky"
|
|
31
|
+
},
|
|
32
|
+
"peerDependencies": {
|
|
33
|
+
"@formily/core": "^2",
|
|
34
|
+
"@formily/json-schema": "^2",
|
|
35
|
+
"@formily/reactive": "^2",
|
|
36
|
+
"@formily/reactive-vue": "^2",
|
|
37
|
+
"@formily/shared": "^2",
|
|
38
|
+
"vue": "^3.3.0"
|
|
39
|
+
},
|
|
40
|
+
"config": {
|
|
41
|
+
"commitizen": {
|
|
42
|
+
"path": "./node_modules/cz-git"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@antfu/eslint-config": "^5.2.1",
|
|
47
|
+
"@commitlint/config-conventional": "^19.8.1",
|
|
48
|
+
"@element-plus/icons-vue": "^2.3.2",
|
|
49
|
+
"@formily/validator": "^2.3.7",
|
|
50
|
+
"@release-it/conventional-changelog": "^10.0.4",
|
|
51
|
+
"@shikijs/vitepress-twoslash": "^3.21.0",
|
|
52
|
+
"@types/node": "^24.3.0",
|
|
53
|
+
"@vitejs/plugin-vue": "^6.0.3",
|
|
54
|
+
"@vitejs/plugin-vue-jsx": "^5.1.3",
|
|
55
|
+
"commitlint": "^19.8.1",
|
|
56
|
+
"cz-git": "^1.12.0",
|
|
57
|
+
"czg": "^1.12.0",
|
|
58
|
+
"element-plus": "^2.13.0",
|
|
59
|
+
"eslint": "^9.33.0",
|
|
60
|
+
"eslint-plugin-format": "^1.3.1",
|
|
61
|
+
"fast-glob": "^3.3.3",
|
|
62
|
+
"husky": "^9.1.7",
|
|
63
|
+
"lint-staged": "^16.1.6",
|
|
64
|
+
"markdown-it-container": "^4.0.0",
|
|
65
|
+
"release-it": "^19.2.3",
|
|
66
|
+
"sass-embedded": "^1.97.2",
|
|
67
|
+
"typescript": "^5.9.2",
|
|
68
|
+
"unplugin-dts": "1.0.0-beta.6",
|
|
69
|
+
"unplugin-vue-macros": "^2.14.5",
|
|
70
|
+
"vite": "^7.3.1",
|
|
71
|
+
"vitepress": "2.0.0-alpha.15",
|
|
72
|
+
"vitepress-better-demo-plugin": "^0.6.2",
|
|
73
|
+
"vitepress-plugin-group-icons": "^1.6.5",
|
|
74
|
+
"vitepress-theme-element-plus": "^1.1.4"
|
|
75
|
+
},
|
|
76
|
+
"lint-staged": {
|
|
77
|
+
"*.{vue,js,ts,jsx,tsx,md,json}": "eslint --fix"
|
|
78
|
+
}
|
|
79
|
+
}
|