@univerjs/sheets-hyper-link-ui 1.0.0-alpha.8 → 1.0.0-beta.1

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 (83) hide show
  1. package/lib/cjs/index.js +32 -36
  2. package/lib/cjs/locale/ar-SA.js +0 -1
  3. package/lib/cjs/locale/ca-ES.js +0 -1
  4. package/lib/cjs/locale/de-DE.js +0 -1
  5. package/lib/cjs/locale/en-US.js +0 -1
  6. package/lib/cjs/locale/es-ES.js +0 -1
  7. package/lib/cjs/locale/fa-IR.js +0 -1
  8. package/lib/cjs/locale/fr-FR.js +0 -1
  9. package/lib/cjs/locale/id-ID.js +0 -1
  10. package/lib/cjs/locale/it-IT.js +0 -1
  11. package/lib/cjs/locale/ja-JP.js +0 -1
  12. package/lib/cjs/locale/ko-KR.js +0 -1
  13. package/lib/cjs/locale/pl-PL.js +0 -1
  14. package/lib/cjs/locale/pt-BR.js +0 -1
  15. package/lib/cjs/locale/ru-RU.js +0 -1
  16. package/lib/cjs/locale/sk-SK.js +0 -1
  17. package/lib/cjs/locale/vi-VN.js +0 -1
  18. package/lib/cjs/locale/zh-CN.js +0 -1
  19. package/lib/cjs/locale/zh-HK.js +1 -2
  20. package/lib/cjs/locale/zh-TW.js +1 -2
  21. package/lib/es/index.js +33 -37
  22. package/lib/es/locale/ar-SA.js +0 -1
  23. package/lib/es/locale/ca-ES.js +0 -1
  24. package/lib/es/locale/de-DE.js +0 -1
  25. package/lib/es/locale/en-US.js +0 -1
  26. package/lib/es/locale/es-ES.js +0 -1
  27. package/lib/es/locale/fa-IR.js +0 -1
  28. package/lib/es/locale/fr-FR.js +0 -1
  29. package/lib/es/locale/id-ID.js +0 -1
  30. package/lib/es/locale/it-IT.js +0 -1
  31. package/lib/es/locale/ja-JP.js +0 -1
  32. package/lib/es/locale/ko-KR.js +0 -1
  33. package/lib/es/locale/pl-PL.js +0 -1
  34. package/lib/es/locale/pt-BR.js +0 -1
  35. package/lib/es/locale/ru-RU.js +0 -1
  36. package/lib/es/locale/sk-SK.js +0 -1
  37. package/lib/es/locale/vi-VN.js +0 -1
  38. package/lib/es/locale/zh-CN.js +0 -1
  39. package/lib/es/locale/zh-HK.js +1 -2
  40. package/lib/es/locale/zh-TW.js +1 -2
  41. package/lib/index.css +4 -4
  42. package/lib/index.js +33 -37
  43. package/lib/locale/ar-SA.js +0 -1
  44. package/lib/locale/ca-ES.js +0 -1
  45. package/lib/locale/de-DE.js +0 -1
  46. package/lib/locale/en-US.js +0 -1
  47. package/lib/locale/es-ES.js +0 -1
  48. package/lib/locale/fa-IR.js +0 -1
  49. package/lib/locale/fr-FR.js +0 -1
  50. package/lib/locale/id-ID.js +0 -1
  51. package/lib/locale/it-IT.js +0 -1
  52. package/lib/locale/ja-JP.js +0 -1
  53. package/lib/locale/ko-KR.js +0 -1
  54. package/lib/locale/pl-PL.js +0 -1
  55. package/lib/locale/pt-BR.js +0 -1
  56. package/lib/locale/ru-RU.js +0 -1
  57. package/lib/locale/sk-SK.js +0 -1
  58. package/lib/locale/vi-VN.js +0 -1
  59. package/lib/locale/zh-CN.js +0 -1
  60. package/lib/locale/zh-HK.js +1 -2
  61. package/lib/locale/zh-TW.js +1 -2
  62. package/lib/types/locale/en-US.d.ts +0 -1
  63. package/lib/umd/index.js +1 -1
  64. package/lib/umd/locale/ar-SA.js +1 -1
  65. package/lib/umd/locale/ca-ES.js +1 -1
  66. package/lib/umd/locale/de-DE.js +1 -1
  67. package/lib/umd/locale/en-US.js +1 -1
  68. package/lib/umd/locale/es-ES.js +1 -1
  69. package/lib/umd/locale/fa-IR.js +1 -1
  70. package/lib/umd/locale/fr-FR.js +1 -1
  71. package/lib/umd/locale/id-ID.js +1 -1
  72. package/lib/umd/locale/it-IT.js +1 -1
  73. package/lib/umd/locale/ja-JP.js +1 -1
  74. package/lib/umd/locale/ko-KR.js +1 -1
  75. package/lib/umd/locale/pl-PL.js +1 -1
  76. package/lib/umd/locale/pt-BR.js +1 -1
  77. package/lib/umd/locale/ru-RU.js +1 -1
  78. package/lib/umd/locale/sk-SK.js +1 -1
  79. package/lib/umd/locale/vi-VN.js +1 -1
  80. package/lib/umd/locale/zh-CN.js +1 -1
  81. package/lib/umd/locale/zh-HK.js +1 -1
  82. package/lib/umd/locale/zh-TW.js +1 -1
  83. package/package.json +16 -16
package/lib/index.js CHANGED
@@ -9,7 +9,7 @@ import { Button, FormLayout, Input, MessageType, Select, Tooltip, borderClassNam
9
9
  import { IDefinedNamesService, UniverFormulaEnginePlugin, deserializeRangeWithSheet, serializeRange, serializeRangeToRefString, serializeRangeWithSheet } from "@univerjs/engine-formula";
10
10
  import { RangeSelector } from "@univerjs/sheets-formula-ui";
11
11
  import { AddHyperLinkCommand, AddHyperLinkMutation, AddRichHyperLinkCommand, CancelHyperLinkCommand, CancelRichHyperLinkCommand, ERROR_RANGE, HyperLinkModel, RemoveHyperLinkMutation, SheetHyperLinkType, SheetsHyperLinkParserService, UniverSheetsHyperLinkPlugin, UpdateHyperLinkCommand, UpdateRichHyperLinkCommand } from "@univerjs/sheets-hyper-link";
12
- import { ComponentManager, ContextMenuGroup, ContextMenuPosition, IMenuManagerService, IMessageService, IShortcutService, IconManager, KeyCode, MenuItemType, MetaKeys, RibbonInsertGroup, UniverUIPlugin, getMenuHiddenObservable, useDependency, useEvent, useObservable } from "@univerjs/ui";
12
+ import { ComponentManager, ContextMenuGroup, ContextMenuPosition, IMenuManagerService, IMessageService, IShortcutService, IconManager, KeyCode, MenuItemType, MetaKeys, RibbonInsertGroup, getMenuHiddenObservable, useDependency, useEvent, useObservable } from "@univerjs/ui";
13
13
  import { useCallback, useEffect, useMemo, useRef, useState } from "react";
14
14
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
15
15
  import { AllBorderIcon, CopyIcon, LinkIcon, SheetsMultiIcon, UnlinkIcon, WriteIcon } from "@univerjs/icons";
@@ -314,7 +314,6 @@ function resolveRangePayload(rangeText, defaultSheetName) {
314
314
  //#endregion
315
315
  //#region src/views/CellLinkEdit.tsx
316
316
  const CellLinkEdit = () => {
317
- var _definedNameService$g;
318
317
  const [id, setId] = useState("");
319
318
  const [hide, setHide] = useState(false);
320
319
  const [display, _setDisplay] = useState("");
@@ -362,16 +361,16 @@ const CellLinkEdit = () => {
362
361
  if (typeof label === "number") label = `${label}`;
363
362
  let link;
364
363
  if (customRange) {
365
- var _customRange$rangeId, _label, _customRange$properti, _customRange$properti2;
364
+ var _customRange$properti;
366
365
  link = {
367
- id: (_customRange$rangeId = customRange === null || customRange === void 0 ? void 0 : customRange.rangeId) !== null && _customRange$rangeId !== void 0 ? _customRange$rangeId : "",
368
- display: (_label = label) !== null && _label !== void 0 ? _label : "",
369
- payload: (_customRange$properti = customRange === null || customRange === void 0 || (_customRange$properti2 = customRange.properties) === null || _customRange$properti2 === void 0 ? void 0 : _customRange$properti2.url) !== null && _customRange$properti !== void 0 ? _customRange$properti : "",
366
+ id: (customRange === null || customRange === void 0 ? void 0 : customRange.rangeId) ?? "",
367
+ display: label ?? "",
368
+ payload: (customRange === null || customRange === void 0 || (_customRange$properti = customRange.properties) === null || _customRange$properti === void 0 ? void 0 : _customRange$properti.url) ?? "",
370
369
  row,
371
370
  column: col
372
371
  };
373
372
  } else if (editing.type === "viewing") {
374
- var _cell$p, _cell$p2, _range$properties$url, _range$properties2;
373
+ var _cell$p, _cell$p2, _range$properties2;
375
374
  const workbook = univerInstanceService.getUnit(editing.unitId);
376
375
  const worksheet = workbook === null || workbook === void 0 ? void 0 : workbook.getSheetBySheetId(editing.subUnitId);
377
376
  const cell = worksheet === null || worksheet === void 0 ? void 0 : worksheet.getCellRaw(editing.row, editing.col);
@@ -384,22 +383,22 @@ const CellLinkEdit = () => {
384
383
  link = {
385
384
  id: "",
386
385
  display: "",
387
- payload: (_range$properties$url = range === null || range === void 0 || (_range$properties2 = range.properties) === null || _range$properties2 === void 0 ? void 0 : _range$properties2.url) !== null && _range$properties$url !== void 0 ? _range$properties$url : "",
386
+ payload: (range === null || range === void 0 || (_range$properties2 = range.properties) === null || _range$properties2 === void 0 ? void 0 : _range$properties2.url) ?? "",
388
387
  row,
389
388
  column: col
390
389
  };
391
390
  } else {
392
- var _BuildTextUtils$custo, _body$customRanges, _label2, _customRange$properti3, _customRange$properti4;
391
+ var _BuildTextUtils$custo, _customRange$properti2;
393
392
  const doc = univerInstanceService.getCurrentUnitOfType(UniverInstanceType.UNIVER_DOC);
394
393
  const currentSelection = textSelectionService.getActiveTextRange();
395
394
  const body = doc === null || doc === void 0 ? void 0 : doc.getBody();
396
395
  const selection = currentSelection && body ? currentSelection : null;
397
- const customRange = selection && ((_BuildTextUtils$custo = BuildTextUtils.customRange.getCustomRangesInterestsWithSelection(selection, (_body$customRanges = body === null || body === void 0 ? void 0 : body.customRanges) !== null && _body$customRanges !== void 0 ? _body$customRanges : [])) === null || _BuildTextUtils$custo === void 0 ? void 0 : _BuildTextUtils$custo[0]);
396
+ const customRange = selection && ((_BuildTextUtils$custo = BuildTextUtils.customRange.getCustomRangesInterestsWithSelection(selection, (body === null || body === void 0 ? void 0 : body.customRanges) ?? [])) === null || _BuildTextUtils$custo === void 0 ? void 0 : _BuildTextUtils$custo[0]);
398
397
  setShowLabel(false);
399
398
  link = {
400
399
  id: "",
401
- display: (_label2 = label) !== null && _label2 !== void 0 ? _label2 : "",
402
- payload: (_customRange$properti3 = customRange === null || customRange === void 0 || (_customRange$properti4 = customRange.properties) === null || _customRange$properti4 === void 0 ? void 0 : _customRange$properti4.url) !== null && _customRange$properti3 !== void 0 ? _customRange$properti3 : "",
400
+ display: label ?? "",
401
+ payload: (customRange === null || customRange === void 0 || (_customRange$properti2 = customRange.properties) === null || _customRange$properti2 === void 0 ? void 0 : _customRange$properti2.url) ?? "",
403
402
  row,
404
403
  column: col
405
404
  };
@@ -422,9 +421,9 @@ const CellLinkEdit = () => {
422
421
  if (linkInfo.url === link.display) setDisplaySyncedWithPayload(true);
423
422
  break;
424
423
  case SheetHyperLinkType.RANGE: {
425
- var _univerInstanceServic, _univerInstanceServic2;
424
+ var _univerInstanceServic;
426
425
  const params = linkInfo.searchObj;
427
- const payload = serializeRangeWithSheet(params.gid ? (_univerInstanceServic = (_univerInstanceServic2 = univerInstanceService.getUnit(editing.unitId)) === null || _univerInstanceServic2 === void 0 || (_univerInstanceServic2 = _univerInstanceServic2.getSheetBySheetId(params.gid)) === null || _univerInstanceServic2 === void 0 ? void 0 : _univerInstanceServic2.getName()) !== null && _univerInstanceServic !== void 0 ? _univerInstanceServic : "" : "", deserializeRangeWithSheet(params.range).range);
426
+ const payload = serializeRangeWithSheet(params.gid ? ((_univerInstanceServic = univerInstanceService.getUnit(editing.unitId)) === null || _univerInstanceServic === void 0 || (_univerInstanceServic = _univerInstanceServic.getSheetBySheetId(params.gid)) === null || _univerInstanceServic === void 0 ? void 0 : _univerInstanceServic.getName()) ?? "" : "", deserializeRangeWithSheet(params.range).range);
428
427
  setPayload(payload);
429
428
  if (payload === link.display) setDisplaySyncedWithPayload(true);
430
429
  break;
@@ -459,7 +458,7 @@ const CellLinkEdit = () => {
459
458
  const mergeInfo = worksheet === null || worksheet === void 0 ? void 0 : worksheet.getMergedCell(editing.row, editing.col);
460
459
  const color = new ColorKit(themeService.getColorFromTheme("primary.600")).toRgb();
461
460
  id = markSelectionService.addShape({
462
- range: mergeInfo !== null && mergeInfo !== void 0 ? mergeInfo : {
461
+ range: mergeInfo ?? {
463
462
  startColumn: editing.col,
464
463
  endColumn: editing.col,
465
464
  startRow: editing.row,
@@ -558,7 +557,7 @@ const CellLinkEdit = () => {
558
557
  label: sheet.getName(),
559
558
  value: sheet.getSheetId()
560
559
  })).filter((opt) => hiddens.indexOf(opt.value) === -1);
561
- const definedNames = Object.values((_definedNameService$g = definedNameService.getDefinedNameMap(workbook.getUnitId())) !== null && _definedNameService$g !== void 0 ? _definedNameService$g : {}).map((value) => ({
560
+ const definedNames = Object.values(definedNameService.getDefinedNameMap(workbook.getUnitId()) ?? {}).map((value) => ({
562
561
  label: value.name,
563
562
  value: value.id
564
563
  }));
@@ -622,7 +621,7 @@ const CellLinkEdit = () => {
622
621
  };
623
622
  if (!editing) return null;
624
623
  return /* @__PURE__ */ jsxs("div", {
625
- className: clsx("univer-box-border univer-w-[296px] univer-rounded-xl univer-bg-white univer-p-4 univer-shadow-md dark:!univer-bg-gray-900", borderClassName),
624
+ className: clsx("univer-box-border univer-w-[296px] univer-rounded-xl univer-bg-gray-0 univer-p-4 univer-shadow-md dark:!univer-bg-gray-900", borderClassName),
626
625
  children: [
627
626
  showLabel ? /* @__PURE__ */ jsx(FormLayout, {
628
627
  label: localeService.t("sheets-hyper-link-ui.form.label"),
@@ -784,7 +783,7 @@ const iconsMap = {
784
783
  [SheetHyperLinkType.INVALID]: /* @__PURE__ */ jsx(AllBorderIcon, {})
785
784
  };
786
785
  const CellLinkPopupPure = (props) => {
787
- var _customRange$properti, _customRange$properti2;
786
+ var _customRange$properti;
788
787
  const popupService = useDependency(SheetsHyperLinkPopupService);
789
788
  const commandService = useDependency(ICommandService);
790
789
  const messageService = useDependency(IMessageService);
@@ -794,10 +793,10 @@ const CellLinkPopupPure = (props) => {
794
793
  const parserHyperLinkService = useDependency(SheetsHyperLinkParserService);
795
794
  const { customRange, row, col, unitId, subUnitId, editPermission, copyPermission, type } = props;
796
795
  if (!(customRange === null || customRange === void 0 || (_customRange$properti = customRange.properties) === null || _customRange$properti === void 0 ? void 0 : _customRange$properti.url)) return null;
797
- const linkObj = parserHyperLinkService.parseHyperLink((_customRange$properti2 = customRange.properties.url) !== null && _customRange$properti2 !== void 0 ? _customRange$properti2 : "");
796
+ const linkObj = parserHyperLinkService.parseHyperLink(customRange.properties.url ?? "");
798
797
  const isError = linkObj.type === SheetHyperLinkType.INVALID;
799
798
  return /* @__PURE__ */ jsxs("div", {
800
- className: clsx("univer-mb-1 univer-flex univer-max-w-80 univer-flex-row univer-items-center univer-justify-between univer-gap-2 univer-overflow-hidden univer-rounded-lg univer-bg-white univer-p-2 univer-shadow-md dark:!univer-bg-gray-900", borderClassName),
799
+ className: clsx("univer-mb-1 univer-flex univer-max-w-80 univer-flex-row univer-items-center univer-justify-between univer-gap-2 univer-overflow-hidden univer-rounded-lg univer-bg-gray-0 univer-p-2 univer-shadow-md dark:!univer-bg-gray-900", borderClassName),
801
800
  onClick: () => popupService.hideCurrentPopup(),
802
801
  children: [/* @__PURE__ */ jsxs("div", {
803
802
  className: clsx("univer-flex univer-h-6 univer-flex-1 univer-cursor-pointer univer-flex-row univer-items-center univer-gap-1 univer-truncate univer-text-sm univer-leading-5 univer-text-primary-600", { "univer-text-red-500": isError }),
@@ -806,7 +805,7 @@ const CellLinkPopupPure = (props) => {
806
805
  resolverService.navigate(linkObj);
807
806
  },
808
807
  children: [/* @__PURE__ */ jsx("div", {
809
- className: "univer-flex univer-size-5 univer-flex-none univer-items-center univer-justify-center univer-text-base univer-text-gray-900 dark:!univer-text-white",
808
+ className: "univer-flex univer-size-5 univer-flex-none univer-items-center univer-justify-center univer-text-base univer-text-gray-900 dark:!univer-text-gray-0",
810
809
  children: iconsMap[linkObj.type]
811
810
  }), /* @__PURE__ */ jsx(Tooltip, {
812
811
  showIfEllipsis: true,
@@ -836,7 +835,7 @@ const CellLinkPopupPure = (props) => {
836
835
  children: /* @__PURE__ */ jsx(Tooltip, {
837
836
  placement: "bottom",
838
837
  title: localeService.t("sheets-hyper-link-ui.popup.copy"),
839
- children: /* @__PURE__ */ jsx(CopyIcon, { className: "dark:!univer-text-white" })
838
+ children: /* @__PURE__ */ jsx(CopyIcon, { className: "dark:!univer-text-gray-0" })
840
839
  })
841
840
  }), editPermission && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
842
841
  "data-u-comp": "cell-link-popup-edit",
@@ -854,7 +853,7 @@ const CellLinkPopupPure = (props) => {
854
853
  children: /* @__PURE__ */ jsx(Tooltip, {
855
854
  placement: "bottom",
856
855
  title: localeService.t("sheets-hyper-link-ui.popup.edit"),
857
- children: /* @__PURE__ */ jsx(WriteIcon, { className: "dark:!univer-text-white" })
856
+ children: /* @__PURE__ */ jsx(WriteIcon, { className: "dark:!univer-text-gray-0" })
858
857
  })
859
858
  }), /* @__PURE__ */ jsx("div", {
860
859
  "data-u-comp": "cell-link-popup-remove",
@@ -873,7 +872,7 @@ const CellLinkPopupPure = (props) => {
873
872
  children: /* @__PURE__ */ jsx(Tooltip, {
874
873
  placement: "bottom",
875
874
  title: localeService.t("sheets-hyper-link-ui.popup.cancel"),
876
- children: /* @__PURE__ */ jsx(UnlinkIcon, { className: "dark:!univer-text-white" })
875
+ children: /* @__PURE__ */ jsx(UnlinkIcon, { className: "dark:!univer-text-gray-0" })
877
876
  })
878
877
  })] })]
879
878
  })]
@@ -1006,7 +1005,7 @@ let SheetsHyperLinkPopupService = class SheetsHyperLinkPopupService extends Disp
1006
1005
  const visible = this._editorBridgeService.isVisible().visible;
1007
1006
  const state = this._editorBridgeService.getEditCellState();
1008
1007
  if (visible && state) {
1009
- var _state$documentLayout, _body$customRanges$fi, _body$customRanges;
1008
+ var _state$documentLayout, _body$customRanges;
1010
1009
  const textRange = this._textSelectionManagerService.getActiveTextRange();
1011
1010
  const body = (_state$documentLayout = state.documentLayoutObject.documentModel) === null || _state$documentLayout === void 0 ? void 0 : _state$documentLayout.getBody();
1012
1011
  if (!body) return null;
@@ -1016,7 +1015,7 @@ let SheetsHyperLinkPopupService = class SheetsHyperLinkPopupService extends Disp
1016
1015
  collapsed: body.dataStream.length - 2 === 0,
1017
1016
  label: BuildTextUtils.transform.getPlainText(body.dataStream)
1018
1017
  };
1019
- const links = BuildTextUtils.customRange.getCustomRangesInterestsWithSelection(textRange, (_body$customRanges$fi = (_body$customRanges = body.customRanges) === null || _body$customRanges === void 0 ? void 0 : _body$customRanges.filter((i) => i.rangeType === CustomRangeType.HYPERLINK)) !== null && _body$customRanges$fi !== void 0 ? _body$customRanges$fi : []);
1018
+ const links = BuildTextUtils.customRange.getCustomRangesInterestsWithSelection(textRange, ((_body$customRanges = body.customRanges) === null || _body$customRanges === void 0 ? void 0 : _body$customRanges.filter((i) => i.rangeType === CustomRangeType.HYPERLINK)) ?? []);
1020
1019
  let start = textRange.startOffset;
1021
1020
  let end = textRange.endOffset;
1022
1021
  links.forEach((link) => {
@@ -1048,7 +1047,6 @@ let SheetsHyperLinkPopupService = class SheetsHyperLinkPopupService extends Disp
1048
1047
  startAddEditing(link) {
1049
1048
  const { unitId, subUnitId, type } = link;
1050
1049
  if (type === "editing") {
1051
- var _range$label;
1052
1050
  const range = this._getEditingRange();
1053
1051
  if (!range) return;
1054
1052
  this._textSelectionManagerService.replaceDocRanges([{ ...range }], {
@@ -1062,17 +1060,17 @@ let SheetsHyperLinkPopupService = class SheetsHyperLinkPopupService extends Disp
1062
1060
  this._currentEditingPopup = this._sheetCanvasPopManagerService.attachPopupToAbsolutePosition(rects.pop(), this._editPopup, unitId, subUnitId);
1063
1061
  this._currentEditing$.next({
1064
1062
  ...link,
1065
- label: (_range$label = range === null || range === void 0 ? void 0 : range.label) !== null && _range$label !== void 0 ? _range$label : ""
1063
+ label: (range === null || range === void 0 ? void 0 : range.label) ?? ""
1066
1064
  });
1067
1065
  } else {
1068
- var _cell$p$body$dataStre, _cell$p$body, _cell$v;
1066
+ var _cell$p$body;
1069
1067
  this._currentEditingPopup = this._sheetCanvasPopManagerService.attachPopupToCell(link.row, link.col, this._editPopup, unitId, subUnitId);
1070
1068
  const workbook = this._univerInstanceService.getUnit(unitId, UniverInstanceType.UNIVER_SHEET);
1071
1069
  const worksheet = workbook === null || workbook === void 0 ? void 0 : workbook.getSheetBySheetId(subUnitId);
1072
1070
  const cell = worksheet === null || worksheet === void 0 ? void 0 : worksheet.getCellRaw(link.row, link.col);
1073
1071
  this._currentEditing$.next({
1074
1072
  ...link,
1075
- label: (cell === null || cell === void 0 ? void 0 : cell.p) ? BuildTextUtils.transform.getPlainText((_cell$p$body$dataStre = (_cell$p$body = cell.p.body) === null || _cell$p$body === void 0 ? void 0 : _cell$p$body.dataStream) !== null && _cell$p$body$dataStre !== void 0 ? _cell$p$body$dataStre : "") : ((_cell$v = cell === null || cell === void 0 ? void 0 : cell.v) !== null && _cell$v !== void 0 ? _cell$v : "").toString()
1073
+ label: (cell === null || cell === void 0 ? void 0 : cell.p) ? BuildTextUtils.transform.getPlainText(((_cell$p$body = cell.p.body) === null || _cell$p$body === void 0 ? void 0 : _cell$p$body.dataStream) ?? "") : ((cell === null || cell === void 0 ? void 0 : cell.v) ?? "").toString()
1076
1074
  });
1077
1075
  }
1078
1076
  }
@@ -1345,9 +1343,8 @@ let SheetsHyperLinkCopyPasteController = class SheetsHyperLinkCopyPasteControlle
1345
1343
  const { rows, cols } = discreteRange;
1346
1344
  rows.forEach((row, rowIndex) => {
1347
1345
  cols.forEach((col, colIndex) => {
1348
- var _link$id;
1349
1346
  const link = this._hyperLinkModel.getHyperLinkByLocation(unitId, subUnitId, row, col);
1350
- matrix.setValue(rowIndex, colIndex, (_link$id = link === null || link === void 0 ? void 0 : link.id) !== null && _link$id !== void 0 ? _link$id : "");
1347
+ matrix.setValue(rowIndex, colIndex, (link === null || link === void 0 ? void 0 : link.id) ?? "");
1351
1348
  });
1352
1349
  });
1353
1350
  }
@@ -1460,10 +1457,9 @@ const getEditingLinkDisable$ = (accessor, unitId = DOCS_NORMAL_EDITOR_UNIT_ID_KE
1460
1457
  }));
1461
1458
  };
1462
1459
  const getLinkDisable$ = (accessor) => {
1463
- var _editorBridgeService$;
1464
1460
  const univerInstanceService = accessor.get(IUniverInstanceService);
1465
1461
  const editorBridgeService = accessor.has(IEditorBridgeService) ? accessor.get(IEditorBridgeService) : null;
1466
- return ((_editorBridgeService$ = editorBridgeService === null || editorBridgeService === void 0 ? void 0 : editorBridgeService.currentEditCellState$.pipe(map((state) => {
1462
+ return ((editorBridgeService === null || editorBridgeService === void 0 ? void 0 : editorBridgeService.currentEditCellState$.pipe(map((state) => {
1467
1463
  if (!state) return 1;
1468
1464
  const target = getSheetCommandTarget(univerInstanceService, {
1469
1465
  unitId: state.unitId,
@@ -1476,7 +1472,7 @@ const getLinkDisable$ = (accessor) => {
1476
1472
  return combineLatest([editorBridgeService ? editorBridgeService.visible$ : of(null), univerInstanceService.getCurrentTypeOfUnit$(UniverInstanceType.UNIVER_DOC)]).pipe(switchMap(([editing, focusingDoc]) => {
1477
1473
  return (editing === null || editing === void 0 ? void 0 : editing.visible) ? (focusingDoc === null || focusingDoc === void 0 ? void 0 : focusingDoc.getUnitId()) === DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY ? of(true) : getEditingLinkDisable$(accessor, DOCS_NORMAL_EDITOR_UNIT_ID_KEY) : of(disableCell !== 0);
1478
1474
  }));
1479
- }))) !== null && _editorBridgeService$ !== void 0 ? _editorBridgeService$ : of(true)).pipe(switchMap((disableCell) => {
1475
+ }))) ?? of(true)).pipe(switchMap((disableCell) => {
1480
1476
  if (disableCell) return of(true);
1481
1477
  else return getCurrentRangeDisable$(accessor, {
1482
1478
  workbookTypes: [WorkbookEditablePermission],
@@ -1542,7 +1538,7 @@ const menuSchema = {
1542
1538
  //#endregion
1543
1539
  //#region package.json
1544
1540
  var name = "@univerjs/sheets-hyper-link-ui";
1545
- var version = "1.0.0-alpha.8";
1541
+ var version = "1.0.0-beta.1";
1546
1542
 
1547
1543
  //#endregion
1548
1544
  //#region src/controllers/auto-fill.controller.ts
@@ -2080,7 +2076,7 @@ _defineProperty(UniverSheetsHyperLinkUIPlugin, "packageName", name);
2080
2076
  _defineProperty(UniverSheetsHyperLinkUIPlugin, "version", version);
2081
2077
  _defineProperty(UniverSheetsHyperLinkUIPlugin, "type", UniverInstanceType.UNIVER_SHEET);
2082
2078
  UniverSheetsHyperLinkUIPlugin = __decorate([
2083
- DependentOn(UniverDocsPlugin, UniverFormulaEnginePlugin, UniverRenderEnginePlugin, UniverSheetsPlugin, UniverUIPlugin, UniverDocsUIPlugin, UniverSheetsHyperLinkPlugin, UniverSheetsUIPlugin),
2079
+ DependentOn(UniverDocsPlugin, UniverFormulaEnginePlugin, UniverRenderEnginePlugin, UniverSheetsPlugin, UniverDocsUIPlugin, UniverSheetsHyperLinkPlugin, UniverSheetsUIPlugin),
2084
2080
  __decorateParam(1, Inject(Injector)),
2085
2081
  __decorateParam(2, IConfigService)
2086
2082
  ], UniverSheetsHyperLinkUIPlugin);
@@ -1,7 +1,6 @@
1
1
  //#region src/locale/ar-SA.ts
2
2
  const locale = { "sheets-hyper-link-ui": {
3
3
  form: {
4
- editTitle: "تحرير الارتباط",
5
4
  addTitle: "إدراج ارتباط تشعبي",
6
5
  label: "التسمية",
7
6
  type: "النوع",
@@ -1,7 +1,6 @@
1
1
  //#region src/locale/ca-ES.ts
2
2
  const locale = { "sheets-hyper-link-ui": {
3
3
  form: {
4
- editTitle: "Edita l'enllaç",
5
4
  addTitle: "Insereix enllaç",
6
5
  label: "Etiqueta",
7
6
  type: "Tipus",
@@ -1,7 +1,6 @@
1
1
  //#region src/locale/de-DE.ts
2
2
  const locale = { "sheets-hyper-link-ui": {
3
3
  form: {
4
- editTitle: "Link bearbeiten",
5
4
  addTitle: "Link einfügen",
6
5
  label: "Beschriftung",
7
6
  type: "Typ",
@@ -16,7 +16,6 @@
16
16
  */
17
17
  const locale = { "sheets-hyper-link-ui": {
18
18
  form: {
19
- editTitle: "Edit Link",
20
19
  addTitle: "Insert Link",
21
20
  label: "Label",
22
21
  type: "Type",
@@ -1,7 +1,6 @@
1
1
  //#region src/locale/es-ES.ts
2
2
  const locale = { "sheets-hyper-link-ui": {
3
3
  form: {
4
- editTitle: "Editar enlace",
5
4
  addTitle: "Insertar enlace",
6
5
  label: "Etiqueta",
7
6
  type: "Tipo",
@@ -1,7 +1,6 @@
1
1
  //#region src/locale/fa-IR.ts
2
2
  const locale = { "sheets-hyper-link-ui": {
3
3
  form: {
4
- editTitle: "ویرایش لینک",
5
4
  addTitle: "درج لینک",
6
5
  label: "برچسب",
7
6
  type: "نوع",
@@ -1,7 +1,6 @@
1
1
  //#region src/locale/fr-FR.ts
2
2
  const locale = { "sheets-hyper-link-ui": {
3
3
  form: {
4
- editTitle: "Modifier le lien",
5
4
  addTitle: "Insérer un lien",
6
5
  label: "Titre",
7
6
  type: "Type",
@@ -1,7 +1,6 @@
1
1
  //#region src/locale/id-ID.ts
2
2
  const locale = { "sheets-hyper-link-ui": {
3
3
  form: {
4
- editTitle: "Edit Tautan",
5
4
  addTitle: "Sisipkan Tautan",
6
5
  label: "Label",
7
6
  type: "Tipe",
@@ -1,7 +1,6 @@
1
1
  //#region src/locale/it-IT.ts
2
2
  const locale = { "sheets-hyper-link-ui": {
3
3
  form: {
4
- editTitle: "Modifica collegamento",
5
4
  addTitle: "Inserisci collegamento",
6
5
  label: "Etichetta",
7
6
  type: "Tipo",
@@ -1,7 +1,6 @@
1
1
  //#region src/locale/ja-JP.ts
2
2
  const locale = { "sheets-hyper-link-ui": {
3
3
  form: {
4
- editTitle: "リンクの編集",
5
4
  addTitle: "リンクの挿入",
6
5
  label: "表示文字列",
7
6
  type: "種類",
@@ -1,7 +1,6 @@
1
1
  //#region src/locale/ko-KR.ts
2
2
  const locale = { "sheets-hyper-link-ui": {
3
3
  form: {
4
- editTitle: "링크 편집",
5
4
  addTitle: "링크 삽입",
6
5
  label: "표시 텍스트",
7
6
  type: "유형",
@@ -1,7 +1,6 @@
1
1
  //#region src/locale/pl-PL.ts
2
2
  const locale = { "sheets-hyper-link-ui": {
3
3
  form: {
4
- editTitle: "Edytuj łącze",
5
4
  addTitle: "Wstaw łącze",
6
5
  label: "Etykieta",
7
6
  type: "Typ",
@@ -1,7 +1,6 @@
1
1
  //#region src/locale/pt-BR.ts
2
2
  const locale = { "sheets-hyper-link-ui": {
3
3
  form: {
4
- editTitle: "Editar Link",
5
4
  addTitle: "Inserir Link",
6
5
  label: "Rótulo",
7
6
  type: "Tipo",
@@ -1,7 +1,6 @@
1
1
  //#region src/locale/ru-RU.ts
2
2
  const locale = { "sheets-hyper-link-ui": {
3
3
  form: {
4
- editTitle: "Редактировать ссылку",
5
4
  addTitle: "Вставить ссылку",
6
5
  label: "Метка",
7
6
  type: "Тип",
@@ -1,7 +1,6 @@
1
1
  //#region src/locale/sk-SK.ts
2
2
  const locale = { "sheets-hyper-link-ui": {
3
3
  form: {
4
- editTitle: "Upraviť odkaz",
5
4
  addTitle: "Vložiť odkaz",
6
5
  label: "Popisok",
7
6
  type: "Typ",
@@ -1,7 +1,6 @@
1
1
  //#region src/locale/vi-VN.ts
2
2
  const locale = { "sheets-hyper-link-ui": {
3
3
  form: {
4
- editTitle: "Chỉnh sửa liên kết",
5
4
  addTitle: "Chèn liên kết",
6
5
  label: "Văn bản",
7
6
  labelPlaceholder: "Nhập văn bản",
@@ -1,7 +1,6 @@
1
1
  //#region src/locale/zh-CN.ts
2
2
  const locale = { "sheets-hyper-link-ui": {
3
3
  form: {
4
- editTitle: "编辑链接",
5
4
  addTitle: "插入链接",
6
5
  label: "文本",
7
6
  labelPlaceholder: "输入文本",
@@ -1,9 +1,8 @@
1
1
  //#region src/locale/zh-HK.ts
2
2
  const locale = { "sheets-hyper-link-ui": {
3
3
  form: {
4
- editTitle: "編輯連結",
5
4
  addTitle: "插入連結",
6
- label: "文本",
5
+ label: "文字",
7
6
  labelPlaceholder: "輸入文字",
8
7
  type: "類型",
9
8
  link: "連結",
@@ -1,9 +1,8 @@
1
1
  //#region src/locale/zh-TW.ts
2
2
  const locale = { "sheets-hyper-link-ui": {
3
3
  form: {
4
- editTitle: "編輯連結",
5
4
  addTitle: "插入連結",
6
- label: "文本",
5
+ label: "文字",
7
6
  labelPlaceholder: "輸入文字",
8
7
  type: "類型",
9
8
  link: "連結",
@@ -16,7 +16,6 @@
16
16
  declare const locale: {
17
17
  'sheets-hyper-link-ui': {
18
18
  form: {
19
- editTitle: string;
20
19
  addTitle: string;
21
20
  label: string;
22
21
  type: string;