Skip to content

Commit

Permalink
CB-5760 move hotkeys hook to core-blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
devnaumov committed Oct 14, 2024
1 parent 13c8ea9 commit 5cc0ac6
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 9 deletions.
1 change: 1 addition & 0 deletions webapp/packages/core-blocks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"mobx": "^6",
"mobx-react-lite": "^4",
"react": "^18",
"react-hotkeys-hook": "^4",
"reakit": "^1",
"reakit-utils": "^0"
},
Expand Down
4 changes: 1 addition & 3 deletions webapp/packages/core-blocks/src/Slide/SlideBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
import { observer } from 'mobx-react-lite';
import { useEffect, useRef } from 'react';

import { useHotkeys } from '@cloudbeaver/core-utils';

import { s, useMergeRefs, useS } from '../index.js';
import { s, useHotkeys, useMergeRefs, useS } from '../index.js';
import SlideBoxStyles from './SlideBox.module.css';
import SlideBoxElementStyles from './SlideElement.module.css';
import SlideBoxOverlayStyles from './SlideOverlay.module.css';
Expand Down
2 changes: 2 additions & 0 deletions webapp/packages/core-blocks/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* Licensed under the Apache License, Version 2.0.
* you may not use this file except in compliance with the License.
*/
export { useHotkeys } from 'react-hotkeys-hook';

export * from './CommonDialog/CommonDialog/CommonDialogBody.js';
export * from './CommonDialog/CommonDialog/CommonDialogFooter.js';
export * from './CommonDialog/CommonDialog/CommonDialogHeader.js';
Expand Down
3 changes: 1 addition & 2 deletions webapp/packages/core-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
"whatwg-mimetype": "^4",
"zod": "^3",
"zod-i18n-map": "^2",
"zod-validation-error": "^3",
"react-hotkeys-hook": "^4"
"zod-validation-error": "^3"
},
"peerDependencies": {},
"devDependencies": {
Expand Down
2 changes: 0 additions & 2 deletions webapp/packages/core-utils/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
* Licensed under the Apache License, Version 2.0.
* you may not use this file except in compliance with the License.
*/
export { useHotkeys } from 'react-hotkeys-hook';

export * from './Promises/CancellablePromise.js';
export * from './Promises/cancellableTimeout.js';
export * from './Promises/Deferred.js';
Expand Down
4 changes: 2 additions & 2 deletions webapp/packages/core-view/src/View/CaptureView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
import { observer } from 'mobx-react-lite';
import { useContext } from 'react';

import { s, useFocus, useS } from '@cloudbeaver/core-blocks';
import { s, useFocus, useHotkeys, useS } from '@cloudbeaver/core-blocks';
import { useService } from '@cloudbeaver/core-di';
import { isObjectsEqual, useHotkeys } from '@cloudbeaver/core-utils';
import { isObjectsEqual } from '@cloudbeaver/core-utils';

import { ActionService } from '../Action/ActionService.js';
import type { IActionItem } from '../Action/IActionItem.js';
Expand Down

0 comments on commit 5cc0ac6

Please sign in to comment.