@toolbox-web/grid-angular 0.7.0 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/toolbox-web-grid-angular-features-clipboard.mjs +30 -0
- package/fesm2022/toolbox-web-grid-angular-features-clipboard.mjs.map +1 -0
- package/fesm2022/toolbox-web-grid-angular-features-column-virtualization.mjs +28 -0
- package/fesm2022/toolbox-web-grid-angular-features-column-virtualization.mjs.map +1 -0
- package/fesm2022/toolbox-web-grid-angular-features-context-menu.mjs +28 -0
- package/fesm2022/toolbox-web-grid-angular-features-context-menu.mjs.map +1 -0
- package/fesm2022/toolbox-web-grid-angular-features-editing.mjs +33 -0
- package/fesm2022/toolbox-web-grid-angular-features-editing.mjs.map +1 -0
- package/fesm2022/toolbox-web-grid-angular-features-export.mjs +29 -0
- package/fesm2022/toolbox-web-grid-angular-features-export.mjs.map +1 -0
- package/fesm2022/toolbox-web-grid-angular-features-filtering.mjs +29 -0
- package/fesm2022/toolbox-web-grid-angular-features-filtering.mjs.map +1 -0
- package/fesm2022/toolbox-web-grid-angular-features-grouping-columns.mjs +28 -0
- package/fesm2022/toolbox-web-grid-angular-features-grouping-columns.mjs.map +1 -0
- package/fesm2022/toolbox-web-grid-angular-features-grouping-rows.mjs +25 -0
- package/fesm2022/toolbox-web-grid-angular-features-grouping-rows.mjs.map +1 -0
- package/fesm2022/toolbox-web-grid-angular-features-master-detail.mjs +25 -0
- package/fesm2022/toolbox-web-grid-angular-features-master-detail.mjs.map +1 -0
- package/fesm2022/toolbox-web-grid-angular-features-multi-sort.mjs +40 -0
- package/fesm2022/toolbox-web-grid-angular-features-multi-sort.mjs.map +1 -0
- package/{features/pinned-columns.d.ts → fesm2022/toolbox-web-grid-angular-features-pinned-columns.mjs} +11 -2
- package/fesm2022/toolbox-web-grid-angular-features-pinned-columns.mjs.map +1 -0
- package/fesm2022/toolbox-web-grid-angular-features-pinned-rows.mjs +28 -0
- package/fesm2022/toolbox-web-grid-angular-features-pinned-rows.mjs.map +1 -0
- package/fesm2022/toolbox-web-grid-angular-features-pivot.mjs +25 -0
- package/fesm2022/toolbox-web-grid-angular-features-pivot.mjs.map +1 -0
- package/fesm2022/toolbox-web-grid-angular-features-print.mjs +28 -0
- package/fesm2022/toolbox-web-grid-angular-features-print.mjs.map +1 -0
- package/fesm2022/toolbox-web-grid-angular-features-reorder.mjs +28 -0
- package/fesm2022/toolbox-web-grid-angular-features-reorder.mjs.map +1 -0
- package/fesm2022/toolbox-web-grid-angular-features-responsive.mjs +28 -0
- package/fesm2022/toolbox-web-grid-angular-features-responsive.mjs.map +1 -0
- package/fesm2022/toolbox-web-grid-angular-features-row-reorder.mjs +28 -0
- package/fesm2022/toolbox-web-grid-angular-features-row-reorder.mjs.map +1 -0
- package/fesm2022/toolbox-web-grid-angular-features-selection.mjs +30 -0
- package/fesm2022/toolbox-web-grid-angular-features-selection.mjs.map +1 -0
- package/fesm2022/toolbox-web-grid-angular-features-server-side.mjs +25 -0
- package/fesm2022/toolbox-web-grid-angular-features-server-side.mjs.map +1 -0
- package/fesm2022/toolbox-web-grid-angular-features-sorting.mjs +25 -0
- package/fesm2022/toolbox-web-grid-angular-features-sorting.mjs.map +1 -0
- package/fesm2022/toolbox-web-grid-angular-features-tree.mjs +28 -0
- package/fesm2022/toolbox-web-grid-angular-features-tree.mjs.map +1 -0
- package/fesm2022/toolbox-web-grid-angular-features-undo-redo.mjs +30 -0
- package/fesm2022/toolbox-web-grid-angular-features-undo-redo.mjs.map +1 -0
- package/fesm2022/toolbox-web-grid-angular-features-visibility.mjs +28 -0
- package/fesm2022/toolbox-web-grid-angular-features-visibility.mjs.map +1 -0
- package/fesm2022/toolbox-web-grid-angular.mjs +3189 -0
- package/fesm2022/toolbox-web-grid-angular.mjs.map +1 -0
- package/package.json +109 -35
- package/types/toolbox-web-grid-angular-features-clipboard.d.ts +3 -0
- package/types/toolbox-web-grid-angular-features-clipboard.d.ts.map +1 -0
- package/types/toolbox-web-grid-angular-features-column-virtualization.d.ts +3 -0
- package/types/toolbox-web-grid-angular-features-column-virtualization.d.ts.map +1 -0
- package/types/toolbox-web-grid-angular-features-context-menu.d.ts +3 -0
- package/types/toolbox-web-grid-angular-features-context-menu.d.ts.map +1 -0
- package/types/toolbox-web-grid-angular-features-editing.d.ts +3 -0
- package/types/toolbox-web-grid-angular-features-editing.d.ts.map +1 -0
- package/types/toolbox-web-grid-angular-features-export.d.ts +3 -0
- package/types/toolbox-web-grid-angular-features-export.d.ts.map +1 -0
- package/types/toolbox-web-grid-angular-features-filtering.d.ts +3 -0
- package/types/toolbox-web-grid-angular-features-filtering.d.ts.map +1 -0
- package/types/toolbox-web-grid-angular-features-grouping-columns.d.ts +3 -0
- package/types/toolbox-web-grid-angular-features-grouping-columns.d.ts.map +1 -0
- package/types/toolbox-web-grid-angular-features-grouping-rows.d.ts +3 -0
- package/types/toolbox-web-grid-angular-features-grouping-rows.d.ts.map +1 -0
- package/types/toolbox-web-grid-angular-features-master-detail.d.ts +3 -0
- package/types/toolbox-web-grid-angular-features-master-detail.d.ts.map +1 -0
- package/types/toolbox-web-grid-angular-features-multi-sort.d.ts +3 -0
- package/types/toolbox-web-grid-angular-features-multi-sort.d.ts.map +1 -0
- package/types/toolbox-web-grid-angular-features-pinned-columns.d.ts +3 -0
- package/types/toolbox-web-grid-angular-features-pinned-columns.d.ts.map +1 -0
- package/types/toolbox-web-grid-angular-features-pinned-rows.d.ts +3 -0
- package/types/toolbox-web-grid-angular-features-pinned-rows.d.ts.map +1 -0
- package/types/toolbox-web-grid-angular-features-pivot.d.ts +3 -0
- package/types/toolbox-web-grid-angular-features-pivot.d.ts.map +1 -0
- package/types/toolbox-web-grid-angular-features-print.d.ts +3 -0
- package/types/toolbox-web-grid-angular-features-print.d.ts.map +1 -0
- package/types/toolbox-web-grid-angular-features-reorder.d.ts +3 -0
- package/types/toolbox-web-grid-angular-features-reorder.d.ts.map +1 -0
- package/types/toolbox-web-grid-angular-features-responsive.d.ts +3 -0
- package/types/toolbox-web-grid-angular-features-responsive.d.ts.map +1 -0
- package/types/toolbox-web-grid-angular-features-row-reorder.d.ts +3 -0
- package/types/toolbox-web-grid-angular-features-row-reorder.d.ts.map +1 -0
- package/types/toolbox-web-grid-angular-features-selection.d.ts +3 -0
- package/types/toolbox-web-grid-angular-features-selection.d.ts.map +1 -0
- package/types/toolbox-web-grid-angular-features-server-side.d.ts +3 -0
- package/types/toolbox-web-grid-angular-features-server-side.d.ts.map +1 -0
- package/types/toolbox-web-grid-angular-features-sorting.d.ts +3 -0
- package/types/toolbox-web-grid-angular-features-sorting.d.ts.map +1 -0
- package/types/toolbox-web-grid-angular-features-tree.d.ts +3 -0
- package/types/toolbox-web-grid-angular-features-tree.d.ts.map +1 -0
- package/types/toolbox-web-grid-angular-features-undo-redo.d.ts +3 -0
- package/types/toolbox-web-grid-angular-features-undo-redo.d.ts.map +1 -0
- package/types/toolbox-web-grid-angular-features-visibility.d.ts +3 -0
- package/types/toolbox-web-grid-angular-features-visibility.d.ts.map +1 -0
- package/types/toolbox-web-grid-angular.d.ts +2325 -0
- package/types/toolbox-web-grid-angular.d.ts.map +1 -0
- package/feature-registry-C-cKloXB.js +0 -45
- package/features/clipboard.d.ts +0 -18
- package/features/clipboard.d.ts.map +0 -1
- package/features/clipboard.js +0 -3
- package/features/column-virtualization.d.ts +0 -16
- package/features/column-virtualization.d.ts.map +0 -1
- package/features/column-virtualization.js +0 -3
- package/features/context-menu.d.ts +0 -16
- package/features/context-menu.d.ts.map +0 -1
- package/features/context-menu.js +0 -3
- package/features/editing.d.ts +0 -16
- package/features/editing.d.ts.map +0 -1
- package/features/editing.js +0 -3
- package/features/export.d.ts +0 -17
- package/features/export.d.ts.map +0 -1
- package/features/export.js +0 -3
- package/features/filtering.d.ts +0 -17
- package/features/filtering.d.ts.map +0 -1
- package/features/filtering.js +0 -3
- package/features/grouping-columns.d.ts +0 -16
- package/features/grouping-columns.d.ts.map +0 -1
- package/features/grouping-columns.js +0 -3
- package/features/grouping-rows.d.ts +0 -16
- package/features/grouping-rows.d.ts.map +0 -1
- package/features/grouping-rows.js +0 -3
- package/features/index.d.ts +0 -1
- package/features/index.d.ts.map +0 -1
- package/features/index.js +0 -22
- package/features/master-detail.d.ts +0 -16
- package/features/master-detail.d.ts.map +0 -1
- package/features/master-detail.js +0 -3
- package/features/multi-sort.d.ts +0 -22
- package/features/multi-sort.d.ts.map +0 -1
- package/features/pinned-columns.d.ts.map +0 -1
- package/features/pinned-columns.js +0 -3
- package/features/pinned-rows.d.ts +0 -16
- package/features/pinned-rows.d.ts.map +0 -1
- package/features/pinned-rows.js +0 -3
- package/features/pivot.d.ts +0 -16
- package/features/pivot.d.ts.map +0 -1
- package/features/pivot.js +0 -3
- package/features/print.d.ts +0 -16
- package/features/print.d.ts.map +0 -1
- package/features/print.js +0 -3
- package/features/reorder.d.ts +0 -16
- package/features/reorder.d.ts.map +0 -1
- package/features/reorder.js +0 -3
- package/features/responsive.d.ts +0 -16
- package/features/responsive.d.ts.map +0 -1
- package/features/responsive.js +0 -3
- package/features/row-reorder.d.ts +0 -16
- package/features/row-reorder.d.ts.map +0 -1
- package/features/row-reorder.js +0 -3
- package/features/selection.d.ts +0 -16
- package/features/selection.d.ts.map +0 -1
- package/features/selection.js +0 -3
- package/features/server-side.d.ts +0 -16
- package/features/server-side.d.ts.map +0 -1
- package/features/server-side.js +0 -3
- package/features/sorting.d.ts +0 -1
- package/features/sorting.d.ts.map +0 -1
- package/features/sorting.js +0 -1
- package/features/tree.d.ts +0 -16
- package/features/tree.d.ts.map +0 -1
- package/features/tree.js +0 -3
- package/features/undo-redo.d.ts +0 -18
- package/features/undo-redo.d.ts.map +0 -1
- package/features/undo-redo.js +0 -3
- package/features/visibility.d.ts +0 -16
- package/features/visibility.d.ts.map +0 -1
- package/features/visibility.js +0 -3
- package/index.d.ts +0 -34
- package/index.d.ts.map +0 -1
- package/index.js +0 -1916
- package/lib/angular-column-config.d.ts +0 -140
- package/lib/angular-column-config.d.ts.map +0 -1
- package/lib/angular-grid-adapter.d.ts +0 -220
- package/lib/angular-grid-adapter.d.ts.map +0 -1
- package/lib/base-grid-editor.d.ts +0 -145
- package/lib/base-grid-editor.d.ts.map +0 -1
- package/lib/component-registry.d.ts +0 -63
- package/lib/component-registry.d.ts.map +0 -1
- package/lib/directives/grid-column-editor.directive.d.ts +0 -113
- package/lib/directives/grid-column-editor.directive.d.ts.map +0 -1
- package/lib/directives/grid-column-view.directive.d.ts +0 -69
- package/lib/directives/grid-column-view.directive.d.ts.map +0 -1
- package/lib/directives/grid-detail-view.directive.d.ts +0 -75
- package/lib/directives/grid-detail-view.directive.d.ts.map +0 -1
- package/lib/directives/grid-form-array.directive.d.ts +0 -141
- package/lib/directives/grid-form-array.directive.d.ts.map +0 -1
- package/lib/directives/grid-responsive-card.directive.d.ts +0 -92
- package/lib/directives/grid-responsive-card.directive.d.ts.map +0 -1
- package/lib/directives/grid-tool-panel.directive.d.ts +0 -91
- package/lib/directives/grid-tool-panel.directive.d.ts.map +0 -1
- package/lib/directives/grid.directive.d.ts +0 -808
- package/lib/directives/grid.directive.d.ts.map +0 -1
- package/lib/directives/index.d.ts +0 -9
- package/lib/directives/index.d.ts.map +0 -1
- package/lib/directives/structural-directives.d.ts +0 -174
- package/lib/directives/structural-directives.d.ts.map +0 -1
- package/lib/feature-registry.d.ts +0 -72
- package/lib/feature-registry.d.ts.map +0 -1
- package/lib/grid-type-registry.d.ts +0 -110
- package/lib/grid-type-registry.d.ts.map +0 -1
- package/lib/inject-grid.d.ts +0 -109
- package/lib/inject-grid.d.ts.map +0 -1
- package/lib/interfaces/grid-cell-editor.d.ts +0 -85
- package/lib/interfaces/grid-cell-editor.d.ts.map +0 -1
- package/lib/interfaces/grid-cell-renderer.d.ts +0 -63
- package/lib/interfaces/grid-cell-renderer.d.ts.map +0 -1
- package/lib/interfaces/index.d.ts +0 -5
- package/lib/interfaces/index.d.ts.map +0 -1
- package/multi-sort-DPbW58yz.js +0 -3
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import { EventEmitter, TemplateRef } from '@angular/core';
|
|
2
|
-
import { AbstractControl } from '@angular/forms';
|
|
3
|
-
/**
|
|
4
|
-
* Context object passed to the cell editor template.
|
|
5
|
-
* Contains the cell value, row data, column configuration, and commit/cancel functions.
|
|
6
|
-
*/
|
|
7
|
-
export interface GridEditorContext<TValue = unknown, TRow = unknown> {
|
|
8
|
-
/** The cell value for this column */
|
|
9
|
-
$implicit: TValue;
|
|
10
|
-
/** The cell value (explicit binding) */
|
|
11
|
-
value: TValue;
|
|
12
|
-
/** The full row data object */
|
|
13
|
-
row: TRow;
|
|
14
|
-
/** The column configuration */
|
|
15
|
-
column: unknown;
|
|
16
|
-
/**
|
|
17
|
-
* Callback function to commit the edited value.
|
|
18
|
-
* Use with Angular event binding: `(commit)="onCommit($event)"`
|
|
19
|
-
*/
|
|
20
|
-
onCommit: (value: TValue) => void;
|
|
21
|
-
/**
|
|
22
|
-
* Callback function to cancel editing.
|
|
23
|
-
* Use with Angular event binding: `(cancel)="onCancel()"`
|
|
24
|
-
*/
|
|
25
|
-
onCancel: () => void;
|
|
26
|
-
/**
|
|
27
|
-
* The FormControl for this cell, if the grid is bound to a FormArray with FormGroups.
|
|
28
|
-
*
|
|
29
|
-
* This allows custom editors to bind directly to the control for validation display:
|
|
30
|
-
* ```html
|
|
31
|
-
* <input *tbwEditor="let value; control as ctrl"
|
|
32
|
-
* [formControl]="ctrl"
|
|
33
|
-
* [class.is-invalid]="ctrl?.invalid && ctrl?.touched" />
|
|
34
|
-
* ```
|
|
35
|
-
*
|
|
36
|
-
* Returns `undefined` if:
|
|
37
|
-
* - The grid is not bound to a FormArray
|
|
38
|
-
* - The FormArray doesn't contain FormGroups
|
|
39
|
-
* - The field doesn't exist in the FormGroup
|
|
40
|
-
*/
|
|
41
|
-
control?: AbstractControl;
|
|
42
|
-
/**
|
|
43
|
-
* @deprecated Use `onCommit` callback function instead. Will be removed in v2.0.
|
|
44
|
-
* EventEmitter for commit - requires `.emit()` call.
|
|
45
|
-
*/
|
|
46
|
-
commit: EventEmitter<TValue>;
|
|
47
|
-
/**
|
|
48
|
-
* @deprecated Use `onCancel` callback function instead. Will be removed in v2.0.
|
|
49
|
-
* EventEmitter for cancel - requires `.emit()` call.
|
|
50
|
-
*/
|
|
51
|
-
cancel: EventEmitter<void>;
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Gets the editor template registered for a given element.
|
|
55
|
-
* Used by AngularGridAdapter to retrieve templates at render time.
|
|
56
|
-
*/
|
|
57
|
-
export declare function getEditorTemplate(element: HTMLElement): TemplateRef<GridEditorContext> | undefined;
|
|
58
|
-
/**
|
|
59
|
-
* Directive that captures an `<ng-template>` for use as a cell editor.
|
|
60
|
-
*
|
|
61
|
-
* This enables declarative Angular component usage with proper input bindings
|
|
62
|
-
* that satisfy Angular's AOT compiler.
|
|
63
|
-
*
|
|
64
|
-
* ## Usage
|
|
65
|
-
*
|
|
66
|
-
* ```html
|
|
67
|
-
* <tbw-grid-column field="status" editable>
|
|
68
|
-
* <tbw-grid-column-editor>
|
|
69
|
-
* <ng-template let-value let-row="row" let-onCommit="onCommit" let-onCancel="onCancel">
|
|
70
|
-
* <app-status-select
|
|
71
|
-
* [value]="value"
|
|
72
|
-
* [row]="row"
|
|
73
|
-
* (commit)="onCommit($event)"
|
|
74
|
-
* (cancel)="onCancel()"
|
|
75
|
-
* />
|
|
76
|
-
* </ng-template>
|
|
77
|
-
* </tbw-grid-column-editor>
|
|
78
|
-
* </tbw-grid-column>
|
|
79
|
-
* ```
|
|
80
|
-
*
|
|
81
|
-
* The template context provides:
|
|
82
|
-
* - `$implicit` / `value`: The cell value
|
|
83
|
-
* - `row`: The full row data object
|
|
84
|
-
* - `column`: The column configuration
|
|
85
|
-
* - `onCommit`: Callback function to commit the new value
|
|
86
|
-
* - `onCancel`: Callback function to cancel editing
|
|
87
|
-
*
|
|
88
|
-
* Import the directive in your component:
|
|
89
|
-
*
|
|
90
|
-
* ```typescript
|
|
91
|
-
* import { GridColumnEditor } from '@toolbox-web/grid-angular';
|
|
92
|
-
*
|
|
93
|
-
* @Component({
|
|
94
|
-
* imports: [GridColumnEditor],
|
|
95
|
-
* // ...
|
|
96
|
-
* })
|
|
97
|
-
* ```
|
|
98
|
-
*/
|
|
99
|
-
export declare class GridColumnEditor {
|
|
100
|
-
private elementRef;
|
|
101
|
-
/**
|
|
102
|
-
* Query for the ng-template content child.
|
|
103
|
-
*/
|
|
104
|
-
template: import('@angular/core').Signal<TemplateRef<any> | undefined>;
|
|
105
|
-
/** Effect that triggers when the template is available */
|
|
106
|
-
private onTemplateReceived;
|
|
107
|
-
/**
|
|
108
|
-
* Static type guard for template context.
|
|
109
|
-
* Enables type inference in templates.
|
|
110
|
-
*/
|
|
111
|
-
static ngTemplateContextGuard(dir: GridColumnEditor, ctx: unknown): ctx is GridEditorContext;
|
|
112
|
-
}
|
|
113
|
-
//# sourceMappingURL=grid-column-editor.directive.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"grid-column-editor.directive.d.ts","sourceRoot":"","sources":["../../../../../libs/grid-angular/src/lib/directives/grid-column-editor.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+C,YAAY,EAAU,WAAW,EAAE,MAAM,eAAe,CAAC;AAC/G,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD;;;GAGG;AACH,MAAM,WAAW,iBAAiB,CAAC,MAAM,GAAG,OAAO,EAAE,IAAI,GAAG,OAAO;IACjE,qCAAqC;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,+BAA+B;IAC/B,GAAG,EAAE,IAAI,CAAC;IACV,+BAA+B;IAC/B,MAAM,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC;;;OAGG;IACH,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B;;;OAGG;IACH,MAAM,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IAC7B;;;OAGG;IACH,MAAM,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC;CAC5B;AAKD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,WAAW,GAAG,WAAW,CAAC,iBAAiB,CAAC,GAAG,SAAS,CAElG;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,qBACa,gBAAgB;IAC3B,OAAO,CAAC,UAAU,CAAmC;IAErD;;OAEG;IACH,QAAQ,+DAAgD;IAExD,0DAA0D;IAC1D,OAAO,CAAC,kBAAkB,CAMvB;IAEH;;;OAGG;IACH,MAAM,CAAC,sBAAsB,CAAC,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,iBAAiB;CAG7F"}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { TemplateRef } from '@angular/core';
|
|
2
|
-
/**
|
|
3
|
-
* Context object passed to the cell renderer template.
|
|
4
|
-
* Contains the cell value, row data, and column configuration.
|
|
5
|
-
*/
|
|
6
|
-
export interface GridCellContext<TValue = unknown, TRow = unknown> {
|
|
7
|
-
/** The cell value for this column */
|
|
8
|
-
$implicit: TValue;
|
|
9
|
-
/** The cell value (explicit binding) */
|
|
10
|
-
value: TValue;
|
|
11
|
-
/** The full row data object */
|
|
12
|
-
row: TRow;
|
|
13
|
-
/** The column configuration */
|
|
14
|
-
column: unknown;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Gets the template registered for a given element.
|
|
18
|
-
* Used by AngularGridAdapter to retrieve templates at render time.
|
|
19
|
-
*/
|
|
20
|
-
export declare function getViewTemplate(element: HTMLElement): TemplateRef<GridCellContext> | undefined;
|
|
21
|
-
/**
|
|
22
|
-
* Directive that captures an `<ng-template>` for use as a cell renderer.
|
|
23
|
-
*
|
|
24
|
-
* This enables declarative Angular component usage with proper input bindings
|
|
25
|
-
* that satisfy Angular's AOT compiler.
|
|
26
|
-
*
|
|
27
|
-
* ## Usage
|
|
28
|
-
*
|
|
29
|
-
* ```html
|
|
30
|
-
* <tbw-grid-column field="status">
|
|
31
|
-
* <tbw-grid-column-view>
|
|
32
|
-
* <ng-template let-value let-row="row">
|
|
33
|
-
* <app-status-badge [value]="value" [row]="row" />
|
|
34
|
-
* </ng-template>
|
|
35
|
-
* </tbw-grid-column-view>
|
|
36
|
-
* </tbw-grid-column>
|
|
37
|
-
* ```
|
|
38
|
-
*
|
|
39
|
-
* The template context provides:
|
|
40
|
-
* - `$implicit` / `value`: The cell value
|
|
41
|
-
* - `row`: The full row data object
|
|
42
|
-
* - `column`: The column configuration
|
|
43
|
-
*
|
|
44
|
-
* Import the directive in your component:
|
|
45
|
-
*
|
|
46
|
-
* ```typescript
|
|
47
|
-
* import { GridColumnView } from '@toolbox-web/grid-angular';
|
|
48
|
-
*
|
|
49
|
-
* @Component({
|
|
50
|
-
* imports: [GridColumnView],
|
|
51
|
-
* // ...
|
|
52
|
-
* })
|
|
53
|
-
* ```
|
|
54
|
-
*/
|
|
55
|
-
export declare class GridColumnView {
|
|
56
|
-
private elementRef;
|
|
57
|
-
/**
|
|
58
|
-
* Query for the ng-template content child.
|
|
59
|
-
*/
|
|
60
|
-
template: import('@angular/core').Signal<TemplateRef<any> | undefined>;
|
|
61
|
-
/** Effect that triggers when the template is available */
|
|
62
|
-
private onTemplateReceived;
|
|
63
|
-
/**
|
|
64
|
-
* Static type guard for template context.
|
|
65
|
-
* Enables type inference in templates.
|
|
66
|
-
*/
|
|
67
|
-
static ngTemplateContextGuard(dir: GridColumnView, ctx: unknown): ctx is GridCellContext;
|
|
68
|
-
}
|
|
69
|
-
//# sourceMappingURL=grid-column-view.directive.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"grid-column-view.directive.d.ts","sourceRoot":"","sources":["../../../../../libs/grid-angular/src/lib/directives/grid-column-view.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuD,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjG;;;GAGG;AACH,MAAM,WAAW,eAAe,CAAC,MAAM,GAAG,OAAO,EAAE,IAAI,GAAG,OAAO;IAC/D,qCAAqC;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,+BAA+B;IAC/B,GAAG,EAAE,IAAI,CAAC;IACV,+BAA+B;IAC/B,MAAM,EAAE,OAAO,CAAC;CACjB;AAKD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,WAAW,GAAG,WAAW,CAAC,eAAe,CAAC,GAAG,SAAS,CAE9F;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,qBACa,cAAc;IACzB,OAAO,CAAC,UAAU,CAAmC;IAErD;;OAEG;IACH,QAAQ,+DAA8C;IAEtD,0DAA0D;IAC1D,OAAO,CAAC,kBAAkB,CAMvB;IAEH;;;OAGG;IACH,MAAM,CAAC,sBAAsB,CAAC,GAAG,EAAE,cAAc,EAAE,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,eAAe;CAGzF"}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { TemplateRef } from '@angular/core';
|
|
2
|
-
import { ExpandCollapseAnimation } from '@toolbox-web/grid';
|
|
3
|
-
/**
|
|
4
|
-
* Context object passed to the detail renderer template.
|
|
5
|
-
* Contains the row data for the expanded detail view.
|
|
6
|
-
*/
|
|
7
|
-
export interface GridDetailContext<TRow = unknown> {
|
|
8
|
-
/** The row data (implicit binding for let-row) */
|
|
9
|
-
$implicit: TRow;
|
|
10
|
-
/** The row data (explicit binding) */
|
|
11
|
-
row: TRow;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Gets the detail template registered for a given grid element.
|
|
15
|
-
* Used by AngularGridAdapter to retrieve templates at render time.
|
|
16
|
-
*/
|
|
17
|
-
export declare function getDetailTemplate(gridElement: HTMLElement): TemplateRef<GridDetailContext> | undefined;
|
|
18
|
-
/**
|
|
19
|
-
* Gets the configuration for the detail view.
|
|
20
|
-
*/
|
|
21
|
-
export declare function getDetailConfig(gridElement: HTMLElement): {
|
|
22
|
-
showExpandColumn?: boolean;
|
|
23
|
-
animation?: ExpandCollapseAnimation;
|
|
24
|
-
} | undefined;
|
|
25
|
-
/**
|
|
26
|
-
* Directive that captures an `<ng-template>` for use as a master-detail row renderer.
|
|
27
|
-
*
|
|
28
|
-
* This enables declarative Angular component usage for expandable detail rows
|
|
29
|
-
* that appear below the main row when expanded.
|
|
30
|
-
*
|
|
31
|
-
* ## Usage
|
|
32
|
-
*
|
|
33
|
-
* ```html
|
|
34
|
-
* <tbw-grid [rows]="rows" [gridConfig]="config">
|
|
35
|
-
* <tbw-grid-detail [showExpandColumn]="true" animation="slide">
|
|
36
|
-
* <ng-template let-row>
|
|
37
|
-
* <app-detail-panel [employee]="row" />
|
|
38
|
-
* </ng-template>
|
|
39
|
-
* </tbw-grid-detail>
|
|
40
|
-
* </tbw-grid>
|
|
41
|
-
* ```
|
|
42
|
-
*
|
|
43
|
-
* The template context provides:
|
|
44
|
-
* - `$implicit` / `row`: The full row data object
|
|
45
|
-
*
|
|
46
|
-
* Import the directive in your component:
|
|
47
|
-
*
|
|
48
|
-
* ```typescript
|
|
49
|
-
* import { GridDetailView } from '@toolbox-web/grid-angular';
|
|
50
|
-
*
|
|
51
|
-
* @Component({
|
|
52
|
-
* imports: [GridDetailView],
|
|
53
|
-
* // ...
|
|
54
|
-
* })
|
|
55
|
-
* ```
|
|
56
|
-
*/
|
|
57
|
-
export declare class GridDetailView {
|
|
58
|
-
private elementRef;
|
|
59
|
-
/** Whether to show the expand/collapse column. Default: true */
|
|
60
|
-
showExpandColumn: import('@angular/core').InputSignal<boolean>;
|
|
61
|
-
/** Animation style for expand/collapse. Default: 'slide' */
|
|
62
|
-
animation: import('@angular/core').InputSignal<ExpandCollapseAnimation>;
|
|
63
|
-
/**
|
|
64
|
-
* Query for the ng-template content child.
|
|
65
|
-
*/
|
|
66
|
-
template: import('@angular/core').Signal<TemplateRef<any> | undefined>;
|
|
67
|
-
/** Effect that triggers when the template is available */
|
|
68
|
-
private onTemplateReceived;
|
|
69
|
-
/**
|
|
70
|
-
* Static type guard for template context.
|
|
71
|
-
* Enables type inference in templates.
|
|
72
|
-
*/
|
|
73
|
-
static ngTemplateContextGuard(dir: GridDetailView, ctx: unknown): ctx is GridDetailContext;
|
|
74
|
-
}
|
|
75
|
-
//# sourceMappingURL=grid-detail-view.directive.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"grid-detail-view.directive.d.ts","sourceRoot":"","sources":["../../../../../libs/grid-angular/src/lib/directives/grid-detail-view.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8D,WAAW,EAAE,MAAM,eAAe,CAAC;AACxG,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAEjE;;;GAGG;AACH,MAAM,WAAW,iBAAiB,CAAC,IAAI,GAAG,OAAO;IAC/C,kDAAkD;IAClD,SAAS,EAAE,IAAI,CAAC;IAChB,sCAAsC;IACtC,GAAG,EAAE,IAAI,CAAC;CACX;AAKD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,WAAW,GAAG,WAAW,CAAC,iBAAiB,CAAC,GAAG,SAAS,CAOtG;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,WAAW,EAAE,WAAW,GACvB;IAAE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,uBAAuB,CAAA;CAAE,GAAG,SAAS,CAgBjF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,qBACa,cAAc;IACzB,OAAO,CAAC,UAAU,CAAmC;IAErD,gEAAgE;IAChE,gBAAgB,+CAAwB;IAExC,4DAA4D;IAC5D,SAAS,+DAA2C;IAEpD;;OAEG;IACH,QAAQ,+DAAgD;IAExD,0DAA0D;IAC1D,OAAO,CAAC,kBAAkB,CAMvB;IAEH;;;OAGG;IACH,MAAM,CAAC,sBAAsB,CAAC,GAAG,EAAE,cAAc,EAAE,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,iBAAiB;CAG3F"}
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
|
-
import { AbstractControl, FormArray, FormGroup } from '@angular/forms';
|
|
3
|
-
/**
|
|
4
|
-
* Context provided to the grid containing form-related information.
|
|
5
|
-
* This can be accessed by other directives to get form controls.
|
|
6
|
-
*/
|
|
7
|
-
export interface FormArrayContext {
|
|
8
|
-
/** Get the row data at a specific index */
|
|
9
|
-
getRow<T = unknown>(rowIndex: number): T | null;
|
|
10
|
-
/** Update a field value at a specific row */
|
|
11
|
-
updateField(rowIndex: number, field: string, value: unknown): void;
|
|
12
|
-
/** Get the current form value (all rows) */
|
|
13
|
-
getValue<T = unknown>(): T[];
|
|
14
|
-
/**
|
|
15
|
-
* Get the FormControl for a specific cell.
|
|
16
|
-
* Only available when using FormArray with FormGroup rows.
|
|
17
|
-
*
|
|
18
|
-
* @param rowIndex - The row index
|
|
19
|
-
* @param field - The field name
|
|
20
|
-
* @returns The AbstractControl for the cell, or undefined if not available
|
|
21
|
-
*/
|
|
22
|
-
getControl(rowIndex: number, field: string): AbstractControl | undefined;
|
|
23
|
-
/**
|
|
24
|
-
* Whether the grid is backed by a FormArray of FormGroups.
|
|
25
|
-
* When true, `getControl()` will return cell-level controls.
|
|
26
|
-
*/
|
|
27
|
-
hasFormGroups: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Get the FormGroup for a specific row.
|
|
30
|
-
* Only available when using FormArray with FormGroup rows.
|
|
31
|
-
*
|
|
32
|
-
* @param rowIndex - The row index
|
|
33
|
-
* @returns The FormGroup for the row, or undefined if not available
|
|
34
|
-
*/
|
|
35
|
-
getRowFormGroup(rowIndex: number): FormGroup | undefined;
|
|
36
|
-
/**
|
|
37
|
-
* Check if a row is valid (all controls in the FormGroup are valid).
|
|
38
|
-
* Returns true if not using FormArray or if the row doesn't exist.
|
|
39
|
-
*
|
|
40
|
-
* @param rowIndex - The row index
|
|
41
|
-
* @returns true if the row is valid, false if any control is invalid
|
|
42
|
-
*/
|
|
43
|
-
isRowValid(rowIndex: number): boolean;
|
|
44
|
-
/**
|
|
45
|
-
* Check if a row has been touched (any control in the FormGroup is touched).
|
|
46
|
-
* Returns false if not using FormArray or if the row doesn't exist.
|
|
47
|
-
*
|
|
48
|
-
* @param rowIndex - The row index
|
|
49
|
-
* @returns true if any control in the row is touched
|
|
50
|
-
*/
|
|
51
|
-
isRowTouched(rowIndex: number): boolean;
|
|
52
|
-
/**
|
|
53
|
-
* Check if a row is dirty (any control in the FormGroup is dirty).
|
|
54
|
-
* Returns false if not using FormArray or if the row doesn't exist.
|
|
55
|
-
*
|
|
56
|
-
* @param rowIndex - The row index
|
|
57
|
-
* @returns true if any control in the row is dirty
|
|
58
|
-
*/
|
|
59
|
-
isRowDirty(rowIndex: number): boolean;
|
|
60
|
-
/**
|
|
61
|
-
* Get validation errors for a specific row.
|
|
62
|
-
* Aggregates errors from all controls in the FormGroup.
|
|
63
|
-
*
|
|
64
|
-
* @param rowIndex - The row index
|
|
65
|
-
* @returns Object with field names as keys and their errors, or null if no errors
|
|
66
|
-
*/
|
|
67
|
-
getRowErrors(rowIndex: number): Record<string, unknown> | null;
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Gets the FormArrayContext from a grid element, if present.
|
|
71
|
-
* @internal
|
|
72
|
-
*/
|
|
73
|
-
export declare function getFormArrayContext(gridElement: HTMLElement): FormArrayContext | undefined;
|
|
74
|
-
/**
|
|
75
|
-
* Directive that binds a FormArray directly to the grid.
|
|
76
|
-
*
|
|
77
|
-
* This is the recommended way to integrate tbw-grid with Angular Reactive Forms.
|
|
78
|
-
* Use a FormArray of FormGroups for row-level validation and cell-level control access.
|
|
79
|
-
*
|
|
80
|
-
* ## Usage
|
|
81
|
-
*
|
|
82
|
-
* ```typescript
|
|
83
|
-
* import { Component, inject } from '@angular/core';
|
|
84
|
-
* import { FormBuilder, ReactiveFormsModule } from '@angular/forms';
|
|
85
|
-
* import { Grid, GridFormArray } from '@toolbox-web/grid-angular';
|
|
86
|
-
*
|
|
87
|
-
* @Component({
|
|
88
|
-
* imports: [Grid, GridFormArray, ReactiveFormsModule],
|
|
89
|
-
* template: \`
|
|
90
|
-
* <form [formGroup]="form">
|
|
91
|
-
* <tbw-grid [formArray]="form.controls.rows" [columns]="columns" />
|
|
92
|
-
* </form>
|
|
93
|
-
* \`
|
|
94
|
-
* })
|
|
95
|
-
* export class MyComponent {
|
|
96
|
-
* private fb = inject(FormBuilder);
|
|
97
|
-
*
|
|
98
|
-
* form = this.fb.group({
|
|
99
|
-
* rows: this.fb.array([
|
|
100
|
-
* this.fb.group({ name: 'Alice', age: 30 }),
|
|
101
|
-
* this.fb.group({ name: 'Bob', age: 25 }),
|
|
102
|
-
* ])
|
|
103
|
-
* });
|
|
104
|
-
*
|
|
105
|
-
* columns = [
|
|
106
|
-
* { field: 'name', header: 'Name', editable: true },
|
|
107
|
-
* { field: 'age', header: 'Age', editable: true }
|
|
108
|
-
* ];
|
|
109
|
-
* }
|
|
110
|
-
* ```
|
|
111
|
-
*
|
|
112
|
-
* ## How It Works
|
|
113
|
-
*
|
|
114
|
-
* - **FormArray → Grid**: The grid displays the FormArray's value as rows
|
|
115
|
-
* - **Grid → FormArray**: When a cell is edited, the corresponding FormControl is updated
|
|
116
|
-
* - FormArrayContext is available for accessing cell-level controls
|
|
117
|
-
*
|
|
118
|
-
* ## Features
|
|
119
|
-
*
|
|
120
|
-
* - Works naturally with FormArray inside a FormGroup
|
|
121
|
-
* - Provides cell-level FormControl access for validation
|
|
122
|
-
* - Supports row-level validation state aggregation
|
|
123
|
-
* - Automatically syncs FormArray changes to the grid
|
|
124
|
-
*/
|
|
125
|
-
export declare class GridFormArray implements OnInit, OnDestroy {
|
|
126
|
-
#private;
|
|
127
|
-
private elementRef;
|
|
128
|
-
private cellCommitListener;
|
|
129
|
-
private touchListener;
|
|
130
|
-
/**
|
|
131
|
-
* The FormArray to bind to the grid.
|
|
132
|
-
*/
|
|
133
|
-
readonly formArray: import('@angular/core').InputSignal<FormArray<any>>;
|
|
134
|
-
/**
|
|
135
|
-
* Effect that syncs the FormArray value to the grid rows.
|
|
136
|
-
*/
|
|
137
|
-
private syncFormArrayToGrid;
|
|
138
|
-
ngOnInit(): void;
|
|
139
|
-
ngOnDestroy(): void;
|
|
140
|
-
}
|
|
141
|
-
//# sourceMappingURL=grid-form-array.directive.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"grid-form-array.directive.d.ts","sourceRoot":"","sources":["../../../../../libs/grid-angular/src/lib/directives/grid-form-array.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgD,SAAS,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAChG,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAGvE;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,2CAA2C;IAC3C,MAAM,CAAC,CAAC,GAAG,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,CAAC,GAAG,IAAI,CAAC;IAChD,6CAA6C;IAC7C,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;IACnE,4CAA4C;IAC5C,QAAQ,CAAC,CAAC,GAAG,OAAO,KAAK,CAAC,EAAE,CAAC;IAC7B;;;;;;;OAOG;IACH,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAAC;IACzE;;;OAGG;IACH,aAAa,EAAE,OAAO,CAAC;IACvB;;;;;;OAMG;IACH,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;IACzD;;;;;;OAMG;IACH,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;IACtC;;;;;;OAMG;IACH,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;IACxC;;;;;;OAMG;IACH,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;IACtC;;;;;;OAMG;IACH,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;CAChE;AAKD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,WAAW,GAAG,gBAAgB,GAAG,SAAS,CAE1F;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,qBAGa,aAAc,YAAW,MAAM,EAAE,SAAS;;IACrD,OAAO,CAAC,UAAU,CAAmC;IACrD,OAAO,CAAC,kBAAkB,CAAqC;IAC/D,OAAO,CAAC,aAAa,CAAqC;IAE1D;;OAEG;IACH,QAAQ,CAAC,SAAS,sDAA+B;IAEjD;;OAEG;IACH,OAAO,CAAC,mBAAmB,CAOxB;IAEH,QAAQ,IAAI,IAAI;IA0BhB,WAAW,IAAI,IAAI;CAgIpB"}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { TemplateRef } from '@angular/core';
|
|
2
|
-
/**
|
|
3
|
-
* Context object passed to the responsive card template.
|
|
4
|
-
*
|
|
5
|
-
* @template TRow - The type of row data
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* ```html
|
|
9
|
-
* <tbw-grid-responsive-card>
|
|
10
|
-
* <ng-template let-row let-index="index">
|
|
11
|
-
* <div class="card-content">
|
|
12
|
-
* <span>{{ row.name }}</span>
|
|
13
|
-
* <span>Row #{{ index }}</span>
|
|
14
|
-
* </div>
|
|
15
|
-
* </ng-template>
|
|
16
|
-
* </tbw-grid-responsive-card>
|
|
17
|
-
* ```
|
|
18
|
-
*/
|
|
19
|
-
export interface GridResponsiveCardContext<TRow = unknown> {
|
|
20
|
-
/**
|
|
21
|
-
* The row data (available as `let-row` or `let-myVar`).
|
|
22
|
-
*/
|
|
23
|
-
$implicit: TRow;
|
|
24
|
-
/**
|
|
25
|
-
* The row data (explicit access via `let-row="row"`).
|
|
26
|
-
*/
|
|
27
|
-
row: TRow;
|
|
28
|
-
/**
|
|
29
|
-
* The row index (zero-based).
|
|
30
|
-
*/
|
|
31
|
-
index: number;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Registry to store responsive card templates by grid element.
|
|
35
|
-
* Used by AngularGridAdapter to create card renderers.
|
|
36
|
-
*/
|
|
37
|
-
export declare const responsiveCardTemplateRegistry: Map<HTMLElement, TemplateRef<GridResponsiveCardContext<unknown>>>;
|
|
38
|
-
/**
|
|
39
|
-
* Retrieves the responsive card template for a grid element.
|
|
40
|
-
*
|
|
41
|
-
* @param gridElement - The grid element to look up
|
|
42
|
-
* @returns The template reference or undefined if not found
|
|
43
|
-
*/
|
|
44
|
-
export declare function getResponsiveCardTemplate(gridElement: HTMLElement): TemplateRef<GridResponsiveCardContext> | undefined;
|
|
45
|
-
/**
|
|
46
|
-
* Directive for providing custom Angular templates for responsive card layout.
|
|
47
|
-
*
|
|
48
|
-
* Use this directive to define how each row should render when the grid
|
|
49
|
-
* is in responsive/mobile mode. The template receives the row data and index.
|
|
50
|
-
*
|
|
51
|
-
* ## Usage
|
|
52
|
-
*
|
|
53
|
-
* ```html
|
|
54
|
-
* <tbw-grid [rows]="employees">
|
|
55
|
-
* <tbw-grid-responsive-card>
|
|
56
|
-
* <ng-template let-employee let-idx="index">
|
|
57
|
-
* <div class="employee-card">
|
|
58
|
-
* <img [src]="employee.avatar" alt="">
|
|
59
|
-
* <div class="info">
|
|
60
|
-
* <strong>{{ employee.name }}</strong>
|
|
61
|
-
* <span>{{ employee.department }}</span>
|
|
62
|
-
* </div>
|
|
63
|
-
* </div>
|
|
64
|
-
* </ng-template>
|
|
65
|
-
* </tbw-grid-responsive-card>
|
|
66
|
-
* </tbw-grid>
|
|
67
|
-
* ```
|
|
68
|
-
*
|
|
69
|
-
* ## Important Notes
|
|
70
|
-
*
|
|
71
|
-
* - The ResponsivePlugin must be added to your grid config
|
|
72
|
-
* - The Grid directive will automatically configure the plugin's cardRenderer
|
|
73
|
-
* - Template context provides `$implicit` (row), `row`, and `index`
|
|
74
|
-
*
|
|
75
|
-
* @see ResponsivePlugin
|
|
76
|
-
*/
|
|
77
|
-
export declare class GridResponsiveCard<TRow = unknown> {
|
|
78
|
-
private elementRef;
|
|
79
|
-
/**
|
|
80
|
-
* The ng-template containing the card content.
|
|
81
|
-
*/
|
|
82
|
-
template: import('@angular/core').Signal<TemplateRef<any> | undefined>;
|
|
83
|
-
/**
|
|
84
|
-
* Effect that registers the template when it becomes available.
|
|
85
|
-
*/
|
|
86
|
-
private onTemplateReceived;
|
|
87
|
-
/**
|
|
88
|
-
* Type guard for template context inference.
|
|
89
|
-
*/
|
|
90
|
-
static ngTemplateContextGuard<T>(_directive: GridResponsiveCard<T>, context: unknown): context is GridResponsiveCardContext<T>;
|
|
91
|
-
}
|
|
92
|
-
//# sourceMappingURL=grid-responsive-card.directive.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"grid-responsive-card.directive.d.ts","sourceRoot":"","sources":["../../../../../libs/grid-angular/src/lib/directives/grid-responsive-card.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuD,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjG;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,yBAAyB,CAAC,IAAI,GAAG,OAAO;IACvD;;OAEG;IACH,SAAS,EAAE,IAAI,CAAC;IAEhB;;OAEG;IACH,GAAG,EAAE,IAAI,CAAC;IAEV;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,eAAO,MAAM,8BAA8B,mEAAiE,CAAC;AAE7G;;;;;GAKG;AACH,wBAAgB,yBAAyB,CACvC,WAAW,EAAE,WAAW,GACvB,WAAW,CAAC,yBAAyB,CAAC,GAAG,SAAS,CAKpD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,qBAGa,kBAAkB,CAAC,IAAI,GAAG,OAAO;IAC5C,OAAO,CAAC,UAAU,CAAmC;IAErD;;OAEG;IACH,QAAQ,+DAA8D;IAEtE;;OAEG;IACH,OAAO,CAAC,kBAAkB,CAQvB;IAEH;;OAEG;IACH,MAAM,CAAC,sBAAsB,CAAC,CAAC,EAC7B,UAAU,EAAE,kBAAkB,CAAC,CAAC,CAAC,EACjC,OAAO,EAAE,OAAO,GACf,OAAO,IAAI,yBAAyB,CAAC,CAAC,CAAC;CAG3C"}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { TemplateRef } from '@angular/core';
|
|
2
|
-
/**
|
|
3
|
-
* Context object passed to the tool panel template.
|
|
4
|
-
* Provides access to grid-related information for the panel content.
|
|
5
|
-
*/
|
|
6
|
-
export interface GridToolPanelContext {
|
|
7
|
-
/** The grid element (implicit binding) */
|
|
8
|
-
$implicit: HTMLElement;
|
|
9
|
-
/** The grid element */
|
|
10
|
-
grid: HTMLElement;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Gets the tool panel template registered for a given tool panel element.
|
|
14
|
-
* Used by AngularGridAdapter to retrieve templates at render time.
|
|
15
|
-
*/
|
|
16
|
-
export declare function getToolPanelTemplate(panelElement: HTMLElement): TemplateRef<GridToolPanelContext> | undefined;
|
|
17
|
-
/**
|
|
18
|
-
* Gets all tool panel elements with registered templates within a grid element.
|
|
19
|
-
*/
|
|
20
|
-
export declare function getToolPanelElements(gridElement: HTMLElement): HTMLElement[];
|
|
21
|
-
/**
|
|
22
|
-
* Directive that captures an `<ng-template>` for use as a custom tool panel.
|
|
23
|
-
*
|
|
24
|
-
* This enables declarative Angular component usage for tool panels
|
|
25
|
-
* that appear in the grid's side panel.
|
|
26
|
-
*
|
|
27
|
-
* ## Usage
|
|
28
|
-
*
|
|
29
|
-
* ```html
|
|
30
|
-
* <tbw-grid [rows]="rows" [gridConfig]="config">
|
|
31
|
-
* <tbw-grid-tool-panel
|
|
32
|
-
* id="quick-filters"
|
|
33
|
-
* title="Quick Filters"
|
|
34
|
-
* icon="🔍"
|
|
35
|
-
* tooltip="Apply quick filters"
|
|
36
|
-
* [order]="10"
|
|
37
|
-
* >
|
|
38
|
-
* <ng-template let-grid>
|
|
39
|
-
* <app-quick-filters [grid]="grid" />
|
|
40
|
-
* </ng-template>
|
|
41
|
-
* </tbw-grid-tool-panel>
|
|
42
|
-
* </tbw-grid>
|
|
43
|
-
* ```
|
|
44
|
-
*
|
|
45
|
-
* The template context provides:
|
|
46
|
-
* - `$implicit` / `grid`: The grid element reference
|
|
47
|
-
*
|
|
48
|
-
* ### Attributes
|
|
49
|
-
*
|
|
50
|
-
* - `id` (required): Unique identifier for the panel
|
|
51
|
-
* - `title` (required): Panel title shown in accordion header
|
|
52
|
-
* - `icon`: Icon for accordion section header (emoji or text)
|
|
53
|
-
* - `tooltip`: Tooltip for accordion section header
|
|
54
|
-
* - `order`: Panel order priority (lower = first, default: 100)
|
|
55
|
-
*
|
|
56
|
-
* Import the directive in your component:
|
|
57
|
-
*
|
|
58
|
-
* ```typescript
|
|
59
|
-
* import { GridToolPanel } from '@toolbox-web/grid-angular';
|
|
60
|
-
*
|
|
61
|
-
* @Component({
|
|
62
|
-
* imports: [GridToolPanel],
|
|
63
|
-
* // ...
|
|
64
|
-
* })
|
|
65
|
-
* ```
|
|
66
|
-
*/
|
|
67
|
-
export declare class GridToolPanel {
|
|
68
|
-
private elementRef;
|
|
69
|
-
/** Unique panel identifier (required) */
|
|
70
|
-
id: import('@angular/core').InputSignal<string>;
|
|
71
|
-
/** Panel title shown in accordion header (required) */
|
|
72
|
-
title: import('@angular/core').InputSignal<string>;
|
|
73
|
-
/** Icon for accordion section header (emoji or text) */
|
|
74
|
-
icon: import('@angular/core').InputSignal<string | undefined>;
|
|
75
|
-
/** Tooltip for accordion section header */
|
|
76
|
-
tooltip: import('@angular/core').InputSignal<string | undefined>;
|
|
77
|
-
/** Panel order priority (lower = first, default: 100) */
|
|
78
|
-
order: import('@angular/core').InputSignal<number>;
|
|
79
|
-
/**
|
|
80
|
-
* Query for the ng-template content child.
|
|
81
|
-
*/
|
|
82
|
-
template: import('@angular/core').Signal<TemplateRef<any> | undefined>;
|
|
83
|
-
/** Effect that triggers when the template is available */
|
|
84
|
-
private onTemplateReceived;
|
|
85
|
-
/**
|
|
86
|
-
* Static type guard for template context.
|
|
87
|
-
* Enables type inference in templates.
|
|
88
|
-
*/
|
|
89
|
-
static ngTemplateContextGuard(dir: GridToolPanel, ctx: unknown): ctx is GridToolPanelContext;
|
|
90
|
-
}
|
|
91
|
-
//# sourceMappingURL=grid-tool-panel.directive.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"grid-tool-panel.directive.d.ts","sourceRoot":"","sources":["../../../../../libs/grid-angular/src/lib/directives/grid-tool-panel.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8D,WAAW,EAAE,MAAM,eAAe,CAAC;AAExG;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,0CAA0C;IAC1C,SAAS,EAAE,WAAW,CAAC;IACvB,uBAAuB;IACvB,IAAI,EAAE,WAAW,CAAC;CACnB;AAKD;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,YAAY,EAAE,WAAW,GAAG,WAAW,CAAC,oBAAoB,CAAC,GAAG,SAAS,CAE7G;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,WAAW,GAAG,WAAW,EAAE,CAG5E;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,qBACa,aAAa;IACxB,OAAO,CAAC,UAAU,CAAmC;IAErD,yCAAyC;IACzC,EAAE,8CAA2C;IAE7C,uDAAuD;IACvD,KAAK,8CAA8C;IAEnD,wDAAwD;IACxD,IAAI,0DAAmB;IAEvB,2CAA2C;IAC3C,OAAO,0DAAmB;IAE1B,yDAAyD;IACzD,KAAK,8CAAsB;IAE3B;;OAEG;IACH,QAAQ,+DAAmD;IAE3D,0DAA0D;IAC1D,OAAO,CAAC,kBAAkB,CAoBvB;IAEH;;;OAGG;IACH,MAAM,CAAC,sBAAsB,CAAC,GAAG,EAAE,aAAa,EAAE,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,oBAAoB;CAG7F"}
|