@univerjs/sheets-formula 0.1.0-beta.5 → 0.1.2
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/README.md +775 -2
- package/lib/cjs/index.js +21 -9
- package/lib/es/index.js +2241 -2377
- package/lib/index.css +1 -1
- package/lib/types/controllers/prompt.controller.d.ts +16 -16
- package/lib/types/locale/en-US.d.ts +42 -78
- package/lib/types/locale/function-list/information/en-US.d.ts +8 -40
- package/lib/types/locale/function-list/information/zh-CN.d.ts +8 -40
- package/lib/types/locale/function-list/lookup/en-US.d.ts +16 -24
- package/lib/types/locale/function-list/lookup/ja-JP.d.ts +16 -24
- package/lib/types/locale/function-list/lookup/zh-CN.d.ts +16 -24
- package/lib/types/locale/function-list/math/en-US.d.ts +10 -6
- package/lib/types/locale/function-list/math/ja-JP.d.ts +10 -6
- package/lib/types/locale/function-list/math/zh-CN.d.ts +10 -6
- package/lib/types/locale/function-list/statistical/en-US.d.ts +8 -8
- package/lib/types/locale/function-list/statistical/ja-JP.d.ts +8 -8
- package/lib/types/locale/function-list/statistical/zh-CN.d.ts +8 -8
- package/lib/types/locale/zh-CN.d.ts +42 -78
- package/lib/types/services/prompt.service.d.ts +61 -1
- package/lib/umd/index.js +21 -9
- package/package.json +21 -21
- 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
|
@@ -1937,11 +1937,7 @@ declare const _default: {
|
|
|
1937
1937
|
url: string;
|
|
1938
1938
|
}[];
|
|
1939
1939
|
functionParameter: {
|
|
1940
|
-
|
|
1941
|
-
name: string;
|
|
1942
|
-
detail: string;
|
|
1943
|
-
};
|
|
1944
|
-
number2: {
|
|
1940
|
+
value: {
|
|
1945
1941
|
name: string;
|
|
1946
1942
|
detail: string;
|
|
1947
1943
|
};
|
|
@@ -1955,11 +1951,7 @@ declare const _default: {
|
|
|
1955
1951
|
url: string;
|
|
1956
1952
|
}[];
|
|
1957
1953
|
functionParameter: {
|
|
1958
|
-
|
|
1959
|
-
name: string;
|
|
1960
|
-
detail: string;
|
|
1961
|
-
};
|
|
1962
|
-
number2: {
|
|
1954
|
+
value: {
|
|
1963
1955
|
name: string;
|
|
1964
1956
|
detail: string;
|
|
1965
1957
|
};
|
|
@@ -2009,11 +2001,7 @@ declare const _default: {
|
|
|
2009
2001
|
url: string;
|
|
2010
2002
|
}[];
|
|
2011
2003
|
functionParameter: {
|
|
2012
|
-
|
|
2013
|
-
name: string;
|
|
2014
|
-
detail: string;
|
|
2015
|
-
};
|
|
2016
|
-
number2: {
|
|
2004
|
+
value: {
|
|
2017
2005
|
name: string;
|
|
2018
2006
|
detail: string;
|
|
2019
2007
|
};
|
|
@@ -2027,11 +2015,7 @@ declare const _default: {
|
|
|
2027
2015
|
url: string;
|
|
2028
2016
|
}[];
|
|
2029
2017
|
functionParameter: {
|
|
2030
|
-
|
|
2031
|
-
name: string;
|
|
2032
|
-
detail: string;
|
|
2033
|
-
};
|
|
2034
|
-
number2: {
|
|
2018
|
+
value: {
|
|
2035
2019
|
name: string;
|
|
2036
2020
|
detail: string;
|
|
2037
2021
|
};
|
|
@@ -2045,11 +2029,7 @@ declare const _default: {
|
|
|
2045
2029
|
url: string;
|
|
2046
2030
|
}[];
|
|
2047
2031
|
functionParameter: {
|
|
2048
|
-
|
|
2049
|
-
name: string;
|
|
2050
|
-
detail: string;
|
|
2051
|
-
};
|
|
2052
|
-
number2: {
|
|
2032
|
+
value: {
|
|
2053
2033
|
name: string;
|
|
2054
2034
|
detail: string;
|
|
2055
2035
|
};
|
|
@@ -2063,11 +2043,7 @@ declare const _default: {
|
|
|
2063
2043
|
url: string;
|
|
2064
2044
|
}[];
|
|
2065
2045
|
functionParameter: {
|
|
2066
|
-
|
|
2067
|
-
name: string;
|
|
2068
|
-
detail: string;
|
|
2069
|
-
};
|
|
2070
|
-
number2: {
|
|
2046
|
+
value: {
|
|
2071
2047
|
name: string;
|
|
2072
2048
|
detail: string;
|
|
2073
2049
|
};
|
|
@@ -2117,11 +2093,7 @@ declare const _default: {
|
|
|
2117
2093
|
url: string;
|
|
2118
2094
|
}[];
|
|
2119
2095
|
functionParameter: {
|
|
2120
|
-
|
|
2121
|
-
name: string;
|
|
2122
|
-
detail: string;
|
|
2123
|
-
};
|
|
2124
|
-
number2: {
|
|
2096
|
+
value: {
|
|
2125
2097
|
name: string;
|
|
2126
2098
|
detail: string;
|
|
2127
2099
|
};
|
|
@@ -2135,11 +2107,7 @@ declare const _default: {
|
|
|
2135
2107
|
url: string;
|
|
2136
2108
|
}[];
|
|
2137
2109
|
functionParameter: {
|
|
2138
|
-
|
|
2139
|
-
name: string;
|
|
2140
|
-
detail: string;
|
|
2141
|
-
};
|
|
2142
|
-
number2: {
|
|
2110
|
+
value: {
|
|
2143
2111
|
name: string;
|
|
2144
2112
|
detail: string;
|
|
2145
2113
|
};
|
|
@@ -3757,11 +3725,7 @@ declare const _default: {
|
|
|
3757
3725
|
url: string;
|
|
3758
3726
|
}[];
|
|
3759
3727
|
functionParameter: {
|
|
3760
|
-
|
|
3761
|
-
name: string;
|
|
3762
|
-
detail: string;
|
|
3763
|
-
};
|
|
3764
|
-
number2: {
|
|
3728
|
+
reference: {
|
|
3765
3729
|
name: string;
|
|
3766
3730
|
detail: string;
|
|
3767
3731
|
};
|
|
@@ -3775,11 +3739,7 @@ declare const _default: {
|
|
|
3775
3739
|
url: string;
|
|
3776
3740
|
}[];
|
|
3777
3741
|
functionParameter: {
|
|
3778
|
-
|
|
3779
|
-
name: string;
|
|
3780
|
-
detail: string;
|
|
3781
|
-
};
|
|
3782
|
-
number2: {
|
|
3742
|
+
array: {
|
|
3783
3743
|
name: string;
|
|
3784
3744
|
detail: string;
|
|
3785
3745
|
};
|
|
@@ -3963,11 +3923,19 @@ declare const _default: {
|
|
|
3963
3923
|
url: string;
|
|
3964
3924
|
}[];
|
|
3965
3925
|
functionParameter: {
|
|
3966
|
-
|
|
3926
|
+
reference: {
|
|
3967
3927
|
name: string;
|
|
3968
3928
|
detail: string;
|
|
3969
3929
|
};
|
|
3970
|
-
|
|
3930
|
+
rowNum: {
|
|
3931
|
+
name: string;
|
|
3932
|
+
detail: string;
|
|
3933
|
+
};
|
|
3934
|
+
columnNum: {
|
|
3935
|
+
name: string;
|
|
3936
|
+
detail: string;
|
|
3937
|
+
};
|
|
3938
|
+
areaNum: {
|
|
3971
3939
|
name: string;
|
|
3972
3940
|
detail: string;
|
|
3973
3941
|
};
|
|
@@ -3981,11 +3949,11 @@ declare const _default: {
|
|
|
3981
3949
|
url: string;
|
|
3982
3950
|
}[];
|
|
3983
3951
|
functionParameter: {
|
|
3984
|
-
|
|
3952
|
+
refText: {
|
|
3985
3953
|
name: string;
|
|
3986
3954
|
detail: string;
|
|
3987
3955
|
};
|
|
3988
|
-
|
|
3956
|
+
a1: {
|
|
3989
3957
|
name: string;
|
|
3990
3958
|
detail: string;
|
|
3991
3959
|
};
|
|
@@ -4073,11 +4041,7 @@ declare const _default: {
|
|
|
4073
4041
|
url: string;
|
|
4074
4042
|
}[];
|
|
4075
4043
|
functionParameter: {
|
|
4076
|
-
|
|
4077
|
-
name: string;
|
|
4078
|
-
detail: string;
|
|
4079
|
-
};
|
|
4080
|
-
number2: {
|
|
4044
|
+
reference: {
|
|
4081
4045
|
name: string;
|
|
4082
4046
|
detail: string;
|
|
4083
4047
|
};
|
|
@@ -4091,11 +4055,7 @@ declare const _default: {
|
|
|
4091
4055
|
url: string;
|
|
4092
4056
|
}[];
|
|
4093
4057
|
functionParameter: {
|
|
4094
|
-
|
|
4095
|
-
name: string;
|
|
4096
|
-
detail: string;
|
|
4097
|
-
};
|
|
4098
|
-
number2: {
|
|
4058
|
+
array: {
|
|
4099
4059
|
name: string;
|
|
4100
4060
|
detail: string;
|
|
4101
4061
|
};
|
|
@@ -6085,11 +6045,11 @@ declare const _default: {
|
|
|
6085
6045
|
url: string;
|
|
6086
6046
|
}[];
|
|
6087
6047
|
functionParameter: {
|
|
6088
|
-
|
|
6048
|
+
value1: {
|
|
6089
6049
|
name: string;
|
|
6090
6050
|
detail: string;
|
|
6091
6051
|
};
|
|
6092
|
-
|
|
6052
|
+
value2: {
|
|
6093
6053
|
name: string;
|
|
6094
6054
|
detail: string;
|
|
6095
6055
|
};
|
|
@@ -6103,11 +6063,11 @@ declare const _default: {
|
|
|
6103
6063
|
url: string;
|
|
6104
6064
|
}[];
|
|
6105
6065
|
functionParameter: {
|
|
6106
|
-
|
|
6066
|
+
value1: {
|
|
6107
6067
|
name: string;
|
|
6108
6068
|
detail: string;
|
|
6109
6069
|
};
|
|
6110
|
-
|
|
6070
|
+
value2: {
|
|
6111
6071
|
name: string;
|
|
6112
6072
|
detail: string;
|
|
6113
6073
|
};
|
|
@@ -6319,11 +6279,11 @@ declare const _default: {
|
|
|
6319
6279
|
url: string;
|
|
6320
6280
|
}[];
|
|
6321
6281
|
functionParameter: {
|
|
6322
|
-
|
|
6282
|
+
value1: {
|
|
6323
6283
|
name: string;
|
|
6324
6284
|
detail: string;
|
|
6325
6285
|
};
|
|
6326
|
-
|
|
6286
|
+
value2: {
|
|
6327
6287
|
name: string;
|
|
6328
6288
|
detail: string;
|
|
6329
6289
|
};
|
|
@@ -6337,11 +6297,11 @@ declare const _default: {
|
|
|
6337
6297
|
url: string;
|
|
6338
6298
|
}[];
|
|
6339
6299
|
functionParameter: {
|
|
6340
|
-
|
|
6300
|
+
value1: {
|
|
6341
6301
|
name: string;
|
|
6342
6302
|
detail: string;
|
|
6343
6303
|
};
|
|
6344
|
-
|
|
6304
|
+
value2: {
|
|
6345
6305
|
name: string;
|
|
6346
6306
|
detail: string;
|
|
6347
6307
|
};
|
|
@@ -7149,11 +7109,11 @@ declare const _default: {
|
|
|
7149
7109
|
url: string;
|
|
7150
7110
|
}[];
|
|
7151
7111
|
functionParameter: {
|
|
7152
|
-
|
|
7112
|
+
number: {
|
|
7153
7113
|
name: string;
|
|
7154
7114
|
detail: string;
|
|
7155
7115
|
};
|
|
7156
|
-
|
|
7116
|
+
divisor: {
|
|
7157
7117
|
name: string;
|
|
7158
7118
|
detail: string;
|
|
7159
7119
|
};
|
|
@@ -7257,11 +7217,11 @@ declare const _default: {
|
|
|
7257
7217
|
url: string;
|
|
7258
7218
|
}[];
|
|
7259
7219
|
functionParameter: {
|
|
7260
|
-
|
|
7220
|
+
number: {
|
|
7261
7221
|
name: string;
|
|
7262
7222
|
detail: string;
|
|
7263
7223
|
};
|
|
7264
|
-
|
|
7224
|
+
power: {
|
|
7265
7225
|
name: string;
|
|
7266
7226
|
detail: string;
|
|
7267
7227
|
};
|
|
@@ -7617,11 +7577,15 @@ declare const _default: {
|
|
|
7617
7577
|
url: string;
|
|
7618
7578
|
}[];
|
|
7619
7579
|
functionParameter: {
|
|
7620
|
-
|
|
7580
|
+
functionNum: {
|
|
7621
7581
|
name: string;
|
|
7622
7582
|
detail: string;
|
|
7623
7583
|
};
|
|
7624
|
-
|
|
7584
|
+
ref1: {
|
|
7585
|
+
name: string;
|
|
7586
|
+
detail: string;
|
|
7587
|
+
};
|
|
7588
|
+
ref2: {
|
|
7625
7589
|
name: string;
|
|
7626
7590
|
detail: string;
|
|
7627
7591
|
};
|
|
@@ -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
|
}
|