@univerjs/docs-hyper-link-ui 0.23.0 → 0.24.0-insiders.20260528-29f582d
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/lib/cjs/index.js +30 -20
- package/lib/cjs/locale/ar-SA.js +24 -0
- package/lib/cjs/locale/ca-ES.js +1 -1
- package/lib/cjs/locale/de-DE.js +24 -0
- package/lib/cjs/locale/en-US.js +1 -1
- package/lib/cjs/locale/es-ES.js +1 -1
- package/lib/cjs/locale/fa-IR.js +1 -1
- package/lib/cjs/locale/fr-FR.js +1 -1
- package/lib/cjs/locale/id-ID.js +24 -0
- package/lib/cjs/locale/it-IT.js +24 -0
- package/lib/cjs/locale/ja-JP.js +1 -1
- package/lib/cjs/locale/ko-KR.js +1 -1
- package/lib/cjs/locale/pl-PL.js +24 -0
- package/lib/cjs/locale/pt-BR.js +24 -0
- package/lib/cjs/locale/ru-RU.js +1 -1
- package/lib/cjs/locale/sk-SK.js +1 -1
- package/lib/cjs/locale/vi-VN.js +1 -1
- package/lib/cjs/locale/zh-CN.js +1 -1
- package/lib/cjs/locale/zh-HK.js +24 -0
- package/lib/cjs/locale/zh-TW.js +1 -1
- package/lib/es/index.js +31 -21
- package/lib/es/locale/ar-SA.js +23 -0
- package/lib/es/locale/ca-ES.js +1 -1
- package/lib/es/locale/de-DE.js +23 -0
- package/lib/es/locale/en-US.js +1 -1
- package/lib/es/locale/es-ES.js +1 -1
- package/lib/es/locale/fa-IR.js +1 -1
- package/lib/es/locale/fr-FR.js +1 -1
- package/lib/es/locale/id-ID.js +23 -0
- package/lib/es/locale/it-IT.js +23 -0
- package/lib/es/locale/ja-JP.js +1 -1
- package/lib/es/locale/ko-KR.js +1 -1
- package/lib/es/locale/pl-PL.js +23 -0
- package/lib/es/locale/pt-BR.js +23 -0
- package/lib/es/locale/ru-RU.js +1 -1
- package/lib/es/locale/sk-SK.js +1 -1
- package/lib/es/locale/vi-VN.js +1 -1
- package/lib/es/locale/zh-CN.js +1 -1
- package/lib/es/locale/zh-HK.js +23 -0
- package/lib/es/locale/zh-TW.js +1 -1
- package/lib/index.js +31 -21
- package/lib/locale/ar-SA.js +23 -0
- package/lib/locale/ca-ES.js +1 -1
- package/lib/locale/de-DE.js +23 -0
- package/lib/locale/en-US.js +1 -1
- package/lib/locale/es-ES.js +1 -1
- package/lib/locale/fa-IR.js +1 -1
- package/lib/locale/fr-FR.js +1 -1
- package/lib/locale/id-ID.js +23 -0
- package/lib/locale/it-IT.js +23 -0
- package/lib/locale/ja-JP.js +1 -1
- package/lib/locale/ko-KR.js +1 -1
- package/lib/locale/pl-PL.js +23 -0
- package/lib/locale/pt-BR.js +23 -0
- package/lib/locale/ru-RU.js +1 -1
- package/lib/locale/sk-SK.js +1 -1
- package/lib/locale/vi-VN.js +1 -1
- package/lib/locale/zh-CN.js +1 -1
- package/lib/locale/zh-HK.js +23 -0
- package/lib/locale/zh-TW.js +1 -1
- package/lib/types/locale/ar-SA.d.ts +18 -0
- package/lib/types/locale/de-DE.d.ts +18 -0
- package/lib/types/locale/en-US.d.ts +1 -1
- package/lib/types/locale/id-ID.d.ts +18 -0
- package/lib/types/locale/it-IT.d.ts +18 -0
- package/lib/types/locale/pl-PL.d.ts +18 -0
- package/lib/types/locale/pt-BR.d.ts +18 -0
- package/lib/types/locale/zh-HK.d.ts +18 -0
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/ar-SA.js +1 -0
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/de-DE.js +1 -0
- 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 -0
- package/lib/umd/locale/it-IT.js +1 -0
- 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 -0
- package/lib/umd/locale/pt-BR.js +1 -0
- 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 -0
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +10 -10
- package/LICENSE +0 -176
|
@@ -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 };
|
package/lib/es/locale/en-US.js
CHANGED
package/lib/es/locale/es-ES.js
CHANGED
package/lib/es/locale/fa-IR.js
CHANGED
package/lib/es/locale/fr-FR.js
CHANGED
|
@@ -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 };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
//#region src/locale/it-IT.ts
|
|
2
|
+
const locale = { "docs-hyper-link-ui": {
|
|
3
|
+
edit: {
|
|
4
|
+
confirm: "Conferma",
|
|
5
|
+
cancel: "Annulla",
|
|
6
|
+
title: "Collegamento",
|
|
7
|
+
address: "Collegamento",
|
|
8
|
+
placeholder: "Inserisci un URL di collegamento",
|
|
9
|
+
addressError: "URL non valido!",
|
|
10
|
+
label: "Etichetta",
|
|
11
|
+
labelError: "Inserisci l'etichetta del collegamento"
|
|
12
|
+
},
|
|
13
|
+
info: {
|
|
14
|
+
copy: "Copia",
|
|
15
|
+
edit: "Modifica",
|
|
16
|
+
cancel: "Annulla collegamento",
|
|
17
|
+
coped: "Collegamento copiato negli appunti"
|
|
18
|
+
},
|
|
19
|
+
menu: { tooltip: "Aggiungi collegamento" }
|
|
20
|
+
} };
|
|
21
|
+
|
|
22
|
+
//#endregion
|
|
23
|
+
export { locale as default };
|
package/lib/es/locale/ja-JP.js
CHANGED
package/lib/es/locale/ko-KR.js
CHANGED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
//#region src/locale/pl-PL.ts
|
|
2
|
+
const locale = { "docs-hyper-link-ui": {
|
|
3
|
+
edit: {
|
|
4
|
+
confirm: "Potwierdź",
|
|
5
|
+
cancel: "Anuluj",
|
|
6
|
+
title: "Łącze",
|
|
7
|
+
address: "Łącze",
|
|
8
|
+
placeholder: "Wprowadź adres URL",
|
|
9
|
+
addressError: "Adres URL jest nieprawidłowy!",
|
|
10
|
+
label: "Etykieta",
|
|
11
|
+
labelError: "Wprowadź etykietę łącza"
|
|
12
|
+
},
|
|
13
|
+
info: {
|
|
14
|
+
copy: "Kopiuj",
|
|
15
|
+
edit: "Edytuj",
|
|
16
|
+
cancel: "Usuń łącze",
|
|
17
|
+
coped: "Łącze skopiowane do schowka"
|
|
18
|
+
},
|
|
19
|
+
menu: { tooltip: "Dodaj łącze" }
|
|
20
|
+
} };
|
|
21
|
+
|
|
22
|
+
//#endregion
|
|
23
|
+
export { locale as default };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
//#region src/locale/pt-BR.ts
|
|
2
|
+
const locale = { "docs-hyper-link-ui": {
|
|
3
|
+
edit: {
|
|
4
|
+
confirm: "Confirmar",
|
|
5
|
+
cancel: "Cancelar",
|
|
6
|
+
title: "Link",
|
|
7
|
+
address: "Link",
|
|
8
|
+
placeholder: "Insira uma URL de link",
|
|
9
|
+
addressError: "URL inválida!",
|
|
10
|
+
label: "Rótulo",
|
|
11
|
+
labelError: "Insira o rótulo do link"
|
|
12
|
+
},
|
|
13
|
+
info: {
|
|
14
|
+
copy: "Copiar",
|
|
15
|
+
edit: "Editar",
|
|
16
|
+
cancel: "Cancelar link",
|
|
17
|
+
coped: "Link copiado para a área de transferência"
|
|
18
|
+
},
|
|
19
|
+
menu: { tooltip: "Adicionar link" }
|
|
20
|
+
} };
|
|
21
|
+
|
|
22
|
+
//#endregion
|
|
23
|
+
export { locale as default };
|
package/lib/es/locale/ru-RU.js
CHANGED
package/lib/es/locale/sk-SK.js
CHANGED
package/lib/es/locale/vi-VN.js
CHANGED
package/lib/es/locale/zh-CN.js
CHANGED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
//#region src/locale/zh-HK.ts
|
|
2
|
+
const locale = { "docs-hyper-link-ui": {
|
|
3
|
+
edit: {
|
|
4
|
+
confirm: "確認",
|
|
5
|
+
cancel: "取消",
|
|
6
|
+
title: "連結",
|
|
7
|
+
address: "連結",
|
|
8
|
+
label: "文本",
|
|
9
|
+
labelError: "请输入链接文本",
|
|
10
|
+
placeholder: "請輸入合法的連結",
|
|
11
|
+
addressError: "請輸入合法的連結"
|
|
12
|
+
},
|
|
13
|
+
info: {
|
|
14
|
+
copy: "複製",
|
|
15
|
+
edit: "編輯",
|
|
16
|
+
cancel: "取消連結",
|
|
17
|
+
coped: "連結已複製到剪貼板"
|
|
18
|
+
},
|
|
19
|
+
menu: { tooltip: "新增連結" }
|
|
20
|
+
} };
|
|
21
|
+
|
|
22
|
+
//#endregion
|
|
23
|
+
export { locale as default };
|
package/lib/es/locale/zh-TW.js
CHANGED
package/lib/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { BuildTextUtils, CommandType, CustomRangeType, DOCS_NORMAL_EDITOR_UNIT_I
|
|
|
2
2
|
import { UniverDocsHyperLinkPlugin } from "@univerjs/docs-hyper-link";
|
|
3
3
|
import { IRenderManagerService } from "@univerjs/engine-render";
|
|
4
4
|
import { DOC_INTERCEPTOR_POINT, DocInterceptorService, DocSelectionManagerService, DocSkeletonManagerService, SetTextSelectionsOperation, addCustomRangeBySelectionFactory, deleteCustomRangeFactory, replaceSelectionFactory } from "@univerjs/docs";
|
|
5
|
-
import { DocCanvasPopManagerService, DocEventManagerService, DocRenderController, whenDocAndEditorFocused } from "@univerjs/docs-ui";
|
|
5
|
+
import { DocCanvasPopManagerService, DocEventManagerService, DocRenderController, EMPTY_PARAGRAPH_MENU_ID, INSERT_BELLOW_MENU_ID, whenDocAndEditorFocused } from "@univerjs/docs-ui";
|
|
6
6
|
import { BehaviorSubject, Observable, debounceTime, distinctUntilChanged, pairwise } from "rxjs";
|
|
7
7
|
import { Button, FormLayout, Input, MessageType, Tooltip, borderClassName, clsx } from "@univerjs/design";
|
|
8
8
|
import { ComponentManager, ContextMenuGroup, ContextMenuPosition, IMenuManagerService, IMessageService, IShortcutService, KeyCode, MenuItemType, MetaKeys, RibbonInsertGroup, getMenuHiddenObservable, useDependency, useObservable } from "@univerjs/ui";
|
|
@@ -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.
|
|
15
|
+
var version = "0.24.0-insiders.20260528-29f582d";
|
|
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.
|
|
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("
|
|
185
|
-
error: showError && isBlankInput(label) ? localeService.t("
|
|
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("
|
|
196
|
-
error: showError && !isLegal ? localeService.t("
|
|
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("
|
|
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("
|
|
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.
|
|
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.
|
|
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("
|
|
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("
|
|
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("
|
|
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("
|
|
370
|
+
title: localeService.t("docs-hyper-link-ui.info.cancel"),
|
|
371
371
|
children: /* @__PURE__ */ jsx(UnlinkIcon, {})
|
|
372
372
|
})
|
|
373
373
|
})
|
|
@@ -611,10 +611,10 @@ let DocHyperLinkEventRenderController = class DocHyperLinkEventRenderController
|
|
|
611
611
|
}
|
|
612
612
|
_initHover() {
|
|
613
613
|
this.disposeWithMe(this._docEventManagerService.hoverCustomRanges$.subscribe((ranges) => {
|
|
614
|
-
var _link$segmentId;
|
|
614
|
+
var _activeRanges$, _link$segmentId;
|
|
615
615
|
const link = ranges.find((range) => range.range.rangeType === CustomRangeType.HYPERLINK);
|
|
616
616
|
const activeRanges = this._docSelectionManagerService.getTextRanges();
|
|
617
|
-
const currentSegmentId = activeRanges === null || activeRanges === void 0 ? void 0 :
|
|
617
|
+
const currentSegmentId = activeRanges === null || activeRanges === void 0 || (_activeRanges$ = activeRanges[0]) === null || _activeRanges$ === void 0 ? void 0 : _activeRanges$.segmentId;
|
|
618
618
|
if (((_link$segmentId = link === null || link === void 0 ? void 0 : link.segmentId) !== null && _link$segmentId !== void 0 ? _link$segmentId : "") !== currentSegmentId) {
|
|
619
619
|
this._hideInfoPopup();
|
|
620
620
|
return;
|
|
@@ -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: "
|
|
705
|
-
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: "
|
|
720
|
+
description: "docs-hyper-link-ui.menu.tooltip",
|
|
721
721
|
preconditions: whenDocAndEditorFocused
|
|
722
722
|
};
|
|
723
723
|
|
|
@@ -731,7 +731,17 @@ const menuSchema = {
|
|
|
731
731
|
[ContextMenuPosition.MAIN_AREA]: { [ContextMenuGroup.DATA]: { [ShowDocHyperLinkEditPopupOperation.id]: {
|
|
732
732
|
order: 0,
|
|
733
733
|
menuItemFactory: AddHyperLinkMenuItemFactory
|
|
734
|
-
} } }
|
|
734
|
+
} } },
|
|
735
|
+
[ContextMenuPosition.PARAGRAPH]: {
|
|
736
|
+
[ContextMenuGroup.LAYOUT]: { [INSERT_BELLOW_MENU_ID]: { [ShowDocHyperLinkEditPopupOperation.id]: {
|
|
737
|
+
order: 6,
|
|
738
|
+
menuItemFactory: AddHyperLinkMenuItemFactory
|
|
739
|
+
} } },
|
|
740
|
+
[EMPTY_PARAGRAPH_MENU_ID]: { [ContextMenuGroup.LAYOUT]: { [ShowDocHyperLinkEditPopupOperation.id]: {
|
|
741
|
+
order: 6,
|
|
742
|
+
menuItemFactory: AddHyperLinkMenuItemFactory
|
|
743
|
+
} } }
|
|
744
|
+
}
|
|
735
745
|
};
|
|
736
746
|
|
|
737
747
|
//#endregion
|
|
@@ -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 };
|
package/lib/locale/ca-ES.js
CHANGED
|
@@ -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 };
|
package/lib/locale/en-US.js
CHANGED
package/lib/locale/es-ES.js
CHANGED
package/lib/locale/fa-IR.js
CHANGED
package/lib/locale/fr-FR.js
CHANGED
|
@@ -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 };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
//#region src/locale/it-IT.ts
|
|
2
|
+
const locale = { "docs-hyper-link-ui": {
|
|
3
|
+
edit: {
|
|
4
|
+
confirm: "Conferma",
|
|
5
|
+
cancel: "Annulla",
|
|
6
|
+
title: "Collegamento",
|
|
7
|
+
address: "Collegamento",
|
|
8
|
+
placeholder: "Inserisci un URL di collegamento",
|
|
9
|
+
addressError: "URL non valido!",
|
|
10
|
+
label: "Etichetta",
|
|
11
|
+
labelError: "Inserisci l'etichetta del collegamento"
|
|
12
|
+
},
|
|
13
|
+
info: {
|
|
14
|
+
copy: "Copia",
|
|
15
|
+
edit: "Modifica",
|
|
16
|
+
cancel: "Annulla collegamento",
|
|
17
|
+
coped: "Collegamento copiato negli appunti"
|
|
18
|
+
},
|
|
19
|
+
menu: { tooltip: "Aggiungi collegamento" }
|
|
20
|
+
} };
|
|
21
|
+
|
|
22
|
+
//#endregion
|
|
23
|
+
export { locale as default };
|
package/lib/locale/ja-JP.js
CHANGED
package/lib/locale/ko-KR.js
CHANGED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
//#region src/locale/pl-PL.ts
|
|
2
|
+
const locale = { "docs-hyper-link-ui": {
|
|
3
|
+
edit: {
|
|
4
|
+
confirm: "Potwierdź",
|
|
5
|
+
cancel: "Anuluj",
|
|
6
|
+
title: "Łącze",
|
|
7
|
+
address: "Łącze",
|
|
8
|
+
placeholder: "Wprowadź adres URL",
|
|
9
|
+
addressError: "Adres URL jest nieprawidłowy!",
|
|
10
|
+
label: "Etykieta",
|
|
11
|
+
labelError: "Wprowadź etykietę łącza"
|
|
12
|
+
},
|
|
13
|
+
info: {
|
|
14
|
+
copy: "Kopiuj",
|
|
15
|
+
edit: "Edytuj",
|
|
16
|
+
cancel: "Usuń łącze",
|
|
17
|
+
coped: "Łącze skopiowane do schowka"
|
|
18
|
+
},
|
|
19
|
+
menu: { tooltip: "Dodaj łącze" }
|
|
20
|
+
} };
|
|
21
|
+
|
|
22
|
+
//#endregion
|
|
23
|
+
export { locale as default };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
//#region src/locale/pt-BR.ts
|
|
2
|
+
const locale = { "docs-hyper-link-ui": {
|
|
3
|
+
edit: {
|
|
4
|
+
confirm: "Confirmar",
|
|
5
|
+
cancel: "Cancelar",
|
|
6
|
+
title: "Link",
|
|
7
|
+
address: "Link",
|
|
8
|
+
placeholder: "Insira uma URL de link",
|
|
9
|
+
addressError: "URL inválida!",
|
|
10
|
+
label: "Rótulo",
|
|
11
|
+
labelError: "Insira o rótulo do link"
|
|
12
|
+
},
|
|
13
|
+
info: {
|
|
14
|
+
copy: "Copiar",
|
|
15
|
+
edit: "Editar",
|
|
16
|
+
cancel: "Cancelar link",
|
|
17
|
+
coped: "Link copiado para a área de transferência"
|
|
18
|
+
},
|
|
19
|
+
menu: { tooltip: "Adicionar link" }
|
|
20
|
+
} };
|
|
21
|
+
|
|
22
|
+
//#endregion
|
|
23
|
+
export { locale as default };
|
package/lib/locale/ru-RU.js
CHANGED
package/lib/locale/sk-SK.js
CHANGED
package/lib/locale/vi-VN.js
CHANGED
package/lib/locale/zh-CN.js
CHANGED