Skip to content

Commit

Permalink
Removed volto-slate/editor/ui/index usage
Browse files Browse the repository at this point in the history
  • Loading branch information
pnicolli committed Dec 8, 2024
1 parent 4f5c77a commit 83fb4c4
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 12 deletions.
1 change: 1 addition & 0 deletions docs/source/upgrade-guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,7 @@ The barrel imports files include the following in Volto.
They also include the following in the `@plone/volto-slate` package.

- {file}`src/actions/index.js`
- {file}`src/editor/ui/index.js`
- {file}`src/utils/index.js`

##### Alternative
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { BlockButton } from '@plone/volto-slate/editor/ui';
import BlockButton from '@plone/volto-slate/editor/ui/BlockButton';
import quoteIcon from '@plone/volto/icons/quote.svg';

// TODO: this needs to use constants for el type
Expand Down
2 changes: 1 addition & 1 deletion packages/volto-slate/src/editor/plugins/Callout/index.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { BlockButton } from '@plone/volto-slate/editor/ui';
import BlockButton from '@plone/volto-slate/editor/ui/BlockButton';
import calloutSVG from '@plone/volto/icons/megaphone.svg';

// TODO: this needs to use constants for el type
Expand Down
6 changes: 2 additions & 4 deletions packages/volto-slate/src/editor/plugins/Link/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ import { SIMPLELINK, LINK } from '@plone/volto-slate/constants';
import { LinkElement } from './render';
import { simpleLinkDeserializer, withSimpleLink } from './extensions';
import { setPluginOptions } from '@plone/volto-slate/actions/plugins';
import {
ToolbarButton as UIToolbarButton,
PositionedToolbar,
} from '@plone/volto-slate/editor/ui';
import UIToolbarButton from '@plone/volto-slate/editor/ui/ToolbarButton';
import PositionedToolbar from '@plone/volto-slate/editor/ui/PositionedToolbar';
import { useSelectionPosition } from '@plone/volto-slate/hooks/useSelectionPosition';

import linkSVG from '@plone/volto/icons/link.svg';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import cx from 'classnames';
import omit from 'lodash/omit';
import { isBlockStyleActive, isInlineStyleActive, toggleStyle } from './utils';
import config from '@plone/volto/registry';
import { ToolbarButton } from '@plone/volto-slate/editor/ui';
import ToolbarButton from '@plone/volto-slate/editor/ui/ToolbarButton';
import paintSVG from '@plone/volto/icons/paint.svg';

const messages = defineMessages({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { useSlate } from 'slate-react';
import { Dropdown } from 'semantic-ui-react';
import { ToolbarButton } from '@plone/volto-slate/editor/ui';
import ToolbarButton from '@plone/volto-slate/editor/ui/ToolbarButton';

import tableSVG from '@plone/volto/icons/table.svg';
import TableContainer from './TableContainer';
Expand Down
2 changes: 1 addition & 1 deletion packages/volto-slate/src/editor/plugins/Table/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import colAfterSVG from '@plone/volto/icons/column-after.svg';
import rowDeleteSVG from '@plone/volto/icons/row-delete.svg';
import colDeleteSVG from '@plone/volto/icons/column-delete.svg';

import { ToolbarButton } from '@plone/volto-slate/editor/ui';
import ToolbarButton from '@plone/volto-slate/editor/ui/ToolbarButton';
import { Range, Transforms, Editor, Path } from 'slate';
import { defineMessages, useIntl } from 'react-intl';
import { TABLE, TR, P, TD, TH } from '@plone/volto-slate/constants';
Expand Down
2 changes: 1 addition & 1 deletion packages/volto-slate/src/elementEditor/ContextButtons.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useIntl } from 'react-intl'; // , defineMessages

import clearSVG from '@plone/volto/icons/delete.svg';

import { ToolbarButton } from '@plone/volto-slate/editor/ui';
import ToolbarButton from '@plone/volto-slate/editor/ui/ToolbarButton';
import { setPluginOptions } from '@plone/volto-slate/actions/plugins';

/*
Expand Down
2 changes: 1 addition & 1 deletion packages/volto-slate/src/elementEditor/ToolbarButton.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useSlate } from 'slate-react';
import { useDispatch } from 'react-redux';
import omit from 'lodash/omit';

import { ToolbarButton } from '@plone/volto-slate/editor/ui';
import ToolbarButton from '@plone/volto-slate/editor/ui/ToolbarButton';
import { hasRangeSelection } from '@plone/volto-slate/utils/selection';
import { setPluginOptions } from '@plone/volto-slate/actions/plugins';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/

import React from 'react';
import { PositionedToolbar } from '@plone/volto-slate/editor/ui';
import PositionedToolbar from '@plone/volto-slate/editor/ui/PositionedToolbar';
import AddLinkForm from '@plone/volto/components/manage/AnchorPlugin/components/LinkButton/AddLinkForm';

function getPositionStyle(position) {
Expand Down

0 comments on commit 83fb4c4

Please sign in to comment.