@applica-software-guru/react-admin 1.5.234 → 1.5.236
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/.husky/pre-commit +1 -2
- package/dist/components/ra-buttons/CreateInDialogButton.d.ts +28 -28
- package/dist/components/ra-buttons/CreateInDialogButton.d.ts.map +1 -1
- package/dist/components/ra-buttons/EditInDialogButton.d.ts +11 -8
- package/dist/components/ra-buttons/EditInDialogButton.d.ts.map +1 -1
- package/dist/components/ra-inputs/LocalizedTextInput.d.ts.map +1 -1
- package/dist/react-admin.cjs.js +66 -66
- package/dist/react-admin.cjs.js.map +1 -1
- package/dist/react-admin.es.js +11129 -10332
- package/dist/react-admin.es.js.map +1 -1
- package/dist/react-admin.umd.js +59 -59
- package/dist/react-admin.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ra-buttons/CreateInDialogButton.tsx +99 -216
- package/src/components/ra-buttons/EditInDialogButton.tsx +66 -101
- package/src/components/ra-inputs/LocalizedTextInput.tsx +34 -32
- package/src/playground/App.jsx +1 -0
- package/src/playground/components/ra-forms/CategoryForm.jsx +12 -0
- package/src/playground/components/ra-forms/index.jsx +1 -0
- package/src/playground/components/ra-lists/CategoryList.jsx +62 -0
- package/src/playground/components/ra-lists/index.jsx +1 -0
- package/src/playground/entities/category.jsx +26 -0
- package/src/playground/entities/index.jsx +1 -0
- package/src/playground/menu.jsx +10 -3
package/.husky/pre-commit
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
type
|
|
6
|
-
fullWidth?: boolean;
|
|
7
|
-
maxWidth?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | false;
|
|
1
|
+
import { Breakpoint } from '@mui/material';
|
|
2
|
+
import { CreateButtonProps, CreateProps } from 'ra-ui-materialui';
|
|
3
|
+
import { PropsWithChildren } from 'react';
|
|
4
|
+
import { FieldValues } from 'react-hook-form';
|
|
5
|
+
type ResponsiveButtonProps = CreateButtonProps & {
|
|
8
6
|
label?: string;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
*/
|
|
18
|
-
fab: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* @deprecated Use mutationOptions.onSubmit instead
|
|
21
|
-
*/
|
|
22
|
-
onSubmit?: (record: any, close: () => void) => void;
|
|
23
|
-
/**
|
|
24
|
-
* @deprecated Use mutationOptions.onSuccess instead
|
|
25
|
-
*/
|
|
26
|
-
onSuccess?: (data: any) => void;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
};
|
|
9
|
+
type CloseDialogFunction = () => void;
|
|
10
|
+
type SubmitFunction = (values: FieldValues, closeDialog: CloseDialogFunction) => void;
|
|
11
|
+
type CreateInDialogButtonProps = PropsWithChildren & CreateProps & ResponsiveButtonProps & {
|
|
12
|
+
maxWidth: Breakpoint;
|
|
13
|
+
fullWidth?: boolean;
|
|
14
|
+
fullScreen?: boolean;
|
|
27
15
|
/**
|
|
16
|
+
* Custom handler for the submit event, in this case you are responsible for closing the dialog.
|
|
17
|
+
* @example
|
|
18
|
+
*
|
|
19
|
+
* const handleSubmit = (values, closeDialog) => {
|
|
20
|
+
* console.log(values); // { title: 'Hello World' }
|
|
21
|
+
* closeDialog();
|
|
22
|
+
* }
|
|
23
|
+
* <CreateInDialogButton onSubmit={handleSubmit}>
|
|
24
|
+
* <SimpleForm>
|
|
25
|
+
* <TextInput source="title" />
|
|
26
|
+
* </SimpleForm>
|
|
27
|
+
* </CreateInDialogButton>
|
|
28
28
|
*
|
|
29
|
-
* @deprecated Use mutationOptions.onError instead
|
|
30
29
|
*/
|
|
31
|
-
|
|
32
|
-
}
|
|
30
|
+
onSubmit?: SubmitFunction;
|
|
31
|
+
};
|
|
32
|
+
declare function CreateInDialogButton(props: CreateInDialogButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
33
33
|
export { CreateInDialogButton };
|
|
34
34
|
export type { CreateInDialogButtonProps };
|
|
35
35
|
//# sourceMappingURL=CreateInDialogButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateInDialogButton.d.ts","sourceRoot":"","sources":["../../../../src/components/ra-buttons/CreateInDialogButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CreateInDialogButton.d.ts","sourceRoot":"","sources":["../../../../src/components/ra-buttons/CreateInDialogButton.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAU,MAAM,eAAe,CAAC;AAEnD,OAAO,EAAwB,iBAAiB,EAAE,WAAW,EAAc,MAAM,kBAAkB,CAAC;AACpG,OAAc,EAAY,iBAAiB,EAAyB,MAAM,OAAO,CAAC;AAClF,OAAO,EAAE,WAAW,EAAkB,MAAM,iBAAiB,CAAC;AAwB9D,KAAK,qBAAqB,GAAG,iBAAiB,GAAG;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAYF,KAAK,mBAAmB,GAAG,MAAM,IAAI,CAAC;AACtC,KAAK,cAAc,GAAG,CAAC,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,mBAAmB,KAAK,IAAI,CAAC;AAkBtF,KAAK,yBAAyB,GAAG,iBAAiB,GAChD,WAAW,GACX,qBAAqB,GAAG;IACtB,QAAQ,EAAE,UAAU,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,EAAE,cAAc,CAAC;CAC3B,CAAC;AACJ,iBAAS,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,2CA4D7D;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAChC,YAAY,EAAE,yBAAyB,EAAE,CAAC"}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { Breakpoint } from '@mui/material';
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
type EditInDialogButtonProps = EditControllerProps & PropsWithChildren<{
|
|
6
|
-
fullWidth?: boolean;
|
|
7
|
-
maxWidth?: false | Breakpoint | undefined;
|
|
2
|
+
import { EditProps } from 'ra-ui-materialui';
|
|
3
|
+
import { PropsWithChildren } from 'react';
|
|
4
|
+
type ResponsiveButtonProps = {
|
|
8
5
|
label?: string;
|
|
9
|
-
|
|
10
|
-
}
|
|
6
|
+
onClick: () => void;
|
|
7
|
+
};
|
|
8
|
+
type EditInDialogButtonProps = PropsWithChildren & EditProps & ResponsiveButtonProps & {
|
|
9
|
+
maxWidth: Breakpoint;
|
|
10
|
+
fullWidth?: boolean;
|
|
11
|
+
fullScreen?: boolean;
|
|
12
|
+
};
|
|
13
|
+
declare function EditInDialogButton(props: EditInDialogButtonProps): JSX.Element;
|
|
11
14
|
export { EditInDialogButton };
|
|
12
15
|
export type { EditInDialogButtonProps };
|
|
13
16
|
//# sourceMappingURL=EditInDialogButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditInDialogButton.d.ts","sourceRoot":"","sources":["../../../../src/components/ra-buttons/EditInDialogButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EditInDialogButton.d.ts","sourceRoot":"","sources":["../../../../src/components/ra-buttons/EditInDialogButton.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAU,MAAM,eAAe,CAAC;AAEnD,OAAO,EAAsB,SAAS,EAAc,MAAM,kBAAkB,CAAC;AAC7E,OAAc,EAAY,iBAAiB,EAAyB,MAAM,OAAO,CAAC;AAElF,KAAK,qBAAqB,GAAG;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAcF,KAAK,uBAAuB,GAAG,iBAAiB,GAC9C,SAAS,GACT,qBAAqB,GAAG;IACtB,QAAQ,EAAE,UAAU,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AACJ,iBAAS,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,GAAG,GAAG,CAAC,OAAO,CAkDvE;AAED,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAC9B,YAAY,EAAE,uBAAuB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LocalizedTextInput.d.ts","sourceRoot":"","sources":["../../../../src/components/ra-inputs/LocalizedTextInput.tsx"],"names":[],"mappings":"AACA,OAAO,EAAgB,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAKtF,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAOlD,KAAK,wBAAwB,GAAG,cAAc,GAAG,iBAAiB,CAAC;AAEnE,iBAAS,kBAAkB,CAAC,KAAK,EAAE,wBAAwB,
|
|
1
|
+
{"version":3,"file":"LocalizedTextInput.d.ts","sourceRoot":"","sources":["../../../../src/components/ra-inputs/LocalizedTextInput.tsx"],"names":[],"mappings":"AACA,OAAO,EAAgB,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAKtF,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAOlD,KAAK,wBAAwB,GAAG,cAAc,GAAG,iBAAiB,CAAC;AAEnE,iBAAS,kBAAkB,CAAC,KAAK,EAAE,wBAAwB,2CAsE1D;AAED,YAAY,EAAE,wBAAwB,EAAE,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
|