@refinitiv-ui/efx-grid 6.0.119 → 6.0.121

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 (52) hide show
  1. package/README.md +1 -1
  2. package/lib/column-dragging/es6/ColumnDragging.js +7 -4
  3. package/lib/core/dist/core.js +104 -10
  4. package/lib/core/dist/core.min.js +1 -1
  5. package/lib/core/es6/data/DataView.js +7 -5
  6. package/lib/core/es6/grid/Core.js +3 -3
  7. package/lib/core/es6/grid/components/Cell.d.ts +2 -0
  8. package/lib/core/es6/grid/components/Cell.js +89 -0
  9. package/lib/core/es6/grid/components/HScrollbar.d.ts +1 -1
  10. package/lib/core/es6/grid/components/HScrollbar.js +5 -2
  11. package/lib/filter-dialog/themes/base-checkbox.less +1 -1
  12. package/lib/filter-dialog/themes/base.less +8 -3
  13. package/lib/filter-dialog/themes/elemental/dark/checkbox-list.js +1 -1
  14. package/lib/filter-dialog/themes/elemental/dark/es5/all-elements.js +2 -2
  15. package/lib/filter-dialog/themes/elemental/dark/filter-dialog.js +1 -1
  16. package/lib/filter-dialog/themes/elemental/light/checkbox-list.js +1 -1
  17. package/lib/filter-dialog/themes/elemental/light/es5/all-elements.js +2 -2
  18. package/lib/filter-dialog/themes/elemental/light/filter-dialog.js +1 -1
  19. package/lib/filter-dialog/themes/halo/dark/checkbox-list.js +1 -1
  20. package/lib/filter-dialog/themes/halo/dark/es5/all-elements.js +2 -2
  21. package/lib/filter-dialog/themes/halo/dark/filter-dialog.js +1 -1
  22. package/lib/filter-dialog/themes/halo/light/checkbox-list.js +1 -1
  23. package/lib/filter-dialog/themes/halo/light/es5/all-elements.js +2 -2
  24. package/lib/filter-dialog/themes/halo/light/filter-dialog.js +1 -1
  25. package/lib/filter-dialog/themes/solar/charcoal/checkbox-list.js +1 -1
  26. package/lib/filter-dialog/themes/solar/charcoal/es5/all-elements.js +2 -2
  27. package/lib/filter-dialog/themes/solar/charcoal/filter-dialog.js +1 -1
  28. package/lib/filter-dialog/themes/solar/pearl/checkbox-list.js +1 -1
  29. package/lib/filter-dialog/themes/solar/pearl/es5/all-elements.js +2 -2
  30. package/lib/filter-dialog/themes/solar/pearl/filter-dialog.js +1 -1
  31. package/lib/grid/index.js +1 -1
  32. package/lib/rt-grid/dist/rt-grid.js +240 -104
  33. package/lib/rt-grid/dist/rt-grid.min.js +1 -1
  34. package/lib/rt-grid/es6/ColumnDefinition.js +7 -0
  35. package/lib/rt-grid/es6/Grid.js +108 -81
  36. package/lib/rt-grid/es6/RowDefinition.d.ts +1 -1
  37. package/lib/rt-grid/es6/RowDefinition.js +28 -17
  38. package/lib/tr-grid-auto-tooltip/es6/AutoTooltip.js +18 -15
  39. package/lib/tr-grid-checkbox/es6/Checkbox.js +4 -0
  40. package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +6 -1
  41. package/lib/tr-grid-filter-input/es6/FilterInput.js +1 -0
  42. package/lib/tr-grid-row-dragging/es6/RowDragging.d.ts +0 -2
  43. package/lib/tr-grid-row-dragging/es6/RowDragging.js +82 -77
  44. package/lib/tr-grid-row-selection/es6/RowSelection.js +155 -35
  45. package/lib/types/es6/Core/grid/components/Cell.d.ts +2 -0
  46. package/lib/types/es6/Core/grid/components/HScrollbar.d.ts +1 -1
  47. package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +1 -1
  48. package/lib/types/es6/RowDragging.d.ts +0 -2
  49. package/lib/utils/index.d.ts +1 -1
  50. package/lib/utils/index.js +1 -1
  51. package/lib/versions.json +8 -8
  52. package/package.json +1 -1
@@ -547,6 +547,13 @@ ColumnDefinition.getDataType = function(field) {
547
547
  return "";
548
548
  };
549
549
  /** @public
550
+ * @ignore
551
+ * @return {boolean|string|null}
552
+ */
553
+ ColumnDefinition.prototype.getTooltipValue = function() {
554
+ return this._tooltip;
555
+ };
556
+ /** @public
550
557
  * @return {string}
551
558
  */
552
559
  ColumnDefinition.prototype.getTooltip = function() {
@@ -274,11 +274,11 @@ let _hasFieldOrId = function(colDef, str) {
274
274
  };
275
275
 
276
276
  /** Compare the difference in the 'id' property.
277
- * @private
278
- * @param {Object} obj1
279
- * @param {Object} obj2
280
- * @returns {boolean} If the id property of two objects is equal, the return will be true, otherwise it will be false.
281
- */
277
+ * @private
278
+ * @param {Object} obj1
279
+ * @param {Object} obj2
280
+ * @returns {boolean} If the id property of two objects is equal, the return will be true, otherwise it will be false.
281
+ */
282
282
  let _hasMatchingId = function(obj1, obj2) {
283
283
  if(!obj1 || !obj2 || !obj1.id || !obj2.id) { // Handle nullable, if the object or id have null, it's means difference value
284
284
  return false;
@@ -286,6 +286,25 @@ let _hasMatchingId = function(obj1, obj2) {
286
286
  return obj1.id === obj2.id;
287
287
  };
288
288
 
289
+ /** @private
290
+ * @param {Object} e
291
+ */
292
+ let _preventDefault = function(e) {
293
+ if(e) {
294
+ e.preventDefault();
295
+ }
296
+ };
297
+ /** @private
298
+ * @param {number=} id
299
+ * @returns {number} Always return 0
300
+ */
301
+ let _clearTimeout = function(id) {
302
+ if(id) {
303
+ clearTimeout(id);
304
+ }
305
+ return 0;
306
+ };
307
+
289
308
  /** @constructor
290
309
  * @extends {EventDispatcher}
291
310
  * @param {(Element|null)=} placeholder
@@ -596,10 +615,6 @@ Grid.prototype._topSection = true;
596
615
  * @private
597
616
  */
598
617
  Grid.prototype._focusingArgs = null;
599
- /** @type {number}
600
- * @private
601
- */
602
- Grid.prototype._scrolledRow = -1;
603
618
  /** @type {boolean}
604
619
  * @private
605
620
  */
@@ -614,10 +629,8 @@ Grid.prototype.dispose = function() {
614
629
  clearInterval(this._autoLayoutTimer);
615
630
  this._autoLayoutTimer = 0;
616
631
  }
617
- if(this._pollingTimerId) {
618
- clearTimeout(this._pollingTimerId);
619
- this._pollingTimerId = 0;
620
- }
632
+ this._pollingTimerId = _clearTimeout(this._pollingTimerId);
633
+
621
634
  this.removeAllColumns(); // Some conflators are reset
622
635
  this.removeAllRows(); // Some conflators are reset
623
636
  this._sorter.dispose();
@@ -640,9 +653,8 @@ Grid.prototype.dispose = function() {
640
653
  }
641
654
 
642
655
  if(this._focusingArgs) {
643
- if(this._focusingArgs.id) {
644
- clearTimeout(this._focusingArgs.id);
645
- }
656
+ _clearTimeout(this._focusingArgs.id);
657
+ _clearTimeout(this._focusingArgs.timeoutId);
646
658
  this._focusingArgs = null;
647
659
  }
648
660
  };
@@ -947,6 +959,7 @@ Grid.prototype.initialize = function(gridOption) {
947
959
  this.addListener(gridOption, "beforeContentBinding");
948
960
  this.addListener(gridOption, "firstRendered");
949
961
  this.addListener(gridOption, "afterContentBinding");
962
+ this.addListener(gridOption, "tabNavigation");
950
963
 
951
964
  if(gridOption["autoDateConversion"]) {
952
965
  t._autoDateConversion = true;
@@ -3463,12 +3476,15 @@ Grid.prototype._renderColumnHeader = function(colIndex, arg) {
3463
3476
  let colName = colDef.getName();
3464
3477
  let colTooltip = colDef.getTooltip();
3465
3478
  let headerAlignment = colDef.getHeaderAlignment();
3479
+ let tooltipValue = colDef.getTooltipValue();
3466
3480
 
3467
3481
  for(let r = 0; r < rowCount; ++r) {
3468
3482
  let tCell = tSection.getCell(colIndex, r, false);
3469
3483
  // Default behaviors
3470
3484
  tCell.setContent(colName);
3471
- tCell.setTooltip(colTooltip);
3485
+ tCell.setTooltipInfo("columnDefault", tooltipValue);
3486
+ tCell.setTooltipInfo("columnTooltip", colTooltip);
3487
+ tCell.updateTooltip();
3472
3488
  tCell.setStyle("textAlign", headerAlignment);
3473
3489
 
3474
3490
  if(customRenderer) {
@@ -4096,6 +4112,8 @@ Grid.prototype._logData = function(rowDefs, options) {
4096
4112
 
4097
4113
  /** @public
4098
4114
  * @description Replace existing row by a new row. Row Id is always changed, after the row is replaced.
4115
+ * If the rowId of the new row is identical to that of the replacing row. Grid will do nothing because
4116
+ * similar rowIds indicate that they are the same row.
4099
4117
  * @param {Grid~RowReference} rowRef Reference (i.e. row index, row id, or row definition) of the insert position
4100
4118
  * @param {(RowDefinition~Options|string)=} rowOption
4101
4119
  * @returns {RowDefinition} Returns null, if the row is not replaced. Otherwise, a newly created row is returned
@@ -4216,38 +4234,49 @@ Grid.prototype.getVScrollView = function () {
4216
4234
  return this._grid.getVScrollView();
4217
4235
  };
4218
4236
 
4219
- /** @private
4220
- * @param {Element} el
4221
- * @return {boolean}
4222
- */
4223
- function isFocusableContent(el) {
4224
- if(el) {
4225
- return (el.tagName !== "SPAN" && !el.disabled);
4226
- }
4227
- return false;
4228
- }
4229
4237
  /** @private
4230
4238
  * @param {Object} cell
4239
+ * @param {Object} args
4231
4240
  * @return {boolean}
4232
4241
  */
4233
- function focusCell(cell) {
4242
+ Grid.prototype._focusCell = function(cell, args) {
4234
4243
  if(cell) {
4235
4244
  let cellContent = cell.getContent();
4236
- if(cellContent && isFocusableContent(cellContent)) {
4237
- cellContent.focus();
4238
- return true;
4245
+ if(cellContent) {
4246
+ let nfe = null;
4247
+ if(this.hasListener("tabNavigation")) {
4248
+ let tabNavArg = {
4249
+ "shiftKey": args.shiftKey,
4250
+ "activeElement": args.activeElement,
4251
+ "cellContent": cellContent,
4252
+ "cell": cell,
4253
+ "colIndex": args.colIndex,
4254
+ "rowIndex": args.rowIndex,
4255
+ "field": args.fields ? args.fields[args.colIndex] : ""
4256
+ };
4257
+ this._dispatch("tabNavigation", tabNavArg);
4258
+ nfe = tabNavArg.nextFocusableElement;
4259
+ } else if(cellContent.tagName !== "SPAN") {
4260
+ nfe = cellContent;
4261
+ }
4262
+
4263
+ if(nfe && nfe !== args.activeElement && !nfe.disabled) {
4264
+ nfe.focus();
4265
+ return true;
4266
+ }
4239
4267
  }
4240
4268
  }
4241
4269
  return false;
4242
- }
4270
+ };
4243
4271
  /** @private
4244
4272
  */
4245
4273
  Grid.prototype._onVScroll = function() {
4246
4274
  let args = this._focusingArgs;
4247
4275
  if(args) {
4276
+ args.timeoutId = _clearTimeout(args.timeoutId);
4248
4277
  this._focusingArgs = null;
4249
4278
  let cell = this._grid.getCell("content", args.colIndex, args.rowIndex);
4250
- if(!focusCell(cell)) {
4279
+ if(!this._focusCell(cell, args)) {
4251
4280
  if(args.shiftKey) {
4252
4281
  this._focusPrevCellContent(args);
4253
4282
  } else {
@@ -4258,6 +4287,11 @@ Grid.prototype._onVScroll = function() {
4258
4287
  };
4259
4288
  /** @private
4260
4289
  */
4290
+ Grid.prototype._onScrollTimeout = function() {
4291
+ this._focusingArgs = null;
4292
+ };
4293
+ /** @private
4294
+ */
4261
4295
  Grid.prototype._selfScrollToRow = function() {
4262
4296
  let args = this._focusingArgs;
4263
4297
  if(args) {
@@ -4267,20 +4301,14 @@ Grid.prototype._selfScrollToRow = function() {
4267
4301
  };
4268
4302
  /** @private
4269
4303
  * @param {Object} args
4270
- * @param {number} colIndex
4271
- * @param {number} rowIndex
4272
4304
  */
4273
- Grid.prototype._requestScroll = function(args, colIndex, rowIndex) {
4274
- if(this._focusingArgs || this._scrolledRow === args.rowIndex) {
4275
- return; // Avoid infinite loop
4305
+ Grid.prototype._requestScroll = function(args) {
4306
+ if(!this._focusingArgs) {
4307
+ this._focusingArgs = args;
4308
+ args.event = null; // The event is invalid after the scroll
4309
+ args.id = setTimeout(this._selfScrollToRow, 0); // Avoid event loop protection
4310
+ args.timeoutId = setTimeout(this._onScrollTimeout, 100); // To avoid a fail case where scroll cannot be performed
4276
4311
  }
4277
-
4278
- this._scrolledRow = args.rowIndex;
4279
- this._focusingArgs = args;
4280
- args.colIndex = colIndex;
4281
- args.rowIndex = rowIndex;
4282
- args.event = null; // The event is invalid after the scroll
4283
- args.id = setTimeout(this._selfScrollToRow); // Avoid event loop protection
4284
4312
  };
4285
4313
  /** @private
4286
4314
  * @param {Object} args
@@ -4304,28 +4332,27 @@ Grid.prototype._focusNextCellContent = function(args) {
4304
4332
  startIdx = i;
4305
4333
  }
4306
4334
  }
4307
- // If the current focus is on a valid content, starts on the next cell
4308
- if(args.event && args.validContent) {
4309
- startIdx++;
4310
- }
4311
4335
 
4312
4336
  let grid = this._grid;
4313
4337
  let section = grid.getSection("content");
4314
4338
  let viewInfo = grid.getVerticalViewInfo();
4315
4339
  let lastFullRow = viewInfo.lastFullRow;
4316
4340
  let rowCount = this.getRowCount();
4341
+
4342
+ args.fields = grid.getColumnFields();
4317
4343
  for(let r = rowIndex; r < rowCount; r++) {
4344
+ args.rowIndex = r;
4318
4345
  for(i = startIdx; i < len; i++) {
4319
4346
  let c = focusableColIndices[i];
4347
+ args.colIndex = c;
4320
4348
  if(r > lastFullRow) {
4321
- this._requestScroll(args, c, r);
4349
+ _preventDefault(args.event);
4350
+ this._requestScroll(args);
4322
4351
  return;
4323
4352
  } else {
4324
4353
  let cell = section.getCell(c, r);
4325
- if(focusCell(cell)) {
4326
- if(args.event) {
4327
- args.event.preventDefault();
4328
- }
4354
+ if(this._focusCell(cell, args)) {
4355
+ _preventDefault(args.event);
4329
4356
  return;
4330
4357
  }
4331
4358
  }
@@ -4333,9 +4360,8 @@ Grid.prototype._focusNextCellContent = function(args) {
4333
4360
  startIdx = 0;
4334
4361
  }
4335
4362
 
4336
- if(args.validContent) { // The current focus on the last focusable content
4337
- this._grid.getHiddenInput().focus();
4338
- }
4363
+ // The current focus on the last focusable content
4364
+ this._grid.getHiddenInput().focus();
4339
4365
  };
4340
4366
  /** @private
4341
4367
  * @param {Object} args
@@ -4359,27 +4385,26 @@ Grid.prototype._focusPrevCellContent = function(args) {
4359
4385
  startIdx = i;
4360
4386
  }
4361
4387
  }
4362
- // If the current focus is on a valid content, starts on the next cell
4363
- if(args.event && args.validContent) {
4364
- --startIdx;
4365
- }
4366
4388
 
4367
4389
  let grid = this._grid;
4368
4390
  let section = grid.getSection("content");
4369
4391
  let viewInfo = grid.getVerticalViewInfo();
4370
4392
  let firstFullRow = viewInfo.firstFullRow;
4393
+
4394
+ args.fields = this.getColumnFields();
4371
4395
  for(let r = rowIndex; r >= 0; r--) {
4396
+ args.rowIndex = r;
4372
4397
  for(i = startIdx; i >= 0; i--) {
4373
4398
  let c = focusableColIndices[i];
4399
+ args.colIndex = c;
4374
4400
  if(r < firstFullRow) {
4375
- this._requestScroll(args, c, r);
4401
+ _preventDefault(args.event);
4402
+ this._requestScroll(args);
4376
4403
  return;
4377
4404
  } else {
4378
4405
  let cell = section.getCell(c, r);
4379
- if(focusCell(cell)) {
4380
- if(args.event) {
4381
- args.event.preventDefault();
4382
- }
4406
+ if(this._focusCell(cell, args)) {
4407
+ _preventDefault(args.event);
4383
4408
  return;
4384
4409
  }
4385
4410
  }
@@ -4387,15 +4412,18 @@ Grid.prototype._focusPrevCellContent = function(args) {
4387
4412
  startIdx = len - 1;
4388
4413
  }
4389
4414
 
4390
- if(args.validContent) { // The current focus on the last focusable content
4391
- this._grid.getHiddenInput(true).focus();
4392
- }
4415
+ // The current focus on the last focusable content
4416
+ this._grid.getHiddenInput(true).focus();
4393
4417
  };
4394
4418
 
4395
4419
  /** @private
4396
4420
  * @param {Object} e
4397
4421
  */
4398
4422
  Grid.prototype._onTabNavigation = function(e) {
4423
+ if(this._focusingArgs) {
4424
+ return; // Cannot do another tab navigation while waiting for scrolling
4425
+ }
4426
+
4399
4427
  let colDefs = this.getColumnDefinitions();
4400
4428
  let colCount = colDefs.length;
4401
4429
 
@@ -4410,19 +4438,8 @@ Grid.prototype._onTabNavigation = function(e) {
4410
4438
  return;
4411
4439
  }
4412
4440
 
4413
- this._scrolledRow = -1; // Reset the scroll loop protector
4414
4441
  let keyEvt = e.event;
4415
4442
  let pos = this.getRelativePosition(keyEvt);
4416
- let validContent = true;
4417
- let activeElement = e.activeElement;
4418
- if(activeElement) {
4419
- validContent = !activeElement.classList.contains("valigner");
4420
- }
4421
-
4422
- if(validContent) {
4423
- let content = pos["cell"] ? pos["cell"].getContent() : null;
4424
- validContent = isFocusableContent(content);
4425
- }
4426
4443
  let startingRowIndex = pos["rowIndex"];
4427
4444
  if(e.onTheEdge) {
4428
4445
  let viewInfo = this._grid.getVerticalViewInfo();
@@ -4434,7 +4451,7 @@ Grid.prototype._onTabNavigation = function(e) {
4434
4451
  colIndex: pos["colIndex"],
4435
4452
  rowIndex: startingRowIndex,
4436
4453
  focusableColIndices: focusableColIndices,
4437
- validContent: validContent
4454
+ activeElement: e.activeElement
4438
4455
  };
4439
4456
 
4440
4457
  if(keyEvt.shiftKey) {
@@ -4444,5 +4461,15 @@ Grid.prototype._onTabNavigation = function(e) {
4444
4461
  }
4445
4462
  };
4446
4463
 
4464
+ /** @public
4465
+ * @ignore
4466
+ * @return {!Object}
4467
+ */
4468
+ Grid.prototype._getEventHandlers = function() {
4469
+ return {
4470
+ "tabNavigation": this._onTabNavigation
4471
+ };
4472
+ };
4473
+
4447
4474
  export { Grid };
4448
4475
  export default Grid;
@@ -108,7 +108,7 @@ declare class RowDefinition {
108
108
 
109
109
  public resetUpdates(): void;
110
110
 
111
- public registerToView(view: DataView|null, rowId?: string|null): void;
111
+ public registerToView(view: DataView|null, destRowId?: string|null): void;
112
112
 
113
113
  public static deregisterFromView(rowIds: (string)[]|null, rowDef: RowDefinition|null): (string)[]|null;
114
114
 
@@ -17,7 +17,7 @@ import { DataTable } from "../../core/es6/data/DataTable.js";
17
17
  * @property {boolean=} hidden=true When this row is hidden
18
18
  * @property {boolean=} realTime=true Realtime row, able to request for JET/RTK
19
19
  * @property {Object=} info=null For storing any additional information to the row
20
- * @property {string=} rowId Row identifier used for referencing the row
20
+ * @property {string=} rowId Row identifier used for referencing the row. The value cannot be in "_x_" format.
21
21
  */
22
22
 
23
23
  /** @typedef {Object} RowDefinition~RowTypes
@@ -48,6 +48,12 @@ const ROW_TYPES = {
48
48
  GROUP_MEMBER: "GROUP_MEMBER"
49
49
  };
50
50
 
51
+ /** @type {RegExp}
52
+ * @private
53
+ * @const
54
+ */
55
+ const ROW_ID_PATTERN = /^_[^_]+_$/;
56
+
51
57
  /** @constructor
52
58
  * @param {RowDefinition~Options=} rowOptions
53
59
  */
@@ -236,8 +242,12 @@ RowDefinition.prototype.initialize = function(rowOptions) {
236
242
  if(!this._autoGenerated) {
237
243
  let userRowId = rowOptions["rowId"];
238
244
  if(userRowId && typeof userRowId === "string") {
239
- this._rowId = this._dataId = userRowId;
240
- this._userId = true;
245
+ if(userRowId.match(ROW_ID_PATTERN)) {
246
+ console.warn("Please change the rowId format to avoid duplicated rows' id causing unexpected behavior.");
247
+ } else {
248
+ this._rowId = this._dataId = userRowId;
249
+ this._userId = true;
250
+ }
241
251
  }
242
252
  }
243
253
 
@@ -991,14 +1001,20 @@ RowDefinition.prototype.resetUpdates = function() {
991
1001
 
992
1002
  /** @public
993
1003
  * @param {DataView} view
994
- * @param {string=} rowId
1004
+ * @param {string=} destRowId Destination position where the row will be placed BEFORE the specified position.
995
1005
  */
996
- RowDefinition.prototype.registerToView = function(view, rowId) {
1006
+ RowDefinition.prototype.registerToView = function(view, destRowId) {
997
1007
  if(!view || this._view === view) {
998
1008
  return; // Already in the view
999
1009
  }
1000
1010
  this._view = view;
1001
1011
 
1012
+ let rowId = this.getRowId();
1013
+ if(view.getRowData(rowId)) {
1014
+ console.warn("Duplicated rows' id.");
1015
+ return;
1016
+ }
1017
+
1002
1018
  let rowData = null;
1003
1019
  if(this._subSegment) {
1004
1020
  rowData = this._view.getRowData(this.getRowId());
@@ -1013,32 +1029,27 @@ RowDefinition.prototype.registerToView = function(view, rowId) {
1013
1029
 
1014
1030
  let parentRowId = "";
1015
1031
  let isSegment = this._isChain || this._asSegment;
1016
- if(rowId) {
1017
- parentRowId = view.getSegmentParentRowId(rowId);
1032
+ if(destRowId) {
1033
+ parentRowId = view.getSegmentParentRowId(destRowId);
1018
1034
  if(parentRowId) {
1019
1035
  if(isSegment) { // A chain or a segment cannot be put inside another segment
1020
- rowId = _getEndOfSegmentRowId(view, rowId);
1036
+ destRowId = _getEndOfSegmentRowId(view, destRowId);
1021
1037
  } // else { // Normal row is inserted into a segment
1022
1038
  }
1023
1039
  }
1024
1040
 
1025
1041
  let stalledSorting = _stallSorting(view, isSegment, false);
1026
-
1027
- let newRowId = view.insertRow(rowId, rowData, this.getRowId());
1028
- if(newRowId !== this._rowId) {
1029
- this._rowId = newRowId; // In case there is some duplicate row id
1030
- this._userId = false;
1031
- }
1042
+ view.insertRow(destRowId, rowData, rowId);
1032
1043
 
1033
1044
  if(isSegment) {
1034
- view.setSegmentSeparator(newRowId);
1045
+ view.setSegmentSeparator(rowId);
1035
1046
  _stallSorting(view, false, stalledSorting);
1036
1047
  if(this._collapsed != null) {
1037
- view.collapseSegment(newRowId, this._collapsed);
1048
+ view.collapseSegment(rowId, this._collapsed);
1038
1049
  this._collapsed = null;
1039
1050
  }
1040
1051
  } else if(!this._parent && parentRowId) { // Constituent cannot be added to another segment
1041
- view.addSegmentChild(parentRowId, newRowId, this._dataId);
1052
+ view.addSegmentChild(parentRowId, rowId, this._dataId);
1042
1053
  }
1043
1054
  };
1044
1055
  /** @private
@@ -417,28 +417,31 @@ AutoTooltipPlugin.prototype._updateNonContentSection = function (section, colInd
417
417
  var elem = cell.getContent();
418
418
  if(!elem) { return false; }
419
419
 
420
- // Set tooltip only if text's length is longer than column width.
421
- var tooltip = cell.getAttribute("tooltip") || cell.getTooltip();
420
+ var tooltipInfo = cell.getTooltipInfo();
421
+ if(tooltipInfo) {
422
+ if(tooltipInfo["userTooltip"] != null ||
423
+ tooltipInfo["groupHeaderDefault"] != null ||
424
+ tooltipInfo["columnDefault"] != null) {
425
+
426
+ cell.setTooltipInfo("clippedText", false);
427
+ cell.removeAttribute("ef-title");
428
+ continue;
429
+ }
430
+ }
422
431
 
432
+ // Set tooltip only if text's length is longer than column width.
423
433
  var sw = elem.scrollWidth;
424
434
  if(sw && sw > elem.offsetWidth) {
425
- if(!tooltip) {
426
- tooltip = cell.getTextContent(); // TODO: Allow custom tooltip text
427
- cell._autoTooltip = true;
428
- }
429
- } else {
430
- if(cell._autoTooltip) {
431
- tooltip = "";
432
- cell._autoTooltip = false;
433
- }
434
- }
435
+ cell.setTooltipInfo("clippedText", true);
435
436
 
436
- cell.setTooltip(tooltip); // TODO: Avoiding using getter and setter in the same loop
437
- if(tooltip) {
438
- cell.setAttribute("ef-title", tooltip); // to make sure ef-title value will actually change
437
+ var tooltip = cell.getTextContent();
438
+ cell.setTooltipInfo("clippedTextTooltip", tooltip);
439
+ cell.setAttribute("ef-title", tooltip);
439
440
  } else {
441
+ cell.setTooltipInfo("clippedText", false);
440
442
  cell.removeAttribute("ef-title");
441
443
  }
444
+ cell.updateTooltip();
442
445
  }
443
446
  return true;
444
447
  };
@@ -710,6 +710,9 @@ CheckboxPlugin.prototype._createCheckbox = function (sectionSettings, colIndex,
710
710
 
711
711
  cell.setContent(chkbox);
712
712
  let sectionType = sectionSettings.getType();
713
+ if(sectionType === "title") {
714
+ chkbox.setAttribute("aria-label", "all rows");
715
+ }
713
716
 
714
717
  if(!this._coralCheckboxVer) { // Workaround for UIFR theme styling
715
718
  let lbl = document.createElement("label");
@@ -1658,6 +1661,7 @@ CheckboxPlugin.prototype._onPostSectionDataBinding = function (e) {
1658
1661
  if(!chkbox) {
1659
1662
  chkbox = checkboxes[i] = this._createCheckbox(sectionSettings, this._displayColumn, rowIndex);
1660
1663
  }
1664
+ chkbox.setAttribute("aria-label", "row " + rowIndex);
1661
1665
  let rowId = dv.getRowId(rowIndex); // Slow
1662
1666
  rowData = this._getRowFromId(dv, rowId);
1663
1667
  if(hasBinding && chkbox) {
@@ -516,6 +516,9 @@ ColumnGroupingPlugin.prototype._applyGrouping = function () {
516
516
  cell.removeClass("no-sort");
517
517
  cell.removeClass("selected-group");
518
518
  cell.removeAttribute("group-id");
519
+ cell.setTooltipInfo("groupHeaderDefault", false);
520
+ cell.setTooltipInfo("groupHeaderTooltip", null);
521
+ cell.updateTooltip();
519
522
  }
520
523
  }
521
524
  }
@@ -909,7 +912,9 @@ ColumnGroupingPlugin.prototype._renderGroup = function(groupDef, section) {
909
912
  if(cell) {
910
913
  // Overide the defaults
911
914
  cell.setStyle("text-align", groupDef["alignment"] || "");
912
- cell.setTooltip(ColumnGroupingPlugin._getTooltip(groupDef));
915
+ cell.setTooltipInfo("groupHeaderDefault", groupDef["tooltip"]);
916
+ cell.setTooltipInfo("groupHeaderTooltip", ColumnGroupingPlugin._getTooltip(groupDef));
917
+ cell.updateTooltip();
913
918
  cell.setContent(groupDef["name"] || groupDef["title"]);
914
919
 
915
920
  // Additional cell settings must be removed in the _applyGrouping() method
@@ -532,6 +532,7 @@ FilterInputPlugin.prototype._createFilterUI = function (colOpt) {
532
532
  elem.className = "filter-input";
533
533
  elem.style.width = "100%";
534
534
  elem.style.margin = "0";
535
+ elem.setAttribute("aria-label", "column filtering");
535
536
  var placeholder = colOpt["placeholder"];
536
537
 
537
538
  if (placeholder) {
@@ -73,8 +73,6 @@ declare class RowDraggingPlugin extends GridPlugin {
73
73
 
74
74
  public setJETDragContent(content: any): void;
75
75
 
76
- public setJETDragContent(content: any): void;
77
-
78
76
  }
79
77
 
80
78
  export default RowDraggingPlugin;