@deephaven/iris-grid 0.22.3-embed-pandas.11 → 0.23.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 (243) hide show
  1. package/dist/AdvancedFilterCreator.d.ts +1 -1
  2. package/dist/AdvancedFilterCreator.d.ts.map +1 -1
  3. package/dist/AdvancedFilterCreator.js +7 -65
  4. package/dist/AdvancedFilterCreator.js.map +1 -1
  5. package/dist/AdvancedFilterCreatorFilterItem.d.ts +1 -1
  6. package/dist/AdvancedFilterCreatorFilterItem.d.ts.map +1 -1
  7. package/dist/AdvancedFilterCreatorFilterItem.js +0 -23
  8. package/dist/AdvancedFilterCreatorFilterItem.js.map +1 -1
  9. package/dist/AdvancedFilterCreatorSelectValue.js +0 -52
  10. package/dist/AdvancedFilterCreatorSelectValue.js.map +1 -1
  11. package/dist/AdvancedFilterCreatorSelectValueList.d.ts +1 -5
  12. package/dist/AdvancedFilterCreatorSelectValueList.d.ts.map +1 -1
  13. package/dist/AdvancedFilterCreatorSelectValueList.js +2 -42
  14. package/dist/AdvancedFilterCreatorSelectValueList.js.map +1 -1
  15. package/dist/ColumnHeaderGroup.js +0 -11
  16. package/dist/ColumnHeaderGroup.js.map +1 -1
  17. package/dist/ColumnStatistics.d.ts +0 -2
  18. package/dist/ColumnStatistics.d.ts.map +1 -1
  19. package/dist/ColumnStatistics.js +8 -40
  20. package/dist/ColumnStatistics.js.map +1 -1
  21. package/dist/CommonTypes.d.ts +14 -14
  22. package/dist/CommonTypes.d.ts.map +1 -1
  23. package/dist/CrossColumnSearch.js +2 -23
  24. package/dist/CrossColumnSearch.js.map +1 -1
  25. package/dist/FilterInputField.js +2 -36
  26. package/dist/FilterInputField.js.map +1 -1
  27. package/dist/GotoRow.d.ts +1 -1
  28. package/dist/GotoRow.d.ts.map +1 -1
  29. package/dist/GotoRow.js +2 -7
  30. package/dist/GotoRow.js.map +1 -1
  31. package/dist/IrisGrid.d.ts +46 -40
  32. package/dist/IrisGrid.d.ts.map +1 -1
  33. package/dist/IrisGrid.js +84 -526
  34. package/dist/IrisGrid.js.map +1 -1
  35. package/dist/IrisGridBottomBar.d.ts +2 -2
  36. package/dist/IrisGridBottomBar.d.ts.map +1 -1
  37. package/dist/IrisGridBottomBar.js +2 -2
  38. package/dist/IrisGridBottomBar.js.map +1 -1
  39. package/dist/IrisGridCellOverflowModal.d.ts.map +1 -1
  40. package/dist/IrisGridCellOverflowModal.js +13 -46
  41. package/dist/IrisGridCellOverflowModal.js.map +1 -1
  42. package/dist/IrisGridCopyHandler.d.ts +3 -3
  43. package/dist/IrisGridCopyHandler.d.ts.map +1 -1
  44. package/dist/IrisGridCopyHandler.js +6 -53
  45. package/dist/IrisGridCopyHandler.js.map +1 -1
  46. package/dist/IrisGridMetricCalculator.js +2 -12
  47. package/dist/IrisGridMetricCalculator.js.map +1 -1
  48. package/dist/IrisGridModel.d.ts +3 -3
  49. package/dist/IrisGridModel.d.ts.map +1 -1
  50. package/dist/IrisGridModel.js +32 -58
  51. package/dist/IrisGridModel.js.map +1 -1
  52. package/dist/IrisGridModelFactory.js +0 -7
  53. package/dist/IrisGridModelFactory.js.map +1 -1
  54. package/dist/IrisGridModelUpdater.js +0 -4
  55. package/dist/IrisGridModelUpdater.js.map +1 -1
  56. package/dist/IrisGridPartitionSelector.js +0 -23
  57. package/dist/IrisGridPartitionSelector.js.map +1 -1
  58. package/dist/IrisGridProxyModel.js +9 -153
  59. package/dist/IrisGridProxyModel.js.map +1 -1
  60. package/dist/IrisGridRenderer.d.ts +1 -1
  61. package/dist/IrisGridRenderer.d.ts.map +1 -1
  62. package/dist/IrisGridRenderer.js +41 -183
  63. package/dist/IrisGridRenderer.js.map +1 -1
  64. package/dist/IrisGridShortcuts.js.map +1 -1
  65. package/dist/IrisGridTableModel.d.ts +3 -3
  66. package/dist/IrisGridTableModel.d.ts.map +1 -1
  67. package/dist/IrisGridTableModel.js +10 -90
  68. package/dist/IrisGridTableModel.js.map +1 -1
  69. package/dist/IrisGridTableModelTemplate.d.ts +3 -3
  70. package/dist/IrisGridTableModelTemplate.d.ts.map +1 -1
  71. package/dist/IrisGridTableModelTemplate.js +70 -461
  72. package/dist/IrisGridTableModelTemplate.js.map +1 -1
  73. package/dist/IrisGridTestUtils.js +0 -23
  74. package/dist/IrisGridTestUtils.js.map +1 -1
  75. package/dist/IrisGridTheme.d.ts +1 -1
  76. package/dist/IrisGridTheme.d.ts.map +1 -1
  77. package/dist/IrisGridTheme.js.map +1 -1
  78. package/dist/IrisGridTreeTableModel.js +3 -42
  79. package/dist/IrisGridTreeTableModel.js.map +1 -1
  80. package/dist/IrisGridUtils.d.ts +13 -7
  81. package/dist/IrisGridUtils.d.ts.map +1 -1
  82. package/dist/IrisGridUtils.js +98 -196
  83. package/dist/IrisGridUtils.js.map +1 -1
  84. package/dist/MissingKeyError.js +0 -7
  85. package/dist/MissingKeyError.js.map +1 -1
  86. package/dist/PartitionSelectorSearch.d.ts +2 -2
  87. package/dist/PartitionSelectorSearch.js +2 -48
  88. package/dist/PartitionSelectorSearch.js.map +1 -1
  89. package/dist/PendingDataBottomBar.d.ts +2 -2
  90. package/dist/PendingDataBottomBar.d.ts.map +1 -1
  91. package/dist/PendingDataBottomBar.js +2 -7
  92. package/dist/PendingDataBottomBar.js.map +1 -1
  93. package/dist/TableViewportUpdater.d.ts +2 -2
  94. package/dist/TableViewportUpdater.d.ts.map +1 -1
  95. package/dist/TableViewportUpdater.js +3 -29
  96. package/dist/TableViewportUpdater.js.map +1 -1
  97. package/dist/ToastBottomBar.d.ts +2 -2
  98. package/dist/ToastBottomBar.d.ts.map +1 -1
  99. package/dist/ToastBottomBar.js +2 -4
  100. package/dist/ToastBottomBar.js.map +1 -1
  101. package/dist/TreeTableViewportUpdater.js +0 -21
  102. package/dist/TreeTableViewportUpdater.js.map +1 -1
  103. package/dist/format-context-menus/CustomFormatAction.d.ts +1 -1
  104. package/dist/format-context-menus/CustomFormatAction.d.ts.map +1 -1
  105. package/dist/format-context-menus/CustomFormatAction.js +4 -25
  106. package/dist/format-context-menus/CustomFormatAction.js.map +1 -1
  107. package/dist/format-context-menus/DateTimeFormatContextMenu.js +0 -7
  108. package/dist/format-context-menus/DateTimeFormatContextMenu.js.map +1 -1
  109. package/dist/format-context-menus/DecimalFormatContextMenu.js +0 -9
  110. package/dist/format-context-menus/DecimalFormatContextMenu.js.map +1 -1
  111. package/dist/format-context-menus/FormatContextMenuUtils.js +3 -9
  112. package/dist/format-context-menus/FormatContextMenuUtils.js.map +1 -1
  113. package/dist/format-context-menus/IntegerFormatContextMenu.js +0 -8
  114. package/dist/format-context-menus/IntegerFormatContextMenu.js.map +1 -1
  115. package/dist/format-context-menus/index.js.map +1 -1
  116. package/dist/index.d.ts +3 -3
  117. package/dist/index.d.ts.map +1 -1
  118. package/dist/index.js +3 -3
  119. package/dist/index.js.map +1 -1
  120. package/dist/key-handlers/ClearFilterKeyHandler.js +0 -8
  121. package/dist/key-handlers/ClearFilterKeyHandler.js.map +1 -1
  122. package/dist/key-handlers/CopyKeyHandler.js +1 -10
  123. package/dist/key-handlers/CopyKeyHandler.js.map +1 -1
  124. package/dist/key-handlers/ReverseKeyHandler.js +0 -11
  125. package/dist/key-handlers/ReverseKeyHandler.js.map +1 -1
  126. package/dist/key-handlers/index.js.map +1 -1
  127. package/dist/mousehandlers/IrisGridCellOverflowMouseHandler.js +2 -32
  128. package/dist/mousehandlers/IrisGridCellOverflowMouseHandler.js.map +1 -1
  129. package/dist/mousehandlers/IrisGridColumnSelectMouseHandler.js +4 -34
  130. package/dist/mousehandlers/IrisGridColumnSelectMouseHandler.js.map +1 -1
  131. package/dist/mousehandlers/IrisGridColumnTooltipMouseHandler.js +0 -20
  132. package/dist/mousehandlers/IrisGridColumnTooltipMouseHandler.js.map +1 -1
  133. package/dist/mousehandlers/IrisGridContextMenuHandler.js +17 -107
  134. package/dist/mousehandlers/IrisGridContextMenuHandler.js.map +1 -1
  135. package/dist/mousehandlers/IrisGridDataSelectMouseHandler.js +0 -9
  136. package/dist/mousehandlers/IrisGridDataSelectMouseHandler.js.map +1 -1
  137. package/dist/mousehandlers/IrisGridFilterMouseHandler.js +0 -17
  138. package/dist/mousehandlers/IrisGridFilterMouseHandler.js.map +1 -1
  139. package/dist/mousehandlers/IrisGridSortMouseHandler.js +2 -15
  140. package/dist/mousehandlers/IrisGridSortMouseHandler.js.map +1 -1
  141. package/dist/mousehandlers/PendingMouseHandler.js +0 -6
  142. package/dist/mousehandlers/PendingMouseHandler.js.map +1 -1
  143. package/dist/mousehandlers/index.js.map +1 -1
  144. package/dist/sidebar/AdvancedSettings.js.map +1 -1
  145. package/dist/sidebar/AdvancedSettingsMenu.d.ts +6 -6
  146. package/dist/sidebar/AdvancedSettingsMenu.d.ts.map +1 -1
  147. package/dist/sidebar/AdvancedSettingsMenu.js +2 -6
  148. package/dist/sidebar/AdvancedSettingsMenu.js.map +1 -1
  149. package/dist/sidebar/AdvancedSettingsType.js +0 -2
  150. package/dist/sidebar/AdvancedSettingsType.js.map +1 -1
  151. package/dist/sidebar/ChartBuilder.d.ts +2 -2
  152. package/dist/sidebar/ChartBuilder.d.ts.map +1 -1
  153. package/dist/sidebar/ChartBuilder.js +2 -46
  154. package/dist/sidebar/ChartBuilder.js.map +1 -1
  155. package/dist/sidebar/CustomColumnBuilder.d.ts +2 -2
  156. package/dist/sidebar/CustomColumnBuilder.d.ts.map +1 -1
  157. package/dist/sidebar/CustomColumnBuilder.js +6 -58
  158. package/dist/sidebar/CustomColumnBuilder.js.map +1 -1
  159. package/dist/sidebar/CustomColumnInput.js +4 -15
  160. package/dist/sidebar/CustomColumnInput.js.map +1 -1
  161. package/dist/sidebar/InputEditor.js +5 -36
  162. package/dist/sidebar/InputEditor.js.map +1 -1
  163. package/dist/sidebar/OptionType.js +0 -2
  164. package/dist/sidebar/OptionType.js.map +1 -1
  165. package/dist/sidebar/RollupRows.d.ts +3 -3
  166. package/dist/sidebar/RollupRows.d.ts.map +1 -1
  167. package/dist/sidebar/RollupRows.js +9 -65
  168. package/dist/sidebar/RollupRows.js.map +1 -1
  169. package/dist/sidebar/SelectDistinctBuilder.js +0 -13
  170. package/dist/sidebar/SelectDistinctBuilder.js.map +1 -1
  171. package/dist/sidebar/TableCsvExporter.css +3 -0
  172. package/dist/sidebar/TableCsvExporter.css.map +1 -1
  173. package/dist/sidebar/TableCsvExporter.d.ts +12 -6
  174. package/dist/sidebar/TableCsvExporter.d.ts.map +1 -1
  175. package/dist/sidebar/TableCsvExporter.js +88 -82
  176. package/dist/sidebar/TableCsvExporter.js.map +1 -1
  177. package/dist/sidebar/TableSaver.d.ts +5 -3
  178. package/dist/sidebar/TableSaver.d.ts.map +1 -1
  179. package/dist/sidebar/TableSaver.js +52 -132
  180. package/dist/sidebar/TableSaver.js.map +1 -1
  181. package/dist/sidebar/VisibilityOrderingBuilder.d.ts +5 -4
  182. package/dist/sidebar/VisibilityOrderingBuilder.d.ts.map +1 -1
  183. package/dist/sidebar/VisibilityOrderingBuilder.js +37 -116
  184. package/dist/sidebar/VisibilityOrderingBuilder.js.map +1 -1
  185. package/dist/sidebar/aggregations/AggregationEdit.d.ts +2 -2
  186. package/dist/sidebar/aggregations/AggregationEdit.d.ts.map +1 -1
  187. package/dist/sidebar/aggregations/AggregationEdit.js +2 -14
  188. package/dist/sidebar/aggregations/AggregationEdit.js.map +1 -1
  189. package/dist/sidebar/aggregations/AggregationOperation.js +0 -2
  190. package/dist/sidebar/aggregations/AggregationOperation.js.map +1 -1
  191. package/dist/sidebar/aggregations/AggregationUtils.js +2 -5
  192. package/dist/sidebar/aggregations/AggregationUtils.js.map +1 -1
  193. package/dist/sidebar/aggregations/Aggregations.d.ts +4 -4
  194. package/dist/sidebar/aggregations/Aggregations.d.ts.map +1 -1
  195. package/dist/sidebar/aggregations/Aggregations.js +2 -12
  196. package/dist/sidebar/aggregations/Aggregations.js.map +1 -1
  197. package/dist/sidebar/conditional-formatting/ColumnFormatEditor.d.ts +1 -1
  198. package/dist/sidebar/conditional-formatting/ColumnFormatEditor.d.ts.map +1 -1
  199. package/dist/sidebar/conditional-formatting/ColumnFormatEditor.js +2 -16
  200. package/dist/sidebar/conditional-formatting/ColumnFormatEditor.js.map +1 -1
  201. package/dist/sidebar/conditional-formatting/ConditionEditor.d.ts +1 -1
  202. package/dist/sidebar/conditional-formatting/ConditionEditor.d.ts.map +1 -1
  203. package/dist/sidebar/conditional-formatting/ConditionEditor.js +2 -35
  204. package/dist/sidebar/conditional-formatting/ConditionEditor.js.map +1 -1
  205. package/dist/sidebar/conditional-formatting/ConditionalFormatEditor.d.ts +4 -4
  206. package/dist/sidebar/conditional-formatting/ConditionalFormatEditor.d.ts.map +1 -1
  207. package/dist/sidebar/conditional-formatting/ConditionalFormatEditor.js +2 -12
  208. package/dist/sidebar/conditional-formatting/ConditionalFormatEditor.js.map +1 -1
  209. package/dist/sidebar/conditional-formatting/ConditionalFormattingAPIUtils.js +0 -3
  210. package/dist/sidebar/conditional-formatting/ConditionalFormattingAPIUtils.js.map +1 -1
  211. package/dist/sidebar/conditional-formatting/ConditionalFormattingMenu.d.ts +5 -5
  212. package/dist/sidebar/conditional-formatting/ConditionalFormattingMenu.d.ts.map +1 -1
  213. package/dist/sidebar/conditional-formatting/ConditionalFormattingMenu.js +16 -26
  214. package/dist/sidebar/conditional-formatting/ConditionalFormattingMenu.js.map +1 -1
  215. package/dist/sidebar/conditional-formatting/ConditionalFormattingUtils.d.ts +3 -3
  216. package/dist/sidebar/conditional-formatting/ConditionalFormattingUtils.d.ts.map +1 -1
  217. package/dist/sidebar/conditional-formatting/ConditionalFormattingUtils.js +9 -172
  218. package/dist/sidebar/conditional-formatting/ConditionalFormattingUtils.js.map +1 -1
  219. package/dist/sidebar/conditional-formatting/RowFormatEditor.d.ts +1 -1
  220. package/dist/sidebar/conditional-formatting/RowFormatEditor.d.ts.map +1 -1
  221. package/dist/sidebar/conditional-formatting/RowFormatEditor.js +2 -16
  222. package/dist/sidebar/conditional-formatting/RowFormatEditor.js.map +1 -1
  223. package/dist/sidebar/conditional-formatting/StyleEditor.d.ts +1 -1
  224. package/dist/sidebar/conditional-formatting/StyleEditor.d.ts.map +1 -1
  225. package/dist/sidebar/conditional-formatting/StyleEditor.js +2 -12
  226. package/dist/sidebar/conditional-formatting/StyleEditor.js.map +1 -1
  227. package/dist/sidebar/icons/BarIcon.js +0 -3
  228. package/dist/sidebar/icons/BarIcon.js.map +1 -1
  229. package/dist/sidebar/icons/FormatColumnWhereIcon.js +2 -5
  230. package/dist/sidebar/icons/FormatColumnWhereIcon.js.map +1 -1
  231. package/dist/sidebar/icons/FormatRowWhereIcon.js +2 -5
  232. package/dist/sidebar/icons/FormatRowWhereIcon.js.map +1 -1
  233. package/dist/sidebar/icons/HistogramIcon.js +0 -3
  234. package/dist/sidebar/icons/HistogramIcon.js.map +1 -1
  235. package/dist/sidebar/icons/LineIcon.js +0 -3
  236. package/dist/sidebar/icons/LineIcon.js.map +1 -1
  237. package/dist/sidebar/icons/PieIcon.js +0 -3
  238. package/dist/sidebar/icons/PieIcon.js.map +1 -1
  239. package/dist/sidebar/icons/ScatterIcon.js +0 -3
  240. package/dist/sidebar/icons/ScatterIcon.js.map +1 -1
  241. package/dist/sidebar/icons/index.js.map +1 -1
  242. package/dist/sidebar/index.js.map +1 -1
  243. package/package.json +15 -15
@@ -1,13 +1,8 @@
1
1
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2
-
3
2
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
-
5
3
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
-
7
4
  /* eslint react/destructuring-assignment: "off" */
8
-
9
5
  /* eslint class-methods-use-this: "off" */
10
-
11
6
  /* eslint no-param-reassign: "off" */
12
7
  import { dhSortDown, dhSortUp, vsTriangleDown, vsTriangleRight, vsLinkExternal } from '@deephaven/icons';
13
8
  import { getOrThrow, GridRenderer, GridUtils } from '@deephaven/grid';
@@ -21,7 +16,6 @@ var ICON_NAMES = Object.freeze({
21
16
  CELL_OVERFLOW: 'cellOverflow'
22
17
  });
23
18
  var ICON_SIZE = 16;
24
-
25
19
  /**
26
20
  * Handles rendering some of the Iris specific features, such as sorting icons, sort bar display
27
21
  * */
@@ -31,25 +25,21 @@ class IrisGridRenderer extends GridRenderer {
31
25
  var isQuickFilterValid = quickFilter == null || quickFilter.filter != null;
32
26
  return isAdvancedFilterValid && isQuickFilterValid;
33
27
  }
34
-
35
28
  constructor() {
36
29
  super();
37
-
38
30
  _defineProperty(this, "icons", void 0);
39
-
40
31
  this.icons = {};
41
32
  this.initIcons();
42
33
  }
43
-
44
34
  initIcons() {
45
35
  this.setIcon(ICON_NAMES.SORT_UP, dhSortUp);
46
36
  this.setIcon(ICON_NAMES.SORT_DOWN, dhSortDown);
47
37
  this.setIcon(ICON_NAMES.CARET_DOWN, vsTriangleDown);
48
38
  this.setIcon(ICON_NAMES.CARET_RIGHT, vsTriangleRight);
49
39
  this.setIcon(ICON_NAMES.CELL_OVERFLOW, vsLinkExternal);
50
- } // Scales the icon to be square and match the global ICON_SIZE
51
-
40
+ }
52
41
 
42
+ // Scales the icon to be square and match the global ICON_SIZE
53
43
  setIcon(name, faIcon) {
54
44
  var path = Array.isArray(faIcon.icon[4]) ? faIcon.icon[4][0] : faIcon.icon[4];
55
45
  var icon = new Path2D(path);
@@ -61,46 +51,36 @@ class IrisGridRenderer extends GridRenderer {
61
51
  scaledIcon.addPath(icon, scaleMatrix);
62
52
  this.icons[name] = scaledIcon;
63
53
  }
64
-
65
54
  getIcon(name) {
66
55
  return this.icons[name];
67
56
  }
68
-
69
57
  getSortIcon(sort) {
70
58
  if (!sort) {
71
59
  return null;
72
60
  }
73
-
74
61
  if (sort.direction === TableUtils.sortDirection.ascending) {
75
62
  return this.getIcon(ICON_NAMES.SORT_UP);
76
63
  }
77
-
78
64
  if (sort.direction === TableUtils.sortDirection.descending) {
79
65
  return this.getIcon(ICON_NAMES.SORT_DOWN);
80
66
  }
81
-
82
67
  return null;
83
68
  }
84
-
85
69
  drawCanvas(state) {
86
70
  super.drawCanvas(state);
87
71
  this.drawScrim(state);
88
72
  }
89
-
90
73
  drawGrid(context, state) {
91
74
  super.drawGrid(context, state);
92
75
  this.drawCellOverflowButton(state);
93
76
  }
94
-
95
77
  drawGridLines(context, state) {
96
78
  super.drawGridLines(context, state);
97
79
  this.drawGroupedColumnLine(context, state);
98
80
  this.drawPendingRowLine(context, state);
99
81
  }
100
-
101
82
  drawCellContent(context, state, column, row) {
102
83
  var _model$columns$modelC;
103
-
104
84
  var {
105
85
  metrics,
106
86
  model
@@ -111,13 +91,10 @@ class IrisGridRenderer extends GridRenderer {
111
91
  } = metrics;
112
92
  var modelRow = getOrThrow(modelRows, row);
113
93
  var modelColumn = modelColumns.get(column);
114
-
115
94
  if (modelColumn === undefined) {
116
95
  return;
117
96
  }
118
-
119
97
  var value = model.valueForCell(modelColumn, modelRow);
120
-
121
98
  if (TableUtils.isTextType((_model$columns$modelC = model.columns[modelColumn]) === null || _model$columns$modelC === void 0 ? void 0 : _model$columns$modelC.type)) {
122
99
  if (value === null || value === '') {
123
100
  var originalFont = context.font;
@@ -128,10 +105,8 @@ class IrisGridRenderer extends GridRenderer {
128
105
  return;
129
106
  }
130
107
  }
131
-
132
108
  super.drawCellContent(context, state, column, row);
133
109
  }
134
-
135
110
  drawGroupedColumnLine(context, state) {
136
111
  var {
137
112
  metrics,
@@ -147,20 +122,16 @@ class IrisGridRenderer extends GridRenderer {
147
122
  visibleColumnWidths,
148
123
  visibleColumnXs
149
124
  } = metrics;
150
-
151
125
  if (groupedColumns.length === 0 || theme.groupedColumnDividerColor == null) {
152
126
  return;
153
127
  }
154
-
155
128
  var lastGroupedColumn = groupedColumns[groupedColumns.length - 1];
156
129
  var modelIndex = columns.findIndex(c => c.name === lastGroupedColumn.name);
157
130
  var columnX = visibleColumnXs.get(modelIndex);
158
131
  var columnWidth = visibleColumnWidths.get(modelIndex);
159
-
160
132
  if (columnX == null || columnWidth == null) {
161
133
  return;
162
134
  }
163
-
164
135
  var x = columnX + columnWidth + 0.5;
165
136
  context.strokeStyle = theme.groupedColumnDividerColor;
166
137
  context.lineWidth = 1;
@@ -169,7 +140,6 @@ class IrisGridRenderer extends GridRenderer {
169
140
  context.lineTo(x, maxY);
170
141
  context.stroke();
171
142
  }
172
-
173
143
  drawPendingRowLine(context, state) {
174
144
  var {
175
145
  metrics,
@@ -183,18 +153,14 @@ class IrisGridRenderer extends GridRenderer {
183
153
  var {
184
154
  pendingRowCount
185
155
  } = model;
186
-
187
156
  if (pendingRowCount <= 0) {
188
157
  return;
189
158
  }
190
-
191
159
  var firstPendingRow = model.rowCount - model.pendingRowCount - model.floatingBottomRowCount;
192
160
  var y = visibleRowYs.get(firstPendingRow);
193
-
194
161
  if (y == null) {
195
162
  return;
196
163
  }
197
-
198
164
  y -= 0.5;
199
165
  context.save();
200
166
  context.setLineDash([4, 2]);
@@ -206,18 +172,15 @@ class IrisGridRenderer extends GridRenderer {
206
172
  context.stroke();
207
173
  context.restore();
208
174
  }
209
-
210
175
  drawMouseColumnHover(context, state) {
211
176
  var {
212
177
  theme,
213
178
  metrics,
214
179
  hoverSelectColumn
215
180
  } = state;
216
-
217
181
  if (hoverSelectColumn == null || theme.linkerColumnHoverBackgroundColor == null) {
218
182
  return;
219
183
  }
220
-
221
184
  var {
222
185
  visibleColumnWidths,
223
186
  visibleColumnXs,
@@ -230,17 +193,14 @@ class IrisGridRenderer extends GridRenderer {
230
193
  context.fillStyle = theme.linkerColumnHoverBackgroundColor;
231
194
  context.fillRect(x, 0, columnWidth, maxY);
232
195
  }
233
-
234
196
  drawMouseRowHover(context, state) {
235
197
  var {
236
198
  isSelectingColumn
237
199
  } = state;
238
-
239
200
  if (!isSelectingColumn) {
240
201
  super.drawMouseRowHover(context, state);
241
202
  }
242
203
  }
243
-
244
204
  drawScrim(state) {
245
205
  var {
246
206
  context,
@@ -248,11 +208,9 @@ class IrisGridRenderer extends GridRenderer {
248
208
  metrics,
249
209
  theme
250
210
  } = state;
251
-
252
211
  if (loadingScrimProgress == null) {
253
212
  return;
254
213
  }
255
-
256
214
  var {
257
215
  width,
258
216
  height,
@@ -262,28 +220,29 @@ class IrisGridRenderer extends GridRenderer {
262
220
  scrimBlurSize,
263
221
  scrimColor
264
222
  } = theme;
265
- context.save(); // Use global composite so we can change the underlying layer to grayscale
223
+ context.save();
266
224
 
225
+ // Use global composite so we can change the underlying layer to grayscale
267
226
  context.globalCompositeOperation = 'color';
268
227
  context.filter = "blur(".concat(scrimBlurSize, "px)");
269
-
270
228
  if (scrimColor != null) {
271
229
  context.fillStyle = scrimColor;
272
- } // Clip the path so the top edge is hard edge, bottom edge is soft/blurry
273
-
230
+ }
274
231
 
232
+ // Clip the path so the top edge is hard edge, bottom edge is soft/blurry
275
233
  context.beginPath();
276
234
  context.rect(0, gridY, width, height - gridY);
277
- context.clip(); // Extend the edges beyond the clip area so they're hard edges
235
+ context.clip();
278
236
 
279
- context.fillRect(-scrimBlurSize, -scrimBlurSize + gridY, scrimBlurSize * 2 + width, (scrimBlurSize * 2 + (height - gridY)) * loadingScrimProgress); // add an overlay of the scrim color to darken things a bit
237
+ // Extend the edges beyond the clip area so they're hard edges
238
+ context.fillRect(-scrimBlurSize, -scrimBlurSize + gridY, scrimBlurSize * 2 + width, (scrimBlurSize * 2 + (height - gridY)) * loadingScrimProgress);
280
239
 
240
+ // add an overlay of the scrim color to darken things a bit
281
241
  context.globalCompositeOperation = 'overlay';
282
242
  context.filter = "blur(".concat(scrimBlurSize, "px) opacity(15%)");
283
243
  context.fillRect(-scrimBlurSize, -scrimBlurSize + gridY, scrimBlurSize * 2 + width, (scrimBlurSize * 2 + (height - gridY)) * loadingScrimProgress);
284
244
  context.restore();
285
245
  }
286
-
287
246
  drawColumnHeaders(context, state) {
288
247
  super.drawColumnHeaders(context, state);
289
248
  var {
@@ -296,38 +255,33 @@ class IrisGridRenderer extends GridRenderer {
296
255
  columnHeaderHeight
297
256
  } = metrics;
298
257
  this.drawFilterHeaders(context, state);
299
-
300
258
  if (columnHeaderHeight <= 0) {
301
259
  return;
302
260
  }
303
-
304
261
  var {
305
262
  sort
306
- } = model; // if there is only one sort bar, it is interior to the header to save space
307
-
263
+ } = model;
264
+ // if there is only one sort bar, it is interior to the header to save space
308
265
  if (sort.length === 1) {
309
266
  var hasReverse = reverseType !== TableUtils.REVERSE_TYPE.NONE;
310
267
  var color;
311
-
312
268
  if (hasReverse) {
313
269
  color = theme.headerReverseBarColor;
314
270
  } else {
315
271
  color = theme.headerSortBarColor;
316
272
  }
317
-
318
273
  this.drawHeaderBar(context, state, color, hasReverse ? theme.reverseHeaderBarHeight : theme.sortHeaderBarHeight);
319
274
  } else if (sort.length > 1) {
320
275
  // if there's multiple bars, the sort is interior to header
321
276
  // and the reverse claims space in the table
322
- if ( // has table reverse
277
+ if (
278
+ // has table reverse
323
279
  reverseType !== TableUtils.REVERSE_TYPE.NONE) {
324
280
  this.drawHeaderBar(context, state, theme.headerReverseBarColor, theme.reverseHeaderBarHeight, false);
325
281
  }
326
-
327
282
  this.drawHeaderBar(context, state, theme.headerSortBarColor, theme.sortHeaderBarHeight);
328
283
  }
329
284
  }
330
-
331
285
  drawHeaderBar(context, state, color, barHeight) {
332
286
  var interior = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
333
287
  var {
@@ -338,22 +292,19 @@ class IrisGridRenderer extends GridRenderer {
338
292
  var {
339
293
  columnHeaderHeight,
340
294
  width
341
- } = metrics; // Draw casing with 1 pixel above and below the bar,
295
+ } = metrics;
296
+ // Draw casing with 1 pixel above and below the bar,
342
297
  // 1px falls on the existing split between grid/headers
343
298
  // so don't need to be accounnted for in math elsewhere
344
-
345
299
  var offset = 0;
346
-
347
300
  if (!interior) {
348
301
  offset = barHeight;
349
302
  }
350
-
351
303
  context.fillStyle = theme.headerBarCasingColor;
352
304
  context.fillRect(0, model.columnHeaderMaxDepth * columnHeaderHeight - barHeight - 2 + offset, width, barHeight + 2);
353
305
  context.fillStyle = color;
354
306
  context.fillRect(0, model.columnHeaderMaxDepth * columnHeaderHeight - barHeight - 1 + offset, width, barHeight);
355
307
  }
356
-
357
308
  drawColumnHeadersAtDepth(context, state, range, boundsProp, depth) {
358
309
  var {
359
310
  metrics,
@@ -366,18 +317,14 @@ class IrisGridRenderer extends GridRenderer {
366
317
  var {
367
318
  width
368
319
  } = metrics;
369
-
370
320
  var bounds = _objectSpread(_objectSpread({}, boundsProp), {}, {
371
321
  maxX: depth === columnHeaderMaxDepth - 1 && boundsProp.maxX === width ? width - (isMenuShown ? 0 : 30) // Account for the menu button
372
322
  : boundsProp.maxX
373
323
  });
374
-
375
324
  super.drawColumnHeadersAtDepth(context, state, range, bounds, depth);
376
325
  }
377
-
378
326
  drawColumnHeaderAtIndex(context, state, index, bounds) {
379
327
  var _fontWidths$get;
380
-
381
328
  super.drawColumnHeaderAtIndex(context, state, index, bounds);
382
329
  var {
383
330
  metrics,
@@ -398,29 +345,21 @@ class IrisGridRenderer extends GridRenderer {
398
345
  var columnWidth = getOrThrow(visibleColumnWidths, index, 0);
399
346
  var columnX = getOrThrow(visibleColumnXs, index) + gridX;
400
347
  var modelColumn = modelColumns.get(index);
401
-
402
348
  if (modelColumn == null) {
403
349
  return;
404
350
  }
405
-
406
351
  var sort = TableUtils.getSortForColumn(model.sort, modelColumn);
407
-
408
352
  if (!sort) {
409
353
  return;
410
354
  }
411
-
412
355
  var icon = this.getSortIcon(sort);
413
-
414
356
  if (!icon) {
415
357
  return;
416
358
  }
417
-
418
359
  var text = model.textForColumnHeader(modelColumn);
419
-
420
360
  if (text === undefined) {
421
361
  return;
422
362
  }
423
-
424
363
  var fontWidth = (_fontWidths$get = fontWidths.get(context.font)) !== null && _fontWidths$get !== void 0 ? _fontWidths$get : GridRenderer.DEFAULT_FONT_WIDTH;
425
364
  assertNotNull(fontWidth);
426
365
  var textWidth = text.length * fontWidth;
@@ -442,21 +381,18 @@ class IrisGridRenderer extends GridRenderer {
442
381
  context.fill(icon);
443
382
  context.restore();
444
383
  }
445
-
446
384
  drawFilterHeaders(context, state) {
447
385
  var {
448
386
  isFilterBarShown,
449
387
  quickFilters,
450
388
  advancedFilters
451
389
  } = state;
452
-
453
390
  if (isFilterBarShown) {
454
391
  this.drawExpandedFilterHeaders(context, state);
455
392
  } else if (quickFilters != null && quickFilters.size > 0 || advancedFilters != null && advancedFilters.size > 0) {
456
393
  this.drawCollapsedFilterHeaders(context, state);
457
394
  }
458
395
  }
459
-
460
396
  drawExpandedFilterHeaders(context, state) {
461
397
  var {
462
398
  metrics,
@@ -468,11 +404,9 @@ class IrisGridRenderer extends GridRenderer {
468
404
  var {
469
405
  filterBarHeight
470
406
  } = theme;
471
-
472
407
  if (filterBarHeight <= 0) {
473
408
  return;
474
409
  }
475
-
476
410
  var {
477
411
  gridX,
478
412
  gridY,
@@ -486,31 +420,30 @@ class IrisGridRenderer extends GridRenderer {
486
420
  context.save();
487
421
  context.font = theme.font;
488
422
  context.textAlign = 'left';
489
-
490
423
  if (quickFilters != null && quickFilters.size > 0 || advancedFilters != null && advancedFilters.size > 0) {
491
424
  // fill style if a fiter is set on any column
492
425
  context.fillStyle = theme.filterBarExpandedActiveBackgroundColor;
493
426
  } else {
494
427
  // fill style with no filters set
495
428
  context.fillStyle = theme.filterBarExpandedBackgroundColor;
496
- } // Draw the background
497
-
429
+ }
498
430
 
499
- context.fillRect(gridX, columnHeaderHeight, maxX, filterBarHeight - 1); // Draw the bottom border
431
+ // Draw the background
432
+ context.fillRect(gridX, columnHeaderHeight, maxX, filterBarHeight - 1);
500
433
 
434
+ // Draw the bottom border
501
435
  context.fillStyle = theme.headerBarCasingColor;
502
- context.fillRect(gridX, columnHeaderHeight + filterBarHeight - 1, maxX, 1); // Draw the filter input boxes
436
+ context.fillRect(gridX, columnHeaderHeight + filterBarHeight - 1, maxX, 1);
503
437
 
438
+ // Draw the filter input boxes
504
439
  var y1 = columnHeaderHeight;
505
440
  context.strokeStyle = theme.filterBarSeparatorColor;
506
441
  context.beginPath();
507
-
508
442
  for (var i = 0; i < visibleColumns.length; i += 1) {
509
443
  var column = visibleColumns[i];
510
444
  var modelColumn = getOrThrow(modelColumns, column);
511
445
  var columnX = getOrThrow(visibleColumnXs, column);
512
446
  var columnWidth = getOrThrow(visibleColumnWidths, column);
513
-
514
447
  if (model.isFilterable(modelColumn) && columnWidth > 0) {
515
448
  var x1 = gridX + (columnX !== null && columnX !== void 0 ? columnX : 0);
516
449
  context.rect(x1 + 0.5, y1 + 0.5, columnWidth, filterBarHeight - 2); // 1 for the border, 1 for the casing
@@ -518,26 +451,19 @@ class IrisGridRenderer extends GridRenderer {
518
451
  }
519
452
 
520
453
  context.stroke();
521
-
522
454
  for (var _i = 0; _i < visibleColumns.length; _i += 1) {
523
455
  var _column = visibleColumns[_i];
524
-
525
456
  var _columnWidth = getOrThrow(visibleColumnWidths, _column);
526
-
527
457
  var _columnX = getOrThrow(visibleColumnXs, _column);
528
-
529
458
  var x = _columnX + gridX;
530
459
  this.drawExpandedFilterHeader(context, state, _column, x, _columnWidth);
531
460
  }
532
-
533
461
  context.restore();
534
462
  }
535
-
536
463
  drawExpandedFilterHeader(context, state, column, columnX, columnWidth) {
537
464
  if (columnWidth <= 0) {
538
465
  return;
539
466
  }
540
-
541
467
  var {
542
468
  metrics,
543
469
  theme,
@@ -560,39 +486,30 @@ class IrisGridRenderer extends GridRenderer {
560
486
  if (modelColumn === undefined) return;
561
487
  var quickFilter = quickFilters.get(modelColumn);
562
488
  var advancedFilter = advancedFilters.get(modelColumn);
563
-
564
489
  if (quickFilter == null && advancedFilter == null) {
565
490
  return;
566
491
  }
567
-
568
492
  var text = null;
569
-
570
493
  if (quickFilter != null) {
571
494
  var {
572
495
  text: filterText
573
496
  } = quickFilter;
574
497
  text = filterText;
575
-
576
498
  if (!text) {
577
499
  text = TableUtils.getFilterText(quickFilter.filter);
578
500
  }
579
-
580
501
  if (text != null) {
581
502
  var {
582
503
  fontWidths
583
504
  } = metrics;
584
505
  var fontWidth = fontWidths.get(context.font);
585
-
586
506
  if (fontWidth == null || fontWidth === 0) {
587
507
  fontWidth = context.measureText('8').width;
588
-
589
508
  if (!fontWidth) {
590
509
  fontWidth = 10;
591
510
  }
592
511
  }
593
-
594
512
  var maxLength = (columnWidth - filterBarHorizontalPadding * 2) / fontWidth;
595
-
596
513
  if (maxLength <= 0) {
597
514
  text = '';
598
515
  } else if (text.length > maxLength) {
@@ -600,47 +517,40 @@ class IrisGridRenderer extends GridRenderer {
600
517
  }
601
518
  }
602
519
  }
603
-
604
520
  context.save();
605
521
  var isFilterValid = IrisGridRenderer.isFilterValid(advancedFilter, quickFilter);
606
-
607
522
  if (isFilterValid && filterBarExpandedActiveCellBackgroundColor != null) {
608
523
  // draw active filter background inside cell
609
524
  context.fillStyle = filterBarExpandedActiveCellBackgroundColor;
610
- context.fillRect(columnX + 1, // +1 left border
611
- columnHeaderHeight + 1, // +1 top border
612
- columnWidth - 1, // -1 right border
525
+ context.fillRect(columnX + 1,
526
+ // +1 left border
527
+ columnHeaderHeight + 1,
528
+ // +1 top border
529
+ columnWidth - 1,
530
+ // -1 right border
613
531
  filterBarHeight - 3 // -3 top, bottom border and bottom casing
614
532
  );
615
533
  } else if (filterBarErrorColor != null) {
616
534
  // draw error box inside cell
617
535
  context.fillStyle = filterBarErrorColor;
618
536
  context.lineWidth = 2;
619
- context.strokeStyle = filterBarErrorColor; // Because this is drawn with a strokeRect, we have to add/subtract half the,
537
+ context.strokeStyle = filterBarErrorColor;
538
+ // Because this is drawn with a strokeRect, we have to add/subtract half the,
620
539
  // linewidth from each side to make interior, in addition to accounting for any borders/casings
621
-
622
540
  var rectLeft = columnX + 2; // 1 for strokeRect, 1 for border
623
-
624
541
  var rectTop = columnHeaderHeight + 2; // 1 for strokeRect, 1 for border
625
-
626
542
  var rectWidth = columnWidth - 3; // for 2 border and 1 for strokeRect
627
-
628
543
  var rectHeight = filterBarHeight - 5; // -2 for strokeRect, -3 for top, bottom border and bottom casing
629
-
630
544
  context.strokeRect(rectLeft, rectTop, rectWidth, rectHeight);
631
545
  }
632
-
633
546
  if (text != null && text !== '') {
634
547
  var textX = columnX + filterBarHorizontalPadding;
635
548
  var textY = columnHeaderHeight + filterBarHeight * 0.5 + 1; // + 1 for border
636
-
637
549
  context.fillStyle = headerColor;
638
550
  context.fillText(text, textX, textY);
639
551
  }
640
-
641
552
  context.restore();
642
553
  }
643
-
644
554
  drawCollapsedFilterHeaders(context, state) {
645
555
  var {
646
556
  metrics,
@@ -650,11 +560,9 @@ class IrisGridRenderer extends GridRenderer {
650
560
  headerSeparatorColor,
651
561
  filterBarCollapsedHeight
652
562
  } = theme;
653
-
654
563
  if (filterBarCollapsedHeight <= 0) {
655
564
  return;
656
565
  }
657
-
658
566
  var {
659
567
  gridX,
660
568
  gridY,
@@ -664,31 +572,27 @@ class IrisGridRenderer extends GridRenderer {
664
572
  visibleColumnXs
665
573
  } = metrics;
666
574
  var columnHeaderHeight = gridY - filterBarCollapsedHeight;
667
- context.save(); // Draw the background of the collapsed filter bar
575
+ context.save();
668
576
 
577
+ // Draw the background of the collapsed filter bar
669
578
  context.fillStyle = headerSeparatorColor;
670
579
  context.fillRect(gridX, columnHeaderHeight, maxX, filterBarCollapsedHeight);
671
-
672
580
  for (var i = 0; i < visibleColumns.length; i += 1) {
673
581
  var column = visibleColumns[i];
674
582
  var columnWidth = visibleColumnWidths.get(column);
675
583
  var columnX = visibleColumnXs.get(column);
676
-
677
584
  if (columnX != null && columnWidth != null) {
678
- var x = columnX + gridX; // draw the collapsed cells
679
-
585
+ var x = columnX + gridX;
586
+ // draw the collapsed cells
680
587
  this.drawCollapsedFilterHeader(context, state, column, x, columnWidth);
681
588
  }
682
589
  }
683
-
684
590
  context.restore();
685
591
  }
686
-
687
592
  drawCollapsedFilterHeader(context, state, column, columnX, columnWidth) {
688
593
  if (columnWidth <= 0) {
689
594
  return;
690
595
  }
691
-
692
596
  var {
693
597
  metrics,
694
598
  theme,
@@ -711,7 +615,6 @@ class IrisGridRenderer extends GridRenderer {
711
615
  } = theme;
712
616
  context.save();
713
617
  var isFilterValid = IrisGridRenderer.isFilterValid(advancedFilter, quickFilter);
714
-
715
618
  if (filterBarActiveBackgroundColor != null && quickFilter == null && advancedFilter == null) {
716
619
  context.fillStyle = filterBarActiveBackgroundColor;
717
620
  } else if (filterBarActiveColor != null && isFilterValid) {
@@ -719,18 +622,13 @@ class IrisGridRenderer extends GridRenderer {
719
622
  } else if (filterBarErrorColor != null) {
720
623
  context.fillStyle = filterBarErrorColor;
721
624
  }
722
-
723
625
  var x = columnX + 1; // for gap between columns
724
-
725
626
  var y = gridY - filterBarCollapsedHeight;
726
627
  var rectWidth = columnWidth - 1; // for gap between columns
727
-
728
628
  var rectHeight = filterBarCollapsedHeight - 1; // for casing bottom
729
-
730
629
  context.fillRect(x, y, rectWidth, rectHeight);
731
630
  context.restore();
732
631
  }
733
-
734
632
  drawTreeMarker(context, state, columnX, rowY, treeBox, color, isExpanded) {
735
633
  context.save();
736
634
  var {
@@ -746,7 +644,6 @@ class IrisGridRenderer extends GridRenderer {
746
644
  context.fill(markerIcon);
747
645
  context.restore();
748
646
  }
749
-
750
647
  drawRowFooters(context, state) {
751
648
  var {
752
649
  metrics,
@@ -770,12 +667,11 @@ class IrisGridRenderer extends GridRenderer {
770
667
  visibleRowHeights,
771
668
  visibleRowYs,
772
669
  width
773
- } = metrics; // Only draw the footers on the floating rows
774
-
670
+ } = metrics;
671
+ // Only draw the footers on the floating rows
775
672
  if (rowFooterWidth <= 0 || floatingRows.length === 0) {
776
673
  return;
777
674
  }
778
-
779
675
  var {
780
676
  cellHorizontalPadding,
781
677
  floatingGridRowColor,
@@ -787,18 +683,14 @@ class IrisGridRenderer extends GridRenderer {
787
683
  context.beginPath();
788
684
  var x = Math.min(maxX, width - rowFooterWidth - verticalBarWidth - gridX);
789
685
  context.fillStyle = floatingRowBackgroundColors;
790
-
791
686
  if (floatingTopHeight > 0) {
792
687
  context.rect(x, 0, rowFooterWidth, floatingTopHeight);
793
688
  }
794
-
795
689
  if (floatingBottomHeight > 0) {
796
690
  context.rect(x, height - gridY - horizontalBarHeight - floatingBottomHeight, rowFooterWidth, floatingBottomHeight);
797
691
  }
798
-
799
692
  context.fill();
800
693
  var mouseRow = mouseX != null && mouseY != null && mouseX >= gridX && mouseX <= maxX + rowFooterWidth ? GridUtils.getRowAtY(mouseY, metrics) : null;
801
-
802
694
  if (rowHoverBackgroundColor != null && mouseRow !== null && floatingRows.includes(mouseRow)) {
803
695
  context.fillStyle = rowHoverBackgroundColor;
804
696
  var y = visibleRowYs.get(mouseRow);
@@ -807,49 +699,38 @@ class IrisGridRenderer extends GridRenderer {
807
699
  assertNotNull(rowHeight);
808
700
  context.fillRect(x, y, rowFooterWidth, rowHeight);
809
701
  }
810
-
811
702
  context.beginPath();
812
-
813
703
  if (floatingGridRowColor != null) {
814
704
  context.strokeStyle = floatingGridRowColor;
815
705
  }
816
-
817
706
  if (floatingTopHeight > 0) {
818
707
  context.moveTo(x + 0.5, 0.5);
819
708
  context.lineTo(x + 0.5, floatingTopHeight - 0.5);
820
709
  }
821
-
822
710
  if (floatingBottomHeight > 0) {
823
711
  var _y = height - gridY - horizontalBarHeight - floatingBottomHeight;
824
-
825
712
  context.moveTo(x - 0.5, _y + 0.5);
826
713
  context.lineTo(x - 0.5, _y + floatingBottomHeight - 0.5);
827
714
  }
828
-
829
715
  context.stroke();
830
716
  context.fillStyle = headerColor;
831
717
  context.textAlign = 'left';
832
718
  var textX = x + cellHorizontalPadding;
833
-
834
719
  for (var i = 0; i < floatingRows.length; i += 1) {
835
720
  var row = floatingRows[i];
836
-
837
721
  var _rowHeight = visibleRowHeights.get(row);
838
-
839
722
  var rowY = visibleRowYs.get(row);
840
723
  var modelRow = modelRows.get(row);
841
-
842
724
  if (rowY != null && _rowHeight != null && modelRow != null) {
843
725
  var textY = rowY + _rowHeight * 0.5;
844
726
  context.fillText(model.textForRowFooter(modelRow), textX, textY);
845
727
  }
846
728
  }
847
-
848
729
  context.translate(-gridX, -gridY);
849
- } // This will shrink the size the text may take when the overflow button is rendered
850
- // The text will truncate to a smaller width and won't overlap the button
851
-
730
+ }
852
731
 
732
+ // This will shrink the size the text may take when the overflow button is rendered
733
+ // The text will truncate to a smaller width and won't overlap the button
853
734
  getTextRenderMetrics(context, state, column, row) {
854
735
  var textMetrics = super.getTextRenderMetrics(context, state, column, row);
855
736
  var {
@@ -857,32 +738,25 @@ class IrisGridRenderer extends GridRenderer {
857
738
  mouseY,
858
739
  metrics
859
740
  } = state;
860
-
861
741
  if (mouseX == null || mouseY == null) {
862
742
  return textMetrics;
863
743
  }
864
-
865
744
  var {
866
745
  column: mouseColumn,
867
746
  row: mouseRow
868
747
  } = GridUtils.getGridPointFromXY(mouseX, mouseY, metrics);
869
-
870
748
  if (column === mouseColumn && row === mouseRow) {
871
749
  var {
872
750
  left
873
751
  } = this.getCellOverflowButtonPosition(state);
874
-
875
752
  if (this.shouldRenderOverflowButton(state) && left != null) {
876
753
  textMetrics.width = left - metrics.gridX - textMetrics.x;
877
754
  }
878
755
  }
879
-
880
756
  return textMetrics;
881
757
  }
882
-
883
758
  shouldRenderOverflowButton(state) {
884
759
  var _model$textForCell, _metrics$fontWidths$g;
885
-
886
760
  var {
887
761
  context,
888
762
  mouseX,
@@ -891,22 +765,18 @@ class IrisGridRenderer extends GridRenderer {
891
765
  model,
892
766
  theme
893
767
  } = state;
894
-
895
768
  if (mouseX == null || mouseY == null) {
896
769
  return false;
897
770
  }
898
-
899
771
  var {
900
772
  row,
901
773
  column,
902
774
  modelRow,
903
775
  modelColumn
904
776
  } = GridUtils.getCellInfoFromXY(mouseX, mouseY, metrics);
905
-
906
777
  if (row == null || column == null || modelRow == null || modelColumn == null || !TableUtils.isStringType(model.columns[modelColumn].type)) {
907
778
  return false;
908
779
  }
909
-
910
780
  var text = (_model$textForCell = model.textForCell(modelColumn, modelRow)) !== null && _model$textForCell !== void 0 ? _model$textForCell : '';
911
781
  var {
912
782
  width: textWidth
@@ -918,7 +788,6 @@ class IrisGridRenderer extends GridRenderer {
918
788
  context.restore();
919
789
  return text !== '' && truncatedText !== text;
920
790
  }
921
-
922
791
  getCellOverflowButtonPosition(_ref) {
923
792
  var {
924
793
  mouseX,
@@ -932,11 +801,9 @@ class IrisGridRenderer extends GridRenderer {
932
801
  width: null,
933
802
  height: null
934
803
  };
935
-
936
804
  if (mouseX == null || mouseY == null || !metrics) {
937
805
  return NULL_POSITION;
938
806
  }
939
-
940
807
  var {
941
808
  rowHeight,
942
809
  columnWidth,
@@ -954,8 +821,8 @@ class IrisGridRenderer extends GridRenderer {
954
821
  cellHorizontalPadding
955
822
  } = theme;
956
823
  var width = ICON_SIZE + 2 * cellHorizontalPadding;
957
- var height = rowHeight; // Right edge of column or of visible grid, whichever is smaller
958
-
824
+ var height = rowHeight;
825
+ // Right edge of column or of visible grid, whichever is smaller
959
826
  var right = Math.min(metrics.gridX + left + columnWidth, gridWidth - verticalBarWidth);
960
827
  var buttonLeft = right - width;
961
828
  var buttonTop = metrics.gridY + top;
@@ -966,7 +833,6 @@ class IrisGridRenderer extends GridRenderer {
966
833
  height
967
834
  };
968
835
  }
969
-
970
836
  drawCellOverflowButton(state) {
971
837
  var {
972
838
  context,
@@ -975,11 +841,9 @@ class IrisGridRenderer extends GridRenderer {
975
841
  theme
976
842
  } = state;
977
843
  if (mouseX == null || mouseY == null) return;
978
-
979
844
  if (!this.shouldRenderOverflowButton(state)) {
980
845
  return;
981
846
  }
982
-
983
847
  var {
984
848
  left: buttonLeft,
985
849
  top: buttonTop,
@@ -992,24 +856,18 @@ class IrisGridRenderer extends GridRenderer {
992
856
  overflowButtonHoverColor
993
857
  } = theme;
994
858
  context.save();
995
-
996
859
  if (overflowButtonHoverColor != null && buttonLeft != null && buttonWidth != null && buttonTop != null && buttonHeight != null && mouseX >= buttonLeft && mouseX <= buttonLeft + buttonWidth && mouseY >= buttonTop && mouseY <= buttonTop + buttonHeight) {
997
860
  context.fillStyle = overflowButtonHoverColor;
998
861
  } else if (overflowButtonColor != null) {
999
862
  context.fillStyle = overflowButtonColor;
1000
863
  }
1001
-
1002
864
  var icon = this.getIcon(ICON_NAMES.CELL_OVERFLOW);
1003
-
1004
865
  if (buttonLeft != null && buttonTop != null) {
1005
866
  context.translate(buttonLeft + cellHorizontalPadding, buttonTop + 2);
1006
867
  }
1007
-
1008
868
  context.fill(icon);
1009
869
  context.restore();
1010
870
  }
1011
-
1012
871
  }
1013
-
1014
872
  export default IrisGridRenderer;
1015
873
  //# sourceMappingURL=IrisGridRenderer.js.map