jspreadsheet 10.0.2-beta.4 → 10.0.2-beta.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.
Files changed (3) hide show
  1. package/dist/index.d.ts +58 -12
  2. package/dist/index.js +632 -632
  3. package/package.json +2 -2
package/dist/index.d.ts CHANGED
@@ -285,18 +285,60 @@ declare namespace jspreadsheet {
285
285
  }
286
286
 
287
287
  interface Dropdown {
288
- /** Render type: default | picker | searchbar */
289
- type?: 'default' | 'picker' | 'searchbar';
290
- /** Dropdown input placeholder */
288
+ /** Endpoint to fetch data from a remote server */
289
+ url?: string;
290
+ /** Preloaded data items for the dropdown */
291
+ data?: DropdownItem[];
292
+ /** Format type of the data, typically { id: name } or { value: text } */
293
+ format?: number;
294
+ /** Indicates if multiple item selection is allowed */
295
+ multiple?: boolean;
296
+ /** Enables the autocomplete feature for user input */
297
+ autocomplete?: boolean;
298
+ /** Allows remote search for options */
299
+ remoteSearch?: boolean;
300
+ /** Enables the lazy loading feature for handling a large number of options */
301
+ lazyLoading?: boolean;
302
+ /** Rendering style of the dropdown: 'default', 'picker', or 'searchbar' */
303
+ type?: 'default' | 'picker' | 'searchbar',
304
+ /** Defines the dropdown's width */
305
+ width?: number;
306
+ /** Sets the maximum width of the dropdown */
307
+ maxWidth?: number;
308
+ /** Determines if the dropdown is opened when initialized */
309
+ opened?: boolean;
310
+ /** The initial value of the dropdown */
311
+ value?: string;
312
+ /** Placeholder text for the dropdown */
291
313
  placeholder?: string;
292
- /** The user can add new options to the dropdown. */
314
+ /** Allows the user to add new options */
293
315
  newOptions?: boolean;
294
- /** Enabled the remote search features. */
295
- remoteSearch?: boolean;
296
- /** Remote backend to respond to the search. */
297
- url?: string;
298
- /** When the user add a new item to the dropdown. */
299
- oninsert?: (dropdownObject: object, itemInformation: object, itemObject: object) => void;
316
+ /** Internal controller for the dropdown's position */
317
+ position?: boolean;
318
+ /** Event handler for value changes */
319
+ onchange?: (el: HTMLElement, obj: object, oldValue: string, newValue: string) => void;
320
+ /** Event handler for when the dropdown is ready */
321
+ onload?: (el: HTMLElement, obj: object, data: any, val: any) => void;
322
+ /** Event handler for when the dropdown opens */
323
+ onopen?: (el: HTMLElement) => void;
324
+ /** Event handler for when the dropdown closes */
325
+ onclose?: (el: HTMLElement) => void;
326
+ /** Event handler for when the dropdown receives focus */
327
+ onfocus?: (el: HTMLElement) => void;
328
+ /** Event handler for when the dropdown loses focus */
329
+ onblur?: (el: HTMLElement) => void;
330
+ /** Event handler for when a new option is added to the dropdown */
331
+ oninsert?: (obj: object, item: DropdownItem, newItem: DropdownItem) => void;
332
+ /** Event handler for just before a new option is added to the dropdown */
333
+ onbeforeinsert?: (obj: object, item: DropdownItem) => void;
334
+ /** Event handler for before a search on autocomplete is performed */
335
+ onbeforesearch?: (obj: object, ajaxRequest: object) => boolean | null;
336
+ /** Event handler for processing search results */
337
+ onsearch?: (obj: object, result: object) => void;
338
+ /** Toggles the sorting of dropdown elements */
339
+ sortResults?: boolean;
340
+ /** Indicates if the dropdown should automatically receive focus upon creation */
341
+ autofocus?: boolean;
300
342
  }
301
343
 
302
344
  interface DropdownItem {
@@ -361,6 +403,8 @@ declare namespace jspreadsheet {
361
403
  resetButton?: boolean;
362
404
  /** Specifies a placeholder text to display in the calendar input when no date is selected. */
363
405
  placeholder?: string;
406
+ /** Auto select confirms the current date as the new value onblur. Default: true */
407
+ autoSelect?: boolean;
364
408
  }
365
409
 
366
410
  interface DefinedNames {
@@ -581,7 +625,7 @@ declare namespace jspreadsheet {
581
625
  /** Global defined names. It defines global range variables. */
582
626
  definedNames?: Record<string, string>,
583
627
  /** Global sorting handler. */
584
- sorting?: (direction: boolean, column: number) => number;
628
+ sorting?: (direction: boolean, column: number) => (a: any, b: any) => number;
585
629
  /** Remote URL for the persistence server */
586
630
  server?: string;
587
631
  /** Enable the toolbars */
@@ -802,6 +846,8 @@ declare namespace jspreadsheet {
802
846
  snapToGrid?: boolean;
803
847
  /** Space between the table and the end of the container. Default: 100 */
804
848
  spacing?: number;
849
+ /** Pre calculation helps to calculate all formula and cache the results. Default true */
850
+ preCalculation?: boolean;
805
851
  }
806
852
 
807
853
  interface Worksheet {
@@ -1519,4 +1565,4 @@ declare namespace jspreadsheet {
1519
1565
  }
1520
1566
  }
1521
1567
 
1522
- export = jspreadsheet;
1568
+ export default jspreadsheet;