@zeng-alt/formkit-form-builder 1.2.0 → 1.3.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/dist/builder.css +1 -1
- package/dist/builder.es.js +633 -595
- package/dist/builder.umd.js +5 -5
- package/dist/index.d.ts +25 -2
- package/package.json +40 -40
package/dist/index.d.ts
CHANGED
|
@@ -68,6 +68,7 @@ declare const __VLS_component_3: DefineComponent<__VLS_Props_5, {
|
|
|
68
68
|
onSubmit?: ((formData: ModelValue_3, id: string | undefined, version: number | undefined) => any) | undefined;
|
|
69
69
|
"onUpdate:modelValue"?: ((value: ModelValue_3) => any) | undefined;
|
|
70
70
|
}>, {
|
|
71
|
+
disabled: boolean;
|
|
71
72
|
actions: boolean;
|
|
72
73
|
formClass: string;
|
|
73
74
|
dataStructure: "flat" | "nested";
|
|
@@ -122,6 +123,7 @@ declare type __VLS_Props_3 = {
|
|
|
122
123
|
formClass?: string;
|
|
123
124
|
interactiveContainers?: boolean;
|
|
124
125
|
resetOnSubmit?: boolean;
|
|
126
|
+
disabled?: boolean;
|
|
125
127
|
};
|
|
126
128
|
|
|
127
129
|
declare type __VLS_Props_4 = {
|
|
@@ -142,6 +144,7 @@ declare type __VLS_Props_4 = {
|
|
|
142
144
|
/** 右侧数据面板宽度 */
|
|
143
145
|
dataPanelWidth?: string;
|
|
144
146
|
resetOnSubmit?: boolean;
|
|
147
|
+
disabled?: boolean;
|
|
145
148
|
};
|
|
146
149
|
|
|
147
150
|
declare type __VLS_Props_5 = {
|
|
@@ -176,6 +179,8 @@ declare type __VLS_Props_5 = {
|
|
|
176
179
|
theme?: BuilderTheme;
|
|
177
180
|
/** 自定义 HTTP 请求库实例:供 JS 绑定代码里的 axios 变量使用;缺省使用内置 axios */
|
|
178
181
|
http?: AxiosInstance;
|
|
182
|
+
/** 禁用整个表单(所有输入 + 操作区按钮);缺省 false */
|
|
183
|
+
disabled?: boolean;
|
|
179
184
|
} & Omit<Partial<ConfigProviderProps>, 'theme'>;
|
|
180
185
|
|
|
181
186
|
declare function __VLS_template(): {
|
|
@@ -307,6 +312,7 @@ submit: (formData: ModelValue, id: string | undefined, version: number | undefin
|
|
|
307
312
|
onSubmit?: ((formData: ModelValue, id: string | undefined, version: number | undefined) => any) | undefined;
|
|
308
313
|
"onUpdate:show"?: ((value: boolean) => any) | undefined;
|
|
309
314
|
}>, {
|
|
315
|
+
disabled: boolean;
|
|
310
316
|
actions: boolean;
|
|
311
317
|
formClass: string;
|
|
312
318
|
interactiveContainers: boolean;
|
|
@@ -338,6 +344,7 @@ readonly interactiveContainers?: boolean | undefined;
|
|
|
338
344
|
readonly config?: FormBuilderConfig | undefined;
|
|
339
345
|
readonly theme?: BuilderTheme | undefined;
|
|
340
346
|
readonly http?: AxiosInstance | undefined;
|
|
347
|
+
readonly disabled?: boolean | undefined;
|
|
341
348
|
readonly themeOverrides?: GlobalThemeOverrides | null | undefined;
|
|
342
349
|
readonly tag?: string | undefined;
|
|
343
350
|
readonly bordered?: boolean | undefined;
|
|
@@ -500,6 +507,7 @@ type?: string;
|
|
|
500
507
|
name?: string;
|
|
501
508
|
actions?: boolean;
|
|
502
509
|
formClass?: string;
|
|
510
|
+
disabled?: boolean;
|
|
503
511
|
modelValue?: {
|
|
504
512
|
[x: string]: unknown;
|
|
505
513
|
};
|
|
@@ -521,6 +529,7 @@ type?: string;
|
|
|
521
529
|
name?: string;
|
|
522
530
|
actions?: boolean;
|
|
523
531
|
formClass?: string;
|
|
532
|
+
disabled?: boolean;
|
|
524
533
|
modelValue?: {
|
|
525
534
|
[x: string]: unknown;
|
|
526
535
|
};
|
|
@@ -566,6 +575,7 @@ interactiveContainers?: boolean;
|
|
|
566
575
|
config?: FormBuilderConfig;
|
|
567
576
|
theme?: BuilderTheme;
|
|
568
577
|
http?: AxiosInstance;
|
|
578
|
+
disabled?: boolean;
|
|
569
579
|
} & Omit<Partial<Partial<ExtractPropTypes< {
|
|
570
580
|
readonly abstract: BooleanConstructor;
|
|
571
581
|
readonly bordered: {
|
|
@@ -619,6 +629,7 @@ submit: (formData: {
|
|
|
619
629
|
[x: string]: unknown;
|
|
620
630
|
}) => any;
|
|
621
631
|
}, string, {
|
|
632
|
+
disabled: boolean;
|
|
622
633
|
actions: boolean;
|
|
623
634
|
formClass: string;
|
|
624
635
|
dataStructure: "flat" | "nested";
|
|
@@ -645,6 +656,7 @@ $forceUpdate: () => void;
|
|
|
645
656
|
$nextTick: typeof nextTick;
|
|
646
657
|
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, OnCleanup]) => any : (...args: [any, any, OnCleanup]) => any, options?: WatchOptions): WatchStopHandle;
|
|
647
658
|
} & Readonly<{
|
|
659
|
+
disabled: boolean;
|
|
648
660
|
actions: boolean;
|
|
649
661
|
formClass: string;
|
|
650
662
|
dataStructure: "flat" | "nested";
|
|
@@ -672,6 +684,7 @@ interactiveContainers?: boolean;
|
|
|
672
684
|
config?: FormBuilderConfig;
|
|
673
685
|
theme?: BuilderTheme;
|
|
674
686
|
http?: AxiosInstance;
|
|
687
|
+
disabled?: boolean;
|
|
675
688
|
} & Omit<Partial<Partial<ExtractPropTypes< {
|
|
676
689
|
readonly abstract: BooleanConstructor;
|
|
677
690
|
readonly bordered: {
|
|
@@ -712,7 +725,7 @@ onSubmit?: ((formData: {
|
|
|
712
725
|
"onUpdate:modelValue"?: ((value: {
|
|
713
726
|
[x: string]: unknown;
|
|
714
727
|
}) => any) | undefined;
|
|
715
|
-
}>, "submit" | "reset" | "loading" | "validate" | ("actions" | "formClass" | "dataStructure" | "actionsJustify" | "interactiveContainers")> & {
|
|
728
|
+
}>, "submit" | "reset" | "loading" | "validate" | ("disabled" | "actions" | "formClass" | "dataStructure" | "actionsJustify" | "interactiveContainers")> & {
|
|
716
729
|
submit: () => void | undefined;
|
|
717
730
|
reset: () => void | undefined;
|
|
718
731
|
validate: () => Promise<boolean>;
|
|
@@ -983,6 +996,7 @@ declare type FormActionsScope = {
|
|
|
983
996
|
submit: () => void;
|
|
984
997
|
reset: () => void;
|
|
985
998
|
loading: boolean;
|
|
999
|
+
disabled: boolean;
|
|
986
1000
|
};
|
|
987
1001
|
|
|
988
1002
|
export declare interface FormBuilderConfig {
|
|
@@ -1059,6 +1073,7 @@ submit: (formData: ModelValue_2, id: string | undefined, version: number | undef
|
|
|
1059
1073
|
onSubmit?: ((formData: ModelValue_2, id: string | undefined, version: number | undefined) => any) | undefined;
|
|
1060
1074
|
"onUpdate:show"?: ((value: boolean) => any) | undefined;
|
|
1061
1075
|
}>, {
|
|
1076
|
+
disabled: boolean;
|
|
1062
1077
|
title: string;
|
|
1063
1078
|
actions: boolean;
|
|
1064
1079
|
formClass: string;
|
|
@@ -1093,6 +1108,7 @@ readonly interactiveContainers?: boolean | undefined;
|
|
|
1093
1108
|
readonly config?: FormBuilderConfig | undefined;
|
|
1094
1109
|
readonly theme?: BuilderTheme | undefined;
|
|
1095
1110
|
readonly http?: AxiosInstance | undefined;
|
|
1111
|
+
readonly disabled?: boolean | undefined;
|
|
1096
1112
|
readonly themeOverrides?: GlobalThemeOverrides | null | undefined;
|
|
1097
1113
|
readonly tag?: string | undefined;
|
|
1098
1114
|
readonly bordered?: boolean | undefined;
|
|
@@ -1255,6 +1271,7 @@ type?: string;
|
|
|
1255
1271
|
name?: string;
|
|
1256
1272
|
actions?: boolean;
|
|
1257
1273
|
formClass?: string;
|
|
1274
|
+
disabled?: boolean;
|
|
1258
1275
|
modelValue?: {
|
|
1259
1276
|
[x: string]: unknown;
|
|
1260
1277
|
};
|
|
@@ -1276,6 +1293,7 @@ type?: string;
|
|
|
1276
1293
|
name?: string;
|
|
1277
1294
|
actions?: boolean;
|
|
1278
1295
|
formClass?: string;
|
|
1296
|
+
disabled?: boolean;
|
|
1279
1297
|
modelValue?: {
|
|
1280
1298
|
[x: string]: unknown;
|
|
1281
1299
|
};
|
|
@@ -1321,6 +1339,7 @@ interactiveContainers?: boolean;
|
|
|
1321
1339
|
config?: FormBuilderConfig;
|
|
1322
1340
|
theme?: BuilderTheme;
|
|
1323
1341
|
http?: AxiosInstance;
|
|
1342
|
+
disabled?: boolean;
|
|
1324
1343
|
} & Omit<Partial<Partial<ExtractPropTypes< {
|
|
1325
1344
|
readonly abstract: BooleanConstructor;
|
|
1326
1345
|
readonly bordered: {
|
|
@@ -1374,6 +1393,7 @@ submit: (formData: {
|
|
|
1374
1393
|
[x: string]: unknown;
|
|
1375
1394
|
}) => any;
|
|
1376
1395
|
}, string, {
|
|
1396
|
+
disabled: boolean;
|
|
1377
1397
|
actions: boolean;
|
|
1378
1398
|
formClass: string;
|
|
1379
1399
|
dataStructure: "flat" | "nested";
|
|
@@ -1400,6 +1420,7 @@ $forceUpdate: () => void;
|
|
|
1400
1420
|
$nextTick: typeof nextTick;
|
|
1401
1421
|
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, OnCleanup]) => any : (...args: [any, any, OnCleanup]) => any, options?: WatchOptions): WatchStopHandle;
|
|
1402
1422
|
} & Readonly<{
|
|
1423
|
+
disabled: boolean;
|
|
1403
1424
|
actions: boolean;
|
|
1404
1425
|
formClass: string;
|
|
1405
1426
|
dataStructure: "flat" | "nested";
|
|
@@ -1427,6 +1448,7 @@ interactiveContainers?: boolean;
|
|
|
1427
1448
|
config?: FormBuilderConfig;
|
|
1428
1449
|
theme?: BuilderTheme;
|
|
1429
1450
|
http?: AxiosInstance;
|
|
1451
|
+
disabled?: boolean;
|
|
1430
1452
|
} & Omit<Partial<Partial<ExtractPropTypes< {
|
|
1431
1453
|
readonly abstract: BooleanConstructor;
|
|
1432
1454
|
readonly bordered: {
|
|
@@ -1467,7 +1489,7 @@ onSubmit?: ((formData: {
|
|
|
1467
1489
|
"onUpdate:modelValue"?: ((value: {
|
|
1468
1490
|
[x: string]: unknown;
|
|
1469
1491
|
}) => any) | undefined;
|
|
1470
|
-
}>, "submit" | "reset" | "loading" | "validate" | ("actions" | "formClass" | "dataStructure" | "actionsJustify" | "interactiveContainers")> & {
|
|
1492
|
+
}>, "submit" | "reset" | "loading" | "validate" | ("disabled" | "actions" | "formClass" | "dataStructure" | "actionsJustify" | "interactiveContainers")> & {
|
|
1471
1493
|
submit: () => void | undefined;
|
|
1472
1494
|
reset: () => void | undefined;
|
|
1473
1495
|
validate: () => Promise<boolean>;
|
|
@@ -1507,6 +1529,7 @@ declare type FormKitTypedProps = {
|
|
|
1507
1529
|
name?: string;
|
|
1508
1530
|
actions?: boolean;
|
|
1509
1531
|
formClass?: string;
|
|
1532
|
+
disabled?: boolean;
|
|
1510
1533
|
modelValue?: ModelValue_3;
|
|
1511
1534
|
'onUpdate:modelValue'?: (value: ModelValue_3) => void;
|
|
1512
1535
|
onSubmit?: (formData: ModelValue_3) => void;
|
package/package.json
CHANGED
|
@@ -1,25 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeng-alt/formkit-form-builder",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "A visual FormKit schema builder for Vue 3",
|
|
5
|
-
"
|
|
5
|
+
"keywords": [
|
|
6
|
+
"drag-and-drop",
|
|
7
|
+
"form-builder",
|
|
8
|
+
"formkit",
|
|
9
|
+
"schema",
|
|
10
|
+
"vue",
|
|
11
|
+
"vue3"
|
|
12
|
+
],
|
|
6
13
|
"license": "LGPL",
|
|
7
14
|
"repository": {
|
|
8
15
|
"type": "git",
|
|
9
16
|
"url": "https://github.com/zeng-alt/formkit-form-builder.git"
|
|
10
17
|
},
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"
|
|
18
|
+
"style": "./dist/builder.css",
|
|
19
|
+
"files": [
|
|
20
|
+
"dist"
|
|
21
|
+
],
|
|
22
|
+
"type": "module",
|
|
23
|
+
"sideEffects": [
|
|
24
|
+
"**/*.css"
|
|
18
25
|
],
|
|
19
26
|
"main": "./dist/builder.umd.js",
|
|
20
27
|
"module": "./dist/builder.es.js",
|
|
21
28
|
"types": "./dist/index.d.ts",
|
|
22
|
-
"style": "./dist/builder.css",
|
|
23
29
|
"exports": {
|
|
24
30
|
".": {
|
|
25
31
|
"types": "./dist/index.d.ts",
|
|
@@ -31,12 +37,6 @@
|
|
|
31
37
|
"publishConfig": {
|
|
32
38
|
"access": "public"
|
|
33
39
|
},
|
|
34
|
-
"files": [
|
|
35
|
-
"dist"
|
|
36
|
-
],
|
|
37
|
-
"sideEffects": [
|
|
38
|
-
"**/*.css"
|
|
39
|
-
],
|
|
40
40
|
"scripts": {
|
|
41
41
|
"dev": "vite",
|
|
42
42
|
"build": "run-p type-check \"build-only {@}\" --",
|
|
@@ -48,28 +48,7 @@
|
|
|
48
48
|
"lint:eslint": "eslint . --fix --cache",
|
|
49
49
|
"format": "oxfmt src/"
|
|
50
50
|
},
|
|
51
|
-
"peerDependencies": {
|
|
52
|
-
"@vueuse/core": "^14.2.1",
|
|
53
|
-
"naive-ui": "^2.44.0",
|
|
54
|
-
"vue": "^3.5.0",
|
|
55
|
-
"@codemirror/autocomplete": "^6.20.1",
|
|
56
|
-
"@codemirror/commands": "^6.10.3",
|
|
57
|
-
"@codemirror/language": "^6.9.2",
|
|
58
|
-
"@codemirror/state": "^6.5.2",
|
|
59
|
-
"@codemirror/view": "^6.38.2",
|
|
60
|
-
"@codemirror/lang-javascript": "^6.2.4",
|
|
61
|
-
"@codemirror/theme-one-dark": "^6.1.3",
|
|
62
|
-
"@codemirror/lint": "^6.8.5"
|
|
63
|
-
},
|
|
64
51
|
"dependencies": {
|
|
65
|
-
"@codemirror/autocomplete": "^6.20.1",
|
|
66
|
-
"@codemirror/commands": "^6.10.3",
|
|
67
|
-
"@codemirror/language": "^6.9.2",
|
|
68
|
-
"@codemirror/state": "^6.5.2",
|
|
69
|
-
"@codemirror/view": "^6.38.2",
|
|
70
|
-
"@codemirror/lang-javascript": "^6.2.4",
|
|
71
|
-
"@codemirror/theme-one-dark": "^6.1.3",
|
|
72
|
-
"@codemirror/lint": "^6.8.5",
|
|
73
52
|
"@formkit/core": "^2.0.0",
|
|
74
53
|
"@formkit/drag-and-drop": "^0.5.0",
|
|
75
54
|
"@formkit/i18n": "^2.0.0",
|
|
@@ -81,6 +60,14 @@
|
|
|
81
60
|
"vue-sonner": "^2.0.9"
|
|
82
61
|
},
|
|
83
62
|
"devDependencies": {
|
|
63
|
+
"@codemirror/autocomplete": "^6.20.1",
|
|
64
|
+
"@codemirror/commands": "^6.10.3",
|
|
65
|
+
"@codemirror/lang-javascript": "^6.2.4",
|
|
66
|
+
"@codemirror/language": "^6.9.2",
|
|
67
|
+
"@codemirror/lint": "^6.8.5",
|
|
68
|
+
"@codemirror/state": "^6.5.2",
|
|
69
|
+
"@codemirror/theme-one-dark": "^6.1.3",
|
|
70
|
+
"@codemirror/view": "^6.38.2",
|
|
84
71
|
"@formkit/core": "^2.0.0",
|
|
85
72
|
"@formkit/drag-and-drop": "^0.5.3",
|
|
86
73
|
"@formkit/vue": "^2.0.0",
|
|
@@ -89,6 +76,9 @@
|
|
|
89
76
|
"@iconify/utils": "^3.1.0",
|
|
90
77
|
"@tsconfig/node24": "^24.0.4",
|
|
91
78
|
"@types/node": "^24.12.0",
|
|
79
|
+
"@unocss/eslint-config": "^66.7.0",
|
|
80
|
+
"@unocss/eslint-plugin": "^66.7.0",
|
|
81
|
+
"@unocss/preset-rem-to-px": "^66.7.0",
|
|
92
82
|
"@vitejs/plugin-vue": "^6.0.5",
|
|
93
83
|
"@vitejs/plugin-vue-jsx": "^5.1.5",
|
|
94
84
|
"@vue/eslint-config-typescript": "^14.7.0",
|
|
@@ -108,9 +98,6 @@
|
|
|
108
98
|
"tsx": "^4.21.0",
|
|
109
99
|
"typescript": "~6.0.0",
|
|
110
100
|
"unocss": "^66.7.0",
|
|
111
|
-
"@unocss/preset-rem-to-px": "^66.7.0",
|
|
112
|
-
"@unocss/eslint-config": "^66.7.0",
|
|
113
|
-
"@unocss/eslint-plugin": "^66.7.0",
|
|
114
101
|
"unplugin-auto-import": "^21.1.0",
|
|
115
102
|
"unplugin-vue-components": "^32.1.0",
|
|
116
103
|
"vite": "^8.0.3",
|
|
@@ -119,6 +106,19 @@
|
|
|
119
106
|
"vue": "^3.5.31",
|
|
120
107
|
"vue-tsc": "^3.2.6"
|
|
121
108
|
},
|
|
109
|
+
"peerDependencies": {
|
|
110
|
+
"@codemirror/autocomplete": "^6.20.1",
|
|
111
|
+
"@codemirror/commands": "^6.10.3",
|
|
112
|
+
"@codemirror/lang-javascript": "^6.2.4",
|
|
113
|
+
"@codemirror/language": "^6.9.2",
|
|
114
|
+
"@codemirror/lint": "^6.8.5",
|
|
115
|
+
"@codemirror/state": "^6.5.2",
|
|
116
|
+
"@codemirror/theme-one-dark": "^6.1.3",
|
|
117
|
+
"@codemirror/view": "^6.38.2",
|
|
118
|
+
"@vueuse/core": "^14.2.1",
|
|
119
|
+
"naive-ui": "^2.44.0",
|
|
120
|
+
"vue": "^3.5.0"
|
|
121
|
+
},
|
|
122
122
|
"engines": {
|
|
123
123
|
"node": "^20.19.0 || >=22.12.0"
|
|
124
124
|
}
|