@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.
Files changed (125) hide show
  1. package/dist/AdvancedFilterCreator.d.ts +2 -2
  2. package/dist/AdvancedFilterCreator.d.ts.map +1 -1
  3. package/dist/AdvancedFilterCreatorFilterItem.d.ts +30 -31
  4. package/dist/AdvancedFilterCreatorFilterItem.d.ts.map +1 -1
  5. package/dist/AdvancedFilterCreatorFilterItem.js +21 -28
  6. package/dist/AdvancedFilterCreatorFilterItem.js.map +1 -1
  7. package/dist/CrossColumnSearch.d.ts +1 -1
  8. package/dist/CrossColumnSearch.d.ts.map +1 -1
  9. package/dist/DateUtils.d.ts +46 -44
  10. package/dist/DateUtils.d.ts.map +1 -1
  11. package/dist/DateUtils.js +37 -32
  12. package/dist/DateUtils.js.map +1 -1
  13. package/dist/Formatter.d.ts +37 -42
  14. package/dist/Formatter.d.ts.map +1 -1
  15. package/dist/Formatter.js +58 -38
  16. package/dist/Formatter.js.map +1 -1
  17. package/dist/FormatterUtils.d.ts +12 -8
  18. package/dist/FormatterUtils.d.ts.map +1 -1
  19. package/dist/FormatterUtils.js.map +1 -1
  20. package/dist/IrisGrid.d.ts +12 -4
  21. package/dist/IrisGrid.d.ts.map +1 -1
  22. package/dist/IrisGrid.js +20 -4
  23. package/dist/IrisGrid.js.map +1 -1
  24. package/dist/IrisGridMetricCalculator.d.ts +16 -2
  25. package/dist/IrisGridMetricCalculator.d.ts.map +1 -1
  26. package/dist/IrisGridMetricCalculator.js +4 -3
  27. package/dist/IrisGridMetricCalculator.js.map +1 -1
  28. package/dist/IrisGridTheme.d.ts +5 -75
  29. package/dist/IrisGridTheme.d.ts.map +1 -1
  30. package/dist/IrisGridTheme.js +2 -1
  31. package/dist/IrisGridTheme.js.map +1 -1
  32. package/dist/IrisGridUtils.d.ts +4 -4
  33. package/dist/IrisGridUtils.d.ts.map +1 -1
  34. package/dist/MissingKeyError.js +4 -0
  35. package/dist/MissingKeyError.js.map +1 -1
  36. package/dist/PartitionSelectorSearch.d.ts +1 -1
  37. package/dist/TableUtils.d.ts +127 -114
  38. package/dist/TableUtils.d.ts.map +1 -1
  39. package/dist/TableUtils.js +76 -69
  40. package/dist/TableUtils.js.map +1 -1
  41. package/dist/declaration.d.js +2 -0
  42. package/dist/declaration.d.js.map +1 -0
  43. package/dist/filters/FilterOperator.d.ts +5 -5
  44. package/dist/filters/FilterOperator.d.ts.map +1 -1
  45. package/dist/filters/FilterOperator.js +1 -3
  46. package/dist/filters/FilterOperator.js.map +1 -1
  47. package/dist/filters/FilterType.d.ts +23 -23
  48. package/dist/filters/FilterType.d.ts.map +1 -1
  49. package/dist/filters/FilterType.js +1 -3
  50. package/dist/filters/FilterType.js.map +1 -1
  51. package/dist/filters/index.d.ts +2 -2
  52. package/dist/filters/index.d.ts.map +1 -1
  53. package/dist/filters/index.js +2 -2
  54. package/dist/filters/index.js.map +1 -1
  55. package/dist/format-context-menus/CustomFormatAction.d.ts +27 -39
  56. package/dist/format-context-menus/CustomFormatAction.d.ts.map +1 -1
  57. package/dist/format-context-menus/CustomFormatAction.js +24 -23
  58. package/dist/format-context-menus/CustomFormatAction.js.map +1 -1
  59. package/dist/format-context-menus/DateTimeFormatContextMenu.d.ts +8 -5
  60. package/dist/format-context-menus/DateTimeFormatContextMenu.d.ts.map +1 -1
  61. package/dist/format-context-menus/DateTimeFormatContextMenu.js +3 -3
  62. package/dist/format-context-menus/DateTimeFormatContextMenu.js.map +1 -1
  63. package/dist/format-context-menus/DecimalFormatContextMenu.d.ts +7 -5
  64. package/dist/format-context-menus/DecimalFormatContextMenu.d.ts.map +1 -1
  65. package/dist/format-context-menus/DecimalFormatContextMenu.js +3 -3
  66. package/dist/format-context-menus/DecimalFormatContextMenu.js.map +1 -1
  67. package/dist/format-context-menus/FormatContextMenuUtils.d.ts +28 -27
  68. package/dist/format-context-menus/FormatContextMenuUtils.d.ts.map +1 -1
  69. package/dist/format-context-menus/FormatContextMenuUtils.js +12 -10
  70. package/dist/format-context-menus/FormatContextMenuUtils.js.map +1 -1
  71. package/dist/format-context-menus/IntegerFormatContextMenu.d.ts +7 -5
  72. package/dist/format-context-menus/IntegerFormatContextMenu.d.ts.map +1 -1
  73. package/dist/format-context-menus/IntegerFormatContextMenu.js +3 -3
  74. package/dist/format-context-menus/IntegerFormatContextMenu.js.map +1 -1
  75. package/dist/format-context-menus/index.d.ts +3 -3
  76. package/dist/format-context-menus/index.d.ts.map +1 -1
  77. package/dist/format-context-menus/index.js.map +1 -1
  78. package/dist/formatters/BooleanColumnFormatter.d.ts +4 -4
  79. package/dist/formatters/BooleanColumnFormatter.d.ts.map +1 -1
  80. package/dist/formatters/BooleanColumnFormatter.js.map +1 -1
  81. package/dist/formatters/CharColumnFormatter.d.ts +4 -4
  82. package/dist/formatters/CharColumnFormatter.d.ts.map +1 -1
  83. package/dist/formatters/CharColumnFormatter.js.map +1 -1
  84. package/dist/formatters/DateTimeColumnFormatter.d.ts +13 -11
  85. package/dist/formatters/DateTimeColumnFormatter.d.ts.map +1 -1
  86. package/dist/formatters/DateTimeColumnFormatter.js +12 -2
  87. package/dist/formatters/DateTimeColumnFormatter.js.map +1 -1
  88. package/dist/formatters/DecimalColumnFormatter.d.ts +55 -59
  89. package/dist/formatters/DecimalColumnFormatter.d.ts.map +1 -1
  90. package/dist/formatters/DecimalColumnFormatter.js +66 -27
  91. package/dist/formatters/DecimalColumnFormatter.js.map +1 -1
  92. package/dist/formatters/DefaultColumnFormatter.d.ts +4 -4
  93. package/dist/formatters/DefaultColumnFormatter.d.ts.map +1 -1
  94. package/dist/formatters/DefaultColumnFormatter.js.map +1 -1
  95. package/dist/formatters/IntegerColumnFormatter.d.ts +50 -29
  96. package/dist/formatters/IntegerColumnFormatter.d.ts.map +1 -1
  97. package/dist/formatters/IntegerColumnFormatter.js +60 -19
  98. package/dist/formatters/IntegerColumnFormatter.js.map +1 -1
  99. package/dist/formatters/index.d.ts +8 -7
  100. package/dist/formatters/index.d.ts.map +1 -1
  101. package/dist/formatters/index.js +4 -3
  102. package/dist/formatters/index.js.map +1 -1
  103. package/dist/index.d.ts +1 -0
  104. package/dist/index.js +1 -0
  105. package/dist/index.js.map +1 -1
  106. package/dist/key-handlers/ClearFilterKeyHandler.js +5 -0
  107. package/dist/key-handlers/ClearFilterKeyHandler.js.map +1 -1
  108. package/dist/key-handlers/CopyKeyHandler.js +5 -0
  109. package/dist/key-handlers/CopyKeyHandler.js.map +1 -1
  110. package/dist/key-handlers/ReverseKeyHandler.js +5 -0
  111. package/dist/key-handlers/ReverseKeyHandler.js.map +1 -1
  112. package/dist/mousehandlers/IrisGridContextMenuHandler.d.ts +14 -5
  113. package/dist/mousehandlers/IrisGridContextMenuHandler.d.ts.map +1 -1
  114. package/dist/sidebar/ChartBuilder.d.ts +1 -1
  115. package/dist/sidebar/ChartBuilder.d.ts.map +1 -1
  116. package/dist/sidebar/TableCsvExporter.d.ts +1 -1
  117. package/dist/sidebar/TableCsvExporter.d.ts.map +1 -1
  118. package/dist/sidebar/aggregations/AggregationEdit.d.ts +2 -4
  119. package/dist/sidebar/aggregations/AggregationEdit.d.ts.map +1 -1
  120. package/dist/sidebar/aggregations/AggregationEdit.js.map +1 -1
  121. package/dist/sidebar/aggregations/AggregationUtils.d.ts +1 -4
  122. package/dist/sidebar/aggregations/AggregationUtils.d.ts.map +1 -1
  123. package/dist/sidebar/aggregations/AggregationUtils.js.map +1 -1
  124. package/package.json +11 -11
  125. package/dist/tsconfig.tsbuildinfo +0 -1
@@ -1,176 +1,189 @@
1
- export default TableUtils;
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: string;
6
- CHAR: string;
7
- DATETIME: string;
8
- DECIMAL: string;
9
- INT: string;
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: string;
14
- descending: string;
15
- reverse: string;
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: string;
20
- PRE_SORT: string;
21
- POST_SORT: string;
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: any, columnIndex: any): number | null;
30
+ static getSortIndex(sort: Sort[], columnIndex: number): number | null;
25
31
  /**
26
- * @param {dh.Sort[]} tableSort The sorts from the table to get the sort from
27
- * @param {number} columnIndex The index of the column to get the sort for
28
- * @return {dh.Sort} The sort for the column, or null if it's not sorted
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: any[], columnIndex: number): any;
31
- static getFilterText(filter: any): any;
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: any): string[];
34
- static getNextSort(table: any, columnIndex: any): any;
35
- static makeColumnSort(table: any, columnIndex: any, direction: any, isAbs: any): any;
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 {array} sorts The current sorts from IrisGrid.state
39
- * @param {dh.Table} table The table to apply the sort to
40
- * @param {number} columnIndex The column index to apply the sort to
41
- * @param {boolean} addToExisting Add this sort to the existing sort
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: any, table: any, columnIndex: number, addToExisting?: boolean): any;
44
- static sortColumn(table: any, modelColumn: any, direction: any, isAbs: any, addToExisting: any): any;
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 {dh.Sort[]} tableSort The current sorts from IrisGrid.state
48
- * @param {number} columnIndex The column index to apply the sort to
49
- * @param {dh.Sort} sort The sort object to add
50
- * @param {boolean} addToExisting Add this sort to the existing sort
51
- * @returns {array} Returns the modified array of sorts - removing reverses
52
- */
53
- static setSortForColumn(tableSort: any[], columnIndex: number, sort: any, addToExisting?: boolean): any;
54
- static getNormalizedType(columnType: any): string | null;
55
- static isLongType(columnType: any): boolean;
56
- static isDateType(columnType: any): boolean;
57
- static isNumberType(columnType: any): boolean;
58
- static isIntegerType(columnType: any): boolean;
59
- static isDecimalType(columnType: any): boolean;
60
- static isBooleanType(columnType: any): boolean;
61
- static isCharType(columnType: any): boolean;
62
- static isTextType(columnType: any): boolean;
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 {string} columnType Column type
66
- * @returns {string} Element type for array columns, original type for non-array columns
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 {string} type1 Column type to check
72
- * @param {string} type2 Column type to check
73
- * @returns {boolean} True, if types are compatible
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 {dh.Column} column The column to set the filter on
79
- * @param {string} text The text string to create the filter from
80
- * @param {string} timeZone The time zone to make this value in if it is a date type. E.g. America/New_York
81
- * @returns {dh.FilterCondition} Returns the created filter, null if text could not be parsed
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: any, text: string, timeZone: string): any;
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 {dh.Column} column The column to set the filter on
87
- * @param {string} text The text string to create the filter from
88
- * @param {string} timeZone The time zone to make this filter in if it is a date type. E.g. America/New_York
89
- * @returns {dh.FilterCondition} Returns the created filter, null if text could not be parsed
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: any, text: string, timeZone: string): any;
92
- static makeQuickNumberFilter(column: any, text: any): any;
93
- static makeQuickTextFilter(column: any, text: any): any;
94
- static makeQuickBooleanFilter(column: any, text: any): any;
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 {Column} column The column to build the filter from, with or without a leading operator.
98
- * @param {string} text The date string text to parse.
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: any, text: string, timeZone: any): any;
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 {Column} column The column to build the filter from.
104
- * @param {string} text The date string text to parse, without an operator.
105
- * @param {FilterType} operation The filter operation to use.
106
- * @param {string} timeZone The time zone to make this filter with. E.g. America/New_York
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: any, text: string, operation: FilterType | undefined, timeZone: string): any;
109
- static makeQuickCharFilter(column: any, text: any): any;
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 {dh.FilterValue} filter The column filter to apply the range operation to
112
- * @param {string} operation The range operation to run
113
- * @param {dh.FilterValue} value The value to use for the operation
114
- * @returns {dh.FilterCondition} The condition with the specified operation
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: any, operation: string, value: any): any;
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 {Promise<dh.Table> | dh.Table} table The table promise to wrap
127
+ * @param table The table promise to wrap
121
128
  */
122
- static makeCancelableTablePromise(table: Promise<any> | any): import("@deephaven/utils").CancelablePromise<any>;
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 {dh.Table|dh.TreeTable} table Table to listen for events on
126
- * @param {string} eventName Event to listen for
127
- * @param {number} timeout Event timeout in milliseconds, defaults to 0
128
- * @param {function} matcher Optional function to determine if the promise can be resolved or stays pending
129
- * @returns {Promise} Resolves with the event data
130
- */
131
- static makeCancelableTableEventPromise(table: any | any, eventName: string, timeout?: number, matcher?: Function): Promise<any>;
132
- static makeAdvancedFilter(column: any, options: any, timeZone: any): any;
133
- static removeCommas(value: any): any;
134
- /**
135
- * @param {String} columnType The column type to make the filter value from.
136
- * @param {String} value The value to make the filter value from.
137
- * @returns {dh.FilterValue} The FilterValue item for this column/value combination
138
- */
139
- static makeFilterValue(columnType: string, value: string): any;
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 {String} columnType The column type to make the filter value from.
144
- * @param {unknown} value The value to actually set
145
- * @returns {dh.FilterValue} The FilterValue item for this column/value combination
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: any): any;
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 {string} columnType The column type to make the value for
151
- * @param {string} text The string value to make a type for
152
- * @param {string} timeZone The time zone to make this value in if it is a date type. E.g. America/New_York
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): any;
155
- static makeBooleanValue(text: any, allowEmpty?: boolean): boolean | null;
156
- static makeNumberValue(text: any): number | null;
157
- static makeAdvancedValueFilter(column: any, operation: any, value: any, timeZone: any): any;
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 {String[]} selectedValues The values that are selected
163
- * @param {boolean} invertSelection Invert the selection (eg. All items are selected, then you deselect items)
164
- * @returns dh.FilterCondition Returns a `in` or `notIn` FilterCondition as necessary, or null if no filtering should be applied (everything selected)
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: any, selectedValues: string[], invertSelection: boolean): any;
167
- static isTreeTable(table: any): any;
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 {Array<dh.Column>}} columns The columns to sort
171
- * @param {boolean} isAscending Whether to sort ascending
183
+ * @param columns The columns to sort
184
+ * @param isAscending Whether to sort ascending
172
185
  */
173
- static sortColumns(columns: any, isAscending?: boolean): any[];
186
+ static sortColumns(columns: Column[], isAscending?: boolean): Column[];
174
187
  }
175
- import { FilterType } from "./filters";
188
+ export default TableUtils;
176
189
  //# sourceMappingURL=TableUtils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TableUtils.d.ts","sourceRoot":"","sources":["../src/TableUtils.js"],"names":[],"mappings":";AAQA,sEAAsE;AACtE;IACE;;;;;;;MAOE;IAEF;;;;;MAKE;IAEF;;;;OAIG;IAGH,4BAAwC;IAExC,g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