@univerjs/sheets-formula-ui 0.23.0 → 0.24.0-insiders.20260528-29f582d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +88 -64
- package/lib/cjs/locale/ar-SA.js +72 -0
- package/lib/cjs/locale/ca-ES.js +66 -10368
- package/lib/cjs/locale/de-DE.js +72 -0
- package/lib/cjs/locale/en-US.js +61 -10588
- package/lib/cjs/locale/es-ES.js +66 -10368
- package/lib/cjs/locale/fa-IR.js +66 -10878
- package/lib/cjs/locale/fr-FR.js +66 -10844
- package/lib/cjs/locale/id-ID.js +72 -0
- package/lib/cjs/locale/it-IT.js +72 -0
- package/lib/cjs/locale/ja-JP.js +66 -10367
- package/lib/cjs/locale/ko-KR.js +66 -10367
- package/lib/cjs/locale/pl-PL.js +72 -0
- package/lib/cjs/locale/pt-BR.js +72 -0
- package/lib/cjs/locale/ru-RU.js +66 -10401
- package/lib/cjs/locale/sk-SK.js +66 -10367
- package/lib/cjs/locale/vi-VN.js +66 -10368
- package/lib/cjs/locale/zh-CN.js +66 -10368
- package/lib/cjs/locale/zh-HK.js +72 -0
- package/lib/cjs/locale/zh-TW.js +66 -10368
- package/lib/es/index.js +89 -65
- package/lib/es/locale/ar-SA.js +71 -0
- package/lib/es/locale/ca-ES.js +66 -10368
- package/lib/es/locale/de-DE.js +71 -0
- package/lib/es/locale/en-US.js +61 -10588
- package/lib/es/locale/es-ES.js +66 -10368
- package/lib/es/locale/fa-IR.js +66 -10878
- package/lib/es/locale/fr-FR.js +66 -10844
- package/lib/es/locale/id-ID.js +71 -0
- package/lib/es/locale/it-IT.js +71 -0
- package/lib/es/locale/ja-JP.js +66 -10367
- package/lib/es/locale/ko-KR.js +66 -10367
- package/lib/es/locale/pl-PL.js +71 -0
- package/lib/es/locale/pt-BR.js +71 -0
- package/lib/es/locale/ru-RU.js +66 -10401
- package/lib/es/locale/sk-SK.js +66 -10367
- package/lib/es/locale/vi-VN.js +66 -10368
- package/lib/es/locale/zh-CN.js +66 -10368
- package/lib/es/locale/zh-HK.js +71 -0
- package/lib/es/locale/zh-TW.js +66 -10368
- package/lib/index.js +89 -65
- package/lib/locale/ar-SA.js +71 -0
- package/lib/locale/ca-ES.js +66 -10368
- package/lib/locale/de-DE.js +71 -0
- package/lib/locale/en-US.js +61 -10588
- package/lib/locale/es-ES.js +66 -10368
- package/lib/locale/fa-IR.js +66 -10878
- package/lib/locale/fr-FR.js +66 -10844
- package/lib/locale/id-ID.js +71 -0
- package/lib/locale/it-IT.js +71 -0
- package/lib/locale/ja-JP.js +66 -10367
- package/lib/locale/ko-KR.js +66 -10367
- package/lib/locale/pl-PL.js +71 -0
- package/lib/locale/pt-BR.js +71 -0
- package/lib/locale/ru-RU.js +66 -10401
- package/lib/locale/sk-SK.js +66 -10367
- package/lib/locale/vi-VN.js +66 -10368
- package/lib/locale/zh-CN.js +66 -10368
- package/lib/locale/zh-HK.js +71 -0
- package/lib/locale/zh-TW.js +66 -10368
- package/lib/types/facade/f-univer.d.ts +2 -1
- package/lib/types/index.d.ts +1 -1
- package/lib/types/locale/en-US.d.ts +10 -10466
- package/lib/types/views/formula-editor/hooks/use-formula-search.d.ts +4 -0
- package/lib/types/views/formula-editor/hooks/use-highlight.d.ts +1 -1
- package/lib/types/views/formula-editor/index.d.ts +5 -0
- package/lib/umd/index.js +3 -3
- package/lib/umd/locale/ar-SA.js +1 -0
- package/lib/umd/locale/ca-ES.js +1 -39
- package/lib/umd/locale/de-DE.js +1 -0
- package/lib/umd/locale/en-US.js +1 -44
- package/lib/umd/locale/es-ES.js +1 -39
- package/lib/umd/locale/fa-IR.js +1 -44
- package/lib/umd/locale/fr-FR.js +1 -44
- 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 -43
- package/lib/umd/locale/ko-KR.js +1 -37
- 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 -31
- package/lib/umd/locale/sk-SK.js +1 -39
- package/lib/umd/locale/vi-VN.js +1 -43
- package/lib/umd/locale/zh-CN.js +1 -44
- package/lib/umd/locale/zh-HK.js +1 -0
- package/lib/umd/locale/zh-TW.js +1 -44
- package/package.json +13 -13
- package/LICENSE +0 -176
- package/lib/types/locale/function-list/array/en-US.d.ts +0 -58
- package/lib/types/locale/function-list/array/fa-IR.d.ts +0 -18
- package/lib/types/locale/function-list/array/fr-FR.d.ts +0 -18
- package/lib/types/locale/function-list/array/zh-CN.d.ts +0 -18
- package/lib/types/locale/function-list/array/zh-TW.d.ts +0 -18
- package/lib/types/locale/function-list/compatibility/ca-ES.d.ts +0 -18
- package/lib/types/locale/function-list/compatibility/en-US.d.ts +0 -838
- package/lib/types/locale/function-list/compatibility/es-ES.d.ts +0 -18
- package/lib/types/locale/function-list/compatibility/fa-IR.d.ts +0 -18
- package/lib/types/locale/function-list/compatibility/fr-FR.d.ts +0 -18
- package/lib/types/locale/function-list/compatibility/ja-JP.d.ts +0 -18
- package/lib/types/locale/function-list/compatibility/ko-KR.d.ts +0 -18
- package/lib/types/locale/function-list/compatibility/ru-RU.d.ts +0 -18
- package/lib/types/locale/function-list/compatibility/sk-SK.d.ts +0 -18
- package/lib/types/locale/function-list/compatibility/vi-VN.d.ts +0 -18
- package/lib/types/locale/function-list/compatibility/zh-CN.d.ts +0 -18
- package/lib/types/locale/function-list/compatibility/zh-TW.d.ts +0 -18
- package/lib/types/locale/function-list/cube/ca-ES.d.ts +0 -18
- package/lib/types/locale/function-list/cube/en-US.d.ts +0 -144
- package/lib/types/locale/function-list/cube/es-ES.d.ts +0 -18
- package/lib/types/locale/function-list/cube/fa-IR.d.ts +0 -18
- package/lib/types/locale/function-list/cube/fr-FR.d.ts +0 -18
- package/lib/types/locale/function-list/cube/ja-JP.d.ts +0 -18
- package/lib/types/locale/function-list/cube/ko-KR.d.ts +0 -18
- package/lib/types/locale/function-list/cube/ru-RU.d.ts +0 -18
- package/lib/types/locale/function-list/cube/sk-SK.d.ts +0 -18
- package/lib/types/locale/function-list/cube/vi-VN.d.ts +0 -18
- package/lib/types/locale/function-list/cube/zh-CN.d.ts +0 -18
- package/lib/types/locale/function-list/cube/zh-TW.d.ts +0 -18
- package/lib/types/locale/function-list/database/ca-ES.d.ts +0 -18
- package/lib/types/locale/function-list/database/en-US.d.ts +0 -282
- package/lib/types/locale/function-list/database/es-ES.d.ts +0 -18
- package/lib/types/locale/function-list/database/fa-IR.d.ts +0 -18
- package/lib/types/locale/function-list/database/fr-FR.d.ts +0 -18
- package/lib/types/locale/function-list/database/ja-JP.d.ts +0 -18
- package/lib/types/locale/function-list/database/ko-KR.d.ts +0 -18
- package/lib/types/locale/function-list/database/ru-RU.d.ts +0 -18
- package/lib/types/locale/function-list/database/sk-SK.d.ts +0 -18
- package/lib/types/locale/function-list/database/vi-VN.d.ts +0 -18
- package/lib/types/locale/function-list/database/zh-CN.d.ts +0 -18
- package/lib/types/locale/function-list/database/zh-TW.d.ts +0 -18
- package/lib/types/locale/function-list/date/ca-ES.d.ts +0 -18
- package/lib/types/locale/function-list/date/en-US.d.ts +0 -490
- package/lib/types/locale/function-list/date/es-ES.d.ts +0 -18
- package/lib/types/locale/function-list/date/fa-IR.d.ts +0 -18
- package/lib/types/locale/function-list/date/fr-FR.d.ts +0 -18
- package/lib/types/locale/function-list/date/ja-JP.d.ts +0 -18
- package/lib/types/locale/function-list/date/ko-KR.d.ts +0 -18
- package/lib/types/locale/function-list/date/ru-RU.d.ts +0 -18
- package/lib/types/locale/function-list/date/sk-SK.d.ts +0 -18
- package/lib/types/locale/function-list/date/vi-VN.d.ts +0 -18
- package/lib/types/locale/function-list/date/zh-CN.d.ts +0 -18
- package/lib/types/locale/function-list/date/zh-TW.d.ts +0 -18
- package/lib/types/locale/function-list/engineering/ca-ES.d.ts +0 -18
- package/lib/types/locale/function-list/engineering/en-US.d.ts +0 -940
- package/lib/types/locale/function-list/engineering/es-ES.d.ts +0 -18
- package/lib/types/locale/function-list/engineering/fa-IR.d.ts +0 -18
- package/lib/types/locale/function-list/engineering/fr-FR.d.ts +0 -18
- package/lib/types/locale/function-list/engineering/ja-JP.d.ts +0 -18
- package/lib/types/locale/function-list/engineering/ko-KR.d.ts +0 -18
- package/lib/types/locale/function-list/engineering/ru-RU.d.ts +0 -18
- package/lib/types/locale/function-list/engineering/sk-SK.d.ts +0 -18
- package/lib/types/locale/function-list/engineering/vi-VN.d.ts +0 -18
- package/lib/types/locale/function-list/engineering/zh-CN.d.ts +0 -18
- package/lib/types/locale/function-list/engineering/zh-TW.d.ts +0 -18
- package/lib/types/locale/function-list/financial/ca-ES.d.ts +0 -18
- package/lib/types/locale/function-list/financial/en-US.d.ts +0 -1608
- package/lib/types/locale/function-list/financial/es-ES.d.ts +0 -18
- package/lib/types/locale/function-list/financial/fa-IR.d.ts +0 -18
- package/lib/types/locale/function-list/financial/fr-FR.d.ts +0 -18
- package/lib/types/locale/function-list/financial/ja-JP.d.ts +0 -18
- package/lib/types/locale/function-list/financial/ko-KR.d.ts +0 -18
- package/lib/types/locale/function-list/financial/ru-RU.d.ts +0 -18
- package/lib/types/locale/function-list/financial/sk-SK.d.ts +0 -18
- package/lib/types/locale/function-list/financial/vi-VN.d.ts +0 -18
- package/lib/types/locale/function-list/financial/zh-CN.d.ts +0 -18
- package/lib/types/locale/function-list/financial/zh-TW.d.ts +0 -18
- package/lib/types/locale/function-list/information/ca-ES.d.ts +0 -18
- package/lib/types/locale/function-list/information/en-US.d.ts +0 -386
- package/lib/types/locale/function-list/information/es-ES.d.ts +0 -18
- package/lib/types/locale/function-list/information/fa-IR.d.ts +0 -18
- package/lib/types/locale/function-list/information/fr-FR.d.ts +0 -18
- package/lib/types/locale/function-list/information/ja-JP.d.ts +0 -18
- package/lib/types/locale/function-list/information/ko-KR.d.ts +0 -18
- package/lib/types/locale/function-list/information/ru-RU.d.ts +0 -18
- package/lib/types/locale/function-list/information/sk-SK.d.ts +0 -18
- package/lib/types/locale/function-list/information/vi-VN.d.ts +0 -18
- package/lib/types/locale/function-list/information/zh-CN.d.ts +0 -18
- package/lib/types/locale/function-list/information/zh-TW.d.ts +0 -18
- package/lib/types/locale/function-list/logical/ca-ES.d.ts +0 -18
- package/lib/types/locale/function-list/logical/en-US.d.ts +0 -390
- package/lib/types/locale/function-list/logical/es-ES.d.ts +0 -18
- package/lib/types/locale/function-list/logical/fa-IR.d.ts +0 -18
- package/lib/types/locale/function-list/logical/fr-FR.d.ts +0 -18
- package/lib/types/locale/function-list/logical/ja-JP.d.ts +0 -18
- package/lib/types/locale/function-list/logical/ko-KR.d.ts +0 -18
- package/lib/types/locale/function-list/logical/ru-RU.d.ts +0 -18
- package/lib/types/locale/function-list/logical/sk-SK.d.ts +0 -18
- package/lib/types/locale/function-list/logical/vi-VN.d.ts +0 -18
- package/lib/types/locale/function-list/logical/zh-CN.d.ts +0 -18
- package/lib/types/locale/function-list/logical/zh-TW.d.ts +0 -18
- package/lib/types/locale/function-list/lookup/ca-ES.d.ts +0 -18
- package/lib/types/locale/function-list/lookup/en-US.d.ts +0 -820
- package/lib/types/locale/function-list/lookup/es-ES.d.ts +0 -18
- package/lib/types/locale/function-list/lookup/fa-IR.d.ts +0 -18
- package/lib/types/locale/function-list/lookup/fr-FR.d.ts +0 -18
- package/lib/types/locale/function-list/lookup/ja-JP.d.ts +0 -18
- package/lib/types/locale/function-list/lookup/ko-KR.d.ts +0 -18
- package/lib/types/locale/function-list/lookup/ru-RU.d.ts +0 -18
- package/lib/types/locale/function-list/lookup/sk-SK.d.ts +0 -18
- package/lib/types/locale/function-list/lookup/vi-VN.d.ts +0 -18
- package/lib/types/locale/function-list/lookup/zh-CN.d.ts +0 -18
- package/lib/types/locale/function-list/lookup/zh-TW.d.ts +0 -18
- package/lib/types/locale/function-list/math/ca-ES.d.ts +0 -18
- package/lib/types/locale/function-list/math/en-US.d.ts +0 -1410
- package/lib/types/locale/function-list/math/es-ES.d.ts +0 -18
- package/lib/types/locale/function-list/math/fa-IR.d.ts +0 -18
- package/lib/types/locale/function-list/math/fr-FR.d.ts +0 -18
- package/lib/types/locale/function-list/math/ja-JP.d.ts +0 -18
- package/lib/types/locale/function-list/math/ko-KR.d.ts +0 -18
- package/lib/types/locale/function-list/math/ru-RU.d.ts +0 -18
- package/lib/types/locale/function-list/math/sk-SK.d.ts +0 -18
- package/lib/types/locale/function-list/math/vi-VN.d.ts +0 -18
- package/lib/types/locale/function-list/math/zh-CN.d.ts +0 -18
- package/lib/types/locale/function-list/math/zh-TW.d.ts +0 -18
- package/lib/types/locale/function-list/statistical/ca-ES.d.ts +0 -18
- package/lib/types/locale/function-list/statistical/en-US.d.ts +0 -2308
- package/lib/types/locale/function-list/statistical/es-ES.d.ts +0 -18
- package/lib/types/locale/function-list/statistical/fa-IR.d.ts +0 -18
- package/lib/types/locale/function-list/statistical/fr-FR.d.ts +0 -18
- package/lib/types/locale/function-list/statistical/ja-JP.d.ts +0 -18
- package/lib/types/locale/function-list/statistical/ko-KR.d.ts +0 -18
- package/lib/types/locale/function-list/statistical/ru-RU.d.ts +0 -18
- package/lib/types/locale/function-list/statistical/sk-SK.d.ts +0 -18
- package/lib/types/locale/function-list/statistical/vi-VN.d.ts +0 -18
- package/lib/types/locale/function-list/statistical/zh-CN.d.ts +0 -18
- package/lib/types/locale/function-list/statistical/zh-TW.d.ts +0 -18
- package/lib/types/locale/function-list/text/ca-ES.d.ts +0 -18
- package/lib/types/locale/function-list/text/en-US.d.ts +0 -988
- package/lib/types/locale/function-list/text/es-ES.d.ts +0 -18
- package/lib/types/locale/function-list/text/fa-IR.d.ts +0 -18
- package/lib/types/locale/function-list/text/fr-FR.d.ts +0 -18
- package/lib/types/locale/function-list/text/ja-JP.d.ts +0 -18
- package/lib/types/locale/function-list/text/ko-KR.d.ts +0 -18
- package/lib/types/locale/function-list/text/ru-RU.d.ts +0 -18
- package/lib/types/locale/function-list/text/sk-SK.d.ts +0 -18
- package/lib/types/locale/function-list/text/vi-VN.d.ts +0 -18
- package/lib/types/locale/function-list/text/zh-CN.d.ts +0 -18
- package/lib/types/locale/function-list/text/zh-TW.d.ts +0 -18
- package/lib/types/locale/function-list/univer/ca-ES.d.ts +0 -18
- package/lib/types/locale/function-list/univer/en-US.d.ts +0 -17
- package/lib/types/locale/function-list/univer/es-ES.d.ts +0 -18
- package/lib/types/locale/function-list/univer/fa-IR.d.ts +0 -18
- package/lib/types/locale/function-list/univer/fr-FR.d.ts +0 -18
- package/lib/types/locale/function-list/univer/ja-JP.d.ts +0 -18
- package/lib/types/locale/function-list/univer/ko-KR.d.ts +0 -18
- package/lib/types/locale/function-list/univer/ru-RU.d.ts +0 -17
- package/lib/types/locale/function-list/univer/sk-SK.d.ts +0 -18
- package/lib/types/locale/function-list/univer/vi-VN.d.ts +0 -18
- package/lib/types/locale/function-list/univer/zh-CN.d.ts +0 -18
- package/lib/types/locale/function-list/univer/zh-TW.d.ts +0 -18
- package/lib/types/locale/function-list/web/ca-ES.d.ts +0 -18
- package/lib/types/locale/function-list/web/en-US.d.ts +0 -68
- package/lib/types/locale/function-list/web/es-ES.d.ts +0 -18
- package/lib/types/locale/function-list/web/fa-IR.d.ts +0 -18
- package/lib/types/locale/function-list/web/fr-FR.d.ts +0 -18
- package/lib/types/locale/function-list/web/ja-JP.d.ts +0 -18
- package/lib/types/locale/function-list/web/ko-KR.d.ts +0 -18
- package/lib/types/locale/function-list/web/ru-RU.d.ts +0 -18
- package/lib/types/locale/function-list/web/sk-SK.d.ts +0 -18
- package/lib/types/locale/function-list/web/vi-VN.d.ts +0 -18
- package/lib/types/locale/function-list/web/zh-CN.d.ts +0 -18
- package/lib/types/locale/function-list/web/zh-TW.d.ts +0 -18
- /package/lib/types/locale/{function-list/array/ca-ES.d.ts → ar-SA.d.ts} +0 -0
- /package/lib/types/locale/{function-list/array/es-ES.d.ts → de-DE.d.ts} +0 -0
- /package/lib/types/locale/{function-list/array/ja-JP.d.ts → id-ID.d.ts} +0 -0
- /package/lib/types/locale/{function-list/array/ko-KR.d.ts → it-IT.d.ts} +0 -0
- /package/lib/types/locale/{function-list/array/ru-RU.d.ts → pl-PL.d.ts} +0 -0
- /package/lib/types/locale/{function-list/array/sk-SK.d.ts → pt-BR.d.ts} +0 -0
- /package/lib/types/locale/{function-list/array/vi-VN.d.ts → zh-HK.d.ts} +0 -0
- /package/lib/types/services/render-services/{ref-selections.render-service.d.ts → ref-selections.render.service.d.ts} +0 -0
package/lib/cjs/index.js
CHANGED
|
@@ -553,7 +553,7 @@ const MoreFunctionsOperation = {
|
|
|
553
553
|
type: _univerjs_core.CommandType.OPERATION,
|
|
554
554
|
handler: async (accessor) => {
|
|
555
555
|
accessor.get(_univerjs_ui.ISidebarService).open({
|
|
556
|
-
header: { title: "formula.insert.tooltip" },
|
|
556
|
+
header: { title: "sheets-formula-ui.insert.tooltip" },
|
|
557
557
|
children: { label: MORE_FUNCTIONS_COMPONENT }
|
|
558
558
|
});
|
|
559
559
|
return true;
|
|
@@ -781,7 +781,7 @@ FormulaReorderController = __decorate([
|
|
|
781
781
|
//#endregion
|
|
782
782
|
//#region package.json
|
|
783
783
|
var name = "@univerjs/sheets-formula-ui";
|
|
784
|
-
var version = "0.
|
|
784
|
+
var version = "0.24.0-insiders.20260528-29f582d";
|
|
785
785
|
|
|
786
786
|
//#endregion
|
|
787
787
|
//#region src/config/config.ts
|
|
@@ -847,8 +847,8 @@ let FormulaAlertRenderController = class FormulaAlertRenderController extends _u
|
|
|
847
847
|
}
|
|
848
848
|
this._cellAlertManagerService.showAlert({
|
|
849
849
|
type: _univerjs_sheets_ui.CellAlertType.ERROR,
|
|
850
|
-
title: this._localeService.t("formula.error.title"),
|
|
851
|
-
message: this._localeService.t(`formula.error.${ErrorTypeToMessageMap[errorType]}`),
|
|
850
|
+
title: this._localeService.t("sheets-formula-ui.error.title"),
|
|
851
|
+
message: this._localeService.t(`sheets-formula-ui.error.${ErrorTypeToMessageMap[errorType]}`),
|
|
852
852
|
location: cellPos.location,
|
|
853
853
|
width: 200,
|
|
854
854
|
height: 74,
|
|
@@ -1518,8 +1518,8 @@ function InsertCommonFunctionMenuItemFactory(accessor) {
|
|
|
1518
1518
|
return {
|
|
1519
1519
|
id: `${InsertFunctionOperation.id}.common`,
|
|
1520
1520
|
commandId: InsertFunctionOperation.id,
|
|
1521
|
-
title: "formula.insert.common",
|
|
1522
|
-
tooltip: "formula.insert.tooltip",
|
|
1521
|
+
title: "sheets-formula-ui.insert.common",
|
|
1522
|
+
tooltip: "sheets-formula-ui.insert.tooltip",
|
|
1523
1523
|
icon: "FunctionIcon",
|
|
1524
1524
|
type: _univerjs_ui.MenuItemType.SELECTOR,
|
|
1525
1525
|
selections,
|
|
@@ -1543,8 +1543,8 @@ function createInsertFunctionCategoryMenuItemFactory(functionType, categoryKey,
|
|
|
1543
1543
|
return {
|
|
1544
1544
|
id: `${InsertFunctionOperation.id}.${categoryKey}`,
|
|
1545
1545
|
commandId: InsertFunctionOperation.id,
|
|
1546
|
-
title: `formula.functionType.${categoryKey}`,
|
|
1547
|
-
tooltip: "formula.insert.tooltip",
|
|
1546
|
+
title: `sheets-formula-ui.functionType.${categoryKey}`,
|
|
1547
|
+
tooltip: "sheets-formula-ui.insert.tooltip",
|
|
1548
1548
|
icon,
|
|
1549
1549
|
type: _univerjs_ui.MenuItemType.SELECTOR,
|
|
1550
1550
|
selections,
|
|
@@ -1565,8 +1565,8 @@ const InsertDatabaseFunctionMenuItemFactory = createInsertFunctionCategoryMenuIt
|
|
|
1565
1565
|
function AllFunctionsMenuItemFactory(accessor) {
|
|
1566
1566
|
return {
|
|
1567
1567
|
id: MoreFunctionsOperation.id,
|
|
1568
|
-
title: "formula.moreFunctions.allFunctions",
|
|
1569
|
-
tooltip: "formula.insert.tooltip",
|
|
1568
|
+
title: "sheets-formula-ui.moreFunctions.allFunctions",
|
|
1569
|
+
tooltip: "sheets-formula-ui.insert.tooltip",
|
|
1570
1570
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
1571
1571
|
hidden$: (0, _univerjs_ui.getMenuHiddenObservable)(accessor, _univerjs_core.UniverInstanceType.UNIVER_SHEET),
|
|
1572
1572
|
disabled$: (0, _univerjs_sheets_ui.getCurrentRangeDisable$)(accessor, {
|
|
@@ -1580,7 +1580,7 @@ function CopyFormulaOnlyMenuItemFactory(accessor) {
|
|
|
1580
1580
|
return {
|
|
1581
1581
|
id: SheetCopyFormulaOnlyCommand.id,
|
|
1582
1582
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
1583
|
-
title: "formula.operation.copyFormulaOnly",
|
|
1583
|
+
title: "sheets-formula-ui.operation.copyFormulaOnly",
|
|
1584
1584
|
disabled$: (0, _univerjs_sheets_ui.getCurrentRangeDisable$)(accessor, {
|
|
1585
1585
|
workbookTypes: [_univerjs_sheets.WorkbookCopyPermission],
|
|
1586
1586
|
worksheetTypes: [_univerjs_sheets.WorksheetCopyPermission],
|
|
@@ -1593,7 +1593,7 @@ function PasteFormulaMenuItemFactory(accessor) {
|
|
|
1593
1593
|
return {
|
|
1594
1594
|
id: SheetOnlyPasteFormulaCommand.id,
|
|
1595
1595
|
type: _univerjs_ui.MenuItemType.BUTTON,
|
|
1596
|
-
title: "formula.operation.pasteFormula",
|
|
1596
|
+
title: "sheets-formula-ui.operation.pasteFormula",
|
|
1597
1597
|
disabled$: (0, _univerjs_sheets_ui.menuClipboardDisabledObservable)(accessor).pipe((0, rxjs.combineLatestWith)((0, _univerjs_sheets_ui.getCurrentRangeDisable$)(accessor, {
|
|
1598
1598
|
workbookTypes: [_univerjs_sheets.WorkbookEditablePermission],
|
|
1599
1599
|
rangeTypes: [_univerjs_sheets.RangeProtectionPermissionEditPoint],
|
|
@@ -1741,7 +1741,7 @@ function FormulaProgressBar() {
|
|
|
1741
1741
|
//#region src/services/utils.ts
|
|
1742
1742
|
function getFunctionTypeValues(localeService, customFormula) {
|
|
1743
1743
|
return Object.keys(_univerjs_engine_formula.FunctionType).filter((key) => isNaN(Number(key)) && key !== "DefinedName" && key !== "Table" && (customFormula || key !== "User")).map((key) => ({
|
|
1744
|
-
label: localeService.t(`formula.functionType.${key.toLocaleLowerCase()}`),
|
|
1744
|
+
label: localeService.t(`sheets-formula-ui.functionType.${key.toLocaleLowerCase()}`),
|
|
1745
1745
|
value: `${_univerjs_engine_formula.FunctionType[key]}`
|
|
1746
1746
|
}));
|
|
1747
1747
|
}
|
|
@@ -1837,11 +1837,11 @@ function SelectFunction(props) {
|
|
|
1837
1837
|
const sidebarOptions = (0, _univerjs_ui.useObservable)((0, _univerjs_ui.useDependency)(_univerjs_ui.ISidebarService).sidebarOptions$);
|
|
1838
1838
|
const options = getFunctionTypeValues(localeService, Boolean(customFunction)).filter((option) => descriptionService.getSearchListByType(Number(option.value)).length > 0);
|
|
1839
1839
|
options.unshift({
|
|
1840
|
-
label: localeService.t("formula.moreFunctions.allFunctions"),
|
|
1840
|
+
label: localeService.t("sheets-formula-ui.moreFunctions.allFunctions"),
|
|
1841
1841
|
value: allTypeValue
|
|
1842
1842
|
});
|
|
1843
|
-
const required = localeService.t("formula.prompt.required");
|
|
1844
|
-
const optional = localeService.t("formula.prompt.optional");
|
|
1843
|
+
const required = localeService.t("sheets-formula-ui.prompt.required");
|
|
1844
|
+
const optional = localeService.t("sheets-formula-ui.prompt.optional");
|
|
1845
1845
|
(0, react.useEffect)(() => {
|
|
1846
1846
|
handleSelectChange(allTypeValue);
|
|
1847
1847
|
}, []);
|
|
@@ -1918,7 +1918,7 @@ function SelectFunction(props) {
|
|
|
1918
1918
|
options,
|
|
1919
1919
|
onChange: handleSelectChange
|
|
1920
1920
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Input, {
|
|
1921
|
-
placeholder: localeService.t("formula.moreFunctions.searchFunctionPlaceholder"),
|
|
1921
|
+
placeholder: localeService.t("sheets-formula-ui.moreFunctions.searchFunctionPlaceholder"),
|
|
1922
1922
|
onKeyDown: handleSelectListKeyDown,
|
|
1923
1923
|
value: searchText,
|
|
1924
1924
|
onChange: handleSearchInputChange,
|
|
@@ -1949,14 +1949,14 @@ function SelectFunction(props) {
|
|
|
1949
1949
|
value: functionInfo.description
|
|
1950
1950
|
}),
|
|
1951
1951
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(FunctionParams, {
|
|
1952
|
-
title: localeService.t("formula.moreFunctions.syntax"),
|
|
1952
|
+
title: localeService.t("sheets-formula-ui.moreFunctions.syntax"),
|
|
1953
1953
|
value: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FunctionHelp, {
|
|
1954
1954
|
prefix: functionInfo.functionName,
|
|
1955
1955
|
value: functionInfo.functionParameter
|
|
1956
1956
|
})
|
|
1957
1957
|
}),
|
|
1958
1958
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(FunctionParams, {
|
|
1959
|
-
title: localeService.t("formula.prompt.helpExample"),
|
|
1959
|
+
title: localeService.t("sheets-formula-ui.prompt.helpExample"),
|
|
1960
1960
|
value: `${functionInfo.functionName}(${functionInfo.functionParameter.map((item) => item.example).join(",")})`
|
|
1961
1961
|
}),
|
|
1962
1962
|
functionInfo.functionParameter && functionInfo.functionParameter.map((item) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FunctionParams, {
|
|
@@ -2015,19 +2015,19 @@ function MoreFunctions() {
|
|
|
2015
2015
|
variant: "primary",
|
|
2016
2016
|
onClick: handleClickNextPrev,
|
|
2017
2017
|
className: "univer-mb-5 univer-ml-4 univer-mr-0 univer-mt-0",
|
|
2018
|
-
children: localeService.t("formula.moreFunctions.next")
|
|
2018
|
+
children: localeService.t("sheets-formula-ui.moreFunctions.next")
|
|
2019
2019
|
}),
|
|
2020
2020
|
inputParams && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Button, {
|
|
2021
2021
|
onClick: handleClickNextPrev,
|
|
2022
2022
|
className: "univer-mb-5 univer-ml-4 univer-mr-0 univer-mt-0",
|
|
2023
|
-
children: localeService.t("formula.moreFunctions.prev")
|
|
2023
|
+
children: localeService.t("sheets-formula-ui.moreFunctions.prev")
|
|
2024
2024
|
}),
|
|
2025
2025
|
selectFunction && !!workbook && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Button, {
|
|
2026
2026
|
disabled: !functionInfo,
|
|
2027
2027
|
variant: "primary",
|
|
2028
2028
|
onClick: handleConfirm,
|
|
2029
2029
|
className: "univer-mb-5 univer-ml-4 univer-mr-0 univer-mt-0",
|
|
2030
|
-
children: localeService.t("formula.moreFunctions.confirm")
|
|
2030
|
+
children: localeService.t("sheets-formula-ui.moreFunctions.confirm")
|
|
2031
2031
|
})
|
|
2032
2032
|
]
|
|
2033
2033
|
})
|
|
@@ -2050,8 +2050,9 @@ const QuickSumShortcut = {
|
|
|
2050
2050
|
binding: _univerjs_ui.MetaKeys.ALT | _univerjs_ui.KeyCode.EQUAL,
|
|
2051
2051
|
preconditions: _univerjs_sheets_ui.whenSheetEditorFocused,
|
|
2052
2052
|
mac: _univerjs_ui.MetaKeys.CTRL_COMMAND | _univerjs_ui.MetaKeys.ALT | _univerjs_ui.KeyCode.EQUAL,
|
|
2053
|
-
description: "
|
|
2054
|
-
group: "4_sheet-edit"
|
|
2053
|
+
description: "sheets-formula-ui.shortcut.quick-sum",
|
|
2054
|
+
group: "4_sheet-edit",
|
|
2055
|
+
groupTitle: "sheets-ui.shortcut.sheet-edit"
|
|
2055
2056
|
};
|
|
2056
2057
|
|
|
2057
2058
|
//#endregion
|
|
@@ -2159,7 +2160,7 @@ var GlobalRangeSelectorService = class {
|
|
|
2159
2160
|
};
|
|
2160
2161
|
|
|
2161
2162
|
//#endregion
|
|
2162
|
-
//#region src/services/render-services/ref-selections.render
|
|
2163
|
+
//#region src/services/render-services/ref-selections.render.service.ts
|
|
2163
2164
|
let RefSelectionsRenderService = class RefSelectionsRenderService extends _univerjs_sheets_ui.BaseSelectionRenderService {
|
|
2164
2165
|
constructor(_context, injector, themeService, shortcutService, sheetSkeletonManagerService, _contextService, _refSelectionsService) {
|
|
2165
2166
|
super(injector, themeService, shortcutService, sheetSkeletonManagerService, _contextService);
|
|
@@ -2764,16 +2765,15 @@ const Help = (props) => {
|
|
|
2764
2765
|
")"
|
|
2765
2766
|
] });
|
|
2766
2767
|
};
|
|
2767
|
-
const noop$3 = () => {};
|
|
2768
2768
|
function HelpFunction(props) {
|
|
2769
|
-
const { onParamsSwitch = noop
|
|
2769
|
+
const { onParamsSwitch = _univerjs_core.noop, onClose: propColose = _univerjs_core.noop, isFocus, editor, formulaText } = props;
|
|
2770
2770
|
const { functionInfo, paramIndex, reset } = useFormulaDescribe(isFocus, formulaText, editor);
|
|
2771
2771
|
const editorBridgeService = (0, _univerjs_ui.useDependency)(_univerjs_sheets_ui.IEditorBridgeService);
|
|
2772
2772
|
const hidden = !(0, _univerjs_ui.useObservable)(editorBridgeService.helpFunctionVisible$);
|
|
2773
2773
|
const [contentVisible, setContentVisible] = (0, react.useState)(false);
|
|
2774
2774
|
const localeService = (0, _univerjs_ui.useDependency)(_univerjs_core.LocaleService);
|
|
2775
|
-
const required = localeService.t("formula.prompt.required");
|
|
2776
|
-
const optional = localeService.t("formula.prompt.optional");
|
|
2775
|
+
const required = localeService.t("sheets-formula-ui.prompt.required");
|
|
2776
|
+
const optional = localeService.t("sheets-formula-ui.prompt.optional");
|
|
2777
2777
|
const [position$] = useEditorPosition(editor.getEditorId(), !!functionInfo, [functionInfo, paramIndex]);
|
|
2778
2778
|
function handleSwitchActive(paramIndex) {
|
|
2779
2779
|
onParamsSwitch && onParamsSwitch(paramIndex);
|
|
@@ -2828,11 +2828,11 @@ function HelpFunction(props) {
|
|
|
2828
2828
|
className: "univer-mt-3",
|
|
2829
2829
|
children: [
|
|
2830
2830
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Params, {
|
|
2831
|
-
title: localeService.t("formula.prompt.helpExample"),
|
|
2831
|
+
title: localeService.t("sheets-formula-ui.prompt.helpExample"),
|
|
2832
2832
|
value: `${functionInfo.functionName}(${functionInfo.functionParameter.map((item) => item.example).join(",")})`
|
|
2833
2833
|
}),
|
|
2834
2834
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Params, {
|
|
2835
|
-
title: localeService.t("formula.prompt.helpAbstract"),
|
|
2835
|
+
title: localeService.t("sheets-formula-ui.prompt.helpAbstract"),
|
|
2836
2836
|
value: functionInfo.description
|
|
2837
2837
|
}),
|
|
2838
2838
|
functionInfo && functionInfo.functionParameter && functionInfo.functionParameter.map((item, i) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Params, {
|
|
@@ -3473,7 +3473,7 @@ const useResetSelection = (isNeed, unitId, subUnitId) => {
|
|
|
3473
3473
|
return (0, react.useCallback)(() => {
|
|
3474
3474
|
if (isNeed) {
|
|
3475
3475
|
const selections = [...sheetsSelectionsService.getWorkbookSelections(unitId).getSelectionsOfWorksheet(subUnitId)];
|
|
3476
|
-
const workbook = univerInstanceService.
|
|
3476
|
+
const workbook = univerInstanceService.getCurrentUnitOfType(_univerjs_core.UniverInstanceType.UNIVER_SHEET);
|
|
3477
3477
|
const currentSheet = workbook === null || workbook === void 0 ? void 0 : workbook.getActiveSheet();
|
|
3478
3478
|
if ((workbook === null || workbook === void 0 ? void 0 : workbook.getUnitId()) !== unitId) univerInstanceService.setCurrentUnitForType(unitId);
|
|
3479
3479
|
if (currentSheet && currentSheet.getSheetId() === subUnitId) sheetsSelectionsService.setSelections(selections);
|
|
@@ -3529,8 +3529,7 @@ const prepareSelectionChangeContext = (opts) => {
|
|
|
3529
3529
|
offset
|
|
3530
3530
|
};
|
|
3531
3531
|
};
|
|
3532
|
-
const
|
|
3533
|
-
const useSheetSelectionChange = (isNeed, isFocus, isSelectingRef, unitId, subUnitId, refSelectionRef, isSupportAcrossSheet, listenSelectionSet, editor, handleRangeChange = noop$2) => {
|
|
3532
|
+
const useSheetSelectionChange = (isNeed, isFocus, isSelectingRef, unitId, subUnitId, refSelectionRef, isSupportAcrossSheet, listenSelectionSet, editor, handleRangeChange = _univerjs_core.noop) => {
|
|
3534
3533
|
var _currentUnit$getUnitI;
|
|
3535
3534
|
const renderManagerService = (0, _univerjs_ui.useDependency)(_univerjs_engine_render.IRenderManagerService);
|
|
3536
3535
|
const univerInstanceService = (0, _univerjs_ui.useDependency)(_univerjs_core.IUniverInstanceService);
|
|
@@ -3898,6 +3897,26 @@ const useVerify = (isNeed, onVerify, formulaText) => {
|
|
|
3898
3897
|
|
|
3899
3898
|
//#endregion
|
|
3900
3899
|
//#region src/views/formula-editor/hooks/use-formula-search.ts
|
|
3900
|
+
function shouldAppendOpenBracket(functionType) {
|
|
3901
|
+
return functionType !== _univerjs_engine_formula.FunctionType.DefinedName && functionType !== _univerjs_engine_formula.FunctionType.Table;
|
|
3902
|
+
}
|
|
3903
|
+
function getFormulaReplaceResult(nodes, index, formulaName, functionType) {
|
|
3904
|
+
const cloneNodes = [...nodes];
|
|
3905
|
+
if (index !== -1) {
|
|
3906
|
+
const lastNodes = cloneNodes.splice(index + 1);
|
|
3907
|
+
const oldNode = cloneNodes.pop() || "";
|
|
3908
|
+
let offset = (typeof oldNode === "string" ? oldNode.length : oldNode.token.length) - formulaName.length;
|
|
3909
|
+
cloneNodes.push(formulaName);
|
|
3910
|
+
if (lastNodes[0] !== _univerjs_engine_formula.matchToken.OPEN_BRACKET && shouldAppendOpenBracket(functionType)) {
|
|
3911
|
+
cloneNodes.push(_univerjs_engine_formula.matchToken.OPEN_BRACKET);
|
|
3912
|
+
offset--;
|
|
3913
|
+
}
|
|
3914
|
+
return {
|
|
3915
|
+
text: sequenceNodeToText([...cloneNodes, ...lastNodes]),
|
|
3916
|
+
offset
|
|
3917
|
+
};
|
|
3918
|
+
}
|
|
3919
|
+
}
|
|
3901
3920
|
const useFormulaSearch = (isNeed, nodes = [], editor) => {
|
|
3902
3921
|
const descriptionService = (0, _univerjs_ui.useDependency)(_univerjs_sheets_formula.IDescriptionService);
|
|
3903
3922
|
const [searchList, setSearchList] = (0, react.useState)([]);
|
|
@@ -3945,21 +3964,7 @@ const useFormulaSearch = (isNeed, nodes = [], editor) => {
|
|
|
3945
3964
|
if (!isNeed) reset();
|
|
3946
3965
|
}, [isNeed]);
|
|
3947
3966
|
const handlerFormulaReplace = (formulaName, functionType) => {
|
|
3948
|
-
|
|
3949
|
-
if (indexRef.current !== -1) {
|
|
3950
|
-
const lastNodes = cloneNodes.splice(indexRef.current + 1);
|
|
3951
|
-
const oldNode = cloneNodes.pop() || "";
|
|
3952
|
-
let offset = (typeof oldNode === "string" ? oldNode.length : oldNode.token.length) - formulaName.length;
|
|
3953
|
-
cloneNodes.push(formulaName);
|
|
3954
|
-
if (lastNodes[0] !== _univerjs_engine_formula.matchToken.OPEN_BRACKET && functionType !== _univerjs_engine_formula.FunctionType.DefinedName) {
|
|
3955
|
-
cloneNodes.push(_univerjs_engine_formula.matchToken.OPEN_BRACKET);
|
|
3956
|
-
offset--;
|
|
3957
|
-
}
|
|
3958
|
-
return {
|
|
3959
|
-
text: sequenceNodeToText([...cloneNodes, ...lastNodes]),
|
|
3960
|
-
offset
|
|
3961
|
-
};
|
|
3962
|
-
}
|
|
3967
|
+
return getFormulaReplaceResult(stateRef.current.nodes, indexRef.current, formulaName, functionType);
|
|
3963
3968
|
};
|
|
3964
3969
|
return {
|
|
3965
3970
|
searchList,
|
|
@@ -3971,10 +3976,9 @@ const useFormulaSearch = (isNeed, nodes = [], editor) => {
|
|
|
3971
3976
|
|
|
3972
3977
|
//#endregion
|
|
3973
3978
|
//#region src/views/formula-editor/search-function/SearchFunction.tsx
|
|
3974
|
-
const noop$1 = () => {};
|
|
3975
3979
|
const SearchFunction = (0, react.forwardRef)(SearchFunctionFactory);
|
|
3976
3980
|
function SearchFunctionFactory(props, ref) {
|
|
3977
|
-
const { isFocus, sequenceNodes, onSelect, editor, onClose = noop
|
|
3981
|
+
const { isFocus, sequenceNodes, onSelect, editor, onClose = _univerjs_core.noop } = props;
|
|
3978
3982
|
const editorId = editor.getEditorId();
|
|
3979
3983
|
const shortcutService = (0, _univerjs_ui.useDependency)(_univerjs_ui.IShortcutService);
|
|
3980
3984
|
const commandService = (0, _univerjs_ui.useDependency)(_univerjs_core.ICommandService);
|
|
@@ -4154,10 +4158,9 @@ const getFormulaText = (formula) => {
|
|
|
4154
4158
|
|
|
4155
4159
|
//#endregion
|
|
4156
4160
|
//#region src/views/formula-editor/index.tsx
|
|
4157
|
-
const noop = () => {};
|
|
4158
4161
|
const FormulaEditor = (0, react.forwardRef)((props, ref) => {
|
|
4159
4162
|
var _document$getBody$dat, _document$getBody, _configService$getCon, _configService$getCon2;
|
|
4160
|
-
const { errorText, initValue, unitId, subUnitId, isFocus: _isFocus = true, isSupportAcrossSheet = false, onFocus = noop, onBlur = noop, onChange: propOnChange, onVerify, className, editorId: propEditorId, moveCursor = true, onFormulaSelectingChange: propOnFormulaSelectingChange, keyboardEventConfig, onMoveInEditor, resetSelectionOnBlur = true, autoScrollbar = true, isSingle = true, disableSelectionOnClick = false, autofocus = true, disableContextMenu, style } = props;
|
|
4163
|
+
const { errorText, initValue, unitId, subUnitId, isFocus: _isFocus = true, isSupportAcrossSheet = false, onFocus = _univerjs_core.noop, onBlur = _univerjs_core.noop, onChange: propOnChange, onVerify, className, editorId: propEditorId, moveCursor = true, onFormulaSelectingChange: propOnFormulaSelectingChange, keyboardEventConfig, onMoveInEditor, resetSelectionOnBlur = true, autoScrollbar = true, isSingle = true, disableSelectionOnClick = false, autofocus = true, disableContextMenu, style, borderless = false, canvasStyle } = props;
|
|
4161
4164
|
const editorService = (0, _univerjs_ui.useDependency)(_univerjs_docs_ui.IEditorService);
|
|
4162
4165
|
const sheetEmbeddingRef = (0, react.useRef)(null);
|
|
4163
4166
|
const onChange = (0, _univerjs_ui.useEvent)(propOnChange);
|
|
@@ -4241,6 +4244,7 @@ const FormulaEditor = (0, react.forwardRef)((props, ref) => {
|
|
|
4241
4244
|
(0, react.useLayoutEffect)(() => {
|
|
4242
4245
|
let dispose;
|
|
4243
4246
|
if (formulaEditorContainerRef.current) {
|
|
4247
|
+
var _canvasStyle$backgrou;
|
|
4244
4248
|
dispose = editorService.register({
|
|
4245
4249
|
autofocus,
|
|
4246
4250
|
editorUnitId: editorId,
|
|
@@ -4253,7 +4257,26 @@ const FormulaEditor = (0, react.forwardRef)((props, ref) => {
|
|
|
4253
4257
|
customDecorations: [],
|
|
4254
4258
|
customRanges: []
|
|
4255
4259
|
},
|
|
4256
|
-
documentStyle: {
|
|
4260
|
+
documentStyle: {
|
|
4261
|
+
pageSize: {
|
|
4262
|
+
width: Number.POSITIVE_INFINITY,
|
|
4263
|
+
height: Number.POSITIVE_INFINITY
|
|
4264
|
+
},
|
|
4265
|
+
documentFlavor: _univerjs_core.DocumentFlavor.UNSPECIFIED,
|
|
4266
|
+
marginTop: 0,
|
|
4267
|
+
marginBottom: 0,
|
|
4268
|
+
marginRight: 0,
|
|
4269
|
+
marginLeft: 0,
|
|
4270
|
+
paragraphLineGapDefault: 0,
|
|
4271
|
+
renderConfig: {
|
|
4272
|
+
horizontalAlign: _univerjs_core.HorizontalAlign.UNSPECIFIED,
|
|
4273
|
+
verticalAlign: _univerjs_core.VerticalAlign.TOP
|
|
4274
|
+
}
|
|
4275
|
+
}
|
|
4276
|
+
},
|
|
4277
|
+
canvasStyle: {
|
|
4278
|
+
...canvasStyle,
|
|
4279
|
+
backgroundColor: (_canvasStyle$backgrou = canvasStyle === null || canvasStyle === void 0 ? void 0 : canvasStyle.backgroundColor) !== null && _canvasStyle$backgrou !== void 0 ? _canvasStyle$backgrou : "#fff"
|
|
4257
4280
|
}
|
|
4258
4281
|
}, formulaEditorContainerRef.current);
|
|
4259
4282
|
editorRef.current = editorService.getEditor(editorId);
|
|
@@ -4355,9 +4378,10 @@ const FormulaEditor = (0, react.forwardRef)((props, ref) => {
|
|
|
4355
4378
|
children: [
|
|
4356
4379
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
4357
4380
|
ref: sheetEmbeddingRef,
|
|
4358
|
-
className: (0, _univerjs_design.clsx)("univer-relative univer-box-border univer-flex univer-size-full univer-items-center univer-justify-around univer-gap-2 univer-rounded-none univer-p-0
|
|
4359
|
-
"univer-ring-
|
|
4360
|
-
"univer-ring-
|
|
4381
|
+
className: (0, _univerjs_design.clsx)("univer-relative univer-box-border univer-flex univer-size-full univer-items-center univer-justify-around univer-gap-2 univer-rounded-none univer-p-0", {
|
|
4382
|
+
"univer-ring-1": !borderless,
|
|
4383
|
+
"univer-ring-primary-500": isFocus && !borderless,
|
|
4384
|
+
"univer-ring-red-500": isError && !borderless
|
|
4361
4385
|
}),
|
|
4362
4386
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
4363
4387
|
ref: formulaEditorContainerRef,
|
|
@@ -4428,7 +4452,7 @@ function useRangesHighlight(editor, focusing, unitId, subUnitId) {
|
|
|
4428
4452
|
const disposable = new _univerjs_core.DisposableCollection();
|
|
4429
4453
|
selections.forEach((selection) => {
|
|
4430
4454
|
const range = (0, _univerjs_engine_formula.deserializeRangeWithSheet)(selection.token);
|
|
4431
|
-
const workbook = univerInstanceService.
|
|
4455
|
+
const workbook = univerInstanceService.getCurrentUnitOfType(_univerjs_core.UniverInstanceType.UNIVER_SHEET);
|
|
4432
4456
|
const worksheet = workbook === null || workbook === void 0 ? void 0 : workbook.getActiveSheet();
|
|
4433
4457
|
if (!range.sheetName && subUnitId !== (worksheet === null || worksheet === void 0 ? void 0 : worksheet.getSheetId()) || range.sheetName && (worksheet === null || worksheet === void 0 ? void 0 : worksheet.getName()) !== range.sheetName) return;
|
|
4434
4458
|
const rgb = new _univerjs_core.ColorKit(selection.themeColor).toRgb();
|
|
@@ -4594,7 +4618,7 @@ function RangeSelectorDialog(props) {
|
|
|
4594
4618
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Dialog, {
|
|
4595
4619
|
width: "328px",
|
|
4596
4620
|
open: visible,
|
|
4597
|
-
title: localeService.t("rangeSelector.title"),
|
|
4621
|
+
title: localeService.t("sheets-formula-ui.rangeSelector.title"),
|
|
4598
4622
|
draggable: true,
|
|
4599
4623
|
mask: false,
|
|
4600
4624
|
maskClosable: false,
|
|
@@ -4602,7 +4626,7 @@ function RangeSelectorDialog(props) {
|
|
|
4602
4626
|
className: "univer-flex univer-gap-2",
|
|
4603
4627
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Button, {
|
|
4604
4628
|
onClick: onClose,
|
|
4605
|
-
children: localeService.t("rangeSelector.cancel")
|
|
4629
|
+
children: localeService.t("sheets-formula-ui.rangeSelector.cancel")
|
|
4606
4630
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Button, {
|
|
4607
4631
|
variant: "primary",
|
|
4608
4632
|
onClick: () => {
|
|
@@ -4614,7 +4638,7 @@ function RangeSelectorDialog(props) {
|
|
|
4614
4638
|
range: rangePreProcess(unitRange.range)
|
|
4615
4639
|
})));
|
|
4616
4640
|
},
|
|
4617
|
-
children: localeService.t("rangeSelector.confirm")
|
|
4641
|
+
children: localeService.t("sheets-formula-ui.rangeSelector.confirm")
|
|
4618
4642
|
})]
|
|
4619
4643
|
}),
|
|
4620
4644
|
onClose,
|
|
@@ -4625,7 +4649,7 @@ function RangeSelectorDialog(props) {
|
|
|
4625
4649
|
className: "univer-mb-2 univer-flex univer-items-center univer-gap-4",
|
|
4626
4650
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Input, {
|
|
4627
4651
|
className: (0, _univerjs_design.clsx)("univer-w-full", { "univer-border-primary-600": focusIndex === index }),
|
|
4628
|
-
placeholder: localeService.t("rangeSelector.placeHolder"),
|
|
4652
|
+
placeholder: localeService.t("sheets-formula-ui.rangeSelector.placeHolder"),
|
|
4629
4653
|
onFocus: () => setFocusIndex(index),
|
|
4630
4654
|
value: text,
|
|
4631
4655
|
onChange: (value) => handleRangeInput(index, value)
|
|
@@ -4636,7 +4660,7 @@ function RangeSelectorDialog(props) {
|
|
|
4636
4660
|
}, index)), ranges.length < maxRangeCount && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_univerjs_design.Button, {
|
|
4637
4661
|
variant: "link",
|
|
4638
4662
|
onClick: handleRangeAdd,
|
|
4639
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_icons.IncreaseIcon, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: localeService.t("rangeSelector.addAnotherRange") })]
|
|
4663
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_icons.IncreaseIcon, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: localeService.t("sheets-formula-ui.rangeSelector.addAnotherRange") })]
|
|
4640
4664
|
}) })]
|
|
4641
4665
|
})
|
|
4642
4666
|
});
|
|
@@ -4732,7 +4756,7 @@ function RangeSelector(props) {
|
|
|
4732
4756
|
onClickOutside === null || onClickOutside === void 0 || onClickOutside();
|
|
4733
4757
|
},
|
|
4734
4758
|
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Tooltip, {
|
|
4735
|
-
title: localeService.t("rangeSelector.buttonTooltip"),
|
|
4759
|
+
title: localeService.t("sheets-formula-ui.rangeSelector.buttonTooltip"),
|
|
4736
4760
|
placement: "bottom",
|
|
4737
4761
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_icons.SelectRangeIcon, {
|
|
4738
4762
|
className: "univer-cursor-pointer dark:!univer-text-gray-300",
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/locale/ar-SA.ts
|
|
3
|
+
const locale = { "sheets-formula-ui": {
|
|
4
|
+
shortcut: { "quick-sum": "مجموع سريع" },
|
|
5
|
+
insert: {
|
|
6
|
+
tooltip: "دوال",
|
|
7
|
+
common: "دوال شائعة"
|
|
8
|
+
},
|
|
9
|
+
prompt: {
|
|
10
|
+
helpExample: "مثال",
|
|
11
|
+
helpAbstract: "نبذة",
|
|
12
|
+
required: "مطلوب.",
|
|
13
|
+
optional: "اختياري."
|
|
14
|
+
},
|
|
15
|
+
error: {
|
|
16
|
+
title: "خطأ",
|
|
17
|
+
divByZero: "خطأ القسمة على صفر",
|
|
18
|
+
name: "خطأ اسم غير صالح",
|
|
19
|
+
value: "خطأ في القيمة",
|
|
20
|
+
num: "خطأ رقمي",
|
|
21
|
+
na: "خطأ القيمة غير متوفرة",
|
|
22
|
+
cycle: "خطأ المرجع الدائري",
|
|
23
|
+
ref: "خطأ مرجع خلية غير صالح",
|
|
24
|
+
spill: "نطاق التدفق ليس فارغًا",
|
|
25
|
+
calc: "خطأ حسابي",
|
|
26
|
+
error: "خطأ",
|
|
27
|
+
connect: "جارٍ الحصول على البيانات",
|
|
28
|
+
null: "خطأ فارغ"
|
|
29
|
+
},
|
|
30
|
+
functionType: {
|
|
31
|
+
financial: "مالي",
|
|
32
|
+
date: "التاريخ والوقت",
|
|
33
|
+
math: "الرياضيات والمثلثات",
|
|
34
|
+
statistical: "إحصائي",
|
|
35
|
+
lookup: "البحث والمرجع",
|
|
36
|
+
database: "قاعدة بيانات",
|
|
37
|
+
text: "نص",
|
|
38
|
+
logical: "منطقي",
|
|
39
|
+
information: "معلومات",
|
|
40
|
+
engineering: "هندسي",
|
|
41
|
+
cube: "مكعب",
|
|
42
|
+
compatibility: "التوافق",
|
|
43
|
+
web: "ويب",
|
|
44
|
+
array: "مصفوفة",
|
|
45
|
+
univer: "Univer",
|
|
46
|
+
user: "معرّف من قبل المستخدم",
|
|
47
|
+
definedname: "اسم معرّف"
|
|
48
|
+
},
|
|
49
|
+
moreFunctions: {
|
|
50
|
+
confirm: "تأكيد",
|
|
51
|
+
prev: "السابق",
|
|
52
|
+
next: "التالي",
|
|
53
|
+
searchFunctionPlaceholder: "البحث عن دالة",
|
|
54
|
+
allFunctions: "كل الدوال",
|
|
55
|
+
syntax: "الصيغة"
|
|
56
|
+
},
|
|
57
|
+
operation: {
|
|
58
|
+
copyFormulaOnly: "نسخ الصيغة فقط",
|
|
59
|
+
pasteFormula: "لصق الصيغة"
|
|
60
|
+
},
|
|
61
|
+
rangeSelector: {
|
|
62
|
+
title: "تحديد نطاق بيانات",
|
|
63
|
+
addAnotherRange: "إضافة نطاق",
|
|
64
|
+
buttonTooltip: "تحديد نطاق بيانات",
|
|
65
|
+
placeHolder: "تحديد نطاق أو إدخاله.",
|
|
66
|
+
confirm: "تأكيد",
|
|
67
|
+
cancel: "إلغاء"
|
|
68
|
+
}
|
|
69
|
+
} };
|
|
70
|
+
|
|
71
|
+
//#endregion
|
|
72
|
+
module.exports = locale;
|