{"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","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","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","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","findCell","currentCell","targetCell","findPreviousEditableColumn","invokeElementMethod","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","CONTAINS","hasRowFilter","fieldConstraints","APPLY","CLEAR","ADD_RULE","REMOVE_RULE","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":";;;;;;;;;;;;;;oFAyG6BA,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,GAAIU,EAAG,MAAMA,EAAEG,OAE7B,OAAOF,WAGKG,IACZ,IAAK,IAAIH,EAAK,GAAIX,EAAI,EAAGA,EAAIe,UAAUb,OAAQF,IAC3CW,EAAKA,EAAGK,OAAOT,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AAe/E,EAAsBsD,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 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\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\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 __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 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 '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') {\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 this.sortSingle();\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 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' });\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' });\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 else if (this.isMultipleSelectionMode()) {\n this.selection = [rowData];\n this.selectionChange.emit(this.selection);\n }\n\n if (dataKeyValue) {\n this.selectionKeys[dataKeyValue] = 1;\n }\n }\n\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 for(let i = rangeStart; i <= rangeEnd; i++) {\n let rangeRowData = this.filteredValue ? this.filteredValue[i] : this.value[i];\n if (!this.isSelected(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 this.onRowSelect.emit({originalEvent: event, data: rangeRowData, type: 'row'});\n }\n }\n\n this.selectionChange.emit(this.selection);\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-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 = 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 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 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.rowIndex});\n else\n this.dt.onEditCancel.emit({field: this.dt.editingCellField, data: this.dt.editingCellData, originalEvent: event, index: this.rowIndex});\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\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 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
  • No filter
  • \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 });\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.EQUALS;\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 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 { }"]}