jspreadsheet 11.11.1 → 11.11.2
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 +12 -8
- package/dist/index.js +566 -565
- package/package.json +1 -1
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
|
|
|
@@ -1192,7 +1194,7 @@ declare namespace jspreadsheet {
|
|
|
1192
1194
|
/** Tools HTMLElement container */
|
|
1193
1195
|
tools: HTMLElement;
|
|
1194
1196
|
/** Worksheets container */
|
|
1195
|
-
worksheets: Array<
|
|
1197
|
+
worksheets: Array<worksheetInstance>;
|
|
1196
1198
|
/** Load plugins into the spreadsheet */
|
|
1197
1199
|
setPlugins: (plugins: Record<string, Function>) => void;
|
|
1198
1200
|
/** Internal method: event dispatch controllers. */
|
|
@@ -1205,7 +1207,7 @@ declare namespace jspreadsheet {
|
|
|
1205
1207
|
/** Get the worksheet name */
|
|
1206
1208
|
getWorksheetName: (position: number) => string | undefined;
|
|
1207
1209
|
/** Get the worksheet instance by its name */
|
|
1208
|
-
getWorksheetInstanceByName:
|
|
1210
|
+
getWorksheetInstanceByName: GetWorksheetInstanceByNameFunction;
|
|
1209
1211
|
/** Open a worksheet */
|
|
1210
1212
|
openWorksheet: (position: number, force?: boolean) => void;
|
|
1211
1213
|
/** Create a new worksheet */
|
|
@@ -1248,6 +1250,8 @@ declare namespace jspreadsheet {
|
|
|
1248
1250
|
|
|
1249
1251
|
type DeleteMediaItem = string | { id: string, [key: string]: any };
|
|
1250
1252
|
|
|
1253
|
+
type SetValueFirstArgument = string | { x: number, y: number, value: any, force?: boolean }[];
|
|
1254
|
+
|
|
1251
1255
|
interface worksheetInstance {
|
|
1252
1256
|
/** Array with the borders information */
|
|
1253
1257
|
borders: CustomArray<Border>;
|
|
@@ -1574,7 +1578,7 @@ declare namespace jspreadsheet {
|
|
|
1574
1578
|
setMerge(cellName: Record<string, [number, number]>): false | undefined;
|
|
1575
1579
|
setMerge(cellName: string, colspan: number, rowspan: number): false | undefined;
|
|
1576
1580
|
/** Get one or various meta information for one cell. */
|
|
1577
|
-
setMeta: (cell: string |
|
|
1581
|
+
setMeta: (cell: string | Record<string, any>, property?: string, value?: string) => false | undefined;
|
|
1578
1582
|
/** Set the nested headers */
|
|
1579
1583
|
setNestedHeaders: (config: Nested[][]) => void;
|
|
1580
1584
|
/** Deprecated. Alias for parent.setPlugins */
|
|
@@ -1600,7 +1604,7 @@ declare namespace jspreadsheet {
|
|
|
1600
1604
|
setRowId(row: Record<number, number>): void;
|
|
1601
1605
|
setRowId(row: number, newId: number): void;
|
|
1602
1606
|
/** 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;
|
|
1607
|
+
setStyle(cell: string | string[] | { x: number, y: number }[], property: string, value?: string, forceOverwrite?: boolean): false | undefined;
|
|
1604
1608
|
setStyle(cell: Record<string, string>, property?: undefined, value?: undefined, forceOverwrite?: boolean): false | undefined;
|
|
1605
1609
|
/**
|
|
1606
1610
|
* Set a cell value
|
|
@@ -1609,7 +1613,7 @@ declare namespace jspreadsheet {
|
|
|
1609
1613
|
* @param value
|
|
1610
1614
|
* @param force value over readonly cells
|
|
1611
1615
|
*/
|
|
1612
|
-
setValue: (cell:
|
|
1616
|
+
setValue: (cell: SetValueFirstArgument, value?: any, forceOverwrite?: boolean, origin?: string) => false | undefined;
|
|
1613
1617
|
/**
|
|
1614
1618
|
* Set a cell value
|
|
1615
1619
|
*
|
|
@@ -1747,7 +1751,7 @@ declare namespace jspreadsheet {
|
|
|
1747
1751
|
/** Delete an existing worksheet by its position */
|
|
1748
1752
|
deleteWorksheet: (position?: number) => false | undefined;
|
|
1749
1753
|
/** Rename an existing worksheet by its position */
|
|
1750
|
-
renameWorksheet: (position
|
|
1754
|
+
renameWorksheet: (position: number | undefined, title: string) => false | undefined;
|
|
1751
1755
|
/** Move the position of a worksheet. ignoreDomUpdates: true will block updates to the DOM */
|
|
1752
1756
|
moveWorksheet: (from: number, to: number, ignoreDomUpdates?: boolean) => false | undefined;
|
|
1753
1757
|
/** Get the active worksheet when applicable */
|
|
@@ -1755,7 +1759,7 @@ declare namespace jspreadsheet {
|
|
|
1755
1759
|
/** Get the worksheet name */
|
|
1756
1760
|
getWorksheetName: (position?: number) => string | undefined;
|
|
1757
1761
|
/** Get the worksheet instance by its name */
|
|
1758
|
-
getWorksheetInstanceByName:
|
|
1762
|
+
getWorksheetInstanceByName: GetWorksheetInstanceByNameFunction;
|
|
1759
1763
|
/** Set a worksheet state visibility */
|
|
1760
1764
|
setWorksheetState: (worksheetIndex: number, state: boolean) => void;
|
|
1761
1765
|
/** Parse the toolbar definitions with defaults */
|