@refinitiv-ui/efx-grid 6.0.107 → 6.0.109
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.
- package/lib/core/dist/core.js +133 -56
- package/lib/core/dist/core.min.js +1 -1
- package/lib/core/es6/grid/Core.d.ts +2 -2
- package/lib/core/es6/grid/Core.js +132 -55
- package/lib/core/es6/grid/components/Scrollbar.js +1 -1
- package/lib/formatters/es6/index.d.ts +22 -1
- package/lib/formatters/es6/index.js +22 -1
- 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-column-grouping/es6/ColumnGrouping.js +1452 -1304
- 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/tr-grid-util/es6/GroupDefinitions.js +3 -3
- package/lib/types/es6/Core/grid/Core.d.ts +2 -2
- package/lib/types/es6/FilterInput.d.ts +2 -0
- package/lib/types/es6/RowFiltering.d.ts +6 -0
- package/lib/versions.json +5 -5
- package/package.json +1 -1
| @@ -371,8 +371,6 @@ declare class Core extends ElementWrapper { | |
| 371 371 |  | 
| 372 372 | 
             
                public reserveRightSpace(size: number): boolean;
         | 
| 373 373 |  | 
| 374 | 
            -
                public getHiddenInput(): Element|null;
         | 
| 375 | 
            -
             | 
| 376 374 | 
             
                public focus(): void;
         | 
| 377 375 |  | 
| 378 376 | 
             
                public isBinding(): boolean;
         | 
| @@ -391,6 +389,8 @@ declare class Core extends ElementWrapper { | |
| 391 389 |  | 
| 392 390 | 
             
                public isSelectedColumn(colIndex: number): boolean;
         | 
| 393 391 |  | 
| 392 | 
            +
                public updateColumnBounds(): void;
         | 
| 393 | 
            +
             | 
| 394 394 | 
             
                public getColumnRect(startColIndex: number, endColIndex: number): any;
         | 
| 395 395 |  | 
| 396 396 | 
             
                public getRowRect(startRowIndex: number, endRowIndex: number): any;
         | 
| @@ -52,6 +52,9 @@ import VirtualizedLayoutGrid from "./VirtualizedLayoutGrid.js"; | |
| 52 52 | 
             
            /** @event Core#preForcedUpdate
         | 
| 53 53 | 
             
            * @ignore
         | 
| 54 54 | 
             
            */
         | 
| 55 | 
            +
            /** @event Core#tabNavigation
         | 
| 56 | 
            +
            * @ignore
         | 
| 57 | 
            +
            */
         | 
| 55 58 | 
             
            //#endregion Events
         | 
| 56 59 |  | 
| 57 60 | 
             
            /** @private
         | 
| @@ -62,6 +65,44 @@ import VirtualizedLayoutGrid from "./VirtualizedLayoutGrid.js"; | |
| 62 65 | 
             
            let ascNumberSorter = function (a, b) {
         | 
| 63 66 | 
             
            	return a - b;
         | 
| 64 67 | 
             
            };
         | 
| 68 | 
            +
            /** @private
         | 
| 69 | 
            +
            * @return {!Element}
         | 
| 70 | 
            +
            */
         | 
| 71 | 
            +
            let _createHiddenInput = function () {
         | 
| 72 | 
            +
            	let hiddenInput = document.createElement("input");
         | 
| 73 | 
            +
            	let styleObj = hiddenInput.style;
         | 
| 74 | 
            +
            	styleObj.position = "absolute";
         | 
| 75 | 
            +
            	styleObj.width = styleObj.height = styleObj.padding = styleObj.border = "0";
         | 
| 76 | 
            +
            	hiddenInput.value = "0";
         | 
| 77 | 
            +
            	return hiddenInput;
         | 
| 78 | 
            +
            };
         | 
| 79 | 
            +
            /** @private
         | 
| 80 | 
            +
            * @param {Object} e
         | 
| 81 | 
            +
            * @return {boolean}
         | 
| 82 | 
            +
            */
         | 
| 83 | 
            +
            let _isTabCommand = function (e) {
         | 
| 84 | 
            +
            	if(e.keyCode === 9) {
         | 
| 85 | 
            +
            		return !e.ctrlKey && !e.altKey && !e.metaKey;
         | 
| 86 | 
            +
            	}
         | 
| 87 | 
            +
            	return false;
         | 
| 88 | 
            +
            };
         | 
| 89 | 
            +
            /** @private
         | 
| 90 | 
            +
            * @param {Element} elem
         | 
| 91 | 
            +
            * @return {Element}
         | 
| 92 | 
            +
            */
         | 
| 93 | 
            +
            let _getActiveElement = function (elem) {
         | 
| 94 | 
            +
            	if(elem) {
         | 
| 95 | 
            +
            		if(elem.getRootNode) {
         | 
| 96 | 
            +
            			let rootNode = elem.getRootNode(); // Get uncomposed root node
         | 
| 97 | 
            +
            			if(rootNode && rootNode !== elem) { // The root node could be the element itself, if it is not attached to the DOM tree
         | 
| 98 | 
            +
            				return rootNode.activeElement || null;
         | 
| 99 | 
            +
            			}
         | 
| 100 | 
            +
            		} else { // Older browser does not support getRootNode
         | 
| 101 | 
            +
            			return document.activeElement;
         | 
| 102 | 
            +
            		}
         | 
| 103 | 
            +
            	}
         | 
| 104 | 
            +
            	return null;
         | 
| 105 | 
            +
            };
         | 
| 65 106 |  | 
| 66 107 | 
             
            /** @constructor
         | 
| 67 108 | 
             
            * @param {Element=} opt_initializer this can be either element id (string) or DOM element.
         | 
| @@ -85,6 +126,7 @@ let Core = function (opt_initializer) { | |
| 85 126 | 
             
            	_t._onMouseMove = _t._onMouseMove.bind(_t);
         | 
| 86 127 | 
             
            	_t._onRowHightlighted = _t._onRowHightlighted.bind(_t);
         | 
| 87 128 | 
             
            	_t._onGridClicked = _t._onGridClicked.bind(_t);
         | 
| 129 | 
            +
            	_t._onKeyDown = _t._onKeyDown.bind(_t);
         | 
| 88 130 |  | 
| 89 131 | 
             
            	_t._onWindowResize = _t._onWindowResize.bind(_t);
         | 
| 90 132 | 
             
            	_t._onSectionDataChanged = _t._onSectionDataChanged.bind(_t);
         | 
| @@ -105,7 +147,7 @@ let Core = function (opt_initializer) { | |
| 105 147 | 
             
            	_t._onColInViewChanged =  _t._onColInViewChanged.bind(_t);
         | 
| 106 148 |  | 
| 107 149 | 
             
            	_t._updateVScrollbar = _t._updateVScrollbar.bind(_t);
         | 
| 108 | 
            -
            	_t. | 
| 150 | 
            +
            	_t.updateColumnBounds = _t.updateColumnBounds.bind(_t);
         | 
| 109 151 | 
             
            	_t._dispatchColumnPositionChanged = _t._dispatchColumnPositionChanged.bind(_t);
         | 
| 110 152 | 
             
            	_t._dispatchRowPositionChanged = _t._dispatchRowPositionChanged.bind(_t);
         | 
| 111 153 | 
             
            	_t._requestScrollbarUpdate = _t._requestScrollbarUpdate.bind(_t);
         | 
| @@ -146,7 +188,7 @@ let Core = function (opt_initializer) { | |
| 146 188 | 
             
            	// Initialize vertical scrollbar
         | 
| 147 189 | 
             
            	_t._vscrollbar = new VScrollbar();
         | 
| 148 190 | 
             
            	_t._vscrollbar.disable();
         | 
| 149 | 
            -
            	_t._vscrollbar.setParent( | 
| 191 | 
            +
            	_t._vscrollbar.setParent(_t.getParent() || _t.getElement());
         | 
| 150 192 |  | 
| 151 193 | 
             
            	_t._vscrollbar.listen("scroll", _t._onVScroll);
         | 
| 152 194 | 
             
            	_t._vscrollbar.listen("layoutChanged", _t._onVScroll);
         | 
| @@ -159,25 +201,27 @@ let Core = function (opt_initializer) { | |
| 159 201 | 
             
            	// Initialize horizontal scrollbars
         | 
| 160 202 | 
             
            	_t._hscrollbar = new HScrollbar();
         | 
| 161 203 | 
             
            	_t._hscrollbar.disable();
         | 
| 162 | 
            -
            	_t._hscrollbar.setParent( | 
| 204 | 
            +
            	_t._hscrollbar.setParent(_t.getParent() || _t.getElement());
         | 
| 163 205 |  | 
| 164 | 
            -
            	_t._hscrollbar.listen("scroll",  | 
| 165 | 
            -
            	_t._hscrollbar.listen("layoutChanged",  | 
| 166 | 
            -
            	_t._hscrollbar.listen("activated",  | 
| 167 | 
            -
            	_t._hscrollbar.listen("deactivated",  | 
| 206 | 
            +
            	_t._hscrollbar.listen("scroll", _t._onHScroll);
         | 
| 207 | 
            +
            	_t._hscrollbar.listen("layoutChanged", _t._onHScroll);
         | 
| 208 | 
            +
            	_t._hscrollbar.listen("activated", _t.updateLayout);
         | 
| 209 | 
            +
            	_t._hscrollbar.listen("deactivated", _t.updateLayout);
         | 
| 168 210 |  | 
| 169 211 | 
             
            	// cross-reference scrollbars
         | 
| 170 212 | 
             
            	_t._hscrollbar.setOtherScrollbar(_t._vscrollbar);
         | 
| 171 213 | 
             
            	_t._vscrollbar.setOtherScrollbar(_t._hscrollbar);
         | 
| 172 214 |  | 
| 215 | 
            +
             | 
| 216 | 
            +
            	_t._element.addEventListener("keydown", _t._onKeyDown);
         | 
| 173 217 | 
             
            	if (Util.isMobile || Util.isTouchDevice) {
         | 
| 174 | 
            -
            		_t._element.addEventListener("touchmove",  | 
| 218 | 
            +
            		_t._element.addEventListener("touchmove", _t._onMouseMove, false);
         | 
| 175 219 | 
             
            	} else {
         | 
| 176 | 
            -
            		_t._element.addEventListener("mousemove",  | 
| 220 | 
            +
            		_t._element.addEventListener("mousemove", _t._onMouseMove, false);
         | 
| 177 221 | 
             
            	}
         | 
| 178 222 |  | 
| 179 223 | 
             
            	if(Util.isSafari){
         | 
| 180 | 
            -
            		_t._element.addEventListener("click",  | 
| 224 | 
            +
            		_t._element.addEventListener("click", _t._onGridClicked);
         | 
| 181 225 | 
             
            	}
         | 
| 182 226 |  | 
| 183 227 | 
             
            	window.addEventListener("resize", _t._onWindowResize, false); // Should be unlistened after destroyed
         | 
| @@ -185,10 +229,17 @@ let Core = function (opt_initializer) { | |
| 185 229 | 
             
            	_t._colVirtualizer.listen("indexChanged", _t._onColInViewChanged);
         | 
| 186 230 | 
             
            	_t._rowHeightConflator = new Conflator(_t._onRowHeightChanged, 50);
         | 
| 187 231 | 
             
            	_t._vScrollbarConflator = new Conflator(_t._updateVScrollbar, 200);
         | 
| 188 | 
            -
            	_t._columnBoundConflator = new Conflator(_t. | 
| 232 | 
            +
            	_t._columnBoundConflator = new Conflator(_t.updateColumnBounds, 10);
         | 
| 189 233 | 
             
            	_t._columnPositionConflator = new Conflator(_t._dispatchColumnPositionChanged, 10);
         | 
| 190 234 | 
             
            	_t._rowPositionConflator = new Conflator(_t._dispatchRowPositionChanged, 10);
         | 
| 191 235 |  | 
| 236 | 
            +
            	_t._firstHiddenInput = _createHiddenInput();
         | 
| 237 | 
            +
            	_t._firstHiddenInput.className = "first-input";
         | 
| 238 | 
            +
            	_t._lastHiddenInput = _createHiddenInput();
         | 
| 239 | 
            +
            	_t._lastHiddenInput.className = "last-input";
         | 
| 240 | 
            +
            	_t._element.insertBefore(_t._firstHiddenInput, _t._element.firstChild);
         | 
| 241 | 
            +
            	_t._element.appendChild(_t._lastHiddenInput);
         | 
| 242 | 
            +
             | 
| 192 243 | 
             
            	// Initialize events for external users
         | 
| 193 244 | 
             
            	_t._addEvents(
         | 
| 194 245 | 
             
            		"sectionAdded",
         | 
| @@ -217,7 +268,8 @@ let Core = function (opt_initializer) { | |
| 217 268 | 
             
            		"beforeColumnBoundUpdate",
         | 
| 218 269 | 
             
            		"beforeBatchOperation",
         | 
| 219 270 | 
             
            		"afterBatchOperation",
         | 
| 220 | 
            -
            		"pinningChanged"
         | 
| 271 | 
            +
            		"pinningChanged",
         | 
| 272 | 
            +
            		"tabNavigation"
         | 
| 221 273 | 
             
            	);
         | 
| 222 274 |  | 
| 223 275 | 
             
            	// For debugging in advanced optimization mode
         | 
| @@ -226,9 +278,9 @@ let Core = function (opt_initializer) { | |
| 226 278 | 
             
            		map = {};
         | 
| 227 279 | 
             
            		Core["map"] = map;
         | 
| 228 280 | 
             
            	}
         | 
| 229 | 
            -
             | 
| 230 | 
            -
            	 | 
| 231 | 
            -
            	let id =  | 
| 281 | 
            +
             | 
| 282 | 
            +
            	_t._element["_control"] = _t;
         | 
| 283 | 
            +
            	let id = _t._element.id || _t._element.name;
         | 
| 232 284 | 
             
            	if(!id || map[id]) {
         | 
| 233 285 | 
             
            		id = "_grid" + Core._runningGridId;
         | 
| 234 286 | 
             
            	}
         | 
| @@ -236,17 +288,6 @@ let Core = function (opt_initializer) { | |
| 236 288 | 
             
            	map[id] = _t;
         | 
| 237 289 | 
             
            	Core._runningGridId++;
         | 
| 238 290 |  | 
| 239 | 
            -
            	// init hiddenInput for retrieve copy and cut event
         | 
| 240 | 
            -
            	let hiddenInput = document.createElement("input");
         | 
| 241 | 
            -
            	hiddenInput.style.position = "absolute";
         | 
| 242 | 
            -
            	hiddenInput.style.width = "0";
         | 
| 243 | 
            -
            	hiddenInput.style.height = "0";
         | 
| 244 | 
            -
            	hiddenInput.style.padding = "0";
         | 
| 245 | 
            -
            	hiddenInput.style.border = "0";
         | 
| 246 | 
            -
            	hiddenInput.value = "0";
         | 
| 247 | 
            -
            	_t._hiddenInput = hiddenInput;
         | 
| 248 | 
            -
            	elem.insertBefore(hiddenInput, elem.firstChild);
         | 
| 249 | 
            -
             | 
| 250 291 | 
             
            	// Ensure all affected plugins are loaded prior zoom plugin
         | 
| 251 292 | 
             
            	// use as entity to trigger updateLayout once zoom is changed
         | 
| 252 293 | 
             
            	Object.defineProperty(_t, "zoomFactor", {
         | 
| @@ -526,11 +567,16 @@ Core.prototype._rowRefreshTimer = 0; | |
| 526 567 | 
             
            * @private
         | 
| 527 568 | 
             
            */
         | 
| 528 569 | 
             
            Core.prototype._layoutUpdating = false;
         | 
| 529 | 
            -
            /** A  | 
| 530 | 
            -
            * @type {Element}
         | 
| 570 | 
            +
            /** A hidden input that allows grid to receive keyboard input and focus
         | 
| 571 | 
            +
            * @type {!Element}
         | 
| 531 572 | 
             
            * @private
         | 
| 532 573 | 
             
            */
         | 
| 533 | 
            -
            Core.prototype. | 
| 574 | 
            +
            Core.prototype._firstHiddenInput;
         | 
| 575 | 
            +
            /** A hidden input that allows grid to receive keyboard input and focus
         | 
| 576 | 
            +
            * @type {!Element}
         | 
| 577 | 
            +
            * @private
         | 
| 578 | 
            +
            */
         | 
| 579 | 
            +
            Core.prototype._lastHiddenInput;
         | 
| 534 580 | 
             
            /** @type {number}
         | 
| 535 581 | 
             
            * @private
         | 
| 536 582 | 
             
            */
         | 
| @@ -574,7 +620,7 @@ Core.prototype._hasPendingRowChange = false; | |
| 574 620 | 
             
            * @return {string}
         | 
| 575 621 | 
             
            */
         | 
| 576 622 | 
             
            Core.getVersion = function () {
         | 
| 577 | 
            -
            	return "5.1. | 
| 623 | 
            +
            	return "5.1.111";
         | 
| 578 624 | 
             
            };
         | 
| 579 625 | 
             
            /** {@link ElementWrapper#dispose}
         | 
| 580 626 | 
             
            * @override
         | 
| @@ -635,11 +681,12 @@ Core.prototype.dispose = function () { | |
| 635 681 |  | 
| 636 682 | 
             
            	// Clean Top node
         | 
| 637 683 | 
             
            	let elem = this._element;
         | 
| 638 | 
            -
            	if (elem | 
| 684 | 
            +
            	if (elem) {
         | 
| 639 685 | 
             
            		if (elem["_control"]) {
         | 
| 640 686 | 
             
            			delete elem["_control"];
         | 
| 641 687 | 
             
            		}
         | 
| 642 | 
            -
            		elem.removeChild(this. | 
| 688 | 
            +
            		elem.removeChild(this._firstHiddenInput);
         | 
| 689 | 
            +
            		elem.removeChild(this._lastHiddenInput);
         | 
| 643 690 | 
             
            	}
         | 
| 644 691 | 
             
            	this._dispose();
         | 
| 645 692 |  | 
| @@ -1804,7 +1851,7 @@ Core.prototype._moveColumn = function (fromCol, destCol) { | |
| 1804 1851 | 
             
            			this._colVirtualizer.update();
         | 
| 1805 1852 | 
             
            		}
         | 
| 1806 1853 | 
             
            	}
         | 
| 1807 | 
            -
            	this. | 
| 1854 | 
            +
            	this.updateColumnBounds();
         | 
| 1808 1855 | 
             
            	this._updateColumnSeparators();
         | 
| 1809 1856 | 
             
            	return true;
         | 
| 1810 1857 | 
             
            };
         | 
| @@ -4037,15 +4084,14 @@ Core.prototype.reserveRightSpace = function (size) { | |
| 4037 4084 | 
             
            	return false;
         | 
| 4038 4085 | 
             
            };
         | 
| 4039 4086 |  | 
| 4040 | 
            -
            /** Get hidden input  | 
| 4041 | 
            -
            * this input for make grid can copy <br>
         | 
| 4042 | 
            -
            * normal user should not touch it <br>
         | 
| 4043 | 
            -
            * but sometime grid extension will have to use this element
         | 
| 4087 | 
            +
            /** Get the hidden input. This input allows grid to receive keyboard input
         | 
| 4044 4088 | 
             
            * @public
         | 
| 4045 | 
            -
            * @ | 
| 4089 | 
            +
            * @ignore
         | 
| 4090 | 
            +
            * @param {boolean} firstInput
         | 
| 4091 | 
            +
            * @return {!Element}
         | 
| 4046 4092 | 
             
            */
         | 
| 4047 | 
            -
            Core.prototype.getHiddenInput = function () {
         | 
| 4048 | 
            -
            	return this. | 
| 4093 | 
            +
            Core.prototype.getHiddenInput = function (firstInput) {
         | 
| 4094 | 
            +
            	return firstInput ? this._firstHiddenInput : this._lastHiddenInput;
         | 
| 4049 4095 | 
             
            };
         | 
| 4050 4096 |  | 
| 4051 4097 | 
             
            /** Focus grid element without bringing grid into window's view. This is useful when grid is very wide or tall, since window can be scrolled to focused element by default in some browsers.
         | 
| @@ -4054,8 +4100,8 @@ Core.prototype.getHiddenInput = function () { | |
| 4054 4100 | 
             
            * @see {@link http://help.dottoro.com/ljqmdirr.php}
         | 
| 4055 4101 | 
             
            */
         | 
| 4056 4102 | 
             
            Core.prototype.focus = function () {
         | 
| 4057 | 
            -
            	let elem = this. | 
| 4058 | 
            -
            	let activeElem =  | 
| 4103 | 
            +
            	let elem = this._lastHiddenInput;
         | 
| 4104 | 
            +
            	let activeElem = _getActiveElement(elem);
         | 
| 4059 4105 | 
             
            	if(elem && elem !== activeElem) {
         | 
| 4060 4106 | 
             
            		let x = window.pageXOffset;
         | 
| 4061 4107 | 
             
            		let y = window.pageYOffset;
         | 
| @@ -4186,7 +4232,7 @@ Core.prototype.selectColumn = function (colIndex, selected) { | |
| 4186 4232 | 
             
            	for (let i = this._settings.length; --i >= 0; ) {
         | 
| 4187 4233 | 
             
            		this._settings[i].getSection().selectColumn(colIndex, selected);
         | 
| 4188 4234 | 
             
            	}
         | 
| 4189 | 
            -
            	this. | 
| 4235 | 
            +
            	this.updateColumnBounds();
         | 
| 4190 4236 | 
             
            };
         | 
| 4191 4237 | 
             
            /** @public
         | 
| 4192 4238 | 
             
            * @param {number} colIndex
         | 
| @@ -4200,9 +4246,9 @@ Core.prototype.isSelectedColumn = function (colIndex) { | |
| 4200 4246 | 
             
            	return false;
         | 
| 4201 4247 | 
             
            };
         | 
| 4202 4248 |  | 
| 4203 | 
            -
            /** @ | 
| 4249 | 
            +
            /** @public
         | 
| 4204 4250 | 
             
            */
         | 
| 4205 | 
            -
            Core.prototype. | 
| 4251 | 
            +
            Core.prototype.updateColumnBounds = function () {
         | 
| 4206 4252 | 
             
            	if(this._columnBoundConflator.conflate()) {
         | 
| 4207 4253 | 
             
            		return;
         | 
| 4208 4254 | 
             
            	}
         | 
| @@ -4689,14 +4735,14 @@ Core.prototype._newSection = function (opt_type, sectionName) { | |
| 4689 4735 | 
             
            Core.prototype._putToLast = function(section) {
         | 
| 4690 4736 | 
             
            	let sectionCount = this._settings.length;
         | 
| 4691 4737 | 
             
            	if (sectionCount === 0) {
         | 
| 4692 | 
            -
            		section. | 
| 4738 | 
            +
            		section.insertBefore(this._lastHiddenInput);
         | 
| 4693 4739 | 
             
            	} else {
         | 
| 4694 4740 | 
             
            		let lastGrid = this.getLastSection();
         | 
| 4695 4741 | 
             
            		let nextSibling = lastGrid.getElement().nextSibling;
         | 
| 4696 4742 | 
             
            		if (nextSibling !== null) {
         | 
| 4697 4743 | 
             
            			section.insertBefore(nextSibling);
         | 
| 4698 4744 | 
             
            		} else {
         | 
| 4699 | 
            -
            			section. | 
| 4745 | 
            +
            			section.insertBefore(this._lastHiddenInput);
         | 
| 4700 4746 | 
             
            		}
         | 
| 4701 4747 | 
             
            	}
         | 
| 4702 4748 | 
             
            };
         | 
| @@ -5082,7 +5128,7 @@ Core.prototype._onVScroll = function (e) { | |
| 5082 5128 | 
             
            Core.prototype._onHScroll = function (e) {
         | 
| 5083 5129 | 
             
            	let scrollVal = this._hscrollbar.getScrollLeft();
         | 
| 5084 5130 | 
             
            	this._colVirtualizer.setViewOffset(scrollVal); // Trigger virtualization event
         | 
| 5085 | 
            -
            	this. | 
| 5131 | 
            +
            	this.updateColumnBounds();
         | 
| 5086 5132 | 
             
            	this._dispatchColumnPositionChanged();
         | 
| 5087 5133 | 
             
            };
         | 
| 5088 5134 | 
             
            /** @private
         | 
| @@ -5381,14 +5427,44 @@ Core.prototype._onMouseMove = function () { | |
| 5381 5427 | 
             
            };
         | 
| 5382 5428 | 
             
            /** @private */
         | 
| 5383 5429 | 
             
            Core.prototype._onGridClicked = function () {
         | 
| 5384 | 
            -
            	// research for dragging
         | 
| 5385 5430 | 
             
            	let selection = window.getSelection();
         | 
| 5386 | 
            -
            	if(selection.toString()){
         | 
| 5431 | 
            +
            	if(!selection.toString()){
         | 
| 5432 | 
            +
            		if(!this._element.contains(_getActiveElement(this._element))){
         | 
| 5433 | 
            +
            			this.focus();
         | 
| 5434 | 
            +
            		}
         | 
| 5435 | 
            +
            	}
         | 
| 5436 | 
            +
            };
         | 
| 5437 | 
            +
             | 
| 5438 | 
            +
            /** @private
         | 
| 5439 | 
            +
            * @param {Object} e
         | 
| 5440 | 
            +
            */
         | 
| 5441 | 
            +
            Core.prototype._onKeyDown = function (e) {
         | 
| 5442 | 
            +
            	if(!_isTabCommand(e)) {
         | 
| 5387 5443 | 
             
            		return;
         | 
| 5388 5444 | 
             
            	}
         | 
| 5389 | 
            -
            	let  | 
| 5390 | 
            -
            	 | 
| 5391 | 
            -
             | 
| 5445 | 
            +
            	let activeElement = _getActiveElement(this._element);
         | 
| 5446 | 
            +
            	let onTheEdge = false;
         | 
| 5447 | 
            +
            	if(this._firstHiddenInput === activeElement) {
         | 
| 5448 | 
            +
            		onTheEdge = -1;
         | 
| 5449 | 
            +
            	} else if(this._lastHiddenInput === activeElement) {
         | 
| 5450 | 
            +
            		onTheEdge = 1;
         | 
| 5451 | 
            +
            	}
         | 
| 5452 | 
            +
             | 
| 5453 | 
            +
            	this._dispatch("tabNavigation", {
         | 
| 5454 | 
            +
            		"activeElement": activeElement,
         | 
| 5455 | 
            +
            		"firstHiddenInput": this._firstHiddenInput,
         | 
| 5456 | 
            +
            		"lastHiddenInput": this._lastHiddenInput,
         | 
| 5457 | 
            +
            		"onTheEdge": onTheEdge,
         | 
| 5458 | 
            +
            		"shiftKey": e.shiftKey,
         | 
| 5459 | 
            +
            		"event": e
         | 
| 5460 | 
            +
            	});
         | 
| 5461 | 
            +
             | 
| 5462 | 
            +
            	if(onTheEdge && !e.defaultPrevented) {
         | 
| 5463 | 
            +
            		if(onTheEdge > 0 && e.shiftKey) {
         | 
| 5464 | 
            +
            			this._firstHiddenInput.focus(); // jump to the top and move out of grid
         | 
| 5465 | 
            +
            		} else if(onTheEdge < 0 && !e.shiftKey) {
         | 
| 5466 | 
            +
            			this._lastHiddenInput.focus(); // skip to the end and move out of grid
         | 
| 5467 | 
            +
            		}
         | 
| 5392 5468 | 
             
            	}
         | 
| 5393 5469 | 
             
            };
         | 
| 5394 5470 |  | 
| @@ -5571,6 +5647,7 @@ Core.prototype._onSectionCountChanged = function (opt_suppressLayout) { | |
| 5571 5647 |  | 
| 5572 5648 | 
             
            		// Reinsert sections
         | 
| 5573 5649 | 
             
            		this._vscrollbar.setScrollContent(this, this._getAllSections(), this._startVScrollbarIndex);
         | 
| 5650 | 
            +
            		this._element.appendChild(this._lastHiddenInput); // Ensure that the hidden input is always at the last position
         | 
| 5574 5651 |  | 
| 5575 5652 | 
             
            		if(!opt_suppressLayout) {
         | 
| 5576 5653 | 
             
            			this._updateScrollbarHeight(true, true);
         | 
| @@ -5588,7 +5665,7 @@ Core.prototype._onColumnCountChanged = function () { | |
| 5588 5665 | 
             
            	let pinnedLeft = this._countPinnedLeftColumns();
         | 
| 5589 5666 | 
             
            	let pinnedRight = this._countPinnedRightColumns();
         | 
| 5590 5667 |  | 
| 5591 | 
            -
            	this. | 
| 5668 | 
            +
            	this.updateColumnBounds();
         | 
| 5592 5669 | 
             
            	this._updateColumnSeparators();
         | 
| 5593 5670 |  | 
| 5594 5671 | 
             
            	if (this._hScrollbarEnabled && pinnedLeft + pinnedRight < this.getColumnCount()) {
         | 
| @@ -5884,7 +5961,7 @@ Core.prototype._syncLayoutToColumns = function (from, to, opt_forceDispatching) | |
| 5884 5961 | 
             
            	// TODO: Check if "to" should be greater than or equal to first pinnied right index
         | 
| 5885 5962 | 
             
            	let paneChanged = forceUpdate || (from < this.getHScrollStartIndex()) || (to > this.getFirstPinnedRightIndex());
         | 
| 5886 5963 | 
             
            	this._updateScrollbarWidth(paneChanged, true /* contentChanged */);
         | 
| 5887 | 
            -
            	this. | 
| 5964 | 
            +
            	this.updateColumnBounds();
         | 
| 5888 5965 | 
             
            	this._updateColumnSeparators();
         | 
| 5889 5966 | 
             
            	this._dispatchColumnPositionChanged();
         | 
| 5890 5967 |  | 
| @@ -838,7 +838,7 @@ Scrollbar.prototype._clearAllPanes = function() { | |
| 838 838 | 
             
            */
         | 
| 839 839 | 
             
            Scrollbar.prototype.disableKeyboardInput = function (opt_disabled) {
         | 
| 840 840 | 
             
            	if(opt_disabled === false) {
         | 
| 841 | 
            -
            		this._element.setAttribute("tabindex", " | 
| 841 | 
            +
            		this._element.setAttribute("tabindex", "-1"); // tabindex makes the element focusable. The negative value exclude it from tab key navigation
         | 
| 842 842 | 
             
            		this._element.addEventListener("keydown", this._onKeyDown, false);
         | 
| 843 843 | 
             
            	} else {
         | 
| 844 844 | 
             
            		this._element.removeAttribute("tabindex");
         | 
| @@ -19,6 +19,17 @@ import SimpleTickerFormatter from "./SimpleTickerFormatter.js"; | |
| 19 19 | 
             
            import SimpleToggleFormatter from "./SimpleToggleFormatter.js";
         | 
| 20 20 | 
             
            import TextFormatter from "./TextFormatter.js";
         | 
| 21 21 |  | 
| 22 | 
            +
            import EFButtonFormatter from "./EFButtonFormatter.js";
         | 
| 23 | 
            +
            import EFCheckboxFormatter from "./EFCheckboxFormatter.js";
         | 
| 24 | 
            +
            import EFComboBoxFormatter from "./EFComboBoxFormatter.js";
         | 
| 25 | 
            +
            import EFDateTimePickerFormatter from "./EFDateTimePickerFormatter.js";
         | 
| 26 | 
            +
            import EFIconFormatter from "./EFIconFormatter.js";
         | 
| 27 | 
            +
            import EFNumberFieldFormatter from "./EFNumberFieldFormatter.js";
         | 
| 28 | 
            +
            import EFRadioButtonFormatter from "./EFRadioButtonFormatter.js";
         | 
| 29 | 
            +
            import EFSelectFormatter from "./EFSelectFormatter.js";
         | 
| 30 | 
            +
            import EFTextFieldFormatter from "./EFTextFieldFormatter.js";
         | 
| 31 | 
            +
            import EFToggleFormatter from "./EFToggleFormatter.js"; 
         | 
| 32 | 
            +
             | 
| 22 33 |  | 
| 23 34 |  | 
| 24 35 | 
             
            export {
         | 
| @@ -39,5 +50,15 @@ export { | |
| 39 50 | 
             
            	SimpleLinkFormatter,
         | 
| 40 51 | 
             
            	SimpleTickerFormatter,
         | 
| 41 52 | 
             
            	SimpleToggleFormatter,
         | 
| 42 | 
            -
            	TextFormatter
         | 
| 53 | 
            +
            	TextFormatter,
         | 
| 54 | 
            +
            	EFButtonFormatter,
         | 
| 55 | 
            +
            	EFCheckboxFormatter,
         | 
| 56 | 
            +
            	EFComboBoxFormatter,
         | 
| 57 | 
            +
            	EFDateTimePickerFormatter,
         | 
| 58 | 
            +
            	EFIconFormatter,
         | 
| 59 | 
            +
            	EFNumberFieldFormatter,
         | 
| 60 | 
            +
            	EFRadioButtonFormatter,
         | 
| 61 | 
            +
            	EFSelectFormatter,
         | 
| 62 | 
            +
            	EFTextFieldFormatter,
         | 
| 63 | 
            +
            	EFToggleFormatter
         | 
| 43 64 | 
             
            };
         | 
| @@ -19,6 +19,17 @@ import SimpleTickerFormatter from "./SimpleTickerFormatter.js"; | |
| 19 19 | 
             
            import SimpleToggleFormatter from "./SimpleToggleFormatter.js";
         | 
| 20 20 | 
             
            import TextFormatter from "./TextFormatter.js";
         | 
| 21 21 |  | 
| 22 | 
            +
            import EFButtonFormatter from "./EFButtonFormatter.js";
         | 
| 23 | 
            +
            import EFCheckboxFormatter from "./EFCheckboxFormatter.js";
         | 
| 24 | 
            +
            import EFComboBoxFormatter from "./EFComboBoxFormatter.js";
         | 
| 25 | 
            +
            import EFDateTimePickerFormatter from "./EFDateTimePickerFormatter.js";
         | 
| 26 | 
            +
            import EFIconFormatter from "./EFIconFormatter.js";
         | 
| 27 | 
            +
            import EFNumberFieldFormatter from "./EFNumberFieldFormatter.js";
         | 
| 28 | 
            +
            import EFRadioButtonFormatter from "./EFRadioButtonFormatter.js";
         | 
| 29 | 
            +
            import EFSelectFormatter from "./EFSelectFormatter.js";
         | 
| 30 | 
            +
            import EFTextFieldFormatter from "./EFTextFieldFormatter.js";
         | 
| 31 | 
            +
            import EFToggleFormatter from "./EFToggleFormatter.js"; 
         | 
| 32 | 
            +
             | 
| 22 33 | 
             
            // tsd-disable
         | 
| 23 34 | 
             
            var tr = window["tr"];
         | 
| 24 35 | 
             
            if (!tr) {
         | 
| @@ -63,5 +74,15 @@ export { | |
| 63 74 | 
             
            	SimpleLinkFormatter,
         | 
| 64 75 | 
             
            	SimpleTickerFormatter,
         | 
| 65 76 | 
             
            	SimpleToggleFormatter,
         | 
| 66 | 
            -
            	TextFormatter
         | 
| 77 | 
            +
            	TextFormatter,
         | 
| 78 | 
            +
            	EFButtonFormatter,
         | 
| 79 | 
            +
            	EFCheckboxFormatter,
         | 
| 80 | 
            +
            	EFComboBoxFormatter,
         | 
| 81 | 
            +
            	EFDateTimePickerFormatter,
         | 
| 82 | 
            +
            	EFIconFormatter,
         | 
| 83 | 
            +
            	EFNumberFieldFormatter,
         | 
| 84 | 
            +
            	EFRadioButtonFormatter,
         | 
| 85 | 
            +
            	EFSelectFormatter,
         | 
| 86 | 
            +
            	EFTextFieldFormatter,
         | 
| 87 | 
            +
            	EFToggleFormatter
         | 
| 67 88 | 
             
            };
         | 
    
        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}
         |