@refinitiv-ui/efx-grid 6.0.104 → 6.0.106

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. package/lib/core/dist/core.js +7 -8
  2. package/lib/core/dist/core.min.js +1 -1
  3. package/lib/core/es6/grid/Core.js +7 -8
  4. package/lib/formatters/es6/FormatterBuilder.js +10 -1
  5. package/lib/formatters/es6/SimpleTickerFormatter.d.ts +0 -2
  6. package/lib/formatters/es6/SimpleTickerFormatter.js +1 -0
  7. package/lib/grid/index.js +1 -1
  8. package/lib/rt-grid/dist/rt-grid.js +375 -737
  9. package/lib/rt-grid/dist/rt-grid.min.js +1 -1
  10. package/lib/rt-grid/es6/FieldDefinition.d.ts +2 -0
  11. package/lib/rt-grid/es6/FieldDefinition.js +23 -7
  12. package/lib/rt-grid/es6/Grid.d.ts +1 -1
  13. package/lib/rt-grid/es6/Grid.js +8 -49
  14. package/lib/rt-grid/es6/RowDefinition.d.ts +5 -3
  15. package/lib/rt-grid/es6/RowDefinition.js +49 -20
  16. package/lib/tr-grid-column-fitter/es6/ColumnFitter.js +523 -708
  17. package/lib/tr-grid-column-resizing/es6/ColumnResizing.d.ts +16 -16
  18. package/lib/tr-grid-column-resizing/es6/ColumnResizing.js +131 -109
  19. package/lib/tr-grid-printer/es6/CellWriter.d.ts +6 -5
  20. package/lib/tr-grid-printer/es6/CellWriter.js +57 -49
  21. package/lib/tr-grid-printer/es6/ColumnWriter.d.ts +1 -0
  22. package/lib/tr-grid-printer/es6/ColumnWriter.js +3 -1
  23. package/lib/tr-grid-printer/es6/GridPrinter.js +117 -99
  24. package/lib/tr-grid-printer/es6/PrintTrait.d.ts +1 -0
  25. package/lib/tr-grid-printer/es6/PrintTrait.js +60 -47
  26. package/lib/tr-grid-printer/es6/SectionWriter.d.ts +4 -1
  27. package/lib/tr-grid-printer/es6/SectionWriter.js +40 -15
  28. package/lib/tr-grid-row-grouping/es6/RowGrouping.js +6 -0
  29. package/lib/tr-grid-util/es6/MultiTableManager.js +1 -0
  30. package/lib/types/es6/ColumnResizing.d.ts +16 -16
  31. package/lib/types/es6/Core/data/DataCache.d.ts +0 -8
  32. package/lib/types/es6/RealtimeGrid/FieldDefinition.d.ts +2 -0
  33. package/lib/types/es6/RealtimeGrid/Grid.d.ts +1 -1
  34. package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +5 -3
  35. package/lib/versions.json +6 -6
  36. package/package.json +1 -1
@@ -35,4 +35,5 @@ declare class PrintTrait {
35
35
 
36
36
  }
37
37
 
38
+ export default PrintTrait;
38
39
  export { PrintTrait };
@@ -26,8 +26,8 @@ import { EventDispatcher } from "../../tr-grid-util/es6/EventDispatcher.js";
26
26
  * @extends{EventDispatcher}
27
27
  * @suppress {checkTypes}
28
28
  */
29
- var PrintTrait = function() {
30
- var t = this;
29
+ let PrintTrait = function() {
30
+ let t = this;
31
31
  t._onKeyDown = t._onKeyDown.bind(t);
32
32
  t._onMediaQuery = t._onMediaQuery.bind(t);
33
33
  t._onBeforePrint = t._onBeforePrint.bind(t);
@@ -44,19 +44,19 @@ Ext.inherits(PrintTrait, EventDispatcher);
44
44
  /** @type {number}
45
45
  * @private
46
46
  */
47
- var IDLE = 0;
47
+ const IDLE = 0;
48
48
  /** @type {number}
49
49
  * @private
50
50
  */
51
- var COUNTING = 1;
51
+ const COUNTING = 1;
52
52
  /** @type {number}
53
53
  * @private
54
54
  */
55
- var BEFORE_PRINT = 2;
55
+ const BEFORE_PRINT = 2;
56
56
  /** @type {number}
57
57
  * @private
58
58
  */
59
- var AFTER_PRINT = 3;
59
+ const AFTER_PRINT = 3;
60
60
 
61
61
  /** @type {number}
62
62
  * @private
@@ -97,7 +97,11 @@ PrintTrait.prototype._state = IDLE;
97
97
  /** @type {number}
98
98
  * @private
99
99
  */
100
- PrintTrait.prototype._timerId = 0;
100
+ PrintTrait.prototype._beforePrintTimer = 0;
101
+ /** @type {number}
102
+ * @private
103
+ */
104
+ PrintTrait.prototype._afterPrintTimer = 0;
101
105
  /** @type {boolean}
102
106
  * @public
103
107
  */
@@ -117,10 +121,10 @@ PrintTrait._env = {};
117
121
  * @return {Object}
118
122
  */
119
123
  PrintTrait.calculateEnvironment = function() {
120
- var env = PrintTrait._env;
121
- var ua = navigator.userAgent;
122
- var jet = window["JET"];
123
- var cd = jet ? jet["ContainerDescription"] : "";
124
+ let env = PrintTrait._env;
125
+ let ua = navigator.userAgent;
126
+ let jet = window["JET"];
127
+ let cd = jet ? jet["ContainerDescription"] : "";
124
128
 
125
129
  env.isMac = /Mac/.test(navigator.platform);
126
130
  env.isIE = (ua.indexOf("MSIE ") > 0) || (ua.indexOf("Trident/") > 0) || (ua.indexOf("Edge/") > 0);
@@ -138,7 +142,7 @@ PrintTrait.prototype.observe = function(iframeElement) {
138
142
  return;
139
143
  }
140
144
 
141
- var winObj = null;
145
+ let winObj = null;
142
146
 
143
147
  if(iframeElement) {
144
148
  if(iframeElement.contentWindow) {
@@ -199,10 +203,15 @@ PrintTrait.prototype.isObserving = function() {
199
203
  * @suppress {checkTypes}
200
204
  */
201
205
  PrintTrait.prototype.dispose = function() {
202
- this.removeAllEventlisteners();
206
+ this.removeAllEventListeners();
203
207
 
204
- if(this._timerId) {
205
- clearTimeout(this._timerId);
208
+ if(this._beforePrintTimer) {
209
+ clearTimeout(this._beforePrintTimer);
210
+ this._beforePrintTimer = 0;
211
+ }
212
+ if(this._afterPrintTimer) {
213
+ clearTimeout(this._afterPrintTimer);
214
+ this._afterPrintTimer = 0;
206
215
  }
207
216
 
208
217
  this._onPrintEnd(); // Force ending the process
@@ -213,7 +222,7 @@ PrintTrait.prototype.dispose = function() {
213
222
  */
214
223
  PrintTrait.prototype.print = function() {
215
224
  if(!this._window) {
216
- console.error("Cannot perform printing. Window object must be specified by using observe() method.");
225
+ console.warn("Cannot perform printing. Window object must be specified by using observe() method.");
217
226
  return;
218
227
  }
219
228
  if(this._state !== IDLE) {
@@ -233,10 +242,9 @@ PrintTrait.prototype.print = function() {
233
242
  this._eventArg["documentElement"] = this.getDocumentElement();
234
243
  this._eventArg["bodyElement"] = this.getBodyElement();
235
244
  this.getDocumentElement().classList.add("tr-printing-mode");
236
- this._dispatch("pageCounting", this._eventArg);
237
245
 
238
246
  if(PrintTrait.DEBUG) {
239
- var debugBtn = PrintTrait._debugBtn = document.createElement("button");
247
+ let debugBtn = PrintTrait._debugBtn = document.createElement("button");
240
248
  debugBtn.addEventListener("click", this._onBeforePrint);
241
249
  debugBtn.textContent = "BeforePrint";
242
250
  debugBtn.style.display = "unset";
@@ -246,30 +254,35 @@ PrintTrait.prototype.print = function() {
246
254
  debugBtn.style.transform = "translateX(-50%)";
247
255
  debugBtn.style.top = "20px";
248
256
  document.body.appendChild(debugBtn);
249
- } else {
257
+ }
258
+ this._dispatch("pageCounting", this._eventArg);
259
+
260
+ if(!PrintTrait.DEBUG) {
250
261
  /**
251
262
  * _onBeforePrint() was originally execute by window 'beforeprint' event.
252
263
  * Due to Custom Elements can't be create during 'beforeprint', _onBeforePrint() needs to be executed manually.
253
264
  * And window.print() need to be executed after some delay to make sure Custom Elements are created and rendered.
254
265
  * See here: https://html.spec.whatwg.org/multipage/custom-elements.html#custom-element-reactions
255
266
  */
267
+ this._beforePrintTimer = setTimeout(this._print, 500);
256
268
  this._onBeforePrint();
257
- setTimeout(this._print, 500);
258
269
  }
259
270
  };
260
271
  /** @public
261
272
  */
262
273
  PrintTrait.prototype._print = function() {
274
+ this._beforePrintTimer = 0;
263
275
  this._defaultPrint.call(this._window);
276
+ this._dispatch("printed", this._eventArg);
264
277
  };
265
278
  /** @public
266
279
  * @param {number} pageCount
267
280
  * @return {!Element}
268
281
  */
269
282
  PrintTrait.createBlankPages = function(pageCount) {
270
- var rootElem = document.createElement("div");
271
- for(var i = 0; i < pageCount; ++i) {
272
- var bp = document.createElement("div");
283
+ let rootElem = document.createElement("div");
284
+ for(let i = 0; i < pageCount; ++i) {
285
+ let bp = document.createElement("div");
273
286
  if(PrintTrait.DEBUG) {
274
287
  bp.textContent = "Page " + (i + 1);
275
288
  } else {
@@ -286,8 +299,8 @@ PrintTrait.createBlankPages = function(pageCount) {
286
299
  * @return {!Element}
287
300
  */
288
301
  PrintTrait.prototype.createClientBox = function(pw, ph) {
289
- var rootElem = document.createElement("div");
290
- var styObj = rootElem.style;
302
+ let rootElem = document.createElement("div");
303
+ let styObj = rootElem.style;
291
304
  styObj.width = pw + "px";
292
305
  styObj.height = ph + "px";
293
306
 
@@ -329,9 +342,7 @@ PrintTrait.prototype.getBodyElement = function() {
329
342
  * @param {KeyboardEvent} e
330
343
  */
331
344
  PrintTrait.prototype._onKeyDown = function(e) {
332
- var ctrlCmdKey = PrintTrait._env.isMac ? e.metaKey : e.ctrlKey;
333
-
334
- if(ctrlCmdKey) {
345
+ if(e.metaKey || e.ctrlKey) {
335
346
  if(!e.altKey) {
336
347
  if(e.keyCode === 80) { // P
337
348
  e.preventDefault();
@@ -359,18 +370,18 @@ PrintTrait.prototype._onBeforePrint = function(e) {
359
370
  this._state = BEFORE_PRINT;
360
371
  this._calculatePageSize(this._correction, this._fixedSize);
361
372
 
362
-
363
373
  this._eventArg["documentElement"] = this.getDocumentElement();
364
374
  this._eventArg["bodyElement"] = this.getBodyElement();
365
375
  this.getDocumentElement().classList.add("tr-printing-mode");
366
- this._dispatch("beforeprint", this._eventArg);
367
376
 
368
377
  if(PrintTrait.DEBUG) {
369
- var debugBtn = PrintTrait._debugBtn;
378
+ let debugBtn = PrintTrait._debugBtn;
370
379
  debugBtn.removeEventListener("click", this._onBeforePrint);
371
380
  debugBtn.addEventListener("click", this._onAfterPrint);
372
381
  debugBtn.textContent = "AfterPrint";
373
382
  }
383
+
384
+ this._dispatch("beforeprint", this._eventArg);
374
385
  }
375
386
  };
376
387
  /** @private
@@ -382,22 +393,22 @@ PrintTrait.prototype._onAfterPrint = function(e) {
382
393
  this._calculatePageSize();
383
394
 
384
395
  this.getDocumentElement().classList.remove("tr-printing-mode");
385
- this._dispatch("afterprint", this._eventArg);
386
- this._timerId = setTimeout(this._onPrintEnd, 0);
387
-
388
396
  if (PrintTrait._debugBtn) { // For debugging
389
- var pn = PrintTrait._debugBtn.parentNode;
397
+ let pn = PrintTrait._debugBtn.parentNode;
390
398
  if(pn) {
391
399
  pn.removeChild(PrintTrait._debugBtn);
392
400
  }
393
401
  PrintTrait._debugBtn = null;
394
402
  }
403
+
404
+ this._afterPrintTimer = setTimeout(this._onPrintEnd, 0);
405
+ this._dispatch("afterprint", this._eventArg);
395
406
  }
396
407
  };
397
408
  /** @private
398
409
  */
399
410
  PrintTrait.prototype._onPrintEnd = function() {
400
- this._timerId = 0;
411
+ this._afterPrintTimer = 0;
401
412
  this._state = IDLE;
402
413
  };
403
414
  /** @private
@@ -409,13 +420,13 @@ PrintTrait.prototype._calculatePageSize = function(sizeCorrection, fixedSize) {
409
420
  if(PrintTrait._env.isIE) {
410
421
  return false; // Cannot calculate paper size in IE
411
422
  }
412
- var documentElement = this.getDocumentElement();
413
- var cw = documentElement.clientWidth;
423
+ let documentElement = this.getDocumentElement();
424
+ let cw = documentElement.clientWidth;
414
425
  var iw = this._window.innerWidth || 0;
415
- var ch = documentElement.clientHeight;
416
- var ih = this._window.innerHeight || 0;
417
- var nw = (cw >= iw) ? cw : iw;
418
- var nh = (ch >= ih) ? ch : ih;
426
+ let ch = documentElement.clientHeight;
427
+ let ih = this._window.innerHeight || 0;
428
+ let nw = (cw >= iw) ? cw : iw;
429
+ let nh = (ch >= ih) ? ch : ih;
419
430
 
420
431
  if(fixedSize) {
421
432
  if(nw > nh) {
@@ -426,9 +437,9 @@ PrintTrait.prototype._calculatePageSize = function(sizeCorrection, fixedSize) {
426
437
  nh = this._defaultHeight;
427
438
  }
428
439
  } else if(sizeCorrection) {
429
- var portrait = nh >= nw;
430
- var ar = this._calculateAspectRatio(nw, nh);
431
- var paperSize = PrintTrait._paperSizes[ar];
440
+ let portrait = nh >= nw;
441
+ let ar = this._calculateAspectRatio(nw, nh);
442
+ let paperSize = PrintTrait._paperSizes[ar];
432
443
  if(!paperSize) {
433
444
  paperSize = PrintTrait._paperSizes[ar - 1] || PrintTrait._paperSizes[ar + 1];
434
445
  }
@@ -457,8 +468,8 @@ PrintTrait.prototype._calculatePageSize = function(sizeCorrection, fixedSize) {
457
468
  * @return {number}
458
469
  */
459
470
  PrintTrait.prototype._calculateAspectRatio = function(w, h) {
460
- var portrait = h >= w;
461
- var ratio = (portrait) ? w / h : h / w;
471
+ let portrait = h >= w;
472
+ let ratio = (portrait) ? w / h : h / w;
462
473
  return Math.floor(ratio * 1000); // Return 3 digit precision
463
474
  };
464
475
 
@@ -478,4 +489,6 @@ PrintTrait._paperSizes = {
478
489
  };
479
490
 
480
491
 
492
+
493
+ export default PrintTrait;
481
494
  export { PrintTrait };
@@ -29,10 +29,12 @@ declare class SectionWriter extends ElementWrapper {
29
29
 
30
30
  public enableRowClass(rowIndex: number, className: string, enabled: boolean): void;
31
31
 
32
- public stretchCell(colIndex: number, rowIndex: number, opt_stretching?: boolean|null, opt_noLeftStretching?: boolean|null): void;
32
+ public stretchCell(cellRef: any, rowIndex?: number|null, stretching?: boolean|null, onlyToTheRight?: boolean|null): any;
33
33
 
34
34
  public hasCellSpan(): boolean;
35
35
 
36
+ public getStretchedCell(cellRef: any, rowIndex?: number|null): any;
37
+
36
38
  public getCellRowSpan(colIndex: number, rowIndex: number): number;
37
39
 
38
40
  public setCellRowSpan(colIndex: number, rowIndex: number, rowSpan: number): void;
@@ -51,4 +53,5 @@ declare class SectionWriter extends ElementWrapper {
51
53
 
52
54
  }
53
55
 
56
+ export default SectionWriter;
54
57
  export { SectionWriter };
@@ -7,7 +7,7 @@ import { CellWriter } from "./CellWriter.js";
7
7
  * @constructor
8
8
  * @extends {ElementWrapper}
9
9
  */
10
- var SectionWriter = function () {
10
+ let SectionWriter = function () {
11
11
  this._cellWriter = new CellWriter();
12
12
  this._table = new Table();
13
13
  this._columns = [];
@@ -34,7 +34,7 @@ SectionWriter.prototype.getFirstIndexInView = function () {
34
34
  * @return {number}
35
35
  */
36
36
  SectionWriter.prototype.getLastIndexInView = function () {
37
- return this._table.getRowCount();
37
+ return this._table.getRowCount() - 1; // WARNING: This is inclusive
38
38
  };
39
39
 
40
40
  /** @public
@@ -48,7 +48,7 @@ SectionWriter.prototype.getColumnCount = function () {
48
48
  * @return {*}
49
49
  */
50
50
  SectionWriter.prototype.getColumn = function (colIndex) {
51
- var col = this._columns[colIndex];
51
+ let col = this._columns[colIndex];
52
52
  if (!col) {
53
53
  col = this._columns[colIndex] = {};
54
54
  }
@@ -81,7 +81,7 @@ SectionWriter.prototype.setRowCount = function (val) {
81
81
  * @return {CellWriter}
82
82
  */
83
83
  SectionWriter.prototype.getCell = function (colIndex, rowIndex) {
84
- var cell = this._table.getCell(colIndex, rowIndex);
84
+ let cell = this._table.getCell(colIndex, rowIndex);
85
85
  if(cell) {
86
86
  this._cellWriter.cloak(cell);
87
87
  return this._cellWriter;
@@ -94,7 +94,7 @@ SectionWriter.prototype.getCell = function (colIndex, rowIndex) {
94
94
  * @return {Element|Node|NodeList}
95
95
  */
96
96
  SectionWriter.prototype.getCellContent = function (colIndex, rowIndex) {
97
- var cell = this.getCell(colIndex, rowIndex);
97
+ let cell = this.getCell(colIndex, rowIndex);
98
98
  return cell ? cell.getContent() : null;
99
99
  };
100
100
  /** Set data to the specified cell
@@ -104,7 +104,7 @@ SectionWriter.prototype.getCellContent = function (colIndex, rowIndex) {
104
104
  * @param {string|Element|tr.IElementControl|*} data this can be HTML element, string, number, date, image
105
105
  */
106
106
  SectionWriter.prototype.setCellContent = function (colIndex, rowIndex, data) {
107
- var cell = this.getCell(colIndex, rowIndex);
107
+ let cell = this.getCell(colIndex, rowIndex);
108
108
  if(cell) {
109
109
  cell.setContent(data);
110
110
  }
@@ -119,17 +119,24 @@ SectionWriter.prototype.setCellContent = function (colIndex, rowIndex, data) {
119
119
  SectionWriter.prototype.enableRowClass = function (rowIndex, className, enabled) { };
120
120
 
121
121
  /** This will make the specified cell horizontally span to fit entire row regardless of position of the cell -- cell will shift to the left most of the section.<br>
122
- * If opt_noLeftStretching is true, the cell will not extend to the left most position<br>
122
+ * If onlyToTheRight is true, the cell will not extend to the left most position<br>
123
123
  * This is different from cell colSpan, which the cell remain in the same position. tr-stretched class will also be added to the cell
124
124
  * @public
125
- * @param {number} colIndex
126
- * @param {number} rowIndex
127
- * @param {boolean=} opt_stretching Default is true
128
- * @param {boolean=} opt_noLeftStretching Default is false (expand cell to the left).
129
- */
130
- SectionWriter.prototype.stretchCell = function (colIndex, rowIndex, opt_stretching, opt_noLeftStretching) {
131
- var cell = this._table.getCell(colIndex, rowIndex);
132
- cell.setAttribute("colspan", this._table.getColumnCount());
125
+ * @param {*} cellRef Either column index or cell reference is acceptable
126
+ * @param {number=} rowIndex If the cell instance is given as the first parameter, this parameter will be ignored.
127
+ * @param {boolean=} stretching Default is true
128
+ * @param {boolean=} onlyToTheRight=false By default, cell will be stretched to both left and right directions, covering entire row. Set to true to expand only to the right
129
+ * @return {*} The cell being stretched
130
+ * @example
131
+ * grid.stretchCell(1, 0); // The second cell on the first row will be stretched covering the entire row
132
+ * grid.stretchCell(cellInstance, 0, true); // The given cell will be stretched covering the entire row
133
+ */
134
+ SectionWriter.prototype.stretchCell = function (cellRef, rowIndex, stretching, onlyToTheRight) {
135
+ let cell = this._table.getCell(cellRef, rowIndex);
136
+ if(stretching !== false) {
137
+ cell.setAttribute("colspan", this._table.getColumnCount());
138
+ }
139
+ return cell;
133
140
  };
134
141
  /** {@link SectionWriter#stretchCell}
135
142
  * @public
@@ -143,6 +150,22 @@ SectionWriter.prototype.unstretchCell = function (colIndex, rowIndex) {};
143
150
  * @return {boolean}
144
151
  */
145
152
  SectionWriter.prototype.hasCellSpan = function () { return false; };
153
+ /**
154
+ * @public
155
+ * @param {*} cellRef
156
+ * @param {number=} rowIndex
157
+ * @return {*}
158
+ */
159
+ SectionWriter.prototype.getStretchedCell = function (cellRef, rowIndex) {
160
+ if(typeof rowIndex === "number") {
161
+ let cell = this._table.getCell(cellRef, rowIndex);
162
+ let colSpan = +cell.getAttribute("colspan");
163
+ if(colSpan > 1) {
164
+ return cell;
165
+ }
166
+ }
167
+ return null;
168
+ };
146
169
  /** @description Returns zero or negative value, if the cell is spanned over (i.e. occupied by the spanning cell). <br>
147
170
  * Negative value is distance from the spanning cell (i.e. -1 means one cell from the spanning cell and -2 means two cells from the spanning cell) <br>
148
171
  * Return one, if the cell has no span (normal cell). <br>
@@ -210,4 +233,6 @@ SectionWriter.prototype._startBindingSession = function (enabled) {
210
233
  };
211
234
 
212
235
 
236
+
237
+ export default SectionWriter;
213
238
  export { SectionWriter };
@@ -396,6 +396,12 @@ RowGroupingPlugin.prototype.initialize = function (host, options) {
396
396
  return;
397
397
  }
398
398
 
399
+ if(options && !options.multitable) {
400
+ while (this._hosts.length) {
401
+ this.unload(this._hosts[0]);
402
+ }
403
+ }
404
+
399
405
  this._hosts.push(host);
400
406
 
401
407
  ExpanderIcon.loadExpanderStyles();
@@ -341,6 +341,7 @@ MultiTableManager.prototype._addTable = function(tableIndex) {
341
341
 
342
342
  let configObj = this._cloneConfig();
343
343
  configObj.extensions = this._generateExtensions();
344
+ configObj.multitable = true;
344
345
 
345
346
  delete configObj.staticDataRows;
346
347
  delete configObj.rows;
@@ -6,25 +6,25 @@ import { injectCss, prettifyCss } from "../../tr-grid-util/es6/Util.js";
6
6
  declare namespace ColumnResizingPlugin {
7
7
 
8
8
  type Options = {
9
- preserveProportion?: boolean,
10
- preserveGridSize?: boolean,
11
- noResizing?: boolean,
12
- columnResized?: ((...params: any[]) => any),
13
- dblClicked?: ((...params: any[]) => any),
14
- dragStart?: ((...params: any[]) => any),
15
- dragEnd?: ((...params: any[]) => any)
9
+ preserveProportion?: boolean|null,
10
+ preserveGridSize?: boolean|null,
11
+ noResizing?: boolean|null,
12
+ columnResized?: ((...params: any[]) => any)|null,
13
+ dblClicked?: ((...params: any[]) => any)|null,
14
+ dragStart?: ((...params: any[]) => any)|null,
15
+ dragEnd?: ((...params: any[]) => any)|null
16
16
  };
17
17
 
18
18
  type ColumnOptions = {
19
- noResizing?: boolean,
20
- defaultWidth?: number
19
+ noResizing?: boolean|null,
20
+ defaultWidth?: number|null
21
21
  };
22
22
 
23
23
  }
24
24
 
25
25
  declare class ColumnResizingPlugin extends GridPlugin {
26
26
 
27
- constructor(options?: ColumnResizingPlugin.Options);
27
+ constructor(options?: ColumnResizingPlugin.Options|null);
28
28
 
29
29
  public getName(): string;
30
30
 
@@ -40,15 +40,15 @@ declare class ColumnResizingPlugin extends GridPlugin {
40
40
 
41
41
  public getConfigObject(gridOptions?: any): any;
42
42
 
43
- public disableResizing(colIndex: number, opt_disabled?: boolean): void;
43
+ public disableResizing(colIndex: number, opt_disabled?: boolean|null): void;
44
44
 
45
45
  public getDraggedColumnIndex(): number;
46
46
 
47
47
  public getDraggedAnchorX(): number;
48
48
 
49
- public setColumnWidths(cols: (number)[], width: (number)[]|number, opt_scalable?: boolean): void;
49
+ public setColumnWidths(cols: (number)[]|null, width: (number)[]|number|null, opt_scalable?: boolean|null): void;
50
50
 
51
- public setAllColumnWidths(colWidth: number, scalability?: boolean): boolean;
51
+ public setAllColumnWidths(colWidth: number, scalability?: boolean|null): boolean;
52
52
 
53
53
  public getColumnWidths(): (number)[]|null;
54
54
 
@@ -56,11 +56,11 @@ declare class ColumnResizingPlugin extends GridPlugin {
56
56
 
57
57
  public getColumnSizeStates(): (any)[]|null;
58
58
 
59
- public setColumnSizeStates(columns: (any)[]|string): void;
59
+ public setColumnSizeStates(columns: (any)[]|string|null): void;
60
60
 
61
- public enablePipeHandleMode(bool?: boolean): void;
61
+ public enablePipeHandleMode(bool?: boolean|null): void;
62
62
 
63
- public enableHandlebarMode(bool?: boolean): void;
63
+ public enableHandlebarMode(bool?: boolean|null): void;
64
64
 
65
65
  }
66
66
 
@@ -49,14 +49,6 @@ declare class DataCache extends EventDispatcher {
49
49
 
50
50
  public cloneRowData(rid: string): any;
51
51
 
52
- public addStaticFields(fields: (string)[]|null): void;
53
-
54
- public removeStaticFields(fields: (string)[]|null): void;
55
-
56
- public resetStaticFields(): void;
57
-
58
- public getStaticFields(): { [key: string]: number }|null;
59
-
60
52
  public dump(options?: any): (any)[];
61
53
 
62
54
  public log(opt_options?: any): void;
@@ -6,6 +6,8 @@ declare namespace FieldDefinition {
6
6
 
7
7
  function set(field: string, def: any): void;
8
8
 
9
+ function resetAll(): void;
10
+
9
11
  function get(field: string): any;
10
12
 
11
13
  function getFieldInfo(field: string): any;
@@ -245,7 +245,7 @@ declare class Grid extends EventDispatcher {
245
245
 
246
246
  public hasHiddenRow(): boolean;
247
247
 
248
- public setRic(rowRef: Grid.RowReference|null, str: string, options?: RowDefinition.Options|null): void;
248
+ public setRic(rowRef: Grid.RowReference|null, str: string, options?: RowDefinition.Options|null): RowDefinition|null;
249
249
 
250
250
  public unlinkChain(rowRef: Grid.RowReference|null): void;
251
251
 
@@ -56,12 +56,14 @@ declare class RowDefinition {
56
56
 
57
57
  public getData(field: string): any;
58
58
 
59
- public setStaticRowData(data: { [key: string]: any }|any[], opt_fields?: (string)[]|null): void;
60
-
61
- public updateRowData(data: { [key: string]: any }|any[], opt_fields?: (string)[]|null): void;
59
+ public setStaticRowData(data: { [key: string]: any }|any[], indexToFieldMap?: (string)[]|null): void;
62
60
 
63
61
  public setStaticData(field: string, value: any): void;
64
62
 
63
+ public updateRowData(data: { [key: string]: any }|any[], indexToFieldMap?: (string)[]|null): void;
64
+
65
+ public copyRowData(srcRowDef: RowDefinition|null): void;
66
+
65
67
  public setRowData(data: { [key: string]: any }): void;
66
68
 
67
69
  public setData(field: string, value: any): void;
package/lib/versions.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
- "tr-grid-util": "1.3.151",
3
- "tr-grid-printer": "1.0.17",
2
+ "tr-grid-util": "1.3.152",
3
+ "tr-grid-printer": "1.0.18",
4
4
  "@grid/column-dragging": "1.0.20",
5
5
  "@grid/row-segmenting": "1.0.31",
6
6
  "@grid/statistics-row": "1.0.17",
@@ -8,10 +8,10 @@
8
8
  "tr-grid-auto-tooltip": "1.1.6",
9
9
  "tr-grid-cell-selection": "1.0.38",
10
10
  "tr-grid-checkbox": "1.0.67",
11
- "tr-grid-column-fitter": "1.0.40",
11
+ "tr-grid-column-fitter": "1.0.41",
12
12
  "tr-grid-column-formatting": "0.9.36",
13
13
  "tr-grid-column-grouping": "1.0.61",
14
- "tr-grid-column-resizing": "1.0.28",
14
+ "tr-grid-column-resizing": "1.0.29",
15
15
  "tr-grid-column-selection": "1.0.33",
16
16
  "tr-grid-column-stack": "1.0.75",
17
17
  "tr-grid-conditional-coloring": "1.0.70",
@@ -25,12 +25,12 @@
25
25
  "tr-grid-range-bar": "2.0.8",
26
26
  "tr-grid-row-dragging": "1.0.35",
27
27
  "tr-grid-row-filtering": "1.0.76",
28
- "tr-grid-row-grouping": "1.0.87",
28
+ "tr-grid-row-grouping": "1.0.88",
29
29
  "tr-grid-row-selection": "1.0.30",
30
30
  "tr-grid-rowcoloring": "1.0.25",
31
31
  "tr-grid-textformatting": "1.0.48",
32
32
  "tr-grid-titlewrap": "1.0.22",
33
- "@grid/formatters": "1.0.52",
33
+ "@grid/formatters": "1.0.53",
34
34
  "@grid/column-selection-dialog": "4.0.57",
35
35
  "@grid/filter-dialog": "4.0.64",
36
36
  "@grid/column-format-dialog": "4.0.45"
package/package.json CHANGED
@@ -67,5 +67,5 @@
67
67
  "publishConfig": {
68
68
  "access": "public"
69
69
  },
70
- "version": "6.0.104"
70
+ "version": "6.0.106"
71
71
  }