@jspreadsheet/bundle 12.2.3 → 12.2.10

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
@@ -44,8 +44,8 @@ declare namespace jspreadsheet {
44
44
  /** Picker */
45
45
  let picker: Picker;
46
46
 
47
- /** Pause calculations */
48
- function calculations(state: boolean) : void;
47
+ /** Calculations queue control */
48
+ let calculations: Calculations;
49
49
 
50
50
  /** Define the translations from english to any other language. Ex.{ 'hello': 'Ola', 'Successfully Saved': 'Salvo com sucesso' } */
51
51
  let setDictionary: SetDictionary;
@@ -103,6 +103,20 @@ declare namespace jspreadsheet {
103
103
 
104
104
  type GetWorksheetInstanceByNameFunction = (worksheetName?: string | null | undefined, namespace?: string) => worksheetInstance | Record<string, worksheetInstance>;
105
105
 
106
+ /** Calculations queue control interface */
107
+ interface Calculations {
108
+ /** Enable or disable calculations. When enabled, queued calculations will run automatically. */
109
+ (state: boolean): void;
110
+ /** Add a cell to the calculations queue */
111
+ add(record: { type: string; w: worksheetInstance; x: number; y: number }): void;
112
+ /** Get the current calculations queue */
113
+ get(): Set<{ type: string; w: worksheetInstance; x: number; y: number }>;
114
+ /** Get the current state of calculations (enabled/disabled) */
115
+ state(): boolean;
116
+ /** Run all calculations in the queue */
117
+ run(forceOrder?: boolean): void;
118
+ }
119
+
106
120
  interface Table {
107
121
  // Type
108
122
  type?: 'table',
@@ -2278,6 +2292,8 @@ declare namespace render {
2278
2292
  onbeforesave?: (blob: object) => void | boolean;
2279
2293
  /** When finish */
2280
2294
  onsuccess?: (blog: object) => void;
2295
+ /** Compress the content. Default: true */
2296
+ compress?: boolean;
2281
2297
  }
2282
2298
 
2283
2299
  /** Set the license */