Socket
Socket
Sign inDemoInstall

@syncfusion/ej2-grids

Package Overview
Dependencies
15
Maintainers
3
Versions
357
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 22.2.12 to 23.1.36

2

dist/global/index.d.ts
/*!
* filename: index.d.ts
* version : 22.2.12
* version : 23.1.36
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.

@@ -5,0 +5,0 @@ * Use of this code is subject to the terms of our license.

{
"_from": "@syncfusion/ej2-grids@*",
"_id": "@syncfusion/ej2-grids@22.2.11",
"_id": "@syncfusion/ej2-grids@1.175.0",
"_inBundle": false,
"_integrity": "sha512-+bK8d0Ahr1KPyE6TbGMoUoqrE34MpUxUFKF8pUGP09T0Mjud8TpKspoKKICM3uEv6YuIR7LTpwQFkI5VCn17iw==",
"_integrity": "sha512-0RBgTZBAa7jrSK7uUu6CESHDxOrYf+LNmRL2K+H4iulCcmxz+ZjMwC8xpiVO7/Tawq2NOWD/ymJ8Xt5WPxvjKw==",
"_location": "/@syncfusion/ej2-grids",

@@ -32,6 +32,6 @@ "_phantomChildren": {},

],
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-grids/-/ej2-grids-22.2.11.tgz",
"_shasum": "b79f73c1ffd7d190ad327dbca1441e3405e0c499",
"_resolved": "https://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-grids/-/ej2-grids-1.175.0.tgz",
"_shasum": "dea0ee6fd8eba7b09a36b228ade5bb23d04154fe",
"_spec": "@syncfusion/ej2-grids@*",
"_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
"_where": "/jenkins/workspace/elease-automation_release_23.1.1/packages/included",
"author": {

@@ -42,17 +42,17 @@ "name": "Syncfusion Inc."

"dependencies": {
"@syncfusion/ej2-base": "~22.2.12",
"@syncfusion/ej2-buttons": "~22.2.9",
"@syncfusion/ej2-calendars": "~22.2.12",
"@syncfusion/ej2-compression": "~22.2.5",
"@syncfusion/ej2-data": "~22.2.5",
"@syncfusion/ej2-dropdowns": "~22.2.12",
"@syncfusion/ej2-excel-export": "~22.2.5",
"@syncfusion/ej2-file-utils": "~22.2.5",
"@syncfusion/ej2-inputs": "~22.2.12",
"@syncfusion/ej2-lists": "~22.2.11",
"@syncfusion/ej2-navigations": "~22.2.11",
"@syncfusion/ej2-notifications": "~22.2.5",
"@syncfusion/ej2-pdf-export": "~22.2.5",
"@syncfusion/ej2-popups": "~22.2.11",
"@syncfusion/ej2-splitbuttons": "~22.2.8"
"@syncfusion/ej2-base": "~23.1.36",
"@syncfusion/ej2-buttons": "~23.1.36",
"@syncfusion/ej2-calendars": "~23.1.36",
"@syncfusion/ej2-compression": "~23.1.36",
"@syncfusion/ej2-data": "~23.1.36",
"@syncfusion/ej2-dropdowns": "~23.1.36",
"@syncfusion/ej2-excel-export": "~23.1.36",
"@syncfusion/ej2-file-utils": "~23.1.36",
"@syncfusion/ej2-inputs": "~23.1.36",
"@syncfusion/ej2-lists": "~23.1.36",
"@syncfusion/ej2-navigations": "~23.1.36",
"@syncfusion/ej2-notifications": "~23.1.36",
"@syncfusion/ej2-pdf-export": "~23.1.36",
"@syncfusion/ej2-popups": "~23.1.36",
"@syncfusion/ej2-splitbuttons": "~23.1.36"
},

@@ -83,5 +83,5 @@ "deprecated": false,

"typings": "index.d.ts",
"version": "22.2.12",
"version": "23.1.36",
"sideEffects": false,
"homepage": "https://www.syncfusion.com/javascript-ui-controls"
}
import { FormValidator } from '@syncfusion/ej2-inputs';
import { IGrid } from '../base/interface';
import { freezeTable } from '../base/enum';
import { EditRender } from '../renderer/edit-renderer';

@@ -67,7 +66,5 @@ import { Row } from '../models/row';

private removeBatchElementChanges;
private removeHideAndSelection;
deleteRecord(fieldname?: string, data?: Object): void;
addRecord(data?: Object): void;
endEdit(): void;
private closeForm;
private validateFormObj;

@@ -88,12 +85,7 @@ batchSave(): void;

*/
addRowObject(row: Row<Column>, newTableName?: freezeTable): void;
addRowObject(row: Row<Column>): void;
private bulkDelete;
private refreshRowIdx;
private getIndexFromData;
private bulkAddRow;
private renderFrozenAddRow;
private removeFrozenTbody;
private renderMovable;
private findNextEditableCell;
private checkNPCell;
private getDefaultData;

@@ -100,0 +92,0 @@ private setCellIdx;

@@ -368,10 +368,2 @@ import { Observer, isBlazor, isNullOrUndefined } from '@syncfusion/ej2-base';

}
if (gObj.getFrozenColumns() !== 0) {
var movableContentTable = gObj.getContent().querySelector('.e-movablecontent').querySelector('.e-table');
movableContentTable.insertBefore(movableContentTable.querySelector("#" + gObj.element.id + "colGroup"), movableContentTable.querySelector('tbody'));
if (gObj.frozenRows) {
var movableHeaderTable = gObj.getHeaderContent().querySelector('.e-movableheader').querySelector('.e-table');
movableHeaderTable.insertBefore(movableHeaderTable.querySelector("#" + gObj.element.id + "colGroup"), movableHeaderTable.querySelector('tbody'));
}
}
};

@@ -378,0 +370,0 @@ BlazorAction.prototype.dataFailure = function (args) {

@@ -65,4 +65,4 @@ import { Browser, remove, EventHandler, isUndefined, closest, classList } from '@syncfusion/ej2-base';

var target = closest(document.activeElement, '.' + literals.rowCell);
if (!target || !grid.editSettings.allowEditing || grid.editSettings.mode !== 'Batch' ||
grid.selectionSettings.mode !== 'Cell' || grid.selectionSettings.cellSelectionMode === 'Flow' || !this.clipBoardTextArea) {
if (!this.clipBoardTextArea || !target || !grid.editSettings.allowEditing || grid.editSettings.mode !== 'Batch' ||
grid.selectionSettings.mode !== 'Cell' || grid.selectionSettings.cellSelectionMode === 'Flow') {
return;

@@ -97,18 +97,4 @@ }

var isAvail;
if (!grid.editSettings.allowEditing || grid.editSettings.mode !== 'Batch' ||
grid.selectionSettings.mode !== 'Cell' || grid.selectionSettings.cellSelectionMode === 'Flow') {
return;
}
var rows = data.split('\n');
var cols;
var dataRows = grid.getDataRows();
var mRows;
var frRows;
var isFrozen = this.parent.isFrozenGrid();
if (isFrozen) {
mRows = grid.getMovableDataRows();
if (grid.getFrozenRightColumnsCount()) {
frRows = grid.getFrozenRightDataRows();
}
}
for (var r = 0; r < rows.length; r++) {

@@ -123,12 +109,2 @@ cols = rows[parseInt(r.toString(), 10)].split('\t');

isAvail = grid.getCellFromIndex(rIdx, cIdx);
if (isFrozen) {
var fTr = dataRows[parseInt(rIdx.toString(), 10)];
var mTr = mRows[parseInt(rIdx.toString(), 10)];
isAvail = !fTr.querySelector('[data-colindex="' + cIdx + '"]') ?
mTr.querySelector('[data-colindex="' + cIdx + '"]') : true;
if (frRows && !isAvail) {
var frTr = frRows[parseInt(rIdx.toString(), 10)];
isAvail = frTr.querySelector('[data-colindex="' + cIdx + '"]');
}
}
if (!isAvail) {

@@ -189,13 +165,4 @@ cIdx++;

if (window.getSelection().toString() === '') {
var isFrozen = this.parent.isFrozenGrid();
this.clipBoardTextArea.value = this.copyContent = '';
var mRows = void 0;
var frRows = void 0;
var rows = this.parent.getDataRows();
if (isFrozen) {
mRows = this.parent.getMovableDataRows();
if (this.parent.getFrozenMode() === literals.leftRight || this.parent.getFrozenMode() === 'Right') {
frRows = this.parent.getFrozenRightRows();
}
}
if (this.parent.selectionSettings.mode !== 'Cell') {

@@ -217,28 +184,10 @@ var selectedIndexes = this.parent.getSelectedRowIndexes().sort(function (a, b) { return a - b; });

var leftCols = [];
var rightCols = [];
var movableCols = [];
if (isFrozen) {
movableCols.push.apply(movableCols, [].slice.call(mRows[selectedIndexes[parseInt(i.toString(), 10)]].
querySelectorAll('.e-rowcell:not(.e-hide)')));
if (this.parent.getFrozenMode() === 'Right' || this.parent.getFrozenMode() === literals.leftRight) {
rightCols.push.apply(rightCols, [].slice.call(frRows[selectedIndexes[parseInt(i.toString(), 10)]].
querySelectorAll('.e-rowcell:not(.e-hide)')));
}
if (this.parent.getFrozenMode() === 'Left' || this.parent.getFrozenMode() === literals.leftRight ||
(this.parent.isFrozenGrid() && !this.parent.getFrozenMode())) {
leftCols.push.apply(leftCols, [].slice.call(rows[selectedIndexes[parseInt(i.toString(), 10)]].
querySelectorAll('.e-rowcell:not(.e-hide)')));
}
var idx = selectedIndexes[parseInt(i.toString(), 10)];
if (!isGroupAdaptive(this.parent) && (this.parent.enableVirtualization ||
(this.parent.enableInfiniteScrolling && this.parent.infiniteScrollSettings.enableCache) ||
(this.parent.groupSettings.columns.length && this.parent.groupSettings.enableLazyLoading))) {
idx = rows.map(function (m) { return m.getAttribute('data-rowindex'); }).indexOf(selectedIndexes[parseInt(i.toString(), 10)].toString());
}
else {
var idx = selectedIndexes[parseInt(i.toString(), 10)];
if (!isGroupAdaptive(this.parent) && (this.parent.enableVirtualization ||
(this.parent.enableInfiniteScrolling && this.parent.infiniteScrollSettings.enableCache) ||
(this.parent.groupSettings.columns.length && this.parent.groupSettings.enableLazyLoading))) {
idx = rows.map(function (m) { return m.getAttribute('data-rowindex'); }).indexOf(selectedIndexes[parseInt(i.toString(), 10)].toString());
}
leftCols.push.apply(leftCols, [].slice.call(rows[parseInt(idx.toString(), 10)].querySelectorAll('.e-rowcell:not(.e-hide)')));
}
var cells = leftCols.concat(movableCols).concat(rightCols);
this.getCopyData(cells, false, '\t', withHeader);
leftCols.push.apply(leftCols, [].slice.call(rows[parseInt(idx.toString(), 10)].querySelectorAll('.e-rowcell:not(.e-hide)')));
this.getCopyData(leftCols, false, '\t', withHeader);
}

@@ -263,10 +212,2 @@ }

getElementsByClassName('e-cellselectionbackground'));
if (isFrozen) {
cells.push.apply(cells, [].slice.call(mRows[obj.rowIndexes[parseInt(i.toString(), 10)]]
.getElementsByClassName('e-cellselectionbackground')));
if (frRows) {
cells.push.apply(cells, [].slice.call(frRows[obj.rowIndexes[parseInt(i.toString(), 10)]]
.getElementsByClassName('e-cellselectionbackground')));
}
}
this.getCopyData(cells, false, '\t', withHeader);

@@ -273,0 +214,0 @@ }

@@ -61,3 +61,3 @@ import { classList, addClass, removeClass, isNullOrUndefined, Browser } from '@syncfusion/ej2-base';

var gridElement = this.parent.element;
if (!gridElement || (!gridElement.querySelector('.' + literals.gridHeader) && !gridElement.querySelector('.' + literals.gridContent))) {
if (!gridElement.querySelector('.' + literals.gridContent) && (!gridElement.querySelector('.' + literals.gridHeader)) || !gridElement) {
return;

@@ -119,3 +119,3 @@ }

if (!this.isCustomizeOpenCC) {
if (!isNullOrUndefined(closest(targetElement, '.e-cc')) || !isNullOrUndefined(closest(targetElement, '.e-cc-toolbar'))) {
if (!isNullOrUndefined(closest(targetElement, '.e-cc-toolbar')) || !isNullOrUndefined(closest(targetElement, '.e-cc'))) {
if (targetElement.classList.contains('e-columnchooser-btn') || targetElement.classList.contains('e-cc-toolbar')) {

@@ -540,5 +540,2 @@ if ((this.initialOpenDlg && this.dlgObj.visible) || !this.isDlgOpen) {

}
else {
return;
}
this.updateIntermediateBtn();

@@ -759,3 +756,3 @@ var columnUid = parentsUntil(elem, 'e-ccheck').getAttribute('uid');

for (var i = 0, dlgLen = openCC.length; i < dlgLen; i++) {
if (openCC[parseInt(i.toString(), 10)].classList.contains('e-dialog') || this.parent.element.id + '_ccdlg' !== openCC[parseInt(i.toString(), 10)].id) {
if (this.parent.element.id + '_ccdlg' !== openCC[parseInt(i.toString(), 10)].id || openCC[parseInt(i.toString(), 10)].classList.contains('e-dialog')) {
openCC[parseInt(i.toString(), 10)].ej2_instances[0].hide();

@@ -762,0 +759,0 @@ }

@@ -60,3 +60,3 @@ import { EventHandler, closest, Browser, isNullOrUndefined } from '@syncfusion/ej2-base';

var gridElement = this.parent.element;
if (!gridElement || (!gridElement.querySelector('.' + literals.gridHeader) && !gridElement.querySelector('.' + literals.gridContent))) {
if (!gridElement.querySelector('.' + literals.gridContent) && (!gridElement.querySelector('.' + literals.gridHeader)) || !gridElement) {
return;

@@ -411,5 +411,3 @@ }

}
if (!this.parent.isFrozenGrid()) {
this.parent.notify(events.restoreFocus, {});
}
this.parent.notify(events.restoreFocus, {});
};

@@ -613,3 +611,3 @@ ColumnMenu.prototype.getDefaultItems = function () {

ColumnMenu.prototype.getFilterPop = function () {
if (Browser.isDevice && this.targetColumn !== null && this.parent.filterSettings.type === 'Menu') {
if (this.targetColumn !== null && this.parent.filterSettings.type === 'Menu' && Browser.isDevice) {
return document.getElementById(this.targetColumn.uid + '-flmdlg');

@@ -616,0 +614,0 @@ }

@@ -1,2 +0,2 @@

import { closest, isNullOrUndefined } from '@syncfusion/ej2-base';
import { closest } from '@syncfusion/ej2-base';
import { click, keyPressed, commandClick, initialEnd, destroy } from '../base/constant';

@@ -59,3 +59,3 @@ import { CellType } from '../base/enum';

commandColumn: commandColumn,
rowData: isNullOrUndefined(row) ? undefined : row.data
rowData: row.data
};

@@ -62,0 +62,0 @@ this.parent.trigger(commandClick, args, function (commandclickargs) {

@@ -361,3 +361,3 @@ import { closest, isNullOrUndefined, EventHandler } from '@syncfusion/ej2-base';

ContextMenu.prototype.ensureFrozenHeader = function (targetElement) {
return (this.parent.isFrozenGrid() || this.parent.frozenRows)
return (this.parent.frozenRows)
&& closest(targetElement, menuClass.header) ? true : false;

@@ -364,0 +364,0 @@ };

@@ -24,2 +24,7 @@ import { IGrid } from '../base/interface';

constructor(parent?: IGrid, locator?: ServiceLocator);
/**
* @returns {void}
* @hidden
*/
addEventListener(): void;
private clickHandler;

@@ -26,0 +31,0 @@ private toogleExpandcollapse;

@@ -27,6 +27,14 @@ import { removeClass, addClass, extend } from '@syncfusion/ej2-base';

this.parent = parent;
this.serviceLocator = locator;
this.focus = locator.getService('focus');
this.addEventListener();
}
/**
* @returns {void}
* @hidden
*/
DetailRow.prototype.addEventListener = function () {
if (this.parent.isDestroyed) {
return;
}
this.focus = locator.getService('focus');
this.parent.on(events.click, this.clickHandler, this);

@@ -39,4 +47,3 @@ this.parent.on(events.destroy, this.destroy, this);

this.parent.on(events.destroyChildGrid, this.destroyChildGrids, this);
this.serviceLocator = locator;
}
};
DetailRow.prototype.clickHandler = function (e) {

@@ -43,0 +50,0 @@ if (e.target.classList.contains('e-icon-grightarrow') || e.target.classList.contains('e-icon-gdownarrow')

@@ -28,2 +28,4 @@ import { L10n } from '@syncfusion/ej2-base';

private dialogObj;
private fieldname;
private data;
private alertDObj;

@@ -33,3 +35,2 @@ private actionBeginFunction;

private onDataBoundFunction;
private isValidationApplied;
private preventObj;

@@ -203,3 +204,2 @@ private eventDetails;

removeEventListener(): void;
private onDataBound;
private actionComplete;

@@ -265,7 +265,2 @@ /**

private validationComplete;
/**
* @returns {void}
* @hidden
*/
resetMovableContentValidation(): void;
private createTooltip;

@@ -272,0 +267,0 @@ /**

@@ -21,3 +21,3 @@ import { closest, addClass, select } from '@syncfusion/ej2-base';

import { DataUtil } from '@syncfusion/ej2-data';
import { addRemoveEventListener, getColumnModelByFieldName, padZero } from '../base/util';
import { addRemoveEventListener, padZero } from '../base/util';
import * as literals from '../base/string-literals';

@@ -37,3 +37,4 @@ /**

this.editType = { 'Inline': InlineEdit, 'Normal': InlineEdit, 'Batch': BatchEdit, 'Dialog': DialogEdit };
this.isValidationApplied = false;
this.fieldname = '';
this.data = {};
/* @hidden */

@@ -136,3 +137,10 @@ this.editCellDialogClose = false;

}
this.isLastRow = tr.rowIndex === this.parent.getContent().querySelector('tr:last-child').rowIndex;
var lastTr = gObj.getContent().querySelector('tr:last-child');
var hdrTbody = gObj.getHeaderContent().querySelector('tbody');
if (gObj.frozenRows && isNullOrUndefined(lastTr) && hdrTbody && hdrTbody.querySelector('tr:last-child')) {
this.isLastRow = tr.rowIndex === parseInt(gObj.getHeaderContent().querySelector('tbody').querySelector('tr:last-child').getAttribute('data-rowindex'), 10);
}
else if (lastTr) {
this.isLastRow = tr.rowIndex === lastTr.rowIndex;
}
if (tr.style.display === 'none') {

@@ -226,2 +234,4 @@ return;

if (gObj.editSettings.showDeleteConfirmDialog) {
this.fieldname = fieldname;
this.data = data;
this.showDialog('ConfirmDelete', this.dialogObj);

@@ -390,2 +400,8 @@ return;

this.parent.getContent().firstElementChild.style.position = 'relative';
if (this.parent.isFrozenGrid()) {
if (this.parent.element.querySelector('.e-gridheader')) {
this.parent.element.querySelector('.e-gridheader').style.position = '';
}
this.parent.element.querySelector('.e-gridcontent').style.position = '';
}
};

@@ -449,3 +465,3 @@ Edit.prototype.createConfirmDlg = function () {

case this.l10n.getConstant('ConfirmDelete'):
this.editModule.deleteRecord();
this.editModule.deleteRecord(this.fieldname, this.data);
break;

@@ -493,6 +509,4 @@ case this.l10n.getConstant('CancelEdit'):

this.actionCompleteFunction = this.actionComplete.bind(this);
this.onDataBoundFunction = this.onDataBound.bind(this);
this.parent.addEventListener(events.actionBegin, this.actionBeginFunction);
this.parent.addEventListener(events.actionComplete, this.actionCompleteFunction);
this.parent.addEventListener(events.dataBound, this.onDataBoundFunction);
};

@@ -510,7 +524,3 @@ /**

this.parent.removeEventListener(events.actionBegin, this.actionBeginFunction);
this.parent.removeEventListener(events.dataBound, this.onDataBoundFunction);
};
Edit.prototype.onDataBound = function () {
this.resetMovableContentValidation();
};
Edit.prototype.actionComplete = function (e) {

@@ -803,3 +813,2 @@ var actions = ['add', 'beginEdit', 'save', 'delete', 'cancel', 'filterafteropen', 'filterchoicerequest'];

if (editedRow) {
var selector = editedRow.classList.contains('e-addedrow') ? 'e-addedrow' : 'e-editedrow';
var focusableEditCells = [].slice.call(editedRow.querySelectorAll('.e-input:not(.e-disabled)'));

@@ -813,21 +822,2 @@ var commandColCell = [].slice.call(editedRow.querySelectorAll('.e-unboundcell'));

}
if (this.parent.isFrozenGrid()) {
if (!isNullOrUndefined(this.parent.frozenRows) && (!isNullOrUndefined(parentsUntil(e.target, 'e-frozenheader')) ||
!isNullOrUndefined(parentsUntil(e.target, 'e-movableheader')))) {
var movableHeditedRow = this.parent.getHeaderContent().querySelector('.e-movableheader ' + '.' + selector);
focusableEditCells.push.apply(focusableEditCells, [].slice.call(movableHeditedRow.querySelectorAll('.e-input:not(.e-disabled)')));
if (this.parent.getFrozenMode() === 'Left-Right' || this.parent.getFrozenMode() === 'Right') {
var rightHEditRow = this.parent.getHeaderContent().querySelector('.e-frozen-right-header ' + '.' + selector);
focusableEditCells.push.apply(focusableEditCells, [].slice.call(rightHEditRow.querySelectorAll('.e-input:not(.e-disabled)')));
}
}
else {
var movableEditRow = this.parent.getContent().querySelector('.e-movablecontent ' + '.' + selector);
focusableEditCells.push.apply(focusableEditCells, [].slice.call(movableEditRow.querySelectorAll('.e-input:not(.e-disabled)')));
if (this.parent.getFrozenMode() === 'Left-Right' || this.parent.getFrozenMode() === 'Right') {
var rightFrEditRow = this.parent.getContent().querySelector('.e-frozen-right-content ' + '.' + selector);
focusableEditCells.push.apply(focusableEditCells, [].slice.call(rightFrEditRow.querySelectorAll('.e-input:not(.e-disabled)')));
}
}
}
var rowCell = parentsUntil(e.target, 'e-rowcell');

@@ -840,8 +830,2 @@ if ((rowCell === parentsUntil(focusableEditCells[focusableEditCells.length - 1], 'e-rowcell')

var rows = this.parent.getRows();
if (this.parent.getFrozenMode() === 'Left-Right' || this.parent.getFrozenMode() === 'Right') {
rows = this.parent.getFrozenRightRows();
}
if (this.parent.getFrozenColumns() || this.parent.getFrozenMode() === 'Left') {
rows = this.parent.getMovableRows();
}
var rowIndex = rows.map(function (m) { return m.getAttribute('data-uid'); }).indexOf(uid);

@@ -882,10 +866,7 @@ if (this.parent.frozenRows && parentsUntil(editedRow, 'e-content')) {

var gObj = this.parent;
var frzCols = gObj.isFrozenGrid();
var isInline = this.parent.editSettings.mode === 'Normal';
var idx = this.parent.getFrozenMode() === 'Right' && isInline ? 1 : 0;
var idx = 0;
var form = this.parent.editSettings.mode !== 'Dialog' ?
gObj.element.getElementsByClassName('e-gridform')[parseInt(idx.toString(), 10)] :
select('#' + gObj.element.id + '_dialogEdit_wrapper .e-gridform', document);
var index = this.parent.getFrozenMode() === 'Right' && isInline ? 0 : 1;
var mForm = gObj.element.getElementsByClassName('e-gridform')[parseInt(index.toString(), 10)];
var index = 1;
var rules = {};

@@ -904,12 +885,3 @@ var mRules = {};

}
if (frzCols && this.parent.editSettings.mode !== 'Dialog') {
this.parent.editModule.mFormObj = this.createFormObj(mForm, mRules);
if (this.parent.getFrozenMode() === literals.leftRight) {
var frForm = gObj.element.getElementsByClassName('e-gridform')[2];
this.parent.editModule.frFormObj = this.createFormObj(frForm, frRules);
}
}
else {
rules = extend(rules, mRules, frRules);
}
rules = extend(rules, mRules, frRules);
this.parent.editModule.formObj = this.createFormObj(form, newRule ? newRule : rules);

@@ -964,23 +936,3 @@ };

var field = inputElement.name;
var col = void 0;
if (field) {
col = getColumnModelByFieldName(this.parent, setComplexFieldID(field));
}
if (col && gObj.isFrozenGrid()) {
if (col.getFreezeTableName() === 'frozen-left') {
table = isFHdr ? gObj.getFrozenVirtualHeader().querySelector('table')
: gObj.getFrozenVirtualContent().querySelector('table');
}
else if (col.getFreezeTableName() === 'frozen-right') {
table = isFHdr ? gObj.getFrozenRightHeader().querySelector('table')
: gObj.getFrozenRightContent().querySelector('table');
}
else if (col.getFreezeTableName() === 'movable') {
table = isFHdr ? gObj.getMovableVirtualHeader().querySelector('table')
: gObj.getMovableVirtualContent().querySelector('table');
}
}
else {
table = isFHdr ? gObj.getHeaderTable() : gObj.getContentTable();
}
table = this.parent.isFrozenGrid() ? gObj.element : isFHdr ? gObj.getHeaderTable() : gObj.getContentTable();
}

@@ -1017,19 +969,4 @@ else {

};
/**
* @returns {void}
* @hidden
*/
Edit.prototype.resetMovableContentValidation = function () {
if (this.isValidationApplied && this.parent.getMovableVirtualContent() &&
!(this.parent.enableVirtualization || this.parent.enableInfiniteScrolling)) {
var elem = this.parent.getContent().querySelector('.' + literals.movableContent);
elem.style.overflowX = 'auto';
elem.style.overflowY = 'hidden';
this.isValidationApplied = false;
}
};
Edit.prototype.createTooltip = function (element, error, name, display) {
var column = this.parent.getColumnByField(name);
var formObj = this.parent.getFrozenMode() === literals.leftRight && this.parent.editSettings.mode === 'Normal'
&& column.getFreezeTableName() === literals.frozenRight ? this.frFormObj.element : this.formObj.element;
var formObj = this.formObj.element;
var customForm = parentsUntil(element, 'e-virtual-validation');

@@ -1040,7 +977,2 @@ if (customForm) {

var gcontent = this.parent.getContent().firstElementChild;
var frzCols = this.parent.getFrozenColumns() || this.parent.getFrozenLeftColumnsCount()
|| this.parent.getFrozenRightColumnsCount();
if (frzCols) {
gcontent = this.parent.getMovableVirtualContent();
}
var isScroll = gcontent.scrollHeight > gcontent.clientHeight || gcontent.scrollWidth > gcontent.clientWidth;

@@ -1050,3 +982,2 @@ var isInline = this.parent.editSettings.mode !== 'Dialog';

var row = closest(element, '.' + literals.row);
var fCont = this.parent.getContent().querySelector('.' + literals.frozenContent);
var isFHdr;

@@ -1056,9 +987,7 @@ var isFHdrLastRow = false;

var isBatchModeLastRow = false;
var isSpace = this.parent.editSettings.newRowPosition === 'Bottom' &&
this.parent.getContent().firstElementChild.offsetHeight > this.parent.getContentTable().scrollHeight;
var viewPortRowCount = Math.round(this.parent.getContent().clientHeight / this.parent.getRowHeight()) - 1;
var rows = !fCont ? [].slice.call(this.parent.getContent().getElementsByClassName(literals.row))
: [].slice.call(this.parent.getFrozenVirtualContent().getElementsByClassName(literals.row));
var rows = [].slice.call(this.parent.getContent().getElementsByClassName(literals.row));
if (this.parent.editSettings.mode === 'Batch') {
if (viewPortRowCount > 1 && rows.length >= viewPortRowCount && !isSpace
rows = [].slice.call(this.parent.getContent().querySelectorAll('.e-row:not(.e-hiddenrow)'));
if (viewPortRowCount >= 1 && rows.length >= viewPortRowCount
&& rows[rows.length - 1].getAttribute(literals.dataRowIndex) === row.getAttribute(literals.dataRowIndex)) {

@@ -1070,8 +999,11 @@ isBatchModeLastRow = true;

if (this.parent.frozenRows) {
var fHeraderRows = frzCols ? this.parent.getFrozenVirtualHeader().querySelector(literals.tbody).children
: this.parent.getHeaderTable().querySelector(literals.tbody).children;
isFHdr = fHeraderRows.length > (parseInt(row.getAttribute(literals.dataRowIndex), 10) || 0);
isFHdrLastRow = isFHdr && parseInt(row.getAttribute(literals.dataRowIndex), 10) === fHeraderRows.length - 1;
var fHearderRows = [].slice.call(this.parent.getHeaderTable().querySelector(literals.tbody).querySelectorAll('.e-row:not(.e-hiddenrow)'));
isFHdr = fHearderRows.length > (parseInt(row.getAttribute(literals.dataRowIndex), 10) || 0);
isFHdrLastRow = isFHdr && parseInt(row.getAttribute(literals.dataRowIndex), 10) === fHearderRows.length - 1;
var insertRow = [].slice.call(this.parent.getHeaderTable().querySelector(literals.tbody).querySelectorAll('.e-row:not(.e-hiddenrow)'));
if (insertRow.length === 1 && (insertRow[0].classList.contains('e-addedrow') || insertRow[0].classList.contains('e-insertedrow'))) {
isFHdrLastRow = true;
}
}
if (isFHdrLastRow || (viewPortRowCount > 1 && rows.length >= viewPortRowCount
if (isFHdrLastRow || (viewPortRowCount >= 1 && rows.length >= viewPortRowCount
&& ((this.parent.editSettings.newRowPosition === 'Bottom' && (this.editModule.args

@@ -1095,4 +1027,3 @@ && this.editModule.args.requestType === 'add')) || (td.classList.contains('e-lastrowcell')

styles: 'display:' + display + ';top:' +
((isFHdr ? inputClient.top + inputClient.height : inputClient.bottom - client.top
- (frzCols ? fCont.scrollTop : 0)) + table.scrollTop + 9) + 'px;left:' +
((isFHdr ? inputClient.top + inputClient.height : inputClient.bottom - client.top) + table.scrollTop + 9) + 'px;left:' +
(inputClient.left - left + table.scrollLeft + inputClient.width / 2) + 'px;' +

@@ -1122,3 +1053,3 @@ 'max-width:' + inputClient.width + 'px;text-align:center;'

div.appendChild(arrow);
if (!customForm && (frzCols || this.parent.frozenRows) && this.parent.editSettings.mode !== 'Dialog') {
if (!customForm && (this.parent.frozenRows) && this.parent.editSettings.mode !== 'Dialog') {
var getEditCell = this.parent.editSettings.mode === 'Normal' ?

@@ -1130,4 +1061,19 @@ closest(element, '.e-editcell') : closest(element, '.' + literals.table);

(closest(element, '.' + literals.frozenContent) || closest(element, '.' + literals.frozenHeader))
|| (this.parent.frozenRows && !frzCols)) {
formObj.appendChild(div);
|| (this.parent.frozenRows)) {
if (this.parent.isFrozenGrid()) {
if (td.classList.contains('e-unfreeze')) {
addClass([div], 'e-unfreeze');
formObj.appendChild(div);
}
else {
var elem = closest(td, '.e-gridheader') ? this.parent.element.querySelector('.e-gridheader') :
rows.length === 1 ? this.parent.element.querySelector('.e-gridcontent').querySelector('.e-content') :
this.parent.element.querySelector('.e-gridcontent');
elem.appendChild(div);
elem.style.position = 'relative';
}
}
else {
formObj.appendChild(div);
}
}

@@ -1143,8 +1089,31 @@ else {

else {
this.formObj.element.appendChild(div);
if (this.parent.isFrozenGrid()) {
if (td.classList.contains('e-unfreeze')) {
addClass([div], 'e-unfreeze');
this.formObj.element.appendChild(div);
}
else {
var elem = closest(td, '.e-gridheader') ? this.parent.element.querySelector('.e-gridheader') :
rows.length === 1 ? this.parent.element.querySelector('.e-gridcontent').querySelector('.e-content') :
this.parent.element.querySelector('.e-gridcontent');
elem.appendChild(div);
elem.style.position = 'relative';
}
}
else {
this.formObj.element.appendChild(div);
}
}
}
if (!isNullOrUndefined(td)) {
if (td.classList.contains('e-fixedfreeze')) {
div.classList.add('e-fixederror');
}
else if (td.classList.contains('e-leftfreeze') || td.classList.contains('e-rightfreeze')) {
div.classList.add('e-freezeerror');
}
}
if (!validationForBottomRowPos && isInline && gcontent.getBoundingClientRect().bottom < inputClient.bottom + inputClient.height) {
var contentDiv = this.parent.getContent().querySelector('.e-content');
if (frzCols && this.parent.currentViewData.length === 0 && contentDiv.scrollTop === 0) {
if (this.parent.currentViewData.length === 0 && contentDiv.scrollTop === 0) {
contentDiv.scrollTop = div.offsetHeight + arrow.scrollHeight;

@@ -1161,3 +1130,3 @@ }

}
if ((frzCols || this.parent.frozenRows) && this.parent.editSettings.mode !== 'Dialog') {
if (this.parent.frozenRows && this.parent.editSettings.mode !== 'Dialog') {
div.style.left = input.offsetLeft + (input.offsetWidth / 2 - div.offsetWidth / 2) + 'px';

@@ -1168,16 +1137,10 @@ }

}
if (isInline && !isScroll && !this.parent.allowPaging || frzCols || this.parent.frozenRows) {
gcontent.style.position = 'static';
if (isInline && !isScroll && !this.parent.allowPaging || this.parent.frozenRows) {
// gcontent.style.position = 'static';
var pos = calculateRelativeBasedPosition(input, div);
div.style.top = pos.top + inputClient.height + 9 + 'px';
}
if (closest(element, '.' + literals.movableContent) && !this.parent.enableVirtualization && !this.parent.enableInfiniteScrolling) {
var elem = this.parent.getContent().querySelector('.' + literals.movableContent);
elem.style.overflowX = 'visible';
elem.style.overflowY = 'visible';
this.isValidationApplied = true;
}
if (validationForBottomRowPos) {
if (isScroll && !frzCols && this.parent.height !== 'auto' && !this.parent.frozenRows
&& !this.parent.enableVirtualization) {
if (isScroll && this.parent.height !== 'auto' && !this.parent.frozenRows
&& !this.parent.enableVirtualization && !(div.classList.contains('e-freezeerror') && div.classList.contains('e-fixederror'))) {
var scrollWidth = gcontent.scrollWidth > gcontent.offsetWidth ? getScrollBarWidth() : 0;

@@ -1184,0 +1147,0 @@ var gHeight = this.parent.height.toString().indexOf('%') === -1 ?

@@ -75,2 +75,3 @@ import { IGrid, ExcelExportProperties } from '../base/interface';

private processRecordRows;
private processDetailTemplate;
private setImage;

@@ -77,0 +78,0 @@ private childGridCell;

@@ -99,3 +99,3 @@ import * as events from '../base/constant';

this.gridPool = {};
if (grid.childGrid && !(!isNullOrUndefined(exportProperties) && exportProperties.hierarchyExportMode === 'None')) {
if ((grid.childGrid || grid.detailTemplate) && !(!isNullOrUndefined(exportProperties) && exportProperties.hierarchyExportMode === 'None')) {
grid.expandedRows = getPrintGridModel(grid).expandedRows;

@@ -133,3 +133,3 @@ }

this.isExporting = false;
this.parent.trigger(events.excelExportComplete, this.isBlob ? { promise: this.blobPromise } : {});
this.parent.trigger(events.excelExportComplete, this.isBlob ? { promise: this.blobPromise } : { gridInstance: this.parent });
this.parent.log('exporting_complete', this.getModuleName());

@@ -355,7 +355,6 @@ resolve(this.book);

var excelRows = [];
var isFrozen = this.parent.isFrozenGrid() && !this.parent.getFrozenColumns();
if (!isNullOrUndefined(exportProperties) && !isNullOrUndefined(exportProperties.theme)) {
this.theme = exportProperties.theme;
}
if (gObj.childGrid && !isNullOrUndefined(exportProperties)) {
if ((gObj.childGrid || gObj.detailTemplate) && !isNullOrUndefined(exportProperties)) {
gObj.hierarchyPrintMode = exportProperties.hierarchyExportMode || 'Expanded';

@@ -366,3 +365,3 @@ }

prepareColumns(exportProperties.columns, gObj.enableColumnVirtualization) :
helper.getGridExportColumns(isFrozen ? gObj.getColumns() : gObj.columns);
helper.getGridExportColumns(gObj.columns);
var headerRow = helper.getHeaders(gColumns, this.includeHiddenColumn);

@@ -630,16 +629,23 @@ var groupIndent = gObj.groupSettings.columns.length ? gObj.groupSettings.columns.length - 1 : 0;

}
if ((row.isExpand || this.isChild) && !isNullOrUndefined(gObj.childGrid)) {
gObj.isPrinting = true;
var exportType = (!isNullOrUndefined(excelExportProperties) && excelExportProperties.exportType) ?
excelExportProperties.exportType : 'AllPages';
var returnVal = this.helper.createChildGrid(gObj, row, exportType, this.gridPool);
var childGridObj = returnVal.childGrid;
var element = returnVal.element;
childGridObj.actionFailure =
helper.failureHandler(this.gridPool, childGridObj, this.globalResolve);
childGridObj.childGridLevel = gObj.childGridLevel + 1;
var args = { childGrid: childGridObj, row: row, exportProperties: excelExportProperties };
this.parent.trigger(events.exportDetailDataBound, args);
childGridObj.beforeDataBound = this.childGridCell(excelRow, childGridObj, excelExportProperties, row);
childGridObj.appendTo(element);
if ((row.isExpand || this.isChild) && (!isNullOrUndefined(gObj.childGrid) || !isNullOrUndefined(gObj.detailTemplate))) {
if (!isNullOrUndefined(gObj.childGrid)) {
gObj.isPrinting = true;
var exportType = (!isNullOrUndefined(excelExportProperties) && excelExportProperties.exportType) ?
excelExportProperties.exportType : 'AllPages';
var returnVal = this.helper.createChildGrid(gObj, row, exportType, this.gridPool);
var childGridObj = returnVal.childGrid;
var element = returnVal.element;
childGridObj.actionFailure =
helper.failureHandler(this.gridPool, childGridObj, this.globalResolve);
childGridObj.childGridLevel = gObj.childGridLevel + 1;
var args = { childGrid: childGridObj, row: row, exportProperties: excelExportProperties };
this.parent.trigger(events.exportDetailDataBound, args);
childGridObj.beforeDataBound = this.childGridCell(excelRow, childGridObj, excelExportProperties, row);
childGridObj.appendTo(element);
}
else {
var args = { parentRow: row, row: excelRow, value: {}, action: 'excelexport', gridInstance: gObj };
this.parent.trigger(events.exportDetailTemplate, args);
excelRow.childRows = this.processDetailTemplate(args);
}
}

@@ -650,2 +656,142 @@ gObj.notify(events.exportRowDataBound, { rowObj: row, type: 'excel', excelRows: excelRows });

};
ExcelExport.prototype.processDetailTemplate = function (templateData) {
var _this = this;
var rows = [];
var templateRowHeight;
var detailIndent = 2;
var detailCellIndex;
if (templateData.value.columnHeader || templateData.value.rows) {
var processCell_1 = function (currentCell, isHeader) {
var cell = {};
if (isNullOrUndefined(currentCell.index)) {
currentCell.index = detailCellIndex;
detailCellIndex++;
}
cell.index = currentCell.index + detailIndent;
if (!isNullOrUndefined(currentCell.value)) {
cell.value = currentCell.value;
}
if (!isNullOrUndefined(currentCell.colSpan)) {
cell.colSpan = currentCell.colSpan;
}
if (!isNullOrUndefined(currentCell.rowSpan)) {
cell.rowSpan = currentCell.rowSpan;
}
if (isHeader) {
cell.style = _this.getHeaderThemeStyle(_this.theme);
}
else {
cell.style = _this.getRecordThemeStyle(_this.theme);
}
if (!isNullOrUndefined(currentCell.style)) {
var cellStyle = {
fontColor: currentCell.style.fontColor,
fontName: currentCell.style.fontName,
fontSize: currentCell.style.fontSize,
hAlign: currentCell.style.excelHAlign,
vAlign: currentCell.style.excelVAlign,
rotation: currentCell.style.excelRotation,
bold: currentCell.style.bold,
indent: currentCell.style.indent,
italic: currentCell.style.italic,
underline: currentCell.style.underline,
backColor: currentCell.style.backColor,
wrapText: currentCell.style.wrapText,
borders: currentCell.style.excelBorders,
numberFormat: currentCell.style.excelNumberFormat,
type: currentCell.style.excelType,
strikeThrough: currentCell.style.strikeThrough
};
cell.style = _this.mergeOptions(cellStyle, cell.style);
}
if (!isNullOrUndefined(currentCell.image) && !isNullOrUndefined(currentCell.image.base64)) {
if (currentCell.rowSpan > 1) {
_this.setImage(currentCell, cell.index);
}
else {
templateRowHeight = _this.setImage(currentCell, cell.index);
if (currentCell.image.height && currentCell.value !== '') {
templateRowHeight += 30;
}
}
}
if (!isNullOrUndefined(currentCell.hyperLink)) {
cell.hyperlink = { target: currentCell.hyperLink.target };
cell.value = currentCell.hyperLink.displayText;
}
return cell;
};
var processRow = function (currentRow, isHeader) {
var excelDetailCells = [];
detailCellIndex = 0;
for (var j = 0; j < currentRow.cells.length; j++) {
var currentCell = currentRow.cells[parseInt(j.toString(), 10)];
var detailCell = processCell_1(currentCell, isHeader);
excelDetailCells.push(detailCell);
}
var row = { index: _this.rowLength++, cells: excelDetailCells };
if (!isNullOrUndefined(templateRowHeight)) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
row.height = templateRowHeight;
templateRowHeight = null;
}
rows.push(row);
};
if (templateData.value.columnHeader) {
for (var i = 0; i < templateData.value.columnHeader.length; i++) {
processRow(templateData.value.columnHeader[parseInt(i.toString(), 10)], true);
}
}
if (templateData.value.rows) {
for (var i = 0; i < templateData.value.rows.length; i++) {
processRow(templateData.value.rows[parseInt(i.toString(), 10)]);
}
}
}
else if (templateData.value.image) {
templateRowHeight = this.setImage(templateData.value, detailIndent);
var row = {
index: this.rowLength++,
cells: [{
index: detailIndent,
style: this.getRecordThemeStyle(this.theme)
}]
};
if (!isNullOrUndefined(templateRowHeight)) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
row.height = templateRowHeight;
templateRowHeight = null;
}
rows.push(row);
}
else if (templateData.value.text) {
var row = {
index: this.rowLength++,
cells: [{
index: detailIndent,
value: templateData.value.text,
style: this.getRecordThemeStyle(this.theme)
}]
};
rows.push(row);
}
else if (templateData.value.hyperLink) {
var row = {
index: this.rowLength++,
cells: [{
index: 2,
hyperlink: { target: templateData.value.hyperLink.target },
value: templateData.value.hyperLink.displayText,
style: this.getRecordThemeStyle(this.theme)
}]
};
rows.push(row);
}
for (var i = 0; i < rows.length; i++) {
rows[parseInt(i.toString(), 10)].grouping = {
outlineLevel: 1, isCollapsed: !templateData.parentRow.isExpand, isHidden: !templateData.parentRow.isExpand
};
}
return rows;
};
ExcelExport.prototype.setImage = function (args, idx) {

@@ -652,0 +798,0 @@ if (isNullOrUndefined(this.sheet.images)) {

@@ -47,3 +47,3 @@ import { Row } from './../models/row';

options.index = startIndex;
if (gObj.childGrid) {
if (gObj.childGrid || gObj.detailTemplate) {
if (gObj.hierarchyPrintMode === 'All') {

@@ -50,0 +50,0 @@ options.isExpand = true;

import * as events from '../base/constant';
import { RenderType } from '../base/enum';
import { FreezeRender, FreezeContentRender } from '../renderer/freeze-renderer';
import { VirtualFreezeRenderer, VirtualFreezeHdrRenderer, ColumnVirtualFreezeRenderer } from '../renderer/virtual-freeze-renderer';
import { ColumnFreezeContentRenderer, ColumnFreezeHeaderRenderer } from '../renderer/column-freeze-renderer';
/**

@@ -29,26 +25,2 @@ * `Freeze` module is used to handle Frozen rows and columns.

this.parent.log('limitation', this.getModuleName());
var renderer = this.locator.getService('rendererFactory');
if (this.parent.getFrozenColumns()) {
if (this.parent.enableColumnVirtualization) {
renderer.addRenderer(RenderType.Header, new VirtualFreezeHdrRenderer(this.parent, this.locator));
}
else {
renderer.addRenderer(RenderType.Header, new FreezeRender(this.parent, this.locator));
}
if (this.parent.enableVirtualization) {
renderer.addRenderer(RenderType.Content, new VirtualFreezeRenderer(this.parent, this.locator));
}
else {
renderer.addRenderer(RenderType.Content, new FreezeContentRender(this.parent, this.locator));
}
}
if (this.parent.getFrozenLeftColumnsCount() || this.parent.getFrozenRightColumnsCount()) {
renderer.addRenderer(RenderType.Header, new ColumnFreezeHeaderRenderer(this.parent, this.locator));
if (this.parent.enableVirtualization) {
renderer.addRenderer(RenderType.Content, new ColumnVirtualFreezeRenderer(this.parent, this.locator));
}
else {
renderer.addRenderer(RenderType.Content, new ColumnFreezeContentRenderer(this.parent, this.locator));
}
}
};

@@ -55,0 +27,0 @@ Freeze.prototype.removeEventListener = function () {

@@ -37,4 +37,2 @@ import { IGrid, IAction } from '../base/interface';

private isInitialMovableRender;
private frozenFrag;
private movableFrag;
private editRowIndex;

@@ -91,3 +89,2 @@ private virtualInfiniteData;

private resetCurrentViewData;
private deleteComplate;
private modelChanged;

@@ -140,3 +137,2 @@ private infiniteAddActionBegin;

private setInitialCache;
private createFrozenCache;
private setInitialGroupCache;

@@ -143,0 +139,0 @@ private resetContentModuleCache;

import { extend, select } from '@syncfusion/ej2-base';
import { remove, isNullOrUndefined, updateBlazorTemplate } from '@syncfusion/ej2-base';
import { parentsUntil, isGroupAdaptive, refreshForeignData, getObject, gridActionHandler } from '../base/util';
import { parentsUntil, isGroupAdaptive, refreshForeignData, getObject } from '../base/util';
import * as events from '../base/constant';
import { RowRenderer } from '../renderer/row-renderer';
import { DataUtil } from '@syncfusion/ej2-data';
import { addRemoveEventListener } from '../base/util';
import { addRemoveEventListener, addFixedColumnBorder } from '../base/util';
import * as literals from '../base/string-literals';

@@ -92,3 +92,3 @@ /**

this.rowIndex = this.editRowIndex = parseInt(tr.getAttribute(literals.dataRowIndex), 10);
if (gObj.enableVirtualization || gObj.enableInfiniteScrolling) {
if (gObj.enableVirtualization || gObj.enableColumnVirtualization || gObj.enableInfiniteScrolling) {
var selector = '.e-row[data-rowindex="' + this.rowIndex + '"]';

@@ -106,3 +106,4 @@ var virtualRow = this.parent.element.querySelector(selector);

}
else if (!this.previousData && (this.parent.enableVirtualization || this.parent.enableInfiniteScrolling)) {
else if (!this.previousData && (this.parent.enableVirtualization ||
this.parent.enableColumnVirtualization || this.parent.enableInfiniteScrolling)) {
this.previousData = e.data;

@@ -202,6 +203,5 @@ }

});
var index = gObj.getFrozenMode() === 'Right' ? 1 : 0;
var isDlg = gObj.editSettings.mode === 'Dialog';
var dlgWrapper = select('#' + gObj.element.id + '_dialogEdit_wrapper', document);
var dlgForm = isDlg ? dlgWrapper.querySelector('.e-gridform') : gObj.element.getElementsByClassName('e-gridform')[parseInt(index.toString(), 10)];
var dlgForm = isDlg ? dlgWrapper.querySelector('.e-gridform') : gObj.element.getElementsByClassName('e-gridform')[0];
var data = {

@@ -211,3 +211,3 @@ virtualData: extend({}, {}, this.previousData, true), isAdd: false, isScroll: false, endEdit: true

this.parent.notify(events.getVirtualData, data);
if ((this.parent.enableVirtualization || this.parent.enableInfiniteScrolling)
if ((this.parent.enableVirtualization || this.parent.enableColumnVirtualization || this.parent.enableInfiniteScrolling)
&& this.parent.editSettings.mode === 'Normal' && Object.keys(data.virtualData).length) {

@@ -221,23 +221,2 @@ if (this.parent.isEdit) {

}
if (gObj.isFrozenGrid() && gObj.editSettings.mode === 'Normal') {
var mhdrFrm = gObj.getMovableVirtualHeader().querySelector('.e-gridform');
var mCntFrm = gObj.getMovableVirtualContent().querySelector('.e-gridform');
var mvblEle = [mhdrFrm || mCntFrm];
var frHdrFrm = void 0;
var frCntFrm = void 0;
var frEle = [];
if (gObj.getFrozenMode() === literals.leftRight) {
frHdrFrm = gObj.getFrozenRightHeader().querySelector('.e-gridform');
frCntFrm = gObj.getFrozenRightContent().querySelector('.e-gridform');
frEle = [frHdrFrm || frCntFrm];
}
gridActionHandler(this.parent, function (tableName, elements) {
for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) {
var ele = elements_1[_i];
if (ele) {
editedData = gObj.editModule.getCurrentEditedData(ele, editedData);
}
}
}, [[], mvblEle, frEle]);
}
var eleLength = [].slice.call(gObj.element.getElementsByClassName(literals.editedRow)).length;

@@ -273,3 +252,2 @@ if (!data.isAdd && Object.keys(this.currentVirtualData).length && !eleLength) {

}
gObj.editModule.resetMovableContentValidation();
};

@@ -379,5 +357,7 @@ NormalEdit.prototype.destroyElements = function () {

}
if (this.parent.isFrozenGrid() && this.cloneFrozen) {
if (this.cloneFrozen) {
this.cloneFrozen.remove();
this.frozen.classList.remove('e-hiddenrow');
if (this.frozen) {
this.frozen.classList.remove('e-hiddenrow');
}
}

@@ -416,3 +396,2 @@ };

NormalEdit.prototype.refreshRow = function (data) {
var frzCols = this.parent.isFrozenGrid();
var row = new RowRenderer(this.serviceLocator, null, this.parent);

@@ -428,11 +407,22 @@ var rowObj = this.parent.getRowObjectFromUID(this.uid);

var tr = [].slice.call(this.parent.element.querySelectorAll('[data-rowindex="' + rowObj.index + '"]'));
if (frzCols && tr.length) {
for (var i = 0; i < tr.length; i++) {
var rowUid = tr[parseInt(i.toString(), 10)].getAttribute('data-uid');
if (rowUid !== this.uid) {
rowObj = this.parent.getRowObjectFromUID(rowUid);
rowObj.changes = data;
refreshForeignData(rowObj, this.parent.getForeignKeyColumns(), rowObj.changes);
row.refresh(rowObj, this.parent.getColumns(), true);
this.parent.editModule.checkLastRow(tr[parseInt(i.toString(), 10)]);
for (var i = 0; i < tr.length; i++) {
addFixedColumnBorder(tr[parseInt(i.toString(), 10)]);
if (this.parent.enableColumnVirtualization &&
tr[parseInt(i.toString(), 10)].querySelectorAll('.e-leftfreeze,.e-rightfreeze,.e-fixedfreeze').length) {
var cols = this.parent.getColumns();
var leftrightCells = [].slice.call(tr[parseInt(i.toString(), 10)].querySelectorAll('.e-leftfreeze,.e-rightfreeze.e-fixedfreeze'));
for (var j = 0; j < leftrightCells.length; j++) {
if (leftrightCells[parseInt(j.toString(), 10)].classList.contains('e-leftfreeze')) {
leftrightCells[parseInt(j.toString(), 10)].style.left = (cols[parseInt(j.toString(), 10)].valueX - this.parent.translateX) + 'px';
}
else if (leftrightCells[parseInt(j.toString(), 10)].classList.contains('e-rightfreeze')) {
var idx = parseInt(leftrightCells[parseInt(j.toString(), 10)].getAttribute('data-colindex'), 10);
leftrightCells[parseInt(j.toString(), 10)].style.right = ((cols[parseInt(idx.toString(), 10)].valueX + this.parent.translateX)) + 'px';
}
else {
leftrightCells[parseInt(j.toString(), 10)].style.left = (this.parent.leftrightColumnWidth('left') -
this.parent.translateX) + 'px';
leftrightCells[parseInt(j.toString(), 10)].style.right = (this.parent.leftrightColumnWidth('right') +
this.parent.translateX) + 'px';
}
}

@@ -476,3 +466,2 @@ }

}
gObj.editModule.resetMovableContentValidation();
gObj.trigger(events.actionComplete, closeEditArgs);

@@ -500,3 +489,3 @@ });

for (var i = 0; i < cols.length; i++) {
if (rowData.isScroll && cols[parseInt(i.toString(), 10)].getFreezeTableName() !== 'movable') {
if (rowData.isScroll) {
continue;

@@ -516,3 +505,3 @@ }

};
if ((this.parent.enableVirtualization || this.parent.infiniteScrollSettings.enableCache)
if ((this.parent.enableVirtualization || this.parent.enableColumnVirtualization || this.parent.infiniteScrollSettings.enableCache)
&& Object.keys(rowData.virtualData).length) {

@@ -579,3 +568,3 @@ args.data = args.rowData = rowData.virtualData;

}
if (this.parent.enableVirtualization && args.data.length > 1) {
if ((this.parent.enableVirtualization || this.parent.enableColumnVirtualization) && args.data.length > 1) {
var uid = this.parent.getSelectedRows()[0].getAttribute('data-uid');

@@ -582,0 +571,0 @@ args.data = [this.parent.getRowObjectFromUID(uid).data];

@@ -108,2 +108,3 @@ import { IGrid, PdfExportProperties } from '../base/interface';

private processRecord;
private processDetailTemplate;
private setHyperLink;

@@ -110,0 +111,0 @@ private childGridCell;

@@ -14,2 +14,3 @@ import { IGrid, IAction, NotifyArgs } from '../base/interface';

private fromCol;
private idx;
private parent;

@@ -30,2 +31,3 @@ /**

private moveColumns;
private refreshColumnIndex;
private targetParentContainerIndex;

@@ -84,3 +86,2 @@ private getAllStackedheaderParentColumns;

private updateScrollPostion;
private updateFrozenScrollPosition;
private setScrollLeft;

@@ -87,0 +88,0 @@ private stopTimer;

@@ -18,2 +18,3 @@ import { extend, isNullOrUndefined } from '@syncfusion/ej2-base';

function Reorder(parent) {
this.idx = 0;
this.parent = parent;

@@ -76,23 +77,18 @@ if (this.parent.isDestroyed) {

var subCols = [];
if (!this.parent.getFrozenColumns() && this.parent.isFrozenGrid()) {
return this.parent.getColumns();
}
else {
for (var i = 0, len = cols.length; i < len; i++) {
if (!isNullOrUndefined(cols[parseInt(i.toString(), 10)])) {
if (cols[parseInt(i.toString(), 10)].visible) {
columnModel.push(cols[parseInt(i.toString(), 10)]);
}
else if (isNotStackedHeader) {
columnModel.push(cols[parseInt(i.toString(), 10)]);
}
if (cols[parseInt(i.toString(), 10)].columns) {
subCols = subCols.concat(cols[parseInt(i.toString(), 10)].columns);
}
for (var i = 0, len = cols.length; i < len; i++) {
if (!isNullOrUndefined(cols[parseInt(i.toString(), 10)])) {
if (cols[parseInt(i.toString(), 10)].visible) {
columnModel.push(cols[parseInt(i.toString(), 10)]);
}
else if (isNotStackedHeader) {
columnModel.push(cols[parseInt(i.toString(), 10)]);
}
if (cols[parseInt(i.toString(), 10)].columns) {
subCols = subCols.concat(cols[parseInt(i.toString(), 10)].columns);
}
}
if (subCols.length) {
columnModel = columnModel.concat(this.getColumnsModel(subCols));
}
}
if (subCols.length) {
columnModel = columnModel.concat(this.getColumnsModel(subCols));
}
return columnModel;

@@ -164,7 +160,6 @@ };

}
var isFrozen = !gObj.getFrozenColumns() && gObj.isFrozenGrid();
var parent = this.getColParent(column, this.parent.columns);
var cols = parent ? parent.columns : isFrozen ? this.parent.getColumns() : this.parent.columns;
var cols = parent ? parent.columns : this.parent.columns;
var srcIdx = inArray(column, cols);
if (((this.parent.isFrozenGrid() && parent) || this.parent.lockcolPositionCount) && !reorderByColumn &&
if ((parent || this.parent.lockcolPositionCount) && !reorderByColumn &&
!this.parent.enableColumnVirtualization) {

@@ -203,2 +198,22 @@ for (var i = 0; i < cols.length; i++) {

}
if (this.parent.isFrozenGrid()) {
if (this.parent.frozenColumns) {
for (var i = 0; i < cols.length; i++) {
if (cols[parseInt(i.toString(), 10)].freeze === 'Left') {
cols[parseInt(i.toString(), 10)].freeze = undefined;
}
}
}
else {
if (this.parent.getFrozenLeftCount() > destIndex) {
column.freeze = 'Left';
}
else if ((cols.length - this.parent.getFrozenRightColumnsCount()) <= destIndex) {
column.freeze = 'Right';
}
else {
column.freeze = column.freeze === 'Fixed' ? 'Fixed' : undefined;
}
}
}
gObj.getColumns(true);

@@ -211,6 +226,20 @@ gObj.notify(events.columnPositionChanged, { fromIndex: destIndex, toIndex: srcIdx });

}
if (this.parent.isFrozenGrid()) {
var cols_1 = this.parent.columns;
this.idx = 0;
this.refreshColumnIndex(cols_1);
this.parent.notify(events.refreshFrozenPosition, {});
}
};
Reorder.prototype.refreshColumnIndex = function (cols) {
for (var i = 0; i < cols.length; i++) {
cols[parseInt(i.toString(), 10)].index = this.idx;
this.idx++;
if (cols[parseInt(i.toString(), 10)].columns && cols[parseInt(i.toString(), 10)].columns.length) {
this.refreshColumnIndex(cols[parseInt(i.toString(), 10)].columns);
}
}
};
Reorder.prototype.targetParentContainerIndex = function (srcElem, destElem) {
var cols = !this.parent.getFrozenColumns() && this.parent.isFrozenGrid() ? this.parent.getColumns() :
this.parent.columns;
var cols = this.parent.columns;
var headers = this.getHeaderCells();

@@ -242,63 +271,3 @@ var stackedHdrColumn = this.parent.getStackedColumns(cols);

Reorder.prototype.getHeaderCells = function () {
var frozenColumns = this.parent.getFrozenColumns();
if (frozenColumns || this.parent.isFrozenGrid() || this.parent.lockcolPositionCount) {
var fTh = void 0;
var mTh = void 0;
var fHeaders = [];
var fRows = [].slice.call(this.parent.getHeaderTable().getElementsByClassName('e-columnheader'));
if (frozenColumns || this.parent.isFrozenGrid()) {
var mRows = [].slice.call(this.parent.getHeaderContent()
.querySelector('.' + literals.movableHeader).getElementsByClassName('e-columnheader'));
for (var i = 0; i < fRows.length; i++) {
fTh = [].slice.call(fRows[parseInt(i.toString(), 10)].getElementsByClassName('e-headercell'));
mTh = [].slice.call(mRows[parseInt(i.toString(), 10)].getElementsByClassName('e-headercell'));
var isAvail = void 0;
for (var k = 0; k < fTh.length; k++) {
for (var j = 0; j < mTh.length; j++) {
if (mTh[parseInt(j.toString(), 10)].innerText === fTh[parseInt(k.toString(), 10)].innerText && parseInt(mTh[parseInt(j.toString(), 10)].getAttribute('data-colindex'), 10) ===
parseInt(fTh[parseInt(k.toString(), 10)].getAttribute('data-colindex'), 10)) {
isAvail = true;
break;
}
}
if (!isAvail) {
fHeaders = fHeaders.concat([fTh[parseInt(k.toString(), 10)]]);
}
}
for (var j = 0; j < mTh.length; j++) {
fHeaders.push(mTh[parseInt(j.toString(), 10)]);
}
}
if (this.parent.getFrozenRightColumnsCount()) {
var frRows = [].slice.call(this.parent.getHeaderContent().querySelector('.e-frozen-right-header')
.getElementsByClassName('e-columnheader'));
var frTh = [].slice.call(frRows[0].getElementsByClassName('e-headercell'));
for (var i = 0; i < frTh.length; i++) {
fHeaders.push(frTh[parseInt(i.toString(), 10)]);
}
}
}
else {
for (var i = 0; i < fRows.length; i++) {
mTh = [].slice.call(fRows[parseInt(i.toString(), 10)].getElementsByClassName('e-headercell'));
for (var k = 0; k < mTh.length; k++) {
var isAvail = void 0;
for (var j = k + 1; j < mTh.length; j++) {
if (mTh[parseInt(j.toString(), 10)].innerText === mTh[parseInt(k.toString(), 10)].innerText && parseInt(mTh[parseInt(j.toString(), 10)].getAttribute('data-colindex'), 10) ===
parseInt(mTh[parseInt(k.toString(), 10)].getAttribute('data-colindex'), 10)) {
isAvail = true;
break;
}
}
if (!isAvail) {
fHeaders = fHeaders.concat([mTh[parseInt(k.toString(), 10)]]);
}
}
}
}
return fHeaders;
}
else {
return [].slice.call(this.parent.element.getElementsByClassName('e-headercell'));
}
return [].slice.call(this.parent.element.getElementsByClassName('e-headercell'));
};

@@ -416,3 +385,3 @@ Reorder.prototype.getColParent = function (column, columns) {

Reorder.prototype.createReorderElement = function (e) {
if (e && e.args.isXaxis) {
if (e && e.args && e.args.isXaxis) {
this.setDisplay('none');

@@ -496,3 +465,3 @@ }

var cloneElement = gObj.element.querySelector('.e-cloneproperties');
var content = gObj.isFrozenGrid() ? gObj.getMovableVirtualContent() : gObj.getContent().firstElementChild;
var content = gObj.getContent().firstElementChild;
var isLeft = this.x > getPosition(e.event).x + content.scrollLeft;

@@ -522,24 +491,4 @@ removeClass([].slice.call(gObj.getHeaderTable().getElementsByClassName('e-reorderindicate')), ['e-reorderindicate']);

var cliRectBaseRight = cliRect.right;
if (this.parent.isFrozenGrid()) {
this.updateFrozenScrollPosition(x, cliRect);
}
else {
var cliRectBaseLeft = cliRect.left;
var scrollElem_1 = this.parent.getContent().firstElementChild;
if (x > cliRectBaseLeft && x < cliRectBaseLeft + 35) {
this.timer = window.setInterval(function () { _this.setScrollLeft(scrollElem_1, true); }, 50);
}
else if (x < cliRectBaseRight && x > cliRectBaseRight - 35) {
this.timer = window.setInterval(function () { _this.setScrollLeft(scrollElem_1, false); }, 50);
}
}
};
Reorder.prototype.updateFrozenScrollPosition = function (x, cliRect) {
var _this = this;
var scrollElem = this.parent.getContent().querySelector('.' + literals.movableContent);
var mhdrCliRect = this.parent.element.querySelector('.' + literals.movableHeader).getBoundingClientRect();
var left = this.parent.getFrozenLeftCount();
var right = this.parent.getFrozenRightColumnsCount();
var cliRectBaseRight = right ? mhdrCliRect.right : cliRect.right;
var cliRectBaseLeft = left ? mhdrCliRect.left : cliRect.left;
var cliRectBaseLeft = cliRect.left;
var scrollElem = this.parent.getContent().firstElementChild;
if (x > cliRectBaseLeft && x < cliRectBaseLeft + 35) {

@@ -568,21 +517,2 @@ this.timer = window.setInterval(function () { _this.setScrollLeft(scrollElem, true); }, 50);

}
if (this.parent.isFrozenGrid() && target.classList.contains('e-headercell')) {
var left = this.parent.getFrozenLeftCount();
var right = this.parent.getFrozenRightColumnsCount();
var dropEle = this.element.querySelector('.e-headercelldiv');
var dropCol = dropEle ? this.parent.getColumnByUid(dropEle.getAttribute('data-uid')) : null;
var col = this.parent.getColumnByUid(target.firstElementChild.getAttribute('e-mappinguid'));
var fhdrWidth = Math.round(this.parent.getFrozenVirtualHeader().getBoundingClientRect().right);
var mhdrRight = Math.round(this.parent.getMovableVirtualHeader().getBoundingClientRect().right);
if (col) {
if (left && !right && this.parent.getNormalizedColumnIndex(col.uid) >= left
&& ((isLeft && Math.round(cliRect.left) < fhdrWidth) || (!isLeft && mhdrRight < cliRect.right))) {
return;
}
if (!left && right && dropCol && dropCol.getFreezeTableName() !== col.getFreezeTableName()
&& (!isLeft && Math.round(cliRect.right) < fhdrWidth)) {
return;
}
}
}
var isSticky = this.parent.getHeaderContent().classList.contains('e-sticky');

@@ -603,3 +533,3 @@ this.upArrow.style.top = isSticky ? cliRect.top + cliRect.height + 'px' : cliRect.top + cliRect.height - cliRectBase.top + 'px';

}
var content = gObj.isFrozenGrid() ? gObj.getMovableVirtualContent() : gObj.getContent().firstElementChild;
var content = gObj.getContent().firstElementChild;
this.x = getPosition(e.event).x + content.scrollLeft;

@@ -606,0 +536,0 @@ gObj.trigger(events.columnDragStart, {

@@ -99,2 +99,8 @@ import { IGrid, IAction } from '../base/interface';

private getColData;
private refreshResizeFixedCols;
private refreshResizePosition;
private refreshResizefrzCols;
private refreshGroupCaptionRow;
private frzHdrRefresh;
private getParticularCol;
private resizing;

@@ -101,0 +107,0 @@ private calulateColumnsWidth;

@@ -5,3 +5,3 @@ import { EventHandler, detach, formatUnit, Browser, closest } from '@syncfusion/ej2-base';

import * as events from '../base/constant';
import { getScrollBarWidth, parentsUntil, gridActionHandler, Global, getExactFrozenMovableColumn } from '../base/util';
import { getScrollBarWidth, parentsUntil, Global, frozenDirection, isChildColumn, applyStickyLeftRightPosition, groupCaptionRowLeftRightPos } from '../base/util';
import { isNullOrUndefined, addClass, removeClass } from '@syncfusion/ej2-base';

@@ -67,4 +67,4 @@ import * as literals from '../base/string-literals';

var tWidth = 0;
var headerTable;
var contentTable;
var headerTable = gObj.getHeaderTable();
var contentTable = gObj.getContentTable();
var footerTable;

@@ -77,52 +77,12 @@ var headerDivTag = 'e-gridheader';

var columnIndex = this.parent.getNormalizedColumnIndex(uid);
var headerTextClone;
var contentTextClone;
var headerTextClone = headerTable.querySelector('[e-mappinguid="' + uid + '"]').parentElement.cloneNode(true);
var contentTextClone = contentTable.querySelectorAll("td.e-rowcell:nth-child(" + (columnIndex + 1) + "):not(.e-groupcaption):not(.e-detailcell)");
var footerTextClone;
var columnIndexByField = this.parent.getColumnIndexByField(fName);
var left = gObj.getFrozenColumns() || gObj.getFrozenLeftColumnsCount();
var movable = gObj.getMovableColumnsCount();
if (!isNullOrUndefined(gObj.getFooterContent())) {
footerTable = gObj.getFooterContentTable();
}
if (gObj.isFrozenGrid()) {
var col = gObj.getColumnByField(fName);
if (col.getFreezeTableName() === literals.frozenLeft) {
headerTable = gObj.getHeaderTable();
contentTable = gObj.getContentTable();
headerTextClone = headerTable.querySelector('[e-mappinguid="' + uid + '"]').parentElement.cloneNode(true);
contentTextClone = contentTable.querySelectorAll("td:nth-child(" + (columnIndex + 1) + ")");
if (footerTable) {
footerTextClone = footerTable.querySelectorAll("td:nth-child(" + (columnIndex + 1) + ")");
}
}
else if (col.getFreezeTableName() === 'movable') {
headerTable = gObj.getHeaderContent().querySelector('.' + literals.movableHeader).children[0];
contentTable = gObj.getContent().querySelector('.' + literals.movableContent).children[0];
headerTextClone = headerTable.querySelector('[e-mappinguid="' + uid + '"]').parentElement.cloneNode(true);
contentTextClone = contentTable.querySelectorAll("td:nth-child(" + ((columnIndex - left) + 1) + ")");
if (footerTable) {
footerTable = gObj.getFooterContent().querySelector('.e-movablefootercontent').children[0];
footerTextClone = footerTable.querySelectorAll("td:nth-child(" + ((columnIndex - left) + 1) + ")");
}
}
else if (col.getFreezeTableName() === literals.frozenRight) {
headerTable = gObj.getHeaderContent().querySelector('.e-frozen-right-header').children[0];
contentTable = gObj.getContent().querySelector('.e-frozen-right-content').children[0];
headerTextClone = headerTable.querySelector('[e-mappinguid="' + uid + '"]').parentElement.cloneNode(true);
contentTextClone = contentTable.querySelectorAll("td:nth-child(" + ((columnIndex - (left + movable)) + 1) + ")");
if (footerTable) {
footerTable = gObj.getFooterContent().querySelector('.e-movablefootercontent').children[0];
footerTextClone = footerTable.querySelectorAll("td:nth-child(" + ((columnIndex - (left + movable)) + 1) + ")");
}
}
if (footerTable) {
footerTextClone = footerTable.querySelectorAll("td:nth-child(" + (columnIndex + 1) + "):not(.e-groupcaption)");
}
else {
headerTable = gObj.getHeaderTable();
contentTable = gObj.getContentTable();
headerTextClone = headerTable.querySelector('[e-mappinguid="' + uid + '"]').parentElement.cloneNode(true);
contentTextClone = contentTable.querySelectorAll("td.e-rowcell:nth-child(" + (columnIndex + 1) + "):not(.e-groupcaption):not(.e-detailcell)");
if (footerTable) {
footerTextClone = footerTable.querySelectorAll("td:nth-child(" + (columnIndex + 1) + "):not(.e-groupcaption)");
}
}
var indentWidthClone = [].slice.call(headerTable.querySelector('tr').getElementsByClassName('e-grouptopleftcell'));

@@ -169,18 +129,3 @@ if (indentWidthClone.length > 0) {

if (result === false) {
var element = void 0;
if (this.parent.isAutoFitColumns && gObj.isFrozenGrid()) {
var frozenMovableColumns = getExactFrozenMovableColumn(this.parent);
if (columnbyindex.freezeTable === 'frozen-left') {
element = frozenMovableColumns.frozenLeft;
}
else if (columnbyindex.freezeTable === 'movable') {
element = frozenMovableColumns.movable;
}
else {
element = frozenMovableColumns.frozenRight;
}
}
else {
element = gObj.getColumns();
}
var element = gObj.getColumns();
for (var i = 0; i < element.length; i++) {

@@ -193,3 +138,3 @@ if (element[parseInt(i.toString(), 10)].visible) {

var calcTableWidth = tWidth + indentWidth;
if (tWidth > 0 && !gObj.isFrozenGrid()) {
if (tWidth > 0) {
if (this.parent.detailTemplate || this.parent.childGrid) {

@@ -207,7 +152,3 @@ this.widthService.setColumnWidth(new Column({ width: '30px' }));

}
if (gObj.isFrozenGrid()) {
if (this.parent.isAutoFitColumns) {
headerTable.style.width = formatUnit(calcTableWidth);
contentTable.style.width = formatUnit(calcTableWidth);
}
if (gObj.isFrozenGrid() && gObj.enableColumnVirtualization) {
this.widthService.refreshFrozenScrollbar();

@@ -308,2 +249,3 @@ }

this.parent.on(events.headerRefreshed, this.refreshHeight, this);
this.parent.on(events.refreshResizePosition, this.refreshResizePosition, this);
this.parent.on(events.initialEnd, this.wireEvents, this);

@@ -323,2 +265,3 @@ this.parent.on(events.contentReady, this.autoFit, this);

this.parent.off(events.headerRefreshed, this.refreshHeight);
this.parent.off(events.refreshResizePosition, this.refreshResizePosition);
this.parent.off(events.initialEnd, this.wireEvents);

@@ -357,5 +300,3 @@ this.parent.off(events.refreshHandlers, this.refreshHeight);

Resize.prototype.getResizeHandlers = function () {
return this.parent.isFrozenGrid() ?
[].slice.call(this.parent.getHeaderContent().getElementsByClassName(resizeClassList.root))
: [].slice.call(this.parent.getHeaderTable().getElementsByClassName(resizeClassList.root));
return [].slice.call(this.parent.getHeaderTable().getElementsByClassName(resizeClassList.root));
};

@@ -412,27 +353,2 @@ Resize.prototype.setHandlerHeight = function () {

this.element = e.target;
if (this.parent.getVisibleFrozenColumns()) {
var mtbody = this.parent.getMovableContentTbody();
var ftbody = this.parent.getFrozenLeftContentTbody();
var frtbody = this.parent.getFrozenRightContentTbody();
var mtr = [].slice.call(mtbody.childNodes);
var ftr = [].slice.call(ftbody.childNodes);
var frTr = [];
if (this.parent.getFrozenMode() === literals.leftRight && frtbody) {
frTr = [].slice.call(frtbody.childNodes);
}
var _loop_1 = function (i) {
gridActionHandler(this_1.parent, function (tableName, row) {
if (_this.parent.rowHeight) {
row[parseInt(i.toString(), 10)].style.height = _this.parent.rowHeight + 'px';
}
else {
row[parseInt(i.toString(), 10)].style.removeProperty('height');
}
}, [ftr, mtr, frTr]);
};
var this_1 = this;
for (var i = 0; i < mtr.length; i++) {
_loop_1(i);
}
}
this.parentElementWidth = this.parent.element.getBoundingClientRect().width;

@@ -519,2 +435,309 @@ this.appendHelper();

};
Resize.prototype.refreshResizeFixedCols = function (pos) {
var cols = this.parent.getColumns();
var translateX = this.parent.enableColumnVirtualization ? this.parent.translateX : 0;
var th = [].slice.call(this.parent.getHeaderContent().querySelector('tbody').querySelectorAll('.e-fixedfreeze')).concat([].slice.call(this.parent.getContent().querySelectorAll('.e-fixedfreeze')));
for (var i = 0; i < th.length; i++) {
var node = th[parseInt(i.toString(), 10)];
var column = void 0;
if (node.classList.contains('e-summarycell')) {
var uid = node.getAttribute('e-mappinguid');
column = this.parent.getColumnByUid(uid);
}
else {
var index = parseInt(node.getAttribute('data-colindex'), 10);
column = cols[parseInt(index.toString(), 10)];
}
var width = 0;
if (pos === 'Left') {
if (this.parent.getVisibleFrozenLeftCount()) {
width = this.parent.getIndentCount() * 30;
}
else if (this.parent.getFrozenMode() === 'Right') {
width = this.parent.groupSettings.columns.length * 30;
}
for (var j = 0; j < cols.length; j++) {
if (column.index > cols[parseInt(j.toString(), 10)].index) {
if (column.uid === cols[parseInt(j.toString(), 10)].uid) {
break;
}
if ((cols[parseInt(j.toString(), 10)].freeze === 'Left' || cols[parseInt(j.toString(), 10)].isFrozen) ||
cols[parseInt(j.toString(), 10)].freeze === 'Fixed') {
if (cols[parseInt(j.toString(), 10)].visible) {
width += parseFloat(cols[parseInt(j.toString(), 10)].width.toString());
}
}
}
}
applyStickyLeftRightPosition(node, ((width === 0 ? width : width - 1) - translateX), this.parent.enableRtl, 'Left');
}
if (pos === 'Right') {
width = this.parent.getFrozenMode() === 'Right' && this.parent.isRowDragable() ? 30 : 0;
for (var j = cols.length - 1; j >= 0; j--) {
if (column.uid === cols[parseInt(j.toString(), 10)].uid) {
break;
}
if (cols[parseInt(j.toString(), 10)].freeze === 'Right' || cols[parseInt(j.toString(), 10)].freeze === 'Fixed') {
if (cols[parseInt(j.toString(), 10)].visible) {
width += parseFloat(cols[parseInt(j.toString(), 10)].width.toString());
}
}
}
applyStickyLeftRightPosition(node, width + translateX, this.parent.enableRtl, 'Right');
}
}
};
Resize.prototype.refreshResizePosition = function () {
this.refreshResizefrzCols(true);
};
Resize.prototype.refreshResizefrzCols = function (freezeRefresh) {
var _this = this;
var translateX = this.parent.enableColumnVirtualization ? this.parent.translateX : 0;
if (freezeRefresh || ((this.column.freeze === 'Left' || this.column.isFrozen) ||
(this.column.columns && frozenDirection(this.column) === 'Left'))) {
var width_1 = this.parent.getIndentCount() * 30;
var columns = this.parent.getColumns().filter(function (col) { return col.freeze === 'Left' || col.isFrozen; });
if (!freezeRefresh) {
this.frzHdrRefresh('Left');
}
for (var i = 0; i < columns.length; i++) {
if (freezeRefresh || (columns[parseInt(i.toString(), 10)].index > this.column.index)) {
var elements = [];
if (this.parent.frozenRows) {
elements = [].slice.call(this.parent.getHeaderContent().querySelectorAll('td[data-colindex="' + i + '"]')).concat([].slice.call(this.parent.getContent().querySelectorAll('td[data-colindex="' + i + '"]')));
}
else {
elements = [].slice.call(this.parent.getContent().querySelectorAll('td[data-colindex="' + i + '"]'));
}
elements.filter(function (cell) {
applyStickyLeftRightPosition(cell, width_1 - translateX, _this.parent.enableRtl, 'Left');
});
if (this.parent.enableColumnVirtualization) {
columns[parseInt(i.toString(), 10)].valueX = width_1;
}
}
if (columns[parseInt(i.toString(), 10)].visible) {
width_1 += parseFloat(columns[parseInt(i.toString(), 10)].width.toString());
}
}
this.refreshResizeFixedCols('Left');
}
if (freezeRefresh || (this.column.freeze === 'Right' || (this.column.columns && frozenDirection(this.column) === 'Right'))) {
var width_2 = this.parent.getFrozenMode() === 'Right' && this.parent.isRowDragable() ? 30 : 0;
var columns = this.parent.getColumns();
if (!freezeRefresh) {
this.frzHdrRefresh('Right');
}
var columnsRight = columns.filter(function (col) { return col.freeze === 'Right'; });
for (var i = columns.length - 1; i >= columns.length - columnsRight.length; i--) {
var elements = [];
if (this.parent.frozenRows) {
elements = [].slice.call(this.parent.getHeaderContent().querySelectorAll('td[data-colindex="' + i + '"]')).concat([].slice.call(this.parent.getContent().querySelectorAll('td[data-colindex="' + i + '"]')));
}
else {
elements = [].slice.call(this.parent.getContent().querySelectorAll('td[data-colindex="' + i + '"]'));
}
elements.filter(function (cell) {
applyStickyLeftRightPosition(cell, width_2 + translateX, _this.parent.enableRtl, 'Right');
});
if (this.parent.enableColumnVirtualization) {
columns[parseInt(i.toString(), 10)].valueX = width_2;
}
if (columns[parseInt(i.toString(), 10)].visible) {
width_2 = width_2 + parseFloat(columns[parseInt(i.toString(), 10)].width.toString());
}
}
this.refreshResizeFixedCols('Right');
}
if (this.column && (this.column.freeze === 'Fixed' || (this.column.columns && frozenDirection(this.column) === 'Fixed'))) {
this.refreshResizeFixedCols('Left');
this.refreshResizeFixedCols('Right');
this.frzHdrRefresh('Left');
this.frzHdrRefresh('Right');
}
if (this.parent.groupSettings.columns.length && this.parent.aggregates.length &&
this.parent.getContent().querySelector('.e-groupcaptionrow')) {
this.refreshGroupCaptionRow();
}
};
Resize.prototype.refreshGroupCaptionRow = function () {
var capRow = [].slice.call(this.parent.getContent().querySelectorAll('.e-groupcaptionrow'));
for (var i = 0; i < capRow.length; i++) {
var tr = capRow[parseInt(i.toString(), 10)];
if (tr.querySelector('.e-summarycell')) {
groupCaptionRowLeftRightPos(tr, this.parent);
}
}
};
Resize.prototype.frzHdrRefresh = function (pos) {
var _this = this;
var translateX = this.parent.enableColumnVirtualization ? this.parent.translateX : 0;
if (pos === 'Left') {
var tr = [].slice.call(this.parent.getHeaderContent().querySelector('thead').querySelectorAll('tr'));
for (var i = 0; i < tr.length; i++) {
var th = [].slice.call(tr[parseInt(i.toString(), 10)].querySelectorAll('.e-leftfreeze,.e-fixedfreeze'));
var _loop_1 = function (j) {
var node = th[parseInt(j.toString(), 10)];
if (node.classList.contains('e-rowdragheader') || node.classList.contains('e-dragheadercell') ||
node.classList.contains('e-grouptopleftcell')) {
return "continue";
}
var column = this_1.getParticularCol(node);
var cols = this_1.parent.getColumns();
var width = 0;
var summarycell = [];
if (this_1.parent.aggregates.length && this_1.parent.getFooterContent()) {
if (this_1.parent.getContent().querySelectorAll('.e-summaryrow').length) {
var summaryRows = [].slice.call(this_1.parent.getContent().querySelectorAll('.e-summaryrow'));
summaryRows.filter(function (row) {
summarycell.push(row.querySelector('[e-mappinguid="' + column.uid + '"]'));
});
}
summarycell = summarycell.concat([].slice.call(this_1.parent.getFooterContent().querySelectorAll('[e-mappinguid="' + column.uid + '"]')));
}
if (node.classList.contains('e-fixedfreeze')) {
if (this_1.parent.getVisibleFrozenLeftCount()) {
width = this_1.parent.getIndentCount() * 30;
}
else if (this_1.parent.getFrozenMode() === 'Right') {
width = this_1.parent.groupSettings.columns.length * 30;
}
for (var w = 0; w < cols.length; w++) {
if (column.index > cols[parseInt(w.toString(), 10)].index) {
if (column.uid === cols[parseInt(w.toString(), 10)].uid) {
break;
}
if ((cols[parseInt(w.toString(), 10)].freeze === 'Left' || cols[parseInt(w.toString(), 10)].isFrozen) ||
cols[parseInt(w.toString(), 10)].freeze === 'Fixed') {
if (cols[parseInt(w.toString(), 10)].visible) {
width += parseInt(cols[parseInt(w.toString(), 10)].width.toString(), 10);
}
}
}
}
if (summarycell && summarycell.length) {
summarycell.filter(function (cell) {
applyStickyLeftRightPosition(cell, width - translateX, _this.parent.enableRtl, 'Left');
});
}
applyStickyLeftRightPosition(node, ((width === 0 ? width : width - 1) - translateX), this_1.parent.enableRtl, 'Left');
}
else {
width = this_1.parent.getIndentCount() * 30;
if (column.index === 0) {
if (summarycell && summarycell.length) {
summarycell.filter(function (cell) {
applyStickyLeftRightPosition(cell, width - translateX, _this.parent.enableRtl, 'Left');
});
}
applyStickyLeftRightPosition(node, width - translateX, this_1.parent.enableRtl, 'Left');
if (this_1.parent.enableColumnVirtualization) {
column.valueX = width;
}
}
else {
for (var k = 0; k < cols.length; k++) {
if (column.index < cols[parseInt(k.toString(), 10)].index ||
column.uid === cols[parseInt(k.toString(), 10)].uid) {
break;
}
if (cols[parseInt(k.toString(), 10)].visible) {
width += parseInt(cols[parseInt(k.toString(), 10)].width.toString(), 10);
}
}
if (summarycell && summarycell.length) {
summarycell.filter(function (cell) {
applyStickyLeftRightPosition(cell, width - translateX, _this.parent.enableRtl, 'Left');
});
}
applyStickyLeftRightPosition(node, width - translateX, this_1.parent.enableRtl, 'Left');
if (this_1.parent.enableColumnVirtualization) {
column.valueX = width;
}
}
}
};
var this_1 = this;
for (var j = 0; j < th.length; j++) {
_loop_1(j);
}
}
}
if (pos === 'Right') {
var tr = [].slice.call(this.parent.getHeaderContent().querySelector('thead').querySelectorAll('tr'));
for (var i = 0; i < tr.length; i++) {
var th = [].slice.call(tr[parseInt(i.toString(), 10)].querySelectorAll('.e-rightfreeze, .e-fixedfreeze'));
var _loop_2 = function (j) {
var node = th[parseInt(j.toString(), 10)];
var column = this_2.getParticularCol(node);
var cols = this_2.parent.getColumns();
var width = 0;
var summarycell = [];
if (this_2.parent.aggregates.length && this_2.parent.getFooterContent()) {
if (this_2.parent.getContent().querySelectorAll('.e-summaryrow').length) {
var summaryRows = [].slice.call(this_2.parent.getContent().querySelectorAll('.e-summaryrow'));
summaryRows.filter(function (row) {
summarycell.push(row.querySelector('[e-mappinguid="' + column.uid + '"]'));
});
}
summarycell = summarycell.concat([].slice.call(this_2.parent.getFooterContent().querySelectorAll('[e-mappinguid="' + column.uid + '"]')));
}
if (node.classList.contains('e-fixedfreeze')) {
width = this_2.parent.getFrozenMode() === 'Right' && this_2.parent.isRowDragable() ? 30 : 0;
for (var w = cols.length - 1; w >= 0; w--) {
if (column.index < cols[parseInt(w.toString(), 10)].index) {
if ((column.columns && isChildColumn(column, cols[parseInt(w.toString(), 10)].uid)) ||
column.index > cols[parseInt(w.toString(), 10)].index) {
break;
}
if (cols[parseInt(w.toString(), 10)].freeze === 'Right' ||
cols[parseInt(w.toString(), 10)].freeze === 'Fixed') {
if (cols[parseInt(w.toString(), 10)].visible) {
width += parseFloat(cols[parseInt(w.toString(), 10)].width.toString());
}
}
}
}
if (summarycell.length) {
summarycell.filter(function (cell) {
applyStickyLeftRightPosition(cell, width + translateX, _this.parent.enableRtl, 'Right');
});
}
applyStickyLeftRightPosition(node, width + translateX, this_2.parent.enableRtl, 'Right');
}
else {
width = this_2.parent.getFrozenMode() === 'Right' && this_2.parent.isRowDragable() ? 30 : 0;
for (var k = cols.length - 1; k >= 0; k--) {
if ((column.columns && isChildColumn(column, cols[parseInt(k.toString(), 10)].uid)) ||
column.index > cols[parseInt(k.toString(), 10)].index ||
column.uid === cols[parseInt(k.toString(), 10)].uid) {
break;
}
if (cols[parseInt(k.toString(), 10)].visible) {
width += parseInt(cols[parseInt(k.toString(), 10)].width.toString(), 10);
}
}
if (summarycell.length) {
summarycell.filter(function (cell) {
applyStickyLeftRightPosition(cell, width + translateX, _this.parent.enableRtl, 'Right');
});
}
applyStickyLeftRightPosition(node, width + translateX, this_2.parent.enableRtl, 'Right');
if (this_2.parent.enableColumnVirtualization) {
column.valueX = width;
}
}
};
var this_2 = this;
for (var j = th.length - 1; j >= 0; j--) {
_loop_2(j);
}
}
}
};
Resize.prototype.getParticularCol = function (node) {
var uid = node.classList.contains('e-filterbarcell') ? node.getAttribute('e-mappinguid') :
node.querySelector('[e-mappinguid]').getAttribute('e-mappinguid');
return this.parent.getColumnByUid(uid);
};
Resize.prototype.resizing = function (e) {

@@ -524,2 +747,5 @@ if (isNullOrUndefined(this.column)) {

}
if (this.parent.isFrozenGrid()) {
this.refreshResizefrzCols();
}
var offsetWidth = 0;

@@ -535,5 +761,2 @@ if (isNullOrUndefined(this.column)) {

var mousemove = this.parent.enableRtl ? -(pageX - this.pageX) : (pageX - this.pageX);
if (this.column.getFreezeTableName() === literals.frozenRight) {
mousemove = this.parent.enableRtl ? (pageX - this.pageX) : (this.pageX - pageX);
}
var colData = this.getColData(this.column, mousemove);

@@ -545,12 +768,3 @@ if (!colData.width) {

this.parent.log('resize_min_max', { column: this.column, width: width });
if (this.column.getFreezeTableName() === literals.frozenRight) {
if ((this.parent.enableRtl && this.minMove >= pageX) || (!this.parent.enableRtl && this.minMove <= pageX)) {
width = this.column.minWidth ? parseFloat(this.column.minWidth.toString()) : 10;
this.pageX = pageX = this.minMove;
}
}
if ((this.column.getFreezeTableName() !== literals.frozenRight
&& ((!this.parent.enableRtl && this.minMove >= pageX) || (this.parent.enableRtl && this.minMove <= pageX)))
|| (this.column.getFreezeTableName() === literals.frozenRight && ((this.parent.enableRtl && this.minMove >= pageX)
|| (!this.parent.enableRtl && this.minMove <= pageX)))) {
if (((!this.parent.enableRtl && this.minMove >= pageX) || (this.parent.enableRtl && this.minMove <= pageX))) {
width = this.column.minWidth ? parseFloat(this.column.minWidth.toString()) : 10;

@@ -633,3 +847,3 @@ this.pageX = pageX = this.minMove;

var content = this.parent.getContent().querySelector('.' + literals.content);
var cTable = content.querySelector('.' + literals.movableContent) ? content.querySelector('.' + literals.movableContent) : content;
var cTable = content;
if (cTable.scrollHeight > cTable.clientHeight) {

@@ -641,11 +855,3 @@ this.parent.scrollModule.setPadding();

closest(this.element, '.e-headercell').classList.add('e-resized');
if (parentsUntil(this.element, 'e-frozenheader')) {
this.isFrozenColResized = true;
}
else {
this.isFrozenColResized = false;
}
if (this.parent.isFrozenGrid()) {
this.parent.notify(events.freezeRender, { case: 'textwrap' });
}
this.isFrozenColResized = false;
if (this.parent.allowTextWrap) {

@@ -655,23 +861,8 @@ this.updateResizeEleHeight();

}
var headerTable;
var contentTable;
var headerTable = gObj.getHeaderTable();
var contentTable = gObj.getContentTable();
var footerTable;
var rightCnt = gObj.getFrozenRightColumnsCount();
if (!isNullOrUndefined(gObj.getFooterContent())) {
footerTable = gObj.getFooterContentTable();
}
if (gObj.isFrozenGrid()) {
if (rightCnt > 0) {
headerTable = gObj.getHeaderContent().querySelector('.e-frozen-right-header').children[0];
contentTable = gObj.getContent().querySelector('.e-frozen-right-content').children[0];
}
else {
headerTable = gObj.getHeaderContent().querySelector('.' + literals.movableHeader).children[0];
contentTable = gObj.getContent().querySelector('.' + literals.movableContent).children[0];
}
}
else {
headerTable = gObj.getHeaderTable();
contentTable = gObj.getContentTable();
}
var tableWidth = headerTable.offsetWidth;

@@ -763,19 +954,5 @@ var contentwidth = (gObj.getContent().scrollWidth);

Resize.prototype.setHelperHeight = function () {
var isFrozen = this.parent.isFrozenGrid();
var height = isFrozen ? this.parent.getContent().querySelector('.' + literals.content).offsetHeight
: this.parent.getContent().offsetHeight - this.getScrollBarWidth();
var height = this.parent.getContent().offsetHeight - this.getScrollBarWidth();
var rect = closest(this.element, resizeClassList.header);
var tr = [].slice.call(this.parent.getHeaderContent().querySelectorAll('tr'));
var right = this.parent.getFrozenRightColumnsCount();
if (isFrozen) {
if (parentsUntil(rect, literals.movableHeader)) {
tr = [].slice.call(this.parent.getHeaderContent().querySelector('.' + literals.movableHeader).querySelectorAll('tr'));
}
else if (right && parentsUntil(rect, 'e-frozen-right-header')) {
tr = [].slice.call(this.parent.getHeaderContent().querySelector('.e-frozen-right-header').querySelectorAll('tr'));
}
else {
tr = [].slice.call(this.parent.getHeaderContent().querySelector('.e-frozen-left-header').querySelectorAll('tr'));
}
}
for (var i = tr.indexOf(rect.parentElement); i < tr.length && i > -1; i++) {

@@ -785,8 +962,3 @@ height += tr[parseInt(i.toString(), 10)].offsetHeight;

var pos = this.calcPos(rect);
if (parentsUntil(rect, 'e-frozen-right-header')) {
pos.left += (this.parent.enableRtl ? rect.offsetWidth - 2 : 0 - 1);
}
else {
pos.left += (this.parent.enableRtl ? 0 - 1 : rect.offsetWidth - 2);
}
pos.left += (this.parent.enableRtl ? 0 - 1 : rect.offsetWidth - 2);
this.helper.style.cssText = 'height: ' + height + 'px; top: ' + pos.top + 'px; left:' + Math.floor(pos.left) + 'px;';

@@ -814,8 +986,3 @@ if (this.parent.enableVirtualization) {

var left;
if (parentsUntil(rect, 'e-frozen-right-header')) {
left = Math.floor(this.calcPos(rect).left + (this.parent.enableRtl ? rect.offsetWidth - 2 : 0 - 1));
}
else {
left = Math.floor(this.calcPos(rect).left + (this.parent.enableRtl ? 0 - 1 : rect.offsetWidth - 2));
}
left = Math.floor(this.calcPos(rect).left + (this.parent.enableRtl ? 0 - 1 : rect.offsetWidth - 2));
var borderWidth = 2; // to maintain the helper inside of grid element.

@@ -825,9 +992,2 @@ if (left > this.parentElementWidth) {

}
if (this.parent.isFrozenGrid()) {
var table = closest(rect, '.' + literals.table);
var fLeft = table.offsetLeft;
if (left < fLeft) {
left = fLeft;
}
}
this.helper.style.left = left + 'px';

@@ -834,0 +994,0 @@ };

@@ -65,3 +65,2 @@ import { IGrid, NotifyArgs } from '../base/interface';

private setBorder;
private borderRowElement;
private getScrollWidth;

@@ -68,0 +67,0 @@ private removeFirstRowBorder;

@@ -5,3 +5,3 @@ import { Draggable, isNullOrUndefined } from '@syncfusion/ej2-base';

import { parentsUntil, removeElement, getPosition, addRemoveActiveClasses, isActionPrevent } from '../base/util';
import { setRowsInTbody, resetRowIndex } from '../base/util';
import { resetRowIndex } from '../base/util';
import * as events from '../base/constant';

@@ -53,10 +53,7 @@ import { Scroll } from '../actions/scroll';

_this.startedRow = closestElement(target, 'tr').cloneNode(true);
var frzCols = _this.parent.isFrozenGrid();
if (frzCols) {
var rowIndex = parseInt(closestElement(target, 'tr').getAttribute(literals.dataRowIndex), 10);
_this.startedRow.innerHTML = '';
_this.startedRow.innerHTML += gObj.getRowByIndex(rowIndex).innerHTML;
_this.startedRow.innerHTML += gObj.getMovableRowByIndex(rowIndex).innerHTML;
if (gObj.getFrozenMode() === literals.leftRight) {
_this.startedRow.innerHTML += gObj.getFrozenRightRowByIndex(rowIndex).innerHTML;
if (_this.parent.isFrozenGrid()) {
var nodes = [].slice.call(_this.startedRow.querySelectorAll('.e-rowcell'));
for (var i = 0; i < nodes.length; i++) {
removeClass([nodes[parseInt(i.toString(), 10)]], ['e-leftfreeze', 'e-freezeleftborder', 'e-fixedfreeze', 'e-freezerightborder', 'e-rightfreeze', 'e-unfreeze']);
nodes[parseInt(i.toString(), 10)].removeAttribute('style');
}

@@ -83,5 +80,4 @@ }

if (gObj.getSelectedRowIndexes().length > 1 && _this.startedRow.hasAttribute('aria-selected')) {
var index = gObj.getFrozenMode() === literals.leftRight ? 3 : 2;
var dropCountEle = _this.parent.createElement('span', {
className: 'e-dropitemscount', innerHTML: frzCols ? '' + selectedRows.length / index : '' + selectedRows.length
className: 'e-dropitemscount', innerHTML: '' + selectedRows.length
});

@@ -131,3 +127,3 @@ visualElement.appendChild(dropCountEle);

draggableType: 'rows', fromIndex: parseInt(_this.rows[0].getAttribute(literals.dataRowIndex), 10),
data: (Object.keys(_this.rowData[0]).length > 0) ? _this.rowData : _this.currentViewData()
data: (_this.rowData[0] && Object.keys(_this.rowData[0]).length > 0) ? _this.rowData : _this.currentViewData()
});

@@ -176,10 +172,18 @@ _this.dragStartData = _this.rowData;

gObj.element.classList.add('e-rowdrag');
_this.dragTarget = trElement && (parentsUntil(target, 'e-grid').id === cloneElement.parentElement.id ||
parentsUntil(target, 'e-grid').id) ? _this.isDropGrid.element.querySelector('.e-emptyrow') ? 0 :
parseInt(trElement.getAttribute('data-rowindex'), 10) : parseInt(_this.startedRow.getAttribute('data-rowindex'), 10);
if (trElement && (parentsUntil(target, 'e-grid').id === cloneElement.parentElement.id || parentsUntil(target, 'e-grid').id)) {
if (_this.isDropGrid.element.querySelector('.e-emptyrow')) {
_this.dragTarget = 0;
}
else {
_this.dragTarget = parseInt(trElement.getAttribute('data-rowindex'), 10);
}
}
else {
_this.dragTarget = parseInt(_this.startedRow.getAttribute('data-rowindex'), 10);
}
if (gObj.rowDropSettings.targetID) {
var dragParentElement = document.querySelector('.e-drag-ref');
if (!parentsUntil(target, 'e-grid') ||
parentsUntil(cloneElement.parentElement, 'e-grid').id === parentsUntil(target, 'e-grid').id || (dragParentElement
&& parentsUntil(dragParentElement.parentElement, 'e-grid').id === parentsUntil(target, 'e-grid').id)) {
if (!parentsUntil(target, 'e-grid') || (dragParentElement
&& parentsUntil(dragParentElement.parentElement, 'e-grid').id === parentsUntil(target, 'e-grid').id) ||
parentsUntil(cloneElement.parentElement, 'e-grid').id === parentsUntil(target, 'e-grid').id) {
classList(cloneElement, ['e-notallowedcur'], ['e-defaultcur']);

@@ -201,4 +205,4 @@ }

if (parentsUntil(_this.isDropGrid.element, 'e-grid')) {
if ((!_this.isDropGrid.groupSettings.columns.length || _this.isDropGrid.groupSettings.columns.length ||
e.target.classList.contains('e-selectionbackground')) && !_this.isDropGrid.element.querySelector('.e-emptyrow')) {
if ((!_this.isDropGrid.groupSettings.columns.length || _this.isDropGrid.groupSettings.columns.length)
&& !_this.isDropGrid.element.querySelector('.e-emptyrow')) {
if (parentsUntil(target, 'e-grid') && parentsUntil(target, 'e-grid').id === _this.isDropGrid.element.id) {

@@ -233,3 +237,3 @@ _this.updateScrollPostion(e.event);

if (!gridcontentEle.getElementsByClassName('e-lastrow-dragborder').length &&
(isNullOrUndefined(trElement.nextSibling) || !gObj.allowGrouping || !gObj.groupSettings.columns.length)) {
(!(gObj.allowGrouping && gObj.groupSettings.columns.length) || isNullOrUndefined(trElement.nextSibling))) {
gridcontentEle.classList.add('e-grid-relative');

@@ -250,5 +254,2 @@ gridcontentEle.appendChild(bottomborder);

rowElement = [].slice.call(_this.isDropGrid.getRowByIndex(rowIndex).querySelectorAll(selector));
if (_this.isDropGrid.isFrozenGrid()) {
rowElement = _this.borderRowElement(rowIndex, selector);
}
if (rowElement.length > 0) {

@@ -372,62 +373,26 @@ addRemoveActiveClasses(rowElement, true, 'e-dragborder');

};
RowDD.prototype.refreshRow = function (args, tbody, mtbody, frTbody, target, mTarget, frTarget) {
RowDD.prototype.refreshRow = function (args, tbody, target) {
var gObj = this.parent;
var frzCols = gObj.isFrozenGrid();
var isLeftRight = gObj.getFrozenMode() === literals.leftRight;
var tbodyMovableHeader;
var tbodyMovableContent;
var frHdr;
var frCnt;
var tbodyContent = gObj.getContentTable().querySelector(literals.tbody);
var tbodyHeader = gObj.getHeaderTable().querySelector(literals.tbody);
if (frzCols) {
tbodyMovableHeader = gObj.getMovableHeaderTbody();
tbodyMovableContent = gObj.getMovableContentTbody();
if (isLeftRight) {
frHdr = gObj.getFrozenRightHeaderTbody();
frCnt = gObj.getFrozenRightContentTbody();
}
}
var index = gObj.getFrozenMode() === literals.leftRight ? 3 : 2;
for (var i = 0, len = args.rows.length; i < len; i++) {
if (frzCols) {
if (i % index === 0) {
tbody.insertBefore(args.rows[parseInt(i.toString(), 10)], target);
if (gObj.enableVirtualization && gObj.allowGrouping && gObj.groupSettings.columns.length &&
args.rows.length === 1) {
var removeElem = gObj.getRowElementByUID(args.rows[parseInt(i.toString(), 10)].getAttribute('data-uid'));
if (!isNullOrUndefined(removeElem)) {
remove(removeElem);
}
else if (i % index === 1) {
mtbody.insertBefore(args.rows[parseInt(i.toString(), 10)], mTarget);
}
else {
frTbody.insertBefore(args.rows[parseInt(i.toString(), 10)], frTarget);
}
}
else {
if (gObj.enableVirtualization && gObj.allowGrouping && gObj.groupSettings.columns.length &&
args.rows.length === 1) {
var removeElem = gObj.getRowElementByUID(args.rows[parseInt(i.toString(), 10)].getAttribute('data-uid'));
if (!isNullOrUndefined(removeElem)) {
remove(removeElem);
}
tbody.insertBefore(args.rows[parseInt(i.toString(), 10)], target);
if (gObj.allowGrouping && gObj.groupSettings.columns.length) {
var dragRowUid = args.rows[parseInt(i.toString(), 10)].getAttribute('data-uid');
var dropRowUid = args.target.parentElement.getAttribute('data-uid');
var dragRowObject = gObj.getRowObjectFromUID(dragRowUid);
var dropRowObject = gObj.getRowObjectFromUID(dropRowUid);
if (dragRowObject.parentUid !== dropRowObject.parentUid) {
gObj['groupModule'].groupReorderHandler(dragRowObject, dropRowObject);
}
tbody.insertBefore(args.rows[parseInt(i.toString(), 10)], target);
if (gObj.allowGrouping && gObj.groupSettings.columns.length) {
var dragRowUid = args.rows[parseInt(i.toString(), 10)].getAttribute('data-uid');
var dropRowUid = args.target.parentElement.getAttribute('data-uid');
var dragRowObject = gObj.getRowObjectFromUID(dragRowUid);
var dropRowObject = gObj.getRowObjectFromUID(dropRowUid);
if (dragRowObject.parentUid !== dropRowObject.parentUid) {
gObj['groupModule'].groupReorderHandler(dragRowObject, dropRowObject);
}
}
}
}
var tr = [].slice.call(tbody.getElementsByClassName(literals.row));
var mtr;
var frTr;
if (frzCols) {
mtr = [].slice.call(mtbody.getElementsByClassName(literals.row));
if (isLeftRight) {
frTr = [].slice.call(frTbody.getElementsByClassName(literals.row));
}
}
if (!gObj.enableVirtualization && gObj.allowGrouping && gObj.groupSettings.columns.length) {

@@ -444,20 +409,12 @@ gObj['groupModule'].groupReorderRowObject(args, tr);

else {
this.refreshData(tr, mtr, frTr);
this.refreshData(tr);
}
if (this.parent.frozenRows) {
var _loop_1 = function (i, len) {
if (i < this_1.parent.frozenRows) {
setRowsInTbody(tbodyHeader, tbodyMovableHeader, frHdr, tr, mtr, frTr, function (tbody, rows) {
tbody.appendChild(rows[parseInt(i.toString(), 10)]);
});
for (var i = 0, len = tr.length; i < len; i++) {
if (i < this.parent.frozenRows) {
tbodyHeader.appendChild(tr[parseInt(i.toString(), 10)]);
}
else {
setRowsInTbody(tbodyContent, tbodyMovableContent, frCnt, tr, mtr, frTr, function (tbody, rows) {
tbody.appendChild(rows[parseInt(i.toString(), 10)]);
});
tbodyContent.appendChild(tr[parseInt(i.toString(), 10)]);
}
};
var this_1 = this;
for (var i = 0, len = tr.length; i < len; i++) {
_loop_1(i, len);
}

@@ -468,49 +425,15 @@ }

var gObj = this.parent;
var tbodyMovH;
var tbodyMovC;
var tbodyFrH;
var tbodyFrC;
var frzCols = this.parent.isFrozenGrid();
var isLeftRight = gObj.getFrozenMode() === literals.leftRight;
var tbodyC = gObj.getContentTable().querySelector(literals.tbody);
var tbodyH = gObj.getHeaderTable().querySelector(literals.tbody);
if (frzCols) {
tbodyMovH = gObj.getMovableHeaderTbody();
tbodyMovC = gObj.getMovableContentTbody();
if (isLeftRight) {
tbodyFrH = gObj.getFrozenRightHeaderTbody();
tbodyFrC = gObj.getFrozenRightContentTbody();
}
}
var tr = [].slice.call(tbodyH.getElementsByClassName(literals.row)).concat([].slice.call(tbodyC.getElementsByClassName(literals.row)));
var mtr;
var frTr;
if (frzCols) {
mtr = [].slice.call(tbodyMovH.getElementsByClassName(literals.row))
.concat([].slice.call(tbodyMovC.getElementsByClassName(literals.row)));
if (isLeftRight) {
frTr = [].slice.call(tbodyFrH.getElementsByClassName(literals.row))
.concat([].slice.call(tbodyFrC.getElementsByClassName(literals.row)));
}
}
var tbody = gObj.createElement(literals.tbody, { attrs: { role: 'rowgroup' } });
var mtbody = gObj.createElement(literals.tbody, { attrs: { role: 'rowgroup' } });
var frTbody = gObj.createElement(literals.tbody, { attrs: { role: 'rowgroup' } });
this.parent.clearSelection();
var targetRows = this.refreshRowTarget(args);
var targetRow = this.refreshRowTarget(args);
for (var i = 0, len = tr.length; i < len; i++) {
tbody.appendChild(tr[parseInt(i.toString(), 10)]);
if (frzCols) {
mtbody.appendChild(mtr[parseInt(i.toString(), 10)]);
if (isLeftRight) {
frTbody.appendChild(frTr[parseInt(i.toString(), 10)]);
}
}
}
this.refreshRow(args, tbody, mtbody, frTbody, targetRows.target, targetRows.mTarget, targetRows.frTarget);
this.refreshRow(args, tbody, targetRow);
};
RowDD.prototype.refreshRowTarget = function (args) {
var gObj = this.parent;
var mTr;
var frTr;
var targetIdx = parseInt(args.target.parentElement.getAttribute(literals.dataRowIndex), 10);

@@ -526,37 +449,15 @@ if (gObj.enableVirtualization && gObj.allowGrouping && gObj.groupSettings.columns.length) {

args.fromIndex < args.dropIndex ? gObj.getRowByIndex(targetIdx).nextSibling : gObj.getRowByIndex(targetIdx);
if (gObj.isFrozenGrid()) {
mTr = gObj.getMovableRowByIndex(targetIdx);
if (gObj.getFrozenMode() === literals.leftRight) {
frTr = gObj.getFrozenRightRowByIndex(targetIdx);
}
}
var rows = {
target: tr, mTarget: mTr, frTarget: frTr
};
return rows;
return tr;
};
RowDD.prototype.updateFrozenColumnreOrder = function (args) {
var gObj = this.parent;
var mtbody;
var frTbody;
var frzCols = this.parent.isFrozenGrid();
var tbody = gObj.getContentTable().querySelector(literals.tbody);
if (frzCols) {
mtbody = gObj.getMovableContentTbody();
if (gObj.getFrozenMode() === literals.leftRight) {
frTbody = gObj.getFrozenRightContentTbody();
}
}
this.parent.clearSelection();
var targetRows = this.refreshRowTarget(args);
this.refreshRow(args, tbody, mtbody, frTbody, targetRows.target, targetRows.mTarget, targetRows.frTarget);
var targetRow = this.refreshRowTarget(args);
this.refreshRow(args, tbody, targetRow);
};
RowDD.prototype.refreshData = function (tr, mtr, frTr) {
RowDD.prototype.refreshData = function (tr) {
var rowObj = {};
var movobj = {};
var frObj = {};
var recordobj = {};
var rowObjects = this.parent.getRowsObject();
var movbObject = this.parent.getMovableRowsObject();
var frRightObject = this.parent.getFrozenRightRowsObject();
var currentViewData = this.parent.getCurrentViewRecords();

@@ -567,18 +468,4 @@ for (var i = 0, len = tr.length; i < len; i++) {

recordobj[parseInt(i.toString(), 10)] = currentViewData[parseInt(index.toString(), 10)];
if (this.parent.isFrozenGrid()) {
movobj[parseInt(i.toString(), 10)] = movbObject[parseInt(index.toString(), 10)];
if (frTr) {
frObj[parseInt(i.toString(), 10)] = frRightObject[parseInt(index.toString(), 10)];
}
}
}
var rows = this.parent.getRows();
var movbRows;
var frRightRows;
if (this.parent.isFrozenGrid()) {
movbRows = this.parent.getMovableRows();
if (frTr) {
frRightRows = this.parent.getFrozenRightRows();
}
}
for (var i = 0, len = tr.length; i < len; i++) {

@@ -588,18 +475,4 @@ rows[parseInt(i.toString(), 10)] = tr[parseInt(i.toString(), 10)];

currentViewData[parseInt(i.toString(), 10)] = recordobj[parseInt(i.toString(), 10)];
if (this.parent.isFrozenGrid()) {
movbRows[parseInt(i.toString(), 10)] = mtr[parseInt(i.toString(), 10)];
movbObject[parseInt(i.toString(), 10)] = movobj[parseInt(i.toString(), 10)];
if (frTr) {
frRightRows[parseInt(i.toString(), 10)] = frTr[parseInt(i.toString(), 10)];
frRightObject[parseInt(i.toString(), 10)] = frObj[parseInt(i.toString(), 10)];
}
}
}
resetRowIndex(this.parent, rowObjects, tr);
if (this.parent.isFrozenGrid()) {
resetRowIndex(this.parent, movbObject, mtr);
if (frTr) {
resetRowIndex(this.parent, frRightObject, frTr);
}
}
};

@@ -642,3 +515,3 @@ RowDD.prototype.rowOrder = function (args) {

}
if (this.selectedRowColls.length > 0 && (!this.parent.allowGrouping || !this.parent.groupSettings.columns.length)) {
if ((!this.parent.allowGrouping || !this.parent.groupSettings.columns.length) && this.selectedRowColls.length > 0) {
this.parent.selectRows(this.selectedRowColls);

@@ -791,5 +664,8 @@ var indexes = [];

if (parentsUntil(element, 'e-grid') &&
(parentsUntil(cloneElement.parentElement, 'e-grid').id === parentsUntil(element, 'e-grid').id || this.istargetGrid)) {
var targetElement = element ?
element : this.startedRow;
((!this.parent.rowDropSettings.targetID &&
parentsUntil(cloneElement.parentElement, 'e-grid').id === parentsUntil(element, 'e-grid').id) || this.istargetGrid)) {
var targetElement = element;
if (!element) {
targetElement = startedRow;
}
this.setBorder(targetElement, e.event, startedRow, targetRow);

@@ -828,3 +704,12 @@ }

if (!gridheaderEle.getElementsByClassName('e-firstrow-dragborder').length) {
gridheaderEle.appendChild(div);
if (this.parent.frozenRows) {
if (this.parent.isFrozenGrid()) {
div.style.width = this.parent.getContent().firstElementChild.scrollWidth + 'px';
}
gridheaderEle.querySelector('thead').appendChild(div);
div.style.position = 'relative';
}
else {
gridheaderEle.appendChild(div);
}
}

@@ -855,8 +740,2 @@ }

}
var frzCols = this.parent.isFrozenGrid();
if (targetRow && targetRowIndex !== 0 && frzCols) {
var rowIndex = parseInt(element.getAttribute(literals.dataRowIndex), 10);
var selector = '.e-rowcell,.e-rowdragdrop,.e-detailrowcollapse';
rowElement = this.borderRowElement(rowIndex, selector);
}
if (rowElement.length > 0) {

@@ -867,11 +746,2 @@ addRemoveActiveClasses(rowElement, true, 'e-dragborder');

};
RowDD.prototype.borderRowElement = function (rowIndex, selector) {
var lastRow = [];
lastRow = [].slice.call(this.isDropGrid.getRowByIndex(rowIndex).querySelectorAll(selector)).
concat([].slice.call(this.isDropGrid.getMovableRowByIndex(rowIndex).querySelectorAll(selector)));
if (this.isDropGrid.getFrozenMode() === literals.leftRight) {
lastRow = lastRow.concat([].slice.call(this.isDropGrid.getFrozenRightRowByIndex(rowIndex).querySelectorAll(selector)));
}
return lastRow;
};
RowDD.prototype.getScrollWidth = function () {

@@ -913,12 +783,6 @@ var scrollElem = this.parent.getContent().firstElementChild;

else {
element = (this.isDropGrid.isFrozenGrid() ? this.isDropGrid.getMovableRows() : this.isDropGrid.getRows())
.filter(function (row) { return row.querySelector('td.e-dragborder'); })[0];
element = (this.isDropGrid.getRows()).filter(function (row) { return row.querySelector('td.e-dragborder'); })[0];
}
if (element) {
var rowElement = [].slice.call(element.getElementsByClassName('e-dragborder'));
if (this.parent.isFrozenGrid()) {
var rowIndex = parseInt(element.getAttribute(literals.dataRowIndex), 10);
var selector = '.e-dragborder';
rowElement = this.borderRowElement(rowIndex, selector);
}
addRemoveActiveClasses(rowElement, false, 'e-dragborder');

@@ -1069,10 +933,2 @@ }

this.rows = [this.parent.getRowByIndex(dragIdx)];
if (gObj.isFrozenGrid()) {
this.rows = [gObj.getRowByIndex(dragIdx), gObj.getMovableRowByIndex(dragIdx)];
if (gObj.getFrozenMode() === literals.leftRight) {
this.rows = [
gObj.getRowByIndex(dragIdx), gObj.getMovableRowByIndex(dragIdx), gObj.getFrozenRightRowByIndex(dragIdx)
];
}
}
}

@@ -1079,0 +935,0 @@ this.rowData = [this.parent.getRowInfo((this.startedRow).querySelector('.' + literals.rowCell)).rowData];

@@ -74,3 +74,2 @@ import { IGrid, IAction } from '../base/interface';

private setScrollLeft;
private onFrozenContentScroll;
private onContentScroll;

@@ -88,2 +87,7 @@ private onCustomScrollbarScroll;

addStickyListener(isAdd: boolean): void;
/**
* @returns {void}
* @hidden
*/
resizeFrozenRowBorder(): void;
private wireEvents;

@@ -90,0 +94,0 @@ /**

@@ -73,3 +73,4 @@ import { Browser, EventHandler } from '@syncfusion/ej2-base';

var height = this.parent.height;
if (this.parent.isFrozenGrid() && this.parent.height !== 'auto' && this.parent.height.toString().indexOf('%') < 0) {
if (this.parent.enableColumnVirtualization && this.parent.isFrozenGrid() && this.parent.height !== 'auto'
&& this.parent.height.toString().indexOf('%') < 0) {
height = parseInt(height, 10) - Scroll.getScrollBarWidth();

@@ -108,4 +109,3 @@ }

var cssProps = this.getCssProperties();
var padding = this.parent.getFrozenMode() === 'Right' || this.parent.getFrozenMode() === literals.leftRight ? '0.5px' : '1px';
content.querySelector('.' + literals.headerContent).style[cssProps.border] = scrollWidth > 0 ? padding : '0px';
content.querySelector('.' + literals.headerContent).style[cssProps.border] = scrollWidth > 0 ? '1px' : '0px';
content.style[cssProps.padding] = scrollWidth > 0 ? scrollWidth + 'px' : '0px';

@@ -143,5 +143,2 @@ };

content.style.height = 'calc(100% - ' + height + 'px)'; //Set the height to the '.' + literals.gridContent;
if (this.parent.isFrozenGrid()) {
content.firstElementChild.style.height = 'calc(100% - ' + getScrollBarWidth() + 'px)';
}
};

@@ -187,46 +184,32 @@ Scroll.prototype.getThreshold = function () {

Scroll.prototype.unwireEvents = function () {
var frzCols = this.parent.isFrozenGrid();
var mCont;
var mHdr;
if (this.content) {
mCont = this.content.querySelector('.' + literals.movableContent);
if (this.parent.frozenRows && this.header) {
EventHandler.remove(this.header, 'touchstart pointerdown', this.setPageXY);
EventHandler.remove(this.header, 'touchmove pointermove', this.onTouchScroll);
}
if (this.header) {
mHdr = this.header.querySelector('.' + literals.movableHeader);
}
var mScrollBar = this.parent.getContent() ? this.parent.getContent().querySelector('.e-movablescrollbar') : null;
if (this.parent.frozenRows && ((this.header && !frzCols) || (frzCols && mHdr))) {
EventHandler.remove(frzCols ? mHdr : this.header, 'touchstart pointerdown', this.setPageXY);
EventHandler.remove(frzCols ? mHdr : this.header, 'touchmove pointermove', this.onTouchScroll);
}
if (this.parent.isFrozenGrid()) {
if (this.parent.isFrozenGrid() && this.parent.enableColumnVirtualization) {
if (mScrollBar) {
EventHandler.remove(mScrollBar, 'scroll', this.onCustomScrollbarScroll);
}
if (mCont) {
EventHandler.remove(mCont, 'scroll', this.onCustomScrollbarScroll);
EventHandler.remove(mCont, 'touchstart pointerdown', this.setPageXY);
if (this.content) {
EventHandler.remove(this.content, 'scroll', this.onCustomScrollbarScroll);
EventHandler.remove(this.content, 'touchstart pointerdown', this.setPageXY);
if (!(/macintosh|ipad/.test(Browser.userAgent.toLowerCase()) && Browser.isDevice)) {
EventHandler.remove(mCont, 'touchmove pointermove', this.onTouchScroll);
EventHandler.remove(this.content, 'touchmove pointermove', this.onTouchScroll);
}
}
if (mHdr) {
EventHandler.remove(mHdr, 'scroll', this.onCustomScrollbarScroll);
EventHandler.remove(mHdr, 'touchstart pointerdown', this.setPageXY);
EventHandler.remove(mHdr, 'touchmove pointermove', this.onTouchScroll);
}
if (this.content) {
EventHandler.remove(this.content, 'scroll', this.onFrozenContentScroll);
}
}
else {
if (this.content) {
EventHandler.remove(this.content, 'scroll', this.contentScrollHandler);
}
if (this.header) {
EventHandler.remove(this.header, 'scroll', this.headerScrollHandler);
EventHandler.remove(this.header, 'scroll', this.onCustomScrollbarScroll);
EventHandler.remove(this.header, 'touchstart pointerdown', this.setPageXY);
EventHandler.remove(this.header, 'touchmove pointermove', this.onTouchScroll);
}
this.contentScrollHandler = null;
this.headerScrollHandler = null;
}
if (this.content) {
EventHandler.remove(this.content, 'scroll', this.contentScrollHandler);
}
if (this.header) {
EventHandler.remove(this.header, 'scroll', this.headerScrollHandler);
}
this.contentScrollHandler = null;
this.headerScrollHandler = null;
if (this.parent.aggregates.length && this.parent.getFooterContent()) {

@@ -237,21 +220,4 @@ EventHandler.remove(this.parent.getFooterContent().firstChild, 'scroll', this.onContentScroll);

Scroll.prototype.setScrollLeft = function () {
if (this.parent.isFrozenGrid()) {
this.parent.headerModule.getMovableHeader().scrollLeft = this.previousValues.left;
}
else {
this.parent.getHeaderContent().querySelector('.' + literals.headerContent).scrollLeft = this.previousValues.left;
}
this.parent.getHeaderContent().querySelector('.' + literals.headerContent).scrollLeft = this.previousValues.left;
};
Scroll.prototype.onFrozenContentScroll = function () {
var _this = this;
return function (e) {
if (_this.content.querySelector(literals.tbody) === null || _this.parent.isPreventScrollEvent) {
return;
}
if (!isNullOrUndefined(_this.parent.infiniteScrollModule) && _this.parent.enableInfiniteScrolling) {
_this.parent.notify(infiniteScrollHandler, e);
}
_this.previousValues.top = e.target.scrollTop;
};
};
Scroll.prototype.onContentScroll = function (scrollTarget) {

@@ -266,2 +232,39 @@ var _this = this;

var target = e.target;
if (_this.parent.frozenRows) {
if (_this.content.scrollTop > 0 && _this.parent.frozenRows) {
addClass([_this.parent.element], 'e-top-shadow');
}
else {
removeClass([_this.parent.element], 'e-top-shadow');
}
}
if (_this.parent.element.querySelectorAll('.e-leftfreeze,.e-fixedfreeze,.e-rightfreeze').length) {
var errorFreeze = _this.parent.getContent().querySelectorAll('.e-freezeerror:not([style*="display: none"])');
var errorFixed = _this.parent.getContent().querySelectorAll('.e-fixederror:not([style*="display: none"])');
if (target.scrollLeft !== 0 && _this.parent.getVisibleFrozenLeftCount()) {
addClass([_this.parent.element], 'e-left-shadow');
}
else {
removeClass([_this.parent.element], 'e-left-shadow');
}
var widthVal = Math.round((_this.parent.enableRtl ? target.scrollWidth + target.scrollLeft : target.scrollWidth - target.scrollLeft) +
(_this.parent.height === 'auto' ? 0 : 1));
if (widthVal === target.offsetWidth && _this.parent.getVisibleFrozenRightCount()) {
removeClass([_this.parent.element], 'e-right-shadow');
}
else {
addClass([_this.parent.element], 'e-right-shadow');
}
var rows = [].slice.call(_this.parent.getContent().querySelectorAll('.e-row:not(.e-hiddenrow)'));
if (((rows.length === 1 && errorFreeze.length) ||
(_this.parent.element.querySelector('.e-freeze-autofill:not([style*="display: none"])')) ||
errorFixed.length) && target.scrollLeft !== _this.previousValues.left) {
target.scrollLeft = _this.previousValues.left;
return;
}
if (rows.length !== 1 && (errorFreeze.length || errorFixed.length) && target.scrollTop !== _this.previousValues.top) {
target.scrollTop = _this.previousValues.top;
return;
}
}
var left = target.scrollLeft;

@@ -290,6 +293,6 @@ if (!isNullOrUndefined(_this.parent.infiniteScrollModule) && _this.parent.enableInfiniteScrolling && !_this.parent.isEdit) {

};
Scroll.prototype.onCustomScrollbarScroll = function (mCont, mHdr) {
Scroll.prototype.onCustomScrollbarScroll = function (cont, hdr) {
var _this = this;
var content = mCont;
var header = mHdr;
var content = cont;
var header = hdr;
return function (e) {

@@ -323,8 +326,4 @@ if (_this.content.querySelector(literals.tbody) === null) {

var left = element.scrollLeft + (_this.pageXY.x - pageXY.x);
var mHdr = isFrozen ?
_this.parent.getHeaderContent().querySelector('.' + literals.movableHeader) :
_this.parent.getHeaderContent().querySelector('.' + literals.headerContent);
var mCont = isFrozen ?
_this.parent.getContent().querySelector('.' + literals.movableContent) :
_this.parent.getContent().querySelector('.' + literals.content);
var mHdr = _this.parent.getHeaderContent().querySelector('.' + literals.headerContent);
var mCont = _this.parent.getContent().querySelector('.' + literals.content);
if (_this.previousValues.left === left || (left < 0 || (mHdr.scrollWidth - mHdr.clientWidth) < left)) {

@@ -336,3 +335,3 @@ return;

mCont.scrollLeft = left;
if (isFrozen) {
if (isFrozen && _this.parent.enableColumnVirtualization) {
var scrollBar = _this.parent.getContent().querySelector('.e-movablescrollbar');

@@ -398,2 +397,18 @@ scrollBar.scrollLeft = left;

};
/**
* @returns {void}
* @hidden
*/
Scroll.prototype.resizeFrozenRowBorder = function () {
var div;
if (!this.parent.element.querySelector('.e-frozenrow-border')) {
div = this.parent.createElement('div', { className: 'e-frozenrow-border' });
this.parent.element.insertBefore(div, this.parent.element.querySelector('.e-gridcontent'));
}
else {
div = this.parent.element.querySelector('.e-frozenrow-border');
}
var scrollWidth = this.parent.height !== 'auto' ? Scroll.getScrollBarWidth() : 0;
div.style.width = (this.parent.element.offsetWidth - scrollWidth) - 0.5 + 'px';
};
Scroll.prototype.wireEvents = function () {

@@ -405,27 +420,22 @@ var _this = this;

this.header = this.parent.getHeaderContent().querySelector('.' + literals.headerContent);
var mCont = this.content.querySelector('.' + literals.movableContent);
var mHdr = this.header.querySelector('.' + literals.movableHeader);
var mScrollBar = this.parent.getContent().querySelector('.e-movablescrollbar');
if (this.parent.frozenRows) {
EventHandler.add(frzCols ? mHdr : this.header, 'touchstart pointerdown', this.setPageXY(), this);
EventHandler.add(frzCols ? mHdr : this.header, 'touchmove pointermove', this.onTouchScroll(frzCols ? mCont : this.content), this);
if (this.parent.frozenRows && this.header && this.content) {
EventHandler.add(this.header, 'touchstart pointerdown', this.setPageXY(), this);
EventHandler.add(this.header, 'touchmove pointermove', this.onTouchScroll(this.content), this);
}
if (this.parent.isFrozenGrid()) {
EventHandler.add(mScrollBar, 'scroll', this.onCustomScrollbarScroll(mCont, mHdr), this);
EventHandler.add(mCont, 'scroll', this.onCustomScrollbarScroll(mScrollBar, mHdr), this);
EventHandler.add(mHdr, 'scroll', this.onCustomScrollbarScroll(mScrollBar, mCont), this);
EventHandler.add(this.content, 'scroll', this.onFrozenContentScroll(), this);
EventHandler.add(mHdr, 'touchstart pointerdown', this.setPageXY(), this);
EventHandler.add(mHdr, 'touchmove pointermove', this.onTouchScroll(mCont), this);
EventHandler.add(mCont, 'touchstart pointerdown', this.setPageXY(), this);
if (frzCols && mScrollBar && this.parent.enableColumnVirtualization) {
EventHandler.add(mScrollBar, 'scroll', this.onCustomScrollbarScroll(this.content, this.header), this);
EventHandler.add(this.content, 'scroll', this.onCustomScrollbarScroll(mScrollBar, this.header), this);
EventHandler.add(this.header, 'scroll', this.onCustomScrollbarScroll(mScrollBar, this.content), this);
EventHandler.add(this.header, 'touchstart pointerdown', this.setPageXY(), this);
EventHandler.add(this.header, 'touchmove pointermove', this.onTouchScroll(this.content), this);
EventHandler.add(this.content, 'touchstart pointerdown', this.setPageXY(), this);
if (!(/macintosh|ipad/.test(Browser.userAgent.toLowerCase()) && Browser.isDevice)) {
EventHandler.add(mCont, 'touchmove pointermove', this.onTouchScroll(mHdr), this);
EventHandler.add(this.content, 'touchmove pointermove', this.onTouchScroll(this.header), this);
}
}
else {
this.contentScrollHandler = this.onContentScroll(this.header);
this.headerScrollHandler = this.onContentScroll(this.content);
EventHandler.add(this.content, 'scroll', this.contentScrollHandler, this);
EventHandler.add(this.header, 'scroll', this.headerScrollHandler, this);
}
this.contentScrollHandler = this.onContentScroll(this.header);
this.headerScrollHandler = this.onContentScroll(this.content);
EventHandler.add(this.content, 'scroll', this.contentScrollHandler, this);
EventHandler.add(this.header, 'scroll', this.headerScrollHandler, this);
if (this.parent.aggregates.length) {

@@ -451,13 +461,11 @@ EventHandler.add(this.parent.getFooterContent().firstChild, 'scroll', this.onContentScroll(this.content), this);

_this.parent.notify(checkScrollReset, args);
if (sHeight < clientHeight) {
if (sHeight < clientHeight && _this.parent.height !== 'auto') {
_this.setLastRowCell();
}
if (_this.parent.frozenRows) {
_this.resizeFrozenRowBorder();
}
if (!_this.parent.enableVirtualization && !_this.parent.enableInfiniteScrolling) {
if (!args.cancel) {
if ((_this.parent.frozenRows > 0 || _this.parent.isFrozenGrid()) && _this.header.querySelector('.' + literals.movableHeader)) {
_this.header.querySelector('.' + literals.movableHeader).scrollLeft = _this.previousValues.left;
}
else {
_this.header.scrollLeft = _this.previousValues.left;
}
_this.header.scrollLeft = _this.previousValues.left;
_this.content.scrollLeft = _this.previousValues.left;

@@ -469,7 +477,6 @@ _this.content.scrollTop = _this.previousValues.top;

_this.content.scrollLeft = sLeft;
if (_this.parent.isFrozenGrid()) {
_this.previousValues.left = sLeft;
}
}
if (_this.parent.isFrozenGrid() && _this.header.querySelector('.' + literals.movableHeader)) {
_this.header.querySelector('.' + literals.movableHeader).scrollLeft =
_this.content.querySelector('.' + literals.movableContent).scrollLeft;
}
});

@@ -488,16 +495,2 @@ this.parent.isPreventScrollEvent = false;

addClass(table.querySelectorAll('tr:last-child td'), 'e-lastrowcell');
if (this.parent.isFrozenGrid()) {
var mTable = this.parent.getContent().querySelector('.' + literals.movableContent);
if (mTable.querySelector('tr:nth-last-child(2)')) {
removeClass(mTable.querySelector('tr:nth-last-child(2)').querySelectorAll('td'), 'e-lastrowcell');
}
addClass(mTable.querySelectorAll('tr:last-child td'), 'e-lastrowcell');
if (this.parent.getFrozenRightColumnsCount()) {
var frTable = this.parent.getContent().querySelector('.e-frozen-right-content');
if (frTable.querySelector('tr:nth-last-child(2)')) {
removeClass(frTable.querySelector('tr:nth-last-child(2)').querySelectorAll('td'), 'e-lastrowcell');
}
addClass(frTable.querySelectorAll('tr:last-child td'), 'e-lastrowcell');
}
}
};

@@ -504,0 +497,0 @@ /**

@@ -46,3 +46,2 @@ import { IGrid, IAction, IIndex, ISelectedCell } from '../base/interface';

private prevECIdxs;
private selectedRowIndex;
private isMultiShiftRequest;

@@ -182,4 +181,2 @@ private isMultiCtrlRequest;

private isEditing;
private getSelectedMovableRow;
private getSelectedFrozenRightRow;
getCurrentBatchRecordChanges(): Object[];

@@ -196,4 +193,2 @@ /**

private selectRowCallBack;
private selectMovableRow;
private addMovableArgs;
/**

@@ -247,3 +242,2 @@ * Selects a range of rows from start and end row indexes.

private getRowObj;
private getSelectedMovableCell;
/**

@@ -299,2 +293,4 @@ * Selects a cell by the given index.

private selectLikeExcel;
private setFrozenBorders;
private refreshFrozenBorders;
private drawBorders;

@@ -301,0 +297,0 @@ private isLastCell;

@@ -167,2 +167,5 @@ import { isNullOrUndefined } from '@syncfusion/ej2-base';

else {
if (_this.parent.isFrozenGrid() && columns.length) {
_this.parent.notify(events.refreshFrozenPosition, { isModeChg: true });
}
_this.parent.notify(events.columnVisibilityChanged, columns);

@@ -169,0 +172,0 @@ }

@@ -498,12 +498,9 @@ import { Browser } from '@syncfusion/ej2-base';

};
Sort.prototype.refreshSortIcons = function (params) {
if (params === void 0) { params = { args: { isFrozen: false } }; }
if (!params.args.isFrozen) {
this.removeSortIcons();
this.isMultiSort = true;
this.removeSortIcons();
this.addSortIcons();
this.isMultiSort = false;
this.updateAriaAttr();
}
Sort.prototype.refreshSortIcons = function () {
this.removeSortIcons();
this.isMultiSort = true;
this.removeSortIcons();
this.addSortIcons();
this.isMultiSort = false;
this.updateAriaAttr();
};

@@ -510,0 +507,0 @@ /**

@@ -125,3 +125,3 @@ import { EventHandler, extend, isNullOrUndefined } from '@syncfusion/ej2-base';

<span id="' + this.gridID + '_clearbutton" class="e-input-group-icon e-icons e-sicon" \
tabindex="-1" aria-label= "clear" role= "clear" style="cursor: default"></span>\
tabindex="-1" aria-label= "clear" role= "button" style="cursor: default"></span>\
<span id="' + this.gridID + '_searchbutton" class="e-input-group-icon e-search-icon e-icons" \

@@ -128,0 +128,0 @@ tabindex="-1" title="' + this.l10n.getConstant('Search') + '" aria-label= "search" role= "search"></span> \

@@ -23,9 +23,9 @@ import { initialLoad } from '../base/constant';

var renderer = this.locator.getService('rendererFactory');
if (!this.parent.isFrozenGrid()) {
if (this.parent.enableColumnVirtualization) {
renderer.addRenderer(RenderType.Header, new VirtualHeaderRenderer(this.parent, this.locator));
}
renderer.addRenderer(RenderType.Content, new VirtualContentRenderer(this.parent, this.locator));
if (this.parent.enableColumnVirtualization) {
renderer.addRenderer(RenderType.Header, new VirtualHeaderRenderer(this.parent, this.locator));
}
this.ensurePageSize();
renderer.addRenderer(RenderType.Content, new VirtualContentRenderer(this.parent, this.locator));
if (!(!this.parent.enableVirtualization && this.parent.enableColumnVirtualization)) {
this.ensurePageSize();
}
};

@@ -102,4 +102,3 @@ VirtualScroll.prototype.ensurePageSize = function () {

if (forms.length > 1) {
form = gObj.getFrozenMode() !== 'Right' ? forms[1] : forms[0];
contentLeft = gObj.getMovableVirtualContent().getBoundingClientRect().left;
form = forms[1];
}

@@ -106,0 +105,0 @@ if (errorDomRect.left < contentLeft || errorDomRect.right > gObj.element.offsetWidth) {

@@ -291,2 +291,4 @@ /** @hidden */

/** @hidden */
export declare const exportDetailTemplate: string;
/** @hidden */
export declare const beforePdfExport: string;

@@ -563,1 +565,7 @@ /** @hidden */

export declare const refreshVirtualLazyLoadCache: string;
/** @hidden */
export declare const refreshFrozenPosition: string;
/** @hidden */
export declare const refreshResizePosition: string;
/** @hidden */
export declare const refreshSplitFrozenColumn: string;

@@ -291,2 +291,4 @@ /** @hidden */

/** @hidden */
export var exportDetailTemplate = 'exportDetailTemplate';
/** @hidden */
export var beforePdfExport = 'beforePdfExport';

@@ -563,1 +565,7 @@ /** @hidden */

export var refreshVirtualLazyLoadCache = 'refresh-Virtual-LazyLoad-Cache';
/** @hidden */
export var refreshFrozenPosition = 'refresh-Frozen-Position';
/** @hidden */
export var refreshResizePosition = 'refresh-Resize-Position';
/** @hidden */
export var refreshSplitFrozenColumn = 'refresh-Split-Frozen-Column';

@@ -219,2 +219,10 @@ /**

/**
* Defines Multiple Export Type.
* ```
* * AppendToPage :- Multiple Grids are exported to same page.
* * NewPage :- Multiple Grids are exported to separate page.
* ```
*/
export declare type MultiplePdfExportType = 'AppendToPage' | 'NewPage';
/**
* Defines Predefined toolbar items.

@@ -549,5 +557,7 @@ *

* * Right :- freeze the columns at right.
* * Fixed :- freeze the columns at center.
* * None :- does not freeze any columns.
* ```
*/
export declare type freezeDirection = 'Left' | 'Right';
export declare type freezeDirection = 'Left' | 'Right' | 'Fixed' | 'None';
/**

@@ -554,0 +564,0 @@ * Defines rendered part of the grid column

@@ -1,2 +0,2 @@

import { isNullOrUndefined, setValue, getValue } from '@syncfusion/ej2-base';import { Component, ModuleDeclaration, ChildProperty, Browser, closest, extend, TouchEventArgs } from '@syncfusion/ej2-base';import { addClass, removeClass, append, remove, classList, setStyleAttribute } from '@syncfusion/ej2-base';import { Property, Collection, Complex, Event, NotifyPropertyChanges, INotifyPropertyChanged, L10n } from '@syncfusion/ej2-base';import { EventHandler, KeyboardEvents, KeyboardEventArgs as KeyArg, EmitType } from '@syncfusion/ej2-base';import { Query, DataManager, DataUtil, DataOptions, UrlAdaptor } from '@syncfusion/ej2-data';import { ItemModel, ClickEventArgs } from '@syncfusion/ej2-navigations';import { createSpinner, hideSpinner, showSpinner, Tooltip } from '@syncfusion/ej2-popups';import { iterateArrayOrObject, prepareColumns, parentsUntil, wrap, templateCompiler, isGroupAdaptive, refreshForeignData } from './util';import { getRowHeight, setColumnIndex, Global, ispercentageWidth, renderMovable, getNumberFormat, getTransformValues } from './util';import { setRowElements, resetRowIndex, compareChanges, getCellByColAndRowIndex, performComplexDataOperation } from './util';import * as events from '../base/constant';import { ReturnType, BatchChanges } from '../base/type';import { IDialogUI, ScrollPositionType, ActionArgs, ExportGroupCaptionEventArgs, FilterUI, LazyLoadArgs, LoadEventArgs } from './interface';import {AggregateQueryCellInfoEventArgs, IGrid } from './interface';import { IRenderer, IValueFormatter, IFilterOperator, IIndex, RowDataBoundEventArgs, QueryCellInfoEventArgs } from './interface';import { CellDeselectEventArgs, CellSelectEventArgs, CellSelectingEventArgs, ParentDetails, ContextMenuItemModel } from './interface';import { PdfQueryCellInfoEventArgs, ExcelQueryCellInfoEventArgs, ExcelExportProperties, PdfExportProperties } from './interface';import { PdfHeaderQueryCellInfoEventArgs, ExcelHeaderQueryCellInfoEventArgs, ExportDetailDataBoundEventArgs } from './interface';import { ColumnMenuOpenEventArgs, BatchCancelArgs, RecordDoubleClickEventArgs, DataResult, PendingState } from './interface';import { HeaderCellInfoEventArgs, KeyboardEventArgs, RecordClickEventArgs, AdaptiveDialogEventArgs } from './interface';import { FailureEventArgs, FilterEventArgs, ColumnDragEventArgs, GroupEventArgs, PrintEventArgs, ICustomOptr } from './interface';import { RowDeselectEventArgs, RowSelectEventArgs, RowSelectingEventArgs, RowDeselectingEventArgs, PageEventArgs, RowDragEventArgs } from './interface';import { BeforeBatchAddArgs, BeforeBatchDeleteArgs, BeforeBatchSaveArgs, ResizeArgs, ColumnMenuItemModel } from './interface';import { BatchAddArgs, BatchDeleteArgs, BeginEditArgs, CellEditArgs, CellSaveArgs, BeforeDataBoundArgs, RowInfo } from './interface';import { DetailDataBoundEventArgs, ColumnChooserEventArgs, AddEventArgs, SaveEventArgs, EditEventArgs, DeleteEventArgs } from './interface';import { ExcelExportCompleteArgs, PdfExportCompleteArgs, DataStateChangeEventArgs, DataSourceChangedEventArgs } from './interface';import { SearchEventArgs, SortEventArgs, ISelectedCell, EJ2Intance, BeforeCopyEventArgs, ColumnDataStateChangeEventArgs} from './interface';import {BeforePasteEventArgs, CheckBoxChangeEventArgs, CommandClickEventArgs, BeforeAutoFillEventArgs } from './interface';import { Render } from '../renderer/render';import { Column, ColumnModel, ActionEventArgs } from '../models/column';import { SelectionType, GridLine, RenderType, SortDirection, SelectionMode, PrintMode, FilterType, FilterBarMode } from './enum';import { CheckboxSelectionType, HierarchyGridPrintMode, NewRowPosition, freezeTable, ClipMode, freezeMode, IndicatorType } from './enum';import { WrapMode, ToolbarItems, ContextMenuItem, ColumnMenuItem, ToolbarItem, CellSelectionMode, EditMode, ResizeMode } from './enum';import { ColumnQueryModeType, RowRenderingDirection } from './enum';import { Data } from '../actions/data';import { Cell } from '../models/cell';import { RowRenderer } from '../renderer/row-renderer';import { CellRenderer } from '../renderer/cell-renderer';import { CellRendererFactory } from '../services/cell-render-factory';import { ServiceLocator } from '../services/service-locator';import { ValueFormatter } from '../services/value-formatter';import { RendererFactory } from '../services/renderer-factory';import { ColumnWidthService } from '../services/width-controller';import { AriaService } from '../services/aria-service';import { FocusStrategy } from '../services/focus-strategy';import { PageSettingsModel, AggregateRowModel, AggregateColumnModel, ColumnChooserSettingsModel } from '../models/models';import { PageSettings } from '../models/page-settings';import { ColumnChooserSettings } from '../models/column-chooser-settings';import { Sort } from '../actions/sort';import { Page } from '../actions/page';import { Selection } from '../actions/selection';import { Filter } from '../actions/filter';import { Search } from '../actions/search';import { Resize } from '../actions/resize';import { Reorder } from '../actions/reorder';import { RowDD } from '../actions/row-reorder';import { ShowHide } from '../actions/show-hide';import { Scroll } from '../actions/scroll';import { InfiniteScroll } from '../actions/infinite-scroll';import { Group } from '../actions/group';import { Print } from '../actions/print';import { DetailRow } from '../actions/detail-row';import { Toolbar } from '../actions/toolbar';import { AggregateRow } from '../models/aggregate';import { Edit } from '../actions/edit';import { Row } from '../models/row';import { ColumnChooser } from '../actions/column-chooser';import { ExcelExport } from '../actions/excel-export';import { PdfExport } from '../actions/pdf-export';import { Clipboard } from '../actions/clipboard';import { CommandColumn } from '../actions/command-column';import { ContextMenu } from '../actions/context-menu';import { BeforeOpenCloseMenuEventArgs, MenuEventArgs } from '@syncfusion/ej2-navigations';import { ColumnMenu } from '../actions/column-menu';import { CheckState } from './enum';import { Aggregate } from '../actions/aggregate';import { ILogger } from '../actions/logger';import { IModelGenerator } from '../base/interface';import { RowModelGenerator } from '../services/row-model-generator';import { ColumnDeselectEventArgs, ColumnSelectEventArgs, ColumnSelectingEventArgs } from './interface';import { DateFormatOptions, NumberFormatOptions, SanitizeHtmlHelper } from '@syncfusion/ej2-base';import * as literals from '../base/string-literals';import { Workbook } from '@syncfusion/ej2-excel-export';import { HeaderCellRenderer } from '../renderer/header-cell-renderer';
import { isNullOrUndefined, setValue, getValue } from '@syncfusion/ej2-base';import { Component, ModuleDeclaration, ChildProperty, Browser, closest, extend, TouchEventArgs } from '@syncfusion/ej2-base';import { addClass, removeClass, append, remove, classList, setStyleAttribute } from '@syncfusion/ej2-base';import { Property, Collection, Complex, Event, NotifyPropertyChanges, INotifyPropertyChanged, L10n } from '@syncfusion/ej2-base';import { EventHandler, KeyboardEvents, KeyboardEventArgs as KeyArg, EmitType } from '@syncfusion/ej2-base';import { Query, DataManager, DataUtil, DataOptions, UrlAdaptor } from '@syncfusion/ej2-data';import { ItemModel, ClickEventArgs } from '@syncfusion/ej2-navigations';import { createSpinner, hideSpinner, showSpinner, Tooltip } from '@syncfusion/ej2-popups';import { iterateArrayOrObject, prepareColumns, parentsUntil, wrap, templateCompiler, isGroupAdaptive, refreshForeignData, getScrollBarWidth } from './util';import { getRowHeight, setColumnIndex, Global, ispercentageWidth, getNumberFormat, getTransformValues } from './util';import { setRowElements, resetRowIndex, compareChanges, getCellByColAndRowIndex, performComplexDataOperation } from './util';import * as events from '../base/constant';import { ReturnType, BatchChanges } from '../base/type';import { IDialogUI, ScrollPositionType, ActionArgs, ExportGroupCaptionEventArgs, FilterUI, LazyLoadArgs, LoadEventArgs } from './interface';import {AggregateQueryCellInfoEventArgs, IGrid } from './interface';import { IRenderer, IValueFormatter, IFilterOperator, IIndex, RowDataBoundEventArgs, QueryCellInfoEventArgs } from './interface';import { CellDeselectEventArgs, CellSelectEventArgs, CellSelectingEventArgs, ParentDetails, ContextMenuItemModel } from './interface';import { PdfQueryCellInfoEventArgs, ExcelQueryCellInfoEventArgs, ExcelExportProperties, PdfExportProperties } from './interface';import { PdfHeaderQueryCellInfoEventArgs, ExcelHeaderQueryCellInfoEventArgs, ExportDetailDataBoundEventArgs, ExportDetailTemplateEventArgs } from './interface';import { ColumnMenuOpenEventArgs, BatchCancelArgs, RecordDoubleClickEventArgs, DataResult, PendingState } from './interface';import { HeaderCellInfoEventArgs, KeyboardEventArgs, RecordClickEventArgs, AdaptiveDialogEventArgs } from './interface';import { FailureEventArgs, FilterEventArgs, ColumnDragEventArgs, GroupEventArgs, PrintEventArgs, ICustomOptr } from './interface';import { RowDeselectEventArgs, RowSelectEventArgs, RowSelectingEventArgs, RowDeselectingEventArgs, PageEventArgs, RowDragEventArgs } from './interface';import { BeforeBatchAddArgs, BeforeBatchDeleteArgs, BeforeBatchSaveArgs, ResizeArgs, ColumnMenuItemModel } from './interface';import { BatchAddArgs, BatchDeleteArgs, BeginEditArgs, CellEditArgs, CellSaveArgs, BeforeDataBoundArgs, RowInfo } from './interface';import { DetailDataBoundEventArgs, ColumnChooserEventArgs, AddEventArgs, SaveEventArgs, EditEventArgs, DeleteEventArgs } from './interface';import { ExcelExportCompleteArgs, PdfExportCompleteArgs, DataStateChangeEventArgs, DataSourceChangedEventArgs } from './interface';import { SearchEventArgs, SortEventArgs, ISelectedCell, EJ2Intance, BeforeCopyEventArgs, ColumnDataStateChangeEventArgs} from './interface';import {BeforePasteEventArgs, CheckBoxChangeEventArgs, CommandClickEventArgs, BeforeAutoFillEventArgs } from './interface';import { Render } from '../renderer/render';import { Column, ColumnModel, ActionEventArgs } from '../models/column';import { SelectionType, GridLine, RenderType, SortDirection, SelectionMode, PrintMode, FilterType, FilterBarMode } from './enum';import { CheckboxSelectionType, HierarchyGridPrintMode, NewRowPosition, ClipMode, freezeMode, IndicatorType } from './enum';import { WrapMode, ToolbarItems, ContextMenuItem, ColumnMenuItem, ToolbarItem, CellSelectionMode, EditMode, ResizeMode } from './enum';import { ColumnQueryModeType, RowRenderingDirection } from './enum';import { Data } from '../actions/data';import { Cell } from '../models/cell';import { RowRenderer } from '../renderer/row-renderer';import { CellRenderer } from '../renderer/cell-renderer';import { CellRendererFactory } from '../services/cell-render-factory';import { ServiceLocator } from '../services/service-locator';import { ValueFormatter } from '../services/value-formatter';import { RendererFactory } from '../services/renderer-factory';import { ColumnWidthService } from '../services/width-controller';import { AriaService } from '../services/aria-service';import { FocusStrategy } from '../services/focus-strategy';import { PageSettingsModel, AggregateRowModel, AggregateColumnModel, ColumnChooserSettingsModel } from '../models/models';import { PageSettings } from '../models/page-settings';import { ColumnChooserSettings } from '../models/column-chooser-settings';import { Sort } from '../actions/sort';import { Page } from '../actions/page';import { Selection } from '../actions/selection';import { Filter } from '../actions/filter';import { Search } from '../actions/search';import { Resize } from '../actions/resize';import { Reorder } from '../actions/reorder';import { RowDD } from '../actions/row-reorder';import { ShowHide } from '../actions/show-hide';import { Scroll } from '../actions/scroll';import { InfiniteScroll } from '../actions/infinite-scroll';import { Group } from '../actions/group';import { Print } from '../actions/print';import { DetailRow } from '../actions/detail-row';import { Toolbar } from '../actions/toolbar';import { AggregateRow } from '../models/aggregate';import { Edit } from '../actions/edit';import { Row } from '../models/row';import { ColumnChooser } from '../actions/column-chooser';import { ExcelExport } from '../actions/excel-export';import { PdfExport } from '../actions/pdf-export';import { Clipboard } from '../actions/clipboard';import { ContextMenu } from '../actions/context-menu';import { BeforeOpenCloseMenuEventArgs, MenuEventArgs } from '@syncfusion/ej2-navigations';import { ColumnMenu } from '../actions/column-menu';import { CheckState } from './enum';import { Aggregate } from '../actions/aggregate';import { ILogger } from '../actions/logger';import { IModelGenerator } from '../base/interface';import { RowModelGenerator } from '../services/row-model-generator';import { ColumnDeselectEventArgs, ColumnSelectEventArgs, ColumnSelectingEventArgs } from './interface';import { DateFormatOptions, NumberFormatOptions, SanitizeHtmlHelper } from '@syncfusion/ej2-base';import * as literals from '../base/string-literals';import { Workbook } from '@syncfusion/ej2-excel-export';import { HeaderCellRenderer } from '../renderer/header-cell-renderer';
import {ComponentModel} from '@syncfusion/ej2-base';

@@ -486,6 +486,6 @@

/**
* Defines the `wrapMode` of the Grid. The available modes are:
* * `Both`: Wraps both the header and content.
* * `Content`: Wraps the header alone.
* * `Header`: Wraps the content alone.
* The `wrapMode` property defines how the text in the grid cells should be wrapped. The available modes are:
* * `Both`: Wraps text in both the header and content cells.
* * `Content`: Wraps text in the content cells only.
* * `Header`: Wraps texts in the header cells only.
*

@@ -578,3 +578,3 @@ * @default Both

*
* @default ''
* @default null
* @aspType string

@@ -654,3 +654,3 @@ */

*
* @default ''
* @default null
* @aspType string

@@ -663,3 +663,3 @@ */

*
* @default ''
* @default null
* @aspType string

@@ -672,3 +672,3 @@ */

*
* @default ''
* @default null
* @aspType string

@@ -1177,3 +1177,3 @@ */

*
* @default ''
* @default null
* @aspType string

@@ -1190,3 +1190,3 @@ */

*
* @default ''
* @default null
* @aspType string

@@ -1276,2 +1276,9 @@ */

/**
* Defines the id of the grids that needs to be exported
*
* @default null
*/
exportGrids?: string[];
/**
* `toolbar` defines the ToolBar items of the Grid.

@@ -1406,3 +1413,3 @@ * It contains built-in and custom toolbar items.

*
* @default default version
* @default ''
*/

@@ -1654,2 +1661,9 @@ ej2StatePersistenceVersion?: string;

/**
* Triggers before exporting each detail template.
*
* @event exportDetailTemplate
*/
exportDetailTemplate?: EmitType<ExportDetailTemplateEventArgs>;
/**
* Triggers before exporting each cell to Excel file.

@@ -1656,0 +1670,0 @@ * You can also customize the Excel cells.

@@ -7,7 +7,6 @@ import { IPosition, IGrid, IRow, IExpandedRow, PdfExportProperties, ExcelExportProperties } from './interface';

import { ColumnModel, AggregateColumnModel } from '../models/models';
import { AggregateType, HierarchyGridPrintMode, freezeTable } from './enum';
import { AggregateType, HierarchyGridPrintMode } from './enum';
import { Dialog, Popup } from '@syncfusion/ej2-popups';
import { PredicateModel } from './grid-model';
import { FilterStateObj, IXLFilter } from '../common/filter-interface';
import { Cell } from '../models/cell';
/**

@@ -391,10 +390,2 @@ * Function to check whether target object implement specific interface

/**
* @param {Element} ele - Defines the element
* @param {number} frzCols - Defines the frozen columns
* @param {IGrid} gObj - Defines the IGrid
* @returns {Element} Returns the element
* @hidden
*/
export declare function renderMovable(ele: Element, frzCols: number, gObj?: IGrid): Element;
/**
* @param {IGrid} grid - Defines the IGrid

@@ -485,8 +476,21 @@ * @returns {boolean} Returns true if group adaptive is true

/**
* @param {HTMLElement} mTD - Defines the movable TD
* @param {HTMLElement} fTD - Defines the Frozen TD
* @param {IGrid} gObj - Defines grid object
* @returns {number} - Returns scroll width
* @hidden
*/
export declare function getScrollWidth(gObj: IGrid): number;
/**
* @param {IGrid} gObj - Defines grid object
* @param {number} idx - Defines the index
* @returns {number} Returns colSpan index
* @hidden
*/
export declare function resetColspanGroupCaption(gObj: IGrid, idx: number): number;
/**
* @param {HTMLElement} tr - Defines the tr Element
* @param {IGrid} gObj - Defines grid object
* @returns {void}
* @hidden
*/
export declare function alignFrozenEditForm(mTD: HTMLElement, fTD: HTMLElement): void;
export declare function groupCaptionRowLeftRightPos(tr: Element, gObj: IGrid): void;
/**

@@ -565,43 +569,53 @@ * @param {Element} row - Defines row element

/**
* @param {IGrid} gObj - Defines the grid object
* @param {Cell<Column>} cells - Defines the callback function
* @param {freezeTable} tableName - Defines the row
* @returns {Cell<Column>[]} Returns the cell
* @param {Element} row - Defines the row
* @param {number} start - Defines the start index
* @param {number} end - Defines the end index
* @returns {void}
* @hidden
*/
export declare function splitFrozenRowObjectCells(gObj: IGrid, cells: Cell<Column>[], tableName: freezeTable): Cell<Column>[];
export declare function sliceElements(row: Element, start: number, end: number): void;
/**
* @param {IGrid} gObj - Defines the grid object.
* @param {boolean} visibleOnly - Defines to return only visible columns.
* @returns {{frozenLeft: Column[], movable: Column[], frozenRight: Column[]}} - Returns all frozenLeft, movable and frozenRight Columns as object.
* @param {Column} column - Defines the column
* @param {string} uid - Defines the uid
* @returns {boolean} Returns is child column
* @hidden
*/
export declare function getExactFrozenMovableColumn(gObj: IGrid, visibleOnly?: boolean): {
frozenLeft: Column[];
movable: Column[];
frozenRight: Column[];
};
/** @hidden */
export declare function gridActionHandler(gObj: IGrid, callBack: Function, rows: Row<Column>[][] | Element[][], force?: boolean, rowObj?: Row<Column>[][]): void;
export declare function isChildColumn(column: Column, uid: string): boolean;
/**
* @param {IGrid} gObj - Defines the grid
* @returns {Row<Column>} Returns the row
* @param {Column} column - Defines the column
* @param {string[]} uids - Defines the uid
* @returns {void}
* @hidden
*/
export declare function getGridRowObjects(gObj: IGrid): Row<Column>[][];
export declare function pushuid(column: Column, uids: string[]): void;
/**
* @param {IGrid} gObj - Defines the grid
* @returns {Element} Returns the element
* @param {Column} column - Defines the column
* @returns {string} Returns the direction
* @hidden
*/
export declare function getGridRowElements(gObj: IGrid): Element[][];
export declare function frozenDirection(column: Column): string;
/**
* @param {Element} row - Defines the row
* @param {number} start - Defines the start index
* @param {number} end - Defines the end index
* @returns {void}
* @hidden
*/
export declare function sliceElements(row: Element, start: number, end: number): void;
export declare function addFixedColumnBorder(row: Element): void;
/**
* @param {HTMLElement} node - Defines the row
* @param {number} width - Defines the width
* @param {boolean} isRtl - Boolean property
* @param {string} position - Defines the position
* @returns {void}
* @hidden
*/
export declare function applyStickyLeftRightPosition(node: HTMLElement, width: number, isRtl: boolean, position: string): void;
/**
* @param {IGrid} gObj - Defines the grid
* @param {Column} column - Defines the column
* @param {Element} node - Defines the Element
* @returns {void}
* @hidden
*/
export declare function addStickyColumnPosition(gObj: IGrid, column: Column, node: Element): void;
/**
* @param {IGrid} gObj - Defines the grid Object

@@ -636,26 +650,2 @@ * @param {Column} col - Defines the column

/**
* @param {IGrid} gObj - Defines the grid object
* @returns {Element} Returns the Element
* @hidden
*/
export declare function getMovableTbody(gObj: IGrid): Element;
/**
* @param {IGrid} gObj - Defines the grid object
* @returns {Element} Returns the Element
* @hidden
*/
export declare function getFrozenRightTbody(gObj: IGrid): Element;
/**
* @param {Element} tbody - Table body
* @param {Element} mTbody - Movanle table body
* @param {Element} frTbody - Frozen right table body
* @param {Element[]} tr - Table rows
* @param {Element[]} mTr - Movable table rows
* @param {Element[]} frTr - Frozen right table rows
* @param {Function} callBack - Callback function
* @returns {void}
* @hidden
*/
export declare function setRowsInTbody(tbody: Element, mTbody: Element, frTbody: Element, tr: Element[], mTr: Element[], frTr: Element[], callBack: Function): void;
/**
* @param {string} numberFormat - Format

@@ -662,0 +652,0 @@ * @param {string} type - Value type

@@ -144,7 +144,11 @@ /* tslint:disable-next-line:max-line-length */

classList(this.sIcon, ['e-chkcancel-icon'], ['e-search-icon']);
document.body.querySelector('.e-chkcancel-icon').setAttribute('title', this.localeObj.getConstant('Clear'));
if (!isNullOrUndefined(document.body.querySelector('.e-chkcancel-icon'))) {
document.body.querySelector('.e-chkcancel-icon').setAttribute('title', this.localeObj.getConstant('Clear'));
}
}
else {
classList(this.sIcon, ['e-search-icon'], ['e-chkcancel-icon']);
document.body.querySelector('.e-search-icon').setAttribute('title', this.localeObj.getConstant('Search'));
if (!isNullOrUndefined(document.body.querySelector('.e-search-icon'))) {
document.body.querySelector('.e-searchclear.e-search-icon').setAttribute('title', this.localeObj.getConstant('Search'));
}
}

@@ -151,0 +155,0 @@ };

@@ -23,2 +23,3 @@ import { compile } from '@syncfusion/ej2-base';import { getEnumValue } from '@syncfusion/ej2-base';import { CustomSummaryType } from '../base/type';import { AggregateType, CellType } from '../base/enum';import { Property, Collection, ChildProperty, NumberFormatOptions, DateFormatOptions } from '@syncfusion/ej2-base';

* @default null
* @aspType string
*/

@@ -25,0 +26,0 @@ type?: AggregateType | AggregateType[] | string;

@@ -26,2 +26,3 @@ import { CustomSummaryType } from '../base/type';

* @default null
* @aspType string
*/

@@ -28,0 +29,0 @@ type: AggregateType | AggregateType[] | string;

@@ -402,4 +402,6 @@ import { NumberFormatOptions, DateFormatOptions } from '@syncfusion/ej2-base';

* * Right - Freeze the column at right side.
* * Fixed - Freeze the column at Center.
* * None - Does not freeze the column.
*
* @default null
* @default None
*/

@@ -922,4 +924,2 @@ freeze: freezeDirection;

* customized command buttons in each cells of the column.
*
* @aspType string
*/

@@ -1009,4 +1009,6 @@ commandsTemplate?: string | Function;

* * Right - Freeze the column at right side.
* * Fixed - Freeze the column at Center.
* * None - Does not freeze the column.
*
* @default null
* @default None
*/

@@ -1013,0 +1015,0 @@ freeze?: freezeDirection;

@@ -25,3 +25,2 @@ /**

export * from './renderer/command-column-renderer';
export * from './renderer/freeze-renderer';
export * from './renderer/string-filter-ui';

@@ -39,6 +38,4 @@ export * from './renderer/number-filter-ui';

export * from './renderer/virtual-content-renderer';
export * from './renderer/virtual-freeze-renderer';
export * from './renderer/group-lazy-load-renderer';
export * from './renderer/column-freeze-renderer';
export * from './renderer/responsive-dialog-renderer';
export * from './renderer/edit-cell-base';

@@ -25,3 +25,2 @@ /**

export * from './renderer/command-column-renderer';
export * from './renderer/freeze-renderer';
export * from './renderer/string-filter-ui';

@@ -39,6 +38,4 @@ export * from './renderer/number-filter-ui';

export * from './renderer/virtual-content-renderer';
export * from './renderer/virtual-freeze-renderer';
export * from './renderer/group-lazy-load-renderer';
export * from './renderer/column-freeze-renderer';
export * from './renderer/responsive-dialog-renderer';
export * from './renderer/edit-cell-base';

@@ -24,4 +24,3 @@ import { isNullOrUndefined, attributes } from '@syncfusion/ej2-base';

if (row.index > 0) {
var rowsObject = this.parent.isFrozenGrid() ?
this.parent.contentModule.tempFreezeRows : this.parent.getRowsObject();
var rowsObject = this.parent.getRowsObject();
var cells = this.parent.groupSettings.columns.length > 0 &&

@@ -28,0 +27,0 @@ !rowsObject[row.index - 1].isDataRow ? rowsObject[row.index].cells : rowsObject[row.index - 1].cells;

import { remove, addClass } from '@syncfusion/ej2-base';
import { isNullOrUndefined, extend } from '@syncfusion/ej2-base';
import { doesImplementInterface, setStyleAndAttributes, appendChildren, extendObjWithFn } from '../base/util';
import { doesImplementInterface, setStyleAndAttributes, appendChildren, extendObjWithFn, addStickyColumnPosition } from '../base/util';
import { createCheckBox } from '@syncfusion/ej2-buttons';

@@ -222,2 +222,9 @@ import { foreignKeyData } from '../base/constant';

}
if (node.classList.contains('e-summarycell') && !data.key) {
var uid = node.getAttribute('e-mappinguid');
column = this.parent.getColumnByUid(uid);
}
if (this.parent.isFrozenGrid() && (!data || (data && !data.key))) {
addStickyColumnPosition(this.parent, column, node);
}
return node;

@@ -224,0 +231,0 @@ };

@@ -14,2 +14,3 @@ import { IRenderer, IGrid, NotifyArgs, IModelGenerator } from '../base/interface';

private contentPanel;
private widthService;
protected rows: Row<Column>[];

@@ -20,3 +21,2 @@ protected freezeRows: Row<Column>[];

protected freezeRowElements: Element[];
private index;
/** @hidden */

@@ -32,7 +32,4 @@ prevInfo: VirtualInfo;

private droppable;
private viewColIndexes;
private drop;
private args;
private infiniteCache;
private isRemove;
private pressedKey;

@@ -69,2 +66,4 @@ /** @hidden */

renderPanel(): void;
protected renderHorizontalScrollbar(element?: Element): void;
private setScrollbarHeight;
/**

@@ -100,3 +99,2 @@ * The function is used to render grid content table

private getCurrentBlockInfiniteRecords;
private getReorderedVFRows;
private getReorderedRows;

@@ -139,8 +137,2 @@ private virtualFrozenHdrRefresh;

/**
* Get the Movable Row collection in the Freeze pane Grid.
*
* @returns {Row[] | HTMLCollectionOf<HTMLTableRowElement>} returns the row
*/
getMovableRows(): Row<Column>[] | HTMLCollectionOf<HTMLTableRowElement>;
/**
* Get the content table data row elements

@@ -152,8 +144,2 @@ *

/**
* Get the Freeze pane movable content table data row elements
*
* @returns {Element} returns the element
*/
getMovableRowElements(): Element[];
/**
* Get the content table data row elements

@@ -206,3 +192,2 @@ *

getVirtualRowIndex(index: number): number;
getMovableRowByIndex(index: number): Element;
private enableAfterRender;

@@ -209,0 +194,0 @@ setRowObjects(rows: Row<Column>[]): void;

@@ -51,38 +51,11 @@ import { isNullOrUndefined, closest, extend } from '@syncfusion/ej2-base';

var value;
var fForm;
var frForm;
var frzCols = gObj.isFrozenGrid();
var index = gObj.getFrozenMode() === 'Right' && gObj.editSettings.mode === 'Normal' ? 1 : 0;
var form = gObj.editSettings.mode === 'Dialog' ?
select('#' + gObj.element.id + '_dialogEdit_wrapper .e-gridform', document) :
gObj.element.getElementsByClassName('e-gridform')[parseInt(index.toString(), 10)];
var isVirtualFrozen = frzCols && this.parent.enableColumnVirtualization && args.isScroll;
if (frzCols && gObj.editSettings.mode === 'Normal') {
var rowIndex = parseInt(args.row.getAttribute(literals.dataRowIndex), 10);
if (gObj.frozenRows && ((args.requestType === 'add' && gObj.editSettings.newRowPosition === 'Top')
|| rowIndex < gObj.frozenRows)) {
fForm = gObj.element.querySelector('.' + literals.movableHeader).querySelector('.e-gridform');
if (this.parent.getFrozenMode() === literals.leftRight) {
frForm = args.frozenRightForm;
}
}
else {
fForm = gObj.element.querySelector('.' + literals.movableContent).querySelector('.e-gridform');
if (this.parent.getFrozenMode() === literals.leftRight) {
frForm = args.frozenRightForm;
}
}
}
gObj.element.getElementsByClassName('e-gridform')[0];
var cols = gObj.editSettings.mode !== 'Batch' ? gObj.getColumns() : [gObj.getColumnByField(args.columnName)];
for (var _i = 0, cols_1 = cols; _i < cols_1.length; _i++) {
var col = cols_1[_i];
if (isVirtualFrozen && col.getFreezeTableName() !== 'movable') {
continue;
}
if (this.parent.editSettings.template && !isNullOrUndefined(col.field)) {
var cellArgs = extend({}, args);
cellArgs.element = form.querySelector('[name=' + getComplexFieldID(col.field) + ']');
if (isNullOrUndefined(cellArgs.element) && frzCols) {
cellArgs.element = fForm.querySelector('[name=' + getComplexFieldID(col.field) + ']');
}
if (typeof col.edit.write === 'string') {

@@ -101,11 +74,3 @@ getObject(col.edit.write, window)(cellArgs);

value = (col.valueAccessor(col.field, args.rowData, col));
if (fForm && col.getFreezeTableName() === 'movable' && gObj.editSettings.mode === 'Normal') {
cell = fForm.querySelector('[e-mappinguid=' + col.uid + ']');
}
else if (frForm && col.getFreezeTableName() === literals.frozenRight && gObj.editSettings.mode === 'Normal') {
cell = frForm.querySelector('[e-mappinguid=' + col.uid + ']');
}
else {
cell = form.querySelector('[e-mappinguid=' + col.uid + ']');
}
cell = form.querySelector('[e-mappinguid=' + col.uid + ']');
var temp = col.edit.write;

@@ -132,21 +97,2 @@ if (!isNullOrUndefined(cell)) {

}
if (frzCols && !this.parent.allowTextWrap && ((args.requestType === 'add') || args.requestType === 'beginEdit')
&& this.parent.editSettings.mode !== 'Dialog' && !isNullOrUndefined(form) && !isNullOrUndefined(fForm)) {
var mTdElement = (fForm.querySelector('tr').children[0]);
var fTdElement = (form.querySelector('tr').children[0]);
if (fTdElement.offsetHeight > mTdElement.offsetHeight) {
mTdElement.style.height = fTdElement.offsetHeight + 'px';
if (frForm) {
var frTdElement = fForm.querySelector('tr').children[0];
frTdElement.style.height = fTdElement.offsetHeight + 'px';
}
}
else {
fTdElement.style.height = mTdElement.offsetHeight + 'px';
if (frForm) {
var frTdElement = fForm.querySelector('tr').children[0];
frTdElement.style.height = mTdElement.offsetHeight + 'px';
}
}
}
};

@@ -163,4 +109,4 @@ // eslint-disable-next-line @typescript-eslint/no-unused-vars

else {
var isFocus = this.parent.enableVirtualization && this.parent.editSettings.mode === 'Normal' ? false : true;
if (isFocus || (this.parent.enableVirtualization && this.parent.editSettings.newRowPosition === 'Bottom'
var isFocus = (this.parent.enableVirtualization || this.parent.enableColumnVirtualization) && this.parent.editSettings.mode === 'Normal' ? false : true;
if (isFocus || ((this.parent.enableVirtualization || this.parent.enableColumnVirtualization) && this.parent.editSettings.newRowPosition === 'Bottom'
&& parentsUntil(elem, literals.addedRow))) {

@@ -188,9 +134,4 @@ elem.focus();

}
var isVirtualFrozen = gObj.isFrozenGrid() && gObj.enableColumnVirtualization && args.isScroll;
for (var i = 0, len = cols.length; i < len; i++) {
var col = cols[parseInt(i.toString(), 10)];
if (this.parent.editModule.checkColumnIsGrouped(col) || (isVirtualFrozen && cols[parseInt(i.toString(), 10)].getFreezeTableName() !== 'movable')
|| (args.isCustomFormValidation && (col.commands || col.commandsTemplate || !col.field))) {
continue;
}
if (col.commands || col.commandsTemplate) {

@@ -197,0 +138,0 @@ var cellRendererFact = this.serviceLocator.getService('cellRendererFactory');

@@ -18,3 +18,3 @@ var __extends = (this && this.__extends) || (function () {

import { Input } from '@syncfusion/ej2-inputs';
import { appendChildren } from '../base/util';
import { appendChildren, addStickyColumnPosition } from '../base/util';
import { DropDownList } from '@syncfusion/ej2-dropdowns';

@@ -164,2 +164,5 @@ import * as events from '../base/constant';

}
if (this.parent.isFrozenGrid()) {
addStickyColumnPosition(this.parent, column, node);
}
return node;

@@ -166,0 +169,0 @@ };

@@ -14,7 +14,2 @@ import { IRenderer, IGrid } from '../base/interface';

private aggregates;
private freezeTable;
private frTable;
private frozenContent;
private movableContent;
private frozenRightContent;
private evtHandlers;

@@ -38,3 +33,2 @@ constructor(gridModule?: IGrid, serviceLocator?: ServiceLocator);

}): void;
private refreshHeight;
refreshCol(): void;

@@ -41,0 +35,0 @@ private onWidthChange;

@@ -14,5 +14,4 @@ var __extends = (this && this.__extends) || (function () {

})();
import { isNullOrUndefined, remove } from '@syncfusion/ej2-base';
import { formatUnit } from '@syncfusion/ej2-base';
import { Browser } from '@syncfusion/ej2-base';
import { isNullOrUndefined } from '@syncfusion/ej2-base';
import { formatUnit, removeClass } from '@syncfusion/ej2-base';
import { colGroupRefresh, columnWidthChanged, scroll, columnVisibilityChanged, refreshFooterRenderer } from '../base/constant';

@@ -22,3 +21,3 @@ import { ContentRender } from './content-renderer';

import { SummaryModelGenerator } from '../services/summary-model-generator';
import { renderMovable, calculateAggregate, iterateExtend, addRemoveEventListener } from '../base/util';
import { calculateAggregate, iterateExtend, addRemoveEventListener, applyStickyLeftRightPosition } from '../base/util';
import { DataUtil } from '@syncfusion/ej2-data';

@@ -50,22 +49,2 @@ import * as literals from '../base/string-literals';

var innerDiv = this.parent.createElement('div', { className: 'e-summarycontent' });
var movableContent = innerDiv;
if (this.parent.isFrozenGrid()) {
var fDiv = this.parent.createElement('div', { className: 'e-frozenfootercontent e-frozen-left-footercontent' });
var mDiv = this.parent.createElement('div', { className: 'e-movablefootercontent' });
var frDiv = this.parent.createElement('div', { className: 'e-frozenfootercontent e-frozen-right-footercontent' });
if (this.parent.getFrozenColumns() || this.parent.getFrozenLeftColumnsCount()) {
innerDiv.appendChild(fDiv);
this.frozenContent = fDiv;
}
innerDiv.appendChild(mDiv);
this.movableContent = mDiv;
movableContent = mDiv;
if (this.parent.getFrozenRightColumnsCount()) {
innerDiv.appendChild(frDiv);
this.frozenRightContent = frDiv;
}
}
if (Browser.isDevice) {
movableContent.style.overflowX = 'scroll';
}
div.appendChild(innerDiv);

@@ -86,3 +65,2 @@ this.setPanel(div);

FooterRenderer.prototype.renderTable = function () {
var frzCols = this.parent.getFrozenColumns() || this.parent.getFrozenLeftColumnsCount();
var innerDiv = this.createContentTable('_footer_table');

@@ -92,23 +70,2 @@ var table = innerDiv.querySelector('.' + literals.table);

table.appendChild(tFoot);
if (this.parent.isFrozenGrid()) {
var freezeTable = table.cloneNode(true);
var frTable = table.cloneNode(true);
if (frzCols) {
this.frozenContent.appendChild(freezeTable);
this.freezeTable = freezeTable;
}
if (this.parent.getFrozenRightColumnsCount()) {
remove(frTable.querySelector(literals.colGroup));
var hdr = this.parent.getHeaderContent().querySelector('.e-frozen-right-header');
var frCol = (hdr.querySelector(literals.colGroup).cloneNode(true));
frTable.insertBefore(frCol, frTable.querySelector(literals.tbody));
this.frozenRightContent.appendChild(frTable);
this.frTable = frTable;
}
this.movableContent.appendChild(table);
remove(table.querySelector(literals.colGroup));
var colGroup = ((this.parent.getHeaderContent().querySelector('.' + literals.movableHeader).querySelector(literals.colGroup)).cloneNode(true));
table.insertBefore(colGroup, table.querySelector(literals.tbody));
this.setColGroup(colGroup);
}
this.setTable(table);

@@ -121,3 +78,3 @@ };

var dummies = isNullOrUndefined(cStart) ? this.modelGenerator.getColumns() :
this.modelGenerator.getColumns(cStart, cEnd);
this.modelGenerator.getColumns(cStart);
// eslint-disable-next-line max-len

@@ -135,2 +92,12 @@ var rows = isNullOrUndefined(cStart) ? this.modelGenerator.generateRows(input, e || this.aggregates) :

var tr = rowrenderer.render(row, dummies);
if (tr.querySelectorAll('.e-leftfreeze').length && tr.querySelectorAll('.e-indentcell').length) {
var td = tr.querySelectorAll('.e-indentcell');
for (var i = 0; i < td.length; i++) {
td[parseInt(i.toString(), 10)].classList.add('e-leftfreeze');
applyStickyLeftRightPosition(td[parseInt(i.toString(), 10)], i * 30, this.parent.enableRtl, 'Left');
}
}
if (this.parent.isFrozenGrid() && tr.querySelectorAll('.e-summarycell').length) {
removeClass([].slice.call(tr.querySelectorAll('.e-summarycell')), ['e-freezeleftborder', 'e-freezerightborder']);
}
fragment.appendChild(tr);

@@ -142,56 +109,4 @@ }

FooterRenderer.prototype.refresh = function (e) {
var frzCols = this.parent.getFrozenColumns() || this.parent.getFrozenLeftColumnsCount();
var movable = this.parent.getMovableColumnsCount();
var right = this.parent.getFrozenRightColumnsCount();
if (this.parent.isFrozenGrid()) {
remove(this.getPanel());
this.renderPanel();
this.renderTable();
if (frzCols) {
this.freezeTable.tFoot.innerHTML = '';
this.renderSummaryContent(e, this.freezeTable, 0, frzCols);
}
}
this.getTable().tFoot.innerHTML = '';
this.renderSummaryContent(e, this.getTable(), frzCols, right ? frzCols + movable : undefined);
if (this.parent.getFrozenRightColumnsCount()) {
this.frTable.tFoot.innerHTML = '';
this.renderSummaryContent(e, this.frTable, frzCols + movable, frzCols + movable + right);
var movableLastCell = [].slice.call(this.getTable().getElementsByClassName('e-lastsummarycell'));
if (movableLastCell.length) {
for (var i = 0; i < movableLastCell.length; i++) {
movableLastCell[parseInt(i.toString(), 10)].style.borderRight = '0px';
}
}
}
// check freeze content have no row case
if (this.parent.isFrozenGrid()) {
var movableCnt = [].slice.call(this.parent.element.querySelector('.e-movablefootercontent')
.getElementsByClassName('e-summaryrow'));
var frozenCnt = void 0;
if (frzCols) {
frozenCnt = [].slice.call(this.parent.element.querySelector('.e-frozen-left-footercontent')
.getElementsByClassName('e-summaryrow'));
this.refreshHeight(frozenCnt, movableCnt);
var frozenDiv = this.frozenContent;
if (!frozenDiv.offsetHeight) {
frozenDiv.style.height = this.getTable().offsetHeight + 'px';
}
}
if (right) {
var frCnt = [].slice.call(this.parent.element.querySelector('.e-frozen-right-footercontent')
.getElementsByClassName('e-summaryrow'));
this.refreshHeight(frCnt, movableCnt);
if (frozenCnt) {
this.refreshHeight(frCnt, frozenCnt);
}
var frDiv = this.frTable;
if (!frDiv.offsetHeight) {
frDiv.style.height = this.getTable().offsetHeight + 'px';
}
}
if (this.parent.allowResizing) {
this.updateFooterTableWidth(this.getTable());
}
}
this.renderSummaryContent(e, this.getTable(), undefined, undefined);
if (isNullOrUndefined(e) && this.parent.isAutoFitColumns) {

@@ -202,31 +117,5 @@ this.parent.autoFitColumns();

};
FooterRenderer.prototype.refreshHeight = function (frozenCnt, movableCnt) {
for (var i = 0; i < frozenCnt.length; i++) {
var frozenHeight = frozenCnt[parseInt(i.toString(), 10)].getBoundingClientRect().height;
var movableHeight = movableCnt[parseInt(i.toString(), 10)].getBoundingClientRect().height;
if (frozenHeight < movableHeight) {
frozenCnt[parseInt(i.toString(), 10)].classList.remove('e-hide');
frozenCnt[parseInt(i.toString(), 10)].style.height = movableHeight + 'px';
}
else if (frozenHeight > movableHeight) {
movableCnt[parseInt(i.toString(), 10)].classList.remove('e-hide');
movableCnt[parseInt(i.toString(), 10)].style.height = frozenHeight + 'px';
}
}
};
FooterRenderer.prototype.refreshCol = function () {
// frozen table
var mheaderCol;
var fheaderCol = mheaderCol = this.parent.element.querySelector('.' + literals.gridHeader).querySelector(literals.colGroup).cloneNode(true);
if (this.parent.getFrozenColumns()) {
// eslint-disable-next-line max-len
var isXaxis = this.parent.enableColumnVirtualization && this.parent.contentModule.isXaxis();
if (isXaxis) {
mheaderCol = this.parent.getMovableVirtualHeader().querySelector(literals.colGroup).cloneNode(true);
}
else {
mheaderCol = renderMovable(fheaderCol, this.parent.getFrozenColumns(), this.parent);
this.freezeTable.replaceChild(fheaderCol, this.freezeTable.querySelector(literals.colGroup));
}
}
var mheaderCol = this.parent.element.querySelector('.' + literals.gridHeader).querySelector(literals.colGroup).cloneNode(true);
this.getTable().replaceChild(mheaderCol, this.getColGroup());

@@ -243,4 +132,3 @@ this.setColGroup(mheaderCol);

if (e === void 0) { e = {
left: this.parent.isFrozenGrid() ? this.parent.getContent().querySelector('.' + literals.movableContent).scrollLeft :
this.parent.getContent().firstChild.scrollLeft
left: this.parent.getContent().firstChild.scrollLeft
}; }

@@ -250,14 +138,3 @@ this.getTable().parentElement.scrollLeft = e.left;

FooterRenderer.prototype.getColFromIndex = function (index) {
var left = this.parent.getFrozenLeftColumnsCount() || this.parent.getFrozenColumns();
var movable = this.parent.getMovableColumnsCount();
var right = this.parent.getFrozenRightColumnsCount();
var isDrag = this.parent.isRowDragable() && !(this.parent.getFrozenMode() === 'Right') ? 1 : 0;
if (left && index < (left + isDrag)) {
return this.freezeTable.querySelector(literals.colGroup).children[parseInt(index.toString(), 10)];
}
else if (right && (index >= (left + movable + isDrag))) {
return this.frTable.querySelector(literals.colGroup).children[index - (left ? (left + movable + isDrag) :
(left + movable))];
}
return this.getColGroup().children[index - (left ? (left + isDrag) : left)];
return this.getColGroup().children[parseInt(index.toString(), 10)];
};

@@ -264,0 +141,0 @@ FooterRenderer.prototype.columnVisibilityChanged = function () {

@@ -16,3 +16,3 @@ var __extends = (this && this.__extends) || (function () {

import { attributes } from '@syncfusion/ej2-base';
import { setStyleAndAttributes, appendChildren } from '../base/util';
import { setStyleAndAttributes, appendChildren, addStickyColumnPosition } from '../base/util';
import { CellRenderer } from './cell-renderer';

@@ -221,2 +221,5 @@ import { AriaService } from '../services/aria-service';

}
if (this.parent.isFrozenGrid()) {
addStickyColumnPosition(this.parent, column, node);
}
return node;

@@ -223,0 +226,0 @@ };

@@ -130,6 +130,4 @@ import { freezeTable } from '../base/enum';

private appendCells;
private ensureStackedFrozen;
private getStackedLockColsCount;
private getColSpan;
private getFrozenColSpan;
private generateRow;

@@ -136,0 +134,0 @@ private generateCell;

@@ -11,3 +11,3 @@ import { isNullOrUndefined, extend } from '@syncfusion/ej2-base';

import { Button } from '@syncfusion/ej2-buttons';
import { parentsUntil, wrap, measureColumnDepth, appendChildren } from '../base/util';
import { parentsUntil, wrap, measureColumnDepth, appendChildren, addFixedColumnBorder } from '../base/util';
import * as literals from '../base/string-literals';

@@ -137,4 +137,3 @@ // eslint-disable-next-line valid-jsdoc

}
if (!this.parent.enableColumnVirtualization
&& !this.parent.getFrozenLeftColumnsCount() && !this.parent.getFrozenRightColumnsCount()) {
if (!this.parent.enableColumnVirtualization) {
this.parent.on(events.columnVisibilityChanged, this.setVisible, this);

@@ -175,7 +174,5 @@ }

this.setTable(headerDiv.querySelector('.' + literals.table));
if (!this.parent.getFrozenColumns() && !this.parent.getFrozenRightColumnsCount() && !this.parent.getFrozenLeftColumnsCount()) {
this.initializeHeaderDrag();
this.initializeHeaderDrop();
}
this.parent.notify(events.headerRefreshed, { rows: this.rows, args: { isFrozen: this.parent.isFrozenGrid() } });
this.initializeHeaderDrag();
this.initializeHeaderDrop();
this.parent.notify(events.headerRefreshed, { rows: this.rows });
};

@@ -266,9 +263,7 @@ /**

var gObj = this.parent;
var isFrozen = gObj.isFrozenGrid();
if (this.getTable() && !isFrozen) {
if (this.getTable()) {
remove(this.getTable());
}
var table = this.parent.createElement('table', { className: literals.table, attrs: { cellspacing: '0.25px', role: 'grid' } });
var tblName = tableName ? tableName : gObj.getFrozenLeftCount() ? 'frozen-left' : 'frozen-right';
var findHeaderRow = this.createHeaderContent(tblName);
var findHeaderRow = this.createHeaderContent(tableName);
var thead = findHeaderRow.thead;

@@ -290,8 +285,2 @@ var tbody = this.parent.createElement(literals.tbody, { className: this.parent.frozenRows ? '' : 'e-hide', attrs: { role: 'rowgroup' } });

}
if (isFrozen && gObj.allowResizing) {
var movableContent = this.parent.getContent().querySelector('.' + literals.movableContent).querySelector('.' + literals.table);
if (tableName === 'movable' && !isNullOrUndefined(movableContent)) {
table.style.width = movableContent.style.width;
}
}
this.updateColGroup(colGroup);

@@ -317,4 +306,2 @@ tbody.appendChild(rowBody);

var gObj = this.parent;
var index = 1;
var frozenMode = gObj.getFrozenMode();
var columns = gObj.getColumns();

@@ -332,38 +319,8 @@ var thead = this.parent.createElement('thead', { attrs: { 'role': 'rowgroup' } });

}
if (frozenMode !== 'Right') {
rows = this.ensureColumns(rows);
}
rows = this.ensureColumns(rows);
rows = this.getHeaderCells(rows, tableName);
if (frozenMode === 'Right') {
index = 0;
rows = this.ensureColumns(rows);
}
var frzCols = this.parent.getFrozenColumns();
if (this.parent.isRowDragable() && this.parent.isFrozenGrid() && rows[0].cells[parseInt(index.toString(), 10)]) {
var colFreezeMode = rows[0].cells[parseInt(index.toString(), 10)].column.getFreezeTableName();
if (tableName === 'movable' && this.getStackedLockColsCount.length) {
for (var j = 0, len = rows.length; j < len; j++) {
if (frozenMode === 'Right') {
rows[parseInt(j.toString(), 10)].cells.pop();
}
else {
rows[parseInt(j.toString(), 10)].cells.shift();
}
}
if (gObj.isRowDragable() && this.parent.getFrozenMode() === 'Right') {
for (var i = 0, len = rows.length; i < len; i++) {
rows[parseInt(i.toString(), 10)].cells.push(this.generateCell({}, CellType.RowDragHIcon));
}
else if ((colFreezeMode === 'movable' || (frozenMode === literals.leftRight &&
colFreezeMode === literals.frozenRight))) {
if (frozenMode === 'Right') {
rows[0].cells.pop();
}
else {
rows[0].cells.shift();
}
}
else if (!frzCols && colFreezeMode === literals.frozenLeft) {
rows[0].cells[0].column.freeze = colFreezeMode === literals.frozenLeft ? 'Left' : 'Right';
}
else if (frozenMode === 'Right' && colFreezeMode === literals.frozenRight) {
rows[0].cells[rows[0].cells.length - 1].column.freeze = 'Right';
}
}

@@ -375,2 +332,3 @@ for (var i = 0, len = this.colDepth; i < len; i++) {

}
addFixedColumnBorder(headerRow);
thead.appendChild(headerRow);

@@ -388,7 +346,2 @@ }

var indexes = this.parent.getColumnIndexesInView();
if (this.parent.enableColumnVirtualization && this.parent.getFrozenColumns()
&& this.parent.contentModule.isXaxis()) {
cols = extend([], this.parent.getColumns());
cols.splice(0, this.parent.getFrozenColumns());
}
colGroup.id = this.parent.element.id + literals.colGroup;

@@ -443,3 +396,3 @@ if (this.parent.allowGrouping) {

}
if (gObj.isRowDragable()) {
if (gObj.isRowDragable() && this.parent.getFrozenMode() !== 'Right') {
rows[parseInt(i.toString(), 10)].cells.push(this.generateCell({}, CellType.RowDragHIcon));

@@ -471,22 +424,8 @@ }

var lastCol = isLastCol ? isStackLastCol ? 'e-laststackcell' : 'e-lastcell' : '';
var isFrozen = this.parent.isFrozenGrid();
var isLockColumn = !this.parent.lockcolPositionCount
|| (cols.lockColumn && !this.lockColsRendered) || (!cols.lockColumn && this.lockColsRendered);
var isFrozenLockColumn = !this.parent.lockcolPositionCount || (cols.lockColumn && !this.lockColsRendered)
|| (!cols.lockColumn && this.lockColsRendered);
var scrollbar = this.parent.getContent().querySelector('.e-movablescrollbar');
var left;
if (isFrozen && scrollbar && this.parent.enableColumnVirtualization) {
left = scrollbar.scrollLeft;
}
if (!cols.columns) {
if (left && left > 0 && this.parent.contentModule.isXaxis()
&& this.parent.inViewIndexes[0] !== 0 && cols.getFreezeTableName() === 'movable') {
if (isLockColumn) {
rows[parseInt(index.toString(), 10)].cells.push(this.generateCell(cols, CellType.Header, this.colDepth - index, (isFirstObj ? '' : (isFirstCol ? 'e-firstcell' : '')) + lastCol, index, this.parent.getColumnIndexByUid(cols.uid)));
}
else {
if ((!isFrozen && isLockColumn) || (isFrozen && cols.getFreezeTableName() === tableName && isFrozenLockColumn)) {
rows[parseInt(index.toString(), 10)].cells.push(this.generateCell(cols, CellType.Header, this.colDepth - index, (isFirstObj ? '' : (isFirstCol ? 'e-firstcell' : '')) + lastCol, index, this.parent.getColumnIndexByUid(cols.uid)));
}
}
if (this.parent.lockcolPositionCount) {

@@ -513,7 +452,6 @@ if ((this.frzIdx + this.notfrzIdx < this.parent.frozenColumns) &&

|| (this.lockColsRendered && (colSpan - stackedLockColsCount) !== 0);
var isFrozenStack = isFrozen && this.ensureStackedFrozen(cols.columns, tableName, false);
if ((!isFrozen && isStackedLockColumn) || isFrozenStack) {
if (isStackedLockColumn) {
rows[parseInt(index.toString(), 10)].cells.push(new Cell({
cellType: CellType.StackedHeader, column: cols,
colSpan: this.getColSpan(colSpan, stackedLockColsCount, cols.columns, tableName, isFrozen),
colSpan: this.getColSpan(colSpan, stackedLockColsCount),
className: isFirstObj ? '' : (isFirstCol ? 'e-firstcell' : '')

@@ -540,15 +478,2 @@ }));

};
HeaderRender.prototype.ensureStackedFrozen = function (columns, tableName, isTrue) {
var length = columns.length;
for (var i = 0; i < length; i++) {
if (columns[parseInt(i.toString(), 10)].columns) {
isTrue = this.ensureStackedFrozen(columns[parseInt(i.toString(), 10)].columns, tableName, isTrue);
}
else if (columns[parseInt(i.toString(), 10)].getFreezeTableName() === tableName) {
isTrue = true;
break;
}
}
return isTrue;
};
HeaderRender.prototype.getStackedLockColsCount = function (col, lockColsCount) {

@@ -565,24 +490,6 @@ if (col.columns) {

};
HeaderRender.prototype.getColSpan = function (colSpan, stackedLockColsCount, columns, tableName, isFrozen) {
if (isFrozen) {
colSpan = this.getFrozenColSpan(columns, tableName, 0);
}
else if (this.parent.lockcolPositionCount) {
colSpan = !this.lockColsRendered ? stackedLockColsCount : colSpan - stackedLockColsCount;
}
HeaderRender.prototype.getColSpan = function (colSpan, stackedLockColsCount) {
colSpan = !this.lockColsRendered ? stackedLockColsCount : colSpan - stackedLockColsCount;
return colSpan;
};
HeaderRender.prototype.getFrozenColSpan = function (columns, tableName, count) {
var length = columns.length;
for (var i = 0; i < length; i++) {
if (columns[parseInt(i.toString(), 10)].columns) {
count = this.getFrozenColSpan(columns[parseInt(i.toString(), 10)].columns, tableName, count);
}
else if (columns[parseInt(i.toString(), 10)].getFreezeTableName() === tableName
&& columns[parseInt(i.toString(), 10)].visible) {
count++;
}
}
return count;
};
// eslint-disable-next-line @typescript-eslint/no-unused-vars

@@ -620,3 +527,2 @@ HeaderRender.prototype.generateRow = function (index) {

var idx;
var frzCols = gObj.getFrozenColumns();
for (var c = 0, clen = columns.length; c < clen; c++) {

@@ -626,15 +532,3 @@ var column = columns[parseInt(c.toString(), 10)];

displayVal = column.visible ? '' : 'none';
if (frzCols) {
var normalizedfrzCols = this.parent.isRowDragable() ? frzCols + 1 : frzCols;
if (idx < normalizedfrzCols) {
setStyleAttribute(this.getColGroup().children[parseInt(idx.toString(), 10)], { 'display': displayVal });
}
else {
var mTblColGrp = gObj.getHeaderContent().querySelector('.' + literals.movableHeader).querySelector(literals.colGroup);
setStyleAttribute(mTblColGrp.children[idx - normalizedfrzCols], { 'display': displayVal });
}
}
else {
setStyleAttribute(this.getColGroup().children[parseInt(idx.toString(), 10)], { 'display': displayVal });
}
setStyleAttribute(this.getColGroup().children[parseInt(idx.toString(), 10)], { 'display': displayVal });
}

@@ -652,4 +546,2 @@ this.refreshUI();

HeaderRender.prototype.refreshUI = function () {
var frzCols = this.parent.isFrozenGrid();
var isVFTable = this.parent.enableColumnVirtualization && frzCols;
var headerDiv = this.getPanel();

@@ -659,8 +551,3 @@ this.toggleStackClass(headerDiv);

: this.getTable();
var tableName = this.parent.isFrozenGrid() ? this.parent.getFrozenLeftCount() ? 'frozen-left'
: 'frozen-right' : undefined;
if (isVFTable) {
table = this.parent.contentModule.getVirtualFreezeHeader();
tableName = this.parent.contentModule.isXaxis() ? 'movable' : tableName;
}
var tableName = undefined;
if (table) {

@@ -676,5 +563,2 @@ remove(table);

table.insertBefore(this.setColGroup(colGroup), table.firstChild);
if (!isVFTable) {
this.setTable(table);
}
this.appendContent(table);

@@ -684,5 +568,3 @@ this.parent.notify(events.colGroupRefresh, {});

this.parent.updateDefaultCursor();
if (!frzCols || (this.parent.enableColumnVirtualization && frzCols)) {
this.initializeHeaderDrag();
}
this.initializeHeaderDrag();
var rows = [].slice.call(headerDiv.querySelectorAll('tr.e-columnheader'));

@@ -696,3 +578,3 @@ for (var _i = 0, rows_1 = rows; _i < rows_1.length; _i++) {

}
this.parent.notify(events.headerRefreshed, { rows: this.rows, args: { isFrozen: frzCols } });
this.parent.notify(events.headerRefreshed, { rows: this.rows });
if (this.parent.enableColumnVirtualization && parentsUntil(table, literals.movableHeader)) {

@@ -699,0 +581,0 @@ this.parent.notify(events.headerRefreshed, { rows: this.rows, args: { isFrozen: false, isXaxis: true } });

@@ -21,7 +21,2 @@ import { IGrid } from '../base/interface';

}): void;
private renderFrozenRightForm;
private renderMovableform;
private updateFreezeEdit;
private getFreezeRightRow;
private getFreezeRow;
update(elements: Object, args: {

@@ -31,8 +26,2 @@ row?: Element;

}): void;
private refreshFreezeEdit;
private refreshEditForm;
private updateFrozenRightCont;
private updateFrozenCont;
private renderRightFrozen;
private renderMovable;
private getEditElement;

@@ -39,0 +28,0 @@ removeEventListener(): void;

@@ -1,4 +0,3 @@

import { isNullOrUndefined, addClass, extend, closest } from '@syncfusion/ej2-base';
import * as events from '../base/constant';
import { appendChildren, alignFrozenEditForm, getMovableTbody, getFrozenRightTbody, setStyleAndAttributes } from '../base/util';
import { isNullOrUndefined, addClass, extend } from '@syncfusion/ej2-base';
import { appendChildren, setStyleAndAttributes, addFixedColumnBorder, addStickyColumnPosition } from '../base/util';
import * as literals from '../base/string-literals';

@@ -22,23 +21,14 @@ /**

var tbody;
var mTbody = getMovableTbody(this.parent);
var frTbody = getFrozenRightTbody(this.parent);
var isFrozenGrid = this.parent.isFrozenGrid();
var isVirtualFrozen = isFrozenGrid && this.parent.enableColumnVirtualization && args.isScroll;
if (this.parent.frozenRows && this.parent.editSettings.newRowPosition === 'Top') {
tbody = isVirtualFrozen ? this.parent.getMovableHeaderTbody() : this.parent.getHeaderTable().querySelector(literals.tbody);
tbody = this.parent.getHeaderTable().querySelector(literals.tbody);
}
else {
tbody = isVirtualFrozen ? this.parent.getMovableContentTbody() : this.parent.getContentTable().querySelector(literals.tbody);
tbody = this.parent.getContentTable().querySelector(literals.tbody);
}
args.row = this.parent.createElement('tr', { className: 'e-row e-addedrow' });
if (tbody.querySelector('.e-emptyrow')) {
var emptyRow = tbody.querySelector('.e-emptyrow');
if (this.parent.getContentTable().querySelector('.e-emptyrow')) {
var emptyRow = this.parent.getContentTable().querySelector('.e-emptyrow');
emptyRow.parentNode.removeChild(emptyRow);
if (isFrozenGrid && !isVirtualFrozen) {
var moveTbody = this.parent.getContent().querySelector('.' + literals.movableContent).querySelector(literals.tbody);
(moveTbody.firstElementChild).parentNode.removeChild(moveTbody.firstElementChild);
if (this.parent.getFrozenMode() === literals.leftRight) {
var frTbody_1 = this.parent.getContent().querySelector('.e-frozen-right-content').querySelector(literals.tbody);
(frTbody_1.firstElementChild).parentNode.removeChild(frTbody_1.firstElementChild);
}
if (this.parent.frozenRows && this.parent.element.querySelector('.e-frozenrow-empty')) {
this.parent.element.querySelector('.e-frozenrow-empty').classList.remove('e-frozenrow-empty');
}

@@ -54,217 +44,11 @@ }

this.parent.editModule.checkLastRow(args.row, args);
if (isFrozenGrid && !isVirtualFrozen) {
var mEle = this.renderMovableform(args.row, args);
if (this.parent.editSettings.newRowPosition === 'Top') {
mTbody.insertBefore(mEle, mTbody.firstChild);
}
else {
mTbody.appendChild(mEle);
}
args.row.querySelector('.e-normaledit').setAttribute('colspan', this.parent.getVisibleFrozenColumns() + '');
mEle.querySelector('.e-normaledit').setAttribute('colspan', '' + (this.parent.getVisibleColumns().length - this.parent.getVisibleFrozenColumns()));
if (frTbody) {
var frEle = this.renderFrozenRightForm(args.row, args);
if (this.parent.editSettings.newRowPosition === 'Top') {
frTbody.insertBefore(frEle, frTbody.firstChild);
}
else {
frTbody.appendChild(frEle);
}
var colSpan = this.parent.getVisibleFrozenColumns() - this.parent.getFrozenRightColumnsCount();
args.row.querySelector('.e-normaledit').setAttribute('colspan', colSpan + '');
frEle.querySelector('.e-normaledit').setAttribute('colspan', '' + this.parent.getFrozenRightColumnsCount());
}
if (this.parent.height === 'auto') {
this.parent.notify(events.frozenHeight, {});
}
}
};
InlineEditRender.prototype.renderFrozenRightForm = function (ele, args) {
var frEle = ele.cloneNode(true);
var form = args.frozenRightForm = frEle.querySelector('form');
if (this.parent.editSettings.template) {
form.innerHTML = '';
this.appendChildren(form, args.rowData, false);
return frEle;
}
this.renderRightFrozen(ele, frEle);
frEle.querySelector(literals.colGroup).innerHTML = this.parent.getHeaderContent()
.querySelector('.e-frozen-right-header').querySelector(literals.colGroup).innerHTML;
return frEle;
};
InlineEditRender.prototype.renderMovableform = function (ele, args) {
var mEle = ele.cloneNode(true);
var form = args.movableForm = mEle.querySelector('form');
if (this.parent.editSettings.template) {
form.innerHTML = '';
this.appendChildren(form, args.rowData, false);
return mEle;
}
this.renderMovable(ele, mEle);
mEle.querySelector(literals.colGroup).innerHTML = this.parent.getHeaderContent()
.querySelector('.' + literals.movableHeader).querySelector(literals.colGroup).innerHTML;
return mEle;
};
InlineEditRender.prototype.updateFreezeEdit = function (row, td) {
td = td.concat([].slice.call(this.getFreezeRow(row).querySelectorAll('td.e-rowcell')));
if (this.parent.getFrozenMode() === literals.leftRight) {
td = td.concat([].slice.call(this.getFreezeRightRow(row).querySelectorAll('td.e-rowcell')));
}
return td;
};
InlineEditRender.prototype.getFreezeRightRow = function (row) {
var idx = parseInt(row.getAttribute(literals.dataRowIndex), 10);
var fCont = this.parent.getFrozenLeftContentTbody();
var fHdr = this.parent.getFrozenHeaderTbody();
var frHdr = this.parent.getFrozenRightHeaderTbody();
var frCont = this.parent.getFrozenRightContentTbody();
if (fCont.contains(row) || fHdr.contains(row)) {
return this.parent.getFrozenRightRowByIndex(idx);
}
else if (frCont.contains(row) || frHdr.contains(row)) {
return this.parent.getRowByIndex(idx);
}
return row;
};
InlineEditRender.prototype.getFreezeRow = function (row) {
if (this.parent.isFrozenGrid()) {
var idx = parseInt(row.getAttribute(literals.dataRowIndex), 10);
var fCont = this.parent.getFrozenLeftContentTbody();
var mCont = this.parent.getMovableContentTbody();
var fHdr = this.parent.getFrozenHeaderTbody();
var mHdr = this.parent.getMovableHeaderTbody();
if (fCont.contains(row) || fHdr.contains(row)) {
return this.parent.getMovableRowByIndex(idx);
}
else if (mCont.contains(row) || mHdr.contains(row)) {
return this.parent.getRowByIndex(idx);
}
}
return row;
};
InlineEditRender.prototype.update = function (elements, args) {
this.isEdit = true;
var isCustomFormValidation = args.isCustomFormValidation;
var isScroll = args.isScroll;
if (!isScroll && (closest(args.row, '.' + literals.movableContent) || closest(args.row, '.' + literals.movableHeader))) {
args.row = this.getFreezeRow(args.row);
}
if (closest(args.row, '.e-frozen-right-content') || closest(args.row, '.e-frozen-right-header')) {
args.row = this.getFreezeRightRow(args.row);
}
var isVirtualFrozen = this.parent.isFrozenGrid() && this.parent.enableColumnVirtualization && isScroll;
var tdElement = [].slice.call(args.row.querySelectorAll('td.e-rowcell'));
args.row.innerHTML = '';
if (!isVirtualFrozen && !isCustomFormValidation) {
tdElement = this.updateFreezeEdit(args.row, tdElement);
}
args.row.appendChild(this.getEditElement(elements, true, tdElement, args, true));
args.row.classList.add(literals.editedRow);
this.parent.editModule.checkLastRow(args.row, args);
if (!isVirtualFrozen && !isCustomFormValidation) {
this.refreshFreezeEdit(args.row, args);
}
};
InlineEditRender.prototype.refreshFreezeEdit = function (row, args) {
var td = row.firstChild;
if (this.parent.getVisibleFrozenColumns() && this.parent.editSettings.template) {
td.querySelector(literals.colGroup).innerHTML = this.parent.getHeaderContent().querySelector('.' + literals.frozenHeader).
querySelector(literals.colGroup).innerHTML;
}
var fCls;
var cont;
var idx = parseInt(row.getAttribute(literals.dataRowIndex), 10);
if (this.parent.isFrozenGrid()) {
if (idx < this.parent.frozenRows) {
cont = this.parent.getHeaderContent();
fCls = '.' + literals.frozenHeader;
}
else {
cont = this.parent.getContent();
fCls = '.' + literals.frozenContent;
}
var mTd = td.cloneNode(true);
var frTd = td.cloneNode(true);
var form = args.movableForm = mTd.querySelector('form');
if (this.parent.editSettings.template) {
this.refreshEditForm(form, args.rowData);
}
var fRows = void 0;
var frRows = void 0;
if (cont.querySelector(fCls).contains(row)) {
fRows = this.parent.getMovableRowByIndex(idx);
this.updateFrozenCont(fRows, td, mTd);
if (this.parent.getFrozenMode() === literals.leftRight) {
args.frozenRightForm = frTd.querySelector('form');
this.refreshEditForm(args.frozenRightForm, args.rowData);
frRows = this.parent.getFrozenRightRowByIndex(idx);
this.updateFrozenRightCont(frRows, td, frTd);
}
}
else {
fRows = this.parent.getRowByIndex(idx);
this.updateFrozenCont(fRows, mTd, td);
if (this.parent.getFrozenMode() === literals.leftRight) {
args.frozenRightForm = frTd.querySelector('form');
this.refreshEditForm(args.frozenRightForm, args.rowData);
frRows = this.parent.getFrozenRightRowByIndex(idx);
this.updateFrozenRightCont(frRows, frTd, td);
}
}
fRows.appendChild(mTd);
fRows.classList.add(literals.editedRow);
if (this.parent.getFrozenMode() === literals.leftRight) {
frRows.appendChild(frTd);
frRows.classList.add(literals.editedRow);
alignFrozenEditForm(args.frozenRightForm.querySelector('td:not(.e-hide)'), args.form.querySelector('td:not(.e-hide)'));
}
alignFrozenEditForm(args.movableForm.querySelector('td:not(.e-hide)'), args.form.querySelector('td:not(.e-hide)'));
}
};
InlineEditRender.prototype.refreshEditForm = function (form, data) {
if (this.parent.editSettings.template) {
form.innerHTML = '';
this.appendChildren(form, data, false);
}
};
InlineEditRender.prototype.updateFrozenRightCont = function (row, ele, frEle) {
row.innerHTML = '';
this.renderRightFrozen(ele, frEle);
frEle.querySelector(literals.colGroup).innerHTML = this.parent.getHeaderContent()
.querySelector('.e-frozen-right-header').querySelector(literals.colGroup).innerHTML;
ele.setAttribute('colspan', this.parent.getVisibleFrozenColumns() - this.parent.getFrozenRightColumnsCount() + '');
frEle.setAttribute('colspan', this.parent.getFrozenRightColumnsCount() + '');
};
InlineEditRender.prototype.updateFrozenCont = function (row, ele, mEle) {
row.innerHTML = '';
this.renderMovable(ele, mEle);
mEle.querySelector(literals.colGroup).innerHTML = this.parent.getHeaderContent()
.querySelector('.' + literals.movableHeader).querySelector(literals.colGroup).innerHTML;
ele.setAttribute('colspan', this.parent.getVisibleFrozenColumns() + '');
mEle.setAttribute('colspan', this.parent.getCurrentVisibleColumns(this.parent.enableColumnVirtualization).length - this.parent.getVisibleFrozenColumns() + '');
};
InlineEditRender.prototype.renderRightFrozen = function (ele, frEle) {
frEle.querySelector('tr').innerHTML = '';
var cols = this.parent.getColumns();
var k = 0;
for (var i = 0; i < cols.length; i++, k++) {
if (cols[parseInt(i.toString(), 10)].getFreezeTableName() === literals.frozenRight) {
var index = k - this.parent.getMovableColumnsCount();
frEle.querySelector('tr').appendChild(ele.querySelector('tr').removeChild(ele.querySelector('tr').children[parseInt(index.toString(), 10)]));
k--;
}
}
};
InlineEditRender.prototype.renderMovable = function (ele, mEle) {
mEle.querySelector('tr').innerHTML = '';
var cols = this.parent.getColumns();
var k = this.parent.isRowDragable() ? 1 : 0;
for (var i = 0; i < cols.length; i++, k++) {
if (cols[parseInt(i.toString(), 10)].getFreezeTableName() === 'movable') {
mEle.querySelector('tr').appendChild(ele.querySelector('tr')
.removeChild(ele.querySelector('tr').children[parseInt(k.toString(), 10)]));
k--;
}
}
};
// eslint-disable-next-line max-len

@@ -281,4 +65,4 @@ InlineEditRender.prototype.getEditElement = function (elements, isEdit, tdElement, args, isFrozen) {

attrs: {
colspan: (gObj.getCurrentVisibleColumns(this.parent.enableColumnVirtualization).length - gObj.getVisibleFrozenColumns()
+ this.parent.getIndentCount()).toString()
colspan: (gObj.getCurrentVisibleColumns(this.parent.enableColumnVirtualization).length +
this.parent.getIndentCount()).toString()
}

@@ -310,3 +94,2 @@ });

i = 0;
var isVirtualFrozen = gObj.isFrozenGrid() && gObj.enableColumnVirtualization && args.isScroll;
var cols = args.isCustomFormValidation ? this.parent.columnModel : gObj.getColumns();

@@ -316,7 +99,2 @@ while ((isEdit && m < tdElement.length && i < cols.length) || i < cols.length) {

var col = cols[parseInt(i.toString(), 10)];
if ((isVirtualFrozen && col.getFreezeTableName() !== 'movable')
|| (args.isCustomFormValidation && (col.commands || col.commandsTemplate || !col.field))) {
i++;
continue;
}
var td_1 = this.parent.createElement('td', {

@@ -343,2 +121,17 @@ className: literals.rowCell, attrs: { style: 'text-align:' + (col.textAlign ? col.textAlign : ''), 'colspan': span ? span : '' }

}
if (this.parent.isFrozenGrid()) {
addStickyColumnPosition(this.parent, col, td_1);
if (this.parent.enableColumnVirtualization) {
if (col.freeze === 'Left' && !isNullOrUndefined(col.valueX)) {
td_1.style.left = (col.valueX - this.parent.translateX) + 'px';
}
else if (col.freeze === 'Right' && !isNullOrUndefined(col.valueX)) {
td_1.style.right = (col.valueX + this.parent.translateX) + 'px';
}
else if (col.freeze === 'Fixed') {
td_1.style.left = (this.parent.leftrightColumnWidth('left') - this.parent.translateX) + 'px';
td_1.style.right = (this.parent.leftrightColumnWidth('right') + this.parent.translateX) + 'px';
}
}
}
tr.appendChild(td_1);

@@ -348,2 +141,3 @@ i = span ? i + parseInt(span, 10) : i + 1;

}
addFixedColumnBorder(tr);
tbody.appendChild(tr);

@@ -350,0 +144,0 @@ table.appendChild(tbody);

@@ -103,3 +103,3 @@ import { remove, resetBlazorTemplate, blazorTemplates, getValue } from '@syncfusion/ej2-base';

// eslint-disable-next-line max-len
if (!(currentViewData - dataLength) && count && ((gObj.pageSettings.currentPage - 1) * gObj.pageSettings.pageSize) === count) {
if ((!(currentViewData - dataLength) && count && ((gObj.pageSettings.currentPage - 1) * gObj.pageSettings.pageSize) === count) || (count && count <= dataLength)) {
gObj.prevPageMoving = true;

@@ -215,2 +215,8 @@ gObj.setProperties({

if (!dataManager) {
if (gObj.allowPaging && args.requestType !== 'paging' && !gObj.getDataModule().dataManager.dataSource.offline
&& ((gObj.editSettings.mode !== 'Batch' && args.action !== 'add') || (gObj.editSettings.mode === 'Batch'
&& args.requestType !== 'batchsave')) && gObj.pageSettings && gObj.pageSettings.pageSizes
&& gObj.pagerModule && gObj.pagerModule.pagerObj && gObj.pagerModule.pagerObj.isAllPage) {
gObj.pagerModule.pagerObj.isAllPage = undefined;
}
dataManager = this.data.getData(args, this.data.generateQuery().requiresCount());

@@ -315,6 +321,14 @@ }

var tr = this.parent.createElement('tr', { className: 'e-emptyrow' });
tr.appendChild(this.parent.createElement('td', {
var td = this.parent.createElement('td', {
innerHTML: this.l10n.getConstant('EmptyRecord'),
attrs: { colspan: (gObj.getVisibleColumns().length + spanCount + gObj.groupSettings.columns.length).toString() }
}));
});
if (gObj.isFrozenGrid()) {
td.classList.add('e-leftfreeze');
td.style.left = 0 + 'px';
}
if (gObj.frozenRows && gObj.element.querySelector('.e-frozenrow-border')) {
this.parent.element.querySelector('.e-frozenrow-border').classList.add('e-frozenrow-empty');
}
tr.appendChild(td);
tbody.appendChild(tr);

@@ -508,3 +522,3 @@ this.contentRenderer.renderEmpty(tbody);

args.rows = [];
args.isFrozen = _this.parent.getFrozenColumns() !== 0 && !args.isFrozen;
args.isFrozen = !args.isFrozen;
_this.parent.trigger(events.actionComplete, args);

@@ -561,6 +575,11 @@ }

this.isLayoutRendered = true;
var isEmptyCol = false;
if (this.parent.columns.length < 1) {
this.buildColumns(e.result[0]);
isEmptyCol = true;
}
prepareColumns(this.parent.columns, null, this.parent);
if (isEmptyCol) {
this.parent.notify(events.refreshSplitFrozenColumn, {});
}
this.headerRenderer.renderTable();

@@ -567,0 +586,0 @@ this.contentRenderer.renderTable();

@@ -15,2 +15,3 @@ var __extends = (this && this.__extends) || (function () {

import { CellRenderer } from './cell-renderer';
import { applyStickyLeftRightPosition } from '../base/util';
/**

@@ -49,2 +50,7 @@ * ExpandCellRenderer class which responsible for building group expand cell.

}
if (this.parent.getVisibleFrozenRightCount() || this.parent.getVisibleFrozenLeftCount()) {
nodeElement.classList.add('e-leftfreeze');
var width = this.parent.getFrozenMode() === 'Right' ? 0 : this.parent.groupSettings.columns.length * 30;
applyStickyLeftRightPosition(nodeElement, width, this.parent.enableRtl, this.parent.getFrozenMode() === 'Right' ? 'Right' : 'Left');
}
return nodeElement;

@@ -51,0 +57,0 @@ };

@@ -16,2 +16,3 @@ var __extends = (this && this.__extends) || (function () {

import { CellRenderer } from './cell-renderer';
import { applyStickyLeftRightPosition } from '../base/util';
/**

@@ -40,2 +41,7 @@ * DetailHeaderIndentCellRenderer class which responsible for building detail header indent cell.

node.appendChild(createElement('div', { className: 'e-emptycell' }));
if (this.parent.getVisibleFrozenRightCount() || this.parent.getVisibleFrozenLeftCount()) {
node.classList.add('e-leftfreeze');
var width = this.parent.getFrozenMode() === 'Right' ? 0 : this.parent.groupSettings.columns.length * 30;
applyStickyLeftRightPosition(node, width, this.parent.enableRtl, this.parent.getFrozenMode() === 'Right' ? 'Right' : 'Left');
}
return node;

@@ -42,0 +48,0 @@ };

import { isNullOrUndefined, extend, addClass, removeClass } from '@syncfusion/ej2-base';
import { attributes as addAttributes } from '@syncfusion/ej2-base';
import { rowDataBound, queryCellInfo } from '../base/constant';
import { setStyleAndAttributes, getObject, extendObjWithFn } from '../base/util';
import { setStyleAndAttributes, getObject, extendObjWithFn, applyStickyLeftRightPosition, groupCaptionRowLeftRightPos, resetColspanGroupCaption } from '../base/util';
import { CellType } from '../base/enum';

@@ -148,4 +148,3 @@ import { CellMergeRender } from './cell-merge-renderer';

if (row.index > 0 && this_1.isSpan) {
var rowsObject = this_1.parent.isFrozenGrid() ?
this_1.parent.contentModule.tempFreezeRows : this_1.parent.getRowsObject();
var rowsObject = this_1.parent.getRowsObject();
var prevRowCells = this_1.parent.groupSettings.columns.length > 0 &&

@@ -175,2 +174,42 @@ !rowsObject[row.index - 1].isDataRow ? rowsObject[row.index].cells : rowsObject[row.index - 1].cells;

}
var emptyColspan = 0;
if (this.parent.groupSettings.columns.length && this.parent.getFrozenLeftColumnsCount()) {
if (tr.classList.contains('e-groupcaptionrow')) {
var freezeCells = [].slice.call(tr.querySelectorAll('.e-leftfreeze,.e-unfreeze,.e-rightfreeze,.e-fixedfreeze,.e-freezerightborder,.e-freezeleftborder'));
if (freezeCells.length) {
removeClass(freezeCells, ['e-leftfreeze', 'e-unfreeze', 'e-rightfreeze', 'e-fixedfreeze', 'e-freezerightborder', 'e-freezeleftborder']);
}
if (tr.querySelector('.e-summarycell')) {
groupCaptionRowLeftRightPos(tr, this.parent);
}
else {
for (var j = 0; j < tr.childNodes.length; j++) {
var td = tr.childNodes[parseInt(j.toString(), 10)];
td.classList.add('e-leftfreeze');
applyStickyLeftRightPosition(td, j * 30, this.parent.enableRtl, 'Left');
if (td.classList.contains('e-groupcaption')) {
var oldColspan = parseInt(td.getAttribute('colspan'), 10);
var colspan = resetColspanGroupCaption(this.parent, j);
td.setAttribute('colspan', colspan.toString());
emptyColspan = oldColspan - colspan;
}
}
if (emptyColspan) {
var td = this.parent.createElement('TD', {
className: 'e-groupcaption',
attrs: { colspan: emptyColspan.toString(), id: this.parent.element.id + 'captioncell', tabindex: '-1' }
});
tr.appendChild(td);
}
}
}
if (tr.querySelectorAll('.e-leftfreeze').length &&
(tr.querySelectorAll('.e-indentcell').length || tr.querySelectorAll('.e-grouptopleftcell').length)) {
var td = tr.querySelectorAll('.e-indentcell, .e-grouptopleftcell');
for (var i = 0; i < td.length; i++) {
td[parseInt(i.toString(), 10)].classList.add('e-leftfreeze');
applyStickyLeftRightPosition(td[parseInt(i.toString(), 10)], i * 30, this.parent.enableRtl, 'Left');
}
}
}
var args = { row: tr, rowHeight: this.parent.rowHeight };

@@ -253,3 +292,3 @@ if (row.isDataRow) {

}
var vFTable = this.parent.enableColumnVirtualization && this.parent.frozenColumns !== 0;
var vFTable = this.parent.enableColumnVirtualization;
if (!vFTable && this.parent.aggregates.length && this.parent.element.scrollHeight > this.parent.height) {

@@ -256,0 +295,0 @@ for (var i = 0; i < this.parent.aggregates.length; i++) {

@@ -17,3 +17,3 @@ var __extends = (this && this.__extends) || (function () {

import { headerCellInfo } from '../base/constant';
import { setStyleAndAttributes, appendChildren } from '../base/util';
import { setStyleAndAttributes, appendChildren, frozenDirection, isChildColumn, applyStickyLeftRightPosition } from '../base/util';
/**

@@ -85,2 +85,81 @@ * StackedHeaderCellRenderer class which responsible for building stacked header cell content.

this.parent.trigger(headerCellInfo, { cell: cell, node: node });
if (frozenDirection(column) === 'Left') {
node.classList.add('e-leftfreeze');
if (column.border === 'Left') {
node.classList.add('e-freezeleftborder');
}
if (column.index === 0) {
applyStickyLeftRightPosition(node, (this.parent.getIndentCount() * 30), this.parent.enableRtl, 'Left');
}
else {
var cols = this.parent.getColumns();
var width = this.parent.getIndentCount() * 30;
for (var i = 0; i < cols.length; i++) {
if (column.index < cols[parseInt(i.toString(), 10)].index) {
break;
}
if (cols[parseInt(i.toString(), 10)].visible) {
width += parseFloat(cols[parseInt(i.toString(), 10)].width.toString());
}
}
applyStickyLeftRightPosition(node, width, this.parent.enableRtl, 'Left');
}
}
else if (frozenDirection(column) === 'Right') {
node.classList.add('e-rightfreeze');
var cols = this.parent.getColumns();
var width = this.parent.getFrozenMode() === 'Right' && this.parent.isRowDragable() ? 30 : 0;
for (var i = cols.length - 1; i >= 0; i--) {
if (isChildColumn(column, cols[parseInt(i.toString(), 10)].uid) || column.index > cols[parseInt(i.toString(), 10)].index) {
break;
}
if (cols[parseInt(i.toString(), 10)].visible) {
width += parseFloat(cols[parseInt(i.toString(), 10)].width.toString());
}
}
applyStickyLeftRightPosition(node, width, this.parent.enableRtl, 'Right');
if (column.border === 'Right') {
node.classList.add('e-freezerightborder');
}
}
else if (frozenDirection(column) === 'Fixed') {
node.classList.add('e-fixedfreeze');
var cols = this.parent.getColumns();
var width = 0;
if (this.parent.getVisibleFrozenLeftCount()) {
width = this.parent.getIndentCount() * 30;
}
else if (this.parent.getFrozenMode() === 'Right') {
width = this.parent.groupSettings.columns.length * 30;
}
for (var i = 0; i < cols.length; i++) {
if (column.index > cols[parseInt(i.toString(), 10)].index) {
if ((cols[parseInt(i.toString(), 10)].freeze === 'Left' || cols[parseInt(i.toString(), 10)].isFrozen) ||
cols[parseInt(i.toString(), 10)].freeze === 'Fixed') {
if (cols[parseInt(i.toString(), 10)].visible) {
width += parseFloat(cols[parseInt(i.toString(), 10)].width.toString());
}
}
}
}
applyStickyLeftRightPosition(node, width - 1, this.parent.enableRtl, 'Left');
width = this.parent.getFrozenMode() === 'Right' && this.parent.isRowDragable() ? 30 : 0;
for (var i = cols.length - 1; i >= 0; i--) {
if (column.index < cols[parseInt(i.toString(), 10)].index) {
if (isChildColumn(column, cols[parseInt(i.toString(), 10)].uid) ||
column.index > cols[parseInt(i.toString(), 10)].index) {
break;
}
if (cols[parseInt(i.toString(), 10)].freeze === 'Right' || cols[parseInt(i.toString(), 10)].freeze === 'Fixed') {
if (cols[parseInt(i.toString(), 10)].visible) {
width += parseFloat(cols[parseInt(i.toString(), 10)].width.toString());
}
}
}
}
applyStickyLeftRightPosition(node, width - 1, this.parent.enableRtl, 'Right');
}
else {
node.classList.add('e-unfreeze');
}
return node;

@@ -87,0 +166,0 @@ };

@@ -18,2 +18,3 @@ import { IGrid, IRenderer, NotifyArgs, VirtualInfo, IModelGenerator } from '../base/interface';

private maxBlock;
private widthServices;
private prevHeight;

@@ -55,8 +56,7 @@ /** @hidden */

private isBottom;
/** @hidden */
isTop: boolean;
private rndrCount;
private diff;
private heightChange;
/** @hidden */
isTop: boolean;
/** @hidden */
activeKey: string;

@@ -81,4 +81,2 @@ /** @hidden */

private emptyRowData;
private vfColIndex;
private frzIdx;
private initialRowTop;

@@ -97,3 +95,2 @@ private isContextMenuOpen;

private getInfoFromView;
private setKeyboardNavIndex;
ensureBlocks(info: VirtualInfo): number[];

@@ -103,3 +100,2 @@ appendContent(target: HTMLElement, newChild: DocumentFragment | HTMLElement, e: NotifyArgs): void;

private ensureSelectedRowPosition;
private checkFirstBlockColIndexes;
private focusCell;

@@ -121,2 +117,3 @@ private restoreEdit;

private dataBound;
private resetStickyLeftPos;
private rowSelected;

@@ -179,3 +176,3 @@ private isLastBlockRow;

getFrozenRightVirtualRowByIndex(index: number): Element;
getRowCollection(index: number, isMovable: boolean, isRowObject?: boolean, isFrozenRight?: boolean): Element | Object;
getRowCollection(index: number, isRowObject?: boolean): Element | Object;
getVirtualRowIndex(index: number): number;

@@ -205,3 +202,2 @@ /**

setVisible(columns?: Column[]): void;
private setFrozenTable;
private setDisplayNone;

@@ -208,0 +204,0 @@ }

@@ -8,5 +8,4 @@ /**

export * from './services/group-model-generator';
export * from './services/freeze-row-model-generator';
export * from './services/value-formatter';
export * from './services/virtual-row-model-generator';
export * from './services/intersection-observer';

@@ -8,5 +8,4 @@ /**

export * from './services/group-model-generator';
export * from './services/freeze-row-model-generator';
export * from './services/value-formatter';
export * from './services/virtual-row-model-generator';
export * from './services/intersection-observer';

@@ -20,6 +20,2 @@ import { KeyboardEventArgs } from '@syncfusion/ej2-base';

active: IFocus;
fContent: IFocus;
fHeader: IFocus;
frContent: IFocus;
frHeader: IFocus;
/** @hidden */

@@ -53,2 +49,3 @@ isInfiniteScroll: boolean;

target: Element;
type?: string;
}, force?: boolean): void;

@@ -58,5 +55,2 @@ protected onKeyPress(e: KeyboardEventArgs): void;

private findBatchEditCell;
private setFrozenBatchEditCell;
private getActiveName;
private setActiveByName;
private setLastContentCellActive;

@@ -70,3 +64,3 @@ private focusOutFromChildGrid;

getContent(): IFocus;
setActive(content: boolean, isFrozen?: boolean, isFrozenRight?: boolean): void;
setActive(content: boolean): void;
setFocusedElement(element: HTMLElement, e?: KeyboardEventArgs): void;

@@ -170,13 +164,2 @@ focus(e?: KeyboardEventArgs | FocusEvent): void;

}
export declare class FixedContentFocus extends ContentFocus {
getTable(): HTMLTableElement;
jump(action: string, current: number[]): SwapInfo;
getNextCurrent(previous?: number[], swap?: SwapInfo, active?: IFocus, action?: string): number[];
}
export declare class FixedHeaderFocus extends HeaderFocus {
jump(action: string, current: number[]): SwapInfo;
getTable(): HTMLTableElement;
getNextCurrent(previous?: number[], swap?: SwapInfo, active?: IFocus, action?: string): number[];
getHeaderType(): string;
}
/** @hidden */

@@ -193,12 +176,1 @@ export declare class SearchBox {

}
export declare class FixedRightContentFocus extends ContentFocus {
getTable(): HTMLTableElement;
jump(action: string, current: number[]): SwapInfo;
getNextCurrent(previous?: number[], swap?: SwapInfo, active?: IFocus, action?: string): number[];
}
export declare class FixedRightHeaderFocus extends HeaderFocus {
jump(action: string, current: number[]): SwapInfo;
getTable(): HTMLTableElement;
getNextCurrent(previous?: number[], swap?: SwapInfo, active?: IFocus, action?: string): number[];
getHeaderType(): string;
}

@@ -11,3 +11,2 @@ import { SentinelInfo } from '../base/type';

private containerRect;
private movableContainerRect;
private element;

@@ -14,0 +13,0 @@ private movableEle;

@@ -34,6 +34,2 @@ import { EventHandler, Browser } from '@syncfusion/ej2-base';

var right = rect.right;
if (_this.movableEle) {
info.entered = right < _this.movableContainerRect.right;
return right - _this.movableContainerRect.width <= _this.movableContainerRect.right;
}
info.entered = right < _this.containerRect.right;

@@ -47,5 +43,2 @@ return right - _this.containerRect.width <= _this.containerRect.right;

info.entered = left > 0;
if (_this.movableEle) {
return left + _this.movableContainerRect.width >= _this.movableContainerRect.left;
}
return left + _this.containerRect.width >= _this.containerRect.left;

@@ -64,13 +57,5 @@ }, axis: 'X'

EventHandler.add(this.options.container, 'scroll', this.virtualScrollHandler(callback, onEnterCallback), this);
if (this.options.movableContainer) {
this.movableContainerRect = this.options.movableContainer.getBoundingClientRect();
EventHandler.add(this.options.scrollbar, 'wheel', function () { return _this.fromWheel = true; }, this);
EventHandler.add(this.options.scrollbar, 'scroll', this.virtualScrollHandler(callback, onEnterCallback), this);
}
};
InterSectionObserver.prototype.check = function (direction) {
var info = this.sentinelInfo["" + direction];
if (this.movableContainerRect && (direction === 'left' || direction === 'right')) {
return info.check(this.movableEle.getBoundingClientRect(), info);
}
return info.check(this.element.getBoundingClientRect(), info);

@@ -85,4 +70,4 @@ };

return function (e) {
var top = _this.options.movableContainer ? _this.options.container.scrollTop : e.target.scrollTop;
var left = _this.options.movableContainer ? _this.options.scrollbar.scrollLeft : e.target.scrollLeft;
var top = e.target.scrollTop;
var left = e.target.scrollLeft;
var direction = _this.options.prevTop < top ? 'down' : 'up';

@@ -99,8 +84,3 @@ direction = _this.options.prevLeft === left ? direction : _this.options.prevLeft < left ? 'right' : 'left';

if (current.entered) {
if (_this.movableEle && (direction === 'right' || direction === 'left')) {
onEnterCallback(_this.movableEle, current, direction, { top: top, left: left }, _this.fromWheel, check);
}
else {
onEnterCallback(_this.element, current, direction, { top: top, left: left }, _this.fromWheel, check);
}
onEnterCallback(_this.element, current, direction, { top: top, left: left }, _this.fromWheel, check);
}

@@ -107,0 +87,0 @@ if (check) {

@@ -24,3 +24,3 @@ import { IModelGenerator, IGrid } from '../base/interface';

columnSelector(column: AggregateColumnModel): boolean;
getColumns(start?: number, end?: number): Column[];
getColumns(start?: number): Column[];
generateRows(input: Object[] | Group, args?: Object, start?: number, end?: number, columns?: Column[]): Row<AggregateColumnModel>[];

@@ -27,0 +27,0 @@ getGeneratedRow(summaryRow: AggregateRowModel, data: Object, raw: number, start: number, end: number, parentUid?: string, columns?: Column[]): Row<AggregateColumnModel>;

@@ -52,3 +52,3 @@ var __extends = (this && this.__extends) || (function () {

};
SummaryModelGenerator.prototype.getColumns = function (start, end) {
SummaryModelGenerator.prototype.getColumns = function (start) {
var columns = [];

@@ -67,4 +67,3 @@ if (this.parent.detailTemplate || !isNullOrUndefined(this.parent.childGrid)) {

columns.push.apply(columns, this.parent.getColumns());
end = end && !start ? end + this.parent.getIndentCount() : end;
return isNullOrUndefined(start) ? columns : columns.slice(start, end);
return columns;
};

@@ -89,3 +88,3 @@ SummaryModelGenerator.prototype.generateRows = function (input, args, start, end, columns) {

var isDetailGridAlone = !isNullOrUndefined(this.parent.childGrid);
var indentLength = !start ? this.parent.getIndentCount() : 0;
var indentLength = this.parent.getIndentCount();
if (this.parent.groupSettings.columns.length && this.parent.allowRowDragAndDrop) {

@@ -97,3 +96,3 @@ indents.push('e-indentcelltop');

}
var values = columns ? columns : this.getColumns(start, end);
var values = columns ? columns : this.getColumns(start);
for (var i = 0; i < values.length; i++) {

@@ -100,0 +99,0 @@ tmp.push(this.getGeneratedCell(values[parseInt(i.toString(), 10)], summaryRow, i >= indentLength ? this.getCellType() :

@@ -18,8 +18,2 @@ import { IModelGenerator, IGrid, VirtualInfo, NotifyArgs } from '../base/interface';

};
movableCache: {
[x: number]: Row<Column>[];
};
frozenRightCache: {
[x: number]: Row<Column>[];
};
rowCache: {

@@ -43,8 +37,5 @@ [x: number]: Row<Column>;

isBlockAvailable(value: number): boolean;
isMovableBlockAvailable(value: number): boolean;
isFrozenRightBlockAvailable(value: number): boolean;
getData(): VirtualInfo;
private getStartIndex;
getColumnIndexes(content?: HTMLElement): number[];
private addFrozenIndex;
checkAndResetCache(action: string): boolean;

@@ -51,0 +42,0 @@ refreshColOffsets(): void;

@@ -14,4 +14,2 @@ import { Browser, isNullOrUndefined } from '@syncfusion/ej2-base';

this.cache = {};
this.movableCache = {};
this.frozenRightCache = {};
this.rowCache = {};

@@ -27,3 +25,2 @@ this.data = {};

var _this = this;
var isFrozen = this.parent.isFrozenGrid();
var isManualRefresh = false;

@@ -41,6 +38,3 @@ var info = e.virtualInfo = e.virtualInfo || this.getData();

}
if ((isFrozen && (this.parent.getFrozenMode() !== literals.leftRight && !e.renderMovableContent)
|| this.parent.getFrozenMode() === literals.leftRight && !e.renderMovableContent && !e.renderFrozenRightContent) || !isFrozen) {
this.checkAndResetCache(e.requestType);
}
this.checkAndResetCache(e.requestType);
if (isGroupAdaptive(this.parent) && this.parent.vcRows.length) {

@@ -58,39 +52,32 @@ var dataRows = this.parent.vcRows.filter(function (row) { return row.isDataRow; });

}
if ((e.renderMovableContent && this.isMovableBlockAvailable(info.blockIndexes[parseInt(i.toString(), 10)]))
|| (e.renderFrozenRightContent && this.isFrozenRightBlockAvailable(info.blockIndexes[parseInt(i.toString(), 10)]))) {
var cache = e.renderMovableContent
? this.movableCache : this.frozenRightCache;
cache[info.blockIndexes[parseInt(i.toString(), 10)]] =
this.rowModelGenerator.refreshRows(cache[info.blockIndexes[parseInt(i.toString(), 10)]]);
}
}
}
var values = info.blockIndexes;
for (var i = 0; i < values.length; i++) {
if (!this.isBlockAvailable(values[parseInt(i.toString(), 10)])) {
var startIdx = !isNullOrUndefined(this.startIndex) ? this.startIndex :
this.getStartIndex(values[parseInt(i.toString(), 10)], data);
var rows = this.rowModelGenerator.generateRows(data, {
var _loop_1 = function (i) {
if (!this_1.isBlockAvailable(values[parseInt(i.toString(), 10)])) {
var startIdx = !isNullOrUndefined(this_1.startIndex) ? this_1.startIndex :
this_1.getStartIndex(values[parseInt(i.toString(), 10)], data);
var rows = this_1.rowModelGenerator.generateRows(data, {
virtualInfo: info, startIndex: startIdx
});
if (isGroupAdaptive(this.parent) && !this.parent.vcRows.length) {
this.parent.vRows = rows;
this.parent.vcRows = rows;
this.parent.notify(events.refreshVirtualMaxPage, {});
if (isGroupAdaptive(this_1.parent) && !this_1.parent.vcRows.length) {
this_1.parent.vRows = rows;
this_1.parent.vcRows = rows;
this_1.parent.notify(events.refreshVirtualMaxPage, {});
}
var median = void 0;
if (isGroupAdaptive(this.parent)) {
this.getGroupVirtualRecordsByIndex(rows);
if (isGroupAdaptive(this_1.parent)) {
this_1.getGroupVirtualRecordsByIndex(rows);
}
else {
if (isManualRefresh) {
this.setBlockForManualRefresh(this.cache, indexes, rows);
this_1.setBlockForManualRefresh(this_1.cache, indexes, rows);
}
else {
median = ~~Math.max(rows.length, this.model.pageSize) / 2;
if (!this.isBlockAvailable(indexes[0])) {
this.cache[indexes[0]] = rows.slice(0, median);
median = ~~Math.max(rows.length, this_1.model.pageSize) / 2;
if (!this_1.isBlockAvailable(indexes[0])) {
this_1.cache[indexes[0]] = rows.slice(0, median);
}
if (!this.isBlockAvailable(indexes[1])) {
this.cache[indexes[1]] = rows.slice(median);
if (!this_1.isBlockAvailable(indexes[1])) {
this_1.cache[indexes[1]] = rows.slice(median);
}

@@ -100,44 +87,26 @@ }

}
if (this.parent.groupSettings.columns.length && !xAxis && this.cache[values[parseInt(i.toString(), 10)]] &&
!this.parent.groupSettings.enableLazyLoading) {
this.cache[values[parseInt(i.toString(), 10)]] =
this.updateGroupRow(this.cache[values[parseInt(i.toString(), 10)]], values[parseInt(i.toString(), 10)]);
if (this_1.parent.groupSettings.columns.length && !xAxis && this_1.cache[values[parseInt(i.toString(), 10)]] &&
!this_1.parent.groupSettings.enableLazyLoading) {
this_1.cache[values[parseInt(i.toString(), 10)]] =
this_1.updateGroupRow(this_1.cache[values[parseInt(i.toString(), 10)]], values[parseInt(i.toString(), 10)]);
}
if ((e.renderMovableContent && !this.isMovableBlockAvailable(values[parseInt(i.toString(), 10)]))
|| (e.renderFrozenRightContent && !this.isFrozenRightBlockAvailable(values[parseInt(i.toString(), 10)]))) {
var cache = e.renderMovableContent
? this.movableCache : this.frozenRightCache;
var startIdx = !isNullOrUndefined(this.startIndex) ? this.startIndex :
this.getStartIndex(values[parseInt(i.toString(), 10)], data);
var rows = this.rowModelGenerator.generateRows(data, {
virtualInfo: info, startIndex: startIdx
});
if (isManualRefresh) {
this.setBlockForManualRefresh(cache, indexes, rows);
if (!e.renderMovableContent && !e.renderFrozenRightContent && this_1.cache[values[parseInt(i.toString(), 10)]]) {
result.push.apply(result, this_1.cache[values[parseInt(i.toString(), 10)]]);
var DataRecord_1 = [];
if (this_1.parent.enableVirtualization && this_1.parent.groupSettings.columns.length) {
result.forEach(function (data) {
if (!DataRecord_1.includes(data)) {
DataRecord_1.push(data);
}
});
}
else {
var median = ~~Math.max(rows.length, this.model.pageSize) / 2;
if ((e.renderFrozenRightContent && !this.isFrozenRightBlockAvailable(indexes[0]))
|| (e.renderMovableContent && !this.isMovableBlockAvailable(indexes[0]))) {
cache[indexes[0]] = rows.slice(0, median);
}
if ((e.renderFrozenRightContent && !this.isFrozenRightBlockAvailable(indexes[1]))
|| (e.renderMovableContent && !this.isMovableBlockAvailable(indexes[1]))) {
cache[indexes[1]] = rows.slice(median);
}
}
result = DataRecord_1.length ? DataRecord_1 : result;
}
if (!e.renderMovableContent && !e.renderFrozenRightContent && this.cache[values[parseInt(i.toString(), 10)]]) {
result.push.apply(result, this.cache[values[parseInt(i.toString(), 10)]]);
}
else {
var cache = e.renderMovableContent
? this.movableCache : this.frozenRightCache;
if (cache[values[parseInt(i.toString(), 10)]]) {
result.push.apply(result, cache[values[parseInt(i.toString(), 10)]]);
}
}
if (this.isBlockAvailable(values[parseInt(i.toString(), 10)])) {
if (this_1.isBlockAvailable(values[parseInt(i.toString(), 10)])) {
loadedBlocks.push(values[parseInt(i.toString(), 10)]);
}
};
var this_1 = this;
for (var i = 0; i < values.length; i++) {
_loop_1(i);
}

@@ -149,8 +118,2 @@ info.blockIndexes = loadedBlocks;

}
else if (isFrozen) {
if ((e.renderMovableContent && (this.parent.getFrozenMode() === 'Left'
|| this.parent.getFrozenMode() === 'Right' || this.parent.getFrozenColumns())) || e.renderFrozenRightContent) {
this.parent.currentViewData = result.map(function (m) { return m.data; });
}
}
else {

@@ -195,8 +158,2 @@ this.parent.currentViewData = result.map(function (m) { return m.data; });

};
VirtualRowModelGenerator.prototype.isMovableBlockAvailable = function (value) {
return value in this.movableCache;
};
VirtualRowModelGenerator.prototype.isFrozenRightBlockAvailable = function (value) {
return value in this.frozenRightCache;
};
VirtualRowModelGenerator.prototype.getData = function () {

@@ -220,5 +177,2 @@ return {

if (content === void 0) { content = this.parent.getHeaderContent().querySelector('.' + literals.headerContent); }
if (this.parent.isFrozenGrid()) {
content = content.querySelector('.' + literals.movableHeader);
}
var indexes = [];

@@ -231,6 +185,14 @@ var sLeft = content.scrollLeft | 0;

var left = sLeft + cWidth + (sLeft === 0 ? calWidth : 0);
var frzLeftWidth = 0;
if (this.parent.isFrozenGrid()) {
frzLeftWidth = this.parent.leftrightColumnWidth('left');
if (this.parent.getFrozenMode() === literals.leftRight) {
var rightCol = this.parent.getVisibleFrozenRightCount();
keys.splice((keys.length - 1) - rightCol, rightCol);
}
}
keys.some(function (offset) {
var iOffset = Number(offset);
var offsetVal = _this.cOffsets["" + offset];
var border = sLeft - calWidth <= offsetVal && left + calWidth >= offsetVal;
var border = ((sLeft - calWidth) + frzLeftWidth) <= offsetVal && (left + calWidth) >= offsetVal;
if (border) {

@@ -241,18 +203,7 @@ indexes.push(iOffset);

});
this.addFrozenIndex(indexes);
return indexes;
};
VirtualRowModelGenerator.prototype.addFrozenIndex = function (indexes) {
if (this.parent.getFrozenColumns() && this.parent.enableColumnVirtualization && indexes[0] === 0) {
for (var i = 0; i < this.parent.getFrozenColumns(); i++) {
indexes.push(indexes[indexes.length - 1] + 1);
}
}
};
VirtualRowModelGenerator.prototype.checkAndResetCache = function (action) {
var actions = ['paging', 'refresh', 'sorting', 'filtering', 'searching', 'grouping', 'ungrouping', 'reorder',
'save', 'delete'];
if (this.parent.getFrozenColumns() && this.parent.frozenRows && this.parent.enableColumnVirtualization && action === 'reorder') {
actions.splice(actions.indexOf(action), 1);
}
var clear = actions.some(function (value) { return action === value; });

@@ -263,4 +214,2 @@ if (clear) {

this.groups = {};
this.movableCache = {};
this.frozenRightCache = {};
}

@@ -267,0 +216,0 @@ return clear;

@@ -16,3 +16,2 @@ import { IGrid } from '../base/interface';

private setWidth;
private getColumnLevelFrozenColgroup;
/**

@@ -28,10 +27,4 @@ * @returns {void}

getTableWidth(columns: Column[]): number;
private calcMovableOrFreezeColWidth;
private setWidthToFrozenRightTable;
private setWidthToFrozenLeftTable;
private setWidthToMovableTable;
private setWidthToFrozenEditTable;
private setWidthToMovableEditTable;
setWidthToTable(): void;
private isAutoResize;
}

@@ -43,3 +43,3 @@ import { isNullOrUndefined } from '@syncfusion/ej2-base';

if (this.parent.isRowDragable() && this.parent.getFrozenMode() === 'Right') {
this.setColumnWidth(new Column({ width: '30px' }), columns.length);
this.setColumnWidth(new Column({ width: '30px' }), this.parent.groupSettings.columns.length + columns.length);
}

@@ -118,46 +118,3 @@ totalColumnsWidth = this.getTableWidth(this.parent.getColumns());

var fWidth = formatUnit(width);
var headerCol;
var frzCols = this.parent.getFrozenColumns();
var isDraggable = this.parent.isRowDragable();
frzCols = frzCols && isDraggable ? frzCols + 1 : frzCols;
var mHdr = this.parent.getHeaderContent().querySelector('.' + literals.movableHeader);
var mCont = this.parent.getContent().querySelector('.' + literals.movableContent);
var freezeLeft = this.parent.getFrozenLeftColumnsCount();
var freezeRight = this.parent.getFrozenRightColumnsCount();
var movableCount = this.parent.getMovableColumnsCount();
var isColFrozen = freezeLeft !== 0 || freezeRight !== 0;
if (frzCols && index >= frzCols) {
if (!mHdr || !mHdr.querySelector(literals.colGroup)) {
return;
}
headerCol = mHdr
.querySelector(literals.colGroup + ':not(.e-masked-colgroup)').children[index - frzCols];
}
else if (this.parent.enableColumnVirtualization && frzCols && this.parent.contentModule.isXaxis()
&& mHdr.scrollLeft > 0) {
var colGroup = mHdr.querySelector(literals.colGroup);
headerCol = colGroup.children[(colGroup.children.length - 1) - index];
}
else if (isColFrozen) {
var target = void 0;
if (freezeLeft && !freezeRight) {
index = isDraggable ? index - 1 : index;
target = index < freezeLeft ? header : mHdr;
}
else if (!freezeLeft && freezeRight) {
target = index >= movableCount ? header : mHdr;
}
else if (freezeLeft && freezeRight) {
index = isDraggable ? index - 1 : index;
var frHdr = this.parent.getFrozenRightHeader();
target = index < freezeLeft ? header : index < (freezeLeft + movableCount) ? mHdr : frHdr;
}
headerCol = this.getColumnLevelFrozenColgroup(index, freezeLeft, movableCount, target);
if (!headerCol) {
return;
}
}
else {
headerCol = header.querySelector(literals.colGroup).children[parseInt(index.toString(), 10)];
}
var headerCol = header.querySelector(literals.colGroup).children[parseInt(index.toString(), 10)];
if (headerCol && !clear) {

@@ -169,35 +126,4 @@ headerCol.style.width = fWidth;

}
var contentCol;
if (frzCols && index >= frzCols) {
contentCol = this.parent.getContent().querySelector('.' + literals.movableContent)
.querySelector(literals.colGroup + ':not(.e-masked-colgroup)').children[index - frzCols];
}
else if (this.parent.enableColumnVirtualization && frzCols && this.parent.contentModule.isXaxis()
&& mCont.scrollLeft > 0) {
var colGroup = this.parent.getContent().querySelector('.' + literals.movableContent)
.querySelector(literals.colGroup);
contentCol = colGroup.children[(colGroup.children.length - 1) - index];
}
else if (isColFrozen) {
var target = void 0;
if (freezeLeft && !freezeRight) {
target = index < freezeLeft ? content : mCont;
}
if (!freezeLeft && freezeRight) {
target = index >= movableCount ? content : mCont;
}
if (freezeLeft && freezeRight) {
var frCont = this.parent.getContent().querySelector('.e-frozen-right-content');
target = index < freezeLeft ? content : index < (freezeLeft + movableCount) ? mCont : frCont;
}
contentCol = this.getColumnLevelFrozenColgroup(index, freezeLeft, movableCount, target);
}
else {
contentCol = content.querySelector(literals.colGroup).children[parseInt(index.toString(), 10)];
}
var contentCol = content.querySelector(literals.colGroup).children[parseInt(index.toString(), 10)];
if (contentCol && !clear) {
if (contentCol.style.width !== headerCol.style.width && this.parent.isFrozenGrid() && this.parent['reorderModule'] &&
this.parent['reorderModule'].element && this.parent['reorderModule'].destElement) {
contentCol.style.display = this.parent.getColumnByIndex(index).visible ? '' : 'none';
}
contentCol.style.width = fWidth;

@@ -222,32 +148,6 @@ }

}
if (this.parent.isFrozenGrid()) {
if (this.parent.isFrozenGrid() && this.parent.enableColumnVirtualization) {
this.refreshFrozenScrollbar();
}
};
ColumnWidthService.prototype.getColumnLevelFrozenColgroup = function (index, left, movable, ele) {
if (!ele || !ele.querySelector(literals.colGroup)) {
return null;
}
var columns = this.parent.getColumns();
var isDrag = this.parent.isRowDragable();
var frzMode = this.parent.getFrozenMode();
var headerCol;
var colGroup = [].slice.call(ele.querySelector(literals.colGroup + ':not(.e-masked-colgroup)').children);
if (frzMode === 'Right' && isDrag && index === (movable + this.parent.getFrozenRightColumnsCount())) {
headerCol = colGroup[colGroup.length - 1];
}
else if (isDrag && index === -1) {
headerCol = colGroup[0];
}
else if (columns[parseInt(index.toString(), 10)].freeze === 'Left') {
headerCol = colGroup[isDrag ? (index + 1) : index];
}
else if (columns[parseInt(index.toString(), 10)].freeze === 'Right') {
headerCol = colGroup[index - (left + movable)];
}
else {
headerCol = colGroup[index - left];
}
return headerCol;
};
/**

@@ -264,31 +164,12 @@ * @returns {void}

var scrollWidth = getScrollBarWidth();
var frozenScrollbar = this.parent.element.querySelector('.e-frozenscrollbar');
var movableScrollbar = this.parent.element.querySelector('.e-movablescrollbar');
var frozencontent = this.parent.getContent().querySelector('.' + literals.frozenContent);
var movableContent = this.parent.getContent().querySelector('.' + literals.movableContent);
var frozenWidth = frozencontent.firstElementChild.getBoundingClientRect().width;
var movableWidth = movableContent.firstElementChild.getBoundingClientRect().width;
if (this.parent.getFrozenMode() === 'Right') {
frozenWidth = frozenWidth + scrollWidth;
}
frozenScrollbar.style.width = frozenWidth + 'px';
if (this.parent.getFrozenMode() === literals.leftRight) {
var frozenRightScrollbar = this.parent.element.querySelector('.e-frozen-right-scrollbar');
var frozenRightWidth = this.parent.getContent().querySelector('.e-frozen-right-content')
.firstElementChild.getBoundingClientRect().width;
if (this.parent.height !== 'auto') {
frozenRightWidth = frozenRightWidth + scrollWidth;
var movableWidth = this.parent.getContent().firstElementChild.getBoundingClientRect().width;
if (this.parent.enableColumnVirtualization) {
var placeHolder = this.parent.getContent().querySelector('.e-virtualtrack');
if (placeHolder) {
movableWidth = placeHolder.scrollWidth;
}
frozenRightScrollbar.style.width = frozenRightWidth + 'px';
}
else {
if (this.parent.enableColumnVirtualization) {
var placeHolder = this.parent.getMovableVirtualContent().querySelector('.e-virtualtrack');
if (placeHolder) {
movableWidth = placeHolder.scrollWidth;
}
}
if (this.parent.getFrozenMode() !== 'Right' && this.parent.height !== 'auto') {
movableWidth = movableWidth + scrollWidth;
}
if (this.parent.height !== 'auto') {
movableWidth = movableWidth + scrollWidth;
}

@@ -325,6 +206,2 @@ movableScrollbar.firstElementChild.style.width = movableWidth + 'px';

}
if (this.parent.isFrozenGrid() && isNullOrUndefined(column.width) &&
(column.getFreezeTableName() === literals.frozenLeft || column.getFreezeTableName() === literals.frozenRight)) {
column.width = 200;
}
if (!column.width) {

@@ -358,102 +235,12 @@ return null;

};
ColumnWidthService.prototype.calcMovableOrFreezeColWidth = function (tableType) {
var columns = this.parent.getColumns().slice();
var left = this.parent.getFrozenLeftColumnsCount() || this.parent.getFrozenColumns();
var movable = this.parent.getMovableColumnsCount();
var right = this.parent.getFrozenRightColumnsCount();
if (tableType === 'movable') {
if (right) {
columns.splice(left + movable, columns.length);
}
if (left) {
columns.splice(0, left);
}
}
else if (tableType === 'freeze-left') {
columns.splice(left, columns.length);
}
else if (tableType === 'freeze-right') {
columns.splice(0, left + movable);
}
return formatUnit(this.getTableWidth(columns));
};
ColumnWidthService.prototype.setWidthToFrozenRightTable = function () {
var freezeWidth = this.calcMovableOrFreezeColWidth('freeze-right');
freezeWidth = this.isAutoResize() ? '100%' : freezeWidth;
var headerTbl = this.parent.getHeaderContent().querySelector('.e-frozen-right-header')
.querySelector('.' + literals.table + ':not(.e-masked-table)');
var cntTbl = this.parent.getContent().querySelector('.e-frozen-right-content')
.querySelector('.' + literals.table + ':not(.e-masked-table)');
headerTbl.style.width = freezeWidth;
cntTbl.style.width = freezeWidth;
};
ColumnWidthService.prototype.setWidthToFrozenLeftTable = function () {
var freezeWidth = this.calcMovableOrFreezeColWidth('freeze-left');
freezeWidth = this.isAutoResize() ? '100%' : freezeWidth;
this.parent.getHeaderTable().style.width = freezeWidth;
this.parent.getContentTable().style.width = freezeWidth;
};
ColumnWidthService.prototype.setWidthToMovableTable = function () {
var movableWidth = '';
var isColUndefined = this.parent.getColumns().filter(function (a) { return isNullOrUndefined(a.width); }).length >= 1;
var isWidthAuto = this.parent.getColumns().filter(function (a) { return (a.width === 'auto'); }).length >= 1;
var movableHeader = this.parent.getHeaderContent().querySelector('.' + literals.movableHeader);
var movableContent = this.parent.getContent().querySelector('.' + literals.movableContent);
if (typeof this.parent.width === 'number' && !isColUndefined && !isWidthAuto && !this.parent.resizeModule.resizeProcess) {
movableWidth = formatUnit(this.parent.width - parseInt(this.calcMovableOrFreezeColWidth('freeze').split('px')[0], 10) - 5);
}
else if (!isColUndefined && !isWidthAuto) {
movableWidth = this.calcMovableOrFreezeColWidth('movable');
}
movableWidth = this.isAutoResize() ? '100%' : movableWidth;
if (movableHeader.firstElementChild) {
if (movableHeader.firstElementChild.classList.contains('e-masked-table')) {
movableHeader.childNodes[1].style.width = movableWidth;
}
else {
movableHeader.firstElementChild.style.width = movableWidth;
}
}
if (movableContent.firstElementChild.classList.contains('e-masked-table')) {
movableContent.childNodes[1].style.width = movableWidth;
}
else {
movableContent.firstElementChild.style.width = movableWidth;
}
};
ColumnWidthService.prototype.setWidthToFrozenEditTable = function () {
var freezeWidth = this.calcMovableOrFreezeColWidth('freeze');
freezeWidth = this.isAutoResize() ? '100%' : freezeWidth;
this.parent.element.querySelectorAll('.e-table.e-inline-edit')[0].style.width = freezeWidth;
};
ColumnWidthService.prototype.setWidthToMovableEditTable = function () {
var movableWidth = this.calcMovableOrFreezeColWidth('movable');
movableWidth = this.isAutoResize() ? '100%' : movableWidth;
this.parent.element.querySelectorAll('.e-table.e-inline-edit')[1].style.width = movableWidth;
};
ColumnWidthService.prototype.setWidthToTable = function () {
var tWidth = formatUnit(this.getTableWidth(this.parent.getColumns()));
if (this.parent.isFrozenGrid()) {
if (this.parent.getFrozenColumns() || this.parent.getFrozenLeftColumnsCount()) {
this.setWidthToFrozenLeftTable();
}
this.setWidthToMovableTable();
if (this.parent.getFrozenRightColumnsCount()) {
this.setWidthToFrozenRightTable();
}
if (this.parent.detailTemplate || this.parent.childGrid) {
this.setColumnWidth(new Column({ width: '30px' }));
}
else {
if (this.parent.detailTemplate || this.parent.childGrid) {
this.setColumnWidth(new Column({ width: '30px' }));
}
tWidth = this.isAutoResize() ? '100%' : tWidth;
this.parent.getHeaderTable().style.width = tWidth;
this.parent.getContentTable().style.width = tWidth;
}
tWidth = this.isAutoResize() ? '100%' : tWidth;
this.parent.getHeaderTable().style.width = tWidth;
this.parent.getContentTable().style.width = tWidth;
var edit = this.parent.element.querySelector('.e-table.e-inline-edit');
if (edit && this.parent.getFrozenColumns()) {
this.setWidthToFrozenEditTable();
this.setWidthToMovableEditTable();
}
else if (edit) {
if (edit) {
edit.style.width = tWidth;

@@ -460,0 +247,0 @@ }

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc