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: fix resource key of filter
Wenzhao Hue832ce376b2f
diff --git a/docs/NAMING_CONVENTION.md b/docs/NAMING_CONVENTION.mdindex c2a1c0fa11..268a030674 100644--- a/docs/NAMING_CONVENTION.md+++ b/docs/NAMING_CONVENTION.md@@ -81,7 +81,7 @@ export const ILogService = createIdentifier<ILogService>('log-service');## Plugins' Names-Plugin names should be all in capitalized letters and suffixed by `PLUGIN`. Words should be separated by underscores and suffixed. For example:+Plugin names should be all in format of `{BUSINESS_TYPE}_${PLUGIN_NAME}_PLUGIN`. Words should be separated by underscores and suffixed. For example:```typescript// ✅@@ -108,7 +108,7 @@ export class FilterPlugin extends Plugin {}### Resource key-Resource keys should reuse the corresponding plugin's name.+Resource key should be identical to the corresponding plugin's name.## Commands@@ -135,4 +135,8 @@ export const SetSelectionFrozenCommand: ICommand<ISetSelectionFrozenCommandParamexport const SetSelectionFrozenCommand: ICommand<ISetSelectionFrozenCommandParams> = {id: 'SetSelectionFrozenCommmand',}-```\ No newline at end of file+```++## Id++All IDs should be in pascal case: `id` or `Id`.diff --git a/packages/sheets-filter/src/controllers/sheets-fiter.controller.ts b/packages/sheets-filter/src/controllers/sheets-filter.controller.tssimilarity index 100%rename from packages/sheets-filter/src/controllers/sheets-fiter.controller.tsrename to packages/sheets-filter/src/controllers/sheets-filter.controller.tsdiff --git a/packages/sheets-filter/src/models/__tests__/filter-interceptor.spec.ts b/packages/sheets-filter/src/models/__tests__/filter-interceptor.spec.tsindex fbd58e870f..327ec35d8c 100644--- a/packages/sheets-filter/src/models/__tests__/filter-interceptor.spec.ts+++ b/packages/sheets-filter/src/models/__tests__/filter-interceptor.spec.ts@@ -23,7 +23,7 @@ import { Inject, Injector } from '@wendellhu/redi';import type { IInsertColCommandParams, IInsertRowCommandParams, IMoveColsCommandParams, IMoveRowsCommandParams, IRemoveRowColCommandParams, IRemoveSheetCommandParams, ISetSelectionsOperationParams } from '@univerjs/sheets';import { InsertColCommand, InsertColMutation, InsertRowCommand, InsertRowMutation, MoveColsCommand, MoveColsMutation, MoveRowsCommand, MoveRowsMutation, NORMAL_SELECTION_PLUGIN_NAME, RefRangeService, RemoveColCommand, RemoveColMutation, RemoveRowCommand, RemoveRowMutation, RemoveSheetCommand, RemoveSheetMutation, SelectionManagerService, SetSelectionsOperation, SheetInterceptorService } from '@univerjs/sheets';import { SHEET_FILTER_SNAPSHOT_ID, SheetsFilterService } from '../../services/sheet-filter.service';-import { SheetsFilterController } from '../../controllers/sheets-fiter.controller';+import { SheetsFilterController } from '../../controllers/sheets-filter.controller';describe('Test "Filter Interceptor"', () => {let univer: Univer;diff --git a/packages/sheets-filter/src/plugin.ts b/packages/sheets-filter/src/plugin.tsindex 7d2b6f3301..1d922e36a4 100644--- a/packages/sheets-filter/src/plugin.ts+++ b/packages/sheets-filter/src/plugin.ts@@ -18,14 +18,12 @@ import { Plugin, UniverInstanceType } from '@univerjs/core';import type { Dependency } from '@wendellhu/redi';import { Inject, Injector } from '@wendellhu/redi';-import { SheetsFilterService } from './services/sheet-filter.service';-import { SheetsFilterController } from './controllers/sheets-fiter.controller';--const NAME = 'UNIVER_SHEETS_FILTER_PLUGIN';+import { SHEET_FILTER_SNAPSHOT_ID, SheetsFilterService } from './services/sheet-filter.service';+import { SheetsFilterController } from './controllers/sheets-filter.controller';export class UniverSheetsFilterPlugin extends Plugin {static override type = UniverInstanceType.UNIVER_SHEET;- static override pluginName = NAME;+ static override pluginName = SHEET_FILTER_SNAPSHOT_ID;constructor(_config: unknown, @Inject(Injector) protected readonly _injector: Injector) {super();