@eternalcodestudio/primeng-table 19.0.6 → 19.1.0

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.
@@ -49,6 +49,7 @@ export declare class ECSPrimengTable implements OnInit, AfterViewInit {
49
49
  dateFormat: string;
50
50
  dateTimezone: string;
51
51
  dateCulture: string;
52
+ exportDateFormat: string;
52
53
  columns: IColumnMetadata[];
53
54
  columnsCantBeHidden: IColumnMetadata[];
54
55
  columnsSelected: IColumnMetadata[];
@@ -1,4 +1,5 @@
1
1
  import { ECSPrimengTableService } from '../ecs-primeng-table/ecs-primeng-table.service';
2
+ import { ITableButton } from '../../interfaces';
2
3
  import * as i0 from "@angular/core";
3
4
  export declare class TableButton {
4
5
  private tableService;
@@ -7,7 +8,9 @@ export declare class TableButton {
7
8
  rowData: any;
8
9
  isActionButton: boolean;
9
10
  isLastActionButton: boolean;
10
- handleClick(): void;
11
+ overrideAction?: ((event: Event) => void);
12
+ handleClick(event: Event): void;
13
+ getButtonStyle(button: ITableButton, isActionButton: boolean, isLastActionButton: boolean): any;
11
14
  static ɵfac: i0.ɵɵFactoryDeclaration<TableButton, never>;
12
- static ɵcmp: i0.ɵɵComponentDeclaration<TableButton, "ecs-table-button", never, { "button": { "alias": "button"; "required": false; }; "rowData": { "alias": "rowData"; "required": false; }; "isActionButton": { "alias": "isActionButton"; "required": false; }; "isLastActionButton": { "alias": "isLastActionButton"; "required": false; }; }, {}, never, never, true, never>;
15
+ static ɵcmp: i0.ɵɵComponentDeclaration<TableButton, "ecs-table-button", never, { "button": { "alias": "button"; "required": false; }; "rowData": { "alias": "rowData"; "required": false; }; "isActionButton": { "alias": "isActionButton"; "required": false; }; "isLastActionButton": { "alias": "isLastActionButton"; "required": false; }; "overrideAction": { "alias": "overrideAction"; "required": false; }; }, {}, never, never, true, never>;
13
16
  }
@@ -56,4 +56,6 @@ export interface IColumnMetadata {
56
56
  dateTimezone: string | null;
57
57
  /** Optional culture override. */
58
58
  dateCulture: string | null;
59
+ /** Optional date format for exports override for this column. */
60
+ exportDateFormat: string | null;
59
61
  }
@@ -34,10 +34,9 @@ export interface ITableButton {
34
34
  */
35
35
  variant?: string;
36
36
  /**
37
- * Optional. The CSS class to apply for button styling.
38
- * Example: "p-button-success" or "custom-class".
37
+ * Optional. Extra CSS classes to apply to the button.
39
38
  */
40
- color?: string;
39
+ class?: string;
41
40
  /**
42
41
  * Optional. Additional inline CSS styles for the button.
43
42
  */
@@ -18,4 +18,6 @@ export interface ITableConfiguration {
18
18
  dateCulture: string;
19
19
  /** Maximum number of table views that can be saved or tracked. */
20
20
  maxViews: number;
21
+ /** The format used for displaying dates in the exports. */
22
+ exportDateFormat: string;
21
23
  }
@@ -1,4 +1,4 @@
1
- import { TableViewSaveMode } from "../enums";
1
+ import { DataAlignHorizontal, DataAlignVertical, TableViewSaveMode } from "../enums";
2
2
  import { IColumnMetadata, IPredefinedFilter, ITableButton } from "../interfaces";
3
3
  /** Configuration options for ECS Primeng table */
4
4
  export interface ITableOptions {
@@ -85,24 +85,15 @@ export interface ITableOptions {
85
85
  */
86
86
  content?: string;
87
87
  /**
88
- * Configuration options for the button that displays the popover of the table legend.
88
+ * Configuration options for the legend button.
89
+ *
90
+ * @default {
91
+ * icon: "pi pi-bars",
92
+ * label: "Legend",
93
+ * color: "p-button-primary"
94
+ * }
89
95
  */
90
- button?: {
91
- /**
92
- * Icon displayed alongside the button of the table legend.
93
- * You can use any PrimeIcons class or icons from third-party libraries
94
- * such as Material Icons or Font Awesome.
95
- *
96
- * @default "pi pi-bars"
97
- */
98
- icon?: string;
99
- /**
100
- * The text shown in the legend button.
101
- *
102
- * @default "Legend"
103
- */
104
- text?: string;
105
- };
96
+ button?: ITableButton;
106
97
  };
107
98
  /**
108
99
  * Configurations related to options that are at the header of the table.
@@ -250,7 +241,7 @@ export interface ITableOptions {
250
241
  *
251
242
  * @default true
252
243
  */
253
- alignmentRight?: boolean;
244
+ positionRight?: boolean;
254
245
  /**
255
246
  * The fixed column width in pixels.
256
247
  *
@@ -269,6 +260,18 @@ export interface ITableOptions {
269
260
  * @default false
270
261
  */
271
262
  resizable?: boolean;
263
+ /**
264
+ * How the items inside the action column are horizontally aligned.
265
+ *
266
+ * @default DataAlignHorizontal.Center
267
+ */
268
+ horizontalAlignment?: DataAlignHorizontal;
269
+ /**
270
+ * How the items inside the action column are vertically aligned.
271
+ *
272
+ * @default DataAlignVertical.Middle
273
+ */
274
+ verticalAlignment?: DataAlignVertical;
272
275
  };
273
276
  /**
274
277
  * Configurations related to the row checkbox selector.
@@ -291,7 +294,7 @@ export interface ITableOptions {
291
294
  *
292
295
  * @default false
293
296
  */
294
- alignmentRight?: boolean;
297
+ positionRight?: boolean;
295
298
  /**
296
299
  * The fixed column width in pixels.
297
300
  *
@@ -318,6 +321,18 @@ export interface ITableOptions {
318
321
  * @default undefined
319
322
  */
320
323
  enabledCondition?: (rowData: any) => boolean;
324
+ /**
325
+ * How the checkbox inside the selector column is horizontally aligned.
326
+ *
327
+ * @default DataAlignHorizontal.Center
328
+ */
329
+ horizontalAlignment?: DataAlignHorizontal;
330
+ /**
331
+ * How the checkbox inside the selector column is vertically aligned.
332
+ *
333
+ * @default DataAlignVertical.Middle
334
+ */
335
+ verticalAlignment?: DataAlignVertical;
321
336
  };
322
337
  /**
323
338
  * Configurations related to the single row selector.
@@ -454,6 +469,32 @@ export interface ITableOptions {
454
469
  * @default undefined
455
470
  */
456
471
  urlSave?: string;
472
+ /**
473
+ * A collection of custom CSS classes to apply to the button that opens the views menu.
474
+ * Multiple classes can be provided as a space-separated string.
475
+ *
476
+ * @default undefined
477
+ */
478
+ selectViewButtonClass?: string;
479
+ /**
480
+ * CSS classes to apply to the button used to reapply a view.
481
+ * Multiple classes can be provided as a space-separated string.
482
+ *
483
+ * @default undefined
484
+ */
485
+ reloadViewButtonClass?: string;
486
+ /**
487
+ * The icon that the reapply view button has.
488
+ *
489
+ * @default "pi pi-refresh"
490
+ */
491
+ reloadViewButtonIcon?: string;
492
+ /**
493
+ * The text that is displayed when no view is selected.
494
+ *
495
+ * @default "--- Select a view ---"
496
+ */
497
+ noViewSelectedText?: string;
457
498
  };
458
499
  /**
459
500
  * Configurations related to the reset table view button.
@@ -23,4 +23,6 @@ export interface ITableQueryRequest {
23
23
  dateTimezone: string;
24
24
  /** The culture/locale used for formatting dates and numbers. */
25
25
  dateCulture: string;
26
+ /** The date format used in exports. */
27
+ exportDateFormat: string;
26
28
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eternalcodestudio/primeng-table",
3
- "version": "19.0.6",
3
+ "version": "19.1.0",
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",