jspreadsheet 11.0.17 → 11.0.19

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
@@ -97,7 +97,7 @@ declare namespace jspreadsheet {
97
97
 
98
98
  /** Images */
99
99
  interface Media {
100
- type: 'image' | 'chart',
100
+ type: 'image' | 'chart' | 'shape',
101
101
  src?: string,
102
102
  top?: number,
103
103
  left?: number,
@@ -645,18 +645,18 @@ declare namespace jspreadsheet {
645
645
 
646
646
  interface Editor {
647
647
  /** createCell When a new cell is created. */
648
- createCell?: (cell: HTMLElement, value: any, x: number, y: number, instance: object, options: object) => any;
648
+ createCell?: (cell: HTMLTableCellElement, value: any, x: number, y: number, instance: worksheetInstance, options: Column | Cell) => any;
649
649
  /** updateCell When the cell value changes. */
650
- updateCell?: (cell: HTMLElement, value: any, x: number, y: number, instance: object, options: object) => any;
650
+ updateCell?: (cell: HTMLTableCellElement, value: any, x: number, y: number, instance: worksheetInstance, options: Column | Cell) => any;
651
651
  /** openEditor When the user starts the edition of a cell. */
652
- openEditor?: (cell: HTMLElement, value: any, x: number, y: number, instance: object, options: object) => any;
652
+ openEditor?: (cell: HTMLTableCellElement, value: any, x: number, y: number, instance: worksheetInstance, options: Column | Cell) => any;
653
653
  /** closeEditor When the user finalizes the edition of a cell. */
654
- closeEditor?: (cell: HTMLElement, confirmChanges: boolean, x: number, y: number, instance: object, options: object) => any;
654
+ closeEditor?: (cell: HTMLTableCellElement, confirmChanges: boolean, x: number, y: number, instance: worksheetInstance, options: Column | Cell) => any;
655
655
  /** When a cell is destroyed. */
656
- destroyCell?: (cell: HTMLElement, x: number, y: number, instance: object) => void;
656
+ destroyCell?: (cell: HTMLTableCellElement, x: number, y: number, instance: worksheetInstance) => void;
657
657
  /** Apply updates when the properties of a cell or column is changed. */
658
- updateProperty?: (x: number, y: number, instance: object, options: object) => void;
659
- /** Transform the raw data into processed data. It will shown a text instead of an id in the type dropdown for example. */
658
+ updateProperty?: (x: number, y: number, instance: worksheetInstance, options: Column | Cell) => void;
659
+ /** Transform the raw data into processed data. It will show a text instead of an id in the type dropdown for example. */
660
660
  get?: (options: object, value: any) => string
661
661
  }
662
662
 
@@ -691,8 +691,10 @@ declare namespace jspreadsheet {
691
691
  interface Spreadsheet {
692
692
  /** Your application name */
693
693
  application?: string;
694
- /** Render a remote spreadsheet from Jspreadsheet Cloud, which is a serveless hosting service. That can be generate at https://jspreadsheet.com/cloud */
694
+ /** Deprecated */
695
695
  cloud?: string;
696
+ /** Remote configuration with Jspreadsheet Server */
697
+ guid?: string;
696
698
  /** DOM element for binding the javascript events. This property is normally used when JSS is running as a web component. */
697
699
  root?: HTMLElement;
698
700
  /** Global defined names. It defines global range variables. */
@@ -727,8 +729,10 @@ declare namespace jspreadsheet {
727
729
  autoIncrement?: boolean;
728
730
  /** Try to cast numbers from cell values when executing formulas. Default: true */
729
731
  autoCasting?: boolean;
730
- /** Remove any HTML from the data and headers. Default: true */
732
+ /** Deprecated */
731
733
  stripHTML?: boolean;
734
+ /** Parse HTML. Default: false (Use this with caution) */
735
+ parseHTML?: boolean;
732
736
  /** Allow bar when extension bar is enabled. Default: true */
733
737
  bar?: boolean;
734
738
  /** Allow tabs. Default: false */
@@ -784,9 +788,9 @@ declare namespace jspreadsheet {
784
788
  /** After a column is excluded. */
785
789
  ondeletecolumn?: (worksheet: worksheetInstance, cols: number[]) => void;
786
790
  /** After a row is moved to a new position. */
787
- onmoverow?: (worksheet: worksheetInstance, origin: number, destination: number) => void;
791
+ onmoverow?: (worksheet: worksheetInstance, origin: number, destination: number, quantityOfRows: number) => void;
788
792
  /** After a column is moved to a new position. */
789
- onmovecolumn?: (worksheet: worksheetInstance, origin: number, destination: number) => void;
793
+ onmovecolumn?: (worksheet: worksheetInstance, origin: number, destination: number, quantityOfColumns: number) => void;
790
794
  /** After a height change for one or more rows. */
791
795
  onresizerow?: (worksheet: worksheetInstance, row: number | Array<number>, height: number | Array<number>, oldHeight: number | Array<number>) => void;
792
796
  /** After a column width change for one or more columns. */
@@ -1173,7 +1177,7 @@ declare namespace jspreadsheet {
1173
1177
  /** Array with the borders information */
1174
1178
  borders: Border[] | Border;
1175
1179
  /** Close the edition for one cell */
1176
- closeEditor: (cell: HTMLElement, save: boolean) => void;
1180
+ closeEditor: (cell: HTMLElement|null, save: boolean) => void;
1177
1181
  /** Close the filters */
1178
1182
  closeFilters: (update: boolean) => void;
1179
1183
  /** Array with the HTML element references that define the columns */
@@ -1194,7 +1198,7 @@ declare namespace jspreadsheet {
1194
1198
  data: (highlighted?: boolean, processed?: boolean, delimiter?: string, asJson?: boolean) => Array<Array<any>> | Array<Record<string, any>> | string | null;
1195
1199
  /** Internal use control type to defined JSON (1) or ARRAY (0). */
1196
1200
  dataType: number,
1197
- /** Delete one more more columns */
1201
+ /** Delete one more columns */
1198
1202
  deleteColumn: (columnNumber: number|number[], numOfColumns?: number) => void;
1199
1203
  /** Delete an existing row or rows */
1200
1204
  deleteRow: (rowNumber: number|number[], numOfRows?: number) => void;
@@ -1557,8 +1561,8 @@ declare namespace jspreadsheet {
1557
1561
  updateSelectionFromCoords: (x1: number, y1: number, x2?: number, y2?: number, origin?: boolean, type?: string, color?: string) => void;
1558
1562
  /** Getter/setter the value by coordinates */
1559
1563
  value?: (x: number, y: number, value?: any) => void;
1560
- /** Which page the row number is */
1561
- whichPage?: (row: number) => number;
1564
+ /** Current page or which page the row number is */
1565
+ whichPage?: (row?: number) => number;
1562
1566
  /** Get all group of rows */
1563
1567
  getRowGroup: () => object;
1564
1568
  /** Create a new group of rows */