@refinitiv-ui/efx-grid 6.0.30 → 6.0.31
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/core/dist/core.js +20 -2
- package/lib/core/dist/core.min.js +1 -1
- package/lib/core/es6/grid/Core.js +1 -1
- package/lib/core/es6/grid/components/Scrollbar.js +19 -1
- package/lib/filter-dialog/lib/filter-dialog.js +11 -8
- package/lib/filter-dialog/themes/base.less +7 -3
- package/lib/filter-dialog/themes/elemental/dark/es5/all-elements.js +1 -1
- package/lib/filter-dialog/themes/elemental/dark/filter-dialog.js +1 -1
- package/lib/filter-dialog/themes/elemental/light/es5/all-elements.js +1 -1
- package/lib/filter-dialog/themes/elemental/light/filter-dialog.js +1 -1
- package/lib/filter-dialog/themes/halo/dark/es5/all-elements.js +1 -1
- package/lib/filter-dialog/themes/halo/dark/filter-dialog.js +1 -1
- package/lib/filter-dialog/themes/halo/light/es5/all-elements.js +1 -1
- package/lib/filter-dialog/themes/halo/light/filter-dialog.js +1 -1
- package/lib/filter-dialog/themes/solar/charcoal/es5/all-elements.js +1 -1
- package/lib/filter-dialog/themes/solar/charcoal/filter-dialog.js +1 -1
- package/lib/filter-dialog/themes/solar/pearl/es5/all-elements.js +1 -1
- package/lib/filter-dialog/themes/solar/pearl/filter-dialog.js +1 -1
- package/lib/grid/index.js +1 -1
- package/lib/tr-grid-content-wrap/es6/ContentWrap.d.ts +4 -4
- package/lib/tr-grid-content-wrap/es6/ContentWrap.js +116 -70
- package/lib/tr-grid-util/es6/DragUI.d.ts +2 -0
- package/lib/tr-grid-util/es6/DragUI.js +39 -9
- package/lib/tr-grid-util/es6/Popup.d.ts +3 -1
- package/lib/tr-grid-util/es6/Popup.js +57 -23
- package/lib/types/es6/ContentWrap.d.ts +4 -4
- package/lib/types/es6/RealtimeGrid/ColumnDefinition.d.ts +2 -0
- package/lib/types/es6/RealtimeGrid/FieldDefinition.d.ts +4 -0
- package/lib/types/es6/RealtimeGrid/Grid.d.ts +1 -0
- package/lib/versions.json +3 -3
- package/package.json +1 -1
@@ -17,7 +17,7 @@ import { GridPlugin } from '../../tr-grid-util/es6/GridPlugin.js';
|
|
17
17
|
var ContentWrapPlugin = function ContentWrapPlugin() {
|
18
18
|
this._onColumnAdded = this._onColumnAdded.bind(this);
|
19
19
|
this._onRecalculation = this._onRecalculation.bind(this);
|
20
|
-
this.
|
20
|
+
this._requestRecalculation = this._requestRecalculation.bind(this);
|
21
21
|
this._hosts = [];
|
22
22
|
};
|
23
23
|
|
@@ -77,10 +77,10 @@ ContentWrapPlugin.prototype.initialize = function (host, options) {
|
|
77
77
|
|
78
78
|
this._hosts.push(host);
|
79
79
|
|
80
|
-
window.addEventListener("load", this.
|
80
|
+
window.addEventListener("load", this._requestRecalculation); // Since CSS can impact font, we need adjust accordingly
|
81
81
|
|
82
|
-
host.listen("widthChanged", this.
|
83
|
-
host.listen("postSectionDataBinding", this.
|
82
|
+
host.listen("widthChanged", this._requestRecalculation);
|
83
|
+
host.listen("postSectionDataBinding", this._requestRecalculation); // In case of lazy loading
|
84
84
|
|
85
85
|
this.config(options);
|
86
86
|
host.listen("columnAdded", this._onColumnAdded);
|
@@ -99,11 +99,13 @@ ContentWrapPlugin.prototype.unload = function (host) {
|
|
99
99
|
|
100
100
|
this._hosts.splice(at, 1);
|
101
101
|
|
102
|
-
window.removeEventListener("load", this.
|
103
|
-
host.unlisten("widthChanged", this.
|
104
|
-
host.unlisten("postSectionDataBinding", this.
|
102
|
+
window.removeEventListener("load", this._requestRecalculation);
|
103
|
+
host.unlisten("widthChanged", this._requestRecalculation);
|
104
|
+
host.unlisten("postSectionDataBinding", this._requestRecalculation);
|
105
105
|
host.unlisten("columnAdded", this._onColumnAdded);
|
106
106
|
|
107
|
+
this._dispose();
|
108
|
+
|
107
109
|
this._clearTimer();
|
108
110
|
};
|
109
111
|
/** @public
|
@@ -182,7 +184,7 @@ ContentWrapPlugin.prototype.getConfigObject = function (gridOptions) {
|
|
182
184
|
|
183
185
|
|
184
186
|
ContentWrapPlugin.prototype.adjustRowHeight = function (sectionRef, from, to) {
|
185
|
-
if (this._adjusting || this._hosts.length
|
187
|
+
if (this._adjusting || !this._hosts.length) {
|
186
188
|
return false; // Quite if grid has not been registered or in the process of adjusting row height
|
187
189
|
}
|
188
190
|
|
@@ -198,17 +200,30 @@ ContentWrapPlugin.prototype.adjustRowHeight = function (sectionRef, from, to) {
|
|
198
200
|
return false;
|
199
201
|
}
|
200
202
|
|
203
|
+
var sectionElem = section.getElement();
|
204
|
+
|
205
|
+
if (!sectionElem || !sectionElem.offsetParent) {
|
206
|
+
return false;
|
207
|
+
}
|
208
|
+
|
201
209
|
this._adjusting = true; // Prevent infinite loop
|
202
210
|
|
203
211
|
var dirtyRows = []; // Collect dirty rows
|
204
212
|
|
205
|
-
var
|
213
|
+
var maxHeight = NaN;
|
214
|
+
var heights = null;
|
206
215
|
|
216
|
+
if (this._evenRowHeight) {
|
217
|
+
maxHeight = this._calcMaxRowHeight(section, dirtyRows, from, to);
|
218
|
+
} else {
|
219
|
+
heights = this._calcRowHeights(section, dirtyRows, from, to);
|
220
|
+
} // Setting row height for multiple rows can cause performance issue
|
207
221
|
|
208
|
-
|
222
|
+
|
223
|
+
var dirtyCount = dirtyRows.length;
|
209
224
|
var prevFState = false;
|
210
225
|
|
211
|
-
if (
|
226
|
+
if (dirtyCount > this._freezingThreshold) {
|
212
227
|
if (section.getFrozenLayout) {
|
213
228
|
prevFState = section.getFrozenLayout();
|
214
229
|
section.setFrozenLayout(true);
|
@@ -219,29 +234,25 @@ ContentWrapPlugin.prototype.adjustRowHeight = function (sectionRef, from, to) {
|
|
219
234
|
var r, rowIndex;
|
220
235
|
|
221
236
|
if (this._evenRowHeight) {
|
222
|
-
|
223
|
-
|
224
|
-
for (r = 0; r < rowCount; ++r) {
|
237
|
+
for (r = 0; r < dirtyCount; ++r) {
|
225
238
|
rowIndex = dirtyRows[r];
|
226
|
-
section.setRowHeight(rowIndex,
|
239
|
+
section.setRowHeight(rowIndex, maxHeight);
|
227
240
|
}
|
228
241
|
} else {
|
229
|
-
|
230
|
-
|
231
|
-
for (r = 0; r < rowCount; ++r) {
|
242
|
+
for (r = 0; r < dirtyCount; ++r) {
|
232
243
|
rowIndex = dirtyRows[r];
|
233
244
|
section.setRowHeight(rowIndex, heights[rowIndex]);
|
234
245
|
}
|
235
246
|
}
|
236
247
|
|
237
|
-
if (
|
248
|
+
if (dirtyCount > this._freezingThreshold) {
|
238
249
|
if (section.setFrozenLayout) {
|
239
250
|
section.setFrozenLayout(prevFState);
|
240
251
|
}
|
241
252
|
}
|
242
253
|
|
243
254
|
this._adjusting = false;
|
244
|
-
return
|
255
|
+
return dirtyCount ? true : false;
|
245
256
|
};
|
246
257
|
/** @public
|
247
258
|
* @param {Object} sectionRef core grid SectionReference object
|
@@ -300,8 +311,8 @@ ContentWrapPlugin.prototype._setColumnContentWrapping = function (colIndex, colu
|
|
300
311
|
/** @private */
|
301
312
|
|
302
313
|
|
303
|
-
ContentWrapPlugin.prototype.
|
304
|
-
if (!this._recalTimer) {
|
314
|
+
ContentWrapPlugin.prototype._requestRecalculation = function () {
|
315
|
+
if (!this._recalTimer && !this._adjusting) {
|
305
316
|
this._recalTimer = setTimeout(this._onRecalculation, 100);
|
306
317
|
}
|
307
318
|
};
|
@@ -328,7 +339,7 @@ ContentWrapPlugin.prototype._clearTimer = function () {
|
|
328
339
|
|
329
340
|
|
330
341
|
ContentWrapPlugin.prototype._getSteppingHeight = function (height) {
|
331
|
-
return Math.
|
342
|
+
return Math.ceil(height) + 14; // Add top and bottom padding
|
332
343
|
};
|
333
344
|
/** @private
|
334
345
|
* @param {Object} section ILayoutGrid
|
@@ -343,25 +354,31 @@ ContentWrapPlugin.prototype._calculateRowHeightAt = function (section, rowIndex)
|
|
343
354
|
var colCount = section.getColumnCount();
|
344
355
|
|
345
356
|
for (var c = 0; c < colCount; ++c) {
|
346
|
-
if (this.isWrappingContent(c)) {
|
347
|
-
|
357
|
+
if (!this.isWrappingContent(c)) {
|
358
|
+
continue;
|
359
|
+
}
|
348
360
|
|
349
|
-
|
350
|
-
var cellContent = cell.getContent();
|
361
|
+
var cell = section.getCell(c, rowIndex, false); // TODO: Handle cell spanning
|
351
362
|
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
return NaN;
|
356
|
-
}
|
363
|
+
if (!cell || !cell.isVisible()) {
|
364
|
+
continue;
|
365
|
+
}
|
357
366
|
|
358
|
-
|
367
|
+
var cellContent = cell.getContent();
|
359
368
|
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
369
|
+
if (!cellContent) {
|
370
|
+
continue;
|
371
|
+
}
|
372
|
+
|
373
|
+
if (!cellContent.offsetParent) {
|
374
|
+
// Cell content is not in the document, so the height cannot be calculated
|
375
|
+
continue;
|
376
|
+
}
|
377
|
+
|
378
|
+
var contentHeight = this._getSteppingHeight(cellContent.offsetHeight);
|
379
|
+
|
380
|
+
if (contentHeight > maxHeight) {
|
381
|
+
maxHeight = contentHeight;
|
365
382
|
}
|
366
383
|
}
|
367
384
|
|
@@ -369,61 +386,90 @@ ContentWrapPlugin.prototype._calculateRowHeightAt = function (section, rowIndex)
|
|
369
386
|
};
|
370
387
|
/** @private
|
371
388
|
* @param {Object} section ILayoutGrid
|
389
|
+
* @param {!Array.<number>} dirtyRows
|
372
390
|
* @param {number=} from
|
373
391
|
* @param {number=} to
|
374
|
-
* @
|
375
|
-
* @return {!Object}
|
392
|
+
* @return {number}
|
376
393
|
*/
|
377
394
|
|
378
395
|
|
379
|
-
ContentWrapPlugin.prototype.
|
380
|
-
if (
|
396
|
+
ContentWrapPlugin.prototype._calcMaxRowHeight = function (section, dirtyRows, from, to) {
|
397
|
+
if (from == null) {
|
398
|
+
from = section.getFirstIndexInView();
|
399
|
+
} else if (!from || from < 0) {
|
381
400
|
from = 0;
|
382
401
|
}
|
383
402
|
|
384
|
-
|
403
|
+
if (to == null) {
|
404
|
+
to = section.getLastIndexInView() + 1;
|
405
|
+
} else {
|
406
|
+
var rowCount = section.getRowCount();
|
385
407
|
|
386
|
-
|
387
|
-
|
408
|
+
if (!to || to > rowCount) {
|
409
|
+
to = rowCount;
|
410
|
+
}
|
388
411
|
}
|
389
412
|
|
390
|
-
var r
|
391
|
-
var
|
413
|
+
var r;
|
414
|
+
var max = 0;
|
392
415
|
|
393
|
-
|
394
|
-
var
|
395
|
-
|
396
|
-
for (r = from; r < to; ++r) {
|
397
|
-
h = this._calculateRowHeightAt(section, r);
|
416
|
+
for (r = from; r < to; ++r) {
|
417
|
+
var h = this._calculateRowHeightAt(section, r);
|
398
418
|
|
399
|
-
|
400
|
-
|
401
|
-
}
|
419
|
+
if (max < h) {
|
420
|
+
max = h;
|
402
421
|
}
|
422
|
+
}
|
403
423
|
|
404
|
-
|
405
|
-
|
424
|
+
if (max) {
|
406
425
|
for (r = from; r < to; ++r) {
|
407
|
-
if (max
|
408
|
-
|
426
|
+
if (max !== section.getRowHeight(r)) {
|
427
|
+
dirtyRows.push(r);
|
409
428
|
}
|
410
429
|
}
|
411
|
-
}
|
412
|
-
var heights = new Array(to);
|
430
|
+
}
|
413
431
|
|
414
|
-
|
415
|
-
|
416
|
-
|
432
|
+
return max;
|
433
|
+
};
|
434
|
+
/** @private
|
435
|
+
* @param {Object} section ILayoutGrid
|
436
|
+
* @param {!Array.<number>} dirtyRows
|
437
|
+
* @param {number=} from
|
438
|
+
* @param {number=} to
|
439
|
+
* @return {!Array.<number>}
|
440
|
+
*/
|
417
441
|
|
418
|
-
|
419
|
-
|
420
|
-
|
442
|
+
|
443
|
+
ContentWrapPlugin.prototype._calcRowHeights = function (section, dirtyRows, from, to) {
|
444
|
+
if (from == null) {
|
445
|
+
from = section.getFirstIndexInView();
|
446
|
+
} else if (!from || from < 0) {
|
447
|
+
from = 0;
|
448
|
+
}
|
449
|
+
|
450
|
+
if (to == null) {
|
451
|
+
to = section.getLastIndexInView() + 1;
|
452
|
+
} else {
|
453
|
+
var rowCount = section.getRowCount();
|
454
|
+
|
455
|
+
if (!to || to > rowCount) {
|
456
|
+
to = rowCount;
|
421
457
|
}
|
458
|
+
}
|
459
|
+
|
460
|
+
var heights = new Array(to);
|
422
461
|
|
423
|
-
|
462
|
+
for (var r = from; r < to; ++r) {
|
463
|
+
var h = this._calculateRowHeightAt(section, r);
|
464
|
+
|
465
|
+
heights[r] = h;
|
466
|
+
|
467
|
+
if (h && h !== section.getRowHeight(r)) {
|
468
|
+
dirtyRows.push(r);
|
469
|
+
}
|
424
470
|
}
|
425
471
|
|
426
|
-
return
|
472
|
+
return heights;
|
427
473
|
};
|
428
474
|
/** @private
|
429
475
|
* @param {number} colIndex
|
@@ -434,7 +480,7 @@ ContentWrapPlugin.prototype._calculateRowHeight = function (section, from, to, o
|
|
434
480
|
ContentWrapPlugin.prototype._wrapContent = function (colIndex, bool) {
|
435
481
|
this._hosts[0].enableColumnClass(colIndex, "wrap", bool, "content");
|
436
482
|
|
437
|
-
this.
|
483
|
+
this._requestRecalculation();
|
438
484
|
};
|
439
485
|
/** @public
|
440
486
|
* @param {number} colIndex
|
@@ -9,7 +9,9 @@ import ElfUtil from "./ElfUtil.js";
|
|
9
9
|
var DragUI = function(options) {
|
10
10
|
this._dragBox = options.dragBox;
|
11
11
|
this._dragBoxIcon = options.dragBoxIcon;
|
12
|
-
|
12
|
+
this._dragBoxContent = document.createElement("div");
|
13
|
+
this._dragBoxContent.className = "drag-box-content";
|
14
|
+
this._dragBox.appendChild(this._dragBoxContent);
|
13
15
|
};
|
14
16
|
|
15
17
|
/** @type {string}
|
@@ -60,6 +62,10 @@ DragUI.applyThemeColor = function(grid) {
|
|
60
62
|
*/
|
61
63
|
DragUI.prototype.onThemeLoaded = function(colors) {
|
62
64
|
if(!DragUI._styles) {
|
65
|
+
var cursor = "grabbing";
|
66
|
+
if (ElfUtil.getElfVersion() < 3) {
|
67
|
+
cursor = "move";
|
68
|
+
}
|
63
69
|
var styles = [ // Main Styles without theme
|
64
70
|
".tr-row-guideline", [ // Backward compatability of row dragging
|
65
71
|
"position: absolute;",
|
@@ -104,6 +110,10 @@ DragUI.prototype.onThemeLoaded = function(colors) {
|
|
104
110
|
"top: 0;",
|
105
111
|
"position: absolute;"
|
106
112
|
],
|
113
|
+
".drag-box-content", [
|
114
|
+
"overflow-x: clip;",
|
115
|
+
"text-overflow: ellipsis;"
|
116
|
+
],
|
107
117
|
".drag-box-icon", [
|
108
118
|
"top: -4px;",
|
109
119
|
"left: 12px;",
|
@@ -128,7 +138,7 @@ DragUI.prototype.onThemeLoaded = function(colors) {
|
|
128
138
|
"--grid-void-icon-color: #FFFFFF;"
|
129
139
|
],
|
130
140
|
".mouse-dragging .cell:hover", [ // for change mouse cursor when hover header while dragging
|
131
|
-
"cursor:
|
141
|
+
"cursor: " + cursor + " !important;"
|
132
142
|
],
|
133
143
|
".tr-grid .column .cell.drag-indicator", [ // --grid-drag-indicator defualt is "none"
|
134
144
|
"border-top: var(--grid-drag-indicator) !important;",
|
@@ -175,27 +185,31 @@ DragUI.prototype.renderDragBox = function (e, grid) {
|
|
175
185
|
}
|
176
186
|
|
177
187
|
var gridElem = grid.getElement();
|
188
|
+
var dragBoxHost = gridElem;
|
178
189
|
var gridParent = grid.getParent().parentNode;
|
179
|
-
|
180
|
-
|
181
|
-
gridParent.appendChild(this._dragBox);
|
190
|
+
if (gridParent.nodeType === 11) {
|
191
|
+
dragBoxHost = gridParent;
|
182
192
|
}
|
183
193
|
|
184
|
-
var
|
194
|
+
var parent = this._dragBox.parentNode;
|
195
|
+
if(!parent) {
|
196
|
+
dragBoxHost.appendChild(this._dragBox);
|
197
|
+
}
|
185
198
|
|
186
|
-
var dragBoxIcon = e.dragBoxIcon || this._dragBox.dragBoxIcon;
|
199
|
+
var dragBoxIcon = e.dragBoxIcon || this._dragBox.dragBoxIcon; // The user-supplied icon
|
187
200
|
this._dragBoxIcon.style.visibility = "visible";
|
201
|
+
parent = this._dragBoxIcon.parentNode;
|
188
202
|
var drop = true;
|
189
203
|
if(dragBoxIcon === "insertion") {
|
190
204
|
drop = false;
|
191
205
|
this._dragBoxIcon.icon = "add";
|
192
|
-
if(!
|
206
|
+
if(!parent) {
|
193
207
|
this._dragBox.appendChild(this._dragBoxIcon);
|
194
208
|
}
|
195
209
|
} else if (dragBoxIcon === "not-allowed" || dragBoxIcon === "no-drop" || dragBoxIcon === "void" ) {
|
196
210
|
drop = false;
|
197
211
|
this._dragBoxIcon.icon = "void";
|
198
|
-
if(!
|
212
|
+
if(!parent) {
|
199
213
|
this._dragBox.appendChild(this._dragBoxIcon);
|
200
214
|
}
|
201
215
|
} else {
|
@@ -213,5 +227,21 @@ DragUI.prototype.renderDragBox = function (e, grid) {
|
|
213
227
|
return drop;
|
214
228
|
};
|
215
229
|
|
230
|
+
/** @public
|
231
|
+
* @param {*} content Element, Node, string, number, or everything else.
|
232
|
+
*/
|
233
|
+
DragUI.prototype.setContent = function(content) {
|
234
|
+
if (content && content["getElement"]) {
|
235
|
+
content = content["getElement"]();
|
236
|
+
}
|
237
|
+
|
238
|
+
var dragBoxContent = this._dragBoxContent;
|
239
|
+
var currentContent = dragBoxContent._content;
|
240
|
+
if (content !== currentContent) {
|
241
|
+
dragBoxContent._content = content;
|
242
|
+
Dom.setContent(dragBoxContent, content);
|
243
|
+
}
|
244
|
+
};
|
245
|
+
|
216
246
|
export default DragUI;
|
217
247
|
export {DragUI};
|
@@ -69,11 +69,13 @@ declare class Popup extends EventDispatcher {
|
|
69
69
|
|
70
70
|
public disableAutoHiding(opt_disabled?: boolean|null): void;
|
71
71
|
|
72
|
+
public disableAutoRepositioning(opt_disabled?: boolean|null): void;
|
73
|
+
|
72
74
|
public disableAutoClipping(opt_disabled?: boolean|null): void;
|
73
75
|
|
74
76
|
public disableHideOnScroll(opt_disabled?: boolean|null): void;
|
75
77
|
|
76
|
-
public updatePosition(): void;
|
78
|
+
public updatePosition(fallback?: boolean|null): void;
|
77
79
|
|
78
80
|
public enableUIBlocking(bool?: boolean|null): boolean;
|
79
81
|
|
@@ -221,6 +221,10 @@ Popup.prototype._uiBlocking = false;
|
|
221
221
|
* @private
|
222
222
|
*/
|
223
223
|
Popup.prototype._hideOnScroll = true;
|
224
|
+
/** @type {boolean}
|
225
|
+
* @private
|
226
|
+
*/
|
227
|
+
Popup.prototype._autoRepositioning = true;
|
224
228
|
|
225
229
|
/** @public */
|
226
230
|
Popup.prototype.dispose = function () {
|
@@ -303,6 +307,10 @@ Popup.prototype.init = function (options) {
|
|
303
307
|
this._hideOnScroll = false;
|
304
308
|
}
|
305
309
|
|
310
|
+
if (options["autoRepositioning"] == false) {
|
311
|
+
this._autoRepositioning = false;
|
312
|
+
}
|
313
|
+
|
306
314
|
this.addListener(options, "show");
|
307
315
|
this.addListener(options, "hide");
|
308
316
|
this.addListener(options, "shown");
|
@@ -573,6 +581,15 @@ Popup.prototype.disableAutoHiding = function (opt_disabled) {
|
|
573
581
|
/** @public
|
574
582
|
* @param {boolean=} opt_disabled
|
575
583
|
*/
|
584
|
+
Popup.prototype.disableAutoRepositioning = function (opt_disabled) {
|
585
|
+
var autoRepositioning = (opt_disabled === false);
|
586
|
+
if (this._autoRepositioning !== autoRepositioning) {
|
587
|
+
this._autoRepositioning = autoRepositioning;
|
588
|
+
}
|
589
|
+
};
|
590
|
+
/** @public
|
591
|
+
* @param {boolean=} opt_disabled
|
592
|
+
*/
|
576
593
|
Popup.prototype.disableAutoClipping = function (opt_disabled) {
|
577
594
|
var autoClipping = (opt_disabled === false);
|
578
595
|
if (this._autoClipping !== autoClipping) {
|
@@ -592,8 +609,12 @@ Popup.prototype.disableHideOnScroll = function (opt_disabled) {
|
|
592
609
|
|
593
610
|
/** @public
|
594
611
|
* @fires Popup#positioning
|
612
|
+
* @param {boolean=} fallback=true
|
595
613
|
*/
|
596
|
-
Popup.prototype.updatePosition = function () {
|
614
|
+
Popup.prototype.updatePosition = function (fallback) {
|
615
|
+
if(fallback == null){
|
616
|
+
fallback = true;
|
617
|
+
}
|
597
618
|
var t = this;
|
598
619
|
t._resizeTimer = 0;
|
599
620
|
|
@@ -630,34 +651,48 @@ Popup.prototype.updatePosition = function () {
|
|
630
651
|
if (t._positioning == "right") {
|
631
652
|
x = px + aw + this._gap;
|
632
653
|
y = py;
|
633
|
-
// Re-position, if the popup exceeds the bounds
|
634
|
-
if ((x + ew > rb) && (px - ew > sx)) {
|
635
|
-
x = px - ew - this._gap;
|
636
|
-
}
|
637
|
-
if ((y + eh > bb) && (py + ah - eh > sy)) {
|
638
|
-
y = py + ah - eh;
|
639
|
-
}
|
640
654
|
} else if (t._positioning == "over") {
|
641
655
|
x = px;
|
642
656
|
y = py;
|
643
|
-
// Re-position, if the popup exceeds the bounds
|
644
|
-
if ((x + ew > rb) && (px + aw - ew > sx)) {
|
645
|
-
x = px + aw - ew;
|
646
|
-
}
|
647
|
-
if ((y + eh > bb) && (py + aw - eh > sy)) {
|
648
|
-
y = py + aw - eh;
|
649
|
-
}
|
650
657
|
} else { // under, bottom, or etc.
|
651
658
|
x = px;
|
652
659
|
y = py + ah;
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
if (
|
658
|
-
|
660
|
+
}
|
661
|
+
|
662
|
+
if(fallback){
|
663
|
+
// Re-position for each type of positioning, if the popup exceeds the bounds
|
664
|
+
if (t._positioning == "right") {
|
665
|
+
if ((x + ew > rb) && (px - ew > sx)) {
|
666
|
+
x = px - ew - this._gap;
|
667
|
+
}
|
668
|
+
if ((y + eh > bb) && (py + ah - eh > sy)) {
|
669
|
+
y = py + ah - eh;
|
670
|
+
}
|
671
|
+
} else if (t._positioning == "over") {
|
672
|
+
if ((x + ew > rb) && (px + aw - ew > sx)) {
|
673
|
+
x = px + aw - ew;
|
674
|
+
}
|
675
|
+
if ((y + eh > bb) && (py + aw - eh > sy)) {
|
676
|
+
y = py + aw - eh;
|
677
|
+
}
|
678
|
+
} else { // under, bottom, or etc.
|
679
|
+
if ((x + ew > rb) && (px + aw - ew > sx)) {
|
680
|
+
x = px + aw - ew;
|
681
|
+
}
|
682
|
+
if (y + eh > bb) {
|
683
|
+
// If popup is exceeded bottom bound
|
684
|
+
if(py - eh > sy){
|
685
|
+
y = py - eh; // move popup to top of attached element, if it has enough space
|
686
|
+
} else {
|
687
|
+
y = y - (y + eh - bb); // shift the popup up to make everything in popup visible
|
688
|
+
if(y < 0){
|
689
|
+
y = 0; // popup should not shift beyond top bound
|
690
|
+
}
|
691
|
+
}
|
692
|
+
}
|
659
693
|
}
|
660
694
|
}
|
695
|
+
|
661
696
|
if (t._autoClipping) { // Last resort of positioning
|
662
697
|
if (x + ew > rb) {
|
663
698
|
if (t._origW == null) {
|
@@ -685,7 +720,6 @@ Popup.prototype.updatePosition = function () {
|
|
685
720
|
t._dispatch(evtType, t._evtArg);
|
686
721
|
};
|
687
722
|
|
688
|
-
|
689
723
|
/** @public
|
690
724
|
* @param {boolean=} bool
|
691
725
|
* @return {boolean} previous uiBlocking state
|
@@ -759,7 +793,7 @@ Popup.prototype._onBlurTimer = function () {
|
|
759
793
|
* @fires Popup#positioning
|
760
794
|
*/
|
761
795
|
Popup.prototype._onResize = function () {
|
762
|
-
if (!this._resizeTimer && this._inDoc) {
|
796
|
+
if (!this._resizeTimer && this._inDoc && this._autoRepositioning) {
|
763
797
|
this._resizeTimer = setTimeout(this.updatePosition, 50);
|
764
798
|
}
|
765
799
|
};
|
@@ -4,11 +4,11 @@ import { GridPlugin } from '../../tr-grid-util/es6/GridPlugin.js';
|
|
4
4
|
declare namespace ContentWrapPlugin {
|
5
5
|
|
6
6
|
type Options = {
|
7
|
-
evenRowHeight?: boolean
|
7
|
+
evenRowHeight?: boolean|null
|
8
8
|
};
|
9
9
|
|
10
10
|
type ColumnOptions = {
|
11
|
-
contentWrap?: boolean
|
11
|
+
contentWrap?: boolean|null
|
12
12
|
};
|
13
13
|
|
14
14
|
}
|
@@ -29,11 +29,11 @@ declare class ContentWrapPlugin extends GridPlugin {
|
|
29
29
|
|
30
30
|
public getConfigObject(gridOptions?: any): any;
|
31
31
|
|
32
|
-
public adjustRowHeight(sectionRef: any, from?: number, to?: number): boolean;
|
32
|
+
public adjustRowHeight(sectionRef: any, from?: number|null, to?: number|null): boolean;
|
33
33
|
|
34
34
|
public adjustRowHeightAt(sectionRef: any, rowIndex: number): boolean;
|
35
35
|
|
36
|
-
public enableContentWrapping(colIndex: number, bool?: boolean): void;
|
36
|
+
public enableContentWrapping(colIndex: number, bool?: boolean|null): void;
|
37
37
|
|
38
38
|
public isWrappingContent(colIndex: number): boolean;
|
39
39
|
|
@@ -20,12 +20,16 @@ declare namespace FieldDefinition {
|
|
20
20
|
|
21
21
|
function setFieldCaching(caching: boolean): void;
|
22
22
|
|
23
|
+
function disableTimeSeriesExpansion(disabled: boolean): void;
|
24
|
+
|
23
25
|
function isFormula(field: string): boolean;
|
24
26
|
|
25
27
|
function isAdc(field: string): boolean;
|
26
28
|
|
27
29
|
function isRealTimeField(field: string): boolean;
|
28
30
|
|
31
|
+
function isTimeSeriesChild(field: string): boolean;
|
32
|
+
|
29
33
|
function isTimeSeries(field: string): boolean;
|
30
34
|
|
31
35
|
}
|
package/lib/versions.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
{
|
2
|
-
"tr-grid-util": "1.3.
|
2
|
+
"tr-grid-util": "1.3.92",
|
3
3
|
"@grid/column-dragging": "1.0.11",
|
4
4
|
"@grid/row-segmenting": "1.0.23",
|
5
5
|
"@grid/statistics-row": "1.0.13",
|
@@ -14,7 +14,7 @@
|
|
14
14
|
"tr-grid-column-selection": "1.0.26",
|
15
15
|
"tr-grid-column-stack": "1.0.54",
|
16
16
|
"tr-grid-conditional-coloring": "1.0.58",
|
17
|
-
"tr-grid-content-wrap": "1.0.
|
17
|
+
"tr-grid-content-wrap": "1.0.20",
|
18
18
|
"tr-grid-contextmenu": "1.0.38",
|
19
19
|
"tr-grid-filter-input": "0.9.31",
|
20
20
|
"tr-grid-heat-map": "1.0.28",
|
@@ -32,6 +32,6 @@
|
|
32
32
|
"tr-grid-titlewrap": "1.0.19",
|
33
33
|
"@grid/formatters": "1.0.49",
|
34
34
|
"@grid/column-selection-dialog": "4.0.46",
|
35
|
-
"@grid/filter-dialog": "4.0.
|
35
|
+
"@grid/filter-dialog": "4.0.57",
|
36
36
|
"@grid/column-format-dialog": "4.0.43"
|
37
37
|
}
|
package/package.json
CHANGED