Fix and workaround woocommerce/dependency-group errors
[MAILPOET-6438]
This commit is contained in:
committed by
Oluwaseun Olorunsola
parent
3c7b5aba85
commit
92e9642e1f
@@ -1,3 +1,6 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { addFilter } from '@wordpress/hooks';
|
||||
import { Block } from '@wordpress/blocks/index';
|
||||
|
||||
|
@@ -1,3 +1,6 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { addFilter } from '@wordpress/hooks';
|
||||
import { Block } from '@wordpress/blocks/index';
|
||||
|
||||
|
@@ -1,3 +1,6 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { addFilter } from '@wordpress/hooks';
|
||||
import { Block } from '@wordpress/blocks/index';
|
||||
|
||||
|
@@ -1,3 +1,6 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { InspectorControls } from '@wordpress/block-editor';
|
||||
import { createHigherOrderComponent } from '@wordpress/compose';
|
||||
import { Block } from '@wordpress/blocks/index';
|
||||
|
@@ -1,3 +1,6 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { addFilter } from '@wordpress/hooks';
|
||||
import {
|
||||
Block as WPBlock,
|
||||
|
@@ -1,3 +1,6 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { addFilter } from '@wordpress/hooks';
|
||||
|
||||
/**
|
||||
|
@@ -1,3 +1,6 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { InspectorControls } from '@wordpress/block-editor';
|
||||
import { createHigherOrderComponent } from '@wordpress/compose';
|
||||
import { addFilter } from '@wordpress/hooks';
|
||||
|
@@ -1,3 +1,6 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { addFilter } from '@wordpress/hooks';
|
||||
import { Block } from '@wordpress/blocks/index';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
|
@@ -1,3 +1,6 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import {
|
||||
registerFormatType,
|
||||
unregisterFormatType,
|
||||
@@ -10,16 +13,20 @@ import { __ } from '@wordpress/i18n';
|
||||
import { BlockControls } from '@wordpress/block-editor';
|
||||
import { ToolbarButton, ToolbarGroup } from '@wordpress/components';
|
||||
import { useSelect, useDispatch } from '@wordpress/data';
|
||||
import { useCallback, useState } from '@wordpress/element';
|
||||
import { addFilter } from '@wordpress/hooks';
|
||||
import { createHigherOrderComponent } from '@wordpress/compose';
|
||||
import * as React from '@wordpress/element';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import {
|
||||
getCursorPosition,
|
||||
replacePersonalizationTagsWithHTMLComments,
|
||||
} from '../../components/personalization-tags/rich-text-utils';
|
||||
import { PersonalizationTagsModal } from '../../components/personalization-tags/personalization-tags-modal';
|
||||
import { useCallback, useState } from '@wordpress/element';
|
||||
import { addFilter } from '@wordpress/hooks';
|
||||
import * as React from 'react';
|
||||
import { storeName } from '../../store';
|
||||
import { createHigherOrderComponent } from '@wordpress/compose';
|
||||
import { PersonalizationTagsPopover } from '../../components/personalization-tags/personalization-tags-popover';
|
||||
import { PersonalizationTagsLinkPopover } from '../../components/personalization-tags/personalization-tags-link-popover';
|
||||
import { recordEvent } from '../../events';
|
||||
|
@@ -1,4 +1,11 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { registerCoreBlocks } from '@wordpress/block-library';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { enhanceColumnBlock } from './core/column';
|
||||
import {
|
||||
disableColumnsLayout,
|
||||
|
@@ -1,5 +1,12 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { useDispatch, useSelect } from '@wordpress/data';
|
||||
import { useEffect } from '@wordpress/element';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { storeName } from '../../store';
|
||||
import { recordEvent } from '../../events';
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* WordPress dependencies
|
||||
* External dependencies
|
||||
*/
|
||||
import { useSelect } from '@wordpress/data';
|
||||
import {
|
||||
@@ -12,17 +12,13 @@ import { SlotFillProvider, Spinner } from '@wordpress/components';
|
||||
import { store as coreStore } from '@wordpress/core-data';
|
||||
import { Post } from '@wordpress/core-data/build-types/entity-types/post';
|
||||
|
||||
/**
|
||||
* WordPress private dependencies
|
||||
*/
|
||||
import { unlockPatternsRelatedSelectorsFromCoreStore } from '../../private-apis';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { storeName } from '../../store';
|
||||
import { Layout } from './layout';
|
||||
import { useNavigateToEntityRecord } from '../../hooks/use-navigate-to-entity-record';
|
||||
import { unlockPatternsRelatedSelectorsFromCoreStore } from '../../private-apis';
|
||||
|
||||
export function InnerEditor( {
|
||||
postId: initialPostId,
|
||||
|
@@ -1,3 +1,6 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { BlockSelectionClearer } from '@wordpress/block-editor';
|
||||
import { store as editorStore, UnsavedChangesWarning } from '@wordpress/editor';
|
||||
import { uploadMedia } from '@wordpress/media-utils';
|
||||
@@ -9,9 +12,12 @@ import {
|
||||
InterfaceSkeleton,
|
||||
} from '@wordpress/interface';
|
||||
import { useRef } from '@wordpress/element';
|
||||
|
||||
import './index.scss';
|
||||
import { store as coreStore } from '@wordpress/core-data';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import './index.scss';
|
||||
import { storeName } from '../../store';
|
||||
import { useEmailCss } from '../../hooks';
|
||||
import { AutosaveMonitor } from '../autosave';
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* WordPress dependencies
|
||||
* External dependencies
|
||||
*/
|
||||
import { useSelect } from '@wordpress/data';
|
||||
import { useEffect, useState } from '@wordpress/element';
|
||||
@@ -7,6 +7,10 @@ import { store as editorStore } from '@wordpress/editor';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
// eslint-disable-next-line
|
||||
import { __experimentalConfirmDialog as ConfirmDialog } from '@wordpress/components';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { recordEvent, recordEventOnce } from '../../../events'; // eslint-disable-line
|
||||
|
||||
/**
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* WordPress dependencies
|
||||
* External dependencies
|
||||
*/
|
||||
import { useRefEffect } from '@wordpress/compose';
|
||||
import { useSelect, useDispatch } from '@wordpress/data';
|
||||
|
@@ -1,7 +1,11 @@
|
||||
/**
|
||||
* WordPress dependencies
|
||||
* External dependencies
|
||||
*/
|
||||
import classnames from 'classnames';
|
||||
import { useRef } from '@wordpress/element';
|
||||
import { useSelect } from '@wordpress/data';
|
||||
import { useMergeRefs } from '@wordpress/compose';
|
||||
import { store as editorStore } from '@wordpress/editor';
|
||||
import {
|
||||
BlockList,
|
||||
// @ts-expect-error No types for this exist yet.
|
||||
@@ -11,21 +15,13 @@ import {
|
||||
// @ts-expect-error No types for this exist yet.
|
||||
__experimentalUseResizeCanvas as useResizeCanvas, // eslint-disable-line
|
||||
} from '@wordpress/block-editor';
|
||||
import { useRef } from '@wordpress/element';
|
||||
import { useSelect } from '@wordpress/data';
|
||||
import { useMergeRefs } from '@wordpress/compose';
|
||||
import { store as editorStore } from '@wordpress/editor';
|
||||
|
||||
/**
|
||||
* WordPress private dependencies
|
||||
*/
|
||||
import { BlockCanvas } from '../../../private-apis';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import EditTemplateBlocksNotification from './edit-template-blocks-notification';
|
||||
import useSelectNearestEditableBlock from './use-select-nearest-editable-block';
|
||||
import { BlockCanvas } from '../../../private-apis';
|
||||
|
||||
export const TEMPLATE_POST_TYPE = 'wp_template';
|
||||
export const TEMPLATE_PART_POST_TYPE = 'wp_template_part';
|
||||
|
@@ -1,4 +1,11 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { useRef } from '@wordpress/element';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { chevronDown } from '@wordpress/icons';
|
||||
import { useSelect } from '@wordpress/data';
|
||||
import { useEntityProp } from '@wordpress/core-data';
|
||||
import {
|
||||
Button,
|
||||
Dropdown,
|
||||
@@ -6,10 +13,10 @@ import {
|
||||
__experimentalText as Text, // eslint-disable-line
|
||||
TextControl,
|
||||
} from '@wordpress/components';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { chevronDown } from '@wordpress/icons';
|
||||
import { useSelect } from '@wordpress/data';
|
||||
import { useEntityProp } from '@wordpress/core-data';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { storeName } from '../../store';
|
||||
import { recordEvent, recordEventOnce } from '../../events';
|
||||
|
||||
|
@@ -1,6 +1,7 @@
|
||||
/**
|
||||
* WordPress dependencies
|
||||
* External dependencies
|
||||
*/
|
||||
import classnames from 'classnames';
|
||||
import { useRef, useState } from '@wordpress/element';
|
||||
import { PinnedItems } from '@wordpress/interface';
|
||||
import { Button, ToolbarItem as WpToolbarItem } from '@wordpress/components';
|
||||
@@ -11,6 +12,9 @@ import {
|
||||
} from '@wordpress/block-editor';
|
||||
import { useSelect, useDispatch } from '@wordpress/data';
|
||||
import { store as coreDataStore } from '@wordpress/core-data';
|
||||
import { store as preferencesStore } from '@wordpress/preferences';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { plus, listView, undo, redo, next, previous } from '@wordpress/icons';
|
||||
import {
|
||||
// @ts-expect-error DocumentBar types are not available
|
||||
DocumentBar,
|
||||
@@ -18,14 +22,11 @@ import {
|
||||
// @ts-expect-error useEntitiesSavedStatesIsDirty types are not available
|
||||
useEntitiesSavedStatesIsDirty,
|
||||
} from '@wordpress/editor';
|
||||
import { store as preferencesStore } from '@wordpress/preferences';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { plus, listView, undo, redo, next, previous } from '@wordpress/icons';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import classnames from 'classnames';
|
||||
|
||||
import { storeName } from '../../store';
|
||||
import { MoreMenu } from './more-menu';
|
||||
import { PreviewDropdown } from '../preview';
|
||||
|
@@ -1,3 +1,6 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { MenuGroup, MenuItem, DropdownMenu } from '@wordpress/components';
|
||||
import { useState } from '@wordpress/element';
|
||||
import { displayShortcut } from '@wordpress/keycodes';
|
||||
@@ -6,6 +9,10 @@ import { useEntityProp } from '@wordpress/core-data';
|
||||
import { __, _x } from '@wordpress/i18n';
|
||||
import { PreferenceToggleMenuItem } from '@wordpress/preferences';
|
||||
import { useSelect, useDispatch } from '@wordpress/data';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { storeName } from '../../store';
|
||||
import { TrashModal } from './trash-modal';
|
||||
import { recordEvent } from '../../events';
|
||||
|
@@ -1,11 +1,18 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { useRef, useEffect } from '@wordpress/element';
|
||||
import { Button, Dropdown } from '@wordpress/components';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { useSelect } from '@wordpress/data';
|
||||
import {
|
||||
// @ts-expect-error Our current version of packages doesn't have EntitiesSavedStates export
|
||||
EntitiesSavedStates,
|
||||
} from '@wordpress/editor';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { useSelect } from '@wordpress/data';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { storeName } from '../../store';
|
||||
import { recordEvent } from '../../events';
|
||||
|
||||
|
@@ -1,7 +1,14 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { Button } from '@wordpress/components';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { useDispatch, useSelect } from '@wordpress/data';
|
||||
import { check, cloud, Icon } from '@wordpress/icons';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { storeName } from '../../store';
|
||||
import { recordEvent } from '../../events';
|
||||
|
||||
|
@@ -1,12 +1,19 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { Button } from '@wordpress/components';
|
||||
import { useEntityProp } from '@wordpress/core-data';
|
||||
import { useSelect } from '@wordpress/data';
|
||||
import {
|
||||
// @ts-expect-error No types available for useEntitiesSavedStatesIsDirty
|
||||
useEntitiesSavedStatesIsDirty,
|
||||
} from '@wordpress/editor';
|
||||
import { useEntityProp } from '@wordpress/core-data';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { MailPoetEmailData, storeName } from '../../store';
|
||||
import { useSelect } from '@wordpress/data';
|
||||
import { useEditorMode } from '../../hooks';
|
||||
import { recordEvent } from '../../events';
|
||||
|
||||
|
@@ -1,8 +1,15 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { Button, Modal } from '@wordpress/components';
|
||||
import { useDispatch, useSelect } from '@wordpress/data';
|
||||
import { store as coreStore } from '@wordpress/core-data';
|
||||
import { store as noticesStore } from '@wordpress/notices';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { recordEvent } from '../../events';
|
||||
|
||||
export function TrashModal( {
|
||||
|
@@ -1,12 +1,12 @@
|
||||
/**
|
||||
* WordPress dependencies
|
||||
* External dependencies
|
||||
*/
|
||||
import { useDispatch, useSelect } from '@wordpress/data';
|
||||
import { store as editorStore } from '@wordpress/editor';
|
||||
import {
|
||||
__experimentalLibrary as Library, // eslint-disable-line
|
||||
store as blockEditorStore,
|
||||
} from '@wordpress/block-editor';
|
||||
import { useDispatch, useSelect } from '@wordpress/data';
|
||||
import { store as editorStore } from '@wordpress/editor';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
|
@@ -1,11 +1,18 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { useSelect, useDispatch } from '@wordpress/data';
|
||||
import { useEffect } from '@wordpress/element';
|
||||
import { store as coreDataStore } from '@wordpress/core-data';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import {
|
||||
useShortcut,
|
||||
store as keyboardShortcutsStore,
|
||||
} from '@wordpress/keyboard-shortcuts';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { storeName } from '../../store';
|
||||
import { recordEvent } from '../../events';
|
||||
|
||||
|
@@ -1,3 +1,6 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
// eslint-disable-next-line
|
||||
import { __experimentalListView as ListView } from '@wordpress/block-editor';
|
||||
|
||||
|
@@ -1,6 +1,13 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { NoticeList } from '@wordpress/components';
|
||||
import { useSelect, useDispatch } from '@wordpress/data';
|
||||
import { store as noticesStore } from '@wordpress/notices';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { ValidationNotices } from './validation-notices';
|
||||
import { EditorSnackbars } from './snackbars';
|
||||
|
||||
|
@@ -1,8 +1,14 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { dispatch, useSelect } from '@wordpress/data';
|
||||
import { useEffect } from '@wordpress/element';
|
||||
import { store as noticesStore } from '@wordpress/notices';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { storeName } from '../../store';
|
||||
import { recordEvent } from '../../events';
|
||||
|
||||
|
@@ -1,3 +1,6 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { useMemo } from '@wordpress/element';
|
||||
import { SnackbarList } from '@wordpress/components';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
|
@@ -1,5 +1,12 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { Notice, Button } from '@wordpress/components';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { useValidationNotices } from '../../hooks';
|
||||
|
||||
export function ValidationNotices() {
|
||||
|
@@ -1,3 +1,6 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import * as React from '@wordpress/element';
|
||||
import { MenuGroup, MenuItem } from '@wordpress/components';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
|
@@ -1,5 +1,12 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { Button } from '@wordpress/components';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { PersonalizationTag } from '../../store';
|
||||
|
||||
const CategorySection = ( {
|
||||
|
@@ -1,8 +1,15 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { Button, Modal, TextControl } from '@wordpress/components';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import './index.scss';
|
||||
import { useState } from '@wordpress/element';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import './index.scss';
|
||||
|
||||
const LinkModal = ( { onInsert, isOpened, closeCallback, tag } ) => {
|
||||
const [ linkText, setLinkText ] = useState( __( 'Link', 'mailpoet' ) );
|
||||
if ( ! isOpened ) {
|
||||
|
@@ -1,12 +1,19 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { useEffect, useState } from '@wordpress/element';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { useSelect } from '@wordpress/data';
|
||||
import {
|
||||
Popover,
|
||||
Button,
|
||||
TextControl,
|
||||
SelectControl,
|
||||
} from '@wordpress/components';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { useSelect } from '@wordpress/data';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { storeName } from '../../store';
|
||||
|
||||
type PersonalizationTagsLinkPopoverProps = {
|
||||
|
@@ -1,13 +1,20 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { ExternalLink, Modal, SearchControl } from '@wordpress/components';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { PersonalizationTag, storeName } from '../../store';
|
||||
import { useSelect } from '@wordpress/data';
|
||||
import './index.scss';
|
||||
import { useState } from '@wordpress/element';
|
||||
import { useSelect } from '@wordpress/data';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import './index.scss';
|
||||
import { CategoryMenu } from './category-menu';
|
||||
import { CategorySection } from './category-section';
|
||||
import { LinkModal } from './link-modal';
|
||||
import { recordEvent, recordEventOnce } from '../../events';
|
||||
import { PersonalizationTag, storeName } from '../../store';
|
||||
|
||||
const PersonalizationTagsModal = ( {
|
||||
onInsert,
|
||||
|
@@ -1,3 +1,6 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { useEffect, useState } from '@wordpress/element';
|
||||
import { Popover, Button, TextControl } from '@wordpress/components';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
|
@@ -1,8 +1,15 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import * as React from '@wordpress/element';
|
||||
import { PersonalizationTag } from '../../store';
|
||||
import { create } from '@wordpress/rich-text';
|
||||
import { RichTextFormatList } from '@wordpress/rich-text/build-types/types';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { PersonalizationTag } from '../../store';
|
||||
|
||||
function getChildElement( rootElement: HTMLElement ): HTMLElement | null {
|
||||
let currentElement: HTMLElement | null = rootElement;
|
||||
|
||||
|
@@ -1,17 +1,24 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { BaseControl, Button } from '@wordpress/components';
|
||||
import { PersonalizationTagsModal } from './personalization-tags-modal';
|
||||
import { useDispatch, useSelect } from '@wordpress/data';
|
||||
import { useCallback, useRef, useState } from '@wordpress/element';
|
||||
import { useEntityProp } from '@wordpress/core-data';
|
||||
import { create, insert, toHTMLString } from '@wordpress/rich-text';
|
||||
import { RichText } from '@wordpress/block-editor';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { PersonalizationTagsModal } from './personalization-tags-modal';
|
||||
import {
|
||||
getCursorPosition,
|
||||
replacePersonalizationTagsWithHTMLComments,
|
||||
} from './rich-text-utils';
|
||||
import { useDispatch, useSelect } from '@wordpress/data';
|
||||
import { useEntityProp } from '@wordpress/core-data';
|
||||
import { storeName } from '../../store';
|
||||
import { RichText } from '@wordpress/block-editor';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { PersonalizationTagsPopover } from './personalization-tags-popover';
|
||||
import { create, insert, toHTMLString } from '@wordpress/rich-text';
|
||||
import { recordEvent, recordEventOnce } from '../../events';
|
||||
|
||||
export function RichTextWithButton( {
|
||||
|
@@ -1,3 +1,6 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import {
|
||||
MenuGroup,
|
||||
MenuItem,
|
||||
@@ -8,6 +11,10 @@ import { useEntityProp } from '@wordpress/core-data';
|
||||
import { useDispatch, useSelect } from '@wordpress/data';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { Icon, external, check, mobile, desktop } from '@wordpress/icons';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { SendPreviewEmail } from './send-preview-email';
|
||||
import { storeName } from '../../store';
|
||||
import { recordEvent } from '../../events';
|
||||
|
@@ -1,3 +1,6 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { Button, Modal, TextControl } from '@wordpress/components';
|
||||
import { useDispatch, useSelect } from '@wordpress/data';
|
||||
import { check, Icon } from '@wordpress/icons';
|
||||
@@ -11,6 +14,10 @@ import {
|
||||
import { ENTER } from '@wordpress/keycodes';
|
||||
import { isEmail } from '@wordpress/url';
|
||||
import { useEntityProp } from '@wordpress/core-data';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import {
|
||||
MailPoetEmailData,
|
||||
SendingPreviewStatus,
|
||||
|
@@ -1,3 +1,6 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { hasBlockSupport, getBlockSupport } from '@wordpress/blocks';
|
||||
import { Fill, Notice } from '@wordpress/components';
|
||||
import { useSelect } from '@wordpress/data';
|
||||
|
@@ -1,8 +1,15 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { ExternalLink, PanelBody } from '@wordpress/components';
|
||||
import { useEntityProp } from '@wordpress/core-data';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { createInterpolateElement } from '@wordpress/element';
|
||||
import classnames from 'classnames';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { RichTextWithButton } from '../personalization-tags/rich-text-with-button';
|
||||
import { recordEvent } from '../../events';
|
||||
|
||||
|
@@ -1,8 +1,15 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { Button, Flex, FlexItem, Modal } from '@wordpress/components';
|
||||
import { useSelect } from '@wordpress/data';
|
||||
import { storeName } from '../../store';
|
||||
import { store as editorStore } from '@wordpress/editor';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { storeName } from '../../store';
|
||||
import { recordEvent, recordEventOnce } from '../../events';
|
||||
|
||||
export function EditTemplateModal( { close } ) {
|
||||
|
@@ -1,4 +1,11 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { Panel } from '@wordpress/components';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { DetailsPanel } from './details-panel';
|
||||
import { EmailTypeInfo } from './email-type-info';
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* WordPress dependencies
|
||||
* External dependencies
|
||||
*/
|
||||
import {
|
||||
Panel,
|
||||
|
@@ -1,19 +1,15 @@
|
||||
/**
|
||||
* WordPress dependencies
|
||||
* External dependencies
|
||||
*/
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import * as React from '@wordpress/element';
|
||||
|
||||
/**
|
||||
* WordPress private dependencies
|
||||
*/
|
||||
import { Tabs } from '../../private-apis';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { mainSidebarDocumentTab, mainSidebarBlockTab } from '../../store';
|
||||
import { useEditorMode } from '../../hooks';
|
||||
import { Tabs } from '../../private-apis';
|
||||
|
||||
export function HeaderTabs( _, ref ) {
|
||||
const [ editorMode ] = useEditorMode();
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* WordPress dependencies
|
||||
* External dependencies
|
||||
*/
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { useContext, useRef, useEffect, memo } from '@wordpress/element';
|
||||
@@ -11,11 +11,6 @@ import {
|
||||
import { ComplementaryArea } from '@wordpress/interface';
|
||||
import { drawerRight } from '@wordpress/icons';
|
||||
|
||||
/**
|
||||
* WordPress private dependencies
|
||||
*/
|
||||
import { Tabs } from '../../private-apis';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
@@ -29,6 +24,7 @@ import { Header } from './header';
|
||||
import { EmailSettings } from './email-settings';
|
||||
import { TemplateSettings } from './template-settings';
|
||||
import { useEditorMode } from '../../hooks';
|
||||
import { Tabs } from '../../private-apis';
|
||||
|
||||
import './index.scss';
|
||||
import { recordEvent } from '../../events';
|
||||
|
@@ -1,3 +1,6 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import {
|
||||
Panel,
|
||||
PanelBody,
|
||||
@@ -9,6 +12,10 @@ import { __ } from '@wordpress/i18n';
|
||||
import { useSelect } from '@wordpress/data';
|
||||
import { Icon, layout, moreVertical } from '@wordpress/icons';
|
||||
import { useState } from '@wordpress/element';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { storeName } from '../../store';
|
||||
import { TemplateRevertModal } from './template-revert-modal';
|
||||
|
||||
|
@@ -1,6 +1,13 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { Button, Flex, FlexItem, Modal } from '@wordpress/components';
|
||||
import { useDispatch, useSelect } from '@wordpress/data';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { storeName } from '../../store';
|
||||
|
||||
export function TemplateRevertModal( { close } ) {
|
||||
|
@@ -1,4 +1,11 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { Panel } from '@wordpress/components';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { TemplateInfo } from './template-info';
|
||||
|
||||
export function TemplateSettings() {
|
||||
|
@@ -1,16 +1,24 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { isEqual } from 'lodash';
|
||||
import {
|
||||
// We can remove the ts-expect-error comments once the types are available.
|
||||
// @ts-expect-error TS7016: Could not find a declaration file for module '@wordpress/block-editor'.
|
||||
__experimentalSpacingSizesControl as SpacingSizesControl, // eslint-disable-line
|
||||
useSettings,
|
||||
} from '@wordpress/block-editor';
|
||||
// eslint-disable-next-line
|
||||
import {
|
||||
__experimentalToolsPanel as ToolsPanel, // eslint-disable-line
|
||||
__experimentalToolsPanelItem as ToolsPanelItem, // eslint-disable-line
|
||||
__experimentalUseCustomUnits as useCustomUnits, // eslint-disable-line
|
||||
} from '@wordpress/components';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { isEqual } from 'lodash';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { useEmailStyles } from '../../../hooks';
|
||||
import { recordEvent, debouncedRecordEvent } from '../../../events';
|
||||
|
||||
|
@@ -1,5 +1,14 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { useCallback } from '@wordpress/element';
|
||||
import {
|
||||
FontSizePicker,
|
||||
__experimentalToolsPanel as ToolsPanel, // eslint-disable-line
|
||||
__experimentalToolsPanelItem as ToolsPanelItem, // eslint-disable-line
|
||||
} from '@wordpress/components';
|
||||
// eslint-disable-next-line
|
||||
import {
|
||||
useSettings,
|
||||
// We can remove the ts-expect-error comments once the types are available.
|
||||
@@ -17,11 +26,10 @@ import {
|
||||
// @ts-expect-error TS7016: Could not find a declaration file for module '@wordpress/block-editor'.
|
||||
__experimentalTextTransformControl as TextTransformControl, // eslint-disable-line
|
||||
} from '@wordpress/block-editor';
|
||||
import {
|
||||
FontSizePicker,
|
||||
__experimentalToolsPanel as ToolsPanel, // eslint-disable-line
|
||||
__experimentalToolsPanelItem as ToolsPanelItem, // eslint-disable-line
|
||||
} from '@wordpress/components';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { useEmailStyles } from '../../../hooks';
|
||||
import { getElementStyles } from '../utils';
|
||||
import { recordEvent, debouncedRecordEvent } from '../../../events';
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* WordPress dependencies
|
||||
* External dependencies
|
||||
*/
|
||||
import { __, sprintf } from '@wordpress/i18n';
|
||||
import {
|
||||
@@ -13,6 +13,10 @@ import {
|
||||
Card,
|
||||
CardBody,
|
||||
} from '@wordpress/components';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { useEmailStyles } from '../../../hooks';
|
||||
import { getElementStyles } from '../utils';
|
||||
import { recordEvent } from '../../../events';
|
||||
|
@@ -1,3 +1,6 @@
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { useEmailStyles } from '../../../hooks';
|
||||
import { getElementStyles } from '../utils';
|
||||
|
||||
|
@@ -1,10 +1,17 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { useSelect } from '@wordpress/data';
|
||||
import { useState } from '@wordpress/element';
|
||||
import {
|
||||
__experimentalHStack as HStack, // eslint-disable-line
|
||||
__experimentalVStack as VStack, // eslint-disable-line
|
||||
__unstableMotion as motion, // eslint-disable-line
|
||||
} from '@wordpress/components';
|
||||
import { useSelect } from '@wordpress/data';
|
||||
import { useState } from '@wordpress/element';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { storeName } from '../../../store';
|
||||
|
||||
const firstFrame = {
|
||||
|
@@ -1,14 +1,9 @@
|
||||
/**
|
||||
* WordPress dependencies
|
||||
* External dependencies
|
||||
*/
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { useSelect } from '@wordpress/data';
|
||||
|
||||
/**
|
||||
* WordPress private dependencies
|
||||
*/
|
||||
import { StylesColorPanel } from '../../../private-apis';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
@@ -16,6 +11,7 @@ import ScreenHeader from './screen-header';
|
||||
import { useEmailStyles } from '../../../hooks';
|
||||
import { storeName } from '../../../store';
|
||||
import { recordEvent, recordEventOnce } from '../../../events';
|
||||
import { StylesColorPanel } from '../../../private-apis';
|
||||
|
||||
export function ScreenColors(): JSX.Element {
|
||||
recordEventOnce( 'styles_sidebar_screen_colors_opened' );
|
||||
|
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { chevronLeft } from '@wordpress/icons';
|
||||
import {
|
||||
__experimentalHStack as HStack, // eslint-disable-line
|
||||
__experimentalVStack as VStack, // eslint-disable-line
|
||||
@@ -6,8 +11,6 @@ import {
|
||||
__experimentalView as View, // eslint-disable-line
|
||||
__experimentalNavigatorToParentButton as NavigatorToParentButton, // eslint-disable-line
|
||||
} from '@wordpress/components';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { chevronLeft } from '@wordpress/icons';
|
||||
|
||||
type Props = {
|
||||
title: string;
|
||||
|
@@ -1,4 +1,11 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { __ } from '@wordpress/i18n';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { DimensionsPanel } from '../panels/dimensions-panel';
|
||||
import { ScreenHeader } from './screen-header';
|
||||
import { recordEventOnce } from '../../../events';
|
||||
|
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { typography, color, layout } from '@wordpress/icons';
|
||||
import {
|
||||
__experimentalVStack as VStack, // eslint-disable-line
|
||||
Card,
|
||||
@@ -10,8 +15,10 @@ import {
|
||||
Icon,
|
||||
FlexItem,
|
||||
} from '@wordpress/components';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { typography, color, layout } from '@wordpress/icons';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { Preview } from './preview';
|
||||
import { recordEvent } from '../../../events';
|
||||
|
||||
|
@@ -1,3 +1,6 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { __, _x } from '@wordpress/i18n';
|
||||
import { useState } from '@wordpress/element';
|
||||
import {
|
||||
@@ -5,6 +8,10 @@ import {
|
||||
__experimentalToggleGroupControlOption as ToggleGroupControlOption, // eslint-disable-line
|
||||
__experimentalSpacer as Spacer, // eslint-disable-line
|
||||
} from '@wordpress/components';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import TypographyElementPanel, {
|
||||
DEFAULT_CONTROLS,
|
||||
} from '../panels/typography-element-panel';
|
||||
|
@@ -1,4 +1,11 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { __ } from '@wordpress/i18n';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import TypographyPanel from '../panels/typography-panel';
|
||||
import ScreenHeader from './screen-header';
|
||||
import { recordEventOnce } from '../../../events';
|
||||
|
@@ -1,12 +1,19 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { memo } from '@wordpress/element';
|
||||
import {
|
||||
__experimentalNavigatorProvider as NavigatorProvider, // eslint-disable-line
|
||||
__experimentalNavigatorScreen as NavigatorScreen, // eslint-disable-line
|
||||
} from '@wordpress/components';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { ComplementaryArea } from '@wordpress/interface';
|
||||
import { ComponentProps } from 'react';
|
||||
import { styles } from '@wordpress/icons';
|
||||
import {
|
||||
__experimentalNavigatorProvider as NavigatorProvider, // eslint-disable-line
|
||||
__experimentalNavigatorScreen as NavigatorScreen, // eslint-disable-line
|
||||
} from '@wordpress/components';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { storeName, stylesSidebarId } from '../../store';
|
||||
import {
|
||||
ScreenTypography,
|
||||
|
@@ -1,4 +1,11 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import deepmerge from 'deepmerge';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { StyleProperties } from '../../hooks/use-email-styles';
|
||||
|
||||
const defaultStyleObject = {
|
||||
|
@@ -1,9 +1,9 @@
|
||||
/**
|
||||
* WordPress dependencies
|
||||
* External dependencies
|
||||
*/
|
||||
import { useEffect, useState, flushSync } from '@wordpress/element';
|
||||
// @ts-expect-error TS7016 Could not find a declaration file for module '@wordpress/priority-queue'
|
||||
import { createQueue } from '@wordpress/priority-queue';
|
||||
import { createQueue } from '@wordpress/priority-queue'; // eslint-disable-line
|
||||
|
||||
const blockPreviewQueue = createQueue();
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* WordPress dependencies
|
||||
* External dependencies
|
||||
*/
|
||||
import { useState, useEffect, memo } from '@wordpress/element';
|
||||
import { store as editorStore } from '@wordpress/editor';
|
||||
|
@@ -1,4 +1,11 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { Button } from '@wordpress/components';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { TemplateCategory } from '../../store';
|
||||
|
||||
type Props = {
|
||||
|
@@ -1,13 +1,21 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { useMemo, memo } from '@wordpress/element';
|
||||
// @ts-expect-error No types available for this component
|
||||
import { BlockPreview } from '@wordpress/block-editor';
|
||||
import { store as editorStore } from '@wordpress/editor';
|
||||
import { useSelect } from '@wordpress/data';
|
||||
import { Icon, info, blockDefault } from '@wordpress/icons';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import {
|
||||
__experimentalHStack as HStack, // eslint-disable-line
|
||||
} from '@wordpress/components';
|
||||
import { Icon, info, blockDefault } from '@wordpress/icons';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
// @ts-expect-error No types available for this component
|
||||
// eslint-disable-next-line
|
||||
import { BlockPreview } from '@wordpress/block-editor';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { Async } from './async';
|
||||
import { TemplateCategory, TemplatePreview } from '../../store';
|
||||
import { useEmailCss } from '../../hooks';
|
||||
|
@@ -1,5 +1,12 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { useSelect } from '@wordpress/data';
|
||||
import { useState } from '@wordpress/element';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { storeName } from '../../store';
|
||||
import { SelectTemplateModal } from './select-modal';
|
||||
|
||||
|
@@ -1,5 +1,7 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { ComponentType } from 'react';
|
||||
|
||||
import { MediaUpload } from '@wordpress/media-utils';
|
||||
import { addFilter } from '@wordpress/hooks';
|
||||
|
||||
|
@@ -1,7 +1,14 @@
|
||||
import '@wordpress/format-library'; // Enables text formatting capabilities
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { useSelect } from '@wordpress/data';
|
||||
import { StrictMode, createRoot } from '@wordpress/element';
|
||||
import { applyFilters } from '@wordpress/hooks';
|
||||
import '@wordpress/format-library'; // Enables text formatting capabilities
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { initBlocks } from './blocks';
|
||||
import { initializeLayout } from './layouts/flex-email';
|
||||
import { InnerEditor } from './components/block-editor';
|
||||
|
@@ -1,4 +1,11 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { doAction } from '@wordpress/hooks';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import {
|
||||
EMAIL_STRING,
|
||||
dispatcher,
|
||||
|
@@ -1,3 +1,6 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { debounce } from 'lodash';
|
||||
import { applyFilters } from '@wordpress/hooks';
|
||||
|
||||
|
@@ -1,10 +1,17 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { useCallback, useMemo } from '@wordpress/element';
|
||||
import { dispatch, useSelect, subscribe } from '@wordpress/data';
|
||||
import { store as blockEditorStore } from '@wordpress/block-editor';
|
||||
import { createBlock } from '@wordpress/blocks';
|
||||
import { storeName as emailEditorStore } from '../store';
|
||||
import { store as coreDataStore } from '@wordpress/core-data';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { storeName as emailEditorStore } from '../store';
|
||||
import { useShallowEqual } from './use-shallow-equal';
|
||||
import { useValidationNotices } from './use-validation-notices';
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* WordPress dependencies
|
||||
* External dependencies
|
||||
*/
|
||||
import { useSelect } from '@wordpress/data';
|
||||
import { store as editorStore } from '@wordpress/editor';
|
||||
|
@@ -1,20 +1,16 @@
|
||||
/**
|
||||
* WordPress dependencies
|
||||
* External dependencies
|
||||
*/
|
||||
import { useMemo } from '@wordpress/element';
|
||||
import { useSelect } from '@wordpress/data';
|
||||
|
||||
/**
|
||||
* WordPress private dependencies
|
||||
*/
|
||||
import { useGlobalStylesOutputWithConfig } from '../private-apis';
|
||||
import deepmerge from 'deepmerge';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import deepmerge from 'deepmerge';
|
||||
import { EmailStyles, storeName } from '../store';
|
||||
import { useUserTheme } from './use-user-theme';
|
||||
import { useGlobalStylesOutputWithConfig } from '../private-apis';
|
||||
|
||||
export function useEmailCss() {
|
||||
const { userTheme } = useUserTheme();
|
||||
|
@@ -1,6 +1,13 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import deepmerge from 'deepmerge';
|
||||
import { useSelect } from '@wordpress/data';
|
||||
import { useCallback, useMemo } from '@wordpress/element';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { storeName, TypographyProperties } from '../store';
|
||||
import { useUserTheme } from './use-user-theme';
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* WordPress dependencies
|
||||
* External dependencies
|
||||
*/
|
||||
import { useCallback, useReducer } from '@wordpress/element';
|
||||
import { useSelect, useDispatch } from '@wordpress/data';
|
||||
|
@@ -1,8 +1,15 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { useMemo } from '@wordpress/element';
|
||||
import { parse } from '@wordpress/blocks';
|
||||
import { BlockInstance } from '@wordpress/blocks/index';
|
||||
import { useSelect } from '@wordpress/data';
|
||||
import { store as blockEditorStore } from '@wordpress/block-editor';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import {
|
||||
storeName,
|
||||
EmailTemplatePreview,
|
||||
|
@@ -1,6 +1,13 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { useCallback } from '@wordpress/element';
|
||||
import { useSelect, dispatch } from '@wordpress/data';
|
||||
import { store as coreStore } from '@wordpress/core-data';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { EmailTheme, storeName } from '../store';
|
||||
|
||||
export function useUserTheme() {
|
||||
|
@@ -1,3 +1,6 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { useCallback } from '@wordpress/element';
|
||||
import { dispatch, useSelect } from '@wordpress/data';
|
||||
import { store as noticesStore } from '@wordpress/notices';
|
||||
|
@@ -1,3 +1,6 @@
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { initialize } from './editor';
|
||||
|
||||
window.addEventListener( 'DOMContentLoaded', () => {
|
||||
|
@@ -2,23 +2,19 @@
|
||||
* External dependencies
|
||||
*/
|
||||
import classnames from 'classnames';
|
||||
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
import { createHigherOrderComponent } from '@wordpress/compose';
|
||||
import { addFilter } from '@wordpress/hooks';
|
||||
import { getBlockSupport, hasBlockSupport } from '@wordpress/blocks';
|
||||
import { Block } from '@wordpress/blocks/index';
|
||||
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { justifyLeft, justifyCenter, justifyRight } from '@wordpress/icons';
|
||||
import {
|
||||
BlockControls,
|
||||
InspectorControls,
|
||||
// @ts-expect-error No types for this exist yet.
|
||||
JustifyContentControl,
|
||||
} from '@wordpress/block-editor';
|
||||
import { justifyLeft, justifyCenter, justifyRight } from '@wordpress/icons';
|
||||
|
||||
// eslint-disable-next-line @woocommerce/dependency-group
|
||||
import {
|
||||
Flex,
|
||||
FlexItem,
|
||||
@@ -26,7 +22,6 @@ import {
|
||||
__experimentalToggleGroupControl as ToggleGroupControl, // eslint-disable-line
|
||||
__experimentalToggleGroupControlOptionIcon as ToggleGroupControlOptionIcon, // eslint-disable-line
|
||||
} from '@wordpress/components';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
|
||||
const layoutBlockSupportKey = '__experimentalEmailFlexLayout';
|
||||
|
||||
|
@@ -1,13 +1,13 @@
|
||||
/**
|
||||
* WordPress dependencies
|
||||
* External dependencies
|
||||
*/
|
||||
import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';
|
||||
import { privateApis as componentsPrivateApis } from '@wordpress/components';
|
||||
import { store as coreStore } from '@wordpress/core-data';
|
||||
import {
|
||||
// @ts-expect-error No types for privateApis.
|
||||
privateApis as blockEditorPrivateApis,
|
||||
} from '@wordpress/block-editor';
|
||||
import { privateApis as componentsPrivateApis } from '@wordpress/components';
|
||||
import { store as coreStore } from '@wordpress/core-data';
|
||||
|
||||
const { unlock } = __dangerousOptInToUnstableAPIsOnlyForCoreModules(
|
||||
'I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.',
|
||||
|
@@ -1,3 +1,6 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { dispatch, select } from '@wordpress/data';
|
||||
import { store as interfaceStore } from '@wordpress/interface';
|
||||
import {
|
||||
@@ -10,6 +13,18 @@ import { store as editorStore } from '@wordpress/editor';
|
||||
import { __, sprintf } from '@wordpress/i18n';
|
||||
import { apiFetch } from '@wordpress/data-controls';
|
||||
import wpApiFetch from '@wordpress/api-fetch';
|
||||
import { addQueryArgs } from '@wordpress/url';
|
||||
import { decodeEntities } from '@wordpress/html-entities';
|
||||
import {
|
||||
// @ts-expect-error No types for __unstableSerializeAndClean
|
||||
// eslint-disable-next-line @wordpress/no-unsafe-wp-apis
|
||||
__unstableSerializeAndClean,
|
||||
parse,
|
||||
} from '@wordpress/blocks';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { storeName, mainSidebarDocumentTab } from './constants';
|
||||
import {
|
||||
SendingPreviewStatus,
|
||||
@@ -17,14 +32,6 @@ import {
|
||||
Feature,
|
||||
PersonalizationTag,
|
||||
} from './types';
|
||||
import { addQueryArgs } from '@wordpress/url';
|
||||
import {
|
||||
// @ts-expect-error No types for __unstableSerializeAndClean
|
||||
// eslint-disable-next-line @wordpress/no-unsafe-wp-apis
|
||||
__unstableSerializeAndClean,
|
||||
parse,
|
||||
} from '@wordpress/blocks';
|
||||
import { decodeEntities } from '@wordpress/html-entities';
|
||||
import { recordEvent } from '../events';
|
||||
|
||||
export const toggleFeature =
|
||||
|
@@ -1,3 +1,6 @@
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
export * from './constants';
|
||||
export * from './store';
|
||||
export * from './types';
|
||||
|
@@ -1,3 +1,6 @@
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { mainSidebarDocumentTab } from './constants';
|
||||
import { State } from './types';
|
||||
import {
|
||||
|
@@ -1,3 +1,6 @@
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { State } from './types';
|
||||
|
||||
export function reducer( state: State, action ): State {
|
||||
|
@@ -1,10 +1,17 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { apiFetch } from '@wordpress/data-controls';
|
||||
import { select } from '@wordpress/data';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import {
|
||||
setPersonalizationTagsList,
|
||||
setIsFetchingPersonalizationTags,
|
||||
} from './actions';
|
||||
import { storeName } from './constants';
|
||||
import { select } from '@wordpress/data';
|
||||
|
||||
export function* getPersonalizationTagsList() {
|
||||
// Access the state to check if already fetching
|
||||
|
@@ -1,3 +1,6 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { createRegistrySelector } from '@wordpress/data';
|
||||
import { store as coreDataStore } from '@wordpress/core-data';
|
||||
import { store as interfaceStore } from '@wordpress/interface';
|
||||
@@ -5,9 +8,13 @@ import { store as editorStore } from '@wordpress/editor';
|
||||
import { store as preferencesStore } from '@wordpress/preferences';
|
||||
import { serialize } from '@wordpress/blocks';
|
||||
import { BlockInstance } from '@wordpress/blocks/index';
|
||||
import { Post } from '@wordpress/core-data/build-types/entity-types/post';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { storeName } from './constants';
|
||||
import { State, Feature, EmailTemplate, EmailEditorPostType } from './types';
|
||||
import { Post } from '@wordpress/core-data/build-types/entity-types/post';
|
||||
|
||||
function getContentFromEntity( entity ): string {
|
||||
if ( entity?.content && typeof entity.content === 'function' ) {
|
||||
|
@@ -1,3 +1,6 @@
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { EmailEditorSettings, EmailTheme, EmailEditorUrls } from './types';
|
||||
|
||||
export function getEditorSettings(): EmailEditorSettings {
|
||||
|
@@ -1,9 +1,16 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { createReduxStore, register } from '@wordpress/data';
|
||||
import {
|
||||
ReduxStoreConfig,
|
||||
StoreDescriptor as GenericStoreDescriptor,
|
||||
} from '@wordpress/data/build-types/types';
|
||||
import { controls } from '@wordpress/data-controls';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import * as actions from './actions';
|
||||
import { storeName } from './constants';
|
||||
import { getInitialState } from './initial-state';
|
||||
|
@@ -1,3 +1,6 @@
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { EditorSettings, EditorColor } from '@wordpress/block-editor/index';
|
||||
import { BlockInstance } from '@wordpress/blocks/index';
|
||||
import { Post } from '@wordpress/core-data/build-types/entity-types/post';
|
||||
|
@@ -1,10 +1,7 @@
|
||||
import {
|
||||
Color,
|
||||
Gradient,
|
||||
} from '@wordpress/components/build-types/palette-edit/types';
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { FontSize } from '@wordpress/components/build-types/font-size-picker/types';
|
||||
|
||||
// eslint-disable-next-line import/no-named-default
|
||||
import { store as blockEditorStore } from '@wordpress/block-editor';
|
||||
import { store as keyboardShortutsStore } from '@wordpress/keyboard-shortcuts';
|
||||
import { store as interfaceStore } from '@wordpress/interface';
|
||||
@@ -18,7 +15,14 @@ import {
|
||||
StoreDescriptor as GenericStoreDescriptor,
|
||||
UseSelectReturn,
|
||||
} from '@wordpress/data/build-types/types';
|
||||
import {
|
||||
Color,
|
||||
Gradient,
|
||||
} from '@wordpress/components/build-types/palette-edit/types';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import './wordpress-modules';
|
||||
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any -- some general types in this file need to use "any" */
|
||||
|
Reference in New Issue
Block a user