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(core): protection

Dushusirab93392d0aab
diff --git a/package.json b/package.json
index f4182f00fa..1baf33138f 100644
--- a/package.json
+++ b/package.json
@@ -60,8 +60,7 @@
},
"lint-staged": {
"./packages/**/*.ts?(x)": [
- "eslint --fix",
- "git add"
+ "eslint --fix"
]
}
}
diff --git a/packages/core/jest.config.js b/packages/core/jest.config.js
index 2c2018d9d0..837e2c0bc0 100644
--- a/packages/core/jest.config.js
+++ b/packages/core/jest.config.js
@@ -14,7 +14,7 @@ module.exports = {
coveragePathIgnorePatterns: [
'<rootDir>/src/Server',
'<rootDir>/src/Shared/RectTree',
- '<rootDir>/src/Domain/Group.ts',
+ '<rootDir>/src/Controller/Group.ts',
'<rootDir>/src/Module',
'<rootDir>/src/Convertor',
'<rootDir>/src/Shared/DropCell.ts',
diff --git a/packages/sheets-plugin-protection/src/Action/AddAllowedAction.ts b/packages/sheets-plugin-protection/src/Action/AddAllowedAction.ts
index 0ff2658280..077f53aded 100644
--- a/packages/sheets-plugin-protection/src/Action/AddAllowedAction.ts
+++ b/packages/sheets-plugin-protection/src/Action/AddAllowedAction.ts
@@ -1,5 +1,5 @@
import { ActionBase, ActionObservers, ACTION_NAMES, CONVERTOR_OPERATION, IActionData, Workbook, WorkSheetConvertor } from '@univer/core';
-import { Allowed } from '../Domain';
+import { Allowed } from '../Controller';
import { AddAllowed, RemoveAllowed } from '../Apply';
export interface IAddAllowedActionData extends IActionData {
diff --git a/packages/sheets-plugin-protection/src/Domain/Allowed.ts b/packages/sheets-plugin-protection/src/Controller/Allowed.ts
similarity index 89%
rename from packages/sheets-plugin-protection/src/Domain/Allowed.ts
rename to packages/sheets-plugin-protection/src/Controller/Allowed.ts
index ae6954c3dc..7aedadd8e2 100644
--- a/packages/sheets-plugin-protection/src/Domain/Allowed.ts
+++ b/packages/sheets-plugin-protection/src/Controller/Allowed.ts
@@ -1,4 +1,4 @@
-import { Range } from '../../Domain';
+import { Range } from '@univer/core';
export class Allowed {
protected _password: string;
diff --git a/packages/sheets-plugin-protection/src/Domain/AllowedList.ts b/packages/sheets-plugin-protection/src/Controller/AllowedList.ts
similarity index 95%
rename from packages/sheets-plugin-protection/src/Domain/AllowedList.ts
rename to packages/sheets-plugin-protection/src/Controller/AllowedList.ts
index ab58266d0f..890c9e5c63 100644
--- a/packages/sheets-plugin-protection/src/Domain/AllowedList.ts
+++ b/packages/sheets-plugin-protection/src/Controller/AllowedList.ts
@@ -1,4 +1,4 @@
-import { Nullable, Rectangle } from '../../Shared';
+import { Nullable, Rectangle } from '@univer/core';
import { Allowed } from './Allowed';
export class AllowedList {
diff --git a/packages/sheets-plugin-protection/src/Domain/Protection.ts b/packages/sheets-plugin-protection/src/Controller/Protection.ts
similarity index 100%
rename from packages/sheets-plugin-protection/src/Domain/Protection.ts
rename to packages/sheets-plugin-protection/src/Controller/Protection.ts
diff --git a/packages/sheets-plugin-protection/src/Domain/UnlockList.ts b/packages/sheets-plugin-protection/src/Controller/UnlockList.ts
similarity index 100%
rename from packages/sheets-plugin-protection/src/Domain/UnlockList.ts
rename to packages/sheets-plugin-protection/src/Controller/UnlockList.ts
diff --git a/packages/sheets-plugin-protection/src/Domain/index.ts b/packages/sheets-plugin-protection/src/Controller/index.ts
similarity index 100%
rename from packages/sheets-plugin-protection/src/Domain/index.ts
rename to packages/sheets-plugin-protection/src/Controller/index.ts
diff --git a/packages/sheets-plugin-protection/src/ProtectionPlugin.tsx b/packages/sheets-plugin-protection/src/ProtectionPlugin.tsx
index bda827ba2f..8cbc9062b5 100644
--- a/packages/sheets-plugin-protection/src/ProtectionPlugin.tsx
+++ b/packages/sheets-plugin-protection/src/ProtectionPlugin.tsx
@@ -2,7 +2,7 @@ import { ISlotElement, ISlotProps, IToolBarItemProps } from '@univer/base-compon
import { Context, IOCContainer, UniverSheet, Plugin, PLUGIN_NAMES } from '@univer/core';
import { SpreadsheetPlugin } from '@univer/base-sheets';
import { PTOTECTION_PLUGIN_NAME } from './Basic/Const/PLUGIN_NAME';
-import { Protection } from './Domain/Protection';
+import { Protection } from './Controller/Protection';
import { IConfig } from './IData/IProtection';
import { en, zh } from './Locale';
import { ProtectionButton } from './UI/ProtectionButton';
diff --git a/packages/sheets-plugin-protection/src/UI/ProtectionSide/ProtectionSide.tsx b/packages/sheets-plugin-protection/src/UI/ProtectionSide/ProtectionSide.tsx
index 2678ccee6f..8d39c0f8df 100644
--- a/packages/sheets-plugin-protection/src/UI/ProtectionSide/ProtectionSide.tsx
+++ b/packages/sheets-plugin-protection/src/UI/ProtectionSide/ProtectionSide.tsx
@@ -1,7 +1,7 @@
import { BaseComponentSheet, BaseSiderModalProps, Component, createRef, FunctionComponent } from '@univer/base-component';
import { Context, IRangeData, Nullable, Observer, Workbook } from '@univer/core';
import { PTOTECTION_PLUGIN_NAME } from '../../Basic/Const';
-import { Protection } from '../../Domain';
+import { Protection } from '../../Controller';
import styles from './index.module.less';
type IConfig = {