Fix eslint warnings: block and blockinstance
MAILPOET-6316
This commit is contained in:
committed by
Jan Lysý
parent
9686da2918
commit
f9458c2b7f
@ -1,5 +1,5 @@
|
||||
import { addFilter } from '@wordpress/hooks';
|
||||
import { Block } from '@wordpress/blocks';
|
||||
import { Block } from '@wordpress/blocks/index';
|
||||
|
||||
/**
|
||||
* Disables Styles for button
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { addFilter } from '@wordpress/hooks';
|
||||
import { Block } from '@wordpress/blocks';
|
||||
import { Block } from '@wordpress/blocks/index';
|
||||
|
||||
/**
|
||||
* Switch layout to reduced flex email layout
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { addFilter } from '@wordpress/hooks';
|
||||
import { Block } from '@wordpress/blocks';
|
||||
import { Block } from '@wordpress/blocks/index';
|
||||
|
||||
function enhanceColumnBlock() {
|
||||
addFilter(
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { InspectorControls } from '@wordpress/block-editor';
|
||||
import { createHigherOrderComponent } from '@wordpress/compose';
|
||||
import { Block } from '@wordpress/blocks';
|
||||
import { Block } from '@wordpress/blocks/index';
|
||||
import { addFilter } from '@wordpress/hooks';
|
||||
|
||||
const columnsEditCallback = createHigherOrderComponent(
|
||||
|
@ -2,7 +2,7 @@ import { addFilter } from '@wordpress/hooks';
|
||||
import {
|
||||
Block as WPBlock,
|
||||
BlockSupports as WPBlockSupports,
|
||||
} from '@wordpress/blocks';
|
||||
} from '@wordpress/blocks/index';
|
||||
|
||||
// Extend the BlockSupports type to include shadow
|
||||
// The shadow is not included in WP6.4 but it is in WP6.5
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { InspectorControls } from '@wordpress/block-editor';
|
||||
import { createHigherOrderComponent } from '@wordpress/compose';
|
||||
import { addFilter } from '@wordpress/hooks';
|
||||
import { Block } from '@wordpress/blocks';
|
||||
import { Block } from '@wordpress/blocks/index';
|
||||
|
||||
const imageEditCallback = createHigherOrderComponent(
|
||||
( BlockEdit ) =>
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { addFilter } from '@wordpress/hooks';
|
||||
import { Block } from '@wordpress/blocks';
|
||||
import { Block } from '@wordpress/blocks/index';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { useBlockProps } from '@wordpress/block-editor';
|
||||
|
||||
|
@ -10,8 +10,8 @@ import {
|
||||
parse,
|
||||
// @ts-expect-error No types available for this yet.
|
||||
__unstableSerializeAndClean, // eslint-disable-line
|
||||
BlockInstance,
|
||||
} from '@wordpress/blocks';
|
||||
import { BlockInstance } from '@wordpress/blocks/index';
|
||||
import { addQueryArgs } from '@wordpress/url';
|
||||
import { storeName } from '../../store';
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { BlockInstance, parse } from '@wordpress/blocks';
|
||||
import { parse } from '@wordpress/blocks';
|
||||
import { BlockInstance } from '@wordpress/blocks/index';
|
||||
import { useSelect } from '@wordpress/data';
|
||||
import { store as blockEditorStore } from '@wordpress/block-editor';
|
||||
import { storeName, EmailTemplatePreview, TemplatePreview } from '../store';
|
||||
|
@ -8,7 +8,8 @@ import classnames from 'classnames';
|
||||
*/
|
||||
import { createHigherOrderComponent } from '@wordpress/compose';
|
||||
import { addFilter } from '@wordpress/hooks';
|
||||
import { Block, getBlockSupport, hasBlockSupport } from '@wordpress/blocks';
|
||||
import { getBlockSupport, hasBlockSupport } from '@wordpress/blocks';
|
||||
import { Block } from '@wordpress/blocks/index';
|
||||
|
||||
import {
|
||||
BlockControls,
|
||||
|
@ -3,7 +3,8 @@ import { store as coreDataStore } from '@wordpress/core-data';
|
||||
import { store as interfaceStore } from '@wordpress/interface';
|
||||
import { store as editorStore } from '@wordpress/editor';
|
||||
import { store as preferencesStore } from '@wordpress/preferences';
|
||||
import { serialize, BlockInstance } from '@wordpress/blocks';
|
||||
import { serialize } from '@wordpress/blocks';
|
||||
import { BlockInstance } from '@wordpress/blocks/index';
|
||||
import { storeName } from './constants';
|
||||
import { State, Feature, EmailTemplate } from './types';
|
||||
|
||||
|
@ -28,8 +28,8 @@ export const createStore = () => {
|
||||
};
|
||||
|
||||
export interface EmailEditorStore {
|
||||
getActions(): EditorStoreConfig[ 'actions' ];
|
||||
getSelectors(): EditorStoreConfig[ 'selectors' ];
|
||||
getActions: () => EditorStoreConfig[ 'actions' ];
|
||||
getSelectors: () => EditorStoreConfig[ 'selectors' ];
|
||||
}
|
||||
|
||||
declare module '@wordpress/data' {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { EditorSettings, EditorColor } from '@wordpress/block-editor';
|
||||
import { BlockInstance } from '@wordpress/blocks';
|
||||
import { EditorSettings, EditorColor } from '@wordpress/block-editor/index';
|
||||
import { BlockInstance } from '@wordpress/blocks/index';
|
||||
|
||||
export enum SendingPreviewStatus {
|
||||
SUCCESS = 'success',
|
||||
|
@ -119,14 +119,14 @@ declare module '@wordpress/notices' {
|
||||
) => void;
|
||||
};
|
||||
selectors: {
|
||||
getNotices( state: unknown, context?: string ): Notice[];
|
||||
removeNotice( id: string, context?: string ): void;
|
||||
getNotices: ( state: unknown, context?: string ) => Notice[];
|
||||
removeNotice: ( id: string, context?: string ) => void;
|
||||
};
|
||||
} >;
|
||||
}
|
||||
|
||||
declare module '@wordpress/core-data' {
|
||||
import { BlockInstance } from '@wordpress/blocks';
|
||||
import { BlockInstance } from '@wordpress/blocks/index';
|
||||
|
||||
export function useEntityBlockEditor(
|
||||
kind: string,
|
||||
|
Reference in New Issue
Block a user