-
Notifications
You must be signed in to change notification settings - Fork 155
/
Copy pathinterface.ts
1182 lines (1079 loc) · 32.1 KB
/
interface.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
import { CellStyleModel, ConditionalFormatModel, DefineNameModel, HyperlinkModel, SortCollectionModel } from './class-model';
import { SaveType, SortOrder, FormatType, BorderType, ModelType, MergeType, ClearType, DataBar, ColorScale, IconSet } from './index';
import { Sheet, RangeModel, CellModel, SheetModel, ColumnModel, RowModel, UsedRangeModel, TopBottom, HighlightCell } from '../index';
import { CFColor, Workbook, PdfPageOrientation } from '../index';
import { DataManager, Predicate } from '@syncfusion/ej2-data';
import { Internationalization } from '@syncfusion/ej2-base';
import { PrintType } from '../../spreadsheet';
/**
* Represents the options used to save a document.
* These options include the file name, file type, and the URL for the save action.
*/
export interface SaveOptions {
/**
* Specify the URL where the document will be sent for saving.
*/
url?: string;
/**
* The name of the file to be saved. This name will be used as the default file name
* when the document is downloaded.
*/
fileName?: string;
/**
* The type of the file to be saved. By default, the file will be saved in Excel format.
*
* Supported file types might include formats such as Excel, CSV, or PDF.
*/
saveType?: SaveType;
/**
* The layout settings to use when saving a document as a PDF.
* These settings can control aspects like page orientation (portrait or landscape)
* or fit-to-one-page functionality.
*/
pdfLayoutSettings?: pdfLayoutSettings;
}
/**
* Represents the options available for printing functionality in the spreadsheet.
* These options allow you to customize the print settings, such as selecting specific sheets
* or including headers and gridlines.
*/
export interface PrintOptions {
/**
* Determines what part of the spreadsheet should be printed.
*
* Values:
* - **"Worksheet"**: Prints only the active worksheet.
* - **"Workbook"**: Prints the entire workbook (all sheets).
*
*/
type?: PrintType;
/**
* Specifies whether to include row and column headers (like A, B, C for columns and 1, 2, 3 for rows)
* in the printed output.
*
* - **true**: Includes row and column headers in the printout.
* - **false**: Excludes row and column headers from the printout.
*
*/
allowRowColumnHeader?: boolean;
/**
* Specifies whether to include gridlines in the printed output.
*
* Gridlines are the light gray lines that separate cells in the spreadsheet.
*
* - **true**: Prints the sheet with gridlines.
* - **false**: Prints the sheet without gridlines.
*
*/
allowGridLines?: boolean;
}
/**
* Represents layout options for PDF export.
* These options allow you to customize how the content is arranged in the PDF.
*/
export interface pdfLayoutSettings {
/**
* Determines whether the content should fit into a single page in the PDF.
*
* - **true**: Content will automatically scale to fit within one page.
* - **false**: Content may span across multiple pages if it doesn’t fit.
*
*/
fitSheetOnOnePage?: boolean;
/**
* Specifies the page orientation for the PDF.
*
* Values:
* - **"portrait"**: The PDF pages will be in vertical orientation (default).
* - **"landscape"**: The PDF pages will be in horizontal orientation.
*
*/
orientation?: PdfPageOrientation;
}
/**
* Represents the event arguments triggered before the save action is performed.
*/
export interface BeforeSaveEventArgs extends SaveOptions {
/**
* Specifies custom parameters that need to be included in the save request.
* These parameters will be sent along with the save action request to the server.
*/
customParams: Object;
/**
* Determines whether a full post-back is required for the save action.
*/
isFullPost: boolean;
/**
* Specifies whether the spreadsheet should be generated as `blobData` or not.
*
* - **true**: Generates the spreadsheet data as a `Blob` object, which can be used for custom handling
* (e.g., downloading, uploading to a server, or storing in memory).
* - **false**: The spreadsheet will not be generated as `blobData`.
*
*/
needBlobData: boolean;
/**
* Specifies whether the save action should be canceled.
*
* - **true**: Cancels the save action and stops further execution.
* - **false**: Proceeds with the save action as normal.
*
*/
cancel: boolean;
/**
* Automatically detects the number format for cells, if enabled.
*/
autoDetectFormat?: boolean;
}
/**
* Represents the event arguments triggered after the save action completes.
*/
export interface SaveCompleteEventArgs extends SaveOptions {
/**
* Specifies the spreadsheet data that is saved as a `Blob`.
* A `Blob` is a binary large object that can represent the file data in memory.
* This can be used for operations like downloading, uploading, or storing the data.
*/
blobData: Blob;
/**
* Specifies the status of the save action after it completes.
*/
status: string;
/**
* Specifies the message returned after the save action completes.
* This message provides additional information about the result of the save operation.
* It could be a success confirmation message or an error description.
*/
message: string;
}
/**
* Specifies the options for performing a find and replace action in the spreadsheet.
* These options control how and where the search operation is executed, as well as how to replace values.
*/
export interface FindOptions {
/**
* Specifies the value to find in the spreadsheet.
* This is the text or number that you want to search for within the cells.
*/
value: string;
/**
* Specifies whether to match the case when finding the value.
*
* - **true**: The search will be case-sensitive.
* - **false**: The search will be case-insensitive.
*
*/
isCSen: boolean;
/**
* Specifies whether to match the entire cell content or a substring of the cell content.
*
* - **true**: The search will match only the entire content of the cell.
* - **false**: The search will match any part of the cell content (substring search).
*
*/
isEMatch: boolean;
/**
* Specifies whether to search for the value within the current sheet or the entire workbook.
*
* - **"Sheet"**: Searches only within the current active sheet.
* - **"Workbook"**: Searches across all sheets in the workbook.
*
*/
mode: string;
/**
* Specifies whether to search for the value by row or by column.
*
* - **"Row"**: Searches row by row (horizontally).
* - **"Column"**: Searches column by column (vertically).
*
*/
searchBy: string;
/**
* Specifies the option to find the previous or next match of the value.
*
* - **"Next"**: Finds the next occurrence of the value.
* - **"Previous"**: Finds the previous occurrence of the value.
*
*/
findOpt: string;
/**
* Specifies the index of the sheet to search for the value.
* This refers to the sheet number (0-based index) where the search should begin.
*
*/
sheetIndex: number;
/**
* Specifies the value to replace the found value with.
* This is used when performing the replace operation.
*
*/
replaceValue?: string;
/**
* Specifies whether to replace the first match or all matches of the found value.
*
* - **"First"**: Replaces only the first found value.
* - **"All"**: Replaces all occurrences of the found value.
*
*/
replaceBy?: string;
/**
* Specifies the count of occurrences of the found value.
* This is the number of times the search value appears in the sheet or workbook.
*
*/
findCount?: string;
/**
* Specifies whether to return the match after the find action.
*
* - **true**: Returns the matching value after the find operation.
* - **false**: Does not return any match.
*
*/
isAction?: boolean;
/**
* Specifies whether to display the find and replace dialog.
*
* - **true**: Displays the find and replace dialog for user interaction.
* - **false**: Does not display the dialog.
*
*/
showDialog?: boolean;
}
/**@hidden */
export interface FindOptionsArgs extends FindOptions {
localeObj?: LocaleNumericSettings;
}
/**@hidden */
export interface ReplaceAllEventArgs {
addressCollection: string[];
cancel?: boolean;
}
/**
* Specifies FindAll options in arguments.
*/
export interface FindAllArgs {
value: string;
mode?: string;
sheetIndex?: number;
isCSen?: boolean;
isEMatch?: boolean;
findCollection?: string[];
}
export interface InvalidFormula {
value: string;
skip: boolean;
}
/**
* Specifies find next arguments.
*/
export interface FindNext {
rowIndex: number; colIndex: number; endRow: number; endColumn: number; startRow: number; usedRange?: UsedRangeModel; mode: string;
loopCount: number; count: number; args?: FindOptions; val: string; stringValue: string; sheetIndex: number; startColumn: number;
sheets: SheetModel[];
}
/**
* Specifies find previous arguments.
*/
export interface FindPrevious {
rowIndex: number; colIndex: number; endRow: number; endColumn: number; startRow: number;
loopCount: number; count: number; args: FindOptions; val: string; stringValue: string; sheetIndex: number; startColumn: number;
sheets: SheetModel[];
}
/**@hidden */
export interface ReplaceEventArgs {
address: string;
compareValue: string;
replaceValue: string;
}
/**@hidden */
export interface BeforeReplaceEventArgs extends ReplaceEventArgs {
cancel: boolean;
}
/**
* @hidden
*/
export interface ToolbarFind {
findOption?: string;
countArgs?: { countOpt: string, findCount: string };
}
/** @hidden */
export interface CellFormatArgs {
style: CellStyleModel;
rowIdx: number;
colIdx: number;
td?: HTMLElement;
pCell?: HTMLElement;
row?: HTMLElement;
hRow?: HTMLElement;
pRow?: HTMLElement;
pHRow?: HTMLElement;
lastCell?: boolean;
isHeightCheckNeeded?: boolean;
manualUpdate?: boolean;
onActionUpdate?: boolean;
first?: string;
checkHeight?: boolean;
outsideViewport?: boolean;
formatColor?: string;
isFromAutoFillOption?: boolean;
rowHeight?: number;
mergeBorderRows?: number[];
}
/** @hidden */
export interface SetCellFormatArgs {
style: CellStyleModel;
range?: string | number[];
refreshRibbon?: boolean;
onActionUpdate?: boolean;
cancel?: boolean;
borderType?: BorderType;
isUndoRedo?: boolean;
}
/** @hidden */
export interface ExtendedRange extends RangeModel {
info?: RangeInfo;
}
/** @hidden */
export interface CellStyleExtendedModel extends CellStyleModel {
properties?: CellStyleModel;
bottomPriority?: boolean;
}
interface RangeInfo {
loadedRange?: number[][];
insertRowRange?: number[][];
insertColumnRange?: number[][];
deleteColumnRange?: number[][];
count?: number;
fldLen?: number;
flds?: string[];
}
/** @hidden */
export interface AutoDetectInfo {
value: string;
sheet: SheetModel;
cell: CellModel;
rowIndex: number;
colIndex: number;
sheetIndex: number;
}
/**
* @hidden
*/
export interface ExtendedSheet extends Sheet {
isLocalData?: boolean;
lastReqIdx?: number[];
isImportProtected?: boolean;
}
/**
* Specifies the event arguments triggered before applying cell formatting in the spreadsheet.
* This allows users to customize the formatting behavior before it is applied to the selected cells.
*/
export interface BeforeCellFormatArgs {
/**
* Specifies the range of cells to which the cell formatting should be applied.
* This is a string representing the range (e.g., "A1:C3", "B2", etc.).
* The range can be a single cell or a block of cells.
*/
range: string;
/**
* Specifies the type of request: whether it is a cell format or a number format.
*
* - **"CellFormat"**: The request is for cell formatting (e.g., font, background color).
* - **"NumberFormat"**: The request is for number formatting (e.g., currency, date format).
*
*/
requestType: FormatType;
/**
* Specifies the format to be applied when applying number formatting.
* This is relevant only when `requestType` is set to "Number".
* The format could be any standard number format (e.g., "Currency", "Percentage", etc.).
*/
format?: string;
/**
* Specifies the styles to be applied during cell formatting.
* This object contains styling properties such as font, color, borders, etc.
*/
style?: CellStyleModel;
/**
* Specifies the sheet index where the cell formatting is to be applied.
* The index corresponds to the position of the sheet in the workbook (0-based index).
*/
sheetIndex?: number;
/**
* Specifies the border type to be applied during the cell formatting.
* This can be one of the following types:
* - **"Inner"**: Applies the border inside the selected range.
* - **"Outer"**: Applies the border outside the selected range.
* - **"Vertical"**: Applies the border vertically between columns.
* - **"Horizontal"**: Applies the border horizontally between rows.
*
*/
borderType?: BorderType;
/**
* Specifies whether to cancel the cell or number formatting.
* If set to `true`, the formatting action is canceled and not applied to the selected range.
* If set to `false`, the formatting is applied as requested.
*/
cancel?: boolean;
}
/** @hidden */
export interface AggregateArgs {
Count: number;
Sum?: string;
Avg?: string;
Min?: string;
Max?: string;
countOnly?: boolean;
}
/**
* Specifies the criteria for sorting in a spreadsheet.
*/
export interface SortDescriptor {
/**
* Specifies the column by which to sort.
* This is the name of the column or field on which sorting should be applied.
*/
field?: string;
/**
* Specifies the sort order.
* - **Ascending**: Sorts the data from smallest to largest (A-Z, 1-10).
* - **Descending**: Sorts the data from largest to smallest (Z-A, 10-1).
*/
order?: SortOrder;
/**
* Specifies a function used to customize the sorting logic.
* You can use this function to define custom sorting rules beyond basic ascending or descending order.
*/
sortComparer?: Function;
}
/**
* Specifies the event arguments after sorting completes.
*/
export interface SortEventArgs {
/**
* Specifies the range of cells that were sorted.
* This defines the area in the spreadsheet that was affected by the sorting operation.
*/
range?: string;
/**
* Specifies the sorting options that were used.
* This could include which columns were sorted, the sort order, and whether headers were considered.
*/
sortOptions?: SortOptions;
/**
* Specifies the previous sort collection model.
* This is used to track the previous sorting state before the current operation.
*/
previousSort?: SortCollectionModel | SortCollectionModel[];
}
/**
* Specifies the options for sorting in a spreadsheet.
*/
export interface SortOptions {
/**
* Specifies the descriptors (criteria) for sorting.
* This can be a single descriptor or an array of descriptors if multiple columns need to be sorted.
*/
sortDescriptors?: SortDescriptor | SortDescriptor[];
/**
* Specifies whether the range being sorted contains headers.
* If set to `true`, the first row of the range is considered as headers and will not be sorted.
*/
containsHeader?: boolean;
/**
* Specifies whether the sorting operation should be case-sensitive.
* ```
*/
caseSensitive?: boolean;
}
/**
* Specifies the event arguments before the sorting operation begins.
*/
export interface BeforeSortEventArgs extends SortEventArgs {
/**
* Specifies whether the sorting operation should be prevented.
* If set to `true`, the sorting will not proceed.
*/
cancel?: boolean;
}
/**
* Specifies arguments before a hyperlink is created or clicked.
*/
export interface BeforeHyperlinkArgs {
/**
* Specifies the hyperlink reference.
* This can either be a URL string (e.g., "https://example.com") or a `HyperlinkModel` object for more advanced configurations.
*/
hyperlink?: string | HyperlinkModel;
/**
* Specifies the range of cells where the hyperlink should be added.
*/
address?: string;
/**
* Specifies the text to be displayed for the hyperlink.
* If no text is provided, the current value of the cell is displayed by default.
*/
displayText?: string;
/**
* Specifies the target window or frame where the hyperlink will open.
* Common values:
* - `_blank`: Opens in a new tab or window.
* - `_self`: Opens in the same tab or window.
* - `_parent`: Opens in the parent frame.
* - `_top`: Opens in the topmost frame.
* - Custom frame name.
*/
target?: string;
/**
* Specifies whether the action of opening the hyperlink should be canceled.
* If set to `true`, the action will be stopped.
*/
cancel?: boolean;
}
/**
* Specifies arguments after a hyperlink is created or clicked.
*/
export interface AfterHyperlinkArgs {
/**
* Specifies the hyperlink reference.
* This can either be a URL string (e.g., "https://example.com") or a `HyperlinkModel` object.
*/
hyperlink?: string | HyperlinkModel;
/**
* Specifies the range of cells where the hyperlink was added.
*/
address?: string;
/**
* Specifies the text displayed for the hyperlink.
* If no text is provided, the current value of the cell is displayed by default.
*/
displayText?: string;
}
/**
* Specifies the event triggered after cell formatting is completed.
*
* @hidden
*/
export interface CellFormatCompleteEvents {
completeAction(eventArgs: BeforeCellFormatArgs, action: string): void;
}
/**
* Specifies the arguments used for filtering operations.
*/
export interface FilterEventArgs {
/**
* Specifies the range of cells where filtering is applied.
*/
range?: string;
/**
* Specifies the options for filtering, such as the data source and filter conditions.
*/
filterOptions?: FilterOptions;
}
/**
* Specifies the options available for filtering data.
*/
export interface FilterOptions {
/**
* Specifies the data source to be filtered.
* This can be an external data source managed by a `DataManager` object.
*/
datasource?: DataManager;
/**
* Specifies the filter conditions (predicates) for filtering data.
*/
predicates?: Predicate[];
/**
* Specifies groups of predicates that are combined using OR logic.
* This allows filtering based on multiple sets of conditions.
*/
equalOrPredicates?: Predicate[][];
}
/**
* Specifies the arguments before a filtering operation starts.
*/
export interface BeforeFilterEventArgs extends FilterEventArgs {
/**
* Specifies whether the filtering operation should be canceled.
* If set to `true`, the filtering will not proceed.
*/
cancel?: boolean;
}
/**
* Specifies the options for applying borders to cells.
*/
export interface BorderOptions {
/**
* Specifies the CSS-style border value to apply.
*/
border: string;
/**
* Specifies the type of border to apply.
* Common types:
* - `Inner`: Applies borders to the inside edges of the range.
* - `Outer`: Applies borders to the outer edges of the range.
* - `Horizontal`: Applies borders between rows.
* - `Vertical`: Applies borders between columns.
*/
type: BorderType;
}
/** @hidden */
export interface InsertDeleteModelArgs {
model: SheetModel;
start?: number | RowModel[] | ColumnModel[] | SheetModel[];
end?: number;
isAction?: boolean;
modelType: ModelType;
insertType?: string;
columnCellsModel?: RowModel[];
activeSheetIndex?: number;
checkCount?: number;
definedNames?: DefineNameModel[];
isUndoRedo?: boolean;
refreshSheet?: boolean;
conditionalFormats?: ConditionalFormatModel[];
prevAction?: string;
freezePane?: boolean;
isRedo?: boolean;
}
/**
* Specifies the arguments for querying cell information in the spreadsheet.
*/
export interface CellInfoEventArgs {
/**
* Defines the cell model object.
* The `CellModel` contains information about the cell's properties, such as value, formatting, formula, and more.
* ```
*/
cell: CellModel;
/**
* Defines the address of the cell.
* The address represents the location of the cell in the spreadsheet in "A1" notation.
*/
address: string;
/**
* Defines the row index of the cell.
* This is a zero-based index, meaning the first row starts at `0`.
* ```
*/
rowIndex: number;
/**
* Defines the column index of the cell.
* This is a zero-based index, meaning the first column starts at `0`.
*/
colIndex: number;
/**
* Defines the HTML element for the row in which the cell exists.
* This is optional and is useful when working with the rendered DOM elements of the spreadsheet.
*/
row?: HTMLElement;
}
/** @hidden */
export interface MergeArgs {
range: string | number[];
merge?: boolean;
isAction?: boolean;
type?: MergeType;
isActiveCell?: boolean;
activeCell?: number[];
selectedRange?: number[];
skipChecking?: boolean;
model?: RowModel[];
insertCount?: number;
deleteCount?: number;
insertModel?: ModelType;
preventRefresh?: boolean;
refreshRibbon?: boolean;
sheetIndex?: number;
mergeCollection?: number[][]
}
/**
* Specifies the options to clear contents, formats, and hyperlinks in the spreadsheet.
*/
export interface ClearOptions {
/**
* Specifies the type of clearing action to be performed.
*
* The `type` property can take one of the following values:
* - `Clear Contents` - Clears only the data or content within the cells.
* - `Clear Formats` - Clears only the formatting (e.g., font styles, colors, borders) applied to the cells.
* - `Clear Hyperlinks` - Removes only the hyperlinks in the cells while retaining their content and formatting.
* - `Clear All` - Clears all content, formatting, and hyperlinks from the specified range.
*
*/
type?: ClearType;
/**
* Specifies the range of cells to be cleared in the spreadsheet.
*/
range?: string;
}
/** @hidden */
export interface UnprotectArgs {
sheet?: number;
}
/**
* Insert event options.
*
* @hidden
*/
export interface InsertDeleteEventArgs {
model?: RowModel[] | ColumnModel[] | CellModel[];
sheet?: SheetModel;
index?: number;
modelType?: ModelType;
insertType?: string;
isAction?: boolean;
startIndex?: number;
endIndex?: number;
deletedModel?: RowModel[] | ColumnModel[] | CellModel[] | SheetModel[];
deletedCellsModel?: RowModel[];
activeSheetIndex?: number;
sheetCount?: number;
isInsert?: boolean;
freezePane?: boolean;
definedNames?: DefineNameModel[];
isMethod?: boolean;
isUndoRedo?: boolean;
refreshSheet?: boolean;
cancel?: boolean;
name?: string;
isDelete?: boolean;
forceUpdate?: boolean;
}
/**
* Action begin event options.
*
* @hidden
*/
export interface ActionEventArgs {
eventArgs: object;
action: string;
isUndo?: boolean;
isRedo?: boolean;
preventAction?: boolean
}
/**
* CFormattingEventArgs
*
* @hidden
*/
export interface CFormattingEventArgs {
range?: string;
type?: HighlightCell | TopBottom | DataBar | ColorScale | IconSet;
cFColor?: CFColor;
value?: string;
sheetIdx?: number;
cancel: boolean;
}
/**
* Specifies event arguments when the datasource changes.
*/
export interface DataSourceChangedEventArgs {
/**
* Specifies the changed data from the datasource after an add, edit, or delete action.
*/
data?: Object[];
/**
* Specifies the action performed to change the datasource, such as add, edit, or delete.
*/
action?: string;
/**
* Specifies the range index of the changed datasource.
* The `rangeIndex` represents the index of the data range in the spreadsheet that corresponds to the modified data.
*/
rangeIndex?: number;
/**
* Specifies the index of the sheet where the datasource change occurred.
*/
sheetIndex?: number;
}
/**
* Specifies the defineName arguments.
*
* @hidden
*/
export interface DefinedNameEventArgs {
name?: string;
scope?: string;
comment?: string;
refersTo?: string;
cancel: boolean;
}
/** @hidden */
export interface ExtendedRowModel extends RowModel {
isFiltered?: boolean;
}
/** @hidden */
export interface ExtendedCellModel extends CellModel {
template?: string;
}
/**
* Specifies the event arguments for before cell update event.
*/
export interface BeforeCellUpdateArgs {
/**
* Specifies the cell to be updated.
* This property holds the cell's model object, which contains all the properties and data associated with the cell being updated.
*/
cell: CellModel;
/**
* Specifies the row index of the cell.
*/
rowIndex: number;
/**
* Specifies the column index of the cell.
* This property represents the zero-based index of the column where the cell is located.
*/
colIndex: number;
/**
* Specifies the name of the sheet.
* This property indicates the name of the sheet where the cell is located.
*/
sheet: string;
/**
* Specifies whether to cancel the cell update.
* If this property is set to `true`, the update to the cell will be canceled, and no changes will be applied.
*/
cancel: boolean;
}
/** @hidden */
export interface CellUpdateArgs {
cell: CellModel;
rowIdx: number;
colIdx: number;
preventEvt?: boolean;
pvtExtend?: boolean;
valChange?: boolean;
uiRefresh?: boolean;
td?: HTMLElement;
lastCell?: boolean;
checkCF?: boolean;
checkWrap?: boolean;
eventOnly?: boolean;
requestType?: string;
cellDelete?: boolean;
mergedCells?: boolean;
isFormulaDependent?: boolean;
skipFormatCheck?: boolean;
isRandomFormula?: boolean;
isDelete?: boolean;
deletedRange?: number[];
fillType?: string;
}
/** @hidden */
export interface NumberFormatArgs {
value?: string | number;
format?: string;
type?: string;
rowIndex?: number;
colIndex?: number,
cell?: CellModel;
sheetIndex?: number;
result?: string;
isRightAlign?: boolean;
isRowFill?: boolean;
formattedText?: string;
curSymbol?: string;
td?: HTMLElement;
checkDate?: boolean;
dateObj?: Date;
color?: string;
dataUpdate?: boolean;
formatApplied?: boolean;
skipFormatCheck?: boolean;
refresh?: boolean;
isEdit?: boolean;
onLoad?: boolean;
}
/** @hidden */
export interface DateFormatCheckArgs {
value?: string | number;
cell?: CellModel;
rowIndex?: number;
colIndex?: number;
sheetIndex?: number;
isDate?: boolean;
isTime?: boolean;
dateObj?: Date;
updatedVal?: string;
isEdit?: boolean;
intl?: Internationalization;
skipCellFormat?: boolean;
updateValue?: boolean;
curSymbol?: string;