@toolbox-web/grid-angular 0.7.1 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (211) hide show
  1. package/README.md +71 -0
  2. package/fesm2022/toolbox-web-grid-angular-features-clipboard.mjs +30 -0
  3. package/fesm2022/toolbox-web-grid-angular-features-clipboard.mjs.map +1 -0
  4. package/fesm2022/toolbox-web-grid-angular-features-column-virtualization.mjs +28 -0
  5. package/fesm2022/toolbox-web-grid-angular-features-column-virtualization.mjs.map +1 -0
  6. package/fesm2022/toolbox-web-grid-angular-features-context-menu.mjs +28 -0
  7. package/fesm2022/toolbox-web-grid-angular-features-context-menu.mjs.map +1 -0
  8. package/fesm2022/toolbox-web-grid-angular-features-editing.mjs +33 -0
  9. package/fesm2022/toolbox-web-grid-angular-features-editing.mjs.map +1 -0
  10. package/fesm2022/toolbox-web-grid-angular-features-export.mjs +29 -0
  11. package/fesm2022/toolbox-web-grid-angular-features-export.mjs.map +1 -0
  12. package/fesm2022/toolbox-web-grid-angular-features-filtering.mjs +29 -0
  13. package/fesm2022/toolbox-web-grid-angular-features-filtering.mjs.map +1 -0
  14. package/fesm2022/toolbox-web-grid-angular-features-grouping-columns.mjs +28 -0
  15. package/fesm2022/toolbox-web-grid-angular-features-grouping-columns.mjs.map +1 -0
  16. package/fesm2022/toolbox-web-grid-angular-features-grouping-rows.mjs +25 -0
  17. package/fesm2022/toolbox-web-grid-angular-features-grouping-rows.mjs.map +1 -0
  18. package/fesm2022/toolbox-web-grid-angular-features-master-detail.mjs +25 -0
  19. package/fesm2022/toolbox-web-grid-angular-features-master-detail.mjs.map +1 -0
  20. package/fesm2022/toolbox-web-grid-angular-features-multi-sort.mjs +40 -0
  21. package/fesm2022/toolbox-web-grid-angular-features-multi-sort.mjs.map +1 -0
  22. package/{features/pinned-columns.d.ts → fesm2022/toolbox-web-grid-angular-features-pinned-columns.mjs} +11 -2
  23. package/fesm2022/toolbox-web-grid-angular-features-pinned-columns.mjs.map +1 -0
  24. package/fesm2022/toolbox-web-grid-angular-features-pinned-rows.mjs +28 -0
  25. package/fesm2022/toolbox-web-grid-angular-features-pinned-rows.mjs.map +1 -0
  26. package/fesm2022/toolbox-web-grid-angular-features-pivot.mjs +25 -0
  27. package/fesm2022/toolbox-web-grid-angular-features-pivot.mjs.map +1 -0
  28. package/fesm2022/toolbox-web-grid-angular-features-print.mjs +28 -0
  29. package/fesm2022/toolbox-web-grid-angular-features-print.mjs.map +1 -0
  30. package/fesm2022/toolbox-web-grid-angular-features-reorder.mjs +28 -0
  31. package/fesm2022/toolbox-web-grid-angular-features-reorder.mjs.map +1 -0
  32. package/fesm2022/toolbox-web-grid-angular-features-responsive.mjs +28 -0
  33. package/fesm2022/toolbox-web-grid-angular-features-responsive.mjs.map +1 -0
  34. package/fesm2022/toolbox-web-grid-angular-features-row-reorder.mjs +28 -0
  35. package/fesm2022/toolbox-web-grid-angular-features-row-reorder.mjs.map +1 -0
  36. package/fesm2022/toolbox-web-grid-angular-features-selection.mjs +30 -0
  37. package/fesm2022/toolbox-web-grid-angular-features-selection.mjs.map +1 -0
  38. package/fesm2022/toolbox-web-grid-angular-features-server-side.mjs +25 -0
  39. package/fesm2022/toolbox-web-grid-angular-features-server-side.mjs.map +1 -0
  40. package/fesm2022/toolbox-web-grid-angular-features-sorting.mjs +25 -0
  41. package/fesm2022/toolbox-web-grid-angular-features-sorting.mjs.map +1 -0
  42. package/fesm2022/toolbox-web-grid-angular-features-tree.mjs +28 -0
  43. package/fesm2022/toolbox-web-grid-angular-features-tree.mjs.map +1 -0
  44. package/fesm2022/toolbox-web-grid-angular-features-undo-redo.mjs +30 -0
  45. package/fesm2022/toolbox-web-grid-angular-features-undo-redo.mjs.map +1 -0
  46. package/fesm2022/toolbox-web-grid-angular-features-visibility.mjs +28 -0
  47. package/fesm2022/toolbox-web-grid-angular-features-visibility.mjs.map +1 -0
  48. package/fesm2022/toolbox-web-grid-angular.mjs +3376 -0
  49. package/fesm2022/toolbox-web-grid-angular.mjs.map +1 -0
  50. package/package.json +109 -35
  51. package/types/toolbox-web-grid-angular-features-clipboard.d.ts +3 -0
  52. package/types/toolbox-web-grid-angular-features-clipboard.d.ts.map +1 -0
  53. package/types/toolbox-web-grid-angular-features-column-virtualization.d.ts +3 -0
  54. package/types/toolbox-web-grid-angular-features-column-virtualization.d.ts.map +1 -0
  55. package/types/toolbox-web-grid-angular-features-context-menu.d.ts +3 -0
  56. package/types/toolbox-web-grid-angular-features-context-menu.d.ts.map +1 -0
  57. package/types/toolbox-web-grid-angular-features-editing.d.ts +3 -0
  58. package/types/toolbox-web-grid-angular-features-editing.d.ts.map +1 -0
  59. package/types/toolbox-web-grid-angular-features-export.d.ts +3 -0
  60. package/types/toolbox-web-grid-angular-features-export.d.ts.map +1 -0
  61. package/types/toolbox-web-grid-angular-features-filtering.d.ts +3 -0
  62. package/types/toolbox-web-grid-angular-features-filtering.d.ts.map +1 -0
  63. package/types/toolbox-web-grid-angular-features-grouping-columns.d.ts +3 -0
  64. package/types/toolbox-web-grid-angular-features-grouping-columns.d.ts.map +1 -0
  65. package/types/toolbox-web-grid-angular-features-grouping-rows.d.ts +3 -0
  66. package/types/toolbox-web-grid-angular-features-grouping-rows.d.ts.map +1 -0
  67. package/types/toolbox-web-grid-angular-features-master-detail.d.ts +3 -0
  68. package/types/toolbox-web-grid-angular-features-master-detail.d.ts.map +1 -0
  69. package/types/toolbox-web-grid-angular-features-multi-sort.d.ts +3 -0
  70. package/types/toolbox-web-grid-angular-features-multi-sort.d.ts.map +1 -0
  71. package/types/toolbox-web-grid-angular-features-pinned-columns.d.ts +3 -0
  72. package/types/toolbox-web-grid-angular-features-pinned-columns.d.ts.map +1 -0
  73. package/types/toolbox-web-grid-angular-features-pinned-rows.d.ts +3 -0
  74. package/types/toolbox-web-grid-angular-features-pinned-rows.d.ts.map +1 -0
  75. package/types/toolbox-web-grid-angular-features-pivot.d.ts +3 -0
  76. package/types/toolbox-web-grid-angular-features-pivot.d.ts.map +1 -0
  77. package/types/toolbox-web-grid-angular-features-print.d.ts +3 -0
  78. package/types/toolbox-web-grid-angular-features-print.d.ts.map +1 -0
  79. package/types/toolbox-web-grid-angular-features-reorder.d.ts +3 -0
  80. package/types/toolbox-web-grid-angular-features-reorder.d.ts.map +1 -0
  81. package/types/toolbox-web-grid-angular-features-responsive.d.ts +3 -0
  82. package/types/toolbox-web-grid-angular-features-responsive.d.ts.map +1 -0
  83. package/types/toolbox-web-grid-angular-features-row-reorder.d.ts +3 -0
  84. package/types/toolbox-web-grid-angular-features-row-reorder.d.ts.map +1 -0
  85. package/types/toolbox-web-grid-angular-features-selection.d.ts +3 -0
  86. package/types/toolbox-web-grid-angular-features-selection.d.ts.map +1 -0
  87. package/types/toolbox-web-grid-angular-features-server-side.d.ts +3 -0
  88. package/types/toolbox-web-grid-angular-features-server-side.d.ts.map +1 -0
  89. package/types/toolbox-web-grid-angular-features-sorting.d.ts +3 -0
  90. package/types/toolbox-web-grid-angular-features-sorting.d.ts.map +1 -0
  91. package/types/toolbox-web-grid-angular-features-tree.d.ts +3 -0
  92. package/types/toolbox-web-grid-angular-features-tree.d.ts.map +1 -0
  93. package/types/toolbox-web-grid-angular-features-undo-redo.d.ts +3 -0
  94. package/types/toolbox-web-grid-angular-features-undo-redo.d.ts.map +1 -0
  95. package/types/toolbox-web-grid-angular-features-visibility.d.ts +3 -0
  96. package/types/toolbox-web-grid-angular-features-visibility.d.ts.map +1 -0
  97. package/types/toolbox-web-grid-angular.d.ts +2468 -0
  98. package/types/toolbox-web-grid-angular.d.ts.map +1 -0
  99. package/feature-registry-C-cKloXB.js +0 -45
  100. package/features/clipboard.d.ts +0 -18
  101. package/features/clipboard.d.ts.map +0 -1
  102. package/features/clipboard.js +0 -3
  103. package/features/column-virtualization.d.ts +0 -16
  104. package/features/column-virtualization.d.ts.map +0 -1
  105. package/features/column-virtualization.js +0 -3
  106. package/features/context-menu.d.ts +0 -16
  107. package/features/context-menu.d.ts.map +0 -1
  108. package/features/context-menu.js +0 -3
  109. package/features/editing.d.ts +0 -16
  110. package/features/editing.d.ts.map +0 -1
  111. package/features/editing.js +0 -3
  112. package/features/export.d.ts +0 -17
  113. package/features/export.d.ts.map +0 -1
  114. package/features/export.js +0 -3
  115. package/features/filtering.d.ts +0 -17
  116. package/features/filtering.d.ts.map +0 -1
  117. package/features/filtering.js +0 -3
  118. package/features/grouping-columns.d.ts +0 -16
  119. package/features/grouping-columns.d.ts.map +0 -1
  120. package/features/grouping-columns.js +0 -3
  121. package/features/grouping-rows.d.ts +0 -16
  122. package/features/grouping-rows.d.ts.map +0 -1
  123. package/features/grouping-rows.js +0 -3
  124. package/features/index.d.ts +0 -1
  125. package/features/index.d.ts.map +0 -1
  126. package/features/index.js +0 -22
  127. package/features/master-detail.d.ts +0 -16
  128. package/features/master-detail.d.ts.map +0 -1
  129. package/features/master-detail.js +0 -3
  130. package/features/multi-sort.d.ts +0 -22
  131. package/features/multi-sort.d.ts.map +0 -1
  132. package/features/multi-sort.js +0 -3
  133. package/features/pinned-columns.d.ts.map +0 -1
  134. package/features/pinned-columns.js +0 -3
  135. package/features/pinned-rows.d.ts +0 -16
  136. package/features/pinned-rows.d.ts.map +0 -1
  137. package/features/pinned-rows.js +0 -3
  138. package/features/pivot.d.ts +0 -16
  139. package/features/pivot.d.ts.map +0 -1
  140. package/features/pivot.js +0 -3
  141. package/features/print.d.ts +0 -16
  142. package/features/print.d.ts.map +0 -1
  143. package/features/print.js +0 -3
  144. package/features/reorder.d.ts +0 -16
  145. package/features/reorder.d.ts.map +0 -1
  146. package/features/reorder.js +0 -3
  147. package/features/responsive.d.ts +0 -16
  148. package/features/responsive.d.ts.map +0 -1
  149. package/features/responsive.js +0 -3
  150. package/features/row-reorder.d.ts +0 -16
  151. package/features/row-reorder.d.ts.map +0 -1
  152. package/features/row-reorder.js +0 -3
  153. package/features/selection.d.ts +0 -16
  154. package/features/selection.d.ts.map +0 -1
  155. package/features/selection.js +0 -3
  156. package/features/server-side.d.ts +0 -16
  157. package/features/server-side.d.ts.map +0 -1
  158. package/features/server-side.js +0 -3
  159. package/features/sorting.d.ts +0 -1
  160. package/features/sorting.d.ts.map +0 -1
  161. package/features/sorting.js +0 -1
  162. package/features/tree.d.ts +0 -16
  163. package/features/tree.d.ts.map +0 -1
  164. package/features/tree.js +0 -3
  165. package/features/undo-redo.d.ts +0 -18
  166. package/features/undo-redo.d.ts.map +0 -1
  167. package/features/undo-redo.js +0 -3
  168. package/features/visibility.d.ts +0 -16
  169. package/features/visibility.d.ts.map +0 -1
  170. package/features/visibility.js +0 -3
  171. package/index.d.ts +0 -34
  172. package/index.d.ts.map +0 -1
  173. package/index.js +0 -1916
  174. package/lib/angular-column-config.d.ts +0 -140
  175. package/lib/angular-column-config.d.ts.map +0 -1
  176. package/lib/angular-grid-adapter.d.ts +0 -220
  177. package/lib/angular-grid-adapter.d.ts.map +0 -1
  178. package/lib/base-grid-editor.d.ts +0 -145
  179. package/lib/base-grid-editor.d.ts.map +0 -1
  180. package/lib/component-registry.d.ts +0 -63
  181. package/lib/component-registry.d.ts.map +0 -1
  182. package/lib/directives/grid-column-editor.directive.d.ts +0 -113
  183. package/lib/directives/grid-column-editor.directive.d.ts.map +0 -1
  184. package/lib/directives/grid-column-view.directive.d.ts +0 -69
  185. package/lib/directives/grid-column-view.directive.d.ts.map +0 -1
  186. package/lib/directives/grid-detail-view.directive.d.ts +0 -75
  187. package/lib/directives/grid-detail-view.directive.d.ts.map +0 -1
  188. package/lib/directives/grid-form-array.directive.d.ts +0 -141
  189. package/lib/directives/grid-form-array.directive.d.ts.map +0 -1
  190. package/lib/directives/grid-responsive-card.directive.d.ts +0 -92
  191. package/lib/directives/grid-responsive-card.directive.d.ts.map +0 -1
  192. package/lib/directives/grid-tool-panel.directive.d.ts +0 -91
  193. package/lib/directives/grid-tool-panel.directive.d.ts.map +0 -1
  194. package/lib/directives/grid.directive.d.ts +0 -808
  195. package/lib/directives/grid.directive.d.ts.map +0 -1
  196. package/lib/directives/index.d.ts +0 -9
  197. package/lib/directives/index.d.ts.map +0 -1
  198. package/lib/directives/structural-directives.d.ts +0 -174
  199. package/lib/directives/structural-directives.d.ts.map +0 -1
  200. package/lib/feature-registry.d.ts +0 -72
  201. package/lib/feature-registry.d.ts.map +0 -1
  202. package/lib/grid-type-registry.d.ts +0 -110
  203. package/lib/grid-type-registry.d.ts.map +0 -1
  204. package/lib/inject-grid.d.ts +0 -109
  205. package/lib/inject-grid.d.ts.map +0 -1
  206. package/lib/interfaces/grid-cell-editor.d.ts +0 -85
  207. package/lib/interfaces/grid-cell-editor.d.ts.map +0 -1
  208. package/lib/interfaces/grid-cell-renderer.d.ts +0 -63
  209. package/lib/interfaces/grid-cell-renderer.d.ts.map +0 -1
  210. package/lib/interfaces/index.d.ts +0 -5
  211. package/lib/interfaces/index.d.ts.map +0 -1
@@ -0,0 +1,2468 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { Type, EnvironmentInjector, ApplicationRef, ViewContainerRef, InjectionToken, EnvironmentProviders, Signal, TemplateRef, EventEmitter, OnInit, OnDestroy, AfterContentInit } from '@angular/core';
3
+ import { GridConfig, ColumnConfig, FrameworkAdapter, ColumnViewRenderer, ColumnEditorSpec, TypeDefault, GridIcons, DataGridElement, ExpandCollapseAnimation, CellClickDetail, RowClickDetail, CellActivateDetail, CellChangeDetail, ChangedRowsResetDetail, SortChangeDetail, ColumnResizeDetail, GridColumnState } from '@toolbox-web/grid';
4
+ import { AbstractControl, FormArray, FormGroup } from '@angular/forms';
5
+ import { SelectionConfig, ClipboardConfig, ContextMenuConfig, MultiSortConfig, FilterConfig, ReorderConfig, VisibilityConfig, GroupingColumnsConfig, ColumnVirtualizationConfig, RowReorderConfig, GroupingRowsConfig, PinnedRowsConfig, TreeConfig, MasterDetailConfig, ResponsivePluginConfig, UndoRedoConfig, ExportConfig, PrintConfig, PivotConfig, ServerSideConfig, FilterChangeDetail, ColumnMoveDetail, ColumnVisibilityDetail, SelectionChangeDetail, RowMoveDetail, GroupToggleDetail, TreeExpandDetail, DetailExpandDetail, ResponsiveChangeDetail, CopyDetail, PasteDetail, UndoRedoDetail, ExportCompleteDetail, PrintStartDetail, PrintCompleteDetail } from '@toolbox-web/grid/all';
6
+
7
+ /**
8
+ * Angular-specific column configuration types.
9
+ *
10
+ * These types extend the base grid column config to allow Angular component
11
+ * classes to be used directly as renderers and editors.
12
+ */
13
+
14
+ /**
15
+ * Interface for Angular renderer components.
16
+ *
17
+ * Renderer components receive the cell value, row data, and column config as inputs.
18
+ * Use Angular signal inputs for reactive updates.
19
+ *
20
+ * @example
21
+ * ```typescript
22
+ * import { Component, input } from '@angular/core';
23
+ * import type { AngularCellRenderer } from '@toolbox-web/grid-angular';
24
+ *
25
+ * @Component({
26
+ * selector: 'app-status-badge',
27
+ * template: `<span [class]="'badge-' + value()">{{ value() }}</span>`
28
+ * })
29
+ * export class StatusBadgeComponent implements AngularCellRenderer<Employee, string> {
30
+ * value = input.required<string>();
31
+ * row = input.required<Employee>();
32
+ * column = input<unknown>();
33
+ * }
34
+ * ```
35
+ */
36
+ interface AngularCellRenderer<TRow = unknown, TValue = unknown> {
37
+ /** The cell value - use `input<TValue>()` or `input.required<TValue>()` */
38
+ value: {
39
+ (): TValue | undefined;
40
+ };
41
+ /** The full row data - use `input<TRow>()` or `input.required<TRow>()` */
42
+ row: {
43
+ (): TRow | undefined;
44
+ };
45
+ /** The column configuration (optional) - use `input<unknown>()` */
46
+ column?: {
47
+ (): unknown;
48
+ };
49
+ }
50
+ /**
51
+ * Interface for Angular editor components.
52
+ *
53
+ * Editor components receive the cell value, row data, and column config as inputs,
54
+ * plus must emit `commit` and `cancel` outputs.
55
+ *
56
+ * @example
57
+ * ```typescript
58
+ * import { Component, input, output } from '@angular/core';
59
+ * import type { AngularCellEditor } from '@toolbox-web/grid-angular';
60
+ *
61
+ * @Component({
62
+ * selector: 'app-status-editor',
63
+ * template: `
64
+ * <select [value]="value()" (change)="commit.emit($any($event.target).value)">
65
+ * <option value="active">Active</option>
66
+ * <option value="inactive">Inactive</option>
67
+ * </select>
68
+ * `
69
+ * })
70
+ * export class StatusEditorComponent implements AngularCellEditor<Employee, string> {
71
+ * value = input.required<string>();
72
+ * row = input.required<Employee>();
73
+ * column = input<unknown>();
74
+ * commit = output<string>();
75
+ * cancel = output<void>();
76
+ * }
77
+ * ```
78
+ */
79
+ interface AngularCellEditor<TRow = unknown, TValue = unknown> extends AngularCellRenderer<TRow, TValue> {
80
+ /** Emit to commit the new value - use `output<TValue>()` */
81
+ commit: {
82
+ emit(value: TValue): void;
83
+ subscribe?(fn: (value: TValue) => void): {
84
+ unsubscribe(): void;
85
+ };
86
+ };
87
+ /** Emit to cancel editing - use `output<void>()` */
88
+ cancel: {
89
+ emit(): void;
90
+ subscribe?(fn: () => void): {
91
+ unsubscribe(): void;
92
+ };
93
+ };
94
+ }
95
+ /**
96
+ * Angular-specific column configuration.
97
+ *
98
+ * Extends the base ColumnConfig to allow Angular component classes
99
+ * to be used directly as renderers and editors.
100
+ *
101
+ * @example
102
+ * ```typescript
103
+ * import type { AngularColumnConfig } from '@toolbox-web/grid-angular';
104
+ * import { StatusBadgeComponent, StatusEditorComponent } from './components';
105
+ *
106
+ * const columns: AngularColumnConfig<Employee>[] = [
107
+ * { field: 'name', header: 'Name' },
108
+ * {
109
+ * field: 'status',
110
+ * header: 'Status',
111
+ * editable: true,
112
+ * renderer: StatusBadgeComponent,
113
+ * editor: StatusEditorComponent,
114
+ * },
115
+ * ];
116
+ * ```
117
+ */
118
+ interface AngularColumnConfig<TRow = unknown> extends Omit<ColumnConfig<TRow>, 'renderer' | 'editor'> {
119
+ /**
120
+ * Cell renderer - can be:
121
+ * - A function `(ctx) => HTMLElement | string`
122
+ * - An Angular component class implementing AngularCellRenderer
123
+ */
124
+ renderer?: ColumnConfig<TRow>['renderer'] | Type<AngularCellRenderer<TRow, unknown>>;
125
+ /**
126
+ * Cell editor - can be:
127
+ * - A function `(ctx) => HTMLElement`
128
+ * - An Angular component class implementing AngularCellEditor
129
+ */
130
+ editor?: ColumnConfig<TRow>['editor'] | Type<AngularCellEditor<TRow, unknown>>;
131
+ }
132
+ /**
133
+ * Angular-specific grid configuration.
134
+ *
135
+ * Extends the base GridConfig to use AngularColumnConfig.
136
+ */
137
+ interface AngularGridConfig<TRow = unknown> extends Omit<GridConfig<TRow>, 'columns'> {
138
+ columns?: AngularColumnConfig<TRow>[];
139
+ }
140
+ /**
141
+ * Type guard to check if a value is an Angular component class.
142
+ *
143
+ * Detects Angular components by checking for internal Angular markers:
144
+ * - ɵcmp (component definition)
145
+ * - ɵfac (factory function)
146
+ *
147
+ * Also checks if it's an ES6 class (vs function) by inspecting the
148
+ * string representation.
149
+ */
150
+ declare function isComponentClass(value: unknown): value is Type<unknown>;
151
+
152
+ /**
153
+ * Framework adapter that enables zero-boilerplate integration of Angular components
154
+ * with the grid's light DOM configuration API.
155
+ *
156
+ * ## Usage
157
+ *
158
+ * **One-time setup in your app:**
159
+ * ```typescript
160
+ * import { Component, inject, EnvironmentInjector, ApplicationRef, ViewContainerRef } from '@angular/core';
161
+ * import { GridElement } from '@toolbox-web/grid';
162
+ * import { AngularGridAdapter } from '@toolbox-web/grid-angular';
163
+ *
164
+ * @Component({
165
+ * selector: 'app-root',
166
+ * // ...
167
+ * })
168
+ * export class AppComponent {
169
+ * constructor() {
170
+ * const injector = inject(EnvironmentInjector);
171
+ * const appRef = inject(ApplicationRef);
172
+ * const viewContainerRef = inject(ViewContainerRef);
173
+ * GridElement.registerAdapter(new AngularGridAdapter(injector, appRef, viewContainerRef));
174
+ * }
175
+ * }
176
+ * ```
177
+ *
178
+ * **Declarative configuration in templates (structural directive - recommended):**
179
+ * ```html
180
+ * <tbw-grid>
181
+ * <tbw-grid-column field="status">
182
+ * <app-status-badge *tbwRenderer="let value; row as row" [value]="value" />
183
+ * <app-status-editor *tbwEditor="let value" [value]="value" />
184
+ * </tbw-grid-column>
185
+ * </tbw-grid>
186
+ * ```
187
+ *
188
+ * **Declarative configuration in templates (nested directive - legacy):**
189
+ * ```html
190
+ * <tbw-grid>
191
+ * <tbw-grid-column field="status">
192
+ * <tbw-grid-column-view>
193
+ * <ng-template let-value let-row="row">
194
+ * <app-status-badge [value]="value" [row]="row" />
195
+ * </ng-template>
196
+ * </tbw-grid-column-view>
197
+ * <tbw-grid-column-editor>
198
+ * <ng-template let-value let-onCommit="onCommit" let-onCancel="onCancel">
199
+ * <app-status-select [value]="value" (commit)="onCommit($event)" (cancel)="onCancel()" />
200
+ * </ng-template>
201
+ * </tbw-grid-column-editor>
202
+ * </tbw-grid-column>
203
+ * </tbw-grid>
204
+ * ```
205
+ *
206
+ * The adapter automatically:
207
+ * - Detects Angular templates registered by directives (both structural and nested)
208
+ * - Creates embedded views with cell context (value, row, column)
209
+ * - Handles editor callbacks (onCommit/onCancel)
210
+ * - Manages view lifecycle and change detection
211
+ */
212
+ declare class AngularGridAdapter implements FrameworkAdapter {
213
+ private injector;
214
+ private appRef;
215
+ private viewContainerRef;
216
+ private viewRefs;
217
+ private componentRefs;
218
+ private typeRegistry;
219
+ constructor(injector: EnvironmentInjector, appRef: ApplicationRef, viewContainerRef: ViewContainerRef);
220
+ /**
221
+ * Processes an Angular grid configuration, converting component class references
222
+ * to actual renderer/editor functions.
223
+ *
224
+ * Call this method on your gridConfig before passing it to the grid.
225
+ *
226
+ * @example
227
+ * ```typescript
228
+ * import { AngularGridAdapter, type AngularGridConfig } from '@toolbox-web/grid-angular';
229
+ *
230
+ * const config: AngularGridConfig<Employee> = {
231
+ * columns: [
232
+ * { field: 'status', renderer: StatusBadgeComponent, editor: StatusEditorComponent },
233
+ * ],
234
+ * };
235
+ *
236
+ * // In component
237
+ * constructor() {
238
+ * const adapter = inject(AngularGridAdapter); // or create new instance
239
+ * this.processedConfig = adapter.processGridConfig(config);
240
+ * }
241
+ * ```
242
+ *
243
+ * @param config - Angular grid configuration with possible component class references
244
+ * @returns Processed GridConfig with actual renderer/editor functions
245
+ */
246
+ processGridConfig<TRow = unknown>(config: AngularGridConfig<TRow>): GridConfig<TRow>;
247
+ /**
248
+ * Processes a single column configuration, converting component class references
249
+ * to actual renderer/editor functions.
250
+ *
251
+ * @param column - Angular column configuration
252
+ * @returns Processed ColumnConfig
253
+ */
254
+ processColumn<TRow = unknown>(column: AngularColumnConfig<TRow>): ColumnConfig<TRow>;
255
+ /**
256
+ * Determines if this adapter can handle the given element.
257
+ * Checks if a template is registered for this element (structural or nested).
258
+ */
259
+ canHandle(element: HTMLElement): boolean;
260
+ /**
261
+ * Creates a view renderer function that creates an embedded view
262
+ * from the registered template and returns its DOM element.
263
+ *
264
+ * Returns undefined if no template is registered for this element,
265
+ * allowing the grid to use its default rendering.
266
+ */
267
+ createRenderer<TRow = unknown, TValue = unknown>(element: HTMLElement): ColumnViewRenderer<TRow, TValue>;
268
+ /**
269
+ * Creates an editor spec that creates an embedded view.
270
+ *
271
+ * **Auto-wiring**: The adapter automatically listens for `commit` and `cancel`
272
+ * CustomEvents on the rendered component. If the component emits these events,
273
+ * the adapter will call the grid's commit/cancel functions automatically.
274
+ *
275
+ * This means templates can be simplified from:
276
+ * ```html
277
+ * <app-editor *tbwEditor="let value; onCommit as onCommit"
278
+ * [value]="value" (commit)="onCommit($event)" />
279
+ * ```
280
+ * To just:
281
+ * ```html
282
+ * <app-editor *tbwEditor="let value" [value]="value" />
283
+ * ```
284
+ * As long as the component emits `(commit)` with the new value.
285
+ */
286
+ createEditor<TRow = unknown, TValue = unknown>(element: HTMLElement): ColumnEditorSpec<TRow, TValue>;
287
+ /**
288
+ * Creates a detail renderer function for MasterDetailPlugin.
289
+ * Renders Angular templates for expandable detail rows.
290
+ */
291
+ createDetailRenderer<TRow = unknown>(gridElement: HTMLElement): ((row: TRow) => HTMLElement) | undefined;
292
+ /**
293
+ * Framework adapter hook called by MasterDetailPlugin during attach().
294
+ * Parses the <tbw-grid-detail> element and returns an Angular template-based renderer.
295
+ *
296
+ * This enables MasterDetailPlugin to automatically use Angular templates
297
+ * without manual configuration in the Grid directive.
298
+ */
299
+ parseDetailElement<TRow = unknown>(detailElement: Element): ((row: TRow, rowIndex: number) => HTMLElement | string) | undefined;
300
+ /**
301
+ * Creates a responsive card renderer function for ResponsivePlugin.
302
+ * Renders Angular templates for card layout in responsive mode.
303
+ *
304
+ * @param gridElement - The grid element to look up the template for
305
+ * @returns A card renderer function or undefined if no template is found
306
+ */
307
+ createResponsiveCardRenderer<TRow = unknown>(gridElement: HTMLElement): ((row: TRow, rowIndex: number) => HTMLElement) | undefined;
308
+ /**
309
+ * Creates a tool panel renderer from a light DOM element.
310
+ * The renderer creates an Angular template-based panel content.
311
+ */
312
+ createToolPanelRenderer(element: HTMLElement): ((container: HTMLElement) => void | (() => void)) | undefined;
313
+ /**
314
+ * Gets type-level defaults from the application's GridTypeRegistry.
315
+ *
316
+ * This enables application-wide type defaults configured via `provideGridTypeDefaults()`.
317
+ * The returned TypeDefault contains renderer/editor functions that instantiate
318
+ * Angular components dynamically.
319
+ *
320
+ * @example
321
+ * ```typescript
322
+ * // app.config.ts
323
+ * export const appConfig: ApplicationConfig = {
324
+ * providers: [
325
+ * provideGridTypeDefaults({
326
+ * country: {
327
+ * renderer: CountryCellComponent,
328
+ * editor: CountryEditorComponent
329
+ * }
330
+ * })
331
+ * ]
332
+ * };
333
+ *
334
+ * // Any grid with type: 'country' columns will use these components
335
+ * gridConfig = {
336
+ * columns: [{ field: 'country', type: 'country' }]
337
+ * };
338
+ * ```
339
+ */
340
+ getTypeDefault<TRow = unknown>(type: string): TypeDefault<TRow> | undefined;
341
+ /**
342
+ * Creates a renderer function from an Angular component class.
343
+ * @internal
344
+ */
345
+ private createComponentRenderer;
346
+ /**
347
+ * Creates an editor function from an Angular component class.
348
+ * @internal
349
+ */
350
+ private createComponentEditor;
351
+ /**
352
+ * Subscribes to an Angular output on a component instance.
353
+ * Works with both EventEmitter and OutputEmitterRef (signal outputs).
354
+ * @internal
355
+ */
356
+ private subscribeToOutput;
357
+ /**
358
+ * Sets component inputs using Angular's setInput API.
359
+ * @internal
360
+ */
361
+ private setComponentInputs;
362
+ /**
363
+ * Clean up all view references and component references.
364
+ * Call this when your app/component is destroyed.
365
+ */
366
+ destroy(): void;
367
+ }
368
+
369
+ /**
370
+ * Type-level default registry for Angular applications.
371
+ *
372
+ * Provides application-wide type defaults for renderers and editors
373
+ * that all grids inherit automatically.
374
+ */
375
+
376
+ /**
377
+ * Angular-specific type default configuration.
378
+ * Uses Angular component types instead of function-based renderers/editors.
379
+ */
380
+ interface AngularTypeDefault<TRow = unknown> {
381
+ /** Angular component class for rendering cells of this type */
382
+ renderer?: Type<any>;
383
+ /** Angular component class for editing cells of this type */
384
+ editor?: Type<any>;
385
+ /** Default editorParams for this type */
386
+ editorParams?: Record<string, unknown>;
387
+ }
388
+ /**
389
+ * Injection token for providing type defaults at app level.
390
+ */
391
+ declare const GRID_TYPE_DEFAULTS: InjectionToken<Record<string, AngularTypeDefault<unknown>>>;
392
+ /**
393
+ * Injectable service for managing type-level defaults.
394
+ *
395
+ * Use `provideGridTypeDefaults()` in your app config to set up defaults,
396
+ * or inject this service for dynamic registration.
397
+ *
398
+ * @example
399
+ * ```typescript
400
+ * // App-level setup (app.config.ts)
401
+ * export const appConfig: ApplicationConfig = {
402
+ * providers: [
403
+ * provideGridTypeDefaults({
404
+ * country: {
405
+ * renderer: CountryCellComponent,
406
+ * editor: CountryEditorComponent
407
+ * },
408
+ * status: {
409
+ * renderer: StatusBadgeComponent
410
+ * }
411
+ * })
412
+ * ]
413
+ * };
414
+ *
415
+ * // Dynamic registration
416
+ * @Component({ ... })
417
+ * export class AppComponent {
418
+ * private registry = inject(GridTypeRegistry);
419
+ *
420
+ * ngOnInit() {
421
+ * this.registry.register('currency', {
422
+ * renderer: CurrencyCellComponent
423
+ * });
424
+ * }
425
+ * }
426
+ * ```
427
+ */
428
+ declare class GridTypeRegistry {
429
+ private readonly defaults;
430
+ constructor();
431
+ /**
432
+ * Register type-level defaults for a custom type.
433
+ *
434
+ * @param type - The type name (e.g., 'country', 'currency')
435
+ * @param defaults - Renderer/editor configuration
436
+ */
437
+ register<T = unknown>(type: string, defaults: AngularTypeDefault<T>): void;
438
+ /**
439
+ * Get type defaults for a given type.
440
+ */
441
+ get(type: string): AngularTypeDefault | undefined;
442
+ /**
443
+ * Remove type defaults for a type.
444
+ */
445
+ unregister(type: string): void;
446
+ /**
447
+ * Check if a type has registered defaults.
448
+ */
449
+ has(type: string): boolean;
450
+ /**
451
+ * Get all registered type names.
452
+ */
453
+ getRegisteredTypes(): string[];
454
+ /**
455
+ * Convert to TypeDefault for use with grid's typeDefaults.
456
+ * This is used internally by the adapter.
457
+ *
458
+ * @internal
459
+ */
460
+ getAsTypeDefault(type: string): TypeDefault | undefined;
461
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<GridTypeRegistry, never>;
462
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<GridTypeRegistry>;
463
+ }
464
+ /**
465
+ * Provides application-level type defaults for all grids.
466
+ *
467
+ * @example
468
+ * ```typescript
469
+ * // app.config.ts
470
+ * import { provideGridTypeDefaults } from '@toolbox-web/grid-angular';
471
+ * import { CountryCellComponent, StatusBadgeComponent } from './components';
472
+ *
473
+ * export const appConfig: ApplicationConfig = {
474
+ * providers: [
475
+ * provideGridTypeDefaults({
476
+ * country: { renderer: CountryCellComponent },
477
+ * status: { renderer: StatusBadgeComponent },
478
+ * date: { editor: DatePickerComponent }
479
+ * })
480
+ * ]
481
+ * };
482
+ * ```
483
+ */
484
+ declare function provideGridTypeDefaults(defaults: Record<string, AngularTypeDefault>): EnvironmentProviders;
485
+
486
+ /**
487
+ * Icon configuration registry for Angular applications.
488
+ *
489
+ * Provides application-wide icon overrides for all grids via
490
+ * Angular's dependency injection.
491
+ */
492
+
493
+ /**
494
+ * Injection token for providing icon overrides at app level.
495
+ */
496
+ declare const GRID_ICONS: InjectionToken<Partial<GridIcons>>;
497
+ /**
498
+ * Injectable service for managing grid icons.
499
+ *
500
+ * Use `provideGridIcons()` in your app config to set up icons,
501
+ * or inject this service for dynamic registration.
502
+ *
503
+ * @example
504
+ * ```typescript
505
+ * // App-level setup (app.config.ts)
506
+ * export const appConfig: ApplicationConfig = {
507
+ * providers: [
508
+ * provideGridIcons({
509
+ * expand: '➕',
510
+ * collapse: '➖',
511
+ * sortAsc: '↑',
512
+ * sortDesc: '↓',
513
+ * })
514
+ * ]
515
+ * };
516
+ *
517
+ * // Dynamic registration
518
+ * @Component({ ... })
519
+ * export class AppComponent {
520
+ * private registry = inject(GridIconRegistry);
521
+ *
522
+ * ngOnInit() {
523
+ * this.registry.set('filter', '<svg>...</svg>');
524
+ * }
525
+ * }
526
+ * ```
527
+ */
528
+ declare class GridIconRegistry {
529
+ private readonly icons;
530
+ constructor();
531
+ /**
532
+ * Set an icon override.
533
+ *
534
+ * @param name - The icon name (e.g., 'expand', 'collapse', 'filter')
535
+ * @param value - The icon value (string text or SVG markup)
536
+ */
537
+ set<K extends keyof GridIcons>(name: K, value: GridIcons[K]): void;
538
+ /**
539
+ * Get an icon value.
540
+ */
541
+ get<K extends keyof GridIcons>(name: K): GridIcons[K] | undefined;
542
+ /**
543
+ * Remove an icon override.
544
+ */
545
+ remove(name: keyof GridIcons): void;
546
+ /**
547
+ * Check if an icon has an override.
548
+ */
549
+ has(name: keyof GridIcons): boolean;
550
+ /**
551
+ * Get all icon overrides as a GridIcons partial.
552
+ * Used internally by the adapter.
553
+ *
554
+ * @internal
555
+ */
556
+ getAll(): Partial<GridIcons>;
557
+ /**
558
+ * Get all registered icon names.
559
+ */
560
+ getRegisteredIcons(): (keyof GridIcons)[];
561
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<GridIconRegistry, never>;
562
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<GridIconRegistry>;
563
+ }
564
+ /**
565
+ * Provides application-level icon overrides for all grids.
566
+ *
567
+ * Available icons to override:
568
+ * - `expand` - Expand icon for collapsed items (trees, groups, details)
569
+ * - `collapse` - Collapse icon for expanded items
570
+ * - `sortAsc` - Sort ascending indicator
571
+ * - `sortDesc` - Sort descending indicator
572
+ * - `sortNone` - Sort neutral/unsorted indicator
573
+ * - `submenuArrow` - Submenu arrow for context menus
574
+ * - `dragHandle` - Drag handle icon for reordering
575
+ * - `toolPanel` - Tool panel toggle icon in toolbar
576
+ * - `filter` - Filter icon in column headers
577
+ * - `filterActive` - Filter icon when filter is active
578
+ * - `print` - Print icon for print button
579
+ *
580
+ * @example
581
+ * ```typescript
582
+ * // app.config.ts
583
+ * import { provideGridIcons } from '@toolbox-web/grid-angular';
584
+ *
585
+ * export const appConfig: ApplicationConfig = {
586
+ * providers: [
587
+ * provideGridIcons({
588
+ * expand: '➕',
589
+ * collapse: '➖',
590
+ * sortAsc: '↑',
591
+ * sortDesc: '↓',
592
+ * filter: '<svg viewBox="0 0 16 16">...</svg>',
593
+ * })
594
+ * ]
595
+ * };
596
+ * ```
597
+ */
598
+ declare function provideGridIcons(icons: Partial<GridIcons>): EnvironmentProviders;
599
+
600
+ /**
601
+ * Selection convenience methods returned from injectGrid.
602
+ */
603
+ interface SelectionMethods<TRow = unknown> {
604
+ /**
605
+ * Select all rows in the grid.
606
+ * Requires SelectionPlugin with mode: 'row'.
607
+ */
608
+ selectAll: () => void;
609
+ /**
610
+ * Clear all selection.
611
+ * Works with any SelectionPlugin mode.
612
+ */
613
+ clearSelection: () => void;
614
+ /**
615
+ * Get selected row indices.
616
+ * Returns Set of selected row indices.
617
+ */
618
+ getSelectedIndices: () => Set<number>;
619
+ /**
620
+ * Get selected rows data.
621
+ * Returns array of selected row objects.
622
+ */
623
+ getSelectedRows: () => TRow[];
624
+ }
625
+ /**
626
+ * Export convenience methods returned from injectGrid.
627
+ */
628
+ interface ExportMethods {
629
+ /**
630
+ * Export grid data to CSV file.
631
+ * Requires ExportPlugin to be loaded.
632
+ *
633
+ * @param filename - Optional filename (defaults to 'export.csv')
634
+ */
635
+ exportToCsv: (filename?: string) => void;
636
+ /**
637
+ * Export grid data to JSON file.
638
+ * Requires ExportPlugin to be loaded.
639
+ *
640
+ * @param filename - Optional filename (defaults to 'export.json')
641
+ */
642
+ exportToJson: (filename?: string) => void;
643
+ }
644
+ /**
645
+ * Return type for injectGrid function.
646
+ */
647
+ interface InjectGridReturn<TRow = unknown> extends SelectionMethods<TRow>, ExportMethods {
648
+ /** Direct access to the typed grid element */
649
+ element: Signal<DataGridElement<TRow> | null>;
650
+ /** Whether the grid is ready */
651
+ isReady: Signal<boolean>;
652
+ /** Current grid configuration */
653
+ config: Signal<GridConfig<TRow> | null>;
654
+ /** Get the effective configuration */
655
+ getConfig: () => Promise<GridConfig<TRow> | null>;
656
+ /** Force a layout recalculation */
657
+ forceLayout: () => Promise<void>;
658
+ /** Toggle a group row */
659
+ toggleGroup: (key: string) => Promise<void>;
660
+ /** Register custom styles */
661
+ registerStyles: (id: string, css: string) => void;
662
+ /** Unregister custom styles */
663
+ unregisterStyles: (id: string) => void;
664
+ /** Get current visible columns */
665
+ visibleColumns: Signal<ColumnConfig<TRow>[]>;
666
+ }
667
+ /**
668
+ * Angular inject function for programmatic access to a grid instance.
669
+ *
670
+ * This function should be called in the constructor or as a field initializer
671
+ * of an Angular component that contains a `<tbw-grid>` element.
672
+ *
673
+ * ## Usage
674
+ *
675
+ * ```typescript
676
+ * import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
677
+ * import { Grid, injectGrid } from '@toolbox-web/grid-angular';
678
+ *
679
+ * @Component({
680
+ * selector: 'app-my-grid',
681
+ * imports: [Grid],
682
+ * schemas: [CUSTOM_ELEMENTS_SCHEMA],
683
+ * template: `
684
+ * <button (click)="handleResize()">Force Layout</button>
685
+ * <button (click)="handleExport()" [disabled]="!grid.isReady()">Export</button>
686
+ * <tbw-grid [rows]="rows" [gridConfig]="config"></tbw-grid>
687
+ * `
688
+ * })
689
+ * export class MyGridComponent {
690
+ * grid = injectGrid<Employee>();
691
+ *
692
+ * async handleResize() {
693
+ * await this.grid.forceLayout();
694
+ * }
695
+ *
696
+ * async handleExport() {
697
+ * const config = await this.grid.getConfig();
698
+ * console.log('Exporting with columns:', config?.columns);
699
+ * }
700
+ * }
701
+ * ```
702
+ *
703
+ * @returns Object with grid access methods and state signals
704
+ */
705
+ declare function injectGrid<TRow = unknown>(): InjectGridReturn<TRow>;
706
+
707
+ /**
708
+ * Feature Registry for @toolbox-web/grid-angular
709
+ *
710
+ * This module provides a synchronous registry for plugin factories.
711
+ * Features are registered via side-effect imports, enabling tree-shaking
712
+ * while maintaining the clean input-based API.
713
+ *
714
+ * @example
715
+ * ```typescript
716
+ * // Import features you need (side-effect imports)
717
+ * import '@toolbox-web/grid-angular/features/selection';
718
+ * import '@toolbox-web/grid-angular/features/filtering';
719
+ *
720
+ * // Inputs work automatically - no async loading, no HTTP requests
721
+ * <tbw-grid [selection]="'range'" [filtering]="{ debounceMs: 200 }" />
722
+ * ```
723
+ */
724
+ /**
725
+ * Feature names supported by the Grid directive.
726
+ */
727
+ type FeatureName = 'selection' | 'editing' | 'clipboard' | 'contextMenu' | 'multiSort' | 'sorting' | 'filtering' | 'reorder' | 'visibility' | 'pinnedColumns' | 'groupingColumns' | 'columnVirtualization' | 'rowReorder' | 'groupingRows' | 'pinnedRows' | 'tree' | 'masterDetail' | 'responsive' | 'undoRedo' | 'export' | 'print' | 'pivot' | 'serverSide';
728
+ /**
729
+ * Plugin factory function type.
730
+ * Takes configuration and returns a plugin instance.
731
+ */
732
+ type PluginFactory<TConfig = unknown> = (config: TConfig) => unknown;
733
+ /**
734
+ * Register a feature's plugin factory.
735
+ * Called by side-effect feature imports.
736
+ *
737
+ * @param name - The feature name (matches the input name on Grid directive)
738
+ * @param factory - Function that creates the plugin instance
739
+ *
740
+ * @example
741
+ * ```ts
742
+ * // features/selection.ts
743
+ * import { SelectionPlugin } from '@toolbox-web/grid/plugins/selection';
744
+ * import { registerFeature } from '../lib/feature-registry';
745
+ *
746
+ * registerFeature('selection', (config) => new SelectionPlugin(config));
747
+ * ```
748
+ */
749
+ declare function registerFeature<TConfig = unknown>(name: FeatureName, factory: PluginFactory<TConfig>): void;
750
+ /**
751
+ * Check if a feature is registered.
752
+ */
753
+ declare function isFeatureRegistered(name: FeatureName): boolean;
754
+ /**
755
+ * Get a registered feature's factory.
756
+ * Returns undefined if not registered.
757
+ */
758
+ declare function getFeatureFactory(name: FeatureName): PluginFactory | undefined;
759
+ /**
760
+ * Get all registered feature names.
761
+ * Useful for debugging.
762
+ */
763
+ declare function getRegisteredFeatures(): FeatureName[];
764
+ /**
765
+ * Create a plugin instance for a feature.
766
+ * Shows a helpful warning if the feature is not registered.
767
+ *
768
+ * @param name - Feature name
769
+ * @param config - Plugin configuration
770
+ * @returns Plugin instance or undefined if not registered
771
+ */
772
+ declare function createPluginFromFeature<TConfig = unknown>(name: FeatureName, config: TConfig): unknown | undefined;
773
+ /**
774
+ * Clear the registry. For testing only.
775
+ * @internal
776
+ */
777
+ declare function clearFeatureRegistry(): void;
778
+
779
+ /**
780
+ * Base class for grid cell editors.
781
+ *
782
+ * Provides common functionality for Angular cell editors:
783
+ * - Automatic value resolution from FormControl or value input
784
+ * - Common inputs (value, row, column, control)
785
+ * - Common outputs (commit, cancel)
786
+ * - Validation state helpers
787
+ *
788
+ * ## Usage
789
+ *
790
+ * ```typescript
791
+ * import { Component } from '@angular/core';
792
+ * import { BaseGridEditor } from '@toolbox-web/grid-angular';
793
+ *
794
+ * @Component({
795
+ * selector: 'app-my-editor',
796
+ * template: \`
797
+ * <input
798
+ * [value]="currentValue()"
799
+ * [class.is-invalid]="isInvalid()"
800
+ * (input)="commitValue($event.target.value)"
801
+ * (keydown.escape)="cancelEdit()"
802
+ * />
803
+ * @if (hasErrors()) {
804
+ * <div class="error">{{ firstErrorMessage() }}</div>
805
+ * }
806
+ * \`
807
+ * })
808
+ * export class MyEditorComponent extends BaseGridEditor<MyRow, string> {
809
+ * // Override to customize error messages
810
+ * protected override getErrorMessage(errorKey: string): string {
811
+ * if (errorKey === 'required') return 'This field is required';
812
+ * if (errorKey === 'minlength') return 'Too short';
813
+ * return super.getErrorMessage(errorKey);
814
+ * }
815
+ * }
816
+ * ```
817
+ *
818
+ * ## Template Syntax
819
+ *
820
+ * When using the base class, you only need to pass the control:
821
+ *
822
+ * ```html
823
+ * <tbw-grid-column field="name">
824
+ * <app-my-editor *tbwEditor="let _; control as control" [control]="control" />
825
+ * </tbw-grid-column>
826
+ * ```
827
+ *
828
+ * Or without FormArray binding (fallback to value):
829
+ *
830
+ * ```html
831
+ * <tbw-grid-column field="name">
832
+ * <app-my-editor *tbwEditor="let value" [value]="value" />
833
+ * </tbw-grid-column>
834
+ * ```
835
+ *
836
+ * @typeParam TRow - The row data type
837
+ * @typeParam TValue - The cell value type
838
+ */
839
+ declare abstract class BaseGridEditor<TRow = unknown, TValue = unknown> {
840
+ private readonly elementRef;
841
+ /**
842
+ * The cell value. Used when FormControl is not available.
843
+ * When a FormControl is provided, value is derived from control.value instead.
844
+ */
845
+ readonly value: _angular_core.InputSignal<TValue | undefined>;
846
+ /**
847
+ * The full row data object.
848
+ */
849
+ readonly row: _angular_core.InputSignal<TRow | undefined>;
850
+ /**
851
+ * The column configuration.
852
+ */
853
+ readonly column: _angular_core.InputSignal<ColumnConfig<TRow> | undefined>;
854
+ /**
855
+ * The FormControl for this cell, if the grid is bound to a FormArray.
856
+ * When provided, the editor uses control.value instead of the value input.
857
+ */
858
+ readonly control: _angular_core.InputSignal<AbstractControl<any, any, any> | undefined>;
859
+ /**
860
+ * Emits when the user commits a new value.
861
+ */
862
+ readonly commit: _angular_core.OutputEmitterRef<TValue>;
863
+ /**
864
+ * Emits when the user cancels editing.
865
+ */
866
+ readonly cancel: _angular_core.OutputEmitterRef<void>;
867
+ /**
868
+ * The current value, derived from FormControl if available, otherwise from value input.
869
+ * This is the recommended way to get the current value in your editor template.
870
+ */
871
+ readonly currentValue: _angular_core.Signal<TValue | undefined>;
872
+ /**
873
+ * Whether the control is invalid (has validation errors).
874
+ * Returns false if no FormControl is available.
875
+ */
876
+ readonly isInvalid: _angular_core.Signal<boolean>;
877
+ /**
878
+ * Whether the control is dirty (has been modified).
879
+ * Returns false if no FormControl is available.
880
+ */
881
+ readonly isDirty: _angular_core.Signal<boolean>;
882
+ /**
883
+ * Whether the control has been touched.
884
+ * Returns false if no FormControl is available.
885
+ */
886
+ readonly isTouched: _angular_core.Signal<boolean>;
887
+ /**
888
+ * Whether the control has any validation errors.
889
+ */
890
+ readonly hasErrors: _angular_core.Signal<boolean>;
891
+ /**
892
+ * The first error message from the control's validation errors.
893
+ * Returns an empty string if no errors.
894
+ */
895
+ readonly firstErrorMessage: _angular_core.Signal<string>;
896
+ /**
897
+ * All error messages from the control's validation errors.
898
+ */
899
+ readonly allErrorMessages: _angular_core.Signal<string[]>;
900
+ /**
901
+ * Commit a new value. Emits the commit output AND dispatches a DOM event.
902
+ * The DOM event enables the grid's auto-wiring to catch the commit.
903
+ * Call this when the user confirms their edit.
904
+ */
905
+ commitValue(newValue: TValue): void;
906
+ /**
907
+ * Cancel editing. Emits the cancel output AND dispatches a DOM event.
908
+ * Call this when the user cancels (e.g., presses Escape).
909
+ */
910
+ cancelEdit(): void;
911
+ /**
912
+ * Get a human-readable error message for a validation error.
913
+ * Override this method to customize error messages for your editor.
914
+ *
915
+ * @param errorKey - The validation error key (e.g., 'required', 'minlength')
916
+ * @param errorValue - The error value (e.g., { requiredLength: 5, actualLength: 3 })
917
+ * @returns A human-readable error message
918
+ */
919
+ protected getErrorMessage(errorKey: string, errorValue?: unknown): string;
920
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<BaseGridEditor<any, any>, never>;
921
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BaseGridEditor<any, any>, never, never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "row": { "alias": "row"; "required": false; "isSignal": true; }; "column": { "alias": "column"; "required": false; "isSignal": true; }; "control": { "alias": "control"; "required": false; "isSignal": true; }; }, { "commit": "commit"; "cancel": "cancel"; }, never, never, true, never>;
922
+ }
923
+
924
+ /**
925
+ * Context object passed to the cell editor template.
926
+ * Contains the cell value, row data, column configuration, and commit/cancel functions.
927
+ */
928
+ interface GridEditorContext<TValue = unknown, TRow = unknown> {
929
+ /** The cell value for this column */
930
+ $implicit: TValue;
931
+ /** The cell value (explicit binding) */
932
+ value: TValue;
933
+ /** The full row data object */
934
+ row: TRow;
935
+ /** The column configuration */
936
+ column: unknown;
937
+ /**
938
+ * Callback function to commit the edited value.
939
+ * Use with Angular event binding: `(commit)="onCommit($event)"`
940
+ */
941
+ onCommit: (value: TValue) => void;
942
+ /**
943
+ * Callback function to cancel editing.
944
+ * Use with Angular event binding: `(cancel)="onCancel()"`
945
+ */
946
+ onCancel: () => void;
947
+ /**
948
+ * The FormControl for this cell, if the grid is bound to a FormArray with FormGroups.
949
+ *
950
+ * This allows custom editors to bind directly to the control for validation display:
951
+ * ```html
952
+ * <input *tbwEditor="let value; control as ctrl"
953
+ * [formControl]="ctrl"
954
+ * [class.is-invalid]="ctrl?.invalid && ctrl?.touched" />
955
+ * ```
956
+ *
957
+ * Returns `undefined` if:
958
+ * - The grid is not bound to a FormArray
959
+ * - The FormArray doesn't contain FormGroups
960
+ * - The field doesn't exist in the FormGroup
961
+ */
962
+ control?: AbstractControl;
963
+ /**
964
+ * @deprecated Use `onCommit` callback function instead. Will be removed in v2.0.
965
+ * EventEmitter for commit - requires `.emit()` call.
966
+ */
967
+ commit: EventEmitter<TValue>;
968
+ /**
969
+ * @deprecated Use `onCancel` callback function instead. Will be removed in v2.0.
970
+ * EventEmitter for cancel - requires `.emit()` call.
971
+ */
972
+ cancel: EventEmitter<void>;
973
+ }
974
+ /**
975
+ * Directive that captures an `<ng-template>` for use as a cell editor.
976
+ *
977
+ * This enables declarative Angular component usage with proper input bindings
978
+ * that satisfy Angular's AOT compiler.
979
+ *
980
+ * ## Usage
981
+ *
982
+ * ```html
983
+ * <tbw-grid-column field="status" editable>
984
+ * <tbw-grid-column-editor>
985
+ * <ng-template let-value let-row="row" let-onCommit="onCommit" let-onCancel="onCancel">
986
+ * <app-status-select
987
+ * [value]="value"
988
+ * [row]="row"
989
+ * (commit)="onCommit($event)"
990
+ * (cancel)="onCancel()"
991
+ * />
992
+ * </ng-template>
993
+ * </tbw-grid-column-editor>
994
+ * </tbw-grid-column>
995
+ * ```
996
+ *
997
+ * The template context provides:
998
+ * - `$implicit` / `value`: The cell value
999
+ * - `row`: The full row data object
1000
+ * - `column`: The column configuration
1001
+ * - `onCommit`: Callback function to commit the new value
1002
+ * - `onCancel`: Callback function to cancel editing
1003
+ *
1004
+ * Import the directive in your component:
1005
+ *
1006
+ * ```typescript
1007
+ * import { GridColumnEditor } from '@toolbox-web/grid-angular';
1008
+ *
1009
+ * @Component({
1010
+ * imports: [GridColumnEditor],
1011
+ * // ...
1012
+ * })
1013
+ * ```
1014
+ */
1015
+ declare class GridColumnEditor {
1016
+ private elementRef;
1017
+ /**
1018
+ * Query for the ng-template content child.
1019
+ */
1020
+ template: _angular_core.Signal<TemplateRef<any> | undefined>;
1021
+ /** Effect that triggers when the template is available */
1022
+ private onTemplateReceived;
1023
+ /**
1024
+ * Static type guard for template context.
1025
+ * Enables type inference in templates.
1026
+ */
1027
+ static ngTemplateContextGuard(dir: GridColumnEditor, ctx: unknown): ctx is GridEditorContext;
1028
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<GridColumnEditor, never>;
1029
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<GridColumnEditor, "tbw-grid-column-editor", never, {}, {}, ["template"], never, true, never>;
1030
+ }
1031
+
1032
+ /**
1033
+ * Context object passed to the cell renderer template.
1034
+ * Contains the cell value, row data, and column configuration.
1035
+ */
1036
+ interface GridCellContext<TValue = unknown, TRow = unknown> {
1037
+ /** The cell value for this column */
1038
+ $implicit: TValue;
1039
+ /** The cell value (explicit binding) */
1040
+ value: TValue;
1041
+ /** The full row data object */
1042
+ row: TRow;
1043
+ /** The column configuration */
1044
+ column: unknown;
1045
+ }
1046
+ /**
1047
+ * Directive that captures an `<ng-template>` for use as a cell renderer.
1048
+ *
1049
+ * This enables declarative Angular component usage with proper input bindings
1050
+ * that satisfy Angular's AOT compiler.
1051
+ *
1052
+ * ## Usage
1053
+ *
1054
+ * ```html
1055
+ * <tbw-grid-column field="status">
1056
+ * <tbw-grid-column-view>
1057
+ * <ng-template let-value let-row="row">
1058
+ * <app-status-badge [value]="value" [row]="row" />
1059
+ * </ng-template>
1060
+ * </tbw-grid-column-view>
1061
+ * </tbw-grid-column>
1062
+ * ```
1063
+ *
1064
+ * The template context provides:
1065
+ * - `$implicit` / `value`: The cell value
1066
+ * - `row`: The full row data object
1067
+ * - `column`: The column configuration
1068
+ *
1069
+ * Import the directive in your component:
1070
+ *
1071
+ * ```typescript
1072
+ * import { GridColumnView } from '@toolbox-web/grid-angular';
1073
+ *
1074
+ * @Component({
1075
+ * imports: [GridColumnView],
1076
+ * // ...
1077
+ * })
1078
+ * ```
1079
+ */
1080
+ declare class GridColumnView {
1081
+ private elementRef;
1082
+ /**
1083
+ * Query for the ng-template content child.
1084
+ */
1085
+ template: _angular_core.Signal<TemplateRef<any> | undefined>;
1086
+ /** Effect that triggers when the template is available */
1087
+ private onTemplateReceived;
1088
+ /**
1089
+ * Static type guard for template context.
1090
+ * Enables type inference in templates.
1091
+ */
1092
+ static ngTemplateContextGuard(dir: GridColumnView, ctx: unknown): ctx is GridCellContext;
1093
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<GridColumnView, never>;
1094
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<GridColumnView, "tbw-grid-column-view", never, {}, {}, ["template"], never, true, never>;
1095
+ }
1096
+
1097
+ /**
1098
+ * Context object passed to the detail renderer template.
1099
+ * Contains the row data for the expanded detail view.
1100
+ */
1101
+ interface GridDetailContext<TRow = unknown> {
1102
+ /** The row data (implicit binding for let-row) */
1103
+ $implicit: TRow;
1104
+ /** The row data (explicit binding) */
1105
+ row: TRow;
1106
+ }
1107
+ /**
1108
+ * Directive that captures an `<ng-template>` for use as a master-detail row renderer.
1109
+ *
1110
+ * This enables declarative Angular component usage for expandable detail rows
1111
+ * that appear below the main row when expanded.
1112
+ *
1113
+ * ## Usage
1114
+ *
1115
+ * ```html
1116
+ * <tbw-grid [rows]="rows" [gridConfig]="config">
1117
+ * <tbw-grid-detail [showExpandColumn]="true" animation="slide">
1118
+ * <ng-template let-row>
1119
+ * <app-detail-panel [employee]="row" />
1120
+ * </ng-template>
1121
+ * </tbw-grid-detail>
1122
+ * </tbw-grid>
1123
+ * ```
1124
+ *
1125
+ * The template context provides:
1126
+ * - `$implicit` / `row`: The full row data object
1127
+ *
1128
+ * Import the directive in your component:
1129
+ *
1130
+ * ```typescript
1131
+ * import { GridDetailView } from '@toolbox-web/grid-angular';
1132
+ *
1133
+ * @Component({
1134
+ * imports: [GridDetailView],
1135
+ * // ...
1136
+ * })
1137
+ * ```
1138
+ */
1139
+ declare class GridDetailView {
1140
+ private elementRef;
1141
+ /** Whether to show the expand/collapse column. Default: true */
1142
+ showExpandColumn: _angular_core.InputSignal<boolean>;
1143
+ /** Animation style for expand/collapse. Default: 'slide' */
1144
+ animation: _angular_core.InputSignal<ExpandCollapseAnimation>;
1145
+ /**
1146
+ * Query for the ng-template content child.
1147
+ */
1148
+ template: _angular_core.Signal<TemplateRef<any> | undefined>;
1149
+ /** Effect that triggers when the template is available */
1150
+ private onTemplateReceived;
1151
+ /**
1152
+ * Static type guard for template context.
1153
+ * Enables type inference in templates.
1154
+ */
1155
+ static ngTemplateContextGuard(dir: GridDetailView, ctx: unknown): ctx is GridDetailContext;
1156
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<GridDetailView, never>;
1157
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<GridDetailView, "tbw-grid-detail", never, { "showExpandColumn": { "alias": "showExpandColumn"; "required": false; "isSignal": true; }; "animation": { "alias": "animation"; "required": false; "isSignal": true; }; }, {}, ["template"], never, true, never>;
1158
+ }
1159
+
1160
+ /**
1161
+ * Context provided to the grid containing form-related information.
1162
+ * This can be accessed by other directives to get form controls.
1163
+ */
1164
+ interface FormArrayContext {
1165
+ /** Get the row data at a specific index */
1166
+ getRow<T = unknown>(rowIndex: number): T | null;
1167
+ /** Update a field value at a specific row */
1168
+ updateField(rowIndex: number, field: string, value: unknown): void;
1169
+ /** Get the current form value (all rows) */
1170
+ getValue<T = unknown>(): T[];
1171
+ /**
1172
+ * Get the FormControl for a specific cell.
1173
+ * Only available when using FormArray with FormGroup rows.
1174
+ *
1175
+ * @param rowIndex - The row index
1176
+ * @param field - The field name
1177
+ * @returns The AbstractControl for the cell, or undefined if not available
1178
+ */
1179
+ getControl(rowIndex: number, field: string): AbstractControl | undefined;
1180
+ /**
1181
+ * Whether the grid is backed by a FormArray of FormGroups.
1182
+ * When true, `getControl()` will return cell-level controls.
1183
+ */
1184
+ hasFormGroups: boolean;
1185
+ /**
1186
+ * Get the FormGroup for a specific row.
1187
+ * Only available when using FormArray with FormGroup rows.
1188
+ *
1189
+ * @param rowIndex - The row index
1190
+ * @returns The FormGroup for the row, or undefined if not available
1191
+ */
1192
+ getRowFormGroup(rowIndex: number): FormGroup | undefined;
1193
+ /**
1194
+ * Check if a row is valid (all controls in the FormGroup are valid).
1195
+ * Returns true if not using FormArray or if the row doesn't exist.
1196
+ *
1197
+ * @param rowIndex - The row index
1198
+ * @returns true if the row is valid, false if any control is invalid
1199
+ */
1200
+ isRowValid(rowIndex: number): boolean;
1201
+ /**
1202
+ * Check if a row has been touched (any control in the FormGroup is touched).
1203
+ * Returns false if not using FormArray or if the row doesn't exist.
1204
+ *
1205
+ * @param rowIndex - The row index
1206
+ * @returns true if any control in the row is touched
1207
+ */
1208
+ isRowTouched(rowIndex: number): boolean;
1209
+ /**
1210
+ * Check if a row is dirty (any control in the FormGroup is dirty).
1211
+ * Returns false if not using FormArray or if the row doesn't exist.
1212
+ *
1213
+ * @param rowIndex - The row index
1214
+ * @returns true if any control in the row is dirty
1215
+ */
1216
+ isRowDirty(rowIndex: number): boolean;
1217
+ /**
1218
+ * Get validation errors for a specific row.
1219
+ * Aggregates errors from all controls in the FormGroup.
1220
+ *
1221
+ * @param rowIndex - The row index
1222
+ * @returns Object with field names as keys and their errors, or null if no errors
1223
+ */
1224
+ getRowErrors(rowIndex: number): Record<string, unknown> | null;
1225
+ }
1226
+ /**
1227
+ * Gets the FormArrayContext from a grid element, if present.
1228
+ * @internal
1229
+ */
1230
+ declare function getFormArrayContext(gridElement: HTMLElement): FormArrayContext | undefined;
1231
+ /**
1232
+ * Directive that binds a FormArray directly to the grid.
1233
+ *
1234
+ * This is the recommended way to integrate tbw-grid with Angular Reactive Forms.
1235
+ * Use a FormArray of FormGroups for row-level validation and cell-level control access.
1236
+ *
1237
+ * ## Usage
1238
+ *
1239
+ * ```typescript
1240
+ * import { Component, inject } from '@angular/core';
1241
+ * import { FormBuilder, ReactiveFormsModule } from '@angular/forms';
1242
+ * import { Grid, GridFormArray } from '@toolbox-web/grid-angular';
1243
+ *
1244
+ * @Component({
1245
+ * imports: [Grid, GridFormArray, ReactiveFormsModule],
1246
+ * template: \`
1247
+ * <form [formGroup]="form">
1248
+ * <tbw-grid [formArray]="form.controls.rows" [columns]="columns" />
1249
+ * </form>
1250
+ * \`
1251
+ * })
1252
+ * export class MyComponent {
1253
+ * private fb = inject(FormBuilder);
1254
+ *
1255
+ * form = this.fb.group({
1256
+ * rows: this.fb.array([
1257
+ * this.fb.group({ name: 'Alice', age: 30 }),
1258
+ * this.fb.group({ name: 'Bob', age: 25 }),
1259
+ * ])
1260
+ * });
1261
+ *
1262
+ * columns = [
1263
+ * { field: 'name', header: 'Name', editable: true },
1264
+ * { field: 'age', header: 'Age', editable: true }
1265
+ * ];
1266
+ * }
1267
+ * ```
1268
+ *
1269
+ * ## How It Works
1270
+ *
1271
+ * - **FormArray → Grid**: The grid displays the FormArray's value as rows
1272
+ * - **Grid → FormArray**: When a cell is edited, the corresponding FormControl is updated
1273
+ * - FormArrayContext is available for accessing cell-level controls
1274
+ *
1275
+ * ## Features
1276
+ *
1277
+ * - Works naturally with FormArray inside a FormGroup
1278
+ * - Provides cell-level FormControl access for validation
1279
+ * - Supports row-level validation state aggregation
1280
+ * - Automatically syncs FormArray changes to the grid
1281
+ */
1282
+ declare class GridFormArray implements OnInit, OnDestroy {
1283
+ #private;
1284
+ private elementRef;
1285
+ private cellCommitListener;
1286
+ private touchListener;
1287
+ /**
1288
+ * The FormArray to bind to the grid.
1289
+ */
1290
+ readonly formArray: _angular_core.InputSignal<FormArray<any>>;
1291
+ /**
1292
+ * Effect that syncs the FormArray value to the grid rows.
1293
+ */
1294
+ private syncFormArrayToGrid;
1295
+ ngOnInit(): void;
1296
+ ngOnDestroy(): void;
1297
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<GridFormArray, never>;
1298
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<GridFormArray, "tbw-grid[formArray]", never, { "formArray": { "alias": "formArray"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
1299
+ }
1300
+
1301
+ /**
1302
+ * Context object passed to the responsive card template.
1303
+ *
1304
+ * @template TRow - The type of row data
1305
+ *
1306
+ * @example
1307
+ * ```html
1308
+ * <tbw-grid-responsive-card>
1309
+ * <ng-template let-row let-index="index">
1310
+ * <div class="card-content">
1311
+ * <span>{{ row.name }}</span>
1312
+ * <span>Row #{{ index }}</span>
1313
+ * </div>
1314
+ * </ng-template>
1315
+ * </tbw-grid-responsive-card>
1316
+ * ```
1317
+ */
1318
+ interface GridResponsiveCardContext<TRow = unknown> {
1319
+ /**
1320
+ * The row data (available as `let-row` or `let-myVar`).
1321
+ */
1322
+ $implicit: TRow;
1323
+ /**
1324
+ * The row data (explicit access via `let-row="row"`).
1325
+ */
1326
+ row: TRow;
1327
+ /**
1328
+ * The row index (zero-based).
1329
+ */
1330
+ index: number;
1331
+ }
1332
+ /**
1333
+ * Directive for providing custom Angular templates for responsive card layout.
1334
+ *
1335
+ * Use this directive to define how each row should render when the grid
1336
+ * is in responsive/mobile mode. The template receives the row data and index.
1337
+ *
1338
+ * ## Usage
1339
+ *
1340
+ * ```html
1341
+ * <tbw-grid [rows]="employees">
1342
+ * <tbw-grid-responsive-card>
1343
+ * <ng-template let-employee let-idx="index">
1344
+ * <div class="employee-card">
1345
+ * <img [src]="employee.avatar" alt="">
1346
+ * <div class="info">
1347
+ * <strong>{{ employee.name }}</strong>
1348
+ * <span>{{ employee.department }}</span>
1349
+ * </div>
1350
+ * </div>
1351
+ * </ng-template>
1352
+ * </tbw-grid-responsive-card>
1353
+ * </tbw-grid>
1354
+ * ```
1355
+ *
1356
+ * ## Important Notes
1357
+ *
1358
+ * - The ResponsivePlugin must be added to your grid config
1359
+ * - The Grid directive will automatically configure the plugin's cardRenderer
1360
+ * - Template context provides `$implicit` (row), `row`, and `index`
1361
+ *
1362
+ * @see ResponsivePlugin
1363
+ */
1364
+ declare class GridResponsiveCard<TRow = unknown> {
1365
+ private elementRef;
1366
+ /**
1367
+ * The ng-template containing the card content.
1368
+ */
1369
+ template: _angular_core.Signal<TemplateRef<any> | undefined>;
1370
+ /**
1371
+ * Effect that registers the template when it becomes available.
1372
+ */
1373
+ private onTemplateReceived;
1374
+ /**
1375
+ * Type guard for template context inference.
1376
+ */
1377
+ static ngTemplateContextGuard<T>(_directive: GridResponsiveCard<T>, context: unknown): context is GridResponsiveCardContext<T>;
1378
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<GridResponsiveCard<any>, never>;
1379
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<GridResponsiveCard<any>, "tbw-grid-responsive-card", never, {}, {}, ["template"], never, true, never>;
1380
+ }
1381
+
1382
+ /**
1383
+ * Context object passed to the tool panel template.
1384
+ * Provides access to grid-related information for the panel content.
1385
+ */
1386
+ interface GridToolPanelContext {
1387
+ /** The grid element (implicit binding) */
1388
+ $implicit: HTMLElement;
1389
+ /** The grid element */
1390
+ grid: HTMLElement;
1391
+ }
1392
+ /**
1393
+ * Directive that captures an `<ng-template>` for use as a custom tool panel.
1394
+ *
1395
+ * This enables declarative Angular component usage for tool panels
1396
+ * that appear in the grid's side panel.
1397
+ *
1398
+ * ## Usage
1399
+ *
1400
+ * ```html
1401
+ * <tbw-grid [rows]="rows" [gridConfig]="config">
1402
+ * <tbw-grid-tool-panel
1403
+ * id="quick-filters"
1404
+ * title="Quick Filters"
1405
+ * icon="🔍"
1406
+ * tooltip="Apply quick filters"
1407
+ * [order]="10"
1408
+ * >
1409
+ * <ng-template let-grid>
1410
+ * <app-quick-filters [grid]="grid" />
1411
+ * </ng-template>
1412
+ * </tbw-grid-tool-panel>
1413
+ * </tbw-grid>
1414
+ * ```
1415
+ *
1416
+ * The template context provides:
1417
+ * - `$implicit` / `grid`: The grid element reference
1418
+ *
1419
+ * ### Attributes
1420
+ *
1421
+ * - `id` (required): Unique identifier for the panel
1422
+ * - `title` (required): Panel title shown in accordion header
1423
+ * - `icon`: Icon for accordion section header (emoji or text)
1424
+ * - `tooltip`: Tooltip for accordion section header
1425
+ * - `order`: Panel order priority (lower = first, default: 100)
1426
+ *
1427
+ * Import the directive in your component:
1428
+ *
1429
+ * ```typescript
1430
+ * import { GridToolPanel } from '@toolbox-web/grid-angular';
1431
+ *
1432
+ * @Component({
1433
+ * imports: [GridToolPanel],
1434
+ * // ...
1435
+ * })
1436
+ * ```
1437
+ */
1438
+ declare class GridToolPanel {
1439
+ private elementRef;
1440
+ /** Unique panel identifier (required) */
1441
+ id: _angular_core.InputSignal<string>;
1442
+ /** Panel title shown in accordion header (required) */
1443
+ title: _angular_core.InputSignal<string>;
1444
+ /** Icon for accordion section header (emoji or text) */
1445
+ icon: _angular_core.InputSignal<string | undefined>;
1446
+ /** Tooltip for accordion section header */
1447
+ tooltip: _angular_core.InputSignal<string | undefined>;
1448
+ /** Panel order priority (lower = first, default: 100) */
1449
+ order: _angular_core.InputSignal<number>;
1450
+ /**
1451
+ * Query for the ng-template content child.
1452
+ */
1453
+ template: _angular_core.Signal<TemplateRef<any> | undefined>;
1454
+ /** Effect that triggers when the template is available */
1455
+ private onTemplateReceived;
1456
+ /**
1457
+ * Static type guard for template context.
1458
+ * Enables type inference in templates.
1459
+ */
1460
+ static ngTemplateContextGuard(dir: GridToolPanel, ctx: unknown): ctx is GridToolPanelContext;
1461
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<GridToolPanel, never>;
1462
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<GridToolPanel, "tbw-grid-tool-panel", never, { "id": { "alias": "id"; "required": true; "isSignal": true; }; "title": { "alias": "title"; "required": true; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "tooltip": { "alias": "tooltip"; "required": false; "isSignal": true; }; "order": { "alias": "order"; "required": false; "isSignal": true; }; }, {}, ["template"], never, true, never>;
1463
+ }
1464
+
1465
+ /**
1466
+ * Event detail for cell commit events.
1467
+ */
1468
+ interface CellCommitEvent<TRow = unknown, TValue = unknown> {
1469
+ /** The row data object */
1470
+ row: TRow;
1471
+ /** The field name of the edited column */
1472
+ field: string;
1473
+ /** The new value after edit */
1474
+ value: TValue;
1475
+ /** The row index in the data array */
1476
+ rowIndex: number;
1477
+ /** Array of all rows that have been modified */
1478
+ changedRows: TRow[];
1479
+ /** Set of row indices that have been modified */
1480
+ changedRowIndices: Set<number>;
1481
+ /** Whether this is the first modification to this row */
1482
+ firstTimeForRow: boolean;
1483
+ }
1484
+ /**
1485
+ * Event detail for row commit events (bulk editing).
1486
+ */
1487
+ interface RowCommitEvent<TRow = unknown> {
1488
+ /** The row data object */
1489
+ row: TRow;
1490
+ /** The row index in the data array */
1491
+ rowIndex: number;
1492
+ /** Array of all rows that have been modified */
1493
+ changedRows: TRow[];
1494
+ /** Set of row indices that have been modified */
1495
+ changedRowIndices: Set<number>;
1496
+ /** Whether this is the first modification to this row */
1497
+ firstTimeForRow: boolean;
1498
+ }
1499
+ /**
1500
+ * Directive that automatically registers the Angular adapter with tbw-grid elements.
1501
+ *
1502
+ * This directive eliminates the need to manually register the adapter in your component
1503
+ * constructor. Simply import this directive and it will handle adapter registration.
1504
+ *
1505
+ * ## Usage
1506
+ *
1507
+ * ```typescript
1508
+ * import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
1509
+ * import { Grid } from '@toolbox-web/grid-angular';
1510
+ *
1511
+ * @Component({
1512
+ * selector: 'app-root',
1513
+ * imports: [Grid],
1514
+ * schemas: [CUSTOM_ELEMENTS_SCHEMA],
1515
+ * template: `
1516
+ * <tbw-grid [rows]="rows" [gridConfig]="config" [customStyles]="myStyles">
1517
+ * <!-- column templates -->
1518
+ * </tbw-grid>
1519
+ * `
1520
+ * })
1521
+ * export class AppComponent {
1522
+ * rows = [...];
1523
+ * config = {...};
1524
+ * myStyles = `.my-class { color: red; }`;
1525
+ * }
1526
+ * ```
1527
+ *
1528
+ * The directive automatically:
1529
+ * - Creates an AngularGridAdapter instance
1530
+ * - Registers it with the GridElement
1531
+ * - Injects custom styles into the grid
1532
+ * - Handles cleanup on destruction
1533
+ */
1534
+ declare class Grid implements OnInit, AfterContentInit, OnDestroy {
1535
+ private elementRef;
1536
+ private injector;
1537
+ private appRef;
1538
+ private viewContainerRef;
1539
+ private iconRegistry;
1540
+ private adapter;
1541
+ constructor();
1542
+ /**
1543
+ * Custom CSS styles to inject into the grid.
1544
+ * Use this to style custom cell renderers, editors, or detail panels.
1545
+ *
1546
+ * @example
1547
+ * ```typescript
1548
+ * // In your component
1549
+ * customStyles = `
1550
+ * .my-detail-panel { padding: 16px; }
1551
+ * .my-status-badge { border-radius: 4px; }
1552
+ * `;
1553
+ * ```
1554
+ *
1555
+ * ```html
1556
+ * <tbw-grid [customStyles]="customStyles">...</tbw-grid>
1557
+ * ```
1558
+ */
1559
+ customStyles: _angular_core.InputSignal<string | undefined>;
1560
+ /**
1561
+ * Grid-wide sorting toggle.
1562
+ * When false, disables sorting for all columns regardless of their individual `sortable` setting.
1563
+ * When true (default), columns with `sortable: true` can be sorted.
1564
+ *
1565
+ * This is a core grid config property, not a plugin feature.
1566
+ * For multi-column sorting, also add the `[multiSort]` feature.
1567
+ *
1568
+ * @default true
1569
+ *
1570
+ * @example
1571
+ * ```html
1572
+ * <!-- Disable all sorting -->
1573
+ * <tbw-grid [sortable]="false" />
1574
+ *
1575
+ * <!-- Enable sorting (default) - columns still need sortable: true -->
1576
+ * <tbw-grid [sortable]="true" />
1577
+ *
1578
+ * <!-- Enable multi-column sorting -->
1579
+ * <tbw-grid [sortable]="true" [multiSort]="true" />
1580
+ * ```
1581
+ */
1582
+ sortable: _angular_core.InputSignal<boolean | undefined>;
1583
+ /**
1584
+ * Grid-wide filtering toggle.
1585
+ * When false, disables filtering for all columns regardless of their individual `filterable` setting.
1586
+ * When true (default), columns with `filterable: true` can be filtered.
1587
+ *
1588
+ * Requires the FilteringPlugin to be loaded.
1589
+ *
1590
+ * @default true
1591
+ *
1592
+ * @example
1593
+ * ```html
1594
+ * <!-- Disable all filtering -->
1595
+ * <tbw-grid [filterable]="false" [filtering]="true" />
1596
+ *
1597
+ * <!-- Enable filtering (default) -->
1598
+ * <tbw-grid [filterable]="true" [filtering]="true" />
1599
+ * ```
1600
+ */
1601
+ filterable: _angular_core.InputSignal<boolean | undefined>;
1602
+ /**
1603
+ * Grid-wide selection toggle.
1604
+ * When false, disables selection for all rows/cells.
1605
+ * When true (default), selection is enabled based on plugin mode.
1606
+ *
1607
+ * Requires the SelectionPlugin to be loaded.
1608
+ *
1609
+ * @default true
1610
+ *
1611
+ * @example
1612
+ * ```html
1613
+ * <!-- Disable all selection -->
1614
+ * <tbw-grid [selectable]="false" [selection]="'range'" />
1615
+ *
1616
+ * <!-- Enable selection (default) -->
1617
+ * <tbw-grid [selectable]="true" [selection]="'range'" />
1618
+ * ```
1619
+ */
1620
+ selectable: _angular_core.InputSignal<boolean | undefined>;
1621
+ /**
1622
+ * Show a loading overlay on the grid.
1623
+ * Use this during initial data fetch or refresh operations.
1624
+ *
1625
+ * For row/cell loading states, access the grid element directly:
1626
+ * - `grid.setRowLoading(rowId, true/false)`
1627
+ * - `grid.setCellLoading(rowId, field, true/false)`
1628
+ *
1629
+ * @default false
1630
+ *
1631
+ * @example
1632
+ * ```html
1633
+ * <!-- Show loading during data fetch -->
1634
+ * <tbw-grid [loading]="isLoading" [rows]="rows" />
1635
+ * ```
1636
+ *
1637
+ * ```typescript
1638
+ * isLoading = true;
1639
+ *
1640
+ * ngOnInit() {
1641
+ * this.dataService.fetchData().subscribe(data => {
1642
+ * this.rows = data;
1643
+ * this.isLoading = false;
1644
+ * });
1645
+ * }
1646
+ * ```
1647
+ */
1648
+ loading: _angular_core.InputSignal<boolean | undefined>;
1649
+ /**
1650
+ * Angular-specific grid configuration that supports component classes for renderers/editors.
1651
+ *
1652
+ * Use this input when you want to specify Angular component classes directly in column configs.
1653
+ * Components must implement the appropriate interfaces:
1654
+ * - Renderers: `AngularCellRenderer<TRow, TValue>` - requires `value()` and `row()` signal inputs
1655
+ * - Editors: `AngularCellEditor<TRow, TValue>` - adds `commit` and `cancel` outputs
1656
+ *
1657
+ * The directive automatically processes component classes and converts them to grid-compatible
1658
+ * renderer/editor functions before applying to the grid.
1659
+ *
1660
+ * @example
1661
+ * ```typescript
1662
+ * // Component that implements AngularCellEditor
1663
+ * @Component({...})
1664
+ * export class BonusEditorComponent implements AngularCellEditor<Employee, number> {
1665
+ * value = input.required<number>();
1666
+ * row = input.required<Employee>();
1667
+ * commit = output<number>();
1668
+ * cancel = output<void>();
1669
+ * }
1670
+ *
1671
+ * // In your grid config
1672
+ * config: AngularGridConfig<Employee> = {
1673
+ * columns: [
1674
+ * { field: 'name', header: 'Name' },
1675
+ * { field: 'bonus', header: 'Bonus', editable: true, editor: BonusEditorComponent }
1676
+ * ]
1677
+ * };
1678
+ * ```
1679
+ *
1680
+ * ```html
1681
+ * <tbw-grid [angularConfig]="config" [rows]="employees"></tbw-grid>
1682
+ * ```
1683
+ */
1684
+ angularConfig: _angular_core.InputSignal<AngularGridConfig<any> | undefined>;
1685
+ /**
1686
+ * Enable cell/row/range selection.
1687
+ *
1688
+ * **Requires feature import:**
1689
+ * ```typescript
1690
+ * import '@toolbox-web/grid-angular/features/selection';
1691
+ * ```
1692
+ *
1693
+ * @example
1694
+ * ```html
1695
+ * <!-- Shorthand - just the mode -->
1696
+ * <tbw-grid [selection]="'range'" />
1697
+ *
1698
+ * <!-- Full config object -->
1699
+ * <tbw-grid [selection]="{ mode: 'range', checkbox: true }" />
1700
+ * ```
1701
+ */
1702
+ selection: _angular_core.InputSignal<"row" | "range" | "cell" | SelectionConfig<any> | undefined>;
1703
+ /**
1704
+ * Enable inline cell editing.
1705
+ *
1706
+ * **Requires feature import:**
1707
+ * ```typescript
1708
+ * import '@toolbox-web/grid-angular/features/editing';
1709
+ * ```
1710
+ *
1711
+ * @example
1712
+ * ```html
1713
+ * <!-- Enable with default trigger (dblclick) -->
1714
+ * <tbw-grid [editing]="true" />
1715
+ *
1716
+ * <!-- Specify trigger -->
1717
+ * <tbw-grid [editing]="'click'" />
1718
+ * <tbw-grid [editing]="'dblclick'" />
1719
+ * <tbw-grid [editing]="'manual'" />
1720
+ * ```
1721
+ */
1722
+ editing: _angular_core.InputSignal<boolean | "click" | "dblclick" | "manual" | undefined>;
1723
+ /**
1724
+ * Enable clipboard copy/paste. Requires selection to be enabled.
1725
+ *
1726
+ * **Requires feature import:**
1727
+ * ```typescript
1728
+ * import '@toolbox-web/grid-angular/features/clipboard';
1729
+ * ```
1730
+ *
1731
+ * @example
1732
+ * ```html
1733
+ * <tbw-grid [selection]="'range'" [clipboard]="true" />
1734
+ * ```
1735
+ */
1736
+ clipboard: _angular_core.InputSignal<boolean | ClipboardConfig | undefined>;
1737
+ /**
1738
+ * Enable right-click context menu.
1739
+ *
1740
+ * **Requires feature import:**
1741
+ * ```typescript
1742
+ * import '@toolbox-web/grid-angular/features/context-menu';
1743
+ * ```
1744
+ *
1745
+ * @example
1746
+ * ```html
1747
+ * <tbw-grid [contextMenu]="true" />
1748
+ * ```
1749
+ */
1750
+ contextMenu: _angular_core.InputSignal<boolean | ContextMenuConfig | undefined>;
1751
+ /**
1752
+ * Enable multi-column sorting.
1753
+ *
1754
+ * Multi-sort allows users to sort by multiple columns simultaneously.
1755
+ * For basic single-column sorting, columns with `sortable: true` work without this plugin.
1756
+ *
1757
+ * **Requires feature import:**
1758
+ * ```typescript
1759
+ * import '@toolbox-web/grid-angular/features/multi-sort';
1760
+ * ```
1761
+ *
1762
+ * @example
1763
+ * ```html
1764
+ * <!-- Enable multi-column sorting -->
1765
+ * <tbw-grid [multiSort]="true" />
1766
+ *
1767
+ * <!-- Limit to single column (uses plugin but restricts to 1 column) -->
1768
+ * <tbw-grid [multiSort]="'single'" />
1769
+ *
1770
+ * <!-- Full config -->
1771
+ * <tbw-grid [multiSort]="{ maxSortColumns: 3 }" />
1772
+ * ```
1773
+ */
1774
+ multiSort: _angular_core.InputSignal<boolean | "multi" | MultiSortConfig | "single" | undefined>;
1775
+ /**
1776
+ * @deprecated Use `[multiSort]` instead. Will be removed in a future version.
1777
+ *
1778
+ * Enable column sorting. This is an alias for `[multiSort]`.
1779
+ *
1780
+ * **Requires feature import:**
1781
+ * ```typescript
1782
+ * import '@toolbox-web/grid-angular/features/multi-sort';
1783
+ * ```
1784
+ */
1785
+ sorting: _angular_core.InputSignal<boolean | "multi" | MultiSortConfig | "single" | undefined>;
1786
+ /**
1787
+ * Enable column filtering.
1788
+ *
1789
+ * **Requires feature import:**
1790
+ * ```typescript
1791
+ * import '@toolbox-web/grid-angular/features/filtering';
1792
+ * ```
1793
+ *
1794
+ * @example
1795
+ * ```html
1796
+ * <tbw-grid [filtering]="true" />
1797
+ * <tbw-grid [filtering]="{ debounceMs: 200 }" />
1798
+ * ```
1799
+ */
1800
+ filtering: _angular_core.InputSignal<boolean | FilterConfig<any> | undefined>;
1801
+ /**
1802
+ * Enable column drag-to-reorder.
1803
+ *
1804
+ * **Requires feature import:**
1805
+ * ```typescript
1806
+ * import '@toolbox-web/grid-angular/features/reorder';
1807
+ * ```
1808
+ *
1809
+ * @example
1810
+ * ```html
1811
+ * <tbw-grid [reorder]="true" />
1812
+ * ```
1813
+ */
1814
+ reorder: _angular_core.InputSignal<boolean | ReorderConfig | undefined>;
1815
+ /**
1816
+ * Enable column visibility toggle panel.
1817
+ *
1818
+ * **Requires feature import:**
1819
+ * ```typescript
1820
+ * import '@toolbox-web/grid-angular/features/visibility';
1821
+ * ```
1822
+ *
1823
+ * @example
1824
+ * ```html
1825
+ * <tbw-grid [visibility]="true" />
1826
+ * ```
1827
+ */
1828
+ visibility: _angular_core.InputSignal<boolean | VisibilityConfig | undefined>;
1829
+ /**
1830
+ * Enable pinned/sticky columns.
1831
+ * Columns are pinned via the `sticky` column property.
1832
+ *
1833
+ * **Requires feature import:**
1834
+ * ```typescript
1835
+ * import '@toolbox-web/grid-angular/features/pinned-columns';
1836
+ * ```
1837
+ *
1838
+ * @example
1839
+ * ```html
1840
+ * <tbw-grid [pinnedColumns]="true" [columns]="[
1841
+ * { field: 'id', sticky: 'left' },
1842
+ * { field: 'name' },
1843
+ * { field: 'actions', sticky: 'right' }
1844
+ * ]" />
1845
+ * ```
1846
+ */
1847
+ pinnedColumns: _angular_core.InputSignal<boolean | undefined>;
1848
+ /**
1849
+ * Enable multi-level column headers (column groups).
1850
+ *
1851
+ * **Requires feature import:**
1852
+ * ```typescript
1853
+ * import '@toolbox-web/grid-angular/features/grouping-columns';
1854
+ * ```
1855
+ *
1856
+ * @example
1857
+ * ```html
1858
+ * <tbw-grid [groupingColumns]="{ columnGroups: [...] }" />
1859
+ * ```
1860
+ */
1861
+ groupingColumns: _angular_core.InputSignal<boolean | GroupingColumnsConfig | undefined>;
1862
+ /**
1863
+ * Enable horizontal column virtualization for wide grids.
1864
+ *
1865
+ * **Requires feature import:**
1866
+ * ```typescript
1867
+ * import '@toolbox-web/grid-angular/features/column-virtualization';
1868
+ * ```
1869
+ *
1870
+ * @example
1871
+ * ```html
1872
+ * <tbw-grid [columnVirtualization]="true" />
1873
+ * ```
1874
+ */
1875
+ columnVirtualization: _angular_core.InputSignal<boolean | ColumnVirtualizationConfig | undefined>;
1876
+ /**
1877
+ * Enable row drag-to-reorder.
1878
+ *
1879
+ * **Requires feature import:**
1880
+ * ```typescript
1881
+ * import '@toolbox-web/grid-angular/features/row-reorder';
1882
+ * ```
1883
+ *
1884
+ * @example
1885
+ * ```html
1886
+ * <tbw-grid [rowReorder]="true" />
1887
+ * ```
1888
+ */
1889
+ rowReorder: _angular_core.InputSignal<boolean | RowReorderConfig | undefined>;
1890
+ /**
1891
+ * Enable row grouping by field values.
1892
+ *
1893
+ * **Requires feature import:**
1894
+ * ```typescript
1895
+ * import '@toolbox-web/grid-angular/features/grouping-rows';
1896
+ * ```
1897
+ *
1898
+ * @example
1899
+ * ```html
1900
+ * <tbw-grid [groupingRows]="{ groupBy: ['department'] }" />
1901
+ * ```
1902
+ */
1903
+ groupingRows: _angular_core.InputSignal<GroupingRowsConfig | undefined>;
1904
+ /**
1905
+ * Enable pinned rows (aggregation/status bar).
1906
+ *
1907
+ * **Requires feature import:**
1908
+ * ```typescript
1909
+ * import '@toolbox-web/grid-angular/features/pinned-rows';
1910
+ * ```
1911
+ *
1912
+ * @example
1913
+ * ```html
1914
+ * <tbw-grid [pinnedRows]="{ bottom: [{ type: 'aggregation' }] }" />
1915
+ * ```
1916
+ */
1917
+ pinnedRows: _angular_core.InputSignal<boolean | PinnedRowsConfig | undefined>;
1918
+ /**
1919
+ * Enable hierarchical tree view.
1920
+ *
1921
+ * **Requires feature import:**
1922
+ * ```typescript
1923
+ * import '@toolbox-web/grid-angular/features/tree';
1924
+ * ```
1925
+ *
1926
+ * @example
1927
+ * ```html
1928
+ * <tbw-grid [tree]="{ childrenField: 'children' }" />
1929
+ * ```
1930
+ */
1931
+ tree: _angular_core.InputSignal<boolean | TreeConfig | undefined>;
1932
+ /**
1933
+ * Enable master-detail expandable rows.
1934
+ *
1935
+ * **Requires feature import:**
1936
+ * ```typescript
1937
+ * import '@toolbox-web/grid-angular/features/master-detail';
1938
+ * ```
1939
+ *
1940
+ * @example
1941
+ * ```html
1942
+ * <tbw-grid [masterDetail]="{ detailRenderer: detailFn }" />
1943
+ * ```
1944
+ */
1945
+ masterDetail: _angular_core.InputSignal<MasterDetailConfig | undefined>;
1946
+ /**
1947
+ * Enable responsive card layout for narrow viewports.
1948
+ *
1949
+ * **Requires feature import:**
1950
+ * ```typescript
1951
+ * import '@toolbox-web/grid-angular/features/responsive';
1952
+ * ```
1953
+ *
1954
+ * @example
1955
+ * ```html
1956
+ * <tbw-grid [responsive]="{ breakpoint: 768 }" />
1957
+ * ```
1958
+ */
1959
+ responsive: _angular_core.InputSignal<boolean | ResponsivePluginConfig<unknown> | undefined>;
1960
+ /**
1961
+ * Enable undo/redo for cell edits. Requires editing to be enabled.
1962
+ *
1963
+ * **Requires feature import:**
1964
+ * ```typescript
1965
+ * import '@toolbox-web/grid-angular/features/undo-redo';
1966
+ * ```
1967
+ *
1968
+ * @example
1969
+ * ```html
1970
+ * <tbw-grid [editing]="'dblclick'" [undoRedo]="true" />
1971
+ * ```
1972
+ */
1973
+ undoRedo: _angular_core.InputSignal<boolean | UndoRedoConfig | undefined>;
1974
+ /**
1975
+ * Enable CSV/JSON export functionality.
1976
+ *
1977
+ * **Requires feature import:**
1978
+ * ```typescript
1979
+ * import '@toolbox-web/grid-angular/features/export';
1980
+ * ```
1981
+ *
1982
+ * @example
1983
+ * ```html
1984
+ * <tbw-grid [export]="true" />
1985
+ * <tbw-grid [export]="{ filename: 'data.csv' }" />
1986
+ * ```
1987
+ */
1988
+ exportFeature: _angular_core.InputSignal<boolean | ExportConfig | undefined>;
1989
+ /**
1990
+ * Enable print functionality.
1991
+ *
1992
+ * **Requires feature import:**
1993
+ * ```typescript
1994
+ * import '@toolbox-web/grid-angular/features/print';
1995
+ * ```
1996
+ *
1997
+ * @example
1998
+ * ```html
1999
+ * <tbw-grid [print]="true" />
2000
+ * ```
2001
+ */
2002
+ print: _angular_core.InputSignal<boolean | PrintConfig | undefined>;
2003
+ /**
2004
+ * Enable pivot table functionality.
2005
+ *
2006
+ * **Requires feature import:**
2007
+ * ```typescript
2008
+ * import '@toolbox-web/grid-angular/features/pivot';
2009
+ * ```
2010
+ *
2011
+ * @example
2012
+ * ```html
2013
+ * <tbw-grid [pivot]="{ rowFields: ['category'], valueField: 'sales' }" />
2014
+ * ```
2015
+ */
2016
+ pivot: _angular_core.InputSignal<PivotConfig | undefined>;
2017
+ /**
2018
+ * Enable server-side data operations.
2019
+ *
2020
+ * **Requires feature import:**
2021
+ * ```typescript
2022
+ * import '@toolbox-web/grid-angular/features/server-side';
2023
+ * ```
2024
+ *
2025
+ * @example
2026
+ * ```html
2027
+ * <tbw-grid [serverSide]="{ dataSource: fetchDataFn }" />
2028
+ * ```
2029
+ */
2030
+ serverSide: _angular_core.InputSignal<ServerSideConfig | undefined>;
2031
+ /**
2032
+ * Emitted when a cell is clicked.
2033
+ *
2034
+ * @example
2035
+ * ```html
2036
+ * <tbw-grid (cellClick)="onCellClick($event)">...</tbw-grid>
2037
+ * ```
2038
+ */
2039
+ cellClick: _angular_core.OutputEmitterRef<CellClickDetail<any>>;
2040
+ /**
2041
+ * Emitted when a row is clicked.
2042
+ *
2043
+ * @example
2044
+ * ```html
2045
+ * <tbw-grid (rowClick)="onRowClick($event)">...</tbw-grid>
2046
+ * ```
2047
+ */
2048
+ rowClick: _angular_core.OutputEmitterRef<RowClickDetail<any>>;
2049
+ /**
2050
+ * Emitted when a cell is activated (Enter key or double-click).
2051
+ *
2052
+ * @example
2053
+ * ```html
2054
+ * <tbw-grid (cellActivate)="onCellActivate($event)">...</tbw-grid>
2055
+ * ```
2056
+ */
2057
+ cellActivate: _angular_core.OutputEmitterRef<CellActivateDetail<any>>;
2058
+ /**
2059
+ * Emitted when a cell value changes (before commit).
2060
+ *
2061
+ * @example
2062
+ * ```html
2063
+ * <tbw-grid (cellChange)="onCellChange($event)">...</tbw-grid>
2064
+ * ```
2065
+ */
2066
+ cellChange: _angular_core.OutputEmitterRef<CellChangeDetail<any>>;
2067
+ /**
2068
+ * Emitted when a cell value is committed (inline editing).
2069
+ * Provides the row, field, new value, and change tracking information.
2070
+ *
2071
+ * @example
2072
+ * ```html
2073
+ * <tbw-grid (cellCommit)="onCellCommit($event)">...</tbw-grid>
2074
+ * ```
2075
+ *
2076
+ * ```typescript
2077
+ * onCellCommit(event: CellCommitEvent) {
2078
+ * console.log(`Changed ${event.field} to ${event.value} in row ${event.rowIndex}`);
2079
+ * }
2080
+ * ```
2081
+ */
2082
+ cellCommit: _angular_core.OutputEmitterRef<CellCommitEvent<unknown, unknown>>;
2083
+ /**
2084
+ * Emitted when a row's values are committed (bulk/row editing).
2085
+ * Provides the row data and change tracking information.
2086
+ *
2087
+ * @example
2088
+ * ```html
2089
+ * <tbw-grid (rowCommit)="onRowCommit($event)">...</tbw-grid>
2090
+ * ```
2091
+ */
2092
+ rowCommit: _angular_core.OutputEmitterRef<RowCommitEvent<unknown>>;
2093
+ /**
2094
+ * Emitted when the changed rows are reset.
2095
+ *
2096
+ * @example
2097
+ * ```html
2098
+ * <tbw-grid (changedRowsReset)="onChangedRowsReset($event)">...</tbw-grid>
2099
+ * ```
2100
+ */
2101
+ changedRowsReset: _angular_core.OutputEmitterRef<ChangedRowsResetDetail<unknown>>;
2102
+ /**
2103
+ * Emitted when sort state changes.
2104
+ *
2105
+ * @example
2106
+ * ```html
2107
+ * <tbw-grid (sortChange)="onSortChange($event)">...</tbw-grid>
2108
+ * ```
2109
+ */
2110
+ sortChange: _angular_core.OutputEmitterRef<SortChangeDetail>;
2111
+ /**
2112
+ * Emitted when filter values change.
2113
+ *
2114
+ * @example
2115
+ * ```html
2116
+ * <tbw-grid (filterChange)="onFilterChange($event)">...</tbw-grid>
2117
+ * ```
2118
+ */
2119
+ filterChange: _angular_core.OutputEmitterRef<FilterChangeDetail>;
2120
+ /**
2121
+ * Emitted when a column is resized.
2122
+ *
2123
+ * @example
2124
+ * ```html
2125
+ * <tbw-grid (columnResize)="onColumnResize($event)">...</tbw-grid>
2126
+ * ```
2127
+ */
2128
+ columnResize: _angular_core.OutputEmitterRef<ColumnResizeDetail>;
2129
+ /**
2130
+ * Emitted when a column is moved via drag-and-drop.
2131
+ *
2132
+ * @example
2133
+ * ```html
2134
+ * <tbw-grid (columnMove)="onColumnMove($event)">...</tbw-grid>
2135
+ * ```
2136
+ */
2137
+ columnMove: _angular_core.OutputEmitterRef<ColumnMoveDetail>;
2138
+ /**
2139
+ * Emitted when column visibility changes.
2140
+ *
2141
+ * @example
2142
+ * ```html
2143
+ * <tbw-grid (columnVisibility)="onColumnVisibility($event)">...</tbw-grid>
2144
+ * ```
2145
+ */
2146
+ columnVisibility: _angular_core.OutputEmitterRef<ColumnVisibilityDetail>;
2147
+ /**
2148
+ * Emitted when column state changes (resize, reorder, visibility).
2149
+ *
2150
+ * @example
2151
+ * ```html
2152
+ * <tbw-grid (columnStateChange)="onColumnStateChange($event)">...</tbw-grid>
2153
+ * ```
2154
+ */
2155
+ columnStateChange: _angular_core.OutputEmitterRef<GridColumnState>;
2156
+ /**
2157
+ * Emitted when selection changes.
2158
+ *
2159
+ * @example
2160
+ * ```html
2161
+ * <tbw-grid (selectionChange)="onSelectionChange($event)">...</tbw-grid>
2162
+ * ```
2163
+ */
2164
+ selectionChange: _angular_core.OutputEmitterRef<SelectionChangeDetail>;
2165
+ /**
2166
+ * Emitted when a row is moved via drag-and-drop.
2167
+ *
2168
+ * @example
2169
+ * ```html
2170
+ * <tbw-grid (rowMove)="onRowMove($event)">...</tbw-grid>
2171
+ * ```
2172
+ */
2173
+ rowMove: _angular_core.OutputEmitterRef<RowMoveDetail<any>>;
2174
+ /**
2175
+ * Emitted when a group is expanded or collapsed.
2176
+ *
2177
+ * @example
2178
+ * ```html
2179
+ * <tbw-grid (groupToggle)="onGroupToggle($event)">...</tbw-grid>
2180
+ * ```
2181
+ */
2182
+ groupToggle: _angular_core.OutputEmitterRef<GroupToggleDetail>;
2183
+ /**
2184
+ * Emitted when a tree node is expanded.
2185
+ *
2186
+ * @example
2187
+ * ```html
2188
+ * <tbw-grid (treeExpand)="onTreeExpand($event)">...</tbw-grid>
2189
+ * ```
2190
+ */
2191
+ treeExpand: _angular_core.OutputEmitterRef<TreeExpandDetail<any>>;
2192
+ /**
2193
+ * Emitted when a detail panel is expanded or collapsed.
2194
+ *
2195
+ * @example
2196
+ * ```html
2197
+ * <tbw-grid (detailExpand)="onDetailExpand($event)">...</tbw-grid>
2198
+ * ```
2199
+ */
2200
+ detailExpand: _angular_core.OutputEmitterRef<DetailExpandDetail>;
2201
+ /**
2202
+ * Emitted when responsive mode changes (table ↔ card).
2203
+ *
2204
+ * @example
2205
+ * ```html
2206
+ * <tbw-grid (responsiveChange)="onResponsiveChange($event)">...</tbw-grid>
2207
+ * ```
2208
+ */
2209
+ responsiveChange: _angular_core.OutputEmitterRef<ResponsiveChangeDetail>;
2210
+ /**
2211
+ * Emitted when cells are copied to clipboard.
2212
+ *
2213
+ * @example
2214
+ * ```html
2215
+ * <tbw-grid (copy)="onCopy($event)">...</tbw-grid>
2216
+ * ```
2217
+ */
2218
+ copy: _angular_core.OutputEmitterRef<CopyDetail>;
2219
+ /**
2220
+ * Emitted when cells are pasted from clipboard.
2221
+ *
2222
+ * @example
2223
+ * ```html
2224
+ * <tbw-grid (paste)="onPaste($event)">...</tbw-grid>
2225
+ * ```
2226
+ */
2227
+ paste: _angular_core.OutputEmitterRef<PasteDetail>;
2228
+ /**
2229
+ * Emitted when undo/redo is performed.
2230
+ *
2231
+ * @example
2232
+ * ```html
2233
+ * <tbw-grid (undoRedoAction)="onUndoRedo($event)">...</tbw-grid>
2234
+ * ```
2235
+ */
2236
+ undoRedoAction: _angular_core.OutputEmitterRef<UndoRedoDetail>;
2237
+ /**
2238
+ * Emitted when export completes.
2239
+ *
2240
+ * @example
2241
+ * ```html
2242
+ * <tbw-grid (exportComplete)="onExportComplete($event)">...</tbw-grid>
2243
+ * ```
2244
+ */
2245
+ exportComplete: _angular_core.OutputEmitterRef<ExportCompleteDetail>;
2246
+ /**
2247
+ * Emitted when print starts.
2248
+ *
2249
+ * @example
2250
+ * ```html
2251
+ * <tbw-grid (printStart)="onPrintStart($event)">...</tbw-grid>
2252
+ * ```
2253
+ */
2254
+ printStart: _angular_core.OutputEmitterRef<PrintStartDetail>;
2255
+ /**
2256
+ * Emitted when print completes.
2257
+ *
2258
+ * @example
2259
+ * ```html
2260
+ * <tbw-grid (printComplete)="onPrintComplete($event)">...</tbw-grid>
2261
+ * ```
2262
+ */
2263
+ printComplete: _angular_core.OutputEmitterRef<PrintCompleteDetail>;
2264
+ private readonly eventOutputMap;
2265
+ private eventListeners;
2266
+ ngOnInit(): void;
2267
+ /**
2268
+ * Sets up event listeners for all outputs using the eventOutputMap.
2269
+ */
2270
+ private setupEventListeners;
2271
+ /**
2272
+ * Creates plugins from feature inputs.
2273
+ * Uses the feature registry to allow tree-shaking - only imported features are bundled.
2274
+ * Returns the array of created plugins (doesn't modify grid).
2275
+ */
2276
+ private createFeaturePlugins;
2277
+ ngAfterContentInit(): void;
2278
+ /**
2279
+ * Registers custom styles into the grid.
2280
+ * Uses the grid's registerStyles() API for clean encapsulation.
2281
+ */
2282
+ private registerCustomStyles;
2283
+ /**
2284
+ * Configures the MasterDetailPlugin after Angular templates are registered.
2285
+ * - If plugin exists: refresh its detail renderer
2286
+ * - If plugin doesn't exist but <tbw-grid-detail> is present: dynamically import and add the plugin
2287
+ */
2288
+ private configureMasterDetail;
2289
+ /**
2290
+ * Configures the ResponsivePlugin with Angular template-based card renderer.
2291
+ * - If plugin exists: updates its cardRenderer configuration
2292
+ * - If plugin doesn't exist but <tbw-grid-responsive-card> is present: logs a warning
2293
+ */
2294
+ private configureResponsiveCard;
2295
+ ngOnDestroy(): void;
2296
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<Grid, never>;
2297
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<Grid, "tbw-grid", never, { "customStyles": { "alias": "customStyles"; "required": false; "isSignal": true; }; "sortable": { "alias": "sortable"; "required": false; "isSignal": true; }; "filterable": { "alias": "filterable"; "required": false; "isSignal": true; }; "selectable": { "alias": "selectable"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "angularConfig": { "alias": "angularConfig"; "required": false; "isSignal": true; }; "selection": { "alias": "selection"; "required": false; "isSignal": true; }; "editing": { "alias": "editing"; "required": false; "isSignal": true; }; "clipboard": { "alias": "clipboard"; "required": false; "isSignal": true; }; "contextMenu": { "alias": "contextMenu"; "required": false; "isSignal": true; }; "multiSort": { "alias": "multiSort"; "required": false; "isSignal": true; }; "sorting": { "alias": "sorting"; "required": false; "isSignal": true; }; "filtering": { "alias": "filtering"; "required": false; "isSignal": true; }; "reorder": { "alias": "reorder"; "required": false; "isSignal": true; }; "visibility": { "alias": "visibility"; "required": false; "isSignal": true; }; "pinnedColumns": { "alias": "pinnedColumns"; "required": false; "isSignal": true; }; "groupingColumns": { "alias": "groupingColumns"; "required": false; "isSignal": true; }; "columnVirtualization": { "alias": "columnVirtualization"; "required": false; "isSignal": true; }; "rowReorder": { "alias": "rowReorder"; "required": false; "isSignal": true; }; "groupingRows": { "alias": "groupingRows"; "required": false; "isSignal": true; }; "pinnedRows": { "alias": "pinnedRows"; "required": false; "isSignal": true; }; "tree": { "alias": "tree"; "required": false; "isSignal": true; }; "masterDetail": { "alias": "masterDetail"; "required": false; "isSignal": true; }; "responsive": { "alias": "responsive"; "required": false; "isSignal": true; }; "undoRedo": { "alias": "undoRedo"; "required": false; "isSignal": true; }; "exportFeature": { "alias": "exportFeature"; "required": false; "isSignal": true; }; "print": { "alias": "print"; "required": false; "isSignal": true; }; "pivot": { "alias": "pivot"; "required": false; "isSignal": true; }; "serverSide": { "alias": "serverSide"; "required": false; "isSignal": true; }; }, { "cellClick": "cellClick"; "rowClick": "rowClick"; "cellActivate": "cellActivate"; "cellChange": "cellChange"; "cellCommit": "cellCommit"; "rowCommit": "rowCommit"; "changedRowsReset": "changedRowsReset"; "sortChange": "sortChange"; "filterChange": "filterChange"; "columnResize": "columnResize"; "columnMove": "columnMove"; "columnVisibility": "columnVisibility"; "columnStateChange": "columnStateChange"; "selectionChange": "selectionChange"; "rowMove": "rowMove"; "groupToggle": "groupToggle"; "treeExpand": "treeExpand"; "detailExpand": "detailExpand"; "responsiveChange": "responsiveChange"; "copy": "copy"; "paste": "paste"; "undoRedoAction": "undoRedoAction"; "exportComplete": "exportComplete"; "printStart": "printStart"; "printComplete": "printComplete"; }, never, never, true, never>;
2298
+ }
2299
+
2300
+ /**
2301
+ * Context type for structural directives with `any` defaults.
2302
+ * This provides better ergonomics in templates without requiring explicit type annotations.
2303
+ *
2304
+ * @internal Use `GridCellContext` in application code for stricter typing.
2305
+ */
2306
+ interface StructuralCellContext<TValue = any, TRow = any> {
2307
+ /** The cell value for this column */
2308
+ $implicit: TValue;
2309
+ /** The cell value (explicit binding) */
2310
+ value: TValue;
2311
+ /** The full row data object */
2312
+ row: TRow;
2313
+ /** The column configuration */
2314
+ column: any;
2315
+ }
2316
+ /**
2317
+ * Context type for structural editor directives with `any` defaults.
2318
+ * This provides better ergonomics in templates without requiring explicit type annotations.
2319
+ *
2320
+ * @internal Use `GridEditorContext` in application code for stricter typing.
2321
+ */
2322
+ interface StructuralEditorContext<TValue = any, TRow = any> {
2323
+ /** The cell value for this column */
2324
+ $implicit: TValue;
2325
+ /** The cell value (explicit binding) */
2326
+ value: TValue;
2327
+ /** The full row data object */
2328
+ row: TRow;
2329
+ /** The column configuration */
2330
+ column: any;
2331
+ /**
2332
+ * Callback function to commit the edited value.
2333
+ */
2334
+ onCommit: (value: TValue) => void;
2335
+ /**
2336
+ * Callback function to cancel editing.
2337
+ */
2338
+ onCancel: () => void;
2339
+ /**
2340
+ * The FormControl for this cell, if the grid is bound to a FormArray with FormGroups.
2341
+ *
2342
+ * Returns `undefined` if:
2343
+ * - The grid is not bound to a FormArray
2344
+ * - The FormArray doesn't contain FormGroups
2345
+ * - The field doesn't exist in the FormGroup
2346
+ */
2347
+ control?: AbstractControl;
2348
+ }
2349
+ /**
2350
+ * Structural directive for cell view rendering.
2351
+ *
2352
+ * This provides a cleaner syntax for defining custom cell renderers without
2353
+ * the nested `<tbw-grid-column-view>` and `<ng-template>` boilerplate.
2354
+ *
2355
+ * ## Usage
2356
+ *
2357
+ * ```html
2358
+ * <!-- Instead of this verbose syntax: -->
2359
+ * <tbw-grid-column field="status">
2360
+ * <tbw-grid-column-view>
2361
+ * <ng-template let-value let-row="row">
2362
+ * <app-status-badge [value]="value" />
2363
+ * </ng-template>
2364
+ * </tbw-grid-column-view>
2365
+ * </tbw-grid-column>
2366
+ *
2367
+ * <!-- Use this cleaner syntax: -->
2368
+ * <tbw-grid-column field="status">
2369
+ * <app-status-badge *tbwRenderer="let value; row as row" [value]="value" />
2370
+ * </tbw-grid-column>
2371
+ * ```
2372
+ *
2373
+ * ## Template Context
2374
+ *
2375
+ * The structural directive provides the same context as `GridColumnView`:
2376
+ * - `$implicit` / `value`: The cell value (use `let value` or `let-value`)
2377
+ * - `row`: The full row data object (use `row as row` or `let-row="row"`)
2378
+ * - `column`: The column configuration
2379
+ *
2380
+ * ## Import
2381
+ *
2382
+ * ```typescript
2383
+ * import { TbwRenderer } from '@toolbox-web/grid-angular';
2384
+ *
2385
+ * @Component({
2386
+ * imports: [TbwRenderer],
2387
+ * // ...
2388
+ * })
2389
+ * ```
2390
+ */
2391
+ declare class TbwRenderer implements OnDestroy {
2392
+ private template;
2393
+ private elementRef;
2394
+ private columnElement;
2395
+ constructor();
2396
+ private registerTemplate;
2397
+ ngOnDestroy(): void;
2398
+ /**
2399
+ * Static type guard for template context.
2400
+ * Uses `any` defaults for ergonomic template usage.
2401
+ */
2402
+ static ngTemplateContextGuard(dir: TbwRenderer, ctx: unknown): ctx is StructuralCellContext;
2403
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<TbwRenderer, never>;
2404
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TbwRenderer, "[tbwRenderer]", never, {}, {}, never, never, true, never>;
2405
+ }
2406
+ /**
2407
+ * Structural directive for cell editor rendering.
2408
+ *
2409
+ * This provides a cleaner syntax for defining custom cell editors without
2410
+ * the nested `<tbw-grid-column-editor>` and `<ng-template>` boilerplate.
2411
+ *
2412
+ * ## Usage
2413
+ *
2414
+ * ```html
2415
+ * <!-- Instead of this verbose syntax: -->
2416
+ * <tbw-grid-column field="status">
2417
+ * <tbw-grid-column-editor>
2418
+ * <ng-template let-value let-onCommit="onCommit" let-onCancel="onCancel">
2419
+ * <app-status-editor [value]="value" (commit)="onCommit($event)" (cancel)="onCancel()" />
2420
+ * </ng-template>
2421
+ * </tbw-grid-column-editor>
2422
+ * </tbw-grid-column>
2423
+ *
2424
+ * <!-- Use this cleaner syntax (with auto-wiring - no explicit bindings needed!): -->
2425
+ * <tbw-grid-column field="status">
2426
+ * <app-status-editor *tbwEditor="let value" [value]="value" />
2427
+ * </tbw-grid-column>
2428
+ * ```
2429
+ *
2430
+ * ## Template Context
2431
+ *
2432
+ * The structural directive provides the same context as `GridColumnEditor`:
2433
+ * - `$implicit` / `value`: The cell value
2434
+ * - `row`: The full row data object
2435
+ * - `column`: The column configuration
2436
+ * - `onCommit`: Callback function to commit the new value (optional - auto-wired if component emits `commit` event)
2437
+ * - `onCancel`: Callback function to cancel editing (optional - auto-wired if component emits `cancel` event)
2438
+ *
2439
+ * ## Import
2440
+ *
2441
+ * ```typescript
2442
+ * import { TbwEditor } from '@toolbox-web/grid-angular';
2443
+ *
2444
+ * @Component({
2445
+ * imports: [TbwEditor],
2446
+ * // ...
2447
+ * })
2448
+ * ```
2449
+ */
2450
+ declare class TbwEditor implements OnDestroy {
2451
+ private template;
2452
+ private elementRef;
2453
+ private columnElement;
2454
+ constructor();
2455
+ private registerTemplate;
2456
+ ngOnDestroy(): void;
2457
+ /**
2458
+ * Static type guard for template context.
2459
+ * Uses `any` defaults for ergonomic template usage.
2460
+ */
2461
+ static ngTemplateContextGuard(dir: TbwEditor, ctx: unknown): ctx is StructuralEditorContext;
2462
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<TbwEditor, never>;
2463
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TbwEditor, "[tbwEditor]", never, {}, {}, never, never, true, never>;
2464
+ }
2465
+
2466
+ export { AngularGridAdapter, BaseGridEditor, GRID_ICONS, GRID_TYPE_DEFAULTS, Grid, GridColumnEditor, GridColumnView, GridDetailView, GridFormArray, GridIconRegistry, GridResponsiveCard, GridToolPanel, GridTypeRegistry, TbwEditor as TbwCellEditor, TbwRenderer as TbwCellView, TbwEditor, TbwRenderer, clearFeatureRegistry, createPluginFromFeature, getFeatureFactory, getFormArrayContext, getRegisteredFeatures, injectGrid, isComponentClass, isFeatureRegistered, provideGridIcons, provideGridTypeDefaults, registerFeature };
2467
+ export type { AngularCellEditor, AngularCellRenderer, AngularColumnConfig, AngularGridConfig, AngularTypeDefault, CellCommitEvent, ExportMethods, FeatureName, FormArrayContext, GridCellContext, GridDetailContext, GridEditorContext, GridResponsiveCardContext, GridToolPanelContext, InjectGridReturn, PluginFactory, RowCommitEvent, SelectionMethods, StructuralCellContext, StructuralEditorContext };
2468
+ //# sourceMappingURL=toolbox-web-grid-angular.d.ts.map