@deephaven/iris-grid 0.12.1-beta.2 → 0.12.1-beta.6

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 (163) hide show
  1. package/dist/AdvancedFilterCreator.d.ts +2 -2
  2. package/dist/AdvancedFilterCreator.d.ts.map +1 -1
  3. package/dist/AdvancedFilterCreator.js +2 -3
  4. package/dist/AdvancedFilterCreator.js.map +1 -1
  5. package/dist/AdvancedFilterCreatorFilterItem.d.ts +5 -11
  6. package/dist/AdvancedFilterCreatorFilterItem.d.ts.map +1 -1
  7. package/dist/AdvancedFilterCreatorFilterItem.js +21 -121
  8. package/dist/AdvancedFilterCreatorFilterItem.js.map +1 -1
  9. package/dist/AdvancedFilterCreatorSelectValue.d.ts +1 -1
  10. package/dist/AdvancedFilterCreatorSelectValue.d.ts.map +1 -1
  11. package/dist/AdvancedFilterCreatorSelectValue.js +1 -2
  12. package/dist/AdvancedFilterCreatorSelectValue.js.map +1 -1
  13. package/dist/AdvancedFilterCreatorSelectValueList.d.ts +1 -1
  14. package/dist/AdvancedFilterCreatorSelectValueList.js +1 -1
  15. package/dist/AdvancedFilterCreatorSelectValueList.js.map +1 -1
  16. package/dist/CrossColumnSearch.js +1 -1
  17. package/dist/CrossColumnSearch.js.map +1 -1
  18. package/dist/IrisGrid.d.ts +1 -1
  19. package/dist/IrisGrid.d.ts.map +1 -1
  20. package/dist/IrisGrid.js +42 -48
  21. package/dist/IrisGrid.js.map +1 -1
  22. package/dist/IrisGridMetricCalculator.js +1 -1
  23. package/dist/IrisGridMetricCalculator.js.map +1 -1
  24. package/dist/IrisGridModel.d.ts +18 -2
  25. package/dist/IrisGridModel.d.ts.map +1 -1
  26. package/dist/IrisGridModel.js +36 -0
  27. package/dist/IrisGridModel.js.map +1 -1
  28. package/dist/IrisGridModelFactory.d.ts +1 -1
  29. package/dist/IrisGridModelFactory.js +1 -1
  30. package/dist/IrisGridModelFactory.js.map +1 -1
  31. package/dist/IrisGridModelUpdater.d.ts +1 -2
  32. package/dist/IrisGridModelUpdater.d.ts.map +1 -1
  33. package/dist/IrisGridModelUpdater.js +1 -1
  34. package/dist/IrisGridModelUpdater.js.map +1 -1
  35. package/dist/IrisGridProxyModel.d.ts +1 -1
  36. package/dist/IrisGridProxyModel.d.ts.map +1 -1
  37. package/dist/IrisGridProxyModel.js +21 -2
  38. package/dist/IrisGridProxyModel.js.map +1 -1
  39. package/dist/IrisGridRenderer.js +1 -1
  40. package/dist/IrisGridRenderer.js.map +1 -1
  41. package/dist/IrisGridTableModel.d.ts +2 -6
  42. package/dist/IrisGridTableModel.d.ts.map +1 -1
  43. package/dist/IrisGridTableModel.js +61 -49
  44. package/dist/IrisGridTableModel.js.map +1 -1
  45. package/dist/IrisGridTestUtils.d.ts +1 -1
  46. package/dist/IrisGridTestUtils.js +1 -1
  47. package/dist/IrisGridTestUtils.js.map +1 -1
  48. package/dist/IrisGridUtils.d.ts.map +1 -1
  49. package/dist/IrisGridUtils.js +1 -2
  50. package/dist/IrisGridUtils.js.map +1 -1
  51. package/dist/format-context-menus/DateTimeFormatContextMenu.d.ts +1 -2
  52. package/dist/format-context-menus/DateTimeFormatContextMenu.d.ts.map +1 -1
  53. package/dist/format-context-menus/DateTimeFormatContextMenu.js +1 -2
  54. package/dist/format-context-menus/DateTimeFormatContextMenu.js.map +1 -1
  55. package/dist/format-context-menus/DecimalFormatContextMenu.d.ts +1 -1
  56. package/dist/format-context-menus/DecimalFormatContextMenu.d.ts.map +1 -1
  57. package/dist/format-context-menus/DecimalFormatContextMenu.js +1 -1
  58. package/dist/format-context-menus/DecimalFormatContextMenu.js.map +1 -1
  59. package/dist/format-context-menus/FormatContextMenuUtils.d.ts +1 -1
  60. package/dist/format-context-menus/FormatContextMenuUtils.d.ts.map +1 -1
  61. package/dist/format-context-menus/FormatContextMenuUtils.js +1 -1
  62. package/dist/format-context-menus/FormatContextMenuUtils.js.map +1 -1
  63. package/dist/format-context-menus/IntegerFormatContextMenu.d.ts +1 -1
  64. package/dist/format-context-menus/IntegerFormatContextMenu.d.ts.map +1 -1
  65. package/dist/format-context-menus/IntegerFormatContextMenu.js +1 -1
  66. package/dist/format-context-menus/IntegerFormatContextMenu.js.map +1 -1
  67. package/dist/index.d.ts +1 -5
  68. package/dist/index.d.ts.map +1 -1
  69. package/dist/index.js +1 -5
  70. package/dist/index.js.map +1 -1
  71. package/dist/key-handlers/ReverseKeyHandler.d.ts.map +1 -1
  72. package/dist/key-handlers/ReverseKeyHandler.js +1 -1
  73. package/dist/key-handlers/ReverseKeyHandler.js.map +1 -1
  74. package/dist/mousehandlers/IrisGridContextMenuHandler.d.ts +1 -1
  75. package/dist/mousehandlers/IrisGridContextMenuHandler.d.ts.map +1 -1
  76. package/dist/mousehandlers/IrisGridContextMenuHandler.js +4 -4
  77. package/dist/mousehandlers/IrisGridContextMenuHandler.js.map +1 -1
  78. package/dist/sidebar/RollupRows.js +1 -1
  79. package/dist/sidebar/RollupRows.js.map +1 -1
  80. package/dist/sidebar/TableSaver.d.ts +2 -2
  81. package/dist/sidebar/TableSaver.d.ts.map +1 -1
  82. package/dist/sidebar/TableSaver.js +1 -2
  83. package/dist/sidebar/TableSaver.js.map +1 -1
  84. package/dist/sidebar/aggregations/AggregationEdit.d.ts.map +1 -1
  85. package/dist/sidebar/aggregations/AggregationEdit.js +1 -1
  86. package/dist/sidebar/aggregations/AggregationEdit.js.map +1 -1
  87. package/dist/sidebar/aggregations/AggregationUtils.js +1 -1
  88. package/dist/sidebar/aggregations/AggregationUtils.js.map +1 -1
  89. package/dist/sidebar/conditional-formatting/ConditionEditor.js +1 -1
  90. package/dist/sidebar/conditional-formatting/ConditionEditor.js.map +1 -1
  91. package/dist/sidebar/conditional-formatting/ConditionalFormattingMenu.d.ts.map +1 -1
  92. package/dist/sidebar/conditional-formatting/ConditionalFormattingMenu.js +1 -1
  93. package/dist/sidebar/conditional-formatting/ConditionalFormattingMenu.js.map +1 -1
  94. package/dist/sidebar/conditional-formatting/ConditionalFormattingUtils.js +1 -1
  95. package/dist/sidebar/conditional-formatting/ConditionalFormattingUtils.js.map +1 -1
  96. package/dist/sidebar/index.d.ts +2 -1
  97. package/dist/sidebar/index.js +2 -1
  98. package/dist/sidebar/index.js.map +1 -1
  99. package/package.json +14 -12
  100. package/dist/DateUtils.d.ts +0 -82
  101. package/dist/DateUtils.d.ts.map +0 -1
  102. package/dist/DateUtils.js +0 -285
  103. package/dist/DateUtils.js.map +0 -1
  104. package/dist/Formatter.d.ts +0 -65
  105. package/dist/Formatter.d.ts.map +0 -1
  106. package/dist/Formatter.js +0 -169
  107. package/dist/Formatter.js.map +0 -1
  108. package/dist/FormatterUtils.d.ts +0 -24
  109. package/dist/FormatterUtils.d.ts.map +0 -1
  110. package/dist/FormatterUtils.js +0 -42
  111. package/dist/FormatterUtils.js.map +0 -1
  112. package/dist/TableUtils.d.ts +0 -191
  113. package/dist/TableUtils.d.ts.map +0 -1
  114. package/dist/TableUtils.js +0 -1326
  115. package/dist/TableUtils.js.map +0 -1
  116. package/dist/filters/FilterOperator.d.ts +0 -3
  117. package/dist/filters/FilterOperator.d.ts.map +0 -1
  118. package/dist/filters/FilterOperator.js +0 -2
  119. package/dist/filters/FilterOperator.js.map +0 -1
  120. package/dist/filters/FilterType.d.ts +0 -3
  121. package/dist/filters/FilterType.d.ts.map +0 -1
  122. package/dist/filters/FilterType.js +0 -2
  123. package/dist/filters/FilterType.js.map +0 -1
  124. package/dist/filters/index.d.ts +0 -3
  125. package/dist/filters/index.d.ts.map +0 -1
  126. package/dist/filters/index.js +0 -3
  127. package/dist/filters/index.js.map +0 -1
  128. package/dist/formatters/BooleanColumnFormatter.d.ts +0 -7
  129. package/dist/formatters/BooleanColumnFormatter.d.ts.map +0 -1
  130. package/dist/formatters/BooleanColumnFormatter.js +0 -26
  131. package/dist/formatters/BooleanColumnFormatter.js.map +0 -1
  132. package/dist/formatters/CharColumnFormatter.d.ts +0 -7
  133. package/dist/formatters/CharColumnFormatter.d.ts.map +0 -1
  134. package/dist/formatters/CharColumnFormatter.js +0 -15
  135. package/dist/formatters/CharColumnFormatter.js.map +0 -1
  136. package/dist/formatters/DateTimeColumnFormatter.d.ts +0 -40
  137. package/dist/formatters/DateTimeColumnFormatter.d.ts.map +0 -1
  138. package/dist/formatters/DateTimeColumnFormatter.js +0 -123
  139. package/dist/formatters/DateTimeColumnFormatter.js.map +0 -1
  140. package/dist/formatters/DecimalColumnFormatter.d.ts +0 -64
  141. package/dist/formatters/DecimalColumnFormatter.d.ts.map +0 -1
  142. package/dist/formatters/DecimalColumnFormatter.js +0 -128
  143. package/dist/formatters/DecimalColumnFormatter.js.map +0 -1
  144. package/dist/formatters/DefaultColumnFormatter.d.ts +0 -6
  145. package/dist/formatters/DefaultColumnFormatter.d.ts.map +0 -1
  146. package/dist/formatters/DefaultColumnFormatter.js +0 -14
  147. package/dist/formatters/DefaultColumnFormatter.js.map +0 -1
  148. package/dist/formatters/IntegerColumnFormatter.d.ts +0 -60
  149. package/dist/formatters/IntegerColumnFormatter.d.ts.map +0 -1
  150. package/dist/formatters/IntegerColumnFormatter.js +0 -121
  151. package/dist/formatters/IntegerColumnFormatter.js.map +0 -1
  152. package/dist/formatters/StringColumnFormatter.d.ts +0 -7
  153. package/dist/formatters/StringColumnFormatter.d.ts.map +0 -1
  154. package/dist/formatters/StringColumnFormatter.js +0 -13
  155. package/dist/formatters/StringColumnFormatter.js.map +0 -1
  156. package/dist/formatters/TableColumnFormatter.d.ts +0 -44
  157. package/dist/formatters/TableColumnFormatter.d.ts.map +0 -1
  158. package/dist/formatters/TableColumnFormatter.js +0 -65
  159. package/dist/formatters/TableColumnFormatter.js.map +0 -1
  160. package/dist/formatters/index.d.ts +0 -9
  161. package/dist/formatters/index.d.ts.map +0 -1
  162. package/dist/formatters/index.js +0 -9
  163. package/dist/formatters/index.js.map +0 -1
@@ -1,42 +0,0 @@
1
- import { TableColumnFormatter } from "./formatters/index.js";
2
-
3
- class FormatterUtils {
4
- static getColumnFormats(settings) {
5
- var {
6
- formatter
7
- } = settings;
8
- return formatter;
9
- }
10
-
11
- static getDateTimeFormatterOptions(settings) {
12
- var {
13
- timeZone,
14
- defaultDateTimeFormat,
15
- showTimeZone,
16
- showTSeparator
17
- } = settings;
18
- return {
19
- timeZone,
20
- defaultDateTimeFormatString: defaultDateTimeFormat,
21
- showTimeZone,
22
- showTSeparator
23
- };
24
- }
25
- /**
26
- * Check if the formatter has a custom format defined for the column name and type
27
- * @param formatter Formatter to check
28
- * @param columnName Column name
29
- * @param columnType Column type
30
- * @returns True, if a custom format is defined
31
- */
32
-
33
-
34
- static isCustomColumnFormatDefined(formatter, columnName, columnType) {
35
- var columnFormat = formatter.getColumnFormat(columnType, columnName);
36
- return columnFormat != null && (columnFormat.type === TableColumnFormatter.TYPE_CONTEXT_PRESET || columnFormat.type === TableColumnFormatter.TYPE_CONTEXT_CUSTOM);
37
- }
38
-
39
- }
40
-
41
- export default FormatterUtils;
42
- //# sourceMappingURL=FormatterUtils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/FormatterUtils.ts"],"names":["TableColumnFormatter","FormatterUtils","getColumnFormats","settings","formatter","getDateTimeFormatterOptions","timeZone","defaultDateTimeFormat","showTimeZone","showTSeparator","defaultDateTimeFormatString","isCustomColumnFormatDefined","columnName","columnType","columnFormat","getColumnFormat","type","TYPE_CONTEXT_PRESET","TYPE_CONTEXT_CUSTOM"],"mappings":"SAEkCA,oB;;AAElC,MAAMC,cAAN,CAAqB;AACI,SAAhBC,gBAAgB,CAACC,QAAD,EAEF;AACnB,QAAM;AAAEC,MAAAA;AAAF,QAAgBD,QAAtB;AACA,WAAOC,SAAP;AACD;;AAEiC,SAA3BC,2BAA2B,CAACF,QAAD,EAKqC;AACrE,QAAM;AACJG,MAAAA,QADI;AAEJC,MAAAA,qBAFI;AAGJC,MAAAA,YAHI;AAIJC,MAAAA;AAJI,QAKFN,QALJ;AAMA,WAAO;AACLG,MAAAA,QADK;AAELI,MAAAA,2BAA2B,EAAEH,qBAFxB;AAGLC,MAAAA,YAHK;AAILC,MAAAA;AAJK,KAAP;AAMD;AAED;AACF;AACA;AACA;AACA;AACA;AACA;;;AACoC,SAA3BE,2BAA2B,CAChCP,SADgC,EAEhCQ,UAFgC,EAGhCC,UAHgC,EAIvB;AACT,QAAMC,YAAY,GAAGV,SAAS,CAACW,eAAV,CAA0BF,UAA1B,EAAsCD,UAAtC,CAArB;AACA,WACEE,YAAY,IAAI,IAAhB,KACCA,YAAY,CAACE,IAAb,KAAsBhB,oBAAoB,CAACiB,mBAA3C,IACCH,YAAY,CAACE,IAAb,KAAsBhB,oBAAoB,CAACkB,mBAF7C,CADF;AAKD;;AA9CkB;;AAiDrB,eAAejB,cAAf","sourcesContent":["import type { FormattingRule } from './Formatter';\nimport Formatter from './Formatter';\nimport { DateTimeColumnFormatter, TableColumnFormatter } from './formatters';\n\nclass FormatterUtils {\n static getColumnFormats(settings: {\n formatter: FormattingRule[];\n }): FormattingRule[] {\n const { formatter } = settings;\n return formatter;\n }\n\n static getDateTimeFormatterOptions(settings: {\n timeZone: string;\n defaultDateTimeFormat: string;\n showTimeZone: boolean;\n showTSeparator: boolean;\n }): Required<ConstructorParameters<typeof DateTimeColumnFormatter>[0]> {\n const {\n timeZone,\n defaultDateTimeFormat,\n showTimeZone,\n showTSeparator,\n } = settings;\n return {\n timeZone,\n defaultDateTimeFormatString: defaultDateTimeFormat,\n showTimeZone,\n showTSeparator,\n };\n }\n\n /**\n * Check if the formatter has a custom format defined for the column name and type\n * @param formatter Formatter to check\n * @param columnName Column name\n * @param columnType Column type\n * @returns True, if a custom format is defined\n */\n static isCustomColumnFormatDefined(\n formatter: Formatter,\n columnName: string,\n columnType: string\n ): boolean {\n const columnFormat = formatter.getColumnFormat(columnType, columnName);\n return (\n columnFormat != null &&\n (columnFormat.type === TableColumnFormatter.TYPE_CONTEXT_PRESET ||\n columnFormat.type === TableColumnFormatter.TYPE_CONTEXT_CUSTOM)\n );\n }\n}\n\nexport default FormatterUtils;\n"],"file":"FormatterUtils.js"}
@@ -1,191 +0,0 @@
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>;
8
- export declare type ReverseType = Values<typeof TableUtils.REVERSE_TYPE>;
9
- /** Utility class to provide some functions for working with tables */
10
- declare class TableUtils {
11
- static dataType: {
12
- readonly BOOLEAN: "boolean";
13
- readonly CHAR: "char";
14
- readonly DATETIME: "datetime";
15
- readonly DECIMAL: "decimal";
16
- readonly INT: "int";
17
- readonly STRING: "string";
18
- };
19
- static sortDirection: {
20
- readonly ascending: "ASC";
21
- readonly descending: "DESC";
22
- readonly reverse: "REVERSE";
23
- readonly none: null;
24
- };
25
- static REVERSE_TYPE: Readonly<{
26
- readonly NONE: "none";
27
- readonly PRE_SORT: "pre-sort";
28
- readonly POST_SORT: "post-sort";
29
- }>;
30
- static NUMBER_REGEX: RegExp;
31
- static getSortIndex(sort: Sort[], columnIndex: number): number | null;
32
- /**
33
- * @param tableSort The sorts from the table to get the sort from
34
- * @param columnIndex The index of the column to get the sort for
35
- * @return The sort for the column, or null if it's not sorted
36
- */
37
- static getSortForColumn(tableSort: Sort[], columnIndex: number): Sort | null;
38
- static getFilterText(filter: FilterCondition): string | null;
39
- /** Return the valid filter types for the column */
40
- static getFilterTypes(columnType: string): FilterType[];
41
- static getNextSort(table: Table, columnIndex: number): Sort | null;
42
- static makeColumnSort(table: Table, columnIndex: number, direction: SortDirection, isAbs: boolean): Sort | null;
43
- /**
44
- * Toggles the sort for the specified column
45
- * @param sorts The current sorts from IrisGrid.state
46
- * @param table The table to apply the sort to
47
- * @param columnIndex The column index to apply the sort to
48
- * @param addToExisting Add this sort to the existing sort
49
- */
50
- static toggleSortForColumn(sorts: Sort[], table: Table, columnIndex: number, addToExisting?: boolean): Sort[];
51
- static sortColumn(table: Table, modelColumn: number, direction: SortDirection, isAbs: boolean, addToExisting: boolean): Sort[];
52
- /**
53
- * Sets the sort for the given column *and* removes any reverses
54
- * @param tableSort The current sorts from IrisGrid.state
55
- * @param columnIndex The column index to apply the sort to
56
- * @param sort The sort object to add
57
- * @param addToExisting Add this sort to the existing sort
58
- * @returns Returns the modified array of sorts - removing reverses
59
- */
60
- static setSortForColumn(tableSort: Sort[], columnIndex: number, sort: Sort | null, addToExisting?: boolean): Sort[];
61
- static getNormalizedType(columnType: string): DataType | null;
62
- static isLongType(columnType: string): boolean;
63
- static isDateType(columnType: string): boolean;
64
- static isNumberType(columnType: string): boolean;
65
- static isIntegerType(columnType: string): boolean;
66
- static isDecimalType(columnType: string): boolean;
67
- static isBooleanType(columnType: string): boolean;
68
- static isCharType(columnType: string): boolean;
69
- static isStringType(columnType: string): boolean;
70
- static isTextType(columnType: string): boolean;
71
- /**
72
- * Get base column type
73
- * @param columnType Column type
74
- * @returns Element type for array columns, original type for non-array columns
75
- */
76
- static getBaseType(columnType: string): string;
77
- /**
78
- * Check if the column types are compatible
79
- * @param type1 Column type to check
80
- * @param type2 Column type to check
81
- * @returns True, if types are compatible
82
- */
83
- static isCompatibleType(type1: string, type2: string): boolean;
84
- /**
85
- * Create filter with the provided column and text. Handles multiple filters joined with && or ||
86
- * @param column The column to set the filter on
87
- * @param text The text string to create the filter from
88
- * @param timeZone The time zone to make this value in if it is a date type. E.g. America/New_York
89
- * @returns Returns the created filter, null if text could not be parsed
90
- */
91
- static makeQuickFilter(column: Column, text: string, timeZone: string): FilterCondition | null;
92
- /**
93
- * Create filter with the provided column and text of one component (no multiple conditions)
94
- * @param column The column to set the filter on
95
- * @param text The text string to create the filter from
96
- * @param timeZone The time zone to make this filter in if it is a date type. E.g. America/New_York
97
- * @returns Returns the created filter, null if text could not be parsed
98
- */
99
- static makeQuickFilterFromComponent(column: Column, text: string, timeZone: string): FilterCondition | null;
100
- static makeQuickNumberFilter(column: Column, text: string): FilterCondition | null;
101
- static makeQuickTextFilter(column: Column, text: string | null): FilterCondition | null;
102
- static makeQuickBooleanFilter(column: Column, text: string): FilterCondition | null;
103
- /**
104
- * Builds a date filter parsed from the text string which may or may not include an operator.
105
- * @param column The column to build the filter from, with or without a leading operator.
106
- * @param text The date string text to parse.
107
- * @param timeZone The time zone to make this filter in if it is a date type. E.g. America/New_York
108
- */
109
- static makeQuickDateFilter(column: Column, text: string, timeZone: string): FilterCondition;
110
- /**
111
- * Builds a date filter parsed from the text string with the provided filter.
112
- * @param column The column to build the filter from.
113
- * @param text The date string text to parse, without an operator.
114
- * @param operation The filter operation to use.
115
- * @param timeZone The time zone to make this filter with. E.g. America/New_York
116
- */
117
- static makeQuickDateFilterWithOperation(column: Column, text: string, operation: string | undefined, timeZone: string): FilterCondition;
118
- static makeQuickCharFilter(column: Column, text: string): FilterCondition | null;
119
- /**
120
- * @param filter The column filter to apply the range operation to
121
- * @param operation The range operation to run
122
- * @param value The value to use for the operation
123
- * @returns The condition with the specified operation
124
- */
125
- static makeRangeFilterWithOperation(filter: FilterValue, operation: string, value: FilterValue): FilterCondition | null;
126
- /**
127
- * Wraps a table promise in a cancelable promise that will close the table if the promise is cancelled.
128
- * Use in a component that loads a table, and call cancel when unmounting.
129
- * @param table The table promise to wrap
130
- */
131
- static makeCancelableTablePromise(table: Promise<Table> | Table): CancelablePromise<Table>;
132
- /**
133
- * Make a cancelable promise for a one-shot table event with a timeout.
134
- * @param table Table to listen for events on
135
- * @param eventName Event to listen for
136
- * @param timeout Event timeout in milliseconds, defaults to 0
137
- * @param matcher Optional function to determine if the promise can be resolved or stays pending
138
- * @returns Resolves with the event data
139
- */
140
- static makeCancelableTableEventPromise(table: Table | TreeTable, eventName: string, timeout?: number, matcher?: ((event: CustomEvent) => boolean) | null): CancelablePromise<CustomEvent>;
141
- static makeAdvancedFilter(column: Column, options: {
142
- filterItems: AdvancedFilterCreatorFilterItemState[];
143
- filterOperators: FilterOperatorValue[];
144
- invertSelection: boolean;
145
- selectedValues: string[];
146
- }, timeZone: string): FilterCondition | null;
147
- static removeCommas(value: string): string;
148
- /**
149
- * @param columnType The column type to make the filter value from.
150
- * @param value The value to make the filter value from.
151
- * @returns The FilterValue item for this column/value combination
152
- */
153
- static makeFilterValue(columnType: string, value: string): FilterValue;
154
- /**
155
- * Takes a value and converts it to an `dh.FilterValue`
156
- *
157
- * @param columnType The column type to make the filter value from.
158
- * @param value The value to actually set
159
- * @returns The FilterValue item for this column/value combination
160
- */
161
- static makeFilterRawValue(columnType: string, rawValue: unknown): FilterValue;
162
- /**
163
- * Converts a string value to a value appropriate for the column
164
- * @param columnType The column type to make the value for
165
- * @param text The string value to make a type for
166
- * @param timeZone The time zone to make this value in if it is a date type. E.g. America/New_York
167
- */
168
- static makeValue(columnType: string, text: string, timeZone: string): string | number | boolean | LongWrapper | null;
169
- static makeBooleanValue(text: string, allowEmpty?: boolean): boolean | null;
170
- static makeNumberValue(text: string): number | null;
171
- static makeAdvancedValueFilter(column: Column, operation: FilterTypeValue, value: string, timeZone: string): FilterCondition;
172
- /**
173
- * Create a filter using the selected items
174
- * Has a flag for invertSelection as we start from a "Select All" state and a user just deselects items.
175
- * Since there may be millions of distinct items, it's easier to build an inverse filter.
176
- * @param column The column to set the filter on
177
- * @param selectedValues The values that are selected
178
- * @param invertSelection Invert the selection (eg. All items are selected, then you deselect items)
179
- * @returns Returns a `in` or `notIn` FilterCondition as necessary, or null if no filtering should be applied (everything selected)
180
- */
181
- static makeSelectValueFilter(column: Column, selectedValues: string[], invertSelection: boolean): FilterCondition | null;
182
- static isTreeTable(table: unknown): table is TreeTable;
183
- /**
184
- * Copies the provided array, sorts by column name case insensitive, and returns the sorted array.
185
- * @param columns The columns to sort
186
- * @param isAscending Whether to sort ascending
187
- */
188
- static sortColumns(columns: Column[], isAscending?: boolean): Column[];
189
- }
190
- export default TableUtils;
191
- //# sourceMappingURL=TableUtils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TableUtils.d.ts","sourceRoot":"","sources":["../src/TableUtils.ts"],"names":[],"mappings":"AACA,OAAW,EACT,MAAM,EACN,eAAe,EACf,WAAW,EACX,WAAW,EAEX,IAAI,EACJ,KAAK,EACL,SAAS,EACV,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,iBAAiB,EAIlB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,UAAU,EAEV,eAAe,EACf,mBAAmB,EACpB,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,oCAAoC,EAAE,MAAM,mCAAmC,CAAC;AAI9F,aAAK,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAC5B,oBAAY,QAAQ,GAAG,MAAM,CAAC,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC;AAC1D,oBAAY,aAAa,GAAG,MAAM,CAAC,OAAO,UAAU,CAAC,aAAa,CAAC,CAAC;AACpE,oBAAY,WAAW,GAAG,MAAM,CAAC,OAAO,UAAU,CAAC,YAAY,CAAC,CAAC;AAEjE,sEAAsE;AACtE,cAAM,UAAU;IACd,MAAM,CAAC,QAAQ;;;;;;;MAOJ;IAEX,MAAM,CAAC,aAAa;;;;;MAKT;IAEX,MAAM,CAAC,YAAY;;;;OAIP;IAGZ,MAAM,CAAC,YAAY,SAAqB;IAExC,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAWrE;;;;OAIG;IACH,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,IAAI,EAAE,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAQ5E,MAAM,CAAC,aAAa,CAAC,MAAM,EAAE,eAAe,GAAG,M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