From 3d7ec67f3cb20074693a934925a586e61fac7b8c Mon Sep 17 00:00:00 2001 From: chris <kokosias@yahoo.gr> Date: Sat, 19 Nov 2022 14:23:01 +0200 Subject: [PATCH] save button --- wax-prosemirror-components/index.js | 1 - .../src/BaseService/SaveService/Save.js | 9 ++------- .../BaseService/SaveService}/components/SaveButton.js | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) rename {wax-prosemirror-components/src => wax-prosemirror-services/src/BaseService/SaveService}/components/SaveButton.js (96%) diff --git a/wax-prosemirror-components/index.js b/wax-prosemirror-components/index.js index 6870d2819..1d983a0b3 100644 --- a/wax-prosemirror-components/index.js +++ b/wax-prosemirror-components/index.js @@ -28,7 +28,6 @@ export { default as TrackChangeOptionsTool } from './src/components/trackChanges export { default as CustomTagInlineComponent } from './src/components/customtag/CustomTagInlineComponent'; export { default as CustomTagInlineOverlayComponent } from './src/components/customtag/CustomTagInlineOverlayCompoment'; export { default as CustomTagBlockComponent } from './src/components/customtag/CustomTagBlockComponent'; -export { default as SaveButton } from './src/components/SaveButton'; export { default as ReactDropDownStyles } from './src/helpers/ReactDropDownStyles'; export { default as OENAsideButton } from './src/components/OEN/OENAsideButton'; diff --git a/wax-prosemirror-services/src/BaseService/SaveService/Save.js b/wax-prosemirror-services/src/BaseService/SaveService/Save.js index 533651184..4df48ccbe 100644 --- a/wax-prosemirror-services/src/BaseService/SaveService/Save.js +++ b/wax-prosemirror-services/src/BaseService/SaveService/Save.js @@ -1,8 +1,9 @@ import React from 'react'; import { isEmpty } from 'lodash'; import { injectable } from 'inversify'; -import { SaveButton, icons } from 'wax-prosemirror-components'; +import { icons } from 'wax-prosemirror-components'; import { Tools } from 'wax-prosemirror-core'; +import SaveButton from './components/SaveButton'; @injectable() export default class Save extends Tools { @@ -12,12 +13,6 @@ export default class Save extends Tools { content = icons.save; name = 'Save'; - get run() { - return (state, dispatch) => { - return true; - }; - } - renderTool(view) { if (isEmpty(view)) return null; // eslint-disable-next-line no-underscore-dangle diff --git a/wax-prosemirror-components/src/components/SaveButton.js b/wax-prosemirror-services/src/BaseService/SaveService/components/SaveButton.js similarity index 96% rename from wax-prosemirror-components/src/components/SaveButton.js rename to wax-prosemirror-services/src/BaseService/SaveService/components/SaveButton.js index 8eec53b41..af32edbc0 100644 --- a/wax-prosemirror-components/src/components/SaveButton.js +++ b/wax-prosemirror-services/src/BaseService/SaveService/components/SaveButton.js @@ -1,7 +1,7 @@ /* eslint react/prop-types: 0 */ import React, { useContext, useMemo, useEffect, useState } from 'react'; import { WaxContext } from 'wax-prosemirror-core'; -import MenuButton from '../ui/buttons/MenuButton'; +import { MenuButton } from 'wax-prosemirror-components'; const SaveButton = ({ view = {}, item }) => { const { icon, label, select, title } = item; -- GitLab