@trebco/treb 23.1.0 → 23.1.2
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 +6 -6
- package/treb.d.ts +27 -3
package/treb.d.ts
CHANGED
|
@@ -91,6 +91,11 @@ export interface SheetScrollOptions {
|
|
|
91
91
|
smooth?: boolean;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
+
/**
|
|
95
|
+
* function type used for filtering tables
|
|
96
|
+
*/
|
|
97
|
+
export declare type TableFilterFunction = (value: CellValue, calculated_value: CellValue, style: Style.Properties) => boolean;
|
|
98
|
+
|
|
94
99
|
/**
|
|
95
100
|
* embedded spreadsheet
|
|
96
101
|
*/
|
|
@@ -310,9 +315,28 @@ export declare class EmbeddedSpreadsheet {
|
|
|
310
315
|
DeleteColumns(start_column?: number, count?: number): void;
|
|
311
316
|
|
|
312
317
|
/**
|
|
313
|
-
* sort a table. the
|
|
314
|
-
* if the reference is an area (range), we're going to look at the
|
|
315
|
-
*
|
|
318
|
+
* sort a table. the reference can be the table name, or a cell in the table.
|
|
319
|
+
* if the reference is an area (range), we're going to look at the top-left
|
|
320
|
+
* cell.
|
|
321
|
+
*
|
|
322
|
+
* this method uses a function to filter rows based on cell values. leave the
|
|
323
|
+
* function undefined to show all rows. this is a shortcut for "unfilter".
|
|
324
|
+
*
|
|
325
|
+
* @param column - the column to sort on. values from this column will be
|
|
326
|
+
* passed to the filter function.
|
|
327
|
+
*
|
|
328
|
+
* @param filter - a callback function to filter based on cell values. this
|
|
329
|
+
* will be called with the cell value (formula), the calculated value (if any),
|
|
330
|
+
* and the cell style. return false to hide the row, and true to show the row.
|
|
331
|
+
* if the filter parameter is omitted, all values will be shown.
|
|
332
|
+
*
|
|
333
|
+
*/
|
|
334
|
+
FilterTable(reference: RangeReference, column?: number, filter?: TableFilterFunction): void;
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* sort a table. the reference can be the table name, or a cell in the table.
|
|
338
|
+
* if the reference is an area (range), we're going to look at the top-left
|
|
339
|
+
* cell.
|
|
316
340
|
*/
|
|
317
341
|
SortTable(reference: RangeReference, options?: Partial<TableSortOptions>): void;
|
|
318
342
|
|