@v-c/select 1.3.0 → 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.
@@ -1,4 +1,4 @@
1
- import { DisplayValueType } from '../interface';
1
+ import { DisplayValueType } from '../interface.js';
2
2
  export interface PoliteProps {
3
3
  visible: boolean;
4
4
  values: DisplayValueType[];
@@ -3,8 +3,8 @@ import { AllowClearConfig } from '@v-c/util';
3
3
  import { VueNode } from '@v-c/util/dist/type';
4
4
  import { ScrollConfig, ScrollTo } from '@v-c/virtual-list';
5
5
  import { CSSProperties, StyleValue } from 'vue';
6
- import { ComponentsConfig } from '../hooks';
7
- 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';
8
8
  export type BaseSelectSemanticName = 'prefix' | 'suffix' | 'input' | 'clear' | 'placeholder' | 'content' | 'item' | 'itemContent' | 'itemRemove';
9
9
  /**
10
10
  * ZombieJ:
@@ -1,5 +1,5 @@
1
1
  import { FunctionalComponent } from 'vue';
2
- import { DefaultOptionType } from './Select.tsx';
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.tsx';
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;
@@ -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;
@@ -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.ts';
3
+ import { Placement, RenderDOMFunc } from './interface.js';
4
4
  export interface SelectTriggerProps {
5
5
  prefixCls: string;
6
6
  disabled: boolean;
@@ -1,5 +1,5 @@
1
1
  import { CSSProperties } from 'vue';
2
- import { RenderNode } from './interface.ts';
2
+ import { RenderNode } from './interface.js';
3
3
  export interface TransBtnProps {
4
4
  className: string;
5
5
  style?: CSSProperties;
@@ -1,16 +1,16 @@
1
- export { useAllowClear } from './useAllowClear';
2
- export { default as useBaseProps, useBaseSelectProvider } from './useBaseProps';
3
- export type { BaseSelectContextProps } from './useBaseProps';
4
- export { default as useCache } from './useCache';
5
- export { default as useComponents } from './useComponents';
6
- export type { ComponentsConfig } from './useComponents';
7
- export { default as useFilterOptions } from './useFilterOptions';
8
- export { default as useLock } from './useLock';
9
- export { default as useOpen } from './useOpen';
10
- export type { TriggerOpenType } from './useOpen';
11
- export { default as useOptions } from './useOptions';
12
- export type { OptionsResult } from './useOptions';
13
- export { default as useRefFunc } from './useRefFunc';
14
- export { default as useSearchConfig } from './useSearchConfig';
15
- export type { SearchConfigResult } from './useSearchConfig';
16
- 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,6 +1,6 @@
1
1
  import { AllowClearConfig } from '@v-c/util';
2
2
  import { Ref } from 'vue';
3
- import { DisplayValueType, Mode } from '../interface.ts';
3
+ import { DisplayValueType, Mode } from '../interface.js';
4
4
  interface ClearInfo extends AllowClearConfig {
5
5
  allowClear: boolean;
6
6
  clearIcon: any;
@@ -1,5 +1,5 @@
1
1
  import { Ref } from 'vue';
2
- import { BaseSelectProps } from '../BaseSelect';
2
+ import { BaseSelectProps } from '../BaseSelect/index.js';
3
3
  export interface BaseSelectContextProps extends BaseSelectProps {
4
4
  triggerOpen: boolean;
5
5
  multiple: boolean;
@@ -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.3.0",
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.2",
38
- "@v-c/trigger": "^1.1.6",
39
- "@v-c/virtual-list": "^1.1.4",
40
- "@v-c/util": "^1.4.0"
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",