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(core): protection
Dushusirab93392d0aab
diff --git a/package.json b/package.jsonindex 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.jsindex 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.tsindex 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.tssimilarity index 89%rename from packages/sheets-plugin-protection/src/Domain/Allowed.tsrename to packages/sheets-plugin-protection/src/Controller/Allowed.tsindex 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.tssimilarity index 95%rename from packages/sheets-plugin-protection/src/Domain/AllowedList.tsrename to packages/sheets-plugin-protection/src/Controller/AllowedList.tsindex 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.tssimilarity index 100%rename from packages/sheets-plugin-protection/src/Domain/Protection.tsrename to packages/sheets-plugin-protection/src/Controller/Protection.tsdiff --git a/packages/sheets-plugin-protection/src/Domain/UnlockList.ts b/packages/sheets-plugin-protection/src/Controller/UnlockList.tssimilarity index 100%rename from packages/sheets-plugin-protection/src/Domain/UnlockList.tsrename to packages/sheets-plugin-protection/src/Controller/UnlockList.tsdiff --git a/packages/sheets-plugin-protection/src/Domain/index.ts b/packages/sheets-plugin-protection/src/Controller/index.tssimilarity index 100%rename from packages/sheets-plugin-protection/src/Domain/index.tsrename to packages/sheets-plugin-protection/src/Controller/index.tsdiff --git a/packages/sheets-plugin-protection/src/ProtectionPlugin.tsx b/packages/sheets-plugin-protection/src/ProtectionPlugin.tsxindex 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-componimport { 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.tsxindex 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 = {