@univerjs/sheets-formula 0.2.3 → 0.2.4-alpha.0

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 (37) hide show
  1. package/lib/cjs/index.js +4 -4
  2. package/lib/es/index.js +2021 -1950
  3. package/lib/locale/en-US.json +69 -57
  4. package/lib/locale/ru-RU.json +69 -57
  5. package/lib/locale/vi-VN.json +6 -6
  6. package/lib/locale/zh-CN.json +69 -57
  7. package/lib/locale/zh-TW.json +15 -27
  8. package/lib/types/commands/operations/__tests__/create-command-test-bed.d.ts +7 -8
  9. package/lib/types/controllers/__tests__/create-command-test-bed.d.ts +1 -2
  10. package/lib/types/controllers/formula-clipboard.controller.d.ts +1 -2
  11. package/lib/types/controllers/formula-ui.controller.d.ts +1 -2
  12. package/lib/types/controllers/menu.d.ts +1 -1
  13. package/lib/types/controllers/prompt.controller.d.ts +9 -3
  14. package/lib/types/controllers/update-formula.controller.d.ts +1 -2
  15. package/lib/types/formula-ui-plugin.d.ts +1 -2
  16. package/lib/types/locale/en-US.d.ts +39 -27
  17. package/lib/types/locale/function-list/date/en-US.d.ts +37 -25
  18. package/lib/types/locale/function-list/date/ja-JP.d.ts +37 -25
  19. package/lib/types/locale/function-list/date/zh-CN.d.ts +37 -25
  20. package/lib/types/locale/function-list/date/zh-TW.d.ts +3 -15
  21. package/lib/types/locale/function-list/math/en-US.d.ts +2 -2
  22. package/lib/types/locale/function-list/math/ja-JP.d.ts +2 -2
  23. package/lib/types/locale/function-list/math/zh-CN.d.ts +2 -2
  24. package/lib/types/locale/function-list/math/zh-TW.d.ts +2 -2
  25. package/lib/types/locale/ru-RU.d.ts +39 -27
  26. package/lib/types/locale/vi-VN.d.ts +2 -2
  27. package/lib/types/locale/zh-CN.d.ts +39 -27
  28. package/lib/types/locale/zh-TW.d.ts +5 -17
  29. package/lib/types/services/description.service.d.ts +2 -3
  30. package/lib/types/services/formula-ref-range.service.d.ts +1 -2
  31. package/lib/types/services/prompt.service.d.ts +2 -5
  32. package/lib/types/services/register-function.service.d.ts +2 -3
  33. package/lib/types/services/remote/remote-register-function.service.d.ts +1 -1
  34. package/lib/types/services/render-services/ref-selections.render-service.d.ts +3 -2
  35. package/lib/types/views/prompt/resize-scroll-observer.d.ts +18 -0
  36. package/lib/umd/index.js +4 -4
  37. package/package.json +24 -26
@@ -162,11 +162,7 @@ declare const _default: {
162
162
  url: string;
163
163
  }[];
164
164
  functionParameter: {
165
- number1: {
166
- name: string;
167
- detail: string;
168
- };
169
- number2: {
165
+ serialNumber: {
170
166
  name: string;
171
167
  detail: string;
172
168
  };
@@ -198,11 +194,7 @@ declare const _default: {
198
194
  url: string;
199
195
  }[];
200
196
  functionParameter: {
201
- number1: {
202
- name: string;
203
- detail: string;
204
- };
205
- number2: {
197
+ serialNumber: {
206
198
  name: string;
207
199
  detail: string;
208
200
  };
@@ -230,11 +222,15 @@ declare const _default: {
230
222
  url: string;
231
223
  }[];
232
224
  functionParameter: {
233
- number1: {
225
+ startDate: {
234
226
  name: string;
235
227
  detail: string;
236
228
  };
237
- number2: {
229
+ endDate: {
230
+ name: string;
231
+ detail: string;
232
+ };
233
+ holidays: {
238
234
  name: string;
239
235
  detail: string;
240
236
  };
@@ -248,11 +244,19 @@ declare const _default: {
248
244
  url: string;
249
245
  }[];
250
246
  functionParameter: {
251
- number1: {
247
+ startDate: {
252
248
  name: string;
253
249
  detail: string;
254
250
  };
255
- number2: {
251
+ endDate: {
252
+ name: string;
253
+ detail: string;
254
+ };
255
+ weekend: {
256
+ name: string;
257
+ detail: string;
258
+ };
259
+ holidays: {
256
260
  name: string;
257
261
  detail: string;
258
262
  };
@@ -275,11 +279,7 @@ declare const _default: {
275
279
  url: string;
276
280
  }[];
277
281
  functionParameter: {
278
- number1: {
279
- name: string;
280
- detail: string;
281
- };
282
- number2: {
282
+ serialNumber: {
283
283
  name: string;
284
284
  detail: string;
285
285
  };
@@ -338,11 +338,11 @@ declare const _default: {
338
338
  url: string;
339
339
  }[];
340
340
  functionParameter: {
341
- number1: {
341
+ serialNumber: {
342
342
  name: string;
343
343
  detail: string;
344
344
  };
345
- number2: {
345
+ returnType: {
346
346
  name: string;
347
347
  detail: string;
348
348
  };
@@ -374,11 +374,15 @@ declare const _default: {
374
374
  url: string;
375
375
  }[];
376
376
  functionParameter: {
377
- number1: {
377
+ startDate: {
378
378
  name: string;
379
379
  detail: string;
380
380
  };
381
- number2: {
381
+ days: {
382
+ name: string;
383
+ detail: string;
384
+ };
385
+ holidays: {
382
386
  name: string;
383
387
  detail: string;
384
388
  };
@@ -392,11 +396,19 @@ declare const _default: {
392
396
  url: string;
393
397
  }[];
394
398
  functionParameter: {
395
- number1: {
399
+ startDate: {
396
400
  name: string;
397
401
  detail: string;
398
402
  };
399
- number2: {
403
+ days: {
404
+ name: string;
405
+ detail: string;
406
+ };
407
+ weekend: {
408
+ name: string;
409
+ detail: string;
410
+ };
411
+ holidays: {
400
412
  name: string;
401
413
  detail: string;
402
414
  };
@@ -162,11 +162,7 @@ declare const _default: {
162
162
  url: string;
163
163
  }[];
164
164
  functionParameter: {
165
- number1: {
166
- name: string;
167
- detail: string;
168
- };
169
- number2: {
165
+ serialNumber: {
170
166
  name: string;
171
167
  detail: string;
172
168
  };
@@ -198,11 +194,7 @@ declare const _default: {
198
194
  url: string;
199
195
  }[];
200
196
  functionParameter: {
201
- number1: {
202
- name: string;
203
- detail: string;
204
- };
205
- number2: {
197
+ serialNumber: {
206
198
  name: string;
207
199
  detail: string;
208
200
  };
@@ -275,11 +267,7 @@ declare const _default: {
275
267
  url: string;
276
268
  }[];
277
269
  functionParameter: {
278
- number1: {
279
- name: string;
280
- detail: string;
281
- };
282
- number2: {
270
+ serialNumber: {
283
271
  name: string;
284
272
  detail: string;
285
273
  };
@@ -1310,11 +1310,11 @@ declare const _default: {
1310
1310
  url: string;
1311
1311
  }[];
1312
1312
  functionParameter: {
1313
- number1: {
1313
+ array1: {
1314
1314
  name: string;
1315
1315
  detail: string;
1316
1316
  };
1317
- number2: {
1317
+ array2: {
1318
1318
  name: string;
1319
1319
  detail: string;
1320
1320
  };
@@ -1310,11 +1310,11 @@ declare const _default: {
1310
1310
  url: string;
1311
1311
  }[];
1312
1312
  functionParameter: {
1313
- number1: {
1313
+ array1: {
1314
1314
  name: string;
1315
1315
  detail: string;
1316
1316
  };
1317
- number2: {
1317
+ array2: {
1318
1318
  name: string;
1319
1319
  detail: string;
1320
1320
  };
@@ -1310,11 +1310,11 @@ declare const _default: {
1310
1310
  url: string;
1311
1311
  }[];
1312
1312
  functionParameter: {
1313
- number1: {
1313
+ array1: {
1314
1314
  name: string;
1315
1315
  detail: string;
1316
1316
  };
1317
- number2: {
1317
+ array2: {
1318
1318
  name: string;
1319
1319
  detail: string;
1320
1320
  };
@@ -1358,11 +1358,11 @@ declare const _default: {
1358
1358
  url: string;
1359
1359
  }[];
1360
1360
  functionParameter: {
1361
- number1: {
1361
+ array1: {
1362
1362
  name: string;
1363
1363
  detail: string;
1364
1364
  };
1365
- number2: {
1365
+ array2: {
1366
1366
  name: string;
1367
1367
  detail: string;
1368
1368
  };
@@ -7649,11 +7649,11 @@ declare const _default: {
7649
7649
  url: string;
7650
7650
  }[];
7651
7651
  functionParameter: {
7652
- number1: {
7652
+ array1: {
7653
7653
  name: string;
7654
7654
  detail: string;
7655
7655
  };
7656
- number2: {
7656
+ array2: {
7657
7657
  name: string;
7658
7658
  detail: string;
7659
7659
  };
@@ -7925,11 +7925,7 @@ declare const _default: {
7925
7925
  url: string;
7926
7926
  }[];
7927
7927
  functionParameter: {
7928
- number1: {
7929
- name: string;
7930
- detail: string;
7931
- };
7932
- number2: {
7928
+ serialNumber: {
7933
7929
  name: string;
7934
7930
  detail: string;
7935
7931
  };
@@ -7961,11 +7957,7 @@ declare const _default: {
7961
7957
  url: string;
7962
7958
  }[];
7963
7959
  functionParameter: {
7964
- number1: {
7965
- name: string;
7966
- detail: string;
7967
- };
7968
- number2: {
7960
+ serialNumber: {
7969
7961
  name: string;
7970
7962
  detail: string;
7971
7963
  };
@@ -7993,11 +7985,15 @@ declare const _default: {
7993
7985
  url: string;
7994
7986
  }[];
7995
7987
  functionParameter: {
7996
- number1: {
7988
+ startDate: {
7997
7989
  name: string;
7998
7990
  detail: string;
7999
7991
  };
8000
- number2: {
7992
+ endDate: {
7993
+ name: string;
7994
+ detail: string;
7995
+ };
7996
+ holidays: {
8001
7997
  name: string;
8002
7998
  detail: string;
8003
7999
  };
@@ -8011,11 +8007,19 @@ declare const _default: {
8011
8007
  url: string;
8012
8008
  }[];
8013
8009
  functionParameter: {
8014
- number1: {
8010
+ startDate: {
8015
8011
  name: string;
8016
8012
  detail: string;
8017
8013
  };
8018
- number2: {
8014
+ endDate: {
8015
+ name: string;
8016
+ detail: string;
8017
+ };
8018
+ weekend: {
8019
+ name: string;
8020
+ detail: string;
8021
+ };
8022
+ holidays: {
8019
8023
  name: string;
8020
8024
  detail: string;
8021
8025
  };
@@ -8038,11 +8042,7 @@ declare const _default: {
8038
8042
  url: string;
8039
8043
  }[];
8040
8044
  functionParameter: {
8041
- number1: {
8042
- name: string;
8043
- detail: string;
8044
- };
8045
- number2: {
8045
+ serialNumber: {
8046
8046
  name: string;
8047
8047
  detail: string;
8048
8048
  };
@@ -8101,11 +8101,11 @@ declare const _default: {
8101
8101
  url: string;
8102
8102
  }[];
8103
8103
  functionParameter: {
8104
- number1: {
8104
+ serialNumber: {
8105
8105
  name: string;
8106
8106
  detail: string;
8107
8107
  };
8108
- number2: {
8108
+ returnType: {
8109
8109
  name: string;
8110
8110
  detail: string;
8111
8111
  };
@@ -8137,11 +8137,15 @@ declare const _default: {
8137
8137
  url: string;
8138
8138
  }[];
8139
8139
  functionParameter: {
8140
- number1: {
8140
+ startDate: {
8141
8141
  name: string;
8142
8142
  detail: string;
8143
8143
  };
8144
- number2: {
8144
+ days: {
8145
+ name: string;
8146
+ detail: string;
8147
+ };
8148
+ holidays: {
8145
8149
  name: string;
8146
8150
  detail: string;
8147
8151
  };
@@ -8155,11 +8159,19 @@ declare const _default: {
8155
8159
  url: string;
8156
8160
  }[];
8157
8161
  functionParameter: {
8158
- number1: {
8162
+ startDate: {
8159
8163
  name: string;
8160
8164
  detail: string;
8161
8165
  };
8162
- number2: {
8166
+ days: {
8167
+ name: string;
8168
+ detail: string;
8169
+ };
8170
+ weekend: {
8171
+ name: string;
8172
+ detail: string;
8173
+ };
8174
+ holidays: {
8163
8175
  name: string;
8164
8176
  detail: string;
8165
8177
  };
@@ -5217,11 +5217,11 @@ declare const _default: {
5217
5217
  url: string;
5218
5218
  }[];
5219
5219
  functionParameter: {
5220
- number1: {
5220
+ array1: {
5221
5221
  name: string;
5222
5222
  detail: string;
5223
5223
  };
5224
- number2: {
5224
+ array2: {
5225
5225
  name: string;
5226
5226
  detail: string;
5227
5227
  };
@@ -7649,11 +7649,11 @@ declare const _default: {
7649
7649
  url: string;
7650
7650
  }[];
7651
7651
  functionParameter: {
7652
- number1: {
7652
+ array1: {
7653
7653
  name: string;
7654
7654
  detail: string;
7655
7655
  };
7656
- number2: {
7656
+ array2: {
7657
7657
  name: string;
7658
7658
  detail: string;
7659
7659
  };
@@ -7925,11 +7925,7 @@ declare const _default: {
7925
7925
  url: string;
7926
7926
  }[];
7927
7927
  functionParameter: {
7928
- number1: {
7929
- name: string;
7930
- detail: string;
7931
- };
7932
- number2: {
7928
+ serialNumber: {
7933
7929
  name: string;
7934
7930
  detail: string;
7935
7931
  };
@@ -7961,11 +7957,7 @@ declare const _default: {
7961
7957
  url: string;
7962
7958
  }[];
7963
7959
  functionParameter: {
7964
- number1: {
7965
- name: string;
7966
- detail: string;
7967
- };
7968
- number2: {
7960
+ serialNumber: {
7969
7961
  name: string;
7970
7962
  detail: string;
7971
7963
  };
@@ -7993,11 +7985,15 @@ declare const _default: {
7993
7985
  url: string;
7994
7986
  }[];
7995
7987
  functionParameter: {
7996
- number1: {
7988
+ startDate: {
7997
7989
  name: string;
7998
7990
  detail: string;
7999
7991
  };
8000
- number2: {
7992
+ endDate: {
7993
+ name: string;
7994
+ detail: string;
7995
+ };
7996
+ holidays: {
8001
7997
  name: string;
8002
7998
  detail: string;
8003
7999
  };
@@ -8011,11 +8007,19 @@ declare const _default: {
8011
8007
  url: string;
8012
8008
  }[];
8013
8009
  functionParameter: {
8014
- number1: {
8010
+ startDate: {
8015
8011
  name: string;
8016
8012
  detail: string;
8017
8013
  };
8018
- number2: {
8014
+ endDate: {
8015
+ name: string;
8016
+ detail: string;
8017
+ };
8018
+ weekend: {
8019
+ name: string;
8020
+ detail: string;
8021
+ };
8022
+ holidays: {
8019
8023
  name: string;
8020
8024
  detail: string;
8021
8025
  };
@@ -8038,11 +8042,7 @@ declare const _default: {
8038
8042
  url: string;
8039
8043
  }[];
8040
8044
  functionParameter: {
8041
- number1: {
8042
- name: string;
8043
- detail: string;
8044
- };
8045
- number2: {
8045
+ serialNumber: {
8046
8046
  name: string;
8047
8047
  detail: string;
8048
8048
  };
@@ -8101,11 +8101,11 @@ declare const _default: {
8101
8101
  url: string;
8102
8102
  }[];
8103
8103
  functionParameter: {
8104
- number1: {
8104
+ serialNumber: {
8105
8105
  name: string;
8106
8106
  detail: string;
8107
8107
  };
8108
- number2: {
8108
+ returnType: {
8109
8109
  name: string;
8110
8110
  detail: string;
8111
8111
  };
@@ -8137,11 +8137,15 @@ declare const _default: {
8137
8137
  url: string;
8138
8138
  }[];
8139
8139
  functionParameter: {
8140
- number1: {
8140
+ startDate: {
8141
8141
  name: string;
8142
8142
  detail: string;
8143
8143
  };
8144
- number2: {
8144
+ days: {
8145
+ name: string;
8146
+ detail: string;
8147
+ };
8148
+ holidays: {
8145
8149
  name: string;
8146
8150
  detail: string;
8147
8151
  };
@@ -8155,11 +8159,19 @@ declare const _default: {
8155
8159
  url: string;
8156
8160
  }[];
8157
8161
  functionParameter: {
8158
- number1: {
8162
+ startDate: {
8159
8163
  name: string;
8160
8164
  detail: string;
8161
8165
  };
8162
- number2: {
8166
+ days: {
8167
+ name: string;
8168
+ detail: string;
8169
+ };
8170
+ weekend: {
8171
+ name: string;
8172
+ detail: string;
8173
+ };
8174
+ holidays: {
8163
8175
  name: string;
8164
8176
  detail: string;
8165
8177
  };
@@ -7697,11 +7697,11 @@ declare const _default: {
7697
7697
  url: string;
7698
7698
  }[];
7699
7699
  functionParameter: {
7700
- number1: {
7700
+ array1: {
7701
7701
  name: string;
7702
7702
  detail: string;
7703
7703
  };
7704
- number2: {
7704
+ array2: {
7705
7705
  name: string;
7706
7706
  detail: string;
7707
7707
  };
@@ -7981,11 +7981,7 @@ declare const _default: {
7981
7981
  url: string;
7982
7982
  }[];
7983
7983
  functionParameter: {
7984
- number1: {
7985
- name: string;
7986
- detail: string;
7987
- };
7988
- number2: {
7984
+ serialNumber: {
7989
7985
  name: string;
7990
7986
  detail: string;
7991
7987
  };
@@ -8017,11 +8013,7 @@ declare const _default: {
8017
8013
  url: string;
8018
8014
  }[];
8019
8015
  functionParameter: {
8020
- number1: {
8021
- name: string;
8022
- detail: string;
8023
- };
8024
- number2: {
8016
+ serialNumber: {
8025
8017
  name: string;
8026
8018
  detail: string;
8027
8019
  };
@@ -8094,11 +8086,7 @@ declare const _default: {
8094
8086
  url: string;
8095
8087
  }[];
8096
8088
  functionParameter: {
8097
- number1: {
8098
- name: string;
8099
- detail: string;
8100
- };
8101
- number2: {
8089
+ serialNumber: {
8102
8090
  name: string;
8103
8091
  detail: string;
8104
8092
  };
@@ -1,6 +1,5 @@
1
- import { LocaleService } from '@univerjs/core';
1
+ import { LocaleService, IDisposable } from '@univerjs/core';
2
2
  import { IFunctionInfo, IFunctionNames, IFunctionService } from '@univerjs/engine-formula';
3
- import { IDisposable } from '@wendellhu/redi';
4
3
 
5
4
  export interface ISearchItem {
6
5
  name: string;
@@ -61,7 +60,7 @@ export interface IDescriptionService {
61
60
  */
62
61
  isFormulaDefinedName(name: string): boolean;
63
62
  }
64
- export declare const IDescriptionService: import('@wendellhu/redi').IdentifierDecorator<IDescriptionService>;
63
+ export declare const IDescriptionService: import('@univerjs/core').IdentifierDecorator<IDescriptionService>;
65
64
  export declare class DescriptionService implements IDescriptionService, IDisposable {
66
65
  private _description;
67
66
  private readonly _functionService;
@@ -1,7 +1,6 @@
1
- import { IMutationInfo, Disposable, IUniverInstanceService } from '@univerjs/core';
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
- import { IDisposable } from '@wendellhu/redi';
5
4
 
6
5
  export type FormulaChangeMap = Record<string, Record<string, Record<string, string>>>;
7
6
  export type FormulaChangeCallback = (formulaString: string) => {
@@ -1,6 +1,5 @@
1
- import { Direction } from '@univerjs/core';
1
+ import { Direction, IDisposable } from '@univerjs/core';
2
2
  import { IFunctionInfo, ISequenceNode } from '@univerjs/engine-formula';
3
- import { IDisposable } from '@wendellhu/redi';
4
3
  import { Observable } from 'rxjs';
5
4
  import { ISearchItem } from './description.service';
6
5
 
@@ -95,7 +94,7 @@ export interface IFormulaPromptService {
95
94
  disableLockedSelectionInsert(): void;
96
95
  isLockedSelectionInsert(): boolean;
97
96
  }
98
- export declare const IFormulaPromptService: import('@wendellhu/redi').IdentifierDecorator<FormulaPromptService>;
97
+ export declare const IFormulaPromptService: import('@univerjs/core').IdentifierDecorator<FormulaPromptService>;
99
98
  export declare class FormulaPromptService implements IFormulaPromptService, IDisposable {
100
99
  private readonly _search$;
101
100
  private readonly _help$;
@@ -109,9 +108,7 @@ export declare class FormulaPromptService implements IFormulaPromptService, IDis
109
108
  readonly acceptFormulaName$: Observable<string>;
110
109
  private _searching;
111
110
  private _helping;
112
- private _isInsertRefString;
113
111
  private _sequenceNodes;
114
- private _isSelectionMoving;
115
112
  private _isLockedOnSelectionChangeRefString;
116
113
  private _isLockedOnSelectionInsertRefString;
117
114
  dispose(): void;
@@ -1,6 +1,5 @@
1
- import { ILocales, Disposable, LocaleService } from '@univerjs/core';
1
+ import { IDisposable, ILocales, Disposable, LocaleService } from '@univerjs/core';
2
2
  import { IFunctionInfo, PrimitiveValueType, IFunctionService } from '@univerjs/engine-formula';
3
- import { IDisposable } from '@wendellhu/redi';
4
3
  import { IDescriptionService } from './description.service';
5
4
  import { IRemoteRegisterFunctionService } from './remote/remote-register-function.service';
6
5
 
@@ -53,7 +52,7 @@ export interface IRegisterFunctionService {
53
52
  */
54
53
  registerFunctions(params: IRegisterFunctionParams): IDisposable;
55
54
  }
56
- export declare const IRegisterFunctionService: import('@wendellhu/redi').IdentifierDecorator<IRegisterFunctionService>;
55
+ export declare const IRegisterFunctionService: import('@univerjs/core').IdentifierDecorator<IRegisterFunctionService>;
57
56
  export declare class RegisterFunctionService extends Disposable implements IRegisterFunctionService {
58
57
  private readonly _localeService;
59
58
  private readonly _descriptionService;
@@ -5,7 +5,7 @@ export interface IRemoteRegisterFunctionService {
5
5
  unregisterFunctions(names: string[]): Promise<void>;
6
6
  }
7
7
  export declare const RemoteRegisterFunctionServiceName = "sheets-formula.remote-register-function.service";
8
- export declare const IRemoteRegisterFunctionService: import('@wendellhu/redi').IdentifierDecorator<IRemoteRegisterFunctionService>;
8
+ export declare const IRemoteRegisterFunctionService: import('@univerjs/core').IdentifierDecorator<IRemoteRegisterFunctionService>;
9
9
  /**
10
10
  * This class should resident in the remote process.
11
11
  */