react-crud-mui 0.0.1-beta.44 → 0.0.1-beta.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.
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
import { FieldValues } from 'react-hook-form';
|
|
3
3
|
import { NeedDataReason } from '../detail-page/pages/DetailPageContent';
|
|
4
|
-
export interface ActionCommandsProps<TModel extends FieldValues>
|
|
4
|
+
export interface ActionCommandsProps<TModel extends FieldValues> {
|
|
5
5
|
onEdit?: () => void;
|
|
6
6
|
onView?: () => void;
|
|
7
7
|
onCopy?: () => void;
|
|
@@ -18,6 +18,7 @@ export interface ActionCommandsProps<TModel extends FieldValues> extends PropsWi
|
|
|
18
18
|
confirmOnDelete?: boolean;
|
|
19
19
|
model?: TModel;
|
|
20
20
|
titles?: Record<NeedDataReason, string>;
|
|
21
|
+
children?: (closeEvent: () => void) => ReactNode;
|
|
21
22
|
}
|
|
22
23
|
declare function ActionCommands<TModel extends FieldValues>({ onDelete, onEdit, onCopy, onView, canView, canDelete, canEdit, canCopy, showCopy, showView, showEdit, showDelete, disabled, children, titles, }: ActionCommandsProps<TModel>): import("react/jsx-runtime").JSX.Element;
|
|
23
24
|
export default ActionCommands;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { MouseEvent,
|
|
2
|
-
|
|
1
|
+
import { MouseEvent, ReactNode } from 'react';
|
|
2
|
+
import { MenuProps } from '@mui/material/Menu';
|
|
3
|
+
export interface TableMoreMenuProps extends Omit<MenuProps, 'open'> {
|
|
3
4
|
open: HTMLElement | null;
|
|
4
5
|
handleClose: () => void;
|
|
5
6
|
handleOpen: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
@@ -7,4 +8,3 @@ interface TableMoreMenuProps extends PropsWithChildren {
|
|
|
7
8
|
moreIcon?: ReactNode;
|
|
8
9
|
}
|
|
9
10
|
export default function TableMoreMenu(props: TableMoreMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { SvgIconComponent } from '@mui/icons-material';
|
|
2
|
-
|
|
2
|
+
import { MenuItemProps } from '@mui/material/MenuItem';
|
|
3
|
+
export interface TableMoreMenuItemProps extends MenuItemProps {
|
|
3
4
|
title: string;
|
|
4
5
|
Icon: SvgIconComponent;
|
|
5
6
|
handleClick?: () => void;
|
|
6
7
|
disabled?: boolean;
|
|
7
8
|
}
|
|
8
9
|
export default function TableMoreMenuItem(props: TableMoreMenuItemProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export {};
|