jspreadsheet 8.1.16 → 8.2.4

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
@@ -345,7 +345,7 @@ declare namespace jspreadsheet {
345
345
  onbeforesort?: (worksheet: worksheetInstance, column: number, direction: number, newOrderValues: []) => boolean | [] | void;
346
346
  /** When a column is sorted. */
347
347
  onsort?: (worksheet: worksheetInstance, column: number, direction: number, newOrderValues: []) => void;
348
- /** When the spreadsheed gets the focus. */
348
+ /** When the spreadsheet gets the focus. */
349
349
  onfocus?: (worksheet: worksheetInstance) => void;
350
350
  /** When the spreadsheet loses the focus. */
351
351
  onblur?: (worksheet: worksheetInstance) => void;
@@ -454,7 +454,7 @@ declare namespace jspreadsheet {
454
454
  defaultColWidth?: number | string;
455
455
  /** Default row height. Default: null */
456
456
  defaultRowHeight?: number | string;
457
- /** Default alignment for a new column: [center, left, right] */
457
+ /** Deprecated. The default alignment of a cell is defined by a CSS class from 8.2.0+ */
458
458
  defaultColAlign?: 'center' | 'left' | 'right' | 'justify';
459
459
  /** Minimum number of spare rows. Default: 0 */
460
460
  minSpareRows?: number;
@@ -556,7 +556,7 @@ declare namespace jspreadsheet {
556
556
  /** Contextmenu HTMLElement */
557
557
  contextmenu: HTMLElement;
558
558
  /** Create a new worksheet from the given settings */
559
- createWorksheet: (options: Worksheet) => void;
559
+ createWorksheet: (options: Worksheet) => worksheetInstance;
560
560
  /** Delete an existing worksheet by its position */
561
561
  deleteWorksheet: (position: Number) => void;
562
562
  /** DOM Element */
@@ -565,7 +565,7 @@ declare namespace jspreadsheet {
565
565
  element: HTMLElement;
566
566
  /** DOM Element container for the filters */
567
567
  filters: HTMLElement;
568
- /** Toggle the fullscreen mode */
568
+ /** Toggle the full screen mode */
569
569
  fullscreen: (state: Boolean) => void;
570
570
  /** Get the toolbar object definitions */
571
571
  getToolbar: Toolbar,
@@ -647,7 +647,7 @@ declare namespace jspreadsheet {
647
647
  /** DOM Corner square */
648
648
  corner: HTMLElement;
649
649
  /** Create a new worksheet */
650
- createWorksheet: (worksheetOptions: Worksheet) => void;
650
+ createWorksheet: (worksheetOptions: Worksheet) => worksheetInstance;
651
651
  /** Internal selected cell */
652
652
  cursor: object;
653
653
  /** Cut */
@@ -703,8 +703,8 @@ declare namespace jspreadsheet {
703
703
  getColumnData: (col: number, processed?: boolean) => Array<any>;
704
704
  /** Get the column position by its name */
705
705
  getColumnIdByName: (name: string) => number;
706
- /** Get the settings for one column. Row its optional when need to get the information from one specific cell. */
707
- getColumnOptions: (x: number, y: number) => void;
706
+ /** Alias for getProperty */
707
+ getColumnOptions: (x: number, y?: number) => Column;
708
708
  /** Get the comments from one cell. Example: getComments('A1') */
709
709
  getComments: (cellName?: string) => string;
710
710
  /** Get the worksheet settings */
@@ -714,9 +714,11 @@ declare namespace jspreadsheet {
714
714
  *
715
715
  * @param {boolean} only the selected cells
716
716
  * @param {boolean} get the raw or processed data
717
- * @return {array} array of data
717
+ * @param {string} delimiter to get the data as a string with columns separate by the char delimiter.
718
+ * @param {boolean} get the data as a JSON object.
719
+ * @return {array|object} array or object with the data
718
720
  */
719
- getData: (highlighted?: boolean, processed?: boolean, delimiter?: string) => Array<any>;
721
+ getData: (highlighted?: boolean, processed?: boolean, delimiter?: string, asJson?: boolean) => Array<any> | String;
720
722
  /** Get the defined name or defined names when key is null */
721
723
  getDefinedNames: (key?: string) => object;
722
724
  /** Internal method: Get the editor for one cell */
@@ -728,11 +730,11 @@ declare namespace jspreadsheet {
728
730
  /** Get the footer value */
729
731
  getFooterValue: (x: number, y: number) => any;
730
732
  /** Get the header title */
731
- getHeader: (columnnumber: number) => string;
733
+ getHeader: (columnNumber: number) => string;
732
734
  /** Get all header elements */
733
735
  getHeaders: (asArray: boolean) => Array<any>;
734
- /** Get the height of one row by its position */
735
- getHeight: (row: number) => void;
736
+ /** Get the height of one row by its position when height is defined. */
737
+ getHeight: (row?: number) => Array | number;
736
738
  /** Get the highlighted coordinates **/
737
739
  getHighlighted: () => Array<any>;
738
740
  /** Get json */
@@ -741,8 +743,8 @@ declare namespace jspreadsheet {
741
743
  getLabel: (cellName: string) => Object;
742
744
  /** Get the processed data cell shown to the user by its coordinates */
743
745
  getLabelFromCoords: (x: number, y: number) => string[];
744
- /** Get the merged cells. Cellname: A1, A2, etc */
745
- getMerge: (cellName: string) => void;
746
+ /** Get the merged cells. Cell name: A1, A2, etc */
747
+ getMerge: (cellName: string) => Object | Array<number>;
746
748
  /** Get one or all meta information for one cell. */
747
749
  getMeta: (cellName: string, property: string) => Object;
748
750
  /** Get the nested cells */
@@ -753,14 +755,14 @@ declare namespace jspreadsheet {
753
755
  getNestedHeaders: () => [];
754
756
  /** Get the next available number in the sequence */
755
757
  getNextSequence: () => number;
756
- /** Get the column or cell options by coordinates */
757
- getOptions: (x: number, y: number) => object;
758
+ /** Alias to getProperty */
759
+ getOptions: (x: number, y?: number) => Column;
758
760
  /** Get the primaryKey column when applicable. */
759
761
  getPrimaryKey: () => number;
760
- /** Get processed data by the coordinates of the cell */
761
- getProcessed: (x: number, y: number, extended: boolean) => void;
762
- /** Get the properties for one column or cell */
763
- getProperties: (x: number, y: number) => void;
762
+ /** Get processed data by the coordinates of the cell. Extended process a color, progressbar and rating as raw. */
763
+ getProcessed: (x: number, y: number, extended?: boolean) => any;
764
+ /** Get the properties for one column when only x is present or the cell when x and y is defined. */
765
+ getProperties: (x: number, y?: number) => Column;
764
766
  /** Get the selection in a range format */
765
767
  getRange: () => string;
766
768
  /** Get a row data or meta information by Id. */
@@ -771,20 +773,18 @@ declare namespace jspreadsheet {
771
773
  getRowId: (row: number) => number;
772
774
  /** Get all selected cells */
773
775
  getSelected: (columnNameOnly: boolean) => any[];
774
- /** Get the selected columns */
775
- getSelectedColumns: () => [];
776
- /** Get the selected rows */
777
- getSelectedRows: () => [];
776
+ /** Get the selected columns. DOMElements or Indexes */
777
+ getSelectedColumns: (indexes?: Boolean) => Array<HTMLElement> | Array<number>;
778
+ /** Get the selected rows. DOMElements or Indexes */
779
+ getSelectedRows: (indexes?: Boolean) => Array<HTMLElement> | Array<number>;
778
780
  /** Get the style from one cell. Ex. getStyle('A1') */
779
781
  getStyle: (cell: string) => Object;
780
- /** Get value by the cellname or object. The value can be the raw or processed value. */
782
+ /** Get value by the cell name or object. The value can be the raw or processed value. */
781
783
  getValue: (cell: string, processed: boolean) => String;
782
784
  /** Get value by the coordinates. The value can be the raw or processed value. */
783
- getValueFromCoords: (x: number, y: number, processed: boolean) => void;
784
- /** Get the width of one column by its position */
785
- getWidth: (x: number) => void;
786
- /** Get the editor type for one column or cell */
787
- getType: (x: number, y: number) => void;
785
+ getValueFromCoords: (x: number, y: number, processed: boolean) => any;
786
+ /** Get the width of one column by index or all column width as an array when index is null. */
787
+ getWidth: (x?: index) => Array<number> | number;
788
788
  /** Go to the row number, [col number] **/
789
789
  goto: (y: number, x?: number) => void;
790
790
  /** Hold the header container */
@@ -837,7 +837,7 @@ declare namespace jspreadsheet {
837
837
  page: (pagenumber: number) => void;
838
838
  /** Current page number */
839
839
  pagenumber: number;
840
- /** Pagination DOM containr */
840
+ /** Pagination DOM container */
841
841
  pagination: Object;
842
842
  /** Spreadsheet object */
843
843
  parent: spreadsheetInstance;
@@ -853,7 +853,7 @@ declare namespace jspreadsheet {
853
853
  refreshBorders: (border?: string) => void;
854
854
  /** Refresh footers */
855
855
  refreshFooter: () => void;
856
- /** Remove the merged cells by the cellname */
856
+ /** Remove the merged cells by the cell name */
857
857
  removeMerge: (cellName: String) => void;
858
858
  /** Reset the borders by name border name */
859
859
  resetBorders: (border: String, resetPosition: boolean) => void;