From 99e9899813ad0bef4a7acad1327e4c08883b4954 Mon Sep 17 00:00:00 2001 From: zhangw Date: Wed, 30 Oct 2024 14:39:28 +0800 Subject: [PATCH] feat: update --- packages/sheets-hyper-link-ui/package.json | 1 + .../sheets-hyper-link-ui/src/controllers/popup.controller.ts | 2 +- packages/sheets-hyper-link-ui/src/index.ts | 2 -- packages/sheets-hyper-link-ui/src/services/popup.service.ts | 2 +- .../sheets-hyper-link-ui/src/services/resolver.service.ts | 3 +-- .../sheets-hyper-link-ui/src/services/side-panel.service.ts | 4 ++-- packages/sheets-hyper-link/tsconfig.json | 2 +- 7 files changed, 7 insertions(+), 9 deletions(-) diff --git a/packages/sheets-hyper-link-ui/package.json b/packages/sheets-hyper-link-ui/package.json index df471fc262b..55fa221e299 100644 --- a/packages/sheets-hyper-link-ui/package.json +++ b/packages/sheets-hyper-link-ui/package.json @@ -75,6 +75,7 @@ "@univerjs/icons": "^0.1.84", "@univerjs/sheets": "workspace:*", "@univerjs/sheets-formula-ui": "workspace:*", + "@univerjs/sheets-hyper-link": "workspace:*", "@univerjs/sheets-ui": "workspace:*", "@univerjs/ui": "workspace:*", "clsx": "^2.1.1" diff --git a/packages/sheets-hyper-link-ui/src/controllers/popup.controller.ts b/packages/sheets-hyper-link-ui/src/controllers/popup.controller.ts index 110b69d316c..9a03e9daa4a 100644 --- a/packages/sheets-hyper-link-ui/src/controllers/popup.controller.ts +++ b/packages/sheets-hyper-link-ui/src/controllers/popup.controller.ts @@ -35,11 +35,11 @@ import { WorksheetInsertHyperlinkPermission, WorksheetViewPermission, } from '@univerjs/sheets'; +import { HyperLinkEditSourceType } from '@univerjs/sheets-hyper-link'; import { HoverManagerService, HoverRenderController, IEditorBridgeService, SheetPermissionInterceptorBaseController, SheetSkeletonManagerService } from '@univerjs/sheets-ui'; import { IZenZoneService } from '@univerjs/ui'; import { debounceTime, map, Observable, switchMap } from 'rxjs'; import { SheetsHyperLinkPopupService } from '../services/popup.service'; -import { HyperLinkEditSourceType } from '../types/enums/edit-source'; export class SheetsHyperLinkPopupController extends Disposable { constructor( diff --git a/packages/sheets-hyper-link-ui/src/index.ts b/packages/sheets-hyper-link-ui/src/index.ts index e7e45131cd0..22e7af85e28 100644 --- a/packages/sheets-hyper-link-ui/src/index.ts +++ b/packages/sheets-hyper-link-ui/src/index.ts @@ -16,9 +16,7 @@ export { InsertLinkShortcut } from './controllers/menu'; export { UniverSheetsHyperLinkUIPlugin } from './plugin'; - export { SheetsHyperLinkPopupService } from './services/popup.service'; - export { SheetsHyperLinkResolverService } from './services/resolver.service'; export { type ICustomHyperLinkView, SheetsHyperLinkSidePanelService } from './services/side-panel.service'; diff --git a/packages/sheets-hyper-link-ui/src/services/popup.service.ts b/packages/sheets-hyper-link-ui/src/services/popup.service.ts index 104dfe689d4..a5401a653fd 100644 --- a/packages/sheets-hyper-link-ui/src/services/popup.service.ts +++ b/packages/sheets-hyper-link-ui/src/services/popup.service.ts @@ -21,10 +21,10 @@ import type { ICanvasPopup } from '@univerjs/sheets-ui'; import { BuildTextUtils, CustomRangeType, Disposable, DOCS_ZEN_EDITOR_UNIT_ID_KEY, Inject, Injector, IUniverInstanceService, UniverInstanceType } from '@univerjs/core'; import { DocSelectionManagerService } from '@univerjs/docs'; import { DocCanvasPopManagerService, IEditorService, IRangeSelectorService } from '@univerjs/docs-ui'; +import { HyperLinkEditSourceType } from '@univerjs/sheets-hyper-link'; import { getCustomRangePosition, getEditingCustomRangePosition, IEditorBridgeService, SheetCanvasPopManagerService } from '@univerjs/sheets-ui'; import { IZenZoneService } from '@univerjs/ui'; import { BehaviorSubject, Subject } from 'rxjs'; -import { HyperLinkEditSourceType } from '../types/enums/edit-source'; import { CellLinkEdit } from '../views/CellLinkEdit'; import { CellLinkPopup } from '../views/CellLinkPopup'; diff --git a/packages/sheets-hyper-link-ui/src/services/resolver.service.ts b/packages/sheets-hyper-link-ui/src/services/resolver.service.ts index fd2d18ebb9d..65d3f9d520d 100644 --- a/packages/sheets-hyper-link-ui/src/services/resolver.service.ts +++ b/packages/sheets-hyper-link-ui/src/services/resolver.service.ts @@ -22,11 +22,10 @@ import { ICommandService, IConfigService, Inject, isValidRange, IUniverInstanceS import { MessageType } from '@univerjs/design'; import { deserializeRangeWithSheet, IDefinedNamesService } from '@univerjs/engine-formula'; import { SetSelectionsOperation, SetWorksheetActiveOperation } from '@univerjs/sheets'; +import { ERROR_RANGE, SheetHyperLinkType } from '@univerjs/sheets-hyper-link'; import { ScrollToRangeOperation } from '@univerjs/sheets-ui'; import { IMessageService } from '@univerjs/ui'; import { PLUGIN_CONFIG_KEY } from '../controllers/config.schema'; -import { ERROR_RANGE } from '../types/const'; -import { SheetHyperLinkType } from '../types/enums/hyper-link-type'; function getContainRange(range: IRange, worksheet: Worksheet) { const mergedCells = worksheet.getMergeData(); diff --git a/packages/sheets-hyper-link-ui/src/services/side-panel.service.ts b/packages/sheets-hyper-link-ui/src/services/side-panel.service.ts index 5879c8fd7b5..7a2d5490dd2 100644 --- a/packages/sheets-hyper-link-ui/src/services/side-panel.service.ts +++ b/packages/sheets-hyper-link-ui/src/services/side-panel.service.ts @@ -14,10 +14,10 @@ * limitations under the License. */ +import type { ICellHyperLink } from '@univerjs/sheets-hyper-link'; import type React from 'react'; -import type { ICellHyperLink } from '../types/interfaces/i-hyper-link'; import { Disposable } from '@univerjs/core'; -import { SheetHyperLinkType } from '../types/enums/hyper-link-type'; +import { SheetHyperLinkType } from '@univerjs/sheets-hyper-link'; export interface ICustomHyperLinkFormProps { linkId: string; diff --git a/packages/sheets-hyper-link/tsconfig.json b/packages/sheets-hyper-link/tsconfig.json index a6fff1584e2..c62210cbad2 100644 --- a/packages/sheets-hyper-link/tsconfig.json +++ b/packages/sheets-hyper-link/tsconfig.json @@ -5,5 +5,5 @@ "outDir": "lib/types" }, "references": [{ "path": "./tsconfig.node.json" }], - "include": ["src", "vite.config.ts"] + "include": ["src"] }