@vunk/form 0.0.0-alpha.3 → 0.0.0-alpha.7

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.
Files changed (46) hide show
  1. package/components/date-picker/index.d.ts +4 -0
  2. package/components/date-picker/index.js +81 -0
  3. package/components/date-picker/src/ctx.d.ts +163 -0
  4. package/components/date-picker/src/index.vue.d.ts +407 -0
  5. package/components/date-picker/src/types.d.ts +14 -0
  6. package/components/form/index.js +16 -1
  7. package/components/ground/index.css +6 -3
  8. package/components/ground/index.js +50 -22
  9. package/components/ground/src/ground-main/src/index.vue.d.ts +5 -1
  10. package/components/ground/src/ground-widget/src/form-item-widget/src/index.vue.d.ts +594 -0
  11. package/components/ground/src/index.vue.d.ts +30 -5
  12. package/components/select/index.js +20 -6
  13. package/components/select/src/ctx.d.ts +5 -0
  14. package/components/select/src/index.vue.d.ts +9 -0
  15. package/components/select/src/types.d.ts +5 -3
  16. package/full-entry/main.d.ts +1 -1
  17. package/index.css +6 -3
  18. package/index.d.ts +11 -9
  19. package/index.esm.js +1 -1
  20. package/package.json +1 -1
  21. package/shared/element-plus/ctx/index.d.ts +2 -0
  22. package/shared/element-plus/ctx/index.js +22 -2
  23. package/shared/element-plus/instances/date-picker.d.ts +126 -0
  24. package/shared/element-plus/instances/date-picker.js +21 -0
  25. package/shared/types/form-item/date-picker.d.ts +8 -0
  26. package/shared/types/form-item/date-picker.js +1 -0
  27. package/shared/types/form-item/index.d.ts +1 -0
  28. package/shared/types/index.d.ts +2 -2
  29. package/shared/types/shared/index.d.ts +4 -0
  30. package/types/components/date-picker/index.d.ts +4 -0
  31. package/types/components/date-picker/src/ctx.d.ts +163 -0
  32. package/types/components/date-picker/src/index.vue.d.ts +407 -0
  33. package/types/components/date-picker/src/types.d.ts +14 -0
  34. package/types/components/ground/src/ground-main/src/index.vue.d.ts +5 -1
  35. package/types/components/ground/src/ground-widget/src/form-item-widget/src/index.vue.d.ts +594 -0
  36. package/types/components/ground/src/index.vue.d.ts +30 -5
  37. package/types/components/select/src/ctx.d.ts +5 -0
  38. package/types/components/select/src/index.vue.d.ts +9 -0
  39. package/types/components/select/src/types.d.ts +5 -3
  40. package/types/full-entry/main.d.ts +1 -1
  41. package/types/shared/element-plus/ctx/index.d.ts +2 -0
  42. package/types/shared/element-plus/instances/date-picker.d.ts +126 -0
  43. package/types/shared/types/form-item/date-picker.d.ts +8 -0
  44. package/types/shared/types/form-item/index.d.ts +1 -0
  45. package/types/shared/types/index.d.ts +2 -2
  46. package/types/shared/types/shared/index.d.ts +4 -0
@@ -1,4 +1,4 @@
1
- import { PropType, Ref } from 'vue';
1
+ import { PropType } from 'vue';
2
2
  import { SetDataEvent } from '@vunk/form/shared/types';
3
3
  import { FormItemRendererSource } from '@vunk/form/shared/types';
4
4
  import { VkfInputSource } from '@vunk/form/shared/types/form-item';
@@ -7,10 +7,17 @@ declare const _default: import("vue").DefineComponent<{
7
7
  type: PropType<any[]>;
8
8
  default: undefined;
9
9
  };
10
+ source: {
11
+ type: PropType<any[]>;
12
+ default: () => never[];
13
+ };
14
+ data: {
15
+ type: PropType<Record<string, any>>;
16
+ default: () => {};
17
+ };
10
18
  }, {
11
- propToFormItem: import("vue").ComputedRef<Record<string, FormItemRendererSource<string>>>;
12
- formItems: Ref<FormItemRendererSource<string>[]>;
13
- editProp: Ref<string>;
19
+ propToFormItem: import("vue").ComputedRef<any>;
20
+ editProp: import("vue").Ref<string>;
14
21
  setData: (obj: any, e: {
15
22
  k: any;
16
23
  v: any;
@@ -21,19 +28,37 @@ declare const _default: import("vue").DefineComponent<{
21
28
  n?: number | undefined;
22
29
  }) => void;
23
30
  setFormItem: (props: FormItemRendererSource, e: SetDataEvent<keyof VkfInputSource>) => void;
24
- configPropDisabled: Ref<boolean>;
31
+ configPropDisabled: import("vue").Ref<boolean>;
25
32
  formItemClip: import("@vueuse/core").ClipboardReturn<true>;
26
33
  inputJson: () => void;
27
34
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
35
+ 'update:source': null;
36
+ 'setData:source': (e: SetDataEvent) => SetDataEvent<any>;
37
+ 'unsetData:source': null;
38
+ setData: (e: SetDataEvent) => SetDataEvent<any>;
28
39
  'update:componentLibCollapseExpanded': null;
29
40
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
30
41
  componentLibCollapseExpanded: {
31
42
  type: PropType<any[]>;
32
43
  default: undefined;
33
44
  };
45
+ source: {
46
+ type: PropType<any[]>;
47
+ default: () => never[];
48
+ };
49
+ data: {
50
+ type: PropType<Record<string, any>>;
51
+ default: () => {};
52
+ };
34
53
  }>> & {
54
+ onSetData?: ((e: SetDataEvent<any>) => any) | undefined;
55
+ "onSetData:source"?: ((e: SetDataEvent<any>) => any) | undefined;
35
56
  "onUpdate:componentLibCollapseExpanded"?: ((...args: any[]) => any) | undefined;
57
+ "onUpdate:source"?: ((...args: any[]) => any) | undefined;
58
+ "onUnsetData:source"?: ((...args: any[]) => any) | undefined;
36
59
  }, {
60
+ data: Record<string, any>;
61
+ source: any[];
37
62
  componentLibCollapseExpanded: any[];
38
63
  }>;
39
64
  export default _default;
@@ -1,6 +1,6 @@
1
1
  import { _VkfFormItemCtx, VkfFormItem } from '@vunk/form/components/form-item';
2
2
  import { selectProps, selectEmits } from '@vunk/form/shared/element-plus/instances/select';
3
- import { defineComponent, resolveComponent, openBlock, createBlock, normalizeProps, guardReactiveProps, withCtx, createVNode, mergeProps, toHandlers, createElementBlock, Fragment, renderList } from 'vue';
3
+ import { defineComponent, resolveComponent, openBlock, createBlock, normalizeProps, guardReactiveProps, withCtx, createVNode, mergeProps, toHandlers, createSlots, createElementBlock, Fragment, renderList, renderSlot, resolveDynamicComponent } from 'vue';
4
4
  import { createSelectBindProps, createSelectOnEmits } from '@vunk/form/shared/element-plus/ctx';
5
5
  import { ElSelect, ElOption } from 'element-plus';
6
6
  import { isPlainObject } from 'vunk/shared/utils-object';
@@ -11,6 +11,10 @@ const props = {
11
11
  options: {
12
12
  type: Array,
13
13
  default: () => []
14
+ },
15
+ selectSlots: {
16
+ type: Object,
17
+ default: void 0
14
18
  }
15
19
  };
16
20
  const emits = {
@@ -46,18 +50,28 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
46
50
  const _component_VkfFormItem = resolveComponent("VkfFormItem");
47
51
  return openBlock(), createBlock(_component_VkfFormItem, normalizeProps(guardReactiveProps(_ctx.formItemBindProps)), {
48
52
  default: withCtx(() => [
49
- createVNode(_component_ElSelect, mergeProps(_ctx.selectBindProps, toHandlers(_ctx.selectOnEmits)), {
53
+ createVNode(_component_ElSelect, mergeProps(_ctx.selectBindProps, toHandlers(_ctx.selectOnEmits)), createSlots({
50
54
  default: withCtx(() => [
51
55
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (item) => {
52
56
  return openBlock(), createBlock(_component_ElOption, mergeProps({
53
57
  key: _ctx.getKey(item)
54
58
  }, item), null, 16);
55
- }), 128))
59
+ }), 128)),
60
+ renderSlot(_ctx.$slots, "default")
56
61
  ]),
57
- _: 1
58
- }, 16)
62
+ _: 2
63
+ }, [
64
+ renderList(_ctx.selectSlots, (item, key) => {
65
+ return {
66
+ name: key,
67
+ fn: withCtx((e) => [
68
+ (openBlock(), createBlock(resolveDynamicComponent(item?.(e))))
69
+ ])
70
+ };
71
+ })
72
+ ]), 1040)
59
73
  ]),
60
- _: 1
74
+ _: 3
61
75
  }, 16);
62
76
  }
63
77
 
@@ -1,5 +1,6 @@
1
1
  import { VueComponentPropsType } from 'vunk/shared/types';
2
2
  import { PropType } from 'vue';
3
+ import { SelectSlots } from './types';
3
4
  export declare const props: {
4
5
  options: {
5
6
  type: PropType<VueComponentPropsType<import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
@@ -64,6 +65,10 @@ export declare const props: {
64
65
  }>>>[]>;
65
66
  default: () => never[];
66
67
  };
68
+ selectSlots: {
69
+ type: PropType<SelectSlots>;
70
+ default: undefined;
71
+ };
67
72
  name: StringConstructor;
68
73
  id: StringConstructor;
69
74
  modelValue: {
@@ -62,6 +62,10 @@ declare const _default: import("vue").DefineComponent<{
62
62
  }>>>[]>;
63
63
  default: () => never[];
64
64
  };
65
+ selectSlots: {
66
+ type: import("vue").PropType<import("./types").SelectSlots>;
67
+ default: undefined;
68
+ };
65
69
  name: StringConstructor;
66
70
  id: StringConstructor;
67
71
  modelValue: {
@@ -365,6 +369,10 @@ declare const _default: import("vue").DefineComponent<{
365
369
  }>>>[]>;
366
370
  default: () => never[];
367
371
  };
372
+ selectSlots: {
373
+ type: import("vue").PropType<import("./types").SelectSlots>;
374
+ default: undefined;
375
+ };
368
376
  name: StringConstructor;
369
377
  id: StringConstructor;
370
378
  modelValue: {
@@ -576,5 +584,6 @@ declare const _default: import("vue").DefineComponent<{
576
584
  disabled: boolean;
577
585
  created: boolean;
578
586
  }>>>[];
587
+ selectSlots: import("./types").SelectSlots;
579
588
  }>;
580
589
  export default _default;
@@ -1,3 +1,5 @@
1
- import { ReturnVoid } from 'vunk/shared/types';
2
- export declare type LoadEvent = {};
3
- export declare type OnLoad = (e: LoadEvent) => ReturnVoid;
1
+ import { Func } from '@vunk/form/shared/types';
2
+ export declare type SelectSlots = {
3
+ prefix?: Func;
4
+ empty?: Func;
5
+ };
@@ -1,5 +1,4 @@
1
1
  export * from '@vunk-form/components/input';
2
- export * from '@vunk-form/components/ground';
3
2
  export * from '@vunk-form/components/form-item-renderer';
4
3
  export * from '@vunk-form/components/form-item-renderer-template';
5
4
  export * from '@vunk-form/components/drag-wrapper';
@@ -15,3 +14,4 @@ export * from '@vunk-form/components/switch';
15
14
  export * from '@vunk-form/components/form-item';
16
15
  export * from '@vunk-form/components/select';
17
16
  export * from '@vunk-form/components/select-config';
17
+ export * from '@vunk-form/components/date-picker';
package/index.css CHANGED
@@ -21,15 +21,18 @@
21
21
  .vkf-ground-main-x {
22
22
  flex: 3;
23
23
  }
24
- .vkf-ground-main-x .vkf-ground-main-card{
24
+
25
+ .vkf-ground-main-x .vkf-ground-main-card {
25
26
  height: 100%;
26
27
  }
27
- .vkf-ground-main-card > .vk-card-title{
28
+
29
+ .vkf-ground-main-card>.vk-card-title {
28
30
  display: flex;
29
31
  justify-content: end;
30
32
  margin-bottom: var(--gap-xxs);
31
33
  }
32
- .vkf-ground-main-card > .vk-card-body{
34
+
35
+ .vkf-ground-main-card>.vk-card-body {
33
36
  height: 100%;
34
37
  border: 2px var(--el-border-color) dashed;
35
38
  overflow: auto;
package/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
2
  export * from '@vunk/form/components/input'
3
3
 
4
- export * from '@vunk/form/components/ground'
4
+ // export * from '@vunk/form/components/ground'
5
5
 
6
6
  export * from '@vunk/form/components/form-item-renderer'
7
7
 
@@ -24,11 +24,13 @@ export * from '@vunk/form/components/confirm-input'
24
24
  export * from '@vunk/form/components/form'
25
25
 
26
26
  export * from '@vunk/form/components/rules-config'
27
-
28
- export * from '@vunk/form/components/switch'
29
-
30
- export * from '@vunk/form/components/form-item'
31
-
32
- export * from '@vunk/form/components/select'
33
-
34
- export * from '@vunk/form/components/select-config'
27
+
28
+ export * from '@vunk/form/components/switch'
29
+
30
+ export * from '@vunk/form/components/form-item'
31
+
32
+ export * from '@vunk/form/components/select'
33
+
34
+ export * from '@vunk/form/components/select-config'
35
+
36
+ export * from '@vunk/form/components/date-picker'
package/index.esm.js CHANGED
@@ -1,5 +1,4 @@
1
1
  export * from '@vunk/form/components/input';
2
- export * from '@vunk/form/components/ground';
3
2
  export * from '@vunk/form/components/form-item-renderer';
4
3
  export * from '@vunk/form/components/form-item-renderer-template';
5
4
  export * from '@vunk/form/components/drag-wrapper';
@@ -15,3 +14,4 @@ export * from '@vunk/form/components/switch';
15
14
  export * from '@vunk/form/components/form-item';
16
15
  export * from '@vunk/form/components/select';
17
16
  export * from '@vunk/form/components/select-config';
17
+ export * from '@vunk/form/components/date-picker';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vunk/form",
3
- "version": "0.0.0-alpha.3",
3
+ "version": "0.0.0-alpha.7",
4
4
  "description": "",
5
5
  "module": "index.esm.js",
6
6
  "scripts": {
@@ -7,3 +7,5 @@ export declare const createSwitchBindProps: <T2 extends Record<string, any>, EX
7
7
  export declare const createSwitchOnEmits: <T2 extends (...args: any) => any, EX extends ("update:modelValue" | "input" | "change")[], K extends "update:modelValue" | "input" | "change">(emit: T2, excludes?: EX | undefined) => { [k in K]: T2; };
8
8
  export declare const createSelectBindProps: <T2 extends Record<string, any>, EX extends ("size" | "id" | "disabled" | "modelValue" | "autocomplete" | "placeholder" | "clearable" | "suffixIcon" | "name" | "loading" | "automaticDropdown" | "effect" | "filterable" | "allowCreate" | "popperClass" | "remote" | "loadingText" | "noMatchText" | "noDataText" | "remoteMethod" | "filterMethod" | "multiple" | "multipleLimit" | "defaultFirstOption" | "reserveKeyword" | "valueKey" | "collapseTags" | "collapseTagsTooltip" | "teleported" | "persistent" | "clearIcon" | "fitInputWidth" | "tagType")[] | undefined, K extends Extract<EX extends (infer V)[] ? Exclude<keyof T2, V> : keyof T2, "size" | "id" | "disabled" | "modelValue" | "autocomplete" | "placeholder" | "clearable" | "suffixIcon" | "name" | "loading" | "automaticDropdown" | "effect" | "filterable" | "allowCreate" | "popperClass" | "remote" | "loadingText" | "noMatchText" | "noDataText" | "remoteMethod" | "filterMethod" | "multiple" | "multipleLimit" | "defaultFirstOption" | "reserveKeyword" | "valueKey" | "collapseTags" | "collapseTagsTooltip" | "teleported" | "persistent" | "clearIcon" | "fitInputWidth" | "tagType">>(propsArg: T2, excludes?: EX | undefined) => import("vue").ComputedRef<{ [k in K]: T2[k]; }>;
9
9
  export declare const createSelectOnEmits: <T2 extends (...args: any) => any, EX extends ("update:modelValue" | "change" | "focus" | "blur" | "clear" | "remove-tag" | "visible-change")[], K extends "update:modelValue" | "change" | "focus" | "blur" | "clear" | "remove-tag" | "visible-change">(emit: T2, excludes?: EX | undefined) => { [k in K]: T2; };
10
+ export declare const createDatePickerBindProps: <T2 extends Record<string, any>, EX extends ("type" | "size" | "label" | "id" | "disabled" | "modelValue" | "placeholder" | "readonly" | "clearable" | "prefixIcon" | "tabindex" | "validateEvent" | "name" | "popperClass" | "clearIcon" | "format" | "valueFormat" | "editable" | "popperOptions" | "rangeSeparator" | "startPlaceholder" | "endPlaceholder" | "defaultValue" | "defaultTime" | "isRange" | "disabledHours" | "disabledMinutes" | "disabledSeconds" | "disabledDate" | "cellClassName" | "shortcuts" | "arrowControl" | "unlinkPanels")[] | undefined, K extends Extract<EX extends (infer V)[] ? Exclude<keyof T2, V> : keyof T2, "type" | "size" | "label" | "id" | "disabled" | "modelValue" | "placeholder" | "readonly" | "clearable" | "prefixIcon" | "tabindex" | "validateEvent" | "name" | "popperClass" | "clearIcon" | "format" | "valueFormat" | "editable" | "popperOptions" | "rangeSeparator" | "startPlaceholder" | "endPlaceholder" | "defaultValue" | "defaultTime" | "isRange" | "disabledHours" | "disabledMinutes" | "disabledSeconds" | "disabledDate" | "cellClassName" | "shortcuts" | "arrowControl" | "unlinkPanels">>(propsArg: T2, excludes?: EX | undefined) => import("vue").ComputedRef<{ [k in K]: T2[k]; }>;
11
+ export declare const createDatePickerOnEmits: <T2 extends (...args: any) => any, EX extends ("update:modelValue" | "change" | "focus" | "blur" | "keydown" | "visible-change" | "calendar-change" | "panel-change")[], K extends "update:modelValue" | "change" | "focus" | "blur" | "keydown" | "visible-change" | "calendar-change" | "panel-change">(emit: T2, excludes?: EX | undefined) => { [k in K]: T2; };
@@ -1,4 +1,4 @@
1
- import { useTooltipContentProps, tagProps, inputProps, inputEmits, formProps, formEmits, formItemProps, switchProps, switchEmits } from 'element-plus';
1
+ import { useTooltipContentProps, tagProps, timePickerDefaultProps, inputProps, inputEmits, formProps, formEmits, formItemProps, switchProps, switchEmits } from 'element-plus';
2
2
  import { bindPropsFactory, onEmitsFactory } from 'vunk/shared/utils-vue';
3
3
  import { defineComponent, openBlock, createElementBlock, createElementVNode } from 'vue';
4
4
 
@@ -1262,6 +1262,24 @@ const selectEmits = {
1262
1262
  "blur": null
1263
1263
  };
1264
1264
 
1265
+ const datePickerProps = {
1266
+ ...timePickerDefaultProps,
1267
+ type: {
1268
+ type: String,
1269
+ default: "date"
1270
+ }
1271
+ };
1272
+ const datePickerEmits = {
1273
+ "update:modelValue": null,
1274
+ "change": null,
1275
+ "focus": null,
1276
+ "blur": null,
1277
+ "calendar-change": null,
1278
+ "panel-change": null,
1279
+ "visible-change": null,
1280
+ "keydown": null
1281
+ };
1282
+
1265
1283
  const createInputBindProps = bindPropsFactory(inputProps);
1266
1284
  const createInputOnEmits = onEmitsFactory(inputEmits);
1267
1285
  const createFormBindProps = bindPropsFactory(formProps);
@@ -1271,5 +1289,7 @@ const createSwitchBindProps = bindPropsFactory(switchProps);
1271
1289
  const createSwitchOnEmits = onEmitsFactory(switchEmits);
1272
1290
  const createSelectBindProps = bindPropsFactory(selectProps);
1273
1291
  const createSelectOnEmits = onEmitsFactory(selectEmits);
1292
+ const createDatePickerBindProps = bindPropsFactory(datePickerProps);
1293
+ const createDatePickerOnEmits = onEmitsFactory(datePickerEmits);
1274
1294
 
1275
- export { createFormBindProps, createFormItemBindProps, createFormOnEmits, createInputBindProps, createInputOnEmits, createSelectBindProps, createSelectOnEmits, createSwitchBindProps, createSwitchOnEmits };
1295
+ export { createDatePickerBindProps, createDatePickerOnEmits, createFormBindProps, createFormItemBindProps, createFormOnEmits, createInputBindProps, createInputOnEmits, createSelectBindProps, createSelectOnEmits, createSwitchBindProps, createSwitchOnEmits };
@@ -0,0 +1,126 @@
1
+ import { PropType } from 'vue';
2
+ export declare const datePickerProps: {
3
+ type: {
4
+ type: PropType<"year" | "month" | "date" | "dates" | "week" | "datetime" | "datetimerange" | "daterange" | "monthrange">;
5
+ default: string;
6
+ };
7
+ id: {
8
+ type: (StringConstructor | ArrayConstructor)[];
9
+ };
10
+ name: {
11
+ type: (StringConstructor | ArrayConstructor)[];
12
+ default: string;
13
+ };
14
+ popperClass: {
15
+ type: StringConstructor;
16
+ default: string;
17
+ };
18
+ format: {
19
+ type: StringConstructor;
20
+ };
21
+ valueFormat: {
22
+ type: PropType<string>;
23
+ };
24
+ clearable: {
25
+ type: BooleanConstructor;
26
+ default: boolean;
27
+ };
28
+ clearIcon: {
29
+ type: PropType<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>;
30
+ default: import("vue").DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
31
+ };
32
+ editable: {
33
+ type: BooleanConstructor;
34
+ default: boolean;
35
+ };
36
+ prefixIcon: {
37
+ type: PropType<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>;
38
+ default: string;
39
+ };
40
+ size: {
41
+ type: PropType<"" | "default" | "small" | "large">;
42
+ validator: (val: string) => val is "" | "default" | "small" | "large";
43
+ };
44
+ readonly: {
45
+ type: BooleanConstructor;
46
+ default: boolean;
47
+ };
48
+ disabled: {
49
+ type: BooleanConstructor;
50
+ default: boolean;
51
+ };
52
+ placeholder: {
53
+ type: StringConstructor;
54
+ default: string;
55
+ };
56
+ popperOptions: {
57
+ type: PropType<Partial<import("element-plus").Options>>;
58
+ default: () => {};
59
+ };
60
+ modelValue: {
61
+ type: PropType<string | number | Date | (string | number | Date)[]>;
62
+ default: string;
63
+ };
64
+ rangeSeparator: {
65
+ type: StringConstructor;
66
+ default: string;
67
+ };
68
+ startPlaceholder: StringConstructor;
69
+ endPlaceholder: StringConstructor;
70
+ defaultValue: {
71
+ type: PropType<Date | Date[]>;
72
+ };
73
+ defaultTime: {
74
+ type: PropType<Date | Date[]>;
75
+ };
76
+ isRange: {
77
+ type: BooleanConstructor;
78
+ default: boolean;
79
+ };
80
+ disabledHours: {
81
+ type: FunctionConstructor;
82
+ };
83
+ disabledMinutes: {
84
+ type: FunctionConstructor;
85
+ };
86
+ disabledSeconds: {
87
+ type: FunctionConstructor;
88
+ };
89
+ disabledDate: {
90
+ type: FunctionConstructor;
91
+ };
92
+ cellClassName: {
93
+ type: FunctionConstructor;
94
+ };
95
+ shortcuts: {
96
+ type: ArrayConstructor;
97
+ default: () => never[];
98
+ };
99
+ arrowControl: {
100
+ type: BooleanConstructor;
101
+ default: boolean;
102
+ };
103
+ label: {
104
+ type: StringConstructor;
105
+ default: undefined;
106
+ };
107
+ tabindex: {
108
+ type: (StringConstructor | NumberConstructor)[];
109
+ default: number;
110
+ };
111
+ validateEvent: {
112
+ type: BooleanConstructor;
113
+ default: boolean;
114
+ };
115
+ unlinkPanels: BooleanConstructor;
116
+ };
117
+ export declare const datePickerEmits: {
118
+ 'update:modelValue': null;
119
+ change: null;
120
+ focus: null;
121
+ blur: null;
122
+ 'calendar-change': null;
123
+ 'panel-change': null;
124
+ 'visible-change': null;
125
+ keydown: null;
126
+ };
@@ -0,0 +1,21 @@
1
+ import { timePickerDefaultProps } from 'element-plus';
2
+
3
+ const datePickerProps = {
4
+ ...timePickerDefaultProps,
5
+ type: {
6
+ type: String,
7
+ default: "date"
8
+ }
9
+ };
10
+ const datePickerEmits = {
11
+ "update:modelValue": null,
12
+ "change": null,
13
+ "focus": null,
14
+ "blur": null,
15
+ "calendar-change": null,
16
+ "panel-change": null,
17
+ "visible-change": null,
18
+ "keydown": null
19
+ };
20
+
21
+ export { datePickerEmits, datePickerProps };
@@ -0,0 +1,8 @@
1
+ import { VkfDatePicker } from '@vunk/form/components/date-picker';
2
+ import { VueComponentPropsType } from 'vunk/shared/types';
3
+ import { Replace } from '../shared';
4
+ export declare type VkfDatePickerProps<T = undefined> = Replace<VueComponentPropsType<typeof VkfDatePicker>, T>;
5
+ export declare type VkfDatePickerSource<P = string> = VkfDatePickerProps<{
6
+ prop: P;
7
+ templateType: 'VkfDatePicker';
8
+ }>;
@@ -1,3 +1,4 @@
1
1
  export * from './input';
2
2
  export * from './switch';
3
3
  export * from './select';
4
+ export * from './date-picker';
@@ -1,3 +1,3 @@
1
- import { VkfInputSource, VkfSwitchSource, VkfSelectSource } from './form-item';
1
+ import { VkfInputSource, VkfSwitchSource, VkfSelectSource, VkfDatePickerSource } from './form-item';
2
2
  export * from './shared';
3
- export declare type FormItemRendererSource<P = string> = VkfInputSource<P> | VkfSwitchSource<P> | VkfSelectSource<P>;
3
+ export declare type FormItemRendererSource<P = string> = VkfInputSource<P> | VkfSwitchSource<P> | VkfSelectSource<P> | VkfDatePickerSource<P>;
@@ -5,3 +5,7 @@ export declare type SetDataEvent<K = any> = {
5
5
  v: any;
6
6
  insert?: boolean;
7
7
  };
8
+ export declare type UnsetDataEvent<K = any> = {
9
+ k: K;
10
+ n?: number;
11
+ };
@@ -0,0 +1,4 @@
1
+ import VkfDatePicker from './src/index.vue';
2
+ export * as __VkfDatePicker from './src/types';
3
+ export { VkfDatePicker, };
4
+ export default VkfDatePicker;