@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.
Files changed (100) hide show
  1. package/LICENSE +176 -0
  2. package/README.md +0 -1
  3. package/lib/cjs/index.js +767 -232
  4. package/lib/cjs/locale/ar-SA.js +0 -3
  5. package/lib/cjs/locale/ca-ES.js +0 -3
  6. package/lib/cjs/locale/de-DE.js +0 -3
  7. package/lib/cjs/locale/en-US.js +0 -3
  8. package/lib/cjs/locale/es-ES.js +0 -3
  9. package/lib/cjs/locale/fa-IR.js +0 -3
  10. package/lib/cjs/locale/fr-FR.js +0 -3
  11. package/lib/cjs/locale/id-ID.js +0 -3
  12. package/lib/cjs/locale/it-IT.js +0 -3
  13. package/lib/cjs/locale/ja-JP.js +0 -3
  14. package/lib/cjs/locale/ko-KR.js +0 -3
  15. package/lib/cjs/locale/pl-PL.js +0 -3
  16. package/lib/cjs/locale/pt-BR.js +0 -3
  17. package/lib/cjs/locale/ru-RU.js +0 -3
  18. package/lib/cjs/locale/sk-SK.js +0 -3
  19. package/lib/cjs/locale/vi-VN.js +0 -3
  20. package/lib/cjs/locale/zh-CN.js +0 -3
  21. package/lib/cjs/locale/zh-HK.js +0 -3
  22. package/lib/cjs/locale/zh-TW.js +0 -3
  23. package/lib/es/index.js +769 -240
  24. package/lib/es/locale/ar-SA.js +0 -2
  25. package/lib/es/locale/ca-ES.js +0 -2
  26. package/lib/es/locale/de-DE.js +0 -2
  27. package/lib/es/locale/en-US.js +0 -2
  28. package/lib/es/locale/es-ES.js +0 -2
  29. package/lib/es/locale/fa-IR.js +0 -2
  30. package/lib/es/locale/fr-FR.js +0 -2
  31. package/lib/es/locale/id-ID.js +0 -2
  32. package/lib/es/locale/it-IT.js +0 -2
  33. package/lib/es/locale/ja-JP.js +0 -2
  34. package/lib/es/locale/ko-KR.js +0 -2
  35. package/lib/es/locale/pl-PL.js +0 -2
  36. package/lib/es/locale/pt-BR.js +0 -2
  37. package/lib/es/locale/ru-RU.js +0 -2
  38. package/lib/es/locale/sk-SK.js +0 -2
  39. package/lib/es/locale/vi-VN.js +0 -2
  40. package/lib/es/locale/zh-CN.js +0 -2
  41. package/lib/es/locale/zh-HK.js +0 -2
  42. package/lib/es/locale/zh-TW.js +0 -2
  43. package/lib/index.css +80 -4
  44. package/lib/index.js +769 -240
  45. package/lib/locale/ar-SA.js +0 -2
  46. package/lib/locale/ca-ES.js +0 -2
  47. package/lib/locale/de-DE.js +0 -2
  48. package/lib/locale/en-US.js +0 -2
  49. package/lib/locale/es-ES.js +0 -2
  50. package/lib/locale/fa-IR.js +0 -2
  51. package/lib/locale/fr-FR.js +0 -2
  52. package/lib/locale/id-ID.js +0 -2
  53. package/lib/locale/it-IT.js +0 -2
  54. package/lib/locale/ja-JP.js +0 -2
  55. package/lib/locale/ko-KR.js +0 -2
  56. package/lib/locale/pl-PL.js +0 -2
  57. package/lib/locale/pt-BR.js +0 -2
  58. package/lib/locale/ru-RU.js +0 -2
  59. package/lib/locale/sk-SK.js +0 -2
  60. package/lib/locale/vi-VN.js +0 -2
  61. package/lib/locale/zh-CN.js +0 -2
  62. package/lib/locale/zh-HK.js +0 -2
  63. package/lib/locale/zh-TW.js +0 -2
  64. package/lib/types/commands/operations/popup.operation.d.ts +1 -0
  65. package/lib/types/controllers/doc-hyper-link-selection.controller.d.ts +1 -0
  66. package/lib/types/controllers/mobile/components.controller.d.ts +24 -0
  67. package/lib/types/controllers/render-controllers/hyper-link-event.render-controller.d.ts +2 -0
  68. package/lib/types/controllers/render-controllers/mobile/hyper-link-event.render-controller.d.ts +33 -0
  69. package/lib/types/controllers/render-controllers/render.controller.d.ts +1 -5
  70. package/lib/types/index.d.ts +1 -0
  71. package/lib/types/locale/en-US.d.ts +0 -2
  72. package/lib/types/mobile-plugin.d.ts +32 -0
  73. package/lib/types/services/hyper-link-popup.service.d.ts +33 -10
  74. package/lib/types/services/mobile/hyper-link-popup.service.d.ts +22 -0
  75. package/lib/types/views/MobileDocHyperLinkEdit.d.ts +19 -0
  76. package/lib/types/views/MobileDocLinkPopup.d.ts +19 -0
  77. package/lib/types/views/hyper-link-edit/index.d.ts +19 -0
  78. package/lib/types/views/hyper-link-edit/use-doc-hyper-link-edit.d.ts +28 -0
  79. package/lib/types/views/hyper-link-popup/index.d.ts +19 -0
  80. package/lib/umd/index.js +1 -1
  81. package/lib/umd/locale/ar-SA.js +1 -1
  82. package/lib/umd/locale/ca-ES.js +1 -1
  83. package/lib/umd/locale/de-DE.js +1 -1
  84. package/lib/umd/locale/en-US.js +1 -1
  85. package/lib/umd/locale/es-ES.js +1 -1
  86. package/lib/umd/locale/fa-IR.js +1 -1
  87. package/lib/umd/locale/fr-FR.js +1 -1
  88. package/lib/umd/locale/id-ID.js +1 -1
  89. package/lib/umd/locale/it-IT.js +1 -1
  90. package/lib/umd/locale/ja-JP.js +1 -1
  91. package/lib/umd/locale/ko-KR.js +1 -1
  92. package/lib/umd/locale/pl-PL.js +1 -1
  93. package/lib/umd/locale/pt-BR.js +1 -1
  94. package/lib/umd/locale/ru-RU.js +1 -1
  95. package/lib/umd/locale/sk-SK.js +1 -1
  96. package/lib/umd/locale/vi-VN.js +1 -1
  97. package/lib/umd/locale/zh-CN.js +1 -1
  98. package/lib/umd/locale/zh-HK.js +1 -1
  99. package/lib/umd/locale/zh-TW.js +1 -1
  100. package/package.json +13 -12
@@ -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: "يُرجى إدخال تسمية الارتباط"
@@ -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ç"
@@ -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"
@@ -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"
@@ -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"
@@ -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: "لطفا برچسب لینک را وارد کنید"
@@ -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"
@@ -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"
@@ -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"
@@ -3,9 +3,7 @@ const locale = { "docs-hyper-link-ui": {
3
3
  edit: {
4
4
  confirm: "OK",
5
5
  cancel: "キャンセル",
6
- title: "リンク",
7
6
  address: "アドレス",
8
- placeholder: "リンクのURLを入力してください",
9
7
  addressError: "URLが正しくありません!",
10
8
  label: "表示文字列",
11
9
  labelError: "リンクの表示文字列を入力してください"
@@ -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: "링크 라벨을 입력해주세요"
@@ -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"
@@ -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"
@@ -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: {
@@ -3,9 +3,7 @@ const locale = { "docs-hyper-link-ui": {
3
3
  edit: {
4
4
  confirm: "Potvrdiť",
5
5
  cancel: "Zrušiť",
6
- title: "Odkaz",
7
6
  address: "Odkaz",
8
- placeholder: "Zadajte URL odkazu",
9
7
  addressError: "URL je neplatná!",
10
8
  label: "Popisok",
11
9
  labelError: "Zadajte popis odkazu"
@@ -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: {
@@ -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: {
@@ -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: {
@@ -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: {
@@ -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
  }
@@ -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
- private readonly _docRenderController;
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
  }
@@ -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';
@@ -18,9 +18,7 @@ declare const locale: {
18
18
  edit: {
19
19
  confirm: string;
20
20
  cancel: string;
21
- title: string;
22
21
  address: string;
23
- placeholder: string;
24
22
  addressError: string;
25
23
  label: string;
26
24
  labelError: string;
@@ -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, Nullable } from '@univerjs/core';
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
- private readonly _docCanvasPopupManagerService;
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<Nullable<ILinkInfo>>;
35
- readonly showingLink$: import("rxjs").Observable<Nullable<ILinkInfo>>;
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
- constructor(_docCanvasPopupManagerService: DocCanvasPopManagerService, _textSelectionManagerService: DocSelectionManagerService, _univerInstanceService: IUniverInstanceService);
39
- get editing(): Nullable<ILinkInfo>;
40
- get showing(): Nullable<ILinkInfo>;
41
- showEditPopup(unitId: string, linkInfo: Nullable<ILinkInfo>): Nullable<IDisposable>;
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): Nullable<IDisposable>;
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
+ };