Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blocks: move from editor to block-editor #14047

Merged
merged 1 commit into from
Nov 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion extensions/blocks/business-hours/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import apiFetch from '@wordpress/api-fetch';
import classNames from 'classnames';
import { __ } from '@wordpress/i18n';
import { __experimentalGetSettings } from '@wordpress/date';
import { BlockIcon } from '@wordpress/editor';
import { BlockIcon } from '@wordpress/block-editor';
import { Component } from '@wordpress/element';
import { Placeholder } from '@wordpress/components';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
} from '@wordpress/components';
import { Component, Fragment } from '@wordpress/element';
import { compose, withInstanceId } from '@wordpress/compose';
import { InnerBlocks, InspectorControls, URLInput } from '@wordpress/editor';
import { InnerBlocks, InspectorControls, URLInput } from '@wordpress/block-editor';

/**
* Internal dependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { __ } from '@wordpress/i18n';
import { BaseControl, PanelBody, TextControl, ToggleControl } from '@wordpress/components';
import { Fragment } from '@wordpress/element';
import { InspectorControls } from '@wordpress/editor';
import { InspectorControls } from '@wordpress/block-editor';
import { withInstanceId } from '@wordpress/compose';

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* External dependencies
*/
import { __ } from '@wordpress/i18n';
import { PlainText } from '@wordpress/editor';
import { PlainText } from '@wordpress/block-editor';
import { ToggleControl } from '@wordpress/components';

const JetpackFieldLabel = ( { setAttributes, label, resetFocus, isSelected, required } ) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { __ } from '@wordpress/i18n';
import { BaseControl, IconButton, PanelBody, TextControl } from '@wordpress/components';
import { Component, Fragment } from '@wordpress/element';
import { InspectorControls } from '@wordpress/editor';
import { InspectorControls } from '@wordpress/block-editor';
import { withInstanceId } from '@wordpress/compose';

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
import { __ } from '@wordpress/i18n';
import { Fragment } from '@wordpress/element';
import { InspectorControls } from '@wordpress/editor';
import { InspectorControls } from '@wordpress/block-editor';
import { PanelBody, TextareaControl, TextControl } from '@wordpress/components';

/**
Expand Down
2 changes: 1 addition & 1 deletion extensions/blocks/contact-form/components/jetpack-field.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import classNames from 'classnames';
import { __ } from '@wordpress/i18n';
import { Fragment } from '@wordpress/element';
import { InspectorControls } from '@wordpress/editor';
import { InspectorControls } from '@wordpress/block-editor';
import { PanelBody, TextControl } from '@wordpress/components';

/**
Expand Down
2 changes: 1 addition & 1 deletion extensions/blocks/contact-form/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { __, _x } from '@wordpress/i18n';
import { getBlockType, createBlock } from '@wordpress/blocks';
import { Path, Circle } from '@wordpress/components';
import { Fragment } from '@wordpress/element';
import { InnerBlocks } from '@wordpress/editor';
import { InnerBlocks } from '@wordpress/block-editor';

/**
* Internal dependencies
Expand Down
2 changes: 1 addition & 1 deletion extensions/blocks/contact-info/address/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import classnames from 'classnames';
import { __ } from '@wordpress/i18n';
import { Component, Fragment } from '@wordpress/element';
import { PlainText } from '@wordpress/editor';
import { PlainText } from '@wordpress/block-editor';
import { ToggleControl } from '@wordpress/components';

/**
Expand Down
2 changes: 1 addition & 1 deletion extensions/blocks/contact-info/edit.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
import { InnerBlocks } from '@wordpress/editor';
import { InnerBlocks } from '@wordpress/block-editor';
import classnames from 'classnames';

/**
Expand Down
2 changes: 1 addition & 1 deletion extensions/blocks/contact-info/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* External dependencies
*/
import { __, _x } from '@wordpress/i18n';
import { InnerBlocks } from '@wordpress/editor';
import { InnerBlocks } from '@wordpress/block-editor';
import { Path } from '@wordpress/components';

/**
Expand Down
2 changes: 1 addition & 1 deletion extensions/blocks/gif/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import classNames from 'classnames';
import { __ } from '@wordpress/i18n';
import { Component, createRef } from '@wordpress/element';
import { Button, PanelBody, Path, Placeholder, SVG, TextControl } from '@wordpress/components';
import { InspectorControls, RichText } from '@wordpress/editor';
import { InspectorControls, RichText } from '@wordpress/block-editor';

/**
* Internal dependencies
Expand Down
2 changes: 1 addition & 1 deletion extensions/blocks/mailchimp/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
TextControl,
withNotices,
} from '@wordpress/components';
import { InspectorControls, RichText } from '@wordpress/editor';
import { InspectorControls, RichText } from '@wordpress/block-editor';
import { Fragment, Component } from '@wordpress/element';

/**
Expand Down
2 changes: 1 addition & 1 deletion extensions/blocks/map/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
BlockControls,
InspectorControls,
PanelColorSettings,
} from '@wordpress/editor';
} from '@wordpress/block-editor';

/**
* Internal dependencies
Expand Down
6 changes: 3 additions & 3 deletions extensions/blocks/markdown/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* External dependencies
*/
import { __ } from '@wordpress/i18n';
import { BlockControls, PlainText } from '@wordpress/editor';
import { BlockControls, PlainText } from '@wordpress/block-editor';
import { Component } from '@wordpress/element';
import { compose } from '@wordpress/compose';
import { withDispatch, withSelect } from '@wordpress/data';
Expand Down Expand Up @@ -119,9 +119,9 @@ class MarkdownEdit extends Component {

export default compose( [
withSelect( select => ( {
currentBlockId: select( 'core/editor' ).getSelectedBlockClientId(),
currentBlockId: select( 'core/block-editor' ).getSelectedBlockClientId(),
} ) ),
withDispatch( ( dispatch, { currentBlockId } ) => ( {
removeBlock: () => dispatch( 'core/editor' ).removeBlocks( currentBlockId ),
removeBlock: () => dispatch( 'core/block-editor' ).removeBlocks( currentBlockId ),
} ) ),
] )( MarkdownEdit );
2 changes: 1 addition & 1 deletion extensions/blocks/pinterest/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { invoke } from 'lodash';
import { __, _x } from '@wordpress/i18n';
import { Component } from '@wordpress/element';
import { Placeholder, SandBox, Button, IconButton, Spinner, Toolbar } from '@wordpress/components';
import { BlockControls, BlockIcon } from '@wordpress/editor';
import { BlockControls, BlockIcon } from '@wordpress/block-editor';
import apiFetch from '@wordpress/api-fetch';

/**
Expand Down
2 changes: 1 addition & 1 deletion extensions/blocks/recurring-payments/edit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
withNotices,
SelectControl,
} from '@wordpress/components';
import { InspectorControls, BlockIcon } from '@wordpress/editor';
import { InspectorControls, BlockIcon } from '@wordpress/block-editor';
import { Fragment, Component } from '@wordpress/element';

/**
Expand Down
2 changes: 1 addition & 1 deletion extensions/blocks/related-posts/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* External dependencies
*/
import { __ } from '@wordpress/i18n';
import { BlockControls, InspectorControls } from '@wordpress/editor';
import { BlockControls, InspectorControls } from '@wordpress/block-editor';
import { PanelBody, RangeControl, ToggleControl, Toolbar, Path, SVG } from '@wordpress/components';
import { Component, Fragment } from '@wordpress/element';
import { get } from 'lodash';
Expand Down
4 changes: 2 additions & 2 deletions extensions/blocks/repeat-visitor/components/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { __, _n, sprintf } from '@wordpress/i18n';
import { Notice, TextControl, RadioControl, Placeholder } from '@wordpress/components';
import { Component } from '@wordpress/element';
import { InnerBlocks } from '@wordpress/editor';
import { InnerBlocks } from '@wordpress/block-editor';
import { withSelect } from '@wordpress/data';
import classNames from 'classnames';

Expand Down Expand Up @@ -107,7 +107,7 @@ class RepeatVisitorEdit extends Component {
}

export default withSelect( ( select, ownProps ) => {
const { isBlockSelected, hasSelectedInnerBlock } = select( 'core/editor' );
const { isBlockSelected, hasSelectedInnerBlock } = select( 'core/block-editor' );
return {
isSelected: isBlockSelected( ownProps.clientId ) || hasSelectedInnerBlock( ownProps.clientId ),
};
Expand Down
2 changes: 1 addition & 1 deletion extensions/blocks/repeat-visitor/components/save.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
import { InnerBlocks } from '@wordpress/editor';
import { InnerBlocks } from '@wordpress/block-editor';

export default ( { className } ) => {
return (
Expand Down
2 changes: 1 addition & 1 deletion extensions/blocks/simple-payments/featured-media.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* External dependencies
*/
import { __ } from '@wordpress/i18n';
import { BlockControls, MediaPlaceholder, MediaUpload } from '@wordpress/editor';
import { BlockControls, MediaPlaceholder, MediaUpload } from '@wordpress/block-editor';
import { Fragment } from '@wordpress/element';
import { get } from 'lodash';
import { Toolbar, ToolbarButton } from '@wordpress/components';
Expand Down
2 changes: 1 addition & 1 deletion extensions/blocks/slideshow/controls.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
import { BlockControls, InspectorControls, MediaUpload } from '@wordpress/editor';
import { BlockControls, InspectorControls, MediaUpload } from '@wordpress/block-editor';
import {
PanelBody,
RangeControl,
Expand Down
2 changes: 1 addition & 1 deletion extensions/blocks/slideshow/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { compose } from '@wordpress/compose';
import { filter, get, map, pick } from 'lodash';
import { isBlobURL } from '@wordpress/blob';
import { withDispatch, withSelect } from '@wordpress/data';
import { BlockIcon, MediaPlaceholder, mediaUpload } from '@wordpress/editor';
import { BlockIcon, MediaPlaceholder, mediaUpload } from '@wordpress/block-editor';
import { DropZone, FormFileUpload, withNotices } from '@wordpress/components';

/**
Expand Down
2 changes: 1 addition & 1 deletion extensions/blocks/slideshow/slideshow.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { __ } from '@wordpress/i18n';
import { Component, createRef } from '@wordpress/element';
import { isBlobURL } from '@wordpress/blob';
import { isEqual } from 'lodash';
import { RichText } from '@wordpress/editor';
import { RichText } from '@wordpress/block-editor';
import { Spinner } from '@wordpress/components';

/**
Expand Down
2 changes: 1 addition & 1 deletion extensions/blocks/tiled-gallery/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
MediaPlaceholder,
MediaUpload,
mediaUpload,
} from '@wordpress/editor';
} from '@wordpress/block-editor';
import {
DropZone,
FormFileUpload,
Expand Down
2 changes: 1 addition & 1 deletion extensions/blocks/videopress/deprecated/v1/save.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
import { RichText } from '@wordpress/editor';
import { RichText } from '@wordpress/block-editor';

export default function VideoPressSave( { attributes } ) {
const { caption, guid } = attributes;
Expand Down
2 changes: 1 addition & 1 deletion extensions/blocks/videopress/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
MediaUpload,
MediaUploadCheck,
RichText,
} from '@wordpress/editor';
} from '@wordpress/block-editor';
import { Component, createRef, Fragment } from '@wordpress/element';
import { __, _x, sprintf } from '@wordpress/i18n';
import classnames from 'classnames';
Expand Down
2 changes: 1 addition & 1 deletion extensions/blocks/videopress/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
import { createBlobURL } from '@wordpress/blob';
import { createBlock } from '@wordpress/blocks';
import { mediaUpload } from '@wordpress/editor';
import { mediaUpload } from '@wordpress/block-editor';
import { addFilter } from '@wordpress/hooks';
import { every } from 'lodash';

Expand Down
2 changes: 1 addition & 1 deletion extensions/blocks/videopress/save.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* External dependencies
*/
import { createHigherOrderComponent } from '@wordpress/compose';
import { RichText } from '@wordpress/editor';
import { RichText } from '@wordpress/block-editor';

/**
* Internal dependencies
Expand Down
2 changes: 1 addition & 1 deletion extensions/blocks/wordads/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* External dependencies
*/
import { __ } from '@wordpress/i18n';
import { BlockControls } from '@wordpress/editor';
import { BlockControls } from '@wordpress/block-editor';
import { Component, Fragment } from '@wordpress/element';
import { ToggleControl } from '@wordpress/components';

Expand Down
2 changes: 1 addition & 1 deletion extensions/shared/components/block-nudge/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { Button } from '@wordpress/components';
import { compose } from '@wordpress/compose';
import { withDispatch } from '@wordpress/data';
import { Warning } from '@wordpress/editor';
import { Warning } from '@wordpress/block-editor';

import './style.scss';

Expand Down
2 changes: 1 addition & 1 deletion extensions/shared/simple-input.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
import { PlainText } from '@wordpress/editor';
import { PlainText } from '@wordpress/block-editor';

const simpleInput = ( type, props, label, view, onChange ) => {
const { isSelected } = props;
Expand Down
4 changes: 2 additions & 2 deletions extensions/shared/submit-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
ContrastChecker,
RichText,
withColors,
} from '@wordpress/editor';
} from '@wordpress/block-editor';
import { isEqual, get } from 'lodash';

const { getComputedStyle } = window;
Expand Down Expand Up @@ -99,7 +99,7 @@ class SubmitButton extends Component {
className={ buttonClasses }
style={ buttonStyle }
keepPlaceholderOnFocus
formattingControls={ [] }
allowedFormats={ [] }
/>
</div>
<InspectorControls>
Expand Down