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
style(core): rename
Dushusira3cf55bb6f56
diff --git a/packages/core/src/Docs/Domain/DocumentModel.ts b/packages/core/src/Docs/Domain/DocumentModel.tsindex 1b19b85fea..b24e4cb4a5 100644--- a/packages/core/src/Docs/Domain/DocumentModel.ts+++ b/packages/core/src/Docs/Domain/DocumentModel.ts@@ -5,6 +5,7 @@ import { DOC_ACTION_NAMES } from '../../Const/DOC_ACTION_NAMES';import { getDocsUpdateBody } from '../Apply/Common';import { Nullable, Tools } from '../../Shared';import { DocumentBodyModel } from './DocumentBodyModel';+import { DEFAULT_DOC } from '../../Const';interface IDrawingUpdateConfig {left: number;@@ -24,8 +25,9 @@ export class DocumentModelSimple {bodyModel: DocumentBodyModel;- constructor(snapshot: IDocumentData) {- this.snapshot = snapshot;+ constructor(snapshot: Partial<IDocumentData>) {+ // this.snapshot = snapshot;+ this.snapshot = { ...DEFAULT_DOC, ...snapshot };if (this.snapshot.body != null) {this.bodyModel = DocumentBodyModel.create(this.snapshot.body);@@ -96,7 +98,7 @@ export class DocumentModel extends DocumentModelSimple {private _unitId: string;- constructor(snapshot: IDocumentData, context: DocContext) {+ constructor(snapshot: Partial<IDocumentData>, context: DocContext) {super(snapshot);this._context = context;this._unitId = this.snapshot.id ?? Tools.generateRandomId(6);diff --git a/packages/core/src/Sheets/Action/InsertColumnAction.ts b/packages/core/src/Sheets/Action/InsertColumnAction.tsindex 15c84febd4..0d13f65ed7 100644--- a/packages/core/src/Sheets/Action/InsertColumnAction.ts+++ b/packages/core/src/Sheets/Action/InsertColumnAction.ts@@ -1,7 +1,7 @@import { InsertColumnApply, RemoveColumnApply } from '../Apply';import { SheetActionBase, ISheetActionData } from '../../Command/SheetActionBase';import { ActionObservers, ActionType } from '../../Command/ActionObservers';-import { IRemoveColumnAction } from './removeColumnAction';+import { IRemoveColumnAction } from './removeColumnAction2';import { CommandManager, CommandUnit } from '../../Command';/**diff --git a/packages/core/src/Sheets/Action/index.ts b/packages/core/src/Sheets/Action/index.tsindex 06b5afa1ee..f8fa1d27c2 100644--- a/packages/core/src/Sheets/Action/index.ts+++ b/packages/core/src/Sheets/Action/index.ts@@ -10,7 +10,7 @@ export * from './InsertRangeAction';export * from './InsertRowAction';export * from './InsertRowDataAction';export * from './InsertSheetAction';-export * from './removeColumnAction';+export * from './removeColumnAction2';export * from './RemoveColumnDataAction';export * from './RemoveMergeAction';export * from './RemoveRowAction';diff --git a/packages/core/src/Sheets/Action/removeColumnAction.ts b/packages/core/src/Sheets/Action/removeColumnAction2.tssimilarity index 100%rename from packages/core/src/Sheets/Action/removeColumnAction.tsrename to packages/core/src/Sheets/Action/removeColumnAction2.ts