@ceed/ads 1.28.1 → 1.29.0

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,9 +1,9 @@
1
1
  import React, { ReactNode } from 'react';
2
2
  import type { ObjectLike, ColumnDef, Sort } from './types';
3
- export declare const TextEllipsis: ({ children, lineClamp }: {
3
+ export declare const TextEllipsis: ({ children, lineClamp, ...rest }: {
4
4
  children: ReactNode;
5
5
  lineClamp?: number | undefined;
6
- }) => React.JSX.Element;
6
+ } & React.HTMLAttributes<HTMLDivElement>) => React.JSX.Element;
7
7
  export declare const CellTextEllipsis: ({ children }: {
8
8
  children: ReactNode;
9
9
  }) => React.JSX.Element;
@@ -18,6 +18,7 @@ export declare const HeadCell: <T extends ObjectLike, GetId>(props: ColumnDef<T,
18
18
  currentSort?: Sort | undefined;
19
19
  }) => void) | undefined;
20
20
  sortOrder: Sort[];
21
+ onAutoFit?: ((field: keyof T) => void) | undefined;
21
22
  }) => React.JSX.Element;
22
23
  export declare const BodyCell: <T extends Record<string, any>, ID>(props: {
23
24
  tableId: string;
@@ -23,6 +23,7 @@ export declare function useDataTableRenderer<T extends Record<PropertyKey, unkno
23
23
  currentSort?: Sort | undefined;
24
24
  }) => void) | undefined;
25
25
  sortOrder: Sort[];
26
+ onAutoFit?: ((field: keyof T_1) => void) | undefined;
26
27
  }) => import("react").JSX.Element;
27
28
  BodyRow: <T_2 extends Record<string, any>, ID>(props: {
28
29
  tableId: string;
@@ -38,6 +39,7 @@ export declare function useDataTableRenderer<T extends Record<PropertyKey, unkno
38
39
  multiple: boolean;
39
40
  currentSort?: Sort | undefined;
40
41
  }) => void;
42
+ handleAutoFit: (field: keyof T) => void;
41
43
  isAllSelected: boolean;
42
44
  isTotalSelected: boolean;
43
45
  isSelectedRow: (model: InferredIdType<T, GetId>) => boolean;
@@ -281,4 +281,4 @@ export declare const MotionSortIcon: import("framer-motion").CustomDomComponent<
281
281
  }, "style" | "children" | "color" | "fontSize" | "shapeRendering" | "className" | "sx" | "viewBox" | "classes" | "htmlColor" | "inheritViewBox" | "titleAccess">>;
282
282
  export declare const DefaultLoadingOverlay: () => React.JSX.Element;
283
283
  export declare const DefaultNoRowsOverlay: () => React.JSX.Element;
284
- export declare const Resizer: (ref: RefObject<HTMLTableCellElement>, targetRef?: RefObject<any>, onResizeStateChange?: ((isResizing: boolean) => void) | undefined) => React.JSX.Element;
284
+ export declare const Resizer: (ref: RefObject<HTMLTableCellElement>, targetRef?: RefObject<any>, onResizeStateChange?: ((isResizing: boolean) => void) | undefined, onAutoFit?: () => void) => React.JSX.Element;
@@ -14,3 +14,8 @@ export declare function getTextAlign(props: {
14
14
  type?: string;
15
15
  }): "end" | "start";
16
16
  export declare const numberFormatter: (value: number) => string | number;
17
+ export declare function computeAutoFitWidth(params: {
18
+ headerEl: HTMLTableCellElement;
19
+ field: string;
20
+ dataInPage: Record<string, unknown>[];
21
+ }): number | null;