diff --git a/wax-prosemirror-components/index.js b/wax-prosemirror-components/index.js index a34e71fe9f0d4d426dc9f12ca985459b84629a31..546430148465ae618dc579979978f830f0351445 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 e0ab8227024c2ab9a4ab0065b2e689ce18dddf9e..ded4eb777302582b9373c4ceeaadd09a0d5a4722 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 450a939c2792bf1e4bd97ba9aeb9161cf8fe5cfc..9fe2509b2341f124487ac4446d223979481f85cc 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 f19fd580b10e01bfe223c6c488980bbdf5535a69..e2477c1dff6d0826dc99232d593a5a7a06a7303e 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 946c777eb9ec909daf6b9a1f394c58943204e546..3725575a89ae5becfc6baee578635505a4c3a40d 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;