diff --git a/editor/autosave-monitor/index.js b/editor/autosave-monitor/index.js index 3df65cb262721a..08692629c0959d 100644 --- a/editor/autosave-monitor/index.js +++ b/editor/autosave-monitor/index.js @@ -11,11 +11,11 @@ import { Component } from '@wordpress/element'; /** * Internal dependencies */ -import { autosave } from '../actions'; +import { autosave } from '../state/actions'; import { isEditedPostDirty, isEditedPostSaveable, -} from '../selectors'; +} from '../state/selectors'; export class AutosaveMonitor extends Component { componentDidUpdate( prevProps ) { diff --git a/editor/block-mover/index.js b/editor/block-mover/index.js index f86da5bcc86ee4..f9224733208390 100644 --- a/editor/block-mover/index.js +++ b/editor/block-mover/index.js @@ -15,9 +15,9 @@ import { getBlockType } from '@wordpress/blocks'; * Internal dependencies */ import './style.scss'; -import { isFirstBlock, isLastBlock, getBlockIndex, getBlock } from '../selectors'; +import { isFirstBlock, isLastBlock, getBlockIndex, getBlock } from '../state/selectors'; import { getBlockMoverLabel } from './mover-label'; -import { selectBlock } from '../actions'; +import { selectBlock } from '../state/actions'; function BlockMover( { onMoveUp, onMoveDown, isFirst, isLast, uids, blockType, firstIndex } ) { // We emulate a disabled state because forcefully applying the `disabled` diff --git a/editor/block-settings-menu/content.js b/editor/block-settings-menu/content.js index ab5952a4e0da3f..256c3390eb73e4 100644 --- a/editor/block-settings-menu/content.js +++ b/editor/block-settings-menu/content.js @@ -13,8 +13,8 @@ import { IconButton } from '@wordpress/components'; /** * Internal dependencies */ -import { isEditorSidebarOpened, getBlockMode } from '../selectors'; -import { removeBlocks, toggleSidebar, setActivePanel, toggleBlockMode } from '../actions'; +import { isEditorSidebarOpened, getBlockMode } from '../state/selectors'; +import { removeBlocks, toggleSidebar, setActivePanel, toggleBlockMode } from '../state/actions'; function BlockSettingsMenuContent( { mode, uids, isSidebarOpened, onDelete, onToggleSidebar, onShowInspector, onToggleMode, onClose } ) { const count = uids.length; diff --git a/editor/block-settings-menu/index.js b/editor/block-settings-menu/index.js index fc9deb23b06c64..e9022253bf7920 100644 --- a/editor/block-settings-menu/index.js +++ b/editor/block-settings-menu/index.js @@ -15,7 +15,7 @@ import { IconButton, Dropdown } from '@wordpress/components'; */ import './style.scss'; import BlockSettingsMenuContent from './content'; -import { selectBlock } from '../actions'; +import { selectBlock } from '../state/actions'; function BlockSettingsMenu( { uids, onSelect } ) { return ( diff --git a/editor/block-switcher/index.js b/editor/block-switcher/index.js index 7d78f6082ce957..86c6366c3fee08 100644 --- a/editor/block-switcher/index.js +++ b/editor/block-switcher/index.js @@ -16,8 +16,8 @@ import { keycodes } from '@wordpress/utils'; * Internal dependencies */ import './style.scss'; -import { replaceBlocks } from '../actions'; -import { getBlock } from '../selectors'; +import { replaceBlocks } from '../state/actions'; +import { getBlock } from '../state/selectors'; /** * Module Constants diff --git a/editor/document-outline/index.js b/editor/document-outline/index.js index 7673dd28477f1e..732bc0d34172dd 100644 --- a/editor/document-outline/index.js +++ b/editor/document-outline/index.js @@ -14,8 +14,8 @@ import { __ } from '@wordpress/i18n'; */ import './style.scss'; import DocumentOutlineItem from './item'; -import { getBlocks } from '../selectors'; -import { selectBlock } from '../actions'; +import { getBlocks } from '../state/selectors'; +import { selectBlock } from '../state/actions'; /** * Module constants diff --git a/editor/document-title/index.js b/editor/document-title/index.js index f3f45e86bf3b47..f9df08c9ecab3c 100644 --- a/editor/document-title/index.js +++ b/editor/document-title/index.js @@ -7,7 +7,7 @@ import { Component } from 'react'; /** * Internal dependencies */ -import { getDocumentTitle } from '../selectors'; +import { getDocumentTitle } from '../state/selectors'; class DocumentTitle extends Component { diff --git a/editor/header/index.js b/editor/header/index.js index e4bf0addfb351e..75ec0653b30c6f 100644 --- a/editor/header/index.js +++ b/editor/header/index.js @@ -18,8 +18,8 @@ import PublishWithDropdown from './publish-with-dropdown'; import PreviewButton from './preview-button'; import ModeSwitcher from './mode-switcher'; import Inserter from '../inserter'; -import { hasEditorUndo, hasEditorRedo, isEditorSidebarOpened } from '../selectors'; -import { toggleSidebar } from '../actions'; +import { hasEditorUndo, hasEditorRedo, isEditorSidebarOpened } from '../state/selectors'; +import { toggleSidebar } from '../state/actions'; function Header( { undo, diff --git a/editor/header/mode-switcher/index.js b/editor/header/mode-switcher/index.js index 7cc01cd42c0126..c923beb768b9f5 100644 --- a/editor/header/mode-switcher/index.js +++ b/editor/header/mode-switcher/index.js @@ -13,7 +13,7 @@ import { IconButton, Dropdown } from '@wordpress/components'; * Internal dependencies */ import './style.scss'; -import { getEditorMode } from '../../selectors'; +import { getEditorMode } from '../../state/selectors'; /** * Set of available mode options. diff --git a/editor/header/preview-button/index.js b/editor/header/preview-button/index.js index e098ba94e018a3..481577ac119067 100644 --- a/editor/header/preview-button/index.js +++ b/editor/header/preview-button/index.js @@ -19,8 +19,8 @@ import { isEditedPostDirty, isEditedPostNew, isEditedPostSaveable, -} from '../../selectors'; -import { autosave } from '../../actions'; +} from '../../state/selectors'; +import { autosave } from '../../state/actions'; export class PreviewButton extends Component { constructor() { diff --git a/editor/header/publish-button/index.js b/editor/header/publish-button/index.js index 12e55e76e4f4f6..99b58894a451a9 100644 --- a/editor/header/publish-button/index.js +++ b/editor/header/publish-button/index.js @@ -15,14 +15,14 @@ import { Button, withAPIData } from '@wordpress/components'; */ import './style.scss'; import PublishButtonLabel from './label'; -import { editPost, savePost } from '../../actions'; +import { editPost, savePost } from '../../state/actions'; import { isSavingPost, isEditedPostBeingScheduled, getEditedPostVisibility, isEditedPostSaveable, isEditedPostPublishable, -} from '../../selectors'; +} from '../../state/selectors'; export function PublishButton( { isSaving, diff --git a/editor/header/publish-button/label.js b/editor/header/publish-button/label.js index 17f3bd861f9c35..78cd9781c2a9c7 100644 --- a/editor/header/publish-button/label.js +++ b/editor/header/publish-button/label.js @@ -17,7 +17,7 @@ import './style.scss'; import { isCurrentPostPublished, isEditedPostBeingScheduled, -} from '../../selectors'; +} from '../../state/selectors'; export function PublishButtonLabel( { isPublished, diff --git a/editor/header/publish-with-dropdown/index.js b/editor/header/publish-with-dropdown/index.js index 6eed9803821edd..619c3625055676 100644 --- a/editor/header/publish-with-dropdown/index.js +++ b/editor/header/publish-with-dropdown/index.js @@ -18,7 +18,7 @@ import { isSavingPost, isEditedPostSaveable, isEditedPostPublishable, -} from '../../selectors'; +} from '../../state/selectors'; function PublishWithDropdown( { isSaving, isPublishable, isSaveable } ) { const isButtonEnabled = ! isSaving && isPublishable && isSaveable; diff --git a/editor/header/saved-state/index.js b/editor/header/saved-state/index.js index 4fdbb8f198303c..c4f2948e982a18 100644 --- a/editor/header/saved-state/index.js +++ b/editor/header/saved-state/index.js @@ -14,7 +14,7 @@ import { Dashicon, Button } from '@wordpress/components'; * Internal dependencies */ import './style.scss'; -import { editPost, savePost } from '../../actions'; +import { editPost, savePost } from '../../state/actions'; import { isEditedPostNew, isCurrentPostPublished, @@ -23,7 +23,7 @@ import { isEditedPostSaveable, getCurrentPost, getEditedPostAttribute, -} from '../../selectors'; +} from '../../state/selectors'; export function SavedState( { isNew, isPublished, isDirty, isSaving, isSaveable, status, onStatusChange, onSave } ) { const className = 'editor-saved-state'; diff --git a/editor/inserter/index.js b/editor/inserter/index.js index e04300bc1a3605..3c5df38e3127b2 100644 --- a/editor/inserter/index.js +++ b/editor/inserter/index.js @@ -16,13 +16,13 @@ import { Component } from '@wordpress/element'; * Internal dependencies */ import InserterMenu from './menu'; -import { getBlockInsertionPoint, getEditorMode } from '../selectors'; +import { getBlockInsertionPoint, getEditorMode } from '../state/selectors'; import { insertBlock, setBlockInsertionPoint, clearBlockInsertionPoint, hideInsertionPoint, -} from '../actions'; +} from '../state/actions'; class Inserter extends Component { constructor() { diff --git a/editor/inserter/menu.js b/editor/inserter/menu.js index 785688db1a20ef..8807e44a276799 100644 --- a/editor/inserter/menu.js +++ b/editor/inserter/menu.js @@ -17,8 +17,8 @@ import { getCategories, getBlockTypes, BlockIcon } from '@wordpress/blocks'; * Internal dependencies */ import './style.scss'; -import { getBlocks, getRecentlyUsedBlocks } from '../selectors'; -import { showInsertionPoint, hideInsertionPoint } from '../actions'; +import { getBlocks, getRecentlyUsedBlocks } from '../state/selectors'; +import { showInsertionPoint, hideInsertionPoint } from '../state/actions'; const { TAB, LEFT, UP, RIGHT, DOWN } = keycodes; diff --git a/editor/layout/index.js b/editor/layout/index.js index abd11e474cdc9d..96a5d4463e9eb9 100644 --- a/editor/layout/index.js +++ b/editor/layout/index.js @@ -21,12 +21,12 @@ import MetaBoxes from '../meta-boxes'; import UnsavedChangesWarning from '../unsaved-changes-warning'; import DocumentTitle from '../document-title'; import AutosaveMonitor from '../autosave-monitor'; -import { removeNotice } from '../actions'; +import { removeNotice } from '../state/actions'; import { getEditorMode, isEditorSidebarOpened, getNotices, -} from '../selectors'; +} from '../state/selectors'; function Layout( { mode, isSidebarOpened, notices, ...props } ) { const className = classnames( 'editor-layout', { diff --git a/editor/modes/text-editor/index.js b/editor/modes/text-editor/index.js index 846efa57c71f90..72f14a71440c7b 100644 --- a/editor/modes/text-editor/index.js +++ b/editor/modes/text-editor/index.js @@ -16,8 +16,8 @@ import { parse } from '@wordpress/blocks'; */ import './style.scss'; import PostTitle from '../../post-title'; -import { getEditedPostContent } from '../../selectors'; -import { editPost, resetBlocks } from '../../actions'; +import { getEditedPostContent } from '../../state/selectors'; +import { editPost, resetBlocks } from '../../state/actions'; class TextEditor extends Component { constructor( props ) { diff --git a/editor/modes/visual-editor/block-drop-zone.js b/editor/modes/visual-editor/block-drop-zone.js index ef8da49f0e459d..4e0a127935687b 100644 --- a/editor/modes/visual-editor/block-drop-zone.js +++ b/editor/modes/visual-editor/block-drop-zone.js @@ -13,7 +13,7 @@ import { getBlockTypes } from '@wordpress/blocks'; /** * Internal dependencies */ -import { insertBlocks } from '../../actions'; +import { insertBlocks } from '../../state/actions'; function BlockDropZone( { index, ...props } ) { const dropFiles = ( files, position ) => { diff --git a/editor/modes/visual-editor/block-html.js b/editor/modes/visual-editor/block-html.js index 4a6e62271d2393..8d3327f799d699 100644 --- a/editor/modes/visual-editor/block-html.js +++ b/editor/modes/visual-editor/block-html.js @@ -14,8 +14,8 @@ import TextareaAutosize from 'react-autosize-textarea'; /** * Internal Dependencies */ -import { updateBlock } from '../../actions'; -import { getBlock } from '../../selectors'; +import { updateBlock } from '../../state/actions'; +import { getBlock } from '../../state/selectors'; class BlockHTML extends Component { constructor( props ) { diff --git a/editor/modes/visual-editor/block-list.js b/editor/modes/visual-editor/block-list.js index 27652ec19e8ba4..c8ce8f4983f84e 100644 --- a/editor/modes/visual-editor/block-list.js +++ b/editor/modes/visual-editor/block-list.js @@ -24,8 +24,8 @@ import { getMultiSelectedBlocks, getMultiSelectedBlockUids, getSelectedBlock, -} from '../../selectors'; -import { insertBlock, startMultiSelect, stopMultiSelect, multiSelect, selectBlock } from '../../actions'; +} from '../../state/selectors'; +import { insertBlock, startMultiSelect, stopMultiSelect, multiSelect, selectBlock } from '../../state/actions'; class VisualEditorBlockList extends Component { constructor( props ) { diff --git a/editor/modes/visual-editor/block.js b/editor/modes/visual-editor/block.js index a009afe11af56b..c150f32a70bb96 100644 --- a/editor/modes/visual-editor/block.js +++ b/editor/modes/visual-editor/block.js @@ -36,7 +36,7 @@ import { startTyping, stopTyping, updateBlockAttributes, -} from '../../actions'; +} from '../../state/actions'; import { getBlock, getBlockFocus, @@ -52,7 +52,7 @@ import { isFirstMultiSelectedBlock, isTyping, getBlockMode, -} from '../../selectors'; +} from '../../state/selectors'; const { BACKSPACE, ESCAPE, DELETE, ENTER } = keycodes; diff --git a/editor/modes/visual-editor/index.js b/editor/modes/visual-editor/index.js index fbafded4aceb84..0d13ec8087785b 100644 --- a/editor/modes/visual-editor/index.js +++ b/editor/modes/visual-editor/index.js @@ -20,8 +20,8 @@ import VisualEditorInserter from './inserter'; import PostTitle from '../../post-title'; import WritingFlow from '../../writing-flow'; import TableOfContents from '../../table-of-contents'; -import { getBlockUids, getMultiSelectedBlockUids } from '../../selectors'; -import { clearSelectedBlock, multiSelect, redo, undo, removeBlocks } from '../../actions'; +import { getBlockUids, getMultiSelectedBlockUids } from '../../state/selectors'; +import { clearSelectedBlock, multiSelect, redo, undo, removeBlocks } from '../../state/actions'; class VisualEditor extends Component { constructor() { diff --git a/editor/modes/visual-editor/inserter.js b/editor/modes/visual-editor/inserter.js index 1e8128a0f47a02..80ada632f5f7f8 100644 --- a/editor/modes/visual-editor/inserter.js +++ b/editor/modes/visual-editor/inserter.js @@ -16,8 +16,8 @@ import { createBlock } from '@wordpress/blocks'; * Internal dependencies */ import Inserter from '../../inserter'; -import { insertBlock } from '../../actions'; -import { getMostFrequentlyUsedBlocks, getBlockCount } from '../../selectors'; +import { insertBlock } from '../../state/actions'; +import { getMostFrequentlyUsedBlocks, getBlockCount } from '../../state/selectors'; export class VisualEditorInserter extends Component { constructor() { diff --git a/editor/modes/visual-editor/invalid-block-warning.js b/editor/modes/visual-editor/invalid-block-warning.js index 26d580b07dabcc..95dcfb405333c7 100644 --- a/editor/modes/visual-editor/invalid-block-warning.js +++ b/editor/modes/visual-editor/invalid-block-warning.js @@ -22,7 +22,7 @@ import { /** * Internal dependencies */ -import { replaceBlock } from '../../actions'; +import { replaceBlock } from '../../state/actions'; function InvalidBlockWarning( { ignoreInvalid, switchToBlockType } ) { const htmlBlockName = 'core/html'; diff --git a/editor/modes/visual-editor/sibling-inserter.js b/editor/modes/visual-editor/sibling-inserter.js index 061687944ab032..a1e3b4de6c4335 100644 --- a/editor/modes/visual-editor/sibling-inserter.js +++ b/editor/modes/visual-editor/sibling-inserter.js @@ -17,7 +17,7 @@ import Inserter from '../../inserter'; import { getBlockInsertionPoint, isBlockInsertionPointVisible, -} from '../../selectors'; +} from '../../state/selectors'; class VisualEditorSiblingInserter extends Component { constructor() { diff --git a/editor/post-permalink/index.js b/editor/post-permalink/index.js index 2f7fc86277e431..f9613f9d2c2917 100644 --- a/editor/post-permalink/index.js +++ b/editor/post-permalink/index.js @@ -14,7 +14,7 @@ import { Dashicon, ClipboardButton, Button } from '@wordpress/components'; * Internal Dependencies */ import './style.scss'; -import { isEditedPostNew, getEditedPostAttribute } from '../selectors'; +import { isEditedPostNew, getEditedPostAttribute } from '../state/selectors'; class PostPermalink extends Component { constructor() { diff --git a/editor/post-title/index.js b/editor/post-title/index.js index 5fbffe8ef1833b..0daaa30b43a8c8 100644 --- a/editor/post-title/index.js +++ b/editor/post-title/index.js @@ -17,8 +17,8 @@ import { keycodes } from '@wordpress/utils'; * Internal dependencies */ import './style.scss'; -import { getEditedPostTitle } from '../selectors'; -import { editPost, clearSelectedBlock } from '../actions'; +import { getEditedPostTitle } from '../state/selectors'; +import { editPost, clearSelectedBlock } from '../state/actions'; import PostPermalink from '../post-permalink'; /** diff --git a/editor/provider/index.js b/editor/provider/index.js index 22d8aca3adc379..d2890bc8875e39 100644 --- a/editor/provider/index.js +++ b/editor/provider/index.js @@ -19,8 +19,8 @@ import { /** * Internal Dependencies */ -import { setupEditor, undo } from '../actions'; -import createReduxStore from '../store'; +import { setupEditor, undo } from '../state/actions'; +import createReduxStore from '../state'; /** * The default editor settings diff --git a/editor/sidebar/block-inspector/advanced-controls.js b/editor/sidebar/block-inspector/advanced-controls.js index 0670ea946e3450..097922f6b908f4 100644 --- a/editor/sidebar/block-inspector/advanced-controls.js +++ b/editor/sidebar/block-inspector/advanced-controls.js @@ -14,8 +14,8 @@ import { ClipboardButton, Tooltip, PanelBody } from '@wordpress/components'; /** * Internal Dependencies */ -import { updateBlockAttributes } from '../../actions'; -import { getSelectedBlock, getCurrentPost } from '../../selectors'; +import { updateBlockAttributes } from '../../state/actions'; +import { getSelectedBlock, getCurrentPost } from '../../state/selectors'; import { filterURLForDisplay } from '../../utils/url'; /** diff --git a/editor/sidebar/block-inspector/index.js b/editor/sidebar/block-inspector/index.js index 5e35ee3731be67..e6783bb65d4b89 100644 --- a/editor/sidebar/block-inspector/index.js +++ b/editor/sidebar/block-inspector/index.js @@ -14,7 +14,7 @@ import { Panel, PanelBody, Slot } from '@wordpress/components'; */ import './style.scss'; import BlockInspectorAdvancedControls from './advanced-controls'; -import { getSelectedBlock, getSelectedBlockCount } from '../../selectors'; +import { getSelectedBlock, getSelectedBlockCount } from '../../state/selectors'; const BlockInspector = ( { selectedBlock, count } ) => { if ( count > 1 ) { diff --git a/editor/sidebar/discussion-panel/index.js b/editor/sidebar/discussion-panel/index.js index b42a76b648d07f..cc89264f5f2041 100644 --- a/editor/sidebar/discussion-panel/index.js +++ b/editor/sidebar/discussion-panel/index.js @@ -12,8 +12,8 @@ import { PanelBody, PanelRow, FormToggle, withInstanceId } from '@wordpress/comp /** * Internal Dependencies */ -import { getEditedPostAttribute, isEditorSidebarPanelOpened } from '../../selectors'; -import { editPost, toggleSidebarPanel } from '../../actions'; +import { getEditedPostAttribute, isEditorSidebarPanelOpened } from '../../state/selectors'; +import { editPost, toggleSidebarPanel } from '../../state/actions'; /** * Module Constants diff --git a/editor/sidebar/document-outline-panel/index.js b/editor/sidebar/document-outline-panel/index.js index 0c87c66207bfae..801e7545d706fe 100644 --- a/editor/sidebar/document-outline-panel/index.js +++ b/editor/sidebar/document-outline-panel/index.js @@ -14,8 +14,8 @@ import { PanelBody } from '@wordpress/components'; * Internal dependencies */ import DocumentOutline from '../../document-outline'; -import { getBlocks, isEditorSidebarPanelOpened } from '../../selectors'; -import { toggleSidebarPanel } from '../../actions'; +import { getBlocks, isEditorSidebarPanelOpened } from '../../state/selectors'; +import { toggleSidebarPanel } from '../../state/actions'; /** * Module constants diff --git a/editor/sidebar/featured-image/index.js b/editor/sidebar/featured-image/index.js index 7f738a243db6d3..4d37bb865762da 100644 --- a/editor/sidebar/featured-image/index.js +++ b/editor/sidebar/featured-image/index.js @@ -15,8 +15,8 @@ import { MediaUploadButton } from '@wordpress/blocks'; * Internal dependencies */ import './style.scss'; -import { getEditedPostAttribute, isEditorSidebarPanelOpened } from '../../selectors'; -import { editPost, toggleSidebarPanel } from '../../actions'; +import { getEditedPostAttribute, isEditorSidebarPanelOpened } from '../../state/selectors'; +import { editPost, toggleSidebarPanel } from '../../state/actions'; /** * Module Constants diff --git a/editor/sidebar/header.js b/editor/sidebar/header.js index d2788cf4a1f7db..fa4ffec8071c1d 100644 --- a/editor/sidebar/header.js +++ b/editor/sidebar/header.js @@ -12,8 +12,8 @@ import { IconButton } from '@wordpress/components'; /** * Internal Dependencies */ -import { getActivePanel, getSelectedBlockCount } from '../selectors'; -import { toggleSidebar, setActivePanel } from '../actions'; +import { getActivePanel, getSelectedBlockCount } from '../state/selectors'; +import { toggleSidebar, setActivePanel } from '../state/actions'; const SidebarHeader = ( { panel, onSetPanel, onToggleSidebar, count } ) => { // Do not display "0 Blocks". diff --git a/editor/sidebar/index.js b/editor/sidebar/index.js index bd5d0eb8c6d533..ea2faf0b216ede 100644 --- a/editor/sidebar/index.js +++ b/editor/sidebar/index.js @@ -16,7 +16,7 @@ import './style.scss'; import PostSettings from './post-settings'; import BlockInspector from './block-inspector'; import Header from './header'; -import { getActivePanel } from '../selectors'; +import { getActivePanel } from '../state/selectors'; const Sidebar = ( { panel } ) => { return ( diff --git a/editor/sidebar/last-revision/index.js b/editor/sidebar/last-revision/index.js index bc0f0c34960c1f..5c090b0dfb0250 100644 --- a/editor/sidebar/last-revision/index.js +++ b/editor/sidebar/last-revision/index.js @@ -19,7 +19,7 @@ import { getCurrentPostId, getCurrentPostType, isSavingPost, -} from '../../selectors'; +} from '../../state/selectors'; import { getWPAdminURL } from '../../utils/url'; function LastRevision( { revisions } ) { diff --git a/editor/sidebar/page-attributes/index.js b/editor/sidebar/page-attributes/index.js index 296fd807858d16..1921e13afef5a9 100644 --- a/editor/sidebar/page-attributes/index.js +++ b/editor/sidebar/page-attributes/index.js @@ -14,8 +14,8 @@ import { PanelBody, PanelRow, withAPIData, withInstanceId } from '@wordpress/com /** * Internal dependencies */ -import { editPost, toggleSidebarPanel } from '../../actions'; -import { getCurrentPostType, getEditedPostAttribute, isEditorSidebarPanelOpened } from '../../selectors'; +import { editPost, toggleSidebarPanel } from '../../state/actions'; +import { getCurrentPostType, getEditedPostAttribute, isEditorSidebarPanelOpened } from '../../state/selectors'; /** * Module Constants diff --git a/editor/sidebar/post-author/index.js b/editor/sidebar/post-author/index.js index 08dab3f6a6b848..a1c06c2a35103b 100644 --- a/editor/sidebar/post-author/index.js +++ b/editor/sidebar/post-author/index.js @@ -15,8 +15,8 @@ import { Component } from '@wordpress/element'; * Internal dependencies */ import './style.scss'; -import { getEditedPostAttribute } from '../../selectors'; -import { editPost } from '../../actions'; +import { getEditedPostAttribute } from '../../state/selectors'; +import { editPost } from '../../state/actions'; export class PostAuthor extends Component { constructor() { diff --git a/editor/sidebar/post-excerpt/index.js b/editor/sidebar/post-excerpt/index.js index 1511e3b54e7d2b..59f60d1f9a0d7d 100644 --- a/editor/sidebar/post-excerpt/index.js +++ b/editor/sidebar/post-excerpt/index.js @@ -13,8 +13,8 @@ import { ExternalLink, PanelBody } from '@wordpress/components'; * Internal Dependencies */ import './style.scss'; -import { getEditedPostExcerpt, isEditorSidebarPanelOpened } from '../../selectors'; -import { editPost, toggleSidebarPanel } from '../../actions'; +import { getEditedPostExcerpt, isEditorSidebarPanelOpened } from '../../state/selectors'; +import { editPost, toggleSidebarPanel } from '../../state/actions'; /** * Module Constants diff --git a/editor/sidebar/post-format/index.js b/editor/sidebar/post-format/index.js index 3b3de8666bd617..1e6e3c20d901d8 100644 --- a/editor/sidebar/post-format/index.js +++ b/editor/sidebar/post-format/index.js @@ -18,8 +18,8 @@ import { getEditedPostAttribute, getSuggestedPostFormat, getCurrentPostType, -} from '../../selectors'; -import { editPost } from '../../actions'; +} from '../../state/selectors'; +import { editPost } from '../../state/actions'; const POST_FORMATS = [ { id: 'aside', caption: __( 'Aside' ) }, diff --git a/editor/sidebar/post-pending-status/index.js b/editor/sidebar/post-pending-status/index.js index a85cf925005480..7e92b5030d943b 100644 --- a/editor/sidebar/post-pending-status/index.js +++ b/editor/sidebar/post-pending-status/index.js @@ -16,8 +16,8 @@ import { PanelRow, FormToggle, withInstanceId, withAPIData } from '@wordpress/co import { getEditedPostAttribute, isCurrentPostPublished, -} from '../../selectors'; -import { editPost } from '../../actions'; +} from '../../state/selectors'; +import { editPost } from '../../state/actions'; export function PostPendingStatus( { isPublished, instanceId, status, onUpdateStatus, user } ) { if ( isPublished || ! user.data || ! user.data.capabilities.publish_posts ) { diff --git a/editor/sidebar/post-schedule/index.js b/editor/sidebar/post-schedule/index.js index be659a250d6dea..fe9f4f15309bf1 100644 --- a/editor/sidebar/post-schedule/index.js +++ b/editor/sidebar/post-schedule/index.js @@ -18,8 +18,8 @@ import { PanelRow, Dropdown, withAPIData } from '@wordpress/components'; */ import './style.scss'; import PostScheduleClock from './clock'; -import { getEditedPostAttribute } from '../../selectors'; -import { editPost } from '../../actions'; +import { getEditedPostAttribute } from '../../state/selectors'; +import { editPost } from '../../state/actions'; export function PostSchedule( { date, onUpdateDate, user } ) { if ( ! user.data || ! user.data.capabilities.publish_posts ) { diff --git a/editor/sidebar/post-status/index.js b/editor/sidebar/post-status/index.js index 31361b5a7dba0c..f25604201a69d7 100644 --- a/editor/sidebar/post-status/index.js +++ b/editor/sidebar/post-status/index.js @@ -21,8 +21,8 @@ import PostFormat from '../post-format'; import PostPendingStatus from '../post-pending-status'; import { isEditorSidebarPanelOpened, -} from '../../selectors'; -import { toggleSidebarPanel } from '../../actions'; +} from '../../state/selectors'; +import { toggleSidebarPanel } from '../../state/actions'; /** * Module Constants diff --git a/editor/sidebar/post-sticky/index.js b/editor/sidebar/post-sticky/index.js index 75b390bff46ba3..a1b25854c0610d 100644 --- a/editor/sidebar/post-sticky/index.js +++ b/editor/sidebar/post-sticky/index.js @@ -13,8 +13,8 @@ import { PanelRow, FormToggle, withInstanceId, withAPIData } from '@wordpress/co /** * Internal dependencies */ -import { getEditedPostAttribute, getCurrentPostType } from '../../selectors'; -import { editPost } from '../../actions'; +import { getEditedPostAttribute, getCurrentPostType } from '../../state/selectors'; +import { editPost } from '../../state/actions'; export function PostSticky( { onUpdateSticky, postType, postSticky = false, instanceId, user } ) { if ( diff --git a/editor/sidebar/post-taxonomies/flat-term-selector.js b/editor/sidebar/post-taxonomies/flat-term-selector.js index 72df24181b021e..f9b4c73aa069be 100644 --- a/editor/sidebar/post-taxonomies/flat-term-selector.js +++ b/editor/sidebar/post-taxonomies/flat-term-selector.js @@ -14,8 +14,8 @@ import { FormTokenField } from '@wordpress/components'; /** * Internal dependencies */ -import { getEditedPostAttribute } from '../../selectors'; -import { editPost } from '../../actions'; +import { getEditedPostAttribute } from '../../state/selectors'; +import { editPost } from '../../state/actions'; const DEFAULT_QUERY = { per_page: 100, diff --git a/editor/sidebar/post-taxonomies/hierarchical-term-selector.js b/editor/sidebar/post-taxonomies/hierarchical-term-selector.js index 83ca8e674d8776..16e47c2b4a43be 100644 --- a/editor/sidebar/post-taxonomies/hierarchical-term-selector.js +++ b/editor/sidebar/post-taxonomies/hierarchical-term-selector.js @@ -14,8 +14,8 @@ import { withInstanceId } from '@wordpress/components'; /** * Internal dependencies */ -import { getEditedPostAttribute } from '../../selectors'; -import { editPost } from '../../actions'; +import { getEditedPostAttribute } from '../../state/selectors'; +import { editPost } from '../../state/actions'; const DEFAULT_QUERY = { per_page: 100, diff --git a/editor/sidebar/post-taxonomies/index.js b/editor/sidebar/post-taxonomies/index.js index 3df9060e7a7fb5..ffa5715e513485 100644 --- a/editor/sidebar/post-taxonomies/index.js +++ b/editor/sidebar/post-taxonomies/index.js @@ -16,8 +16,8 @@ import { PanelBody, withAPIData } from '@wordpress/components'; import './style.scss'; import HierarchicalTermSelector from './hierarchical-term-selector'; import FlatTermSelector from './flat-term-selector'; -import { getCurrentPostType, isEditorSidebarPanelOpened } from '../../selectors'; -import { toggleSidebarPanel } from '../../actions'; +import { getCurrentPostType, isEditorSidebarPanelOpened } from '../../state/selectors'; +import { toggleSidebarPanel } from '../../state/actions'; /** * Module Constants diff --git a/editor/sidebar/post-trash/index.js b/editor/sidebar/post-trash/index.js index f26acbfa46b2e6..1f999bce649cdd 100644 --- a/editor/sidebar/post-trash/index.js +++ b/editor/sidebar/post-trash/index.js @@ -17,8 +17,8 @@ import { isEditedPostNew, getCurrentPostId, getCurrentPostType, -} from '../../selectors'; -import { trashPost } from '../../actions'; +} from '../../state/selectors'; +import { trashPost } from '../../state/actions'; function PostTrash( { isNew, postId, postType, ...props } ) { if ( isNew || ! postId ) { diff --git a/editor/sidebar/post-visibility/index.js b/editor/sidebar/post-visibility/index.js index 438a4808820575..ad74c93abf654e 100644 --- a/editor/sidebar/post-visibility/index.js +++ b/editor/sidebar/post-visibility/index.js @@ -18,8 +18,8 @@ import './style.scss'; import { getEditedPostAttribute, getEditedPostVisibility, -} from '../../selectors'; -import { editPost, savePost } from '../../actions'; +} from '../../state/selectors'; +import { editPost, savePost } from '../../state/actions'; export class PostVisibility extends Component { constructor( props ) { diff --git a/editor/actions.js b/editor/state/actions.js similarity index 100% rename from editor/actions.js rename to editor/state/actions.js diff --git a/editor/effects.js b/editor/state/effects.js similarity index 99% rename from editor/effects.js rename to editor/state/effects.js index 08485ac6de5631..bfc79996ab9c5b 100644 --- a/editor/effects.js +++ b/editor/state/effects.js @@ -13,7 +13,7 @@ import { __ } from '@wordpress/i18n'; /** * Internal dependencies */ -import { getGutenbergURL, getWPAdminURL } from './utils/url'; +import { getGutenbergURL, getWPAdminURL } from '../utils/url'; import { resetPost, setupNewPost, diff --git a/editor/store.js b/editor/state/index.js similarity index 100% rename from editor/store.js rename to editor/state/index.js diff --git a/editor/reducer.js b/editor/state/reducer.js similarity index 99% rename from editor/reducer.js rename to editor/state/reducer.js index a30182367d8404..c3bf19048691f6 100644 --- a/editor/reducer.js +++ b/editor/state/reducer.js @@ -13,7 +13,7 @@ import { getBlockTypes, getBlockType } from '@wordpress/blocks'; /** * Internal dependencies */ -import { combineUndoableReducers } from './utils/undoable-reducer'; +import { combineUndoableReducers } from '../utils/undoable-reducer'; import { STORE_DEFAULTS } from './store-defaults'; /*** diff --git a/editor/selectors.js b/editor/state/selectors.js similarity index 100% rename from editor/selectors.js rename to editor/state/selectors.js diff --git a/editor/store-defaults.js b/editor/state/store-defaults.js similarity index 100% rename from editor/store-defaults.js rename to editor/state/store-defaults.js diff --git a/editor/store-persist.js b/editor/state/store-persist.js similarity index 100% rename from editor/store-persist.js rename to editor/state/store-persist.js diff --git a/editor/test/actions.js b/editor/state/test/actions.js similarity index 100% rename from editor/test/actions.js rename to editor/state/test/actions.js diff --git a/editor/test/effects.js b/editor/state/test/effects.js similarity index 100% rename from editor/test/effects.js rename to editor/state/test/effects.js diff --git a/editor/test/store.js b/editor/state/test/index.js similarity index 94% rename from editor/test/store.js rename to editor/state/test/index.js index 50fc4e43efb2a7..6a9ca29e444e85 100644 --- a/editor/test/store.js +++ b/editor/state/test/index.js @@ -1,7 +1,7 @@ /** * Internal dependencies */ -import createReduxStore from '../store'; +import createReduxStore from '../'; describe( 'store', () => { describe( 'createReduxStore()', () => { diff --git a/editor/test/reducer.js b/editor/state/test/reducer.js similarity index 100% rename from editor/test/reducer.js rename to editor/state/test/reducer.js diff --git a/editor/test/selectors.js b/editor/state/test/selectors.js similarity index 100% rename from editor/test/selectors.js rename to editor/state/test/selectors.js diff --git a/editor/test/store-persist.js b/editor/state/test/store-persist.js similarity index 100% rename from editor/test/store-persist.js rename to editor/state/test/store-persist.js diff --git a/editor/table-of-contents/index.js b/editor/table-of-contents/index.js index c87dfce5eaffbc..d9ff74bebac2c5 100644 --- a/editor/table-of-contents/index.js +++ b/editor/table-of-contents/index.js @@ -16,8 +16,8 @@ import { Dashicon, Dropdown } from '@wordpress/components'; import './style.scss'; import DocumentOutline from '../document-outline'; import WordCount from '../word-count'; -import { getBlocks } from '../selectors'; -import { selectBlock } from '../actions'; +import { getBlocks } from '../state/selectors'; +import { selectBlock } from '../state/actions'; function TableOfContents( { blocks } ) { const headings = filter( blocks, ( block ) => block.name === 'core/heading' ); diff --git a/editor/unsaved-changes-warning/index.js b/editor/unsaved-changes-warning/index.js index 2a1d3411787c30..fcf848b599cd2d 100644 --- a/editor/unsaved-changes-warning/index.js +++ b/editor/unsaved-changes-warning/index.js @@ -12,7 +12,7 @@ import { Component } from '@wordpress/element'; /** * Internal dependencies */ -import { isEditedPostDirty } from '../selectors'; +import { isEditedPostDirty } from '../state/selectors'; class UnsavedChangesWarning extends Component { constructor() { diff --git a/editor/word-count/index.js b/editor/word-count/index.js index 958e2dc10ae606..17b8d952e54037 100644 --- a/editor/word-count/index.js +++ b/editor/word-count/index.js @@ -6,7 +6,7 @@ import { connect } from 'react-redux'; /** * WordPress dependencies */ -import { getBlocks } from '../selectors'; +import { getBlocks } from '../state/selectors'; import { serialize } from 'blocks'; function WordCount( { content } ) {