page-operation.ts 733 B

1234567891011121314151617181920212223242526
  1. export const PageActionType = {
  2. Rename: 'Rename',
  3. Duplicate: 'Duplicate',
  4. Delete: 'Delete',
  5. DeleteCompletely: 'DeleteCompletely',
  6. Revert: 'Revert',
  7. NormalizeParent: 'NormalizeParent',
  8. } as const;
  9. export type PageActionType = typeof PageActionType[keyof typeof PageActionType];
  10. export const PageActionStage = {
  11. Main: 'Main',
  12. Sub: 'Sub',
  13. } as const;
  14. export type PageActionStage = typeof PageActionStage[keyof typeof PageActionStage];
  15. export type IPageOperationProcessData = {
  16. [key in PageActionType]?: {
  17. [PageActionStage.Main]?: { isProcessable: boolean },
  18. [PageActionStage.Sub]?: { isProcessable: boolean },
  19. }
  20. }
  21. export type IPageOperationProcessInfo = {
  22. [pageId: string]: IPageOperationProcessData,
  23. }