mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-25 10:22:55 +08:00
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 {
|
||||
AsyncBlock,
|
||||
@@ -13,7 +13,7 @@ export class Group extends BaseView {
|
||||
public override allowPendant = false;
|
||||
|
||||
type = Protocol.Block.Type.group;
|
||||
View = withRecastTable(GroupView);
|
||||
View = withRecastBlock(GroupView);
|
||||
|
||||
override async onDeleteChild(block: AsyncBlock): Promise<boolean> {
|
||||
if (block.childrenIds.length === 0) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { withRecastTable } from '@toeverything/components/editor-core';
|
||||
import { withRecastBlock } from '@toeverything/components/editor-core';
|
||||
import {
|
||||
Protocol,
|
||||
DefaultColumnsValue,
|
||||
@@ -19,7 +19,7 @@ export const PageChildrenView: FC<ChildrenView> = props => props.children;
|
||||
|
||||
export class PageBlock extends BaseView {
|
||||
type = Protocol.Block.Type.page;
|
||||
View = withRecastTable(PageView);
|
||||
View = withRecastBlock(PageView);
|
||||
// override ChildrenView = withRecastTable(PageChildrenView);
|
||||
public override allowPendant = false;
|
||||
override async onCreate(block: AsyncBlock): Promise<AsyncBlock> {
|
||||
|
||||
@@ -67,8 +67,3 @@ export const withRecastBlock =
|
||||
</RecastBlockProvider>
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link withRecastBlock} instead.
|
||||
*/
|
||||
export const withRecastTable = withRecastBlock;
|
||||
|
||||
@@ -9,7 +9,6 @@ export * from './types';
|
||||
export {
|
||||
RecastBlockProvider,
|
||||
withRecastBlock,
|
||||
withRecastTable,
|
||||
useRecastBlock,
|
||||
} from './Context';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user