@univerjs/docs-hyper-link-ui 0.23.0 → 0.24.0-insiders.20260527-b1d726f

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 (90) hide show
  1. package/lib/cjs/index.js +17 -17
  2. package/lib/cjs/locale/ar-SA.js +24 -0
  3. package/lib/cjs/locale/ca-ES.js +1 -1
  4. package/lib/cjs/locale/de-DE.js +24 -0
  5. package/lib/cjs/locale/en-US.js +1 -1
  6. package/lib/cjs/locale/es-ES.js +1 -1
  7. package/lib/cjs/locale/fa-IR.js +1 -1
  8. package/lib/cjs/locale/fr-FR.js +1 -1
  9. package/lib/cjs/locale/id-ID.js +24 -0
  10. package/lib/cjs/locale/it-IT.js +24 -0
  11. package/lib/cjs/locale/ja-JP.js +1 -1
  12. package/lib/cjs/locale/ko-KR.js +1 -1
  13. package/lib/cjs/locale/pl-PL.js +24 -0
  14. package/lib/cjs/locale/pt-BR.js +24 -0
  15. package/lib/cjs/locale/ru-RU.js +1 -1
  16. package/lib/cjs/locale/sk-SK.js +1 -1
  17. package/lib/cjs/locale/vi-VN.js +1 -1
  18. package/lib/cjs/locale/zh-CN.js +1 -1
  19. package/lib/cjs/locale/zh-HK.js +24 -0
  20. package/lib/cjs/locale/zh-TW.js +1 -1
  21. package/lib/es/index.js +17 -17
  22. package/lib/es/locale/ar-SA.js +23 -0
  23. package/lib/es/locale/ca-ES.js +1 -1
  24. package/lib/es/locale/de-DE.js +23 -0
  25. package/lib/es/locale/en-US.js +1 -1
  26. package/lib/es/locale/es-ES.js +1 -1
  27. package/lib/es/locale/fa-IR.js +1 -1
  28. package/lib/es/locale/fr-FR.js +1 -1
  29. package/lib/es/locale/id-ID.js +23 -0
  30. package/lib/es/locale/it-IT.js +23 -0
  31. package/lib/es/locale/ja-JP.js +1 -1
  32. package/lib/es/locale/ko-KR.js +1 -1
  33. package/lib/es/locale/pl-PL.js +23 -0
  34. package/lib/es/locale/pt-BR.js +23 -0
  35. package/lib/es/locale/ru-RU.js +1 -1
  36. package/lib/es/locale/sk-SK.js +1 -1
  37. package/lib/es/locale/vi-VN.js +1 -1
  38. package/lib/es/locale/zh-CN.js +1 -1
  39. package/lib/es/locale/zh-HK.js +23 -0
  40. package/lib/es/locale/zh-TW.js +1 -1
  41. package/lib/index.js +17 -17
  42. package/lib/locale/ar-SA.js +23 -0
  43. package/lib/locale/ca-ES.js +1 -1
  44. package/lib/locale/de-DE.js +23 -0
  45. package/lib/locale/en-US.js +1 -1
  46. package/lib/locale/es-ES.js +1 -1
  47. package/lib/locale/fa-IR.js +1 -1
  48. package/lib/locale/fr-FR.js +1 -1
  49. package/lib/locale/id-ID.js +23 -0
  50. package/lib/locale/it-IT.js +23 -0
  51. package/lib/locale/ja-JP.js +1 -1
  52. package/lib/locale/ko-KR.js +1 -1
  53. package/lib/locale/pl-PL.js +23 -0
  54. package/lib/locale/pt-BR.js +23 -0
  55. package/lib/locale/ru-RU.js +1 -1
  56. package/lib/locale/sk-SK.js +1 -1
  57. package/lib/locale/vi-VN.js +1 -1
  58. package/lib/locale/zh-CN.js +1 -1
  59. package/lib/locale/zh-HK.js +23 -0
  60. package/lib/locale/zh-TW.js +1 -1
  61. package/lib/types/locale/ar-SA.d.ts +18 -0
  62. package/lib/types/locale/de-DE.d.ts +18 -0
  63. package/lib/types/locale/en-US.d.ts +1 -1
  64. package/lib/types/locale/id-ID.d.ts +18 -0
  65. package/lib/types/locale/it-IT.d.ts +18 -0
  66. package/lib/types/locale/pl-PL.d.ts +18 -0
  67. package/lib/types/locale/pt-BR.d.ts +18 -0
  68. package/lib/types/locale/zh-HK.d.ts +18 -0
  69. package/lib/umd/index.js +1 -1
  70. package/lib/umd/locale/ar-SA.js +1 -0
  71. package/lib/umd/locale/ca-ES.js +1 -1
  72. package/lib/umd/locale/de-DE.js +1 -0
  73. package/lib/umd/locale/en-US.js +1 -1
  74. package/lib/umd/locale/es-ES.js +1 -1
  75. package/lib/umd/locale/fa-IR.js +1 -1
  76. package/lib/umd/locale/fr-FR.js +1 -1
  77. package/lib/umd/locale/id-ID.js +1 -0
  78. package/lib/umd/locale/it-IT.js +1 -0
  79. package/lib/umd/locale/ja-JP.js +1 -1
  80. package/lib/umd/locale/ko-KR.js +1 -1
  81. package/lib/umd/locale/pl-PL.js +1 -0
  82. package/lib/umd/locale/pt-BR.js +1 -0
  83. package/lib/umd/locale/ru-RU.js +1 -1
  84. package/lib/umd/locale/sk-SK.js +1 -1
  85. package/lib/umd/locale/vi-VN.js +1 -1
  86. package/lib/umd/locale/zh-CN.js +1 -1
  87. package/lib/umd/locale/zh-HK.js +1 -0
  88. package/lib/umd/locale/zh-TW.js +1 -1
  89. package/package.json +10 -10
  90. package/LICENSE +0 -176
package/lib/cjs/index.js CHANGED
@@ -13,7 +13,7 @@ let _univerjs_icons = require("@univerjs/icons");
13
13
 
14
14
  //#region package.json
15
15
  var name = "@univerjs/docs-hyper-link-ui";
16
- var version = "0.23.0";
16
+ var version = "0.24.0-insiders.20260527-b1d726f";
17
17
 
18
18
  //#endregion
19
19
  //#region src/config/config.ts
@@ -126,7 +126,7 @@ const DocHyperLinkEdit = () => {
126
126
  const [label, setLabel] = (0, react.useState)("");
127
127
  const [showError, setShowError] = (0, react.useState)(false);
128
128
  const isLegal = _univerjs_core.Tools.isLegalUrl(link);
129
- const doc = editing ? univerInstanceService.getUnit(editing.unitId, _univerjs_core.UniverInstanceType.UNIVER_DOC) : univerInstanceService.getCurrentUnitForType(_univerjs_core.UniverInstanceType.UNIVER_DOC);
129
+ const doc = editing ? univerInstanceService.getUnit(editing.unitId, _univerjs_core.UniverInstanceType.UNIVER_DOC) : univerInstanceService.getCurrentUnitOfType(_univerjs_core.UniverInstanceType.UNIVER_DOC);
130
130
  (0, react.useEffect)(() => {
131
131
  var _doc$getSelfOrHeaderF2, _BuildTextUtils$custo, _body$customRanges2;
132
132
  const activeRange = docSelectionManagerService.getActiveTextRange();
@@ -182,8 +182,8 @@ const DocHyperLinkEdit = () => {
182
182
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
183
183
  className: (0, _univerjs_design.clsx)("univer-box-border univer-w-[328px] univer-rounded-xl univer-bg-white univer-px-6 univer-py-5 univer-shadow dark:!univer-bg-gray-900", _univerjs_design.borderClassName),
184
184
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [editing ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.FormLayout, {
185
- label: localeService.t("docLink.edit.label"),
186
- error: showError && isBlankInput(label) ? localeService.t("docLink.edit.labelError") : "",
185
+ label: localeService.t("docs-hyper-link-ui.edit.label"),
186
+ error: showError && isBlankInput(label) ? localeService.t("docs-hyper-link-ui.edit.labelError") : "",
187
187
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Input, {
188
188
  value: label,
189
189
  onChange: setLabel,
@@ -193,8 +193,8 @@ const DocHyperLinkEdit = () => {
193
193
  }
194
194
  })
195
195
  }) : null, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.FormLayout, {
196
- label: localeService.t("docLink.edit.address"),
197
- error: showError && !isLegal ? localeService.t("docLink.edit.addressError") : "",
196
+ label: localeService.t("docs-hyper-link-ui.edit.address"),
197
+ error: showError && !isLegal ? localeService.t("docs-hyper-link-ui.edit.addressError") : "",
198
198
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Input, {
199
199
  value: link,
200
200
  onChange: setLink,
@@ -207,12 +207,12 @@ const DocHyperLinkEdit = () => {
207
207
  className: "univer-flex univer-justify-end univer-gap-3",
208
208
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Button, {
209
209
  onClick: handleCancel,
210
- children: localeService.t("docLink.edit.cancel")
210
+ children: localeService.t("docs-hyper-link-ui.edit.cancel")
211
211
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Button, {
212
212
  variant: "primary",
213
213
  disabled: isBlankInput(link),
214
214
  onClick: handleConfirm,
215
- children: localeService.t("docLink.edit.confirm")
215
+ children: localeService.t("docs-hyper-link-ui.edit.confirm")
216
216
  })]
217
217
  })]
218
218
  });
@@ -246,7 +246,7 @@ const shouldDisableAddLink = (accessor) => {
246
246
  const textRanges = textSelectionService.getTextRanges();
247
247
  if (!(textRanges === null || textRanges === void 0 ? void 0 : textRanges.length)) return true;
248
248
  const activeRange = textRanges[0];
249
- if (!univerInstanceService.getCurrentUnitForType(_univerjs_core.UniverInstanceType.UNIVER_DOC) || !activeRange || activeRange.collapsed) return true;
249
+ if (!univerInstanceService.getCurrentUnitOfType(_univerjs_core.UniverInstanceType.UNIVER_DOC) || !activeRange || activeRange.collapsed) return true;
250
250
  return false;
251
251
  };
252
252
  const ShowDocHyperLinkEditPopupOperation = {
@@ -258,7 +258,7 @@ const ShowDocHyperLinkEditPopupOperation = {
258
258
  const univerInstanceService = accessor.get(_univerjs_core.IUniverInstanceService);
259
259
  if (shouldDisableAddLink(accessor) && !linkInfo) return false;
260
260
  const hyperLinkService = accessor.get(DocHyperLinkPopupService);
261
- const unitId = (linkInfo === null || linkInfo === void 0 ? void 0 : linkInfo.unitId) || ((_univerInstanceServic = univerInstanceService.getCurrentUnitForType(_univerjs_core.UniverInstanceType.UNIVER_DOC)) === null || _univerInstanceServic === void 0 ? void 0 : _univerInstanceServic.getUnitId());
261
+ const unitId = (linkInfo === null || linkInfo === void 0 ? void 0 : linkInfo.unitId) || ((_univerInstanceServic = univerInstanceService.getCurrentUnitOfType(_univerjs_core.UniverInstanceType.UNIVER_DOC)) === null || _univerInstanceServic === void 0 ? void 0 : _univerInstanceServic.getUnitId());
262
262
  if (!unitId) return false;
263
263
  hyperLinkService.showEditPopup(unitId, linkInfo);
264
264
  return true;
@@ -336,13 +336,13 @@ const DocLinkPopup = () => {
336
336
  onClick: () => {
337
337
  navigator.clipboard.writeText(url);
338
338
  messageService.show({
339
- content: localeService.t("docLink.info.coped"),
339
+ content: localeService.t("docs-hyper-link-ui.info.coped"),
340
340
  type: _univerjs_design.MessageType.Info
341
341
  });
342
342
  },
343
343
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Tooltip, {
344
344
  placement: "bottom",
345
- title: localeService.t("docLink.info.copy"),
345
+ title: localeService.t("docs-hyper-link-ui.info.copy"),
346
346
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_icons.CopyIcon, {})
347
347
  })
348
348
  }),
@@ -353,7 +353,7 @@ const DocLinkPopup = () => {
353
353
  },
354
354
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Tooltip, {
355
355
  placement: "bottom",
356
- title: localeService.t("docLink.info.edit"),
356
+ title: localeService.t("docs-hyper-link-ui.info.edit"),
357
357
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_icons.WriteIcon, {})
358
358
  })
359
359
  }),
@@ -368,7 +368,7 @@ const DocLinkPopup = () => {
368
368
  },
369
369
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Tooltip, {
370
370
  placement: "bottom",
371
- title: localeService.t("docLink.info.cancel"),
371
+ title: localeService.t("docs-hyper-link-ui.info.cancel"),
372
372
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_icons.UnlinkIcon, {})
373
373
  })
374
374
  })
@@ -702,8 +702,8 @@ function AddHyperLinkMenuItemFactory(accessor) {
702
702
  id: ShowDocHyperLinkEditPopupOperation.id,
703
703
  type: _univerjs_ui.MenuItemType.BUTTON,
704
704
  icon: DOC_LINK_ICON,
705
- title: "docLink.menu.tooltip",
706
- tooltip: "docLink.menu.tooltip",
705
+ title: "docs-hyper-link-ui.menu.tooltip",
706
+ tooltip: "docs-hyper-link-ui.menu.tooltip",
707
707
  hidden$: (0, _univerjs_ui.getMenuHiddenObservable)(accessor, _univerjs_core.UniverInstanceType.UNIVER_DOC),
708
708
  disabled$: new rxjs.Observable(function(subscribe) {
709
709
  const observer = accessor.get(_univerjs_docs.DocSelectionManagerService).textSelection$.pipe((0, rxjs.debounceTime)(16)).subscribe(() => {
@@ -718,7 +718,7 @@ function AddHyperLinkMenuItemFactory(accessor) {
718
718
  const addLinkShortcut = {
719
719
  id: ShowDocHyperLinkEditPopupOperation.id,
720
720
  binding: _univerjs_ui.MetaKeys.CTRL_COMMAND | _univerjs_ui.KeyCode.K,
721
- description: "docLink.menu.tooltip",
721
+ description: "docs-hyper-link-ui.menu.tooltip",
722
722
  preconditions: _univerjs_docs_ui.whenDocAndEditorFocused
723
723
  };
724
724
 
@@ -0,0 +1,24 @@
1
+
2
+ //#region src/locale/ar-SA.ts
3
+ const locale = { "docs-hyper-link-ui": {
4
+ edit: {
5
+ confirm: "تأكيد",
6
+ cancel: "إلغاء",
7
+ title: "ارتباط",
8
+ address: "ارتباط",
9
+ placeholder: "يُرجى إدخال عنوان URL للارتباط",
10
+ addressError: "عنوان URL غير قانوني!",
11
+ label: "تسمية",
12
+ labelError: "يُرجى إدخال تسمية الارتباط"
13
+ },
14
+ info: {
15
+ copy: "نسخ",
16
+ edit: "تحرير",
17
+ cancel: "إلغاء الارتباط",
18
+ coped: "تم نسخ الارتباط إلى الحافظة"
19
+ },
20
+ menu: { tooltip: "إضافة ارتباط" }
21
+ } };
22
+
23
+ //#endregion
24
+ module.exports = locale;
@@ -1,6 +1,6 @@
1
1
 
2
2
  //#region src/locale/ca-ES.ts
3
- const locale = { docLink: {
3
+ const locale = { "docs-hyper-link-ui": {
4
4
  edit: {
5
5
  confirm: "Confirma",
6
6
  cancel: "Cancel·la",
@@ -0,0 +1,24 @@
1
+
2
+ //#region src/locale/de-DE.ts
3
+ const locale = { "docs-hyper-link-ui": {
4
+ edit: {
5
+ confirm: "Bestätigen",
6
+ cancel: "Abbrechen",
7
+ title: "Link",
8
+ address: "Link",
9
+ placeholder: "Bitte eine Link-URL eingeben",
10
+ addressError: "URL ist ungültig!",
11
+ label: "Bezeichnung",
12
+ labelError: "Bitte die Bezeichnung des Links eingeben"
13
+ },
14
+ info: {
15
+ copy: "Kopieren",
16
+ edit: "Bearbeiten",
17
+ cancel: "Link abbrechen",
18
+ coped: "Link in die Zwischenablage kopiert"
19
+ },
20
+ menu: { tooltip: "Link hinzufügen" }
21
+ } };
22
+
23
+ //#endregion
24
+ module.exports = locale;
@@ -15,7 +15,7 @@
15
15
  * See the License for the specific language governing permissions and
16
16
  * limitations under the License.
17
17
  */
18
- const locale = { docLink: {
18
+ const locale = { "docs-hyper-link-ui": {
19
19
  edit: {
20
20
  confirm: "Confirm",
21
21
  cancel: "Cancel",
@@ -1,6 +1,6 @@
1
1
 
2
2
  //#region src/locale/es-ES.ts
3
- const locale = { docLink: {
3
+ const locale = { "docs-hyper-link-ui": {
4
4
  edit: {
5
5
  confirm: "Confirmar",
6
6
  cancel: "Cancelar",
@@ -1,6 +1,6 @@
1
1
 
2
2
  //#region src/locale/fa-IR.ts
3
- const locale = { docLink: {
3
+ const locale = { "docs-hyper-link-ui": {
4
4
  edit: {
5
5
  confirm: "تایید",
6
6
  cancel: "انصراف",
@@ -1,6 +1,6 @@
1
1
 
2
2
  //#region src/locale/fr-FR.ts
3
- const locale = { docLink: {
3
+ const locale = { "docs-hyper-link-ui": {
4
4
  edit: {
5
5
  confirm: "Confirmer",
6
6
  cancel: "Annuler",
@@ -0,0 +1,24 @@
1
+
2
+ //#region src/locale/id-ID.ts
3
+ const locale = { "docs-hyper-link-ui": {
4
+ edit: {
5
+ confirm: "Konfirmasi",
6
+ cancel: "Batal",
7
+ title: "Tautan",
8
+ address: "Tautan",
9
+ placeholder: "Silakan masukkan URL tautan",
10
+ addressError: "URL tidak valid!",
11
+ label: "Label",
12
+ labelError: "Silakan masukkan label tautan"
13
+ },
14
+ info: {
15
+ copy: "Salin",
16
+ edit: "Edit",
17
+ cancel: "Batalkan tautan",
18
+ coped: "Tautan disalin ke clipboard"
19
+ },
20
+ menu: { tooltip: "Tambah tautan" }
21
+ } };
22
+
23
+ //#endregion
24
+ module.exports = locale;
@@ -0,0 +1,24 @@
1
+
2
+ //#region src/locale/it-IT.ts
3
+ const locale = { "docs-hyper-link-ui": {
4
+ edit: {
5
+ confirm: "Conferma",
6
+ cancel: "Annulla",
7
+ title: "Collegamento",
8
+ address: "Collegamento",
9
+ placeholder: "Inserisci un URL di collegamento",
10
+ addressError: "URL non valido!",
11
+ label: "Etichetta",
12
+ labelError: "Inserisci l'etichetta del collegamento"
13
+ },
14
+ info: {
15
+ copy: "Copia",
16
+ edit: "Modifica",
17
+ cancel: "Annulla collegamento",
18
+ coped: "Collegamento copiato negli appunti"
19
+ },
20
+ menu: { tooltip: "Aggiungi collegamento" }
21
+ } };
22
+
23
+ //#endregion
24
+ module.exports = locale;
@@ -1,6 +1,6 @@
1
1
 
2
2
  //#region src/locale/ja-JP.ts
3
- const locale = { docLink: {
3
+ const locale = { "docs-hyper-link-ui": {
4
4
  edit: {
5
5
  confirm: "OK",
6
6
  cancel: "キャンセル",
@@ -1,6 +1,6 @@
1
1
 
2
2
  //#region src/locale/ko-KR.ts
3
- const locale = { docLink: {
3
+ const locale = { "docs-hyper-link-ui": {
4
4
  edit: {
5
5
  confirm: "확인",
6
6
  cancel: "취소",
@@ -0,0 +1,24 @@
1
+
2
+ //#region src/locale/pl-PL.ts
3
+ const locale = { "docs-hyper-link-ui": {
4
+ edit: {
5
+ confirm: "Potwierdź",
6
+ cancel: "Anuluj",
7
+ title: "Łącze",
8
+ address: "Łącze",
9
+ placeholder: "Wprowadź adres URL",
10
+ addressError: "Adres URL jest nieprawidłowy!",
11
+ label: "Etykieta",
12
+ labelError: "Wprowadź etykietę łącza"
13
+ },
14
+ info: {
15
+ copy: "Kopiuj",
16
+ edit: "Edytuj",
17
+ cancel: "Usuń łącze",
18
+ coped: "Łącze skopiowane do schowka"
19
+ },
20
+ menu: { tooltip: "Dodaj łącze" }
21
+ } };
22
+
23
+ //#endregion
24
+ module.exports = locale;
@@ -0,0 +1,24 @@
1
+
2
+ //#region src/locale/pt-BR.ts
3
+ const locale = { "docs-hyper-link-ui": {
4
+ edit: {
5
+ confirm: "Confirmar",
6
+ cancel: "Cancelar",
7
+ title: "Link",
8
+ address: "Link",
9
+ placeholder: "Insira uma URL de link",
10
+ addressError: "URL inválida!",
11
+ label: "Rótulo",
12
+ labelError: "Insira o rótulo do link"
13
+ },
14
+ info: {
15
+ copy: "Copiar",
16
+ edit: "Editar",
17
+ cancel: "Cancelar link",
18
+ coped: "Link copiado para a área de transferência"
19
+ },
20
+ menu: { tooltip: "Adicionar link" }
21
+ } };
22
+
23
+ //#endregion
24
+ module.exports = locale;
@@ -1,6 +1,6 @@
1
1
 
2
2
  //#region src/locale/ru-RU.ts
3
- const locale = { docLink: {
3
+ const locale = { "docs-hyper-link-ui": {
4
4
  edit: {
5
5
  confirm: "Подтвердить",
6
6
  cancel: "Отменить",
@@ -1,6 +1,6 @@
1
1
 
2
2
  //#region src/locale/sk-SK.ts
3
- const locale = { docLink: {
3
+ const locale = { "docs-hyper-link-ui": {
4
4
  edit: {
5
5
  confirm: "Potvrdiť",
6
6
  cancel: "Zrušiť",
@@ -1,6 +1,6 @@
1
1
 
2
2
  //#region src/locale/vi-VN.ts
3
- const locale = { docLink: {
3
+ const locale = { "docs-hyper-link-ui": {
4
4
  edit: {
5
5
  confirm: "Xác nhận",
6
6
  cancel: "Hủy",
@@ -1,6 +1,6 @@
1
1
 
2
2
  //#region src/locale/zh-CN.ts
3
- const locale = { docLink: {
3
+ const locale = { "docs-hyper-link-ui": {
4
4
  edit: {
5
5
  confirm: "确认",
6
6
  cancel: "取消",
@@ -0,0 +1,24 @@
1
+
2
+ //#region src/locale/zh-HK.ts
3
+ const locale = { "docs-hyper-link-ui": {
4
+ edit: {
5
+ confirm: "確認",
6
+ cancel: "取消",
7
+ title: "連結",
8
+ address: "連結",
9
+ label: "文本",
10
+ labelError: "请输入链接文本",
11
+ placeholder: "請輸入合法的連結",
12
+ addressError: "請輸入合法的連結"
13
+ },
14
+ info: {
15
+ copy: "複製",
16
+ edit: "編輯",
17
+ cancel: "取消連結",
18
+ coped: "連結已複製到剪貼板"
19
+ },
20
+ menu: { tooltip: "新增連結" }
21
+ } };
22
+
23
+ //#endregion
24
+ module.exports = locale;
@@ -1,6 +1,6 @@
1
1
 
2
2
  //#region src/locale/zh-TW.ts
3
- const locale = { docLink: {
3
+ const locale = { "docs-hyper-link-ui": {
4
4
  edit: {
5
5
  confirm: "確認",
6
6
  cancel: "取消",
package/lib/es/index.js CHANGED
@@ -12,7 +12,7 @@ import { CopyIcon, LinkIcon, UnlinkIcon, WriteIcon } from "@univerjs/icons";
12
12
 
13
13
  //#region package.json
14
14
  var name = "@univerjs/docs-hyper-link-ui";
15
- var version = "0.23.0";
15
+ var version = "0.24.0-insiders.20260527-b1d726f";
16
16
 
17
17
  //#endregion
18
18
  //#region src/config/config.ts
@@ -125,7 +125,7 @@ const DocHyperLinkEdit = () => {
125
125
  const [label, setLabel] = useState("");
126
126
  const [showError, setShowError] = useState(false);
127
127
  const isLegal = Tools.isLegalUrl(link);
128
- const doc = editing ? univerInstanceService.getUnit(editing.unitId, UniverInstanceType.UNIVER_DOC) : univerInstanceService.getCurrentUnitForType(UniverInstanceType.UNIVER_DOC);
128
+ const doc = editing ? univerInstanceService.getUnit(editing.unitId, UniverInstanceType.UNIVER_DOC) : univerInstanceService.getCurrentUnitOfType(UniverInstanceType.UNIVER_DOC);
129
129
  useEffect(() => {
130
130
  var _doc$getSelfOrHeaderF2, _BuildTextUtils$custo, _body$customRanges2;
131
131
  const activeRange = docSelectionManagerService.getActiveTextRange();
@@ -181,8 +181,8 @@ const DocHyperLinkEdit = () => {
181
181
  return /* @__PURE__ */ jsxs("div", {
182
182
  className: clsx("univer-box-border univer-w-[328px] univer-rounded-xl univer-bg-white univer-px-6 univer-py-5 univer-shadow dark:!univer-bg-gray-900", borderClassName),
183
183
  children: [/* @__PURE__ */ jsxs("div", { children: [editing ? /* @__PURE__ */ jsx(FormLayout, {
184
- label: localeService.t("docLink.edit.label"),
185
- error: showError && isBlankInput(label) ? localeService.t("docLink.edit.labelError") : "",
184
+ label: localeService.t("docs-hyper-link-ui.edit.label"),
185
+ error: showError && isBlankInput(label) ? localeService.t("docs-hyper-link-ui.edit.labelError") : "",
186
186
  children: /* @__PURE__ */ jsx(Input, {
187
187
  value: label,
188
188
  onChange: setLabel,
@@ -192,8 +192,8 @@ const DocHyperLinkEdit = () => {
192
192
  }
193
193
  })
194
194
  }) : null, /* @__PURE__ */ jsx(FormLayout, {
195
- label: localeService.t("docLink.edit.address"),
196
- error: showError && !isLegal ? localeService.t("docLink.edit.addressError") : "",
195
+ label: localeService.t("docs-hyper-link-ui.edit.address"),
196
+ error: showError && !isLegal ? localeService.t("docs-hyper-link-ui.edit.addressError") : "",
197
197
  children: /* @__PURE__ */ jsx(Input, {
198
198
  value: link,
199
199
  onChange: setLink,
@@ -206,12 +206,12 @@ const DocHyperLinkEdit = () => {
206
206
  className: "univer-flex univer-justify-end univer-gap-3",
207
207
  children: [/* @__PURE__ */ jsx(Button, {
208
208
  onClick: handleCancel,
209
- children: localeService.t("docLink.edit.cancel")
209
+ children: localeService.t("docs-hyper-link-ui.edit.cancel")
210
210
  }), /* @__PURE__ */ jsx(Button, {
211
211
  variant: "primary",
212
212
  disabled: isBlankInput(link),
213
213
  onClick: handleConfirm,
214
- children: localeService.t("docLink.edit.confirm")
214
+ children: localeService.t("docs-hyper-link-ui.edit.confirm")
215
215
  })]
216
216
  })]
217
217
  });
@@ -245,7 +245,7 @@ const shouldDisableAddLink = (accessor) => {
245
245
  const textRanges = textSelectionService.getTextRanges();
246
246
  if (!(textRanges === null || textRanges === void 0 ? void 0 : textRanges.length)) return true;
247
247
  const activeRange = textRanges[0];
248
- if (!univerInstanceService.getCurrentUnitForType(UniverInstanceType.UNIVER_DOC) || !activeRange || activeRange.collapsed) return true;
248
+ if (!univerInstanceService.getCurrentUnitOfType(UniverInstanceType.UNIVER_DOC) || !activeRange || activeRange.collapsed) return true;
249
249
  return false;
250
250
  };
251
251
  const ShowDocHyperLinkEditPopupOperation = {
@@ -257,7 +257,7 @@ const ShowDocHyperLinkEditPopupOperation = {
257
257
  const univerInstanceService = accessor.get(IUniverInstanceService);
258
258
  if (shouldDisableAddLink(accessor) && !linkInfo) return false;
259
259
  const hyperLinkService = accessor.get(DocHyperLinkPopupService);
260
- const unitId = (linkInfo === null || linkInfo === void 0 ? void 0 : linkInfo.unitId) || ((_univerInstanceServic = univerInstanceService.getCurrentUnitForType(UniverInstanceType.UNIVER_DOC)) === null || _univerInstanceServic === void 0 ? void 0 : _univerInstanceServic.getUnitId());
260
+ const unitId = (linkInfo === null || linkInfo === void 0 ? void 0 : linkInfo.unitId) || ((_univerInstanceServic = univerInstanceService.getCurrentUnitOfType(UniverInstanceType.UNIVER_DOC)) === null || _univerInstanceServic === void 0 ? void 0 : _univerInstanceServic.getUnitId());
261
261
  if (!unitId) return false;
262
262
  hyperLinkService.showEditPopup(unitId, linkInfo);
263
263
  return true;
@@ -335,13 +335,13 @@ const DocLinkPopup = () => {
335
335
  onClick: () => {
336
336
  navigator.clipboard.writeText(url);
337
337
  messageService.show({
338
- content: localeService.t("docLink.info.coped"),
338
+ content: localeService.t("docs-hyper-link-ui.info.coped"),
339
339
  type: MessageType.Info
340
340
  });
341
341
  },
342
342
  children: /* @__PURE__ */ jsx(Tooltip, {
343
343
  placement: "bottom",
344
- title: localeService.t("docLink.info.copy"),
344
+ title: localeService.t("docs-hyper-link-ui.info.copy"),
345
345
  children: /* @__PURE__ */ jsx(CopyIcon, {})
346
346
  })
347
347
  }),
@@ -352,7 +352,7 @@ const DocLinkPopup = () => {
352
352
  },
353
353
  children: /* @__PURE__ */ jsx(Tooltip, {
354
354
  placement: "bottom",
355
- title: localeService.t("docLink.info.edit"),
355
+ title: localeService.t("docs-hyper-link-ui.info.edit"),
356
356
  children: /* @__PURE__ */ jsx(WriteIcon, {})
357
357
  })
358
358
  }),
@@ -367,7 +367,7 @@ const DocLinkPopup = () => {
367
367
  },
368
368
  children: /* @__PURE__ */ jsx(Tooltip, {
369
369
  placement: "bottom",
370
- title: localeService.t("docLink.info.cancel"),
370
+ title: localeService.t("docs-hyper-link-ui.info.cancel"),
371
371
  children: /* @__PURE__ */ jsx(UnlinkIcon, {})
372
372
  })
373
373
  })
@@ -701,8 +701,8 @@ function AddHyperLinkMenuItemFactory(accessor) {
701
701
  id: ShowDocHyperLinkEditPopupOperation.id,
702
702
  type: MenuItemType.BUTTON,
703
703
  icon: DOC_LINK_ICON,
704
- title: "docLink.menu.tooltip",
705
- tooltip: "docLink.menu.tooltip",
704
+ title: "docs-hyper-link-ui.menu.tooltip",
705
+ tooltip: "docs-hyper-link-ui.menu.tooltip",
706
706
  hidden$: getMenuHiddenObservable(accessor, UniverInstanceType.UNIVER_DOC),
707
707
  disabled$: new Observable(function(subscribe) {
708
708
  const observer = accessor.get(DocSelectionManagerService).textSelection$.pipe(debounceTime(16)).subscribe(() => {
@@ -717,7 +717,7 @@ function AddHyperLinkMenuItemFactory(accessor) {
717
717
  const addLinkShortcut = {
718
718
  id: ShowDocHyperLinkEditPopupOperation.id,
719
719
  binding: MetaKeys.CTRL_COMMAND | KeyCode.K,
720
- description: "docLink.menu.tooltip",
720
+ description: "docs-hyper-link-ui.menu.tooltip",
721
721
  preconditions: whenDocAndEditorFocused
722
722
  };
723
723
 
@@ -0,0 +1,23 @@
1
+ //#region src/locale/ar-SA.ts
2
+ const locale = { "docs-hyper-link-ui": {
3
+ edit: {
4
+ confirm: "تأكيد",
5
+ cancel: "إلغاء",
6
+ title: "ارتباط",
7
+ address: "ارتباط",
8
+ placeholder: "يُرجى إدخال عنوان URL للارتباط",
9
+ addressError: "عنوان URL غير قانوني!",
10
+ label: "تسمية",
11
+ labelError: "يُرجى إدخال تسمية الارتباط"
12
+ },
13
+ info: {
14
+ copy: "نسخ",
15
+ edit: "تحرير",
16
+ cancel: "إلغاء الارتباط",
17
+ coped: "تم نسخ الارتباط إلى الحافظة"
18
+ },
19
+ menu: { tooltip: "إضافة ارتباط" }
20
+ } };
21
+
22
+ //#endregion
23
+ export { locale as default };
@@ -1,5 +1,5 @@
1
1
  //#region src/locale/ca-ES.ts
2
- const locale = { docLink: {
2
+ const locale = { "docs-hyper-link-ui": {
3
3
  edit: {
4
4
  confirm: "Confirma",
5
5
  cancel: "Cancel·la",
@@ -0,0 +1,23 @@
1
+ //#region src/locale/de-DE.ts
2
+ const locale = { "docs-hyper-link-ui": {
3
+ edit: {
4
+ confirm: "Bestätigen",
5
+ cancel: "Abbrechen",
6
+ title: "Link",
7
+ address: "Link",
8
+ placeholder: "Bitte eine Link-URL eingeben",
9
+ addressError: "URL ist ungültig!",
10
+ label: "Bezeichnung",
11
+ labelError: "Bitte die Bezeichnung des Links eingeben"
12
+ },
13
+ info: {
14
+ copy: "Kopieren",
15
+ edit: "Bearbeiten",
16
+ cancel: "Link abbrechen",
17
+ coped: "Link in die Zwischenablage kopiert"
18
+ },
19
+ menu: { tooltip: "Link hinzufügen" }
20
+ } };
21
+
22
+ //#endregion
23
+ export { locale as default };
@@ -14,7 +14,7 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- const locale = { docLink: {
17
+ const locale = { "docs-hyper-link-ui": {
18
18
  edit: {
19
19
  confirm: "Confirm",
20
20
  cancel: "Cancel",
@@ -1,5 +1,5 @@
1
1
  //#region src/locale/es-ES.ts
2
- const locale = { docLink: {
2
+ const locale = { "docs-hyper-link-ui": {
3
3
  edit: {
4
4
  confirm: "Confirmar",
5
5
  cancel: "Cancelar",
@@ -1,5 +1,5 @@
1
1
  //#region src/locale/fa-IR.ts
2
- const locale = { docLink: {
2
+ const locale = { "docs-hyper-link-ui": {
3
3
  edit: {
4
4
  confirm: "تایید",
5
5
  cancel: "انصراف",
@@ -1,5 +1,5 @@
1
1
  //#region src/locale/fr-FR.ts
2
- const locale = { docLink: {
2
+ const locale = { "docs-hyper-link-ui": {
3
3
  edit: {
4
4
  confirm: "Confirmer",
5
5
  cancel: "Annuler",
@@ -0,0 +1,23 @@
1
+ //#region src/locale/id-ID.ts
2
+ const locale = { "docs-hyper-link-ui": {
3
+ edit: {
4
+ confirm: "Konfirmasi",
5
+ cancel: "Batal",
6
+ title: "Tautan",
7
+ address: "Tautan",
8
+ placeholder: "Silakan masukkan URL tautan",
9
+ addressError: "URL tidak valid!",
10
+ label: "Label",
11
+ labelError: "Silakan masukkan label tautan"
12
+ },
13
+ info: {
14
+ copy: "Salin",
15
+ edit: "Edit",
16
+ cancel: "Batalkan tautan",
17
+ coped: "Tautan disalin ke clipboard"
18
+ },
19
+ menu: { tooltip: "Tambah tautan" }
20
+ } };
21
+
22
+ //#endregion
23
+ export { locale as default };