@eternalcodestudio/primeng-table 20.0.9 → 20.0.11

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.
package/index.d.ts CHANGED
@@ -109,7 +109,7 @@ interface ITableButton {
109
109
  * @param rowData The row data object. Null for header buttons.
110
110
  * @returns True if the button should be visible; false otherwise.
111
111
  */
112
- condition?: (rowData: any) => boolean;
112
+ enabledCondition?: (rowData: any) => boolean;
113
113
  /**
114
114
  * Optional. Controls behavior when `condition` returns false.
115
115
  * - If `true`, the button will be hidden when the condition is not met.
@@ -343,6 +343,12 @@ interface IPredefinedFilter {
343
343
  * **_Do not modify this property manually._**
344
344
  */
345
345
  imageBlobFetchError?: boolean;
346
+ /**
347
+ * Optional. The action to execute when the predefined filter is clicked.
348
+ * @param rowData The row data object of the clicked row.
349
+ * @param option The IPredefinedFilter data of the predefined element clicked.
350
+ */
351
+ action?: (rowData: any, option: IPredefinedFilter) => void;
346
352
  }
347
353
 
348
354
  interface ITableConfiguration {
@@ -597,6 +603,14 @@ interface ITableOptions {
597
603
  * @default false
598
604
  */
599
605
  resizable?: boolean;
606
+ /**
607
+ * Function that determines whether the checkbox should be enabled or not.
608
+ * @param rowData The row data object.
609
+ * @returns True if the checkbox should be enabled; false otherwise.
610
+ *
611
+ * @default undefined
612
+ */
613
+ enabledCondition?: (rowData: any) => boolean;
600
614
  };
601
615
  /**
602
616
  * Configurations related to the single row selector.
@@ -831,6 +845,7 @@ declare class ECSPrimengTableService {
831
845
  * handleButtonsClick(deleteAction, { rowID: 1, name: 'John Doe' });
832
846
  */
833
847
  handleButtonsClick(action: (rowData: any) => void, rowData?: any): void;
848
+ handlePredefinedFilterClick(action: (rowData: any, option: IPredefinedFilter) => void, rowData: any | undefined, option: IPredefinedFilter): void;
834
849
  getColumnStyle(col: any, headerCols?: boolean): Record<string, string>;
835
850
  fetchTableViews(tableViewSaveAs: TableViewSaveMode, recoverListEndpoint: string, tableViewSaveKey: string): ITableView[] | Observable<HttpResponse<ITableView[]>>;
836
851
  sortViews(tableSaveViewList: ITableView[]): void;
@@ -976,7 +991,6 @@ declare class ECSPrimengTable implements OnInit, AfterViewInit {
976
991
  * @returns {string} A string indicating the number of selected values for the specified column.
977
992
  */
978
993
  predefinedFiltersSelectedValuesText(columnKeyName: string): string;
979
- handleButtonsClick(action: (rowData: any) => void, rowData?: any): void;
980
994
  /**
981
995
  * Checks if the provided column metadata matches a specific style of the predefined filters
982
996
  * that need to be applied to an item on a row.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eternalcodestudio/primeng-table",
3
- "version": "20.0.9",
3
+ "version": "20.0.11",
4
4
  "description": "ECS reusable Angular PrimeNG table component with advanced server-side filters. Designed to offload filtering logic to any backend API.",
5
5
  "author": "ECS (Eternal CODE Studio)",
6
6
  "license": "MIT",