indicator-ui 1.0.18 → 1.0.20

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.
@@ -8,7 +8,9 @@ type PropsType<T, Form> = [
8
8
  scheme?: FormSchemeType<T>;
9
9
  onSubmit?: (data: Form, event: FormEvent<HTMLFormElement>) => void | Promise<void>;
10
10
  /** Callback при ошибки валидации полей */
11
- onSubmitError?: () => void;
11
+ onSubmitError?: (event: {
12
+ errors: FormErrorsType<T>;
13
+ }) => void;
12
14
  }
13
15
  ];
14
16
  /**
@@ -1,4 +1,5 @@
1
1
  import { default as React, FocusEvent } from 'react';
2
+ import { FormFieldBase } from '../../..';
2
3
  import { FieldPropsType } from '../../../../hooks';
3
4
  import { Merge } from '../../../../types';
4
5
  import { FetchEventPropsType, OptionsType, ValueType } from '../types';
@@ -12,7 +13,8 @@ type BasePropsType<D, M extends boolean> = FieldPropsType<ValueType<D, M>> & {
12
13
  /** Добавляет `options` к текущим */
13
14
  paginate?: (props: FetchEventPropsType<D>) => Promise<OptionsType<D>>;
14
15
  };
15
- type PropsType<D, M extends boolean = false> = Merge<React.ComponentProps<'div'>, BasePropsType<D, M>>;
16
+ type AdditionProps = React.ComponentProps<'div'> & Pick<React.ComponentProps<typeof FormFieldBase>, 'button' | 'help' | 'icon' | 'userPic' | 'textSupport'>;
17
+ type PropsType<D, M extends boolean = false> = Merge<AdditionProps, BasePropsType<D, M>>;
16
18
  export declare function useFormPaginatedSelectField<D, M extends boolean = false>(props: PropsType<D, M>): {
17
19
  handleFocus: (event: FocusEvent<HTMLDivElement>) => void;
18
20
  handleBlur: (event: FocusEvent<HTMLDivElement>) => void;
@@ -42,6 +44,7 @@ export declare function useFormPaginatedSelectField<D, M extends boolean = false
42
44
  targetRef: React.MutableRefObject<HTMLDivElement | null>;
43
45
  otherProps: {
44
46
  ref?: React.LegacyRef<HTMLDivElement> | undefined;
47
+ button?: React.ReactNode;
45
48
  slot?: string | undefined | undefined;
46
49
  style?: React.CSSProperties | undefined;
47
50
  title?: string | undefined | undefined;
@@ -305,6 +308,10 @@ export declare function useFormPaginatedSelectField<D, M extends boolean = false
305
308
  is?: string | undefined | undefined;
306
309
  exportparts?: string | undefined | undefined;
307
310
  part?: string | undefined | undefined;
311
+ icon?: React.ReactNode;
312
+ textSupport?: React.ReactNode;
313
+ userPic?: React.ReactNode;
314
+ help?: React.ReactNode;
308
315
  error?: import('../../../../hooks').FormErrorType;
309
316
  };
310
317
  };
@@ -1,5 +1,6 @@
1
1
  import { OptionsExtendItemType, OptionsType, ValueType } from '../types';
2
2
  export declare function compValue(a: any, b: any): boolean;
3
+ export declare function mergeOptions<D>(a: OptionsType<D>, b: OptionsType<D>): OptionsType<D>;
3
4
  export declare function getExtendOptions<D>(curOptions: OptionsType<D>, cache?: OptionsType<D>): OptionsExtendItemType<D>[];
4
5
  export declare function getExtendOptionLabel<D>(curOption: OptionsExtendItemType<D>): string | number | true | import('react').ReactElement<any, string | import('react').JSXElementConstructor<any>> | Iterable<import('react').ReactNode>;
5
6
  export declare function getExtendValue<D, M extends boolean = false>(curValue: ValueType<D, M> | undefined | null, multiple: M): D[];
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "react-components",
12
12
  "ui-kit"
13
13
  ],
14
- "version": "1.0.18",
14
+ "version": "1.0.20",
15
15
  "exports": {
16
16
  ".": {
17
17
  "types": "./dist/types/index.d.ts",