react-crud-mui 0.2.57 → 0.2.59

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.
@@ -0,0 +1,16 @@
1
+ import { default as React } from 'react';
2
+ import { ButtonGroup, ButtonProps } from '@mui/material';
3
+ export interface DropdownButtonProps extends ButtonProps {
4
+ options: DropdownOption[];
5
+ buttonGroupProps?: React.ComponentProps<typeof ButtonGroup>;
6
+ }
7
+ export type DropdownOption = {
8
+ label: string;
9
+ icon?: React.ReactNode;
10
+ value: string;
11
+ helperText?: string;
12
+ disabled?: boolean;
13
+ onClick?: (event: React.MouseEvent<HTMLLIElement>) => void;
14
+ };
15
+ declare function DropdownButton({ options, disabled, size, buttonGroupProps, color, variant, ...buttonProps }: DropdownButtonProps): import("react/jsx-runtime").JSX.Element;
16
+ export default DropdownButton;
@@ -87,7 +87,7 @@ export interface EditableListProps<TModel extends FieldValues, TArrayModel exten
87
87
  /**
88
88
  * Custom commands when needed to override the default buttons
89
89
  */
90
- rowCommands?: (props: EditingListCommandsProps<TArrayModel>) => ReactNode;
90
+ onRowCommands?: (props: EditingListCommandsProps<TArrayModel>) => ReactNode;
91
91
  /**
92
92
  * Column props of commands
93
93
  */
@@ -97,7 +97,7 @@ export interface EditableListProps<TModel extends FieldValues, TArrayModel exten
97
97
  */
98
98
  children?: ReactNode;
99
99
  }
100
- declare function EditableList<TModel extends FieldValues, TArrayModel extends FieldArray<TModel, TFieldArrayName> & FieldValues, TFieldArrayName extends FieldArrayPath<TModel> = FieldArrayPath<TModel>>({ canCopy, canDelete, canEdit, showCopy, showDelete, showEdit, children, columns, commandColProps, onCommands, onLayout, detailPageProps, detailType, disabled, enableDeleteAllButton, enableRowClickToDetails, headerProps, name, newItemTitle, onDelete, onSave, rowCommands, showCommands, uniqueFields, ...tableProps }: EditableListProps<TModel, TArrayModel, TFieldArrayName>): import("react/jsx-runtime").JSX.Element;
100
+ declare function EditableList<TModel extends FieldValues, TArrayModel extends FieldArray<TModel, TFieldArrayName> & FieldValues, TFieldArrayName extends FieldArrayPath<TModel> = FieldArrayPath<TModel>>({ canCopy, canDelete, canEdit, showCopy, showDelete, showEdit, children, columns, commandColProps, onCommands, onLayout, detailPageProps, detailType, disabled, enableDeleteAllButton, enableRowClickToDetails, headerProps, name, newItemTitle, onDelete, onSave, onRowCommands, showCommands, uniqueFields, ...tableProps }: EditableListProps<TModel, TArrayModel, TFieldArrayName>): import("react/jsx-runtime").JSX.Element;
101
101
  declare namespace EditableList {
102
102
  var Commands: typeof EditableListCommands;
103
103
  var RowCommands: typeof ActionCommands;