@applica-software-guru/react-admin 1.5.299 → 1.5.301
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/components/ra-buttons/BulkDeleteWithConfirmButton.d.ts +61 -0
- package/dist/components/ra-buttons/BulkDeleteWithConfirmButton.d.ts.map +1 -0
- package/dist/components/ra-buttons/index.d.ts +1 -0
- package/dist/components/ra-buttons/index.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 +60 -53
- package/dist/react-admin.cjs.js.gz +0 -0
- package/dist/react-admin.cjs.js.map +1 -1
- package/dist/react-admin.es.js +9568 -8581
- package/dist/react-admin.es.js.gz +0 -0
- package/dist/react-admin.es.js.map +1 -1
- package/dist/react-admin.umd.js +61 -54
- package/dist/react-admin.umd.js.gz +0 -0
- package/dist/react-admin.umd.js.map +1 -1
- package/package.json +2 -1
- package/src/components/ra-buttons/BulkDeleteWithConfirmButton.tsx +210 -0
- package/src/components/ra-buttons/index.ts +1 -0
- package/src/index.ts +2 -1
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ReactElement } from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import { DeleteManyParams, MutationMode, RaRecord } from 'ra-core';
|
|
5
|
+
import { BulkActionProps, ButtonProps } from 'react-admin';
|
|
6
|
+
import { UseMutationOptions } from 'react-query';
|
|
7
|
+
/**
|
|
8
|
+
* BulkDeleteWithConfirmButton component allows you to delete multiple records with a confirmation dialog.
|
|
9
|
+
*
|
|
10
|
+
* This component extends the functionality of the react-admin BulkDeleteWithConfirmButton by adding
|
|
11
|
+
* two optional methods, `onSuccess` and `onError`, to the props. These methods allow users
|
|
12
|
+
* to extend what happens in the `onSuccess` and `onError` methods of the `useDeleteMany` hook.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* <BulkDeleteWithConfirmButton
|
|
16
|
+
* onSuccess={() => {
|
|
17
|
+
* // Custom success logic
|
|
18
|
+
* }}
|
|
19
|
+
* onError={() => {
|
|
20
|
+
* // Custom error logic
|
|
21
|
+
* }}
|
|
22
|
+
* />
|
|
23
|
+
*/
|
|
24
|
+
declare function BulkDeleteWithConfirmButton(props: BulkDeleteWithConfirmButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
declare namespace BulkDeleteWithConfirmButton {
|
|
26
|
+
var propTypes: {
|
|
27
|
+
confirmTitle: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
28
|
+
confirmContent: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
29
|
+
confirmColor: PropTypes.Requireable<string>;
|
|
30
|
+
icon: PropTypes.Requireable<PropTypes.ReactElementLike>;
|
|
31
|
+
label: PropTypes.Requireable<string>;
|
|
32
|
+
mutationMode: PropTypes.Requireable<string>;
|
|
33
|
+
resource: PropTypes.Requireable<string>;
|
|
34
|
+
selectedIds: PropTypes.Requireable<any[]>;
|
|
35
|
+
onSuccess: PropTypes.Requireable<(...args: any[]) => any>;
|
|
36
|
+
onError: PropTypes.Requireable<(...args: any[]) => any>;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
interface BulkDeleteWithConfirmButtonProps<RecordType extends RaRecord = any, MutationOptionsError = unknown> extends BulkActionProps, ButtonProps {
|
|
40
|
+
confirmContent?: React.ReactNode;
|
|
41
|
+
confirmTitle?: React.ReactNode;
|
|
42
|
+
confirmColor?: 'primary' | 'warning';
|
|
43
|
+
icon?: ReactElement;
|
|
44
|
+
mutationMode: MutationMode;
|
|
45
|
+
mutationOptions?: UseMutationOptions<RecordType, MutationOptionsError, DeleteManyParams<RecordType>> & {
|
|
46
|
+
meta?: any;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Optional custom success logic to be executed after the default onSuccess logic.
|
|
50
|
+
* This method allows users to extend what happens in the onSuccess method of the useDeleteMany hook.
|
|
51
|
+
*/
|
|
52
|
+
onSuccess?: () => void;
|
|
53
|
+
/**
|
|
54
|
+
* Optional custom error logic to be executed after the default onError logic.
|
|
55
|
+
* This method allows users to extend what happens in the onError method of the useDeleteMany hook.
|
|
56
|
+
*/
|
|
57
|
+
onError?: () => void;
|
|
58
|
+
}
|
|
59
|
+
export { BulkDeleteWithConfirmButton };
|
|
60
|
+
export type { BulkDeleteWithConfirmButtonProps };
|
|
61
|
+
//# sourceMappingURL=BulkDeleteWithConfirmButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BulkDeleteWithConfirmButton.d.ts","sourceRoot":"","sources":["../../../../src/components/ra-buttons/BulkDeleteWithConfirmButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,SAAS,MAAM,YAAY,CAAC;AAInC,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,QAAQ,EAQT,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,eAAe,EAAU,WAAW,EAAW,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAGjD;;;;;;;;;;;;;;;;GAgBG;AACH,iBAAS,2BAA2B,CAAC,KAAK,EAAE,gCAAgC,2CAuG3E;kBAvGQ,2BAA2B;;;;;;;;;;;;;;AAmHpC,UAAU,gCAAgC,CAAC,UAAU,SAAS,QAAQ,GAAG,GAAG,EAAE,oBAAoB,GAAG,OAAO,CAC1G,SAAQ,eAAe,EACrB,WAAW;IACb,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,YAAY,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IACrC,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,YAAY,EAAE,YAAY,CAAC;IAC3B,eAAe,CAAC,EAAE,kBAAkB,CAAC,UAAU,EAAE,oBAAoB,EAAE,gBAAgB,CAAC,UAAU,CAAC,CAAC,GAAG;QACrG,IAAI,CAAC,EAAE,GAAG,CAAC;KACZ,CAAC;IACF;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAiCD,OAAO,EAAE,2BAA2B,EAAE,CAAC;AACvC,YAAY,EAAE,gCAAgC,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ra-buttons/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,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,+BAA+B,CAAC;AAC9C,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,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,
|
|
10
|
+
export { ArrayField, ArrayInputContext, BooleanField, ChipField, Confirm, CreateContextProvider, CustomRoutes, DeleteWithConfirmButton, DeleteWithUndoButton, EditButton, EditContextProvider, FieldTitle, FilterButton, FilterList, FilterListItem, FilterLiveSearch, Form, FormDataConsumer, HttpError, I18nContextProvider, ListBase, ListToolbar, LoadingIndicator, SimpleFormIterator as RaSimpleFormIterator, RecordContextProvider, ReferenceArrayField, ReferenceField, Resource, ResourceContextProvider, SaveButton, SavedQueriesList, SimpleFormIteratorContext, SimpleShowLayout, SingleFieldList, TabbedFormTabs, TopToolbar, UrlField, ValidationError, choices, email, maxLength, maxValue, minLength, minValue, number, regex, required, useArrayInput, useAuthProvider, useCheckAuth, useChoices, useChoicesContext, useCreate, useCreateContext, useCreateController, useCreateSuggestionContext, useDataProvider, useDeleteMany, useEditContext, useEditController, useGetIdentity, useGetList, useGetMany, useGetManyReference, useGetOne, useInput, useListContext, useListController, useLocaleState, useLocales, useLogin, useNotify, usePermissions, useRecordContext, useRefresh, useRemoveFromStore, useResetStore, useResourceContext, useResourceDefinition, useResourceDefinitions, useSafeSetState, useShowContext, useShowController, useSimpleFormIterator, useSimpleFormIteratorItem, useStore, useStoreContext, 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,
|
|
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,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