mat-table-ext 1.0.0-beta.0 → 1.0.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.
package/index.d.ts CHANGED
@@ -70,17 +70,52 @@ interface MTExColumn {
70
70
  footerText?: string;
71
71
  headerTooltip?: TooltipProp;
72
72
  cellTooltip?: TooltipProp;
73
- pinned?: 'left' | 'right' | null;
74
- width?: string;
73
+ hide?: boolean;
75
74
  disabled?: boolean;
75
+ pinned?: 'left' | 'right';
76
+ left?: string;
77
+ right?: string;
78
+ width?: string;
79
+ resizable?: boolean;
80
+ type: MTExColumnType;
76
81
  minWidth?: string;
77
82
  maxWidth?: string;
78
- hide?: boolean;
79
- type: MTExColumnType;
83
+ sortable?: boolean | string;
84
+ sortProp?: MTExColumnSortProp;
85
+ typeParameter?: MTExColumnTypeParameter;
86
+ tag?: MTExColumnTag;
87
+ formatter?: (rowData: any, colDef?: MTExColumn) => void;
80
88
  cellTemplate?: TemplateRef<any> | null;
81
89
  headerTemplate?: TemplateRef<any> | null;
90
+ showExpand?: boolean;
91
+ description?: string;
92
+ summary?: ((data: any[], colDef?: MTExColumn) => void) | string;
93
+ class?: string;
82
94
  groupName?: string;
83
95
  }
96
+ interface MTExColumnTag {
97
+ [key: number]: MTExColumnTagValue;
98
+ [key: string]: MTExColumnTagValue;
99
+ }
100
+ interface MTExColumnTagValue {
101
+ text?: string;
102
+ color?: string;
103
+ }
104
+ interface MTExColumnTypeParameter {
105
+ currencyCode?: string;
106
+ display?: string | boolean;
107
+ digitsInfo?: string;
108
+ format?: string;
109
+ locale?: string;
110
+ timezone?: string;
111
+ }
112
+ /** The properties of column sort. */
113
+ interface MTExColumnSortProp {
114
+ arrowPosition?: 'before' | 'after';
115
+ disableClear?: boolean;
116
+ id?: string;
117
+ start?: 'asc' | 'desc';
118
+ }
84
119
  /** Column group definition for grouped headers */
85
120
  interface MTExColumnGroup {
86
121
  name: string;
@@ -148,6 +183,54 @@ interface RowPinning {
148
183
  index: number;
149
184
  position: 'top' | 'bottom';
150
185
  }
186
+ /** Row pinning position type */
187
+ declare type RowPinPosition = 'top' | 'bottom' | null;
188
+ /** Function type to determine row pinning position */
189
+ declare type RowPinningFunction = (row: any, index: number) => RowPinPosition;
190
+ /** Function type to determine if a row should be hidden */
191
+ declare type RowHidingFilterFunction = (row: any, index: number) => boolean;
192
+ /** Table configuration for pinned tables */
193
+ interface MTExPinnedTableConfig {
194
+ /** Enable row pinning feature */
195
+ enableRowPinning?: boolean;
196
+ /** Maximum height for the top pinned table (e.g., '200px', '20vh'). When set, enables scrolling if rows exceed this height. */
197
+ pinnedTopTableMaxHeight?: string;
198
+ /** Maximum height for the bottom pinned table (e.g., '200px', '20vh'). When set, enables scrolling if rows exceed this height. */
199
+ pinnedBottomTableMaxHeight?: string;
200
+ /** Function to determine which rows should be pinned and their position */
201
+ rowPinningFn?: RowPinningFunction;
202
+ }
203
+ /** Table configuration for row hiding */
204
+ interface MTExRowHidingConfig {
205
+ /** Enable row hiding feature */
206
+ enableRowHiding?: boolean;
207
+ /** Array of row indices to hide */
208
+ hiddenRowIndices?: number[];
209
+ /** Function to determine if a row should be hidden */
210
+ rowHidingFilterFn?: RowHidingFilterFunction;
211
+ }
212
+ /** Event emitted when row pinning changes */
213
+ interface RowPinningChangeEvent {
214
+ row: any;
215
+ position: RowPinPosition;
216
+ index?: number;
217
+ }
218
+ /** Table styling configuration */
219
+ interface MTExTableStyles {
220
+ /** Height of the table container */
221
+ tableHeight?: string;
222
+ /** Width of the table */
223
+ tableWidth?: string;
224
+ /** Height of the toolbar */
225
+ toolbarHeight?: string;
226
+ /** Custom CSS class for the table */
227
+ tableClassName?: string;
228
+ }
229
+ /** PDF export configuration */
230
+ interface MTExPDFConfig {
231
+ /** Orientation for PDF export */
232
+ pdfOrientation?: 'portrait' | 'landscape';
233
+ }
151
234
 
152
235
  declare class MatTableExtService {
153
236
  http: HttpClient;
@@ -288,6 +371,7 @@ declare class MatTableExtComponent implements OnInit, OnChanges, AfterViewInit,
288
371
  ngOnChanges(changes: SimpleChanges): void;
289
372
  ngOnInit(): void;
290
373
  ngAfterViewInit(): void;
374
+ private setSorting;
291
375
  /**
292
376
  * @description Calculate offsets for pinned rows based on sticky headers/footers
293
377
  */
@@ -771,4 +855,4 @@ declare class MatTableExtModule {
771
855
  }
772
856
 
773
857
  export { ColumnPinningComponent, EditingComponent, FilterColumnsComponentComponent, MatTableExtComponent, MatTableExtModule, MatTableExtService, ResizeColumnDirective };
774
- export type { CellTemplateRefMap, ColumnVisibility, DisplayColumn, ExpansionChange, FilterSearchValue, MTExCellTemplate, MTExColumn, MTExColumnGroup, MTExColumnPinOption, MTExColumnPinValue, MTExColumnType, MTExRow, RowChange, RowPinning, RowSelectionChange, TooltipPosition, TooltipProp };
858
+ export type { CellTemplateRefMap, ColumnVisibility, DisplayColumn, ExpansionChange, FilterSearchValue, MTExCellTemplate, MTExColumn, MTExColumnGroup, MTExColumnPinOption, MTExColumnPinValue, MTExColumnSortProp, MTExColumnTag, MTExColumnTagValue, MTExColumnType, MTExColumnTypeParameter, MTExPDFConfig, MTExPinnedTableConfig, MTExRow, MTExRowHidingConfig, MTExTableStyles, RowChange, RowHidingFilterFunction, RowPinPosition, RowPinning, RowPinningChangeEvent, RowPinningFunction, RowSelectionChange, TooltipPosition, TooltipProp };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mat-table-ext",
3
- "version": "1.0.0-beta.0",
3
+ "version": "1.0.0",
4
4
  "description": "The mat-table-ext is a powerful material table extension component used to display tabular data with extra features.",
5
5
  "homepage": "https://fastcode-inc.github.io/custom-table-doc",
6
6
  "keywords": [
@@ -30,12 +30,14 @@
30
30
  "@angular/platform-browser-dynamic": "^20.2.0",
31
31
  "@angular/router": "^20.2.0",
32
32
  "@ngx-translate/core": "^14.0.0",
33
- "xlsx": "^0.18.5"
33
+ "xlsx": "^0.18.5",
34
+ "jspdf": "^3.0.4",
35
+ "jspdf-autotable": "^5.0.2"
34
36
  },
35
37
  "dependencies": {
36
38
  "tslib": "^2.3.0"
37
39
  },
38
- "module": "fesm2022/mat-table-ext-test1.mjs",
40
+ "module": "fesm2022/mat-table-ext.mjs",
39
41
  "typings": "index.d.ts",
40
42
  "exports": {
41
43
  "./package.json": {
@@ -43,7 +45,7 @@
43
45
  },
44
46
  ".": {
45
47
  "types": "./index.d.ts",
46
- "default": "./fesm2022/mat-table-ext-test1.mjs"
48
+ "default": "./fesm2022/mat-table-ext.mjs"
47
49
  }
48
50
  },
49
51
  "sideEffects": false