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
refactor: use local DI exports
白熱d971fbb1c465
diff --git a/packages/core/src/services/mention-io/mention-io-local.service.ts b/packages/core/src/services/mention-io/mention-io-local.service.tsindex 4bc7903e29..68bb60331e 100644--- a/packages/core/src/services/mention-io/mention-io-local.service.ts+++ b/packages/core/src/services/mention-io/mention-io-local.service.ts@@ -15,7 +15,7 @@*/import type { IListMentionParam, IListMentionResponse, IMentionIOService } from './type';-import { Inject } from '@wendellhu/redi';+import { Inject } from '../../common/di';import { MentionType } from '../../types/enum';import { UserManagerService } from '../user-manager/user-manager.service';diff --git a/packages/core/src/services/mention-io/type.ts b/packages/core/src/services/mention-io/type.tsindex 15e403c8eb..64b8cf8152 100644--- a/packages/core/src/services/mention-io/type.ts+++ b/packages/core/src/services/mention-io/type.ts@@ -16,7 +16,7 @@import type { MentionType } from '../../types/enum';import type { IMention } from '../../types/interfaces';-import { createIdentifier } from '@wendellhu/redi';+import { createIdentifier } from '../../common/di';export interface IListMentionParam {search?: string;diff --git a/packages/core/src/shared/cache/image-cache.ts b/packages/core/src/shared/cache/image-cache.tsindex 73beb93ecc..e097c03788 100644--- a/packages/core/src/shared/cache/image-cache.ts+++ b/packages/core/src/shared/cache/image-cache.ts@@ -14,7 +14,7 @@* limitations under the License.*/-import type { Injector } from '@wendellhu/redi';+import type { Injector } from '../../common/di';import { IImageIoService, ImageSourceType } from '../../services/image-io/image-io.service';import { IURLImageService } from '../../services/image-io/url-image.service';import { LRUMap } from '../lru/lru-map';diff --git a/packages/core/src/sheets/sheet-skeleton.ts b/packages/core/src/sheets/sheet-skeleton.tsindex 001efaeb86..c3522e0ef0 100644--- a/packages/core/src/sheets/sheet-skeleton.ts+++ b/packages/core/src/sheets/sheet-skeleton.ts@@ -34,8 +34,8 @@ import type {IWorksheetData,} from './typedef';import type { Worksheet } from './worksheet';-import { Inject, Injector } from '@wendellhu/redi';import { AUTO_HEIGHT_FOR_MERGED_CELLS, IS_ROW_STYLE_PRECEDE_COLUMN_STYLE } from '../common/const';+import { Inject, Injector } from '../common/di';import { DocumentDataModel } from '../docs/data-model/document-data-model';import { IConfigService } from '../services/config/config.service';import { IContextService } from '../services/context/context.service';diff --git a/packages/core/src/sheets/worksheet.ts b/packages/core/src/sheets/worksheet.tsindex c8cefeb1a2..8f7eb26e55 100644--- a/packages/core/src/sheets/worksheet.ts+++ b/packages/core/src/sheets/worksheet.ts@@ -14,13 +14,22 @@* limitations under the License.*/-import type { IDisposable } from '@wendellhu/redi';+import type { IDisposable } from '../common/di';import type { IInterceptor } from '../common/interceptor';import type { IObjectMatrixPrimitiveType, Nullable } from '../shared';import type { BooleanNumber, HorizontalAlign, TextDirection, VerticalAlign, WrapStrategy } from '../types/enum';import type { IDocumentData, IDocumentRenderConfig, IPaddingData, IStyleData, ITextRotation } from '../types/interfaces';import type { Styles } from './styles';-import type { CustomData, ICellData, ICellDataForSheetInterceptor, ICellDataWithSpanAndDisplay, IFreeze, IRange, ISelectionCell, IWorksheetData } from './typedef';+import type {+ CustomData,+ ICellData,+ ICellDataForSheetInterceptor,+ ICellDataWithSpanAndDisplay,+ IFreeze,+ IRange,+ ISelectionCell,+ IWorksheetData,+} from './typedef';import { BuildTextUtils, DocumentDataModel } from '../docs';import { convertTextRotation, getFontStyleString } from '../docs/data-model/utils';import { composeStyles, ObjectMatrix, toDisposable, Tools } from '../shared';@@ -35,7 +44,14 @@ import { RowManager } from './row-manager';import { mergeWorksheetSnapshotWithDefault } from './sheet-snapshot-utils';import { SpanModel } from './span-model';import { CellModeEnum } from './typedef';-import { addLinkToDocumentModel, createDocumentModelWithStyle, DEFAULT_PADDING_DATA, extractOtherStyle, getFontFormat, isNotNullOrUndefined } from './util';+import {+ addLinkToDocumentModel,+ createDocumentModelWithStyle,+ DEFAULT_PADDING_DATA,+ extractOtherStyle,+ getFontFormat,+ isNotNullOrUndefined,+} from './util';import { SheetViewModel } from './view-model';export interface IDocumentLayoutObject {diff --git a/packages/core/src/skeleton.ts b/packages/core/src/skeleton.tsindex 0641d75831..3d9d590900 100644--- a/packages/core/src/skeleton.ts+++ b/packages/core/src/skeleton.ts@@ -15,7 +15,7 @@*/import type { IFontLocale } from './sheets/util';-import { Inject } from '@wendellhu/redi';+import { Inject } from './common/di';import { LocaleService } from './services/locale/locale.service';import { Disposable } from './shared/lifecycle';diff --git a/packages/core/src/types/interfaces/i-need-check-disposable.ts b/packages/core/src/types/interfaces/i-need-check-disposable.tsindex 11b867349f..ea59a5a04e 100644--- a/packages/core/src/types/interfaces/i-need-check-disposable.ts+++ b/packages/core/src/types/interfaces/i-need-check-disposable.ts@@ -14,7 +14,7 @@* limitations under the License.*/-import type { IDisposable } from '@wendellhu/redi';+import type { IDisposable } from '../../common/di';export interface INeedCheckDisposable extends IDisposable {canDispose: () => boolean;diff --git a/packages/ui/src/views/components/dom/Print.tsx b/packages/ui/src/views/components/dom/Print.tsxindex 63afbd8802..bdb9657562 100644--- a/packages/ui/src/views/components/dom/Print.tsx+++ b/packages/ui/src/views/components/dom/Print.tsx@@ -17,10 +17,10 @@import type { ComponentType } from 'react';import type { IFloatDom, IFloatDomLayout } from '../../../services/dom/canvas-dom-layer.service';import { IUniverInstanceService } from '@univerjs/core';-import { useDependency } from '@wendellhu/redi/react-bindings';import { memo, useMemo, useRef } from 'react';import { ComponentManager } from '../../../common';import { shouldForwardFloatDomEvents } from '../../../services/dom/canvas-dom-layer.service';+import { useDependency } from '../../../utils/di';export const PrintFloatDomSingle = memo((props: { layer: IFloatDom; id: string; position: IFloatDomLayout }) => {const { layer } = props;