@univerjs/docs-hyper-link-ui 1.0.0-insiders.20260813-7c9aa50 → 1.0.0
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/README.md +0 -1
- package/lib/cjs/index.js +767 -232
- package/lib/cjs/locale/ar-SA.js +0 -3
- package/lib/cjs/locale/ca-ES.js +0 -3
- package/lib/cjs/locale/de-DE.js +0 -3
- package/lib/cjs/locale/en-US.js +0 -3
- package/lib/cjs/locale/es-ES.js +0 -3
- package/lib/cjs/locale/fa-IR.js +0 -3
- package/lib/cjs/locale/fr-FR.js +0 -3
- package/lib/cjs/locale/id-ID.js +0 -3
- package/lib/cjs/locale/it-IT.js +0 -3
- package/lib/cjs/locale/ja-JP.js +0 -3
- package/lib/cjs/locale/ko-KR.js +0 -3
- package/lib/cjs/locale/pl-PL.js +0 -3
- package/lib/cjs/locale/pt-BR.js +0 -3
- package/lib/cjs/locale/ru-RU.js +0 -3
- package/lib/cjs/locale/sk-SK.js +0 -3
- package/lib/cjs/locale/vi-VN.js +0 -3
- package/lib/cjs/locale/zh-CN.js +0 -3
- package/lib/cjs/locale/zh-HK.js +0 -3
- package/lib/cjs/locale/zh-TW.js +0 -3
- package/lib/es/index.js +769 -240
- package/lib/es/locale/ar-SA.js +0 -2
- package/lib/es/locale/ca-ES.js +0 -2
- package/lib/es/locale/de-DE.js +0 -2
- package/lib/es/locale/en-US.js +0 -2
- package/lib/es/locale/es-ES.js +0 -2
- package/lib/es/locale/fa-IR.js +0 -2
- package/lib/es/locale/fr-FR.js +0 -2
- package/lib/es/locale/id-ID.js +0 -2
- package/lib/es/locale/it-IT.js +0 -2
- package/lib/es/locale/ja-JP.js +0 -2
- package/lib/es/locale/ko-KR.js +0 -2
- package/lib/es/locale/pl-PL.js +0 -2
- package/lib/es/locale/pt-BR.js +0 -2
- package/lib/es/locale/ru-RU.js +0 -2
- package/lib/es/locale/sk-SK.js +0 -2
- package/lib/es/locale/vi-VN.js +0 -2
- package/lib/es/locale/zh-CN.js +0 -2
- package/lib/es/locale/zh-HK.js +0 -2
- package/lib/es/locale/zh-TW.js +0 -2
- package/lib/index.css +80 -4
- package/lib/index.js +769 -240
- package/lib/locale/ar-SA.js +0 -2
- package/lib/locale/ca-ES.js +0 -2
- package/lib/locale/de-DE.js +0 -2
- package/lib/locale/en-US.js +0 -2
- package/lib/locale/es-ES.js +0 -2
- package/lib/locale/fa-IR.js +0 -2
- package/lib/locale/fr-FR.js +0 -2
- package/lib/locale/id-ID.js +0 -2
- package/lib/locale/it-IT.js +0 -2
- package/lib/locale/ja-JP.js +0 -2
- package/lib/locale/ko-KR.js +0 -2
- package/lib/locale/pl-PL.js +0 -2
- package/lib/locale/pt-BR.js +0 -2
- package/lib/locale/ru-RU.js +0 -2
- package/lib/locale/sk-SK.js +0 -2
- package/lib/locale/vi-VN.js +0 -2
- package/lib/locale/zh-CN.js +0 -2
- package/lib/locale/zh-HK.js +0 -2
- package/lib/locale/zh-TW.js +0 -2
- package/lib/types/commands/operations/popup.operation.d.ts +1 -0
- package/lib/types/controllers/doc-hyper-link-selection.controller.d.ts +1 -0
- package/lib/types/controllers/mobile/components.controller.d.ts +24 -0
- package/lib/types/controllers/render-controllers/hyper-link-event.render-controller.d.ts +2 -0
- package/lib/types/controllers/render-controllers/mobile/hyper-link-event.render-controller.d.ts +33 -0
- package/lib/types/controllers/render-controllers/render.controller.d.ts +1 -5
- package/lib/types/index.d.ts +1 -0
- package/lib/types/locale/en-US.d.ts +0 -2
- package/lib/types/mobile-plugin.d.ts +32 -0
- package/lib/types/services/hyper-link-popup.service.d.ts +33 -10
- package/lib/types/services/mobile/hyper-link-popup.service.d.ts +22 -0
- package/lib/types/views/MobileDocHyperLinkEdit.d.ts +19 -0
- package/lib/types/views/MobileDocLinkPopup.d.ts +19 -0
- package/lib/types/views/hyper-link-edit/index.d.ts +19 -0
- package/lib/types/views/hyper-link-edit/use-doc-hyper-link-edit.d.ts +28 -0
- package/lib/types/views/hyper-link-popup/index.d.ts +19 -0
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/ar-SA.js +1 -1
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/de-DE.js +1 -1
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/es-ES.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/fr-FR.js +1 -1
- package/lib/umd/locale/id-ID.js +1 -1
- package/lib/umd/locale/it-IT.js +1 -1
- package/lib/umd/locale/ja-JP.js +1 -1
- package/lib/umd/locale/ko-KR.js +1 -1
- package/lib/umd/locale/pl-PL.js +1 -1
- package/lib/umd/locale/pt-BR.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/sk-SK.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-HK.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +13 -12
package/lib/locale/ar-SA.js
CHANGED
|
@@ -3,9 +3,7 @@ const locale = { "docs-hyper-link-ui": {
|
|
|
3
3
|
edit: {
|
|
4
4
|
confirm: "تأكيد",
|
|
5
5
|
cancel: "إلغاء",
|
|
6
|
-
title: "ارتباط",
|
|
7
6
|
address: "ارتباط",
|
|
8
|
-
placeholder: "يُرجى إدخال عنوان URL للارتباط",
|
|
9
7
|
addressError: "عنوان URL غير قانوني!",
|
|
10
8
|
label: "تسمية",
|
|
11
9
|
labelError: "يُرجى إدخال تسمية الارتباط"
|
package/lib/locale/ca-ES.js
CHANGED
|
@@ -3,9 +3,7 @@ const locale = { "docs-hyper-link-ui": {
|
|
|
3
3
|
edit: {
|
|
4
4
|
confirm: "Confirma",
|
|
5
5
|
cancel: "Cancel·la",
|
|
6
|
-
title: "Enllaç",
|
|
7
6
|
address: "Enllaç",
|
|
8
|
-
placeholder: "Si us plau, introdueix una URL",
|
|
9
7
|
addressError: "La URL no és vàlida!",
|
|
10
8
|
label: "Etiqueta",
|
|
11
9
|
labelError: "Si us plau, introdueix l'etiqueta de l'enllaç"
|
package/lib/locale/de-DE.js
CHANGED
|
@@ -3,9 +3,7 @@ const locale = { "docs-hyper-link-ui": {
|
|
|
3
3
|
edit: {
|
|
4
4
|
confirm: "Bestätigen",
|
|
5
5
|
cancel: "Abbrechen",
|
|
6
|
-
title: "Link",
|
|
7
6
|
address: "Link",
|
|
8
|
-
placeholder: "Bitte eine Link-URL eingeben",
|
|
9
7
|
addressError: "URL ist ungültig!",
|
|
10
8
|
label: "Bezeichnung",
|
|
11
9
|
labelError: "Bitte die Bezeichnung des Links eingeben"
|
package/lib/locale/en-US.js
CHANGED
|
@@ -18,9 +18,7 @@ const locale = { "docs-hyper-link-ui": {
|
|
|
18
18
|
edit: {
|
|
19
19
|
confirm: "Confirm",
|
|
20
20
|
cancel: "Cancel",
|
|
21
|
-
title: "Link",
|
|
22
21
|
address: "Link",
|
|
23
|
-
placeholder: "Please input a link url",
|
|
24
22
|
addressError: "Url is illegal!",
|
|
25
23
|
label: "Label",
|
|
26
24
|
labelError: "Please input label of link"
|
package/lib/locale/es-ES.js
CHANGED
|
@@ -3,9 +3,7 @@ const locale = { "docs-hyper-link-ui": {
|
|
|
3
3
|
edit: {
|
|
4
4
|
confirm: "Confirmar",
|
|
5
5
|
cancel: "Cancelar",
|
|
6
|
-
title: "Enlace",
|
|
7
6
|
address: "Enlace",
|
|
8
|
-
placeholder: "Por favor, introduce una URL",
|
|
9
7
|
addressError: "¡La URL no es válida!",
|
|
10
8
|
label: "Etiqueta",
|
|
11
9
|
labelError: "Por favor, introduce la etiqueta del enlace"
|
package/lib/locale/fa-IR.js
CHANGED
|
@@ -3,9 +3,7 @@ const locale = { "docs-hyper-link-ui": {
|
|
|
3
3
|
edit: {
|
|
4
4
|
confirm: "تایید",
|
|
5
5
|
cancel: "انصراف",
|
|
6
|
-
title: "لینک",
|
|
7
6
|
address: "لینک",
|
|
8
|
-
placeholder: "لطفا یک آدرس لینک وارد کنید",
|
|
9
7
|
addressError: "آدرس غیرمجاز است!",
|
|
10
8
|
label: "برچسب",
|
|
11
9
|
labelError: "لطفا برچسب لینک را وارد کنید"
|
package/lib/locale/fr-FR.js
CHANGED
|
@@ -3,9 +3,7 @@ const locale = { "docs-hyper-link-ui": {
|
|
|
3
3
|
edit: {
|
|
4
4
|
confirm: "Confirmer",
|
|
5
5
|
cancel: "Annuler",
|
|
6
|
-
title: "Lien",
|
|
7
6
|
address: "Lien",
|
|
8
|
-
placeholder: "Veuillez entrer un lien",
|
|
9
7
|
addressError: "L'url est illégal!",
|
|
10
8
|
label: "Libellé",
|
|
11
9
|
labelError: "Veuillez entrer le label du lien"
|
package/lib/locale/id-ID.js
CHANGED
|
@@ -3,9 +3,7 @@ const locale = { "docs-hyper-link-ui": {
|
|
|
3
3
|
edit: {
|
|
4
4
|
confirm: "Konfirmasi",
|
|
5
5
|
cancel: "Batal",
|
|
6
|
-
title: "Tautan",
|
|
7
6
|
address: "Tautan",
|
|
8
|
-
placeholder: "Silakan masukkan URL tautan",
|
|
9
7
|
addressError: "URL tidak valid!",
|
|
10
8
|
label: "Label",
|
|
11
9
|
labelError: "Silakan masukkan label tautan"
|
package/lib/locale/it-IT.js
CHANGED
|
@@ -3,9 +3,7 @@ const locale = { "docs-hyper-link-ui": {
|
|
|
3
3
|
edit: {
|
|
4
4
|
confirm: "Conferma",
|
|
5
5
|
cancel: "Annulla",
|
|
6
|
-
title: "Collegamento",
|
|
7
6
|
address: "Collegamento",
|
|
8
|
-
placeholder: "Inserisci un URL di collegamento",
|
|
9
7
|
addressError: "URL non valido!",
|
|
10
8
|
label: "Etichetta",
|
|
11
9
|
labelError: "Inserisci l'etichetta del collegamento"
|
package/lib/locale/ja-JP.js
CHANGED
package/lib/locale/ko-KR.js
CHANGED
package/lib/locale/pl-PL.js
CHANGED
|
@@ -3,9 +3,7 @@ const locale = { "docs-hyper-link-ui": {
|
|
|
3
3
|
edit: {
|
|
4
4
|
confirm: "Potwierdź",
|
|
5
5
|
cancel: "Anuluj",
|
|
6
|
-
title: "Łącze",
|
|
7
6
|
address: "Łącze",
|
|
8
|
-
placeholder: "Wprowadź adres URL",
|
|
9
7
|
addressError: "Adres URL jest nieprawidłowy!",
|
|
10
8
|
label: "Etykieta",
|
|
11
9
|
labelError: "Wprowadź etykietę łącza"
|
package/lib/locale/pt-BR.js
CHANGED
|
@@ -3,9 +3,7 @@ const locale = { "docs-hyper-link-ui": {
|
|
|
3
3
|
edit: {
|
|
4
4
|
confirm: "Confirmar",
|
|
5
5
|
cancel: "Cancelar",
|
|
6
|
-
title: "Link",
|
|
7
6
|
address: "Link",
|
|
8
|
-
placeholder: "Insira uma URL de link",
|
|
9
7
|
addressError: "URL inválida!",
|
|
10
8
|
label: "Rótulo",
|
|
11
9
|
labelError: "Insira o rótulo do link"
|
package/lib/locale/ru-RU.js
CHANGED
|
@@ -3,11 +3,9 @@ const locale = { "docs-hyper-link-ui": {
|
|
|
3
3
|
edit: {
|
|
4
4
|
confirm: "Подтвердить",
|
|
5
5
|
cancel: "Отменить",
|
|
6
|
-
title: "Ссылка",
|
|
7
6
|
address: "Ссылка",
|
|
8
7
|
label: "Текст",
|
|
9
8
|
labelError: "Введите текст ссылки",
|
|
10
|
-
placeholder: "Пожалуйста, введите ссылку",
|
|
11
9
|
addressError: "Пожалуйста, введите корректную ссылку"
|
|
12
10
|
},
|
|
13
11
|
info: {
|
package/lib/locale/sk-SK.js
CHANGED
package/lib/locale/vi-VN.js
CHANGED
|
@@ -3,11 +3,9 @@ const locale = { "docs-hyper-link-ui": {
|
|
|
3
3
|
edit: {
|
|
4
4
|
confirm: "Xác nhận",
|
|
5
5
|
cancel: "Hủy",
|
|
6
|
-
title: "Liên kết",
|
|
7
6
|
address: "Liên kết",
|
|
8
7
|
label: "Nhãn",
|
|
9
8
|
labelError: "Vui lòng nhập nhãn liên kết",
|
|
10
|
-
placeholder: "Vui lòng nhập liên kết hợp lệ",
|
|
11
9
|
addressError: "Vui lòng nhập liên kết hợp lệ"
|
|
12
10
|
},
|
|
13
11
|
info: {
|
package/lib/locale/zh-CN.js
CHANGED
package/lib/locale/zh-HK.js
CHANGED
package/lib/locale/zh-TW.js
CHANGED
|
@@ -33,6 +33,7 @@ export interface IShowDocHyperLinkInfoPopupOperationParams {
|
|
|
33
33
|
segmentPage?: number;
|
|
34
34
|
startIndex: number;
|
|
35
35
|
endIndex: number;
|
|
36
|
+
fromHover?: boolean;
|
|
36
37
|
}
|
|
37
38
|
export declare const ToggleDocHyperLinkInfoPopupOperation: ICommand<IShowDocHyperLinkInfoPopupOperationParams>;
|
|
38
39
|
export declare const ClickDocHyperLinkOperation: ICommand<{
|
|
@@ -19,6 +19,7 @@ export declare class DocHyperLinkSelectionController extends Disposable {
|
|
|
19
19
|
private readonly _commandService;
|
|
20
20
|
private readonly _univerInstanceService;
|
|
21
21
|
private readonly _docHyperLinkService;
|
|
22
|
+
private _selection;
|
|
22
23
|
constructor(_commandService: ICommandService, _univerInstanceService: IUniverInstanceService, _docHyperLinkService: DocHyperLinkPopupService);
|
|
23
24
|
private _initSelectionChange;
|
|
24
25
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
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
|
+
import { Disposable } from '@univerjs/core';
|
|
17
|
+
import { ComponentManager, IconManager } from '@univerjs/ui';
|
|
18
|
+
export declare class MobileComponentsController extends Disposable {
|
|
19
|
+
private readonly _componentManager;
|
|
20
|
+
private readonly _iconManager;
|
|
21
|
+
constructor(_componentManager: ComponentManager, _iconManager: IconManager);
|
|
22
|
+
private _registerComponents;
|
|
23
|
+
private _registerIcons;
|
|
24
|
+
}
|
|
@@ -29,6 +29,8 @@ export declare class DocHyperLinkEventRenderController extends Disposable implem
|
|
|
29
29
|
get _skeleton(): import("@univerjs/engine-render").DocumentSkeleton;
|
|
30
30
|
constructor(_context: IRenderContext<DocumentDataModel>, _docEventManagerService: DocEventManagerService, _commandService: ICommandService, _hyperLinkPopupService: DocHyperLinkPopupService, _docSkeletonManagerService: DocSkeletonManagerService, _docSelectionManagerService: DocSelectionManagerService);
|
|
31
31
|
private _hideInfoPopup;
|
|
32
|
+
private _normalizeSegmentId;
|
|
33
|
+
private _initPointerDown;
|
|
32
34
|
private _initHover;
|
|
33
35
|
private _initClick;
|
|
34
36
|
}
|
package/lib/types/controllers/render-controllers/mobile/hyper-link-event.render-controller.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
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
|
+
import type { DocumentDataModel } from '@univerjs/core';
|
|
17
|
+
import type { IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
|
18
|
+
import { Disposable, ICommandService } from '@univerjs/core';
|
|
19
|
+
import { DocSkeletonManagerService } from '@univerjs/docs';
|
|
20
|
+
import { DocEventManagerService, DocMobileElementMenuService } from '@univerjs/docs-ui';
|
|
21
|
+
import { DocHyperLinkPopupService } from '../../../services/hyper-link-popup.service';
|
|
22
|
+
export declare class MobileDocHyperLinkEventRenderController extends Disposable implements IRenderModule {
|
|
23
|
+
private readonly _context;
|
|
24
|
+
private readonly _docEventManagerService;
|
|
25
|
+
private readonly _commandService;
|
|
26
|
+
private readonly _hyperLinkPopupService;
|
|
27
|
+
private readonly _docSkeletonManagerService;
|
|
28
|
+
private readonly _mobileElementMenuService;
|
|
29
|
+
get _skeleton(): import("@univerjs/engine-render").DocumentSkeleton;
|
|
30
|
+
constructor(_context: IRenderContext<DocumentDataModel>, _docEventManagerService: DocEventManagerService, _commandService: ICommandService, _hyperLinkPopupService: DocHyperLinkPopupService, _docSkeletonManagerService: DocSkeletonManagerService, _mobileElementMenuService: DocMobileElementMenuService);
|
|
31
|
+
private _initPointerDown;
|
|
32
|
+
private _initClick;
|
|
33
|
+
}
|
|
@@ -17,14 +17,10 @@ import type { DocumentDataModel } from '@univerjs/core';
|
|
|
17
17
|
import type { IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
|
18
18
|
import { Disposable } from '@univerjs/core';
|
|
19
19
|
import { DocInterceptorService } from '@univerjs/docs';
|
|
20
|
-
import { DocRenderController } from '@univerjs/docs-ui';
|
|
21
20
|
import { DocHyperLinkPopupService } from '../../services/hyper-link-popup.service';
|
|
22
21
|
export declare class DocHyperLinkRenderController extends Disposable implements IRenderModule {
|
|
23
|
-
private readonly _context;
|
|
24
22
|
private readonly _docInterceptorService;
|
|
25
23
|
private readonly _hyperLinkService;
|
|
26
|
-
|
|
27
|
-
constructor(_context: IRenderContext<DocumentDataModel>, _docInterceptorService: DocInterceptorService, _hyperLinkService: DocHyperLinkPopupService, _docRenderController: DocRenderController);
|
|
24
|
+
constructor(_context: IRenderContext<DocumentDataModel>, _docInterceptorService: DocInterceptorService, _hyperLinkService: DocHyperLinkPopupService);
|
|
28
25
|
private _init;
|
|
29
|
-
private _initReRender;
|
|
30
26
|
}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -16,4 +16,5 @@
|
|
|
16
16
|
import './global.css';
|
|
17
17
|
export type { IUniverDocsHyperLinkUIConfig } from './config/config';
|
|
18
18
|
export { menuSchema as DocsHyperLinkUIMenuSchema } from './menu/schema';
|
|
19
|
+
export { UniverDocsHyperLinkMobileUIPlugin } from './mobile-plugin';
|
|
19
20
|
export { UniverDocsHyperLinkUIPlugin } from './plugin';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
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
|
+
import type { IUniverDocsHyperLinkUIConfig } from './config/config';
|
|
17
|
+
import { IConfigService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
|
|
18
|
+
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
19
|
+
export declare class UniverDocsHyperLinkMobileUIPlugin extends Plugin {
|
|
20
|
+
private readonly _config;
|
|
21
|
+
protected _injector: Injector;
|
|
22
|
+
private readonly _renderManagerSrv;
|
|
23
|
+
private readonly _configService;
|
|
24
|
+
static pluginName: string;
|
|
25
|
+
static packageName: string;
|
|
26
|
+
static version: string;
|
|
27
|
+
static type: UniverInstanceType;
|
|
28
|
+
constructor(_config: Partial<IUniverDocsHyperLinkUIConfig> | undefined, _injector: Injector, _renderManagerSrv: IRenderManagerService, _configService: IConfigService);
|
|
29
|
+
onStarting(): void;
|
|
30
|
+
onReady(): void;
|
|
31
|
+
onRendered(): void;
|
|
32
|
+
}
|
|
@@ -13,10 +13,12 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import type { IDisposable,
|
|
17
|
-
import { Disposable, IUniverInstanceService } from '@univerjs/core';
|
|
16
|
+
import type { IDisposable, ITextRangeParam } from '@univerjs/core';
|
|
17
|
+
import { Disposable, ICommandService, IPermissionService, IUniverInstanceService, LocaleService } from '@univerjs/core';
|
|
18
18
|
import { DocSelectionManagerService } from '@univerjs/docs';
|
|
19
19
|
import { DocCanvasPopManagerService } from '@univerjs/docs-ui';
|
|
20
|
+
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
21
|
+
import { IDialogService } from '@univerjs/ui';
|
|
20
22
|
export interface ILinkInfo {
|
|
21
23
|
unitId: string;
|
|
22
24
|
linkId: string;
|
|
@@ -26,20 +28,41 @@ export interface ILinkInfo {
|
|
|
26
28
|
endIndex: number;
|
|
27
29
|
}
|
|
28
30
|
export declare class DocHyperLinkPopupService extends Disposable {
|
|
29
|
-
|
|
31
|
+
protected readonly _docCanvasPopupManagerService: DocCanvasPopManagerService;
|
|
30
32
|
private readonly _textSelectionManagerService;
|
|
31
33
|
private readonly _univerInstanceService;
|
|
34
|
+
private readonly _permissionService;
|
|
35
|
+
private readonly _renderManagerService;
|
|
36
|
+
protected readonly _dialogService: IDialogService;
|
|
37
|
+
protected readonly _localeService: LocaleService;
|
|
38
|
+
private readonly _commandService;
|
|
32
39
|
private readonly _editingLink$;
|
|
33
40
|
private readonly _showingLink$;
|
|
34
|
-
readonly editingLink$: import("rxjs").Observable<
|
|
35
|
-
readonly showingLink$: import("rxjs").Observable<
|
|
41
|
+
readonly editingLink$: import("rxjs").Observable<ILinkInfo | null>;
|
|
42
|
+
readonly showingLink$: import("rxjs").Observable<ILinkInfo | null>;
|
|
36
43
|
private _editPopup;
|
|
44
|
+
private _editPopupUnitId;
|
|
37
45
|
private _infoPopup;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
46
|
+
private _infoPopupPinned;
|
|
47
|
+
private _infoPopupHideTimer;
|
|
48
|
+
private _infoPopupSuppressed;
|
|
49
|
+
private _infoPopupSuppressionTimer;
|
|
50
|
+
constructor(_docCanvasPopupManagerService: DocCanvasPopManagerService, _textSelectionManagerService: DocSelectionManagerService, _univerInstanceService: IUniverInstanceService, _permissionService: IPermissionService, _renderManagerService: IRenderManagerService, _dialogService: IDialogService, _localeService: LocaleService, _commandService: ICommandService);
|
|
51
|
+
dispose(): void;
|
|
52
|
+
get editing(): ILinkInfo | null;
|
|
53
|
+
get showing(): ILinkInfo | null;
|
|
54
|
+
get infoPopupPinned(): boolean;
|
|
55
|
+
showEditPopup(unitId: string, linkInfo: ILinkInfo | null): IDisposable | null;
|
|
42
56
|
hideEditPopup(): void;
|
|
43
|
-
showInfoPopup(info: ILinkInfo
|
|
57
|
+
showInfoPopup(info: ILinkInfo, options?: {
|
|
58
|
+
pinned?: boolean;
|
|
59
|
+
}): IDisposable | null | undefined;
|
|
60
|
+
protected _openEditSurface(activeRange: ITextRangeParam, unitId: string): IDisposable;
|
|
61
|
+
protected _openInfoSurface(info: ILinkInfo, componentKey?: string): IDisposable;
|
|
62
|
+
showInfoPopupFromHover(info: ILinkInfo): void;
|
|
44
63
|
hideInfoPopup(): void;
|
|
64
|
+
scheduleHideInfoPopup(): void;
|
|
65
|
+
cancelScheduledHideInfoPopup(): void;
|
|
66
|
+
hideInfoPopupOnPointerDown(): void;
|
|
67
|
+
canEditLink(unitId: string, linkInfo: ILinkInfo | null): boolean;
|
|
45
68
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
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
|
+
import type { IDisposable, ITextRangeParam } from '@univerjs/core';
|
|
17
|
+
import type { ILinkInfo } from '../hyper-link-popup.service';
|
|
18
|
+
import { DocHyperLinkPopupService } from '../hyper-link-popup.service';
|
|
19
|
+
export declare class MobileDocHyperLinkPopupService extends DocHyperLinkPopupService {
|
|
20
|
+
protected _openEditSurface(_activeRange: ITextRangeParam, _unitId: string): IDisposable;
|
|
21
|
+
protected _openInfoSurface(info: ILinkInfo): IDisposable;
|
|
22
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
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 declare function MobileDocHyperLinkEdit(): import("react").JSX.Element | undefined;
|
|
17
|
+
export declare namespace MobileDocHyperLinkEdit {
|
|
18
|
+
var componentKey: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
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 declare function MobileDocLinkPopup(): import("react").JSX.Element | null;
|
|
17
|
+
export declare namespace MobileDocLinkPopup {
|
|
18
|
+
var componentKey: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
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 declare const DocHyperLinkEdit: {
|
|
17
|
+
(): import("react/jsx-runtime").JSX.Element | undefined;
|
|
18
|
+
componentKey: string;
|
|
19
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
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
|
+
import type { DocumentDataModel } from '@univerjs/core';
|
|
17
|
+
export declare function useDocHyperLinkEdit(): {
|
|
18
|
+
doc: import("@univerjs/core").Nullable<DocumentDataModel>;
|
|
19
|
+
editing: import("../../services/hyper-link-popup.service").ILinkInfo | null;
|
|
20
|
+
handleCancel: () => void;
|
|
21
|
+
handleConfirm: () => void;
|
|
22
|
+
isLegal: boolean;
|
|
23
|
+
label: string;
|
|
24
|
+
link: string;
|
|
25
|
+
setLabel: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
26
|
+
setLink: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
27
|
+
showError: boolean;
|
|
28
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
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 declare const DocLinkPopup: {
|
|
17
|
+
(): import("react/jsx-runtime").JSX.Element | null;
|
|
18
|
+
componentKey: string;
|
|
19
|
+
};
|