UNPKG

smart-webcomponents-angular

Version:

[![Price](https://img.shields.io/badge/price-COMMERCIAL-0098f7.svg)](https://jqwidgets.com/license/)

675 lines (671 loc) 96.5 kB
if(typeof window !== 'undefined') { if (!window['Smart']) { window['Smart'] = { RenderMode: 'manual' }; } else { window['Smart'].RenderMode = 'manual'; } } import './../source/modules/smart.table'; import { __awaiter } from 'tslib'; import * as i0 from '@angular/core'; import { EventEmitter, Directive, Output, Input, NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; class BaseElement { constructor(ref) { this.onCreate = new EventEmitter(); this.onReady = new EventEmitter(); this.onAttach = new EventEmitter(); this.onDetach = new EventEmitter(); const that = this; this.nativeElement = ref.nativeElement; that.nativeElement.onAttached = () => { that.onAttach.emit(that.nativeElement); }; that.nativeElement.onDetached = () => { that.onDetach.emit(that.nativeElement); }; } addEventListener(type, listener, options = false) { this.nativeElement.addEventListener(type, listener, options); } removeEventListener(type, listener, options = false) { this.nativeElement.removeEventListener(type, listener, options); } dispatchEvent(event) { return this.nativeElement.dispatchEvent(event); } blur() { this.nativeElement.blur(); } click() { this.nativeElement.click(); } focus(options) { this.nativeElement.focus(options); } /** @description Sets or gets the license. */ get license() { return this.nativeElement ? this.nativeElement.license : undefined; } set license(value) { this.nativeElement ? this.nativeElement.license = value : undefined; } /** @description Sets or gets the language. Used in conjunction with the property messages. */ get locale() { return this.nativeElement ? this.nativeElement.locale : undefined; } set locale(value) { this.nativeElement ? this.nativeElement.locale = value : undefined; } /** @description Callback used to customize the format of the messages that are returned from the Localization Module. */ get localizeFormatFunction() { return this.nativeElement ? this.nativeElement.localizeFormatFunction : undefined; } set localizeFormatFunction(value) { this.nativeElement ? this.nativeElement.localizeFormatFunction = value : undefined; } /** @description Sets or gets an object specifying strings used in the widget that can be localized. Used in conjunction with the property locale. */ get messages() { return this.nativeElement ? this.nativeElement.messages : undefined; } set messages(value) { this.nativeElement ? this.nativeElement.messages = value : undefined; } /** @description Sets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts. */ get rightToLeft() { return this.nativeElement ? this.nativeElement.rightToLeft : undefined; } set rightToLeft(value) { this.nativeElement ? this.nativeElement.rightToLeft = value : undefined; } /** @description Determines the theme. Theme defines the look of the element */ get theme() { return this.nativeElement ? this.nativeElement.theme : undefined; } set theme(value) { this.nativeElement ? this.nativeElement.theme = value : undefined; } } BaseElement.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: BaseElement, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); BaseElement.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.6", type: BaseElement, inputs: { license: "license", locale: "locale", localizeFormatFunction: "localizeFormatFunction", messages: "messages", rightToLeft: "rightToLeft", theme: "theme" }, outputs: { onCreate: "onCreate", onReady: "onReady", onAttach: "onAttach", onDetach: "onDetach" }, ngImport: i0 }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: BaseElement, decorators: [{ type: Directive }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { onCreate: [{ type: Output }], onReady: [{ type: Output }], onAttach: [{ type: Output }], onDetach: [{ type: Output }], license: [{ type: Input }], locale: [{ type: Input }], localizeFormatFunction: [{ type: Input }], messages: [{ type: Input }], rightToLeft: [{ type: Input }], theme: [{ type: Input }] } }); let Smart; if (typeof window !== "undefined") { Smart = window.Smart; } class TableComponent extends BaseElement { constructor(ref) { super(ref); this.eventHandlers = []; /** @description This event is triggered when a user begins editing the contents of a cell, signaling the initiation of a cell edit operation. It provides an opportunity to perform preparatory actions, such as validating the cell, applying custom styles, or capturing the cell’s initial value before any changes are made. * @param event. The custom event. Custom event was created with: event.detail( id, dataField, row, value) * id - The id of the row. * dataField - The data field of the cell's column. * row - The data of the cell's row. * value - The data value of the cell. */ this.onCellBeginEdit = new EventEmitter(); /** @description This event is triggered whenever a user clicks on a cell within the component or data grid. It provides contextual information about the clicked cell, such as its row and column index, allowing you to perform custom actions in response to user interaction. * @param event. The custom event. Custom event was created with: event.detail( id, dataField, row, value, originalEvent) * id - The cell's row id. * dataField - The data field of the cell's column. * row - The data of the cell's row. * value - The data value of the cell. * originalEvent - The 'click' event object. */ this.onCellClick = new EventEmitter(); /** @description This event is triggered immediately after a cell's value has been modified by the user, allowing you to respond to changes as soon as a cell is edited. It provides relevant information about the edited cell, such as its new value, previous value, row, and column, enabling precise handling of cell updates within the table or data grid. * @param event. The custom event. Custom event was created with: event.detail( id, dataField, row, value) * id - The id of the row. * dataField - The data field of the cell's column. * row - The new data of the cell's row. * value - The data value of the cell. */ this.onCellEndEdit = new EventEmitter(); /** @description This event is triggered whenever the user changes the current selection, such as highlighting text or selecting an item. Inside the event handler, you can access the updated selection by calling the 'getSelection' method. This allows you to retrieve information about the newly selected content or item and perform any necessary actions in response to the change. * @param event. The custom event. Custom event was created with: event.detail( type) * type - The type of action that initiated the selection change. Possible types: 'programmatic', 'interaction', 'remove'. */ this.onChange = new EventEmitter(); /** @description This event is triggered when a row in the data grid or table is collapsed, meaning its contents or nested rows are hidden from view. Use this event to execute custom logic after a user collapses a specific row. * @param event. The custom event. Custom event was created with: event.detail( id, record) * id - The id of the collapsed row. * record - The data of the collapsed row. */ this.onCollapse = new EventEmitter(); /** @description This event is triggered whenever a row in the table is expanded by the user, typically to reveal additional details or nested content associated with that row. * @param event. The custom event. Custom event was created with: event.detail( id, record) * id - The id of the expanded row. * record - The (aggregated) data of the expanded row. */ this.onExpand = new EventEmitter(); /** @description This event is triggered whenever a user clicks on a column header cell, typically indicating that the header was selected—such as to initiate actions like sorting or displaying column options. It provides contextual information about the clicked header cell, enabling you to implement custom behaviors in response to header interactions. * @param event. The custom event. Custom event was created with: event.detail( dataField) * dataField - The data field of the cell's column. */ this.onColumnClick = new EventEmitter(); /** @description This event is triggered immediately after the column menu has been closed by the user, either by clicking outside the menu or performing an action that causes it to close. It allows you to execute custom logic in response to the closure of a column-specific menu in the interface. * @param event. The custom event. Custom event was created with: event.detail( dataField) * dataField - The data field of the column. */ this.onCloseColumnMenu = new EventEmitter(); /** @description This event is triggered whenever a column's width is changed by the user, either by dragging the column's edge or by double-clicking to auto-fit the column. It allows you to respond to column resize actions, enabling custom logic such as persisting new column widths or updating related UI elements. * @param event. The custom event. Custom event was created with: event.detail( dataField, headerCellElement, width) * dataField - The data field of the column. * headerCellElement - The column's header cell HTML element. * width - The new width of the column. */ this.onColumnResize = new EventEmitter(); /** @description This event is triggered whenever a user initiates or modifies a filtering action, such as applying, updating, or removing filters. It allows the application to respond to changes in filtering criteria, ensuring that the displayed data accurately reflects the selected filters. * @param event. The custom event. Custom event was created with: event.detail( action, filters) * action - The filtering action. Possible actions: 'add', 'remove'. * filters - The added filters. Only when action is 'add'. */ this.onFilter = new EventEmitter(); /** @description This event is triggered whenever a user performs an action related to grouping, such as creating, modifying, or deleting a group, or changing the grouping configuration. It allows your application to respond dynamically to changes in how items are grouped. * @param event. The custom event. Custom event was created with: event.detail( action, dataField, label, path) * action - The grouping action. Possible actions: 'add', 'collapse', 'expand', 'remove'. * dataField - The data field of the column whose grouping is modified. * label - The label of the group (only when collapsing/expanding). * path - The group's path (only when collapsing/expanding). The path includes the path to the expanded/collapsed group starting from the root group. The indexes are joined with '.'. This parameter is available when the 'action' is 'expand' or 'collapse'. */ this.onGroup = new EventEmitter(); /** @description This event is fired whenever a user opens the menu associated with a column, such as by clicking a column header or menu icon. It provides an opportunity to perform custom actions or update the interface in response to the column menu becoming visible. * @param event. The custom event. Custom event was created with: event.detail( dataField) * dataField - The data field of the column. */ this.onOpenColumnMenu = new EventEmitter(); /** @description This event is triggered whenever a user performs an action that changes the current page in a paginated component, such as navigating to the next or previous page, selecting a specific page number, or adjusting the page size. * @param event. The custom event. Custom event was created with: event.detail( action) * action - The paging action. Possible actions: 'pageIndexChange', 'pageSizeChange'. */ this.onPage = new EventEmitter(); /** @description This event is triggered when a user begins editing a table row, but only if the editMode property is set to 'row'. This allows you to handle actions or logic specifically at the start of a row-level edit operation within your data grid or table component. * @param event. The custom event. Custom event was created with: event.detail( id, row) * id - The id of the row. * row - The data of the row. */ this.onRowBeginEdit = new EventEmitter(); /** @description This event is triggered whenever a table row is edited, but only if the editMode property is set to 'row'. It signifies that the user has completed changes to the entire row, as opposed to editing individual cells, and is useful for handling row-level updates or validation logic. * @param event. The custom event. Custom event was created with: event.detail( id, row) * id - The id of the row. * row - The new data of the row. */ this.onRowEndEdit = new EventEmitter(); /** @description This event is triggered whenever a column header cell in the table is clicked by the user, initiating a sort operation, or when sorting is applied programmatically through the Table API. It fires both on direct user interaction and when sorting state changes are made via code. * @param event. The custom event. Custom event was created with: event.detail( columns, sortDataFields, sortOrders, sortDataTypes, type) * columns - An array with information about the columns the Table has been sorted by. * sortDataFields - An array with information about the data fields the Table has been sorted by. * sortOrders - An array with information about the columns sort orders the Table has been sorted by. * sortDataTypes - An array with information about the columns data types the Table has been sorted by. * type - The type of action that initiated the data sort. Possible types: 'programmatic', 'interaction' */ this.onSort = new EventEmitter(); this.nativeElement = ref.nativeElement; } /** @description Creates the component on demand. * @param properties An optional object of properties, which will be added to the template binded ones. */ createComponent(properties = {}) { this.nativeElement = document.createElement('smart-table'); for (let propertyName in properties) { this.nativeElement[propertyName] = properties[propertyName]; } return this.nativeElement; } /** @description Controls whether the application automatically restores its previous state from the browser's localStorage. When enabled, it retrieves saved settings such as column configurations, expanded or selected rows, active filters, groupings, and the sort order of columns. The specific state information that is loaded depends on the options defined in the stateSettings property. */ get autoLoadState() { return this.nativeElement ? this.nativeElement.autoLoadState : undefined; } set autoLoadState(value) { this.nativeElement ? this.nativeElement.autoLoadState = value : undefined; } /** @description Controls whether the component automatically saves its current state to the browser’s localStorage. When enabled, data such as column configurations, expanded row states, selected rows, applied filters, grouping options, and sorted columns are persistently stored. The specific state information saved depends on the options set in the stateSettings property. This allows users’ table settings to be retained and restored across browser sessions. */ get autoSaveState() { return this.nativeElement ? this.nativeElement.autoSaveState : undefined; } set autoSaveState(value) { this.nativeElement ? this.nativeElement.autoSaveState = value : undefined; } /** @description Defines or retrieves an array of column groups that establish the hierarchical structure of the column headers. Note: When a column header hierarchy is configured using these column groups, features such as column resizing and auto-sizing are disabled and will not be available for those columns. */ get columnGroups() { return this.nativeElement ? this.nativeElement.columnGroups : undefined; } set columnGroups(value) { this.nativeElement ? this.nativeElement.columnGroups = value : undefined; } /** @description Specifies or retrieves the minimum width for columns when columnSizeMode is set to 'auto' or when columns are being resized by the user. This property determines the smallest allowable width for columns during these operations. Note: This setting is ignored for columns that have their width explicitly defined through code. */ get columnMinWidth() { return this.nativeElement ? this.nativeElement.columnMinWidth : undefined; } set columnMinWidth(value) { this.nativeElement ? this.nativeElement.columnMinWidth = value : undefined; } /** @description Determines whether users are allowed to reorder columns by dragging them. When enabled, columns can be rearranged by the user; when disabled, the column order is fixed. This property can be set to enable or disable column reordering, or queried to check the current state. */ get columnReorder() { return this.nativeElement ? this.nativeElement.columnReorder : undefined; } set columnReorder(value) { this.nativeElement ? this.nativeElement.columnReorder = value : undefined; } /** @description Enables or disables the ability for users to resize table columns. When this option is enabled, users can manually adjust the width of each column. Note: The actual column sizing is still governed by the standard HTML table behavior for table-layout: fixed, as smart-table is built upon this layout model. This means columns have a fixed width and resizing may affect the overall table width proportionally, consistent with native HTML tables using table-layout: fixed. */ get columnResize() { return this.nativeElement ? this.nativeElement.columnResize : undefined; } set columnResize(value) { this.nativeElement ? this.nativeElement.columnResize = value : undefined; } /** @description This property controls how the table adjusts its column widths when columnSizeMode is set to 'default'. - When columnResizeNormalize is 'false', and every table column has a defined width, the Table will insert an extra '' element. This additional header cell ensures that the customized column widths are preserved, preventing the browser from automatically resizing your columns and thereby maintaining the exact width configuration you specified.- When columnResizeNormalize is 'true', the Table will not add an extra ''. Instead, it distributes the available space among the columns, causing them to expand or contract as needed—similar to the default behavior of standard HTML tables. This results in a more fluid, responsive layout, where any unallocated space is automatically filled.This property is useful for toggling between a strictly controlled column layout and one that behaves like a regular HTML table when sizing columns. */ get columnResizeNormalize() { return this.nativeElement ? this.nativeElement.columnResizeNormalize : undefined; } set columnResizeNormalize(value) { this.nativeElement ? this.nativeElement.columnResizeNormalize = value : undefined; } /** @description Determines whether a visual feedback indicator is shown during column resizing, displaying the new column width in pixels as the user adjusts the column. This property can be set to enable or disable the display of the width feedback overlay, or queried to check its current state. */ get columnResizeFeedback() { return this.nativeElement ? this.nativeElement.columnResizeFeedback : undefined; } set columnResizeFeedback(value) { this.nativeElement ? this.nativeElement.columnResizeFeedback = value : undefined; } /** @description Provides detailed definitions and configuration options for the properties of each column, including attributes such as data type, header label, visibility, sorting, filtering, and formatting. This section outlines how individual columns should be displayed and behave within the table or data grid. */ get columns() { return this.nativeElement ? this.nativeElement.columns : undefined; } set columns(value) { this.nativeElement ? this.nativeElement.columns = value : undefined; } /** @description Defines or retrieves the rules and settings for conditional formatting applied to the table's cells, allowing specific formatting (such as colors, styles, or icons) to be applied dynamically based on the cell values or conditions. */ get conditionalFormatting() { return this.nativeElement ? this.nativeElement.conditionalFormatting : undefined; } set conditionalFormatting(value) { this.nativeElement ? this.nativeElement.conditionalFormatting = value : undefined; } /** @description Defines the column menu functionality for the grid. When this property is set to true, a menu icon appears in the header of each column. Clicking this icon opens a column menu, providing users with options to sort the data, apply filters, and toggle the visibility of columns. You can set this property to enable or disable the column menu, or retrieve its current state. */ get columnMenu() { return this.nativeElement ? this.nativeElement.columnMenu : undefined; } set columnMenu(value) { this.nativeElement ? this.nativeElement.columnMenu = value : undefined; } /** @description ---Determines how the table columns are sized, supporting two distinct modes:- ''auto' Mode:' Columns are automatically sized based on their content and the specified columnMinWidth value. If the table does not have enough horizontal space to display all content, excess text is truncated with ellipses. Manually specified static column widths (set by the user) will still be honored in this mode.- ''default' Mode:' Columns follow the standard HTML table's table-layout: fixed behavior. In this mode, column widths do not adapt to content; instead, each column's width is determined either by a fixed value (set via the column’s width property) or distributed evenly if no width is specified.Use this property to control whether column widths are calculated automatically based on content or determined by fixed sizing rules. */ get columnSizeMode() { return this.nativeElement ? this.nativeElement.columnSizeMode : undefined; } set columnSizeMode(value) { this.nativeElement ? this.nativeElement.columnSizeMode = value : undefined; } /** @description Controls the visibility of the "Conditional Formatting" button in the Table component’s header toolbar. When enabled, this button appears in the toolbar and allows users to open a dialog where they can configure and apply conditional formatting rules to the table's data. This property can be used to programmatically show or hide the button, or to check if it is currently displayed. */ get conditionalFormattingButton() { return this.nativeElement ? this.nativeElement.conditionalFormattingButton : undefined; } set conditionalFormattingButton(value) { this.nativeElement ? this.nativeElement.conditionalFormattingButton = value : undefined; } /** @description This property specifies the interval, in milliseconds, that must elapse during vertical scrolling before the table data is refreshed or updated. Adjusting this setting can help control the responsiveness and performance of data loading while scrolling through the table. */ get deferredScrollDelay() { return this.nativeElement ? this.nativeElement.deferredScrollDelay : undefined; } set deferredScrollDelay(value) { this.nativeElement ? this.nativeElement.deferredScrollDelay = value : undefined; } /** @description When the dataSource property is bound directly to a plain array—rather than to an instance of JQX.DataAdapter—this property specifies the name of the field within each array element that should be used as the unique row identifier. You can use it to set or retrieve the key that maps each item's row id, allowing the component to correctly reference, update, and manage rows by their unique ids. */ get dataRowId() { return this.nativeElement ? this.nativeElement.dataRowId : undefined; } set dataRowId(value) { this.nativeElement ? this.nativeElement.dataRowId = value : undefined; } /** @description Specifies the data source for the Table component. This property accepts either a standard JavaScript Array or a DataAdapter instance. Using an Array allows you to provide the table data directly, while a DataAdapter offers advanced data management features such as data binding, sorting, filtering, and integration with remote data sources. For detailed information about the DataAdapter and its capabilities, visit: https://www.htmlelements.com/docs/data-adapter/ */ get dataSource() { return this.nativeElement ? this.nativeElement.dataSource : undefined; } set dataSource(value) { this.nativeElement ? this.nativeElement.dataSource = value : undefined; } /** @description Configures the grid's data source settings when the dataSource property is assigned either a local data array or a remote URL. This allows the grid to properly retrieve, bind, and display data from the specified source, whether it is provided directly as an array or fetched asynchronously from a web endpoint. */ get dataSourceSettings() { return this.nativeElement ? this.nativeElement.dataSourceSettings : undefined; } set dataSourceSettings(value) { this.nativeElement ? this.nativeElement.dataSourceSettings = value : undefined; } /** @description Prevents users from interacting with the element, such as clicking, selecting, typing, or triggering any events. The element will appear disabled and will not respond to any user input. */ get dataTransform() { return this.nativeElement ? this.nativeElement.dataTransform : undefined; } set dataTransform(value) { this.nativeElement ? this.nativeElement.dataTransform = value : undefined; } /** @description Determines whether the Table is editable. When set to true, users can modify the contents of the Table; when false, the Table is read-only and cannot be edited. This property can be used to both retrieve the current editable state and update it as needed. */ get disabled() { return this.nativeElement ? this.nativeElement.disabled : undefined; } set disabled(value) { this.nativeElement ? this.nativeElement.disabled = value : undefined; } /** @description Enables or retrieves the current state of edit mode, determining whether the component is in an editable state. When set to true, users can modify the content; when set to false, the component is read-only. */ get editing() { return this.nativeElement ? this.nativeElement.editing : undefined; } set editing(value) { this.nativeElement ? this.nativeElement.editing = value : undefined; } /** @description Determines whether row hierarchies are automatically expanded when they are initially created. When this property is enabled, grouped rows or tree-structured rows in the Table will be expanded by default, allowing users to see all subgrouped data without requiring manual expansion. Use this property if you want hierarchical groups in the Table to appear open automatically when the Table is grouped or when using tree mode. */ get editMode() { return this.nativeElement ? this.nativeElement.editMode : undefined; } set editMode(value) { this.nativeElement ? this.nativeElement.editMode = value : undefined; } /** @description Controls whether filtering is enabled for the Table. When filtering is enabled (the default), each string and numeric column displays a filter input in the header, allowing users to filter table rows based on column values. Setting this property to false disables all filter inputs and prevents users from filtering the table data. */ get expandHierarchy() { return this.nativeElement ? this.nativeElement.expandHierarchy : undefined; } set expandHierarchy(value) { this.nativeElement ? this.nativeElement.expandHierarchy = value : undefined; } /** @description Determines whether the Table supports data filtering through a dedicated filter row. When enabled, users can input criteria directly into this row to dynamically filter and display matching rows in the Table. This property can be set to enable or disable the filter row feature, and can also be queried to check its current state. */ get filtering() { return this.nativeElement ? this.nativeElement.filtering : undefined; } set filtering(value) { this.nativeElement ? this.nativeElement.filtering = value : undefined; } /** @description Gets or sets the filter operator for the table, determining how multiple column filters are combined. If set to 'and', all filter conditions must be met for a row to be displayed (e.g., cellValue1 && cellValue2). If set to 'or', a row is shown if it meets any one of the filter conditions (e.g., cellValue1 || cellValue2). This property controls whether filters are applied using logical 'AND' or 'OR' operations. */ get filterRow() { return this.nativeElement ? this.nativeElement.filterRow : undefined; } set filterRow(value) { this.nativeElement ? this.nativeElement.filterRow = value : undefined; } /** @description Gets or sets the ID of an HTML element to be used as a custom filter template. This allows you to define and apply your own filter UI by referencing the specified template’s ID. */ get filterOperator() { return this.nativeElement ? this.nativeElement.filterOperator : undefined; } set filterOperator(value) { this.nativeElement ? this.nativeElement.filterOperator = value : undefined; } /** @description Specifies or retrieves the ID of an HTML '' element whose content will be used to render the footer row(s) of the component. This allows you to define custom footer layouts using template markup and apply them dynamically by referencing the template's ID. */ get filterTemplate() { return this.nativeElement ? this.nativeElement.filterTemplate : undefined; } set filterTemplate(value) { this.nativeElement ? this.nativeElement.filterTemplate = value : undefined; } /** @description Enables or disables support for Excel-style formulas as cell values. When enabled, users can enter formulas starting with the '=' sign (e.g., "=SUM(A1:A3)") directly into cells. These formulas are automatically recalculated whenever referenced cell values change. Note: This functionality requires the third-party, free 'formula-parser' plugin; be sure to include the 'formula-parser.min.js' file as a dependency in your project. */ get footerRow() { return this.nativeElement ? this.nativeElement.footerRow : undefined; } set footerRow(value) { this.nativeElement ? this.nativeElement.footerRow = value : undefined; } /** @description Defines or retrieves whether the Table's footer remains fixed (sticky/frozen) at the bottom of the Table when scrolling vertically, ensuring it stays visible regardless of the Table's scroll position. */ get formulas() { return this.nativeElement ? this.nativeElement.formulas : undefined; } set formulas(value) { this.nativeElement ? this.nativeElement.formulas = value : undefined; } /** @description Sets or retrieves whether the table’s column header remains fixed (sticky) at the top of the viewport while scrolling through the table content. When enabled, the column header stays visible, improving readability for tables with many rows. */ get freezeFooter() { return this.nativeElement ? this.nativeElement.freezeFooter : undefined; } set freezeFooter(value) { this.nativeElement ? this.nativeElement.freezeFooter = value : undefined; } /** @description Configures or retrieves the current state of table grouping functionality. When enabled, rows in the table can be organized into groups based on specified criteria, allowing for better data categorization and easier analysis. */ get freezeHeader() { return this.nativeElement ? this.nativeElement.freezeHeader : undefined; } set freezeHeader(value) { this.nativeElement ? this.nativeElement.freezeHeader = value : undefined; } /** @description Enhances customization of the element's header. This property accepts several types of values:- The 'id' of an 'HTMLElement' or 'HTMLTemplateElement', which will be used to render the header.- A function, which receives the header element of the table as its sole argument. Use this function to dynamically generate or modify the header content.- A string containing HTML markup, which will be parsed and inserted as the header.This flexibility allows you to define static, template-based, or fully dynamic headers for the element according to your application's needs. */ get grouping() { return this.nativeElement ? this.nativeElement.grouping : undefined; } set grouping(value) { this.nativeElement ? this.nativeElement.grouping = value : undefined; } /** @description Controls whether users can navigate through the table using keyboard inputs. When enabled, users can move between table cells, rows, or columns using keys such as Tab, Arrow keys, or other navigation shortcuts. This setting can be accessed to check the current state (enabled or disabled) or modified to turn keyboard navigation on or off for the table. */ get groupFormatFunction() { return this.nativeElement ? this.nativeElement.groupFormatFunction : undefined; } set groupFormatFunction(value) { this.nativeElement ? this.nativeElement.groupFormatFunction = value : undefined; } /** @description Controls whether checkboxes are visible in the selection column. When set to true, checkboxes will be displayed, allowing users to select multiple items. When set to false, the selection column will not display checkboxes. This property can be used to programmatically toggle the visibility of checkboxes and can also be read to determine the current display state. */ get headerRow() { return this.nativeElement ? this.nativeElement.headerRow : undefined; } set headerRow(value) { this.nativeElement ? this.nativeElement.headerRow = value : undefined; } /** @description Defines how the column settings are handled during loading, whether automatically with autoLoadState or manually with loadState. This option is relevant only if the stateSettings array includes 'columns', ensuring that column-specific state (such as order, visibility, or width) is properly managed during the state load process. */ get keyboardNavigation() { return this.nativeElement ? this.nativeElement.keyboardNavigation : undefined; } set keyboardNavigation(value) { this.nativeElement ? this.nativeElement.keyboardNavigation = value : undefined; } /** @description Defines or retrieves the unlockKey property, a unique value required to activate or authorize access to the product's features. This key is used to verify that the user is permitted to unlock and use the product. */ get hideSelectionColumn() { return this.nativeElement ? this.nativeElement.hideSelectionColumn : undefined; } set hideSelectionColumn(value) { this.nativeElement ? this.nativeElement.hideSelectionColumn = value : undefined; } /** @description Specifies or retrieves the currently selected language code (e.g., "en", "fr", "es") for localization purposes. This property works together with the messages property to determine which set of localized messages should be displayed or used by the application. Adjusting this property changes which language mappings from messages are active. */ get loadColumnStateBehavior() { return this.nativeElement ? this.nativeElement.loadColumnStateBehavior : undefined; } set loadColumnStateBehavior(value) { this.nativeElement ? this.nativeElement.loadColumnStateBehavior = value : undefined; } /** @description Defines or retrieves an object containing key-value pairs of strings used within the element, allowing for customization and localization of displayed text. This property works together with the locale property to present the appropriate language and regional terms based on the user's locale preferences. */ get unlockKey() { return this.nativeElement ? this.nativeElement.unlockKey : undefined; } set unlockKey(value) { this.nativeElement ? this.nativeElement.unlockKey = value : undefined; } /** @description Specifies or retrieves the number of records displayed per page when paging is enabled. This property determines the size of each data page, allowing you to control how many items are shown to the user at a time. */ get locale() { return this.nativeElement ? this.nativeElement.locale : undefined; } set locale(value) { this.nativeElement ? this.nativeElement.locale = value : undefined; } /** @description Gets or sets the current page index (zero-based) when paging is enabled. This property allows you to specify or retrieve which page of data is currently being displayed, with the first page having an index of 0. */ get messages() { return this.nativeElement ? this.nativeElement.messages : undefined; } set messages(value) { this.nativeElement ? this.nativeElement.messages = value : undefined; } /** @description Determines whether paging functionality is enabled. When set to true, data is divided into discrete pages for easier navigation and viewing; when false, all data is displayed in a single, continuous view. You can use this property to enable or disable paging, or retrieve its current state. */ get onCellRender() { return this.nativeElement ? this.nativeElement.onCellRender : undefined; } set onCellRender(value) { this.nativeElement ? this.nativeElement.onCellRender = value : undefined; } /** @description Specifies or retrieves a value that determines whether the element's alignment is configured for right-to-left (RTL) text direction, typically used for languages such as Arabic or Hebrew that require right-to-left font support. */ get onColumnRender() { return this.nativeElement ? this.nativeElement.onColumnRender : undefined; } set onColumnRender(value) { this.nativeElement ? this.nativeElement.onColumnRender = value : undefined; } /** @description Defines or retrieves a string template used for rendering the detail section of a row. This template enables you to display additional information beneath a master row when it is expanded. To populate the detail row with values from the master row, insert the relevant data field names within double curly brackets (e.g., {{price}}). When a user clicks on a row to expand it, the template is applied, and the placeholders are replaced with the corresponding data from that row. */ get onInit() { return this.nativeElement ? this.nativeElement.onInit : undefined; } set onInit(value) { this.nativeElement ? this.nativeElement.onInit = value : undefined; } /** @description Defines or retrieves a callback function that takes three arguments: column, filterConditions, and filterInputTemplateString. This function is responsible for generating and returning a new filter input element or template based on the specific column and the current filter conditions. Use this callback to customize how the filter input is rendered for each column in the table. */ get onLoad() { return this.nativeElement ? this.nativeElement.onLoad : undefined; } set onLoad(value) { this.nativeElement ? this.nativeElement.onLoad = value : undefined; } /** @description Gets or sets an array containing the IDs of the currently selected rows in the Table. This property allows you to retrieve which rows are selected by their unique identifiers, or programmatically update the selection by supplying an array of row IDs. */ get onUpdateComplete() { return this.nativeElement ? this.nativeElement.onUpdateComplete : undefined; } set onUpdateComplete(value) { this.nativeElement ? this.nativeElement.onUpdateComplete = value : undefined; } /** @description Controls whether users can select table rows using checkboxes. When enabled, checkboxes appear next to each row, allowing users to select or deselect rows. The value can be set to enable or disable this feature, or retrieved to check the current selection mode. */ get pageSize() { return this.nativeElement ? this.nativeElement.pageSize : undefined; } set pageSize(value) { this.nativeElement ? this.nativeElement.pageSize = value : undefined; } /** @description Defines or retrieves the current selection mode for the component. This property is only applicable when selection functionality is enabled. Use it to specify how users can select items (e.g., single, multiple, or none). */ get pageIndex() { return this.nativeElement ? this.nativeElement.pageIndex : undefined; } set pageIndex(value) { this.nativeElement ? this.nativeElement.pageIndex = value : undefined; } /** @description Controls the hierarchical row selection behavior using checkboxes. When enabled, selecting a parent row automatically selects all of its child (sub) rows. Likewise, deselecting a parent row will deselect all of its sub rows. You can use this property to get the current hierarchical selection state or to enable/disable this feature. */ get paging() { return this.nativeElement ? this.nativeElement.paging : undefined; } set paging(value) { this.nativeElement ? this.nativeElement.paging = value : undefined; } /** @description Specifies the sorting behavior applied to the table, such as ascending, descending, or custom order. This setting controls how table data is organized and displayed to the user. */ get rightToLeft() { return this.nativeElement ? this.nativeElement.rightToLeft : undefined; } set rightToLeft(value) { this.nativeElement ? this.nativeElement.rightToLeft = value : undefined; } /** @description Specifies which aspects of the Table's current state can be saved (using autoSaveState or saveState) and restored (using autoLoadState or loadState). This determines which settings—such as column visibility, sorting, filters, and pagination—are included when persisting or retrieving the Table’s configuration. */ get rowDetailTemplate() { return this.nativeElement ? this.nativeElement.rowDetailTemplate : undefined; } set rowDetailTemplate(value) { this.nativeElement ? this.nativeElement.rowDetailTemplate = value : undefined; } /** @description Specifies the theme used to style the element. The theme controls the overall appearance, including colors, fonts, and visual effects, ensuring a consistent look and feel across the user interface. */ get onFilterRowInput() { return this.nativeElement ? this.nativeElement.onFilterRowInput : undefined; } set onFilterRowInput(value) { this.nativeElement ? this.nativeElement.onFilterRowInput = value : undefined; } /** @description Determines whether a tooltip displaying the full, untruncated content appears when a user hovers over a table cell that contains truncated text. When enabled, hovering the mouse pointer over a cell with clipped or overflowed text will show a tooltip with the complete content; when disabled, no tooltip is displayed on hover. This setting can be used to specify or retrieve the current tooltip behavior for truncated cell content. */ get selected() { return this.nativeElement ? this.nativeElement.selected : undefined; } set selected(value) { this.nativeElement ? this.nativeElement.selected = value : undefined; } /** @description Controls whether HTML virtualization is enabled. When activated, only the rows currently visible within the viewport are rendered in the DOM, rather than all rows at once. This optimization significantly improves table performance, especially when displaying large datasets, by reducing memory usage and speeding up rendering times. */ get selection() { return this.nativeElement ? this.nativeElement.selection : undefined; } set selection(value) { this.nativeElement ? this.nativeElement.selection = value : undefined; } /** @description undefined */ get selectionMode() { return this.nativeElement ? this.nativeElement.selectionMode : undefined; } set selectionMode(value) { this.nativeElement ? this.nativeElement.selectionMode = value : undefined; } /** @description undefined */ get selectionByHierarchy() { return this.nativeElement ? this.nativeElement.selectionByHierarchy : undefined; } set selectionByHierarchy(value) { this.nativeElement ? this.nativeElement.selectionByHierarchy = value : undefined; } /** @description undefined */ get sort() { return this.nativeElement ? this.nativeElement.sort : undefined; } set sort(value) { this.nativeElement ? this.nativeElement.sort = value : undefined; } /** @description undefined */ get sortMode() { return this.nativeElement ? this.nativeElement.sortMode : undefined; } set sortMode(value) { this.nativeElement ? this.nativeElement.sortMode = value : undefined; } /** @description undefined */ get stateSettings() { return this.nativeElement ? this.nativeElement.stateSettings : undefined; } set stateSettings(value) { this.nativeElement ? this.nativeElement.stateSettings = value : undefined; } /** @description undefined */ get theme() { return this.nativeElement ? this.nativeElement.theme : undefined; } set theme(value) { this.nativeElement ? this.nativeElement.theme = value : undefined; } /** @description undefined */ get tooltip() { return this.nativeElement ? this.nativeElement.tooltip : undefined; } set tooltip(value) { this.nativeElement ? this.nativeElement.tooltip = value : undefined; } /** @description undefined */ get virtualization() { return this.nativeElement ? this.nativeElement.virtualization : undefined; } set virtualization(value) { this.nativeElement ? this.nativeElement.virtualization = value : undefined; } /** @description Inserts a new row into the data set. To use this method, provide a JSON object containing key-value pairs that represent the data for each column in the new row. Each key should correspond to a column name, and its value should specify the cell's content for that column. * @param {any} data. JSON object with the new row's data. Sample JSON: {firstName: 'Peter', lastName: 'Fuller'}. */ addRow(data) { if (this.nativeElement.isRendered) { this.nativeElement.addRow(data); } else { this.nativeElement.whenRendered(() => { this.nativeElement.addRow(data); }); } } /** @description Adds a cus