@univerjs/sheets-formula 0.1.8 → 0.1.10

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.
@@ -11,5 +11,5 @@ export declare function createCommandTestBed(workbookData?: IWorkbookData, depen
11
11
  <T_4>(id: import('@wendellhu/redi').DependencyIdentifier<T_4>, quantity?: import('@wendellhu/redi').Quantity | undefined, lookUp?: import('@wendellhu/redi').LookUp | undefined): T_4 | T_4[] | null;
12
12
  <T_5>(id: import('@wendellhu/redi').DependencyIdentifier<T_5>, quantityOrLookup?: import('@wendellhu/redi').Quantity | import('@wendellhu/redi').LookUp | undefined, lookUp?: import('@wendellhu/redi').LookUp | undefined): T_5 | T_5[] | null;
13
13
  };
14
- sheet: import('@univerjs/core').Workbook;
14
+ sheet: import('@univerjs/core').UnitModel<object, number>;
15
15
  };
@@ -0,0 +1,12 @@
1
+ import { CellAlertManagerService, HoverManagerService } from '@univerjs/sheets-ui';
2
+ import { Disposable, IUniverInstanceService, LocaleService } from '@univerjs/core';
3
+
4
+ export declare class FormulaAlertController extends Disposable {
5
+ private readonly _hoverManagerService;
6
+ private readonly _cellAlertManagerService;
7
+ private readonly _univerInstanceService;
8
+ private readonly _localeService;
9
+ constructor(_hoverManagerService: HoverManagerService, _cellAlertManagerService: CellAlertManagerService, _univerInstanceService: IUniverInstanceService, _localeService: LocaleService);
10
+ private _init;
11
+ private _initCellAlertPopup;
12
+ }
@@ -0,0 +1,11 @@
1
+ import { SheetInterceptorService } from '@univerjs/sheets';
2
+ import { SheetSkeletonManagerService } from '@univerjs/sheets-ui';
3
+ import { RxDisposable } from '@univerjs/core';
4
+
5
+ export declare class FormulaRenderController extends RxDisposable {
6
+ private readonly _sheetSkeletonManagerService;
7
+ private readonly _sheetInterceptorService;
8
+ constructor(_sheetSkeletonManagerService: SheetSkeletonManagerService, _sheetInterceptorService: SheetInterceptorService);
9
+ private _init;
10
+ private _initViewModelIntercept;
11
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Inc.
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
+ export {};
@@ -1,3 +1,10 @@
1
- import { IContextService } from '@univerjs/core';
1
+ import { ErrorType } from '@univerjs/engine-formula';
2
+ import { ICellData, IContextService, Nullable } from '@univerjs/core';
2
3
 
3
4
  export declare function whenEditorStandalone(contextService: IContextService): boolean;
5
+ /**
6
+ * Extract the formula error from the cell
7
+ * @param cell
8
+ * @returns
9
+ */
10
+ export declare function extractFormulaError(cell: Nullable<ICellData>): ErrorType | null;
@@ -9227,6 +9227,21 @@ declare const _default: {
9227
9227
  required: string;
9228
9228
  optional: string;
9229
9229
  };
9230
+ error: {
9231
+ title: string;
9232
+ divByZero: string;
9233
+ name: string;
9234
+ value: string;
9235
+ num: string;
9236
+ na: string;
9237
+ cycle: string;
9238
+ ref: string;
9239
+ spill: string;
9240
+ calc: string;
9241
+ error: string;
9242
+ connect: string;
9243
+ null: string;
9244
+ };
9230
9245
  functionType: {
9231
9246
  financial: string;
9232
9247
  date: string;
@@ -9227,6 +9227,21 @@ declare const _default: {
9227
9227
  required: string;
9228
9228
  optional: string;
9229
9229
  };
9230
+ error: {
9231
+ title: string;
9232
+ divByZero: string;
9233
+ name: string;
9234
+ value: string;
9235
+ num: string;
9236
+ na: string;
9237
+ cycle: string;
9238
+ ref: string;
9239
+ spill: string;
9240
+ calc: string;
9241
+ error: string;
9242
+ connect: string;
9243
+ null: string;
9244
+ };
9230
9245
  functionType: {
9231
9246
  financial: string;
9232
9247
  date: string;
@@ -39,7 +39,7 @@ export interface IDescriptionService {
39
39
  * register descriptions
40
40
  * @param functionList
41
41
  */
42
- registerDescriptions(functionList: IFunctionInfo[]): void;
42
+ registerDescriptions(functionList: IFunctionInfo[]): IDisposable;
43
43
  /**
44
44
  * unregister descriptions
45
45
  * @param functionList
@@ -75,7 +75,7 @@ export declare class DescriptionService implements IDescriptionService, IDisposa
75
75
  getSearchListByName(searchText: string): ISearchItem[];
76
76
  getSearchListByNameFirstLetter(searchText: string): ISearchItem[];
77
77
  getSearchListByType(type: number): ISearchItem[];
78
- registerDescriptions(description: IFunctionInfo[]): void;
78
+ registerDescriptions(description: IFunctionInfo[]): IDisposable;
79
79
  unregisterDescriptions(functionNames: string[]): void;
80
80
  hasDescription(name: string): boolean;
81
81
  hasDefinedNameDescription(name: string): boolean;
@@ -1,3 +1,4 @@
1
+ import { IDisposable } from '@wendellhu/redi';
1
2
  import { PrimitiveValueType } from '@univerjs/engine-formula';
2
3
  import { Disposable, ICommandService } from '@univerjs/core';
3
4
 
@@ -8,13 +9,11 @@ export interface IFormulaCustomFunctionService {
8
9
  * register descriptions
9
10
  * @param functionList
10
11
  */
11
- registerFunctions(functionList: IRegisterFunctionList): void;
12
- unregisterFunctions(functionList: string[]): void;
12
+ registerFunctions(functionList: IRegisterFunctionList): IDisposable;
13
13
  }
14
14
  export declare const IFormulaCustomFunctionService: import('@wendellhu/redi').IdentifierDecorator<IFormulaCustomFunctionService>;
15
15
  export declare class FormulaCustomFunctionService extends Disposable implements IFormulaCustomFunctionService {
16
16
  private readonly _commandService;
17
17
  constructor(_commandService: ICommandService);
18
- registerFunctions(functionList: IRegisterFunctionList): void;
19
- unregisterFunctions(functionList: string[]): void;
18
+ registerFunctions(functionList: IRegisterFunctionList): IDisposable;
20
19
  }
@@ -1,5 +1,6 @@
1
1
  import { IRegisterFunctionList, IFormulaCustomFunctionService } from './formula-custom-function.service';
2
2
  import { IDescriptionService } from './description.service';
3
+ import { IDisposable } from '@wendellhu/redi';
3
4
  import { IFunctionInfo, IFunctionService } from '@univerjs/engine-formula';
4
5
  import { ILocales, Disposable, LocaleService } from '@univerjs/core';
5
6
 
@@ -38,8 +39,7 @@ export interface IRegisterFunctionService {
38
39
  * register descriptions
39
40
  * @param functionList
40
41
  */
41
- registerFunctions(params: IRegisterFunctionParams): void;
42
- unregisterFunctions(params: IUnregisterFunctionParams): void;
42
+ registerFunctions(params: IRegisterFunctionParams): IDisposable;
43
43
  }
44
44
  export declare const IRegisterFunctionService: import('@wendellhu/redi').IdentifierDecorator<IRegisterFunctionService>;
45
45
  export declare class RegisterFunctionService extends Disposable implements IRegisterFunctionService {
@@ -48,6 +48,5 @@ export declare class RegisterFunctionService extends Disposable implements IRegi
48
48
  private readonly _formulaCustomFunctionService;
49
49
  private readonly _functionService;
50
50
  constructor(_localeService: LocaleService, _descriptionService: IDescriptionService, _formulaCustomFunctionService: IFormulaCustomFunctionService, _functionService: IFunctionService);
51
- registerFunctions(params: IRegisterFunctionParams): void;
52
- unregisterFunctions(params: IUnregisterFunctionParams): void;
51
+ registerFunctions(params: IRegisterFunctionParams): IDisposable;
53
52
  }