jspreadsheet 11.11.1 → 11.11.3
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 +14 -8
- package/dist/index.js +568 -565
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ declare namespace jspreadsheet {
|
|
|
30
30
|
/** Shortcuts */
|
|
31
31
|
let shortcuts: Shortcuts;
|
|
32
32
|
/** Get the worksheet instance by its name */
|
|
33
|
-
|
|
33
|
+
let getWorksheetInstanceByName: GetWorksheetInstanceByNameFunction;
|
|
34
34
|
|
|
35
35
|
/** Picker */
|
|
36
36
|
let picker: Picker;
|
|
@@ -92,6 +92,8 @@ declare namespace jspreadsheet {
|
|
|
92
92
|
print: () => [string],
|
|
93
93
|
};
|
|
94
94
|
|
|
95
|
+
type GetWorksheetInstanceByNameFunction = (worksheetName?: string | null | undefined, namespace?: string) => worksheetInstance | Record<string, worksheetInstance>;
|
|
96
|
+
|
|
95
97
|
interface Picker {
|
|
96
98
|
(el: HTMLElement, options: PickerOptions) : void;
|
|
97
99
|
|
|
@@ -1150,6 +1152,8 @@ declare namespace jspreadsheet {
|
|
|
1150
1152
|
zoom?: number;
|
|
1151
1153
|
/** Detect column names from the data object given when the column names are not declared. Default: true */
|
|
1152
1154
|
autoNames?: boolean;
|
|
1155
|
+
/** Ignore Undefined Columns. Default: false */
|
|
1156
|
+
ignoreUndefinedColumns?: boolean;
|
|
1153
1157
|
}
|
|
1154
1158
|
|
|
1155
1159
|
interface SpreadsheetHTMLElement extends HTMLDivElement {
|
|
@@ -1192,7 +1196,7 @@ declare namespace jspreadsheet {
|
|
|
1192
1196
|
/** Tools HTMLElement container */
|
|
1193
1197
|
tools: HTMLElement;
|
|
1194
1198
|
/** Worksheets container */
|
|
1195
|
-
worksheets: Array<
|
|
1199
|
+
worksheets: Array<worksheetInstance>;
|
|
1196
1200
|
/** Load plugins into the spreadsheet */
|
|
1197
1201
|
setPlugins: (plugins: Record<string, Function>) => void;
|
|
1198
1202
|
/** Internal method: event dispatch controllers. */
|
|
@@ -1205,7 +1209,7 @@ declare namespace jspreadsheet {
|
|
|
1205
1209
|
/** Get the worksheet name */
|
|
1206
1210
|
getWorksheetName: (position: number) => string | undefined;
|
|
1207
1211
|
/** Get the worksheet instance by its name */
|
|
1208
|
-
getWorksheetInstanceByName:
|
|
1212
|
+
getWorksheetInstanceByName: GetWorksheetInstanceByNameFunction;
|
|
1209
1213
|
/** Open a worksheet */
|
|
1210
1214
|
openWorksheet: (position: number, force?: boolean) => void;
|
|
1211
1215
|
/** Create a new worksheet */
|
|
@@ -1248,6 +1252,8 @@ declare namespace jspreadsheet {
|
|
|
1248
1252
|
|
|
1249
1253
|
type DeleteMediaItem = string | { id: string, [key: string]: any };
|
|
1250
1254
|
|
|
1255
|
+
type SetValueFirstArgument = string | { x: number, y: number, value: any, force?: boolean }[];
|
|
1256
|
+
|
|
1251
1257
|
interface worksheetInstance {
|
|
1252
1258
|
/** Array with the borders information */
|
|
1253
1259
|
borders: CustomArray<Border>;
|
|
@@ -1574,7 +1580,7 @@ declare namespace jspreadsheet {
|
|
|
1574
1580
|
setMerge(cellName: Record<string, [number, number]>): false | undefined;
|
|
1575
1581
|
setMerge(cellName: string, colspan: number, rowspan: number): false | undefined;
|
|
1576
1582
|
/** Get one or various meta information for one cell. */
|
|
1577
|
-
setMeta: (cell: string |
|
|
1583
|
+
setMeta: (cell: string | Record<string, any>, property?: string, value?: string) => false | undefined;
|
|
1578
1584
|
/** Set the nested headers */
|
|
1579
1585
|
setNestedHeaders: (config: Nested[][]) => void;
|
|
1580
1586
|
/** Deprecated. Alias for parent.setPlugins */
|
|
@@ -1600,7 +1606,7 @@ declare namespace jspreadsheet {
|
|
|
1600
1606
|
setRowId(row: Record<number, number>): void;
|
|
1601
1607
|
setRowId(row: number, newId: number): void;
|
|
1602
1608
|
/** Set the style for one cell. Ex. setStyle('A1', 'background-color', 'red') */
|
|
1603
|
-
setStyle(cell: string | string[], property: string, value?: string, forceOverwrite?: boolean): false | undefined;
|
|
1609
|
+
setStyle(cell: string | string[] | { x: number, y: number }[], property: string, value?: string, forceOverwrite?: boolean): false | undefined;
|
|
1604
1610
|
setStyle(cell: Record<string, string>, property?: undefined, value?: undefined, forceOverwrite?: boolean): false | undefined;
|
|
1605
1611
|
/**
|
|
1606
1612
|
* Set a cell value
|
|
@@ -1609,7 +1615,7 @@ declare namespace jspreadsheet {
|
|
|
1609
1615
|
* @param value
|
|
1610
1616
|
* @param force value over readonly cells
|
|
1611
1617
|
*/
|
|
1612
|
-
setValue: (cell:
|
|
1618
|
+
setValue: (cell: SetValueFirstArgument, value?: any, forceOverwrite?: boolean, origin?: string) => false | undefined;
|
|
1613
1619
|
/**
|
|
1614
1620
|
* Set a cell value
|
|
1615
1621
|
*
|
|
@@ -1747,7 +1753,7 @@ declare namespace jspreadsheet {
|
|
|
1747
1753
|
/** Delete an existing worksheet by its position */
|
|
1748
1754
|
deleteWorksheet: (position?: number) => false | undefined;
|
|
1749
1755
|
/** Rename an existing worksheet by its position */
|
|
1750
|
-
renameWorksheet: (position
|
|
1756
|
+
renameWorksheet: (position: number | undefined, title: string) => false | undefined;
|
|
1751
1757
|
/** Move the position of a worksheet. ignoreDomUpdates: true will block updates to the DOM */
|
|
1752
1758
|
moveWorksheet: (from: number, to: number, ignoreDomUpdates?: boolean) => false | undefined;
|
|
1753
1759
|
/** Get the active worksheet when applicable */
|
|
@@ -1755,7 +1761,7 @@ declare namespace jspreadsheet {
|
|
|
1755
1761
|
/** Get the worksheet name */
|
|
1756
1762
|
getWorksheetName: (position?: number) => string | undefined;
|
|
1757
1763
|
/** Get the worksheet instance by its name */
|
|
1758
|
-
getWorksheetInstanceByName:
|
|
1764
|
+
getWorksheetInstanceByName: GetWorksheetInstanceByNameFunction;
|
|
1759
1765
|
/** Set a worksheet state visibility */
|
|
1760
1766
|
setWorksheetState: (worksheetIndex: number, state: boolean) => void;
|
|
1761
1767
|
/** Parse the toolbar definitions with defaults */
|