@one-paragon/angular-utilities 2.8.4 → 2.8.5
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,517 +0,0 @@
|
|
|
1
|
-
# MetaData Configuration Documentation
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
`MetaData` defines the configuration for table columns in the Table Builder. Each column can be configured with shared settings and type-specific options based on the `FieldType`.
|
|
6
|
-
|
|
7
|
-
## Shared MetaData Settings
|
|
8
|
-
|
|
9
|
-
All `MetaData` types inherit these common configuration options:
|
|
10
|
-
|
|
11
|
-
### Core Settings
|
|
12
|
-
|
|
13
|
-
#### `key` (required)
|
|
14
|
-
- **Type**: `string` (mapped path or custom key)
|
|
15
|
-
- **Description**: The property path on the data object or a custom identifier for the column. For mapped fields, supports nested paths like `'user.address.city'`.
|
|
16
|
-
|
|
17
|
-
#### `fieldType` (required)
|
|
18
|
-
- **Type**: `FieldType`
|
|
19
|
-
- **Description**: Specifies the data type for the column, which determines sorting, filtering, and display behavior.
|
|
20
|
-
|
|
21
|
-
#### `displayName`
|
|
22
|
-
- **Type**: `string`
|
|
23
|
-
- **Description**: The column header text. If not provided, defaults to the `key` value.
|
|
24
|
-
|
|
25
|
-
#### `order`
|
|
26
|
-
- **Type**: `number`
|
|
27
|
-
- **Description**: Defines the display order of columns. Lower numbers appear first.
|
|
28
|
-
|
|
29
|
-
#### `width`
|
|
30
|
-
- **Type**: `string`
|
|
31
|
-
- **Description**: CSS width value for the column (e.g., `'150px'`, `'20%'`).
|
|
32
|
-
|
|
33
|
-
### Data Transformation
|
|
34
|
-
|
|
35
|
-
#### `map`
|
|
36
|
-
- **Type**: `(t: T) => any`
|
|
37
|
-
- **Description**: Transforms the entire row object to extract or compute the cell value. This is the preferred method for custom value extraction.
|
|
38
|
-
- **Example**:
|
|
39
|
-
```typescript
|
|
40
|
-
map: (user) => `${user.firstName} ${user.lastName}`
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
#### `mapItem`
|
|
44
|
-
- **Type**: `(i: any) => any`
|
|
45
|
-
- **Description**: Transforms the extracted value for display. When used with `map`, `mapItem` is only applied in contexts where the full row is unavailable (e.g., group headers).
|
|
46
|
-
|
|
47
|
-
#### `transform` ⚠️ **Deprecated**
|
|
48
|
-
- **Type**: `((o: T, ...args: any[]) => any) | PipeTransform`
|
|
49
|
-
- **Description**: Legacy transformation method. Use `map` instead.
|
|
50
|
-
|
|
51
|
-
### Sorting Configuration
|
|
52
|
-
|
|
53
|
-
#### `preSort`
|
|
54
|
-
- **Type**: `SortDef`
|
|
55
|
-
- **Description**: Defines initial sorting for the column.
|
|
56
|
-
- **Properties**:
|
|
57
|
-
- `direction`: `'asc'` or `'desc'`
|
|
58
|
-
- `precedence`: Sort priority when multiple columns are sorted
|
|
59
|
-
|
|
60
|
-
#### `sortLogic`
|
|
61
|
-
- **Type**: `object`
|
|
62
|
-
- **Description**: Customizes sorting behavior.
|
|
63
|
-
- **Properties**:
|
|
64
|
-
- `nulls`: `'first'` | `'last'` (default: `'last'`) - Controls null value positioning
|
|
65
|
-
- `sortBy`: `((t: T) => any)` | `'use map'` - Custom sort value extraction. Use `'use map'` to apply the column's `map` function for sorting.
|
|
66
|
-
|
|
67
|
-
#### `noSort`
|
|
68
|
-
- **Type**: `boolean`
|
|
69
|
-
- **Description**: When `true`, removes the sorting button from the column header and excludes the column from the sort menu list.
|
|
70
|
-
|
|
71
|
-
### Filtering Configuration
|
|
72
|
-
|
|
73
|
-
#### `filterLogic`
|
|
74
|
-
- **Type**: `object`
|
|
75
|
-
- **Description**: Customizes filtering behavior.
|
|
76
|
-
- **Properties**:
|
|
77
|
-
- `filterBy`: `((t: T) => any)` | `'use map'` - Custom filter value extraction. Use `'use map'` to apply the column's `map` function.
|
|
78
|
-
- `filterType`: `FieldType` - Override the filter UI type (defaults to the column's `fieldType`)
|
|
79
|
-
|
|
80
|
-
#### `noFilter`
|
|
81
|
-
- **Type**: `boolean`
|
|
82
|
-
- **Description**: Disables filtering for this column.
|
|
83
|
-
|
|
84
|
-
### Grouping Configuration
|
|
85
|
-
|
|
86
|
-
#### `groupByLogic`
|
|
87
|
-
- **Type**: `object`
|
|
88
|
-
- **Description**: Enables and configures row grouping by this column.
|
|
89
|
-
- **Properties**:
|
|
90
|
-
- `groupBy`: `((t: T) => any)` | `'use map'` - Determines the grouping value
|
|
91
|
-
- `groupByHeader`: `(groupByVal: any) => string` - Formats the group header text
|
|
92
|
-
|
|
93
|
-
### Display & Interaction
|
|
94
|
-
|
|
95
|
-
#### `template`
|
|
96
|
-
- **Type**: `TemplateRef<any>`
|
|
97
|
-
- **Description**: Custom Angular template for rendering the cell content.
|
|
98
|
-
|
|
99
|
-
#### `click`
|
|
100
|
-
- **Type**: `(element: T, key?: string, event?: MouseEvent) => void`
|
|
101
|
-
- **Description**: Click handler for the cell.
|
|
102
|
-
|
|
103
|
-
#### `classes`
|
|
104
|
-
- **Type**: `Dictionary<Predicate<T> | true>`
|
|
105
|
-
- **Description**: CSS classes to apply to cells. Keys are class names, values are predicates that determine when to apply the class.
|
|
106
|
-
- **Example**:
|
|
107
|
-
```typescript
|
|
108
|
-
classes: {
|
|
109
|
-
'text-danger': (row) => row.status === 'error',
|
|
110
|
-
'text-success': (row) => row.status === 'success'
|
|
111
|
-
}
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
#### `toolTip`
|
|
115
|
-
- **Type**: `string | ((t: T) => string)`
|
|
116
|
-
- **Description**: Tooltip text for the cell, either static or computed from the row data.
|
|
117
|
-
|
|
118
|
-
#### `useIcon`
|
|
119
|
-
- **Type**: `boolean`
|
|
120
|
-
- **Description**: Renders the cell value as an icon (typically used with icon fonts).
|
|
121
|
-
|
|
122
|
-
### Export Configuration
|
|
123
|
-
|
|
124
|
-
#### `noExport`
|
|
125
|
-
- **Type**: `boolean`
|
|
126
|
-
- **Description**: Excludes this column from data exports.
|
|
127
|
-
|
|
128
|
-
---
|
|
129
|
-
|
|
130
|
-
## Type-Specific MetaData Options
|
|
131
|
-
|
|
132
|
-
Each `FieldType` may have specific `additional` properties for advanced configuration.
|
|
133
|
-
|
|
134
|
-
### String Types
|
|
135
|
-
|
|
136
|
-
**Applicable to**: `FieldType.String`, `FieldType.PhoneNumber`, `FieldType.ImageUrl`, `FieldType.Link`, `FieldType.Hidden`, `FieldType.Unknown`
|
|
137
|
-
|
|
138
|
-
**Interface**: `MappedMetaData<T>`
|
|
139
|
-
|
|
140
|
-
#### Additional Properties
|
|
141
|
-
|
|
142
|
-
- **`filterOptions`**: `FilterOptions<string>`
|
|
143
|
-
- `filterableValues`: Array of specific values to show in filter dropdown, `'all values'` to show all unique values, or `AllValueOptions` object
|
|
144
|
-
- **Example**:
|
|
145
|
-
```typescript
|
|
146
|
-
additional: {
|
|
147
|
-
filterOptions: {
|
|
148
|
-
filterableValues: ['Active', 'Inactive', 'Pending']
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
- All properties from `BaseAdditional` (see Common Additional Properties section)
|
|
154
|
-
|
|
155
|
-
---
|
|
156
|
-
|
|
157
|
-
### Number Types
|
|
158
|
-
|
|
159
|
-
**Applicable to**: `FieldType.Number`, `FieldType.Currency`
|
|
160
|
-
|
|
161
|
-
**Interface**: `MappedNumberMetaData<T>`
|
|
162
|
-
|
|
163
|
-
#### Additional Properties
|
|
164
|
-
|
|
165
|
-
- **`filterOptions`**: `FilterOptions<number>`
|
|
166
|
-
- Numeric filter options
|
|
167
|
-
|
|
168
|
-
- **`footer`**: `{ type: 'sum' }`
|
|
169
|
-
- Enables automatic sum calculation in the footer row
|
|
170
|
-
|
|
171
|
-
- All properties from `BaseAdditional` (see Common Additional Properties section)
|
|
172
|
-
|
|
173
|
-
**Example**:
|
|
174
|
-
```typescript
|
|
175
|
-
{
|
|
176
|
-
key: 'totalSales',
|
|
177
|
-
fieldType: FieldType.Currency,
|
|
178
|
-
displayName: 'Total Sales',
|
|
179
|
-
additional: {
|
|
180
|
-
footer: { type: 'sum' }
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
---
|
|
186
|
-
|
|
187
|
-
### Enum Types
|
|
188
|
-
|
|
189
|
-
**Applicable to**: `FieldType.Enum`
|
|
190
|
-
|
|
191
|
-
**Interface**: `MappedEnumMetaData<T>`
|
|
192
|
-
|
|
193
|
-
#### Additional Properties
|
|
194
|
-
|
|
195
|
-
- **`enumMap`**: `{[key: number]: string}`
|
|
196
|
-
- Maps numeric enum values to display strings
|
|
197
|
-
- **Example**:
|
|
198
|
-
```typescript
|
|
199
|
-
additional: {
|
|
200
|
-
enumMap: {
|
|
201
|
-
0: 'Pending',
|
|
202
|
-
1: 'Approved',
|
|
203
|
-
2: 'Rejected'
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
- **`filterOptions`**: `FilterOptions<number>`
|
|
209
|
-
- Numeric filter options for enum values
|
|
210
|
-
|
|
211
|
-
- All properties from `BaseAdditional` (see Common Additional Properties section)
|
|
212
|
-
|
|
213
|
-
---
|
|
214
|
-
|
|
215
|
-
### Boolean Types
|
|
216
|
-
|
|
217
|
-
**Applicable to**: `FieldType.Boolean`
|
|
218
|
-
|
|
219
|
-
**Interface**: `MappedBooleanMetaData<T>`
|
|
220
|
-
|
|
221
|
-
#### Additional Properties
|
|
222
|
-
|
|
223
|
-
- **`boolean`**: Configuration for boolean display
|
|
224
|
-
- **`showForFalse`**: `true | { icon: string }`
|
|
225
|
-
- If `true`, shows a default indicator for false values
|
|
226
|
-
- If object, shows the specified icon for false values
|
|
227
|
-
- **`forTrue`**: `{ icon: string }`
|
|
228
|
-
- Icon to display for true values
|
|
229
|
-
|
|
230
|
-
- All properties from `BaseAdditional` (see Common Additional Properties section)
|
|
231
|
-
|
|
232
|
-
**Example**:
|
|
233
|
-
```typescript
|
|
234
|
-
{
|
|
235
|
-
key: 'isActive',
|
|
236
|
-
fieldType: FieldType.Boolean,
|
|
237
|
-
displayName: 'Active',
|
|
238
|
-
additional: {
|
|
239
|
-
boolean: {
|
|
240
|
-
showForFalse: { icon: 'close' },
|
|
241
|
-
forTrue: { icon: 'check' }
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
```
|
|
246
|
-
|
|
247
|
-
---
|
|
248
|
-
|
|
249
|
-
### Date Types
|
|
250
|
-
|
|
251
|
-
**Applicable to**: `FieldType.Date`, `FieldType.DateTime`
|
|
252
|
-
|
|
253
|
-
**Interface**: `MappedDateMetaData<T>`
|
|
254
|
-
|
|
255
|
-
#### Additional Properties
|
|
256
|
-
|
|
257
|
-
- **`dateFormat`**: `string`
|
|
258
|
-
- Custom date format string (e.g., `'MM/dd/yyyy'`)
|
|
259
|
-
|
|
260
|
-
- **`dateTimeOptions`**: `DateTimeOptions`
|
|
261
|
-
- **`format`**: Custom format string
|
|
262
|
-
- **`includeSeconds`**: Include seconds in time display
|
|
263
|
-
- **`includeMilliseconds`**: Include milliseconds in time display
|
|
264
|
-
|
|
265
|
-
- **`filterOptions`**: `FilterOptions<Date>`
|
|
266
|
-
- Date-specific filtering options
|
|
267
|
-
|
|
268
|
-
- All properties from `BaseAdditional` (see Common Additional Properties section)
|
|
269
|
-
|
|
270
|
-
**Example**:
|
|
271
|
-
```typescript
|
|
272
|
-
{
|
|
273
|
-
key: 'createdAt',
|
|
274
|
-
fieldType: FieldType.DateTime,
|
|
275
|
-
displayName: 'Created',
|
|
276
|
-
additional: {
|
|
277
|
-
dateTimeOptions: {
|
|
278
|
-
includeSeconds: true,
|
|
279
|
-
includeMilliseconds: false
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
```
|
|
284
|
-
|
|
285
|
-
---
|
|
286
|
-
|
|
287
|
-
### Array Types
|
|
288
|
-
|
|
289
|
-
**Applicable to**: `FieldType.Array`
|
|
290
|
-
|
|
291
|
-
**Interface**: `MappedArrayMetaData<T>`
|
|
292
|
-
|
|
293
|
-
#### Additional Properties
|
|
294
|
-
|
|
295
|
-
- **`limit`**: `number`
|
|
296
|
-
- Maximum number of array items to display
|
|
297
|
-
|
|
298
|
-
- **`arrayStyle`**: `ArrayStyle`
|
|
299
|
-
- **`ArrayStyle.CommaDelimited`**: Display items separated by commas
|
|
300
|
-
- **`ArrayStyle.NewLine`**: Display each item on a new line
|
|
301
|
-
|
|
302
|
-
- **`filterOptions`**: `FilterOptions<string>`
|
|
303
|
-
- Array-specific filtering
|
|
304
|
-
|
|
305
|
-
- All properties from `BaseAdditional` (see Common Additional Properties section)
|
|
306
|
-
|
|
307
|
-
**Example**:
|
|
308
|
-
```typescript
|
|
309
|
-
{
|
|
310
|
-
key: 'tags',
|
|
311
|
-
fieldType: FieldType.Array,
|
|
312
|
-
displayName: 'Tags',
|
|
313
|
-
additional: {
|
|
314
|
-
limit: 5,
|
|
315
|
-
arrayStyle: ArrayStyle.CommaDelimited
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
```
|
|
319
|
-
|
|
320
|
-
---
|
|
321
|
-
|
|
322
|
-
### NotMapped Types
|
|
323
|
-
|
|
324
|
-
**Applicable to**: `FieldType.NotMapped`, `FieldType.Expression` (deprecated)
|
|
325
|
-
|
|
326
|
-
**Interface**: `NotMappedMetaData<T>`
|
|
327
|
-
|
|
328
|
-
Used for computed or virtual columns that don't correspond to a direct property on the data object. The `key` can be any string identifier, and the `map` function is required to provide the cell value.
|
|
329
|
-
|
|
330
|
-
#### Additional Properties
|
|
331
|
-
|
|
332
|
-
- All properties from `Additional<T>` (same as String types)
|
|
333
|
-
|
|
334
|
-
**Example**:
|
|
335
|
-
```typescript
|
|
336
|
-
{
|
|
337
|
-
key: 'fullName',
|
|
338
|
-
fieldType: FieldType.NotMapped,
|
|
339
|
-
displayName: 'Full Name',
|
|
340
|
-
map: (user) => `${user.firstName} ${user.lastName}`
|
|
341
|
-
}
|
|
342
|
-
```
|
|
343
|
-
|
|
344
|
-
---
|
|
345
|
-
|
|
346
|
-
## Common Additional Properties
|
|
347
|
-
|
|
348
|
-
The following properties are available in the `additional` object for all or most field types:
|
|
349
|
-
|
|
350
|
-
### Link Configuration
|
|
351
|
-
|
|
352
|
-
#### `link`
|
|
353
|
-
- **Type**: `object`
|
|
354
|
-
- **Description**: Configures the cell as a clickable link.
|
|
355
|
-
- **Properties**:
|
|
356
|
-
- **`base`**: Base URL for the link
|
|
357
|
-
- **`urlKey`**: Property name to append to the base URL
|
|
358
|
-
- **`target`**: Link target (`Target.Blank`, `Target.Self`, etc.)
|
|
359
|
-
- **`useRouterLink`**: Use Angular router navigation instead of standard href
|
|
360
|
-
- **`interpolatedRoute`**: Route with interpolated parameters
|
|
361
|
-
- Use `{propertyName}` syntax to inject values from the row
|
|
362
|
-
- Example: `'/users/{id}/edit'` replaces `{id}` with `row.id`
|
|
363
|
-
- Can also be a function: `(t: T) => string`
|
|
364
|
-
- **`routerLinkOptions`**: Additional router link configuration
|
|
365
|
-
- **`queryParams`**: Array of `[paramName, value | interpolatedRoute | function]` tuples
|
|
366
|
-
- **`fragment`**: URL fragment (hash)
|
|
367
|
-
- **`preserveFragment`**: Preserve existing fragment
|
|
368
|
-
- **`queryParamsHandling`**: How to handle existing query params
|
|
369
|
-
|
|
370
|
-
**Example**:
|
|
371
|
-
```typescript
|
|
372
|
-
additional: {
|
|
373
|
-
link: {
|
|
374
|
-
interpolatedRoute: '/users/{userId}/details',
|
|
375
|
-
useRouterLink: true,
|
|
376
|
-
target: Target.Blank,
|
|
377
|
-
routerLinkOptions: {
|
|
378
|
-
queryParams: [
|
|
379
|
-
['tab', 'profile'],
|
|
380
|
-
['edit', (row) => row.isEditable.toString()]
|
|
381
|
-
]
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
```
|
|
386
|
-
|
|
387
|
-
### Export Configuration
|
|
388
|
-
|
|
389
|
-
#### `export`
|
|
390
|
-
- **Type**: `MetaDataExport<T>`
|
|
391
|
-
- **Description**: Customizes how the column is exported.
|
|
392
|
-
- **Properties**:
|
|
393
|
-
- **`mapForExport`**: `(t: T) => string` - Custom export value mapper (supersedes all other mappings)
|
|
394
|
-
- **`linkColumnName`**: `string` - Column name for links when using `mapLink: 'add link'`
|
|
395
|
-
- **`dateFormat`**: `string` - Date format for this column's export
|
|
396
|
-
- **`dateTimeFormat`**: `string` - DateTime format for this column's export
|
|
397
|
-
- **`prepend`**: `string` - Text to prepend to exported values
|
|
398
|
-
- **`mapEnumToString`**: `boolean` - If `true`, maps enum numeric values to their string representations
|
|
399
|
-
- **`mapLink`**: `'as link'` | `'as view'` | `'add link'` | `'as excel'` | `'add excel'`
|
|
400
|
-
- `'as view'` (default): Export the link as it appears in the view
|
|
401
|
-
- `'as link'`: Export the full URL
|
|
402
|
-
- `'add link'`: Export the view value and add a separate column with the link URL
|
|
403
|
-
- `'as excel'`: Export as an Excel hyperlink formula
|
|
404
|
-
- `'add excel'`: Export the view value and add a separate column with the Excel hyperlink formula
|
|
405
|
-
- **`linkDomainPrefix`**: `string` - Domain prefix to add to links when using `mapLink: 'as link'` or `'add link'`
|
|
406
|
-
|
|
407
|
-
### Styling Configuration
|
|
408
|
-
|
|
409
|
-
#### `styles`
|
|
410
|
-
- **Type**: [`StylerStyle<T>`](./STYLER-STYLE.md)
|
|
411
|
-
- **Description**: Dynamic inline styles applied to cells based on row data. See [StylerStyle documentation](./STYLER-STYLE.md) for detailed usage patterns.
|
|
412
|
-
|
|
413
|
-
#### `columnPartStyles`
|
|
414
|
-
- **Type**: `object`
|
|
415
|
-
- **Description**: Styles for different parts of the column.
|
|
416
|
-
- **Properties**:
|
|
417
|
-
- **`header`**: `Dictionary<string>` - Header cell styles
|
|
418
|
-
- **`body`**: [`StylerStyle<T>`](./STYLER-STYLE.md) - Body cell styles (row-dependent)
|
|
419
|
-
- **`innerBody`**: [`StylerStyle<T>`](./STYLER-STYLE.md) - Inner content styles (row-dependent)
|
|
420
|
-
- **`footer`**: `Dictionary<string>` - Footer cell styles
|
|
421
|
-
|
|
422
|
-
#### `columnPartClasses`
|
|
423
|
-
- **Type**: `object`
|
|
424
|
-
- **Description**: CSS classes for different parts of the column.
|
|
425
|
-
- **Properties**:
|
|
426
|
-
- **`header`**: `Dictionary<Predicate<T> | true>` - Header cell classes
|
|
427
|
-
- **`footer`**: `Dictionary<Predicate<T> | true>` - Footer cell classes
|
|
428
|
-
|
|
429
|
-
**Example**:
|
|
430
|
-
```typescript
|
|
431
|
-
additional: {
|
|
432
|
-
columnPartStyles: {
|
|
433
|
-
header: { 'background-color': '#f0f0f0' },
|
|
434
|
-
body: (row) => ({ 'font-weight': row.isPriority ? 'bold' : 'normal' })
|
|
435
|
-
},
|
|
436
|
-
columnPartClasses: {
|
|
437
|
-
header: { 'text-center': true },
|
|
438
|
-
footer: { 'text-muted': true }
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
```
|
|
442
|
-
|
|
443
|
-
---
|
|
444
|
-
|
|
445
|
-
## Complete Example
|
|
446
|
-
|
|
447
|
-
```typescript
|
|
448
|
-
const userTableMetadata: MetaData<User>[] = [
|
|
449
|
-
{
|
|
450
|
-
key: 'id',
|
|
451
|
-
fieldType: FieldType.Number,
|
|
452
|
-
displayName: 'ID',
|
|
453
|
-
width: '80px',
|
|
454
|
-
preSort: { direction: SortDirection.asc, precedence: 1 }
|
|
455
|
-
},
|
|
456
|
-
{
|
|
457
|
-
key: 'fullName',
|
|
458
|
-
fieldType: FieldType.NotMapped,
|
|
459
|
-
displayName: 'Name',
|
|
460
|
-
map: (user) => `${user.firstName} ${user.lastName}`,
|
|
461
|
-
additional: {
|
|
462
|
-
link: {
|
|
463
|
-
interpolatedRoute: '/users/{id}',
|
|
464
|
-
useRouterLink: true
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
},
|
|
468
|
-
{
|
|
469
|
-
key: 'email',
|
|
470
|
-
fieldType: FieldType.String,
|
|
471
|
-
displayName: 'Email',
|
|
472
|
-
toolTip: 'User email address'
|
|
473
|
-
},
|
|
474
|
-
{
|
|
475
|
-
key: 'status',
|
|
476
|
-
fieldType: FieldType.Enum,
|
|
477
|
-
displayName: 'Status',
|
|
478
|
-
additional: {
|
|
479
|
-
enumMap: { 0: 'Inactive', 1: 'Active', 2: 'Suspended' },
|
|
480
|
-
},
|
|
481
|
-
classes: {
|
|
482
|
-
'text-success': (user) => user.status === 1,
|
|
483
|
-
'text-danger': (user) => user.status === 2
|
|
484
|
-
}
|
|
485
|
-
},
|
|
486
|
-
{
|
|
487
|
-
key: 'salary',
|
|
488
|
-
fieldType: FieldType.Currency,
|
|
489
|
-
displayName: 'Salary',
|
|
490
|
-
width: '120px',
|
|
491
|
-
additional: {
|
|
492
|
-
footer: { type: 'sum' }
|
|
493
|
-
}
|
|
494
|
-
},
|
|
495
|
-
{
|
|
496
|
-
key: 'isActive',
|
|
497
|
-
fieldType: FieldType.Boolean,
|
|
498
|
-
displayName: 'Active',
|
|
499
|
-
additional: {
|
|
500
|
-
boolean: {
|
|
501
|
-
showForFalse: { icon: 'close' },
|
|
502
|
-
forTrue: { icon: 'check' }
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
},
|
|
506
|
-
{
|
|
507
|
-
key: 'createdAt',
|
|
508
|
-
fieldType: FieldType.DateTime,
|
|
509
|
-
displayName: 'Created',
|
|
510
|
-
additional: {
|
|
511
|
-
dateTimeOptions: {
|
|
512
|
-
includeSeconds: true
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
];
|
|
517
|
-
```
|