@deephaven/iris-grid 0.8.2-beta.1 → 0.9.1-beta.0
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/AdvancedFilterCreator.d.ts +2 -2
- package/dist/AdvancedFilterCreator.d.ts.map +1 -1
- package/dist/AdvancedFilterCreatorFilterItem.d.ts +30 -31
- package/dist/AdvancedFilterCreatorFilterItem.d.ts.map +1 -1
- package/dist/AdvancedFilterCreatorFilterItem.js +21 -28
- package/dist/AdvancedFilterCreatorFilterItem.js.map +1 -1
- package/dist/CrossColumnSearch.d.ts +1 -1
- package/dist/CrossColumnSearch.d.ts.map +1 -1
- package/dist/DateUtils.d.ts +46 -44
- package/dist/DateUtils.d.ts.map +1 -1
- package/dist/DateUtils.js +37 -32
- package/dist/DateUtils.js.map +1 -1
- package/dist/Formatter.d.ts +37 -42
- package/dist/Formatter.d.ts.map +1 -1
- package/dist/Formatter.js +58 -38
- package/dist/Formatter.js.map +1 -1
- package/dist/FormatterUtils.d.ts +12 -8
- package/dist/FormatterUtils.d.ts.map +1 -1
- package/dist/FormatterUtils.js.map +1 -1
- package/dist/IrisGrid.d.ts +12 -4
- package/dist/IrisGrid.d.ts.map +1 -1
- package/dist/IrisGrid.js +20 -4
- package/dist/IrisGrid.js.map +1 -1
- package/dist/IrisGridMetricCalculator.d.ts +16 -2
- package/dist/IrisGridMetricCalculator.d.ts.map +1 -1
- package/dist/IrisGridMetricCalculator.js +4 -3
- package/dist/IrisGridMetricCalculator.js.map +1 -1
- package/dist/IrisGridTheme.d.ts +5 -75
- package/dist/IrisGridTheme.d.ts.map +1 -1
- package/dist/IrisGridTheme.js +2 -1
- package/dist/IrisGridTheme.js.map +1 -1
- package/dist/IrisGridUtils.d.ts +4 -4
- package/dist/IrisGridUtils.d.ts.map +1 -1
- package/dist/MissingKeyError.js +4 -0
- package/dist/MissingKeyError.js.map +1 -1
- package/dist/PartitionSelectorSearch.d.ts +1 -1
- package/dist/TableUtils.d.ts +127 -114
- package/dist/TableUtils.d.ts.map +1 -1
- package/dist/TableUtils.js +76 -69
- package/dist/TableUtils.js.map +1 -1
- package/dist/declaration.d.js +2 -0
- package/dist/declaration.d.js.map +1 -0
- package/dist/filters/FilterOperator.d.ts +5 -5
- package/dist/filters/FilterOperator.d.ts.map +1 -1
- package/dist/filters/FilterOperator.js +1 -3
- package/dist/filters/FilterOperator.js.map +1 -1
- package/dist/filters/FilterType.d.ts +23 -23
- package/dist/filters/FilterType.d.ts.map +1 -1
- package/dist/filters/FilterType.js +1 -3
- package/dist/filters/FilterType.js.map +1 -1
- package/dist/filters/index.d.ts +2 -2
- package/dist/filters/index.d.ts.map +1 -1
- package/dist/filters/index.js +2 -2
- package/dist/filters/index.js.map +1 -1
- package/dist/format-context-menus/CustomFormatAction.d.ts +27 -39
- package/dist/format-context-menus/CustomFormatAction.d.ts.map +1 -1
- package/dist/format-context-menus/CustomFormatAction.js +24 -23
- package/dist/format-context-menus/CustomFormatAction.js.map +1 -1
- package/dist/format-context-menus/DateTimeFormatContextMenu.d.ts +8 -5
- package/dist/format-context-menus/DateTimeFormatContextMenu.d.ts.map +1 -1
- package/dist/format-context-menus/DateTimeFormatContextMenu.js +3 -3
- package/dist/format-context-menus/DateTimeFormatContextMenu.js.map +1 -1
- package/dist/format-context-menus/DecimalFormatContextMenu.d.ts +7 -5
- package/dist/format-context-menus/DecimalFormatContextMenu.d.ts.map +1 -1
- package/dist/format-context-menus/DecimalFormatContextMenu.js +3 -3
- package/dist/format-context-menus/DecimalFormatContextMenu.js.map +1 -1
- package/dist/format-context-menus/FormatContextMenuUtils.d.ts +28 -27
- package/dist/format-context-menus/FormatContextMenuUtils.d.ts.map +1 -1
- package/dist/format-context-menus/FormatContextMenuUtils.js +12 -10
- package/dist/format-context-menus/FormatContextMenuUtils.js.map +1 -1
- package/dist/format-context-menus/IntegerFormatContextMenu.d.ts +7 -5
- package/dist/format-context-menus/IntegerFormatContextMenu.d.ts.map +1 -1
- package/dist/format-context-menus/IntegerFormatContextMenu.js +3 -3
- package/dist/format-context-menus/IntegerFormatContextMenu.js.map +1 -1
- package/dist/format-context-menus/index.d.ts +3 -3
- package/dist/format-context-menus/index.d.ts.map +1 -1
- package/dist/format-context-menus/index.js.map +1 -1
- package/dist/formatters/BooleanColumnFormatter.d.ts +4 -4
- package/dist/formatters/BooleanColumnFormatter.d.ts.map +1 -1
- package/dist/formatters/BooleanColumnFormatter.js.map +1 -1
- package/dist/formatters/CharColumnFormatter.d.ts +4 -4
- package/dist/formatters/CharColumnFormatter.d.ts.map +1 -1
- package/dist/formatters/CharColumnFormatter.js.map +1 -1
- package/dist/formatters/DateTimeColumnFormatter.d.ts +13 -11
- package/dist/formatters/DateTimeColumnFormatter.d.ts.map +1 -1
- package/dist/formatters/DateTimeColumnFormatter.js +12 -2
- package/dist/formatters/DateTimeColumnFormatter.js.map +1 -1
- package/dist/formatters/DecimalColumnFormatter.d.ts +55 -59
- package/dist/formatters/DecimalColumnFormatter.d.ts.map +1 -1
- package/dist/formatters/DecimalColumnFormatter.js +66 -27
- package/dist/formatters/DecimalColumnFormatter.js.map +1 -1
- package/dist/formatters/DefaultColumnFormatter.d.ts +4 -4
- package/dist/formatters/DefaultColumnFormatter.d.ts.map +1 -1
- package/dist/formatters/DefaultColumnFormatter.js.map +1 -1
- package/dist/formatters/IntegerColumnFormatter.d.ts +50 -29
- package/dist/formatters/IntegerColumnFormatter.d.ts.map +1 -1
- package/dist/formatters/IntegerColumnFormatter.js +60 -19
- package/dist/formatters/IntegerColumnFormatter.js.map +1 -1
- package/dist/formatters/index.d.ts +8 -7
- package/dist/formatters/index.d.ts.map +1 -1
- package/dist/formatters/index.js +4 -3
- package/dist/formatters/index.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/key-handlers/ClearFilterKeyHandler.js +5 -0
- package/dist/key-handlers/ClearFilterKeyHandler.js.map +1 -1
- package/dist/key-handlers/CopyKeyHandler.js +5 -0
- package/dist/key-handlers/CopyKeyHandler.js.map +1 -1
- package/dist/key-handlers/ReverseKeyHandler.js +5 -0
- package/dist/key-handlers/ReverseKeyHandler.js.map +1 -1
- package/dist/mousehandlers/IrisGridContextMenuHandler.d.ts +14 -5
- package/dist/mousehandlers/IrisGridContextMenuHandler.d.ts.map +1 -1
- package/dist/sidebar/ChartBuilder.d.ts +1 -1
- package/dist/sidebar/ChartBuilder.d.ts.map +1 -1
- package/dist/sidebar/TableCsvExporter.d.ts +1 -1
- package/dist/sidebar/TableCsvExporter.d.ts.map +1 -1
- package/dist/sidebar/aggregations/AggregationEdit.d.ts +2 -4
- package/dist/sidebar/aggregations/AggregationEdit.d.ts.map +1 -1
- package/dist/sidebar/aggregations/AggregationEdit.js.map +1 -1
- package/dist/sidebar/aggregations/AggregationUtils.d.ts +1 -4
- package/dist/sidebar/aggregations/AggregationUtils.d.ts.map +1 -1
- package/dist/sidebar/aggregations/AggregationUtils.js.map +1 -1
- package/package.json +11 -11
- package/dist/tsconfig.tsbuildinfo +0 -1
package/dist/TableUtils.d.ts
CHANGED
|
@@ -1,176 +1,189 @@
|
|
|
1
|
-
|
|
1
|
+
import { Column, FilterCondition, FilterValue, LongWrapper, Sort, Table, TreeTable } from '@deephaven/jsapi-shim';
|
|
2
|
+
import { CancelablePromise } from '@deephaven/utils';
|
|
3
|
+
import { FilterType, FilterTypeValue, FilterOperatorValue } from './filters';
|
|
4
|
+
import type { AdvancedFilterCreatorFilterItemState } from './AdvancedFilterCreatorFilterItem';
|
|
5
|
+
declare type Values<T> = T[keyof T];
|
|
6
|
+
export declare type DataType = Values<typeof TableUtils.dataType>;
|
|
7
|
+
export declare type SortDirection = Values<typeof TableUtils.sortDirection>;
|
|
2
8
|
/** Utility class to provide some functions for working with tables */
|
|
3
9
|
declare class TableUtils {
|
|
4
10
|
static dataType: {
|
|
5
|
-
BOOLEAN:
|
|
6
|
-
CHAR:
|
|
7
|
-
DATETIME:
|
|
8
|
-
DECIMAL:
|
|
9
|
-
INT:
|
|
10
|
-
STRING: string;
|
|
11
|
+
readonly BOOLEAN: "boolean";
|
|
12
|
+
readonly CHAR: "char";
|
|
13
|
+
readonly DATETIME: "datetime";
|
|
14
|
+
readonly DECIMAL: "decimal";
|
|
15
|
+
readonly INT: "int";
|
|
16
|
+
readonly STRING: "string";
|
|
11
17
|
};
|
|
12
18
|
static sortDirection: {
|
|
13
|
-
ascending:
|
|
14
|
-
descending:
|
|
15
|
-
reverse:
|
|
16
|
-
none: null;
|
|
19
|
+
readonly ascending: "ASC";
|
|
20
|
+
readonly descending: "DESC";
|
|
21
|
+
readonly reverse: "REVERSE";
|
|
22
|
+
readonly none: null;
|
|
17
23
|
};
|
|
18
24
|
static REVERSE_TYPE: Readonly<{
|
|
19
|
-
NONE:
|
|
20
|
-
PRE_SORT:
|
|
21
|
-
POST_SORT:
|
|
25
|
+
readonly NONE: "none";
|
|
26
|
+
readonly PRE_SORT: "pre-sort";
|
|
27
|
+
readonly POST_SORT: "post-sort";
|
|
22
28
|
}>;
|
|
23
29
|
static NUMBER_REGEX: RegExp;
|
|
24
|
-
static getSortIndex(sort:
|
|
30
|
+
static getSortIndex(sort: Sort[], columnIndex: number): number | null;
|
|
25
31
|
/**
|
|
26
|
-
* @param
|
|
27
|
-
* @param
|
|
28
|
-
* @return
|
|
32
|
+
* @param tableSort The sorts from the table to get the sort from
|
|
33
|
+
* @param columnIndex The index of the column to get the sort for
|
|
34
|
+
* @return The sort for the column, or null if it's not sorted
|
|
29
35
|
*/
|
|
30
|
-
static getSortForColumn(tableSort:
|
|
31
|
-
static getFilterText(filter:
|
|
36
|
+
static getSortForColumn(tableSort: Sort[], columnIndex: number): Sort | null;
|
|
37
|
+
static getFilterText(filter: FilterCondition): string | null;
|
|
32
38
|
/** Return the valid filter types for the column */
|
|
33
|
-
static getFilterTypes(columnType:
|
|
34
|
-
static getNextSort(table:
|
|
35
|
-
static makeColumnSort(table:
|
|
39
|
+
static getFilterTypes(columnType: string): FilterType[];
|
|
40
|
+
static getNextSort(table: Table, columnIndex: number): Sort | null;
|
|
41
|
+
static makeColumnSort(table: Table, columnIndex: number, direction: SortDirection, isAbs: boolean): Sort | null;
|
|
36
42
|
/**
|
|
37
43
|
* Toggles the sort for the specified column
|
|
38
|
-
* @param
|
|
39
|
-
* @param
|
|
40
|
-
* @param
|
|
41
|
-
* @param
|
|
44
|
+
* @param sorts The current sorts from IrisGrid.state
|
|
45
|
+
* @param table The table to apply the sort to
|
|
46
|
+
* @param columnIndex The column index to apply the sort to
|
|
47
|
+
* @param addToExisting Add this sort to the existing sort
|
|
42
48
|
*/
|
|
43
|
-
static toggleSortForColumn(sorts:
|
|
44
|
-
static sortColumn(table:
|
|
49
|
+
static toggleSortForColumn(sorts: Sort[], table: Table, columnIndex: number, addToExisting?: boolean): Sort[];
|
|
50
|
+
static sortColumn(table: Table, modelColumn: number, direction: SortDirection, isAbs: boolean, addToExisting: boolean): Sort[];
|
|
45
51
|
/**
|
|
46
52
|
* Sets the sort for the given column *and* removes any reverses
|
|
47
|
-
* @param
|
|
48
|
-
* @param
|
|
49
|
-
* @param
|
|
50
|
-
* @param
|
|
51
|
-
* @returns
|
|
52
|
-
*/
|
|
53
|
-
static setSortForColumn(tableSort:
|
|
54
|
-
static getNormalizedType(columnType:
|
|
55
|
-
static isLongType(columnType:
|
|
56
|
-
static isDateType(columnType:
|
|
57
|
-
static isNumberType(columnType:
|
|
58
|
-
static isIntegerType(columnType:
|
|
59
|
-
static isDecimalType(columnType:
|
|
60
|
-
static isBooleanType(columnType:
|
|
61
|
-
static isCharType(columnType:
|
|
62
|
-
static isTextType(columnType:
|
|
53
|
+
* @param tableSort The current sorts from IrisGrid.state
|
|
54
|
+
* @param columnIndex The column index to apply the sort to
|
|
55
|
+
* @param sort The sort object to add
|
|
56
|
+
* @param addToExisting Add this sort to the existing sort
|
|
57
|
+
* @returns Returns the modified array of sorts - removing reverses
|
|
58
|
+
*/
|
|
59
|
+
static setSortForColumn(tableSort: Sort[], columnIndex: number, sort: Sort | null, addToExisting?: boolean): Sort[];
|
|
60
|
+
static getNormalizedType(columnType: string): DataType | null;
|
|
61
|
+
static isLongType(columnType: string): boolean;
|
|
62
|
+
static isDateType(columnType: string): boolean;
|
|
63
|
+
static isNumberType(columnType: string): boolean;
|
|
64
|
+
static isIntegerType(columnType: string): boolean;
|
|
65
|
+
static isDecimalType(columnType: string): boolean;
|
|
66
|
+
static isBooleanType(columnType: string): boolean;
|
|
67
|
+
static isCharType(columnType: string): boolean;
|
|
68
|
+
static isTextType(columnType: string): boolean;
|
|
63
69
|
/**
|
|
64
70
|
* Get base column type
|
|
65
|
-
* @param
|
|
66
|
-
* @returns
|
|
71
|
+
* @param columnType Column type
|
|
72
|
+
* @returns Element type for array columns, original type for non-array columns
|
|
67
73
|
*/
|
|
68
74
|
static getBaseType(columnType: string): string;
|
|
69
75
|
/**
|
|
70
76
|
* Check if the column types are compatible
|
|
71
|
-
* @param
|
|
72
|
-
* @param
|
|
73
|
-
* @returns
|
|
77
|
+
* @param type1 Column type to check
|
|
78
|
+
* @param type2 Column type to check
|
|
79
|
+
* @returns True, if types are compatible
|
|
74
80
|
*/
|
|
75
81
|
static isCompatibleType(type1: string, type2: string): boolean;
|
|
76
82
|
/**
|
|
77
83
|
* Create filter with the provided column and text. Handles multiple filters joined with && or ||
|
|
78
|
-
* @param
|
|
79
|
-
* @param
|
|
80
|
-
* @param
|
|
81
|
-
* @returns
|
|
84
|
+
* @param column The column to set the filter on
|
|
85
|
+
* @param text The text string to create the filter from
|
|
86
|
+
* @param timeZone The time zone to make this value in if it is a date type. E.g. America/New_York
|
|
87
|
+
* @returns Returns the created filter, null if text could not be parsed
|
|
82
88
|
*/
|
|
83
|
-
static makeQuickFilter(column:
|
|
89
|
+
static makeQuickFilter(column: Column, text: string, timeZone: string): FilterCondition | null;
|
|
84
90
|
/**
|
|
85
91
|
* Create filter with the provided column and text of one component (no multiple conditions)
|
|
86
|
-
* @param
|
|
87
|
-
* @param
|
|
88
|
-
* @param
|
|
89
|
-
* @returns
|
|
92
|
+
* @param column The column to set the filter on
|
|
93
|
+
* @param text The text string to create the filter from
|
|
94
|
+
* @param timeZone The time zone to make this filter in if it is a date type. E.g. America/New_York
|
|
95
|
+
* @returns Returns the created filter, null if text could not be parsed
|
|
90
96
|
*/
|
|
91
|
-
static makeQuickFilterFromComponent(column:
|
|
92
|
-
static makeQuickNumberFilter(column:
|
|
93
|
-
static makeQuickTextFilter(column:
|
|
94
|
-
static makeQuickBooleanFilter(column:
|
|
97
|
+
static makeQuickFilterFromComponent(column: Column, text: string, timeZone: string): FilterCondition | null;
|
|
98
|
+
static makeQuickNumberFilter(column: Column, text: string): FilterCondition | null;
|
|
99
|
+
static makeQuickTextFilter(column: Column, text: string | null): FilterCondition | null;
|
|
100
|
+
static makeQuickBooleanFilter(column: Column, text: string): FilterCondition | null;
|
|
95
101
|
/**
|
|
96
102
|
* Builds a date filter parsed from the text string which may or may not include an operator.
|
|
97
|
-
* @param
|
|
98
|
-
* @param
|
|
103
|
+
* @param column The column to build the filter from, with or without a leading operator.
|
|
104
|
+
* @param text The date string text to parse.
|
|
105
|
+
* @param timeZone The time zone to make this filter in if it is a date type. E.g. America/New_York
|
|
99
106
|
*/
|
|
100
|
-
static makeQuickDateFilter(column:
|
|
107
|
+
static makeQuickDateFilter(column: Column, text: string, timeZone: string): FilterCondition;
|
|
101
108
|
/**
|
|
102
109
|
* Builds a date filter parsed from the text string with the provided filter.
|
|
103
|
-
* @param
|
|
104
|
-
* @param
|
|
105
|
-
* @param
|
|
106
|
-
* @param
|
|
110
|
+
* @param column The column to build the filter from.
|
|
111
|
+
* @param text The date string text to parse, without an operator.
|
|
112
|
+
* @param operation The filter operation to use.
|
|
113
|
+
* @param timeZone The time zone to make this filter with. E.g. America/New_York
|
|
107
114
|
*/
|
|
108
|
-
static makeQuickDateFilterWithOperation(column:
|
|
109
|
-
static makeQuickCharFilter(column:
|
|
115
|
+
static makeQuickDateFilterWithOperation(column: Column, text: string, operation: string | undefined, timeZone: string): FilterCondition;
|
|
116
|
+
static makeQuickCharFilter(column: Column, text: string): FilterCondition | null;
|
|
110
117
|
/**
|
|
111
|
-
* @param
|
|
112
|
-
* @param
|
|
113
|
-
* @param
|
|
114
|
-
* @returns
|
|
118
|
+
* @param filter The column filter to apply the range operation to
|
|
119
|
+
* @param operation The range operation to run
|
|
120
|
+
* @param value The value to use for the operation
|
|
121
|
+
* @returns The condition with the specified operation
|
|
115
122
|
*/
|
|
116
|
-
static makeRangeFilterWithOperation(filter:
|
|
123
|
+
static makeRangeFilterWithOperation(filter: FilterValue, operation: string, value: FilterValue): FilterCondition | null;
|
|
117
124
|
/**
|
|
118
125
|
* Wraps a table promise in a cancelable promise that will close the table if the promise is cancelled.
|
|
119
126
|
* Use in a component that loads a table, and call cancel when unmounting.
|
|
120
|
-
* @param
|
|
127
|
+
* @param table The table promise to wrap
|
|
121
128
|
*/
|
|
122
|
-
static makeCancelableTablePromise(table: Promise<
|
|
129
|
+
static makeCancelableTablePromise(table: Promise<Table> | Table): CancelablePromise<Table>;
|
|
123
130
|
/**
|
|
124
131
|
* Make a cancelable promise for a one-shot table event with a timeout.
|
|
125
|
-
* @param
|
|
126
|
-
* @param
|
|
127
|
-
* @param
|
|
128
|
-
* @param
|
|
129
|
-
* @returns
|
|
130
|
-
*/
|
|
131
|
-
static makeCancelableTableEventPromise(table:
|
|
132
|
-
static makeAdvancedFilter(column:
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
132
|
+
* @param table Table to listen for events on
|
|
133
|
+
* @param eventName Event to listen for
|
|
134
|
+
* @param timeout Event timeout in milliseconds, defaults to 0
|
|
135
|
+
* @param matcher Optional function to determine if the promise can be resolved or stays pending
|
|
136
|
+
* @returns Resolves with the event data
|
|
137
|
+
*/
|
|
138
|
+
static makeCancelableTableEventPromise(table: Table | TreeTable, eventName: string, timeout?: number, matcher?: ((event: CustomEvent) => boolean) | null): CancelablePromise<CustomEvent>;
|
|
139
|
+
static makeAdvancedFilter(column: Column, options: {
|
|
140
|
+
filterItems: AdvancedFilterCreatorFilterItemState[];
|
|
141
|
+
filterOperators: FilterOperatorValue[];
|
|
142
|
+
invertSelection: boolean;
|
|
143
|
+
selectedValues: string[];
|
|
144
|
+
}, timeZone: string): FilterCondition | null;
|
|
145
|
+
static removeCommas(value: string): string;
|
|
146
|
+
/**
|
|
147
|
+
* @param columnType The column type to make the filter value from.
|
|
148
|
+
* @param value The value to make the filter value from.
|
|
149
|
+
* @returns The FilterValue item for this column/value combination
|
|
150
|
+
*/
|
|
151
|
+
static makeFilterValue(columnType: string, value: string): FilterValue;
|
|
140
152
|
/**
|
|
141
153
|
* Takes a value and converts it to an `dh.FilterValue`
|
|
142
154
|
*
|
|
143
|
-
* @param
|
|
144
|
-
* @param
|
|
145
|
-
* @returns
|
|
155
|
+
* @param columnType The column type to make the filter value from.
|
|
156
|
+
* @param value The value to actually set
|
|
157
|
+
* @returns The FilterValue item for this column/value combination
|
|
146
158
|
*/
|
|
147
|
-
static makeFilterRawValue(columnType: string, rawValue:
|
|
159
|
+
static makeFilterRawValue(columnType: string, rawValue: unknown): FilterValue;
|
|
148
160
|
/**
|
|
149
161
|
* Converts a string value to a value appropriate for the column
|
|
150
|
-
* @param
|
|
151
|
-
* @param
|
|
152
|
-
* @param
|
|
162
|
+
* @param columnType The column type to make the value for
|
|
163
|
+
* @param text The string value to make a type for
|
|
164
|
+
* @param timeZone The time zone to make this value in if it is a date type. E.g. America/New_York
|
|
153
165
|
*/
|
|
154
|
-
static makeValue(columnType: string, text: string, timeZone: string):
|
|
155
|
-
static makeBooleanValue(text:
|
|
156
|
-
static makeNumberValue(text:
|
|
157
|
-
static makeAdvancedValueFilter(column:
|
|
166
|
+
static makeValue(columnType: string, text: string, timeZone: string): string | number | boolean | LongWrapper | null;
|
|
167
|
+
static makeBooleanValue(text: string, allowEmpty?: boolean): boolean | null;
|
|
168
|
+
static makeNumberValue(text: string): number | null;
|
|
169
|
+
static makeAdvancedValueFilter(column: Column, operation: FilterTypeValue, value: string, timeZone: string): FilterCondition;
|
|
158
170
|
/**
|
|
159
171
|
* Create a filter using the selected items
|
|
160
172
|
* Has a flag for invertSelection as we start from a "Select All" state and a user just deselects items.
|
|
161
173
|
* Since there may be millions of distinct items, it's easier to build an inverse filter.
|
|
162
|
-
* @param
|
|
163
|
-
* @param
|
|
164
|
-
* @
|
|
174
|
+
* @param column The column to set the filter on
|
|
175
|
+
* @param selectedValues The values that are selected
|
|
176
|
+
* @param invertSelection Invert the selection (eg. All items are selected, then you deselect items)
|
|
177
|
+
* @returns Returns a `in` or `notIn` FilterCondition as necessary, or null if no filtering should be applied (everything selected)
|
|
165
178
|
*/
|
|
166
|
-
static makeSelectValueFilter(column:
|
|
167
|
-
static isTreeTable(table:
|
|
179
|
+
static makeSelectValueFilter(column: Column, selectedValues: string[], invertSelection: boolean): FilterCondition | null;
|
|
180
|
+
static isTreeTable(table: unknown): table is TreeTable;
|
|
168
181
|
/**
|
|
169
182
|
* Copies the provided array, sorts by column name case insensitive, and returns the sorted array.
|
|
170
|
-
* @param
|
|
171
|
-
* @param
|
|
183
|
+
* @param columns The columns to sort
|
|
184
|
+
* @param isAscending Whether to sort ascending
|
|
172
185
|
*/
|
|
173
|
-
static sortColumns(columns:
|
|
186
|
+
static sortColumns(columns: Column[], isAscending?: boolean): Column[];
|
|
174
187
|
}
|
|
175
|
-
|
|
188
|
+
export default TableUtils;
|
|
176
189
|
//# sourceMappingURL=TableUtils.d.ts.map
|
package/dist/TableUtils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableUtils.d.ts","sourceRoot":"","sources":["../src/TableUtils.
|
|
1
|
+
{"version":3,"file":"TableUtils.d.ts","sourceRoot":"","sources":["../src/TableUtils.ts"],"names":[],"mappings":"AACA,OAAW,EACT,MAAM,EACN,eAAe,EACf,WAAW,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