@univerjs/sheets-hyper-link-ui 0.4.1-nightly.202410291304 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +176 -0
- package/lib/cjs/index.js +2 -2
- package/lib/es/index.js +443 -37
- package/lib/types/commands/commands/add-hyper-link.command.d.ts +19 -0
- package/lib/types/commands/commands/remove-hyper-link.command.d.ts +19 -0
- package/lib/types/commands/commands/update-hyper-link.command.d.ts +17 -0
- package/lib/types/controllers/url.controller.d.ts +1 -3
- package/lib/types/index.d.ts +4 -0
- package/lib/types/services/resolver.service.d.ts +8 -4
- package/lib/types/types/interfaces/i-sheet-hyper-link-info.d.ts +10 -0
- package/lib/types/{facade/index.d.ts → types/interfaces/i-sheet-url-params.d.ts} +6 -0
- package/lib/types/types/interfaces/index.d.ts +17 -0
- package/lib/umd/index.js +2 -2
- package/package.json +13 -13
- package/lib/types/facade/f-workbook.d.ts +0 -13
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ICommand } from '@univerjs/core';
|
|
2
|
+
import { ICellLinkContent } from '@univerjs/sheets-hyper-link';
|
|
3
|
+
export interface IUpdateHyperLinkCommandParams {
|
|
4
|
+
unitId: string;
|
|
5
|
+
subUnitId: string;
|
|
6
|
+
id: string;
|
|
7
|
+
payload: ICellLinkContent;
|
|
8
|
+
row: number;
|
|
9
|
+
column: number;
|
|
10
|
+
}
|
|
11
|
+
export declare const UpdateHyperLinkCommand: ICommand<IUpdateHyperLinkCommandParams>;
|
|
12
|
+
export interface IUpdateRichHyperLinkCommandParams {
|
|
13
|
+
documentId: string;
|
|
14
|
+
id: string;
|
|
15
|
+
payload: ICellLinkContent;
|
|
16
|
+
}
|
|
17
|
+
export declare const UpdateRichHyperLinkCommand: ICommand<IUpdateRichHyperLinkCommandParams>;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { Disposable } from '@univerjs/core';
|
|
2
|
-
import { SheetsHyperLinkParserService } from '@univerjs/sheets-hyper-link';
|
|
3
2
|
import { SheetsHyperLinkResolverService } from '../services/resolver.service';
|
|
4
3
|
export declare class SheetHyperLinkUrlController extends Disposable {
|
|
5
|
-
private readonly _parserService;
|
|
6
4
|
private _resolverService;
|
|
7
|
-
constructor(
|
|
5
|
+
constructor(_resolverService: SheetsHyperLinkResolverService);
|
|
8
6
|
private _handleInitUrl;
|
|
9
7
|
}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -19,4 +19,8 @@ export { UniverSheetsHyperLinkUIPlugin } from './plugin';
|
|
|
19
19
|
export { SheetsHyperLinkPopupService } from './services/popup.service';
|
|
20
20
|
export { SheetsHyperLinkResolverService } from './services/resolver.service';
|
|
21
21
|
export { type ICustomHyperLinkView, SheetsHyperLinkSidePanelService } from './services/side-panel.service';
|
|
22
|
+
export type { ISheetHyperLinkInfo, ISheetUrlParams } from './types/interfaces';
|
|
23
|
+
export { AddHyperLinkCommand, type IAddHyperLinkCommandParams } from './commands/commands/add-hyper-link.command';
|
|
24
|
+
export { CancelHyperLinkCommand, type ICancelHyperLinkCommandParams } from './commands/commands/remove-hyper-link.command';
|
|
25
|
+
export { type IUpdateHyperLinkCommandParams, UpdateHyperLinkCommand } from './commands/commands/update-hyper-link.command';
|
|
22
26
|
export { CloseHyperLinkPopupOperation, InsertHyperLinkOperation, type IOpenHyperLinkEditPanelOperationParams, OpenHyperLinkEditPanelOperation, } from './commands/operations/popup.operations';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IRange, Worksheet, ICommandService, IConfigService, IUniverInstanceService, LocaleService } from '@univerjs/core';
|
|
2
|
-
import { ISheetHyperLinkInfo } from '
|
|
2
|
+
import { ISheetHyperLinkInfo } from '../types/interfaces/i-sheet-hyper-link-info';
|
|
3
|
+
import { ISheetUrlParams } from '../types/interfaces/i-sheet-url-params';
|
|
3
4
|
import { IDefinedNamesService } from '@univerjs/engine-formula';
|
|
4
5
|
import { IMessageService } from '@univerjs/ui';
|
|
5
6
|
export declare class SheetsHyperLinkResolverService {
|
|
@@ -10,10 +11,13 @@ export declare class SheetsHyperLinkResolverService {
|
|
|
10
11
|
private _localeService;
|
|
11
12
|
private _configService;
|
|
12
13
|
constructor(_univerInstanceService: IUniverInstanceService, _commandService: ICommandService, _definedNamesService: IDefinedNamesService, _messageService: IMessageService, _localeService: LocaleService, _configService: IConfigService);
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
private _getURLName;
|
|
15
|
+
navigateTo(params: ISheetUrlParams): void;
|
|
16
|
+
buildHyperLink(unitId: string, sheetId: string, range?: string | IRange): string;
|
|
17
|
+
parseHyperLink(urlStr: string): ISheetHyperLinkInfo;
|
|
15
18
|
navigateToRange(unitId: string, subUnitId: string, range: IRange): Promise<void>;
|
|
19
|
+
navigateToSheet(unitId: string, sheetName: string): Promise<boolean | undefined>;
|
|
16
20
|
navigateToSheetById(unitId: string, subUnitId: string): Promise<false | Worksheet>;
|
|
17
|
-
navigateToDefineName(unitId: string,
|
|
21
|
+
navigateToDefineName(unitId: string, rangeid: string): Promise<boolean>;
|
|
18
22
|
navigateToOtherWebsite(url: string): Promise<void>;
|
|
19
23
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Nullable } from '@univerjs/core';
|
|
2
|
+
import { SheetHyperLinkType } from '@univerjs/sheets-hyper-link';
|
|
3
|
+
import { ISheetUrlParams } from './i-sheet-url-params';
|
|
4
|
+
export interface ISheetHyperLinkInfo {
|
|
5
|
+
type: SheetHyperLinkType;
|
|
6
|
+
name: string;
|
|
7
|
+
url: string;
|
|
8
|
+
searchObj: Nullable<ISheetUrlParams>;
|
|
9
|
+
handler: () => void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export type { ISheetHyperLinkInfo } from './i-sheet-hyper-link-info';
|
|
17
|
+
export type { ISheetUrlParams } from './i-sheet-url-params';
|