@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/cjs/index.js CHANGED
@@ -315,7 +315,6 @@ function resolveRangePayload(rangeText, defaultSheetName) {
315
315
  //#endregion
316
316
  //#region src/views/CellLinkEdit.tsx
317
317
  const CellLinkEdit = () => {
318
- var _definedNameService$g;
319
318
  const [id, setId] = (0, react.useState)("");
320
319
  const [hide, setHide] = (0, react.useState)(false);
321
320
  const [display, _setDisplay] = (0, react.useState)("");
@@ -363,16 +362,16 @@ const CellLinkEdit = () => {
363
362
  if (typeof label === "number") label = `${label}`;
364
363
  let link;
365
364
  if (customRange) {
366
- var _customRange$rangeId, _label, _customRange$properti, _customRange$properti2;
365
+ var _customRange$properti;
367
366
  link = {
368
- id: (_customRange$rangeId = customRange === null || customRange === void 0 ? void 0 : customRange.rangeId) !== null && _customRange$rangeId !== void 0 ? _customRange$rangeId : "",
369
- display: (_label = label) !== null && _label !== void 0 ? _label : "",
370
- 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 : "",
367
+ id: (customRange === null || customRange === void 0 ? void 0 : customRange.rangeId) ?? "",
368
+ display: label ?? "",
369
+ payload: (customRange === null || customRange === void 0 || (_customRange$properti = customRange.properties) === null || _customRange$properti === void 0 ? void 0 : _customRange$properti.url) ?? "",
371
370
  row,
372
371
  column: col
373
372
  };
374
373
  } else if (editing.type === "viewing") {
375
- var _cell$p, _cell$p2, _range$properties$url, _range$properties2;
374
+ var _cell$p, _cell$p2, _range$properties2;
376
375
  const workbook = univerInstanceService.getUnit(editing.unitId);
377
376
  const worksheet = workbook === null || workbook === void 0 ? void 0 : workbook.getSheetBySheetId(editing.subUnitId);
378
377
  const cell = worksheet === null || worksheet === void 0 ? void 0 : worksheet.getCellRaw(editing.row, editing.col);
@@ -385,22 +384,22 @@ const CellLinkEdit = () => {
385
384
  link = {
386
385
  id: "",
387
386
  display: "",
388
- 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 : "",
387
+ payload: (range === null || range === void 0 || (_range$properties2 = range.properties) === null || _range$properties2 === void 0 ? void 0 : _range$properties2.url) ?? "",
389
388
  row,
390
389
  column: col
391
390
  };
392
391
  } else {
393
- var _BuildTextUtils$custo, _body$customRanges, _label2, _customRange$properti3, _customRange$properti4;
392
+ var _BuildTextUtils$custo, _customRange$properti2;
394
393
  const doc = univerInstanceService.getCurrentUnitOfType(_univerjs_core.UniverInstanceType.UNIVER_DOC);
395
394
  const currentSelection = textSelectionService.getActiveTextRange();
396
395
  const body = doc === null || doc === void 0 ? void 0 : doc.getBody();
397
396
  const selection = currentSelection && body ? currentSelection : null;
398
- const customRange = selection && ((_BuildTextUtils$custo = _univerjs_core.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]);
397
+ const customRange = selection && ((_BuildTextUtils$custo = _univerjs_core.BuildTextUtils.customRange.getCustomRangesInterestsWithSelection(selection, (body === null || body === void 0 ? void 0 : body.customRanges) ?? [])) === null || _BuildTextUtils$custo === void 0 ? void 0 : _BuildTextUtils$custo[0]);
399
398
  setShowLabel(false);
400
399
  link = {
401
400
  id: "",
402
- display: (_label2 = label) !== null && _label2 !== void 0 ? _label2 : "",
403
- 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 : "",
401
+ display: label ?? "",
402
+ payload: (customRange === null || customRange === void 0 || (_customRange$properti2 = customRange.properties) === null || _customRange$properti2 === void 0 ? void 0 : _customRange$properti2.url) ?? "",
404
403
  row,
405
404
  column: col
406
405
  };
@@ -423,9 +422,9 @@ const CellLinkEdit = () => {
423
422
  if (linkInfo.url === link.display) setDisplaySyncedWithPayload(true);
424
423
  break;
425
424
  case _univerjs_sheets_hyper_link.SheetHyperLinkType.RANGE: {
426
- var _univerInstanceServic, _univerInstanceServic2;
425
+ var _univerInstanceServic;
427
426
  const params = linkInfo.searchObj;
428
- const payload = (0, _univerjs_engine_formula.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 : "" : "", (0, _univerjs_engine_formula.deserializeRangeWithSheet)(params.range).range);
427
+ const payload = (0, _univerjs_engine_formula.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()) ?? "" : "", (0, _univerjs_engine_formula.deserializeRangeWithSheet)(params.range).range);
429
428
  setPayload(payload);
430
429
  if (payload === link.display) setDisplaySyncedWithPayload(true);
431
430
  break;
@@ -460,7 +459,7 @@ const CellLinkEdit = () => {
460
459
  const mergeInfo = worksheet === null || worksheet === void 0 ? void 0 : worksheet.getMergedCell(editing.row, editing.col);
461
460
  const color = new _univerjs_core.ColorKit(themeService.getColorFromTheme("primary.600")).toRgb();
462
461
  id = markSelectionService.addShape({
463
- range: mergeInfo !== null && mergeInfo !== void 0 ? mergeInfo : {
462
+ range: mergeInfo ?? {
464
463
  startColumn: editing.col,
465
464
  endColumn: editing.col,
466
465
  startRow: editing.row,
@@ -559,7 +558,7 @@ const CellLinkEdit = () => {
559
558
  label: sheet.getName(),
560
559
  value: sheet.getSheetId()
561
560
  })).filter((opt) => hiddens.indexOf(opt.value) === -1);
562
- const definedNames = Object.values((_definedNameService$g = definedNameService.getDefinedNameMap(workbook.getUnitId())) !== null && _definedNameService$g !== void 0 ? _definedNameService$g : {}).map((value) => ({
561
+ const definedNames = Object.values(definedNameService.getDefinedNameMap(workbook.getUnitId()) ?? {}).map((value) => ({
563
562
  label: value.name,
564
563
  value: value.id
565
564
  }));
@@ -623,7 +622,7 @@ const CellLinkEdit = () => {
623
622
  };
624
623
  if (!editing) return null;
625
624
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
626
- className: (0, _univerjs_design.clsx)("univer-box-border univer-w-[296px] univer-rounded-xl univer-bg-white univer-p-4 univer-shadow-md dark:!univer-bg-gray-900", _univerjs_design.borderClassName),
625
+ className: (0, _univerjs_design.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", _univerjs_design.borderClassName),
627
626
  children: [
628
627
  showLabel ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.FormLayout, {
629
628
  label: localeService.t("sheets-hyper-link-ui.form.label"),
@@ -785,7 +784,7 @@ const iconsMap = {
785
784
  [_univerjs_sheets_hyper_link.SheetHyperLinkType.INVALID]: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_icons.AllBorderIcon, {})
786
785
  };
787
786
  const CellLinkPopupPure = (props) => {
788
- var _customRange$properti, _customRange$properti2;
787
+ var _customRange$properti;
789
788
  const popupService = (0, _univerjs_ui.useDependency)(SheetsHyperLinkPopupService);
790
789
  const commandService = (0, _univerjs_ui.useDependency)(_univerjs_core.ICommandService);
791
790
  const messageService = (0, _univerjs_ui.useDependency)(_univerjs_ui.IMessageService);
@@ -795,10 +794,10 @@ const CellLinkPopupPure = (props) => {
795
794
  const parserHyperLinkService = (0, _univerjs_ui.useDependency)(_univerjs_sheets_hyper_link.SheetsHyperLinkParserService);
796
795
  const { customRange, row, col, unitId, subUnitId, editPermission, copyPermission, type } = props;
797
796
  if (!(customRange === null || customRange === void 0 || (_customRange$properti = customRange.properties) === null || _customRange$properti === void 0 ? void 0 : _customRange$properti.url)) return null;
798
- const linkObj = parserHyperLinkService.parseHyperLink((_customRange$properti2 = customRange.properties.url) !== null && _customRange$properti2 !== void 0 ? _customRange$properti2 : "");
797
+ const linkObj = parserHyperLinkService.parseHyperLink(customRange.properties.url ?? "");
799
798
  const isError = linkObj.type === _univerjs_sheets_hyper_link.SheetHyperLinkType.INVALID;
800
799
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
801
- className: (0, _univerjs_design.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", _univerjs_design.borderClassName),
800
+ className: (0, _univerjs_design.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", _univerjs_design.borderClassName),
802
801
  onClick: () => popupService.hideCurrentPopup(),
803
802
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
804
803
  className: (0, _univerjs_design.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 }),
@@ -807,7 +806,7 @@ const CellLinkPopupPure = (props) => {
807
806
  resolverService.navigate(linkObj);
808
807
  },
809
808
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
810
- 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",
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-gray-0",
811
810
  children: iconsMap[linkObj.type]
812
811
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Tooltip, {
813
812
  showIfEllipsis: true,
@@ -837,7 +836,7 @@ const CellLinkPopupPure = (props) => {
837
836
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Tooltip, {
838
837
  placement: "bottom",
839
838
  title: localeService.t("sheets-hyper-link-ui.popup.copy"),
840
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_icons.CopyIcon, { className: "dark:!univer-text-white" })
839
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_icons.CopyIcon, { className: "dark:!univer-text-gray-0" })
841
840
  })
842
841
  }), editPermission && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
843
842
  "data-u-comp": "cell-link-popup-edit",
@@ -855,7 +854,7 @@ const CellLinkPopupPure = (props) => {
855
854
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Tooltip, {
856
855
  placement: "bottom",
857
856
  title: localeService.t("sheets-hyper-link-ui.popup.edit"),
858
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_icons.WriteIcon, { className: "dark:!univer-text-white" })
857
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_icons.WriteIcon, { className: "dark:!univer-text-gray-0" })
859
858
  })
860
859
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
861
860
  "data-u-comp": "cell-link-popup-remove",
@@ -874,7 +873,7 @@ const CellLinkPopupPure = (props) => {
874
873
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Tooltip, {
875
874
  placement: "bottom",
876
875
  title: localeService.t("sheets-hyper-link-ui.popup.cancel"),
877
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_icons.UnlinkIcon, { className: "dark:!univer-text-white" })
876
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_icons.UnlinkIcon, { className: "dark:!univer-text-gray-0" })
878
877
  })
879
878
  })] })]
880
879
  })]
@@ -1007,7 +1006,7 @@ let SheetsHyperLinkPopupService = class SheetsHyperLinkPopupService extends _uni
1007
1006
  const visible = this._editorBridgeService.isVisible().visible;
1008
1007
  const state = this._editorBridgeService.getEditCellState();
1009
1008
  if (visible && state) {
1010
- var _state$documentLayout, _body$customRanges$fi, _body$customRanges;
1009
+ var _state$documentLayout, _body$customRanges;
1011
1010
  const textRange = this._textSelectionManagerService.getActiveTextRange();
1012
1011
  const body = (_state$documentLayout = state.documentLayoutObject.documentModel) === null || _state$documentLayout === void 0 ? void 0 : _state$documentLayout.getBody();
1013
1012
  if (!body) return null;
@@ -1017,7 +1016,7 @@ let SheetsHyperLinkPopupService = class SheetsHyperLinkPopupService extends _uni
1017
1016
  collapsed: body.dataStream.length - 2 === 0,
1018
1017
  label: _univerjs_core.BuildTextUtils.transform.getPlainText(body.dataStream)
1019
1018
  };
1020
- const links = _univerjs_core.BuildTextUtils.customRange.getCustomRangesInterestsWithSelection(textRange, (_body$customRanges$fi = (_body$customRanges = body.customRanges) === null || _body$customRanges === void 0 ? void 0 : _body$customRanges.filter((i) => i.rangeType === _univerjs_core.CustomRangeType.HYPERLINK)) !== null && _body$customRanges$fi !== void 0 ? _body$customRanges$fi : []);
1019
+ const links = _univerjs_core.BuildTextUtils.customRange.getCustomRangesInterestsWithSelection(textRange, ((_body$customRanges = body.customRanges) === null || _body$customRanges === void 0 ? void 0 : _body$customRanges.filter((i) => i.rangeType === _univerjs_core.CustomRangeType.HYPERLINK)) ?? []);
1021
1020
  let start = textRange.startOffset;
1022
1021
  let end = textRange.endOffset;
1023
1022
  links.forEach((link) => {
@@ -1049,7 +1048,6 @@ let SheetsHyperLinkPopupService = class SheetsHyperLinkPopupService extends _uni
1049
1048
  startAddEditing(link) {
1050
1049
  const { unitId, subUnitId, type } = link;
1051
1050
  if (type === "editing") {
1052
- var _range$label;
1053
1051
  const range = this._getEditingRange();
1054
1052
  if (!range) return;
1055
1053
  this._textSelectionManagerService.replaceDocRanges([{ ...range }], {
@@ -1063,17 +1061,17 @@ let SheetsHyperLinkPopupService = class SheetsHyperLinkPopupService extends _uni
1063
1061
  this._currentEditingPopup = this._sheetCanvasPopManagerService.attachPopupToAbsolutePosition(rects.pop(), this._editPopup, unitId, subUnitId);
1064
1062
  this._currentEditing$.next({
1065
1063
  ...link,
1066
- label: (_range$label = range === null || range === void 0 ? void 0 : range.label) !== null && _range$label !== void 0 ? _range$label : ""
1064
+ label: (range === null || range === void 0 ? void 0 : range.label) ?? ""
1067
1065
  });
1068
1066
  } else {
1069
- var _cell$p$body$dataStre, _cell$p$body, _cell$v;
1067
+ var _cell$p$body;
1070
1068
  this._currentEditingPopup = this._sheetCanvasPopManagerService.attachPopupToCell(link.row, link.col, this._editPopup, unitId, subUnitId);
1071
1069
  const workbook = this._univerInstanceService.getUnit(unitId, _univerjs_core.UniverInstanceType.UNIVER_SHEET);
1072
1070
  const worksheet = workbook === null || workbook === void 0 ? void 0 : workbook.getSheetBySheetId(subUnitId);
1073
1071
  const cell = worksheet === null || worksheet === void 0 ? void 0 : worksheet.getCellRaw(link.row, link.col);
1074
1072
  this._currentEditing$.next({
1075
1073
  ...link,
1076
- label: (cell === null || cell === void 0 ? void 0 : cell.p) ? _univerjs_core.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()
1074
+ label: (cell === null || cell === void 0 ? void 0 : cell.p) ? _univerjs_core.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()
1077
1075
  });
1078
1076
  }
1079
1077
  }
@@ -1346,9 +1344,8 @@ let SheetsHyperLinkCopyPasteController = class SheetsHyperLinkCopyPasteControlle
1346
1344
  const { rows, cols } = discreteRange;
1347
1345
  rows.forEach((row, rowIndex) => {
1348
1346
  cols.forEach((col, colIndex) => {
1349
- var _link$id;
1350
1347
  const link = this._hyperLinkModel.getHyperLinkByLocation(unitId, subUnitId, row, col);
1351
- matrix.setValue(rowIndex, colIndex, (_link$id = link === null || link === void 0 ? void 0 : link.id) !== null && _link$id !== void 0 ? _link$id : "");
1348
+ matrix.setValue(rowIndex, colIndex, (link === null || link === void 0 ? void 0 : link.id) ?? "");
1352
1349
  });
1353
1350
  });
1354
1351
  }
@@ -1461,10 +1458,9 @@ const getEditingLinkDisable$ = (accessor, unitId = _univerjs_core.DOCS_NORMAL_ED
1461
1458
  }));
1462
1459
  };
1463
1460
  const getLinkDisable$ = (accessor) => {
1464
- var _editorBridgeService$;
1465
1461
  const univerInstanceService = accessor.get(_univerjs_core.IUniverInstanceService);
1466
1462
  const editorBridgeService = accessor.has(_univerjs_sheets_ui.IEditorBridgeService) ? accessor.get(_univerjs_sheets_ui.IEditorBridgeService) : null;
1467
- return ((_editorBridgeService$ = editorBridgeService === null || editorBridgeService === void 0 ? void 0 : editorBridgeService.currentEditCellState$.pipe((0, rxjs.map)((state) => {
1463
+ return ((editorBridgeService === null || editorBridgeService === void 0 ? void 0 : editorBridgeService.currentEditCellState$.pipe((0, rxjs.map)((state) => {
1468
1464
  if (!state) return 1;
1469
1465
  const target = (0, _univerjs_sheets.getSheetCommandTarget)(univerInstanceService, {
1470
1466
  unitId: state.unitId,
@@ -1477,7 +1473,7 @@ const getLinkDisable$ = (accessor) => {
1477
1473
  return (0, rxjs.combineLatest)([editorBridgeService ? editorBridgeService.visible$ : (0, rxjs.of)(null), univerInstanceService.getCurrentTypeOfUnit$(_univerjs_core.UniverInstanceType.UNIVER_DOC)]).pipe((0, rxjs.switchMap)(([editing, focusingDoc]) => {
1478
1474
  return (editing === null || editing === void 0 ? void 0 : editing.visible) ? (focusingDoc === null || focusingDoc === void 0 ? void 0 : focusingDoc.getUnitId()) === _univerjs_core.DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY ? (0, rxjs.of)(true) : getEditingLinkDisable$(accessor, _univerjs_core.DOCS_NORMAL_EDITOR_UNIT_ID_KEY) : (0, rxjs.of)(disableCell !== 0);
1479
1475
  }));
1480
- }))) !== null && _editorBridgeService$ !== void 0 ? _editorBridgeService$ : (0, rxjs.of)(true)).pipe((0, rxjs.switchMap)((disableCell) => {
1476
+ }))) ?? (0, rxjs.of)(true)).pipe((0, rxjs.switchMap)((disableCell) => {
1481
1477
  if (disableCell) return (0, rxjs.of)(true);
1482
1478
  else return (0, _univerjs_sheets_ui.getCurrentRangeDisable$)(accessor, {
1483
1479
  workbookTypes: [_univerjs_sheets.WorkbookEditablePermission],
@@ -1543,7 +1539,7 @@ const menuSchema = {
1543
1539
  //#endregion
1544
1540
  //#region package.json
1545
1541
  var name = "@univerjs/sheets-hyper-link-ui";
1546
- var version = "1.0.0-alpha.8";
1542
+ var version = "1.0.0-beta.1";
1547
1543
 
1548
1544
  //#endregion
1549
1545
  //#region src/controllers/auto-fill.controller.ts
@@ -2081,7 +2077,7 @@ _defineProperty(UniverSheetsHyperLinkUIPlugin, "packageName", name);
2081
2077
  _defineProperty(UniverSheetsHyperLinkUIPlugin, "version", version);
2082
2078
  _defineProperty(UniverSheetsHyperLinkUIPlugin, "type", _univerjs_core.UniverInstanceType.UNIVER_SHEET);
2083
2079
  UniverSheetsHyperLinkUIPlugin = __decorate([
2084
- (0, _univerjs_core.DependentOn)(_univerjs_docs.UniverDocsPlugin, _univerjs_engine_formula.UniverFormulaEnginePlugin, _univerjs_engine_render.UniverRenderEnginePlugin, _univerjs_sheets.UniverSheetsPlugin, _univerjs_ui.UniverUIPlugin, _univerjs_docs_ui.UniverDocsUIPlugin, _univerjs_sheets_hyper_link.UniverSheetsHyperLinkPlugin, _univerjs_sheets_ui.UniverSheetsUIPlugin),
2080
+ (0, _univerjs_core.DependentOn)(_univerjs_docs.UniverDocsPlugin, _univerjs_engine_formula.UniverFormulaEnginePlugin, _univerjs_engine_render.UniverRenderEnginePlugin, _univerjs_sheets.UniverSheetsPlugin, _univerjs_docs_ui.UniverDocsUIPlugin, _univerjs_sheets_hyper_link.UniverSheetsHyperLinkPlugin, _univerjs_sheets_ui.UniverSheetsUIPlugin),
2085
2081
  __decorateParam(1, (0, _univerjs_core.Inject)(_univerjs_core.Injector)),
2086
2082
  __decorateParam(2, _univerjs_core.IConfigService)
2087
2083
  ], UniverSheetsHyperLinkUIPlugin);
@@ -2,7 +2,6 @@
2
2
  //#region src/locale/ar-SA.ts
3
3
  const locale = { "sheets-hyper-link-ui": {
4
4
  form: {
5
- editTitle: "تحرير الارتباط",
6
5
  addTitle: "إدراج ارتباط تشعبي",
7
6
  label: "التسمية",
8
7
  type: "النوع",
@@ -2,7 +2,6 @@
2
2
  //#region src/locale/ca-ES.ts
3
3
  const locale = { "sheets-hyper-link-ui": {
4
4
  form: {
5
- editTitle: "Edita l'enllaç",
6
5
  addTitle: "Insereix enllaç",
7
6
  label: "Etiqueta",
8
7
  type: "Tipus",
@@ -2,7 +2,6 @@
2
2
  //#region src/locale/de-DE.ts
3
3
  const locale = { "sheets-hyper-link-ui": {
4
4
  form: {
5
- editTitle: "Link bearbeiten",
6
5
  addTitle: "Link einfügen",
7
6
  label: "Beschriftung",
8
7
  type: "Typ",
@@ -17,7 +17,6 @@
17
17
  */
18
18
  const locale = { "sheets-hyper-link-ui": {
19
19
  form: {
20
- editTitle: "Edit Link",
21
20
  addTitle: "Insert Link",
22
21
  label: "Label",
23
22
  type: "Type",
@@ -2,7 +2,6 @@
2
2
  //#region src/locale/es-ES.ts
3
3
  const locale = { "sheets-hyper-link-ui": {
4
4
  form: {
5
- editTitle: "Editar enlace",
6
5
  addTitle: "Insertar enlace",
7
6
  label: "Etiqueta",
8
7
  type: "Tipo",
@@ -2,7 +2,6 @@
2
2
  //#region src/locale/fa-IR.ts
3
3
  const locale = { "sheets-hyper-link-ui": {
4
4
  form: {
5
- editTitle: "ویرایش لینک",
6
5
  addTitle: "درج لینک",
7
6
  label: "برچسب",
8
7
  type: "نوع",
@@ -2,7 +2,6 @@
2
2
  //#region src/locale/fr-FR.ts
3
3
  const locale = { "sheets-hyper-link-ui": {
4
4
  form: {
5
- editTitle: "Modifier le lien",
6
5
  addTitle: "Insérer un lien",
7
6
  label: "Titre",
8
7
  type: "Type",
@@ -2,7 +2,6 @@
2
2
  //#region src/locale/id-ID.ts
3
3
  const locale = { "sheets-hyper-link-ui": {
4
4
  form: {
5
- editTitle: "Edit Tautan",
6
5
  addTitle: "Sisipkan Tautan",
7
6
  label: "Label",
8
7
  type: "Tipe",
@@ -2,7 +2,6 @@
2
2
  //#region src/locale/it-IT.ts
3
3
  const locale = { "sheets-hyper-link-ui": {
4
4
  form: {
5
- editTitle: "Modifica collegamento",
6
5
  addTitle: "Inserisci collegamento",
7
6
  label: "Etichetta",
8
7
  type: "Tipo",
@@ -2,7 +2,6 @@
2
2
  //#region src/locale/ja-JP.ts
3
3
  const locale = { "sheets-hyper-link-ui": {
4
4
  form: {
5
- editTitle: "リンクの編集",
6
5
  addTitle: "リンクの挿入",
7
6
  label: "表示文字列",
8
7
  type: "種類",
@@ -2,7 +2,6 @@
2
2
  //#region src/locale/ko-KR.ts
3
3
  const locale = { "sheets-hyper-link-ui": {
4
4
  form: {
5
- editTitle: "링크 편집",
6
5
  addTitle: "링크 삽입",
7
6
  label: "표시 텍스트",
8
7
  type: "유형",
@@ -2,7 +2,6 @@
2
2
  //#region src/locale/pl-PL.ts
3
3
  const locale = { "sheets-hyper-link-ui": {
4
4
  form: {
5
- editTitle: "Edytuj łącze",
6
5
  addTitle: "Wstaw łącze",
7
6
  label: "Etykieta",
8
7
  type: "Typ",
@@ -2,7 +2,6 @@
2
2
  //#region src/locale/pt-BR.ts
3
3
  const locale = { "sheets-hyper-link-ui": {
4
4
  form: {
5
- editTitle: "Editar Link",
6
5
  addTitle: "Inserir Link",
7
6
  label: "Rótulo",
8
7
  type: "Tipo",
@@ -2,7 +2,6 @@
2
2
  //#region src/locale/ru-RU.ts
3
3
  const locale = { "sheets-hyper-link-ui": {
4
4
  form: {
5
- editTitle: "Редактировать ссылку",
6
5
  addTitle: "Вставить ссылку",
7
6
  label: "Метка",
8
7
  type: "Тип",
@@ -2,7 +2,6 @@
2
2
  //#region src/locale/sk-SK.ts
3
3
  const locale = { "sheets-hyper-link-ui": {
4
4
  form: {
5
- editTitle: "Upraviť odkaz",
6
5
  addTitle: "Vložiť odkaz",
7
6
  label: "Popisok",
8
7
  type: "Typ",
@@ -2,7 +2,6 @@
2
2
  //#region src/locale/vi-VN.ts
3
3
  const locale = { "sheets-hyper-link-ui": {
4
4
  form: {
5
- editTitle: "Chỉnh sửa liên kết",
6
5
  addTitle: "Chèn liên kết",
7
6
  label: "Văn bản",
8
7
  labelPlaceholder: "Nhập văn bản",
@@ -2,7 +2,6 @@
2
2
  //#region src/locale/zh-CN.ts
3
3
  const locale = { "sheets-hyper-link-ui": {
4
4
  form: {
5
- editTitle: "编辑链接",
6
5
  addTitle: "插入链接",
7
6
  label: "文本",
8
7
  labelPlaceholder: "输入文本",
@@ -2,9 +2,8 @@
2
2
  //#region src/locale/zh-HK.ts
3
3
  const locale = { "sheets-hyper-link-ui": {
4
4
  form: {
5
- editTitle: "編輯連結",
6
5
  addTitle: "插入連結",
7
- label: "文本",
6
+ label: "文字",
8
7
  labelPlaceholder: "輸入文字",
9
8
  type: "類型",
10
9
  link: "連結",
@@ -2,9 +2,8 @@
2
2
  //#region src/locale/zh-TW.ts
3
3
  const locale = { "sheets-hyper-link-ui": {
4
4
  form: {
5
- editTitle: "編輯連結",
6
5
  addTitle: "插入連結",
7
- label: "文本",
6
+ label: "文字",
8
7
  labelPlaceholder: "輸入文字",
9
8
  type: "類型",
10
9
  link: "連結",