@vunk/form 0.0.1-alpha.3 → 0.0.1-alpha.30
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/components/button/index.d.ts +4 -0
- package/components/button/index.js +121 -0
- package/components/button/src/ctx.d.ts +91 -0
- package/components/button/src/ctx.js +39 -0
- package/components/button/src/index.vue.d.ts +241 -0
- package/components/button/src/types.d.ts +7 -0
- package/components/button/src/types.js +1 -0
- package/components/checkbox/index.css +38 -0
- package/components/checkbox/index.d.ts +4 -0
- package/components/checkbox/index.js +125 -0
- package/components/checkbox/src/ctx.d.ts +107 -0
- package/components/checkbox/src/ctx.js +43 -0
- package/components/checkbox/src/index.vue.d.ts +270 -0
- package/components/checkbox/src/types.d.ts +1 -0
- package/components/checkbox/src/types.js +1 -0
- package/components/color-picker/index.d.ts +4 -0
- package/components/color-picker/index.js +72 -0
- package/components/color-picker/src/ctx.d.ts +74 -0
- package/components/color-picker/src/ctx.js +23 -0
- package/components/color-picker/src/index.vue.d.ts +196 -0
- package/components/color-picker/src/types.d.ts +1 -0
- package/components/color-picker/src/types.js +1 -0
- package/components/date-picker/index.js +11 -5
- package/components/date-picker/src/ctx.d.ts +64 -57
- package/components/date-picker/src/ctx.js +1 -1
- package/components/date-picker/src/index.vue.d.ts +170 -140
- package/components/date-picker/src/types.d.ts +7 -7
- package/components/form/index.js +23 -7
- package/components/form/src/ctx.d.ts +93 -79
- package/components/form/src/ctx.js +5 -2
- package/components/form/src/index.vue.d.ts +270 -236
- package/components/form-item/index.css +4 -0
- package/components/form-item/index.js +19 -3
- package/components/form-item/src/ctx.d.ts +15 -7
- package/components/form-item/src/ctx.js +8 -0
- package/components/form-item/src/index.vue.d.ts +43 -13
- package/components/form-item-renderer/index.js +15 -1
- package/components/form-item-renderer/src/ctx.d.ts +3 -3
- package/components/form-item-renderer/src/index.vue.d.ts +9 -9
- package/components/form-item-renderer/src/types.d.ts +2 -0
- package/components/form-item-renderer-template/src/index.vue.d.ts +1 -1
- package/components/form-item-renderer-template-default/index.js +100 -22
- package/components/form-item-renderer-template-default/src/index.vue.d.ts +7 -7
- package/components/form-item-renderer-template-layout/index.js +22 -13
- package/components/form-item-renderer-template-layout/src/ctx.d.ts +3 -2
- package/components/form-item-renderer-template-layout/src/ctx.js +1 -1
- package/components/form-item-renderer-template-layout/src/index.vue.d.ts +18 -6
- package/components/input/index.js +23 -4
- package/components/input/src/ctx.d.ts +90 -48
- package/components/input/src/ctx.js +13 -1
- package/components/input/src/index.vue.d.ts +214 -117
- package/components/input-number/index.css +17 -0
- package/components/input-number/index.js +32 -5
- package/components/input-number/src/ctx.d.ts +22 -10
- package/components/input-number/src/ctx.js +13 -1
- package/components/input-number/src/index.vue.d.ts +92 -32
- package/components/radio/index.css +29 -0
- package/components/radio/index.d.ts +4 -0
- package/components/radio/index.js +121 -0
- package/components/radio/src/ctx.d.ts +77 -0
- package/components/radio/src/ctx.js +39 -0
- package/components/radio/src/index.vue.d.ts +204 -0
- package/components/radio/src/types.d.ts +1 -0
- package/components/radio/src/types.js +1 -0
- package/components/select/index.css +11 -0
- package/components/select/index.js +23 -7
- package/components/select/src/ctx.d.ts +34 -26
- package/components/select/src/index.vue.d.ts +170 -102
- package/components/switch/index.css +11 -0
- package/components/switch/index.js +41 -13
- package/components/switch/src/ctx.d.ts +48 -11
- package/components/switch/src/ctx.js +15 -2
- package/components/switch/src/index.vue.d.ts +150 -36
- package/components/upload/index.css +20 -0
- package/components/upload/index.d.ts +5 -0
- package/components/upload/index.js +496 -0
- package/components/upload/src/ctx.d.ts +173 -0
- package/components/upload/src/ctx.js +41 -0
- package/components/upload/src/file.vue.d.ts +96 -0
- package/components/upload/src/index.vue.d.ts +421 -0
- package/components/upload/src/types.d.ts +1 -0
- package/components/upload/src/types.js +1 -0
- package/composables/index.d.ts +1 -0
- package/composables/index.js +318 -7
- package/composables/useForm.d.ts +9 -0
- package/composables/useSourceManager.d.ts +2 -0
- package/index.css +137 -0
- package/index.d.ts +1 -0
- package/index.esm.js +4 -1
- package/package.json +4 -1
- package/shared/default-renderer-source/index.d.ts +12 -0
- package/shared/default-renderer-source/index.js +83 -0
- package/shared/element-plus/ctx.d.ts +76 -13
- package/shared/element-plus/index.js +71 -24
- package/shared/element-plus/instances.d.ts +56 -26
- package/shared/infer-prop/index.d.ts +17 -0
- package/shared/infer-prop/index.js +34 -0
- package/shared/types/basic-source/index.d.ts +7 -0
- package/shared/types/basic-source/index.js +1 -0
- package/shared/types/form/checkbox.d.ts +13 -0
- package/shared/types/form/index.d.ts +2 -0
- package/shared/types/form/index.js +1 -0
- package/shared/types/form/radio.d.ts +8 -0
- package/shared/types/index.d.ts +1 -0
- package/shared/types/layout-source/index.d.ts +6 -4
- package/shared/types/renderer-source/button.d.ts +7 -0
- package/shared/types/renderer-source/checkbox.d.ts +7 -0
- package/shared/types/renderer-source/color-picker.d.ts +7 -0
- package/shared/types/renderer-source/compoent.d.ts +3 -0
- package/shared/types/renderer-source/date-picker.d.ts +3 -2
- package/shared/types/renderer-source/index.d.ts +11 -1
- package/shared/types/renderer-source/input-number.d.ts +3 -2
- package/shared/types/renderer-source/input.d.ts +3 -2
- package/shared/types/renderer-source/radio.d.ts +7 -0
- package/shared/types/renderer-source/select.d.ts +3 -2
- package/shared/types/renderer-source/switch.d.ts +3 -2
- package/shared/types/renderer-source/upload.d.ts +7 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/shared/types/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { VueComponentPropsType } from '@vunk/core';
|
|
2
2
|
import { ElCol, ElRow } from 'element-plus';
|
|
3
|
-
|
|
3
|
+
import { BasicSource } from '@vunk/form/shared/types/basic-source';
|
|
4
|
+
export interface ElRowSource<S> extends VueComponentPropsType<typeof ElRow>, BasicSource {
|
|
4
5
|
templateType: 'ElRow';
|
|
5
6
|
templateSlots: S[];
|
|
6
7
|
}
|
|
7
|
-
export interface ElColSource<S> extends VueComponentPropsType<typeof ElCol
|
|
8
|
+
export interface ElColSource<S> extends VueComponentPropsType<typeof ElCol>, BasicSource {
|
|
8
9
|
templateType: 'ElCol';
|
|
9
10
|
templateSlots: S[];
|
|
10
11
|
}
|
|
@@ -22,9 +23,10 @@ interface VkfFlexItem {
|
|
|
22
23
|
basis?: string | IntrinsicSizing | GlobalValues | 'revert' | 'revert-layer' | 'content';
|
|
23
24
|
overflow?: 'hidden' | 'visible' | 'scroll' | 'auto' | string;
|
|
24
25
|
}
|
|
25
|
-
export interface VkfFlexSource<S> extends VkfFlex, VkfFlexItem {
|
|
26
|
+
export interface VkfFlexSource<S> extends VkfFlex, VkfFlexItem, BasicSource {
|
|
26
27
|
templateType: 'VkfFlex';
|
|
27
|
-
templateSlots
|
|
28
|
+
templateSlots?: S[];
|
|
29
|
+
[s: string]: any;
|
|
28
30
|
}
|
|
29
31
|
export declare type LayoutSourceEnhance<S> = ElRowSource<S> | ElColSource<S> | VkfFlexSource<S>;
|
|
30
32
|
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { VkfButton } from '@vunk/form/components/button';
|
|
2
|
+
import { VueComponentPropsType } from '@vunk/core';
|
|
3
|
+
import { BasicSource } from '@vunk/form/shared/types/basic-source';
|
|
4
|
+
export interface VkfButtonSource<P extends string = string> extends VueComponentPropsType<typeof VkfButton>, BasicSource {
|
|
5
|
+
prop?: P;
|
|
6
|
+
templateType: 'VkfButton';
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { VkfCheckbox } from '@vunk/form/components/checkbox';
|
|
2
|
+
import { VueComponentPropsType } from '@vunk/core';
|
|
3
|
+
import { BasicSource } from '@vunk/form/shared/types/basic-source';
|
|
4
|
+
export interface VkfCheckboxSource<P extends string = string> extends VueComponentPropsType<typeof VkfCheckbox>, BasicSource {
|
|
5
|
+
prop: P;
|
|
6
|
+
templateType: 'VkfCheckbox';
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { VkfColorPicker } from '@vunk/form/components/color-picker';
|
|
2
|
+
import { VueComponentPropsType } from '@vunk/core';
|
|
3
|
+
import { BasicSource } from '@vunk/form/shared/types/basic-source';
|
|
4
|
+
export interface VkfColorPickerSource<P extends string = string> extends VueComponentPropsType<typeof VkfColorPicker>, BasicSource {
|
|
5
|
+
prop: P;
|
|
6
|
+
templateType: 'VkfColorPicker';
|
|
7
|
+
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { Merge } from '@vunk/core';
|
|
2
|
+
import { BasicSource } from '@vunk/form/shared/types/basic-source';
|
|
2
3
|
export declare type ComponentSource<C = undefined> = Merge<{
|
|
3
4
|
templateType: 'Component';
|
|
5
|
+
templateIf?: BasicSource['templateIf'];
|
|
4
6
|
is: any;
|
|
7
|
+
prop?: string;
|
|
5
8
|
}, C>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { VkfDatePicker } from '@vunk/form/components/date-picker';
|
|
2
2
|
import type { Merge, VueComponentPropsType } from '@vunk/core';
|
|
3
|
+
import { BasicSource } from '@vunk/form/shared/types/basic-source';
|
|
3
4
|
export declare type VkfDatePickerProps<T = undefined> = Merge<VueComponentPropsType<typeof VkfDatePicker>, T>;
|
|
4
|
-
export
|
|
5
|
+
export interface VkfDatePickerSource<P extends string = string> extends VkfDatePickerProps, BasicSource {
|
|
5
6
|
prop: P;
|
|
6
7
|
templateType: 'VkfDatePicker';
|
|
7
|
-
}
|
|
8
|
+
}
|
|
@@ -4,10 +4,20 @@ import type { VkfInputSource } from './input';
|
|
|
4
4
|
import type { VkfSelectSource } from './select';
|
|
5
5
|
import type { VkfSwitchSource } from './switch';
|
|
6
6
|
import type { VkfInputNumberSource } from './input-number';
|
|
7
|
+
import type { VkfRadioSource } from './radio';
|
|
8
|
+
import type { VkfCheckboxSource } from './checkbox';
|
|
9
|
+
import type { VkfUploadSource } from './upload';
|
|
10
|
+
import type { VkfColorPickerSource } from './color-picker';
|
|
11
|
+
import type { VkfButtonSource } from './button';
|
|
7
12
|
export * from './compoent';
|
|
8
13
|
export * from './date-picker';
|
|
9
14
|
export * from './input';
|
|
10
15
|
export * from './select';
|
|
11
16
|
export * from './switch';
|
|
12
17
|
export * from './input-number';
|
|
13
|
-
export
|
|
18
|
+
export * from './radio';
|
|
19
|
+
export * from './checkbox';
|
|
20
|
+
export * from './upload';
|
|
21
|
+
export * from './color-picker';
|
|
22
|
+
export * from './button';
|
|
23
|
+
export declare type FormItemRendererSource<P extends string = string> = VkfInputSource<P> | VkfSwitchSource<P> | VkfSelectSource<P> | VkfDatePickerSource<P> | VkfInputNumberSource<P> | VkfRadioSource<P> | VkfCheckboxSource<P> | VkfUploadSource<P> | VkfColorPickerSource<P> | VkfButtonSource<P> | ComponentSource;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { VkfInputNumber } from '@vunk/form/components/input-number';
|
|
2
2
|
import type { Merge, VueComponentPropsType } from '@vunk/core';
|
|
3
|
+
import { BasicSource } from '@vunk/form/shared/types/basic-source';
|
|
3
4
|
export declare type VkfInputNumberProps<T = undefined> = Merge<VueComponentPropsType<typeof VkfInputNumber>, T>;
|
|
4
|
-
export
|
|
5
|
+
export interface VkfInputNumberSource<P extends string = string> extends VkfInputNumberProps, BasicSource {
|
|
5
6
|
prop: P;
|
|
6
7
|
templateType: 'VkfInputNumber';
|
|
7
|
-
}
|
|
8
|
+
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { VkfInput } from '@vunk/form/components/input';
|
|
2
2
|
import type { Merge, VueComponentPropsType } from '@vunk/core';
|
|
3
|
+
import { BasicSource } from '@vunk/form/shared/types/basic-source';
|
|
3
4
|
export declare type VkfInputProps<T = undefined> = Merge<VueComponentPropsType<typeof VkfInput>, T>;
|
|
4
|
-
export
|
|
5
|
+
export interface VkfInputSource<P extends string = string> extends VkfInputProps, BasicSource {
|
|
5
6
|
prop: P;
|
|
6
7
|
templateType: 'VkfInput';
|
|
7
|
-
}
|
|
8
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import VkfRadio from '@vunk/form/components/radio';
|
|
2
|
+
import { VueComponentPropsType } from '@vunk/core';
|
|
3
|
+
import { BasicSource } from '@vunk/form/shared/types/basic-source';
|
|
4
|
+
export interface VkfRadioSource<P extends string = string> extends VueComponentPropsType<typeof VkfRadio>, BasicSource {
|
|
5
|
+
prop: P;
|
|
6
|
+
templateType: 'VkfRadio';
|
|
7
|
+
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { VkfSelect } from '@vunk/form/components/select';
|
|
2
2
|
import type { Merge, VueComponentPropsType } from '@vunk/core';
|
|
3
|
+
import { BasicSource } from '@vunk/form/shared/types/basic-source';
|
|
3
4
|
export declare type VkfSelectProps<T = undefined> = Merge<VueComponentPropsType<typeof VkfSelect>, T>;
|
|
4
|
-
export
|
|
5
|
+
export interface VkfSelectSource<P extends string = string> extends VkfSelectProps, BasicSource {
|
|
5
6
|
prop: P;
|
|
6
7
|
templateType: 'VkfSelect';
|
|
7
|
-
}
|
|
8
|
+
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { VkfSwitch } from '@vunk/form/components/switch';
|
|
2
2
|
import type { Merge, VueComponentPropsType } from '@vunk/core';
|
|
3
|
+
import { BasicSource } from '@vunk/form/shared/types/basic-source';
|
|
3
4
|
export declare type VkfSwitchProps<T = undefined> = Merge<VueComponentPropsType<typeof VkfSwitch>, T>;
|
|
4
|
-
export
|
|
5
|
+
export interface VkfSwitchSource<P extends string = string> extends VkfSwitchProps, BasicSource {
|
|
5
6
|
prop: P;
|
|
6
7
|
templateType: 'VkfSwitch';
|
|
7
|
-
}
|
|
8
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { VkfUpload } from '@vunk/form/components/upload';
|
|
2
|
+
import { VueComponentPropsType } from '@vunk/core';
|
|
3
|
+
import { BasicSource } from '@vunk/form/shared/types/basic-source';
|
|
4
|
+
export interface VkfUploadSource<P extends string = string> extends VueComponentPropsType<typeof VkfUpload>, BasicSource {
|
|
5
|
+
prop: P;
|
|
6
|
+
templateType: 'VkfUpload';
|
|
7
|
+
}
|