@pdg/react-table 1.0.44 → 1.0.46
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/@types/types.d.ts +2 -2
- package/dist/InfoTable/InfoTable.style.d.ts +3 -3
- package/dist/InfoTable/InfoTable.types.d.ts +2 -2
- package/dist/Table/Table.styles.d.ts +1 -1
- package/dist/Table/Table.types.d.ts +2 -0
- package/dist/TableBodyRow/TableBodyRow.d.ts +1 -1
- package/dist/TableButton/TableButton.d.ts +1 -1
- package/dist/TableHeadCell/TableHeadCell.types.d.ts +1 -0
- package/dist/TableIcon/TableIcon.d.ts +1 -1
- package/dist/TableMenuButton/TableMenuButton.d.ts +1 -1
- package/dist/TableTopHead/TableTopHead.d.ts +4 -0
- package/dist/TableTopHead/TableTopHead.types.d.ts +15 -0
- package/dist/TableTopHead/index.d.ts +4 -0
- package/dist/index.esm.js +1967 -7508
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +2016 -7557
- package/dist/index.js.map +1 -1
- package/package.json +33 -32
package/dist/@types/types.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
import { SxProps } from '@mui/system';
|
|
3
3
|
import { Theme } from '@mui/material/styles';
|
|
4
|
-
export
|
|
5
|
-
export
|
|
4
|
+
export type PartialPick<T, K extends keyof T> = Partial<Pick<T, K>>;
|
|
5
|
+
export type PartialOmit<T, K extends keyof T> = Partial<Omit<T, K>>;
|
|
6
6
|
export interface CommonProps {
|
|
7
7
|
children?: ReactNode;
|
|
8
8
|
className?: string;
|
|
@@ -4,7 +4,7 @@ export declare const Label: import("@emotion/styled").StyledComponent<import("@m
|
|
|
4
4
|
component?: import("react").ElementType<any> | undefined;
|
|
5
5
|
ref?: import("react").Ref<unknown> | undefined;
|
|
6
6
|
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
7
|
-
} & Omit<
|
|
7
|
+
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
8
8
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
9
9
|
}, ("border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform") | "ref" | "children" | "component" | "sx"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
10
10
|
export declare const ValueWrap: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material").Theme> & {
|
|
@@ -12,7 +12,7 @@ export declare const ValueWrap: import("@emotion/styled").StyledComponent<import
|
|
|
12
12
|
component?: import("react").ElementType<any> | undefined;
|
|
13
13
|
ref?: import("react").Ref<unknown> | undefined;
|
|
14
14
|
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
15
|
-
} & Omit<
|
|
15
|
+
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
16
16
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
17
17
|
}, ("border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform") | "ref" | "children" | "component" | "sx"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
18
18
|
export declare const Value: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -43,6 +43,6 @@ export declare const ClipboardIconButton: import("@emotion/styled").StyledCompon
|
|
|
43
43
|
tabIndex?: number | undefined;
|
|
44
44
|
TouchRippleProps?: Partial<import("@mui/material/ButtonBase/TouchRipple").TouchRippleProps> | undefined;
|
|
45
45
|
touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
|
|
46
|
-
}, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<
|
|
46
|
+
}, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
47
47
|
ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
48
48
|
}, "color" | "tabIndex" | "children" | "sx" | keyof import("@mui/material/OverridableComponent").CommonProps | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "size"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -30,8 +30,8 @@ export interface InfoTableItem<T = InfoTableInfo> {
|
|
|
30
30
|
onRender?(info: T): ReactNode;
|
|
31
31
|
onRenderEmpty?(info: T): ReactNode;
|
|
32
32
|
}
|
|
33
|
-
export
|
|
34
|
-
export
|
|
33
|
+
export type InfoTableItems<T = InfoTableInfo> = (InfoTableItem<T> | false | undefined | null)[];
|
|
34
|
+
export type InfoTableCols = 1 | 2 | 3 | 4 | 6 | 12;
|
|
35
35
|
export interface InfoTableProps<T = InfoTableInfo> {
|
|
36
36
|
cols: InfoTableCols | {
|
|
37
37
|
xs?: InfoTableCols;
|
|
@@ -5,7 +5,7 @@ export declare const StyledBodyRow: import("@emotion/styled").StyledComponent<{
|
|
|
5
5
|
hover?: boolean | undefined;
|
|
6
6
|
selected?: boolean | undefined;
|
|
7
7
|
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
8
|
-
} & import("@mui/material/OverridableComponent").CommonProps & Omit<
|
|
8
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, "ref"> & {
|
|
9
9
|
ref?: ((instance: HTMLTableRowElement | null) => void) | import("react").RefObject<HTMLTableRowElement> | null | undefined;
|
|
10
10
|
}, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "hover" | "selected" | "sx"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
11
11
|
export declare const StyledNoDataDiv: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -2,6 +2,7 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { TableCellProps, TooltipProps } from '@mui/material';
|
|
3
3
|
import { TablePaginationProps } from '../TablePagination/TablePagination.types';
|
|
4
4
|
import { CommonSxProps } from '../@types';
|
|
5
|
+
import { TableTopHeadProps } from '../TableTopHead';
|
|
5
6
|
export interface TableItem {
|
|
6
7
|
[key: string]: any;
|
|
7
8
|
}
|
|
@@ -58,6 +59,7 @@ export interface TableColumn<T = TableItem> {
|
|
|
58
59
|
onCheckDisabledChange?(item: T, checkDisabled: boolean): void;
|
|
59
60
|
}
|
|
60
61
|
export interface TableProps<T = TableItem> extends CommonSxProps {
|
|
62
|
+
topHeadRows?: TableTopHeadProps['rows'];
|
|
61
63
|
columns?: (TableColumn<T> | false | undefined | null)[];
|
|
62
64
|
defaultAlign?: TableCellProps['align'];
|
|
63
65
|
defaultEllipsis?: boolean;
|
|
@@ -6,7 +6,7 @@ export declare const StyledBodyRow: import("@emotion/styled").StyledComponent<{
|
|
|
6
6
|
hover?: boolean | undefined;
|
|
7
7
|
selected?: boolean | undefined;
|
|
8
8
|
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
9
|
-
} & import("@mui/material/OverridableComponent").CommonProps & Omit<
|
|
9
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, "ref"> & {
|
|
10
10
|
ref?: ((instance: HTMLTableRowElement | null) => void) | React.RefObject<HTMLTableRowElement> | null | undefined;
|
|
11
11
|
}, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "hover" | "selected" | "sx"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
12
12
|
declare const TableBodyRow: React.FC<Props>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TableButtonProps as Props } from './TableButton.types';
|
|
3
|
-
declare const TableButton: React.ForwardRefExoticComponent<
|
|
3
|
+
declare const TableButton: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
4
4
|
export default TableButton;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TableIconProps as Props } from './TableIcon.types';
|
|
3
|
-
declare const TableIcon: React.ForwardRefExoticComponent<
|
|
3
|
+
declare const TableIcon: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
|
|
4
4
|
export default TableIcon;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TableMenuButtonProps as Props } from './TableMenuButton.types';
|
|
3
|
-
declare const TableMenuButton: React.ForwardRefExoticComponent<
|
|
3
|
+
declare const TableMenuButton: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
4
4
|
export default TableMenuButton;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { TableCellProps } from '@mui/material';
|
|
3
|
+
export interface TableTopHeadRowColumn {
|
|
4
|
+
colSpan?: number;
|
|
5
|
+
rowSpan?: number;
|
|
6
|
+
label?: ReactNode;
|
|
7
|
+
align?: TableCellProps['align'];
|
|
8
|
+
}
|
|
9
|
+
export type TableTopHeadRowColumnValue = TableTopHeadRowColumn | false | undefined | null;
|
|
10
|
+
export interface TableTopHeadProps {
|
|
11
|
+
columnLength: number;
|
|
12
|
+
rows?: TableTopHeadRowColumnValue[] | TableTopHeadRowColumnValue[][];
|
|
13
|
+
onHeightChange?(height: number): void;
|
|
14
|
+
}
|
|
15
|
+
export declare const TableTopHeadDefaultProps: {};
|