@univerjs/sheets-formula 0.1.0-beta.4 → 0.1.1
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.
- package/lib/cjs/index.js +23 -7
- package/lib/es/index.js +2686 -2627
- package/lib/index.css +1 -1
- package/lib/types/commands/operations/insert-function.operation.d.ts +1 -1
- package/lib/types/controllers/array-formula-display.controller.d.ts +3 -2
- package/lib/types/controllers/numfmt-formula-display.controller.d.ts +28 -0
- package/lib/types/controllers/prompt.controller.d.ts +15 -15
- package/lib/types/controllers/trigger-calculation.controller.d.ts +5 -1
- package/lib/types/controllers/update-formula.controller.d.ts +0 -1
- package/lib/types/locale/en-US.d.ts +28 -33
- package/lib/types/locale/function-list/date/en-US.d.ts +12 -29
- package/lib/types/locale/function-list/date/ja-JP.d.ts +12 -29
- package/lib/types/locale/function-list/date/zh-CN.d.ts +12 -29
- package/lib/types/locale/function-list/lookup/en-US.d.ts +16 -4
- package/lib/types/locale/function-list/lookup/ja-JP.d.ts +16 -4
- package/lib/types/locale/function-list/lookup/zh-CN.d.ts +16 -4
- package/lib/types/locale/zh-CN.d.ts +28 -33
- package/lib/types/services/function-list/array.d.ts +1 -1
- package/lib/types/services/prompt.service.d.ts +61 -1
- package/lib/umd/index.js +22 -6
- package/package.json +38 -24
- package/lib/types/controllers/formula-input.controller.d.ts +0 -41
- package/lib/types/services/formula-input.service.d.ts +0 -106
- package/lib/types/views/prompt/error-function/error-function.d.ts +0 -17
|
@@ -388,11 +388,15 @@ declare const _default: {
|
|
|
388
388
|
url: string;
|
|
389
389
|
}[];
|
|
390
390
|
functionParameter: {
|
|
391
|
-
|
|
391
|
+
lookupValue: {
|
|
392
392
|
name: string;
|
|
393
393
|
detail: string;
|
|
394
394
|
};
|
|
395
|
-
|
|
395
|
+
lookupArray: {
|
|
396
|
+
name: string;
|
|
397
|
+
detail: string;
|
|
398
|
+
};
|
|
399
|
+
matchType: {
|
|
396
400
|
name: string;
|
|
397
401
|
detail: string;
|
|
398
402
|
};
|
|
@@ -730,11 +734,19 @@ declare const _default: {
|
|
|
730
734
|
url: string;
|
|
731
735
|
}[];
|
|
732
736
|
functionParameter: {
|
|
733
|
-
|
|
737
|
+
lookupValue: {
|
|
734
738
|
name: string;
|
|
735
739
|
detail: string;
|
|
736
740
|
};
|
|
737
|
-
|
|
741
|
+
lookupArray: {
|
|
742
|
+
name: string;
|
|
743
|
+
detail: string;
|
|
744
|
+
};
|
|
745
|
+
matchMode: {
|
|
746
|
+
name: string;
|
|
747
|
+
detail: string;
|
|
748
|
+
};
|
|
749
|
+
searchMode: {
|
|
738
750
|
name: string;
|
|
739
751
|
detail: string;
|
|
740
752
|
};
|
|
@@ -388,11 +388,15 @@ declare const _default: {
|
|
|
388
388
|
url: string;
|
|
389
389
|
}[];
|
|
390
390
|
functionParameter: {
|
|
391
|
-
|
|
391
|
+
lookupValue: {
|
|
392
392
|
name: string;
|
|
393
393
|
detail: string;
|
|
394
394
|
};
|
|
395
|
-
|
|
395
|
+
lookupArray: {
|
|
396
|
+
name: string;
|
|
397
|
+
detail: string;
|
|
398
|
+
};
|
|
399
|
+
matchType: {
|
|
396
400
|
name: string;
|
|
397
401
|
detail: string;
|
|
398
402
|
};
|
|
@@ -730,11 +734,19 @@ declare const _default: {
|
|
|
730
734
|
url: string;
|
|
731
735
|
}[];
|
|
732
736
|
functionParameter: {
|
|
733
|
-
|
|
737
|
+
lookupValue: {
|
|
734
738
|
name: string;
|
|
735
739
|
detail: string;
|
|
736
740
|
};
|
|
737
|
-
|
|
741
|
+
lookupArray: {
|
|
742
|
+
name: string;
|
|
743
|
+
detail: string;
|
|
744
|
+
};
|
|
745
|
+
matchMode: {
|
|
746
|
+
name: string;
|
|
747
|
+
detail: string;
|
|
748
|
+
};
|
|
749
|
+
searchMode: {
|
|
738
750
|
name: string;
|
|
739
751
|
detail: string;
|
|
740
752
|
};
|
|
@@ -4021,11 +4021,15 @@ declare const _default: {
|
|
|
4021
4021
|
url: string;
|
|
4022
4022
|
}[];
|
|
4023
4023
|
functionParameter: {
|
|
4024
|
-
|
|
4024
|
+
lookupValue: {
|
|
4025
4025
|
name: string;
|
|
4026
4026
|
detail: string;
|
|
4027
4027
|
};
|
|
4028
|
-
|
|
4028
|
+
lookupArray: {
|
|
4029
|
+
name: string;
|
|
4030
|
+
detail: string;
|
|
4031
|
+
};
|
|
4032
|
+
matchType: {
|
|
4029
4033
|
name: string;
|
|
4030
4034
|
detail: string;
|
|
4031
4035
|
};
|
|
@@ -4363,11 +4367,19 @@ declare const _default: {
|
|
|
4363
4367
|
url: string;
|
|
4364
4368
|
}[];
|
|
4365
4369
|
functionParameter: {
|
|
4366
|
-
|
|
4370
|
+
lookupValue: {
|
|
4367
4371
|
name: string;
|
|
4368
4372
|
detail: string;
|
|
4369
4373
|
};
|
|
4370
|
-
|
|
4374
|
+
lookupArray: {
|
|
4375
|
+
name: string;
|
|
4376
|
+
detail: string;
|
|
4377
|
+
};
|
|
4378
|
+
matchMode: {
|
|
4379
|
+
name: string;
|
|
4380
|
+
detail: string;
|
|
4381
|
+
};
|
|
4382
|
+
searchMode: {
|
|
4371
4383
|
name: string;
|
|
4372
4384
|
detail: string;
|
|
4373
4385
|
};
|
|
@@ -7837,11 +7849,15 @@ declare const _default: {
|
|
|
7837
7849
|
url: string;
|
|
7838
7850
|
}[];
|
|
7839
7851
|
functionParameter: {
|
|
7840
|
-
|
|
7852
|
+
year: {
|
|
7841
7853
|
name: string;
|
|
7842
7854
|
detail: string;
|
|
7843
7855
|
};
|
|
7844
|
-
|
|
7856
|
+
month: {
|
|
7857
|
+
name: string;
|
|
7858
|
+
detail: string;
|
|
7859
|
+
};
|
|
7860
|
+
day: {
|
|
7845
7861
|
name: string;
|
|
7846
7862
|
detail: string;
|
|
7847
7863
|
};
|
|
@@ -7891,11 +7907,7 @@ declare const _default: {
|
|
|
7891
7907
|
url: string;
|
|
7892
7908
|
}[];
|
|
7893
7909
|
functionParameter: {
|
|
7894
|
-
|
|
7895
|
-
name: string;
|
|
7896
|
-
detail: string;
|
|
7897
|
-
};
|
|
7898
|
-
number2: {
|
|
7910
|
+
serialNumber: {
|
|
7899
7911
|
name: string;
|
|
7900
7912
|
detail: string;
|
|
7901
7913
|
};
|
|
@@ -7945,11 +7957,11 @@ declare const _default: {
|
|
|
7945
7957
|
url: string;
|
|
7946
7958
|
}[];
|
|
7947
7959
|
functionParameter: {
|
|
7948
|
-
|
|
7960
|
+
startDate: {
|
|
7949
7961
|
name: string;
|
|
7950
7962
|
detail: string;
|
|
7951
7963
|
};
|
|
7952
|
-
|
|
7964
|
+
months: {
|
|
7953
7965
|
name: string;
|
|
7954
7966
|
detail: string;
|
|
7955
7967
|
};
|
|
@@ -8035,11 +8047,7 @@ declare const _default: {
|
|
|
8035
8047
|
url: string;
|
|
8036
8048
|
}[];
|
|
8037
8049
|
functionParameter: {
|
|
8038
|
-
|
|
8039
|
-
name: string;
|
|
8040
|
-
detail: string;
|
|
8041
|
-
};
|
|
8042
|
-
number2: {
|
|
8050
|
+
serialNumber: {
|
|
8043
8051
|
name: string;
|
|
8044
8052
|
detail: string;
|
|
8045
8053
|
};
|
|
@@ -8160,16 +8168,7 @@ declare const _default: {
|
|
|
8160
8168
|
title: string;
|
|
8161
8169
|
url: string;
|
|
8162
8170
|
}[];
|
|
8163
|
-
functionParameter: {
|
|
8164
|
-
number1: {
|
|
8165
|
-
name: string;
|
|
8166
|
-
detail: string;
|
|
8167
|
-
};
|
|
8168
|
-
number2: {
|
|
8169
|
-
name: string;
|
|
8170
|
-
detail: string;
|
|
8171
|
-
};
|
|
8172
|
-
};
|
|
8171
|
+
functionParameter: {};
|
|
8173
8172
|
};
|
|
8174
8173
|
WEEKDAY: {
|
|
8175
8174
|
description: string;
|
|
@@ -8251,11 +8250,7 @@ declare const _default: {
|
|
|
8251
8250
|
url: string;
|
|
8252
8251
|
}[];
|
|
8253
8252
|
functionParameter: {
|
|
8254
|
-
|
|
8255
|
-
name: string;
|
|
8256
|
-
detail: string;
|
|
8257
|
-
};
|
|
8258
|
-
number2: {
|
|
8253
|
+
serialNumber: {
|
|
8259
8254
|
name: string;
|
|
8260
8255
|
detail: string;
|
|
8261
8256
|
};
|
|
@@ -13,5 +13,5 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import {
|
|
16
|
+
import type { IFunctionInfo } from '@univerjs/engine-formula';
|
|
17
17
|
export declare const FUNCTION_LIST_ARRAY: IFunctionInfo[];
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import type { Direction } from '@univerjs/core';
|
|
17
|
-
import type
|
|
17
|
+
import { type IFunctionInfo, type ISequenceNode } from '@univerjs/engine-formula';
|
|
18
18
|
import type { IDisposable } from '@wendellhu/redi';
|
|
19
19
|
import type { Observable } from 'rxjs';
|
|
20
20
|
import type { ISearchItem } from './description.service';
|
|
@@ -93,6 +93,24 @@ export interface IFormulaPromptService {
|
|
|
93
93
|
isSearching(): boolean;
|
|
94
94
|
isHelping(): boolean;
|
|
95
95
|
dispose(): void;
|
|
96
|
+
getSequenceNodes(): Array<string | ISequenceNode>;
|
|
97
|
+
setSequenceNodes(nodes: Array<string | ISequenceNode>): void;
|
|
98
|
+
clearSequenceNodes(): void;
|
|
99
|
+
getCurrentSequenceNodeIndex(strIndex: number): number;
|
|
100
|
+
getCurrentSequenceNodeByIndex(nodeIndex: number): string | ISequenceNode;
|
|
101
|
+
getCurrentSequenceNode(strIndex: number): string | ISequenceNode;
|
|
102
|
+
updateSequenceRef(nodeIndex: number, refString: string): void;
|
|
103
|
+
insertSequenceRef(index: number, refString: string): void;
|
|
104
|
+
insertSequenceString(index: number, content: string): void;
|
|
105
|
+
enableSelectionMoving(): void;
|
|
106
|
+
disableSelectionMoving(): void;
|
|
107
|
+
isSelectionMoving(): boolean;
|
|
108
|
+
enableLockedSelectionChange(): void;
|
|
109
|
+
disableLockedSelectionChange(): void;
|
|
110
|
+
isLockedSelectionChange(): boolean;
|
|
111
|
+
enableLockedSelectionInsert(): void;
|
|
112
|
+
disableLockedSelectionInsert(): void;
|
|
113
|
+
isLockedSelectionInsert(): boolean;
|
|
96
114
|
}
|
|
97
115
|
export declare const IFormulaPromptService: import("@wendellhu/redi").IdentifierDecorator<FormulaPromptService>;
|
|
98
116
|
export declare class FormulaPromptService implements IFormulaPromptService, IDisposable {
|
|
@@ -109,6 +127,10 @@ export declare class FormulaPromptService implements IFormulaPromptService, IDis
|
|
|
109
127
|
private _searching;
|
|
110
128
|
private _helping;
|
|
111
129
|
private _isInsertRefString;
|
|
130
|
+
private _sequenceNodes;
|
|
131
|
+
private _isSelectionMoving;
|
|
132
|
+
private _isLockedOnSelectionChangeRefString;
|
|
133
|
+
private _isLockedOnSelectionInsertRefString;
|
|
112
134
|
dispose(): void;
|
|
113
135
|
search(param: ISearchFunctionOperationParams): void;
|
|
114
136
|
isSearching(): boolean;
|
|
@@ -117,4 +139,42 @@ export declare class FormulaPromptService implements IFormulaPromptService, IDis
|
|
|
117
139
|
navigate(param: INavigateParam): void;
|
|
118
140
|
accept(param: boolean): void;
|
|
119
141
|
acceptFormulaName(param: string): void;
|
|
142
|
+
getSequenceNodes(): (string | ISequenceNode)[];
|
|
143
|
+
setSequenceNodes(nodes: Array<string | ISequenceNode>): void;
|
|
144
|
+
clearSequenceNodes(): void;
|
|
145
|
+
getCurrentSequenceNode(strIndex: number): string | ISequenceNode;
|
|
146
|
+
getCurrentSequenceNodeByIndex(nodeIndex: number): string | ISequenceNode;
|
|
147
|
+
/**
|
|
148
|
+
* Query the text coordinates in the sequenceNodes and determine the actual insertion index.
|
|
149
|
+
* @param strIndex
|
|
150
|
+
*/
|
|
151
|
+
getCurrentSequenceNodeIndex(strIndex: number): number;
|
|
152
|
+
/**
|
|
153
|
+
* Synchronize the reference text based on the changes of the selection.
|
|
154
|
+
* @param nodeIndex
|
|
155
|
+
* @param refString
|
|
156
|
+
*/
|
|
157
|
+
updateSequenceRef(nodeIndex: number, refString: string): void;
|
|
158
|
+
/**
|
|
159
|
+
* When the cursor is on the right side of a formula token,
|
|
160
|
+
* you can add reference text to the formula by drawing a selection.
|
|
161
|
+
* @param index
|
|
162
|
+
* @param refString
|
|
163
|
+
*/
|
|
164
|
+
insertSequenceRef(index: number, refString: string): void;
|
|
165
|
+
/**
|
|
166
|
+
* Insert a string at the cursor position in the text corresponding to the sequenceNodes.
|
|
167
|
+
* @param index
|
|
168
|
+
* @param content
|
|
169
|
+
*/
|
|
170
|
+
insertSequenceString(index: number, content: string): void;
|
|
171
|
+
enableSelectionMoving(): void;
|
|
172
|
+
disableSelectionMoving(): void;
|
|
173
|
+
isSelectionMoving(): boolean;
|
|
174
|
+
enableLockedSelectionChange(): void;
|
|
175
|
+
disableLockedSelectionChange(): void;
|
|
176
|
+
isLockedSelectionChange(): boolean;
|
|
177
|
+
enableLockedSelectionInsert(): void;
|
|
178
|
+
disableLockedSelectionInsert(): void;
|
|
179
|
+
isLockedSelectionInsert(): boolean;
|
|
120
180
|
}
|