{"version":3,"sources":["webpack://lcb-research-content/./node_modules/@syncfusion/ej2-grids/src/grid/base/grid.js"],"names":["_extendStatics","__extends","d","b","Object","setPrototypeOf","__proto__","Array","p","hasOwnProperty","__","this","constructor","prototype","create","__decorate","decorators","target","key","desc","c","arguments","length","r","getOwnPropertyDescriptor","Reflect","decorate","i","defineProperty","SortDescriptor","_super","apply","SortSettings","Predicate","InfiniteScrollSettings","FilterSettings","SelectionSettings","SearchSettings","RowDropSettings","TextWrapSettings","ResizeSettings","GroupSettings","EditSettings","Grid","options","element","_this","call","isPreventScrollEvent","inViewIndexes","keyA","frozenRightCount","frozenLeftCount","tablesCount","movableCount","visibleFrozenLeft","visibleFrozenRight","visibleMovable","frozenLeftColumns","frozenRightColumns","movableColumns","media","isFreezeRefresh","tableIndex","componentRefresh","isVirtualAdaptive","vRows","vcRows","vGroupOffsets","rowUid","currentViewData","lockcolPositionCount","prevPageMoving","pageTemplateChange","isAutoGen","mediaBindInstance","commandDelIndex","undefined","asyncTimeOut","enableLogger","needsID","Grid_1","Inject","mergePersistGridData","getPersistData","keyEntity","ignoreOnPersist","pageSettings","filterSettings","groupSettings","searchSettings","sortSettings","columns","selectedRowIndex","scrollPosition","currentObject","_i","_a","template","isAngular","pagerTemplate","addOnPersist","requiredModules","setFrozenCount","modules","isDestroyed","allowFiltering","push","member","args","serviceLocator","allowExcelExport","allowPdfExport","allowSorting","sortedColumns","allowPaging","allowSelection","selectionSettings","allowReordering","allowRowDragAndDrop","allowGrouping","aggregates","isDetail","toolbar","toolbarTemplate","enableVirtualization","enableColumnVirtualization","getFrozenColumns","frozenRows","isCommandColumn","editSettings","allowAdding","allowDeleting","allowEditing","extendRequiredModules","enableInfiniteScrolling","enableLazyLoading","contextMenuItems","showColumnMenu","showColumnChooser","isForeignKeyEnabled","preRender","S","initProperties","initializeServices","isInitial","mediaCol","isInitialLoad","allowServerDataBinding","ignoreCollectionWatch","mergeCells","isEdit","checkAllRows","isCheckBoxSelection","isPersistSelection","filterOperators","contains","endsWith","equal","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","notEqual","startsWith","defaultLocale","EmptyRecord","True","False","InvalidFilterMessage","GroupDropArea","UnGroup","UnGroupButton","GroupDisable","FilterbarTitle","EmptyDataSourceError","Add","Edit","Cancel","Update","Delete","Print","Pdfexport","Excelexport","Wordexport","Csvexport","Search","Columnchooser","Save","Item","Items","EditOperationAlert","DeleteOperationAlert","SaveButton","OKButton","CancelButton","EditFormTitle","AddFormTitle","BatchSaveConfirm","BatchSaveLostChanges","ConfirmDelete","CancelEdit","ChooseColumns","SearchColumns","Matchs","FilterButton","ClearButton","StartsWith","EndsWith","Contains","Equal","NotEqual","LessThan","LessThanOrEqual","GreaterThan","GreaterThanOrEqual","ChooseDate","EnterValue","Copy","Group","Ungroup","autoFitAll","autoFit","AutoFitAll","AutoFit","Export","FirstPage","LastPage","PreviousPage","NextPage","SortAscending","SortDescending","EditRecord","DeleteRecord","FilterMenu","SelectAll","Blanks","FilterTrue","FilterFalse","NoResult","ClearFilter","Clear","NumberFilter","TextFilter","DateFilter","DateTimeFilter","MatchCase","Between","CustomFilter","CustomFilterPlaceHolder","CustomFilterDatePlaceHolder","AND","OR","ShowRowsWhere","FilterMenuDialogARIA","ExcelFilterDialogARIA","DialogEditARIA","ColumnChooserDialogARIA","ColumnMenuDialogARIA","CustomFilterDialogARIA","SortAtoZ","SortZtoA","SortByOldest","SortByNewest","SortSmallestToLargest","SortLargestToSmallest","Sort","keyConfigs","downArrow","upArrow","rightArrow","leftArrow","shiftDown","shiftUp","shiftRight","shiftLeft","home","end","escape","ctrlHome","ctrlEnd","pageUp","pageDown","ctrlAltPageUp","ctrlAltPageDown","altPageUp","altPageDown","altDownArrow","altUpArrow","ctrlDownArrow","ctrlUpArrow","ctrlPlusA","ctrlPlusP","insert","delete","f2","enter","ctrlEnter","shiftEnter","tab","shiftTab","space","ctrlPlusC","ctrlShiftPlusH","ctrlSpace","ctrlLeftArrow","ctrlRightArrow","render","log","ariaService","setOptions","role","createElement","renderModule","searchModule","scrollModule","notify","getDataModule","dataManager","dataSource","offline","url","trigger","enablePersistence","getMediaColumns","checkLockColumns","getColumns","processModel","gridRender","wireEvents","addListener","updateDefaultCursor","updateStackedFilter","showSpinner","hideSpinner","type","getHeaderContent","getElementsByClassName","classList","add","remove","gcol","getShowHideService","getService","index","hideAtMedia","visible","pushMediaColumn","col","uid","window","matchMedia","mediaQueryUpdate","bind","updateMediaColumns","getColumnIndexByUid","splice","columnIndex","e","some","mediaColumn","matches","invokedFromMedia","showHider","show","headerText","hide","refreshMediaCol","footerContent","querySelector","scrollHeight","height","filter","checkboxMode","rowRenderingMode","enableHover","setProperties","enableAdaptiveUI","removeMediaListener","removeListener","eventInitializer","destroy","gridElement","hasGridChild","unwireEvents","destroyDependentModules","toolTipObj","innerHTML","keyboardModule","focusModule","getModuleName","enableBoxSelection","enableAutoFill","cellSelectionMode","onPropertyChanged","newProp","oldProp","checkCursor","requireRefresh","requireGridRefresh","freezeRefresh","isEllipsisTooltip","close","properties","keys","indexOf","updateColumnObject","properties_1","prop","module","enable","currentPage","pageSize","totalRecordsCount","refreshHeader","width","headerModule","refreshUI","refresh","selectionModule","updateAutoFillPosition","rowTemplateFn","rowTemplate","detailTemplateFn","detailTemplate","oldProperties","isQueryInvokedFromData","extendedPropertyChange","isServerRendered","requestType","maintainSelection","updateRTL","ej2_instances","enableRtl","dataBind","removePadding","setPadding","toolbarModule","getToolbar","contextMenuModule","getContextMenu","columnMenuModule","getColumnMenu","showFilterBarOperator","updateResizeLines","rowHeight","updateGridLines","columnMenuItems","allowTextWrap","applyTextWrap","removeTextWrap","case","isModeChg","pending_1","getState","getPrototypeOf","deepWatch","pKeyField","getPrimaryKeyFieldNames","props","setRowData","isPending","gResult","result","names","group","count","setState","resolver","isDataChanged","scrollRefresh","isSelectedRowIndexUpdating","selectRow","widthService","setWidthToTable","enableVerticalRendering","on","fn_1","off","muteOnChange","filterModule","refreshFilter","setTablesCount","frozenCols","frozenLeft","getFrozenLeftColumnsCount","frozenRight","getFrozenRightColumnsCount","getTablesCount","headerCells","slice","querySelectorAll","stdHdrCell","cols","cells","contentModule","getHeaderCells","cell","updateColumnModel","len","columnModel","updateColumnLevelFrozen","updateFrozenColumns","updateLockableColumns","leftCols","rightCols","movableCols","freeze","freezeTable","concat","directFrozenCount","frozenColumns","totalFrozenCount","isFrozen","getFrozenLeftCount","isFrozenGrid","getFrozenMode","frozenName","frozenCount","lockColumn","isRefresh","inview","map","v","vLen","ensureFrozenCols","getStackedHeaderColumnByHeaderText","stackedHeader","individualColumn","field","stackedColumn","getColumnIndexesInView","getQuery","query","getLocaleConstants","setColumnIndexesInView","indexes","getVisibleColumns","getCurrentVisibleColumns","getPanel","setGridHeaderContent","setPanel","getContentTable","getTable","setGridContentTable","setTable","getContent","setGridContent","getHeaderTable","setGridHeaderTable","getFooterContent","footerElement","getFooterContentTable","firstChild","getPager","gridPager","setGridPager","getRowByIndex","getMovableRowByIndex","getFrozenRowByIndex","getFrozenDataRows","getRows","getRowElements","getFrozenRightRowByIndex","getRowInfo","ele","row","rowObj","getRowObjectFromUID","getAttribute","rowIndex","parseInt","rowData","data","cellIndex","isNaN","row_1","frzCols","tableName","getFreezeTableName","rows","getIndentCount","getMovableRows","getFrozenRightRows","rowsObject","column","getMovableRowElements","getFrozenRightRowElements","getDataRows","getAllDataRows","includeAdd","tbody","getFrozenLeftContentTbody","children","hdrTbody","freezeRows","addMovableRows","generateDataRows","fRows","mrows","includAdd","dRows","isCollapseStateEnabled","getMovableDataRows","getAllMovableDataRows","getAllFrozenDataRows","getFrozenRightDataRows","getAllFrozenRightDataRows","setCellValue","value","isRight","pkName","fieldIdx","getColumnIndexByField","getColumnByField","selectedRow","getFrozenRightRowsObject","tr","left","movable","getMovableColumnsCount","isRowDragable","frIdx","td","getCellFromIndex","Idx","childGrid","sRow","refreshTD","refreshReactColumnTemplateByUid","columnUid","isReact","clearTemplate","rowsObj","getRowsObject","indent","getNormalizedColumnIndex","j","isDataRow","cellRenderer","rowObjects","rowRenderer","changes","getForeignKeyColumns","getColumnByIndex","getMovableCellFromIndex","getFrozenRightCellFromIndex","getColumnHeaderByIndex","getMovableColumnHeaderByIndex","getMovableVirtualHeader","getFrozenRightColumnHeaderByIndex","getFrozenRightHeader","getFrozenLeftColumnHeaderByIndex","getFrozenVirtualHeader","isMovable","isFrozenRight","rowObject","rows_1","getMovableRowsObject","getColumnHeaderByField","getColumnHeaderByUid","parentElement","item","getColumnByUid","getStackedColumns","columns_1","getUidByColumnField","rowDropSettings","targetID","getColumnFieldNames","columnNames","getRowTemplate","getDetailTemplate","getEditTemplate","editTemplateFn","getEditHeaderTemplate","editHeaderTemplateFn","getEditFooterTemplate","editFooterTemplateFn","k","isPrimaryKey","getSelectedRows","selectedRecords","getSelectedRowIndexes","selectedRowIndexes","getSelectedRowCellIndexes","selectedRowCellIndexes","getSelectedRecords","getSelectedColumnsUid","selectedColumnsIndexes","showColumns","showBy","hideColumns","hideBy","getFrozenCount","splitFrozenCount","getVisibleFrozenLeftCount","getVisibleFrozenRightCount","getVisibleMovableCount","getFrozenRightColumns","getFrozenLeftColumns","getMovableColumns","getVisibleFrozenColumns","getVisibleFrozenColumnsCount","getVisibleFrozenCount","getFilterUIInfo","visibleFrozenColumns","cnt","goToPage","pageNo","pagerModule","updateExternalMessage","message","sortColumn","columnName","direction","isMultiSort","sortModule","clearSorting","removeSortColumn","filterByColumn","fieldName","filterOperator","filterValue","predicate","matchCase","ignoreAccent","actualFilterValue","actualOperator","clearFiltering","fields","removeFilteredColsByField","isClearFilterBar","isToggle","selectRows","rowIndexes","clearSelection","selectCell","selectCellsByRange","startIndex","endIndex","search","searchString","print","printModule","deleteRecord","fieldname","editModule","startEdit","endEdit","closeEdit","addRecord","deleteRow","editCell","saveCell","updateCell","updateRow","getBatchChanges","enableToolbarItems","items","isEnable","enableItems","copy","withHeader","clipboardModule","recalcIndentWidth","indentWidth","offsetWidth","headerCol","childNodes","contentCol","perPixel","parentOffset","applyWidth","newWidth","toFixed","style","setAttribute","resetIndentWidth","removeAttribute","setWidthToColumns","minWidth","tgridWidth","getTableWidth","setMinwidthBycalculation","refreshFrozenScrollbar","textWrapSettings","wrapMode","reorderColumns","fromFName","toFName","reorderModule","reorderColumnByIndex","fromIndex","toIndex","reorderColumnByTargetIndex","reorderRows","fromIndexes","rowDragAndDropModule","refreshDataSource","disableRowDD","headerTable","contentTable","headerRows","disValue","firstElementChild","autoFitColumns","fieldNames","resizeModule","createColumnchooser","x","y","columnChooserModule","renderColumnChooser","register","localeObj","locale","valueFormatterService","flag","gCols","sCols","_loop_1","sLen","this_1","isFromGroup","showGroupedColumn","moduleName","headerTemplate","footerTemplate","parentDetails","parentKeyFieldValue","where","queryString","initForeignColumn","rendererFactory","getRenderer","createGridPopUpElement","createTooltip","dataReady","setWidth","setHeight","popup","className","styles","content","attrs","tabIndex","appendChild","gridLines","allowResizing","opensOn","getTooltipStatus","headerDivTag","htable","createTable","ctable","table","getBoundingClientRect","document","body","removeChild","mouseMoveHandler","prevElement","tagName","innerText","open","hoverFrozenRows","clipMode","scrollHandler","tag","myTableDiv","cssText","mySubDiv","myTable","myTr","mytd","onKeyPressed","action","mouseClickHandler","focusOutHandler","dblClickHandler","keyPressHandler","allowKeyboard","keyAction","keyActionHandler","eventName","tapEvent","keyDownHandler","dataBoundFunction","addEventListener","removeEventListener","getCurrentViewRecords","records","isChildGrid","touches","checkEdit","preventDefault","mode","grid","id","dataRow","display","filterClear","relatedTarget","ariaOwns","keyPress","editFormValidate","persistedData","getLocalData","dataObj","JSON","parse","isProtectedOnChange","keys_1","isArray","mergeColumns","storedColumn","storedColumns","_loop_2","localCol","tCol","this_2","commands","commandsTemplate","foreignKeyValue","presskey","cancel","stopImmediatePropagation","altKey","keyCode","collapse","focusHeader","addOutline","focusContent","setInjectedModules","injectedModules","isForeignColumn","getRowHeight","refreshColumns","fCnt","frCnt","isColFrozen","mTbl","getMovableContent","colGroup","cloneNode","insertBefore","frTbl","getFrozenRightContent","colGrp","scrollLeft","getMovableHeader","excelExport","excelExportProperties","isMultipleExport","workbook","isBlob","excelExportModule","Map","csvExport","pdfExport","pdfExportProperties","pdfDoc","pdfExportModule","groupColumn","groupModule","groupExpandAll","expandAll","groupCollapseAll","collapseAll","clearGrouping","ungroupColumn","openColumnChooser","detailCollapseAll","detailRowModule","detailExpandAll","clearCellSelection","clearRowSelection","selectCells","rowCellIndexes","selectRowsByRange","isContextMenuOpen","isOpen","ensureModuleInjected","getInjectedModules","destroyTemplate","propertyNames","loggerModule","applyBiggerTheme","getPreviousRowData","hideScroll","scrollBar","clientHeight","overflowY","mvblScrollBar","mvblChild","getRowIndexByPrimaryKey","isDetailRow","isCaptionRow","pKvalue","split","grabColumnByFieldFromAllCols","grabColumnByUidFromAllCols","getFilteredRecords","generateQuery","isRemote","getData","executeLocal","getUserAgent","userAgent","test","clearTimeout","setTimeout","getRowUid","prefix","getMovableVirtualContent","getFrozenVirtualContent","getRowElementByUID","rowEle","mRows","frozenRigtRows","frHdr","cntRows","rows_2","getHiddenColumns","calculatePageSizeByParentHeight","containerHeight","pagesize","getNoncontentHeight","Math","floor","showDropArea","getSummaryValues","summaryCol","summaryData","toLowerCase","serverExcelExport","isExcel","exportGrid","serverPdfExport","serverCsvExport","state","processQuery","queries","gridModel","sorted","setHeaderText","form","gridInput","name","stringify","method","submit","include","format","getFormat","skeleton","updateRowValue","setForeignKeyData","colpending","getForeignKeyDataState","setForeignKeyDataState","resetFilterDlgPosition","header","filterDlg","gClient","fClient","right","toString","renderTemplates","renderReactTemplates","batchUpdate","processRowChanges","batchAsyncUpdate","processBulkRowChanges","dataToBeUpdated","loopstring","keyField","assign","addedRecords","changedRecords","deletedRecords","promise","saveChanges","requiresCount","then","setNewData","oldValues","bulkRefresh","deleteRowElement","mtr","out_i_1","_loop_3","this_3","_loop_4","isRowExist","this_4","renderRowElement","mTr","modelData","generateRows","addRowObject","emptyRow","parentNode","moveTbody","mRow","clone","getHeight","Number","isInteger","getMovableHeaderTbody","getMovableContentTbody","getFrozenHeaderTbody","getFrozenRightHeaderTbody","getFrozenRightContentTbody","showResponsiveCustomFilter","isCustom","showCustomFilter","showResponsiveCustomSort","showCustomSort","showAdaptiveFilterDialog","showAdaptiveSortDialog","isColVirtualization","gridCols_1"],"mappings":"qKACMA,E,wSADFC,GACED,EAAiB,SAAuBE,EAAGC,GAW7C,OAVAH,EAAiBI,OAAOC,gBAAkB,CACxCC,UAAW,cACAC,OAAS,SAAUL,EAAGC,GACjCD,EAAEI,UAAYH,IACX,SAAUD,EAAGC,GAChB,IAAK,IAAIK,KAAKL,EACRA,EAAEM,eAAeD,KAAIN,EAAEM,GAAKL,EAAEK,MAIhBN,EAAGC,IAGpB,SAAUD,EAAGC,GAGlB,SAASO,IACPC,KAAKC,YAAcV,EAHrBF,EAAeE,EAAGC,GAMlBD,EAAEW,UAAkB,OAANV,EAAaC,OAAOU,OAAOX,IAAMO,EAAGG,UAAYV,EAAEU,UAAW,IAAIH,KAI/EK,EAAwC,SAAUC,EAAYC,EAAQC,EAAKC,GAC7E,IAEIjB,EAFAkB,EAAIC,UAAUC,OACdC,EAAIH,EAAI,EAAIH,EAAkB,OAATE,EAAgBA,EAAOf,OAAOoB,yBAAyBP,EAAQC,GAAOC,EAE/F,GAAuB,iBAAZM,SAAoD,mBAArBA,QAAQC,SAAyBH,EAAIE,QAAQC,SAASV,EAAYC,EAAQC,EAAKC,QAAW,IAAK,IAAIQ,EAAIX,EAAWM,OAAS,EAAGK,GAAK,EAAGA,KAC1KzB,EAAIc,EAAWW,MAAIJ,GAAKH,EAAI,EAAIlB,EAAEqB,GAAKH,EAAI,EAAIlB,EAAEe,EAAQC,EAAKK,GAAKrB,EAAEe,EAAQC,KAASK,GAE5F,OAAOH,EAAI,GAAKG,GAAKnB,OAAOwB,eAAeX,EAAQC,EAAKK,GAAIA,GAwC1DM,EAEJ,SAAUC,GAGR,SAASD,IACP,OAAkB,OAAXC,GAAmBA,EAAOC,MAAMpB,K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K9B,UAAW,kBAAc,GAEpDE,EAAW,EAAC,WAAU4B,EAAK9B,UAAW,uBAAmB,GAEzDE,EAAW,EAAC,WAAU4B,EAAK9B,UAAW,uBAAmB,GAEzDE,EAAW,EAAC,WAAU4B,EAAK9B,UAAW,wBAAoB,GAE1DE,EAAW,EAAC,WAAU4B,EAAK9B,UAAW,sBAAkB,GAExDE,EAAW,EAAC,WAAU4B,EAAK9B,UAAW,uBAAmB,GAEzDE,EAAW,EAAC,WAAU4B,EAAK9B,UAAW,sBAAkB,GAExDE,EAAW,EAAC,WAAU4B,EAAK9B,UAAW,kBAAc,GAEpDE,EAAW,EAAC,WAAU4B,EAAK9B,UAAW,mBAAe,GAErDE,EAAW,EAAC,WAAU4B,EAAK9B,UAAW,sBAAkB,GAExDE,EAAW,EAAC,WAAU4B,EAAK9B,UAAW,6BAAyB,GAE/DE,EAAW,EAAC,WAAU4B,EAAK9B,UAAW,uBAAmB,GAEzDE,EAAW,EAAC,WAAU4B,EAAK9B,UAAW,yBAAqB,GAE3DE,EAAW,EAAC,WAAU4B,EAAK9B,UAAW,0BAAsB,GAE5DE,EAAW,EAAC,WAAU4B,EAAK9B,UAAW,2BAAuB,GAE7DE,EAAW,EAAC,WAAU4B,EAAK9B,UAAW,6BAAyB,GAE/D8B,EAAOsC,EAASlE,EAAW,CAAC,MAAwB4B,GAxjLtD,CA0jLE","file":"6205f812-c97e77f0de4dffdbc798.js","sourcesContent":["var __extends = this && this.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n\n return _extendStatics(d, b);\n };\n\n return function (d, b) {\n _extendStatics(d, b);\n\n function __() {\n this.constructor = d;\n }\n\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n\nvar __decorate = this && this.__decorate || function (decorators, target, key, desc) {\n var c = arguments.length,\n r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,\n d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {\n if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n }\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\n\nimport { Component, ChildProperty, Browser, closest, extend } from '@syncfusion/ej2-base';\nimport { isNullOrUndefined, setValue, getValue, isBlazor } from '@syncfusion/ej2-base';\nimport { addClass, removeClass, append, remove, classList, setStyleAttribute } from '@syncfusion/ej2-base';\nimport { Property, Collection, Complex, Event, NotifyPropertyChanges, L10n } from '@syncfusion/ej2-base';\nimport { EventHandler, KeyboardEvents } from '@syncfusion/ej2-base';\nimport { DataManager, DataUtil, UrlAdaptor } from '@syncfusion/ej2-data';\nimport { createSpinner, hideSpinner, showSpinner, Tooltip } from '@syncfusion/ej2-popups';\nimport { iterateArrayOrObject, prepareColumns, parentsUntil, wrap, templateCompiler, isGroupAdaptive, refreshForeignData } from './util';\nimport { getRowHeight, setColumnIndex, Global, ispercentageWidth, renderMovable, getNumberFormat } from './util';\nimport { setRowElements, resetRowIndex, compareChanges, getCellByColAndRowIndex, performComplexDataOperation } from './util';\nimport * as events from '../base/constant';\nimport { Render } from '../renderer/render';\nimport { RenderType } from './enum';\nimport { RowRenderer } from '../renderer/row-renderer';\nimport { CellRenderer } from '../renderer/cell-renderer';\nimport { CellRendererFactory } from '../services/cell-render-factory';\nimport { ServiceLocator } from '../services/service-locator';\nimport { ValueFormatter } from '../services/value-formatter';\nimport { RendererFactory } from '../services/renderer-factory';\nimport { ColumnWidthService } from '../services/width-controller';\nimport { AriaService } from '../services/aria-service';\nimport { FocusStrategy } from '../services/focus-strategy';\nimport { PageSettings } from '../models/page-settings';\nimport { ColumnChooserSettings } from '../models/column-chooser-settings';\nimport { Selection } from '../actions/selection';\nimport { Search } from '../actions/search';\nimport { ShowHide } from '../actions/show-hide';\nimport { Scroll } from '../actions/scroll';\nimport { Print } from '../actions/print';\nimport { AggregateRow } from '../models/aggregate';\nimport { Clipboard } from '../actions/clipboard';\nimport { RowModelGenerator } from '../services/row-model-generator';\nimport * as literals from '../base/string-literals';\n/**\n * Represents the field name and direction of sort column.\n */\n\nvar SortDescriptor =\n/** @class */\nfunction (_super) {\n __extends(SortDescriptor, _super);\n\n function SortDescriptor() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n\n __decorate([Property()], SortDescriptor.prototype, \"field\", void 0);\n\n __decorate([Property()], SortDescriptor.prototype, \"direction\", void 0);\n\n __decorate([Property(false)], SortDescriptor.prototype, \"isFromGroup\", void 0);\n\n return SortDescriptor;\n}(ChildProperty);\n\nexport { SortDescriptor };\n/**\n * Configures the sorting behavior of Grid.\n */\n\nvar SortSettings =\n/** @class */\nfunction (_super) {\n __extends(SortSettings, _super);\n\n function SortSettings() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n\n __decorate([Collection([], SortDescriptor)], SortSettings.prototype, \"columns\", void 0);\n\n __decorate([Property(true)], SortSettings.prototype, \"allowUnsort\", void 0);\n\n return SortSettings;\n}(ChildProperty);\n\nexport { SortSettings };\n/**\n * Represents the predicate for the filter column.\n */\n\nvar Predicate =\n/** @class */\nfunction (_super) {\n __extends(Predicate, _super);\n\n function Predicate() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n\n __decorate([Property()], Predicate.prototype, \"field\", void 0);\n\n __decorate([Property()], Predicate.prototype, \"operator\", void 0);\n\n __decorate([Property()], Predicate.prototype, \"value\", void 0);\n\n __decorate([Property()], Predicate.prototype, \"matchCase\", void 0);\n\n __decorate([Property(false)], Predicate.prototype, \"ignoreAccent\", void 0);\n\n __decorate([Property()], Predicate.prototype, \"predicate\", void 0);\n\n __decorate([Property({})], Predicate.prototype, \"actualFilterValue\", void 0);\n\n __decorate([Property({})], Predicate.prototype, \"actualOperator\", void 0);\n\n __decorate([Property()], Predicate.prototype, \"type\", void 0);\n\n __decorate([Property()], Predicate.prototype, \"ejpredicate\", void 0);\n\n __decorate([Property()], Predicate.prototype, \"uid\", void 0);\n\n __decorate([Property()], Predicate.prototype, \"isForeignKey\", void 0);\n\n return Predicate;\n}(ChildProperty);\n\nexport { Predicate };\n/**\n * Configures the infinite scroll behavior of Grid.\n */\n\nvar InfiniteScrollSettings =\n/** @class */\nfunction (_super) {\n __extends(InfiniteScrollSettings, _super);\n\n function InfiniteScrollSettings() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n\n __decorate([Property(false)], InfiniteScrollSettings.prototype, \"enableCache\", void 0);\n\n __decorate([Property(3)], InfiniteScrollSettings.prototype, \"maxBlocks\", void 0);\n\n __decorate([Property(3)], InfiniteScrollSettings.prototype, \"initialBlocks\", void 0);\n\n return InfiniteScrollSettings;\n}(ChildProperty);\n\nexport { InfiniteScrollSettings };\n/**\n * Configures the filtering behavior of the Grid.\n */\n\nvar FilterSettings =\n/** @class */\nfunction (_super) {\n __extends(FilterSettings, _super);\n\n function FilterSettings() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n\n __decorate([Collection([], Predicate)], FilterSettings.prototype, \"columns\", void 0);\n\n __decorate([Property('FilterBar')], FilterSettings.prototype, \"type\", void 0);\n\n __decorate([Property()], FilterSettings.prototype, \"mode\", void 0);\n\n __decorate([Property(true)], FilterSettings.prototype, \"showFilterBarStatus\", void 0);\n\n __decorate([Property(1500)], FilterSettings.prototype, \"immediateModeDelay\", void 0);\n\n __decorate([Property()], FilterSettings.prototype, \"operators\", void 0);\n\n __decorate([Property(false)], FilterSettings.prototype, \"ignoreAccent\", void 0);\n\n __decorate([Property(false)], FilterSettings.prototype, \"enableCaseSensitivity\", void 0);\n\n __decorate([Property(false)], FilterSettings.prototype, \"showFilterBarOperator\", void 0);\n\n return FilterSettings;\n}(ChildProperty);\n\nexport { FilterSettings };\n/**\n * Configures the selection behavior of the Grid.\n */\n\nvar SelectionSettings =\n/** @class */\nfunction (_super) {\n __extends(SelectionSettings, _super);\n\n function SelectionSettings() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n\n __decorate([Property('Row')], SelectionSettings.prototype, \"mode\", void 0);\n\n __decorate([Property('Flow')], SelectionSettings.prototype, \"cellSelectionMode\", void 0);\n\n __decorate([Property('Single')], SelectionSettings.prototype, \"type\", void 0);\n\n __decorate([Property(false)], SelectionSettings.prototype, \"checkboxOnly\", void 0);\n\n __decorate([Property(false)], SelectionSettings.prototype, \"persistSelection\", void 0);\n\n __decorate([Property('Default')], SelectionSettings.prototype, \"checkboxMode\", void 0);\n\n __decorate([Property(false)], SelectionSettings.prototype, \"enableSimpleMultiRowSelection\", void 0);\n\n __decorate([Property(true)], SelectionSettings.prototype, \"enableToggle\", void 0);\n\n __decorate([Property(false)], SelectionSettings.prototype, \"allowColumnSelection\", void 0);\n\n return SelectionSettings;\n}(ChildProperty);\n\nexport { SelectionSettings };\n/**\n * Configures the search behavior of the Grid.\n */\n\nvar SearchSettings =\n/** @class */\nfunction (_super) {\n __extends(SearchSettings, _super);\n\n function SearchSettings() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n\n __decorate([Property([])], SearchSettings.prototype, \"fields\", void 0);\n\n __decorate([Property('')], SearchSettings.prototype, \"key\", void 0);\n\n __decorate([Property('contains')], SearchSettings.prototype, \"operator\", void 0);\n\n __decorate([Property(true)], SearchSettings.prototype, \"ignoreCase\", void 0);\n\n __decorate([Property(false)], SearchSettings.prototype, \"ignoreAccent\", void 0);\n\n return SearchSettings;\n}(ChildProperty);\n\nexport { SearchSettings };\n/**\n * Configures the row drop settings of the Grid.\n */\n\nvar RowDropSettings =\n/** @class */\nfunction (_super) {\n __extends(RowDropSettings, _super);\n\n function RowDropSettings() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n\n __decorate([Property()], RowDropSettings.prototype, \"targetID\", void 0);\n\n return RowDropSettings;\n}(ChildProperty);\n\nexport { RowDropSettings };\n/**\n * Configures the text wrap settings of the Grid.\n */\n\nvar TextWrapSettings =\n/** @class */\nfunction (_super) {\n __extends(TextWrapSettings, _super);\n\n function TextWrapSettings() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n\n __decorate([Property('Both')], TextWrapSettings.prototype, \"wrapMode\", void 0);\n\n return TextWrapSettings;\n}(ChildProperty);\n\nexport { TextWrapSettings };\n/**\n * Configures the resize behavior of the Grid.\n */\n\nvar ResizeSettings =\n/** @class */\nfunction (_super) {\n __extends(ResizeSettings, _super);\n\n function ResizeSettings() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n\n __decorate([Property('Normal')], ResizeSettings.prototype, \"mode\", void 0);\n\n return ResizeSettings;\n}(ChildProperty);\n\nexport { ResizeSettings };\n/**\n * Configures the group behavior of the Grid.\n */\n\nvar GroupSettings =\n/** @class */\nfunction (_super) {\n __extends(GroupSettings, _super);\n\n function GroupSettings() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n\n __decorate([Property(true)], GroupSettings.prototype, \"showDropArea\", void 0);\n\n __decorate([Property(false)], GroupSettings.prototype, \"allowReordering\", void 0);\n\n __decorate([Property(false)], GroupSettings.prototype, \"showToggleButton\", void 0);\n\n __decorate([Property(false)], GroupSettings.prototype, \"showGroupedColumn\", void 0);\n\n __decorate([Property(true)], GroupSettings.prototype, \"showUngroupButton\", void 0);\n\n __decorate([Property(false)], GroupSettings.prototype, \"disablePageWiseAggregates\", void 0);\n\n __decorate([Property([])], GroupSettings.prototype, \"columns\", void 0);\n\n __decorate([Property()], GroupSettings.prototype, \"captionTemplate\", void 0);\n\n __decorate([Property(false)], GroupSettings.prototype, \"enableLazyLoading\", void 0);\n\n return GroupSettings;\n}(ChildProperty);\n\nexport { GroupSettings };\n/**\n * Configures the edit behavior of the Grid.\n */\n\nvar EditSettings =\n/** @class */\nfunction (_super) {\n __extends(EditSettings, _super);\n\n function EditSettings() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n\n __decorate([Property(false)], EditSettings.prototype, \"allowAdding\", void 0);\n\n __decorate([Property(false)], EditSettings.prototype, \"allowEditing\", void 0);\n\n __decorate([Property(false)], EditSettings.prototype, \"allowDeleting\", void 0);\n\n __decorate([Property('Normal')], EditSettings.prototype, \"mode\", void 0);\n\n __decorate([Property(true)], EditSettings.prototype, \"allowEditOnDblClick\", void 0);\n\n __decorate([Property(true)], EditSettings.prototype, \"showConfirmDialog\", void 0);\n\n __decorate([Property(false)], EditSettings.prototype, \"showDeleteConfirmDialog\", void 0);\n\n __decorate([Property('')], EditSettings.prototype, \"template\", void 0);\n\n __decorate([Property('')], EditSettings.prototype, \"headerTemplate\", void 0);\n\n __decorate([Property('')], EditSettings.prototype, \"footerTemplate\", void 0);\n\n __decorate([Property('Top')], EditSettings.prototype, \"newRowPosition\", void 0);\n\n __decorate([Property({})], EditSettings.prototype, \"dialog\", void 0);\n\n __decorate([Property(false)], EditSettings.prototype, \"allowNextRowEdit\", void 0);\n\n return EditSettings;\n}(ChildProperty);\n\nexport { EditSettings };\n/**\n * Represents the Grid component.\n * ```html\n *
\n * \n * ```\n */\n\nvar Grid =\n/** @class */\nfunction (_super) {\n __extends(Grid, _super);\n /**\n * Constructor for creating the component\n * @hidden\n */\n\n\n function Grid(options, element) {\n var _this = _super.call(this, options, element) || this;\n\n _this.isPreventScrollEvent = false;\n _this.inViewIndexes = [];\n _this.keyA = false;\n _this.frozenRightCount = 0;\n _this.frozenLeftCount = 0;\n _this.tablesCount = 1;\n _this.movableCount = 0;\n _this.visibleFrozenLeft = 0;\n _this.visibleFrozenRight = 0;\n _this.visibleMovable = 0;\n _this.frozenLeftColumns = [];\n _this.frozenRightColumns = [];\n _this.movableColumns = [];\n _this.media = {};\n _this.isFreezeRefresh = false;\n /** @hidden */\n\n _this.tableIndex = 0;\n _this.componentRefresh = Component.prototype.refresh;\n /** @hidden */\n\n _this.isVirtualAdaptive = false;\n /** @hidden */\n\n _this.vRows = [];\n /** @hidden */\n\n _this.vcRows = [];\n /** @hidden */\n\n _this.vGroupOffsets = {};\n /** @hidden */\n\n _this.rowUid = 0;\n /**\n * Gets the currently visible records of the Grid.\n */\n\n _this.currentViewData = [];\n /** @hidden */\n\n _this.lockcolPositionCount = 0;\n /** @hidden */\n\n _this.prevPageMoving = false;\n /** @hidden */\n\n _this.pageTemplateChange = false;\n /** @hidden */\n\n _this.isAutoGen = false;\n _this.mediaBindInstance = {};\n /** @hidden */\n\n _this.commandDelIndex = undefined;\n /** @hidden */\n\n _this.asyncTimeOut = 50; // enable/disable logger for MVC & Core\n\n _this.enableLogger = true;\n _this.needsID = true;\n Grid_1.Inject(Selection);\n setValue('mergePersistData', _this.mergePersistGridData, _this);\n return _this;\n }\n\n Grid_1 = Grid;\n /**\n * Get the properties to be maintained in the persisted state.\n * @return {string}\n */\n\n Grid.prototype.getPersistData = function () {\n var keyEntity = ['pageSettings', 'sortSettings', 'filterSettings', 'groupSettings', 'columns', 'searchSettings', 'selectedRowIndex', 'scrollPosition'];\n var ignoreOnPersist = {\n pageSettings: ['template', 'pageSizes', 'enableQueryString', 'totalRecordsCount', 'pageCount'],\n filterSettings: ['type', 'mode', 'showFilterBarStatus', 'immediateModeDelay', 'ignoreAccent'],\n groupSettings: ['showDropArea', 'showToggleButton', 'showGroupedColumn', 'showUngroupButton', 'disablePageWiseAggregates', 'hideCaptionCount'],\n searchSettings: ['fields', 'operator', 'ignoreCase'],\n sortSettings: [],\n columns: [],\n selectedRowIndex: [],\n scrollPosition: []\n };\n var ignoreOnColumn = ['filter', 'edit', 'filterBarTemplate', 'headerTemplate', 'template', 'commandTemplate', 'commands', 'dataSource', 'headerText'];\n\n for (var i = 0; i < keyEntity.length; i++) {\n var currentObject = this[keyEntity[i]];\n\n for (var _i = 0, _a = ignoreOnPersist[keyEntity[i]]; _i < _a.length; _i++) {\n var val = _a[_i];\n delete currentObject[val];\n }\n }\n\n this.pageSettings.template = undefined;\n /* tslint:disable-next-line:no-any */\n\n if (this.isAngular) {\n /* tslint:disable:no-string-literal */\n delete this.groupSettings['properties']['captionTemplate'];\n }\n\n this.pageTemplateChange = !isNullOrUndefined(this.pagerTemplate);\n return this.addOnPersist(keyEntity);\n };\n /**\n * To provide the array of modules needed for component rendering\n * @return {ModuleDeclaration[]}\n * @hidden\n */\n // tslint:disable-next-line:max-func-body-length\n\n\n Grid.prototype.requiredModules = function () {\n this.setFrozenCount();\n var modules = [];\n\n if (this.isDestroyed) {\n return modules;\n }\n\n if (this.allowFiltering) {\n modules.push({\n member: 'filter',\n args: [this, this.filterSettings, this.serviceLocator]\n });\n }\n\n if (this.allowExcelExport) {\n modules.push({\n member: 'ExcelExport',\n args: [this, this.serviceLocator]\n });\n }\n\n if (this.allowPdfExport) {\n modules.push({\n member: 'PdfExport',\n args: [this]\n });\n }\n\n if (this.allowSorting) {\n modules.push({\n member: 'sort',\n args: [this, this.sortSettings, this.sortedColumns, this.serviceLocator]\n });\n }\n\n if (this.allowPaging) {\n modules.push({\n member: 'pager',\n args: [this, this.pageSettings]\n });\n }\n\n if (this.allowSelection) {\n modules.push({\n member: 'selection',\n args: [this, this.selectionSettings, this.serviceLocator]\n });\n }\n\n modules.push({\n member: 'resize',\n args: [this]\n });\n\n if (this.allowReordering) {\n modules.push({\n member: 'reorder',\n args: [this]\n });\n }\n\n if (this.allowRowDragAndDrop) {\n modules.push({\n member: 'rowDragAndDrop',\n args: [this]\n });\n }\n\n if (this.allowGrouping) {\n modules.push({\n member: 'group',\n args: [this, this.groupSettings, this.sortedColumns, this.serviceLocator]\n });\n }\n\n if (this.aggregates.length) {\n modules.push({\n member: 'aggregate',\n args: [this, this.serviceLocator]\n });\n }\n\n if (this.isDetail()) {\n modules.push({\n member: 'detailRow',\n args: [this, this.serviceLocator]\n });\n }\n\n if (this.toolbar || this.toolbarTemplate) {\n modules.push({\n member: 'toolbar',\n args: [this, this.serviceLocator]\n });\n }\n\n if (this.enableVirtualization || this.enableColumnVirtualization) {\n modules.push({\n member: 'virtualscroll',\n args: [this, this.serviceLocator]\n });\n }\n\n if (this.getFrozenColumns() || this.frozenRows || this.frozenRightCount || this.frozenLeftCount) {\n modules.push({\n member: 'freeze',\n args: [this, this.serviceLocator]\n });\n }\n\n if (this.isCommandColumn(this.columns)) {\n modules.push({\n member: 'commandColumn',\n args: [this, this.serviceLocator]\n });\n }\n\n if (this.editSettings.allowAdding || this.editSettings.allowDeleting || this.editSettings.allowEditing) {\n modules.push({\n member: 'edit',\n args: [this, this.serviceLocator]\n });\n }\n\n this.extendRequiredModules(modules);\n return modules;\n };\n\n Grid.prototype.extendRequiredModules = function (modules) {\n if (this.enableInfiniteScrolling) {\n modules.push({\n member: 'infiniteScroll',\n args: [this, this.serviceLocator]\n });\n }\n\n if (this.groupSettings.enableLazyLoading) {\n modules.push({\n member: 'lazyLoadGroup',\n args: [this, this.serviceLocator]\n });\n }\n\n if (this.contextMenuItems) {\n modules.push({\n member: 'contextMenu',\n args: [this, this.serviceLocator]\n });\n }\n\n if (this.showColumnMenu) {\n modules.push({\n member: 'columnMenu',\n args: [this, this.serviceLocator]\n });\n }\n\n if (this.showColumnChooser) {\n modules.push({\n member: 'columnChooser',\n args: [this, this.serviceLocator]\n });\n }\n\n if (this.isForeignKeyEnabled(this.columns)) {\n modules.push({\n member: 'foreignKey',\n args: [this, this.serviceLocator]\n });\n }\n\n if (this.enableLogger) {\n modules.push({\n member: 'logger',\n args: [this]\n });\n }\n };\n /**\n * For internal use only - Initialize the event handler;\n * @private\n */\n\n\n Grid.prototype.preRender = function () {\n this.serviceLocator = new ServiceLocator();\n this.initProperties();\n this.initializeServices();\n };\n\n Grid.prototype.initProperties = function () {\n /* tslint:disable */\n this.isInitial = true;\n this.sortedColumns = [];\n this.inViewIndexes = [];\n this.mediaCol = [];\n this.isInitialLoad = false;\n this.allowServerDataBinding = false;\n this.ignoreCollectionWatch = true;\n this.mergeCells = {};\n this.isEdit = false;\n this.checkAllRows = 'None';\n this.isCheckBoxSelection = false;\n this.isPersistSelection = false;\n this.componentRefresh = Component.prototype.refresh;\n this.filterOperators = {\n contains: 'contains',\n endsWith: 'endswith',\n equal: 'equal',\n greaterThan: 'greaterthan',\n greaterThanOrEqual: 'greaterthanorequal',\n lessThan: 'lessthan',\n lessThanOrEqual: 'lessthanorequal',\n notEqual: 'notequal',\n startsWith: 'startswith'\n };\n this.defaultLocale = {\n EmptyRecord: 'No records to display',\n True: 'true',\n False: 'false',\n InvalidFilterMessage: 'Invalid Filter Data',\n GroupDropArea: 'Drag a column header here to group its column',\n UnGroup: 'Click here to ungroup',\n UnGroupButton: 'Click here to ungroup',\n GroupDisable: 'Grouping is disabled for this column',\n FilterbarTitle: '\\'s filter bar cell',\n EmptyDataSourceError: 'DataSource must not be empty at initial load since columns are generated from dataSource in AutoGenerate Column Grid',\n // Toolbar Items\n Add: 'Add',\n Edit: 'Edit',\n Cancel: 'Cancel',\n Update: 'Update',\n Delete: 'Delete',\n Print: 'Print',\n Pdfexport: 'PDF Export',\n Excelexport: 'Excel Export',\n Wordexport: 'Word Export',\n Csvexport: 'CSV Export',\n Search: 'Search',\n Columnchooser: 'Columns',\n Save: 'Save',\n Item: 'item',\n Items: 'items',\n EditOperationAlert: 'No records selected for edit operation',\n DeleteOperationAlert: 'No records selected for delete operation',\n SaveButton: 'Save',\n OKButton: 'OK',\n CancelButton: 'Cancel',\n EditFormTitle: 'Details of ',\n AddFormTitle: 'Add New Record',\n BatchSaveConfirm: 'Are you sure you want to save changes?',\n BatchSaveLostChanges: 'Unsaved changes will be lost. Are you sure you want to continue?',\n ConfirmDelete: 'Are you sure you want to Delete Record?',\n CancelEdit: 'Are you sure you want to Cancel the changes?',\n ChooseColumns: 'Choose Column',\n SearchColumns: 'search columns',\n Matchs: 'No matches found',\n FilterButton: 'Filter',\n ClearButton: 'Clear',\n StartsWith: 'Starts With',\n EndsWith: 'Ends With',\n Contains: 'Contains',\n Equal: 'Equal',\n NotEqual: 'Not Equal',\n LessThan: 'Less Than',\n LessThanOrEqual: 'Less Than Or Equal',\n GreaterThan: 'Greater Than',\n GreaterThanOrEqual: 'Greater Than Or Equal',\n ChooseDate: 'Choose a Date',\n EnterValue: 'Enter the value',\n Copy: 'Copy',\n Group: 'Group by this column',\n Ungroup: 'Ungroup by this column',\n autoFitAll: 'Autofit all columns',\n autoFit: 'Autofit this column',\n AutoFitAll: 'Autofit all columns',\n AutoFit: 'Autofit this column',\n Export: 'Export',\n FirstPage: 'First Page',\n LastPage: 'Last Page',\n PreviousPage: 'Previous Page',\n NextPage: 'Next Page',\n SortAscending: 'Sort Ascending',\n SortDescending: 'Sort Descending',\n EditRecord: 'Edit Record',\n DeleteRecord: 'Delete Record',\n FilterMenu: 'Filter',\n SelectAll: 'Select All',\n Blanks: 'Blanks',\n FilterTrue: 'True',\n FilterFalse: 'False',\n NoResult: 'No matches found',\n ClearFilter: 'Clear Filter',\n Clear: 'Clear',\n NumberFilter: 'Number Filters',\n TextFilter: 'Text Filters',\n DateFilter: 'Date Filters',\n DateTimeFilter: 'DateTime Filters',\n MatchCase: 'Match Case',\n Between: 'Between',\n CustomFilter: 'Custom Filter',\n CustomFilterPlaceHolder: 'Enter the value',\n CustomFilterDatePlaceHolder: 'Choose a date',\n AND: 'AND',\n OR: 'OR',\n ShowRowsWhere: 'Show rows where:',\n FilterMenuDialogARIA: 'Filter menu dialog',\n ExcelFilterDialogARIA: 'Excel filter dialog',\n DialogEditARIA: 'Edit dialog',\n ColumnChooserDialogARIA: 'Column chooser dialog',\n ColumnMenuDialogARIA: 'Column menu dialog',\n CustomFilterDialogARIA: 'Customer filter dialog',\n SortAtoZ: 'Sort A to Z',\n SortZtoA: 'Sort Z to A',\n SortByOldest: 'Sort by Oldest',\n SortByNewest: 'Sort by Newest',\n SortSmallestToLargest: 'Sort Smallest to Largest',\n SortLargestToSmallest: 'Sort Largest to Smallest',\n Sort: 'Sort'\n };\n this.keyConfigs = {\n downArrow: 'downarrow',\n upArrow: 'uparrow',\n rightArrow: 'rightarrow',\n leftArrow: 'leftarrow',\n shiftDown: 'shift+downarrow',\n shiftUp: 'shift+uparrow',\n shiftRight: 'shift+rightarrow',\n shiftLeft: 'shift+leftarrow',\n home: 'home',\n end: 'end',\n escape: 'escape',\n ctrlHome: 'ctrl+home',\n ctrlEnd: 'ctrl+end',\n pageUp: 'pageup',\n pageDown: 'pagedown',\n ctrlAltPageUp: 'ctrl+alt+pageup',\n ctrlAltPageDown: 'ctrl+alt+pagedown',\n altPageUp: 'alt+pageup',\n altPageDown: 'alt+pagedown',\n altDownArrow: 'alt+downarrow',\n altUpArrow: 'alt+uparrow',\n ctrlDownArrow: 'ctrl+downarrow',\n ctrlUpArrow: 'ctrl+uparrow',\n ctrlPlusA: 'ctrl+A',\n ctrlPlusP: 'ctrl+P',\n insert: 'insert',\n delete: 'delete',\n f2: 'f2',\n enter: 'enter',\n ctrlEnter: 'ctrl+enter',\n shiftEnter: 'shift+enter',\n tab: 'tab',\n shiftTab: 'shift+tab',\n space: 'space',\n ctrlPlusC: 'ctrl+C',\n ctrlShiftPlusH: 'ctrl+shift+H',\n ctrlSpace: 'ctrl+space',\n ctrlLeftArrow: 'ctrl+leftarrow',\n ctrlRightArrow: 'ctrl+rightarrow'\n };\n /* tslint:enable */\n };\n /**\n * For internal use only - To Initialize the component rendering.\n * @private\n */\n\n\n Grid.prototype.render = function () {\n this.log(['module_missing', 'promise_enabled', 'locale_missing', 'check_datasource_columns']);\n this.ariaService.setOptions(this.element, {\n role: 'grid'\n });\n createSpinner({\n target: this.element\n }, this.createElement);\n this.renderModule = new Render(this, this.serviceLocator);\n this.searchModule = new Search(this);\n this.scrollModule = new Scroll(this);\n this.notify(events.initialLoad, {});\n\n if (this.getDataModule().dataManager.dataSource.offline === true || this.getDataModule().dataManager.dataSource.url === undefined) {\n this.isVirtualAdaptive = true;\n }\n\n this.trigger(events.load);\n prepareColumns(this.columns, this.enableColumnVirtualization, this);\n\n if (this.enablePersistence) {\n this.notify(events.columnsPrepared, {});\n }\n\n this.getMediaColumns();\n setColumnIndex(this.columns);\n this.checkLockColumns(this.columns);\n this.getColumns();\n this.processModel();\n this.gridRender();\n this.wireEvents();\n this.addListener();\n this.updateDefaultCursor();\n this.updateStackedFilter();\n this.showSpinner();\n this.notify(events.initialEnd, {});\n };\n /**\n * By default, grid shows the spinner for all its actions. You can use this method to show spinner at your needed time.\n */\n\n\n Grid.prototype.showSpinner = function () {\n showSpinner(this.element);\n };\n /**\n * Manually showed spinner needs to hide by `hideSpinnner`.\n */\n\n\n Grid.prototype.hideSpinner = function () {\n hideSpinner(this.element);\n };\n\n Grid.prototype.updateStackedFilter = function () {\n if (this.allowFiltering && this.filterSettings.type === 'FilterBar' && this.getHeaderContent().getElementsByClassName('e-stackedheadercell').length) {\n this.getHeaderContent().classList.add('e-stackedfilter');\n } else {\n this.getHeaderContent().classList.remove('e-stackedfilter');\n }\n };\n\n Grid.prototype.getMediaColumns = function () {\n if (!this.enableColumnVirtualization) {\n var gcol = this.getColumns();\n this.getShowHideService = this.serviceLocator.getService('showHideService');\n\n if (!isNullOrUndefined(gcol)) {\n for (var index = 0; index < gcol.length; index++) {\n if (!isNullOrUndefined(gcol[index].hideAtMedia) && (isNullOrUndefined(gcol[index].visible) || gcol[index].visible)) {\n this.pushMediaColumn(gcol[index], index);\n }\n }\n }\n }\n };\n\n Grid.prototype.pushMediaColumn = function (col, index) {\n this.mediaCol.push(col);\n this.media[col.uid] = window.matchMedia(col.hideAtMedia);\n this.mediaQueryUpdate(index, this.media[col.uid]);\n this.mediaBindInstance[index] = this.mediaQueryUpdate.bind(this, index);\n this.media[col.uid].addListener(this.mediaBindInstance[index]);\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.updateMediaColumns = function (col) {\n if (!this.enableColumnVirtualization) {\n var index = this.getColumnIndexByUid(col.uid);\n\n for (var i = 0; i < this.mediaCol.length; i++) {\n if (col.uid === this.mediaCol[i].uid) {\n this.mediaCol.splice(i, 1);\n return;\n }\n }\n\n this.pushMediaColumn(col, index);\n }\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.mediaQueryUpdate = function (columnIndex, e) {\n var col = this.getColumns()[columnIndex];\n\n if (this.mediaCol.some(function (mediaColumn) {\n return mediaColumn.uid === col.uid;\n })) {\n col.visible = e.matches;\n\n if (this.isInitialLoad) {\n this.invokedFromMedia = true;\n\n if (col.visible) {\n this.showHider.show(col.headerText, 'headerText');\n } else {\n this.showHider.hide(col.headerText, 'headerText');\n }\n }\n }\n };\n\n Grid.prototype.refreshMediaCol = function () {\n this.isInitialLoad = true;\n var footerContent = this.element.querySelector('.' + literals.gridFooter);\n\n if (this.aggregates.length && this.element.scrollHeight > this.height && footerContent) {\n addClass([footerContent], ['e-footerpadding']);\n }\n\n var checkboxColumn = this.getColumns().filter(function (col) {\n return col.type === 'checkbox';\n });\n\n if (checkboxColumn.length && this.selectionSettings.checkboxMode === 'ResetOnRowClick') {\n this.isCheckBoxSelection = false;\n }\n\n if (this.rowRenderingMode === 'Vertical') {\n if (this.enableHover) {\n this.setProperties({\n enableAdaptiveUI: true,\n enableHover: false\n }, true);\n removeClass([this.element], 'e-gridhover');\n }\n }\n };\n\n Grid.prototype.removeMediaListener = function () {\n for (var i = 0; i < this.mediaCol.length; i++) {\n this.media[this.mediaCol[i].uid].removeListener(this.mediaBindInstance[this.mediaCol[i].index]);\n }\n };\n /**\n * For internal use only - Initialize the event handler\n * @private\n */\n\n\n Grid.prototype.eventInitializer = function () {//eventInitializer\n };\n /**\n * Destroys the component (detaches/removes all event handlers, attributes, classes, and empties the component element).\n * @method destroy\n * @return {void}\n */\n\n\n Grid.prototype.destroy = function () {\n var gridElement = this.element;\n\n if (!gridElement) {\n return;\n }\n\n var hasGridChild = gridElement.querySelector('.' + literals.gridHeader) && gridElement.querySelector('.' + literals.gridContent) ? true : false;\n\n if (hasGridChild) {\n this.unwireEvents();\n }\n\n this.removeListener();\n this.removeMediaListener();\n this.notify(events.destroy, {});\n this.destroyDependentModules();\n\n if (hasGridChild) {\n _super.prototype.destroy.call(this);\n }\n\n this.toolTipObj.destroy();\n var modules = ['renderModule', 'headerModule', 'contentModule', 'valueFormatterService', 'serviceLocator', 'ariaService', 'keyboardModule', 'widthService', 'searchModule', 'showHider', 'scrollModule', 'printModule', 'clipboardModule', 'focusModule'];\n\n for (var i = 0; i < modules.length; i++) {\n if (this[modules[i]]) {\n this[modules[i]] = null;\n }\n }\n\n this.element.innerHTML = '';\n classList(this.element, [], ['e-rtl', 'e-gridhover', 'e-responsive', 'e-default', 'e-device', 'e-grid-min-height']);\n\n if (this.isAngular && !this.isFreezeRefresh) {\n this.element = null;\n }\n\n this.isFreezeRefresh = false;\n };\n\n Grid.prototype.destroyDependentModules = function () {\n var gridElement = this.element;\n\n if (!gridElement || !gridElement.querySelector('.' + literals.gridHeader) && !gridElement.querySelector('.' + literals.gridContent)) {\n return;\n }\n\n this.scrollModule.destroy();\n this.keyboardModule.destroy();\n this.focusModule.destroy();\n };\n /**\n * For internal use only - Get the module name.\n * @private\n */\n\n\n Grid.prototype.getModuleName = function () {\n return 'grid';\n };\n\n Grid.prototype.enableBoxSelection = function () {\n if (this.enableAutoFill) {\n this.selectionSettings.cellSelectionMode = 'BoxWithBorder';\n this.element.classList.add('e-afenabled');\n } else {\n this.element.classList.remove('e-afenabled');\n }\n };\n /**\n * Called internally if any of the property value changed.\n * @hidden\n */\n\n /* tslint:disable-next-line:max-line-length */\n // tslint:disable-next-line:max-func-body-length\n\n\n Grid.prototype.onPropertyChanged = function (newProp, oldProp) {\n var requireRefresh = false;\n var requireGridRefresh = false;\n var freezeRefresh = false;\n var checkCursor;\n var args = {\n requestType: 'refresh'\n };\n\n if (this.isDestroyed) {\n return;\n }\n\n this.log('module_missing');\n\n if (this.isEllipsisTooltip()) {\n this.toolTipObj.close();\n }\n\n var properties = Object.keys(newProp);\n\n if (properties.indexOf('columns') > -1) {\n this.updateColumnObject();\n requireGridRefresh = true;\n }\n\n for (var _i = 0, properties_1 = properties; _i < properties_1.length; _i++) {\n var prop = properties_1[_i];\n\n switch (prop) {\n case 'allowPaging':\n this.notify(events.uiUpdate, {\n module: 'pager',\n enable: this.allowPaging\n });\n requireRefresh = true;\n break;\n\n case 'pageSettings':\n if (this.pageTemplateChange) {\n this.pageTemplateChange = false;\n this.notify(events.inBoundModelChanged, {\n module: 'pager',\n properties: newProp.pageSettings\n });\n break;\n }\n\n this.notify(events.inBoundModelChanged, {\n module: 'pager',\n properties: newProp.pageSettings\n });\n\n if (isNullOrUndefined(newProp.pageSettings.currentPage) && isNullOrUndefined(newProp.pageSettings.pageSize) && isNullOrUndefined(newProp.pageSettings.totalRecordsCount) || !isNullOrUndefined(oldProp.pageSettings) && newProp.pageSettings.currentPage !== oldProp.pageSettings.currentPage && !this.enableColumnVirtualization && !this.enableVirtualization && this.pageSettings.totalRecordsCount <= this.pageSettings.pageSize) {\n requireRefresh = true;\n }\n\n break;\n\n case 'allowSorting':\n this.notify(events.uiUpdate, {\n module: 'sort',\n enable: this.allowSorting\n });\n requireRefresh = true;\n checkCursor = true;\n break;\n\n case 'allowFiltering':\n this.updateStackedFilter();\n this.notify(events.uiUpdate, {\n module: 'filter',\n enable: this.allowFiltering\n });\n requireRefresh = true;\n\n if (this.filterSettings.type !== 'FilterBar') {\n this.refreshHeader();\n }\n\n break;\n\n case 'height':\n case 'width':\n this.notify(events.uiUpdate, {\n module: 'scroll',\n properties: {\n width: newProp.width,\n height: newProp.height\n }\n });\n break;\n\n case 'allowReordering':\n this.headerModule.refreshUI();\n checkCursor = true;\n break;\n\n case 'allowRowDragAndDrop':\n this.notify(events.uiUpdate, {\n module: 'rowDragAndDrop',\n enable: this.allowRowDragAndDrop\n });\n this.renderModule.refresh();\n this.headerModule.refreshUI();\n break;\n\n case 'allowSelection':\n this.notify(events.uiUpdate, {\n module: 'selection',\n enable: this.allowSelection\n });\n break;\n\n case 'enableAutoFill':\n if (this.selectionModule) {\n this.enableBoxSelection();\n this.selectionModule.updateAutoFillPosition();\n }\n\n break;\n\n case 'rowTemplate':\n this.rowTemplateFn = templateCompiler(this.rowTemplate);\n requireRefresh = true;\n break;\n\n case 'detailTemplate':\n this.detailTemplateFn = templateCompiler(this.detailTemplate);\n requireRefresh = true;\n break;\n\n case 'allowGrouping':\n this.notify(events.uiUpdate, {\n module: 'group',\n enable: this.allowGrouping\n });\n this.headerModule.refreshUI();\n requireRefresh = true;\n checkCursor = true;\n break;\n\n case 'enableInfiniteScrolling':\n case 'childGrid':\n requireRefresh = true;\n break;\n\n case 'toolbar':\n this.notify(events.uiUpdate, {\n module: 'toolbar'\n });\n break;\n\n case 'groupSettings':\n this.notify(events.inBoundModelChanged, {\n module: 'group',\n properties: newProp.groupSettings,\n oldProperties: oldProp.groupSettings\n });\n break;\n\n case 'aggregates':\n if (!this.aggregates.length && this.allowGrouping && this.groupSettings.columns.length) {\n requireRefresh = true;\n }\n\n this.notify(events.uiUpdate, {\n module: 'aggregate',\n properties: newProp\n });\n break;\n\n case 'frozenColumns':\n case 'frozenRows':\n case 'enableVirtualization':\n case 'currencyCode':\n case 'locale':\n this.log('frozen_rows_columns');\n freezeRefresh = true;\n requireGridRefresh = true;\n break;\n\n case 'query':\n if (!this.getDataModule().isQueryInvokedFromData) {\n requireRefresh = true;\n }\n\n this.getDataModule().isQueryInvokedFromData = false;\n break;\n\n default:\n this.extendedPropertyChange(prop, newProp, requireGridRefresh);\n }\n }\n\n if (checkCursor) {\n this.updateDefaultCursor();\n }\n\n if (requireGridRefresh) {\n if (freezeRefresh || this.getFrozenColumns() || this.frozenRows) {\n if (!(isBlazor() && this.isServerRendered)) {\n this.freezeRefresh();\n }\n } else {\n this.refresh();\n }\n } else if (requireRefresh) {\n this.notify(events.modelChanged, args);\n requireRefresh = false;\n this.maintainSelection(newProp.selectedRowIndex);\n }\n };\n /* tslint:disable */\n\n\n Grid.prototype.extendedPropertyChange = function (prop, newProp, requireGridRefresh) {\n switch (prop) {\n case 'enableRtl':\n this.updateRTL();\n\n if (this.allowPaging) {\n this.element.querySelector('.e-gridpager').ej2_instances[0].enableRtl = newProp.enableRtl;\n this.element.querySelector('.e-gridpager').ej2_instances[0].dataBind();\n }\n\n if (this.height !== 'auto') {\n this.scrollModule.removePadding(!newProp.enableRtl);\n this.scrollModule.setPadding();\n }\n\n if (this.toolbar && this.toolbarModule) {\n this.toolbarModule.getToolbar().ej2_instances[0].enableRtl = newProp.enableRtl;\n this.toolbarModule.getToolbar().ej2_instances[0].dataBind();\n }\n\n if (this.contextMenuItems && this.contextMenuModule) {\n this.contextMenuModule.getContextMenu().ej2_instances[0].enableRtl = newProp.enableRtl;\n this.contextMenuModule.getContextMenu().ej2_instances[0].dataBind();\n }\n\n if (this.showColumnMenu && this.columnMenuModule) {\n this.columnMenuModule.getColumnMenu().ej2_instances[0].enableRtl = newProp.enableRtl;\n this.columnMenuModule.getColumnMenu().ej2_instances[0].dataBind();\n }\n\n if (this.filterSettings.type === 'FilterBar' && this.filterSettings.showFilterBarOperator) {\n this.refreshHeader();\n }\n\n this.notify(events.rtlUpdated, {});\n break;\n\n case 'enableAltRow':\n this.renderModule.refresh();\n break;\n\n case 'allowResizing':\n this.headerModule.refreshUI();\n this.updateResizeLines();\n break;\n\n case 'rowHeight':\n if (this.rowHeight) {\n addClass([this.element], 'e-grid-min-height');\n } else {\n removeClass([this.element], 'e-grid-min-height');\n }\n\n this.renderModule.refresh();\n this.headerModule.refreshUI();\n break;\n\n case 'gridLines':\n this.updateGridLines();\n break;\n\n case 'showColumnMenu':\n this.headerModule.refreshUI();\n this.notify(events.uiUpdate, {\n module: 'columnMenu',\n enable: true\n });\n break;\n\n case 'columnMenuItems':\n this.notify(events.uiUpdate, {\n module: 'columnMenu',\n enable: this.columnMenuItems\n });\n break;\n\n case 'contextMenuItems':\n this.notify(events.uiUpdate, {\n module: 'contextMenu',\n enable: this.contextMenuItems\n });\n break;\n\n case 'showColumnChooser':\n this.notify(events.uiUpdate, {\n module: 'columnChooser',\n enable: this.showColumnChooser\n });\n break;\n\n case 'filterSettings':\n this.updateStackedFilter();\n this.notify(events.inBoundModelChanged, {\n module: 'filter',\n properties: newProp.filterSettings\n });\n break;\n\n case 'searchSettings':\n this.notify(events.inBoundModelChanged, {\n module: 'search',\n properties: newProp.searchSettings\n });\n break;\n\n case 'sortSettings':\n this.notify(events.inBoundModelChanged, {\n module: 'sort'\n });\n break;\n\n case 'selectionSettings':\n this.notify(events.inBoundModelChanged, {\n module: 'selection',\n properties: newProp.selectionSettings\n });\n break;\n\n case 'editSettings':\n this.notify(events.inBoundModelChanged, {\n module: 'edit',\n properties: newProp.editSettings\n });\n break;\n\n case 'allowTextWrap':\n case 'textWrapSettings':\n if (this.allowTextWrap) {\n this.applyTextWrap();\n } else {\n this.removeTextWrap();\n }\n\n this.notify(events.freezeRender, {\n case: 'textwrap',\n isModeChg: prop === 'textWrapSettings'\n });\n break;\n\n case 'dataSource':\n var pending_1 = this.getDataModule().getState();\n\n if (Object.getPrototypeOf(newProp).deepWatch) {\n var pKeyField = this.getPrimaryKeyFieldNames()[0];\n\n for (var i = 0, props = Object.keys(newProp.dataSource); i < props.length; i++) {\n this.setRowData(getValue(pKeyField, this.dataSource[props[i]]), this.dataSource[props[i]]);\n }\n } else if (pending_1.isPending) {\n var gResult = !isNullOrUndefined(this.dataSource) ? this.dataSource.result : [];\n var names = pending_1.group || [];\n\n for (var i = 0; i < names.length; i++) {\n gResult = DataUtil.group(gResult, names[i], pending_1.aggregates || []);\n }\n\n this.dataSource = {\n result: gResult,\n count: this.dataSource.count,\n aggregates: this.dataSource.aggregates\n };\n this.getDataModule().setState({});\n pending_1.resolver(this.dataSource);\n } else {\n this.getDataModule().setState({\n isDataChanged: false\n });\n this.notify(events.dataSourceModified, {});\n\n if (!requireGridRefresh) {\n this.renderModule.refresh();\n\n if (this.isCheckBoxSelection) {\n this.notify(events.beforeRefreshOnDataChange, {});\n }\n }\n }\n\n this.scrollRefresh();\n break;\n\n case 'enableHover':\n var action = newProp.enableHover ? addClass : removeClass;\n action([this.element], 'e-gridhover');\n break;\n\n case 'selectedRowIndex':\n if (!this.isSelectedRowIndexUpdating) {\n this.selectRow(newProp.selectedRowIndex);\n }\n\n this.isSelectedRowIndexUpdating = false;\n break;\n\n case 'resizeSettings':\n this.widthService.setWidthToTable();\n break;\n\n case 'enableAdaptiveUI':\n this.notify(events.setFullScreenDialog, {});\n break;\n\n case 'rowRenderingMode':\n this.enableVerticalRendering();\n this.notify(events.rowModeChange, {});\n this.refresh();\n break;\n }\n };\n\n Grid.prototype.maintainSelection = function (index) {\n var _this = this;\n\n if (index !== -1) {\n var fn_1 = function fn_1() {\n _this.selectRow(index);\n\n _this.off(events.contentReady, fn_1);\n };\n\n this.on(events.contentReady, fn_1, this);\n }\n };\n /**\n * @private\n */\n\n\n Grid.prototype.setProperties = function (prop, muteOnChange) {\n _super.prototype.setProperties.call(this, prop, muteOnChange);\n\n var filterSettings = 'filterSettings';\n\n if (prop[filterSettings] && this.filterModule && muteOnChange) {\n this.filterModule.refreshFilter();\n }\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.setTablesCount = function () {\n var frozenCols = this.getFrozenColumns();\n var frozenLeft = this.getFrozenLeftColumnsCount();\n var frozenRight = this.getFrozenRightColumnsCount();\n\n if (frozenCols && !frozenLeft && !frozenRight) {\n this.tablesCount = 2;\n } else if (!frozenCols && (frozenLeft || frozenRight)) {\n if (frozenLeft && !frozenRight || frozenRight && !frozenLeft) {\n this.tablesCount = 2;\n } else if (frozenLeft && frozenRight) {\n this.tablesCount = 3;\n }\n }\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.getTablesCount = function () {\n return this.tablesCount;\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.updateDefaultCursor = function () {\n var headerCells = [].slice.call(this.getHeaderContent().querySelectorAll('.e-headercell:not(.e-stackedheadercell)'));\n var stdHdrCell = [].slice.call(this.getHeaderContent().getElementsByClassName('e-stackedheadercell'));\n var cols = this.getColumns();\n\n if (this.enableColumnVirtualization && this.getFrozenColumns()) {\n var cells = this.contentModule.getHeaderCells();\n headerCells = cells.length ? cells : headerCells;\n }\n\n for (var i = 0; i < headerCells.length; i++) {\n var cell = headerCells[i];\n\n if (this.allowGrouping || this.allowReordering || this.allowSorting) {\n if (!cols[i].allowReordering || !cols[i].allowSorting || !cols[i].allowGrouping) {\n cell.classList.add('e-defaultcursor');\n } else {\n cell.classList.add('e-mousepointer');\n }\n }\n }\n\n for (var count = 0; count < stdHdrCell.length; count++) {\n if (this.allowReordering) {\n stdHdrCell[count].classList.add('e-mousepointer');\n }\n }\n };\n\n Grid.prototype.updateColumnModel = function (columns) {\n for (var i = 0, len = columns.length; i < len; i++) {\n if (columns[i].columns) {\n this.updateColumnModel(columns[i].columns);\n } else {\n this.columnModel.push(columns[i]);\n }\n }\n\n this.updateColumnLevelFrozen();\n this.updateFrozenColumns();\n this.updateLockableColumns();\n };\n\n Grid.prototype.updateColumnLevelFrozen = function () {\n var cols = this.columnModel;\n var leftCols = [];\n var rightCols = [];\n var movableCols = [];\n\n if (this.frozenLeftCount || this.frozenRightCount) {\n for (var i = 0, len = cols.length; i < len; i++) {\n /* tslint:disable-next-line:no-any */\n var col = cols[i];\n\n if (col.freeze === 'Left') {\n col.freezeTable = literals.frozenLeft;\n leftCols.push(col);\n } else if (col.freeze === 'Right') {\n col.freezeTable = literals.frozenRight;\n rightCols.push(col);\n } else {\n col.freezeTable = 'movable';\n movableCols.push(col);\n }\n }\n\n this.columnModel = leftCols.concat(movableCols).concat(rightCols);\n }\n };\n\n Grid.prototype.updateFrozenColumns = function () {\n if (this.frozenLeftCount || this.frozenRightCount) {\n return;\n }\n\n var cols = this.columnModel;\n var directFrozenCount = this.frozenColumns;\n var totalFrozenCount = this.getFrozenColumns();\n var count = 0;\n\n for (var i = 0, len = cols.length; i < len; i++) {\n /* tslint:disable-next-line:no-any */\n var col = cols[i];\n\n if (directFrozenCount) {\n if (i < directFrozenCount) {\n col.freezeTable = literals.frozenLeft;\n } else {\n col.freezeTable = 'movable';\n }\n }\n\n if (col.isFrozen && i >= directFrozenCount) {\n col.freezeTable = literals.frozenLeft;\n cols.splice(this.frozenColumns + count, 0, cols.splice(i, 1)[0]);\n count++;\n } else if (totalFrozenCount && !directFrozenCount) {\n col.freezeTable = 'movable';\n }\n }\n };\n\n Grid.prototype.getFrozenLeftCount = function () {\n return this.getFrozenColumns() || this.getFrozenLeftColumnsCount();\n };\n\n Grid.prototype.isFrozenGrid = function () {\n return this.getFrozenColumns() !== 0 || this.getFrozenLeftColumnsCount() !== 0 || this.getFrozenRightColumnsCount() !== 0;\n };\n\n Grid.prototype.getFrozenMode = function () {\n return this.frozenName;\n };\n\n Grid.prototype.updateLockableColumns = function () {\n var cols = this.columnModel;\n var frozenCount = 0;\n var movableCount = 0;\n var frozenColumns = this.getFrozenColumns();\n\n for (var i = 0; i < cols.length; i++) {\n if (cols[i].lockColumn) {\n if (i < frozenColumns) {\n cols.splice(frozenCount, 0, cols.splice(i, 1)[0]);\n frozenCount++;\n } else {\n cols.splice(frozenColumns + movableCount, 0, cols.splice(i, 1)[0]);\n movableCount++;\n }\n }\n }\n };\n\n Grid.prototype.checkLockColumns = function (cols) {\n for (var i = 0; i < cols.length; i++) {\n if (cols[i].columns) {\n this.checkLockColumns(cols[i].columns);\n } else if (cols[i].lockColumn) {\n this.lockcolPositionCount++;\n }\n }\n };\n /**\n * Gets the columns from the Grid.\n * @return {Column[]}\n * @blazorType List\n */\n\n\n Grid.prototype.getColumns = function (isRefresh) {\n var _this = this;\n\n var inview = this.inViewIndexes.map(function (v) {\n return v - _this.groupSettings.columns.length;\n }).filter(function (v) {\n return v > -1;\n });\n var vLen = inview.length;\n\n if (!this.enableColumnVirtualization || isNullOrUndefined(this.columnModel) || this.columnModel.length === 0 || isRefresh) {\n this.columnModel = [];\n this.updateColumnModel(this.columns);\n }\n\n var columns = vLen === 0 ? this.columnModel : this.columnModel.slice(inview[0], inview[vLen - 1] + 1);\n\n if (this.contentModule && this.enableColumnVirtualization && this.isFrozenGrid() && inview.length && inview[0] > 0) {\n var frozenCols = this.contentModule.ensureFrozenCols(columns);\n columns = frozenCols;\n }\n\n return columns;\n };\n /**\n * @private\n */\n\n\n Grid.prototype.getStackedHeaderColumnByHeaderText = function (stackedHeader, col) {\n for (var i = 0; i < col.length; i++) {\n var individualColumn = col[i];\n\n if (individualColumn.field === stackedHeader || individualColumn.headerText === stackedHeader) {\n this.stackedColumn = individualColumn;\n break;\n } else if (individualColumn.columns) {\n this.getStackedHeaderColumnByHeaderText(stackedHeader, individualColumn.columns);\n }\n }\n\n return this.stackedColumn;\n };\n /**\n * @private\n */\n\n\n Grid.prototype.getColumnIndexesInView = function () {\n return this.inViewIndexes;\n };\n /**\n * @private\n */\n\n\n Grid.prototype.getQuery = function () {\n return this.query;\n };\n /**\n * @private\n */\n\n\n Grid.prototype.getLocaleConstants = function () {\n return this.defaultLocale;\n };\n /**\n * @private\n */\n\n\n Grid.prototype.setColumnIndexesInView = function (indexes) {\n this.inViewIndexes = indexes;\n };\n /**\n * Gets the visible columns from the Grid.\n * @return {Column[]}\n * @blazorType List\n */\n\n\n Grid.prototype.getVisibleColumns = function () {\n return this.getCurrentVisibleColumns();\n };\n /**\n * Gets the header div of the Grid.\n * @return {Element}\n */\n\n\n Grid.prototype.getHeaderContent = function () {\n return this.headerModule.getPanel();\n };\n /**\n * Sets the header div of the Grid to replace the old header.\n * @param {Element} element - Specifies the Grid header.\n * @return {void}\n */\n\n\n Grid.prototype.setGridHeaderContent = function (element) {\n this.headerModule.setPanel(element);\n };\n /**\n * Gets the content table of the Grid.\n * @return {Element}\n */\n\n\n Grid.prototype.getContentTable = function () {\n return this.contentModule.getTable();\n };\n /**\n * Sets the content table of the Grid to replace the old content table.\n * @param {Element} element - Specifies the Grid content table.\n * @return {void}\n */\n\n\n Grid.prototype.setGridContentTable = function (element) {\n this.contentModule.setTable(element);\n };\n /**\n * Gets the content div of the Grid.\n * @return {Element}\n */\n\n\n Grid.prototype.getContent = function () {\n return this.contentModule.getPanel();\n };\n /**\n * Sets the content div of the Grid to replace the old Grid content.\n * @param {Element} element - Specifies the Grid content.\n * @return {void}\n */\n\n\n Grid.prototype.setGridContent = function (element) {\n this.contentModule.setPanel(element);\n };\n /**\n * Gets the header table element of the Grid.\n * @return {Element}\n */\n\n\n Grid.prototype.getHeaderTable = function () {\n return this.headerModule.getTable();\n };\n /**\n * Sets the header table of the Grid to replace the old one.\n * @param {Element} element - Specifies the Grid header table.\n * @return {void}\n */\n\n\n Grid.prototype.setGridHeaderTable = function (element) {\n this.headerModule.setTable(element);\n };\n /**\n * Gets the footer div of the Grid.\n * @return {Element}\n */\n\n\n Grid.prototype.getFooterContent = function () {\n this.footerElement = this.element.getElementsByClassName(literals.gridFooter)[0];\n return this.footerElement;\n };\n /**\n * Gets the footer table element of the Grid.\n * @return {Element}\n */\n\n\n Grid.prototype.getFooterContentTable = function () {\n this.footerElement = this.element.getElementsByClassName(literals.gridFooter)[0];\n return this.footerElement.firstChild.firstChild;\n };\n /**\n * Gets the pager of the Grid.\n * @return {Element}\n */\n\n\n Grid.prototype.getPager = function () {\n return this.gridPager; //get element from pager\n };\n /**\n * Sets the pager of the Grid to replace the old pager.\n * @param {Element} element - Specifies the Grid pager.\n * @return {void}\n */\n\n\n Grid.prototype.setGridPager = function (element) {\n this.gridPager = element;\n };\n /**\n * Gets a row by index.\n * @param {number} index - Specifies the row index.\n * @return {Element}\n */\n\n\n Grid.prototype.getRowByIndex = function (index) {\n return this.contentModule.getRowByIndex(index);\n };\n /**\n * Gets a movable tables row by index.\n * @param {number} index - Specifies the row index.\n * @return {Element}\n */\n\n\n Grid.prototype.getMovableRowByIndex = function (index) {\n return this.contentModule.getMovableRowByIndex(index);\n };\n /**\n * Gets a frozen tables row by index.\n * @param {number} index - Specifies the row index.\n * @return {Element}\n */\n\n\n Grid.prototype.getFrozenRowByIndex = function (index) {\n return this.getFrozenDataRows()[index];\n };\n /**\n * Gets all the data rows of the Grid.\n * @return {Element[]}\n */\n\n\n Grid.prototype.getRows = function () {\n return this.contentModule.getRowElements();\n };\n /**\n * Gets a frozen right tables row element by index.\n * @param {number} index - Specifies the row index.\n * @return {Element}\n */\n\n\n Grid.prototype.getFrozenRightRowByIndex = function (index) {\n return this.contentModule.getFrozenRightRowByIndex(index);\n };\n /**\n * Get a row information based on cell\n * @param {Element}\n * @return RowInfo\n */\n\n\n Grid.prototype.getRowInfo = function (target) {\n var ele = target;\n var args = {\n target: target\n };\n\n if (!isNullOrUndefined(target) && isNullOrUndefined(parentsUntil(ele, 'e-detailrowcollapse') && isNullOrUndefined(parentsUntil(ele, 'e-recordplusexpand')))) {\n var cell = closest(ele, '.' + literals.rowCell);\n\n if (!cell) {\n var row = closest(ele, '.' + literals.row);\n\n if (!isNullOrUndefined(row)) {\n var rowObj = this.getRowObjectFromUID(row.getAttribute('data-uid'));\n var rowIndex = parseInt(row.getAttribute(literals.ariaRowIndex), 10);\n args = {\n row: row,\n rowData: rowObj.data,\n rowIndex: rowIndex\n };\n }\n\n return args;\n }\n\n var cellIndex = parseInt(cell.getAttribute(literals.ariaColIndex), 10);\n\n if (!isNullOrUndefined(cell) && !isNaN(cellIndex)) {\n var row_1 = closest(cell, '.' + literals.row);\n var rowIndex = parseInt(row_1.getAttribute(literals.ariaRowIndex), 10);\n var frzCols = this.getFrozenColumns();\n var tableName = this.columnModel[cellIndex].getFreezeTableName();\n var rows = this.contentModule.getRows();\n var index = cellIndex + this.getIndentCount();\n\n if (this.isFrozenGrid()) {\n if (tableName === literals.frozenLeft) {\n rows = this.contentModule.getRows();\n } else if (tableName === 'movable') {\n index = cellIndex - frzCols - this.frozenLeftCount;\n rows = this.contentModule.getMovableRows();\n } else if (tableName === literals.frozenRight) {\n index = cellIndex - (this.frozenLeftCount + this.movableCount);\n rows = this.contentModule.getFrozenRightRows();\n }\n }\n\n var rowsObject = rows.filter(function (r) {\n return r.uid === row_1.getAttribute('data-uid');\n });\n var rowData = {};\n var column = void 0;\n\n if (Object.keys(rowsObject).length) {\n rowData = rowsObject[0].data;\n column = rowsObject[0].cells[index].column;\n }\n\n args = {\n cell: cell,\n cellIndex: cellIndex,\n row: row_1,\n rowIndex: rowIndex,\n rowData: rowData,\n column: column,\n target: target\n };\n }\n }\n\n return args;\n };\n /**\n * Gets the Grid's movable content rows from frozen grid.\n * @return {Element[]}\n */\n\n\n Grid.prototype.getMovableRows = function () {\n return this.contentModule.getMovableRowElements();\n };\n /**\n * Gets the Grid's frozen right content rows from frozen grid.\n * @return {Element[]}\n */\n\n\n Grid.prototype.getFrozenRightRows = function () {\n return this.contentModule.getFrozenRightRowElements();\n };\n /**\n * Gets all the Grid's data rows.\n * @return {Element[]}\n */\n\n\n Grid.prototype.getDataRows = function () {\n return this.getAllDataRows();\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.getAllDataRows = function (includeAdd) {\n if (isNullOrUndefined(this.getContentTable().querySelector(literals.tbody))) {\n return [];\n }\n\n var tbody = this.isFrozenGrid() ? this.getFrozenLeftContentTbody() : this.getContentTable().querySelector(literals.tbody);\n var rows = [].slice.call(tbody.children);\n\n if (this.frozenRows) {\n var hdrTbody = this.isFrozenGrid() ? this.getHeaderContent().querySelector('.' + literals.frozenHeader).querySelector(literals.tbody) : this.getHeaderTable().querySelector(literals.tbody);\n var freezeRows = [].slice.call(hdrTbody.children);\n rows = this.addMovableRows(freezeRows, rows);\n }\n\n var dataRows = this.generateDataRows(rows, includeAdd);\n return dataRows;\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.addMovableRows = function (fRows, mrows) {\n for (var i = 0, len = mrows.length; i < len; i++) {\n fRows.push(mrows[i]);\n }\n\n return fRows;\n };\n\n Grid.prototype.generateDataRows = function (rows, includAdd) {\n var dRows = [];\n\n for (var i = 0, len = rows.length; i < len; i++) {\n if (rows[i].classList.contains(literals.row) && (!rows[i].classList.contains('e-hiddenrow') || includAdd)) {\n if (this.isCollapseStateEnabled()) {\n dRows[parseInt(rows[i].getAttribute(\"aria-rowindex\"))] = rows[i];\n } else {\n dRows.push(rows[i]);\n }\n }\n }\n\n return dRows;\n };\n /**\n * Gets all the Grid's movable table data rows.\n * @return {Element[]}\n */\n\n\n Grid.prototype.getMovableDataRows = function () {\n return this.getAllMovableDataRows();\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.getAllMovableDataRows = function (includeAdd) {\n if (!this.isFrozenGrid()) {\n return [];\n }\n\n var rows = [].slice.call(this.getContent().querySelector('.' + literals.movableContent).querySelector(literals.tbody).children);\n\n if (this.frozenRows) {\n var freezeRows = [].slice.call(this.getHeaderContent().querySelector('.' + literals.movableHeader).querySelector(literals.tbody).children);\n rows = this.addMovableRows(freezeRows, rows);\n }\n\n var dataRows = this.generateDataRows(rows, includeAdd);\n return dataRows;\n };\n /**\n * Gets all the Grid's frozen table data rows.\n * @return {Element[]}\n */\n\n\n Grid.prototype.getFrozenDataRows = function () {\n return this.getAllFrozenDataRows();\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.getAllFrozenDataRows = function (includeAdd) {\n var rows = [].slice.call(this.getContent().querySelector('.' + literals.frozenContent).querySelector(literals.tbody).children);\n\n if (this.frozenRows) {\n var freezeRows = [].slice.call(this.getHeaderContent().querySelector('.' + literals.frozenHeader).querySelector(literals.tbody).children);\n rows = this.addMovableRows(freezeRows, rows);\n }\n\n var dataRows = this.generateDataRows(rows, includeAdd);\n return dataRows;\n };\n /**\n * Gets all the Grid's frozen right table data rows.\n * @return {Element[]}\n */\n\n\n Grid.prototype.getFrozenRightDataRows = function () {\n return this.getAllFrozenRightDataRows();\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.getAllFrozenRightDataRows = function (includeAdd) {\n if (this.getFrozenMode() !== 'Right' && this.getFrozenMode() !== 'Left-Right') {\n return [];\n }\n\n var rows = [].slice.call(this.getContent().querySelector('.e-frozen-right-content').querySelector(literals.tbody).children);\n\n if (this.frozenRows) {\n var freezeRows = [].slice.call(this.getHeaderContent().querySelector('.e-frozen-right-header').querySelector(literals.tbody).children);\n rows = this.addMovableRows(freezeRows, rows);\n }\n\n var dataRows = this.generateDataRows(rows, includeAdd);\n return dataRows;\n };\n /**\n * Updates particular cell value based on the given primary key value.\n * > Primary key column must be specified using `columns.isPrimaryKey` property.\n * @param {string| number} key - Specifies the PrimaryKey value of dataSource.\n * @param {string } field - Specifies the field name which you want to update.\n * @param {string | number | boolean | Date} value - To update new value for the particular cell.\n */\n\n\n Grid.prototype.setCellValue = function (key, field, value) {\n var cells = 'cells';\n var rowData = 'data';\n var rowIdx = 'index';\n var rowuID = 'uid';\n var isRight = this.getFrozenMode() === 'Right';\n var pkName = this.getPrimaryKeyFieldNames()[0];\n var cell = new CellRenderer(this, this.serviceLocator);\n var fieldIdx = this.getColumnIndexByField(field);\n var col = this.getColumnByField(field);\n var rowObjects = col.getFreezeTableName() === \"movable\" ? this.contentModule.getMovableRows() : col.getFreezeTableName() === \"frozen-right\" ? this.getFrozenRightRowsObject() : this.contentModule.getRows();\n var selectedRow = rowObjects.filter(function (r) {\n return getValue(pkName, r.data) === key;\n })[0];\n var tr = selectedRow ? this.element.querySelector('[data-uid=' + selectedRow[rowuID] + ']') : null;\n\n if (!isNullOrUndefined(tr)) {\n setValue(field, value, selectedRow[rowData]);\n var left = this.getFrozenLeftColumnsCount() || this.getFrozenColumns();\n var movable = this.getMovableColumnsCount();\n\n if (this.isRowDragable() && !isRight) {\n left++;\n }\n\n var frIdx = left + movable;\n var td = this.getCellFromIndex(selectedRow[rowIdx], fieldIdx);\n\n if (!isNullOrUndefined(td)) {\n var Idx = col.getFreezeTableName() === \"movable\" ? left : col.getFreezeTableName() === \"frozen-right\" ? frIdx : 0;\n\n if (this.groupSettings.columns.length) {\n fieldIdx = fieldIdx + this.groupSettings.columns.length;\n }\n\n if (this.childGrid || this.detailTemplate) {\n fieldIdx++;\n }\n\n if (this.isRowDragable() && !isRight) {\n fieldIdx++;\n }\n\n var sRow = selectedRow[cells][fieldIdx - Idx];\n cell.refreshTD(td, sRow, selectedRow[rowData], {\n index: selectedRow[rowIdx]\n });\n\n if (this.aggregates.length > 0) {\n this.notify(events.refreshFooterRenderer, {});\n\n if (this.groupSettings.columns.length > 0) {\n this.notify(events.groupAggregates, {});\n }\n }\n /* tslint:disable:no-string-literal */\n\n\n if (!isNullOrUndefined(selectedRow) && !isNullOrUndefined(selectedRow['changes'])) {\n selectedRow['changes'][field] = value;\n }\n /* tslint:disable:no-string-literal */\n\n\n this.trigger(events.queryCellInfo, {\n cell: td,\n column: col,\n data: selectedRow[rowData]\n });\n }\n } else {\n return;\n }\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.refreshReactColumnTemplateByUid = function (columnUid) {\n var _this = this;\n\n if (this.isReact) {\n //tslint:disable-next-line:no-any\n this.clearTemplate(['columnTemplate'], undefined, function () {\n var cells = 'cells';\n var rowIdx = 'index';\n\n var rowsObj = _this.getRowsObject();\n\n var indent = _this.getIndentCount();\n\n var cellIndex = _this.getNormalizedColumnIndex(columnUid);\n\n for (var j = 0; j < rowsObj.length; j++) {\n if (rowsObj[j].isDataRow && !isNullOrUndefined(rowsObj[j].index)) {\n var cell = rowsObj[j][cells][cellIndex];\n var cellRenderer = new CellRenderer(_this, _this.serviceLocator);\n\n var td = _this.getCellFromIndex(rowsObj[j].index, cellIndex - indent);\n\n cellRenderer.refreshTD(td, cell, rowsObj[j].data, {\n index: rowsObj[j][rowIdx]\n });\n }\n }\n });\n }\n };\n /**\n * Updates and refresh the particular row values based on the given primary key value.\n * > Primary key column must be specified using `columns.isPrimaryKey` property.\n * @param {string| number} key - Specifies the PrimaryKey value of dataSource.\n * @param {Object} rowData - To update new data for the particular row.\n */\n\n\n Grid.prototype.setRowData = function (key, rowData) {\n var rwdata = 'data';\n var rowuID = 'uid';\n var rowObjects = this.contentModule.getRows();\n var selectedRow;\n var pkName = this.getPrimaryKeyFieldNames()[0];\n var rowRenderer = new RowRenderer(this.serviceLocator, null, this);\n\n if (this.groupSettings.columns.length > 0 && this.aggregates.length > 0) {\n rowObjects = rowObjects.filter(function (row) {\n return row.isDataRow;\n });\n }\n\n selectedRow = rowObjects.filter(function (r) {\n return getValue(pkName, r.data) === key;\n })[0];\n\n if (!isNullOrUndefined(selectedRow) && this.element.querySelectorAll('[data-uid=' + selectedRow[rowuID] + ']').length) {\n selectedRow.changes = rowData;\n refreshForeignData(selectedRow, this.getForeignKeyColumns(), selectedRow.changes);\n rowRenderer.refresh(selectedRow, this.getColumns(), true);\n\n if (this.aggregates.length > 0) {\n this.notify(events.refreshFooterRenderer, {});\n\n if (this.groupSettings.columns.length > 0) {\n this.notify(events.groupAggregates, {});\n }\n }\n } else {\n return;\n }\n };\n /**\n * Gets a cell by row and column index.\n * @param {number} rowIndex - Specifies the row index.\n * @param {number} columnIndex - Specifies the column index.\n * @return {Element}\n */\n\n\n Grid.prototype.getCellFromIndex = function (rowIndex, columnIndex) {\n var col = this.getColumnByIndex(columnIndex);\n return getCellByColAndRowIndex(this, col, rowIndex, columnIndex);\n };\n /**\n * Gets a movable table cell by row and column index.\n * @param {number} rowIndex - Specifies the row index.\n * @param {number} columnIndex - Specifies the column index.\n * @return {Element}\n */\n\n\n Grid.prototype.getMovableCellFromIndex = function (rowIndex, columnIndex) {\n if (this.frozenName === 'Left-Right' && columnIndex >= this.movableCount) {\n return undefined;\n }\n\n var index = this.getFrozenColumns() || this.getFrozenLeftColumnsCount();\n return this.getMovableDataRows()[rowIndex] && this.getMovableDataRows()[rowIndex].getElementsByClassName(literals.rowCell)[columnIndex - index];\n };\n /**\n * Gets a frozen right table cell by row and column index.\n * @param {number} rowIndex - Specifies the row index.\n * @param {number} columnIndex - Specifies the column index.\n * @return {Element}\n */\n\n\n Grid.prototype.getFrozenRightCellFromIndex = function (rowIndex, columnIndex) {\n var index = this.getFrozenLeftColumnsCount() + this.getMovableColumnsCount();\n var rows = this.getFrozenRightDataRows();\n return rows[rowIndex] && rows[rowIndex].getElementsByClassName(literals.rowCell)[columnIndex - index];\n };\n /**\n * Gets a column header by column index.\n * @param {number} index - Specifies the column index.\n * @return {Element}\n */\n\n\n Grid.prototype.getColumnHeaderByIndex = function (index) {\n return this.getHeaderTable().getElementsByClassName('e-headercell')[index];\n };\n /**\n * Gets a movable column header by column index.\n * @param {number} index - Specifies the column index.\n * @return {Element}\n */\n\n\n Grid.prototype.getMovableColumnHeaderByIndex = function (index) {\n var left = this.getFrozenColumns() || this.getFrozenLeftColumnsCount();\n return this.getMovableVirtualHeader().getElementsByClassName('e-headercell')[index - left];\n };\n /**\n * Gets a frozen right column header by column index.\n * @param {number} index - Specifies the column index.\n * @return {Element}\n */\n\n\n Grid.prototype.getFrozenRightColumnHeaderByIndex = function (index) {\n var left = this.getFrozenLeftColumnsCount() + this.getMovableColumnsCount();\n return this.getFrozenRightHeader().getElementsByClassName('e-headercell')[index - left];\n };\n /**\n * Gets a frozen left column header by column index.\n * @param {number} index - Specifies the column index.\n * @return {Element}\n */\n\n\n Grid.prototype.getFrozenLeftColumnHeaderByIndex = function (index) {\n return this.getFrozenVirtualHeader().getElementsByClassName('e-headercell')[index];\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.getRowObjectFromUID = function (uid, isMovable, isFrozenRight) {\n var rows = this.contentModule.getRows();\n var row = this.rowObject(rows, uid);\n\n if (this.isFrozenGrid()) {\n if (!row || isMovable || isFrozenRight) {\n row = this.rowObject(this.contentModule.getMovableRows(), uid);\n\n if (!row && this.getFrozenMode() === 'Left-Right' || isFrozenRight) {\n row = this.rowObject(this.contentModule.getFrozenRightRows(), uid);\n }\n\n return row;\n }\n }\n\n if (isNullOrUndefined(row) && this.enableVirtualization && this.groupSettings.columns.length > 0) {\n row = this.rowObject(this.vRows, uid);\n return row;\n }\n\n return row;\n };\n\n Grid.prototype.rowObject = function (rows, uid) {\n for (var _i = 0, rows_1 = rows; _i < rows_1.length; _i++) {\n var row = rows_1[_i];\n\n if (row.uid === uid) {\n return row;\n }\n }\n\n return null;\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.getRowsObject = function () {\n return this.contentModule.getRows();\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.getMovableRowsObject = function () {\n var rows = [];\n\n if (this.isFrozenGrid()) {\n rows = this.contentModule.getMovableRows();\n }\n\n return rows;\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.getFrozenRightRowsObject = function () {\n var rows = [];\n\n if (this.getFrozenMode() === 'Right' || this.getFrozenMode() === 'Left-Right') {\n rows = this.contentModule.getFrozenRightRows();\n }\n\n return rows;\n };\n /**\n * Gets a column header by column name.\n * @param {string} field - Specifies the column name.\n * @return {Element}\n */\n\n\n Grid.prototype.getColumnHeaderByField = function (field) {\n var column = this.getColumnByField(field);\n return column ? this.getColumnHeaderByUid(column.uid) : undefined;\n };\n /**\n * Gets a column header by UID.\n * @param {string} field - Specifies the column uid.\n * @return {Element}\n */\n\n\n Grid.prototype.getColumnHeaderByUid = function (uid) {\n var element = this.getHeaderContent().querySelector('[e-mappinguid=' + uid + ']');\n return element ? element.parentElement : undefined;\n };\n /**\n * @hidden\n * @blazorType GridColumn\n */\n\n\n Grid.prototype.getColumnByIndex = function (index) {\n var column;\n this.getColumns().some(function (col, i) {\n column = col;\n return i === index;\n });\n return column;\n };\n /**\n * Gets a Column by column name.\n * @param {string} field - Specifies the column name.\n * @return {Column}\n * @blazorType GridColumn\n */\n\n\n Grid.prototype.getColumnByField = function (field) {\n return iterateArrayOrObject(this.getColumns(), function (item, index) {\n if (item.field === field) {\n return item;\n }\n\n return undefined;\n })[0];\n };\n /**\n * Gets a column index by column name.\n * @param {string} field - Specifies the column name.\n * @return {number}\n */\n\n\n Grid.prototype.getColumnIndexByField = function (field) {\n var cols = this.getColumns();\n\n for (var i = 0; i < cols.length; i++) {\n if (cols[i].field === field) {\n return i;\n }\n }\n\n return -1;\n };\n /**\n * Gets a column by UID.\n * @param {string} uid - Specifies the column UID.\n * @return {Column}\n * @blazorType GridColumn\n */\n\n\n Grid.prototype.getColumnByUid = function (uid) {\n return iterateArrayOrObject(this.getColumns().concat(this.getStackedColumns(this.columns)), function (item, index) {\n if (item.uid === uid) {\n return item;\n }\n\n return undefined;\n })[0];\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.getStackedColumns = function (columns, stackedColumn) {\n if (stackedColumn === void 0) {\n stackedColumn = [];\n }\n\n for (var _i = 0, columns_1 = columns; _i < columns_1.length; _i++) {\n var column = columns_1[_i];\n\n if (column.columns) {\n stackedColumn.push(column);\n this.getStackedColumns(column.columns, stackedColumn);\n }\n }\n\n return stackedColumn;\n };\n /**\n * Gets a column index by UID.\n * @param {string} uid - Specifies the column UID.\n * @return {number}\n */\n\n\n Grid.prototype.getColumnIndexByUid = function (uid) {\n var index = iterateArrayOrObject(this.getColumns(), function (item, index) {\n if (item.uid === uid) {\n return index;\n }\n\n return undefined;\n })[0];\n return !isNullOrUndefined(index) ? index : -1;\n };\n /**\n * Gets UID by column name.\n * @param {string} field - Specifies the column name.\n * @return {string}\n */\n\n\n Grid.prototype.getUidByColumnField = function (field) {\n return iterateArrayOrObject(this.getColumns(), function (item, index) {\n if (item.field === field) {\n return item.uid;\n }\n\n return undefined;\n })[0];\n };\n /**\n * Gets TH index by column uid value.\n * @private\n * @param {string} uid - Specifies the column uid.\n * @return {number}\n */\n\n\n Grid.prototype.getNormalizedColumnIndex = function (uid) {\n var index = this.getColumnIndexByUid(uid);\n return index + this.getIndentCount();\n };\n /**\n * Gets indent cell count.\n * @private\n * @return {number}\n */\n\n\n Grid.prototype.getIndentCount = function () {\n var index = 0;\n\n if (this.allowGrouping) {\n index += this.groupSettings.columns.length;\n }\n\n if (this.isDetail()) {\n index++;\n }\n\n if (this.isRowDragable() && isNullOrUndefined(this.rowDropSettings.targetID)) {\n index++;\n }\n /**\n * TODO: index normalization based on the stacked header, grouping and detailTemplate\n * and frozen should be handled here\n */\n\n\n return index;\n };\n /**\n * Gets the collection of column fields.\n * @return {string[]}\n */\n\n\n Grid.prototype.getColumnFieldNames = function () {\n var columnNames = [];\n var column;\n\n for (var i = 0, len = this.getColumns().length; i < len; i++) {\n column = this.getColumns()[i];\n\n if (column.visible) {\n columnNames.push(column.field);\n }\n }\n\n return columnNames;\n };\n /**\n * Gets a compiled row template.\n * @return {Function}\n * @private\n */\n\n\n Grid.prototype.getRowTemplate = function () {\n return this.rowTemplateFn;\n };\n /**\n * Gets a compiled detail row template.\n * @private\n * @return {Function}\n */\n\n\n Grid.prototype.getDetailTemplate = function () {\n return this.detailTemplateFn;\n };\n /**\n * Gets a compiled detail row template.\n * @private\n * @return {Function}\n */\n\n\n Grid.prototype.getEditTemplate = function () {\n return this.editTemplateFn;\n };\n /**\n * Gets a compiled dialog edit header template.\n * @private\n * @return {Function}\n */\n\n\n Grid.prototype.getEditHeaderTemplate = function () {\n return this.editHeaderTemplateFn;\n };\n /**\n * Gets a compiled dialog edit footer template.\n * @private\n * @return {Function}\n */\n\n\n Grid.prototype.getEditFooterTemplate = function () {\n return this.editFooterTemplateFn;\n };\n /**\n * Get the names of the primary key columns of the Grid.\n * @return {string[]}\n */\n\n\n Grid.prototype.getPrimaryKeyFieldNames = function () {\n var keys = [];\n\n for (var k = 0; k < this.columnModel.length; k++) {\n if (this.columnModel[k].isPrimaryKey) {\n keys.push(this.columnModel[k].field);\n }\n }\n\n return keys;\n };\n /**\n * Refreshes the Grid header and content.\n */\n\n\n Grid.prototype.refresh = function () {\n if (!this.isDestroyed) {\n this.headerModule.refreshUI();\n this.updateStackedFilter();\n this.renderModule.refresh();\n }\n };\n /**\n * Refreshes the Grid header.\n */\n\n\n Grid.prototype.refreshHeader = function () {\n this.headerModule.refreshUI();\n };\n /**\n * Gets the collection of selected rows.\n * @return {Element[]}\n */\n\n\n Grid.prototype.getSelectedRows = function () {\n return this.selectionModule ? this.selectionModule.selectedRecords : [];\n };\n /**\n * Gets the collection of selected row indexes.\n * @return {number[]}\n */\n\n\n Grid.prototype.getSelectedRowIndexes = function () {\n return this.selectionModule ? this.selectionModule.selectedRowIndexes : [];\n };\n /**\n * Gets the collection of selected row and cell indexes.\n * @return {number[]}\n */\n\n\n Grid.prototype.getSelectedRowCellIndexes = function () {\n return this.selectionModule ? this.selectionModule.selectedRowCellIndexes : [];\n };\n /**\n * Gets the collection of selected records.\n * @return {Object[]}\n * @isGenericType true\n */\n\n\n Grid.prototype.getSelectedRecords = function () {\n return this.selectionModule ? this.selectionModule.getSelectedRecords() : [];\n };\n /**\n * Gets the collection of selected columns uid.\n * @return {string[]}\n * @isGenericType true\n */\n\n\n Grid.prototype.getSelectedColumnsUid = function () {\n var _this = this;\n\n var uid = [];\n\n if (this.selectionModule) {\n this.selectionModule.selectedColumnsIndexes.filter(function (i) {\n return uid.push(_this.getColumns()[i].uid);\n });\n }\n\n return uid;\n };\n /**\n * Gets the data module.\n * @return {Data}\n */\n\n\n Grid.prototype.getDataModule = function () {\n return this.renderModule.data;\n };\n /**\n * Shows a column by its column name.\n * @param {string|string[]} keys - Defines a single or collection of column names.\n * @param {string} showBy - Defines the column key either as field name or header text.\n * @return {void}\n */\n\n\n Grid.prototype.showColumns = function (keys, showBy) {\n showBy = showBy ? showBy : 'headerText';\n this.showHider.show(keys, showBy);\n };\n /**\n * Hides a column by column name.\n * @param {string|string[]} keys - Defines a single or collection of column names.\n * @param {string} hideBy - Defines the column key either as field name or header text.\n * @return {void}\n */\n\n\n Grid.prototype.hideColumns = function (keys, hideBy) {\n hideBy = hideBy ? hideBy : 'headerText';\n this.showHider.hide(keys, hideBy);\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.getFrozenColumns = function () {\n return this.frozenColumns + this.getFrozenCount(this.columns, 0, 0);\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.getFrozenRightColumnsCount = function () {\n return this.frozenRightCount;\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.getFrozenLeftColumnsCount = function () {\n return this.frozenLeftCount;\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.getMovableColumnsCount = function () {\n return this.movableCount;\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.setFrozenCount = function () {\n this.frozenLeftCount = this.frozenRightCount = this.movableCount = 0;\n this.visibleFrozenLeft = this.visibleFrozenRight = this.visibleMovable = 0;\n this.frozenLeftColumns = [];\n this.frozenRightColumns = [];\n this.movableColumns = [];\n this.splitFrozenCount(this.columns);\n\n if (this.frozenColumns && (this.frozenLeftCount || this.frozenRightCount)) {\n this.setProperties({\n frozenColumns: 0\n }, true);\n }\n\n this.setTablesCount();\n\n if (this.frozenLeftCount && !this.frozenRightCount) {\n this.frozenName = 'Left';\n } else if (this.frozenRightCount && !this.frozenLeftCount) {\n this.frozenName = 'Right';\n } else if (this.frozenLeftCount && this.frozenRightCount) {\n this.frozenName = 'Left-Right';\n }\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.getVisibleFrozenLeftCount = function () {\n return this.visibleFrozenLeft;\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.getVisibleFrozenRightCount = function () {\n return this.visibleFrozenRight;\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.getVisibleMovableCount = function () {\n return this.visibleMovable;\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.getFrozenRightColumns = function () {\n return this.frozenRightColumns;\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.getFrozenLeftColumns = function () {\n return this.frozenLeftColumns;\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.getMovableColumns = function () {\n return this.movableColumns;\n };\n\n Grid.prototype.splitFrozenCount = function (columns) {\n for (var i = 0; i < columns.length; i++) {\n if (columns[i].columns) {\n this.splitFrozenCount(columns[i].columns);\n } else {\n if (columns[i].freeze === 'Right') {\n if (columns[i].visible !== false) {\n this.visibleFrozenRight++;\n }\n\n ;\n this.frozenRightColumns.push(columns[i]);\n this.frozenRightCount++;\n } else if (columns[i].freeze === 'Left') {\n if (columns[i].visible !== false) {\n this.visibleFrozenLeft++;\n }\n\n ;\n this.frozenLeftColumns.push(columns[i]);\n this.frozenLeftCount++;\n } else {\n if (columns[i].visible !== false) {\n this.visibleMovable++;\n }\n\n ;\n this.movableColumns.push(columns[i]);\n this.movableCount++;\n }\n }\n }\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.getVisibleFrozenColumns = function () {\n return this.getVisibleFrozenColumnsCount() + this.getVisibleFrozenCount(this.columns, 0);\n };\n /**\n * Get the current Filter operator and field.\n * @return {Object}\n */\n\n\n Grid.prototype.getFilterUIInfo = function () {\n return this.filterModule ? this.filterModule.getFilterUIInfo() : {};\n };\n\n Grid.prototype.getVisibleFrozenColumnsCount = function () {\n var visibleFrozenColumns = 0;\n var columns = this.columnModel;\n\n for (var i = 0; i < this.frozenColumns; i++) {\n if (columns[i].visible) {\n visibleFrozenColumns++;\n }\n }\n\n if (this.frozenLeftCount || this.frozenRightCount) {\n for (var i = 0; i < columns.length; i++) {\n if (columns[i].visible && (columns[i].freeze === 'Left' || columns[i].freeze === 'Right')) {\n visibleFrozenColumns++;\n }\n }\n }\n\n return visibleFrozenColumns;\n };\n\n Grid.prototype.getVisibleFrozenCount = function (cols, cnt) {\n if (!this.frozenLeftCount && !this.frozenRightCount) {\n for (var i = 0, len = cols.length; i < len; i++) {\n if (cols[i].columns) {\n cnt = this.getVisibleFrozenCount(cols[i].columns, cnt);\n } else {\n if (cols[i].isFrozen && cols[i].visible) {\n cnt++;\n }\n }\n }\n }\n\n return cnt;\n };\n\n Grid.prototype.getFrozenCount = function (cols, cnt, index) {\n for (var i = 0, len = cols.length; i < len; i++) {\n if (cols[i].columns) {\n cnt = this.getFrozenCount(cols[i].columns, cnt, index);\n } else {\n if (cols[i].isFrozen && index > this.frozenColumns - 1) {\n cnt++;\n }\n\n index++;\n }\n }\n\n return cnt;\n };\n /**\n * Navigates to the specified target page.\n * @param {number} pageNo - Defines the page number to navigate.\n * @return {void}\n */\n\n\n Grid.prototype.goToPage = function (pageNo) {\n if (this.pagerModule) {\n this.pagerModule.goToPage(pageNo);\n }\n };\n /**\n * Defines the text of external message.\n * @param {string} message - Defines the message to update.\n * @return {void}\n */\n\n\n Grid.prototype.updateExternalMessage = function (message) {\n if (this.pagerModule) {\n this.pagerModule.updateExternalMessage(message);\n }\n };\n /**\n * Sorts a column with the given options.\n * @param {string} columnName - Defines the column name to be sorted.\n * @param {SortDirection} direction - Defines the direction of sorting field.\n * @param {boolean} isMultiSort - Specifies whether the previous sorted columns are to be maintained.\n * @return {void}\n */\n\n\n Grid.prototype.sortColumn = function (columnName, direction, isMultiSort) {\n if (this.sortModule) {\n this.sortModule.sortColumn(columnName, direction, isMultiSort);\n }\n };\n /**\n * Clears all the sorted columns of the Grid.\n * @return {void}\n */\n\n\n Grid.prototype.clearSorting = function () {\n if (this.sortModule) {\n this.sortModule.clearSorting();\n }\n };\n /**\n * Remove sorted column by field name.\n * @param {string} field - Defines the column field name to remove sort.\n * @return {void}\n * @hidden\n */\n\n\n Grid.prototype.removeSortColumn = function (field) {\n if (this.sortModule) {\n this.sortModule.removeSortColumn(field);\n }\n };\n /**\n * Filters grid row by column name with the given options.\n * @param {string} fieldName - Defines the field name of the column.\n * @param {string} filterOperator - Defines the operator to filter records.\n * @param {string | number | Date | boolean} filterValue - Defines the value used to filter records.\n * @param {string} predicate - Defines the relationship between one filter query and another by using AND or OR predicate.\n * @param {boolean} matchCase - If match case is set to true, the grid filters the records with exact match. if false, it filters case\n * insensitive records (uppercase and lowercase letters treated the same).\n * @param {boolean} ignoreAccent - If ignoreAccent set to true,\n * then filter ignores the diacritic characters or accents while filtering.\n * @param {string} actualFilterValue - Defines the actual filter value for the filter column.\n * @param {string} actualOperator - Defines the actual filter operator for the filter column.\n * @return {void}\n */\n\n\n Grid.prototype.filterByColumn = function (fieldName, filterOperator, filterValue, predicate, matchCase, ignoreAccent, actualFilterValue, actualOperator) {\n if (this.filterModule) {\n this.filterModule.filterByColumn(fieldName, filterOperator, filterValue, predicate, matchCase, ignoreAccent, actualFilterValue, actualOperator);\n }\n };\n /**\n * Clears all the filtered rows of the Grid.\n * @return {void}\n */\n\n\n Grid.prototype.clearFiltering = function (fields) {\n if (this.filterModule) {\n this.filterModule.clearFiltering(fields);\n }\n };\n /**\n * Removes filtered column by field name.\n * @param {string} field - Defines column field name to remove filter.\n * @param {boolean} isClearFilterBar - Specifies whether the filter bar value needs to be cleared.\n * @return {void}\n * @hidden\n */\n\n\n Grid.prototype.removeFilteredColsByField = function (field, isClearFilterBar) {\n if (this.filterModule) {\n this.filterModule.removeFilteredColsByField(field, isClearFilterBar);\n }\n };\n /**\n * Selects a row by given index.\n * @param {number} index - Defines the row index.\n * @param {boolean} isToggle - If set to true, then it toggles the selection.\n * @return {void}\n */\n\n\n Grid.prototype.selectRow = function (index, isToggle) {\n if (this.selectionModule) {\n this.selectionModule.selectRow(index, isToggle);\n }\n };\n /**\n * Selects a collection of rows by indexes.\n * @param {number[]} rowIndexes - Specifies the row indexes.\n * @return {void}\n */\n\n\n Grid.prototype.selectRows = function (rowIndexes) {\n if (this.selectionModule) {\n this.selectionModule.selectRows(rowIndexes);\n }\n };\n /**\n * Deselects the current selected rows and cells.\n * @return {void}\n */\n\n\n Grid.prototype.clearSelection = function () {\n if (this.selectionModule) {\n this.selectionModule.clearSelection();\n }\n };\n /**\n * Selects a cell by the given index.\n * @param {IIndex} cellIndex - Defines the row and column indexes.\n * @param {boolean} isToggle - If set to true, then it toggles the selection.\n * @return {void}\n */\n\n\n Grid.prototype.selectCell = function (cellIndex, isToggle) {\n if (this.selectionModule) {\n this.selectionModule.selectCell(cellIndex, isToggle);\n }\n };\n /**\n * Selects a range of cells from start and end indexes.\n * @param {IIndex} startIndex - Specifies the row and column's start index.\n * @param {IIndex} endIndex - Specifies the row and column's end index.\n * @return {void}\n */\n\n\n Grid.prototype.selectCellsByRange = function (startIndex, endIndex) {\n this.selectionModule.selectCellsByRange(startIndex, endIndex);\n };\n /**\n * Searches Grid records using the given key.\n * You can customize the default search option by using the\n * [`searchSettings`](./#searchsettings/).\n * @param {string} searchString - Defines the key.\n * @return {void}\n */\n\n\n Grid.prototype.search = function (searchString) {\n if (this.searchModule) {\n this.searchModule.search(searchString);\n }\n };\n /**\n * By default, prints all the pages of the Grid and hides the pager.\n * > You can customize print options using the\n * [`printMode`](./#printmode).\n * @return {void}\n */\n\n\n Grid.prototype.print = function () {\n if (this.printModule) {\n this.printModule.print();\n }\n };\n /**\n * Delete a record with Given options. If fieldname and data is not given then grid will delete the selected record.\n * > `editSettings.allowDeleting` should be true.\n * @param {string} fieldname - Defines the primary key field, 'Name of the column'.\n * @param {Object} data - Defines the JSON data of the record to be deleted.\n */\n\n\n Grid.prototype.deleteRecord = function (fieldname, data) {\n if (this.editModule) {\n this.editModule.deleteRecord(fieldname, data);\n }\n };\n /**\n * Starts edit the selected row. At least one row must be selected before invoking this method.\n * `editSettings.allowEditing` should be true.\n * {% codeBlock src='grid/startEdit/index.md' %}{% endcodeBlock %}\n * @return {void}\n */\n\n\n Grid.prototype.startEdit = function () {\n if (this.editModule) {\n this.editModule.startEdit();\n }\n };\n /**\n * If Grid is in editable state, you can save a record by invoking endEdit.\n */\n\n\n Grid.prototype.endEdit = function () {\n if (this.editModule) {\n this.editModule.endEdit();\n }\n };\n /**\n * Cancels edited state.\n */\n\n\n Grid.prototype.closeEdit = function () {\n if (this.editModule) {\n this.editModule.closeEdit();\n }\n };\n /**\n * Adds a new record to the Grid. Without passing parameters, it adds empty rows.\n * > `editSettings.allowEditing` should be true.\n * @param {Object} data - Defines the new add record data.\n * @param {number} index - Defines the row index to be added\n */\n\n\n Grid.prototype.addRecord = function (data, index) {\n if (this.editModule) {\n this.editModule.addRecord(data, index);\n }\n };\n /**\n * Delete any visible row by TR element.\n * @param {HTMLTableRowElement} tr - Defines the table row element.\n */\n\n\n Grid.prototype.deleteRow = function (tr) {\n if (this.editModule) {\n this.editModule.deleteRow(tr);\n }\n };\n /**\n * Changes a particular cell into edited state based on the row index and field name provided in the `batch` mode.\n * @param {number} index - Defines row index to edit a particular cell.\n * @param {string} field - Defines the field name of the column to perform batch edit.\n */\n\n\n Grid.prototype.editCell = function (index, field) {\n if (this.editModule) {\n this.editModule.editCell(index, field);\n }\n };\n /**\n * Saves the cell that is currently edited. It does not save the value to the DataSource.\n * {% codeBlock src='grid/saveCell/index.md' %}{% endcodeBlock %}\n */\n\n\n Grid.prototype.saveCell = function () {\n if (this.editModule) {\n this.editModule.saveCell();\n }\n };\n /**\n * To update the specified cell by given value without changing into edited state.\n * @param {number} rowIndex Defines the row index.\n * @param {string} field Defines the column field.\n * @param {string | number | boolean | Date} value - Defines the value to be changed.\n */\n\n\n Grid.prototype.updateCell = function (rowIndex, field, value) {\n if (this.editModule) {\n this.editModule.updateCell(rowIndex, field, value);\n }\n };\n /**\n * To update the specified row by given values without changing into edited state.\n *\n * {% codeBlock src='grid/updateRow/index.md' %}{% endcodeBlock %}\n *\n * @param {number} index Defines the row index.\n * @param {Object} data Defines the data object to be updated.\n */\n\n\n Grid.prototype.updateRow = function (index, data) {\n if (this.editModule) {\n this.editModule.updateRow(index, data);\n }\n };\n /**\n * Gets the added, edited,and deleted data before bulk save to the DataSource in batch mode.\n * @return {Object}\n */\n\n\n Grid.prototype.getBatchChanges = function () {\n if (this.editModule) {\n return this.editModule.getBatchChanges();\n }\n\n return {};\n };\n /**\n * Enables or disables ToolBar items.\n * @param {string[]} items - Defines the collection of itemID of ToolBar items.\n * @param {boolean} isEnable - Defines the items to be enabled or disabled.\n * @return {void}\n */\n\n\n Grid.prototype.enableToolbarItems = function (items, isEnable) {\n if (this.toolbarModule) {\n this.toolbarModule.enableItems(items, isEnable);\n }\n };\n /**\n * Copy the selected rows or cells data into clipboard.\n * @param {boolean} withHeader - Specifies whether the column header text needs to be copied along with rows or cells.\n */\n\n\n Grid.prototype.copy = function (withHeader) {\n if (this.clipboardModule) {\n this.clipboardModule.copy(withHeader);\n }\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.recalcIndentWidth = function () {\n var _this = this;\n\n if (!this.getHeaderTable().querySelector('.e-emptycell')) {\n return;\n }\n\n if (!this.groupSettings.columns.length && !this.isDetail() && !this.isRowDragable() || this.getHeaderTable().querySelector('.e-emptycell').getAttribute('indentRefreshed') || !this.getContentTable()) {\n return;\n }\n\n var indentWidth = this.getHeaderTable().querySelector('.e-emptycell').parentElement.offsetWidth;\n var headerCol = [].slice.call(this.getHeaderTable().querySelector(literals.colGroup).childNodes);\n var contentCol = [].slice.call(this.getContentTable().querySelector(literals.colGroup).childNodes);\n var perPixel = indentWidth / 30;\n var i = this.getFrozenMode() === 'Right' ? this.frozenRightCount : 0;\n var parentOffset = this.element.offsetWidth;\n\n var applyWidth = function applyWidth(index, width) {\n if (ispercentageWidth(_this)) {\n var newWidth = (width / parentOffset * 100).toFixed(1) + '%';\n headerCol[index].style.width = newWidth;\n contentCol[index].style.width = newWidth;\n } else {\n headerCol[index].style.width = width + 'px';\n contentCol[index].style.width = width + 'px';\n }\n\n _this.notify(events.columnWidthChanged, {\n index: index,\n width: width\n });\n };\n\n if (perPixel >= 1) {\n indentWidth = 30 / perPixel;\n }\n\n if (indentWidth < 1) {\n indentWidth = 1;\n }\n\n if (this.enableColumnVirtualization || this.isAutoGen) {\n indentWidth = 30;\n }\n\n while (i < this.groupSettings.columns.length) {\n applyWidth(i, indentWidth);\n i++;\n }\n\n if (this.isDetail()) {\n applyWidth(i, indentWidth);\n i++;\n }\n\n if (this.isRowDragable()) {\n applyWidth(i, indentWidth);\n }\n\n this.isAutoGen = false;\n this.getHeaderTable().querySelector('.e-emptycell').setAttribute('indentRefreshed', 'true');\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.resetIndentWidth = function () {\n if (ispercentageWidth(this)) {\n this.getHeaderTable().querySelector('.e-emptycell').removeAttribute('indentRefreshed');\n this.widthService.setWidthToColumns();\n this.recalcIndentWidth();\n }\n\n if ((this.width === 'auto' || typeof this.width === 'string' && this.width.indexOf('%') !== -1) && this.getColumns().filter(function (col) {\n return (!col.width || col.width === 'auto') && col.minWidth;\n }).length > 0) {\n var tgridWidth = this.widthService.getTableWidth(this.getColumns());\n this.widthService.setMinwidthBycalculation(tgridWidth);\n }\n\n if (this.isFrozenGrid() && this.widthService) {\n this.widthService.refreshFrozenScrollbar();\n }\n\n if (this.allowTextWrap && this.textWrapSettings.wrapMode != 'Content') {\n this.notify(events.refreshHandlers, {});\n }\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.isRowDragable = function () {\n return this.allowRowDragAndDrop && !this.rowDropSettings.targetID;\n };\n /**\n * Changes the Grid column positions by field names.\n * @param {string} fromFName - Defines the origin field name.\n * @param {string} toFName - Defines the destination field name.\n * @return {void}\n */\n\n\n Grid.prototype.reorderColumns = function (fromFName, toFName) {\n if (this.reorderModule) {\n this.reorderModule.reorderColumns(fromFName, toFName);\n }\n };\n /**\n * Changes the Grid column positions by field index. If you invoke reorderColumnByIndex multiple times,\n * then you won't get the same results every time.\n * @param {number} fromIndex - Defines the origin field index.\n * @param {number} toIndex - Defines the destination field index.\n * @return {void}\n */\n\n\n Grid.prototype.reorderColumnByIndex = function (fromIndex, toIndex) {\n if (this.reorderModule) {\n this.reorderModule.reorderColumnByIndex(fromIndex, toIndex);\n }\n };\n /**\n * Changes the Grid column positions by field index. If you invoke reorderColumnByTargetIndex multiple times,\n * then you will get the same results every time.\n * @param {string} fieldName - Defines the field name.\n * @param {number} toIndex - Defines the destination field index.\n * @return {void}\n */\n\n\n Grid.prototype.reorderColumnByTargetIndex = function (fieldName, toIndex) {\n if (this.reorderModule) {\n this.reorderModule.reorderColumnByTargetIndex(fieldName, toIndex);\n }\n };\n /**\n * Changes the Grid Row position with given indexes.\n * @param {number} fromIndexes - Defines the origin Indexes.\n * @param {number} toIndex - Defines the destination Index.\n * @return {void}\n */\n\n\n Grid.prototype.reorderRows = function (fromIndexes, toIndex) {\n if (this.rowDragAndDropModule) {\n this.rowDragAndDropModule.reorderRows(fromIndexes, toIndex);\n }\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.refreshDataSource = function (e, args) {\n this.notify('refreshdataSource', e);\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.disableRowDD = function (enable) {\n var headerTable = this.getHeaderTable();\n var contentTable = this.getContentTable();\n var headerRows = headerTable.querySelectorAll('th.e-rowdragheader, th.e-mastercell');\n var rows = this.getRows();\n var disValue = enable ? 'none' : '';\n setStyleAttribute(headerTable.querySelector(literals.colGroup).childNodes[0], {\n 'display': disValue\n });\n setStyleAttribute(contentTable.querySelector(literals.colGroup).childNodes[0], {\n 'display': disValue\n });\n\n for (var i = 0; i < this.getRows().length; i++) {\n var ele = rows[i].firstElementChild;\n enable ? addClass([ele], 'e-hide') : removeClass([ele], ['e-hide']);\n }\n\n for (var j = 0; j < headerTable.querySelectorAll('th.e-rowdragheader, th.e-mastercell').length; j++) {\n var ele = headerRows[j];\n enable ? addClass([ele], 'e-hide') : removeClass([ele], ['e-hide']);\n }\n };\n /**\n * Changes the column width to automatically fit its content to ensure that the width shows the content without wrapping/hiding.\n * > * This method ignores the hidden columns.\n * > * Uses the `autoFitColumns` method in the `dataBound` event to resize at initial rendering.\n * @param {string |string[]} fieldNames - Defines the column names.\n * @return {void}\n *\n *\n * ```typescript\n *
\n * \n * ```\n *\n */\n\n\n Grid.prototype.autoFitColumns = function (fieldNames) {\n if (this.resizeModule) {\n this.resizeModule.autoFitColumns(fieldNames);\n }\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.createColumnchooser = function (x, y, target) {\n if (this.columnChooserModule) {\n this.columnChooserModule.renderColumnChooser(x, y, target);\n }\n };\n\n Grid.prototype.initializeServices = function () {\n this.serviceLocator.register('widthService', this.widthService = new ColumnWidthService(this));\n this.serviceLocator.register('cellRendererFactory', new CellRendererFactory());\n this.serviceLocator.register('rendererFactory', new RendererFactory());\n this.serviceLocator.register('localization', this.localeObj = new L10n(this.getModuleName(), this.defaultLocale, this.locale));\n this.serviceLocator.register('valueFormatter', this.valueFormatterService = new ValueFormatter(this.locale));\n this.serviceLocator.register('showHideService', this.showHider = new ShowHide(this));\n this.serviceLocator.register('ariaService', this.ariaService = new AriaService());\n this.serviceLocator.register('focus', this.focusModule = new FocusStrategy(this));\n };\n\n Grid.prototype.processModel = function () {\n var gCols = this.groupSettings.columns;\n var sCols = this.sortSettings.columns;\n var flag;\n var j;\n\n if (this.allowGrouping) {\n var _loop_1 = function _loop_1(i, len) {\n j = 0;\n\n for (var sLen = sCols.length; j < sLen; j++) {\n if (sCols[j].field === gCols[i]) {\n flag = true;\n break;\n }\n }\n\n if (!flag) {\n sCols.push({\n field: gCols[i],\n direction: 'Ascending',\n isFromGroup: true\n });\n } else {\n if (this_1.allowSorting) {\n this_1.sortedColumns.push(sCols[j].field);\n } else {\n sCols[j].direction = 'Ascending';\n }\n }\n\n if (!this_1.groupSettings.showGroupedColumn) {\n var column = this_1.enableColumnVirtualization ? this_1.columns.filter(function (c) {\n return c.field === gCols[i];\n })[0] : this_1.getColumnByField(gCols[i]);\n\n if (column) {\n column.visible = false;\n } else {\n this_1.log('initial_action', {\n moduleName: 'group',\n columnName: gCols[i]\n });\n }\n }\n };\n\n var this_1 = this;\n\n for (var i = 0, len = gCols.length; i < len; i++) {\n _loop_1(i, len);\n }\n }\n\n if (!gCols.length) {\n for (var i = 0; i < sCols.length; i++) {\n this.sortedColumns.push(sCols[i].field);\n }\n }\n\n this.rowTemplateFn = templateCompiler(this.rowTemplate);\n this.detailTemplateFn = templateCompiler(this.detailTemplate);\n this.editTemplateFn = templateCompiler(this.editSettings.template);\n this.editHeaderTemplateFn = templateCompiler(this.editSettings.headerTemplate);\n this.editFooterTemplateFn = templateCompiler(this.editSettings.footerTemplate);\n\n if (!isNullOrUndefined(this.parentDetails)) {\n var value = isNullOrUndefined(this.parentDetails.parentKeyFieldValue) ? 'undefined' : this.parentDetails.parentKeyFieldValue;\n this.query.where(this.queryString, 'equal', value, true);\n }\n\n this.initForeignColumn();\n };\n\n Grid.prototype.initForeignColumn = function () {\n if (this.isForeignKeyEnabled(this.getColumns())) {\n this.notify(events.initForeignKeyColumn, this.getForeignKeyColumns());\n }\n };\n\n Grid.prototype.enableVerticalRendering = function () {\n if (this.rowRenderingMode === 'Vertical') {\n this.element.classList.add('e-row-responsive');\n } else {\n this.element.classList.remove('e-row-responsive');\n }\n };\n\n Grid.prototype.gridRender = function () {\n this.updateRTL();\n\n if (this.rowRenderingMode === 'Vertical') {\n this.element.classList.add('e-row-responsive');\n }\n\n if (this.enableHover) {\n this.element.classList.add('e-gridhover');\n }\n\n if (Browser.isDevice) {\n this.element.classList.add('e-device');\n }\n\n if (this.rowHeight) {\n this.element.classList.add('e-grid-min-height');\n }\n\n classList(this.element, ['e-responsive', 'e-default'], []);\n var rendererFactory = this.serviceLocator.getService('rendererFactory');\n this.headerModule = rendererFactory.getRenderer(RenderType.Header);\n this.contentModule = rendererFactory.getRenderer(RenderType.Content);\n this.printModule = new Print(this, this.scrollModule);\n this.clipboardModule = new Clipboard(this);\n this.renderModule.render();\n this.eventInitializer();\n this.createGridPopUpElement();\n this.widthService.setWidthToColumns();\n this.updateGridLines();\n this.applyTextWrap();\n this.createTooltip(); //for clip mode ellipsis\n\n this.enableBoxSelection();\n };\n\n Grid.prototype.dataReady = function () {\n this.scrollModule.setWidth();\n this.scrollModule.setHeight();\n\n if (this.height !== 'auto') {\n this.scrollModule.setPadding();\n }\n };\n\n Grid.prototype.updateRTL = function () {\n if (this.enableRtl) {\n this.element.classList.add('e-rtl');\n } else {\n this.element.classList.remove('e-rtl');\n }\n };\n\n Grid.prototype.createGridPopUpElement = function () {\n var popup = this.createElement('div', {\n className: 'e-gridpopup',\n styles: 'display:none;'\n });\n var content = this.createElement('div', {\n className: literals.content,\n attrs: {\n tabIndex: '-1'\n }\n });\n append([content, this.createElement('div', {\n className: 'e-uptail e-tail'\n })], popup);\n content.appendChild(this.createElement('span'));\n append([content, this.createElement('div', {\n className: 'e-downtail e-tail'\n })], popup);\n this.element.appendChild(popup);\n };\n\n Grid.prototype.updateGridLines = function () {\n classList(this.element, [], ['e-verticallines', 'e-horizontallines', 'e-hidelines', 'e-bothlines']);\n\n switch (this.gridLines) {\n case 'Horizontal':\n this.element.classList.add('e-horizontallines');\n break;\n\n case 'Vertical':\n this.element.classList.add('e-verticallines');\n break;\n\n case 'None':\n this.element.classList.add('e-hidelines');\n break;\n\n case 'Both':\n this.element.classList.add('e-bothlines');\n break;\n }\n\n this.updateResizeLines();\n };\n\n Grid.prototype.updateResizeLines = function () {\n if (this.allowResizing && !(this.gridLines === 'Vertical' || this.gridLines === 'Both')) {\n this.element.classList.add('e-resize-lines');\n } else {\n this.element.classList.remove('e-resize-lines');\n }\n };\n /**\n * The function is used to apply text wrap\n * @return {void}\n * @hidden\n */\n\n\n Grid.prototype.applyTextWrap = function () {\n if (this.allowTextWrap) {\n var headerRows = [].slice.call(this.element.getElementsByClassName('e-columnheader'));\n\n switch (this.textWrapSettings.wrapMode) {\n case 'Header':\n wrap(this.element, false);\n wrap(this.getContent(), false);\n wrap(headerRows, true);\n break;\n\n case 'Content':\n wrap(this.getContent(), true);\n wrap(this.element, false);\n wrap(headerRows, false);\n break;\n\n default:\n wrap(this.element, true);\n wrap(this.getContent(), false);\n wrap(headerRows, false);\n }\n\n if (this.textWrapSettings.wrapMode !== 'Content') {\n this.notify(events.refreshHandlers, {});\n }\n }\n };\n /**\n * The function is used to remove text wrap\n * @return {void}\n * @hidden\n */\n\n\n Grid.prototype.removeTextWrap = function () {\n wrap(this.element, false);\n var headerRows = [].slice.call(this.element.getElementsByClassName('e-columnheader'));\n wrap(headerRows, false);\n wrap(this.getContent(), false);\n\n if (this.textWrapSettings.wrapMode !== 'Content') {\n this.notify(events.refreshHandlers, {});\n }\n };\n /**\n * The function is used to add Tooltip to the grid cell that has ellipsiswithtooltip clip mode.\n * @return {void}\n * @hidden\n */\n\n\n Grid.prototype.createTooltip = function () {\n this.toolTipObj = new Tooltip({\n opensOn: 'custom',\n content: ''\n }, this.element);\n };\n /** @hidden */\n\n\n Grid.prototype.freezeRefresh = function () {\n this.isFreezeRefresh = true;\n\n if (this.enableVirtualization) {\n this.pageSettings.currentPage = 1;\n }\n\n this.componentRefresh();\n };\n\n Grid.prototype.getTooltipStatus = function (element) {\n var width;\n var headerTable = this.getHeaderTable();\n var contentTable = this.getContentTable();\n var headerDivTag = 'e-gridheader';\n var contentDivTag = literals.gridContent;\n var htable = this.createTable(headerTable, headerDivTag, 'header');\n var ctable = this.createTable(headerTable, headerDivTag, 'content');\n var td = element;\n var table = element.classList.contains('e-headercell') ? htable : ctable;\n var ele = element.classList.contains('e-headercell') ? 'th' : 'tr';\n table.querySelector(ele).className = element.className;\n table.querySelector(ele).innerHTML = element.innerHTML;\n width = table.querySelector(ele).getBoundingClientRect().width;\n document.body.removeChild(htable);\n document.body.removeChild(ctable);\n\n if (width > element.getBoundingClientRect().width) {\n return true;\n }\n\n return false;\n };\n\n Grid.prototype.mouseMoveHandler = function (e) {\n if (this.isEllipsisTooltip()) {\n var element = parentsUntil(e.target, 'e-ellipsistooltip');\n\n if (this.prevElement !== element || e.type === 'mouseout') {\n this.toolTipObj.close();\n }\n\n var tagName = e.target.tagName;\n var elemNames = ['A', 'BUTTON', 'INPUT'];\n\n if (element && e.type !== 'mouseout' && !(Browser.isDevice && elemNames.indexOf(tagName) !== -1)) {\n if (element.getAttribute('aria-describedby')) {\n return;\n }\n\n if (this.getTooltipStatus(element)) {\n if (element.getElementsByClassName('e-headertext').length) {\n this.toolTipObj.content = element.getElementsByClassName('e-headertext')[0].innerText;\n } else {\n this.toolTipObj.content = element.innerText;\n }\n\n this.prevElement = element;\n this.toolTipObj.open(element);\n }\n }\n }\n\n this.hoverFrozenRows(e);\n };\n /** @hidden */\n\n\n Grid.prototype.hoverFrozenRows = function (e) {\n if (this.isFrozenGrid()) {\n var row = parentsUntil(e.target, literals.row);\n\n if ([].slice.call(this.element.getElementsByClassName('e-frozenhover')).length && e.type === 'mouseout') {\n var rows = [].slice.call(this.element.getElementsByClassName('e-frozenhover'));\n\n for (var i = 0; i < rows.length; i++) {\n rows[i].classList.remove('e-frozenhover');\n }\n } else if (row) {\n var rows = [].slice.call(this.element.querySelectorAll('tr[aria-rowindex=\"' + row.getAttribute(literals.ariaRowIndex) + '\"]'));\n rows.splice(rows.indexOf(row), 1);\n\n for (var i = 0; i < rows.length; i++) {\n if (row.getAttribute('aria-selected') != 'true' && rows[i]) {\n rows[i].classList.add('e-frozenhover');\n } else if (rows[i]) {\n rows[i].classList.remove('e-frozenhover');\n }\n }\n }\n }\n };\n\n Grid.prototype.isEllipsisTooltip = function () {\n var cols = this.getColumns();\n\n if (this.clipMode === 'EllipsisWithTooltip') {\n return true;\n }\n\n for (var i = 0; i < cols.length; i++) {\n if (cols[i].clipMode === 'EllipsisWithTooltip') {\n return true;\n }\n }\n\n return false;\n };\n\n Grid.prototype.scrollHandler = function () {\n if (this.isEllipsisTooltip()) {\n this.toolTipObj.close();\n }\n };\n /**\n * To create table for ellipsiswithtooltip\n * @hidden\n */\n\n\n Grid.prototype.createTable = function (table, tag, type) {\n var myTableDiv = this.createElement('div');\n myTableDiv.className = this.element.className;\n myTableDiv.style.cssText = 'display: inline-block;visibility:hidden;position:absolute';\n var mySubDiv = this.createElement('div');\n mySubDiv.className = tag;\n var myTable = this.createElement('table');\n myTable.className = table.className;\n myTable.style.cssText = 'table-layout: auto;width: auto';\n var ele = type === 'header' ? 'th' : 'td';\n var myTr = this.createElement('tr');\n var mytd = this.createElement(ele);\n myTr.appendChild(mytd);\n myTable.appendChild(myTr);\n mySubDiv.appendChild(myTable);\n myTableDiv.appendChild(mySubDiv);\n document.body.appendChild(myTableDiv);\n return myTableDiv;\n };\n\n Grid.prototype.onKeyPressed = function (e) {\n if (e.action === 'tab' || e.action === 'shiftTab') {\n this.toolTipObj.close();\n }\n };\n /**\n * Binding events to the element while component creation.\n * @hidden\n */\n\n\n Grid.prototype.wireEvents = function () {\n EventHandler.add(this.element, 'click', this.mouseClickHandler, this);\n EventHandler.add(this.element, 'touchend', this.mouseClickHandler, this);\n EventHandler.add(this.element, 'focusout', this.focusOutHandler, this);\n EventHandler.add(this.element, 'dblclick', this.dblClickHandler, this);\n EventHandler.add(this.element, 'keydown', this.keyPressHandler, this);\n /* tslint:disable-next-line:no-any */\n\n EventHandler.add(window, 'resize', this.resetIndentWidth, this);\n\n if (this.allowKeyboard) {\n this.element.tabIndex = this.element.tabIndex === -1 ? 0 : this.element.tabIndex;\n }\n\n this.keyboardModule = new KeyboardEvents(this.element, {\n keyAction: this.keyActionHandler.bind(this),\n keyConfigs: this.keyConfigs,\n eventName: 'keydown'\n });\n EventHandler.add(this.getContent().firstElementChild, 'scroll', this.scrollHandler, this);\n EventHandler.add(this.element, 'mousemove', this.mouseMoveHandler, this);\n EventHandler.add(this.element, 'mouseout', this.mouseMoveHandler, this);\n EventHandler.add(this.getContent(), 'touchstart', this.tapEvent, this);\n EventHandler.add(document.body, 'keydown', this.keyDownHandler, this);\n };\n /**\n * Unbinding events from the element while component destroy.\n * @hidden\n */\n\n\n Grid.prototype.unwireEvents = function () {\n EventHandler.remove(this.element, 'click', this.mouseClickHandler);\n EventHandler.remove(this.element, 'touchend', this.mouseClickHandler);\n EventHandler.remove(this.element, 'focusout', this.focusOutHandler);\n EventHandler.remove(this.element, 'dblclick', this.dblClickHandler);\n EventHandler.remove(this.getContent().firstElementChild, 'scroll', this.scrollHandler);\n EventHandler.remove(this.element, 'mousemove', this.mouseMoveHandler);\n EventHandler.remove(this.element, 'mouseout', this.mouseMoveHandler);\n EventHandler.remove(this.element, 'keydown', this.keyPressHandler);\n EventHandler.remove(this.getContent(), 'touchstart', this.tapEvent);\n EventHandler.remove(document.body, 'keydown', this.keyDownHandler);\n /* tslint:disable-next-line:no-any */\n\n EventHandler.remove(window, 'resize', this.resetIndentWidth);\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.addListener = function () {\n if (this.isDestroyed) {\n return;\n }\n\n this.on(events.dataReady, this.dataReady, this);\n this.on(events.contentReady, this.recalcIndentWidth, this);\n this.on(events.headerRefreshed, this.recalcIndentWidth, this);\n this.dataBoundFunction = this.refreshMediaCol.bind(this);\n this.addEventListener(events.dataBound, this.dataBoundFunction);\n this.on(events.keyPressed, this.onKeyPressed, this);\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.removeListener = function () {\n if (this.isDestroyed) {\n return;\n }\n\n this.off(events.dataReady, this.dataReady);\n this.off(events.contentReady, this.recalcIndentWidth);\n this.off(events.headerRefreshed, this.recalcIndentWidth);\n this.removeEventListener(events.dataBound, this.dataBoundFunction);\n this.off(events.keyPressed, this.onKeyPressed);\n };\n /**\n * Get current visible data of grid.\n * @return {Object[]}\n * @isGenericType true\n */\n\n\n Grid.prototype.getCurrentViewRecords = function () {\n if (isGroupAdaptive(this)) {\n return isNullOrUndefined(this.currentViewData.records) ? this.currentViewData : this.currentViewData.records;\n }\n\n if (this.groupSettings.enableLazyLoading) {\n return this.currentViewData;\n }\n\n ;\n return this.allowGrouping && this.groupSettings.columns.length && this.currentViewData.length && this.currentViewData.records ? this.currentViewData.records : this.currentViewData;\n };\n\n Grid.prototype.mouseClickHandler = function (e) {\n if (this.isChildGrid(e) || parentsUntil(e.target, 'e-gridpopup') && e.touches || this.element.getElementsByClassName('e-cloneproperties').length || this.checkEdit(e)) {\n return;\n }\n\n if ((!this.allowRowDragAndDrop && (parentsUntil(e.target, literals.gridContent) || e.target.tagName === 'TD') || !(this.allowGrouping || this.allowReordering) && parentsUntil(e.target, 'e-gridheader')) && e.touches) {\n return;\n }\n\n if (parentsUntil(e.target, 'e-gridheader') && this.allowRowDragAndDrop && !parentsUntil(e.target, 'e-filterbarcell')) {\n e.preventDefault();\n }\n\n var args = this.getRowInfo(e.target);\n var cancel = 'cancel';\n args[cancel] = false;\n var isDataRow = false;\n var tr = closest(e.target, 'tr');\n\n if (tr && tr.getAttribute('data-uid')) {\n var rowObj = this.getRowObjectFromUID(tr.getAttribute('data-uid'));\n isDataRow = rowObj ? rowObj.isDataRow : false;\n }\n\n if (isDataRow) {\n this.trigger(events.recordClick, args);\n }\n\n this.notify(events.click, e);\n };\n\n Grid.prototype.checkEdit = function (e) {\n var tr = parentsUntil(e.target, literals.row);\n var isEdit = this.editSettings.mode !== 'Batch' && this.isEdit && tr && (tr.classList.contains(literals.editedRow) || tr.classList.contains(literals.addedRow));\n return !parentsUntil(e.target, 'e-unboundcelldiv') && (isEdit || parentsUntil(e.target, literals.rowCell) && parentsUntil(e.target, literals.rowCell).classList.contains('e-editedbatchcell'));\n };\n\n Grid.prototype.dblClickHandler = function (e) {\n var grid = parentsUntil(e.target, 'e-grid');\n\n if (isNullOrUndefined(grid) || grid.id !== this.element.id || closest(e.target, '.e-unboundcelldiv')) {\n return;\n }\n\n var dataRow = false;\n var tr = closest(e.target, 'tr');\n\n if (tr && tr.getAttribute('data-uid')) {\n var rowObj = this.getRowObjectFromUID(tr.getAttribute('data-uid'));\n dataRow = rowObj ? rowObj.isDataRow : false;\n }\n\n var args = this.getRowInfo(e.target);\n args.target = e.target;\n\n if (dataRow) {\n this.trigger(events.recordDoubleClick, args);\n }\n\n this.notify(events.dblclick, e);\n };\n\n Grid.prototype.focusOutHandler = function (e) {\n if (this.isChildGrid(e)) {\n return;\n }\n\n if (!parentsUntil(e.target, 'e-grid')) {\n this.element.querySelector('.e-gridpopup').style.display = 'None';\n }\n\n var filterClear = this.element.querySelector('.e-cancel:not(.e-hide)');\n\n if (filterClear) {\n filterClear.classList.add('e-hide');\n }\n\n var relatedTarget = e.relatedTarget;\n var ariaOwns = relatedTarget ? relatedTarget.getAttribute('aria-owns') : null;\n\n if ((!relatedTarget || !parentsUntil(relatedTarget, 'e-grid') && (!isNullOrUndefined(ariaOwns) && ariaOwns) !== e.target.getAttribute('aria-owns')) && !this.keyPress && this.isEdit && !Browser.isDevice) {\n if (this.editSettings.mode === 'Batch') {\n this.editModule.saveCell();\n this.notify(events.editNextValCell, {});\n }\n\n if (this.editSettings.mode === 'Normal') {\n this.editModule.editFormValidate();\n }\n }\n\n this.keyPress = false;\n };\n\n Grid.prototype.isChildGrid = function (e) {\n var gridElement = parentsUntil(e.target, 'e-grid');\n\n if (gridElement && gridElement.id !== this.element.id) {\n return true;\n }\n\n return false;\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.mergePersistGridData = function (persistedData) {\n var data = this.getLocalData();\n\n if (!(isNullOrUndefined(data) || data === '') || !isNullOrUndefined(persistedData)) {\n var dataObj = !isNullOrUndefined(persistedData) ? persistedData : JSON.parse(data);\n\n if (this.enableVirtualization) {\n dataObj.pageSettings.currentPage = 1;\n }\n\n var keys = Object.keys(dataObj);\n this.isProtectedOnChange = true;\n\n for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {\n var key = keys_1[_i];\n\n if (typeof this[key] === 'object' && !isNullOrUndefined(this[key])) {\n if (Array.isArray(this[key]) && key === 'columns') {\n setColumnIndex(this[key]);\n this.mergeColumns(dataObj[key], this[key]);\n this[key] = dataObj[key];\n } else {\n extend(this[key], dataObj[key]);\n }\n } else {\n this[key] = dataObj[key];\n }\n }\n\n this.isProtectedOnChange = false;\n }\n };\n\n Grid.prototype.mergeColumns = function (storedColumn, columns) {\n var storedColumns = storedColumn;\n\n var _loop_2 = function _loop_2(i) {\n var localCol = columns.filter(function (tCol) {\n return tCol.index === storedColumns[i].index;\n })[0];\n\n if (!isNullOrUndefined(localCol)) {\n if (localCol.columns && localCol.columns.length) {\n this_2.mergeColumns(storedColumns[i].columns, localCol.columns);\n storedColumns[i] = extend(localCol, storedColumns[i], {}, true);\n } else {\n storedColumns[i] = extend(localCol, storedColumns[i], {}, true);\n }\n }\n };\n\n var this_2 = this;\n\n for (var i = 0; i < storedColumns.length; i++) {\n _loop_2(i);\n }\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.isDetail = function () {\n return !isNullOrUndefined(this.detailTemplate) || !isNullOrUndefined(this.childGrid);\n };\n\n Grid.prototype.isCommandColumn = function (columns) {\n var _this = this;\n\n return columns.some(function (col) {\n if (col.columns) {\n return _this.isCommandColumn(col.columns);\n }\n\n return !!(col.commands || col.commandsTemplate);\n });\n };\n\n Grid.prototype.isForeignKeyEnabled = function (columns) {\n var _this = this;\n\n return columns.some(function (col) {\n if (col.columns) {\n return _this.isForeignKeyEnabled(col.columns);\n }\n\n return !!(col.dataSource && col.foreignKeyValue);\n });\n };\n\n Grid.prototype.keyPressHandler = function (e) {\n var presskey = extend(e, {\n cancel: false\n });\n this.trigger(\"keyPressed\", presskey);\n\n if (presskey.cancel === true) {\n e.stopImmediatePropagation();\n }\n };\n\n Grid.prototype.keyDownHandler = function (e) {\n if (e.altKey) {\n if (e.keyCode === 74) {\n //alt j\n if (this.keyA) {\n //alt A J\n this.notify(events.groupCollapse, {\n target: e.target,\n collapse: false\n });\n this.keyA = false;\n } else {\n this.focusModule.focusHeader();\n this.focusModule.addOutline();\n }\n }\n\n if (e.keyCode === 87) {\n //alt w\n this.focusModule.focusContent();\n this.focusModule.addOutline();\n }\n\n if (e.keyCode === 65) {\n //alt A\n this.keyA = true;\n }\n\n if (e.keyCode === 72 && this.keyA) {\n //alt A H\n this.notify(events.groupCollapse, {\n target: e.target,\n collapse: true\n });\n this.keyA = false;\n }\n }\n\n if (e.keyCode === 13) {\n this.notify(events.enterKeyHandler, e);\n }\n };\n\n Grid.prototype.keyActionHandler = function (e) {\n if (this.isChildGrid(e) || this.isEdit && e.action !== 'escape' && e.action !== 'enter' && e.action !== 'shiftEnter' && e.action !== 'tab' && e.action !== 'shiftTab') {\n return;\n } else {\n this.keyPress = true;\n }\n\n if (this.allowKeyboard) {\n if (e.action === 'ctrlPlusP') {\n e.preventDefault();\n this.print();\n }\n\n this.notify(events.keyPressed, e);\n }\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.setInjectedModules = function (modules) {\n this.injectedModules = modules;\n };\n\n Grid.prototype.updateColumnObject = function () {\n prepareColumns(this.columns, this.enableColumnVirtualization, this);\n setColumnIndex(this.columns);\n this.initForeignColumn();\n this.notify(events.autoCol, {});\n };\n /**\n * Gets the foreign columns from Grid.\n * @return {Column[]}\n * @blazorType List\n */\n\n\n Grid.prototype.getForeignKeyColumns = function () {\n return this.getColumns().filter(function (col) {\n return col.isForeignColumn();\n });\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.getRowHeight = function () {\n return this.rowHeight ? this.rowHeight : getRowHeight(this.element);\n };\n /**\n * Refreshes the Grid column changes.\n */\n\n\n Grid.prototype.refreshColumns = function () {\n this.setFrozenCount();\n var fCnt = this.getContent().querySelector('.e-frozen-left-content');\n var frCnt = this.getContent().querySelector('.e-frozen-right-content');\n var isColFrozen = !this.frozenRightCount && !this.frozenLeftCount;\n var isFrozen = this.getFrozenColumns() !== 0;\n\n if (!isFrozen && (!fCnt && this.frozenLeftCount || !frCnt && this.frozenRightCount || fCnt && !this.frozenLeftCount || frCnt && !this.frozenRightCount)) {\n this.tableIndex = 0;\n this.tablesCount = 1;\n\n if (this.enableColumnVirtualization) {\n this.columnModel = [];\n this.updateColumnModel(this.columns);\n }\n\n this.freezeRefresh();\n } else if (isColFrozen && (this.getFrozenColumns() === 1 && !fCnt || this.getFrozenColumns() === 0 && fCnt)) {\n this.tableIndex = 0;\n this.tablesCount = 1;\n\n if (this.enableColumnVirtualization) {\n this.columnModel = [];\n this.updateColumnModel(this.columns);\n }\n\n this.freezeRefresh();\n } else {\n this.isPreventScrollEvent = true;\n this.updateColumnObject();\n this.checkLockColumns(this.getColumns());\n this.refresh();\n\n if (this.isFrozenGrid()) {\n var mTbl = this.contentModule.getMovableContent().querySelector('.' + literals.table);\n remove(mTbl.querySelector(literals.colGroup));\n var colGroup = this.getHeaderContent().querySelector('.' + literals.movableHeader).querySelector(literals.colGroup).cloneNode(true);\n mTbl.insertBefore(colGroup, mTbl.querySelector(literals.tbody));\n\n if (this.getFrozenMode() === 'Left-Right') {\n var frTbl = this.contentModule.getFrozenRightContent().querySelector('.' + literals.table);\n remove(frTbl.querySelector(literals.colGroup));\n var colGrp = this.getHeaderContent().querySelector('.e-frozen-right-header').querySelector(literals.colGroup).cloneNode(true);\n frTbl.insertBefore(colGrp, frTbl.querySelector(literals.tbody));\n }\n }\n }\n\n if (this.isFrozenGrid()) {\n var left = this.getContent().querySelector('.e-movablescrollbar').scrollLeft;\n this.headerModule.getMovableHeader().scrollLeft = left;\n this.contentModule.getMovableContent().scrollLeft = left;\n }\n };\n /**\n * Export Grid data to Excel file(.xlsx).\n * @param {ExcelExportProperties} excelExportProperties - Defines the export properties of the Grid.\n * @param {boolean} isMultipleExport - Define to enable multiple export.\n * @param {workbook} workbook - Defines the Workbook if multiple export is enabled.\n * @param {boolean} isBlob - If 'isBlob' set to true, then it will be returned as blob data.\n * @return {Promise}\n * @blazorType void\n */\n\n\n Grid.prototype.excelExport = function (excelExportProperties, isMultipleExport,\n /* tslint:disable-next-line:no-any */\n workbook, isBlob) {\n return this.excelExportModule ? this.excelExportModule.Map(this, excelExportProperties, isMultipleExport, workbook, false, isBlob) : null;\n };\n /**\n * Export Grid data to CSV file.\n * @param {ExcelExportProperties} excelExportProperties - Defines the export properties of the Grid.\n * @param {boolean} isMultipleExport - Define to enable multiple export.\n * @param {workbook} workbook - Defines the Workbook if multiple export is enabled.\n * @param {boolean} isBlob - If 'isBlob' set to true, then it will be returned as blob data.\n * @return {Promise}\n * @blazorType void\n */\n\n\n Grid.prototype.csvExport = function (excelExportProperties,\n /* tslint:disable-next-line:no-any */\n isMultipleExport, workbook, isBlob) {\n return this.excelExportModule ? this.excelExportModule.Map(this, excelExportProperties, isMultipleExport, workbook, true, isBlob) : null;\n };\n /**\n * Export Grid data to PDF document.\n * @param {pdfExportProperties} PdfExportProperties - Defines the export properties of the Grid.\n * @param {isMultipleExport} isMultipleExport - Define to enable multiple export.\n * @param {pdfDoc} pdfDoc - Defined the Pdf Document if multiple export is enabled.\n * @param {boolean} isBlob - If 'isBlob' set to true, then it will be returned as blob data.\n * @return {Promise}\n * @blazorType void\n */\n\n\n Grid.prototype.pdfExport = function (pdfExportProperties,\n /* tslint:disable-next-line:no-any */\n isMultipleExport, pdfDoc, isBlob) {\n return this.pdfExportModule ? this.pdfExportModule.Map(this, pdfExportProperties, isMultipleExport, pdfDoc, isBlob) : null;\n };\n /**\n * Groups a column by column name.\n * @param {string} columnName - Defines the column name to group.\n * @return {void}\n */\n\n\n Grid.prototype.groupColumn = function (columnName) {\n if (this.groupModule) {\n this.groupModule.groupColumn(columnName);\n }\n };\n /**\n * Expands all the grouped rows of the Grid.\n * @return {void}\n */\n\n\n Grid.prototype.groupExpandAll = function () {\n if (this.groupModule) {\n this.groupModule.expandAll();\n }\n };\n /**\n * Collapses all the grouped rows of the Grid.\n * @return {void}\n */\n\n\n Grid.prototype.groupCollapseAll = function () {\n if (this.groupModule) {\n this.groupModule.collapseAll();\n }\n };\n /**\n * Expands or collapses grouped rows by target element.\n * @param {Element} target - Defines the target element of the grouped row.\n * @return {void}\n */\n // public expandCollapseRows(target: Element): void {\n // if (this.groupModule) {\n // this.groupModule.expandCollapseRows(target);\n // }\n // }\n\n /**\n * Clears all the grouped columns of the Grid.\n * @return {void}\n */\n\n\n Grid.prototype.clearGrouping = function () {\n if (this.groupModule) {\n this.groupModule.clearGrouping();\n }\n };\n /**\n * Ungroups a column by column name.\n *\n * {% codeBlock src='grid/ungroupColumn/index.md' %}{% endcodeBlock %}\n *\n * @param {string} columnName - Defines the column name to ungroup.\n * @return {void}\n */\n\n\n Grid.prototype.ungroupColumn = function (columnName) {\n if (this.groupModule) {\n this.groupModule.ungroupColumn(columnName);\n }\n };\n /**\n * Column chooser can be displayed on screen by given position(X and Y axis).\n * @param {number} X - Defines the X axis.\n * @param {number} Y - Defines the Y axis.\n * @return {void}\n */\n\n\n Grid.prototype.openColumnChooser = function (x, y) {\n if (this.columnChooserModule) {\n this.columnChooserModule.openColumnChooser(x, y);\n }\n };\n\n Grid.prototype.scrollRefresh = function () {\n var _this = this;\n\n var refresh = function refresh() {\n _this.scrollModule.refresh();\n\n _this.off(events.contentReady, refresh);\n };\n\n this.on(events.contentReady, refresh, this);\n };\n /**\n * Collapses a detail row with the given target.\n * @param {Element} target - Defines the expanded element to collapse.\n * @return {void}\n */\n // public detailCollapse(target: number | Element): void {\n // if (this.detailRowModule) {\n // this.detailRowModule.collapse(target);\n // }\n // }\n\n /**\n * Collapses all the detail rows of the Grid.\n * @return {void}\n */\n\n\n Grid.prototype.detailCollapseAll = function () {\n if (this.detailRowModule) {\n this.detailRowModule.collapseAll();\n }\n };\n /**\n * Expands a detail row with the given target.\n * @param {Element} target - Defines the collapsed element to expand.\n * @return {void}\n */\n // public detailExpand(target: number | Element): void {\n // if (this.detailRowModule) {\n // this.detailRowModule.expand(target);\n // }\n // }\n\n /**\n * Expands all the detail rows of the Grid.\n * @return {void}\n */\n\n\n Grid.prototype.detailExpandAll = function () {\n if (this.detailRowModule) {\n this.detailRowModule.expandAll();\n }\n };\n /**\n * Deselects the currently selected cells.\n * @return {void}\n */\n\n\n Grid.prototype.clearCellSelection = function () {\n if (this.selectionModule) {\n this.selectionModule.clearCellSelection();\n }\n };\n /**\n * Deselects the currently selected rows.\n * @return {void}\n */\n\n\n Grid.prototype.clearRowSelection = function () {\n if (this.selectionModule) {\n this.selectionModule.clearRowSelection();\n }\n };\n /**\n * Selects a collection of cells by row and column indexes.\n * @param {ISelectedCell[]} rowCellIndexes - Specifies the row and column indexes.\n * @return {void}\n */\n\n\n Grid.prototype.selectCells = function (rowCellIndexes) {\n if (this.selectionModule) {\n this.selectionModule.selectCells(rowCellIndexes);\n }\n };\n /**\n * Selects a range of rows from start and end row indexes.\n * @param {number} startIndex - Specifies the start row index.\n * @param {number} endIndex - Specifies the end row index.\n * @return {void}\n */\n\n\n Grid.prototype.selectRowsByRange = function (startIndex, endIndex) {\n if (this.selectionModule) {\n this.selectionModule.selectRowsByRange(startIndex, endIndex);\n }\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.isContextMenuOpen = function () {\n return this.contextMenuModule && this.contextMenuModule.isOpen;\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.ensureModuleInjected = function (module) {\n return this.getInjectedModules().indexOf(module) >= 0;\n };\n /**\n * Destroys the given template reference.\n * @param {string[]} propertyNames - Defines the collection of template name.\n */\n //tslint:disable-next-line:no-any\n\n\n Grid.prototype.destroyTemplate = function (propertyNames, index) {\n this.clearTemplate(propertyNames, index);\n };\n /**\n * @hidden\n * @private\n */\n\n\n Grid.prototype.log = function (type, args) {\n this.loggerModule ? this.loggerModule.log(type, args) : function () {\n return 0;\n }();\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.applyBiggerTheme = function (element) {\n if (this.element.classList.contains('e-bigger')) {\n element.classList.add('e-bigger');\n }\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.getPreviousRowData = function () {\n var previousRowData = this.getRowsObject()[this.getRows().length - 1].data;\n return previousRowData;\n };\n /**\n * Hides the scrollbar placeholder of Grid content when grid content is not overflown.\n * @return {void}\n */\n\n\n Grid.prototype.hideScroll = function () {\n var content = this.getContent().querySelector('.' + literals.content);\n var scrollBar = this.getContent().querySelector('.e-scrollbar');\n\n if (content.scrollHeight <= content.clientHeight) {\n this.scrollModule.removePadding();\n content.style.overflowY = 'auto';\n }\n\n if (this.isFrozenGrid() && scrollBar) {\n var mvblScrollBar = this.getContent().querySelector('.e-movablescrollbar');\n var mvblChild = this.getContent().querySelector('.e-movablechild');\n scrollBar.style.display = 'flex';\n\n if (mvblScrollBar.offsetWidth >= mvblChild.offsetWidth) {\n scrollBar.style.display = 'none';\n this.notify(events.frozenHeight, 0);\n }\n }\n };\n /**\n * Get row index by primary key or row data.\n * @param {string} value - Defines the primary key value.\n * @param {Object} value - Defines the row data.\n */\n\n\n Grid.prototype.getRowIndexByPrimaryKey = function (value) {\n var pkName = this.getPrimaryKeyFieldNames()[0];\n value = typeof value === 'object' ? value[pkName] : value;\n var rows = this.getRowsObject();\n\n for (var i = 0; i < rows.length; i++) {\n if (rows[i].isDetailRow || rows[i].isCaptionRow) {\n continue;\n }\n\n var pKvalue = rows[i].data[pkName];\n\n if (pkName.split('.').length > 1) {\n pKvalue = performComplexDataOperation(pkName, rows[i].data);\n }\n\n if (pKvalue === value) {\n return rows[i].index;\n }\n }\n\n return -1;\n };\n\n ;\n /**\n * @hidden\n */\n // Need to have all columns while filtering with ColumnVirtualization.\n\n Grid.prototype.grabColumnByFieldFromAllCols = function (field) {\n var column;\n this.columnModel = [];\n this.updateColumnModel(this.columns);\n var gCols = this.columnModel;\n\n for (var i = 0; i < gCols.length; i++) {\n if (field === gCols[i].field) {\n column = gCols[i];\n }\n }\n\n return column;\n };\n /**\n * @hidden\n */\n // Need to have all columns while filtering with ColumnVirtualization.\n\n\n Grid.prototype.grabColumnByUidFromAllCols = function (uid) {\n var column;\n this.columnModel = [];\n this.updateColumnModel(this.columns);\n var gCols = this.columnModel;\n\n for (var i = 0; i < gCols.length; i++) {\n if (uid === gCols[i].uid) {\n column = gCols[i];\n }\n }\n\n return column;\n };\n /**\n * Get all filtered records from the Grid and it returns array of objects for the local dataSource, returns a promise object if the Grid has remote data.\n * @return {Object[] | Promise}\n */\n\n\n Grid.prototype.getFilteredRecords = function () {\n if (this.allowFiltering && this.filterSettings.columns.length) {\n var query = this.renderModule.data.generateQuery(true);\n\n if (this.dataSource && this.renderModule.data.isRemote() && this.dataSource instanceof DataManager) {\n return this.renderModule.data.getData(this.dataSource, query);\n } else {\n if (this.dataSource instanceof DataManager) {\n return this.dataSource.executeLocal(query);\n } else {\n return new DataManager(this.dataSource, query).executeLocal(query);\n }\n }\n }\n\n return [];\n };\n\n Grid.prototype.getUserAgent = function () {\n var userAgent = Browser.userAgent.toLowerCase();\n return /iphone|ipod|ipad/.test(userAgent);\n };\n /**\n * @hidden\n */\n // Need to have all columns while filtering with ColumnVirtualization.\n\n\n Grid.prototype.tapEvent = function (e) {\n if (this.getUserAgent()) {\n if (!Global.timer) {\n Global.timer = setTimeout(function () {\n Global.timer = null;\n }, 300);\n } else {\n clearTimeout(Global.timer);\n Global.timer = null;\n this.dblClickHandler(e);\n this.notify(events.doubleTap, e);\n }\n }\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.getRowUid = function (prefix) {\n return \"\" + prefix + this.rowUid++;\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.getMovableVirtualContent = function () {\n return this.getContent().querySelector('.' + literals.movableContent);\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.getFrozenVirtualContent = function () {\n return this.getContent().querySelector('.' + literals.frozenContent);\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.getMovableVirtualHeader = function () {\n return this.getHeaderContent().querySelector('.' + literals.movableHeader);\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.getFrozenVirtualHeader = function () {\n return this.getHeaderContent().querySelector('.' + literals.frozenHeader);\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.getRowElementByUID = function (uid) {\n var rowEle;\n var rows = [];\n\n if (this.isFrozenGrid()) {\n var fRows = [].slice.call(this.getFrozenVirtualContent().querySelector(literals.tbody).children);\n var mRows = [].slice.call(this.getMovableVirtualContent().querySelector(literals.tbody).children);\n var frozenRigtRows = [];\n\n if (this.tablesCount === 3) {\n frozenRigtRows = [].slice.call(this.getContent().querySelector('.e-frozen-right-content').querySelector(literals.tbody).children);\n }\n\n if (this.frozenRows) {\n rows = [].slice.call(this.getFrozenVirtualHeader().querySelector(literals.tbody).children);\n rows = rows.concat([].slice.call(this.getMovableVirtualHeader().querySelector(literals.tbody).children));\n\n if (this.tablesCount === 3) {\n var frHdr = this.getHeaderContent().querySelector('.e-frozen-right-header');\n rows = rows.concat([].slice.call(frHdr.querySelector(literals.tbody).children)).concat(frozenRigtRows);\n }\n\n ;\n rows = rows.concat(fRows).concat(mRows);\n } else {\n rows = fRows.concat(mRows).concat(frozenRigtRows);\n }\n } else {\n var cntRows = [].slice.call(this.getContent().querySelector(literals.tbody).children);\n\n if (this.frozenRows) {\n rows = [].slice.call(this.getHeaderContent().querySelector(literals.tbody).children);\n rows = rows.concat(cntRows);\n } else {\n rows = cntRows;\n }\n }\n\n for (var _i = 0, rows_2 = rows; _i < rows_2.length; _i++) {\n var row = rows_2[_i];\n\n if (row.getAttribute('data-uid') === uid) {\n rowEle = row;\n break;\n }\n }\n\n return rowEle;\n };\n /**\n * Gets the hidden columns from the Grid.\n * @return {Column[]}\n * @blazorType List\n */\n\n\n Grid.prototype.getHiddenColumns = function () {\n var cols = [];\n\n for (var _i = 0, _a = this.columnModel; _i < _a.length; _i++) {\n var col = _a[_i];\n\n if (col.visible === false) {\n cols.push(col);\n }\n }\n\n return cols;\n };\n /**\n * calculatePageSizeByParentHeight\n */\n\n\n Grid.prototype.calculatePageSizeByParentHeight = function (containerHeight) {\n if (this.allowPaging) {\n if (this.allowTextWrap && this.textWrapSettings.wrapMode == 'Header' || !this.allowTextWrap) {\n var pagesize = 0;\n\n if (containerHeight.indexOf('%') != -1) {\n containerHeight = parseInt(containerHeight) / 100 * this.element.clientHeight;\n }\n\n var nonContentHeight = this.getNoncontentHeight() + this.getRowHeight();\n\n if (containerHeight > nonContentHeight) {\n var contentHeight = 0;\n contentHeight = containerHeight - this.getNoncontentHeight();\n pagesize = contentHeight / this.getRowHeight();\n }\n\n if (pagesize > 0) {\n return Math.floor(pagesize);\n }\n }\n }\n\n return 0;\n };\n\n Grid.prototype.getNoncontentHeight = function () {\n var height = 0;\n\n if (!isNullOrUndefined(this.getHeaderContent().clientHeight)) {\n height += this.getHeaderContent().clientHeight;\n }\n\n if (this.toolbar && !isNullOrUndefined(this.element.querySelector('.e-toolbar').clientHeight)) {\n height += this.element.querySelector('.e-toolbar').clientHeight;\n }\n\n if (this.allowPaging && !isNullOrUndefined(this.element.querySelector('.e-gridpager').clientHeight)) {\n height += this.element.querySelector('.e-gridpager').clientHeight;\n }\n\n if (this.showColumnChooser && !isNullOrUndefined(this.element.querySelector(\".e-columnheader\").clientHeight)) {\n height += this.element.querySelector(\".e-columnheader\").clientHeight;\n }\n\n if (this.allowGrouping && this.groupSettings.showDropArea && !isNullOrUndefined(this.element.querySelector('.e-groupdroparea').clientHeight)) {\n height += this.element.querySelector('.e-groupdroparea').clientHeight;\n }\n\n if (this.aggregates.length > 0 && !isNullOrUndefined(this.element.querySelector('.e-summaryrow').clientHeight)) {\n for (var i = 0; i < this.element.getElementsByClassName('e-summaryrow').length; i++) {\n height += this.element.getElementsByClassName('e-summaryrow')[i].clientHeight;\n }\n }\n\n return height;\n };\n /**\n *To perform aggregate operation on a column.\n *@param {AggregateColumnModel} summaryCol - Pass Aggregate Column details.\n *@param {Object} summaryData - Pass JSON Array for which its field values to be calculated.\n */\n\n\n Grid.prototype.getSummaryValues = function (summaryCol, summaryData) {\n return DataUtil.aggregates[summaryCol.type.toLowerCase()](summaryData, summaryCol.field);\n };\n /**\n * Sends a Post request to export Grid to Excel file in server side.\n * @param {string} url - Pass Url for server side excel export action.\n * @return {void}\n */\n\n\n Grid.prototype.serverExcelExport = function (url) {\n this.isExcel = true;\n this.exportGrid(url);\n };\n /**\n * Sends a Post request to export Grid to Pdf file in server side.\n * @param {string} url - Pass Url for server side pdf export action.\n * @return {void}\n */\n\n\n Grid.prototype.serverPdfExport = function (url) {\n this.isExcel = false;\n this.exportGrid(url);\n };\n /**\n * Sends a Post request to export Grid to CSV file in server side.\n * @param {string} url - Pass Url for server side pdf export action.\n * @return {void}\n */\n\n\n Grid.prototype.serverCsvExport = function (url) {\n this.isExcel = true;\n this.exportGrid(url);\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.exportGrid = function (url) {\n var grid = this;\n var query = grid.getDataModule().generateQuery(true);\n var state = new UrlAdaptor().processQuery(new DataManager({\n url: ''\n }), query);\n var queries = JSON.parse(state.data);\n var gridModel = JSON.parse(this.addOnPersist(['allowGrouping', 'allowPaging', 'pageSettings', 'sortSettings', 'allowPdfExport', 'allowExcelExport', 'aggregates', 'filterSettings', 'groupSettings', 'columns', 'locale', 'searchSettings']));\n var include = ['field', 'headerText', 'type', 'format', 'visible', 'foreignKeyValue', 'foreignKeyField', 'template', 'index', 'width', 'textAlign', 'headerTextAlign', 'columns'];\n gridModel.filterSettings.columns = queries.where;\n gridModel.searchSettings.fields = queries.search && queries.search[0]['fields'] || [];\n gridModel.sortSettings.columns = queries.sorted;\n gridModel.columns = this.setHeaderText(gridModel.columns, include);\n var form = this.createElement('form', {\n id: 'ExportForm',\n styles: 'display:none;'\n });\n var gridInput = this.createElement('input', {\n id: 'gridInput',\n attrs: {\n name: \"gridModel\"\n }\n });\n gridInput.value = JSON.stringify(gridModel);\n form.method = \"POST\";\n form.action = url;\n form.appendChild(gridInput);\n document.body.appendChild(form);\n form.submit();\n form.remove();\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.setHeaderText = function (columns, include) {\n for (var i = 0; i < columns.length; i++) {\n var column = this.getColumnByUid(columns[i].uid);\n columns[i].headerText = column.headerText;\n\n if (!isNullOrUndefined(column.template)) {\n columns[i].template = \"true\";\n }\n\n ;\n\n if (columns[i].format) {\n columns[i].format = getNumberFormat(this.getFormat(columns[i].format), columns[i].type, this.isExcel);\n }\n\n if (columns[i].columns) {\n this.setHeaderText(columns[i].columns, include);\n }\n\n var keys = Object.keys(columns[i]);\n\n for (var j = 0; j < keys.length; j++) {\n if (include.indexOf(keys[j]) < 0) {\n delete columns[i][keys[j]];\n }\n }\n }\n\n return columns;\n };\n\n Grid.prototype.getFormat = function (format) {\n return typeof format === 'object' ? !isNullOrUndefined(format.format) ? format.format : format.skeleton : format;\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.isCollapseStateEnabled = function () {\n var isExpanded = 'isExpanded';\n return this[isExpanded] === false;\n };\n /**\n * @param {number} key - Defines the primary key value.\n * @param {Object} value - Defines the row data.\n */\n\n\n Grid.prototype.updateRowValue = function (key, rowData) {\n var args = {\n requestType: 'save',\n data: rowData\n };\n this.showSpinner();\n this.notify(events.updateData, args);\n this.refresh();\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.setForeignKeyData = function () {\n this.dataBind();\n var colpending = this.getDataModule().getForeignKeyDataState();\n\n if (colpending.isPending) {\n this.getDataModule().setForeignKeyDataState({});\n colpending.resolver();\n } else {\n this.getDataModule().setForeignKeyDataState({\n isDataChanged: false\n });\n\n if (this.contentModule || this.headerModule) {\n this.renderModule.render();\n }\n }\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.resetFilterDlgPosition = function (field) {\n var header = this.getColumnHeaderByField(field);\n\n if (header) {\n var target = header.querySelector('.e-filtermenudiv');\n var filterDlg = document.querySelector('.e-filter-popup');\n\n if (target && filterDlg) {\n var gClient = this.element.getBoundingClientRect();\n var fClient = target.getBoundingClientRect();\n\n if (filterDlg) {\n filterDlg.style.left = (fClient.right - gClient.left).toString() + 'px';\n }\n }\n }\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.renderTemplates = function () {\n var portals = 'portals';\n this.notify('reactTemplateRender', this[portals]);\n this.renderReactTemplates();\n };\n /**\n * Apply the changes to the Grid without refreshing the rows.\n * @param {BatchChanges} changes - Defines changes to be updated.\n * @return {void}\n */\n\n\n Grid.prototype.batchUpdate = function (changes) {\n this.processRowChanges(changes);\n };\n /**\n * Apply the changes to the Grid in one batch after 50ms without refreshing the rows.\n * @param {BatchChanges} changes - Defines changes to be updated.\n * @return {void}\n */\n\n\n Grid.prototype.batchAsyncUpdate = function (changes) {\n this.processBulkRowChanges(changes);\n };\n\n Grid.prototype.processBulkRowChanges = function (changes) {\n var _this = this;\n\n if (!this.dataToBeUpdated) {\n this.dataToBeUpdated = Object.assign({\n addedRecords: [],\n changedRecords: [],\n deletedRecords: []\n }, changes);\n setTimeout(function () {\n _this.processRowChanges(_this.dataToBeUpdated);\n\n _this.dataToBeUpdated = null;\n }, this.asyncTimeOut);\n } else {\n var loopstring = [literals.addedRecords, literals.changedRecords, literals.deletedRecords];\n var keyField = this.getPrimaryKeyFieldNames()[0];\n\n for (var i = 0; i < loopstring.length; i++) {\n if (changes[loopstring[i]]) {\n compareChanges(this, changes, loopstring[i], keyField);\n }\n }\n }\n };\n\n Grid.prototype.processRowChanges = function (changes) {\n var _this = this;\n\n var keyField = this.getPrimaryKeyFieldNames()[0];\n changes = Object.assign({\n addedRecords: [],\n changedRecords: [],\n deletedRecords: []\n }, changes);\n var promise = this.getDataModule().saveChanges(changes, keyField, {}, this.getDataModule().generateQuery().requiresCount());\n\n if (this.getDataModule().isRemote()) {\n promise.then(function (e) {\n _this.setNewData();\n });\n } else {\n this.setNewData();\n }\n };\n\n Grid.prototype.setNewData = function () {\n var _this = this;\n\n var oldValues = JSON.parse(JSON.stringify(this.getCurrentViewRecords()));\n var getData = this.getDataModule().getData({}, this.getDataModule().generateQuery().requiresCount());\n getData.then(function (e) {\n _this.bulkRefresh(e.result, oldValues, e.count);\n });\n };\n\n Grid.prototype.deleteRowElement = function (row) {\n var tr = this.getRowElementByUID(row.uid);\n var index = parseInt(tr.getAttribute(literals.ariaRowIndex), 10);\n remove(tr);\n\n if (this.getFrozenColumns()) {\n var mtr = this.getMovableRows()[index];\n remove(mtr);\n }\n };\n\n Grid.prototype.bulkRefresh = function (result, oldValues, count) {\n var _this = this;\n\n var rowObj = this.getRowsObject();\n var keyField = this.getPrimaryKeyFieldNames()[0];\n\n var _loop_3 = function _loop_3(i) {\n if (!result.filter(function (e) {\n return e[keyField] === rowObj[i].data[keyField];\n }).length) {\n this_3.deleteRowElement(rowObj[i]);\n rowObj.splice(i, 1);\n i--;\n }\n\n out_i_1 = i;\n };\n\n var this_3 = this,\n out_i_1;\n\n for (var i = 0; i < rowObj.length; i++) {\n _loop_3(i);\n\n i = out_i_1;\n }\n\n var _loop_4 = function _loop_4(i) {\n var isRowExist;\n oldValues.filter(function (e) {\n if (e[keyField] === result[i][keyField]) {\n if (e !== result[i]) {\n _this.setRowData(result[i][keyField], result[i]);\n }\n\n isRowExist = true;\n }\n });\n\n if (!isRowExist) {\n this_4.renderRowElement(result[i], i);\n }\n };\n\n var this_4 = this;\n\n for (var i = 0; i < result.length; i++) {\n _loop_4(i);\n }\n\n this.currentViewData = result;\n var rows = [].slice.call(this.getContentTable().getElementsByClassName(literals.row));\n resetRowIndex(this, this.getRowsObject(), rows);\n setRowElements(this);\n\n if (this.allowPaging) {\n this.notify(events.inBoundModelChanged, {\n module: 'pager',\n properties: {\n totalRecordsCount: count\n }\n });\n }\n };\n\n Grid.prototype.renderRowElement = function (data, index) {\n var row = new RowRenderer(this.serviceLocator, null, this);\n var model = new RowModelGenerator(this);\n var modelData = model.generateRows([data]);\n var tr = row.render(modelData[0], this.getColumns());\n var mTr;\n var mTbody;\n this.addRowObject(modelData[0], index);\n var tbody = this.getContentTable().querySelector(literals.tbody);\n\n if (tbody.querySelector('.e-emptyrow')) {\n var emptyRow = tbody.querySelector('.e-emptyrow');\n emptyRow.parentNode.removeChild(emptyRow);\n\n if (this.getFrozenColumns()) {\n var moveTbody = this.getContent().querySelector('.' + literals.movableContent).querySelector(literals.tbody);\n moveTbody.firstElementChild.parentNode.removeChild(moveTbody.firstElementChild);\n }\n }\n\n if (this.getFrozenColumns()) {\n mTr = renderMovable(tr, this.getFrozenColumns(), this);\n\n if (this.frozenRows && index < this.frozenRows) {\n mTbody = this.getHeaderContent().querySelector('.' + literals.movableHeader).querySelector(literals.tbody);\n } else {\n mTbody = this.getContent().querySelector('.' + literals.movableContent).querySelector(literals.tbody);\n }\n\n mTbody.appendChild(mTr);\n\n if (this.height === 'auto') {\n this.notify(events.frozenHeight, {});\n }\n }\n\n if (this.frozenRows && index < this.frozenRows) {\n tbody = this.getHeaderContent().querySelector(literals.tbody);\n } else {\n tbody = this.getContent().querySelector(literals.tbody);\n }\n\n tbody = this.getContent().querySelector(literals.tbody);\n tbody.appendChild(tr);\n };\n\n Grid.prototype.addRowObject = function (row, index) {\n var frzCols = this.getFrozenColumns();\n\n if (frzCols) {\n var mRows = this.getMovableRowsObject();\n var mRow = row.clone();\n mRow.cells = mRow.cells.slice(frzCols);\n row.cells = row.cells.slice(0, frzCols);\n mRows.splice(index, 1, mRow);\n }\n\n this.getRowsObject().splice(index, 1, row);\n };\n /**\n * @hidden\n */\n\n\n Grid.prototype.getHeight = function (height) {\n if (!Number.isInteger(height) && height.indexOf('%') != -1) {\n height = parseInt(height) / 100 * this.element.clientHeight;\n } else if (!Number.isInteger(height) && this.height !== 'auto') {\n height = parseInt(height);\n } else {\n height = this.height;\n }\n\n return height;\n };\n /** @hidden */\n\n\n Grid.prototype.getFrozenRightContent = function () {\n return this.getContent().querySelector('.e-frozen-right-content');\n };\n /** @hidden */\n\n\n Grid.prototype.getFrozenRightHeader = function () {\n return this.getHeaderContent().querySelector('.e-frozen-right-header');\n };\n /** @hidden */\n\n\n Grid.prototype.getMovableHeaderTbody = function () {\n return this.getMovableVirtualHeader().querySelector(literals.tbody);\n };\n /** @hidden */\n\n\n Grid.prototype.getMovableContentTbody = function () {\n return this.getMovableVirtualContent().querySelector(literals.tbody);\n };\n /** @hidden */\n\n\n Grid.prototype.getFrozenHeaderTbody = function () {\n return this.getFrozenVirtualHeader().querySelector(literals.tbody);\n };\n /** @hidden */\n\n\n Grid.prototype.getFrozenLeftContentTbody = function () {\n return this.getFrozenVirtualContent().querySelector(literals.tbody);\n };\n /** @hidden */\n\n\n Grid.prototype.getFrozenRightHeaderTbody = function () {\n return this.getFrozenRightHeader().querySelector(literals.tbody);\n };\n /** @hidden */\n\n\n Grid.prototype.getFrozenRightContentTbody = function () {\n var cnt = this.getFrozenRightContent();\n var tbody;\n\n if (cnt) {\n tbody = this.getFrozenRightContent().querySelector(literals.tbody);\n }\n\n return tbody;\n };\n /** @hidden */\n\n\n Grid.prototype.showResponsiveCustomFilter = function (isCustom) {\n if (this.filterModule) {\n this.filterModule.showCustomFilter(isCustom || this.rowRenderingMode === 'Vertical');\n }\n };\n /** @hidden */\n\n\n Grid.prototype.showResponsiveCustomSort = function (isCustom) {\n if (this.sortModule) {\n this.sortModule.showCustomSort(isCustom || this.rowRenderingMode === 'Vertical');\n }\n };\n /**\n * To manually show the vertical row mode filter dialog\n */\n\n\n Grid.prototype.showAdaptiveFilterDialog = function () {\n if (this.enableAdaptiveUI) {\n this.showResponsiveCustomFilter(true);\n }\n };\n /**\n * To manually show the vertical row sort filter dialog\n */\n\n\n Grid.prototype.showAdaptiveSortDialog = function () {\n if (this.enableAdaptiveUI) {\n this.showResponsiveCustomSort(true);\n }\n };\n /** @hidden */\n\n\n Grid.prototype.getCurrentVisibleColumns = function (isColVirtualization) {\n var cols = [];\n var gridCols = isColVirtualization ? this.getColumns() : this.columnModel;\n\n for (var _i = 0, gridCols_1 = gridCols; _i < gridCols_1.length; _i++) {\n var col = gridCols_1[_i];\n\n if (col.visible) {\n cols.push(col);\n }\n }\n\n return cols;\n };\n\n var Grid_1;\n\n __decorate([Property()], Grid.prototype, \"parentDetails\", void 0);\n\n __decorate([Property([])], Grid.prototype, \"columns\", void 0);\n\n __decorate([Property(true)], Grid.prototype, \"enableAltRow\", void 0);\n\n __decorate([Property(true)], Grid.prototype, \"enableHover\", void 0);\n\n __decorate([Property(false)], Grid.prototype, \"enableAutoFill\", void 0);\n\n __decorate([Property(true)], Grid.prototype, \"allowKeyboard\", void 0);\n\n __decorate([Property(false)], Grid.prototype, \"allowTextWrap\", void 0);\n\n __decorate([Complex({}, TextWrapSettings)], Grid.prototype, \"textWrapSettings\", void 0);\n\n __decorate([Complex({}, ResizeSettings)], Grid.prototype, \"resizeSettings\", void 0);\n\n __decorate([Property(false)], Grid.prototype, \"allowPaging\", void 0);\n\n __decorate([Complex({}, PageSettings)], Grid.prototype, \"pageSettings\", void 0);\n\n __decorate([Property(false)], Grid.prototype, \"enableVirtualization\", void 0);\n\n __decorate([Property(false)], Grid.prototype, \"enableColumnVirtualization\", void 0);\n\n __decorate([Property(false)], Grid.prototype, \"enableInfiniteScrolling\", void 0);\n\n __decorate([Complex({}, SearchSettings)], Grid.prototype, \"searchSettings\", void 0);\n\n __decorate([Property(false)], Grid.prototype, \"allowSorting\", void 0);\n\n __decorate([Property('Ellipsis')], Grid.prototype, \"clipMode\", void 0);\n\n __decorate([Property(true)], Grid.prototype, \"allowMultiSorting\", void 0);\n\n __decorate([Property(false)], Grid.prototype, \"allowExcelExport\", void 0);\n\n __decorate([Property(false)], Grid.prototype, \"allowPdfExport\", void 0);\n\n __decorate([Complex({}, SortSettings)], Grid.prototype, \"sortSettings\", void 0);\n\n __decorate([Complex({}, InfiniteScrollSettings)], Grid.prototype, \"infiniteScrollSettings\", void 0);\n\n __decorate([Property(true)], Grid.prototype, \"allowSelection\", void 0);\n\n __decorate([Property(-1)], Grid.prototype, \"selectedRowIndex\", void 0);\n\n __decorate([Complex({}, SelectionSettings)], Grid.prototype, \"selectionSettings\", void 0);\n\n __decorate([Property(false)], Grid.prototype, \"allowFiltering\", void 0);\n\n __decorate([Property('Horizontal')], Grid.prototype, \"rowRenderingMode\", void 0);\n\n __decorate([Property(false)], Grid.prototype, \"enableAdaptiveUI\", void 0);\n\n __decorate([Property(false)], Grid.prototype, \"allowReordering\", void 0);\n\n __decorate([Property(false)], Grid.prototype, \"allowResizing\", void 0);\n\n __decorate([Property(false)], Grid.prototype, \"allowRowDragAndDrop\", void 0);\n\n __decorate([Complex({}, RowDropSettings)], Grid.prototype, \"rowDropSettings\", void 0);\n\n __decorate([Complex({}, FilterSettings)], Grid.prototype, \"filterSettings\", void 0);\n\n __decorate([Property(false)], Grid.prototype, \"allowGrouping\", void 0);\n\n __decorate([Property(false)], Grid.prototype, \"enableImmutableMode\", void 0);\n\n __decorate([Property(false)], Grid.prototype, \"showColumnMenu\", void 0);\n\n __decorate([Complex({}, GroupSettings)], Grid.prototype, \"groupSettings\", void 0);\n\n __decorate([Complex({}, EditSettings)], Grid.prototype, \"editSettings\", void 0);\n\n __decorate([Collection([], AggregateRow)], Grid.prototype, \"aggregates\", void 0);\n\n __decorate([Property(false)], Grid.prototype, \"showColumnChooser\", void 0);\n\n __decorate([Complex({}, ColumnChooserSettings)], Grid.prototype, \"columnChooserSettings\", void 0);\n\n __decorate([Property(false)], Grid.prototype, \"enableHeaderFocus\", void 0);\n\n __decorate([Property('auto')], Grid.prototype, \"height\", void 0);\n\n __decorate([Property('auto')], Grid.prototype, \"width\", void 0);\n\n __decorate([Property('Default')], Grid.prototype, \"gridLines\", void 0);\n\n __decorate([Property()], Grid.prototype, \"rowTemplate\", void 0);\n\n __decorate([Property()], Grid.prototype, \"detailTemplate\", void 0);\n\n __decorate([Property()], Grid.prototype, \"childGrid\", void 0);\n\n __decorate([Property()], Grid.prototype, \"queryString\", void 0);\n\n __decorate([Property('AllPages')], Grid.prototype, \"printMode\", void 0);\n\n __decorate([Property('Expanded')], Grid.prototype, \"hierarchyPrintMode\", void 0);\n\n __decorate([Property([])], Grid.prototype, \"dataSource\", void 0);\n\n __decorate([Property(null)], Grid.prototype, \"rowHeight\", void 0);\n\n __decorate([Property()], Grid.prototype, \"query\", void 0);\n\n __decorate([Property('USD')], Grid.prototype, \"currencyCode\", void 0);\n\n __decorate([Property()], Grid.prototype, \"toolbar\", void 0);\n\n __decorate([Property()], Grid.prototype, \"contextMenuItems\", void 0);\n\n __decorate([Property()], Grid.prototype, \"columnMenuItems\", void 0);\n\n __decorate([Property()], Grid.prototype, \"toolbarTemplate\", void 0);\n\n __decorate([Property()], Grid.prototype, \"pagerTemplate\", void 0);\n\n __decorate([Property(0)], Grid.prototype, \"frozenRows\", void 0);\n\n __decorate([Property(0)], Grid.prototype, \"frozenColumns\", void 0);\n\n __decorate([Property('All')], Grid.prototype, \"columnQueryMode\", void 0);\n\n __decorate([Property({})], Grid.prototype, \"currentAction\", void 0);\n\n __decorate([Property('19.1.64')], Grid.prototype, \"ej2StatePersistenceVersion\", void 0);\n\n __decorate([Event()], Grid.prototype, \"created\", void 0);\n\n __decorate([Event()], Grid.prototype, \"destroyed\", void 0);\n\n __decorate([Event()], Grid.prototype, \"load\", void 0);\n\n __decorate([Event()], Grid.prototype, \"rowDataBound\", void 0);\n\n __decorate([Event()], Grid.prototype, \"queryCellInfo\", void 0);\n\n __decorate([Event()], Grid.prototype, \"headerCellInfo\", void 0);\n\n __decorate([Event()], Grid.prototype, \"actionBegin\", void 0);\n\n __decorate([Event()], Grid.prototype, \"actionComplete\", void 0);\n\n __decorate([Event()], Grid.prototype, \"actionFailure\", void 0);\n\n __decorate([Event()], Grid.prototype, \"dataBound\", void 0);\n\n __decorate([Event()], Grid.prototype, \"recordDoubleClick\", void 0);\n\n __decorate([Event()], Grid.prototype, \"recordClick\", void 0);\n\n __decorate([Event()], Grid.prototype, \"rowSelecting\", void 0);\n\n __decorate([Event()], Grid.prototype, \"rowSelected\", void 0);\n\n __decorate([Event()], Grid.prototype, \"rowDeselecting\", void 0);\n\n __decorate([Event()], Grid.prototype, \"rowDeselected\", void 0);\n\n __decorate([Event()], Grid.prototype, \"cellSelecting\", void 0);\n\n __decorate([Event()], Grid.prototype, \"cellSelected\", void 0);\n\n __decorate([Event()], Grid.prototype, \"cellDeselecting\", void 0);\n\n __decorate([Event()], Grid.prototype, \"cellDeselected\", void 0);\n\n __decorate([Event()], Grid.prototype, \"columnSelecting\", void 0);\n\n __decorate([Event()], Grid.prototype, \"columnSelected\", void 0);\n\n __decorate([Event()], Grid.prototype, \"columnDeselecting\", void 0);\n\n __decorate([Event()], Grid.prototype, \"columnDeselected\", void 0);\n\n __decorate([Event()], Grid.prototype, \"columnDragStart\", void 0);\n\n __decorate([Event()], Grid.prototype, \"columnDrag\", void 0);\n\n __decorate([Event()], Grid.prototype, \"columnDrop\", void 0);\n\n __decorate([Event()], Grid.prototype, \"printComplete\", void 0);\n\n __decorate([Event()], Grid.prototype, \"beforePrint\", void 0);\n\n __decorate([Event()], Grid.prototype, \"pdfQueryCellInfo\", void 0);\n\n __decorate([Event()], Grid.prototype, \"pdfHeaderQueryCellInfo\", void 0);\n\n __decorate([Event()], Grid.prototype, \"pdfAggregateQueryCellInfo\", void 0);\n\n __decorate([Event()], Grid.prototype, \"excelAggregateQueryCellInfo\", void 0);\n\n __decorate([Event()], Grid.prototype, \"exportDetailDataBound\", void 0);\n\n __decorate([Event()], Grid.prototype, \"excelQueryCellInfo\", void 0);\n\n __decorate([Event()], Grid.prototype, \"excelHeaderQueryCellInfo\", void 0);\n\n __decorate([Event()], Grid.prototype, \"beforeExcelExport\", void 0);\n\n __decorate([Event()], Grid.prototype, \"excelExportComplete\", void 0);\n\n __decorate([Event()], Grid.prototype, \"beforePdfExport\", void 0);\n\n __decorate([Event()], Grid.prototype, \"pdfExportComplete\", void 0);\n\n __decorate([Event()], Grid.prototype, \"rowDragStartHelper\", void 0);\n\n __decorate([Event()], Grid.prototype, \"detailDataBound\", void 0);\n\n __decorate([Event()], Grid.prototype, \"rowDragStart\", void 0);\n\n __decorate([Event()], Grid.prototype, \"rowDrag\", void 0);\n\n __decorate([Event()], Grid.prototype, \"rowDrop\", void 0);\n\n __decorate([Event()], Grid.prototype, \"toolbarClick\", void 0);\n\n __decorate([Event()], Grid.prototype, \"beforeOpenColumnChooser\", void 0);\n\n __decorate([Event()], Grid.prototype, \"beforeOpenAdaptiveDialog\", void 0);\n\n __decorate([Event()], Grid.prototype, \"batchAdd\", void 0);\n\n __decorate([Event()], Grid.prototype, \"batchDelete\", void 0);\n\n __decorate([Event()], Grid.prototype, \"batchCancel\", void 0);\n\n __decorate([Event()], Grid.prototype, \"beforeBatchAdd\", void 0);\n\n __decorate([Event()], Grid.prototype, \"beforeBatchDelete\", void 0);\n\n __decorate([Event()], Grid.prototype, \"beforeBatchSave\", void 0);\n\n __decorate([Event()], Grid.prototype, \"beginEdit\", void 0);\n\n __decorate([Event()], Grid.prototype, \"commandClick\", void 0);\n\n __decorate([Event()], Grid.prototype, \"cellEdit\", void 0);\n\n __decorate([Event()], Grid.prototype, \"cellSave\", void 0);\n\n __decorate([Event()], Grid.prototype, \"cellSaved\", void 0);\n\n __decorate([Event()], Grid.prototype, \"resizeStart\", void 0);\n\n __decorate([Event()], Grid.prototype, \"resizing\", void 0);\n\n __decorate([Event()], Grid.prototype, \"resizeStop\", void 0);\n\n __decorate([Event()], Grid.prototype, \"keyPressed\", void 0);\n\n __decorate([Event()], Grid.prototype, \"beforeDataBound\", void 0);\n\n __decorate([Event()], Grid.prototype, \"contextMenuOpen\", void 0);\n\n __decorate([Event()], Grid.prototype, \"contextMenuClick\", void 0);\n\n __decorate([Event()], Grid.prototype, \"columnMenuOpen\", void 0);\n\n __decorate([Event()], Grid.prototype, \"columnMenuClick\", void 0);\n\n __decorate([Event()], Grid.prototype, \"checkBoxChange\", void 0);\n\n __decorate([Event()], Grid.prototype, \"beforeCopy\", void 0);\n\n __decorate([Event()], Grid.prototype, \"beforePaste\", void 0);\n\n __decorate([Event()], Grid.prototype, \"beforeAutoFill\", void 0);\n\n __decorate([Event()], Grid.prototype, \"columnDataStateChange\", void 0);\n\n __decorate([Event()], Grid.prototype, \"dataStateChange\", void 0);\n\n __decorate([Event()], Grid.prototype, \"dataSourceChanged\", void 0);\n\n __decorate([Event()], Grid.prototype, \"exportGroupCaption\", void 0);\n\n __decorate([Event()], Grid.prototype, \"lazyLoadGroupExpand\", void 0);\n\n __decorate([Event()], Grid.prototype, \"lazyLoadGroupCollapse\", void 0);\n\n Grid = Grid_1 = __decorate([NotifyPropertyChanges], Grid);\n return Grid;\n}(Component);\n\nexport { Grid };"],"sourceRoot":""}