@univerjs/sheets-formula 0.1.10 → 0.1.11

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 (54) hide show
  1. package/README.md +2 -2
  2. package/lib/cjs/index.js +8 -8
  3. package/lib/es/index.js +2281 -1179
  4. package/lib/types/commands/operations/__tests__/create-command-test-bed.d.ts +1 -1
  5. package/lib/types/commands/operations/editor-formula.operation.d.ts +3 -3
  6. package/lib/types/common/selection.d.ts +1 -1
  7. package/lib/types/controllers/__tests__/create-command-test-bed.d.ts +1 -1
  8. package/lib/types/controllers/active-dirty.controller.d.ts +1 -1
  9. package/lib/types/controllers/array-formula-display.controller.d.ts +2 -2
  10. package/lib/types/controllers/defined-name.controller.d.ts +2 -2
  11. package/lib/types/controllers/formula-alert.controller.d.ts +1 -1
  12. package/lib/types/controllers/formula-auto-fill.controller.d.ts +2 -2
  13. package/lib/types/controllers/formula-clipboard.controller.d.ts +3 -3
  14. package/lib/types/controllers/formula-editor-show.controller.d.ts +7 -6
  15. package/lib/types/controllers/formula-render.controller.d.ts +2 -2
  16. package/lib/types/controllers/formula-ui.controller.d.ts +6 -3
  17. package/lib/types/controllers/menu.d.ts +1 -1
  18. package/lib/types/controllers/prompt.controller.d.ts +8 -8
  19. package/lib/types/controllers/trigger-calculation.controller.d.ts +3 -3
  20. package/lib/types/controllers/update-formula.controller.d.ts +4 -3
  21. package/lib/types/controllers/utils/offset-formula-data.d.ts +4 -2
  22. package/lib/types/controllers/utils/ref-range-formula.d.ts +1 -1
  23. package/lib/types/controllers/utils/utils.d.ts +1 -1
  24. package/lib/types/formula-ui-plugin.d.ts +3 -3
  25. package/lib/types/index.d.ts +1 -1
  26. package/lib/types/locale/function-list/array/ru-RU.d.ts +3 -0
  27. package/lib/types/locale/function-list/compatibility/ru-RU.d.ts +3 -0
  28. package/lib/types/locale/function-list/cube/ru-RU.d.ts +144 -0
  29. package/lib/types/locale/function-list/database/ru-RU.d.ts +234 -0
  30. package/lib/types/locale/function-list/date/ru-RU.d.ts +3 -0
  31. package/lib/types/locale/function-list/engineering/ru-RU.d.ts +3 -0
  32. package/lib/types/locale/function-list/financial/ru-RU.d.ts +3 -0
  33. package/lib/types/locale/function-list/information/ru-RU.d.ts +3 -0
  34. package/lib/types/locale/function-list/logical/ru-RU.d.ts +3 -0
  35. package/lib/types/locale/function-list/lookup/ru-RU.d.ts +3 -0
  36. package/lib/types/locale/function-list/math/ru-RU.d.ts +3 -0
  37. package/lib/types/locale/function-list/statistical/ru-RU.d.ts +3 -0
  38. package/lib/types/locale/function-list/text/ru-RU.d.ts +852 -0
  39. package/lib/types/locale/function-list/univer/ru-RU.d.ts +17 -0
  40. package/lib/types/locale/function-list/web/ru-RU.d.ts +72 -0
  41. package/lib/types/locale/index.d.ts +1 -0
  42. package/lib/types/locale/ru-RU.d.ts +9276 -0
  43. package/lib/types/services/description.service.d.ts +2 -2
  44. package/lib/types/services/formula-custom-function.service.d.ts +2 -2
  45. package/lib/types/services/formula-ref-range.service.d.ts +3 -3
  46. package/lib/types/services/prompt.service.d.ts +4 -4
  47. package/lib/types/services/register-function.service.d.ts +4 -4
  48. package/lib/types/services/register-other-formula.service.d.ts +2 -2
  49. package/lib/types/services/utils.d.ts +2 -1
  50. package/lib/types/views/more-functions/function-help/FunctionHelp.d.ts +15 -1
  51. package/lib/types/views/more-functions/input-params/InputParams.d.ts +1 -1
  52. package/lib/types/views/more-functions/select-function/SelectFunction.d.ts +1 -1
  53. package/lib/umd/index.js +7 -7
  54. package/package.json +24 -24
@@ -1,6 +1,6 @@
1
- import { IDisposable } from '@wendellhu/redi';
2
- import { IFunctionInfo, IFunctionNames, IFunctionService } from '@univerjs/engine-formula';
3
1
  import { LocaleService } from '@univerjs/core';
2
+ import { IFunctionInfo, IFunctionNames, IFunctionService } from '@univerjs/engine-formula';
3
+ import { IDisposable } from '@wendellhu/redi';
4
4
 
5
5
  export interface ISearchItem {
6
6
  name: string;
@@ -1,6 +1,6 @@
1
- import { IDisposable } from '@wendellhu/redi';
2
- import { PrimitiveValueType } from '@univerjs/engine-formula';
3
1
  import { Disposable, ICommandService } from '@univerjs/core';
2
+ import { PrimitiveValueType } from '@univerjs/engine-formula';
3
+ import { IDisposable } from '@wendellhu/redi';
4
4
 
5
5
  export type IRegisterFunction = (...arg: Array<PrimitiveValueType | PrimitiveValueType[][]>) => PrimitiveValueType | PrimitiveValueType[][];
6
6
  export type IRegisterFunctionList = [[IRegisterFunction, string, string?]];
@@ -1,7 +1,7 @@
1
- import { IDisposable } from '@wendellhu/redi';
2
- import { RefRangeService } from '@univerjs/sheets';
3
- import { LexerTreeBuilder } from '@univerjs/engine-formula';
4
1
  import { IMutationInfo, Disposable, IUniverInstanceService } from '@univerjs/core';
2
+ import { LexerTreeBuilder } from '@univerjs/engine-formula';
3
+ import { RefRangeService } from '@univerjs/sheets';
4
+ import { IDisposable } from '@wendellhu/redi';
5
5
 
6
6
  export type FormulaChangeMap = Record<string, Record<string, Record<string, string>>>;
7
7
  export type FormulaChangeCallback = (formulaString: string) => {
@@ -1,8 +1,8 @@
1
- import { ISearchItem } from './description.service';
2
- import { Observable } from 'rxjs';
3
- import { IDisposable } from '@wendellhu/redi';
4
- import { IFunctionInfo, ISequenceNode } from '@univerjs/engine-formula';
5
1
  import { Direction } from '@univerjs/core';
2
+ import { IFunctionInfo, ISequenceNode } from '@univerjs/engine-formula';
3
+ import { IDisposable } from '@wendellhu/redi';
4
+ import { Observable } from 'rxjs';
5
+ import { ISearchItem } from './description.service';
6
6
 
7
7
  export interface ISearchFunctionOperationParams {
8
8
  /**
@@ -1,8 +1,8 @@
1
- import { IRegisterFunctionList, IFormulaCustomFunctionService } from './formula-custom-function.service';
2
- import { IDescriptionService } from './description.service';
3
- import { IDisposable } from '@wendellhu/redi';
4
- import { IFunctionInfo, IFunctionService } from '@univerjs/engine-formula';
5
1
  import { ILocales, Disposable, LocaleService } from '@univerjs/core';
2
+ import { IFunctionInfo, IFunctionService } from '@univerjs/engine-formula';
3
+ import { IDisposable } from '@wendellhu/redi';
4
+ import { IDescriptionService } from './description.service';
5
+ import { IRegisterFunctionList, IFormulaCustomFunctionService } from './formula-custom-function.service';
6
6
 
7
7
  /**
8
8
  * Register function operation params
@@ -1,6 +1,6 @@
1
- import { IOtherFormulaResult } from './formula-common';
2
- import { IActiveDirtyManagerService } from '@univerjs/engine-formula';
3
1
  import { Nullable, Disposable, ICommandService } from '@univerjs/core';
2
+ import { IActiveDirtyManagerService } from '@univerjs/engine-formula';
3
+ import { IOtherFormulaResult } from './formula-common';
4
4
 
5
5
  export declare class RegisterOtherFormulaService extends Disposable {
6
6
  private readonly _commandService;
@@ -1,8 +1,9 @@
1
- import { IFunctionInfo } from '@univerjs/engine-formula';
2
1
  import { LocaleService } from '@univerjs/core';
2
+ import { IFunctionInfo, IFunctionParam } from '@univerjs/engine-formula';
3
3
 
4
4
  export declare function getFunctionTypeValues(enumObj: any, localeService: LocaleService): Array<{
5
5
  label: string;
6
6
  value: string;
7
7
  }>;
8
8
  export declare function getFunctionName(item: IFunctionInfo, localeService: LocaleService): string;
9
+ export declare function generateParam(param: IFunctionParam): string | undefined;
@@ -1,9 +1,23 @@
1
- import { default as React } from 'react';
2
1
  import { IFunctionParam } from '@univerjs/engine-formula';
2
+ import { default as React } from 'react';
3
3
 
4
4
  interface IFunctionHelpProps {
5
5
  prefix?: string;
6
6
  value?: IFunctionParam[];
7
7
  }
8
+ /**
9
+ * Determine the parameter format
10
+ * ┌─────────┬────────┬─────────────┐
11
+ * │ Require │ Repeat │ Parameter │
12
+ * ├─────────┼────────┼─────────────┤
13
+ * │ 0 │ 0 │ [Number] │
14
+ * │ 1 │ 0 │ Number │
15
+ * │ 0 │ 1 │ [Number,...] │
16
+ * │ 1 │ 1 │ Number,... │
17
+ * └─────────┴────────┴─────────────┘
18
+ *
19
+ * @param props
20
+ * @returns
21
+ */
8
22
  export declare function FunctionHelp(props: IFunctionHelpProps): React.JSX.Element;
9
23
  export {};
@@ -1,5 +1,5 @@
1
- import { default as React } from 'react';
2
1
  import { IFunctionInfo } from '@univerjs/engine-formula';
2
+ import { default as React } from 'react';
3
3
 
4
4
  export interface IInputParamsProps {
5
5
  functionInfo: IFunctionInfo | null;
@@ -1,5 +1,5 @@
1
- import { default as React } from 'react';
2
1
  import { IFunctionInfo } from '@univerjs/engine-formula';
2
+ import { default as React } from 'react';
3
3
 
4
4
  export interface ISelectFunctionProps {
5
5
  onChange: (functionInfo: IFunctionInfo) => void;