Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.
TypeScript boardcollaborationdocdocxexceloffce365officepdfpptpptxpresentationsdksheetslidesspreadsheetuniverwordwordprocessorworkspacexlsx
fix(sheet): active dirty dependency ui (#1728)
Univerd8c9e4b24187
diff --git a/packages/engine-formula/src/index.ts b/packages/engine-formula/src/index.tsindex b352c33868..2a27078921 100644--- a/packages/engine-formula/src/index.ts+++ b/packages/engine-formula/src/index.ts@@ -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';diff --git a/packages/engine-formula/src/plugin.ts b/packages/engine-formula/src/plugin.tsindex db6e4f59e6..cece63c4fa 100644--- a/packages/engine-formula/src/plugin.ts+++ b/packages/engine-formula/src/plugin.ts@@ -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';@@ -81,6 +82,7 @@ export class UniverFormulaEnginePlugin extends Plugin {[IFunctionService, { useClass: FunctionService }],[IFeatureCalculationManagerService, { useClass: FeatureCalculationManagerService }],[IDefinedNamesService, { useClass: DefinedNamesService }],+ [IActiveDirtyManagerService, { useClass: ActiveDirtyManagerService }],// Models[FormulaDataModel],diff --git a/packages/sheets-formula/src/services/active-dirty-manager.service.ts b/packages/engine-formula/src/services/active-dirty-manager.service.tssimilarity index 100%rename from packages/sheets-formula/src/services/active-dirty-manager.service.tsrename to packages/engine-formula/src/services/active-dirty-manager.service.tsdiff --git a/packages/sheets-conditional-formatting/package.json b/packages/sheets-conditional-formatting/package.jsonindex 9161c4f378..2a1387798e 100644--- a/packages/sheets-conditional-formatting/package.json+++ b/packages/sheets-conditional-formatting/package.json@@ -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",@@ -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",diff --git a/packages/sheets-conditional-formatting/src/services/__test__/test.util.ts b/packages/sheets-conditional-formatting/src/services/__test__/test.util.tsindex 0584fbe688..efe2127d99 100644--- a/packages/sheets-conditional-formatting/src/services/__test__/test.util.ts+++ b/packages/sheets-conditional-formatting/src/services/__test__/test.util.ts@@ -19,10 +19,10 @@ import { ICommandService, IUniverInstanceService, LocaleType, Plugin, PluginTypeimport {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';diff --git a/packages/sheets-conditional-formatting/src/services/conditional-formatting-formula.service.ts b/packages/sheets-conditional-formatting/src/services/conditional-formatting-formula.service.tsindex 01fe206edd..6e4b729ed6 100644--- a/packages/sheets-conditional-formatting/src/services/conditional-formatting-formula.service.ts+++ b/packages/sheets-conditional-formatting/src/services/conditional-formatting-formula.service.ts@@ -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';diff --git a/packages/sheets-formula/src/controllers/active-dirty.controller.ts b/packages/sheets-formula/src/controllers/active-dirty.controller.tsindex 97e8b43f09..842dd4fae3 100644--- a/packages/sheets-formula/src/controllers/active-dirty.controller.ts+++ b/packages/sheets-formula/src/controllers/active-dirty.controller.ts@@ -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,@@ -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(diff --git a/packages/sheets-formula/src/controllers/trigger-calculation.controller.ts b/packages/sheets-formula/src/controllers/trigger-calculation.controller.tsindex 2a222b02eb..24526ac272 100644--- a/packages/sheets-formula/src/controllers/trigger-calculation.controller.ts+++ b/packages/sheets-formula/src/controllers/trigger-calculation.controller.ts@@ -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,@@ -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 {diff --git a/packages/sheets-formula/src/formula-ui-plugin.ts b/packages/sheets-formula/src/formula-ui-plugin.tsindex 5fd8703f8b..9c0569e51c 100644--- a/packages/sheets-formula/src/formula-ui-plugin.ts+++ b/packages/sheets-formula/src/formula-ui-plugin.ts@@ -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,@@ -74,7 +74,7 @@ export class UniverSheetsFormulaPlugin extends Plugin {},],[IFormulaCustomFunctionService, { useClass: FormulaCustomFunctionService }],- [IActiveDirtyManagerService, { useClass: ActiveDirtyManagerService }],+[IRegisterFunctionService, { useClass: RegisterFunctionService }],// controllersdiff --git a/packages/sheets-formula/src/index.ts b/packages/sheets-formula/src/index.tsindex 9591852149..839dc85dfa 100644--- a/packages/sheets-formula/src/index.ts+++ b/packages/sheets-formula/src/index.ts@@ -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';diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 67ff76a8d0..f0a2b3dcc7 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -824,9 +824,6 @@ importers:'@univerjs/sheets':specifier: workspace:*version: link:../sheets- '@univerjs/sheets-formula':- specifier: workspace:*- version: link:../sheets-formula'@univerjs/sheets-ui':specifier: workspace:*version: link:../sheets-ui