gantri-components 2.90.0-beta.1 → 2.90.0-beta.2
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.
- package/dist/components/table/components/table-actions-wrapper/table-actions-wrapper.styles.d.ts +4 -0
- package/dist/components/table/components/table-actions-wrapper/table-actions-wrapper.types.d.ts +1 -1
- package/dist/components/table/hooks/use-selectable-table-rows/components/clear-selected-rows/clear-selected-rows.d.ts +1 -0
- package/dist/components/table/index.d.ts +1 -1
- package/dist/components/table/table.context.d.ts +11 -2
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/components/table/components/table-actions-wrapper/table-actions-wrapper.styles.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const StyledBottomActionsFlex: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../../flex/flex.types").FlexProps & import("react").RefAttributes<import("../../../flex/flex.types").FlexProps>>, import("styled-components").DefaultTheme, {
|
|
3
|
+
showClearSelectedRows: boolean;
|
|
4
|
+
}, never>;
|
package/dist/components/table/components/table-actions-wrapper/table-actions-wrapper.types.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export interface CustomActionComponentProps<TData extends RowData> {
|
|
|
18
18
|
}
|
|
19
19
|
export interface CustomActionProps<TData extends RowData> {
|
|
20
20
|
Component: JSXElementConstructor<CustomActionComponentProps<TData>>;
|
|
21
|
-
position: 'left' | 'right' | 'bottom';
|
|
21
|
+
position: 'left' | 'right' | 'bottom' | 'selected-rows';
|
|
22
22
|
}
|
|
23
23
|
export interface TableActionsWrapperProps<TData extends RowData> {
|
|
24
24
|
className: string | undefined;
|
|
@@ -3,4 +3,4 @@ export * from './table.providers';
|
|
|
3
3
|
export * from './table.types';
|
|
4
4
|
export * from './components/table-row/table-row.constants';
|
|
5
5
|
export * from './components/table-actions-wrapper/table-actions-wrapper.types';
|
|
6
|
-
export { useRowSelectionContext } from './table.context';
|
|
6
|
+
export { useTableContext as useRowSelectionContext } from './table.context';
|
|
@@ -1,12 +1,21 @@
|
|
|
1
|
-
import { RowSelectionState } from '@tanstack/react-table';
|
|
1
|
+
import { RowData, RowSelectionState } from '@tanstack/react-table';
|
|
2
2
|
import React, { PropsWithChildren } from 'react';
|
|
3
3
|
export declare const RowSelectionProviders: ({ children, }: PropsWithChildren<Record<never, never>>) => JSX.Element;
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const useTableContext: () => {
|
|
5
5
|
clearSelectedRows: () => void;
|
|
6
|
+
/** Can be used to deselect rows outside of the default behavior. */
|
|
7
|
+
deselectRows: (rowIds: (string | number)[]) => void;
|
|
8
|
+
getIsRowSelected: (rowId: number | string) => boolean;
|
|
9
|
+
getSelectedRowData: <TData extends RowData<import("./table.types").CustomTData>>(props: {
|
|
10
|
+
idProperty: keyof TData;
|
|
11
|
+
records: TData[];
|
|
12
|
+
}) => (TData | undefined)[];
|
|
6
13
|
isRowSelectionCheckboxes: boolean;
|
|
7
14
|
isRowSelectionDisabled: boolean;
|
|
8
15
|
lastSelectedId: string;
|
|
9
16
|
rowSelectionState: RowSelectionState;
|
|
17
|
+
/** Can be used to select rows outside of the default behavior. */
|
|
18
|
+
selectRows: (rowIds: (string | number)[]) => void;
|
|
10
19
|
setIsRowSelectionCheckboxes: React.Dispatch<React.SetStateAction<boolean>>;
|
|
11
20
|
setIsRowSelectionDisabled: React.Dispatch<React.SetStateAction<boolean>>;
|
|
12
21
|
setLastSelectedId: React.Dispatch<React.SetStateAction<string>>;
|