{"version":3,"sources":["../../node_modules/tslib/tslib.es6.js","../../src/app/components/table/table.ts"],"names":["Object","create","__values","o","s","Symbol","iterator","m","i","call","length","next","value","done","TypeError","__read","n","r","e","ar","push","error","__spread","arguments","concat","TableService","this","sortSource","Subject","selectionSource","contextMenuSource","valueSource","totalRecordsSource","columnsSource","sortSource$","asObservable","selectionSource$","contextMenuSource$","valueSource$","totalRecordsSource$","columnsSource$","prototype","onSort","sortMeta","onSelectionChange","onContextMenu","data","onValueChange","onTotalRecordsChange","onColumnsChange","columns","Injectable","Table","el","zone","tableService","cd","filterService","pageLinks","alwaysShowPaginator","paginatorPosition","paginatorDropdownScrollHeight","currentPageReportTemplate","showFirstLastIcon","showPageLinks","defaultSortOrder","sortMode","resetPageOnSort","selectionChange","EventEmitter","contextMenuSelectionChange","contextMenuSelectionMode","rowTrackBy","index","item","lazy","lazyLoadOnInit","compareSelectionBy","csvSeparator","exportFilename","filters","filterDelay","expandedRowKeys","editingRowKeys","rowExpandMode","virtualScrollDelay","virtualRowHeight","columnResizeMode","loadingIcon","showLoader","stateStorage","editMode","onRowSelect","onRowUnselect","onPage","onFilter","onLazyLoad","onRowExpand","onRowCollapse","onContextMenuSelect","onColResize","onColReorder","onRowReorder","onEditInit","onEditComplete","onEditCancel","onHeaderCheckboxToggle","sortFunction","firstChange","rowsChange","onStateSave","onStateRestore","_value","_totalRecords","_first","selectionKeys","_sortOrder","ngOnInit","virtualScroll","emit","createLazyLoadMetadata","restoringFilter","initialized","ngAfterContentInit","_this","templates","forEach","getType","captionTemplate","template","headerTemplate","bodyTemplate","loadingBodyTemplate","footerTemplate","summaryTemplate","colGroupTemplate","expandedRowTemplate","frozenRowsTemplate","frozenHeaderTemplate","frozenBodyTemplate","frozenFooterTemplate","frozenColGroupTemplate","frozenExpandedRowTemplate","emptyMessageTemplate","paginatorLeftTemplate","paginatorRightTemplate","paginatorDropdownItemTemplate","ngAfterViewInit","isStateful","resizableColumns","restoreColumnWidths","ngOnChanges","simpleChange","stateRestored","restoreState","currentValue","totalRecords","sortField","sortSingle","multiSortMeta","sortMultiple","hasFilter","_filter","_columns","reorderableColumns","columnOrderStateRestored","restoreColumnOrder","_sortField","sortOrder","_multiSortMeta","selection","_selection","preventSelectionSetterPropagation","updateSelectionKeys","defineProperty","val","cols","_rows","dataKey","Array","isArray","_c","_d","String","ObjectUtils","resolveFieldData","onPageChange","event","first","rows","saveState","anchorRowIndex","scrollable","resetScrollTop","sort","originalEvent","field","metaKey","ctrlKey","getSortMeta","order","restoringSort","customSort","mode","data1","data2","value1","value2","result","localeCompare","multisortField","multisortmeta","isSorted","sorted","handleRowClick","target","targetNode","nodeName","parentNode","parentElement","DomHandler","hasClass","selectionMode","isMultipleSelectionMode","shiftKey","clearSelection","rangeRowIndex","clearSelectionRange","rowIndex","selectRange","rowData","selected","isSelected","metaSelection","rowTouched","metaKeySelection","dataKeyValue","isSingleSelectionMode","selectionIndex_1","findIndexInSelection","filter","type","selectionIndex_2","handleRowTouchEnd","handleRowRightClick","contextMenu","contextMenuSelection","show","rangeStart","rangeEnd","paginator","rangeRowsData","rangeRowData","filteredValue","this_1","selectionIndex","undefined","equals","toggleRowWithRadio","toggleRowWithCheckbox","selectionIndex_3","toggleRowsWithCheckbox","check","slice","checked","matchMode","filterTimeout","clearTimeout","isFilterBlank","setTimeout","filterGlobal","trim","globalFilterFieldsArray","globalFilterFields","Error","localMatch","globalMatch","localFiltered","prop","hasOwnProperty","filterField","filterMeta","filterMeta_1","e_2","filterMeta_1_1","meta","executeLocalFilter","operator","FilterOperator","OR","AND","j","globalFilterField","filterLocale","markForCheck","filterValue","filterMatchMode","FilterMatchMode","STARTS_WITH","dataFieldValue","filterConstraint","empty","globalFilter","clear","reset","exportCSV","options","csv","frozenColumns","selectionOnly","frozenValue","column","exportable","header","record","i_1","cellData","exportFunction","replace","blob","Blob","window","navigator","msSaveOrOpenBlob","link","document","createElement","style","display","body","appendChild","download","setAttribute","URL","createObjectURL","click","open","encodeURI","removeChild","scrollToVirtualIndex","scrollTo","top","scrollableViewChild","scrollableFrozenViewChild","updateEditingCell","cell","editingCell","editingCellData","editingCellField","editingCellRowIndex","bindDocumentEditListener","isEditingCellValid","find","documentEditListener","editingCellClick","removeClass","unbindDocumentEditListener","addEventListener","removeEventListener","initRowEdit","saveRowEdit","rowElement","cancelRowEdit","toggleRow","preventDefault","isRowExpanded","isRowEditing","onColumnResizeBegin","containerLeft","getOffset","containerViewChild","nativeElement","left","lastResizerHelperX","pageX","scrollLeft","onColumnResize","addClass","resizeHelperViewChild","height","offsetHeight","onColumnResizeEnd","delta","offsetLeft","columnWidth","offsetWidth","minWidth","parseInt","newColumnWidth","nextColumn","nextElementSibling","offsetParent","nextColumnWidth","nextColumnMinWidth","scrollableView","findParentScrollableView","scrollableBodyTable","findSingle","scrollableHeaderTable","scrollableFooterTable","resizeColumnIndex","resizeColGroup","width","setScrollableItemsWidthOnExpandResize","tableViewChild","containerWidth","element","scrollableBody","scrollableHeader","scrollableFooter","scrollableBodyTableWidth","scrollableHeaderTableWidth","isContainerInViewport","setWidth","container","table","calculateScrollbarWidth","parent","colGroup","children","col","nextCol","onColumnDragStart","columnElement","reorderIconWidth","getHiddenElementOuterWidth","reorderIndicatorUpViewChild","reorderIconHeight","getHiddenElementOuterHeight","reorderIndicatorDownViewChild","draggedColumn","dataTransfer","setData","onColumnDragEnter","dropHeader","containerOffset","dropHeaderOffset","dragIndex","indexWithinGroup","dropIndex","targetLeft","columnCenter","Math","ceil","dropPosition","dropEffect","onColumnDragLeave","onColumnDrop","dropColumn","allowDrop","reorderArray","runOutsideAngular","draggable","onRowDragStart","rowDragging","draggedRowIndex","onRowDragOver","rowY","getWindowScrollTop","pageY","rowMidY","getOuterHeight","prevRowElement","previousElementSibling","droppedRowIndex","onRowDragLeave","onRowDragEnd","onRowDrop","isEmpty","getBlockableElement","getStorage","localStorage","sessionStorage","stateKey","storage","state","saveColumnWidths","saveColumnOrder","keys","setItem","JSON","stringify","clearState","removeItem","stateString","getItem","state_1","parse","columnWidthsState","columnWidths","tableWidthState","tableWidth","Promise","resolve","then","widths","map","getOuterWidth","join","widths_1","split","headerCols","bodyCols","columnOrder_1","key","columnOrder","reorderedColumns_1","findColumnByKey","ngOnDestroy","Component","args","selector","providers","changeDetection","ChangeDetectionStrategy","Default","encapsulation","ViewEncapsulation","None","ElementRef","NgZone","ChangeDetectorRef","FilterService","Input","Output","ViewChild","ContentChildren","PrimeTemplate","TableBody","dt","subscription","subscribe","detectChanges","unsubscribe","ScrollableView","_scrollHeight","includes","console","log","virtualScrollBody","frozen","scrollableAlignerViewChild","calculateScrollbarHeight","frozenView","frozenSiblingBody","scrollBarWidth","scrollHeaderBoxViewChild","paddingRight","scrollFooterBoxViewChild","bindEvents","scrollHeaderViewChild","headerScrollListener","onHeaderScroll","bind","scrollFooterViewChild","footerScrollListener","onFooterScroll","bodyScrollListener","onBodyScroll","getElementRef","scrollBodyViewChild","unbindEvents","preventBodyScrollPropagation","marginLeft","scrollTop","onScrollIndexChange","virtualScrollTimeout","page","floor","virtualScrollOffset","virtualScrollChunkSize","virtualPage","getPageCount","dataToRender","dataLength","scrollToIndex","CdkVirtualScrollViewport","SortableColumn","isEnabled","updateSortState","onClick","isFilterElement","onEnterKey","pSortableColumnDisabled","Directive","host","[class.p-sortable-column]","[class.p-highlight]","[attr.tabindex]","[attr.role]","[attr.aria-sort]","HostListener","SortIcon","OnPush","SelectableRow","onTouchEnd","onArrowDownKeyDown","row","currentTarget","nextRow","findNextSelectableRow","focus","onArrowUpKeyDown","prevRow","findPrevSelectableRow","onEnterKeyDown","onSpaceKeyDown","onPageDownKeyDown","pSelectableRowDisabled","[class.p-selectable-row]","SelectableRowDblClick","ContextMenuRow","pContextMenuRowDisabled","[class.p-highlight-contextmenu]","RowToggler","pRowTogglerDisabled","ResizableColumn","resizer","className","resizerMouseDownListener","onMouseDown","bindDocumentEvents","documentMouseMoveListener","onDocumentMouseMove","documentMouseUpListener","onDocumentMouseUp","unbindDocumentEvents","which","pResizableColumnDisabled","ReorderableColumn","mouseDownListener","dragStartListener","onDragStart","dragOverListener","onDragEnter","dragEnterListener","dragLeaveListener","onDragLeave","onDragOver","onDrop","pReorderableColumnDisabled","EditableColumn","closeEditingCell","openCell","focusCellSelector","pFocusCellSelector","focusableElement","completed","onEscapeKeyDown","onShiftKeyDown","moveToPreviousCell","moveToNextCell","onArrowDown","currentCell","findCell","cellIndex","targetCell","findNextEditableColumnByIndex","invokeElementMethod","onArrowUp","findPrevEditableColumnByIndex","onArrowLeft","onArrowRight","findPreviousEditableColumn","findNextEditableColumn","prevCell","previousRow","lastElementChild","nextCell","firstElementChild","pEditableColumnDisabled","EditableRow","pEditableRowDisabled","InitEditableRow","editableRow","SaveEditableRow","CancelEditableRow","CellEditor","editableColumn","inputTemplate","outputTemplate","decorators","Optional","TableRadioButton","disabled","onFocus","boxViewChild","onBlur","TableCheckbox","TableHeaderCheckbox","valueChangeSubscription","updateCheckedState","selectionChangeSubscription","isDisabled","isAllFilteredValuesChecked","ReorderableRowHandle","ReorderableRow","droppable","dragEndListener","onDragEnd","pReorderableRowDisabled","ColumnFilterFormElement","useGrouping","filterCallback","onModelChange","onTextInputEnterKeyDown","onNumericInputKeyDown","ColumnFilter","renderer","config","showMenu","showOperator","showClearButton","showApplyButton","showMatchModes","showAddButton","maxConstraints","initFieldFilterConstraint","translationSubscription","translationObserver","generateMatchModeOptions","generateOperatorOptions","matchModes","matchModeOptions","_a","filterMatchModeOptions","label","getTranslation","operatorOptions","TranslationKeys","MATCH_ALL","MATCH_ANY","filterTemplate","defaultMatchMode","getDefaultMatchMode","onMenuMatchModeChange","onRowMatchModeChange","hide","onRowMatchModeKeyDown","nextItem","findNextItem","removeAttribute","tabIndex","prevItem","findPrevItem","onRowClearItemClick","clearFilter","isRowMatchModeSelected","addConstraint","getDefaultOperator","removeConstraint","onOperatorChange","toggleMenu","overlayVisible","onToggleButtonKeyDown","focusable","getFocusableElements","overlay","altKey","onEscape","icon","onOverlayAnimationStart","toState","zIndex","zindex","absolutePosition","bindDocumentClickListener","bindDocumentResizeListener","bindScrollListener","onOverlayHide","EQUALS","DATE_IS","CONTAINS","hasRowFilter","fieldConstraints","APPLY","CLEAR","ADD_RULE","REMOVE_RULE","NO_FILTER","fieldFilter","isOutsideClicked","isSameNode","contains","documentClickListener","documentTarget","ownerDocument","listen","unbindDocumentClickListener","documentResizeListener","unbindDocumentResizeListener","scrollHandler","ConnectedOverlayScrollHandler","unbindScrollListener","applyFilter","animations","trigger","transition","opacity","transform","animate","Renderer2","PrimeNGConfig","NgModule","imports","CommonModule","PaginatorModule","InputTextModule","DropdownModule","ScrollingModule","FormsModule","ButtonModule","SelectButtonModule","CalendarModule","InputNumberModule","TriStateCheckboxModule","exports","SharedModule","declarations"],"mappings":";;;;;;;;;;;;;;oFA2G6BA,OAAOC,gBAYpBC,EAASC,GACrB,IAAIC,EAAsB,mBAAXC,QAAyBA,OAAOC,SAAUC,EAAIH,GAAKD,EAAEC,GAAII,EAAI,EAC5E,GAAID,EAAG,OAAOA,EAAEE,KAAKN,GACrB,GAAIA,GAAyB,iBAAbA,EAAEO,OAAqB,MAAO,CAC1CC,KAAM,WAEF,OADIR,GAAKK,GAAKL,EAAEO,SAAQP,OAAI,GACrB,CAAES,MAAOT,GAAKA,EAAEK,KAAMK,MAAOV,KAG5C,MAAM,IAAIW,UAAUV,EAAI,0BAA4B,4CAGxCW,EAAOZ,EAAGa,GACtB,IAAIT,EAAsB,mBAAXF,QAAyBF,EAAEE,OAAOC,UACjD,IAAKC,EAAG,OAAOJ,EACf,IAAmBc,EAAYC,EAA3BV,EAAID,EAAEE,KAAKN,GAAOgB,EAAK,GAC3B,IACI,WAAc,IAANH,GAAgBA,KAAM,MAAQC,EAAIT,EAAEG,QAAQE,MAAMM,EAAGC,KAAKH,EAAEL,OAExE,MAAOS,GAASH,EAAI,CAAEG,MAAOA,WAEzB,IACQJ,IAAMA,EAAEJ,OAASN,EAAIC,EAAU,SAAID,EAAEE,KAAKD,WAExC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B,EAAAA,wBA0YrB,iCAPCoR,EAAAA,SAAQrS,KAAA,CAAC,CACNsS,QAAS,CAACC,EAAAA,aAAaC,EAAAA,gBAAgBC,EAAAA,gBAAgBC,EAAAA,eAAeC,EAAAA,gBAAgBC,EAAAA,YAAYC,EAAAA,aAAaC,EAAAA,mBAAmBC,EAAAA,eAAeC,EAAAA,kBAAkBC,EAAAA,wBACnKC,QAAS,CAAC5vB,EAAM6vB,EAAAA,aAAahP,EAAeiB,EAAcoB,EAAWH,EAAeK,EAAgBa,EAAkBY,EAAeoC,EAAWrF,EACxI2F,EAAiBK,EAAcC,EAAoBM,EAAqBC,EAAetF,EAAsB6D,EAAYE,EAAgBE,EAAgBC,EAAkBqI,EAAAA,gBAAgBtG,GACnM+G,aAAc,CAAC9vB,EAAM6gB,EAAeiB,EAAcoB,EAAWH,EAAeK,EAAgBa,EAAkBY,EAAeoC,EAAWrJ,EAAUM,EAAe0D,EACzJ2F,EAAiBK,EAAcC,EAAoBM,EAAqBC,EAAetF,EAAsB6D,EAAYE,EAAgBE,EAAgBC,EAAkB+B,EAAaN","sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from) {\r\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\r\n to[j] = from[i];\r\n return to;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","import { NgModule, Component, HostListener, OnInit, OnDestroy, AfterViewInit, Directive, Optional, AfterContentInit,\n Input, Output, EventEmitter, ElementRef, ContentChildren, TemplateRef, QueryList, ViewChild, NgZone, ChangeDetectorRef, OnChanges, SimpleChanges, ChangeDetectionStrategy, Query, ViewEncapsulation, Renderer2} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { PrimeTemplate, SharedModule, FilterMatchMode, FilterOperator, SelectItem, PrimeNGConfig, TranslationKeys, FilterService } from 'primeng/api';\nimport { PaginatorModule } from 'primeng/paginator';\nimport { InputTextModule } from 'primeng/inputtext';\nimport { ButtonModule } from 'primeng/button';\nimport { SelectButtonModule } from 'primeng/selectbutton';\nimport { TriStateCheckboxModule } from 'primeng/tristatecheckbox';\nimport { CalendarModule } from 'primeng/calendar';\nimport { InputNumberModule } from 'primeng/inputnumber';\nimport { DropdownModule } from 'primeng/dropdown';\nimport { DomHandler, ConnectedOverlayScrollHandler } from 'primeng/dom';\nimport { ObjectUtils } from 'primeng/utils';\nimport { SortMeta } from 'primeng/api';\nimport { TableState } from 'primeng/api';\nimport { FilterMetadata } from 'primeng/api';\nimport { Injectable } from '@angular/core';\nimport { BlockableUI } from 'primeng/api';\nimport { Subject, Subscription } from 'rxjs';\nimport { ScrollingModule, CdkVirtualScrollViewport } from '@angular/cdk/scrolling';\nimport {trigger,style,transition,animate,AnimationEvent} from '@angular/animations';\n\n@Injectable()\nexport class TableService {\n\n private sortSource = new Subject();\n private selectionSource = new Subject();\n private contextMenuSource = new Subject();\n private valueSource = new Subject();\n private totalRecordsSource = new Subject();\n private columnsSource = new Subject();\n\n sortSource$ = this.sortSource.asObservable();\n selectionSource$ = this.selectionSource.asObservable();\n contextMenuSource$ = this.contextMenuSource.asObservable();\n valueSource$ = this.valueSource.asObservable();\n totalRecordsSource$ = this.totalRecordsSource.asObservable();\n columnsSource$ = this.columnsSource.asObservable();\n\n onSort(sortMeta: SortMeta|SortMeta[]) {\n this.sortSource.next(sortMeta);\n }\n\n onSelectionChange() {\n this.selectionSource.next();\n }\n\n onContextMenu(data: any) {\n this.contextMenuSource.next(data);\n }\n\n onValueChange(value: any) {\n this.valueSource.next(value);\n }\n\n onTotalRecordsChange(value: number) {\n this.totalRecordsSource.next(value);\n }\n\n onColumnsChange(columns: any[]) {\n this.columnsSource.next(columns);\n }\n}\n\n@Component({\n selector: 'p-table',\n template: `\n
\n
\n \n
\n
\n \n
\n \n\n
\n \n \n \n \n \n \n \n \n \n
\n
\n\n
\n
\n
\n
\n\n \n\n
\n \n
\n\n
\n \n \n
\n `,\n providers: [TableService],\n changeDetection: ChangeDetectionStrategy.Default,\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['./table.css']\n})\nexport class Table implements OnInit, AfterViewInit, AfterContentInit, BlockableUI, OnChanges {\n\n @Input() frozenColumns: any[];\n\n @Input() frozenValue: any[];\n\n @Input() style: any;\n\n @Input() styleClass: string;\n\n @Input() tableStyle: any;\n\n @Input() tableStyleClass: string;\n\n @Input() paginator: boolean;\n\n @Input() pageLinks: number = 5;\n\n @Input() rowsPerPageOptions: any[];\n\n @Input() alwaysShowPaginator: boolean = true;\n\n @Input() paginatorPosition: string = 'bottom';\n\n @Input() paginatorDropdownAppendTo: any;\n\n @Input() paginatorDropdownScrollHeight: string = '200px';\n\n @Input() currentPageReportTemplate: string = '{currentPage} of {totalPages}';\n\n @Input() showCurrentPageReport: boolean;\n\n @Input() showJumpToPageDropdown: boolean;\n\n @Input() showFirstLastIcon: boolean = true;\n\n @Input() showPageLinks: boolean = true;\n\n @Input() defaultSortOrder: number = 1;\n\n @Input() sortMode: string = 'single';\n\n @Input() resetPageOnSort: boolean = true;\n\n @Input() selectionMode: string;\n\n @Output() selectionChange: EventEmitter = new EventEmitter();\n\n @Input() contextMenuSelection: any;\n\n @Output() contextMenuSelectionChange: EventEmitter = new EventEmitter();\n\n @Input() contextMenuSelectionMode: string = \"separate\";\n\n @Input() dataKey: string;\n\n @Input() metaKeySelection: boolean;\n\n @Input() rowTrackBy: Function = (index: number, item: any) => item;\n\n @Input() lazy: boolean = false;\n\n @Input() lazyLoadOnInit: boolean = true;\n\n @Input() compareSelectionBy: string = 'deepEquals';\n\n @Input() csvSeparator: string = ',';\n\n @Input() exportFilename: string = 'download';\n\n @Input() filters: { [s: string]: FilterMetadata | FilterMetadata[] } = {};\n\n @Input() globalFilterFields: string[];\n\n @Input() filterDelay: number = 300;\n\n @Input() filterLocale: string;\n\n @Input() expandedRowKeys: { [s: string]: boolean; } = {};\n\n @Input() editingRowKeys: { [s: string]: boolean; } = {};\n\n @Input() rowExpandMode: string = 'multiple';\n\n @Input() scrollable: boolean;\n\n @Input() scrollHeight: string;\n\n @Input() virtualScroll: boolean;\n\n @Input() virtualScrollDelay: number = 250;\n\n @Input() virtualRowHeight: number = 28;\n\n @Input() frozenWidth: string;\n\n @Input() responsive: boolean;\n\n @Input() contextMenu: any;\n\n @Input() resizableColumns: boolean;\n\n @Input() columnResizeMode: string = 'fit';\n\n @Input() reorderableColumns: boolean;\n\n @Input() loading: boolean;\n\n @Input() loadingIcon: string = 'pi pi-spinner';\n\n @Input() showLoader: boolean = true;\n\n @Input() rowHover: boolean;\n\n @Input() customSort: boolean;\n\n @Input() autoLayout: boolean;\n\n @Input() exportFunction;\n\n @Input() stateKey: string;\n\n @Input() stateStorage: string = 'session';\n\n @Input() editMode: string = 'cell';\n\n @Input() minBufferPx: number;\n\n @Input() maxBufferPx: number;\n\n @Output() onRowSelect: EventEmitter = new EventEmitter();\n\n @Output() onRowUnselect: EventEmitter = new EventEmitter();\n\n @Output() onPage: EventEmitter = new EventEmitter();\n\n @Output() onSort: EventEmitter = new EventEmitter();\n\n @Output() onFilter: EventEmitter = new EventEmitter();\n\n @Output() onLazyLoad: EventEmitter = new EventEmitter();\n\n @Output() onRowExpand: EventEmitter = new EventEmitter();\n\n @Output() onRowCollapse: EventEmitter = new EventEmitter();\n\n @Output() onContextMenuSelect: EventEmitter = new EventEmitter();\n\n @Output() onColResize: EventEmitter = new EventEmitter();\n\n @Output() onColReorder: EventEmitter = new EventEmitter();\n\n @Output() onRowReorder: EventEmitter = new EventEmitter();\n\n @Output() onEditInit: EventEmitter = new EventEmitter();\n\n @Output() onEditComplete: EventEmitter = new EventEmitter();\n\n @Output() onEditCancel: EventEmitter = new EventEmitter();\n\n @Output() onHeaderCheckboxToggle: EventEmitter = new EventEmitter();\n\n @Output() sortFunction: EventEmitter = new EventEmitter();\n\n @Output() firstChange: EventEmitter = new EventEmitter();\n\n @Output() rowsChange: EventEmitter = new EventEmitter();\n\n @Output() onStateSave: EventEmitter = new EventEmitter();\n\n @Output() onStateRestore: EventEmitter = new EventEmitter();\n\n @ViewChild('container') containerViewChild: ElementRef;\n\n @ViewChild('resizeHelper') resizeHelperViewChild: ElementRef;\n\n @ViewChild('reorderIndicatorUp') reorderIndicatorUpViewChild: ElementRef;\n\n @ViewChild('reorderIndicatorDown') reorderIndicatorDownViewChild: ElementRef;\n\n @ViewChild('table') tableViewChild: ElementRef;\n\n @ViewChild('scrollableView') scrollableViewChild;\n\n @ViewChild('scrollableFrozenView') scrollableFrozenViewChild;\n\n @ContentChildren(PrimeTemplate) templates: QueryList;\n\n _value: any[] = [];\n\n _columns: any[];\n\n _totalRecords: number = 0;\n\n _first: number = 0;\n\n _rows: number;\n\n filteredValue: any[];\n\n headerTemplate: TemplateRef;\n\n bodyTemplate: TemplateRef;\n\n loadingBodyTemplate: TemplateRef;\n\n captionTemplate: TemplateRef;\n\n frozenRowsTemplate: TemplateRef;\n\n footerTemplate: TemplateRef;\n\n summaryTemplate: TemplateRef;\n\n colGroupTemplate: TemplateRef;\n\n expandedRowTemplate: TemplateRef;\n\n frozenExpandedRowTemplate: TemplateRef;\n\n frozenHeaderTemplate: TemplateRef;\n\n frozenBodyTemplate: TemplateRef;\n\n frozenFooterTemplate: TemplateRef;\n\n frozenColGroupTemplate: TemplateRef;\n\n emptyMessageTemplate: TemplateRef;\n\n paginatorLeftTemplate: TemplateRef;\n\n paginatorRightTemplate: TemplateRef;\n\n paginatorDropdownItemTemplate: TemplateRef;\n\n selectionKeys: any = {};\n\n lastResizerHelperX: number;\n\n reorderIconWidth: number;\n\n reorderIconHeight: number;\n\n draggedColumn: any;\n\n draggedRowIndex: number;\n\n droppedRowIndex: number;\n\n rowDragging: boolean;\n\n dropPosition: number;\n\n editingCell: Element;\n\n editingCellData: any;\n\n editingCellField: any;\n\n editingCellRowIndex: number;\n\n editingCellClick: boolean;\n\n documentEditListener: any;\n\n _multiSortMeta: SortMeta[];\n\n _sortField: string;\n\n _sortOrder: number = 1;\n\n preventSelectionSetterPropagation: boolean;\n\n _selection: any;\n\n anchorRowIndex: number;\n\n rangeRowIndex: number;\n\n filterTimeout: any;\n\n initialized: boolean;\n\n rowTouched: boolean;\n\n restoringSort: boolean;\n\n restoringFilter: boolean;\n\n stateRestored: boolean;\n\n columnOrderStateRestored: boolean;\n\n columnWidthsState: string;\n\n tableWidthState: string;\n\n constructor(public el: ElementRef, public zone: NgZone, public tableService: TableService, public cd: ChangeDetectorRef, public filterService: FilterService) {}\n\n ngOnInit() {\n if (this.lazy && this.lazyLoadOnInit) {\n if (!this.virtualScroll) {\n this.onLazyLoad.emit(this.createLazyLoadMetadata());\n }\n\n if (this.restoringFilter) {\n this.restoringFilter = false;\n }\n }\n\n this.initialized = true;\n }\n\n ngAfterContentInit() {\n this.templates.forEach((item) => {\n switch (item.getType()) {\n case 'caption':\n this.captionTemplate = item.template;\n break;\n\n case 'header':\n this.headerTemplate = item.template;\n break;\n\n case 'body':\n this.bodyTemplate = item.template;\n break;\n\n case 'loadingbody':\n this.loadingBodyTemplate = item.template;\n break;\n\n case 'footer':\n this.footerTemplate = item.template;\n break;\n\n case 'summary':\n this.summaryTemplate = item.template;\n break;\n\n case 'colgroup':\n this.colGroupTemplate = item.template;\n break;\n\n case 'rowexpansion':\n this.expandedRowTemplate = item.template;\n break;\n\n case 'frozenrows':\n this.frozenRowsTemplate = item.template;\n break;\n\n case 'frozenheader':\n this.frozenHeaderTemplate = item.template;\n break;\n\n case 'frozenbody':\n this.frozenBodyTemplate = item.template;\n break;\n\n case 'frozenfooter':\n this.frozenFooterTemplate = item.template;\n break;\n\n case 'frozencolgroup':\n this.frozenColGroupTemplate = item.template;\n break;\n\n case 'frozenrowexpansion':\n this.frozenExpandedRowTemplate = item.template;\n break;\n\n case 'emptymessage':\n this.emptyMessageTemplate = item.template;\n break;\n\n case 'paginatorleft':\n this.paginatorLeftTemplate = item.template;\n break;\n\n case 'paginatorright':\n this.paginatorRightTemplate = item.template;\n break;\n\n case 'paginatordropdownitem':\n this.paginatorDropdownItemTemplate = item.template;\n break;\n }\n });\n }\n\n ngAfterViewInit() {\n if (this.isStateful() && this.resizableColumns) {\n this.restoreColumnWidths();\n }\n }\n\n ngOnChanges(simpleChange: SimpleChanges) {\n if (simpleChange.value) {\n if (this.isStateful() && !this.stateRestored) {\n this.restoreState();\n }\n\n this._value = simpleChange.value.currentValue;\n\n if (!this.lazy) {\n this.totalRecords = (this._value ? this._value.length : 0);\n\n if (this.sortMode == 'single' && this.sortField)\n this.sortSingle();\n else if (this.sortMode == 'multiple' && this.multiSortMeta)\n this.sortMultiple();\n else if (this.hasFilter()) //sort already filters\n this._filter();\n }\n\n this.tableService.onValueChange(simpleChange.value.currentValue);\n }\n\n if (simpleChange.columns) {\n this._columns = simpleChange.columns.currentValue;\n this.tableService.onColumnsChange(simpleChange.columns.currentValue);\n\n if (this._columns && this.isStateful() && this.reorderableColumns && !this.columnOrderStateRestored ) {\n this.restoreColumnOrder();\n }\n }\n\n if (simpleChange.sortField) {\n this._sortField = simpleChange.sortField.currentValue;\n\n //avoid triggering lazy load prior to lazy initialization at onInit\n if ( !this.lazy || this.initialized ) {\n if (this.sortMode === 'single') {\n this.sortSingle();\n }\n }\n }\n\n if (simpleChange.sortOrder) {\n this._sortOrder = simpleChange.sortOrder.currentValue;\n\n //avoid triggering lazy load prior to lazy initialization at onInit\n if ( !this.lazy || this.initialized ) {\n if (this.sortMode === 'single') {\n this.sortSingle();\n }\n }\n }\n\n if (simpleChange.multiSortMeta) {\n this._multiSortMeta = simpleChange.multiSortMeta.currentValue;\n if (this.sortMode === 'multiple' && (this.initialized || !this.virtualScroll)) {\n this.sortMultiple();\n }\n }\n\n if (simpleChange.selection) {\n this._selection = simpleChange.selection.currentValue;\n\n if (!this.preventSelectionSetterPropagation) {\n this.updateSelectionKeys();\n this.tableService.onSelectionChange();\n }\n this.preventSelectionSetterPropagation = false;\n }\n }\n\n @Input() get value(): any[] {\n return this._value;\n }\n set value(val: any[]) {\n this._value = val;\n }\n\n @Input() get columns(): any[] {\n return this._columns;\n }\n set columns(cols: any[]) {\n this._columns = cols;\n }\n\n @Input() get first(): number {\n return this._first;\n }\n set first(val: number) {\n this._first = val;\n }\n\n @Input() get rows(): number {\n return this._rows;\n }\n set rows(val: number) {\n this._rows = val;\n }\n\n @Input() get totalRecords(): number {\n return this._totalRecords;\n }\n set totalRecords(val: number) {\n this._totalRecords = val;\n this.tableService.onTotalRecordsChange(this._totalRecords);\n }\n\n @Input() get sortField(): string {\n return this._sortField;\n }\n\n set sortField(val: string) {\n this._sortField = val;\n }\n\n @Input() get sortOrder(): number {\n return this._sortOrder;\n }\n set sortOrder(val: number) {\n this._sortOrder = val;\n }\n\n @Input() get multiSortMeta(): SortMeta[] {\n return this._multiSortMeta;\n }\n\n set multiSortMeta(val: SortMeta[]) {\n this._multiSortMeta = val;\n }\n\n @Input() get selection(): any {\n return this._selection;\n }\n\n set selection(val: any) {\n this._selection = val;\n }\n\n updateSelectionKeys() {\n if (this.dataKey && this._selection) {\n this.selectionKeys = {};\n if (Array.isArray(this._selection)) {\n for(let data of this._selection) {\n this.selectionKeys[String(ObjectUtils.resolveFieldData(data, this.dataKey))] = 1;\n }\n }\n else {\n this.selectionKeys[String(ObjectUtils.resolveFieldData(this._selection, this.dataKey))] = 1;\n }\n }\n }\n\n onPageChange(event) {\n this.first = event.first;\n this.rows = event.rows;\n\n if (this.lazy) {\n this.onLazyLoad.emit(this.createLazyLoadMetadata());\n }\n\n this.onPage.emit({\n first: this.first,\n rows: this.rows\n });\n\n this.firstChange.emit(this.first);\n this.rowsChange.emit(this.rows);\n this.tableService.onValueChange(this.value);\n\n if (this.isStateful()) {\n this.saveState();\n }\n\n this.anchorRowIndex = null;\n\n if (this.scrollable) {\n this.resetScrollTop();\n }\n }\n\n sort(event) {\n let originalEvent = event.originalEvent;\n\n if (this.sortMode === 'single') {\n this._sortOrder = (this.sortField === event.field) ? this.sortOrder * -1 : this.defaultSortOrder;\n this._sortField = event.field;\n\n if (this.resetPageOnSort) {\n this._first = 0;\n this.firstChange.emit(this._first);\n\n if (this.scrollable) {\n this.resetScrollTop();\n }\n }\n\n this.sortSingle();\n }\n if (this.sortMode === 'multiple') {\n let metaKey = originalEvent.metaKey || originalEvent.ctrlKey;\n let sortMeta = this.getSortMeta(event.field);\n\n if (sortMeta) {\n if (!metaKey) {\n this._multiSortMeta = [{ field: event.field, order: sortMeta.order * -1 }];\n\n if (this.resetPageOnSort) {\n this._first = 0;\n this.firstChange.emit(this._first);\n\n if (this.scrollable) {\n this.resetScrollTop();\n }\n }\n }\n else {\n sortMeta.order = sortMeta.order * -1;\n }\n }\n else {\n if (!metaKey || !this.multiSortMeta) {\n this._multiSortMeta = [];\n\n if (this.resetPageOnSort) {\n this._first = 0;\n this.firstChange.emit(this._first);\n }\n }\n this._multiSortMeta.push({ field: event.field, order: this.defaultSortOrder });\n }\n\n this.sortMultiple();\n }\n\n if (this.isStateful()) {\n this.saveState();\n }\n\n this.anchorRowIndex = null;\n }\n\n sortSingle() {\n if (this.sortField && this.sortOrder) {\n if (this.restoringSort) {\n this.restoringSort = false;\n }\n\n if (this.lazy) {\n this.onLazyLoad.emit(this.createLazyLoadMetadata());\n }\n else if (this.value) {\n if (this.customSort) {\n this.sortFunction.emit({\n data: this.value,\n mode: this.sortMode,\n field: this.sortField,\n order: this.sortOrder\n });\n }\n else {\n this.value.sort((data1, data2) => {\n let value1 = ObjectUtils.resolveFieldData(data1, this.sortField);\n let value2 = ObjectUtils.resolveFieldData(data2, this.sortField);\n let result = null;\n\n if (value1 == null && value2 != null)\n result = -1;\n else if (value1 != null && value2 == null)\n result = 1;\n else if (value1 == null && value2 == null)\n result = 0;\n else if (typeof value1 === 'string' && typeof value2 === 'string')\n result = value1.localeCompare(value2);\n else\n result = (value1 < value2) ? -1 : (value1 > value2) ? 1 : 0;\n\n return (this.sortOrder * result);\n });\n\n this._value = [...this.value];\n }\n\n if (this.hasFilter()) {\n this._filter();\n }\n }\n\n let sortMeta: SortMeta = {\n field: this.sortField,\n order: this.sortOrder\n };\n\n this.onSort.emit(sortMeta);\n this.tableService.onSort(sortMeta);\n }\n }\n\n sortMultiple() {\n if (this.multiSortMeta) {\n if (this.lazy) {\n this.onLazyLoad.emit(this.createLazyLoadMetadata());\n }\n else if (this.value) {\n if (this.customSort) {\n this.sortFunction.emit({\n data: this.value,\n mode: this.sortMode,\n multiSortMeta: this.multiSortMeta\n });\n }\n else {\n this.value.sort((data1, data2) => {\n return this.multisortField(data1, data2, this.multiSortMeta, 0);\n });\n\n this._value = [...this.value];\n }\n\n if (this.hasFilter()) {\n this._filter();\n }\n }\n\n this.onSort.emit({\n multisortmeta: this.multiSortMeta\n });\n this.tableService.onSort(this.multiSortMeta);\n }\n }\n\n multisortField(data1, data2, multiSortMeta, index) {\n let value1 = ObjectUtils.resolveFieldData(data1, multiSortMeta[index].field);\n let value2 = ObjectUtils.resolveFieldData(data2, multiSortMeta[index].field);\n let result = null;\n\n if (value1 == null && value2 != null)\n result = -1;\n else if (value1 != null && value2 == null)\n result = 1;\n else if (value1 == null && value2 == null)\n result = 0;\n else if (typeof value1 == 'string' || value1 instanceof String) {\n if (value1.localeCompare && (value1 != value2)) {\n return (multiSortMeta[index].order * value1.localeCompare(value2));\n }\n }\n else {\n result = (value1 < value2) ? -1 : 1;\n }\n\n if (value1 == value2) {\n return (multiSortMeta.length - 1) > (index) ? (this.multisortField(data1, data2, multiSortMeta, index + 1)) : 0;\n }\n\n return (multiSortMeta[index].order * result);\n }\n\n getSortMeta(field: string) {\n if (this.multiSortMeta && this.multiSortMeta.length) {\n for (let i = 0; i < this.multiSortMeta.length; i++) {\n if (this.multiSortMeta[i].field === field) {\n return this.multiSortMeta[i];\n }\n }\n }\n\n return null;\n }\n\n isSorted(field: string) {\n if (this.sortMode === 'single') {\n return (this.sortField && this.sortField === field);\n }\n else if (this.sortMode === 'multiple') {\n let sorted = false;\n if (this.multiSortMeta) {\n for(let i = 0; i < this.multiSortMeta.length; i++) {\n if (this.multiSortMeta[i].field == field) {\n sorted = true;\n break;\n }\n }\n }\n return sorted;\n }\n }\n\n handleRowClick(event) {\n let target = ( event.originalEvent.target);\n let targetNode = target.nodeName;\n let parentNode = target.parentElement && target.parentElement.nodeName;\n if (targetNode == 'INPUT' || targetNode == 'BUTTON' || targetNode == 'A' ||\n parentNode == 'INPUT' || parentNode == 'BUTTON' || parentNode == 'A' ||\n (DomHandler.hasClass(event.originalEvent.target, 'p-clickable'))) {\n return;\n }\n\n if (this.selectionMode) {\n this.preventSelectionSetterPropagation = true;\n if (this.isMultipleSelectionMode() && event.originalEvent.shiftKey && this.anchorRowIndex != null) {\n DomHandler.clearSelection();\n if (this.rangeRowIndex != null) {\n this.clearSelectionRange(event.originalEvent);\n }\n\n this.rangeRowIndex = event.rowIndex;\n this.selectRange(event.originalEvent, event.rowIndex);\n }\n else {\n let rowData = event.rowData;\n let selected = this.isSelected(rowData);\n let metaSelection = this.rowTouched ? false : this.metaKeySelection;\n let dataKeyValue = this.dataKey ? String(ObjectUtils.resolveFieldData(rowData, this.dataKey)) : null;\n this.anchorRowIndex = event.rowIndex;\n this.rangeRowIndex = event.rowIndex;\n\n if (metaSelection) {\n let metaKey = event.originalEvent.metaKey||event.originalEvent.ctrlKey;\n\n if (selected && metaKey) {\n if (this.isSingleSelectionMode()) {\n this._selection = null;\n this.selectionKeys = {};\n this.selectionChange.emit(null);\n }\n else {\n let selectionIndex = this.findIndexInSelection(rowData);\n this._selection = this.selection.filter((val,i) => i!=selectionIndex);\n this.selectionChange.emit(this.selection);\n if (dataKeyValue) {\n delete this.selectionKeys[dataKeyValue];\n }\n }\n\n this.onRowUnselect.emit({originalEvent: event.originalEvent, data: rowData, type: 'row'});\n }\n else {\n if (this.isSingleSelectionMode()) {\n this._selection = rowData;\n this.selectionChange.emit(rowData);\n if (dataKeyValue) {\n this.selectionKeys = {};\n this.selectionKeys[dataKeyValue] = 1;\n }\n }\n else if (this.isMultipleSelectionMode()) {\n if (metaKey) {\n this._selection = this.selection||[];\n }\n else {\n this._selection = [];\n this.selectionKeys = {};\n }\n\n this._selection = [...this.selection,rowData];\n this.selectionChange.emit(this.selection);\n if (dataKeyValue) {\n this.selectionKeys[dataKeyValue] = 1;\n }\n }\n\n this.onRowSelect.emit({originalEvent: event.originalEvent, data: rowData, type: 'row', index: event.rowIndex});\n }\n }\n else {\n if (this.selectionMode === 'single') {\n if (selected) {\n this._selection = null;\n this.selectionKeys = {};\n this.selectionChange.emit(this.selection);\n this.onRowUnselect.emit({ originalEvent: event.originalEvent, data: rowData, type: 'row', index: event.rowIndex });\n }\n else {\n this._selection = rowData;\n this.selectionChange.emit(this.selection);\n this.onRowSelect.emit({ originalEvent: event.originalEvent, data: rowData, type: 'row', index: event.rowIndex });\n if (dataKeyValue) {\n this.selectionKeys = {};\n this.selectionKeys[dataKeyValue] = 1;\n }\n }\n }\n else if (this.selectionMode === 'multiple') {\n if (selected) {\n let selectionIndex = this.findIndexInSelection(rowData);\n this._selection = this.selection.filter((val, i) => i != selectionIndex);\n this.selectionChange.emit(this.selection);\n this.onRowUnselect.emit({ originalEvent: event.originalEvent, data: rowData, type: 'row', index: event.rowIndex });\n if (dataKeyValue) {\n delete this.selectionKeys[dataKeyValue];\n }\n }\n else {\n this._selection = this.selection ? [...this.selection, rowData] : [rowData];\n this.selectionChange.emit(this.selection);\n this.onRowSelect.emit({ originalEvent: event.originalEvent, data: rowData, type: 'row', index: event.rowIndex });\n if (dataKeyValue) {\n this.selectionKeys[dataKeyValue] = 1;\n }\n }\n }\n }\n }\n\n this.tableService.onSelectionChange();\n\n if (this.isStateful()) {\n this.saveState();\n }\n }\n\n this.rowTouched = false;\n }\n\n handleRowTouchEnd(event) {\n this.rowTouched = true;\n }\n\n handleRowRightClick(event) {\n if (this.contextMenu) {\n const rowData = event.rowData;\n\n if (this.contextMenuSelectionMode === 'separate') {\n this.contextMenuSelection = rowData;\n this.contextMenuSelectionChange.emit(rowData);\n this.onContextMenuSelect.emit({originalEvent: event.originalEvent, data: rowData, index: event.rowIndex});\n this.contextMenu.show(event.originalEvent);\n this.tableService.onContextMenu(rowData);\n }\n else if (this.contextMenuSelectionMode === 'joint') {\n this.preventSelectionSetterPropagation = true;\n let selected = this.isSelected(rowData);\n let dataKeyValue = this.dataKey ? String(ObjectUtils.resolveFieldData(rowData, this.dataKey)) : null;\n\n if (!selected) {\n if (this.isSingleSelectionMode()) {\n this.selection = rowData;\n this.selectionChange.emit(rowData);\n \n if (dataKeyValue) {\n this.selectionKeys = {};\n this.selectionKeys[dataKeyValue] = 1;\n }\n }\n else if (this.isMultipleSelectionMode()) {\n this._selection = this.selection ? [...this.selection, rowData] : [rowData];\n this.selectionChange.emit(this.selection);\n \n if (dataKeyValue) {\n this.selectionKeys[dataKeyValue] = 1;\n }\n }\n }\n\n this.tableService.onSelectionChange();\n this.contextMenu.show(event.originalEvent);\n this.onContextMenuSelect.emit({originalEvent: event, data: rowData, index: event.rowIndex});\n }\n }\n }\n\n selectRange(event: MouseEvent, rowIndex: number) {\n let rangeStart, rangeEnd;\n\n if (this.anchorRowIndex > rowIndex) {\n rangeStart = rowIndex;\n rangeEnd = this.anchorRowIndex;\n }\n else if (this.anchorRowIndex < rowIndex) {\n rangeStart = this.anchorRowIndex;\n rangeEnd = rowIndex;\n }\n else {\n rangeStart = rowIndex;\n rangeEnd = rowIndex;\n }\n\n if (this.lazy && this.paginator) {\n rangeStart -= this.first;\n rangeEnd -= this.first;\n }\n\n let rangeRowsData = [];\n for(let i = rangeStart; i <= rangeEnd; i++) {\n let rangeRowData = this.filteredValue ? this.filteredValue[i] : this.value[i];\n if (!this.isSelected(rangeRowData)) {\n rangeRowsData.push(rangeRowData);\n this._selection = [...this.selection, rangeRowData];\n let dataKeyValue: string = this.dataKey ? String(ObjectUtils.resolveFieldData(rangeRowData, this.dataKey)) : null;\n if (dataKeyValue) {\n this.selectionKeys[dataKeyValue] = 1;\n }\n }\n }\n this.selectionChange.emit(this.selection);\n this.onRowSelect.emit({originalEvent: event, data: rangeRowsData, type: 'row'});\n }\n\n clearSelectionRange(event: MouseEvent) {\n let rangeStart, rangeEnd;\n\n if (this.rangeRowIndex > this.anchorRowIndex) {\n rangeStart = this.anchorRowIndex;\n rangeEnd = this.rangeRowIndex;\n }\n else if (this.rangeRowIndex < this.anchorRowIndex) {\n rangeStart = this.rangeRowIndex;\n rangeEnd = this.anchorRowIndex;\n }\n else {\n rangeStart = this.rangeRowIndex;\n rangeEnd = this.rangeRowIndex;\n }\n\n for(let i = rangeStart; i <= rangeEnd; i++) {\n let rangeRowData = this.value[i];\n let selectionIndex = this.findIndexInSelection(rangeRowData);\n this._selection = this.selection.filter((val,i) => i!=selectionIndex);\n let dataKeyValue: string = this.dataKey ? String(ObjectUtils.resolveFieldData(rangeRowData, this.dataKey)) : null;\n if (dataKeyValue) {\n delete this.selectionKeys[dataKeyValue];\n }\n this.onRowUnselect.emit({originalEvent: event, data: rangeRowData, type: 'row'});\n }\n }\n\n isSelected(rowData) {\n if (rowData && this.selection) {\n if (this.dataKey) {\n return this.selectionKeys[ObjectUtils.resolveFieldData(rowData, this.dataKey)] !== undefined;\n }\n else {\n if (this.selection instanceof Array)\n return this.findIndexInSelection(rowData) > -1;\n else\n return this.equals(rowData, this.selection);\n }\n }\n\n return false;\n }\n\n findIndexInSelection(rowData: any) {\n let index: number = -1;\n if (this.selection && this.selection.length) {\n for (let i = 0; i < this.selection.length; i++) {\n if (this.equals(rowData, this.selection[i])) {\n index = i;\n break;\n }\n }\n }\n\n return index;\n }\n\n toggleRowWithRadio(event: any, rowData:any) {\n this.preventSelectionSetterPropagation = true;\n\n if (this.selection != rowData) {\n this._selection = rowData;\n this.selectionChange.emit(this.selection);\n this.onRowSelect.emit({originalEvent: event.originalEvent, index: event.rowIndex, data: rowData, type: 'radiobutton'});\n\n if (this.dataKey) {\n this.selectionKeys = {};\n this.selectionKeys[String(ObjectUtils.resolveFieldData(rowData, this.dataKey))] = 1;\n }\n }\n else {\n this._selection = null;\n this.selectionChange.emit(this.selection);\n this.onRowUnselect.emit({originalEvent: event.originalEvent, index: event.rowIndex, data: rowData, type: 'radiobutton'});\n }\n\n this.tableService.onSelectionChange();\n\n if (this.isStateful()) {\n this.saveState();\n }\n }\n\n toggleRowWithCheckbox(event, rowData: any) {\n this.selection = this.selection||[];\n let selected = this.isSelected(rowData);\n let dataKeyValue = this.dataKey ? String(ObjectUtils.resolveFieldData(rowData, this.dataKey)) : null;\n this.preventSelectionSetterPropagation = true;\n\n if (selected) {\n let selectionIndex = this.findIndexInSelection(rowData);\n this._selection = this.selection.filter((val, i) => i != selectionIndex);\n this.selectionChange.emit(this.selection);\n this.onRowUnselect.emit({ originalEvent: event.originalEvent, index: event.rowIndex, data: rowData, type: 'checkbox' });\n if (dataKeyValue) {\n delete this.selectionKeys[dataKeyValue];\n }\n }\n else {\n this._selection = this.selection ? [...this.selection, rowData] : [rowData];\n this.selectionChange.emit(this.selection);\n this.onRowSelect.emit({ originalEvent: event.originalEvent, index: event.rowIndex, data: rowData, type: 'checkbox' });\n if (dataKeyValue) {\n this.selectionKeys[dataKeyValue] = 1;\n }\n }\n\n this.tableService.onSelectionChange();\n\n if (this.isStateful()) {\n this.saveState();\n }\n }\n\n toggleRowsWithCheckbox(event: Event, check: boolean) {\n this._selection = check ? this.filteredValue ? this.filteredValue.slice(): this.value.slice() : [];\n this.preventSelectionSetterPropagation = true;\n this.updateSelectionKeys();\n this.selectionChange.emit(this._selection);\n this.tableService.onSelectionChange();\n this.onHeaderCheckboxToggle.emit({originalEvent: event, checked: check});\n\n if (this.isStateful()) {\n this.saveState();\n }\n }\n\n equals(data1, data2) {\n return this.compareSelectionBy === 'equals' ? (data1 === data2) : ObjectUtils.equals(data1, data2, this.dataKey);\n }\n\n /* Legacy Filtering for custom elements */\n filter(value: any, field: string, matchMode: string) {\n if (this.filterTimeout) {\n clearTimeout(this.filterTimeout);\n }\n if (!this.isFilterBlank(value)) {\n this.filters[field] = { value: value, matchMode: matchMode };\n } else if (this.filters[field]) {\n delete this.filters[field];\n }\n\n this.filterTimeout = setTimeout(() => {\n this._filter();\n this.filterTimeout = null;\n }, this.filterDelay);\n\n this.anchorRowIndex = null;\n }\n\n filterGlobal(value, matchMode) {\n this.filter(value, 'global', matchMode);\n }\n\n isFilterBlank(filter: any): boolean {\n if (filter !== null && filter !== undefined) {\n if ((typeof filter === 'string' && filter.trim().length == 0) || (filter instanceof Array && filter.length == 0))\n return true;\n else\n return false;\n }\n return true;\n }\n\n _filter() {\n if (!this.restoringFilter) {\n this.first = 0;\n this.firstChange.emit(this.first);\n }\n\n if (this.lazy) {\n this.onLazyLoad.emit(this.createLazyLoadMetadata());\n }\n else {\n if (!this.value) {\n return;\n }\n\n if (!this.hasFilter()) {\n this.filteredValue = null;\n if (this.paginator) {\n this.totalRecords = this.value ? this.value.length : 0;\n }\n }\n else {\n let globalFilterFieldsArray;\n if (this.filters['global']) {\n if (!this.columns && !this.globalFilterFields)\n throw new Error('Global filtering requires dynamic columns or globalFilterFields to be defined.');\n else\n globalFilterFieldsArray = this.globalFilterFields||this.columns;\n }\n\n this.filteredValue = [];\n\n for (let i = 0; i < this.value.length; i++) {\n let localMatch = true;\n let globalMatch = false;\n let localFiltered = false;\n\n for (let prop in this.filters) {\n if (this.filters.hasOwnProperty(prop) && prop !== 'global') {\n localFiltered = true;\n let filterField = prop;\n let filterMeta = this.filters[filterField];\n\n if (Array.isArray(filterMeta)) {\n for (let meta of filterMeta) {\n localMatch = this.executeLocalFilter(filterField, this.value[i], meta);\n\n if ((meta.operator === FilterOperator.OR && localMatch) || (meta.operator === FilterOperator.AND && !localMatch)) {\n break;\n }\n }\n }\n else {\n localMatch = this.executeLocalFilter(filterField, this.value[i], filterMeta);\n }\n \n if (!localMatch) {\n break;\n }\n }\n }\n\n if (this.filters['global'] && !globalMatch && globalFilterFieldsArray) {\n for(let j = 0; j < globalFilterFieldsArray.length; j++) {\n let globalFilterField = globalFilterFieldsArray[j].field||globalFilterFieldsArray[j];\n globalMatch = this.filterService.filters[( this.filters['global']).matchMode](ObjectUtils.resolveFieldData(this.value[i], globalFilterField), ( this.filters['global']).value, this.filterLocale);\n\n if (globalMatch) {\n break;\n }\n }\n }\n\n let matches: boolean;\n if (this.filters['global']) {\n matches = localFiltered ? (localFiltered && localMatch && globalMatch) : globalMatch;\n }\n else {\n matches = localFiltered && localMatch;\n }\n\n if (matches) {\n this.filteredValue.push(this.value[i]);\n }\n }\n\n if (this.filteredValue.length === this.value.length) {\n this.filteredValue = null;\n }\n\n if (this.paginator) {\n this.totalRecords = this.filteredValue ? this.filteredValue.length : this.value ? this.value.length : 0;\n }\n }\n }\n\n this.onFilter.emit({\n filters: this.filters,\n filteredValue: this.filteredValue || this.value\n });\n\n this.tableService.onValueChange(this.value);\n\n if (this.isStateful() && !this.restoringFilter) {\n this.saveState();\n }\n\n if (this.restoringFilter) {\n this.restoringFilter = false;\n }\n\n this.cd.markForCheck();\n\n if (this.scrollable) {\n this.resetScrollTop();\n }\n }\n\n executeLocalFilter(field: string, rowData: any, filterMeta: FilterMetadata): boolean {\n let filterValue = filterMeta.value;\n let filterMatchMode = filterMeta.matchMode || FilterMatchMode.STARTS_WITH;\n let dataFieldValue = ObjectUtils.resolveFieldData(rowData, field);\n let filterConstraint = this.filterService.filters[filterMatchMode];\n\n return filterConstraint(dataFieldValue, filterValue, this.filterLocale);\n }\n\n hasFilter() {\n let empty = true;\n for (let prop in this.filters) {\n if (this.filters.hasOwnProperty(prop)) {\n empty = false;\n break;\n }\n }\n\n return !empty;\n }\n\n createLazyLoadMetadata(): any {\n return {\n first: this.first,\n rows: this.rows,\n sortField: this.sortField,\n sortOrder: this.sortOrder,\n filters: this.filters,\n globalFilter: this.filters && this.filters['global'] ? ( this.filters['global']).value : null,\n multiSortMeta: this.multiSortMeta\n };\n }\n\n public clear() {\n this._sortField = null;\n this._sortOrder = this.defaultSortOrder;\n this._multiSortMeta = null;\n this.tableService.onSort(null);\n\n this.filteredValue = null;\n this.filters = {};\n\n this.first = 0;\n this.firstChange.emit(this.first);\n\n if (this.lazy) {\n this.onLazyLoad.emit(this.createLazyLoadMetadata());\n }\n else {\n this.totalRecords = (this._value ? this._value.length : 0);\n }\n }\n\n public reset() {\n this.clear();\n }\n\n public exportCSV(options?: any) {\n let data;\n let csv = '';\n let columns = this.frozenColumns ? [...this.frozenColumns, ...this.columns] : this.columns;\n\n if (options && options.selectionOnly) {\n data = this.selection || [];\n }\n else {\n data = this.filteredValue || this.value;\n\n if (this.frozenValue) {\n data = data ? [...this.frozenValue, ...data] : this.frozenValue;\n }\n }\n\n //headers\n for (let i = 0; i < columns.length; i++) {\n let column = columns[i];\n if (column.exportable !== false && column.field) {\n csv += '\"' + (column.header || column.field) + '\"';\n\n if (i < (columns.length - 1)) {\n csv += this.csvSeparator;\n }\n }\n }\n\n //body\n data.forEach((record, i) => {\n csv += '\\n';\n for (let i = 0; i < columns.length; i++) {\n let column = columns[i];\n if (column.exportable !== false && column.field) {\n let cellData = ObjectUtils.resolveFieldData(record, column.field);\n\n if (cellData != null) {\n if (this.exportFunction) {\n cellData = this.exportFunction({\n data: cellData,\n field: column.field\n });\n }\n else\n cellData = String(cellData).replace(/\"/g, '\"\"');\n }\n else\n cellData = '';\n\n csv += '\"' + cellData + '\"';\n\n if (i < (columns.length - 1)) {\n csv += this.csvSeparator;\n }\n }\n }\n });\n\n let blob = new Blob([csv], {\n type: 'text/csv;charset=utf-8;'\n });\n\n if (window.navigator.msSaveOrOpenBlob) {\n navigator.msSaveOrOpenBlob(blob, this.exportFilename + '.csv');\n }\n else {\n let link = document.createElement(\"a\");\n link.style.display = 'none';\n document.body.appendChild(link);\n if (link.download !== undefined) {\n link.setAttribute('href', URL.createObjectURL(blob));\n link.setAttribute('download', this.exportFilename + '.csv');\n link.click();\n }\n else {\n csv = 'data:text/csv;charset=utf-8,' + csv;\n window.open(encodeURI(csv));\n }\n document.body.removeChild(link);\n }\n }\n\n public resetScrollTop() {\n if (this.virtualScroll)\n this.scrollToVirtualIndex(0);\n else\n this.scrollTo({top: 0});\n }\n\n public scrollToVirtualIndex(index: number) {\n if (this.scrollableViewChild) {\n this.scrollableViewChild.scrollToVirtualIndex(index);\n }\n\n if (this.scrollableFrozenViewChild) {\n this.scrollableFrozenViewChild.scrollToVirtualIndex(index);\n }\n }\n\n public scrollTo(options) {\n if (this.scrollableViewChild) {\n this.scrollableViewChild.scrollTo(options);\n }\n\n if (this.scrollableFrozenViewChild) {\n this.scrollableFrozenViewChild.scrollTo(options);\n }\n }\n\n updateEditingCell(cell, data, field, index) {\n this.editingCell = cell;\n this.editingCellData = data;\n this.editingCellField = field;\n this.editingCellRowIndex = index;\n this.bindDocumentEditListener();\n }\n\n isEditingCellValid() {\n return (this.editingCell && DomHandler.find(this.editingCell, '.ng-invalid.ng-dirty').length === 0);\n }\n\n bindDocumentEditListener() {\n if (!this.documentEditListener) {\n this.documentEditListener = (event) => {\n if (this.editingCell && !this.editingCellClick && this.isEditingCellValid()) {\n DomHandler.removeClass(this.editingCell, 'p-cell-editing');\n this.editingCell = null;\n this.onEditComplete.emit({ field: this.editingCellField, data: this.editingCellData, originalEvent: event, index: this.editingCellRowIndex });\n this.editingCellField = null;\n this.editingCellData = null;\n this.editingCellRowIndex = null;\n this.unbindDocumentEditListener();\n this.cd.markForCheck();\n }\n\n this.editingCellClick = false;\n };\n\n document.addEventListener('click', this.documentEditListener);\n }\n }\n\n unbindDocumentEditListener() {\n if (this.documentEditListener) {\n document.removeEventListener('click', this.documentEditListener);\n this.documentEditListener = null;\n }\n }\n\n initRowEdit(rowData: any) {\n let dataKeyValue = String(ObjectUtils.resolveFieldData(rowData, this.dataKey));\n this.editingRowKeys[dataKeyValue] = true;\n }\n\n saveRowEdit(rowData: any, rowElement: HTMLTableRowElement) {\n if (DomHandler.find(rowElement, '.ng-invalid.ng-dirty').length === 0) {\n let dataKeyValue = String(ObjectUtils.resolveFieldData(rowData, this.dataKey));\n delete this.editingRowKeys[dataKeyValue];\n }\n }\n\n cancelRowEdit(rowData: any) {\n let dataKeyValue = String(ObjectUtils.resolveFieldData(rowData, this.dataKey));\n delete this.editingRowKeys[dataKeyValue];\n }\n\n toggleRow(rowData: any, event?: Event) {\n if (!this.dataKey) {\n throw new Error('dataKey must be defined to use row expansion');\n }\n\n let dataKeyValue = String(ObjectUtils.resolveFieldData(rowData, this.dataKey));\n\n if (this.expandedRowKeys[dataKeyValue] != null) {\n delete this.expandedRowKeys[dataKeyValue];\n this.onRowCollapse.emit({\n originalEvent: event,\n data: rowData\n });\n }\n else {\n if (this.rowExpandMode === 'single') {\n this.expandedRowKeys = {};\n }\n\n this.expandedRowKeys[dataKeyValue] = true;\n this.onRowExpand.emit({\n originalEvent: event,\n data: rowData\n });\n }\n\n if (event) {\n event.preventDefault();\n }\n\n if (this.isStateful()) {\n this.saveState();\n }\n }\n\n isRowExpanded(rowData: any): boolean {\n return this.expandedRowKeys[String(ObjectUtils.resolveFieldData(rowData, this.dataKey))] === true;\n }\n\n isRowEditing(rowData: any): boolean {\n return this.editingRowKeys[String(ObjectUtils.resolveFieldData(rowData, this.dataKey))] === true;\n }\n\n isSingleSelectionMode() {\n return this.selectionMode === 'single';\n }\n\n isMultipleSelectionMode() {\n return this.selectionMode === 'multiple';\n }\n\n onColumnResizeBegin(event) {\n let containerLeft = DomHandler.getOffset(this.containerViewChild.nativeElement).left;\n this.lastResizerHelperX = (event.pageX - containerLeft + this.containerViewChild.nativeElement.scrollLeft);\n this.onColumnResize(event);\n event.preventDefault();\n }\n\n onColumnResize(event) {\n let containerLeft = DomHandler.getOffset(this.containerViewChild.nativeElement).left;\n DomHandler.addClass(this.containerViewChild.nativeElement, 'p-unselectable-text');\n this.resizeHelperViewChild.nativeElement.style.height = this.containerViewChild.nativeElement.offsetHeight + 'px';\n this.resizeHelperViewChild.nativeElement.style.top = 0 + 'px';\n this.resizeHelperViewChild.nativeElement.style.left = (event.pageX - containerLeft + this.containerViewChild.nativeElement.scrollLeft) + 'px';\n\n this.resizeHelperViewChild.nativeElement.style.display = 'block';\n }\n\n onColumnResizeEnd(event, column) {\n let delta = this.resizeHelperViewChild.nativeElement.offsetLeft - this.lastResizerHelperX;\n let columnWidth = column.offsetWidth;\n let minWidth = parseInt(column.style.minWidth || 15);\n\n if (columnWidth + delta < minWidth) {\n delta = minWidth - columnWidth;\n }\n\n const newColumnWidth = columnWidth + delta;\n\n if (newColumnWidth >= minWidth) {\n if (this.columnResizeMode === 'fit') {\n let nextColumn = column.nextElementSibling;\n while (!nextColumn.offsetParent) {\n nextColumn = nextColumn.nextElementSibling;\n }\n\n if (nextColumn) {\n let nextColumnWidth = nextColumn.offsetWidth - delta;\n let nextColumnMinWidth = nextColumn.style.minWidth || 15;\n\n if (newColumnWidth > 15 && nextColumnWidth > parseInt(nextColumnMinWidth)) {\n if (this.scrollable) {\n let scrollableView = this.findParentScrollableView(column);\n let scrollableBodyTable = DomHandler.findSingle(scrollableView, '.p-datatable-scrollable-body table') || DomHandler.findSingle(scrollableView, '.p-datatable-virtual-scrollable-body table');\n let scrollableHeaderTable = DomHandler.findSingle(scrollableView, 'table.p-datatable-scrollable-header-table');\n let scrollableFooterTable = DomHandler.findSingle(scrollableView, 'table.p-datatable-scrollable-footer-table');\n let resizeColumnIndex = DomHandler.index(column);\n\n this.resizeColGroup(scrollableHeaderTable, resizeColumnIndex, newColumnWidth, nextColumnWidth);\n this.resizeColGroup(scrollableBodyTable, resizeColumnIndex, newColumnWidth, nextColumnWidth);\n this.resizeColGroup(scrollableFooterTable, resizeColumnIndex, newColumnWidth, nextColumnWidth);\n }\n else {\n column.style.width = newColumnWidth + 'px';\n if (nextColumn) {\n nextColumn.style.width = nextColumnWidth + 'px';\n }\n }\n }\n }\n }\n else if (this.columnResizeMode === 'expand') {\n if (newColumnWidth >= minWidth) {\n if (this.scrollable) {\n this.setScrollableItemsWidthOnExpandResize(column, newColumnWidth, delta);\n }\n else {\n this.tableViewChild.nativeElement.style.width = this.tableViewChild.nativeElement.offsetWidth + delta + 'px';\n column.style.width = newColumnWidth + 'px';\n let containerWidth = this.tableViewChild.nativeElement.style.width;\n this.containerViewChild.nativeElement.style.width = containerWidth + 'px';\n }\n }\n }\n\n this.onColResize.emit({\n element: column,\n delta: delta\n });\n\n if (this.isStateful()) {\n this.saveState();\n }\n }\n\n this.resizeHelperViewChild.nativeElement.style.display = 'none';\n DomHandler.removeClass(this.containerViewChild.nativeElement, 'p-unselectable-text');\n }\n\n setScrollableItemsWidthOnExpandResize(column, newColumnWidth, delta) {\n let scrollableView = column ? this.findParentScrollableView(column) : this.containerViewChild.nativeElement;\n let scrollableBody = DomHandler.findSingle(scrollableView, '.p-datatable-scrollable-body') || DomHandler.findSingle(scrollableView, 'cdk-virtual-scroll-viewport');\n let scrollableHeader = DomHandler.findSingle(scrollableView, '.p-datatable-scrollable-header');\n let scrollableFooter = DomHandler.findSingle(scrollableView, '.p-datatable-scrollable-footer');\n let scrollableBodyTable = DomHandler.findSingle(scrollableBody, '.p-datatable-scrollable-body table') || DomHandler.findSingle(scrollableView, 'cdk-virtual-scroll-viewport table');\n let scrollableHeaderTable = DomHandler.findSingle(scrollableHeader, 'table.p-datatable-scrollable-header-table');\n let scrollableFooterTable = DomHandler.findSingle(scrollableFooter, 'table.p-datatable-scrollable-footer-table');\n\n const scrollableBodyTableWidth = column ? scrollableBodyTable.offsetWidth + delta : newColumnWidth;\n const scrollableHeaderTableWidth = column ? scrollableHeaderTable.offsetWidth + delta : newColumnWidth;\n const isContainerInViewport = this.containerViewChild.nativeElement.offsetWidth >= scrollableBodyTableWidth;\n\n let setWidth = (container, table, width, isContainerInViewport) => {\n if (container && table) {\n container.style.width = isContainerInViewport ? width + DomHandler.calculateScrollbarWidth(scrollableBody) + 'px' : 'auto'\n table.style.width = width + 'px';\n }\n };\n\n setWidth(scrollableBody, scrollableBodyTable, scrollableBodyTableWidth, isContainerInViewport);\n setWidth(scrollableHeader, scrollableHeaderTable, scrollableHeaderTableWidth, isContainerInViewport);\n setWidth(scrollableFooter, scrollableFooterTable, scrollableHeaderTableWidth, isContainerInViewport);\n\n if (column) {\n let resizeColumnIndex = DomHandler.index(column);\n\n this.resizeColGroup(scrollableHeaderTable, resizeColumnIndex, newColumnWidth, null);\n this.resizeColGroup(scrollableBodyTable, resizeColumnIndex, newColumnWidth, null);\n this.resizeColGroup(scrollableFooterTable, resizeColumnIndex, newColumnWidth, null);\n }\n }\n\n findParentScrollableView(column) {\n if (column) {\n let parent = column.parentElement;\n while (parent && !DomHandler.hasClass(parent, 'p-datatable-scrollable-view')) {\n parent = parent.parentElement;\n }\n\n return parent;\n }\n else {\n return null;\n }\n }\n\n resizeColGroup(table, resizeColumnIndex, newColumnWidth, nextColumnWidth) {\n if (table) {\n let colGroup = table.children[0].nodeName === 'COLGROUP' ? table.children[0] : null;\n\n if (colGroup) {\n let col = colGroup.children[resizeColumnIndex];\n let nextCol = col.nextElementSibling;\n col.style.width = newColumnWidth + 'px';\n\n if (nextCol && nextColumnWidth) {\n nextCol.style.width = nextColumnWidth + 'px';\n }\n }\n else {\n throw \"Scrollable tables require a colgroup to support resizable columns\";\n }\n }\n }\n\n onColumnDragStart(event, columnElement) {\n this.reorderIconWidth = DomHandler.getHiddenElementOuterWidth(this.reorderIndicatorUpViewChild.nativeElement);\n this.reorderIconHeight = DomHandler.getHiddenElementOuterHeight(this.reorderIndicatorDownViewChild.nativeElement);\n this.draggedColumn = columnElement;\n event.dataTransfer.setData('text', 'b'); // For firefox\n }\n\n onColumnDragEnter(event, dropHeader) {\n if (this.reorderableColumns && this.draggedColumn && dropHeader) {\n event.preventDefault();\n let containerOffset = DomHandler.getOffset(this.containerViewChild.nativeElement);\n let dropHeaderOffset = DomHandler.getOffset(dropHeader);\n\n if (this.draggedColumn != dropHeader) {\n let dragIndex = DomHandler.indexWithinGroup(this.draggedColumn, 'preorderablecolumn');\n let dropIndex = DomHandler.indexWithinGroup(dropHeader, 'preorderablecolumn');\n let targetLeft = dropHeaderOffset.left - containerOffset.left;\n let targetTop = containerOffset.top - dropHeaderOffset.top;\n let columnCenter = dropHeaderOffset.left + dropHeader.offsetWidth / 2;\n\n this.reorderIndicatorUpViewChild.nativeElement.style.top = dropHeaderOffset.top - containerOffset.top - (this.reorderIconHeight - 1) + 'px';\n this.reorderIndicatorDownViewChild.nativeElement.style.top = dropHeaderOffset.top - containerOffset.top + dropHeader.offsetHeight + 'px';\n\n if (event.pageX > columnCenter) {\n this.reorderIndicatorUpViewChild.nativeElement.style.left = (targetLeft + dropHeader.offsetWidth - Math.ceil(this.reorderIconWidth / 2)) + 'px';\n this.reorderIndicatorDownViewChild.nativeElement.style.left = (targetLeft + dropHeader.offsetWidth - Math.ceil(this.reorderIconWidth / 2)) + 'px';\n this.dropPosition = 1;\n }\n else {\n this.reorderIndicatorUpViewChild.nativeElement.style.left = (targetLeft - Math.ceil(this.reorderIconWidth / 2)) + 'px';\n this.reorderIndicatorDownViewChild.nativeElement.style.left = (targetLeft - Math.ceil(this.reorderIconWidth / 2)) + 'px';\n this.dropPosition = -1;\n }\n\n if ((dropIndex - dragIndex === 1 && this.dropPosition === -1) || (dropIndex - dragIndex === -1 && this.dropPosition === 1)) {\n this.reorderIndicatorUpViewChild.nativeElement.style.display = 'none';\n this.reorderIndicatorDownViewChild.nativeElement.style.display = 'none';\n }\n else {\n this.reorderIndicatorUpViewChild.nativeElement.style.display = 'block';\n this.reorderIndicatorDownViewChild.nativeElement.style.display = 'block';\n }\n }\n else {\n event.dataTransfer.dropEffect = 'none';\n }\n }\n }\n\n onColumnDragLeave(event) {\n if (this.reorderableColumns && this.draggedColumn) {\n event.preventDefault();\n this.reorderIndicatorUpViewChild.nativeElement.style.display = 'none';\n this.reorderIndicatorDownViewChild.nativeElement.style.display = 'none';\n }\n }\n\n onColumnDrop(event, dropColumn) {\n event.preventDefault();\n if (this.draggedColumn) {\n let dragIndex = DomHandler.indexWithinGroup(this.draggedColumn, 'preorderablecolumn');\n let dropIndex = DomHandler.indexWithinGroup(dropColumn, 'preorderablecolumn');\n let allowDrop = (dragIndex != dropIndex);\n if (allowDrop && ((dropIndex - dragIndex == 1 && this.dropPosition === -1) || (dragIndex - dropIndex == 1 && this.dropPosition === 1))) {\n allowDrop = false;\n }\n\n if (allowDrop && ((dropIndex < dragIndex && this.dropPosition === 1))) {\n dropIndex = dropIndex + 1;\n }\n\n if (allowDrop && ((dropIndex > dragIndex && this.dropPosition === -1))) {\n dropIndex = dropIndex - 1;\n }\n\n if (allowDrop) {\n ObjectUtils.reorderArray(this.columns, dragIndex, dropIndex);\n\n this.onColReorder.emit({\n dragIndex: dragIndex,\n dropIndex: dropIndex,\n columns: this.columns\n });\n\n if (this.isStateful()) {\n this.zone.runOutsideAngular(() => {\n setTimeout(() => {\n this.saveState();\n });\n });\n }\n }\n\n this.reorderIndicatorUpViewChild.nativeElement.style.display = 'none';\n this.reorderIndicatorDownViewChild.nativeElement.style.display = 'none';\n this.draggedColumn.draggable = false;\n this.draggedColumn = null;\n this.dropPosition = null;\n }\n }\n\n onRowDragStart(event, index) {\n this.rowDragging = true;\n this.draggedRowIndex = index;\n event.dataTransfer.setData('text', 'b'); // For firefox\n }\n\n onRowDragOver(event, index, rowElement) {\n if (this.rowDragging && this.draggedRowIndex !== index) {\n let rowY = DomHandler.getOffset(rowElement).top + DomHandler.getWindowScrollTop();\n let pageY = event.pageY;\n let rowMidY = rowY + DomHandler.getOuterHeight(rowElement) / 2;\n let prevRowElement = rowElement.previousElementSibling;\n\n if (pageY < rowMidY) {\n DomHandler.removeClass(rowElement, 'p-datatable-dragpoint-bottom');\n\n this.droppedRowIndex = index;\n if (prevRowElement)\n DomHandler.addClass(prevRowElement, 'p-datatable-dragpoint-bottom');\n else\n DomHandler.addClass(rowElement, 'p-datatable-dragpoint-top');\n }\n else {\n if (prevRowElement)\n DomHandler.removeClass(prevRowElement, 'p-datatable-dragpoint-bottom');\n else\n DomHandler.addClass(rowElement, 'p-datatable-dragpoint-top');\n\n this.droppedRowIndex = index + 1;\n DomHandler.addClass(rowElement, 'p-datatable-dragpoint-bottom');\n }\n }\n }\n\n onRowDragLeave(event, rowElement) {\n let prevRowElement = rowElement.previousElementSibling;\n if (prevRowElement) {\n DomHandler.removeClass(prevRowElement, 'p-datatable-dragpoint-bottom');\n }\n\n DomHandler.removeClass(rowElement, 'p-datatable-dragpoint-bottom');\n DomHandler.removeClass(rowElement, 'p-datatable-dragpoint-top');\n }\n\n onRowDragEnd(event) {\n this.rowDragging = false;\n this.draggedRowIndex = null;\n this.droppedRowIndex = null;\n }\n\n onRowDrop(event, rowElement) {\n if (this.droppedRowIndex != null) {\n let dropIndex = (this.draggedRowIndex > this.droppedRowIndex) ? this.droppedRowIndex : (this.droppedRowIndex === 0) ? 0 : this.droppedRowIndex - 1;\n ObjectUtils.reorderArray(this.value, this.draggedRowIndex, dropIndex);\n\n this.onRowReorder.emit({\n dragIndex: this.draggedRowIndex,\n dropIndex: dropIndex\n });\n }\n //cleanup\n this.onRowDragLeave(event, rowElement);\n this.onRowDragEnd(event);\n }\n\n isEmpty() {\n let data = this.filteredValue||this.value;\n return data == null || data.length == 0;\n }\n\n getBlockableElement(): HTMLElement {\n return this.el.nativeElement.children[0];\n }\n\n getStorage() {\n switch(this.stateStorage) {\n case 'local':\n return window.localStorage;\n\n case 'session':\n return window.sessionStorage;\n\n default:\n throw new Error(this.stateStorage + ' is not a valid value for the state storage, supported values are \"local\" and \"session\".');\n }\n }\n\n isStateful() {\n return this.stateKey != null;\n }\n\n saveState() {\n const storage = this.getStorage();\n let state: TableState = {};\n\n if (this.paginator) {\n state.first = this.first;\n state.rows = this.rows;\n }\n\n if (this.sortField) {\n state.sortField = this.sortField;\n state.sortOrder = this.sortOrder;\n }\n\n if (this.multiSortMeta) {\n state.multiSortMeta = this.multiSortMeta;\n }\n\n if (this.hasFilter()) {\n state.filters = this.filters;\n }\n\n if (this.resizableColumns) {\n this.saveColumnWidths(state);\n }\n\n if (this.reorderableColumns) {\n this.saveColumnOrder(state);\n }\n\n if (this.selection) {\n state.selection = this.selection;\n }\n\n if (Object.keys(this.expandedRowKeys).length) {\n state.expandedRowKeys = this.expandedRowKeys;\n }\n\n if (Object.keys(state).length) {\n storage.setItem(this.stateKey, JSON.stringify(state));\n }\n\n this.onStateSave.emit(state);\n }\n\n clearState() {\n const storage = this.getStorage();\n\n if (this.stateKey) {\n storage.removeItem(this.stateKey);\n }\n }\n\n restoreState() {\n const storage = this.getStorage();\n const stateString = storage.getItem(this.stateKey);\n\n if (stateString) {\n let state: TableState = JSON.parse(stateString);\n\n if (this.paginator) {\n if (this.first !== undefined) {\n this.first = state.first;\n this.firstChange.emit(this.first);\n }\n\n if (this.rows !== undefined) {\n this.rows = state.rows;\n this.rowsChange.emit(this.rows);\n }\n }\n\n if (state.sortField) {\n this.restoringSort = true;\n this._sortField = state.sortField;\n this._sortOrder = state.sortOrder;\n }\n\n if (state.multiSortMeta) {\n this.restoringSort = true;\n this._multiSortMeta = state.multiSortMeta;\n }\n\n if (state.filters) {\n this.restoringFilter = true;\n this.filters = state.filters;\n }\n\n if (this.resizableColumns) {\n this.columnWidthsState = state.columnWidths;\n this.tableWidthState = state.tableWidth;\n }\n\n if (state.expandedRowKeys) {\n this.expandedRowKeys = state.expandedRowKeys;\n }\n\n if (state.selection) {\n Promise.resolve(null).then(() => this.selectionChange.emit(state.selection));\n }\n\n this.stateRestored = true;\n\n this.onStateRestore.emit(state);\n }\n }\n\n saveColumnWidths(state) {\n let widths = [];\n let headers = DomHandler.find(this.containerViewChild.nativeElement, '.p-datatable-thead > tr:first-child > th');\n headers.map(header => widths.push(DomHandler.getOuterWidth(header)));\n state.columnWidths = widths.join(',');\n\n if (this.columnResizeMode === 'expand') {\n state.tableWidth = this.scrollable ? DomHandler.findSingle(this.containerViewChild.nativeElement, '.p-datatable-scrollable-header-table').style.width :\n DomHandler.getOuterWidth(this.tableViewChild.nativeElement) + 'px';\n }\n }\n\n restoreColumnWidths() {\n if (this.columnWidthsState) {\n let widths = this.columnWidthsState.split(',');\n\n if (this.columnResizeMode === 'expand' && this.tableWidthState) {\n if (this.scrollable) {\n this.setScrollableItemsWidthOnExpandResize(null, this.tableWidthState, 0);\n }\n else {\n this.tableViewChild.nativeElement.style.width = this.tableWidthState;\n this.containerViewChild.nativeElement.style.width = this.tableWidthState;\n }\n }\n\n if (this.scrollable) {\n let headerCols = DomHandler.find(this.containerViewChild.nativeElement, '.p-datatable-scrollable-header-table > colgroup > col');\n let bodyCols = this.virtualScroll ? DomHandler.find(this.containerViewChild.nativeElement, 'cdk-virtual-scroll-viewport table > colgroup > col') : DomHandler.find(this.containerViewChild.nativeElement, '.p-datatable-scrollable-body table > colgroup > col');\n\n headerCols.map((col, index) => col.style.width = widths[index] + 'px');\n bodyCols.map((col, index) => col.style.width = widths[index] + 'px');\n }\n else {\n let headers = DomHandler.find(this.tableViewChild.nativeElement, '.p-datatable-thead > tr:first-child > th');\n headers.map((header, index) => header.style.width = widths[index] + 'px');\n }\n }\n }\n\n saveColumnOrder(state) {\n if (this.columns) {\n let columnOrder: string[] = [];\n this.columns.map(column => {\n columnOrder.push(column.field||column.key)\n });\n\n state.columnOrder = columnOrder;\n }\n }\n\n restoreColumnOrder() {\n const storage = this.getStorage();\n const stateString = storage.getItem(this.stateKey);\n if (stateString) {\n let state: TableState = JSON.parse(stateString);\n let columnOrder = state.columnOrder;\n if (columnOrder) {\n let reorderedColumns = [];\n\n columnOrder.map(key => {\n let col = this.findColumnByKey(key);\n if (col) {\n reorderedColumns.push(col)\n }\n });\n this.columnOrderStateRestored = true;\n this.columns = reorderedColumns;\n }\n }\n }\n\n findColumnByKey(key) {\n if (this.columns) {\n for (let col of this.columns) {\n if (col.key === key || col.field === key)\n return col;\n else\n continue;\n }\n }\n else {\n return null;\n }\n }\n\n ngOnDestroy() {\n this.unbindDocumentEditListener();\n this.editingCell = null;\n this.initialized = null;\n }\n}\n\n@Component({\n selector: '[pTableBody]',\n template: `\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n `,\n changeDetection: ChangeDetectionStrategy.Default,\n encapsulation: ViewEncapsulation.None\n})\nexport class TableBody implements OnDestroy {\n\n @Input(\"pTableBody\") columns: any[];\n\n @Input(\"pTableBodyTemplate\") template: TemplateRef;\n\n @Input() frozen: boolean;\n\n subscription: Subscription;\n\n constructor(public dt: Table, public tableService: TableService, public cd: ChangeDetectorRef) {\n this.subscription = this.dt.tableService.valueSource$.subscribe(() => {\n if (this.dt.virtualScroll) {\n this.cd.detectChanges();\n }\n });\n }\n\n ngOnDestroy() {\n if (this.subscription) {\n this.subscription.unsubscribe();\n }\n }\n}\n\n@Component({\n selector: '[pScrollableView]',\n template: `\n
\n
\n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n \n
\n \n \n \n
\n
\n
\n
\n \n \n \n \n \n
\n
\n
\n
\n
\n \n
\n `,\n changeDetection: ChangeDetectionStrategy.Default,\n encapsulation: ViewEncapsulation.None\n})\nexport class ScrollableView implements AfterViewInit,OnDestroy {\n\n @Input(\"pScrollableView\") columns: any[];\n\n @Input() frozen: boolean;\n\n @ViewChild('scrollHeader') scrollHeaderViewChild: ElementRef;\n\n @ViewChild('scrollHeaderBox') scrollHeaderBoxViewChild: ElementRef;\n\n @ViewChild('scrollBody') scrollBodyViewChild: ElementRef;\n\n @ViewChild('scrollTable') scrollTableViewChild: ElementRef;\n\n @ViewChild('scrollFooter') scrollFooterViewChild: ElementRef;\n\n @ViewChild('scrollFooterBox') scrollFooterBoxViewChild: ElementRef;\n\n @ViewChild('scrollableAligner') scrollableAlignerViewChild: ElementRef;\n\n @ViewChild(CdkVirtualScrollViewport) virtualScrollBody: CdkVirtualScrollViewport;\n\n headerScrollListener: any;\n\n bodyScrollListener: any;\n\n footerScrollListener: any;\n\n frozenSiblingBody: HTMLDivElement;\n\n preventBodyScrollPropagation: boolean;\n\n _scrollHeight: string;\n\n virtualScrollTimeout: any;\n\n virtualPage: number;\n\n @Input() get scrollHeight(): string {\n return this._scrollHeight;\n }\n set scrollHeight(val: string) {\n this._scrollHeight = val;\n if (val != null && (val.includes('%') || val.includes('calc'))) {\n console.log('Percentage scroll height calculation is removed in favor of the more performant CSS based flex mode, use scrollHeight=\"flex\" instead.')\n }\n\n if (this.dt.virtualScroll && this.virtualScrollBody) {\n this.virtualScrollBody.ngOnInit();\n }\n }\n\n constructor(public dt: Table, public el: ElementRef, public zone: NgZone) {}\n\n ngAfterViewInit() {\n if (!this.frozen) {\n if (this.dt.frozenColumns || this.dt.frozenBodyTemplate) {\n DomHandler.addClass(this.el.nativeElement, 'p-datatable-unfrozen-view');\n }\n\n let frozenView = this.el.nativeElement.previousElementSibling;\n if (frozenView) {\n if (this.dt.virtualScroll)\n this.frozenSiblingBody = DomHandler.findSingle(frozenView, '.p-datatable-virtual-scrollable-body');\n else\n this.frozenSiblingBody = DomHandler.findSingle(frozenView, '.p-datatable-scrollable-body');\n }\n\n let scrollBarWidth = DomHandler.calculateScrollbarWidth();\n this.scrollHeaderBoxViewChild.nativeElement.style.paddingRight = scrollBarWidth + 'px';\n\n if (this.scrollFooterBoxViewChild && this.scrollFooterBoxViewChild.nativeElement) {\n this.scrollFooterBoxViewChild.nativeElement.style.paddingRight = scrollBarWidth + 'px';\n }\n }\n else {\n if (this.scrollableAlignerViewChild && this.scrollableAlignerViewChild.nativeElement) {\n this.scrollableAlignerViewChild.nativeElement.style.height = DomHandler.calculateScrollbarHeight() + 'px';\n }\n }\n\n this.bindEvents();\n }\n\n bindEvents() {\n this.zone.runOutsideAngular(() => {\n if (this.scrollHeaderViewChild && this.scrollHeaderViewChild.nativeElement) {\n this.headerScrollListener = this.onHeaderScroll.bind(this);\n this.scrollHeaderViewChild.nativeElement.addEventListener('scroll', this.headerScrollListener);\n }\n\n if (this.scrollFooterViewChild && this.scrollFooterViewChild.nativeElement) {\n this.footerScrollListener = this.onFooterScroll.bind(this);\n this.scrollFooterViewChild.nativeElement.addEventListener('scroll', this.footerScrollListener);\n }\n\n if (!this.frozen) {\n this.bodyScrollListener = this.onBodyScroll.bind(this);\n\n if (this.dt.virtualScroll)\n this.virtualScrollBody.getElementRef().nativeElement.addEventListener('scroll', this.bodyScrollListener);\n else\n this.scrollBodyViewChild.nativeElement.addEventListener('scroll', this.bodyScrollListener);\n }\n });\n }\n\n unbindEvents() {\n if (this.scrollHeaderViewChild && this.scrollHeaderViewChild.nativeElement) {\n this.scrollHeaderViewChild.nativeElement.removeEventListener('scroll', this.headerScrollListener);\n }\n\n if (this.scrollFooterViewChild && this.scrollFooterViewChild.nativeElement) {\n this.scrollFooterViewChild.nativeElement.removeEventListener('scroll', this.footerScrollListener);\n }\n\n if (this.scrollBodyViewChild && this.scrollBodyViewChild.nativeElement) {\n this.scrollBodyViewChild.nativeElement.removeEventListener('scroll', this.bodyScrollListener);\n }\n\n if (this.virtualScrollBody && this.virtualScrollBody.getElementRef()) {\n this.virtualScrollBody.getElementRef().nativeElement.removeEventListener('scroll', this.bodyScrollListener);\n }\n }\n\n onHeaderScroll() {\n const scrollLeft = this.scrollHeaderViewChild.nativeElement.scrollLeft;\n\n this.scrollBodyViewChild.nativeElement.scrollLeft = scrollLeft;\n\n if (this.scrollFooterViewChild && this.scrollFooterViewChild.nativeElement) {\n this.scrollFooterViewChild.nativeElement.scrollLeft = scrollLeft;\n }\n\n this.preventBodyScrollPropagation = true;\n }\n\n onFooterScroll() {\n const scrollLeft = this.scrollFooterViewChild.nativeElement.scrollLeft;\n this.scrollBodyViewChild.nativeElement.scrollLeft = scrollLeft;\n\n if (this.scrollHeaderViewChild && this.scrollHeaderViewChild.nativeElement) {\n this.scrollHeaderViewChild.nativeElement.scrollLeft = scrollLeft;\n }\n\n this.preventBodyScrollPropagation = true;\n }\n\n onBodyScroll(event) {\n if (this.preventBodyScrollPropagation) {\n this.preventBodyScrollPropagation = false;\n return;\n }\n\n if (this.scrollHeaderViewChild && this.scrollHeaderViewChild.nativeElement) {\n this.scrollHeaderBoxViewChild.nativeElement.style.marginLeft = -1 * event.target.scrollLeft + 'px';\n }\n\n if (this.scrollFooterViewChild && this.scrollFooterViewChild.nativeElement) {\n this.scrollFooterBoxViewChild.nativeElement.style.marginLeft = -1 * event.target.scrollLeft + 'px';\n }\n\n if (this.frozenSiblingBody) {\n this.frozenSiblingBody.scrollTop = event.target.scrollTop;\n }\n }\n\n onScrollIndexChange(index: number) {\n if (this.dt.lazy) {\n if (this.virtualScrollTimeout) {\n clearTimeout(this.virtualScrollTimeout);\n }\n\n this.virtualScrollTimeout = setTimeout(() => {\n let page = Math.floor(index / this.dt.rows);\n let virtualScrollOffset = page === 0 ? 0 : (page - 1) * this.dt.rows;\n let virtualScrollChunkSize = page === 0 ? this.dt.rows * 2 : this.dt.rows * 3;\n \n if (page !== this.virtualPage) {\n this.virtualPage = page;\n this.dt.onLazyLoad.emit({\n first: virtualScrollOffset,\n rows: virtualScrollChunkSize,\n sortField: this.dt.sortField,\n sortOrder: this.dt.sortOrder,\n filters: this.dt.filters,\n globalFilter: this.dt.filters && this.dt.filters['global'] ? ( this.dt.filters['global']).value : null,\n multiSortMeta: this.dt.multiSortMeta\n });\n }\n }, this.dt.virtualScrollDelay);\n }\n }\n\n getPageCount() {\n let dataToRender = this.dt.filteredValue || this.dt.value;\n let dataLength = dataToRender ? dataToRender.length: 0;\n return Math.ceil(dataLength / this.dt.rows);\n }\n\n scrollToVirtualIndex(index: number): void {\n if (this.virtualScrollBody) {\n this.virtualScrollBody.scrollToIndex(index);\n }\n }\n\n scrollTo(options): void {\n if (this.virtualScrollBody) {\n this.virtualScrollBody.scrollTo(options);\n }\n else {\n if (this.scrollBodyViewChild.nativeElement.scrollTo) {\n this.scrollBodyViewChild.nativeElement.scrollTo(options);\n }\n else {\n this.scrollBodyViewChild.nativeElement.scrollLeft = options.left;\n this.scrollBodyViewChild.nativeElement.scrollTop = options.top;\n }\n }\n }\n\n ngOnDestroy() {\n this.unbindEvents();\n this.frozenSiblingBody = null;\n }\n}\n\n@Directive({\n selector: '[pSortableColumn]',\n host: {\n '[class.p-sortable-column]': 'isEnabled()',\n '[class.p-highlight]': 'sorted',\n '[attr.tabindex]': 'isEnabled() ? \"0\" : null',\n '[attr.role]': '\"columnheader\"',\n '[attr.aria-sort]': 'sortOrder'\n }\n})\nexport class SortableColumn implements OnInit, OnDestroy {\n\n @Input(\"pSortableColumn\") field: string;\n\n @Input() pSortableColumnDisabled: boolean;\n\n sorted: boolean;\n\n sortOrder: string;\n\n subscription: Subscription;\n\n constructor(public dt: Table) {\n if (this.isEnabled()) {\n this.subscription = this.dt.tableService.sortSource$.subscribe(sortMeta => {\n this.updateSortState();\n });\n }\n }\n\n ngOnInit() {\n if (this.isEnabled()) {\n this.updateSortState();\n }\n }\n\n updateSortState() {\n this.sorted = this.dt.isSorted(this.field);\n this.sortOrder = this.sorted ? (this.dt.sortOrder === 1 ? 'ascending' : 'descending') : 'none';\n }\n\n @HostListener('click', ['$event'])\n onClick(event: MouseEvent) {\n if (this.isEnabled() && !this.isFilterElement( event.target)) {\n this.updateSortState();\n this.dt.sort({\n originalEvent: event,\n field: this.field\n });\n\n DomHandler.clearSelection();\n }\n }\n\n @HostListener('keydown.enter', ['$event'])\n onEnterKey(event: MouseEvent) {\n this.onClick(event);\n }\n\n isEnabled() {\n return this.pSortableColumnDisabled !== true;\n }\n\n isFilterElement(element: HTMLElement) {\n return DomHandler.hasClass(element, 'pi-filter-icon') || DomHandler.hasClass(element, 'p-column-filter-menu-button');\n }\n\n ngOnDestroy() {\n if (this.subscription) {\n this.subscription.unsubscribe();\n }\n }\n\n}\n\n\n@Component({\n selector: 'p-sortIcon',\n template: `\n \n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class SortIcon implements OnInit, OnDestroy {\n\n @Input() field: string;\n\n subscription: Subscription;\n\n sortOrder: number;\n\n constructor(public dt: Table, public cd: ChangeDetectorRef) {\n this.subscription = this.dt.tableService.sortSource$.subscribe(sortMeta => {\n this.updateSortState();\n });\n }\n\n ngOnInit() {\n this.updateSortState();\n }\n\n onClick(event){\n event.preventDefault();\n }\n\n updateSortState() {\n if (this.dt.sortMode === 'single') {\n this.sortOrder = this.dt.isSorted(this.field) ? this.dt.sortOrder : 0;\n }\n else if (this.dt.sortMode === 'multiple') {\n let sortMeta = this.dt.getSortMeta(this.field);\n this.sortOrder = sortMeta ? sortMeta.order: 0;\n }\n\n this.cd.markForCheck();\n }\n\n ngOnDestroy() {\n if (this.subscription) {\n this.subscription.unsubscribe();\n }\n }\n}\n\n@Directive({\n selector: '[pSelectableRow]',\n host: {\n '[class.p-selectable-row]': 'isEnabled()',\n '[class.p-highlight]': 'selected',\n '[attr.tabindex]': 'isEnabled() ? 0 : undefined'\n }\n})\nexport class SelectableRow implements OnInit, OnDestroy {\n\n @Input(\"pSelectableRow\") data: any;\n\n @Input(\"pSelectableRowIndex\") index: number;\n\n @Input() pSelectableRowDisabled: boolean;\n\n selected: boolean;\n\n subscription: Subscription;\n\n constructor(public dt: Table, public tableService: TableService) {\n if (this.isEnabled()) {\n this.subscription = this.dt.tableService.selectionSource$.subscribe(() => {\n this.selected = this.dt.isSelected(this.data);\n });\n }\n }\n\n ngOnInit() {\n if (this.isEnabled()) {\n this.selected = this.dt.isSelected(this.data);\n }\n }\n\n @HostListener('click', ['$event'])\n onClick(event: Event) {\n if (this.isEnabled()) {\n this.dt.handleRowClick({\n originalEvent: event,\n rowData: this.data,\n rowIndex: this.index\n });\n }\n }\n\n @HostListener('touchend', ['$event'])\n onTouchEnd(event: Event) {\n if (this.isEnabled()) {\n this.dt.handleRowTouchEnd(event);\n }\n }\n\n @HostListener('keydown.arrowdown', ['$event'])\n onArrowDownKeyDown(event: KeyboardEvent) {\n if (!this.isEnabled()) {\n return;\n }\n\n const row = event.currentTarget;\n const nextRow = this.findNextSelectableRow(row);\n\n if (nextRow) {\n nextRow.focus();\n }\n\n event.preventDefault();\n }\n\n @HostListener('keydown.arrowup', ['$event'])\n onArrowUpKeyDown(event: KeyboardEvent) {\n if (!this.isEnabled()) {\n return;\n }\n\n const row = event.currentTarget;\n const prevRow = this.findPrevSelectableRow(row);\n\n if (prevRow) {\n prevRow.focus();\n }\n\n event.preventDefault();\n }\n\n @HostListener('keydown.enter', ['$event'])\n @HostListener('keydown.shift.enter', ['$event'])\n @HostListener('keydown.meta.enter', ['$event'])\n onEnterKeyDown(event: KeyboardEvent) {\n if (!this.isEnabled()) {\n return;\n }\n\n this.dt.handleRowClick({\n originalEvent: event,\n rowData: this.data,\n rowIndex: this.index\n });\n }\n\n @HostListener('keydown.space', ['$event'])\n onSpaceKeyDown(event: KeyboardEvent) {\n event.preventDefault();\n }\n\n @HostListener('keydown.pagedown', ['$event'])\n @HostListener('keydown.pageup', ['$event'])\n @HostListener('keydown.home', ['$event'])\n @HostListener('keydown.end', ['$event'])\n onPageDownKeyDown() {\n if (this.dt.virtualScroll) {\n DomHandler.findSingle(this.dt.scrollableViewChild.el.nativeElement, 'cdk-virtual-scroll-viewport').focus();\n }\n }\n\n findNextSelectableRow(row: HTMLTableRowElement): HTMLTableRowElement {\n let nextRow = row.nextElementSibling;\n if (nextRow) {\n if (DomHandler.hasClass(nextRow, 'p-selectable-row'))\n return nextRow;\n else\n return this.findNextSelectableRow(nextRow);\n }\n else {\n return null;\n }\n }\n\n findPrevSelectableRow(row: HTMLTableRowElement): HTMLTableRowElement {\n let prevRow = row.previousElementSibling;\n if (prevRow) {\n if (DomHandler.hasClass(prevRow, 'p-selectable-row'))\n return prevRow;\n else\n return this.findPrevSelectableRow(prevRow);\n }\n else {\n return null;\n }\n }\n\n isEnabled() {\n return this.pSelectableRowDisabled !== true;\n }\n\n ngOnDestroy() {\n if (this.subscription) {\n this.subscription.unsubscribe();\n }\n }\n\n}\n\n@Directive({\n selector: '[pSelectableRowDblClick]',\n host: {\n '[class.p-selectable-row]': 'isEnabled()',\n '[class.p-highlight]': 'selected'\n }\n})\nexport class SelectableRowDblClick implements OnInit, OnDestroy {\n\n @Input(\"pSelectableRowDblClick\") data: any;\n\n @Input(\"pSelectableRowIndex\") index: number;\n\n @Input() pSelectableRowDisabled: boolean;\n\n selected: boolean;\n\n subscription: Subscription;\n\n constructor(public dt: Table, public tableService: TableService) {\n if (this.isEnabled()) {\n this.subscription = this.dt.tableService.selectionSource$.subscribe(() => {\n this.selected = this.dt.isSelected(this.data);\n });\n }\n }\n\n ngOnInit() {\n if (this.isEnabled()) {\n this.selected = this.dt.isSelected(this.data);\n }\n }\n\n @HostListener('dblclick', ['$event'])\n onClick(event: Event) {\n if (this.isEnabled()) {\n this.dt.handleRowClick({\n originalEvent: event,\n rowData: this.data,\n rowIndex: this.index\n });\n }\n }\n\n isEnabled() {\n return this.pSelectableRowDisabled !== true;\n }\n\n ngOnDestroy() {\n if (this.subscription) {\n this.subscription.unsubscribe();\n }\n }\n\n}\n\n@Directive({\n selector: '[pContextMenuRow]',\n host: {\n '[class.p-highlight-contextmenu]': 'selected',\n '[attr.tabindex]': 'isEnabled() ? 0 : undefined'\n }\n})\nexport class ContextMenuRow {\n\n @Input(\"pContextMenuRow\") data: any;\n\n @Input(\"pContextMenuRowIndex\") index: number;\n\n @Input() pContextMenuRowDisabled: boolean;\n\n selected: boolean;\n\n subscription: Subscription;\n\n constructor(public dt: Table, public tableService: TableService, private el: ElementRef) {\n if (this.isEnabled()) {\n this.subscription = this.dt.tableService.contextMenuSource$.subscribe((data) => {\n this.selected = this.dt.equals(this.data, data);\n });\n }\n }\n\n @HostListener('contextmenu', ['$event'])\n onContextMenu(event: Event) {\n if (this.isEnabled()) {\n this.dt.handleRowRightClick({\n originalEvent: event,\n rowData: this.data,\n rowIndex: this.index\n });\n\n this.el.nativeElement.focus();\n event.preventDefault();\n }\n }\n\n isEnabled() {\n return this.pContextMenuRowDisabled !== true;\n }\n\n ngOnDestroy() {\n if (this.subscription) {\n this.subscription.unsubscribe();\n }\n }\n\n}\n\n@Directive({\n selector: '[pRowToggler]'\n})\nexport class RowToggler {\n\n @Input('pRowToggler') data: any;\n\n @Input() pRowTogglerDisabled: boolean;\n\n constructor(public dt: Table) { }\n\n @HostListener('click', ['$event'])\n onClick(event: Event) {\n if (this.isEnabled()) {\n this.dt.toggleRow(this.data, event);\n event.preventDefault();\n }\n }\n\n isEnabled() {\n return this.pRowTogglerDisabled !== true;\n }\n}\n\n@Directive({\n selector: '[pResizableColumn]'\n})\nexport class ResizableColumn implements AfterViewInit, OnDestroy {\n\n @Input() pResizableColumnDisabled: boolean;\n\n resizer: HTMLSpanElement;\n\n resizerMouseDownListener: any;\n\n documentMouseMoveListener: any;\n\n documentMouseUpListener: any;\n\n constructor(public dt: Table, public el: ElementRef, public zone: NgZone) { }\n\n ngAfterViewInit() {\n if (this.isEnabled()) {\n DomHandler.addClass(this.el.nativeElement, 'p-resizable-column');\n this.resizer = document.createElement('span');\n this.resizer.className = 'p-column-resizer';\n this.el.nativeElement.appendChild(this.resizer);\n\n this.zone.runOutsideAngular(() => {\n this.resizerMouseDownListener = this.onMouseDown.bind(this);\n this.resizer.addEventListener('mousedown', this.resizerMouseDownListener);\n });\n }\n }\n\n bindDocumentEvents() {\n this.zone.runOutsideAngular(() => {\n this.documentMouseMoveListener = this.onDocumentMouseMove.bind(this);\n document.addEventListener('mousemove', this.documentMouseMoveListener);\n\n this.documentMouseUpListener = this.onDocumentMouseUp.bind(this);\n document.addEventListener('mouseup', this.documentMouseUpListener);\n });\n }\n\n unbindDocumentEvents() {\n if (this.documentMouseMoveListener) {\n document.removeEventListener('mousemove', this.documentMouseMoveListener);\n this.documentMouseMoveListener = null;\n }\n\n if (this.documentMouseUpListener) {\n document.removeEventListener('mouseup', this.documentMouseUpListener);\n this.documentMouseUpListener = null;\n }\n }\n\n onMouseDown(event: MouseEvent) {\n if (event.which === 1) {\n this.dt.onColumnResizeBegin(event);\n this.bindDocumentEvents();\n }\n }\n\n onDocumentMouseMove(event: MouseEvent) {\n this.dt.onColumnResize(event);\n }\n\n onDocumentMouseUp(event: MouseEvent) {\n this.dt.onColumnResizeEnd(event, this.el.nativeElement);\n this.unbindDocumentEvents();\n }\n\n isEnabled() {\n return this.pResizableColumnDisabled !== true;\n }\n\n ngOnDestroy() {\n if (this.resizerMouseDownListener) {\n this.resizer.removeEventListener('mousedown', this.resizerMouseDownListener);\n }\n\n this.unbindDocumentEvents();\n }\n}\n\n@Directive({\n selector: '[pReorderableColumn]'\n})\nexport class ReorderableColumn implements AfterViewInit, OnDestroy {\n\n @Input() pReorderableColumnDisabled: boolean;\n\n dragStartListener: any;\n\n dragOverListener: any;\n\n dragEnterListener: any;\n\n dragLeaveListener: any;\n\n mouseDownListener: any;\n\n constructor(public dt: Table, public el: ElementRef, public zone: NgZone) { }\n\n ngAfterViewInit() {\n if (this.isEnabled()) {\n this.bindEvents();\n }\n }\n\n bindEvents() {\n this.zone.runOutsideAngular(() => {\n this.mouseDownListener = this.onMouseDown.bind(this);\n this.el.nativeElement.addEventListener('mousedown', this.mouseDownListener);\n\n this.dragStartListener = this.onDragStart.bind(this);\n this.el.nativeElement.addEventListener('dragstart', this.dragStartListener);\n\n this.dragOverListener = this.onDragEnter.bind(this);\n this.el.nativeElement.addEventListener('dragover', this.dragOverListener);\n\n this.dragEnterListener = this.onDragEnter.bind(this);\n this.el.nativeElement.addEventListener('dragenter', this.dragEnterListener);\n\n this.dragLeaveListener = this.onDragLeave.bind(this);\n this.el.nativeElement.addEventListener('dragleave', this.dragLeaveListener);\n });\n }\n\n unbindEvents() {\n if (this.mouseDownListener) {\n document.removeEventListener('mousedown', this.mouseDownListener);\n this.mouseDownListener = null;\n }\n\n if (this.dragOverListener) {\n document.removeEventListener('dragover', this.dragOverListener);\n this.dragOverListener = null;\n }\n\n if (this.dragEnterListener) {\n document.removeEventListener('dragenter', this.dragEnterListener);\n this.dragEnterListener = null;\n }\n\n if (this.dragEnterListener) {\n document.removeEventListener('dragenter', this.dragEnterListener);\n this.dragEnterListener = null;\n }\n\n if (this.dragLeaveListener) {\n document.removeEventListener('dragleave', this.dragLeaveListener);\n this.dragLeaveListener = null;\n }\n }\n\n onMouseDown(event) {\n if (event.target.nodeName === 'INPUT' || event.target.nodeName === 'TEXTAREA' || DomHandler.hasClass(event.target, 'p-column-resizer'))\n this.el.nativeElement.draggable = false;\n else\n this.el.nativeElement.draggable = true;\n }\n\n onDragStart(event) {\n this.dt.onColumnDragStart(event, this.el.nativeElement);\n }\n\n onDragOver(event) {\n event.preventDefault();\n }\n\n onDragEnter(event) {\n this.dt.onColumnDragEnter(event, this.el.nativeElement);\n }\n\n onDragLeave(event) {\n this.dt.onColumnDragLeave(event);\n }\n\n @HostListener('drop', ['$event'])\n onDrop(event) {\n if (this.isEnabled()) {\n this.dt.onColumnDrop(event, this.el.nativeElement);\n }\n }\n\n isEnabled() {\n return this.pReorderableColumnDisabled !== true;\n }\n\n ngOnDestroy() {\n this.unbindEvents();\n }\n\n}\n\n@Directive({\n selector: '[pEditableColumn]'\n})\nexport class EditableColumn implements AfterViewInit {\n\n @Input(\"pEditableColumn\") data: any;\n\n @Input(\"pEditableColumnField\") field: any;\n\n @Input(\"pEditableColumnRowIndex\") rowIndex: number;\n\n @Input() pEditableColumnDisabled: boolean;\n\n @Input() pFocusCellSelector: string;\n\n constructor(public dt: Table, public el: ElementRef, public zone: NgZone) {}\n\n ngAfterViewInit() {\n if (this.isEnabled()) {\n DomHandler.addClass(this.el.nativeElement, 'p-editable-column');\n }\n }\n\n @HostListener('click', ['$event'])\n onClick(event: MouseEvent) {\n if (this.isEnabled()) {\n this.dt.editingCellClick = true;\n\n if (this.dt.editingCell) {\n if (this.dt.editingCell !== this.el.nativeElement) {\n if (!this.dt.isEditingCellValid()) {\n return;\n }\n\n this.closeEditingCell(true, event);\n this.openCell();\n }\n }\n else {\n this.openCell();\n }\n }\n }\n\n openCell() {\n this.dt.updateEditingCell(this.el.nativeElement, this.data, this.field, this.rowIndex);\n DomHandler.addClass(this.el.nativeElement, 'p-cell-editing');\n this.dt.onEditInit.emit({field: this.field, data: this.data, index: this.rowIndex});\n this.zone.runOutsideAngular(() => {\n setTimeout(() => {\n let focusCellSelector = this.pFocusCellSelector || 'input, textarea, select';\n let focusableElement = DomHandler.findSingle(this.el.nativeElement, focusCellSelector);\n\n if (focusableElement) {\n focusableElement.focus();\n }\n }, 50);\n });\n }\n\n closeEditingCell(completed, event) {\n if (completed)\n this.dt.onEditComplete.emit({field: this.dt.editingCellField, data: this.dt.editingCellData, originalEvent: event, index: this.dt.editingCellRowIndex});\n else\n this.dt.onEditCancel.emit({field: this.dt.editingCellField, data: this.dt.editingCellData, originalEvent: event, index: this.dt.editingCellRowIndex});\n\n DomHandler.removeClass(this.dt.editingCell, 'p-cell-editing');\n this.dt.editingCell = null;\n this.dt.editingCellData = null;\n this.dt.editingCellField = null;\n this.dt.unbindDocumentEditListener();\n }\n\n @HostListener('keydown.enter', ['$event'])\n onEnterKeyDown(event: KeyboardEvent) {\n if (this.isEnabled()) {\n if (this.dt.isEditingCellValid()) {\n this.closeEditingCell(true, event);\n }\n\n event.preventDefault();\n }\n }\n\n @HostListener('keydown.escape', ['$event'])\n onEscapeKeyDown(event: KeyboardEvent) {\n if (this.isEnabled()) {\n if (this.dt.isEditingCellValid()) {\n this.closeEditingCell(false, event);\n }\n\n event.preventDefault();\n }\n }\n\n @HostListener('keydown.tab', ['$event'])\n @HostListener('keydown.shift.tab', ['$event'])\n @HostListener('keydown.meta.tab', ['$event'])\n onShiftKeyDown(event: KeyboardEvent) {\n if (this.isEnabled()) {\n if (event.shiftKey)\n this.moveToPreviousCell(event);\n else{\n this.moveToNextCell(event);\n }\n }\n }\n @HostListener('keydown.arrowdown', ['$event'])\n onArrowDown(event: KeyboardEvent) {\n if (this.isEnabled()) {\n let currentCell = this.findCell(event.target);\n if (currentCell) {\n let cellIndex = DomHandler.index(currentCell);\n let targetCell = this.findNextEditableColumnByIndex(currentCell, cellIndex);\n\n if (targetCell) {\n if (this.dt.isEditingCellValid()) {\n this.closeEditingCell(true, event);\n }\n\n DomHandler.invokeElementMethod(event.target, 'blur');\n DomHandler.invokeElementMethod(targetCell, 'click');\n }\n\n event.preventDefault();\n }\n }\n }\n\n @HostListener('keydown.arrowup', ['$event'])\n onArrowUp(event: KeyboardEvent) {\n if (this.isEnabled()) {\n let currentCell = this.findCell(event.target);\n if (currentCell) {\n let cellIndex = DomHandler.index(currentCell);\n let targetCell = this.findPrevEditableColumnByIndex(currentCell, cellIndex);\n\n if (targetCell) {\n if (this.dt.isEditingCellValid()) {\n this.closeEditingCell(true, event);\n }\n\n DomHandler.invokeElementMethod(event.target, 'blur');\n DomHandler.invokeElementMethod(targetCell, 'click');\n }\n \n event.preventDefault();\n }\n }\n }\n\n @HostListener('keydown.arrowleft', ['$event'])\n onArrowLeft(event: KeyboardEvent) {\n if (this.isEnabled()) {\n this.moveToPreviousCell(event);\n }\n }\n\n @HostListener('keydown.arrowright', ['$event'])\n onArrowRight(event: KeyboardEvent) {\n if (this.isEnabled()) {\n this.moveToNextCell(event);\n }\n }\n\n findCell(element) {\n if (element) {\n let cell = element;\n while (cell && !DomHandler.hasClass(cell, 'p-cell-editing')) {\n cell = cell.parentElement;\n }\n\n return cell;\n }\n else {\n return null;\n }\n }\n\n moveToPreviousCell(event: KeyboardEvent) {\n let currentCell = this.findCell(event.target);\n if (currentCell) {\n let targetCell = this.findPreviousEditableColumn(currentCell);\n\n if (targetCell) {\n if (this.dt.isEditingCellValid()) {\n this.closeEditingCell(true, event);\n }\n\n DomHandler.invokeElementMethod(event.target, 'blur');\n DomHandler.invokeElementMethod(targetCell, 'click');\n event.preventDefault();\n }\n }\n }\n\n moveToNextCell(event: KeyboardEvent) {\n let currentCell = this.findCell(event.target);\n if (currentCell) {\n let targetCell = this.findNextEditableColumn(currentCell);\n\n if (targetCell) {\n if (this.dt.isEditingCellValid()) {\n this.closeEditingCell(true, event);\n }\n\n DomHandler.invokeElementMethod(event.target, 'blur');\n DomHandler.invokeElementMethod(targetCell, 'click');\n event.preventDefault();\n }\n }\n }\n\n findPreviousEditableColumn(cell: Element) {\n let prevCell = cell.previousElementSibling;\n\n if (!prevCell) {\n let previousRow = cell.parentElement.previousElementSibling;\n if (previousRow) {\n prevCell = previousRow.lastElementChild;\n }\n }\n\n if (prevCell) {\n if (DomHandler.hasClass(prevCell, 'p-editable-column'))\n return prevCell;\n else\n return this.findPreviousEditableColumn(prevCell);\n }\n else {\n return null;\n }\n }\n\n findNextEditableColumn(cell: Element) {\n let nextCell = cell.nextElementSibling;\n\n if (!nextCell) {\n let nextRow = cell.parentElement.nextElementSibling;\n if (nextRow) {\n nextCell = nextRow.firstElementChild;\n }\n }\n\n if (nextCell) {\n if (DomHandler.hasClass(nextCell, 'p-editable-column'))\n return nextCell;\n else\n return this.findNextEditableColumn(nextCell);\n }\n else {\n return null;\n }\n }\n\n findNextEditableColumnByIndex(cell: Element, index: number) {\n let nextRow = cell.parentElement.nextElementSibling;\n\n if (nextRow) {\n let nextCell = nextRow.children[index];\n\n if (nextCell && DomHandler.hasClass(nextCell, 'p-editable-column')) {\n return nextCell;\n }\n\n return null;\n }\n else {\n return null;\n }\n }\n\n findPrevEditableColumnByIndex(cell: Element, index: number) {\n let prevRow = cell.parentElement.previousElementSibling;\n\n if (prevRow) {\n let prevCell = prevRow.children[index];\n\n if (prevCell && DomHandler.hasClass(prevCell, 'p-editable-column')) {\n return prevCell;\n }\n\n return null;\n }\n else {\n return null;\n }\n }\n\n isEnabled() {\n return this.pEditableColumnDisabled !== true;\n }\n\n}\n\n@Directive({\n selector: '[pEditableRow]'\n})\nexport class EditableRow {\n\n @Input(\"pEditableRow\") data: any;\n\n @Input() pEditableRowDisabled: boolean;\n\n constructor(public el: ElementRef) {}\n\n isEnabled() {\n return this.pEditableRowDisabled !== true;\n }\n\n}\n\n@Directive({\n selector: '[pInitEditableRow]'\n})\nexport class InitEditableRow {\n\n constructor(public dt: Table, public editableRow: EditableRow) {}\n\n @HostListener('click', ['$event'])\n onClick(event: Event) {\n this.dt.initRowEdit(this.editableRow.data);\n event.preventDefault();\n }\n\n}\n\n@Directive({\n selector: '[pSaveEditableRow]'\n})\nexport class SaveEditableRow {\n\n constructor(public dt: Table, public editableRow: EditableRow) {}\n\n @HostListener('click', ['$event'])\n onClick(event: Event) {\n this.dt.saveRowEdit(this.editableRow.data, this.editableRow.el.nativeElement);\n event.preventDefault();\n }\n}\n\n@Directive({\n selector: '[pCancelEditableRow]'\n})\nexport class CancelEditableRow {\n\n constructor(public dt: Table, public editableRow: EditableRow) {}\n\n @HostListener('click', ['$event'])\n onClick(event: Event) {\n this.dt.cancelRowEdit(this.editableRow.data);\n event.preventDefault();\n }\n}\n\n@Component({\n selector: 'p-cellEditor',\n template: `\n \n \n \n \n \n \n `,\n encapsulation: ViewEncapsulation.None\n})\nexport class CellEditor implements AfterContentInit {\n\n @ContentChildren(PrimeTemplate) templates: QueryList;\n\n inputTemplate: TemplateRef;\n\n outputTemplate: TemplateRef;\n\n constructor(public dt: Table, @Optional() public editableColumn: EditableColumn, @Optional() public editableRow: EditableRow) { }\n\n ngAfterContentInit() {\n this.templates.forEach((item) => {\n switch (item.getType()) {\n case 'input':\n this.inputTemplate = item.template;\n break;\n\n case 'output':\n this.outputTemplate = item.template;\n break;\n }\n });\n }\n\n get editing(): boolean {\n return (this.dt.editingCell && this.editableColumn && this.dt.editingCell === this.editableColumn.el.nativeElement) ||\n (this.editableRow && this.dt.editMode === 'row' && this.dt.isRowEditing(this.editableRow.data));\n }\n\n}\n\n@Component({\n selector: 'p-tableRadioButton',\n template: `\n
\n
\n \n
\n
\n
\n
\n
\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class TableRadioButton {\n\n @Input() disabled: boolean;\n\n @Input() value: any;\n\n @Input() index: number;\n\n @Input() inputId: string;\n\n @Input() name: string;\n\n @Input() ariaLabel: string;\n\n @ViewChild('box') boxViewChild: ElementRef;\n\n checked: boolean;\n\n subscription: Subscription;\n\n constructor(public dt: Table, public tableService: TableService, public cd: ChangeDetectorRef) {\n this.subscription = this.dt.tableService.selectionSource$.subscribe(() => {\n this.checked = this.dt.isSelected(this.value);\n this.cd.markForCheck();\n });\n }\n\n ngOnInit() {\n this.checked = this.dt.isSelected(this.value);\n }\n\n onClick(event: Event) {\n if (!this.disabled) {\n this.dt.toggleRowWithRadio({\n originalEvent: event,\n rowIndex: this.index\n }, this.value);\n }\n DomHandler.clearSelection();\n }\n\n onFocus() {\n DomHandler.addClass(this.boxViewChild.nativeElement, 'p-focus');\n }\n\n onBlur() {\n DomHandler.removeClass(this.boxViewChild.nativeElement, 'p-focus');\n }\n\n ngOnDestroy() {\n if (this.subscription) {\n this.subscription.unsubscribe();\n }\n }\n\n}\n\n@Component({\n selector: 'p-tableCheckbox',\n template: `\n
\n
\n \n
\n
\n \n
\n
\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class TableCheckbox {\n\n @Input() disabled: boolean;\n\n @Input() value: any;\n\n @Input() index: number;\n\n @Input() inputId: string;\n\n @Input() name: string;\n\n @Input() required: boolean;\n\n @Input() ariaLabel: string;\n\n @ViewChild('box') boxViewChild: ElementRef;\n\n checked: boolean;\n\n subscription: Subscription;\n\n constructor(public dt: Table, public tableService: TableService, public cd: ChangeDetectorRef) {\n this.subscription = this.dt.tableService.selectionSource$.subscribe(() => {\n this.checked = this.dt.isSelected(this.value);\n this.cd.markForCheck();\n });\n }\n\n ngOnInit() {\n this.checked = this.dt.isSelected(this.value);\n }\n\n onClick(event: Event) {\n if (!this.disabled) {\n this.dt.toggleRowWithCheckbox({\n originalEvent: event,\n rowIndex: this.index\n }, this.value);\n }\n DomHandler.clearSelection();\n }\n\n onFocus() {\n DomHandler.addClass(this.boxViewChild.nativeElement, 'p-focus');\n }\n\n onBlur() {\n DomHandler.removeClass(this.boxViewChild.nativeElement, 'p-focus');\n }\n\n ngOnDestroy() {\n if (this.subscription) {\n this.subscription.unsubscribe();\n }\n }\n\n}\n\n@Component({\n selector: 'p-tableHeaderCheckbox',\n template: `\n
\n
\n \n
\n
\n \n
\n
\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class TableHeaderCheckbox {\n\n @ViewChild('box') boxViewChild: ElementRef;\n\n @Input() disabled: boolean;\n\n @Input() inputId: string;\n\n @Input() name: string;\n\n @Input() ariaLabel: string;\n\n checked: boolean;\n\n selectionChangeSubscription: Subscription;\n\n valueChangeSubscription: Subscription;\n\n constructor(public dt: Table, public tableService: TableService, public cd: ChangeDetectorRef) {\n this.valueChangeSubscription = this.dt.tableService.valueSource$.subscribe(() => {\n this.checked = this.updateCheckedState();\n });\n\n this.selectionChangeSubscription = this.dt.tableService.selectionSource$.subscribe(() => {\n this.checked = this.updateCheckedState();\n });\n }\n\n ngOnInit() {\n this.checked = this.updateCheckedState();\n }\n\n onClick(event: Event) {\n if (!this.disabled) {\n if (this.dt.value && this.dt.value.length > 0) {\n this.dt.toggleRowsWithCheckbox(event, !this.checked);\n }\n }\n\n DomHandler.clearSelection();\n }\n\n onFocus() {\n DomHandler.addClass(this.boxViewChild.nativeElement, 'p-focus');\n }\n\n onBlur() {\n DomHandler.removeClass(this.boxViewChild.nativeElement, 'p-focus');\n }\n\n isDisabled() {\n return this.disabled || !this.dt.value || !this.dt.value.length;\n }\n\n ngOnDestroy() {\n if (this.selectionChangeSubscription) {\n this.selectionChangeSubscription.unsubscribe();\n }\n\n if (this.valueChangeSubscription) {\n this.valueChangeSubscription.unsubscribe();\n }\n }\n\n updateCheckedState() {\n this.cd.markForCheck();\n\n if (this.dt.filteredValue) {\n const val = this.dt.filteredValue;\n return (val && val.length > 0 && this.dt.selection && this.dt.selection.length > 0 && this.isAllFilteredValuesChecked());\n }\n else {\n const val = this.dt.value;\n return (val && val.length > 0 && this.dt.selection && this.dt.selection.length > 0 && this.dt.selection.length === val.length);\n }\n }\n\n isAllFilteredValuesChecked() {\n if (!this.dt.filteredValue) {\n return false;\n }\n else {\n for (let rowData of this.dt.filteredValue) {\n if (!this.dt.isSelected(rowData)) {\n return false;\n }\n }\n return true;\n }\n }\n\n}\n\n@Directive({\n selector: '[pReorderableRowHandle]'\n})\nexport class ReorderableRowHandle implements AfterViewInit {\n\n @Input(\"pReorderableRowHandle\") index: number;\n\n constructor(public el: ElementRef) {}\n\n ngAfterViewInit() {\n DomHandler.addClass(this.el.nativeElement, 'p-datatable-reorderablerow-handle');\n }\n}\n\n@Directive({\n selector: '[pReorderableRow]'\n})\nexport class ReorderableRow implements AfterViewInit {\n\n @Input(\"pReorderableRow\") index: number;\n\n @Input() pReorderableRowDisabled: boolean;\n\n mouseDownListener: any;\n\n dragStartListener: any;\n\n dragEndListener: any;\n\n dragOverListener: any;\n\n dragLeaveListener: any;\n\n dropListener: any;\n\n constructor(public dt: Table, public el: ElementRef, public zone: NgZone) {}\n\n ngAfterViewInit() {\n if (this.isEnabled()) {\n this.el.nativeElement.droppable = true;\n this.bindEvents();\n }\n }\n\n bindEvents() {\n this.zone.runOutsideAngular(() => {\n this.mouseDownListener = this.onMouseDown.bind(this);\n this.el.nativeElement.addEventListener('mousedown', this.mouseDownListener);\n\n this.dragStartListener = this.onDragStart.bind(this);\n this.el.nativeElement.addEventListener('dragstart', this.dragStartListener);\n\n this.dragEndListener = this.onDragEnd.bind(this);\n this.el.nativeElement.addEventListener('dragend', this.dragEndListener);\n\n this.dragOverListener = this.onDragOver.bind(this);\n this.el.nativeElement.addEventListener('dragover', this.dragOverListener);\n\n this.dragLeaveListener = this.onDragLeave.bind(this);\n this.el.nativeElement.addEventListener('dragleave', this.dragLeaveListener);\n });\n }\n\n unbindEvents() {\n if (this.mouseDownListener) {\n document.removeEventListener('mousedown', this.mouseDownListener);\n this.mouseDownListener = null;\n }\n\n if (this.dragStartListener) {\n document.removeEventListener('dragstart', this.dragStartListener);\n this.dragStartListener = null;\n }\n\n if (this.dragEndListener) {\n document.removeEventListener('dragend', this.dragEndListener);\n this.dragEndListener = null;\n }\n\n if (this.dragOverListener) {\n document.removeEventListener('dragover', this.dragOverListener);\n this.dragOverListener = null;\n }\n\n if (this.dragLeaveListener) {\n document.removeEventListener('dragleave', this.dragLeaveListener);\n this.dragLeaveListener = null;\n }\n }\n\n onMouseDown(event) {\n if (DomHandler.hasClass(event.target, 'p-datatable-reorderablerow-handle'))\n this.el.nativeElement.draggable = true;\n else\n this.el.nativeElement.draggable = false;\n }\n\n onDragStart(event) {\n this.dt.onRowDragStart(event, this.index);\n }\n\n onDragEnd(event) {\n this.dt.onRowDragEnd(event);\n this.el.nativeElement.draggable = false;\n }\n\n onDragOver(event) {\n this.dt.onRowDragOver(event, this.index, this.el.nativeElement);\n event.preventDefault();\n }\n\n onDragLeave(event) {\n this.dt.onRowDragLeave(event, this.el.nativeElement);\n }\n\n isEnabled() {\n return this.pReorderableRowDisabled !== true;\n }\n\n @HostListener('drop', ['$event'])\n onDrop(event) {\n if (this.isEnabled() && this.dt.rowDragging) {\n this.dt.onRowDrop(event, this.el.nativeElement);\n }\n\n event.preventDefault()\n }\n}\n\n@Component({\n selector: 'p-columnFilterFormElement',\n template: `\n \n \n \n \n \n \n \n \n \n \n \n `,\n encapsulation: ViewEncapsulation.None\n})\nexport class ColumnFilterFormElement implements OnInit {\n \n @Input() field: string;\n\n @Input() type: string;\n\n @Input() filterConstraint: FilterMetadata;\n\n @Input() filterTemplate: TemplateRef;\n\n @Input() placeholder: string;\n\n @Input() minFractionDigits: number\n \n @Input() maxFractionDigits: number;\n\n @Input() prefix: string;\n\n @Input() suffix: string;\n\n @Input() locale: string;\n\n @Input() localeMatcher: string;\n\n @Input() currency: string;\n\n @Input() currencyDisplay: string;\n\n @Input() useGrouping: boolean = true;\n\n filterCallback: Function;\n\n constructor(public dt: Table) {}\n\n ngOnInit() {\n this.filterCallback = value => {\n this.filterConstraint.value = value;\n this.dt._filter();\n };\n }\n\n onModelChange(value: any) {\n this.filterConstraint.value = value;\n\n if (this.type === 'boolean' || value === '') {\n this.dt._filter();\n }\n }\n\n onTextInputEnterKeyDown(event: KeyboardEvent) {\n this.dt._filter();\n event.preventDefault();\n }\n\n onNumericInputKeyDown(event: KeyboardEvent) {\n if (event.key === 'Enter') {\n this.dt._filter();\n event.preventDefault();\n }\n }\n}\n\n@Component({\n selector: 'p-columnFilter',\n template: `\n
\n \n \n \n
\n \n
    \n
  • {{matchMode.label}}
  • \n
  • \n
  • {{noFilterLabel}}
  • \n
\n \n
\n \n
\n
\n
\n \n \n
\n \n
\n
\n
\n
\n \n
\n
\n \n \n
\n
\n \n
\n
\n `,\n animations: [\n trigger('overlayAnimation', [\n transition(':enter', [\n style({opacity: 0, transform: 'scaleY(0.8)'}),\n animate('.12s cubic-bezier(0, 0, 0.2, 1)')\n ]),\n transition(':leave', [\n animate('.1s linear', style({ opacity: 0 }))\n ])\n ])\n ],\n encapsulation: ViewEncapsulation.None\n})\nexport class ColumnFilter implements AfterContentInit {\n\n @Input() field: string;\n\n @Input() type: string = 'text';\n\n @Input() display: string = 'row';\n\n @Input() showMenu: boolean = true;\n\n @Input() matchMode: string;\n\n @Input() operator: string = FilterOperator.AND;\n\n @Input() showOperator: boolean = true;\n\n @Input() showClearButton: boolean = true;\n\n @Input() showApplyButton: boolean = true;\n\n @Input() showMatchModes: boolean = true;\n\n @Input() showAddButton: boolean = true;\n\n @Input() placeholder: string;\n\n @Input() matchModeOptions: SelectItem[];\n\n @Input() maxConstraints: number = 2;\n\n @Input() minFractionDigits: number;\n \n @Input() maxFractionDigits: number;\n\n @Input() prefix: string;\n\n @Input() suffix: string;\n\n @Input() locale: string;\n\n @Input() localeMatcher: string;\n\n @Input() currency: string;\n\n @Input() currencyDisplay: string;\n\n @Input() useGrouping: boolean = true;\n\n @ViewChild('icon') icon: ElementRef;\n\n @ContentChildren(PrimeTemplate) templates: QueryList;\n\n constructor(public el: ElementRef, public dt: Table, public renderer: Renderer2, public config: PrimeNGConfig) {}\n\n headerTemplate: TemplateRef;\n\n filterTemplate: TemplateRef;\n\n footerTemplate: TemplateRef;\n\n operatorOptions: any[];\n\n overlayVisible: boolean;\n\n overlay: HTMLElement;\n\n scrollHandler: any;\n\n documentClickListener: any;\n\n documentResizeListener: any;\n\n matchModes: SelectItem[];\n\n translationSubscription: Subscription;\n\n ngOnInit() {\n if (!this.dt.filters[this.field]) {\n this.initFieldFilterConstraint();\n }\n\n this.translationSubscription = this.config.translationObserver.subscribe(() => {\n this.generateMatchModeOptions();\n this.generateOperatorOptions();\n });\n\n this.generateMatchModeOptions();\n this.generateOperatorOptions();\n }\n\n generateMatchModeOptions() {\n this.matchModes = this.matchModeOptions || \n this.config.filterMatchModeOptions[this.type]?.map(key => {\n return {label: this.config.getTranslation(key), value: key}\n });\n }\n\n generateOperatorOptions() {\n this.operatorOptions = [\n {label: this.config.getTranslation(TranslationKeys.MATCH_ALL), value: FilterOperator.AND},\n {label: this.config.getTranslation(TranslationKeys.MATCH_ANY), value: FilterOperator.OR}\n ];\n }\n\n ngAfterContentInit() {\n this.templates.forEach((item) => {\n switch(item.getType()) {\n case 'header':\n this.headerTemplate = item.template;\n break;\n\n case 'filter':\n this.filterTemplate = item.template;\n break;\n \n case 'footer':\n this.footerTemplate = item.template;\n break;\n\n default:\n this.filterTemplate = item.template;\n break;\n }\n });\n }\n\n initFieldFilterConstraint() {\n let defaultMatchMode = this.getDefaultMatchMode();\n this.dt.filters[this.field] = this.display == 'row' ? {value: null, matchMode: defaultMatchMode} : [{value: null, matchMode: defaultMatchMode, operator: this.operator}];\n }\n\n onMenuMatchModeChange(value: any, filterMeta: FilterMetadata) {\n filterMeta.matchMode = value;\n\n if (!this.showApplyButton) {\n this.dt._filter();\n }\n }\n\n onRowMatchModeChange(matchMode: string) {\n ( this.dt.filters[this.field]).matchMode = matchMode;\n this.dt._filter();\n this.hide();\n }\n \n onRowMatchModeKeyDown(event: KeyboardEvent) {\n let item = event.target;\n\n switch(event.key) { \n case 'ArrowDown':\n var nextItem = this.findNextItem(item);\n if (nextItem) {\n item.removeAttribute('tabindex');\n nextItem.tabIndex = '0';\n nextItem.focus();\n }\n\n event.preventDefault();\n break;\n\n case 'ArrowUp':\n var prevItem = this.findPrevItem(item);\n if (prevItem) {\n item.removeAttribute('tabindex');\n prevItem.tabIndex = '0';\n prevItem.focus();\n }\n\n event.preventDefault();\n break;\n }\n }\n\n onRowClearItemClick() {\n this.clearFilter();\n this.hide();\n }\n\n isRowMatchModeSelected(matchMode: string) {\n return ( this.dt.filters[this.field]).matchMode === matchMode;\n }\n\n addConstraint() {\n ( this.dt.filters[this.field]).push({value: null, matchMode: this.getDefaultMatchMode(), operator: this.getDefaultOperator()});\n this.dt._filter();\n }\n\n removeConstraint(filterMeta: FilterMetadata) {\n this.dt.filters[this.field] = ( this.dt.filters[this.field]).filter(meta => meta !== filterMeta);\n this.dt._filter();\n }\n\n onOperatorChange(value) {\n ( this.dt.filters[this.field]).forEach(filterMeta => {\n filterMeta.operator = value;\n this.operator = value;\n });\n\n if (!this.showApplyButton) {\n this.dt._filter();\n }\n }\n\n toggleMenu() {\n this.overlayVisible = !this.overlayVisible;\n }\n\n onToggleButtonKeyDown(event: KeyboardEvent) {\n switch(event.key) {\n case 'Escape':\n case 'Tab':\n this.overlayVisible = false;\n break;\n \n case 'ArrowDown':\n if (this.overlayVisible) {\n let focusable = DomHandler.getFocusableElements(this.overlay);\n if (focusable) {\n focusable[0].focus();\n }\n event.preventDefault();\n }\n else if (event.altKey) {\n this.overlayVisible = true;\n event.preventDefault();\n }\n break;\n }\n }\n\n onEscape() {\n this.overlayVisible = false;\n this.icon.nativeElement.focus();\n }\n\n findNextItem(item: HTMLLIElement) {\n let nextItem = item.nextElementSibling;\n\n if (nextItem)\n return DomHandler.hasClass(nextItem, 'p-column-filter-separator') ? this.findNextItem(nextItem) : nextItem;\n else\n return item.parentElement.firstElementChild;\n }\n\n findPrevItem(item: HTMLLIElement) {\n let prevItem = item.previousElementSibling;\n\n if (prevItem)\n return DomHandler.hasClass(prevItem, 'p-column-filter-separator') ? this.findPrevItem(prevItem) : prevItem;\n else\n return item.parentElement.lastElementChild;\n }\n\n onOverlayAnimationStart(event: AnimationEvent) {\n switch (event.toState) {\n case 'visible':\n this.overlay = event.element;\n \n document.body.appendChild(this.overlay);\n this.overlay.style.zIndex = String(++DomHandler.zindex);\n DomHandler.absolutePosition(this.overlay, this.icon.nativeElement)\n this.bindDocumentClickListener();\n this.bindDocumentResizeListener();\n this.bindScrollListener();\n break;\n\n case 'void':\n this.onOverlayHide();\n break;\n }\n }\n\n getDefaultMatchMode(): string {\n if (this.matchMode) {\n return this.matchMode;\n }\n else {\n if (this.type === 'text')\n return FilterMatchMode.STARTS_WITH;\n else if (this.type === 'numeric')\n return FilterMatchMode.EQUALS;\n else if (this.type === 'date')\n return FilterMatchMode.DATE_IS;\n else\n return FilterMatchMode.CONTAINS;\n }\n }\n\n getDefaultOperator(): string {\n return this.dt.filters ? ( this.dt.filters[this.field])[0].operator: this.operator;\n }\n\n hasRowFilter() {\n return this.dt.filters[this.field] && !this.dt.isFilterBlank((this.dt.filters[this.field]).value);\n }\n\n get fieldConstraints(): FilterMetadata[] {\n return this.dt.filters ? this.dt.filters[this.field] : null;\n }\n\n get showRemoveIcon(): boolean {\n return this.fieldConstraints ? this.fieldConstraints.length > 1 : false;\n }\n\n get showMenuButton(): boolean {\n return this.showMenu && (this.display === 'row' ? this.type !== 'boolean': true);\n }\n\n get isShowOperator(): boolean {\n return this.showOperator && this.type !== 'boolean';\n }\n\n get isShowAddConstraint(): boolean {\n return this.showAddButton && this.type !== 'boolean' && (this.fieldConstraints && this.fieldConstraints.length < this.maxConstraints);\n }\n\n get applyButtonLabel(): string {\n return this.config.getTranslation(TranslationKeys.APPLY);\n }\n\n get clearButtonLabel(): string {\n return this.config.getTranslation(TranslationKeys.CLEAR);\n }\n\n get addRuleButtonLabel(): string {\n return this.config.getTranslation(TranslationKeys.ADD_RULE);\n }\n\n get removeRuleButtonLabel(): string {\n return this.config.getTranslation(TranslationKeys.REMOVE_RULE);\n }\n\n get noFilterLabel(): string {\n return this.config.getTranslation(TranslationKeys.NO_FILTER);\n }\n\n hasFilter(): boolean {\n let fieldFilter = this.dt.filters[this.field];\n if (fieldFilter) {\n if (Array.isArray(fieldFilter))\n return !this.dt.isFilterBlank(( fieldFilter)[0].value); \n else\n return !this.dt.isFilterBlank(fieldFilter.value);\n }\n\n return false;\n }\n\n isOutsideClicked(event): boolean {\n return !(this.overlay.isSameNode(event.target) || this.overlay.contains(event.target) \n || this.icon.nativeElement.isSameNode(event.target) || this.icon.nativeElement.contains(event.target)\n || DomHandler.hasClass(event.target, 'p-column-filter-add-button') || DomHandler.hasClass(event.target.parentElement, 'p-column-filter-add-button')\n || DomHandler.hasClass(event.target, 'p-column-filter-remove-button') || DomHandler.hasClass(event.target.parentElement, 'p-column-filter-remove-button'));\n }\n\n bindDocumentClickListener() {\n if (!this.documentClickListener) {\n const documentTarget: any = this.el ? this.el.nativeElement.ownerDocument : 'document';\n\n this.documentClickListener = this.renderer.listen(documentTarget, 'mousedown', event => {\n if (this.isOutsideClicked(event)) {\n this.hide();\n }\n });\n }\n }\n\n unbindDocumentClickListener() {\n if (this.documentClickListener) {\n this.documentClickListener();\n this.documentClickListener = null;\n }\n }\n\n bindDocumentResizeListener() {\n this.documentResizeListener = () => this.hide();\n window.addEventListener('resize', this.documentResizeListener);\n }\n\n unbindDocumentResizeListener() {\n if (this.documentResizeListener) {\n window.removeEventListener('resize', this.documentResizeListener);\n this.documentResizeListener = null;\n }\n }\n\n bindScrollListener() {\n if (!this.scrollHandler) {\n this.scrollHandler = new ConnectedOverlayScrollHandler(this.icon.nativeElement, () => {\n if (this.overlayVisible) {\n this.hide();\n }\n });\n }\n\n this.scrollHandler.bindScrollListener();\n }\n\n unbindScrollListener() {\n if (this.scrollHandler) {\n this.scrollHandler.unbindScrollListener();\n }\n }\n\n hide() {\n this.overlayVisible = false;\n }\n\n onOverlayHide() {\n this.unbindDocumentClickListener();\n this.unbindDocumentResizeListener();\n this.unbindScrollListener();\n this.overlay = null;\n }\n\n clearFilter() {\n this.initFieldFilterConstraint();\n this.dt._filter();\n }\n\n applyFilter() {\n this.dt._filter();\n this.hide();\n }\n\n ngOnDestroy() {\n if (this.overlay) {\n this.el.nativeElement.appendChild(this.overlay);\n this.onOverlayHide();\n }\n\n if (this.translationSubscription) {\n this.translationSubscription.unsubscribe();\n }\n }\n}\n\n@NgModule({\n imports: [CommonModule,PaginatorModule,InputTextModule,DropdownModule,ScrollingModule,FormsModule,ButtonModule,SelectButtonModule,CalendarModule,InputNumberModule,TriStateCheckboxModule],\n exports: [Table,SharedModule,SortableColumn,SelectableRow,RowToggler,ContextMenuRow,ResizableColumn,ReorderableColumn,EditableColumn,CellEditor,SortIcon,\n TableRadioButton,TableCheckbox,TableHeaderCheckbox,ReorderableRowHandle,ReorderableRow,SelectableRowDblClick,EditableRow,InitEditableRow,SaveEditableRow,CancelEditableRow,ScrollingModule,ColumnFilter],\n declarations: [Table,SortableColumn,SelectableRow,RowToggler,ContextMenuRow,ResizableColumn,ReorderableColumn,EditableColumn,CellEditor,TableBody,ScrollableView,SortIcon,\n TableRadioButton,TableCheckbox,TableHeaderCheckbox,ReorderableRowHandle,ReorderableRow,SelectableRowDblClick,EditableRow,InitEditableRow,SaveEditableRow,CancelEditableRow,ColumnFilter,ColumnFilterFormElement]\n})\nexport class TableModule { }"]}