{"version":3,"file":"primeng-table.mjs","sources":["../../src/app/components/table/table.ts","../../src/app/components/table/primeng-table.ts"],"sourcesContent":["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, OverlayService } 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, UniqueComponentId, ZIndexUtils } 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 private resetSource = 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 resetSource$ = this.resetSource.asObservable();\n\n onSort(sortMeta: SortMeta|SortMeta[]) {\n this.sortSource.next(sortMeta);\n }\n\n onSelectionChange() {\n this.selectionSource.next(null);\n }\n\n onResetChange() {\n this.resetSource.next(null);\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
\n \n
\n\n
\n \n \n
\n `,\n providers: [TableService],\n changeDetection: ChangeDetectionStrategy.Default,\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['./table.css'],\n host: {\n 'class': 'p-element'\n }\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() showJumpToPageInput: 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() scrollDirection: string = \"vertical\";\n\n @Input() rowGroupMode: string;\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() showInitialSortBadge: boolean = true;\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() groupRowsBy: any;\n\n @Input() groupRowsByOrder: number = 1;\n\n @Input() minBufferPx: number;\n\n @Input() maxBufferPx: number;\n\n @Input() responsiveLayout: string = 'stack';\n\n @Input() breakpoint: string = '960px';\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('wrapper') wrapperViewChild: ElementRef;\n\n @ViewChild('table') tableViewChild: ElementRef;\n\n @ViewChild('tableHeader') tableHeaderViewChild: ElementRef;\n\n @ViewChild(CdkVirtualScrollViewport) virtualScrollBody: CdkVirtualScrollViewport;\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 headerGroupedTemplate: TemplateRef;\n\n bodyTemplate: TemplateRef;\n\n loadingBodyTemplate: TemplateRef;\n\n captionTemplate: TemplateRef;\n\n frozenRowsTemplate: TemplateRef;\n\n footerTemplate: TemplateRef;\n\n footerGroupedTemplate: TemplateRef;\n\n summaryTemplate: TemplateRef;\n\n colGroupTemplate: TemplateRef;\n\n expandedRowTemplate: TemplateRef;\n\n groupHeaderTemplate: TemplateRef;\n\n groupFooterTemplate: TemplateRef;\n\n rowspanTemplate: TemplateRef;\n\n frozenExpandedRowTemplate: TemplateRef;\n\n frozenHeaderTemplate: TemplateRef;\n\n frozenBodyTemplate: TemplateRef;\n\n frozenFooterTemplate: TemplateRef;\n\n frozenColGroupTemplate: TemplateRef;\n\n emptyMessageTemplate: TemplateRef;\n\n paginatorLeftTemplate: TemplateRef;\n\n paginatorRightTemplate: TemplateRef;\n\n paginatorDropdownItemTemplate: TemplateRef;\n\n selectionKeys: any = {};\n\n lastResizerHelperX: number;\n\n reorderIconWidth: number;\n\n reorderIconHeight: number;\n\n draggedColumn: any;\n\n draggedRowIndex: number;\n\n droppedRowIndex: number;\n\n rowDragging: boolean;\n\n dropPosition: number;\n\n editingCell: Element;\n\n editingCellData: any;\n\n editingCellField: any;\n\n editingCellRowIndex: number;\n\n selfClick: 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 overlaySubscription: Subscription;\n\n virtualScrollSubscription: Subscription;\n\n resizeColumnElement;\n\n columnResizing: boolean = false;\n\n rowGroupHeaderStyleObject: any = {};\n\n id: string = UniqueComponentId();\n\n styleElement: any;\n\n responsiveStyleElement: any;\n\n constructor(public el: ElementRef, public zone: NgZone, public tableService: TableService, public cd: ChangeDetectorRef, public filterService: FilterService, public overlayService: OverlayService) {}\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 if (this.responsiveLayout === 'stack' && !this.scrollable) {\n this.createResponsiveStyle();\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 'headergrouped':\n this.headerGroupedTemplate = 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 'footergrouped':\n this.footerGroupedTemplate = 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 'groupheader':\n this.groupHeaderTemplate = item.template;\n break;\n\n case 'rowspan':\n this.rowspanTemplate = item.template;\n break;\n\n case 'groupfooter':\n this.groupFooterTemplate = item.template;\n break;\n\n case 'frozenrows':\n this.frozenRowsTemplate = item.template;\n break;\n\n case 'frozenheader':\n this.frozenHeaderTemplate = item.template;\n break;\n\n case 'frozenbody':\n this.frozenBodyTemplate = item.template;\n break;\n\n case 'frozenfooter':\n this.frozenFooterTemplate = item.template;\n break;\n\n case 'frozencolgroup':\n this.frozenColGroupTemplate = item.template;\n break;\n\n case 'frozenrowexpansion':\n this.frozenExpandedRowTemplate = item.template;\n break;\n\n case 'emptymessage':\n this.emptyMessageTemplate = item.template;\n break;\n\n case 'paginatorleft':\n this.paginatorLeftTemplate = item.template;\n break;\n\n case 'paginatorright':\n this.paginatorRightTemplate = item.template;\n break;\n\n case 'paginatordropdownitem':\n this.paginatorDropdownItemTemplate = item.template;\n break;\n }\n });\n }\n\n ngAfterViewInit() {\n if (this.isStateful() && this.resizableColumns) {\n this.restoreColumnWidths();\n }\n\n if (this.scrollable && this.virtualScroll) {\n this.virtualScrollSubscription = this.virtualScrollBody.renderedRangeStream.subscribe(range => {\n let top = range.start * this.virtualRowHeight * -1;\n this.tableHeaderViewChild.nativeElement.style.top = top + 'px';\n });\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 || this.groupRowsBy))\n this.sortSingle();\n else if (this.sortMode == 'multiple' && (this.multiSortMeta || this.groupRowsBy))\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.groupRowsBy) {\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.groupRowsByOrder) {\n //avoid triggering lazy load prior to lazy initialization at onInit\n if ( !this.lazy || this.initialized ) {\n if (this.sortMode === 'single') {\n this.sortSingle();\n }\n }\n }\n\n if (simpleChange.multiSortMeta) {\n this._multiSortMeta = simpleChange.multiSortMeta.currentValue;\n if (this.sortMode === 'multiple' && (this.initialized || (!this.lazy && !this.virtualScroll))) {\n this.sortMultiple();\n }\n }\n\n if (simpleChange.selection) {\n this._selection = simpleChange.selection.currentValue;\n\n if (!this.preventSelectionSetterPropagation) {\n this.updateSelectionKeys();\n this.tableService.onSelectionChange();\n }\n this.preventSelectionSetterPropagation = false;\n }\n }\n\n @Input() get value(): any[] {\n return this._value;\n }\n set value(val: any[]) {\n this._value = val;\n }\n\n @Input() get columns(): any[] {\n return this._columns;\n }\n set columns(cols: any[]) {\n this._columns = cols;\n }\n\n @Input() get first(): number {\n return this._first;\n }\n set first(val: number) {\n this._first = val;\n }\n\n @Input() get rows(): number {\n return this._rows;\n }\n set rows(val: number) {\n this._rows = val;\n }\n\n @Input() get totalRecords(): number {\n return this._totalRecords;\n }\n set totalRecords(val: number) {\n this._totalRecords = val;\n this.tableService.onTotalRecordsChange(this._totalRecords);\n }\n\n @Input() get sortField(): string {\n return this._sortField;\n }\n\n set sortField(val: string) {\n this._sortField = val;\n }\n\n @Input() get sortOrder(): number {\n return this._sortOrder;\n }\n set sortOrder(val: number) {\n this._sortOrder = val;\n }\n\n @Input() get multiSortMeta(): SortMeta[] {\n return this._multiSortMeta;\n }\n\n set multiSortMeta(val: SortMeta[]) {\n this._multiSortMeta = val;\n }\n\n @Input() get selection(): any {\n return this._selection;\n }\n\n set selection(val: any) {\n this._selection = val;\n }\n\n get dataToRender() {\n let data = this.filteredValue||this.value;\n return data ? ((this.paginator && !this.lazy) ? (data.slice(this.first, this.first + this.rows)) : data) : [];\n }\n\n updateSelectionKeys() {\n if (this.dataKey && this._selection) {\n this.selectionKeys = {};\n if (Array.isArray(this._selection)) {\n for(let data of this._selection) {\n this.selectionKeys[String(ObjectUtils.resolveFieldData(data, this.dataKey))] = 1;\n }\n }\n else {\n this.selectionKeys[String(ObjectUtils.resolveFieldData(this._selection, this.dataKey))] = 1;\n }\n }\n }\n\n onPageChange(event) {\n this.first = event.first;\n this.rows = event.rows;\n\n if (this.lazy) {\n this.onLazyLoad.emit(this.createLazyLoadMetadata());\n }\n\n this.onPage.emit({\n first: this.first,\n rows: this.rows\n });\n\n this.firstChange.emit(this.first);\n this.rowsChange.emit(this.rows);\n this.tableService.onValueChange(this.value);\n\n if (this.isStateful()) {\n this.saveState();\n }\n\n this.anchorRowIndex = null;\n\n if (this.scrollable) {\n this.resetScrollTop();\n }\n }\n\n sort(event) {\n let originalEvent = event.originalEvent;\n\n if (this.sortMode === 'single') {\n this._sortOrder = (this.sortField === event.field) ? this.sortOrder * -1 : this.defaultSortOrder;\n this._sortField = event.field;\n\n if (this.resetPageOnSort) {\n this._first = 0;\n this.firstChange.emit(this._first);\n\n if (this.scrollable) {\n this.resetScrollTop();\n }\n }\n\n this.sortSingle();\n }\n if (this.sortMode === 'multiple') {\n let metaKey = originalEvent.metaKey || originalEvent.ctrlKey;\n let sortMeta = this.getSortMeta(event.field);\n\n if (sortMeta) {\n if (!metaKey) {\n this._multiSortMeta = [{ field: event.field, order: sortMeta.order * -1 }];\n\n if (this.resetPageOnSort) {\n this._first = 0;\n this.firstChange.emit(this._first);\n\n if (this.scrollable) {\n this.resetScrollTop();\n }\n }\n }\n else {\n sortMeta.order = sortMeta.order * -1;\n }\n }\n else {\n if (!metaKey || !this.multiSortMeta) {\n this._multiSortMeta = [];\n\n if (this.resetPageOnSort) {\n this._first = 0;\n this.firstChange.emit(this._first);\n }\n }\n this._multiSortMeta.push({ field: event.field, order: this.defaultSortOrder });\n }\n\n this.sortMultiple();\n }\n\n if (this.isStateful()) {\n this.saveState();\n }\n\n this.anchorRowIndex = null;\n }\n\n sortSingle() {\n let field = this.sortField || this.groupRowsBy;\n let order = this.sortField ? this.sortOrder : this.groupRowsByOrder;\n if (this.groupRowsBy && this.sortField && this.groupRowsBy !== this.sortField) {\n this._multiSortMeta = [this.getGroupRowsMeta(), {field: this.sortField, order: this.sortOrder}];\n this.sortMultiple();\n return;\n }\n\n if (field && order) {\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: field,\n order: order\n });\n }\n else {\n this.value.sort((data1, data2) => {\n let value1 = ObjectUtils.resolveFieldData(data1, field);\n let value2 = ObjectUtils.resolveFieldData(data2, 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' && typeof value2 === 'string')\n result = value1.localeCompare(value2);\n else\n result = (value1 < value2) ? -1 : (value1 > value2) ? 1 : 0;\n\n return (order * 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: field,\n order: order\n };\n\n this.onSort.emit(sortMeta);\n this.tableService.onSort(sortMeta);\n }\n }\n\n sortMultiple() {\n if (this.groupRowsBy) {\n if (!this._multiSortMeta)\n this._multiSortMeta = [this.getGroupRowsMeta()]\n else if (this.multiSortMeta[0].field !== this.groupRowsBy)\n this._multiSortMeta = [this.getGroupRowsMeta(), ...this._multiSortMeta]\n }\n\n if (this.multiSortMeta) {\n if (this.lazy) {\n this.onLazyLoad.emit(this.createLazyLoadMetadata());\n }\n else if (this.value) {\n if (this.customSort) {\n this.sortFunction.emit({\n data: this.value,\n mode: this.sortMode,\n multiSortMeta: this.multiSortMeta\n });\n }\n else {\n this.value.sort((data1, data2) => {\n return this.multisortField(data1, data2, this.multiSortMeta, 0);\n });\n\n this._value = [...this.value];\n }\n\n if (this.hasFilter()) {\n this._filter();\n }\n }\n\n this.onSort.emit({\n multisortmeta: this.multiSortMeta\n });\n this.tableService.onSort(this.multiSortMeta);\n }\n }\n\n multisortField(data1, data2, multiSortMeta, index) {\n let value1 = ObjectUtils.resolveFieldData(data1, multiSortMeta[index].field);\n let value2 = ObjectUtils.resolveFieldData(data2, multiSortMeta[index].field);\n let result = null;\n\n if (value1 == null && value2 != null)\n result = -1;\n else if (value1 != null && value2 == null)\n result = 1;\n else if (value1 == null && value2 == null)\n result = 0;\n else if (typeof value1 == 'string' || value1 instanceof String) {\n if (value1.localeCompare && (value1 != value2)) {\n return (multiSortMeta[index].order * value1.localeCompare(value2));\n }\n }\n else {\n result = (value1 < value2) ? -1 : 1;\n }\n\n if (value1 == value2) {\n return (multiSortMeta.length - 1) > (index) ? (this.multisortField(data1, data2, multiSortMeta, index + 1)) : 0;\n }\n\n return (multiSortMeta[index].order * result);\n }\n\n getSortMeta(field: string) {\n if (this.multiSortMeta && this.multiSortMeta.length) {\n for (let i = 0; i < this.multiSortMeta.length; i++) {\n if (this.multiSortMeta[i].field === field) {\n return this.multiSortMeta[i];\n }\n }\n }\n\n return null;\n }\n\n isSorted(field: string) {\n if (this.sortMode === 'single') {\n return (this.sortField && this.sortField === field);\n }\n else if (this.sortMode === 'multiple') {\n let sorted = false;\n if (this.multiSortMeta) {\n for(let i = 0; i < this.multiSortMeta.length; i++) {\n if (this.multiSortMeta[i].field == field) {\n sorted = true;\n break;\n }\n }\n }\n return sorted;\n }\n }\n\n handleRowClick(event) {\n let target = ( event.originalEvent.target);\n let targetNode = target.nodeName;\n let parentNode = target.parentElement && target.parentElement.nodeName;\n if (targetNode == 'INPUT' || targetNode == 'BUTTON' || targetNode == 'A' ||\n parentNode == 'INPUT' || parentNode == 'BUTTON' || parentNode == 'A' ||\n (DomHandler.hasClass(event.originalEvent.target, 'p-clickable'))) {\n return;\n }\n\n if (this.selectionMode) {\n this.preventSelectionSetterPropagation = true;\n if (this.isMultipleSelectionMode() && event.originalEvent.shiftKey && this.anchorRowIndex != null) {\n DomHandler.clearSelection();\n if (this.rangeRowIndex != null) {\n this.clearSelectionRange(event.originalEvent);\n }\n\n this.rangeRowIndex = event.rowIndex;\n this.selectRange(event.originalEvent, event.rowIndex);\n }\n else {\n let rowData = event.rowData;\n let selected = this.isSelected(rowData);\n let metaSelection = this.rowTouched ? false : this.metaKeySelection;\n let dataKeyValue = this.dataKey ? String(ObjectUtils.resolveFieldData(rowData, this.dataKey)) : null;\n this.anchorRowIndex = event.rowIndex;\n this.rangeRowIndex = event.rowIndex;\n\n if (metaSelection) {\n let metaKey = event.originalEvent.metaKey||event.originalEvent.ctrlKey;\n\n if (selected && metaKey) {\n if (this.isSingleSelectionMode()) {\n this._selection = null;\n this.selectionKeys = {};\n this.selectionChange.emit(null);\n }\n else {\n let selectionIndex = this.findIndexInSelection(rowData);\n this._selection = this.selection.filter((val,i) => i!=selectionIndex);\n this.selectionChange.emit(this.selection);\n if (dataKeyValue) {\n delete this.selectionKeys[dataKeyValue];\n }\n }\n\n this.onRowUnselect.emit({originalEvent: event.originalEvent, data: rowData, type: 'row'});\n }\n else {\n if (this.isSingleSelectionMode()) {\n this._selection = rowData;\n this.selectionChange.emit(rowData);\n if (dataKeyValue) {\n this.selectionKeys = {};\n this.selectionKeys[dataKeyValue] = 1;\n }\n }\n else if (this.isMultipleSelectionMode()) {\n if (metaKey) {\n this._selection = this.selection||[];\n }\n else {\n this._selection = [];\n this.selectionKeys = {};\n }\n\n this._selection = [...this.selection,rowData];\n this.selectionChange.emit(this.selection);\n if (dataKeyValue) {\n this.selectionKeys[dataKeyValue] = 1;\n }\n }\n\n this.onRowSelect.emit({originalEvent: event.originalEvent, data: rowData, type: 'row', index: event.rowIndex});\n }\n }\n else {\n if (this.selectionMode === 'single') {\n if (selected) {\n this._selection = null;\n this.selectionKeys = {};\n this.selectionChange.emit(this.selection);\n this.onRowUnselect.emit({ originalEvent: event.originalEvent, data: rowData, type: 'row', index: event.rowIndex });\n }\n else {\n this._selection = rowData;\n this.selectionChange.emit(this.selection);\n this.onRowSelect.emit({ originalEvent: event.originalEvent, data: rowData, type: 'row', index: event.rowIndex });\n if (dataKeyValue) {\n this.selectionKeys = {};\n this.selectionKeys[dataKeyValue] = 1;\n }\n }\n }\n else if (this.selectionMode === 'multiple') {\n if (selected) {\n let selectionIndex = this.findIndexInSelection(rowData);\n this._selection = this.selection.filter((val, i) => i != selectionIndex);\n this.selectionChange.emit(this.selection);\n this.onRowUnselect.emit({ originalEvent: event.originalEvent, data: rowData, type: 'row', index: event.rowIndex });\n if (dataKeyValue) {\n delete this.selectionKeys[dataKeyValue];\n }\n }\n else {\n this._selection = this.selection ? [...this.selection, rowData] : [rowData];\n this.selectionChange.emit(this.selection);\n this.onRowSelect.emit({ originalEvent: event.originalEvent, data: rowData, type: 'row', index: event.rowIndex });\n if (dataKeyValue) {\n this.selectionKeys[dataKeyValue] = 1;\n }\n }\n }\n }\n }\n\n this.tableService.onSelectionChange();\n\n if (this.isStateful()) {\n this.saveState();\n }\n }\n\n this.rowTouched = false;\n }\n\n handleRowTouchEnd(event) {\n this.rowTouched = true;\n }\n\n handleRowRightClick(event) {\n if (this.contextMenu) {\n const rowData = event.rowData;\n\n if (this.contextMenuSelectionMode === 'separate') {\n this.contextMenuSelection = rowData;\n this.contextMenuSelectionChange.emit(rowData);\n this.onContextMenuSelect.emit({originalEvent: event.originalEvent, data: rowData, index: event.rowIndex});\n this.contextMenu.show(event.originalEvent);\n this.tableService.onContextMenu(rowData);\n }\n else if (this.contextMenuSelectionMode === 'joint') {\n this.preventSelectionSetterPropagation = true;\n let selected = this.isSelected(rowData);\n let dataKeyValue = this.dataKey ? String(ObjectUtils.resolveFieldData(rowData, this.dataKey)) : null;\n\n if (!selected) {\n if (this.isSingleSelectionMode()) {\n this.selection = rowData;\n this.selectionChange.emit(rowData);\n\n if (dataKeyValue) {\n this.selectionKeys = {};\n this.selectionKeys[dataKeyValue] = 1;\n }\n }\n else if (this.isMultipleSelectionMode()) {\n this._selection = this.selection ? [...this.selection, rowData] : [rowData];\n this.selectionChange.emit(this.selection);\n\n if (dataKeyValue) {\n this.selectionKeys[dataKeyValue] = 1;\n }\n }\n }\n\n this.tableService.onSelectionChange();\n this.contextMenu.show(event.originalEvent);\n this.onContextMenuSelect.emit({originalEvent: event, data: rowData, index: event.rowIndex});\n }\n }\n }\n\n selectRange(event: MouseEvent, rowIndex: number) {\n let rangeStart, rangeEnd;\n\n if (this.anchorRowIndex > rowIndex) {\n rangeStart = rowIndex;\n rangeEnd = this.anchorRowIndex;\n }\n else if (this.anchorRowIndex < rowIndex) {\n rangeStart = this.anchorRowIndex;\n rangeEnd = rowIndex;\n }\n else {\n rangeStart = rowIndex;\n rangeEnd = rowIndex;\n }\n\n if (this.lazy && this.paginator) {\n rangeStart -= this.first;\n rangeEnd -= this.first;\n }\n\n let rangeRowsData = [];\n for(let i = rangeStart; i <= rangeEnd; i++) {\n let rangeRowData = this.filteredValue ? this.filteredValue[i] : this.value[i];\n if (!this.isSelected(rangeRowData)) {\n rangeRowsData.push(rangeRowData);\n this._selection = [...this.selection, rangeRowData];\n let dataKeyValue: string = this.dataKey ? String(ObjectUtils.resolveFieldData(rangeRowData, this.dataKey)) : null;\n if (dataKeyValue) {\n this.selectionKeys[dataKeyValue] = 1;\n }\n }\n }\n this.selectionChange.emit(this.selection);\n this.onRowSelect.emit({originalEvent: event, data: rangeRowsData, type: 'row'});\n }\n\n clearSelectionRange(event: MouseEvent) {\n let rangeStart, rangeEnd;\n\n if (this.rangeRowIndex > this.anchorRowIndex) {\n rangeStart = this.anchorRowIndex;\n rangeEnd = this.rangeRowIndex;\n }\n else if (this.rangeRowIndex < this.anchorRowIndex) {\n rangeStart = this.rangeRowIndex;\n rangeEnd = this.anchorRowIndex;\n }\n else {\n rangeStart = this.rangeRowIndex;\n rangeEnd = this.rangeRowIndex;\n }\n\n for(let i = rangeStart; i <= rangeEnd; i++) {\n let rangeRowData = this.value[i];\n let selectionIndex = this.findIndexInSelection(rangeRowData);\n this._selection = this.selection.filter((val,i) => i!=selectionIndex);\n let dataKeyValue: string = this.dataKey ? String(ObjectUtils.resolveFieldData(rangeRowData, this.dataKey)) : null;\n if (dataKeyValue) {\n delete this.selectionKeys[dataKeyValue];\n }\n this.onRowUnselect.emit({originalEvent: event, data: rangeRowData, type: 'row'});\n }\n }\n\n isSelected(rowData) {\n if (rowData && this.selection) {\n if (this.dataKey) {\n return this.selectionKeys[ObjectUtils.resolveFieldData(rowData, this.dataKey)] !== undefined;\n }\n else {\n if (this.selection instanceof Array)\n return this.findIndexInSelection(rowData) > -1;\n else\n return this.equals(rowData, this.selection);\n }\n }\n\n return false;\n }\n\n findIndexInSelection(rowData: any) {\n let index: number = -1;\n if (this.selection && this.selection.length) {\n for (let i = 0; i < this.selection.length; i++) {\n if (this.equals(rowData, this.selection[i])) {\n index = i;\n break;\n }\n }\n }\n\n return index;\n }\n\n toggleRowWithRadio(event: any, rowData:any) {\n this.preventSelectionSetterPropagation = true;\n\n if (this.selection != rowData) {\n this._selection = rowData;\n this.selectionChange.emit(this.selection);\n this.onRowSelect.emit({originalEvent: event.originalEvent, index: event.rowIndex, data: rowData, type: 'radiobutton'});\n\n if (this.dataKey) {\n this.selectionKeys = {};\n this.selectionKeys[String(ObjectUtils.resolveFieldData(rowData, this.dataKey))] = 1;\n }\n }\n else {\n this._selection = null;\n this.selectionChange.emit(this.selection);\n this.onRowUnselect.emit({originalEvent: event.originalEvent, index: event.rowIndex, data: rowData, type: 'radiobutton'});\n }\n\n this.tableService.onSelectionChange();\n\n if (this.isStateful()) {\n this.saveState();\n }\n }\n\n toggleRowWithCheckbox(event, rowData: any) {\n this.selection = this.selection||[];\n let selected = this.isSelected(rowData);\n let dataKeyValue = this.dataKey ? String(ObjectUtils.resolveFieldData(rowData, this.dataKey)) : null;\n this.preventSelectionSetterPropagation = true;\n\n if (selected) {\n let selectionIndex = this.findIndexInSelection(rowData);\n this._selection = this.selection.filter((val, i) => i != selectionIndex);\n this.selectionChange.emit(this.selection);\n this.onRowUnselect.emit({ originalEvent: event.originalEvent, index: event.rowIndex, data: rowData, type: 'checkbox' });\n if (dataKeyValue) {\n delete this.selectionKeys[dataKeyValue];\n }\n }\n else {\n this._selection = this.selection ? [...this.selection, rowData] : [rowData];\n this.selectionChange.emit(this.selection);\n this.onRowSelect.emit({ originalEvent: event.originalEvent, index: event.rowIndex, data: rowData, type: 'checkbox' });\n if (dataKeyValue) {\n this.selectionKeys[dataKeyValue] = 1;\n }\n }\n\n this.tableService.onSelectionChange();\n\n if (this.isStateful()) {\n this.saveState();\n }\n }\n\n toggleRowsWithCheckbox(event: Event, check: boolean) {\n this._selection = check ? this.filteredValue ? this.filteredValue.slice(): this.value.slice() : [];\n this.preventSelectionSetterPropagation = true;\n this.updateSelectionKeys();\n this.selectionChange.emit(this._selection);\n this.tableService.onSelectionChange();\n this.onHeaderCheckboxToggle.emit({originalEvent: event, checked: check});\n\n if (this.isStateful()) {\n this.saveState();\n }\n }\n\n equals(data1, data2) {\n return this.compareSelectionBy === 'equals' ? (data1 === data2) : ObjectUtils.equals(data1, data2, this.dataKey);\n }\n\n /* Legacy Filtering for custom elements */\n filter(value: any, field: string, matchMode: string) {\n if (this.filterTimeout) {\n clearTimeout(this.filterTimeout);\n }\n if (!this.isFilterBlank(value)) {\n this.filters[field] = { value: value, matchMode: matchMode };\n } else if (this.filters[field]) {\n delete this.filters[field];\n }\n\n this.filterTimeout = setTimeout(() => {\n this._filter();\n this.filterTimeout = null;\n }, this.filterDelay);\n\n this.anchorRowIndex = null;\n }\n\n filterGlobal(value, matchMode) {\n this.filter(value, 'global', matchMode);\n }\n\n isFilterBlank(filter: any): boolean {\n if (filter !== null && filter !== undefined) {\n if ((typeof filter === 'string' && filter.trim().length == 0) || (filter instanceof Array && filter.length == 0))\n return true;\n else\n return false;\n }\n return true;\n }\n\n _filter() {\n if (!this.restoringFilter) {\n this.first = 0;\n this.firstChange.emit(this.first);\n }\n\n if (this.lazy) {\n this.onLazyLoad.emit(this.createLazyLoadMetadata());\n }\n else {\n if (!this.value) {\n return;\n }\n\n if (!this.hasFilter()) {\n this.filteredValue = null;\n if (this.paginator) {\n this.totalRecords = this.value ? this.value.length : 0;\n }\n }\n else {\n let globalFilterFieldsArray;\n if (this.filters['global']) {\n if (!this.columns && !this.globalFilterFields)\n throw new Error('Global filtering requires dynamic columns or globalFilterFields to be defined.');\n else\n globalFilterFieldsArray = this.globalFilterFields||this.columns;\n }\n\n this.filteredValue = [];\n\n for (let i = 0; i < this.value.length; i++) {\n let localMatch = true;\n let globalMatch = false;\n let localFiltered = false;\n\n for (let prop in this.filters) {\n if (this.filters.hasOwnProperty(prop) && prop !== 'global') {\n localFiltered = true;\n let filterField = prop;\n let filterMeta = this.filters[filterField];\n\n if (Array.isArray(filterMeta)) {\n for (let meta of filterMeta) {\n localMatch = this.executeLocalFilter(filterField, this.value[i], meta);\n\n if ((meta.operator === FilterOperator.OR && localMatch) || (meta.operator === FilterOperator.AND && !localMatch)) {\n break;\n }\n }\n }\n else {\n localMatch = this.executeLocalFilter(filterField, this.value[i], filterMeta);\n }\n\n if (!localMatch) {\n break;\n }\n }\n }\n\n if (this.filters['global'] && !globalMatch && globalFilterFieldsArray) {\n for(let j = 0; j < globalFilterFieldsArray.length; j++) {\n let globalFilterField = globalFilterFieldsArray[j].field||globalFilterFieldsArray[j];\n globalMatch = this.filterService.filters[( this.filters['global']).matchMode](ObjectUtils.resolveFieldData(this.value[i], globalFilterField), ( this.filters['global']).value, this.filterLocale);\n\n if (globalMatch) {\n break;\n }\n }\n }\n\n let matches: boolean;\n if (this.filters['global']) {\n matches = localFiltered ? (localFiltered && localMatch && globalMatch) : globalMatch;\n }\n else {\n matches = localFiltered && localMatch;\n }\n\n if (matches) {\n this.filteredValue.push(this.value[i]);\n }\n }\n\n if (this.filteredValue.length === this.value.length) {\n this.filteredValue = null;\n }\n\n if (this.paginator) {\n this.totalRecords = this.filteredValue ? this.filteredValue.length : this.value ? this.value.length : 0;\n }\n }\n }\n\n this.onFilter.emit({\n filters: this.filters,\n filteredValue: this.filteredValue || this.value\n });\n\n this.tableService.onValueChange(this.value);\n\n if (this.isStateful() && !this.restoringFilter) {\n this.saveState();\n }\n\n if (this.restoringFilter) {\n this.restoringFilter = false;\n }\n\n this.cd.markForCheck();\n\n if (this.scrollable) {\n this.resetScrollTop();\n }\n }\n\n executeLocalFilter(field: string, rowData: any, filterMeta: FilterMetadata): boolean {\n let filterValue = filterMeta.value;\n let filterMatchMode = filterMeta.matchMode || FilterMatchMode.STARTS_WITH;\n let dataFieldValue = ObjectUtils.resolveFieldData(rowData, field);\n let filterConstraint = this.filterService.filters[filterMatchMode];\n\n return filterConstraint(dataFieldValue, filterValue, this.filterLocale);\n }\n\n hasFilter() {\n let empty = true;\n for (let prop in this.filters) {\n if (this.filters.hasOwnProperty(prop)) {\n empty = false;\n break;\n }\n }\n\n return !empty;\n }\n\n createLazyLoadMetadata(): any {\n return {\n first: this.first,\n rows: this.rows,\n sortField: this.sortField,\n sortOrder: this.sortOrder,\n filters: this.filters,\n globalFilter: this.filters && this.filters['global'] ? ( this.filters['global']).value : null,\n multiSortMeta: this.multiSortMeta\n };\n }\n\n public clear() {\n this._sortField = null;\n this._sortOrder = this.defaultSortOrder;\n this._multiSortMeta = null;\n this.tableService.onSort(null);\n\n this.filteredValue = null;\n this.tableService.onResetChange();\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 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 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.virtualScrollBody) {\n this.virtualScrollBody.scrollToIndex(index);\n }\n }\n\n virtualScrollTimeout: any;\n\n virtualPage: number;\n\n onScrollIndexChange(index: number) {\n if (this.lazy) {\n if (this.virtualScrollTimeout) {\n clearTimeout(this.virtualScrollTimeout);\n }\n\n this.virtualScrollTimeout = setTimeout(() => {\n let page = Math.floor(index / this.rows);\n let virtualScrollOffset = page === 0 ? 0 : (page - 1) * this.rows;\n let virtualScrollChunkSize = page === 0 ? this.rows * 2 : this.rows * 3;\n\n if (page !== this.virtualPage) {\n this.virtualPage = page;\n this.onLazyLoad.emit({\n first: virtualScrollOffset,\n rows: virtualScrollChunkSize,\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 }, this.virtualScrollDelay);\n }\n }\n\n public scrollTo(options) {\n if (this.virtualScrollBody) {\n this.virtualScrollBody.scrollTo(options);\n }\n else {\n if (this.wrapperViewChild.nativeElement.scrollTo) {\n this.wrapperViewChild.nativeElement.scrollTo(options);\n }\n else {\n this.wrapperViewChild.nativeElement.scrollLeft = options.left;\n this.wrapperViewChild.nativeElement.scrollTop = options.top;\n }\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.selfClick && 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 if (this.overlaySubscription) {\n this.overlaySubscription.unsubscribe();\n }\n }\n\n this.selfClick = 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.resizeColumnElement = event.target.parentElement;\n this.columnResizing = true;\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() {\n let delta = this.resizeHelperViewChild.nativeElement.offsetLeft - this.lastResizerHelperX;\n let columnWidth = this.resizeColumnElement.offsetWidth;\n let newColumnWidth = columnWidth + delta;\n let minWidth = this.resizeColumnElement.style.minWidth||15;\n\n if (newColumnWidth >= minWidth) {\n if (this.columnResizeMode === 'fit') {\n let nextColumn = this.resizeColumnElement.nextElementSibling;\n let nextColumnWidth = nextColumn.offsetWidth - delta;\n\n if (newColumnWidth > 15 && nextColumnWidth > 15) {\n if (!this.scrollable) {\n this.resizeColumnElement.style.width = newColumnWidth + 'px';\n if(nextColumn) {\n nextColumn.style.width = nextColumnWidth + 'px';\n }\n }\n else {\n this.resizeTableCells(newColumnWidth, nextColumnWidth);\n }\n }\n }\n else if (this.columnResizeMode === 'expand') {\n let tableWidth = this.tableViewChild.nativeElement.offsetWidth + delta;\n this.tableViewChild.nativeElement.style.minWidth = tableWidth + 'px';\n this.resizeColumnElement.style.width = newColumnWidth + 'px';\n\n if (!this.scrollable)\n this.tableViewChild.nativeElement.style.width = tableWidth + 'px';\n else\n this.resizeTableCells(newColumnWidth, null);\n }\n\n this.onColResize.emit({\n element: this.resizeColumnElement,\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 resizeTableCells(newColumnWidth, nextColumnWidth) {\n let colIndex = DomHandler.index(this.resizeColumnElement);\n let widths = [];\n const tableHead = DomHandler.findSingle(this.containerViewChild.nativeElement, '.p-datatable-thead');\n let headers = DomHandler.find(tableHead, 'tr > th');\n headers.forEach(header => widths.push(DomHandler.getOuterWidth(header)));\n\n this.destroyStyleElement();\n this.createStyleElement();\n\n let innerHTML = '';\n widths.forEach((width,index) => {\n let colWidth = index === colIndex ? newColumnWidth : (nextColumnWidth && index === colIndex + 1) ? nextColumnWidth : width;\n innerHTML += `\n #${this.id}-table > .p-datatable-thead > tr > th:nth-child(${index+1}) {\n flex: 0 0 ${colWidth}px !important;\n }\n\n #${this.id}-table > .p-datatable-tbody > tr > td:nth-child(${index+1}) {\n flex: 0 0 ${colWidth}px !important;\n }\n `\n });\n this.styleElement.innerHTML = innerHTML;\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 storage.setItem(this.stateKey, JSON.stringify(state));\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 const dateFormat = /\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z/;\n const reviver = function(key, value) {\n if (typeof value === \"string\" && dateFormat.test(value)) {\n return new Date(value);\n }\n\n return value;\n }\n\n if (stateString) {\n let state: TableState = JSON.parse(stateString, reviver);\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 > th');\n headers.forEach(header => widths.push(DomHandler.getOuterWidth(header)));\n state.columnWidths = widths.join(',');\n\n if (this.columnResizeMode === 'expand') {\n state.tableWidth = 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 this.tableViewChild.nativeElement.style.width = this.tableWidthState;\n this.tableViewChild.nativeElement.style.minWidth = this.tableWidthState;\n this.containerViewChild.nativeElement.style.width = this.tableWidthState;\n }\n\n this.createStyleElement();\n\n if (this.scrollable && widths && widths.length > 0) {\n let innerHTML = '';\n widths.forEach((width,index) => {\n innerHTML += `\n #${this.id}-table > .p-datatable-thead > tr > th:nth-child(${index+1}) {\n flex: 0 0 ${width}px;\n }\n\n #${this.id}-table > .p-datatable-tbody > tr > td:nth-child(${index+1}) {\n flex: 0 0 ${width}px;\n }\n `\n });\n this.styleElement.innerHTML = innerHTML;\n }\n else {\n DomHandler.find(this.tableViewChild.nativeElement, '.p-datatable-thead > tr > th').forEach((header, index) => {\n header.style.width = widths[index] + 'px';\n });\n }\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 createStyleElement() {\n this.styleElement = document.createElement('style');\n this.styleElement.type = 'text/css';\n document.head.appendChild(this.styleElement);\n }\n\n getGroupRowsMeta() {\n return {field: this.groupRowsBy, order: this.groupRowsByOrder};\n }\n\n createResponsiveStyle() {\n if (!this.responsiveStyleElement) {\n this.responsiveStyleElement = document.createElement('style');\n this.responsiveStyleElement.type = 'text/css';\n document.head.appendChild(this.responsiveStyleElement);\n\n let innerHTML = `\n@media screen and (max-width: ${this.breakpoint}) {\n #${this.id} .p-datatable-thead > tr > th,\n #${this.id} .p-datatable-tfoot > tr > td {\n display: none !important;\n }\n\n #${this.id} .p-datatable-tbody > tr > td {\n display: flex;\n width: 100% !important;\n align-items: center;\n justify-content: space-between;\n }\n\n #${this.id} .p-datatable-tbody > tr > td:not(:last-child) {\n border: 0 none;\n }\n\n #${this.id}.p-datatable-gridlines .p-datatable-tbody > tr > td:last-child {\n border-top: 0;\n border-right: 0;\n border-left: 0;\n }\n\n #${this.id} .p-datatable-tbody > tr > td > .p-column-title {\n display: block;\n }\n}\n`;\n\n this.responsiveStyleElement.innerHTML = innerHTML;\n }\n }\n\n destroyResponsiveStyle() {\n if (this.responsiveStyleElement) {\n document.head.removeChild(this.responsiveStyleElement);\n this.responsiveStyleElement = null;\n }\n }\n\n destroyStyleElement() {\n if (this.styleElement) {\n document.head.removeChild(this.styleElement);\n this.styleElement = null;\n }\n }\n\n ngOnDestroy() {\n this.unbindDocumentEditListener();\n this.editingCell = null;\n this.initialized = null;\n\n if (this.virtualScrollSubscription) {\n this.virtualScrollSubscription.unsubscribe();\n }\n\n this.destroyStyleElement();\n this.destroyResponsiveStyle();\n }\n}\n\n@Component({\n selector: '[pTableBody]',\n template: `\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \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 host: {\n 'class': 'p-element'\n }\n})\nexport class TableBody implements AfterViewInit, OnDestroy {\n\n @Input(\"pTableBody\") columns: any[];\n\n @Input(\"pTableBodyTemplate\") template: TemplateRef;\n\n @Input() get value(): any[] {\n return this._value;\n }\n set value(val: any[]) {\n this._value = val;\n if (this.frozenRows) {\n this.updateFrozenRowStickyPosition();\n }\n\n if (this.dt.scrollable && this.dt.rowGroupMode === 'subheader') {\n this.updateFrozenRowGroupHeaderStickyPosition();\n }\n }\n\n @Input() frozen: boolean;\n\n @Input() frozenRows: boolean;\n\n subscription: Subscription;\n\n _value: any[];\n\n ngAfterViewInit() {\n if (this.frozenRows) {\n this.updateFrozenRowStickyPosition();\n }\n\n if (this.dt.scrollable && this.dt.rowGroupMode === 'subheader') {\n this.updateFrozenRowGroupHeaderStickyPosition();\n }\n }\n\n constructor(public dt: Table, public tableService: TableService, public cd: ChangeDetectorRef, public el: ElementRef) {\n this.subscription = this.dt.tableService.valueSource$.subscribe(() => {\n if (this.dt.virtualScroll) {\n this.cd.detectChanges();\n }\n });\n }\n\n shouldRenderRowGroupHeader(value, rowData, i) {\n let currentRowFieldData = ObjectUtils.resolveFieldData(rowData, this.dt.groupRowsBy);\n let prevRowData = value[i - 1];\n if (prevRowData) {\n let previousRowFieldData = ObjectUtils.resolveFieldData(prevRowData, this.dt.groupRowsBy);\n return currentRowFieldData !== previousRowFieldData;\n }\n else {\n return true;\n }\n }\n\n shouldRenderRowGroupFooter(value, rowData, i) {\n let currentRowFieldData = ObjectUtils.resolveFieldData(rowData, this.dt.groupRowsBy);\n let nextRowData = value[i + 1];\n if (nextRowData) {\n let nextRowFieldData = ObjectUtils.resolveFieldData(nextRowData, this.dt.groupRowsBy);\n return currentRowFieldData !== nextRowFieldData;\n }\n else {\n return true;\n }\n }\n\n shouldRenderRowspan(value, rowData, i) {\n let currentRowFieldData = ObjectUtils.resolveFieldData(rowData, this.dt.groupRowsBy);\n let prevRowData = value[i - 1];\n if (prevRowData) {\n let previousRowFieldData = ObjectUtils.resolveFieldData(prevRowData, this.dt.groupRowsBy);\n return currentRowFieldData !== previousRowFieldData;\n }\n else {\n return true;\n }\n }\n\n calculateRowGroupSize(value, rowData, index) {\n let currentRowFieldData = ObjectUtils.resolveFieldData(rowData, this.dt.groupRowsBy);\n let nextRowFieldData = currentRowFieldData;\n let groupRowSpan = 0;\n\n while (currentRowFieldData === nextRowFieldData) {\n groupRowSpan++;\n let nextRowData = value[++index];\n if (nextRowData) {\n nextRowFieldData = ObjectUtils.resolveFieldData(nextRowData, this.dt.groupRowsBy);\n }\n else {\n break;\n }\n }\n\n return groupRowSpan === 1 ? null : groupRowSpan;\n }\n\n ngOnDestroy() {\n if (this.subscription) {\n this.subscription.unsubscribe();\n }\n }\n\n updateFrozenRowStickyPosition() {\n this.el.nativeElement.style.top = DomHandler.getOuterHeight(this.el.nativeElement.previousElementSibling) + 'px';\n }\n\n updateFrozenRowGroupHeaderStickyPosition() {\n if (this.el.nativeElement.previousElementSibling) {\n let tableHeaderHeight = DomHandler.getOuterHeight(this.el.nativeElement.previousElementSibling);\n this.dt.rowGroupHeaderStyleObject.top = tableHeaderHeight + 'px';\n }\n }\n}\n\n@Directive({\n selector: '[pRowGroupHeader]',\n host: {\n 'class': 'p-rowgroup-header p-element',\n '[style.top]': \"getFrozenRowGroupHeaderStickyPosition\"\n }\n})\nexport class RowGroupHeader {\n\n constructor(public dt: Table) { }\n\n get getFrozenRowGroupHeaderStickyPosition() {\n return this.dt.rowGroupHeaderStyleObject ? this.dt.rowGroupHeaderStyleObject.top : '';\n }\n }\n\n@Directive({\n selector: '[pFrozenColumn]',\n host: {\n 'class': 'p-element',\n '[class.p-frozen-column]': 'frozen'\n }\n})\nexport class FrozenColumn implements AfterViewInit {\n\n @Input() get frozen(): boolean {\n return this._frozen;\n }\n\n set frozen(val: boolean) {\n this._frozen = val;\n this.updateStickyPosition();\n }\n\n @Input() alignFrozen: string = \"left\";\n\n constructor(private el: ElementRef) { }\n\n ngAfterViewInit() {\n this.updateStickyPosition();\n }\n\n _frozen: boolean = true;\n\n updateStickyPosition() {\n if (this._frozen) {\n if (this.alignFrozen === 'right') {\n let right = 0;\n let next = this.el.nativeElement.nextElementSibling;\n if (next) {\n right = DomHandler.getOuterWidth(next) + parseFloat(next.style.right);\n }\n this.el.nativeElement.style.right = right + 'px';\n }\n else {\n let left = 0;\n let prev = this.el.nativeElement.previousElementSibling;\n if (prev) {\n left = DomHandler.getOuterWidth(prev) + parseFloat(prev.style.left);\n }\n this.el.nativeElement.style.left = left + 'px';\n }\n\n let filterRow = this.el.nativeElement.parentElement.nextElementSibling;\n\n if (filterRow) {\n let index = DomHandler.index(this.el.nativeElement);\n if (filterRow.children && filterRow.children[index]) {\n filterRow.children[index].style.left = this.el.nativeElement.style.left;\n filterRow.children[index].style.right = this.el.nativeElement.style.right;\n }\n }\n }\n }\n}\n@Directive({\n selector: '[pSortableColumn]',\n host: {\n 'class': 'p-element',\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 {{getBadgeValue()}}\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n 'class': 'p-element'\n }\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 getMultiSortMetaIndex() {\n let multiSortMeta = this.dt._multiSortMeta;\n let index = -1;\n\n if (multiSortMeta && this.dt.sortMode === 'multiple' && (this.dt.showInitialSortBadge || multiSortMeta.length > 1)) {\n\n for (let i = 0; i < multiSortMeta.length; i++) {\n let meta = multiSortMeta[i];\n if (meta.field === this.field || meta.field === this.field) {\n index = i;\n break;\n }\n }\n }\n\n return index;\n }\n\n getBadgeValue() {\n let index = this.getMultiSortMetaIndex();\n\n return this.dt.groupRowsBy && index > -1 ? index : index + 1;\n }\n\n isMultiSorted() {\n return this.dt.sortMode === 'multiple' && this.getMultiSortMetaIndex() > -1;\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-element',\n '[class.p-selectable-row]': 'isEnabled()',\n '[class.p-highlight]': 'selected',\n '[attr.tabindex]': 'isEnabled() ? 0 : undefined'\n }\n})\nexport class SelectableRow implements OnInit, OnDestroy {\n\n @Input(\"pSelectableRow\") data: any;\n\n @Input(\"pSelectableRowIndex\") index: number;\n\n @Input() pSelectableRowDisabled: boolean;\n\n selected: boolean;\n\n subscription: Subscription;\n\n constructor(public dt: Table, public tableService: TableService) {\n if (this.isEnabled()) {\n this.subscription = this.dt.tableService.selectionSource$.subscribe(() => {\n this.selected = this.dt.isSelected(this.data);\n });\n }\n }\n\n ngOnInit() {\n if (this.isEnabled()) {\n this.selected = this.dt.isSelected(this.data);\n }\n }\n\n @HostListener('click', ['$event'])\n onClick(event: Event) {\n if (this.isEnabled()) {\n this.dt.handleRowClick({\n originalEvent: event,\n rowData: this.data,\n rowIndex: this.index\n });\n }\n }\n\n @HostListener('touchend', ['$event'])\n onTouchEnd(event: Event) {\n if (this.isEnabled()) {\n this.dt.handleRowTouchEnd(event);\n }\n }\n\n @HostListener('keydown.arrowdown', ['$event'])\n onArrowDownKeyDown(event: KeyboardEvent) {\n if (!this.isEnabled()) {\n return;\n }\n\n const row = event.currentTarget;\n const nextRow = this.findNextSelectableRow(row);\n\n if (nextRow) {\n nextRow.focus();\n }\n\n event.preventDefault();\n }\n\n @HostListener('keydown.arrowup', ['$event'])\n onArrowUpKeyDown(event: KeyboardEvent) {\n if (!this.isEnabled()) {\n return;\n }\n\n const row = event.currentTarget;\n const prevRow = this.findPrevSelectableRow(row);\n\n if (prevRow) {\n prevRow.focus();\n }\n\n event.preventDefault();\n }\n\n @HostListener('keydown.enter', ['$event'])\n @HostListener('keydown.shift.enter', ['$event'])\n @HostListener('keydown.meta.enter', ['$event'])\n onEnterKeyDown(event: KeyboardEvent) {\n if (!this.isEnabled()) {\n return;\n }\n\n this.dt.handleRowClick({\n originalEvent: event,\n rowData: this.data,\n rowIndex: this.index\n });\n }\n\n @HostListener('keydown.pagedown')\n @HostListener('keydown.pageup')\n @HostListener('keydown.home')\n @HostListener('keydown.end')\n onPageDownKeyDown() {\n if (this.dt.virtualScroll) {\n this.dt.virtualScrollBody.elementRef.nativeElement.focus();\n }\n }\n\n @HostListener('keydown.space')\n onSpaceKeydown() {\n if (this.dt.virtualScroll && !this.dt.editingCell) {\n this.dt.virtualScrollBody.elementRef.nativeElement.focus();\n }\n }\n\n findNextSelectableRow(row: HTMLTableRowElement): HTMLTableRowElement {\n let nextRow = row.nextElementSibling;\n if (nextRow) {\n if (DomHandler.hasClass(nextRow, 'p-selectable-row'))\n return nextRow;\n else\n return this.findNextSelectableRow(nextRow);\n }\n else {\n return null;\n }\n }\n\n findPrevSelectableRow(row: HTMLTableRowElement): HTMLTableRowElement {\n let prevRow = row.previousElementSibling;\n if (prevRow) {\n if (DomHandler.hasClass(prevRow, 'p-selectable-row'))\n return prevRow;\n else\n return this.findPrevSelectableRow(prevRow);\n }\n else {\n return null;\n }\n }\n\n isEnabled() {\n return this.pSelectableRowDisabled !== true;\n }\n\n ngOnDestroy() {\n if (this.subscription) {\n this.subscription.unsubscribe();\n }\n }\n\n}\n\n@Directive({\n selector: '[pSelectableRowDblClick]',\n host: {\n 'class': 'p-element',\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-element',\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 host: {\n 'class': 'p-element'\n }\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 host: {\n 'class': 'p-element'\n }\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();\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 host: {\n 'class': 'p-element'\n }\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 host: {\n 'class': 'p-element'\n }\n})\nexport class EditableColumn implements AfterViewInit, OnDestroy {\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 overlayEventListener;\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.selfClick = 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 this.overlayEventListener = (e) => {\n if (this.el && this.el.nativeElement.contains(e.target)) {\n this.dt.selfClick = true;\n }\n }\n\n this.dt.overlaySubscription = this.dt.overlayService.clickObservable.subscribe(this.overlayEventListener);\n }\n\n closeEditingCell(completed, event) {\n if (completed)\n this.dt.onEditComplete.emit({field: this.dt.editingCellField, data: this.dt.editingCellData, originalEvent: event, index: this.dt.editingCellRowIndex});\n else\n this.dt.onEditCancel.emit({field: this.dt.editingCellField, data: this.dt.editingCellData, originalEvent: event, index: this.dt.editingCellRowIndex});\n\n DomHandler.removeClass(this.dt.editingCell, 'p-cell-editing');\n this.dt.editingCell = null;\n this.dt.editingCellData = null;\n this.dt.editingCellField = null;\n this.dt.unbindDocumentEditListener();\n\n if (this.dt.overlaySubscription) {\n this.dt.overlaySubscription.unsubscribe();\n }\n }\n\n @HostListener('keydown.enter', ['$event'])\n onEnterKeyDown(event: KeyboardEvent) {\n if (this.isEnabled()) {\n if (this.dt.isEditingCellValid()) {\n this.closeEditingCell(true, event);\n }\n\n event.preventDefault();\n }\n }\n\n @HostListener('keydown.escape', ['$event'])\n onEscapeKeyDown(event: KeyboardEvent) {\n if (this.isEnabled()) {\n if (this.dt.isEditingCellValid()) {\n this.closeEditingCell(false, event);\n }\n\n event.preventDefault();\n }\n }\n\n @HostListener('keydown.tab', ['$event'])\n @HostListener('keydown.shift.tab', ['$event'])\n @HostListener('keydown.meta.tab', ['$event'])\n onShiftKeyDown(event: KeyboardEvent) {\n if (this.isEnabled()) {\n if (event.shiftKey)\n this.moveToPreviousCell(event);\n else{\n this.moveToNextCell(event);\n }\n }\n }\n @HostListener('keydown.arrowdown', ['$event'])\n onArrowDown(event: KeyboardEvent) {\n if (this.isEnabled()) {\n let currentCell = this.findCell(event.target);\n if (currentCell) {\n let cellIndex = DomHandler.index(currentCell);\n let targetCell = this.findNextEditableColumnByIndex(currentCell, cellIndex);\n\n if (targetCell) {\n if (this.dt.isEditingCellValid()) {\n this.closeEditingCell(true, event);\n }\n\n DomHandler.invokeElementMethod(event.target, 'blur');\n DomHandler.invokeElementMethod(targetCell, 'click');\n }\n\n event.preventDefault();\n }\n }\n }\n\n @HostListener('keydown.arrowup', ['$event'])\n onArrowUp(event: KeyboardEvent) {\n if (this.isEnabled()) {\n let currentCell = this.findCell(event.target);\n if (currentCell) {\n let cellIndex = DomHandler.index(currentCell);\n let targetCell = this.findPrevEditableColumnByIndex(currentCell, cellIndex);\n\n if (targetCell) {\n if (this.dt.isEditingCellValid()) {\n this.closeEditingCell(true, event);\n }\n\n DomHandler.invokeElementMethod(event.target, 'blur');\n DomHandler.invokeElementMethod(targetCell, 'click');\n }\n\n event.preventDefault();\n }\n }\n }\n\n @HostListener('keydown.arrowleft', ['$event'])\n onArrowLeft(event: KeyboardEvent) {\n if (this.isEnabled()) {\n this.moveToPreviousCell(event);\n }\n }\n\n @HostListener('keydown.arrowright', ['$event'])\n onArrowRight(event: KeyboardEvent) {\n if (this.isEnabled()) {\n this.moveToNextCell(event);\n }\n }\n\n findCell(element) {\n if (element) {\n let cell = element;\n while (cell && !DomHandler.hasClass(cell, 'p-cell-editing')) {\n cell = cell.parentElement;\n }\n\n return cell;\n }\n else {\n return null;\n }\n }\n\n moveToPreviousCell(event: KeyboardEvent) {\n let currentCell = this.findCell(event.target);\n if (currentCell) {\n let targetCell = this.findPreviousEditableColumn(currentCell);\n\n if (targetCell) {\n if (this.dt.isEditingCellValid()) {\n this.closeEditingCell(true, event);\n }\n\n DomHandler.invokeElementMethod(event.target, 'blur');\n DomHandler.invokeElementMethod(targetCell, 'click');\n event.preventDefault();\n }\n }\n }\n\n moveToNextCell(event: KeyboardEvent) {\n let currentCell = this.findCell(event.target);\n if (currentCell) {\n let targetCell = this.findNextEditableColumn(currentCell);\n\n if (targetCell) {\n if (this.dt.isEditingCellValid()) {\n this.closeEditingCell(true, event);\n }\n\n DomHandler.invokeElementMethod(event.target, 'blur');\n DomHandler.invokeElementMethod(targetCell, 'click');\n event.preventDefault();\n }\n }\n }\n\n findPreviousEditableColumn(cell: Element) {\n let prevCell = cell.previousElementSibling;\n\n if (!prevCell) {\n let previousRow = cell.parentElement.previousElementSibling;\n if (previousRow) {\n prevCell = previousRow.lastElementChild;\n }\n }\n\n if (prevCell) {\n if (DomHandler.hasClass(prevCell, 'p-editable-column'))\n return prevCell;\n else\n return this.findPreviousEditableColumn(prevCell);\n }\n else {\n return null;\n }\n }\n\n findNextEditableColumn(cell: Element) {\n let nextCell = cell.nextElementSibling;\n\n if (!nextCell) {\n let nextRow = cell.parentElement.nextElementSibling;\n if (nextRow) {\n nextCell = nextRow.firstElementChild;\n }\n }\n\n if (nextCell) {\n if (DomHandler.hasClass(nextCell, 'p-editable-column'))\n return nextCell;\n else\n return this.findNextEditableColumn(nextCell);\n }\n else {\n return null;\n }\n }\n\n findNextEditableColumnByIndex(cell: Element, index: number) {\n let nextRow = cell.parentElement.nextElementSibling;\n\n if (nextRow) {\n let nextCell = nextRow.children[index];\n\n if (nextCell && DomHandler.hasClass(nextCell, 'p-editable-column')) {\n return nextCell;\n }\n\n return null;\n }\n else {\n return null;\n }\n }\n\n findPrevEditableColumnByIndex(cell: Element, index: number) {\n let prevRow = cell.parentElement.previousElementSibling;\n\n if (prevRow) {\n let prevCell = prevRow.children[index];\n\n if (prevCell && DomHandler.hasClass(prevCell, 'p-editable-column')) {\n return prevCell;\n }\n\n return null;\n }\n else {\n return null;\n }\n }\n\n isEnabled() {\n return this.pEditableColumnDisabled !== true;\n }\n\n ngOnDestroy() {\n if (this.dt.overlaySubscription) {\n this.dt.overlaySubscription.unsubscribe();\n }\n }\n\n}\n\n@Directive({\n selector: '[pEditableRow]',\n host: {\n 'class': 'p-element'\n }\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 host: {\n 'class': 'p-element'\n }\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 host: {\n 'class': 'p-element'\n }\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 host: {\n 'class': 'p-element'\n }\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 host: {\n 'class': 'p-element'\n }\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 host: {\n 'class': 'p-element'\n }\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 host: {\n 'class': 'p-element'\n }\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 host: {\n 'class': 'p-element'\n }\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 if (this.dt.filteredValue && !this.dt.lazy) {\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 const length = this.dt.lazy ? this.dt._totalRecords : val ? val.length : 0;\n return (val && length > 0 && this.dt.selection && this.dt.selection.length > 0 && this.dt.selection.length === 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 host: {\n 'class': 'p-element'\n }\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 host: {\n 'class': 'p-element'\n }\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 host: {\n 'class': 'p-element'\n }\n})\nexport class ColumnFilterFormElement implements OnInit {\n\n @Input() field: string;\n\n @Input() type: string;\n\n @Input() filterConstraint: FilterMetadata;\n\n @Input() filterTemplate: TemplateRef;\n\n @Input() placeholder: string;\n\n @Input() minFractionDigits: number\n\n @Input() maxFractionDigits: number;\n\n @Input() prefix: string;\n\n @Input() suffix: string;\n\n @Input() locale: string;\n\n @Input() localeMatcher: string;\n\n @Input() currency: string;\n\n @Input() currencyDisplay: string;\n\n @Input() useGrouping: boolean = true;\n\n filterCallback: Function;\n\n constructor(public dt: Table) {}\n\n ngOnInit() {\n this.filterCallback = value => {\n this.filterConstraint.value = value;\n this.dt._filter();\n };\n }\n\n onModelChange(value: any) {\n this.filterConstraint.value = value;\n\n if (this.type === 'boolean' || value === '') {\n this.dt._filter();\n }\n }\n\n onTextInputEnterKeyDown(event: KeyboardEvent) {\n this.dt._filter();\n event.preventDefault();\n }\n\n onNumericInputKeyDown(event: KeyboardEvent) {\n if (event.key === 'Enter') {\n this.dt._filter();\n event.preventDefault();\n }\n }\n}\n\n@Component({\n selector: 'p-columnFilter',\n template: `\n
\n \n \n \n
\n \n
    \n
  • {{matchMode.label}}
  • \n
  • \n
  • {{noFilterLabel}}
  • \n
\n \n
\n \n
\n
\n
\n \n \n
\n \n
\n
\n
\n
\n \n
\n
\n \n \n
\n
\n \n
\n
\n `,\n animations: [\n trigger('overlayAnimation', [\n transition(':enter', [\n style({opacity: 0, transform: 'scaleY(0.8)'}),\n animate('.12s cubic-bezier(0, 0, 0.2, 1)')\n ]),\n transition(':leave', [\n animate('.1s linear', style({ opacity: 0 }))\n ])\n ])\n ],\n encapsulation: ViewEncapsulation.None,\n host: {\n 'class': 'p-element'\n }\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() hideOnClear: boolean = false;\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, public overlayService: OverlayService) {}\n\n overlaySubscription: Subscription;\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 resetSubscription: Subscription;\n\n selfClick: boolean;\n\n overlayEventListener;\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.resetSubscription = this.dt.tableService.resetSource$.subscribe(() => {\n this.clearFilter();\n })\n\n this.generateMatchModeOptions();\n this.generateOperatorOptions();\n }\n\n generateMatchModeOptions() {\n this.matchModes = this.matchModeOptions ||\n this.config.filterMatchModeOptions[this.type]?.map(key => {\n return {label: this.config.getTranslation(key), value: key}\n });\n }\n\n generateOperatorOptions() {\n this.operatorOptions = [\n {label: this.config.getTranslation(TranslationKeys.MATCH_ALL), value: FilterOperator.AND},\n {label: this.config.getTranslation(TranslationKeys.MATCH_ANY), value: FilterOperator.OR}\n ];\n }\n\n ngAfterContentInit() {\n this.templates.forEach((item) => {\n switch(item.getType()) {\n case 'header':\n this.headerTemplate = item.template;\n break;\n\n case 'filter':\n this.filterTemplate = item.template;\n break;\n\n case 'footer':\n this.footerTemplate = item.template;\n break;\n\n default:\n this.filterTemplate = item.template;\n break;\n }\n });\n }\n\n initFieldFilterConstraint() {\n let defaultMatchMode = this.getDefaultMatchMode();\n this.dt.filters[this.field] = this.display == 'row' ? {value: null, matchMode: defaultMatchMode} : [{value: null, matchMode: defaultMatchMode, operator: this.operator}];\n }\n\n onMenuMatchModeChange(value: any, filterMeta: FilterMetadata) {\n filterMeta.matchMode = value;\n\n if (!this.showApplyButton) {\n this.dt._filter();\n }\n }\n\n onRowMatchModeChange(matchMode: string) {\n ( this.dt.filters[this.field]).matchMode = matchMode;\n this.dt._filter();\n this.hide();\n }\n\n onRowMatchModeKeyDown(event: KeyboardEvent) {\n let item = event.target;\n\n switch(event.key) {\n case 'ArrowDown':\n var nextItem = this.findNextItem(item);\n if (nextItem) {\n item.removeAttribute('tabindex');\n nextItem.tabIndex = '0';\n nextItem.focus();\n }\n\n event.preventDefault();\n break;\n\n case 'ArrowUp':\n var prevItem = this.findPrevItem(item);\n if (prevItem) {\n item.removeAttribute('tabindex');\n prevItem.tabIndex = '0';\n prevItem.focus();\n }\n\n event.preventDefault();\n break;\n }\n }\n\n onRowClearItemClick() {\n this.clearFilter();\n this.hide();\n }\n\n isRowMatchModeSelected(matchMode: string) {\n return ( this.dt.filters[this.field]).matchMode === matchMode;\n }\n\n addConstraint() {\n ( this.dt.filters[this.field]).push({value: null, matchMode: this.getDefaultMatchMode(), operator: this.getDefaultOperator()});\n this.dt._filter();\n }\n\n removeConstraint(filterMeta: FilterMetadata) {\n this.dt.filters[this.field] = ( this.dt.filters[this.field]).filter(meta => meta !== filterMeta);\n this.dt._filter();\n }\n\n onOperatorChange(value) {\n ( this.dt.filters[this.field]).forEach(filterMeta => {\n filterMeta.operator = value;\n this.operator = value;\n });\n\n if (!this.showApplyButton) {\n this.dt._filter();\n }\n }\n\n toggleMenu() {\n this.overlayVisible = !this.overlayVisible;\n }\n\n onToggleButtonKeyDown(event: KeyboardEvent) {\n switch(event.key) {\n case 'Escape':\n case 'Tab':\n this.overlayVisible = false;\n break;\n\n case 'ArrowDown':\n if (this.overlayVisible) {\n let focusable = DomHandler.getFocusableElements(this.overlay);\n if (focusable) {\n focusable[0].focus();\n }\n event.preventDefault();\n }\n else if (event.altKey) {\n this.overlayVisible = true;\n event.preventDefault();\n }\n break;\n }\n }\n\n onEscape() {\n this.overlayVisible = false;\n this.icon.nativeElement.focus();\n }\n\n findNextItem(item: HTMLLIElement) {\n let nextItem = item.nextElementSibling;\n\n if (nextItem)\n return DomHandler.hasClass(nextItem, 'p-column-filter-separator') ? this.findNextItem(nextItem) : nextItem;\n else\n return item.parentElement.firstElementChild;\n }\n\n findPrevItem(item: HTMLLIElement) {\n let prevItem = item.previousElementSibling;\n\n if (prevItem)\n return DomHandler.hasClass(prevItem, 'p-column-filter-separator') ? this.findPrevItem(prevItem) : prevItem;\n else\n return item.parentElement.lastElementChild;\n }\n\n onContentClick() {\n this.selfClick = true;\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 ZIndexUtils.set('overlay', this.overlay, this.config.zIndex.overlay);\n DomHandler.absolutePosition(this.overlay, this.icon.nativeElement)\n this.bindDocumentClickListener();\n this.bindDocumentResizeListener();\n this.bindScrollListener();\n\n this.overlayEventListener = (e) => {\n if (this.overlay && this.overlay.contains(e.target)) {\n this.selfClick = true;\n }\n }\n\n this.overlaySubscription = this.overlayService.clickObservable.subscribe(this.overlayEventListener);\n break;\n\n case 'void':\n this.onOverlayHide();\n\n if (this.overlaySubscription) {\n this.overlaySubscription.unsubscribe();\n }\n break;\n }\n }\n\n onOverlayAnimationEnd(event: AnimationEvent) {\n switch (event.toState) {\n case 'void':\n ZIndexUtils.clear(event.element);\n break;\n }\n }\n\n getDefaultMatchMode(): string {\n if (this.matchMode) {\n return this.matchMode;\n }\n else {\n if (this.type === 'text')\n return FilterMatchMode.STARTS_WITH;\n else if (this.type === 'numeric')\n return FilterMatchMode.EQUALS;\n else if (this.type === 'date')\n return FilterMatchMode.DATE_IS;\n else\n return FilterMatchMode.CONTAINS;\n }\n }\n\n getDefaultOperator(): string {\n return this.dt.filters ? ( this.dt.filters[this.field])[0].operator: this.operator;\n }\n\n hasRowFilter() {\n return this.dt.filters[this.field] && !this.dt.isFilterBlank((this.dt.filters[this.field]).value);\n }\n\n get fieldConstraints(): FilterMetadata[] {\n return this.dt.filters ? this.dt.filters[this.field] : null;\n }\n\n get showRemoveIcon(): boolean {\n return this.fieldConstraints ? this.fieldConstraints.length > 1 : false;\n }\n\n get showMenuButton(): boolean {\n return this.showMenu && (this.display === 'row' ? this.type !== 'boolean': true);\n }\n\n get isShowOperator(): boolean {\n return this.showOperator && this.type !== 'boolean';\n }\n\n get isShowAddConstraint(): boolean {\n return this.showAddButton && this.type !== 'boolean' && (this.fieldConstraints && this.fieldConstraints.length < this.maxConstraints);\n }\n\n get applyButtonLabel(): string {\n return this.config.getTranslation(TranslationKeys.APPLY);\n }\n\n get clearButtonLabel(): string {\n return this.config.getTranslation(TranslationKeys.CLEAR);\n }\n\n get addRuleButtonLabel(): string {\n return this.config.getTranslation(TranslationKeys.ADD_RULE);\n }\n\n get removeRuleButtonLabel(): string {\n return this.config.getTranslation(TranslationKeys.REMOVE_RULE);\n }\n\n get noFilterLabel(): string {\n return this.config.getTranslation(TranslationKeys.NO_FILTER);\n }\n\n hasFilter(): boolean {\n let fieldFilter = this.dt.filters[this.field];\n if (fieldFilter) {\n if (Array.isArray(fieldFilter))\n return !this.dt.isFilterBlank(( fieldFilter)[0].value);\n else\n return !this.dt.isFilterBlank(fieldFilter.value);\n }\n\n return false;\n }\n\n isOutsideClicked(event): boolean {\n return !(this.overlay.isSameNode(event.target) || this.overlay.contains(event.target)\n || this.icon.nativeElement.isSameNode(event.target) || this.icon.nativeElement.contains(event.target)\n || DomHandler.hasClass(event.target, 'p-column-filter-add-button') || DomHandler.hasClass(event.target.parentElement, 'p-column-filter-add-button')\n || DomHandler.hasClass(event.target, 'p-column-filter-remove-button') || DomHandler.hasClass(event.target.parentElement, 'p-column-filter-remove-button'));\n }\n\n bindDocumentClickListener() {\n if (!this.documentClickListener) {\n const documentTarget: any = this.el ? this.el.nativeElement.ownerDocument : 'document';\n\n this.documentClickListener = this.renderer.listen(documentTarget, 'mousedown', event => {\n if (this.overlayVisible && !this.selfClick && this.isOutsideClicked(event)) {\n this.hide();\n }\n\n this.selfClick = false;\n });\n }\n }\n\n unbindDocumentClickListener() {\n if (this.documentClickListener) {\n this.documentClickListener();\n this.documentClickListener = null;\n this.selfClick = false;\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 if (this.hideOnClear)\n this.hide();\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 ZIndexUtils.clear(this.overlay);\n this.onOverlayHide();\n }\n\n if (this.translationSubscription) {\n this.translationSubscription.unsubscribe();\n }\n\n if (this.resetSubscription) {\n this.resetSubscription.unsubscribe();\n }\n\n if (this.overlaySubscription) {\n this.overlaySubscription.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,FrozenColumn,RowGroupHeader,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,FrozenColumn,RowGroupHeader,SelectableRow,RowToggler,ContextMenuRow,ResizableColumn,ReorderableColumn,EditableColumn,CellEditor,TableBody,SortIcon,\n TableRadioButton,TableCheckbox,TableHeaderCheckbox,ReorderableRowHandle,ReorderableRow,SelectableRowDblClick,EditableRow,InitEditableRow,SaveEditableRow,CancelEditableRow,ColumnFilter,ColumnFilterFormElement]\n})\nexport class TableModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAyBa,YAAY;IADzB;QAGY,eAAU,GAAG,IAAI,OAAO,EAAuB,CAAC;QAChD,oBAAe,GAAG,IAAI,OAAO,EAAE,CAAC;QAChC,sBAAiB,GAAG,IAAI,OAAO,EAAO,CAAC;QACvC,gBAAW,GAAG,IAAI,OAAO,EAAO,CAAC;QACjC,uBAAkB,GAAG,IAAI,OAAO,EAAO,CAAC;QACxC,kBAAa,GAAG,IAAI,OAAO,EAAE,CAAC;QAC9B,gBAAW,GAAG,IAAI,OAAO,EAAE,CAAC;QAEpC,gBAAW,GAAG,IAAI,CAAC,UAAU,CAAC,YAAY,EAAE,CAAC;QAC7C,qBAAgB,GAAG,IAAI,CAAC,eAAe,CAAC,YAAY,EAAE,CAAC;QACvD,uBAAkB,GAAG,IAAI,CAAC,iBAAiB,CAAC,YAAY,EAAE,CAAC;QAC3D,iBAAY,GAAG,IAAI,CAAC,WAAW,CAAC,YAAY,EAAE,CAAC;QAC/C,wBAAmB,GAAG,IAAI,CAAC,kBAAkB,CAAC,YAAY,EAAE,CAAC;QAC7D,mBAAc,GAAG,IAAI,CAAC,aAAa,CAAC,YAAY,EAAE,CAAC;QACnD,iBAAY,GAAG,IAAI,CAAC,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