@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.
@@ -388,11 +388,15 @@ declare const _default: {
388
388
  url: string;
389
389
  }[];
390
390
  functionParameter: {
391
- number1: {
391
+ lookupValue: {
392
392
  name: string;
393
393
  detail: string;
394
394
  };
395
- number2: {
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
- number1: {
737
+ lookupValue: {
734
738
  name: string;
735
739
  detail: string;
736
740
  };
737
- number2: {
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
- number1: {
391
+ lookupValue: {
392
392
  name: string;
393
393
  detail: string;
394
394
  };
395
- number2: {
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
- number1: {
737
+ lookupValue: {
734
738
  name: string;
735
739
  detail: string;
736
740
  };
737
- number2: {
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
- number1: {
4024
+ lookupValue: {
4025
4025
  name: string;
4026
4026
  detail: string;
4027
4027
  };
4028
- number2: {
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
- number1: {
4370
+ lookupValue: {
4367
4371
  name: string;
4368
4372
  detail: string;
4369
4373
  };
4370
- number2: {
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
- number1: {
7852
+ year: {
7841
7853
  name: string;
7842
7854
  detail: string;
7843
7855
  };
7844
- number2: {
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
- number1: {
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
- number1: {
7960
+ startDate: {
7949
7961
  name: string;
7950
7962
  detail: string;
7951
7963
  };
7952
- number2: {
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
- number1: {
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
- number1: {
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 { type IFunctionInfo } from '@univerjs/engine-formula';
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 { IFunctionInfo } from '@univerjs/engine-formula';
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
  }