cats-data-grid 2.0.77 → 2.0.79

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/common-components/tooltip/tooltip.component.ts","../../../projects/cats-data-grid/src/lib/common-components/tooltip/tooltip.component.html","../../../projects/cats-data-grid/src/lib/directives/tooltip.directive.ts","../../../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/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(\n private el: ViewContainerRef,\n private er: ElementRef,\n ) {}\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 = 'cats-see-more-data';\n itemDiv.className = 'cats-item';\n descDiv.className = 'cats-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 { 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 templateUrl: './tooltip.component.html',\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 get styleObj() {\n return {\n 'background-color': this.bgColor,\n color: this.textColor,\n padding: this.padding,\n 'font-size': this.fontSize,\n 'border-radius': this.borderRadius,\n 'max-width': this.maxWidth,\n };\n }\n}\n","<div\n class=\"app-tooltip-wrapper\"\n [ngClass]=\"'tooltip-' + position\"\n [ngStyle]=\"styleObj\"\n>\n {{ content }}\n <div class=\"tooltip-arrow\"></div>\n</div>\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 this.ngZone.onStable.subscribe(() => {\n const el = this.elementRef.nativeElement;\n\n if (!el.isConnected || !document.body.contains(el)) {\n this.hide();\n }\n });\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(\n '.app-tooltip-wrapper',\n ) as HTMLElement;\n\n // If direct query didn't work, try the root element\n if (!this.tooltipElement) {\n this.tooltipElement = (\n componentRef.location.nativeElement as HTMLElement\n ).children[0] as HTMLElement;\n }\n\n // If still not found, use the whole element\n if (!this.tooltipElement) {\n this.tooltipElement = componentRef.location\n .nativeElement as HTMLElement;\n }\n\n // Append to body to avoid layout issues\n this.renderer.appendChild(\n document.body,\n componentRef.location.nativeElement,\n );\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(\n 'Tooltip directive: Error creating tooltip component',\n error,\n );\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 =\n this.elementRect.left +\n this.elementRect.width / 2 -\n tooltipRect.width / 2;\n break;\n case 'bottom':\n top = this.elementRect.bottom + gap;\n left =\n this.elementRect.left +\n this.elementRect.width / 2 -\n tooltipRect.width / 2;\n break;\n case 'left':\n top =\n this.elementRect.top +\n this.elementRect.height / 2 -\n tooltipRect.height / 2;\n left = this.elementRect.left - tooltipRect.width - gap;\n break;\n case 'right':\n top =\n this.elementRect.top +\n this.elementRect.height / 2 -\n 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(\n this.tooltipElement,\n 'data-arrow-pos',\n arrowPos,\n );\n this.renderer.setStyle(this.tooltipElement, 'position', 'fixed');\n this.renderer.setStyle(\n this.tooltipElement,\n 'top',\n `${Math.round(top)}px`,\n );\n this.renderer.setStyle(\n this.tooltipElement,\n 'left',\n `${Math.round(left)}px`,\n );\n });\n }\n\n private hide(): void {\n this.isTooltipShown = false;\n if (this.tooltipElement && this.tooltipElement.parentNode) {\n this.renderer.removeChild(\n this.tooltipElement.parentNode,\n this.tooltipElement,\n );\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","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';\nimport { TooltipDirective } from './directives/tooltip.directive';\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 TooltipDirective,\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({ required: true }) rowData: any[] = [];\n @Input({ required: true }) 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 @Input() bigRows: boolean = false;\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() onColConfigChange = 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 categorizedCols: any = {};\n noCategoryCols: any[] = [];\n objectKeys = Object.keys;\n allActiveDefault = false;\n allActiveColMap: Record<string, boolean> = {};\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 @Input() isRowsEditable: boolean = false;\n @Input() showSkeleton: 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 @Input() skeletonRowsLength: number = 8;\n @Input() skeletonColsLength: number = 8;\n skeletonRows: any = [];\n skeletonCols: any = [];\n allActiveCol: boolean = false;\n originalCategorizedCols: any = {};\n originalNoCategoryCols: any[] = [];\n constructor(\n private renderer: Renderer2,\n private zone: NgZone,\n private cd: ChangeDetectorRef,\n ) {}\n\n ngOnInit(): void {}\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['skeletonColsLength']?.currentValue) {\n this.skeletonColsLength = changes['skeletonColsLength']?.currentValue;\n }\n\n if (changes['showSkeleton']) {\n this.showSkeleton = changes['showSkeleton']?.currentValue;\n }\n\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\n if (changes['colDefs']?.currentValue) {\n // this.resetPagination();\n const colDefs = changes['colDefs']?.currentValue;\n if (colDefs.length > 0) {\n this.skeletonColsLength = changes['colDefs']?.currentValue.length;\n }\n this.skeletonCols = Array.from(\n { length: this.skeletonColsLength },\n (_, i) => i,\n );\n this.skeletonRows = Array.from(\n { length: this.skeletonRowsLength },\n (_, i) => i,\n );\n\n this.colDefs = this.getUpdatedColDefs(changes['colDefs']?.currentValue);\n setTimeout(() => {\n this.applyAllFilters();\n });\n this.originalColDefs = this.cloneColDefs(this.colDefs);\n const result = this.getColConfigCategory(this.colDefs);\n\n this.originalCategorizedCols = JSON.parse(\n JSON.stringify(result.categorized),\n );\n this.originalNoCategoryCols = JSON.parse(\n JSON.stringify(result.noCategory),\n );\n\n this.categorizedCols = result.categorized;\n this.noCategoryCols = result.noCategory;\n\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.push(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 onColConfigSearch(event: any) {\n const text: string = (event.target as HTMLInputElement).value\n .toLowerCase()\n .trim();\n if (!text) {\n this.categorizedCols = { ...this.originalCategorizedCols };\n this.noCategoryCols = this.cloneColDefs(this.originalNoCategoryCols);\n return;\n }\n this.noCategoryCols = this.originalNoCategoryCols.filter((dt: any) =>\n dt.headerName.toLowerCase().includes(text),\n );\n\n const filteredCategories: any = {};\n\n Object.keys(this.originalCategorizedCols).forEach((category) => {\n const filteredCols = this.originalCategorizedCols[category].filter(\n (col: any) => col.headerName.toLowerCase().includes(text),\n );\n\n if (filteredCols.length > 0) {\n filteredCategories[category] = filteredCols;\n }\n });\n\n this.categorizedCols = filteredCategories;\n }\n\n cloneColDefs(colDefs: any[]) {\n return colDefs.map((col) => ({\n ...col,\n active: col.active,\n\n cellRendererParams: col.cellRendererParams\n ? { ...col.cellRendererParams }\n : col.cellRendererParams,\n }));\n }\n\n resetDefaultColConfig() {\n this.colDefs = this.cloneColDefs(this.originalColDefs);\n const result = this.getColConfigCategory(this.colDefs);\n\n this.originalCategorizedCols = JSON.parse(\n JSON.stringify(result.categorized),\n );\n this.originalNoCategoryCols = this.cloneColDefs(result.noCategory);\n\n this.categorizedCols = result.categorized;\n this.noCategoryCols = result.noCategory;\n\n this.allActiveDefault = this.originalNoCategoryCols.every(\n (c: any) => c.active || c.headerLocked,\n );\n\n this.updateGlobalState();\n }\n\n /**\n * Autosize column to fit content\n */\n protected autosizeColumn(col: any): 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.colDefs.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 // getColConfigCategory(colDefs:any){\n // const colArr = []\n // colDefs.forEach((col:any) => {\n // if(col.category){\n\n // };\n // })\n // }\n\n getColConfigCategory(colDefs: any[]) {\n const categorized: Record<string, any[]> = {};\n const noCategory: any[] = [];\n\n colDefs.forEach((col: any) => {\n if (col.category) {\n // create array if not exists\n if (!categorized[col.category]) {\n categorized[col.category] = [];\n }\n\n categorized[col.category].push(col);\n } else {\n noCategory.push(col);\n }\n });\n\n return {\n categorized,\n noCategory,\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 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 showAllSelection() {\n const newState = !this.allActiveDefault;\n\n this.colDefs.forEach((col) => {\n if (!col.category && !col.headerLocked) {\n col.active = newState;\n }\n });\n\n this.allActiveDefault = newState;\n\n this.updateGlobalState();\n this.activeAll = this.colDefs.every((dt) => dt.active);\n this.getActiveCols();\n this.atLeastOneColumnChecked = this.colDefs.some((dt) => dt.active);\n }\n\n showAllDefaultSelection() {\n this.allActiveDefault = !this.allActiveDefault;\n\n this.noCategoryCols.forEach((col: any) => {\n if (!col.headerLocked) {\n col.active = this.allActiveDefault;\n }\n });\n this.rebuildView();\n this.updateGlobalState();\n }\n\n rebuildView() {\n const result = this.getColConfigCategory(this.colDefs);\n this.categorizedCols = result.categorized;\n this.noCategoryCols = result.noCategory;\n }\n\n showAllCategorySelection(category: string) {\n const newState = !this.allActiveColMap[category];\n\n this.colDefs.forEach((col) => {\n if (col.category === category && !col.headerLocked) {\n col.active = newState;\n }\n });\n\n this.allActiveColMap[category] = newState;\n this.rebuildView();\n this.updateGlobalState();\n }\n\n toggleSelectedCol(col: any) {\n if (col.headerLocked) return;\n col = this.colDefs.find((c) => c.colId === col.colId);\n\n if (!col) return;\n\n col.active = !col.active;\n if (col.category) {\n const category = col.category;\n\n this.allActiveColMap[category] = this.categorizedCols[category].every(\n (c: any) => c.active || c.headerLocked,\n );\n } else {\n this.allActiveDefault = this.noCategoryCols.every(\n (c: any) => c.active || c.headerLocked,\n );\n }\n this.rebuildView();\n this.updateGlobalState();\n }\n\n updateGlobalState() {\n const allCols = [\n ...this.noCategoryCols,\n ...Object.values(this.categorizedCols).flat(),\n ];\n this.activeAll = allCols.every((dt) => dt.active);\n this.atLeastOneColumnChecked = allCols.some((dt) => dt.active);\n\n this.getActiveCols();\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 const x = c.fieldName.split('.')[0];\n return x;\n }\n return c.fieldName;\n });\n this.onColConfigChange.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.applyAllFilters();\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 this.applyAllFilters();\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 = `${col.width ?? 60}px`;\n style.minWidth = `${col.minWidth ?? 60}px`;\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=\"cats-tableArea\" [ngClass]=\"{ large: bigRows }\" #table>\n @if (settingsRequired && settingsClicked) {\n <div\n class=\"setting-options\"\n appOutsideClick\n (clickOutside)=\"hideSettings()\"\n >\n <div class=\"header-section\">\n <div class=\"column-header\">CONFIGURE Column</div>\n <div class=\"reset-default\" (click)=\"resetDefaultColConfig()\">\n Reset to default\n </div>\n </div>\n\n <div class=\"header-search-wrapper\">\n <div class=\"search_input\">\n <img src=\"images/search.svg\" alt=\"\" />\n <input\n type=\"text\"\n placeholder=\"Type to Search\"\n (input)=\"onColConfigSearch($event)\"\n />\n </div>\n </div>\n <div class=\"border-divider\"></div>\n\n <!-- <div class=\"add-more\">\n <div class=\"add-more-text\">Add more</div>\n <img src=\"images/add-more-right-blue.svg\" alt=\"\" />\n </div>\n <div class=\"border-divider\"></div> -->\n <div id=\"table_scroll\" class=\"setting-item-container\">\n <div class=\"setting-item-wrapper\">\n @if (noCategoryCols.length > 0) {\n <div\n class=\"setting-column-item item-title\"\n (click)=\"showAllDefaultSelection()\"\n >\n <!-- <input\n class=\"custom_check_box\"\n type=\"checkbox\"\n [checked]=\"activeAll\"\n (change)=\"activeAllSelection($event)\"\n /> -->\n @if (allActiveDefault) {\n <img\n class=\"eye-icon\"\n src=\"images/eye-custom-header.svg\"\n alt=\"\"\n />\n } @else {\n <img\n class=\"eye-icon\"\n src=\"images/eye-off-custom-header.svg\"\n alt=\"\"\n />\n }\n <span>Default</span>\n </div>\n }\n @for (col of noCategoryCols; track col.colId) {\n <div\n class=\"setting-column-item\"\n (click)=\"toggleSelectedCol(col)\"\n [ngClass]=\"{ disable: col.headerLocked }\"\n >\n @if (col.active) {\n <img\n class=\"eye-icon\"\n src=\"images/eye-custom-header.svg\"\n alt=\"\"\n />\n } @else {\n <img\n class=\"eye-icon\"\n src=\"images/eye-off-custom-header.svg\"\n alt=\"\"\n />\n }\n\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 @for (category of objectKeys(categorizedCols); track category) {\n <div class=\"setting-item-wrapper\">\n <div\n class=\"setting-column-item item-title\"\n (click)=\"showAllCategorySelection(category)\"\n >\n <!-- <input\n class=\"custom_check_box\"\n type=\"checkbox\"\n [checked]=\"activeAll\"\n (change)=\"activeAllSelection($event)\"\n /> -->\n @if (allActiveColMap[category]) {\n <img\n class=\"eye-icon\"\n src=\"images/eye-custom-header.svg\"\n alt=\"\"\n />\n } @else {\n <img\n class=\"eye-icon\"\n src=\"images/eye-off-custom-header.svg\"\n alt=\"\"\n />\n }\n <span>{{ category | titlecase }}</span>\n </div>\n <!-- Category Title -->\n\n <!-- <div class=\"setting-column-item item-title\">\n <span>{{ category | titlecase }}</span>\n </div> -->\n\n <!-- Columns inside category -->\n @for (col of categorizedCols[category]; track col.colId) {\n <div\n class=\"setting-column-item\"\n (click)=\"toggleSelectedCol(col)\"\n [ngClass]=\"{ disable: col.headerLocked }\"\n >\n @if (col.active) {\n <img class=\"eye-icon\" src=\"images/eye-custom-header.svg\" />\n } @else {\n <img\n class=\"eye-icon\"\n src=\"images/eye-off-custom-header.svg\"\n />\n }\n\n <span>{{ col.headerName | titlecase }}</span>\n </div>\n }\n </div>\n }\n </div>\n </div>\n }\n @if (activeFilters.size > 0) {\n <div class=\"active-filters-container\">\n <div class=\"filter-static-label\">Filter by:</div>\n <div class=\"filter-tag-wrapper\" id=\"table_scroll\">\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 @if (groupByRequired && colDefs.length > 0) {\n <!-- Group Panel -->\n <div\n class=\"table-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\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 @if (colDefs?.length === 0 && showSkeleton) {\n <tr>\n @for (c of skeletonCols; track $index) {\n <th>\n <div class=\"th-wraper\">\n <div class=\"line\"></div>\n </div>\n </th>\n }\n </tr>\n } @else {\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=\"cats-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 <!-- Add icon -->\n @if (col?.headerIcon) {\n <div\n [appTooltip]=\"col?.tooltipText\"\n tooltipPosition=\"adaptive\"\n [tooltipParentContainer]=\"parent\"\n class=\"filters\"\n >\n <img\n [src]=\"col?.headerIcon\"\n alt=\"image\"\n class=\"filter-icon\"\n />\n </div>\n }\n\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 cats-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 class=\"label\" [for]=\"$index\"\n >AND</label\n >\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 class=\"label\" [for]=\"$index + 1\"\n >OR</label\n >\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 =\n $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)]=\"\n col.filters[1].filterValue\n \"\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 cats-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 class=\"label\" [for]=\"$index\"\n >AND</label\n >\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 class=\"label\" [for]=\"$index + 1\"\n >OR</label\n >\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 =\n $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)]=\"\n col.filters[1].filterValue\n \"\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 cats-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 class=\"label\" [for]=\"$index\"\n >AND</label\n >\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 class=\"label\" [for]=\"$index + 1\"\n >OR</label\n >\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 =\n $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=\"cats-checkbox_container\">\n <input\n class=\"custom_check_box\"\n type=\"checkbox\"\n [checked]=\"isAllSelected(col)\"\n (change)=\"\n toggleSelectAll(col, $event)\n \"\n />\n Select All\n </label>\n <div\n class=\"set-options\"\n id=\"table_scroll\"\n >\n @for (\n opt of col.filteredOptions;\n track $index\n ) {\n <label\n class=\"cats-checkbox_container\"\n >\n <input\n class=\"custom_check_box\"\n type=\"checkbox\"\n [checked]=\"\n col.selectedValues.has(opt)\n \"\n (change)=\"\n toggleSetOption(\n col,\n opt,\n $event\n )\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 <button\n class=\"reset_btn\"\n type=\"button\"\n (click)=\"applyAllFilters()\"\n >\n Apply\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=\"header-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\n class=\"right_click_item\"\n (click)=\"autosizeColumn(col)\"\n >\n <div class=\"left_item\">\n <img src=\"images/autosize-this.svg\" alt=\"\" />\n <span class=\"text\">Autosize This Column</span>\n </div>\n </div>\n <div\n class=\"right_click_item\"\n (click)=\"autosizeAllColumns()\"\n >\n <div class=\"left_item\">\n <img src=\"images/autosize-all.svg\" 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=\"images/rotate-ccw.svg\" alt=\"\" />\n <span class=\"text\">Reset Columns</span>\n </div>\n </div> -->\n </div>\n </div>\n }\n </th>\n }\n }\n </tr>\n }\n </thead>\n\n <tbody>\n @if (showSkeleton) {\n @for (r of skeletonRows; track $index) {\n <tr>\n @for (c of skeletonCols; track $index) {\n <td>\n <div class=\"line\"></div>\n </td>\n }\n </tr>\n }\n } @else {\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=\"cats-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\n class=\"cats-see-more-data\"\n id=\"table_scroll\"\n >\n <div class=\"cats-item\">\n <span class=\"cats-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=\"cats-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=\"cats-radio-option\">\n <input\n type=\"radio\"\n name=\"\"\n id=\"{{ data.rowId }}\"\n [checked]=\"data?.isSelected\"\n (change)=\"onRowCheckboxSelection($event)\"\n />\n <label class=\"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 (\n isRowsEditable &&\n isCellDblClicked[col.colId + \"-\" + data.rowId]\n ) {\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\n class=\"gripper-img\"\n src=\"images/gripper.svg\"\n />\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 <span\n class=\"node_label\"\n [appTooltip]=\"\n parseColValue(data, col) || 'N/A'\n \"\n tooltipPosition=\"adaptive\"\n [tooltipParentContainer]=\"parent\"\n >{{ parseColValue(data, col) }}</span\n >\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]=\"\n data[col.fieldName] || parseColValue(data, col)\n \"\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 }\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=\"cats-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=\"cats-see-more-data\" id=\"table_scroll\">\n <div class=\"cats-item\">\n <span class=\"cats-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 && colDefs.length > 0) {\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=\"header-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, Input, 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';\nimport { TooltipDirective } from '../../directives/tooltip.directive';\n\n@Component({\n selector: 'lib-common-renderer',\n imports: [\n OutsideClickDirective,\n AdaptivePositionDirective,\n CommonModule,\n AddClassPipe,\n TooltipDirective,\n ],\n templateUrl: './common-renderer.component.html',\n styleUrl: './common-renderer.component.scss',\n})\nexport class CommonRendererComponent {\n parentContainer!: HTMLElement;\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 this.parentContainer = document.body;\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('.cats-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('.cats-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 } 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 class=\"tag_wrapper\" #tagTrigger (mouseout)=\"closeDropdown($event)\">\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 <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 <span\n class=\"node_label\"\n [appTooltip]=\"tag.tagValue || 'N/A'\"\n tooltipPosition=\"adaptive\"\n [tooltipParentContainer]=\"parentContainer\"\n >{{ tag.tagValue }}</span\n >\n </div>\n </div>\n </div>\n </div>\n }\n @if (hiddenCount > 0) {\n <div class=\"hidden_list\">\n <span class=\"tag_more\" (mouseover)=\"toggleDropdown($event)\"\n >+{{ hiddenCount }}</span\n >\n @if (openDropdown) {\n <div\n class=\"cats-tag-dropdown\"\n id=\"table_scroll\"\n adaptivePosition\n [trigger]=\"tagTrigger\"\n [matchWidth]=\"false\"\n >\n @for (tag of allTags; track $index) {\n <div class=\"{{ 'dropdown_item' + ' ' + tag.class }}\">\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 [appTooltip]=\"linkVal || 'N/A'\"\n tooltipPosition=\"adaptive\"\n [tooltipParentContainer]=\"parentContainer\"\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 { 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';\nimport { CommonInputComponent } from '../common-input/common-input.component';\nimport {\n CommonCalendarComponent,\n DateConfig,\n} from '../common-calendar/common-calendar.component';\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: [\n CommonModule,\n FormsModule,\n OutsideClickDirective,\n AdaptivePositionDirective,\n RendererParserDirective,\n TooltipDirective,\n CommonInputComponent,\n CommonCalendarComponent,\n ],\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{\n @ViewChild('table', { static: true }) tableAreaRef!: ElementRef<HTMLElement>;\n @ViewChild('pinMenu') pinMenu?: ElementRef<HTMLElement>;\n @Input() data: T[] = [];\n @Input() columns: CatsTreeTableColumn[] = [\n { fieldName: 'name', header: 'Name' },\n ];\n @Input() tableOptions: any = {};\n\n @Input() idField: string = 'id';\n rowId: string = 'rowId';\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 @Input() expandAllNodes: boolean = false;\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: (\n node: T,\n level: number,\n path: T[],\n ) => CatsTreeRowOptions = () => ({});\n\n @Input() nodeIconResolver: (\n node: T,\n level: number,\n path: T[],\n expanded: boolean,\n ) => string | null = () => null;\n\n @Input() linkResolver: (node: T, level: number, path: T[]) => string | null =\n () => null;\n @Input() showSkeleton: boolean = false;\n @Output() nodeToggle = new EventEmitter<CatsTreeExpandEvent<T>>();\n @Output() selectionChange = new EventEmitter<\n CatsTreeSelectionChangeEvent<T>\n >();\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 @Output() onColConfigChange = new EventEmitter();\n dateConfig: DateConfig = {\n selectionMode: 'single',\n enableTime: false,\n };\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 activeFilters: Set<any> = new Set<any>();\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 originalCategorizedCols: any = {};\n originalNoCategoryCols: any[] = [];\n\n @Input() skeletonRowsLength: number = 8;\n @Input() skeletonColsLength: number = 8;\n skeletonRows: any = [];\n skeletonCols: any = [];\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 private originalExpandedKeys = new Set<any>();\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 activeColumns: CatsTreeTableColumn[] = [];\n categorizedCols: any = {};\n noCategoryCols: any[] = [];\n objectKeys = Object.keys;\n allActiveDefault = false;\n allActiveColMap: Record<string, boolean> = {};\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(\n el,\n 'dragover',\n (event: DragEvent) => {\n if (this.isResizing) return;\n event.preventDefault();\n\n const th = (event.target as HTMLElement | null)?.closest?.(\n 'th',\n ) 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\n this.removeDrop = this.renderer.listen(el, 'drop', (event: DragEvent) => {\n event.preventDefault();\n\n const th = (event.target as HTMLElement | null)?.closest?.(\n 'th',\n ) 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 getUpdatedColDefs(colDefs: any[]) {\n const flattenTree = (data: any[]): any[] => {\n const result: any[] = [];\n\n const recurse = (nodes: any[], parentTreeId = '') => {\n nodes.forEach((node) => {\n const currentTreeId = parentTreeId + node[this.idField];\n node[this.rowId] = currentTreeId;\n result.push(node);\n if (node.array && Array.isArray(node.array)) {\n recurse(node.array, currentTreeId);\n }\n });\n };\n\n recurse(data);\n return result;\n };\n\n const flatRows = flattenTree(this.data);\n\n return colDefs.map((col, index) => {\n // Reset sorting type per column\n this.sortingType[index] = '';\n\n col.colId = `${Date.now()}_${index}`;\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 // --------------------------------------------------------------------\n // SET FILTER TYPE\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 filters: [\n {\n filterOperation: '=',\n filterValue: '',\n },\n {\n filterOperation: '=',\n filterValue: '',\n },\n ],\n };\n break;\n\n case 'set':\n let fieldName = col.fieldName;\n\n if (fieldName.includes('.')) {\n fieldName = fieldName.split('.')[0];\n }\n\n const options = [\n ...new Set(\n flatRows\n .flatMap((r: any) =>\n this.normalizeSetFilterType(\n r[fieldName],\n col?.cellRendererParams?.tagKey,\n ),\n )\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 // --------------------------------------------------------------------\n // RESTORE APPLIED FILTERS (PERSISTENCE)\n // --------------------------------------------------------------------\n if (this.appliedFilters.length > 0) {\n const appliedFilter = this.appliedFilters.find(\n (f) => f.fieldName === col.fieldName,\n );\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 break;\n\n case 'set':\n let fieldName = col.fieldName;\n if (fieldName.includes('.')) {\n fieldName = fieldName.split('.')[0];\n }\n\n const options = [\n ...new Set(\n flatRows\n .flatMap((r: any) =>\n this.normalizeSetFilterType(\n r[fieldName],\n col?.cellRendererParams?.tagKey,\n ),\n )\n .filter(Boolean),\n ),\n ];\n\n const selectedValues = new Set(\n appliedFilter.filters.map((f: any) => f.filterValue),\n );\n\n updatedCol = {\n ...updatedCol,\n options,\n filteredOptions: options,\n selectedValues,\n };\n break;\n }\n }\n }\n\n return updatedCol;\n });\n }\n\n cloneColDefs(colDefs: any[]) {\n return colDefs.map((col) => ({\n ...col,\n active: col.active,\n\n cellRendererParams: col.cellRendererParams\n ? { ...col.cellRendererParams }\n : col.cellRendererParams,\n }));\n }\n\n resetDefaultColConfig() {\n this.columns = this.cloneColDefs(this.originalColumns);\n const result = this.getColConfigCategory(this.columns);\n\n this.originalCategorizedCols = JSON.parse(\n JSON.stringify(result.categorized),\n );\n this.originalNoCategoryCols = this.cloneColDefs(result.noCategory);\n\n this.categorizedCols = result.categorized;\n this.noCategoryCols = result.noCategory;\n\n this.allActiveDefault = this.originalNoCategoryCols.every(\n (c: any) => c.active || c.headerLocked,\n );\n\n this.updateGlobalState();\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 ngOnChanges(changes: SimpleChanges): void {\n if (changes['skeletonColsLength']?.currentValue) {\n this.skeletonColsLength = changes['skeletonColsLength']?.currentValue;\n }\n\n if (changes['showSkeleton']) {\n this.showSkeleton = changes['showSkeleton']?.currentValue;\n }\n\n if (changes['data'] || changes['columns']) {\n const columns = changes['columns']?.currentValue;\n if (columns?.length > 0) {\n this.skeletonColsLength = changes['columns']?.currentValue.length;\n }\n this.skeletonCols = Array.from(\n { length: this.skeletonColsLength },\n (_, i) => i,\n );\n this.skeletonRows = Array.from(\n { length: this.skeletonRowsLength },\n (_, i) => i,\n );\n // this.initializeColumns();\n const colDefs = changes['columns']?.currentValue;\n if (Array.isArray(colDefs)) {\n this.columns = this.getUpdatedColDefs(colDefs);\n this.originalColumns = this.cloneColDefs(this.columns);\n const result = this.getColConfigCategory(this.columns);\n\n this.originalCategorizedCols = JSON.parse(\n JSON.stringify(result.categorized),\n );\n this.originalNoCategoryCols = JSON.parse(\n JSON.stringify(result.noCategory),\n );\n\n this.categorizedCols = result.categorized;\n this.noCategoryCols = result.noCategory;\n }\n\n this.originalRowData = structuredClone(this.data || []);\n if (this.expandAllNodes) {\n this.applyExpandAllInputState();\n }\n this.rebuildRows();\n }\n\n if (\n changes['expandAllNodes'] &&\n !changes['expandAllNodes'].firstChange &&\n !changes['data']\n ) {\n this.applyExpandAllInputState();\n this.rebuildRows();\n }\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 getColConfigCategory(colDefs: any[]) {\n const categorized: Record<string, any[]> = {};\n const noCategory: any[] = [];\n\n colDefs.forEach((col: any) => {\n if (col.category) {\n // create array if not exists\n if (!categorized[col.category]) {\n categorized[col.category] = [];\n }\n\n categorized[col.category].push(col);\n } else {\n noCategory.push(col);\n }\n });\n\n return {\n categorized,\n noCategory,\n };\n }\n onColConfigSearch(event: any) {\n const text: string = (event.target as HTMLInputElement).value\n .toLowerCase()\n .trim();\n if (!text) {\n this.categorizedCols = { ...this.originalCategorizedCols };\n this.noCategoryCols = this.cloneColDefs(this.originalNoCategoryCols);\n return;\n }\n this.noCategoryCols = this.originalNoCategoryCols.filter((dt: any) =>\n dt.header.toLowerCase().includes(text),\n );\n\n const filteredCategories: any = {};\n\n Object.keys(this.originalCategorizedCols).forEach((category) => {\n const filteredCols = this.originalCategorizedCols[category].filter(\n (col: any) => col.header.toLowerCase().includes(text),\n );\n\n if (filteredCols.length > 0) {\n filteredCategories[category] = filteredCols;\n }\n });\n\n this.categorizedCols = filteredCategories;\n }\n showAllDefaultSelection() {\n this.allActiveDefault = !this.allActiveDefault;\n\n this.noCategoryCols.forEach((col: any) => {\n if (!col.headerLocked) {\n col.active = this.allActiveDefault;\n }\n });\n this.rebuildView();\n this.updateGlobalState();\n }\n\n rebuildView() {\n const result = this.getColConfigCategory(this.columns);\n this.categorizedCols = result.categorized;\n this.noCategoryCols = result.noCategory;\n }\n\n showAllCategorySelection(category: string) {\n const newState = !this.allActiveColMap[category];\n\n this.columns.forEach((col: any) => {\n if (col.category === category && !col.headerLocked) {\n col.active = newState;\n }\n });\n\n this.allActiveColMap[category] = newState;\n this.rebuildView();\n this.updateGlobalState();\n }\n\n toggleSelectedCol(col: any) {\n if (col.headerLocked) return;\n col = this.columns.find((c) => c.colId === col.colId);\n\n if (!col) return;\n\n col.active = !col.active;\n if (col.category) {\n const category = col.category;\n\n this.allActiveColMap[category] = this.categorizedCols[category].every(\n (c: any) => c.active || c.headerLocked,\n );\n } else {\n this.allActiveDefault = this.noCategoryCols.every(\n (c: any) => c.active || c.headerLocked,\n );\n }\n this.rebuildView();\n this.updateGlobalState();\n }\n\n updateGlobalState() {\n const allCols = [\n ...this.noCategoryCols,\n ...Object.values(this.categorizedCols).flat(),\n ];\n\n this.activeAll = allCols.every((dt) => dt.active);\n this.atLeastOneColumnChecked = allCols.some((dt) => dt.active);\n\n this.getActiveCols();\n }\n\n getActiveCols() {\n const activeCols = this.columns\n .filter((col: any) => col.active)\n .map((c: any) => {\n if (c.fieldName.includes('.')) {\n const x = c.fieldName.split('.')[0];\n return x;\n }\n return c.fieldName;\n });\n this.onColConfigChange.emit(activeCols);\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(\n (c) => c.fieldName === this.resolvedTreeColumnField,\n ))\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(\n sortingColumnIndex: number,\n col: CatsTreeTableColumn,\n ): 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(\n col: CatsTreeTableColumn,\n type: string,\n sortingColumIndex: number,\n ): 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 applyAllFilters(col?: any): void {\n // Collect active filter columns\n const activeCols = this.columns.filter(\n (c) =>\n c.filterable &&\n c.filterType === 'text' &&\n c.filters?.some((f) => f.filterValue?.trim()),\n );\n\n if (activeCols.length === 0) {\n this.filteredData = structuredClone(this.originalRowData);\n this.data = this.filteredData;\n this.activeFilters.clear();\n this.expandedKeys = new Set(this.originalExpandedKeys);\n this.rebuildRows();\n return;\n }\n\n let filtered = structuredClone(this.originalRowData);\n\n if (col && col.filters?.every((c: any) => !c.filterValue)) {\n this.activeFilters.delete(col.fieldName);\n }\n for (const col of activeCols) {\n this.activeFilters.add(col.fieldName);\n\n filtered = this.filterTreeByColumn(filtered, col);\n }\n\n this.expandedKeys.clear();\n this.expandAllParentsAfterFilter(filtered);\n\n this.filteredData = filtered;\n this.data = filtered;\n this.rebuildRows();\n }\n\n private filterTreeByColumn(nodes: any[], col: any): any[] {\n const result = [];\n\n for (const node of nodes) {\n const children = node.array || [];\n\n const matches = this.matchesSingleColumn(node, col);\n\n if (matches) {\n // Node matches → keep node + all children\n result.push({\n ...node,\n array: structuredClone(children),\n });\n continue;\n }\n\n let filteredChildren = [];\n\n if (children.length > 0) {\n filteredChildren = this.filterTreeByColumn(children, col);\n }\n\n if (filteredChildren.length > 0) {\n result.push({\n ...node,\n array: filteredChildren,\n });\n }\n }\n\n return result;\n }\n\n private matchesSingleColumn(row: any, col: any): boolean {\n const f1 = col.filters[0];\n const f2 = col.filters[1];\n\n const fieldValue = String(this.getValue(row, col.fieldName)).toLowerCase();\n\n const fv1 = f1?.filterValue?.toLowerCase() || '';\n const fv2 = f2?.filterValue?.toLowerCase() || '';\n\n const op1 = f1?.filterOperation || '';\n const op2 = f2?.filterOperation || '';\n const logic = col.filterLogic || 'AND';\n\n const hasF1 = fv1 !== '';\n const hasF2 = fv2 !== '';\n\n if (!hasF1 && !hasF2) return true; // No filter → always match\n\n const m1 = hasF1\n ? this.evaluateTextFilterCondition(op1, fieldValue, fv1)\n : false;\n const m2 = hasF2\n ? this.evaluateTextFilterCondition(op2, fieldValue, fv2)\n : false;\n\n if (hasF1 && !hasF2) return m1;\n if (!hasF1 && hasF2) return m2;\n\n return logic === 'AND' ? m1 && m2 : m1 || m2;\n }\n\n private expandAllParentsAfterFilter(tree: any[]): void {\n const walk = (nodes: any[]) => {\n for (const node of nodes) {\n const children = node.array || node.children;\n const key = this.getNodeKey(node);\n\n if (children && children.length > 0) {\n this.expandedKeys.add(key);\n walk(children);\n }\n }\n };\n\n walk(tree);\n }\n\n /**\n * Evaluate text filter condition\n */\n private 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 * Toggle column filter visibility\n */\n protected toggleFilter(\n col: CatsTreeTableColumn,\n index: number,\n event: MouseEvent,\n ): 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(\n 'document',\n 'mousemove',\n this.onMouseMove,\n );\n this.removeMouseUp = this.renderer.listen(\n 'document',\n 'mouseup',\n this.stopResize,\n );\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(\n col: CatsTreeTableColumn,\n index: number,\n direction: string,\n ): 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(\n (c) => (c.colId || c.fieldName) === key,\n );\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(\n (c) => !c.leftPinned && !c.rightPinned,\n );\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(\n (c) => c.colId || c.fieldName,\n );\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 =\n col.options?.filter((option: any) =>\n String(option).toLowerCase().includes(text),\n ) || [];\n }\n\n /**\n * Toggle set filter option\n */\n protected toggleSetOption(\n col: CatsTreeTableColumn,\n option: any,\n event: any,\n ): 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(\n col: CatsTreeTableColumn,\n event: any,\n ): 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(\n event: Event,\n col: CatsTreeTableColumn,\n ): 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(\n event: MouseEvent,\n col: CatsTreeTableColumn,\n index: number,\n ): 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) =>\n this.selectedKeys.has(this.getNodeKey(child)),\n );\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.selectionChange.emit({\n checked: event.target.checked,\n selectedNodes: this.data || [],\n });\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 (\n this.selectedRow.length > 0 && this.selectedRow.length < this.data.length\n );\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.syncOriginalExpandedKeys();\n this.nodeToggle.emit({ node, level, path, expanded: false });\n this.rebuildRows();\n return;\n }\n\n this.expandedKeys.add(key);\n this.syncOriginalExpandedKeys();\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 showExpandAllControl(col: CatsTreeTableColumn): boolean {\n return (\n col.fieldName === this.treeColumn.fieldName && this.hasExpandableNodes()\n );\n }\n\n protected toggleAllNodes(): void {\n const shouldExpand = !this.areAllExpandableNodesExpanded();\n this.setAllNodesExpandedState(shouldExpand);\n this.rebuildRows();\n }\n\n protected allNodesExpanded(): boolean {\n return this.areAllExpandableNodesExpanded();\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({\n node,\n level,\n path,\n url: this.linkResolver(node, level, path),\n col,\n });\n this.linkClickTimer = null;\n }, this.linkClickDelay);\n }\n\n protected onLinkDoubleClicked(\n e: MouseEvent,\n node: T,\n level: number,\n path: T[],\n col: CatsTreeTableColumn,\n ): 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({\n node,\n level,\n path,\n url: this.linkResolver(node, level, path),\n col,\n });\n }\n\n protected resolveIconSrc(icon: string | null): string | null {\n if (!icon) return null;\n if (\n icon.includes('/') ||\n icon.startsWith('http://') ||\n icon.startsWith('https://')\n ) {\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 || typeof cur !== 'object') 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(\n row.node,\n row.level,\n row.path,\n this.isExpanded(row.node),\n );\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(\n this.totalRecords / this.pageDetails.pageSize,\n );\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 =\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 * 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 applyExpandAllInputState(): void {\n this.setAllNodesExpandedState(this.expandAllNodes);\n }\n\n private setAllNodesExpandedState(expanded: boolean): void {\n if (!expanded) {\n this.expandedKeys.clear();\n this.syncOriginalExpandedKeys();\n return;\n }\n\n const nextExpandedKeys = new Set<string | number>();\n const nodesToEmit: Array<{ node: T; level: number; path: T[] }> = [];\n for (const root of this.data || []) {\n this.collectExpandableNodeKeys(root, 0, [], nextExpandedKeys, nodesToEmit);\n }\n this.expandedKeys = nextExpandedKeys;\n this.syncOriginalExpandedKeys();\n\n for (const item of nodesToEmit) {\n if (this.emitExpandAlways || this.getChildren(item.node) == null) {\n this.nodeToggle.emit({\n node: item.node,\n level: item.level,\n path: item.path,\n expanded: true,\n });\n }\n }\n }\n\n private collectExpandableNodeKeys(\n node: T,\n level: number,\n parentPath: T[],\n out: Set<string | number>,\n nodesToEmit: Array<{ node: T; level: number; path: T[] }>,\n ): void {\n const path = [...parentPath, node];\n if (this.isExpandable(node, level, path)) {\n const key = this.getNodeKey(node);\n if (!this.expandedKeys.has(key)) {\n nodesToEmit.push({ node, level, path });\n }\n out.add(this.getNodeKey(node));\n }\n\n const children = this.getChildren(node);\n if (!Array.isArray(children) || children.length === 0) return;\n\n for (const child of children) {\n this.collectExpandableNodeKeys(child, level + 1, path, out, nodesToEmit);\n }\n }\n\n private areAllExpandableNodesExpanded(): boolean {\n let hasExpandableNodes = false;\n let allExpanded = true;\n\n const visit = (node: T, level: number, parentPath: T[]) => {\n const path = [...parentPath, node];\n if (this.isExpandable(node, level, path)) {\n hasExpandableNodes = true;\n if (!this.expandedKeys.has(this.getNodeKey(node))) {\n allExpanded = false;\n }\n }\n\n if (!allExpanded) return;\n\n const children = this.getChildren(node);\n if (!Array.isArray(children) || children.length === 0) return;\n\n for (const child of children) {\n visit(child, level + 1, path);\n if (!allExpanded) return;\n }\n };\n\n for (const root of this.data || []) {\n visit(root, 0, []);\n if (!allExpanded) break;\n }\n\n return hasExpandableNodes && allExpanded;\n }\n\n private hasExpandableNodes(): boolean {\n let found = false;\n\n const visit = (node: T, level: number, parentPath: T[]) => {\n if (found) return;\n\n const path = [...parentPath, node];\n if (this.isExpandable(node, level, path)) {\n found = true;\n return;\n }\n\n const children = this.getChildren(node);\n if (!Array.isArray(children) || children.length === 0) return;\n\n for (const child of children) {\n visit(child, level + 1, path);\n if (found) return;\n }\n };\n\n for (const root of this.data || []) {\n visit(root, 0, []);\n if (found) break;\n }\n\n return found;\n }\n\n private syncOriginalExpandedKeys(): void {\n this.originalExpandedKeys = new Set(this.expandedKeys);\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(\n node: T,\n level: number,\n parentPath: T[],\n out: RowView<T>[],\n ): 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 const direct = anyNode?.[this.rowId];\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)\n 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 }\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(\n (col) =>\n col.filterable &&\n (col.filters?.some((f) => f.filterValue) ||\n (col.filterType === 'set' &&\n col.selectedValues &&\n col.selectedValues.size > 0)),\n );\n if (filterColumns.length === 0)\n 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 =\n col.filters?.filter(\n (f) =>\n f.filterValue !== '' &&\n f.filterValue !== null &&\n f.filterValue !== undefined,\n ) || [];\n if (conds.length === 0) return true;\n if (col.filterLogic === 'AND') {\n return conds.every((f) =>\n this.evaluateNumberFilterCondition(\n f.filterOperation,\n value,\n f.filterValue,\n ),\n );\n } else {\n return conds.some((f) =>\n this.evaluateNumberFilterCondition(\n f.filterOperation,\n value,\n f.filterValue,\n ),\n );\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) =>\n this.evaluateTextFilterCondition(\n f.filterOperation,\n String(value).toLowerCase(),\n String(f.filterValue).toLowerCase(),\n ),\n );\n } else {\n return conds.some((f) =>\n this.evaluateTextFilterCondition(\n f.filterOperation,\n String(value).toLowerCase(),\n String(f.filterValue).toLowerCase(),\n ),\n );\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(\n type: string,\n fieldValue: any,\n value: any,\n ): 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 dateTimeSelected(date: any) {\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 * 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","<div class=\"cats-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=\"header-section\">\n <div class=\"column-header\">CONFIGURE Column</div>\n <div class=\"reset-default\" (click)=\"resetDefaultColConfig()\">\n Reset to default\n </div>\n </div>\n\n <div class=\"header-search-wrapper\">\n <div class=\"search_input\">\n <img src=\"images/search.svg\" alt=\"\" />\n <input\n placeholder=\"Type to Search\"\n (input)=\"onColConfigSearch($event)\"\n />\n </div>\n </div>\n <div class=\"border-divider\"></div>\n\n <!-- <div class=\"add-more\">\n <div class=\"add-more-text\">Add more</div>\n <img src=\"images/add-more-right-blue.svg\" alt=\"\" />\n </div>\n <div class=\"border-divider\"></div> -->\n <div id=\"table_scroll\" class=\"setting-item-container\">\n <div class=\"setting-item-wrapper\">\n @if (noCategoryCols.length > 0) {\n <div\n class=\"setting-column-item item-title\"\n (click)=\"showAllDefaultSelection()\"\n >\n <!-- <input\n class=\"custom_check_box\"\n type=\"checkbox\"\n [checked]=\"activeAll\"\n (change)=\"activeAllSelection($event)\"\n /> -->\n @if (allActiveDefault) {\n <img\n class=\"eye-icon\"\n src=\"images/eye-custom-header.svg\"\n alt=\"\"\n />\n } @else {\n <img\n class=\"eye-icon\"\n src=\"images/eye-off-custom-header.svg\"\n alt=\"\"\n />\n }\n <span>Default</span>\n </div>\n }\n @for (col of noCategoryCols; track col.colId) {\n <div\n class=\"setting-column-item\"\n (click)=\"toggleSelectedCol(col)\"\n [ngClass]=\"{ disable: col.headerLocked }\"\n >\n @if (col.active) {\n <img\n class=\"eye-icon\"\n src=\"images/eye-custom-header.svg\"\n alt=\"\"\n />\n } @else {\n <img\n class=\"eye-icon\"\n src=\"images/eye-off-custom-header.svg\"\n alt=\"\"\n />\n }\n\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.header | titlecase }}</span>\n </div>\n }\n </div>\n @for (category of objectKeys(categorizedCols); track category) {\n <div class=\"setting-item-wrapper\">\n <div\n class=\"setting-column-item item-title\"\n (click)=\"showAllCategorySelection(category)\"\n >\n <!-- <input\n class=\"custom_check_box\"\n type=\"checkbox\"\n [checked]=\"activeAll\"\n (change)=\"activeAllSelection($event)\"\n /> -->\n @if (allActiveColMap[category]) {\n <img\n class=\"eye-icon\"\n src=\"images/eye-custom-header.svg\"\n alt=\"\"\n />\n } @else {\n <img\n class=\"eye-icon\"\n src=\"images/eye-off-custom-header.svg\"\n alt=\"\"\n />\n }\n <span>{{ category | titlecase }}</span>\n </div>\n <!-- Category Title -->\n\n <!-- <div class=\"setting-column-item item-title\">\n <span>{{ category | titlecase }}</span>\n </div> -->\n\n <!-- Columns inside category -->\n @for (col of categorizedCols[category]; track col.colId) {\n <div\n class=\"setting-column-item\"\n (click)=\"toggleSelectedCol(col)\"\n [ngClass]=\"{ disable: col.headerLocked }\"\n >\n @if (col.active) {\n <img class=\"eye-icon\" src=\"images/eye-custom-header.svg\" />\n } @else {\n <img\n class=\"eye-icon\"\n src=\"images/eye-off-custom-header.svg\"\n />\n }\n\n <span>{{ col.headerName | titlecase }}</span>\n </div>\n }\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 @if (columns.length === 0 && showSkeleton) {\n <tr>\n @for (c of skeletonCols; track $index) {\n <th>\n <div class=\"th-wraper\">\n <div class=\"line\"></div>\n </div>\n </th>\n }\n </tr>\n } @else {\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=\"cats-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\n src=\"images/t-arrow-up.svg\"\n alt=\"Ascending\"\n />\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 @if (showExpandAllControl(col)) {\n <button\n class=\"header-tree-toggle\"\n type=\"button\"\n [attr.aria-label]=\"\n allNodesExpanded()\n ? 'Collapse all nodes'\n : 'Expand all nodes'\n \"\n (click)=\"toggleAllNodes(); $event.stopPropagation()\"\n >\n <img\n [src]=\"\n resolveIconSrc(\n allNodesExpanded()\n ? collapseIcon\n : expandIcon\n )\n \"\n alt=\"\"\n />\n </button>\n }\n\n <!-- Filter and Menu -->\n <div class=\"filter-three-dot-wrapper\">\n <!-- Filter Icon -->\n @if (filterRequired && col.filterable) {\n <div\n #trigger\n class=\"filters\"\n (click)=\"toggleFilter(col, colIdx, $event)\"\n >\n @if (activeFilters.has(col.fieldName)) {\n <img\n src=\"images/t-filter-applied.svg\"\n alt=\"Filter active\"\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 alt=\"Filter\"\n class=\"filter-icon\"\n [draggable]=\"false\"\n (dragstart)=\"\n $event.preventDefault();\n $event.stopPropagation()\n \"\n />\n }\n\n <!-- Filter Dropdown -->\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 =\n $event;\n applyAllFilters(col)\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)]=\"\n col.filters![0].filterValue\n \"\n (keyup)=\"applyAllFilters(col)\"\n />\n </div>\n\n @if (col.filters![0].filterValue) {\n <div class=\"logic-row cats-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(col)\"\n />\n <label class=\"label\" [for]=\"$index\"\n >AND</label\n >\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(col)\"\n />\n <label class=\"label\" [for]=\"$index + 1\"\n >OR</label\n >\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 =\n $event;\n applyAllFilters(col)\n \"\n ></lib-common-input>\n <!-- <input\n type=\"text\"\n [(ngModel)]=\"col.filters[1].filterValue\"\n placeholder=\"Filter…\"\n (keyup)=\"applyAllFilters(col)\"\n /> -->\n\n <div class=\"search_input\">\n <img src=\"images/search.svg\" alt=\"\" />\n <input\n type=\"text\"\n placeholder=\"Filter\"\n [(ngModel)]=\"\n col.filters![1].filterValue\n \"\n (keyup)=\"applyAllFilters(col)\"\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 =\n $event;\n applyAllFilters(col)\n \"\n ></lib-common-input>\n\n <!-- <input\n type=\"number\"\n [(ngModel)]=\"col.filters[0].filterValue\"\n (input)=\"applyAllFilters(col)\"\n /> -->\n\n <div class=\"search_input\">\n <img src=\"images/search.svg\" alt=\"\" />\n <input\n type=\"number\"\n placeholder=\"Filter\"\n [(ngModel)]=\"\n col.filters![0].filterValue\n \"\n (input)=\"applyAllFilters(col)\"\n />\n </div>\n\n @if (col.filters![0].filterValue) {\n <div class=\"logic-row cats-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(col)\"\n />\n <label class=\"label\" [for]=\"$index\"\n >AND</label\n >\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(col)\"\n />\n <label class=\"label\" [for]=\"$index + 1\"\n >OR</label\n >\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 =\n $event;\n applyAllFilters(col)\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)]=\"\n col.filters![1].filterValue\n \"\n (keyup)=\"applyAllFilters(col)\"\n />\n </div>\n <!-- <input\n type=\"text\"\n [(ngModel)]=\"col.filters[1].filterValue\"\n placeholder=\"Filter…\"\n (keyup)=\"applyAllFilters(col)\"\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 =\n $event;\n applyAllFilters(col)\n \"\n ></lib-common-input>\n\n <!-- <input\n type=\"date\"\n [(ngModel)]=\"col.filters[0].filterValue\"\n (change)=\"applyAllFilters(col)\"\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 cats-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(col)\"\n />\n <label class=\"label\" [for]=\"$index\"\n >AND</label\n >\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(col)\"\n />\n <label class=\"label\" [for]=\"$index + 1\"\n >OR</label\n >\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 =\n $event;\n applyAllFilters(col)\n \"\n ></lib-common-input>\n\n <lib-common-calendar\n [dateConfig]=\"dateConfig\"\n [(ngModel)]=\"\n col.filters![1].filterValue\n \"\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=\"cats-checkbox_container\">\n <input\n class=\"custom_check_box\"\n type=\"checkbox\"\n [checked]=\"isAllSelected(col)\"\n (change)=\"\n toggleSelectAll(col, $event)\n \"\n />\n (Select All)\n </label>\n <div\n class=\"set-options\"\n id=\"table_scroll\"\n >\n @for (\n opt of col.filteredOptions;\n track $index\n ) {\n <label\n class=\"cats-checkbox_container\"\n >\n <input\n class=\"custom_check_box\"\n type=\"checkbox\"\n [checked]=\"\n col.selectedValues!.has(opt)\n \"\n (change)=\"\n toggleSetOption(\n col,\n opt,\n $event\n )\n \"\n />\n {{ opt }}\n </label>\n }\n </div>\n </div>\n }\n <div class=\"filter-btn\">\n <button\n class=\"filter-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) {\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=\"header-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\" ||\n !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\" ||\n !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 ((col.colId &&\n pinActionClicked[col.colId]) ??\n \"none\") === \"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 }\n </thead>\n\n <tbody>\n @if (showSkeleton) {\n @for (r of skeletonRows; track $index) {\n <tr>\n @for (c of skeletonCols; track $index) {\n <td>\n <div class=\"line\"></div>\n </td>\n }\n </tr>\n }\n } @else {\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=\"cats-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=\"cats-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\n class=\"label\"\n [for]=\"'row_' + row.trackKey\"\n ></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)=\"\n toggle(row.node, row.level, row.path)\n \"\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 (\n showLinkFor(row) && linkUrlFor(row);\n as url\n ) {\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\n class=\"ellipsis\"\n [appTooltip]=\"\n getValue(row.node, col.fieldName) || 'N/A'\n \"\n tooltipPosition=\"adaptive\"\n [tooltipParentContainer]=\"parent\"\n >\n {{\n getValue(row.node, col.fieldName) || \"N/A\"\n }}</span\n >\n } @else {\n <div\n [rowParam]=\"row.node\"\n [col]=\"col\"\n [api]=\"tableOptions\"\n [currentValue]=\"\n getValue(row.node, col.fieldName)\n \"\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]=\"\n columns.length + (checkBoxSelection ? 1 : 0)\n \"\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]=\"\n columns.length + (checkBoxSelection ? 1 : 0)\n \"\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 }\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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AAA,iBAAiB,EAAA,OAAA,EAClB;wBACP,YAAY;wBACZ,WAAW;wBACX,qBAAqB;wBACrB,yBAAyB;wBACzB,uBAAuB;wBACvB,gBAAgB;wBAChB,oBAAoB;wBACpB,uBAAuB;AACxB,qBAAA,EAAA,QAAA,EAAA,w4tDAAA,EAAA,MAAA,EAAA,CAAA,2yxCAAA,CAAA,EAAA;;sBAOA,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,OAAO,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;;sBACnC,SAAS;uBAAC,SAAS;;sBACnB;;sBACA;;sBAGA;;sBAEA;;sBAEA;;sBACA;;sBACA;;sBAEA;;sBACA;;sBAEA;;sBACA;;sBACA;;sBAEA;;sBACA;;sBACA;;sBACA;;sBACA;;sBAEA;;sBAGA;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBAEA;;sBACA;;sBACA;;sBACA;;sBAEA;;sBAOA;;sBAMA;;sBAOA;;sBAEA;;sBACA;;sBACA;;sBAGA;;sBACA;;sBACA;;sBACA;;sBACA;;sBAiDA;;sBACA;;;AElPH;;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/common-components/tooltip/tooltip.component.ts","../../../projects/cats-data-grid/src/lib/common-components/tooltip/tooltip.component.html","../../../projects/cats-data-grid/src/lib/directives/tooltip.directive.ts","../../../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/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(\n private el: ViewContainerRef,\n private er: ElementRef,\n ) {}\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 = 'cats-see-more-data';\n itemDiv.className = 'cats-item';\n descDiv.className = 'cats-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 { 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 templateUrl: './tooltip.component.html',\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 get styleObj() {\n return {\n 'background-color': this.bgColor,\n color: this.textColor,\n padding: this.padding,\n 'font-size': this.fontSize,\n 'border-radius': this.borderRadius,\n 'max-width': this.maxWidth,\n };\n }\n}\n","<div\n class=\"app-tooltip-wrapper\"\n [ngClass]=\"'tooltip-' + position\"\n [ngStyle]=\"styleObj\"\n>\n {{ content }}\n <div class=\"tooltip-arrow\"></div>\n</div>\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 this.ngZone.onStable.subscribe(() => {\n const el = this.elementRef.nativeElement;\n\n if (!el.isConnected || !document.body.contains(el)) {\n this.hide();\n }\n });\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(\n '.app-tooltip-wrapper',\n ) as HTMLElement;\n\n // If direct query didn't work, try the root element\n if (!this.tooltipElement) {\n this.tooltipElement = (\n componentRef.location.nativeElement as HTMLElement\n ).children[0] as HTMLElement;\n }\n\n // If still not found, use the whole element\n if (!this.tooltipElement) {\n this.tooltipElement = componentRef.location\n .nativeElement as HTMLElement;\n }\n\n // Append to body to avoid layout issues\n this.renderer.appendChild(\n document.body,\n componentRef.location.nativeElement,\n );\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(\n 'Tooltip directive: Error creating tooltip component',\n error,\n );\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 =\n this.elementRect.left +\n this.elementRect.width / 2 -\n tooltipRect.width / 2;\n break;\n case 'bottom':\n top = this.elementRect.bottom + gap;\n left =\n this.elementRect.left +\n this.elementRect.width / 2 -\n tooltipRect.width / 2;\n break;\n case 'left':\n top =\n this.elementRect.top +\n this.elementRect.height / 2 -\n tooltipRect.height / 2;\n left = this.elementRect.left - tooltipRect.width - gap;\n break;\n case 'right':\n top =\n this.elementRect.top +\n this.elementRect.height / 2 -\n 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(\n this.tooltipElement,\n 'data-arrow-pos',\n arrowPos,\n );\n this.renderer.setStyle(this.tooltipElement, 'position', 'fixed');\n this.renderer.setStyle(\n this.tooltipElement,\n 'top',\n `${Math.round(top)}px`,\n );\n this.renderer.setStyle(\n this.tooltipElement,\n 'left',\n `${Math.round(left)}px`,\n );\n });\n }\n\n private hide(): void {\n this.isTooltipShown = false;\n if (this.tooltipElement && this.tooltipElement.parentNode) {\n this.renderer.removeChild(\n this.tooltipElement.parentNode,\n this.tooltipElement,\n );\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","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';\nimport { TooltipDirective } from './directives/tooltip.directive';\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 TooltipDirective,\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({ required: true }) rowData: any[] = [];\n @Input({ required: true }) 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 @Input() bigRows: boolean = false;\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() onColConfigChange = 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 categorizedCols: any = {};\n noCategoryCols: any[] = [];\n objectKeys = Object.keys;\n allActiveDefault = false;\n allActiveColMap: Record<string, boolean> = {};\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 @Input() isRowsEditable: boolean = false;\n @Input() showSkeleton: 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 @Input() skeletonRowsLength: number = 8;\n @Input() skeletonColsLength: number = 8;\n skeletonRows: any = [];\n skeletonCols: any = [];\n allActiveCol: boolean = false;\n originalCategorizedCols: any = {};\n originalNoCategoryCols: any[] = [];\n constructor(\n private renderer: Renderer2,\n private zone: NgZone,\n private cd: ChangeDetectorRef,\n ) {}\n\n ngOnInit(): void {}\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['skeletonColsLength']?.currentValue) {\n this.skeletonColsLength = changes['skeletonColsLength']?.currentValue;\n }\n\n if (changes['showSkeleton']) {\n this.showSkeleton = changes['showSkeleton']?.currentValue;\n }\n\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\n if (changes['colDefs']?.currentValue) {\n // this.resetPagination();\n const colDefs = changes['colDefs']?.currentValue;\n if (colDefs.length > 0) {\n this.skeletonColsLength = changes['colDefs']?.currentValue.length;\n }\n this.skeletonCols = Array.from(\n { length: this.skeletonColsLength },\n (_, i) => i,\n );\n this.skeletonRows = Array.from(\n { length: this.skeletonRowsLength },\n (_, i) => i,\n );\n\n this.colDefs = this.getUpdatedColDefs(changes['colDefs']?.currentValue);\n setTimeout(() => {\n this.applyAllFilters();\n });\n this.originalColDefs = this.cloneColDefs(this.colDefs);\n const result = this.getColConfigCategory(this.colDefs);\n\n this.originalCategorizedCols = JSON.parse(\n JSON.stringify(result.categorized),\n );\n this.originalNoCategoryCols = JSON.parse(\n JSON.stringify(result.noCategory),\n );\n\n this.categorizedCols = result.categorized;\n this.noCategoryCols = result.noCategory;\n\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.push(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 onColConfigSearch(event: any) {\n const text: string = (event.target as HTMLInputElement).value\n .toLowerCase()\n .trim();\n if (!text) {\n this.categorizedCols = { ...this.originalCategorizedCols };\n this.noCategoryCols = this.cloneColDefs(this.originalNoCategoryCols);\n return;\n }\n this.noCategoryCols = this.originalNoCategoryCols.filter((dt: any) =>\n dt.headerName.toLowerCase().includes(text),\n );\n\n const filteredCategories: any = {};\n\n Object.keys(this.originalCategorizedCols).forEach((category) => {\n const filteredCols = this.originalCategorizedCols[category].filter(\n (col: any) => col.headerName.toLowerCase().includes(text),\n );\n\n if (filteredCols.length > 0) {\n filteredCategories[category] = filteredCols;\n }\n });\n\n this.categorizedCols = filteredCategories;\n }\n\n cloneColDefs(colDefs: any[]) {\n return colDefs.map((col) => ({\n ...col,\n active: col.active,\n\n cellRendererParams: col.cellRendererParams\n ? { ...col.cellRendererParams }\n : col.cellRendererParams,\n }));\n }\n\n resetDefaultColConfig() {\n this.colDefs = this.cloneColDefs(this.originalColDefs);\n const result = this.getColConfigCategory(this.colDefs);\n\n this.originalCategorizedCols = JSON.parse(\n JSON.stringify(result.categorized),\n );\n this.originalNoCategoryCols = this.cloneColDefs(result.noCategory);\n\n this.categorizedCols = result.categorized;\n this.noCategoryCols = result.noCategory;\n\n this.allActiveDefault = this.originalNoCategoryCols.every(\n (c: any) => c.active || c.headerLocked,\n );\n\n this.updateGlobalState();\n }\n\n /**\n * Autosize column to fit content\n */\n protected autosizeColumn(col: any): 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.colDefs.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 // getColConfigCategory(colDefs:any){\n // const colArr = []\n // colDefs.forEach((col:any) => {\n // if(col.category){\n\n // };\n // })\n // }\n\n getColConfigCategory(colDefs: any[]) {\n const categorized: Record<string, any[]> = {};\n const noCategory: any[] = [];\n\n colDefs.forEach((col: any) => {\n if (col.category) {\n // create array if not exists\n if (!categorized[col.category]) {\n categorized[col.category] = [];\n }\n\n categorized[col.category].push(col);\n } else {\n noCategory.push(col);\n }\n });\n\n return {\n categorized,\n noCategory,\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 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 showAllSelection() {\n const newState = !this.allActiveDefault;\n\n this.colDefs.forEach((col) => {\n if (!col.category && !col.headerLocked) {\n col.active = newState;\n }\n });\n\n this.allActiveDefault = newState;\n\n this.updateGlobalState();\n this.activeAll = this.colDefs.every((dt) => dt.active);\n this.getActiveCols();\n this.atLeastOneColumnChecked = this.colDefs.some((dt) => dt.active);\n }\n\n showAllDefaultSelection() {\n this.allActiveDefault = !this.allActiveDefault;\n\n this.noCategoryCols.forEach((col: any) => {\n if (!col.headerLocked) {\n col.active = this.allActiveDefault;\n }\n });\n this.rebuildView();\n this.updateGlobalState();\n }\n\n rebuildView() {\n const result = this.getColConfigCategory(this.colDefs);\n this.categorizedCols = result.categorized;\n this.noCategoryCols = result.noCategory;\n }\n\n showAllCategorySelection(category: string) {\n const newState = !this.allActiveColMap[category];\n\n this.colDefs.forEach((col) => {\n if (col.category === category && !col.headerLocked) {\n col.active = newState;\n }\n });\n\n this.allActiveColMap[category] = newState;\n this.rebuildView();\n this.updateGlobalState();\n }\n\n toggleSelectedCol(col: any) {\n if (col.headerLocked) return;\n col = this.colDefs.find((c) => c.colId === col.colId);\n\n if (!col) return;\n\n col.active = !col.active;\n if (col.category) {\n const category = col.category;\n\n this.allActiveColMap[category] = this.categorizedCols[category].every(\n (c: any) => c.active || c.headerLocked,\n );\n } else {\n this.allActiveDefault = this.noCategoryCols.every(\n (c: any) => c.active || c.headerLocked,\n );\n }\n this.rebuildView();\n this.updateGlobalState();\n }\n\n updateGlobalState() {\n const allCols = [\n ...this.noCategoryCols,\n ...Object.values(this.categorizedCols).flat(),\n ];\n this.activeAll = allCols.every((dt) => dt.active);\n this.atLeastOneColumnChecked = allCols.some((dt) => dt.active);\n\n this.getActiveCols();\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 const x = c.fieldName.split('.')[0];\n return x;\n }\n return c.fieldName;\n });\n this.onColConfigChange.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.applyAllFilters();\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 this.applyAllFilters();\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 = `${col.width ?? 60}px`;\n style.minWidth = `${col.minWidth ?? 60}px`;\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=\"cats-tableArea\" [ngClass]=\"{ large: bigRows }\" #table>\n @if (settingsRequired && settingsClicked) {\n <div\n class=\"setting-options\"\n appOutsideClick\n (clickOutside)=\"hideSettings()\"\n >\n <div class=\"header-section\">\n <div class=\"column-header\">CONFIGURE Column</div>\n <div class=\"reset-default\" (click)=\"resetDefaultColConfig()\">\n Reset to default\n </div>\n </div>\n\n <div class=\"header-search-wrapper\">\n <div class=\"search_input\">\n <img src=\"images/search.svg\" alt=\"\" />\n <input\n type=\"text\"\n placeholder=\"Type to Search\"\n (input)=\"onColConfigSearch($event)\"\n />\n </div>\n </div>\n <div class=\"border-divider\"></div>\n\n <!-- <div class=\"add-more\">\n <div class=\"add-more-text\">Add more</div>\n <img src=\"images/add-more-right-blue.svg\" alt=\"\" />\n </div>\n <div class=\"border-divider\"></div> -->\n <div id=\"table_scroll\" class=\"setting-item-container\">\n <div class=\"setting-item-wrapper\">\n @if (noCategoryCols.length > 0) {\n <div\n class=\"setting-column-item item-title\"\n (click)=\"showAllDefaultSelection()\"\n >\n <!-- <input\n class=\"custom_check_box\"\n type=\"checkbox\"\n [checked]=\"activeAll\"\n (change)=\"activeAllSelection($event)\"\n /> -->\n @if (allActiveDefault) {\n <img\n class=\"eye-icon\"\n src=\"images/eye-custom-header.svg\"\n alt=\"\"\n />\n } @else {\n <img\n class=\"eye-icon\"\n src=\"images/eye-off-custom-header.svg\"\n alt=\"\"\n />\n }\n <span>Default</span>\n </div>\n }\n @for (col of noCategoryCols; track col.colId) {\n <div\n class=\"setting-column-item\"\n (click)=\"toggleSelectedCol(col)\"\n [ngClass]=\"{ disable: col.headerLocked }\"\n >\n @if (col.active) {\n <img\n class=\"eye-icon\"\n src=\"images/eye-custom-header.svg\"\n alt=\"\"\n />\n } @else {\n <img\n class=\"eye-icon\"\n src=\"images/eye-off-custom-header.svg\"\n alt=\"\"\n />\n }\n\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 @for (category of objectKeys(categorizedCols); track category) {\n <div class=\"setting-item-wrapper\">\n <div\n class=\"setting-column-item item-title\"\n (click)=\"showAllCategorySelection(category)\"\n >\n <!-- <input\n class=\"custom_check_box\"\n type=\"checkbox\"\n [checked]=\"activeAll\"\n (change)=\"activeAllSelection($event)\"\n /> -->\n @if (allActiveColMap[category]) {\n <img\n class=\"eye-icon\"\n src=\"images/eye-custom-header.svg\"\n alt=\"\"\n />\n } @else {\n <img\n class=\"eye-icon\"\n src=\"images/eye-off-custom-header.svg\"\n alt=\"\"\n />\n }\n <span>{{ category | titlecase }}</span>\n </div>\n <!-- Category Title -->\n\n <!-- <div class=\"setting-column-item item-title\">\n <span>{{ category | titlecase }}</span>\n </div> -->\n\n <!-- Columns inside category -->\n @for (col of categorizedCols[category]; track col.colId) {\n <div\n class=\"setting-column-item\"\n (click)=\"toggleSelectedCol(col)\"\n [ngClass]=\"{ disable: col.headerLocked }\"\n >\n @if (col.active) {\n <img class=\"eye-icon\" src=\"images/eye-custom-header.svg\" />\n } @else {\n <img\n class=\"eye-icon\"\n src=\"images/eye-off-custom-header.svg\"\n />\n }\n\n <span>{{ col.headerName | titlecase }}</span>\n </div>\n }\n </div>\n }\n </div>\n </div>\n }\n @if (activeFilters.size > 0) {\n <div class=\"active-filters-container\">\n <div class=\"filter-static-label\">Filter by:</div>\n <div class=\"filter-tag-wrapper\" id=\"table_scroll\">\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 @if (groupByRequired && colDefs.length > 0) {\n <!-- Group Panel -->\n <div\n class=\"table-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\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 @if (colDefs?.length === 0 && showSkeleton) {\n <tr>\n @for (c of skeletonCols; track $index) {\n <th>\n <div class=\"th-wraper\">\n <div class=\"line\"></div>\n </div>\n </th>\n }\n </tr>\n } @else {\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=\"cats-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 <!-- Add icon -->\n @if (col?.headerIcon) {\n <div\n [appTooltip]=\"col?.tooltipText\"\n tooltipPosition=\"adaptive\"\n [tooltipParentContainer]=\"parent\"\n class=\"filters\"\n >\n <img\n [src]=\"col?.headerIcon\"\n alt=\"image\"\n class=\"filter-icon\"\n />\n </div>\n }\n\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 cats-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 class=\"label\" [for]=\"$index\"\n >AND</label\n >\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 class=\"label\" [for]=\"$index + 1\"\n >OR</label\n >\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 =\n $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)]=\"\n col.filters[1].filterValue\n \"\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 cats-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 class=\"label\" [for]=\"$index\"\n >AND</label\n >\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 class=\"label\" [for]=\"$index + 1\"\n >OR</label\n >\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 =\n $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)]=\"\n col.filters[1].filterValue\n \"\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 cats-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 class=\"label\" [for]=\"$index\"\n >AND</label\n >\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 class=\"label\" [for]=\"$index + 1\"\n >OR</label\n >\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 =\n $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=\"cats-checkbox_container\">\n <input\n class=\"custom_check_box\"\n type=\"checkbox\"\n [checked]=\"isAllSelected(col)\"\n (change)=\"\n toggleSelectAll(col, $event)\n \"\n />\n Select All\n </label>\n <div\n class=\"set-options\"\n id=\"table_scroll\"\n >\n @for (\n opt of col.filteredOptions;\n track $index\n ) {\n <label\n class=\"cats-checkbox_container\"\n >\n <input\n class=\"custom_check_box\"\n type=\"checkbox\"\n [checked]=\"\n col.selectedValues.has(opt)\n \"\n (change)=\"\n toggleSetOption(\n col,\n opt,\n $event\n )\n \"\n />\n <span class=\"textTruncate\">\n {{ opt }}\n </span>\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 <button\n class=\"reset_btn\"\n type=\"button\"\n (click)=\"applyAllFilters()\"\n >\n Apply\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=\"header-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\n class=\"right_click_item\"\n (click)=\"autosizeColumn(col)\"\n >\n <div class=\"left_item\">\n <img src=\"images/autosize-this.svg\" alt=\"\" />\n <span class=\"text\">Autosize This Column</span>\n </div>\n </div>\n <div\n class=\"right_click_item\"\n (click)=\"autosizeAllColumns()\"\n >\n <div class=\"left_item\">\n <img src=\"images/autosize-all.svg\" 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=\"images/rotate-ccw.svg\" alt=\"\" />\n <span class=\"text\">Reset Columns</span>\n </div>\n </div> -->\n </div>\n </div>\n }\n </th>\n }\n }\n </tr>\n }\n </thead>\n\n <tbody>\n @if (showSkeleton) {\n @for (r of skeletonRows; track $index) {\n <tr>\n @for (c of skeletonCols; track $index) {\n <td>\n <div class=\"line\"></div>\n </td>\n }\n </tr>\n }\n } @else {\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=\"cats-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\n class=\"cats-see-more-data\"\n id=\"table_scroll\"\n >\n <div class=\"cats-item\">\n <span class=\"cats-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=\"cats-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=\"cats-radio-option\">\n <input\n type=\"radio\"\n name=\"\"\n id=\"{{ data.rowId }}\"\n [checked]=\"data?.isSelected\"\n (change)=\"onRowCheckboxSelection($event)\"\n />\n <label class=\"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 (\n isRowsEditable &&\n isCellDblClicked[col.colId + \"-\" + data.rowId]\n ) {\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\n class=\"gripper-img\"\n src=\"images/gripper.svg\"\n />\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 <span\n class=\"node_label\"\n [appTooltip]=\"\n parseColValue(data, col) || 'N/A'\n \"\n tooltipPosition=\"adaptive\"\n [tooltipParentContainer]=\"parent\"\n >{{ parseColValue(data, col) }}</span\n >\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]=\"\n data[col.fieldName] || parseColValue(data, col)\n \"\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 }\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=\"cats-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=\"cats-see-more-data\" id=\"table_scroll\">\n <div class=\"cats-item\">\n <span class=\"cats-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 && colDefs.length > 0) {\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=\"header-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, Input, 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';\nimport { TooltipDirective } from '../../directives/tooltip.directive';\n\n@Component({\n selector: 'lib-common-renderer',\n imports: [\n OutsideClickDirective,\n AdaptivePositionDirective,\n CommonModule,\n AddClassPipe,\n TooltipDirective,\n ],\n templateUrl: './common-renderer.component.html',\n styleUrl: './common-renderer.component.scss',\n})\nexport class CommonRendererComponent {\n parentContainer!: HTMLElement;\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 this.parentContainer = document.body;\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('.cats-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('.cats-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 } 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 class=\"tag_wrapper\" #tagTrigger (mouseout)=\"closeDropdown($event)\">\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 <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 <span\n class=\"node_label\"\n [appTooltip]=\"tag.tagValue || 'N/A'\"\n tooltipPosition=\"adaptive\"\n [tooltipParentContainer]=\"parentContainer\"\n >{{ tag.tagValue }}</span\n >\n </div>\n </div>\n </div>\n </div>\n }\n @if (hiddenCount > 0) {\n <div class=\"hidden_list\">\n <span class=\"tag_more\" (mouseover)=\"toggleDropdown($event)\"\n >+{{ hiddenCount }}</span\n >\n @if (openDropdown) {\n <div\n class=\"cats-tag-dropdown\"\n id=\"table_scroll\"\n adaptivePosition\n [trigger]=\"tagTrigger\"\n [matchWidth]=\"false\"\n >\n @for (tag of allTags; track $index) {\n <div class=\"{{ 'dropdown_item' + ' ' + tag.class }}\">\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 [appTooltip]=\"linkVal || 'N/A'\"\n tooltipPosition=\"adaptive\"\n [tooltipParentContainer]=\"parentContainer\"\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 { 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';\nimport { CommonInputComponent } from '../common-input/common-input.component';\nimport {\n CommonCalendarComponent,\n DateConfig,\n} from '../common-calendar/common-calendar.component';\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: [\n CommonModule,\n FormsModule,\n OutsideClickDirective,\n AdaptivePositionDirective,\n RendererParserDirective,\n TooltipDirective,\n CommonInputComponent,\n CommonCalendarComponent,\n ],\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{\n @ViewChild('table', { static: true }) tableAreaRef!: ElementRef<HTMLElement>;\n @ViewChild('pinMenu') pinMenu?: ElementRef<HTMLElement>;\n @Input() data: T[] = [];\n @Input() columns: CatsTreeTableColumn[] = [\n { fieldName: 'name', header: 'Name' },\n ];\n @Input() tableOptions: any = {};\n\n @Input() idField: string = 'id';\n rowId: string = 'rowId';\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 @Input() expandAllNodes: boolean = false;\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: (\n node: T,\n level: number,\n path: T[],\n ) => CatsTreeRowOptions = () => ({});\n\n @Input() nodeIconResolver: (\n node: T,\n level: number,\n path: T[],\n expanded: boolean,\n ) => string | null = () => null;\n\n @Input() linkResolver: (node: T, level: number, path: T[]) => string | null =\n () => null;\n @Input() showSkeleton: boolean = false;\n @Output() nodeToggle = new EventEmitter<CatsTreeExpandEvent<T>>();\n @Output() selectionChange = new EventEmitter<\n CatsTreeSelectionChangeEvent<T>\n >();\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 @Output() onColConfigChange = new EventEmitter();\n dateConfig: DateConfig = {\n selectionMode: 'single',\n enableTime: false,\n };\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 activeFilters: Set<any> = new Set<any>();\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 originalCategorizedCols: any = {};\n originalNoCategoryCols: any[] = [];\n\n @Input() skeletonRowsLength: number = 8;\n @Input() skeletonColsLength: number = 8;\n skeletonRows: any = [];\n skeletonCols: any = [];\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 private originalExpandedKeys = new Set<any>();\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 activeColumns: CatsTreeTableColumn[] = [];\n categorizedCols: any = {};\n noCategoryCols: any[] = [];\n objectKeys = Object.keys;\n allActiveDefault = false;\n allActiveColMap: Record<string, boolean> = {};\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(\n el,\n 'dragover',\n (event: DragEvent) => {\n if (this.isResizing) return;\n event.preventDefault();\n\n const th = (event.target as HTMLElement | null)?.closest?.(\n 'th',\n ) 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\n this.removeDrop = this.renderer.listen(el, 'drop', (event: DragEvent) => {\n event.preventDefault();\n\n const th = (event.target as HTMLElement | null)?.closest?.(\n 'th',\n ) 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 getUpdatedColDefs(colDefs: any[]) {\n const flattenTree = (data: any[]): any[] => {\n const result: any[] = [];\n\n const recurse = (nodes: any[], parentTreeId = '') => {\n nodes.forEach((node) => {\n const currentTreeId = parentTreeId + node[this.idField];\n node[this.rowId] = currentTreeId;\n result.push(node);\n if (node.array && Array.isArray(node.array)) {\n recurse(node.array, currentTreeId);\n }\n });\n };\n\n recurse(data);\n return result;\n };\n\n const flatRows = flattenTree(this.data);\n\n return colDefs.map((col, index) => {\n // Reset sorting type per column\n this.sortingType[index] = '';\n\n col.colId = `${Date.now()}_${index}`;\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 // --------------------------------------------------------------------\n // SET FILTER TYPE\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 filters: [\n {\n filterOperation: '=',\n filterValue: '',\n },\n {\n filterOperation: '=',\n filterValue: '',\n },\n ],\n };\n break;\n\n case 'set':\n let fieldName = col.fieldName;\n\n if (fieldName.includes('.')) {\n fieldName = fieldName.split('.')[0];\n }\n\n const options = [\n ...new Set(\n flatRows\n .flatMap((r: any) =>\n this.normalizeSetFilterType(\n r[fieldName],\n col?.cellRendererParams?.tagKey,\n ),\n )\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 // --------------------------------------------------------------------\n // RESTORE APPLIED FILTERS (PERSISTENCE)\n // --------------------------------------------------------------------\n if (this.appliedFilters.length > 0) {\n const appliedFilter = this.appliedFilters.find(\n (f) => f.fieldName === col.fieldName,\n );\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 break;\n\n case 'set':\n let fieldName = col.fieldName;\n if (fieldName.includes('.')) {\n fieldName = fieldName.split('.')[0];\n }\n\n const options = [\n ...new Set(\n flatRows\n .flatMap((r: any) =>\n this.normalizeSetFilterType(\n r[fieldName],\n col?.cellRendererParams?.tagKey,\n ),\n )\n .filter(Boolean),\n ),\n ];\n\n const selectedValues = new Set(\n appliedFilter.filters.map((f: any) => f.filterValue),\n );\n\n updatedCol = {\n ...updatedCol,\n options,\n filteredOptions: options,\n selectedValues,\n };\n break;\n }\n }\n }\n\n return updatedCol;\n });\n }\n\n cloneColDefs(colDefs: any[]) {\n return colDefs.map((col) => ({\n ...col,\n active: col.active,\n\n cellRendererParams: col.cellRendererParams\n ? { ...col.cellRendererParams }\n : col.cellRendererParams,\n }));\n }\n\n resetDefaultColConfig() {\n this.columns = this.cloneColDefs(this.originalColumns);\n const result = this.getColConfigCategory(this.columns);\n\n this.originalCategorizedCols = JSON.parse(\n JSON.stringify(result.categorized),\n );\n this.originalNoCategoryCols = this.cloneColDefs(result.noCategory);\n\n this.categorizedCols = result.categorized;\n this.noCategoryCols = result.noCategory;\n\n this.allActiveDefault = this.originalNoCategoryCols.every(\n (c: any) => c.active || c.headerLocked,\n );\n\n this.updateGlobalState();\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 ngOnChanges(changes: SimpleChanges): void {\n if (changes['skeletonColsLength']?.currentValue) {\n this.skeletonColsLength = changes['skeletonColsLength']?.currentValue;\n }\n\n if (changes['showSkeleton']) {\n this.showSkeleton = changes['showSkeleton']?.currentValue;\n }\n\n if (changes['data'] || changes['columns']) {\n const columns = changes['columns']?.currentValue;\n if (columns?.length > 0) {\n this.skeletonColsLength = changes['columns']?.currentValue.length;\n }\n this.skeletonCols = Array.from(\n { length: this.skeletonColsLength },\n (_, i) => i,\n );\n this.skeletonRows = Array.from(\n { length: this.skeletonRowsLength },\n (_, i) => i,\n );\n // this.initializeColumns();\n const colDefs = changes['columns']?.currentValue;\n if (Array.isArray(colDefs)) {\n this.columns = this.getUpdatedColDefs(colDefs);\n this.originalColumns = this.cloneColDefs(this.columns);\n const result = this.getColConfigCategory(this.columns);\n\n this.originalCategorizedCols = JSON.parse(\n JSON.stringify(result.categorized),\n );\n this.originalNoCategoryCols = JSON.parse(\n JSON.stringify(result.noCategory),\n );\n\n this.categorizedCols = result.categorized;\n this.noCategoryCols = result.noCategory;\n }\n\n this.originalRowData = structuredClone(this.data || []);\n if (this.expandAllNodes) {\n this.applyExpandAllInputState();\n }\n this.rebuildRows();\n }\n\n if (\n changes['expandAllNodes'] &&\n !changes['expandAllNodes'].firstChange &&\n !changes['data']\n ) {\n this.applyExpandAllInputState();\n this.rebuildRows();\n }\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 getColConfigCategory(colDefs: any[]) {\n const categorized: Record<string, any[]> = {};\n const noCategory: any[] = [];\n\n colDefs.forEach((col: any) => {\n if (col.category) {\n // create array if not exists\n if (!categorized[col.category]) {\n categorized[col.category] = [];\n }\n\n categorized[col.category].push(col);\n } else {\n noCategory.push(col);\n }\n });\n\n return {\n categorized,\n noCategory,\n };\n }\n onColConfigSearch(event: any) {\n const text: string = (event.target as HTMLInputElement).value\n .toLowerCase()\n .trim();\n if (!text) {\n this.categorizedCols = { ...this.originalCategorizedCols };\n this.noCategoryCols = this.cloneColDefs(this.originalNoCategoryCols);\n return;\n }\n this.noCategoryCols = this.originalNoCategoryCols.filter((dt: any) =>\n dt.header.toLowerCase().includes(text),\n );\n\n const filteredCategories: any = {};\n\n Object.keys(this.originalCategorizedCols).forEach((category) => {\n const filteredCols = this.originalCategorizedCols[category].filter(\n (col: any) => col.header.toLowerCase().includes(text),\n );\n\n if (filteredCols.length > 0) {\n filteredCategories[category] = filteredCols;\n }\n });\n\n this.categorizedCols = filteredCategories;\n }\n showAllDefaultSelection() {\n this.allActiveDefault = !this.allActiveDefault;\n\n this.noCategoryCols.forEach((col: any) => {\n if (!col.headerLocked) {\n col.active = this.allActiveDefault;\n }\n });\n this.rebuildView();\n this.updateGlobalState();\n }\n\n rebuildView() {\n const result = this.getColConfigCategory(this.columns);\n this.categorizedCols = result.categorized;\n this.noCategoryCols = result.noCategory;\n }\n\n showAllCategorySelection(category: string) {\n const newState = !this.allActiveColMap[category];\n\n this.columns.forEach((col: any) => {\n if (col.category === category && !col.headerLocked) {\n col.active = newState;\n }\n });\n\n this.allActiveColMap[category] = newState;\n this.rebuildView();\n this.updateGlobalState();\n }\n\n toggleSelectedCol(col: any) {\n if (col.headerLocked) return;\n col = this.columns.find((c) => c.colId === col.colId);\n\n if (!col) return;\n\n col.active = !col.active;\n if (col.category) {\n const category = col.category;\n\n this.allActiveColMap[category] = this.categorizedCols[category].every(\n (c: any) => c.active || c.headerLocked,\n );\n } else {\n this.allActiveDefault = this.noCategoryCols.every(\n (c: any) => c.active || c.headerLocked,\n );\n }\n this.rebuildView();\n this.updateGlobalState();\n }\n\n updateGlobalState() {\n const allCols = [\n ...this.noCategoryCols,\n ...Object.values(this.categorizedCols).flat(),\n ];\n\n this.activeAll = allCols.every((dt) => dt.active);\n this.atLeastOneColumnChecked = allCols.some((dt) => dt.active);\n\n this.getActiveCols();\n }\n\n getActiveCols() {\n const activeCols = this.columns\n .filter((col: any) => col.active)\n .map((c: any) => {\n if (c.fieldName.includes('.')) {\n const x = c.fieldName.split('.')[0];\n return x;\n }\n return c.fieldName;\n });\n this.onColConfigChange.emit(activeCols);\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(\n (c) => c.fieldName === this.resolvedTreeColumnField,\n ))\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(\n sortingColumnIndex: number,\n col: CatsTreeTableColumn,\n ): 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(\n col: CatsTreeTableColumn,\n type: string,\n sortingColumIndex: number,\n ): 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 applyAllFilters(col?: any): void {\n // Collect active filter columns\n const activeCols = this.columns.filter(\n (c) =>\n c.filterable &&\n c.filterType === 'text' &&\n c.filters?.some((f) => f.filterValue?.trim()),\n );\n\n if (activeCols.length === 0) {\n this.filteredData = structuredClone(this.originalRowData);\n this.data = this.filteredData;\n this.activeFilters.clear();\n this.expandedKeys = new Set(this.originalExpandedKeys);\n this.rebuildRows();\n return;\n }\n\n let filtered = structuredClone(this.originalRowData);\n\n if (col && col.filters?.every((c: any) => !c.filterValue)) {\n this.activeFilters.delete(col.fieldName);\n }\n for (const col of activeCols) {\n this.activeFilters.add(col.fieldName);\n\n filtered = this.filterTreeByColumn(filtered, col);\n }\n\n this.expandedKeys.clear();\n this.expandAllParentsAfterFilter(filtered);\n\n this.filteredData = filtered;\n this.data = filtered;\n this.rebuildRows();\n }\n\n private filterTreeByColumn(nodes: any[], col: any): any[] {\n const result = [];\n\n for (const node of nodes) {\n const children = node.array || [];\n\n const matches = this.matchesSingleColumn(node, col);\n\n if (matches) {\n // Node matches → keep node + all children\n result.push({\n ...node,\n array: structuredClone(children),\n });\n continue;\n }\n\n let filteredChildren = [];\n\n if (children.length > 0) {\n filteredChildren = this.filterTreeByColumn(children, col);\n }\n\n if (filteredChildren.length > 0) {\n result.push({\n ...node,\n array: filteredChildren,\n });\n }\n }\n\n return result;\n }\n\n private matchesSingleColumn(row: any, col: any): boolean {\n const f1 = col.filters[0];\n const f2 = col.filters[1];\n\n const fieldValue = String(this.getValue(row, col.fieldName)).toLowerCase();\n\n const fv1 = f1?.filterValue?.toLowerCase() || '';\n const fv2 = f2?.filterValue?.toLowerCase() || '';\n\n const op1 = f1?.filterOperation || '';\n const op2 = f2?.filterOperation || '';\n const logic = col.filterLogic || 'AND';\n\n const hasF1 = fv1 !== '';\n const hasF2 = fv2 !== '';\n\n if (!hasF1 && !hasF2) return true; // No filter → always match\n\n const m1 = hasF1\n ? this.evaluateTextFilterCondition(op1, fieldValue, fv1)\n : false;\n const m2 = hasF2\n ? this.evaluateTextFilterCondition(op2, fieldValue, fv2)\n : false;\n\n if (hasF1 && !hasF2) return m1;\n if (!hasF1 && hasF2) return m2;\n\n return logic === 'AND' ? m1 && m2 : m1 || m2;\n }\n\n private expandAllParentsAfterFilter(tree: any[]): void {\n const walk = (nodes: any[]) => {\n for (const node of nodes) {\n const children = node.array || node.children;\n const key = this.getNodeKey(node);\n\n if (children && children.length > 0) {\n this.expandedKeys.add(key);\n walk(children);\n }\n }\n };\n\n walk(tree);\n }\n\n /**\n * Evaluate text filter condition\n */\n private 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 * Toggle column filter visibility\n */\n protected toggleFilter(\n col: CatsTreeTableColumn,\n index: number,\n event: MouseEvent,\n ): 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(\n 'document',\n 'mousemove',\n this.onMouseMove,\n );\n this.removeMouseUp = this.renderer.listen(\n 'document',\n 'mouseup',\n this.stopResize,\n );\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(\n col: CatsTreeTableColumn,\n index: number,\n direction: string,\n ): 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(\n (c) => (c.colId || c.fieldName) === key,\n );\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(\n (c) => !c.leftPinned && !c.rightPinned,\n );\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(\n (c) => c.colId || c.fieldName,\n );\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 =\n col.options?.filter((option: any) =>\n String(option).toLowerCase().includes(text),\n ) || [];\n }\n\n /**\n * Toggle set filter option\n */\n protected toggleSetOption(\n col: CatsTreeTableColumn,\n option: any,\n event: any,\n ): 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(\n col: CatsTreeTableColumn,\n event: any,\n ): 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(\n event: Event,\n col: CatsTreeTableColumn,\n ): 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(\n event: MouseEvent,\n col: CatsTreeTableColumn,\n index: number,\n ): 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) =>\n this.selectedKeys.has(this.getNodeKey(child)),\n );\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.selectionChange.emit({\n checked: event.target.checked,\n selectedNodes: this.data || [],\n });\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 (\n this.selectedRow.length > 0 && this.selectedRow.length < this.data.length\n );\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.syncOriginalExpandedKeys();\n this.nodeToggle.emit({ node, level, path, expanded: false });\n this.rebuildRows();\n return;\n }\n\n this.expandedKeys.add(key);\n this.syncOriginalExpandedKeys();\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 showExpandAllControl(col: CatsTreeTableColumn): boolean {\n return (\n col.fieldName === this.treeColumn.fieldName && this.hasExpandableNodes()\n );\n }\n\n protected toggleAllNodes(): void {\n const shouldExpand = !this.areAllExpandableNodesExpanded();\n this.setAllNodesExpandedState(shouldExpand);\n this.rebuildRows();\n }\n\n protected allNodesExpanded(): boolean {\n return this.areAllExpandableNodesExpanded();\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({\n node,\n level,\n path,\n url: this.linkResolver(node, level, path),\n col,\n });\n this.linkClickTimer = null;\n }, this.linkClickDelay);\n }\n\n protected onLinkDoubleClicked(\n e: MouseEvent,\n node: T,\n level: number,\n path: T[],\n col: CatsTreeTableColumn,\n ): 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({\n node,\n level,\n path,\n url: this.linkResolver(node, level, path),\n col,\n });\n }\n\n protected resolveIconSrc(icon: string | null): string | null {\n if (!icon) return null;\n if (\n icon.includes('/') ||\n icon.startsWith('http://') ||\n icon.startsWith('https://')\n ) {\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 || typeof cur !== 'object') 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(\n row.node,\n row.level,\n row.path,\n this.isExpanded(row.node),\n );\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(\n this.totalRecords / this.pageDetails.pageSize,\n );\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 =\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 * 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 applyExpandAllInputState(): void {\n this.setAllNodesExpandedState(this.expandAllNodes);\n }\n\n private setAllNodesExpandedState(expanded: boolean): void {\n if (!expanded) {\n this.expandedKeys.clear();\n this.syncOriginalExpandedKeys();\n return;\n }\n\n const nextExpandedKeys = new Set<string | number>();\n const nodesToEmit: Array<{ node: T; level: number; path: T[] }> = [];\n for (const root of this.data || []) {\n this.collectExpandableNodeKeys(root, 0, [], nextExpandedKeys, nodesToEmit);\n }\n this.expandedKeys = nextExpandedKeys;\n this.syncOriginalExpandedKeys();\n\n for (const item of nodesToEmit) {\n if (this.emitExpandAlways || this.getChildren(item.node) == null) {\n this.nodeToggle.emit({\n node: item.node,\n level: item.level,\n path: item.path,\n expanded: true,\n });\n }\n }\n }\n\n private collectExpandableNodeKeys(\n node: T,\n level: number,\n parentPath: T[],\n out: Set<string | number>,\n nodesToEmit: Array<{ node: T; level: number; path: T[] }>,\n ): void {\n const path = [...parentPath, node];\n if (this.isExpandable(node, level, path)) {\n const key = this.getNodeKey(node);\n if (!this.expandedKeys.has(key)) {\n nodesToEmit.push({ node, level, path });\n }\n out.add(this.getNodeKey(node));\n }\n\n const children = this.getChildren(node);\n if (!Array.isArray(children) || children.length === 0) return;\n\n for (const child of children) {\n this.collectExpandableNodeKeys(child, level + 1, path, out, nodesToEmit);\n }\n }\n\n private areAllExpandableNodesExpanded(): boolean {\n let hasExpandableNodes = false;\n let allExpanded = true;\n\n const visit = (node: T, level: number, parentPath: T[]) => {\n const path = [...parentPath, node];\n if (this.isExpandable(node, level, path)) {\n hasExpandableNodes = true;\n if (!this.expandedKeys.has(this.getNodeKey(node))) {\n allExpanded = false;\n }\n }\n\n if (!allExpanded) return;\n\n const children = this.getChildren(node);\n if (!Array.isArray(children) || children.length === 0) return;\n\n for (const child of children) {\n visit(child, level + 1, path);\n if (!allExpanded) return;\n }\n };\n\n for (const root of this.data || []) {\n visit(root, 0, []);\n if (!allExpanded) break;\n }\n\n return hasExpandableNodes && allExpanded;\n }\n\n private hasExpandableNodes(): boolean {\n let found = false;\n\n const visit = (node: T, level: number, parentPath: T[]) => {\n if (found) return;\n\n const path = [...parentPath, node];\n if (this.isExpandable(node, level, path)) {\n found = true;\n return;\n }\n\n const children = this.getChildren(node);\n if (!Array.isArray(children) || children.length === 0) return;\n\n for (const child of children) {\n visit(child, level + 1, path);\n if (found) return;\n }\n };\n\n for (const root of this.data || []) {\n visit(root, 0, []);\n if (found) break;\n }\n\n return found;\n }\n\n private syncOriginalExpandedKeys(): void {\n this.originalExpandedKeys = new Set(this.expandedKeys);\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(\n node: T,\n level: number,\n parentPath: T[],\n out: RowView<T>[],\n ): 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 const direct = anyNode?.[this.rowId];\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)\n 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 }\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(\n (col) =>\n col.filterable &&\n (col.filters?.some((f) => f.filterValue) ||\n (col.filterType === 'set' &&\n col.selectedValues &&\n col.selectedValues.size > 0)),\n );\n if (filterColumns.length === 0)\n 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 =\n col.filters?.filter(\n (f) =>\n f.filterValue !== '' &&\n f.filterValue !== null &&\n f.filterValue !== undefined,\n ) || [];\n if (conds.length === 0) return true;\n if (col.filterLogic === 'AND') {\n return conds.every((f) =>\n this.evaluateNumberFilterCondition(\n f.filterOperation,\n value,\n f.filterValue,\n ),\n );\n } else {\n return conds.some((f) =>\n this.evaluateNumberFilterCondition(\n f.filterOperation,\n value,\n f.filterValue,\n ),\n );\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) =>\n this.evaluateTextFilterCondition(\n f.filterOperation,\n String(value).toLowerCase(),\n String(f.filterValue).toLowerCase(),\n ),\n );\n } else {\n return conds.some((f) =>\n this.evaluateTextFilterCondition(\n f.filterOperation,\n String(value).toLowerCase(),\n String(f.filterValue).toLowerCase(),\n ),\n );\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(\n type: string,\n fieldValue: any,\n value: any,\n ): 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 dateTimeSelected(date: any) {\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 * 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","<div class=\"cats-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=\"header-section\">\n <div class=\"column-header\">CONFIGURE Column</div>\n <div class=\"reset-default\" (click)=\"resetDefaultColConfig()\">\n Reset to default\n </div>\n </div>\n\n <div class=\"header-search-wrapper\">\n <div class=\"search_input\">\n <img src=\"images/search.svg\" alt=\"\" />\n <input\n placeholder=\"Type to Search\"\n (input)=\"onColConfigSearch($event)\"\n />\n </div>\n </div>\n <div class=\"border-divider\"></div>\n\n <!-- <div class=\"add-more\">\n <div class=\"add-more-text\">Add more</div>\n <img src=\"images/add-more-right-blue.svg\" alt=\"\" />\n </div>\n <div class=\"border-divider\"></div> -->\n <div id=\"table_scroll\" class=\"setting-item-container\">\n <div class=\"setting-item-wrapper\">\n @if (noCategoryCols.length > 0) {\n <div\n class=\"setting-column-item item-title\"\n (click)=\"showAllDefaultSelection()\"\n >\n <!-- <input\n class=\"custom_check_box\"\n type=\"checkbox\"\n [checked]=\"activeAll\"\n (change)=\"activeAllSelection($event)\"\n /> -->\n @if (allActiveDefault) {\n <img\n class=\"eye-icon\"\n src=\"images/eye-custom-header.svg\"\n alt=\"\"\n />\n } @else {\n <img\n class=\"eye-icon\"\n src=\"images/eye-off-custom-header.svg\"\n alt=\"\"\n />\n }\n <span>Default</span>\n </div>\n }\n @for (col of noCategoryCols; track col.colId) {\n <div\n class=\"setting-column-item\"\n (click)=\"toggleSelectedCol(col)\"\n [ngClass]=\"{ disable: col.headerLocked }\"\n >\n @if (col.active) {\n <img\n class=\"eye-icon\"\n src=\"images/eye-custom-header.svg\"\n alt=\"\"\n />\n } @else {\n <img\n class=\"eye-icon\"\n src=\"images/eye-off-custom-header.svg\"\n alt=\"\"\n />\n }\n\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.header | titlecase }}</span>\n </div>\n }\n </div>\n @for (category of objectKeys(categorizedCols); track category) {\n <div class=\"setting-item-wrapper\">\n <div\n class=\"setting-column-item item-title\"\n (click)=\"showAllCategorySelection(category)\"\n >\n <!-- <input\n class=\"custom_check_box\"\n type=\"checkbox\"\n [checked]=\"activeAll\"\n (change)=\"activeAllSelection($event)\"\n /> -->\n @if (allActiveColMap[category]) {\n <img\n class=\"eye-icon\"\n src=\"images/eye-custom-header.svg\"\n alt=\"\"\n />\n } @else {\n <img\n class=\"eye-icon\"\n src=\"images/eye-off-custom-header.svg\"\n alt=\"\"\n />\n }\n <span>{{ category | titlecase }}</span>\n </div>\n <!-- Category Title -->\n\n <!-- <div class=\"setting-column-item item-title\">\n <span>{{ category | titlecase }}</span>\n </div> -->\n\n <!-- Columns inside category -->\n @for (col of categorizedCols[category]; track col.colId) {\n <div\n class=\"setting-column-item\"\n (click)=\"toggleSelectedCol(col)\"\n [ngClass]=\"{ disable: col.headerLocked }\"\n >\n @if (col.active) {\n <img class=\"eye-icon\" src=\"images/eye-custom-header.svg\" />\n } @else {\n <img\n class=\"eye-icon\"\n src=\"images/eye-off-custom-header.svg\"\n />\n }\n\n <span>{{ col.headerName | titlecase }}</span>\n </div>\n }\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 @if (columns.length === 0 && showSkeleton) {\n <tr>\n @for (c of skeletonCols; track $index) {\n <th>\n <div class=\"th-wraper\">\n <div class=\"line\"></div>\n </div>\n </th>\n }\n </tr>\n } @else {\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=\"cats-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\n src=\"images/t-arrow-up.svg\"\n alt=\"Ascending\"\n />\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 @if (showExpandAllControl(col)) {\n <button\n class=\"header-tree-toggle\"\n type=\"button\"\n [attr.aria-label]=\"\n allNodesExpanded()\n ? 'Collapse all nodes'\n : 'Expand all nodes'\n \"\n (click)=\"toggleAllNodes(); $event.stopPropagation()\"\n >\n <img\n [src]=\"\n resolveIconSrc(\n allNodesExpanded() ? collapseIcon : expandIcon\n )\n \"\n alt=\"\"\n />\n </button>\n }\n\n <!-- Filter and Menu -->\n <div class=\"filter-three-dot-wrapper\">\n <!-- Filter Icon -->\n @if (filterRequired && col.filterable) {\n <div\n #trigger\n class=\"filters\"\n (click)=\"toggleFilter(col, colIdx, $event)\"\n >\n @if (activeFilters.has(col.fieldName)) {\n <img\n src=\"images/t-filter-applied.svg\"\n alt=\"Filter active\"\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 alt=\"Filter\"\n class=\"filter-icon\"\n [draggable]=\"false\"\n (dragstart)=\"\n $event.preventDefault();\n $event.stopPropagation()\n \"\n />\n }\n\n <!-- Filter Dropdown -->\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 =\n $event;\n applyAllFilters(col)\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)]=\"\n col.filters![0].filterValue\n \"\n (keyup)=\"applyAllFilters(col)\"\n />\n </div>\n\n @if (col.filters![0].filterValue) {\n <div class=\"logic-row cats-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(col)\"\n />\n <label class=\"label\" [for]=\"$index\"\n >AND</label\n >\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(col)\"\n />\n <label class=\"label\" [for]=\"$index + 1\"\n >OR</label\n >\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 =\n $event;\n applyAllFilters(col)\n \"\n ></lib-common-input>\n <!-- <input\n type=\"text\"\n [(ngModel)]=\"col.filters[1].filterValue\"\n placeholder=\"Filter…\"\n (keyup)=\"applyAllFilters(col)\"\n /> -->\n\n <div class=\"search_input\">\n <img src=\"images/search.svg\" alt=\"\" />\n <input\n type=\"text\"\n placeholder=\"Filter\"\n [(ngModel)]=\"\n col.filters![1].filterValue\n \"\n (keyup)=\"applyAllFilters(col)\"\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 =\n $event;\n applyAllFilters(col)\n \"\n ></lib-common-input>\n\n <!-- <input\n type=\"number\"\n [(ngModel)]=\"col.filters[0].filterValue\"\n (input)=\"applyAllFilters(col)\"\n /> -->\n\n <div class=\"search_input\">\n <img src=\"images/search.svg\" alt=\"\" />\n <input\n type=\"number\"\n placeholder=\"Filter\"\n [(ngModel)]=\"\n col.filters![0].filterValue\n \"\n (input)=\"applyAllFilters(col)\"\n />\n </div>\n\n @if (col.filters![0].filterValue) {\n <div class=\"logic-row cats-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(col)\"\n />\n <label class=\"label\" [for]=\"$index\"\n >AND</label\n >\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(col)\"\n />\n <label class=\"label\" [for]=\"$index + 1\"\n >OR</label\n >\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 =\n $event;\n applyAllFilters(col)\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)]=\"\n col.filters![1].filterValue\n \"\n (keyup)=\"applyAllFilters(col)\"\n />\n </div>\n <!-- <input\n type=\"text\"\n [(ngModel)]=\"col.filters[1].filterValue\"\n placeholder=\"Filter…\"\n (keyup)=\"applyAllFilters(col)\"\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 =\n $event;\n applyAllFilters(col)\n \"\n ></lib-common-input>\n\n <!-- <input\n type=\"date\"\n [(ngModel)]=\"col.filters[0].filterValue\"\n (change)=\"applyAllFilters(col)\"\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 cats-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(col)\"\n />\n <label class=\"label\" [for]=\"$index\"\n >AND</label\n >\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(col)\"\n />\n <label class=\"label\" [for]=\"$index + 1\"\n >OR</label\n >\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 =\n $event;\n applyAllFilters(col)\n \"\n ></lib-common-input>\n\n <lib-common-calendar\n [dateConfig]=\"dateConfig\"\n [(ngModel)]=\"\n col.filters![1].filterValue\n \"\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=\"cats-checkbox_container\">\n <input\n class=\"custom_check_box\"\n type=\"checkbox\"\n [checked]=\"isAllSelected(col)\"\n (change)=\"\n toggleSelectAll(col, $event)\n \"\n />\n Select All\n </label>\n <div\n class=\"set-options\"\n id=\"table_scroll\"\n >\n @for (\n opt of col.filteredOptions;\n track $index\n ) {\n <label\n class=\"cats-checkbox_container\"\n >\n <input\n class=\"custom_check_box\"\n type=\"checkbox\"\n [checked]=\"\n col.selectedValues!.has(opt)\n \"\n (change)=\"\n toggleSetOption(\n col,\n opt,\n $event\n )\n \"\n />\n <span class=\"textTruncate\">\n {{ opt }}</span\n >\n </label>\n }\n </div>\n </div>\n }\n <div class=\"filter-btn\">\n <button\n class=\"filter-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) {\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=\"header-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\" ||\n !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\" ||\n !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 ((col.colId &&\n pinActionClicked[col.colId]) ??\n \"none\") === \"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 }\n </thead>\n\n <tbody>\n @if (showSkeleton) {\n @for (r of skeletonRows; track $index) {\n <tr>\n @for (c of skeletonCols; track $index) {\n <td>\n <div class=\"line\"></div>\n </td>\n }\n </tr>\n }\n } @else {\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=\"cats-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=\"cats-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\n class=\"label\"\n [for]=\"'row_' + row.trackKey\"\n ></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)=\"\n toggle(row.node, row.level, row.path)\n \"\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 (\n showLinkFor(row) && linkUrlFor(row);\n as url\n ) {\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\n class=\"ellipsis\"\n [appTooltip]=\"\n getValue(row.node, col.fieldName) || 'N/A'\n \"\n tooltipPosition=\"adaptive\"\n [tooltipParentContainer]=\"parent\"\n >\n {{\n getValue(row.node, col.fieldName) || \"N/A\"\n }}</span\n >\n } @else {\n <div\n [rowParam]=\"row.node\"\n [col]=\"col\"\n [api]=\"tableOptions\"\n [currentValue]=\"\n getValue(row.node, col.fieldName)\n \"\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]=\"\n columns.length + (checkBoxSelection ? 1 : 0)\n \"\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]=\"\n columns.length + (checkBoxSelection ? 1 : 0)\n \"\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 }\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,IAAA,EAAA,CAAA;sGAAZ,YAAY,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,UAAA,EAAA,CAAA;;4FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBAHxB,I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