jspreadsheet 12.0.4 → 12.0.6
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 +26 -16
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -144,9 +144,22 @@ declare namespace jspreadsheet {
|
|
|
144
144
|
translate: (text: string, substitutions: string[]) => string;
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
+
interface Shortcut {
|
|
148
|
+
key?: string,
|
|
149
|
+
code?: string,
|
|
150
|
+
handler: (event: KeyboardEvent, internalEvent: object) => void,
|
|
151
|
+
ctrlKey?: boolean,
|
|
152
|
+
altKey?: boolean,
|
|
153
|
+
shiftKey?: boolean,
|
|
154
|
+
}
|
|
155
|
+
|
|
147
156
|
interface Shortcuts {
|
|
148
|
-
|
|
149
|
-
|
|
157
|
+
// Get the first shortcut based on the event properties
|
|
158
|
+
get: (event: Shortcut | KeyboardEvent) => Function | null;
|
|
159
|
+
// Create a new shortcut with the defined properties
|
|
160
|
+
set: (shortcut: Shortcut) => void;
|
|
161
|
+
// Remove the shortcut that matches the defined properties
|
|
162
|
+
reset: (shortcut: Shortcut) => void;
|
|
150
163
|
}
|
|
151
164
|
|
|
152
165
|
interface PickerOptions {
|
|
@@ -621,24 +634,26 @@ declare namespace jspreadsheet {
|
|
|
621
634
|
}
|
|
622
635
|
|
|
623
636
|
interface ContextmenuItem {
|
|
624
|
-
/** Context menu item type: line |
|
|
625
|
-
type?: 'line' | '
|
|
637
|
+
/** Context menu item type: line | default */
|
|
638
|
+
type?: 'line' | 'default';
|
|
626
639
|
/** Context menu item title */
|
|
627
640
|
title: string;
|
|
628
641
|
/** Context menu icon key. (Material icon key icon identification) */
|
|
629
642
|
icon?: string;
|
|
630
|
-
/** HTML id property of the item DOM element */
|
|
631
|
-
id?: string;
|
|
632
643
|
/** Item is disabled */
|
|
633
644
|
disabled?: boolean;
|
|
634
|
-
/** Onclick event for the contextmenu item */
|
|
635
|
-
onclick?: (instance: object, e: MouseEvent) => void;
|
|
636
645
|
/** A short description or instruction for the item. Normally a shortcut. Ex. CTRL + C */
|
|
637
646
|
shortcut?: string;
|
|
638
647
|
/** Show this text when the user mouse over the element */
|
|
639
648
|
tooltip?: string;
|
|
640
649
|
/** Submenu */
|
|
641
650
|
submenu?: Array<ContextmenuItem>;
|
|
651
|
+
/** Onclick event for the contextmenu item */
|
|
652
|
+
onclick?: (e: MouseEvent, element: HTMLElement) => void;
|
|
653
|
+
/** onopen event */
|
|
654
|
+
onopen?: (self: object) => void;
|
|
655
|
+
/** onclose event */
|
|
656
|
+
onclose?: (self: object) => void;
|
|
642
657
|
}
|
|
643
658
|
|
|
644
659
|
interface Contextmenu {
|
|
@@ -1183,6 +1198,8 @@ declare namespace jspreadsheet {
|
|
|
1183
1198
|
tableHeight?: number | string;
|
|
1184
1199
|
/** Define the table overflow width. Example: '800px' */
|
|
1185
1200
|
tableWidth?: number | string;
|
|
1201
|
+
/** Resizable */
|
|
1202
|
+
resizable?: boolean;
|
|
1186
1203
|
}
|
|
1187
1204
|
|
|
1188
1205
|
interface Worksheet {
|
|
@@ -1294,8 +1311,6 @@ declare namespace jspreadsheet {
|
|
|
1294
1311
|
selectUnLockedCells?: boolean;
|
|
1295
1312
|
/** Allow the selection of locked cells. Default: true. */
|
|
1296
1313
|
selectLockedCells?: boolean;
|
|
1297
|
-
/** Enable resizable worksheet in on or both direction (horizontal | vertical | both). Default: none */
|
|
1298
|
-
resize?: 'horizontal' | 'vertical' | 'both' | 'none' | undefined;
|
|
1299
1314
|
/** Show the worksheet gridlines. Default: true */
|
|
1300
1315
|
gridline?: boolean;
|
|
1301
1316
|
/** Floating images or charts. */
|
|
@@ -1536,8 +1551,6 @@ declare namespace jspreadsheet {
|
|
|
1536
1551
|
getOptions: (x: number, y?: number) => Cell | ColumnInstance | undefined;
|
|
1537
1552
|
/** Get processed data by the coordinates of the cell. Extended process a color, progressbar and rating as raw. */
|
|
1538
1553
|
getProcessed: (x: number, y: number, extended?: boolean) => any;
|
|
1539
|
-
/** Get the properties for one column when only x is present or the cell when x and y is defined. */
|
|
1540
|
-
getProperties: (x: number, y?: number) => Cell | ColumnInstance | undefined;
|
|
1541
1554
|
/** Deprecated. Legacy alias to getProperties */
|
|
1542
1555
|
getProperty: (x: number, y?: number) => Cell | ColumnInstance | undefined;
|
|
1543
1556
|
/** Get the selection in a range format */
|
|
@@ -1804,11 +1817,8 @@ declare namespace jspreadsheet {
|
|
|
1804
1817
|
/** Add a new configuration setting for a column or cell */
|
|
1805
1818
|
setProperty(columnNumber: number, rowNumber: number, cellSettings?: Cell): boolean;
|
|
1806
1819
|
setProperty(columnNumber: number, columnSettings: Column): boolean;
|
|
1807
|
-
setProperty(changes: ({ x: number, value: Column } | { x: number, y: number, value: Cell })[]): boolean;
|
|
1820
|
+
setProperty(changes: ({ x: number, value: Column } | { x: number, y: number, value: Cell, update?: boolean })[]): boolean;
|
|
1808
1821
|
setProperty(changes: Record<string, Cell>): boolean;
|
|
1809
|
-
/** Add new properties to the existing column or cell settings */
|
|
1810
|
-
updateProperty(columnNumber: number, rowNumber: number, cellSettings?: Cell, ignoreDOM?: boolean): void;
|
|
1811
|
-
updateProperty(columnNumber: ({ x: number, value: Column } | { x: number, y: number, value: Cell })[], rowNumber?: undefined, cellSettings?: undefined, ignoreDOM?: boolean): void;
|
|
1812
1822
|
/** Set or reset the cell as readonly */
|
|
1813
1823
|
setReadOnly: (cellName: string|HTMLElement, state: boolean) => void;
|
|
1814
1824
|
/** Set the data from one row */
|
package/package.json
CHANGED