@one-paragon/angular-utilities 2.8.4 → 2.8.6
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/fesm2022/one-paragon-angular-utilities.mjs +7350 -0
- package/fesm2022/one-paragon-angular-utilities.mjs.map +1 -0
- package/package.json +27 -15
- package/types/one-paragon-angular-utilities.d.ts +2211 -0
- package/karma.conf.js +0 -43
- package/ng-package.json +0 -7
- package/src/action-state/action-state-spinner/action-state-spinner.component.css +0 -16
- package/src/action-state/action-state-spinner/action-state-spinner.component.html +0 -7
- package/src/action-state/action-state-spinner/action-state-spinner.component.spec.ts +0 -25
- package/src/action-state/action-state-spinner/action-state-spinner.component.ts +0 -26
- package/src/action-state/action-state-ui/action-state-ui.module.ts +0 -13
- package/src/action-state/index.ts +0 -8
- package/src/action-state/ngrx-ext/ngrx-ext.module.ts +0 -14
- package/src/action-state/ngrx.ts +0 -69
- package/src/http-request-state/RequestStateFactory.ts +0 -56
- package/src/http-request-state/RequestStateStore.ts +0 -360
- package/src/http-request-state/deprecated.ts +0 -20
- package/src/http-request-state/directives/HttpStateDirectiveBase.ts +0 -29
- package/src/http-request-state/directives/http-error-state-directive.ts +0 -21
- package/src/http-request-state/directives/http-inProgress-state-directive.ts +0 -19
- package/src/http-request-state/directives/http-notStarted-state-directive.ts +0 -19
- package/src/http-request-state/directives/http-success-state-directive.ts +0 -29
- package/src/http-request-state/directives/index.ts +0 -5
- package/src/http-request-state/directives/request-state-directive.spec.ts +0 -73
- package/src/http-request-state/directives/request-state-directive.ts +0 -78
- package/src/http-request-state/documentation/CREATE-REQUESTOR.md +0 -667
- package/src/http-request-state/documentation/README.md +0 -191
- package/src/http-request-state/documentation/REQUEST-STATE-STORE-CONFIG.md +0 -648
- package/src/http-request-state/documentation/REQUESTOR.md +0 -616
- package/src/http-request-state/helpers.ts +0 -30
- package/src/http-request-state/http-state-module.ts +0 -23
- package/src/http-request-state/index.ts +0 -7
- package/src/http-request-state/models/view-context.ts +0 -18
- package/src/http-request-state/observable.spec.ts +0 -43
- package/src/http-request-state/request-state.ts +0 -66
- package/src/http-request-state/rxjs/getRequestorBody.ts +0 -10
- package/src/http-request-state/rxjs/getRequestorState.ts +0 -8
- package/src/http-request-state/rxjs/index.ts +0 -4
- package/src/http-request-state/rxjs/tapError.ts +0 -16
- package/src/http-request-state/rxjs/tapSuccess.ts +0 -16
- package/src/http-request-state/strategies.spec.ts +0 -42
- package/src/http-request-state/types.ts +0 -54
- package/src/ngrx/actionable-selector.ts +0 -189
- package/src/ngrx/index.ts +0 -1
- package/src/public-api.ts +0 -40
- package/src/rxjs/defaultShareReplay.ts +0 -8
- package/src/rxjs/index.ts +0 -5
- package/src/rxjs/mapError.ts +0 -8
- package/src/rxjs/rxjs-operators.ts +0 -130
- package/src/rxjs/subjectifier.ts +0 -17
- package/src/rxjs/subscriber.directive.ts +0 -57
- package/src/specs/clickSubject.spec.ts +0 -99
- package/src/specs/dialog.spec.ts +0 -101
- package/src/specs/toggleGroupDirective.spec.ts +0 -229
- package/src/table-builder/classes/DefaultSettings.ts +0 -11
- package/src/table-builder/classes/MatTableObservableDataSource.ts +0 -23
- package/src/table-builder/classes/TableBuilderConfig.ts +0 -49
- package/src/table-builder/classes/TableBuilderDataSource.ts +0 -64
- package/src/table-builder/classes/TableState.ts +0 -96
- package/src/table-builder/classes/data-store.ts +0 -10
- package/src/table-builder/classes/display-col.ts +0 -5
- package/src/table-builder/classes/filter-info.ts +0 -129
- package/src/table-builder/classes/table-builder-general-settings.ts +0 -233
- package/src/table-builder/classes/table-builder.ts +0 -105
- package/src/table-builder/classes/table-store.helpers.ts +0 -109
- package/src/table-builder/classes/table-store.ts +0 -540
- package/src/table-builder/components/array-column.component.ts +0 -34
- package/src/table-builder/components/column-builder/column-builder.component.html +0 -109
- package/src/table-builder/components/column-builder/column-builder.component.scss +0 -43
- package/src/table-builder/components/column-builder/column-builder.component.spec.ts +0 -49
- package/src/table-builder/components/column-builder/column-builder.component.ts +0 -130
- package/src/table-builder/components/column-builder/column-helpers.ts +0 -54
- package/src/table-builder/components/column-header-menu/column-header-menu.component.html +0 -128
- package/src/table-builder/components/column-header-menu/column-header-menu.component.scss +0 -97
- package/src/table-builder/components/column-header-menu/column-header-menu.component.ts +0 -113
- package/src/table-builder/components/date-filter/date-filter.component.html +0 -39
- package/src/table-builder/components/date-filter/date-filter.component.ts +0 -33
- package/src/table-builder/components/date-time-filter/date-time-filter.component.html +0 -25
- package/src/table-builder/components/date-time-filter/date-time-filter.component.ts +0 -33
- package/src/table-builder/components/filter/filter.component.html +0 -120
- package/src/table-builder/components/filter/filter.component.scss +0 -60
- package/src/table-builder/components/filter/filter.component.spec.ts +0 -86
- package/src/table-builder/components/filter/filter.component.ts +0 -73
- package/src/table-builder/components/filter/in-list/in-list-filter.component.ts +0 -171
- package/src/table-builder/components/gen-col-displayer/gen-col-displayer.component.html +0 -60
- package/src/table-builder/components/gen-col-displayer/gen-col-displayer.component.scss +0 -57
- package/src/table-builder/components/gen-col-displayer/gen-col-displayer.component.ts +0 -44
- package/src/table-builder/components/generic-table/generic-table.component.html +0 -140
- package/src/table-builder/components/generic-table/generic-table.component.scss +0 -45
- package/src/table-builder/components/generic-table/generic-table.component.ts +0 -531
- package/src/table-builder/components/generic-table/paginator.component.ts +0 -125
- package/src/table-builder/components/group-by-list/group-by-list.component.css +0 -24
- package/src/table-builder/components/group-by-list/group-by-list.component.html +0 -21
- package/src/table-builder/components/group-by-list/group-by-list.component.spec.ts +0 -23
- package/src/table-builder/components/group-by-list/group-by-list.component.ts +0 -26
- package/src/table-builder/components/in-filter/in-filter.component.css +0 -22
- package/src/table-builder/components/in-filter/in-filter.component.html +0 -38
- package/src/table-builder/components/in-filter/in-filter.component.ts +0 -66
- package/src/table-builder/components/index.ts +0 -9
- package/src/table-builder/components/initialization-component/initialization.component.html +0 -78
- package/src/table-builder/components/initialization-component/initialization.component.ts +0 -28
- package/src/table-builder/components/link-column.component.ts +0 -42
- package/src/table-builder/components/number-filter/number-filter.component.css +0 -10
- package/src/table-builder/components/number-filter/number-filter.component.html +0 -32
- package/src/table-builder/components/number-filter/number-filter.component.spec.ts +0 -30
- package/src/table-builder/components/number-filter/number-filter.component.ts +0 -34
- package/src/table-builder/components/profiles-menu/profiles-menu.component.html +0 -77
- package/src/table-builder/components/profiles-menu/profiles-menu.component.scss +0 -126
- package/src/table-builder/components/profiles-menu/profiles-menu.component.spec.ts +0 -23
- package/src/table-builder/components/profiles-menu/profiles-menu.component.ts +0 -64
- package/src/table-builder/components/reset-menu/reset-menu.component.css +0 -3
- package/src/table-builder/components/reset-menu/reset-menu.component.html +0 -10
- package/src/table-builder/components/reset-menu/reset-menu.component.ts +0 -87
- package/src/table-builder/components/scroll-strategy.ts +0 -139
- package/src/table-builder/components/sort-menu/sort-menu.component-store.ts +0 -57
- package/src/table-builder/components/sort-menu/sort-menu.component.html +0 -115
- package/src/table-builder/components/sort-menu/sort-menu.component.scss +0 -119
- package/src/table-builder/components/sort-menu/sort-menu.component.ts +0 -88
- package/src/table-builder/components/table-container/table-container.component.html +0 -94
- package/src/table-builder/components/table-container/table-container.component.scss +0 -60
- package/src/table-builder/components/table-container/table-container.component.ts +0 -467
- package/src/table-builder/components/table-container/table-container.helpers/data-state.helpers.ts +0 -113
- package/src/table-builder/components/table-container/table-container.helpers/filter-state.helpers.ts +0 -125
- package/src/table-builder/components/table-container/table-container.helpers/groupBy.helpers.ts +0 -172
- package/src/table-builder/components/table-container/table-container.helpers/meta-data.helpers.ts +0 -19
- package/src/table-builder/components/table-container/table-container.helpers/sort-state.helpers.ts +0 -47
- package/src/table-builder/components/table-container/tableProps.ts +0 -21
- package/src/table-builder/components/table-container/virtual-scroll-container.ts +0 -216
- package/src/table-builder/components/table-container-filter/filter-list/filter-list.component.html +0 -42
- package/src/table-builder/components/table-container-filter/filter-list/filter-list.component.ts +0 -47
- package/src/table-builder/components/table-container-filter/gen-filter-displayer/gen-filter-displayer.component.css +0 -40
- package/src/table-builder/components/table-container-filter/gen-filter-displayer/gen-filter-displayer.component.html +0 -11
- package/src/table-builder/components/table-container-filter/gen-filter-displayer/gen-filter-displayer.component.spec.ts +0 -85
- package/src/table-builder/components/table-container-filter/gen-filter-displayer/gen-filter-displayer.component.ts +0 -35
- package/src/table-builder/components/table-container-filter/table-wrapper-filter-store.ts +0 -13
- package/src/table-builder/components/table-header-menu/table-header-menu.component.css +0 -21
- package/src/table-builder/components/table-header-menu/table-header-menu.component.html +0 -48
- package/src/table-builder/components/table-header-menu/table-header-menu.component.ts +0 -36
- package/src/table-builder/directives/custom-cell-directive.ts +0 -63
- package/src/table-builder/directives/custom-header-directive.ts +0 -16
- package/src/table-builder/directives/group-row-directive.ts +0 -91
- package/src/table-builder/directives/index.ts +0 -8
- package/src/table-builder/directives/multi-sort.directive.spec.ts +0 -124
- package/src/table-builder/directives/multi-sort.directive.ts +0 -58
- package/src/table-builder/directives/resize-column.directive.ts +0 -107
- package/src/table-builder/directives/table-wrapper.directive.ts +0 -13
- package/src/table-builder/directives/tb-filter.directive.ts +0 -376
- package/src/table-builder/documentation/table-builder/CUSTOM-CELL.md +0 -568
- package/src/table-builder/documentation/table-builder/CUSTOM-GROUP-ROW.md +0 -356
- package/src/table-builder/documentation/table-builder/METADATA-DOCUMENTATION.md +0 -517
- package/src/table-builder/documentation/table-builder/STYLER-STYLE.md +0 -228
- package/src/table-builder/documentation/table-builder/TABLE-BUILDER-CONFIG.md +0 -325
- package/src/table-builder/documentation/table-builder/TABLE-BUILDER-SETTINGS.md +0 -515
- package/src/table-builder/documentation/table-builder/TABLE-BUILDER.md +0 -430
- package/src/table-builder/documentation/table-builder/TABLE-CONTAINER.md +0 -628
- package/src/table-builder/enums/filterTypes.ts +0 -39
- package/src/table-builder/functions/boolean-filter-function.ts +0 -12
- package/src/table-builder/functions/date-filter-function.ts +0 -85
- package/src/table-builder/functions/download-data.ts +0 -11
- package/src/table-builder/functions/null-filter-function.ts +0 -9
- package/src/table-builder/functions/number-filter-function.ts +0 -47
- package/src/table-builder/functions/sort-data-function.ts +0 -80
- package/src/table-builder/functions/string-filter-function.ts +0 -59
- package/src/table-builder/interfaces/ColumnInfo.ts +0 -9
- package/src/table-builder/interfaces/dictionary.ts +0 -3
- package/src/table-builder/interfaces/meta-data.ts +0 -279
- package/src/table-builder/ngrx/tableBuilderStateStore.ts +0 -203
- package/src/table-builder/pipes/column-total.pipe.ts +0 -16
- package/src/table-builder/pipes/format-filter-type.pipe.ts +0 -12
- package/src/table-builder/pipes/format-filter-value.pipe.ts +0 -71
- package/src/table-builder/pipes/key-display.ts +0 -13
- package/src/table-builder/services/all-values-filter-creator.service.ts +0 -92
- package/src/table-builder/services/export-to-csv.service.ts +0 -117
- package/src/table-builder/services/link-creator.service.ts +0 -98
- package/src/table-builder/services/table-template-service.ts +0 -47
- package/src/table-builder/services/transform-creator.ts +0 -90
- package/src/table-builder/specs/table-custom-filters.spec.ts +0 -262
- package/src/table-builder/styles/collapser.styles.scss +0 -16
- package/src/table-builder/table-builder.module.ts +0 -42
- package/src/table-builder/types/group-types.ts +0 -42
- package/src/table-builder/types/index.ts +0 -1
- package/src/test.ts +0 -17
- package/src/utilities/array-helpers.ts +0 -13
- package/src/utilities/directives/auto-focus.directive.ts +0 -20
- package/src/utilities/directives/clickEmitterDirective.ts +0 -15
- package/src/utilities/directives/clickSubject.ts +0 -19
- package/src/utilities/directives/conditional-classes.directive.ts +0 -36
- package/src/utilities/directives/dialog-service.ts +0 -19
- package/src/utilities/directives/dialog.ts +0 -174
- package/src/utilities/directives/mat-toggle-group-directive.ts +0 -60
- package/src/utilities/directives/prevent-enter.directive.ts +0 -12
- package/src/utilities/directives/stop-propagation.directive.ts +0 -19
- package/src/utilities/directives/styler.ts +0 -45
- package/src/utilities/directives/trim-whitespace.directive.ts +0 -20
- package/src/utilities/index.ts +0 -22
- package/src/utilities/module.ts +0 -53
- package/src/utilities/pipes/function.pipe.ts +0 -21
- package/src/utilities/pipes/phone.pipe.ts +0 -20
- package/src/utilities/pipes/space-case.pipes.spec.ts +0 -47
- package/src/utilities/pipes/space-case.pipes.ts +0 -29
- package/tsconfig.lib.json +0 -20
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -17
|
@@ -1,515 +0,0 @@
|
|
|
1
|
-
# TableBuilderSettings Documentation
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
`TableBuilderSettings` is the main configuration interface for customizing the appearance and behavior of the Table Builder component. It provides fine-grained control over headers, footers, column behavior, table functionality, and more.
|
|
6
|
-
|
|
7
|
-
## Main Settings Interface
|
|
8
|
-
|
|
9
|
-
```typescript
|
|
10
|
-
interface TableBuilderSettings<T = any> {
|
|
11
|
-
headerSettings?: Partial<TableWrapperHeaderSettings>;
|
|
12
|
-
footerSettings?: Partial<TableWrapperFooterSettings>;
|
|
13
|
-
columnHeaderSettings?: Partial<TableColumnHeaderSettings>;
|
|
14
|
-
columnFooterSettings?: Partial<TableColumnFooterSettings>;
|
|
15
|
-
tableSettings?: Partial<TableSettings<T>>;
|
|
16
|
-
}
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
## Header Settings
|
|
22
|
-
|
|
23
|
-
Controls the table's wrapper header (the toolbar area above the table).
|
|
24
|
-
|
|
25
|
-
### `headerSettings: TableWrapperHeaderSettings`
|
|
26
|
-
|
|
27
|
-
#### `hideExport`
|
|
28
|
-
- **Type**: `boolean`
|
|
29
|
-
- **Default**: `false`
|
|
30
|
-
- **Description**: Hides the export button from the header toolbar.
|
|
31
|
-
|
|
32
|
-
#### `hideFilter`
|
|
33
|
-
- **Type**: `boolean`
|
|
34
|
-
- **Default**: `false`
|
|
35
|
-
- **Description**: Hides the filter button from the header toolbar.
|
|
36
|
-
|
|
37
|
-
#### `hideColumnSettings`
|
|
38
|
-
- **Type**: `boolean`
|
|
39
|
-
- **Default**: `false`
|
|
40
|
-
- **Description**: Hides the column settings button from the header toolbar. Column settings allow users to reorder columns and show/hide columns.
|
|
41
|
-
|
|
42
|
-
#### `hideSort`
|
|
43
|
-
- **Type**: `boolean`
|
|
44
|
-
- **Default**: `false`
|
|
45
|
-
- **Description**: Hides the sort menu button from the header toolbar.
|
|
46
|
-
|
|
47
|
-
#### `hideHeader`
|
|
48
|
-
- **Type**: `boolean`
|
|
49
|
-
- **Default**: `false`
|
|
50
|
-
- **Description**: Completely hides the entire header wrapper.
|
|
51
|
-
|
|
52
|
-
#### `collapse`
|
|
53
|
-
- **Type**: `boolean`
|
|
54
|
-
- **Default**: `false`
|
|
55
|
-
- **Description**: Initially collapses the header toolbar. User can toggle it open.
|
|
56
|
-
|
|
57
|
-
#### `showTitleWhenCollapsed`
|
|
58
|
-
- **Type**: `boolean`
|
|
59
|
-
- **Default**: `true`
|
|
60
|
-
- **Description**: When header is collapsed, still shows the title text.
|
|
61
|
-
|
|
62
|
-
#### `title`
|
|
63
|
-
- **Type**: `TbTitle | undefined`
|
|
64
|
-
- **Default**: `undefined`
|
|
65
|
-
- **Description**: Configuration for the table title.
|
|
66
|
-
- **Properties**:
|
|
67
|
-
- **`text`**: `string` (required) - The title text to display
|
|
68
|
-
- **`level`**: `1 | 2 | 3 | 4 | 5 | 6` - HTML heading level (h1-h6)
|
|
69
|
-
- **`styles`**: `Dictionary<string>` - Custom CSS styles for the title
|
|
70
|
-
- **Example**:
|
|
71
|
-
```typescript
|
|
72
|
-
title: {
|
|
73
|
-
text: 'User Management',
|
|
74
|
-
level: 2,
|
|
75
|
-
styles: { 'color': '#333', 'font-weight': 'bold' }
|
|
76
|
-
}
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
#### `headerHeight`
|
|
80
|
-
- **Type**: [`TbSize`](#tbsize-type) | `undefined`
|
|
81
|
-
- **Default**: `undefined`
|
|
82
|
-
- **Description**: Sets a specific height for the header. Can be a number (pixels) or a string like `'56px'` or `'3.5rem'`.
|
|
83
|
-
|
|
84
|
-
**Example**:
|
|
85
|
-
```typescript
|
|
86
|
-
headerSettings: {
|
|
87
|
-
hideExport: true,
|
|
88
|
-
collapse: false,
|
|
89
|
-
title: {
|
|
90
|
-
text: 'Employee List',
|
|
91
|
-
level: 3
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
---
|
|
97
|
-
|
|
98
|
-
## Footer Settings
|
|
99
|
-
|
|
100
|
-
Controls the table's wrapper footer (the area below the table).
|
|
101
|
-
|
|
102
|
-
### `footerSettings: TableWrapperFooterSettings`
|
|
103
|
-
|
|
104
|
-
#### `collapse`
|
|
105
|
-
- **Type**: `boolean`
|
|
106
|
-
- **Default**: `false`
|
|
107
|
-
- **Description**: Initially collapses the footer section. User can toggle it open.
|
|
108
|
-
|
|
109
|
-
**Example**:
|
|
110
|
-
```typescript
|
|
111
|
-
footerSettings: {
|
|
112
|
-
collapse: true
|
|
113
|
-
}
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
---
|
|
117
|
-
|
|
118
|
-
## Column Header Settings
|
|
119
|
-
|
|
120
|
-
Controls the column header row (where column names and filter inputs appear).
|
|
121
|
-
|
|
122
|
-
### `columnHeaderSettings: TableColumnHeaderSettings`
|
|
123
|
-
|
|
124
|
-
#### `stickyHeaderRow`
|
|
125
|
-
- **Type**: `boolean`
|
|
126
|
-
- **Default**: `true`
|
|
127
|
-
- **Description**: Makes the column header row stick to the top when scrolling.
|
|
128
|
-
|
|
129
|
-
#### `noFilters`
|
|
130
|
-
- **Type**: `boolean`
|
|
131
|
-
- **Default**: `false`
|
|
132
|
-
- **Description**: Hides all column filter inputs in the header row.
|
|
133
|
-
|
|
134
|
-
#### `noHeader`
|
|
135
|
-
- **Type**: `boolean`
|
|
136
|
-
- **Default**: `false`
|
|
137
|
-
- **Description**: Completely hides the column header row (both column names and filters).
|
|
138
|
-
|
|
139
|
-
**Example**:
|
|
140
|
-
```typescript
|
|
141
|
-
columnHeaderSettings: {
|
|
142
|
-
stickyHeaderRow: true,
|
|
143
|
-
noFilters: false
|
|
144
|
-
}
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
---
|
|
148
|
-
|
|
149
|
-
## Column Footer Settings
|
|
150
|
-
|
|
151
|
-
Controls the column footer row (where aggregations like sums might appear).
|
|
152
|
-
|
|
153
|
-
### `columnFooterSettings: TableColumnFooterSettings`
|
|
154
|
-
|
|
155
|
-
#### `stickyFooterRow`
|
|
156
|
-
- **Type**: `boolean`
|
|
157
|
-
- **Default**: `false`
|
|
158
|
-
- **Description**: Makes the column footer row stick to the bottom when scrolling.
|
|
159
|
-
|
|
160
|
-
**Example**:
|
|
161
|
-
```typescript
|
|
162
|
-
columnFooterSettings: {
|
|
163
|
-
stickyFooterRow: true
|
|
164
|
-
}
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
---
|
|
168
|
-
|
|
169
|
-
## Table Settings
|
|
170
|
-
|
|
171
|
-
The core configuration for table functionality, rows, pagination, virtualization, and more.
|
|
172
|
-
|
|
173
|
-
### `tableSettings: TableSettings<T>`
|
|
174
|
-
|
|
175
|
-
#### `tableId`
|
|
176
|
-
- **Type**: `string | undefined`
|
|
177
|
-
- **Default**: `undefined`
|
|
178
|
-
- **Description**: Unique identifier for the table. Used for persisting user preferences (column visibility, sort order, etc.) across sessions.
|
|
179
|
-
|
|
180
|
-
#### `trackBy`
|
|
181
|
-
- **Type**: `string | ((item: T) => any) | undefined`
|
|
182
|
-
- **Default**: `undefined`
|
|
183
|
-
- **Description**: Property name or function to track rows by for Angular's change detection optimization. Improves performance when data changes. If no `trackBy` is provided, Table Builder will automatically track by an internally added property (symbol `initIndexSymbol`).
|
|
184
|
-
- **Example**:
|
|
185
|
-
```typescript
|
|
186
|
-
trackBy: 'id'
|
|
187
|
-
// or
|
|
188
|
-
trackBy: (item) => item.userId
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
#### `includeIndexColumn`
|
|
192
|
-
- **Type**: `boolean`
|
|
193
|
-
- **Default**: `false`
|
|
194
|
-
- **Description**: Adds a column showing the row index/number.
|
|
195
|
-
|
|
196
|
-
#### `includeSelectionColumn`
|
|
197
|
-
- **Type**: `boolean`
|
|
198
|
-
- **Default**: `false`
|
|
199
|
-
- **Description**: Adds a column with checkboxes for row selection.
|
|
200
|
-
|
|
201
|
-
#### `usePaginator`
|
|
202
|
-
- **Type**: `boolean | undefined`
|
|
203
|
-
- **Default**: `true`
|
|
204
|
-
- **Description**: Enables pagination controls for the table.
|
|
205
|
-
|
|
206
|
-
#### `useVirtualScroll`
|
|
207
|
-
- **Type**: `boolean | undefined`
|
|
208
|
-
- **Default**: `false`
|
|
209
|
-
- **Description**: Enables virtual scrolling for large datasets (renders only visible rows for performance).
|
|
210
|
-
|
|
211
|
-
#### `paginatorSettings`
|
|
212
|
-
- **Type**: `Partial<PaginatorOptions> | undefined`
|
|
213
|
-
- **Default**: `undefined`
|
|
214
|
-
- **Description**: Configuration for pagination behavior. See [Paginator Options](#paginator-options) section below.
|
|
215
|
-
|
|
216
|
-
#### `virtualScrollSettings`
|
|
217
|
-
- **Type**: `Partial<VirtualScrollOptions> | undefined`
|
|
218
|
-
- **Default**: `undefined`
|
|
219
|
-
- **Description**: Configuration for virtual scrolling. See [Virtual Scroll Options](#virtual-scroll-options) section below.
|
|
220
|
-
|
|
221
|
-
#### `rowHeight`
|
|
222
|
-
- **Type**: [`TbSize`](#tbsize-type) | `undefined`
|
|
223
|
-
- **Default**: `undefined`
|
|
224
|
-
- **Description**: Sets a specific height for table rows. Can be a number (pixels) or a string like `'48px'` or `'3rem'`.
|
|
225
|
-
|
|
226
|
-
#### `groupHeaderHeight`
|
|
227
|
-
- **Type**: [`TbSize`](#tbsize-type) | `undefined`
|
|
228
|
-
- **Default**: `undefined`
|
|
229
|
-
- **Description**: Sets a specific height for group header rows when using grouping.
|
|
230
|
-
|
|
231
|
-
#### `minColumnWidth`
|
|
232
|
-
- **Type**: [`TbSize`](#tbsize-type) | `undefined`
|
|
233
|
-
- **Default**: `undefined`
|
|
234
|
-
- **Description**: Sets a minimum width for all columns.
|
|
235
|
-
|
|
236
|
-
#### `rowClasses`
|
|
237
|
-
- **Type**: `Dictionary<Predicate<T> | true> | undefined`
|
|
238
|
-
- **Default**: `undefined`
|
|
239
|
-
- **Description**: CSS classes to apply to rows. Keys are class names, values are predicates that determine when to apply the class.
|
|
240
|
-
- **Example**:
|
|
241
|
-
```typescript
|
|
242
|
-
rowClasses: {
|
|
243
|
-
'highlight-row': (row) => row.isPriority,
|
|
244
|
-
'inactive-row': (row) => !row.isActive,
|
|
245
|
-
'even-row': true // applies to all rows
|
|
246
|
-
}
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
#### `rowStyles`
|
|
250
|
-
- **Type**: [`StylerStyle<T>`](./STYLER-STYLE.md) | `undefined`
|
|
251
|
-
- **Default**: `undefined`
|
|
252
|
-
- **Description**: Dynamic inline styles applied to rows based on row data. See [StylerStyle documentation](./STYLER-STYLE.md) for detailed usage patterns.
|
|
253
|
-
- **Example**:
|
|
254
|
-
```typescript
|
|
255
|
-
rowStyles: (row) => ({
|
|
256
|
-
'background-color': row.status === 'error' ? '#ffebee' : 'transparent',
|
|
257
|
-
'font-weight': row.isPriority ? 'bold' : 'normal'
|
|
258
|
-
})
|
|
259
|
-
```
|
|
260
|
-
|
|
261
|
-
#### `rowClick`
|
|
262
|
-
- **Type**: `((row: T, event?: MouseEvent) => void) | undefined`
|
|
263
|
-
- **Default**: `undefined`
|
|
264
|
-
- **Description**: Click handler for rows.
|
|
265
|
-
- **Example**:
|
|
266
|
-
```typescript
|
|
267
|
-
rowClick: (row, event) => {
|
|
268
|
-
console.log('Clicked row:', row);
|
|
269
|
-
this.router.navigate(['/details', row.id]);
|
|
270
|
-
}
|
|
271
|
-
```
|
|
272
|
-
|
|
273
|
-
#### `exportSettings`
|
|
274
|
-
- **Type**: `TableBuilderExport | undefined`
|
|
275
|
-
- **Default**: `undefined`
|
|
276
|
-
- **Description**: Global export settings for the table. See the [METADATA-DOCUMENTATION.md](./METADATA-DOCUMENTATION.md#export-configuration) for details on export options.
|
|
277
|
-
|
|
278
|
-
#### `groupBySettings`
|
|
279
|
-
- **Type**: `Array<{ key: Path<T>, expanded?: boolean }>`
|
|
280
|
-
- **Default**: `[]`
|
|
281
|
-
- **Description**: Configures row grouping by one or more columns.
|
|
282
|
-
- **Properties**:
|
|
283
|
-
- **`key`**: Column key to group by (type-safe property path)
|
|
284
|
-
- **`expanded`**: Whether groups should be initially expanded (`true`) or collapsed (`false`)
|
|
285
|
-
- **Example**:
|
|
286
|
-
```typescript
|
|
287
|
-
groupBySettings: [
|
|
288
|
-
{ key: 'department', expanded: true },
|
|
289
|
-
{ key: 'status', expanded: false }
|
|
290
|
-
]
|
|
291
|
-
```
|
|
292
|
-
|
|
293
|
-
---
|
|
294
|
-
|
|
295
|
-
## Paginator Options
|
|
296
|
-
|
|
297
|
-
Configuration for table pagination.
|
|
298
|
-
|
|
299
|
-
### `paginatorSettings: PaginatorOptions`
|
|
300
|
-
|
|
301
|
-
#### `pageSize`
|
|
302
|
-
- **Type**: `number | undefined`
|
|
303
|
-
- **Default**: Configured via `TableBuilderConfig` (typically `10`)
|
|
304
|
-
- **Description**: Number of rows to display per page.
|
|
305
|
-
|
|
306
|
-
#### `defaultAll`
|
|
307
|
-
- **Type**: `boolean`
|
|
308
|
-
- **Default**: `false`
|
|
309
|
-
- **Description**: When `true`, automatically includes "All" option in page size selector, sets `includeAllInOptions` to `true`, and defaults the table to use the virtual scroll view for better performance.
|
|
310
|
-
|
|
311
|
-
#### `includeAllInOptions`
|
|
312
|
-
- **Type**: `boolean`
|
|
313
|
-
- **Default**: `false`
|
|
314
|
-
- **Description**: Adds an "All" option to the page size selector to show all rows on one page.
|
|
315
|
-
|
|
316
|
-
**Example**:
|
|
317
|
-
```typescript
|
|
318
|
-
paginatorSettings: {
|
|
319
|
-
pageSize: 25,
|
|
320
|
-
includeAllInOptions: true
|
|
321
|
-
}
|
|
322
|
-
```
|
|
323
|
-
|
|
324
|
-
---
|
|
325
|
-
|
|
326
|
-
## Virtual Scroll Options
|
|
327
|
-
|
|
328
|
-
Configuration for virtual scrolling (recommended for tables with 100+ rows).
|
|
329
|
-
|
|
330
|
-
### `virtualScrollSettings: VirtualScrollOptions`
|
|
331
|
-
|
|
332
|
-
#### `rowHeight`
|
|
333
|
-
- **Type**: [`TbSize`](#tbsize-type)
|
|
334
|
-
- **Default**: `48` (pixels)
|
|
335
|
-
- **Description**: Height of each row. Required for virtual scroll calculations.
|
|
336
|
-
|
|
337
|
-
#### `enforceRowHeight`
|
|
338
|
-
- **Type**: `boolean`
|
|
339
|
-
- **Default**: `true`
|
|
340
|
-
- **Description**: When `true`, strictly enforces the specified row height via CSS.
|
|
341
|
-
|
|
342
|
-
#### `headerHeight`
|
|
343
|
-
- **Type**: [`TbSize`](#tbsize-type)
|
|
344
|
-
- **Default**: `56` (pixels)
|
|
345
|
-
- **Description**: Height of the column header row.
|
|
346
|
-
|
|
347
|
-
#### `enforceHeaderHeight`
|
|
348
|
-
- **Type**: `boolean`
|
|
349
|
-
- **Default**: `true`
|
|
350
|
-
- **Description**: When `true`, strictly enforces the specified header height via CSS.
|
|
351
|
-
|
|
352
|
-
#### `amountOfVisibleItems`
|
|
353
|
-
- **Type**: `number`
|
|
354
|
-
- **Default**: `10`
|
|
355
|
-
- **Description**: Number of rows to show in the viewport. Determines the viewport height unless `maxViewPortHeight` is specified.
|
|
356
|
-
|
|
357
|
-
#### `maxViewPortHeight`
|
|
358
|
-
- **Type**: [`TbSize`](#tbsize-type) | `undefined`
|
|
359
|
-
- **Default**: `undefined`
|
|
360
|
-
- **Description**: Maximum height for the table viewport. Takes precedence over `amountOfVisibleItems`.
|
|
361
|
-
|
|
362
|
-
#### `dynamicHeight`
|
|
363
|
-
- **Type**: `boolean`
|
|
364
|
-
- **Default**: `false`
|
|
365
|
-
- **Description**: When `true`, attempts to expand the table to fill available space to the bottom of the screen.
|
|
366
|
-
- If `amountOfVisibleItems` is set, that becomes the minimum number of rows
|
|
367
|
-
- If `maxViewPortHeight` is set, that becomes the maximum table size
|
|
368
|
-
|
|
369
|
-
#### `dynamicalHeightBuffer`
|
|
370
|
-
- **Type**: [`TbSize`](#tbsize-type)
|
|
371
|
-
- **Default**: `0`
|
|
372
|
-
- **Description**: When `dynamicHeight` is `true`, leaves this amount of space from the bottom of the viewport.
|
|
373
|
-
|
|
374
|
-
**Example**:
|
|
375
|
-
```typescript
|
|
376
|
-
virtualScrollSettings: {
|
|
377
|
-
rowHeight: 60,
|
|
378
|
-
enforceRowHeight: true,
|
|
379
|
-
headerHeight: 64,
|
|
380
|
-
amountOfVisibleItems: 15,
|
|
381
|
-
dynamicHeight: true,
|
|
382
|
-
dynamicalHeightBuffer: '2rem'
|
|
383
|
-
}
|
|
384
|
-
```
|
|
385
|
-
|
|
386
|
-
---
|
|
387
|
-
|
|
388
|
-
## TbSize Type
|
|
389
|
-
|
|
390
|
-
`TbSize` is a flexible size type used throughout the settings:
|
|
391
|
-
|
|
392
|
-
```typescript
|
|
393
|
-
type TbSize = number | `${number}${'px' | 'rem'}`;
|
|
394
|
-
```
|
|
395
|
-
|
|
396
|
-
**Examples**:
|
|
397
|
-
- `48` - Number interpreted as pixels
|
|
398
|
-
- `'48px'` - Explicit pixel value
|
|
399
|
-
- `'3rem'` - Rem units (relative to root font size)
|
|
400
|
-
|
|
401
|
-
---
|
|
402
|
-
|
|
403
|
-
## Complete Example
|
|
404
|
-
|
|
405
|
-
```typescript
|
|
406
|
-
const tableSettings: TableBuilderSettings<User> = {
|
|
407
|
-
headerSettings: {
|
|
408
|
-
hideExport: false,
|
|
409
|
-
hideFilter: false,
|
|
410
|
-
collapse: false,
|
|
411
|
-
title: {
|
|
412
|
-
text: 'User Management Dashboard',
|
|
413
|
-
level: 2,
|
|
414
|
-
styles: { 'color': '#1976d2' }
|
|
415
|
-
},
|
|
416
|
-
headerHeight: '64px'
|
|
417
|
-
},
|
|
418
|
-
|
|
419
|
-
footerSettings: {
|
|
420
|
-
collapse: false
|
|
421
|
-
},
|
|
422
|
-
|
|
423
|
-
columnHeaderSettings: {
|
|
424
|
-
stickyHeaderRow: true,
|
|
425
|
-
noFilters: false
|
|
426
|
-
},
|
|
427
|
-
|
|
428
|
-
columnFooterSettings: {
|
|
429
|
-
stickyFooterRow: true
|
|
430
|
-
},
|
|
431
|
-
|
|
432
|
-
tableSettings: {
|
|
433
|
-
tableId: 'user-management-table',
|
|
434
|
-
trackBy: 'userId',
|
|
435
|
-
includeIndexColumn: false,
|
|
436
|
-
includeSelectionColumn: true,
|
|
437
|
-
|
|
438
|
-
usePaginator: false,
|
|
439
|
-
useVirtualScroll: true,
|
|
440
|
-
|
|
441
|
-
virtualScrollSettings: {
|
|
442
|
-
rowHeight: 56,
|
|
443
|
-
enforceRowHeight: true,
|
|
444
|
-
headerHeight: 64,
|
|
445
|
-
amountOfVisibleItems: 20,
|
|
446
|
-
dynamicHeight: true,
|
|
447
|
-
dynamicalHeightBuffer: '1rem'
|
|
448
|
-
},
|
|
449
|
-
|
|
450
|
-
rowHeight: 56,
|
|
451
|
-
groupHeaderHeight: 48,
|
|
452
|
-
minColumnWidth: '100px',
|
|
453
|
-
|
|
454
|
-
rowClasses: {
|
|
455
|
-
'highlight-admin': (user) => user.role === 'admin',
|
|
456
|
-
'inactive-user': (user) => !user.isActive
|
|
457
|
-
},
|
|
458
|
-
|
|
459
|
-
rowStyles: (user) => ({
|
|
460
|
-
'opacity': user.isActive ? '1' : '0.6',
|
|
461
|
-
'font-weight': user.isPremium ? 'bold' : 'normal'
|
|
462
|
-
}),
|
|
463
|
-
|
|
464
|
-
rowClick: (user, event) => {
|
|
465
|
-
console.log('User clicked:', user.name);
|
|
466
|
-
// Navigate or show details
|
|
467
|
-
},
|
|
468
|
-
|
|
469
|
-
exportSettings: {
|
|
470
|
-
dateFormat: 'MM/dd/yyyy',
|
|
471
|
-
dateTimeFormat: 'MM/dd/yyyy HH:mm:ss',
|
|
472
|
-
mapEnumToString: true,
|
|
473
|
-
mapLink: 'as view'
|
|
474
|
-
},
|
|
475
|
-
|
|
476
|
-
groupBySettings: [
|
|
477
|
-
{ key: 'department', expanded: true },
|
|
478
|
-
{ key: 'status', expanded: false }
|
|
479
|
-
]
|
|
480
|
-
}
|
|
481
|
-
};
|
|
482
|
-
```
|
|
483
|
-
|
|
484
|
-
---
|
|
485
|
-
|
|
486
|
-
## Usage with TableBuilderConfig
|
|
487
|
-
|
|
488
|
-
You can set default settings globally using `provideTableBuilder`. See [TableBuilderConfig Documentation](./TABLE-BUILDER-CONFIG.md) for detailed information about global configuration options.
|
|
489
|
-
|
|
490
|
-
```typescript
|
|
491
|
-
// In your app.config.ts or main.ts
|
|
492
|
-
import { provideTableBuilder } from 'angular-utilities';
|
|
493
|
-
|
|
494
|
-
export const appConfig: ApplicationConfig = {
|
|
495
|
-
providers: [
|
|
496
|
-
provideTableBuilder({
|
|
497
|
-
defaultTableSettings: {
|
|
498
|
-
pageSize: 25,
|
|
499
|
-
tableSettings: {
|
|
500
|
-
usePaginator: true,
|
|
501
|
-
exportSettings: {
|
|
502
|
-
dateFormat: 'MM/dd/yyyy',
|
|
503
|
-
mapEnumToString: true
|
|
504
|
-
}
|
|
505
|
-
},
|
|
506
|
-
headerSettings: {
|
|
507
|
-
showTitleWhenCollapsed: true
|
|
508
|
-
}
|
|
509
|
-
}
|
|
510
|
-
})
|
|
511
|
-
]
|
|
512
|
-
};
|
|
513
|
-
```
|
|
514
|
-
|
|
515
|
-
These defaults will be applied to all tables unless overridden at the component level. For more details, see [TableBuilderConfig Documentation](./TABLE-BUILDER-CONFIG.md).
|