@deephaven/grid 1.22.1-alpha-pivot-builder.0 → 1.22.1

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.
@@ -151,28 +151,45 @@ export declare class GridUtils {
151
151
  */
152
152
  static getNextShownRow(startIndex: VisibleIndex, metrics: GridMetrics): VisibleIndex | null;
153
153
  /**
154
- * Check if a separator exists between a column and the next column at a given depth.
154
+ * Determine whether two adjacent columns belong to the same column-header group
155
+ * at the given depth.
155
156
  *
156
- * - At leaf depth (0), every model column is separated from the rest.
157
- * - At deeper depths, separator existence follows column-header-group identity when
158
- * the model exposes groups via `getColumnHeaderGroup`. Distinct group instances
159
- * that happen to share a display name (e.g. pivot Totals groups) are correctly
160
- * treated as separate.
161
- * - When neither side has a declared group, fall back to header-text inequality so
162
- * plain grouped-header models (which express grouping only through repeated text)
163
- * keep their existing behavior.
164
- * - The check is symmetric across the boundary: a separator is drawn at either
165
- * outer edge of a group cell, including the left edge of a group that is preceded
166
- * by an ungrouped column (empty band). Only a boundary with an empty band on
167
- * both sides has no separator.
157
+ * - When the model exposes group instances via `getColumnHeaderGroup`, identity
158
+ * decides: two distinct group instances that happen to share a display name
159
+ * (e.g. pivot Totals groups) are treated as different groups.
160
+ * - When only one side has a declared group, they are different groups.
161
+ * - When neither side has a declared group, fall back to header-text equality so
162
+ * plain grouped-header models (which express grouping only through repeated
163
+ * text) keep their existing behavior.
168
164
  *
169
165
  * @param model The grid model
170
166
  * @param depth The header depth to check at
171
- * @param columnIndex The current model column index
172
- * @param nextColumnIndex The next model column index (undefined for last column)
167
+ * @param columnIndex The first model column index
168
+ * @param otherColumnIndex The second model column index
169
+ * @returns true if both columns are part of the same group at this depth
170
+ */
171
+ static isSameColumnGroupAtDepth(model: GridModel, depth: number, columnIndex: ModelIndex, otherColumnIndex: ModelIndex): boolean;
172
+ /**
173
+ * Check if a separator exists between the column at `visibleIndex` and the
174
+ * column immediately after it at a given header depth.
175
+ *
176
+ * - At leaf depth (0), every model column has a separator on its trailing edge.
177
+ * - At deeper depths, separator existence follows column-header-group identity
178
+ * (see {@link isSameColumnGroupAtDepth}). Distinct group instances that share a
179
+ * display name (e.g. pivot Totals groups) are correctly treated as separate.
180
+ * - The true trailing edge of the table (the last column) always has a separator.
181
+ *
182
+ * The next model column is resolved from `visibleIndex + 1` so that an off-screen
183
+ * neighbor is handled correctly and is not mistaken for the table's trailing edge.
184
+ *
185
+ * @param model The grid model
186
+ * @param depth The header depth to check at
187
+ * @param visibleIndex The visible index of the current column
188
+ * @param columnCount The total number of columns in the model
189
+ * @param movedColumns The current column-move operations
173
190
  * @returns true if a separator should be shown, false otherwise
174
191
  */
175
- static hasColumnSeparatorAtDepth(model: GridModel, depth: number | undefined, columnIndex: ModelIndex | undefined, nextColumnIndex: ModelIndex | undefined): boolean;
192
+ static hasColumnSeparatorAtDepth(model: GridModel, depth: number | undefined, visibleIndex: VisibleIndex | undefined, columnCount: number, movedColumns: readonly MoveOperation[]): boolean;
176
193
  /**
177
194
  * Gets the column index if the x/y coordinates provided are close enough to the separator, otherwise null
178
195
  * @param x Mouse x coordinate
@@ -1 +1 @@
1
- {"version":3,"file":"GridUtils.d.ts","sourceRoot":"","sources":["../src/GridUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,SAAS,EAAE,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,OAAO,EACZ,KAAK,WAAW,EACjB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,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OAAO,EAAE,SAAS,UAAU,EAAE,EAC9B,gBAAgB,EAAE,YAAY,GAC7B,OAAO;IAOV;;;;;;;OAOG;IACH,MAAM,CAAC,mBAAmB,CACxB,OAAO,EAAE,WAAW,EACpB,GAAG,EAAE,cAAc,EACnB,MAAM,EAAE,cAAc,GACrB,cAAc;IAyCjB;;;;;;;;;OASG;IACH,MAAM,CAAC,cAAc,CACnB,UAAU,EAAE,cAAc,EAC1B,SAAS,SAAO,EAChB,UAAU,SAAM,EAChB,SAAS,SAAK,EACd,UAAU,SAAK,GACd;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE;IA8CrC,MAAM,CAAC,aAAa,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAG,MAAM;IAclE,MAAM,CAAC,iBAAiB,CAAC,MAAM,EAAE,gBAAgB,EAAE,GAAG,gBAAgB,EAAE;IAqBxE;;;;;OAKG;IACH,MAAM,CAAC,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,GAAG,QAAQ;IA8B5E;;;;;;;;;OASG;IACH,MAAM,CAAC,oBAAoB,CACzB,KAAK,EAAE,eAAe,EACtB,MAAM,EAAE,YAAY,EACpB,GAAG,EAAE,YAAY,GAChB;QACD,KAAK,EAAE,MAAM,CAAC;QACd,CAAC,EAAE,MAAM,CAAC;QACV,CAAC,EAAE,MAAM,CAAC;KACX;IAgDD;;;;OAIG;IACH,MAAM,CAAC,4BAA4B,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK,EAAE;CAU3D;AAED,eAAe,SAAS,CAAC"}
package/dist/GridUtils.js CHANGED
@@ -294,72 +294,74 @@ export class GridUtils {
294
294
  }
295
295
 
296
296
  /**
297
- * Check if a separator exists between a column and the next column at a given depth.
297
+ * Determine whether two adjacent columns belong to the same column-header group
298
+ * at the given depth.
298
299
  *
299
- * - At leaf depth (0), every model column is separated from the rest.
300
- * - At deeper depths, separator existence follows column-header-group identity when
301
- * the model exposes groups via `getColumnHeaderGroup`. Distinct group instances
302
- * that happen to share a display name (e.g. pivot Totals groups) are correctly
303
- * treated as separate.
304
- * - When neither side has a declared group, fall back to header-text inequality so
305
- * plain grouped-header models (which express grouping only through repeated text)
306
- * keep their existing behavior.
307
- * - The check is symmetric across the boundary: a separator is drawn at either
308
- * outer edge of a group cell, including the left edge of a group that is preceded
309
- * by an ungrouped column (empty band). Only a boundary with an empty band on
310
- * both sides has no separator.
300
+ * - When the model exposes group instances via `getColumnHeaderGroup`, identity
301
+ * decides: two distinct group instances that happen to share a display name
302
+ * (e.g. pivot Totals groups) are treated as different groups.
303
+ * - When only one side has a declared group, they are different groups.
304
+ * - When neither side has a declared group, fall back to header-text equality so
305
+ * plain grouped-header models (which express grouping only through repeated
306
+ * text) keep their existing behavior.
311
307
  *
312
308
  * @param model The grid model
313
309
  * @param depth The header depth to check at
314
- * @param columnIndex The current model column index
315
- * @param nextColumnIndex The next model column index (undefined for last column)
316
- * @returns true if a separator should be shown, false otherwise
310
+ * @param columnIndex The first model column index
311
+ * @param otherColumnIndex The second model column index
312
+ * @returns true if both columns are part of the same group at this depth
317
313
  */
318
- static hasColumnSeparatorAtDepth(model, depth, columnIndex, nextColumnIndex) {
319
- if (depth == null || columnIndex == null) {
320
- return false;
314
+ static isSameColumnGroupAtDepth(model, depth, columnIndex, otherColumnIndex) {
315
+ var groupA = model.getColumnHeaderGroup(columnIndex, depth);
316
+ var groupB = model.getColumnHeaderGroup(otherColumnIndex, depth);
317
+ if (groupA != null && groupB != null) {
318
+ return groupA === groupB;
321
319
  }
322
-
323
- // Leaf depth: every distinct model column is a physical boundary
324
- if (depth === 0) {
325
- return true;
320
+ if (groupA != null || groupB != null) {
321
+ return false;
326
322
  }
327
323
 
328
- // A header cell is drawn above a column at this depth when the column has a
329
- // declared group or header text. Where no cell is drawn the band is empty.
330
- var groupA = model.getColumnHeaderGroup(columnIndex, depth);
331
- var hasHeaderCellA = groupA != null || model.textForColumnHeader(columnIndex, depth) != null;
332
-
333
- // Right edge of the last column: a separator exists only if a cell is drawn
334
- // above it (otherwise it is the right edge of an empty band).
335
- if (nextColumnIndex == null) {
336
- return hasHeaderCellA;
337
- }
338
- var groupB = model.getColumnHeaderGroup(nextColumnIndex, depth);
339
- var hasHeaderCellB = groupB != null || model.textForColumnHeader(nextColumnIndex, depth) != null;
324
+ // Neither side has a declared group; fall back to text equality
325
+ return model.textForColumnHeader(columnIndex, depth) === model.textForColumnHeader(otherColumnIndex, depth);
326
+ }
340
327
 
341
- // Empty band on both sides: nothing to separate
342
- if (!hasHeaderCellA && !hasHeaderCellB) {
328
+ /**
329
+ * Check if a separator exists between the column at `visibleIndex` and the
330
+ * column immediately after it at a given header depth.
331
+ *
332
+ * - At leaf depth (0), every model column has a separator on its trailing edge.
333
+ * - At deeper depths, separator existence follows column-header-group identity
334
+ * (see {@link isSameColumnGroupAtDepth}). Distinct group instances that share a
335
+ * display name (e.g. pivot Totals groups) are correctly treated as separate.
336
+ * - The true trailing edge of the table (the last column) always has a separator.
337
+ *
338
+ * The next model column is resolved from `visibleIndex + 1` so that an off-screen
339
+ * neighbor is handled correctly and is not mistaken for the table's trailing edge.
340
+ *
341
+ * @param model The grid model
342
+ * @param depth The header depth to check at
343
+ * @param visibleIndex The visible index of the current column
344
+ * @param columnCount The total number of columns in the model
345
+ * @param movedColumns The current column-move operations
346
+ * @returns true if a separator should be shown, false otherwise
347
+ */
348
+ static hasColumnSeparatorAtDepth(model, depth, visibleIndex, columnCount, movedColumns) {
349
+ if (depth == null || visibleIndex == null) {
343
350
  return false;
344
351
  }
345
352
 
346
- // Exactly one side has a header cell: this is an outer edge of a group cell
347
- // (the left edge of a group preceded by an empty band, or the right edge of
348
- // a group followed by one).
349
- if (hasHeaderCellA !== hasHeaderCellB) {
353
+ // True trailing edge of the table
354
+ if (visibleIndex >= columnCount - 1) {
350
355
  return true;
351
356
  }
352
357
 
353
- // Both sides have header cells
354
- if (groupA != null && groupB != null) {
355
- return groupA !== groupB;
356
- }
357
- if (groupA != null || groupB != null) {
358
+ // Leaf depth: every distinct model column is a physical boundary
359
+ if (depth === 0) {
358
360
  return true;
359
361
  }
360
-
361
- // Neither side has a declared group; fall back to text inequality
362
- return model.textForColumnHeader(columnIndex, depth) !== model.textForColumnHeader(nextColumnIndex, depth);
362
+ var columnIndex = GridUtils.getModelIndex(visibleIndex, movedColumns);
363
+ var nextColumnIndex = GridUtils.getModelIndex(visibleIndex + 1, movedColumns);
364
+ return !GridUtils.isSameColumnGroupAtDepth(model, depth, columnIndex, nextColumnIndex);
363
365
  }
364
366
 
365
367
  /**
@@ -381,7 +383,8 @@ export class GridUtils {
381
383
  allColumnXs,
382
384
  allColumnWidths,
383
385
  columnHeaderMaxDepth,
384
- modelColumns
386
+ columnCount,
387
+ movedColumns
385
388
  } = metrics;
386
389
  var {
387
390
  allowColumnResize,
@@ -411,7 +414,7 @@ export class GridUtils {
411
414
  }
412
415
  var minX = midX - halfSeparatorSize;
413
416
  var maxX = midX + halfSeparatorSize;
414
- if (minX <= gridX && gridX <= maxX && GridUtils.hasColumnSeparatorAtDepth(model, depth, modelColumns.get(column), modelColumns.get(column + 1))) {
417
+ if (minX <= gridX && gridX <= maxX && GridUtils.hasColumnSeparatorAtDepth(model, depth, column, columnCount, movedColumns)) {
415
418
  return column;
416
419
  }
417
420
  isPreviousColumnHidden = isColumnHidden;
@@ -440,7 +443,7 @@ export class GridUtils {
440
443
  }
441
444
  var _minX = _midX - halfSeparatorSize;
442
445
  var _maxX = _midX + halfSeparatorSize;
443
- if (_minX <= gridX && gridX <= _maxX && GridUtils.hasColumnSeparatorAtDepth(model, depth, modelColumns.get(_column), modelColumns.get(_column + 1))) {
446
+ if (_minX <= gridX && gridX <= _maxX && GridUtils.hasColumnSeparatorAtDepth(model, depth, _column, columnCount, movedColumns)) {
444
447
  return _column;
445
448
  }
446
449
  isPreviousColumnHidden = _isColumnHidden;