@guillotinaweb/react-gmi 0.32.1 → 0.32.2
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/selected_items_actions.d.ts +18 -0
- package/dist/react-gmi.js +2 -2
- package/dist/react-gmi.js.map +1 -1
- package/dist/react-gmi.modern.js +1 -3
- package/dist/react-gmi.modern.js.map +1 -1
- package/dist/react-gmi.umd.js +2 -2
- package/dist/react-gmi.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { SearchItem } from '../types/guillotina';
|
|
3
|
+
export declare const ItemsActionsCtx: import("react").Context<{
|
|
4
|
+
selected: {
|
|
5
|
+
all: boolean;
|
|
6
|
+
[key: string]: boolean;
|
|
7
|
+
};
|
|
8
|
+
onSelectOneItem?: ((item: SearchItem) => void) | undefined;
|
|
9
|
+
onSelectAllItems?: ((chedked: boolean) => void) | undefined;
|
|
10
|
+
onAction?: ((action: string) => void) | undefined;
|
|
11
|
+
}>;
|
|
3
12
|
/**
|
|
4
13
|
* Actions to apply after select some items
|
|
5
14
|
* Ex: Delete, Move, Copy...
|
|
@@ -9,6 +18,15 @@ interface PropsItemsActionsProvider {
|
|
|
9
18
|
children: React.ReactNode;
|
|
10
19
|
}
|
|
11
20
|
export declare function ItemsActionsProvider({ items, children, }: PropsItemsActionsProvider): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare const useItemsActions: () => {
|
|
22
|
+
onAction: (action: string) => void;
|
|
23
|
+
onSelectOneItem: (item: SearchItem) => void;
|
|
24
|
+
onSelectAllItems: (chedked: boolean) => void;
|
|
25
|
+
selected: {
|
|
26
|
+
[key: string]: boolean;
|
|
27
|
+
all: boolean;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
12
30
|
/**
|
|
13
31
|
* Checkbox component without props that consume the ItemsActionsContext
|
|
14
32
|
* and it select/unselect all items of the page.
|
package/dist/react-gmi.js
CHANGED
|
@@ -6915,7 +6915,6 @@ function ItemsActionsProvider(_ref) {
|
|
|
6915
6915
|
children: children
|
|
6916
6916
|
});
|
|
6917
6917
|
}
|
|
6918
|
-
|
|
6919
6918
|
var useItemsActions = function useItemsActions() {
|
|
6920
6919
|
var _useContext = React.useContext(ItemsActionsCtx),
|
|
6921
6920
|
onAction = _useContext.onAction,
|
|
@@ -6939,7 +6938,6 @@ var useItemsActions = function useItemsActions() {
|
|
|
6939
6938
|
* and it select/unselect all items of the page.
|
|
6940
6939
|
*/
|
|
6941
6940
|
|
|
6942
|
-
|
|
6943
6941
|
function AllItemsCheckbox(_ref2) {
|
|
6944
6942
|
var dataTest = _ref2.dataTest;
|
|
6945
6943
|
|
|
@@ -14677,6 +14675,7 @@ exports.ItemCheckbox = ItemCheckbox;
|
|
|
14677
14675
|
exports.ItemCtx = ItemCtx;
|
|
14678
14676
|
exports.ItemModel = ItemModel;
|
|
14679
14677
|
exports.ItemTitle = ItemTitle;
|
|
14678
|
+
exports.ItemsActionsCtx = ItemsActionsCtx;
|
|
14680
14679
|
exports.ItemsActionsDropdown = ItemsActionsDropdown;
|
|
14681
14680
|
exports.ItemsActionsProvider = ItemsActionsProvider;
|
|
14682
14681
|
exports.Layout = Layout;
|
|
@@ -14768,6 +14767,7 @@ exports.toQueryString = toQueryString;
|
|
|
14768
14767
|
exports.useConfig = useConfig;
|
|
14769
14768
|
exports.useCrudContext = useCrudContext;
|
|
14770
14769
|
exports.useGuillotinaClient = useGuillotinaClient;
|
|
14770
|
+
exports.useItemsActions = useItemsActions;
|
|
14771
14771
|
exports.useLocation = useLocation;
|
|
14772
14772
|
exports.useRegistry = useRegistry;
|
|
14773
14773
|
exports.useRemoteField = useRemoteField;
|