chore: sunset withRecastTable api
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import { withRecastTable } from '@toeverything/components/editor-core';
|
import { withRecastBlock } from '@toeverything/components/editor-core';
|
||||||
import { Protocol } from '@toeverything/datasource/db-service';
|
import { Protocol } from '@toeverything/datasource/db-service';
|
||||||
import {
|
import {
|
||||||
AsyncBlock,
|
AsyncBlock,
|
||||||
@@ -13,7 +13,7 @@ export class Group extends BaseView {
|
|||||||
public override allowPendant = false;
|
public override allowPendant = false;
|
||||||
|
|
||||||
type = Protocol.Block.Type.group;
|
type = Protocol.Block.Type.group;
|
||||||
View = withRecastTable(GroupView);
|
View = withRecastBlock(GroupView);
|
||||||
|
|
||||||
override async onDeleteChild(block: AsyncBlock): Promise<boolean> {
|
override async onDeleteChild(block: AsyncBlock): Promise<boolean> {
|
||||||
if (block.childrenIds.length === 0) {
|
if (block.childrenIds.length === 0) {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { withRecastTable } from '@toeverything/components/editor-core';
|
import { withRecastBlock } from '@toeverything/components/editor-core';
|
||||||
import {
|
import {
|
||||||
Protocol,
|
Protocol,
|
||||||
DefaultColumnsValue,
|
DefaultColumnsValue,
|
||||||
@@ -19,7 +19,7 @@ export const PageChildrenView: FC<ChildrenView> = props => props.children;
|
|||||||
|
|
||||||
export class PageBlock extends BaseView {
|
export class PageBlock extends BaseView {
|
||||||
type = Protocol.Block.Type.page;
|
type = Protocol.Block.Type.page;
|
||||||
View = withRecastTable(PageView);
|
View = withRecastBlock(PageView);
|
||||||
// override ChildrenView = withRecastTable(PageChildrenView);
|
// override ChildrenView = withRecastTable(PageChildrenView);
|
||||||
public override allowPendant = false;
|
public override allowPendant = false;
|
||||||
override async onCreate(block: AsyncBlock): Promise<AsyncBlock> {
|
override async onCreate(block: AsyncBlock): Promise<AsyncBlock> {
|
||||||
|
|||||||
@@ -67,8 +67,3 @@ export const withRecastBlock =
|
|||||||
</RecastBlockProvider>
|
</RecastBlockProvider>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated Use {@link withRecastBlock} instead.
|
|
||||||
*/
|
|
||||||
export const withRecastTable = withRecastBlock;
|
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ export * from './types';
|
|||||||
export {
|
export {
|
||||||
RecastBlockProvider,
|
RecastBlockProvider,
|
||||||
withRecastBlock,
|
withRecastBlock,
|
||||||
withRecastTable,
|
|
||||||
useRecastBlock,
|
useRecastBlock,
|
||||||
} from './Context';
|
} from './Context';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user