jspreadsheet 8.2.3 → 8.3.3

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
@@ -168,6 +168,8 @@ declare namespace jspreadsheet {
168
168
  source?: Array<DropdownItem> | Array<string> | Array<number>;
169
169
  /** Define the dropdown or autocomplete to accept multiple options. */
170
170
  multiple?: boolean;
171
+ /** Define the dropdown separator for multiple dropdown options. Default ; */
172
+ delimiter?: string;
171
173
  /** Define the input mask for the data cell. @see https://jsuites.net/v4/javascript-mask */
172
174
  mask?: string;
173
175
  /** Decimal representation character. */
@@ -186,12 +188,14 @@ declare namespace jspreadsheet {
186
188
  options?: Calendar | Dropdown;
187
189
  /** The column is read-only */
188
190
  readOnly?: boolean;
189
- /** Wrap the text in the column */
190
- wordWrap?: boolean;
191
191
  /** Process the raw data when copy or download. Default: true */
192
192
  process?: boolean;
193
193
  /** Try to cast numbers from a cell text. Default: true */
194
194
  autoCasting?: boolean;
195
+ /** Shift formula when copy and pasting. This option is only valid for custom column type. Default: false */
196
+ shiftFormula?: boolean;
197
+ /** Wrap the text in the column */
198
+ wrap?: boolean;
195
199
  }
196
200
 
197
201
  interface Row {
@@ -345,7 +349,7 @@ declare namespace jspreadsheet {
345
349
  onbeforesort?: (worksheet: worksheetInstance, column: number, direction: number, newOrderValues: []) => boolean | [] | void;
346
350
  /** When a column is sorted. */
347
351
  onsort?: (worksheet: worksheetInstance, column: number, direction: number, newOrderValues: []) => void;
348
- /** When the spreadsheed gets the focus. */
352
+ /** When the spreadsheet gets the focus. */
349
353
  onfocus?: (worksheet: worksheetInstance) => void;
350
354
  /** When the spreadsheet loses the focus. */
351
355
  onblur?: (worksheet: worksheetInstance) => void;
@@ -409,6 +413,8 @@ declare namespace jspreadsheet {
409
413
  * @return {any} Return false to cancel parsing. Return new parsed formula. Return void to continue with original formula
410
414
  */
411
415
  onbeforeformula?: (worksheet: worksheetInstance, expression: string, x: number, y: number) => string | false | void;
416
+ /** Get the information about the expressions executed from the formula chain */
417
+ onformulachain?: (worksheet: worksheetInstance, expressions: Array<objects>) => void;
412
418
  /** Run every single table update action. Can bring performance issues if perform too much changes. */
413
419
  updateTable?: (worksheet: worksheetInstance, cell: Object, x: number, y: number, value: String) => void;
414
420
  /** Return false to cancel the contextMenu event, or return custom elements for the contextmenu. */
@@ -565,7 +571,7 @@ declare namespace jspreadsheet {
565
571
  element: HTMLElement;
566
572
  /** DOM Element container for the filters */
567
573
  filters: HTMLElement;
568
- /** Toggle the fullscreen mode */
574
+ /** Toggle the full screen mode */
569
575
  fullscreen: (state: Boolean) => void;
570
576
  /** Get the toolbar object definitions */
571
577
  getToolbar: Toolbar,
@@ -703,8 +709,8 @@ declare namespace jspreadsheet {
703
709
  getColumnData: (col: number, processed?: boolean) => Array<any>;
704
710
  /** Get the column position by its name */
705
711
  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;
712
+ /** Alias for getProperty */
713
+ getColumnOptions: (x: number, y?: number) => Column;
708
714
  /** Get the comments from one cell. Example: getComments('A1') */
709
715
  getComments: (cellName?: string) => string;
710
716
  /** Get the worksheet settings */
@@ -730,11 +736,11 @@ declare namespace jspreadsheet {
730
736
  /** Get the footer value */
731
737
  getFooterValue: (x: number, y: number) => any;
732
738
  /** Get the header title */
733
- getHeader: (columnnumber: number) => string;
739
+ getHeader: (columnNumber: number) => string;
734
740
  /** Get all header elements */
735
741
  getHeaders: (asArray: boolean) => Array<any>;
736
- /** Get the height of one row by its position */
737
- getHeight: (row: number) => void;
742
+ /** Get the height of one row by its position when height is defined. */
743
+ getHeight: (row?: number) => Array | number;
738
744
  /** Get the highlighted coordinates **/
739
745
  getHighlighted: () => Array<any>;
740
746
  /** Get json */
@@ -743,8 +749,8 @@ declare namespace jspreadsheet {
743
749
  getLabel: (cellName: string) => Object;
744
750
  /** Get the processed data cell shown to the user by its coordinates */
745
751
  getLabelFromCoords: (x: number, y: number) => string[];
746
- /** Get the merged cells. Cellname: A1, A2, etc */
747
- getMerge: (cellName: string) => void;
752
+ /** Get the merged cells. Cell name: A1, A2, etc */
753
+ getMerge: (cellName: string) => Object | Array<number>;
748
754
  /** Get one or all meta information for one cell. */
749
755
  getMeta: (cellName: string, property: string) => Object;
750
756
  /** Get the nested cells */
@@ -755,14 +761,14 @@ declare namespace jspreadsheet {
755
761
  getNestedHeaders: () => [];
756
762
  /** Get the next available number in the sequence */
757
763
  getNextSequence: () => number;
758
- /** Get the column or cell options by coordinates */
759
- getOptions: (x: number, y: number) => object;
764
+ /** Alias to getProperty */
765
+ getOptions: (x: number, y?: number) => Column;
760
766
  /** Get the primaryKey column when applicable. */
761
767
  getPrimaryKey: () => number;
762
- /** Get processed data by the coordinates of the cell */
763
- getProcessed: (x: number, y: number, extended: boolean) => void;
764
- /** Get the properties for one column or cell */
765
- getProperties: (x: number, y: number) => void;
768
+ /** Get processed data by the coordinates of the cell. Extended process a color, progressbar and rating as raw. */
769
+ getProcessed: (x: number, y: number, extended?: boolean) => any;
770
+ /** Get the properties for one column when only x is present or the cell when x and y is defined. */
771
+ getProperties: (x: number, y?: number) => Column;
766
772
  /** Get the selection in a range format */
767
773
  getRange: () => string;
768
774
  /** Get a row data or meta information by Id. */
@@ -773,20 +779,18 @@ declare namespace jspreadsheet {
773
779
  getRowId: (row: number) => number;
774
780
  /** Get all selected cells */
775
781
  getSelected: (columnNameOnly: boolean) => any[];
776
- /** Get the selected columns */
777
- getSelectedColumns: () => [];
778
- /** Get the selected rows */
779
- getSelectedRows: () => [];
782
+ /** Get the selected columns. DOMElements or Indexes */
783
+ getSelectedColumns: (indexes?: Boolean) => Array<HTMLElement> | Array<number>;
784
+ /** Get the selected rows. DOMElements or Indexes */
785
+ getSelectedRows: (indexes?: Boolean) => Array<HTMLElement> | Array<number>;
780
786
  /** Get the style from one cell. Ex. getStyle('A1') */
781
787
  getStyle: (cell: string) => Object;
782
- /** Get value by the cellname or object. The value can be the raw or processed value. */
788
+ /** Get value by the cell name or object. The value can be the raw or processed value. */
783
789
  getValue: (cell: string, processed: boolean) => String;
784
790
  /** Get value by the coordinates. The value can be the raw or processed value. */
785
- getValueFromCoords: (x: number, y: number, processed: boolean) => void;
786
- /** Get the width of one column by its position */
787
- getWidth: (x: number) => void;
788
- /** Get the editor type for one column or cell */
789
- getType: (x: number, y: number) => void;
791
+ getValueFromCoords: (x: number, y: number, processed: boolean) => any;
792
+ /** Get the width of one column by index or all column width as an array when index is null. */
793
+ getWidth: (x?: index) => Array<number> | number;
790
794
  /** Go to the row number, [col number] **/
791
795
  goto: (y: number, x?: number) => void;
792
796
  /** Hold the header container */
@@ -839,7 +843,7 @@ declare namespace jspreadsheet {
839
843
  page: (pagenumber: number) => void;
840
844
  /** Current page number */
841
845
  pagenumber: number;
842
- /** Pagination DOM containr */
846
+ /** Pagination DOM container */
843
847
  pagination: Object;
844
848
  /** Spreadsheet object */
845
849
  parent: spreadsheetInstance;
@@ -855,7 +859,7 @@ declare namespace jspreadsheet {
855
859
  refreshBorders: (border?: string) => void;
856
860
  /** Refresh footers */
857
861
  refreshFooter: () => void;
858
- /** Remove the merged cells by the cellname */
862
+ /** Remove the merged cells by the cell name */
859
863
  removeMerge: (cellName: String) => void;
860
864
  /** Reset the borders by name border name */
861
865
  resetBorders: (border: String, resetPosition: boolean) => void;