Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix operation control of frozen rows and columns will disappear when zoomed out #1732

Closed
wants to merge 11 commits into from
Closed
Prev Previous commit
Next Next commit
fix(sheet): active dirty dependency ui (#1728)
* fix(sheet): active dirty dependency ui

* fix(sheet): type error
  • Loading branch information
DR-Univer committed Mar 29, 2024
commit d8c9e4b241872b1470ae7a87bba4ba13cd782809
2 changes: 2 additions & 0 deletions packages/engine-formula/src/index.ts
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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.

Loading