@refinitiv-ui/efx-grid 6.0.108 → 6.0.109
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/core/dist/core.js +3 -27
- package/lib/core/dist/core.min.js +1 -1
- package/lib/core/es6/grid/Core.js +3 -27
- package/lib/grid/index.js +1 -1
- package/lib/grid/lib/efx-grid.js +32 -10
- package/lib/rt-grid/dist/rt-grid.js +286 -149
- package/lib/rt-grid/dist/rt-grid.min.js +1 -1
- package/lib/rt-grid/es6/Grid.js +126 -90
- package/lib/tr-grid-filter-input/es6/FilterInput.d.ts +2 -0
- package/lib/tr-grid-filter-input/es6/FilterInput.js +19 -0
- package/lib/tr-grid-row-filtering/es6/RowFiltering.d.ts +4 -0
- package/lib/tr-grid-row-filtering/es6/RowFiltering.js +36 -1
- package/lib/types/es6/FilterInput.d.ts +2 -0
- package/lib/types/es6/RowFiltering.d.ts +4 -0
- package/lib/versions.json +2 -2
- package/package.json +1 -1
@@ -127,7 +127,6 @@ let Core = function (opt_initializer) {
|
|
127
127
|
_t._onRowHightlighted = _t._onRowHightlighted.bind(_t);
|
128
128
|
_t._onGridClicked = _t._onGridClicked.bind(_t);
|
129
129
|
_t._onKeyDown = _t._onKeyDown.bind(_t);
|
130
|
-
_t._onKeyUp = _t._onKeyUp.bind(_t);
|
131
130
|
|
132
131
|
_t._onWindowResize = _t._onWindowResize.bind(_t);
|
133
132
|
_t._onSectionDataChanged = _t._onSectionDataChanged.bind(_t);
|
@@ -215,7 +214,6 @@ let Core = function (opt_initializer) {
|
|
215
214
|
|
216
215
|
|
217
216
|
_t._element.addEventListener("keydown", _t._onKeyDown);
|
218
|
-
_t._element.addEventListener("keyup", _t._onKeyUp);
|
219
217
|
if (Util.isMobile || Util.isTouchDevice) {
|
220
218
|
_t._element.addEventListener("touchmove", _t._onMouseMove, false);
|
221
219
|
} else {
|
@@ -622,7 +620,7 @@ Core.prototype._hasPendingRowChange = false;
|
|
622
620
|
* @return {string}
|
623
621
|
*/
|
624
622
|
Core.getVersion = function () {
|
625
|
-
return "5.1.
|
623
|
+
return "5.1.111";
|
626
624
|
};
|
627
625
|
/** {@link ElementWrapper#dispose}
|
628
626
|
* @override
|
@@ -5463,31 +5461,9 @@ Core.prototype._onKeyDown = function (e) {
|
|
5463
5461
|
|
5464
5462
|
if(onTheEdge && !e.defaultPrevented) {
|
5465
5463
|
if(onTheEdge > 0 && e.shiftKey) {
|
5466
|
-
this._firstHiddenInput.focus(); // jump to the top
|
5467
|
-
e.preventDefault();
|
5464
|
+
this._firstHiddenInput.focus(); // jump to the top and move out of grid
|
5468
5465
|
} else if(onTheEdge < 0 && !e.shiftKey) {
|
5469
|
-
this._lastHiddenInput.focus(); // skip to the end
|
5470
|
-
e.preventDefault();
|
5471
|
-
}
|
5472
|
-
}
|
5473
|
-
};
|
5474
|
-
/** @private
|
5475
|
-
* @param {Object} e
|
5476
|
-
*/
|
5477
|
-
Core.prototype._onKeyUp = function (e) {
|
5478
|
-
if(!_isTabCommand(e)) {
|
5479
|
-
return;
|
5480
|
-
}
|
5481
|
-
var activeElem = _getActiveElement(this._element);
|
5482
|
-
if(e.shiftKey) {
|
5483
|
-
if(activeElem === this._lastHiddenInput) {
|
5484
|
-
this._firstHiddenInput.focus();
|
5485
|
-
e.preventDefault();
|
5486
|
-
}
|
5487
|
-
} else {
|
5488
|
-
if(activeElem === this._firstHiddenInput) {
|
5489
|
-
this._lastHiddenInput.focus();
|
5490
|
-
e.preventDefault();
|
5466
|
+
this._lastHiddenInput.focus(); // skip to the end and move out of grid
|
5491
5467
|
}
|
5492
5468
|
}
|
5493
5469
|
};
|
package/lib/grid/index.js
CHANGED
package/lib/grid/lib/efx-grid.js
CHANGED
@@ -17,6 +17,7 @@ import ColumnDraggingPlugin from "../../column-dragging/es6/ColumnDragging.js";
|
|
17
17
|
import cssStr from "../../core/es6/tr-grid-theme.js";
|
18
18
|
|
19
19
|
const coreGridStyle = css`${unsafeCSS(cssStr)}`;
|
20
|
+
let preloadPromise = null;
|
20
21
|
|
21
22
|
/**
|
22
23
|
* @typedef {Object} Grid~Config
|
@@ -89,7 +90,18 @@ class Grid extends ResponsiveElement {
|
|
89
90
|
|
90
91
|
this._onResizeHandler = this._onResizeHandler.bind(this);
|
91
92
|
this.resizedCallback = this.resizedCallback.bind(this);
|
93
|
+
this._preloadElfIcon = this._preloadElfIcon.bind(this);
|
92
94
|
}
|
95
|
+
|
96
|
+
/**
|
97
|
+
* @protected
|
98
|
+
* @ignore
|
99
|
+
*/
|
100
|
+
firstUpdated() {
|
101
|
+
// pre load elf svg icon
|
102
|
+
this._preloadElfIcon();
|
103
|
+
}
|
104
|
+
|
93
105
|
/**
|
94
106
|
* @protected
|
95
107
|
* @ignore
|
@@ -221,7 +233,7 @@ class Grid extends ResponsiveElement {
|
|
221
233
|
/**
|
222
234
|
* @private
|
223
235
|
*/
|
224
|
-
|
236
|
+
_configChange() {
|
225
237
|
let gridElem;
|
226
238
|
if (this.api) {
|
227
239
|
// Remove old grid element and Realtime Grid's API
|
@@ -308,15 +320,6 @@ class Grid extends ResponsiveElement {
|
|
308
320
|
// Inject icons and theme name
|
309
321
|
ElfUtil.injectIcons(options, this);
|
310
322
|
|
311
|
-
// pre load elf svg icon
|
312
|
-
const { preloadd } = await import("@refinitiv-ui/elements/icon");
|
313
|
-
if (preloadd) {
|
314
|
-
const iconList = ElfUtil.prepareIconPreloading();
|
315
|
-
if (iconList) {
|
316
|
-
preload(...iconList);
|
317
|
-
}
|
318
|
-
}
|
319
|
-
|
320
323
|
if (ElfUtil.isHaloTheme()) {
|
321
324
|
if (options.borders == null) {
|
322
325
|
options.borders = false;
|
@@ -369,6 +372,25 @@ class Grid extends ResponsiveElement {
|
|
369
372
|
}
|
370
373
|
}
|
371
374
|
|
375
|
+
/**
|
376
|
+
* @private
|
377
|
+
* Load preload icon for element framework v7
|
378
|
+
*/
|
379
|
+
_preloadElfIcon() {
|
380
|
+
// pre load elf svg icon
|
381
|
+
if(!preloadPromise) { // import only one time
|
382
|
+
preloadPromise = import("@refinitiv-ui/elements/icon").then(function(e) {
|
383
|
+
let preload = e.preload;
|
384
|
+
if (preloadd) {
|
385
|
+
const iconList = ElfUtil.prepareIconPreloading();
|
386
|
+
if (iconList) {
|
387
|
+
preload(...iconList);
|
388
|
+
}
|
389
|
+
}
|
390
|
+
}).catch(function(){});
|
391
|
+
}
|
392
|
+
}
|
393
|
+
|
372
394
|
/** Called when the element's size has changed
|
373
395
|
* @public
|
374
396
|
* @return {void}
|