@vunk/form 2.16.11 → 2.17.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/components/templates-default/index.cjs +10 -0
- package/components/templates-default/index.mjs +10 -0
- package/components/templates-default/src/index.vue.d.ts +11 -0
- package/components/templates-default/src/types.d.ts +3 -1
- package/components/time-picker/index.cjs +114 -0
- package/components/time-picker/index.d.ts +5 -0
- package/components/time-picker/index.mjs +107 -0
- package/components/time-picker/src/ctx.d.ts +364 -0
- package/components/time-picker/src/index.vue.d.ts +1670 -0
- package/components/time-picker/src/types.d.ts +19 -0
- package/index.d.ts +1 -0
- package/index.esm.js +1 -0
- package/package.json +6 -1
- package/shared/const/index.d.ts +1 -1
- package/shared/element-plus/ctx.d.ts +9 -0
- package/shared/element-plus/index.cjs +17 -0
- package/shared/element-plus/index.mjs +14 -1
- package/shared/element-plus/instances.d.ts +260 -0
|
@@ -9,6 +9,7 @@ var input = require('@vunk/form/components/input');
|
|
|
9
9
|
var _switch = require('@vunk/form/components/switch');
|
|
10
10
|
var select = require('@vunk/form/components/select');
|
|
11
11
|
var datePicker = require('@vunk/form/components/date-picker');
|
|
12
|
+
var timePicker = require('@vunk/form/components/time-picker');
|
|
12
13
|
var utilsObject = require('@vunk/core/shared/utils-object');
|
|
13
14
|
var inputNumber = require('@vunk/form/components/input-number');
|
|
14
15
|
var radio = require('@vunk/form/components/radio');
|
|
@@ -45,6 +46,7 @@ var _sfc_main = vue.defineComponent({
|
|
|
45
46
|
VkfSwitch: _switch.VkfSwitch,
|
|
46
47
|
VkfSelect: select.VkfSelect,
|
|
47
48
|
VkfDatePicker: datePicker.VkfDatePicker,
|
|
49
|
+
VkfTimePicker: timePicker.VkfTimePicker,
|
|
48
50
|
VkfInputNumber: inputNumber.VkfInputNumber,
|
|
49
51
|
VkfRadio: radio.VkfRadio,
|
|
50
52
|
VkfCheckbox: checkbox.VkfCheckbox,
|
|
@@ -76,6 +78,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
76
78
|
const _component_VkfSwitch = vue.resolveComponent("VkfSwitch");
|
|
77
79
|
const _component_VkfSelect = vue.resolveComponent("VkfSelect");
|
|
78
80
|
const _component_VkfDatePicker = vue.resolveComponent("VkfDatePicker");
|
|
81
|
+
const _component_VkfTimePicker = vue.resolveComponent("VkfTimePicker");
|
|
79
82
|
const _component_VkfInputNumber = vue.resolveComponent("VkfInputNumber");
|
|
80
83
|
const _component_VkfCascader = vue.resolveComponent("VkfCascader");
|
|
81
84
|
const _component_VkfSlider = vue.resolveComponent("VkfSlider");
|
|
@@ -161,6 +164,13 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
161
164
|
_: 1
|
|
162
165
|
/* STABLE */
|
|
163
166
|
}),
|
|
167
|
+
vue.createVNode(_component_VkfFormItemRendererTemplate, { type: "VkfTimePicker" }, {
|
|
168
|
+
default: vue.withCtx(({ props, value, input }) => [
|
|
169
|
+
vue.createVNode(_component_VkfTimePicker, vue.mergeProps({ "model-value": value }, props, { "onUpdate:modelValue": input }), null, 16, ["model-value", "onUpdate:modelValue"])
|
|
170
|
+
]),
|
|
171
|
+
_: 1
|
|
172
|
+
/* STABLE */
|
|
173
|
+
}),
|
|
164
174
|
vue.createVNode(_component_VkfFormItemRendererTemplate, { type: "VkfInputNumber" }, {
|
|
165
175
|
default: vue.withCtx(({ props, value, input }) => [
|
|
166
176
|
vue.createVNode(_component_VkfInputNumber, vue.mergeProps({ "model-value": value }, props, { "onUpdate:modelValue": input }), null, 16, ["model-value", "onUpdate:modelValue"])
|
|
@@ -5,6 +5,7 @@ import { VkfInput } from '@vunk/form/components/input';
|
|
|
5
5
|
import { VkfSwitch } from '@vunk/form/components/switch';
|
|
6
6
|
import { VkfSelect } from '@vunk/form/components/select';
|
|
7
7
|
import { VkfDatePicker } from '@vunk/form/components/date-picker';
|
|
8
|
+
import { VkfTimePicker } from '@vunk/form/components/time-picker';
|
|
8
9
|
import { pickObject } from '@vunk/core/shared/utils-object';
|
|
9
10
|
import { VkfInputNumber } from '@vunk/form/components/input-number';
|
|
10
11
|
import { VkfRadio } from '@vunk/form/components/radio';
|
|
@@ -41,6 +42,7 @@ var _sfc_main = defineComponent({
|
|
|
41
42
|
VkfSwitch,
|
|
42
43
|
VkfSelect,
|
|
43
44
|
VkfDatePicker,
|
|
45
|
+
VkfTimePicker,
|
|
44
46
|
VkfInputNumber,
|
|
45
47
|
VkfRadio,
|
|
46
48
|
VkfCheckbox,
|
|
@@ -72,6 +74,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
72
74
|
const _component_VkfSwitch = resolveComponent("VkfSwitch");
|
|
73
75
|
const _component_VkfSelect = resolveComponent("VkfSelect");
|
|
74
76
|
const _component_VkfDatePicker = resolveComponent("VkfDatePicker");
|
|
77
|
+
const _component_VkfTimePicker = resolveComponent("VkfTimePicker");
|
|
75
78
|
const _component_VkfInputNumber = resolveComponent("VkfInputNumber");
|
|
76
79
|
const _component_VkfCascader = resolveComponent("VkfCascader");
|
|
77
80
|
const _component_VkfSlider = resolveComponent("VkfSlider");
|
|
@@ -157,6 +160,13 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
157
160
|
_: 1
|
|
158
161
|
/* STABLE */
|
|
159
162
|
}),
|
|
163
|
+
createVNode(_component_VkfFormItemRendererTemplate, { type: "VkfTimePicker" }, {
|
|
164
|
+
default: withCtx(({ props, value, input }) => [
|
|
165
|
+
createVNode(_component_VkfTimePicker, mergeProps({ "model-value": value }, props, { "onUpdate:modelValue": input }), null, 16, ["model-value", "onUpdate:modelValue"])
|
|
166
|
+
]),
|
|
167
|
+
_: 1
|
|
168
|
+
/* STABLE */
|
|
169
|
+
}),
|
|
160
170
|
createVNode(_component_VkfFormItemRendererTemplate, { type: "VkfInputNumber" }, {
|
|
161
171
|
default: withCtx(({ props, value, input }) => [
|
|
162
172
|
createVNode(_component_VkfInputNumber, mergeProps({ "model-value": value }, props, { "onUpdate:modelValue": input }), null, 16, ["model-value", "onUpdate:modelValue"])
|
|
@@ -93,6 +93,17 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
93
93
|
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
|
|
94
94
|
install(app: import("vue").App): void;
|
|
95
95
|
};
|
|
96
|
+
VkfTimePicker: {
|
|
97
|
+
new (...args: any[]): any;
|
|
98
|
+
__isFragment?: never;
|
|
99
|
+
__isTeleport?: never;
|
|
100
|
+
__isSuspense?: never;
|
|
101
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<Record<string | symbol, any>>>, Record<string | symbol, any>, any, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
102
|
+
[x: string]: any;
|
|
103
|
+
[x: symbol]: any;
|
|
104
|
+
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
|
|
105
|
+
install(app: import("vue").App): void;
|
|
106
|
+
};
|
|
96
107
|
VkfInputNumber: {
|
|
97
108
|
new (...args: any[]): any;
|
|
98
109
|
__isFragment?: never;
|
|
@@ -2,6 +2,7 @@ import { BasicSource } from '@vunk/form/shared';
|
|
|
2
2
|
import { __VkfButton } from '@vunk/form/components/button';
|
|
3
3
|
import { __VkfInput } from '@vunk/form/components/input';
|
|
4
4
|
import { __VkfDatePicker } from '@vunk/form/components/date-picker';
|
|
5
|
+
import { __VkfTimePicker } from '@vunk/form/components/time-picker';
|
|
5
6
|
import { __VkfSelect } from '@vunk/form/components/select';
|
|
6
7
|
import { __VkfSwitch } from '@vunk/form/components/switch';
|
|
7
8
|
import { __VkfInputNumber } from '@vunk/form/components/input-number';
|
|
@@ -17,6 +18,7 @@ import { IntoUndefined, Func } from '@vunk/core';
|
|
|
17
18
|
export type VkfButtonSource<P = string> = __VkfButton.Source<P>;
|
|
18
19
|
export type VkfInputSource<P = string> = __VkfInput.Source<P>;
|
|
19
20
|
export type VkfDatePickerSource<P = string> = __VkfDatePicker.Source<P>;
|
|
21
|
+
export type VkfTimePickerSource<P = string> = __VkfTimePicker.Source<P>;
|
|
20
22
|
export type VkfSelectSource<P = string> = __VkfSelect.Source<P>;
|
|
21
23
|
export type VkfSwitchSource<P = string> = __VkfSwitch.Source<P>;
|
|
22
24
|
export type VkfInputNumberSource<P = string> = __VkfInputNumber.Source<P>;
|
|
@@ -32,7 +34,7 @@ export interface ComponentSource extends BasicSource {
|
|
|
32
34
|
templateType: 'Component';
|
|
33
35
|
is: any;
|
|
34
36
|
}
|
|
35
|
-
export type CoreSource<P = string> = VkfInputSource<P> | VkfSwitchSource<P> | VkfSelectSource<P> | VkfDatePickerSource<P> | VkfInputNumberSource<P> | VkfRadioSource<P> | VkfCheckboxSource<P> | VkfUploadSource<P> | VkfColorPickerSource<P> | VkfButtonSource<P> | VkfCascaderSource<P> | VkfInputLinkSource<P> | VkfSliderSource<P> | VkfInputTagSource<P>;
|
|
37
|
+
export type CoreSource<P = string> = VkfInputSource<P> | VkfSwitchSource<P> | VkfSelectSource<P> | VkfDatePickerSource<P> | VkfTimePickerSource<P> | VkfInputNumberSource<P> | VkfRadioSource<P> | VkfCheckboxSource<P> | VkfUploadSource<P> | VkfColorPickerSource<P> | VkfButtonSource<P> | VkfCascaderSource<P> | VkfInputLinkSource<P> | VkfSliderSource<P> | VkfInputTagSource<P>;
|
|
36
38
|
export type Source<P = string> = CoreSource<P> | ComponentSource;
|
|
37
39
|
/**
|
|
38
40
|
* @example
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var formItem = require('@vunk/form/components/form-item');
|
|
6
|
+
var elementPlus = require('@vunk/form/shared/element-plus');
|
|
7
|
+
var utilsVue = require('@vunk/core/shared/utils-vue');
|
|
8
|
+
var vue = require('vue');
|
|
9
|
+
var elementPlus$1 = require('element-plus');
|
|
10
|
+
var composables = require('@vunk/form/composables');
|
|
11
|
+
var _pluginVue_exportHelper = require('../_plugin-vue_export-helper.cjs');
|
|
12
|
+
|
|
13
|
+
const props = {
|
|
14
|
+
...elementPlus.timePickerProps,
|
|
15
|
+
...formItem._VkfFormItemCtx.props,
|
|
16
|
+
timePickerSlots: {
|
|
17
|
+
type: Object,
|
|
18
|
+
default: void 0
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
const createBindProps = utilsVue.bindPropsFactory(props);
|
|
22
|
+
const emits = {
|
|
23
|
+
...elementPlus.timePickerEmits
|
|
24
|
+
};
|
|
25
|
+
const createOnEmits = utilsVue.onEmitsFactory(emits);
|
|
26
|
+
|
|
27
|
+
var ctx = /*#__PURE__*/Object.freeze({
|
|
28
|
+
__proto__: null,
|
|
29
|
+
createBindProps: createBindProps,
|
|
30
|
+
createOnEmits: createOnEmits,
|
|
31
|
+
emits: emits,
|
|
32
|
+
props: props
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
var _sfc_main = vue.defineComponent({
|
|
36
|
+
name: "VkfTimePicker",
|
|
37
|
+
components: {
|
|
38
|
+
VkfFormItem: formItem.VkfFormItem,
|
|
39
|
+
ElTimePicker: elementPlus$1.ElTimePicker
|
|
40
|
+
},
|
|
41
|
+
props,
|
|
42
|
+
emits,
|
|
43
|
+
setup(props2, { emit }) {
|
|
44
|
+
const formItemBindProps = formItem._VkfFormItemCtx.createBindProps(props2);
|
|
45
|
+
const timePickerBindProps = elementPlus.createTimePickerBindProps(props2, [
|
|
46
|
+
"readonly"
|
|
47
|
+
]);
|
|
48
|
+
const timePickerOnEmits = elementPlus.createTimePickerOnEmits(emit);
|
|
49
|
+
const readonly = composables.useComputedReadonly(props2);
|
|
50
|
+
return {
|
|
51
|
+
formItemBindProps,
|
|
52
|
+
timePickerBindProps,
|
|
53
|
+
timePickerOnEmits,
|
|
54
|
+
readonly
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
60
|
+
const _component_ElTimePicker = vue.resolveComponent("ElTimePicker");
|
|
61
|
+
const _component_VkfFormItem = vue.resolveComponent("VkfFormItem");
|
|
62
|
+
return vue.openBlock(), vue.createBlock(
|
|
63
|
+
_component_VkfFormItem,
|
|
64
|
+
vue.normalizeProps(vue.guardReactiveProps(_ctx.formItemBindProps)),
|
|
65
|
+
{
|
|
66
|
+
default: vue.withCtx(() => [
|
|
67
|
+
vue.createVNode(_component_ElTimePicker, vue.mergeProps(_ctx.timePickerBindProps, { readonly: _ctx.readonly }, vue.toHandlers(_ctx.timePickerOnEmits)), vue.createSlots({
|
|
68
|
+
_: 2
|
|
69
|
+
/* DYNAMIC */
|
|
70
|
+
}, [
|
|
71
|
+
vue.renderList(_ctx.timePickerSlots, (item, key) => {
|
|
72
|
+
return {
|
|
73
|
+
name: key,
|
|
74
|
+
fn: vue.withCtx((e) => [
|
|
75
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(item?.(e))))
|
|
76
|
+
])
|
|
77
|
+
};
|
|
78
|
+
})
|
|
79
|
+
]), 1040, ["readonly"])
|
|
80
|
+
]),
|
|
81
|
+
_: 1
|
|
82
|
+
/* STABLE */
|
|
83
|
+
},
|
|
84
|
+
16
|
|
85
|
+
/* FULL_PROPS */
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
var VkfTimePicker = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/time-picker/src/index.vue"]]);
|
|
89
|
+
|
|
90
|
+
const timePickerEmits = {
|
|
91
|
+
"update:modelValue": null,
|
|
92
|
+
"change": null,
|
|
93
|
+
"focus": null,
|
|
94
|
+
"blur": null,
|
|
95
|
+
"visible-change": null,
|
|
96
|
+
"keydown": null
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
var types = /*#__PURE__*/Object.freeze({
|
|
100
|
+
__proto__: null,
|
|
101
|
+
timePickerEmits: timePickerEmits
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
VkfTimePicker.install = (app) => {
|
|
105
|
+
app.component(
|
|
106
|
+
VkfTimePicker.name || "VkfTimePicker",
|
|
107
|
+
VkfTimePicker
|
|
108
|
+
);
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
exports.VkfTimePicker = VkfTimePicker;
|
|
112
|
+
exports._VkfTimePickerCtx = ctx;
|
|
113
|
+
exports.__VkfTimePicker = types;
|
|
114
|
+
exports.default = VkfTimePicker;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { _VkfFormItemCtx, VkfFormItem } from '@vunk/form/components/form-item';
|
|
2
|
+
import { timePickerProps, timePickerEmits as timePickerEmits$1, createTimePickerBindProps, createTimePickerOnEmits } from '@vunk/form/shared/element-plus';
|
|
3
|
+
import { bindPropsFactory, onEmitsFactory } from '@vunk/core/shared/utils-vue';
|
|
4
|
+
import { defineComponent, resolveComponent, openBlock, createBlock, normalizeProps, guardReactiveProps, withCtx, createVNode, mergeProps, toHandlers, createSlots, renderList, resolveDynamicComponent } from 'vue';
|
|
5
|
+
import { ElTimePicker } from 'element-plus';
|
|
6
|
+
import { useComputedReadonly } from '@vunk/form/composables';
|
|
7
|
+
import { _ as _export_sfc } from '../_plugin-vue_export-helper.mjs';
|
|
8
|
+
|
|
9
|
+
const props = {
|
|
10
|
+
...timePickerProps,
|
|
11
|
+
..._VkfFormItemCtx.props,
|
|
12
|
+
timePickerSlots: {
|
|
13
|
+
type: Object,
|
|
14
|
+
default: void 0
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
const createBindProps = bindPropsFactory(props);
|
|
18
|
+
const emits = {
|
|
19
|
+
...timePickerEmits$1
|
|
20
|
+
};
|
|
21
|
+
const createOnEmits = onEmitsFactory(emits);
|
|
22
|
+
|
|
23
|
+
var ctx = /*#__PURE__*/Object.freeze({
|
|
24
|
+
__proto__: null,
|
|
25
|
+
createBindProps: createBindProps,
|
|
26
|
+
createOnEmits: createOnEmits,
|
|
27
|
+
emits: emits,
|
|
28
|
+
props: props
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
var _sfc_main = defineComponent({
|
|
32
|
+
name: "VkfTimePicker",
|
|
33
|
+
components: {
|
|
34
|
+
VkfFormItem,
|
|
35
|
+
ElTimePicker
|
|
36
|
+
},
|
|
37
|
+
props,
|
|
38
|
+
emits,
|
|
39
|
+
setup(props2, { emit }) {
|
|
40
|
+
const formItemBindProps = _VkfFormItemCtx.createBindProps(props2);
|
|
41
|
+
const timePickerBindProps = createTimePickerBindProps(props2, [
|
|
42
|
+
"readonly"
|
|
43
|
+
]);
|
|
44
|
+
const timePickerOnEmits = createTimePickerOnEmits(emit);
|
|
45
|
+
const readonly = useComputedReadonly(props2);
|
|
46
|
+
return {
|
|
47
|
+
formItemBindProps,
|
|
48
|
+
timePickerBindProps,
|
|
49
|
+
timePickerOnEmits,
|
|
50
|
+
readonly
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
56
|
+
const _component_ElTimePicker = resolveComponent("ElTimePicker");
|
|
57
|
+
const _component_VkfFormItem = resolveComponent("VkfFormItem");
|
|
58
|
+
return openBlock(), createBlock(
|
|
59
|
+
_component_VkfFormItem,
|
|
60
|
+
normalizeProps(guardReactiveProps(_ctx.formItemBindProps)),
|
|
61
|
+
{
|
|
62
|
+
default: withCtx(() => [
|
|
63
|
+
createVNode(_component_ElTimePicker, mergeProps(_ctx.timePickerBindProps, { readonly: _ctx.readonly }, toHandlers(_ctx.timePickerOnEmits)), createSlots({
|
|
64
|
+
_: 2
|
|
65
|
+
/* DYNAMIC */
|
|
66
|
+
}, [
|
|
67
|
+
renderList(_ctx.timePickerSlots, (item, key) => {
|
|
68
|
+
return {
|
|
69
|
+
name: key,
|
|
70
|
+
fn: withCtx((e) => [
|
|
71
|
+
(openBlock(), createBlock(resolveDynamicComponent(item?.(e))))
|
|
72
|
+
])
|
|
73
|
+
};
|
|
74
|
+
})
|
|
75
|
+
]), 1040, ["readonly"])
|
|
76
|
+
]),
|
|
77
|
+
_: 1
|
|
78
|
+
/* STABLE */
|
|
79
|
+
},
|
|
80
|
+
16
|
|
81
|
+
/* FULL_PROPS */
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
var VkfTimePicker = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/time-picker/src/index.vue"]]);
|
|
85
|
+
|
|
86
|
+
const timePickerEmits = {
|
|
87
|
+
"update:modelValue": null,
|
|
88
|
+
"change": null,
|
|
89
|
+
"focus": null,
|
|
90
|
+
"blur": null,
|
|
91
|
+
"visible-change": null,
|
|
92
|
+
"keydown": null
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
var types = /*#__PURE__*/Object.freeze({
|
|
96
|
+
__proto__: null,
|
|
97
|
+
timePickerEmits: timePickerEmits
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
VkfTimePicker.install = (app) => {
|
|
101
|
+
app.component(
|
|
102
|
+
VkfTimePicker.name || "VkfTimePicker",
|
|
103
|
+
VkfTimePicker
|
|
104
|
+
);
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
export { VkfTimePicker, ctx as _VkfTimePickerCtx, types as __VkfTimePicker, VkfTimePicker as default };
|