Skip to content

Commit

Permalink
fix(sheet): active dirty dependency ui (#1728)
Browse files Browse the repository at this point in the history
* fix(sheet): active dirty dependency ui

* fix(sheet): type error
  • Loading branch information
DR-Univer committed Mar 29, 2024
1 parent 893b810 commit d8c9e4b
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 19 deletions.
2 changes: 2 additions & 0 deletions packages/engine-formula/src/index.ts
Expand Up @@ -142,3 +142,5 @@ export { matchRefDrawToken } from './basics/match-token';
export { IDefinedNamesService, DefinedNamesService } from './services/defined-names.service';
export { IFormulaRuntimeService, FormulaRuntimeService } from './services/runtime.service';
export { IFormulaCurrentConfigService, FormulaCurrentConfigService } from './services/current-data.service';

export { IActiveDirtyManagerService } from './services/active-dirty-manager.service';
2 changes: 2 additions & 0 deletions packages/engine-formula/src/plugin.ts
Expand Up @@ -54,6 +54,7 @@ import { FunctionService, IFunctionService } from './services/function.service';
import { IOtherFormulaManagerService, OtherFormulaManagerService } from './services/other-formula-manager.service';
import { FormulaRuntimeService, IFormulaRuntimeService } from './services/runtime.service';
import { ISuperTableService, SuperTableService } from './services/super-table.service';
import { ActiveDirtyManagerService, IActiveDirtyManagerService } from './services/active-dirty-manager.service';

const PLUGIN_NAME = 'base-formula-engine';

Expand Down Expand Up @@ -81,6 +82,7 @@ export class UniverFormulaEnginePlugin extends Plugin {
[IFunctionService, { useClass: FunctionService }],
[IFeatureCalculationManagerService, { useClass: FeatureCalculationManagerService }],
[IDefinedNamesService, { useClass: DefinedNamesService }],
[IActiveDirtyManagerService, { useClass: ActiveDirtyManagerService }],

// Models
[FormulaDataModel],
Expand Down
2 changes: 0 additions & 2 deletions packages/sheets-conditional-formatting/package.json
Expand Up @@ -72,7 +72,6 @@
"@univerjs/engine-formula": "workspace:*",
"@univerjs/engine-render": "workspace:*",
"@univerjs/sheets": "workspace:*",
"@univerjs/sheets-formula": "workspace:*",
"@univerjs/sheets-ui": "workspace:*",
"@univerjs/ui": "workspace:*",
"@wendellhu/redi": "0.13.0",
Expand Down Expand Up @@ -100,7 +99,6 @@
"@univerjs/icons-svg": "^0.1.42",
"@univerjs/shared": "workspace:*",
"@univerjs/sheets": "workspace:*",
"@univerjs/sheets-formula": "workspace:*",
"@univerjs/sheets-ui": "workspace:*",
"@univerjs/ui": "workspace:*",
"@wendellhu/redi": "^0.13.0",
Expand Down
Expand Up @@ -19,10 +19,10 @@ import { ICommandService, IUniverInstanceService, LocaleType, Plugin, PluginType
import {
SheetInterceptorService,
} from '@univerjs/sheets';
import { IActiveDirtyManagerService } from '@univerjs/sheets-formula';

import type { Dependency } from '@wendellhu/redi';
import { Inject, Injector } from '@wendellhu/redi';
import { IActiveDirtyManagerService } from '@univerjs/engine-formula';
import { ConditionalFormattingService } from '../conditional-formatting.service';
import { ConditionalFormattingFormulaService } from '../conditional-formatting-formula.service';
import { SheetsConditionalFormattingPlugin } from '../../plugin';
Expand Down
Expand Up @@ -18,10 +18,10 @@ import type { ICellData, Nullable, ObjectMatrix } from '@univerjs/core';
import { Disposable, ICommandService, RefAlias, toDisposable, Tools } from '@univerjs/core';
import { Inject, Injector } from '@wendellhu/redi';
import type { IRemoveOtherFormulaMutationParams, ISetFormulaCalculationResultMutation, ISetOtherFormulaMutationParams } from '@univerjs/engine-formula';
import { IActiveDirtyManagerService } from '@univerjs/sheets-formula';
import { RemoveOtherFormulaMutation,
import { IActiveDirtyManagerService, RemoveOtherFormulaMutation,
SetFormulaCalculationResultMutation,
SetOtherFormulaMutation } from '@univerjs/engine-formula';

import { Subject } from 'rxjs';
import { bufferTime, filter, map } from 'rxjs/operators';
import type { IConditionalFormattingFormulaMarkDirtyParams } from '../commands/mutations/formula-mark-dirty.mutation';
Expand Down
Expand Up @@ -24,7 +24,7 @@ import {
OnLifecycle,
} from '@univerjs/core';
import type { IDirtyUnitSheetNameMap } from '@univerjs/engine-formula';
import { FormulaDataModel } from '@univerjs/engine-formula';
import { FormulaDataModel, IActiveDirtyManagerService } from '@univerjs/engine-formula';
import type {
IDeleteRangeMutationParams,
IInsertSheetMutationParams,
Expand All @@ -49,8 +49,6 @@ import {
} from '@univerjs/sheets';
import { Inject } from '@wendellhu/redi';

import { IActiveDirtyManagerService } from '../services/active-dirty-manager.service';

@OnLifecycle(LifecycleStages.Ready, ActiveDirtyController)
export class ActiveDirtyController extends Disposable {
constructor(
Expand Down
Expand Up @@ -21,14 +21,13 @@ import type {
IDirtyUnitOtherFormulaMap,
IDirtyUnitSheetNameMap,
INumfmtItemMap,
ISetFormulaCalculationNotificationMutation,
} from '@univerjs/engine-formula';
ISetFormulaCalculationNotificationMutation } from '@univerjs/engine-formula';
import {
FormulaDataModel,
FormulaExecutedStateType,
IActiveDirtyManagerService,
SetFormulaCalculationNotificationMutation,
SetFormulaCalculationStartMutation,
} from '@univerjs/engine-formula';
SetFormulaCalculationStartMutation } from '@univerjs/engine-formula';
import type { ISetRangeValuesMutationParams } from '@univerjs/sheets';
import {
ClearSelectionFormatCommand,
Expand All @@ -39,7 +38,6 @@ import {
} from '@univerjs/sheets';

import { Inject } from '@wendellhu/redi';
import { IActiveDirtyManagerService } from '../services/active-dirty-manager.service';

@OnLifecycle(LifecycleStages.Ready, TriggerCalculationController)
export class TriggerCalculationController extends Disposable {
Expand Down
4 changes: 2 additions & 2 deletions packages/sheets-formula/src/formula-ui-plugin.ts
Expand Up @@ -30,7 +30,7 @@ import { PromptController } from './controllers/prompt.controller';
import { TriggerCalculationController } from './controllers/trigger-calculation.controller';
import { UpdateFormulaController } from './controllers/update-formula.controller';
import { zhCN } from './locale';
import { ActiveDirtyManagerService, IActiveDirtyManagerService } from './services/active-dirty-manager.service';

import { DescriptionService, IDescriptionService } from './services/description.service';
import {
FormulaCustomFunctionService,
Expand Down Expand Up @@ -74,7 +74,7 @@ export class UniverSheetsFormulaPlugin extends Plugin {
},
],
[IFormulaCustomFunctionService, { useClass: FormulaCustomFunctionService }],
[IActiveDirtyManagerService, { useClass: ActiveDirtyManagerService }],

[IRegisterFunctionService, { useClass: RegisterFunctionService }],

// controllers
Expand Down
1 change: 0 additions & 1 deletion packages/sheets-formula/src/index.ts
Expand Up @@ -22,7 +22,6 @@ export {
FormulaCustomFunctionService,
IFormulaCustomFunctionService,
} from './services/formula-custom-function.service';
export { IActiveDirtyManagerService, type IDirtyConversionManagerParams } from './services/active-dirty-manager.service';
export type { IRegisterFunctionParams, IUnregisterFunctionParams } from './services/register-function.service';
export { RegisterFunctionService } from './services/register-function.service';
export { IRegisterFunctionService } from './services/register-function.service';
3 changes: 0 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d8c9e4b

Please sign in to comment.