@toolbox-web/grid-angular 0.16.2 → 0.18.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 (63) hide show
  1. package/README.md +130 -2
  2. package/fesm2022/toolbox-web-grid-angular-features-clipboard.mjs +1 -8
  3. package/fesm2022/toolbox-web-grid-angular-features-clipboard.mjs.map +1 -1
  4. package/fesm2022/toolbox-web-grid-angular-features-column-virtualization.mjs +1 -8
  5. package/fesm2022/toolbox-web-grid-angular-features-column-virtualization.mjs.map +1 -1
  6. package/fesm2022/toolbox-web-grid-angular-features-context-menu.mjs +1 -8
  7. package/fesm2022/toolbox-web-grid-angular-features-context-menu.mjs.map +1 -1
  8. package/fesm2022/toolbox-web-grid-angular-features-editing.mjs +1 -13
  9. package/fesm2022/toolbox-web-grid-angular-features-editing.mjs.map +1 -1
  10. package/fesm2022/toolbox-web-grid-angular-features-export.mjs +1 -8
  11. package/fesm2022/toolbox-web-grid-angular-features-export.mjs.map +1 -1
  12. package/fesm2022/toolbox-web-grid-angular-features-filtering.mjs +1 -8
  13. package/fesm2022/toolbox-web-grid-angular-features-filtering.mjs.map +1 -1
  14. package/fesm2022/toolbox-web-grid-angular-features-grouping-columns.mjs +1 -8
  15. package/fesm2022/toolbox-web-grid-angular-features-grouping-columns.mjs.map +1 -1
  16. package/fesm2022/toolbox-web-grid-angular-features-grouping-rows.mjs +1 -5
  17. package/fesm2022/toolbox-web-grid-angular-features-grouping-rows.mjs.map +1 -1
  18. package/fesm2022/toolbox-web-grid-angular-features-master-detail.mjs +1 -5
  19. package/fesm2022/toolbox-web-grid-angular-features-master-detail.mjs.map +1 -1
  20. package/fesm2022/toolbox-web-grid-angular-features-multi-sort.mjs +1 -14
  21. package/fesm2022/toolbox-web-grid-angular-features-multi-sort.mjs.map +1 -1
  22. package/fesm2022/toolbox-web-grid-angular-features-pinned-columns.mjs +1 -5
  23. package/fesm2022/toolbox-web-grid-angular-features-pinned-columns.mjs.map +1 -1
  24. package/fesm2022/toolbox-web-grid-angular-features-pinned-rows.mjs +1 -8
  25. package/fesm2022/toolbox-web-grid-angular-features-pinned-rows.mjs.map +1 -1
  26. package/fesm2022/toolbox-web-grid-angular-features-pivot.mjs +1 -5
  27. package/fesm2022/toolbox-web-grid-angular-features-pivot.mjs.map +1 -1
  28. package/fesm2022/toolbox-web-grid-angular-features-print.mjs +1 -8
  29. package/fesm2022/toolbox-web-grid-angular-features-print.mjs.map +1 -1
  30. package/fesm2022/toolbox-web-grid-angular-features-reorder-columns.mjs +21 -0
  31. package/fesm2022/toolbox-web-grid-angular-features-reorder-columns.mjs.map +1 -0
  32. package/fesm2022/toolbox-web-grid-angular-features-reorder-rows.mjs +21 -0
  33. package/fesm2022/toolbox-web-grid-angular-features-reorder-rows.mjs.map +1 -0
  34. package/fesm2022/toolbox-web-grid-angular-features-reorder.mjs +3 -20
  35. package/fesm2022/toolbox-web-grid-angular-features-reorder.mjs.map +1 -1
  36. package/fesm2022/toolbox-web-grid-angular-features-responsive.mjs +1 -8
  37. package/fesm2022/toolbox-web-grid-angular-features-responsive.mjs.map +1 -1
  38. package/fesm2022/toolbox-web-grid-angular-features-row-reorder.mjs +3 -20
  39. package/fesm2022/toolbox-web-grid-angular-features-row-reorder.mjs.map +1 -1
  40. package/fesm2022/toolbox-web-grid-angular-features-selection.mjs +1 -10
  41. package/fesm2022/toolbox-web-grid-angular-features-selection.mjs.map +1 -1
  42. package/fesm2022/toolbox-web-grid-angular-features-server-side.mjs +1 -5
  43. package/fesm2022/toolbox-web-grid-angular-features-server-side.mjs.map +1 -1
  44. package/fesm2022/toolbox-web-grid-angular-features-tree.mjs +1 -8
  45. package/fesm2022/toolbox-web-grid-angular-features-tree.mjs.map +1 -1
  46. package/fesm2022/toolbox-web-grid-angular-features-undo-redo.mjs +1 -8
  47. package/fesm2022/toolbox-web-grid-angular-features-undo-redo.mjs.map +1 -1
  48. package/fesm2022/toolbox-web-grid-angular-features-visibility.mjs +1 -8
  49. package/fesm2022/toolbox-web-grid-angular-features-visibility.mjs.map +1 -1
  50. package/fesm2022/toolbox-web-grid-angular.mjs +291 -117
  51. package/fesm2022/toolbox-web-grid-angular.mjs.map +1 -1
  52. package/package.json +9 -1
  53. package/types/toolbox-web-grid-angular-features-export.d.ts.map +1 -1
  54. package/types/toolbox-web-grid-angular-features-filtering.d.ts.map +1 -1
  55. package/types/toolbox-web-grid-angular-features-print.d.ts.map +1 -1
  56. package/types/toolbox-web-grid-angular-features-reorder-columns.d.ts +3 -0
  57. package/types/toolbox-web-grid-angular-features-reorder-columns.d.ts.map +1 -0
  58. package/types/toolbox-web-grid-angular-features-reorder-rows.d.ts +3 -0
  59. package/types/toolbox-web-grid-angular-features-reorder-rows.d.ts.map +1 -0
  60. package/types/toolbox-web-grid-angular-features-selection.d.ts.map +1 -1
  61. package/types/toolbox-web-grid-angular-features-undo-redo.d.ts.map +1 -1
  62. package/types/toolbox-web-grid-angular.d.ts +131 -79
  63. package/types/toolbox-web-grid-angular.d.ts.map +1 -1
package/README.md CHANGED
@@ -75,6 +75,132 @@ export class MyGridComponent {
75
75
  }
76
76
  ```
77
77
 
78
+ ## Enabling Features
79
+
80
+ Features are enabled using **declarative inputs** with **side-effect imports**. This gives you the best of both worlds: clean Angular templates and tree-shakeable bundles.
81
+
82
+ ### How It Works
83
+
84
+ 1. **Import the feature** — A side-effect import registers the feature factory
85
+ 2. **Use the input** — The `Grid` directive detects the input and creates the plugin instance
86
+
87
+ ```typescript
88
+ // 1. Import features you need (once, typically in the component file)
89
+ import '@toolbox-web/grid-angular/features/selection';
90
+ import '@toolbox-web/grid-angular/features/sorting';
91
+ import '@toolbox-web/grid-angular/features/filtering';
92
+
93
+ // 2. Use declarative inputs — no manual plugin instantiation!
94
+ @Component({
95
+ imports: [Grid],
96
+ template: `
97
+ <tbw-grid
98
+ [rows]="rows"
99
+ [columns]="columns"
100
+ [selection]="'range'"
101
+ [sorting]="'multi'"
102
+ [filtering]="true"
103
+ style="height: 400px; display: block;">
104
+ </tbw-grid>
105
+ `,
106
+ })
107
+ ```
108
+
109
+ ### Why Side-Effect Imports?
110
+
111
+ - **Tree-shakeable** — Only the features you import are bundled
112
+ - **Synchronous** — No loading states, no HTTP requests, no spinners
113
+ - **Type-safe** — Full TypeScript support for feature inputs
114
+ - **Clean templates** — No `plugins: [new SelectionPlugin({ mode: 'range' })]` boilerplate
115
+
116
+ ### Available Features
117
+
118
+ Import from `@toolbox-web/grid-angular/features/<name>`:
119
+
120
+ | Feature | Input | Example |
121
+ | ----------------------- | ---------------------- | ------------------------------------------------------------------------ |
122
+ | `selection` | `[selection]` | `[selection]="'range'"` or `[selection]="{ mode: 'row', checkbox: true }"` |
123
+ | `sorting` | `[sorting]` | `[sorting]="'multi'"` or `[sorting]="{ maxSortLevels: 3 }"` |
124
+ | `filtering` | `[filtering]` | `[filtering]="true"` or `[filtering]="{ debounceMs: 200 }"` |
125
+ | `editing` | `[editing]` | `[editing]="true"` or `[editing]="'dblclick'"` |
126
+ | `clipboard` | `[clipboard]` | `[clipboard]="true"` (requires selection) |
127
+ | `undo-redo` | `[undoRedo]` | `[undoRedo]="true"` (requires editing) |
128
+ | `context-menu` | `[contextMenu]` | `[contextMenu]="true"` |
129
+ | `reorder` | `[reorder]` | `[reorder]="true"` (column drag-to-reorder) |
130
+ | `row-reorder` | `[rowReorder]` | `[rowReorder]="true"` (row drag-to-reorder) |
131
+ | `visibility` | `[visibility]` | `[visibility]="true"` (column visibility panel) |
132
+ | `pinned-columns` | `[pinnedColumns]` | `[pinnedColumns]="true"` |
133
+ | `pinned-rows` | `[pinnedRows]` | `[pinnedRows]="true"` |
134
+ | `grouping-columns` | `[groupingColumns]` | `[groupingColumns]="true"` |
135
+ | `grouping-rows` | `[groupingRows]` | `[groupingRows]="{ groupBy: 'department' }"` |
136
+ | `tree` | `[tree]` | `[tree]="{ childrenField: 'children' }"` |
137
+ | `column-virtualization` | `[columnVirtualization]` | `[columnVirtualization]="true"` |
138
+ | `export` | `[export]` | `[export]="true"` |
139
+ | `print` | `[print]` | `[print]="true"` |
140
+ | `responsive` | `[responsive]` | `[responsive]="true"` (card layout on mobile) |
141
+ | `master-detail` | `[masterDetail]` | `[masterDetail]="true"` (use with `<tbw-grid-detail>`) |
142
+ | `pivot` | `[pivot]` | `[pivot]="{ rowFields: [...], columnFields: [...] }"` |
143
+ | `server-side` | `[serverSide]` | `[serverSide]="{ ... }"` |
144
+
145
+ ### Import All Features
146
+
147
+ For prototyping or when bundle size isn't critical, import all features at once:
148
+
149
+ ```typescript
150
+ // Import all features (larger bundle)
151
+ import '@toolbox-web/grid-angular/features';
152
+ ```
153
+
154
+ ### Full Example
155
+
156
+ ```typescript
157
+ import '@toolbox-web/grid-angular/features/selection';
158
+ import '@toolbox-web/grid-angular/features/editing';
159
+ import '@toolbox-web/grid-angular/features/filtering';
160
+ import '@toolbox-web/grid-angular/features/sorting';
161
+ import '@toolbox-web/grid-angular/features/clipboard';
162
+
163
+ import { Component } from '@angular/core';
164
+ import { Grid } from '@toolbox-web/grid-angular';
165
+ import type { ColumnConfig } from '@toolbox-web/grid';
166
+
167
+ interface Employee {
168
+ id: number;
169
+ name: string;
170
+ department: string;
171
+ salary: number;
172
+ }
173
+
174
+ @Component({
175
+ imports: [Grid],
176
+ template: `
177
+ <tbw-grid
178
+ [rows]="employees"
179
+ [columns]="columns"
180
+ [selection]="'range'"
181
+ [sorting]="'multi'"
182
+ [editing]="'dblclick'"
183
+ [filtering]="true"
184
+ [clipboard]="true"
185
+ style="height: 400px; display: block;">
186
+ </tbw-grid>
187
+ `,
188
+ })
189
+ export class EmployeeGridComponent {
190
+ employees: Employee[] = [
191
+ { id: 1, name: 'Alice', department: 'Engineering', salary: 95000 },
192
+ { id: 2, name: 'Bob', department: 'Marketing', salary: 75000 },
193
+ ];
194
+
195
+ columns: ColumnConfig<Employee>[] = [
196
+ { field: 'id', header: 'ID', width: 60 },
197
+ { field: 'name', header: 'Name', editable: true },
198
+ { field: 'department', header: 'Department', editable: true },
199
+ { field: 'salary', header: 'Salary', type: 'number' },
200
+ ];
201
+ }
202
+ ```
203
+
78
204
  ## Structural Directives (Recommended)
79
205
 
80
206
  The cleanest way to define custom renderers and editors is with structural directives. These provide a concise syntax without the boilerplate of nested `<ng-template>` elements.
@@ -511,9 +637,9 @@ The `gridConfig` input accepts `GridConfig` (Angular-augmented) which allows bot
511
637
 
512
638
  Both interfaces also support an optional `column()` input for accessing the column configuration.
513
639
 
514
- ## Using Plugins
640
+ ## Using Plugins (Advanced)
515
641
 
516
- Import plugins individually for smaller bundles:
642
+ For full control (e.g., custom plugin subclasses or mixed feature+plugin setups), you can bypass feature props and import plugins directly:
517
643
 
518
644
  ```typescript
519
645
  import { Component } from '@angular/core';
@@ -536,6 +662,8 @@ export class MyGridComponent {
536
662
  }
537
663
  ```
538
664
 
665
+ > **Tip:** Prefer feature props (see [Enabling Features](#enabling-features) above) for simpler code and tree-shaking.
666
+
539
667
  Or import all plugins at once (larger bundle, but convenient):
540
668
 
541
669
  ```typescript
@@ -1,5 +1,4 @@
1
- import { registerFeature } from '@toolbox-web/grid-angular';
2
- import { ClipboardPlugin } from '@toolbox-web/grid/plugins/clipboard';
1
+ import '@toolbox-web/grid/features/clipboard';
3
2
 
4
3
  /**
5
4
  * Clipboard feature for @toolbox-web/grid-angular
@@ -17,12 +16,6 @@ import { ClipboardPlugin } from '@toolbox-web/grid/plugins/clipboard';
17
16
  *
18
17
  * @packageDocumentation
19
18
  */
20
- registerFeature('clipboard', (config) => {
21
- if (config === true) {
22
- return new ClipboardPlugin();
23
- }
24
- return new ClipboardPlugin(config ?? undefined);
25
- });
26
19
 
27
20
  /**
28
21
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"toolbox-web-grid-angular-features-clipboard.mjs","sources":["../../../../libs/grid-angular/features/clipboard/src/index.ts","../../../../libs/grid-angular/features/clipboard/src/toolbox-web-grid-angular-features-clipboard.ts"],"sourcesContent":["/**\n * Clipboard feature for @toolbox-web/grid-angular\n *\n * Import this module to enable the `clipboard` input on Grid directive.\n * Requires selection feature to be enabled.\n *\n * @example\n * ```typescript\n * import '@toolbox-web/grid-angular/features/selection';\n * import '@toolbox-web/grid-angular/features/clipboard';\n *\n * <tbw-grid [selection]=\"'range'\" [clipboard]=\"true\" />\n * ```\n *\n * @packageDocumentation\n */\n\nimport { registerFeature } from '@toolbox-web/grid-angular';\nimport { ClipboardPlugin } from '@toolbox-web/grid/plugins/clipboard';\n\nregisterFeature('clipboard', (config) => {\n if (config === true) {\n return new ClipboardPlugin();\n }\n return new ClipboardPlugin(config ?? undefined);\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;AAeG;AAKH,eAAe,CAAC,WAAW,EAAE,CAAC,MAAM,KAAI;AACtC,IAAA,IAAI,MAAM,KAAK,IAAI,EAAE;QACnB,OAAO,IAAI,eAAe,EAAE;IAC9B;AACA,IAAA,OAAO,IAAI,eAAe,CAAC,MAAM,IAAI,SAAS,CAAC;AACjD,CAAC,CAAC;;ACzBF;;AAEG"}
1
+ {"version":3,"file":"toolbox-web-grid-angular-features-clipboard.mjs","sources":["../../../../libs/grid-angular/features/clipboard/src/index.ts","../../../../libs/grid-angular/features/clipboard/src/toolbox-web-grid-angular-features-clipboard.ts"],"sourcesContent":["/**\n * Clipboard feature for @toolbox-web/grid-angular\n *\n * Import this module to enable the `clipboard` input on Grid directive.\n * Requires selection feature to be enabled.\n *\n * @example\n * ```typescript\n * import '@toolbox-web/grid-angular/features/selection';\n * import '@toolbox-web/grid-angular/features/clipboard';\n *\n * <tbw-grid [selection]=\"'range'\" [clipboard]=\"true\" />\n * ```\n *\n * @packageDocumentation\n */\n\nimport '@toolbox-web/grid/features/clipboard';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;;AAeG;;ACfH;;AAEG"}
@@ -1,5 +1,4 @@
1
- import { ColumnVirtualizationPlugin } from '@toolbox-web/grid/plugins/column-virtualization';
2
- import { registerFeature } from '@toolbox-web/grid-angular';
1
+ import '@toolbox-web/grid/features/column-virtualization';
3
2
 
4
3
  /**
5
4
  * Column virtualization feature for @toolbox-web/grid-angular
@@ -15,12 +14,6 @@ import { registerFeature } from '@toolbox-web/grid-angular';
15
14
  *
16
15
  * @packageDocumentation
17
16
  */
18
- registerFeature('columnVirtualization', (config) => {
19
- if (config === true) {
20
- return new ColumnVirtualizationPlugin();
21
- }
22
- return new ColumnVirtualizationPlugin(config ?? undefined);
23
- });
24
17
 
25
18
  /**
26
19
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"toolbox-web-grid-angular-features-column-virtualization.mjs","sources":["../../../../libs/grid-angular/features/column-virtualization/src/index.ts","../../../../libs/grid-angular/features/column-virtualization/src/toolbox-web-grid-angular-features-column-virtualization.ts"],"sourcesContent":["/**\n * Column virtualization feature for @toolbox-web/grid-angular\n *\n * Import this module to enable the `columnVirtualization` input on Grid directive.\n *\n * @example\n * ```typescript\n * import '@toolbox-web/grid-angular/features/column-virtualization';\n *\n * <tbw-grid [columnVirtualization]=\"true\" />\n * ```\n *\n * @packageDocumentation\n */\n\nimport { ColumnVirtualizationPlugin } from '@toolbox-web/grid/plugins/column-virtualization';\nimport { registerFeature } from '@toolbox-web/grid-angular';\n\nregisterFeature('columnVirtualization', (config) => {\n if (config === true) {\n return new ColumnVirtualizationPlugin();\n }\n return new ColumnVirtualizationPlugin(config ?? undefined);\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;AAaG;AAKH,eAAe,CAAC,sBAAsB,EAAE,CAAC,MAAM,KAAI;AACjD,IAAA,IAAI,MAAM,KAAK,IAAI,EAAE;QACnB,OAAO,IAAI,0BAA0B,EAAE;IACzC;AACA,IAAA,OAAO,IAAI,0BAA0B,CAAC,MAAM,IAAI,SAAS,CAAC;AAC5D,CAAC,CAAC;;ACvBF;;AAEG"}
1
+ {"version":3,"file":"toolbox-web-grid-angular-features-column-virtualization.mjs","sources":["../../../../libs/grid-angular/features/column-virtualization/src/index.ts","../../../../libs/grid-angular/features/column-virtualization/src/toolbox-web-grid-angular-features-column-virtualization.ts"],"sourcesContent":["/**\n * Column virtualization feature for @toolbox-web/grid-angular\n *\n * Import this module to enable the `columnVirtualization` input on Grid directive.\n *\n * @example\n * ```typescript\n * import '@toolbox-web/grid-angular/features/column-virtualization';\n *\n * <tbw-grid [columnVirtualization]=\"true\" />\n * ```\n *\n * @packageDocumentation\n */\n\nimport '@toolbox-web/grid/features/column-virtualization';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;AAaG;;ACbH;;AAEG"}
@@ -1,5 +1,4 @@
1
- import { ContextMenuPlugin } from '@toolbox-web/grid/plugins/context-menu';
2
- import { registerFeature } from '@toolbox-web/grid-angular';
1
+ import '@toolbox-web/grid/features/context-menu';
3
2
 
4
3
  /**
5
4
  * Context menu feature for @toolbox-web/grid-angular
@@ -15,12 +14,6 @@ import { registerFeature } from '@toolbox-web/grid-angular';
15
14
  *
16
15
  * @packageDocumentation
17
16
  */
18
- registerFeature('contextMenu', (config) => {
19
- if (config === true) {
20
- return new ContextMenuPlugin();
21
- }
22
- return new ContextMenuPlugin(config ?? undefined);
23
- });
24
17
 
25
18
  /**
26
19
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"toolbox-web-grid-angular-features-context-menu.mjs","sources":["../../../../libs/grid-angular/features/context-menu/src/index.ts","../../../../libs/grid-angular/features/context-menu/src/toolbox-web-grid-angular-features-context-menu.ts"],"sourcesContent":["/**\n * Context menu feature for @toolbox-web/grid-angular\n *\n * Import this module to enable the `contextMenu` input on Grid directive.\n *\n * @example\n * ```typescript\n * import '@toolbox-web/grid-angular/features/context-menu';\n *\n * <tbw-grid [contextMenu]=\"true\" />\n * ```\n *\n * @packageDocumentation\n */\n\nimport { ContextMenuPlugin } from '@toolbox-web/grid/plugins/context-menu';\nimport { registerFeature } from '@toolbox-web/grid-angular';\n\nregisterFeature('contextMenu', (config) => {\n if (config === true) {\n return new ContextMenuPlugin();\n }\n return new ContextMenuPlugin(config ?? undefined);\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;AAaG;AAKH,eAAe,CAAC,aAAa,EAAE,CAAC,MAAM,KAAI;AACxC,IAAA,IAAI,MAAM,KAAK,IAAI,EAAE;QACnB,OAAO,IAAI,iBAAiB,EAAE;IAChC;AACA,IAAA,OAAO,IAAI,iBAAiB,CAAC,MAAM,IAAI,SAAS,CAAC;AACnD,CAAC,CAAC;;ACvBF;;AAEG"}
1
+ {"version":3,"file":"toolbox-web-grid-angular-features-context-menu.mjs","sources":["../../../../libs/grid-angular/features/context-menu/src/index.ts","../../../../libs/grid-angular/features/context-menu/src/toolbox-web-grid-angular-features-context-menu.ts"],"sourcesContent":["/**\n * Context menu feature for @toolbox-web/grid-angular\n *\n * Import this module to enable the `contextMenu` input on Grid directive.\n *\n * @example\n * ```typescript\n * import '@toolbox-web/grid-angular/features/context-menu';\n *\n * <tbw-grid [contextMenu]=\"true\" />\n * ```\n *\n * @packageDocumentation\n */\n\nimport '@toolbox-web/grid/features/context-menu';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;AAaG;;ACbH;;AAEG"}
@@ -1,5 +1,4 @@
1
- import { EditingPlugin } from '@toolbox-web/grid/plugins/editing';
2
- import { registerFeature } from '@toolbox-web/grid-angular';
1
+ import '@toolbox-web/grid/features/editing';
3
2
 
4
3
  /**
5
4
  * Editing feature for @toolbox-web/grid-angular
@@ -15,17 +14,6 @@ import { registerFeature } from '@toolbox-web/grid-angular';
15
14
  *
16
15
  * @packageDocumentation
17
16
  */
18
- registerFeature('editing', (config) => {
19
- // Handle shorthand: true, 'click', 'dblclick', 'manual'
20
- if (config === true) {
21
- return new EditingPlugin({ editOn: 'dblclick' });
22
- }
23
- if (config === 'click' || config === 'dblclick' || config === 'manual') {
24
- return new EditingPlugin({ editOn: config });
25
- }
26
- // Full config object
27
- return new EditingPlugin(config ?? undefined);
28
- });
29
17
 
30
18
  /**
31
19
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"toolbox-web-grid-angular-features-editing.mjs","sources":["../../../../libs/grid-angular/features/editing/src/index.ts","../../../../libs/grid-angular/features/editing/src/toolbox-web-grid-angular-features-editing.ts"],"sourcesContent":["/**\n * Editing feature for @toolbox-web/grid-angular\n *\n * Import this module to enable the `editing` input on Grid directive.\n *\n * @example\n * ```typescript\n * import '@toolbox-web/grid-angular/features/editing';\n *\n * <tbw-grid [editing]=\"'dblclick'\" />\n * ```\n *\n * @packageDocumentation\n */\n\nimport { EditingPlugin } from '@toolbox-web/grid/plugins/editing';\nimport { registerFeature } from '@toolbox-web/grid-angular';\n\nregisterFeature('editing', (config) => {\n // Handle shorthand: true, 'click', 'dblclick', 'manual'\n if (config === true) {\n return new EditingPlugin({ editOn: 'dblclick' });\n }\n if (config === 'click' || config === 'dblclick' || config === 'manual') {\n return new EditingPlugin({ editOn: config });\n }\n // Full config object\n return new EditingPlugin(config ?? undefined);\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;AAaG;AAKH,eAAe,CAAC,SAAS,EAAE,CAAC,MAAM,KAAI;;AAEpC,IAAA,IAAI,MAAM,KAAK,IAAI,EAAE;QACnB,OAAO,IAAI,aAAa,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC;IAClD;AACA,IAAA,IAAI,MAAM,KAAK,OAAO,IAAI,MAAM,KAAK,UAAU,IAAI,MAAM,KAAK,QAAQ,EAAE;QACtE,OAAO,IAAI,aAAa,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IAC9C;;AAEA,IAAA,OAAO,IAAI,aAAa,CAAC,MAAM,IAAI,SAAS,CAAC;AAC/C,CAAC,CAAC;;AC5BF;;AAEG"}
1
+ {"version":3,"file":"toolbox-web-grid-angular-features-editing.mjs","sources":["../../../../libs/grid-angular/features/editing/src/index.ts","../../../../libs/grid-angular/features/editing/src/toolbox-web-grid-angular-features-editing.ts"],"sourcesContent":["/**\n * Editing feature for @toolbox-web/grid-angular\n *\n * Import this module to enable the `editing` input on Grid directive.\n *\n * @example\n * ```typescript\n * import '@toolbox-web/grid-angular/features/editing';\n *\n * <tbw-grid [editing]=\"'dblclick'\" />\n * ```\n *\n * @packageDocumentation\n */\n\nimport '@toolbox-web/grid/features/editing';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;AAaG;;ACbH;;AAEG"}
@@ -1,6 +1,5 @@
1
1
  import { inject, ElementRef, DestroyRef, signal, afterNextRender } from '@angular/core';
2
- import { registerFeature } from '@toolbox-web/grid-angular';
3
- import { ExportPlugin } from '@toolbox-web/grid/plugins/export';
2
+ import '@toolbox-web/grid/features/export';
4
3
 
5
4
  /**
6
5
  * Export feature for @toolbox-web/grid-angular
@@ -32,12 +31,6 @@ import { ExportPlugin } from '@toolbox-web/grid/plugins/export';
32
31
  *
33
32
  * @packageDocumentation
34
33
  */
35
- registerFeature('export', (config) => {
36
- if (config === true) {
37
- return new ExportPlugin();
38
- }
39
- return new ExportPlugin(config ?? undefined);
40
- });
41
34
  /**
42
35
  * Angular inject function for programmatic export control.
43
36
  *
@@ -1 +1 @@
1
- {"version":3,"file":"toolbox-web-grid-angular-features-export.mjs","sources":["../../../../libs/grid-angular/features/export/src/index.ts","../../../../libs/grid-angular/features/export/src/toolbox-web-grid-angular-features-export.ts"],"sourcesContent":["/**\n * Export feature for @toolbox-web/grid-angular\n *\n * Import this module to enable the `export` input on Grid directive.\n * Also exports `injectGridExport()` for programmatic export control.\n *\n * @example\n * ```typescript\n * import '@toolbox-web/grid-angular/features/export';\n *\n * <tbw-grid [export]=\"true\" />\n * <tbw-grid [export]=\"{ fileName: 'data.csv' }\" />\n * ```\n *\n * @example Using injectGridExport\n * ```typescript\n * import { injectGridExport } from '@toolbox-web/grid-angular/features/export';\n *\n * @Component({...})\n * export class MyComponent {\n * private gridExport = injectGridExport();\n *\n * exportData() {\n * this.gridExport.exportToCsv('employees.csv');\n * }\n * }\n * ```\n *\n * @packageDocumentation\n */\n\nimport { afterNextRender, DestroyRef, ElementRef, inject, signal, type Signal } from '@angular/core';\nimport type { DataGridElement } from '@toolbox-web/grid';\nimport { registerFeature } from '@toolbox-web/grid-angular';\nimport { ExportPlugin, type ExportFormat, type ExportParams } from '@toolbox-web/grid/plugins/export';\n\nregisterFeature('export', (config) => {\n if (config === true) {\n return new ExportPlugin();\n }\n return new ExportPlugin(config ?? undefined);\n});\n\n/**\n * Export methods returned from injectGridExport.\n *\n * Uses lazy discovery - the grid is found on first method call, not during initialization.\n * This ensures it works with lazy-rendered tabs, conditional rendering, etc.\n */\nexport interface ExportMethods {\n /**\n * Export grid data to CSV file.\n * @param filename - Optional filename (defaults to 'export.csv')\n * @param params - Optional export parameters\n */\n exportToCsv: (filename?: string, params?: Partial<ExportParams>) => void;\n\n /**\n * Export grid data to Excel file (XML Spreadsheet format).\n * @param filename - Optional filename (defaults to 'export.xlsx')\n * @param params - Optional export parameters\n */\n exportToExcel: (filename?: string, params?: Partial<ExportParams>) => void;\n\n /**\n * Export grid data to JSON file.\n * @param filename - Optional filename (defaults to 'export.json')\n * @param params - Optional export parameters\n */\n exportToJson: (filename?: string, params?: Partial<ExportParams>) => void;\n\n /**\n * Check if an export is currently in progress.\n */\n isExporting: () => boolean;\n\n /**\n * Get information about the last export.\n */\n getLastExport: () => { format: ExportFormat; timestamp: Date } | null;\n\n /**\n * Signal indicating if grid is ready.\n * The grid is discovered lazily, so this updates when first method call succeeds.\n */\n isReady: Signal<boolean>;\n}\n\n/**\n * Angular inject function for programmatic export control.\n *\n * Uses **lazy grid discovery** - the grid element is found when methods are called,\n * not during initialization. This ensures it works reliably with:\n * - Lazy-rendered tabs\n * - Conditional rendering (*ngIf)\n * - Dynamic component loading\n *\n * @example\n * ```typescript\n * import { Component } from '@angular/core';\n * import { Grid } from '@toolbox-web/grid-angular';\n * import '@toolbox-web/grid-angular/features/export';\n * import { injectGridExport } from '@toolbox-web/grid-angular/features/export';\n *\n * @Component({\n * selector: 'app-my-grid',\n * imports: [Grid],\n * template: `\n * <button (click)=\"handleExport()\">Export CSV</button>\n * <tbw-grid [rows]=\"rows\" [export]=\"true\"></tbw-grid>\n * `\n * })\n * export class MyGridComponent {\n * gridExport = injectGridExport();\n *\n * handleExport() {\n * this.gridExport.exportToCsv('employees.csv');\n * }\n * }\n * ```\n */\nexport function injectGridExport(): ExportMethods {\n const elementRef = inject(ElementRef);\n const destroyRef = inject(DestroyRef);\n const isReady = signal(false);\n\n // Lazy discovery: cached grid reference\n let cachedGrid: DataGridElement | null = null;\n let readyPromiseStarted = false;\n\n /**\n * Lazily find the grid element. Called on each method invocation.\n * Caches the reference once found and triggers ready() check.\n */\n const getGrid = (): DataGridElement | null => {\n if (cachedGrid) return cachedGrid;\n\n const grid = elementRef.nativeElement.querySelector('tbw-grid') as DataGridElement | null;\n if (grid) {\n cachedGrid = grid;\n // Start ready() check only once\n if (!readyPromiseStarted) {\n readyPromiseStarted = true;\n grid.ready?.().then(() => isReady.set(true));\n }\n }\n return grid;\n };\n\n const getPlugin = (): ExportPlugin | undefined => {\n return getGrid()?.getPluginByName('export') as ExportPlugin | undefined;\n };\n\n // Eagerly discover the grid after the first render so isReady updates\n // without requiring a programmatic method call. Falls back to a\n // MutationObserver for lazy-rendered tabs, *ngIf, @defer, etc.\n afterNextRender(() => {\n if (getGrid()) return;\n\n const host = elementRef.nativeElement as HTMLElement;\n const observer = new MutationObserver(() => {\n if (getGrid()) observer.disconnect();\n });\n observer.observe(host, { childList: true, subtree: true });\n\n destroyRef.onDestroy(() => observer.disconnect());\n });\n\n return {\n isReady: isReady.asReadonly(),\n\n exportToCsv: (filename?: string, params?: Partial<ExportParams>) => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:export] ExportPlugin not found.\\n\\n` +\n ` → Enable export on the grid:\\n` +\n ` <tbw-grid [export]=\"true\" />`,\n );\n return;\n }\n plugin.exportCsv({ ...params, fileName: filename ?? params?.fileName ?? 'export.csv' });\n },\n\n exportToExcel: (filename?: string, params?: Partial<ExportParams>) => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:export] ExportPlugin not found.\\n\\n` +\n ` → Enable export on the grid:\\n` +\n ` <tbw-grid [export]=\"true\" />`,\n );\n return;\n }\n plugin.exportExcel({ ...params, fileName: filename ?? params?.fileName ?? 'export.xlsx' });\n },\n\n exportToJson: (filename?: string, params?: Partial<ExportParams>) => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:export] ExportPlugin not found.\\n\\n` +\n ` → Enable export on the grid:\\n` +\n ` <tbw-grid [export]=\"true\" />`,\n );\n return;\n }\n plugin.exportJson({ ...params, fileName: filename ?? params?.fileName ?? 'export.json' });\n },\n\n isExporting: () => {\n return getPlugin()?.isExporting() ?? false;\n },\n\n getLastExport: () => {\n return getPlugin()?.getLastExport() ?? null;\n },\n };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BG;AAOH,eAAe,CAAC,QAAQ,EAAE,CAAC,MAAM,KAAI;AACnC,IAAA,IAAI,MAAM,KAAK,IAAI,EAAE;QACnB,OAAO,IAAI,YAAY,EAAE;IAC3B;AACA,IAAA,OAAO,IAAI,YAAY,CAAC,MAAM,IAAI,SAAS,CAAC;AAC9C,CAAC,CAAC;AA+CF;;;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AAM,EAAE,QAAQ,EAAE,QAAQ,IAAI,MAAM,EAAE,QAAQ,IAAI,aAAa,EAAE,CAAC;QAC3F,CAAC;QAED,WAAW,EAAE,MAAK;AAChB,YAAA,OAAO,SAAS,EAAE,EAAE,WAAW,EAAE,IAAI,KAAK;QAC5C,CAAC;QAED,aAAa,EAAE,MAAK;AAClB,YAAA,OAAO,SAAS,EAAE,EAAE,aAAa,EAAE,IAAI,IAAI;QAC7C,CAAC;KACF;AACH;;AC1NA;;AAEG;;;;"}
1
+ {"version":3,"file":"toolbox-web-grid-angular-features-export.mjs","sources":["../../../../libs/grid-angular/features/export/src/index.ts","../../../../libs/grid-angular/features/export/src/toolbox-web-grid-angular-features-export.ts"],"sourcesContent":["/**\n * Export feature for @toolbox-web/grid-angular\n *\n * Import this module to enable the `export` input on Grid directive.\n * Also exports `injectGridExport()` for programmatic export control.\n *\n * @example\n * ```typescript\n * import '@toolbox-web/grid-angular/features/export';\n *\n * <tbw-grid [export]=\"true\" />\n * <tbw-grid [export]=\"{ fileName: 'data.csv' }\" />\n * ```\n *\n * @example Using injectGridExport\n * ```typescript\n * import { injectGridExport } from '@toolbox-web/grid-angular/features/export';\n *\n * @Component({...})\n * export class MyComponent {\n * private gridExport = injectGridExport();\n *\n * exportData() {\n * this.gridExport.exportToCsv('employees.csv');\n * }\n * }\n * ```\n *\n * @packageDocumentation\n */\n\nimport { afterNextRender, DestroyRef, ElementRef, inject, signal, type Signal } from '@angular/core';\nimport type { DataGridElement } from '@toolbox-web/grid';\nimport '@toolbox-web/grid/features/export';\nimport { ExportPlugin, type ExportFormat, type ExportParams } from '@toolbox-web/grid/plugins/export';\n\n/**\n * Export methods returned from injectGridExport.\n *\n * Uses lazy discovery - the grid is found on first method call, not during initialization.\n * This ensures it works with lazy-rendered tabs, conditional rendering, etc.\n */\nexport interface ExportMethods {\n /**\n * Export grid data to CSV file.\n * @param filename - Optional filename (defaults to 'export.csv')\n * @param params - Optional export parameters\n */\n exportToCsv: (filename?: string, params?: Partial<ExportParams>) => void;\n\n /**\n * Export grid data to Excel file (XML Spreadsheet format).\n * @param filename - Optional filename (defaults to 'export.xlsx')\n * @param params - Optional export parameters\n */\n exportToExcel: (filename?: string, params?: Partial<ExportParams>) => void;\n\n /**\n * Export grid data to JSON file.\n * @param filename - Optional filename (defaults to 'export.json')\n * @param params - Optional export parameters\n */\n exportToJson: (filename?: string, params?: Partial<ExportParams>) => void;\n\n /**\n * Check if an export is currently in progress.\n */\n isExporting: () => boolean;\n\n /**\n * Get information about the last export.\n */\n getLastExport: () => { format: ExportFormat; timestamp: Date } | null;\n\n /**\n * Signal indicating if grid is ready.\n * The grid is discovered lazily, so this updates when first method call succeeds.\n */\n isReady: Signal<boolean>;\n}\n\n/**\n * Angular inject function for programmatic export control.\n *\n * Uses **lazy grid discovery** - the grid element is found when methods are called,\n * not during initialization. This ensures it works reliably with:\n * - Lazy-rendered tabs\n * - Conditional rendering (*ngIf)\n * - Dynamic component loading\n *\n * @example\n * ```typescript\n * import { Component } from '@angular/core';\n * import { Grid } from '@toolbox-web/grid-angular';\n * import '@toolbox-web/grid-angular/features/export';\n * import { injectGridExport } from '@toolbox-web/grid-angular/features/export';\n *\n * @Component({\n * selector: 'app-my-grid',\n * imports: [Grid],\n * template: `\n * <button (click)=\"handleExport()\">Export CSV</button>\n * <tbw-grid [rows]=\"rows\" [export]=\"true\"></tbw-grid>\n * `\n * })\n * export class MyGridComponent {\n * gridExport = injectGridExport();\n *\n * handleExport() {\n * this.gridExport.exportToCsv('employees.csv');\n * }\n * }\n * ```\n */\nexport function injectGridExport(): ExportMethods {\n const elementRef = inject(ElementRef);\n const destroyRef = inject(DestroyRef);\n const isReady = signal(false);\n\n // Lazy discovery: cached grid reference\n let cachedGrid: DataGridElement | null = null;\n let readyPromiseStarted = false;\n\n /**\n * Lazily find the grid element. Called on each method invocation.\n * Caches the reference once found and triggers ready() check.\n */\n const getGrid = (): DataGridElement | null => {\n if (cachedGrid) return cachedGrid;\n\n const grid = elementRef.nativeElement.querySelector('tbw-grid') as DataGridElement | null;\n if (grid) {\n cachedGrid = grid;\n // Start ready() check only once\n if (!readyPromiseStarted) {\n readyPromiseStarted = true;\n grid.ready?.().then(() => isReady.set(true));\n }\n }\n return grid;\n };\n\n const getPlugin = (): ExportPlugin | undefined => {\n return getGrid()?.getPluginByName('export') as ExportPlugin | undefined;\n };\n\n // Eagerly discover the grid after the first render so isReady updates\n // without requiring a programmatic method call. Falls back to a\n // MutationObserver for lazy-rendered tabs, *ngIf, @defer, etc.\n afterNextRender(() => {\n if (getGrid()) return;\n\n const host = elementRef.nativeElement as HTMLElement;\n const observer = new MutationObserver(() => {\n if (getGrid()) observer.disconnect();\n });\n observer.observe(host, { childList: true, subtree: true });\n\n destroyRef.onDestroy(() => observer.disconnect());\n });\n\n return {\n isReady: isReady.asReadonly(),\n\n exportToCsv: (filename?: string, params?: Partial<ExportParams>) => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:export] ExportPlugin not found.\\n\\n` +\n ` → Enable export on the grid:\\n` +\n ` <tbw-grid [export]=\"true\" />`,\n );\n return;\n }\n plugin.exportCsv({ ...params, fileName: filename ?? params?.fileName ?? 'export.csv' });\n },\n\n exportToExcel: (filename?: string, params?: Partial<ExportParams>) => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:export] ExportPlugin not found.\\n\\n` +\n ` → Enable export on the grid:\\n` +\n ` <tbw-grid [export]=\"true\" />`,\n );\n return;\n }\n plugin.exportExcel({ ...params, fileName: filename ?? params?.fileName ?? 'export.xlsx' });\n },\n\n exportToJson: (filename?: string, params?: Partial<ExportParams>) => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:export] ExportPlugin not found.\\n\\n` +\n ` → Enable export on the grid:\\n` +\n ` <tbw-grid [export]=\"true\" />`,\n );\n return;\n }\n plugin.exportJson({ ...params, fileName: filename ?? params?.fileName ?? 'export.json' });\n },\n\n isExporting: () => {\n return getPlugin()?.isExporting() ?? false;\n },\n\n getLastExport: () => {\n return getPlugin()?.getLastExport() ?? null;\n },\n };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BG;AAoDH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCG;SACa,gBAAgB,GAAA;AAC9B,IAAA,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AACrC,IAAA,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AACrC,IAAA,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,mDAAC;;IAG7B,IAAI,UAAU,GAA2B,IAAI;IAC7C,IAAI,mBAAmB,GAAG,KAAK;AAE/B;;;AAGG;IACH,MAAM,OAAO,GAAG,MAA6B;AAC3C,QAAA,IAAI,UAAU;AAAE,YAAA,OAAO,UAAU;QAEjC,MAAM,IAAI,GAAG,UAAU,CAAC,aAAa,CAAC,aAAa,CAAC,UAAU,CAA2B;QACzF,IAAI,IAAI,EAAE;YACR,UAAU,GAAG,IAAI;;YAEjB,IAAI,CAAC,mBAAmB,EAAE;gBACxB,mBAAmB,GAAG,IAAI;AAC1B,gBAAA,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,MAAM,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YAC9C;QACF;AACA,QAAA,OAAO,IAAI;AACb,IAAA,CAAC;IAED,MAAM,SAAS,GAAG,MAA+B;AAC/C,QAAA,OAAO,OAAO,EAAE,EAAE,eAAe,CAAC,QAAQ,CAA6B;AACzE,IAAA,CAAC;;;;IAKD,eAAe,CAAC,MAAK;AACnB,QAAA,IAAI,OAAO,EAAE;YAAE;AAEf,QAAA,MAAM,IAAI,GAAG,UAAU,CAAC,aAA4B;AACpD,QAAA,MAAM,QAAQ,GAAG,IAAI,gBAAgB,CAAC,MAAK;AACzC,YAAA,IAAI,OA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AAI,CAAC,MAAM,EAAE;gBACX,OAAO,CAAC,IAAI,CACV,CAAA,6CAAA,CAA+C;oBAC7C,CAAA,gCAAA,CAAkC;AAClC,oBAAA,CAAA,gCAAA,CAAkC,CACrC;gBACD;YACF;AACA,YAAA,MAAM,CAAC,UAAU,CAAC,EAAE,GAAG,MAAM,EAAE,QAAQ,EAAE,QAAQ,IAAI,MAAM,EAAE,QAAQ,IAAI,aAAa,EAAE,CAAC;QAC3F,CAAC;QAED,WAAW,EAAE,MAAK;AAChB,YAAA,OAAO,SAAS,EAAE,EAAE,WAAW,EAAE,IAAI,KAAK;QAC5C,CAAC;QAED,aAAa,EAAE,MAAK;AAClB,YAAA,OAAO,SAAS,EAAE,EAAE,aAAa,EAAE,IAAI,IAAI;QAC7C,CAAC;KACF;AACH;;ACnNA;;AAEG;;;;"}
@@ -1,6 +1,5 @@
1
1
  import { inject, ElementRef, DestroyRef, signal, afterNextRender } from '@angular/core';
2
- import { registerFeature } from '@toolbox-web/grid-angular';
3
- import { FilteringPlugin } from '@toolbox-web/grid/plugins/filtering';
2
+ import '@toolbox-web/grid/features/filtering';
4
3
 
5
4
  /**
6
5
  * Filtering feature for @toolbox-web/grid-angular
@@ -32,12 +31,6 @@ import { FilteringPlugin } from '@toolbox-web/grid/plugins/filtering';
32
31
  *
33
32
  * @packageDocumentation
34
33
  */
35
- registerFeature('filtering', (config) => {
36
- if (config === true) {
37
- return new FilteringPlugin();
38
- }
39
- return new FilteringPlugin(config ?? undefined);
40
- });
41
34
  /**
42
35
  * Angular inject function for programmatic filter control.
43
36
  *
@@ -1 +1 @@
1
- {"version":3,"file":"toolbox-web-grid-angular-features-filtering.mjs","sources":["../../../../libs/grid-angular/features/filtering/src/index.ts","../../../../libs/grid-angular/features/filtering/src/toolbox-web-grid-angular-features-filtering.ts"],"sourcesContent":["/**\n * Filtering feature for @toolbox-web/grid-angular\n *\n * Import this module to enable the `filtering` input on Grid directive.\n * Also exports `injectGridFiltering()` for programmatic filter control.\n *\n * @example\n * ```typescript\n * import '@toolbox-web/grid-angular/features/filtering';\n *\n * <tbw-grid [filtering]=\"true\" />\n * <tbw-grid [filtering]=\"{ debounceMs: 200 }\" />\n * ```\n *\n * @example Using injectGridFiltering\n * ```typescript\n * import { injectGridFiltering } from '@toolbox-web/grid-angular/features/filtering';\n *\n * @Component({...})\n * export class MyComponent {\n * private filtering = injectGridFiltering();\n *\n * filterByStatus(status: string) {\n * this.filtering.setFilter('status', { operator: 'equals', value: status });\n * }\n * }\n * ```\n *\n * @packageDocumentation\n */\n\nimport { afterNextRender, DestroyRef, ElementRef, inject, signal, type Signal } from '@angular/core';\nimport type { DataGridElement } from '@toolbox-web/grid';\nimport { registerFeature } from '@toolbox-web/grid-angular';\nimport { FilteringPlugin, type FilterModel } from '@toolbox-web/grid/plugins/filtering';\n\nregisterFeature('filtering', (config) => {\n if (config === true) {\n return new FilteringPlugin();\n }\n return new FilteringPlugin(config ?? undefined);\n});\n\n/**\n * Filtering methods returned from injectGridFiltering.\n *\n * Uses lazy discovery - the grid is found on first method call, not during initialization.\n */\nexport interface FilteringMethods {\n /**\n * Set a filter on a specific field.\n * @param field - The field name to filter\n * @param filter - Filter configuration, or null to remove\n */\n setFilter: (field: string, filter: Omit<FilterModel, 'field'> | null) => void;\n\n /**\n * Get the current filter for a field.\n */\n getFilter: (field: string) => FilterModel | undefined;\n\n /**\n * Get all active filters.\n */\n getFilters: () => FilterModel[];\n\n /**\n * Set all filters at once (replaces existing).\n */\n setFilterModel: (filters: FilterModel[]) => void;\n\n /**\n * Clear all active filters.\n */\n clearAllFilters: () => void;\n\n /**\n * Clear filter for a specific field.\n */\n clearFieldFilter: (field: string) => void;\n\n /**\n * Check if a field has an active filter.\n */\n isFieldFiltered: (field: string) => boolean;\n\n /**\n * Get the count of rows after filtering.\n */\n getFilteredRowCount: () => number;\n\n /**\n * Get unique values for a field (for building filter dropdowns).\n */\n getUniqueValues: (field: string) => unknown[];\n\n /**\n * Signal indicating if grid is ready.\n */\n isReady: Signal<boolean>;\n}\n\n/**\n * Angular inject function for programmatic filter control.\n *\n * Uses **lazy grid discovery** - the grid element is found when methods are called,\n * not during initialization.\n *\n * @example\n * ```typescript\n * import { Component } from '@angular/core';\n * import { Grid } from '@toolbox-web/grid-angular';\n * import '@toolbox-web/grid-angular/features/filtering';\n * import { injectGridFiltering } from '@toolbox-web/grid-angular/features/filtering';\n *\n * @Component({\n * selector: 'app-my-grid',\n * imports: [Grid],\n * template: `\n * <input (input)=\"applyFilter($event)\" placeholder=\"Filter by name...\" />\n * <span>{{ filtering.getFilteredRowCount() }} results</span>\n * <button (click)=\"filtering.clearAllFilters()\">Clear</button>\n * <tbw-grid [rows]=\"rows\" [filtering]=\"true\"></tbw-grid>\n * `\n * })\n * export class MyGridComponent {\n * filtering = injectGridFiltering();\n *\n * applyFilter(event: Event) {\n * const value = (event.target as HTMLInputElement).value;\n * this.filtering.setFilter('name', value ? { operator: 'contains', value } : null);\n * }\n * }\n * ```\n */\nexport function injectGridFiltering(): FilteringMethods {\n const elementRef = inject(ElementRef);\n const destroyRef = inject(DestroyRef);\n const isReady = signal(false);\n\n let cachedGrid: DataGridElement | null = null;\n let readyPromiseStarted = false;\n\n const getGrid = (): DataGridElement | null => {\n if (cachedGrid) return cachedGrid;\n\n const grid = elementRef.nativeElement.querySelector('tbw-grid') as DataGridElement | null;\n if (grid) {\n cachedGrid = grid;\n if (!readyPromiseStarted) {\n readyPromiseStarted = true;\n grid.ready?.().then(() => isReady.set(true));\n }\n }\n return grid;\n };\n\n const getPlugin = (): FilteringPlugin | undefined => {\n return getGrid()?.getPluginByName('filtering') as FilteringPlugin | undefined;\n };\n\n // Eagerly discover the grid after the first render so isReady updates\n // without requiring a programmatic method call. Falls back to a\n // MutationObserver for lazy-rendered tabs, *ngIf, @defer, etc.\n afterNextRender(() => {\n if (getGrid()) return;\n\n const host = elementRef.nativeElement as HTMLElement;\n const observer = new MutationObserver(() => {\n if (getGrid()) observer.disconnect();\n });\n observer.observe(host, { childList: true, subtree: true });\n\n destroyRef.onDestroy(() => observer.disconnect());\n });\n\n return {\n isReady: isReady.asReadonly(),\n\n setFilter: (field: string, filter: Omit<FilterModel, 'field'> | null) => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:filtering] FilteringPlugin not found.\\n\\n` +\n ` → Enable filtering on the grid:\\n` +\n ` <tbw-grid [filtering]=\"true\" />`,\n );\n return;\n }\n plugin.setFilter(field, filter);\n },\n\n getFilter: (field: string) => getPlugin()?.getFilter(field),\n\n getFilters: () => getPlugin()?.getFilters() ?? [],\n\n setFilterModel: (filters: FilterModel[]) => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:filtering] FilteringPlugin not found.\\n\\n` +\n ` → Enable filtering on the grid:\\n` +\n ` <tbw-grid [filtering]=\"true\" />`,\n );\n return;\n }\n plugin.setFilterModel(filters);\n },\n\n clearAllFilters: () => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:filtering] FilteringPlugin not found.\\n\\n` +\n ` → Enable filtering on the grid:\\n` +\n ` <tbw-grid [filtering]=\"true\" />`,\n );\n return;\n }\n plugin.clearAllFilters();\n },\n\n clearFieldFilter: (field: string) => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:filtering] FilteringPlugin not found.\\n\\n` +\n ` → Enable filtering on the grid:\\n` +\n ` <tbw-grid [filtering]=\"true\" />`,\n );\n return;\n }\n plugin.clearFieldFilter(field);\n },\n\n isFieldFiltered: (field: string) => getPlugin()?.isFieldFiltered(field) ?? false,\n\n getFilteredRowCount: () => getPlugin()?.getFilteredRowCount() ?? 0,\n\n getUniqueValues: (field: string) => getPlugin()?.getUniqueValues(field) ?? [],\n };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BG;AAOH,eAAe,CAAC,WAAW,EAAE,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,mCAAA,CAAqC;AACrC,oBAAA,CAAA,mCAAA,CAAqC,CACxC;gBACD;YACF;YACA,MAAM,CAAC,eAAe,EAAE;QAC1B,CAAC;AAED,QAAA,gBAAgB,EAAE,CAAC,KAAa,KAAI;AAClC,YAAA,MAAM,MAAM,GAAG,SAAS,EAAE;YAC1B,IAAI,CAAC,MAAM,EAAE;gBACX,OAAO,CAAC,IAAI,CACV,CAAA,mDAAA,CAAqD;oBACnD,CAAA,mCAAA,CAAqC;AACrC,oBAAA,CAAA,mCAAA,CAAqC,CACxC;gBACD;YACF;AACA,YAAA,MAAM,CAAC,gBAAgB,CAAC,KAAK,CAAC;QAChC,CAAC;AAED,QAAA,eAAe,EAAE,CAAC,KAAa,KAAK,SAAS,EAAE,EAAE,eAAe,CAAC,KAAK,CAAC,IAAI,KAAK;QAEhF,mBAAmB,EAAE,MAAM,SAAS,EAAE,EAAE,mBAAmB,EAAE,IAAI,CAAC;AAElE,QAAA,eAAe,EAAE,CAAC,KAAa,KAAK,SAAS,EAAE,EAAE,eAAe,CAAC,KAAK,CAAC,IAAI,EAAE;KAC9E;AACH;;ACjPA;;AAEG;;;;"}
1
+ {"version":3,"file":"toolbox-web-grid-angular-features-filtering.mjs","sources":["../../../../libs/grid-angular/features/filtering/src/index.ts","../../../../libs/grid-angular/features/filtering/src/toolbox-web-grid-angular-features-filtering.ts"],"sourcesContent":["/**\n * Filtering feature for @toolbox-web/grid-angular\n *\n * Import this module to enable the `filtering` input on Grid directive.\n * Also exports `injectGridFiltering()` for programmatic filter control.\n *\n * @example\n * ```typescript\n * import '@toolbox-web/grid-angular/features/filtering';\n *\n * <tbw-grid [filtering]=\"true\" />\n * <tbw-grid [filtering]=\"{ debounceMs: 200 }\" />\n * ```\n *\n * @example Using injectGridFiltering\n * ```typescript\n * import { injectGridFiltering } from '@toolbox-web/grid-angular/features/filtering';\n *\n * @Component({...})\n * export class MyComponent {\n * private filtering = injectGridFiltering();\n *\n * filterByStatus(status: string) {\n * this.filtering.setFilter('status', { operator: 'equals', value: status });\n * }\n * }\n * ```\n *\n * @packageDocumentation\n */\n\nimport { afterNextRender, DestroyRef, ElementRef, inject, signal, type Signal } from '@angular/core';\nimport type { DataGridElement } from '@toolbox-web/grid';\nimport '@toolbox-web/grid/features/filtering';\nimport { FilteringPlugin, type FilterModel } from '@toolbox-web/grid/plugins/filtering';\n\n/**\n * Filtering methods returned from injectGridFiltering.\n *\n * Uses lazy discovery - the grid is found on first method call, not during initialization.\n */\nexport interface FilteringMethods {\n /**\n * Set a filter on a specific field.\n * @param field - The field name to filter\n * @param filter - Filter configuration, or null to remove\n */\n setFilter: (field: string, filter: Omit<FilterModel, 'field'> | null) => void;\n\n /**\n * Get the current filter for a field.\n */\n getFilter: (field: string) => FilterModel | undefined;\n\n /**\n * Get all active filters.\n */\n getFilters: () => FilterModel[];\n\n /**\n * Set all filters at once (replaces existing).\n */\n setFilterModel: (filters: FilterModel[]) => void;\n\n /**\n * Clear all active filters.\n */\n clearAllFilters: () => void;\n\n /**\n * Clear filter for a specific field.\n */\n clearFieldFilter: (field: string) => void;\n\n /**\n * Check if a field has an active filter.\n */\n isFieldFiltered: (field: string) => boolean;\n\n /**\n * Get the count of rows after filtering.\n */\n getFilteredRowCount: () => number;\n\n /**\n * Get unique values for a field (for building filter dropdowns).\n */\n getUniqueValues: (field: string) => unknown[];\n\n /**\n * Signal indicating if grid is ready.\n */\n isReady: Signal<boolean>;\n}\n\n/**\n * Angular inject function for programmatic filter control.\n *\n * Uses **lazy grid discovery** - the grid element is found when methods are called,\n * not during initialization.\n *\n * @example\n * ```typescript\n * import { Component } from '@angular/core';\n * import { Grid } from '@toolbox-web/grid-angular';\n * import '@toolbox-web/grid-angular/features/filtering';\n * import { injectGridFiltering } from '@toolbox-web/grid-angular/features/filtering';\n *\n * @Component({\n * selector: 'app-my-grid',\n * imports: [Grid],\n * template: `\n * <input (input)=\"applyFilter($event)\" placeholder=\"Filter by name...\" />\n * <span>{{ filtering.getFilteredRowCount() }} results</span>\n * <button (click)=\"filtering.clearAllFilters()\">Clear</button>\n * <tbw-grid [rows]=\"rows\" [filtering]=\"true\"></tbw-grid>\n * `\n * })\n * export class MyGridComponent {\n * filtering = injectGridFiltering();\n *\n * applyFilter(event: Event) {\n * const value = (event.target as HTMLInputElement).value;\n * this.filtering.setFilter('name', value ? { operator: 'contains', value } : null);\n * }\n * }\n * ```\n */\nexport function injectGridFiltering(): FilteringMethods {\n const elementRef = inject(ElementRef);\n const destroyRef = inject(DestroyRef);\n const isReady = signal(false);\n\n let cachedGrid: DataGridElement | null = null;\n let readyPromiseStarted = false;\n\n const getGrid = (): DataGridElement | null => {\n if (cachedGrid) return cachedGrid;\n\n const grid = elementRef.nativeElement.querySelector('tbw-grid') as DataGridElement | null;\n if (grid) {\n cachedGrid = grid;\n if (!readyPromiseStarted) {\n readyPromiseStarted = true;\n grid.ready?.().then(() => isReady.set(true));\n }\n }\n return grid;\n };\n\n const getPlugin = (): FilteringPlugin | undefined => {\n return getGrid()?.getPluginByName('filtering') as FilteringPlugin | undefined;\n };\n\n // Eagerly discover the grid after the first render so isReady updates\n // without requiring a programmatic method call. Falls back to a\n // MutationObserver for lazy-rendered tabs, *ngIf, @defer, etc.\n afterNextRender(() => {\n if (getGrid()) return;\n\n const host = elementRef.nativeElement as HTMLElement;\n const observer = new MutationObserver(() => {\n if (getGrid()) observer.disconnect();\n });\n observer.observe(host, { childList: true, subtree: true });\n\n destroyRef.onDestroy(() => observer.disconnect());\n });\n\n return {\n isReady: isReady.asReadonly(),\n\n setFilter: (field: string, filter: Omit<FilterModel, 'field'> | null) => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:filtering] FilteringPlugin not found.\\n\\n` +\n ` → Enable filtering on the grid:\\n` +\n ` <tbw-grid [filtering]=\"true\" />`,\n );\n return;\n }\n plugin.setFilter(field, filter);\n },\n\n getFilter: (field: string) => getPlugin()?.getFilter(field),\n\n getFilters: () => getPlugin()?.getFilters() ?? [],\n\n setFilterModel: (filters: FilterModel[]) => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:filtering] FilteringPlugin not found.\\n\\n` +\n ` → Enable filtering on the grid:\\n` +\n ` <tbw-grid [filtering]=\"true\" />`,\n );\n return;\n }\n plugin.setFilterModel(filters);\n },\n\n clearAllFilters: () => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:filtering] FilteringPlugin not found.\\n\\n` +\n ` → Enable filtering on the grid:\\n` +\n ` <tbw-grid [filtering]=\"true\" />`,\n );\n return;\n }\n plugin.clearAllFilters();\n },\n\n clearFieldFilter: (field: string) => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:filtering] FilteringPlugin not found.\\n\\n` +\n ` → Enable filtering on the grid:\\n` +\n ` <tbw-grid [filtering]=\"true\" />`,\n );\n return;\n }\n plugin.clearFieldFilter(field);\n },\n\n isFieldFiltered: (field: string) => getPlugin()?.isFieldFiltered(field) ?? false,\n\n getFilteredRowCount: () => getPlugin()?.getFilteredRowCount() ?? 0,\n\n getUniqueValues: (field: string) => getPlugin()?.getUniqueValues(field) ?? [],\n };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BG;AAkEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCG;SACa,mBAAmB,GAAA;AACjC,IAAA,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AACrC,IAAA,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AACrC,IAAA,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,mDAAC;IAE7B,IAAI,UAAU,GAA2B,IAAI;IAC7C,IAAI,mBAAmB,GAAG,KAAK;IAE/B,MAAM,OAAO,GAAG,MAA6B;AAC3C,QAAA,IAAI,UAAU;AAAE,YAAA,OAAO,UAAU;QAEjC,MAAM,I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AI,CAAC;AAElE,QAAA,eAAe,EAAE,CAAC,KAAa,KAAK,SAAS,EAAE,EAAE,eAAe,CAAC,KAAK,CAAC,IAAI,EAAE;KAC9E;AACH;;AC1OA;;AAEG;;;;"}
@@ -1,5 +1,4 @@
1
- import { GroupingColumnsPlugin } from '@toolbox-web/grid/plugins/grouping-columns';
2
- import { registerFeature } from '@toolbox-web/grid-angular';
1
+ import '@toolbox-web/grid/features/grouping-columns';
3
2
 
4
3
  /**
5
4
  * Column grouping feature for @toolbox-web/grid-angular
@@ -15,12 +14,6 @@ import { registerFeature } from '@toolbox-web/grid-angular';
15
14
  *
16
15
  * @packageDocumentation
17
16
  */
18
- registerFeature('groupingColumns', (config) => {
19
- if (config === true) {
20
- return new GroupingColumnsPlugin();
21
- }
22
- return new GroupingColumnsPlugin(config ?? undefined);
23
- });
24
17
 
25
18
  /**
26
19
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"toolbox-web-grid-angular-features-grouping-columns.mjs","sources":["../../../../libs/grid-angular/features/grouping-columns/src/index.ts","../../../../libs/grid-angular/features/grouping-columns/src/toolbox-web-grid-angular-features-grouping-columns.ts"],"sourcesContent":["/**\n * Column grouping feature for @toolbox-web/grid-angular\n *\n * Import this module to enable the `groupingColumns` input on Grid directive.\n *\n * @example\n * ```typescript\n * import '@toolbox-web/grid-angular/features/grouping-columns';\n *\n * <tbw-grid [groupingColumns]=\"{ columnGroups: [...] }\" />\n * ```\n *\n * @packageDocumentation\n */\n\nimport { GroupingColumnsPlugin } from '@toolbox-web/grid/plugins/grouping-columns';\nimport { registerFeature } from '@toolbox-web/grid-angular';\n\nregisterFeature('groupingColumns', (config) => {\n if (config === true) {\n return new GroupingColumnsPlugin();\n }\n return new GroupingColumnsPlugin(config ?? undefined);\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;AAaG;AAKH,eAAe,CAAC,iBAAiB,EAAE,CAAC,MAAM,KAAI;AAC5C,IAAA,IAAI,MAAM,KAAK,IAAI,EAAE;QACnB,OAAO,IAAI,qBAAqB,EAAE;IACpC;AACA,IAAA,OAAO,IAAI,qBAAqB,CAAC,MAAM,IAAI,SAAS,CAAC;AACvD,CAAC,CAAC;;ACvBF;;AAEG"}
1
+ {"version":3,"file":"toolbox-web-grid-angular-features-grouping-columns.mjs","sources":["../../../../libs/grid-angular/features/grouping-columns/src/index.ts","../../../../libs/grid-angular/features/grouping-columns/src/toolbox-web-grid-angular-features-grouping-columns.ts"],"sourcesContent":["/**\n * Column grouping feature for @toolbox-web/grid-angular\n *\n * Import this module to enable the `groupingColumns` input on Grid directive.\n *\n * @example\n * ```typescript\n * import '@toolbox-web/grid-angular/features/grouping-columns';\n *\n * <tbw-grid [groupingColumns]=\"{ columnGroups: [...] }\" />\n * ```\n *\n * @packageDocumentation\n */\n\nimport '@toolbox-web/grid/features/grouping-columns';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;AAaG;;ACbH;;AAEG"}
@@ -1,5 +1,4 @@
1
- import { GroupingRowsPlugin } from '@toolbox-web/grid/plugins/grouping-rows';
2
- import { registerFeature } from '@toolbox-web/grid-angular';
1
+ import '@toolbox-web/grid/features/grouping-rows';
3
2
 
4
3
  /**
5
4
  * Row grouping feature for @toolbox-web/grid-angular
@@ -15,9 +14,6 @@ import { registerFeature } from '@toolbox-web/grid-angular';
15
14
  *
16
15
  * @packageDocumentation
17
16
  */
18
- registerFeature('groupingRows', (config) => {
19
- return new GroupingRowsPlugin(config ?? undefined);
20
- });
21
17
 
22
18
  /**
23
19
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"toolbox-web-grid-angular-features-grouping-rows.mjs","sources":["../../../../libs/grid-angular/features/grouping-rows/src/index.ts","../../../../libs/grid-angular/features/grouping-rows/src/toolbox-web-grid-angular-features-grouping-rows.ts"],"sourcesContent":["/**\n * Row grouping feature for @toolbox-web/grid-angular\n *\n * Import this module to enable the `groupingRows` input on Grid directive.\n *\n * @example\n * ```typescript\n * import '@toolbox-web/grid-angular/features/grouping-rows';\n *\n * <tbw-grid [groupingRows]=\"{ groupBy: ['department'] }\" />\n * ```\n *\n * @packageDocumentation\n */\n\nimport { GroupingRowsPlugin } from '@toolbox-web/grid/plugins/grouping-rows';\nimport { registerFeature } from '@toolbox-web/grid-angular';\n\nregisterFeature('groupingRows', (config) => {\n return new GroupingRowsPlugin(config ?? undefined);\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;AAaG;AAKH,eAAe,CAAC,cAAc,EAAE,CAAC,MAAM,KAAI;AACzC,IAAA,OAAO,IAAI,kBAAkB,CAAC,MAAM,IAAI,SAAS,CAAC;AACpD,CAAC,CAAC;;ACpBF;;AAEG"}
1
+ {"version":3,"file":"toolbox-web-grid-angular-features-grouping-rows.mjs","sources":["../../../../libs/grid-angular/features/grouping-rows/src/index.ts","../../../../libs/grid-angular/features/grouping-rows/src/toolbox-web-grid-angular-features-grouping-rows.ts"],"sourcesContent":["/**\n * Row grouping feature for @toolbox-web/grid-angular\n *\n * Import this module to enable the `groupingRows` input on Grid directive.\n *\n * @example\n * ```typescript\n * import '@toolbox-web/grid-angular/features/grouping-rows';\n *\n * <tbw-grid [groupingRows]=\"{ groupBy: ['department'] }\" />\n * ```\n *\n * @packageDocumentation\n */\n\nimport '@toolbox-web/grid/features/grouping-rows';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;AAaG;;ACbH;;AAEG"}
@@ -1,5 +1,4 @@
1
- import { MasterDetailPlugin } from '@toolbox-web/grid/plugins/master-detail';
2
- import { registerFeature } from '@toolbox-web/grid-angular';
1
+ import '@toolbox-web/grid/features/master-detail';
3
2
 
4
3
  /**
5
4
  * Master-detail feature for @toolbox-web/grid-angular
@@ -15,9 +14,6 @@ import { registerFeature } from '@toolbox-web/grid-angular';
15
14
  *
16
15
  * @packageDocumentation
17
16
  */
18
- registerFeature('masterDetail', (config) => {
19
- return new MasterDetailPlugin(config ?? undefined);
20
- });
21
17
 
22
18
  /**
23
19
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"toolbox-web-grid-angular-features-master-detail.mjs","sources":["../../../../libs/grid-angular/features/master-detail/src/index.ts","../../../../libs/grid-angular/features/master-detail/src/toolbox-web-grid-angular-features-master-detail.ts"],"sourcesContent":["/**\n * Master-detail feature for @toolbox-web/grid-angular\n *\n * Import this module to enable the `masterDetail` input on Grid directive.\n *\n * @example\n * ```typescript\n * import '@toolbox-web/grid-angular/features/master-detail';\n *\n * <tbw-grid [masterDetail]=\"{ detailRenderer: myRenderer }\" />\n * ```\n *\n * @packageDocumentation\n */\n\nimport { MasterDetailPlugin } from '@toolbox-web/grid/plugins/master-detail';\nimport { registerFeature } from '@toolbox-web/grid-angular';\n\nregisterFeature('masterDetail', (config) => {\n return new MasterDetailPlugin(config ?? undefined);\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;AAaG;AAKH,eAAe,CAAC,cAAc,EAAE,CAAC,MAAM,KAAI;AACzC,IAAA,OAAO,IAAI,kBAAkB,CAAC,MAAM,IAAI,SAAS,CAAC;AACpD,CAAC,CAAC;;ACpBF;;AAEG"}
1
+ {"version":3,"file":"toolbox-web-grid-angular-features-master-detail.mjs","sources":["../../../../libs/grid-angular/features/master-detail/src/index.ts","../../../../libs/grid-angular/features/master-detail/src/toolbox-web-grid-angular-features-master-detail.ts"],"sourcesContent":["/**\n * Master-detail feature for @toolbox-web/grid-angular\n *\n * Import this module to enable the `masterDetail` input on Grid directive.\n *\n * @example\n * ```typescript\n * import '@toolbox-web/grid-angular/features/master-detail';\n *\n * <tbw-grid [masterDetail]=\"{ detailRenderer: myRenderer }\" />\n * ```\n *\n * @packageDocumentation\n */\n\nimport '@toolbox-web/grid/features/master-detail';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;AAaG;;ACbH;;AAEG"}
@@ -1,5 +1,4 @@
1
- import { MultiSortPlugin } from '@toolbox-web/grid/plugins/multi-sort';
2
- import { registerFeature } from '@toolbox-web/grid-angular';
1
+ import '@toolbox-web/grid/features/multi-sort';
3
2
 
4
3
  /**
5
4
  * Multi-sort feature for @toolbox-web/grid-angular
@@ -21,18 +20,6 @@ import { registerFeature } from '@toolbox-web/grid-angular';
21
20
  *
22
21
  * @packageDocumentation
23
22
  */
24
- registerFeature('multiSort', (config) => {
25
- // Handle shorthand: true, 'single', 'multi'
26
- if (config === true || config === 'multi') {
27
- return new MultiSortPlugin();
28
- }
29
- if (config === 'single') {
30
- return new MultiSortPlugin({ maxSortColumns: 1 });
31
- }
32
- // Full config object
33
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
34
- return new MultiSortPlugin(config);
35
- });
36
23
 
37
24
  /**
38
25
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"toolbox-web-grid-angular-features-multi-sort.mjs","sources":["../../../../libs/grid-angular/features/multi-sort/src/index.ts","../../../../libs/grid-angular/features/multi-sort/src/toolbox-web-grid-angular-features-multi-sort.ts"],"sourcesContent":["/**\n * Multi-sort feature for @toolbox-web/grid-angular\n *\n * Import this module to enable the `multiSort` input on Grid directive.\n * Multi-sort allows sorting by multiple columns simultaneously.\n *\n * For basic single-column sorting, columns with `sortable: true` work without this plugin.\n * Use `[sortable]=\"false\"` on the grid to disable all sorting.\n *\n * @example\n * ```typescript\n * import '@toolbox-web/grid-angular/features/multi-sort';\n *\n * <tbw-grid [multiSort]=\"true\" />\n * <tbw-grid [multiSort]=\"'single'\" />\n * <tbw-grid [multiSort]=\"{ maxSortColumns: 3 }\" />\n * ```\n *\n * @packageDocumentation\n */\n\nimport { MultiSortPlugin } from '@toolbox-web/grid/plugins/multi-sort';\nimport { registerFeature } from '@toolbox-web/grid-angular';\n\nregisterFeature('multiSort', (config) => {\n // Handle shorthand: true, 'single', 'multi'\n if (config === true || config === 'multi') {\n return new MultiSortPlugin();\n }\n if (config === 'single') {\n return new MultiSortPlugin({ maxSortColumns: 1 });\n }\n // Full config object\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return new MultiSortPlugin(config as any);\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;AAmBG;AAKH,eAAe,CAAC,WAAW,EAAE,CAAC,MAAM,KAAI;;IAEtC,IAAI,MAAM,KAAK,IAAI,IAAI,MAAM,KAAK,OAAO,EAAE;QACzC,OAAO,IAAI,eAAe,EAAE;IAC9B;AACA,IAAA,IAAI,MAAM,KAAK,QAAQ,EAAE;QACvB,OAAO,IAAI,eAAe,CAAC,EAAE,cAAc,EAAE,CAAC,EAAE,CAAC;IACnD;;;AAGA,IAAA,OAAO,IAAI,eAAe,CAAC,MAAa,CAAC;AAC3C,CAAC,CAAC;;ACnCF;;AAEG"}
1
+ {"version":3,"file":"toolbox-web-grid-angular-features-multi-sort.mjs","sources":["../../../../libs/grid-angular/features/multi-sort/src/index.ts","../../../../libs/grid-angular/features/multi-sort/src/toolbox-web-grid-angular-features-multi-sort.ts"],"sourcesContent":["/**\n * Multi-sort feature for @toolbox-web/grid-angular\n *\n * Import this module to enable the `multiSort` input on Grid directive.\n * Multi-sort allows sorting by multiple columns simultaneously.\n *\n * For basic single-column sorting, columns with `sortable: true` work without this plugin.\n * Use `[sortable]=\"false\"` on the grid to disable all sorting.\n *\n * @example\n * ```typescript\n * import '@toolbox-web/grid-angular/features/multi-sort';\n *\n * <tbw-grid [multiSort]=\"true\" />\n * <tbw-grid [multiSort]=\"'single'\" />\n * <tbw-grid [multiSort]=\"{ maxSortColumns: 3 }\" />\n * ```\n *\n * @packageDocumentation\n */\n\nimport '@toolbox-web/grid/features/multi-sort';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;;;;;;AAmBG;;ACnBH;;AAEG"}
@@ -1,5 +1,4 @@
1
- import { PinnedColumnsPlugin } from '@toolbox-web/grid/plugins/pinned-columns';
2
- import { registerFeature } from '@toolbox-web/grid-angular';
1
+ import '@toolbox-web/grid/features/pinned-columns';
3
2
 
4
3
  /**
5
4
  * Pinned columns feature for @toolbox-web/grid-angular
@@ -18,9 +17,6 @@ import { registerFeature } from '@toolbox-web/grid-angular';
18
17
  *
19
18
  * @packageDocumentation
20
19
  */
21
- registerFeature('pinnedColumns', () => {
22
- return new PinnedColumnsPlugin();
23
- });
24
20
 
25
21
  /**
26
22
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"toolbox-web-grid-angular-features-pinned-columns.mjs","sources":["../../../../libs/grid-angular/features/pinned-columns/src/index.ts","../../../../libs/grid-angular/features/pinned-columns/src/toolbox-web-grid-angular-features-pinned-columns.ts"],"sourcesContent":["/**\n * Pinned columns feature for @toolbox-web/grid-angular\n *\n * Import this module to enable the `pinnedColumns` input on Grid directive.\n *\n * @example\n * ```typescript\n * import '@toolbox-web/grid-angular/features/pinned-columns';\n *\n * <tbw-grid [pinnedColumns]=\"true\" [columns]=\"[\n * { field: 'id', pinned: 'left' },\n * { field: 'name' }\n * ]\" />\n * ```\n *\n * @packageDocumentation\n */\n\nimport { PinnedColumnsPlugin } from '@toolbox-web/grid/plugins/pinned-columns';\nimport { registerFeature } from '@toolbox-web/grid-angular';\n\nregisterFeature('pinnedColumns', () => {\n return new PinnedColumnsPlugin();\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;AAgBG;AAKH,eAAe,CAAC,eAAe,EAAE,MAAK;IACpC,OAAO,IAAI,mBAAmB,EAAE;AAClC,CAAC,CAAC;;ACvBF;;AAEG"}
1
+ {"version":3,"file":"toolbox-web-grid-angular-features-pinned-columns.mjs","sources":["../../../../libs/grid-angular/features/pinned-columns/src/index.ts","../../../../libs/grid-angular/features/pinned-columns/src/toolbox-web-grid-angular-features-pinned-columns.ts"],"sourcesContent":["/**\n * Pinned columns feature for @toolbox-web/grid-angular\n *\n * Import this module to enable the `pinnedColumns` input on Grid directive.\n *\n * @example\n * ```typescript\n * import '@toolbox-web/grid-angular/features/pinned-columns';\n *\n * <tbw-grid [pinnedColumns]=\"true\" [columns]=\"[\n * { field: 'id', pinned: 'left' },\n * { field: 'name' }\n * ]\" />\n * ```\n *\n * @packageDocumentation\n */\n\nimport '@toolbox-web/grid/features/pinned-columns';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;;;AAgBG;;AChBH;;AAEG"}
@@ -1,5 +1,4 @@
1
- import { PinnedRowsPlugin } from '@toolbox-web/grid/plugins/pinned-rows';
2
- import { registerFeature } from '@toolbox-web/grid-angular';
1
+ import '@toolbox-web/grid/features/pinned-rows';
3
2
 
4
3
  /**
5
4
  * Pinned rows feature for @toolbox-web/grid-angular
@@ -15,12 +14,6 @@ import { registerFeature } from '@toolbox-web/grid-angular';
15
14
  *
16
15
  * @packageDocumentation
17
16
  */
18
- registerFeature('pinnedRows', (config) => {
19
- if (config === true) {
20
- return new PinnedRowsPlugin();
21
- }
22
- return new PinnedRowsPlugin(config ?? undefined);
23
- });
24
17
 
25
18
  /**
26
19
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"toolbox-web-grid-angular-features-pinned-rows.mjs","sources":["../../../../libs/grid-angular/features/pinned-rows/src/index.ts","../../../../libs/grid-angular/features/pinned-rows/src/toolbox-web-grid-angular-features-pinned-rows.ts"],"sourcesContent":["/**\n * Pinned rows feature for @toolbox-web/grid-angular\n *\n * Import this module to enable the `pinnedRows` input on Grid directive.\n *\n * @example\n * ```typescript\n * import '@toolbox-web/grid-angular/features/pinned-rows';\n *\n * <tbw-grid [pinnedRows]=\"{ bottom: [{ type: 'aggregation' }] }\" />\n * ```\n *\n * @packageDocumentation\n */\n\nimport { PinnedRowsPlugin } from '@toolbox-web/grid/plugins/pinned-rows';\nimport { registerFeature } from '@toolbox-web/grid-angular';\n\nregisterFeature('pinnedRows', (config) => {\n if (config === true) {\n return new PinnedRowsPlugin();\n }\n return new PinnedRowsPlugin(config ?? undefined);\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;AAaG;AAKH,eAAe,CAAC,YAAY,EAAE,CAAC,MAAM,KAAI;AACvC,IAAA,IAAI,MAAM,KAAK,IAAI,EAAE;QACnB,OAAO,IAAI,gBAAgB,EAAE;IAC/B;AACA,IAAA,OAAO,IAAI,gBAAgB,CAAC,MAAM,IAAI,SAAS,CAAC;AAClD,CAAC,CAAC;;ACvBF;;AAEG"}
1
+ {"version":3,"file":"toolbox-web-grid-angular-features-pinned-rows.mjs","sources":["../../../../libs/grid-angular/features/pinned-rows/src/index.ts","../../../../libs/grid-angular/features/pinned-rows/src/toolbox-web-grid-angular-features-pinned-rows.ts"],"sourcesContent":["/**\n * Pinned rows feature for @toolbox-web/grid-angular\n *\n * Import this module to enable the `pinnedRows` input on Grid directive.\n *\n * @example\n * ```typescript\n * import '@toolbox-web/grid-angular/features/pinned-rows';\n *\n * <tbw-grid [pinnedRows]=\"{ bottom: [{ type: 'aggregation' }] }\" />\n * ```\n *\n * @packageDocumentation\n */\n\nimport '@toolbox-web/grid/features/pinned-rows';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;AAaG;;ACbH;;AAEG"}