vft 0.0.392 → 0.0.394
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/es/components/autocomplete/autocomplete.vue.d.ts +3 -3
- package/es/components/autocomplete/index.d.ts +7 -7
- package/es/components/button/button.vue.d.ts +1 -1
- package/es/components/button/index.d.ts +12 -12
- package/es/components/button/use-button.d.ts +1 -1
- package/es/components/carousel/use-carousel.js +1 -1
- package/es/components/cascader/cascader.vue.d.ts +2 -2
- package/es/components/checkbox/index.d.ts +27 -27
- package/es/components/color-picker/index.d.ts +6 -6
- package/es/components/date-picker/date-picker-com/panel-date-pick.vue.d.ts +2 -2
- package/es/components/date-picker/date-picker-com/panel-date-range.vue.d.ts +2 -2
- package/es/components/date-picker/date-picker.d.ts +3 -3
- package/es/components/date-picker/date-picker.js +8 -8
- package/es/components/date-picker/index.d.ts +6 -6
- package/es/components/date-picker/panel-utils.d.ts +6 -6
- package/es/components/date-picker/props/date-picker.d.ts +1 -1
- package/es/components/date-picker/props/panel-date-pick.d.ts +1 -1
- package/es/components/date-picker/props/panel-date-range.d.ts +1 -1
- package/es/components/date-picker/props/shared.d.ts +1 -1
- package/es/components/dropdown/index.d.ts +9 -9
- package/es/components/form/index.d.ts +18 -18
- package/es/components/index.js +155 -163
- package/es/components/input/index.d.ts +5 -5
- package/es/components/input/input.vue.d.ts +2 -2
- package/es/components/input/input.vue2.js +4 -4
- package/es/components/input-number/index.d.ts +1 -1
- package/es/components/input-number/input-number.vue.d.ts +1 -1
- package/es/components/input-tag/composables/use-input-tag.js +1 -1
- package/es/components/input-tag/input-tag.vue.d.ts +4 -4
- package/es/components/radio/index.d.ts +18 -18
- package/es/components/search/index.d.ts +3 -3
- package/es/components/search/search.vue.d.ts +1 -1
- package/es/components/select/index.d.ts +2 -2
- package/es/components/select/select.vue.d.ts +2 -2
- package/es/components/slider/index.d.ts +1 -1
- package/es/components/slider/slider.vue.d.ts +1 -1
- package/es/components/super-form/component-map.d.ts +4 -45
- package/es/components/super-form/component-map.js +30 -60
- package/es/components/super-form/index.js +12 -20
- package/es/components/super-form/super-form-item.vue2.js +7 -6
- package/es/components/super-form/types.d.ts +3 -3
- package/es/components/super-form/types.js +5 -1
- package/es/components/super-form/use/helper.d.ts +3 -3
- package/es/components/super-form/use/helper.js +37 -32
- package/es/components/super-form/use/use-auto-focus.js +18 -14
- package/es/components/super-form/use/use-form-events.js +84 -81
- package/es/components/switch/index.d.ts +6 -6
- package/es/components/table/index.d.ts +9 -9
- package/es/components/table/table.vue2.js +22 -22
- package/es/components/tabs/index.d.ts +2 -2
- package/es/components/tabs/tabs.vue.d.ts +2 -2
- package/es/components/time-picker/common/picker.vue.d.ts +2 -2
- package/es/components/time-picker/time-picker.js +1 -1
- package/es/components/time-select/time-select.vue2.js +1 -1
- package/es/components/tree/tree-node.vue.d.ts +18 -18
- package/es/index.js +2 -1
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/es/utils/form-register.d.ts +43 -0
- package/es/utils/form-register.js +68 -0
- package/es/utils/index.d.ts +1 -0
- package/es/utils/index.js +80 -71
- package/es/utils/vue/vnode.js +1 -1
- package/lib/components/autocomplete/autocomplete.vue.d.ts +3 -3
- package/lib/components/autocomplete/index.d.ts +7 -7
- package/lib/components/button/button.vue.d.ts +1 -1
- package/lib/components/button/index.d.ts +12 -12
- package/lib/components/button/use-button.d.ts +1 -1
- package/lib/components/cascader/cascader.vue.d.ts +2 -2
- package/lib/components/checkbox/index.d.ts +27 -27
- package/lib/components/color-picker/index.d.ts +6 -6
- package/lib/components/date-picker/date-picker-com/panel-date-pick.vue.d.ts +2 -2
- package/lib/components/date-picker/date-picker-com/panel-date-range.vue.d.ts +2 -2
- package/lib/components/date-picker/date-picker.cjs +1 -1
- package/lib/components/date-picker/date-picker.d.ts +3 -3
- package/lib/components/date-picker/index.d.ts +6 -6
- package/lib/components/date-picker/panel-utils.d.ts +6 -6
- package/lib/components/date-picker/props/date-picker.d.ts +1 -1
- package/lib/components/date-picker/props/panel-date-pick.d.ts +1 -1
- package/lib/components/date-picker/props/panel-date-range.d.ts +1 -1
- package/lib/components/date-picker/props/shared.d.ts +1 -1
- package/lib/components/dropdown/index.d.ts +9 -9
- package/lib/components/form/index.d.ts +18 -18
- package/lib/components/index.cjs +1 -1
- package/lib/components/input/index.d.ts +5 -5
- package/lib/components/input/input.vue.d.ts +2 -2
- package/lib/components/input/input.vue2.cjs +1 -1
- package/lib/components/input-number/index.d.ts +1 -1
- package/lib/components/input-number/input-number.vue.d.ts +1 -1
- package/lib/components/input-tag/input-tag.vue.d.ts +4 -4
- package/lib/components/radio/index.d.ts +18 -18
- package/lib/components/search/index.d.ts +3 -3
- package/lib/components/search/search.vue.d.ts +1 -1
- package/lib/components/select/index.d.ts +2 -2
- package/lib/components/select/select.vue.d.ts +2 -2
- package/lib/components/slider/index.d.ts +1 -1
- package/lib/components/slider/slider.vue.d.ts +1 -1
- package/lib/components/super-form/component-map.cjs +1 -1
- package/lib/components/super-form/component-map.d.ts +4 -45
- package/lib/components/super-form/index.cjs +1 -1
- package/lib/components/super-form/super-form-item.vue2.cjs +1 -1
- package/lib/components/super-form/types.cjs +1 -1
- package/lib/components/super-form/types.d.ts +3 -3
- package/lib/components/super-form/use/helper.cjs +1 -1
- package/lib/components/super-form/use/helper.d.ts +3 -3
- package/lib/components/super-form/use/use-auto-focus.cjs +1 -1
- package/lib/components/super-form/use/use-form-events.cjs +1 -1
- package/lib/components/switch/index.d.ts +6 -6
- package/lib/components/table/index.d.ts +9 -9
- package/lib/components/table/table.vue2.cjs +1 -1
- package/lib/components/tabs/index.d.ts +2 -2
- package/lib/components/tabs/tabs.vue.d.ts +2 -2
- package/lib/components/time-picker/common/picker.vue.d.ts +2 -2
- package/lib/components/time-picker/time-picker.cjs +1 -1
- package/lib/components/time-select/time-select.vue2.cjs +1 -1
- package/lib/components/tree/tree-node.vue.d.ts +18 -18
- package/lib/index.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/lib/utils/form-register.cjs +1 -0
- package/lib/utils/form-register.d.ts +43 -0
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.d.ts +1 -0
- package/package.json +2 -2
- package/web-types.json +1 -1
|
@@ -89,7 +89,7 @@ export declare const VftTabs: import("vft/es/utils").SFCWithInstall<import("vue"
|
|
|
89
89
|
tabChange: (name: string | number) => void;
|
|
90
90
|
tabRemove: (name: string | number) => void;
|
|
91
91
|
tabAdd: () => void;
|
|
92
|
-
edit: (paneName: string | number | undefined, action: "
|
|
92
|
+
edit: (paneName: string | number | undefined, action: "add" | "remove") => void;
|
|
93
93
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
94
94
|
closable: {
|
|
95
95
|
type: import("vue").PropType<boolean>;
|
|
@@ -178,7 +178,7 @@ export declare const VftTabs: import("vft/es/utils").SFCWithInstall<import("vue"
|
|
|
178
178
|
isFocusInsidePane: () => boolean | undefined;
|
|
179
179
|
}, index: number, ev: Event) => any) | undefined;
|
|
180
180
|
onTabChange?: ((name: string | number) => any) | undefined;
|
|
181
|
-
onEdit?: ((paneName: string | number | undefined, action: "
|
|
181
|
+
onEdit?: ((paneName: string | number | undefined, action: "add" | "remove") => any) | undefined;
|
|
182
182
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>> & {
|
|
183
183
|
TabPane: {
|
|
184
184
|
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -70,7 +70,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
70
70
|
tabChange: (name: string | number) => void;
|
|
71
71
|
tabRemove: (name: string | number) => void;
|
|
72
72
|
tabAdd: () => void;
|
|
73
|
-
edit: (paneName: string | number | undefined, action: "
|
|
73
|
+
edit: (paneName: string | number | undefined, action: "add" | "remove") => void;
|
|
74
74
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<TabsProps>>> & Readonly<{
|
|
75
75
|
"onUpdate:modelValue"?: ((name: string | number) => any) | undefined;
|
|
76
76
|
onTabClick?: ((pane: {
|
|
@@ -110,7 +110,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
110
110
|
isFocusInsidePane: () => boolean | undefined;
|
|
111
111
|
}, index: number, ev: Event) => any) | undefined;
|
|
112
112
|
onTabChange?: ((name: string | number) => any) | undefined;
|
|
113
|
-
onEdit?: ((paneName: string | number | undefined, action: "
|
|
113
|
+
onEdit?: ((paneName: string | number | undefined, action: "add" | "remove") => any) | undefined;
|
|
114
114
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
115
115
|
export default _default;
|
|
116
116
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -136,9 +136,9 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
136
136
|
*/
|
|
137
137
|
onPick: (date?: any, visible?: boolean) => void;
|
|
138
138
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
139
|
+
clear: (...args: any[]) => void;
|
|
139
140
|
"update:modelValue": (...args: any[]) => void;
|
|
140
141
|
change: (...args: any[]) => void;
|
|
141
|
-
clear: (...args: any[]) => void;
|
|
142
142
|
blur: (...args: any[]) => void;
|
|
143
143
|
focus: (...args: any[]) => void;
|
|
144
144
|
keydown: (...args: any[]) => void;
|
|
@@ -238,9 +238,9 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
238
238
|
};
|
|
239
239
|
readonly isRange: BooleanConstructor;
|
|
240
240
|
}>> & Readonly<{
|
|
241
|
+
onClear?: ((...args: any[]) => any) | undefined;
|
|
241
242
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
242
243
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
243
|
-
onClear?: ((...args: any[]) => any) | undefined;
|
|
244
244
|
onBlur?: ((...args: any[]) => any) | undefined;
|
|
245
245
|
onFocus?: ((...args: any[]) => any) | undefined;
|
|
246
246
|
onKeydown?: ((...args: any[]) => any) | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as s, ref as p, provide as u, createVNode as t, mergeProps as c } from "vue";
|
|
2
2
|
import d from "dayjs";
|
|
3
|
-
import P from "dayjs/plugin/customParseFormat
|
|
3
|
+
import P from "dayjs/plugin/customParseFormat";
|
|
4
4
|
import { UPDATE_MODEL_EVENT as a } from "../../constants/event.js";
|
|
5
5
|
import { PICKER_POPPER_OPTIONS_INJECTION_KEY as _, DEFAULT_FORMATS_TIME as E } from "./constants.js";
|
|
6
6
|
import O from "./common/picker.vue2.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as v, ref as S, computed as r, createBlock as u, openBlock as s, unref as n, withCtx as f, createElementBlock as h, Fragment as w, renderList as E, createCommentVNode as H, normalizeClass as N } from "vue";
|
|
2
2
|
import d from "dayjs";
|
|
3
|
-
import O from "dayjs/plugin/customParseFormat
|
|
3
|
+
import O from "dayjs/plugin/customParseFormat";
|
|
4
4
|
import b from "../select/index.js";
|
|
5
5
|
import "../form/index.js";
|
|
6
6
|
import { VftIcon as P } from "../icon/index.js";
|
|
@@ -99,6 +99,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
99
99
|
})>;
|
|
100
100
|
TreeCheckbox: import("vft/es/utils").SFCWithInstall<{
|
|
101
101
|
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
102
|
+
size: {
|
|
103
|
+
type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
|
|
104
|
+
};
|
|
102
105
|
label: {
|
|
103
106
|
type: import("vue").PropType<string | number>;
|
|
104
107
|
};
|
|
@@ -117,9 +120,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
117
120
|
id: {
|
|
118
121
|
type: import("vue").PropType<string>;
|
|
119
122
|
};
|
|
120
|
-
size: {
|
|
121
|
-
type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
|
|
122
|
-
};
|
|
123
123
|
modelValue: {
|
|
124
124
|
type: import("vue").PropType<string | number | boolean>;
|
|
125
125
|
};
|
|
@@ -161,6 +161,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
161
161
|
M: {};
|
|
162
162
|
Defaults: {};
|
|
163
163
|
}, Readonly<import("vue").ExtractPropTypes<{
|
|
164
|
+
size: {
|
|
165
|
+
type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
|
|
166
|
+
};
|
|
164
167
|
label: {
|
|
165
168
|
type: import("vue").PropType<string | number>;
|
|
166
169
|
};
|
|
@@ -179,9 +182,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
179
182
|
id: {
|
|
180
183
|
type: import("vue").PropType<string>;
|
|
181
184
|
};
|
|
182
|
-
size: {
|
|
183
|
-
type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
|
|
184
|
-
};
|
|
185
185
|
modelValue: {
|
|
186
186
|
type: import("vue").PropType<string | number | boolean>;
|
|
187
187
|
};
|
|
@@ -217,6 +217,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
217
217
|
__isTeleport?: never;
|
|
218
218
|
__isSuspense?: never;
|
|
219
219
|
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
220
|
+
size: {
|
|
221
|
+
type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
|
|
222
|
+
};
|
|
220
223
|
label: {
|
|
221
224
|
type: import("vue").PropType<string | number>;
|
|
222
225
|
};
|
|
@@ -235,9 +238,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
235
238
|
id: {
|
|
236
239
|
type: import("vue").PropType<string>;
|
|
237
240
|
};
|
|
238
|
-
size: {
|
|
239
|
-
type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
|
|
240
|
-
};
|
|
241
241
|
modelValue: {
|
|
242
242
|
type: import("vue").PropType<string | number | boolean>;
|
|
243
243
|
};
|
|
@@ -448,6 +448,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
448
448
|
});
|
|
449
449
|
CheckboxGroup: {
|
|
450
450
|
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
451
|
+
size: {
|
|
452
|
+
type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
|
|
453
|
+
};
|
|
451
454
|
label: {
|
|
452
455
|
type: import("vue").PropType<string>;
|
|
453
456
|
};
|
|
@@ -457,9 +460,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
457
460
|
fill: {
|
|
458
461
|
type: import("vue").PropType<string>;
|
|
459
462
|
};
|
|
460
|
-
size: {
|
|
461
|
-
type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
|
|
462
|
-
};
|
|
463
463
|
modelValue: {
|
|
464
464
|
type: import("vue").PropType<import("vft/es/components/checkbox").CheckboxGroupValueType>;
|
|
465
465
|
default: () => never[];
|
|
@@ -505,6 +505,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
505
505
|
M: {};
|
|
506
506
|
Defaults: {};
|
|
507
507
|
}, Readonly<import("vue").ExtractPropTypes<{
|
|
508
|
+
size: {
|
|
509
|
+
type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
|
|
510
|
+
};
|
|
508
511
|
label: {
|
|
509
512
|
type: import("vue").PropType<string>;
|
|
510
513
|
};
|
|
@@ -514,9 +517,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
514
517
|
fill: {
|
|
515
518
|
type: import("vue").PropType<string>;
|
|
516
519
|
};
|
|
517
|
-
size: {
|
|
518
|
-
type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
|
|
519
|
-
};
|
|
520
520
|
modelValue: {
|
|
521
521
|
type: import("vue").PropType<import("vft/es/components/checkbox").CheckboxGroupValueType>;
|
|
522
522
|
default: () => never[];
|
|
@@ -556,6 +556,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
556
556
|
__isTeleport?: never;
|
|
557
557
|
__isSuspense?: never;
|
|
558
558
|
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
559
|
+
size: {
|
|
560
|
+
type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
|
|
561
|
+
};
|
|
559
562
|
label: {
|
|
560
563
|
type: import("vue").PropType<string>;
|
|
561
564
|
};
|
|
@@ -565,9 +568,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
565
568
|
fill: {
|
|
566
569
|
type: import("vue").PropType<string>;
|
|
567
570
|
};
|
|
568
|
-
size: {
|
|
569
|
-
type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
|
|
570
|
-
};
|
|
571
571
|
modelValue: {
|
|
572
572
|
type: import("vue").PropType<import("vft/es/components/checkbox").CheckboxGroupValueType>;
|
|
573
573
|
default: () => never[];
|
package/es/index.js
CHANGED
|
@@ -126,6 +126,7 @@ export { ZINDEX_INJECTION_KEY, defaultInitialZIndex, useZIndex, zIndexContextKey
|
|
|
126
126
|
export { useCalcInputWidth } from "./hooks/use-calc-input-width/index.js";
|
|
127
127
|
export { useComposition } from "./hooks/use-composition/index.js";
|
|
128
128
|
export { useFocusController } from "./hooks/use-focus-controller/index.js";
|
|
129
|
+
export { FormCompEnum, clearComponents, getComponent, getRegisteredComponents, hasComponent, registerComponent, registerComponents, removeComponent } from "./utils/form-register.js";
|
|
129
130
|
export { attemptFocus, focusNode, getSibling, isFocusable, isLeaf, isVisible, obtainAllFocusableElements, triggerEvent } from "./utils/dom/aria.js";
|
|
130
131
|
export { getClientXY, getOffsetTop, getOffsetTopDistance, isInContainer } from "./utils/dom/position.js";
|
|
131
132
|
export { getScrollBarWidth, getScrollContainer, isScroll, scrollIntoView } from "./utils/dom/scroll.js";
|
|
@@ -202,7 +203,7 @@ export { watermarkProps } from "./components/watermark/watermark.js";
|
|
|
202
203
|
export { vLoading, createLoadingDirective } from "./components/loading/directive.js";
|
|
203
204
|
export { Loading } from "./components/loading/service.js";
|
|
204
205
|
export { messageDefaults, messageTypes } from "./components/message/types.js";
|
|
205
|
-
export {
|
|
206
|
+
export { isDatePicker, isInput, isRangePicker } from "./components/super-form/component-map.js";
|
|
206
207
|
export { getDynamicProps, useForm } from "./components/super-form/use/use-form.js";
|
|
207
208
|
|
|
208
209
|
|
package/es/package.json.d.ts
CHANGED
package/es/package.json.js
CHANGED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { Component } from 'vue';
|
|
2
|
+
export declare const FormCompEnum: {
|
|
3
|
+
readonly AUTOCOMPLETE: "autocomplete";
|
|
4
|
+
readonly Cascader: "cascader";
|
|
5
|
+
readonly ColorPicker: "colorPicker";
|
|
6
|
+
readonly INPUT: "input";
|
|
7
|
+
readonly INPUT_NUMBER: "input-number";
|
|
8
|
+
readonly INPUT_NUMBER_STEP: "input-number-step";
|
|
9
|
+
readonly INPUT_TAG: "input-tag";
|
|
10
|
+
readonly PASSWORD: "password";
|
|
11
|
+
readonly TEXTAREA: "textarea";
|
|
12
|
+
readonly Slider: "slider";
|
|
13
|
+
readonly DIVIDER: "divider";
|
|
14
|
+
readonly SELECT: "select";
|
|
15
|
+
readonly SEARCH: "search";
|
|
16
|
+
readonly RADIO: "radio";
|
|
17
|
+
readonly RADIO_SINGLE: "radio_single";
|
|
18
|
+
readonly RADIO_BUTTON: "radio-button";
|
|
19
|
+
readonly CHECKBOX: "checkbox";
|
|
20
|
+
readonly CHECKBOX_SINGLE: "checkbox_single";
|
|
21
|
+
readonly CHECKBOX_BUTTON: "checkbox-button";
|
|
22
|
+
readonly SWITCH: "switch";
|
|
23
|
+
readonly Upload: "upload";
|
|
24
|
+
readonly TIME_PICKER: "time-picker";
|
|
25
|
+
readonly TIMERANGE_PICKER: "time-picker";
|
|
26
|
+
readonly YEAR_PICKER: "year";
|
|
27
|
+
readonly MONTH_PICKER: "month";
|
|
28
|
+
readonly DATE_PICKER: "date";
|
|
29
|
+
readonly DATES_PICKER: "dates";
|
|
30
|
+
readonly DATETIME_PICKER: "datetime";
|
|
31
|
+
readonly WEEK_PICKER: "week";
|
|
32
|
+
readonly DATETIMERANGE_PICKER: "datetimerange";
|
|
33
|
+
readonly DATERANGE_PICKER: "daterange";
|
|
34
|
+
readonly MONTHRANGE_PICKER: "monthrange";
|
|
35
|
+
};
|
|
36
|
+
export type FormCompEnumType = (typeof FormCompEnum)[keyof typeof FormCompEnum];
|
|
37
|
+
export declare function registerComponent(compName: FormCompEnumType | string, component: Component): void;
|
|
38
|
+
export declare function registerComponents(components: Record<string, Component>): void;
|
|
39
|
+
export declare function getComponent(compName: FormCompEnumType): Component | undefined;
|
|
40
|
+
export declare function removeComponent(compName: FormCompEnumType): void;
|
|
41
|
+
export declare function hasComponent(compName: FormCompEnumType): boolean;
|
|
42
|
+
export declare function getRegisteredComponents(): FormCompEnumType[];
|
|
43
|
+
export declare function clearComponents(): void;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
const E = {
|
|
2
|
+
AUTOCOMPLETE: "autocomplete",
|
|
3
|
+
Cascader: "cascader",
|
|
4
|
+
ColorPicker: "colorPicker",
|
|
5
|
+
INPUT: "input",
|
|
6
|
+
INPUT_NUMBER: "input-number",
|
|
7
|
+
INPUT_NUMBER_STEP: "input-number-step",
|
|
8
|
+
INPUT_TAG: "input-tag",
|
|
9
|
+
PASSWORD: "password",
|
|
10
|
+
TEXTAREA: "textarea",
|
|
11
|
+
Slider: "slider",
|
|
12
|
+
DIVIDER: "divider",
|
|
13
|
+
SELECT: "select",
|
|
14
|
+
SEARCH: "search",
|
|
15
|
+
RADIO: "radio",
|
|
16
|
+
RADIO_SINGLE: "radio_single",
|
|
17
|
+
RADIO_BUTTON: "radio-button",
|
|
18
|
+
CHECKBOX: "checkbox",
|
|
19
|
+
CHECKBOX_SINGLE: "checkbox_single",
|
|
20
|
+
CHECKBOX_BUTTON: "checkbox-button",
|
|
21
|
+
SWITCH: "switch",
|
|
22
|
+
Upload: "upload",
|
|
23
|
+
TIME_PICKER: "time-picker",
|
|
24
|
+
// eslint-disable-next-line
|
|
25
|
+
TIMERANGE_PICKER: "time-picker",
|
|
26
|
+
YEAR_PICKER: "year",
|
|
27
|
+
MONTH_PICKER: "month",
|
|
28
|
+
DATE_PICKER: "date",
|
|
29
|
+
DATES_PICKER: "dates",
|
|
30
|
+
DATETIME_PICKER: "datetime",
|
|
31
|
+
WEEK_PICKER: "week",
|
|
32
|
+
DATETIMERANGE_PICKER: "datetimerange",
|
|
33
|
+
DATERANGE_PICKER: "daterange",
|
|
34
|
+
MONTHRANGE_PICKER: "monthrange"
|
|
35
|
+
}, t = /* @__PURE__ */ new Map();
|
|
36
|
+
function r(e, n) {
|
|
37
|
+
t.set(e, n);
|
|
38
|
+
}
|
|
39
|
+
function i(e) {
|
|
40
|
+
Object.entries(e).forEach(([n, o]) => {
|
|
41
|
+
t.set(n, o);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
function a(e) {
|
|
45
|
+
return t.get(e);
|
|
46
|
+
}
|
|
47
|
+
function c(e) {
|
|
48
|
+
t.delete(e);
|
|
49
|
+
}
|
|
50
|
+
function C(e) {
|
|
51
|
+
return t.has(e);
|
|
52
|
+
}
|
|
53
|
+
function I() {
|
|
54
|
+
return Array.from(t.keys());
|
|
55
|
+
}
|
|
56
|
+
function T() {
|
|
57
|
+
t.clear();
|
|
58
|
+
}
|
|
59
|
+
export {
|
|
60
|
+
E as FormCompEnum,
|
|
61
|
+
T as clearComponents,
|
|
62
|
+
a as getComponent,
|
|
63
|
+
I as getRegisteredComponents,
|
|
64
|
+
C as hasComponent,
|
|
65
|
+
r as registerComponent,
|
|
66
|
+
i as registerComponents,
|
|
67
|
+
c as removeComponent
|
|
68
|
+
};
|
package/es/utils/index.d.ts
CHANGED
package/es/utils/index.js
CHANGED
|
@@ -1,73 +1,82 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
1
|
+
import { FormCompEnum as r, clearComponents as t, getComponent as s, getRegisteredComponents as n, hasComponent as i, registerComponent as p, registerComponents as l, removeComponent as m } from "./form-register.js";
|
|
2
|
+
import { attemptFocus as f, focusNode as g, getSibling as d, isFocusable as C, isLeaf as c, isVisible as x, obtainAllFocusableElements as u, triggerEvent as h } from "./dom/aria.js";
|
|
3
|
+
import { getClientXY as b, getOffsetTop as V, getOffsetTopDistance as P, isInContainer as S } from "./dom/position.js";
|
|
4
|
+
import { getScrollBarWidth as y, getScrollContainer as E, isScroll as I, scrollIntoView as T } from "./dom/scroll.js";
|
|
5
|
+
import { debugWarn as N, throwError as z } from "./error.js";
|
|
6
|
+
import { composeEventHandlers as O, whenMouse as R } from "./event.js";
|
|
7
|
+
import { addUnit as D, castArray as W, getComponentSize as k, getSizeType as q, isValidComponentSize as H, unique as K } from "./helper.js";
|
|
8
|
+
import { cssVarValue as M, generateCssVars as U, primaryColor as X, setCssVar as Y, setPrimaryColorCssvars as j } from "./ns-cover.js";
|
|
9
|
+
import { mutable as J } from "./typescript.js";
|
|
10
|
+
import { escapeStringRegexp as Z } from "./vue/data-helper.js";
|
|
11
|
+
import { withInstall as $, withInstallDirective as ee, withInstallFunction as oe, withNoopInstall as re } from "./vue/install.js";
|
|
12
|
+
import { buildProp as se, buildProps as ne, definePropType as ie, epPropKey as pe, isEpProp as le } from "./vue/props/runtime.js";
|
|
13
|
+
import { cAF as ae, rAF as fe } from "./vue/raf.js";
|
|
14
|
+
import { composeRefs as de } from "./vue/refs.js";
|
|
15
|
+
import { PatchFlags as ce, ensureOnlyChild as xe, flattedChildren as ue, getFirstValidNode as he, getNormalizedProps as Fe, isComment as be, isFragment as Ve, isTemplate as Pe, isText as Se, isValidElementNode as we, renderBlock as ye, renderIf as Ee } from "./vue/vnode.js";
|
|
15
16
|
export {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
Y as
|
|
72
|
-
j as
|
|
17
|
+
r as FormCompEnum,
|
|
18
|
+
ce as PatchFlags,
|
|
19
|
+
D as addUnit,
|
|
20
|
+
f as attemptFocus,
|
|
21
|
+
se as buildProp,
|
|
22
|
+
ne as buildProps,
|
|
23
|
+
ae as cAF,
|
|
24
|
+
W as castArray,
|
|
25
|
+
t as clearComponents,
|
|
26
|
+
O as composeEventHandlers,
|
|
27
|
+
de as composeRefs,
|
|
28
|
+
M as cssVarValue,
|
|
29
|
+
N as debugWarn,
|
|
30
|
+
ie as definePropType,
|
|
31
|
+
xe as ensureOnlyChild,
|
|
32
|
+
pe as epPropKey,
|
|
33
|
+
Z as escapeStringRegexp,
|
|
34
|
+
ue as flattedChildren,
|
|
35
|
+
g as focusNode,
|
|
36
|
+
U as generateCssVars,
|
|
37
|
+
b as getClientXY,
|
|
38
|
+
s as getComponent,
|
|
39
|
+
k as getComponentSize,
|
|
40
|
+
he as getFirstValidNode,
|
|
41
|
+
Fe as getNormalizedProps,
|
|
42
|
+
V as getOffsetTop,
|
|
43
|
+
P as getOffsetTopDistance,
|
|
44
|
+
n as getRegisteredComponents,
|
|
45
|
+
y as getScrollBarWidth,
|
|
46
|
+
E as getScrollContainer,
|
|
47
|
+
d as getSibling,
|
|
48
|
+
q as getSizeType,
|
|
49
|
+
i as hasComponent,
|
|
50
|
+
be as isComment,
|
|
51
|
+
le as isEpProp,
|
|
52
|
+
C as isFocusable,
|
|
53
|
+
Ve as isFragment,
|
|
54
|
+
S as isInContainer,
|
|
55
|
+
c as isLeaf,
|
|
56
|
+
I as isScroll,
|
|
57
|
+
Pe as isTemplate,
|
|
58
|
+
Se as isText,
|
|
59
|
+
H as isValidComponentSize,
|
|
60
|
+
we as isValidElementNode,
|
|
61
|
+
x as isVisible,
|
|
62
|
+
J as mutable,
|
|
63
|
+
u as obtainAllFocusableElements,
|
|
64
|
+
X as primaryColor,
|
|
65
|
+
fe as rAF,
|
|
66
|
+
p as registerComponent,
|
|
67
|
+
l as registerComponents,
|
|
68
|
+
m as removeComponent,
|
|
69
|
+
ye as renderBlock,
|
|
70
|
+
Ee as renderIf,
|
|
71
|
+
T as scrollIntoView,
|
|
72
|
+
Y as setCssVar,
|
|
73
|
+
j as setPrimaryColorCssvars,
|
|
74
|
+
z as throwError,
|
|
75
|
+
h as triggerEvent,
|
|
76
|
+
K as unique,
|
|
77
|
+
R as whenMouse,
|
|
78
|
+
$ as withInstall,
|
|
79
|
+
ee as withInstallDirective,
|
|
80
|
+
oe as withInstallFunction,
|
|
81
|
+
re as withNoopInstall
|
|
73
82
|
};
|
package/es/utils/vue/vnode.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { hasOwn as m, camelize as N, isArray as E } from "@vft/utils";
|
|
2
2
|
import { isVNode as o, Fragment as S, Comment as A, Text as s, createCommentVNode as L, createBlock as _, openBlock as C } from "vue";
|
|
3
3
|
import { debugWarn as O } from "../error.js";
|
|
4
4
|
const R = "utils/vue/vnode";
|
|
@@ -889,19 +889,19 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
889
889
|
/** @description highlight an item in a suggestion */
|
|
890
890
|
highlight: (index: number) => void;
|
|
891
891
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
892
|
+
input: (value: string) => void;
|
|
892
893
|
select: (item: Record<string, any>) => void;
|
|
894
|
+
clear: () => void;
|
|
893
895
|
"update:modelValue": (value: string) => void;
|
|
894
896
|
change: (value: string) => void;
|
|
895
|
-
input: (value: string) => void;
|
|
896
|
-
clear: () => void;
|
|
897
897
|
blur: (evt: FocusEvent) => void;
|
|
898
898
|
focus: (evt: FocusEvent) => void;
|
|
899
899
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<AutocompleteProps>>> & Readonly<{
|
|
900
900
|
onInput?: ((value: string) => any) | undefined;
|
|
901
901
|
onSelect?: ((item: Record<string, any>) => any) | undefined;
|
|
902
|
+
onClear?: (() => any) | undefined;
|
|
902
903
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
903
904
|
onChange?: ((value: string) => any) | undefined;
|
|
904
|
-
onClear?: (() => any) | undefined;
|
|
905
905
|
onBlur?: ((evt: FocusEvent) => any) | undefined;
|
|
906
906
|
onFocus?: ((evt: FocusEvent) => any) | undefined;
|
|
907
907
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -51,9 +51,9 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
|
|
|
51
51
|
}>> & Readonly<{
|
|
52
52
|
onInput?: ((value: string) => any) | undefined;
|
|
53
53
|
onSelect?: ((item: Record<string, any>) => any) | undefined;
|
|
54
|
+
onClear?: (() => any) | undefined;
|
|
54
55
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
55
56
|
onChange?: ((value: string) => any) | undefined;
|
|
56
|
-
onClear?: (() => any) | undefined;
|
|
57
57
|
onBlur?: ((evt: FocusEvent) => any) | undefined;
|
|
58
58
|
onFocus?: ((evt: FocusEvent) => any) | undefined;
|
|
59
59
|
}>, {
|
|
@@ -906,11 +906,11 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
|
|
|
906
906
|
close: () => void;
|
|
907
907
|
highlight: (index: number) => void;
|
|
908
908
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
909
|
+
input: (value: string) => void;
|
|
909
910
|
select: (item: Record<string, any>) => void;
|
|
911
|
+
clear: () => void;
|
|
910
912
|
"update:modelValue": (value: string) => void;
|
|
911
913
|
change: (value: string) => void;
|
|
912
|
-
input: (value: string) => void;
|
|
913
|
-
clear: () => void;
|
|
914
914
|
blur: (evt: FocusEvent) => void;
|
|
915
915
|
focus: (evt: FocusEvent) => void;
|
|
916
916
|
}, import("vue").PublicProps, {}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
@@ -972,9 +972,9 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
|
|
|
972
972
|
}>> & Readonly<{
|
|
973
973
|
onInput?: ((value: string) => any) | undefined;
|
|
974
974
|
onSelect?: ((item: Record<string, any>) => any) | undefined;
|
|
975
|
+
onClear?: (() => any) | undefined;
|
|
975
976
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
976
977
|
onChange?: ((value: string) => any) | undefined;
|
|
977
|
-
onClear?: (() => any) | undefined;
|
|
978
978
|
onBlur?: ((evt: FocusEvent) => any) | undefined;
|
|
979
979
|
onFocus?: ((evt: FocusEvent) => any) | undefined;
|
|
980
980
|
}>, {
|
|
@@ -1882,9 +1882,9 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
|
|
|
1882
1882
|
}>> & Readonly<{
|
|
1883
1883
|
onInput?: ((value: string) => any) | undefined;
|
|
1884
1884
|
onSelect?: ((item: Record<string, any>) => any) | undefined;
|
|
1885
|
+
onClear?: (() => any) | undefined;
|
|
1885
1886
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
1886
1887
|
onChange?: ((value: string) => any) | undefined;
|
|
1887
|
-
onClear?: (() => any) | undefined;
|
|
1888
1888
|
onBlur?: ((evt: FocusEvent) => any) | undefined;
|
|
1889
1889
|
onFocus?: ((evt: FocusEvent) => any) | undefined;
|
|
1890
1890
|
}>, {
|
|
@@ -2737,11 +2737,11 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
|
|
|
2737
2737
|
close: () => void;
|
|
2738
2738
|
highlight: (index: number) => void;
|
|
2739
2739
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
2740
|
+
input: (value: string) => void;
|
|
2740
2741
|
select: (item: Record<string, any>) => void;
|
|
2742
|
+
clear: () => void;
|
|
2741
2743
|
"update:modelValue": (value: string) => void;
|
|
2742
2744
|
change: (value: string) => void;
|
|
2743
|
-
input: (value: string) => void;
|
|
2744
|
-
clear: () => void;
|
|
2745
2745
|
blur: (evt: FocusEvent) => void;
|
|
2746
2746
|
focus: (evt: FocusEvent) => void;
|
|
2747
2747
|
}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
@@ -11,7 +11,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
11
11
|
}>>, {
|
|
12
12
|
ref: import("vue").Ref<HTMLButtonElement | undefined, HTMLButtonElement | undefined>;
|
|
13
13
|
size: import("vue").ComputedRef<import("vft/es/constants").ComponentSize>;
|
|
14
|
-
type: import("vue").ComputedRef<"
|
|
14
|
+
type: import("vue").ComputedRef<"" | "text" | "default" | "success" | "warning" | "info" | "danger" | "primary">;
|
|
15
15
|
disabled: import("vue").ComputedRef<boolean>;
|
|
16
16
|
shouldAddSpace: import("vue").ComputedRef<boolean>;
|
|
17
17
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|