@trebco/treb 23.1.2 → 23.1.7
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/package.json +1 -1
- package/treb-bundle.css +2 -2
- package/treb-bundle.mjs +9 -9
- package/treb.d.ts +13 -9
package/treb.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! API v23.1. Copyright 2018-
|
|
1
|
+
/*! API v23.1. Copyright 2018-2023 trebco, llc. All rights reserved. LGPL: https://treb.app/license */
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Global instance. In the base script, this object will be created as an
|
|
@@ -94,7 +94,7 @@ export interface SheetScrollOptions {
|
|
|
94
94
|
/**
|
|
95
95
|
* function type used for filtering tables
|
|
96
96
|
*/
|
|
97
|
-
export
|
|
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
|
-
*
|
|
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
|
|
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
|
|
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
|
|
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
|
-
/**
|
|
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
|
|
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
|
|
1164
|
+
export type EmbeddedSheetEvent = DocumentChangeEvent | DocumentResetEvent | DocumentLoadEvent | DataChangeEvent | SelectionEvent | ResizeEvent;
|
|
1161
1165
|
export interface ResizeEvent {
|
|
1162
1166
|
type: 'resize';
|
|
1163
1167
|
}
|