@v-c/select 1.2.8 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BaseSelect/Polite.d.ts +1 -1
- package/dist/BaseSelect/index.d.ts +4 -6
- package/dist/BaseSelect/index.js +6 -4
- package/dist/OptGroup.d.ts +1 -1
- package/dist/Option.d.ts +1 -1
- package/dist/Select.d.ts +2 -2
- package/dist/SelectContext.d.ts +2 -2
- package/dist/SelectInput/Content/MultipleContent.d.ts +1 -1
- package/dist/SelectInput/Content/SingleContent.d.ts +1 -1
- package/dist/SelectInput/context.d.ts +1 -1
- package/dist/SelectInput/index.d.ts +3 -2
- package/dist/SelectInput/index.js +6 -0
- package/dist/SelectTrigger.d.ts +1 -1
- package/dist/TransBtn.d.ts +1 -1
- package/dist/hooks/index.d.ts +16 -17
- package/dist/hooks/useAllowClear.d.ts +5 -6
- package/dist/hooks/useAllowClear.js +4 -7
- package/dist/hooks/useBaseProps.d.ts +1 -1
- package/dist/hooks/useCache.d.ts +2 -2
- package/dist/hooks/useComponents.d.ts +1 -1
- package/dist/hooks/useFilterOptions.d.ts +1 -1
- package/dist/hooks/useOptions.d.ts +2 -2
- package/dist/hooks/useSearchConfig.d.ts +1 -1
- package/dist/hooks/useSelectTriggerControl.d.ts +1 -1
- package/dist/index.d.ts +8 -8
- package/dist/utils/commonUtil.d.ts +1 -1
- package/dist/utils/legacyUtil.d.ts +1 -1
- package/dist/utils/valueUtil.d.ts +2 -2
- package/package.json +5 -5
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { AlignType, BuildInPlacements } from '@v-c/trigger';
|
|
2
|
+
import { AllowClearConfig } from '@v-c/util';
|
|
2
3
|
import { VueNode } from '@v-c/util/dist/type';
|
|
3
4
|
import { ScrollConfig, ScrollTo } from '@v-c/virtual-list';
|
|
4
5
|
import { CSSProperties, StyleValue } from 'vue';
|
|
5
|
-
import { ComponentsConfig } from '../hooks';
|
|
6
|
-
import { DisplayInfoType, DisplayValueType, Mode, Placement, RawValueType, RenderDOMFunc, RenderNode } from '../interface';
|
|
6
|
+
import { ComponentsConfig } from '../hooks/index.js';
|
|
7
|
+
import { DisplayInfoType, DisplayValueType, Mode, Placement, RawValueType, RenderDOMFunc, RenderNode } from '../interface.js';
|
|
7
8
|
export type BaseSelectSemanticName = 'prefix' | 'suffix' | 'input' | 'clear' | 'placeholder' | 'content' | 'item' | 'itemContent' | 'itemRemove';
|
|
8
9
|
/**
|
|
9
10
|
* ZombieJ:
|
|
@@ -93,10 +94,7 @@ export interface BaseSelectProps extends BaseSelectPrivateProps {
|
|
|
93
94
|
maxTagCount?: number | 'responsive';
|
|
94
95
|
maxTagPlaceholder?: VueNode | ((omittedValues: DisplayValueType[]) => any);
|
|
95
96
|
tokenSeparators?: string[] | ((input: string) => string[]);
|
|
96
|
-
allowClear?: boolean |
|
|
97
|
-
clearIcon?: VueNode;
|
|
98
|
-
label?: string;
|
|
99
|
-
};
|
|
97
|
+
allowClear?: boolean | AllowClearConfig;
|
|
100
98
|
prefix?: VueNode;
|
|
101
99
|
/** @deprecated Please use `suffix` instead. */
|
|
102
100
|
suffixIcon?: RenderNode;
|
package/dist/BaseSelect/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useBaseSelectProvider } from "../hooks/useBaseProps.js";
|
|
2
2
|
import { getSeparatedContent, isValidCount } from "../utils/valueUtil.js";
|
|
3
|
-
import { useAllowClear } from "../hooks/useAllowClear.js";
|
|
3
|
+
import { useAllowClear as useAllowClear$1 } from "../hooks/useAllowClear.js";
|
|
4
4
|
import useComponents from "../hooks/useComponents.js";
|
|
5
5
|
import useLock from "../hooks/useLock.js";
|
|
6
6
|
import useOpen, { macroTask } from "../hooks/useOpen.js";
|
|
@@ -232,7 +232,7 @@ var BaseSelect = /* @__PURE__ */ defineComponent((props, { expose, attrs }) => {
|
|
|
232
232
|
keyLockRef.value = false;
|
|
233
233
|
};
|
|
234
234
|
const getSelectElements = () => [getDOM(containerRef), triggerRef.value?.getPopupElement?.()];
|
|
235
|
-
useSelectTriggerControl(getSelectElements,
|
|
235
|
+
useSelectTriggerControl(getSelectElements, rawOpen, triggerOpen, computed(() => !!mergedComponents.value.root));
|
|
236
236
|
const internalMouseDownRef = shallowRef(false);
|
|
237
237
|
const onInternalFocus = (event) => {
|
|
238
238
|
focused.value = true;
|
|
@@ -242,7 +242,7 @@ var BaseSelect = /* @__PURE__ */ defineComponent((props, { expose, attrs }) => {
|
|
|
242
242
|
}
|
|
243
243
|
};
|
|
244
244
|
const onRootBlur = () => {
|
|
245
|
-
if (
|
|
245
|
+
if (rawOpen.value && !internalMouseDownRef.value) triggerOpen(false, { cancelFun: () => isInside(getSelectElements(), document.activeElement) });
|
|
246
246
|
};
|
|
247
247
|
const onInternalBlur = (event) => {
|
|
248
248
|
focused.value = false;
|
|
@@ -288,12 +288,13 @@ var BaseSelect = /* @__PURE__ */ defineComponent((props, { expose, attrs }) => {
|
|
|
288
288
|
});
|
|
289
289
|
onInternalSearch("", false, false);
|
|
290
290
|
};
|
|
291
|
-
const allowClearConfig = useAllowClear(computed(() => props.prefixCls), displayValues, computed(() => props.allowClear ?? false), computed(() => props.clearIcon), computed(() => disabled.value ?? false), mergedSearchValue, mode);
|
|
291
|
+
const allowClearConfig = useAllowClear$1(computed(() => props.prefixCls), displayValues, computed(() => props.allowClear ?? false), computed(() => props.clearIcon), computed(() => disabled.value ?? false), mergedSearchValue, mode);
|
|
292
292
|
return () => {
|
|
293
293
|
const { OptionList, prefixCls, className, loading, showSearch, prefix, placeholder, activeValue, animation, transitionName, popupStyle, popupClassName, direction, popupMatchSelectWidth, popupRender, popupAlign, placement, builtinPlacements, getPopupContainer, emptyOptions } = props;
|
|
294
294
|
const mergedAllowClear = allowClearConfig.value.allowClear;
|
|
295
295
|
const clearNode = allowClearConfig.value.clearIcon;
|
|
296
296
|
const clearLabel = allowClearConfig.value.label;
|
|
297
|
+
const clearTabIndex = allowClearConfig.value.tabIndex;
|
|
297
298
|
const customizeInputElement = mode.value === "combobox" && typeof getInputElement.value === "function" && getInputElement.value() || null;
|
|
298
299
|
let onTriggerVisibleChange = null;
|
|
299
300
|
if (mergedComponents.value?.root) onTriggerVisibleChange = (newOpen) => {
|
|
@@ -333,6 +334,7 @@ var BaseSelect = /* @__PURE__ */ defineComponent((props, { expose, attrs }) => {
|
|
|
333
334
|
"suffix": mergedSuffixIcon,
|
|
334
335
|
"clearIcon": clearNode,
|
|
335
336
|
"clearLabel": clearLabel,
|
|
337
|
+
"clearTabIndex": clearTabIndex,
|
|
336
338
|
"multiple": multiple.value,
|
|
337
339
|
"mode": mode.value,
|
|
338
340
|
"displayValues": displayValues.value,
|
package/dist/OptGroup.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FunctionalComponent } from 'vue';
|
|
2
|
-
import { DefaultOptionType } from './Select.
|
|
2
|
+
import { DefaultOptionType } from './Select.js';
|
|
3
3
|
export interface OptGroupProps extends Omit<DefaultOptionType, 'options'> {
|
|
4
4
|
}
|
|
5
5
|
declare const OptGroup: FunctionalComponent<OptGroupProps>;
|
package/dist/Option.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FunctionalComponent } from 'vue';
|
|
2
|
-
import { DefaultOptionType } from './Select.
|
|
2
|
+
import { DefaultOptionType } from './Select.js';
|
|
3
3
|
export interface OptionProps extends Omit<DefaultOptionType, 'label'> {
|
|
4
4
|
/** Save for customize data */
|
|
5
5
|
[prop: string]: any;
|
package/dist/Select.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VueNode } from '@v-c/util/dist/type';
|
|
2
2
|
import { CSSProperties } from 'vue';
|
|
3
|
-
import { BaseSelectPropsWithoutPrivate, BaseSelectSemanticName } from './BaseSelect';
|
|
4
|
-
import { DisplayValueType, FlattenOptionData, RawValueType, RenderNode } from './interface';
|
|
3
|
+
import { BaseSelectPropsWithoutPrivate, BaseSelectSemanticName } from './BaseSelect/index.js';
|
|
4
|
+
import { DisplayValueType, FlattenOptionData, RawValueType, RenderNode } from './interface.js';
|
|
5
5
|
export type OnActiveValue = (active: RawValueType | null, index: number, info?: {
|
|
6
6
|
source?: 'keyboard' | 'mouse';
|
|
7
7
|
}) => void;
|
package/dist/SelectContext.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CSSProperties, Ref } from 'vue';
|
|
2
|
-
import { FlattenOptionData, RawValueType, RenderNode } from './interface';
|
|
3
|
-
import { BaseOptionType, FieldNames, OnActiveValue, OnInternalSelect, PopupSemantic, SelectProps, SemanticName } from './Select';
|
|
2
|
+
import { FlattenOptionData, RawValueType, RenderNode } from './interface.js';
|
|
3
|
+
import { BaseOptionType, FieldNames, OnActiveValue, OnInternalSelect, PopupSemantic, SelectProps, SemanticName } from './Select.js';
|
|
4
4
|
/**
|
|
5
5
|
* SelectContext is only used for Select. BaseSelect should not consume this context.
|
|
6
6
|
*/
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { SharedContentProps } from './index';
|
|
1
|
+
import { SharedContentProps } from './index.js';
|
|
2
2
|
declare const MultipleContent: import('vue').DefineSetupFnComponent<SharedContentProps, {}, {}, SharedContentProps & {}, import('vue').PublicProps>;
|
|
3
3
|
export default MultipleContent;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { SharedContentProps } from './index';
|
|
1
|
+
import { SharedContentProps } from './index.js';
|
|
2
2
|
declare const SingleContent: import('vue').DefineSetupFnComponent<SharedContentProps, {}, {}, SharedContentProps & {}, import('vue').PublicProps>;
|
|
3
3
|
export default SingleContent;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
|
-
import { SelectInputProps } from '.';
|
|
2
|
+
import { SelectInputProps } from './index.js';
|
|
3
3
|
export type ContentContextProps = SelectInputProps;
|
|
4
4
|
export declare function useSelectInputContext(): Ref<ContentContextProps | null>;
|
|
5
5
|
export declare function useSelectInputProvider(context: Ref<ContentContextProps>): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VueNode } from '@v-c/util/dist/type';
|
|
2
2
|
import { StyleValue } from 'vue';
|
|
3
|
-
import { ComponentsConfig } from '../hooks';
|
|
4
|
-
import { DisplayValueType, Mode, RenderNode } from '../interface';
|
|
3
|
+
import { ComponentsConfig } from '../hooks/index.js';
|
|
4
|
+
import { DisplayValueType, Mode, RenderNode } from '../interface.js';
|
|
5
5
|
export interface SelectInputRef {
|
|
6
6
|
focus: (options?: FocusOptions) => void;
|
|
7
7
|
blur: () => void;
|
|
@@ -13,6 +13,7 @@ export interface SelectInputProps {
|
|
|
13
13
|
suffix?: VueNode;
|
|
14
14
|
clearIcon?: VueNode;
|
|
15
15
|
clearLabel?: string;
|
|
16
|
+
clearTabIndex?: number;
|
|
16
17
|
removeIcon?: RenderNode;
|
|
17
18
|
multiple?: boolean;
|
|
18
19
|
displayValues: DisplayValueType[];
|
|
@@ -163,6 +163,7 @@ var SelectInput = /* @__PURE__ */ defineComponent((props, { attrs, expose, slots
|
|
|
163
163
|
isVueRenderable(clearIcon.value) && createVNode("button", {
|
|
164
164
|
"type": "button",
|
|
165
165
|
"aria-label": clearLabel.value,
|
|
166
|
+
"tabindex": props.clearTabIndex,
|
|
166
167
|
"class": clsx(`${prefixCls.value}-clear`, classNamesConfig.value?.clear),
|
|
167
168
|
"style": stylesConfig.value?.clear,
|
|
168
169
|
"onMousedown": (e) => {
|
|
@@ -225,6 +226,11 @@ var SelectInput = /* @__PURE__ */ defineComponent((props, { attrs, expose, slots
|
|
|
225
226
|
required: false,
|
|
226
227
|
default: void 0
|
|
227
228
|
},
|
|
229
|
+
clearTabIndex: {
|
|
230
|
+
type: Number,
|
|
231
|
+
required: false,
|
|
232
|
+
default: void 0
|
|
233
|
+
},
|
|
228
234
|
removeIcon: {
|
|
229
235
|
type: [
|
|
230
236
|
Object,
|
package/dist/SelectTrigger.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AlignType, BuildInPlacements } from '@v-c/trigger';
|
|
2
2
|
import { CSSProperties } from 'vue';
|
|
3
|
-
import { Placement, RenderDOMFunc } from './interface.
|
|
3
|
+
import { Placement, RenderDOMFunc } from './interface.js';
|
|
4
4
|
export interface SelectTriggerProps {
|
|
5
5
|
prefixCls: string;
|
|
6
6
|
disabled: boolean;
|
package/dist/TransBtn.d.ts
CHANGED
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
export { useAllowClear } from './useAllowClear';
|
|
2
|
-
export
|
|
3
|
-
export {
|
|
4
|
-
export
|
|
5
|
-
export { default as
|
|
6
|
-
export {
|
|
7
|
-
export
|
|
8
|
-
export { default as
|
|
9
|
-
export { default as
|
|
10
|
-
export {
|
|
11
|
-
export
|
|
12
|
-
export {
|
|
13
|
-
export
|
|
14
|
-
export { default as
|
|
15
|
-
export {
|
|
16
|
-
export
|
|
17
|
-
export { default as useSelectTriggerControl } from './useSelectTriggerControl';
|
|
1
|
+
export { useAllowClear } from './useAllowClear.js';
|
|
2
|
+
export { default as useBaseProps, useBaseSelectProvider } from './useBaseProps.js';
|
|
3
|
+
export type { BaseSelectContextProps } from './useBaseProps.js';
|
|
4
|
+
export { default as useCache } from './useCache.js';
|
|
5
|
+
export { default as useComponents } from './useComponents.js';
|
|
6
|
+
export type { ComponentsConfig } from './useComponents.js';
|
|
7
|
+
export { default as useFilterOptions } from './useFilterOptions.js';
|
|
8
|
+
export { default as useLock } from './useLock.js';
|
|
9
|
+
export { default as useOpen } from './useOpen.js';
|
|
10
|
+
export type { TriggerOpenType } from './useOpen.js';
|
|
11
|
+
export { default as useOptions } from './useOptions.js';
|
|
12
|
+
export type { OptionsResult } from './useOptions.js';
|
|
13
|
+
export { default as useRefFunc } from './useRefFunc.js';
|
|
14
|
+
export { default as useSearchConfig } from './useSearchConfig.js';
|
|
15
|
+
export type { SearchConfigResult } from './useSearchConfig.js';
|
|
16
|
+
export { default as useSelectTriggerControl } from './useSelectTriggerControl.js';
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
+
import { AllowClearConfig } from '@v-c/util';
|
|
1
2
|
import { Ref } from 'vue';
|
|
2
|
-
import { DisplayValueType, Mode } from '../interface.
|
|
3
|
-
|
|
3
|
+
import { DisplayValueType, Mode } from '../interface.js';
|
|
4
|
+
interface ClearInfo extends AllowClearConfig {
|
|
4
5
|
allowClear: boolean;
|
|
5
6
|
clearIcon: any;
|
|
6
7
|
label: string;
|
|
7
8
|
}
|
|
8
|
-
export declare function useAllowClear(_prefixCls: Ref<string>, displayValues: Ref<DisplayValueType[]>, allowClear?: Ref<boolean |
|
|
9
|
-
|
|
10
|
-
label?: string;
|
|
11
|
-
}>, clearIcon?: Ref<any>, disabled?: Ref<boolean>, mergedSearchValue?: Ref<string | undefined>, mode?: Ref<Mode | undefined>): import('vue').ComputedRef<AllowClearConfig>;
|
|
9
|
+
export declare function useAllowClear(_prefixCls: Ref<string>, displayValues: Ref<DisplayValueType[]>, allowClear?: Ref<boolean | AllowClearConfig | undefined>, clearIcon?: Ref<any>, disabled?: Ref<boolean>, mergedSearchValue?: Ref<string | undefined>, mode?: Ref<Mode | undefined>): import('vue').ComputedRef<ClearInfo>;
|
|
10
|
+
export {};
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import { computed } from "vue";
|
|
2
|
-
import { isVueRenderable } from "@v-c/util";
|
|
2
|
+
import { isVueRenderable, useAllowClear as useAllowClear$1 } from "@v-c/util";
|
|
3
3
|
//#region src/hooks/useAllowClear.tsx
|
|
4
4
|
function useAllowClear(_prefixCls, displayValues, allowClear, clearIcon, disabled, mergedSearchValue, mode) {
|
|
5
|
-
const allowClearConfig =
|
|
6
|
-
if (typeof allowClear?.value === "boolean") return { allowClear: allowClear.value };
|
|
7
|
-
if (allowClear?.value && typeof allowClear.value === "object") return allowClear.value;
|
|
8
|
-
return { allowClear: false };
|
|
9
|
-
});
|
|
5
|
+
const allowClearConfig = useAllowClear$1(() => allowClear?.value);
|
|
10
6
|
return computed(() => {
|
|
11
|
-
const mergedAllowClear = !disabled?.value && allowClearConfig.value
|
|
7
|
+
const mergedAllowClear = !disabled?.value && !allowClearConfig.value.disabled && (displayValues.value.length || mergedSearchValue?.value) && !(mode?.value === "combobox" && mergedSearchValue?.value === "");
|
|
12
8
|
return {
|
|
9
|
+
...allowClearConfig.value,
|
|
13
10
|
allowClear: !!mergedAllowClear,
|
|
14
11
|
clearIcon: mergedAllowClear ? isVueRenderable(allowClearConfig.value.clearIcon) ? allowClearConfig.value.clearIcon : isVueRenderable(clearIcon?.value) ? clearIcon?.value : "×" : null,
|
|
15
12
|
label: mergedAllowClear ? allowClearConfig.value.label ?? "Clear" : ""
|
package/dist/hooks/useCache.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
|
-
import { RawValueType } from '../interface';
|
|
3
|
-
import { DefaultOptionType, LabelInValueType } from '../Select';
|
|
2
|
+
import { RawValueType } from '../interface.js';
|
|
3
|
+
import { DefaultOptionType, LabelInValueType } from '../Select.js';
|
|
4
4
|
/**
|
|
5
5
|
* Cache `value` related LabeledValue & options.
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VueNode } from '@v-c/util/dist/type';
|
|
2
2
|
import { Ref } from 'vue';
|
|
3
|
-
import { BaseSelectProps } from '../BaseSelect';
|
|
3
|
+
import { BaseSelectProps } from '../BaseSelect/index.js';
|
|
4
4
|
export interface ComponentsConfig {
|
|
5
5
|
root?: VueNode | string | any;
|
|
6
6
|
input?: VueNode | string | any;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
|
-
import { DefaultOptionType, FieldNames, SelectProps } from '../Select';
|
|
2
|
+
import { DefaultOptionType, FieldNames, SelectProps } from '../Select.js';
|
|
3
3
|
export default function useFilterOptions(options: Ref<DefaultOptionType[]>, fieldNames: Ref<FieldNames>, searchValue: Ref<string | undefined>, filterOption: Ref<SelectProps['filterOption']>, optionFilterProp: Ref<string[] | undefined>): import('vue').ComputedRef<DefaultOptionType[]>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VueNode } from '@v-c/util/dist/type';
|
|
2
2
|
import { Ref, ShallowRef } from 'vue';
|
|
3
|
-
import { RawValueType } from '../interface';
|
|
4
|
-
import { DefaultOptionType, FieldNames } from '../Select';
|
|
3
|
+
import { RawValueType } from '../interface.js';
|
|
4
|
+
import { DefaultOptionType, FieldNames } from '../Select.js';
|
|
5
5
|
export interface OptionsResult<OptionType> {
|
|
6
6
|
options: OptionType[];
|
|
7
7
|
valueOptions: Map<RawValueType, OptionType>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
|
-
import { SearchConfig, SelectProps } from '../Select';
|
|
2
|
+
import { SearchConfig, SelectProps } from '../Select.js';
|
|
3
3
|
export type SearchConfigResult = [Ref<boolean | undefined>, Ref<SearchConfig>];
|
|
4
4
|
export default function useSearchConfig(showSearch: Ref<boolean | SearchConfig | undefined>, props: {
|
|
5
5
|
filterOption?: Ref<SelectProps['filterOption']>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
|
-
import { TriggerOpenType } from './useOpen';
|
|
2
|
+
import { TriggerOpenType } from './useOpen.js';
|
|
3
3
|
export declare function isInside(elements: (HTMLElement | SVGElement | undefined)[], target: HTMLElement): boolean;
|
|
4
4
|
export default function useSelectTriggerControl(elements: () => (HTMLElement | SVGElement | undefined)[], open: Ref<boolean>, triggerOpen: TriggerOpenType, customizedTrigger: Ref<boolean>): void;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { BaseSelectProps, BaseSelectPropsWithoutPrivate, BaseSelectRef, BaseSelectSemanticName, CustomTagProps, RefOptionListProps, BaseSelect } from './BaseSelect';
|
|
2
|
-
import { DisplayInfoType, DisplayValueType, FlattenOptionData, Mode, Placement, RawValueType, RenderNode } from './interface';
|
|
3
|
-
import { BaseOptionType, DefaultOptionType, DraftValueType, FieldNames, FilterFunc, LabelInValueType, OnActiveValue, OnInternalSelect, SearchConfig, SelectHandler, SelectProps, default as Select } from './Select';
|
|
4
|
-
import { useBaseProps } from './hooks';
|
|
5
|
-
import { default as OptGroup } from './OptGroup';
|
|
6
|
-
import { default as Option } from './Option';
|
|
7
|
-
import { default as OptionList } from './OptionList';
|
|
8
|
-
import { useSelectContext, useSelectProvider } from './SelectContext';
|
|
1
|
+
import { BaseSelectProps, BaseSelectPropsWithoutPrivate, BaseSelectRef, BaseSelectSemanticName, CustomTagProps, RefOptionListProps, BaseSelect } from './BaseSelect/index.js';
|
|
2
|
+
import { DisplayInfoType, DisplayValueType, FlattenOptionData, Mode, Placement, RawValueType, RenderNode } from './interface.js';
|
|
3
|
+
import { BaseOptionType, DefaultOptionType, DraftValueType, FieldNames, FilterFunc, LabelInValueType, OnActiveValue, OnInternalSelect, SearchConfig, SelectHandler, SelectProps, default as Select } from './Select.js';
|
|
4
|
+
import { useBaseProps } from './hooks/index.js';
|
|
5
|
+
import { default as OptGroup } from './OptGroup.js';
|
|
6
|
+
import { default as Option } from './Option.js';
|
|
7
|
+
import { default as OptionList } from './OptionList.js';
|
|
8
|
+
import { useSelectContext, useSelectProvider } from './SelectContext.js';
|
|
9
9
|
export { BaseSelect, OptGroup, Option, OptionList, Select, useBaseProps, useSelectContext, useSelectProvider, };
|
|
10
10
|
export type { BaseOptionType, BaseSelectProps, BaseSelectPropsWithoutPrivate, BaseSelectRef, BaseSelectSemanticName, CustomTagProps, DefaultOptionType, DisplayInfoType, DisplayValueType, DraftValueType, FieldNames, FilterFunc, FlattenOptionData, LabelInValueType, Mode, OnActiveValue, OnInternalSelect, Placement, RawValueType, RefOptionListProps, RenderNode, SearchConfig, SelectHandler, SelectProps, };
|
|
11
11
|
export default Select;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VueNode } from '@v-c/util/dist/type';
|
|
2
|
-
import { DisplayValueType } from '../interface';
|
|
2
|
+
import { DisplayValueType } from '../interface.js';
|
|
3
3
|
export declare function toArray<T>(value: T | T[] | null | undefined): T[];
|
|
4
4
|
export declare function injectPropsWithOption(option: any): any;
|
|
5
5
|
export declare function toVueNode(value: VueNode | VueNode[]): VueNode[];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { VNode } from 'vue';
|
|
2
|
-
import { BaseOptionType, DefaultOptionType } from '../Select';
|
|
2
|
+
import { BaseOptionType, DefaultOptionType } from '../Select.js';
|
|
3
3
|
export declare function convertChildrenToData<OptionType extends BaseOptionType = DefaultOptionType>(nodes: VNode[], optionOnly?: boolean): OptionType[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FlattenOptionData } from '../interface';
|
|
2
|
-
import { BaseOptionType, DefaultOptionType, FieldNames } from '../Select';
|
|
1
|
+
import { FlattenOptionData } from '../interface.js';
|
|
2
|
+
import { BaseOptionType, DefaultOptionType, FieldNames } from '../Select.js';
|
|
3
3
|
export declare function isValidCount(value?: number): boolean;
|
|
4
4
|
export declare function fillFieldNames(fieldNames: FieldNames | undefined, childrenAsData: boolean): Required<FieldNames>;
|
|
5
5
|
/**
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@v-c/select",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.3.1",
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "",
|
|
7
7
|
"license": "MIT",
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
"vue": "^3.0.0"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@v-c/overflow": "^1.1.
|
|
38
|
-
"@v-c/trigger": "^1.1.
|
|
39
|
-
"@v-c/
|
|
40
|
-
"@v-c/
|
|
37
|
+
"@v-c/overflow": "^1.1.3",
|
|
38
|
+
"@v-c/trigger": "^1.1.7",
|
|
39
|
+
"@v-c/util": "^1.4.2",
|
|
40
|
+
"@v-c/virtual-list": "^1.1.6"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"build": "vite build",
|