jspreadsheet 11.26.0 → 12.0.0-beta.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.
- package/dist/index.d.ts +68 -67
- package/dist/index.js +596 -586
- package/dist/jspreadsheet.css +820 -918
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Official Type definitions for Jspreadsheet Pro
|
|
2
|
+
* Official Type definitions for Jspreadsheet Pro v12
|
|
3
3
|
* https://jspreadsheet.com/docs
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -29,6 +29,11 @@ declare namespace jspreadsheet {
|
|
|
29
29
|
let clipboard: ClipBoardMethods;
|
|
30
30
|
/** Shortcuts */
|
|
31
31
|
let shortcuts: Shortcuts;
|
|
32
|
+
/** Paste with style max size. Default 10Mb */
|
|
33
|
+
let pasteWithStyleMaxSize: number;
|
|
34
|
+
|
|
35
|
+
// Register a validation
|
|
36
|
+
let setValidationHandler: (name: string, handler: (value: any, options: object) => boolean) => void;
|
|
32
37
|
/** Get the worksheet instance by its name */
|
|
33
38
|
let getWorksheetInstanceByName: GetWorksheetInstanceByNameFunction;
|
|
34
39
|
|
|
@@ -59,10 +64,10 @@ declare namespace jspreadsheet {
|
|
|
59
64
|
/** Jspreadsheet formula extension. More info at: https://jspreadsheet.com/products */
|
|
60
65
|
let formula: ((expression: string, variables: object, x: number, y: number, instance: worksheetInstance) => void) | undefined;
|
|
61
66
|
|
|
62
|
-
/** Jspreadsheet
|
|
63
|
-
let render: ((element: HTMLElement
|
|
67
|
+
/** Jspreadsheet parser extension. More info at: https://jspreadsheet.com/products */
|
|
68
|
+
let render: ((element: HTMLElement, options: any) => void) | undefined;
|
|
64
69
|
|
|
65
|
-
/** Jspreadsheet forms
|
|
70
|
+
/** Jspreadsheet forms extension. More info at: https://jspreadsheet.com/products */
|
|
66
71
|
let forms: ((options: any) => void) | undefined;
|
|
67
72
|
|
|
68
73
|
/** Jspreadsheet search extension. More info at: https://jspreadsheet.com/products */
|
|
@@ -94,6 +99,31 @@ declare namespace jspreadsheet {
|
|
|
94
99
|
|
|
95
100
|
type GetWorksheetInstanceByNameFunction = (worksheetName?: string | null | undefined, namespace?: string) => worksheetInstance | Record<string, worksheetInstance>;
|
|
96
101
|
|
|
102
|
+
interface Table {
|
|
103
|
+
// Type
|
|
104
|
+
type?: 'table',
|
|
105
|
+
// Table name
|
|
106
|
+
name?: string,
|
|
107
|
+
// Range
|
|
108
|
+
range?: string,
|
|
109
|
+
// Table style
|
|
110
|
+
theme?: string,
|
|
111
|
+
// The first line is a header
|
|
112
|
+
headerRow?: boolean,
|
|
113
|
+
// Total row
|
|
114
|
+
totalRow?: string,
|
|
115
|
+
// Alternate row colors
|
|
116
|
+
bandedRows?: true,
|
|
117
|
+
// Alternate row colors
|
|
118
|
+
bandedColumns?: true,
|
|
119
|
+
// First column as bold
|
|
120
|
+
firstColumn?: boolean
|
|
121
|
+
// First row as bold
|
|
122
|
+
lastColumn?: boolean
|
|
123
|
+
// Filters
|
|
124
|
+
filters?: boolean
|
|
125
|
+
}
|
|
126
|
+
|
|
97
127
|
interface Picker {
|
|
98
128
|
(el: HTMLElement, options: PickerOptions) : void;
|
|
99
129
|
cancel: () => void;
|
|
@@ -150,7 +180,7 @@ declare namespace jspreadsheet {
|
|
|
150
180
|
/** Common properties for all media types */
|
|
151
181
|
interface MediaBase {
|
|
152
182
|
// GUID string
|
|
153
|
-
id
|
|
183
|
+
id?: string;
|
|
154
184
|
type: 'image' | 'chart' | 'shape';
|
|
155
185
|
top?: number;
|
|
156
186
|
left?: number;
|
|
@@ -311,11 +341,11 @@ declare namespace jspreadsheet {
|
|
|
311
341
|
/** Excel-like range format Sheet1!A1:A6 */
|
|
312
342
|
range: string;
|
|
313
343
|
/** Validation type */
|
|
314
|
-
type: 'number' | 'text' | 'date' | 'list' | 'textLength' | 'empty' | 'notEmpty';
|
|
344
|
+
type: 'number' | 'text' | 'date' | 'list' | 'textLength' | 'empty' | 'notEmpty' | Function;
|
|
315
345
|
/** Validation action can be a warning or reject when the condition are not match or a format when the condition matches */
|
|
316
346
|
action: 'warning' | 'reject' | 'format';
|
|
317
347
|
/** Criteria to be match */
|
|
318
|
-
criteria
|
|
348
|
+
criteria?:
|
|
319
349
|
| '='
|
|
320
350
|
| '!='
|
|
321
351
|
| '>='
|
|
@@ -342,7 +372,7 @@ declare namespace jspreadsheet {
|
|
|
342
372
|
/** Array with two positions, the second position used when criteria is between or not between. */
|
|
343
373
|
value?: number[] | string[],
|
|
344
374
|
/** Make sure run that as a dropdown */
|
|
345
|
-
dropdown
|
|
375
|
+
dropdown?: true,
|
|
346
376
|
}
|
|
347
377
|
|
|
348
378
|
/** Validations update format */
|
|
@@ -571,9 +601,9 @@ declare namespace jspreadsheet {
|
|
|
571
601
|
|
|
572
602
|
interface DropdownItem {
|
|
573
603
|
/** Value of the selected item. */
|
|
574
|
-
|
|
604
|
+
value?: string | number;
|
|
575
605
|
/** Label for the selected item. */
|
|
576
|
-
|
|
606
|
+
text?: string;
|
|
577
607
|
/** Description of the item */
|
|
578
608
|
title?: string;
|
|
579
609
|
/** Icon of the item */
|
|
@@ -586,6 +616,10 @@ declare namespace jspreadsheet {
|
|
|
586
616
|
disabled?: boolean;
|
|
587
617
|
/** Color for the item */
|
|
588
618
|
color?: string;
|
|
619
|
+
/** Deprecated */
|
|
620
|
+
id?: string | number;
|
|
621
|
+
/** Deprecated */
|
|
622
|
+
name?: string;
|
|
589
623
|
}
|
|
590
624
|
|
|
591
625
|
interface ContextmenuItem {
|
|
@@ -755,8 +789,6 @@ declare namespace jspreadsheet {
|
|
|
755
789
|
visible?: boolean,
|
|
756
790
|
/** A method to overwrite the column definitions in real-time just before the column is edited. */
|
|
757
791
|
filterOptions?: (worksheet: worksheetInstance, cell: HTMLElement, x: number, y: number, value: number|string, options: Column) => Column;
|
|
758
|
-
/** Whether the column is a primary key. */
|
|
759
|
-
primaryKey?: boolean;
|
|
760
792
|
/** Whether to shift the formula when copying and pasting. This option is only valid for custom column types. Default: false. */
|
|
761
793
|
shiftFormula?: boolean;
|
|
762
794
|
/** Whether to apply CSS odd-even background color to the column. Default: false. */
|
|
@@ -884,8 +916,6 @@ declare namespace jspreadsheet {
|
|
|
884
916
|
definedNames?: Record<string, string>,
|
|
885
917
|
/** Global sorting handler. */
|
|
886
918
|
sorting?: (direction: boolean, column: number) => (a: any, b: any) => number;
|
|
887
|
-
/** Remote URL for the persistence server */
|
|
888
|
-
server?: string;
|
|
889
919
|
/** Enable the toolbars */
|
|
890
920
|
toolbar?: boolean | Toolbar | ToolbarItem[] | ((toolbarOptions: Toolbar) => Toolbar);
|
|
891
921
|
/** Allow table edition */
|
|
@@ -898,8 +928,6 @@ declare namespace jspreadsheet {
|
|
|
898
928
|
forceUpdateOnPaste?: boolean;
|
|
899
929
|
/** Render jspreadsheet spreadsheet on full screen mode. Default: false */
|
|
900
930
|
fullscreen?: boolean;
|
|
901
|
-
/** Make sure the formulas are capital letter. Default: true */
|
|
902
|
-
secureFormulas?: boolean;
|
|
903
931
|
/** Enable formula debug. Default: false */
|
|
904
932
|
debugFormulas?: boolean,
|
|
905
933
|
/** Execute formulas. Default: true */
|
|
@@ -912,6 +940,8 @@ declare namespace jspreadsheet {
|
|
|
912
940
|
autoIncrement?: boolean;
|
|
913
941
|
/** Try to cast numbers from cell values when executing formulas. Default: true */
|
|
914
942
|
autoCasting?: boolean;
|
|
943
|
+
/** Try to find a format when the input is a string. Default: true */
|
|
944
|
+
autoFormat?: boolean;
|
|
915
945
|
/** Parse HTML. Default: false (Use this with caution) */
|
|
916
946
|
parseHTML?: boolean;
|
|
917
947
|
/** Allow bar when extension bar is enabled. Default: true */
|
|
@@ -934,10 +964,6 @@ declare namespace jspreadsheet {
|
|
|
934
964
|
onundo?: (worksheet: worksheetInstance, historyRecord: object) => void;
|
|
935
965
|
/** When redo is applied */
|
|
936
966
|
onredo?: (worksheet: worksheetInstance, historyRecord: object) => void;
|
|
937
|
-
/** Before any data is sent to the backend. Can be used to overwrite the data or to cancel the action when return false. */
|
|
938
|
-
onbeforesave?: (spreadsheet: spreadsheetInstance, worksheet: worksheetInstance, data: object) => boolean | object | undefined;
|
|
939
|
-
/** After something is saved */
|
|
940
|
-
onsave?: (spreadsheet: spreadsheetInstance, worksheet: worksheetInstance, data: object, result: object) => void;
|
|
941
967
|
/** When something goes wrong during a persistence operation */
|
|
942
968
|
onerror?: (spreadsheet: spreadsheetInstance, result: object) => void;
|
|
943
969
|
/** Before a column value is changed. NOTE: It is possible to overwrite the original value, by return a new value on this method. */
|
|
@@ -946,7 +972,7 @@ declare namespace jspreadsheet {
|
|
|
946
972
|
onchange?: (worksheet: worksheetInstance, cell: HTMLElement, x: number | string, y: number | string, newValue: any, oldValue: any) => void;
|
|
947
973
|
/** After a cell value is rendered */
|
|
948
974
|
onrender?: (worksheet: worksheetInstance, cell: HTMLElement, x: number | string, y: number | string, newValue: any, options: Column) => void;
|
|
949
|
-
/** Before
|
|
975
|
+
/** Before all data have been updated. Origin: 'paste', 'handle-fill' or undefined */
|
|
950
976
|
onbeforechanges?: (worksheet: worksheetInstance, records: Record<string, any>[], origin: string | undefined) => void | boolean | Record<string, any>[];
|
|
951
977
|
/** When all data have been updated. Origin: 'paste', 'handle-fill' or undefined */
|
|
952
978
|
onafterchanges?: (worksheet: worksheetInstance, records: Record<string, any>[], origin: string | undefined) => void;
|
|
@@ -979,12 +1005,8 @@ declare namespace jspreadsheet {
|
|
|
979
1005
|
onbeforedeletecolumn?: (worksheet: worksheetInstance, cols: number[]) => false | number[] | undefined;
|
|
980
1006
|
/** After a column is excluded. */
|
|
981
1007
|
ondeletecolumn?: (worksheet: worksheetInstance, cols: number[]) => void;
|
|
982
|
-
/** Before a row is moved to a new position. */
|
|
983
|
-
onbeforemoverow?: (worksheet: worksheetInstance, origin: number, destination: number, quantityOfRows: number) => void | false;
|
|
984
1008
|
/** After a row is moved to a new position. */
|
|
985
1009
|
onmoverow?: (worksheet: worksheetInstance, origin: number, destination: number, quantityOfRows: number) => void;
|
|
986
|
-
/** Before a column is moved to a new position. */
|
|
987
|
-
onbeforemovecolumn?: (worksheet: worksheetInstance, origin: number, destination: number, quantityOfColumns: number) => void | false;
|
|
988
1010
|
/** After a column is moved to a new position. */
|
|
989
1011
|
onmovecolumn?: (worksheet: worksheetInstance, origin: number, destination: number, quantityOfColumns: number) => void;
|
|
990
1012
|
/** After a height change for one or more rows. */
|
|
@@ -1016,7 +1038,7 @@ declare namespace jspreadsheet {
|
|
|
1016
1038
|
/** When the value in a cell footer is changed. */
|
|
1017
1039
|
onchangefootervalue?: (worksheet: worksheetInstance, x: number, y: number, value: string) => void;
|
|
1018
1040
|
/** When the footer cell is rendered */
|
|
1019
|
-
onrenderfootercell?: (worksheet: worksheetInstance,
|
|
1041
|
+
onrenderfootercell?: (worksheet: worksheetInstance, record: object) => void;
|
|
1020
1042
|
/** On change nested headers */
|
|
1021
1043
|
onchangenested?: (worksheet: worksheetInstance, options: object) => void;
|
|
1022
1044
|
/** On change nested cell properties */
|
|
@@ -1077,8 +1099,6 @@ declare namespace jspreadsheet {
|
|
|
1077
1099
|
onopenfilter?: (worksheet: worksheetInstance, column: number, options: Record<string, any>[]) => Record<string, any>[] | Promise<Record<string, any>[]> | undefined;
|
|
1078
1100
|
/** When the viewport dimension is updated. */
|
|
1079
1101
|
onresize?: (w: number, h: number) => void
|
|
1080
|
-
/** Intercept the ajax call before save. XHR ajax object */
|
|
1081
|
-
onbeforesend?: (worksheet: worksheetInstance, xhr: object) => void
|
|
1082
1102
|
/** When defined names is affected */
|
|
1083
1103
|
onchangedefinednames?: (worksheet: worksheetInstance, data: Record<string, any>[]) => void
|
|
1084
1104
|
/** Keyboard event */
|
|
@@ -1160,10 +1180,6 @@ declare namespace jspreadsheet {
|
|
|
1160
1180
|
interface Worksheet {
|
|
1161
1181
|
/** Load the data from an external server URL */
|
|
1162
1182
|
url?: string;
|
|
1163
|
-
/** Persistence URL or true when the URL is the same of the URL of the data source */
|
|
1164
|
-
persistence?: string | boolean;
|
|
1165
|
-
/** Allow internal sequence for new rows */
|
|
1166
|
-
sequence?: boolean;
|
|
1167
1183
|
/** Load the data into a new spreadsheet from an array of rows or objects */
|
|
1168
1184
|
data?: Array<Array<any>> | Array<Record<string, any>>;
|
|
1169
1185
|
/** Array with the rows properties definitions such as title, height. */
|
|
@@ -1290,8 +1306,8 @@ declare namespace jspreadsheet {
|
|
|
1290
1306
|
zoom?: number;
|
|
1291
1307
|
/** Detect column names from the data object given when the column names are not declared. Default: true */
|
|
1292
1308
|
autoNames?: boolean;
|
|
1293
|
-
/**
|
|
1294
|
-
|
|
1309
|
+
/** Tables */
|
|
1310
|
+
tables?: Table[]
|
|
1295
1311
|
}
|
|
1296
1312
|
|
|
1297
1313
|
interface SpreadsheetHTMLElement extends HTMLDivElement {
|
|
@@ -1315,8 +1331,6 @@ declare namespace jspreadsheet {
|
|
|
1315
1331
|
helper: HTMLElement,
|
|
1316
1332
|
/** Ignore events */
|
|
1317
1333
|
ignoreEvents: boolean;
|
|
1318
|
-
/** Ignore persistence events */
|
|
1319
|
-
ignorePersistence: boolean;
|
|
1320
1334
|
/** HTMLElement editor container */
|
|
1321
1335
|
input: HTMLElement;
|
|
1322
1336
|
/** HTMLElement loading element */
|
|
@@ -1491,8 +1505,8 @@ declare namespace jspreadsheet {
|
|
|
1491
1505
|
/** Internal method: Get the editor for one cell */
|
|
1492
1506
|
getEditor: (x: number, y: number) => [Editor, Cell | Column];
|
|
1493
1507
|
/** Internal method: Get the filter */
|
|
1494
|
-
getFilter: (
|
|
1495
|
-
/** Get the
|
|
1508
|
+
getFilter: (col: number, row: number, getAsSets?: boolean) => string[] | string[][] | Set<string> | Set<string>[] | undefined;
|
|
1509
|
+
/** Get the footer configuration */
|
|
1496
1510
|
getFooter: () => Array<any> | undefined;
|
|
1497
1511
|
/** Get the footer value */
|
|
1498
1512
|
getFooterValue: (x: number, y: number) => any;
|
|
@@ -1518,12 +1532,8 @@ declare namespace jspreadsheet {
|
|
|
1518
1532
|
getNestedCell: (x: number, y: number) => HTMLTableCellElement;
|
|
1519
1533
|
/** Get the nested headers */
|
|
1520
1534
|
getNestedHeaders: () => Nested[][] | undefined;
|
|
1521
|
-
/** Get the next available number in the sequence */
|
|
1522
|
-
getNextSequence: () => number | null;
|
|
1523
1535
|
/** Alias to getProperty */
|
|
1524
1536
|
getOptions: (x: number, y?: number) => Cell | ColumnInstance | undefined;
|
|
1525
|
-
/** Get the primaryKey column when applicable. */
|
|
1526
|
-
getPrimaryKey: () => number | false;
|
|
1527
1537
|
/** Get processed data by the coordinates of the cell. Extended process a color, progressbar and rating as raw. */
|
|
1528
1538
|
getProcessed: (x: number, y: number, extended?: boolean) => any;
|
|
1529
1539
|
/** Get the properties for one column when only x is present or the cell when x and y is defined. */
|
|
@@ -1537,7 +1547,7 @@ declare namespace jspreadsheet {
|
|
|
1537
1547
|
/** Get the data from one row */
|
|
1538
1548
|
getRowData: (row: number, processed?: boolean) => any[] | Record<string, any> | undefined;
|
|
1539
1549
|
/** Get the row id from its position */
|
|
1540
|
-
getRowId: (row: number
|
|
1550
|
+
getRowId: (row: number) => any;
|
|
1541
1551
|
/**
|
|
1542
1552
|
* Get the selected cells
|
|
1543
1553
|
* @param {boolean?} columnNameOnly - Return an array of cell names or cell DOM elements
|
|
@@ -1566,8 +1576,8 @@ declare namespace jspreadsheet {
|
|
|
1566
1576
|
/** Find a style ID from a style string. Null when no styleId is found */
|
|
1567
1577
|
getStyleId: (styleString?: string) => number | null;
|
|
1568
1578
|
/** Get value by the cell name or object. The value can be the raw or processed value. */
|
|
1569
|
-
getValue(cell: string, processed?: boolean): Array<Array<any>> | Array<Record<string, any>> | string;
|
|
1570
|
-
getValue(cell: { x: number, y: number }, processed?: boolean): any;
|
|
1579
|
+
getValue(cell: string, processed?: boolean, raw?: boolean): Array<Array<any>> | Array<Record<string, any>> | string;
|
|
1580
|
+
getValue(cell: { x: number, y: number }, processed?: boolean, raw?: boolean): any;
|
|
1571
1581
|
/** Get value by the coordinates. The value can be the source or processed value, including not formatted proceed data. */
|
|
1572
1582
|
getValueFromCoords: (x: number, y: number, processed?: boolean, raw?: boolean) => any;
|
|
1573
1583
|
/** Get the width of one column by index or all column width as an array when index is null. */
|
|
@@ -1578,7 +1588,7 @@ declare namespace jspreadsheet {
|
|
|
1578
1588
|
headerContainer: HTMLElement;
|
|
1579
1589
|
/** Hide column */
|
|
1580
1590
|
hideColumn: (column: number|number[]) => void;
|
|
1581
|
-
/** Hide the filters for column
|
|
1591
|
+
/** Hide the filters for the column or a cell range. */
|
|
1582
1592
|
hideFilter: (colNumber?: number | string) => void;
|
|
1583
1593
|
/** Hide index column */
|
|
1584
1594
|
hideIndex: () => void;
|
|
@@ -1638,7 +1648,7 @@ declare namespace jspreadsheet {
|
|
|
1638
1648
|
/** Start the edition for one cell */
|
|
1639
1649
|
openEditor: (cell: HTMLElement, empty?: boolean, mouseEvent?: object) => false | undefined;
|
|
1640
1650
|
/** Open the filters */
|
|
1641
|
-
openFilter: (column: number) => void;
|
|
1651
|
+
openFilter: (column: number, row?: number) => void;
|
|
1642
1652
|
/** Worksheet configuration */
|
|
1643
1653
|
options: Worksheet;
|
|
1644
1654
|
/** Sort one column by its position. ASC (0) or DESC (1) */
|
|
@@ -1665,8 +1675,6 @@ declare namespace jspreadsheet {
|
|
|
1665
1675
|
records: Records[][];
|
|
1666
1676
|
/** Refresh the borders by the border name */
|
|
1667
1677
|
refreshBorders: (border?: string) => void;
|
|
1668
|
-
/** Refresh footers */
|
|
1669
|
-
refreshFooter: () => void;
|
|
1670
1678
|
/** Remove the merged cells by the cell name or a object with all cells to be removed. */
|
|
1671
1679
|
removeMerge: (cellName: string | Record<string, any>) => false | undefined;
|
|
1672
1680
|
/**
|
|
@@ -1677,8 +1685,8 @@ declare namespace jspreadsheet {
|
|
|
1677
1685
|
* @returns {boolean | undefined} - True if successful, false if no border found.
|
|
1678
1686
|
*/
|
|
1679
1687
|
resetBorders: (border?: string, permanent?: boolean) => void;
|
|
1680
|
-
/** Reset the filter
|
|
1681
|
-
resetFilters: (
|
|
1688
|
+
/** Reset the filter */
|
|
1689
|
+
resetFilters: (column?: number, row?: number) => void;
|
|
1682
1690
|
/** Destroy the footers */
|
|
1683
1691
|
resetFooter: () => void;
|
|
1684
1692
|
/** Destroy freeze columns */
|
|
@@ -1701,8 +1709,6 @@ declare namespace jspreadsheet {
|
|
|
1701
1709
|
rotate: (cell: string|string[], value:number) => void;
|
|
1702
1710
|
/** Array of row objects */
|
|
1703
1711
|
rows: RowInstance[] | Record<number, RowInstance>;
|
|
1704
|
-
/** Persistence helper method. The callback is executed with a JSON from the server */
|
|
1705
|
-
save: (url: string, data: object, token?: string, callback?: (result: object) => void) => void;
|
|
1706
1712
|
/** Search for something */
|
|
1707
1713
|
search: (str: string) => false | undefined;
|
|
1708
1714
|
/** Search HTML container */
|
|
@@ -1714,8 +1720,6 @@ declare namespace jspreadsheet {
|
|
|
1714
1720
|
/** Selected cells */
|
|
1715
1721
|
selectedCell: RangeCoords | null;
|
|
1716
1722
|
currentSelection: RangeCoords | null;
|
|
1717
|
-
/** Internal record id sequence */
|
|
1718
|
-
sequence: number;
|
|
1719
1723
|
/**
|
|
1720
1724
|
* Adds a colored border to a cell range with a unique identifier.
|
|
1721
1725
|
* @intent highlight-cells, create-border
|
|
@@ -1758,11 +1762,11 @@ declare namespace jspreadsheet {
|
|
|
1758
1762
|
/** Reset names by indexes */
|
|
1759
1763
|
resetDefinedNames: (names: DefinedNames[]) => void;
|
|
1760
1764
|
/** Set filter */
|
|
1761
|
-
setFilter: (colNumber: number, keywords?: string[]) => void;
|
|
1765
|
+
setFilter: (colNumber: number, rowNumber: number | null, keywords?: string[]) => void;
|
|
1762
1766
|
/** Set the footers */
|
|
1763
1767
|
setFooter: (data: any[][]) => void;
|
|
1764
1768
|
/** Set the footer value */
|
|
1765
|
-
setFooterValue: (
|
|
1769
|
+
setFooterValue: (values: CellRecord[]) => void;
|
|
1766
1770
|
/** List of columns to freeze. Should be a number or an array of consecutive numbers. Example: [4,5,6] */
|
|
1767
1771
|
setFreezeColumns: (num?: number | number[] | null) => void;
|
|
1768
1772
|
/**
|
|
@@ -1791,13 +1795,13 @@ declare namespace jspreadsheet {
|
|
|
1791
1795
|
*/
|
|
1792
1796
|
setMerge(cellName: string, colspan: number, rowspan: number): false | undefined;
|
|
1793
1797
|
setMerge(cells: MergeConfig): false | undefined;
|
|
1794
|
-
/** Get one or various meta
|
|
1798
|
+
/** Get one or various meta-information for one cell. */
|
|
1795
1799
|
setMeta: (cell: string | Record<string, any>, property?: string, value?: string) => false | undefined;
|
|
1796
1800
|
/** Set the nested headers */
|
|
1797
1801
|
setNestedHeaders: (config: Nested[][]) => void;
|
|
1798
1802
|
/** Deprecated. Alias for parent.setPlugins */
|
|
1799
1803
|
setPlugins: (plugins: Record<string, Plugin>) => void;
|
|
1800
|
-
/** Add a new configuration
|
|
1804
|
+
/** Add a new configuration setting for a column or cell */
|
|
1801
1805
|
setProperty(columnNumber: number, rowNumber: number, cellSettings?: Cell): boolean;
|
|
1802
1806
|
setProperty(columnNumber: number, columnSettings: Column): boolean;
|
|
1803
1807
|
setProperty(changes: ({ x: number, value: Column } | { x: number, y: number, value: Cell })[]): boolean;
|
|
@@ -1919,8 +1923,6 @@ declare namespace jspreadsheet {
|
|
|
1919
1923
|
resetColumnGroup: (column: number) => void;
|
|
1920
1924
|
/** Aliases for jspreadsheet.helpers. Tools to handle spreadsheet data */
|
|
1921
1925
|
helpers: Helpers;
|
|
1922
|
-
/** Internal persistence handler */
|
|
1923
|
-
persistence: Function;
|
|
1924
1926
|
/** Deprecated. Alias for parent.undo */
|
|
1925
1927
|
undo: () => void;
|
|
1926
1928
|
/** Deprecated. Alias for parent.redo */
|
|
@@ -1960,12 +1962,13 @@ declare namespace jspreadsheet {
|
|
|
1960
1962
|
setValidations: (validations: Validations | Validations[]) => false | undefined;
|
|
1961
1963
|
/** Reset validations by validation indexes. Undefined will remove all validations */
|
|
1962
1964
|
resetValidations: (validationIndex?: number | number[]) => false | undefined;
|
|
1963
|
-
/** Load all
|
|
1964
|
-
loadValidations(
|
|
1965
|
-
loadValidations(xOrCell: number, y: number, includeIndexes?: boolean): Validation[] | { index: number, rules: Validation }[] | undefined;
|
|
1965
|
+
/** Load all validation rules from a cell based on its coordinates. */
|
|
1966
|
+
loadValidations(x: number, y: number): Validation[] | undefined;
|
|
1966
1967
|
/** This method returns true if a cell fails to meet all the defined validation criteria. If invoked without arguments, this method will scan the entire worksheet and return true if it detects validation errors. */
|
|
1967
|
-
hasErrors(): boolean;
|
|
1968
|
+
hasErrors(): boolean | number[];
|
|
1969
|
+
/** Check for errors from a cell by its name hasError('A1') */
|
|
1968
1970
|
hasErrors(col: string): boolean;
|
|
1971
|
+
/** Check the errors from a cell by its coordinates */
|
|
1969
1972
|
hasErrors(col: number, row: number): boolean;
|
|
1970
1973
|
/** Resize columns to match the visible content */
|
|
1971
1974
|
autoWidth: (columns: number[]) => void;
|
|
@@ -1973,8 +1976,6 @@ declare namespace jspreadsheet {
|
|
|
1973
1976
|
showHeaders: () => void;
|
|
1974
1977
|
/** Hide the column headers */
|
|
1975
1978
|
hideHeaders: () => void;
|
|
1976
|
-
/** Refresh the search on the viewport */
|
|
1977
|
-
updateSearch: () => void;
|
|
1978
1979
|
/** Get the worksheet index by instance or worksheetId */
|
|
1979
1980
|
getWorksheet(worksheetIdent: worksheetInstance): number | false;
|
|
1980
1981
|
getWorksheet(worksheetIdent: string, instance?: boolean): worksheetInstance | number | false;
|