@univerjs/sheets-ui 0.24.0 → 0.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/facade.js +3 -2
- package/lib/cjs/index.js +435 -379
- package/lib/cjs/locale/ar-SA.js +424 -0
- package/lib/cjs/locale/ca-ES.js +51 -91
- package/lib/cjs/locale/de-DE.js +424 -0
- package/lib/cjs/locale/en-US.js +51 -91
- package/lib/cjs/locale/es-ES.js +51 -91
- package/lib/cjs/locale/fa-IR.js +51 -91
- package/lib/cjs/locale/fr-FR.js +52 -92
- package/lib/cjs/locale/id-ID.js +424 -0
- package/lib/cjs/locale/it-IT.js +424 -0
- package/lib/cjs/locale/ja-JP.js +51 -91
- package/lib/cjs/locale/ko-KR.js +51 -91
- package/lib/cjs/locale/pl-PL.js +424 -0
- package/lib/cjs/locale/pt-BR.js +424 -0
- package/lib/cjs/locale/ru-RU.js +52 -92
- package/lib/cjs/locale/sk-SK.js +51 -91
- package/lib/cjs/locale/vi-VN.js +53 -93
- package/lib/cjs/locale/zh-CN.js +53 -93
- package/lib/cjs/locale/zh-HK.js +424 -0
- package/lib/cjs/locale/zh-TW.js +53 -93
- package/lib/es/facade.js +3 -2
- package/lib/es/index.js +438 -382
- package/lib/es/locale/ar-SA.js +423 -0
- package/lib/es/locale/ca-ES.js +51 -91
- package/lib/es/locale/de-DE.js +423 -0
- package/lib/es/locale/en-US.js +51 -91
- package/lib/es/locale/es-ES.js +51 -91
- package/lib/es/locale/fa-IR.js +51 -91
- package/lib/es/locale/fr-FR.js +52 -92
- package/lib/es/locale/id-ID.js +423 -0
- package/lib/es/locale/it-IT.js +423 -0
- package/lib/es/locale/ja-JP.js +51 -91
- package/lib/es/locale/ko-KR.js +51 -91
- package/lib/es/locale/pl-PL.js +423 -0
- package/lib/es/locale/pt-BR.js +423 -0
- package/lib/es/locale/ru-RU.js +52 -92
- package/lib/es/locale/sk-SK.js +51 -91
- package/lib/es/locale/vi-VN.js +53 -93
- package/lib/es/locale/zh-CN.js +53 -93
- package/lib/es/locale/zh-HK.js +423 -0
- package/lib/es/locale/zh-TW.js +53 -93
- package/lib/facade.js +3 -2
- package/lib/index.css +0 -5
- package/lib/index.js +438 -382
- package/lib/locale/ar-SA.js +423 -0
- package/lib/locale/ca-ES.js +51 -91
- package/lib/locale/de-DE.js +423 -0
- package/lib/locale/en-US.js +51 -91
- package/lib/locale/es-ES.js +51 -91
- package/lib/locale/fa-IR.js +51 -91
- package/lib/locale/fr-FR.js +52 -92
- package/lib/locale/id-ID.js +423 -0
- package/lib/locale/it-IT.js +423 -0
- package/lib/locale/ja-JP.js +51 -91
- package/lib/locale/ko-KR.js +51 -91
- package/lib/locale/pl-PL.js +423 -0
- package/lib/locale/pt-BR.js +423 -0
- package/lib/locale/ru-RU.js +52 -92
- package/lib/locale/sk-SK.js +51 -91
- package/lib/locale/vi-VN.js +53 -93
- package/lib/locale/zh-CN.js +53 -93
- package/lib/locale/zh-HK.js +423 -0
- package/lib/locale/zh-TW.js +53 -93
- package/lib/types/facade/f-range.d.ts +16 -8
- package/lib/types/facade/f-workbook.d.ts +2 -1
- package/lib/types/facade/f-worksheet.d.ts +32 -16
- 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 +406 -442
- 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/types/views/dropdown/list-dropdown/utils.d.ts +16 -0
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +10 -7
- 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 +15 -15
package/lib/cjs/index.js
CHANGED
|
@@ -214,7 +214,7 @@ let SHEET_VIEW_KEY = /* @__PURE__ */ function(SHEET_VIEW_KEY) {
|
|
|
214
214
|
}({});
|
|
215
215
|
|
|
216
216
|
//#endregion
|
|
217
|
-
//#region \0@oxc-project+runtime@0.
|
|
217
|
+
//#region \0@oxc-project+runtime@0.133.0/helpers/esm/typeof.js
|
|
218
218
|
function _typeof(o) {
|
|
219
219
|
"@babel/helpers - typeof";
|
|
220
220
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
@@ -225,7 +225,7 @@ function _typeof(o) {
|
|
|
225
225
|
}
|
|
226
226
|
|
|
227
227
|
//#endregion
|
|
228
|
-
//#region \0@oxc-project+runtime@0.
|
|
228
|
+
//#region \0@oxc-project+runtime@0.133.0/helpers/esm/toPrimitive.js
|
|
229
229
|
function toPrimitive(t, r) {
|
|
230
230
|
if ("object" != _typeof(t) || !t) return t;
|
|
231
231
|
var e = t[Symbol.toPrimitive];
|
|
@@ -238,14 +238,14 @@ function toPrimitive(t, r) {
|
|
|
238
238
|
}
|
|
239
239
|
|
|
240
240
|
//#endregion
|
|
241
|
-
//#region \0@oxc-project+runtime@0.
|
|
241
|
+
//#region \0@oxc-project+runtime@0.133.0/helpers/esm/toPropertyKey.js
|
|
242
242
|
function toPropertyKey(t) {
|
|
243
243
|
var i = toPrimitive(t, "string");
|
|
244
244
|
return "symbol" == _typeof(i) ? i : i + "";
|
|
245
245
|
}
|
|
246
246
|
|
|
247
247
|
//#endregion
|
|
248
|
-
//#region \0@oxc-project+runtime@0.
|
|
248
|
+
//#region \0@oxc-project+runtime@0.133.0/helpers/esm/defineProperty.js
|
|
249
249
|
function _defineProperty(e, r, t) {
|
|
250
250
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
251
251
|
value: t,
|
|
@@ -995,7 +995,7 @@ function genSelectionByRange(skeleton, range) {
|
|
|
995
995
|
}
|
|
996
996
|
|
|
997
997
|
//#endregion
|
|
998
|
-
//#region \0@oxc-project+runtime@0.
|
|
998
|
+
//#region \0@oxc-project+runtime@0.133.0/helpers/esm/decorateParam.js
|
|
999
999
|
function __decorateParam(paramIndex, decorator) {
|
|
1000
1000
|
return function(target, key) {
|
|
1001
1001
|
decorator(target, key, paramIndex);
|
|
@@ -1003,7 +1003,7 @@ function __decorateParam(paramIndex, decorator) {
|
|
|
1003
1003
|
}
|
|
1004
1004
|
|
|
1005
1005
|
//#endregion
|
|
1006
|
-
//#region \0@oxc-project+runtime@0.
|
|
1006
|
+
//#region \0@oxc-project+runtime@0.133.0/helpers/esm/decorate.js
|
|
1007
1007
|
function __decorate(decorators, target, key, desc) {
|
|
1008
1008
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1009
1009
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -3460,13 +3460,15 @@ var HtmlToUSMService = class HtmlToUSMService {
|
|
|
3460
3460
|
const element = node;
|
|
3461
3461
|
if (element.tagName.toUpperCase() === "A") {
|
|
3462
3462
|
var _body$customRanges, _element$dataset$rang;
|
|
3463
|
+
const href = element.href;
|
|
3464
|
+
if (!(0, _univerjs_core.isSafeUrl)(href)) return;
|
|
3463
3465
|
body.customRanges = (_body$customRanges = body.customRanges) !== null && _body$customRanges !== void 0 ? _body$customRanges : [];
|
|
3464
3466
|
body.customRanges.push({
|
|
3465
3467
|
startIndex: start,
|
|
3466
3468
|
endIndex: body.dataStream.length - 1,
|
|
3467
3469
|
rangeId: (_element$dataset$rang = element.dataset.rangeid) !== null && _element$dataset$rang !== void 0 ? _element$dataset$rang : (0, _univerjs_core.generateRandomId)(),
|
|
3468
3470
|
rangeType: _univerjs_core.CustomRangeType.HYPERLINK,
|
|
3469
|
-
properties: { url:
|
|
3471
|
+
properties: { url: href }
|
|
3470
3472
|
});
|
|
3471
3473
|
}
|
|
3472
3474
|
}
|
|
@@ -4112,8 +4114,8 @@ let SheetClipboardService = class SheetClipboardService extends _univerjs_core.D
|
|
|
4112
4114
|
if (html && shouldUseHTMLPaste) {
|
|
4113
4115
|
if (this._platformService.isWindows && htmlIsFromExcel(html)) this._notificationService.show({
|
|
4114
4116
|
type: "warning",
|
|
4115
|
-
title: this._localeService.t("clipboard.shortCutNotify.title"),
|
|
4116
|
-
content: this._localeService.t("clipboard.shortCutNotify.useShortCutInstead")
|
|
4117
|
+
title: this._localeService.t("sheets-ui.clipboard.shortCutNotify.title"),
|
|
4118
|
+
content: this._localeService.t("sheets-ui.clipboard.shortCutNotify.useShortCutInstead")
|
|
4117
4119
|
});
|
|
4118
4120
|
return this._pasteHTML(html, pasteType);
|
|
4119
4121
|
}
|
|
@@ -4327,7 +4329,7 @@ let SheetClipboardService = class SheetClipboardService extends _univerjs_core.D
|
|
|
4327
4329
|
if (mergeData.some((m) => {
|
|
4328
4330
|
return rangeIntersectWithDiscreteRange(m, pasteTarget.pastedRange) && !discreteRangeContainsRange(pasteTarget.pastedRange, m);
|
|
4329
4331
|
})) {
|
|
4330
|
-
this._errorService.emit(this._localeService.t("clipboard.paste.overlappingMergedCells"));
|
|
4332
|
+
this._errorService.emit(this._localeService.t("sheets-ui.clipboard.paste.overlappingMergedCells"));
|
|
4331
4333
|
return false;
|
|
4332
4334
|
}
|
|
4333
4335
|
}
|
|
@@ -4373,7 +4375,7 @@ let SheetClipboardService = class SheetClipboardService extends _univerjs_core.D
|
|
|
4373
4375
|
if (mergeData.some((m) => {
|
|
4374
4376
|
return rangeIntersectWithDiscreteRange(m, pasteTarget.pastedRange) && !discreteRangeContainsRange(pasteTarget.pastedRange, m);
|
|
4375
4377
|
})) {
|
|
4376
|
-
this._errorService.emit(this._localeService.t("clipboard.paste.overlappingMergedCells"));
|
|
4378
|
+
this._errorService.emit(this._localeService.t("sheets-ui.clipboard.paste.overlappingMergedCells"));
|
|
4377
4379
|
return false;
|
|
4378
4380
|
}
|
|
4379
4381
|
}
|
|
@@ -5037,10 +5039,10 @@ const DeleteRangeMoveLeftConfirmCommand = {
|
|
|
5037
5039
|
})) return commandService.executeCommand(_univerjs_sheets.DeleteRangeMoveLeftCommand.id);
|
|
5038
5040
|
if (await confirmService.confirm({
|
|
5039
5041
|
id: DeleteRangeMoveLeftConfirmCommand.id,
|
|
5040
|
-
title: { title: localeService.t("merge.confirm.warning") },
|
|
5041
|
-
children: { title: localeService.t("merge.confirm.dismantleMergeCellWarning") },
|
|
5042
|
-
cancelText: localeService.t("button.cancel"),
|
|
5043
|
-
confirmText: localeService.t("button.confirm")
|
|
5042
|
+
title: { title: localeService.t("sheets-ui.merge.confirm.warning") },
|
|
5043
|
+
children: { title: localeService.t("sheets-ui.merge.confirm.dismantleMergeCellWarning") },
|
|
5044
|
+
cancelText: localeService.t("sheets-ui.button.cancel"),
|
|
5045
|
+
confirmText: localeService.t("sheets-ui.button.confirm")
|
|
5044
5046
|
})) return commandService.executeCommand(_univerjs_sheets.DeleteRangeMoveLeftCommand.id);
|
|
5045
5047
|
return true;
|
|
5046
5048
|
}
|
|
@@ -5071,9 +5073,9 @@ const DeleteRangeMoveUpConfirmCommand = {
|
|
|
5071
5073
|
for (let i = range.startRow; i <= range.endRow; i++) if (worksheet.getRowFiltered(i)) {
|
|
5072
5074
|
if (await confirmService.confirm({
|
|
5073
5075
|
id: DeleteRangeMoveUpConfirmCommand.id,
|
|
5074
|
-
title: { title: localeService.t("filter.confirm.error") },
|
|
5075
|
-
children: { title: localeService.t("filter.confirm.notAllowedToInsertRange") },
|
|
5076
|
-
confirmText: localeService.t("button.confirm")
|
|
5076
|
+
title: { title: localeService.t("sheets-ui.filter.confirm.error") },
|
|
5077
|
+
children: { title: localeService.t("sheets-ui.filter.confirm.notAllowedToInsertRange") },
|
|
5078
|
+
confirmText: localeService.t("sheets-ui.button.confirm")
|
|
5077
5079
|
})) return false;
|
|
5078
5080
|
}
|
|
5079
5081
|
const getColLength = (range) => range.endColumn - range.startColumn;
|
|
@@ -5083,10 +5085,10 @@ const DeleteRangeMoveUpConfirmCommand = {
|
|
|
5083
5085
|
})) return commandService.executeCommand(_univerjs_sheets.DeleteRangeMoveUpCommand.id);
|
|
5084
5086
|
if (await confirmService.confirm({
|
|
5085
5087
|
id: DeleteRangeMoveUpConfirmCommand.id,
|
|
5086
|
-
title: { title: localeService.t("merge.confirm.warning") },
|
|
5087
|
-
children: { title: localeService.t("merge.confirm.dismantleMergeCellWarning") },
|
|
5088
|
-
cancelText: localeService.t("button.cancel"),
|
|
5089
|
-
confirmText: localeService.t("button.confirm")
|
|
5088
|
+
title: { title: localeService.t("sheets-ui.merge.confirm.warning") },
|
|
5089
|
+
children: { title: localeService.t("sheets-ui.merge.confirm.dismantleMergeCellWarning") },
|
|
5090
|
+
cancelText: localeService.t("sheets-ui.button.cancel"),
|
|
5091
|
+
confirmText: localeService.t("sheets-ui.button.confirm")
|
|
5090
5092
|
})) return commandService.executeCommand(_univerjs_sheets.DeleteRangeMoveUpCommand.id);
|
|
5091
5093
|
return true;
|
|
5092
5094
|
}
|
|
@@ -5518,10 +5520,10 @@ const HideRowConfirmCommand = {
|
|
|
5518
5520
|
const localeService = accessor.get(_univerjs_core.LocaleService);
|
|
5519
5521
|
await confirmService.confirm({
|
|
5520
5522
|
id: "sheet.confirm.hide-row",
|
|
5521
|
-
title: { title: localeService.t("info.problem") },
|
|
5522
|
-
children: { title: localeService.t("rightClick.hideAllRowsAlert") },
|
|
5523
|
-
cancelText: localeService.t("button.cancel"),
|
|
5524
|
-
confirmText: localeService.t("button.confirm")
|
|
5523
|
+
title: { title: localeService.t("sheets-ui.info.problem") },
|
|
5524
|
+
children: { title: localeService.t("sheets-ui.rightClick.hideAllRowsAlert") },
|
|
5525
|
+
cancelText: localeService.t("sheets-ui.button.cancel"),
|
|
5526
|
+
confirmText: localeService.t("sheets-ui.button.confirm")
|
|
5525
5527
|
});
|
|
5526
5528
|
return false;
|
|
5527
5529
|
}
|
|
@@ -5545,10 +5547,10 @@ const HideColConfirmCommand = {
|
|
|
5545
5547
|
const localeService = accessor.get(_univerjs_core.LocaleService);
|
|
5546
5548
|
await confirmService.confirm({
|
|
5547
5549
|
id: "sheet.confirm.hide-col",
|
|
5548
|
-
title: { title: localeService.t("info.problem") },
|
|
5549
|
-
children: { title: localeService.t("rightClick.hideAllColumnsAlert") },
|
|
5550
|
-
cancelText: localeService.t("button.cancel"),
|
|
5551
|
-
confirmText: localeService.t("button.confirm")
|
|
5550
|
+
title: { title: localeService.t("sheets-ui.info.problem") },
|
|
5551
|
+
children: { title: localeService.t("sheets-ui.rightClick.hideAllColumnsAlert") },
|
|
5552
|
+
cancelText: localeService.t("sheets-ui.button.cancel"),
|
|
5553
|
+
confirmText: localeService.t("sheets-ui.button.confirm")
|
|
5552
5554
|
});
|
|
5553
5555
|
return false;
|
|
5554
5556
|
}
|
|
@@ -5761,9 +5763,9 @@ const InsertRangeMoveDownConfirmCommand = {
|
|
|
5761
5763
|
for (let i = range.startRow; i <= range.endRow; i++) if (worksheet.getRowFiltered(i)) {
|
|
5762
5764
|
if (await confirmService.confirm({
|
|
5763
5765
|
id: InsertRangeMoveDownConfirmCommand.id,
|
|
5764
|
-
title: { title: localeService.t("filter.confirm.error") },
|
|
5765
|
-
children: { title: localeService.t("filter.confirm.notAllowedToInsertRange") },
|
|
5766
|
-
confirmText: localeService.t("button.confirm")
|
|
5766
|
+
title: { title: localeService.t("sheets-ui.filter.confirm.error") },
|
|
5767
|
+
children: { title: localeService.t("sheets-ui.filter.confirm.notAllowedToInsertRange") },
|
|
5768
|
+
confirmText: localeService.t("sheets-ui.button.confirm")
|
|
5767
5769
|
})) return false;
|
|
5768
5770
|
}
|
|
5769
5771
|
const getColLength = (range) => range.endColumn - range.startColumn;
|
|
@@ -5773,10 +5775,10 @@ const InsertRangeMoveDownConfirmCommand = {
|
|
|
5773
5775
|
})) return commandService.executeCommand(_univerjs_sheets.InsertRangeMoveDownCommand.id);
|
|
5774
5776
|
if (await confirmService.confirm({
|
|
5775
5777
|
id: InsertRangeMoveDownConfirmCommand.id,
|
|
5776
|
-
title: { title: localeService.t("merge.confirm.warning") },
|
|
5777
|
-
children: { title: localeService.t("merge.confirm.dismantleMergeCellWarning") },
|
|
5778
|
-
cancelText: localeService.t("button.cancel"),
|
|
5779
|
-
confirmText: localeService.t("button.confirm")
|
|
5778
|
+
title: { title: localeService.t("sheets-ui.merge.confirm.warning") },
|
|
5779
|
+
children: { title: localeService.t("sheets-ui.merge.confirm.dismantleMergeCellWarning") },
|
|
5780
|
+
cancelText: localeService.t("sheets-ui.button.cancel"),
|
|
5781
|
+
confirmText: localeService.t("sheets-ui.button.confirm")
|
|
5780
5782
|
})) return commandService.executeCommand(_univerjs_sheets.InsertRangeMoveDownCommand.id);
|
|
5781
5783
|
return true;
|
|
5782
5784
|
}
|
|
@@ -5811,10 +5813,10 @@ const InsertRangeMoveRightConfirmCommand = {
|
|
|
5811
5813
|
})) return commandService.executeCommand(_univerjs_sheets.InsertRangeMoveRightCommand.id);
|
|
5812
5814
|
if (await confirmService.confirm({
|
|
5813
5815
|
id: InsertRangeMoveRightConfirmCommand.id,
|
|
5814
|
-
title: { title: localeService.t("merge.confirm.warning") },
|
|
5815
|
-
children: { title: localeService.t("merge.confirm.dismantleMergeCellWarning") },
|
|
5816
|
-
cancelText: localeService.t("button.cancel"),
|
|
5817
|
-
confirmText: localeService.t("button.confirm")
|
|
5816
|
+
title: { title: localeService.t("sheets-ui.merge.confirm.warning") },
|
|
5817
|
+
children: { title: localeService.t("sheets-ui.merge.confirm.dismantleMergeCellWarning") },
|
|
5818
|
+
cancelText: localeService.t("sheets-ui.button.cancel"),
|
|
5819
|
+
confirmText: localeService.t("sheets-ui.button.confirm")
|
|
5818
5820
|
})) return commandService.executeCommand(_univerjs_sheets.InsertRangeMoveRightCommand.id);
|
|
5819
5821
|
return true;
|
|
5820
5822
|
}
|
|
@@ -5961,7 +5963,7 @@ const SheetPermissionOpenPanelOperation = {
|
|
|
5961
5963
|
const sheetPermissionUserManagerService = accessor.get(SheetPermissionUserManagerService);
|
|
5962
5964
|
const { showDetail = true, fromSheetBar = false, rule, oldRule } = _params;
|
|
5963
5965
|
const sidebarProps = {
|
|
5964
|
-
header: { title: "permission.panel.title" },
|
|
5966
|
+
header: { title: "sheets-ui.permission.panel.title" },
|
|
5965
5967
|
children: {
|
|
5966
5968
|
label: UNIVER_SHEET_PERMISSION_PANEL,
|
|
5967
5969
|
showDetail,
|
|
@@ -6151,10 +6153,10 @@ const RemoveRowConfirmCommand = {
|
|
|
6151
6153
|
const localeService = accessor.get(_univerjs_core.LocaleService);
|
|
6152
6154
|
await confirmService.confirm({
|
|
6153
6155
|
id: "sheet.confirm.remove-row",
|
|
6154
|
-
title: { title: localeService.t("info.problem") },
|
|
6155
|
-
children: { title: localeService.t("rightClick.deleteAllRowsAlert") },
|
|
6156
|
-
cancelText: localeService.t("button.cancel"),
|
|
6157
|
-
confirmText: localeService.t("button.confirm")
|
|
6156
|
+
title: { title: localeService.t("sheets-ui.info.problem") },
|
|
6157
|
+
children: { title: localeService.t("sheets-ui.rightClick.deleteAllRowsAlert") },
|
|
6158
|
+
cancelText: localeService.t("sheets-ui.button.cancel"),
|
|
6159
|
+
confirmText: localeService.t("sheets-ui.button.confirm")
|
|
6158
6160
|
});
|
|
6159
6161
|
return false;
|
|
6160
6162
|
}
|
|
@@ -6182,10 +6184,10 @@ const RemoveColConfirmCommand = {
|
|
|
6182
6184
|
const localeService = accessor.get(_univerjs_core.LocaleService);
|
|
6183
6185
|
await confirmService.confirm({
|
|
6184
6186
|
id: "sheet.confirm.remove-col",
|
|
6185
|
-
title: { title: localeService.t("info.problem") },
|
|
6186
|
-
children: { title: localeService.t("rightClick.deleteAllColumnsAlert") },
|
|
6187
|
-
cancelText: localeService.t("button.cancel"),
|
|
6188
|
-
confirmText: localeService.t("button.confirm")
|
|
6187
|
+
title: { title: localeService.t("sheets-ui.info.problem") },
|
|
6188
|
+
children: { title: localeService.t("sheets-ui.rightClick.deleteAllColumnsAlert") },
|
|
6189
|
+
cancelText: localeService.t("sheets-ui.button.cancel"),
|
|
6190
|
+
confirmText: localeService.t("sheets-ui.button.confirm")
|
|
6189
6191
|
});
|
|
6190
6192
|
return false;
|
|
6191
6193
|
}
|
|
@@ -6216,10 +6218,10 @@ const RemoveSheetConfirmCommand = {
|
|
|
6216
6218
|
const isLargeSheet = (0, _univerjs_sheets.countCells)(worksheet.getCellMatrix()) >= largeSheetConfig.largeSheetCellCountThreshold;
|
|
6217
6219
|
if (!await confirmService.confirm({
|
|
6218
6220
|
id: "sheet.confirm.remove-sheet",
|
|
6219
|
-
title: { title: localeService.t("sheetConfig.deleteSheet") },
|
|
6220
|
-
children: { title: isLargeSheet ? localeService.t("sheetConfig.deleteLargeSheetContent") : localeService.t("sheetConfig.deleteSheetContent") },
|
|
6221
|
-
cancelText: localeService.t("button.cancel"),
|
|
6222
|
-
confirmText: localeService.t("button.confirm")
|
|
6221
|
+
title: { title: localeService.t("sheets-ui.sheetConfig.deleteSheet") },
|
|
6222
|
+
children: { title: isLargeSheet ? localeService.t("sheets-ui.sheetConfig.deleteLargeSheetContent") : localeService.t("sheets-ui.sheetConfig.deleteSheetContent") },
|
|
6223
|
+
cancelText: localeService.t("sheets-ui.button.cancel"),
|
|
6224
|
+
confirmText: localeService.t("sheets-ui.button.confirm")
|
|
6223
6225
|
})) return false;
|
|
6224
6226
|
await commandService.executeCommand(_univerjs_sheets.RemoveSheetCommand.id, { subUnitId });
|
|
6225
6227
|
return true;
|
|
@@ -7075,6 +7077,7 @@ function getTransformCoord(evtOffsetX, evtOffsetY, scene, skeleton) {
|
|
|
7075
7077
|
//#endregion
|
|
7076
7078
|
//#region src/controllers/render-controllers/scroll.render-controller.ts
|
|
7077
7079
|
const MOUSE_WHEEL_SPEED_SMOOTHING_FACTOR = 3;
|
|
7080
|
+
const WHEEL_CROSS_AXIS_LOCK_RATIO = 2;
|
|
7078
7081
|
let SheetsScrollRenderController = class SheetsScrollRenderController extends _univerjs_core.Disposable {
|
|
7079
7082
|
constructor(_context, _injector, _sheetSkeletonManagerService, _contextService, _commandService, _renderManagerService, _scrollManagerService) {
|
|
7080
7083
|
super();
|
|
@@ -7099,15 +7102,26 @@ let SheetsScrollRenderController = class SheetsScrollRenderController extends _u
|
|
|
7099
7102
|
if (evt.ctrlKey || !this._contextService.getContextValue(_univerjs_core.FOCUSING_SHEET)) return;
|
|
7100
7103
|
let offsetX = 0;
|
|
7101
7104
|
let offsetY = 0;
|
|
7102
|
-
|
|
7103
|
-
|
|
7104
|
-
|
|
7105
|
+
const scaleX = Math.abs(scene.scaleX) || 1;
|
|
7106
|
+
const scaleY = Math.abs(scene.scaleY) || 1;
|
|
7107
|
+
offsetX = evt.deltaX / scaleX;
|
|
7108
|
+
if (evt.shiftKey) offsetX = (evt.deltaY || evt.deltaX) * MOUSE_WHEEL_SPEED_SMOOTHING_FACTOR / scaleX;
|
|
7109
|
+
else {
|
|
7110
|
+
offsetY = evt.deltaY / scaleY;
|
|
7111
|
+
const absOffsetX = Math.abs(offsetX);
|
|
7112
|
+
const absOffsetY = Math.abs(offsetY);
|
|
7113
|
+
if (absOffsetY >= absOffsetX * WHEEL_CROSS_AXIS_LOCK_RATIO) offsetX = 0;
|
|
7114
|
+
else if (absOffsetX >= absOffsetY * WHEEL_CROSS_AXIS_LOCK_RATIO) offsetY = 0;
|
|
7115
|
+
}
|
|
7116
|
+
const targetViewportScrollX = viewMain.viewportScrollX + offsetX;
|
|
7117
|
+
const targetViewportScrollY = viewMain.viewportScrollY + offsetY;
|
|
7118
|
+
const { x: targetScrollX, y: targetScrollY } = viewMain.transViewportScroll2ScrollValue(targetViewportScrollX, targetViewportScrollY);
|
|
7105
7119
|
this._commandService.executeCommand(SetScrollRelativeCommand.id, {
|
|
7106
7120
|
offsetX,
|
|
7107
7121
|
offsetY
|
|
7108
7122
|
});
|
|
7109
7123
|
this._context.scene.makeDirty(true);
|
|
7110
|
-
const isLimitedStore = viewMain.limitedScroll(
|
|
7124
|
+
const isLimitedStore = viewMain.limitedScroll(targetScrollX, targetScrollY);
|
|
7111
7125
|
if (isLimitedStore && !isLimitedStore.isLimitedX && !isLimitedStore.isLimitedY) {
|
|
7112
7126
|
evt.preventDefault();
|
|
7113
7127
|
if (scene.getParent().classType === _univerjs_engine_render.RENDER_CLASS_TYPE.SCENE_VIEWER) state.stopPropagation();
|
|
@@ -7992,18 +8006,12 @@ let SheetsZoomRenderController = class SheetsZoomRenderController extends _unive
|
|
|
7992
8006
|
const state = this._editorBridgeService.isVisible();
|
|
7993
8007
|
if ((state.unitId === this._context.unitId || state.unitId === _univerjs_core.DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY) && state.visible) return;
|
|
7994
8008
|
}
|
|
7995
|
-
const deltaFactor = Math.abs(e.deltaX);
|
|
7996
|
-
let ratioDelta = deltaFactor < 40 ? .2 : deltaFactor < 80 ? .4 : .2;
|
|
7997
|
-
ratioDelta *= e.deltaY > 0 ? -1 : 1;
|
|
7998
|
-
if (scene.scaleX < 1) ratioDelta /= 2;
|
|
7999
8009
|
const workbook = this._context.unit;
|
|
8000
8010
|
const sheet = workbook.getActiveSheet();
|
|
8001
8011
|
if (!sheet) return;
|
|
8002
|
-
const
|
|
8003
|
-
let nextRatio = +Number.parseFloat(`${currentRatio + ratioDelta}`).toFixed(1);
|
|
8004
|
-
nextRatio = nextRatio >= 4 ? 4 : nextRatio <= .1 ? .1 : nextRatio;
|
|
8012
|
+
const nextRatio = (0, _univerjs_engine_render.getNextWheelZoomRatio)(sheet.getZoomRatio(), e);
|
|
8005
8013
|
this._commandService.executeCommand(SetZoomRatioCommand.id, {
|
|
8006
|
-
zoomRatio:
|
|
8014
|
+
zoomRatio: nextRatio,
|
|
8007
8015
|
unitId: workbook.getUnitId(),
|
|
8008
8016
|
subUnitId: sheet.getSheetId()
|
|
8009
8017
|
});
|
|
@@ -8324,7 +8332,7 @@ const SheetPermissionOpenDialogOperation = {
|
|
|
8324
8332
|
dialogService.close("DESKTOP_FIND_REPLACE_DIALOG");
|
|
8325
8333
|
dialogService.open({
|
|
8326
8334
|
id: UNIVER_SHEET_PERMISSION_DIALOG_ID,
|
|
8327
|
-
title: { title: "permission.dialog.allowedPermissionType" },
|
|
8335
|
+
title: { title: "sheets-ui.permission.dialog.allowedPermissionType" },
|
|
8328
8336
|
children: { label: UNIVER_SHEET_PERMISSION_DIALOG },
|
|
8329
8337
|
width: 393,
|
|
8330
8338
|
destroyOnClose: true,
|
|
@@ -8369,7 +8377,7 @@ const SidebarDefinedNameOperation = {
|
|
|
8369
8377
|
case "open":
|
|
8370
8378
|
sidebarService.open({
|
|
8371
8379
|
id: DEFINED_NAME_CONTAINER,
|
|
8372
|
-
header: { title: localeService.t("definedName.featureTitle") },
|
|
8380
|
+
header: { title: localeService.t("sheets-ui.definedName.featureTitle") },
|
|
8373
8381
|
children: { label: DEFINED_NAME_CONTAINER },
|
|
8374
8382
|
onClose: () => {},
|
|
8375
8383
|
width: 333,
|
|
@@ -9081,23 +9089,23 @@ const DEFAULT_PADDING = 2;
|
|
|
9081
9089
|
const SheetPasteOptions = [
|
|
9082
9090
|
{
|
|
9083
9091
|
value: "DEFAULT_PASTE",
|
|
9084
|
-
label: "rightClick.paste"
|
|
9092
|
+
label: "sheets-ui.rightClick.paste"
|
|
9085
9093
|
},
|
|
9086
9094
|
{
|
|
9087
9095
|
value: "SPECIAL_PASTE_VALUE",
|
|
9088
|
-
label: "rightClick.pasteValue"
|
|
9096
|
+
label: "sheets-ui.rightClick.pasteValue"
|
|
9089
9097
|
},
|
|
9090
9098
|
{
|
|
9091
9099
|
value: "SPECIAL_PASTE_FORMAT",
|
|
9092
|
-
label: "rightClick.pasteFormat"
|
|
9100
|
+
label: "sheets-ui.rightClick.pasteFormat"
|
|
9093
9101
|
},
|
|
9094
9102
|
{
|
|
9095
9103
|
value: "SPECIAL_PASTE_COL_WIDTH",
|
|
9096
|
-
label: "rightClick.pasteColWidth"
|
|
9104
|
+
label: "sheets-ui.rightClick.pasteColWidth"
|
|
9097
9105
|
},
|
|
9098
9106
|
{
|
|
9099
9107
|
value: "SPECIAL_PASTE_BESIDES_BORDER",
|
|
9100
|
-
label: "rightClick.pasteBesidesBorder"
|
|
9108
|
+
label: "sheets-ui.rightClick.pasteBesidesBorder"
|
|
9101
9109
|
},
|
|
9102
9110
|
{
|
|
9103
9111
|
value: "SPECIAL_PASTE_FORMULA",
|
|
@@ -9881,7 +9889,7 @@ const permissionCheckMap = {
|
|
|
9881
9889
|
worksheetTypes: [_univerjs_sheets.WorksheetEditPermission],
|
|
9882
9890
|
rangeTypes: [_univerjs_sheets.RangeProtectionPermissionEditPoint]
|
|
9883
9891
|
},
|
|
9884
|
-
errorMessageKey: "permission.dialog.editErr"
|
|
9892
|
+
errorMessageKey: "sheets-ui.permission.dialog.editErr"
|
|
9885
9893
|
},
|
|
9886
9894
|
["cellStyle"]: {
|
|
9887
9895
|
permissionTypes: {
|
|
@@ -9889,7 +9897,7 @@ const permissionCheckMap = {
|
|
|
9889
9897
|
worksheetTypes: [_univerjs_sheets.WorksheetEditPermission, _univerjs_sheets.WorksheetSetCellStylePermission],
|
|
9890
9898
|
rangeTypes: [_univerjs_sheets.RangeProtectionPermissionEditPoint]
|
|
9891
9899
|
},
|
|
9892
|
-
errorMessageKey: "permission.dialog.setStyleErr"
|
|
9900
|
+
errorMessageKey: "sheets-ui.permission.dialog.setStyleErr"
|
|
9893
9901
|
},
|
|
9894
9902
|
["cellValue"]: {
|
|
9895
9903
|
permissionTypes: {
|
|
@@ -9897,7 +9905,7 @@ const permissionCheckMap = {
|
|
|
9897
9905
|
worksheetTypes: [_univerjs_sheets.WorksheetEditPermission, _univerjs_sheets.WorksheetSetCellValuePermission],
|
|
9898
9906
|
rangeTypes: [_univerjs_sheets.RangeProtectionPermissionEditPoint]
|
|
9899
9907
|
},
|
|
9900
|
-
errorMessageKey: "permission.dialog.editErr"
|
|
9908
|
+
errorMessageKey: "sheets-ui.permission.dialog.editErr"
|
|
9901
9909
|
},
|
|
9902
9910
|
["rowStyle"]: {
|
|
9903
9911
|
permissionTypes: {
|
|
@@ -9905,7 +9913,7 @@ const permissionCheckMap = {
|
|
|
9905
9913
|
worksheetTypes: [_univerjs_sheets.WorksheetEditPermission, _univerjs_sheets.WorksheetSetRowStylePermission],
|
|
9906
9914
|
rangeTypes: [_univerjs_sheets.RangeProtectionPermissionEditPoint]
|
|
9907
9915
|
},
|
|
9908
|
-
errorMessageKey: "permission.dialog.setRowColStyleErr"
|
|
9916
|
+
errorMessageKey: "sheets-ui.permission.dialog.setRowColStyleErr"
|
|
9909
9917
|
},
|
|
9910
9918
|
["columnStyle"]: {
|
|
9911
9919
|
permissionTypes: {
|
|
@@ -9913,7 +9921,7 @@ const permissionCheckMap = {
|
|
|
9913
9921
|
worksheetTypes: [_univerjs_sheets.WorksheetEditPermission, _univerjs_sheets.WorksheetSetColumnStylePermission],
|
|
9914
9922
|
rangeTypes: [_univerjs_sheets.RangeProtectionPermissionEditPoint]
|
|
9915
9923
|
},
|
|
9916
|
-
errorMessageKey: "permission.dialog.setRowColStyleErr"
|
|
9924
|
+
errorMessageKey: "sheets-ui.permission.dialog.setRowColStyleErr"
|
|
9917
9925
|
}
|
|
9918
9926
|
};
|
|
9919
9927
|
const RepeatLastActionCommand = {
|
|
@@ -9990,8 +9998,9 @@ function generateArrowSelectionShortCutItem() {
|
|
|
9990
9998
|
const StartEditWithF2Shortcut = {
|
|
9991
9999
|
id: SetCellEditVisibleWithF2Operation.id,
|
|
9992
10000
|
binding: _univerjs_ui.KeyCode.F2,
|
|
9993
|
-
description: "shortcut.sheet.start-editing",
|
|
10001
|
+
description: "sheets-ui.shortcut.sheet.start-editing",
|
|
9994
10002
|
group: "4_sheet-edit",
|
|
10003
|
+
groupTitle: "sheets-ui.shortcut.sheet-edit",
|
|
9995
10004
|
preconditions: whenSheetEditorFocused,
|
|
9996
10005
|
staticParameters: {
|
|
9997
10006
|
visible: true,
|
|
@@ -10002,15 +10011,17 @@ const StartEditWithF2Shortcut = {
|
|
|
10002
10011
|
const RepeatLastActionShortcut = {
|
|
10003
10012
|
id: RepeatLastActionCommand.id,
|
|
10004
10013
|
binding: _univerjs_ui.KeyCode.F4,
|
|
10005
|
-
description: "shortcut.sheet.repeat-last-action",
|
|
10014
|
+
description: "sheets-ui.shortcut.sheet.repeat-last-action",
|
|
10006
10015
|
group: "4_sheet-edit",
|
|
10016
|
+
groupTitle: "sheets-ui.shortcut.sheet-edit",
|
|
10007
10017
|
preconditions: whenSheetEditorFocused
|
|
10008
10018
|
};
|
|
10009
10019
|
const EditorCursorEnterShortcut = {
|
|
10010
10020
|
id: SetCellEditVisibleOperation.id,
|
|
10011
10021
|
binding: _univerjs_ui.KeyCode.ENTER,
|
|
10012
|
-
description: "shortcut.sheet.toggle-editing",
|
|
10022
|
+
description: "sheets-ui.shortcut.sheet.toggle-editing",
|
|
10013
10023
|
group: "4_sheet-edit",
|
|
10024
|
+
groupTitle: "sheets-ui.shortcut.sheet-edit",
|
|
10014
10025
|
preconditions: (contextService) => whenEditorDidNotInputFormulaActivated(contextService),
|
|
10015
10026
|
staticParameters: {
|
|
10016
10027
|
visible: false,
|
|
@@ -10031,8 +10042,9 @@ const EditorCursorTabShortcut = {
|
|
|
10031
10042
|
const EditorCursorEscShortcut = {
|
|
10032
10043
|
id: SetCellEditVisibleOperation.id,
|
|
10033
10044
|
binding: _univerjs_ui.KeyCode.ESC,
|
|
10034
|
-
description: "shortcut.sheet.abort-editing",
|
|
10045
|
+
description: "sheets-ui.shortcut.sheet.abort-editing",
|
|
10035
10046
|
group: "4_sheet-edit",
|
|
10047
|
+
groupTitle: "sheets-ui.shortcut.sheet-edit",
|
|
10036
10048
|
preconditions: (contextService) => whenEditorDidNotInputFormulaActivated(contextService),
|
|
10037
10049
|
staticParameters: {
|
|
10038
10050
|
visible: false,
|
|
@@ -10053,8 +10065,9 @@ const EditorCursorCtrlEnterShortcut = {
|
|
|
10053
10065
|
};
|
|
10054
10066
|
const EditorBreakLineShortcut = {
|
|
10055
10067
|
id: _univerjs_docs_ui.BreakLineCommand.id,
|
|
10056
|
-
description: "shortcut.sheet.break-line",
|
|
10068
|
+
description: "sheets-ui.shortcut.sheet.break-line",
|
|
10057
10069
|
group: "4_sheet-edit",
|
|
10070
|
+
groupTitle: "sheets-ui.shortcut.sheet-edit",
|
|
10058
10071
|
preconditions: (contextService) => whenSheetEditorActivated(contextService),
|
|
10059
10072
|
binding: _univerjs_ui.KeyCode.ENTER | _univerjs_ui.MetaKeys.ALT
|
|
10060
10073
|
};
|
|
@@ -10075,8 +10088,9 @@ const ShiftEditorDeleteLeftShortcut = {
|
|
|
10075
10088
|
};
|
|
10076
10089
|
const EditorDeleteLeftShortcutInActive = {
|
|
10077
10090
|
id: SetCellEditVisibleOperation.id,
|
|
10078
|
-
description: "shortcut.sheet.delete-and-start-editing",
|
|
10091
|
+
description: "sheets-ui.shortcut.sheet.delete-and-start-editing",
|
|
10079
10092
|
group: "4_sheet-edit",
|
|
10093
|
+
groupTitle: "sheets-ui.shortcut.sheet-edit",
|
|
10080
10094
|
preconditions: (contextService) => whenSheetEditorFocused(contextService) && !whenFormulaEditorFocused(contextService),
|
|
10081
10095
|
binding: _univerjs_ui.KeyCode.BACKSPACE,
|
|
10082
10096
|
staticParameters: {
|
|
@@ -11532,7 +11546,7 @@ let SheetClipboardController = class SheetClipboardController extends _univerjs_
|
|
|
11532
11546
|
if (maxConfig && endRow * endColumn > maxConfig) {
|
|
11533
11547
|
self._messageService.show({
|
|
11534
11548
|
type: _univerjs_design.MessageType.Error,
|
|
11535
|
-
content: self._localService.t("clipboard.paste.exceedMaxCells")
|
|
11549
|
+
content: self._localService.t("sheets-ui.clipboard.paste.exceedMaxCells")
|
|
11536
11550
|
});
|
|
11537
11551
|
return false;
|
|
11538
11552
|
}
|
|
@@ -12267,6 +12281,7 @@ const calcDocGlyphPosition = (glyph, skeleton, pageIndex = -1) => {
|
|
|
12267
12281
|
pageMarginTop: 0
|
|
12268
12282
|
}, skeleton).getRangePointData(startPosition, startPosition);
|
|
12269
12283
|
const rect = (0, _univerjs_docs_ui.getLineBounding)(borderBoxPointGroup)[0];
|
|
12284
|
+
if (!rect) return;
|
|
12270
12285
|
return {
|
|
12271
12286
|
top: rect.top,
|
|
12272
12287
|
bottom: rect.bottom,
|
|
@@ -12932,7 +12947,7 @@ let SheetPermissionCheckUIController = class SheetPermissionCheckUIController ex
|
|
|
12932
12947
|
_haveNotPermissionHandle(errorMsg) {
|
|
12933
12948
|
const dialogProps = {
|
|
12934
12949
|
id: UNIVER_SHEET_PERMISSION_ALERT_DIALOG_ID,
|
|
12935
|
-
title: { title: "permission.dialog.alert" },
|
|
12950
|
+
title: { title: "sheets-ui.permission.dialog.alert" },
|
|
12936
12951
|
children: {
|
|
12937
12952
|
label: UNIVER_SHEET_PERMISSION_ALERT_DIALOG,
|
|
12938
12953
|
errorMsg
|
|
@@ -12966,7 +12981,7 @@ let SheetPermissionCheckUIController = class SheetPermissionCheckUIController ex
|
|
|
12966
12981
|
worksheetTypes: [_univerjs_sheets.WorksheetSetCellValuePermission, _univerjs_sheets.WorksheetEditPermission],
|
|
12967
12982
|
rangeTypes: [_univerjs_sheets.RangeProtectionPermissionEditPoint]
|
|
12968
12983
|
});
|
|
12969
|
-
errorMsg = this._localeService.t("permission.dialog.editErr");
|
|
12984
|
+
errorMsg = this._localeService.t("sheets-ui.permission.dialog.editErr");
|
|
12970
12985
|
break;
|
|
12971
12986
|
case SetCellEditVisibleOperation.id:
|
|
12972
12987
|
params = commandInfo.params;
|
|
@@ -12976,7 +12991,7 @@ let SheetPermissionCheckUIController = class SheetPermissionCheckUIController ex
|
|
|
12976
12991
|
worksheetTypes: [_univerjs_sheets.WorksheetSetCellValuePermission, _univerjs_sheets.WorksheetEditPermission],
|
|
12977
12992
|
rangeTypes: [_univerjs_sheets.RangeProtectionPermissionEditPoint]
|
|
12978
12993
|
});
|
|
12979
|
-
errorMsg = this._localeService.t("permission.dialog.editErr");
|
|
12994
|
+
errorMsg = this._localeService.t("sheets-ui.permission.dialog.editErr");
|
|
12980
12995
|
break;
|
|
12981
12996
|
case SheetPasteColWidthCommand.id:
|
|
12982
12997
|
permission = this._sheetPermissionCheckController.permissionCheckWithoutRange({
|
|
@@ -12984,13 +12999,13 @@ let SheetPermissionCheckUIController = class SheetPermissionCheckUIController ex
|
|
|
12984
12999
|
worksheetTypes: [_univerjs_sheets.WorksheetEditPermission, _univerjs_sheets.WorksheetSetColumnStylePermission],
|
|
12985
13000
|
rangeTypes: [_univerjs_sheets.RangeProtectionPermissionEditPoint]
|
|
12986
13001
|
});
|
|
12987
|
-
errorMsg = this._localeService.t("permission.dialog.pasteErr");
|
|
13002
|
+
errorMsg = this._localeService.t("sheets-ui.permission.dialog.pasteErr");
|
|
12988
13003
|
break;
|
|
12989
13004
|
case SheetPasteShortKeyCommand.id:
|
|
12990
13005
|
case SheetPasteCommand.id:
|
|
12991
13006
|
params = commandInfo.params;
|
|
12992
13007
|
permission = this._permissionCheckByPaste(params);
|
|
12993
|
-
errorMsg = this._localeService.t("permission.dialog.pasteErr");
|
|
13008
|
+
errorMsg = this._localeService.t("sheets-ui.permission.dialog.pasteErr");
|
|
12994
13009
|
break;
|
|
12995
13010
|
case ApplyFormatPainterCommand.id:
|
|
12996
13011
|
permission = this._sheetPermissionCheckController.permissionCheckWithRanges({
|
|
@@ -13002,7 +13017,7 @@ let SheetPermissionCheckUIController = class SheetPermissionCheckUIController ex
|
|
|
13002
13017
|
],
|
|
13003
13018
|
rangeTypes: [_univerjs_sheets.RangeProtectionPermissionEditPoint]
|
|
13004
13019
|
});
|
|
13005
|
-
errorMsg = this._localeService.t("permission.dialog.commonErr");
|
|
13020
|
+
errorMsg = this._localeService.t("sheets-ui.permission.dialog.commonErr");
|
|
13006
13021
|
break;
|
|
13007
13022
|
case SheetCopyCommand.id:
|
|
13008
13023
|
var _this$_permissionServ;
|
|
@@ -13011,9 +13026,9 @@ let SheetPermissionCheckUIController = class SheetPermissionCheckUIController ex
|
|
|
13011
13026
|
worksheetTypes: [_univerjs_sheets.WorksheetCopyPermission],
|
|
13012
13027
|
rangeTypes: [_univerjs_sheets.RangeProtectionPermissionViewPoint]
|
|
13013
13028
|
});
|
|
13014
|
-
errorMsg = this._localeService.t("permission.dialog.copyErr");
|
|
13029
|
+
errorMsg = this._localeService.t("sheets-ui.permission.dialog.copyErr");
|
|
13015
13030
|
target = (0, _univerjs_sheets.getSheetCommandTarget)(this._univerInstanceService);
|
|
13016
|
-
if (!permission && target && !((_this$_permissionServ = this._permissionService.getPermissionPoint(new _univerjs_sheets.WorkbookCopyPermission(target.unitId).id)) === null || _this$_permissionServ === void 0 ? void 0 : _this$_permissionServ.value)) errorMsg = this._localeService.t("permission.dialog.workbookCopyErr");
|
|
13031
|
+
if (!permission && target && !((_this$_permissionServ = this._permissionService.getPermissionPoint(new _univerjs_sheets.WorkbookCopyPermission(target.unitId).id)) === null || _this$_permissionServ === void 0 ? void 0 : _this$_permissionServ.value)) errorMsg = this._localeService.t("sheets-ui.permission.dialog.workbookCopyErr");
|
|
13017
13032
|
break;
|
|
13018
13033
|
case SheetCutCommand.id:
|
|
13019
13034
|
var _this$_permissionServ2;
|
|
@@ -13022,9 +13037,9 @@ let SheetPermissionCheckUIController = class SheetPermissionCheckUIController ex
|
|
|
13022
13037
|
worksheetTypes: [_univerjs_sheets.WorksheetCopyPermission, _univerjs_sheets.WorksheetEditPermission],
|
|
13023
13038
|
rangeTypes: [_univerjs_sheets.RangeProtectionPermissionViewPoint, _univerjs_sheets.RangeProtectionPermissionEditPoint]
|
|
13024
13039
|
});
|
|
13025
|
-
errorMsg = this._localeService.t("permission.dialog.copyErr");
|
|
13040
|
+
errorMsg = this._localeService.t("sheets-ui.permission.dialog.copyErr");
|
|
13026
13041
|
target = (0, _univerjs_sheets.getSheetCommandTarget)(this._univerInstanceService);
|
|
13027
|
-
if (!permission && target && !((_this$_permissionServ2 = this._permissionService.getPermissionPoint(new _univerjs_sheets.WorkbookCopyPermission(target.unitId).id)) === null || _this$_permissionServ2 === void 0 ? void 0 : _this$_permissionServ2.value)) errorMsg = this._localeService.t("permission.dialog.workbookCopyErr");
|
|
13042
|
+
if (!permission && target && !((_this$_permissionServ2 = this._permissionService.getPermissionPoint(new _univerjs_sheets.WorkbookCopyPermission(target.unitId).id)) === null || _this$_permissionServ2 === void 0 ? void 0 : _this$_permissionServ2.value)) errorMsg = this._localeService.t("sheets-ui.permission.dialog.workbookCopyErr");
|
|
13028
13043
|
break;
|
|
13029
13044
|
default: break;
|
|
13030
13045
|
}
|
|
@@ -16082,77 +16097,77 @@ const COMPONENT_PREFIX = "UI_PLUGIN_SHEETS";
|
|
|
16082
16097
|
const BORDER_PANEL_COMPONENT = `${COMPONENT_PREFIX}_BORDER_PANEL_COMPONENT`;
|
|
16083
16098
|
const BORDER_LINE_CHILDREN = [
|
|
16084
16099
|
{
|
|
16085
|
-
label: "borderLine.borderTop",
|
|
16100
|
+
label: "sheets-ui.borderLine.borderTop",
|
|
16086
16101
|
icon: "UpBorderDoubleIcon",
|
|
16087
16102
|
value: "top"
|
|
16088
16103
|
},
|
|
16089
16104
|
{
|
|
16090
|
-
label: "borderLine.borderBottom",
|
|
16105
|
+
label: "sheets-ui.borderLine.borderBottom",
|
|
16091
16106
|
icon: "DownBorderDoubleIcon",
|
|
16092
16107
|
value: "bottom"
|
|
16093
16108
|
},
|
|
16094
16109
|
{
|
|
16095
|
-
label: "borderLine.borderLeft",
|
|
16110
|
+
label: "sheets-ui.borderLine.borderLeft",
|
|
16096
16111
|
icon: "LeftBorderDoubleIcon",
|
|
16097
16112
|
value: "left"
|
|
16098
16113
|
},
|
|
16099
16114
|
{
|
|
16100
|
-
label: "borderLine.borderRight",
|
|
16115
|
+
label: "sheets-ui.borderLine.borderRight",
|
|
16101
16116
|
icon: "RightBorderDoubleIcon",
|
|
16102
16117
|
value: "right"
|
|
16103
16118
|
},
|
|
16104
16119
|
{
|
|
16105
|
-
label: "borderLine.borderNone",
|
|
16120
|
+
label: "sheets-ui.borderLine.borderNone",
|
|
16106
16121
|
icon: "NoBorderIcon",
|
|
16107
16122
|
value: "none"
|
|
16108
16123
|
},
|
|
16109
16124
|
{
|
|
16110
|
-
label: "borderLine.borderAll",
|
|
16125
|
+
label: "sheets-ui.borderLine.borderAll",
|
|
16111
16126
|
icon: "AllBorderIcon",
|
|
16112
16127
|
value: "all"
|
|
16113
16128
|
},
|
|
16114
16129
|
{
|
|
16115
|
-
label: "borderLine.borderOutside",
|
|
16130
|
+
label: "sheets-ui.borderLine.borderOutside",
|
|
16116
16131
|
icon: "OuterBorderDoubleIcon",
|
|
16117
16132
|
value: "outside"
|
|
16118
16133
|
},
|
|
16119
16134
|
{
|
|
16120
|
-
label: "borderLine.borderInside",
|
|
16135
|
+
label: "sheets-ui.borderLine.borderInside",
|
|
16121
16136
|
icon: "InnerBorderDoubleIcon",
|
|
16122
16137
|
value: "inside"
|
|
16123
16138
|
},
|
|
16124
16139
|
{
|
|
16125
|
-
label: "borderLine.borderHorizontal",
|
|
16140
|
+
label: "sheets-ui.borderLine.borderHorizontal",
|
|
16126
16141
|
icon: "HorizontalBorderDoubleIcon",
|
|
16127
16142
|
value: "horizontal"
|
|
16128
16143
|
},
|
|
16129
16144
|
{
|
|
16130
|
-
label: "borderLine.borderVertical",
|
|
16145
|
+
label: "sheets-ui.borderLine.borderVertical",
|
|
16131
16146
|
icon: "VerticalBorderDoubleIcon",
|
|
16132
16147
|
value: "vertical"
|
|
16133
16148
|
},
|
|
16134
16149
|
{
|
|
16135
|
-
label: "borderLine.borderTlbr",
|
|
16150
|
+
label: "sheets-ui.borderLine.borderTlbr",
|
|
16136
16151
|
icon: "BackSlashDoubleIcon",
|
|
16137
16152
|
value: "tlbr"
|
|
16138
16153
|
},
|
|
16139
16154
|
{
|
|
16140
|
-
label: "borderLine.borderTlbcTlmr",
|
|
16155
|
+
label: "sheets-ui.borderLine.borderTlbcTlmr",
|
|
16141
16156
|
icon: "LeftDoubleDiagonalDoubleIcon",
|
|
16142
16157
|
value: "tlbc_tlmr"
|
|
16143
16158
|
},
|
|
16144
16159
|
{
|
|
16145
|
-
label: "borderLine.borderTlbrTlbcTlmr",
|
|
16160
|
+
label: "sheets-ui.borderLine.borderTlbrTlbcTlmr",
|
|
16146
16161
|
icon: "LeftTridiagonalDoubleIcon",
|
|
16147
16162
|
value: "tlbr_tlbc_tlmr"
|
|
16148
16163
|
},
|
|
16149
16164
|
{
|
|
16150
|
-
label: "borderLine.borderBlTr",
|
|
16165
|
+
label: "sheets-ui.borderLine.borderBlTr",
|
|
16151
16166
|
icon: "SlashDoubleIcon",
|
|
16152
16167
|
value: "bltr"
|
|
16153
16168
|
},
|
|
16154
16169
|
{
|
|
16155
|
-
label: "borderLine.borderMltrBctr",
|
|
16170
|
+
label: "sheets-ui.borderLine.borderMltrBctr",
|
|
16156
16171
|
icon: "RightDoubleDiagonalDoubleIcon",
|
|
16157
16172
|
value: "mltr_bctr"
|
|
16158
16173
|
}
|
|
@@ -16337,9 +16352,9 @@ const MenuItemFrozen = (props) => {
|
|
|
16337
16352
|
if (contextMenuService.visible) updateValue(selectionManagerService.getCurrentLastSelection());
|
|
16338
16353
|
}, [contextMenuService.visible]);
|
|
16339
16354
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
16340
|
-
type === "row" && localeService.t("rightClick.freezeRow", value.row),
|
|
16341
|
-
type === "col" && localeService.t("rightClick.freezeCol", value.col),
|
|
16342
|
-
type === "all" && localeService.t("rightClick.freezeCell", value.row, value.col)
|
|
16355
|
+
type === "row" && localeService.t("sheets-ui.rightClick.freezeRow", value.row),
|
|
16356
|
+
type === "col" && localeService.t("sheets-ui.rightClick.freezeCol", value.col),
|
|
16357
|
+
type === "all" && localeService.t("sheets-ui.rightClick.freezeCell", value.row, value.col)
|
|
16343
16358
|
] });
|
|
16344
16359
|
};
|
|
16345
16360
|
|
|
@@ -16461,9 +16476,18 @@ function getCurrentRangeDisable$(accessor, permissionTypes = {}, supportCellEdit
|
|
|
16461
16476
|
const userManagerService = accessor.get(_univerjs_core.UserManagerService);
|
|
16462
16477
|
const editorBridgeService = accessor.has(IEditorBridgeService) ? accessor.get(IEditorBridgeService) : null;
|
|
16463
16478
|
const contextService = accessor.get(_univerjs_core.IContextService);
|
|
16464
|
-
const editorVisible$ = ((_editorBridgeService$ = editorBridgeService === null || editorBridgeService === void 0 ? void 0 : editorBridgeService.visible$) !== null && _editorBridgeService$ !== void 0 ? _editorBridgeService$ : (0, rxjs.of)(null)).pipe((0, rxjs_operators.startWith)(null), (0, rxjs_operators.shareReplay)(
|
|
16465
|
-
|
|
16466
|
-
|
|
16479
|
+
const editorVisible$ = ((_editorBridgeService$ = editorBridgeService === null || editorBridgeService === void 0 ? void 0 : editorBridgeService.visible$) !== null && _editorBridgeService$ !== void 0 ? _editorBridgeService$ : (0, rxjs.of)(null)).pipe((0, rxjs_operators.startWith)(null), (0, rxjs_operators.shareReplay)({
|
|
16480
|
+
bufferSize: 1,
|
|
16481
|
+
refCount: true
|
|
16482
|
+
}));
|
|
16483
|
+
const formulaEditorFocus$ = contextService.subscribeContextValue$(_univerjs_core.FOCUSING_FX_BAR_EDITOR).pipe((0, rxjs_operators.startWith)(false), (0, rxjs_operators.shareReplay)({
|
|
16484
|
+
bufferSize: 1,
|
|
16485
|
+
refCount: true
|
|
16486
|
+
}));
|
|
16487
|
+
const focusingShapeTextEditor$ = contextService.subscribeContextValue$(_univerjs_core.FOCUSING_SHAPE_TEXT_EDITOR).pipe((0, rxjs_operators.startWith)(false), (0, rxjs_operators.shareReplay)({
|
|
16488
|
+
bufferSize: 1,
|
|
16489
|
+
refCount: true
|
|
16490
|
+
}));
|
|
16467
16491
|
return (0, rxjs.combineLatest)([
|
|
16468
16492
|
userManagerService.currentUser$,
|
|
16469
16493
|
workbook$,
|
|
@@ -16675,7 +16699,7 @@ function CellBorderSelectorMenuItemFactory(accessor) {
|
|
|
16675
16699
|
subscriber.next(defaultIcon);
|
|
16676
16700
|
return disposable.dispose;
|
|
16677
16701
|
}),
|
|
16678
|
-
tooltip: "toolbar.border.main",
|
|
16702
|
+
tooltip: "sheets-ui.toolbar.border.main",
|
|
16679
16703
|
type: _univerjs_ui.MenuItemType.BUTTON_SELECTOR,
|
|
16680
16704
|
slot: true,
|
|
16681
16705
|
selections: [{
|
|
@@ -16700,7 +16724,7 @@ function ClearSelectionMenuItemFactory(accessor) {
|
|
|
16700
16724
|
id: CLEAR_SELECTION_MENU_ID,
|
|
16701
16725
|
type: _univerjs_ui.MenuItemType.SUBITEMS,
|
|
16702
16726
|
icon: "ClearFormatDoubleIcon",
|
|
16703
|
-
title: "rightClick.clearSelection",
|
|
16727
|
+
title: "sheets-ui.rightClick.clearSelection",
|
|
16704
16728
|
hidden$: (0, _univerjs_ui.getMenuHiddenObservable)(accessor, _univerjs_core.UniverInstanceType.UNIVER_SHEET)
|
|
16705
16729
|
};
|
|
16706
16730
|
}
|
|
@@ -16708,7 +16732,7 @@ function ClearSelectionContentMenuItemFactory(accessor) {
|
|
|
16708
16732
|
return {
|
|
16709
16733
|
id: _univerjs_sheets.ClearSelectionContentCommand.id,
|
|
16710
16734
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
16711
|
-
title: "rightClick.clearContent",
|
|
16735
|
+
title: "sheets-ui.rightClick.clearContent",
|
|
16712
16736
|
disabled$: getObservableWithExclusiveRange$(accessor, getCurrentRangeDisable$(accessor, {
|
|
16713
16737
|
workbookTypes: [_univerjs_sheets.WorkbookEditablePermission],
|
|
16714
16738
|
worksheetTypes: [_univerjs_sheets.WorksheetEditPermission, _univerjs_sheets.WorksheetSetCellValuePermission],
|
|
@@ -16721,7 +16745,7 @@ function ClearSelectionFormatMenuItemFactory(accessor) {
|
|
|
16721
16745
|
return {
|
|
16722
16746
|
id: _univerjs_sheets.ClearSelectionFormatCommand.id,
|
|
16723
16747
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
16724
|
-
title: "rightClick.clearFormat",
|
|
16748
|
+
title: "sheets-ui.rightClick.clearFormat",
|
|
16725
16749
|
disabled$: getCurrentRangeDisable$(accessor, {
|
|
16726
16750
|
workbookTypes: [_univerjs_sheets.WorkbookEditablePermission],
|
|
16727
16751
|
worksheetTypes: [_univerjs_sheets.WorksheetEditPermission, _univerjs_sheets.WorksheetSetCellStylePermission],
|
|
@@ -16735,7 +16759,7 @@ function ClearSelectionAllToolbarMenuItemFactory(accessor) {
|
|
|
16735
16759
|
id: _univerjs_sheets.ClearSelectionAllCommand.id,
|
|
16736
16760
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
16737
16761
|
icon: "ClearFormatDoubleIcon",
|
|
16738
|
-
tooltip: "rightClick.clearAll",
|
|
16762
|
+
tooltip: "sheets-ui.rightClick.clearAll",
|
|
16739
16763
|
disabled$: getObservableWithExclusiveRange$(accessor, getCurrentRangeDisable$(accessor, {
|
|
16740
16764
|
workbookTypes: [_univerjs_sheets.WorkbookEditablePermission],
|
|
16741
16765
|
worksheetTypes: [
|
|
@@ -16752,8 +16776,8 @@ function ClearSelectionAllMenuItemFactory(accessor) {
|
|
|
16752
16776
|
return {
|
|
16753
16777
|
id: _univerjs_sheets.ClearSelectionAllCommand.id,
|
|
16754
16778
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
16755
|
-
title: "rightClick.clearAll",
|
|
16756
|
-
tooltip: "rightClick.clearAll",
|
|
16779
|
+
title: "sheets-ui.rightClick.clearAll",
|
|
16780
|
+
tooltip: "sheets-ui.rightClick.clearAll",
|
|
16757
16781
|
disabled$: getObservableWithExclusiveRange$(accessor, getCurrentRangeDisable$(accessor, {
|
|
16758
16782
|
workbookTypes: [_univerjs_sheets.WorkbookEditablePermission],
|
|
16759
16783
|
worksheetTypes: [
|
|
@@ -16774,7 +16798,7 @@ function DeleteRangeMenuItemFactory(accessor) {
|
|
|
16774
16798
|
return {
|
|
16775
16799
|
id: DELETE_RANGE_MENU_ID,
|
|
16776
16800
|
type: _univerjs_ui.MenuItemType.SUBITEMS,
|
|
16777
|
-
title: "rightClick.delete",
|
|
16801
|
+
title: "sheets-ui.rightClick.delete",
|
|
16778
16802
|
icon: "ReduceDoubleIcon",
|
|
16779
16803
|
hidden$: getObservableWithExclusiveRange$(accessor, getBaseRangeMenuHidden$(accessor)),
|
|
16780
16804
|
disabled$: getCurrentRangeDisable$(accessor, {
|
|
@@ -16788,7 +16812,7 @@ function RemoveColMenuItemFactory(accessor) {
|
|
|
16788
16812
|
id: RemoveColConfirmCommand.id,
|
|
16789
16813
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
16790
16814
|
icon: "DeleteColumnDoubleIcon",
|
|
16791
|
-
title: "rightClick.deleteSelectedColumn",
|
|
16815
|
+
title: "sheets-ui.rightClick.deleteSelectedColumn",
|
|
16792
16816
|
hidden$: getDeleteMenuHidden$(accessor, "col"),
|
|
16793
16817
|
disabled$: getCurrentRangeDisable$(accessor, {
|
|
16794
16818
|
workbookTypes: [_univerjs_sheets.WorkbookEditablePermission, _univerjs_sheets.WorkbookDeleteColumnPermission],
|
|
@@ -16801,7 +16825,7 @@ function RemoveRowMenuItemFactory(accessor) {
|
|
|
16801
16825
|
id: RemoveRowConfirmCommand.id,
|
|
16802
16826
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
16803
16827
|
icon: "DeleteRowDoubleIcon",
|
|
16804
|
-
title: "rightClick.deleteSelectedRow",
|
|
16828
|
+
title: "sheets-ui.rightClick.deleteSelectedRow",
|
|
16805
16829
|
disabled$: getCurrentRangeDisable$(accessor, {
|
|
16806
16830
|
workbookTypes: [_univerjs_sheets.WorkbookEditablePermission, _univerjs_sheets.WorkbookDeleteRowPermission],
|
|
16807
16831
|
worksheetTypes: [_univerjs_sheets.WorksheetEditPermission, _univerjs_sheets.WorksheetDeleteRowPermission]
|
|
@@ -16813,7 +16837,7 @@ function DeleteRangeMoveLeftMenuItemFactory(accessor) {
|
|
|
16813
16837
|
return {
|
|
16814
16838
|
id: DeleteRangeMoveLeftConfirmCommand.id,
|
|
16815
16839
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
16816
|
-
title: "rightClick.moveLeft",
|
|
16840
|
+
title: "sheets-ui.rightClick.moveLeft",
|
|
16817
16841
|
icon: "DeleteCellShiftLeftDoubleIcon",
|
|
16818
16842
|
disabled$: getCurrentRangeDisable$(accessor, {
|
|
16819
16843
|
workbookTypes: [_univerjs_sheets.WorkbookEditablePermission],
|
|
@@ -16827,7 +16851,7 @@ function DeleteRangeMoveUpMenuItemFactory(accessor) {
|
|
|
16827
16851
|
return {
|
|
16828
16852
|
id: DeleteRangeMoveUpConfirmCommand.id,
|
|
16829
16853
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
16830
|
-
title: "rightClick.moveUp",
|
|
16854
|
+
title: "sheets-ui.rightClick.moveUp",
|
|
16831
16855
|
icon: "DeleteCellShiftUpDoubleIcon",
|
|
16832
16856
|
disabled$: getCurrentRangeDisable$(accessor, {
|
|
16833
16857
|
workbookTypes: [_univerjs_sheets.WorkbookEditablePermission],
|
|
@@ -16883,7 +16907,7 @@ function FontSizeSelectorMenuItemFactory(accessor) {
|
|
|
16883
16907
|
return {
|
|
16884
16908
|
id: SetRangeFontSizeCommand.id,
|
|
16885
16909
|
type: _univerjs_ui.MenuItemType.SELECTOR,
|
|
16886
|
-
tooltip: "toolbar.fontSize",
|
|
16910
|
+
tooltip: "sheets-ui.toolbar.fontSize",
|
|
16887
16911
|
label: {
|
|
16888
16912
|
name: _univerjs_ui.FONT_SIZE_COMPONENT,
|
|
16889
16913
|
props: {
|
|
@@ -16908,7 +16932,7 @@ function FontSizeIncreaseMenuItemFactory(accessor) {
|
|
|
16908
16932
|
id: SetRangeFontIncreaseCommand.id,
|
|
16909
16933
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
16910
16934
|
icon: "FontSizeIncreaseIcon",
|
|
16911
|
-
tooltip: "toolbar.fontSizeIncrease",
|
|
16935
|
+
tooltip: "sheets-ui.toolbar.fontSizeIncrease",
|
|
16912
16936
|
disabled$,
|
|
16913
16937
|
hidden$: (0, _univerjs_ui.getMenuHiddenObservable)(accessor, _univerjs_core.UniverInstanceType.UNIVER_SHEET)
|
|
16914
16938
|
};
|
|
@@ -16923,7 +16947,7 @@ function FontSizeDecreaseMenuItemFactory(accessor) {
|
|
|
16923
16947
|
id: SetRangeFontDecreaseCommand.id,
|
|
16924
16948
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
16925
16949
|
icon: "FontSizeReduceIcon",
|
|
16926
|
-
tooltip: "toolbar.fontSizeDecrease",
|
|
16950
|
+
tooltip: "sheets-ui.toolbar.fontSizeDecrease",
|
|
16927
16951
|
disabled$,
|
|
16928
16952
|
hidden$: (0, _univerjs_ui.getMenuHiddenObservable)(accessor, _univerjs_core.UniverInstanceType.UNIVER_SHEET)
|
|
16929
16953
|
};
|
|
@@ -16957,7 +16981,7 @@ function SheetFrozenMenuItemFactory(accessor) {
|
|
|
16957
16981
|
return {
|
|
16958
16982
|
id: SHEET_FROZEN_MENU_ID,
|
|
16959
16983
|
type: _univerjs_ui.MenuItemType.SUBITEMS,
|
|
16960
|
-
title: "rightClick.freeze",
|
|
16984
|
+
title: "sheets-ui.rightClick.freeze",
|
|
16961
16985
|
icon: "FreezeToSelectedIcon",
|
|
16962
16986
|
hidden$: (0, _univerjs_ui.getMenuHiddenObservable)(accessor, _univerjs_core.UniverInstanceType.UNIVER_SHEET)
|
|
16963
16987
|
};
|
|
@@ -16967,7 +16991,7 @@ function SheetFrozenColumnHeaderMenuItemFactory(accessor) {
|
|
|
16967
16991
|
return {
|
|
16968
16992
|
id: SHEET_FROZEN_COLUMN_HEADER_MENU_ID,
|
|
16969
16993
|
type: _univerjs_ui.MenuItemType.SUBITEMS,
|
|
16970
|
-
title: "rightClick.freeze",
|
|
16994
|
+
title: "sheets-ui.rightClick.freeze",
|
|
16971
16995
|
icon: "FreezeToSelectedIcon",
|
|
16972
16996
|
hidden$: (0, _univerjs_ui.getMenuHiddenObservable)(accessor, _univerjs_core.UniverInstanceType.UNIVER_SHEET)
|
|
16973
16997
|
};
|
|
@@ -16977,7 +17001,7 @@ function SheetFrozenRowHeaderMenuItemFactory(accessor) {
|
|
|
16977
17001
|
return {
|
|
16978
17002
|
id: SHEET_FROZEN_ROW_HEADER_MENU_ID,
|
|
16979
17003
|
type: _univerjs_ui.MenuItemType.SUBITEMS,
|
|
16980
|
-
title: "rightClick.freeze",
|
|
17004
|
+
title: "sheets-ui.rightClick.freeze",
|
|
16981
17005
|
icon: "FreezeToSelectedIcon",
|
|
16982
17006
|
hidden$: (0, _univerjs_ui.getMenuHiddenObservable)(accessor, _univerjs_core.UniverInstanceType.UNIVER_SHEET)
|
|
16983
17007
|
};
|
|
@@ -17022,7 +17046,7 @@ function FrozenFirstRowMenuItemFactory(accessor) {
|
|
|
17022
17046
|
return {
|
|
17023
17047
|
id: SetFirstRowFrozenCommand.id,
|
|
17024
17048
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
17025
|
-
title: "rightClick.freezeFirstRow",
|
|
17049
|
+
title: "sheets-ui.rightClick.freezeFirstRow",
|
|
17026
17050
|
icon: "FreezeRowIcon",
|
|
17027
17051
|
hidden$: (0, _univerjs_ui.getMenuHiddenObservable)(accessor, _univerjs_core.UniverInstanceType.UNIVER_SHEET)
|
|
17028
17052
|
};
|
|
@@ -17031,7 +17055,7 @@ function FrozenFirstColMenuItemFactory(accessor) {
|
|
|
17031
17055
|
return {
|
|
17032
17056
|
id: SetFirstColumnFrozenCommand.id,
|
|
17033
17057
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
17034
|
-
title: "rightClick.freezeFirstCol",
|
|
17058
|
+
title: "sheets-ui.rightClick.freezeFirstCol",
|
|
17035
17059
|
icon: "FreezeColumnIcon",
|
|
17036
17060
|
hidden$: (0, _univerjs_ui.getMenuHiddenObservable)(accessor, _univerjs_core.UniverInstanceType.UNIVER_SHEET)
|
|
17037
17061
|
};
|
|
@@ -17040,7 +17064,7 @@ function CancelFrozenMenuItemFactory(accessor) {
|
|
|
17040
17064
|
return {
|
|
17041
17065
|
id: _univerjs_sheets.CancelFrozenCommand.id,
|
|
17042
17066
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
17043
|
-
title: "rightClick.cancelFreeze",
|
|
17067
|
+
title: "sheets-ui.rightClick.cancelFreeze",
|
|
17044
17068
|
icon: "CancelFreezeIcon",
|
|
17045
17069
|
hidden$: (0, _univerjs_ui.getMenuHiddenObservable)(accessor, _univerjs_core.UniverInstanceType.UNIVER_SHEET)
|
|
17046
17070
|
};
|
|
@@ -17054,7 +17078,7 @@ function ToggleGridlinesMenuFactory(accessor) {
|
|
|
17054
17078
|
return {
|
|
17055
17079
|
id: _univerjs_sheets.ToggleGridlinesCommand.id,
|
|
17056
17080
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
17057
|
-
tooltip: "toolbar.toggleGridlines",
|
|
17081
|
+
tooltip: "sheets-ui.toolbar.toggleGridlines",
|
|
17058
17082
|
icon: "HideGridlinesDoubleIcon",
|
|
17059
17083
|
activated$: new rxjs.Observable((observer) => {
|
|
17060
17084
|
const getValue = () => {
|
|
@@ -17086,7 +17110,7 @@ function CellInsertMenuItemFactory(accessor) {
|
|
|
17086
17110
|
return {
|
|
17087
17111
|
id: CELL_INSERT_MENU_ID,
|
|
17088
17112
|
type: _univerjs_ui.MenuItemType.SUBITEMS,
|
|
17089
|
-
title: "rightClick.insert",
|
|
17113
|
+
title: "sheets-ui.rightClick.insert",
|
|
17090
17114
|
icon: "InsertDoubleIcon",
|
|
17091
17115
|
hidden$: getObservableWithExclusiveRange$(accessor, getBaseRangeMenuHidden$(accessor)),
|
|
17092
17116
|
disabled$: getCurrentRangeDisable$(accessor, {
|
|
@@ -17126,10 +17150,10 @@ function InsertRowBeforeCellMenuItemFactory(accessor) {
|
|
|
17126
17150
|
label: {
|
|
17127
17151
|
name: MENU_ITEM_INPUT_COMPONENT,
|
|
17128
17152
|
props: {
|
|
17129
|
-
prefix: "rightClick.insertRowsAbove",
|
|
17153
|
+
prefix: "sheets-ui.rightClick.insertRowsAbove",
|
|
17130
17154
|
min: 1,
|
|
17131
17155
|
max: 1e3,
|
|
17132
|
-
suffix: "rightClick.insertRowsAboveSuffix",
|
|
17156
|
+
suffix: "sheets-ui.rightClick.insertRowsAboveSuffix",
|
|
17133
17157
|
disabled$
|
|
17134
17158
|
}
|
|
17135
17159
|
},
|
|
@@ -17172,10 +17196,10 @@ function InsertColLeftCellMenuItemFactory(accessor) {
|
|
|
17172
17196
|
label: {
|
|
17173
17197
|
name: MENU_ITEM_INPUT_COMPONENT,
|
|
17174
17198
|
props: {
|
|
17175
|
-
prefix: "rightClick.insertColsLeft",
|
|
17199
|
+
prefix: "sheets-ui.rightClick.insertColsLeft",
|
|
17176
17200
|
min: 1,
|
|
17177
17201
|
max: 1e3,
|
|
17178
|
-
suffix: "rightClick.insertColsLeftSuffix",
|
|
17202
|
+
suffix: "sheets-ui.rightClick.insertColsLeftSuffix",
|
|
17179
17203
|
disabled$
|
|
17180
17204
|
}
|
|
17181
17205
|
},
|
|
@@ -17201,7 +17225,7 @@ function InsertRangeMoveRightMenuItemFactory(accessor) {
|
|
|
17201
17225
|
return {
|
|
17202
17226
|
id: InsertRangeMoveRightConfirmCommand.id,
|
|
17203
17227
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
17204
|
-
title: "rightClick.moveRight",
|
|
17228
|
+
title: "sheets-ui.rightClick.moveRight",
|
|
17205
17229
|
icon: "InsertCellShiftRightDoubleIcon",
|
|
17206
17230
|
disabled$: getCurrentRangeDisable$(accessor, {
|
|
17207
17231
|
workbookTypes: [_univerjs_sheets.WorkbookEditablePermission],
|
|
@@ -17219,7 +17243,7 @@ function InsertRangeMoveDownMenuItemFactory(accessor) {
|
|
|
17219
17243
|
return {
|
|
17220
17244
|
id: InsertRangeMoveDownConfirmCommand.id,
|
|
17221
17245
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
17222
|
-
title: "rightClick.moveDown",
|
|
17246
|
+
title: "sheets-ui.rightClick.moveDown",
|
|
17223
17247
|
icon: "InsertCellDownDoubleIcon",
|
|
17224
17248
|
disabled$: getCurrentRangeDisable$(accessor, {
|
|
17225
17249
|
workbookTypes: [_univerjs_sheets.WorkbookEditablePermission],
|
|
@@ -17250,10 +17274,10 @@ function InsertMultiRowsAfterHeaderMenuItemFactory(accessor) {
|
|
|
17250
17274
|
label: {
|
|
17251
17275
|
name: MENU_ITEM_INPUT_COMPONENT,
|
|
17252
17276
|
props: {
|
|
17253
|
-
prefix: "rightClick.insertRowsAfter",
|
|
17277
|
+
prefix: "sheets-ui.rightClick.insertRowsAfter",
|
|
17254
17278
|
min: 1,
|
|
17255
17279
|
max: 1e3,
|
|
17256
|
-
suffix: "rightClick.insertRowsAfterSuffix",
|
|
17280
|
+
suffix: "sheets-ui.rightClick.insertRowsAfterSuffix",
|
|
17257
17281
|
disabled$
|
|
17258
17282
|
}
|
|
17259
17283
|
},
|
|
@@ -17296,10 +17320,10 @@ function InsertMultiRowsAboveHeaderMenuItemFactory(accessor) {
|
|
|
17296
17320
|
label: {
|
|
17297
17321
|
name: MENU_ITEM_INPUT_COMPONENT,
|
|
17298
17322
|
props: {
|
|
17299
|
-
prefix: "rightClick.insertRowsAbove",
|
|
17323
|
+
prefix: "sheets-ui.rightClick.insertRowsAbove",
|
|
17300
17324
|
min: 1,
|
|
17301
17325
|
max: 1e3,
|
|
17302
|
-
suffix: "rightClick.insertRowsAboveSuffix",
|
|
17326
|
+
suffix: "sheets-ui.rightClick.insertRowsAboveSuffix",
|
|
17303
17327
|
disabled$
|
|
17304
17328
|
}
|
|
17305
17329
|
},
|
|
@@ -17342,10 +17366,10 @@ function InsertMultiColsLeftHeaderMenuItemFactory(accessor) {
|
|
|
17342
17366
|
label: {
|
|
17343
17367
|
name: MENU_ITEM_INPUT_COMPONENT,
|
|
17344
17368
|
props: {
|
|
17345
|
-
prefix: "rightClick.insertColsLeft",
|
|
17369
|
+
prefix: "sheets-ui.rightClick.insertColsLeft",
|
|
17346
17370
|
min: 1,
|
|
17347
17371
|
max: 1e3,
|
|
17348
|
-
suffix: "rightClick.insertColsLeftSuffix",
|
|
17372
|
+
suffix: "sheets-ui.rightClick.insertColsLeftSuffix",
|
|
17349
17373
|
disabled$
|
|
17350
17374
|
}
|
|
17351
17375
|
},
|
|
@@ -17388,10 +17412,10 @@ function InsertMultiColsRightHeaderMenuItemFactory(accessor) {
|
|
|
17388
17412
|
label: {
|
|
17389
17413
|
name: MENU_ITEM_INPUT_COMPONENT,
|
|
17390
17414
|
props: {
|
|
17391
|
-
prefix: "rightClick.insertColsRight",
|
|
17415
|
+
prefix: "sheets-ui.rightClick.insertColsRight",
|
|
17392
17416
|
min: 1,
|
|
17393
17417
|
max: 1e3,
|
|
17394
|
-
suffix: "rightClick.insertColsRightSuffix",
|
|
17418
|
+
suffix: "sheets-ui.rightClick.insertColsRightSuffix",
|
|
17395
17419
|
disabled$
|
|
17396
17420
|
}
|
|
17397
17421
|
},
|
|
@@ -17431,7 +17455,7 @@ function FormatPainterMenuItemFactory(accessor) {
|
|
|
17431
17455
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
17432
17456
|
icon: "BrushIcon",
|
|
17433
17457
|
title: "Format Painter",
|
|
17434
|
-
tooltip: "toolbar.formatPainter",
|
|
17458
|
+
tooltip: "sheets-ui.toolbar.formatPainter",
|
|
17435
17459
|
activated$: new rxjs.Observable((subscriber) => {
|
|
17436
17460
|
let active = false;
|
|
17437
17461
|
const status$ = formatPainterService.status$.subscribe((s) => {
|
|
@@ -17461,7 +17485,7 @@ function BoldMenuItemFactory(accessor) {
|
|
|
17461
17485
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
17462
17486
|
icon: "BoldIcon",
|
|
17463
17487
|
title: "Set bold",
|
|
17464
|
-
tooltip: "toolbar.bold",
|
|
17488
|
+
tooltip: "sheets-ui.toolbar.bold",
|
|
17465
17489
|
disabled$: getCurrentRangeDisable$(accessor, {
|
|
17466
17490
|
workbookTypes: [_univerjs_sheets.WorkbookEditablePermission],
|
|
17467
17491
|
worksheetTypes: [_univerjs_sheets.WorksheetEditPermission, _univerjs_sheets.WorksheetSetCellStylePermission],
|
|
@@ -17515,7 +17539,7 @@ function ItalicMenuItemFactory(accessor) {
|
|
|
17515
17539
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
17516
17540
|
icon: "ItalicIcon",
|
|
17517
17541
|
title: "Set italic",
|
|
17518
|
-
tooltip: "toolbar.italic",
|
|
17542
|
+
tooltip: "sheets-ui.toolbar.italic",
|
|
17519
17543
|
disabled$: getCurrentRangeDisable$(accessor, {
|
|
17520
17544
|
workbookTypes: [_univerjs_sheets.WorkbookEditablePermission],
|
|
17521
17545
|
worksheetTypes: [_univerjs_sheets.WorksheetEditPermission, _univerjs_sheets.WorksheetSetCellStylePermission],
|
|
@@ -17565,7 +17589,7 @@ function UnderlineMenuItemFactory(accessor) {
|
|
|
17565
17589
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
17566
17590
|
icon: "UnderlineIcon",
|
|
17567
17591
|
title: "Set underline",
|
|
17568
|
-
tooltip: "toolbar.underline",
|
|
17592
|
+
tooltip: "sheets-ui.toolbar.underline",
|
|
17569
17593
|
activated$: deriveStateFromActiveSheet$(univerInstanceService, false, ({ worksheet }) => new rxjs.Observable((subscriber) => {
|
|
17570
17594
|
var _selectionManagerServ6;
|
|
17571
17595
|
const disposable = commandService.onCommandExecuted((c) => {
|
|
@@ -17615,7 +17639,7 @@ function StrikeThroughMenuItemFactory(accessor) {
|
|
|
17615
17639
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
17616
17640
|
icon: "StrikethroughIcon",
|
|
17617
17641
|
title: "Set strike through",
|
|
17618
|
-
tooltip: "toolbar.strikethrough",
|
|
17642
|
+
tooltip: "sheets-ui.toolbar.strikethrough",
|
|
17619
17643
|
disabled$: getCurrentRangeDisable$(accessor, {
|
|
17620
17644
|
workbookTypes: [_univerjs_sheets.WorkbookEditablePermission],
|
|
17621
17645
|
worksheetTypes: [_univerjs_sheets.WorksheetEditPermission, _univerjs_sheets.WorksheetSetCellStylePermission],
|
|
@@ -17667,7 +17691,7 @@ function FontFamilySelectorMenuItemFactory(accessor) {
|
|
|
17667
17691
|
}, true);
|
|
17668
17692
|
return {
|
|
17669
17693
|
id: SetRangeFontFamilyCommand.id,
|
|
17670
|
-
tooltip: "toolbar.font",
|
|
17694
|
+
tooltip: "sheets-ui.toolbar.font",
|
|
17671
17695
|
type: _univerjs_ui.MenuItemType.SELECTOR,
|
|
17672
17696
|
label: {
|
|
17673
17697
|
name: _univerjs_ui.FONT_FAMILY_COMPONENT,
|
|
@@ -17717,7 +17741,7 @@ function ResetTextColorMenuItemFactory(accessor) {
|
|
|
17717
17741
|
return {
|
|
17718
17742
|
id: ResetRangeTextColorCommand.id,
|
|
17719
17743
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
17720
|
-
title: "toolbar.resetColor",
|
|
17744
|
+
title: "sheets-ui.toolbar.resetColor",
|
|
17721
17745
|
icon: "NoColorDoubleIcon",
|
|
17722
17746
|
disabled$: getCurrentRangeDisable$(accessor, {
|
|
17723
17747
|
workbookTypes: [_univerjs_sheets.WorkbookEditablePermission],
|
|
@@ -17734,7 +17758,7 @@ function TextColorSelectorMenuItemFactory(accessor) {
|
|
|
17734
17758
|
return {
|
|
17735
17759
|
id: SetRangeTextColorCommand.id,
|
|
17736
17760
|
icon: "FontColorDoubleIcon",
|
|
17737
|
-
tooltip: "toolbar.textColor.main",
|
|
17761
|
+
tooltip: "sheets-ui.toolbar.textColor.main",
|
|
17738
17762
|
type: _univerjs_ui.MenuItemType.BUTTON_SELECTOR,
|
|
17739
17763
|
selections: [{
|
|
17740
17764
|
label: {
|
|
@@ -17774,7 +17798,7 @@ function ResetBackgroundColorMenuItemFactory(accessor) {
|
|
|
17774
17798
|
return {
|
|
17775
17799
|
id: _univerjs_sheets.ResetBackgroundColorCommand.id,
|
|
17776
17800
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
17777
|
-
title: "toolbar.resetColor",
|
|
17801
|
+
title: "sheets-ui.toolbar.resetColor",
|
|
17778
17802
|
icon: "NoColorDoubleIcon",
|
|
17779
17803
|
disabled$: getCurrentRangeDisable$(accessor, {
|
|
17780
17804
|
workbookTypes: [_univerjs_sheets.WorkbookEditablePermission],
|
|
@@ -17789,7 +17813,7 @@ function BackgroundColorSelectorMenuItemFactory(accessor) {
|
|
|
17789
17813
|
const selectionManagerService = accessor.get(_univerjs_sheets.SheetsSelectionsService);
|
|
17790
17814
|
return {
|
|
17791
17815
|
id: _univerjs_sheets.SetBackgroundColorCommand.id,
|
|
17792
|
-
tooltip: "toolbar.fillColor.main",
|
|
17816
|
+
tooltip: "sheets-ui.toolbar.fillColor.main",
|
|
17793
17817
|
type: _univerjs_ui.MenuItemType.BUTTON_SELECTOR,
|
|
17794
17818
|
icon: "PaintBucketDoubleIcon",
|
|
17795
17819
|
selections: [{
|
|
@@ -17828,17 +17852,17 @@ function BackgroundColorSelectorMenuItemFactory(accessor) {
|
|
|
17828
17852
|
}
|
|
17829
17853
|
const HORIZONTAL_ALIGN_CHILDREN = [
|
|
17830
17854
|
{
|
|
17831
|
-
label: "align.left",
|
|
17855
|
+
label: "sheets-ui.align.left",
|
|
17832
17856
|
icon: "LeftJustifyingIcon",
|
|
17833
17857
|
value: _univerjs_core.HorizontalAlign.LEFT
|
|
17834
17858
|
},
|
|
17835
17859
|
{
|
|
17836
|
-
label: "align.center",
|
|
17860
|
+
label: "sheets-ui.align.center",
|
|
17837
17861
|
icon: "HorizontallyIcon",
|
|
17838
17862
|
value: _univerjs_core.HorizontalAlign.CENTER
|
|
17839
17863
|
},
|
|
17840
17864
|
{
|
|
17841
|
-
label: "align.right",
|
|
17865
|
+
label: "sheets-ui.align.right",
|
|
17842
17866
|
icon: "RightJustifyingIcon",
|
|
17843
17867
|
value: _univerjs_core.HorizontalAlign.RIGHT
|
|
17844
17868
|
}
|
|
@@ -17853,7 +17877,7 @@ function HorizontalAlignMenuItemFactory(accessor) {
|
|
|
17853
17877
|
return {
|
|
17854
17878
|
id: _univerjs_sheets.SetHorizontalTextAlignCommand.id,
|
|
17855
17879
|
icon: (_HORIZONTAL_ALIGN_CHI = HORIZONTAL_ALIGN_CHILDREN.find((child) => child.value === defaultValue)) === null || _HORIZONTAL_ALIGN_CHI === void 0 ? void 0 : _HORIZONTAL_ALIGN_CHI.icon,
|
|
17856
|
-
tooltip: "toolbar.horizontalAlignMode.main",
|
|
17880
|
+
tooltip: "sheets-ui.toolbar.horizontalAlignMode.main",
|
|
17857
17881
|
type: _univerjs_ui.MenuItemType.SELECTOR,
|
|
17858
17882
|
selections: HORIZONTAL_ALIGN_CHILDREN,
|
|
17859
17883
|
value$: deriveStateFromActiveSheet$(univerInstanceService, defaultValue, ({ worksheet }) => new rxjs.Observable((subscriber) => {
|
|
@@ -17893,17 +17917,17 @@ function HorizontalAlignMenuItemFactory(accessor) {
|
|
|
17893
17917
|
}
|
|
17894
17918
|
const VERTICAL_ALIGN_CHILDREN = [
|
|
17895
17919
|
{
|
|
17896
|
-
label: "align.top",
|
|
17920
|
+
label: "sheets-ui.align.top",
|
|
17897
17921
|
icon: "AlignTopIcon",
|
|
17898
17922
|
value: _univerjs_core.VerticalAlign.TOP
|
|
17899
17923
|
},
|
|
17900
17924
|
{
|
|
17901
|
-
label: "align.middle",
|
|
17925
|
+
label: "sheets-ui.align.middle",
|
|
17902
17926
|
icon: "VerticalCenterIcon",
|
|
17903
17927
|
value: _univerjs_core.VerticalAlign.MIDDLE
|
|
17904
17928
|
},
|
|
17905
17929
|
{
|
|
17906
|
-
label: "align.bottom",
|
|
17930
|
+
label: "sheets-ui.align.bottom",
|
|
17907
17931
|
icon: "AlignBottomIcon",
|
|
17908
17932
|
value: _univerjs_core.VerticalAlign.BOTTOM
|
|
17909
17933
|
}
|
|
@@ -17918,7 +17942,7 @@ function VerticalAlignMenuItemFactory(accessor) {
|
|
|
17918
17942
|
return {
|
|
17919
17943
|
id: _univerjs_sheets.SetVerticalTextAlignCommand.id,
|
|
17920
17944
|
icon: (_VERTICAL_ALIGN_CHILD = VERTICAL_ALIGN_CHILDREN.find((child) => child.value === defaultValue)) === null || _VERTICAL_ALIGN_CHILD === void 0 ? void 0 : _VERTICAL_ALIGN_CHILD.icon,
|
|
17921
|
-
tooltip: "toolbar.verticalAlignMode.main",
|
|
17945
|
+
tooltip: "sheets-ui.toolbar.verticalAlignMode.main",
|
|
17922
17946
|
type: _univerjs_ui.MenuItemType.SELECTOR,
|
|
17923
17947
|
selections: VERTICAL_ALIGN_CHILDREN,
|
|
17924
17948
|
value$: deriveStateFromActiveSheet$(univerInstanceService, defaultValue, ({ worksheet }) => new rxjs.Observable((subscriber) => {
|
|
@@ -17958,17 +17982,17 @@ function VerticalAlignMenuItemFactory(accessor) {
|
|
|
17958
17982
|
}
|
|
17959
17983
|
const TEXT_WRAP_CHILDREN = [
|
|
17960
17984
|
{
|
|
17961
|
-
label: "textWrap.overflow",
|
|
17985
|
+
label: "sheets-ui.textWrap.overflow",
|
|
17962
17986
|
icon: "OverflowIcon",
|
|
17963
17987
|
value: _univerjs_core.WrapStrategy.OVERFLOW
|
|
17964
17988
|
},
|
|
17965
17989
|
{
|
|
17966
|
-
label: "textWrap.wrap",
|
|
17990
|
+
label: "sheets-ui.textWrap.wrap",
|
|
17967
17991
|
icon: "AutowrapIcon",
|
|
17968
17992
|
value: _univerjs_core.WrapStrategy.WRAP
|
|
17969
17993
|
},
|
|
17970
17994
|
{
|
|
17971
|
-
label: "textWrap.clip",
|
|
17995
|
+
label: "sheets-ui.textWrap.clip",
|
|
17972
17996
|
icon: "TruncationIcon",
|
|
17973
17997
|
value: _univerjs_core.WrapStrategy.CLIP
|
|
17974
17998
|
}
|
|
@@ -17982,7 +18006,7 @@ function WrapTextMenuItemFactory(accessor) {
|
|
|
17982
18006
|
const defaultValue = (_defaultStyle$tb = defaultStyle === null || defaultStyle === void 0 ? void 0 : defaultStyle.tb) !== null && _defaultStyle$tb !== void 0 ? _defaultStyle$tb : _univerjs_core.WrapStrategy.OVERFLOW;
|
|
17983
18007
|
return {
|
|
17984
18008
|
id: _univerjs_sheets.SetTextWrapCommand.id,
|
|
17985
|
-
tooltip: "toolbar.textWrapMode.main",
|
|
18009
|
+
tooltip: "sheets-ui.toolbar.textWrapMode.main",
|
|
17986
18010
|
icon: (_TEXT_WRAP_CHILDREN$f = TEXT_WRAP_CHILDREN.find((child) => child.value === defaultValue)) === null || _TEXT_WRAP_CHILDREN$f === void 0 ? void 0 : _TEXT_WRAP_CHILDREN$f.icon,
|
|
17987
18011
|
type: _univerjs_ui.MenuItemType.SELECTOR,
|
|
17988
18012
|
selections: TEXT_WRAP_CHILDREN,
|
|
@@ -18023,32 +18047,32 @@ function WrapTextMenuItemFactory(accessor) {
|
|
|
18023
18047
|
}
|
|
18024
18048
|
const TEXT_ROTATE_CHILDREN = [
|
|
18025
18049
|
{
|
|
18026
|
-
label: "textRotate.none",
|
|
18050
|
+
label: "sheets-ui.textRotate.none",
|
|
18027
18051
|
icon: "NoRotationIcon",
|
|
18028
18052
|
value: 0
|
|
18029
18053
|
},
|
|
18030
18054
|
{
|
|
18031
|
-
label: "textRotate.angleUp",
|
|
18055
|
+
label: "sheets-ui.textRotate.angleUp",
|
|
18032
18056
|
icon: "LeftRotationFortyFiveDegreesIcon",
|
|
18033
18057
|
value: -45
|
|
18034
18058
|
},
|
|
18035
18059
|
{
|
|
18036
|
-
label: "textRotate.angleDown",
|
|
18060
|
+
label: "sheets-ui.textRotate.angleDown",
|
|
18037
18061
|
icon: "RightRotationFortyFiveDegreesIcon",
|
|
18038
18062
|
value: 45
|
|
18039
18063
|
},
|
|
18040
18064
|
{
|
|
18041
|
-
label: "textRotate.vertical",
|
|
18065
|
+
label: "sheets-ui.textRotate.vertical",
|
|
18042
18066
|
icon: "VerticalTextIcon",
|
|
18043
18067
|
value: "v"
|
|
18044
18068
|
},
|
|
18045
18069
|
{
|
|
18046
|
-
label: "textRotate.rotationUp",
|
|
18070
|
+
label: "sheets-ui.textRotate.rotationUp",
|
|
18047
18071
|
icon: "LeftRotationNinetyDegreesIcon",
|
|
18048
18072
|
value: -90
|
|
18049
18073
|
},
|
|
18050
18074
|
{
|
|
18051
|
-
label: "textRotate.rotationDown",
|
|
18075
|
+
label: "sheets-ui.textRotate.rotationDown",
|
|
18052
18076
|
icon: "RightRotationNinetyDegreesIcon",
|
|
18053
18077
|
value: 90
|
|
18054
18078
|
}
|
|
@@ -18059,7 +18083,7 @@ function TextRotateMenuItemFactory(accessor) {
|
|
|
18059
18083
|
const defaultValue = 0;
|
|
18060
18084
|
return {
|
|
18061
18085
|
id: _univerjs_sheets.SetTextRotationCommand.id,
|
|
18062
|
-
tooltip: "toolbar.textRotateMode.main",
|
|
18086
|
+
tooltip: "sheets-ui.toolbar.textRotateMode.main",
|
|
18063
18087
|
icon: TEXT_ROTATE_CHILDREN[0].icon,
|
|
18064
18088
|
type: _univerjs_ui.MenuItemType.SELECTOR,
|
|
18065
18089
|
selections: TEXT_ROTATE_CHILDREN,
|
|
@@ -18117,7 +18141,7 @@ function CopyMenuItemFactory(accessor) {
|
|
|
18117
18141
|
id: SheetCopyCommand.name,
|
|
18118
18142
|
commandId: SheetCopyCommand.id,
|
|
18119
18143
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
18120
|
-
title: "rightClick.copy",
|
|
18144
|
+
title: "sheets-ui.rightClick.copy",
|
|
18121
18145
|
icon: "CopyDoubleIcon",
|
|
18122
18146
|
disabled$: getCurrentRangeDisable$(accessor, {
|
|
18123
18147
|
workbookTypes: [_univerjs_sheets.WorkbookCopyPermission],
|
|
@@ -18132,7 +18156,7 @@ function CutMenuItemFactory(accessor) {
|
|
|
18132
18156
|
id: SheetCutCommand.name,
|
|
18133
18157
|
commandId: _univerjs_ui.CutCommand.id,
|
|
18134
18158
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
18135
|
-
title: "rightClick.cut",
|
|
18159
|
+
title: "sheets-ui.rightClick.cut",
|
|
18136
18160
|
icon: "CutIcon",
|
|
18137
18161
|
disabled$: getCurrentRangeDisable$(accessor, {
|
|
18138
18162
|
workbookTypes: [_univerjs_sheets.WorkbookCopyPermission, _univerjs_sheets.WorkbookEditablePermission],
|
|
@@ -18147,7 +18171,7 @@ function PasteMenuItemFactory(accessor) {
|
|
|
18147
18171
|
id: SheetPasteCommand.name,
|
|
18148
18172
|
commandId: SheetPasteCommand.id,
|
|
18149
18173
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
18150
|
-
title: "rightClick.paste",
|
|
18174
|
+
title: "sheets-ui.rightClick.paste",
|
|
18151
18175
|
icon: "PasteSpecialDoubleIcon",
|
|
18152
18176
|
disabled$: menuClipboardDisabledObservable(accessor).pipe((0, rxjs.combineLatestWith)(getCurrentRangeDisable$(accessor, {
|
|
18153
18177
|
rangeTypes: [_univerjs_sheets.RangeProtectionPermissionEditPoint],
|
|
@@ -18167,7 +18191,7 @@ function CopySpacialMenuItemFactory(accessor) {
|
|
|
18167
18191
|
id: COPY_SPECIAL_MENU_ID,
|
|
18168
18192
|
type: _univerjs_ui.MenuItemType.SUBITEMS,
|
|
18169
18193
|
icon: "CopyDoubleIcon",
|
|
18170
|
-
title: "rightClick.copySpecial",
|
|
18194
|
+
title: "sheets-ui.rightClick.copySpecial",
|
|
18171
18195
|
hidden$: getObservableWithExclusiveRange$(accessor, (0, _univerjs_ui.getMenuHiddenObservable)(accessor, _univerjs_core.UniverInstanceType.UNIVER_SHEET))
|
|
18172
18196
|
};
|
|
18173
18197
|
}
|
|
@@ -18177,7 +18201,7 @@ function PasteSpacialMenuItemFactory(accessor) {
|
|
|
18177
18201
|
id: PASTE_SPECIAL_MENU_ID,
|
|
18178
18202
|
type: _univerjs_ui.MenuItemType.SUBITEMS,
|
|
18179
18203
|
icon: "PasteSpecialDoubleIcon",
|
|
18180
|
-
title: "rightClick.pasteSpecial",
|
|
18204
|
+
title: "sheets-ui.rightClick.pasteSpecial",
|
|
18181
18205
|
hidden$: getObservableWithExclusiveRange$(accessor, (0, _univerjs_ui.getMenuHiddenObservable)(accessor, _univerjs_core.UniverInstanceType.UNIVER_SHEET))
|
|
18182
18206
|
};
|
|
18183
18207
|
}
|
|
@@ -18185,7 +18209,7 @@ function PasteValueMenuItemFactory(accessor) {
|
|
|
18185
18209
|
return {
|
|
18186
18210
|
id: SheetPasteValueCommand.id,
|
|
18187
18211
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
18188
|
-
title: "rightClick.pasteValue",
|
|
18212
|
+
title: "sheets-ui.rightClick.pasteValue",
|
|
18189
18213
|
disabled$: menuClipboardDisabledObservable(accessor).pipe((0, rxjs.combineLatestWith)(getCurrentRangeDisable$(accessor, {
|
|
18190
18214
|
rangeTypes: [_univerjs_sheets.RangeProtectionPermissionEditPoint],
|
|
18191
18215
|
worksheetTypes: [_univerjs_sheets.WorksheetSetCellValuePermission, _univerjs_sheets.WorksheetEditPermission],
|
|
@@ -18198,7 +18222,7 @@ function PasteFormatMenuItemFactory(accessor) {
|
|
|
18198
18222
|
return {
|
|
18199
18223
|
id: SheetPasteFormatCommand.id,
|
|
18200
18224
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
18201
|
-
title: "rightClick.pasteFormat",
|
|
18225
|
+
title: "sheets-ui.rightClick.pasteFormat",
|
|
18202
18226
|
disabled$: menuClipboardDisabledObservable(accessor).pipe((0, rxjs.combineLatestWith)(getCurrentRangeDisable$(accessor, {
|
|
18203
18227
|
rangeTypes: [_univerjs_sheets.RangeProtectionPermissionEditPoint],
|
|
18204
18228
|
worksheetTypes: [_univerjs_sheets.WorksheetSetCellStylePermission, _univerjs_sheets.WorksheetEditPermission],
|
|
@@ -18211,7 +18235,7 @@ function PasteColWidthMenuItemFactory(accessor) {
|
|
|
18211
18235
|
return {
|
|
18212
18236
|
id: SheetPasteColWidthCommand.id,
|
|
18213
18237
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
18214
|
-
title: "rightClick.pasteColWidth",
|
|
18238
|
+
title: "sheets-ui.rightClick.pasteColWidth",
|
|
18215
18239
|
disabled$: menuClipboardDisabledObservable(accessor).pipe((0, rxjs.combineLatestWith)(getCurrentRangeDisable$(accessor, {
|
|
18216
18240
|
rangeTypes: [_univerjs_sheets.RangeProtectionPermissionEditPoint],
|
|
18217
18241
|
worksheetTypes: [_univerjs_sheets.WorksheetSetColumnStylePermission, _univerjs_sheets.WorksheetEditPermission],
|
|
@@ -18223,7 +18247,7 @@ function PasteBesidesBorderMenuItemFactory(accessor) {
|
|
|
18223
18247
|
return {
|
|
18224
18248
|
id: SheetPasteBesidesBorderCommand.id,
|
|
18225
18249
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
18226
|
-
title: "rightClick.pasteBesidesBorder",
|
|
18250
|
+
title: "sheets-ui.rightClick.pasteBesidesBorder",
|
|
18227
18251
|
disabled$: menuClipboardDisabledObservable(accessor).pipe((0, rxjs.combineLatestWith)(getCurrentRangeDisable$(accessor, {
|
|
18228
18252
|
rangeTypes: [_univerjs_sheets.RangeProtectionPermissionEditPoint],
|
|
18229
18253
|
worksheetTypes: [
|
|
@@ -18243,7 +18267,7 @@ function FitContentMenuItemFactory(accessor) {
|
|
|
18243
18267
|
id: _univerjs_sheets.SetWorksheetRowIsAutoHeightCommand.id,
|
|
18244
18268
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
18245
18269
|
icon: "AutoHeightDoubleIcon",
|
|
18246
|
-
title: "rightClick.fitContent",
|
|
18270
|
+
title: "sheets-ui.rightClick.fitContent",
|
|
18247
18271
|
disabled$: getCurrentRangeDisable$(accessor, {
|
|
18248
18272
|
workbookTypes: [_univerjs_sheets.WorkbookEditablePermission],
|
|
18249
18273
|
worksheetTypes: [_univerjs_sheets.WorksheetSetRowStylePermission, _univerjs_sheets.WorksheetEditPermission],
|
|
@@ -18257,7 +18281,7 @@ function ColAutoWidthMenuItemFactory(accessor) {
|
|
|
18257
18281
|
id: SetWorksheetColAutoWidthCommand.id,
|
|
18258
18282
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
18259
18283
|
icon: "AutoWidthDoubleIcon",
|
|
18260
|
-
title: "rightClick.fitContent",
|
|
18284
|
+
title: "sheets-ui.rightClick.fitContent",
|
|
18261
18285
|
disabled$: getCurrentRangeDisable$(accessor, {
|
|
18262
18286
|
workbookTypes: [_univerjs_sheets.WorkbookEditablePermission],
|
|
18263
18287
|
worksheetTypes: [_univerjs_sheets.WorksheetSetRowStylePermission, _univerjs_sheets.WorksheetEditPermission],
|
|
@@ -18271,7 +18295,7 @@ function HideRowMenuItemFactory(accessor) {
|
|
|
18271
18295
|
id: HideRowConfirmCommand.id,
|
|
18272
18296
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
18273
18297
|
icon: "HideDoubleIcon",
|
|
18274
|
-
title: "rightClick.hideSelectedRow",
|
|
18298
|
+
title: "sheets-ui.rightClick.hideSelectedRow",
|
|
18275
18299
|
disabled$: getCurrentRangeDisable$(accessor, {
|
|
18276
18300
|
workbookTypes: [_univerjs_sheets.WorkbookEditablePermission],
|
|
18277
18301
|
worksheetTypes: [_univerjs_sheets.WorksheetSetRowStylePermission, _univerjs_sheets.WorksheetEditPermission],
|
|
@@ -18285,7 +18309,7 @@ function HideColMenuItemFactory(accessor) {
|
|
|
18285
18309
|
id: HideColConfirmCommand.id,
|
|
18286
18310
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
18287
18311
|
icon: "HideDoubleIcon",
|
|
18288
|
-
title: "rightClick.hideSelectedColumn",
|
|
18312
|
+
title: "sheets-ui.rightClick.hideSelectedColumn",
|
|
18289
18313
|
disabled$: getCurrentRangeDisable$(accessor, {
|
|
18290
18314
|
workbookTypes: [_univerjs_sheets.WorkbookEditablePermission],
|
|
18291
18315
|
worksheetTypes: [_univerjs_sheets.WorksheetEditPermission, _univerjs_sheets.WorksheetSetColumnStylePermission],
|
|
@@ -18307,7 +18331,7 @@ function ShowRowMenuItemFactory(accessor) {
|
|
|
18307
18331
|
id: _univerjs_sheets.SetSelectedRowsVisibleCommand.id,
|
|
18308
18332
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
18309
18333
|
icon: "EyeOutlineIcon",
|
|
18310
|
-
title: "rightClick.showHideRow",
|
|
18334
|
+
title: "sheets-ui.rightClick.showHideRow",
|
|
18311
18335
|
hidden$: deriveStateFromActiveSheet$(univerInstanceService, true, ({ worksheet }) => new rxjs.Observable((subscriber) => {
|
|
18312
18336
|
function hasHiddenRowsInSelections() {
|
|
18313
18337
|
var _selectionManagerServ18;
|
|
@@ -18343,7 +18367,7 @@ function ShowColMenuItemFactory(accessor) {
|
|
|
18343
18367
|
id: _univerjs_sheets.SetSelectedColsVisibleCommand.id,
|
|
18344
18368
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
18345
18369
|
icon: "EyeOutlineIcon",
|
|
18346
|
-
title: "rightClick.showHideColumn",
|
|
18370
|
+
title: "sheets-ui.rightClick.showHideColumn",
|
|
18347
18371
|
hidden$: deriveStateFromActiveSheet$(univerInstanceService, true, ({ worksheet }) => new rxjs.Observable((subscriber) => {
|
|
18348
18372
|
function hasHiddenColsInSelections() {
|
|
18349
18373
|
var _selectionManagerServ19;
|
|
@@ -18379,7 +18403,7 @@ function SetRowHeightMenuItemFactory(accessor) {
|
|
|
18379
18403
|
label: {
|
|
18380
18404
|
name: MENU_ITEM_INPUT_COMPONENT,
|
|
18381
18405
|
props: {
|
|
18382
|
-
prefix: "rightClick.rowHeight",
|
|
18406
|
+
prefix: "sheets-ui.rightClick.rowHeight",
|
|
18383
18407
|
suffix: "px",
|
|
18384
18408
|
min,
|
|
18385
18409
|
max: 1e3
|
|
@@ -18418,7 +18442,7 @@ function SetColWidthMenuItemFactory(accessor) {
|
|
|
18418
18442
|
label: {
|
|
18419
18443
|
name: MENU_ITEM_INPUT_COMPONENT,
|
|
18420
18444
|
props: {
|
|
18421
|
-
prefix: "rightClick.columnWidth",
|
|
18445
|
+
prefix: "sheets-ui.rightClick.columnWidth",
|
|
18422
18446
|
suffix: "px",
|
|
18423
18447
|
min,
|
|
18424
18448
|
max: 1e3
|
|
@@ -18462,7 +18486,7 @@ function CellMergeMenuItemFactory(accessor) {
|
|
|
18462
18486
|
return {
|
|
18463
18487
|
id: _univerjs_sheets.AddWorksheetMergeCommand.id,
|
|
18464
18488
|
icon: "MergeAllIcon",
|
|
18465
|
-
tooltip: "toolbar.mergeCell.main",
|
|
18489
|
+
tooltip: "sheets-ui.toolbar.mergeCell.main",
|
|
18466
18490
|
type: _univerjs_ui.MenuItemType.SUBITEMS,
|
|
18467
18491
|
hidden$: (0, rxjs.combineLatest)([(0, _univerjs_ui.getMenuHiddenObservable)(accessor, _univerjs_core.UniverInstanceType.UNIVER_SHEET), accessor.get(_univerjs_core.IContextService).subscribeContextValue$(_univerjs_core.FOCUSING_COMMON_DRAWINGS).pipe((0, rxjs.startWith)(false))]).pipe((0, rxjs.map)(([hidden, focusingDrawing]) => hidden || focusingDrawing)),
|
|
18468
18492
|
disabled$: editDisabled$.pipe((0, rxjs.combineLatestWith)(selectionsHasCross$), (0, rxjs.map)(([disable, hasCross]) => disable || hasCross))
|
|
@@ -18472,7 +18496,7 @@ function CellMergeAllMenuItemFactory(accessor) {
|
|
|
18472
18496
|
return {
|
|
18473
18497
|
id: _univerjs_sheets.AddWorksheetMergeAllCommand.id,
|
|
18474
18498
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
18475
|
-
title: "merge.all",
|
|
18499
|
+
title: "sheets-ui.merge.all",
|
|
18476
18500
|
icon: "MergeAllIcon",
|
|
18477
18501
|
hidden$: (0, _univerjs_ui.getMenuHiddenObservable)(accessor, _univerjs_core.UniverInstanceType.UNIVER_SHEET)
|
|
18478
18502
|
};
|
|
@@ -18481,7 +18505,7 @@ function CellMergeVerticalMenuItemFactory(accessor) {
|
|
|
18481
18505
|
return {
|
|
18482
18506
|
id: _univerjs_sheets.AddWorksheetMergeVerticalCommand.id,
|
|
18483
18507
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
18484
|
-
title: "merge.vertical",
|
|
18508
|
+
title: "sheets-ui.merge.vertical",
|
|
18485
18509
|
icon: "VerticalIntegrationIcon",
|
|
18486
18510
|
hidden$: (0, _univerjs_ui.getMenuHiddenObservable)(accessor, _univerjs_core.UniverInstanceType.UNIVER_SHEET)
|
|
18487
18511
|
};
|
|
@@ -18490,7 +18514,7 @@ function CellMergeHorizontalMenuItemFactory(accessor) {
|
|
|
18490
18514
|
return {
|
|
18491
18515
|
id: _univerjs_sheets.AddWorksheetMergeHorizontalCommand.id,
|
|
18492
18516
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
18493
|
-
title: "merge.horizontal",
|
|
18517
|
+
title: "sheets-ui.merge.horizontal",
|
|
18494
18518
|
icon: "HorizontalMergeIcon",
|
|
18495
18519
|
hidden$: (0, _univerjs_ui.getMenuHiddenObservable)(accessor, _univerjs_core.UniverInstanceType.UNIVER_SHEET)
|
|
18496
18520
|
};
|
|
@@ -18499,7 +18523,7 @@ function CellMergeCancelMenuItemFactory(accessor) {
|
|
|
18499
18523
|
return {
|
|
18500
18524
|
id: _univerjs_sheets.RemoveWorksheetMergeCommand.id,
|
|
18501
18525
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
18502
|
-
title: "merge.cancel",
|
|
18526
|
+
title: "sheets-ui.merge.cancel",
|
|
18503
18527
|
icon: "CancelMergeIcon",
|
|
18504
18528
|
hidden$: (0, _univerjs_ui.getMenuHiddenObservable)(accessor, _univerjs_core.UniverInstanceType.UNIVER_SHEET)
|
|
18505
18529
|
};
|
|
@@ -18611,8 +18635,14 @@ function getAddPermissionDisableBase$(accessor) {
|
|
|
18611
18635
|
const workbook$ = univerInstanceService.getCurrentTypeOfUnit$(_univerjs_core.UniverInstanceType.UNIVER_SHEET);
|
|
18612
18636
|
const userManagerService = accessor.get(_univerjs_core.UserManagerService);
|
|
18613
18637
|
const editorBridgeService = accessor.has(IEditorBridgeService) ? accessor.get(IEditorBridgeService) : null;
|
|
18614
|
-
const formulaEditorFocus$ = accessor.get(_univerjs_core.IContextService).subscribeContextValue$(_univerjs_core.FOCUSING_FX_BAR_EDITOR).pipe((0, rxjs.startWith)(false), (0, rxjs.shareReplay)(
|
|
18615
|
-
|
|
18638
|
+
const formulaEditorFocus$ = accessor.get(_univerjs_core.IContextService).subscribeContextValue$(_univerjs_core.FOCUSING_FX_BAR_EDITOR).pipe((0, rxjs.startWith)(false), (0, rxjs.shareReplay)({
|
|
18639
|
+
bufferSize: 1,
|
|
18640
|
+
refCount: true
|
|
18641
|
+
}));
|
|
18642
|
+
const editorVisible$ = (_editorBridgeService$ = editorBridgeService === null || editorBridgeService === void 0 ? void 0 : editorBridgeService.visible$.pipe((0, rxjs.startWith)(null), (0, rxjs.shareReplay)({
|
|
18643
|
+
bufferSize: 1,
|
|
18644
|
+
refCount: true
|
|
18645
|
+
}))) !== null && _editorBridgeService$ !== void 0 ? _editorBridgeService$ : (0, rxjs.of)(null);
|
|
18616
18646
|
return (0, rxjs.combineLatest)([
|
|
18617
18647
|
workbook$,
|
|
18618
18648
|
userManagerService.currentUser$,
|
|
@@ -18788,7 +18818,7 @@ function sheetPermissionToolbarMenuFactory(accessor) {
|
|
|
18788
18818
|
id: AddRangeProtectionFromToolbarCommand.id,
|
|
18789
18819
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
18790
18820
|
icon: permissionMenuIconKey,
|
|
18791
|
-
tooltip: "permission.toolbarMenu",
|
|
18821
|
+
tooltip: "sheets-ui.permission.toolbarMenu",
|
|
18792
18822
|
hidden$: (0, _univerjs_ui.getMenuHiddenObservable)(accessor, _univerjs_core.UniverInstanceType.UNIVER_SHEET),
|
|
18793
18823
|
disabled$: getAddPermissionDisableBase$(accessor)
|
|
18794
18824
|
};
|
|
@@ -18797,7 +18827,7 @@ function sheetPermissionContextMenuFactory(accessor) {
|
|
|
18797
18827
|
return {
|
|
18798
18828
|
id: SHEET_PERMISSION_CONTEXT_MENU_ID,
|
|
18799
18829
|
type: _univerjs_ui.MenuItemType.SUBITEMS,
|
|
18800
|
-
title: "rightClick.protectRange",
|
|
18830
|
+
title: "sheets-ui.rightClick.protectRange",
|
|
18801
18831
|
icon: permissionLockIconKey,
|
|
18802
18832
|
hidden$: (0, _univerjs_ui.getMenuHiddenObservable)(accessor, _univerjs_core.UniverInstanceType.UNIVER_SHEET)
|
|
18803
18833
|
};
|
|
@@ -18806,7 +18836,7 @@ function sheetPermissionAddProtectContextMenuFactory(accessor) {
|
|
|
18806
18836
|
return {
|
|
18807
18837
|
id: AddRangeProtectionFromContextMenuCommand.id,
|
|
18808
18838
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
18809
|
-
title: "rightClick.turnOnProtectRange",
|
|
18839
|
+
title: "sheets-ui.rightClick.turnOnProtectRange",
|
|
18810
18840
|
hidden$: getAddPermissionHidden$(accessor),
|
|
18811
18841
|
disabled$: getAddPermissionDisableBase$(accessor)
|
|
18812
18842
|
};
|
|
@@ -18815,7 +18845,7 @@ function sheetPermissionEditProtectContextMenuFactory(accessor) {
|
|
|
18815
18845
|
return {
|
|
18816
18846
|
id: SetRangeProtectionFromContextMenuCommand.id,
|
|
18817
18847
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
18818
|
-
title: "rightClick.editProtectRange",
|
|
18848
|
+
title: "sheets-ui.rightClick.editProtectRange",
|
|
18819
18849
|
disabled$: getPermissionDisableBase$(accessor),
|
|
18820
18850
|
hidden$: getEditPermissionHidden$(accessor)
|
|
18821
18851
|
};
|
|
@@ -18824,7 +18854,7 @@ function sheetPermissionRemoveProtectContextMenuFactory(accessor) {
|
|
|
18824
18854
|
return {
|
|
18825
18855
|
id: DeleteRangeProtectionFromContextMenuCommand.id,
|
|
18826
18856
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
18827
|
-
title: "rightClick.removeProtectRange",
|
|
18857
|
+
title: "sheets-ui.rightClick.removeProtectRange",
|
|
18828
18858
|
disabled$: getRemovePermissionDisable$(accessor),
|
|
18829
18859
|
hidden$: (0, _univerjs_ui.getMenuHiddenObservable)(accessor, _univerjs_core.UniverInstanceType.UNIVER_SHEET)
|
|
18830
18860
|
};
|
|
@@ -18833,7 +18863,7 @@ function sheetPermissionViewAllProtectRuleContextMenuFactory(accessor) {
|
|
|
18833
18863
|
return {
|
|
18834
18864
|
id: ViewSheetPermissionFromContextMenuCommand.id,
|
|
18835
18865
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
18836
|
-
title: "rightClick.viewAllProtectArea",
|
|
18866
|
+
title: "sheets-ui.rightClick.viewAllProtectArea",
|
|
18837
18867
|
disabled$: getViewPermissionDisable$(accessor),
|
|
18838
18868
|
hidden$: (0, _univerjs_ui.getMenuHiddenObservable)(accessor, _univerjs_core.UniverInstanceType.UNIVER_SHEET)
|
|
18839
18869
|
};
|
|
@@ -18842,7 +18872,7 @@ function sheetPermissionProtectSheetInSheetBarMenuFactory(accessor) {
|
|
|
18842
18872
|
return {
|
|
18843
18873
|
id: AddRangeProtectionFromSheetBarCommand.id,
|
|
18844
18874
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
18845
|
-
title: "sheetConfig.addProtectSheet",
|
|
18875
|
+
title: "sheets-ui.sheetConfig.addProtectSheet",
|
|
18846
18876
|
disabled$: getAddPermissionFromSheetBarDisable$(accessor),
|
|
18847
18877
|
hidden$: (0, _univerjs_ui.getMenuHiddenObservable)(accessor, _univerjs_core.UniverInstanceType.UNIVER_SHEET)
|
|
18848
18878
|
};
|
|
@@ -18851,7 +18881,7 @@ function sheetPermissionRemoveProtectionSheetBarMenuFactory(accessor) {
|
|
|
18851
18881
|
return {
|
|
18852
18882
|
id: DeleteWorksheetProtectionFormSheetBarCommand.id,
|
|
18853
18883
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
18854
|
-
title: "sheetConfig.removeProtectSheet",
|
|
18884
|
+
title: "sheets-ui.sheetConfig.removeProtectSheet",
|
|
18855
18885
|
disabled$: getRemovePermissionFromSheetBarDisable$(accessor),
|
|
18856
18886
|
hidden$: (0, _univerjs_ui.getMenuHiddenObservable)(accessor, _univerjs_core.UniverInstanceType.UNIVER_SHEET)
|
|
18857
18887
|
};
|
|
@@ -18860,7 +18890,7 @@ function sheetPermissionChangeSheetPermissionSheetBarMenuFactory(accessor) {
|
|
|
18860
18890
|
return {
|
|
18861
18891
|
id: ChangeSheetProtectionFromSheetBarCommand.id,
|
|
18862
18892
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
18863
|
-
title: "sheetConfig.changeSheetPermission",
|
|
18893
|
+
title: "sheets-ui.sheetConfig.changeSheetPermission",
|
|
18864
18894
|
disabled$: getSetPermissionFromSheetBarDisable$(accessor),
|
|
18865
18895
|
hidden$: (0, _univerjs_ui.getMenuHiddenObservable)(accessor, _univerjs_core.UniverInstanceType.UNIVER_SHEET)
|
|
18866
18896
|
};
|
|
@@ -18869,7 +18899,7 @@ function sheetPermissionViewAllProtectRuleSheetBarMenuFactory(accessor) {
|
|
|
18869
18899
|
return {
|
|
18870
18900
|
id: ViewSheetPermissionFromSheetBarCommand.id,
|
|
18871
18901
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
18872
|
-
title: "sheetConfig.viewAllProtectArea",
|
|
18902
|
+
title: "sheets-ui.sheetConfig.viewAllProtectArea",
|
|
18873
18903
|
disabled$: getViewPermissionDisable$(accessor),
|
|
18874
18904
|
hidden$: (0, _univerjs_ui.getMenuHiddenObservable)(accessor, _univerjs_core.UniverInstanceType.UNIVER_SHEET)
|
|
18875
18905
|
};
|
|
@@ -18892,7 +18922,7 @@ function DeleteSheetMenuItemFactory(accessor) {
|
|
|
18892
18922
|
return {
|
|
18893
18923
|
id: RemoveSheetConfirmCommand.id,
|
|
18894
18924
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
18895
|
-
title: "sheetConfig.delete",
|
|
18925
|
+
title: "sheets-ui.sheetConfig.delete",
|
|
18896
18926
|
disabled$: (0, rxjs.combineLatest)([defaultDisable$, permissionDisable$]).pipe((0, rxjs.map)(([defaultDisabled, permissionDisabled]) => {
|
|
18897
18927
|
return defaultDisabled || permissionDisabled;
|
|
18898
18928
|
})),
|
|
@@ -18903,7 +18933,7 @@ function CopySheetMenuItemFactory(accessor) {
|
|
|
18903
18933
|
return {
|
|
18904
18934
|
id: _univerjs_sheets.CopySheetCommand.id,
|
|
18905
18935
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
18906
|
-
title: "sheetConfig.copy",
|
|
18936
|
+
title: "sheets-ui.sheetConfig.copy",
|
|
18907
18937
|
disabled$: getWorkbookPermissionDisable$(accessor, [_univerjs_sheets.WorkbookEditablePermission, _univerjs_sheets.WorkbookCreateSheetPermission]),
|
|
18908
18938
|
hidden$: (0, _univerjs_ui.getMenuHiddenObservable)(accessor, _univerjs_core.UniverInstanceType.UNIVER_SHEET)
|
|
18909
18939
|
};
|
|
@@ -18912,7 +18942,7 @@ function RenameSheetMenuItemFactory(accessor) {
|
|
|
18912
18942
|
return {
|
|
18913
18943
|
id: RenameSheetOperation.id,
|
|
18914
18944
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
18915
|
-
title: "sheetConfig.rename",
|
|
18945
|
+
title: "sheets-ui.sheetConfig.rename",
|
|
18916
18946
|
disabled$: getWorkbookPermissionDisable$(accessor, [_univerjs_sheets.WorkbookEditablePermission, _univerjs_sheets.WorkbookRenameSheetPermission]),
|
|
18917
18947
|
hidden$: (0, _univerjs_ui.getMenuHiddenObservable)(accessor, _univerjs_core.UniverInstanceType.UNIVER_SHEET)
|
|
18918
18948
|
};
|
|
@@ -18920,7 +18950,7 @@ function RenameSheetMenuItemFactory(accessor) {
|
|
|
18920
18950
|
function ChangeColorSheetMenuItemFactory(accessor) {
|
|
18921
18951
|
return {
|
|
18922
18952
|
id: _univerjs_sheets.SetTabColorCommand.id,
|
|
18923
|
-
title: "sheetConfig.changeColor",
|
|
18953
|
+
title: "sheets-ui.sheetConfig.changeColor",
|
|
18924
18954
|
type: _univerjs_ui.MenuItemType.SELECTOR,
|
|
18925
18955
|
selections: [{ label: {
|
|
18926
18956
|
name: _univerjs_ui.COLOR_PICKER_COMPONENT,
|
|
@@ -18936,7 +18966,7 @@ function HideSheetMenuItemFactory(accessor) {
|
|
|
18936
18966
|
return {
|
|
18937
18967
|
id: _univerjs_sheets.SetWorksheetHideCommand.id,
|
|
18938
18968
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
18939
|
-
title: "sheetConfig.hide",
|
|
18969
|
+
title: "sheets-ui.sheetConfig.hide",
|
|
18940
18970
|
disabled$: new rxjs.Observable((subscriber) => {
|
|
18941
18971
|
const disposable = commandService.onCommandExecuted((c) => {
|
|
18942
18972
|
const id = c.id;
|
|
@@ -18954,7 +18984,7 @@ function ShowMenuItemFactory(accessor) {
|
|
|
18954
18984
|
return {
|
|
18955
18985
|
id: ShowMenuListCommand.id,
|
|
18956
18986
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
18957
|
-
title: "sheetConfig.unhide",
|
|
18987
|
+
title: "sheets-ui.sheetConfig.unhide",
|
|
18958
18988
|
disabled$: new rxjs.Observable((subscriber) => {
|
|
18959
18989
|
function disableFunction() {
|
|
18960
18990
|
const worksheets = univerInstanceService.getCurrentUnitOfType(_univerjs_core.UniverInstanceType.UNIVER_SHEET).getWorksheets();
|
|
@@ -19011,7 +19041,7 @@ function Text2NumberToolbarMenuItemFactory(accessor) {
|
|
|
19011
19041
|
id: TEXT_TO_NUMBER_TOOLBAR_MENU_ID,
|
|
19012
19042
|
commandId: _univerjs_sheets.TextToNumberCommand.id,
|
|
19013
19043
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
19014
|
-
title: "toolbar.textToNumber",
|
|
19044
|
+
title: "sheets-ui.toolbar.textToNumber",
|
|
19015
19045
|
disabled$: getObservableWithExclusiveRange$(accessor, getCurrentRangeDisable$(accessor, {
|
|
19016
19046
|
workbookTypes: [_univerjs_sheets.WorkbookEditablePermission],
|
|
19017
19047
|
worksheetTypes: [_univerjs_sheets.WorksheetEditPermission, _univerjs_sheets.WorksheetSetCellValuePermission],
|
|
@@ -19026,7 +19056,7 @@ function Text2NumberContextMenuItemFactory(accessor) {
|
|
|
19026
19056
|
id: TEXT_TO_NUMBER_CONTEXT_MENU_ID,
|
|
19027
19057
|
commandId: _univerjs_sheets.TextToNumberCommand.id,
|
|
19028
19058
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
19029
|
-
title: "rightClick.textToNumber",
|
|
19059
|
+
title: "sheets-ui.rightClick.textToNumber",
|
|
19030
19060
|
icon: "PipingIcon",
|
|
19031
19061
|
disabled$: getObservableWithExclusiveRange$(accessor, getCurrentRangeDisable$(accessor, {
|
|
19032
19062
|
workbookTypes: [_univerjs_sheets.WorkbookEditablePermission],
|
|
@@ -20364,7 +20394,7 @@ const DefinedNameInput = (props) => {
|
|
|
20364
20394
|
const [typeValue, setTypeValue] = (0, react.useState)(type);
|
|
20365
20395
|
const [validFormulaOrRange, setValidFormulaOrRange] = (0, react.useState)(true);
|
|
20366
20396
|
const options = [{
|
|
20367
|
-
label: localeService.t("definedName.scopeWorkbook"),
|
|
20397
|
+
label: localeService.t("sheets-ui.definedName.scopeWorkbook"),
|
|
20368
20398
|
value: _univerjs_sheets.SCOPE_WORKBOOK_VALUE_DEFINED_NAME
|
|
20369
20399
|
}];
|
|
20370
20400
|
const isFormula = (token) => {
|
|
@@ -20412,7 +20442,7 @@ const DefinedNameInput = (props) => {
|
|
|
20412
20442
|
return;
|
|
20413
20443
|
}
|
|
20414
20444
|
if (!validFormulaOrRange) {
|
|
20415
|
-
setValidString(localeService.t("definedName.formulaOrRefStringInvalid"));
|
|
20445
|
+
setValidString(localeService.t("sheets-ui.definedName.formulaOrRefStringInvalid"));
|
|
20416
20446
|
return;
|
|
20417
20447
|
}
|
|
20418
20448
|
const currentSheetName = workbook.getActiveSheet().getName();
|
|
@@ -20443,7 +20473,7 @@ const DefinedNameInput = (props) => {
|
|
|
20443
20473
|
children: [
|
|
20444
20474
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Input, {
|
|
20445
20475
|
className: "univer-w-full",
|
|
20446
|
-
placeholder: localeService.t("definedName.inputNamePlaceholder"),
|
|
20476
|
+
placeholder: localeService.t("sheets-ui.definedName.inputNamePlaceholder"),
|
|
20447
20477
|
value: nameValue,
|
|
20448
20478
|
allowClear: true,
|
|
20449
20479
|
onChange: setNameValue
|
|
@@ -20453,10 +20483,10 @@ const DefinedNameInput = (props) => {
|
|
|
20453
20483
|
onChange: typeValueChange,
|
|
20454
20484
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Radio, {
|
|
20455
20485
|
value: "range",
|
|
20456
|
-
children: localeService.t("definedName.ratioRange")
|
|
20486
|
+
children: localeService.t("sheets-ui.definedName.ratioRange")
|
|
20457
20487
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Radio, {
|
|
20458
20488
|
value: "formula",
|
|
20459
|
-
children: localeService.t("definedName.ratioFormula")
|
|
20489
|
+
children: localeService.t("sheets-ui.definedName.ratioFormula")
|
|
20460
20490
|
})]
|
|
20461
20491
|
}) }),
|
|
20462
20492
|
typeValue === "range" ? RangeSelector && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RangeSelector, {
|
|
@@ -20495,7 +20525,7 @@ const DefinedNameInput = (props) => {
|
|
|
20495
20525
|
}) }),
|
|
20496
20526
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Input, {
|
|
20497
20527
|
className: "univer-w-full",
|
|
20498
|
-
placeholder: localeService.t("definedName.inputCommentPlaceholder"),
|
|
20528
|
+
placeholder: localeService.t("sheets-ui.definedName.inputCommentPlaceholder"),
|
|
20499
20529
|
value: commentValue,
|
|
20500
20530
|
onChange: setCommentValue,
|
|
20501
20531
|
allowClear: true
|
|
@@ -20513,11 +20543,11 @@ const DefinedNameInput = (props) => {
|
|
|
20513
20543
|
onClick: () => {
|
|
20514
20544
|
cancel === null || cancel === void 0 || cancel();
|
|
20515
20545
|
},
|
|
20516
|
-
children: localeService.t("definedName.cancel")
|
|
20546
|
+
children: localeService.t("sheets-ui.definedName.cancel")
|
|
20517
20547
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Button, {
|
|
20518
20548
|
variant: "primary",
|
|
20519
20549
|
onClick: confirmChange,
|
|
20520
|
-
children: localeService.t("definedName.confirm")
|
|
20550
|
+
children: localeService.t("sheets-ui.definedName.confirm")
|
|
20521
20551
|
})]
|
|
20522
20552
|
})
|
|
20523
20553
|
]
|
|
@@ -20636,11 +20666,11 @@ const DefinedNameContainer = () => {
|
|
|
20636
20666
|
};
|
|
20637
20667
|
const getInsertDefinedName = () => {
|
|
20638
20668
|
const count = definedNames.length + 1;
|
|
20639
|
-
const name = localeService.t("definedName.defaultName") + count;
|
|
20669
|
+
const name = localeService.t("sheets-ui.definedName.defaultName") + count;
|
|
20640
20670
|
if (definedNamesService.getValueByName(unitId, name) == null) return name;
|
|
20641
20671
|
let i = count + 1;
|
|
20642
20672
|
while (true) {
|
|
20643
|
-
const newName = localeService.t("definedName.defaultName") + i;
|
|
20673
|
+
const newName = localeService.t("sheets-ui.definedName.defaultName") + i;
|
|
20644
20674
|
if (definedNamesService.getValueByName(unitId, newName) == null) return newName;
|
|
20645
20675
|
i++;
|
|
20646
20676
|
}
|
|
@@ -20683,7 +20713,7 @@ const DefinedNameContainer = () => {
|
|
|
20683
20713
|
onClick: openInsertCloseKeyEditor,
|
|
20684
20714
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_icons.IncreaseIcon, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
20685
20715
|
className: "univer-ml-1",
|
|
20686
|
-
children: localeService.t("definedName.addButton")
|
|
20716
|
+
children: localeService.t("sheets-ui.definedName.addButton")
|
|
20687
20717
|
})]
|
|
20688
20718
|
}), editState && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DefinedNameInput, {
|
|
20689
20719
|
confirm: insertConfirm,
|
|
@@ -20724,7 +20754,7 @@ const DefinedNameContainer = () => {
|
|
|
20724
20754
|
}), checkDefinedNamePermission(definedName) && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
20725
20755
|
className: "univer-absolute univer-right-5 univer-top-1/2 univer-hidden -univer-translate-y-1/2 univer-cursor-pointer univer-items-center univer-justify-end univer-gap-7 univer-text-xs univer-text-primary-600 group-hover:univer-flex dark:hover:!univer-bg-gray-600",
|
|
20726
20756
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Tooltip, {
|
|
20727
|
-
title: localeService.t("definedName.updateButton"),
|
|
20757
|
+
title: localeService.t("sheets-ui.definedName.updateButton"),
|
|
20728
20758
|
placement: "top",
|
|
20729
20759
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
|
|
20730
20760
|
className: "univer-rounded univer-p-1 hover:univer-bg-gray-100",
|
|
@@ -20735,7 +20765,7 @@ const DefinedNameContainer = () => {
|
|
|
20735
20765
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_icons.PenIcon, {})
|
|
20736
20766
|
})
|
|
20737
20767
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Tooltip, {
|
|
20738
|
-
title: localeService.t("definedName.deleteButton"),
|
|
20768
|
+
title: localeService.t("sheets-ui.definedName.deleteButton"),
|
|
20739
20769
|
placement: "top",
|
|
20740
20770
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
|
|
20741
20771
|
className: "univer-rounded univer-p-1 univer-text-red-600 hover:univer-bg-gray-100",
|
|
@@ -20754,7 +20784,7 @@ const DefinedNameContainer = () => {
|
|
|
20754
20784
|
onConfirm: () => {
|
|
20755
20785
|
handleDeleteConfirm(definedName.id);
|
|
20756
20786
|
},
|
|
20757
|
-
children: localeService.t("definedName.deleteConfirmText")
|
|
20787
|
+
children: localeService.t("sheets-ui.definedName.deleteConfirmText")
|
|
20758
20788
|
}),
|
|
20759
20789
|
definedName.id === editorKey && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DefinedNameInput, {
|
|
20760
20790
|
confirm: insertConfirm,
|
|
@@ -21090,7 +21120,8 @@ const EditorContainer = () => {
|
|
|
21090
21120
|
else editorBridgeService.disableForceKeepVisible();
|
|
21091
21121
|
},
|
|
21092
21122
|
disableSelectionOnClick: true,
|
|
21093
|
-
disableContextMenu: false
|
|
21123
|
+
disableContextMenu: false,
|
|
21124
|
+
canvasStyle: { backgroundColor: "transparent" }
|
|
21094
21125
|
})
|
|
21095
21126
|
});
|
|
21096
21127
|
};
|
|
@@ -21225,10 +21256,10 @@ function DefinedNameOverlay({ search, isInputEvent }) {
|
|
|
21225
21256
|
onClick: openSlider,
|
|
21226
21257
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
21227
21258
|
className: "univer-mb-2 univer-text-sm univer-font-semibold univer-text-gray-600 dark:!univer-text-gray-200",
|
|
21228
|
-
children: localeService.t("definedName.managerTitle")
|
|
21259
|
+
children: localeService.t("sheets-ui.definedName.managerTitle")
|
|
21229
21260
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
21230
21261
|
className: "univer-text-xs univer-text-gray-400",
|
|
21231
|
-
children: localeService.t("definedName.managerDescription")
|
|
21262
|
+
children: localeService.t("sheets-ui.definedName.managerDescription")
|
|
21232
21263
|
})]
|
|
21233
21264
|
})]
|
|
21234
21265
|
});
|
|
@@ -21645,12 +21676,13 @@ function FormulaBar(props) {
|
|
|
21645
21676
|
className: "univer-flex univer-w-full univer-flex-1 univer-overflow-hidden univer-pl-3",
|
|
21646
21677
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
21647
21678
|
ref,
|
|
21648
|
-
className: "univer-relative univer-flex-1",
|
|
21679
|
+
className: "\n univer-relative univer-flex-1 univer-bg-white\n dark:!univer-bg-gray-900\n ",
|
|
21649
21680
|
onPointerDown: handlePointerDown,
|
|
21650
21681
|
onPointerUp: handlePointerUp,
|
|
21651
21682
|
style: { pointerEvents: hideEditor ? "none" : "auto" },
|
|
21652
21683
|
children: [FormulaEditor && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FormulaEditor, {
|
|
21653
|
-
className: "univer-relative univer-size-full univer-break-words univer-outline-none
|
|
21684
|
+
className: "univer-relative univer-size-full univer-break-words univer-outline-none",
|
|
21685
|
+
borderless: true,
|
|
21654
21686
|
disableSelectionOnClick: true,
|
|
21655
21687
|
editorId: _univerjs_core.DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY,
|
|
21656
21688
|
initValue: "",
|
|
@@ -21669,7 +21701,8 @@ function FormulaBar(props) {
|
|
|
21669
21701
|
else editorBridgeService.disableForceKeepVisible();
|
|
21670
21702
|
},
|
|
21671
21703
|
autoScrollbar: false,
|
|
21672
|
-
disableContextMenu: false
|
|
21704
|
+
disableContextMenu: false,
|
|
21705
|
+
canvasStyle: { backgroundColor: "#fff" }
|
|
21673
21706
|
}), hideEditor && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: "univer-pointer-events-none univer-relative univer-left-0 univer-top-0 univer-z-[100] univer-size-full univer-cursor-not-allowed univer-bg-white" })]
|
|
21674
21707
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
21675
21708
|
className: (0, _univerjs_design.clsx)("univer-flex univer-h-full univer-w-5 univer-cursor-pointer univer-items-center univer-justify-center univer-text-xs univer-text-gray-700 dark:!univer-text-gray-200", { "univer-cursor-not-allowed univer-text-gray-200 dark:!univer-text-gray-700": editDisable }),
|
|
@@ -21725,8 +21758,7 @@ function SheetBarMenu() {
|
|
|
21725
21758
|
if (!sheetId || !workbook) return;
|
|
21726
21759
|
if (item.hidden) commandService.executeCommand(_univerjs_sheets.SetWorksheetShowCommand.id, {
|
|
21727
21760
|
unitId: workbook.getUnitId(),
|
|
21728
|
-
subUnitId: sheetId
|
|
21729
|
-
value: sheetId
|
|
21761
|
+
subUnitId: sheetId
|
|
21730
21762
|
});
|
|
21731
21763
|
else if (!item.selected) commandService.executeCommand(_univerjs_sheets.SetWorksheetActivateCommand.id, {
|
|
21732
21764
|
unitId: workbook.getUnitId(),
|
|
@@ -22777,10 +22809,10 @@ function SheetBarTabs() {
|
|
|
22777
22809
|
const openSheetNameErrorDialog = (0, react.useCallback)((id, description) => {
|
|
22778
22810
|
confirmService.open({
|
|
22779
22811
|
id,
|
|
22780
|
-
title: { title: localeService.t("sheetConfig.sheetNameErrorTitle") },
|
|
22812
|
+
title: { title: localeService.t("sheets-ui.sheetConfig.sheetNameErrorTitle") },
|
|
22781
22813
|
children: { title: description },
|
|
22782
|
-
cancelText: localeService.t("button.cancel"),
|
|
22783
|
-
confirmText: localeService.t("button.confirm"),
|
|
22814
|
+
cancelText: localeService.t("sheets-ui.button.cancel"),
|
|
22815
|
+
confirmText: localeService.t("sheets-ui.button.confirm"),
|
|
22784
22816
|
onClose() {
|
|
22785
22817
|
focusTabEditor();
|
|
22786
22818
|
confirmService.close(id);
|
|
@@ -22797,12 +22829,12 @@ function SheetBarTabs() {
|
|
|
22797
22829
|
]);
|
|
22798
22830
|
const nameEmptyCheck = (0, react.useCallback)((name) => {
|
|
22799
22831
|
if (name.trim() !== "") return false;
|
|
22800
|
-
openSheetNameErrorDialog("sheetNameEmptyAlert", localeService.t("sheetConfig.sheetNameCannotIsEmptyError"));
|
|
22832
|
+
openSheetNameErrorDialog("sheetNameEmptyAlert", localeService.t("sheets-ui.sheetConfig.sheetNameCannotIsEmptyError"));
|
|
22801
22833
|
return true;
|
|
22802
22834
|
}, [localeService, openSheetNameErrorDialog]);
|
|
22803
22835
|
const sheetNameSpecCharCheck = (0, react.useCallback)((name) => {
|
|
22804
22836
|
if ((0, _univerjs_core.nameCharacterCheck)(name)) return false;
|
|
22805
|
-
openSheetNameErrorDialog("sheetNameSpecCharAlert", localeService.t("sheetConfig.sheetNameSpecCharError"));
|
|
22837
|
+
openSheetNameErrorDialog("sheetNameSpecCharAlert", localeService.t("sheets-ui.sheetConfig.sheetNameSpecCharError"));
|
|
22806
22838
|
return true;
|
|
22807
22839
|
}, [localeService, openSheetNameErrorDialog]);
|
|
22808
22840
|
const nameRepeatCheck = (0, react.useCallback)((name) => {
|
|
@@ -22812,10 +22844,10 @@ function SheetBarTabs() {
|
|
|
22812
22844
|
const id = "sheetNameRepeatAlert";
|
|
22813
22845
|
confirmService.open({
|
|
22814
22846
|
id,
|
|
22815
|
-
title: { title: localeService.t("sheetConfig.sheetNameErrorTitle") },
|
|
22816
|
-
children: { title: localeService.t("sheetConfig.sheetNameAlreadyExistsError") },
|
|
22817
|
-
cancelText: localeService.t("button.cancel"),
|
|
22818
|
-
confirmText: localeService.t("button.confirm"),
|
|
22847
|
+
title: { title: localeService.t("sheets-ui.sheetConfig.sheetNameErrorTitle") },
|
|
22848
|
+
children: { title: localeService.t("sheets-ui.sheetConfig.sheetNameAlreadyExistsError") },
|
|
22849
|
+
cancelText: localeService.t("sheets-ui.button.cancel"),
|
|
22850
|
+
confirmText: localeService.t("sheets-ui.button.confirm"),
|
|
22819
22851
|
onClose() {
|
|
22820
22852
|
confirmService.close(id);
|
|
22821
22853
|
focusTabEditor();
|
|
@@ -23170,7 +23202,7 @@ const SheetBar = () => {
|
|
|
23170
23202
|
}, 0);
|
|
23171
23203
|
};
|
|
23172
23204
|
const handleScrollLeft = () => {
|
|
23173
|
-
sheetBarService.setScrollX(-
|
|
23205
|
+
sheetBarService.setScrollX(-100);
|
|
23174
23206
|
};
|
|
23175
23207
|
const handleScrollRight = () => {
|
|
23176
23208
|
sheetBarService.setScrollX(SCROLL_WIDTH);
|
|
@@ -23367,12 +23399,12 @@ const allowPatternFunctions = [
|
|
|
23367
23399
|
_univerjs_engine_formula.FUNCTION_NAMES_STATISTICAL.MAX
|
|
23368
23400
|
];
|
|
23369
23401
|
const functionDisplayNames = {
|
|
23370
|
-
[_univerjs_engine_formula.FUNCTION_NAMES_MATH.SUM]: "statusbar.sum",
|
|
23371
|
-
[_univerjs_engine_formula.FUNCTION_NAMES_STATISTICAL.AVERAGE]: "statusbar.average",
|
|
23372
|
-
[_univerjs_engine_formula.FUNCTION_NAMES_STATISTICAL.MIN]: "statusbar.min",
|
|
23373
|
-
[_univerjs_engine_formula.FUNCTION_NAMES_STATISTICAL.MAX]: "statusbar.max",
|
|
23374
|
-
[_univerjs_engine_formula.FUNCTION_NAMES_STATISTICAL.COUNT]: "statusbar.count",
|
|
23375
|
-
[_univerjs_engine_formula.FUNCTION_NAMES_STATISTICAL.COUNTA]: "statusbar.countA",
|
|
23402
|
+
[_univerjs_engine_formula.FUNCTION_NAMES_MATH.SUM]: "sheets-ui.statusbar.sum",
|
|
23403
|
+
[_univerjs_engine_formula.FUNCTION_NAMES_STATISTICAL.AVERAGE]: "sheets-ui.statusbar.average",
|
|
23404
|
+
[_univerjs_engine_formula.FUNCTION_NAMES_STATISTICAL.MIN]: "sheets-ui.statusbar.min",
|
|
23405
|
+
[_univerjs_engine_formula.FUNCTION_NAMES_STATISTICAL.MAX]: "sheets-ui.statusbar.max",
|
|
23406
|
+
[_univerjs_engine_formula.FUNCTION_NAMES_STATISTICAL.COUNT]: "sheets-ui.statusbar.count",
|
|
23407
|
+
[_univerjs_engine_formula.FUNCTION_NAMES_STATISTICAL.COUNTA]: "sheets-ui.statusbar.countA",
|
|
23376
23408
|
[_univerjs_engine_formula.FUNCTION_NAMES_TEXT.CONCATENATE]: "concatenate"
|
|
23377
23409
|
};
|
|
23378
23410
|
const CopyableStatisticItem = (item) => {
|
|
@@ -23384,11 +23416,11 @@ const CopyableStatisticItem = (item) => {
|
|
|
23384
23416
|
await clipboardService.writeText(item.value.toString());
|
|
23385
23417
|
messageService.show({
|
|
23386
23418
|
type: _univerjs_design.MessageType.Success,
|
|
23387
|
-
content: localeService.t("statusbar.copied")
|
|
23419
|
+
content: localeService.t("sheets-ui.statusbar.copied")
|
|
23388
23420
|
});
|
|
23389
23421
|
};
|
|
23390
23422
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Tooltip, {
|
|
23391
|
-
title: localeService.t("statusbar.clickToCopy"),
|
|
23423
|
+
title: localeService.t("sheets-ui.statusbar.clickToCopy"),
|
|
23392
23424
|
placement: "top",
|
|
23393
23425
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
23394
23426
|
className: "univer-flex univer-cursor-pointer univer-truncate univer-text-center univer-text-xs univer-text-gray-400",
|
|
@@ -23592,8 +23624,9 @@ const SetColHiddenShortcutItem = {
|
|
|
23592
23624
|
//#region src/controllers/shortcuts/selection.shortcut.ts
|
|
23593
23625
|
const MoveSelectionDownShortcutItem = {
|
|
23594
23626
|
id: MoveSelectionCommand.id,
|
|
23595
|
-
description: "shortcut.sheet.select-below-cell",
|
|
23627
|
+
description: "sheets-ui.shortcut.sheet.select-below-cell",
|
|
23596
23628
|
group: "3_sheet-view",
|
|
23629
|
+
groupTitle: "sheets-ui.shortcut.sheet-view",
|
|
23597
23630
|
binding: _univerjs_ui.KeyCode.ARROW_DOWN,
|
|
23598
23631
|
priority: 100,
|
|
23599
23632
|
preconditions: whenSheetEditorFocused,
|
|
@@ -23601,8 +23634,9 @@ const MoveSelectionDownShortcutItem = {
|
|
|
23601
23634
|
};
|
|
23602
23635
|
const MoveSelectionUpShortcutItem = {
|
|
23603
23636
|
id: MoveSelectionCommand.id,
|
|
23604
|
-
description: "shortcut.sheet.select-up-cell",
|
|
23637
|
+
description: "sheets-ui.shortcut.sheet.select-up-cell",
|
|
23605
23638
|
group: "3_sheet-view",
|
|
23639
|
+
groupTitle: "sheets-ui.shortcut.sheet-view",
|
|
23606
23640
|
binding: _univerjs_ui.KeyCode.ARROW_UP,
|
|
23607
23641
|
priority: 100,
|
|
23608
23642
|
preconditions: whenSheetEditorFocused,
|
|
@@ -23610,8 +23644,9 @@ const MoveSelectionUpShortcutItem = {
|
|
|
23610
23644
|
};
|
|
23611
23645
|
const MoveSelectionLeftShortcutItem = {
|
|
23612
23646
|
id: MoveSelectionCommand.id,
|
|
23613
|
-
description: "shortcut.sheet.select-left-cell",
|
|
23647
|
+
description: "sheets-ui.shortcut.sheet.select-left-cell",
|
|
23614
23648
|
group: "3_sheet-view",
|
|
23649
|
+
groupTitle: "sheets-ui.shortcut.sheet-view",
|
|
23615
23650
|
binding: _univerjs_ui.KeyCode.ARROW_LEFT,
|
|
23616
23651
|
priority: 100,
|
|
23617
23652
|
preconditions: whenSheetEditorFocusedAndFxNotFocused,
|
|
@@ -23619,8 +23654,9 @@ const MoveSelectionLeftShortcutItem = {
|
|
|
23619
23654
|
};
|
|
23620
23655
|
const MoveSelectionRightShortcutItem = {
|
|
23621
23656
|
id: MoveSelectionCommand.id,
|
|
23622
|
-
description: "shortcut.sheet.select-right-cell",
|
|
23657
|
+
description: "sheets-ui.shortcut.sheet.select-right-cell",
|
|
23623
23658
|
group: "3_sheet-view",
|
|
23659
|
+
groupTitle: "sheets-ui.shortcut.sheet-view",
|
|
23624
23660
|
binding: _univerjs_ui.KeyCode.ARROW_RIGHT,
|
|
23625
23661
|
priority: 100,
|
|
23626
23662
|
preconditions: whenSheetEditorFocusedAndFxNotFocused,
|
|
@@ -23628,8 +23664,9 @@ const MoveSelectionRightShortcutItem = {
|
|
|
23628
23664
|
};
|
|
23629
23665
|
const MoveSelectionTabShortcutItem = {
|
|
23630
23666
|
id: MoveSelectionEnterAndTabCommand.id,
|
|
23631
|
-
description: "shortcut.sheet.select-next-cell",
|
|
23667
|
+
description: "sheets-ui.shortcut.sheet.select-next-cell",
|
|
23632
23668
|
group: "3_sheet-view",
|
|
23669
|
+
groupTitle: "sheets-ui.shortcut.sheet-view",
|
|
23633
23670
|
binding: _univerjs_ui.KeyCode.TAB,
|
|
23634
23671
|
priority: 100,
|
|
23635
23672
|
preconditions: whenSheetEditorFocused,
|
|
@@ -23640,8 +23677,9 @@ const MoveSelectionTabShortcutItem = {
|
|
|
23640
23677
|
};
|
|
23641
23678
|
const MoveSelectionTabLeftShortcutItem = {
|
|
23642
23679
|
id: MoveSelectionEnterAndTabCommand.id,
|
|
23643
|
-
description: "shortcut.sheet.select-previous-cell",
|
|
23680
|
+
description: "sheets-ui.shortcut.sheet.select-previous-cell",
|
|
23644
23681
|
group: "3_sheet-view",
|
|
23682
|
+
groupTitle: "sheets-ui.shortcut.sheet-view",
|
|
23645
23683
|
binding: _univerjs_ui.KeyCode.TAB | _univerjs_ui.MetaKeys.SHIFT,
|
|
23646
23684
|
priority: 100,
|
|
23647
23685
|
preconditions: whenSheetEditorFocused,
|
|
@@ -23652,8 +23690,9 @@ const MoveSelectionTabLeftShortcutItem = {
|
|
|
23652
23690
|
};
|
|
23653
23691
|
const MoveSelectionEnterShortcutItem = {
|
|
23654
23692
|
id: MoveSelectionEnterAndTabCommand.id,
|
|
23655
|
-
description: "shortcut.sheet.select-below-cell",
|
|
23693
|
+
description: "sheets-ui.shortcut.sheet.select-below-cell",
|
|
23656
23694
|
group: "3_sheet-view",
|
|
23695
|
+
groupTitle: "sheets-ui.shortcut.sheet-view",
|
|
23657
23696
|
binding: _univerjs_ui.KeyCode.ENTER,
|
|
23658
23697
|
priority: 100,
|
|
23659
23698
|
preconditions: whenSheetEditorFocused,
|
|
@@ -23664,8 +23703,9 @@ const MoveSelectionEnterShortcutItem = {
|
|
|
23664
23703
|
};
|
|
23665
23704
|
const MoveSelectionEnterUpShortcutItem = {
|
|
23666
23705
|
id: MoveSelectionEnterAndTabCommand.id,
|
|
23667
|
-
description: "shortcut.sheet.select-up-cell",
|
|
23706
|
+
description: "sheets-ui.shortcut.sheet.select-up-cell",
|
|
23668
23707
|
group: "3_sheet-view",
|
|
23708
|
+
groupTitle: "sheets-ui.shortcut.sheet-view",
|
|
23669
23709
|
binding: _univerjs_ui.KeyCode.ENTER | _univerjs_ui.MetaKeys.SHIFT,
|
|
23670
23710
|
priority: 100,
|
|
23671
23711
|
preconditions: whenSheetEditorFocused,
|
|
@@ -23676,8 +23716,9 @@ const MoveSelectionEnterUpShortcutItem = {
|
|
|
23676
23716
|
};
|
|
23677
23717
|
const MoveSelectionEndDownShortcutItem = {
|
|
23678
23718
|
id: MoveSelectionCommand.id,
|
|
23679
|
-
description: "shortcut.sheet.select-below-value-cell",
|
|
23719
|
+
description: "sheets-ui.shortcut.sheet.select-below-value-cell",
|
|
23680
23720
|
group: "3_sheet-view",
|
|
23721
|
+
groupTitle: "sheets-ui.shortcut.sheet-view",
|
|
23681
23722
|
binding: _univerjs_ui.KeyCode.ARROW_DOWN | _univerjs_ui.MetaKeys.CTRL_COMMAND,
|
|
23682
23723
|
preconditions: whenSheetEditorFocused,
|
|
23683
23724
|
staticParameters: {
|
|
@@ -23687,8 +23728,9 @@ const MoveSelectionEndDownShortcutItem = {
|
|
|
23687
23728
|
};
|
|
23688
23729
|
const MoveSelectionEndUpShortcutItem = {
|
|
23689
23730
|
id: MoveSelectionCommand.id,
|
|
23690
|
-
description: "shortcut.sheet.select-up-value-cell",
|
|
23731
|
+
description: "sheets-ui.shortcut.sheet.select-up-value-cell",
|
|
23691
23732
|
group: "3_sheet-view",
|
|
23733
|
+
groupTitle: "sheets-ui.shortcut.sheet-view",
|
|
23692
23734
|
binding: _univerjs_ui.KeyCode.ARROW_UP | _univerjs_ui.MetaKeys.CTRL_COMMAND,
|
|
23693
23735
|
preconditions: whenSheetEditorFocused,
|
|
23694
23736
|
staticParameters: {
|
|
@@ -23698,8 +23740,9 @@ const MoveSelectionEndUpShortcutItem = {
|
|
|
23698
23740
|
};
|
|
23699
23741
|
const MoveSelectionEndLeftShortcutItem = {
|
|
23700
23742
|
id: MoveSelectionCommand.id,
|
|
23701
|
-
description: "shortcut.sheet.select-left-value-cell",
|
|
23743
|
+
description: "sheets-ui.shortcut.sheet.select-left-value-cell",
|
|
23702
23744
|
group: "3_sheet-view",
|
|
23745
|
+
groupTitle: "sheets-ui.shortcut.sheet-view",
|
|
23703
23746
|
binding: _univerjs_ui.KeyCode.ARROW_LEFT | _univerjs_ui.MetaKeys.CTRL_COMMAND,
|
|
23704
23747
|
preconditions: whenSheetEditorFocused,
|
|
23705
23748
|
staticParameters: {
|
|
@@ -23709,8 +23752,9 @@ const MoveSelectionEndLeftShortcutItem = {
|
|
|
23709
23752
|
};
|
|
23710
23753
|
const MoveSelectionEndRightShortcutItem = {
|
|
23711
23754
|
id: MoveSelectionCommand.id,
|
|
23712
|
-
description: "shortcut.sheet.select-right-value-cell",
|
|
23755
|
+
description: "sheets-ui.shortcut.sheet.select-right-value-cell",
|
|
23713
23756
|
group: "3_sheet-view",
|
|
23757
|
+
groupTitle: "sheets-ui.shortcut.sheet-view",
|
|
23714
23758
|
binding: _univerjs_ui.KeyCode.ARROW_RIGHT | _univerjs_ui.MetaKeys.CTRL_COMMAND,
|
|
23715
23759
|
preconditions: whenSheetEditorFocused,
|
|
23716
23760
|
staticParameters: {
|
|
@@ -23720,40 +23764,45 @@ const MoveSelectionEndRightShortcutItem = {
|
|
|
23720
23764
|
};
|
|
23721
23765
|
const ExpandSelectionDownShortcutItem = {
|
|
23722
23766
|
id: ExpandSelectionCommand.id,
|
|
23723
|
-
description: "shortcut.sheet.expand-selection-down",
|
|
23767
|
+
description: "sheets-ui.shortcut.sheet.expand-selection-down",
|
|
23724
23768
|
group: "3_sheet-view",
|
|
23769
|
+
groupTitle: "sheets-ui.shortcut.sheet-view",
|
|
23725
23770
|
binding: _univerjs_ui.KeyCode.ARROW_DOWN | _univerjs_ui.MetaKeys.SHIFT,
|
|
23726
23771
|
preconditions: whenSheetEditorFocused,
|
|
23727
23772
|
staticParameters: { direction: _univerjs_core.Direction.DOWN }
|
|
23728
23773
|
};
|
|
23729
23774
|
const ExpandSelectionUpShortcutItem = {
|
|
23730
23775
|
id: ExpandSelectionCommand.id,
|
|
23731
|
-
description: "shortcut.sheet.expand-selection-up",
|
|
23776
|
+
description: "sheets-ui.shortcut.sheet.expand-selection-up",
|
|
23732
23777
|
group: "3_sheet-view",
|
|
23778
|
+
groupTitle: "sheets-ui.shortcut.sheet-view",
|
|
23733
23779
|
binding: _univerjs_ui.KeyCode.ARROW_UP | _univerjs_ui.MetaKeys.SHIFT,
|
|
23734
23780
|
preconditions: whenSheetEditorFocused,
|
|
23735
23781
|
staticParameters: { direction: _univerjs_core.Direction.UP }
|
|
23736
23782
|
};
|
|
23737
23783
|
const ExpandSelectionLeftShortcutItem = {
|
|
23738
23784
|
id: ExpandSelectionCommand.id,
|
|
23739
|
-
description: "shortcut.sheet.expand-selection-left",
|
|
23785
|
+
description: "sheets-ui.shortcut.sheet.expand-selection-left",
|
|
23740
23786
|
group: "3_sheet-view",
|
|
23787
|
+
groupTitle: "sheets-ui.shortcut.sheet-view",
|
|
23741
23788
|
binding: _univerjs_ui.KeyCode.ARROW_LEFT | _univerjs_ui.MetaKeys.SHIFT,
|
|
23742
23789
|
preconditions: whenSheetEditorFocused,
|
|
23743
23790
|
staticParameters: { direction: _univerjs_core.Direction.LEFT }
|
|
23744
23791
|
};
|
|
23745
23792
|
const ExpandSelectionRightShortcutItem = {
|
|
23746
23793
|
id: ExpandSelectionCommand.id,
|
|
23747
|
-
description: "shortcut.sheet.expand-selection-right",
|
|
23794
|
+
description: "sheets-ui.shortcut.sheet.expand-selection-right",
|
|
23748
23795
|
group: "3_sheet-view",
|
|
23796
|
+
groupTitle: "sheets-ui.shortcut.sheet-view",
|
|
23749
23797
|
binding: _univerjs_ui.KeyCode.ARROW_RIGHT | _univerjs_ui.MetaKeys.SHIFT,
|
|
23750
23798
|
preconditions: whenSheetEditorFocused,
|
|
23751
23799
|
staticParameters: { direction: _univerjs_core.Direction.RIGHT }
|
|
23752
23800
|
};
|
|
23753
23801
|
const ExpandSelectionEndDownShortcutItem = {
|
|
23754
23802
|
id: ExpandSelectionCommand.id,
|
|
23755
|
-
description: "shortcut.sheet.expand-selection-to-below-gap",
|
|
23803
|
+
description: "sheets-ui.shortcut.sheet.expand-selection-to-below-gap",
|
|
23756
23804
|
group: "3_sheet-view",
|
|
23805
|
+
groupTitle: "sheets-ui.shortcut.sheet-view",
|
|
23757
23806
|
binding: _univerjs_ui.KeyCode.ARROW_DOWN | _univerjs_ui.MetaKeys.SHIFT | _univerjs_ui.MetaKeys.CTRL_COMMAND,
|
|
23758
23807
|
preconditions: whenSheetEditorFocused,
|
|
23759
23808
|
staticParameters: {
|
|
@@ -23763,8 +23812,9 @@ const ExpandSelectionEndDownShortcutItem = {
|
|
|
23763
23812
|
};
|
|
23764
23813
|
const ExpandSelectionEndUpShortcutItem = {
|
|
23765
23814
|
id: ExpandSelectionCommand.id,
|
|
23766
|
-
description: "shortcut.sheet.expand-selection-to-up-gap",
|
|
23815
|
+
description: "sheets-ui.shortcut.sheet.expand-selection-to-up-gap",
|
|
23767
23816
|
group: "3_sheet-view",
|
|
23817
|
+
groupTitle: "sheets-ui.shortcut.sheet-view",
|
|
23768
23818
|
binding: _univerjs_ui.KeyCode.ARROW_UP | _univerjs_ui.MetaKeys.SHIFT | _univerjs_ui.MetaKeys.CTRL_COMMAND,
|
|
23769
23819
|
preconditions: whenSheetEditorFocused,
|
|
23770
23820
|
staticParameters: {
|
|
@@ -23774,8 +23824,9 @@ const ExpandSelectionEndUpShortcutItem = {
|
|
|
23774
23824
|
};
|
|
23775
23825
|
const ExpandSelectionEndLeftShortcutItem = {
|
|
23776
23826
|
id: ExpandSelectionCommand.id,
|
|
23777
|
-
description: "shortcut.sheet.expand-selection-to-left-gap",
|
|
23827
|
+
description: "sheets-ui.shortcut.sheet.expand-selection-to-left-gap",
|
|
23778
23828
|
group: "3_sheet-view",
|
|
23829
|
+
groupTitle: "sheets-ui.shortcut.sheet-view",
|
|
23779
23830
|
binding: _univerjs_ui.KeyCode.ARROW_LEFT | _univerjs_ui.MetaKeys.SHIFT | _univerjs_ui.MetaKeys.CTRL_COMMAND,
|
|
23780
23831
|
preconditions: whenSheetEditorFocused,
|
|
23781
23832
|
staticParameters: {
|
|
@@ -23785,8 +23836,9 @@ const ExpandSelectionEndLeftShortcutItem = {
|
|
|
23785
23836
|
};
|
|
23786
23837
|
const ExpandSelectionEndRightShortcutItem = {
|
|
23787
23838
|
id: ExpandSelectionCommand.id,
|
|
23788
|
-
description: "shortcut.sheet.expand-selection-to-right-gap",
|
|
23839
|
+
description: "sheets-ui.shortcut.sheet.expand-selection-to-right-gap",
|
|
23789
23840
|
group: "3_sheet-view",
|
|
23841
|
+
groupTitle: "sheets-ui.shortcut.sheet-view",
|
|
23790
23842
|
binding: _univerjs_ui.KeyCode.ARROW_RIGHT | _univerjs_ui.MetaKeys.SHIFT | _univerjs_ui.MetaKeys.CTRL_COMMAND,
|
|
23791
23843
|
preconditions: whenSheetEditorFocused,
|
|
23792
23844
|
staticParameters: {
|
|
@@ -23796,8 +23848,9 @@ const ExpandSelectionEndRightShortcutItem = {
|
|
|
23796
23848
|
};
|
|
23797
23849
|
const SelectAllShortcutItem = {
|
|
23798
23850
|
id: SelectAllCommand.id,
|
|
23799
|
-
description: "shortcut.sheet.select-all",
|
|
23851
|
+
description: "sheets-ui.shortcut.sheet.select-all",
|
|
23800
23852
|
group: "3_sheet-view",
|
|
23853
|
+
groupTitle: "sheets-ui.shortcut.sheet-view",
|
|
23801
23854
|
binding: _univerjs_ui.KeyCode.A | _univerjs_ui.MetaKeys.CTRL_COMMAND,
|
|
23802
23855
|
preconditions: whenSheetEditorFocused,
|
|
23803
23856
|
staticParameters: {
|
|
@@ -23810,29 +23863,33 @@ const SelectAllShortcutItem = {
|
|
|
23810
23863
|
//#region src/controllers/shortcuts/style.shortcut.ts
|
|
23811
23864
|
const SetBoldShortcutItem = {
|
|
23812
23865
|
id: SetRangeBoldCommand.id,
|
|
23813
|
-
description: "shortcut.sheet.set-bold",
|
|
23866
|
+
description: "sheets-ui.shortcut.sheet.set-bold",
|
|
23814
23867
|
group: "4_sheet-edit",
|
|
23868
|
+
groupTitle: "sheets-ui.shortcut.sheet-edit",
|
|
23815
23869
|
preconditions: (contextService) => whenSheetFocusedInlineFormat(contextService),
|
|
23816
23870
|
binding: _univerjs_ui.KeyCode.B | _univerjs_ui.MetaKeys.CTRL_COMMAND
|
|
23817
23871
|
};
|
|
23818
23872
|
const SetItalicShortcutItem = {
|
|
23819
23873
|
id: SetRangeItalicCommand.id,
|
|
23820
|
-
description: "shortcut.sheet.set-italic",
|
|
23874
|
+
description: "sheets-ui.shortcut.sheet.set-italic",
|
|
23821
23875
|
group: "4_sheet-edit",
|
|
23876
|
+
groupTitle: "sheets-ui.shortcut.sheet-edit",
|
|
23822
23877
|
preconditions: (contextService) => whenSheetFocusedInlineFormat(contextService),
|
|
23823
23878
|
binding: _univerjs_ui.KeyCode.I | _univerjs_ui.MetaKeys.CTRL_COMMAND
|
|
23824
23879
|
};
|
|
23825
23880
|
const SetUnderlineShortcutItem = {
|
|
23826
23881
|
id: SetRangeUnderlineCommand.id,
|
|
23827
|
-
description: "shortcut.sheet.set-underline",
|
|
23882
|
+
description: "sheets-ui.shortcut.sheet.set-underline",
|
|
23828
23883
|
group: "4_sheet-edit",
|
|
23884
|
+
groupTitle: "sheets-ui.shortcut.sheet-edit",
|
|
23829
23885
|
preconditions: (contextService) => whenSheetFocusedInlineFormat(contextService),
|
|
23830
23886
|
binding: _univerjs_ui.KeyCode.U | _univerjs_ui.MetaKeys.CTRL_COMMAND
|
|
23831
23887
|
};
|
|
23832
23888
|
const SetStrikeThroughShortcutItem = {
|
|
23833
23889
|
id: SetRangeStrickThroughCommand.id,
|
|
23834
|
-
description: "shortcut.sheet.set-strike-through",
|
|
23890
|
+
description: "sheets-ui.shortcut.sheet.set-strike-through",
|
|
23835
23891
|
group: "4_sheet-edit",
|
|
23892
|
+
groupTitle: "sheets-ui.shortcut.sheet-edit",
|
|
23836
23893
|
preconditions: (contextService) => whenSheetFocusedInlineFormat(contextService),
|
|
23837
23894
|
binding: _univerjs_ui.KeyCode.X | _univerjs_ui.MetaKeys.SHIFT | _univerjs_ui.MetaKeys.CTRL_COMMAND
|
|
23838
23895
|
};
|
|
@@ -23865,9 +23922,10 @@ const ShiftDeleteSelectionValueShortcutItem = {
|
|
|
23865
23922
|
//#region src/controllers/shortcuts/view.shortcut.ts
|
|
23866
23923
|
const ZoomInShortcutItem = {
|
|
23867
23924
|
id: ChangeZoomRatioCommand.id,
|
|
23868
|
-
description: "shortcut.sheet.zoom-in",
|
|
23925
|
+
description: "sheets-ui.shortcut.sheet.zoom-in",
|
|
23869
23926
|
binding: _univerjs_ui.KeyCode.EQUAL | _univerjs_ui.MetaKeys.CTRL_COMMAND,
|
|
23870
23927
|
group: "3_sheet-view",
|
|
23928
|
+
groupTitle: "sheets-ui.shortcut.sheet-view",
|
|
23871
23929
|
preconditions: whenSheetEditorFocused,
|
|
23872
23930
|
priority: 1,
|
|
23873
23931
|
staticParameters: { delta: .2 }
|
|
@@ -23878,9 +23936,10 @@ const PreventDefaultZoomInShortcutItem = {
|
|
|
23878
23936
|
};
|
|
23879
23937
|
const ZoomOutShortcutItem = {
|
|
23880
23938
|
id: ChangeZoomRatioCommand.id,
|
|
23881
|
-
description: "shortcut.sheet.zoom-out",
|
|
23939
|
+
description: "sheets-ui.shortcut.sheet.zoom-out",
|
|
23882
23940
|
binding: _univerjs_ui.KeyCode.MINUS | _univerjs_ui.MetaKeys.CTRL_COMMAND,
|
|
23883
23941
|
group: "3_sheet-view",
|
|
23942
|
+
groupTitle: "sheets-ui.shortcut.sheet-view",
|
|
23884
23943
|
preconditions: whenSheetEditorFocused,
|
|
23885
23944
|
priority: 1,
|
|
23886
23945
|
staticParameters: { delta: -.2 }
|
|
@@ -23891,10 +23950,11 @@ const PreventDefaultZoomOutShortcutItem = {
|
|
|
23891
23950
|
};
|
|
23892
23951
|
const ResetZoomShortcutItem = {
|
|
23893
23952
|
id: ChangeZoomRatioCommand.id,
|
|
23894
|
-
description: "shortcut.sheet.reset-zoom",
|
|
23953
|
+
description: "sheets-ui.shortcut.sheet.reset-zoom",
|
|
23895
23954
|
binding: _univerjs_ui.KeyCode.Digit0 | _univerjs_ui.MetaKeys.CTRL_COMMAND,
|
|
23896
23955
|
preconditions: whenSheetEditorFocused,
|
|
23897
23956
|
group: "3_sheet-view",
|
|
23957
|
+
groupTitle: "sheets-ui.shortcut.sheet-view",
|
|
23898
23958
|
priority: 1,
|
|
23899
23959
|
staticParameters: { reset: true }
|
|
23900
23960
|
};
|
|
@@ -24392,7 +24452,7 @@ const useHighlightRange = (ranges = []) => {
|
|
|
24392
24452
|
//#endregion
|
|
24393
24453
|
//#region package.json
|
|
24394
24454
|
var name = "@univerjs/sheets-ui";
|
|
24395
|
-
var version = "0.
|
|
24455
|
+
var version = "0.25.0";
|
|
24396
24456
|
|
|
24397
24457
|
//#endregion
|
|
24398
24458
|
//#region src/services/cell-alert-manager.service.ts
|
|
@@ -24939,8 +24999,8 @@ let ForceStringAlertRenderController = class ForceStringAlertRenderController ex
|
|
|
24939
24999
|
}
|
|
24940
25000
|
this._cellAlertManagerService.showAlert({
|
|
24941
25001
|
type: 2,
|
|
24942
|
-
title: this._localeService.t("info.error"),
|
|
24943
|
-
message: this._localeService.t("info.forceStringInfo"),
|
|
25002
|
+
title: this._localeService.t("sheets-ui.info.error"),
|
|
25003
|
+
message: this._localeService.t("sheets-ui.info.forceStringInfo"),
|
|
24944
25004
|
location,
|
|
24945
25005
|
width: 200,
|
|
24946
25006
|
height: 74,
|
|
@@ -25878,7 +25938,7 @@ let SheetPermissionInterceptorClipboardController = class SheetPermissionInterce
|
|
|
25878
25938
|
break;
|
|
25879
25939
|
}
|
|
25880
25940
|
}
|
|
25881
|
-
if (!hasPermission) this._sheetPermissionCheckController.blockExecuteWithoutPermission(this._localService.t("permission.dialog.pasteErr"));
|
|
25941
|
+
if (!hasPermission) this._sheetPermissionCheckController.blockExecuteWithoutPermission(this._localService.t("sheets-ui.permission.dialog.pasteErr"));
|
|
25882
25942
|
return hasPermission;
|
|
25883
25943
|
}
|
|
25884
25944
|
}));
|
|
@@ -25953,7 +26013,7 @@ const checkRangeValid = (injector, permissionRanges, permissionId, unitId, subUn
|
|
|
25953
26013
|
const worksheetRuleModel = injector.get(_univerjs_sheets.WorksheetProtectionRuleModel);
|
|
25954
26014
|
const rangeProtectionRuleModel = injector.get(_univerjs_sheets.RangeProtectionRuleModel);
|
|
25955
26015
|
let rangeErrorString = "";
|
|
25956
|
-
if (permissionRanges.length === 0) rangeErrorString = localeService.t("permission.panel.emptyRangeError");
|
|
26016
|
+
if (permissionRanges.length === 0) rangeErrorString = localeService.t("sheets-ui.permission.panel.emptyRangeError");
|
|
25957
26017
|
else if (permissionRanges.length > 1) {
|
|
25958
26018
|
let hasLap = false;
|
|
25959
26019
|
for (let i = 0; i < permissionRanges.length; i++) {
|
|
@@ -25963,11 +26023,11 @@ const checkRangeValid = (injector, permissionRanges, permissionId, unitId, subUn
|
|
|
25963
26023
|
}
|
|
25964
26024
|
if (hasLap) break;
|
|
25965
26025
|
}
|
|
25966
|
-
if (hasLap) rangeErrorString = localeService.t("permission.panel.rangeOverlapError");
|
|
26026
|
+
if (hasLap) rangeErrorString = localeService.t("sheets-ui.permission.panel.rangeOverlapError");
|
|
25967
26027
|
}
|
|
25968
26028
|
if (!rangeErrorString) {
|
|
25969
26029
|
if (worksheetRuleModel.getRule(unitId, subUnitId) && !permissionId) {
|
|
25970
|
-
rangeErrorString = localeService.t("permission.panel.rangeOverlapOverPermissionError");
|
|
26030
|
+
rangeErrorString = localeService.t("sheets-ui.permission.panel.rangeOverlapOverPermissionError");
|
|
25971
26031
|
return rangeErrorString;
|
|
25972
26032
|
}
|
|
25973
26033
|
const lapRule = rangeProtectionRuleModel.getSubunitRuleList(unitId, subUnitId).filter((rule) => {
|
|
@@ -25979,7 +26039,7 @@ const checkRangeValid = (injector, permissionRanges, permissionId, unitId, subUn
|
|
|
25979
26039
|
});
|
|
25980
26040
|
if (lapRule === null || lapRule === void 0 ? void 0 : lapRule.ranges.find((range) => {
|
|
25981
26041
|
return permissionRanges.some((r) => _univerjs_core.Rectangle.intersects(range, r));
|
|
25982
|
-
})) rangeErrorString = localeService.t("permission.panel.rangeOverlapOverPermissionError");
|
|
26042
|
+
})) rangeErrorString = localeService.t("sheets-ui.permission.panel.rangeOverlapOverPermissionError");
|
|
25983
26043
|
}
|
|
25984
26044
|
return rangeErrorString === "" ? void 0 : rangeErrorString;
|
|
25985
26045
|
};
|
|
@@ -26178,7 +26238,7 @@ const PermissionDetailFooterPart = (props) => {
|
|
|
26178
26238
|
});
|
|
26179
26239
|
}
|
|
26180
26240
|
const sidebarProps = {
|
|
26181
|
-
header: { title: `${localeService.t("permission.panel.title")}` },
|
|
26241
|
+
header: { title: `${localeService.t("sheets-ui.permission.panel.title")}` },
|
|
26182
26242
|
children: {
|
|
26183
26243
|
label: UNIVER_SHEET_PERMISSION_PANEL,
|
|
26184
26244
|
showDetail: false
|
|
@@ -26187,14 +26247,14 @@ const PermissionDetailFooterPart = (props) => {
|
|
|
26187
26247
|
};
|
|
26188
26248
|
sidebarService.open(sidebarProps);
|
|
26189
26249
|
},
|
|
26190
|
-
children: localeService.t("permission.button.confirm")
|
|
26250
|
+
children: localeService.t("sheets-ui.permission.button.confirm")
|
|
26191
26251
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Button, {
|
|
26192
26252
|
onClick: () => {
|
|
26193
26253
|
sheetPermissionPanelModel.reset();
|
|
26194
26254
|
sheetPermissionUserManagerService.reset();
|
|
26195
26255
|
sidebarService.close();
|
|
26196
26256
|
},
|
|
26197
|
-
children: localeService.t("permission.button.cancel")
|
|
26257
|
+
children: localeService.t("sheets-ui.permission.button.cancel")
|
|
26198
26258
|
})]
|
|
26199
26259
|
});
|
|
26200
26260
|
};
|
|
@@ -26229,7 +26289,7 @@ const PermissionDetailMainPart = (props) => {
|
|
|
26229
26289
|
};
|
|
26230
26290
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.FormLayout, {
|
|
26231
26291
|
className: "univer-font-medium",
|
|
26232
|
-
label: localeService.t("permission.panel.protectedRange"),
|
|
26292
|
+
label: localeService.t("sheets-ui.permission.panel.protectedRange"),
|
|
26233
26293
|
error: rangesErrMsg,
|
|
26234
26294
|
children: RangeSelector && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RangeSelector, {
|
|
26235
26295
|
unitId,
|
|
@@ -26239,11 +26299,11 @@ const PermissionDetailMainPart = (props) => {
|
|
|
26239
26299
|
})
|
|
26240
26300
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.FormLayout, {
|
|
26241
26301
|
className: "univer-font-medium",
|
|
26242
|
-
label: localeService.t("permission.panel.permissionDirection"),
|
|
26302
|
+
label: localeService.t("sheets-ui.permission.panel.permissionDirection"),
|
|
26243
26303
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Input, {
|
|
26244
26304
|
value: desc,
|
|
26245
26305
|
onChange: (v) => onDescChange(v),
|
|
26246
|
-
placeholder: localeService.t("permission.panel.permissionDirectionPlaceholder")
|
|
26306
|
+
placeholder: localeService.t("sheets-ui.permission.panel.permissionDirectionPlaceholder")
|
|
26247
26307
|
})
|
|
26248
26308
|
})] });
|
|
26249
26309
|
};
|
|
@@ -26324,17 +26384,17 @@ const PermissionDetailUserPart = (props) => {
|
|
|
26324
26384
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
26325
26385
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.FormLayout, {
|
|
26326
26386
|
className: "univer-font-medium",
|
|
26327
|
-
label: localeService.t("permission.panel.editPermission"),
|
|
26387
|
+
label: localeService.t("sheets-ui.permission.panel.editPermission"),
|
|
26328
26388
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_univerjs_design.RadioGroup, {
|
|
26329
26389
|
value: editState,
|
|
26330
26390
|
onChange: (v) => onEditStateChange(v),
|
|
26331
26391
|
className: "univer-flex univer-flex-col",
|
|
26332
26392
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Radio, {
|
|
26333
26393
|
value: _univerjs_sheets.EditStateEnum.OnlyMe,
|
|
26334
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: localeService.t("permission.panel.onlyICanEdit") })
|
|
26394
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: localeService.t("sheets-ui.permission.panel.onlyICanEdit") })
|
|
26335
26395
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Radio, {
|
|
26336
26396
|
value: _univerjs_sheets.EditStateEnum.DesignedUserCanEdit,
|
|
26337
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: localeService.t("permission.panel.designedUserCanEdit") })
|
|
26397
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: localeService.t("sheets-ui.permission.panel.designedUserCanEdit") })
|
|
26338
26398
|
})]
|
|
26339
26399
|
})
|
|
26340
26400
|
}),
|
|
@@ -26343,10 +26403,10 @@ const PermissionDetailUserPart = (props) => {
|
|
|
26343
26403
|
children: [
|
|
26344
26404
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
26345
26405
|
className: "univer-flex univer-items-center univer-justify-between univer-text-sm",
|
|
26346
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: localeService.t("permission.panel.designedPerson") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
26406
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: localeService.t("sheets-ui.permission.panel.designedPerson") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
26347
26407
|
className: "univer-cursor-pointer univer-text-primary-600",
|
|
26348
26408
|
onClick: handleAddPerson,
|
|
26349
|
-
children: localeService.t("permission.panel.addPerson")
|
|
26409
|
+
children: localeService.t("sheets-ui.permission.panel.addPerson")
|
|
26350
26410
|
})]
|
|
26351
26411
|
}),
|
|
26352
26412
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: "univer-my-2 univer-h-px univer-bg-gray-200" }),
|
|
@@ -26370,10 +26430,10 @@ const PermissionDetailUserPart = (props) => {
|
|
|
26370
26430
|
borderless: true,
|
|
26371
26431
|
value: "edit",
|
|
26372
26432
|
options: [{
|
|
26373
|
-
label: `${localeService.t("permission.panel.canEdit")}`,
|
|
26433
|
+
label: `${localeService.t("sheets-ui.permission.panel.canEdit")}`,
|
|
26374
26434
|
value: "edit"
|
|
26375
26435
|
}, {
|
|
26376
|
-
label: `${localeService.t("permission.panel.delete")}`,
|
|
26436
|
+
label: `${localeService.t("sheets-ui.permission.panel.delete")}`,
|
|
26377
26437
|
value: "delete"
|
|
26378
26438
|
}],
|
|
26379
26439
|
onChange: (v) => {
|
|
@@ -26394,7 +26454,7 @@ const PermissionDetailUserPart = (props) => {
|
|
|
26394
26454
|
alt: ""
|
|
26395
26455
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
26396
26456
|
className: "univer-w-60 univer-break-words univer-text-sm univer-text-gray-400",
|
|
26397
|
-
children: localeService.t("permission.dialog.userEmpty")
|
|
26457
|
+
children: localeService.t("sheets-ui.permission.dialog.userEmpty")
|
|
26398
26458
|
})]
|
|
26399
26459
|
})
|
|
26400
26460
|
})
|
|
@@ -26402,17 +26462,17 @@ const PermissionDetailUserPart = (props) => {
|
|
|
26402
26462
|
}),
|
|
26403
26463
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.FormLayout, {
|
|
26404
26464
|
className: "univer-font-medium",
|
|
26405
|
-
label: localeService.t("permission.panel.viewPermission"),
|
|
26465
|
+
label: localeService.t("sheets-ui.permission.panel.viewPermission"),
|
|
26406
26466
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_univerjs_design.RadioGroup, {
|
|
26407
26467
|
value: viewState,
|
|
26408
26468
|
onChange: (v) => onViewStateChange(v),
|
|
26409
26469
|
className: "univer-flex univer-flex-col last:univer-mb-0",
|
|
26410
26470
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Radio, {
|
|
26411
26471
|
value: _univerjs_sheets.ViewStateEnum.OthersCanView,
|
|
26412
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: localeService.t("permission.panel.othersCanView") })
|
|
26472
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: localeService.t("sheets-ui.permission.panel.othersCanView") })
|
|
26413
26473
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Radio, {
|
|
26414
26474
|
value: _univerjs_sheets.ViewStateEnum.NoOneElseCanView,
|
|
26415
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: localeService.t("permission.panel.noOneElseCanView") })
|
|
26475
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: localeService.t("sheets-ui.permission.panel.noOneElseCanView") })
|
|
26416
26476
|
})]
|
|
26417
26477
|
})
|
|
26418
26478
|
})
|
|
@@ -26623,7 +26683,7 @@ function SheetPermissionPanelList() {
|
|
|
26623
26683
|
subUnitId: rule.subUnitId
|
|
26624
26684
|
});
|
|
26625
26685
|
const sidebarProps = {
|
|
26626
|
-
header: { title: "permission.panel.title" },
|
|
26686
|
+
header: { title: "sheets-ui.permission.panel.title" },
|
|
26627
26687
|
children: {
|
|
26628
26688
|
label: UNIVER_SHEET_PERMISSION_PANEL,
|
|
26629
26689
|
showDetail: true,
|
|
@@ -26648,14 +26708,14 @@ function SheetPermissionPanelList() {
|
|
|
26648
26708
|
onClick: () => handleChangeHeaderType(true),
|
|
26649
26709
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
26650
26710
|
className: (0, _univerjs_design.clsx)("univer-h-6 univer-text-base univer-font-medium univer-leading-6", { "univer-text-blue-500": isCurrentSheet }),
|
|
26651
|
-
children: [" ", localeService.t("permission.panel.currentSheet")]
|
|
26711
|
+
children: [" ", localeService.t("sheets-ui.permission.panel.currentSheet")]
|
|
26652
26712
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: (0, _univerjs_design.clsx)("univer-mt-1 univer-h-0.5 univer-w-6", { "univer-bg-blue-500": isCurrentSheet }) })]
|
|
26653
26713
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
26654
26714
|
className: "univer-mr-5 univer-flex univer-cursor-pointer univer-flex-col univer-items-center",
|
|
26655
26715
|
onClick: () => handleChangeHeaderType(false),
|
|
26656
26716
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
26657
26717
|
className: (0, _univerjs_design.clsx)("univer-h-6 univer-text-base univer-font-medium univer-leading-6", { "univer-text-blue-500": !isCurrentSheet }),
|
|
26658
|
-
children: localeService.t("permission.panel.allSheet")
|
|
26718
|
+
children: localeService.t("sheets-ui.permission.panel.allSheet")
|
|
26659
26719
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: (0, _univerjs_design.clsx)("univer-mt-1 univer-h-0.5 univer-w-6", { "univer-bg-blue-500": !isCurrentSheet }) })]
|
|
26660
26720
|
})]
|
|
26661
26721
|
}),
|
|
@@ -26714,14 +26774,14 @@ function SheetPermissionPanelList() {
|
|
|
26714
26774
|
}), (hasManagerPermission || hasDeletePermission) && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
26715
26775
|
className: "univer-flex univer-items-center",
|
|
26716
26776
|
children: [hasManagerPermission && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Tooltip, {
|
|
26717
|
-
title: localeService.t("permission.panel.edit"),
|
|
26777
|
+
title: localeService.t("sheets-ui.permission.panel.edit"),
|
|
26718
26778
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
26719
26779
|
className: "univer-box-border univer-h-6 univer-rounded-sm univer-p-1 hover:univer-bg-gray-200",
|
|
26720
26780
|
onClick: () => handleEdit(rule),
|
|
26721
26781
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_icons.WriteIcon, {})
|
|
26722
26782
|
})
|
|
26723
26783
|
}), hasDeletePermission && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Tooltip, {
|
|
26724
|
-
title: localeService.t("permission.panel.delete"),
|
|
26784
|
+
title: localeService.t("sheets-ui.permission.panel.delete"),
|
|
26725
26785
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
26726
26786
|
className: "univer-box-border univer-h-6 univer-rounded-sm univer-p-1 hover:univer-bg-gray-200",
|
|
26727
26787
|
onClick: () => handleDelete(rule),
|
|
@@ -26745,11 +26805,11 @@ function SheetPermissionPanelList() {
|
|
|
26745
26805
|
}),
|
|
26746
26806
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
26747
26807
|
className: "univer-h-4 univer-flex-grow univer-text-xs univer-text-gray-900 dark:!univer-text-white",
|
|
26748
|
-
children: localeService.t("permission.panel.created")
|
|
26808
|
+
children: localeService.t("sheets-ui.permission.panel.created")
|
|
26749
26809
|
}),
|
|
26750
26810
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
26751
26811
|
className: "univer-h-4 univer-text-xs univer-text-gray-900 dark:!univer-text-white",
|
|
26752
|
-
children: editPermission ? `${localeService.t("permission.panel.iCanEdit")}` : `${localeService.t("permission.panel.iCanNotEdit")}`
|
|
26812
|
+
children: editPermission ? `${localeService.t("sheets-ui.permission.panel.iCanEdit")}` : `${localeService.t("sheets-ui.permission.panel.iCanNotEdit")}`
|
|
26753
26813
|
})
|
|
26754
26814
|
]
|
|
26755
26815
|
}),
|
|
@@ -26757,10 +26817,10 @@ function SheetPermissionPanelList() {
|
|
|
26757
26817
|
className: "univer-mt-2 univer-flex univer-items-center",
|
|
26758
26818
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
26759
26819
|
className: "univer-h-4 univer-flex-grow univer-text-xs univer-text-gray-900 dark:!univer-text-white",
|
|
26760
|
-
children: localeService.t("permission.panel.viewPermission")
|
|
26820
|
+
children: localeService.t("sheets-ui.permission.panel.viewPermission")
|
|
26761
26821
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
26762
26822
|
className: "univer-h-4 univer-text-xs univer-text-gray-900 dark:!univer-text-white",
|
|
26763
|
-
children: viewPermission ? `${localeService.t("permission.panel.iCanView")}` : `${localeService.t("permission.panel.iCanNotView")}`
|
|
26823
|
+
children: viewPermission ? `${localeService.t("sheets-ui.permission.panel.iCanView")}` : `${localeService.t("sheets-ui.permission.panel.iCanNotView")}`
|
|
26764
26824
|
})]
|
|
26765
26825
|
}),
|
|
26766
26826
|
rule.description && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Tooltip, {
|
|
@@ -26783,7 +26843,7 @@ function SheetPermissionPanelList() {
|
|
|
26783
26843
|
draggable: false
|
|
26784
26844
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
26785
26845
|
className: "univer-w-60 univer-break-words univer-text-sm univer-text-gray-400",
|
|
26786
|
-
children: localeService.t("permission.dialog.listEmpty")
|
|
26846
|
+
children: localeService.t("sheets-ui.permission.dialog.listEmpty")
|
|
26787
26847
|
})]
|
|
26788
26848
|
}),
|
|
26789
26849
|
hasSetProtectPermission && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -26793,7 +26853,7 @@ function SheetPermissionPanelList() {
|
|
|
26793
26853
|
variant: "primary",
|
|
26794
26854
|
onClick: () => {
|
|
26795
26855
|
const sidebarProps = {
|
|
26796
|
-
header: { title: `${localeService.t("permission.panel.title")}` },
|
|
26856
|
+
header: { title: `${localeService.t("sheets-ui.permission.panel.title")}` },
|
|
26797
26857
|
children: {
|
|
26798
26858
|
label: "UNIVER_SHEET_PERMISSION_PANEL",
|
|
26799
26859
|
showDetail: true
|
|
@@ -26802,7 +26862,7 @@ function SheetPermissionPanelList() {
|
|
|
26802
26862
|
};
|
|
26803
26863
|
sidebarService.open(sidebarProps);
|
|
26804
26864
|
},
|
|
26805
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: "+ " }), localeService.t("permission.button.addNewPermission")]
|
|
26865
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: "+ " }), localeService.t("sheets-ui.permission.button.addNewPermission")]
|
|
26806
26866
|
})
|
|
26807
26867
|
})
|
|
26808
26868
|
]
|
|
@@ -26862,7 +26922,7 @@ const SheetPermissionDialog = () => {
|
|
|
26862
26922
|
const [permissionMap, setPermissionMap] = (0, react.useState)(() => {
|
|
26863
26923
|
return Object.keys(subUnitPermissionTypeMap).reduce((acc, action) => {
|
|
26864
26924
|
acc[action] = {
|
|
26865
|
-
text: localeService.t(`permission.panel.${subUnitPermissionTypeMap[Number(action)]}`),
|
|
26925
|
+
text: localeService.t(`sheets-ui.permission.panel.${subUnitPermissionTypeMap[Number(action)]}`),
|
|
26866
26926
|
allowed: true
|
|
26867
26927
|
};
|
|
26868
26928
|
return acc;
|
|
@@ -26890,7 +26950,7 @@ const SheetPermissionDialog = () => {
|
|
|
26890
26950
|
actions: defaultWorksheetUnitActionList
|
|
26891
26951
|
}))[0].strategies.reduce((p, c) => {
|
|
26892
26952
|
if (subUnitPermissionTypeMap[c.action]) p[c.action] = {
|
|
26893
|
-
text: localeService.t(`permission.panel.${subUnitPermissionTypeMap[c.action]}`),
|
|
26953
|
+
text: localeService.t(`sheets-ui.permission.panel.${subUnitPermissionTypeMap[c.action]}`),
|
|
26894
26954
|
allowed: c.role !== _univerjs_protocol.UnitRole.Owner
|
|
26895
26955
|
};
|
|
26896
26956
|
return p;
|
|
@@ -26958,13 +27018,16 @@ const SheetPermissionDialog = () => {
|
|
|
26958
27018
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Spin, {
|
|
26959
27019
|
loading,
|
|
26960
27020
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
26961
|
-
className: (0, _univerjs_design.clsx)("univer-flex univer-flex-col", _univerjs_design.borderTopClassName),
|
|
27021
|
+
className: (0, _univerjs_design.clsx)("univer-flex univer-flex-col univer-gap-2 univer-pt-2", _univerjs_design.borderTopClassName),
|
|
26962
27022
|
children: [Object.keys(permissionMap).map((action) => {
|
|
26963
27023
|
const actionItem = permissionMap[action];
|
|
26964
27024
|
const { text, allowed } = actionItem;
|
|
26965
27025
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
26966
|
-
className: "univer-
|
|
26967
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("
|
|
27026
|
+
className: "univer-flex univer-h-5 univer-items-center univer-justify-between",
|
|
27027
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
27028
|
+
className: "univer-text-sm",
|
|
27029
|
+
children: text
|
|
27030
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Switch, {
|
|
26968
27031
|
defaultChecked: allowed,
|
|
26969
27032
|
onChange: () => {
|
|
26970
27033
|
setPermissionMap({
|
|
@@ -26983,14 +27046,14 @@ const SheetPermissionDialog = () => {
|
|
|
26983
27046
|
onClick: () => {
|
|
26984
27047
|
dialogService.close(UNIVER_SHEET_PERMISSION_DIALOG_ID);
|
|
26985
27048
|
},
|
|
26986
|
-
children: localeService.t("permission.button.cancel")
|
|
27049
|
+
children: localeService.t("sheets-ui.permission.button.cancel")
|
|
26987
27050
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Button, {
|
|
26988
27051
|
variant: "primary",
|
|
26989
27052
|
onClick: () => {
|
|
26990
27053
|
handleChangeActionPermission();
|
|
26991
27054
|
dialogService.close(UNIVER_SHEET_PERMISSION_DIALOG_ID);
|
|
26992
27055
|
},
|
|
26993
|
-
children: localeService.t("permission.button.confirm")
|
|
27056
|
+
children: localeService.t("sheets-ui.permission.button.confirm")
|
|
26994
27057
|
})]
|
|
26995
27058
|
})]
|
|
26996
27059
|
})
|
|
@@ -27028,7 +27091,7 @@ const SheetPermissionUserDialog = () => {
|
|
|
27028
27091
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [
|
|
27029
27092
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Input, {
|
|
27030
27093
|
className: "univer-w-full",
|
|
27031
|
-
placeholder: localeService.t("permission.dialog.search"),
|
|
27094
|
+
placeholder: localeService.t("sheets-ui.permission.dialog.search"),
|
|
27032
27095
|
value: inputValue,
|
|
27033
27096
|
onChange: (v) => setInputValue(v)
|
|
27034
27097
|
}) }),
|
|
@@ -27051,7 +27114,7 @@ const SheetPermissionUserDialog = () => {
|
|
|
27051
27114
|
}),
|
|
27052
27115
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
27053
27116
|
className: "univer-text-xs univer-text-rose-600",
|
|
27054
|
-
children: localeService.t("permission.dialog.ownerInherit")
|
|
27117
|
+
children: localeService.t("sheets-ui.permission.dialog.ownerInherit")
|
|
27055
27118
|
})
|
|
27056
27119
|
]
|
|
27057
27120
|
}, (_item$subject4 = item.subject) === null || _item$subject4 === void 0 ? void 0 : _item$subject4.userID);
|
|
@@ -27070,7 +27133,7 @@ const SheetPermissionUserDialog = () => {
|
|
|
27070
27133
|
}),
|
|
27071
27134
|
item.role === _univerjs_protocol.UnitRole.Owner && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
27072
27135
|
className: "univer-text-xs univer-text-rose-600",
|
|
27073
|
-
children: localeService.t("permission.dialog.ownerWithoutInherit")
|
|
27136
|
+
children: localeService.t("sheets-ui.permission.dialog.ownerWithoutInherit")
|
|
27074
27137
|
}),
|
|
27075
27138
|
(selectUserInfo === null || selectUserInfo === void 0 ? void 0 : selectUserInfo.findIndex((v) => {
|
|
27076
27139
|
var _v$subject3, _item$subject10;
|
|
@@ -27087,7 +27150,7 @@ const SheetPermissionUserDialog = () => {
|
|
|
27087
27150
|
draggable: false
|
|
27088
27151
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
27089
27152
|
className: "univer-text-sm univer-text-gray-400",
|
|
27090
|
-
children: localeService.t("permission.dialog.userEmpty")
|
|
27153
|
+
children: localeService.t("sheets-ui.permission.dialog.userEmpty")
|
|
27091
27154
|
})]
|
|
27092
27155
|
})
|
|
27093
27156
|
}),
|
|
@@ -27096,14 +27159,14 @@ const SheetPermissionUserDialog = () => {
|
|
|
27096
27159
|
className: "univer-flex univer-items-center univer-justify-end univer-gap-1 univer-py-2",
|
|
27097
27160
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Button, {
|
|
27098
27161
|
onClick: () => dialogService.close(UNIVER_SHEET_PERMISSION_USER_DIALOG_ID),
|
|
27099
|
-
children: localeService.t("permission.button.cancel")
|
|
27162
|
+
children: localeService.t("sheets-ui.permission.button.cancel")
|
|
27100
27163
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Button, {
|
|
27101
27164
|
variant: "primary",
|
|
27102
27165
|
onClick: () => {
|
|
27103
27166
|
sheetPermissionUserManagerService.setSelectUserList(selectUserInfo);
|
|
27104
27167
|
dialogService.close(UNIVER_SHEET_PERMISSION_USER_DIALOG_ID);
|
|
27105
27168
|
},
|
|
27106
|
-
children: localeService.t("permission.button.confirm")
|
|
27169
|
+
children: localeService.t("sheets-ui.permission.button.confirm")
|
|
27107
27170
|
})]
|
|
27108
27171
|
})
|
|
27109
27172
|
] });
|
|
@@ -27130,7 +27193,7 @@ const AlertDialog = ({ errorMsg }) => {
|
|
|
27130
27193
|
const localeService = (0, _univerjs_ui.useDependency)(_univerjs_core.LocaleService);
|
|
27131
27194
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
27132
27195
|
className: "univer-m-0",
|
|
27133
|
-
children: errorMsg || localeService.t("permission.dialog.alertContent")
|
|
27196
|
+
children: errorMsg || localeService.t("sheets-ui.permission.dialog.alertContent")
|
|
27134
27197
|
}) });
|
|
27135
27198
|
};
|
|
27136
27199
|
|
|
@@ -28989,7 +29052,7 @@ let SheetSkeletonRenderController = class SheetSkeletonRenderController extends
|
|
|
28989
29052
|
}));
|
|
28990
29053
|
}
|
|
28991
29054
|
_updateSceneSize(param) {
|
|
28992
|
-
var _this$_renderManagerS
|
|
29055
|
+
var _this$_renderManagerS;
|
|
28993
29056
|
if (param == null) return;
|
|
28994
29057
|
const { unitId } = this._context;
|
|
28995
29058
|
const { skeleton } = param;
|
|
@@ -29002,30 +29065,6 @@ let SheetSkeletonRenderController = class SheetSkeletonRenderController extends
|
|
|
29002
29065
|
height: columnHeaderHeightAndMarginTop + rowTotalHeight
|
|
29003
29066
|
});
|
|
29004
29067
|
scene.getMainViewport().setMargin(rowHeaderWidthAndMarginLeft, columnHeaderHeightAndMarginTop);
|
|
29005
|
-
scene.getMainViewport().resizeWhenFreezeChange({
|
|
29006
|
-
left: rowHeaderWidthAndMarginLeft,
|
|
29007
|
-
top: columnHeaderHeightAndMarginTop
|
|
29008
|
-
});
|
|
29009
|
-
(_scene$getViewport = scene.getViewport(_univerjs_engine_render.SHEET_VIEWPORT_KEY.VIEW_COLUMN_LEFT)) === null || _scene$getViewport === void 0 || _scene$getViewport.resizeWhenFreezeChange({
|
|
29010
|
-
left: rowHeaderWidthAndMarginLeft,
|
|
29011
|
-
height: columnHeaderHeightAndMarginTop
|
|
29012
|
-
});
|
|
29013
|
-
(_scene$getViewport2 = scene.getViewport(_univerjs_engine_render.SHEET_VIEWPORT_KEY.VIEW_COLUMN_RIGHT)) === null || _scene$getViewport2 === void 0 || _scene$getViewport2.resizeWhenFreezeChange({
|
|
29014
|
-
left: rowHeaderWidthAndMarginLeft,
|
|
29015
|
-
height: columnHeaderHeightAndMarginTop
|
|
29016
|
-
});
|
|
29017
|
-
(_scene$getViewport3 = scene.getViewport(_univerjs_engine_render.SHEET_VIEWPORT_KEY.VIEW_ROW_BOTTOM)) === null || _scene$getViewport3 === void 0 || _scene$getViewport3.resizeWhenFreezeChange({
|
|
29018
|
-
width: rowHeaderWidthAndMarginLeft,
|
|
29019
|
-
top: columnHeaderHeightAndMarginTop
|
|
29020
|
-
});
|
|
29021
|
-
(_scene$getViewport4 = scene.getViewport(_univerjs_engine_render.SHEET_VIEWPORT_KEY.VIEW_ROW_TOP)) === null || _scene$getViewport4 === void 0 || _scene$getViewport4.resizeWhenFreezeChange({
|
|
29022
|
-
width: rowHeaderWidthAndMarginLeft,
|
|
29023
|
-
top: columnHeaderHeightAndMarginTop
|
|
29024
|
-
});
|
|
29025
|
-
(_scene$getViewport5 = scene.getViewport(_univerjs_engine_render.SHEET_VIEWPORT_KEY.VIEW_LEFT_TOP)) === null || _scene$getViewport5 === void 0 || _scene$getViewport5.resizeWhenFreezeChange({
|
|
29026
|
-
width: rowHeaderWidthAndMarginLeft,
|
|
29027
|
-
height: columnHeaderHeightAndMarginTop
|
|
29028
|
-
});
|
|
29029
29068
|
}
|
|
29030
29069
|
};
|
|
29031
29070
|
SheetSkeletonRenderController = __decorate([__decorateParam(1, (0, _univerjs_core.Inject)(SheetSkeletonManagerService)), __decorateParam(2, _univerjs_engine_render.IRenderManagerService)], SheetSkeletonRenderController);
|
|
@@ -29230,7 +29269,7 @@ function DateDropdown(props) {
|
|
|
29230
29269
|
variant: "primary",
|
|
29231
29270
|
onClick: handleSave,
|
|
29232
29271
|
disabled: !date || !date.isValid(),
|
|
29233
|
-
children: localeService.t("
|
|
29272
|
+
children: localeService.t("sheets-ui.data-validation.alert.ok")
|
|
29234
29273
|
})
|
|
29235
29274
|
})]
|
|
29236
29275
|
});
|
|
@@ -29238,13 +29277,29 @@ function DateDropdown(props) {
|
|
|
29238
29277
|
DateDropdown.componentKey = "sheets.dropdown.date";
|
|
29239
29278
|
|
|
29240
29279
|
//#endregion
|
|
29241
|
-
//#region src/views/dropdown/list-dropdown/
|
|
29242
|
-
|
|
29243
|
-
|
|
29244
|
-
|
|
29245
|
-
|
|
29246
|
-
|
|
29280
|
+
//#region src/views/dropdown/list-dropdown/utils.ts
|
|
29281
|
+
/**
|
|
29282
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
29283
|
+
*
|
|
29284
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
29285
|
+
* you may not use this file except in compliance with the License.
|
|
29286
|
+
* You may obtain a copy of the License at
|
|
29287
|
+
*
|
|
29288
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
29289
|
+
*
|
|
29290
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
29291
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
29292
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
29293
|
+
* See the License for the specific language governing permissions and
|
|
29294
|
+
* limitations under the License.
|
|
29295
|
+
*/
|
|
29296
|
+
function getListDropdownValue(value, multiple) {
|
|
29297
|
+
if (!value) return [];
|
|
29298
|
+
return multiple ? (0, _univerjs_sheets.deserializeListOptions)(value) : [value];
|
|
29247
29299
|
}
|
|
29300
|
+
|
|
29301
|
+
//#endregion
|
|
29302
|
+
//#region src/views/dropdown/list-dropdown/index.tsx
|
|
29248
29303
|
function SelectList(props) {
|
|
29249
29304
|
const { value, onChange, multiple, options, title, onEdit, style, location, showEdit: showEditOnDropdown, showSearch: showSearchOnDropdown } = props;
|
|
29250
29305
|
const localeService = (0, _univerjs_ui.useDependency)(_univerjs_core.LocaleService);
|
|
@@ -29349,7 +29404,7 @@ function SelectList(props) {
|
|
|
29349
29404
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
|
|
29350
29405
|
className: "univer-block univer-cursor-pointer univer-rounded univer-px-1.5 univer-py-1 univer-text-xs hover:univer-bg-gray-100 dark:hover:!univer-bg-gray-800",
|
|
29351
29406
|
onClick: onEdit,
|
|
29352
|
-
children: localeService.t("
|
|
29407
|
+
children: localeService.t("sheets-ui.data-validation.list.edit")
|
|
29353
29408
|
})
|
|
29354
29409
|
})
|
|
29355
29410
|
]
|
|
@@ -29369,11 +29424,12 @@ function ListDropDown(props) {
|
|
|
29369
29424
|
minWidth: cellWidth,
|
|
29370
29425
|
maxWidth: Math.max(cellWidth, 200)
|
|
29371
29426
|
},
|
|
29372
|
-
title: multiple ? localeService.t("
|
|
29373
|
-
value:
|
|
29427
|
+
title: multiple ? localeService.t("sheets-ui.data-validation.listMultiple.dropdown") : localeService.t("sheets-ui.data-validation.list.dropdown"),
|
|
29428
|
+
value: getListDropdownValue(localValue, multiple),
|
|
29374
29429
|
multiple,
|
|
29375
29430
|
onChange: async (newValue) => {
|
|
29376
|
-
|
|
29431
|
+
var _newValue$;
|
|
29432
|
+
setLocalValue(multiple ? (0, _univerjs_sheets.serializeListOptions)(newValue) : (_newValue$ = newValue[0]) !== null && _newValue$ !== void 0 ? _newValue$ : "");
|
|
29377
29433
|
if (!(await (onChange === null || onChange === void 0 ? void 0 : onChange(newValue)) === false)) hideFn();
|
|
29378
29434
|
},
|
|
29379
29435
|
options,
|