@codezee/sixtify-brahma 0.2.143 → 0.2.145
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.js +1 -1
- package/packages/shared-components/dist/AgGrid/AgGrid.d.ts.map +1 -1
- package/packages/shared-components/dist/AgGrid/AgGrid.js +0 -1
- package/packages/shared-components/dist/AgGrid/hooks/useAgGridKeyboardShortcuts.js +1 -1
- package/packages/shared-components/dist/AppBar/AppBar.d.ts +4 -3
- package/packages/shared-components/dist/AppBar/AppBar.d.ts.map +1 -1
- package/packages/shared-components/dist/AppBar/AppBar.js +2 -2
- package/packages/shared-components/dist/utils/hooks/useGlobalKeyboardShortcut.d.ts +1 -1
- package/packages/shared-components/dist/utils/hooks/useGlobalKeyboardShortcut.d.ts.map +1 -1
- package/packages/shared-components/dist/utils/hooks/useGlobalKeyboardShortcut.js +12 -9
package/package.json
CHANGED
|
@@ -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 = "
|
|
12
|
+
function ActionButtons({ buttons, justifyContent = "end", sx, buttonSx, shouldOpenMenuOnShortcut = 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)({});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgGrid.d.ts","sourceRoot":"","sources":["../../src/AgGrid/AgGrid.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAIV,OAAO,EAGR,MAAM,mBAAmB,CAAC;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AAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAOjC,OAAO,yBAAyB,CAAC;AAUjC,eAAO,MAAM,iBAAiB,GAAI,KAAK,OAAO,CAAC,OAAO,CAAC,KAAG,IAczD,CAAC;AAEF,eAAO,MAAM,eAAe,KAAK,CAAC;AAElC,eAAO,MAAM,eAAe,UAAqB,CAAC;AAGlD,MAAM,MAAM,WAAW,CAAC,CAAC,GAAG,OAAO,IAAI,gBAAgB,CAAC,CAAC,CAAC,GAAG;IAC3D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC,CAAC;AAEF,KAAK,UAAU,GAAG,KAAK,CAAC,yBAAyB,CAAC,WAAW,CAAC,GAC5D,CAAC,CAAC,WAAW,EAAE,KAAK,EAAE,WAAW,CAAC,WAAW,CAAC,KAAK,GAAG,CAAC,OAAO,CAAC,CAAC;AAElE,eAAO,MAAM,MAAM,EAwPd,UAAU,CAAC"}
|
|
@@ -148,7 +148,6 @@ exports.AgGrid = (0, react_1.forwardRef)((props, ref) => {
|
|
|
148
148
|
}, [onFilterChanged, rowModelType, updateNoRowsOverlay]);
|
|
149
149
|
return ((0, jsx_runtime_1.jsxs)(AgGridStyleProvider_1.AgGridStyleProvider, { className: "ag-theme-quartz ", style: { width: "100%", height, position: "relative" }, children: [(0, jsx_runtime_1.jsx)(ag_grid_react_1.AgGridReact, { ref: ref, theme: "legacy", cacheBlockSize: cacheBlockSize, defaultColDef: {
|
|
150
150
|
...defaultColumnDef,
|
|
151
|
-
menuTabs: ["generalMenuTab", "filterMenuTab", "columnsMenuTab"],
|
|
152
151
|
floatingFilter: enableSecondRowFilter,
|
|
153
152
|
suppressFloatingFilterButton: enableSecondRowFilter,
|
|
154
153
|
filterParams: {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { type AppBarOwnProps } from "@mui/material";
|
|
1
2
|
import type { PropsWithChildren } from "react";
|
|
2
|
-
export type AppBarProps = {
|
|
3
|
-
drawerOpen
|
|
3
|
+
export type AppBarProps = AppBarOwnProps & {
|
|
4
|
+
drawerOpen?: boolean;
|
|
4
5
|
};
|
|
5
|
-
export declare const AppBar: ({ drawerOpen, children, }: PropsWithChildren<AppBarProps>) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const AppBar: ({ drawerOpen, children, ...props }: PropsWithChildren<AppBarProps>) => import("react/jsx-runtime").JSX.Element;
|
|
6
7
|
//# sourceMappingURL=AppBar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppBar.d.ts","sourceRoot":"","sources":["../../src/AppBar/AppBar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AppBar.d.ts","sourceRoot":"","sources":["../../src/AppBar/AppBar.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAS,MAAM,eAAe,CAAC;AAC3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAI/C,MAAM,MAAM,WAAW,GAAG,cAAc,GAAG;IACzC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,MAAM,GAAI,oCAIpB,iBAAiB,CAAC,WAAW,CAAC,4CAkBhC,CAAC"}
|
|
@@ -6,8 +6,8 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
6
6
|
const material_1 = require("@mui/material");
|
|
7
7
|
const PadBox_1 = require("../PadBox");
|
|
8
8
|
const AppBar_styled_1 = require("./AppBar.styled");
|
|
9
|
-
const AppBar = ({ drawerOpen, children, }) => {
|
|
10
|
-
return ((0, jsx_runtime_1.jsx)(AppBar_styled_1.StyledAppBar, { position: "fixed", open: drawerOpen, children: (0, jsx_runtime_1.jsx)(material_1.Stack, { direction: "row", alignItems: "center", minHeight: { xs: "58px", lg: "64px" }, children: (0, jsx_runtime_1.jsx)(PadBox_1.PadBox, { padding: {
|
|
9
|
+
const AppBar = ({ drawerOpen, children, ...props }) => {
|
|
10
|
+
return ((0, jsx_runtime_1.jsx)(AppBar_styled_1.StyledAppBar, { position: "fixed", open: drawerOpen, ...props, children: (0, jsx_runtime_1.jsx)(material_1.Stack, { direction: "row", alignItems: "center", minHeight: { xs: "58px", lg: "64px" }, children: (0, jsx_runtime_1.jsx)(PadBox_1.PadBox, { padding: {
|
|
11
11
|
padding: { lg: "0 20px", xs: "0px 5px" },
|
|
12
12
|
}, children: children }) }) }));
|
|
13
13
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGlobalKeyboardShortcut.d.ts","sourceRoot":"","sources":["../../../src/utils/hooks/useGlobalKeyboardShortcut.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"useGlobalKeyboardShortcut.d.ts","sourceRoot":"","sources":["../../../src/utils/hooks/useGlobalKeyboardShortcut.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,CAAC;AAEpD,KAAK,6BAA6B,GAAG;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,QAAQ,CAAC;IACpB,YAAY,CAAC,EAAE,YAAY,GAAG,YAAY,EAAE,CAAC;IAC7C,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAEF,eAAO,MAAM,yBAAyB,GAAI,qDAKvC,6BAA6B,SA8E/B,CAAC"}
|
|
@@ -14,9 +14,10 @@ const useGlobalKeyboardShortcut = ({ key, onTrigger, modifierKeys = "ctrl", with
|
|
|
14
14
|
const normalizedCode = key.length === 1 ? `Key${key.toUpperCase()}` : key;
|
|
15
15
|
const keyMatch = e.code?.toLowerCase() === normalizedCode?.toLowerCase();
|
|
16
16
|
if (withoutModifiers) {
|
|
17
|
-
const hasNoModifiers = !e.ctrlKey && !e.
|
|
17
|
+
const hasNoModifiers = !e.ctrlKey && !e.shiftKey && !e.altKey;
|
|
18
18
|
if (keyMatch && hasNoModifiers && !e.repeat) {
|
|
19
19
|
e.preventDefault();
|
|
20
|
+
e.stopImmediatePropagation();
|
|
20
21
|
e.stopPropagation();
|
|
21
22
|
onTrigger();
|
|
22
23
|
}
|
|
@@ -26,34 +27,36 @@ const useGlobalKeyboardShortcut = ({ key, onTrigger, modifierKeys = "ctrl", with
|
|
|
26
27
|
const modifierMatch = (0, every_1.default)(normalizedModifierKeys, (mod) => {
|
|
27
28
|
switch (mod) {
|
|
28
29
|
case "ctrl":
|
|
29
|
-
return e.ctrlKey
|
|
30
|
+
return e.ctrlKey;
|
|
30
31
|
case "shift":
|
|
31
32
|
return e.shiftKey;
|
|
32
|
-
case "
|
|
33
|
-
return e.
|
|
33
|
+
case "alt":
|
|
34
|
+
return e.altKey;
|
|
34
35
|
default:
|
|
35
36
|
return true;
|
|
36
37
|
}
|
|
37
38
|
});
|
|
38
39
|
const requiredModifiers = normalizedModifierKeys;
|
|
39
40
|
let requiredModifiersCount = 0;
|
|
40
|
-
if (requiredModifiers.includes("ctrl") &&
|
|
41
|
+
if (requiredModifiers.includes("ctrl") && e.ctrlKey) {
|
|
41
42
|
requiredModifiersCount++;
|
|
42
43
|
}
|
|
43
44
|
if (requiredModifiers.includes("shift") && e.shiftKey) {
|
|
44
45
|
requiredModifiersCount++;
|
|
45
46
|
}
|
|
47
|
+
if (requiredModifiers.includes("alt") && e.altKey) {
|
|
48
|
+
requiredModifiersCount++;
|
|
49
|
+
}
|
|
46
50
|
const hasExtraModifiers = (e.ctrlKey && !requiredModifiers.includes("ctrl")) ||
|
|
47
|
-
(e.
|
|
48
|
-
|
|
49
|
-
!requiredModifiers.includes("meta")) ||
|
|
50
|
-
(e.shiftKey && !requiredModifiers.includes("shift"));
|
|
51
|
+
(e.shiftKey && !requiredModifiers.includes("shift")) ||
|
|
52
|
+
(e.altKey && !requiredModifiers.includes("alt"));
|
|
51
53
|
if (keyMatch &&
|
|
52
54
|
modifierMatch &&
|
|
53
55
|
requiredModifiersCount === normalizedModifierKeys.length &&
|
|
54
56
|
!hasExtraModifiers &&
|
|
55
57
|
!e.repeat) {
|
|
56
58
|
e.preventDefault();
|
|
59
|
+
e.stopImmediatePropagation();
|
|
57
60
|
e.stopPropagation();
|
|
58
61
|
onTrigger();
|
|
59
62
|
}
|