indicator-ui 1.0.25 → 1.0.26

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.
@@ -5,6 +5,7 @@ import { useSearching } from './useSearching';
5
5
  import { useOptionsManagement } from './useOptionsManagement';
6
6
  import { useValueBuffer } from './useValueBuffer';
7
7
  type PropsType<D, M extends boolean> = Pick<ReturnType<typeof useModalServices>, 'isShow'> & Pick<ReturnType<typeof useSearching<D, M>>, 'searchString' | 'canSearch'> & Pick<ReturnType<typeof useOptionsManagement<D, M>>, 'options'> & Pick<ReturnType<typeof useValueBuffer<D, M>>, 'bufValueOptions'> & Pick<FieldPropsType<ValueType<D, M>>, 'value' | 'onChange' | 'onUpdate'> & {
8
+ maxCount?: number;
8
9
  multiple: M;
9
10
  };
10
11
  export declare function useComponentProps<D, M extends boolean>(props: PropsType<D, M>): {
@@ -5,10 +5,12 @@ import { ValueType } from '../types';
5
5
  import { useOptionsManagement } from './useOptionsManagement';
6
6
  import { useSearching } from './useSearching';
7
7
  import { usePagination } from './usePagination';
8
+ import { useComponentProps } from './useComponentProps';
8
9
  type OptionsManagementProps<D, M extends boolean> = Parameters<typeof useOptionsManagement<D, M>>[number];
9
10
  type SearchingProps<D, M extends boolean> = Parameters<typeof useSearching<D, M>>[number];
10
11
  type PaginationProps<D, M extends boolean> = Parameters<typeof usePagination<D, M>>[number];
11
- type PropsType<D, M extends boolean> = Pick<React.ComponentProps<typeof FormField>, 'button' | 'help' | 'textSupport' | 'icon' | 'userPic'> & FieldPropsType<ValueType<D, M>> & Pick<OptionsManagementProps<D, M>, 'options'> & Pick<SearchingProps<D, M>, 'search'> & Pick<PaginationProps<D, M>, 'paginate'> & {
12
+ type ComponentProps<D, M extends boolean> = Parameters<typeof useComponentProps<D, M>>[number];
13
+ type PropsType<D, M extends boolean> = Pick<React.ComponentProps<typeof FormField>, 'button' | 'help' | 'textSupport' | 'icon' | 'userPic'> & FieldPropsType<ValueType<D, M>> & Pick<OptionsManagementProps<D, M>, 'options'> & Pick<SearchingProps<D, M>, 'search'> & Pick<PaginationProps<D, M>, 'paginate'> & Pick<ComponentProps<D, M>, 'maxCount'> & {
12
14
  multiple?: M;
13
15
  disabled?: boolean;
14
16
  };
@@ -6,6 +6,7 @@ export declare function getExtendOptions<D>(curOptions: OptionsType<D>, cache?:
6
6
  export declare function getExtendValue<D, M extends boolean = false>(curValue: ValueType<D, M> | undefined | null, multiple: M): D[];
7
7
  export declare function assertInputField(instance: HTMLDivElement | null | undefined): asserts instance is HTMLDivElement;
8
8
  export declare function hasOptionsItemInValue<D, M extends boolean>(item: OptionsItemType<D>, value: ValueType<D, M> | null | undefined, multiple: M): D | undefined;
9
+ export declare function getUniqOptions<D>(options: OptionsType<D>): import('../types').OptionsExtendItemType<D>[];
9
10
  export declare function filterOptionsByValue<D, M extends boolean>(options: OptionsType<D>, value: ValueType<D, M> | null | undefined, multiple: M): import('../types').OptionsExtendItemType<D>[];
10
11
  export declare function removeValue<D>(item: D, extendValue: D[]): D[];
11
- export declare function getResultValue<D, M extends boolean>(extendValue: D[], multiple: M): ValueType<D, M>;
12
+ export declare function getResultValue<D, M extends boolean>(extendValue: D[], multiple: M, maxCount: number | undefined): ValueType<D, M>;
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "react-components",
12
12
  "ui-kit"
13
13
  ],
14
- "version": "1.0.25",
14
+ "version": "1.0.26",
15
15
  "exports": {
16
16
  ".": {
17
17
  "types": "./dist/types/index.d.ts",