@univerjs/sheets-formula 1.3.1 → 1.4.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.
Files changed (76) hide show
  1. package/lib/cjs/facade.js +4 -9
  2. package/lib/cjs/index.js +328 -450
  3. package/lib/cjs/locale/ar-SA.js +1 -2
  4. package/lib/cjs/locale/ca-ES.js +1 -2
  5. package/lib/cjs/locale/de-DE.js +1 -2
  6. package/lib/cjs/locale/en-US.js +1 -2
  7. package/lib/cjs/locale/es-ES.js +1 -2
  8. package/lib/cjs/locale/fa-IR.js +1 -2
  9. package/lib/cjs/locale/fr-FR.js +1 -2
  10. package/lib/cjs/locale/id-ID.js +1 -2
  11. package/lib/cjs/locale/it-IT.js +1 -2
  12. package/lib/cjs/locale/ja-JP.js +1 -2
  13. package/lib/cjs/locale/ko-KR.js +1 -2
  14. package/lib/cjs/locale/pl-PL.js +1 -2
  15. package/lib/cjs/locale/pt-BR.js +1 -2
  16. package/lib/cjs/locale/ru-RU.js +1 -2
  17. package/lib/cjs/locale/sk-SK.js +1 -2
  18. package/lib/cjs/locale/vi-VN.js +1 -2
  19. package/lib/cjs/locale/zh-CN.js +1 -2
  20. package/lib/cjs/locale/zh-HK.js +1 -2
  21. package/lib/cjs/locale/zh-TW.js +1 -2
  22. package/lib/cjs/worker-Ds9TzMsD.js +248 -0
  23. package/lib/cjs/worker.js +9 -0
  24. package/lib/es/facade.js +4 -8
  25. package/lib/es/index.js +243 -365
  26. package/lib/es/locale/ar-SA.js +1 -2
  27. package/lib/es/locale/ca-ES.js +1 -2
  28. package/lib/es/locale/de-DE.js +1 -2
  29. package/lib/es/locale/en-US.js +1 -2
  30. package/lib/es/locale/es-ES.js +1 -2
  31. package/lib/es/locale/fa-IR.js +1 -2
  32. package/lib/es/locale/fr-FR.js +1 -2
  33. package/lib/es/locale/id-ID.js +1 -2
  34. package/lib/es/locale/it-IT.js +1 -2
  35. package/lib/es/locale/ja-JP.js +1 -2
  36. package/lib/es/locale/ko-KR.js +1 -2
  37. package/lib/es/locale/pl-PL.js +1 -2
  38. package/lib/es/locale/pt-BR.js +1 -2
  39. package/lib/es/locale/ru-RU.js +1 -2
  40. package/lib/es/locale/sk-SK.js +1 -2
  41. package/lib/es/locale/vi-VN.js +1 -2
  42. package/lib/es/locale/zh-CN.js +1 -2
  43. package/lib/es/locale/zh-HK.js +1 -2
  44. package/lib/es/locale/zh-TW.js +1 -2
  45. package/lib/es/worker-m5XIUFq5.js +177 -0
  46. package/lib/es/worker.js +3 -0
  47. package/lib/facade.js +4 -8
  48. package/lib/index.js +243 -365
  49. package/lib/locale/ar-SA.js +1 -2
  50. package/lib/locale/ca-ES.js +1 -2
  51. package/lib/locale/de-DE.js +1 -2
  52. package/lib/locale/en-US.js +1 -2
  53. package/lib/locale/es-ES.js +1 -2
  54. package/lib/locale/fa-IR.js +1 -2
  55. package/lib/locale/fr-FR.js +1 -2
  56. package/lib/locale/id-ID.js +1 -2
  57. package/lib/locale/it-IT.js +1 -2
  58. package/lib/locale/ja-JP.js +1 -2
  59. package/lib/locale/ko-KR.js +1 -2
  60. package/lib/locale/pl-PL.js +1 -2
  61. package/lib/locale/pt-BR.js +1 -2
  62. package/lib/locale/ru-RU.js +1 -2
  63. package/lib/locale/sk-SK.js +1 -2
  64. package/lib/locale/vi-VN.js +1 -2
  65. package/lib/locale/zh-CN.js +1 -2
  66. package/lib/locale/zh-HK.js +1 -2
  67. package/lib/locale/zh-TW.js +1 -2
  68. package/lib/types/controllers/update-formula.controller.d.ts +4 -0
  69. package/lib/types/index.d.ts +4 -1
  70. package/lib/types/plugin.d.ts +1 -12
  71. package/lib/types/services/remote/remote-register-function.service.d.ts +1 -1
  72. package/lib/types/worker.d.ts +28 -0
  73. package/lib/umd/index.js +1 -1
  74. package/lib/worker-m5XIUFq5.js +177 -0
  75. package/lib/worker.js +3 -0
  76. package/package.json +17 -12
@@ -1,4 +1,4 @@
1
- //#region src/locale/ar-SA.ts
1
+ // src/locale/ar-SA.ts
2
2
  const locale = { "sheets-formula": { progress: {
3
3
  analyzing: "جارٍ تحليل الصيغ...",
4
4
  calculating: "جارٍ حساب الصيغ...",
@@ -7,5 +7,4 @@ const locale = { "sheets-formula": { progress: {
7
7
  done: "تم"
8
8
  } } };
9
9
 
10
- //#endregion
11
10
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/ca-ES.ts
1
+ // src/locale/ca-ES.ts
2
2
  const locale = { "sheets-formula": { progress: {
3
3
  analyzing: "Analitzant fórmules...",
4
4
  calculating: "Calculant fórmules...",
@@ -7,5 +7,4 @@ const locale = { "sheets-formula": { progress: {
7
7
  done: "Fet"
8
8
  } } };
9
9
 
10
- //#endregion
11
10
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/de-DE.ts
1
+ // src/locale/de-DE.ts
2
2
  const locale = { "sheets-formula": { progress: {
3
3
  analyzing: "Formeln werden analysiert...",
4
4
  calculating: "Formeln werden berechnet...",
@@ -7,5 +7,4 @@ const locale = { "sheets-formula": { progress: {
7
7
  done: "Fertig"
8
8
  } } };
9
9
 
10
- //#endregion
11
10
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/en-US.ts
1
+ // src/locale/en-US.ts
2
2
  /**
3
3
  * Copyright 2023-present DreamNum Co., Ltd.
4
4
  *
@@ -22,5 +22,4 @@ const locale = { "sheets-formula": { progress: {
22
22
  done: "Done"
23
23
  } } };
24
24
 
25
- //#endregion
26
25
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/es-ES.ts
1
+ // src/locale/es-ES.ts
2
2
  const locale = { "sheets-formula": { progress: {
3
3
  analyzing: "Analizando fórmulas...",
4
4
  calculating: "Calculando fórmulas...",
@@ -7,5 +7,4 @@ const locale = { "sheets-formula": { progress: {
7
7
  done: "Listo"
8
8
  } } };
9
9
 
10
- //#endregion
11
10
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/fa-IR.ts
1
+ // src/locale/fa-IR.ts
2
2
  const locale = { "sheets-formula": { progress: {
3
3
  analyzing: "در حال تحلیل فرمول‌ها...",
4
4
  calculating: "در حال محاسبه فرمول‌ها...",
@@ -7,5 +7,4 @@ const locale = { "sheets-formula": { progress: {
7
7
  done: "انجام شد"
8
8
  } } };
9
9
 
10
- //#endregion
11
10
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/fr-FR.ts
1
+ // src/locale/fr-FR.ts
2
2
  const locale = { "sheets-formula": { progress: {
3
3
  analyzing: "Analyse des formules...",
4
4
  calculating: "Calcul des formules...",
@@ -7,5 +7,4 @@ const locale = { "sheets-formula": { progress: {
7
7
  done: "Terminé"
8
8
  } } };
9
9
 
10
- //#endregion
11
10
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/id-ID.ts
1
+ // src/locale/id-ID.ts
2
2
  const locale = { "sheets-formula": { progress: {
3
3
  analyzing: "Menganalisis rumus...",
4
4
  calculating: "Menghitung rumus...",
@@ -7,5 +7,4 @@ const locale = { "sheets-formula": { progress: {
7
7
  done: "Selesai"
8
8
  } } };
9
9
 
10
- //#endregion
11
10
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/it-IT.ts
1
+ // src/locale/it-IT.ts
2
2
  const locale = { "sheets-formula": { progress: {
3
3
  analyzing: "Analisi delle formule...",
4
4
  calculating: "Calcolo delle formule...",
@@ -7,5 +7,4 @@ const locale = { "sheets-formula": { progress: {
7
7
  done: "Completato"
8
8
  } } };
9
9
 
10
- //#endregion
11
10
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/ja-JP.ts
1
+ // src/locale/ja-JP.ts
2
2
  const locale = { "sheets-formula": { progress: {
3
3
  analyzing: "数式を分析中...",
4
4
  calculating: "数式を計算中...",
@@ -7,5 +7,4 @@ const locale = { "sheets-formula": { progress: {
7
7
  done: "完了"
8
8
  } } };
9
9
 
10
- //#endregion
11
10
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/ko-KR.ts
1
+ // src/locale/ko-KR.ts
2
2
  const locale = { "sheets-formula": { progress: {
3
3
  analyzing: "수식 분석 중...",
4
4
  calculating: "수식 계산 중...",
@@ -7,5 +7,4 @@ const locale = { "sheets-formula": { progress: {
7
7
  done: "완료"
8
8
  } } };
9
9
 
10
- //#endregion
11
10
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/pl-PL.ts
1
+ // src/locale/pl-PL.ts
2
2
  const locale = { "sheets-formula": { progress: {
3
3
  analyzing: "Analizowanie formuł...",
4
4
  calculating: "Obliczanie formuł...",
@@ -7,5 +7,4 @@ const locale = { "sheets-formula": { progress: {
7
7
  done: "Gotowe"
8
8
  } } };
9
9
 
10
- //#endregion
11
10
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/pt-BR.ts
1
+ // src/locale/pt-BR.ts
2
2
  const locale = { "sheets-formula": { progress: {
3
3
  analyzing: "Analisando fórmulas...",
4
4
  calculating: "Calculando fórmulas...",
@@ -7,5 +7,4 @@ const locale = { "sheets-formula": { progress: {
7
7
  done: "Concluído"
8
8
  } } };
9
9
 
10
- //#endregion
11
10
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/ru-RU.ts
1
+ // src/locale/ru-RU.ts
2
2
  const locale = { "sheets-formula": { progress: {
3
3
  analyzing: "Анализ формул...",
4
4
  calculating: "Вычисление формул...",
@@ -7,5 +7,4 @@ const locale = { "sheets-formula": { progress: {
7
7
  done: "Готово"
8
8
  } } };
9
9
 
10
- //#endregion
11
10
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/sk-SK.ts
1
+ // src/locale/sk-SK.ts
2
2
  const locale = { "sheets-formula": { progress: {
3
3
  analyzing: "Analyzujú sa vzorce...",
4
4
  calculating: "Počítajú sa vzorce...",
@@ -7,5 +7,4 @@ const locale = { "sheets-formula": { progress: {
7
7
  done: "Hotovo"
8
8
  } } };
9
9
 
10
- //#endregion
11
10
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/vi-VN.ts
1
+ // src/locale/vi-VN.ts
2
2
  const locale = { "sheets-formula": { progress: {
3
3
  analyzing: "Đang phân tích công thức...",
4
4
  calculating: "Đang tính toán công thức...",
@@ -7,5 +7,4 @@ const locale = { "sheets-formula": { progress: {
7
7
  done: "Hoàn tất"
8
8
  } } };
9
9
 
10
- //#endregion
11
10
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/zh-CN.ts
1
+ // src/locale/zh-CN.ts
2
2
  const locale = { "sheets-formula": { progress: {
3
3
  analyzing: "正在分析公式...",
4
4
  calculating: "正在计算公式...",
@@ -7,5 +7,4 @@ const locale = { "sheets-formula": { progress: {
7
7
  done: "完成"
8
8
  } } };
9
9
 
10
- //#endregion
11
10
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/zh-HK.ts
1
+ // src/locale/zh-HK.ts
2
2
  const locale = { "sheets-formula": { progress: {
3
3
  analyzing: "正在分析公式...",
4
4
  calculating: "正在計算公式...",
@@ -7,5 +7,4 @@ const locale = { "sheets-formula": { progress: {
7
7
  done: "完成"
8
8
  } } };
9
9
 
10
- //#endregion
11
10
  export { locale as default };
@@ -1,4 +1,4 @@
1
- //#region src/locale/zh-TW.ts
1
+ // src/locale/zh-TW.ts
2
2
  const locale = { "sheets-formula": { progress: {
3
3
  analyzing: "正在分析公式...",
4
4
  calculating: "正在計算公式...",
@@ -7,5 +7,4 @@ const locale = { "sheets-formula": { progress: {
7
7
  done: "完成"
8
8
  } } };
9
9
 
10
- //#endregion
11
10
  export { locale as default };
@@ -38,6 +38,7 @@ export declare class UpdateFormulaController extends Disposable {
38
38
  readonly _injector: Injector;
39
39
  constructor(_univerInstanceService: IUniverInstanceService, _commandService: ICommandService, _lexerTreeBuilder: LexerTreeBuilder, _formulaDataModel: FormulaDataModel, _sheetInterceptorService: SheetInterceptorService, _definedNamesService: IDefinedNamesService, _configService: IConfigService, _injector: Injector);
40
40
  private _commandExecutedListener;
41
+ private _getEditedArrayFormulaDirtyRanges;
41
42
  private _handleSetRangeValuesMutation;
42
43
  private _handleWorkbookDisposed;
43
44
  private _handleInsertSheetMutation;
@@ -45,4 +46,7 @@ export declare class UpdateFormulaController extends Disposable {
45
46
  private _getDirtyDataByCalculationMode;
46
47
  private _getUpdateFormula;
47
48
  private _getFormulaReferenceMoveInfo;
49
+ private _getMovedFormula;
50
+ private _updateFormulaReferenceNodes;
51
+ private _getDefinedNameReferenceToken;
48
52
  }
@@ -24,7 +24,10 @@ export { TriggerCalculationController } from './controllers/trigger-calculation.
24
24
  export { collectUnitQualifierFormulaPatches, UnitQualifierRenameController } from './controllers/unit-qualifier-rename.controller';
25
25
  export { UpdateDefinedNameController } from './controllers/update-defined-name.controller';
26
26
  export { UpdateFormulaController } from './controllers/update-formula.controller';
27
- export { UniverRemoteSheetsFormulaPlugin, UniverSheetsFormulaPlugin } from './plugin';
27
+ export { UniverSheetsFormulaPlugin } from './plugin';
28
28
  export { FormulaRefRangeService } from './services/formula-ref-range.service';
29
29
  export { IRemoteRegisterFunctionService, RemoteRegisterFunctionService, } from './services/remote/remote-register-function.service';
30
30
  export { calculateFormula } from './util/calculate';
31
+ export {
32
+ /** @deprecated Import from '@univerjs/sheets-formula/worker' instead. This root export will be removed in the next release. */
33
+ UniverRemoteSheetsFormulaPlugin, } from './worker';
@@ -13,19 +13,8 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import type { IUniverSheetsFormulaBaseConfig, IUniverSheetsFormulaRemoteConfig } from './config/config';
17
16
  import { IConfigService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
18
- export declare class UniverRemoteSheetsFormulaPlugin extends Plugin {
19
- private readonly _config;
20
- readonly _injector: Injector;
21
- private readonly _configService;
22
- static pluginName: string;
23
- static packageName: string;
24
- static version: string;
25
- static type: UniverInstanceType;
26
- constructor(_config: Partial<IUniverSheetsFormulaRemoteConfig> | undefined, _injector: Injector, _configService: IConfigService);
27
- onStarting(): void;
28
- }
17
+ import type { IUniverSheetsFormulaBaseConfig } from './config/config';
29
18
  export declare class UniverSheetsFormulaPlugin extends Plugin {
30
19
  private readonly _config;
31
20
  readonly _injector: Injector;
@@ -20,7 +20,7 @@ export interface IRemoteRegisterFunctionService {
20
20
  unregisterFunctions(names: string[]): Promise<void>;
21
21
  }
22
22
  export declare const RemoteRegisterFunctionServiceName = "sheets-formula.remote-register-function.service";
23
- export declare const IRemoteRegisterFunctionService: import("@wendellhu/redi").IdentifierDecorator<IRemoteRegisterFunctionService>;
23
+ export declare const IRemoteRegisterFunctionService: import("@univerjs/core").IdentifierDecorator<IRemoteRegisterFunctionService>;
24
24
  /**
25
25
  * This class should resident in the remote process.
26
26
  */
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { IConfigService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
17
+ import type { IUniverSheetsFormulaRemoteConfig } from './config/config';
18
+ export declare class UniverRemoteSheetsFormulaPlugin extends Plugin {
19
+ private readonly _config;
20
+ readonly _injector: Injector;
21
+ private readonly _configService;
22
+ static pluginName: string;
23
+ static packageName: string;
24
+ static version: string;
25
+ static type: UniverInstanceType;
26
+ constructor(_config: Partial<IUniverSheetsFormulaRemoteConfig> | undefined, _injector: Injector, _configService: IConfigService);
27
+ onStarting(): void;
28
+ }