@schemx/vue 1.0.0 → 1.1.0
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.md +509 -324
- package/dist/analyze.html +1 -1
- package/dist/bridge/fieldBridge.d.ts +12 -0
- package/dist/bridge/fieldBridge.d.ts.map +1 -1
- package/dist/bridge/formBridge.d.ts +35 -2
- package/dist/bridge/formBridge.d.ts.map +1 -1
- package/dist/bridge/formInstance.d.ts +24 -4
- package/dist/bridge/formInstance.d.ts.map +1 -1
- package/dist/bridge/helpers.d.ts +8 -0
- package/dist/bridge/helpers.d.ts.map +1 -1
- package/dist/bridge/index.d.ts +2 -3
- package/dist/bridge/index.d.ts.map +1 -1
- package/dist/bridge/types.d.ts +97 -9
- package/dist/bridge/types.d.ts.map +1 -1
- package/dist/bridge/viewSchemaBridge.d.ts +14 -1
- package/dist/bridge/viewSchemaBridge.d.ts.map +1 -1
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Button/index.vue.d.ts +12 -0
- package/dist/components/Button/index.vue.d.ts.map +1 -1
- package/dist/components/Button/types.d.ts +15 -5
- package/dist/components/Button/types.d.ts.map +1 -1
- package/dist/components/Col/index.d.ts +27 -5
- package/dist/components/Col/index.d.ts.map +1 -1
- package/dist/components/ConfigProvider/index.d.ts +40 -7
- package/dist/components/ConfigProvider/index.d.ts.map +1 -1
- package/dist/components/Dynamic/index.d.ts +27 -17
- package/dist/components/Dynamic/index.d.ts.map +1 -1
- package/dist/components/Field/index.d.ts +13 -2
- package/dist/components/Field/index.d.ts.map +1 -1
- package/dist/components/Field/slot.d.ts +34 -10
- package/dist/components/Field/slot.d.ts.map +1 -1
- package/dist/components/Group/index.d.ts +37 -8
- package/dist/components/Group/index.d.ts.map +1 -1
- package/dist/components/Group/slot.d.ts +36 -9
- package/dist/components/Group/slot.d.ts.map +1 -1
- package/dist/components/Icon/index.d.ts +29 -0
- package/dist/components/Icon/index.d.ts.map +1 -0
- package/dist/components/Row/index.d.ts +30 -0
- package/dist/components/Row/index.d.ts.map +1 -0
- package/dist/components/SchemaList/index.d.ts +22 -12
- package/dist/components/SchemaList/index.d.ts.map +1 -1
- package/dist/components/Wrapper/index.vue.d.ts +6 -0
- package/dist/components/Wrapper/index.vue.d.ts.map +1 -1
- package/dist/config/defaultVueSchemaConfig.d.ts +62 -0
- package/dist/config/defaultVueSchemaConfig.d.ts.map +1 -0
- package/dist/config/index.d.ts +12 -2
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/vueConfig.d.ts +14 -3
- package/dist/config/vueConfig.d.ts.map +1 -1
- package/dist/context/configProviderContext.d.ts +66 -0
- package/dist/context/configProviderContext.d.ts.map +1 -0
- package/dist/context/fieldContext.d.ts +11 -0
- package/dist/context/fieldContext.d.ts.map +1 -0
- package/dist/context/formContext.d.ts +167 -0
- package/dist/context/formContext.d.ts.map +1 -0
- package/dist/context/index.d.ts +18 -0
- package/dist/context/index.d.ts.map +1 -0
- package/dist/form.d.ts +10 -2
- package/dist/form.d.ts.map +1 -1
- package/dist/hocs/withRemoteOptions.d.ts +6 -2
- package/dist/hocs/withRemoteOptions.d.ts.map +1 -1
- package/dist/hooks/index.d.ts +23 -15
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/useDictionary.d.ts +32 -9
- package/dist/hooks/useDictionary.d.ts.map +1 -1
- package/dist/hooks/useField.d.ts +7 -0
- package/dist/hooks/useField.d.ts.map +1 -1
- package/dist/hooks/useForm.d.ts +4 -16
- package/dist/hooks/useForm.d.ts.map +1 -1
- package/dist/hooks/useFormSelector.d.ts.map +1 -1
- package/dist/hooks/useViewSchemas.d.ts +26 -2
- package/dist/hooks/useViewSchemas.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +35 -13
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +684 -357
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/definition.d.ts +248 -0
- package/dist/types/definition.d.ts.map +1 -0
- package/dist/types/dictionary.d.ts +9 -3
- package/dist/types/dictionary.d.ts.map +1 -1
- package/dist/types/field.d.ts +93 -21
- package/dist/types/field.d.ts.map +1 -1
- package/dist/types/form.d.ts +82 -6
- package/dist/types/form.d.ts.map +1 -1
- package/dist/types/icon.d.ts +15 -0
- package/dist/types/icon.d.ts.map +1 -0
- package/dist/types/index.d.ts +2 -15
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/layout.d.ts +89 -13
- package/dist/types/layout.d.ts.map +1 -1
- package/dist/utils/diff.d.ts +3 -6
- package/dist/utils/diff.d.ts.map +1 -1
- package/dist/utils/dynamic.d.ts +6 -2
- package/dist/utils/dynamic.d.ts.map +1 -1
- package/dist/utils/equal.d.ts +2 -2
- package/dist/utils/helpers.d.ts +26 -2
- package/dist/utils/helpers.d.ts.map +1 -1
- package/dist/utils/index.d.ts +19 -4
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/layout.d.ts +17 -0
- package/dist/utils/layout.d.ts.map +1 -0
- package/dist/utils/rendererProvider.d.ts +10 -3
- package/dist/utils/rendererProvider.d.ts.map +1 -1
- package/dist/utils/validation.d.ts +6 -2
- package/dist/utils/validation.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/config/appConfig.d.ts +0 -19
- package/dist/config/appConfig.d.ts.map +0 -1
- package/dist/config/providerConfig.d.ts +0 -22
- package/dist/config/providerConfig.d.ts.map +0 -1
- package/dist/hooks/provideFieldContext.d.ts +0 -40
- package/dist/hooks/provideFieldContext.d.ts.map +0 -1
- package/dist/hooks/provideFormConfigContext.d.ts +0 -71
- package/dist/hooks/provideFormConfigContext.d.ts.map +0 -1
- package/dist/hooks/provideFormContext.d.ts +0 -26
- package/dist/hooks/provideFormContext.d.ts.map +0 -1
- package/dist/utils/colProvider.d.ts +0 -20
- package/dist/utils/colProvider.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Button/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,KAAK,CAAA;AAE/C;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;AAE3D;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAC7C,oBAAoB,EACpB,UAAU,GAAG,MAAM,CACpB;IACC
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Button/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,KAAK,CAAA;AAE/C;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;AAE3D;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAC7C,oBAAoB,EACpB,UAAU,GAAG,MAAM,CACpB;IACC;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAA;IACrC;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAA;CACxB"}
|
|
@@ -1,30 +1,52 @@
|
|
|
1
1
|
import { PropType, VNodeChild } from 'vue';
|
|
2
|
-
import { SchemxColComponent } from '../../types/layout';
|
|
3
|
-
import { SchemxLayout } from '@schemx/core';
|
|
2
|
+
import { SchemxColComponent, SchemxColConfig, SchemxLayout } from '../../types/layout';
|
|
4
3
|
declare const Col: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
5
|
-
|
|
6
|
-
type: PropType<
|
|
4
|
+
col: {
|
|
5
|
+
type: PropType<SchemxColConfig>;
|
|
7
6
|
required: false;
|
|
8
7
|
default: undefined;
|
|
9
8
|
};
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated 请在 Form 或 ConfigProvider 的 `colComponent` 中配置实现,见 {@link import("@schemx/core").SchemxConfig}。
|
|
11
|
+
*/
|
|
10
12
|
component: {
|
|
11
13
|
type: PropType<SchemxColComponent>;
|
|
12
14
|
required: false;
|
|
13
15
|
default: undefined;
|
|
14
16
|
};
|
|
15
|
-
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated 请改用 {@link import("../../types/layout").SchemxColProps.col}。
|
|
19
|
+
*/
|
|
16
20
|
layout: {
|
|
17
21
|
type: PropType<SchemxLayout>;
|
|
18
22
|
required: false;
|
|
19
23
|
default: undefined;
|
|
20
24
|
};
|
|
25
|
+
}>, () => VNodeChild, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
26
|
+
col: {
|
|
27
|
+
type: PropType<SchemxColConfig>;
|
|
28
|
+
required: false;
|
|
29
|
+
default: undefined;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* @deprecated 请在 Form 或 ConfigProvider 的 `colComponent` 中配置实现,见 {@link import("@schemx/core").SchemxConfig}。
|
|
33
|
+
*/
|
|
21
34
|
component: {
|
|
22
35
|
type: PropType<SchemxColComponent>;
|
|
23
36
|
required: false;
|
|
24
37
|
default: undefined;
|
|
25
38
|
};
|
|
39
|
+
/**
|
|
40
|
+
* @deprecated 请改用 {@link import("../../types/layout").SchemxColProps.col}。
|
|
41
|
+
*/
|
|
42
|
+
layout: {
|
|
43
|
+
type: PropType<SchemxLayout>;
|
|
44
|
+
required: false;
|
|
45
|
+
default: undefined;
|
|
46
|
+
};
|
|
26
47
|
}>> & Readonly<{}>, {
|
|
27
48
|
layout: SchemxLayout;
|
|
49
|
+
col: SchemxColConfig;
|
|
28
50
|
component: SchemxColComponent;
|
|
29
51
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
30
52
|
export default Col;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Col/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAyC,KAAK,QAAQ,EAAS,MAAM,KAAK,CAAA;AACjF,OAAO,KAAK,EAA0B,UAAU,EAAE,MAAM,KAAK,CAAA;AAI7D,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Col/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAyC,KAAK,QAAQ,EAAS,MAAM,KAAK,CAAA;AACjF,OAAO,KAAK,EAA0B,UAAU,EAAE,MAAM,KAAK,CAAA;AAI7D,OAAO,KAAK,EACV,kBAAkB,EAClB,eAAe,EACf,YAAY,EACb,MAAM,oBAAoB,CAAA;AAE3B,QAAA,MAAM,GAAG;;cAMa,QAAQ,CAAC,eAAe,CAAC;;;;IAI3C;;OAEG;;cAE2B,QAAQ,CAAC,kBAAkB,CAAC;;;;IAI1D;;OAEG;;cAEe,QAAQ,CAAC,YAAY,CAAC;;;;UAuB7B,UAAU;;cAvCH,QAAQ,CAAC,eAAe,CAAC;;;;IAI3C;;OAEG;;cAE2B,QAAQ,CAAC,kBAAkB,CAAC;;;;IAI1D;;OAEG;;cAEe,QAAQ,CAAC,YAAY,CAAC;;;;;;;;4EAkF1C,CAAA;AAEF,eAAe,GAAG,CAAA"}
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
-
import { SchemxColComponent,
|
|
3
|
-
import { PresetRuleRegistry, RendererRegistry, SchemxRendererKey, SchemxRendererPropsMap, SchemxSchemaConfig, ValidationAdapterOption, Values } from '@schemx/core';
|
|
4
|
-
/**
|
|
5
|
-
|
|
2
|
+
import { SchemxColComponent, SchemxIconComponent, SchemxRowComponent, SchemxRowConfig } from '../../types';
|
|
3
|
+
import { PresetRuleRegistry, RendererRegistry, SchemxConfig, SchemxRendererKey, SchemxRendererPropsMap, SchemxSchemaConfig, ValidationAdapterOption, Values } from '@schemx/core';
|
|
4
|
+
/**
|
|
5
|
+
* ConfigProvider 的公开 Props。
|
|
6
|
+
*
|
|
7
|
+
* 配置会按组件树继承;子级 Provider 的非空配置覆盖父级同名配置。
|
|
8
|
+
*
|
|
9
|
+
* @typeParam TValues - 表单值类型。
|
|
10
|
+
*/
|
|
11
|
+
export type ConfigProviderProps<TValues extends Values = Values> = SchemxConfig<TValues>;
|
|
6
12
|
declare const ConfigProvider: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
7
13
|
schemaConfig: {
|
|
8
14
|
type: PropType<Partial<SchemxSchemaConfig>>;
|
|
@@ -32,6 +38,18 @@ declare const ConfigProvider: import('vue').DefineComponent<import('vue').Extrac
|
|
|
32
38
|
type: PropType<SchemxColComponent>;
|
|
33
39
|
default: undefined;
|
|
34
40
|
};
|
|
41
|
+
rowComponent: {
|
|
42
|
+
type: PropType<SchemxRowComponent>;
|
|
43
|
+
default: undefined;
|
|
44
|
+
};
|
|
45
|
+
iconComponent: {
|
|
46
|
+
type: PropType<SchemxIconComponent>;
|
|
47
|
+
default: undefined;
|
|
48
|
+
};
|
|
49
|
+
row: {
|
|
50
|
+
type: PropType<SchemxRowConfig>;
|
|
51
|
+
default: undefined;
|
|
52
|
+
};
|
|
35
53
|
}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
36
54
|
[key: string]: any;
|
|
37
55
|
}>[] | undefined, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
@@ -63,16 +81,31 @@ declare const ConfigProvider: import('vue').DefineComponent<import('vue').Extrac
|
|
|
63
81
|
type: PropType<SchemxColComponent>;
|
|
64
82
|
default: undefined;
|
|
65
83
|
};
|
|
84
|
+
rowComponent: {
|
|
85
|
+
type: PropType<SchemxRowComponent>;
|
|
86
|
+
default: undefined;
|
|
87
|
+
};
|
|
88
|
+
iconComponent: {
|
|
89
|
+
type: PropType<SchemxIconComponent>;
|
|
90
|
+
default: undefined;
|
|
91
|
+
};
|
|
92
|
+
row: {
|
|
93
|
+
type: PropType<SchemxRowConfig>;
|
|
94
|
+
default: undefined;
|
|
95
|
+
};
|
|
66
96
|
}>> & Readonly<{}>, {
|
|
67
|
-
|
|
97
|
+
row: SchemxRowConfig;
|
|
68
98
|
schemaConfig: Partial<SchemxSchemaConfig>;
|
|
69
99
|
rendererProps: Partial<{
|
|
70
|
-
[x: string]: Partial<Omit<import('@schemx/core').
|
|
100
|
+
[x: string]: Partial<Omit<import('@schemx/core').SchemxComponentProps<Values, string>, "value" | "onUpdate:value" | "formInstance" | "formItemProps">>;
|
|
71
101
|
}>;
|
|
72
102
|
validatorAdapters: readonly ValidationAdapterOption[];
|
|
73
103
|
defaultRendererType: string;
|
|
74
|
-
rendererRegistry: RendererRegistry
|
|
104
|
+
rendererRegistry: RendererRegistry;
|
|
75
105
|
presetRuleRegistry: PresetRuleRegistry;
|
|
106
|
+
colComponent: SchemxColComponent;
|
|
107
|
+
rowComponent: SchemxRowComponent;
|
|
108
|
+
iconComponent: SchemxIconComponent;
|
|
76
109
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
77
110
|
export default ConfigProvider;
|
|
78
111
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ConfigProvider/index.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAA6B,KAAK,QAAQ,EAAE,MAAM,KAAK,CAAA;AAI9D,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ConfigProvider/index.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAA6B,KAAK,QAAQ,EAAE,MAAM,KAAK,CAAA;AAI9D,OAAO,KAAK,EACV,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EAChB,MAAM,aAAa,CAAA;AACpB,OAAO,KAAK,EACV,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,EACjB,sBAAsB,EACtB,kBAAkB,EAClB,uBAAuB,EACvB,MAAM,EACP,MAAM,cAAc,CAAA;AAErB;;;;;;GAMG;AACH,MAAM,MAAM,mBAAmB,CAAC,OAAO,SAAS,MAAM,GAAG,MAAM,IAAI,YAAY,CAAC,OAAO,CAAC,CAAA;AAExF,QAAA,MAAM,cAAc;;cAME,QAAQ,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;;;;cAIrC,QAAQ,CAAC,sBAAsB,CAAC;;;;cAIjC,QAAQ,CAAC,SAAS,uBAAuB,EAAE,CAAC;;;;cAI3C,QAAQ,CAAC,iBAAiB,CAAC;;;;cAI3B,QAAQ,CAAC,gBAAgB,CAAC;;;;cAI1B,QAAQ,CAAC,kBAAkB,CAAC;;;;cAIhB,QAAQ,CAAC,kBAAkB,CAAC;;;;cAI5B,QAAQ,CAAC,kBAAkB,CAAC;;;;cAI5B,QAAQ,CAAC,mBAAmB,CAAC;;;;cAIzC,QAAQ,CAAC,eAAe,CAAC;;;;;;;cApCzB,QAAQ,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;;;;cAIrC,QAAQ,CAAC,sBAAsB,CAAC;;;;cAIjC,QAAQ,CAAC,SAAS,uBAAuB,EAAE,CAAC;;;;cAI3C,QAAQ,CAAC,iBAAiB,CAAC;;;;cAI3B,QAAQ,CAAC,gBAAgB,CAAC;;;;cAI1B,QAAQ,CAAC,kBAAkB,CAAC;;;;cAIhB,QAAQ,CAAC,kBAAkB,CAAC;;;;cAI5B,QAAQ,CAAC,kBAAkB,CAAC;;;;cAI5B,QAAQ,CAAC,mBAAmB,CAAC;;;;cAIzC,QAAQ,CAAC,eAAe,CAAC;;;;;;;;;;;;;;;;4EAgC7C,CAAA;AAEF,eAAe,cAAc,CAAA"}
|
|
@@ -1,46 +1,56 @@
|
|
|
1
1
|
import { PropType, VNodeChild } from 'vue';
|
|
2
|
+
import { SchemxRowConfig } from '../../types/layout';
|
|
2
3
|
import { SchemxViewDynamicSchema, SchemxViewSchema } from '@schemx/core';
|
|
3
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* Dynamic 组件属性。
|
|
6
|
+
*/
|
|
4
7
|
export interface SchemxDynamicProps {
|
|
5
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* 当前 Dynamic 数组的 ViewSchema。
|
|
10
|
+
*/
|
|
6
11
|
schema: SchemxViewDynamicSchema;
|
|
7
|
-
/** 当前 Form 根级 ViewSchema,用于计算字段区段样式。 */
|
|
8
|
-
viewSchemas: readonly SchemxViewSchema[];
|
|
9
12
|
/**
|
|
10
|
-
*
|
|
13
|
+
* 从 Form 或父级 Schema 继承的 Row 配置。
|
|
14
|
+
*/
|
|
15
|
+
rowConfig?: SchemxRowConfig;
|
|
16
|
+
/**
|
|
17
|
+
* 由 SchemaList 提供的子级 Schema 渲染回调。
|
|
18
|
+
*
|
|
19
|
+
* @param schemas - 当前数组项的子级 ViewSchema。
|
|
20
|
+
* @param rowConfig - 当前数组项继承到的 Row 配置。
|
|
11
21
|
*/
|
|
12
|
-
renderChildren
|
|
22
|
+
renderChildren: (schemas: readonly SchemxViewSchema[], rowConfig?: SchemxRowConfig) => VNodeChild;
|
|
13
23
|
}
|
|
14
24
|
declare const Dynamic: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
15
25
|
schema: {
|
|
16
26
|
type: PropType<SchemxViewDynamicSchema>;
|
|
17
27
|
required: true;
|
|
18
28
|
};
|
|
19
|
-
|
|
20
|
-
type: PropType<
|
|
21
|
-
required:
|
|
29
|
+
rowConfig: {
|
|
30
|
+
type: PropType<SchemxRowConfig>;
|
|
31
|
+
required: false;
|
|
32
|
+
default: undefined;
|
|
22
33
|
};
|
|
23
34
|
renderChildren: {
|
|
24
35
|
type: PropType<SchemxDynamicProps["renderChildren"]>;
|
|
25
|
-
required:
|
|
26
|
-
default: undefined;
|
|
36
|
+
required: true;
|
|
27
37
|
};
|
|
28
38
|
}>, () => VNodeChild, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
29
39
|
schema: {
|
|
30
40
|
type: PropType<SchemxViewDynamicSchema>;
|
|
31
41
|
required: true;
|
|
32
42
|
};
|
|
33
|
-
|
|
34
|
-
type: PropType<
|
|
35
|
-
required:
|
|
43
|
+
rowConfig: {
|
|
44
|
+
type: PropType<SchemxRowConfig>;
|
|
45
|
+
required: false;
|
|
46
|
+
default: undefined;
|
|
36
47
|
};
|
|
37
48
|
renderChildren: {
|
|
38
49
|
type: PropType<SchemxDynamicProps["renderChildren"]>;
|
|
39
|
-
required:
|
|
40
|
-
default: undefined;
|
|
50
|
+
required: true;
|
|
41
51
|
};
|
|
42
52
|
}>> & Readonly<{}>, {
|
|
43
|
-
|
|
53
|
+
rowConfig: SchemxRowConfig;
|
|
44
54
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
45
55
|
export default Dynamic;
|
|
46
56
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Dynamic/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Dynamic/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAI/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACzD,OAAO,KAAK,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAE7E;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,MAAM,EAAE,uBAAuB,CAAA;IAC/B;;OAEG;IACH,SAAS,CAAC,EAAE,eAAe,CAAA;IAC3B;;;;;OAKG;IACH,cAAc,EAAE,CACd,OAAO,EAAE,SAAS,gBAAgB,EAAE,EACpC,SAAS,CAAC,EAAE,eAAe,KACxB,UAAU,CAAA;CAChB;AAED,QAAA,MAAM,OAAO;;cAMS,QAAQ,CAAC,uBAAuB,CAAC;;;;cAIjC,QAAQ,CAAC,eAAe,CAAC;;;;;cAKvB,QAAQ,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;;;UAWvD,UAAU;;cApBH,QAAQ,CAAC,uBAAuB,CAAC;;;;cAIjC,QAAQ,CAAC,eAAe,CAAC;;;;;cAKvB,QAAQ,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;;;;;4EAqCpE,CAAA;AAEF,eAAe,OAAO,CAAA"}
|
|
@@ -1,12 +1,23 @@
|
|
|
1
|
-
import { PropType, ClassValue, StyleValue, VNodeChild } from 'vue';
|
|
1
|
+
import { PropType, ClassValue, SlotsType, StyleValue, VNodeChild } from 'vue';
|
|
2
|
+
import { SchemxFieldSlots } from '../../types/field';
|
|
3
|
+
import { Values } from '@schemx/core';
|
|
2
4
|
/**
|
|
3
5
|
* Field 属性。
|
|
4
6
|
*
|
|
5
7
|
* 提供待渲染的字段 ViewSchema。
|
|
6
8
|
*/
|
|
7
9
|
export interface SchemxFieldProps {
|
|
10
|
+
/**
|
|
11
|
+
* 当前字段的已解析 ViewSchema。
|
|
12
|
+
*/
|
|
8
13
|
schema: unknown;
|
|
14
|
+
/**
|
|
15
|
+
* 追加到字段外层包装器的 CSS 类名。
|
|
16
|
+
*/
|
|
9
17
|
class?: ClassValue;
|
|
18
|
+
/**
|
|
19
|
+
* 追加到字段外层包装器的内联样式。
|
|
20
|
+
*/
|
|
10
21
|
style?: StyleValue;
|
|
11
22
|
}
|
|
12
23
|
declare const Field: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
@@ -42,6 +53,6 @@ declare const Field: import('vue').DefineComponent<import('vue').ExtractPropType
|
|
|
42
53
|
}>> & Readonly<{}>, {
|
|
43
54
|
class: ClassValue;
|
|
44
55
|
style: StyleValue;
|
|
45
|
-
},
|
|
56
|
+
}, SlotsType<SchemxFieldSlots<Values>>, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
46
57
|
export default Field;
|
|
47
58
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Field/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAA6B,QAAQ,EAAE,MAAM,KAAK,CAAA;AACzD,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Field/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAA6B,QAAQ,EAAE,MAAM,KAAK,CAAA;AACzD,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAoBxE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AACzD,OAAO,KAAK,EAKV,MAAM,EACP,MAAM,cAAc,CAAA;AAErB;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,MAAM,EAAE,OAAO,CAAA;IACf;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAA;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAA;CACnB;AAED,QAAA,MAAM,KAAK;;cAMW,QAAQ,CAAC,OAAO,CAAC;;;;cAIS,QAAQ,CAAC,UAAU,CAAC;;;;;cAK7B,QAAQ,CAAC,UAAU,CAAC;;;;UAoI5C,UAAU;;cA7IH,QAAQ,CAAC,OAAO,CAAC;;;;cAIS,QAAQ,CAAC,UAAU,CAAC;;;;;cAK7B,QAAQ,CAAC,UAAU,CAAC;;;;;;;6GA6LzD,CAAA;AAEF,eAAe,KAAK,CAAA"}
|
|
@@ -1,26 +1,50 @@
|
|
|
1
1
|
import { ShallowRef, Slots, VNodeChild } from 'vue';
|
|
2
|
-
import {
|
|
2
|
+
import { FormConfigContextValue } from '../../context/formContext';
|
|
3
3
|
import { FieldInstance } from '../../types/field';
|
|
4
4
|
import { SchemxComponentProps, SchemxInstance, SchemxViewFieldSchema, Values } from '@schemx/core';
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* Field 插槽渲染所需的状态与依赖。
|
|
7
|
+
*/
|
|
6
8
|
interface FieldSlotRendererOptions<TValues extends Values = Values> {
|
|
7
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* 当前字段 ViewSchema。
|
|
11
|
+
*/
|
|
8
12
|
schemaRef: Readonly<ShallowRef<SchemxViewFieldSchema<TValues>>>;
|
|
9
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* 当前字段的响应式控制器。
|
|
15
|
+
*/
|
|
10
16
|
field: FieldInstance<TValues>;
|
|
11
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* 当前表单实例,用于解析 Renderer。
|
|
19
|
+
*/
|
|
12
20
|
form: SchemxInstance<TValues>;
|
|
13
|
-
/**
|
|
14
|
-
|
|
15
|
-
|
|
21
|
+
/**
|
|
22
|
+
* 表单级展示配置。
|
|
23
|
+
*/
|
|
24
|
+
formContext: FormConfigContextValue;
|
|
25
|
+
/**
|
|
26
|
+
* 传给 Renderer 的稳定属性。
|
|
27
|
+
*/
|
|
16
28
|
componentProps: Readonly<ShallowRef<SchemxComponentProps<TValues>>>;
|
|
17
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* 父组件传入的所有具名插槽。
|
|
31
|
+
*/
|
|
18
32
|
slots: Slots;
|
|
19
33
|
}
|
|
20
34
|
/**
|
|
21
35
|
* 创建 Field 各区域的插槽渲染函数。
|
|
22
36
|
*
|
|
23
|
-
*
|
|
37
|
+
* 字段依次渲染 Before、主体(Label + Content)、Error、After。
|
|
38
|
+
* Label 和 Error 插槽只替换各自容器内的内容。
|
|
39
|
+
*
|
|
40
|
+
* @param options - Field 插槽渲染所需的响应式状态和 Vue 插槽集合。
|
|
41
|
+
* @returns 各字段区域的插槽渲染函数及统一 Slot Props 构造器。
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```ts
|
|
45
|
+
* const renderers = createFieldSlotRenderers(options)
|
|
46
|
+
* renderers.renderContent()
|
|
47
|
+
* ```
|
|
24
48
|
*/
|
|
25
49
|
export declare function createFieldSlotRenderers<TValues extends Values = Values>(options: FieldSlotRendererOptions<TValues>): {
|
|
26
50
|
createSlotProps: (additionalProps?: Record<string, unknown>) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slot.d.ts","sourceRoot":"","sources":["../../../src/components/Field/slot.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"slot.d.ts","sourceRoot":"","sources":["../../../src/components/Field/slot.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAa,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAOnE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAA;AACvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACtD,OAAO,KAAK,EACV,oBAAoB,EACpB,cAAc,EACd,qBAAqB,EACrB,MAAM,EACP,MAAM,cAAc,CAAA;AAErB;;GAEG;AACH,UAAU,wBAAwB,CAAC,OAAO,SAAS,MAAM,GAAG,MAAM;IAChE;;OAEG;IACH,SAAS,EAAE,QAAQ,CAAC,UAAU,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;IAC/D;;OAEG;IACH,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC,CAAA;IAC7B;;OAEG;IACH,IAAI,EAAE,cAAc,CAAC,OAAO,CAAC,CAAA;IAC7B;;OAEG;IACH,WAAW,EAAE,sBAAsB,CAAA;IACnC;;OAEG;IACH,cAAc,EAAE,QAAQ,CAAC,UAAU,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;IACnE;;OAEG;IACH,KAAK,EAAE,KAAK,CAAA;CACb;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,SAAS,MAAM,GAAG,MAAM,EACtE,OAAO,EAAE,wBAAwB,CAAC,OAAO,CAAC;wCA6BA,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;;;uBAgIzC,UAAU;wBArDT,UAAU;yBAKT,UAAU;uBAqDZ,UAAU;uBA3GV,UAAU;EA2InC"}
|
|
@@ -1,22 +1,45 @@
|
|
|
1
|
-
import { PropType,
|
|
1
|
+
import { ClassValue, PropType, SlotsType, StyleValue, VNodeChild } from 'vue';
|
|
2
|
+
import { SchemxGroupSlots } from '../../types/field';
|
|
3
|
+
import { SchemxRowConfig } from '../../types/layout';
|
|
2
4
|
import { SchemxViewGroupSchema, SchemxViewSchema } from '@schemx/core';
|
|
3
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* Group Props。
|
|
7
|
+
*/
|
|
4
8
|
export interface SchemxGroupProps {
|
|
9
|
+
/**
|
|
10
|
+
* 当前分组的已解析 ViewSchema。
|
|
11
|
+
*/
|
|
5
12
|
schema: SchemxViewGroupSchema;
|
|
6
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* 从 Form 或父级 Schema 继承的 Row 配置。
|
|
15
|
+
*/
|
|
16
|
+
rowConfig?: SchemxRowConfig;
|
|
17
|
+
/**
|
|
18
|
+
* 父级传入的 class,会与内部和 Schema class 合并。
|
|
19
|
+
*/
|
|
7
20
|
class?: ClassValue;
|
|
8
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* 父级传入的 style,会在 Schema style 之前合并。
|
|
23
|
+
*/
|
|
9
24
|
style?: StyleValue;
|
|
10
25
|
/**
|
|
11
|
-
*
|
|
26
|
+
* 可选的子级 Schema 渲染回调;省略时 Group 递归渲染默认子级。
|
|
27
|
+
*
|
|
28
|
+
* @param schemas - 当前 Group 的子级 ViewSchema。
|
|
29
|
+
* @param rowConfig - 当前 Group 子级使用的合并 Row 配置。
|
|
12
30
|
*/
|
|
13
|
-
renderChildren?: (schemas: readonly SchemxViewSchema[]) => VNodeChild;
|
|
31
|
+
renderChildren?: (schemas: readonly SchemxViewSchema[], rowConfig?: SchemxRowConfig) => VNodeChild;
|
|
14
32
|
}
|
|
15
33
|
declare const Group: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
16
34
|
schema: {
|
|
17
35
|
type: PropType<SchemxViewGroupSchema>;
|
|
18
36
|
required: true;
|
|
19
37
|
};
|
|
38
|
+
rowConfig: {
|
|
39
|
+
type: PropType<SchemxRowConfig>;
|
|
40
|
+
required: false;
|
|
41
|
+
default: undefined;
|
|
42
|
+
};
|
|
20
43
|
class: {
|
|
21
44
|
type: PropType<ClassValue>;
|
|
22
45
|
required: false;
|
|
@@ -37,6 +60,11 @@ declare const Group: import('vue').DefineComponent<import('vue').ExtractPropType
|
|
|
37
60
|
type: PropType<SchemxViewGroupSchema>;
|
|
38
61
|
required: true;
|
|
39
62
|
};
|
|
63
|
+
rowConfig: {
|
|
64
|
+
type: PropType<SchemxRowConfig>;
|
|
65
|
+
required: false;
|
|
66
|
+
default: undefined;
|
|
67
|
+
};
|
|
40
68
|
class: {
|
|
41
69
|
type: PropType<ClassValue>;
|
|
42
70
|
required: false;
|
|
@@ -55,7 +83,8 @@ declare const Group: import('vue').DefineComponent<import('vue').ExtractPropType
|
|
|
55
83
|
}>> & Readonly<{}>, {
|
|
56
84
|
class: ClassValue;
|
|
57
85
|
style: StyleValue;
|
|
58
|
-
renderChildren: ((schemas: readonly SchemxViewSchema[]) => VNodeChild) | undefined;
|
|
59
|
-
|
|
86
|
+
renderChildren: ((schemas: readonly SchemxViewSchema[], rowConfig?: SchemxRowConfig) => VNodeChild) | undefined;
|
|
87
|
+
rowConfig: SchemxRowConfig;
|
|
88
|
+
}, SlotsType<SchemxGroupSlots<import('@schemx/core').Values>>, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
60
89
|
export default Group;
|
|
61
90
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Group/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Group/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAWlF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AACzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACzD,OAAO,KAAK,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAE3E;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,MAAM,EAAE,qBAAqB,CAAA;IAC7B;;OAEG;IACH,SAAS,CAAC,EAAE,eAAe,CAAA;IAC3B;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAA;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAA;IAClB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,CACf,OAAO,EAAE,SAAS,gBAAgB,EAAE,EACpC,SAAS,CAAC,EAAE,eAAe,KACxB,UAAU,CAAA;CAChB;AAED,QAAA,MAAM,KAAK;;cAMW,QAAQ,CAAC,qBAAqB,CAAC;;;;cAI/B,QAAQ,CAAC,eAAe,CAAC;;;;;cAKC,QAAQ,CAAC,UAAU,CAAC;;;;;cAK7B,QAAQ,CAAC,UAAU,CAAC;;;;;cAKnC,QAAQ,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;;;;UAiDrD,UAAU;;cApEH,QAAQ,CAAC,qBAAqB,CAAC;;;;cAI/B,QAAQ,CAAC,eAAe,CAAC;;;;;cAKC,QAAQ,CAAC,UAAU,CAAC;;;;;cAK7B,QAAQ,CAAC,UAAU,CAAC;;;;;cAKnC,QAAQ,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;;;;;;;+BA9BvD,SAAS,gBAAgB,EAAE,cACxB,eAAe,KACxB,UAAU;;oIA+Nf,CAAA;AAEF,eAAe,KAAK,CAAA"}
|
|
@@ -1,22 +1,40 @@
|
|
|
1
1
|
import { Slots, VNodeChild } from 'vue';
|
|
2
2
|
import { SchemxViewGroupSchema, Values } from '@schemx/core';
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* Group 插槽渲染所需的状态与依赖。
|
|
5
|
+
*/
|
|
4
6
|
interface GroupSlotRendererOptions<TValues extends Values = Values> {
|
|
5
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* 当前分组 ViewSchema。
|
|
9
|
+
*/
|
|
6
10
|
schema: SchemxViewGroupSchema<TValues>;
|
|
7
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* 当前是否收起。
|
|
13
|
+
*/
|
|
8
14
|
collapsed: boolean;
|
|
9
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* 当前分组是否可收起。
|
|
17
|
+
*/
|
|
10
18
|
collapsible: boolean;
|
|
11
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* 当前分组是否禁用。
|
|
21
|
+
*/
|
|
12
22
|
disabled: boolean;
|
|
13
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* 当前分组是否只读。
|
|
25
|
+
*/
|
|
14
26
|
readonly: boolean;
|
|
15
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* 切换分组收起状态。
|
|
29
|
+
*/
|
|
16
30
|
toggle: () => void;
|
|
17
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* 父组件传入的所有具名插槽。
|
|
33
|
+
*/
|
|
18
34
|
slots: Slots;
|
|
19
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* 默认子节点渲染函数。
|
|
37
|
+
*/
|
|
20
38
|
renderChildren: () => VNodeChild;
|
|
21
39
|
}
|
|
22
40
|
/**
|
|
@@ -24,6 +42,15 @@ interface GroupSlotRendererOptions<TValues extends Values = Values> {
|
|
|
24
42
|
*
|
|
25
43
|
* `Header` 完全接管 Header 内部内容;`Label` 只替换默认标题;`Content`
|
|
26
44
|
* 只替换 Body 内的默认子节点布局。
|
|
45
|
+
*
|
|
46
|
+
* @param options - Group 插槽渲染所需的状态、插槽和子节点渲染器。
|
|
47
|
+
* @returns Group Header、Body 渲染函数及 Header 是否存在的标记。
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```ts
|
|
51
|
+
* const renderers = createGroupSlotRenderers(options)
|
|
52
|
+
* renderers.renderHeaderContent()
|
|
53
|
+
* ```
|
|
27
54
|
*/
|
|
28
55
|
export declare function createGroupSlotRenderers<TValues extends Values = Values>(options: GroupSlotRendererOptions<TValues>): {
|
|
29
56
|
hasHeader: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slot.d.ts","sourceRoot":"","sources":["../../../src/components/Group/slot.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAO5C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAEjE
|
|
1
|
+
{"version":3,"file":"slot.d.ts","sourceRoot":"","sources":["../../../src/components/Group/slot.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAO5C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAEjE;;GAEG;AACH,UAAU,wBAAwB,CAAC,OAAO,SAAS,MAAM,GAAG,MAAM;IAChE;;OAEG;IACH,MAAM,EAAE,qBAAqB,CAAC,OAAO,CAAC,CAAA;IACtC;;OAEG;IACH,SAAS,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,WAAW,EAAE,OAAO,CAAA;IACpB;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAA;IACjB;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAA;IACjB;;OAEG;IACH,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB;;OAEG;IACH,KAAK,EAAE,KAAK,CAAA;IACZ;;OAEG;IACH,cAAc,EAAE,MAAM,UAAU,CAAA;CACjC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,SAAS,MAAM,GAAG,MAAM,EACtE,OAAO,EAAE,wBAAwB,CAAC,OAAO,CAAC;;6BAyDZ,UAAU;+BA3BR,UAAU;EAwC3C"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { SchemxIconComponent, SchemxIconValue } from '../../types/icon';
|
|
3
|
+
declare const Icon: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
4
|
+
icon: {
|
|
5
|
+
type: PropType<SchemxIconValue>;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
component: {
|
|
9
|
+
type: PropType<SchemxIconComponent>;
|
|
10
|
+
required: false;
|
|
11
|
+
default: undefined;
|
|
12
|
+
};
|
|
13
|
+
}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
16
|
+
icon: {
|
|
17
|
+
type: PropType<SchemxIconValue>;
|
|
18
|
+
required: true;
|
|
19
|
+
};
|
|
20
|
+
component: {
|
|
21
|
+
type: PropType<SchemxIconComponent>;
|
|
22
|
+
required: false;
|
|
23
|
+
default: undefined;
|
|
24
|
+
};
|
|
25
|
+
}>> & Readonly<{}>, {
|
|
26
|
+
component: SchemxIconComponent;
|
|
27
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
28
|
+
export default Icon;
|
|
29
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Icon/index.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AAEnC,OAAO,KAAK,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAE5E,QAAA,MAAM,IAAI;;cAMgC,QAAQ,CAAC,eAAe,CAAC;;;;cAIjC,QAAQ,CAAC,mBAAmB,CAAC;;;;;;;;cAJrB,QAAQ,CAAC,eAAe,CAAC;;;;cAIjC,QAAQ,CAAC,mBAAmB,CAAC;;;;;;4EAgC7D,CAAA;AAEF,eAAe,IAAI,CAAA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { PropType, VNodeChild } from 'vue';
|
|
2
|
+
import { SchemxRowConfig } from '../../types/layout';
|
|
3
|
+
declare const Row: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
4
|
+
row: {
|
|
5
|
+
type: PropType<SchemxRowConfig>;
|
|
6
|
+
required: false;
|
|
7
|
+
default: undefined;
|
|
8
|
+
};
|
|
9
|
+
enabled: {
|
|
10
|
+
type: BooleanConstructor;
|
|
11
|
+
required: false;
|
|
12
|
+
default: boolean;
|
|
13
|
+
};
|
|
14
|
+
}>, () => VNodeChild, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
15
|
+
row: {
|
|
16
|
+
type: PropType<SchemxRowConfig>;
|
|
17
|
+
required: false;
|
|
18
|
+
default: undefined;
|
|
19
|
+
};
|
|
20
|
+
enabled: {
|
|
21
|
+
type: BooleanConstructor;
|
|
22
|
+
required: false;
|
|
23
|
+
default: boolean;
|
|
24
|
+
};
|
|
25
|
+
}>> & Readonly<{}>, {
|
|
26
|
+
row: SchemxRowConfig;
|
|
27
|
+
enabled: boolean;
|
|
28
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
29
|
+
export default Row;
|
|
30
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Row/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAyC,KAAK,QAAQ,EAAS,MAAM,KAAK,CAAA;AACjF,OAAO,KAAK,EAA0B,UAAU,EAAE,MAAM,KAAK,CAAA;AAK7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAEzD,QAAA,MAAM,GAAG;;cAMa,QAAQ,CAAC,eAAe,CAAC;;;;;;;;;UA4BhC,UAAU;;cA5BH,QAAQ,CAAC,eAAe,CAAC;;;;;;;;;;;;4EA0G7C,CAAA;AAEF,eAAe,GAAG,CAAA"}
|
|
@@ -1,15 +1,25 @@
|
|
|
1
1
|
import { PropType, ClassValue, VNodeChild } from 'vue';
|
|
2
|
-
import {
|
|
2
|
+
import { SchemxRowConfig } from '../../types/layout';
|
|
3
3
|
import { SchemxViewSchema, Values } from '@schemx/core';
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* SchemaList 的公开属性。
|
|
6
|
+
*/
|
|
5
7
|
export interface SchemxSchemaListProps<TValues extends Values = Values> {
|
|
6
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* 当前同级 ViewSchema 列表。
|
|
10
|
+
*/
|
|
7
11
|
schemas: readonly SchemxViewSchema<TValues>[];
|
|
8
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* 根级 ViewSchema 列表,供 Field 首尾样式计算。
|
|
14
|
+
*/
|
|
9
15
|
viewSchemas: readonly SchemxViewSchema<TValues>[];
|
|
10
|
-
/**
|
|
11
|
-
|
|
12
|
-
|
|
16
|
+
/**
|
|
17
|
+
* 当前 Form 或父级容器继承的 Row 配置。
|
|
18
|
+
*/
|
|
19
|
+
rowConfig?: SchemxRowConfig;
|
|
20
|
+
/**
|
|
21
|
+
* 根级 Field wrapper 的 class 解析器。
|
|
22
|
+
*/
|
|
13
23
|
fieldClassResolver?: (schema: SchemxViewSchema<TValues>) => ClassValue;
|
|
14
24
|
}
|
|
15
25
|
declare const SchemaList: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
@@ -21,8 +31,8 @@ declare const SchemaList: import('vue').DefineComponent<import('vue').ExtractPro
|
|
|
21
31
|
type: PropType<readonly SchemxViewSchema[]>;
|
|
22
32
|
required: true;
|
|
23
33
|
};
|
|
24
|
-
|
|
25
|
-
type: PropType<
|
|
34
|
+
rowConfig: {
|
|
35
|
+
type: PropType<SchemxRowConfig>;
|
|
26
36
|
required: false;
|
|
27
37
|
default: undefined;
|
|
28
38
|
};
|
|
@@ -40,8 +50,8 @@ declare const SchemaList: import('vue').DefineComponent<import('vue').ExtractPro
|
|
|
40
50
|
type: PropType<readonly SchemxViewSchema[]>;
|
|
41
51
|
required: true;
|
|
42
52
|
};
|
|
43
|
-
|
|
44
|
-
type: PropType<
|
|
53
|
+
rowConfig: {
|
|
54
|
+
type: PropType<SchemxRowConfig>;
|
|
45
55
|
required: false;
|
|
46
56
|
default: undefined;
|
|
47
57
|
};
|
|
@@ -51,7 +61,7 @@ declare const SchemaList: import('vue').DefineComponent<import('vue').ExtractPro
|
|
|
51
61
|
default: undefined;
|
|
52
62
|
};
|
|
53
63
|
}>> & Readonly<{}>, {
|
|
54
|
-
|
|
64
|
+
rowConfig: SchemxRowConfig;
|
|
55
65
|
fieldClassResolver: (schema: SchemxViewSchema) => ClassValue;
|
|
56
66
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
57
67
|
export default SchemaList;
|