@univerjs/sheets-formula 0.2.6 → 0.2.8

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 (117) hide show
  1. package/lib/cjs/index.js +4 -4
  2. package/lib/es/index.js +1185 -724
  3. package/lib/locale/en-US.json +706 -428
  4. package/lib/locale/ru-RU.json +703 -425
  5. package/lib/locale/vi-VN.json +2644 -1855
  6. package/lib/locale/zh-CN.json +750 -472
  7. package/lib/locale/zh-TW.json +834 -588
  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 +0 -1
  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 +3 -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/index.d.ts +1 -0
  39. package/lib/types/locale/en-US.d.ts +440 -162
  40. package/lib/types/locale/function-list/array/ru-RU.d.ts +0 -1
  41. package/lib/types/locale/function-list/compatibility/ru-RU.d.ts +0 -1
  42. package/lib/types/locale/function-list/date/ru-RU.d.ts +0 -1
  43. package/lib/types/locale/function-list/date/vi-VN.d.ts +105 -26
  44. package/lib/types/locale/function-list/date/zh-TW.d.ts +32 -8
  45. package/lib/types/locale/function-list/engineering/en-US.d.ts +50 -66
  46. package/lib/types/locale/function-list/engineering/ja-JP.d.ts +50 -66
  47. package/lib/types/locale/function-list/engineering/ru-RU.d.ts +0 -1
  48. package/lib/types/locale/function-list/engineering/vi-VN.d.ts +50 -66
  49. package/lib/types/locale/function-list/engineering/zh-CN.d.ts +50 -66
  50. package/lib/types/locale/function-list/engineering/zh-TW.d.ts +50 -66
  51. package/lib/types/locale/function-list/financial/en-US.d.ts +344 -56
  52. package/lib/types/locale/function-list/financial/ja-JP.d.ts +344 -56
  53. package/lib/types/locale/function-list/financial/ru-RU.d.ts +0 -1
  54. package/lib/types/locale/function-list/financial/vi-VN.d.ts +344 -56
  55. package/lib/types/locale/function-list/financial/zh-CN.d.ts +344 -56
  56. package/lib/types/locale/function-list/financial/zh-TW.d.ts +344 -56
  57. package/lib/types/locale/function-list/information/ja-JP.d.ts +8 -40
  58. package/lib/types/locale/function-list/information/ru-RU.d.ts +0 -1
  59. package/lib/types/locale/function-list/information/vi-VN.d.ts +218 -3
  60. package/lib/types/locale/function-list/logical/en-US.d.ts +45 -35
  61. package/lib/types/locale/function-list/logical/ja-JP.d.ts +45 -35
  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 +45 -35
  64. package/lib/types/locale/function-list/logical/zh-CN.d.ts +45 -35
  65. package/lib/types/locale/function-list/logical/zh-TW.d.ts +45 -35
  66. package/lib/types/locale/function-list/lookup/en-US.d.ts +1 -5
  67. package/lib/types/locale/function-list/lookup/ja-JP.d.ts +1 -5
  68. package/lib/types/locale/function-list/lookup/ru-RU.d.ts +0 -1
  69. package/lib/types/locale/function-list/lookup/vi-VN.d.ts +421 -9
  70. package/lib/types/locale/function-list/lookup/zh-CN.d.ts +1 -5
  71. package/lib/types/locale/function-list/lookup/zh-TW.d.ts +1 -5
  72. package/lib/types/locale/function-list/math/ru-RU.d.ts +0 -1
  73. package/lib/types/locale/function-list/math/vi-VN.d.ts +1022 -3
  74. package/lib/types/locale/function-list/math/zh-TW.d.ts +21 -77
  75. package/lib/types/locale/function-list/statistical/ru-RU.d.ts +0 -1
  76. package/lib/types/locale/function-list/statistical/vi-VN.d.ts +334 -0
  77. package/lib/types/locale/function-list/text/vi-VN.d.ts +135 -1
  78. package/lib/types/locale/function-list/web/vi-VN.d.ts +0 -1
  79. package/lib/types/locale/ru-RU.d.ts +440 -162
  80. package/lib/types/locale/vi-VN.d.ts +1378 -623
  81. package/lib/types/locale/zh-CN.d.ts +440 -162
  82. package/lib/types/locale/zh-TW.d.ts +493 -247
  83. package/lib/types/services/description.service.d.ts +0 -1
  84. package/lib/types/services/formula-common.d.ts +0 -1
  85. package/lib/types/services/formula-ref-range.service.d.ts +0 -1
  86. package/lib/types/services/function-list/array.d.ts +0 -1
  87. package/lib/types/services/function-list/compatibility.d.ts +0 -1
  88. package/lib/types/services/function-list/cube.d.ts +0 -1
  89. package/lib/types/services/function-list/database.d.ts +0 -1
  90. package/lib/types/services/function-list/date.d.ts +0 -1
  91. package/lib/types/services/function-list/engineering.d.ts +0 -1
  92. package/lib/types/services/function-list/financial.d.ts +0 -1
  93. package/lib/types/services/function-list/function-list.d.ts +0 -1
  94. package/lib/types/services/function-list/information.d.ts +0 -1
  95. package/lib/types/services/function-list/logical.d.ts +0 -1
  96. package/lib/types/services/function-list/lookup.d.ts +0 -1
  97. package/lib/types/services/function-list/math.d.ts +0 -1
  98. package/lib/types/services/function-list/statistical.d.ts +0 -1
  99. package/lib/types/services/function-list/text.d.ts +0 -1
  100. package/lib/types/services/function-list/univer.d.ts +0 -1
  101. package/lib/types/services/function-list/web.d.ts +0 -1
  102. package/lib/types/services/prompt.service.d.ts +5 -2
  103. package/lib/types/services/register-function.service.d.ts +0 -1
  104. package/lib/types/services/register-other-formula.service.d.ts +0 -1
  105. package/lib/types/services/remote/remote-register-function.service.d.ts +0 -1
  106. package/lib/types/services/render-services/ref-selections.render-service.d.ts +0 -1
  107. package/lib/types/services/utils.d.ts +0 -1
  108. package/lib/types/views/FormulaPromptContainer.d.ts +0 -1
  109. package/lib/types/views/more-functions/MoreFunctions.d.ts +0 -1
  110. package/lib/types/views/more-functions/function-help/FunctionHelp.d.ts +0 -1
  111. package/lib/types/views/more-functions/function-params/FunctionParams.d.ts +0 -1
  112. package/lib/types/views/more-functions/input-params/InputParams.d.ts +0 -1
  113. package/lib/types/views/more-functions/select-function/SelectFunction.d.ts +0 -1
  114. package/lib/types/views/prompt/help-function/HelpFunction.d.ts +0 -1
  115. package/lib/types/views/prompt/search-function/SearchFunction.d.ts +0 -1
  116. package/lib/umd/index.js +4 -4
  117. package/package.json +24 -24
@@ -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[];
@@ -1,8 +1,9 @@
1
- import { Direction, IDisposable } from '@univerjs/core';
1
+ 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
-
5
+ /** If the formula prompt is visible. */
6
+ export declare const FORMULA_PROMPT_ACTIVATED = "FORMULA_PROMPT_ACTIVATED";
6
7
  export interface ISearchFunctionOperationParams {
7
8
  /**
8
9
  * show SearchFunction Component or not
@@ -96,6 +97,7 @@ export interface IFormulaPromptService {
96
97
  }
97
98
  export declare const IFormulaPromptService: import('@univerjs/core').IdentifierDecorator<FormulaPromptService>;
98
99
  export declare class FormulaPromptService implements IFormulaPromptService, IDisposable {
100
+ private readonly _contextService;
99
101
  private readonly _search$;
100
102
  private readonly _help$;
101
103
  private readonly _navigate$;
@@ -111,6 +113,7 @@ export declare class FormulaPromptService implements IFormulaPromptService, IDis
111
113
  private _sequenceNodes;
112
114
  private _isLockedOnSelectionChangeRefString;
113
115
  private _isLockedOnSelectionInsertRefString;
116
+ constructor(_contextService: IContextService);
114
117
  dispose(): void;
115
118
  search(param: ISearchFunctionOperationParams): void;
116
119
  isSearching(): boolean;
@@ -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>;
@@ -3,7 +3,6 @@ import { IRenderContext, IRenderModule, IRenderManagerService } from '@univerjs/
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.
@@ -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;