@refinitiv-ui/efx-grid 6.0.98 → 6.0.99
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 +200 -170
- package/lib/core/dist/core.min.js +1 -1
- package/lib/core/es6/data/DataView.js +2 -1
- package/lib/core/es6/grid/Core.js +20 -2
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +11 -0
- package/lib/core/es6/grid/util/Virtualizer.js +5 -5
- package/lib/grid/index.js +1 -1
- package/lib/rt-grid/dist/rt-grid.js +2512 -2426
- package/lib/rt-grid/dist/rt-grid.min.js +1 -1
- package/lib/rt-grid/es6/Grid.d.ts +2 -0
- package/lib/rt-grid/es6/Grid.js +16 -0
- package/lib/rt-grid/es6/RowDefinition.d.ts +0 -2
- package/lib/rt-grid/es6/RowDefinition.js +85 -44
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +12 -1
- package/lib/types/es6/Core/data/DataView.d.ts +3 -1
- package/lib/types/es6/RealtimeGrid/Grid.d.ts +2 -0
- package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +0 -2
- package/lib/versions.json +2 -2
- package/package.json +1 -1
    
        package/lib/core/dist/core.js
    CHANGED
    
    | @@ -709,15 +709,15 @@ EventDispatcher._proto = EventDispatcher.prototype; | |
| 709 709 | 
             
            /** Provide ability for prototype based Class to inherits another class
         | 
| 710 710 | 
             
            * @namespace
         | 
| 711 711 | 
             
            * @example
         | 
| 712 | 
            -
            *  | 
| 712 | 
            +
            * let BaseClass = function() {};
         | 
| 713 713 | 
             
            * BaseClass.prototype.method = function() {};
         | 
| 714 714 | 
             
            * BaseClass.prototype._member = 1;
         | 
| 715 | 
            -
            *  | 
| 715 | 
            +
            * let DerivedClass = function() {};
         | 
| 716 716 | 
             
            * Ext.inherits(DerivedClass, BaseClass); // Derived class will have methods and members of the base class
         | 
| 717 717 | 
             
            * // To call base class method
         | 
| 718 718 | 
             
            * DeriveClass["base"](this, "methodName", ...params);
         | 
| 719 719 | 
             
            */
         | 
| 720 | 
            -
             | 
| 720 | 
            +
            let Ext = {};
         | 
| 721 721 |  | 
| 722 722 | 
             
            /** @public
         | 
| 723 723 | 
             
            * @function
         | 
| @@ -747,9 +747,9 @@ Ext.inherits = function (childCtor, parentCtor) { | |
| 747 747 | 
             
            	childCtor["base"] = function(me, methodName, var_args) {
         | 
| 748 748 | 
             
            		if(!methodName) { methodName = 'constructor'; }
         | 
| 749 749 | 
             
            		// Copying using loop to avoid deop due to passing arguments object to function. This is faster in many JS engines as of late 2014.
         | 
| 750 | 
            -
            		 | 
| 751 | 
            -
            		 | 
| 752 | 
            -
            		for ( | 
| 750 | 
            +
            		let len = arguments.length;
         | 
| 751 | 
            +
            		let args = new Array(len); // http://jsperf.com/creating-an-array
         | 
| 752 | 
            +
            		for (let i = 2; i < len; i++) {
         | 
| 753 753 | 
             
            			args[i - 2] = arguments[i];
         | 
| 754 754 | 
             
            		}
         | 
| 755 755 | 
             
            		return parentCtor.prototype[methodName].apply(me, args);
         | 
| @@ -10620,7 +10620,7 @@ LayoutGrid._proto = LayoutGrid.prototype; | |
| 10620 10620 |  | 
| 10621 10621 | 
             
            ;// CONCATENATED MODULE: ./node_modules/tr-grid-util/es6/Util.js
         | 
| 10622 10622 | 
             
            /** @namespace */
         | 
| 10623 | 
            -
             | 
| 10623 | 
            +
            let Util_Util = {};
         | 
| 10624 10624 |  | 
| 10625 10625 | 
             
            /** This is a shorthand for fetch() API by POST method and with json body <br>
         | 
| 10626 10626 | 
             
            * WARNING: fetch is not supported in IE (including IE11)
         | 
| @@ -10703,7 +10703,7 @@ Util_Util._logError = function(resp) { | |
| 10703 10703 | 
             
            * @return {!Promise<Response>}
         | 
| 10704 10704 | 
             
            */
         | 
| 10705 10705 | 
             
            Util_Util._post = function(url, obj, contentType) {
         | 
| 10706 | 
            -
            	 | 
| 10706 | 
            +
            	let options = {
         | 
| 10707 10707 | 
             
            		method: obj ? "POST" : "GET",
         | 
| 10708 10708 | 
             
            		headers: { "Content-Type": contentType || "application/json" }
         | 
| 10709 10709 | 
             
            	};
         | 
| @@ -10724,7 +10724,7 @@ Util_Util._post = function(url, obj, contentType) { | |
| 10724 10724 | 
             
            * @param {Array.<string>=} limiters Specify property to be extended
         | 
| 10725 10725 | 
             
            * @return {Object}
         | 
| 10726 10726 | 
             
            */
         | 
| 10727 | 
            -
             | 
| 10727 | 
            +
            let extendObject = function (obj, extender, limiters) {
         | 
| 10728 10728 | 
             
            	if(!obj) { // null undefined NaN empty string and 0
         | 
| 10729 10729 | 
             
            		return null;
         | 
| 10730 10730 | 
             
            	}
         | 
| @@ -10732,10 +10732,10 @@ var extendObject = function (obj, extender, limiters) { | |
| 10732 10732 | 
             
            		return obj;
         | 
| 10733 10733 | 
             
            	}
         | 
| 10734 10734 |  | 
| 10735 | 
            -
            	 | 
| 10735 | 
            +
            	let key;
         | 
| 10736 10736 | 
             
            	if(limiters) {
         | 
| 10737 | 
            -
            		 | 
| 10738 | 
            -
            		for( | 
| 10737 | 
            +
            		let len = limiters.length;
         | 
| 10738 | 
            +
            		for(let i = 0; i < len; ++i) {
         | 
| 10739 10739 | 
             
            			key = limiters[i];
         | 
| 10740 10740 | 
             
            			if(key) {
         | 
| 10741 10741 | 
             
            				extendProperty(obj, extender, key);
         | 
| @@ -10756,7 +10756,7 @@ var extendObject = function (obj, extender, limiters) { | |
| 10756 10756 | 
             
            * @param {Array.<string>=} limiters
         | 
| 10757 10757 | 
             
            * @return {Object}
         | 
| 10758 10758 | 
             
            */
         | 
| 10759 | 
            -
             | 
| 10759 | 
            +
            let cloneObject = function (obj, limiters) {
         | 
| 10760 10760 | 
             
            	return extendObject({}, obj, limiters);
         | 
| 10761 10761 | 
             
            };
         | 
| 10762 10762 |  | 
| @@ -10766,8 +10766,8 @@ var cloneObject = function (obj, limiters) { | |
| 10766 10766 | 
             
            * @param {Object} obj
         | 
| 10767 10767 | 
             
            * @return {boolean}=true, if the obj is empty
         | 
| 10768 10768 | 
             
            */
         | 
| 10769 | 
            -
             | 
| 10770 | 
            -
            	for ( | 
| 10769 | 
            +
            let isEmptyObject = function (obj) {
         | 
| 10770 | 
            +
            	for (let key in obj) {
         | 
| 10771 10771 | 
             
            		return false;
         | 
| 10772 10772 | 
             
            	}
         | 
| 10773 10773 | 
             
            	return true;
         | 
| @@ -10778,17 +10778,17 @@ var isEmptyObject = function (obj) { | |
| 10778 10778 | 
             
            * @param {Array.<string>=} fields In case of the given data is an array, this param will be used for mapping index to field
         | 
| 10779 10779 | 
             
            * @return {Object|null}
         | 
| 10780 10780 | 
             
            */
         | 
| 10781 | 
            -
             | 
| 10781 | 
            +
            let arrayToObject = function(data, fields) {
         | 
| 10782 10782 | 
             
            	if(!Array.isArray(data)) {
         | 
| 10783 10783 | 
             
            		return data;
         | 
| 10784 10784 | 
             
            	} else if(!fields) {
         | 
| 10785 10785 | 
             
            		return null;
         | 
| 10786 10786 | 
             
            	}
         | 
| 10787 | 
            -
            	 | 
| 10787 | 
            +
            	let ary = data;
         | 
| 10788 10788 | 
             
            	data = {};
         | 
| 10789 | 
            -
            	 | 
| 10790 | 
            -
            	for( | 
| 10791 | 
            -
            		 | 
| 10789 | 
            +
            	let len = ary.length;
         | 
| 10790 | 
            +
            	for(let i = 0; i < len; ++i) {
         | 
| 10791 | 
            +
            		let field = fields[i];
         | 
| 10792 10792 | 
             
            		// eslint-disable-next-line no-undefined
         | 
| 10793 10793 | 
             
            		if(field && ary[i] !== undefined) {
         | 
| 10794 10794 | 
             
            			data[field] = ary[i];
         | 
| @@ -10808,10 +10808,10 @@ var arrayToObject = function(data, fields) { | |
| 10808 10808 | 
             
            * extendProperty({a: [0]}, {a: 1}, "a"); // {a: [0, 1]}
         | 
| 10809 10809 | 
             
            * extendProperty({a: [0]}, {a: [1, 2]}, "a"); // {a: [0, 1, 2]}
         | 
| 10810 10810 | 
             
            */
         | 
| 10811 | 
            -
             | 
| 10812 | 
            -
            	 | 
| 10811 | 
            +
            let extendProperty = function (obj, extender, propName) {
         | 
| 10812 | 
            +
            	let val = extender[propName];
         | 
| 10813 10813 | 
             
            	if(val != null) {
         | 
| 10814 | 
            -
            		 | 
| 10814 | 
            +
            		let objVal = obj[propName];
         | 
| 10815 10815 | 
             
            		if(Array.isArray(objVal)) {
         | 
| 10816 10816 | 
             
            			obj[propName] = objVal.concat(val);
         | 
| 10817 10817 | 
             
            		} else if(Array.isArray(val) && objVal) {
         | 
| @@ -10829,7 +10829,7 @@ var extendProperty = function (obj, extender, propName) { | |
| 10829 10829 | 
             
            * @param {*} obj2
         | 
| 10830 10830 | 
             
            * @return {boolean}
         | 
| 10831 10831 | 
             
            */
         | 
| 10832 | 
            -
             | 
| 10832 | 
            +
            let deepEqual = function (obj1, obj2) {
         | 
| 10833 10833 |  | 
| 10834 10834 | 
             
            	if(obj1 === obj2) {
         | 
| 10835 10835 | 
             
            		return true;
         | 
| @@ -10847,7 +10847,7 @@ var deepEqual = function (obj1, obj2) { | |
| 10847 10847 | 
             
            				return false;
         | 
| 10848 10848 | 
             
            			}
         | 
| 10849 10849 |  | 
| 10850 | 
            -
            			for ( | 
| 10850 | 
            +
            			for (let i = 0; i < obj1.length; i++) {
         | 
| 10851 10851 | 
             
            				if (!deepEqual(obj1[i], obj2[i])) { // The array may not be a match if the elements are not sorted, so it will not be considered equal if there is a mismatch.
         | 
| 10852 10852 | 
             
            					return false;
         | 
| 10853 10853 | 
             
            				}
         | 
| @@ -10859,7 +10859,7 @@ var deepEqual = function (obj1, obj2) { | |
| 10859 10859 | 
             
            				return false;
         | 
| 10860 10860 | 
             
            			}
         | 
| 10861 10861 |  | 
| 10862 | 
            -
            			for ( | 
| 10862 | 
            +
            			for (let key in obj1) {
         | 
| 10863 10863 | 
             
            				if (!deepEqual(obj1[key], obj2[key])) {
         | 
| 10864 10864 | 
             
            					return false;
         | 
| 10865 10865 | 
             
            				}
         | 
| @@ -10883,7 +10883,7 @@ var deepEqual = function (obj1, obj2) { | |
| 10883 10883 | 
             
            * @return {Array} Returns the result of the extended array
         | 
| 10884 10884 | 
             
            * @see {@link https://dev.to/uilicious/javascript-array-push-is-945x-faster-than-array-concat-1oki}
         | 
| 10885 10885 | 
             
            * @example
         | 
| 10886 | 
            -
            *  | 
| 10886 | 
            +
            * let obj = {};
         | 
| 10887 10887 | 
             
            * extendArrayProperty(obj, "prop1", 1); // [1]
         | 
| 10888 10888 | 
             
            * extendArrayProperty(obj, "prop1", 2); // [1, 2]
         | 
| 10889 10889 | 
             
            * extendArrayProperty(obj, "prop1", [3, 4]); // [1, 2, 3, 4]
         | 
| @@ -10892,10 +10892,10 @@ var deepEqual = function (obj1, obj2) { | |
| 10892 10892 | 
             
            * extendArrayProperty(obj, "prop2", [7]); // [5, 6, 7]
         | 
| 10893 10893 | 
             
            * extendArrayProperty(obj, "prop2", null); // null
         | 
| 10894 10894 | 
             
            */
         | 
| 10895 | 
            -
             | 
| 10896 | 
            -
            	 | 
| 10895 | 
            +
            let extendArrayProperty = function (obj, propName, ary) {
         | 
| 10896 | 
            +
            	let objAry = null;
         | 
| 10897 10897 | 
             
            	if(ary) {
         | 
| 10898 | 
            -
            		 | 
| 10898 | 
            +
            		let objVal = obj[propName];
         | 
| 10899 10899 | 
             
            		if(objVal) {
         | 
| 10900 10900 | 
             
            			if(Array.isArray(objVal)) {
         | 
| 10901 10901 | 
             
            				objAry = objVal;
         | 
| @@ -10926,14 +10926,14 @@ var extendArrayProperty = function (obj, propName, ary) { | |
| 10926 10926 | 
             
            * @param {string|Array.<string>} item
         | 
| 10927 10927 | 
             
            * @return {string}
         | 
| 10928 10928 | 
             
            */
         | 
| 10929 | 
            -
             | 
| 10929 | 
            +
            let _encloseBracket = function(item) {
         | 
| 10930 10930 | 
             
            	return Array.isArray(item) ? "{\n" + item.join("\n") + "\n}" : item;
         | 
| 10931 10931 | 
             
            };
         | 
| 10932 10932 | 
             
            /** @private
         | 
| 10933 10933 | 
             
            * @param {string} str
         | 
| 10934 10934 | 
             
            * @return {string}
         | 
| 10935 10935 | 
             
            */
         | 
| 10936 | 
            -
             | 
| 10936 | 
            +
            let _indentBracketContent = function(str){
         | 
| 10937 10937 | 
             
            	return str.replace(/\n+/g, "\n\t").replace(/\n\t}$/, "\n}");
         | 
| 10938 10938 | 
             
            };
         | 
| 10939 10939 | 
             
            /** @public
         | 
| @@ -10949,11 +10949,11 @@ var _indentBracketContent = function(str){ | |
| 10949 10949 | 
             
            * ]
         | 
| 10950 10950 | 
             
            * ]);
         | 
| 10951 10951 | 
             
            */
         | 
| 10952 | 
            -
             | 
| 10952 | 
            +
            let prettifyCss = function(css) {
         | 
| 10953 10953 | 
             
            	if(css) {
         | 
| 10954 | 
            -
            		 | 
| 10954 | 
            +
            		let cssStr = "";
         | 
| 10955 10955 | 
             
            		if (Array.isArray(css)) {
         | 
| 10956 | 
            -
            			 | 
| 10956 | 
            +
            			let ary = css.map(_encloseBracket);
         | 
| 10957 10957 | 
             
            			cssStr = ary.join("\n").replace(/{\s*{/g, "{").replace(/\s+{/g, " {");
         | 
| 10958 10958 | 
             
            		} else {
         | 
| 10959 10959 | 
             
            			cssStr = (typeof css === "string") ? css : css + "";
         | 
| @@ -10970,9 +10970,9 @@ var prettifyCss = function(css) { | |
| 10970 10970 | 
             
            * @param {Element} elem
         | 
| 10971 10971 | 
             
            * @return {DocumentFragment}
         | 
| 10972 10972 | 
             
            */
         | 
| 10973 | 
            -
             | 
| 10973 | 
            +
            let getShadowRoot = function(elem) {
         | 
| 10974 10974 | 
             
            	if(elem) {
         | 
| 10975 | 
            -
            		 | 
| 10975 | 
            +
            		let rootNode;
         | 
| 10976 10976 | 
             
            		if(elem.shadowRoot) {
         | 
| 10977 10977 | 
             
            			rootNode = elem.shadowRoot;
         | 
| 10978 10978 | 
             
            		} else if(elem.getRootNode) {
         | 
| @@ -10994,23 +10994,23 @@ var getShadowRoot = function(elem) { | |
| 10994 10994 | 
             
            * @param {Element=} targetContext Element that needs the CSS
         | 
| 10995 10995 | 
             
            * @return {Element} New style tag
         | 
| 10996 10996 | 
             
            */
         | 
| 10997 | 
            -
             | 
| 10997 | 
            +
            let injectCss = function(cssStr, targetContext) {
         | 
| 10998 10998 | 
             
            	if(!cssStr) {
         | 
| 10999 10999 | 
             
            		return null;
         | 
| 11000 11000 | 
             
            	}
         | 
| 11001 11001 |  | 
| 11002 | 
            -
            	 | 
| 11002 | 
            +
            	let styleTag = document.createElement("style");
         | 
| 11003 11003 | 
             
            	styleTag.textContent = "\n" + cssStr + "\n";
         | 
| 11004 11004 |  | 
| 11005 | 
            -
            	 | 
| 11006 | 
            -
            	 | 
| 11005 | 
            +
            	let styleHost = getShadowRoot(targetContext);
         | 
| 11006 | 
            +
            	let isInShadow = true;
         | 
| 11007 11007 | 
             
            	if(!styleHost) {
         | 
| 11008 11008 | 
             
            		isInShadow = false;
         | 
| 11009 11009 | 
             
            		styleHost = document.head;
         | 
| 11010 11010 | 
             
            	}
         | 
| 11011 11011 |  | 
| 11012 11012 | 
             
            	// Find a place to insert the style tag
         | 
| 11013 | 
            -
            	 | 
| 11013 | 
            +
            	let beforeElem;
         | 
| 11014 11014 | 
             
            	if(isInShadow) {
         | 
| 11015 11015 | 
             
            		if(styleHost.children && styleHost.children.length) {
         | 
| 11016 11016 | 
             
            			beforeElem = styleHost.children[0];
         | 
| @@ -11028,8 +11028,8 @@ var injectCss = function(cssStr, targetContext) { | |
| 11028 11028 | 
             
            * @public
         | 
| 11029 11029 | 
             
            * @return {boolean}
         | 
| 11030 11030 | 
             
            */
         | 
| 11031 | 
            -
             | 
| 11032 | 
            -
            	 | 
| 11031 | 
            +
            let isIE = function () {
         | 
| 11032 | 
            +
            	let ua = window.navigator.userAgent;
         | 
| 11033 11033 | 
             
            	return (ua.indexOf('MSIE ') > 0) || (ua.indexOf('Trident/') > 0) || (ua.indexOf('Edge/') > 0);
         | 
| 11034 11034 | 
             
            };
         | 
| 11035 11035 |  | 
| @@ -11037,7 +11037,7 @@ var isIE = function () { | |
| 11037 11037 | 
             
            * @public
         | 
| 11038 11038 | 
             
            * @return {boolean}
         | 
| 11039 11039 | 
             
            */
         | 
| 11040 | 
            -
             | 
| 11040 | 
            +
            let isMac = function () {
         | 
| 11041 11041 | 
             
            	return /Mac/.test(navigator.platform);
         | 
| 11042 11042 | 
             
            };
         | 
| 11043 11043 |  | 
| @@ -11045,7 +11045,7 @@ var isMac = function () { | |
| 11045 11045 | 
             
            * @public
         | 
| 11046 11046 | 
             
            * @return {boolean}
         | 
| 11047 11047 | 
             
            */
         | 
| 11048 | 
            -
             | 
| 11048 | 
            +
            let isTouchDevice = function () {
         | 
| 11049 11049 | 
             
            	if ((navigator["maxTouchPoints"] && navigator["maxTouchPoints"] < 256) ||
         | 
| 11050 11050 | 
             
            		(navigator["msMaxTouchPoints"] && navigator["msMaxTouchPoints"] < 256)) {
         | 
| 11051 11051 | 
             
            		return true;
         | 
| @@ -11059,12 +11059,12 @@ var isTouchDevice = function () { | |
| 11059 11059 | 
             
            * @param {Array=} ary
         | 
| 11060 11060 | 
             
            * @return {Array}
         | 
| 11061 11061 | 
             
            */
         | 
| 11062 | 
            -
             | 
| 11062 | 
            +
            let nestedObjectToArray = function (obj, ary) {
         | 
| 11063 11063 | 
             
            	if (!ary) {
         | 
| 11064 11064 | 
             
            		ary = [];
         | 
| 11065 11065 | 
             
            	}
         | 
| 11066 | 
            -
            	for ( | 
| 11067 | 
            -
            		 | 
| 11066 | 
            +
            	for (let key in obj) {
         | 
| 11067 | 
            +
            		let element = obj[key];
         | 
| 11068 11068 | 
             
            		if ('object' === typeof element) {
         | 
| 11069 11069 | 
             
            			nestedObjectToArray(element, ary);
         | 
| 11070 11070 | 
             
            		} else {
         | 
| @@ -11088,21 +11088,21 @@ var nestedObjectToArray = function (obj, ary) { | |
| 11088 11088 | 
             
            * rgb2Hex("invalid"); // "invalid"
         | 
| 11089 11089 | 
             
            * rgb2Hex(null); // ""
         | 
| 11090 11090 | 
             
            */
         | 
| 11091 | 
            -
             | 
| 11091 | 
            +
            let rgb2Hex = function (rgbCode) {
         | 
| 11092 11092 | 
             
            	if(!rgbCode || typeof rgbCode !== "string") {
         | 
| 11093 11093 | 
             
            		return "";
         | 
| 11094 11094 | 
             
            	}
         | 
| 11095 11095 | 
             
            	if(rgbCode.charAt(0) === "#") {
         | 
| 11096 11096 | 
             
            		return rgbCode;
         | 
| 11097 11097 | 
             
            	}
         | 
| 11098 | 
            -
            	 | 
| 11098 | 
            +
            	let rgb = rgbCode.match(/\d+/g);
         | 
| 11099 11099 | 
             
            	if(!rgb || rgb.length < 3) {
         | 
| 11100 11100 | 
             
            		return rgbCode;
         | 
| 11101 11101 | 
             
            	}
         | 
| 11102 11102 |  | 
| 11103 | 
            -
            	 | 
| 11104 | 
            -
            	for( | 
| 11105 | 
            -
            		 | 
| 11103 | 
            +
            	let hex = "#";
         | 
| 11104 | 
            +
            	for(let i = 0; i < 3; i++) {
         | 
| 11105 | 
            +
            		let num = +rgb[i];
         | 
| 11106 11106 | 
             
            		if(!(num >= 16)) { // Handle NaN case
         | 
| 11107 11107 | 
             
            			hex += "0";
         | 
| 11108 11108 | 
             
            		}
         | 
| @@ -11116,12 +11116,12 @@ var rgb2Hex = function (rgbCode) { | |
| 11116 11116 | 
             
            * @param {*} data
         | 
| 11117 11117 | 
             
            * @return {string}
         | 
| 11118 11118 | 
             
            */
         | 
| 11119 | 
            -
             | 
| 11119 | 
            +
            let prepareTSVContent = function (data) {
         | 
| 11120 11120 | 
             
            	if (data == null) {
         | 
| 11121 11121 | 
             
            		return "";
         | 
| 11122 11122 | 
             
            	}
         | 
| 11123 11123 |  | 
| 11124 | 
            -
            	 | 
| 11124 | 
            +
            	let content = (typeof data === 'string') ? data : data.toString();
         | 
| 11125 11125 |  | 
| 11126 11126 | 
             
            	if (!content.length) { return ""; }
         | 
| 11127 11127 |  | 
| @@ -11150,7 +11150,7 @@ var prepareTSVContent = function (data) { | |
| 11150 11150 |  | 
| 11151 11151 | 
             
            /** @constructor
         | 
| 11152 11152 | 
             
            */
         | 
| 11153 | 
            -
             | 
| 11153 | 
            +
            let GroupDefinitions = function () {
         | 
| 11154 11154 | 
             
            	this._groupMap = {};
         | 
| 11155 11155 | 
             
            	this._childToParent = {};
         | 
| 11156 11156 | 
             
            };
         | 
| @@ -11184,14 +11184,14 @@ GroupDefinitions.getGroupId = function(groupDef) { | |
| 11184 11184 | 
             
            * @return {number} Return total number of parents. Return 0 if there is no parent.
         | 
| 11185 11185 | 
             
            */
         | 
| 11186 11186 | 
             
            GroupDefinitions.calcTreeDepth = function (groupMap, groupDef) {
         | 
| 11187 | 
            -
            	 | 
| 11188 | 
            -
            	 | 
| 11187 | 
            +
            	let curDepth = -1;
         | 
| 11188 | 
            +
            	let curNode = groupDef;
         | 
| 11189 11189 | 
             
            	while(curNode) { // WARNING: infinite loop could occured, if parentId is cycle back to one of the child group
         | 
| 11190 11190 | 
             
            		if(++curDepth > 15) {
         | 
| 11191 11191 | 
             
            			console.log("WARNING: Infinite loop detected during column group creation");
         | 
| 11192 11192 | 
             
            			break;
         | 
| 11193 11193 | 
             
            		}
         | 
| 11194 | 
            -
            		 | 
| 11194 | 
            +
            		let parentId = curNode.parentId;
         | 
| 11195 11195 | 
             
            		curNode = groupMap[parentId];
         | 
| 11196 11196 | 
             
            	}
         | 
| 11197 11197 | 
             
            	return curDepth;
         | 
| @@ -11202,22 +11202,22 @@ GroupDefinitions.calcTreeDepth = function (groupMap, groupDef) { | |
| 11202 11202 | 
             
            * @return {Array.<string>}
         | 
| 11203 11203 | 
             
            */
         | 
| 11204 11204 | 
             
            GroupDefinitions.getLeafDescendants = function (groupMap, groupId) {
         | 
| 11205 | 
            -
            	 | 
| 11205 | 
            +
            	let groupDef = groupMap[groupId];
         | 
| 11206 11206 | 
             
            	if(!groupDef) {
         | 
| 11207 11207 | 
             
            		return null;
         | 
| 11208 11208 | 
             
            	}
         | 
| 11209 11209 |  | 
| 11210 | 
            -
            	 | 
| 11211 | 
            -
            	 | 
| 11212 | 
            -
            	 | 
| 11213 | 
            -
            	 | 
| 11210 | 
            +
            	let leaves = [];
         | 
| 11211 | 
            +
            	let unvisitedGroups = [groupDef];
         | 
| 11212 | 
            +
            	let visitedCount = 0;
         | 
| 11213 | 
            +
            	let visitedMap = {};
         | 
| 11214 11214 | 
             
            	while(visitedCount < unvisitedGroups.length) {
         | 
| 11215 11215 | 
             
            		groupDef = unvisitedGroups[visitedCount++];
         | 
| 11216 11216 | 
             
            		visitedMap[groupDef.id] = true;
         | 
| 11217 | 
            -
            		 | 
| 11218 | 
            -
            		 | 
| 11219 | 
            -
            		for( | 
| 11220 | 
            -
            			 | 
| 11217 | 
            +
            		let chdr = groupDef.children;
         | 
| 11218 | 
            +
            		let len = chdr ? chdr.length : 0;
         | 
| 11219 | 
            +
            		for(let i = 0; i < len; ++i) {
         | 
| 11220 | 
            +
            			let childId = chdr[i];
         | 
| 11221 11221 | 
             
            			groupDef = groupMap[childId];
         | 
| 11222 11222 | 
             
            			if(groupDef) {
         | 
| 11223 11223 | 
             
            				if(!visitedMap[groupDef.id]) { // Prevent infinite loop
         | 
| @@ -11238,7 +11238,7 @@ GroupDefinitions.getLeafDescendants = function (groupMap, groupId) { | |
| 11238 11238 | 
             
            * @return {Object} Return a new object with guaranteed children property
         | 
| 11239 11239 | 
             
            */
         | 
| 11240 11240 | 
             
            GroupDefinitions._cloneObject = function(obj) {
         | 
| 11241 | 
            -
            	 | 
| 11241 | 
            +
            	let newObj = cloneObject(obj);
         | 
| 11242 11242 | 
             
            	if(Array.isArray(newObj.children)) { // This is to prevent modification from the outside source
         | 
| 11243 11243 | 
             
            		newObj.children = newObj.children.slice();
         | 
| 11244 11244 | 
             
            	} else {
         | 
| @@ -11254,7 +11254,7 @@ GroupDefinitions._cloneObject = function(obj) { | |
| 11254 11254 | 
             
            * @return {Object} Return a new object with guaranteed children property
         | 
| 11255 11255 | 
             
            */
         | 
| 11256 11256 | 
             
            GroupDefinitions._toGroupDefinition = function(obj, groupId) {
         | 
| 11257 | 
            -
            	 | 
| 11257 | 
            +
            	let groupDef = null;
         | 
| 11258 11258 | 
             
            	if(obj) {
         | 
| 11259 11259 | 
             
            		if(Array.isArray(obj)) {
         | 
| 11260 11260 | 
             
            			groupDef = {
         | 
| @@ -11277,11 +11277,11 @@ GroupDefinitions._toGroupDefinition = function(obj, groupId) { | |
| 11277 11277 | 
             
            * @return {string}
         | 
| 11278 11278 | 
             
            */
         | 
| 11279 11279 | 
             
            GroupDefinitions.prototype.toString = function() {
         | 
| 11280 | 
            -
            	 | 
| 11281 | 
            -
            	 | 
| 11280 | 
            +
            	let groupMap = this._groupMap;
         | 
| 11281 | 
            +
            	let lines = [];
         | 
| 11282 11282 | 
             
            	lines.push("=== groupDefs ===");
         | 
| 11283 | 
            -
            	for( | 
| 11284 | 
            -
            		 | 
| 11283 | 
            +
            	for(let key in groupMap) {
         | 
| 11284 | 
            +
            		let group = groupMap[key];
         | 
| 11285 11285 | 
             
            		lines.push(key + ": " + JSON.stringify(group, ["id", "parentId", "children"]));
         | 
| 11286 11286 | 
             
            	}
         | 
| 11287 11287 |  | 
| @@ -11314,9 +11314,9 @@ GroupDefinitions.prototype.getDefinition = GroupDefinitions.prototype.getGroup; | |
| 11314 11314 | 
             
            * @return {!Array.<Object>}
         | 
| 11315 11315 | 
             
            */
         | 
| 11316 11316 | 
             
            GroupDefinitions.prototype.getGroups = function () {
         | 
| 11317 | 
            -
            	 | 
| 11318 | 
            -
            	 | 
| 11319 | 
            -
            	for( | 
| 11317 | 
            +
            	let groupDefs = [];
         | 
| 11318 | 
            +
            	let groupMap = this._groupMap;
         | 
| 11319 | 
            +
            	for(let key in groupMap) {
         | 
| 11320 11320 | 
             
            		groupDefs.push(groupMap[key]);
         | 
| 11321 11321 | 
             
            	}
         | 
| 11322 11322 | 
             
            	return groupDefs;
         | 
| @@ -11338,11 +11338,11 @@ GroupDefinitions.prototype.getGroupMap = function () { | |
| 11338 11338 | 
             
            * @return {!Object.<string, Object>}
         | 
| 11339 11339 | 
             
            */
         | 
| 11340 11340 | 
             
            GroupDefinitions.prototype.cloneGroupMap = function () {
         | 
| 11341 | 
            -
            	 | 
| 11342 | 
            -
            	 | 
| 11343 | 
            -
            	for( | 
| 11344 | 
            -
            		 | 
| 11345 | 
            -
            		 | 
| 11341 | 
            +
            	let groupMap = this._groupMap;
         | 
| 11342 | 
            +
            	let outMap = {};
         | 
| 11343 | 
            +
            	for(let groupId in groupMap) {
         | 
| 11344 | 
            +
            		let groupDef = groupMap[groupId];
         | 
| 11345 | 
            +
            		let obj = GroupDefinitions._cloneObject(groupDef);
         | 
| 11346 11346 | 
             
            		outMap[groupId] = obj;
         | 
| 11347 11347 | 
             
            	}
         | 
| 11348 11348 | 
             
            	return outMap;
         | 
| @@ -11351,18 +11351,18 @@ GroupDefinitions.prototype.cloneGroupMap = function () { | |
| 11351 11351 | 
             
            * @public
         | 
| 11352 11352 | 
             
            */
         | 
| 11353 11353 | 
             
            GroupDefinitions.prototype.rebuildMap = function () {
         | 
| 11354 | 
            -
            	 | 
| 11355 | 
            -
            	 | 
| 11354 | 
            +
            	let groupMap = this._groupMap;
         | 
| 11355 | 
            +
            	let childToParent = this._childToParent = {};
         | 
| 11356 11356 |  | 
| 11357 11357 | 
             
            	// Create child to parent map
         | 
| 11358 | 
            -
            	 | 
| 11359 | 
            -
            	 | 
| 11360 | 
            -
            	 | 
| 11358 | 
            +
            	let groupIds = Object.keys(groupMap);
         | 
| 11359 | 
            +
            	let grpCount = groupIds.length;
         | 
| 11360 | 
            +
            	let i, groupId;
         | 
| 11361 11361 | 
             
            	for(i = 0; i < grpCount; ++i) {
         | 
| 11362 11362 | 
             
            		groupId = groupIds[i];
         | 
| 11363 | 
            -
            		 | 
| 11364 | 
            -
            		 | 
| 11365 | 
            -
            		for ( | 
| 11363 | 
            +
            		let chdr = groupMap[groupId].children;
         | 
| 11364 | 
            +
            		let childCount = chdr ? chdr.length : 0;
         | 
| 11365 | 
            +
            		for (let j = 0; j < childCount; j++) {
         | 
| 11366 11366 | 
             
            			childToParent[chdr[j]] = groupId;
         | 
| 11367 11367 | 
             
            		}
         | 
| 11368 11368 | 
             
            	}
         | 
| @@ -11370,7 +11370,7 @@ GroupDefinitions.prototype.rebuildMap = function () { | |
| 11370 11370 | 
             
            	// Apply a parent id to group definition to make it easier to find depth
         | 
| 11371 11371 | 
             
            	for(i = 0; i < grpCount; ++i) {
         | 
| 11372 11372 | 
             
            		groupId = groupIds[i];
         | 
| 11373 | 
            -
            		 | 
| 11373 | 
            +
            		let parentId = childToParent[groupId];
         | 
| 11374 11374 | 
             
            		if(parentId) {
         | 
| 11375 11375 | 
             
            			groupMap[groupId].parentId = parentId;
         | 
| 11376 11376 | 
             
            		}
         | 
| @@ -11383,7 +11383,7 @@ GroupDefinitions.prototype.rebuildMap = function () { | |
| 11383 11383 | 
             
            * @return {Array.<string>}
         | 
| 11384 11384 | 
             
            */
         | 
| 11385 11385 | 
             
            GroupDefinitions.prototype.getGroupChildren = function (groupId) {
         | 
| 11386 | 
            -
            	 | 
| 11386 | 
            +
            	let groupDef = this._groupMap[groupId];
         | 
| 11387 11387 | 
             
            	return groupDef ? groupDef.children : null;
         | 
| 11388 11388 | 
             
            };
         | 
| 11389 11389 | 
             
            /** Get all non-group descendants of the given group id.
         | 
| @@ -11409,12 +11409,12 @@ GroupDefinitions.prototype.getRootGroup = function (groupId) { | |
| 11409 11409 | 
             
            	if (!groupId) {
         | 
| 11410 11410 | 
             
            		return null;
         | 
| 11411 11411 | 
             
            	}
         | 
| 11412 | 
            -
            	 | 
| 11413 | 
            -
            	 | 
| 11412 | 
            +
            	let groupMap = this._groupMap;
         | 
| 11413 | 
            +
            	let groupDef = groupMap[groupId] || null;
         | 
| 11414 11414 | 
             
            	// TODO: Support column id
         | 
| 11415 11415 | 
             
            	if(groupDef) {
         | 
| 11416 11416 | 
             
            		while (groupDef.parentId) {
         | 
| 11417 | 
            -
            			 | 
| 11417 | 
            +
            			let parentDef = groupMap[groupDef.parentId];
         | 
| 11418 11418 | 
             
            			if(parentDef) {
         | 
| 11419 11419 | 
             
            				groupDef = parentDef;
         | 
| 11420 11420 | 
             
            			} else {
         | 
| @@ -11437,10 +11437,10 @@ GroupDefinitions.prototype.getParentGroup = function (childId) { | |
| 11437 11437 | 
             
            */
         | 
| 11438 11438 | 
             
            GroupDefinitions.prototype.getParentIds = function(childId) {
         | 
| 11439 11439 | 
             
            	if (childId && typeof childId === "string") {
         | 
| 11440 | 
            -
            		 | 
| 11440 | 
            +
            		let groupId = this._childToParent[childId];
         | 
| 11441 11441 | 
             
            		if (groupId) {
         | 
| 11442 | 
            -
            			 | 
| 11443 | 
            -
            			 | 
| 11442 | 
            +
            			let groupIds = [groupId];
         | 
| 11443 | 
            +
            			let group = this._groupMap[groupId];
         | 
| 11444 11444 | 
             
            			while (group && group.parentId) {
         | 
| 11445 11445 | 
             
            				group = this._groupMap[group.parentId];
         | 
| 11446 11446 | 
             
            				if (group) {
         | 
| @@ -11458,9 +11458,9 @@ GroupDefinitions.prototype.getParentIds = function(childId) { | |
| 11458 11458 | 
             
            * @return {string}
         | 
| 11459 11459 | 
             
            */
         | 
| 11460 11460 | 
             
            GroupDefinitions.prototype.getParentId = function (childId, groupLevel) {
         | 
| 11461 | 
            -
            	 | 
| 11461 | 
            +
            	let parentId = this._childToParent[childId];
         | 
| 11462 11462 | 
             
            	if(groupLevel != null) {
         | 
| 11463 | 
            -
            		 | 
| 11463 | 
            +
            		let currentLevel = this.getGroupLevel(parentId);
         | 
| 11464 11464 | 
             
            		while(currentLevel > groupLevel && parentId){
         | 
| 11465 11465 | 
             
            			parentId = this._childToParent[parentId];
         | 
| 11466 11466 | 
             
            			currentLevel--;
         | 
| @@ -11475,7 +11475,7 @@ GroupDefinitions.prototype.getParentId = function (childId, groupLevel) { | |
| 11475 11475 | 
             
            * @return {boolean}
         | 
| 11476 11476 | 
             
            */
         | 
| 11477 11477 | 
             
            GroupDefinitions.prototype.removeAllGroups = function () {
         | 
| 11478 | 
            -
            	for( | 
| 11478 | 
            +
            	for(let groupId in this._groupMap) { // eslint-disable-line
         | 
| 11479 11479 | 
             
            		this._groupMap = {};
         | 
| 11480 11480 | 
             
            		this._childToParent = {};
         | 
| 11481 11481 | 
             
            		return true;
         | 
| @@ -11488,13 +11488,13 @@ GroupDefinitions.prototype.removeAllGroups = function () { | |
| 11488 11488 | 
             
            */
         | 
| 11489 11489 | 
             
            GroupDefinitions.prototype.setGroups = function (groupDefs) {
         | 
| 11490 11490 | 
             
            	// Clear existing group structure
         | 
| 11491 | 
            -
            	 | 
| 11491 | 
            +
            	let groupMap = this._groupMap = {};
         | 
| 11492 11492 |  | 
| 11493 11493 | 
             
            	// Create group map
         | 
| 11494 | 
            -
            	 | 
| 11495 | 
            -
            	for ( | 
| 11496 | 
            -
            		 | 
| 11497 | 
            -
            		 | 
| 11494 | 
            +
            	let grpCount = groupDefs ? groupDefs.length : 0;
         | 
| 11495 | 
            +
            	for (let i = 0; i < grpCount; i++) {
         | 
| 11496 | 
            +
            		let groupDef = groupDefs[i];
         | 
| 11497 | 
            +
            		let groupId = groupDef.id;
         | 
| 11498 11498 | 
             
            		if(groupId) {
         | 
| 11499 11499 | 
             
            			groupMap[groupId] = GroupDefinitions._cloneObject(groupDef);
         | 
| 11500 11500 | 
             
            		}
         | 
| @@ -11508,7 +11508,7 @@ GroupDefinitions.prototype.setGroups = function (groupDefs) { | |
| 11508 11508 | 
             
            * @return {string} Return group ID
         | 
| 11509 11509 | 
             
            */
         | 
| 11510 11510 | 
             
            GroupDefinitions.prototype.addGroup = function (groupDef) {
         | 
| 11511 | 
            -
            	 | 
| 11511 | 
            +
            	let groupId = GroupDefinitions.getGroupId(groupDef);
         | 
| 11512 11512 | 
             
            	if(groupId) {
         | 
| 11513 11513 | 
             
            		return this.setGroup(groupId, groupDef);
         | 
| 11514 11514 | 
             
            	}
         | 
| @@ -11519,7 +11519,7 @@ GroupDefinitions.prototype.addGroup = function (groupDef) { | |
| 11519 11519 | 
             
            * @return {boolean}
         | 
| 11520 11520 | 
             
            */
         | 
| 11521 11521 | 
             
            GroupDefinitions.prototype.removeGroup = function (groupId) {
         | 
| 11522 | 
            -
            	 | 
| 11522 | 
            +
            	let curDef = this._groupMap[groupId];
         | 
| 11523 11523 | 
             
            	if(curDef) {
         | 
| 11524 11524 | 
             
            		this.removeAllChildren(groupId);
         | 
| 11525 11525 | 
             
            		this.unsetParent(groupId);
         | 
| @@ -11541,25 +11541,25 @@ GroupDefinitions.prototype.setGroup = function (groupId, groupDef) { | |
| 11541 11541 | 
             
            	}
         | 
| 11542 11542 |  | 
| 11543 11543 | 
             
            	if(groupDef) {
         | 
| 11544 | 
            -
            		 | 
| 11544 | 
            +
            		let newDef = GroupDefinitions._toGroupDefinition(groupDef, groupId);
         | 
| 11545 11545 | 
             
            		this._ungroupChildren(newDef.children);
         | 
| 11546 11546 |  | 
| 11547 | 
            -
            		 | 
| 11547 | 
            +
            		let curDef = this._groupMap[groupId];
         | 
| 11548 11548 | 
             
            		if(curDef) { // Replace
         | 
| 11549 11549 | 
             
            			this.removeAllChildren(groupId);
         | 
| 11550 11550 | 
             
            		}
         | 
| 11551 | 
            -
            		 | 
| 11551 | 
            +
            		let parentDef = this._childToParent[groupId];
         | 
| 11552 11552 | 
             
            		if(parentDef) {
         | 
| 11553 11553 | 
             
            			newDef.parentId = parentDef.id;
         | 
| 11554 11554 | 
             
            		}
         | 
| 11555 11555 | 
             
            		this._groupMap[groupId] = newDef;
         | 
| 11556 11556 |  | 
| 11557 | 
            -
            		 | 
| 11558 | 
            -
            		 | 
| 11559 | 
            -
            		for( | 
| 11560 | 
            -
            			 | 
| 11557 | 
            +
            		let chdr = newDef.children; // newDef is guaranteed to have children property
         | 
| 11558 | 
            +
            		let len = chdr.length;
         | 
| 11559 | 
            +
            		for(let i = 0; i < len; ++i) {
         | 
| 11560 | 
            +
            			let childId = chdr[i];
         | 
| 11561 11561 | 
             
            			this._childToParent[childId] = groupId;
         | 
| 11562 | 
            -
            			 | 
| 11562 | 
            +
            			let childDef = this._groupMap[childId];
         | 
| 11563 11563 | 
             
            			if(childDef) {
         | 
| 11564 11564 | 
             
            				childDef.parentId = groupId;
         | 
| 11565 11565 | 
             
            			}
         | 
| @@ -11579,8 +11579,8 @@ GroupDefinitions.prototype.setGroup = function (groupId, groupDef) { | |
| 11579 11579 | 
             
             */
         | 
| 11580 11580 | 
             
            GroupDefinitions.prototype._ungroupChildren = function(children) {
         | 
| 11581 11581 | 
             
            	if (Array.isArray(children)) {
         | 
| 11582 | 
            -
            		 | 
| 11583 | 
            -
            		for( | 
| 11582 | 
            +
            		let len = children.length;
         | 
| 11583 | 
            +
            		for(let i = 0; i < len; ++i) {
         | 
| 11584 11584 | 
             
            			this.unsetParent(children[i]);
         | 
| 11585 11585 | 
             
            		}
         | 
| 11586 11586 | 
             
            	}
         | 
| @@ -11593,9 +11593,9 @@ GroupDefinitions.prototype._ungroupChildren = function(children) { | |
| 11593 11593 | 
             
            * @return {boolean}
         | 
| 11594 11594 | 
             
            */
         | 
| 11595 11595 | 
             
            GroupDefinitions.prototype.hasGroupChild = function (parentId, childId) {
         | 
| 11596 | 
            -
            	 | 
| 11596 | 
            +
            	let groupDef = this._groupMap[parentId];
         | 
| 11597 11597 | 
             
            	if(childId && groupDef) {
         | 
| 11598 | 
            -
            		 | 
| 11598 | 
            +
            		let chdr = groupDef.children;
         | 
| 11599 11599 | 
             
            		if(chdr) {
         | 
| 11600 11600 | 
             
            			return chdr.indexOf(childId) >= 0; // TODO: Use childToParent map to improve performance
         | 
| 11601 11601 | 
             
            		}
         | 
| @@ -11613,8 +11613,8 @@ GroupDefinitions.prototype.contains = function (groupId, childId) { | |
| 11613 11613 | 
             
            		if(groupId === childId) {
         | 
| 11614 11614 | 
             
            			return true;
         | 
| 11615 11615 | 
             
            		}
         | 
| 11616 | 
            -
            		 | 
| 11617 | 
            -
            		 | 
| 11616 | 
            +
            		let levelLimit = 20;
         | 
| 11617 | 
            +
            		let parentId = this._childToParent[childId];
         | 
| 11618 11618 | 
             
            		while(parentId && levelLimit) { // WARNING: Circular dependency could happen
         | 
| 11619 11619 | 
             
            			if(groupId === parentId) {
         | 
| 11620 11620 | 
             
            				return true;
         | 
| @@ -11632,15 +11632,15 @@ GroupDefinitions.prototype.contains = function (groupId, childId) { | |
| 11632 11632 | 
             
            * @return {boolean}
         | 
| 11633 11633 | 
             
            */
         | 
| 11634 11634 | 
             
            GroupDefinitions.prototype.addGroupChild = function (parentId, childId, position) {
         | 
| 11635 | 
            -
            	 | 
| 11635 | 
            +
            	let groupDef = this._groupMap[parentId];
         | 
| 11636 11636 |  | 
| 11637 11637 | 
             
            	if(childId && groupDef) {
         | 
| 11638 | 
            -
            		 | 
| 11638 | 
            +
            		let chdr = groupDef.children;
         | 
| 11639 11639 | 
             
            		if(chdr && chdr.indexOf(childId) < 0) {
         | 
| 11640 11640 | 
             
            			this.unsetParent(childId); // Remove previous parent
         | 
| 11641 11641 | 
             
            			// Add new child to group structures
         | 
| 11642 11642 | 
             
            			this._childToParent[childId] = parentId;
         | 
| 11643 | 
            -
            			 | 
| 11643 | 
            +
            			let childDef = this._groupMap[childId];
         | 
| 11644 11644 | 
             
            			if(childDef) {
         | 
| 11645 11645 | 
             
            				childDef.parentId = parentId;
         | 
| 11646 11646 | 
             
            			}
         | 
| @@ -11675,20 +11675,20 @@ GroupDefinitions.prototype.removeGroupChild = function (parentId, childId) { | |
| 11675 11675 | 
             
            * @return {boolean}
         | 
| 11676 11676 | 
             
            */
         | 
| 11677 11677 | 
             
            GroupDefinitions.prototype.unsetParent = function (childId) {
         | 
| 11678 | 
            -
            	 | 
| 11678 | 
            +
            	let parentId = this._childToParent[childId];
         | 
| 11679 11679 | 
             
            	if(!parentId) {
         | 
| 11680 11680 | 
             
            		return false;
         | 
| 11681 11681 | 
             
            	}
         | 
| 11682 11682 | 
             
            	this._childToParent[childId] = "";
         | 
| 11683 | 
            -
            	 | 
| 11683 | 
            +
            	let childDef = this._groupMap[childId];
         | 
| 11684 11684 | 
             
            	if(childDef) {
         | 
| 11685 11685 | 
             
            		childDef.parentId = "";
         | 
| 11686 11686 | 
             
            	}
         | 
| 11687 | 
            -
            	 | 
| 11687 | 
            +
            	let parentDef = this._groupMap[parentId];
         | 
| 11688 11688 | 
             
            	if(parentDef) {
         | 
| 11689 | 
            -
            		 | 
| 11689 | 
            +
            		let chdr = parentDef.children;
         | 
| 11690 11690 | 
             
            		if(chdr && chdr.length) {
         | 
| 11691 | 
            -
            			 | 
| 11691 | 
            +
            			let at = chdr.indexOf(childId);
         | 
| 11692 11692 | 
             
            			if (at >= 0) {
         | 
| 11693 11693 | 
             
            				chdr.splice(at, 1); // splice is slow
         | 
| 11694 11694 | 
             
            			}
         | 
| @@ -11702,18 +11702,18 @@ GroupDefinitions.prototype.unsetParent = function (childId) { | |
| 11702 11702 | 
             
            * @return {boolean}
         | 
| 11703 11703 | 
             
            */
         | 
| 11704 11704 | 
             
            GroupDefinitions.prototype.removeAllChildren = function(groupId) {
         | 
| 11705 | 
            -
            	 | 
| 11705 | 
            +
            	let grpDef = this._groupMap[groupId];
         | 
| 11706 11706 | 
             
            	if(grpDef) {
         | 
| 11707 | 
            -
            		 | 
| 11708 | 
            -
            		 | 
| 11707 | 
            +
            		let chdr = grpDef.children;
         | 
| 11708 | 
            +
            		let len = chdr ? chdr.length : 0;
         | 
| 11709 11709 | 
             
            		if(len) {
         | 
| 11710 11710 | 
             
            			grpDef.children = [];
         | 
| 11711 | 
            -
            			for( | 
| 11712 | 
            -
            				 | 
| 11711 | 
            +
            			for(let i = 0; i < len; ++i) {
         | 
| 11712 | 
            +
            				let childId = chdr[i];
         | 
| 11713 11713 | 
             
            				if(this._childToParent[childId]) {
         | 
| 11714 11714 | 
             
            					this._childToParent[childId] = "";
         | 
| 11715 11715 | 
             
            				}
         | 
| 11716 | 
            -
            				 | 
| 11716 | 
            +
            				let childDef = this._groupMap[childId];
         | 
| 11717 11717 | 
             
            				if(childDef) {
         | 
| 11718 11718 | 
             
            					childDef.parentId = "";
         | 
| 11719 11719 | 
             
            				}
         | 
| @@ -11730,20 +11730,20 @@ GroupDefinitions.prototype.removeAllChildren = function(groupId) { | |
| 11730 11730 | 
             
            * @return {boolean}
         | 
| 11731 11731 | 
             
            */
         | 
| 11732 11732 | 
             
            GroupDefinitions.prototype.setGroupChildren = function (groupId, newChildList) {
         | 
| 11733 | 
            -
            	 | 
| 11733 | 
            +
            	let groupDef = this._groupMap[groupId];
         | 
| 11734 11734 | 
             
            	if(groupDef) {
         | 
| 11735 11735 | 
             
            		if(Array.isArray(newChildList)) {
         | 
| 11736 | 
            -
            			 | 
| 11736 | 
            +
            			let chdr = newChildList.slice();
         | 
| 11737 11737 | 
             
            			this._ungroupChildren(chdr);
         | 
| 11738 11738 | 
             
            			this.removeAllChildren(groupId);
         | 
| 11739 11739 | 
             
            			groupDef.children = chdr;
         | 
| 11740 11740 |  | 
| 11741 | 
            -
            			 | 
| 11742 | 
            -
            			 | 
| 11743 | 
            -
            			for( | 
| 11744 | 
            -
            				 | 
| 11741 | 
            +
            			let parentId = groupDef.id;
         | 
| 11742 | 
            +
            			let len = chdr.length;
         | 
| 11743 | 
            +
            			for(let i = 0; i < len; ++i) {
         | 
| 11744 | 
            +
            				let childId = chdr[i];
         | 
| 11745 11745 | 
             
            				this._childToParent[childId] = parentId;
         | 
| 11746 | 
            -
            				 | 
| 11746 | 
            +
            				let childDef = this._groupMap[childId];
         | 
| 11747 11747 | 
             
            				if(childDef) {
         | 
| 11748 11748 | 
             
            					childDef.parentId = parentId;
         | 
| 11749 11749 | 
             
            				}
         | 
| @@ -11763,7 +11763,7 @@ GroupDefinitions.prototype.setGroupChildren = function (groupId, newChildList) { | |
| 11763 11763 | 
             
            * @return {string}
         | 
| 11764 11764 | 
             
            */
         | 
| 11765 11765 | 
             
            GroupDefinitions.prototype.getGroupName = function (groupId) {
         | 
| 11766 | 
            -
            	 | 
| 11766 | 
            +
            	let groupDef = this._groupMap[groupId];
         | 
| 11767 11767 | 
             
            	if(groupDef) {
         | 
| 11768 11768 | 
             
            		return groupDef.name || "";
         | 
| 11769 11769 | 
             
            	}
         | 
| @@ -11775,7 +11775,7 @@ GroupDefinitions.prototype.getGroupName = function (groupId) { | |
| 11775 11775 | 
             
            * @return {boolean}
         | 
| 11776 11776 | 
             
            */
         | 
| 11777 11777 | 
             
            GroupDefinitions.prototype.setGroupName = function (groupId, groupName) {
         | 
| 11778 | 
            -
            	 | 
| 11778 | 
            +
            	let groupDef = this._groupMap[groupId];
         | 
| 11779 11779 | 
             
            	if(groupDef) {
         | 
| 11780 11780 | 
             
            		if(groupDef.name !== groupName) {
         | 
| 11781 11781 | 
             
            			groupDef.name = groupName;
         | 
| @@ -13131,7 +13131,7 @@ DataCache_DataCache._proto = DataCache_DataCache.prototype; | |
| 13131 13131 | 
             
            /** Abstract base class that provides event management methods for derived class
         | 
| 13132 13132 | 
             
            * @constructor
         | 
| 13133 13133 | 
             
            */
         | 
| 13134 | 
            -
             | 
| 13134 | 
            +
            let EventDispatcher_EventDispatcher = function () {};
         | 
| 13135 13135 |  | 
| 13136 13136 | 
             
            /** @type {Object.<string, Function>}
         | 
| 13137 13137 | 
             
            * @protected
         | 
| @@ -13156,7 +13156,7 @@ EventDispatcher_EventDispatcher.prototype.addEventListener = function(type, hand | |
| 13156 13156 | 
             
            		this._events = {};
         | 
| 13157 13157 | 
             
            	}
         | 
| 13158 13158 |  | 
| 13159 | 
            -
            	 | 
| 13159 | 
            +
            	let listeners = this._events[type];
         | 
| 13160 13160 | 
             
            	if(listeners) {
         | 
| 13161 13161 | 
             
            		if(listeners.indexOf(handler) < 0) {
         | 
| 13162 13162 | 
             
            			listeners.push(handler);
         | 
| @@ -13173,9 +13173,9 @@ EventDispatcher_EventDispatcher.prototype.addEventListener = function(type, hand | |
| 13173 13173 | 
             
            * @param {Function} handler Event handler
         | 
| 13174 13174 | 
             
            */
         | 
| 13175 13175 | 
             
            EventDispatcher_EventDispatcher.prototype.removeEventListener = function(type, handler) {
         | 
| 13176 | 
            -
            	 | 
| 13176 | 
            +
            	let listeners = (this._events) ? this._events[type] : null;
         | 
| 13177 13177 | 
             
            	if(listeners) {
         | 
| 13178 | 
            -
            		 | 
| 13178 | 
            +
            		let at = listeners.indexOf(handler);
         | 
| 13179 13179 | 
             
            		if(at >= 0) {
         | 
| 13180 13180 | 
             
            			listeners.splice(at, 1);
         | 
| 13181 13181 | 
             
            			--this._listenerCount;
         | 
| @@ -13198,7 +13198,7 @@ EventDispatcher_EventDispatcher.prototype.removeAllEventListeners = function() { | |
| 13198 13198 | 
             
            EventDispatcher_EventDispatcher.prototype.hasListener = function(type) {
         | 
| 13199 13199 | 
             
            	if(this._listenerCount) {
         | 
| 13200 13200 | 
             
            		if(type) {
         | 
| 13201 | 
            -
            			 | 
| 13201 | 
            +
            			let listeners = this._events ? this._events[type] : null;
         | 
| 13202 13202 | 
             
            			return listeners ? (listeners.length > 0) : false;
         | 
| 13203 13203 | 
             
            		} else {
         | 
| 13204 13204 | 
             
            			return true;
         | 
| @@ -13215,7 +13215,7 @@ EventDispatcher_EventDispatcher.prototype.hasListener = function(type) { | |
| 13215 13215 | 
             
            */
         | 
| 13216 13216 | 
             
            EventDispatcher_EventDispatcher.prototype.getListener = function(type, idx) {
         | 
| 13217 13217 | 
             
            	if(type) {
         | 
| 13218 | 
            -
            		 | 
| 13218 | 
            +
            		let listeners = this._events ? this._events[type] : null;
         | 
| 13219 13219 | 
             
            		if(listeners) {
         | 
| 13220 13220 | 
             
            			if(!idx) {
         | 
| 13221 13221 | 
             
            				idx = 0;
         | 
| @@ -13231,12 +13231,12 @@ EventDispatcher_EventDispatcher.prototype.getListener = function(type, idx) { | |
| 13231 13231 | 
             
            * @param {Object} obj Object that contains a handler with the same name as the given `type`
         | 
| 13232 13232 | 
             
            * @param {string} type Event name
         | 
| 13233 13233 | 
             
            * @example
         | 
| 13234 | 
            -
            *  | 
| 13234 | 
            +
            * let obj = {"mouseUp": function(e) { console.log(e); }};
         | 
| 13235 13235 | 
             
            * plugin.addListener(obj, "mouseUp");
         | 
| 13236 13236 | 
             
            * plugin.addListener(obj, "mouseDown");
         | 
| 13237 13237 | 
             
            */
         | 
| 13238 13238 | 
             
            EventDispatcher_EventDispatcher.prototype.addListener = function(obj, type) {
         | 
| 13239 | 
            -
            	 | 
| 13239 | 
            +
            	let func = obj ? obj[type] : null;
         | 
| 13240 13240 | 
             
            	if(typeof func === "function") {
         | 
| 13241 13241 | 
             
            		this.addEventListener(type, func);
         | 
| 13242 13242 | 
             
            	}
         | 
| @@ -13260,11 +13260,11 @@ EventDispatcher_EventDispatcher.prototype._prepareEventArguments = function(type | |
| 13260 13260 | 
             
            * @param {Object} eventArg Event arguments
         | 
| 13261 13261 | 
             
            */
         | 
| 13262 13262 | 
             
            EventDispatcher_EventDispatcher.prototype._dispatch = function(type, eventArg) {
         | 
| 13263 | 
            -
            	 | 
| 13263 | 
            +
            	let listeners = this._events ? this._events[type] : null;
         | 
| 13264 13264 | 
             
            	if(listeners) {
         | 
| 13265 13265 | 
             
            		eventArg = this._prepareEventArguments(type, eventArg);
         | 
| 13266 | 
            -
            		 | 
| 13267 | 
            -
            		for( | 
| 13266 | 
            +
            		let len = listeners.length;
         | 
| 13267 | 
            +
            		for(let i = 0; i < len; ++i) {
         | 
| 13268 13268 | 
             
            			listeners[i](eventArg);
         | 
| 13269 13269 | 
             
            		}
         | 
| 13270 13270 | 
             
            	}
         | 
| @@ -13274,7 +13274,7 @@ EventDispatcher_EventDispatcher.prototype._dispatch = function(type, eventArg) { | |
| 13274 13274 | 
             
            * @function
         | 
| 13275 13275 | 
             
            * @param {Event} e
         | 
| 13276 13276 | 
             
            */
         | 
| 13277 | 
            -
             | 
| 13277 | 
            +
            let preventDefault = function(e) {
         | 
| 13278 13278 | 
             
            	if(e && e.preventDefault) {
         | 
| 13279 13279 | 
             
            		e.preventDefault();
         | 
| 13280 13280 | 
             
            		e.stopPropagation();
         | 
| @@ -18498,12 +18498,12 @@ WrappedView.prototype.isRowFiltered = function(rid, rowData) { | |
| 18498 18498 | 
             
            * @param {(number|Function)=} ms The delay time in millisecond before executing the function
         | 
| 18499 18499 | 
             
            * @param {*=} thisObj "this" object to be bound with the given function. If the function is already bound, there is no need to provide thisObj parameter
         | 
| 18500 18500 | 
             
            * @example
         | 
| 18501 | 
            -
            *  | 
| 18502 | 
            -
            * for( | 
| 18501 | 
            +
            * let c = new Conflator(function() { console.log("Executed"); }, 1000);
         | 
| 18502 | 
            +
            * for(let i = 10; --i >= 0;) {
         | 
| 18503 18503 | 
             
            *   c.conflate(i); // Only one "Executed" text will be logged to console after one second
         | 
| 18504 18504 | 
             
            * }
         | 
| 18505 18505 | 
             
            */
         | 
| 18506 | 
            -
             | 
| 18506 | 
            +
            let Conflator = function (func, ms, thisObj) {
         | 
| 18507 18507 | 
             
            	this._onConflated = this._onConflated.bind(this);
         | 
| 18508 18508 |  | 
| 18509 18509 | 
             
            	this._data = [];
         | 
| @@ -18565,7 +18565,7 @@ Conflator.prototype.reset = function () { | |
| 18565 18565 | 
             
            */
         | 
| 18566 18566 | 
             
            Conflator.prototype.popAllData = function() {
         | 
| 18567 18567 | 
             
            	if(this._data.length) {
         | 
| 18568 | 
            -
            		 | 
| 18568 | 
            +
            		let data = this._data;
         | 
| 18569 18569 | 
             
            		this._data = [];
         | 
| 18570 18570 | 
             
            		return data;
         | 
| 18571 18571 | 
             
            	}
         | 
| @@ -21072,8 +21072,9 @@ DataView.prototype.stallSorting = function(bool) { | |
| 21072 21072 | 
             
            				this._dispatchDataChange(data_DataTable._positionChangeArg);
         | 
| 21073 21073 | 
             
            			}
         | 
| 21074 21074 | 
             
            		}
         | 
| 21075 | 
            +
            		return true;
         | 
| 21075 21076 | 
             
            	}
         | 
| 21076 | 
            -
            	return  | 
| 21077 | 
            +
            	return false;
         | 
| 21077 21078 | 
             
            };
         | 
| 21078 21079 |  | 
| 21079 21080 | 
             
            /** Automatically and asyncronuosly remove group that has no member or no content. Predefined groups will not be removed in this way.
         | 
| @@ -23941,12 +23942,12 @@ Virtualizer.prototype.setViewOffset = function (px) { | |
| 23941 23942 | 
             
            };
         | 
| 23942 23943 | 
             
            /** @public
         | 
| 23943 23944 | 
             
            * @ignore
         | 
| 23944 | 
            -
            * @param {number}  | 
| 23945 | 
            -
            * @param {number}  | 
| 23945 | 
            +
            * @param {number} startItemCount
         | 
| 23946 | 
            +
            * @param {number} endItemCount
         | 
| 23946 23947 | 
             
            */
         | 
| 23947 | 
            -
            Virtualizer.prototype.setViewBounds = function ( | 
| 23948 | 
            -
            	this._startOffsetCount =  | 
| 23949 | 
            -
            	this._endOffsetCount =  | 
| 23948 | 
            +
            Virtualizer.prototype.setViewBounds = function (startItemCount, endItemCount) {
         | 
| 23949 | 
            +
            	this._startOffsetCount = startItemCount > 0 ? startItemCount : 0;
         | 
| 23950 | 
            +
            	this._endOffsetCount = endItemCount > 0 ? endItemCount : 0;
         | 
| 23950 23951 | 
             
            	this.validateVirtualization(); // Everytime row height is changed
         | 
| 23951 23952 | 
             
            };
         | 
| 23952 23953 | 
             
            /** @public
         | 
| @@ -26027,7 +26028,7 @@ Core_Core.prototype._hasPendingRowChange = false; | |
| 26027 26028 | 
             
            * @return {string}
         | 
| 26028 26029 | 
             
            */
         | 
| 26029 26030 | 
             
            Core_Core.getVersion = function () {
         | 
| 26030 | 
            -
            	return "5.1. | 
| 26031 | 
            +
            	return "5.1.102";
         | 
| 26031 26032 | 
             
            };
         | 
| 26032 26033 | 
             
            /** {@link ElementWrapper#dispose}
         | 
| 26033 26034 | 
             
            * @override
         | 
| @@ -27228,6 +27229,16 @@ Core_Core.prototype._moveColumn = function (fromCol, destCol) { | |
| 27228 27229 | 
             
            		}
         | 
| 27229 27230 | 
             
            	}
         | 
| 27230 27231 |  | 
| 27232 | 
            +
            	// The deactivated column may be moved directly or indirectly to the current view. It's necessary to make all columns in view activated.
         | 
| 27233 | 
            +
            	if(!this._frozenLayout) {
         | 
| 27234 | 
            +
            		if(this._colVirtualizer.isEnabled()) {
         | 
| 27235 | 
            +
            			let vBegin = this._colVirtualizer.getFirstIndexInView();
         | 
| 27236 | 
            +
            			if(!((fromCol < vBegin && destCol < vBegin) || (fromCol > vEnd && destCol > vEnd))) { // Columns does not move between hidden columns
         | 
| 27237 | 
            +
            				this._activateColumns(vBegin, vEnd, vBegin, vEnd); // To confirm that all columns in view are activated
         | 
| 27238 | 
            +
            			}
         | 
| 27239 | 
            +
            		}
         | 
| 27240 | 
            +
            	}
         | 
| 27241 | 
            +
             | 
| 27231 27242 | 
             
            	// no need to invoke because moving column does not change column-width
         | 
| 27232 27243 | 
             
            	// this._syncLayoutToColumns(minColumn, this.getColumnCount());
         | 
| 27233 27244 |  | 
| @@ -31174,7 +31185,15 @@ Core_Core.prototype._updateScrollbarHeight = function (paneChanged, contentChang | |
| 31174 31185 | 
             
            		// HACK: Due to fixed layout size we need to scale view size instead of content size, when zooming
         | 
| 31175 31186 | 
             
            		// TODO: Check if zoom factor is used for virtualization correctly
         | 
| 31176 31187 | 
             
            		this._rowVirtualizer.setViewSize(viewSize / this._zoomFactor);
         | 
| 31177 | 
            -
             | 
| 31188 | 
            +
             | 
| 31189 | 
            +
            		let offsetRowCount = this._sectionStarts[this._startVScrollbarIndex];
         | 
| 31190 | 
            +
            		let footerCount = this.getFooterCount();
         | 
| 31191 | 
            +
            		let footerRowCount = 0;
         | 
| 31192 | 
            +
            		if(footerCount) {
         | 
| 31193 | 
            +
            			let sectionCount = this.getSectionCount();
         | 
| 31194 | 
            +
            			footerRowCount = this._sectionStarts[sectionCount] - this._sectionStarts[sectionCount - footerCount];
         | 
| 31195 | 
            +
            		}
         | 
| 31196 | 
            +
            		this._rowVirtualizer.setViewBounds(offsetRowCount, footerRowCount);
         | 
| 31178 31197 | 
             
            	} else {
         | 
| 31179 31198 | 
             
            		this._rowVirtualizer.validateVirtualization(); // Content height may be changed
         | 
| 31180 31199 | 
             
            	}
         | 
| @@ -32660,6 +32679,17 @@ SortableTitlePlugin.prototype._getPlugin = function(pluginName) { | |
| 32660 32679 | 
             
            	let host = this._hosts[0];
         | 
| 32661 32680 | 
             
            	return (host) ? host.getPlugin(pluginName) : null;
         | 
| 32662 32681 | 
             
            };
         | 
| 32682 | 
            +
             | 
| 32683 | 
            +
            /** @public
         | 
| 32684 | 
            +
            * @description Click title to sort with mouse event. This is for testing purpose.
         | 
| 32685 | 
            +
            * @ignore
         | 
| 32686 | 
            +
            * @param {Core} grid
         | 
| 32687 | 
            +
            * @param {Object=} mouseEvt
         | 
| 32688 | 
            +
            */
         | 
| 32689 | 
            +
            SortableTitlePlugin.prototype.clickTitleByMouse = function (grid, mouseEvt) {
         | 
| 32690 | 
            +
            	this._onClickTitle(grid, mouseEvt);
         | 
| 32691 | 
            +
            };
         | 
| 32692 | 
            +
             | 
| 32663 32693 | 
             
            /** @private
         | 
| 32664 32694 | 
             
            * @param {Core} grid
         | 
| 32665 32695 | 
             
            * @param {MouseEvent} e
         |