Move email editor components out of the engine folder

MAILPOET-6215
This commit is contained in:
Oluwaseun Olorunsola
2024-11-11 09:41:48 +01:00
committed by Oluwaseun Olorunsola
parent e6d607028c
commit 1c3ea9cd0a
96 changed files with 12 additions and 12 deletions

View File

@ -11,8 +11,8 @@
"start": "wp-scripts start",
"lint:css": "wp-scripts lint-style",
"lint:css-fix": "wp-scripts lint-style --fix",
"lint:js": "wp-scripts lint-js ./src/**",
"lint:js-fix": "wp-scripts lint-js ./src/** --fix",
"lint:js": "wp-scripts lint-js './src/**/*.{js,jsx,json,ts,tsx,yml,yaml}'",
"lint:js-fix": "wp-scripts lint-js './src/**/*.{js,jsx,json,ts,tsx}' --fix",
"check-types": "NODE_OPTIONS=--max_old_space_size=2048 tsc --noEmit",
"format": "./node_modules/.bin/prettier --config .prettierrc.js --write 'src/**/*.{js,jsx,json,ts,tsx,yml,yaml}'"
},

View File

@ -12,7 +12,7 @@ import { useMemo } from '@wordpress/element';
import { SlotFillProvider, Spinner } from '@wordpress/components';
import { Post, store as coreStore } from '@wordpress/core-data';
import { storeName } from '../../store';
import { unlock } from '../../../lock-unlock';
import { unlock } from '../../lock-unlock';
/**
* Internal dependencies

View File

@ -8,7 +8,7 @@ import { store as blockEditorStore } from '@wordpress/block-editor';
/**
* Internal dependencies
*/
import { unlock } from '../../../../lock-unlock';
import { unlock } from '../../../lock-unlock';
const DISTANCE_THRESHOLD = 500;

View File

@ -23,7 +23,7 @@ import { store as editorStore } from '@wordpress/editor';
*/
import EditTemplateBlocksNotification from './edit-template-blocks-notification';
import useSelectNearestEditableBlock from './use-select-nearest-editable-block';
import { unlock } from '../../../../lock-unlock';
import { unlock } from '../../../lock-unlock';
export const TEMPLATE_POST_TYPE = 'wp_template';
export const TEMPLATE_PART_POST_TYPE = 'wp_template_part';

View File

@ -21,7 +21,7 @@ import { SaveButton } from './save-button';
import { CampaignName } from './campaign-name';
import { SendButton } from './send-button';
import { unlock } from '../../../lock-unlock';
import { unlock } from '../../lock-unlock';
// Build type for ToolbarItem contains only "as" and "children" properties but it takes all props from
// component passed to "as" property (in this case Button). So as fix for TS errors we need to pass all props from Button to ToolbarItem.

View File

@ -2,7 +2,7 @@ import { __ } from '@wordpress/i18n';
import * as React from '@wordpress/element';
import { privateApis as componentsPrivateApis } from '@wordpress/components';
import { mainSidebarEmailTab, mainSidebarBlockTab } from '../../store';
import { unlock } from '../../../lock-unlock';
import { unlock } from '../../lock-unlock';
const { Tabs } = unlock( componentsPrivateApis );

View File

@ -18,7 +18,7 @@ import {
import { Header } from './header';
import { EmailSettings } from './email-settings';
import { TemplateSettings } from './template-settings';
import { unlock } from '../../../lock-unlock';
import { unlock } from '../../lock-unlock';
import './index.scss';

View File

@ -14,7 +14,7 @@ import {
} from '@wordpress/blocks';
import { addQueryArgs } from '@wordpress/url';
import { storeName } from '../../store';
import { unlock } from '../../../lock-unlock';
import { unlock } from '../../lock-unlock';
// Todo: This is not available yet. Replace when possible.
async function revertTemplate( template ) {

View File

@ -5,7 +5,7 @@ import {
privateApis as blockEditorPrivateApis,
} from '@wordpress/block-editor';
import ScreenHeader from './screen-header';
import { unlock } from '../../../../lock-unlock';
import { unlock } from '../../../lock-unlock';
import { useEmailStyles } from '../../../hooks';
import { storeName } from '../../../store';

View File

@ -5,7 +5,7 @@ import {
// @ts-expect-error No types for this exist yet.
privateApis as blockEditorPrivateApi,
} from '@wordpress/block-editor';
import { unlock } from '../../lock-unlock';
import { unlock } from '../lock-unlock';
import { EmailStyles, storeName } from '../store';
import { useEmailTheme } from './use-email-theme';

View File

@ -1,4 +1,4 @@
import { initialize } from './engine/editor';
import { initialize } from './editor';
window.addEventListener( 'DOMContentLoaded', () => {
initialize( 'mailpoet-email-editor' );