@deephaven/iris-grid 0.13.3-beta.2 → 0.13.5

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 (184) hide show
  1. package/dist/AdvancedFilterCreator.d.ts +63 -69
  2. package/dist/AdvancedFilterCreator.d.ts.map +1 -1
  3. package/dist/AdvancedFilterCreator.js +73 -79
  4. package/dist/AdvancedFilterCreator.js.map +1 -1
  5. package/dist/AdvancedFilterCreatorSelectValue.d.ts +45 -45
  6. package/dist/AdvancedFilterCreatorSelectValue.d.ts.map +1 -1
  7. package/dist/AdvancedFilterCreatorSelectValue.js +36 -32
  8. package/dist/AdvancedFilterCreatorSelectValue.js.map +1 -1
  9. package/dist/AdvancedFilterCreatorSelectValueList.d.ts +52 -47
  10. package/dist/AdvancedFilterCreatorSelectValueList.d.ts.map +1 -1
  11. package/dist/AdvancedFilterCreatorSelectValueList.js +39 -24
  12. package/dist/AdvancedFilterCreatorSelectValueList.js.map +1 -1
  13. package/dist/ColumnStatistics.d.ts +22 -34
  14. package/dist/ColumnStatistics.d.ts.map +1 -1
  15. package/dist/ColumnStatistics.js +12 -8
  16. package/dist/ColumnStatistics.js.map +1 -1
  17. package/dist/CrossColumnSearch.d.ts +24 -26
  18. package/dist/CrossColumnSearch.d.ts.map +1 -1
  19. package/dist/CrossColumnSearch.js +13 -9
  20. package/dist/CrossColumnSearch.js.map +1 -1
  21. package/dist/FilterInputField.d.ts +51 -48
  22. package/dist/FilterInputField.d.ts.map +1 -1
  23. package/dist/FilterInputField.js +27 -30
  24. package/dist/FilterInputField.js.map +1 -1
  25. package/dist/IrisGrid.d.ts +453 -409
  26. package/dist/IrisGrid.d.ts.map +1 -1
  27. package/dist/IrisGrid.js +449 -514
  28. package/dist/IrisGrid.js.map +1 -1
  29. package/dist/IrisGridCellOverflowModal.d.ts +1 -1
  30. package/dist/IrisGridCellOverflowModal.d.ts.map +1 -1
  31. package/dist/IrisGridCellOverflowModal.js.map +1 -1
  32. package/dist/IrisGridCopyHandler.d.ts +46 -52
  33. package/dist/IrisGridCopyHandler.d.ts.map +1 -1
  34. package/dist/IrisGridCopyHandler.js +38 -22
  35. package/dist/IrisGridCopyHandler.js.map +1 -1
  36. package/dist/IrisGridMetricCalculator.d.ts +4 -5
  37. package/dist/IrisGridMetricCalculator.d.ts.map +1 -1
  38. package/dist/IrisGridMetricCalculator.js +1 -5
  39. package/dist/IrisGridMetricCalculator.js.map +1 -1
  40. package/dist/IrisGridModel.d.ts +35 -37
  41. package/dist/IrisGridModel.d.ts.map +1 -1
  42. package/dist/IrisGridModel.js +3 -19
  43. package/dist/IrisGridModel.js.map +1 -1
  44. package/dist/IrisGridModelFactory.d.ts +5 -7
  45. package/dist/IrisGridModelFactory.d.ts.map +1 -1
  46. package/dist/IrisGridModelFactory.js +5 -5
  47. package/dist/IrisGridModelFactory.js.map +1 -1
  48. package/dist/IrisGridModelUpdater.d.ts +11 -13
  49. package/dist/IrisGridModelUpdater.d.ts.map +1 -1
  50. package/dist/IrisGridModelUpdater.js.map +1 -1
  51. package/dist/IrisGridPartitionSelector.d.ts +39 -38
  52. package/dist/IrisGridPartitionSelector.d.ts.map +1 -1
  53. package/dist/IrisGridPartitionSelector.js +24 -18
  54. package/dist/IrisGridPartitionSelector.js.map +1 -1
  55. package/dist/IrisGridProxyModel.d.ts +32 -111
  56. package/dist/IrisGridProxyModel.d.ts.map +1 -1
  57. package/dist/IrisGridProxyModel.js +170 -212
  58. package/dist/IrisGridProxyModel.js.map +1 -1
  59. package/dist/IrisGridRenderer.d.ts +31 -59
  60. package/dist/IrisGridRenderer.d.ts.map +1 -1
  61. package/dist/IrisGridRenderer.js +46 -92
  62. package/dist/IrisGridRenderer.js.map +1 -1
  63. package/dist/IrisGridTableModel.d.ts +147 -48
  64. package/dist/IrisGridTableModel.d.ts.map +1 -1
  65. package/dist/IrisGridTableModel.js +1381 -58
  66. package/dist/IrisGridTableModel.js.map +1 -1
  67. package/dist/IrisGridTestUtils.d.ts +14 -18
  68. package/dist/IrisGridTestUtils.d.ts.map +1 -1
  69. package/dist/IrisGridTestUtils.js +1 -29
  70. package/dist/IrisGridTestUtils.js.map +1 -1
  71. package/dist/IrisGridTheme.d.ts +3 -35
  72. package/dist/IrisGridTheme.d.ts.map +1 -1
  73. package/dist/IrisGridTheme.js.map +1 -1
  74. package/dist/IrisGridTreeTableModel.d.ts +7 -26
  75. package/dist/IrisGridTreeTableModel.d.ts.map +1 -1
  76. package/dist/IrisGridTreeTableModel.js +14 -24
  77. package/dist/IrisGridTreeTableModel.js.map +1 -1
  78. package/dist/IrisGridUtils.d.ts +162 -257
  79. package/dist/IrisGridUtils.d.ts.map +1 -1
  80. package/dist/IrisGridUtils.js +95 -132
  81. package/dist/IrisGridUtils.js.map +1 -1
  82. package/dist/MissingKeyError.d.ts +3 -5
  83. package/dist/MissingKeyError.d.ts.map +1 -1
  84. package/dist/MissingKeyError.js.map +1 -1
  85. package/dist/PartitionSelectorSearch.d.ts +40 -61
  86. package/dist/PartitionSelectorSearch.d.ts.map +1 -1
  87. package/dist/PartitionSelectorSearch.js +15 -25
  88. package/dist/PartitionSelectorSearch.js.map +1 -1
  89. package/dist/PendingDataBottomBar.d.ts +6 -3
  90. package/dist/PendingDataBottomBar.d.ts.map +1 -1
  91. package/dist/PendingDataBottomBar.js.map +1 -1
  92. package/dist/TableViewportUpdater.d.ts +55 -39
  93. package/dist/TableViewportUpdater.d.ts.map +1 -1
  94. package/dist/TableViewportUpdater.js +64 -42
  95. package/dist/TableViewportUpdater.js.map +1 -1
  96. package/dist/TreeTableViewportUpdater.d.ts +37 -29
  97. package/dist/TreeTableViewportUpdater.d.ts.map +1 -1
  98. package/dist/TreeTableViewportUpdater.js +50 -39
  99. package/dist/TreeTableViewportUpdater.js.map +1 -1
  100. package/dist/index.d.ts +0 -9
  101. package/dist/index.d.ts.map +1 -1
  102. package/dist/index.js +0 -9
  103. package/dist/index.js.map +1 -1
  104. package/dist/mousehandlers/IrisGridCellOverflowMouseHandler.d.ts.map +1 -1
  105. package/dist/mousehandlers/IrisGridCellOverflowMouseHandler.js.map +1 -1
  106. package/dist/mousehandlers/IrisGridColumnSelectMouseHandler.d.ts +1 -1
  107. package/dist/mousehandlers/IrisGridColumnSelectMouseHandler.d.ts.map +1 -1
  108. package/dist/mousehandlers/IrisGridColumnSelectMouseHandler.js +0 -2
  109. package/dist/mousehandlers/IrisGridColumnSelectMouseHandler.js.map +1 -1
  110. package/dist/mousehandlers/IrisGridColumnTooltipMouseHandler.js +1 -1
  111. package/dist/mousehandlers/IrisGridColumnTooltipMouseHandler.js.map +1 -1
  112. package/dist/mousehandlers/IrisGridContextMenuHandler.d.ts +130 -41
  113. package/dist/mousehandlers/IrisGridContextMenuHandler.d.ts.map +1 -1
  114. package/dist/mousehandlers/IrisGridContextMenuHandler.js +317 -426
  115. package/dist/mousehandlers/IrisGridContextMenuHandler.js.map +1 -1
  116. package/dist/mousehandlers/IrisGridFilterMouseHandler.d.ts.map +1 -1
  117. package/dist/mousehandlers/IrisGridFilterMouseHandler.js +2 -2
  118. package/dist/mousehandlers/IrisGridFilterMouseHandler.js.map +1 -1
  119. package/dist/mousehandlers/IrisGridSortMouseHandler.js +1 -1
  120. package/dist/mousehandlers/IrisGridSortMouseHandler.js.map +1 -1
  121. package/dist/mousehandlers/PendingMouseHandler.d.ts +4 -8
  122. package/dist/mousehandlers/PendingMouseHandler.d.ts.map +1 -1
  123. package/dist/mousehandlers/PendingMouseHandler.js +5 -4
  124. package/dist/mousehandlers/PendingMouseHandler.js.map +1 -1
  125. package/dist/sidebar/ChartBuilder.d.ts +33 -48
  126. package/dist/sidebar/ChartBuilder.d.ts.map +1 -1
  127. package/dist/sidebar/ChartBuilder.js +27 -28
  128. package/dist/sidebar/ChartBuilder.js.map +1 -1
  129. package/dist/sidebar/CustomColumnBuilder.d.ts +41 -51
  130. package/dist/sidebar/CustomColumnBuilder.d.ts.map +1 -1
  131. package/dist/sidebar/CustomColumnBuilder.js +18 -22
  132. package/dist/sidebar/CustomColumnBuilder.js.map +1 -1
  133. package/dist/sidebar/CustomColumnInput.d.ts +36 -26
  134. package/dist/sidebar/CustomColumnInput.d.ts.map +1 -1
  135. package/dist/sidebar/CustomColumnInput.js +20 -11
  136. package/dist/sidebar/CustomColumnInput.js.map +1 -1
  137. package/dist/sidebar/InputEditor.d.ts +35 -34
  138. package/dist/sidebar/InputEditor.d.ts.map +1 -1
  139. package/dist/sidebar/InputEditor.js +24 -43
  140. package/dist/sidebar/InputEditor.js.map +1 -1
  141. package/dist/sidebar/RollupRows.d.ts +52 -67
  142. package/dist/sidebar/RollupRows.d.ts.map +1 -1
  143. package/dist/sidebar/RollupRows.js +53 -51
  144. package/dist/sidebar/RollupRows.js.map +1 -1
  145. package/dist/sidebar/SelectDistinctBuilder.d.ts +21 -27
  146. package/dist/sidebar/SelectDistinctBuilder.d.ts.map +1 -1
  147. package/dist/sidebar/SelectDistinctBuilder.js +10 -6
  148. package/dist/sidebar/SelectDistinctBuilder.js.map +1 -1
  149. package/dist/sidebar/TableCsvExporter.d.ts +39 -42
  150. package/dist/sidebar/TableCsvExporter.d.ts.map +1 -1
  151. package/dist/sidebar/TableCsvExporter.js +20 -12
  152. package/dist/sidebar/TableCsvExporter.js.map +1 -1
  153. package/dist/sidebar/TableSaver.d.ts +60 -59
  154. package/dist/sidebar/TableSaver.d.ts.map +1 -1
  155. package/dist/sidebar/TableSaver.js +68 -154
  156. package/dist/sidebar/TableSaver.js.map +1 -1
  157. package/dist/sidebar/VisibilityOrderingBuilder.d.ts +45 -56
  158. package/dist/sidebar/VisibilityOrderingBuilder.d.ts.map +1 -1
  159. package/dist/sidebar/VisibilityOrderingBuilder.js +29 -34
  160. package/dist/sidebar/VisibilityOrderingBuilder.js.map +1 -1
  161. package/dist/sidebar/aggregations/Aggregations.d.ts.map +1 -1
  162. package/dist/sidebar/aggregations/Aggregations.js.map +1 -1
  163. package/dist/sidebar/conditional-formatting/ConditionalFormattingMenu.d.ts +1 -2
  164. package/dist/sidebar/conditional-formatting/ConditionalFormattingMenu.d.ts.map +1 -1
  165. package/dist/sidebar/conditional-formatting/ConditionalFormattingMenu.js.map +1 -1
  166. package/dist/sidebar/conditional-formatting/ConditionalFormattingUtils.d.ts +5 -6
  167. package/dist/sidebar/conditional-formatting/ConditionalFormattingUtils.d.ts.map +1 -1
  168. package/dist/sidebar/conditional-formatting/ConditionalFormattingUtils.js +0 -5
  169. package/dist/sidebar/conditional-formatting/ConditionalFormattingUtils.js.map +1 -1
  170. package/dist/sidebar/icons/index.d.ts +7 -7
  171. package/dist/sidebar/icons/index.d.ts.map +1 -1
  172. package/dist/sidebar/icons/index.js.map +1 -1
  173. package/dist/sidebar/index.d.ts +12 -12
  174. package/dist/sidebar/index.d.ts.map +1 -1
  175. package/dist/sidebar/index.js.map +1 -1
  176. package/package.json +16 -17
  177. package/dist/CommonTypes.d.ts +0 -58
  178. package/dist/CommonTypes.d.ts.map +0 -1
  179. package/dist/CommonTypes.js +0 -2
  180. package/dist/CommonTypes.js.map +0 -1
  181. package/dist/IrisGridTableModelTemplate.d.ts +0 -219
  182. package/dist/IrisGridTableModelTemplate.d.ts.map +0 -1
  183. package/dist/IrisGridTableModelTemplate.js +0 -1623
  184. package/dist/IrisGridTableModelTemplate.js.map +0 -1
@@ -15,7 +15,7 @@ import { GridUtils } from '@deephaven/grid';
15
15
  import dh from '@deephaven/jsapi-shim';
16
16
  import { DateUtils, TableUtils } from '@deephaven/jsapi-utils';
17
17
  import Log from '@deephaven/log';
18
- import { assertNotNull } from '@deephaven/utils';
18
+ import AdvancedSettings from "./sidebar/AdvancedSettings.js";
19
19
  import AggregationUtils from "./sidebar/aggregations/AggregationUtils.js";
20
20
  import AggregationOperation from "./sidebar/aggregations/AggregationOperation.js";
21
21
  var log = Log.module('IrisGridUtils');
@@ -23,9 +23,9 @@ var log = Log.module('IrisGridUtils');
23
23
  class IrisGridUtils {
24
24
  /**
25
25
  * Exports the state from Grid component to a JSON stringifiable object
26
- * @param model The table model to export the Grid state for
27
- * @param gridState The state of the Grid to export
28
- * @returns An object that can be stringified and imported with {{@link hydrateGridState}}
26
+ * @param {IrisGridModel} model The table model to export the Grid state for
27
+ * @param {Object} gridState The state of the Grid to export
28
+ * @returns {Object} An object that can be stringified and imported with {{@link hydrateGridState}}
29
29
  */
30
30
  static dehydrateGridState(model, gridState) {
31
31
  var {
@@ -61,9 +61,9 @@ class IrisGridUtils {
61
61
  }
62
62
  /**
63
63
  * Import a state for Grid that was exported with {{@link dehydrateGridState}}
64
- * @param model The table model to import the state for
65
- * @param gridState The state of the panel that was saved
66
- * @returns The gridState props to set on the Grid
64
+ * @param {IrisGridModel} model The table model to import the state for
65
+ * @param {Object} gridState The state of the panel that was saved
66
+ * @returns {Object} The gridState props to set on the Grid
67
67
  */
68
68
 
69
69
 
@@ -101,8 +101,6 @@ class IrisGridUtils {
101
101
  };
102
102
  }
103
103
 
104
- if (typeof to === 'string') throw Error('string');
105
- if (typeof from === 'string') throw Error('string');
106
104
  return {
107
105
  to,
108
106
  from
@@ -119,8 +117,8 @@ class IrisGridUtils {
119
117
  }
120
118
  /**
121
119
  * Exports the state from IrisGrid to a JSON stringifiable object
122
- * @param model The table model to export the state for
123
- * @param irisGridState The current state of the IrisGrid
120
+ * @param {IrisGridModel} model The table model to export the state for
121
+ * @param {Object} irisGridState The current state of the IrisGrid
124
122
  */
125
123
 
126
124
 
@@ -130,6 +128,7 @@ class IrisGridUtils {
130
128
  aggregations: [],
131
129
  showOnTop: false
132
130
  },
131
+ advancedSettings = [],
133
132
  advancedFilters,
134
133
  customColumnFormatMap,
135
134
  isFilterBarShown,
@@ -138,17 +137,16 @@ class IrisGridUtils {
138
137
  customColumns,
139
138
  conditionalFormats = [],
140
139
  reverseType,
141
- rollupConfig = undefined,
140
+ rollupConfig = null,
142
141
  showSearchBar,
143
142
  searchValue,
144
- selectDistinctColumns = [],
143
+ selectDistinctColumns,
145
144
  selectedSearchColumns,
146
145
  sorts,
147
146
  invertSearchColumns,
148
147
  pendingDataMap = new Map(),
149
148
  frozenColumns
150
149
  } = irisGridState;
151
- assertNotNull(metrics);
152
150
  var {
153
151
  userColumnWidths,
154
152
  userRowHeights
@@ -158,11 +156,12 @@ class IrisGridUtils {
158
156
  } = model;
159
157
  return {
160
158
  advancedFilters: IrisGridUtils.dehydrateAdvancedFilters(columns, advancedFilters),
159
+ advancedSettings: [...advancedSettings],
161
160
  aggregationSettings,
162
161
  customColumnFormatMap: [...customColumnFormatMap],
163
162
  isFilterBarShown,
164
163
  quickFilters: IrisGridUtils.dehydrateQuickFilters(quickFilters),
165
- sorts: IrisGridUtils.dehydrateSort(sorts),
164
+ sorts: IrisGridUtils.dehydrateSort(sorts, model),
166
165
  userColumnWidths: [...userColumnWidths].filter(_ref6 => {
167
166
  var [columnIndex] = _ref6;
168
167
  return columnIndex != null && columnIndex >= 0 && columnIndex < columns.length;
@@ -186,14 +185,15 @@ class IrisGridUtils {
186
185
  }
187
186
  /**
188
187
  * Import a state for IrisGrid that was exported with {{@link dehydrateIrisGridState}}
189
- * @param model The table model to import the state with
190
- * @param irisGridState The saved IrisGrid state
188
+ * @param {IrisGridModel} model The table model to import the state with
189
+ * @param {Object} irisGridState The saved IrisGrid state
191
190
  */
192
191
 
193
192
 
194
193
  static hydrateIrisGridState(model, irisGridState) {
195
194
  var {
196
195
  advancedFilters,
196
+ advancedSettings = [],
197
197
  aggregationSettings = {
198
198
  aggregations: [],
199
199
  showOnTop: false
@@ -207,7 +207,7 @@ class IrisGridUtils {
207
207
  userColumnWidths,
208
208
  userRowHeights,
209
209
  reverseType,
210
- rollupConfig = undefined,
210
+ rollupConfig = null,
211
211
  showSearchBar,
212
212
  searchValue,
213
213
  selectDistinctColumns,
@@ -222,6 +222,7 @@ class IrisGridUtils {
222
222
  } = model;
223
223
  return {
224
224
  advancedFilters: IrisGridUtils.hydrateAdvancedFilters(columns, advancedFilters, formatter.timeZone),
225
+ advancedSettings: new Map([...AdvancedSettings.DEFAULTS, ...advancedSettings]),
225
226
  aggregationSettings,
226
227
  customColumnFormatMap: new Map(customColumnFormatMap),
227
228
  isFilterBarShown,
@@ -260,9 +261,9 @@ class IrisGridUtils {
260
261
  }
261
262
  /**
262
263
  * Export the IrisGridPanel state.
263
- * @param model The table model the state is being dehydrated with
264
- * @param irisGridPanelState The current IrisGridPanel state
265
- * @returns The dehydrated IrisGridPanel state
264
+ * @param {IrisGridModel} model The table model the state is being dehydrated with
265
+ * @param {Object} irisGridPanelState The current IrisGridPanel state
266
+ * @returns {Object} The dehydrated IrisGridPanel state
266
267
  */
267
268
 
268
269
 
@@ -280,9 +281,9 @@ class IrisGridUtils {
280
281
  }
281
282
  /**
282
283
  * Import the saved IrisGridPanel state.
283
- * @param model The model the state is being hydrated with
284
- * @param irisGridPanelState Exported IrisGridPanel state
285
- * @returns The state to apply to the IrisGridPanel
284
+ * @param {IrisGridModel} model The model the state is being hydrated with
285
+ * @param {Object} irisGridPanelState Exported IrisGridPanel state
286
+ * @returns {Object} The state to apply to the IrisGridPanel
286
287
  */
287
288
 
288
289
 
@@ -303,8 +304,8 @@ class IrisGridUtils {
303
304
  }
304
305
  /**
305
306
  * Export the quick filters to JSON striginfiable object
306
- * @param quickFilters The quick filters to dehydrate
307
- * @returns The dehydrated quick filters
307
+ * @param {AdvancedFilter[]} quickFilters The quick filters to dehydrate
308
+ * @returns {Object} The dehydrated quick filters
308
309
  */
309
310
 
310
311
 
@@ -321,10 +322,10 @@ class IrisGridUtils {
321
322
  }
322
323
  /**
323
324
  * Import the saved quick filters to apply to the columns. Does not actually apply the filters.
324
- * @param columns The columns the filters will be applied to
325
- * @param savedQuickFilters Exported quick filters definitions
326
- * @param timeZone The time zone to make this value in if it is a date type. E.g. America/New_York
327
- * @returns The quick filters to apply to the columns
325
+ * @param {dh.Column[]} columns The columns the filters will be applied to
326
+ * @param {Object[]} savedQuickFilters Exported quick filters definitions
327
+ * @param {string} timeZone The time zone to make this value in if it is a date type. E.g. America/New_York
328
+ * @returns {QuickFilter[]} The quick filters to apply to the columns
328
329
  */
329
330
 
330
331
 
@@ -355,18 +356,16 @@ class IrisGridUtils {
355
356
  }
356
357
  /**
357
358
  * Export the advanced filters from the provided columns to JSON striginfiable object
358
- * @param columns The columns for the filters
359
- * @param advancedFilters The advanced filters to dehydrate
360
- * @returns The dehydrated advanced filters
359
+ * @param {dh.Column[]} columns The columns for the filters
360
+ * @param {AdvancedFilter[]} advancedFilters The advanced filters to dehydrate
361
+ * @returns {Object} The dehydrated advanced filters
361
362
  */
362
363
 
363
364
 
364
365
  static dehydrateAdvancedFilters(columns, advancedFilters) {
365
366
  return [...advancedFilters].map(_ref13 => {
366
367
  var [columnIndex, advancedFilter] = _ref13;
367
- var column = IrisGridUtils.getColumn(columns, columnIndex);
368
- assertNotNull(column);
369
- var options = IrisGridUtils.dehydrateAdvancedFilterOptions(column, advancedFilter.options);
368
+ var options = IrisGridUtils.dehydrateAdvancedFilterOptions(IrisGridUtils.getColumn(columns, columnIndex), advancedFilter.options);
370
369
  return [columnIndex, {
371
370
  options
372
371
  }];
@@ -374,25 +373,23 @@ class IrisGridUtils {
374
373
  }
375
374
  /**
376
375
  * Import the saved advanced filters to apply to the columns. Does not actually apply the filters.
377
- * @param columns The columns the filters will be applied to
378
- * @param savedAdvancedFilters Exported advanced filters definitions
379
- * @param timeZone The time zone to make this filter in if it is a date type. E.g. America/New_York
380
- * @returns The advanced filters to apply to the columns
376
+ * @param {dh.Columns[]} columns The columns the filters will be applied to
377
+ * @param {Object[]} savedAdvancedFilters Exported advanced filters definitions
378
+ * @param {string} timeZone The time zone to make this filter in if it is a date type. E.g. America/New_York
379
+ * @returns {AdvancedFilter[]} The advanced filters to apply to the columns
381
380
  */
382
381
 
383
382
 
384
383
  static hydrateAdvancedFilters(columns, savedAdvancedFilters, timeZone) {
385
384
  var importedFilters = savedAdvancedFilters.map(_ref14 => {
386
385
  var [columnIndex, advancedFilter] = _ref14;
387
- var column = IrisGridUtils.getColumn(columns, columnIndex);
388
- assertNotNull(column);
389
- var options = IrisGridUtils.hydrateAdvancedFilterOptions(column, advancedFilter.options);
386
+ var options = IrisGridUtils.hydrateAdvancedFilterOptions(IrisGridUtils.getColumn(columns, columnIndex), advancedFilter.options);
390
387
  var filter = null;
391
388
 
392
389
  try {
393
- var columnRetrieved = IrisGridUtils.getColumn(columns, columnIndex);
390
+ var column = IrisGridUtils.getColumn(columns, columnIndex);
394
391
 
395
- if (columnRetrieved != null) {
392
+ if (column != null) {
396
393
  filter = TableUtils.makeAdvancedFilter(column, options, timeZone);
397
394
  }
398
395
  } catch (error) {
@@ -414,7 +411,7 @@ class IrisGridUtils {
414
411
  otherOptions = _objectWithoutProperties(options, _excluded);
415
412
 
416
413
  return _objectSpread({
417
- selectedValues: selectedValues === null || selectedValues === void 0 ? void 0 : selectedValues.map(value => IrisGridUtils.dehydrateValue(value, column === null || column === void 0 ? void 0 : column.type))
414
+ selectedValues: selectedValues.map(value => IrisGridUtils.dehydrateValue(value, column === null || column === void 0 ? void 0 : column.type))
418
415
  }, otherOptions);
419
416
  }
420
417
 
@@ -425,7 +422,7 @@ class IrisGridUtils {
425
422
  otherOptions = _objectWithoutProperties(options, _excluded2);
426
423
 
427
424
  return _objectSpread({
428
- selectedValues: selectedValues === null || selectedValues === void 0 ? void 0 : selectedValues.map(value => IrisGridUtils.hydrateValue(value, column === null || column === void 0 ? void 0 : column.type))
425
+ selectedValues: selectedValues.map(value => IrisGridUtils.hydrateValue(value, column === null || column === void 0 ? void 0 : column.type))
429
426
  }, otherOptions);
430
427
  }
431
428
 
@@ -465,20 +462,16 @@ class IrisGridUtils {
465
462
  }] = _ref18;
466
463
  return [rowIndex, {
467
464
  data: new Map(data.map(_ref19 => {
468
- var _getColumnIndex;
469
-
470
465
  var [columnName, value] = _ref19;
471
- var index = getColumnIndex(columnName);
472
- assertNotNull(index);
473
- return [(_getColumnIndex = getColumnIndex(columnName)) !== null && _getColumnIndex !== void 0 ? _getColumnIndex : null, IrisGridUtils.hydrateValue(value, columns[index].type)];
466
+ return [getColumnIndex(columnName), IrisGridUtils.hydrateValue(value, columns[getColumnIndex(columnName)].type)];
474
467
  }))
475
468
  }];
476
469
  }));
477
470
  }
478
471
  /**
479
472
  * Dehydrates/serializes a value for storage.
480
- * @param value The value to dehydrate
481
- * @param columnType The column type
473
+ * @param {Any} value The value to dehydrate
474
+ * @param {String} columnType The column type
482
475
  */
483
476
 
484
477
 
@@ -495,8 +488,8 @@ class IrisGridUtils {
495
488
  }
496
489
  /**
497
490
  * Hydrate a value from it's serialized state
498
- * @param value The dehydrated value that needs to be hydrated
499
- * @param columnType The type of column
491
+ * @param {Any} value The dehydrated value that needs to be hydrated
492
+ * @param {String} columnType The type of column
500
493
  */
501
494
 
502
495
 
@@ -529,8 +522,8 @@ class IrisGridUtils {
529
522
  }
530
523
  /**
531
524
  * Export the sorts from the provided table sorts to JSON stringifiable object
532
- * @param sorts The table sorts
533
- * @returns The dehydrated sorts
525
+ * @param {dh.Sort[]} sorts The table sorts
526
+ * @returns {Object} The dehydrated sorts
534
527
  */
535
528
 
536
529
 
@@ -550,9 +543,9 @@ class IrisGridUtils {
550
543
  }
551
544
  /**
552
545
  * Import the saved sorts to apply to the table. Does not actually apply the sort.
553
- * @param columns The columns the sorts will be applied to
554
- * @param sorts Exported sort definitions
555
- * @returns The sorts to apply to the table
546
+ * @param {dh.Column[]} columns The columns the sorts will be applied to
547
+ * @param {Object[]} sorts Exported sort definitions
548
+ * @returns {dh.Sort[]} The sorts to apply to the table
556
549
  */
557
550
 
558
551
 
@@ -594,8 +587,8 @@ class IrisGridUtils {
594
587
  }
595
588
  /**
596
589
  * Pulls just the table settings from the panel state, eg. filters/sorts
597
- * @param panelState The dehydrated panel state
598
- * @returns A dehydrated table settings object, { partition, partitionColumn, advancedFilters, quickFilters, sorts }
590
+ * @param {Object} panelState The dehydrated panel state
591
+ * @returns {Object} A dehydrated table settings object, { partition, partitionColumn, advancedFilters, quickFilters, sorts }
599
592
  */
600
593
 
601
594
 
@@ -625,9 +618,9 @@ class IrisGridUtils {
625
618
  }
626
619
  /**
627
620
  * Applies the passed in table settings directly to the provided table
628
- * @param table The table to apply the settings to
629
- * @param tableSettings Dehydrated table settings extracted with `extractTableSettings`
630
- * @param timeZone The time zone to make this value in if it is a date type. E.g. America/New_York
621
+ * @param {dh.Table} table The table to apply the settings to
622
+ * @param {Object} tableSettings Dehydrated table settings extracted with `extractTableSettings`
623
+ * @param {string} timeZone The time zone to make this value in if it is a date type. E.g. America/New_York
631
624
  */
632
625
 
633
626
 
@@ -635,25 +628,10 @@ class IrisGridUtils {
635
628
  var {
636
629
  columns
637
630
  } = table;
638
- var quickFilters = [];
639
-
640
- if (tableSettings.quickFilters) {
641
- quickFilters = IrisGridUtils.getFiltersFromFilterMap(IrisGridUtils.hydrateQuickFilters(columns, tableSettings.quickFilters, timeZone));
642
- }
643
-
644
- var advancedFilters = [];
645
-
646
- if (tableSettings.advancedFilters) {
647
- advancedFilters = IrisGridUtils.getFiltersFromFilterMap(IrisGridUtils.hydrateAdvancedFilters(columns, tableSettings.advancedFilters, timeZone));
648
- }
649
-
631
+ var quickFilters = IrisGridUtils.getFiltersFromFilterMap(IrisGridUtils.hydrateQuickFilters(columns, tableSettings.quickFilters, timeZone));
632
+ var advancedFilters = IrisGridUtils.getFiltersFromFilterMap(IrisGridUtils.hydrateAdvancedFilters(columns, tableSettings.advancedFilters, timeZone));
650
633
  var inputFilters = IrisGridUtils.getFiltersFromInputFilters(columns, tableSettings.inputFilters, timeZone);
651
- var sorts = [];
652
-
653
- if (tableSettings.sorts) {
654
- sorts = IrisGridUtils.hydrateSort(columns, tableSettings.sorts);
655
- }
656
-
634
+ var sorts = IrisGridUtils.hydrateSort(columns, tableSettings.sorts);
657
635
  var filters = [...quickFilters, ...advancedFilters];
658
636
  var {
659
637
  partition,
@@ -718,7 +696,7 @@ class IrisGridUtils {
718
696
  }
719
697
 
720
698
  return null;
721
- }).filter(filter => filter != null);
699
+ }).filter(filter => filter);
722
700
  }
723
701
 
724
702
  static getFiltersFromFilterMap(filterMap) {
@@ -729,7 +707,7 @@ class IrisGridUtils {
729
707
  var key = keys[i];
730
708
  var item = filterMap.get(key);
731
709
 
732
- if (item && item.filter != null) {
710
+ if (item.filter != null) {
733
711
  filters.push(item.filter);
734
712
  }
735
713
  }
@@ -738,8 +716,8 @@ class IrisGridUtils {
738
716
  }
739
717
  /**
740
718
  * Get array of hidden column indexes
741
- * @param userColumnWidths Map of user column widths
742
- * @returns Array of hidden column indexes
719
+ * @param {Map} userColumnWidths Map of user column widths
720
+ * @returns {number[]} Array of hidden column indexes
743
721
  */
744
722
 
745
723
 
@@ -904,7 +882,8 @@ class IrisGridUtils {
904
882
  return columnsToFetch;
905
883
  }
906
884
 
907
- static getModelViewportColumns(columns, left, right, movedColumns) {
885
+ static getModelViewportColumns(columns, left, right) {
886
+ var movedColumns = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
908
887
  var hiddenColumns = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];
909
888
  var alwaysFetchColumnNames = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : [];
910
889
  var bufferPages = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : 0;
@@ -924,23 +903,17 @@ class IrisGridUtils {
924
903
  * Get the dh.RangeSet representation of the provided ranges.
925
904
  * Ranges are sorted prior to creating the RangeSet. Only the rows are taken into account,
926
905
  * RangeSet does not have an option for columns.
927
- * @param ranges The ranges to get the range set for
928
- * @returns The rangeset for the provided ranges
906
+ * @param {GridRange[]} ranges The ranges to get the range set for
907
+ * @returns {dh.RangeSet} The rangeset for the provided ranges
929
908
  */
930
909
 
931
910
 
932
911
  static rangeSetFromRanges(ranges) {
933
- var rangeSets = ranges.slice().sort((a, b) => {
934
- assertNotNull(a.startRow);
935
- assertNotNull(b.startRow);
936
- return a.startRow - b.startRow;
937
- }).map(range => {
912
+ var rangeSets = ranges.slice().sort((a, b) => a.startRow - b.startRow).map(range => {
938
913
  var {
939
914
  startRow,
940
915
  endRow
941
916
  } = range;
942
- assertNotNull(startRow);
943
- assertNotNull(endRow);
944
917
  return dh.RangeSet.ofRange(startRow, endRow);
945
918
  });
946
919
  return dh.RangeSet.ofRanges(rangeSets);
@@ -949,8 +922,8 @@ class IrisGridUtils {
949
922
  * Validate whether the ranges passed in are valid to take a snapshot from.
950
923
  * Multiple selections are valid if all of the selected rows have the same columns selected.
951
924
  *
952
- * @param ranges The ranges to validate
953
- * @returns True if the ranges are valid, false otherwise
925
+ * @param {GridRange[]} ranges The ranges to validate
926
+ * @returns {boolean} True if the ranges are valid, false otherwise
954
927
  */
955
928
 
956
929
 
@@ -988,26 +961,18 @@ class IrisGridUtils {
988
961
  }
989
962
  /**
990
963
  * Check if the provided value is a valid table index
991
- * @param value A value to check if it's a valid table index
964
+ * @param {any} value A value to check if it's a valid table index
992
965
  */
993
966
 
994
967
 
995
968
  static isValidIndex(value) {
996
- if (!Number.isInteger(value)) {
997
- return false;
998
- }
999
-
1000
- if (!(typeof value === 'number')) {
1001
- return false;
1002
- }
1003
-
1004
- return value >= 0;
969
+ return Number.isInteger(value) && value >= 0;
1005
970
  }
1006
971
  /**
1007
972
  * Returns all columns used in any of the ranges provided
1008
- * @param ranges The model ranges to get columns for
1009
- * @param allColumns All the columns to pull from
1010
- * @returns The columns selected in the range
973
+ * @param {GridRange[]} ranges The model ranges to get columns for
974
+ * @param {dh.Column[]} allColumns All the columns to pull from
975
+ * @returns {dh.Column[]} The columns selected in the range
1011
976
  */
1012
977
 
1013
978
 
@@ -1025,8 +990,6 @@ class IrisGridUtils {
1025
990
 
1026
991
  for (var i = 0; i < ranges.length; i += 1) {
1027
992
  var range = ranges[i];
1028
- assertNotNull(range.startColumn);
1029
- assertNotNull(range.endColumn);
1030
993
 
1031
994
  for (var c = (_range$startColumn = range.startColumn) !== null && _range$startColumn !== void 0 ? _range$startColumn : 0; c <= ((_range$endColumn = range.endColumn) !== null && _range$endColumn !== void 0 ? _range$endColumn : allColumns.length - 1); c += 1) {
1032
995
  var _range$startColumn, _range$endColumn;
@@ -1039,8 +1002,8 @@ class IrisGridUtils {
1039
1002
  }
1040
1003
  /**
1041
1004
  * Transforms an iris data snapshot into a simple data matrix
1042
- * @param data The Iris formatted table data
1043
- * @returns A matrix of the values of the data
1005
+ * @param {dh.TableData} data The Iris formatted table data
1006
+ * @returns {unknown[][]} A matrix of the values of the data
1044
1007
  */
1045
1008
 
1046
1009
 
@@ -1068,10 +1031,10 @@ class IrisGridUtils {
1068
1031
  }
1069
1032
  /**
1070
1033
  * Hydrate model rollup config
1071
- * @param originalColumns Original model columns
1072
- * @param config Dehydrated rollup config
1073
- * @param aggregationSettings Aggregation settings
1074
- * @returns Rollup config for the model
1034
+ * @param {Array} originalColumns Original model columns
1035
+ * @param {Object} config Dehydrated rollup config
1036
+ * @param {Object} aggregationSettings Aggregation settings
1037
+ * @returns {Object} Rollup config for the model
1075
1038
  */
1076
1039
 
1077
1040
 
@@ -1128,15 +1091,15 @@ class IrisGridUtils {
1128
1091
  };
1129
1092
  }
1130
1093
  /**
1131
- * @param pendingDataMap Map of pending data
1132
- * @returns A map with the errors in the pending data
1094
+ * @param {Map} pendingDataMap Map of pending data
1095
+ * @returns {Map} A map with the errors in the pending data
1133
1096
  */
1134
1097
 
1135
1098
 
1136
1099
  static getPendingErrors(pendingDataMap) {
1137
1100
  pendingDataMap.forEach((row, rowIndex) => {
1138
1101
  if (!IrisGridUtils.isValidIndex(rowIndex)) {
1139
- throw new Error("Invalid rowIndex ".concat(rowIndex));
1102
+ throw new Error('Invalid rowIndex', rowIndex);
1140
1103
  }
1141
1104
 
1142
1105
  var {
@@ -1144,7 +1107,7 @@ class IrisGridUtils {
1144
1107
  } = row;
1145
1108
  data.forEach((value, columnIndex) => {
1146
1109
  if (!IrisGridUtils.isValidIndex(columnIndex)) {
1147
- throw new Error("Invalid columnIndex ".concat(columnIndex));
1110
+ throw new Error('Invalid columnIndex', columnIndex);
1148
1111
  }
1149
1112
  });
1150
1113
  });
@@ -1152,8 +1115,8 @@ class IrisGridUtils {
1152
1115
  /**
1153
1116
  * Retrieves a column from the provided array at the index, or `null` and logs an error if it's invalid
1154
1117
  *
1155
- * @param columns The columns to get the column from
1156
- * @param columnIndex The column index to get
1118
+ * @param {dh.Columns[]} columns The columns to get the column from
1119
+ * @param {Number} columnIndex The column index to get
1157
1120
  */
1158
1121
 
1159
1122
 
@@ -1167,8 +1130,8 @@ class IrisGridUtils {
1167
1130
  }
1168
1131
  /**
1169
1132
  * Retrieves a column from the provided array matching the name, or `null` and logs an error if not found
1170
- * @param columns The columns to get the column from
1171
- * @param columnName The column name to retrieve
1133
+ * @param {dh.Column[]} columns The columns to get the column from
1134
+ * @param {String} columnName The column name to retrieve
1172
1135
  */
1173
1136
 
1174
1137
 
@@ -1193,9 +1156,9 @@ class IrisGridUtils {
1193
1156
  }
1194
1157
  /**
1195
1158
  * Get filter configs with column names changed to indexes, exclude missing columns
1196
- * @param columns The columns to get column indexes from
1197
- * @param filters Filter configs
1198
- * @returns Updated filter configs with column names changed to indexes
1159
+ * @param {dh.Column[]} columns The columns to get column indexes from
1160
+ * @param {Object[]} filters Filter configs
1161
+ * @returns {Object[]} Updated filter configs with column names changed to indexes
1199
1162
  */
1200
1163
 
1201
1164