@refinitiv-ui/efx-grid 6.0.133 → 6.0.135

Sign up to get free protection for your applications and to get access to all the features.
@@ -9,6 +9,8 @@ declare class DataConnector extends EventDispatcher {
9
9
 
10
10
  constructor();
11
11
 
12
+ public dispose(): void;
13
+
12
14
  public getAllRics(): (string)[]|null;
13
15
 
14
16
  public hasRic(): boolean;
@@ -11,8 +11,8 @@ import RowDefinition from "./RowDefinition.js"; // eslint-disable-line
11
11
  */
12
12
  let DataConnector = function () {
13
13
  let t = this;
14
- t._commitRicsChanges = t._commitRicsChanges.bind(this);
15
- t._commitFieldsChanges = t._commitFieldsChanges.bind(this);
14
+ t._commitRicsChanges = t._commitRicsChanges.bind(t);
15
+ t._commitFieldsChanges = t._commitFieldsChanges.bind(t);
16
16
  t._fieldChangedConflator = new Conflator(0, t._commitFieldsChanges);
17
17
  t._ricChangedConflator = new Conflator(0, t._commitRicsChanges);
18
18
  t._fields = new ReferenceCounter();
@@ -21,8 +21,6 @@ let DataConnector = function () {
21
21
  };
22
22
  Ext.inherits(DataConnector, EventDispatcher);
23
23
 
24
-
25
- //#region Private Members
26
24
  /** @type {Conflator}
27
25
  * @private
28
26
  */
@@ -43,7 +41,16 @@ DataConnector.prototype._rics = null;
43
41
  * @private
44
42
  */
45
43
  DataConnector.prototype._fields = null;
46
- //#endregion Private Members
44
+
45
+ /** @public
46
+ */
47
+ DataConnector.prototype.dispose = function () {
48
+ this.removeAllEventListeners();
49
+
50
+ this._rowDefMap = this._fields = this._rics = null;
51
+ this._fieldChangedConflator.reset();
52
+ this._ricChangedConflator.reset();
53
+ };
47
54
 
48
55
  /** Get all ric with no duplication
49
56
  * @public
@@ -632,7 +632,9 @@ Grid.prototype.dispose = function() {
632
632
  this.removeAllRows(); // Some conflators are reset
633
633
  this._sorter.dispose();
634
634
  this._grid.dispose();
635
- this._connector.reset();
635
+ this._snapshot.dispose();
636
+ this._connector.dispose();
637
+ this._connector = null;
636
638
 
637
639
  if(!this._sharedDataSource) { // Make sure that this is the final grid, and its data is disposed
638
640
  if(this._subs) {
@@ -1643,7 +1645,7 @@ Grid.prototype.replaceColumn = function (columnOption, colRef) {
1643
1645
  * @param {Object} response
1644
1646
  */
1645
1647
  Grid.prototype._onFieldLoadedSuccess = function (field, colDef, response) {
1646
- if (response && response.id) {
1648
+ if(this._connector && response && response.id) {
1647
1649
  let fieldDef = response;
1648
1650
  if (colDef && colDef.getField() === field) {
1649
1651
  if (colDef.isDefaultName() && fieldDef.name) {
@@ -1668,12 +1670,14 @@ Grid.prototype._onFieldLoadedError = function (err) {
1668
1670
  * @param {string} referrer
1669
1671
  */
1670
1672
  Grid.prototype._onFieldLoaded = function (field, referrer) {
1671
- // For time series, we need to wait until the field is loadedm, then we can insert a child from the field data.
1672
- if(FieldDefinition.isTimeSeries(field)) {
1673
- let colDef = this.getColumnDefinitionById(referrer); // The 'referrer' is a column ID that was just added
1674
- this._populateTimeSeriesChildren(colDef);
1673
+ if(this._connector) {
1674
+ // For time series, we need to wait until the field is loadedm, then we can insert a child from the field data.
1675
+ if(FieldDefinition.isTimeSeries(field)) {
1676
+ let colDef = this.getColumnDefinitionById(referrer); // The 'referrer' is a column ID that was just added
1677
+ this._populateTimeSeriesChildren(colDef);
1678
+ }
1679
+ this._connector.addFields(field, referrer);
1675
1680
  }
1676
- this._connector.addFields(field, referrer);
1677
1681
  };
1678
1682
 
1679
1683
  /**
@@ -2694,6 +2698,7 @@ Grid.prototype.removeAllRows = function() {
2694
2698
 
2695
2699
  this._dc.clearAllData();
2696
2700
  this._dt.clearAllData();
2701
+ this._dt.setClassificationSource(this._dc);
2697
2702
  this._clearDataUpdates();
2698
2703
 
2699
2704
  rowDefs.forEach(RowDefinition.dispose); // Each individual subscription is unsubscribed along with disposed rowDef
@@ -8,7 +8,7 @@ declare class SnapshotFiller extends EventDispatcher {
8
8
 
9
9
  constructor();
10
10
 
11
- public static readonly _mockAdc: any;
11
+ public dispose(rtk: any): void;
12
12
 
13
13
  public setRTK(rtk: any): void;
14
14
 
@@ -20,7 +20,11 @@ let SnapshotFiller = function () {
20
20
  };
21
21
  Ext.inherits(SnapshotFiller, EventDispatcher);
22
22
 
23
- //#region Private Members
23
+ /** @private
24
+ * @type {Object}
25
+ */
26
+ SnapshotFiller._mockAdc = null;
27
+
24
28
  /** @type {number}
25
29
  * @private
26
30
  */
@@ -41,23 +45,27 @@ SnapshotFiller.prototype._rtk;
41
45
  * @private
42
46
  */
43
47
  SnapshotFiller.prototype._adcOptions = null;
44
- //#endregion Private Members
48
+
45
49
 
46
50
  /** @public
47
51
  * @param {*} rtk RTK instance
48
52
  */
49
- SnapshotFiller.prototype.setRTK = function (rtk) {
50
- this._rtk = rtk;
53
+ SnapshotFiller.prototype.dispose = function () {
54
+ this.removeAllEventListeners();
55
+ if(this._timerId) {
56
+ clearTimeout(this._timerId);
57
+ this._timerId = 0;
58
+ }
59
+ this._rics = this._fields = this._rtk = this._adcOptions = null;
51
60
  };
52
61
 
53
- /**
54
- * @public
55
- * @type {Object}
62
+ /** @public
63
+ * @param {*} rtk RTK instance
56
64
  */
57
- SnapshotFiller._mockAdc = null;
58
-
59
- /**
60
- * @public
65
+ SnapshotFiller.prototype.setRTK = function (rtk) {
66
+ this._rtk = rtk;
67
+ };
68
+ /** @public
61
69
  * @param {string} str
62
70
  * @param {*} value
63
71
  */
@@ -68,8 +76,7 @@ SnapshotFiller.setMockAdc = function(str, value) {
68
76
  SnapshotFiller._mockAdc[str] = value;
69
77
  };
70
78
 
71
- /**
72
- * @public
79
+ /** @public
73
80
  * @param {string} str
74
81
  * @return {*}
75
82
  */
@@ -80,8 +87,7 @@ SnapshotFiller.getMockAdc = function(str) {
80
87
  return SnapshotFiller._mockAdc[str];
81
88
  };
82
89
 
83
- /**
84
- * @public
90
+ /** @public
85
91
  */
86
92
  SnapshotFiller.clearMockAdc = function() {
87
93
  SnapshotFiller._mockAdc = null;
@@ -7,10 +7,10 @@ declare namespace HeatMapPlugin {
7
7
 
8
8
  type ColumnOptions = {
9
9
  field: string,
10
- heatMap?: HeatMapPlugin.Heatmap|null
10
+ heatMap?: HeatMapPlugin.HeatMap|null
11
11
  };
12
12
 
13
- type Heatmap = {
13
+ type HeatMap = {
14
14
  midPoint?: number|null,
15
15
  mode?: string|null
16
16
  };
@@ -6,11 +6,11 @@ import {ElfUtil} from '../../tr-grid-util/es6/ElfUtil.js';
6
6
  /** @typedef {Object} HeatMapPlugin~ColumnOptions
7
7
  * @description Extension column options that can be specified on each individual grid's column option:
8
8
  * @property {string} field Field used by the heat map
9
- * @property {HeatMapPlugin~Heatmap=} heatMap=null Heat map options
9
+ * @property {HeatMapPlugin~HeatMap=} heatMap=null Heat map options
10
10
  */
11
11
 
12
- /** @typedef {boolean|Object} HeatMapPlugin~Heatmap
13
- * @description Available options describing `heatmap` object
12
+ /** @typedef {Object} HeatMapPlugin~HeatMap
13
+ * @description Available options describing `heatMap` object
14
14
  * @property {number=} midPoint=0 Middle point between values representing up and down colors
15
15
  * @property {string=} mode="cell" In cell mode, heat map color will be applied to the entire cell
16
16
  */
@@ -18,7 +18,7 @@ import {ElfUtil} from '../../tr-grid-util/es6/ElfUtil.js';
18
18
  /** @constructor
19
19
  * @extends {GridPlugin}
20
20
  */
21
- var HeatMapPlugin = function () {
21
+ let HeatMapPlugin = function () {
22
22
  this._onSectionBinding = this._onSectionBinding.bind(this);
23
23
  this._onColumnAdded = this._onColumnAdded.bind(this);
24
24
  this._onColumnRemoved = this._onColumnRemoved.bind(this);
@@ -78,9 +78,9 @@ HeatMapPlugin.prototype.initialize = function (host, options) {
78
78
  */
79
79
  HeatMapPlugin.prototype._afterInit = function () {
80
80
  if(this._realTimeGrid) {
81
- var colStats, painter;
82
- var colCount = this.getColumnCount();
83
- for(var c = 0; c < colCount; c++) {
81
+ let colStats, painter;
82
+ let colCount = this.getColumnCount();
83
+ for(let c = 0; c < colCount; c++) {
84
84
  painter = this.getColumnHeatMap(c);
85
85
  if(painter) {
86
86
  colStats = painter.getColumnStats();
@@ -95,7 +95,7 @@ HeatMapPlugin.prototype._afterInit = function () {
95
95
  * @param {Object} host core grid object
96
96
  */
97
97
  HeatMapPlugin.prototype.unload = function (host) {
98
- var at = this._hosts.indexOf(host);
98
+ let at = this._hosts.indexOf(host);
99
99
  if(at < 0) { return; }
100
100
 
101
101
  this._hosts.splice(at, 1);
@@ -114,12 +114,12 @@ HeatMapPlugin.prototype.unload = function (host) {
114
114
  HeatMapPlugin.prototype.config = function (options, opt_grid) {
115
115
  if(!options) { return; }
116
116
 
117
- var columns = options["columns"];
117
+ let columns = options["columns"];
118
118
  if(!columns) { return; }
119
119
 
120
- var len = columns.length;
121
- for(var i = 0; i < len; ++i) {
122
- var column = columns[i];
120
+ let len = columns.length;
121
+ for(let i = 0; i < len; ++i) {
122
+ let column = columns[i];
123
123
  this.setColumnHeatMap(i, column, opt_grid);
124
124
  }
125
125
  };
@@ -130,22 +130,22 @@ HeatMapPlugin.prototype.config = function (options, opt_grid) {
130
130
  * @returns {!Object}
131
131
  */
132
132
  HeatMapPlugin.prototype.getConfigObject = function (out_obj) {
133
- var obj = out_obj || {};
133
+ let obj = out_obj || {};
134
134
 
135
- var columns = obj.columns;
135
+ let columns = obj.columns;
136
136
  if (!columns) {
137
137
  columns = obj.columns = [];
138
138
  }
139
139
 
140
- var len = this.getColumnCount();
141
- for(var i = 0; i < len; ++i) {
142
- var col = columns[i];
140
+ let len = this.getColumnCount();
141
+ for(let i = 0; i < len; ++i) {
142
+ let col = columns[i];
143
143
  if (!col) {
144
144
  col = columns[i] = {};
145
145
  }
146
146
 
147
147
 
148
- var opt = this.getColumnHeatMap(i);
148
+ let opt = this.getColumnHeatMap(i);
149
149
 
150
150
  if (!opt) { // We are only interested in the columns that have heat map informations
151
151
  continue;
@@ -157,7 +157,7 @@ HeatMapPlugin.prototype.getConfigObject = function (out_obj) {
157
157
  continue;
158
158
  }
159
159
 
160
- var heatMap = col.heatMap = {};
160
+ let heatMap = col.heatMap = {};
161
161
 
162
162
  if (opt.midPoint != null) {
163
163
  heatMap.midPoint = opt.midPoint;
@@ -177,7 +177,7 @@ HeatMapPlugin.prototype.getConfigObject = function (out_obj) {
177
177
  * @return {CellPainter}
178
178
  */
179
179
  HeatMapPlugin.prototype.getColumnHeatMap = function (colIndex, grid) {
180
- var painter = this._getColumnOption(colIndex, "painter", grid);
180
+ let painter = this._getColumnOption(colIndex, "painter", grid);
181
181
  if(painter && painter.getColoringType() === CellPainter.ColoringTypes.HEATMAP) {
182
182
  return /** @type{CellPainter} */painter;
183
183
  }
@@ -190,7 +190,7 @@ HeatMapPlugin.prototype.getColumnHeatMap = function (colIndex, grid) {
190
190
  * @param {Object=} opt_grid core grid object
191
191
  * @example
192
192
  * plugin.setColumnHeatMap(1, {
193
- * "field": "CF_LAST"
193
+ * "field": "CF_LAST",
194
194
  * "heatMap": {
195
195
  * "midPoint": 0, // optional number
196
196
  * "mode": "cell" // optional string (cell|text)
@@ -198,15 +198,15 @@ HeatMapPlugin.prototype.getColumnHeatMap = function (colIndex, grid) {
198
198
  * });
199
199
  */
200
200
  HeatMapPlugin.prototype.setColumnHeatMap = function (colIndex, columnDef, opt_grid) {
201
- var hmMode = "";
202
- var midPoint = 0;
203
- var field = columnDef ? /** @type{string} */(columnDef["field"]) : "";
204
- var hmOptions = field ? columnDef["heatMap"] || columnDef["heatmap"] : null;
201
+ let hmMode = "";
202
+ let midPoint = 0;
203
+ let field = columnDef ? /** @type{string} */(columnDef["field"]) : "";
204
+ let hmOptions = field ? columnDef["heatMap"] || columnDef["heatmap"] : null;
205
205
  if(hmOptions) {
206
- var userMode = hmOptions["mode"] || hmOptions["type"];
206
+ let userMode = hmOptions["mode"] || hmOptions["type"];
207
207
  hmMode = (typeof userMode == "string") ? userMode : "cell";
208
208
 
209
- var userMidPoint = /** @type{number} */(hmOptions["midPoint"]);
209
+ let userMidPoint = /** @type{number} */(hmOptions["midPoint"]);
210
210
  if(typeof userMidPoint != "number") {
211
211
  userMidPoint = +userMidPoint;
212
212
  }
@@ -215,7 +215,7 @@ HeatMapPlugin.prototype.setColumnHeatMap = function (colIndex, columnDef, opt_gr
215
215
  if(opt_grid) {
216
216
  this._setColumnHeatMap(opt_grid, colIndex, hmMode, midPoint, field);
217
217
  } else {
218
- for(var i = this._hosts.length; --i >= 0;) {
218
+ for(let i = this._hosts.length; --i >= 0;) {
219
219
  this._setColumnHeatMap(this._hosts[i], colIndex, hmMode, midPoint, field);
220
220
  }
221
221
  }
@@ -228,17 +228,16 @@ HeatMapPlugin.prototype.setColumnHeatMap = function (colIndex, columnDef, opt_gr
228
228
  * @param {string} field
229
229
  */
230
230
  HeatMapPlugin.prototype._setColumnHeatMap = function (grid, colIndex, hmMode, midPoint, field) {
231
- var dv = grid.getDataSource();
231
+ let dv = grid.getDataSource();
232
232
  if(!dv) {
233
- console.log("Heat map requires a data source");
234
233
  return;
235
234
  }
236
235
 
237
- var colData = this._newColumnData(colIndex);
238
- var painter = /** @type{CellPainter} */(colData["painter"]);
236
+ let colData = this._newColumnData(colIndex);
237
+ let painter = /** @type{CellPainter} */(colData["painter"]);
239
238
 
240
- var cond, sect, rowCount, r, cell;
241
- if(hmMode && field) { // Update or create new painter for heatmap
239
+ let cond, sect, rowCount, r, cell;
240
+ if(hmMode && field) { // Update or create new painter for heatMap
242
241
  if(painter) {
243
242
  // Clear currrent style, blinking and existing styles related to blinking
244
243
  sect = grid.getSection("content");
@@ -265,7 +264,7 @@ HeatMapPlugin.prototype._setColumnHeatMap = function (grid, colIndex, hmMode, mi
265
264
  cond = painter.addHeatmapWithTheme(field, midPoint, (hmMode === "text"));
266
265
  cond.refId = "_hm" + HeatMapPlugin._runningId++;
267
266
 
268
- var colStats = dv.enableColumnStats(field, true, cond.refId);
267
+ let colStats = dv.enableColumnStats(field, true, cond.refId);
269
268
  if(this._initializedGrid && this._realTimeGrid) {
270
269
  colStats.setColumnDataGetter(colDataGetter);
271
270
  }
@@ -276,7 +275,7 @@ HeatMapPlugin.prototype._setColumnHeatMap = function (grid, colIndex, hmMode, mi
276
275
  } else {
277
276
  if(painter) {
278
277
  if(this._clearPainter(colData, grid)) {
279
- // Clear existing heatmap styles
278
+ // Clear existing heatMap styles
280
279
  grid.enableColumnClass(colIndex, "heat-map", false);
281
280
  sect = grid.getSection("content");
282
281
  rowCount = sect.getRowCount();
@@ -306,7 +305,7 @@ HeatMapPlugin.prototype._setColumnHeatMap = function (grid, colIndex, hmMode, mi
306
305
  HeatMapPlugin.prototype.getColumnHeatMapOptions = function(colIndex, options) {
307
306
  if(!options) { options = {}; }
308
307
 
309
- var hm = this.getColumnHeatMap(colIndex);
308
+ let hm = this.getColumnHeatMap(colIndex);
310
309
  if(hm) {
311
310
  options["midPoint"] = hm["midPoint"];
312
311
  options["mode"] = hm["mode"];
@@ -321,11 +320,11 @@ HeatMapPlugin.prototype.getColumnHeatMapOptions = function(colIndex, options) {
321
320
  */
322
321
  HeatMapPlugin.prototype._clearPainter = function (colData, grid) {
323
322
  if(colData) {
324
- var painter = colData["painter"];
323
+ let painter = colData["painter"];
325
324
  if(painter && painter.getColoringType() === CellPainter.ColoringTypes.HEATMAP) {
326
- var cond = painter.getConditions()[0];
325
+ let cond = painter.getConditions()[0];
327
326
  if(cond) {
328
- var dv = grid.getDataSource();
327
+ let dv = grid.getDataSource();
329
328
  dv.enableColumnStats(cond.field, false, cond.refId);
330
329
  }
331
330
  if(painter.clearHeatMap()) {
@@ -338,7 +337,7 @@ HeatMapPlugin.prototype._clearPainter = function (colData, grid) {
338
337
  };
339
338
  /** @private */
340
339
  HeatMapPlugin.prototype._onThemeLoaded = function () {
341
- for(var i = this._hosts.length; --i >= 0;) {
340
+ for(let i = this._hosts.length; --i >= 0;) {
342
341
  this._hosts[i].requestRowRefresh();
343
342
  }
344
343
  };
@@ -350,21 +349,21 @@ HeatMapPlugin.prototype._onSectionBinding = function (e) {
350
349
  return;
351
350
  }
352
351
 
353
- var grid = e["sender"];
354
- var section = e["section"];
355
- var dataRows = /** @type{Array.<Object>} */(e["dataRows"]);
356
- var colCount = section.getColumnCount();
357
- var fromR = /** @type{number} */(e["fromRowIndex"]);
358
- var toR = /** @type{number} */(e["toRowIndex"]);
352
+ let grid = e["sender"];
353
+ let section = e["section"];
354
+ let dataRows = /** @type{Array.<Object>} */(e["dataRows"]);
355
+ let colCount = section.getColumnCount();
356
+ let fromR = /** @type{number} */(e["fromRowIndex"]);
357
+ let toR = /** @type{number} */(e["toRowIndex"]);
359
358
 
360
- for (var c = 0; c < colCount; ++c) {
361
- var painter = this.getColumnHeatMap(c, grid);
359
+ for (let c = 0; c < colCount; ++c) {
360
+ let painter = this.getColumnHeatMap(c, grid);
362
361
  if(painter) {
363
- var columnStats = painter.getColumnStats();
364
- var min = columnStats.getMin();
365
- var max = columnStats.getMax();
366
- for (var r = fromR; r < toR; ++r) {
367
- var cell = section.getCell(c, r, false);
362
+ let columnStats = painter.getColumnStats();
363
+ let min = columnStats.getMin();
364
+ let max = columnStats.getMax();
365
+ for (let r = fromR; r < toR; ++r) {
366
+ let cell = section.getCell(c, r, false);
368
367
  if(cell) {
369
368
  painter.renderHeatMap(cell, this._getRowData(dataRows[r]), min, max);
370
369
  }
@@ -379,9 +378,9 @@ HeatMapPlugin.prototype._onColumnAdded = function(e) {
379
378
  if(e.context) {
380
379
  this.setColumnHeatMap(e.colIndex, e.context, e.sender);
381
380
  if(this._realTimeGrid) {
382
- var painter = this.getColumnHeatMap(e.colIndex);
381
+ let painter = this.getColumnHeatMap(e.colIndex);
383
382
  if(painter) {
384
- var colStats = painter.getColumnStats();
383
+ let colStats = painter.getColumnStats();
385
384
  if(colStats) {
386
385
  colStats.setColumnDataGetter(colDataGetter);
387
386
  }
@@ -84,10 +84,12 @@ declare class InCellEditingPlugin extends GridPlugin {
84
84
 
85
85
  public disableDblClick(opt_disabled?: boolean|null): void;
86
86
 
87
- public showStarterText(bool?: boolean|null): void;
87
+ public showStarterText(shown?: boolean|null): void;
88
88
 
89
89
  public _requestUpdateStarterText(): void;
90
90
 
91
+ public updateStarterText(shown?: boolean|null): void;
92
+
91
93
  public isEditing(): boolean;
92
94
 
93
95
  public getTextBox(columnIndex?: number|null, grid?: any): Element|null;
@@ -417,8 +417,7 @@ InCellEditingPlugin._styles = prettifyCss([
417
417
  ],
418
418
  ":host .starter-text", [
419
419
  "padding: var(--grid-cell-padding,0 8px 0 8px);",
420
- "pointer-events: none;",
421
- "line-height: 28px" // WARNING: hardcode, it can be calculate with row height
420
+ "pointer-events: none;"
422
421
  ]
423
422
  ]);
424
423
 
@@ -1113,14 +1112,13 @@ InCellEditingPlugin.prototype._onGridKeyDown = function (e) {
1113
1112
  };
1114
1113
 
1115
1114
  /**
1116
- * @description Show starter text when the grid is no ric
1115
+ * @description Show starter text when the grid has no ric
1117
1116
  * @public
1118
- * @param {boolean=} bool
1117
+ * @param {boolean=} shown
1119
1118
  */
1120
- InCellEditingPlugin.prototype.showStarterText = function (bool) {
1121
- this._requestUpdateStarterText();
1119
+ InCellEditingPlugin.prototype.showStarterText = function (shown) {
1120
+ this.updateStarterText(shown !== false);
1122
1121
  };
1123
-
1124
1122
  /**
1125
1123
  * @description Request to show starter text
1126
1124
  * @public
@@ -1132,25 +1130,26 @@ InCellEditingPlugin.prototype._requestUpdateStarterText = function () {
1132
1130
  if(this._updateStarterTextConflator.conflate()){
1133
1131
  return;
1134
1132
  }
1135
- this._updateStaterText();
1133
+ this.updateStarterText();
1136
1134
  };
1137
1135
 
1138
1136
  /**
1139
- * @private
1140
- * @param {boolean=} force
1137
+ * @public
1138
+ * @description Updates the starter text to either show or hide it.
1139
+ * @param {boolean=} shown Forces the display of the starter text if "true", if "false" it hides the starter text. If not given as a parameter, it automates updating the display of the starter text
1141
1140
  */
1142
- InCellEditingPlugin.prototype._updateStaterText = function (force) {
1141
+ InCellEditingPlugin.prototype.updateStarterText = function (shown) {
1143
1142
  if(!this._realTimeGrid || !this._starterText) {
1144
1143
  return;
1145
1144
  }
1146
1145
  // TODO: handled grid have ric but no one rows.
1147
1146
  let popup;
1148
1147
  if(!this._starterTextPopup) {
1149
- popup = this._starterTextPopup = this._createStaterTextElement();
1148
+ popup = this._starterTextPopup = this._createStarterTextElement();
1150
1149
  } else {
1151
1150
  popup = this._starterTextPopup;
1152
1151
  }
1153
- if(force === false || this._realTimeGrid.hasRic()) {
1152
+ if(shown === false || this._realTimeGrid.hasRic()) {
1154
1153
  popup.hide();
1155
1154
  return;
1156
1155
  }
@@ -1177,8 +1176,9 @@ InCellEditingPlugin.prototype._updateStaterText = function (force) {
1177
1176
  let popupElem = popup.getElement();
1178
1177
  popupElem.style.top = pos.y + "px";
1179
1178
  popupElem.style.left = pos.x + "px";
1179
+ popupElem.style.lineHeight = editableCell.getHeight() + "px";
1180
1180
  }
1181
- popup.show(force, grid.getParent());
1181
+ popup.show(shown, grid.getParent());
1182
1182
  };
1183
1183
 
1184
1184
  /** @private
@@ -1188,10 +1188,14 @@ InCellEditingPlugin.prototype._getFirstEditableColumnIndex = function () {
1188
1188
  if(this._readonly) {
1189
1189
  return -1;
1190
1190
  }
1191
+ let grid = this._hosts[0];
1192
+ if(!grid) {
1193
+ return -1;
1194
+ }
1191
1195
  let colCount = this.getColumnCount();
1192
1196
  let editableCol = -1;
1193
1197
  for (let i = 0; i < colCount; i++) {
1194
- if(this.isColumnEditable(i)) { // this._editableContent already check in this method
1198
+ if(grid.isColumnVisible(i) && this.isColumnEditable(i)) { // this._editableContent already check in this method
1195
1199
  editableCol = i;
1196
1200
  break;
1197
1201
  }
@@ -1202,7 +1206,7 @@ InCellEditingPlugin.prototype._getFirstEditableColumnIndex = function () {
1202
1206
  /** @private
1203
1207
  * @return {Object}
1204
1208
  */
1205
- InCellEditingPlugin.prototype._createStaterTextElement = function () {
1209
+ InCellEditingPlugin.prototype._createStarterTextElement = function () {
1206
1210
  let container = document.createElement("div");
1207
1211
  container.textContent = this._starterText;
1208
1212
  container.className = "starter-text";
@@ -1392,9 +1396,9 @@ InCellEditingPlugin.prototype.isColumnEditable = function (colIndex) {
1392
1396
  InCellEditingPlugin.prototype.enableReadonly = function (enabled) {
1393
1397
  this._readonly = enabled !== false;
1394
1398
  if(this._readonly) {
1395
- this._updateStaterText(false);
1399
+ this.updateStarterText(false);
1396
1400
  } else {
1397
- this._updateStaterText();
1401
+ this.updateStarterText();
1398
1402
  }
1399
1403
  };
1400
1404
  /**
@@ -1642,7 +1646,7 @@ InCellEditingPlugin.prototype._openEditor = function (e, host, arg) {
1642
1646
 
1643
1647
  // Dispatch an event for user to setup stuff
1644
1648
  t._dispatch("editorOpened", arg); // User may modify the editor
1645
- t._updateStaterText(false); // Currently Starter text open doesn't have the ric, it needs to be forcefully hide
1649
+ t.updateStarterText(false); // Currently Starter text open doesn't have the ric, it needs to be forcefully hide
1646
1650
 
1647
1651
  inputElement.focus();
1648
1652
  if(typeof inputElement.select === "function") {
@@ -143,10 +143,10 @@ RowPainter._styles = prettifyCss([
143
143
  "font-family: Arial;"
144
144
  ],
145
145
  ".tr-grid .expander.closed", [
146
- "transform: translate(0px, -1px) rotate(-90deg);"
146
+ "transform: rotate(-90deg);"
147
147
  ],
148
148
  ".tr-grid .cell.closed .expander", [
149
- "transform: translate(0px, -1px) rotate(-90deg);"
149
+ "transform: rotate(-90deg);"
150
150
  ],
151
151
  ".tr-grid .tr-lg .cell.folder.content-header", [ // Used for header row in contentAsHeader mode, espectially with solar theme
152
152
  "background-color: inherit;"
@@ -7,10 +7,10 @@ declare namespace HeatMapPlugin {
7
7
 
8
8
  type ColumnOptions = {
9
9
  field: string,
10
- heatMap?: HeatMapPlugin.Heatmap|null
10
+ heatMap?: HeatMapPlugin.HeatMap|null
11
11
  };
12
12
 
13
- type Heatmap = {
13
+ type HeatMap = {
14
14
  midPoint?: number|null,
15
15
  mode?: string|null
16
16
  };
@@ -84,10 +84,12 @@ declare class InCellEditingPlugin extends GridPlugin {
84
84
 
85
85
  public disableDblClick(opt_disabled?: boolean|null): void;
86
86
 
87
- public showStarterText(bool?: boolean|null): void;
87
+ public showStarterText(shown?: boolean|null): void;
88
88
 
89
89
  public _requestUpdateStarterText(): void;
90
90
 
91
+ public updateStarterText(shown?: boolean|null): void;
92
+
91
93
  public isEditing(): boolean;
92
94
 
93
95
  public getTextBox(columnIndex?: number|null, grid?: any): Element|null;
@@ -9,6 +9,8 @@ declare class DataConnector extends EventDispatcher {
9
9
 
10
10
  constructor();
11
11
 
12
+ public dispose(): void;
13
+
12
14
  public getAllRics(): (string)[]|null;
13
15
 
14
16
  public hasRic(): boolean;
@@ -8,7 +8,7 @@ declare class SnapshotFiller extends EventDispatcher {
8
8
 
9
9
  constructor();
10
10
 
11
- public static readonly _mockAdc: any;
11
+ public dispose(rtk: any): void;
12
12
 
13
13
  public setRTK(rtk: any): void;
14
14
 
package/lib/versions.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "tr-grid-util": "1.3.167",
2
+ "tr-grid-util": "1.3.168",
3
3
  "tr-grid-printer": "1.0.18",
4
4
  "@grid/column-dragging": "1.0.21",
5
5
  "@grid/row-segmenting": "1.0.35",
@@ -18,8 +18,8 @@
18
18
  "tr-grid-content-wrap": "1.0.20",
19
19
  "tr-grid-contextmenu": "1.0.44",
20
20
  "tr-grid-filter-input": "0.9.43",
21
- "tr-grid-heat-map": "1.0.29",
22
- "tr-grid-in-cell-editing": "1.0.90",
21
+ "tr-grid-heat-map": "1.0.30",
22
+ "tr-grid-in-cell-editing": "1.0.92",
23
23
  "tr-grid-pagination": "1.0.24",
24
24
  "tr-grid-percent-bar": "1.0.24",
25
25
  "tr-grid-range-bar": "2.0.9",