@blueking/bkui-form 1.0.1-beta.3 → 1.0.1-beta.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/dist/adapter/common/FieldGroupWrap.d.ts +209 -0
- package/dist/adapter/field/ArrayField.d.ts +147 -0
- package/dist/adapter/field/BooleanField.d.ts +145 -0
- package/dist/adapter/field/CompositionField.d.ts +151 -0
- package/dist/adapter/field/FieldProps.d.ts +70 -0
- package/dist/adapter/field/NumberField.d.ts +145 -0
- package/dist/adapter/field/ObjectField.d.ts +147 -0
- package/dist/adapter/field/SchemaField.d.ts +145 -0
- package/dist/adapter/field/StringField.d.ts +4 -0
- package/dist/adapter/widget/ArrayWidget.d.ts +154 -0
- package/dist/adapter/widget/ButtonWidget.d.ts +16 -0
- package/dist/adapter/widget/CheckboxWidget.d.ts +34 -0
- package/dist/adapter/widget/CollapseGroupWidget.d.ts +196 -0
- package/dist/adapter/widget/ColorPickerWidget.d.ts +8 -0
- package/dist/adapter/widget/InputWidget.d.ts +30 -0
- package/dist/adapter/widget/KeyValueArrayWidget.d.ts +157 -0
- package/dist/adapter/widget/RadioWidget.d.ts +37 -0
- package/dist/adapter/widget/SelectWidget.d.ts +37 -0
- package/dist/adapter/widget/SwitchWidget.d.ts +10 -0
- package/dist/adapter/widget/TabGroupWidget.d.ts +187 -0
- package/dist/adapter/widget/TableWidget.d.ts +154 -0
- package/dist/adapter/widget/Widget.d.ts +182 -0
- package/dist/controller/form.d.ts +141 -0
- package/dist/controller/props.d.ts +62 -0
- package/dist/core/events.d.ts +10 -0
- package/dist/core/expression.d.ts +13 -0
- package/dist/core/form.d.ts +5 -0
- package/dist/core/lang.d.ts +1 -0
- package/dist/core/layout.d.ts +20 -0
- package/dist/core/lifecycle.d.ts +0 -0
- package/dist/core/path.d.ts +9 -0
- package/dist/core/proxy.d.ts +3 -0
- package/dist/core/reaction.d.ts +5 -0
- package/dist/core/register.d.ts +19 -0
- package/dist/core/schema.d.ts +26 -0
- package/dist/core/validator.d.ts +35 -0
- package/dist/core/widgetTree.d.ts +40 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.es.js +7443 -0
- package/dist/index.umd.js +12 -0
- package/dist/style.css +1 -0
- package/dist/util/fetch.d.ts +10 -0
- package/dist/util/index.d.ts +23 -0
- package/package.json +24 -12
- package/esm/adapter/common/FieldGroupWrap.tsx.js +0 -199
- package/esm/adapter/field/ArrayField.tsx.js +0 -55
- package/esm/adapter/field/BooleanField.tsx.js +0 -41
- package/esm/adapter/field/CompositionField.tsx.js +0 -113
- package/esm/adapter/field/FieldProps.ts.js +0 -85
- package/esm/adapter/field/NumberField.tsx.js +0 -19
- package/esm/adapter/field/ObjectField.tsx.js +0 -58
- package/esm/adapter/field/SchemaField.tsx.js +0 -28
- package/esm/adapter/field/StringField.tsx.js +0 -4
- package/esm/adapter/widget/ArrayWidget.ts.js +0 -196
- package/esm/adapter/widget/ButtonWidget.ts.js +0 -76
- package/esm/adapter/widget/CheckboxWidget.ts.js +0 -101
- package/esm/adapter/widget/CollapseGroupWidget.ts.js +0 -140
- package/esm/adapter/widget/ColorPickerWidget.ts.js +0 -71
- package/esm/adapter/widget/InputWidget.ts.js +0 -79
- package/esm/adapter/widget/KeyValueArrayWidget.tsx.js +0 -156
- package/esm/adapter/widget/RadioWidget.ts.js +0 -98
- package/esm/adapter/widget/SelectWidget.ts.js +0 -98
- package/esm/adapter/widget/SwitchWidget.ts.js +0 -73
- package/esm/adapter/widget/TabGroupWidget.ts.js +0 -145
- package/esm/adapter/widget/TableWidget.ts.js +0 -205
- package/esm/adapter/widget/Widget.ts.js +0 -497
- package/esm/assets/fonts/iconcool.eot +0 -0
- package/esm/assets/fonts/iconcool.svg +0 -53
- package/esm/assets/fonts/iconcool.ttf +0 -0
- package/esm/assets/fonts/iconcool.woff +0 -0
- package/esm/assets/style.css +0 -43
- package/esm/controller/form.css +0 -164
- package/esm/controller/form.tsx.js +0 -159
- package/esm/controller/props.ts.js +0 -75
- package/esm/core/events.ts.js +0 -74
- package/esm/core/expression.ts.js +0 -67
- package/esm/core/lang.ts.js +0 -25
- package/esm/core/layout.ts.js +0 -149
- package/esm/core/path.ts.js +0 -60
- package/esm/core/proxy.ts.js +0 -10
- package/esm/core/reaction.ts.js +0 -116
- package/esm/core/register.ts.js +0 -74
- package/esm/core/schema.ts.js +0 -302
- package/esm/core/validator.ts.js +0 -248
- package/esm/core/widgetTree.ts.js +0 -163
- package/esm/index.ts.js +0 -6
- package/esm/node_modules/@blueking/cli-service/dist/lib/path.js +0 -35
- package/esm/node_modules/@blueking/cli-service/dist/lib/util.js +0 -233
- package/esm/node_modules/@blueking/cli-service/dist/tools/rust/helper/path.js +0 -172
- package/esm/node_modules/ajv/dist/ajv.js +0 -50
- package/esm/node_modules/ajv/dist/compile/codegen/code.js +0 -156
- package/esm/node_modules/ajv/dist/compile/codegen/index.js +0 -697
- package/esm/node_modules/ajv/dist/compile/codegen/scope.js +0 -143
- package/esm/node_modules/ajv/dist/compile/errors.js +0 -123
- package/esm/node_modules/ajv/dist/compile/index.js +0 -242
- package/esm/node_modules/ajv/dist/compile/names.js +0 -28
- package/esm/node_modules/ajv/dist/compile/ref_error.js +0 -12
- package/esm/node_modules/ajv/dist/compile/resolve.js +0 -155
- package/esm/node_modules/ajv/dist/compile/rules.js +0 -26
- package/esm/node_modules/ajv/dist/compile/util.js +0 -178
- package/esm/node_modules/ajv/dist/compile/validate/applicability.js +0 -19
- package/esm/node_modules/ajv/dist/compile/validate/boolSchema.js +0 -50
- package/esm/node_modules/ajv/dist/compile/validate/dataType.js +0 -203
- package/esm/node_modules/ajv/dist/compile/validate/defaults.js +0 -35
- package/esm/node_modules/ajv/dist/compile/validate/index.js +0 -520
- package/esm/node_modules/ajv/dist/compile/validate/keyword.js +0 -124
- package/esm/node_modules/ajv/dist/compile/validate/subschema.js +0 -81
- package/esm/node_modules/ajv/dist/core.js +0 -618
- package/esm/node_modules/ajv/dist/refs/data.json +0 -13
- package/esm/node_modules/ajv/dist/refs/json-schema-draft-07.json +0 -151
- package/esm/node_modules/ajv/dist/runtime/equal.js +0 -7
- package/esm/node_modules/ajv/dist/runtime/ucs2length.js +0 -24
- package/esm/node_modules/ajv/dist/runtime/uri.js +0 -6
- package/esm/node_modules/ajv/dist/runtime/validation_error.js +0 -11
- package/esm/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +0 -49
- package/esm/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +0 -106
- package/esm/node_modules/ajv/dist/vocabularies/applicator/allOf.js +0 -23
- package/esm/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +0 -12
- package/esm/node_modules/ajv/dist/vocabularies/applicator/contains.js +0 -95
- package/esm/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +0 -85
- package/esm/node_modules/ajv/dist/vocabularies/applicator/if.js +0 -66
- package/esm/node_modules/ajv/dist/vocabularies/applicator/index.js +0 -44
- package/esm/node_modules/ajv/dist/vocabularies/applicator/items.js +0 -52
- package/esm/node_modules/ajv/dist/vocabularies/applicator/items2020.js +0 -30
- package/esm/node_modules/ajv/dist/vocabularies/applicator/not.js +0 -26
- package/esm/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +0 -60
- package/esm/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +0 -75
- package/esm/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +0 -12
- package/esm/node_modules/ajv/dist/vocabularies/applicator/properties.js +0 -54
- package/esm/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +0 -38
- package/esm/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +0 -13
- package/esm/node_modules/ajv/dist/vocabularies/code.js +0 -131
- package/esm/node_modules/ajv/dist/vocabularies/core/id.js +0 -10
- package/esm/node_modules/ajv/dist/vocabularies/core/index.js +0 -16
- package/esm/node_modules/ajv/dist/vocabularies/core/ref.js +0 -122
- package/esm/node_modules/ajv/dist/vocabularies/discriminator/index.js +0 -104
- package/esm/node_modules/ajv/dist/vocabularies/discriminator/types.js +0 -9
- package/esm/node_modules/ajv/dist/vocabularies/draft7.js +0 -17
- package/esm/node_modules/ajv/dist/vocabularies/format/format.js +0 -92
- package/esm/node_modules/ajv/dist/vocabularies/format/index.js +0 -6
- package/esm/node_modules/ajv/dist/vocabularies/metadata.js +0 -18
- package/esm/node_modules/ajv/dist/vocabularies/validation/const.js +0 -25
- package/esm/node_modules/ajv/dist/vocabularies/validation/enum.js +0 -48
- package/esm/node_modules/ajv/dist/vocabularies/validation/index.js +0 -33
- package/esm/node_modules/ajv/dist/vocabularies/validation/limitItems.js +0 -24
- package/esm/node_modules/ajv/dist/vocabularies/validation/limitLength.js +0 -27
- package/esm/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +0 -27
- package/esm/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +0 -24
- package/esm/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +0 -26
- package/esm/node_modules/ajv/dist/vocabularies/validation/pattern.js +0 -24
- package/esm/node_modules/ajv/dist/vocabularies/validation/required.js +0 -79
- package/esm/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +0 -64
- package/esm/node_modules/ajv-formats/dist/formats.js +0 -173
- package/esm/node_modules/ajv-formats/dist/index.js +0 -37
- package/esm/node_modules/ajv-formats/dist/limit.js +0 -69
- package/esm/node_modules/ajv-i18n/localize/zh/index.js +0 -154
- package/esm/node_modules/fast-deep-equal/index.js +0 -46
- package/esm/node_modules/fast-uri/index.js +0 -303
- package/esm/node_modules/fast-uri/lib/schemes.js +0 -188
- package/esm/node_modules/fast-uri/lib/scopedChars.js +0 -30
- package/esm/node_modules/fast-uri/lib/utils.js +0 -244
- package/esm/node_modules/json-schema-traverse/index.js +0 -89
- package/esm/node_modules/semver/classes/comparator.js +0 -143
- package/esm/node_modules/semver/classes/range.js +0 -557
- package/esm/node_modules/semver/classes/semver.js +0 -333
- package/esm/node_modules/semver/functions/clean.js +0 -8
- package/esm/node_modules/semver/functions/cmp.js +0 -54
- package/esm/node_modules/semver/functions/coerce.js +0 -62
- package/esm/node_modules/semver/functions/compare-build.js +0 -9
- package/esm/node_modules/semver/functions/compare-loose.js +0 -5
- package/esm/node_modules/semver/functions/compare.js +0 -7
- package/esm/node_modules/semver/functions/diff.js +0 -60
- package/esm/node_modules/semver/functions/eq.js +0 -5
- package/esm/node_modules/semver/functions/gt.js +0 -5
- package/esm/node_modules/semver/functions/gte.js +0 -5
- package/esm/node_modules/semver/functions/inc.js +0 -21
- package/esm/node_modules/semver/functions/lt.js +0 -5
- package/esm/node_modules/semver/functions/lte.js +0 -5
- package/esm/node_modules/semver/functions/major.js +0 -5
- package/esm/node_modules/semver/functions/minor.js +0 -5
- package/esm/node_modules/semver/functions/neq.js +0 -5
- package/esm/node_modules/semver/functions/parse.js +0 -18
- package/esm/node_modules/semver/functions/patch.js +0 -5
- package/esm/node_modules/semver/functions/prerelease.js +0 -8
- package/esm/node_modules/semver/functions/rcompare.js +0 -5
- package/esm/node_modules/semver/functions/rsort.js +0 -5
- package/esm/node_modules/semver/functions/satisfies.js +0 -12
- package/esm/node_modules/semver/functions/sort.js +0 -5
- package/esm/node_modules/semver/functions/valid.js +0 -8
- package/esm/node_modules/semver/index.js +0 -91
- package/esm/node_modules/semver/internal/constants.js +0 -37
- package/esm/node_modules/semver/internal/debug.js +0 -11
- package/esm/node_modules/semver/internal/identifiers.js +0 -29
- package/esm/node_modules/semver/internal/lrucache.js +0 -42
- package/esm/node_modules/semver/internal/parse-options.js +0 -17
- package/esm/node_modules/semver/internal/re.js +0 -223
- package/esm/node_modules/semver/ranges/gtr.js +0 -6
- package/esm/node_modules/semver/ranges/intersects.js +0 -9
- package/esm/node_modules/semver/ranges/ltr.js +0 -6
- package/esm/node_modules/semver/ranges/max-satisfying.js +0 -27
- package/esm/node_modules/semver/ranges/min-satisfying.js +0 -26
- package/esm/node_modules/semver/ranges/min-version.js +0 -63
- package/esm/node_modules/semver/ranges/outside.js +0 -82
- package/esm/node_modules/semver/ranges/simplify.js +0 -49
- package/esm/node_modules/semver/ranges/subset.js +0 -249
- package/esm/node_modules/semver/ranges/to-comparators.js +0 -10
- package/esm/node_modules/semver/ranges/valid.js +0 -13
- package/esm/util/fetch.ts.js +0 -190
- package/esm/util/index.ts.js +0 -276
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { JSONSchema7 } from 'json-schema';
|
|
2
|
+
|
|
3
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
4
|
+
modelValue: {
|
|
5
|
+
type: ArrayConstructor;
|
|
6
|
+
};
|
|
7
|
+
schema: {
|
|
8
|
+
type: import('vue').PropType<JSONSchema7>;
|
|
9
|
+
default: () => JSONSchema7;
|
|
10
|
+
};
|
|
11
|
+
path: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
default: string;
|
|
14
|
+
};
|
|
15
|
+
required: {
|
|
16
|
+
type: BooleanConstructor;
|
|
17
|
+
default: boolean;
|
|
18
|
+
};
|
|
19
|
+
rootData: {
|
|
20
|
+
type: ObjectConstructor;
|
|
21
|
+
default: () => {};
|
|
22
|
+
};
|
|
23
|
+
layout: {
|
|
24
|
+
type: import('vue').PropType<Partial<import('../../@types').ILayoutConfig>>;
|
|
25
|
+
default: () => Partial<import('../../@types').ILayoutConfig>;
|
|
26
|
+
};
|
|
27
|
+
context: {
|
|
28
|
+
type: ObjectConstructor;
|
|
29
|
+
default: () => {};
|
|
30
|
+
};
|
|
31
|
+
removeable: {
|
|
32
|
+
type: BooleanConstructor;
|
|
33
|
+
default: boolean;
|
|
34
|
+
};
|
|
35
|
+
httpAdapter: {
|
|
36
|
+
type: ObjectConstructor;
|
|
37
|
+
default: () => {
|
|
38
|
+
request: (url: string, config?: Partial<import('../../util/fetch').IFetchConfig>) => Promise<any>;
|
|
39
|
+
responseParse: (res: any) => any;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
visible: {
|
|
43
|
+
type: BooleanConstructor;
|
|
44
|
+
default: boolean;
|
|
45
|
+
};
|
|
46
|
+
error: {
|
|
47
|
+
type: BooleanConstructor;
|
|
48
|
+
default: boolean;
|
|
49
|
+
};
|
|
50
|
+
disabled: {
|
|
51
|
+
type: BooleanConstructor;
|
|
52
|
+
default: boolean;
|
|
53
|
+
};
|
|
54
|
+
readonly: {
|
|
55
|
+
type: BooleanConstructor;
|
|
56
|
+
default: boolean;
|
|
57
|
+
};
|
|
58
|
+
readonlyMode: {
|
|
59
|
+
type: StringConstructor;
|
|
60
|
+
default: string;
|
|
61
|
+
validator: (value: any) => boolean;
|
|
62
|
+
};
|
|
63
|
+
showResetDefault: {
|
|
64
|
+
type: BooleanConstructor;
|
|
65
|
+
default: boolean;
|
|
66
|
+
};
|
|
67
|
+
}>, {}, {}, {}, {
|
|
68
|
+
handleCellValChange({ path, value }: {
|
|
69
|
+
path: any;
|
|
70
|
+
value: any;
|
|
71
|
+
}): void;
|
|
72
|
+
handleAddRow(index: any): void;
|
|
73
|
+
handleDelRow(index: any): void;
|
|
74
|
+
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
75
|
+
modelValue: {
|
|
76
|
+
type: ArrayConstructor;
|
|
77
|
+
};
|
|
78
|
+
schema: {
|
|
79
|
+
type: import('vue').PropType<JSONSchema7>;
|
|
80
|
+
default: () => JSONSchema7;
|
|
81
|
+
};
|
|
82
|
+
path: {
|
|
83
|
+
type: StringConstructor;
|
|
84
|
+
default: string;
|
|
85
|
+
};
|
|
86
|
+
required: {
|
|
87
|
+
type: BooleanConstructor;
|
|
88
|
+
default: boolean;
|
|
89
|
+
};
|
|
90
|
+
rootData: {
|
|
91
|
+
type: ObjectConstructor;
|
|
92
|
+
default: () => {};
|
|
93
|
+
};
|
|
94
|
+
layout: {
|
|
95
|
+
type: import('vue').PropType<Partial<import('../../@types').ILayoutConfig>>;
|
|
96
|
+
default: () => Partial<import('../../@types').ILayoutConfig>;
|
|
97
|
+
};
|
|
98
|
+
context: {
|
|
99
|
+
type: ObjectConstructor;
|
|
100
|
+
default: () => {};
|
|
101
|
+
};
|
|
102
|
+
removeable: {
|
|
103
|
+
type: BooleanConstructor;
|
|
104
|
+
default: boolean;
|
|
105
|
+
};
|
|
106
|
+
httpAdapter: {
|
|
107
|
+
type: ObjectConstructor;
|
|
108
|
+
default: () => {
|
|
109
|
+
request: (url: string, config?: Partial<import('../../util/fetch').IFetchConfig>) => Promise<any>;
|
|
110
|
+
responseParse: (res: any) => any;
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
visible: {
|
|
114
|
+
type: BooleanConstructor;
|
|
115
|
+
default: boolean;
|
|
116
|
+
};
|
|
117
|
+
error: {
|
|
118
|
+
type: BooleanConstructor;
|
|
119
|
+
default: boolean;
|
|
120
|
+
};
|
|
121
|
+
disabled: {
|
|
122
|
+
type: BooleanConstructor;
|
|
123
|
+
default: boolean;
|
|
124
|
+
};
|
|
125
|
+
readonly: {
|
|
126
|
+
type: BooleanConstructor;
|
|
127
|
+
default: boolean;
|
|
128
|
+
};
|
|
129
|
+
readonlyMode: {
|
|
130
|
+
type: StringConstructor;
|
|
131
|
+
default: string;
|
|
132
|
+
validator: (value: any) => boolean;
|
|
133
|
+
};
|
|
134
|
+
showResetDefault: {
|
|
135
|
+
type: BooleanConstructor;
|
|
136
|
+
default: boolean;
|
|
137
|
+
};
|
|
138
|
+
}>> & Readonly<{}>, {
|
|
139
|
+
required: boolean;
|
|
140
|
+
schema: JSONSchema7;
|
|
141
|
+
path: string;
|
|
142
|
+
rootData: Record<string, any>;
|
|
143
|
+
layout: Partial<import('../../@types').ILayoutConfig>;
|
|
144
|
+
context: Record<string, any>;
|
|
145
|
+
removeable: boolean;
|
|
146
|
+
httpAdapter: Record<string, any>;
|
|
147
|
+
visible: boolean;
|
|
148
|
+
error: boolean;
|
|
149
|
+
disabled: boolean;
|
|
150
|
+
readonly: boolean;
|
|
151
|
+
readonlyMode: string;
|
|
152
|
+
showResetDefault: boolean;
|
|
153
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
154
|
+
export default _default;
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { IFormState } from '../../@types';
|
|
2
|
+
import { JSONSchema7 } from 'json-schema';
|
|
3
|
+
|
|
4
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
5
|
+
schema: {
|
|
6
|
+
type: import('vue').PropType<JSONSchema7>;
|
|
7
|
+
default: () => JSONSchema7;
|
|
8
|
+
};
|
|
9
|
+
path: {
|
|
10
|
+
type: StringConstructor;
|
|
11
|
+
default: string;
|
|
12
|
+
};
|
|
13
|
+
required: {
|
|
14
|
+
type: BooleanConstructor;
|
|
15
|
+
default: boolean;
|
|
16
|
+
};
|
|
17
|
+
rootData: {
|
|
18
|
+
type: ObjectConstructor;
|
|
19
|
+
default: () => {};
|
|
20
|
+
};
|
|
21
|
+
modelValue: {
|
|
22
|
+
type: (ObjectConstructor | ArrayConstructor | StringConstructor | NumberConstructor | BooleanConstructor)[];
|
|
23
|
+
};
|
|
24
|
+
layout: {
|
|
25
|
+
type: import('vue').PropType<Partial<import('../../@types').ILayoutConfig>>;
|
|
26
|
+
default: () => Partial<import('../../@types').ILayoutConfig>;
|
|
27
|
+
};
|
|
28
|
+
context: {
|
|
29
|
+
type: ObjectConstructor;
|
|
30
|
+
default: () => {};
|
|
31
|
+
};
|
|
32
|
+
removeable: {
|
|
33
|
+
type: BooleanConstructor;
|
|
34
|
+
default: boolean;
|
|
35
|
+
};
|
|
36
|
+
httpAdapter: {
|
|
37
|
+
type: ObjectConstructor;
|
|
38
|
+
default: () => {
|
|
39
|
+
request: (url: string, config?: Partial<import('../../util/fetch').IFetchConfig>) => Promise<any>;
|
|
40
|
+
responseParse: (res: any) => any;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
visible: {
|
|
44
|
+
type: BooleanConstructor;
|
|
45
|
+
default: boolean;
|
|
46
|
+
};
|
|
47
|
+
error: {
|
|
48
|
+
type: BooleanConstructor;
|
|
49
|
+
default: boolean;
|
|
50
|
+
};
|
|
51
|
+
disabled: {
|
|
52
|
+
type: BooleanConstructor;
|
|
53
|
+
default: boolean;
|
|
54
|
+
};
|
|
55
|
+
readonly: {
|
|
56
|
+
type: BooleanConstructor;
|
|
57
|
+
default: boolean;
|
|
58
|
+
};
|
|
59
|
+
readonlyMode: {
|
|
60
|
+
type: StringConstructor;
|
|
61
|
+
default: string;
|
|
62
|
+
validator: (value: any) => boolean;
|
|
63
|
+
};
|
|
64
|
+
showResetDefault: {
|
|
65
|
+
type: BooleanConstructor;
|
|
66
|
+
default: boolean;
|
|
67
|
+
};
|
|
68
|
+
}>, {}, {
|
|
69
|
+
loading: boolean;
|
|
70
|
+
datasource: any;
|
|
71
|
+
formItemProps: {
|
|
72
|
+
tips: string;
|
|
73
|
+
label: string;
|
|
74
|
+
};
|
|
75
|
+
state: {
|
|
76
|
+
visible: boolean;
|
|
77
|
+
disabled: boolean;
|
|
78
|
+
readonly: boolean;
|
|
79
|
+
error: boolean;
|
|
80
|
+
};
|
|
81
|
+
errorTips: string;
|
|
82
|
+
privateSchema: {};
|
|
83
|
+
key: string;
|
|
84
|
+
}, {
|
|
85
|
+
widgetMap(): Record<string, import('../../core/widgetTree').WidgetNode>;
|
|
86
|
+
widgetNode(): import('../../core/widgetTree').WidgetNode;
|
|
87
|
+
parent(): import('../../core/widgetTree').WidgetNode | null;
|
|
88
|
+
widgetSchema(): JSONSchema7;
|
|
89
|
+
value(): string | number | boolean | Record<string, any> | unknown[] | undefined;
|
|
90
|
+
}, {
|
|
91
|
+
setState(key: keyof IFormState, value: any): void;
|
|
92
|
+
loadDataSource(): Promise<void>;
|
|
93
|
+
setErrorTips(tips: any): void;
|
|
94
|
+
getValue(path: any): any;
|
|
95
|
+
getReadonlyValue(): string;
|
|
96
|
+
getSchema(): JSONSchema7;
|
|
97
|
+
setSchema(data: any): JSONSchema7;
|
|
98
|
+
resetDatasource(): void;
|
|
99
|
+
getDefaultValue(): any;
|
|
100
|
+
resetToDefault(): void;
|
|
101
|
+
isDefaultValue(): any;
|
|
102
|
+
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
103
|
+
schema: {
|
|
104
|
+
type: import('vue').PropType<JSONSchema7>;
|
|
105
|
+
default: () => JSONSchema7;
|
|
106
|
+
};
|
|
107
|
+
path: {
|
|
108
|
+
type: StringConstructor;
|
|
109
|
+
default: string;
|
|
110
|
+
};
|
|
111
|
+
required: {
|
|
112
|
+
type: BooleanConstructor;
|
|
113
|
+
default: boolean;
|
|
114
|
+
};
|
|
115
|
+
rootData: {
|
|
116
|
+
type: ObjectConstructor;
|
|
117
|
+
default: () => {};
|
|
118
|
+
};
|
|
119
|
+
modelValue: {
|
|
120
|
+
type: (ObjectConstructor | ArrayConstructor | StringConstructor | NumberConstructor | BooleanConstructor)[];
|
|
121
|
+
};
|
|
122
|
+
layout: {
|
|
123
|
+
type: import('vue').PropType<Partial<import('../../@types').ILayoutConfig>>;
|
|
124
|
+
default: () => Partial<import('../../@types').ILayoutConfig>;
|
|
125
|
+
};
|
|
126
|
+
context: {
|
|
127
|
+
type: ObjectConstructor;
|
|
128
|
+
default: () => {};
|
|
129
|
+
};
|
|
130
|
+
removeable: {
|
|
131
|
+
type: BooleanConstructor;
|
|
132
|
+
default: boolean;
|
|
133
|
+
};
|
|
134
|
+
httpAdapter: {
|
|
135
|
+
type: ObjectConstructor;
|
|
136
|
+
default: () => {
|
|
137
|
+
request: (url: string, config?: Partial<import('../../util/fetch').IFetchConfig>) => Promise<any>;
|
|
138
|
+
responseParse: (res: any) => any;
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
visible: {
|
|
142
|
+
type: BooleanConstructor;
|
|
143
|
+
default: boolean;
|
|
144
|
+
};
|
|
145
|
+
error: {
|
|
146
|
+
type: BooleanConstructor;
|
|
147
|
+
default: boolean;
|
|
148
|
+
};
|
|
149
|
+
disabled: {
|
|
150
|
+
type: BooleanConstructor;
|
|
151
|
+
default: boolean;
|
|
152
|
+
};
|
|
153
|
+
readonly: {
|
|
154
|
+
type: BooleanConstructor;
|
|
155
|
+
default: boolean;
|
|
156
|
+
};
|
|
157
|
+
readonlyMode: {
|
|
158
|
+
type: StringConstructor;
|
|
159
|
+
default: string;
|
|
160
|
+
validator: (value: any) => boolean;
|
|
161
|
+
};
|
|
162
|
+
showResetDefault: {
|
|
163
|
+
type: BooleanConstructor;
|
|
164
|
+
default: boolean;
|
|
165
|
+
};
|
|
166
|
+
}>> & Readonly<{}>, {
|
|
167
|
+
required: boolean;
|
|
168
|
+
schema: JSONSchema7;
|
|
169
|
+
path: string;
|
|
170
|
+
rootData: Record<string, any>;
|
|
171
|
+
layout: Partial<import('../../@types').ILayoutConfig>;
|
|
172
|
+
context: Record<string, any>;
|
|
173
|
+
removeable: boolean;
|
|
174
|
+
httpAdapter: Record<string, any>;
|
|
175
|
+
visible: boolean;
|
|
176
|
+
error: boolean;
|
|
177
|
+
disabled: boolean;
|
|
178
|
+
readonly: boolean;
|
|
179
|
+
readonlyMode: string;
|
|
180
|
+
showResetDefault: boolean;
|
|
181
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
182
|
+
export default _default;
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { IFormOption } from '../@types';
|
|
2
|
+
|
|
3
|
+
export default function createForm<T>(opts?: Partial<IFormOption<T>>): import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
4
|
+
modelValue: {
|
|
5
|
+
type: ObjectConstructor;
|
|
6
|
+
default: () => {};
|
|
7
|
+
};
|
|
8
|
+
rules: {
|
|
9
|
+
type: ObjectConstructor;
|
|
10
|
+
default: () => {};
|
|
11
|
+
};
|
|
12
|
+
schema: {
|
|
13
|
+
type: ObjectConstructor;
|
|
14
|
+
default: () => {};
|
|
15
|
+
};
|
|
16
|
+
width: {
|
|
17
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
layout: {
|
|
21
|
+
type: import('vue').PropType<import('../@types').ILayoutConfig | import('../@types').ILayout[][]>;
|
|
22
|
+
default: () => never[];
|
|
23
|
+
};
|
|
24
|
+
formType: {
|
|
25
|
+
type: StringConstructor;
|
|
26
|
+
default: string;
|
|
27
|
+
};
|
|
28
|
+
context: {
|
|
29
|
+
type: ObjectConstructor;
|
|
30
|
+
default: () => {};
|
|
31
|
+
};
|
|
32
|
+
httpAdapter: {
|
|
33
|
+
type: ObjectConstructor;
|
|
34
|
+
default: () => {
|
|
35
|
+
request: (url: string, config?: Partial<import('../util/fetch').IFetchConfig>) => Promise<any>;
|
|
36
|
+
responseParse: (res: any) => any;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
readonly: {
|
|
40
|
+
type: BooleanConstructor;
|
|
41
|
+
default: boolean;
|
|
42
|
+
};
|
|
43
|
+
disabled: {
|
|
44
|
+
type: BooleanConstructor;
|
|
45
|
+
default: boolean;
|
|
46
|
+
};
|
|
47
|
+
readonlyMode: {
|
|
48
|
+
type: StringConstructor;
|
|
49
|
+
default: string;
|
|
50
|
+
validator: (value: any) => boolean;
|
|
51
|
+
};
|
|
52
|
+
labelWidth: {
|
|
53
|
+
type: NumberConstructor;
|
|
54
|
+
default: number;
|
|
55
|
+
};
|
|
56
|
+
showResetDefault: {
|
|
57
|
+
type: BooleanConstructor;
|
|
58
|
+
default: boolean;
|
|
59
|
+
};
|
|
60
|
+
}>, {}, {
|
|
61
|
+
rootData: {};
|
|
62
|
+
formKey: string;
|
|
63
|
+
}, {}, {
|
|
64
|
+
initFormData(): void;
|
|
65
|
+
emitFormValueChange(newValue: any, oldValue: any): void;
|
|
66
|
+
validateForm: () => boolean;
|
|
67
|
+
validateFormItem: (path: string) => import('../@types').IValidateResult;
|
|
68
|
+
validate: () => Promise<import('../@types').IValidateResult[]>;
|
|
69
|
+
validateSchema: (schema: import('ajv').AnySchema) => Promise<unknown>;
|
|
70
|
+
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
71
|
+
modelValue: {
|
|
72
|
+
type: ObjectConstructor;
|
|
73
|
+
default: () => {};
|
|
74
|
+
};
|
|
75
|
+
rules: {
|
|
76
|
+
type: ObjectConstructor;
|
|
77
|
+
default: () => {};
|
|
78
|
+
};
|
|
79
|
+
schema: {
|
|
80
|
+
type: ObjectConstructor;
|
|
81
|
+
default: () => {};
|
|
82
|
+
};
|
|
83
|
+
width: {
|
|
84
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
85
|
+
default: string;
|
|
86
|
+
};
|
|
87
|
+
layout: {
|
|
88
|
+
type: import('vue').PropType<import('../@types').ILayoutConfig | import('../@types').ILayout[][]>;
|
|
89
|
+
default: () => never[];
|
|
90
|
+
};
|
|
91
|
+
formType: {
|
|
92
|
+
type: StringConstructor;
|
|
93
|
+
default: string;
|
|
94
|
+
};
|
|
95
|
+
context: {
|
|
96
|
+
type: ObjectConstructor;
|
|
97
|
+
default: () => {};
|
|
98
|
+
};
|
|
99
|
+
httpAdapter: {
|
|
100
|
+
type: ObjectConstructor;
|
|
101
|
+
default: () => {
|
|
102
|
+
request: (url: string, config?: Partial<import('../util/fetch').IFetchConfig>) => Promise<any>;
|
|
103
|
+
responseParse: (res: any) => any;
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
readonly: {
|
|
107
|
+
type: BooleanConstructor;
|
|
108
|
+
default: boolean;
|
|
109
|
+
};
|
|
110
|
+
disabled: {
|
|
111
|
+
type: BooleanConstructor;
|
|
112
|
+
default: boolean;
|
|
113
|
+
};
|
|
114
|
+
readonlyMode: {
|
|
115
|
+
type: StringConstructor;
|
|
116
|
+
default: string;
|
|
117
|
+
validator: (value: any) => boolean;
|
|
118
|
+
};
|
|
119
|
+
labelWidth: {
|
|
120
|
+
type: NumberConstructor;
|
|
121
|
+
default: number;
|
|
122
|
+
};
|
|
123
|
+
showResetDefault: {
|
|
124
|
+
type: BooleanConstructor;
|
|
125
|
+
default: boolean;
|
|
126
|
+
};
|
|
127
|
+
}>> & Readonly<{}>, {
|
|
128
|
+
schema: Record<string, any>;
|
|
129
|
+
modelValue: Record<string, any>;
|
|
130
|
+
layout: import('../@types').ILayoutConfig | import('../@types').ILayout[][];
|
|
131
|
+
context: Record<string, any>;
|
|
132
|
+
httpAdapter: Record<string, any>;
|
|
133
|
+
disabled: boolean;
|
|
134
|
+
readonly: boolean;
|
|
135
|
+
readonlyMode: string;
|
|
136
|
+
showResetDefault: boolean;
|
|
137
|
+
labelWidth: number;
|
|
138
|
+
rules: Record<string, any>;
|
|
139
|
+
width: string | number;
|
|
140
|
+
formType: string;
|
|
141
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { ILayout, ILayoutConfig } from '../@types';
|
|
2
|
+
import { PropType } from 'vue';
|
|
3
|
+
|
|
4
|
+
declare const _default: {
|
|
5
|
+
modelValue: {
|
|
6
|
+
type: ObjectConstructor;
|
|
7
|
+
default: () => {};
|
|
8
|
+
};
|
|
9
|
+
rules: {
|
|
10
|
+
type: ObjectConstructor;
|
|
11
|
+
default: () => {};
|
|
12
|
+
};
|
|
13
|
+
schema: {
|
|
14
|
+
type: ObjectConstructor;
|
|
15
|
+
default: () => {};
|
|
16
|
+
};
|
|
17
|
+
width: {
|
|
18
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
19
|
+
default: string;
|
|
20
|
+
};
|
|
21
|
+
layout: {
|
|
22
|
+
type: PropType<ILayoutConfig | ILayout[][]>;
|
|
23
|
+
default: () => never[];
|
|
24
|
+
};
|
|
25
|
+
formType: {
|
|
26
|
+
type: StringConstructor;
|
|
27
|
+
default: string;
|
|
28
|
+
};
|
|
29
|
+
context: {
|
|
30
|
+
type: ObjectConstructor;
|
|
31
|
+
default: () => {};
|
|
32
|
+
};
|
|
33
|
+
httpAdapter: {
|
|
34
|
+
type: ObjectConstructor;
|
|
35
|
+
default: () => {
|
|
36
|
+
request: (url: string, config?: Partial<import('../util/fetch').IFetchConfig>) => Promise<any>;
|
|
37
|
+
responseParse: (res: any) => any;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
readonly: {
|
|
41
|
+
type: BooleanConstructor;
|
|
42
|
+
default: boolean;
|
|
43
|
+
};
|
|
44
|
+
disabled: {
|
|
45
|
+
type: BooleanConstructor;
|
|
46
|
+
default: boolean;
|
|
47
|
+
};
|
|
48
|
+
readonlyMode: {
|
|
49
|
+
type: StringConstructor;
|
|
50
|
+
default: string;
|
|
51
|
+
validator: (value: any) => boolean;
|
|
52
|
+
};
|
|
53
|
+
labelWidth: {
|
|
54
|
+
type: NumberConstructor;
|
|
55
|
+
default: number;
|
|
56
|
+
};
|
|
57
|
+
showResetDefault: {
|
|
58
|
+
type: BooleanConstructor;
|
|
59
|
+
default: boolean;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare class FormEvent {
|
|
2
|
+
callbacks: Record<string, Record<string, Array<Function>>>;
|
|
3
|
+
constructor();
|
|
4
|
+
on(path: string, type: string, cb: Function): this;
|
|
5
|
+
off(path: string, type: string, cb: Function): this;
|
|
6
|
+
once(path: string, type: string, cb: Function): this;
|
|
7
|
+
emit(path: string, type: string, ...arg: any[]): void;
|
|
8
|
+
}
|
|
9
|
+
declare const _default: FormEvent;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const getContext: (instance: any) => {
|
|
2
|
+
$self: any;
|
|
3
|
+
$context: any;
|
|
4
|
+
$schema: any;
|
|
5
|
+
$rules: any;
|
|
6
|
+
$loadDataSource: any;
|
|
7
|
+
$validate: any;
|
|
8
|
+
$rootData: any;
|
|
9
|
+
$widgetNode: any;
|
|
10
|
+
};
|
|
11
|
+
export declare const executeExpression: (expression: string | object, instance: any, $dep?: Array<any>) => any;
|
|
12
|
+
export declare const parseStrTemplate: (expression: string) => any;
|
|
13
|
+
export declare const isExpression: (expression: any) => boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function locale(item: string): any;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ILayout, ILayoutConfig, IDimension } from '../@types/index';
|
|
2
|
+
|
|
3
|
+
export default class Layout {
|
|
4
|
+
static findLayoutByProp(prop: string, layout: ILayoutConfig[][]): any;
|
|
5
|
+
layout: ILayoutConfig;
|
|
6
|
+
constructor(layout?: ILayout[][] | ILayoutConfig);
|
|
7
|
+
transformValueToPixel(value: number | string): string;
|
|
8
|
+
parseLayout(config: ILayoutConfig): ILayoutConfig;
|
|
9
|
+
getLayoutDimension(layout?: ILayout[][]): {
|
|
10
|
+
columns: number;
|
|
11
|
+
rows: number;
|
|
12
|
+
};
|
|
13
|
+
parseGridTemplate(dim: IDimension): {
|
|
14
|
+
gridTemplateColumns: string;
|
|
15
|
+
gridTemplateRows: string;
|
|
16
|
+
};
|
|
17
|
+
parseGridTemplateAreas(gridTemplate: any, group: ILayoutConfig[][]): string;
|
|
18
|
+
autoFillColumns(rows: ILayoutConfig[], maxColumns: number): (string | number)[];
|
|
19
|
+
repeatTemplate(len: number, auto?: boolean): string;
|
|
20
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export default class Path {
|
|
2
|
+
static separator: string;
|
|
3
|
+
static getCurPath(parent: any, current: any): any;
|
|
4
|
+
static getPathVal(obj: any, path: any, leftDeviation?: number): any;
|
|
5
|
+
static setPathValue(obj: {} | undefined, path: any, value: any): any;
|
|
6
|
+
static getSubPath(parent: string, current: string): string;
|
|
7
|
+
static getPathLastProp(path: string): string | undefined;
|
|
8
|
+
static getParentPath(path: string): string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IReaction } from '../@types';
|
|
2
|
+
|
|
3
|
+
export declare const reactionRegister: (path: string, reactions?: Array<IReaction>) => void;
|
|
4
|
+
export declare const reactionUnRegister: (path: string) => void;
|
|
5
|
+
export declare const reactionDispatch: (path: string, typeName: string) => void;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Registry注册Form组件全局相关内容
|
|
3
|
+
*/
|
|
4
|
+
export declare class Registry<Component = any> {
|
|
5
|
+
static namespace: string;
|
|
6
|
+
static context: Record<string, any>;
|
|
7
|
+
widgets: Map<String, Component>;
|
|
8
|
+
components: Map<String, Component>;
|
|
9
|
+
fields: Map<String, Component>;
|
|
10
|
+
addComponentsMap(coms?: object): void;
|
|
11
|
+
getComponent(key: any): Component | undefined;
|
|
12
|
+
addFieldsMap(map?: object): void;
|
|
13
|
+
getField(key: any): Component | undefined;
|
|
14
|
+
addBaseWidgets(widgets?: object): void;
|
|
15
|
+
getBaseWidget(name: string): string | Component | import('vue').ConcreteComponent<{}, any, any, import('vue').ComputedOptions, import('vue').MethodOptions, {}, any> | undefined;
|
|
16
|
+
addMap(props: any, map: any): void;
|
|
17
|
+
}
|
|
18
|
+
declare const _default: Registry<any>;
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { JSONSchema7 } from 'json-schema';
|
|
2
|
+
import { IUIComponent } from '../@types';
|
|
3
|
+
|
|
4
|
+
export default class Schema {
|
|
5
|
+
static rootSchema: JSONSchema7;
|
|
6
|
+
static resolveRef(): void;
|
|
7
|
+
static resolveDependencies(): void;
|
|
8
|
+
static resolveAdditionalProperties(): void;
|
|
9
|
+
static resolveSchema(schema: JSONSchema7): JSONSchema7;
|
|
10
|
+
static getSchemaDefaultValue(_schema: JSONSchema7): any;
|
|
11
|
+
static getSchemaType(schema: JSONSchema7): string;
|
|
12
|
+
static getUiProps(props: string, schema: JSONSchema7): Partial<IUIComponent>;
|
|
13
|
+
static getSchemaField(schema: JSONSchema7): Partial<IUIComponent>;
|
|
14
|
+
static isMultiSelect(schema: JSONSchema7): boolean;
|
|
15
|
+
static isTupleArray(schema: JSONSchema7): boolean;
|
|
16
|
+
static isCustomArrayWidget(schema: JSONSchema7): any;
|
|
17
|
+
static resolveFormComponent(com: any): any;
|
|
18
|
+
static getGroupWrap(schema: JSONSchema7): Partial<IUIComponent>;
|
|
19
|
+
static getUiComponent(schema: JSONSchema7): Partial<IUIComponent>;
|
|
20
|
+
static getDefaultWidget(schema: JSONSchema7): string | object | null;
|
|
21
|
+
static isRequired(schema: JSONSchema7, name: string): boolean;
|
|
22
|
+
static getUiOptions(schema: JSONSchema7): any;
|
|
23
|
+
static getDependencies(schema: JSONSchema7, name: string): [string, string[] | import('json-schema').JSONSchema7Definition] | undefined;
|
|
24
|
+
static resolveDefaultDatasource(schema: JSONSchema7): any;
|
|
25
|
+
constructor(rootSchema: any);
|
|
26
|
+
}
|