@trebco/treb 23.1.2 → 23.1.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/treb.d.ts CHANGED
@@ -94,7 +94,7 @@ export interface SheetScrollOptions {
94
94
  /**
95
95
  * function type used for filtering tables
96
96
  */
97
- export declare type TableFilterFunction = (value: CellValue, calculated_value: CellValue, style: Style.Properties) => boolean;
97
+ export type TableFilterFunction = (value: CellValue, calculated_value: CellValue, style: Style.Properties) => boolean;
98
98
 
99
99
  /**
100
100
  * embedded spreadsheet
@@ -315,7 +315,7 @@ export declare class EmbeddedSpreadsheet {
315
315
  DeleteColumns(start_column?: number, count?: number): void;
316
316
 
317
317
  /**
318
- * sort a table. the reference can be the table name, or a cell in the table.
318
+ * filter a table. the reference can be the table name, or a cell in the table.
319
319
  * if the reference is an area (range), we're going to look at the top-left
320
320
  * cell.
321
321
  *
@@ -920,7 +920,7 @@ export declare namespace Style {
920
920
  locked?: boolean;
921
921
  }
922
922
  }
923
- export declare type CellValue = undefined | string | number | boolean | Complex | DimensionedQuantity;
923
+ export type CellValue = undefined | string | number | boolean | Complex | DimensionedQuantity;
924
924
 
925
925
  /**
926
926
  * Complex number type
@@ -938,13 +938,13 @@ export interface DimensionedQuantity {
938
938
  * type represents a reference passed in to API functions. it can be an
939
939
  * address object, or a string.
940
940
  */
941
- export declare type AddressReference = string | ICellAddress;
941
+ export type AddressReference = string | ICellAddress;
942
942
 
943
943
  /**
944
944
  * type represents a reference passed in to API functions. it can be an
945
945
  * address object, an area (range) object, or a string.
946
946
  */
947
- export declare type RangeReference = string | ICellAddress | IArea;
947
+ export type RangeReference = string | ICellAddress | IArea;
948
948
  export interface TableSortOptions {
949
949
 
950
950
  /**
@@ -954,13 +954,17 @@ export interface TableSortOptions {
954
954
  */
955
955
  column: number;
956
956
 
957
- /** sort type. defaults to 'text'. */
957
+ /**
958
+ * sort type. defaults to 'auto'. 'auto' looks at the values in the column,
959
+ * and uses text sort if there are more strings, or numeric if there are
960
+ * more numbers. if it's even, sorts as text.
961
+ */
958
962
  type: TableSortType;
959
963
 
960
964
  /** ascending sort. defaults to true. */
961
965
  asc: boolean;
962
966
  }
963
- export declare type TableSortType = 'text' | 'numeric';
967
+ export type TableSortType = 'text' | 'numeric' | 'auto';
964
968
 
965
969
  /**
966
970
  * options for exporting CSV/TSV
@@ -1157,7 +1161,7 @@ export declare type LoadSource = "drag-and-drop" | "local-file" | "network-file"
1157
1161
  * EmbeddedSheetEvent is a discriminated union. Switch on the `type` field
1158
1162
  * of the event.
1159
1163
  */
1160
- export declare type EmbeddedSheetEvent = DocumentChangeEvent | DocumentResetEvent | DocumentLoadEvent | DataChangeEvent | SelectionEvent | ResizeEvent;
1164
+ export type EmbeddedSheetEvent = DocumentChangeEvent | DocumentResetEvent | DocumentLoadEvent | DataChangeEvent | SelectionEvent | ResizeEvent;
1161
1165
  export interface ResizeEvent {
1162
1166
  type: 'resize';
1163
1167
  }