cats-data-grid 2.0.65 → 2.0.66

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"cats-data-grid.mjs","sources":["../../../projects/cats-data-grid/src/lib/services/cats-data-grid.service.ts","../../../projects/cats-data-grid/src/lib/pipes/add-class.pipe.ts","../../../projects/cats-data-grid/src/lib/directives/outside-click.directive.ts","../../../projects/cats-data-grid/src/lib/directives/renderer-parser.directive.ts","../../../projects/cats-data-grid/src/lib/common-components/common-input/common-input.component.ts","../../../projects/cats-data-grid/src/lib/common-components/common-input/common-input.component.html","../../../projects/cats-data-grid/src/lib/directives/adaptive-position.directive.ts","../../../projects/cats-data-grid/src/lib/common-components/common-calendar/common-calendar.component.ts","../../../projects/cats-data-grid/src/lib/common-components/common-calendar/common-calendar.component.html","../../../projects/cats-data-grid/src/lib/cats-data-grid.component.ts","../../../projects/cats-data-grid/src/lib/cats-data-grid.component.html","../../../projects/cats-data-grid/src/lib/renderers/common-renderer/common-renderer.component.ts","../../../projects/cats-data-grid/src/lib/renderers/common-renderer/common-renderer.component.html","../../../projects/cats-data-grid/src/lib/common-components/tooltip/tooltip.component.ts","../../../projects/cats-data-grid/src/lib/directives/tooltip.directive.ts","../../../projects/cats-data-grid/src/lib/common-components/common-tree-table/common-tree-table.component.ts","../../../projects/cats-data-grid/src/lib/common-components/common-tree-table/common-tree-table.component.html","../../../projects/cats-data-grid/src/public-api.ts","../../../projects/cats-data-grid/src/cats-data-grid.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CatsDataGridService {\n\n constructor() { }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'addClass'\n})\nexport class AddClassPipe implements PipeTransform {\n\n transform(value: any, context: any): string {\n if (context?.addClasses) {\n return context.addClasses(value)\n }\n else if(context?.cellValueClass) {\n return context.cellValueClass(value)\n }\n return '';\n }\n\n}\n","import {\n Directive,\n ElementRef,\n EventEmitter,\n HostListener,\n OnDestroy,\n OnInit,\n Output,\n} from '@angular/core';\n\n@Directive({\n selector: '[appOutsideClick]',\n standalone: true,\n})\nexport class OutsideClickDirective implements OnInit, OnDestroy {\n @Output() clickOutside = new EventEmitter();\n constructor(private elementRef: ElementRef) {}\n private onClick = (event: MouseEvent) => {\n const target = event.target as HTMLElement;\n if (!this.elementRef.nativeElement.contains(target)) {\n this.clickOutside.emit(event);\n }\n };\n\n ngOnInit() {\n document.addEventListener('click', this.onClick, true);\n }\n\n ngOnDestroy() {\n document.removeEventListener('click', this.onClick, true);\n }\n}\n","import {\n Component,\n Directive,\n ElementRef,\n Input,\n OnInit,\n ViewContainerRef,\n} from '@angular/core';\n\n@Directive({\n selector: '[appRendererParser]',\n})\nexport class RendererParserDirective implements OnInit {\n @Input() rowParam: any;\n @Input() col: any;\n @Input() api: any;\n @Input() currentValue: any;\n ref: any;\n constructor(private el: ViewContainerRef, private er: ElementRef) {}\n ngOnInit() {\n this.el?.clear();\n let params: any = {\n data: this.rowParam,\n value: this.currentValue,\n cellParams: this.col?.cellRendererParams,\n col: this.col,\n };\n if (\n this.col?.cellRenderer?.prototype &&\n this.col.cellRenderer.prototype?.constructor == this.col.cellRenderer\n ) {\n this.ref = this.el.createComponent(this.col?.cellRenderer);\n this.ref.instance?.cellInit(params, this.api);\n this.ref.location.nativeElement.style.width = '100%';\n } else if (typeof this.col?.cellRenderer == 'function') {\n let newDiv = document.createElement('div');\n newDiv.className = 'more_data_wrapper';\n newDiv.innerHTML = this.col.cellRenderer(params);\n let toltipDiv = document.createElement('div');\n let itemDiv = document.createElement('div');\n let descDiv = document.createElement('div');\n toltipDiv.className = 'see_more_data';\n itemDiv.className = 'item';\n descDiv.className = 'desc';\n descDiv.innerHTML = newDiv.innerText;\n itemDiv.appendChild(descDiv);\n toltipDiv.appendChild(itemDiv);\n this.er.nativeElement.appendChild(newDiv);\n this.er.nativeElement.appendChild(toltipDiv);\n }\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n Component,\n EventEmitter,\n HostListener,\n Input,\n Output,\n} from '@angular/core';\n\n@Component({\n selector: 'lib-common-input',\n imports: [CommonModule],\n templateUrl: './common-input.component.html',\n styleUrl: './common-input.component.scss',\n})\nexport class CommonInputComponent {\n @Input() options: { label: string; value: any }[] = [];\n @Input() selectedValue: any;\n @Input() placeholder = 'Select';\n @Input() elementType = 'dropdown';\n\n @Output() valueChange = new EventEmitter<any>();\n\n showDropdown = false;\n\n toggleDropdown(): void {\n this.showDropdown = !this.showDropdown;\n }\n\n selectOption(option: any): void {\n this.selectedValue = option.value;\n this.valueChange.emit(option.value);\n this.showDropdown = false;\n }\n\n get selectedLabel(): string {\n return (\n this.options.find((o) => o.value === this.selectedValue)?.label ||\n this.placeholder\n );\n }\n\n // optional: close on outside click\n @HostListener('document:click', ['$event'])\n closeOnOutsideClick(event: MouseEvent): void {\n const target = event.target as HTMLElement;\n if (!target.closest('.text_filter_section')) {\n this.showDropdown = false;\n }\n }\n}\n","<!-- dropdown -->\n@if(elementType === 'dropdown'){\n<div class=\"text_filter_section\">\n <div class=\"single_select_dropdown\" (click)=\"toggleDropdown()\">\n <div class=\"left_details\">\n <span class=\"placeholderColor textTruncate\">\n {{ selectedLabel }}\n </span>\n </div>\n\n <span class=\"arrow_icon\">\n <img\n src=\"images/chevron-up.svg\"\n [ngClass]=\"{ 'd-none': !showDropdown }\"\n />\n <img\n src=\"images/chevron-down.svg\"\n [ngClass]=\"{ 'd-none': showDropdown }\"\n />\n </span>\n </div>\n\n @if (showDropdown) {\n <div class=\"dropdown_list\" id=\"table_scroll\">\n <ul>\n @for (option of options; track option.value) {\n <li (click)=\"selectOption(option)\">\n <span class=\"textTruncate\">{{ option.label }}</span>\n </li>\n }\n </ul>\n </div>\n }\n</div>\n\n}\n","import {\n Directive,\n ElementRef,\n Input,\n Renderer2,\n HostListener,\n OnDestroy,\n AfterViewInit,\n} from '@angular/core';\n\n@Directive({\n selector: '[adaptivePosition]',\n})\nexport class AdaptivePositionDirective implements AfterViewInit, OnDestroy {\n @Input('adaptive') dropdown!: HTMLElement;\n @Input() trigger!: HTMLElement;\n @Input() parentContainer!: HTMLElement;\n @Input() matchWidth: boolean = true;\n @Input() closeOnOutside: boolean = true;\n @Input() isAction: boolean = false;\n @Input() isColumnActionMenu: boolean = false;\n\n resizeObserver!: ResizeObserver;\n isOpen = false;\n menuItems: HTMLElement[] = [];\n focusedIndex = -1;\n\n constructor(private host: ElementRef) {}\n\n ngAfterViewInit(): void {\n this.setupBaseStyles();\n this.observeResize();\n }\n\n // @HostListener('click', ['$event'])\n // toggle(event: Event) {\n // event.stopPropagation();\n // this.isOpen ? this.close() : this.open();\n // }\n\n open() {\n this.isOpen = true;\n this.dropdown.classList.remove('hidden');\n this.dropdown.setAttribute('role', 'listbox');\n this.host.nativeElement.setAttribute('aria-expanded', 'true');\n this.prepareItems();\n this.positionDropdown();\n\n if (this.closeOnOutside)\n document.addEventListener('click', this.handleOutsideClick);\n }\n\n close() {\n this.isOpen = false;\n this.dropdown.classList.add('hidden');\n this.host.nativeElement.setAttribute('aria-expanded', 'false');\n document.removeEventListener('click', this.handleOutsideClick);\n this.focusedIndex = -1;\n }\n\n positionDropdown() {\n if (!this.trigger) return;\n\n const dropdown = this.host.nativeElement;\n const parent =\n this.parentContainer ||\n this.trigger.closest('.table_wrapper') ||\n document.body ||\n this.trigger.offsetParent!;\n if (!parent) return;\n\n const t = this.trigger.getBoundingClientRect();\n const p = parent.getBoundingClientRect();\n const dH = dropdown.offsetHeight;\n const dW = dropdown.offsetWidth;\n\n const spaceBelow = p.bottom - t.bottom;\n const spaceAbove = t.top - p.top;\n const spaceRight = p.right - t.left;\n const spaceLeft = t.right - p.left;\n\n if (spaceBelow < dH && spaceAbove > dH) {\n dropdown.style.bottom = `${this.trigger.offsetHeight}px`;\n dropdown.style.top = 'auto';\n dropdown.classList.add('drop-up');\n dropdown.classList.remove('drop-down');\n }\n\n if (spaceRight < dW && spaceLeft > dW) {\n dropdown.style.right = '0';\n dropdown.style.left = 'auto';\n dropdown.classList.add('align-right');\n if (this.isColumnActionMenu) dropdown.style.right = '0';\n }\n\n if (this.isAction) dropdown.style.right = '70px';\n if (this.matchWidth) dropdown.style.width = `${this.trigger.offsetWidth}px`;\n }\n\n @HostListener('keydown', ['$event'])\n handleKeys(e: KeyboardEvent) {\n if (!this.isOpen) return;\n\n switch (e.key) {\n case 'ArrowDown':\n this.moveFocus(1);\n e.preventDefault();\n break;\n case 'ArrowUp':\n this.moveFocus(-1);\n e.preventDefault();\n break;\n case 'Home':\n this.focusItem(0);\n e.preventDefault();\n break;\n case 'End':\n this.focusItem(this.menuItems.length - 1);\n e.preventDefault();\n break;\n case 'Enter':\n case ' ':\n this.selectFocused();\n e.preventDefault();\n break;\n case 'Escape':\n this.close();\n break;\n }\n }\n\n moveFocus(delta: number) {\n this.focusedIndex =\n (this.focusedIndex + delta + this.menuItems.length) %\n this.menuItems.length;\n this.focusItem(this.focusedIndex);\n }\n\n focusItem(index: number) {\n this.focusedIndex = index;\n this.menuItems.forEach((i) => i.classList.remove('focused'));\n\n const item = this.menuItems[index];\n item.classList.add('focused');\n item.scrollIntoView({ block: 'nearest' });\n }\n\n selectFocused() {\n if (this.focusedIndex >= 0) this.menuItems[this.focusedIndex].click();\n this.close();\n }\n\n prepareItems() {\n this.menuItems = Array.from(\n this.dropdown.querySelectorAll('[role=\"option\"], li, div'),\n );\n this.menuItems.forEach((el) => el.setAttribute('tabindex', '-1'));\n }\n\n handleOutsideClick = (e: Event) => {\n const target = e.target;\n if (\n !(target instanceof Node) ||\n (!this.host.nativeElement.contains(target) &&\n !this.dropdown.contains(target))\n ) {\n this.close();\n }\n };\n\n setupBaseStyles() {\n const dropdown = this.host.nativeElement;\n dropdown.style.position = 'absolute';\n this.host.nativeElement.setAttribute('role', 'button');\n this.positionDropdown();\n }\n\n observeResize() {\n const parent = this.parentContainer || this.host.nativeElement.offsetParent;\n this.resizeObserver = new ResizeObserver(() => {\n if (this.isOpen) this.positionDropdown();\n });\n this.resizeObserver.observe(this.host.nativeElement);\n this.resizeObserver.observe(this.trigger);\n if (parent) this.resizeObserver.observe(parent);\n }\n\n ngOnDestroy() {\n this.resizeObserver?.disconnect();\n document.removeEventListener('click', this.handleOutsideClick);\n }\n}\n","import { CommonModule, DatePipe } from '@angular/common';\nimport {\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnInit,\n Output,\n SimpleChanges,\n} from '@angular/core';\nimport { OutsideClickDirective } from '../../directives/outside-click.directive';\nimport {\n AbstractControl,\n ControlValueAccessor,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n ValidationErrors,\n} from '@angular/forms';\nimport { AdaptivePositionDirective } from '../../directives/adaptive-position.directive';\n\nexport interface DateConfig {\n selectionMode: 'single' | 'range';\n enableTime?: boolean;\n}\nexport interface IRange {\n value: Date;\n label: string;\n}\n\n@Component({\n selector: 'lib-common-calendar',\n\n imports: [CommonModule, OutsideClickDirective, AdaptivePositionDirective],\n templateUrl: './common-calendar.component.html',\n styleUrl: './common-calendar.component.scss',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: CommonCalendarComponent,\n multi: true,\n },\n DatePipe,\n ],\n})\nexport class CommonCalendarComponent\n implements OnInit, OnChanges, ControlValueAccessor\n{\n @Output() dateTimeSelected = new EventEmitter<any>();\n @Output() clearDateEvent = new EventEmitter<any>();\n @Input() dateConfig!: DateConfig;\n @Input() minDate?: string;\n @Input() maxDate?: string;\n @Input() preSelectedValue: any;\n selectedDateTime: any = '';\n currentDate = new Date();\n currentMonth = this.currentDate.getMonth();\n currentYear = this.currentDate.getFullYear();\n selectedDate: number | null = null;\n selectedTime: string | null = null;\n calendar: number[][] = [];\n timeSlots: IRange[] = [];\n rangeStart: number | null = null;\n rangeEnd: number | null = null;\n selectedMonth: any;\n selectedYear: any;\n control!: AbstractControl<any, any>;\n disableControl: boolean = false;\n date: any = '';\n calendarView: string = 'defaultView';\n yearRange: number[] = [];\n daysInMonth: any[] = [];\n selectedDay: number = 0;\n selectedStartDate: any;\n selectedEndDate: any;\n isOpen: boolean = false;\n showYearSelector = false;\n monthRange: any = {\n '0': 'JAN',\n '01': 'FEB',\n '02': 'MAR',\n '03': 'APR',\n '04': 'MAY',\n '05': 'JUN',\n '06': 'JUL',\n '07': 'AUG',\n '08': 'SEP',\n '09': 'OCT',\n '10': 'NOV',\n '11': 'DEC',\n };\n constructor(\n // @Inject(LOCALE_ID) private locale: string,\n private cd: ChangeDetectorRef,\n private datePipe: DatePipe,\n ) {}\n ngOnChanges(_changes: SimpleChanges): void {\n if (_changes['preSelectedValue']) {\n this.selectedDateTime = _changes['preSelectedValue']?.currentValue;\n }\n }\n ngOnInit(): void {\n this.generateYearRange();\n // this.generateCalendar();\n this.generateTimeRanges();\n if (this.preSelectedValue) {\n this.initializeCalendar();\n }\n }\n\n private onTouchedCallback: () => void = () => {};\n private onChangeCallback: (_: any) => void = () => {};\n writeValue(value: any): void {\n if (value) {\n this.selectedDateTime = value;\n this.onChangeCallback(value);\n this.cd.markForCheck();\n }\n }\n\n registerOnChange(fn: any): void {\n this.onChangeCallback = fn;\n }\n registerOnTouched(fn: any): void {\n this.onTouchedCallback = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n if (this.control) {\n isDisabled ? this.control.disable() : this.control.enable();\n }\n }\n /**\n * @description Validates date time picker component\n * @author Shiva Kant\n * @param control\n * @returns validate\n */\n validate(control: AbstractControl): ValidationErrors | null {\n this.control = control;\n const selected = this.date ? new Date(this.date) : null;\n\n // Check required manually\n const isRequired =\n control.validator && control.validator(control)?.['required'];\n\n if (\n (isRequired || control.hasError('required')) &&\n (!this.date || !this.selectedDay)\n ) {\n return { required: true };\n } else if (this.minDate && selected && selected < new Date(this.minDate)) {\n return { minDate: true };\n } else if (this.maxDate && selected && selected > new Date(this.maxDate)) {\n return { maxDate: true };\n }\n\n return null;\n }\n\n selectCurrentMonthYear() {\n this.currentDate = new Date();\n this.currentMonth = this.currentDate.getMonth();\n this.currentYear = this.currentDate.getFullYear();\n this.selectedMonth = this.currentMonth;\n this.selectedYear = this.currentYear;\n this.selectedDate = null;\n }\n /**\n * @description method to toggleCalendar\n * @author Shiva Kant\n */\n toggleCalendar(): void {\n if (!this.selectedDateTime) {\n this.selectCurrentMonthYear();\n }\n this.isOpen = !this.isOpen;\n if (this.isOpen) {\n // If a date is already selected, open that month/year\n if (this.selectedDate != null) {\n this.currentDate = new Date(\n this.selectedYear,\n this.selectedMonth,\n this.selectedDate,\n );\n }\n this.updateCurrentYearMonth();\n this.generateCalendar();\n setTimeout(() => {\n const ele = document.getElementsByClassName('calendar-footer');\n ele[0]?.scrollIntoView();\n });\n }\n this.calendarView = 'defaultView';\n }\n\n /**\n * @description Closes calendar\n * @author Shiva Kant\n */\n closeCalendar(): void {\n this.isOpen = false;\n this.calendarView = 'defaultView';\n }\n /**\n * @description Method to Gets month year\n * @author Shiva Kant\n * @returns month year\n */\n getMonthYear(): { month: string; year: string } {\n return {\n month: this.currentDate.toLocaleString('default', {\n month: 'long',\n }),\n year: this.currentDate.toLocaleString('default', {\n year: 'numeric',\n }),\n };\n }\n\n /**\n * @description Method to Updates current year month\n * @author Shiva Kant\n */\n updateCurrentYearMonth(): void {\n this.currentYear = this.currentDate.getFullYear();\n this.currentMonth = this.currentDate.getMonth();\n }\n\n /**\n * @description Method to Selects year\n * @author Shiva Kant\n * @param year\n */\n selectYear(year: number): void {\n this.currentDate.setFullYear(year);\n this.updateCurrentYearMonth();\n this.showYearSelector = false;\n this.calendarView = 'defaultView';\n this.selectedDay = 0;\n this.generateCalendar();\n }\n\n /**\n * @description Method to Selects month\n * @author Shiva Kant\n * @param month\n */\n selectMonth(month: any): void {\n this.currentDate.setMonth(month);\n this.updateCurrentYearMonth();\n this.calendarView = 'defaultView';\n this.selectedDay = 0;\n this.generateCalendar();\n }\n\n /**\n * @description Method to Previous year range\n * @author Shiva Kant\n */\n previousYearRange(): void {\n this.yearRange = this.yearRange.map((year) => year - 18);\n }\n\n /**\n * @description Method to Next year range\n * @author Shiva Kant\n */\n nextYearRange(): void {\n this.yearRange = this.yearRange.map((year) => year + 18);\n }\n\n /**\n * @description Method to Toggles year selector\n * @author Shiva Kant\n */\n toggleYearSelector(): void {\n this.showYearSelector = !this.showYearSelector;\n this.generateYearRange();\n }\n /**\n * @description Method to Generates year range\n * @author Shiva Kant\n */\n generateYearRange(): void {\n const currentYear = this.currentDate.getFullYear();\n const startYear = currentYear - (currentYear % 20);\n this.yearRange = Array.from({ length: 18 }, (_, i) => startYear + i);\n }\n /**\n * @description Method to Determines whether date selectable is\n * @author Shiva Kant\n * @param date\n * @returns true if date selectable\n */\n isDateSelectable(date: Date): boolean {\n const min = this.minDate ? new Date(this.minDate) : null;\n const max = this.maxDate ? new Date(this.maxDate) : null;\n if (min && date < min) return false;\n if (max && date > max) return false;\n return true;\n }\n /**\n * @description Method to Determines whether day disabled is\n * @author Shiva Kant\n * @param day\n * @returns true if day disabled\n */\n isDayDisabled(day: number): boolean {\n const date = new Date(\n this.currentDate.getFullYear(),\n this.currentDate.getMonth(),\n day,\n );\n return !this.isDateSelectable(date);\n }\n /**\n * @description Method to Generates calendar\n * @author Shiva Kant\n */\n generateCalendar(): void {\n const year = this.currentDate.getFullYear();\n const month = this.currentDate.getMonth();\n\n const firstDayOfMonth = new Date(year, month, 1);\n const firstWeekDay = (firstDayOfMonth.getDay() + 6) % 7; // Convert Sunday (0) to 6, Monday is 0\n\n const daysInCurrentMonth = new Date(year, month + 1, 0).getDate();\n const daysInPreviousMonth = new Date(year, month, 0).getDate();\n\n const totalCells = 42; // 6 rows of 7 days\n const calendarDays: { day: number; date: Date; isCurrentMonth: boolean }[] =\n [];\n\n // Fill previous month days\n for (let i = firstWeekDay - 1; i >= 0; i--) {\n const day = daysInPreviousMonth - i;\n const date = new Date(year, month - 1, day);\n calendarDays.push({ day, date, isCurrentMonth: false });\n }\n\n // Fill current month days\n for (let day = 1; day <= daysInCurrentMonth; day++) {\n const date = new Date(year, month, day);\n calendarDays.push({ day, date, isCurrentMonth: true });\n }\n\n // Fill next month days\n const remaining = totalCells - calendarDays.length;\n for (let day = 1; day <= remaining; day++) {\n const date = new Date(year, month + 1, day);\n calendarDays.push({ day, date, isCurrentMonth: false });\n }\n\n this.daysInMonth = calendarDays;\n }\n\n /**\n * @description Method to Previous month\n * @author Shiva Kant\n */\n previousMonth(): void {\n this.currentDate.setMonth(this.currentDate.getMonth() - 1);\n this.updateCurrentYearMonth();\n this.selectedDay = 0;\n this.generateCalendar();\n }\n\n /**\n * @description Method to Next month\n * @author Shiva Kant\n */\n nextMonth(): void {\n this.currentDate.setMonth(this.currentDate.getMonth() + 1);\n this.updateCurrentYearMonth();\n this.selectedDay = 0;\n this.generateCalendar();\n }\n\n /**\n * @description Method to Initializes calendar when preSelectedValue date\n * @author Shiva Kant\n * @returns calendar\n */\n initializeCalendar(): void {\n if (!this.preSelectedValue) return;\n\n // Case 1: Single date (string or Date)\n if (\n typeof this.preSelectedValue === 'string' ||\n this.preSelectedValue instanceof Date\n ) {\n const date = new Date(this.preSelectedValue);\n this.selectedDate = date.getDate();\n this.selectedMonth = date.getMonth();\n this.selectedYear = date.getFullYear();\n this.selectedTime = this.formatTime(date);\n\n // Update current view to show the month/year\n this.currentDate = new Date(\n this.selectedYear,\n this.selectedMonth,\n this.selectedDate,\n );\n this.generateCalendar();\n }\n\n // Case 2: Range of dates\n else if (this.preSelectedValue.start && this.preSelectedValue.end) {\n const startDate = new Date(this.preSelectedValue.start);\n const endDate = new Date(this.preSelectedValue.end);\n\n // Patch component state\n this.rangeStart = startDate.getDate();\n this.rangeEnd = endDate.getDate();\n\n this.selectedStartDate = startDate;\n this.selectedEndDate = endDate;\n\n this.selectedMonth = startDate.getMonth();\n this.selectedYear = startDate.getFullYear();\n\n // Set the current calendar view to the start month/year\n this.currentDate = new Date(this.selectedYear, this.selectedMonth, 1);\n this.generateCalendar();\n\n // Optional: If your calendar requires a single selectedTime for range, you could pick start or end\n this.selectedTime = this.formatTime(startDate);\n\n // Emit initial range value\n this.emitDateTime();\n }\n }\n\n /**\n * @description Method to Selects date\n * @author Shiva Kant\n * @param date\n */\n selectDate(date: number): void {\n const selectedFullDate = new Date(\n this.currentYear,\n this.currentMonth,\n date,\n );\n selectedFullDate.setHours(0, 0, 0, 0);\n\n this.selectedMonth = this.currentMonth;\n this.selectedYear = this.currentYear;\n\n if (this.dateConfig.selectionMode === 'single') {\n this.selectedDate = date;\n this.rangeStart = null;\n this.rangeEnd = null;\n } else {\n if (!this.rangeStart || this.rangeEnd) {\n this.rangeStart = date;\n this.rangeEnd = null;\n } else {\n this.rangeEnd = date < this.rangeStart ? this.rangeStart : date;\n this.rangeStart = date < this.rangeStart ? date : this.rangeStart;\n }\n }\n\n this.emitDateTime();\n }\n\n /**\n * @description Method to Selects time\n * @author Shiva Kant\n * @param time\n */\n selectTime(time: string): void {\n this.selectedTime = time;\n this.emitDateTime();\n }\n /**\n * @description Method to Determines whether selected date is\n * @author Shiva Kant\n * @param date\n * @returns\n */\n isSelectedDate(date: number, month: number, year: number): boolean {\n if (this.dateConfig.selectionMode === 'single') {\n // Check if the day, month, and year match\n return (\n this.selectedDate === date &&\n this.selectedMonth === month &&\n this.selectedYear === year\n );\n } else if (this.dateConfig.selectionMode === 'range') {\n // Range selection checks, ensuring both start and end dates are within the same month and year\n return !!(\n (this.rangeStart &&\n this.rangeStart === date &&\n this.selectedMonth === month &&\n this.selectedYear === year) ||\n (this.rangeEnd &&\n this.rangeEnd === date &&\n this.selectedMonth === month &&\n this.selectedYear === year) ||\n (this.rangeStart &&\n this.rangeEnd &&\n date > this.rangeStart &&\n date < this.rangeEnd &&\n this.selectedMonth === month &&\n this.selectedYear === year)\n );\n }\n return false;\n }\n\n /**\n * @description Method to Generates time ranges\n * @author Shiva Kant\n */\n generateTimeRanges(): void {\n const startTime = new Date();\n startTime.setHours(0, 0, 0, 0);\n this.timeSlots = Array.from({ length: 48 }, (_, i) => {\n const time = new Date(startTime.getTime() + i * 30 * 60 * 1000);\n return { value: time, label: this.formatTime(time) };\n });\n }\n\n /**\n * @description Method to Formats time\n * @author Shiva Kant\n * @param date\n * @returns time\n */\n formatTime(date: Date): string {\n return date.toLocaleTimeString('en-US', {\n hour: '2-digit',\n minute: '2-digit',\n hour12: true,\n });\n }\n /**\n * @description Method to Formats date time\n * @author Shiva Kant\n * @param fullDate\n * @param selectedTime\n * @returns date time\n */\n formatDateTime(fullDate: Date, selectedTime: string | null): string {\n const date = new Date(fullDate);\n\n if (!selectedTime) {\n // Only date formatting when time not required\n return this.datePipe.transform(date, 'MM/dd/yyyy')!;\n }\n\n const [time, period] = selectedTime.split(' ');\n let [hours, minutes] = time.split(':').map(Number);\n\n // Convert 12-hour → 24-hour\n if (period === 'PM' && hours !== 12) hours += 12;\n if (period === 'AM' && hours === 12) hours = 0;\n\n date.setHours(hours, minutes, 0, 0);\n\n return this.datePipe.transform(date, 'yyyy/MM/dd hh:mm a')!;\n }\n\n /**\n * @description Method to Emits date time\n * @author Shiva Kant\n * @returns date time\n */\n emitDateTime(): void {\n if (this.dateConfig.enableTime && !this.selectedTime) {\n return; // wait until user selects time\n }\n if (this.dateConfig.selectionMode === 'single') {\n if (!this.selectedDate) return;\n\n const fullDate = new Date(\n this.selectedYear,\n this.selectedMonth,\n this.selectedDate,\n );\n\n this.selectedDateTime = this.formatDateTime(\n fullDate || '',\n this.dateConfig.enableTime ? this.selectedTime : null,\n );\n\n this.writeValue(this.selectedDateTime);\n this.dateTimeSelected.emit(this.selectedDateTime);\n this.closeCalendar();\n return;\n }\n if (this.dateConfig.selectionMode === 'range') {\n if (!this.rangeStart || !this.rangeEnd) return;\n\n const startDate = new Date(\n this.currentYear,\n this.currentMonth,\n this.rangeStart,\n );\n const endDate = new Date(\n this.currentYear,\n this.currentMonth,\n this.rangeEnd,\n );\n\n const startDateTime = this.formatDateTime(\n startDate,\n this.dateConfig.enableTime ? this.selectedTime : null,\n );\n const endDateTime = this.formatDateTime(\n endDate,\n this.dateConfig.enableTime ? this.selectedTime : null,\n );\n\n const rangeResult = { start: startDateTime, end: endDateTime };\n\n this.writeValue(rangeResult);\n this.dateTimeSelected.emit(rangeResult);\n this.closeCalendar();\n }\n }\n\n hideCalender() {\n this.closeCalendar();\n }\n}\n","<!-- Calendar -->\n\n<div\n class=\"calendar_wrapper\"\n appOutsideClick\n (clickOutSide)=\"closeCalendar()\"\n [ngClass]=\"{ 'pe-none': disableControl }\"\n>\n <div class=\"date_box\" (click)=\"toggleCalendar()\" #trigger>\n @if (dateConfig.selectionMode == \"single\") {\n <input\n type=\"text\"\n placeholder=\"Select Date\"\n [value]=\"selectedDateTime\"\n readonly\n [disabled]=\"disableControl\"\n />\n } @else {\n <input\n type=\"text\"\n placeholder=\"Select date Range\"\n [value]=\"\n selectedDateTime.start\n | date\n : 'MM/dd/yyyy' +\n ' - ' +\n (selectedDateTime.end | date: 'MM/dd/yyyy')\n \"\n readonly\n />\n }\n <!-- <i-feather name=\"calendar\" class=\"calendar_icon\"></i-feather> -->\n <img src=\"images/calendar.svg\" alt=\"\" />\n </div>\n @if (isOpen) {\n <div\n class=\"calendar-popup\"\n adaptivePosition\n [trigger]=\"trigger\"\n [matchWidth]=\"false\"\n appOutsideClick\n (clickOutside)=\"hideCalender()\"\n >\n <div class=\"calendar_container\">\n <!-- for the header -->\n <div class=\"calendar-header\">\n <div class=\"month-year\">\n <span class=\"month\" (click)=\"calendarView = 'monthView'\">\n {{ getMonthYear().month }},</span\n >\n <div class=\"year\" (click)=\"calendarView = 'yearView'\">\n <span>\n {{ getMonthYear().year }}\n </span>\n <img src=\"images/chevron-down.svg\" class=\"year_arrow\" alt=\"\" />\n </div>\n </div>\n\n <div class=\"arrow_container\">\n <span class=\"navigation-button\" (click)=\"previousMonth()\">\n <img src=\"images/arrow-up.svg\" alt=\"\" />\n </span>\n\n <span class=\"navigation-button\" (click)=\"nextMonth()\">\n <img src=\"images/arrow-down.svg\" alt=\"\" />\n </span>\n </div>\n </div>\n @if (calendarView === \"monthView\") {\n <div class=\"month-grid\">\n @for (month of monthRange | keyvalue; track $index) {\n <span\n class=\"month\"\n (click)=\"selectMonth(month.key)\"\n [ngClass]=\"{ selected: month.key == currentDate.getMonth() }\"\n >{{ month.value }}</span\n >\n }\n </div>\n } @else if (calendarView === \"yearView\") {\n <div class=\"year-selector\">\n <span\n class=\"navigation-button pointer\"\n (click)=\"previousYearRange()\"\n >\n <img src=\"images/chevron-left.svg\" alt=\"\" />\n </span>\n <div class=\"year-grid\">\n @for (year of yearRange; track $index) {\n <span\n class=\"year\"\n (click)=\"selectYear(year)\"\n [ngClass]=\"{ selected: year == currentDate.getFullYear() }\"\n >{{ year }}</span\n >\n }\n </div>\n <span class=\"navigation-button pointer\" (click)=\"nextYearRange()\">\n <img src=\"images/chevron-right.svg\" alt=\"\" />\n </span>\n </div>\n } @else {\n <div class=\"calendar_body\">\n <div class=\"calendar-grid\">\n <!-- Day names -->\n @for (\n day of [\"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\", \"Su\"];\n track $index\n ) {\n <div class=\"days_name\">\n {{ day }}\n </div>\n }\n\n <!-- Calendar dates -->\n @for (dayObj of daysInMonth; track $index) {\n <div\n class=\"calendar-day\"\n [ngClass]=\"{\n active:\n dayObj.isCurrentMonth &&\n dateConfig.selectionMode === 'single' &&\n isSelectedDate(\n dayObj.day,\n dayObj.date.getMonth(),\n dayObj.date.getFullYear()\n ),\n\n active_start:\n dayObj.isCurrentMonth &&\n dateConfig.selectionMode === 'range' &&\n isSelectedDate(\n dayObj.day,\n dayObj.date.getMonth(),\n dayObj.date.getFullYear()\n ) &&\n dayObj.day === rangeStart,\n\n active_end:\n dayObj.isCurrentMonth &&\n dateConfig.selectionMode === 'range' &&\n isSelectedDate(\n dayObj.day,\n dayObj.date.getMonth(),\n dayObj.date.getFullYear()\n ) &&\n dayObj.day === rangeEnd,\n\n range_between_active:\n dayObj.isCurrentMonth &&\n dateConfig.selectionMode === 'range' &&\n isSelectedDate(\n dayObj.day,\n dayObj.date.getMonth(),\n dayObj.date.getFullYear()\n ) &&\n rangeStart != null &&\n rangeEnd != null &&\n dayObj.day > rangeStart &&\n dayObj.day < rangeEnd,\n\n other_month: !dayObj.isCurrentMonth,\n disabled: isDayDisabled(dayObj.day),\n notInCurrentMonth: !dayObj.isCurrentMonth,\n }\"\n (click)=\"\n dayObj.isCurrentMonth &&\n !isDayDisabled(dayObj.day) &&\n selectDate(dayObj.day)\n \"\n >\n {{ dayObj.day }}\n </div>\n }\n </div>\n <div class=\"bottom_btn\">\n <div class=\"btn\">Clear</div>\n <div class=\"btn\">Today</div>\n </div>\n </div>\n }\n </div>\n <!-- TIME SLOTS (only if showTime = true) -->\n @if (dateConfig.enableTime) {\n <div class=\"times\">\n <div class=\"time-picker\">\n <div class=\"time-column\">\n @for (timeSlot of timeSlots; track $index) {\n <span\n class=\"span_time\"\n [ngClass]=\"{ active: selectedTime === timeSlot.label }\"\n (click)=\"selectTime(timeSlot.label)\"\n >\n {{ timeSlot.label }}\n </span>\n }\n </div>\n\n <div class=\"time-column\">\n @for (timeSlot of timeSlots; track $index) {\n <span\n class=\"span_time\"\n [ngClass]=\"{ active: selectedTime === timeSlot.label }\"\n >\n {{ timeSlot.label }}\n </span>\n }\n </div>\n\n <div class=\"time-column\">\n @for (timeSlot of timeSlots; track $index) {\n <span\n class=\"span_time\"\n [ngClass]=\"{ active: selectedTime === timeSlot.label }\"\n >\n {{ timeSlot.label }}\n </span>\n }\n </div>\n\n <!-- center selection indicator -->\n <div class=\"center-highlight\"></div>\n </div>\n\n <!-- @for (timeSlot of timeSlots; track $index) {\n <span\n class=\"span_time\"\n [ngClass]=\"{ active: selectedTime === timeSlot.label }\"\n (click)=\"selectTime(timeSlot.label)\"\n >\n {{ timeSlot.label }}\n </span>\n } -->\n </div>\n }\n </div>\n }\n</div>\n","import { AddClassPipe } from './pipes/add-class.pipe';\nimport { CommonModule } from '@angular/common';\nimport {\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n NgZone,\n OnChanges,\n OnInit,\n Output,\n Renderer2,\n SimpleChanges,\n ViewChild,\n} from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { OutsideClickDirective } from './directives/outside-click.directive';\nimport { RendererParserDirective } from './directives/renderer-parser.directive';\nimport { CommonInputComponent } from './common-components/common-input/common-input.component';\nimport { AdaptivePositionDirective } from './directives/adaptive-position.directive';\nimport {\n CommonCalendarComponent,\n DateConfig,\n} from './common-components/common-calendar/common-calendar.component';\n\nexport class ColDefs {\n fieldName!: string;\n headerName!: string;\n width!: number;\n minWidth!: number;\n sortable: boolean = true;\n filterable: boolean = true;\n cellRenderer: any;\n}\n\nexport interface ColumnFilter {\n fieldName: string;\n filterLogic: string;\n filters: FilterCondition[];\n}\nexport interface FilterCondition {\n filterOperation: string;\n filterValue: any;\n}\n@Component({\n selector: 'cats-data-grid',\n imports: [\n CommonModule,\n FormsModule,\n CommonCalendarComponent,\n OutsideClickDirective,\n AdaptivePositionDirective,\n RendererParserDirective,\n AddClassPipe,\n CommonInputComponent,\n ],\n templateUrl: './cats-data-grid.component.html',\n styleUrls: ['./cats-data-grid.component.scss'],\n})\nexport class CatsDataGridComponent implements OnChanges, OnInit {\n @ViewChild('pinMenu') pinMenu!: ElementRef;\n @ViewChild('colActionMenu') colActionMenu!: ElementRef;\n @ViewChild('table') table!: ElementRef;\n @Input() tableOptions: any;\n @Input() totalRecords: number = 0;\n @Input() sortingRequired = true;\n @Input() checkBoxSelection = false;\n @Input() checkboxSelectionType = 'multiple';\n @Input() rowData: any[] = [];\n @Input() colDefs: any[] = [];\n @Input() paginationRequired = true;\n @Input() selectedRowEmpty: boolean = false;\n @Input() filterRequired: boolean = true;\n @Input() threeDotsMenuRequired: boolean = true;\n @Input() settingsRequired: boolean = true;\n @Input() settingsClicked: boolean = false;\n @Input() resetPage = true;\n @Input() rowId: any = null;\n showDropdown: boolean = false;\n\n @Input() height: number = 400;\n @Input() groupByRequired: boolean = false;\n @Output() onPaginationChange = new EventEmitter();\n @Output() onCheckboxSelection = new EventEmitter();\n @Output() onScrollEmitter = new EventEmitter();\n @Output() filter = new EventEmitter();\n @Output() onHideSettings = new EventEmitter();\n\n activeFilterIndex: number | null = null;\n originalRowData: any[] = [];\n activeAll = true;\n\n pageDetails: any = {\n pageSize: 20,\n totalPages: 1,\n currentPage: 1,\n };\n recordsToShow: any = {\n min: 0,\n max: 20,\n };\n sortingColumnIndex!: number;\n sortingType: any = {};\n selectedRow: any[] = [];\n\n @Input() pageSizeList: number[] = [20, 50, 75, 100];\n showPageSizeList: boolean = false;\n dragOverIndex: null | number = null;\n draggedIndex: null | number = null;\n originalColDefs: any[] = [];\n filteredRowData: any[] = [];\n filteredData: any[] = [];\n currentColumn: any;\n currentIndex!: number;\n menuVisible: boolean[] = [];\n menuPosition: any[] = [];\n activeFilters: Set<any> = new Set<any>();\n resizingColumnIndex: number | null = null;\n startX: number = 0;\n startWidth: number = 0;\n isResizing: boolean = false;\n groupedResult: any[] = [];\n showMoveIcon: any = {};\n columnDraggable: any[] = [];\n activeGroups: any[] = [];\n groupBy: string[] = [];\n @Input() groupByField: string = '';\n dragGroupIndex: number | null = null;\n\n dateConfig: DateConfig = {\n selectionMode: 'single',\n enableTime: false,\n };\n\n filterOptions = [\n { label: 'Contains', value: 'contains' },\n { label: 'Does Not Contain', value: 'doesNotContain' },\n { label: 'Equals', value: 'equals' },\n { label: 'Does Not Equal', value: 'doesNotEqual' },\n { label: 'Starts With', value: 'startsWith' },\n { label: 'Ends With', value: 'endsWith' },\n ];\n\n numberFilterOptions = [\n { label: 'Equals', value: '=' },\n { label: 'Greater Than', value: '>' },\n { label: 'Less Than', value: '<' },\n { label: 'Greater Than or Equal', value: '>=' },\n { label: 'Less Than or Equal', value: '<=' },\n ];\n showPin: boolean = false;\n pinActionClicked: any = {};\n private removeMouseMove!: () => void;\n private removeMouseUp!: () => void;\n private rafId: number | null = null;\n @Input() appliedFilters: ColumnFilter[] = [];\n @Input() rowGripFieldName!: string;\n @Input() pageNumber!: number;\n @Input() pageSize!: number;\n @Output() appliedFiltersEvent = new EventEmitter<ColumnFilter[]>();\n @Output() activeGroupsEvent = new EventEmitter<any[]>();\n @Input() dynamicGroupingFiltering: boolean = false;\n atLeastOneColumnChecked: boolean = true;\n draggedRowData: any = {};\n firstCol: any;\n isRowSelected: boolean = false;\n @Output() onRowClicked = new EventEmitter<any>();\n @Output() onCellClicked = new EventEmitter<any>();\n constructor(\n private renderer: Renderer2,\n private zone: NgZone,\n private cd: ChangeDetectorRef,\n ) { }\n\n ngOnInit(): void {\n // if (this.colDefs && this.colDefs.length > 0) {\n // this.firstCol = this.colDefs[0];\n // }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['pageNumber']?.currentValue) {\n this.pageDetails.currentPage = changes['pageNumber']?.currentValue;\n this.recordsToShow.min = (this.pageDetails.currentPage - 1) * this.pageDetails.pageSize;\n this.recordsToShow.max = this.pageDetails.currentPage * this.pageDetails.pageSize;\n this.clearAllFilter();\n }\n if (changes['pageSize']?.currentValue) {\n this.pageDetails.pageSize = changes['pageSize']?.currentValue;\n this.recordsToShow.min = (this.pageDetails.currentPage - 1) * this.pageDetails.pageSize;\n this.recordsToShow.max = this.pageDetails.currentPage * this.pageDetails.pageSize;\n }\n if (changes['colDefs']?.currentValue) {\n // this.resetPagination();\n\n this.colDefs = this.getUpdatedColDefs(changes['colDefs']?.currentValue);\n setTimeout(() => {\n this.applyAllFilters();\n });\n\n this.originalColDefs = [...this.colDefs];\n }\n\n if (changes['totalRecords']?.currentValue && this.resetPage) {\n this.resetPagination();\n } else {\n this.setPageCount();\n }\n\n if (changes['rowData']?.currentValue) {\n if (this.selectedRowEmpty) this.selectedRow = [];\n this.rowData = changes['rowData']?.currentValue.map(\n (row: any, i: number) => {\n if (row[this.rowId]) {\n row.rowId = row[this.rowId];\n } else {\n row.rowId = `${Date.now()}_${i}`;\n }\n if (row?.isSelected) [...this.selectedRow, row];\n return row;\n },\n );\n\n if (this.dynamicGroupingFiltering && this.groupBy.length > 0) {\n this.groupedResult = structuredClone(this.rowData);\n }\n if (!this.activeFilters.size) {\n this.originalRowData = structuredClone(this.rowData);\n }\n\n this.getGroupedData();\n }\n\n if (changes['groupByField']?.currentValue) {\n this.activeGroups = [];\n this.groupBy = [];\n const groupByField = changes['groupByField'].currentValue;\n const col = this.getColumnDetail(this.colDefs, groupByField);\n this.activeGroups.push(...col);\n this.groupBy.push(groupByField);\n this.getGroupedData();\n }\n }\n\n getColumnDetail(colDefs: any, groupByField: any) {\n return colDefs.filter((col: any) => col.fieldName === groupByField);\n }\n\n activeAllSelection(event: Event) {\n // let checked = (event.target as HTMLInputElement).checked;\n // if (checked) {\n // this.colDefs = this.originalColDefs.map((dt) => {\n // if (!dt.active && !dt.headerLocked) {\n // dt.active = true;\n // }\n // this.atLeastOneColumnChecked = true;\n // return dt;\n // });\n // } else {\n // this.colDefs = this.originalColDefs.map((dt) => {\n // if (dt.active && !dt.headerLocked) {\n // dt.active = false;\n // }\n // this.atLeastOneColumnChecked = false;\n // return dt;\n // });\n // }\n\n const checked = (event.target as HTMLInputElement).checked;\n this.colDefs = this.originalColDefs.map((col) => {\n if (col.headerLocked) {\n col.active = true;\n } else {\n col.active = checked;\n }\n return col;\n });\n this.activeAll = this.colDefs.every((dt) => dt.active);\n this.atLeastOneColumnChecked = this.colDefs.some((dt) => dt.active);\n }\n\n changeActiveColSelection(event: Event, col: any) {\n col.active = !col.active;\n this.atLeastOneColumnChecked = this.originalColDefs.some((dt: any) => dt.active);\n // Update activeAll state\n this.activeAll = this.originalColDefs.every((dt: any) => dt.active);\n }\n\n /**\n * @description Prepares and normalizes column definitions for filtering and menu behavior\n * @author Anand Pandey\n * @param {any[]} colDefs - Raw column definitions received from the parent.\n * @returns {any[]} - Updated column definitions with filter/menu\n */\n getUpdatedColDefs(colDefs: any[]) {\n return colDefs.map((col, index) => {\n this.sortingType[index] = '';\n col.colId = `${Date.now()}_${index}`;\n // if (col.fieldName === 'action') {\n // col.isAction = true;\n // }\n\n if (!col.filterType && !col.isAction) {\n col.filterType = 'text';\n }\n\n if (!col.filterLogic) {\n col.filterLogic = 'OR';\n }\n\n let updatedCol = {\n ...col,\n active: col.active ?? true,\n locked: col.locked ?? false,\n filterable: col.filterable ?? true,\n columnAction: col.columnAction ?? true,\n sortable: col.sortable ?? true,\n };\n\n if (!updatedCol.filterable) {\n return updatedCol;\n }\n\n switch (col.filterType) {\n case 'text':\n updatedCol = {\n ...updatedCol,\n filters: [\n {\n filterOperation: 'contains',\n filterValue: '',\n },\n {\n filterOperation: 'startsWith',\n filterValue: '',\n },\n ],\n };\n break;\n\n case 'number':\n case 'date':\n updatedCol = {\n ...updatedCol,\n filterValue: '',\n filters: [\n {\n filterOperation: '=',\n filterValue: '',\n },\n {\n filterOperation: '=',\n filterValue: '',\n },\n ],\n };\n break;\n\n case 'set':\n const options = [\n ...new Set(\n this.rowData.flatMap((r) => {\n let fieldName = col.fieldName;\n\n if (fieldName.includes('.')) {\n fieldName = fieldName.split('.')[0];\n }\n\n return this.normalizeSetFilterType(\n r[fieldName],\n col?.cellRendererParams?.tagKey,\n )?.filter(Boolean);\n }),\n ),\n ];\n updatedCol = {\n ...updatedCol,\n options,\n filteredOptions: options,\n selectedValues: new Set(options),\n };\n break;\n }\n\n if (this.appliedFilters.length > 0) {\n const appliedFilter = this.appliedFilters.find(\n (f) => f.fieldName === col.fieldName,\n );\n if (appliedFilter) {\n switch (col.filterType) {\n case 'text':\n case 'number':\n case 'date':\n updatedCol = {\n ...updatedCol,\n filters: appliedFilter.filters,\n filterLogic: appliedFilter.filterLogic,\n };\n\n break;\n case 'set':\n const options = [\n ...new Set(\n this.rowData.flatMap((r) => {\n let fieldName = col.fieldName;\n\n if (fieldName.includes('.')) {\n fieldName = fieldName.split('.')[0];\n }\n return this.normalizeSetFilterType(\n r[fieldName],\n col?.cellRendererParams?.tagKey,\n )?.filter(Boolean);\n }),\n ),\n ];\n const selectedValues = new Set(\n appliedFilter.filters.map((f) => f.filterValue),\n );\n updatedCol = {\n ...updatedCol,\n options,\n filteredOptions: options,\n selectedValues,\n };\n break;\n }\n }\n }\n return updatedCol;\n });\n }\n normalizeSetFilterType(value: any, key: string) {\n if (!value) return;\n\n if (Array.isArray(value) && typeof value[0] === 'string') {\n return value;\n }\n if (Array.isArray(value) && typeof value[0] === 'object') {\n return (value = value.map((val) => val[key]));\n }\n\n if (typeof value === 'string') {\n return [value];\n }\n\n if (typeof value === 'object') {\n return [value[key]];\n }\n\n return [];\n }\n\n /**\n * @description - Evaluates a text-based filter condition on a given field value.\n * @author Anand Pandey\n * @param {string} type - The type of text filter to apply ('contains' | 'doesNotContain' | 'equals' etc).\n * @param {string} fieldValue - The actual value from the data row being evaluated.\n * @param {string} value - The user-entered filter value to compare against.\n * @returns {boolean} `true` if the fieldValue satisfies the specified filter condition,\n * otherwise `false`.\n */\n evaluateTextFilterCondition(\n type: string,\n fieldValue: string,\n value: string,\n ): boolean {\n switch (type) {\n case 'contains':\n return fieldValue.includes(value);\n case 'doesNotContain':\n return !fieldValue.includes(value);\n case 'equals':\n return fieldValue === value;\n case 'doesNotEqual':\n return fieldValue !== value;\n case 'startsWith':\n return fieldValue.startsWith(value);\n case 'endsWith':\n return fieldValue.endsWith(value);\n default:\n return true;\n }\n }\n\n /**\n * @description - Evaluates number/date filter conditions.\n * @author Anand\n * @param {string} type - Comparison operator ('=' | '>' | '<' | '>=' | '<=').\n * @param {number|string} fieldValue - Actual value from the row (number or timestamp).\n * @param {number|string} value - User-entered value for comparison.\n * @returns {boolean} True if the condition matches, otherwise false.\n */\n evaluateNumDateFilterCondition(\n type: string,\n fieldValue: number | string,\n value: number | string,\n ): boolean {\n switch (type) {\n case '=':\n return fieldValue === value;\n case '>':\n return fieldValue > value;\n case '<':\n return fieldValue < value;\n case '>=':\n return fieldValue >= value;\n case '<=':\n return fieldValue <= value;\n default:\n return true;\n }\n }\n\n /**\n * @description Method to filter data according to filterOperation and comparator selection\n * @author Anand Pandey\n * @param {}\n * @returns void\n */\n applyAllFilters() {\n let result: any[] = structuredClone(this.originalRowData);\n\n this.colDefs.forEach((col) => {\n let field = col.fieldName;\n\n // if (field.includes('.')) {\n // const a = field.split('.');\n // field = a[0];\n // }\n if (col?.filterable) {\n if (col.filterType === 'text') {\n // *********** TEXT FILTER ***********\n const [c1, c2] = col.filters;\n\n const textVal1 = c1.filterValue?.toLowerCase().trim();\n const textVal2 = c2.filterValue?.toLowerCase().trim();\n if (!textVal1 && !textVal2) {\n this.activeFilters.delete(col.fieldName);\n return;\n }\n this.activeFilters.add(col.fieldName);\n\n result = result.filter((r) => {\n const fieldVal = this.evaluateFieldValue(r, field)?.toLowerCase() || '';\n const cond1 = textVal1\n ? this.evaluateTextFilterCondition(\n c1.filterOperation,\n fieldVal,\n textVal1,\n )\n : false;\n const cond2 = textVal2\n ? this.evaluateTextFilterCondition(\n c2.filterOperation,\n fieldVal,\n textVal2,\n )\n : false;\n\n return col.filterLogic === 'AND' ? cond1 && cond2 : cond1 || cond2;\n });\n }\n\n // *********** NUMBER FILTER ***********\n if (col.filterType === 'number') {\n const [c1, c2] = col.filters;\n const numValue1 = Number(c1.filterValue);\n const numValue2 = Number(c2.filterValue);\n\n if (!numValue1 && !numValue2) {\n this.activeFilters.delete(col.fieldName);\n return;\n }\n this.activeFilters.add(col.fieldName);\n\n result = result.filter((r) => {\n const fieldVal = Number(r[field]);\n const cond1 = numValue1\n ? this.evaluateNumDateFilterCondition(\n c1.filterOperation,\n fieldVal,\n numValue1,\n )\n : false;\n const cond2 = numValue2\n ? this.evaluateNumDateFilterCondition(\n c2.filterOperation,\n fieldVal,\n numValue2,\n )\n : false;\n\n return col.filterLogic === 'AND' ? cond1 && cond2 : cond1 || cond2;\n });\n }\n\n // *********** DATE FILTER ***********\n if (col.filterType === 'date') {\n const [c1, c2] = col.filters;\n const selected1 = this.normalizeDate(c1.filterValue);\n const selected2 = this.normalizeDate(c2.filterValue);\n if (!selected1 && !selected2) {\n this.activeFilters.delete(col.fieldName);\n return;\n }\n this.activeFilters.add(col.fieldName);\n result = result.filter((r) => {\n const fieldVal = this.normalizeDate(r[field]);\n const cond1 = selected1\n ? this.evaluateNumDateFilterCondition(\n c1.filterOperation,\n fieldVal ?? r[field],\n selected1,\n )\n : false;\n const cond2 = selected2\n ? this.evaluateNumDateFilterCondition(\n c2.filterOperation,\n fieldVal ?? r[field],\n selected2,\n )\n : false;\n\n return col.filterLogic === 'AND' ? cond1 && cond2 : cond1 || cond2;\n });\n }\n\n // *********** SET FILTER ***********\n if (col.filterType === 'set') {\n if (\n col.selectedValues?.size >= 0 &&\n col.selectedValues?.size !== col.options.length\n ) {\n result = result.filter((r) => {\n const value: any = r[field];\n\n if (\n Array.isArray(value) &&\n value.every((val) => typeof val !== 'object')\n ) {\n return value.some((m) => col.selectedValues.has(m));\n }\n\n if (\n Array.isArray(value) &&\n value.every((val) => typeof val === 'object')\n ) {\n return value.some((m) =>\n col.selectedValues.has(m[col?.cellRendererParams?.tagKey]),\n );\n }\n\n return col.selectedValues.has(r[field]);\n });\n this.activeFilters.add(col.fieldName);\n } else {\n this.activeFilters.delete(col.fieldName);\n }\n }\n\n if (this.activeFilters.has(col.fieldName)) {\n let filterObj: ColumnFilter = {\n fieldName: col.fieldName,\n filterLogic: col.filterLogic,\n filters: col.filters,\n };\n if (col.filterType === 'set') {\n filterObj.filters = Array(...col.selectedValues).map(\n (f: string) => ({\n filterOperation: '=',\n filterValue: f,\n }),\n );\n filterObj.filterLogic = 'OR';\n }\n const existingIndex = this.appliedFilters.findIndex(\n (f) => f.fieldName === col.fieldName,\n );\n if (existingIndex === -1) {\n this.appliedFilters.push(filterObj);\n } else {\n this.appliedFilters[existingIndex] = filterObj;\n }\n } else {\n this.appliedFilters = this.appliedFilters.filter(\n (f) => f.fieldName !== col.fieldName,\n );\n }\n }\n });\n\n if (this.dynamicGroupingFiltering) {\n this.appliedFiltersEvent.emit(this.appliedFilters);\n return;\n }\n this.filteredData = result;\n this.rowData = this.filteredData;\n this.getGroupedData();\n this.filter.emit(this.filteredData);\n }\n\n evaluateFieldValue(row: any, field: string): any {\n if (field.includes('.')) {\n const parts = field.split('.');\n let value = row;\n for (const part of parts) {\n value = value?.[part];\n }\n return value;\n }\n return row[field];\n }\n\n resetFilter(col: any) {\n switch (col.filterType) {\n case 'text':\n case 'number':\n case 'date': {\n col.filters.forEach((f: any) => (f.filterValue = null));\n col.filterLogic = 'OR';\n break;\n }\n\n case 'set': {\n // Select all values again\n col.selectedValues = new Set(col.options);\n break;\n }\n }\n this.appliedFilters = this.appliedFilters.filter(\n (f) => f.fieldName !== col.fieldName,\n );\n // Remove active flag\n this.activeFilters.delete(col.fieldName);\n\n // Re-apply all filters\n if (this.dynamicGroupingFiltering) {\n this.appliedFiltersEvent.emit(this.appliedFilters);\n return;\n }\n this.applyAllFilters();\n }\n\n removeActiveFilter(col: any) {\n this.activeFilters.delete(col.fieldName);\n const column = this.colDefs.find((c) => c.fieldName === col.fieldName);\n if (column) {\n if (column.filterType === 'set') {\n column.selectedValues = new Set(column.options); // clear set filter\n } else {\n column.filters.forEach((f: any) => {\n f.filterValue = '';\n });\n }\n }\n this.appliedFilters = this.appliedFilters.filter(\n (f) => f.fieldName !== col.fieldName,\n );\n\n if (this.dynamicGroupingFiltering) {\n this.appliedFiltersEvent.emit(this.appliedFilters);\n return;\n }\n this.applyAllFilters();\n }\n\n /**\n * @description Method to change the data format to utc\n * @author Anand Pandey\n * @param {date} - date value to be changed\n * @returns date in milliseconds\n */\n normalizeDate(dateStr: string) {\n const d = new Date(dateStr);\n if (isNaN(d.getTime())) return null;\n return new Date(\n Date.UTC(d.getFullYear(), d.getMonth(), d.getDate()),\n ).getTime();\n }\n\n /**\n * @description\n * Filters the available set options inside a Set Filter (checkbox filter)\n * based on the user's search text. This updates only the list shown in\n * the dropdown\n * @author Anand Pandey\n * @param col - Column definition object containing filter config\n * @param event - Input event from the search textbox\n * @returns void\n */\n filterSetOptions(col: any, event: any) {\n const text = event.target.value.toLowerCase();\n col.filteredOptions = col.options.filter((option: any) =>\n String(option).toLowerCase().includes(text),\n );\n }\n\n /**\n * @description\n * Toggles an individual checkbox option inside a Set Filter. *\n * @author Anand Pandey\n * @param col - Column definition object\n * @param opt - Selected option value\n * @param event - Checkbox change event\n * @returns void\n */\n toggleSetOption(col: any, opt: any, event: any) {\n if (event.target.checked) col.selectedValues.add(opt);\n else col.selectedValues.delete(opt);\n\n this.applyAllFilters();\n }\n\n /**\n * @description * Selects or deselects all checkbox options in the Set Filter.\n * @author Anand Pandey\n * @param col - Column definition object\n * @param event - Checkbox change event\n * @returns void\n */\n toggleSelectAll(col: any, event: any) {\n if (event.target.checked) {\n col.options.forEach((option: any) => col.selectedValues.add(option));\n } else {\n col.selectedValues.clear();\n }\n this.applyAllFilters();\n }\n\n /**\n * @description\n * Checks whether all options inside a Set Filter are currently selected.\n * @author Anand Pandey\n * @param col - Column definition object\n * @returns boolean - TRUE if all options are selected, otherwise FALSE.\n */\n isAllSelected(col: any) {\n return (\n col.options?.length > 0 && col.options?.length === col.selectedValues.size\n );\n }\n\n /**\n * @description\n * Opens the three-dots column menu for the selected column.\n * Opens only the menu belonging to the clicked column index\n * @author Anand Pandey\n * @param {MouseEvent} event - The click event triggered on the three-dots icon.\n * @param {any} col - The column definition object for which menu is opened.\n * @param {number} index - Index of the column whose menu has been requested.\n * @returns {void}\n */\n openMenu(event: MouseEvent, col: any, index: number) {\n event.stopPropagation();\n this.showPin = false;\n this.activeFilterIndex = null;\n this.menuVisible = this.menuVisible.map(() => false);\n\n if (!this.menuVisible[index]) this.menuVisible[index] = false;\n\n this.menuVisible[index] = true;\n\n // setTimeout(() => {\n // const rect = (event.target as HTMLElement).getBoundingClientRect();\n // const el = this.colActionMenu?.nativeElement;\n // const leftAvailableSpace = rect.left;\n // const elWidth = el.offsetWidth;\n // if (leftAvailableSpace < elWidth) {\n // el.style.right = 'unset';\n // el.style.left = '0px';\n // }\n // });\n setTimeout(() => {\n const table = this.table?.nativeElement;\n const tableRect = table.getBoundingClientRect();\n const rect = (event.target as HTMLElement).getBoundingClientRect();\n const el = this.colActionMenu?.nativeElement;\n const elWidth = el.offsetWidth;\n const popUpLeftWidth = rect.left - elWidth;\n if (popUpLeftWidth < tableRect.left) {\n el.style.right = 'unset';\n el.style.left = '0px';\n }\n });\n }\n\n /**\n * @description Sort from three dots menu pop up.\n * @author Anand Pandey\n * @param {fieldName} string - fieldname.\n * @param {string} type - Type defines the sorting type whether this is ascending, descending.\n * @returns {void}\n */\n onSort(col: any, type: string, sortingColumIndex: number) {\n this.sortingType[sortingColumIndex] = type;\n this.sortingColumnIndex = sortingColumIndex;\n Object.keys(this.sortingType).forEach((k) => {\n if (k !== String(sortingColumIndex)) this.sortingType[k] = '';\n });\n if (this.sortingType[sortingColumIndex] == 'asc') {\n this.ascendingOrder(col);\n } else if (this.sortingType[sortingColumIndex] == 'dsc') {\n this.descendingOrder(col);\n } else {\n this.rowData = structuredClone(this.originalRowData);\n }\n // if (this.sortingType[sortingColumIndex] == '') {\n // this.rowData = this.originalRowData;\n // }\n this.getGroupedData();\n this.menuVisible[this.currentIndex] = false;\n }\n\n /**\n * @description Generates grouped data based on the selected `groupBy` columns..\n * @author Anand Pandey\n * @returns void\n */\n getGroupedData() {\n if (this.groupBy && this.groupBy.length > 0) {\n if (this.dynamicGroupingFiltering) {\n return;\n }\n this.groupedResult = this.groupData(this.rowData, this.groupBy) || [];\n }\n }\n\n /**\n * @description Initializes column resize operation when the user presses the mouse on the resize handle.\n * @author Anand Pandey\n * @param {MouseEvent} event - The mousedown event triggered on the resize handle.\n * @param {number} index - Index of the column being resized.\n * @returns {void}\n */\n startResize(event: MouseEvent, index: number) {\n event.preventDefault();\n event.stopPropagation();\n\n this.isResizing = true;\n this.resizingColumnIndex = index;\n this.startX = event.clientX;\n this.startWidth = this.colDefs[index].width ?? 150;\n\n this.zone.runOutsideAngular(() => {\n this.removeMouseMove = this.renderer.listen(\n 'document',\n 'mousemove',\n (e: MouseEvent) => this.onMouseMove(e),\n );\n\n this.removeMouseUp = this.renderer.listen(\n 'document',\n 'mouseup',\n (e: MouseEvent) => this.stopResize(e),\n );\n });\n }\n\n /**\n * @description Handles column resizing as the mouse moves.\n * @author Anand Pandey\n * @param {MouseEvent} event - Mouse movement event during resizing.\n * @returns {void}\n */\n onMouseMove = (event: MouseEvent) => {\n if (this.resizingColumnIndex == null || this.rafId) return;\n\n this.rafId = requestAnimationFrame(() => {\n const movement = event.clientX - this.startX;\n const newWidth = this.startWidth + movement;\n\n if (newWidth > 50) {\n this.zone.run(() => {\n this.colDefs[this.resizingColumnIndex!].width = newWidth;\n this.cd.markForCheck();\n });\n }\n\n this.rafId = null;\n });\n };\n\n /**\n * @description Stops the column resizing operation.\n * Clears resizing state and removes mouse event listeners.\n * @author Anand Pandey\n * @param {MouseEvent} event - Mouse up event ending the resize action.\n * @returns {void}\n */\n stopResize = (event: MouseEvent) => {\n event.stopPropagation();\n\n this.isResizing = false;\n this.resizingColumnIndex = null;\n\n this.removeMouseMove?.();\n this.removeMouseUp?.();\n\n if (this.rafId) {\n cancelAnimationFrame(this.rafId);\n this.rafId = null;\n }\n };\n\n /**\n * @description Recursively groups row data into a hierarchical structure based on the provided group keys.\n * @author Anand Pandey\n * @param {any[]} data - The row data to be grouped.\n * @param {string[]} groupKeys - Ordered list of column keys to group by.\n * @returns {any[]} A hierarchical grouped structure containing nested group nodes.\n */\n groupData(data: any[], groupKeys: string[]): any {\n if (groupKeys.length === 0) return data;\n const [currentKey, ...restKeys] = groupKeys;\n\n const groups: any = {};\n for (const row of data) {\n const key = row[currentKey] ?? '';\n if (!groups[key]) groups[key] = [];\n groups[key].push(row);\n }\n\n // recursively group child arrays\n\n let result = [];\n\n for (const key of Object.keys(groups)) {\n result.push({\n key,\n field: currentKey,\n expanded: false,\n children: this.groupData(groups[key], restKeys),\n });\n }\n\n return result;\n }\n\n /**\n * @description Toggles the expand/collapse state of a group node.\n * @author Anand Pandey\n * @param {any} node - The group node whose expanded state needs to be toggled.\n * @returns {void}\n */\n\n toggleGroup(node: any) {\n node.expanded = !node.expanded;\n }\n\n /**\n * @description Pin column on the left side.\n * @author Anand Pandey\n * @param {any} col - The selected column details from table on clicking pin or unpin from three dots menu.\n * @param {number} index - The index of column from table on clicking pin or unpin from three dots menu.\n * @returns {void}\n */\n\n pinColumn(col: any, index: number, direction: string) {\n this.pinActionClicked[col.colId] = direction;\n col.leftPinned = direction === 'left';\n col.rightPinned = direction === 'right';\n\n if (col.leftPinned) {\n this.colDefs.splice(index, 1);\n this.colDefs = [col, ...this.colDefs];\n } else if (col.rightPinned) {\n this.colDefs.splice(index, 1);\n this.colDefs.splice(this.colDefs.length - 1, 0, col);\n } else {\n const indx = this.originalColDefs.findIndex(\n (dt) => dt.fieldName === col.fieldName,\n );\n if (index >= 0) {\n this.colDefs.splice(index, 1);\n this.colDefs.splice(indx, 0, col);\n }\n }\n\n this.updatePinnedOffsets();\n this.onClickOutside();\n }\n\n showPinActions(event: MouseEvent) {\n event.stopPropagation();\n const parentEl = event.currentTarget as HTMLElement;\n\n this.showPin = true;\n setTimeout(() => {\n const menuEl = this.pinMenu?.nativeElement;\n if (!menuEl || !parentEl) return;\n const parentRect = parentEl.getBoundingClientRect();\n const menuWidth = menuEl.offsetWidth;\n\n const viewPortWidth = window.innerWidth;\n let x = parentRect.right;\n\n if (x + menuWidth > viewPortWidth) {\n menuEl.style.right = `${parentRect.width}px`;\n }\n });\n }\n\n hidePinActions() {\n this.showPin = false;\n }\n\n /**\n * @description Updates the horizontal left and right offsets of pinned columns by assigning cumulative widths to each pinned column and resetting non-pinned columns.\n * @author Anand Pandey\n * @returns void\n */\n\n updatePinnedOffsets() {\n let leftOffset = 0;\n let rightOffset = 0;\n\n // LEFT pinned (normal order)\n this.colDefs.forEach((col) => {\n if (col.leftPinned) {\n col.left = leftOffset;\n col.right = null;\n leftOffset += col.width || 120;\n }\n });\n\n // RIGHT pinned (REVERSE order)\n [...this.colDefs].reverse().forEach((col) => {\n if (col.rightPinned) {\n col.right = rightOffset;\n col.left = null;\n rightOffset += col.width || 120;\n }\n });\n }\n\n /**\n * @description Method to parse column value from rowdata object\n * according to given field value in column Defination\n * @author Tarun Kumar\n * @param row - current row object\n * @param toParse - field value\n * @returns string\n */\n parseColValue(row: any, col: any): any {\n if (!col?.fieldName?.includes('.')) {\n // if (Array.isArray(row[col.fieldName])) {\n // if (row[col.fieldName].every((dt: string) => typeof dt === 'string')) {\n // return row[col.fieldName][0];\n // }\n // if (row[col.fieldName].every((dt: any) => typeof dt === 'object')) {\n // return row[col.fieldName][0]?.[col.cellRendererParams?.tagKey];\n // }\n // }\n return row[col.fieldName] || 'N/A';\n } else {\n let toParseArr = col?.fieldName.split('.');\n let val = row;\n for (const key of toParseArr) {\n val = val?.[key];\n }\n return val || 'N/A';\n }\n }\n\n /**\n * @description method to reset table configuration\n * @author Tarun Kumar\n * @param none\n * @returns void\n */\n resetPagination(): void {\n //this.pageDetails.pageSize = 20;\n this.pageDetails.currentPage = 1;\n this.pageDetails.totalPages = 1;\n this.recordsToShow.min = 0;\n this.recordsToShow.max = this.pageDetails.pageSize;\n this.setPageCount();\n }\n\n /**\n * @description method to set total pages count\n * @author Tarun Kumar\n * @param none\n * @returns void\n */\n setPageCount(): void {\n this.pageDetails.totalPages = Math.ceil(\n this.totalRecords / this.pageDetails.pageSize,\n );\n }\n\n /**\n * @description method to update table on page size change\n * @author Tarun Kumar\n * @param event\n * @returns void\n */\n onPageSizeChanged(event: any): void {\n this.recordsToShow.min = 0;\n this.recordsToShow.max = parseInt(event);\n this.pageDetails.currentPage = 1;\n this.pageDetails.pageSize = parseInt(event);\n this.setPageCount();\n this.onPaginationChange.emit({\n page: this.pageDetails.currentPage - 1,\n pageSize: this.pageDetails.pageSize,\n });\n }\n\n /**\n * @description method to update table on previous button click\n * @author Tarun Kumar\n */\n onBtPrevClick(): void {\n this.recordsToShow.min = this.recordsToShow.min - this.pageDetails.pageSize;\n this.recordsToShow.max = this.recordsToShow.max - this.pageDetails.pageSize;\n if (this.pageDetails.currentPage > 1)\n this.pageDetails.currentPage = this.pageDetails.currentPage - 1;\n\n this.onPaginationChange.emit({\n page: this.pageDetails.currentPage - 1,\n pageSize: this.pageDetails.pageSize,\n });\n }\n\n /**\n * @description method to update table on next button click\n * @author Tarun Kumar\n */\n onBtNextClick(): void {\n this.recordsToShow.min = this.recordsToShow.min + this.pageDetails.pageSize;\n this.recordsToShow.max = this.recordsToShow.max + this.pageDetails.pageSize;\n\n if (this.pageDetails.currentPage < this.pageDetails.totalPages)\n this.pageDetails.currentPage = this.pageDetails.currentPage + 1;\n\n this.onPaginationChange.emit({\n page: this.pageDetails.currentPage - 1,\n pageSize: this.pageDetails.pageSize,\n });\n }\n\n /**\n * @description method to update table on selecting any page randomly\n * @author Tarun Kumar\n * @param event\n */\n goToSelectedPage(event: any): void {\n let pageNo = event.target.value;\n if (pageNo < 1) {\n this.pageDetails.currentPage = 1;\n } else if (pageNo > this.pageDetails.totalPages) {\n this.pageDetails.currentPage = this.pageDetails.totalPages;\n }\n this.recordsToShow.max =\n this.pageDetails.currentPage * this.pageDetails.pageSize;\n this.recordsToShow.min =\n this.pageDetails.currentPage * this.pageDetails.pageSize -\n this.pageDetails.pageSize;\n\n this.onPaginationChange.emit({\n page: this.pageDetails.currentPage - 1,\n pageSize: this.pageDetails.pageSize,\n });\n }\n\n /**\n * @description method to sort data according to type and column\n * @author Tarun Kumar\n * @param sortingColumIndex\n * @param col\n * @param sortingType\n */\n onSortingRowData(sortingColumIndex: number, col: any): void {\n if (!col.sortable) return;\n this.sortingColumnIndex = sortingColumIndex;\n Object.keys(this.sortingType).forEach((k) => {\n if (k !== String(sortingColumIndex)) this.sortingType[k] = '';\n });\n\n if (!this.sortingType[sortingColumIndex]) {\n this.sortingType[sortingColumIndex] = 'asc';\n } else {\n this.sortingType[sortingColumIndex] =\n this.sortingType[sortingColumIndex] === 'asc' ? 'dsc' : '';\n }\n\n if (this.sortingType[sortingColumIndex] == 'asc') {\n this.ascendingOrder(col);\n } else if (this.sortingType[sortingColumIndex] == 'dsc') {\n this.descendingOrder(col);\n } else {\n this.rowData = structuredClone(this.originalRowData);\n }\n\n this.getGroupedData();\n }\n\n /**\n * @description method to sort table in ascending order according to given field\n * @param fieldName\n */\n ascendingOrder(col: any): void {\n this.rowData = this.rowData.sort((a, b) => {\n const valA = this.parseColValue(a, col);\n const valB = this.parseColValue(b, col);\n if (typeof valA === 'string' && typeof valB === 'string') {\n return valA.localeCompare(valB);\n } else {\n if (valA > valB) {\n return 1;\n } else {\n return -1;\n }\n }\n });\n }\n\n /**\n * @description method to sort table in descending order according to given field\n * @param fieldName\n */\n descendingOrder(col: any): void {\n this.rowData = this.rowData.sort((a, b) => {\n const valA = this.parseColValue(a, col);\n const valB = this.parseColValue(b, col);\n if (typeof valA === 'string' && typeof valB === 'string') {\n return valA.localeCompare(valB) * -1;\n } else {\n if (valA > valB) {\n return -1;\n } else {\n return 1;\n }\n }\n });\n }\n\n /**\n * @description method to check/uncheck all rows on header checkbox selection/deselection\n * @author Tarun Kumar\n * @param event\n */\n onHeaderCheckboxChange(event: any): void {\n if (event.target.checked) {\n this.rowData = this.rowData.map((data) => {\n data.isSelected = true;\n return data;\n });\n this.selectedRow = JSON.parse(JSON.stringify(this.rowData));\n this.onCheckboxSelection.emit(this.rowData);\n } else {\n this.rowData = this.rowData.map((data) => {\n if (!data.isLocked) data.isSelected = false;\n return data;\n });\n this.selectedRow = [];\n this.onCheckboxSelection.emit([]);\n }\n }\n\n /**\n * @description method to check/uncheck row on row checkbox selection/deselection\n * @author Tarun Kumar\n * @param event\n */\n onRowCheckboxSelection(event: any): void {\n event.stopPropagation();\n if (event.target.checked) {\n let ind = this.rowData.findIndex(\n (item: any) => item.rowId == event.target.id,\n );\n this.rowData[ind].isSelected = true;\n if (\n this.checkboxSelectionType != 'multiple' &&\n this.selectedRow.length > 0\n ) {\n (\n document.getElementById(this.selectedRow[0].rowId) as HTMLInputElement\n ).checked = false;\n this.selectedRow = [];\n }\n this.selectedRow.push(this.rowData[ind]);\n\n this.onCheckboxSelection.emit(this.selectedRow);\n } else {\n let ind = this.rowData.findIndex(\n (item: any) => item.rowId == event.target.id,\n );\n this.rowData[ind].isSelected = false;\n let i = this.selectedRow.findIndex(\n (item: any) => item.rowId == event.target.id,\n );\n this.selectedRow.splice(i, 1);\n this.onCheckboxSelection.emit(this.selectedRow);\n }\n this.cd.detectChanges();\n }\n /**\n * @description method to check/uncheck all rows on header checkbox selection/deselection\n * @author Tarun Kumar\n * @param col\n * @returns {object}\n */\n getStyle(col: any, type?: string): object {\n const style: any = {\n width: `${col.width ?? 150}px`,\n minWidth: `${col.minWidth ?? 50}px`,\n maxWidth: `${col.maxWidth}px`,\n };\n if (col.isAction) {\n style.position = 'sticky';\n style.right = '0px';\n style.zIndex = 14;\n style.background = '#fff';\n style.width = '60px';\n style.minWidth = '60px';\n } else if (col.leftPinned) {\n style.position = 'sticky';\n style.left = col.left + 'px';\n style.zIndex = 12;\n style.background = '#fff';\n } else if (col.rightPinned) {\n style.position = 'sticky';\n style.right = col.right + 'px';\n style.zIndex = 12;\n style.background = '#fff';\n } else {\n style.position = '';\n }\n if (type === 'action') {\n style.background = '#f0f0f0';\n }\n return style;\n }\n onClickOutside() {\n this.showPageSizeList = false;\n this.activeFilterIndex = null;\n this.menuVisible = this.menuVisible.map(() => false);\n }\n\n infinityScroll(event: any) {\n if (\n event.target.offsetHeight + event.target.scrollTop >=\n event.target.scrollHeight - 1 &&\n this.rowData.length\n ) {\n this.onScrollEmitter.emit();\n }\n }\n\n checkAllSelected(): boolean {\n if (!this.rowData.length) return false;\n return this.selectedRow.length == this.rowData.length;\n }\n checkInterminate(): boolean {\n if (!this.rowData.length) return false;\n return (\n this.selectedRow.length > 0 &&\n this.selectedRow.length < this.rowData.length\n );\n }\n\n /**\n * @author Tarun Kumar\n * @description function triggered when the drag starts\n * @param {event object, index}\n * @returns {void}\n */\n onDragStart(event: DragEvent, index: number) {\n this.dragGroupIndex = null;\n const target = event.target as HTMLElement;\n if (this.isResizing) {\n event.preventDefault();\n return;\n }\n this.draggedIndex = index;\n\n // For column reorder.\n event.dataTransfer?.setData('text/plain', index.toString());\n\n // For group panel\n event.dataTransfer?.setData('columnIndex', index.toString());\n\n const th = target.closest('th') as HTMLElement;\n if (!th) return;\n const clone = th.cloneNode(true) as HTMLElement;\n\n this.copyComputedStyles(th, clone);\n\n clone.style.position = 'absolute';\n clone.style.top = '-9999px';\n clone.style.left = '-9999px';\n clone.style.pointerEvents = 'none';\n\n document.body.appendChild(clone);\n event.dataTransfer?.setDragImage(clone, 0, 0);\n setTimeout(() => clone.remove(), 0);\n }\n\n onGroupDragStart(event: DragEvent, index: number) {\n event.dataTransfer?.setData('groupIndex', index.toString());\n this.dragGroupIndex = index;\n }\n\n /**\n * @author Anand Pandey\n * @description Copies computed CSS styles from the source element to the target element, including all child elements recursively.\n * @param {HTMLElement} source - Original element.\n * @param {HTMLElement} target - Cloned element.\n * @returns {void}\n */\n copyComputedStyles(source: HTMLElement, target: HTMLElement) {\n const computed = window.getComputedStyle(source);\n for (const prop of computed) {\n target.style.setProperty(prop, computed.getPropertyValue(prop));\n }\n\n // Copy children styles recursively\n const sourceChildren = Array.from(source.children) as HTMLElement[];\n const targetChildren = Array.from(target.children) as HTMLElement[];\n\n sourceChildren.forEach((srcChild, i) => {\n const tgtChild = targetChildren[i] as HTMLElement;\n if (srcChild && tgtChild) {\n this.copyComputedStyles(srcChild, tgtChild);\n }\n });\n }\n\n /**\n * @author Tarun Kumar\n * @description function to track the index of the element being dragged over and allow dropping\n * @param {event object, index}\n * @returns {void}\n */\n onDragOver(event: DragEvent, index: number) {\n event.preventDefault();\n this.isResizing = false;\n if (this.dragOverIndex !== index) {\n this.dragOverIndex = index;\n }\n }\n\n /**\n * @author Tarun Kumar\n * @description function to Reorder the items on drop\n * @param {event object, index}\n * @returns {void}\n */\n onDrop(event: DragEvent, index: number) {\n event.preventDefault();\n if (this.draggedIndex === null) return;\n const draggedItem = this.colDefs[this.draggedIndex];\n this.colDefs.splice(this.draggedIndex, 1);\n this.colDefs.splice(index, 0, draggedItem);\n this.draggedIndex = null;\n this.dragOverIndex = null;\n }\n\n /**\n * @author Tarun Kumar\n * @description function to reset dragOverIndex when the drag ends\n * @param {none}\n * @returns {void}\n */\n onDragEnd() {\n this.draggedIndex = null;\n this.dragOverIndex = null;\n }\n\n /**\n * @description Handles drag over on group panel to allow dropping.\n * @author Anand Pandey\n * @param {DragEvent} event\n * @returns {void}\n */\n onGroupDragOver(event: DragEvent) {\n event.preventDefault();\n }\n\n /**\n * @description Handles drag over on a group tag and updates the target index for reordering.\n * @author Anand Pandey\n * @param {DragEvent} event\n * @param {number} index\n * @returns {void}\n */\n onActiveDragOver(event: DragEvent, index: number) {\n event.preventDefault();\n event.stopPropagation();\n this.dragGroupIndex = index;\n }\n\n /**\n * @description Handles drop on group panel and routes the drop to group reordering or column grouping logic.\n * @author Anand Pandey\n * @param {DragEvent} event\n * @returns {void}\n */\n onGroupDrop(event: DragEvent) {\n const colIndex = Number(event.dataTransfer?.getData('columnIndex'));\n const groupIndex = Number(event.dataTransfer?.getData('groupIndex'));\n const target = event.target as HTMLElement;\n const isOverGroupPanel = target.closest('.group-tag');\n if (\n this.dragGroupIndex !== null &&\n this.dragGroupIndex >= 0 &&\n groupIndex >= 0\n ) {\n if (!isOverGroupPanel) {\n this.dragGroupIndex = this.activeGroups.length - 1;\n }\n this.onActiveGroupDrop(event, this.dragGroupIndex);\n } else {\n if (isNaN(colIndex)) return;\n if (colIndex) this.dragGroupIndex = null;\n\n const col = this.colDefs[colIndex];\n\n const el = this.activeGroups.find((c) => c.fieldName === col.fieldName);\n if (!el) {\n this.activeGroups.push(col);\n this.groupBy.push(col.fieldName);\n }\n this.colDefs.splice(colIndex, 1);\n if (this.dynamicGroupingFiltering) {\n this.activeGroupsEvent.emit(this.groupBy);\n return;\n }\n // this.applyGrouping();\n this.getGroupedData();\n }\n }\n\n /**\n * @description Handles column grouping triggered from the column action menu by adding the column to the active group list,\n * removing it from visible columns, and recalculating grouped row data.\n *\n * @param {any} col - The column definition selected for grouping.\n * @param {number} index - Index of the column in the current column definitions array.\n * @returns {void}\n */\n\n groupByColumnAction(col: any, index: number) {\n this.activeGroups.push(col);\n this.groupBy.push(col.fieldName);\n this.colDefs.splice(index, 1);\n if (this.dynamicGroupingFiltering) {\n this.activeGroupsEvent.emit(this.groupBy);\n return;\n }\n this.getGroupedData();\n this.onClickOutside();\n }\n\n /**\n * @description Handles drop on a group tag and reorders the active groups accordingly.\n * @author Anand Pandey\n * @param {DragEvent} event\n * @param {number} index\n * @returns {void}\n */\n onActiveGroupDrop(event: DragEvent, index: number) {\n event.stopPropagation();\n const groupIndex = Number(event.dataTransfer?.getData('groupIndex'));\n if (isNaN(groupIndex)) return;\n if (groupIndex === index) return;\n const item = this.groupBy.splice(groupIndex, 1)[0];\n this.groupBy.splice(index, 0, item);\n\n const col = this.activeGroups.splice(groupIndex, 1)[0];\n this.activeGroups.splice(index, 0, col);\n if (this.dynamicGroupingFiltering) {\n this.activeGroupsEvent.emit(this.groupBy);\n return;\n }\n this.getGroupedData();\n }\n\n /**\n * @description Removes a group tag and restores the column to available columns list.\n * @author Anand Pandey\n * @param {any} col\n * @param {number} id\n * @returns {void}\n */\n removeGroup(col: any, id: number) {\n this.activeGroups.splice(id, 1);\n const colIndex = this.originalColDefs.findIndex(\n (dt) => dt.fieldName === col.fieldName,\n );\n this.colDefs.splice(colIndex, 0, col);\n this.groupBy.splice(id, 1);\n if (this.groupBy.length === 0) {\n this.groupedResult = [];\n if (this.dynamicGroupingFiltering) {\n this.activeGroupsEvent.emit(this.groupBy);\n return;\n }\n } else {\n if (this.dynamicGroupingFiltering) {\n this.activeGroupsEvent.emit(this.groupBy);\n return;\n }\n this.getGroupedData();\n }\n }\n\n toggleDropdown(): void {\n this.showDropdown = !this.showDropdown;\n }\n\n selectFilter(option: any, col: any): void {\n col.filters[0].filterOperation = option.value;\n this.showDropdown = false;\n }\n\n getSelectedFilterLabel(value: string): string {\n return this.filterOptions.find((o) => o.value === value)?.label || '';\n }\n\n toggleFilter(col: any, index: number, event: MouseEvent) {\n event.stopPropagation();\n this.activeFilterIndex = this.activeFilterIndex === index ? null : index;\n this.menuVisible = this.menuVisible.map(() => false);\n }\n\n onMouseEnterHeader(index: number) {\n this.showMoveIcon[index] = true;\n }\n\n onMouseLeaveHeader(index: number) {\n this.showMoveIcon[index] = false;\n }\n\n enableColumnDrag(event: MouseEvent, index: number) {\n event.stopPropagation();\n this.columnDraggable[index] = true;\n }\n\n disableColumnDrag(event: MouseEvent, index: number) {\n event.stopPropagation();\n this.columnDraggable[index] = false;\n }\n\n dateTimeSelected(date: any) {\n this.applyAllFilters();\n }\n\n convertToNumber(value: number | string): number {\n return Number(value);\n }\n\n hideSettings(): void {\n this.onHideSettings.emit(false);\n }\n\n dragRow(e: Event, row: any) {\n this.draggedRowData = row;\n this.isRowSelected = this.selectedRow.some((s) => s.rowId === row.rowId);\n }\n\n allowRowDrop(e: Event) {\n e.preventDefault();\n }\n dropRow(targetRow: any) {\n let sourceIndex = null;\n let targetIndex = this.rowData.findIndex(\n (dt: any) => dt.rowId === targetRow.rowId,\n );\n\n if (this.selectedRow.length > 0 && this.isRowSelected) {\n sourceIndex = this.rowData.findIndex(\n (dt: any) => dt.rowId === this.selectedRow[0].rowId,\n );\n\n const selectedIds = new Set(this.selectedRow.map((r) => r.rowId));\n this.rowData = this.rowData.filter((dt) => !selectedIds.has(dt.rowId));\n if (sourceIndex > this.rowData.length) {\n sourceIndex = sourceIndex - this.selectedRow.length + 1;\n }\n\n if (targetIndex >= this.rowData.length) {\n targetIndex = targetIndex - this.selectedRow.length + 1;\n }\n this.rowData.splice(sourceIndex, 0, ...this.selectedRow);\n } else {\n sourceIndex = this.rowData.findIndex(\n (dt: any) => dt.rowId === this.draggedRowData.rowId,\n );\n }\n if (sourceIndex < 0 || targetIndex < 0) return;\n this.moveRow(sourceIndex, targetIndex);\n }\n\n moveRow(from: number, to: number) {\n let rowMoved = [];\n if (this.selectedRow.length > 0 && this.isRowSelected) {\n rowMoved = this.rowData.splice(from, this.selectedRow.length);\n } else {\n rowMoved = this.rowData.splice(from, 1);\n }\n\n this.rowData.splice(to, 0, ...rowMoved);\n this.isRowSelected = false;\n }\n\n clearAllFilter() {\n this.colDefs?.forEach((col) => {\n this.resetFilter(col);\n });\n }\n\n onBtFirstClick(): void {\n this.pageDetails.currentPage = 1;\n this.recordsToShow.min = 0;\n this.recordsToShow.max = this.pageDetails.pageSize;\n\n this.onPaginationChange.emit({\n page: this.pageDetails.currentPage - 1,\n pageSize: this.pageDetails.pageSize,\n });\n }\n\n onBtLastClick(): void {\n this.pageDetails.currentPage = this.pageDetails.totalPages;\n this.recordsToShow.max = this.pageDetails.currentPage * this.pageDetails.pageSize;\n this.recordsToShow.min = this.pageDetails.currentPage * this.pageDetails.pageSize - this.pageDetails.pageSize;\n\n this.onPaginationChange.emit({\n page: this.pageDetails.currentPage - 1,\n pageSize: this.pageDetails.pageSize,\n });\n }\n\n onRowClick(row: any) {\n this.onRowClicked.emit({ row });\n }\n\n onCellClick(row: any, col: any) {\n this.onCellClicked.emit({ row, col });\n }\n}\n","<div class=\"tableArea\" #table>\n @if (settingsRequired && settingsClicked) {\n <div\n class=\"setting_options\"\n appOutsideClick\n (clickOutside)=\"hideSettings()\"\n >\n <div class=\"column_header\">Select Headers</div>\n <div class=\"checkbox_container\">\n <input\n class=\"custom_check_box\"\n type=\"checkbox\"\n [checked]=\"activeAll\"\n (change)=\"activeAllSelection($event)\"\n />\n <span>Select All</span>\n </div>\n\n <div class=\"item_container\" id=\"table_scroll\">\n @for (col of colDefs; track col.colId) {\n <div class=\"column_item checkbox_container\">\n <input\n class=\"custom_check_box\"\n type=\"checkbox\"\n [checked]=\"col.active\"\n (change)=\"changeActiveColSelection($event, col)\"\n [disabled]=\"col.headerLocked\"\n />\n <span>{{ col.headerName | titlecase }}</span>\n </div>\n }\n </div>\n </div>\n }\n @if (groupByRequired) {\n <!-- Group Panel -->\n <div\n class=\"group_panel\"\n (dragover)=\"onGroupDragOver($event)\"\n (drop)=\"onGroupDrop($event)\"\n >\n <img alt=\"\" src=\"images/t-data-pipeline.svg\" class=\"icon\" />\n @for (g of activeGroups; track $index) {\n <div\n class=\"group_tag\"\n draggable=\"true\"\n (dragstart)=\"onGroupDragStart($event, $index)\"\n (dragover)=\"onActiveDragOver($event, $index)\"\n (drop)=\"onActiveGroupDrop($event, $index)\"\n >\n <img src=\"images/t-gripper.svg\" alt=\"\" />\n <span>{{ g.headerName }}</span>\n <button class=\"remove_tag\" (click)=\"removeGroup(g, $index)\">\n <img src=\"images/t-x.svg\" alt=\"\" />\n </button>\n </div>\n <img src=\"images/chevron-right.svg\" alt=\"\" class=\"divider\" />\n }\n @if (activeGroups.length === 0) {\n <div class=\"group_placeholder\">Drag here to set row groups</div>\n }\n </div>\n }\n @if (activeFilters.size > 0) {\n <div class=\"active_filters_container\">\n <div class=\"tag_wrapper\">\n @for (filter of appliedFilters; track filter.fieldName) {\n @if(filter.filters?.length) {\n <div class=\"active_filter_tag\">\n <div class=\"active_filter_label ellipsis\">\n @for (item of filter.filters; track $index) {\n @if (item.filterValue) {\n @if ($index > 0 && item.filterValue) {\n <span class=\"filter_logic\"> {{ filter.filterLogic }} </span>\n }\n <span class=\"filter_field\">{{ filter.fieldName.split('.')[0] }}:</span>\n <span class=\"\"> {{ (item.filterOperation == '=' || item.filterOperation == 'equals') ? ':' : item.filterOperation }}</span>\n <span class=\"filter_value\">{{ item.filterValue }}</span>\n }\n }\n </div>\n <button\n class=\"remove_filter_btn\"\n (click)=\"removeActiveFilter(filter)\"\n >\n <img src=\"images/t-x.svg\" alt=\"\" />\n </button>\n </div>\n } \n }\n </div>\n <div class=\"clear_all\" (click)=\"clearAllFilter()\">Clear All Filters</div>\n </div>\n }\n <div\n class=\"table_wrapper global\"\n id=\"table_scroll\"\n #parent\n (scroll)=\"infinityScroll($event)\"\n [ngClass]=\"{ tbody_height: activeFilters.size > 0 }\"\n [class.no-horizontal-scroll]=\"\n (!rowData || rowData.length === 0) &&\n (!groupedResult || groupedResult.length === 0)\n \"\n >\n <div class=\"table-inner-wrapper\">\n <table cellspacing=\"0\" cellpadding=\"0\">\n <thead class=\"sticky-top\">\n <tr>\n @if (\n checkBoxSelection &&\n checkboxSelectionType == \"multiple\" &&\n atLeastOneColumnChecked\n ) {\n <th style=\"min-width: 50px; width: 50px\">\n <div class=\"th_wraper\">\n <span class=\"checkbox_container\"\n ><input\n class=\"pointer custom_check_box\"\n type=\"checkbox\"\n name=\"\"\n id=\"\"\n [checked]=\"checkAllSelected()\"\n [indeterminate]=\"checkInterminate()\"\n (change)=\"onHeaderCheckboxChange($event)\"\n /></span>\n <div class=\"filter_three_dot_wrapper\">\n <span class=\"resize-handle default_cursor\"> | </span>\n </div>\n </div>\n </th>\n }\n @else{\n @if(checkBoxSelection && checkboxSelectionType == \"single\") {\n <th style=\"min-width: 50px; width: 50px\"></th>\n }\n } \n @if (activeGroups.length > 0) {\n <th class=\"active_group\">\n <div class=\"th_wraper\">\n <div class=\"text_wrapper\">\n <span class=\"ellipsis headerName\">Group</span>\n </div>\n <div class=\"filter_three_dot_wrapper\">\n <div class=\"three-dots\">\n <img src=\"images/t-more-vertical.svg\" />\n </div>\n </div>\n </div>\n </th>\n }\n @for (col of colDefs; track col.colId) {\n @if (col.active) {\n <th\n [ngStyle]=\"getStyle(col, 'action')\"\n [ngClass]=\"{\n 'drag-over': dragOverIndex === $index,\n pinned_column: col.leftPinned || col.rightPinned,\n }\"\n (dragover)=\"onDragOver($event, $index)\"\n (drop)=\"onDrop($event, $index)\"\n (mouseenter)=\"onMouseEnterHeader($index)\"\n (mouseleave)=\"onMouseLeaveHeader($index)\"\n >\n <div class=\"th_wraper\">\n <div\n class=\"text_wrapper\"\n [ngStyle]=\"getStyle(col, 'action')\"\n (click)=\"onSortingRowData($index, col)\"\n >\n @if (showMoveIcon[$index] && !col.isAction) {\n <img\n src=\"images/t-move.svg\"\n class=\"move-icon\"\n [draggable]=\"!isResizing || columnDraggable[$index]\"\n (dragstart)=\"onDragStart($event, $index)\"\n (dragend)=\"onDragEnd()\"\n (mouseenter)=\"enableColumnDrag($event, $index)\"\n (mouseleave)=\"disableColumnDrag($event, $index)\"\n />\n }\n <span class=\"ellipsis headerName\">{{\n col?.headerName\n }}</span>\n\n @if (\n sortingRequired &&\n sortingColumnIndex == $index &&\n col?.sortable &&\n !col.isAction\n ) {\n <span class=\"sorting_icon\">\n @if (sortingType[$index] === \"asc\") {\n <img\n src=\"images/t-arrow-up.svg\"\n class=\"sorting_up\"\n [draggable]=\"false\"\n (dragstart)=\"\n $event.preventDefault();\n $event.stopPropagation()\n \"\n />\n }\n @if (sortingType[$index] === \"dsc\") {\n <!-- <i class=\"fa fa-caret-down\" [ngClass]=\"sortingColumnIndex == $index && sortingType == 'dsc' ? 'muted_sort' : ''\"></i> -->\n <img\n src=\"images/t-arrow-down.svg\"\n class=\"sorting_down\"\n [draggable]=\"false\"\n (dragstart)=\"\n $event.preventDefault();\n $event.stopPropagation()\n \"\n />\n }\n </span>\n }\n </div>\n <div class=\"filter_three_dot_wrapper\">\n <!-- Column Filters Logic-->\n @if (filterRequired && col.filterable) {\n <div\n #trigger\n class=\"filters\"\n (click)=\"toggleFilter(col, $index, $event)\"\n >\n @if (activeFilters.has(col.fieldName)) {\n <img\n src=\"images/t-filter-applied.svg\"\n class=\"filter-icon\"\n [draggable]=\"false\"\n (dragstart)=\"\n $event.preventDefault();\n $event.stopPropagation()\n \"\n />\n } @else {\n <img\n src=\"images/t-filter.svg\"\n class=\"filter-icon\"\n [draggable]=\"false\"\n (dragstart)=\"\n $event.preventDefault();\n $event.stopPropagation()\n \"\n />\n }\n @if (activeFilterIndex === $index) {\n <div class=\"filt_wrap\">\n <div\n adaptivePosition\n [trigger]=\"trigger\"\n [parentContainer]=\"parent\"\n [matchWidth]=\"false\"\n class=\"filter_wrapper\"\n id=\"filter_wrapper-{{ $index }}\"\n (click)=\"$event.stopPropagation()\"\n appOutsideClick\n (clickOutside)=\"onClickOutside()\"\n >\n <!-- Text Filter -->\n @if (col.filterType === \"text\") {\n <lib-common-input\n [options]=\"filterOptions\"\n [selectedValue]=\"\n col.filters[0].filterOperation\n \"\n placeholder=\"Select filter\"\n (valueChange)=\"\n col.filters[0].filterOperation = $event;\n applyAllFilters()\n \"\n ></lib-common-input>\n\n <div class=\"search_input\">\n <img src=\"images/search.svg\" alt=\"\" />\n <input\n type=\"text\"\n placeholder=\"Filter\"\n [(ngModel)]=\"col.filters[0].filterValue\"\n (keyup)=\"applyAllFilters()\"\n />\n </div>\n\n @if (col.filters[0].filterValue) {\n <div class=\"logic-row radio_option\">\n <input\n type=\"radio\"\n name=\"filterLogic{{ col.fieldName }}\"\n [(ngModel)]=\"col.filterLogic\"\n value=\"AND\"\n id=\"{{ $index }}\"\n (change)=\"applyAllFilters()\"\n />\n <label [for]=\"$index\">AND</label>\n\n <input\n type=\"radio\"\n name=\"filterLogic{{ col.fieldName }}\"\n [(ngModel)]=\"col.filterLogic\"\n value=\"OR\"\n id=\"{{ $index + 1 }}\"\n (change)=\"applyAllFilters()\"\n />\n <label [for]=\"$index + 1\">OR</label>\n </div>\n\n <lib-common-input\n [options]=\"filterOptions\"\n [selectedValue]=\"\n col.filters[1].filterOperation\n \"\n placeholder=\"Select filter\"\n (valueChange)=\"\n col.filters[1].filterOperation = $event;\n applyAllFilters()\n \"\n ></lib-common-input>\n <!-- <input\n type=\"text\"\n [(ngModel)]=\"col.filters[1].filterValue\"\n placeholder=\"Filter…\"\n (keyup)=\"applyAllFilters()\"\n /> -->\n\n <div class=\"search_input\">\n <img src=\"images/search.svg\" alt=\"\" />\n <input\n type=\"text\"\n placeholder=\"Filter\"\n [(ngModel)]=\"col.filters[1].filterValue\"\n (keyup)=\"applyAllFilters()\"\n />\n </div>\n }\n }\n\n <!-- Number Filter -->\n @if (col.filterType === \"number\") {\n <lib-common-input\n [options]=\"numberFilterOptions\"\n [selectedValue]=\"\n col.filters[0].filterOperation\n \"\n placeholder=\"Select filter\"\n (valueChange)=\"\n col.filters[0].filterOperation = $event;\n applyAllFilters()\n \"\n ></lib-common-input>\n\n <!-- <input\n type=\"number\"\n [(ngModel)]=\"col.filters[0].filterValue\"\n (input)=\"applyAllFilters()\"\n /> -->\n\n <div class=\"search_input\">\n <img src=\"images/search.svg\" alt=\"\" />\n <input\n type=\"number\"\n placeholder=\"Filter\"\n [(ngModel)]=\"col.filters[0].filterValue\"\n (input)=\"applyAllFilters()\"\n />\n </div>\n\n @if (col.filters[0].filterValue) {\n <div class=\"logic-row radio_option\">\n <input\n type=\"radio\"\n name=\"filterLogic{{ col.fieldName }}\"\n [(ngModel)]=\"col.filterLogic\"\n value=\"AND\"\n id=\"{{ $index }}\"\n (change)=\"applyAllFilters()\"\n />\n <label [for]=\"$index\">AND</label>\n\n <input\n type=\"radio\"\n name=\"filterLogic{{ col.fieldName }}\"\n [(ngModel)]=\"col.filterLogic\"\n value=\"OR\"\n id=\"{{ $index + 1 }}\"\n (change)=\"applyAllFilters()\"\n />\n <label [for]=\"$index + 1\">OR</label>\n </div>\n\n <lib-common-input\n [options]=\"numberFilterOptions\"\n [selectedValue]=\"\n col.filters[1].filterOperation\n \"\n placeholder=\"Select filter\"\n (valueChange)=\"\n col.filters[1].filterOperation = $event;\n applyAllFilters()\n \"\n ></lib-common-input>\n\n <div class=\"search_input\">\n <img src=\"images/search.svg\" alt=\"\" />\n <input\n type=\"text\"\n placeholder=\"Filter\"\n [(ngModel)]=\"col.filters[1].filterValue\"\n (keyup)=\"applyAllFilters()\"\n />\n </div>\n <!-- <input\n type=\"text\"\n [(ngModel)]=\"col.filters[1].filterValue\"\n placeholder=\"Filter…\"\n (keyup)=\"applyAllFilters()\"\n /> -->\n }\n }\n\n <!-- DATE FILTER -->\n @if (col.filterType === \"date\") {\n <lib-common-input\n [options]=\"numberFilterOptions\"\n [selectedValue]=\"\n col.filters[0].filterOperation\n \"\n placeholder=\"Select filter\"\n (valueChange)=\"\n col.filters[0].filterOperation = $event;\n applyAllFilters()\n \"\n ></lib-common-input>\n\n <!-- <input\n type=\"date\"\n [(ngModel)]=\"col.filters[0].filterValue\"\n (change)=\"applyAllFilters()\"\n /> -->\n <lib-common-calendar\n [dateConfig]=\"dateConfig\"\n [(ngModel)]=\"col.filters[0].filterValue\"\n [preSelectedValue]=\"\n col.filters[0].filterValue\n \"\n (dateTimeSelected)=\"\n dateTimeSelected($event)\n \"\n ></lib-common-calendar>\n\n @if (col.filters[0].filterValue) {\n <div class=\"logic-row radio_option\">\n <input\n type=\"radio\"\n name=\"filterLogic{{ col.fieldName }}\"\n [(ngModel)]=\"col.filterLogic\"\n value=\"AND\"\n id=\"{{ $index }}\"\n (change)=\"applyAllFilters()\"\n />\n <label [for]=\"$index\">AND</label>\n\n <input\n type=\"radio\"\n name=\"filterLogic{{ col.fieldName }}\"\n [(ngModel)]=\"col.filterLogic\"\n value=\"OR\"\n id=\"{{ $index + 1 }}\"\n (change)=\"applyAllFilters()\"\n />\n <label [for]=\"$index + 1\">OR</label>\n </div>\n\n <lib-common-input\n [options]=\"numberFilterOptions\"\n [selectedValue]=\"\n col.filters[1].filterOperation\n \"\n placeholder=\"Select filter\"\n (valueChange)=\"\n col.filters[1].filterOperation = $event;\n applyAllFilters()\n \"\n ></lib-common-input>\n\n <lib-common-calendar\n [dateConfig]=\"dateConfig\"\n [(ngModel)]=\"col.filters[1].filterValue\"\n [preSelectedValue]=\"\n col.filters[1].filterValue\n \"\n (dateTimeSelected)=\"\n dateTimeSelected($event)\n \"\n ></lib-common-calendar>\n }\n }\n\n <!-- SET FILTER (CHECKBOX LIST) -->\n @if (col.filterType === \"set\") {\n <!-- <input\n type=\"text\"\n placeholder=\"Search...\"\n (input)=\"filterSetOptions(col, $event)\"\n /> -->\n <div class=\"search_input\">\n <img src=\"images/search.svg\" alt=\"\" />\n <input\n type=\"text\"\n placeholder=\"Search...\"\n (input)=\"filterSetOptions(col, $event)\"\n />\n </div>\n\n <div class=\"set_option_details\">\n <label class=\"checkbox_container\">\n <input\n class=\"custom_check_box\"\n type=\"checkbox\"\n [checked]=\"isAllSelected(col)\"\n (change)=\"toggleSelectAll(col, $event)\"\n />\n (Select All)\n </label>\n <div class=\"set_options\" id=\"table_scroll\">\n @for (\n opt of col.filteredOptions;\n track $index\n ) {\n <label class=\"checkbox_container\">\n <input\n class=\"custom_check_box\"\n type=\"checkbox\"\n [checked]=\"\n col.selectedValues.has(opt)\n \"\n (change)=\"\n toggleSetOption(col, opt, $event)\n \"\n />\n {{ opt }}\n </label>\n }\n </div>\n </div>\n }\n <div class=\"filter_btn\">\n <button\n class=\"reset_btn\"\n type=\"button\"\n (click)=\"resetFilter(col)\"\n >\n Reset\n </button>\n </div>\n </div>\n </div>\n }\n </div>\n }\n\n <!-- Three dots menu-->\n <div #triggerColMenu>\n @if (threeDotsMenuRequired && col.columnAction) {\n <div\n class=\"three-dots\"\n (click)=\"openMenu($event, col, $index)\"\n >\n <img\n src=\"images/t-more-vertical.svg\"\n [draggable]=\"false\"\n (dragstart)=\"\n $event.preventDefault();\n $event.stopPropagation()\n \"\n />\n </div>\n }\n </div>\n @if (!col.isAction) {\n <span\n class=\"resize-handle\"\n (mousedown)=\"startResize($event, $index)\"\n >\n |\n </span>\n }\n </div>\n </div>\n\n <!-- popup open -->\n @if (menuVisible[$index]) {\n <div\n #colActionMenu\n class=\"dropdown_wrapper\"\n adaptivePosition\n [trigger]=\"triggerColMenu\"\n [parentContainer]=\"parent\"\n [matchWidth]=\"false\"\n [isColumnActionMenu]=\"true\"\n (click)=\"$event.stopPropagation()\"\n appOutsideClick\n (clickOutside)=\"onClickOutside()\"\n >\n <div class=\"right_click_dropdown\" id=\"table_scroll\">\n @if (\n sortingType[$index] === \"dsc\" ||\n sortingType[$index] === \"\"\n ) {\n <div\n class=\"right_click_item\"\n (click)=\"onSort(col, 'asc', $index)\"\n >\n <div class=\"left_item\">\n <img\n src=\"images/arrow-up.svg\"\n class=\"sorting_up\"\n [ngClass]=\"{ disable: !col.sortable }\"\n />\n <span class=\"text\">Sort Ascending</span>\n </div>\n </div>\n }\n @if (\n sortingType[$index] === \"asc\" ||\n sortingType[$index] === \"\"\n ) {\n <div\n class=\"right_click_item\"\n (click)=\"onSort(col, 'dsc', $index)\"\n >\n <div class=\"left_item\">\n <img src=\"images/arrow-down.svg\" />\n <span class=\"text\">Sort Descending</span>\n </div>\n </div>\n }\n @if (\n sortingType[$index] === \"asc\" ||\n sortingType[$index] === \"dsc\"\n ) {\n <div\n class=\"right_click_item\"\n (click)=\"onSort(col, '', $index)\"\n >\n <div class=\"left_item\">\n <img src=\"images/trash-2.svg\" />\n <span class=\"text\">Clear Sort</span>\n </div>\n </div>\n }\n <div class=\"divder\"></div>\n\n <div\n class=\"right_click_item\"\n (mouseenter)=\"showPinActions($event)\"\n (mouseleave)=\"hidePinActions()\"\n >\n <div class=\"left_item\">\n <img src=\"images/pin.svg\" />\n <span class=\"text\">Pin Column</span>\n </div>\n <div class=\"right_item\">\n <img src=\"images/chevron-right.svg\" />\n @if (showPin) {\n <div class=\"second_dropdown\" #pinMenu>\n <div\n (click)=\"pinColumn(col, $index, 'none')\"\n class=\"right_click_item\"\n >\n <div class=\"left_item\">\n @if (\n (pinActionClicked[col.colId] ??\n \"none\") === \"none\"\n ) {\n <img src=\"images/check.svg\" />\n } @else {\n <img src=\"\" alt=\"\" />\n }\n <span class=\"text\">No Pin</span>\n </div>\n </div>\n <div\n (click)=\"pinColumn(col, $index, 'left')\"\n class=\"right_click_item\"\n >\n <div class=\"left_item\">\n @if (\n pinActionClicked[col.colId] === \"left\"\n ) {\n <img src=\"images/check.svg\" />\n } @else {\n <img src=\"\" alt=\"\" />\n }\n <span class=\"text\">Pin Left</span>\n </div>\n </div>\n <div\n (click)=\"pinColumn(col, $index, 'right')\"\n class=\"right_click_item\"\n >\n <div class=\"left_item\">\n @if (\n pinActionClicked[col.colId] === \"right\"\n ) {\n <img src=\"images/check.svg\" />\n } @else {\n <img src=\"\" alt=\"\" />\n }\n <span class=\"text\">Pin Right</span>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n\n <!-- <div\n class=\"right_click_item\"\n (click)=\"pinColumn(col, $index, 'left')\"\n >\n <div class=\"left_item\">\n <img src=\"images/pin.svg\" />\n <span class=\"text\">{{\n col.leftPinned ? \"Unpin Left Column\" : \"Pin Column Left\"\n }}</span>\n </div>\n </div>\n <div\n class=\"right_click_item\"\n (click)=\"pinColumn(col, $index, 'right')\"\n >\n <div class=\"left_item\">\n <img src=\"images/pin.svg\" />\n <span class=\"text\">\n {{\n col.rightPinned\n ? \"Unpin Right Column\"\n : \"Pin Column Right\"\n }}\n </span>\n </div>\n <div class=\"right_item\">\n <img src=\"images/arrow-right.svg\" alt=\"\" />\n </div>\n </div> -->\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <img src=\"\" alt=\"\" />\n <span class=\"text\">Autosize This Column</span>\n </div>\n </div>\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <img src=\"\" alt=\"\" />\n <span class=\"text\">Autosize All Columns</span>\n </div>\n </div>\n <div\n class=\"right_click_item\"\n [ngClass]=\"{ disabled_option: !groupByRequired }\"\n >\n <div\n class=\"left_item\"\n (click)=\"groupByColumnAction(col, $index)\"\n >\n <img src=\"images/t-group-by-name.svg\" alt=\"\" />\n <span class=\"text\"\n >Group by {{ col.headerName }}</span\n >\n </div>\n </div>\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <img src=\"images/t-choose-column.svg\" alt=\"\" />\n <span class=\"text\">Choose Columns</span>\n </div>\n </div>\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <img src=\"\" alt=\"\" />\n <span class=\"text\">Reset Columns</span>\n </div>\n </div>\n </div>\n </div>\n }\n </th>\n }\n }\n </tr>\n </thead>\n <tbody>\n @if (groupedResult && groupedResult.length > 0) {\n @for (group of groupedResult; track group.key) {\n <tr (click)=\"toggleGroup(group)\">\n <td\n class=\"group-cell\"\n [attr.colspan]=\"\n colDefs.length +\n (checkBoxSelection ? 1 : 0) +\n (activeGroups.length > 0 ? 1 : 0)\n \"\n >\n <span class=\"group-toggle\">\n <img\n src=\"images/{{\n group.expanded\n ? 'chevron-down.svg'\n : 'chevron-right.svg'\n }}\"\n />\n {{ group.key }} ({{ group.children.length }})\n </span>\n </td>\n </tr>\n\n @if (group.expanded) {\n <!-- CASE 1: CHILDREN ARE MORE GROUPS -->\n @if (group.children[0]?.children) {\n @for (child of group.children; track child.key) {\n <ng-container\n [ngTemplateOutlet]=\"groupTemplate\"\n [ngTemplateOutletContext]=\"{\n $implicit: child,\n colDefs: colDefs,\n checkBoxSelection: checkBoxSelection,\n activeGroups: activeGroups,\n level: 1,\n }\"\n ></ng-container>\n }\n }\n\n <!-- CASE 2: CHILDREN ARE RAW ROWS -->\n @if (!group.children[0]?.children) {\n @for (row of group.children; track row.rowId) {\n <tr [ngClass]=\"row | addClass: tableOptions\">\n <!-- Checkbox column if any -->\n @if (checkBoxSelection) {\n <td>\n <span class=\"checkbox_container\">\n <input\n class=\"custom_check_box\"\n type=\"checkbox\"\n [checked]=\"row.isSelected\"\n /></span>\n </td>\n }\n @if (activeGroups.length > 0) {\n <td class=\"group-placeholder\"></td>\n }\n\n <!-- Render columns -->\n @for (col of colDefs; track col.colId) {\n <td\n [ngStyle]=\"getStyle(col)\"\n [ngClass]=\"[\n col?.addClass ? col.addClass(row) : '',\n col.leftPinned || col.rightPinned\n ? 'pinned_column'\n : '',\n ]\"\n >\n <!-- {{ row[col.fieldName] }} -->\n @if (!col?.cellRenderer) {\n <div class=\"cell-value ellipsis\">\n <div\n class=\"more_data_wrapper\"\n [ngClass]=\"{ ellipsis: !col.wrapText }\"\n >\n {{ parseColValue(row, col) }}\n </div>\n <div class=\"see_more_data\" id=\"table_scroll\">\n <div class=\"item\">\n <span class=\"desc\">\n {{ parseColValue(row, col) }}</span\n >\n </div>\n </div>\n </div>\n } @else {\n <div\n [rowParam]=\"row\"\n [col]=\"col\"\n [api]=\"tableOptions\"\n [currentValue]=\"row[col.fieldName]\"\n appRendererParser\n ></div>\n }\n </td>\n }\n </tr>\n }\n }\n }\n }\n } @else {\n @for (data of rowData; track data.rowId) {\n <tr\n [ngClass]=\"data | addClass: tableOptions\"\n (dragover)=\"allowRowDrop($event)\"\n (drop)=\"dropRow(data)\"\n (click)=\"onRowClick(data)\"\n >\n @if (checkBoxSelection && atLeastOneColumnChecked) {\n <td style=\"min-width: 50px\">\n @if (checkboxSelectionType == \"multiple\") {\n <span class=\"checkbox_container\"\n ><input\n type=\"checkbox\"\n class=\"pointer custom_check_box\"\n name=\"\"\n id=\"{{ data.rowId }}\"\n [disabled]=\"data.isLocked\"\n [checked]=\"data.isSelected || data.isLocked\"\n (change)=\"onRowCheckboxSelection($event)\"\n /></span>\n } @else {\n <span class=\"radio_option\">\n <input\n type=\"radio\"\n name=\"\"\n id=\"{{ data.rowId }}\"\n [checked]=\"data?.isSelected\"\n (change)=\"onRowCheckboxSelection($event)\"\n />\n <label [for]=\"data.rowId\"></label>\n </span>\n }\n </td>\n }\n @for (col of colDefs; track col.colId) {\n @if (col.active) {\n <td (click)=\"onCellClick(data, col)\"\n [ngStyle]=\"getStyle(col)\"\n [ngClass]=\"[\n col?.addClass ? col.addClass(data) : '',\n col.leftPinned || col.rightPinned\n ? 'pinned_column'\n : '',\n ]\"\n class=\"table_cell\"\n >\n <div class=\"col_wrapper\">\n @if (\n rowGripFieldName &&\n rowGripFieldName === col?.fieldName\n ) {\n <div\n [draggable]=\"true\"\n (dragstart)=\"dragRow($event, data)\"\n class=\"gripper\"\n >\n <img class=\"gripper-img\" src=\"images/gripper.svg\" />\n </div>\n }\n\n @if (!col?.cellRenderer) {\n <div class=\"cell-value ellipsis\">\n <div\n class=\"more_data_wrapper\"\n [ngClass]=\"{ ellipsis: !col.wrapText }\"\n >\n {{ parseColValue(data, col) }}\n </div>\n <div class=\"see_more_data\" id=\"table_scroll\">\n <div class=\"item\">\n <span class=\"desc\">\n {{ parseColValue(data, col) }}</span\n >\n </div>\n </div>\n </div>\n } @else {\n <div\n [rowParam]=\"data\"\n [col]=\"col\"\n [api]=\"tableOptions\"\n [currentValue]=\"data[col.fieldName]\"\n appRendererParser\n ></div>\n }\n </div>\n <!-- Commented for later use -->\n <!-- <div class=\"tool_tip\">\n <span class=\"\"> {{ parseColValue(data, col.fieldName) }}aditya </span>\n </div> -->\n </td>\n }\n }\n </tr>\n }\n }\n </tbody>\n\n <ng-template\n #groupTemplate\n let-node\n let-colDefs=\"colDefs\"\n let-checkBoxSelection=\"checkBoxSelection\"\n let-activeGroups=\"activeGroups\"\n let-level=\"level\"\n >\n <!-- GROUP HEADER -->\n <tr (click)=\"toggleGroup(node)\">\n <td\n [attr.colspan]=\"\n colDefs.length +\n (checkBoxSelection ? 1 : 0) +\n (activeGroups.length > 0 ? 1 : 0)\n \"\n [style.paddingLeft.px]=\"level * 20\"\n class=\"group-cell\"\n >\n <span class=\"group-toggle\">\n <img\n src=\"images/{{\n node.expanded ? 'chevron-down.svg' : 'chevron-right.svg'\n }}\"\n />\n {{ node.key }} ({{ node.children.length }})\n </span>\n </td>\n </tr>\n\n <!-- CHILDREN -->\n @if (node.expanded) {\n <!-- CASE: more groups -->\n @if (node.children[0]?.children) {\n @for (child of node.children; track child.key) {\n <ng-container\n [ngTemplateOutlet]=\"groupTemplate\"\n [ngTemplateOutletContext]=\"{\n $implicit: child,\n colDefs: colDefs,\n checkBoxSelection: checkBoxSelection,\n activeGroups: activeGroups,\n level: level + 1,\n }\"\n >\n </ng-container>\n }\n }\n\n <!-- CASE: final rows -->\n @if (!node.children[0]?.children) {\n @for (row of node.children; track row.rowId) {\n <tr [ngClass]=\"row | addClass: tableOptions\">\n <!-- Checkbox column if any -->\n @if (checkBoxSelection) {\n <td>\n <span class=\"checkbox_container\">\n <input\n type=\"checkbox custom_check_box\"\n [checked]=\"row.isSelected\"\n /></span>\n </td>\n }\n @if (activeGroups.length > 0) {\n <td class=\"group-placeholder\"></td>\n }\n\n <!-- Render columns -->\n @for (col of colDefs; track col.colId) {\n <td\n [ngStyle]=\"getStyle(col)\"\n [ngClass]=\"[\n col.leftPinned || col.rightPinned\n ? 'pinned_column'\n : '',\n ]\"\n >\n <!-- {{ row[col.fieldName] }} -->\n @if (!col?.cellRenderer) {\n <div class=\"cell-value ellipsis\">\n <div\n class=\"more_data_wrapper\"\n [ngClass]=\"{ ellipsis: !col.wrapText }\"\n >\n {{ parseColValue(row, col) }}\n </div>\n <div class=\"see_more_data\" id=\"table_scroll\">\n <div class=\"item\">\n <span class=\"desc\">\n {{ parseColValue(row, col) }}</span\n >\n </div>\n </div>\n </div>\n } @else {\n <div\n [rowParam]=\"row\"\n [col]=\"col\"\n [api]=\"tableOptions\"\n [currentValue]=\"row[col.fieldName]\"\n appRendererParser\n ></div>\n }\n </td>\n }\n </tr>\n }\n }\n }\n </ng-template>\n </table>\n\n @if (\n (!rowData || rowData.length === 0) &&\n (!groupedResult || groupedResult.length === 0)\n ) {\n <div class=\"empty_overlay\">\n <div class=\"empty_content\">\n @if (tableOptions?.noDataTemplate) {\n <ng-container\n *ngTemplateOutlet=\"tableOptions.noDataTemplate\"\n ></ng-container>\n } @else {\n <span>No Data To Show</span>\n }\n </div>\n </div>\n }\n </div>\n </div>\n <!-- Table Wrapper Ends-->\n @if (paginationRequired) {\n <div class=\"pagination_main\">\n <div class=\"entries_details\">\n <span>Showing</span>\n <div class=\"pagination_select\">\n <div\n class=\"select_dropdown pointer\"\n (click)=\"showPageSizeList = !showPageSizeList\"\n >\n <p class=\"select_text mb-0\">{{ pageDetails.pageSize }}</p>\n <span class=\"chevron_img\">\n <img src=\"images/chevron-down.svg\" class=\"pointer\" />\n </span>\n </div>\n @if (showPageSizeList) {\n <div\n class=\"select_option\"\n appOutsideClick\n (clickOutside)=\"onClickOutside()\"\n >\n @for (option of pageSizeList; track $index) {\n <span\n class=\"pointer\"\n (click)=\"onPageSizeChanged(option); onClickOutside()\"\n >{{ option }}</span\n >\n }\n </div>\n }\n </div>\n <span\n >Rows |\n {{ totalRecords > 0 ? convertToNumber(recordsToShow.min) + 1 : 0 }} -\n {{\n recordsToShow.max > totalRecords ? totalRecords : recordsToShow.max\n }}\n of\n {{ totalRecords }} Entries</span\n >\n </div>\n <div class=\"pagination_form\">\n <!-- <span>Page</span> -->\n\n <button class=\"outlined_btn first_btn\" type=\"button\" (click)=\"onBtFirstClick()\" [ngClass]=\"pageDetails.currentPage > 1 ? '' : 'disable_btn'\">\n <span> <img src=\"images/chevrons-left.svg\" alt=\"\" /> </span>\n </button>\n <button\n class=\"outlined_btn prev_btn\"\n [ngClass]=\"pageDetails.currentPage > 1 ? '' : 'disable_btn'\"\n type=\"button\"\n (click)=\"onBtPrevClick()\"\n >\n <span> <img src=\"images/chevron-left.svg\" alt=\"\" /> </span>\n </button>\n <div>\n <input\n class=\"input_style\"\n type=\"number\"\n [(ngModel)]=\"pageDetails.currentPage\"\n (change)=\"goToSelectedPage($event)\"\n name=\"\"\n id=\"\"\n />\n </div>\n <button\n class=\"outlined_btn next_btn\"\n type=\"button\"\n [ngClass]=\"pageDetails.currentPage < pageDetails.totalPages ? '' : 'disable_btn'\"\n (click)=\"onBtNextClick()\"\n >\n <span> <img src=\"images/chevron-right.svg\" alt=\"\" /> </span>\n </button>\n <!-- <span>of {{ pageDetails.totalPages }}</span> -->\n\n <button class=\"outlined_btn last_btn\" type=\"button\" (click)=\"onBtLastClick()\" \n [ngClass]=\"pageDetails.currentPage < pageDetails.totalPages ? '' : 'disable_btn'\">\n <span> <img src=\"images/chevrons-right.svg\" alt=\"\" /> </span>\n </button>\n </div>\n </div>\n }\n <!-- Pagination Ends -->\n</div>\n\n<!-- cell right click code start here -->\n<div class=\"dropdown_wrapper d-none\">\n <div class=\"right_click_dropdown\">\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <img src=\"images/scissors.svg\" />\n <span class=\"text\">Cut</span>\n </div>\n\n <span class=\"right_item\">Ctrl+X</span>\n </div>\n\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <img src=\"images/copy.svg\" alt=\"\" />\n <span class=\"text\">Copy</span>\n </div>\n\n <span class=\"right_item\">Ctrl+C</span>\n </div>\n\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <img src=\"images/copy.svg\" alt=\"\" />\n <span class=\"text\">Copy with Headers</span>\n </div>\n <span class=\"right_item\"></span>\n </div>\n\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <img src=\"images/copy.svg\" alt=\"\" />\n <span class=\"text\">Copy with Group Headers</span>\n </div>\n <span class=\"right_item\"></span>\n </div>\n\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <img src=\"images/clipboard.svg\" alt=\"\" />\n <span class=\"text\">Paste</span>\n </div>\n\n <span class=\"right_item\">Ctrl+V</span>\n </div>\n\n <div class=\"right_click_item active\">\n <div class=\"left_item\">\n <img src=\"images/bar-chart.svg\" alt=\"\" />\n <span class=\"text\">Chart</span>\n </div>\n <img src=\"images/chevron-right.svg\" alt=\"\" />\n </div>\n\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <img src=\"images/download.svg\" alt=\"\" />\n <span class=\"text\">Export</span>\n </div>\n\n <img src=\"images/chevron-right.svg\" alt=\"\" />\n </div>\n </div>\n\n <!-- Chart section Start Here -->\n <div class=\"second_dropdown\">\n <div class=\"right_click_item active\">\n <div class=\"left_item\">\n <span class=\"text\">Column</span>\n </div>\n <img src=\"images/chevron-right.svg\" alt=\"\" />\n </div>\n\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <span class=\"text\">Bar</span>\n </div>\n <img src=\"images/chevron-right.svg\" alt=\"\" />\n </div>\n\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <span class=\"text\">Pie</span>\n </div>\n <img src=\"images/chevron-right.svg\" alt=\"\" />\n </div>\n\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <span class=\"text\">Line</span>\n </div>\n <img src=\"images/chevron-right.svg\" alt=\"\" />\n </div>\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <span class=\"text\">Area</span>\n </div>\n <img src=\"images/chevron-right.svg\" alt=\"\" />\n </div>\n\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <span class=\"text\">XY(Scatter)</span>\n </div>\n <img src=\"images/chevron-right.svg\" alt=\"\" />\n </div>\n\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <span class=\"text\">Polar</span>\n </div>\n <img src=\"images/chevron-right.svg\" alt=\"\" />\n </div>\n\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <span class=\"text\">Stastical</span>\n </div>\n <img src=\"images/chevron-right.svg\" alt=\"\" />\n </div>\n\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <span class=\"text\">Hierarchical</span>\n </div>\n <img src=\"images/chevron-right.svg\" alt=\"\" />\n </div>\n\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <span class=\"text\">Specialized</span>\n </div>\n <img src=\"images/chevron-right.svg\" alt=\"\" />\n </div>\n\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <span class=\"text\">Funnel</span>\n </div>\n <img src=\"images/chevron-right.svg\" alt=\"\" />\n </div>\n\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <span class=\"text\">Combination</span>\n </div>\n <img src=\"images/chevron-right.svg\" alt=\"\" />\n </div>\n </div>\n\n <!-- Export Section start Here -->\n <div class=\"export_section d-none\">\n <div class=\"right_click_item active\">\n <div class=\"left_item\">\n <img src=\"images/file.svg\" alt=\"\" />\n <span class=\"text\">CSV Report</span>\n </div>\n <img src=\"images/chevron-right.svg\" alt=\"\" />\n </div>\n\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <img src=\"images/file.svg\" alt=\"\" />\n <span class=\"text\">Excel Report</span>\n </div>\n <img src=\"images/chevron-right.svg\" alt=\"\" />\n </div>\n </div>\n\n <!-- Column Group Section Start Here -->\n <div class=\"third_dropdown\">\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <span class=\"text\">Grouped</span>\n </div>\n </div>\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <span class=\"text\">Stacked</span>\n </div>\n </div>\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <span class=\"text\">100% Stacked</span>\n </div>\n </div>\n </div>\n</div>\n","import { Component, HostListener, signal } from '@angular/core';\nimport { OutsideClickDirective } from '../../directives/outside-click.directive';\nimport { AdaptivePositionDirective } from '../../directives/adaptive-position.directive';\nimport { CommonModule } from '@angular/common';\nimport { AddClassPipe } from '../../pipes/add-class.pipe';\n\n@Component({\n selector: 'lib-common-renderer',\n imports: [\n OutsideClickDirective,\n AdaptivePositionDirective,\n CommonModule,\n AddClassPipe,\n ],\n templateUrl: './common-renderer.component.html',\n styleUrl: './common-renderer.component.scss',\n})\nexport class CommonRendererComponent {\n params: any;\n\n private static _activeRowId = signal<number | null>(null);\n private static _activeTagId = signal<string | null>(null);\n\n // wrapper to access static signal easily\n activeRowId = CommonRendererComponent._activeRowId;\n activeTagId = CommonRendererComponent._activeTagId;\n clickTimer: any = null;\n clickDelay = 250;\n\n maxVisible: number = 2;\n data: any;\n paramsVal: any;\n tagClasses: any;\n\n cellInit(params: any, data: any) {\n this.params = params;\n this.data = data;\n this.paramsVal = this.parseColValue(params.data, params.col);\n }\n\n /**\n * @description Returns the renderer type defined in cellRendererParams.\n * @author Anand Pandey\n * @returns {string | undefined}\n */\n get type() {\n return this.params?.cellParams?.type;\n }\n\n get subType() {\n return this.params?.cellParams?.subType;\n }\n /**\n * @description Returns the renderer subtype defined in cellRendererParams.\n * @author Anand Pandey\n * @returns {string | undefined}\n */\n get actionSubType() {\n return this.params?.cellParams?.subType;\n }\n\n /**\n * @description Returns the cell value from params or fallback to row data field.\n * @author Anand Pandey\n * @returns {any}\n */\n get value() {\n return this.params?.value ?? this.params?.data?.[this.params?.field];\n }\n\n /**\n * @description Returns the list of actions configured for the action menu.\n * @author Anand Pandey\n * @returns {any[]}\n */\n get actions() {\n return this.params?.cellParams?.actions.map((action: any) => {\n return {\n ...action,\n class: action.class || '',\n };\n });\n }\n\n /**\n * @description Determines whether the current row's action menu should be open.\n * @author Anand Pandey\n * @returns {boolean}\n */\n get openActionMenu() {\n return this.activeRowId() === this.params.data.rowId;\n }\n\n /**\n * @description Emits a callback function defined in cellRendererParams.\n * @author Anand Pandey\n * @param {string} eventName\n * @param {any} data\n * @returns {void}\n */\n emit(eventName: string, data: any) {\n const handler = this.params?.cellParams?.[eventName];\n if (typeof handler === 'function') handler(data);\n }\n\n /**\n * @description Handles switch toggle and emits value change event.\n * @author Anand Pandey\n * @param {Event} event\n * @returns {void}\n */\n onToggle(event: any) {\n this.emit('onToggle', {\n params: this.params,\n row: this.params.data,\n value: event.target.checked,\n });\n }\n\n /**\n * @description Toggles the three-dots action menu for the current row.\n * @author Anand Pandey\n * @returns {void}\n */\n onThreeDotsMenuClick() {\n if (this.openActionMenu) {\n this.activeRowId.set(null);\n } else {\n this.activeRowId.set(this.params.data.rowId);\n }\n }\n\n /**\n * @description Handles click on an action option and emits selected action event.\n * @author Anand Pandey\n * @param {any} action\n * @returns {void}\n */\n onActionClick(action: any) {\n this.activeRowId.set(null);\n this.emit('onAction', {\n row: this.params.data,\n action,\n });\n }\n\n linkSingleClick() {\n if (this.clickTimer) {\n clearTimeout(this.clickTimer);\n this.clickTimer = null;\n }\n this.clickTimer = setTimeout(() => {\n this.emit('onLinkClick', {\n params: this.params,\n row: this.params.data,\n event: 'singleClick',\n });\n this.clickTimer = null;\n }, this.clickDelay);\n }\n\n linkDoubleClick() {\n if (this.clickTimer) {\n clearTimeout(this.clickTimer);\n this.clickTimer = null;\n }\n this.emit('onLinkClick', {\n params: this.params,\n row: this.params.data,\n event: 'doubleClick',\n });\n }\n\n /**\n * @description Closes the action menu when clicking outside the component.\n * @author Anand Pandey\n * @param {Event} e\n * @returns {void}\n */\n clickOutside(e: any) {\n this.activeRowId.set(null);\n }\n\n /**\n * @description Returns the complete list of tags after normalizing value input (supports array, object, string).\n * @author Anand Pandey\n * @returns {string[]}\n */\n get allTags(): any {\n return this.transformValue('tagKey', 'tagValue');\n }\n\n /**\n * @description Returns the subset of tags that should be visibly displayed in the UI based on maxVisible count.\n * @author Anand Pandey\n * @returns {string[]}\n */\n get visibleTags() {\n return this.allTags.slice(0, this.maxVisible);\n }\n\n /**\n * @description Returns the count of tags hidden behind the \"+\" more indicator.\n * @author Anand Pandey\n * @returns {number}\n */\n get hiddenCount() {\n return Math.max(0, this.allTags.length - this.maxVisible);\n }\n\n /**\n * @description Determines whether the dropdown should be open for the current row based on activeTagId.\n * @author Anand Pandey\n * @returns {boolean}\n */\n get openDropdown() {\n return (\n this.activeTagId() ===\n `${this.params.col.fieldName}-${this.params.data.rowId}`\n );\n }\n\n /**\n * @description Handles hover entry and activates dropdown if cursor enters +icon, hidden-list, dropdown or its items.\n * @author Anand Pandey\n * @param {MouseEvent} event\n * @returns {void}\n */\n toggleDropdown(event: MouseEvent) {\n const target = event.target as HTMLElement;\n if (\n target &&\n (target.closest('.hidden_list') ||\n target.closest('.tag_more') ||\n target.closest('.tag_dropdown') ||\n target.closest('.dropdown_item') ||\n this.openDropdown)\n ) {\n this.activeTagId.set(\n `${this.params.col.fieldName}-${this.params.data.rowId}`,\n );\n return;\n }\n if (this.openDropdown) {\n this.activeTagId.set(null);\n }\n }\n\n /**\n * @description Closes the dropdown only when cursor leaves the entire component area and not moving inside child elements.\n * @author Anand Pandey\n * @param {MouseEvent} event\n * @returns {void}\n */\n closeDropdown(event: MouseEvent) {\n const target = event.relatedTarget as HTMLElement;\n\n if (\n target &&\n (target.closest('.tag_wrapper') ||\n target.closest('.hidden_list') ||\n target.closest('.tag_more') ||\n target.closest('tag_dropdown') ||\n target.closest('dropdown_item'))\n ) {\n return;\n }\n this.activeTagId.set(null);\n }\n\n /**\n * @description Returns normalized link values derived from the cell `value`.\n * Uses the configured `linkKey` from `cellParams` to extract display data\n * @author Anand Pandey\n * @returns {Array<{ linkValue: string; class: string }>} Normalized link values\n */\n get linkVal(): any {\n return this.parseColValue(this.params.data, this.params.col);\n }\n\n /**\n * @description Normalizes the component `value` into a consistent array structure.\n * @author Anand Pandey\n * @param {string} key Key in `cellParams` used to determine which field to read from object values\n * @param {string} valueProp Property name assigned to the normalized output value\n * @returns {Array<{ [key: string]: string; class: string }>} Array of normalized value objects\n */\n transformValue(key: string, valueProp: any) {\n const value = this.value;\n if (!value) return [];\n\n if (Array.isArray(value)) {\n return value.map((val) => {\n if (typeof val === 'object') {\n return {\n [valueProp]: val[this.params.cellParams?.[key]],\n class: val['class'] || '',\n ...val\n\n };\n } else {\n return { [valueProp]: String(val).trim(), class: '' };\n }\n });\n } else if (!Array.isArray(value) && typeof value === 'object') {\n return [\n {\n [valueProp]: value[this.params.cellParams?.[key]],\n class: value['class'] || '',\n ...value\n },\n ];\n }\n return [{ [valueProp]: String(value).trim(), class: '' }];\n }\n\n parseColValue(row: any, col: any): any {\n if (!col?.fieldName?.includes('.')) {\n return row[col.fieldName] || 'N/A';\n } else {\n const keys = col.fieldName\n .replace(/\\[(\\d+)\\]/g, '.$1')\n .split('.')\n .filter(Boolean);\n let val = row;\n\n for (const key of keys) {\n if (Array.isArray(val)) {\n val = val.map((v) => v?.[key]).filter(Boolean);\n } else {\n val = val?.[key];\n }\n\n if (val === undefined || val === null) {\n return 'N/A';\n }\n }\n return val || 'N/A';\n }\n }\n}\n","<!-- Switch -->\n@if (type === \"switch\") {\n <div class=\"table_switch_wrapper\">\n <label class=\"switch\">\n <input type=\"checkbox\" [checked]=\"value\" (change)=\"onToggle($event)\" />\n <span class=\"slider\"></span>\n </label>\n </div>\n}\n\n<!-- Action Menu -->\n\n@if (type === \"action-menu\") {\n <div class=\"action-menu\">\n <button class=\"action_dots\" (click)=\"onThreeDotsMenuClick()\" #tagTrigger>\n <img src=\"images/more-{{ actionSubType || 'vertical' }}.svg\" />\n </button>\n\n @if (openActionMenu) {\n <div\n class=\"menu\"\n appOutsideClick\n (clickOutside)=\"clickOutside($event)\"\n adaptivePosition\n [trigger]=\"tagTrigger\"\n [isAction]=\"true\"\n [matchWidth]=\"false\"\n >\n <div class=\"item_wrapper\" id=\"table_scroll\">\n @for (act of actions; track $index) {\n <div\n class=\"{{ 'menu_item' + ' ' + act.class }}\"\n [ngClass]=\"{\n disabled_item:\n params?.data?.disabledActions?.includes(act.label) ||\n act.disabled,\n }\"\n (click)=\"onActionClick(act)\"\n >\n @if (act.icon) {\n <img src=\"images/{{ act.icon }}.svg\" />\n } @else {\n <img src=\"{{ act?.image }}\" />\n }\n\n <span class=\"ellipsis\">{{ act.label }}</span>\n </div>\n }\n </div>\n </div>\n }\n </div>\n}\n\n<!-- Tags -->\n\n@if (type === \"tag\") {\n <div\n class=\"tag_wrapper\"\n (mouseover)=\"toggleDropdown($event)\"\n (mouseout)=\"closeDropdown($event)\"\n #tagTrigger\n >\n @for (tag of visibleTags; track $index) {\n <div\n class=\"{{ 'tag_chip' + ' ' + tag.class }}\"\n [ngClass]=\"paramsVal | addClass: params.cellParams\"\n >\n @if(subType === 'bedge') {\n <span class=\"circle\" [class]=\"tag.bedgeClass\"></span>\n }\n @if(tag.image){\n <img src=\"{{ tag.image }}\" alt=\"\" class=\"icon\" />\n }\n \n\n <div class=\"more_data_section\">\n <!-- <span class=\"textTruncate\"> {{ tag.tagValue }}</span> -->\n <div class=\"cell-value ellipsis\">\n <div class=\"more_data_wrapper textTruncate\">\n {{ tag.tagValue }}\n </div>\n <div class=\"see_more_data\" id=\"table_scroll\">\n <div class=\"item\">\n <span class=\"desc\"> {{ tag.tagValue }}</span>\n </div>\n </div>\n </div>\n </div>\n </div>\n }\n @if (hiddenCount > 0) {\n <div class=\"hidden_list\">\n <span class=\"tag_more\">+{{ hiddenCount }}</span>\n @if (openDropdown) {\n <div\n class=\"tag_dropdown\"\n id=\"table_scroll\"\n adaptivePosition\n [trigger]=\"tagTrigger\"\n [matchWidth]=\"false\"\n >\n @for (tag of allTags; track $index) {\n <div\n class=\"{{ 'dropdown_item' + ' ' + tag.class }}\"\n >\n {{ tag.tagValue }}\n </div>\n }\n </div>\n }\n </div>\n }\n </div>\n}\n\n@if (type === \"link\") {\n <div class=\"more_data_section cell-value ellipsis\">\n <!-- @for (link of linkVal; track $index) { -->\n <div class=\"more_data_wrapper textTruncate\">\n <span\n class=\"grid-link\"\n (click)=\"linkSingleClick()\"\n (dblclick)=\"linkDoubleClick()\"\n >\n {{ linkVal }}\n </span>\n </div>\n <div class=\"see_more_data\" id=\"table_scroll\">\n <div class=\"item\">\n <span class=\"desc\"> {{ linkVal }}</span>\n </div>\n </div>\n <!-- } -->\n </div>\n}\n","import { Component, Input, ViewEncapsulation } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport type { TooltipPosition } from '../../directives/tooltip.directive';\n\n@Component({\n selector: 'app-tooltip',\n standalone: true,\n imports: [CommonModule],\n encapsulation: ViewEncapsulation.None,\n template: `\n <div\n class=\"app-tooltip-wrapper\"\n [ngClass]=\"'tooltip-' + position\"\n [style.background-color]=\"bgColor\"\n [style.color]=\"textColor\"\n [style.padding]=\"padding\"\n [style.font-size]=\"fontSize\"\n [style.border-radius]=\"borderRadius\"\n [style.max-width]=\"maxWidth\"\n >\n {{ content }}\n <div class=\"tooltip-arrow\"></div>\n </div>\n `,\n styleUrls: [\"./tooltip.component.scss\"],\n})\nexport class TooltipComponent {\n @Input() content: string = '';\n @Input() position: TooltipPosition = 'top';\n @Input() bgColor: string = '#333333';\n @Input() textColor: string = '#ffffff';\n @Input() padding: string = '8px 12px';\n @Input() fontSize: string = '12px';\n @Input() borderRadius: string = '4px';\n @Input() maxWidth: string = '300px';\n}\n\n\n\n","import {\n Directive,\n ElementRef,\n HostListener,\n Input,\n OnInit,\n OnDestroy,\n Renderer2,\n ApplicationRef,\n Injector,\n NgZone,\n} from '@angular/core';\nimport { TooltipComponent } from '../common-components/tooltip/tooltip.component';\nimport { createComponent } from '@angular/core';\n\nexport type TooltipPosition = 'top' | 'bottom' | 'left' | 'right' | 'adaptive';\n\n@Directive({\n selector: '[appTooltip]',\n standalone: true,\n})\nexport class TooltipDirective implements OnInit, OnDestroy {\n @Input('appTooltip') content: string = '';\n @Input() tooltipPosition: TooltipPosition = 'adaptive';\n @Input() tooltipDelay: number = 300; // milliseconds\n @Input() tooltipBgColor: string = '#333333';\n @Input() tooltipTextColor: string = '#ffffff';\n @Input() tooltipPadding: string = '8px 12px';\n @Input() tooltipFontSize: string = '12px';\n @Input() tooltipBorderRadius: string = '4px';\n @Input() tooltipMaxWidth: string = '300px';\n @Input() followCursor: boolean = true;\n @Input() tooltipParentContainer: HTMLElement | null = null;\n\n private tooltipElement: HTMLElement | null = null;\n private showTimeout: any;\n private elementRect: DOMRect | null = null;\n private currentPosition: TooltipPosition = 'top';\n private componentRef: any = null;\n private cursorX: number = 0;\n private cursorY: number = 0;\n private isTooltipShown: boolean = false;\n\n constructor(\n private elementRef: ElementRef<HTMLElement>,\n private renderer: Renderer2,\n private appRef: ApplicationRef,\n private injector: Injector,\n private ngZone: NgZone,\n ) {}\n\n ngOnInit(): void {\n this.renderer.addClass(this.elementRef.nativeElement, 'tooltip-trigger');\n }\n\n @HostListener('mouseenter', ['$event'])\n onMouseEnter(event: MouseEvent): void {\n if (!this.content) return;\n\n this.cursorX = event.clientX;\n this.cursorY = event.clientY;\n\n this.showTimeout = setTimeout(() => {\n this.show();\n }, this.tooltipDelay);\n }\n\n @HostListener('mouseleave')\n onMouseLeave(): void {\n clearTimeout(this.showTimeout);\n this.hide();\n }\n\n @HostListener('mousemove', ['$event'])\n onMouseMove(event: MouseEvent): void {\n if (!this.isTooltipShown || !this.followCursor) return;\n\n this.cursorX = event.clientX;\n this.cursorY = event.clientY;\n\n this.positionTooltip();\n }\n\n private show(): void {\n if (this.tooltipElement) return;\n\n this.elementRect = this.elementRef.nativeElement.getBoundingClientRect();\n\n // Use NgZone to avoid change detection issues\n this.ngZone.run(() => {\n try {\n // Create tooltip component with proper injector\n const componentRef = createComponent(TooltipComponent, {\n environmentInjector: this.appRef.injector,\n });\n\n // Configure component instance\n componentRef.instance.content = this.content;\n componentRef.instance.bgColor = this.tooltipBgColor;\n componentRef.instance.textColor = this.tooltipTextColor;\n componentRef.instance.padding = this.tooltipPadding;\n componentRef.instance.fontSize = this.tooltipFontSize;\n componentRef.instance.borderRadius = this.tooltipBorderRadius;\n componentRef.instance.maxWidth = this.tooltipMaxWidth;\n\n // Calculate adaptive position before rendering\n this.currentPosition = this.calculateAdaptivePosition();\n componentRef.instance.position = this.currentPosition;\n\n // Mark for check\n componentRef.changeDetectorRef.detectChanges();\n\n // Get the DOM element\n this.tooltipElement = componentRef.location.nativeElement.querySelector('.app-tooltip-wrapper') as HTMLElement;\n\n // If direct query didn't work, try the root element\n if (!this.tooltipElement) {\n this.tooltipElement = (componentRef.location.nativeElement as HTMLElement).children[0] as HTMLElement;\n }\n\n // If still not found, use the whole element\n if (!this.tooltipElement) {\n this.tooltipElement = componentRef.location.nativeElement as HTMLElement;\n }\n\n // Append to body to avoid layout issues\n this.renderer.appendChild(document.body, componentRef.location.nativeElement);\n\n // Position the tooltip\n this.isTooltipShown = true;\n this.positionTooltip();\n\n // Store reference for cleanup\n this.componentRef = componentRef;\n } catch (error) {\n console.warn('Tooltip directive: Error creating tooltip component', error);\n // Fallback silent fail - tooltip just won't show but app continues\n }\n });\n }\n\n private calculateAdaptivePosition(): TooltipPosition {\n if (this.tooltipPosition !== 'adaptive') {\n return this.tooltipPosition;\n }\n\n if (!this.elementRect) return 'top';\n\n // Find the parent container with overflow or positioning context\n const parentContainer = this.findParentContainer();\n const parentRect = parentContainer.getBoundingClientRect();\n\n const threshold = 120; // minimum space needed\n const gap = 10;\n\n // Calculate available space within parent container\n const spaceAbove = this.elementRect.top - parentRect.top;\n const spaceBelow = parentRect.bottom - this.elementRect.bottom;\n const spaceLeft = this.elementRect.left - parentRect.left;\n const spaceRight = parentRect.right - this.elementRect.right;\n\n // Prefer vertical positions if there's adequate space\n if (spaceBelow >= threshold) return 'bottom';\n if (spaceAbove >= threshold) return 'top';\n\n // Fall back to horizontal positions\n if (spaceRight >= threshold) return 'right';\n if (spaceLeft >= threshold) return 'left';\n\n // If no position has enough space, use the direction with most available space\n const spaces: Record<Exclude<TooltipPosition, 'adaptive'>, number> = {\n top: spaceAbove,\n bottom: spaceBelow,\n left: spaceLeft,\n right: spaceRight,\n };\n\n const bestPosition = (\n Object.keys(spaces) as Array<Exclude<TooltipPosition, 'adaptive'>>\n ).reduce((prev, curr) => (spaces[curr] > spaces[prev] ? curr : prev));\n\n return bestPosition;\n }\n\n private findParentContainer(): HTMLElement {\n // If a parent container is explicitly provided, use it\n if (this.tooltipParentContainer) {\n return this.tooltipParentContainer;\n }\n\n let element = this.elementRef.nativeElement.parentElement;\n\n // Traverse up the DOM to find a scrollable or positioned container\n while (element) {\n const style = window.getComputedStyle(element);\n const isScrollable =\n element.scrollHeight > element.clientHeight ||\n element.scrollWidth > element.clientWidth;\n const isPositioned =\n style.position === 'absolute' ||\n style.position === 'relative' ||\n style.position === 'fixed';\n\n if (isScrollable || isPositioned) {\n return element;\n }\n\n element = element.parentElement;\n }\n\n // If no container found, use the document body\n return document.body;\n }\n\n private positionTooltip(): void {\n if (!this.tooltipElement) return;\n\n // Use requestAnimationFrame to ensure DOM is ready\n requestAnimationFrame(() => {\n if (!this.tooltipElement) return;\n\n const tooltipRect = this.tooltipElement.getBoundingClientRect();\n\n // If tooltip isn't rendered yet, retry\n if (tooltipRect.width === 0 || tooltipRect.height === 0) {\n requestAnimationFrame(() => this.positionTooltip());\n return;\n }\n\n const gap = 10;\n const offset = 15; // Offset from cursor\n let top = 0;\n let left = 0;\n let finalPosition = this.currentPosition;\n\n if (this.followCursor) {\n // Position tooltip relative to cursor\n const preferredPosition = this.currentPosition;\n\n switch (preferredPosition) {\n case 'top':\n top = this.cursorY - tooltipRect.height - gap;\n left = this.cursorX - tooltipRect.width / 2;\n break;\n case 'bottom':\n top = this.cursorY + offset;\n left = this.cursorX - tooltipRect.width / 2;\n break;\n case 'left':\n top = this.cursorY - tooltipRect.height / 2;\n left = this.cursorX - tooltipRect.width - gap;\n break;\n case 'right':\n top = this.cursorY - tooltipRect.height / 2;\n left = this.cursorX + offset;\n break;\n }\n } else if (this.elementRect) {\n // Position tooltip relative to element\n switch (this.currentPosition) {\n case 'top':\n top = this.elementRect.top - tooltipRect.height - gap;\n left = this.elementRect.left + this.elementRect.width / 2 - tooltipRect.width / 2;\n break;\n case 'bottom':\n top = this.elementRect.bottom + gap;\n left = this.elementRect.left + this.elementRect.width / 2 - tooltipRect.width / 2;\n break;\n case 'left':\n top = this.elementRect.top + this.elementRect.height / 2 - tooltipRect.height / 2;\n left = this.elementRect.left - tooltipRect.width - gap;\n break;\n case 'right':\n top = this.elementRect.top + this.elementRect.height / 2 - tooltipRect.height / 2;\n left = this.elementRect.right + gap;\n break;\n }\n }\n\n // Adjust for parent container and viewport boundaries\n const parentContainer = this.findParentContainer();\n const parentRect = parentContainer.getBoundingClientRect();\n const windowHeight = window.innerHeight;\n const windowWidth = window.innerWidth;\n const padding = 5;\n let arrowPos = 'center';\n\n // Use parent container bounds if available, otherwise use window bounds\n const containerTop = Math.max(parentRect.top, 0);\n const containerBottom = Math.min(parentRect.bottom, windowHeight);\n const containerLeft = Math.max(parentRect.left, 0);\n const containerRight = Math.min(parentRect.right, windowWidth);\n\n // Check vertical boundaries within container and adjust position if needed\n if (top < containerTop + padding) {\n top = containerTop + padding;\n if (this.currentPosition === 'top') {\n finalPosition = 'bottom';\n if (this.followCursor) {\n top = this.cursorY + offset;\n } else if (this.elementRect) {\n top = this.elementRect.bottom + gap;\n }\n }\n arrowPos = 'top-adjust';\n } else if (top + tooltipRect.height > containerBottom - padding) {\n top = containerBottom - tooltipRect.height - padding;\n if (this.currentPosition === 'bottom') {\n finalPosition = 'top';\n if (this.followCursor) {\n top = this.cursorY - tooltipRect.height - gap;\n } else if (this.elementRect) {\n top = this.elementRect.top - tooltipRect.height - gap;\n }\n }\n arrowPos = 'bottom-adjust';\n }\n\n // Check horizontal boundaries within container and adjust position if needed\n if (left < containerLeft + padding) {\n left = containerLeft + padding;\n if (this.currentPosition === 'left') {\n finalPosition = 'right';\n if (this.followCursor) {\n left = this.cursorX + offset;\n } else if (this.elementRect) {\n left = this.elementRect.right + gap;\n }\n }\n arrowPos = 'left-adjust';\n } else if (left + tooltipRect.width > containerRight - padding) {\n left = containerRight - tooltipRect.width - padding;\n if (this.currentPosition === 'right') {\n finalPosition = 'left';\n if (this.followCursor) {\n left = this.cursorX - tooltipRect.width - gap;\n } else if (this.elementRect) {\n left = this.elementRect.left - tooltipRect.width - gap;\n }\n }\n arrowPos = 'right-adjust';\n }\n\n // Update position class if it changed\n if (finalPosition !== this.currentPosition) {\n this.currentPosition = finalPosition;\n this.tooltipElement!.className = `app-tooltip-wrapper tooltip-${finalPosition}`;\n }\n\n // Store arrow adjustment info for CSS styling\n this.renderer.setAttribute(this.tooltipElement, 'data-arrow-pos', arrowPos);\n this.renderer.setStyle(this.tooltipElement, 'position', 'fixed');\n this.renderer.setStyle(this.tooltipElement, 'top', `${Math.round(top)}px`);\n this.renderer.setStyle(this.tooltipElement, 'left', `${Math.round(left)}px`);\n });\n }\n\n private hide(): void {\n this.isTooltipShown = false;\n if (this.tooltipElement && this.tooltipElement.parentNode) {\n this.renderer.removeChild(this.tooltipElement.parentNode, this.tooltipElement);\n this.tooltipElement = null;\n }\n if (this.componentRef) {\n this.componentRef.destroy();\n this.appRef.detachView(this.componentRef.hostView);\n this.componentRef = null;\n }\n }\n\n ngOnDestroy(): void {\n clearTimeout(this.showTimeout);\n this.hide();\n }\n}\n\n","import { CommonModule } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectorRef,\n Component,\n DoCheck,\n ElementRef,\n EventEmitter,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n Output,\n Renderer2,\n SimpleChanges,\n ViewChild,\n} from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { AdaptivePositionDirective } from '../../directives/adaptive-position.directive';\nimport { OutsideClickDirective } from '../../directives/outside-click.directive';\nimport { RendererParserDirective } from '../../directives/renderer-parser.directive';\nimport { TooltipDirective } from '../../directives/tooltip.directive';\n\nexport interface CatsTreeTableColumn {\n fieldName: string;\n header?: string;\n width?: number;\n minWidth?: number;\n maxWidth?: number;\n class?: string;\n colId?: string;\n sortable?: boolean;\n filterable?: boolean;\n filterType?: 'text' | 'number' | 'date' | 'set';\n leftPinned?: boolean;\n rightPinned?: boolean;\n leftOffset?: number;\n rightOffset?: number;\n active?: boolean;\n filters?: TreeFilterCondition[];\n options?: any[];\n filteredOptions?: any[];\n selectedValues?: Set<any>;\n cellRenderer?: any;\n cellRendererParams?: any;\n filterLogic?: 'AND' | 'OR';\n headerLocked?: boolean;\n}\n\nexport interface TreeFilterCondition {\n filterOperation: string;\n filterValue: any;\n}\n\nexport interface CatsTreeRowOptions {\n showCheckbox?: boolean;\n showToggle?: boolean;\n showNodeIcon?: boolean;\n showLink?: boolean;\n disabled?: boolean;\n}\n\nexport interface CatsTreeExpandEvent<T = any> {\n node: T;\n level: number;\n path: T[];\n expanded: boolean;\n}\n\nexport interface CatsTreeSelectionChangeEvent<T = any> {\n node: T;\n level: number;\n path: T[];\n checked: boolean;\n selectedNodes: T[];\n}\n\nexport interface CatsTreeLinkClickEvent<T = any> {\n node: T;\n level: number;\n path: T[];\n url: string | null;\n col: CatsTreeTableColumn;\n}\n\ntype RowKind = 'node' | 'loading' | 'no-data';\n\ninterface RowView<T = any> {\n kind: RowKind;\n level: number;\n path: T[];\n node: T;\n trackKey: string | number;\n}\n\n@Component({\n selector: 'cats-tree-table',\n imports: [CommonModule, FormsModule, OutsideClickDirective, AdaptivePositionDirective, RendererParserDirective, TooltipDirective],\n templateUrl: './common-tree-table.component.html',\n styleUrls: ['./common-tree-table.component.scss'],\n})\nexport class CommonTreeTableComponent<T = any>\n implements OnChanges, DoCheck, AfterViewInit, OnDestroy {\n @ViewChild('table', { static: true }) tableAreaRef!: ElementRef<HTMLElement>;\n @ViewChild('pinMenu') pinMenu?: ElementRef<HTMLElement>;\n @Input() data: T[] = [];\n @Input() columns: CatsTreeTableColumn[] = [{ fieldName: 'name', header: 'Name' }];\n @Input() tableOptions: any = {};\n\n @Input() idField: string = 'id';\n @Input() labelField: string = 'name';\n @Input() childrenField: string = 'array';\n @Input() treeColumnField?: string;\n\n @Input() indentPx: number = 24;\n @Input() showHeader: boolean = true;\n\n @Input() expandIcon: string = 'chevron-right.svg';\n @Input() collapseIcon: string = 'chevron-down.svg';\n @Input() iconBasePath: string = 'images';\n\n @Input() showCheckbox: boolean = false;\n @Input() showNodeIcon: boolean = true;\n @Input() noDataText: string = 'No data found';\n @Input() loadingText: string = 'Loading...';\n\n @Input() emitExpandAlways: boolean = true;\n\n // New sorting, filtering, and customization inputs\n @Input() sortingRequired: boolean = true;\n @Input() filterRequired: boolean = false;\n @Input() threeDotsMenuRequired: boolean = true;\n @Input() settingsRequired: boolean = true;\n @Input() settingsClicked: boolean = false;\n @Input() checkBoxSelection: boolean = false;\n @Input() checkboxSelectionType: 'multiple' | 'single' = 'multiple';\n\n @Input() paginationRequired: boolean = true;\n @Input() pageSizeList: number[] = [20, 50, 75, 100];\n @Input() totalRecords: number = 0;\n @Input() resetPage: boolean = true;\n\n @Input() isExpandable: (node: T, level: number, path: T[]) => boolean = (\n node,\n ) => {\n const children = (node as any)?.[this.childrenField];\n return Array.isArray(children) ? children.length > 0 : false;\n };\n\n @Input() rowOptionsResolver: (node: T, level: number, path: T[]) => CatsTreeRowOptions =\n () => ({});\n\n @Input() nodeIconResolver: (node: T, level: number, path: T[], expanded: boolean) => string | null =\n () => null;\n\n @Input() linkResolver: (node: T, level: number, path: T[]) => string | null =\n () => null;\n\n @Output() nodeToggle = new EventEmitter<CatsTreeExpandEvent<T>>();\n @Output() selectionChange = new EventEmitter<CatsTreeSelectionChangeEvent<T>>();\n @Output() linkClick = new EventEmitter<CatsTreeLinkClickEvent<T>>();\n @Output() linkDoubleClick = new EventEmitter<CatsTreeLinkClickEvent<T>>();\n @Output() onHideSettings = new EventEmitter();\n @Output() onPaginationChange = new EventEmitter();\n\n protected rows: RowView<T>[] = [];\n private linkClickTimer: any = null;\n private linkClickDelay = 250;\n\n // Pagination properties\n pageDetails: any = {\n pageSize: 20,\n totalPages: 1,\n currentPage: 1,\n };\n recordsToShow: any = {\n min: 0,\n max: 20,\n };\n\n // Sorting, filtering, and column management properties\n sortingColumnIndex: number | null = null;\n sortingType: { [key: number]: string } = {};\n filteredData: T[] = [];\n originalRowData: T[] = [];\n activeFilters: Map<string, any> = new Map();\n appliedFilters: any[] = [];\n menuVisible: boolean[] = [];\n dragOverIndex: number | null = null;\n draggedIndex: number | null = null;\n activeFilterIndex: number | null = null;\n resizingColumnIndex: number | null = null;\n startX: number = 0;\n startWidth: number = 0;\n isResizing: boolean = false;\n showMoveIcon: { [key: number]: boolean } = {};\n showPin = false;\n pinActionClicked: Record<string, string> = {};\n columnDraggable: boolean[] = [];\n showPageSizeList: boolean = false;\n activeAll: boolean = true;\n atLeastOneColumnChecked: boolean = true;\n selectedRow: T[] = [];\n originalColumns: CatsTreeTableColumn[] = [];\n\n private removeMouseMove: (() => void) | null = null;\n private removeMouseUp: (() => void) | null = null;\n private rafId: number | null = null;\n private removeDragOver: (() => void) | null = null;\n private removeDrop: (() => void) | null = null;\n\n filterOptions = [\n { label: 'Contains', value: 'contains' },\n { label: 'Does Not Contain', value: 'doesNotContain' },\n { label: 'Equals', value: 'equals' },\n { label: 'Does Not Equal', value: 'doesNotEqual' },\n { label: 'Starts With', value: 'startsWith' },\n { label: 'Ends With', value: 'endsWith' },\n ];\n\n numberFilterOptions = [\n { label: 'Equals', value: '=' },\n { label: 'Greater Than', value: '>' },\n { label: 'Less Than', value: '<' },\n { label: 'Greater Than or Equal', value: '>=' },\n { label: 'Less Than or Equal', value: '<=' },\n ];\n\n private expandedKeys = new Set<string | number>();\n private selectedKeys = new Set<string | number>();\n private fallbackKey = new WeakMap<object, number>();\n private fallbackSeq = 1;\n private resolvedTreeColumnField?: string;\n\n constructor(\n private renderer: Renderer2,\n private zone: NgZone,\n private cd: ChangeDetectorRef,\n ) { }\n\n ngAfterViewInit(): void {\n const el = this.tableAreaRef?.nativeElement;\n if (!el) return;\n\n this.zone.runOutsideAngular(() => {\n this.removeDragOver = this.renderer.listen(el, 'dragover', (event: DragEvent) => {\n if (this.isResizing) return;\n event.preventDefault();\n\n const th = (event.target as HTMLElement | null)?.closest?.('th') as HTMLElement | null;\n const rawIdx = th?.dataset?.['colIdx'];\n if (!rawIdx) return;\n\n const idx = Number.parseInt(rawIdx, 10);\n if (Number.isNaN(idx)) return;\n if (this.dragOverIndex === idx) return;\n\n this.zone.run(() => {\n this.dragOverIndex = idx;\n });\n });\n\n this.removeDrop = this.renderer.listen(el, 'drop', (event: DragEvent) => {\n event.preventDefault();\n\n const th = (event.target as HTMLElement | null)?.closest?.('th') as HTMLElement | null;\n const rawIdx = th?.dataset?.['colIdx'];\n if (!rawIdx) return;\n\n const idx = Number.parseInt(rawIdx, 10);\n if (Number.isNaN(idx)) return;\n\n this.zone.run(() => {\n this.onDrop(event, idx);\n });\n });\n });\n }\n\n ngOnDestroy(): void {\n this.removeDragOver?.();\n this.removeDrop?.();\n this.removeMouseMove?.();\n this.removeMouseUp?.();\n if (this.rafId) cancelAnimationFrame(this.rafId);\n this.renderer.removeStyle(document.body, 'cursor');\n this.renderer.removeStyle(document.body, 'user-select');\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['data'] || changes['columns']) {\n this.initializeColumns();\n this.originalRowData = structuredClone(this.data || []);\n this.rebuildRows();\n }\n if (changes['totalRecords']?.currentValue && this.resetPage) {\n this.resetPagination();\n } else {\n this.setPageCount();\n }\n }\n\n ngDoCheck(): void {\n this.rebuildRows();\n }\n\n protected get treeColumn(): CatsTreeTableColumn {\n const preferredField = this.treeColumnField ?? this.resolvedTreeColumnField;\n if (preferredField) {\n const found = this.columns?.find((c) => c.fieldName === preferredField);\n if (found) return found;\n }\n return this.columns?.[0] ?? { fieldName: this.labelField, header: 'Name' };\n }\n\n /**\n * Initialize column properties for filtering, sorting, and customization\n */\n private initializeColumns(): void {\n this.columns = this.columns.map((col, index) => {\n if (!col.colId) col.colId = col.fieldName;\n if (col.sortable === undefined) col.sortable = true;\n if (col.filterable === undefined) col.filterable = false;\n if (col.filterType === undefined) col.filterType = 'text';\n if (col.active === undefined) col.active = true;\n if (col.width === undefined) col.width = 150;\n if (col.minWidth === undefined) col.minWidth = 50;\n if (!col.filters) {\n col.filters = [\n { filterOperation: 'contains', filterValue: '' },\n { filterOperation: 'contains', filterValue: '' },\n ];\n }\n if (!col.selectedValues) col.selectedValues = new Set();\n if (!col.options && col.filterType === 'set') {\n col.options = this.extractUniqueValues(this.data || [], col.fieldName);\n col.filteredOptions = [...(col.options || [])];\n }\n if (!this.menuVisible[index]) this.menuVisible[index] = false;\n\n const key = col.colId || col.fieldName;\n if (this.pinActionClicked[key] == null) {\n this.pinActionClicked[key] = col.leftPinned\n ? 'left'\n : col.rightPinned\n ? 'right'\n : 'none';\n }\n return col;\n });\n\n // If the consumer didn't specify a tree column, keep the initial first column as the tree UI column\n // even when columns are later reordered (pin/drag).\n if (!this.treeColumnField) {\n const firstField = this.columns?.[0]?.fieldName;\n if (\n firstField &&\n (this.resolvedTreeColumnField == null ||\n !this.columns.some((c) => c.fieldName === this.resolvedTreeColumnField))\n ) {\n this.resolvedTreeColumnField = firstField;\n }\n }\n\n this.saveColumnState();\n }\n\n /**\n * Extract unique values from data for set filter\n */\n private extractUniqueValues(data: T[], fieldName: string): any[] {\n const values = new Set<any>();\n const visit = (nodes: T[]) => {\n for (const node of nodes) {\n values.add(this.getValue(node, fieldName));\n const children = this.getChildren(node);\n if (Array.isArray(children)) visit(children);\n }\n };\n visit(data);\n return Array.from(values);\n }\n\n /**\n * Sort data based on column and sorting type\n */\n protected onSortingRowData(sortingColumnIndex: number, col: CatsTreeTableColumn): void {\n if (!col.sortable) return;\n\n this.sortingColumnIndex = sortingColumnIndex;\n Object.keys(this.sortingType).forEach((k) => {\n if (Number(k) !== sortingColumnIndex) delete this.sortingType[Number(k)];\n });\n\n if (!this.sortingType[sortingColumnIndex]) {\n this.sortingType[sortingColumnIndex] = 'asc';\n } else if (this.sortingType[sortingColumnIndex] === 'asc') {\n this.sortingType[sortingColumnIndex] = 'dsc';\n } else {\n this.sortingType[sortingColumnIndex] = '';\n delete this.sortingType[sortingColumnIndex];\n }\n\n this.applySort();\n this.rebuildRows();\n }\n\n /**\n * Sort from the three-dots menu with an explicit direction (matches `cats-data-grid` UX).\n */\n protected onSort(col: CatsTreeTableColumn, type: string, sortingColumIndex: number): void {\n if (!col.sortable) return;\n\n this.sortingType[sortingColumIndex] = type;\n this.sortingColumnIndex = type ? sortingColumIndex : null;\n\n Object.keys(this.sortingType).forEach((k) => {\n if (k !== String(sortingColumIndex)) this.sortingType[Number(k)] = '';\n });\n\n if (type === 'asc' || type === 'dsc') {\n this.applySort();\n } else {\n this.data = structuredClone(this.originalRowData || []);\n }\n\n this.rebuildRows();\n this.onClickOutside();\n }\n\n /**\n * Apply sorting to the row data\n */\n private applySort(): void {\n if (this.sortingColumnIndex === null) return;\n\n const col = this.columns[this.sortingColumnIndex];\n const sortType = this.sortingType[this.sortingColumnIndex];\n\n if (!sortType) return;\n\n const sortFn = (a: T, b: T) => {\n const aVal = this.getValue(a, col.fieldName);\n const bVal = this.getValue(b, col.fieldName);\n\n if (aVal === bVal) return 0;\n if (aVal === null || aVal === undefined) return 1;\n if (bVal === null || bVal === undefined) return -1;\n\n if (sortType === 'asc') {\n return aVal > bVal ? 1 : -1;\n } else {\n return aVal < bVal ? 1 : -1;\n }\n };\n\n const visit = (nodes: T[]) => {\n nodes.sort(sortFn);\n for (const node of nodes) {\n const children = this.getChildren(node);\n if (Array.isArray(children)) visit(children);\n }\n };\n\n visit(this.data || []);\n }\n\n /**\n * Apply all active filters\n */\n applyAllFilters(): void {\n let result: T[] = structuredClone(this.originalRowData);\n\n this.columns.forEach((col) => {\n if (!col.filters || col.filterType === 'set') return;\n\n const hasFirstValue = col.filters[0]?.filterValue;\n if (!hasFirstValue) return;\n\n result = result.filter((row) => {\n const fieldValue = String(this.getValue(row, col.fieldName)).toLowerCase();\n const filterOp = col.filters?.[0]?.filterOperation;\n const filterVal = String(col.filters?.[0]?.filterValue).toLowerCase();\n\n if (!this.evaluateTextFilterCondition(filterOp || '', fieldValue, filterVal)) {\n return false;\n }\n\n if (col.filters?.[1]?.filterValue) {\n const secondOp = col.filters[1].filterOperation;\n const secondVal = String(col.filters[1].filterValue).toLowerCase();\n return this.evaluateTextFilterCondition(secondOp || '', fieldValue, secondVal);\n }\n\n return true;\n });\n });\n\n this.filteredData = result;\n this.data = this.filteredData;\n this.rebuildRows();\n }\n\n /**\n * Evaluate text filter condition\n */\n private evaluateTextFilterCondition(type: string, fieldValue: string, value: string): boolean {\n switch (type) {\n case 'contains':\n return fieldValue.includes(value);\n case 'doesNotContain':\n return !fieldValue.includes(value);\n case 'equals':\n return fieldValue === value;\n case 'doesNotEqual':\n return fieldValue !== value;\n case 'startsWith':\n return fieldValue.startsWith(value);\n case 'endsWith':\n return fieldValue.endsWith(value);\n default:\n return true;\n }\n }\n\n /**\n * Toggle column filter visibility\n */\n protected toggleFilter(col: CatsTreeTableColumn, index: number, event: MouseEvent): void {\n event.stopPropagation();\n this.activeFilterIndex = this.activeFilterIndex === index ? null : index;\n }\n\n /**\n * Reset filter for a column\n */\n protected resetFilter(col: CatsTreeTableColumn): void {\n if (col.filters) {\n col.filters.forEach((f) => (f.filterValue = ''));\n }\n if (col.selectedValues) col.selectedValues.clear();\n this.activeFilters.delete(col.fieldName);\n this.applyAllFilters();\n }\n\n /**\n * Start column resize\n */\n protected startResize(event: MouseEvent, index: number): void {\n event.preventDefault();\n event.stopPropagation();\n\n this.isResizing = true;\n this.resizingColumnIndex = index;\n this.startX = event.clientX;\n this.startWidth = this.columns[index].width ?? 150;\n\n this.zone.runOutsideAngular(() => {\n this.renderer.setStyle(document.body, 'cursor', 'col-resize');\n this.renderer.setStyle(document.body, 'user-select', 'none');\n this.removeMouseMove = this.renderer.listen('document', 'mousemove', this.onMouseMove);\n this.removeMouseUp = this.renderer.listen('document', 'mouseup', this.stopResize);\n });\n }\n\n /**\n * Handle mouse move during resize\n */\n private onMouseMove = (event: MouseEvent): void => {\n if (this.resizingColumnIndex === null || this.rafId) return;\n\n this.rafId = requestAnimationFrame(() => {\n const movement = event.clientX - this.startX;\n const newWidth = this.startWidth + movement;\n const minWidth = this.columns[this.resizingColumnIndex!]?.minWidth ?? 50;\n\n if (newWidth > minWidth) {\n this.zone.run(() => {\n this.columns[this.resizingColumnIndex!].width = newWidth;\n // recalc pinned offsets in case a pinned column changed width\n this.updatePinnedOffsets();\n this.cd.markForCheck();\n });\n }\n\n this.rafId = null;\n });\n };\n\n /**\n * Stop column resize\n */\n private stopResize = (): void => {\n this.isResizing = false;\n this.resizingColumnIndex = null;\n this.removeMouseMove?.();\n this.removeMouseUp?.();\n this.renderer.removeStyle(document.body, 'cursor');\n this.renderer.removeStyle(document.body, 'user-select');\n if (this.rafId) {\n cancelAnimationFrame(this.rafId);\n this.rafId = null;\n }\n };\n\n /**\n * Handle column drag start\n */\n protected onDragStart(event: DragEvent, index: number): void {\n if (this.isResizing) return;\n this.draggedIndex = index;\n event.dataTransfer?.setData('text/plain', index.toString());\n }\n\n /**\n * Handle column drag over\n */\n protected onDragOver(event: DragEvent, index: number): void {\n event.preventDefault();\n this.isResizing = false;\n if (this.dragOverIndex !== index) this.dragOverIndex = index;\n }\n\n /**\n * Handle column drop\n */\n protected onDrop(event: DragEvent, index: number): void {\n event.preventDefault();\n if (this.draggedIndex === null) return;\n const draggedItem = this.columns[this.draggedIndex];\n this.columns.splice(this.draggedIndex, 1);\n this.columns.splice(index, 0, draggedItem);\n this.draggedIndex = null;\n this.dragOverIndex = null;\n this.updatePinnedOffsets();\n }\n\n /**\n * Handle drag end\n */\n protected onDragEnd(): void {\n this.draggedIndex = null;\n this.dragOverIndex = null;\n }\n\n /**\n * Pin column to left or right\n */\n protected pinColumn(col: CatsTreeTableColumn, index: number, direction: string): void {\n const key = col.colId || col.fieldName;\n this.pinActionClicked[key] = direction;\n\n col.leftPinned = direction === 'left';\n col.rightPinned = direction === 'right';\n\n // Reorder columns to mirror `cats-data-grid` behavior.\n const currentIndex = this.columns.findIndex((c) => (c.colId || c.fieldName) === key);\n if (currentIndex >= 0) {\n this.columns.splice(currentIndex, 1);\n } else if (index >= 0 && index < this.columns.length) {\n this.columns.splice(index, 1);\n }\n\n if (direction === 'left') {\n this.columns = [col, ...this.columns];\n } else if (direction === 'right') {\n this.columns = [...this.columns, col];\n } else {\n const leftPinned = this.columns.filter((c) => c.leftPinned);\n const rightPinned = this.columns.filter((c) => c.rightPinned);\n const middle = this.columns.filter((c) => !c.leftPinned && !c.rightPinned);\n\n const byKey = new Map<string, CatsTreeTableColumn>();\n for (const c of middle) byKey.set(c.colId || c.fieldName, c);\n byKey.set(key, col);\n\n const originalKeys = (this.originalColumns || []).map((c) => c.colId || c.fieldName);\n const orderedMiddle: CatsTreeTableColumn[] = [];\n for (const k of originalKeys) {\n const match = byKey.get(k);\n if (match) orderedMiddle.push(match);\n }\n for (const [k, v] of byKey.entries()) {\n if (!originalKeys.includes(k)) orderedMiddle.push(v);\n }\n\n this.columns = [...leftPinned, ...orderedMiddle, ...rightPinned];\n }\n\n this.updatePinnedOffsets();\n this.showPin = false;\n this.onClickOutside();\n }\n\n protected showPinActions(event: MouseEvent): void {\n event.stopPropagation();\n const parentEl = event.currentTarget as HTMLElement | null;\n this.showPin = true;\n\n // Flip the submenu to open left if it would overflow the viewport.\n setTimeout(() => {\n const menuEl = this.pinMenu?.nativeElement;\n if (!menuEl || !parentEl) return;\n\n const parentRect = parentEl.getBoundingClientRect();\n const menuWidth = menuEl.offsetWidth;\n const viewPortWidth = window.innerWidth;\n const x = parentRect.right;\n\n if (x + menuWidth > viewPortWidth) {\n menuEl.style.right = `${parentRect.width}px`;\n } else {\n menuEl.style.right = '';\n }\n });\n }\n\n protected hidePinActions(): void {\n this.showPin = false;\n }\n\n /**\n * Update pinned column offsets\n */\n protected updatePinnedOffsets(): void {\n let leftOffset = 0;\n let rightOffset = 0;\n\n this.columns.forEach((col) => {\n if (col.leftPinned) {\n col.leftOffset = leftOffset;\n leftOffset += col.width ?? 150;\n } else {\n col.leftOffset = undefined;\n }\n });\n\n [...this.columns].reverse().forEach((col) => {\n if (col.rightPinned) {\n col.rightOffset = rightOffset;\n rightOffset += col.width ?? 150;\n } else {\n col.rightOffset = undefined;\n }\n });\n }\n\n /**\n * Filter set options based on search text\n */\n protected filterSetOptions(col: CatsTreeTableColumn, event: any): void {\n const text = event.target.value.toLowerCase();\n col.filteredOptions = col.options?.filter((option: any) =>\n String(option).toLowerCase().includes(text),\n ) || [];\n }\n\n /**\n * Toggle set filter option\n */\n protected toggleSetOption(col: CatsTreeTableColumn, option: any, event: any): void {\n if ((event.target as HTMLInputElement).checked) {\n col.selectedValues?.add(option);\n } else {\n col.selectedValues?.delete(option);\n }\n this.applyAllFilters();\n }\n\n /**\n * Toggle select all in set filter\n */\n protected toggleSelectAllSetFilter(col: CatsTreeTableColumn, event: any): void {\n col.selectedValues?.clear();\n if ((event.target as HTMLInputElement).checked) {\n col.options?.forEach((o: any) => col.selectedValues?.add(o));\n }\n this.applyAllFilters();\n }\n\n /**\n * Get column style\n */\n protected getStyle(col: CatsTreeTableColumn): any {\n const style: any = {\n width: `${col.width ?? 200}px`,\n minWidth: `${col.minWidth ?? 50}px`,\n };\n if (col.leftPinned) {\n style.position = 'sticky';\n style.left = `${col.leftOffset ?? 0}px`;\n style.zIndex = 1;\n } else if (col.rightPinned) {\n style.position = 'sticky';\n style.right = `${col.rightOffset ?? 0}px`;\n style.zIndex = 1;\n }\n return style;\n }\n\n /**\n * Toggle column visibility\n */\n protected changeActiveColSelection(event: Event, col: CatsTreeTableColumn): void {\n // Prevent deselection of locked headers\n if (col.headerLocked) {\n col.active = true;\n return;\n }\n col.active = (event.target as HTMLInputElement).checked;\n this.atLeastOneColumnChecked = this.columns.some((dt) => dt.active);\n // Update activeAll state\n this.activeAll = this.columns.every((dt) => dt.active);\n // this.saveColumnState();\n }\n\n /**\n * Compute minimum table width based on active column widths\n */\n protected getTableMinWidth(): number {\n return this.columns\n .filter((c) => c.active)\n .reduce((sum, c) => sum + (c.width ?? 150), 0);\n }\n\n /**\n * Select/deselect all columns\n */\n protected activeAllSelection(event: Event): void {\n const checked = (event.target as HTMLInputElement).checked;\n this.columns.forEach((col) => {\n if (col.headerLocked) {\n col.active = true;\n } else {\n col.active = checked;\n }\n });\n this.activeAll = this.columns.every((dt) => dt.active);\n this.atLeastOneColumnChecked = this.columns.some((dt) => dt.active);\n // this.saveColumnState();\n }\n\n /**\n * Hide settings\n */\n protected hideSettings(): void {\n this.onHideSettings.emit();\n }\n\n /**\n * Close all menus\n */\n protected onClickOutside(): void {\n this.activeFilterIndex = null;\n this.showPin = false;\n this.showPageSizeList = false;\n this.menuVisible = this.menuVisible.map(() => false);\n }\n\n /**\n * Open column menu\n */\n protected openMenu(event: MouseEvent, col: CatsTreeTableColumn, index: number): void {\n event.stopPropagation();\n this.activeFilterIndex = null;\n this.showPin = false;\n this.menuVisible = this.menuVisible.map(() => false);\n this.menuVisible[index] = true;\n }\n\n /**\n * Recursively select all children of a node\n */\n private selectAllChildren(node: T): void {\n const key = this.getNodeKey(node);\n this.selectedKeys.add(key);\n\n const children = this.getChildren(node);\n if (Array.isArray(children)) {\n for (const child of children) {\n this.selectAllChildren(child);\n }\n }\n }\n\n /**\n * Recursively deselect all children of a node\n */\n private deselectAllChildren(node: T): void {\n const key = this.getNodeKey(node);\n this.selectedKeys.delete(key);\n\n const children = this.getChildren(node);\n if (Array.isArray(children)) {\n for (const child of children) {\n this.deselectAllChildren(child);\n }\n }\n }\n\n /**\n * Recursively select all nodes in the tree\n */\n private selectAllNodes(nodes: T[]): void {\n for (const node of nodes) {\n this.selectAllChildren(node);\n }\n }\n\n /**\n * Recursively deselect all nodes in the tree\n */\n private deselectAllNodes(nodes: T[]): void {\n for (const node of nodes) {\n this.deselectAllChildren(node);\n }\n }\n\n // /**\n // * Check if all children of a node are selected\n // */\n // private areAllChildrenSelected(node: T): boolean {\n // const children = this.getChildren(node);\n // if (!Array.isArray(children) || children.length === 0) {\n // return true;\n // }\n\n // for (const child of children) {\n // const childKey = this.getNodeKey(child);\n // if (!this.selectedKeys.has(childKey)) {\n // return false;\n // }\n // }\n // return true;\n // }\n\n // /**\n // * Check if any children of a node are selected\n // */\n // private areAnyChildrenSelected(node: T): boolean {\n // const children = this.getChildren(node);\n // if (!Array.isArray(children) || children.length === 0) {\n // return false;\n // }\n\n // for (const child of children) {\n // const childKey = this.getNodeKey(child);\n // if (this.selectedKeys.has(childKey)) {\n // return true;\n // }\n // }\n // return false;\n // }\n\n /**\n * Update parent node selection based on children state\n */\n private updateParentSelection(parentPath: T[]): void {\n // Update parents bottom-up\n for (let i = parentPath.length - 1; i >= 0; i--) {\n const parent = parentPath[i];\n const children = this.getChildren(parent);\n\n if (!Array.isArray(children) || children.length === 0) {\n continue;\n }\n\n // Check if all children are selected\n const allSelected = children.every((child) => this.selectedKeys.has(this.getNodeKey(child)));\n const parentKey = this.getNodeKey(parent);\n\n if (allSelected) {\n // Auto-select parent if all children are selected\n this.selectedKeys.add(parentKey);\n }\n // Note: We don't auto-deselect parent when children are deselected\n // This allows manual parent selection independent of children\n }\n }\n\n /**\n * On header checkbox change - select all nodes hierarchically\n */\n protected onHeaderCheckboxChange(event: any): void {\n if (event.target.checked) {\n this.selectAllNodes(this.data || []);\n } else {\n this.deselectAllNodes(this.data || []);\n }\n this.cd.markForCheck();\n }\n\n /**\n * On row checkbox change\n */\n protected onRowCheckboxChange(event: any, node: T): void {\n if (event.target.checked) {\n if (!this.selectedRow.includes(node)) {\n this.selectedRow.push(node);\n }\n } else {\n this.selectedRow = this.selectedRow.filter((r) => r !== node);\n }\n }\n\n /**\n * Check if all rows are selected\n */\n protected checkAllSelected(): boolean {\n return this.selectedRow.length === this.data.length && this.data.length > 0;\n }\n\n /**\n * Check if some rows are selected (indeterminate state)\n */\n protected checkIndeterminate(): boolean {\n return this.selectedRow.length > 0 && this.selectedRow.length < this.data.length;\n }\n\n /**\n * Check if row is selected\n */\n protected isRowSelected(node: T): boolean {\n return this.selectedRow.includes(node);\n }\n\n /**\n * Check if a node has indeterminate selection state (some but not all children selected)\n */\n protected isNodeIndeterminate(node: T): boolean {\n const children = this.getChildren(node);\n if (!Array.isArray(children) || children.length === 0) {\n return false;\n }\n\n let selectedCount = 0;\n for (const child of children) {\n const childKey = this.getNodeKey(child);\n if (this.selectedKeys.has(childKey)) {\n selectedCount++;\n }\n }\n\n // Indeterminate if some but not all children are selected\n return selectedCount > 0 && selectedCount < children.length;\n }\n\n /**\n * Check header checkbox indeterminate state\n */\n protected checkHeaderIndeterminate(): boolean {\n if (this.selectedKeys.size === 0) return false;\n\n // Count total nodes in tree\n let totalNodes = 0;\n const countNodes = (nodes: T[]) => {\n for (const node of nodes) {\n totalNodes++;\n const children = this.getChildren(node);\n if (Array.isArray(children)) {\n countNodes(children);\n }\n }\n };\n countNodes(this.data || []);\n\n return this.selectedKeys.size > 0 && this.selectedKeys.size < totalNodes;\n }\n\n /**\n * Check if header checkbox should be checked\n */\n protected checkHeaderChecked(): boolean {\n if (this.selectedKeys.size === 0) return false;\n\n // Count total nodes in tree\n let totalNodes = 0;\n const countNodes = (nodes: T[]) => {\n for (const node of nodes) {\n totalNodes++;\n const children = this.getChildren(node);\n if (Array.isArray(children)) {\n countNodes(children);\n }\n }\n };\n countNodes(this.data || []);\n\n return this.selectedKeys.size === totalNodes;\n }\n\n protected toggle(node: T, level: number, path: T[]): void {\n const key = this.getNodeKey(node);\n if (this.expandedKeys.has(key)) {\n this.expandedKeys.delete(key);\n // Recursively collapse all children\n this.collapseAllChildren(node);\n this.nodeToggle.emit({ node, level, path, expanded: false });\n this.rebuildRows();\n return;\n }\n\n this.expandedKeys.add(key);\n if (this.emitExpandAlways || this.getChildren(node) == null) {\n this.nodeToggle.emit({ node, level, path, expanded: true });\n }\n this.rebuildRows();\n }\n\n /**\n * Recursively collapse all children of a node\n */\n private collapseAllChildren(node: T): void {\n const children = this.getChildren(node);\n if (Array.isArray(children)) {\n for (const child of children) {\n const childKey = this.getNodeKey(child);\n this.expandedKeys.delete(childKey);\n this.collapseAllChildren(child);\n }\n }\n }\n\n protected isExpanded(node: T): boolean {\n return this.expandedKeys.has(this.getNodeKey(node));\n }\n\n protected onCheckboxChange(\n node: T,\n level: number,\n path: T[],\n checked: boolean,\n ): void {\n const key = this.getNodeKey(node);\n\n if (checked) {\n // When node is checked, select all its children recursively\n this.selectAllChildren(node);\n\n // Auto-select all parents if all their children are selected\n this.updateParentSelection(path);\n } else {\n // When node is unchecked, deselect all its children recursively\n this.deselectAllChildren(node);\n }\n\n this.selectionChange.emit({\n node,\n level,\n path,\n checked,\n selectedNodes: this.getSelectedNodes(),\n });\n\n this.cd.markForCheck();\n }\n\n protected isChecked(node: T): boolean {\n return this.selectedKeys.has(this.getNodeKey(node));\n }\n\n protected onLinkClicked(\n e: MouseEvent,\n node: T,\n level: number,\n path: T[],\n col: CatsTreeTableColumn,\n ): void {\n // Timer-based single/double click logic\n if (this.linkClickTimer) {\n clearTimeout(this.linkClickTimer);\n this.linkClickTimer = null;\n }\n e.preventDefault();\n e.stopPropagation();\n this.linkClickTimer = setTimeout(() => {\n this.linkClick.emit({ node, level, path, url: this.linkResolver(node, level, path), col });\n this.linkClickTimer = null;\n }, this.linkClickDelay);\n }\n\n protected onLinkDoubleClicked(e: MouseEvent, node: T, level: number, path: T[], col: CatsTreeTableColumn): void {\n // Cancel single click timer and emit double click\n if (this.linkClickTimer) {\n clearTimeout(this.linkClickTimer);\n this.linkClickTimer = null;\n }\n e.preventDefault();\n e.stopPropagation();\n this.linkDoubleClick.emit({ node, level, path, url: this.linkResolver(node, level, path), col });\n }\n\n protected resolveIconSrc(icon: string | null): string | null {\n if (!icon) return null;\n if (icon.includes('/') || icon.startsWith('http://') || icon.startsWith('https://')) {\n return icon;\n }\n return `${this.iconBasePath}/${icon}`;\n }\n\n protected getValue(node: T, fieldPath: string): any {\n if (!fieldPath) return '';\n const parts = fieldPath.split('.');\n let cur: any = node as any;\n for (const part of parts) {\n if (cur == null) return '';\n cur = cur?.[part];\n }\n return cur ?? '';\n }\n\n protected isNodeRow(row: RowView<T>): boolean {\n return row.kind === 'node';\n }\n\n protected rowOptions(row: RowView<T>): CatsTreeRowOptions {\n return this.rowOptionsResolver(row.node, row.level, row.path) || {};\n }\n\n protected showToggleFor(row: RowView<T>): boolean {\n const opts = this.rowOptions(row);\n if (opts.showToggle === false) return false;\n return this.isExpandable(row.node, row.level, row.path);\n }\n\n protected showCheckboxFor(row: RowView<T>): boolean {\n const opts = this.rowOptions(row);\n if (opts.showCheckbox != null) return !!opts.showCheckbox;\n return this.showCheckbox;\n }\n\n protected showNodeIconFor(row: RowView<T>): boolean {\n const opts = this.rowOptions(row);\n if (opts.showNodeIcon != null) return !!opts.showNodeIcon;\n return this.showNodeIcon;\n }\n\n protected showLinkFor(row: RowView<T>): boolean {\n const opts = this.rowOptions(row);\n if (opts.showLink != null) return !!opts.showLink;\n return this.linkResolver(row.node, row.level, row.path) != null;\n }\n\n protected isDisabledRow(row: RowView<T>): boolean {\n return !!this.rowOptions(row)?.disabled;\n }\n\n protected labelFor(row: RowView<T>): any {\n return this.getValue(row.node, this.labelField);\n }\n\n protected toggleIconFor(row: RowView<T>): string {\n if (this.isExpanded(row.node)) {\n }\n return this.isExpanded(row.node) ? this.collapseIcon : this.expandIcon;\n }\n\n protected nodeIconFor(row: RowView<T>): string | null {\n return this.nodeIconResolver(row.node, row.level, row.path, this.isExpanded(row.node));\n }\n\n protected linkUrlFor(row: RowView<T>): string | null {\n return this.linkResolver(row.node, row.level, row.path);\n }\n\n /**\n * Set page count based on total records and page size\n */\n protected setPageCount(): void {\n if (this.totalRecords === 0) {\n this.pageDetails.totalPages = 1;\n } else {\n this.pageDetails.totalPages = Math.ceil(this.totalRecords / this.pageDetails.pageSize);\n }\n }\n\n /**\n * On page size changed\n */\n protected onPageSizeChanged(event: any): void {\n this.recordsToShow.min = 0;\n this.recordsToShow.max = parseInt(event);\n this.pageDetails.currentPage = 1;\n this.pageDetails.pageSize = parseInt(event);\n this.setPageCount();\n this.onPaginationChange.emit({\n page: this.pageDetails.currentPage - 1,\n pageSize: this.pageDetails.pageSize,\n });\n }\n\n /**\n * On first button click\n */\n protected onBtFirstClick(): void {\n this.pageDetails.currentPage = 1;\n this.recordsToShow.min = 0;\n this.recordsToShow.max = this.pageDetails.pageSize;\n\n this.onPaginationChange.emit({\n page: this.pageDetails.currentPage - 1,\n pageSize: this.pageDetails.pageSize,\n });\n }\n\n /**\n * On previous button click\n */\n protected onBtPrevClick(): void {\n this.recordsToShow.min = this.recordsToShow.min - this.pageDetails.pageSize;\n this.recordsToShow.max = this.recordsToShow.max - this.pageDetails.pageSize;\n if (this.pageDetails.currentPage > 1)\n this.pageDetails.currentPage = this.pageDetails.currentPage - 1;\n\n this.onPaginationChange.emit({\n page: this.pageDetails.currentPage - 1,\n pageSize: this.pageDetails.pageSize,\n });\n }\n\n /**\n * On next button click\n */\n protected onBtNextClick(): void {\n this.recordsToShow.min = this.recordsToShow.min + this.pageDetails.pageSize;\n this.recordsToShow.max = this.recordsToShow.max + this.pageDetails.pageSize;\n\n if (this.pageDetails.currentPage < this.pageDetails.totalPages)\n this.pageDetails.currentPage = this.pageDetails.currentPage + 1;\n\n this.onPaginationChange.emit({\n page: this.pageDetails.currentPage - 1,\n pageSize: this.pageDetails.pageSize,\n });\n }\n\n /**\n * On last button click\n */\n protected onBtLastClick(): void {\n this.pageDetails.currentPage = this.pageDetails.totalPages;\n this.recordsToShow.max = this.pageDetails.currentPage * this.pageDetails.pageSize;\n this.recordsToShow.min = this.pageDetails.currentPage * this.pageDetails.pageSize - this.pageDetails.pageSize;\n\n this.onPaginationChange.emit({\n page: this.pageDetails.currentPage - 1,\n pageSize: this.pageDetails.pageSize,\n });\n }\n\n /**\n * Go to selected page\n */\n protected goToSelectedPage(event: any): void {\n let pageNo = event.target.value;\n if (pageNo < 1) {\n this.pageDetails.currentPage = 1;\n } else if (pageNo > this.pageDetails.totalPages) {\n this.pageDetails.currentPage = this.pageDetails.totalPages;\n }\n this.recordsToShow.max =\n this.pageDetails.currentPage * this.pageDetails.pageSize;\n this.recordsToShow.min =\n this.pageDetails.currentPage * this.pageDetails.pageSize -\n this.pageDetails.pageSize;\n\n this.onPaginationChange.emit({\n page: this.pageDetails.currentPage - 1,\n pageSize: this.pageDetails.pageSize,\n });\n }\n\n /**\n * @description method to reset table configuration\n * @author Tarun Kumar\n * @param none\n * @returns void\n */\n resetPagination(): void {\n //this.pageDetails.pageSize = 20;\n this.pageDetails.currentPage = 1;\n this.pageDetails.totalPages = 1;\n this.recordsToShow.min = 0;\n this.recordsToShow.max = this.pageDetails.pageSize;\n this.setPageCount();\n }\n\n /**\n * Convert to number\n */\n protected convertToNumber(val: any): number {\n return parseInt(val);\n }\n\n private getChildren(node: T): any[] | null | undefined {\n return (node as any)?.[this.childrenField];\n }\n\n private rebuildRows(): void {\n const next: RowView<T>[] = [];\n for (const root of this.data || []) {\n this.walk(root, 0, [], next);\n }\n this.rows = next;\n }\n\n private walk(node: T, level: number, parentPath: T[], out: RowView<T>[]): void {\n const path = [...parentPath, node];\n out.push({\n kind: 'node',\n node,\n level,\n path,\n trackKey: this.getNodeKey(node),\n });\n\n if (!this.isExpanded(node) || !this.isExpandable(node, level, path)) return;\n\n const children = this.getChildren(node);\n if (children == null) {\n out.push({\n kind: 'loading',\n node,\n level: level + 1,\n path,\n trackKey: `${this.getNodeKey(node)}::loading`,\n } as any);\n return;\n }\n\n if (!Array.isArray(children) || children.length === 0) {\n out.push({\n kind: 'no-data',\n node,\n level: level + 1,\n path,\n trackKey: `${this.getNodeKey(node)}::no-data`,\n } as any);\n return;\n }\n\n for (const child of children) {\n this.walk(child, level + 1, path, out);\n }\n }\n\n private getNodeKey(node: T): string | number {\n const anyNode = node as any;\n const direct = anyNode?.[this.idField];\n if (direct != null) return direct;\n if (typeof node === 'object' && node != null) {\n const existing = this.fallbackKey.get(node as any);\n if (existing != null) return existing;\n const next = this.fallbackSeq++;\n this.fallbackKey.set(node as any, next);\n return next;\n }\n return String(node);\n }\n\n private getSelectedNodes(): T[] {\n const selected: T[] = [];\n const visit = (nodes: T[]) => {\n for (const n of nodes) {\n if (this.selectedKeys.has(this.getNodeKey(n))) selected.push(n);\n const children = this.getChildren(n);\n if (Array.isArray(children) && children.length > 0) visit(children as T[]);\n }\n };\n visit(this.data || []);\n return selected;\n }\n\n /**\n * Autosize column to fit content\n */\n protected autosizeColumn(col: CatsTreeTableColumn, index: number): void {\n const min = col.minWidth ?? 50;\n const max = col.maxWidth ?? 500;\n const estimatedWidth = Math.min(Math.max(150, min), max);\n col.width = estimatedWidth;\n this.updatePinnedOffsets();\n }\n\n /**\n * Autosize all columns\n */\n protected autosizeAllColumns(): void {\n this.columns.forEach((col) => {\n const min = col.minWidth ?? 50;\n const max = col.maxWidth ?? 500;\n const estimatedWidth = Math.min(Math.max(150, min), max);\n col.width = estimatedWidth;\n });\n this.updatePinnedOffsets();\n }\n\n /**\n * Group by column\n */\n protected groupByColumn(col: CatsTreeTableColumn, index: number): void {\n // Emit event or handle grouping logic\n console.log('Group by column:', col.fieldName);\n }\n\n /**\n * Show column chooser\n */\n protected showColumnChooser(colIdx: number): void {\n // Toggle settings to show column chooser\n this.onClickOutside();\n }\n\n /**\n * Reset columns to original state\n */\n protected resetColumns(): void {\n if (this.originalColumns.length > 0) {\n this.columns = structuredClone(this.originalColumns);\n this.rebuildRows();\n }\n }\n\n /**\n * Save column state\n */\n private saveColumnState(): void {\n if (this.originalColumns.length === 0) {\n this.originalColumns = JSON.parse(JSON.stringify(this.columns));\n }\n }\n\n/**\n * Returns filtered hierarchy based on column filters with AND/OR logic, including number filter support\n */\n getFilteredHierarchy(): T[] {\n const filterColumns = this.columns.filter(col => col.filterable && (col.filters?.some(f => f.filterValue) || (col.filterType === 'set' && col.selectedValues && col.selectedValues.size > 0)));\n if (filterColumns.length === 0) return structuredClone(this.originalRowData);\n\n const filterFn = (node: T): boolean => {\n return filterColumns.every(col => {\n let value = this.getValue(node, col.fieldName);\n if (col.filterType === 'set') {\n return col.selectedValues?.has(value);\n } else if (col.filterType === 'number') {\n const conds = col.filters?.filter(f => f.filterValue !== '' && f.filterValue !== null && f.filterValue !== undefined) || [];\n if (conds.length === 0) return true;\n if (col.filterLogic === 'AND') {\n return conds.every(f => this.evaluateNumberFilterCondition(f.filterOperation, value, f.filterValue));\n } else {\n return conds.some(f => this.evaluateNumberFilterCondition(f.filterOperation, value, f.filterValue));\n }\n } else {\n const conds = col.filters?.filter(f => f.filterValue) || [];\n if (conds.length === 0) return true;\n if (col.filterLogic === 'AND') {\n return conds.every(f => this.evaluateTextFilterCondition(f.filterOperation, String(value).toLowerCase(), String(f.filterValue).toLowerCase()));\n } else {\n return conds.some(f => this.evaluateTextFilterCondition(f.filterOperation, String(value).toLowerCase(), String(f.filterValue).toLowerCase()));\n }\n }\n });\n };\n\n const filterTree = (nodes: T[]): T[] => {\n const result: T[] = [];\n for (const node of nodes) {\n const children = this.getChildren(node);\n let filteredChildren: T[] = [];\n if (Array.isArray(children)) {\n filteredChildren = filterTree(children);\n }\n if (filterFn(node) || filteredChildren.length > 0) {\n const clone:any = { ...node };\n if (Array.isArray(children)) {\n clone[this.childrenField] = filteredChildren;\n }\n result.push(clone);\n }\n }\n return result;\n };\n return filterTree(this.originalRowData);\n }\n\n /**\n * Evaluate number filter condition\n */\n private evaluateNumberFilterCondition(type: string, fieldValue: any, value: any): boolean {\n const numField = Number(fieldValue);\n const numValue = Number(value);\n if (isNaN(numField) || isNaN(numValue)) return false;\n switch (type) {\n case '=':\n case 'equals':\n return numField === numValue;\n case '>':\n return numField > numValue;\n case '<':\n return numField < numValue;\n case '>=':\n return numField >= numValue;\n case '<=':\n return numField <= numValue;\n default:\n return false;\n }\n }\n }\n","<div class=\"tableArea\" #table [class.is-resizing]=\"isResizing\">\n <!-- Settings Panel for Column Selection -->\n @if (settingsRequired && settingsClicked) {\n <div\n class=\"setting_options\"\n appOutsideClick\n (clickOutside)=\"hideSettings()\"\n >\n <div class=\"column_header\">Select Headers</div>\n <div class=\"checkbox_container\">\n <input\n class=\"custom_check_box\"\n type=\"checkbox\"\n [checked]=\"activeAll\"\n (change)=\"activeAllSelection($event)\"\n />\n <span>Select All</span>\n </div>\n\n <div class=\"item_container\" id=\"table_scroll\">\n @for (col of columns; track col.fieldName) {\n <div class=\"column_item checkbox_container\">\n <input\n class=\"custom_check_box\"\n type=\"checkbox\"\n [checked]=\"col.active\"\n [disabled]=\"col.headerLocked\"\n (change)=\"changeActiveColSelection($event, col)\"\n />\n <span>{{ col.header || col.fieldName | titlecase }}</span>\n </div>\n }\n </div>\n </div>\n }\n\n <!-- Main Table Wrapper -->\n <div\n class=\"table_wrapper global\"\n id=\"table_scroll\"\n [class.no-horizontal-scroll]=\"!rows || rows.length === 0\"\n #parent\n >\n <div class=\"table-inner-wrapper\">\n <table cellspacing=\"0\" cellpadding=\"0\">\n <thead class=\"sticky-top\">\n <tr>\n <!-- Checkbox header column -->\n @if (checkBoxSelection && atLeastOneColumnChecked) {\n <th style=\"min-width: 50px; width: 50px; max-width: 50px\">\n <div class=\"th_wraper\">\n <div class=\"checkbox_container\">\n <input\n class=\"pointer custom_check_box\"\n type=\"checkbox\"\n [checked]=\"checkHeaderChecked()\"\n [indeterminate]=\"checkHeaderIndeterminate()\"\n (change)=\"onHeaderCheckboxChange($event)\"\n />\n </div>\n <div class=\"filter_three_dot_wrapper\">\n <span class=\"resize-handle default_cursor\"> | </span>\n </div>\n </div>\n </th>\n }\n\n <!-- Column Headers -->\n @for (col of columns; track col.fieldName; let colIdx = $index) {\n @if (col.active !== false) {\n <th\n [ngStyle]=\"getStyle(col)\"\n [attr.data-col-idx]=\"colIdx\"\n [ngClass]=\"{\n 'drag-over': dragOverIndex === colIdx,\n pinned_column: col.leftPinned || col.rightPinned,\n }\"\n (mouseenter)=\"showMoveIcon[colIdx] = true\"\n (mouseleave)=\"showMoveIcon[colIdx] = false\"\n >\n <div class=\"th_wraper\">\n <!-- Sortable column header -->\n <div\n class=\"text_wrapper\"\n [ngClass]=\"{ sortable: col.sortable }\"\n (click)=\"onSortingRowData(colIdx, col)\"\n >\n @if (showMoveIcon[colIdx] && col.sortable) {\n <img\n src=\"images/t-move.svg\"\n class=\"move-icon\"\n [draggable]=\"!isResizing\"\n (dragstart)=\"onDragStart($event, colIdx)\"\n (dragend)=\"onDragEnd()\"\n />\n }\n <span class=\"ellipsis headerName\">{{\n col.header || col.fieldName\n }}</span>\n\n <!-- Sorting indicator -->\n @if (\n sortingRequired &&\n sortingColumnIndex === colIdx &&\n col.sortable\n ) {\n <span class=\"sorting_icon\">\n @if (sortingType[colIdx] === \"asc\") {\n <img src=\"images/t-arrow-up.svg\" alt=\"Ascending\" />\n } @else if (sortingType[colIdx] === \"dsc\") {\n <img\n src=\"images/t-arrow-down.svg\"\n alt=\"Descending\"\n />\n }\n </span>\n }\n </div>\n\n <!-- Filter and Menu -->\n <div class=\"filter_three_dot_wrapper\">\n <!-- Filter Icon -->\n @if (filterRequired && col.filterable) {\n <div\n class=\"filters\"\n (click)=\"toggleFilter(col, colIdx, $event)\"\n >\n @if (activeFilters.has(col.fieldName)) {\n <img\n src=\"images/filter-active.svg\"\n alt=\"Filter active\"\n />\n } @else {\n <img src=\"images/filter.svg\" alt=\"Filter\" />\n }\n\n <!-- Filter Dropdown -->\n @if (activeFilterIndex === colIdx) {\n <div\n class=\"filter_dropdown\"\n (click)=\"$event.stopPropagation()\"\n >\n <!-- Text Filter -->\n @if (col.filterType === \"text\") {\n <div class=\"filter_input_group\">\n <select\n [ngModel]=\"\n col.filters?.[0]?.filterOperation\n \"\n (ngModelChange)=\"\n col.filters![0].filterOperation = $event;\n applyAllFilters()\n \"\n >\n @for (\n opt of filterOptions;\n track opt.value\n ) {\n <option [value]=\"opt.value\">\n {{ opt.label }}\n </option>\n }\n </select>\n <input\n type=\"text\"\n class=\"search_input\"\n placeholder=\"Filter…\"\n [(ngModel)]=\"col.filters![0].filterValue\"\n (keyup)=\"applyAllFilters()\"\n />\n </div>\n @if (col.filters![0].filterValue) {\n <div class=\"logic-row radio_option\">\n <input\n type=\"radio\"\n name=\"filterLogic{{ col.fieldName }}\"\n [(ngModel)]=\"col.filterLogic\"\n value=\"AND\"\n id=\"and-{{ colIdx }}\"\n (change)=\"applyAllFilters()\"\n />\n <label [for]=\"'and-' + colIdx\">AND</label>\n <input\n type=\"radio\"\n name=\"filterLogic{{ col.fieldName }}\"\n [(ngModel)]=\"col.filterLogic\"\n value=\"OR\"\n id=\"or-{{ colIdx }}\"\n (change)=\"applyAllFilters()\"\n />\n <label [for]=\"'or-' + colIdx\">OR</label>\n </div>\n <div class=\"filter_input_group\">\n <select\n [ngModel]=\"\n col.filters![1]?.filterOperation\n \"\n (ngModelChange)=\"\n col.filters![1].filterOperation =\n $event;\n applyAllFilters()\n \"\n >\n @for (\n opt of filterOptions;\n track opt.value\n ) {\n <option [value]=\"opt.value\">\n {{ opt.label }}\n </option>\n }\n </select>\n <input\n type=\"text\"\n class=\"search_input\"\n placeholder=\"Filter…\"\n [(ngModel)]=\"col.filters![1].filterValue\"\n (keyup)=\"applyAllFilters()\"\n />\n </div>\n }\n }\n <!-- Number Filter -->\n @if (col.filterType === \"number\") {\n <div class=\"filter_input_group\">\n <select\n [ngModel]=\"\n col.filters?.[0]?.filterOperation\n \"\n (ngModelChange)=\"\n col.filters![0].filterOperation = $event;\n applyAllFilters()\n \"\n >\n @for (\n opt of numberFilterOptions;\n track opt.value\n ) {\n <option [value]=\"opt.value\">\n {{ opt.label }}\n </option>\n }\n </select>\n <input\n type=\"number\"\n class=\"search_input\"\n placeholder=\"Filter…\"\n [(ngModel)]=\"col.filters![0].filterValue\"\n (keyup)=\"applyAllFilters()\"\n />\n </div>\n @if (col.filters![0].filterValue) {\n <div class=\"logic-row radio_option\">\n <input\n type=\"radio\"\n name=\"filterLogic{{ col.fieldName }}\"\n [(ngModel)]=\"col.filterLogic\"\n value=\"AND\"\n id=\"and-num-{{ colIdx }}\"\n (change)=\"applyAllFilters()\"\n />\n <label [for]=\"'and-num-' + colIdx\"\n >AND</label\n >\n <input\n type=\"radio\"\n name=\"filterLogic{{ col.fieldName }}\"\n [(ngModel)]=\"col.filterLogic\"\n value=\"OR\"\n id=\"or-num-{{ colIdx }}\"\n (change)=\"applyAllFilters()\"\n />\n <label [for]=\"'or-num-' + colIdx\">OR</label>\n </div>\n <div class=\"filter_input_group\">\n <select\n [ngModel]=\"\n col.filters![1]?.filterOperation\n \"\n (ngModelChange)=\"\n col.filters![1].filterOperation =\n $event;\n applyAllFilters()\n \"\n >\n @for (\n opt of numberFilterOptions;\n track opt.value\n ) {\n <option [value]=\"opt.value\">\n {{ opt.label }}\n </option>\n }\n </select>\n <input\n type=\"number\"\n class=\"search_input\"\n placeholder=\"Filter…\"\n [(ngModel)]=\"col.filters![1].filterValue\"\n (keyup)=\"applyAllFilters()\"\n />\n </div>\n }\n }\n <!-- Set Filter (Checkboxes) -->\n @if (col.filterType === \"set\") {\n <div class=\"search_input\">\n <input\n type=\"text\"\n placeholder=\"Search...\"\n (input)=\"filterSetOptions(col, $event)\"\n />\n </div>\n <div class=\"set_option_details\">\n <label>\n <input\n type=\"checkbox\"\n [checked]=\"\n col.options?.length ===\n col.selectedValues?.size\n \"\n (change)=\"\n toggleSelectAllSetFilter(col, $event)\n \"\n />\n <span>Select All</span>\n </label>\n @for (\n option of col.filteredOptions;\n track option\n ) {\n <label>\n <input\n type=\"checkbox\"\n [checked]=\"\n col.selectedValues?.has(option)\n \"\n (change)=\"\n toggleSetOption(col, option, $event)\n \"\n />\n <span>{{ option }}</span>\n </label>\n }\n </div>\n }\n <div class=\"filter_btn\">\n <button (click)=\"resetFilter(col)\">\n Clear\n </button>\n </div>\n </div>\n }\n </div>\n }\n\n <!-- Three dots menu-->\n <div #triggerColMenu>\n @if (threeDotsMenuRequired) {\n <div\n class=\"three-dots\"\n (click)=\"openMenu($event, col, colIdx)\"\n >\n <img\n src=\"images/t-more-vertical.svg\"\n alt=\"Menu\"\n [draggable]=\"false\"\n (dragstart)=\"\n $event.preventDefault();\n $event.stopPropagation()\n \"\n />\n </div>\n }\n </div>\n\n <!-- Column Resize Handle -->\n <span\n class=\"resize-handle\"\n (mousedown)=\"startResize($event, colIdx)\"\n >\n |\n </span>\n </div>\n </div>\n\n @if (menuVisible[colIdx]) {\n <div\n #colActionMenu\n class=\"dropdown_wrapper\"\n adaptivePosition\n [trigger]=\"triggerColMenu\"\n [parentContainer]=\"parent\"\n [matchWidth]=\"false\"\n [isColumnActionMenu]=\"true\"\n (click)=\"$event.stopPropagation()\"\n appOutsideClick\n (clickOutside)=\"onClickOutside()\"\n >\n <div class=\"right_click_dropdown\" id=\"table_scroll\">\n <!-- Sort Ascending -->\n @if (\n sortingType[colIdx] === \"dsc\" || !sortingType[colIdx]\n ) {\n <div\n class=\"right_click_item\"\n (click)=\"onSort(col, 'asc', colIdx)\"\n >\n <div class=\"left_item\">\n <img\n src=\"images/arrow-up.svg\"\n class=\"sorting_up\"\n [ngClass]=\"{ disable: !col.sortable }\"\n />\n <span class=\"text\">Sort Ascending</span>\n </div>\n </div>\n }\n\n <!-- Sort Descending -->\n @if (\n sortingType[colIdx] === \"asc\" || !sortingType[colIdx]\n ) {\n <div\n class=\"right_click_item\"\n (click)=\"onSort(col, 'dsc', colIdx)\"\n >\n <div class=\"left_item\">\n <img src=\"images/arrow-down.svg\" alt=\"\" />\n <span class=\"text\">Sort Descending</span>\n </div>\n </div>\n }\n\n <!-- Clear Sort -->\n @if (\n sortingType[colIdx] === \"asc\" ||\n sortingType[colIdx] === \"dsc\"\n ) {\n <div\n class=\"right_click_item\"\n (click)=\"onSort(col, '', colIdx)\"\n >\n <div class=\"left_item\">\n <img src=\"images/trash-2.svg\" alt=\"\" />\n <span class=\"text\">Clear Sort</span>\n </div>\n </div>\n }\n\n <div class=\"divder\"></div>\n\n <!-- Pin Column -->\n <div\n class=\"right_click_item\"\n (mouseenter)=\"showPinActions($event)\"\n (mouseleave)=\"hidePinActions()\"\n >\n <div class=\"left_item\">\n <img src=\"images/pin.svg\" alt=\"\" />\n <span class=\"text\">Pin Column</span>\n </div>\n <div class=\"right_item\">\n <img src=\"images/chevron-right.svg\" alt=\"\" />\n @if (showPin) {\n <div class=\"second_dropdown\" #pinMenu>\n <div\n class=\"right_click_item\"\n (click)=\"pinColumn(col, colIdx, 'none')\"\n >\n <div class=\"left_item\">\n @if (\n pinActionClicked[\n col.colId || col.fieldName\n ] === \"none\"\n ) {\n <img src=\"images/check.svg\" alt=\"\" />\n } @else {\n <img src=\"\" alt=\"\" />\n }\n <span class=\"text\">No Pin</span>\n </div>\n </div>\n <div\n class=\"right_click_item\"\n (click)=\"pinColumn(col, colIdx, 'left')\"\n >\n <div class=\"left_item\">\n @if (\n pinActionClicked[\n col.colId || col.fieldName\n ] === \"left\"\n ) {\n <img src=\"images/check.svg\" alt=\"\" />\n } @else {\n <img src=\"\" alt=\"\" />\n }\n <span class=\"text\">Pin Left</span>\n </div>\n </div>\n <div\n class=\"right_click_item\"\n (click)=\"pinColumn(col, colIdx, 'right')\"\n >\n <div class=\"left_item\">\n @if (\n pinActionClicked[\n col.colId || col.fieldName\n ] === \"right\"\n ) {\n <img src=\"images/check.svg\" alt=\"\" />\n } @else {\n <img src=\"\" alt=\"\" />\n }\n <span class=\"text\">Pin Right</span>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n\n <!-- Autosize This Column -->\n <div\n class=\"right_click_item\"\n (click)=\"autosizeColumn(col, colIdx)\"\n >\n <div class=\"left_item\">\n <img src=\"\" alt=\"\" />\n <span class=\"text\">Autosize This Column</span>\n </div>\n </div>\n\n <!-- Autosize All Columns -->\n <div\n class=\"right_click_item\"\n (click)=\"autosizeAllColumns()\"\n >\n <div class=\"left_item\">\n <img src=\"\" alt=\"\" />\n <span class=\"text\">Autosize All Columns</span>\n </div>\n </div>\n\n <!-- <div class=\"divder\"></div> -->\n\n <!-- Group by Column -->\n <!-- <div class=\"right_click_item\" (click)=\"groupByColumn(col, colIdx)\">\n\t <div class=\"left_item\">\n\t <img src=\"\" alt=\"\" />\n\t <span class=\"text\">Group by {{ col.header || col.fieldName }}</span>\n\t </div>\n\t </div> -->\n\n <!-- Choose Columns -->\n <!-- <div class=\"right_click_item\" (click)=\"showColumnChooser(colIdx)\">\n\t <div class=\"left_item\">\n\t <img src=\"\" alt=\"\" />\n\t <span class=\"text\">Choose Columns</span>\n\t </div>\n\t </div> -->\n\n <!-- Reset Columns -->\n <!-- <div class=\"right_click_item\">\n\t <div class=\"left_item\">\n\t <img src=\"\" alt=\"\" />\n\t <span class=\"text\">Reset Columns</span>\n\t </div>\n\t </div> -->\n </div>\n </div>\n }\n </th>\n }\n }\n </tr>\n </thead>\n\n <tbody>\n @for (row of rows; track row.trackKey) {\n @if (row.kind === \"node\") {\n <tr [class.disabled]=\"isDisabledRow(row)\">\n <!-- Checkbox column -->\n @if (checkBoxSelection && atLeastOneColumnChecked) {\n <td style=\"min-width: 50px; max-width: 50px\">\n @if (checkboxSelectionType === \"multiple\") {\n @if (showCheckboxFor(row)) {\n <span class=\"checkbox_container\">\n <input\n type=\"checkbox\"\n [disabled]=\"isDisabledRow(row)\"\n [indeterminate]=\"isNodeIndeterminate(row.node)\"\n [checked]=\"isChecked(row.node)\"\n (change)=\"\n onCheckboxChange(\n row.node,\n row.level,\n row.path,\n $any($event.target).checked\n )\n \"\n />\n <label [for]=\"'row_' + row.trackKey\"></label>\n </span>\n }\n } @else {\n <span class=\"radio_option\">\n <input\n type=\"radio\"\n [name]=\"'row_' + row.trackKey\"\n [checked]=\"isChecked(row.node)\"\n (change)=\"\n onCheckboxChange(\n row.node,\n row.level,\n row.path,\n $any($event.target).checked\n )\n \"\n />\n <label [for]=\"'row_' + row.trackKey\"></label>\n </span>\n }\n </td>\n }\n\n <!-- Data columns -->\n @for (\n col of columns;\n track col.fieldName;\n let colIndex = $index\n ) {\n @if (col.active !== false) {\n <td\n [ngStyle]=\"getStyle(col)\"\n [ngClass]=\"[\n col.leftPinned || col.rightPinned\n ? 'pinned_column'\n : '',\n ]\"\n class=\"table_cell\"\n >\n @if (col.fieldName === treeColumn.fieldName) {\n @if (!col?.cellRenderer) {\n <div\n class=\"tree_cell\"\n [style.padding-left.px]=\"row.level * indentPx\"\n >\n @if (showToggleFor(row)) {\n <button\n class=\"toggle_btn\"\n type=\"button\"\n [disabled]=\"isDisabledRow(row)\"\n (click)=\"toggle(row.node, row.level, row.path)\"\n >\n <img\n [src]=\"resolveIconSrc(toggleIconFor(row))\"\n alt=\"\"\n />\n </button>\n } @else {\n <span class=\"toggle_spacer\"></span>\n }\n\n <!-- @if (showCheckboxFor(row)) {\n <input\n type=\"checkbox\"\n [disabled]=\"isDisabledRow(row)\"\n [checked]=\"isChecked(row.node)\"\n (change)=\"\n onCheckboxChange(\n row.node,\n row.level,\n row.path,\n ($any($event.target).checked)\n )\n \"\n />\n } -->\n\n @if (showNodeIconFor(row)) {\n @if (nodeIconFor(row); as icon) {\n <img\n class=\"node_icon\"\n [src]=\"resolveIconSrc(icon)\"\n alt=\"\"\n />\n }\n }\n\n @if (showLinkFor(row) && linkUrlFor(row); as url) {\n <a\n class=\"node_link ellipsis\"\n [appTooltip]=\"labelFor(row) || 'N/A'\"\n tooltipPosition=\"adaptive\"\n [tooltipParentContainer]=\"parent\"\n (click)=\"\n onLinkClicked(\n $event,\n row.node,\n row.level,\n row.path,\n col\n )\n \"\n (dblclick)=\"\n onLinkDoubleClicked(\n $event,\n row.node,\n row.level,\n row.path,\n col\n )\n \"\n >\n {{ labelFor(row) || \"N/A\" }}\n </a>\n } @else {\n <span\n class=\"node_label\"\n [appTooltip]=\"labelFor(row) || 'N/A'\"\n tooltipPosition=\"adaptive\"\n [tooltipParentContainer]=\"parent\"\n >{{ labelFor(row) || \"N/A\" }}</span\n >\n }\n </div>\n } @else {\n <div\n [rowParam]=\"row.node\"\n [col]=\"col\"\n [api]=\"tableOptions\"\n [currentValue]=\"getValue(row.node, col.fieldName)\"\n appRendererParser\n [style.padding-left.px]=\"row.level * indentPx\"\n ></div>\n }\n } @else {\n <div class=\"col_wrapper\">\n @if (!col?.cellRenderer) {\n <span class=\"ellipsis\" [appTooltip]=\"getValue(row.node, col.fieldName) || 'N/A'\"\n tooltipPosition=\"adaptive\" [tooltipParentContainer]=\"parent\"> {{\n getValue(row.node, col.fieldName) || \"N/A\"\n }}</span>\n } @else {\n <div\n [rowParam]=\"row.node\"\n [col]=\"col\"\n [api]=\"tableOptions\"\n [currentValue]=\"getValue(row.node, col.fieldName)\"\n appRendererParser\n ></div>\n }\n </div>\n }\n </td>\n }\n }\n </tr>\n } @else if (row.kind === \"loading\") {\n <tr class=\"meta_row\">\n <td\n [attr.colspan]=\"columns.length + (checkBoxSelection ? 1 : 0)\"\n >\n <div\n class=\"meta_cell\"\n [style.padding-left.px]=\"row.level * indentPx\"\n >\n {{ loadingText }}\n </div>\n </td>\n </tr>\n } @else if (row.kind === \"no-data\") {\n <tr class=\"meta_row\">\n <td\n [attr.colspan]=\"columns.length + (checkBoxSelection ? 1 : 0)\"\n >\n <div\n class=\"meta_cell\"\n [style.padding-left.px]=\"row.level * indentPx\"\n >\n {{ noDataText }}\n </div>\n </td>\n </tr>\n }\n }\n </tbody>\n </table>\n\n @if (!rows || rows.length === 0) {\n <div class=\"empty_overlay\">\n <div class=\"empty_content\">\n <span>{{ noDataText }}</span>\n </div>\n </div>\n }\n </div>\n </div>\n\n <!-- Pagination -->\n @if (paginationRequired) {\n <div class=\"pagination_main\">\n <div class=\"entries_details\">\n <span>Showing</span>\n <div class=\"pagination_select\">\n <div\n class=\"select_dropdown pointer\"\n (click)=\"showPageSizeList = !showPageSizeList\"\n >\n <p class=\"select_text mb-0\">{{ pageDetails.pageSize }}</p>\n <span class=\"chevron_img\">\n <img src=\"images/chevron-down.svg\" class=\"pointer\" />\n </span>\n </div>\n @if (showPageSizeList) {\n <div\n class=\"select_option\"\n appOutsideClick\n (clickOutside)=\"onClickOutside()\"\n >\n @for (option of pageSizeList; track $index) {\n <span\n class=\"pointer\"\n (click)=\"onPageSizeChanged(option); onClickOutside()\"\n >{{ option }}</span\n >\n }\n </div>\n }\n </div>\n <span\n >Rows |\n {{ totalRecords > 0 ? convertToNumber(recordsToShow.min) + 1 : 0 }} -\n {{\n recordsToShow.max > totalRecords ? totalRecords : recordsToShow.max\n }}\n of\n {{ totalRecords }} Entries</span\n >\n </div>\n <div class=\"pagination_form\">\n <button\n class=\"outlined_btn first_btn\"\n type=\"button\"\n (click)=\"onBtFirstClick()\"\n [ngClass]=\"pageDetails.currentPage > 1 ? '' : 'disable_btn'\"\n >\n <span> <img src=\"images/chevrons-left.svg\" alt=\"\" /> </span>\n </button>\n <button\n class=\"outlined_btn prev_btn\"\n [ngClass]=\"pageDetails.currentPage > 1 ? '' : 'disable_btn'\"\n type=\"button\"\n (click)=\"onBtPrevClick()\"\n >\n <span> <img src=\"images/chevron-left.svg\" alt=\"\" /> </span>\n </button>\n <div>\n <input\n class=\"input_style\"\n type=\"number\"\n [(ngModel)]=\"pageDetails.currentPage\"\n (change)=\"goToSelectedPage($event)\"\n name=\"\"\n id=\"\"\n />\n </div>\n <button\n class=\"outlined_btn next_btn\"\n type=\"button\"\n [ngClass]=\"\n pageDetails.currentPage < pageDetails.totalPages\n ? ''\n : 'disable_btn'\n \"\n (click)=\"onBtNextClick()\"\n >\n <span> <img src=\"images/chevron-right.svg\" alt=\"\" /> </span>\n </button>\n <button\n class=\"outlined_btn last_btn\"\n type=\"button\"\n (click)=\"onBtLastClick()\"\n [ngClass]=\"\n pageDetails.currentPage < pageDetails.totalPages\n ? ''\n : 'disable_btn'\n \"\n >\n <span> <img src=\"images/chevrons-right.svg\" alt=\"\" /> </span>\n </button>\n </div>\n </div>\n }\n <!-- Pagination Ends -->\n</div>\n","/*\n * Public API Surface of cats-data-grid\n */\n\nexport * from './lib/services/cats-data-grid.service';\nexport * from './lib/cats-data-grid.component';\nexport * from './lib/renderers/common-renderer/common-renderer.component';\nexport * from './lib/common-components/common-tree-table/common-tree-table.component';\nexport * from './lib/directives/tooltip.directive';\nexport * from './lib/common-components/tooltip/tooltip.component';\nexport * from './lib/directives/adaptive-position.directive';","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MAKa,mBAAmB,CAAA;AAE9B,IAAA,WAAA,GAAA,EAAgB;wGAFL,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAnB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,cAFlB,MAAM,EAAA,CAAA;;4FAEP,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAH/B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;;MCCY,YAAY,CAAA;IAEvB,SAAS,CAAC,KAAU,EAAE,OAAY,EAAA;AAChC,QAAA,IAAI,OAAO,EAAE,UAAU,EAAE;AACvB,YAAA,OAAO,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC;QAClC;AACK,aAAA,IAAG,OAAO,EAAE,cAAc,EAAE;AAC/B,YAAA,OAAO,OAAO,CAAC,cAAc,CAAC,KAAK,CAAC;QACtC;AACA,QAAA,OAAO,EAAE;IACX;wGAVW,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,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EAAA,cAAA,EAAA,MAAA,EAAA,CAAA,YAAA,EAAA,iBAAA,EAAA,cAAA,EAAA,gBAAA,EAAA,kBAAA,EAAA,gBAAA,EAAA,iBAAA,EAAA,qBAAA,EAAA,iBAAA,EAAA,cAAA,EAAA,wBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,aAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,CAAA;;4FAIrH,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBANpC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,EAAA,OAAA,EAClB,CAAC,YAAY,EAAE,WAAW,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,uBAAuB,EAAE,gBAAgB,CAAC,EAAA,QAAA,EAAA,8/uCAAA,EAAA,MAAA,EAAA,CAAA,krmCAAA,CAAA,EAAA;;sBAMhI,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,OAAO,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;;sBACnC,SAAS;uBAAC,SAAS;;sBACnB;;sBACA;;sBACA;;sBAEA;;sBACA;;sBACA;;sBACA;;sBAEA;;sBACA;;sBAEA;;sBACA;;sBACA;;sBAEA;;sBACA;;sBACA;;sBACA;;sBAEA;;sBAGA;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBAEA;;sBACA;;sBACA;;sBACA;;sBAEA;;sBAOA;;sBAGA;;sBAGA;;sBAGA;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;;AEnKH;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"cats-data-grid.mjs","sources":["../../../projects/cats-data-grid/src/lib/services/cats-data-grid.service.ts","../../../projects/cats-data-grid/src/lib/pipes/add-class.pipe.ts","../../../projects/cats-data-grid/src/lib/directives/outside-click.directive.ts","../../../projects/cats-data-grid/src/lib/directives/renderer-parser.directive.ts","../../../projects/cats-data-grid/src/lib/common-components/common-input/common-input.component.ts","../../../projects/cats-data-grid/src/lib/common-components/common-input/common-input.component.html","../../../projects/cats-data-grid/src/lib/directives/adaptive-position.directive.ts","../../../projects/cats-data-grid/src/lib/common-components/common-calendar/common-calendar.component.ts","../../../projects/cats-data-grid/src/lib/common-components/common-calendar/common-calendar.component.html","../../../projects/cats-data-grid/src/lib/cats-data-grid.component.ts","../../../projects/cats-data-grid/src/lib/cats-data-grid.component.html","../../../projects/cats-data-grid/src/lib/renderers/common-renderer/common-renderer.component.ts","../../../projects/cats-data-grid/src/lib/renderers/common-renderer/common-renderer.component.html","../../../projects/cats-data-grid/src/lib/common-components/tooltip/tooltip.component.ts","../../../projects/cats-data-grid/src/lib/directives/tooltip.directive.ts","../../../projects/cats-data-grid/src/lib/common-components/common-tree-table/common-tree-table.component.ts","../../../projects/cats-data-grid/src/lib/common-components/common-tree-table/common-tree-table.component.html","../../../projects/cats-data-grid/src/public-api.ts","../../../projects/cats-data-grid/src/cats-data-grid.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CatsDataGridService {\n\n constructor() { }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'addClass'\n})\nexport class AddClassPipe implements PipeTransform {\n\n transform(value: any, context: any): string {\n if (context?.addClasses) {\n return context.addClasses(value)\n }\n else if(context?.cellValueClass) {\n return context.cellValueClass(value)\n }\n return '';\n }\n\n}\n","import {\n Directive,\n ElementRef,\n EventEmitter,\n HostListener,\n OnDestroy,\n OnInit,\n Output,\n} from '@angular/core';\n\n@Directive({\n selector: '[appOutsideClick]',\n standalone: true,\n})\nexport class OutsideClickDirective implements OnInit, OnDestroy {\n @Output() clickOutside = new EventEmitter();\n constructor(private elementRef: ElementRef) {}\n private onClick = (event: MouseEvent) => {\n const target = event.target as HTMLElement;\n if (!this.elementRef.nativeElement.contains(target)) {\n this.clickOutside.emit(event);\n }\n };\n\n ngOnInit() {\n document.addEventListener('click', this.onClick, true);\n }\n\n ngOnDestroy() {\n document.removeEventListener('click', this.onClick, true);\n }\n}\n","import {\n Component,\n Directive,\n ElementRef,\n Input,\n OnInit,\n ViewContainerRef,\n} from '@angular/core';\n\n@Directive({\n selector: '[appRendererParser]',\n})\nexport class RendererParserDirective implements OnInit {\n @Input() rowParam: any;\n @Input() col: any;\n @Input() api: any;\n @Input() currentValue: any;\n ref: any;\n constructor(private el: ViewContainerRef, private er: ElementRef) {}\n ngOnInit() {\n this.el?.clear();\n let params: any = {\n data: this.rowParam,\n value: this.currentValue,\n cellParams: this.col?.cellRendererParams,\n col: this.col,\n };\n if (\n this.col?.cellRenderer?.prototype &&\n this.col.cellRenderer.prototype?.constructor == this.col.cellRenderer\n ) {\n this.ref = this.el.createComponent(this.col?.cellRenderer);\n this.ref.instance?.cellInit(params, this.api);\n this.ref.location.nativeElement.style.width = '100%';\n } else if (typeof this.col?.cellRenderer == 'function') {\n let newDiv = document.createElement('div');\n newDiv.className = 'more_data_wrapper';\n newDiv.innerHTML = this.col.cellRenderer(params);\n let toltipDiv = document.createElement('div');\n let itemDiv = document.createElement('div');\n let descDiv = document.createElement('div');\n toltipDiv.className = 'see_more_data';\n itemDiv.className = 'item';\n descDiv.className = 'desc';\n descDiv.innerHTML = newDiv.innerText;\n itemDiv.appendChild(descDiv);\n toltipDiv.appendChild(itemDiv);\n this.er.nativeElement.appendChild(newDiv);\n this.er.nativeElement.appendChild(toltipDiv);\n }\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n Component,\n EventEmitter,\n HostListener,\n Input,\n Output,\n} from '@angular/core';\n\n@Component({\n selector: 'lib-common-input',\n imports: [CommonModule],\n templateUrl: './common-input.component.html',\n styleUrl: './common-input.component.scss',\n})\nexport class CommonInputComponent {\n @Input() options: { label: string; value: any }[] = [];\n @Input() selectedValue: any;\n @Input() placeholder = 'Select';\n @Input() elementType = 'dropdown';\n\n @Output() valueChange = new EventEmitter<any>();\n\n showDropdown = false;\n\n toggleDropdown(): void {\n this.showDropdown = !this.showDropdown;\n }\n\n selectOption(option: any): void {\n this.selectedValue = option.value;\n this.valueChange.emit(option.value);\n this.showDropdown = false;\n }\n\n get selectedLabel(): string {\n return (\n this.options.find((o) => o.value === this.selectedValue)?.label ||\n this.placeholder\n );\n }\n\n // optional: close on outside click\n @HostListener('document:click', ['$event'])\n closeOnOutsideClick(event: MouseEvent): void {\n const target = event.target as HTMLElement;\n if (!target.closest('.text_filter_section')) {\n this.showDropdown = false;\n }\n }\n}\n","<!-- dropdown -->\n@if(elementType === 'dropdown'){\n<div class=\"text_filter_section\">\n <div class=\"single_select_dropdown\" (click)=\"toggleDropdown()\">\n <div class=\"left_details\">\n <span class=\"placeholderColor textTruncate\">\n {{ selectedLabel }}\n </span>\n </div>\n\n <span class=\"arrow_icon\">\n <img\n src=\"images/chevron-up.svg\"\n [ngClass]=\"{ 'd-none': !showDropdown }\"\n />\n <img\n src=\"images/chevron-down.svg\"\n [ngClass]=\"{ 'd-none': showDropdown }\"\n />\n </span>\n </div>\n\n @if (showDropdown) {\n <div class=\"dropdown_list\" id=\"table_scroll\">\n <ul>\n @for (option of options; track option.value) {\n <li (click)=\"selectOption(option)\">\n <span class=\"textTruncate\">{{ option.label }}</span>\n </li>\n }\n </ul>\n </div>\n }\n</div>\n\n}\n","import {\n Directive,\n ElementRef,\n Input,\n Renderer2,\n HostListener,\n OnDestroy,\n AfterViewInit,\n} from '@angular/core';\n\n@Directive({\n selector: '[adaptivePosition]',\n})\nexport class AdaptivePositionDirective implements AfterViewInit, OnDestroy {\n @Input('adaptive') dropdown!: HTMLElement;\n @Input() trigger!: HTMLElement;\n @Input() parentContainer!: HTMLElement;\n @Input() matchWidth: boolean = true;\n @Input() closeOnOutside: boolean = true;\n @Input() isAction: boolean = false;\n @Input() isColumnActionMenu: boolean = false;\n\n resizeObserver!: ResizeObserver;\n isOpen = false;\n menuItems: HTMLElement[] = [];\n focusedIndex = -1;\n\n constructor(private host: ElementRef) {}\n\n ngAfterViewInit(): void {\n this.setupBaseStyles();\n this.observeResize();\n }\n\n // @HostListener('click', ['$event'])\n // toggle(event: Event) {\n // event.stopPropagation();\n // this.isOpen ? this.close() : this.open();\n // }\n\n open() {\n this.isOpen = true;\n this.dropdown.classList.remove('hidden');\n this.dropdown.setAttribute('role', 'listbox');\n this.host.nativeElement.setAttribute('aria-expanded', 'true');\n this.prepareItems();\n this.positionDropdown();\n\n if (this.closeOnOutside)\n document.addEventListener('click', this.handleOutsideClick);\n }\n\n close() {\n this.isOpen = false;\n this.dropdown.classList.add('hidden');\n this.host.nativeElement.setAttribute('aria-expanded', 'false');\n document.removeEventListener('click', this.handleOutsideClick);\n this.focusedIndex = -1;\n }\n\n positionDropdown() {\n if (!this.trigger) return;\n\n const dropdown = this.host.nativeElement;\n const parent =\n this.parentContainer ||\n this.trigger.closest('.table_wrapper') ||\n document.body ||\n this.trigger.offsetParent!;\n if (!parent) return;\n\n const t = this.trigger.getBoundingClientRect();\n const p = parent.getBoundingClientRect();\n const dH = dropdown.offsetHeight;\n const dW = dropdown.offsetWidth;\n\n const spaceBelow = p.bottom - t.bottom;\n const spaceAbove = t.top - p.top;\n const spaceRight = p.right - t.left;\n const spaceLeft = t.right - p.left;\n\n if (spaceBelow < dH && spaceAbove > dH) {\n dropdown.style.bottom = `${this.trigger.offsetHeight}px`;\n dropdown.style.top = 'auto';\n dropdown.classList.add('drop-up');\n dropdown.classList.remove('drop-down');\n }\n\n if (spaceRight < dW && spaceLeft > dW) {\n dropdown.style.right = '0';\n dropdown.style.left = 'auto';\n dropdown.classList.add('align-right');\n if (this.isColumnActionMenu) dropdown.style.right = '0';\n }\n\n if (this.isAction) dropdown.style.right = '70px';\n if (this.matchWidth) dropdown.style.width = `${this.trigger.offsetWidth}px`;\n }\n\n @HostListener('keydown', ['$event'])\n handleKeys(e: KeyboardEvent) {\n if (!this.isOpen) return;\n\n switch (e.key) {\n case 'ArrowDown':\n this.moveFocus(1);\n e.preventDefault();\n break;\n case 'ArrowUp':\n this.moveFocus(-1);\n e.preventDefault();\n break;\n case 'Home':\n this.focusItem(0);\n e.preventDefault();\n break;\n case 'End':\n this.focusItem(this.menuItems.length - 1);\n e.preventDefault();\n break;\n case 'Enter':\n case ' ':\n this.selectFocused();\n e.preventDefault();\n break;\n case 'Escape':\n this.close();\n break;\n }\n }\n\n moveFocus(delta: number) {\n this.focusedIndex =\n (this.focusedIndex + delta + this.menuItems.length) %\n this.menuItems.length;\n this.focusItem(this.focusedIndex);\n }\n\n focusItem(index: number) {\n this.focusedIndex = index;\n this.menuItems.forEach((i) => i.classList.remove('focused'));\n\n const item = this.menuItems[index];\n item.classList.add('focused');\n item.scrollIntoView({ block: 'nearest' });\n }\n\n selectFocused() {\n if (this.focusedIndex >= 0) this.menuItems[this.focusedIndex].click();\n this.close();\n }\n\n prepareItems() {\n this.menuItems = Array.from(\n this.dropdown.querySelectorAll('[role=\"option\"], li, div'),\n );\n this.menuItems.forEach((el) => el.setAttribute('tabindex', '-1'));\n }\n\n handleOutsideClick = (e: Event) => {\n const target = e.target;\n if (\n !(target instanceof Node) ||\n (!this.host.nativeElement.contains(target) &&\n !this.dropdown.contains(target))\n ) {\n this.close();\n }\n };\n\n setupBaseStyles() {\n const dropdown = this.host.nativeElement;\n dropdown.style.position = 'absolute';\n this.host.nativeElement.setAttribute('role', 'button');\n this.positionDropdown();\n }\n\n observeResize() {\n const parent = this.parentContainer || this.host.nativeElement.offsetParent;\n this.resizeObserver = new ResizeObserver(() => {\n if (this.isOpen) this.positionDropdown();\n });\n this.resizeObserver.observe(this.host.nativeElement);\n this.resizeObserver.observe(this.trigger);\n if (parent) this.resizeObserver.observe(parent);\n }\n\n ngOnDestroy() {\n this.resizeObserver?.disconnect();\n document.removeEventListener('click', this.handleOutsideClick);\n }\n}\n","import { CommonModule, DatePipe } from '@angular/common';\nimport {\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnInit,\n Output,\n SimpleChanges,\n} from '@angular/core';\nimport { OutsideClickDirective } from '../../directives/outside-click.directive';\nimport {\n AbstractControl,\n ControlValueAccessor,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n ValidationErrors,\n} from '@angular/forms';\nimport { AdaptivePositionDirective } from '../../directives/adaptive-position.directive';\n\nexport interface DateConfig {\n selectionMode: 'single' | 'range';\n enableTime?: boolean;\n}\nexport interface IRange {\n value: Date;\n label: string;\n}\n\n@Component({\n selector: 'lib-common-calendar',\n\n imports: [CommonModule, OutsideClickDirective, AdaptivePositionDirective],\n templateUrl: './common-calendar.component.html',\n styleUrl: './common-calendar.component.scss',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: CommonCalendarComponent,\n multi: true,\n },\n DatePipe,\n ],\n})\nexport class CommonCalendarComponent\n implements OnInit, OnChanges, ControlValueAccessor\n{\n @Output() dateTimeSelected = new EventEmitter<any>();\n @Output() clearDateEvent = new EventEmitter<any>();\n @Input() dateConfig!: DateConfig;\n @Input() minDate?: string;\n @Input() maxDate?: string;\n @Input() preSelectedValue: any;\n selectedDateTime: any = '';\n currentDate = new Date();\n currentMonth = this.currentDate.getMonth();\n currentYear = this.currentDate.getFullYear();\n selectedDate: number | null = null;\n selectedTime: string | null = null;\n calendar: number[][] = [];\n timeSlots: IRange[] = [];\n rangeStart: number | null = null;\n rangeEnd: number | null = null;\n selectedMonth: any;\n selectedYear: any;\n control!: AbstractControl<any, any>;\n disableControl: boolean = false;\n date: any = '';\n calendarView: string = 'defaultView';\n yearRange: number[] = [];\n daysInMonth: any[] = [];\n selectedDay: number = 0;\n selectedStartDate: any;\n selectedEndDate: any;\n isOpen: boolean = false;\n showYearSelector = false;\n monthRange: any = {\n '0': 'JAN',\n '01': 'FEB',\n '02': 'MAR',\n '03': 'APR',\n '04': 'MAY',\n '05': 'JUN',\n '06': 'JUL',\n '07': 'AUG',\n '08': 'SEP',\n '09': 'OCT',\n '10': 'NOV',\n '11': 'DEC',\n };\n constructor(\n // @Inject(LOCALE_ID) private locale: string,\n private cd: ChangeDetectorRef,\n private datePipe: DatePipe,\n ) {}\n ngOnChanges(_changes: SimpleChanges): void {\n if (_changes['preSelectedValue']) {\n this.selectedDateTime = _changes['preSelectedValue']?.currentValue;\n }\n }\n ngOnInit(): void {\n this.generateYearRange();\n // this.generateCalendar();\n this.generateTimeRanges();\n if (this.preSelectedValue) {\n this.initializeCalendar();\n }\n }\n\n private onTouchedCallback: () => void = () => {};\n private onChangeCallback: (_: any) => void = () => {};\n writeValue(value: any): void {\n if (value) {\n this.selectedDateTime = value;\n this.onChangeCallback(value);\n this.cd.markForCheck();\n }\n }\n\n registerOnChange(fn: any): void {\n this.onChangeCallback = fn;\n }\n registerOnTouched(fn: any): void {\n this.onTouchedCallback = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n if (this.control) {\n isDisabled ? this.control.disable() : this.control.enable();\n }\n }\n /**\n * @description Validates date time picker component\n * @author Shiva Kant\n * @param control\n * @returns validate\n */\n validate(control: AbstractControl): ValidationErrors | null {\n this.control = control;\n const selected = this.date ? new Date(this.date) : null;\n\n // Check required manually\n const isRequired =\n control.validator && control.validator(control)?.['required'];\n\n if (\n (isRequired || control.hasError('required')) &&\n (!this.date || !this.selectedDay)\n ) {\n return { required: true };\n } else if (this.minDate && selected && selected < new Date(this.minDate)) {\n return { minDate: true };\n } else if (this.maxDate && selected && selected > new Date(this.maxDate)) {\n return { maxDate: true };\n }\n\n return null;\n }\n\n selectCurrentMonthYear() {\n this.currentDate = new Date();\n this.currentMonth = this.currentDate.getMonth();\n this.currentYear = this.currentDate.getFullYear();\n this.selectedMonth = this.currentMonth;\n this.selectedYear = this.currentYear;\n this.selectedDate = null;\n }\n /**\n * @description method to toggleCalendar\n * @author Shiva Kant\n */\n toggleCalendar(): void {\n if (!this.selectedDateTime) {\n this.selectCurrentMonthYear();\n }\n this.isOpen = !this.isOpen;\n if (this.isOpen) {\n // If a date is already selected, open that month/year\n if (this.selectedDate != null) {\n this.currentDate = new Date(\n this.selectedYear,\n this.selectedMonth,\n this.selectedDate,\n );\n }\n this.updateCurrentYearMonth();\n this.generateCalendar();\n setTimeout(() => {\n const ele = document.getElementsByClassName('calendar-footer');\n ele[0]?.scrollIntoView();\n });\n }\n this.calendarView = 'defaultView';\n }\n\n /**\n * @description Closes calendar\n * @author Shiva Kant\n */\n closeCalendar(): void {\n this.isOpen = false;\n this.calendarView = 'defaultView';\n }\n /**\n * @description Method to Gets month year\n * @author Shiva Kant\n * @returns month year\n */\n getMonthYear(): { month: string; year: string } {\n return {\n month: this.currentDate.toLocaleString('default', {\n month: 'long',\n }),\n year: this.currentDate.toLocaleString('default', {\n year: 'numeric',\n }),\n };\n }\n\n /**\n * @description Method to Updates current year month\n * @author Shiva Kant\n */\n updateCurrentYearMonth(): void {\n this.currentYear = this.currentDate.getFullYear();\n this.currentMonth = this.currentDate.getMonth();\n }\n\n /**\n * @description Method to Selects year\n * @author Shiva Kant\n * @param year\n */\n selectYear(year: number): void {\n this.currentDate.setFullYear(year);\n this.updateCurrentYearMonth();\n this.showYearSelector = false;\n this.calendarView = 'defaultView';\n this.selectedDay = 0;\n this.generateCalendar();\n }\n\n /**\n * @description Method to Selects month\n * @author Shiva Kant\n * @param month\n */\n selectMonth(month: any): void {\n this.currentDate.setMonth(month);\n this.updateCurrentYearMonth();\n this.calendarView = 'defaultView';\n this.selectedDay = 0;\n this.generateCalendar();\n }\n\n /**\n * @description Method to Previous year range\n * @author Shiva Kant\n */\n previousYearRange(): void {\n this.yearRange = this.yearRange.map((year) => year - 18);\n }\n\n /**\n * @description Method to Next year range\n * @author Shiva Kant\n */\n nextYearRange(): void {\n this.yearRange = this.yearRange.map((year) => year + 18);\n }\n\n /**\n * @description Method to Toggles year selector\n * @author Shiva Kant\n */\n toggleYearSelector(): void {\n this.showYearSelector = !this.showYearSelector;\n this.generateYearRange();\n }\n /**\n * @description Method to Generates year range\n * @author Shiva Kant\n */\n generateYearRange(): void {\n const currentYear = this.currentDate.getFullYear();\n const startYear = currentYear - (currentYear % 20);\n this.yearRange = Array.from({ length: 18 }, (_, i) => startYear + i);\n }\n /**\n * @description Method to Determines whether date selectable is\n * @author Shiva Kant\n * @param date\n * @returns true if date selectable\n */\n isDateSelectable(date: Date): boolean {\n const min = this.minDate ? new Date(this.minDate) : null;\n const max = this.maxDate ? new Date(this.maxDate) : null;\n if (min && date < min) return false;\n if (max && date > max) return false;\n return true;\n }\n /**\n * @description Method to Determines whether day disabled is\n * @author Shiva Kant\n * @param day\n * @returns true if day disabled\n */\n isDayDisabled(day: number): boolean {\n const date = new Date(\n this.currentDate.getFullYear(),\n this.currentDate.getMonth(),\n day,\n );\n return !this.isDateSelectable(date);\n }\n /**\n * @description Method to Generates calendar\n * @author Shiva Kant\n */\n generateCalendar(): void {\n const year = this.currentDate.getFullYear();\n const month = this.currentDate.getMonth();\n\n const firstDayOfMonth = new Date(year, month, 1);\n const firstWeekDay = (firstDayOfMonth.getDay() + 6) % 7; // Convert Sunday (0) to 6, Monday is 0\n\n const daysInCurrentMonth = new Date(year, month + 1, 0).getDate();\n const daysInPreviousMonth = new Date(year, month, 0).getDate();\n\n const totalCells = 42; // 6 rows of 7 days\n const calendarDays: { day: number; date: Date; isCurrentMonth: boolean }[] =\n [];\n\n // Fill previous month days\n for (let i = firstWeekDay - 1; i >= 0; i--) {\n const day = daysInPreviousMonth - i;\n const date = new Date(year, month - 1, day);\n calendarDays.push({ day, date, isCurrentMonth: false });\n }\n\n // Fill current month days\n for (let day = 1; day <= daysInCurrentMonth; day++) {\n const date = new Date(year, month, day);\n calendarDays.push({ day, date, isCurrentMonth: true });\n }\n\n // Fill next month days\n const remaining = totalCells - calendarDays.length;\n for (let day = 1; day <= remaining; day++) {\n const date = new Date(year, month + 1, day);\n calendarDays.push({ day, date, isCurrentMonth: false });\n }\n\n this.daysInMonth = calendarDays;\n }\n\n /**\n * @description Method to Previous month\n * @author Shiva Kant\n */\n previousMonth(): void {\n this.currentDate.setMonth(this.currentDate.getMonth() - 1);\n this.updateCurrentYearMonth();\n this.selectedDay = 0;\n this.generateCalendar();\n }\n\n /**\n * @description Method to Next month\n * @author Shiva Kant\n */\n nextMonth(): void {\n this.currentDate.setMonth(this.currentDate.getMonth() + 1);\n this.updateCurrentYearMonth();\n this.selectedDay = 0;\n this.generateCalendar();\n }\n\n /**\n * @description Method to Initializes calendar when preSelectedValue date\n * @author Shiva Kant\n * @returns calendar\n */\n initializeCalendar(): void {\n if (!this.preSelectedValue) return;\n\n // Case 1: Single date (string or Date)\n if (\n typeof this.preSelectedValue === 'string' ||\n this.preSelectedValue instanceof Date\n ) {\n const date = new Date(this.preSelectedValue);\n this.selectedDate = date.getDate();\n this.selectedMonth = date.getMonth();\n this.selectedYear = date.getFullYear();\n this.selectedTime = this.formatTime(date);\n\n // Update current view to show the month/year\n this.currentDate = new Date(\n this.selectedYear,\n this.selectedMonth,\n this.selectedDate,\n );\n this.generateCalendar();\n }\n\n // Case 2: Range of dates\n else if (this.preSelectedValue.start && this.preSelectedValue.end) {\n const startDate = new Date(this.preSelectedValue.start);\n const endDate = new Date(this.preSelectedValue.end);\n\n // Patch component state\n this.rangeStart = startDate.getDate();\n this.rangeEnd = endDate.getDate();\n\n this.selectedStartDate = startDate;\n this.selectedEndDate = endDate;\n\n this.selectedMonth = startDate.getMonth();\n this.selectedYear = startDate.getFullYear();\n\n // Set the current calendar view to the start month/year\n this.currentDate = new Date(this.selectedYear, this.selectedMonth, 1);\n this.generateCalendar();\n\n // Optional: If your calendar requires a single selectedTime for range, you could pick start or end\n this.selectedTime = this.formatTime(startDate);\n\n // Emit initial range value\n this.emitDateTime();\n }\n }\n\n /**\n * @description Method to Selects date\n * @author Shiva Kant\n * @param date\n */\n selectDate(date: number): void {\n const selectedFullDate = new Date(\n this.currentYear,\n this.currentMonth,\n date,\n );\n selectedFullDate.setHours(0, 0, 0, 0);\n\n this.selectedMonth = this.currentMonth;\n this.selectedYear = this.currentYear;\n\n if (this.dateConfig.selectionMode === 'single') {\n this.selectedDate = date;\n this.rangeStart = null;\n this.rangeEnd = null;\n } else {\n if (!this.rangeStart || this.rangeEnd) {\n this.rangeStart = date;\n this.rangeEnd = null;\n } else {\n this.rangeEnd = date < this.rangeStart ? this.rangeStart : date;\n this.rangeStart = date < this.rangeStart ? date : this.rangeStart;\n }\n }\n\n this.emitDateTime();\n }\n\n /**\n * @description Method to Selects time\n * @author Shiva Kant\n * @param time\n */\n selectTime(time: string): void {\n this.selectedTime = time;\n this.emitDateTime();\n }\n /**\n * @description Method to Determines whether selected date is\n * @author Shiva Kant\n * @param date\n * @returns\n */\n isSelectedDate(date: number, month: number, year: number): boolean {\n if (this.dateConfig.selectionMode === 'single') {\n // Check if the day, month, and year match\n return (\n this.selectedDate === date &&\n this.selectedMonth === month &&\n this.selectedYear === year\n );\n } else if (this.dateConfig.selectionMode === 'range') {\n // Range selection checks, ensuring both start and end dates are within the same month and year\n return !!(\n (this.rangeStart &&\n this.rangeStart === date &&\n this.selectedMonth === month &&\n this.selectedYear === year) ||\n (this.rangeEnd &&\n this.rangeEnd === date &&\n this.selectedMonth === month &&\n this.selectedYear === year) ||\n (this.rangeStart &&\n this.rangeEnd &&\n date > this.rangeStart &&\n date < this.rangeEnd &&\n this.selectedMonth === month &&\n this.selectedYear === year)\n );\n }\n return false;\n }\n\n /**\n * @description Method to Generates time ranges\n * @author Shiva Kant\n */\n generateTimeRanges(): void {\n const startTime = new Date();\n startTime.setHours(0, 0, 0, 0);\n this.timeSlots = Array.from({ length: 48 }, (_, i) => {\n const time = new Date(startTime.getTime() + i * 30 * 60 * 1000);\n return { value: time, label: this.formatTime(time) };\n });\n }\n\n /**\n * @description Method to Formats time\n * @author Shiva Kant\n * @param date\n * @returns time\n */\n formatTime(date: Date): string {\n return date.toLocaleTimeString('en-US', {\n hour: '2-digit',\n minute: '2-digit',\n hour12: true,\n });\n }\n /**\n * @description Method to Formats date time\n * @author Shiva Kant\n * @param fullDate\n * @param selectedTime\n * @returns date time\n */\n formatDateTime(fullDate: Date, selectedTime: string | null): string {\n const date = new Date(fullDate);\n\n if (!selectedTime) {\n // Only date formatting when time not required\n return this.datePipe.transform(date, 'MM/dd/yyyy')!;\n }\n\n const [time, period] = selectedTime.split(' ');\n let [hours, minutes] = time.split(':').map(Number);\n\n // Convert 12-hour → 24-hour\n if (period === 'PM' && hours !== 12) hours += 12;\n if (period === 'AM' && hours === 12) hours = 0;\n\n date.setHours(hours, minutes, 0, 0);\n\n return this.datePipe.transform(date, 'yyyy/MM/dd hh:mm a')!;\n }\n\n /**\n * @description Method to Emits date time\n * @author Shiva Kant\n * @returns date time\n */\n emitDateTime(): void {\n if (this.dateConfig.enableTime && !this.selectedTime) {\n return; // wait until user selects time\n }\n if (this.dateConfig.selectionMode === 'single') {\n if (!this.selectedDate) return;\n\n const fullDate = new Date(\n this.selectedYear,\n this.selectedMonth,\n this.selectedDate,\n );\n\n this.selectedDateTime = this.formatDateTime(\n fullDate || '',\n this.dateConfig.enableTime ? this.selectedTime : null,\n );\n\n this.writeValue(this.selectedDateTime);\n this.dateTimeSelected.emit(this.selectedDateTime);\n this.closeCalendar();\n return;\n }\n if (this.dateConfig.selectionMode === 'range') {\n if (!this.rangeStart || !this.rangeEnd) return;\n\n const startDate = new Date(\n this.currentYear,\n this.currentMonth,\n this.rangeStart,\n );\n const endDate = new Date(\n this.currentYear,\n this.currentMonth,\n this.rangeEnd,\n );\n\n const startDateTime = this.formatDateTime(\n startDate,\n this.dateConfig.enableTime ? this.selectedTime : null,\n );\n const endDateTime = this.formatDateTime(\n endDate,\n this.dateConfig.enableTime ? this.selectedTime : null,\n );\n\n const rangeResult = { start: startDateTime, end: endDateTime };\n\n this.writeValue(rangeResult);\n this.dateTimeSelected.emit(rangeResult);\n this.closeCalendar();\n }\n }\n\n hideCalender() {\n this.closeCalendar();\n }\n}\n","<!-- Calendar -->\n\n<div\n class=\"calendar_wrapper\"\n appOutsideClick\n (clickOutSide)=\"closeCalendar()\"\n [ngClass]=\"{ 'pe-none': disableControl }\"\n>\n <div class=\"date_box\" (click)=\"toggleCalendar()\" #trigger>\n @if (dateConfig.selectionMode == \"single\") {\n <input\n type=\"text\"\n placeholder=\"Select Date\"\n [value]=\"selectedDateTime\"\n readonly\n [disabled]=\"disableControl\"\n />\n } @else {\n <input\n type=\"text\"\n placeholder=\"Select date Range\"\n [value]=\"\n selectedDateTime.start\n | date\n : 'MM/dd/yyyy' +\n ' - ' +\n (selectedDateTime.end | date: 'MM/dd/yyyy')\n \"\n readonly\n />\n }\n <!-- <i-feather name=\"calendar\" class=\"calendar_icon\"></i-feather> -->\n <img src=\"images/calendar.svg\" alt=\"\" />\n </div>\n @if (isOpen) {\n <div\n class=\"calendar-popup\"\n adaptivePosition\n [trigger]=\"trigger\"\n [matchWidth]=\"false\"\n appOutsideClick\n (clickOutside)=\"hideCalender()\"\n >\n <div class=\"calendar_container\">\n <!-- for the header -->\n <div class=\"calendar-header\">\n <div class=\"month-year\">\n <span class=\"month\" (click)=\"calendarView = 'monthView'\">\n {{ getMonthYear().month }},</span\n >\n <div class=\"year\" (click)=\"calendarView = 'yearView'\">\n <span>\n {{ getMonthYear().year }}\n </span>\n <img src=\"images/chevron-down.svg\" class=\"year_arrow\" alt=\"\" />\n </div>\n </div>\n\n <div class=\"arrow_container\">\n <span class=\"navigation-button\" (click)=\"previousMonth()\">\n <img src=\"images/arrow-up.svg\" alt=\"\" />\n </span>\n\n <span class=\"navigation-button\" (click)=\"nextMonth()\">\n <img src=\"images/arrow-down.svg\" alt=\"\" />\n </span>\n </div>\n </div>\n @if (calendarView === \"monthView\") {\n <div class=\"month-grid\">\n @for (month of monthRange | keyvalue; track $index) {\n <span\n class=\"month\"\n (click)=\"selectMonth(month.key)\"\n [ngClass]=\"{ selected: month.key == currentDate.getMonth() }\"\n >{{ month.value }}</span\n >\n }\n </div>\n } @else if (calendarView === \"yearView\") {\n <div class=\"year-selector\">\n <span\n class=\"navigation-button pointer\"\n (click)=\"previousYearRange()\"\n >\n <img src=\"images/chevron-left.svg\" alt=\"\" />\n </span>\n <div class=\"year-grid\">\n @for (year of yearRange; track $index) {\n <span\n class=\"year\"\n (click)=\"selectYear(year)\"\n [ngClass]=\"{ selected: year == currentDate.getFullYear() }\"\n >{{ year }}</span\n >\n }\n </div>\n <span class=\"navigation-button pointer\" (click)=\"nextYearRange()\">\n <img src=\"images/chevron-right.svg\" alt=\"\" />\n </span>\n </div>\n } @else {\n <div class=\"calendar_body\">\n <div class=\"calendar-grid\">\n <!-- Day names -->\n @for (\n day of [\"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\", \"Su\"];\n track $index\n ) {\n <div class=\"days_name\">\n {{ day }}\n </div>\n }\n\n <!-- Calendar dates -->\n @for (dayObj of daysInMonth; track $index) {\n <div\n class=\"calendar-day\"\n [ngClass]=\"{\n active:\n dayObj.isCurrentMonth &&\n dateConfig.selectionMode === 'single' &&\n isSelectedDate(\n dayObj.day,\n dayObj.date.getMonth(),\n dayObj.date.getFullYear()\n ),\n\n active_start:\n dayObj.isCurrentMonth &&\n dateConfig.selectionMode === 'range' &&\n isSelectedDate(\n dayObj.day,\n dayObj.date.getMonth(),\n dayObj.date.getFullYear()\n ) &&\n dayObj.day === rangeStart,\n\n active_end:\n dayObj.isCurrentMonth &&\n dateConfig.selectionMode === 'range' &&\n isSelectedDate(\n dayObj.day,\n dayObj.date.getMonth(),\n dayObj.date.getFullYear()\n ) &&\n dayObj.day === rangeEnd,\n\n range_between_active:\n dayObj.isCurrentMonth &&\n dateConfig.selectionMode === 'range' &&\n isSelectedDate(\n dayObj.day,\n dayObj.date.getMonth(),\n dayObj.date.getFullYear()\n ) &&\n rangeStart != null &&\n rangeEnd != null &&\n dayObj.day > rangeStart &&\n dayObj.day < rangeEnd,\n\n other_month: !dayObj.isCurrentMonth,\n disabled: isDayDisabled(dayObj.day),\n notInCurrentMonth: !dayObj.isCurrentMonth,\n }\"\n (click)=\"\n dayObj.isCurrentMonth &&\n !isDayDisabled(dayObj.day) &&\n selectDate(dayObj.day)\n \"\n >\n {{ dayObj.day }}\n </div>\n }\n </div>\n <div class=\"bottom_btn\">\n <div class=\"btn\">Clear</div>\n <div class=\"btn\">Today</div>\n </div>\n </div>\n }\n </div>\n <!-- TIME SLOTS (only if showTime = true) -->\n @if (dateConfig.enableTime) {\n <div class=\"times\">\n <div class=\"time-picker\">\n <div class=\"time-column\">\n @for (timeSlot of timeSlots; track $index) {\n <span\n class=\"span_time\"\n [ngClass]=\"{ active: selectedTime === timeSlot.label }\"\n (click)=\"selectTime(timeSlot.label)\"\n >\n {{ timeSlot.label }}\n </span>\n }\n </div>\n\n <div class=\"time-column\">\n @for (timeSlot of timeSlots; track $index) {\n <span\n class=\"span_time\"\n [ngClass]=\"{ active: selectedTime === timeSlot.label }\"\n >\n {{ timeSlot.label }}\n </span>\n }\n </div>\n\n <div class=\"time-column\">\n @for (timeSlot of timeSlots; track $index) {\n <span\n class=\"span_time\"\n [ngClass]=\"{ active: selectedTime === timeSlot.label }\"\n >\n {{ timeSlot.label }}\n </span>\n }\n </div>\n\n <!-- center selection indicator -->\n <div class=\"center-highlight\"></div>\n </div>\n\n <!-- @for (timeSlot of timeSlots; track $index) {\n <span\n class=\"span_time\"\n [ngClass]=\"{ active: selectedTime === timeSlot.label }\"\n (click)=\"selectTime(timeSlot.label)\"\n >\n {{ timeSlot.label }}\n </span>\n } -->\n </div>\n }\n </div>\n }\n</div>\n","import { AddClassPipe } from './pipes/add-class.pipe';\nimport { CommonModule } from '@angular/common';\nimport {\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n NgZone,\n OnChanges,\n OnInit,\n Output,\n Renderer2,\n SimpleChanges,\n ViewChild,\n} from '@angular/core';\nimport { FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { OutsideClickDirective } from './directives/outside-click.directive';\nimport { RendererParserDirective } from './directives/renderer-parser.directive';\nimport { CommonInputComponent } from './common-components/common-input/common-input.component';\nimport { AdaptivePositionDirective } from './directives/adaptive-position.directive';\nimport {\n CommonCalendarComponent,\n DateConfig,\n} from './common-components/common-calendar/common-calendar.component';\n\nexport class ColDefs {\n fieldName!: string;\n headerName!: string;\n width!: number;\n minWidth!: number;\n sortable: boolean = true;\n filterable: boolean = true;\n cellRenderer: any;\n}\n\nexport interface ColumnFilter {\n fieldName: string;\n filterLogic: string;\n filters: FilterCondition[];\n}\nexport interface FilterCondition {\n filterOperation: string;\n filterValue: any;\n}\n@Component({\n selector: 'cats-data-grid',\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n CommonCalendarComponent,\n OutsideClickDirective,\n AdaptivePositionDirective,\n RendererParserDirective,\n AddClassPipe,\n CommonInputComponent,\n ],\n templateUrl: './cats-data-grid.component.html',\n styleUrls: ['./cats-data-grid.component.scss'],\n})\nexport class CatsDataGridComponent implements OnChanges, OnInit {\n @ViewChild('pinMenu') pinMenu!: ElementRef;\n @ViewChild('colActionMenu') colActionMenu!: ElementRef;\n @ViewChild('table') table!: ElementRef;\n @Input() tableOptions: any;\n @Input() totalRecords: number = 0;\n @Input() sortingRequired = true;\n @Input() checkBoxSelection = false;\n @Input() checkboxSelectionType = 'multiple';\n @Input() rowData: any[] = [];\n @Input() colDefs: any[] = [];\n @Input() paginationRequired = true;\n @Input() selectedRowEmpty: boolean = false;\n @Input() filterRequired: boolean = true;\n @Input() threeDotsMenuRequired: boolean = true;\n @Input() settingsRequired: boolean = true;\n @Input() settingsClicked: boolean = false;\n @Input() resetPage = true;\n @Input() rowId: any = null;\n showDropdown: boolean = false;\n\n @Input() height: number = 400;\n @Input() groupByRequired: boolean = false;\n @Output() onPaginationChange = new EventEmitter();\n @Output() onCheckboxSelection = new EventEmitter();\n @Output() onScrollEmitter = new EventEmitter();\n @Output() filter = new EventEmitter();\n @Output() onHideSettings = new EventEmitter();\n @Output() onCellEdit = new EventEmitter();\n @Output() onColCongifgChange = new EventEmitter();\n\n activeFilterIndex: number | null = null;\n originalRowData: any[] = [];\n activeAll = true;\n\n pageDetails: any = {\n pageSize: 20,\n totalPages: 1,\n currentPage: 1,\n };\n recordsToShow: any = {\n min: 0,\n max: 20,\n };\n sortingColumnIndex!: number;\n sortingType: any = {};\n selectedRow: any[] = [];\n\n @Input() pageSizeList: number[] = [20, 50, 75, 100];\n showPageSizeList: boolean = false;\n dragOverIndex: null | number = null;\n draggedIndex: null | number = null;\n originalColDefs: any[] = [];\n filteredRowData: any[] = [];\n filteredData: any[] = [];\n currentColumn: any;\n currentIndex!: number;\n menuVisible: boolean[] = [];\n menuPosition: any[] = [];\n activeFilters: Set<any> = new Set<any>();\n resizingColumnIndex: number | null = null;\n startX: number = 0;\n startWidth: number = 0;\n isResizing: boolean = false;\n groupedResult: any[] = [];\n showMoveIcon: any = {};\n columnDraggable: any[] = [];\n activeGroups: any[] = [];\n groupBy: string[] = [];\n @Input() groupByField: string = '';\n dragGroupIndex: number | null = null;\n\n dateConfig: DateConfig = {\n selectionMode: 'single',\n enableTime: false,\n };\n\n filterOptions = [\n { label: 'Contains', value: 'contains' },\n { label: 'Does Not Contain', value: 'doesNotContain' },\n { label: 'Equals', value: 'equals' },\n { label: 'Does Not Equal', value: 'doesNotEqual' },\n { label: 'Starts With', value: 'startsWith' },\n { label: 'Ends With', value: 'endsWith' },\n ];\n\n numberFilterOptions = [\n { label: 'Equals', value: '=' },\n { label: 'Greater Than', value: '>' },\n { label: 'Less Than', value: '<' },\n { label: 'Greater Than or Equal', value: '>=' },\n { label: 'Less Than or Equal', value: '<=' },\n ];\n showPin: boolean = false;\n pinActionClicked: any = {};\n private removeMouseMove!: () => void;\n private removeMouseUp!: () => void;\n private rafId: number | null = null;\n @Input() appliedFilters: ColumnFilter[] = [];\n @Input() rowGripFieldName!: string;\n @Input() pageNumber!: number;\n @Input() pageSize!: number;\n @Output() appliedFiltersEvent = new EventEmitter<ColumnFilter[]>();\n @Output() activeGroupsEvent = new EventEmitter<any[]>();\n @Input() dynamicGroupingFiltering: boolean = false;\n atLeastOneColumnChecked: boolean = true;\n draggedRowData: any = {};\n firstCol: any;\n isRowSelected: boolean = false;\n @Output() onRowClicked = new EventEmitter<any>();\n @Output() onCellClicked = new EventEmitter<any>();\n\n isCellDblClicked: any = {};\n cellClickedCtrl = new FormControl('');\n previousId: string = '';\n editingRow: any = null;\n editingField: string = '';\n clickTimer: any = null;\n clickDelay = 200;\n cellClickedColumn: any;\n enterPressed: boolean = false;\n leftPinned: any = [];\n rightPinned: any = [];\n centerArea: any = [];\n groupingDisabled: boolean = false;\n draggableColumn: any;\n constructor(\n private renderer: Renderer2,\n private zone: NgZone,\n private cd: ChangeDetectorRef,\n ) {}\n\n ngOnInit(): void {\n // if (this.colDefs && this.colDefs.length > 0) {\n // this.firstCol = this.colDefs[0];\n // }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['pageNumber']?.currentValue) {\n this.pageDetails.currentPage = changes['pageNumber']?.currentValue;\n this.recordsToShow.min =\n (this.pageDetails.currentPage - 1) * this.pageDetails.pageSize;\n this.recordsToShow.max =\n this.pageDetails.currentPage * this.pageDetails.pageSize;\n this.clearAllFilter();\n }\n if (changes['pageSize']?.currentValue) {\n this.pageDetails.pageSize = changes['pageSize']?.currentValue;\n this.recordsToShow.min =\n (this.pageDetails.currentPage - 1) * this.pageDetails.pageSize;\n this.recordsToShow.max =\n this.pageDetails.currentPage * this.pageDetails.pageSize;\n }\n if (changes['colDefs']?.currentValue) {\n // this.resetPagination();\n\n this.colDefs = this.getUpdatedColDefs(changes['colDefs']?.currentValue);\n setTimeout(() => {\n this.applyAllFilters();\n });\n this.originalColDefs = [...this.colDefs];\n this.centerArea = [...this.colDefs];\n [...this.colDefs].forEach((col: any) => {\n if (col.pin) {\n const index = this.colDefs.findIndex((c) => c.colId === col.colId);\n this.pinColumn(this.colDefs[index], index, col.pin);\n }\n });\n }\n\n if (changes['totalRecords']?.currentValue && this.resetPage) {\n this.resetPagination();\n } else {\n this.setPageCount();\n }\n\n if (changes['rowData']?.currentValue) {\n if (this.selectedRowEmpty) this.selectedRow = [];\n this.rowData = changes['rowData']?.currentValue.map(\n (row: any, i: number) => {\n if (row[this.rowId]) {\n row.rowId = row[this.rowId];\n } else {\n row.rowId = `${Date.now()}_${i}`;\n }\n if (row?.isSelected) [...this.selectedRow, row];\n return row;\n },\n );\n\n if (this.dynamicGroupingFiltering && this.groupBy.length > 0) {\n this.groupedResult = structuredClone(this.rowData);\n }\n if (!this.activeFilters.size) {\n this.originalRowData = structuredClone(this.rowData);\n }\n\n this.getGroupedData();\n }\n\n if (changes['groupByField']?.currentValue) {\n this.activeGroups = [];\n this.groupBy = [];\n const groupByField = changes['groupByField'].currentValue;\n const col = this.getColumnDetail(this.colDefs, groupByField);\n this.activeGroups.push(...col);\n this.groupBy.push(groupByField);\n this.getGroupedData();\n }\n }\n\n getColumnDetail(colDefs: any, groupByField: any) {\n return colDefs.filter((col: any) => col.fieldName === groupByField);\n }\n\n activeAllSelection(event: Event) {\n // let checked = (event.target as HTMLInputElement).checked;\n // if (checked) {\n // this.colDefs = this.originalColDefs.map((dt) => {\n // if (!dt.active && !dt.headerLocked) {\n // dt.active = true;\n // }\n // this.atLeastOneColumnChecked = true;\n // return dt;\n // });\n // } else {\n // this.colDefs = this.originalColDefs.map((dt) => {\n // if (dt.active && !dt.headerLocked) {\n // dt.active = false;\n // }\n // this.atLeastOneColumnChecked = false;\n // return dt;\n // });\n // }\n\n const checked = (event.target as HTMLInputElement).checked;\n this.colDefs = this.originalColDefs.map((col) => {\n if (col.headerLocked) {\n col.active = true;\n } else {\n col.active = checked;\n }\n return col;\n });\n this.activeAll = this.colDefs.every((dt) => dt.active);\n this.getActiveCols();\n this.atLeastOneColumnChecked = this.colDefs.some((dt) => dt.active);\n }\n\n changeActiveColSelection(event: Event, col: any) {\n col.active = !col.active;\n this.atLeastOneColumnChecked = this.originalColDefs.some(\n (dt: any) => dt.active,\n );\n this.getActiveCols();\n\n // Update activeAll state\n this.activeAll = this.originalColDefs.every((dt: any) => dt.active);\n }\n\n getActiveCols() {\n const activeCols = this.colDefs\n .filter((col: any) => col.active)\n .map((c: any) => {\n if (c.fieldName.includes('.')) {\n c.fieldName = c.fieldName.split('.')[0];\n }\n return c.fieldName;\n });\n this.onColCongifgChange.emit(activeCols);\n }\n\n /**\n * @description Prepares and normalizes column definitions for filtering and menu behavior\n * @author Anand Pandey\n * @param {any[]} colDefs - Raw column definitions received from the parent.\n * @returns {any[]} - Updated column definitions with filter/menu\n */\n getUpdatedColDefs(colDefs: any[]) {\n return colDefs.map((col, index) => {\n this.sortingType[index] = '';\n col.colId = `${Date.now()}_${index}`;\n // if (col.fieldName === 'action') {\n // col.isAction = true;\n // }\n\n if (!col.filterType && !col.isAction) {\n col.filterType = 'text';\n }\n\n if (!col.filterLogic) {\n col.filterLogic = 'OR';\n }\n\n let updatedCol = {\n ...col,\n active: col.active ?? true,\n locked: col.locked ?? false,\n filterable: col.filterable ?? true,\n columnAction: col.columnAction ?? true,\n sortable: col.sortable ?? true,\n };\n\n if (!updatedCol.filterable) {\n return updatedCol;\n }\n\n switch (col.filterType) {\n case 'text':\n updatedCol = {\n ...updatedCol,\n filters: [\n {\n filterOperation: 'contains',\n filterValue: '',\n },\n {\n filterOperation: 'startsWith',\n filterValue: '',\n },\n ],\n };\n break;\n\n case 'number':\n case 'date':\n updatedCol = {\n ...updatedCol,\n filterValue: '',\n filters: [\n {\n filterOperation: '=',\n filterValue: '',\n },\n {\n filterOperation: '=',\n filterValue: '',\n },\n ],\n };\n break;\n\n case 'set':\n const options = [\n ...new Set(\n this.rowData.flatMap((r) => {\n let fieldName = col.fieldName;\n\n if (fieldName.includes('.')) {\n fieldName = fieldName.split('.')[0];\n }\n\n return this.normalizeSetFilterType(\n r[fieldName],\n col?.cellRendererParams?.tagKey,\n )?.filter(Boolean);\n }),\n ),\n ];\n updatedCol = {\n ...updatedCol,\n options,\n filteredOptions: options,\n selectedValues: new Set(options),\n };\n break;\n }\n\n if (this.appliedFilters.length > 0) {\n const appliedFilter = this.appliedFilters.find(\n (f) => f.fieldName === col.fieldName,\n );\n if (appliedFilter) {\n switch (col.filterType) {\n case 'text':\n case 'number':\n case 'date':\n updatedCol = {\n ...updatedCol,\n filters: appliedFilter.filters,\n filterLogic: appliedFilter.filterLogic,\n };\n\n break;\n case 'set':\n const options = [\n ...new Set(\n this.rowData.flatMap((r) => {\n let fieldName = col.fieldName;\n\n if (fieldName.includes('.')) {\n fieldName = fieldName.split('.')[0];\n }\n return this.normalizeSetFilterType(\n r[fieldName],\n col?.cellRendererParams?.tagKey,\n )?.filter(Boolean);\n }),\n ),\n ];\n const selectedValues = new Set(\n appliedFilter.filters.map((f) => f.filterValue),\n );\n updatedCol = {\n ...updatedCol,\n options,\n filteredOptions: options,\n selectedValues,\n };\n break;\n }\n }\n }\n return updatedCol;\n });\n }\n normalizeSetFilterType(value: any, key: string) {\n if (!value) return;\n\n if (Array.isArray(value) && typeof value[0] === 'string') {\n return value;\n }\n if (Array.isArray(value) && typeof value[0] === 'object') {\n return (value = value.map((val) => val[key]));\n }\n\n if (typeof value === 'string') {\n return [value];\n }\n\n if (typeof value === 'object') {\n return [value[key]];\n }\n\n return [];\n }\n\n /**\n * @description - Evaluates a text-based filter condition on a given field value.\n * @author Anand Pandey\n * @param {string} type - The type of text filter to apply ('contains' | 'doesNotContain' | 'equals' etc).\n * @param {string} fieldValue - The actual value from the data row being evaluated.\n * @param {string} value - The user-entered filter value to compare against.\n * @returns {boolean} `true` if the fieldValue satisfies the specified filter condition,\n * otherwise `false`.\n */\n evaluateTextFilterCondition(\n type: string,\n fieldValue: string,\n value: string,\n ): boolean {\n switch (type) {\n case 'contains':\n return fieldValue.includes(value);\n case 'doesNotContain':\n return !fieldValue.includes(value);\n case 'equals':\n return fieldValue === value;\n case 'doesNotEqual':\n return fieldValue !== value;\n case 'startsWith':\n return fieldValue.startsWith(value);\n case 'endsWith':\n return fieldValue.endsWith(value);\n default:\n return true;\n }\n }\n\n /**\n * @description - Evaluates number/date filter conditions.\n * @author Anand\n * @param {string} type - Comparison operator ('=' | '>' | '<' | '>=' | '<=').\n * @param {number|string} fieldValue - Actual value from the row (number or timestamp).\n * @param {number|string} value - User-entered value for comparison.\n * @returns {boolean} True if the condition matches, otherwise false.\n */\n evaluateNumDateFilterCondition(\n type: string,\n fieldValue: number | string,\n value: number | string,\n ): boolean {\n switch (type) {\n case '=':\n return fieldValue === value;\n case '>':\n return fieldValue > value;\n case '<':\n return fieldValue < value;\n case '>=':\n return fieldValue >= value;\n case '<=':\n return fieldValue <= value;\n default:\n return true;\n }\n }\n\n /**\n * @description Method to filter data according to filterOperation and comparator selection\n * @author Anand Pandey\n * @param {}\n * @returns void\n */\n applyAllFilters() {\n let result: any[] = structuredClone(this.originalRowData);\n\n this.colDefs.forEach((col) => {\n let field = col.fieldName;\n\n // if (field.includes('.')) {\n // const a = field.split('.');\n // field = a[0];\n // }\n if (col?.filterable) {\n if (col.filterType === 'text') {\n // *********** TEXT FILTER ***********\n const [c1, c2] = col.filters;\n\n const textVal1 = c1.filterValue?.toLowerCase().trim();\n const textVal2 = c2.filterValue?.toLowerCase().trim();\n if (!textVal1 && !textVal2) {\n this.activeFilters.delete(col.fieldName);\n return;\n }\n this.activeFilters.add(col.fieldName);\n\n result = result.filter((r) => {\n const fieldVal =\n this.evaluateFieldValue(r, field)?.toLowerCase() || '';\n const cond1 = textVal1\n ? this.evaluateTextFilterCondition(\n c1.filterOperation,\n fieldVal,\n textVal1,\n )\n : false;\n const cond2 = textVal2\n ? this.evaluateTextFilterCondition(\n c2.filterOperation,\n fieldVal,\n textVal2,\n )\n : false;\n\n return col.filterLogic === 'AND' ? cond1 && cond2 : cond1 || cond2;\n });\n }\n\n // *********** NUMBER FILTER ***********\n if (col.filterType === 'number') {\n const [c1, c2] = col.filters;\n const numValue1 = Number(c1.filterValue);\n const numValue2 = Number(c2.filterValue);\n\n if (!numValue1 && !numValue2) {\n this.activeFilters.delete(col.fieldName);\n return;\n }\n this.activeFilters.add(col.fieldName);\n\n result = result.filter((r) => {\n const fieldVal = Number(r[field]);\n const cond1 = numValue1\n ? this.evaluateNumDateFilterCondition(\n c1.filterOperation,\n fieldVal,\n numValue1,\n )\n : false;\n const cond2 = numValue2\n ? this.evaluateNumDateFilterCondition(\n c2.filterOperation,\n fieldVal,\n numValue2,\n )\n : false;\n\n return col.filterLogic === 'AND' ? cond1 && cond2 : cond1 || cond2;\n });\n }\n\n // *********** DATE FILTER ***********\n if (col.filterType === 'date') {\n const [c1, c2] = col.filters;\n const selected1 = this.normalizeDate(c1.filterValue);\n const selected2 = this.normalizeDate(c2.filterValue);\n if (!selected1 && !selected2) {\n this.activeFilters.delete(col.fieldName);\n return;\n }\n this.activeFilters.add(col.fieldName);\n result = result.filter((r) => {\n const fieldVal = this.normalizeDate(r[field]);\n const cond1 = selected1\n ? this.evaluateNumDateFilterCondition(\n c1.filterOperation,\n fieldVal ?? r[field],\n selected1,\n )\n : false;\n const cond2 = selected2\n ? this.evaluateNumDateFilterCondition(\n c2.filterOperation,\n fieldVal ?? r[field],\n selected2,\n )\n : false;\n\n return col.filterLogic === 'AND' ? cond1 && cond2 : cond1 || cond2;\n });\n }\n\n // *********** SET FILTER ***********\n if (col.filterType === 'set') {\n if (\n col.selectedValues?.size >= 0 &&\n col.selectedValues?.size !== col.options.length\n ) {\n result = result.filter((r) => {\n const value: any = r[field];\n\n if (\n Array.isArray(value) &&\n value.every((val) => typeof val !== 'object')\n ) {\n return value.some((m) => col.selectedValues.has(m));\n }\n\n if (\n Array.isArray(value) &&\n value.every((val) => typeof val === 'object')\n ) {\n return value.some((m) =>\n col.selectedValues.has(m[col?.cellRendererParams?.tagKey]),\n );\n }\n\n return col.selectedValues.has(r[field]);\n });\n this.activeFilters.add(col.fieldName);\n } else {\n this.activeFilters.delete(col.fieldName);\n }\n }\n\n if (this.activeFilters.has(col.fieldName)) {\n let filterObj: ColumnFilter = {\n fieldName: col.fieldName,\n filterLogic: col.filterLogic,\n filters: col.filters,\n };\n if (col.filterType === 'set') {\n filterObj.filters = Array(...col.selectedValues).map(\n (f: string) => ({\n filterOperation: '=',\n filterValue: f,\n }),\n );\n filterObj.filterLogic = 'OR';\n }\n const existingIndex = this.appliedFilters.findIndex(\n (f) => f.fieldName === col.fieldName,\n );\n if (existingIndex === -1) {\n this.appliedFilters.push(filterObj);\n } else {\n this.appliedFilters[existingIndex] = filterObj;\n }\n } else {\n this.appliedFilters = this.appliedFilters.filter(\n (f) => f.fieldName !== col.fieldName,\n );\n }\n }\n });\n\n if (this.dynamicGroupingFiltering) {\n this.appliedFiltersEvent.emit(this.appliedFilters);\n return;\n }\n this.filteredData = result;\n this.rowData = this.filteredData;\n this.getGroupedData();\n this.filter.emit(this.filteredData);\n }\n\n evaluateFieldValue(row: any, field: string): any {\n if (field.includes('.')) {\n const parts = field.split('.');\n let value = row;\n for (const part of parts) {\n value = value?.[part];\n }\n return value;\n }\n return row[field];\n }\n\n resetFilter(col: any) {\n switch (col.filterType) {\n case 'text':\n case 'number':\n case 'date': {\n col.filters.forEach((f: any) => (f.filterValue = null));\n col.filterLogic = 'OR';\n break;\n }\n\n case 'set': {\n // Select all values again\n col.selectedValues = new Set(col.options);\n break;\n }\n }\n this.appliedFilters = this.appliedFilters.filter(\n (f) => f.fieldName !== col.fieldName,\n );\n // Remove active flag\n this.activeFilters.delete(col.fieldName);\n\n // Re-apply all filters\n if (this.dynamicGroupingFiltering) {\n this.appliedFiltersEvent.emit(this.appliedFilters);\n return;\n }\n this.applyAllFilters();\n }\n\n removeActiveFilter(col: any) {\n this.activeFilters.delete(col.fieldName);\n const column = this.colDefs.find((c) => c.fieldName === col.fieldName);\n if (column) {\n if (column.filterType === 'set') {\n column.selectedValues = new Set(column.options); // clear set filter\n } else {\n column.filters.forEach((f: any) => {\n f.filterValue = '';\n });\n }\n }\n this.appliedFilters = this.appliedFilters.filter(\n (f) => f.fieldName !== col.fieldName,\n );\n\n if (this.dynamicGroupingFiltering) {\n this.appliedFiltersEvent.emit(this.appliedFilters);\n return;\n }\n this.applyAllFilters();\n }\n\n /**\n * @description Method to change the data format to utc\n * @author Anand Pandey\n * @param {date} - date value to be changed\n * @returns date in milliseconds\n */\n normalizeDate(dateStr: string) {\n const d = new Date(dateStr);\n if (isNaN(d.getTime())) return null;\n return new Date(\n Date.UTC(d.getFullYear(), d.getMonth(), d.getDate()),\n ).getTime();\n }\n\n /**\n * @description\n * Filters the available set options inside a Set Filter (checkbox filter)\n * based on the user's search text. This updates only the list shown in\n * the dropdown\n * @author Anand Pandey\n * @param col - Column definition object containing filter config\n * @param event - Input event from the search textbox\n * @returns void\n */\n filterSetOptions(col: any, event: any) {\n const text = event.target.value.toLowerCase();\n col.filteredOptions = col.options.filter((option: any) =>\n String(option).toLowerCase().includes(text),\n );\n }\n\n /**\n * @description\n * Toggles an individual checkbox option inside a Set Filter. *\n * @author Anand Pandey\n * @param col - Column definition object\n * @param opt - Selected option value\n * @param event - Checkbox change event\n * @returns void\n */\n toggleSetOption(col: any, opt: any, event: any) {\n if (event.target.checked) col.selectedValues.add(opt);\n else col.selectedValues.delete(opt);\n\n this.applyAllFilters();\n }\n\n /**\n * @description * Selects or deselects all checkbox options in the Set Filter.\n * @author Anand Pandey\n * @param col - Column definition object\n * @param event - Checkbox change event\n * @returns void\n */\n toggleSelectAll(col: any, event: any) {\n if (event.target.checked) {\n col.options.forEach((option: any) => col.selectedValues.add(option));\n } else {\n col.selectedValues.clear();\n }\n this.applyAllFilters();\n }\n\n /**\n * @description\n * Checks whether all options inside a Set Filter are currently selected.\n * @author Anand Pandey\n * @param col - Column definition object\n * @returns boolean - TRUE if all options are selected, otherwise FALSE.\n */\n isAllSelected(col: any) {\n return (\n col.options?.length > 0 && col.options?.length === col.selectedValues.size\n );\n }\n\n /**\n * @description\n * Opens the three-dots column menu for the selected column.\n * Opens only the menu belonging to the clicked column index\n * @author Anand Pandey\n * @param {MouseEvent} event - The click event triggered on the three-dots icon.\n * @param {any} col - The column definition object for which menu is opened.\n * @param {number} index - Index of the column whose menu has been requested.\n * @returns {void}\n */\n openMenu(event: MouseEvent, col: any, index: number) {\n event.stopPropagation();\n this.showPin = false;\n this.activeFilterIndex = null;\n this.menuVisible = this.menuVisible.map(() => false);\n\n if (!this.menuVisible[index]) this.menuVisible[index] = false;\n\n this.menuVisible[index] = true;\n\n // setTimeout(() => {\n // const rect = (event.target as HTMLElement).getBoundingClientRect();\n // const el = this.colActionMenu?.nativeElement;\n // const leftAvailableSpace = rect.left;\n // const elWidth = el.offsetWidth;\n // if (leftAvailableSpace < elWidth) {\n // el.style.right = 'unset';\n // el.style.left = '0px';\n // }\n // });\n setTimeout(() => {\n const table = this.table?.nativeElement;\n const tableRect = table.getBoundingClientRect();\n const rect = (event.target as HTMLElement).getBoundingClientRect();\n const el = this.colActionMenu?.nativeElement;\n const elWidth = el.offsetWidth;\n const popUpLeftWidth = rect.left - elWidth;\n if (popUpLeftWidth < tableRect.left) {\n el.style.right = 'unset';\n el.style.left = '0px';\n }\n });\n }\n\n /**\n * @description Sort from three dots menu pop up.\n * @author Anand Pandey\n * @param {fieldName} string - fieldname.\n * @param {string} type - Type defines the sorting type whether this is ascending, descending.\n * @returns {void}\n */\n onSort(col: any, type: string, sortingColumIndex: number) {\n this.sortingType[sortingColumIndex] = type;\n this.sortingColumnIndex = sortingColumIndex;\n Object.keys(this.sortingType).forEach((k) => {\n if (k !== String(sortingColumIndex)) this.sortingType[k] = '';\n });\n if (this.sortingType[sortingColumIndex] == 'asc') {\n this.ascendingOrder(col);\n } else if (this.sortingType[sortingColumIndex] == 'dsc') {\n this.descendingOrder(col);\n } else {\n this.rowData = structuredClone(this.originalRowData);\n }\n // if (this.sortingType[sortingColumIndex] == '') {\n // this.rowData = this.originalRowData;\n // }\n this.getGroupedData();\n this.menuVisible[this.currentIndex] = false;\n }\n\n /**\n * @description Generates grouped data based on the selected `groupBy` columns..\n * @author Anand Pandey\n * @returns void\n */\n getGroupedData() {\n if (this.groupBy && this.groupBy.length > 0) {\n if (this.dynamicGroupingFiltering) {\n return;\n }\n this.groupedResult = this.groupData(this.rowData, this.groupBy) || [];\n }\n }\n\n /**\n * @description Initializes column resize operation when the user presses the mouse on the resize handle.\n * @author Anand Pandey\n * @param {MouseEvent} event - The mousedown event triggered on the resize handle.\n * @param {number} index - Index of the column being resized.\n * @returns {void}\n */\n startResize(event: MouseEvent, index: number) {\n event.preventDefault();\n event.stopPropagation();\n\n this.isResizing = true;\n this.resizingColumnIndex = index;\n this.startX = event.clientX;\n this.startWidth = this.colDefs[index].width ?? 150;\n\n this.zone.runOutsideAngular(() => {\n this.removeMouseMove = this.renderer.listen(\n 'document',\n 'mousemove',\n (e: MouseEvent) => this.onMouseMove(e),\n );\n\n this.removeMouseUp = this.renderer.listen(\n 'document',\n 'mouseup',\n (e: MouseEvent) => this.stopResize(e),\n );\n });\n }\n\n /**\n * @description Handles column resizing as the mouse moves.\n * @author Anand Pandey\n * @param {MouseEvent} event - Mouse movement event during resizing.\n * @returns {void}\n */\n onMouseMove = (event: MouseEvent) => {\n if (this.resizingColumnIndex == null || this.rafId) return;\n\n this.rafId = requestAnimationFrame(() => {\n const movement = event.clientX - this.startX;\n const newWidth = this.startWidth + movement;\n\n if (newWidth > 50) {\n this.zone.run(() => {\n this.colDefs[this.resizingColumnIndex!].width = newWidth;\n this.cd.markForCheck();\n });\n }\n\n this.rafId = null;\n });\n };\n\n /**\n * @description Stops the column resizing operation.\n * Clears resizing state and removes mouse event listeners.\n * @author Anand Pandey\n * @param {MouseEvent} event - Mouse up event ending the resize action.\n * @returns {void}\n */\n stopResize = (event: MouseEvent) => {\n event.stopPropagation();\n\n this.isResizing = false;\n this.resizingColumnIndex = null;\n\n this.removeMouseMove?.();\n this.removeMouseUp?.();\n\n if (this.rafId) {\n cancelAnimationFrame(this.rafId);\n this.rafId = null;\n }\n };\n\n /**\n * @description Recursively groups row data into a hierarchical structure based on the provided group keys.\n * @author Anand Pandey\n * @param {any[]} data - The row data to be grouped.\n * @param {string[]} groupKeys - Ordered list of column keys to group by.\n * @returns {any[]} A hierarchical grouped structure containing nested group nodes.\n */\n groupData(data: any[], groupKeys: string[]): any {\n if (groupKeys.length === 0) return data;\n const [currentKey, ...restKeys] = groupKeys;\n\n const groups: any = {};\n for (const row of data) {\n const key = row[currentKey] ?? '';\n if (!groups[key]) groups[key] = [];\n groups[key].push(row);\n }\n\n // recursively group child arrays\n\n let result = [];\n\n for (const key of Object.keys(groups)) {\n result.push({\n key,\n field: currentKey,\n expanded: false,\n children: this.groupData(groups[key], restKeys),\n });\n }\n\n return result;\n }\n\n /**\n * @description Toggles the expand/collapse state of a group node.\n * @author Anand Pandey\n * @param {any} node - The group node whose expanded state needs to be toggled.\n * @returns {void}\n */\n\n toggleGroup(node: any) {\n node.expanded = !node.expanded;\n }\n\n /**\n * @description Pin column on the left side.\n * @author Anand Pandey\n * @param {any} col - The selected column details from table on clicking pin or unpin from three dots menu.\n * @param {number} index - The index of column from table on clicking pin or unpin from three dots menu.\n * @returns {void}\n */\n\n // pinColumn(col: any, index: number, direction: string) {\n // this.pinActionClicked[col.colId] = direction;\n // if (col.pin) {\n // col.pin = direction;\n // }\n\n // col.leftPinned = direction === 'left';\n // col.rightPinned = direction === 'right';\n // if (col.leftPinned) {\n // this.colDefs.splice(index, 1);\n // this.colDefs = [col, ...this.colDefs];\n // } else if (col.rightPinned) {\n // this.colDefs.splice(index, 1);\n // this.colDefs.splice(this.colDefs.length - 1, 0, col);\n // } else {\n // const indx = this.originalColDefs.findIndex(\n // (dt) => dt.fieldName === col.fieldName,\n // );\n // if (index >= 0) {\n // this.colDefs.splice(index, 1);\n // this.colDefs.splice(indx, 0, col);\n // }\n // }\n\n // this.updatePinnedOffsets();\n // this.onClickOutside();\n // }\n\n pinColumn(col: any, index: number, direction: string) {\n this.pinActionClicked[col.colId] = direction;\n if (col.pin) {\n col.pin = direction;\n }\n this.leftPinned = this.leftPinned.filter((c: any) => c.colId !== col.colId);\n this.rightPinned = this.rightPinned.filter(\n (c: any) => c.colId !== col.colId,\n );\n\n if (col.fieldName !== 'action') {\n this.centerArea = this.centerArea.filter(\n (c: any) => c.colId !== col.colId,\n );\n }\n\n col.leftPinned = direction === 'left';\n col.rightPinned = direction === 'right';\n\n if (col.leftPinned) {\n this.leftPinned.push(col);\n } else if (col.rightPinned) {\n this.rightPinned.unshift(col);\n } else {\n const indx = this.centerArea.findIndex(\n (dt: any) => dt.fieldName === col.fieldName,\n );\n if (index >= 0) {\n this.centerArea.splice(indx, 0, col);\n }\n }\n\n const fixedCols = this.centerArea.filter(\n (c: any) => c.fieldName === 'action',\n );\n\n const movableCols = this.centerArea.filter(\n (c: any) => c.fieldName !== 'action',\n );\n this.colDefs = [\n ...this.leftPinned,\n ...movableCols,\n ...this.rightPinned,\n ...fixedCols,\n ];\n\n this.updatePinnedOffsets();\n this.onClickOutside();\n }\n\n showPinActions(event: MouseEvent) {\n event.stopPropagation();\n const parentEl = event.currentTarget as HTMLElement;\n\n this.showPin = true;\n setTimeout(() => {\n const menuEl = this.pinMenu?.nativeElement;\n if (!menuEl || !parentEl) return;\n const parentRect = parentEl.getBoundingClientRect();\n const menuWidth = menuEl.offsetWidth;\n\n const viewPortWidth = window.innerWidth;\n let x = parentRect.right;\n\n if (x + menuWidth > viewPortWidth) {\n menuEl.style.right = `${parentRect.width}px`;\n }\n });\n }\n\n hidePinActions() {\n this.showPin = false;\n }\n\n /**\n * @description Updates the horizontal left and right offsets of pinned columns by assigning cumulative widths to each pinned column and resetting non-pinned columns.\n * @author Anand Pandey\n * @returns void\n */\n\n updatePinnedOffsets() {\n let leftOffset = 0;\n let rightOffset = 0;\n\n // LEFT pinned (normal order)\n this.colDefs.forEach((col) => {\n if (col.leftPinned) {\n col.left = leftOffset;\n col.right = null;\n leftOffset += col.width || 120;\n }\n });\n\n // RIGHT pinned (REVERSE order)\n [...this.colDefs].reverse().forEach((col) => {\n if (col.rightPinned) {\n col.right = rightOffset;\n col.left = null;\n rightOffset += col.width || 120;\n }\n });\n }\n\n /**\n * @description Method to parse column value from rowdata object\n * according to given field value in column Defination\n * @author Tarun Kumar\n * @param row - current row object\n * @param toParse - field value\n * @returns string\n */\n parseColValue(row: any, col: any): any {\n if (!col?.fieldName?.includes('.')) {\n // if (Array.isArray(row[col.fieldName])) {\n // if (row[col.fieldName].every((dt: string) => typeof dt === 'string')) {\n // return row[col.fieldName][0];\n // }\n // if (row[col.fieldName].every((dt: any) => typeof dt === 'object')) {\n // return row[col.fieldName][0]?.[col.cellRendererParams?.tagKey];\n // }\n // }\n return row[col.fieldName] || 'N/A';\n } else {\n let toParseArr = col?.fieldName.split('.');\n let val = row;\n for (const key of toParseArr) {\n val = val?.[key];\n }\n return val || 'N/A';\n }\n }\n\n /**\n * @description method to reset table configuration\n * @author Tarun Kumar\n * @param none\n * @returns void\n */\n resetPagination(): void {\n //this.pageDetails.pageSize = 20;\n this.pageDetails.currentPage = 1;\n this.pageDetails.totalPages = 1;\n this.recordsToShow.min = 0;\n this.recordsToShow.max = this.pageDetails.pageSize;\n this.setPageCount();\n }\n\n /**\n * @description method to set total pages count\n * @author Tarun Kumar\n * @param none\n * @returns void\n */\n setPageCount(): void {\n this.pageDetails.totalPages = Math.ceil(\n this.totalRecords / this.pageDetails.pageSize,\n );\n }\n\n /**\n * @description method to update table on page size change\n * @author Tarun Kumar\n * @param event\n * @returns void\n */\n onPageSizeChanged(event: any): void {\n this.recordsToShow.min = 0;\n this.recordsToShow.max = parseInt(event);\n this.pageDetails.currentPage = 1;\n this.pageDetails.pageSize = parseInt(event);\n this.setPageCount();\n this.onPaginationChange.emit({\n page: this.pageDetails.currentPage - 1,\n pageSize: this.pageDetails.pageSize,\n });\n }\n\n /**\n * @description method to update table on previous button click\n * @author Tarun Kumar\n */\n onBtPrevClick(): void {\n this.recordsToShow.min = this.recordsToShow.min - this.pageDetails.pageSize;\n this.recordsToShow.max = this.recordsToShow.max - this.pageDetails.pageSize;\n if (this.pageDetails.currentPage > 1)\n this.pageDetails.currentPage = this.pageDetails.currentPage - 1;\n\n this.onPaginationChange.emit({\n page: this.pageDetails.currentPage - 1,\n pageSize: this.pageDetails.pageSize,\n });\n }\n\n /**\n * @description method to update table on next button click\n * @author Tarun Kumar\n */\n onBtNextClick(): void {\n this.recordsToShow.min = this.recordsToShow.min + this.pageDetails.pageSize;\n this.recordsToShow.max = this.recordsToShow.max + this.pageDetails.pageSize;\n\n if (this.pageDetails.currentPage < this.pageDetails.totalPages)\n this.pageDetails.currentPage = this.pageDetails.currentPage + 1;\n\n this.onPaginationChange.emit({\n page: this.pageDetails.currentPage - 1,\n pageSize: this.pageDetails.pageSize,\n });\n }\n\n /**\n * @description method to update table on selecting any page randomly\n * @author Tarun Kumar\n * @param event\n */\n goToSelectedPage(event: any): void {\n let pageNo = event.target.value;\n if (pageNo < 1) {\n this.pageDetails.currentPage = 1;\n } else if (pageNo > this.pageDetails.totalPages) {\n this.pageDetails.currentPage = this.pageDetails.totalPages;\n }\n this.recordsToShow.max =\n this.pageDetails.currentPage * this.pageDetails.pageSize;\n this.recordsToShow.min =\n this.pageDetails.currentPage * this.pageDetails.pageSize -\n this.pageDetails.pageSize;\n\n this.onPaginationChange.emit({\n page: this.pageDetails.currentPage - 1,\n pageSize: this.pageDetails.pageSize,\n });\n }\n\n /**\n * @description method to sort data according to type and column\n * @author Tarun Kumar\n * @param sortingColumIndex\n * @param col\n * @param sortingType\n */\n onSortingRowData(sortingColumIndex: number, col: any): void {\n if (!col.sortable) return;\n this.sortingColumnIndex = sortingColumIndex;\n Object.keys(this.sortingType).forEach((k) => {\n if (k !== String(sortingColumIndex)) this.sortingType[k] = '';\n });\n\n if (!this.sortingType[sortingColumIndex]) {\n this.sortingType[sortingColumIndex] = 'asc';\n } else {\n this.sortingType[sortingColumIndex] =\n this.sortingType[sortingColumIndex] === 'asc' ? 'dsc' : '';\n }\n\n if (this.sortingType[sortingColumIndex] == 'asc') {\n this.ascendingOrder(col);\n } else if (this.sortingType[sortingColumIndex] == 'dsc') {\n this.descendingOrder(col);\n } else {\n this.rowData = structuredClone(this.originalRowData);\n }\n\n this.getGroupedData();\n }\n\n /**\n * @description method to sort table in ascending order according to given field\n * @param fieldName\n */\n ascendingOrder(col: any): void {\n this.rowData = this.rowData.sort((a, b) => {\n const valA = this.parseColValue(a, col);\n const valB = this.parseColValue(b, col);\n if (typeof valA === 'string' && typeof valB === 'string') {\n return valA.localeCompare(valB);\n } else {\n if (valA > valB) {\n return 1;\n } else {\n return -1;\n }\n }\n });\n }\n\n /**\n * @description method to sort table in descending order according to given field\n * @param fieldName\n */\n descendingOrder(col: any): void {\n this.rowData = this.rowData.sort((a, b) => {\n const valA = this.parseColValue(a, col);\n const valB = this.parseColValue(b, col);\n if (typeof valA === 'string' && typeof valB === 'string') {\n return valA.localeCompare(valB) * -1;\n } else {\n if (valA > valB) {\n return -1;\n } else {\n return 1;\n }\n }\n });\n }\n\n /**\n * @description method to check/uncheck all rows on header checkbox selection/deselection\n * @author Tarun Kumar\n * @param event\n */\n onHeaderCheckboxChange(event: any): void {\n if (event.target.checked) {\n this.rowData = this.rowData.map((data) => {\n data.isSelected = true;\n return data;\n });\n this.selectedRow = JSON.parse(JSON.stringify(this.rowData));\n this.onCheckboxSelection.emit(this.rowData);\n } else {\n this.rowData = this.rowData.map((data) => {\n if (!data.isLocked) data.isSelected = false;\n return data;\n });\n this.selectedRow = [];\n this.onCheckboxSelection.emit([]);\n }\n }\n\n /**\n * @description method to check/uncheck row on row checkbox selection/deselection\n * @author Tarun Kumar\n * @param event\n */\n onRowCheckboxSelection(event: any): void {\n event.stopPropagation();\n if (event.target.checked) {\n let ind = this.rowData.findIndex(\n (item: any) => item.rowId == event.target.id,\n );\n this.rowData[ind].isSelected = true;\n if (\n this.checkboxSelectionType != 'multiple' &&\n this.selectedRow.length > 0\n ) {\n (\n document.getElementById(this.selectedRow[0].rowId) as HTMLInputElement\n ).checked = false;\n this.selectedRow = [];\n }\n this.selectedRow.push(this.rowData[ind]);\n\n this.onCheckboxSelection.emit(this.selectedRow);\n } else {\n let ind = this.rowData.findIndex(\n (item: any) => item.rowId == event.target.id,\n );\n this.rowData[ind].isSelected = false;\n let i = this.selectedRow.findIndex(\n (item: any) => item.rowId == event.target.id,\n );\n this.selectedRow.splice(i, 1);\n this.onCheckboxSelection.emit(this.selectedRow);\n }\n this.cd.detectChanges();\n }\n /**\n * @description method to check/uncheck all rows on header checkbox selection/deselection\n * @author Tarun Kumar\n * @param col\n * @returns {object}\n */\n getStyle(col: any, type?: string): object {\n const style: any = {\n width: `${col.width ?? 150}px`,\n minWidth: `${col.minWidth ?? 50}px`,\n maxWidth: `${col.maxWidth}px`,\n };\n if (col.isAction) {\n style.position = 'sticky';\n style.right = '0px';\n style.zIndex = 14;\n style.background = '#fff';\n style.width = '60px';\n style.minWidth = '60px';\n } else if (col.leftPinned) {\n style.position = 'sticky';\n style.left = col.left + 'px';\n style.zIndex = 12;\n style.background = '#fff';\n } else if (col.rightPinned) {\n style.position = 'sticky';\n style.right = col.right + 'px';\n style.zIndex = 12;\n style.background = '#fff';\n } else {\n style.position = '';\n }\n if (type === 'action') {\n style.background = '#f0f0f0';\n }\n return style;\n }\n onClickOutside() {\n this.showPageSizeList = false;\n this.activeFilterIndex = null;\n this.menuVisible = this.menuVisible.map(() => false);\n }\n\n infinityScroll(event: any) {\n if (\n event.target.offsetHeight + event.target.scrollTop >=\n event.target.scrollHeight - 1 &&\n this.rowData.length\n ) {\n this.onScrollEmitter.emit();\n }\n }\n\n checkAllSelected(): boolean {\n if (!this.rowData.length) return false;\n return this.selectedRow.length == this.rowData.length;\n }\n checkInterminate(): boolean {\n if (!this.rowData.length) return false;\n return (\n this.selectedRow.length > 0 &&\n this.selectedRow.length < this.rowData.length\n );\n }\n\n /**\n * @author Tarun Kumar\n * @description function triggered when the drag starts\n * @param {event object, index}\n * @returns {void}\n */\n onDragStart(event: DragEvent, index: number, col: any) {\n this.dragGroupIndex = null;\n const target = event.target as HTMLElement;\n if (this.isResizing) {\n event.preventDefault();\n return;\n }\n this.draggedIndex = index;\n\n // For column reorder.\n event.dataTransfer?.setData('text/plain', index.toString());\n\n // For group panel\n event.dataTransfer?.setData('columnIndex', index.toString());\n this.draggableColumn = col;\n\n const th = target.closest('th') as HTMLElement;\n if (!th) return;\n const clone = th.cloneNode(true) as HTMLElement;\n\n this.copyComputedStyles(th, clone);\n\n clone.style.position = 'absolute';\n clone.style.top = '-9999px';\n clone.style.left = '-9999px';\n clone.style.pointerEvents = 'none';\n\n document.body.appendChild(clone);\n event.dataTransfer?.setDragImage(clone, 0, 0);\n setTimeout(() => clone.remove(), 0);\n }\n\n onGroupDragStart(event: DragEvent, index: number) {\n event.dataTransfer?.setData('groupIndex', index.toString());\n this.dragGroupIndex = index;\n }\n\n /**\n * @author Anand Pandey\n * @description Copies computed CSS styles from the source element to the target element, including all child elements recursively.\n * @param {HTMLElement} source - Original element.\n * @param {HTMLElement} target - Cloned element.\n * @returns {void}\n */\n copyComputedStyles(source: HTMLElement, target: HTMLElement) {\n const computed = window.getComputedStyle(source);\n for (const prop of computed) {\n target.style.setProperty(prop, computed.getPropertyValue(prop));\n }\n\n // Copy children styles recursively\n const sourceChildren = Array.from(source.children) as HTMLElement[];\n const targetChildren = Array.from(target.children) as HTMLElement[];\n\n sourceChildren.forEach((srcChild, i) => {\n const tgtChild = targetChildren[i] as HTMLElement;\n if (srcChild && tgtChild) {\n this.copyComputedStyles(srcChild, tgtChild);\n }\n });\n }\n\n /**\n * @author Tarun Kumar\n * @description function to track the index of the element being dragged over and allow dropping\n * @param {event object, index}\n * @returns {void}\n */\n onDragOver(event: DragEvent, index: number) {\n event.preventDefault();\n this.isResizing = false;\n if (this.dragOverIndex !== index) {\n this.dragOverIndex = index;\n }\n }\n\n /**\n * @author Tarun Kumar\n * @description function to Reorder the items on drop\n * @param {event object, index}\n * @returns {void}\n */\n onDrop(event: DragEvent, index: number) {\n event.preventDefault();\n if (this.draggedIndex === null) return;\n const draggedItem = this.colDefs[this.draggedIndex];\n this.colDefs.splice(this.draggedIndex, 1);\n this.colDefs.splice(index, 0, draggedItem);\n this.draggedIndex = null;\n this.dragOverIndex = null;\n }\n\n /**\n * @author Tarun Kumar\n * @description function to reset dragOverIndex when the drag ends\n * @param {none}\n * @returns {void}\n */\n onDragEnd() {\n this.draggedIndex = null;\n this.dragOverIndex = null;\n }\n\n /**\n * @description Handles drag over on group panel to allow dropping.\n * @author Anand Pandey\n * @param {DragEvent} event\n * @returns {void}\n */\n onGroupDragOver(event: DragEvent) {\n event.preventDefault();\n this.groupingDisabled = this.draggableColumn?.disableGrouping ?? false;\n if (this.groupingDisabled) {\n event.dataTransfer!.dropEffect = 'none';\n this.groupingDisabled = false;\n return;\n }\n }\n\n /**\n * @description Handles drag over on a group tag and updates the target index for reordering.\n * @author Anand Pandey\n * @param {DragEvent} event\n * @param {number} index\n * @returns {void}\n */\n onActiveDragOver(event: DragEvent, index: number) {\n event.preventDefault();\n event.stopPropagation();\n this.dragGroupIndex = index;\n }\n\n /**\n * @description Handles drop on group panel and routes the drop to group reordering or column grouping logic.\n * @author Anand Pandey\n * @param {DragEvent} event\n * @returns {void}\n */\n onGroupDrop(event: DragEvent) {\n const colIndex = Number(event.dataTransfer?.getData('columnIndex'));\n const col = this.colDefs[colIndex];\n if (col.disableGrouping) return;\n const groupIndex = Number(event.dataTransfer?.getData('groupIndex'));\n const target = event.target as HTMLElement;\n const isOverGroupPanel = target.closest('.group-tag');\n if (\n this.dragGroupIndex !== null &&\n this.dragGroupIndex >= 0 &&\n groupIndex >= 0\n ) {\n if (!isOverGroupPanel) {\n this.dragGroupIndex = this.activeGroups.length - 1;\n }\n this.onActiveGroupDrop(event, this.dragGroupIndex);\n } else {\n if (isNaN(colIndex)) return;\n if (colIndex) this.dragGroupIndex = null;\n\n const col = this.colDefs[colIndex];\n\n const el = this.activeGroups.find((c) => c.fieldName === col.fieldName);\n if (!el) {\n this.activeGroups.push(col);\n this.groupBy.push(col.fieldName);\n }\n this.colDefs.splice(colIndex, 1);\n if (this.dynamicGroupingFiltering) {\n this.activeGroupsEvent.emit(this.groupBy);\n return;\n }\n // this.applyGrouping();\n this.getGroupedData();\n }\n }\n\n /**\n * @description Handles column grouping triggered from the column action menu by adding the column to the active group list,\n * removing it from visible columns, and recalculating grouped row data.\n *\n * @param {any} col - The column definition selected for grouping.\n * @param {number} index - Index of the column in the current column definitions array.\n * @returns {void}\n */\n\n groupByColumnAction(col: any, index: number) {\n if (col.disableGrouping) return;\n this.activeGroups.push(col);\n this.groupBy.push(col.fieldName);\n this.colDefs.splice(index, 1);\n if (this.dynamicGroupingFiltering) {\n this.activeGroupsEvent.emit(this.groupBy);\n return;\n }\n this.getGroupedData();\n this.onClickOutside();\n }\n\n /**\n * @description Handles drop on a group tag and reorders the active groups accordingly.\n * @author Anand Pandey\n * @param {DragEvent} event\n * @param {number} index\n * @returns {void}\n */\n onActiveGroupDrop(event: DragEvent, index: number) {\n event.stopPropagation();\n const groupIndex = Number(event.dataTransfer?.getData('groupIndex'));\n if (isNaN(groupIndex)) return;\n if (groupIndex === index) return;\n const item = this.groupBy.splice(groupIndex, 1)[0];\n this.groupBy.splice(index, 0, item);\n\n const col = this.activeGroups.splice(groupIndex, 1)[0];\n this.activeGroups.splice(index, 0, col);\n if (this.dynamicGroupingFiltering) {\n this.activeGroupsEvent.emit(this.groupBy);\n return;\n }\n this.getGroupedData();\n }\n\n /**\n * @description Removes a group tag and restores the column to available columns list.\n * @author Anand Pandey\n * @param {any} col\n * @param {number} id\n * @returns {void}\n */\n removeGroup(col: any, id: number) {\n this.activeGroups.splice(id, 1);\n const colIndex = this.originalColDefs.findIndex(\n (dt) => dt.fieldName === col.fieldName,\n );\n this.colDefs.splice(colIndex, 0, col);\n this.groupBy.splice(id, 1);\n if (this.groupBy.length === 0) {\n this.groupedResult = [];\n if (this.dynamicGroupingFiltering) {\n this.activeGroupsEvent.emit(this.groupBy);\n return;\n }\n } else {\n if (this.dynamicGroupingFiltering) {\n this.activeGroupsEvent.emit(this.groupBy);\n return;\n }\n this.getGroupedData();\n }\n }\n\n toggleDropdown(): void {\n this.showDropdown = !this.showDropdown;\n }\n\n selectFilter(option: any, col: any): void {\n col.filters[0].filterOperation = option.value;\n this.showDropdown = false;\n }\n\n getSelectedFilterLabel(value: string): string {\n return this.filterOptions.find((o) => o.value === value)?.label || '';\n }\n\n toggleFilter(col: any, index: number, event: MouseEvent) {\n event.stopPropagation();\n this.activeFilterIndex = this.activeFilterIndex === index ? null : index;\n this.menuVisible = this.menuVisible.map(() => false);\n }\n\n onMouseEnterHeader(index: number) {\n this.showMoveIcon[index] = true;\n }\n\n onMouseLeaveHeader(index: number) {\n this.showMoveIcon[index] = false;\n }\n\n enableColumnDrag(event: MouseEvent, index: number) {\n event.stopPropagation();\n this.columnDraggable[index] = true;\n }\n\n disableColumnDrag(event: MouseEvent, index: number) {\n event.stopPropagation();\n this.columnDraggable[index] = false;\n }\n\n dateTimeSelected(date: any) {\n this.applyAllFilters();\n }\n\n convertToNumber(value: number | string): number {\n return Number(value);\n }\n\n hideSettings(): void {\n this.onHideSettings.emit(false);\n }\n\n dragRow(e: Event, row: any) {\n this.draggedRowData = row;\n this.isRowSelected = this.selectedRow.some((s) => s.rowId === row.rowId);\n }\n\n allowRowDrop(e: Event) {\n e.preventDefault();\n }\n dropRow(targetRow: any) {\n let sourceIndex = null;\n let targetIndex = this.rowData.findIndex(\n (dt: any) => dt.rowId === targetRow.rowId,\n );\n\n if (this.selectedRow.length > 0 && this.isRowSelected) {\n sourceIndex = this.rowData.findIndex(\n (dt: any) => dt.rowId === this.selectedRow[0].rowId,\n );\n\n const selectedIds = new Set(this.selectedRow.map((r) => r.rowId));\n this.rowData = this.rowData.filter((dt) => !selectedIds.has(dt.rowId));\n if (sourceIndex > this.rowData.length) {\n sourceIndex = sourceIndex - this.selectedRow.length + 1;\n }\n\n if (targetIndex >= this.rowData.length) {\n targetIndex = targetIndex - this.selectedRow.length + 1;\n }\n this.rowData.splice(sourceIndex, 0, ...this.selectedRow);\n } else {\n sourceIndex = this.rowData.findIndex(\n (dt: any) => dt.rowId === this.draggedRowData.rowId,\n );\n }\n if (sourceIndex < 0 || targetIndex < 0) return;\n this.moveRow(sourceIndex, targetIndex);\n }\n\n moveRow(from: number, to: number) {\n let rowMoved = [];\n if (this.selectedRow.length > 0 && this.isRowSelected) {\n rowMoved = this.rowData.splice(from, this.selectedRow.length);\n } else {\n rowMoved = this.rowData.splice(from, 1);\n }\n\n this.rowData.splice(to, 0, ...rowMoved);\n this.isRowSelected = false;\n }\n\n clearAllFilter() {\n this.colDefs?.forEach((col) => {\n this.resetFilter(col);\n });\n }\n\n onBtFirstClick(): void {\n this.pageDetails.currentPage = 1;\n this.recordsToShow.min = 0;\n this.recordsToShow.max = this.pageDetails.pageSize;\n\n this.onPaginationChange.emit({\n page: this.pageDetails.currentPage - 1,\n pageSize: this.pageDetails.pageSize,\n });\n }\n\n onBtLastClick(): void {\n this.pageDetails.currentPage = this.pageDetails.totalPages;\n this.recordsToShow.max =\n this.pageDetails.currentPage * this.pageDetails.pageSize;\n this.recordsToShow.min =\n this.pageDetails.currentPage * this.pageDetails.pageSize -\n this.pageDetails.pageSize;\n\n this.onPaginationChange.emit({\n page: this.pageDetails.currentPage - 1,\n pageSize: this.pageDetails.pageSize,\n });\n }\n\n onRowClick(row: any) {\n this.onRowClicked.emit({ row });\n }\n\n onCellClick(row: any, col: any) {\n if (this.clickTimer) {\n clearTimeout(this.clickTimer);\n }\n\n this.clickTimer = setTimeout(() => {\n this.onCellClicked.emit({ row, col });\n }, this.clickDelay);\n }\n\n onCellDblClick(row: any, col: any) {\n this.cellClickedColumn = col;\n if (this.clickTimer) {\n clearTimeout(this.clickTimer);\n this.clickTimer = null;\n }\n if (!col.editable) return;\n if (this.previousId) {\n this.isCellDblClicked[this.previousId] = false;\n }\n\n const id = `${col.colId}-${row.rowId}`;\n this.isCellDblClicked[id] = true;\n let fieldName = col.fieldName;\n const fieldValue = this.evaluateFieldValue(row, col.fieldName) || '';\n\n this.editingRow = row;\n this.editingField = fieldName;\n this.cellClickedCtrl.setValue(fieldValue);\n this.previousId = id;\n }\n\n onEnter() {\n this.enterPressed = true;\n this.onCellEditSave();\n }\n\n onBlur() {\n if (this.enterPressed) {\n this.enterPressed = false;\n return;\n }\n this.onCellEditSave();\n }\n\n onCellEditSave() {\n if (this.editingRow && this.editingField) {\n this.setFieldValue(\n this.editingRow,\n this.editingField,\n this.cellClickedCtrl.value,\n );\n }\n this.onCellEdit.emit({\n row: this.editingRow,\n col: this.cellClickedColumn,\n changedValue: this.cellClickedCtrl.value,\n });\n\n if (this.previousId) {\n this.isCellDblClicked[this.previousId] = false;\n }\n\n this.editingRow = null;\n this.editingField = '';\n }\n\n setFieldValue(row: any, field: string, value: any) {\n if (field.includes('.')) {\n const parts = field.split('.');\n let obj = row;\n\n for (let i = 0; i < parts.length - 1; i++) {\n obj = obj?.[parts[i]];\n if (!obj) return;\n }\n\n obj[parts[parts.length - 1]] = value;\n } else {\n row[field] = value;\n }\n }\n}\n","<div class=\"tableArea\" #table>\n @if (settingsRequired && settingsClicked) {\n <div\n class=\"setting_options\"\n appOutsideClick\n (clickOutside)=\"hideSettings()\"\n >\n <div class=\"column_header\">Select Headers</div>\n <div class=\"checkbox_container\">\n <input\n class=\"custom_check_box\"\n type=\"checkbox\"\n [checked]=\"activeAll\"\n (change)=\"activeAllSelection($event)\"\n />\n <span>Select All</span>\n </div>\n\n <div class=\"item_container\" id=\"table_scroll\">\n @for (col of colDefs; track col.colId) {\n <div class=\"column_item checkbox_container\">\n <input\n class=\"custom_check_box\"\n type=\"checkbox\"\n [checked]=\"col.active\"\n (change)=\"changeActiveColSelection($event, col)\"\n [disabled]=\"col.headerLocked\"\n />\n <span>{{ col.headerName | titlecase }}</span>\n </div>\n }\n </div>\n </div>\n }\n @if (groupByRequired) {\n <!-- Group Panel -->\n <div\n class=\"group_panel\"\n [ngClass]=\"{ disable_group: groupingDisabled }\"\n (dragover)=\"onGroupDragOver($event)\"\n (drop)=\"onGroupDrop($event)\"\n >\n <img alt=\"\" src=\"images/t-data-pipeline.svg\" class=\"icon\" />\n @for (g of activeGroups; track $index) {\n <div\n class=\"group_tag\"\n draggable=\"true\"\n (dragstart)=\"onGroupDragStart($event, $index)\"\n (dragover)=\"onActiveDragOver($event, $index)\"\n (drop)=\"onActiveGroupDrop($event, $index)\"\n >\n <img src=\"images/t-gripper.svg\" alt=\"\" />\n <span>{{ g.headerName }}</span>\n <button class=\"remove_tag\" (click)=\"removeGroup(g, $index)\">\n <img src=\"images/t-x.svg\" alt=\"\" />\n </button>\n </div>\n <img src=\"images/chevron-right.svg\" alt=\"\" class=\"divider\" />\n }\n @if (activeGroups.length === 0) {\n <div class=\"group_placeholder\">Drag here to set row groups</div>\n }\n </div>\n }\n @if (activeFilters.size > 0) {\n <div class=\"active_filters_container\">\n <div class=\"tag_wrapper\">\n @for (filter of appliedFilters; track filter.fieldName) {\n @if (filter.filters?.length) {\n <div class=\"active_filter_tag\">\n <div class=\"active_filter_label ellipsis\">\n @for (item of filter.filters; track $index) {\n @if (item.filterValue) {\n @if ($index > 0 && item.filterValue) {\n <span class=\"filter_logic\">\n {{ filter.filterLogic }}\n </span>\n }\n <span class=\"filter_field\"\n >{{ filter.fieldName.split(\".\")[0] }}:</span\n >\n <span class=\"\">\n {{\n item.filterOperation == \"=\" ||\n item.filterOperation == \"equals\"\n ? \":\"\n : item.filterOperation\n }}</span\n >\n <span class=\"filter_value\">{{ item.filterValue }}</span>\n }\n }\n </div>\n <button\n class=\"remove_filter_btn\"\n (click)=\"removeActiveFilter(filter)\"\n >\n <img src=\"images/t-x.svg\" alt=\"\" />\n </button>\n </div>\n }\n }\n </div>\n <div class=\"clear_all\" (click)=\"clearAllFilter()\">Clear All Filters</div>\n </div>\n }\n <div\n class=\"table_wrapper global\"\n id=\"table_scroll\"\n #parent\n (scroll)=\"infinityScroll($event)\"\n [ngClass]=\"{ tbody_height: activeFilters.size > 0 }\"\n [class.no-horizontal-scroll]=\"\n (!rowData || rowData.length === 0) &&\n (!groupedResult || groupedResult.length === 0)\n \"\n >\n <div class=\"table-inner-wrapper\">\n <table cellspacing=\"0\" cellpadding=\"0\">\n <thead class=\"sticky-top\">\n <tr>\n @if (\n checkBoxSelection &&\n checkboxSelectionType == \"multiple\" &&\n atLeastOneColumnChecked\n ) {\n <th style=\"min-width: 50px; width: 50px\">\n <div class=\"th_wraper\">\n <span class=\"checkbox_container\"\n ><input\n class=\"pointer custom_check_box\"\n type=\"checkbox\"\n name=\"\"\n id=\"\"\n [checked]=\"checkAllSelected()\"\n [indeterminate]=\"checkInterminate()\"\n (change)=\"onHeaderCheckboxChange($event)\"\n /></span>\n <div class=\"filter_three_dot_wrapper\">\n <span class=\"resize-handle default_cursor\"> | </span>\n </div>\n </div>\n </th>\n } @else {\n @if (checkBoxSelection && checkboxSelectionType == \"single\") {\n <th style=\"min-width: 50px; width: 50px\"></th>\n }\n }\n @if (activeGroups.length > 0) {\n <th class=\"active_group\">\n <div class=\"th_wraper\">\n <div class=\"text_wrapper\">\n <span class=\"ellipsis headerName\">Group</span>\n </div>\n <div class=\"filter_three_dot_wrapper\">\n <div class=\"three-dots\">\n <img src=\"images/t-more-vertical.svg\" />\n </div>\n </div>\n </div>\n </th>\n }\n @for (col of colDefs; track col.colId) {\n @if (col.active) {\n <th\n [ngStyle]=\"getStyle(col, 'action')\"\n [ngClass]=\"{\n 'drag-over': dragOverIndex === $index,\n pinned_column: col.leftPinned || col.rightPinned,\n }\"\n (dragover)=\"onDragOver($event, $index)\"\n (drop)=\"onDrop($event, $index)\"\n (mouseenter)=\"onMouseEnterHeader($index)\"\n (mouseleave)=\"onMouseLeaveHeader($index)\"\n >\n <div class=\"th_wraper\">\n <div\n class=\"text_wrapper\"\n [ngStyle]=\"getStyle(col, 'action')\"\n (click)=\"onSortingRowData($index, col)\"\n >\n @if (showMoveIcon[$index] && !col.isAction) {\n <img\n src=\"images/t-move.svg\"\n class=\"move-icon\"\n [draggable]=\"!isResizing || columnDraggable[$index]\"\n (dragstart)=\"onDragStart($event, $index, col)\"\n (dragend)=\"onDragEnd()\"\n (mouseenter)=\"enableColumnDrag($event, $index)\"\n (mouseleave)=\"disableColumnDrag($event, $index)\"\n />\n }\n <span class=\"ellipsis headerName\">{{\n col?.headerName\n }}</span>\n\n @if (\n sortingRequired &&\n sortingColumnIndex == $index &&\n col?.sortable &&\n !col.isAction\n ) {\n <span class=\"sorting_icon\">\n @if (sortingType[$index] === \"asc\") {\n <img\n src=\"images/t-arrow-up.svg\"\n class=\"sorting_up\"\n [draggable]=\"false\"\n (dragstart)=\"\n $event.preventDefault();\n $event.stopPropagation()\n \"\n />\n }\n @if (sortingType[$index] === \"dsc\") {\n <!-- <i class=\"fa fa-caret-down\" [ngClass]=\"sortingColumnIndex == $index && sortingType == 'dsc' ? 'muted_sort' : ''\"></i> -->\n <img\n src=\"images/t-arrow-down.svg\"\n class=\"sorting_down\"\n [draggable]=\"false\"\n (dragstart)=\"\n $event.preventDefault();\n $event.stopPropagation()\n \"\n />\n }\n </span>\n }\n </div>\n <div class=\"filter_three_dot_wrapper\">\n <!-- Column Filters Logic-->\n @if (filterRequired && col.filterable) {\n <div\n #trigger\n class=\"filters\"\n (click)=\"toggleFilter(col, $index, $event)\"\n >\n @if (activeFilters.has(col.fieldName)) {\n <img\n src=\"images/t-filter-applied.svg\"\n class=\"filter-icon\"\n [draggable]=\"false\"\n (dragstart)=\"\n $event.preventDefault();\n $event.stopPropagation()\n \"\n />\n } @else {\n <img\n src=\"images/t-filter.svg\"\n class=\"filter-icon\"\n [draggable]=\"false\"\n (dragstart)=\"\n $event.preventDefault();\n $event.stopPropagation()\n \"\n />\n }\n @if (activeFilterIndex === $index) {\n <div class=\"filt_wrap\">\n <div\n adaptivePosition\n [trigger]=\"trigger\"\n [parentContainer]=\"parent\"\n [matchWidth]=\"false\"\n class=\"filter_wrapper\"\n id=\"filter_wrapper-{{ $index }}\"\n (click)=\"$event.stopPropagation()\"\n appOutsideClick\n (clickOutside)=\"onClickOutside()\"\n >\n <!-- Text Filter -->\n @if (col.filterType === \"text\") {\n <lib-common-input\n [options]=\"filterOptions\"\n [selectedValue]=\"\n col.filters[0].filterOperation\n \"\n placeholder=\"Select filter\"\n (valueChange)=\"\n col.filters[0].filterOperation = $event;\n applyAllFilters()\n \"\n ></lib-common-input>\n\n <div class=\"search_input\">\n <img src=\"images/search.svg\" alt=\"\" />\n <input\n type=\"text\"\n placeholder=\"Filter\"\n [(ngModel)]=\"col.filters[0].filterValue\"\n (keyup)=\"applyAllFilters()\"\n />\n </div>\n\n @if (col.filters[0].filterValue) {\n <div class=\"logic-row radio_option\">\n <input\n type=\"radio\"\n name=\"filterLogic{{ col.fieldName }}\"\n [(ngModel)]=\"col.filterLogic\"\n value=\"AND\"\n id=\"{{ $index }}\"\n (change)=\"applyAllFilters()\"\n />\n <label [for]=\"$index\">AND</label>\n\n <input\n type=\"radio\"\n name=\"filterLogic{{ col.fieldName }}\"\n [(ngModel)]=\"col.filterLogic\"\n value=\"OR\"\n id=\"{{ $index + 1 }}\"\n (change)=\"applyAllFilters()\"\n />\n <label [for]=\"$index + 1\">OR</label>\n </div>\n\n <lib-common-input\n [options]=\"filterOptions\"\n [selectedValue]=\"\n col.filters[1].filterOperation\n \"\n placeholder=\"Select filter\"\n (valueChange)=\"\n col.filters[1].filterOperation = $event;\n applyAllFilters()\n \"\n ></lib-common-input>\n <!-- <input\n type=\"text\"\n [(ngModel)]=\"col.filters[1].filterValue\"\n placeholder=\"Filter…\"\n (keyup)=\"applyAllFilters()\"\n /> -->\n\n <div class=\"search_input\">\n <img src=\"images/search.svg\" alt=\"\" />\n <input\n type=\"text\"\n placeholder=\"Filter\"\n [(ngModel)]=\"col.filters[1].filterValue\"\n (keyup)=\"applyAllFilters()\"\n />\n </div>\n }\n }\n\n <!-- Number Filter -->\n @if (col.filterType === \"number\") {\n <lib-common-input\n [options]=\"numberFilterOptions\"\n [selectedValue]=\"\n col.filters[0].filterOperation\n \"\n placeholder=\"Select filter\"\n (valueChange)=\"\n col.filters[0].filterOperation = $event;\n applyAllFilters()\n \"\n ></lib-common-input>\n\n <!-- <input\n type=\"number\"\n [(ngModel)]=\"col.filters[0].filterValue\"\n (input)=\"applyAllFilters()\"\n /> -->\n\n <div class=\"search_input\">\n <img src=\"images/search.svg\" alt=\"\" />\n <input\n type=\"number\"\n placeholder=\"Filter\"\n [(ngModel)]=\"col.filters[0].filterValue\"\n (input)=\"applyAllFilters()\"\n />\n </div>\n\n @if (col.filters[0].filterValue) {\n <div class=\"logic-row radio_option\">\n <input\n type=\"radio\"\n name=\"filterLogic{{ col.fieldName }}\"\n [(ngModel)]=\"col.filterLogic\"\n value=\"AND\"\n id=\"{{ $index }}\"\n (change)=\"applyAllFilters()\"\n />\n <label [for]=\"$index\">AND</label>\n\n <input\n type=\"radio\"\n name=\"filterLogic{{ col.fieldName }}\"\n [(ngModel)]=\"col.filterLogic\"\n value=\"OR\"\n id=\"{{ $index + 1 }}\"\n (change)=\"applyAllFilters()\"\n />\n <label [for]=\"$index + 1\">OR</label>\n </div>\n\n <lib-common-input\n [options]=\"numberFilterOptions\"\n [selectedValue]=\"\n col.filters[1].filterOperation\n \"\n placeholder=\"Select filter\"\n (valueChange)=\"\n col.filters[1].filterOperation = $event;\n applyAllFilters()\n \"\n ></lib-common-input>\n\n <div class=\"search_input\">\n <img src=\"images/search.svg\" alt=\"\" />\n <input\n type=\"text\"\n placeholder=\"Filter\"\n [(ngModel)]=\"col.filters[1].filterValue\"\n (keyup)=\"applyAllFilters()\"\n />\n </div>\n <!-- <input\n type=\"text\"\n [(ngModel)]=\"col.filters[1].filterValue\"\n placeholder=\"Filter…\"\n (keyup)=\"applyAllFilters()\"\n /> -->\n }\n }\n\n <!-- DATE FILTER -->\n @if (col.filterType === \"date\") {\n <lib-common-input\n [options]=\"numberFilterOptions\"\n [selectedValue]=\"\n col.filters[0].filterOperation\n \"\n placeholder=\"Select filter\"\n (valueChange)=\"\n col.filters[0].filterOperation = $event;\n applyAllFilters()\n \"\n ></lib-common-input>\n\n <!-- <input\n type=\"date\"\n [(ngModel)]=\"col.filters[0].filterValue\"\n (change)=\"applyAllFilters()\"\n /> -->\n <lib-common-calendar\n [dateConfig]=\"dateConfig\"\n [(ngModel)]=\"col.filters[0].filterValue\"\n [preSelectedValue]=\"\n col.filters[0].filterValue\n \"\n (dateTimeSelected)=\"\n dateTimeSelected($event)\n \"\n ></lib-common-calendar>\n\n @if (col.filters[0].filterValue) {\n <div class=\"logic-row radio_option\">\n <input\n type=\"radio\"\n name=\"filterLogic{{ col.fieldName }}\"\n [(ngModel)]=\"col.filterLogic\"\n value=\"AND\"\n id=\"{{ $index }}\"\n (change)=\"applyAllFilters()\"\n />\n <label [for]=\"$index\">AND</label>\n\n <input\n type=\"radio\"\n name=\"filterLogic{{ col.fieldName }}\"\n [(ngModel)]=\"col.filterLogic\"\n value=\"OR\"\n id=\"{{ $index + 1 }}\"\n (change)=\"applyAllFilters()\"\n />\n <label [for]=\"$index + 1\">OR</label>\n </div>\n\n <lib-common-input\n [options]=\"numberFilterOptions\"\n [selectedValue]=\"\n col.filters[1].filterOperation\n \"\n placeholder=\"Select filter\"\n (valueChange)=\"\n col.filters[1].filterOperation = $event;\n applyAllFilters()\n \"\n ></lib-common-input>\n\n <lib-common-calendar\n [dateConfig]=\"dateConfig\"\n [(ngModel)]=\"col.filters[1].filterValue\"\n [preSelectedValue]=\"\n col.filters[1].filterValue\n \"\n (dateTimeSelected)=\"\n dateTimeSelected($event)\n \"\n ></lib-common-calendar>\n }\n }\n\n <!-- SET FILTER (CHECKBOX LIST) -->\n @if (col.filterType === \"set\") {\n <!-- <input\n type=\"text\"\n placeholder=\"Search...\"\n (input)=\"filterSetOptions(col, $event)\"\n /> -->\n <div class=\"search_input\">\n <img src=\"images/search.svg\" alt=\"\" />\n <input\n type=\"text\"\n placeholder=\"Search...\"\n (input)=\"filterSetOptions(col, $event)\"\n />\n </div>\n\n <div class=\"set_option_details\">\n <label class=\"checkbox_container\">\n <input\n class=\"custom_check_box\"\n type=\"checkbox\"\n [checked]=\"isAllSelected(col)\"\n (change)=\"toggleSelectAll(col, $event)\"\n />\n (Select All)\n </label>\n <div class=\"set_options\" id=\"table_scroll\">\n @for (\n opt of col.filteredOptions;\n track $index\n ) {\n <label class=\"checkbox_container\">\n <input\n class=\"custom_check_box\"\n type=\"checkbox\"\n [checked]=\"\n col.selectedValues.has(opt)\n \"\n (change)=\"\n toggleSetOption(col, opt, $event)\n \"\n />\n {{ opt }}\n </label>\n }\n </div>\n </div>\n }\n <div class=\"filter_btn\">\n <button\n class=\"reset_btn\"\n type=\"button\"\n (click)=\"resetFilter(col)\"\n >\n Reset\n </button>\n </div>\n </div>\n </div>\n }\n </div>\n }\n\n <!-- Three dots menu-->\n <div #triggerColMenu>\n @if (threeDotsMenuRequired && col.columnAction) {\n <div\n class=\"three-dots\"\n (click)=\"openMenu($event, col, $index)\"\n >\n <img\n src=\"images/t-more-vertical.svg\"\n [draggable]=\"false\"\n (dragstart)=\"\n $event.preventDefault();\n $event.stopPropagation()\n \"\n />\n </div>\n }\n </div>\n @if (!col.isAction) {\n <span\n class=\"resize-handle\"\n (mousedown)=\"startResize($event, $index)\"\n >\n |\n </span>\n }\n </div>\n </div>\n\n <!-- popup open -->\n @if (menuVisible[$index]) {\n <div\n #colActionMenu\n class=\"dropdown_wrapper\"\n adaptivePosition\n [trigger]=\"triggerColMenu\"\n [parentContainer]=\"parent\"\n [matchWidth]=\"false\"\n [isColumnActionMenu]=\"true\"\n (click)=\"$event.stopPropagation()\"\n appOutsideClick\n (clickOutside)=\"onClickOutside()\"\n >\n <div class=\"right_click_dropdown\" id=\"table_scroll\">\n @if (\n sortingType[$index] === \"dsc\" ||\n sortingType[$index] === \"\"\n ) {\n <div\n class=\"right_click_item\"\n (click)=\"onSort(col, 'asc', $index)\"\n >\n <div class=\"left_item\">\n <img\n src=\"images/arrow-up.svg\"\n class=\"sorting_up\"\n [ngClass]=\"{ disable: !col.sortable }\"\n />\n <span class=\"text\">Sort Ascending</span>\n </div>\n </div>\n }\n @if (\n sortingType[$index] === \"asc\" ||\n sortingType[$index] === \"\"\n ) {\n <div\n class=\"right_click_item\"\n (click)=\"onSort(col, 'dsc', $index)\"\n >\n <div class=\"left_item\">\n <img src=\"images/arrow-down.svg\" />\n <span class=\"text\">Sort Descending</span>\n </div>\n </div>\n }\n @if (\n sortingType[$index] === \"asc\" ||\n sortingType[$index] === \"dsc\"\n ) {\n <div\n class=\"right_click_item\"\n (click)=\"onSort(col, '', $index)\"\n >\n <div class=\"left_item\">\n <img src=\"images/trash-2.svg\" />\n <span class=\"text\">Clear Sort</span>\n </div>\n </div>\n }\n <div class=\"divder\"></div>\n\n <div\n class=\"right_click_item\"\n (mouseenter)=\"showPinActions($event)\"\n (mouseleave)=\"hidePinActions()\"\n >\n <div class=\"left_item\">\n <img src=\"images/pin.svg\" />\n <span class=\"text\">Pin Column</span>\n </div>\n <div class=\"right_item\">\n <img src=\"images/chevron-right.svg\" />\n @if (showPin) {\n <div class=\"second_dropdown\" #pinMenu>\n <div\n (click)=\"pinColumn(col, $index, 'none')\"\n class=\"right_click_item\"\n >\n <div class=\"left_item\">\n @if (\n (pinActionClicked[col.colId] ??\n \"none\") === \"none\"\n ) {\n <img src=\"images/check.svg\" />\n } @else {\n <img src=\"\" alt=\"\" />\n }\n <span class=\"text\">No Pin</span>\n </div>\n </div>\n <div\n (click)=\"pinColumn(col, $index, 'left')\"\n class=\"right_click_item\"\n >\n <div class=\"left_item\">\n @if (\n pinActionClicked[col.colId] === \"left\"\n ) {\n <img src=\"images/check.svg\" />\n } @else {\n <img src=\"\" alt=\"\" />\n }\n <span class=\"text\">Pin Left</span>\n </div>\n </div>\n <div\n (click)=\"pinColumn(col, $index, 'right')\"\n class=\"right_click_item\"\n >\n <div class=\"left_item\">\n @if (\n pinActionClicked[col.colId] === \"right\"\n ) {\n <img src=\"images/check.svg\" />\n } @else {\n <img src=\"\" alt=\"\" />\n }\n <span class=\"text\">Pin Right</span>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n\n <!-- <div\n class=\"right_click_item\"\n (click)=\"pinColumn(col, $index, 'left')\"\n >\n <div class=\"left_item\">\n <img src=\"images/pin.svg\" />\n <span class=\"text\">{{\n col.leftPinned ? \"Unpin Left Column\" : \"Pin Column Left\"\n }}</span>\n </div>\n </div>\n <div\n class=\"right_click_item\"\n (click)=\"pinColumn(col, $index, 'right')\"\n >\n <div class=\"left_item\">\n <img src=\"images/pin.svg\" />\n <span class=\"text\">\n {{\n col.rightPinned\n ? \"Unpin Right Column\"\n : \"Pin Column Right\"\n }}\n </span>\n </div>\n <div class=\"right_item\">\n <img src=\"images/arrow-right.svg\" alt=\"\" />\n </div>\n </div> -->\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <img src=\"\" alt=\"\" />\n <span class=\"text\">Autosize This Column</span>\n </div>\n </div>\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <img src=\"\" alt=\"\" />\n <span class=\"text\">Autosize All Columns</span>\n </div>\n </div>\n <div\n class=\"right_click_item\"\n [ngClass]=\"{\n disabled_option:\n !groupByRequired || col.disableGrouping,\n }\"\n >\n <div\n class=\"left_item\"\n (click)=\"groupByColumnAction(col, $index)\"\n >\n <img src=\"images/t-group-by-name.svg\" alt=\"\" />\n <span class=\"text\"\n >Group by {{ col.headerName }}</span\n >\n </div>\n </div>\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <img src=\"images/t-choose-column.svg\" alt=\"\" />\n <span class=\"text\">Choose Columns</span>\n </div>\n </div>\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <img src=\"\" alt=\"\" />\n <span class=\"text\">Reset Columns</span>\n </div>\n </div>\n </div>\n </div>\n }\n </th>\n }\n }\n </tr>\n </thead>\n <tbody>\n @if (groupedResult && groupedResult.length > 0) {\n @for (group of groupedResult; track group.key) {\n <tr (click)=\"toggleGroup(group)\">\n <td\n class=\"group-cell\"\n [attr.colspan]=\"\n colDefs.length +\n (checkBoxSelection ? 1 : 0) +\n (activeGroups.length > 0 ? 1 : 0)\n \"\n >\n <span class=\"group-toggle\">\n <img\n src=\"images/{{\n group.expanded\n ? 'chevron-down.svg'\n : 'chevron-right.svg'\n }}\"\n />\n {{ group.key }} ({{ group.children.length }})\n </span>\n </td>\n </tr>\n\n @if (group.expanded) {\n <!-- CASE 1: CHILDREN ARE MORE GROUPS -->\n @if (group.children[0]?.children) {\n @for (child of group.children; track child.key) {\n <ng-container\n [ngTemplateOutlet]=\"groupTemplate\"\n [ngTemplateOutletContext]=\"{\n $implicit: child,\n colDefs: colDefs,\n checkBoxSelection: checkBoxSelection,\n activeGroups: activeGroups,\n level: 1,\n }\"\n ></ng-container>\n }\n }\n\n <!-- CASE 2: CHILDREN ARE RAW ROWS -->\n @if (!group.children[0]?.children) {\n @for (row of group.children; track row.rowId) {\n <tr [ngClass]=\"row | addClass: tableOptions\">\n <!-- Checkbox column if any -->\n @if (checkBoxSelection) {\n <td>\n <span class=\"checkbox_container\">\n <input\n class=\"custom_check_box\"\n type=\"checkbox\"\n [checked]=\"row.isSelected\"\n /></span>\n </td>\n }\n @if (activeGroups.length > 0) {\n <td class=\"group-placeholder\"></td>\n }\n\n <!-- Render columns -->\n @for (col of colDefs; track col.colId) {\n <td\n [ngStyle]=\"getStyle(col)\"\n [ngClass]=\"[\n col?.addClass ? col.addClass(row) : '',\n col.leftPinned || col.rightPinned\n ? 'pinned_column'\n : '',\n ]\"\n >\n <!-- {{ row[col.fieldName] }} -->\n @if (!col?.cellRenderer) {\n <div class=\"cell-value ellipsis\">\n <div\n class=\"more_data_wrapper\"\n [ngClass]=\"{ ellipsis: !col.wrapText }\"\n >\n {{ parseColValue(row, col) }}\n </div>\n <div class=\"see_more_data\" id=\"table_scroll\">\n <div class=\"item\">\n <span class=\"desc\">\n {{ parseColValue(row, col) }}</span\n >\n </div>\n </div>\n </div>\n } @else {\n <div\n [rowParam]=\"row\"\n [col]=\"col\"\n [api]=\"tableOptions\"\n [currentValue]=\"row[col.fieldName]\"\n appRendererParser\n ></div>\n }\n </td>\n }\n </tr>\n }\n }\n }\n }\n } @else {\n @for (data of rowData; track data.rowId) {\n <tr\n [ngClass]=\"data | addClass: tableOptions\"\n (dragover)=\"allowRowDrop($event)\"\n (drop)=\"dropRow(data)\"\n (click)=\"onRowClick(data)\"\n >\n @if (checkBoxSelection && atLeastOneColumnChecked) {\n <td style=\"min-width: 50px\">\n @if (checkboxSelectionType == \"multiple\") {\n <span class=\"checkbox_container\"\n ><input\n type=\"checkbox\"\n class=\"pointer custom_check_box\"\n name=\"\"\n id=\"{{ data.rowId }}\"\n [disabled]=\"data.isLocked\"\n [checked]=\"data.isSelected || data.isLocked\"\n (change)=\"onRowCheckboxSelection($event)\"\n /></span>\n } @else {\n <span class=\"radio_option\">\n <input\n type=\"radio\"\n name=\"\"\n id=\"{{ data.rowId }}\"\n [checked]=\"data?.isSelected\"\n (change)=\"onRowCheckboxSelection($event)\"\n />\n <label [for]=\"data.rowId\"></label>\n </span>\n }\n </td>\n }\n @for (col of colDefs; track col.colId) {\n @if (col.active) {\n <td\n (click)=\"onCellClick(data, col)\"\n (dblclick)=\"onCellDblClick(data, col)\"\n [ngStyle]=\"getStyle(col)\"\n [ngClass]=\"[\n col?.addClass ? col.addClass(data) : '',\n col.leftPinned || col.rightPinned\n ? 'pinned_column'\n : '',\n ]\"\n class=\"table_cell\"\n >\n <div class=\"col_wrapper\">\n @if (isCellDblClicked[`${col.colId}-${data.rowId}`]) {\n <input\n [formControl]=\"cellClickedCtrl\"\n type=\"text\"\n name=\"cellClickedCtrl\"\n (blur)=\"onBlur()\"\n (keydown.enter)=\"onEnter()\"\n />\n }\n @if (\n rowGripFieldName &&\n rowGripFieldName === col?.fieldName\n ) {\n <div\n [draggable]=\"true\"\n (dragstart)=\"dragRow($event, data)\"\n class=\"gripper\"\n >\n <img class=\"gripper-img\" src=\"images/gripper.svg\" />\n </div>\n }\n\n @if (!col?.cellRenderer) {\n <div class=\"cell-value ellipsis\">\n <div\n class=\"more_data_wrapper\"\n [ngClass]=\"{ ellipsis: !col.wrapText }\"\n >\n {{ parseColValue(data, col) }}\n </div>\n <div class=\"see_more_data\" id=\"table_scroll\">\n <div class=\"item\">\n <span class=\"desc\">\n {{ parseColValue(data, col) }}</span\n >\n </div>\n </div>\n </div>\n } @else {\n <div\n [rowParam]=\"data\"\n [col]=\"col\"\n [api]=\"tableOptions\"\n [currentValue]=\"data[col.fieldName]\"\n appRendererParser\n ></div>\n }\n </div>\n <!-- Commented for later use -->\n <!-- <div class=\"tool_tip\">\n <span class=\"\"> {{ parseColValue(data, col.fieldName) }}aditya </span>\n </div> -->\n </td>\n }\n }\n </tr>\n }\n }\n </tbody>\n\n <ng-template\n #groupTemplate\n let-node\n let-colDefs=\"colDefs\"\n let-checkBoxSelection=\"checkBoxSelection\"\n let-activeGroups=\"activeGroups\"\n let-level=\"level\"\n >\n <!-- GROUP HEADER -->\n <tr (click)=\"toggleGroup(node)\">\n <td\n [attr.colspan]=\"\n colDefs.length +\n (checkBoxSelection ? 1 : 0) +\n (activeGroups.length > 0 ? 1 : 0)\n \"\n [style.paddingLeft.px]=\"level * 20\"\n class=\"group-cell\"\n >\n <span class=\"group-toggle\">\n <img\n src=\"images/{{\n node.expanded ? 'chevron-down.svg' : 'chevron-right.svg'\n }}\"\n />\n {{ node.key }} ({{ node.children.length }})\n </span>\n </td>\n </tr>\n\n <!-- CHILDREN -->\n @if (node.expanded) {\n <!-- CASE: more groups -->\n @if (node.children[0]?.children) {\n @for (child of node.children; track child.key) {\n <ng-container\n [ngTemplateOutlet]=\"groupTemplate\"\n [ngTemplateOutletContext]=\"{\n $implicit: child,\n colDefs: colDefs,\n checkBoxSelection: checkBoxSelection,\n activeGroups: activeGroups,\n level: level + 1,\n }\"\n >\n </ng-container>\n }\n }\n\n <!-- CASE: final rows -->\n @if (!node.children[0]?.children) {\n @for (row of node.children; track row.rowId) {\n <tr [ngClass]=\"row | addClass: tableOptions\">\n <!-- Checkbox column if any -->\n @if (checkBoxSelection) {\n <td>\n <span class=\"checkbox_container\">\n <input\n type=\"checkbox custom_check_box\"\n [checked]=\"row.isSelected\"\n /></span>\n </td>\n }\n @if (activeGroups.length > 0) {\n <td class=\"group-placeholder\"></td>\n }\n\n <!-- Render columns -->\n @for (col of colDefs; track col.colId) {\n <td\n [ngStyle]=\"getStyle(col)\"\n [ngClass]=\"[\n col.leftPinned || col.rightPinned\n ? 'pinned_column'\n : '',\n ]\"\n >\n <!-- {{ row[col.fieldName] }} -->\n @if (!col?.cellRenderer) {\n <div class=\"cell-value ellipsis\">\n <div\n class=\"more_data_wrapper\"\n [ngClass]=\"{ ellipsis: !col.wrapText }\"\n >\n {{ parseColValue(row, col) }}\n </div>\n <div class=\"see_more_data\" id=\"table_scroll\">\n <div class=\"item\">\n <span class=\"desc\">\n {{ parseColValue(row, col) }}</span\n >\n </div>\n </div>\n </div>\n } @else {\n <div\n [rowParam]=\"row\"\n [col]=\"col\"\n [api]=\"tableOptions\"\n [currentValue]=\"row[col.fieldName]\"\n appRendererParser\n ></div>\n }\n </td>\n }\n </tr>\n }\n }\n }\n </ng-template>\n </table>\n\n @if (\n (!rowData || rowData.length === 0) &&\n (!groupedResult || groupedResult.length === 0)\n ) {\n <div class=\"empty_overlay\">\n <div class=\"empty_content\">\n @if (tableOptions?.noDataTemplate) {\n <ng-container\n *ngTemplateOutlet=\"tableOptions.noDataTemplate\"\n ></ng-container>\n } @else {\n <span>No Data To Show</span>\n }\n </div>\n </div>\n }\n </div>\n </div>\n <!-- Table Wrapper Ends-->\n @if (paginationRequired) {\n <div class=\"pagination_main\">\n <div class=\"entries_details\">\n <span>Showing</span>\n <div class=\"pagination_select\">\n <div\n class=\"select_dropdown pointer\"\n (click)=\"showPageSizeList = !showPageSizeList\"\n >\n <p class=\"select_text mb-0\">{{ pageDetails.pageSize }}</p>\n <span class=\"chevron_img\">\n <img src=\"images/chevron-down.svg\" class=\"pointer\" />\n </span>\n </div>\n @if (showPageSizeList) {\n <div\n class=\"select_option\"\n appOutsideClick\n (clickOutside)=\"onClickOutside()\"\n >\n @for (option of pageSizeList; track $index) {\n <span\n class=\"pointer\"\n (click)=\"onPageSizeChanged(option); onClickOutside()\"\n >{{ option }}</span\n >\n }\n </div>\n }\n </div>\n <span\n >Rows |\n {{ totalRecords > 0 ? convertToNumber(recordsToShow.min) + 1 : 0 }} -\n {{\n recordsToShow.max > totalRecords ? totalRecords : recordsToShow.max\n }}\n of\n {{ totalRecords }} Entries</span\n >\n </div>\n <div class=\"pagination_form\">\n <!-- <span>Page</span> -->\n\n <button\n class=\"outlined_btn first_btn\"\n type=\"button\"\n (click)=\"onBtFirstClick()\"\n [ngClass]=\"pageDetails.currentPage > 1 ? '' : 'disable_btn'\"\n >\n <span> <img src=\"images/chevrons-left.svg\" alt=\"\" /> </span>\n </button>\n <button\n class=\"outlined_btn prev_btn\"\n [ngClass]=\"pageDetails.currentPage > 1 ? '' : 'disable_btn'\"\n type=\"button\"\n (click)=\"onBtPrevClick()\"\n >\n <span> <img src=\"images/chevron-left.svg\" alt=\"\" /> </span>\n </button>\n <div>\n <input\n class=\"input_style\"\n type=\"number\"\n [(ngModel)]=\"pageDetails.currentPage\"\n (change)=\"goToSelectedPage($event)\"\n name=\"\"\n id=\"\"\n />\n </div>\n <button\n class=\"outlined_btn next_btn\"\n type=\"button\"\n [ngClass]=\"\n pageDetails.currentPage < pageDetails.totalPages\n ? ''\n : 'disable_btn'\n \"\n (click)=\"onBtNextClick()\"\n >\n <span> <img src=\"images/chevron-right.svg\" alt=\"\" /> </span>\n </button>\n <!-- <span>of {{ pageDetails.totalPages }}</span> -->\n\n <button\n class=\"outlined_btn last_btn\"\n type=\"button\"\n (click)=\"onBtLastClick()\"\n [ngClass]=\"\n pageDetails.currentPage < pageDetails.totalPages\n ? ''\n : 'disable_btn'\n \"\n >\n <span> <img src=\"images/chevrons-right.svg\" alt=\"\" /> </span>\n </button>\n </div>\n </div>\n }\n <!-- Pagination Ends -->\n</div>\n\n<!-- cell right click code start here -->\n<div class=\"dropdown_wrapper d-none\">\n <div class=\"right_click_dropdown\">\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <img src=\"images/scissors.svg\" />\n <span class=\"text\">Cut</span>\n </div>\n\n <span class=\"right_item\">Ctrl+X</span>\n </div>\n\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <img src=\"images/copy.svg\" alt=\"\" />\n <span class=\"text\">Copy</span>\n </div>\n\n <span class=\"right_item\">Ctrl+C</span>\n </div>\n\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <img src=\"images/copy.svg\" alt=\"\" />\n <span class=\"text\">Copy with Headers</span>\n </div>\n <span class=\"right_item\"></span>\n </div>\n\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <img src=\"images/copy.svg\" alt=\"\" />\n <span class=\"text\">Copy with Group Headers</span>\n </div>\n <span class=\"right_item\"></span>\n </div>\n\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <img src=\"images/clipboard.svg\" alt=\"\" />\n <span class=\"text\">Paste</span>\n </div>\n\n <span class=\"right_item\">Ctrl+V</span>\n </div>\n\n <div class=\"right_click_item active\">\n <div class=\"left_item\">\n <img src=\"images/bar-chart.svg\" alt=\"\" />\n <span class=\"text\">Chart</span>\n </div>\n <img src=\"images/chevron-right.svg\" alt=\"\" />\n </div>\n\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <img src=\"images/download.svg\" alt=\"\" />\n <span class=\"text\">Export</span>\n </div>\n\n <img src=\"images/chevron-right.svg\" alt=\"\" />\n </div>\n </div>\n\n <!-- Chart section Start Here -->\n <div class=\"second_dropdown\">\n <div class=\"right_click_item active\">\n <div class=\"left_item\">\n <span class=\"text\">Column</span>\n </div>\n <img src=\"images/chevron-right.svg\" alt=\"\" />\n </div>\n\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <span class=\"text\">Bar</span>\n </div>\n <img src=\"images/chevron-right.svg\" alt=\"\" />\n </div>\n\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <span class=\"text\">Pie</span>\n </div>\n <img src=\"images/chevron-right.svg\" alt=\"\" />\n </div>\n\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <span class=\"text\">Line</span>\n </div>\n <img src=\"images/chevron-right.svg\" alt=\"\" />\n </div>\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <span class=\"text\">Area</span>\n </div>\n <img src=\"images/chevron-right.svg\" alt=\"\" />\n </div>\n\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <span class=\"text\">XY(Scatter)</span>\n </div>\n <img src=\"images/chevron-right.svg\" alt=\"\" />\n </div>\n\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <span class=\"text\">Polar</span>\n </div>\n <img src=\"images/chevron-right.svg\" alt=\"\" />\n </div>\n\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <span class=\"text\">Stastical</span>\n </div>\n <img src=\"images/chevron-right.svg\" alt=\"\" />\n </div>\n\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <span class=\"text\">Hierarchical</span>\n </div>\n <img src=\"images/chevron-right.svg\" alt=\"\" />\n </div>\n\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <span class=\"text\">Specialized</span>\n </div>\n <img src=\"images/chevron-right.svg\" alt=\"\" />\n </div>\n\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <span class=\"text\">Funnel</span>\n </div>\n <img src=\"images/chevron-right.svg\" alt=\"\" />\n </div>\n\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <span class=\"text\">Combination</span>\n </div>\n <img src=\"images/chevron-right.svg\" alt=\"\" />\n </div>\n </div>\n\n <!-- Export Section start Here -->\n <div class=\"export_section d-none\">\n <div class=\"right_click_item active\">\n <div class=\"left_item\">\n <img src=\"images/file.svg\" alt=\"\" />\n <span class=\"text\">CSV Report</span>\n </div>\n <img src=\"images/chevron-right.svg\" alt=\"\" />\n </div>\n\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <img src=\"images/file.svg\" alt=\"\" />\n <span class=\"text\">Excel Report</span>\n </div>\n <img src=\"images/chevron-right.svg\" alt=\"\" />\n </div>\n </div>\n\n <!-- Column Group Section Start Here -->\n <div class=\"third_dropdown\">\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <span class=\"text\">Grouped</span>\n </div>\n </div>\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <span class=\"text\">Stacked</span>\n </div>\n </div>\n <div class=\"right_click_item\">\n <div class=\"left_item\">\n <span class=\"text\">100% Stacked</span>\n </div>\n </div>\n </div>\n</div>\n","import { Component, HostListener, signal } from '@angular/core';\nimport { OutsideClickDirective } from '../../directives/outside-click.directive';\nimport { AdaptivePositionDirective } from '../../directives/adaptive-position.directive';\nimport { CommonModule } from '@angular/common';\nimport { AddClassPipe } from '../../pipes/add-class.pipe';\n\n@Component({\n selector: 'lib-common-renderer',\n imports: [\n OutsideClickDirective,\n AdaptivePositionDirective,\n CommonModule,\n AddClassPipe,\n ],\n templateUrl: './common-renderer.component.html',\n styleUrl: './common-renderer.component.scss',\n})\nexport class CommonRendererComponent {\n params: any;\n\n private static _activeRowId = signal<number | null>(null);\n private static _activeTagId = signal<string | null>(null);\n\n // wrapper to access static signal easily\n activeRowId = CommonRendererComponent._activeRowId;\n activeTagId = CommonRendererComponent._activeTagId;\n clickTimer: any = null;\n clickDelay = 250;\n\n maxVisible: number = 2;\n data: any;\n paramsVal: any;\n tagClasses: any;\n\n cellInit(params: any, data: any) {\n this.params = params;\n this.data = data;\n this.paramsVal = this.parseColValue(params.data, params.col);\n }\n\n /**\n * @description Returns the renderer type defined in cellRendererParams.\n * @author Anand Pandey\n * @returns {string | undefined}\n */\n get type() {\n return this.params?.cellParams?.type;\n }\n\n get subType() {\n return this.params?.cellParams?.subType;\n }\n /**\n * @description Returns the renderer subtype defined in cellRendererParams.\n * @author Anand Pandey\n * @returns {string | undefined}\n */\n get actionSubType() {\n return this.params?.cellParams?.subType;\n }\n\n /**\n * @description Returns the cell value from params or fallback to row data field.\n * @author Anand Pandey\n * @returns {any}\n */\n get value() {\n return this.params?.value ?? this.params?.data?.[this.params?.field];\n }\n\n /**\n * @description Returns the list of actions configured for the action menu.\n * @author Anand Pandey\n * @returns {any[]}\n */\n get actions() {\n return this.params?.cellParams?.actions.map((action: any) => {\n return {\n ...action,\n class: action.class || '',\n };\n });\n }\n\n /**\n * @description Determines whether the current row's action menu should be open.\n * @author Anand Pandey\n * @returns {boolean}\n */\n get openActionMenu() {\n return this.activeRowId() === this.params.data.rowId;\n }\n\n /**\n * @description Emits a callback function defined in cellRendererParams.\n * @author Anand Pandey\n * @param {string} eventName\n * @param {any} data\n * @returns {void}\n */\n emit(eventName: string, data: any) {\n const handler = this.params?.cellParams?.[eventName];\n if (typeof handler === 'function') handler(data);\n }\n\n /**\n * @description Handles switch toggle and emits value change event.\n * @author Anand Pandey\n * @param {Event} event\n * @returns {void}\n */\n onToggle(event: any) {\n this.emit('onToggle', {\n params: this.params,\n row: this.params.data,\n value: event.target.checked,\n });\n }\n\n /**\n * @description Toggles the three-dots action menu for the current row.\n * @author Anand Pandey\n * @returns {void}\n */\n onThreeDotsMenuClick() {\n if (this.openActionMenu) {\n this.activeRowId.set(null);\n } else {\n this.activeRowId.set(this.params.data.rowId);\n }\n }\n\n /**\n * @description Handles click on an action option and emits selected action event.\n * @author Anand Pandey\n * @param {any} action\n * @returns {void}\n */\n onActionClick(action: any) {\n this.activeRowId.set(null);\n this.emit('onAction', {\n row: this.params.data,\n action,\n });\n }\n\n linkSingleClick() {\n if (this.clickTimer) {\n clearTimeout(this.clickTimer);\n this.clickTimer = null;\n }\n this.clickTimer = setTimeout(() => {\n this.emit('onLinkClick', {\n params: this.params,\n row: this.params.data,\n event: 'singleClick',\n });\n this.clickTimer = null;\n }, this.clickDelay);\n }\n\n linkDoubleClick() {\n if (this.clickTimer) {\n clearTimeout(this.clickTimer);\n this.clickTimer = null;\n }\n this.emit('onLinkClick', {\n params: this.params,\n row: this.params.data,\n event: 'doubleClick',\n });\n }\n\n /**\n * @description Closes the action menu when clicking outside the component.\n * @author Anand Pandey\n * @param {Event} e\n * @returns {void}\n */\n clickOutside(e: any) {\n this.activeRowId.set(null);\n }\n\n /**\n * @description Returns the complete list of tags after normalizing value input (supports array, object, string).\n * @author Anand Pandey\n * @returns {string[]}\n */\n get allTags(): any {\n return this.transformValue('tagKey', 'tagValue');\n }\n\n /**\n * @description Returns the subset of tags that should be visibly displayed in the UI based on maxVisible count.\n * @author Anand Pandey\n * @returns {string[]}\n */\n get visibleTags() {\n return this.allTags.slice(0, this.maxVisible);\n }\n\n /**\n * @description Returns the count of tags hidden behind the \"+\" more indicator.\n * @author Anand Pandey\n * @returns {number}\n */\n get hiddenCount() {\n return Math.max(0, this.allTags.length - this.maxVisible);\n }\n\n /**\n * @description Determines whether the dropdown should be open for the current row based on activeTagId.\n * @author Anand Pandey\n * @returns {boolean}\n */\n get openDropdown() {\n return (\n this.activeTagId() ===\n `${this.params.col.fieldName}-${this.params.data.rowId}`\n );\n }\n\n /**\n * @description Handles hover entry and activates dropdown if cursor enters +icon, hidden-list, dropdown or its items.\n * @author Anand Pandey\n * @param {MouseEvent} event\n * @returns {void}\n */\n toggleDropdown(event: MouseEvent) {\n const target = event.target as HTMLElement;\n if (\n target &&\n (target.closest('.hidden_list') ||\n target.closest('.tag_more') ||\n target.closest('.tag_dropdown') ||\n target.closest('.dropdown_item') ||\n this.openDropdown)\n ) {\n this.activeTagId.set(\n `${this.params.col.fieldName}-${this.params.data.rowId}`,\n );\n return;\n }\n if (this.openDropdown) {\n this.activeTagId.set(null);\n }\n }\n\n /**\n * @description Closes the dropdown only when cursor leaves the entire component area and not moving inside child elements.\n * @author Anand Pandey\n * @param {MouseEvent} event\n * @returns {void}\n */\n closeDropdown(event: MouseEvent) {\n const target = event.relatedTarget as HTMLElement;\n\n if (\n target &&\n (target.closest('.tag_wrapper') ||\n target.closest('.hidden_list') ||\n target.closest('.tag_more') ||\n target.closest('tag_dropdown') ||\n target.closest('dropdown_item'))\n ) {\n return;\n }\n this.activeTagId.set(null);\n }\n\n /**\n * @description Returns normalized link values derived from the cell `value`.\n * Uses the configured `linkKey` from `cellParams` to extract display data\n * @author Anand Pandey\n * @returns {Array<{ linkValue: string; class: string }>} Normalized link values\n */\n get linkVal(): any {\n return this.parseColValue(this.params.data, this.params.col);\n }\n\n /**\n * @description Normalizes the component `value` into a consistent array structure.\n * @author Anand Pandey\n * @param {string} key Key in `cellParams` used to determine which field to read from object values\n * @param {string} valueProp Property name assigned to the normalized output value\n * @returns {Array<{ [key: string]: string; class: string }>} Array of normalized value objects\n */\n transformValue(key: string, valueProp: any) {\n const value = this.value;\n if (!value) return [];\n\n if (Array.isArray(value)) {\n return value.map((val) => {\n if (typeof val === 'object') {\n return {\n [valueProp]: val[this.params.cellParams?.[key]],\n class: val['class'] || '',\n ...val\n\n };\n } else {\n return { [valueProp]: String(val).trim(), class: '' };\n }\n });\n } else if (!Array.isArray(value) && typeof value === 'object') {\n return [\n {\n [valueProp]: value[this.params.cellParams?.[key]],\n class: value['class'] || '',\n ...value\n },\n ];\n }\n return [{ [valueProp]: String(value).trim(), class: '' }];\n }\n\n parseColValue(row: any, col: any): any {\n if (!col?.fieldName?.includes('.')) {\n return row[col.fieldName] || 'N/A';\n } else {\n const keys = col.fieldName\n .replace(/\\[(\\d+)\\]/g, '.$1')\n .split('.')\n .filter(Boolean);\n let val = row;\n\n for (const key of keys) {\n if (Array.isArray(val)) {\n val = val.map((v) => v?.[key]).filter(Boolean);\n } else {\n val = val?.[key];\n }\n\n if (val === undefined || val === null) {\n return 'N/A';\n }\n }\n return val || 'N/A';\n }\n }\n}\n","<!-- Switch -->\n@if (type === \"switch\") {\n <div class=\"table_switch_wrapper\">\n <label class=\"switch\">\n <input type=\"checkbox\" [checked]=\"value\" (change)=\"onToggle($event)\" />\n <span class=\"slider\"></span>\n </label>\n </div>\n}\n\n<!-- Action Menu -->\n\n@if (type === \"action-menu\") {\n <div class=\"action-menu\">\n <button class=\"action_dots\" (click)=\"onThreeDotsMenuClick()\" #tagTrigger>\n <img src=\"images/more-{{ actionSubType || 'vertical' }}.svg\" />\n </button>\n\n @if (openActionMenu) {\n <div\n class=\"menu\"\n appOutsideClick\n (clickOutside)=\"clickOutside($event)\"\n adaptivePosition\n [trigger]=\"tagTrigger\"\n [isAction]=\"true\"\n [matchWidth]=\"false\"\n >\n <div class=\"item_wrapper\" id=\"table_scroll\">\n @for (act of actions; track $index) {\n <div\n class=\"{{ 'menu_item' + ' ' + act.class }}\"\n [ngClass]=\"{\n disabled_item:\n params?.data?.disabledActions?.includes(act.label) ||\n act.disabled,\n }\"\n (click)=\"onActionClick(act)\"\n >\n @if (act.icon) {\n <img src=\"images/{{ act.icon }}.svg\" />\n } @else {\n <img src=\"{{ act?.image }}\" />\n }\n\n <span class=\"ellipsis\">{{ act.label }}</span>\n </div>\n }\n </div>\n </div>\n }\n </div>\n}\n\n<!-- Tags -->\n\n@if (type === \"tag\") {\n <div\n class=\"tag_wrapper\"\n (mouseover)=\"toggleDropdown($event)\"\n (mouseout)=\"closeDropdown($event)\"\n #tagTrigger\n >\n @for (tag of visibleTags; track $index) {\n <div\n class=\"{{ 'tag_chip' + ' ' + tag.class }}\"\n [ngClass]=\"paramsVal | addClass: params.cellParams\"\n >\n @if(subType === 'badge') {\n <span class=\"circle\" [class]=\"tag.badgeClass\"></span>\n }\n @if(tag.image){\n <img src=\"{{ tag.image }}\" alt=\"\" class=\"icon\" />\n }\n \n\n <div class=\"more_data_section\">\n <!-- <span class=\"textTruncate\"> {{ tag.tagValue }}</span> -->\n <div class=\"cell-value ellipsis\">\n <div class=\"more_data_wrapper textTruncate\">\n {{ tag.tagValue }}\n </div>\n <div class=\"see_more_data\" id=\"table_scroll\">\n <div class=\"item\">\n <span class=\"desc\"> {{ tag.tagValue }}</span>\n </div>\n </div>\n </div>\n </div>\n </div>\n }\n @if (hiddenCount > 0) {\n <div class=\"hidden_list\">\n <span class=\"tag_more\">+{{ hiddenCount }}</span>\n @if (openDropdown) {\n <div\n class=\"tag_dropdown\"\n id=\"table_scroll\"\n adaptivePosition\n [trigger]=\"tagTrigger\"\n [matchWidth]=\"false\"\n >\n @for (tag of allTags; track $index) {\n <div\n class=\"{{ 'dropdown_item' + ' ' + tag.class }}\"\n >\n {{ tag.tagValue }}\n </div>\n }\n </div>\n }\n </div>\n }\n </div>\n}\n\n@if (type === \"link\") {\n <div class=\"more_data_section cell-value ellipsis\">\n <!-- @for (link of linkVal; track $index) { -->\n <div class=\"more_data_wrapper textTruncate\">\n <span\n class=\"grid-link\"\n (click)=\"linkSingleClick()\"\n (dblclick)=\"linkDoubleClick()\"\n >\n {{ linkVal }}\n </span>\n </div>\n <div class=\"see_more_data\" id=\"table_scroll\">\n <div class=\"item\">\n <span class=\"desc\"> {{ linkVal }}</span>\n </div>\n </div>\n <!-- } -->\n </div>\n}\n","import { Component, Input, ViewEncapsulation } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport type { TooltipPosition } from '../../directives/tooltip.directive';\n\n@Component({\n selector: 'app-tooltip',\n standalone: true,\n imports: [CommonModule],\n encapsulation: ViewEncapsulation.None,\n template: `\n <div\n class=\"app-tooltip-wrapper\"\n [ngClass]=\"'tooltip-' + position\"\n [style.background-color]=\"bgColor\"\n [style.color]=\"textColor\"\n [style.padding]=\"padding\"\n [style.font-size]=\"fontSize\"\n [style.border-radius]=\"borderRadius\"\n [style.max-width]=\"maxWidth\"\n >\n {{ content }}\n <div class=\"tooltip-arrow\"></div>\n </div>\n `,\n styleUrls: [\"./tooltip.component.scss\"],\n})\nexport class TooltipComponent {\n @Input() content: string = '';\n @Input() position: TooltipPosition = 'top';\n @Input() bgColor: string = '#333333';\n @Input() textColor: string = '#ffffff';\n @Input() padding: string = '8px 12px';\n @Input() fontSize: string = '12px';\n @Input() borderRadius: string = '4px';\n @Input() maxWidth: string = '300px';\n}\n\n\n\n","import {\n Directive,\n ElementRef,\n HostListener,\n Input,\n OnInit,\n OnDestroy,\n Renderer2,\n ApplicationRef,\n Injector,\n NgZone,\n} from '@angular/core';\nimport { TooltipComponent } from '../common-components/tooltip/tooltip.component';\nimport { createComponent } from '@angular/core';\n\nexport type TooltipPosition = 'top' | 'bottom' | 'left' | 'right' | 'adaptive';\n\n@Directive({\n selector: '[appTooltip]',\n standalone: true,\n})\nexport class TooltipDirective implements OnInit, OnDestroy {\n @Input('appTooltip') content: string = '';\n @Input() tooltipPosition: TooltipPosition = 'adaptive';\n @Input() tooltipDelay: number = 300; // milliseconds\n @Input() tooltipBgColor: string = '#333333';\n @Input() tooltipTextColor: string = '#ffffff';\n @Input() tooltipPadding: string = '8px 12px';\n @Input() tooltipFontSize: string = '12px';\n @Input() tooltipBorderRadius: string = '4px';\n @Input() tooltipMaxWidth: string = '300px';\n @Input() followCursor: boolean = true;\n @Input() tooltipParentContainer: HTMLElement | null = null;\n\n private tooltipElement: HTMLElement | null = null;\n private showTimeout: any;\n private elementRect: DOMRect | null = null;\n private currentPosition: TooltipPosition = 'top';\n private componentRef: any = null;\n private cursorX: number = 0;\n private cursorY: number = 0;\n private isTooltipShown: boolean = false;\n\n constructor(\n private elementRef: ElementRef<HTMLElement>,\n private renderer: Renderer2,\n private appRef: ApplicationRef,\n private injector: Injector,\n private ngZone: NgZone,\n ) {}\n\n ngOnInit(): void {\n this.renderer.addClass(this.elementRef.nativeElement, 'tooltip-trigger');\n }\n\n @HostListener('mouseenter', ['$event'])\n onMouseEnter(event: MouseEvent): void {\n if (!this.content) return;\n\n this.cursorX = event.clientX;\n this.cursorY = event.clientY;\n\n this.showTimeout = setTimeout(() => {\n this.show();\n }, this.tooltipDelay);\n }\n\n @HostListener('mouseleave')\n onMouseLeave(): void {\n clearTimeout(this.showTimeout);\n this.hide();\n }\n\n @HostListener('mousemove', ['$event'])\n onMouseMove(event: MouseEvent): void {\n if (!this.isTooltipShown || !this.followCursor) return;\n\n this.cursorX = event.clientX;\n this.cursorY = event.clientY;\n\n this.positionTooltip();\n }\n\n private show(): void {\n if (this.tooltipElement) return;\n\n this.elementRect = this.elementRef.nativeElement.getBoundingClientRect();\n\n // Use NgZone to avoid change detection issues\n this.ngZone.run(() => {\n try {\n // Create tooltip component with proper injector\n const componentRef = createComponent(TooltipComponent, {\n environmentInjector: this.appRef.injector,\n });\n\n // Configure component instance\n componentRef.instance.content = this.content;\n componentRef.instance.bgColor = this.tooltipBgColor;\n componentRef.instance.textColor = this.tooltipTextColor;\n componentRef.instance.padding = this.tooltipPadding;\n componentRef.instance.fontSize = this.tooltipFontSize;\n componentRef.instance.borderRadius = this.tooltipBorderRadius;\n componentRef.instance.maxWidth = this.tooltipMaxWidth;\n\n // Calculate adaptive position before rendering\n this.currentPosition = this.calculateAdaptivePosition();\n componentRef.instance.position = this.currentPosition;\n\n // Mark for check\n componentRef.changeDetectorRef.detectChanges();\n\n // Get the DOM element\n this.tooltipElement = componentRef.location.nativeElement.querySelector('.app-tooltip-wrapper') as HTMLElement;\n\n // If direct query didn't work, try the root element\n if (!this.tooltipElement) {\n this.tooltipElement = (componentRef.location.nativeElement as HTMLElement).children[0] as HTMLElement;\n }\n\n // If still not found, use the whole element\n if (!this.tooltipElement) {\n this.tooltipElement = componentRef.location.nativeElement as HTMLElement;\n }\n\n // Append to body to avoid layout issues\n this.renderer.appendChild(document.body, componentRef.location.nativeElement);\n\n // Position the tooltip\n this.isTooltipShown = true;\n this.positionTooltip();\n\n // Store reference for cleanup\n this.componentRef = componentRef;\n } catch (error) {\n console.warn('Tooltip directive: Error creating tooltip component', error);\n // Fallback silent fail - tooltip just won't show but app continues\n }\n });\n }\n\n private calculateAdaptivePosition(): TooltipPosition {\n if (this.tooltipPosition !== 'adaptive') {\n return this.tooltipPosition;\n }\n\n if (!this.elementRect) return 'top';\n\n // Find the parent container with overflow or positioning context\n const parentContainer = this.findParentContainer();\n const parentRect = parentContainer.getBoundingClientRect();\n\n const threshold = 120; // minimum space needed\n const gap = 10;\n\n // Calculate available space within parent container\n const spaceAbove = this.elementRect.top - parentRect.top;\n const spaceBelow = parentRect.bottom - this.elementRect.bottom;\n const spaceLeft = this.elementRect.left - parentRect.left;\n const spaceRight = parentRect.right - this.elementRect.right;\n\n // Prefer vertical positions if there's adequate space\n if (spaceBelow >= threshold) return 'bottom';\n if (spaceAbove >= threshold) return 'top';\n\n // Fall back to horizontal positions\n if (spaceRight >= threshold) return 'right';\n if (spaceLeft >= threshold) return 'left';\n\n // If no position has enough space, use the direction with most available space\n const spaces: Record<Exclude<TooltipPosition, 'adaptive'>, number> = {\n top: spaceAbove,\n bottom: spaceBelow,\n left: spaceLeft,\n right: spaceRight,\n };\n\n const bestPosition = (\n Object.keys(spaces) as Array<Exclude<TooltipPosition, 'adaptive'>>\n ).reduce((prev, curr) => (spaces[curr] > spaces[prev] ? curr : prev));\n\n return bestPosition;\n }\n\n private findParentContainer(): HTMLElement {\n // If a parent container is explicitly provided, use it\n if (this.tooltipParentContainer) {\n return this.tooltipParentContainer;\n }\n\n let element = this.elementRef.nativeElement.parentElement;\n\n // Traverse up the DOM to find a scrollable or positioned container\n while (element) {\n const style = window.getComputedStyle(element);\n const isScrollable =\n element.scrollHeight > element.clientHeight ||\n element.scrollWidth > element.clientWidth;\n const isPositioned =\n style.position === 'absolute' ||\n style.position === 'relative' ||\n style.position === 'fixed';\n\n if (isScrollable || isPositioned) {\n return element;\n }\n\n element = element.parentElement;\n }\n\n // If no container found, use the document body\n return document.body;\n }\n\n private positionTooltip(): void {\n if (!this.tooltipElement) return;\n\n // Use requestAnimationFrame to ensure DOM is ready\n requestAnimationFrame(() => {\n if (!this.tooltipElement) return;\n\n const tooltipRect = this.tooltipElement.getBoundingClientRect();\n\n // If tooltip isn't rendered yet, retry\n if (tooltipRect.width === 0 || tooltipRect.height === 0) {\n requestAnimationFrame(() => this.positionTooltip());\n return;\n }\n\n const gap = 10;\n const offset = 15; // Offset from cursor\n let top = 0;\n let left = 0;\n let finalPosition = this.currentPosition;\n\n if (this.followCursor) {\n // Position tooltip relative to cursor\n const preferredPosition = this.currentPosition;\n\n switch (preferredPosition) {\n case 'top':\n top = this.cursorY - tooltipRect.height - gap;\n left = this.cursorX - tooltipRect.width / 2;\n break;\n case 'bottom':\n top = this.cursorY + offset;\n left = this.cursorX - tooltipRect.width / 2;\n break;\n case 'left':\n top = this.cursorY - tooltipRect.height / 2;\n left = this.cursorX - tooltipRect.width - gap;\n break;\n case 'right':\n top = this.cursorY - tooltipRect.height / 2;\n left = this.cursorX + offset;\n break;\n }\n } else if (this.elementRect) {\n // Position tooltip relative to element\n switch (this.currentPosition) {\n case 'top':\n top = this.elementRect.top - tooltipRect.height - gap;\n left = this.elementRect.left + this.elementRect.width / 2 - tooltipRect.width / 2;\n break;\n case 'bottom':\n top = this.elementRect.bottom + gap;\n left = this.elementRect.left + this.elementRect.width / 2 - tooltipRect.width / 2;\n break;\n case 'left':\n top = this.elementRect.top + this.elementRect.height / 2 - tooltipRect.height / 2;\n left = this.elementRect.left - tooltipRect.width - gap;\n break;\n case 'right':\n top = this.elementRect.top + this.elementRect.height / 2 - tooltipRect.height / 2;\n left = this.elementRect.right + gap;\n break;\n }\n }\n\n // Adjust for parent container and viewport boundaries\n const parentContainer = this.findParentContainer();\n const parentRect = parentContainer.getBoundingClientRect();\n const windowHeight = window.innerHeight;\n const windowWidth = window.innerWidth;\n const padding = 5;\n let arrowPos = 'center';\n\n // Use parent container bounds if available, otherwise use window bounds\n const containerTop = Math.max(parentRect.top, 0);\n const containerBottom = Math.min(parentRect.bottom, windowHeight);\n const containerLeft = Math.max(parentRect.left, 0);\n const containerRight = Math.min(parentRect.right, windowWidth);\n\n // Check vertical boundaries within container and adjust position if needed\n if (top < containerTop + padding) {\n top = containerTop + padding;\n if (this.currentPosition === 'top') {\n finalPosition = 'bottom';\n if (this.followCursor) {\n top = this.cursorY + offset;\n } else if (this.elementRect) {\n top = this.elementRect.bottom + gap;\n }\n }\n arrowPos = 'top-adjust';\n } else if (top + tooltipRect.height > containerBottom - padding) {\n top = containerBottom - tooltipRect.height - padding;\n if (this.currentPosition === 'bottom') {\n finalPosition = 'top';\n if (this.followCursor) {\n top = this.cursorY - tooltipRect.height - gap;\n } else if (this.elementRect) {\n top = this.elementRect.top - tooltipRect.height - gap;\n }\n }\n arrowPos = 'bottom-adjust';\n }\n\n // Check horizontal boundaries within container and adjust position if needed\n if (left < containerLeft + padding) {\n left = containerLeft + padding;\n if (this.currentPosition === 'left') {\n finalPosition = 'right';\n if (this.followCursor) {\n left = this.cursorX + offset;\n } else if (this.elementRect) {\n left = this.elementRect.right + gap;\n }\n }\n arrowPos = 'left-adjust';\n } else if (left + tooltipRect.width > containerRight - padding) {\n left = containerRight - tooltipRect.width - padding;\n if (this.currentPosition === 'right') {\n finalPosition = 'left';\n if (this.followCursor) {\n left = this.cursorX - tooltipRect.width - gap;\n } else if (this.elementRect) {\n left = this.elementRect.left - tooltipRect.width - gap;\n }\n }\n arrowPos = 'right-adjust';\n }\n\n // Update position class if it changed\n if (finalPosition !== this.currentPosition) {\n this.currentPosition = finalPosition;\n this.tooltipElement!.className = `app-tooltip-wrapper tooltip-${finalPosition}`;\n }\n\n // Store arrow adjustment info for CSS styling\n this.renderer.setAttribute(this.tooltipElement, 'data-arrow-pos', arrowPos);\n this.renderer.setStyle(this.tooltipElement, 'position', 'fixed');\n this.renderer.setStyle(this.tooltipElement, 'top', `${Math.round(top)}px`);\n this.renderer.setStyle(this.tooltipElement, 'left', `${Math.round(left)}px`);\n });\n }\n\n private hide(): void {\n this.isTooltipShown = false;\n if (this.tooltipElement && this.tooltipElement.parentNode) {\n this.renderer.removeChild(this.tooltipElement.parentNode, this.tooltipElement);\n this.tooltipElement = null;\n }\n if (this.componentRef) {\n this.componentRef.destroy();\n this.appRef.detachView(this.componentRef.hostView);\n this.componentRef = null;\n }\n }\n\n ngOnDestroy(): void {\n clearTimeout(this.showTimeout);\n this.hide();\n }\n}\n\n","import { CommonModule } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectorRef,\n Component,\n DoCheck,\n ElementRef,\n EventEmitter,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n Output,\n Renderer2,\n SimpleChanges,\n ViewChild,\n} from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { AdaptivePositionDirective } from '../../directives/adaptive-position.directive';\nimport { OutsideClickDirective } from '../../directives/outside-click.directive';\nimport { RendererParserDirective } from '../../directives/renderer-parser.directive';\nimport { TooltipDirective } from '../../directives/tooltip.directive';\n\nexport interface CatsTreeTableColumn {\n fieldName: string;\n header?: string;\n width?: number;\n minWidth?: number;\n maxWidth?: number;\n class?: string;\n colId?: string;\n sortable?: boolean;\n filterable?: boolean;\n filterType?: 'text' | 'number' | 'date' | 'set';\n leftPinned?: boolean;\n rightPinned?: boolean;\n leftOffset?: number;\n rightOffset?: number;\n active?: boolean;\n filters?: TreeFilterCondition[];\n options?: any[];\n filteredOptions?: any[];\n selectedValues?: Set<any>;\n cellRenderer?: any;\n cellRendererParams?: any;\n filterLogic?: 'AND' | 'OR';\n headerLocked?: boolean;\n}\n\nexport interface TreeFilterCondition {\n filterOperation: string;\n filterValue: any;\n}\n\nexport interface CatsTreeRowOptions {\n showCheckbox?: boolean;\n showToggle?: boolean;\n showNodeIcon?: boolean;\n showLink?: boolean;\n disabled?: boolean;\n}\n\nexport interface CatsTreeExpandEvent<T = any> {\n node: T;\n level: number;\n path: T[];\n expanded: boolean;\n}\n\nexport interface CatsTreeSelectionChangeEvent<T = any> {\n node: T;\n level: number;\n path: T[];\n checked: boolean;\n selectedNodes: T[];\n}\n\nexport interface CatsTreeLinkClickEvent<T = any> {\n node: T;\n level: number;\n path: T[];\n url: string | null;\n col: CatsTreeTableColumn;\n}\n\ntype RowKind = 'node' | 'loading' | 'no-data';\n\ninterface RowView<T = any> {\n kind: RowKind;\n level: number;\n path: T[];\n node: T;\n trackKey: string | number;\n}\n\n@Component({\n selector: 'cats-tree-table',\n imports: [CommonModule, FormsModule, OutsideClickDirective, AdaptivePositionDirective, RendererParserDirective, TooltipDirective],\n templateUrl: './common-tree-table.component.html',\n styleUrls: ['./common-tree-table.component.scss'],\n})\nexport class CommonTreeTableComponent<T = any>\n implements OnChanges, DoCheck, AfterViewInit, OnDestroy {\n @ViewChild('table', { static: true }) tableAreaRef!: ElementRef<HTMLElement>;\n @ViewChild('pinMenu') pinMenu?: ElementRef<HTMLElement>;\n @Input() data: T[] = [];\n @Input() columns: CatsTreeTableColumn[] = [{ fieldName: 'name', header: 'Name' }];\n @Input() tableOptions: any = {};\n\n @Input() idField: string = 'id';\n @Input() labelField: string = 'name';\n @Input() childrenField: string = 'array';\n @Input() treeColumnField?: string;\n\n @Input() indentPx: number = 24;\n @Input() showHeader: boolean = true;\n\n @Input() expandIcon: string = 'chevron-right.svg';\n @Input() collapseIcon: string = 'chevron-down.svg';\n @Input() iconBasePath: string = 'images';\n\n @Input() showCheckbox: boolean = false;\n @Input() showNodeIcon: boolean = true;\n @Input() noDataText: string = 'No data found';\n @Input() loadingText: string = 'Loading...';\n\n @Input() emitExpandAlways: boolean = true;\n\n // New sorting, filtering, and customization inputs\n @Input() sortingRequired: boolean = true;\n @Input() filterRequired: boolean = false;\n @Input() threeDotsMenuRequired: boolean = true;\n @Input() settingsRequired: boolean = true;\n @Input() settingsClicked: boolean = false;\n @Input() checkBoxSelection: boolean = false;\n @Input() checkboxSelectionType: 'multiple' | 'single' = 'multiple';\n\n @Input() paginationRequired: boolean = true;\n @Input() pageSizeList: number[] = [20, 50, 75, 100];\n @Input() totalRecords: number = 0;\n @Input() resetPage: boolean = true;\n\n @Input() isExpandable: (node: T, level: number, path: T[]) => boolean = (\n node,\n ) => {\n const children = (node as any)?.[this.childrenField];\n return Array.isArray(children) ? children.length > 0 : false;\n };\n\n @Input() rowOptionsResolver: (node: T, level: number, path: T[]) => CatsTreeRowOptions =\n () => ({});\n\n @Input() nodeIconResolver: (node: T, level: number, path: T[], expanded: boolean) => string | null =\n () => null;\n\n @Input() linkResolver: (node: T, level: number, path: T[]) => string | null =\n () => null;\n\n @Output() nodeToggle = new EventEmitter<CatsTreeExpandEvent<T>>();\n @Output() selectionChange = new EventEmitter<CatsTreeSelectionChangeEvent<T>>();\n @Output() linkClick = new EventEmitter<CatsTreeLinkClickEvent<T>>();\n @Output() linkDoubleClick = new EventEmitter<CatsTreeLinkClickEvent<T>>();\n @Output() onHideSettings = new EventEmitter();\n @Output() onPaginationChange = new EventEmitter();\n\n protected rows: RowView<T>[] = [];\n private linkClickTimer: any = null;\n private linkClickDelay = 250;\n\n // Pagination properties\n pageDetails: any = {\n pageSize: 20,\n totalPages: 1,\n currentPage: 1,\n };\n recordsToShow: any = {\n min: 0,\n max: 20,\n };\n\n // Sorting, filtering, and column management properties\n sortingColumnIndex: number | null = null;\n sortingType: { [key: number]: string } = {};\n filteredData: T[] = [];\n originalRowData: T[] = [];\n activeFilters: Map<string, any> = new Map();\n appliedFilters: any[] = [];\n menuVisible: boolean[] = [];\n dragOverIndex: number | null = null;\n draggedIndex: number | null = null;\n activeFilterIndex: number | null = null;\n resizingColumnIndex: number | null = null;\n startX: number = 0;\n startWidth: number = 0;\n isResizing: boolean = false;\n showMoveIcon: { [key: number]: boolean } = {};\n showPin = false;\n pinActionClicked: Record<string, string> = {};\n columnDraggable: boolean[] = [];\n showPageSizeList: boolean = false;\n activeAll: boolean = true;\n atLeastOneColumnChecked: boolean = true;\n selectedRow: T[] = [];\n originalColumns: CatsTreeTableColumn[] = [];\n\n private removeMouseMove: (() => void) | null = null;\n private removeMouseUp: (() => void) | null = null;\n private rafId: number | null = null;\n private removeDragOver: (() => void) | null = null;\n private removeDrop: (() => void) | null = null;\n\n filterOptions = [\n { label: 'Contains', value: 'contains' },\n { label: 'Does Not Contain', value: 'doesNotContain' },\n { label: 'Equals', value: 'equals' },\n { label: 'Does Not Equal', value: 'doesNotEqual' },\n { label: 'Starts With', value: 'startsWith' },\n { label: 'Ends With', value: 'endsWith' },\n ];\n\n numberFilterOptions = [\n { label: 'Equals', value: '=' },\n { label: 'Greater Than', value: '>' },\n { label: 'Less Than', value: '<' },\n { label: 'Greater Than or Equal', value: '>=' },\n { label: 'Less Than or Equal', value: '<=' },\n ];\n\n private expandedKeys = new Set<string | number>();\n private selectedKeys = new Set<string | number>();\n private fallbackKey = new WeakMap<object, number>();\n private fallbackSeq = 1;\n private resolvedTreeColumnField?: string;\n\n constructor(\n private renderer: Renderer2,\n private zone: NgZone,\n private cd: ChangeDetectorRef,\n ) { }\n\n ngAfterViewInit(): void {\n const el = this.tableAreaRef?.nativeElement;\n if (!el) return;\n\n this.zone.runOutsideAngular(() => {\n this.removeDragOver = this.renderer.listen(el, 'dragover', (event: DragEvent) => {\n if (this.isResizing) return;\n event.preventDefault();\n\n const th = (event.target as HTMLElement | null)?.closest?.('th') as HTMLElement | null;\n const rawIdx = th?.dataset?.['colIdx'];\n if (!rawIdx) return;\n\n const idx = Number.parseInt(rawIdx, 10);\n if (Number.isNaN(idx)) return;\n if (this.dragOverIndex === idx) return;\n\n this.zone.run(() => {\n this.dragOverIndex = idx;\n });\n });\n\n this.removeDrop = this.renderer.listen(el, 'drop', (event: DragEvent) => {\n event.preventDefault();\n\n const th = (event.target as HTMLElement | null)?.closest?.('th') as HTMLElement | null;\n const rawIdx = th?.dataset?.['colIdx'];\n if (!rawIdx) return;\n\n const idx = Number.parseInt(rawIdx, 10);\n if (Number.isNaN(idx)) return;\n\n this.zone.run(() => {\n this.onDrop(event, idx);\n });\n });\n });\n }\n\n ngOnDestroy(): void {\n this.removeDragOver?.();\n this.removeDrop?.();\n this.removeMouseMove?.();\n this.removeMouseUp?.();\n if (this.rafId) cancelAnimationFrame(this.rafId);\n this.renderer.removeStyle(document.body, 'cursor');\n this.renderer.removeStyle(document.body, 'user-select');\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['data'] || changes['columns']) {\n this.initializeColumns();\n this.originalRowData = structuredClone(this.data || []);\n this.rebuildRows();\n }\n if (changes['totalRecords']?.currentValue && this.resetPage) {\n this.resetPagination();\n } else {\n this.setPageCount();\n }\n }\n\n ngDoCheck(): void {\n this.rebuildRows();\n }\n\n protected get treeColumn(): CatsTreeTableColumn {\n const preferredField = this.treeColumnField ?? this.resolvedTreeColumnField;\n if (preferredField) {\n const found = this.columns?.find((c) => c.fieldName === preferredField);\n if (found) return found;\n }\n return this.columns?.[0] ?? { fieldName: this.labelField, header: 'Name' };\n }\n\n /**\n * Initialize column properties for filtering, sorting, and customization\n */\n private initializeColumns(): void {\n this.columns = this.columns.map((col, index) => {\n if (!col.colId) col.colId = col.fieldName;\n if (col.sortable === undefined) col.sortable = true;\n if (col.filterable === undefined) col.filterable = false;\n if (col.filterType === undefined) col.filterType = 'text';\n if (col.active === undefined) col.active = true;\n if (col.width === undefined) col.width = 150;\n if (col.minWidth === undefined) col.minWidth = 50;\n if (!col.filters) {\n col.filters = [\n { filterOperation: 'contains', filterValue: '' },\n { filterOperation: 'contains', filterValue: '' },\n ];\n }\n if (!col.selectedValues) col.selectedValues = new Set();\n if (!col.options && col.filterType === 'set') {\n col.options = this.extractUniqueValues(this.data || [], col.fieldName);\n col.filteredOptions = [...(col.options || [])];\n }\n if (!this.menuVisible[index]) this.menuVisible[index] = false;\n\n const key = col.colId || col.fieldName;\n if (this.pinActionClicked[key] == null) {\n this.pinActionClicked[key] = col.leftPinned\n ? 'left'\n : col.rightPinned\n ? 'right'\n : 'none';\n }\n return col;\n });\n\n // If the consumer didn't specify a tree column, keep the initial first column as the tree UI column\n // even when columns are later reordered (pin/drag).\n if (!this.treeColumnField) {\n const firstField = this.columns?.[0]?.fieldName;\n if (\n firstField &&\n (this.resolvedTreeColumnField == null ||\n !this.columns.some((c) => c.fieldName === this.resolvedTreeColumnField))\n ) {\n this.resolvedTreeColumnField = firstField;\n }\n }\n\n this.saveColumnState();\n }\n\n /**\n * Extract unique values from data for set filter\n */\n private extractUniqueValues(data: T[], fieldName: string): any[] {\n const values = new Set<any>();\n const visit = (nodes: T[]) => {\n for (const node of nodes) {\n values.add(this.getValue(node, fieldName));\n const children = this.getChildren(node);\n if (Array.isArray(children)) visit(children);\n }\n };\n visit(data);\n return Array.from(values);\n }\n\n /**\n * Sort data based on column and sorting type\n */\n protected onSortingRowData(sortingColumnIndex: number, col: CatsTreeTableColumn): void {\n if (!col.sortable) return;\n\n this.sortingColumnIndex = sortingColumnIndex;\n Object.keys(this.sortingType).forEach((k) => {\n if (Number(k) !== sortingColumnIndex) delete this.sortingType[Number(k)];\n });\n\n if (!this.sortingType[sortingColumnIndex]) {\n this.sortingType[sortingColumnIndex] = 'asc';\n } else if (this.sortingType[sortingColumnIndex] === 'asc') {\n this.sortingType[sortingColumnIndex] = 'dsc';\n } else {\n this.sortingType[sortingColumnIndex] = '';\n delete this.sortingType[sortingColumnIndex];\n }\n\n this.applySort();\n this.rebuildRows();\n }\n\n /**\n * Sort from the three-dots menu with an explicit direction (matches `cats-data-grid` UX).\n */\n protected onSort(col: CatsTreeTableColumn, type: string, sortingColumIndex: number): void {\n if (!col.sortable) return;\n\n this.sortingType[sortingColumIndex] = type;\n this.sortingColumnIndex = type ? sortingColumIndex : null;\n\n Object.keys(this.sortingType).forEach((k) => {\n if (k !== String(sortingColumIndex)) this.sortingType[Number(k)] = '';\n });\n\n if (type === 'asc' || type === 'dsc') {\n this.applySort();\n } else {\n this.data = structuredClone(this.originalRowData || []);\n }\n\n this.rebuildRows();\n this.onClickOutside();\n }\n\n /**\n * Apply sorting to the row data\n */\n private applySort(): void {\n if (this.sortingColumnIndex === null) return;\n\n const col = this.columns[this.sortingColumnIndex];\n const sortType = this.sortingType[this.sortingColumnIndex];\n\n if (!sortType) return;\n\n const sortFn = (a: T, b: T) => {\n const aVal = this.getValue(a, col.fieldName);\n const bVal = this.getValue(b, col.fieldName);\n\n if (aVal === bVal) return 0;\n if (aVal === null || aVal === undefined) return 1;\n if (bVal === null || bVal === undefined) return -1;\n\n if (sortType === 'asc') {\n return aVal > bVal ? 1 : -1;\n } else {\n return aVal < bVal ? 1 : -1;\n }\n };\n\n const visit = (nodes: T[]) => {\n nodes.sort(sortFn);\n for (const node of nodes) {\n const children = this.getChildren(node);\n if (Array.isArray(children)) visit(children);\n }\n };\n\n visit(this.data || []);\n }\n\n /**\n * Apply all active filters\n */\n applyAllFilters(): void {\n let result: T[] = structuredClone(this.originalRowData);\n\n this.columns.forEach((col) => {\n if (!col.filters || col.filterType === 'set') return;\n\n const hasFirstValue = col.filters[0]?.filterValue;\n if (!hasFirstValue) return;\n\n result = result.filter((row) => {\n const fieldValue = String(this.getValue(row, col.fieldName)).toLowerCase();\n const filterOp = col.filters?.[0]?.filterOperation;\n const filterVal = String(col.filters?.[0]?.filterValue).toLowerCase();\n\n if (!this.evaluateTextFilterCondition(filterOp || '', fieldValue, filterVal)) {\n return false;\n }\n\n if (col.filters?.[1]?.filterValue) {\n const secondOp = col.filters[1].filterOperation;\n const secondVal = String(col.filters[1].filterValue).toLowerCase();\n return this.evaluateTextFilterCondition(secondOp || '', fieldValue, secondVal);\n }\n\n return true;\n });\n });\n\n this.filteredData = result;\n this.data = this.filteredData;\n this.rebuildRows();\n }\n\n /**\n * Evaluate text filter condition\n */\n private evaluateTextFilterCondition(type: string, fieldValue: string, value: string): boolean {\n switch (type) {\n case 'contains':\n return fieldValue.includes(value);\n case 'doesNotContain':\n return !fieldValue.includes(value);\n case 'equals':\n return fieldValue === value;\n case 'doesNotEqual':\n return fieldValue !== value;\n case 'startsWith':\n return fieldValue.startsWith(value);\n case 'endsWith':\n return fieldValue.endsWith(value);\n default:\n return true;\n }\n }\n\n /**\n * Toggle column filter visibility\n */\n protected toggleFilter(col: CatsTreeTableColumn, index: number, event: MouseEvent): void {\n event.stopPropagation();\n this.activeFilterIndex = this.activeFilterIndex === index ? null : index;\n }\n\n /**\n * Reset filter for a column\n */\n protected resetFilter(col: CatsTreeTableColumn): void {\n if (col.filters) {\n col.filters.forEach((f) => (f.filterValue = ''));\n }\n if (col.selectedValues) col.selectedValues.clear();\n this.activeFilters.delete(col.fieldName);\n this.applyAllFilters();\n }\n\n /**\n * Start column resize\n */\n protected startResize(event: MouseEvent, index: number): void {\n event.preventDefault();\n event.stopPropagation();\n\n this.isResizing = true;\n this.resizingColumnIndex = index;\n this.startX = event.clientX;\n this.startWidth = this.columns[index].width ?? 150;\n\n this.zone.runOutsideAngular(() => {\n this.renderer.setStyle(document.body, 'cursor', 'col-resize');\n this.renderer.setStyle(document.body, 'user-select', 'none');\n this.removeMouseMove = this.renderer.listen('document', 'mousemove', this.onMouseMove);\n this.removeMouseUp = this.renderer.listen('document', 'mouseup', this.stopResize);\n });\n }\n\n /**\n * Handle mouse move during resize\n */\n private onMouseMove = (event: MouseEvent): void => {\n if (this.resizingColumnIndex === null || this.rafId) return;\n\n this.rafId = requestAnimationFrame(() => {\n const movement = event.clientX - this.startX;\n const newWidth = this.startWidth + movement;\n const minWidth = this.columns[this.resizingColumnIndex!]?.minWidth ?? 50;\n\n if (newWidth > minWidth) {\n this.zone.run(() => {\n this.columns[this.resizingColumnIndex!].width = newWidth;\n // recalc pinned offsets in case a pinned column changed width\n this.updatePinnedOffsets();\n this.cd.markForCheck();\n });\n }\n\n this.rafId = null;\n });\n };\n\n /**\n * Stop column resize\n */\n private stopResize = (): void => {\n this.isResizing = false;\n this.resizingColumnIndex = null;\n this.removeMouseMove?.();\n this.removeMouseUp?.();\n this.renderer.removeStyle(document.body, 'cursor');\n this.renderer.removeStyle(document.body, 'user-select');\n if (this.rafId) {\n cancelAnimationFrame(this.rafId);\n this.rafId = null;\n }\n };\n\n /**\n * Handle column drag start\n */\n protected onDragStart(event: DragEvent, index: number): void {\n if (this.isResizing) return;\n this.draggedIndex = index;\n event.dataTransfer?.setData('text/plain', index.toString());\n }\n\n /**\n * Handle column drag over\n */\n protected onDragOver(event: DragEvent, index: number): void {\n event.preventDefault();\n this.isResizing = false;\n if (this.dragOverIndex !== index) this.dragOverIndex = index;\n }\n\n /**\n * Handle column drop\n */\n protected onDrop(event: DragEvent, index: number): void {\n event.preventDefault();\n if (this.draggedIndex === null) return;\n const draggedItem = this.columns[this.draggedIndex];\n this.columns.splice(this.draggedIndex, 1);\n this.columns.splice(index, 0, draggedItem);\n this.draggedIndex = null;\n this.dragOverIndex = null;\n this.updatePinnedOffsets();\n }\n\n /**\n * Handle drag end\n */\n protected onDragEnd(): void {\n this.draggedIndex = null;\n this.dragOverIndex = null;\n }\n\n /**\n * Pin column to left or right\n */\n protected pinColumn(col: CatsTreeTableColumn, index: number, direction: string): void {\n const key = col.colId || col.fieldName;\n this.pinActionClicked[key] = direction;\n\n col.leftPinned = direction === 'left';\n col.rightPinned = direction === 'right';\n\n // Reorder columns to mirror `cats-data-grid` behavior.\n const currentIndex = this.columns.findIndex((c) => (c.colId || c.fieldName) === key);\n if (currentIndex >= 0) {\n this.columns.splice(currentIndex, 1);\n } else if (index >= 0 && index < this.columns.length) {\n this.columns.splice(index, 1);\n }\n\n if (direction === 'left') {\n this.columns = [col, ...this.columns];\n } else if (direction === 'right') {\n this.columns = [...this.columns, col];\n } else {\n const leftPinned = this.columns.filter((c) => c.leftPinned);\n const rightPinned = this.columns.filter((c) => c.rightPinned);\n const middle = this.columns.filter((c) => !c.leftPinned && !c.rightPinned);\n\n const byKey = new Map<string, CatsTreeTableColumn>();\n for (const c of middle) byKey.set(c.colId || c.fieldName, c);\n byKey.set(key, col);\n\n const originalKeys = (this.originalColumns || []).map((c) => c.colId || c.fieldName);\n const orderedMiddle: CatsTreeTableColumn[] = [];\n for (const k of originalKeys) {\n const match = byKey.get(k);\n if (match) orderedMiddle.push(match);\n }\n for (const [k, v] of byKey.entries()) {\n if (!originalKeys.includes(k)) orderedMiddle.push(v);\n }\n\n this.columns = [...leftPinned, ...orderedMiddle, ...rightPinned];\n }\n\n this.updatePinnedOffsets();\n this.showPin = false;\n this.onClickOutside();\n }\n\n protected showPinActions(event: MouseEvent): void {\n event.stopPropagation();\n const parentEl = event.currentTarget as HTMLElement | null;\n this.showPin = true;\n\n // Flip the submenu to open left if it would overflow the viewport.\n setTimeout(() => {\n const menuEl = this.pinMenu?.nativeElement;\n if (!menuEl || !parentEl) return;\n\n const parentRect = parentEl.getBoundingClientRect();\n const menuWidth = menuEl.offsetWidth;\n const viewPortWidth = window.innerWidth;\n const x = parentRect.right;\n\n if (x + menuWidth > viewPortWidth) {\n menuEl.style.right = `${parentRect.width}px`;\n } else {\n menuEl.style.right = '';\n }\n });\n }\n\n protected hidePinActions(): void {\n this.showPin = false;\n }\n\n /**\n * Update pinned column offsets\n */\n protected updatePinnedOffsets(): void {\n let leftOffset = 0;\n let rightOffset = 0;\n\n this.columns.forEach((col) => {\n if (col.leftPinned) {\n col.leftOffset = leftOffset;\n leftOffset += col.width ?? 150;\n } else {\n col.leftOffset = undefined;\n }\n });\n\n [...this.columns].reverse().forEach((col) => {\n if (col.rightPinned) {\n col.rightOffset = rightOffset;\n rightOffset += col.width ?? 150;\n } else {\n col.rightOffset = undefined;\n }\n });\n }\n\n /**\n * Filter set options based on search text\n */\n protected filterSetOptions(col: CatsTreeTableColumn, event: any): void {\n const text = event.target.value.toLowerCase();\n col.filteredOptions = col.options?.filter((option: any) =>\n String(option).toLowerCase().includes(text),\n ) || [];\n }\n\n /**\n * Toggle set filter option\n */\n protected toggleSetOption(col: CatsTreeTableColumn, option: any, event: any): void {\n if ((event.target as HTMLInputElement).checked) {\n col.selectedValues?.add(option);\n } else {\n col.selectedValues?.delete(option);\n }\n this.applyAllFilters();\n }\n\n /**\n * Toggle select all in set filter\n */\n protected toggleSelectAllSetFilter(col: CatsTreeTableColumn, event: any): void {\n col.selectedValues?.clear();\n if ((event.target as HTMLInputElement).checked) {\n col.options?.forEach((o: any) => col.selectedValues?.add(o));\n }\n this.applyAllFilters();\n }\n\n /**\n * Get column style\n */\n protected getStyle(col: CatsTreeTableColumn): any {\n const style: any = {\n width: `${col.width ?? 200}px`,\n minWidth: `${col.minWidth ?? 50}px`,\n };\n if (col.leftPinned) {\n style.position = 'sticky';\n style.left = `${col.leftOffset ?? 0}px`;\n style.zIndex = 1;\n } else if (col.rightPinned) {\n style.position = 'sticky';\n style.right = `${col.rightOffset ?? 0}px`;\n style.zIndex = 1;\n }\n return style;\n }\n\n /**\n * Toggle column visibility\n */\n protected changeActiveColSelection(event: Event, col: CatsTreeTableColumn): void {\n // Prevent deselection of locked headers\n if (col.headerLocked) {\n col.active = true;\n return;\n }\n col.active = (event.target as HTMLInputElement).checked;\n this.atLeastOneColumnChecked = this.columns.some((dt) => dt.active);\n // Update activeAll state\n this.activeAll = this.columns.every((dt) => dt.active);\n // this.saveColumnState();\n }\n\n /**\n * Compute minimum table width based on active column widths\n */\n protected getTableMinWidth(): number {\n return this.columns\n .filter((c) => c.active)\n .reduce((sum, c) => sum + (c.width ?? 150), 0);\n }\n\n /**\n * Select/deselect all columns\n */\n protected activeAllSelection(event: Event): void {\n const checked = (event.target as HTMLInputElement).checked;\n this.columns.forEach((col) => {\n if (col.headerLocked) {\n col.active = true;\n } else {\n col.active = checked;\n }\n });\n this.activeAll = this.columns.every((dt) => dt.active);\n this.atLeastOneColumnChecked = this.columns.some((dt) => dt.active);\n // this.saveColumnState();\n }\n\n /**\n * Hide settings\n */\n protected hideSettings(): void {\n this.onHideSettings.emit();\n }\n\n /**\n * Close all menus\n */\n protected onClickOutside(): void {\n this.activeFilterIndex = null;\n this.showPin = false;\n this.showPageSizeList = false;\n this.menuVisible = this.menuVisible.map(() => false);\n }\n\n /**\n * Open column menu\n */\n protected openMenu(event: MouseEvent, col: CatsTreeTableColumn, index: number): void {\n event.stopPropagation();\n this.activeFilterIndex = null;\n this.showPin = false;\n this.menuVisible = this.menuVisible.map(() => false);\n this.menuVisible[index] = true;\n }\n\n /**\n * Recursively select all children of a node\n */\n private selectAllChildren(node: T): void {\n const key = this.getNodeKey(node);\n this.selectedKeys.add(key);\n\n const children = this.getChildren(node);\n if (Array.isArray(children)) {\n for (const child of children) {\n this.selectAllChildren(child);\n }\n }\n }\n\n /**\n * Recursively deselect all children of a node\n */\n private deselectAllChildren(node: T): void {\n const key = this.getNodeKey(node);\n this.selectedKeys.delete(key);\n\n const children = this.getChildren(node);\n if (Array.isArray(children)) {\n for (const child of children) {\n this.deselectAllChildren(child);\n }\n }\n }\n\n /**\n * Recursively select all nodes in the tree\n */\n private selectAllNodes(nodes: T[]): void {\n for (const node of nodes) {\n this.selectAllChildren(node);\n }\n }\n\n /**\n * Recursively deselect all nodes in the tree\n */\n private deselectAllNodes(nodes: T[]): void {\n for (const node of nodes) {\n this.deselectAllChildren(node);\n }\n }\n\n // /**\n // * Check if all children of a node are selected\n // */\n // private areAllChildrenSelected(node: T): boolean {\n // const children = this.getChildren(node);\n // if (!Array.isArray(children) || children.length === 0) {\n // return true;\n // }\n\n // for (const child of children) {\n // const childKey = this.getNodeKey(child);\n // if (!this.selectedKeys.has(childKey)) {\n // return false;\n // }\n // }\n // return true;\n // }\n\n // /**\n // * Check if any children of a node are selected\n // */\n // private areAnyChildrenSelected(node: T): boolean {\n // const children = this.getChildren(node);\n // if (!Array.isArray(children) || children.length === 0) {\n // return false;\n // }\n\n // for (const child of children) {\n // const childKey = this.getNodeKey(child);\n // if (this.selectedKeys.has(childKey)) {\n // return true;\n // }\n // }\n // return false;\n // }\n\n /**\n * Update parent node selection based on children state\n */\n private updateParentSelection(parentPath: T[]): void {\n // Update parents bottom-up\n for (let i = parentPath.length - 1; i >= 0; i--) {\n const parent = parentPath[i];\n const children = this.getChildren(parent);\n\n if (!Array.isArray(children) || children.length === 0) {\n continue;\n }\n\n // Check if all children are selected\n const allSelected = children.every((child) => this.selectedKeys.has(this.getNodeKey(child)));\n const parentKey = this.getNodeKey(parent);\n\n if (allSelected) {\n // Auto-select parent if all children are selected\n this.selectedKeys.add(parentKey);\n }\n // Note: We don't auto-deselect parent when children are deselected\n // This allows manual parent selection independent of children\n }\n }\n\n /**\n * On header checkbox change - select all nodes hierarchically\n */\n protected onHeaderCheckboxChange(event: any): void {\n if (event.target.checked) {\n this.selectAllNodes(this.data || []);\n } else {\n this.deselectAllNodes(this.data || []);\n }\n this.cd.markForCheck();\n }\n\n /**\n * On row checkbox change\n */\n protected onRowCheckboxChange(event: any, node: T): void {\n if (event.target.checked) {\n if (!this.selectedRow.includes(node)) {\n this.selectedRow.push(node);\n }\n } else {\n this.selectedRow = this.selectedRow.filter((r) => r !== node);\n }\n }\n\n /**\n * Check if all rows are selected\n */\n protected checkAllSelected(): boolean {\n return this.selectedRow.length === this.data.length && this.data.length > 0;\n }\n\n /**\n * Check if some rows are selected (indeterminate state)\n */\n protected checkIndeterminate(): boolean {\n return this.selectedRow.length > 0 && this.selectedRow.length < this.data.length;\n }\n\n /**\n * Check if row is selected\n */\n protected isRowSelected(node: T): boolean {\n return this.selectedRow.includes(node);\n }\n\n /**\n * Check if a node has indeterminate selection state (some but not all children selected)\n */\n protected isNodeIndeterminate(node: T): boolean {\n const children = this.getChildren(node);\n if (!Array.isArray(children) || children.length === 0) {\n return false;\n }\n\n let selectedCount = 0;\n for (const child of children) {\n const childKey = this.getNodeKey(child);\n if (this.selectedKeys.has(childKey)) {\n selectedCount++;\n }\n }\n\n // Indeterminate if some but not all children are selected\n return selectedCount > 0 && selectedCount < children.length;\n }\n\n /**\n * Check header checkbox indeterminate state\n */\n protected checkHeaderIndeterminate(): boolean {\n if (this.selectedKeys.size === 0) return false;\n\n // Count total nodes in tree\n let totalNodes = 0;\n const countNodes = (nodes: T[]) => {\n for (const node of nodes) {\n totalNodes++;\n const children = this.getChildren(node);\n if (Array.isArray(children)) {\n countNodes(children);\n }\n }\n };\n countNodes(this.data || []);\n\n return this.selectedKeys.size > 0 && this.selectedKeys.size < totalNodes;\n }\n\n /**\n * Check if header checkbox should be checked\n */\n protected checkHeaderChecked(): boolean {\n if (this.selectedKeys.size === 0) return false;\n\n // Count total nodes in tree\n let totalNodes = 0;\n const countNodes = (nodes: T[]) => {\n for (const node of nodes) {\n totalNodes++;\n const children = this.getChildren(node);\n if (Array.isArray(children)) {\n countNodes(children);\n }\n }\n };\n countNodes(this.data || []);\n\n return this.selectedKeys.size === totalNodes;\n }\n\n protected toggle(node: T, level: number, path: T[]): void {\n const key = this.getNodeKey(node);\n if (this.expandedKeys.has(key)) {\n this.expandedKeys.delete(key);\n // Recursively collapse all children\n this.collapseAllChildren(node);\n this.nodeToggle.emit({ node, level, path, expanded: false });\n this.rebuildRows();\n return;\n }\n\n this.expandedKeys.add(key);\n if (this.emitExpandAlways || this.getChildren(node) == null) {\n this.nodeToggle.emit({ node, level, path, expanded: true });\n }\n this.rebuildRows();\n }\n\n /**\n * Recursively collapse all children of a node\n */\n private collapseAllChildren(node: T): void {\n const children = this.getChildren(node);\n if (Array.isArray(children)) {\n for (const child of children) {\n const childKey = this.getNodeKey(child);\n this.expandedKeys.delete(childKey);\n this.collapseAllChildren(child);\n }\n }\n }\n\n protected isExpanded(node: T): boolean {\n return this.expandedKeys.has(this.getNodeKey(node));\n }\n\n protected onCheckboxChange(\n node: T,\n level: number,\n path: T[],\n checked: boolean,\n ): void {\n const key = this.getNodeKey(node);\n\n if (checked) {\n // When node is checked, select all its children recursively\n this.selectAllChildren(node);\n\n // Auto-select all parents if all their children are selected\n this.updateParentSelection(path);\n } else {\n // When node is unchecked, deselect all its children recursively\n this.deselectAllChildren(node);\n }\n\n this.selectionChange.emit({\n node,\n level,\n path,\n checked,\n selectedNodes: this.getSelectedNodes(),\n });\n\n this.cd.markForCheck();\n }\n\n protected isChecked(node: T): boolean {\n return this.selectedKeys.has(this.getNodeKey(node));\n }\n\n protected onLinkClicked(\n e: MouseEvent,\n node: T,\n level: number,\n path: T[],\n col: CatsTreeTableColumn,\n ): void {\n // Timer-based single/double click logic\n if (this.linkClickTimer) {\n clearTimeout(this.linkClickTimer);\n this.linkClickTimer = null;\n }\n e.preventDefault();\n e.stopPropagation();\n this.linkClickTimer = setTimeout(() => {\n this.linkClick.emit({ node, level, path, url: this.linkResolver(node, level, path), col });\n this.linkClickTimer = null;\n }, this.linkClickDelay);\n }\n\n protected onLinkDoubleClicked(e: MouseEvent, node: T, level: number, path: T[], col: CatsTreeTableColumn): void {\n // Cancel single click timer and emit double click\n if (this.linkClickTimer) {\n clearTimeout(this.linkClickTimer);\n this.linkClickTimer = null;\n }\n e.preventDefault();\n e.stopPropagation();\n this.linkDoubleClick.emit({ node, level, path, url: this.linkResolver(node, level, path), col });\n }\n\n protected resolveIconSrc(icon: string | null): string | null {\n if (!icon) return null;\n if (icon.includes('/') || icon.startsWith('http://') || icon.startsWith('https://')) {\n return icon;\n }\n return `${this.iconBasePath}/${icon}`;\n }\n\n protected getValue(node: T, fieldPath: string): any {\n if (!fieldPath) return '';\n const parts = fieldPath.split('.');\n let cur: any = node as any;\n for (const part of parts) {\n if (cur == null) return '';\n cur = cur?.[part];\n }\n return cur ?? '';\n }\n\n protected isNodeRow(row: RowView<T>): boolean {\n return row.kind === 'node';\n }\n\n protected rowOptions(row: RowView<T>): CatsTreeRowOptions {\n return this.rowOptionsResolver(row.node, row.level, row.path) || {};\n }\n\n protected showToggleFor(row: RowView<T>): boolean {\n const opts = this.rowOptions(row);\n if (opts.showToggle === false) return false;\n return this.isExpandable(row.node, row.level, row.path);\n }\n\n protected showCheckboxFor(row: RowView<T>): boolean {\n const opts = this.rowOptions(row);\n if (opts.showCheckbox != null) return !!opts.showCheckbox;\n return this.showCheckbox;\n }\n\n protected showNodeIconFor(row: RowView<T>): boolean {\n const opts = this.rowOptions(row);\n if (opts.showNodeIcon != null) return !!opts.showNodeIcon;\n return this.showNodeIcon;\n }\n\n protected showLinkFor(row: RowView<T>): boolean {\n const opts = this.rowOptions(row);\n if (opts.showLink != null) return !!opts.showLink;\n return this.linkResolver(row.node, row.level, row.path) != null;\n }\n\n protected isDisabledRow(row: RowView<T>): boolean {\n return !!this.rowOptions(row)?.disabled;\n }\n\n protected labelFor(row: RowView<T>): any {\n return this.getValue(row.node, this.labelField);\n }\n\n protected toggleIconFor(row: RowView<T>): string {\n if (this.isExpanded(row.node)) {\n }\n return this.isExpanded(row.node) ? this.collapseIcon : this.expandIcon;\n }\n\n protected nodeIconFor(row: RowView<T>): string | null {\n return this.nodeIconResolver(row.node, row.level, row.path, this.isExpanded(row.node));\n }\n\n protected linkUrlFor(row: RowView<T>): string | null {\n return this.linkResolver(row.node, row.level, row.path);\n }\n\n /**\n * Set page count based on total records and page size\n */\n protected setPageCount(): void {\n if (this.totalRecords === 0) {\n this.pageDetails.totalPages = 1;\n } else {\n this.pageDetails.totalPages = Math.ceil(this.totalRecords / this.pageDetails.pageSize);\n }\n }\n\n /**\n * On page size changed\n */\n protected onPageSizeChanged(event: any): void {\n this.recordsToShow.min = 0;\n this.recordsToShow.max = parseInt(event);\n this.pageDetails.currentPage = 1;\n this.pageDetails.pageSize = parseInt(event);\n this.setPageCount();\n this.onPaginationChange.emit({\n page: this.pageDetails.currentPage - 1,\n pageSize: this.pageDetails.pageSize,\n });\n }\n\n /**\n * On first button click\n */\n protected onBtFirstClick(): void {\n this.pageDetails.currentPage = 1;\n this.recordsToShow.min = 0;\n this.recordsToShow.max = this.pageDetails.pageSize;\n\n this.onPaginationChange.emit({\n page: this.pageDetails.currentPage - 1,\n pageSize: this.pageDetails.pageSize,\n });\n }\n\n /**\n * On previous button click\n */\n protected onBtPrevClick(): void {\n this.recordsToShow.min = this.recordsToShow.min - this.pageDetails.pageSize;\n this.recordsToShow.max = this.recordsToShow.max - this.pageDetails.pageSize;\n if (this.pageDetails.currentPage > 1)\n this.pageDetails.currentPage = this.pageDetails.currentPage - 1;\n\n this.onPaginationChange.emit({\n page: this.pageDetails.currentPage - 1,\n pageSize: this.pageDetails.pageSize,\n });\n }\n\n /**\n * On next button click\n */\n protected onBtNextClick(): void {\n this.recordsToShow.min = this.recordsToShow.min + this.pageDetails.pageSize;\n this.recordsToShow.max = this.recordsToShow.max + this.pageDetails.pageSize;\n\n if (this.pageDetails.currentPage < this.pageDetails.totalPages)\n this.pageDetails.currentPage = this.pageDetails.currentPage + 1;\n\n this.onPaginationChange.emit({\n page: this.pageDetails.currentPage - 1,\n pageSize: this.pageDetails.pageSize,\n });\n }\n\n /**\n * On last button click\n */\n protected onBtLastClick(): void {\n this.pageDetails.currentPage = this.pageDetails.totalPages;\n this.recordsToShow.max = this.pageDetails.currentPage * this.pageDetails.pageSize;\n this.recordsToShow.min = this.pageDetails.currentPage * this.pageDetails.pageSize - this.pageDetails.pageSize;\n\n this.onPaginationChange.emit({\n page: this.pageDetails.currentPage - 1,\n pageSize: this.pageDetails.pageSize,\n });\n }\n\n /**\n * Go to selected page\n */\n protected goToSelectedPage(event: any): void {\n let pageNo = event.target.value;\n if (pageNo < 1) {\n this.pageDetails.currentPage = 1;\n } else if (pageNo > this.pageDetails.totalPages) {\n this.pageDetails.currentPage = this.pageDetails.totalPages;\n }\n this.recordsToShow.max =\n this.pageDetails.currentPage * this.pageDetails.pageSize;\n this.recordsToShow.min =\n this.pageDetails.currentPage * this.pageDetails.pageSize -\n this.pageDetails.pageSize;\n\n this.onPaginationChange.emit({\n page: this.pageDetails.currentPage - 1,\n pageSize: this.pageDetails.pageSize,\n });\n }\n\n /**\n * @description method to reset table configuration\n * @author Tarun Kumar\n * @param none\n * @returns void\n */\n resetPagination(): void {\n //this.pageDetails.pageSize = 20;\n this.pageDetails.currentPage = 1;\n this.pageDetails.totalPages = 1;\n this.recordsToShow.min = 0;\n this.recordsToShow.max = this.pageDetails.pageSize;\n this.setPageCount();\n }\n\n /**\n * Convert to number\n */\n protected convertToNumber(val: any): number {\n return parseInt(val);\n }\n\n private getChildren(node: T): any[] | null | undefined {\n return (node as any)?.[this.childrenField];\n }\n\n private rebuildRows(): void {\n const next: RowView<T>[] = [];\n for (const root of this.data || []) {\n this.walk(root, 0, [], next);\n }\n this.rows = next;\n }\n\n private walk(node: T, level: number, parentPath: T[], out: RowView<T>[]): void {\n const path = [...parentPath, node];\n out.push({\n kind: 'node',\n node,\n level,\n path,\n trackKey: this.getNodeKey(node),\n });\n\n if (!this.isExpanded(node) || !this.isExpandable(node, level, path)) return;\n\n const children = this.getChildren(node);\n if (children == null) {\n out.push({\n kind: 'loading',\n node,\n level: level + 1,\n path,\n trackKey: `${this.getNodeKey(node)}::loading`,\n } as any);\n return;\n }\n\n if (!Array.isArray(children) || children.length === 0) {\n out.push({\n kind: 'no-data',\n node,\n level: level + 1,\n path,\n trackKey: `${this.getNodeKey(node)}::no-data`,\n } as any);\n return;\n }\n\n for (const child of children) {\n this.walk(child, level + 1, path, out);\n }\n }\n\n private getNodeKey(node: T): string | number {\n const anyNode = node as any;\n const direct = anyNode?.[this.idField];\n if (direct != null) return direct;\n if (typeof node === 'object' && node != null) {\n const existing = this.fallbackKey.get(node as any);\n if (existing != null) return existing;\n const next = this.fallbackSeq++;\n this.fallbackKey.set(node as any, next);\n return next;\n }\n return String(node);\n }\n\n private getSelectedNodes(): T[] {\n const selected: T[] = [];\n const visit = (nodes: T[]) => {\n for (const n of nodes) {\n if (this.selectedKeys.has(this.getNodeKey(n))) selected.push(n);\n const children = this.getChildren(n);\n if (Array.isArray(children) && children.length > 0) visit(children as T[]);\n }\n };\n visit(this.data || []);\n return selected;\n }\n\n /**\n * Autosize column to fit content\n */\n protected autosizeColumn(col: CatsTreeTableColumn, index: number): void {\n const min = col.minWidth ?? 50;\n const max = col.maxWidth ?? 500;\n const estimatedWidth = Math.min(Math.max(150, min), max);\n col.width = estimatedWidth;\n this.updatePinnedOffsets();\n }\n\n /**\n * Autosize all columns\n */\n protected autosizeAllColumns(): void {\n this.columns.forEach((col) => {\n const min = col.minWidth ?? 50;\n const max = col.maxWidth ?? 500;\n const estimatedWidth = Math.min(Math.max(150, min), max);\n col.width = estimatedWidth;\n });\n this.updatePinnedOffsets();\n }\n\n /**\n * Group by column\n */\n protected groupByColumn(col: CatsTreeTableColumn, index: number): void {\n // Emit event or handle grouping logic\n console.log('Group by column:', col.fieldName);\n }\n\n /**\n * Show column chooser\n */\n protected showColumnChooser(colIdx: number): void {\n // Toggle settings to show column chooser\n this.onClickOutside();\n }\n\n /**\n * Reset columns to original state\n */\n protected resetColumns(): void {\n if (this.originalColumns.length > 0) {\n this.columns = structuredClone(this.originalColumns);\n this.rebuildRows();\n }\n }\n\n /**\n * Save column state\n */\n private saveColumnState(): void {\n if (this.originalColumns.length === 0) {\n this.originalColumns = JSON.parse(JSON.stringify(this.columns));\n }\n }\n\n/**\n * Returns filtered hierarchy based on column filters with AND/OR logic, including number filter support\n */\n getFilteredHierarchy(): T[] {\n const filterColumns = this.columns.filter(col => col.filterable && (col.filters?.some(f => f.filterValue) || (col.filterType === 'set' && col.selectedValues && col.selectedValues.size > 0)));\n if (filterColumns.length === 0) return structuredClone(this.originalRowData);\n\n const filterFn = (node: T): boolean => {\n return filterColumns.every(col => {\n let value = this.getValue(node, col.fieldName);\n if (col.filterType === 'set') {\n return col.selectedValues?.has(value);\n } else if (col.filterType === 'number') {\n const conds = col.filters?.filter(f => f.filterValue !== '' && f.filterValue !== null && f.filterValue !== undefined) || [];\n if (conds.length === 0) return true;\n if (col.filterLogic === 'AND') {\n return conds.every(f => this.evaluateNumberFilterCondition(f.filterOperation, value, f.filterValue));\n } else {\n return conds.some(f => this.evaluateNumberFilterCondition(f.filterOperation, value, f.filterValue));\n }\n } else {\n const conds = col.filters?.filter(f => f.filterValue) || [];\n if (conds.length === 0) return true;\n if (col.filterLogic === 'AND') {\n return conds.every(f => this.evaluateTextFilterCondition(f.filterOperation, String(value).toLowerCase(), String(f.filterValue).toLowerCase()));\n } else {\n return conds.some(f => this.evaluateTextFilterCondition(f.filterOperation, String(value).toLowerCase(), String(f.filterValue).toLowerCase()));\n }\n }\n });\n };\n\n const filterTree = (nodes: T[]): T[] => {\n const result: T[] = [];\n for (const node of nodes) {\n const children = this.getChildren(node);\n let filteredChildren: T[] = [];\n if (Array.isArray(children)) {\n filteredChildren = filterTree(children);\n }\n if (filterFn(node) || filteredChildren.length > 0) {\n const clone:any = { ...node };\n if (Array.isArray(children)) {\n clone[this.childrenField] = filteredChildren;\n }\n result.push(clone);\n }\n }\n return result;\n };\n return filterTree(this.originalRowData);\n }\n\n /**\n * Evaluate number filter condition\n */\n private evaluateNumberFilterCondition(type: string, fieldValue: any, value: any): boolean {\n const numField = Number(fieldValue);\n const numValue = Number(value);\n if (isNaN(numField) || isNaN(numValue)) return false;\n switch (type) {\n case '=':\n case 'equals':\n return numField === numValue;\n case '>':\n return numField > numValue;\n case '<':\n return numField < numValue;\n case '>=':\n return numField >= numValue;\n case '<=':\n return numField <= numValue;\n default:\n return false;\n }\n }\n }\n","<div class=\"tableArea\" #table [class.is-resizing]=\"isResizing\">\n <!-- Settings Panel for Column Selection -->\n @if (settingsRequired && settingsClicked) {\n <div\n class=\"setting_options\"\n appOutsideClick\n (clickOutside)=\"hideSettings()\"\n >\n <div class=\"column_header\">Select Headers</div>\n <div class=\"checkbox_container\">\n <input\n class=\"custom_check_box\"\n type=\"checkbox\"\n [checked]=\"activeAll\"\n (change)=\"activeAllSelection($event)\"\n />\n <span>Select All</span>\n </div>\n\n <div class=\"item_container\" id=\"table_scroll\">\n @for (col of columns; track col.fieldName) {\n <div class=\"column_item checkbox_container\">\n <input\n class=\"custom_check_box\"\n type=\"checkbox\"\n [checked]=\"col.active\"\n [disabled]=\"col.headerLocked\"\n (change)=\"changeActiveColSelection($event, col)\"\n />\n <span>{{ col.header || col.fieldName | titlecase }}</span>\n </div>\n }\n </div>\n </div>\n }\n\n <!-- Main Table Wrapper -->\n <div\n class=\"table_wrapper global\"\n id=\"table_scroll\"\n [class.no-horizontal-scroll]=\"!rows || rows.length === 0\"\n #parent\n >\n <div class=\"table-inner-wrapper\">\n <table cellspacing=\"0\" cellpadding=\"0\">\n <thead class=\"sticky-top\">\n <tr>\n <!-- Checkbox header column -->\n @if (checkBoxSelection && atLeastOneColumnChecked) {\n <th style=\"min-width: 50px; width: 50px; max-width: 50px\">\n <div class=\"th_wraper\">\n <div class=\"checkbox_container\">\n <input\n class=\"pointer custom_check_box\"\n type=\"checkbox\"\n [checked]=\"checkHeaderChecked()\"\n [indeterminate]=\"checkHeaderIndeterminate()\"\n (change)=\"onHeaderCheckboxChange($event)\"\n />\n </div>\n <div class=\"filter_three_dot_wrapper\">\n <span class=\"resize-handle default_cursor\"> | </span>\n </div>\n </div>\n </th>\n }\n\n <!-- Column Headers -->\n @for (col of columns; track col.fieldName; let colIdx = $index) {\n @if (col.active !== false) {\n <th\n [ngStyle]=\"getStyle(col)\"\n [attr.data-col-idx]=\"colIdx\"\n [ngClass]=\"{\n 'drag-over': dragOverIndex === colIdx,\n pinned_column: col.leftPinned || col.rightPinned,\n }\"\n (mouseenter)=\"showMoveIcon[colIdx] = true\"\n (mouseleave)=\"showMoveIcon[colIdx] = false\"\n >\n <div class=\"th_wraper\">\n <!-- Sortable column header -->\n <div\n class=\"text_wrapper\"\n [ngClass]=\"{ sortable: col.sortable }\"\n (click)=\"onSortingRowData(colIdx, col)\"\n >\n @if (showMoveIcon[colIdx] && col.sortable) {\n <img\n src=\"images/t-move.svg\"\n class=\"move-icon\"\n [draggable]=\"!isResizing\"\n (dragstart)=\"onDragStart($event, colIdx)\"\n (dragend)=\"onDragEnd()\"\n />\n }\n <span class=\"ellipsis headerName\">{{\n col.header || col.fieldName\n }}</span>\n\n <!-- Sorting indicator -->\n @if (\n sortingRequired &&\n sortingColumnIndex === colIdx &&\n col.sortable\n ) {\n <span class=\"sorting_icon\">\n @if (sortingType[colIdx] === \"asc\") {\n <img src=\"images/t-arrow-up.svg\" alt=\"Ascending\" />\n } @else if (sortingType[colIdx] === \"dsc\") {\n <img\n src=\"images/t-arrow-down.svg\"\n alt=\"Descending\"\n />\n }\n </span>\n }\n </div>\n\n <!-- Filter and Menu -->\n <div class=\"filter_three_dot_wrapper\">\n <!-- Filter Icon -->\n @if (filterRequired && col.filterable) {\n <div\n class=\"filters\"\n (click)=\"toggleFilter(col, colIdx, $event)\"\n >\n @if (activeFilters.has(col.fieldName)) {\n <img\n src=\"images/filter-active.svg\"\n alt=\"Filter active\"\n />\n } @else {\n <img src=\"images/filter.svg\" alt=\"Filter\" />\n }\n\n <!-- Filter Dropdown -->\n @if (activeFilterIndex === colIdx) {\n <div\n class=\"filter_dropdown\"\n (click)=\"$event.stopPropagation()\"\n >\n <!-- Text Filter -->\n @if (col.filterType === \"text\") {\n <div class=\"filter_input_group\">\n <select\n [ngModel]=\"\n col.filters?.[0]?.filterOperation\n \"\n (ngModelChange)=\"\n col.filters![0].filterOperation = $event;\n applyAllFilters()\n \"\n >\n @for (\n opt of filterOptions;\n track opt.value\n ) {\n <option [value]=\"opt.value\">\n {{ opt.label }}\n </option>\n }\n </select>\n <input\n type=\"text\"\n class=\"search_input\"\n placeholder=\"Filter…\"\n [(ngModel)]=\"col.filters![0].filterValue\"\n (keyup)=\"applyAllFilters()\"\n />\n </div>\n @if (col.filters![0].filterValue) {\n <div class=\"logic-row radio_option\">\n <input\n type=\"radio\"\n name=\"filterLogic{{ col.fieldName }}\"\n [(ngModel)]=\"col.filterLogic\"\n value=\"AND\"\n id=\"and-{{ colIdx }}\"\n (change)=\"applyAllFilters()\"\n />\n <label [for]=\"'and-' + colIdx\">AND</label>\n <input\n type=\"radio\"\n name=\"filterLogic{{ col.fieldName }}\"\n [(ngModel)]=\"col.filterLogic\"\n value=\"OR\"\n id=\"or-{{ colIdx }}\"\n (change)=\"applyAllFilters()\"\n />\n <label [for]=\"'or-' + colIdx\">OR</label>\n </div>\n <div class=\"filter_input_group\">\n <select\n [ngModel]=\"\n col.filters![1]?.filterOperation\n \"\n (ngModelChange)=\"\n col.filters![1].filterOperation =\n $event;\n applyAllFilters()\n \"\n >\n @for (\n opt of filterOptions;\n track opt.value\n ) {\n <option [value]=\"opt.value\">\n {{ opt.label }}\n </option>\n }\n </select>\n <input\n type=\"text\"\n class=\"search_input\"\n placeholder=\"Filter…\"\n [(ngModel)]=\"col.filters![1].filterValue\"\n (keyup)=\"applyAllFilters()\"\n />\n </div>\n }\n }\n <!-- Number Filter -->\n @if (col.filterType === \"number\") {\n <div class=\"filter_input_group\">\n <select\n [ngModel]=\"\n col.filters?.[0]?.filterOperation\n \"\n (ngModelChange)=\"\n col.filters![0].filterOperation = $event;\n applyAllFilters()\n \"\n >\n @for (\n opt of numberFilterOptions;\n track opt.value\n ) {\n <option [value]=\"opt.value\">\n {{ opt.label }}\n </option>\n }\n </select>\n <input\n type=\"number\"\n class=\"search_input\"\n placeholder=\"Filter…\"\n [(ngModel)]=\"col.filters![0].filterValue\"\n (keyup)=\"applyAllFilters()\"\n />\n </div>\n @if (col.filters![0].filterValue) {\n <div class=\"logic-row radio_option\">\n <input\n type=\"radio\"\n name=\"filterLogic{{ col.fieldName }}\"\n [(ngModel)]=\"col.filterLogic\"\n value=\"AND\"\n id=\"and-num-{{ colIdx }}\"\n (change)=\"applyAllFilters()\"\n />\n <label [for]=\"'and-num-' + colIdx\"\n >AND</label\n >\n <input\n type=\"radio\"\n name=\"filterLogic{{ col.fieldName }}\"\n [(ngModel)]=\"col.filterLogic\"\n value=\"OR\"\n id=\"or-num-{{ colIdx }}\"\n (change)=\"applyAllFilters()\"\n />\n <label [for]=\"'or-num-' + colIdx\">OR</label>\n </div>\n <div class=\"filter_input_group\">\n <select\n [ngModel]=\"\n col.filters![1]?.filterOperation\n \"\n (ngModelChange)=\"\n col.filters![1].filterOperation =\n $event;\n applyAllFilters()\n \"\n >\n @for (\n opt of numberFilterOptions;\n track opt.value\n ) {\n <option [value]=\"opt.value\">\n {{ opt.label }}\n </option>\n }\n </select>\n <input\n type=\"number\"\n class=\"search_input\"\n placeholder=\"Filter…\"\n [(ngModel)]=\"col.filters![1].filterValue\"\n (keyup)=\"applyAllFilters()\"\n />\n </div>\n }\n }\n <!-- Set Filter (Checkboxes) -->\n @if (col.filterType === \"set\") {\n <div class=\"search_input\">\n <input\n type=\"text\"\n placeholder=\"Search...\"\n (input)=\"filterSetOptions(col, $event)\"\n />\n </div>\n <div class=\"set_option_details\">\n <label>\n <input\n type=\"checkbox\"\n [checked]=\"\n col.options?.length ===\n col.selectedValues?.size\n \"\n (change)=\"\n toggleSelectAllSetFilter(col, $event)\n \"\n />\n <span>Select All</span>\n </label>\n @for (\n option of col.filteredOptions;\n track option\n ) {\n <label>\n <input\n type=\"checkbox\"\n [checked]=\"\n col.selectedValues?.has(option)\n \"\n (change)=\"\n toggleSetOption(col, option, $event)\n \"\n />\n <span>{{ option }}</span>\n </label>\n }\n </div>\n }\n <div class=\"filter_btn\">\n <button (click)=\"resetFilter(col)\">\n Clear\n </button>\n </div>\n </div>\n }\n </div>\n }\n\n <!-- Three dots menu-->\n <div #triggerColMenu>\n @if (threeDotsMenuRequired) {\n <div\n class=\"three-dots\"\n (click)=\"openMenu($event, col, colIdx)\"\n >\n <img\n src=\"images/t-more-vertical.svg\"\n alt=\"Menu\"\n [draggable]=\"false\"\n (dragstart)=\"\n $event.preventDefault();\n $event.stopPropagation()\n \"\n />\n </div>\n }\n </div>\n\n <!-- Column Resize Handle -->\n <span\n class=\"resize-handle\"\n (mousedown)=\"startResize($event, colIdx)\"\n >\n |\n </span>\n </div>\n </div>\n\n @if (menuVisible[colIdx]) {\n <div\n #colActionMenu\n class=\"dropdown_wrapper\"\n adaptivePosition\n [trigger]=\"triggerColMenu\"\n [parentContainer]=\"parent\"\n [matchWidth]=\"false\"\n [isColumnActionMenu]=\"true\"\n (click)=\"$event.stopPropagation()\"\n appOutsideClick\n (clickOutside)=\"onClickOutside()\"\n >\n <div class=\"right_click_dropdown\" id=\"table_scroll\">\n <!-- Sort Ascending -->\n @if (\n sortingType[colIdx] === \"dsc\" || !sortingType[colIdx]\n ) {\n <div\n class=\"right_click_item\"\n (click)=\"onSort(col, 'asc', colIdx)\"\n >\n <div class=\"left_item\">\n <img\n src=\"images/arrow-up.svg\"\n class=\"sorting_up\"\n [ngClass]=\"{ disable: !col.sortable }\"\n />\n <span class=\"text\">Sort Ascending</span>\n </div>\n </div>\n }\n\n <!-- Sort Descending -->\n @if (\n sortingType[colIdx] === \"asc\" || !sortingType[colIdx]\n ) {\n <div\n class=\"right_click_item\"\n (click)=\"onSort(col, 'dsc', colIdx)\"\n >\n <div class=\"left_item\">\n <img src=\"images/arrow-down.svg\" alt=\"\" />\n <span class=\"text\">Sort Descending</span>\n </div>\n </div>\n }\n\n <!-- Clear Sort -->\n @if (\n sortingType[colIdx] === \"asc\" ||\n sortingType[colIdx] === \"dsc\"\n ) {\n <div\n class=\"right_click_item\"\n (click)=\"onSort(col, '', colIdx)\"\n >\n <div class=\"left_item\">\n <img src=\"images/trash-2.svg\" alt=\"\" />\n <span class=\"text\">Clear Sort</span>\n </div>\n </div>\n }\n\n <div class=\"divder\"></div>\n\n <!-- Pin Column -->\n <div\n class=\"right_click_item\"\n (mouseenter)=\"showPinActions($event)\"\n (mouseleave)=\"hidePinActions()\"\n >\n <div class=\"left_item\">\n <img src=\"images/pin.svg\" alt=\"\" />\n <span class=\"text\">Pin Column</span>\n </div>\n <div class=\"right_item\">\n <img src=\"images/chevron-right.svg\" alt=\"\" />\n @if (showPin) {\n <div class=\"second_dropdown\" #pinMenu>\n <div\n class=\"right_click_item\"\n (click)=\"pinColumn(col, colIdx, 'none')\"\n >\n <div class=\"left_item\">\n @if (\n pinActionClicked[\n col.colId || col.fieldName\n ] === \"none\"\n ) {\n <img src=\"images/check.svg\" alt=\"\" />\n } @else {\n <img src=\"\" alt=\"\" />\n }\n <span class=\"text\">No Pin</span>\n </div>\n </div>\n <div\n class=\"right_click_item\"\n (click)=\"pinColumn(col, colIdx, 'left')\"\n >\n <div class=\"left_item\">\n @if (\n pinActionClicked[\n col.colId || col.fieldName\n ] === \"left\"\n ) {\n <img src=\"images/check.svg\" alt=\"\" />\n } @else {\n <img src=\"\" alt=\"\" />\n }\n <span class=\"text\">Pin Left</span>\n </div>\n </div>\n <div\n class=\"right_click_item\"\n (click)=\"pinColumn(col, colIdx, 'right')\"\n >\n <div class=\"left_item\">\n @if (\n pinActionClicked[\n col.colId || col.fieldName\n ] === \"right\"\n ) {\n <img src=\"images/check.svg\" alt=\"\" />\n } @else {\n <img src=\"\" alt=\"\" />\n }\n <span class=\"text\">Pin Right</span>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n\n <!-- Autosize This Column -->\n <div\n class=\"right_click_item\"\n (click)=\"autosizeColumn(col, colIdx)\"\n >\n <div class=\"left_item\">\n <img src=\"\" alt=\"\" />\n <span class=\"text\">Autosize This Column</span>\n </div>\n </div>\n\n <!-- Autosize All Columns -->\n <div\n class=\"right_click_item\"\n (click)=\"autosizeAllColumns()\"\n >\n <div class=\"left_item\">\n <img src=\"\" alt=\"\" />\n <span class=\"text\">Autosize All Columns</span>\n </div>\n </div>\n\n <!-- <div class=\"divder\"></div> -->\n\n <!-- Group by Column -->\n <!-- <div class=\"right_click_item\" (click)=\"groupByColumn(col, colIdx)\">\n\t <div class=\"left_item\">\n\t <img src=\"\" alt=\"\" />\n\t <span class=\"text\">Group by {{ col.header || col.fieldName }}</span>\n\t </div>\n\t </div> -->\n\n <!-- Choose Columns -->\n <!-- <div class=\"right_click_item\" (click)=\"showColumnChooser(colIdx)\">\n\t <div class=\"left_item\">\n\t <img src=\"\" alt=\"\" />\n\t <span class=\"text\">Choose Columns</span>\n\t </div>\n\t </div> -->\n\n <!-- Reset Columns -->\n <!-- <div class=\"right_click_item\">\n\t <div class=\"left_item\">\n\t <img src=\"\" alt=\"\" />\n\t <span class=\"text\">Reset Columns</span>\n\t </div>\n\t </div> -->\n </div>\n </div>\n }\n </th>\n }\n }\n </tr>\n </thead>\n\n <tbody>\n @for (row of rows; track row.trackKey) {\n @if (row.kind === \"node\") {\n <tr [class.disabled]=\"isDisabledRow(row)\">\n <!-- Checkbox column -->\n @if (checkBoxSelection && atLeastOneColumnChecked) {\n <td style=\"min-width: 50px; max-width: 50px\">\n @if (checkboxSelectionType === \"multiple\") {\n @if (showCheckboxFor(row)) {\n <span class=\"checkbox_container\">\n <input\n type=\"checkbox\"\n [disabled]=\"isDisabledRow(row)\"\n [indeterminate]=\"isNodeIndeterminate(row.node)\"\n [checked]=\"isChecked(row.node)\"\n (change)=\"\n onCheckboxChange(\n row.node,\n row.level,\n row.path,\n $any($event.target).checked\n )\n \"\n />\n <label [for]=\"'row_' + row.trackKey\"></label>\n </span>\n }\n } @else {\n <span class=\"radio_option\">\n <input\n type=\"radio\"\n [name]=\"'row_' + row.trackKey\"\n [checked]=\"isChecked(row.node)\"\n (change)=\"\n onCheckboxChange(\n row.node,\n row.level,\n row.path,\n $any($event.target).checked\n )\n \"\n />\n <label [for]=\"'row_' + row.trackKey\"></label>\n </span>\n }\n </td>\n }\n\n <!-- Data columns -->\n @for (\n col of columns;\n track col.fieldName;\n let colIndex = $index\n ) {\n @if (col.active !== false) {\n <td\n [ngStyle]=\"getStyle(col)\"\n [ngClass]=\"[\n col.leftPinned || col.rightPinned\n ? 'pinned_column'\n : '',\n ]\"\n class=\"table_cell\"\n >\n @if (col.fieldName === treeColumn.fieldName) {\n @if (!col?.cellRenderer) {\n <div\n class=\"tree_cell\"\n [style.padding-left.px]=\"row.level * indentPx\"\n >\n @if (showToggleFor(row)) {\n <button\n class=\"toggle_btn\"\n type=\"button\"\n [disabled]=\"isDisabledRow(row)\"\n (click)=\"toggle(row.node, row.level, row.path)\"\n >\n <img\n [src]=\"resolveIconSrc(toggleIconFor(row))\"\n alt=\"\"\n />\n </button>\n } @else {\n <span class=\"toggle_spacer\"></span>\n }\n\n <!-- @if (showCheckboxFor(row)) {\n <input\n type=\"checkbox\"\n [disabled]=\"isDisabledRow(row)\"\n [checked]=\"isChecked(row.node)\"\n (change)=\"\n onCheckboxChange(\n row.node,\n row.level,\n row.path,\n ($any($event.target).checked)\n )\n \"\n />\n } -->\n\n @if (showNodeIconFor(row)) {\n @if (nodeIconFor(row); as icon) {\n <img\n class=\"node_icon\"\n [src]=\"resolveIconSrc(icon)\"\n alt=\"\"\n />\n }\n }\n\n @if (showLinkFor(row) && linkUrlFor(row); as url) {\n <a\n class=\"node_link ellipsis\"\n [appTooltip]=\"labelFor(row) || 'N/A'\"\n tooltipPosition=\"adaptive\"\n [tooltipParentContainer]=\"parent\"\n (click)=\"\n onLinkClicked(\n $event,\n row.node,\n row.level,\n row.path,\n col\n )\n \"\n (dblclick)=\"\n onLinkDoubleClicked(\n $event,\n row.node,\n row.level,\n row.path,\n col\n )\n \"\n >\n {{ labelFor(row) || \"N/A\" }}\n </a>\n } @else {\n <span\n class=\"node_label\"\n [appTooltip]=\"labelFor(row) || 'N/A'\"\n tooltipPosition=\"adaptive\"\n [tooltipParentContainer]=\"parent\"\n >{{ labelFor(row) || \"N/A\" }}</span\n >\n }\n </div>\n } @else {\n <div\n [rowParam]=\"row.node\"\n [col]=\"col\"\n [api]=\"tableOptions\"\n [currentValue]=\"getValue(row.node, col.fieldName)\"\n appRendererParser\n [style.padding-left.px]=\"row.level * indentPx\"\n ></div>\n }\n } @else {\n <div class=\"col_wrapper\">\n @if (!col?.cellRenderer) {\n <span class=\"ellipsis\" [appTooltip]=\"getValue(row.node, col.fieldName) || 'N/A'\"\n tooltipPosition=\"adaptive\" [tooltipParentContainer]=\"parent\"> {{\n getValue(row.node, col.fieldName) || \"N/A\"\n }}</span>\n } @else {\n <div\n [rowParam]=\"row.node\"\n [col]=\"col\"\n [api]=\"tableOptions\"\n [currentValue]=\"getValue(row.node, col.fieldName)\"\n appRendererParser\n ></div>\n }\n </div>\n }\n </td>\n }\n }\n </tr>\n } @else if (row.kind === \"loading\") {\n <tr class=\"meta_row\">\n <td\n [attr.colspan]=\"columns.length + (checkBoxSelection ? 1 : 0)\"\n >\n <div\n class=\"meta_cell\"\n [style.padding-left.px]=\"row.level * indentPx\"\n >\n {{ loadingText }}\n </div>\n </td>\n </tr>\n } @else if (row.kind === \"no-data\") {\n <tr class=\"meta_row\">\n <td\n [attr.colspan]=\"columns.length + (checkBoxSelection ? 1 : 0)\"\n >\n <div\n class=\"meta_cell\"\n [style.padding-left.px]=\"row.level * indentPx\"\n >\n {{ noDataText }}\n </div>\n </td>\n </tr>\n }\n }\n </tbody>\n </table>\n\n @if (!rows || rows.length === 0) {\n <div class=\"empty_overlay\">\n <div class=\"empty_content\">\n <span>{{ noDataText }}</span>\n </div>\n </div>\n }\n </div>\n </div>\n\n <!-- Pagination -->\n @if (paginationRequired) {\n <div class=\"pagination_main\">\n <div class=\"entries_details\">\n <span>Showing</span>\n <div class=\"pagination_select\">\n <div\n class=\"select_dropdown pointer\"\n (click)=\"showPageSizeList = !showPageSizeList\"\n >\n <p class=\"select_text mb-0\">{{ pageDetails.pageSize }}</p>\n <span class=\"chevron_img\">\n <img src=\"images/chevron-down.svg\" class=\"pointer\" />\n </span>\n </div>\n @if (showPageSizeList) {\n <div\n class=\"select_option\"\n appOutsideClick\n (clickOutside)=\"onClickOutside()\"\n >\n @for (option of pageSizeList; track $index) {\n <span\n class=\"pointer\"\n (click)=\"onPageSizeChanged(option); onClickOutside()\"\n >{{ option }}</span\n >\n }\n </div>\n }\n </div>\n <span\n >Rows |\n {{ totalRecords > 0 ? convertToNumber(recordsToShow.min) + 1 : 0 }} -\n {{\n recordsToShow.max > totalRecords ? totalRecords : recordsToShow.max\n }}\n of\n {{ totalRecords }} Entries</span\n >\n </div>\n <div class=\"pagination_form\">\n <button\n class=\"outlined_btn first_btn\"\n type=\"button\"\n (click)=\"onBtFirstClick()\"\n [ngClass]=\"pageDetails.currentPage > 1 ? '' : 'disable_btn'\"\n >\n <span> <img src=\"images/chevrons-left.svg\" alt=\"\" /> </span>\n </button>\n <button\n class=\"outlined_btn prev_btn\"\n [ngClass]=\"pageDetails.currentPage > 1 ? '' : 'disable_btn'\"\n type=\"button\"\n (click)=\"onBtPrevClick()\"\n >\n <span> <img src=\"images/chevron-left.svg\" alt=\"\" /> </span>\n </button>\n <div>\n <input\n class=\"input_style\"\n type=\"number\"\n [(ngModel)]=\"pageDetails.currentPage\"\n (change)=\"goToSelectedPage($event)\"\n name=\"\"\n id=\"\"\n />\n </div>\n <button\n class=\"outlined_btn next_btn\"\n type=\"button\"\n [ngClass]=\"\n pageDetails.currentPage < pageDetails.totalPages\n ? ''\n : 'disable_btn'\n \"\n (click)=\"onBtNextClick()\"\n >\n <span> <img src=\"images/chevron-right.svg\" alt=\"\" /> </span>\n </button>\n <button\n class=\"outlined_btn last_btn\"\n type=\"button\"\n (click)=\"onBtLastClick()\"\n [ngClass]=\"\n pageDetails.currentPage < pageDetails.totalPages\n ? ''\n : 'disable_btn'\n \"\n >\n <span> <img src=\"images/chevrons-right.svg\" alt=\"\" /> </span>\n </button>\n </div>\n </div>\n }\n <!-- Pagination Ends -->\n</div>\n","/*\n * Public API Surface of cats-data-grid\n */\n\nexport * from './lib/services/cats-data-grid.service';\nexport * from './lib/cats-data-grid.component';\nexport * from './lib/renderers/common-renderer/common-renderer.component';\nexport * from './lib/common-components/common-tree-table/common-tree-table.component';\nexport * from './lib/directives/tooltip.directive';\nexport * from './lib/common-components/tooltip/tooltip.component';\nexport * from './lib/directives/adaptive-position.directive';","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MAKa,mBAAmB,CAAA;AAE9B,IAAA,WAAA,GAAA,EAAgB;wGAFL,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAnB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,cAFlB,MAAM,EAAA,CAAA;;4FAEP,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAH/B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;;MCCY,YAAY,CAAA;IAEvB,SAAS,CAAC,KAAU,EAAE,OAAY,EAAA;AAChC,QAAA,IAAI,OAAO,EAAE,UAAU,EAAE;AACvB,YAAA,OAAO,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC;QAClC;AACK,aAAA,IAAG,OAAO,EAAE,cAAc,EAAE;AAC/B,YAAA,OAAO,OAAO,CAAC,cAAc,CAAC,KAAK,CAAC;QACtC;AACA,QAAA,OAAO,EAAE;IACX;wGAVW,YAAY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