@true-engineering/true-react-common-ui-kit 4.0.0-alpha24 → 4.0.0-alpha26

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.
@@ -30,4 +30,4 @@ export interface IFlexibleTableProps<Row extends ITableRow, HeaderContent extend
30
30
  /** @default false */
31
31
  isExpandableRowComponentInitiallyOpen?: boolean | ((row: Row, index: number) => boolean);
32
32
  }
33
- export declare function FlexibleTable<Row extends ITableRow, HeaderContent extends IHeaderContent<Row> = IHeaderContent<Row>, UniqueField extends keyof Row = keyof Row>({ content, headerContent, config, enabledColumns, activeRows, uniqueField, isLoading, isFirstColumnSticky, isHorizontallyScrollable, isRowFocusable, infinityScrollConfig, renderMode, refForScroll, nothingFoundContent, data, testId, tweakStyles, shouldRenderHeader, onHeadClick, isExpandableRowComponentInitiallyOpen: isRowInitiallyOpen, ...restProps }: IFlexibleTableProps<Row, HeaderContent, UniqueField>): JSX.Element;
33
+ export declare function FlexibleTable<Row extends ITableRow, HeaderContent extends IHeaderContent<Row> = IHeaderContent<Row>, UniqueField extends keyof Row = keyof Row>({ content, headerContent, config, enabledColumns, activeRows, uniqueField, isLoading, isFirstColumnSticky, isHorizontallyScrollable, isRowFocusable, infinityScrollConfig: infinityScrollConfigDeprecated, renderMode, refForScroll, nothingFoundContent, data, testId, tweakStyles, shouldRenderHeader, onHeadClick, isExpandableRowComponentInitiallyOpen: isRowInitiallyOpen, ...restProps }: IFlexibleTableProps<Row, HeaderContent, UniqueField>): JSX.Element;
@@ -44,11 +44,19 @@ export type IFlexibleTableConfigType<Values extends ITableRow, HeaderContent ext
44
44
  [Key in keyof Values]?: IFlexibleTableRowConfig<Values, Key, HeaderContent>;
45
45
  };
46
46
  export interface IInfinityScrollConfig {
47
- activePage: number;
48
- totalPages: number;
47
+ isEnabled?: boolean;
49
48
  isLoading: boolean;
50
- isLastPage: boolean;
51
- onInfinityScroll: (skip: number) => void;
49
+ onInfinityScroll: {
50
+ (_: never): void;
51
+ /** @deprecated use activePage directly */
52
+ (skip: number): void;
53
+ };
54
+ /** @deprecated use activePage in onInfinityScroll */
55
+ activePage?: number;
56
+ /** @deprecated use isEnabled */
57
+ isLastPage?: boolean;
58
+ /** @deprecated use isEnabled */
59
+ totalPages?: number;
52
60
  }
53
61
  export interface INestedComponent<T extends PropertyKey = string> {
54
62
  isOpen: boolean;
@@ -6,3 +6,4 @@ export * from './use-did-mount-effect';
6
6
  export * from './use-mixed-styles';
7
7
  export * from './use-merged-refs';
8
8
  export * from './use-merge';
9
+ export * from './use-intersection-ref';
@@ -0,0 +1,8 @@
1
+ import { RefCallback } from 'react';
2
+ export interface IInsertionRefOptions {
3
+ /** @default false */
4
+ isDisabled?: boolean;
5
+ onIntersection?: VoidFunction;
6
+ onIntersectionEnd?: VoidFunction;
7
+ }
8
+ export declare const useIntersectionRef: (options?: IInsertionRefOptions) => RefCallback<Element>;