@codezee/sixtify-brahma 0.2.145 → 0.2.147
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/package.json +1 -1
- package/packages/shared-components/dist/ActionButtons/ActionButtons.d.ts +2 -1
- package/packages/shared-components/dist/ActionButtons/ActionButtons.d.ts.map +1 -1
- package/packages/shared-components/dist/ActionButtons/ActionButtons.js +3 -3
- package/packages/shared-components/dist/AgGrid/hooks/index.d.ts +0 -1
- package/packages/shared-components/dist/AgGrid/hooks/index.d.ts.map +1 -1
- package/packages/shared-components/dist/AgGrid/hooks/index.js +0 -1
- package/packages/shared-components/dist/AgGrid/hooks/useAgGridCheckBoxSelection.js +1 -1
- package/packages/shared-components/dist/AgGrid/hooks/useAgGridKeyboardShortcuts.d.ts +0 -8
- package/packages/shared-components/dist/AgGrid/hooks/useAgGridKeyboardShortcuts.d.ts.map +0 -1
- package/packages/shared-components/dist/AgGrid/hooks/useAgGridKeyboardShortcuts.js +0 -37
package/package.json
CHANGED
|
@@ -6,7 +6,8 @@ export type ActionButtonsProps = DataProps & {
|
|
|
6
6
|
sx?: SxProps;
|
|
7
7
|
buttonSx?: SxProps;
|
|
8
8
|
shouldOpenMenuOnShortcut?: boolean;
|
|
9
|
+
disable?: boolean;
|
|
9
10
|
shortcutKey?: string;
|
|
10
11
|
};
|
|
11
|
-
export declare function ActionButtons({ buttons, justifyContent, sx, buttonSx, shouldOpenMenuOnShortcut, shortcutKey, }: ActionButtonsProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function ActionButtons({ buttons, justifyContent, sx, buttonSx, shouldOpenMenuOnShortcut, disable, shortcutKey, }: ActionButtonsProps): import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
//# sourceMappingURL=ActionButtons.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionButtons.d.ts","sourceRoot":"","sources":["../../src/ActionButtons/ActionButtons.tsx"],"names":[],"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,WAAiB,GAClB,EAAE,kBAAkB,2CA2IpB"}
|
|
@@ -9,7 +9,7 @@ const material_1 = require("@mui/material");
|
|
|
9
9
|
const noop_1 = __importDefault(require("lodash/noop"));
|
|
10
10
|
const react_1 = require("react");
|
|
11
11
|
const utils_1 = require("../utils");
|
|
12
|
-
function ActionButtons({ buttons, justifyContent = "end", sx, buttonSx, shouldOpenMenuOnShortcut = false, shortcutKey = "a", }) {
|
|
12
|
+
function ActionButtons({ buttons, justifyContent = "end", sx, buttonSx, shouldOpenMenuOnShortcut = false, disable = false, shortcutKey = "a", }) {
|
|
13
13
|
const [anchorEl, setAnchorEl] = (0, react_1.useState)(null);
|
|
14
14
|
const [openMenuKey, setOpenMenuKey] = (0, react_1.useState)(null);
|
|
15
15
|
const buttonRefs = (0, react_1.useRef)({});
|
|
@@ -26,7 +26,7 @@ function ActionButtons({ buttons, justifyContent = "end", sx, buttonSx, shouldOp
|
|
|
26
26
|
key: shortcutKey,
|
|
27
27
|
modifierKeys: ["ctrl", "shift"],
|
|
28
28
|
onTrigger: () => {
|
|
29
|
-
if (shouldOpenMenuOnShortcut) {
|
|
29
|
+
if (shouldOpenMenuOnShortcut && !disable) {
|
|
30
30
|
const buttonWithMenu = buttons.find((button) => !!button.menuItems?.length && !button.hidden);
|
|
31
31
|
if (buttonWithMenu) {
|
|
32
32
|
const buttonElement = buttonRefs.current[buttonWithMenu.key];
|
|
@@ -49,7 +49,7 @@ function ActionButtons({ buttons, justifyContent = "end", sx, buttonSx, shouldOp
|
|
|
49
49
|
...button,
|
|
50
50
|
onClick,
|
|
51
51
|
};
|
|
52
|
-
return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [button.label ? ((0, jsx_runtime_1.jsx)(material_1.Button, { sx: buttonSx, ...buttonProps, ref: (el) => {
|
|
52
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [button.label ? ((0, jsx_runtime_1.jsx)(material_1.Button, { sx: buttonSx, ...buttonProps, disabled: disable || button.disabled, ref: (el) => {
|
|
53
53
|
buttonRefs.current[key] = el;
|
|
54
54
|
}, children: button.label }, key)) : ((0, jsx_runtime_1.jsx)(material_1.IconButton, { ref: (el) => {
|
|
55
55
|
buttonRefs.current[key] = el;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/AgGrid/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yBAAyB,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/AgGrid/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yBAAyB,CAAC"}
|
|
@@ -19,4 +19,3 @@ __exportStar(require("./useAgGridSummaryRow"), exports);
|
|
|
19
19
|
__exportStar(require("./useAgGridSummaryRowUpdate"), exports);
|
|
20
20
|
__exportStar(require("./useAgGridRowSelectionConfig"), exports);
|
|
21
21
|
__exportStar(require("./useAgGridFilteredData"), exports);
|
|
22
|
-
__exportStar(require("./useAgGridKeyboardShortcuts"), exports);
|
|
@@ -89,7 +89,7 @@ const useAgGridCheckBoxSelection = ({ gridRef, setSelectedEmployee, currentPageI
|
|
|
89
89
|
});
|
|
90
90
|
(0, utils_1.useGlobalKeyboardShortcut)({
|
|
91
91
|
key: "a",
|
|
92
|
-
modifierKeys:
|
|
92
|
+
modifierKeys: "alt",
|
|
93
93
|
onTrigger: () => {
|
|
94
94
|
if (isDialogOnTop(gridRef)) {
|
|
95
95
|
return;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { AgGridReact } from "ag-grid-react";
|
|
2
|
-
import type { RefObject } from "react";
|
|
3
|
-
type UseAgGridKeyboardShortcutsArgs<T = unknown> = {
|
|
4
|
-
gridRef: RefObject<AgGridReact<T>>;
|
|
5
|
-
};
|
|
6
|
-
export declare const useAgGridKeyboardShortcuts: <T = unknown>({ gridRef, }: UseAgGridKeyboardShortcutsArgs<T>) => void;
|
|
7
|
-
export {};
|
|
8
|
-
//# sourceMappingURL=useAgGridKeyboardShortcuts.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useAgGridKeyboardShortcuts.d.ts","sourceRoot":"","sources":["../../../src/AgGrid/hooks/useAgGridKeyboardShortcuts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,KAAK,8BAA8B,CAAC,CAAC,GAAG,OAAO,IAAI;IACjD,OAAO,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;CACpC,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAI,CAAC,GAAG,OAAO,EAAE,cAErD,8BAA8B,CAAC,CAAC,CAAC,SAoCnC,CAAC"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useAgGridKeyboardShortcuts = void 0;
|
|
4
|
-
const utils_1 = require("../../utils");
|
|
5
|
-
const useAgGridKeyboardShortcuts = ({ gridRef, }) => {
|
|
6
|
-
(0, utils_1.useGlobalKeyboardShortcut)({
|
|
7
|
-
key: "a",
|
|
8
|
-
modifierKeys: "ctrl",
|
|
9
|
-
onTrigger: () => {
|
|
10
|
-
if (!gridRef.current?.api) {
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
const api = gridRef.current.api;
|
|
14
|
-
api.forEachNodeAfterFilterAndSort((node) => {
|
|
15
|
-
if (node.displayed && node.data) {
|
|
16
|
-
node.setSelected(true);
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
},
|
|
20
|
-
});
|
|
21
|
-
(0, utils_1.useGlobalKeyboardShortcut)({
|
|
22
|
-
key: "a",
|
|
23
|
-
modifierKeys: "alt",
|
|
24
|
-
onTrigger: () => {
|
|
25
|
-
if (!gridRef.current?.api) {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
const api = gridRef.current.api;
|
|
29
|
-
api.forEachNodeAfterFilterAndSort((node) => {
|
|
30
|
-
if (node.displayed && node.data) {
|
|
31
|
-
node.setSelected(false);
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
},
|
|
35
|
-
});
|
|
36
|
-
};
|
|
37
|
-
exports.useAgGridKeyboardShortcuts = useAgGridKeyboardShortcuts;
|