@one-paragon/angular-utilities 2.8.2 → 2.8.4

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.
Files changed (203) hide show
  1. package/karma.conf.js +43 -0
  2. package/ng-package.json +7 -0
  3. package/package.json +15 -27
  4. package/src/action-state/action-state-spinner/action-state-spinner.component.css +16 -0
  5. package/src/action-state/action-state-spinner/action-state-spinner.component.html +7 -0
  6. package/src/action-state/action-state-spinner/action-state-spinner.component.spec.ts +25 -0
  7. package/src/action-state/action-state-spinner/action-state-spinner.component.ts +26 -0
  8. package/src/action-state/action-state-ui/action-state-ui.module.ts +13 -0
  9. package/src/action-state/index.ts +8 -0
  10. package/src/action-state/ngrx-ext/ngrx-ext.module.ts +14 -0
  11. package/src/action-state/ngrx.ts +69 -0
  12. package/src/http-request-state/RequestStateFactory.ts +56 -0
  13. package/src/http-request-state/RequestStateStore.ts +360 -0
  14. package/src/http-request-state/deprecated.ts +20 -0
  15. package/src/http-request-state/directives/HttpStateDirectiveBase.ts +29 -0
  16. package/src/http-request-state/directives/http-error-state-directive.ts +21 -0
  17. package/src/http-request-state/directives/http-inProgress-state-directive.ts +19 -0
  18. package/src/http-request-state/directives/http-notStarted-state-directive.ts +19 -0
  19. package/src/http-request-state/directives/http-success-state-directive.ts +29 -0
  20. package/src/http-request-state/directives/index.ts +5 -0
  21. package/src/http-request-state/directives/request-state-directive.spec.ts +73 -0
  22. package/src/http-request-state/directives/request-state-directive.ts +78 -0
  23. package/src/http-request-state/documentation/CREATE-REQUESTOR.md +667 -0
  24. package/src/http-request-state/documentation/README.md +191 -0
  25. package/src/http-request-state/documentation/REQUEST-STATE-STORE-CONFIG.md +648 -0
  26. package/src/http-request-state/documentation/REQUESTOR.md +616 -0
  27. package/src/http-request-state/helpers.ts +30 -0
  28. package/src/http-request-state/http-state-module.ts +23 -0
  29. package/src/http-request-state/index.ts +7 -0
  30. package/src/http-request-state/models/view-context.ts +18 -0
  31. package/src/http-request-state/observable.spec.ts +43 -0
  32. package/src/http-request-state/request-state.ts +66 -0
  33. package/src/http-request-state/rxjs/getRequestorBody.ts +10 -0
  34. package/src/http-request-state/rxjs/getRequestorState.ts +8 -0
  35. package/src/http-request-state/rxjs/index.ts +4 -0
  36. package/src/http-request-state/rxjs/tapError.ts +16 -0
  37. package/src/http-request-state/rxjs/tapSuccess.ts +16 -0
  38. package/src/http-request-state/strategies.spec.ts +42 -0
  39. package/src/http-request-state/types.ts +54 -0
  40. package/src/ngrx/actionable-selector.ts +189 -0
  41. package/src/ngrx/index.ts +1 -0
  42. package/src/public-api.ts +40 -0
  43. package/src/rxjs/defaultShareReplay.ts +8 -0
  44. package/src/rxjs/index.ts +5 -0
  45. package/src/rxjs/mapError.ts +8 -0
  46. package/src/rxjs/rxjs-operators.ts +130 -0
  47. package/src/rxjs/subjectifier.ts +17 -0
  48. package/src/rxjs/subscriber.directive.ts +57 -0
  49. package/src/specs/clickSubject.spec.ts +99 -0
  50. package/src/specs/dialog.spec.ts +101 -0
  51. package/src/specs/toggleGroupDirective.spec.ts +229 -0
  52. package/src/table-builder/classes/DefaultSettings.ts +11 -0
  53. package/src/table-builder/classes/MatTableObservableDataSource.ts +23 -0
  54. package/src/table-builder/classes/TableBuilderConfig.ts +49 -0
  55. package/src/table-builder/classes/TableBuilderDataSource.ts +64 -0
  56. package/src/table-builder/classes/TableState.ts +96 -0
  57. package/src/table-builder/classes/data-store.ts +10 -0
  58. package/src/table-builder/classes/display-col.ts +5 -0
  59. package/src/table-builder/classes/filter-info.ts +129 -0
  60. package/src/table-builder/classes/table-builder-general-settings.ts +233 -0
  61. package/src/table-builder/classes/table-builder.ts +105 -0
  62. package/src/table-builder/classes/table-store.helpers.ts +109 -0
  63. package/src/table-builder/classes/table-store.ts +540 -0
  64. package/src/table-builder/components/array-column.component.ts +34 -0
  65. package/src/table-builder/components/column-builder/column-builder.component.html +109 -0
  66. package/src/table-builder/components/column-builder/column-builder.component.scss +43 -0
  67. package/src/table-builder/components/column-builder/column-builder.component.spec.ts +49 -0
  68. package/src/table-builder/components/column-builder/column-builder.component.ts +130 -0
  69. package/src/table-builder/components/column-builder/column-helpers.ts +54 -0
  70. package/src/table-builder/components/column-header-menu/column-header-menu.component.html +128 -0
  71. package/src/table-builder/components/column-header-menu/column-header-menu.component.scss +97 -0
  72. package/src/table-builder/components/column-header-menu/column-header-menu.component.ts +113 -0
  73. package/src/table-builder/components/date-filter/date-filter.component.html +39 -0
  74. package/src/table-builder/components/date-filter/date-filter.component.ts +33 -0
  75. package/src/table-builder/components/date-time-filter/date-time-filter.component.html +25 -0
  76. package/src/table-builder/components/date-time-filter/date-time-filter.component.ts +33 -0
  77. package/src/table-builder/components/filter/filter.component.html +120 -0
  78. package/src/table-builder/components/filter/filter.component.scss +60 -0
  79. package/src/table-builder/components/filter/filter.component.spec.ts +86 -0
  80. package/src/table-builder/components/filter/filter.component.ts +73 -0
  81. package/src/table-builder/components/filter/in-list/in-list-filter.component.ts +171 -0
  82. package/src/table-builder/components/gen-col-displayer/gen-col-displayer.component.html +60 -0
  83. package/src/table-builder/components/gen-col-displayer/gen-col-displayer.component.scss +57 -0
  84. package/src/table-builder/components/gen-col-displayer/gen-col-displayer.component.ts +44 -0
  85. package/src/table-builder/components/generic-table/generic-table.component.html +140 -0
  86. package/src/table-builder/components/generic-table/generic-table.component.scss +45 -0
  87. package/src/table-builder/components/generic-table/generic-table.component.ts +531 -0
  88. package/src/table-builder/components/generic-table/paginator.component.ts +125 -0
  89. package/src/table-builder/components/group-by-list/group-by-list.component.css +24 -0
  90. package/src/table-builder/components/group-by-list/group-by-list.component.html +21 -0
  91. package/src/table-builder/components/group-by-list/group-by-list.component.spec.ts +23 -0
  92. package/src/table-builder/components/group-by-list/group-by-list.component.ts +26 -0
  93. package/src/table-builder/components/in-filter/in-filter.component.css +22 -0
  94. package/src/table-builder/components/in-filter/in-filter.component.html +38 -0
  95. package/src/table-builder/components/in-filter/in-filter.component.ts +66 -0
  96. package/src/table-builder/components/index.ts +9 -0
  97. package/src/table-builder/components/initialization-component/initialization.component.html +78 -0
  98. package/src/table-builder/components/initialization-component/initialization.component.ts +28 -0
  99. package/src/table-builder/components/link-column.component.ts +42 -0
  100. package/src/table-builder/components/number-filter/number-filter.component.css +10 -0
  101. package/src/table-builder/components/number-filter/number-filter.component.html +32 -0
  102. package/src/table-builder/components/number-filter/number-filter.component.spec.ts +30 -0
  103. package/src/table-builder/components/number-filter/number-filter.component.ts +34 -0
  104. package/src/table-builder/components/profiles-menu/profiles-menu.component.html +77 -0
  105. package/src/table-builder/components/profiles-menu/profiles-menu.component.scss +126 -0
  106. package/src/table-builder/components/profiles-menu/profiles-menu.component.spec.ts +23 -0
  107. package/src/table-builder/components/profiles-menu/profiles-menu.component.ts +64 -0
  108. package/src/table-builder/components/reset-menu/reset-menu.component.css +3 -0
  109. package/src/table-builder/components/reset-menu/reset-menu.component.html +10 -0
  110. package/src/table-builder/components/reset-menu/reset-menu.component.ts +87 -0
  111. package/src/table-builder/components/scroll-strategy.ts +139 -0
  112. package/src/table-builder/components/sort-menu/sort-menu.component-store.ts +57 -0
  113. package/src/table-builder/components/sort-menu/sort-menu.component.html +115 -0
  114. package/src/table-builder/components/sort-menu/sort-menu.component.scss +119 -0
  115. package/src/table-builder/components/sort-menu/sort-menu.component.ts +88 -0
  116. package/src/table-builder/components/table-container/table-container.component.html +94 -0
  117. package/src/table-builder/components/table-container/table-container.component.scss +60 -0
  118. package/src/table-builder/components/table-container/table-container.component.ts +467 -0
  119. package/src/table-builder/components/table-container/table-container.helpers/data-state.helpers.ts +113 -0
  120. package/src/table-builder/components/table-container/table-container.helpers/filter-state.helpers.ts +125 -0
  121. package/src/table-builder/components/table-container/table-container.helpers/groupBy.helpers.ts +172 -0
  122. package/src/table-builder/components/table-container/table-container.helpers/meta-data.helpers.ts +19 -0
  123. package/src/table-builder/components/table-container/table-container.helpers/sort-state.helpers.ts +47 -0
  124. package/src/table-builder/components/table-container/tableProps.ts +21 -0
  125. package/src/table-builder/components/table-container/virtual-scroll-container.ts +216 -0
  126. package/src/table-builder/components/table-container-filter/filter-list/filter-list.component.html +42 -0
  127. package/src/table-builder/components/table-container-filter/filter-list/filter-list.component.ts +47 -0
  128. package/src/table-builder/components/table-container-filter/gen-filter-displayer/gen-filter-displayer.component.css +40 -0
  129. package/src/table-builder/components/table-container-filter/gen-filter-displayer/gen-filter-displayer.component.html +11 -0
  130. package/src/table-builder/components/table-container-filter/gen-filter-displayer/gen-filter-displayer.component.spec.ts +85 -0
  131. package/src/table-builder/components/table-container-filter/gen-filter-displayer/gen-filter-displayer.component.ts +35 -0
  132. package/src/table-builder/components/table-container-filter/table-wrapper-filter-store.ts +13 -0
  133. package/src/table-builder/components/table-header-menu/table-header-menu.component.css +21 -0
  134. package/src/table-builder/components/table-header-menu/table-header-menu.component.html +48 -0
  135. package/src/table-builder/components/table-header-menu/table-header-menu.component.ts +36 -0
  136. package/src/table-builder/directives/custom-cell-directive.ts +63 -0
  137. package/src/table-builder/directives/custom-header-directive.ts +16 -0
  138. package/src/table-builder/directives/group-row-directive.ts +91 -0
  139. package/src/table-builder/directives/index.ts +8 -0
  140. package/src/table-builder/directives/multi-sort.directive.spec.ts +124 -0
  141. package/src/table-builder/directives/multi-sort.directive.ts +58 -0
  142. package/src/table-builder/directives/resize-column.directive.ts +107 -0
  143. package/src/table-builder/directives/table-wrapper.directive.ts +13 -0
  144. package/src/table-builder/directives/tb-filter.directive.ts +376 -0
  145. package/src/table-builder/documentation/table-builder/CUSTOM-CELL.md +568 -0
  146. package/src/table-builder/documentation/table-builder/CUSTOM-GROUP-ROW.md +356 -0
  147. package/src/table-builder/documentation/table-builder/METADATA-DOCUMENTATION.md +517 -0
  148. package/src/table-builder/documentation/table-builder/STYLER-STYLE.md +228 -0
  149. package/src/table-builder/documentation/table-builder/TABLE-BUILDER-CONFIG.md +325 -0
  150. package/src/table-builder/documentation/table-builder/TABLE-BUILDER-SETTINGS.md +515 -0
  151. package/src/table-builder/documentation/table-builder/TABLE-BUILDER.md +430 -0
  152. package/src/table-builder/documentation/table-builder/TABLE-CONTAINER.md +628 -0
  153. package/src/table-builder/enums/filterTypes.ts +39 -0
  154. package/src/table-builder/functions/boolean-filter-function.ts +12 -0
  155. package/src/table-builder/functions/date-filter-function.ts +85 -0
  156. package/src/table-builder/functions/download-data.ts +11 -0
  157. package/src/table-builder/functions/null-filter-function.ts +9 -0
  158. package/src/table-builder/functions/number-filter-function.ts +47 -0
  159. package/src/table-builder/functions/sort-data-function.ts +80 -0
  160. package/src/table-builder/functions/string-filter-function.ts +59 -0
  161. package/src/table-builder/interfaces/ColumnInfo.ts +9 -0
  162. package/src/table-builder/interfaces/dictionary.ts +3 -0
  163. package/src/table-builder/interfaces/meta-data.ts +279 -0
  164. package/src/table-builder/ngrx/tableBuilderStateStore.ts +203 -0
  165. package/src/table-builder/pipes/column-total.pipe.ts +16 -0
  166. package/src/table-builder/pipes/format-filter-type.pipe.ts +12 -0
  167. package/src/table-builder/pipes/format-filter-value.pipe.ts +71 -0
  168. package/src/table-builder/pipes/key-display.ts +13 -0
  169. package/src/table-builder/services/all-values-filter-creator.service.ts +92 -0
  170. package/src/table-builder/services/export-to-csv.service.ts +117 -0
  171. package/src/table-builder/services/link-creator.service.ts +98 -0
  172. package/src/table-builder/services/table-template-service.ts +47 -0
  173. package/src/table-builder/services/transform-creator.ts +90 -0
  174. package/src/table-builder/specs/table-custom-filters.spec.ts +262 -0
  175. package/src/table-builder/styles/collapser.styles.scss +16 -0
  176. package/src/table-builder/table-builder.module.ts +42 -0
  177. package/src/table-builder/types/group-types.ts +42 -0
  178. package/src/table-builder/types/index.ts +1 -0
  179. package/src/test.ts +17 -0
  180. package/src/utilities/array-helpers.ts +13 -0
  181. package/src/utilities/directives/auto-focus.directive.ts +20 -0
  182. package/src/utilities/directives/clickEmitterDirective.ts +15 -0
  183. package/src/utilities/directives/clickSubject.ts +19 -0
  184. package/src/utilities/directives/conditional-classes.directive.ts +36 -0
  185. package/src/utilities/directives/dialog-service.ts +19 -0
  186. package/src/utilities/directives/dialog.ts +174 -0
  187. package/src/utilities/directives/mat-toggle-group-directive.ts +60 -0
  188. package/src/utilities/directives/prevent-enter.directive.ts +12 -0
  189. package/src/utilities/directives/stop-propagation.directive.ts +19 -0
  190. package/src/utilities/directives/styler.ts +45 -0
  191. package/src/utilities/directives/trim-whitespace.directive.ts +20 -0
  192. package/src/utilities/index.ts +22 -0
  193. package/src/utilities/module.ts +53 -0
  194. package/src/utilities/pipes/function.pipe.ts +21 -0
  195. package/src/utilities/pipes/phone.pipe.ts +20 -0
  196. package/src/utilities/pipes/space-case.pipes.spec.ts +47 -0
  197. package/src/utilities/pipes/space-case.pipes.ts +29 -0
  198. package/tsconfig.lib.json +20 -0
  199. package/tsconfig.lib.prod.json +10 -0
  200. package/tsconfig.spec.json +17 -0
  201. package/fesm2022/one-paragon-angular-utilities.mjs +0 -7328
  202. package/fesm2022/one-paragon-angular-utilities.mjs.map +0 -1
  203. package/types/one-paragon-angular-utilities.d.ts +0 -2197
@@ -0,0 +1,517 @@
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
+ ```