Skip to content

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.

fix(sheets-note): rename SheetsNotePlugin to UniverSheetsNotePlugin for consistency (#5148)

白熱35d0f5666e5c
diff --git a/examples/src/main.tsx b/examples/src/main.tsx
index e328ef6a06..dcb5ffb4f5 100644
--- a/examples/src/main.tsx
+++ b/examples/src/main.tsx
@@ -15,7 +15,6 @@
*/
import { render } from '@univerjs/design';
-import React from 'react';
import pkg from '../../package.json';
import './global.css';
diff --git a/examples/src/sheets/main.ts b/examples/src/sheets/main.ts
index 5ddb3d26d4..396ffd95e1 100644
--- a/examples/src/sheets/main.ts
+++ b/examples/src/sheets/main.ts
@@ -30,8 +30,8 @@ import { UniverSheetsDataValidationPlugin } from '@univerjs/sheets-data-validati
import { UniverSheetsFilterPlugin } from '@univerjs/sheets-filter';
import { UniverSheetsFormulaPlugin } from '@univerjs/sheets-formula';
import { UniverSheetsHyperLinkPlugin } from '@univerjs/sheets-hyper-link';
-import { SheetsNotePlugin } from '@univerjs/sheets-note';
-import { SheetsNoteUIPlugin } from '@univerjs/sheets-note-ui';
+import { UniverSheetsNotePlugin } from '@univerjs/sheets-note';
+import { UniverSheetsNoteUIPlugin } from '@univerjs/sheets-note-ui';
import { UniverSheetsNumfmtPlugin } from '@univerjs/sheets-numfmt';
import { UniverSheetsSortPlugin } from '@univerjs/sheets-sort';
import { UniverSheetsBindingSourcePlugin } from '@univerjs/sheets-source-binding';
@@ -130,8 +130,8 @@ function createNewInstance() {
univer.registerPlugin(UniverSheetTablePlugin);
univer.registerPlugin(UniverNetworkPlugin);
- univer.registerPlugin(SheetsNotePlugin);
- univer.registerPlugin(SheetsNoteUIPlugin);
+ univer.registerPlugin(UniverSheetsNotePlugin);
+ univer.registerPlugin(UniverSheetsNoteUIPlugin);
univer.registerPlugin(ImportCSVButtonPlugin);
// If we are running in e2e platform, we should immediately register the debugger plugin.
diff --git a/packages/sheets-note-ui/src/index.ts b/packages/sheets-note-ui/src/index.ts
index 049a0ac636..716749626d 100644
--- a/packages/sheets-note-ui/src/index.ts
+++ b/packages/sheets-note-ui/src/index.ts
@@ -16,7 +16,7 @@
import './global.css';
-export * from './plugin';
+export { type IUniverSheetsNoteUIPluginConfig, UniverSheetsNoteUIPlugin } from './plugin';
export * from './services/sheets-note-popup.service';
export * from './views/note';
export * from './controllers/sheets-note-popup.controller';
diff --git a/packages/sheets-note-ui/src/plugin.ts b/packages/sheets-note-ui/src/plugin.ts
index dbb8837cda..c966874be0 100644
--- a/packages/sheets-note-ui/src/plugin.ts
+++ b/packages/sheets-note-ui/src/plugin.ts
@@ -16,7 +16,7 @@
import type { Dependency } from '@univerjs/core';
import { DependentOn, IConfigService, Inject, Injector, merge, Plugin, touchDependencies, UniverInstanceType } from '@univerjs/core';
-import { SheetsNotePlugin } from '@univerjs/sheets-note';
+import { UniverSheetsNotePlugin } from '@univerjs/sheets-note';
import { menuSchema } from './controllers/menu.schema';
import { SheetsCellContentController } from './controllers/sheets-cell-content.controller';
import { SheetsNoteAttachmentController } from './controllers/sheets-note-attachment.controller';
@@ -41,8 +41,8 @@ const defaultPluginConfig: IUniverSheetsNoteUIPluginConfig = {
menu: menuSchema,
};
-@DependentOn(SheetsNotePlugin)
-export class SheetsNoteUIPlugin extends Plugin {
+@DependentOn(UniverSheetsNotePlugin)
+export class UniverSheetsNoteUIPlugin extends Plugin {
static override pluginName = PLUGIN_NAME;
static override type = UniverInstanceType.UNIVER_SHEET;
diff --git a/packages/sheets-note/src/index.ts b/packages/sheets-note/src/index.ts
index 41ed83c85c..5b97963ab8 100644
--- a/packages/sheets-note/src/index.ts
+++ b/packages/sheets-note/src/index.ts
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-export * from './plugin';
+export { UniverSheetsNotePlugin } from './plugin';
export * from './models/sheets-note.model';
export * from './controllers/sheets-note-resource.controller';
export * from './commands/mutations/note.mutation';
diff --git a/packages/sheets-note/src/plugin.ts b/packages/sheets-note/src/plugin.ts
index b0d9dfe3b8..9c079dcd51 100644
--- a/packages/sheets-note/src/plugin.ts
+++ b/packages/sheets-note/src/plugin.ts
@@ -25,7 +25,7 @@ import { SheetsNoteModel } from './models/sheets-note.model';
export const PLUGIN_NAME = 'SHEET_NOTE_PLUGIN';
@DependentOn(UniverSheetsPlugin)
-export class SheetsNotePlugin extends Plugin {
+export class UniverSheetsNotePlugin extends Plugin {
static override pluginName = PLUGIN_NAME;
static override type = UniverInstanceType.UNIVER_SHEET;
diff --git a/packages/sheets-table-ui/src/plugin.ts b/packages/sheets-table-ui/src/plugin.ts
index e32d0795d5..300cc0fabf 100644
--- a/packages/sheets-table-ui/src/plugin.ts
+++ b/packages/sheets-table-ui/src/plugin.ts
@@ -16,8 +16,9 @@
import type { Dependency } from '@univerjs/core';
import type { IUniverSheetsTableUIConfig } from './controllers/config.schema';
-import { ICommandService, IConfigService, Inject, Injector, Plugin, registerDependencies, touchDependencies, UniverInstanceType } from '@univerjs/core';
+import { DependentOn, ICommandService, IConfigService, Inject, Injector, Plugin, registerDependencies, touchDependencies, UniverInstanceType } from '@univerjs/core';
import { IRenderManagerService } from '@univerjs/engine-render';
+import { UniverSheetTablePlugin } from '@univerjs/sheets-table';
import { OpenTableFilterPanelOperation } from './commands/operations/open-table-filter-dialog.opration';
import { OpenTableSelectorOperation } from './commands/operations/open-table-selector.operation';
import { PLUGIN_NAME } from './const';
@@ -31,6 +32,7 @@ import { SheetTableSelectionController } from './controllers/sheet-table-selecti
import { SheetTableThemeUIController } from './controllers/sheet-table-theme-ui.controller';
import { SheetsTableUiService } from './services/sheets-table-ui-service';
+@DependentOn(UniverSheetTablePlugin)
export class UniverSheetTableUIPlugin extends Plugin {
static override pluginName = PLUGIN_NAME;
static override type = UniverInstanceType.UNIVER_SHEET;