From e2ef226463ed85d778bb6ab41eb7788c4984f2ee Mon Sep 17 00:00:00 2001
From: chris <kokosias@yahoo.gr>
Date: Sat, 19 Nov 2022 18:11:59 +0200
Subject: [PATCH] shortcut tool

---
 wax-prosemirror-components/index.js                          | 5 ++---
 .../ShortCutsInfoService/ShortCutsInfoTool.js                | 4 ++--
 .../ShortCutsInfoService/components}/EditorShortCutsTool.js  | 2 +-
 .../src/DisplayBlockLevel/TitleService/Title.js              | 2 +-
 .../TitleService}/components/TitleButton.js                  | 2 +-
 5 files changed, 7 insertions(+), 8 deletions(-)
 rename {wax-prosemirror-components/src/components/EditorInfo => wax-prosemirror-services/src/BottomInfoService/ShortCutsInfoService/components}/EditorShortCutsTool.js (98%)
 rename {wax-prosemirror-components/src => wax-prosemirror-services/src/DisplayBlockLevel/TitleService}/components/TitleButton.js (96%)

diff --git a/wax-prosemirror-components/index.js b/wax-prosemirror-components/index.js
index a34e71fe9..546430148 100644
--- a/wax-prosemirror-components/index.js
+++ b/wax-prosemirror-components/index.js
@@ -3,11 +3,10 @@ export { default as UndoRedoButton } from './src/components/UndoRedoButton';
 export { default as MenuButton } from './src/ui/buttons/MenuButton';
 export { default as icons } from './src/icons/icons';
 export { default as Icon } from './src/helpers/Icon';
-export { default as TitleButton } from './src/components/TitleButton';
 export { default as ToolGroupComponent } from './src/components/ToolGroupComponent';
 export { default as ToolGroups } from './src/components/ToolGroups';
 
+export { default as EditorInfoTool } from './src/components/EditorInfo/CounterInfo/EditorInfoTool';
+
 export { default as Tabs } from './src/ui/tabs/Tabs';
 export { default as BlockLevelTools } from './src/ui/tabs/BlockLevelTools';
-export { default as EditorInfoTool } from './src/components/EditorInfo/CounterInfo/EditorInfoTool';
-export { default as EditorShortCutsTool } from './src/components/EditorInfo/EditorShortCutsTool';
diff --git a/wax-prosemirror-services/src/BottomInfoService/ShortCutsInfoService/ShortCutsInfoTool.js b/wax-prosemirror-services/src/BottomInfoService/ShortCutsInfoService/ShortCutsInfoTool.js
index e0ab82270..ded4eb777 100644
--- a/wax-prosemirror-services/src/BottomInfoService/ShortCutsInfoService/ShortCutsInfoTool.js
+++ b/wax-prosemirror-services/src/BottomInfoService/ShortCutsInfoService/ShortCutsInfoTool.js
@@ -1,8 +1,8 @@
 import React from 'react';
 import { isEmpty } from 'lodash';
 import { injectable } from 'inversify';
-import { EditorShortCutsTool } from 'wax-prosemirror-components';
 import { Tools } from 'wax-prosemirror-core';
+import EditorShortCutsTool from './components/EditorShortCutsTool';
 
 @injectable()
 class ShortCutsInfoTool extends Tools {
@@ -14,7 +14,7 @@ class ShortCutsInfoTool extends Tools {
   }
 
   get enable() {
-    return state => {
+    return () => {
       return true;
     };
   }
diff --git a/wax-prosemirror-components/src/components/EditorInfo/EditorShortCutsTool.js b/wax-prosemirror-services/src/BottomInfoService/ShortCutsInfoService/components/EditorShortCutsTool.js
similarity index 98%
rename from wax-prosemirror-components/src/components/EditorInfo/EditorShortCutsTool.js
rename to wax-prosemirror-services/src/BottomInfoService/ShortCutsInfoService/components/EditorShortCutsTool.js
index 450a939c2..9fe2509b2 100644
--- a/wax-prosemirror-components/src/components/EditorInfo/EditorShortCutsTool.js
+++ b/wax-prosemirror-services/src/BottomInfoService/ShortCutsInfoService/components/EditorShortCutsTool.js
@@ -2,7 +2,7 @@ import React, { useMemo, useState, useRef } from 'react';
 import styled from 'styled-components';
 import { grid } from '@pubsweet/ui-toolkit';
 import { v4 as uuidv4 } from 'uuid';
-import MenuButton from '../../ui/buttons/MenuButton';
+import { MenuButton } from 'wax-prosemirror-components';
 import { useOnClickOutside } from 'wax-prosemirror-core';
 
 const Wrapper = styled.div`
diff --git a/wax-prosemirror-services/src/DisplayBlockLevel/TitleService/Title.js b/wax-prosemirror-services/src/DisplayBlockLevel/TitleService/Title.js
index f19fd580b..e2477c1df 100644
--- a/wax-prosemirror-services/src/DisplayBlockLevel/TitleService/Title.js
+++ b/wax-prosemirror-services/src/DisplayBlockLevel/TitleService/Title.js
@@ -1,8 +1,8 @@
 import React from 'react';
 import { isEmpty } from 'lodash';
 import { injectable } from 'inversify';
-import { TitleButton } from 'wax-prosemirror-components';
 import { Commands, DocumentHelpers, Tools } from 'wax-prosemirror-core';
+import TitleButton from './components/TitleButton';
 import checkLevelFromConfig from '../HeadingService/checkLevelFromConfig';
 
 @injectable()
diff --git a/wax-prosemirror-components/src/components/TitleButton.js b/wax-prosemirror-services/src/DisplayBlockLevel/TitleService/components/TitleButton.js
similarity index 96%
rename from wax-prosemirror-components/src/components/TitleButton.js
rename to wax-prosemirror-services/src/DisplayBlockLevel/TitleService/components/TitleButton.js
index 946c777eb..3725575a8 100644
--- a/wax-prosemirror-components/src/components/TitleButton.js
+++ b/wax-prosemirror-services/src/DisplayBlockLevel/TitleService/components/TitleButton.js
@@ -1,7 +1,7 @@
 /* eslint react/prop-types: 0 */
 import React, { useContext, useMemo, useEffect } from 'react';
 import { WaxContext, DocumentHelpers } from 'wax-prosemirror-core';
-import MenuButton from '../ui/buttons/MenuButton';
+import { MenuButton } from 'wax-prosemirror-components';
 
 const TitleButton = ({ view = {}, item }) => {
   const { active, icon, label, run, select, title } = item;
-- 
GitLab