gantri-components 2.43.0-beta.8 → 3.0.0-beta.1
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/search-field/search-field.styles.d.ts +2 -2
- package/dist/components/table/components/custom-columns-wrapper/custom-columns-wrapper.styles.d.ts +0 -1
- package/dist/components/table/components/custom-columns-wrapper/custom-columns-wrapper.types.d.ts +1 -0
- package/dist/components/table/components/index.d.ts +0 -1
- package/dist/components/table/components/table-actions-wrapper/components/sort/sort.types.d.ts +4 -4
- package/dist/components/table/components/table-actions-wrapper/table-actions-wrapper.types.d.ts +4 -5
- package/dist/components/table/components/table-header/table-header.styles.d.ts +1 -2
- package/dist/components/table/components/table-header/table-header.types.d.ts +3 -2
- package/dist/components/table/components/table-row/table-row.types.d.ts +3 -2
- package/dist/components/table/components/table-row-cells/table-row-cells.types.d.ts +1 -1
- package/dist/components/table/hooks/useTrackStickyCells.d.ts +0 -1
- package/dist/components/table/index.d.ts +0 -1
- package/dist/components/table/table.d.ts +1 -4
- package/dist/components/table/table.styles.d.ts +1 -0
- package/dist/components/table/table.types.d.ts +6 -14
- package/dist/components/text-field/text-field.types.d.ts +3 -3
- package/dist/helpers/mark-sticky-elements/helpers/get-intersection-observer-callback/get-intersection-observer-callback.types.d.ts +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/setupTests.d.ts +1 -0
- package/package.json +9 -2
- package/dist/components/icon/generated/ui-control/ExlamationCircleFilled.d.ts +0 -3
- package/dist/components/icon/generated/ui-control/ExlamationCircleFilled24.d.ts +0 -3
- package/dist/components/paging/__tests__/paging.test.d.ts +0 -1
- package/dist/components/paging/index.d.ts +0 -1
- package/dist/components/paging/paging.d.ts +0 -5
- package/dist/components/paging/paging.presets.d.ts +0 -2
- package/dist/components/paging/paging.styles.d.ts +0 -3
- package/dist/components/paging/paging.types.d.ts +0 -13
- package/dist/components/table/components/cell-reorder-wrapper/cell-reorder-wrapper.d.ts +0 -8
- package/dist/components/table/components/cell-reorder-wrapper/cell-reorder-wrapper.types.d.ts +0 -10
- package/dist/components/table/components/cell-reorder-wrapper/index.d.ts +0 -1
- package/dist/components/table/components/table-actions-wrapper/components/sort/helpers/get-sort-mapping/get-sort-mapping.d.ts +0 -3
- package/dist/components/table/components/table-actions-wrapper/components/sort/helpers/get-sort-mapping/get-sort-mapping.types.d.ts +0 -2
- package/dist/components/table/components/table-actions-wrapper/components/sort/helpers/get-sort-mapping/index.d.ts +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const StyledOption: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../typography").TypographyProps & import("react").RefAttributes<unknown>>, import("styled-components").DefaultTheme, {}, never>;
|
|
3
2
|
export declare const StyledSelect: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
4
|
-
export declare const
|
|
3
|
+
export declare const StyledDropdownMenuContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
4
|
+
export declare const StyledClearIcon: import("styled-components").StyledComponent<import("react").FC<import("../icon/icon.types").IconProps>, import("styled-components").DefaultTheme, {}, never>;
|
package/dist/components/table/components/custom-columns-wrapper/custom-columns-wrapper.styles.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export declare const StyledTableContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
2
1
|
export declare const StyledToggleWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
3
2
|
isScrolling: boolean;
|
|
4
3
|
}, never>;
|
package/dist/components/table/components/table-actions-wrapper/components/sort/sort.types.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { OnConfirmInteraction } from '../../hooks';
|
|
2
|
-
export interface SortProps
|
|
3
|
-
current: SortInfo
|
|
2
|
+
export interface SortProps {
|
|
3
|
+
current: SortInfo;
|
|
4
4
|
disabled?: boolean;
|
|
5
|
-
fields: TableSortField<
|
|
6
|
-
onSort: (sortInfo: SortInfo
|
|
5
|
+
fields: TableSortField<string>[];
|
|
6
|
+
onSort: (sortInfo: SortInfo) => void;
|
|
7
7
|
}
|
|
8
8
|
export interface SortComponentProps extends SortProps {
|
|
9
9
|
confirmAllInteractions: boolean;
|
package/dist/components/table/components/table-actions-wrapper/table-actions-wrapper.types.d.ts
CHANGED
|
@@ -15,12 +15,11 @@ export interface SearchProps {
|
|
|
15
15
|
placeholder?: string;
|
|
16
16
|
value: string;
|
|
17
17
|
}
|
|
18
|
-
export interface CustomActionComponentProps<TData extends RowData> {
|
|
19
|
-
onConfirmInteraction: () => Promise<boolean>;
|
|
20
|
-
table: Table<TData>;
|
|
21
|
-
}
|
|
22
18
|
export interface CustomActionProps<TData extends RowData> {
|
|
23
|
-
Component: JSXElementConstructor<
|
|
19
|
+
Component: JSXElementConstructor<{
|
|
20
|
+
onConfirmInteraction: () => Promise<boolean>;
|
|
21
|
+
table: Table<TData>;
|
|
22
|
+
}>;
|
|
24
23
|
position: 'left' | 'right' | 'bottom';
|
|
25
24
|
}
|
|
26
25
|
export interface TableActionsWrapperProps<TData extends RowData> {
|
|
@@ -2,6 +2,5 @@ export declare const StyledTH: import("styled-components").StyledComponent<"th",
|
|
|
2
2
|
size: number;
|
|
3
3
|
}, never>;
|
|
4
4
|
export declare const StyledReorderWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
5
|
-
|
|
6
|
-
isActive: boolean;
|
|
5
|
+
active: boolean;
|
|
7
6
|
}, never>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { RowData, Table } from '@tanstack/react-table';
|
|
2
|
-
import { GetHeaderCellProps
|
|
2
|
+
import { GetHeaderCellProps } from '../../table.types';
|
|
3
3
|
export type TableHeaderProps<TData extends RowData> = {
|
|
4
4
|
getHeaderCellProps: GetHeaderCellProps<TData> | undefined;
|
|
5
|
-
|
|
5
|
+
reorderEnabled?: boolean;
|
|
6
|
+
reorderable: boolean;
|
|
6
7
|
table: Table<TData>;
|
|
7
8
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Row, RowData } from '@tanstack/react-table';
|
|
2
|
-
import { CustomRowProps, GetCellProps, OnRowClick
|
|
2
|
+
import { CustomRowProps, GetCellProps, OnRowClick } from '../../table.types';
|
|
3
3
|
export interface TableRowProps<TData extends RowData> {
|
|
4
4
|
customRowProps: CustomRowProps;
|
|
5
5
|
getCellProps: GetCellProps<TData> | undefined;
|
|
6
6
|
index?: number;
|
|
7
7
|
onRowClick?: OnRowClick<TData>;
|
|
8
|
-
|
|
8
|
+
reorderEnabled?: boolean;
|
|
9
|
+
reorderable?: boolean;
|
|
9
10
|
row: Row<TData>;
|
|
10
11
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RowData } from '@tanstack/react-table';
|
|
2
2
|
import { TableRowProps } from '../table-row/table-row.types';
|
|
3
|
-
export interface TableRowCellsProps<TData extends RowData> extends Pick<TableRowProps<TData>, 'row' | 'getCellProps' | '
|
|
3
|
+
export interface TableRowCellsProps<TData extends RowData> extends Pick<TableRowProps<TData>, 'row' | 'getCellProps' | 'reorderEnabled' | 'reorderable'> {
|
|
4
4
|
size?: number;
|
|
5
5
|
}
|
|
@@ -6,7 +6,6 @@ export interface UseTrackStickyCellsProps<TData extends RowData> {
|
|
|
6
6
|
/** The containing element that the child will intersect with. */
|
|
7
7
|
root: Element | null;
|
|
8
8
|
stickyFirstColumn: boolean | undefined;
|
|
9
|
-
stickyFooter: boolean | undefined;
|
|
10
9
|
stickyLastColumn: boolean | undefined;
|
|
11
10
|
}
|
|
12
11
|
/** Mark table if header and/or first column cells are sticky. */
|
|
@@ -3,4 +3,3 @@ export * from './table.types';
|
|
|
3
3
|
export * from './components/table-row/table-row.constants';
|
|
4
4
|
export * from './components/custom-columns-wrapper/helpers/get-custom-column-initial-visibility';
|
|
5
5
|
export * from './helpers';
|
|
6
|
-
export * from './components/table-actions-wrapper/table-actions-wrapper.types';
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { RowData } from '@tanstack/react-table';
|
|
2
2
|
import { TableProps } from './table.types';
|
|
3
|
-
/**
|
|
4
|
-
* See https://components.gantri.com/?path=/story/core-table for usage examples.
|
|
5
|
-
* Official docs: https://tanstack.com/table/v8/docs/guide/overview
|
|
6
|
-
*/
|
|
3
|
+
/** Official docs: https://tanstack.com/table/v8/docs/guide/overview */
|
|
7
4
|
export declare const Table: {
|
|
8
5
|
<TData extends RowData<{
|
|
9
6
|
[key: string]: unknown;
|
|
@@ -7,6 +7,7 @@ export declare const getTableRowBackgroundColors: (theme: DefaultTheme) => {
|
|
|
7
7
|
readonly statusWarningClickableHoverColor: string;
|
|
8
8
|
readonly statusWarningColor: string;
|
|
9
9
|
};
|
|
10
|
+
export declare const StyledTableWrapper: import("styled-components").StyledComponent<"div", DefaultTheme, {}, never>;
|
|
10
11
|
export declare const StyledTableContainer: import("styled-components").StyledComponent<"div", DefaultTheme, {}, never>;
|
|
11
12
|
export declare const StyledTable: import("styled-components").StyledComponent<"table", DefaultTheme, {
|
|
12
13
|
isCustomColumnsEnabled: boolean;
|
|
@@ -1,20 +1,9 @@
|
|
|
1
1
|
import { Cell, ColumnDef, Header, Row, RowData, TableOptions } from '@tanstack/react-table';
|
|
2
|
-
import {
|
|
2
|
+
import { HTMLAttributes, MouseEvent } from 'react';
|
|
3
3
|
import { PagingProps } from './components/table-actions-wrapper/components/paging/paging.types';
|
|
4
4
|
import { CustomActionProps, FiltersProps, SearchProps } from './components/table-actions-wrapper/table-actions-wrapper.types';
|
|
5
5
|
import { SortProps } from './components/table-actions-wrapper/components/sort/sort.types';
|
|
6
6
|
import { CustomColumnsProps } from './components/custom-columns-wrapper/custom-columns-wrapper.types';
|
|
7
|
-
import { OverlayPosition } from '../overlay/overlay.types';
|
|
8
|
-
export interface ReorderingProps<TData extends RowData> {
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
isActive: boolean;
|
|
11
|
-
isAvailable: boolean;
|
|
12
|
-
/** Is fired when the dragged element is dropped. */
|
|
13
|
-
onReorder: (data: TData[], oldIndex?: number, newIndex?: number) => Promise<void>;
|
|
14
|
-
setIsActive: Dispatch<SetStateAction<boolean>>;
|
|
15
|
-
tooltipPosition?: OverlayPosition;
|
|
16
|
-
tooltipText?: string;
|
|
17
|
-
}
|
|
18
7
|
export interface TableProps<TData extends RowData> extends Partial<TableDefaultProps> {
|
|
19
8
|
className?: string;
|
|
20
9
|
columns: ColumnDef<TData, any>[];
|
|
@@ -36,10 +25,13 @@ export interface TableProps<TData extends RowData> extends Partial<TableDefaultP
|
|
|
36
25
|
/** Any options provided are passed to `useReactTable` and may override default values. */
|
|
37
26
|
options?: Partial<TableOptions<TData>>;
|
|
38
27
|
paging?: PagingProps;
|
|
39
|
-
reordering?:
|
|
28
|
+
reordering?: {
|
|
29
|
+
enable: boolean;
|
|
30
|
+
/** Is fired when the dragged element is dropped. */
|
|
31
|
+
onReorder: (data: TData[], oldIndex?: number, newIndex?: number) => Promise<void>;
|
|
32
|
+
};
|
|
40
33
|
search?: SearchProps;
|
|
41
34
|
sorting?: SortProps;
|
|
42
|
-
stickyFooter?: boolean;
|
|
43
35
|
stickyLastColumn?: boolean;
|
|
44
36
|
}
|
|
45
37
|
export interface TableDefaultProps {
|
|
@@ -38,11 +38,11 @@ export interface TextFieldProps {
|
|
|
38
38
|
maxValue?: number;
|
|
39
39
|
minValue?: number;
|
|
40
40
|
name?: string;
|
|
41
|
-
onBlur?: (event: FocusEvent) => void;
|
|
41
|
+
onBlur?: (event: FocusEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
|
|
42
42
|
onBlurTextChange?: (value: string) => void;
|
|
43
43
|
onChange?: (event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
|
|
44
|
-
onClick?: (event: MouseEvent) => void;
|
|
45
|
-
onFocus?: (event: FocusEvent) => void;
|
|
44
|
+
onClick?: (event: MouseEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
|
|
45
|
+
onFocus?: (event: FocusEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
|
|
46
46
|
onKeyDown?: KeyboardEventHandler<HTMLInputElement | HTMLTextAreaElement>;
|
|
47
47
|
onKeyUp?: KeyboardEventHandler<HTMLInputElement | HTMLTextAreaElement>;
|
|
48
48
|
onTextChange?: (value: string) => void;
|
|
@@ -3,6 +3,6 @@ export interface GetIntersectionObserverCallbackArgs {
|
|
|
3
3
|
/** If not provided, the `dataAttrIsSticky` variable value will be used. If `stickyTo` is provided, it will apply that value as a suffix to the attr (ie `${dataAttrIsSticky}-${stickyTo}`). */
|
|
4
4
|
attrToApply?: string;
|
|
5
5
|
elementsToMark: Element[];
|
|
6
|
-
/** If not provided, an intersection in any direction
|
|
6
|
+
/** If not provided, an intersection in any direction mark the elements. */
|
|
7
7
|
stickyTo?: StickyTo;
|
|
8
8
|
}
|