@applica-software-guru/react-admin 1.5.237 → 1.5.240
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 +2 -1
- package/dist/components/ActionsMenu.d.ts.map +1 -1
- package/dist/components/ra-buttons/Button.d.ts +17 -0
- package/dist/components/ra-buttons/Button.d.ts.map +1 -0
- package/dist/components/ra-buttons/CreateInDialogButton.d.ts +9 -2
- package/dist/components/ra-buttons/CreateInDialogButton.d.ts.map +1 -1
- package/dist/components/ra-buttons/EditInDialogButton.d.ts +19 -0
- package/dist/components/ra-buttons/EditInDialogButton.d.ts.map +1 -1
- package/dist/components/ra-buttons/index.d.ts +1 -0
- package/dist/components/ra-buttons/index.d.ts.map +1 -1
- package/dist/components/ra-forms/Toolbar.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/react-admin.cjs.js +54 -54
- package/dist/react-admin.cjs.js.map +1 -1
- package/dist/react-admin.es.js +7619 -7689
- package/dist/react-admin.es.js.map +1 -1
- package/dist/react-admin.umd.js +52 -52
- package/dist/react-admin.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ActionsMenu.tsx +5 -0
- package/src/components/ra-buttons/Button.tsx +84 -0
- package/src/components/ra-buttons/CreateInDialogButton.tsx +43 -11
- package/src/components/ra-buttons/EditInDialogButton.tsx +65 -4
- package/src/components/ra-buttons/index.ts +1 -0
- package/src/components/ra-forms/Toolbar.tsx +2 -2
- package/src/index.ts +0 -1
- package/src/playground/components/ra-lists/CategoryList.jsx +5 -2
- package/src/playground/components/ra-lists/UserList.jsx +3 -3
package/.husky/pre-commit
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionsMenu.d.ts","sourceRoot":"","sources":["../../../src/components/ActionsMenu.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,EAAY,iBAAiB,EAAyB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ActionsMenu.d.ts","sourceRoot":"","sources":["../../../src/components/ActionsMenu.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,EAAY,iBAAiB,EAAyB,MAAM,OAAO,CAAC;AA6BlF,KAAK,gBAAgB,GAAG,iBAAiB,CAAC;IAAE,UAAU,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,CAAC;AAEpE;;;;;;;;;GASG;AACH,iBAAS,WAAW,CAAC,EAAE,UAAkB,EAAE,QAAQ,EAAE,EAAE,gBAAgB,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CAqDlG;AAED,OAAO,EAAE,WAAW,EAAE,CAAC;AACvB,YAAY,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ButtonProps as RaButtonProps } from 'react-admin';
|
|
3
|
+
type ButtonProps = RaButtonProps & {
|
|
4
|
+
/**
|
|
5
|
+
* Disable icon only in small screens.
|
|
6
|
+
*/
|
|
7
|
+
disableIconOnly?: boolean;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* A button that can be displayed as a floating button on small screens.
|
|
11
|
+
* @param props The component props.
|
|
12
|
+
* @returns The component.
|
|
13
|
+
*/
|
|
14
|
+
declare function Button(props: ButtonProps): JSX.Element;
|
|
15
|
+
export { Button };
|
|
16
|
+
export type { ButtonProps };
|
|
17
|
+
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/ra-buttons/Button.tsx"],"names":[],"mappings":";AAEA,OAAO,EAA0C,WAAW,IAAI,aAAa,EAAgB,MAAM,aAAa,CAAC;AAEjH,KAAK,WAAW,GAAG,aAAa,GAAG;IACjC;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AA+BF;;;;GAIG;AACH,iBAAS,MAAM,CAAC,KAAK,EAAE,WAAW,GAAG,GAAG,CAAC,OAAO,CAmC/C;AAED,OAAO,EAAE,MAAM,EAAE,CAAC;AAClB,YAAY,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Breakpoint } from '@mui/material';
|
|
2
|
-
import { CreateButtonProps, CreateProps } from 'ra-ui-materialui';
|
|
2
|
+
import { ButtonProps, CreateButtonProps, CreateProps } from 'ra-ui-materialui';
|
|
3
3
|
import { PropsWithChildren } from 'react';
|
|
4
4
|
import { FieldValues } from 'react-hook-form';
|
|
5
|
-
type ResponsiveButtonProps = CreateButtonProps & {
|
|
5
|
+
type ResponsiveButtonProps = CreateButtonProps & ButtonProps & {
|
|
6
6
|
label?: string;
|
|
7
7
|
onClick?: () => void;
|
|
8
|
+
disableFloatingButton?: boolean;
|
|
8
9
|
};
|
|
9
10
|
type CloseDialogFunction = () => void;
|
|
10
11
|
type SubmitFunction = (values: FieldValues, closeDialog: CloseDialogFunction) => void;
|
|
@@ -12,6 +13,12 @@ type CreateInDialogButtonProps = PropsWithChildren & CreateProps & ResponsiveBut
|
|
|
12
13
|
maxWidth: Breakpoint;
|
|
13
14
|
fullWidth?: boolean;
|
|
14
15
|
fullScreen?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Indicates whether the floating button should be disabled.
|
|
18
|
+
* Default is false, this mean that the floating button will be displayed on small screens.
|
|
19
|
+
* **If you have multiple buttons on the same page, they will be displayed over each other! **
|
|
20
|
+
*/
|
|
21
|
+
disableFloatingButton?: boolean;
|
|
15
22
|
scroll: 'paper' | 'body' | undefined;
|
|
16
23
|
/**
|
|
17
24
|
* Custom handler for the submit event, in this case you are responsible for closing the dialog.
|
|
@@ -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":"AAGA,OAAO,EAAE,UAAU,EAAkB,MAAM,eAAe,CAAC;AAE3D,OAAO,EAAE,WAAW,EAAgB,iBAAiB,EAAE,WAAW,EAAc,MAAM,kBAAkB,CAAC;AACzG,OAAc,EAAY,iBAAiB,EAAyB,MAAM,OAAO,CAAC;AAClF,OAAO,EAAE,WAAW,EAAkB,MAAM,iBAAiB,CAAC;AAwB9D,KAAK,qBAAqB,GAAG,iBAAiB,GAC5C,WAAW,GAAG;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC,CAAC;AAqBJ,KAAK,mBAAmB,GAAG,MAAM,IAAI,CAAC;AACtC,KAAK,cAAc,GAAG,CAAC,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,mBAAmB,KAAK,IAAI,CAAC;AAuBtF,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;IACrB;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,MAAM,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;IACrC;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,EAAE,cAAc,CAAC;CAC3B,CAAC;AACJ,iBAAS,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,2CA2E7D;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAChC,YAAY,EAAE,yBAAyB,EAAE,CAAC"}
|
|
@@ -1,15 +1,34 @@
|
|
|
1
1
|
import { Breakpoint } from '@mui/material';
|
|
2
2
|
import { EditProps } from 'ra-ui-materialui';
|
|
3
3
|
import { PropsWithChildren } from 'react';
|
|
4
|
+
import { FieldValues } from 'react-hook-form';
|
|
4
5
|
type ResponsiveButtonProps = {
|
|
5
6
|
label?: string;
|
|
6
7
|
onClick: () => void;
|
|
7
8
|
};
|
|
9
|
+
type CloseDialogFunction = () => void;
|
|
10
|
+
type SubmitFunction = (values: FieldValues, closeDialog: CloseDialogFunction) => void;
|
|
8
11
|
type EditInDialogButtonProps = PropsWithChildren & EditProps & ResponsiveButtonProps & {
|
|
9
12
|
maxWidth: Breakpoint;
|
|
10
13
|
fullWidth?: boolean;
|
|
11
14
|
fullScreen?: boolean;
|
|
12
15
|
scroll: 'paper' | 'body' | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Custom handler for the submit event, in this case you are responsible for closing the dialog.
|
|
18
|
+
* @example
|
|
19
|
+
*
|
|
20
|
+
* const handleSubmit = (values, closeDialog) => {
|
|
21
|
+
* console.log(values); // { title: 'Hello World' }
|
|
22
|
+
* closeDialog();
|
|
23
|
+
* }
|
|
24
|
+
* <CreateInDialogButton onSubmit={handleSubmit}>
|
|
25
|
+
* <SimpleForm>
|
|
26
|
+
* <TextInput source="title" />
|
|
27
|
+
* </SimpleForm>
|
|
28
|
+
* </CreateInDialogButton>
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
onSubmit?: SubmitFunction;
|
|
13
32
|
};
|
|
14
33
|
declare function EditInDialogButton(props: EditInDialogButtonProps): JSX.Element;
|
|
15
34
|
export { EditInDialogButton };
|
|
@@ -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":"AAEA,OAAO,EAAE,UAAU,EAAU,MAAM,eAAe,CAAC;AAEnD,OAAO,EAAc,SAAS,EAAc,MAAM,kBAAkB,CAAC;AACrE,OAAc,EAAY,iBAAiB,EAAyB,MAAM,OAAO,CAAC;AAClF,OAAO,EAAE,WAAW,EAAkB,MAAM,iBAAiB,CAAC;AAE9D,KAAK,qBAAqB,GAAG;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAcF,KAAK,mBAAmB,GAAG,MAAM,IAAI,CAAC;AACtC,KAAK,cAAc,GAAG,CAAC,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,mBAAmB,KAAK,IAAI,CAAC;AA2BtF,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;IACrB,MAAM,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;IACrC;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,EAAE,cAAc,CAAC;CAC3B,CAAC;AACJ,iBAAS,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,GAAG,GAAG,CAAC,OAAO,CAkEvE;AAED,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAC9B,YAAY,EAAE,uBAAuB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ra-buttons/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ra-buttons/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toolbar.d.ts","sourceRoot":"","sources":["../../../../src/components/ra-forms/Toolbar.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAwB,YAAY,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"Toolbar.d.ts","sourceRoot":"","sources":["../../../../src/components/ra-forms/Toolbar.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAwB,YAAY,EAAE,MAAM,aAAa,CAAC;AAoBjE,iBAAS,OAAO,CAAC,KAAK,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO,CAEjD;AAED,OAAO,EAAE,OAAO,EAAE,CAAC;AACnB,YAAY,EAAE,YAAY,EAAE,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -7,5 +7,5 @@ export * from './i18n';
|
|
|
7
7
|
export * from './themes';
|
|
8
8
|
export * from './types';
|
|
9
9
|
export * from './utils';
|
|
10
|
-
export { ArrayField, ArrayInputContext, BooleanField, BulkDeleteWithConfirmButton,
|
|
10
|
+
export { ArrayField, ArrayInputContext, BooleanField, BulkDeleteWithConfirmButton, ChipField, Confirm, CreateButton, CreateContextProvider, CustomRoutes, DeleteWithConfirmButton, DeleteWithUndoButton, EditButton, EditContextProvider, FieldTitle, FilterButton, Form, FormDataConsumer, HttpError, I18nContextProvider, ListBase, ListToolbar, LoadingIndicator, Pagination, SimpleFormIterator as RaSimpleFormIterator, RecordContextProvider, ReferenceArrayField, ReferenceField, Resource, ResourceContextProvider, SaveButton, SimpleFormIteratorContext, SimpleShowLayout, SingleFieldList, TabbedFormTabs, TopToolbar, UrlField, choices, email, maxLength, maxValue, minLength, minValue, number, regex, required, useArrayInput, useAuthProvider, useChoices, useChoicesContext, useCreate, useCreateContext, useCreateController, useDataProvider, useEditContext, useEditController, useGetIdentity, useGetList, useGetMany, useGetManyReference, useGetOne, useInput, useListContext, useListController, useLocaleState, useLocales, useNotify, usePermissions, useRecordContext, useRefresh, useResourceContext, useResourceDefinition, useResourceDefinitions, useShowContext, useShowController, useSimpleFormIterator, useSimpleFormIteratorItem, useTranslate, useTranslateLabel, useUnselect, useUnselectAll, useUpdate, useUpdateMany, withLifecycleCallbacks } from 'react-admin';
|
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,OAAO,CAAC;AAEvB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,OAAO,EACL,UAAU,EACV,iBAAiB,EACjB,YAAY,EACZ,2BAA2B,EAC3B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,OAAO,CAAC;AAEvB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,OAAO,EACL,UAAU,EACV,iBAAiB,EACjB,YAAY,EACZ,2BAA2B,EAC3B,SAAS,EACT,OAAO,EACP,YAAY,EACZ,qBAAqB,EACrB,YAAY,EACZ,uBAAuB,EACvB,oBAAoB,EACpB,UAAU,EACV,mBAAmB,EACnB,UAAU,EACV,YAAY,EACZ,IAAI,EACJ,gBAAgB,EAChB,SAAS,EACT,mBAAmB,EACnB,QAAQ,EACR,WAAW,EACX,gBAAgB,EAChB,UAAU,EACV,kBAAkB,IAAI,oBAAoB,EAC1C,qBAAqB,EACrB,mBAAmB,EACnB,cAAc,EACd,QAAQ,EACR,uBAAuB,EACvB,UAAU,EACV,yBAAyB,EACzB,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,UAAU,EACV,QAAQ,EACR,OAAO,EACP,KAAK,EACL,SAAS,EACT,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,MAAM,EACN,KAAK,EACL,QAAQ,EACR,aAAa,EACb,eAAe,EACf,UAAU,EACV,iBAAiB,EACjB,SAAS,EACT,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,UAAU,EACV,UAAU,EACV,mBAAmB,EACnB,SAAS,EACT,QAAQ,EACR,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,UAAU,EACV,SAAS,EACT,cAAc,EACd,gBAAgB,EAChB,UAAU,EACV,kBAAkB,EAClB,qBAAqB,EACrB,sBAAsB,EACtB,cAAc,EACd,iBAAiB,EACjB,qBAAqB,EACrB,yBAAyB,EACzB,YAAY,EACZ,iBAAiB,EACjB,WAAW,EACX,cAAc,EACd,SAAS,EACT,aAAa,EACb,sBAAsB,EACvB,MAAM,aAAa,CAAC"}
|