@univerjs/sheets-formula 0.2.7 → 0.2.9

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 (113) hide show
  1. package/lib/cjs/index.js +4 -4
  2. package/lib/es/index.js +974 -409
  3. package/lib/locale/en-US.json +646 -350
  4. package/lib/locale/ru-RU.json +646 -350
  5. package/lib/locale/vi-VN.json +682 -346
  6. package/lib/locale/zh-CN.json +654 -358
  7. package/lib/locale/zh-TW.json +654 -358
  8. package/lib/types/commands/commands/formula-clipboard.command.d.ts +0 -1
  9. package/lib/types/commands/commands/insert-function.command.d.ts +0 -1
  10. package/lib/types/commands/mutations/formula.mutation.d.ts +0 -1
  11. package/lib/types/commands/operations/__tests__/create-command-test-bed.d.ts +0 -1
  12. package/lib/types/commands/operations/editor-formula.operation.d.ts +0 -1
  13. package/lib/types/commands/operations/help-function.operation.d.ts +0 -1
  14. package/lib/types/commands/operations/insert-function.operation.d.ts +0 -1
  15. package/lib/types/commands/operations/more-functions.operation.d.ts +0 -1
  16. package/lib/types/commands/operations/reference-absolute.operation.d.ts +0 -1
  17. package/lib/types/commands/operations/search-function.operation.d.ts +0 -1
  18. package/lib/types/common/selection.d.ts +0 -1
  19. package/lib/types/controllers/__tests__/create-command-test-bed.d.ts +0 -1
  20. package/lib/types/controllers/active-dirty.controller.d.ts +0 -1
  21. package/lib/types/controllers/array-formula-display.controller.d.ts +0 -1
  22. package/lib/types/controllers/defined-name.controller.d.ts +0 -1
  23. package/lib/types/controllers/formula-alert-render.controller.d.ts +0 -1
  24. package/lib/types/controllers/formula-auto-fill.controller.d.ts +0 -1
  25. package/lib/types/controllers/formula-clipboard.controller.d.ts +0 -1
  26. package/lib/types/controllers/formula-editor-show.controller.d.ts +7 -4
  27. package/lib/types/controllers/formula-render.controller.d.ts +0 -1
  28. package/lib/types/controllers/formula-ui.controller.d.ts +0 -1
  29. package/lib/types/controllers/menu.d.ts +0 -1
  30. package/lib/types/controllers/prompt.controller.d.ts +10 -2
  31. package/lib/types/controllers/shortcuts/prompt.shortcut.d.ts +0 -1
  32. package/lib/types/controllers/trigger-calculation.controller.d.ts +0 -1
  33. package/lib/types/controllers/update-formula.controller.d.ts +0 -1
  34. package/lib/types/controllers/utils/offset-formula-data.d.ts +0 -1
  35. package/lib/types/controllers/utils/ref-range-formula.d.ts +0 -1
  36. package/lib/types/controllers/utils/utils.d.ts +0 -1
  37. package/lib/types/formula-ui-plugin.d.ts +0 -1
  38. package/lib/types/locale/en-US.d.ts +426 -130
  39. package/lib/types/locale/function-list/array/ru-RU.d.ts +0 -1
  40. package/lib/types/locale/function-list/compatibility/en-US.d.ts +6 -2
  41. package/lib/types/locale/function-list/compatibility/ja-JP.d.ts +6 -2
  42. package/lib/types/locale/function-list/compatibility/ru-RU.d.ts +0 -1
  43. package/lib/types/locale/function-list/compatibility/vi-VN.d.ts +6 -2
  44. package/lib/types/locale/function-list/compatibility/zh-CN.d.ts +6 -2
  45. package/lib/types/locale/function-list/compatibility/zh-TW.d.ts +6 -2
  46. package/lib/types/locale/function-list/date/ru-RU.d.ts +0 -1
  47. package/lib/types/locale/function-list/engineering/en-US.d.ts +50 -66
  48. package/lib/types/locale/function-list/engineering/ja-JP.d.ts +50 -66
  49. package/lib/types/locale/function-list/engineering/ru-RU.d.ts +0 -1
  50. package/lib/types/locale/function-list/engineering/vi-VN.d.ts +50 -66
  51. package/lib/types/locale/function-list/engineering/zh-CN.d.ts +50 -66
  52. package/lib/types/locale/function-list/engineering/zh-TW.d.ts +50 -66
  53. package/lib/types/locale/function-list/financial/en-US.d.ts +344 -56
  54. package/lib/types/locale/function-list/financial/ja-JP.d.ts +344 -56
  55. package/lib/types/locale/function-list/financial/ru-RU.d.ts +0 -1
  56. package/lib/types/locale/function-list/financial/vi-VN.d.ts +344 -56
  57. package/lib/types/locale/function-list/financial/zh-CN.d.ts +344 -56
  58. package/lib/types/locale/function-list/financial/zh-TW.d.ts +344 -56
  59. package/lib/types/locale/function-list/information/ru-RU.d.ts +0 -1
  60. package/lib/types/locale/function-list/logical/en-US.d.ts +14 -2
  61. package/lib/types/locale/function-list/logical/ja-JP.d.ts +14 -2
  62. package/lib/types/locale/function-list/logical/ru-RU.d.ts +0 -1
  63. package/lib/types/locale/function-list/logical/vi-VN.d.ts +14 -2
  64. package/lib/types/locale/function-list/logical/zh-CN.d.ts +14 -2
  65. package/lib/types/locale/function-list/logical/zh-TW.d.ts +14 -2
  66. package/lib/types/locale/function-list/lookup/ru-RU.d.ts +0 -1
  67. package/lib/types/locale/function-list/math/ru-RU.d.ts +0 -1
  68. package/lib/types/locale/function-list/statistical/en-US.d.ts +12 -4
  69. package/lib/types/locale/function-list/statistical/ja-JP.d.ts +12 -4
  70. package/lib/types/locale/function-list/statistical/ru-RU.d.ts +0 -1
  71. package/lib/types/locale/function-list/statistical/vi-VN.d.ts +44 -0
  72. package/lib/types/locale/function-list/statistical/zh-CN.d.ts +12 -4
  73. package/lib/types/locale/function-list/statistical/zh-TW.d.ts +12 -4
  74. package/lib/types/locale/function-list/web/vi-VN.d.ts +0 -1
  75. package/lib/types/locale/ru-RU.d.ts +426 -130
  76. package/lib/types/locale/vi-VN.d.ts +458 -126
  77. package/lib/types/locale/zh-CN.d.ts +426 -130
  78. package/lib/types/locale/zh-TW.d.ts +426 -130
  79. package/lib/types/services/description.service.d.ts +0 -1
  80. package/lib/types/services/formula-common.d.ts +0 -1
  81. package/lib/types/services/formula-ref-range.service.d.ts +0 -1
  82. package/lib/types/services/function-list/array.d.ts +0 -1
  83. package/lib/types/services/function-list/compatibility.d.ts +0 -1
  84. package/lib/types/services/function-list/cube.d.ts +0 -1
  85. package/lib/types/services/function-list/database.d.ts +0 -1
  86. package/lib/types/services/function-list/date.d.ts +0 -1
  87. package/lib/types/services/function-list/engineering.d.ts +0 -1
  88. package/lib/types/services/function-list/financial.d.ts +0 -1
  89. package/lib/types/services/function-list/function-list.d.ts +0 -1
  90. package/lib/types/services/function-list/information.d.ts +0 -1
  91. package/lib/types/services/function-list/logical.d.ts +0 -1
  92. package/lib/types/services/function-list/lookup.d.ts +0 -1
  93. package/lib/types/services/function-list/math.d.ts +0 -1
  94. package/lib/types/services/function-list/statistical.d.ts +0 -1
  95. package/lib/types/services/function-list/text.d.ts +0 -1
  96. package/lib/types/services/function-list/univer.d.ts +0 -1
  97. package/lib/types/services/function-list/web.d.ts +0 -1
  98. package/lib/types/services/prompt.service.d.ts +0 -1
  99. package/lib/types/services/register-function.service.d.ts +0 -1
  100. package/lib/types/services/register-other-formula.service.d.ts +0 -1
  101. package/lib/types/services/remote/remote-register-function.service.d.ts +0 -1
  102. package/lib/types/services/render-services/ref-selections.render-service.d.ts +8 -4
  103. package/lib/types/services/utils.d.ts +0 -1
  104. package/lib/types/views/FormulaPromptContainer.d.ts +0 -1
  105. package/lib/types/views/more-functions/MoreFunctions.d.ts +0 -1
  106. package/lib/types/views/more-functions/function-help/FunctionHelp.d.ts +0 -1
  107. package/lib/types/views/more-functions/function-params/FunctionParams.d.ts +0 -1
  108. package/lib/types/views/more-functions/input-params/InputParams.d.ts +0 -1
  109. package/lib/types/views/more-functions/select-function/SelectFunction.d.ts +0 -1
  110. package/lib/types/views/prompt/help-function/HelpFunction.d.ts +0 -1
  111. package/lib/types/views/prompt/search-function/SearchFunction.d.ts +0 -1
  112. package/lib/umd/index.js +4 -4
  113. package/package.json +23 -23
@@ -1,6 +1,5 @@
1
1
  import { LocaleService, IDisposable } from '@univerjs/core';
2
2
  import { IFunctionInfo, IFunctionNames, IFunctionService } from '@univerjs/engine-formula';
3
-
4
3
  export interface ISearchItem {
5
4
  name: string;
6
5
  desc: string;
@@ -1,5 +1,4 @@
1
1
  import { ICellData, Nullable } from '@univerjs/core';
2
-
3
2
  export declare enum FormulaResultStatus {
4
3
  NOT_REGISTER = 1,
5
4
  SUCCESS = 2,
@@ -1,7 +1,6 @@
1
1
  import { IDisposable, IMutationInfo, Disposable, IUniverInstanceService } from '@univerjs/core';
2
2
  import { LexerTreeBuilder } from '@univerjs/engine-formula';
3
3
  import { RefRangeService } from '@univerjs/sheets';
4
-
5
4
  export type FormulaChangeMap = Record<string, Record<string, Record<string, string>>>;
6
5
  export type FormulaChangeCallback = (formulaString: string) => {
7
6
  redos: IMutationInfo[];
@@ -1,3 +1,2 @@
1
1
  import { IFunctionInfo } from '@univerjs/engine-formula';
2
-
3
2
  export declare const FUNCTION_LIST_ARRAY: IFunctionInfo[];
@@ -1,3 +1,2 @@
1
1
  import { IFunctionInfo } from '@univerjs/engine-formula';
2
-
3
2
  export declare const FUNCTION_LIST_COMPATIBILITY: IFunctionInfo[];
@@ -1,3 +1,2 @@
1
1
  import { IFunctionInfo } from '@univerjs/engine-formula';
2
-
3
2
  export declare const FUNCTION_LIST_CUBE: IFunctionInfo[];
@@ -1,3 +1,2 @@
1
1
  import { IFunctionInfo } from '@univerjs/engine-formula';
2
-
3
2
  export declare const FUNCTION_LIST_DATABASE: IFunctionInfo[];
@@ -1,3 +1,2 @@
1
1
  import { IFunctionInfo } from '@univerjs/engine-formula';
2
-
3
2
  export declare const FUNCTION_LIST_DATE: IFunctionInfo[];
@@ -1,3 +1,2 @@
1
1
  import { IFunctionInfo } from '@univerjs/engine-formula';
2
-
3
2
  export declare const FUNCTION_LIST_ENGINEERING: IFunctionInfo[];
@@ -1,3 +1,2 @@
1
1
  import { IFunctionInfo } from '@univerjs/engine-formula';
2
-
3
2
  export declare const FUNCTION_LIST_FINANCIAL: IFunctionInfo[];
@@ -1,3 +1,2 @@
1
1
  import { IFunctionInfo } from '@univerjs/engine-formula';
2
-
3
2
  export declare const FUNCTION_LIST: IFunctionInfo[];
@@ -1,3 +1,2 @@
1
1
  import { IFunctionInfo } from '@univerjs/engine-formula';
2
-
3
2
  export declare const FUNCTION_LIST_INFORMATION: IFunctionInfo[];
@@ -1,3 +1,2 @@
1
1
  import { IFunctionInfo } from '@univerjs/engine-formula';
2
-
3
2
  export declare const FUNCTION_LIST_LOGICAL: IFunctionInfo[];
@@ -1,3 +1,2 @@
1
1
  import { IFunctionInfo } from '@univerjs/engine-formula';
2
-
3
2
  export declare const FUNCTION_LIST_LOOKUP: IFunctionInfo[];
@@ -1,3 +1,2 @@
1
1
  import { IFunctionInfo } from '@univerjs/engine-formula';
2
-
3
2
  export declare const FUNCTION_LIST_MATH: IFunctionInfo[];
@@ -1,3 +1,2 @@
1
1
  import { IFunctionInfo } from '@univerjs/engine-formula';
2
-
3
2
  export declare const FUNCTION_LIST_STATISTICAL: IFunctionInfo[];
@@ -1,3 +1,2 @@
1
1
  import { IFunctionInfo } from '@univerjs/engine-formula';
2
-
3
2
  export declare const FUNCTION_LIST_TEXT: IFunctionInfo[];
@@ -1,3 +1,2 @@
1
1
  import { IFunctionInfo } from '@univerjs/engine-formula';
2
-
3
2
  export declare const FUNCTION_LIST_UNIVER: IFunctionInfo[];
@@ -1,3 +1,2 @@
1
1
  import { IFunctionInfo } from '@univerjs/engine-formula';
2
-
3
2
  export declare const FUNCTION_LIST_WEB: IFunctionInfo[];
@@ -2,7 +2,6 @@ import { Direction, IDisposable, IContextService } from '@univerjs/core';
2
2
  import { IFunctionInfo, ISequenceNode } from '@univerjs/engine-formula';
3
3
  import { Observable } from 'rxjs';
4
4
  import { ISearchItem } from './description.service';
5
-
6
5
  /** If the formula prompt is visible. */
7
6
  export declare const FORMULA_PROMPT_ACTIVATED = "FORMULA_PROMPT_ACTIVATED";
8
7
  export interface ISearchFunctionOperationParams {
@@ -2,7 +2,6 @@ import { IDisposable, ILocales, Disposable, LocaleService } from '@univerjs/core
2
2
  import { IFunctionInfo, PrimitiveValueType, IFunctionService } from '@univerjs/engine-formula';
3
3
  import { IDescriptionService } from './description.service';
4
4
  import { IRemoteRegisterFunctionService } from './remote/remote-register-function.service';
5
-
6
5
  export type IRegisterFunction = (...arg: Array<PrimitiveValueType | PrimitiveValueType[][]>) => PrimitiveValueType | PrimitiveValueType[][];
7
6
  export type IRegisterFunctionList = [[IRegisterFunction, string, string?]];
8
7
  export interface IFormulaCustomFunctionService {
@@ -1,7 +1,6 @@
1
1
  import { Nullable, Disposable, ICommandService } from '@univerjs/core';
2
2
  import { IActiveDirtyManagerService } from '@univerjs/engine-formula';
3
3
  import { IOtherFormulaResult } from './formula-common';
4
-
5
4
  export declare class RegisterOtherFormulaService extends Disposable {
6
5
  private readonly _commandService;
7
6
  private _activeDirtyManagerService;
@@ -1,5 +1,4 @@
1
1
  import { IFunctionService } from '@univerjs/engine-formula';
2
-
3
2
  export interface IRemoteRegisterFunctionService {
4
3
  registerFunctions(serializedFuncs: Array<[string, string]>): Promise<void>;
5
4
  unregisterFunctions(names: string[]): Promise<void>;
@@ -1,23 +1,24 @@
1
1
  import { IDisposable, Workbook, Injector, ThemeService } from '@univerjs/core';
2
- import { IRenderContext, IRenderModule, IRenderManagerService } from '@univerjs/engine-render';
2
+ import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
3
3
  import { ISelectionWithStyle, SheetsSelectionsService } from '@univerjs/sheets';
4
4
  import { BaseSelectionRenderService, SheetSkeletonManagerService } from '@univerjs/sheets-ui';
5
5
  import { IShortcutService } from '@univerjs/ui';
6
-
7
6
  /**
8
7
  * This service extends the existing `SelectionRenderService` to provide the rendering of prompt selections
9
8
  * when user is editing ref ranges in formulas.
10
9
  *
11
10
  * Not that this service works with Uni-mode, which means it should be able to deal with multi render unit
12
11
  * and handle selections on them, though each at a time.
12
+ *
13
+ *
14
+ *
13
15
  */
14
16
  export declare class RefSelectionsRenderService extends BaseSelectionRenderService implements IRenderModule {
15
17
  private readonly _context;
16
18
  private readonly _refSelectionsService;
17
- private readonly _sheetSkeletonManagerService;
18
19
  private readonly _workbookSelections;
19
20
  private _eventDisposables;
20
- constructor(_context: IRenderContext<Workbook>, injector: Injector, themeService: ThemeService, shortcutService: IShortcutService, renderManagerService: IRenderManagerService, _refSelectionsService: SheetsSelectionsService, _sheetSkeletonManagerService: SheetSkeletonManagerService);
21
+ constructor(_context: IRenderContext<Workbook>, injector: Injector, themeService: ThemeService, shortcutService: IShortcutService, sheetSkeletonManagerService: SheetSkeletonManagerService, _refSelectionsService: SheetsSelectionsService);
21
22
  getLocation(): [string, string];
22
23
  setRemainLastEnabled(enabled: boolean): void;
23
24
  setSkipLastEnabled(enabled: boolean): void;
@@ -28,6 +29,9 @@ export declare class RefSelectionsRenderService extends BaseSelectionRenderServi
28
29
  enableSelectionChanging(): IDisposable;
29
30
  private _disableSelectionChanging;
30
31
  private _initCanvasEventListeners;
32
+ /**
33
+ * Update selectionModel in this._workbookSelections by user action in spreadsheet area.
34
+ */
31
35
  private _initUserActionSyncListener;
32
36
  private _updateSelections;
33
37
  private _initSelectionChangeListener;
@@ -1,6 +1,5 @@
1
1
  import { LocaleService } from '@univerjs/core';
2
2
  import { IFunctionInfo, IFunctionParam } from '@univerjs/engine-formula';
3
-
4
3
  export declare function getFunctionTypeValues(enumObj: any, localeService: LocaleService): Array<{
5
4
  label: string;
6
5
  value: string;
@@ -1,3 +1,2 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  export declare function RenderFormulaPromptContent(): React.JSX.Element;
@@ -1,3 +1,2 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  export declare function MoreFunctions(): React.JSX.Element;
@@ -1,6 +1,5 @@
1
1
  import { IFunctionParam } from '@univerjs/engine-formula';
2
2
  import { default as React } from 'react';
3
-
4
3
  interface IFunctionHelpProps {
5
4
  prefix?: string;
6
5
  value?: IFunctionParam[];
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface IParamsProps {
4
3
  className?: string;
5
4
  title?: string | React.ReactElement;
@@ -1,6 +1,5 @@
1
1
  import { IFunctionInfo } from '@univerjs/engine-formula';
2
2
  import { default as React } from 'react';
3
-
4
3
  export interface IInputParamsProps {
5
4
  functionInfo: IFunctionInfo | null;
6
5
  onChange: (params: string[]) => void;
@@ -1,6 +1,5 @@
1
1
  import { IFunctionInfo } from '@univerjs/engine-formula';
2
2
  import { default as React } from 'react';
3
-
4
3
  export interface ISelectFunctionProps {
5
4
  onChange: (functionInfo: IFunctionInfo) => void;
6
5
  }
@@ -1,3 +1,2 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  export declare function HelpFunction(): React.JSX.Element;
@@ -1,3 +1,2 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  export declare function SearchFunction(): false | React.JSX.Element;