jspreadsheet 12.2.6 → 12.2.8

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 CHANGED
@@ -38,8 +38,8 @@ declare namespace jspreadsheet {
38
38
  /** Picker */
39
39
  let picker: Picker;
40
40
 
41
- /** Pause calculations */
42
- function calculations(state: boolean) : void;
41
+ /** Calculations queue control */
42
+ let calculations: Calculations;
43
43
 
44
44
  /** Define the translations from english to any other language. Ex.{ 'hello': 'Ola', 'Successfully Saved': 'Salvo com sucesso' } */
45
45
  let setDictionary: SetDictionary;
@@ -97,6 +97,20 @@ declare namespace jspreadsheet {
97
97
 
98
98
  type GetWorksheetInstanceByNameFunction = (worksheetName?: string | null | undefined, namespace?: string) => worksheetInstance | Record<string, worksheetInstance>;
99
99
 
100
+ /** Calculations queue control interface */
101
+ interface Calculations {
102
+ /** Enable or disable calculations. When enabled, queued calculations will run automatically. */
103
+ (state: boolean): void;
104
+ /** Add a cell to the calculations queue */
105
+ add(record: { type: string; w: worksheetInstance; x: number; y: number }): void;
106
+ /** Get the current calculations queue */
107
+ get(): Set<{ type: string; w: worksheetInstance; x: number; y: number }>;
108
+ /** Get the current state of calculations (enabled/disabled) */
109
+ state(): boolean;
110
+ /** Run all calculations in the queue */
111
+ run(forceOrder?: boolean): void;
112
+ }
113
+
100
114
  interface Table {
101
115
  // Type
102
116
  type?: 'table',