Skip to content

Commit

Permalink
chore(facade): export from facade folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Dushusir committed Nov 19, 2024
1 parent 9c3e2c7 commit 5efbcff
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/facade/src/apis/everything.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import '@univerjs/sheets-thread-comment/facade';

export { FHooks, FUniver } from '@univerjs/core';
export { FFormula } from '@univerjs/engine-formula/facade';
export { FSheetHooks } from '@univerjs/sheets';
export { FSheetHooks } from '@univerjs/sheets/facade';
export { FPermission, FRange, FSelection, FWorkbook, FWorksheet } from '@univerjs/sheets/facade';
export { FDataValidation, FDataValidationBuilder } from '@univerjs/sheets-data-validation/facade';
export { FFilter } from '@univerjs/sheets-filter/facade';
Expand Down
5 changes: 3 additions & 2 deletions packages/sheets-ui/src/facade/__tests__/f-sheet-hooks.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,17 @@ import { DocSelectionManagerService } from '@univerjs/docs';

import { EditorService, IEditorService } from '@univerjs/docs-ui';
import { DeviceInputEventType } from '@univerjs/engine-render';
import { FSheetHooks, IRefSelectionsService, RefSelectionsService, SetHorizontalTextAlignCommand, SetRangeValuesCommand, SetRangeValuesMutation, SetStyleCommand, SetTextWrapCommand, SetVerticalTextAlignCommand } from '@univerjs/sheets';
import { IRefSelectionsService, RefSelectionsService, SetHorizontalTextAlignCommand, SetRangeValuesCommand, SetRangeValuesMutation, SetStyleCommand, SetTextWrapCommand, SetVerticalTextAlignCommand } from '@univerjs/sheets';
import { FSheetHooks } from '@univerjs/sheets/facade';
import { KeyCode } from '@univerjs/ui';
import { Subject } from 'rxjs';
import { beforeEach, describe, expect, it } from 'vitest';
import { SetCellEditVisibleOperation } from '../../commands/operations/cell-edit.operation';
import { DragManagerService } from '../../services/drag-manager.service';
import { EditorBridgeService, IEditorBridgeService } from '../../services/editor-bridge.service';
import { HoverManagerService } from '../../services/hover-manager.service';
import { createFacadeTestBed } from './create-test-bed';

import { createFacadeTestBed } from './create-test-bed';
import '../f-sheet-hooks';

class MockDataTransfer implements DataTransfer {
Expand Down
5 changes: 3 additions & 2 deletions packages/sheets-ui/src/facade/f-sheet-hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
import type { ICellCustomRender, IDisposable, Nullable } from '@univerjs/core';
import type { IDragCellPosition, IEditorBridgeServiceVisibleParam, IHoverCellPosition } from '@univerjs/sheets-ui';
import { ICommandService, InterceptorEffectEnum, toDisposable } from '@univerjs/core';
import { FSheetHooks, InterceptCellContentPriority, INTERCEPTOR_POINT, SheetInterceptorService } from '@univerjs/sheets';
import { InterceptCellContentPriority, INTERCEPTOR_POINT, SheetInterceptorService } from '@univerjs/sheets';
import { FSheetHooks } from '@univerjs/sheets/facade';
import { DragManagerService, HoverManagerService, SetCellEditVisibleOperation } from '@univerjs/sheets-ui';

interface IFSheetHooksUIMixin {
Expand Down Expand Up @@ -126,7 +127,7 @@ class FSheetHooksUIMixin extends FSheetHooks implements IFSheetHooksUIMixin {
}

FSheetHooks.extend(FSheetHooksUIMixin);
declare module '@univerjs/sheets' {
declare module '@univerjs/sheets/facade' {
// eslint-disable-next-line ts/naming-convention
interface FSheetHooks extends IFSheetHooksUIMixin {}
}
3 changes: 1 addition & 2 deletions packages/sheets-ui/src/facade/f-univer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ import type {
} from '@univerjs/engine-render';
import { FUniver, toDisposable } from '@univerjs/core';
import { IRenderManagerService } from '@univerjs/engine-render';
import { FSheetHooks } from '@univerjs/sheets';
import { FSheetHooks } from '@univerjs/sheets/facade';
import { SHEET_VIEW_KEY } from '@univerjs/sheets-ui';
import '@univerjs/sheets/facade';

interface IFUniverSheetsUIMixin {
/**
Expand Down
1 change: 1 addition & 0 deletions packages/sheets/src/facade/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ export { FPermission } from './f-permission';
export { FRange } from './f-range';
export type { FontLine, FontStyle, FontWeight } from './f-range';
export { FSelection } from './f-selection';
export { FSheetHooks } from './f-sheet-hooks';
export { FWorkbook } from './f-workbook';
export { FWorksheet } from './f-worksheet';
1 change: 0 additions & 1 deletion packages/sheets/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ export { getInsertRangeMutations, getRemoveRangeMutations } from './commands/uti
export { handleInsertRangeMutation } from './commands/utils/handle-range-mutation';
export { type ISheetCommandSharedParams } from './commands/utils/interface';
export { copyRangeStyles } from './commands/commands/utils/selection-utils';
export { FSheetHooks } from './facade/f-sheet-hooks';

// #region - all commands

Expand Down

0 comments on commit 5efbcff

Please sign in to comment.