@ya-grid/angular 0.0.0-stage → 0.4.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.
- package/LICENSE +21 -0
- package/README.md +76 -2
- package/angular-mount-adapter.d.ts +23 -0
- package/fesm2022/ya-grid-angular.mjs +388 -0
- package/fesm2022/ya-grid-angular.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/package.json +47 -3
- package/public-api.d.ts +6 -0
- package/ya-cell.directive.d.ts +19 -0
- package/ya-detail.directive.d.ts +20 -0
- package/ya-grid.component.d.ts +80 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Erik-Jan van Baaren
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,77 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @ya-grid/angular
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Modern Angular (v18+, standalone, Signals, zoneless-ready) adapter for [YA-Grid](https://github.com/eriky/ya-grid).
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm add @ya-grid/angular @ya-grid/core
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
Add the grid styles once, globally, in your application's `styles.css` (component `.ts`
|
|
14
|
+
files cannot import CSS with the Angular CLI builder):
|
|
15
|
+
|
|
16
|
+
```css
|
|
17
|
+
@import "@ya-grid/core/styles.css";
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
import { Component, signal } from '@angular/core';
|
|
22
|
+
import type { ColDef } from '@ya-grid/core';
|
|
23
|
+
import { YaCellDirective, YaDetailDirective, YaGridComponent } from '@ya-grid/angular';
|
|
24
|
+
|
|
25
|
+
interface Person {
|
|
26
|
+
id: number;
|
|
27
|
+
name: string;
|
|
28
|
+
status: string;
|
|
29
|
+
notes: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@Component({
|
|
33
|
+
selector: 'app-example',
|
|
34
|
+
standalone: true,
|
|
35
|
+
imports: [YaGridComponent, YaCellDirective, YaDetailDirective],
|
|
36
|
+
template: `
|
|
37
|
+
<ya-grid
|
|
38
|
+
[rowData]="rows()"
|
|
39
|
+
[columnDefs]="columns"
|
|
40
|
+
[getRowId]="rowId"
|
|
41
|
+
[masterDetail]="true"
|
|
42
|
+
[globalSearch]="true"
|
|
43
|
+
>
|
|
44
|
+
<ng-template yaCell="status" let-status>
|
|
45
|
+
<span>{{ status }}</span>
|
|
46
|
+
</ng-template>
|
|
47
|
+
<ng-template [yaDetail]="rows()" let-row>
|
|
48
|
+
<div>{{ row.notes }}</div>
|
|
49
|
+
</ng-template>
|
|
50
|
+
</ya-grid>
|
|
51
|
+
`,
|
|
52
|
+
})
|
|
53
|
+
export class ExampleComponent {
|
|
54
|
+
readonly rows = signal<Person[]>([]);
|
|
55
|
+
readonly columns: ColDef<Person>[] = [{ field: 'name' }, { field: 'status' }];
|
|
56
|
+
readonly rowId = ({ data }: { data: Person }) => String(data.id);
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### How inputs are applied
|
|
61
|
+
|
|
62
|
+
- Only inputs that are bound and whose value changed are sent to the grid. Unbound inputs
|
|
63
|
+
(`theme`, `density`, `loading`, …) use the grid's defaults and never overwrite values set
|
|
64
|
+
through the API (`api.setTheme(...)`, rows added with `api.applyTransaction(...)`).
|
|
65
|
+
- `getApi()` already returns the API inside a `(gridReady)` handler.
|
|
66
|
+
- Adding or removing `yaCell` / `yaDetail` templates re-renders the cells that use them.
|
|
67
|
+
|
|
68
|
+
### Component cell renderers
|
|
69
|
+
|
|
70
|
+
A component used as `cellRenderer` receives the cell parameters as `params`, declared
|
|
71
|
+
either as an input (`params = input<CellRendererParams<Row>>()`) or as a plain field.
|
|
72
|
+
|
|
73
|
+
See the [YA-Grid documentation](https://github.com/eriky/ya-grid#readme) for full API details.
|
|
74
|
+
|
|
75
|
+
## License
|
|
76
|
+
|
|
77
|
+
MIT © 2026 Erik-Jan van Baaren
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type ApplicationRef, type EnvironmentInjector, type TemplateRef } from '@angular/core';
|
|
2
|
+
import type { CellRendererParams, ComponentMountAdapter, DetailCellRendererParams, MountedComponentHandle } from '@ya-grid/core';
|
|
3
|
+
import type { YaCellTemplateContext } from './ya-cell.directive';
|
|
4
|
+
import type { YaDetailTemplateContext } from './ya-detail.directive';
|
|
5
|
+
export interface YaCellRendererComponent<TData = Record<string, unknown>, TValue = unknown> {
|
|
6
|
+
params?: CellRendererParams<TData, TValue>;
|
|
7
|
+
}
|
|
8
|
+
export interface YaDetailRendererComponent<TData = Record<string, unknown>> {
|
|
9
|
+
params?: DetailCellRendererParams<TData>;
|
|
10
|
+
}
|
|
11
|
+
export declare class AngularMountAdapter implements ComponentMountAdapter {
|
|
12
|
+
private readonly appRef;
|
|
13
|
+
private readonly envInjector;
|
|
14
|
+
private templateMap;
|
|
15
|
+
private detailTemplate;
|
|
16
|
+
constructor(appRef: ApplicationRef, envInjector: EnvironmentInjector);
|
|
17
|
+
setTemplates(map: Map<string, TemplateRef<YaCellTemplateContext<any, any>>>): void;
|
|
18
|
+
setDetailTemplate(tpl: TemplateRef<YaDetailTemplateContext<any>> | null): void;
|
|
19
|
+
canMount(renderer: unknown, colId: string): boolean;
|
|
20
|
+
canMountDetail(renderer: unknown): boolean;
|
|
21
|
+
mountDetail(container: HTMLElement, renderer: unknown, params: DetailCellRendererParams<any>): MountedComponentHandle;
|
|
22
|
+
mount(container: HTMLElement, renderer: unknown, params: CellRendererParams<any, any>): MountedComponentHandle;
|
|
23
|
+
}
|
|
@@ -0,0 +1,388 @@
|
|
|
1
|
+
import { createGrid } from '@ya-grid/core';
|
|
2
|
+
export { badgeColumn, barColumn, booleanColumn, createBuiltInColumnTypes, currencyColumn, percentColumn, sparklineColumn } from '@ya-grid/core';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { reflectComponentType, createComponent, input, inject, TemplateRef, Directive, ApplicationRef, EnvironmentInjector, DestroyRef, viewChild, contentChildren, contentChild, output, afterNextRender, untracked, effect, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
5
|
+
|
|
6
|
+
function isAngularComponentClass(value) {
|
|
7
|
+
return typeof value === 'function' && 'ɵcmp' in value;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Passes `params` to a mounted component. Uses setInput when the component declares a
|
|
11
|
+
* `params` input (signal or decorator); otherwise assigns the plain property. setInput on
|
|
12
|
+
* an undeclared input does not throw (it only logs NG0303 in dev mode), so it cannot be
|
|
13
|
+
* used as a try/catch probe.
|
|
14
|
+
*/
|
|
15
|
+
function setParams(compRef, renderer, params) {
|
|
16
|
+
const declaresInput = reflectComponentType(renderer)?.inputs.some((input) => input.templateName === 'params' || input.propName === 'params');
|
|
17
|
+
if (declaresInput) {
|
|
18
|
+
compRef.setInput('params', params);
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
compRef.instance.params = params;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
class AngularMountAdapter {
|
|
25
|
+
appRef;
|
|
26
|
+
envInjector;
|
|
27
|
+
templateMap = new Map();
|
|
28
|
+
detailTemplate = null;
|
|
29
|
+
constructor(appRef, envInjector) {
|
|
30
|
+
this.appRef = appRef;
|
|
31
|
+
this.envInjector = envInjector;
|
|
32
|
+
}
|
|
33
|
+
setTemplates(map) {
|
|
34
|
+
this.templateMap = map;
|
|
35
|
+
}
|
|
36
|
+
setDetailTemplate(tpl) {
|
|
37
|
+
this.detailTemplate = tpl;
|
|
38
|
+
}
|
|
39
|
+
canMount(renderer, colId) {
|
|
40
|
+
if (this.templateMap.has(colId))
|
|
41
|
+
return true;
|
|
42
|
+
return isAngularComponentClass(renderer);
|
|
43
|
+
}
|
|
44
|
+
canMountDetail(renderer) {
|
|
45
|
+
if (this.detailTemplate)
|
|
46
|
+
return true;
|
|
47
|
+
return isAngularComponentClass(renderer);
|
|
48
|
+
}
|
|
49
|
+
mountDetail(container, renderer, params) {
|
|
50
|
+
if (this.detailTemplate) {
|
|
51
|
+
const context = {
|
|
52
|
+
$implicit: params.data,
|
|
53
|
+
data: params.data,
|
|
54
|
+
node: params.node,
|
|
55
|
+
api: params.api,
|
|
56
|
+
};
|
|
57
|
+
const viewRef = this.detailTemplate.createEmbeddedView(context);
|
|
58
|
+
this.appRef.attachView(viewRef);
|
|
59
|
+
for (const node of viewRef.rootNodes) {
|
|
60
|
+
container.appendChild(node);
|
|
61
|
+
}
|
|
62
|
+
viewRef.detectChanges();
|
|
63
|
+
return {
|
|
64
|
+
destroy: () => {
|
|
65
|
+
this.appRef.detachView(viewRef);
|
|
66
|
+
viewRef.destroy();
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
if (isAngularComponentClass(renderer)) {
|
|
71
|
+
const host = document.createElement('div');
|
|
72
|
+
host.style.display = 'contents';
|
|
73
|
+
container.appendChild(host);
|
|
74
|
+
const compRef = createComponent(renderer, {
|
|
75
|
+
environmentInjector: this.envInjector,
|
|
76
|
+
hostElement: host,
|
|
77
|
+
});
|
|
78
|
+
setParams(compRef, renderer, params);
|
|
79
|
+
this.appRef.attachView(compRef.hostView);
|
|
80
|
+
compRef.changeDetectorRef.detectChanges();
|
|
81
|
+
return {
|
|
82
|
+
destroy: () => {
|
|
83
|
+
this.appRef.detachView(compRef.hostView);
|
|
84
|
+
compRef.destroy();
|
|
85
|
+
},
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
return { destroy: () => { } };
|
|
89
|
+
}
|
|
90
|
+
mount(container, renderer, params) {
|
|
91
|
+
const templateRef = this.templateMap.get(params.colDef.colId);
|
|
92
|
+
if (templateRef) {
|
|
93
|
+
const context = {
|
|
94
|
+
$implicit: params.value,
|
|
95
|
+
value: params.value,
|
|
96
|
+
formattedValue: params.formattedValue,
|
|
97
|
+
data: params.data,
|
|
98
|
+
node: params.node,
|
|
99
|
+
colDef: params.colDef,
|
|
100
|
+
api: params.api,
|
|
101
|
+
};
|
|
102
|
+
const viewRef = templateRef.createEmbeddedView(context);
|
|
103
|
+
this.appRef.attachView(viewRef);
|
|
104
|
+
for (const node of viewRef.rootNodes) {
|
|
105
|
+
container.appendChild(node);
|
|
106
|
+
}
|
|
107
|
+
viewRef.detectChanges();
|
|
108
|
+
return {
|
|
109
|
+
destroy: () => {
|
|
110
|
+
this.appRef.detachView(viewRef);
|
|
111
|
+
viewRef.destroy();
|
|
112
|
+
},
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
if (isAngularComponentClass(renderer)) {
|
|
116
|
+
const host = document.createElement('div');
|
|
117
|
+
host.style.display = 'contents';
|
|
118
|
+
container.appendChild(host);
|
|
119
|
+
const compRef = createComponent(renderer, {
|
|
120
|
+
environmentInjector: this.envInjector,
|
|
121
|
+
hostElement: host,
|
|
122
|
+
});
|
|
123
|
+
setParams(compRef, renderer, params);
|
|
124
|
+
this.appRef.attachView(compRef.hostView);
|
|
125
|
+
compRef.changeDetectorRef.detectChanges();
|
|
126
|
+
return {
|
|
127
|
+
destroy: () => {
|
|
128
|
+
this.appRef.detachView(compRef.hostView);
|
|
129
|
+
compRef.destroy();
|
|
130
|
+
},
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
return { destroy: () => { } };
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
class YaCellDirective {
|
|
138
|
+
colId = input.required({ alias: 'yaCell' });
|
|
139
|
+
templateRef = inject((TemplateRef));
|
|
140
|
+
static ngTemplateContextGuard(_dir, ctx) {
|
|
141
|
+
return true;
|
|
142
|
+
}
|
|
143
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: YaCellDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
144
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.25", type: YaCellDirective, isStandalone: true, selector: "ng-template[yaCell]", inputs: { colId: { classPropertyName: "colId", publicName: "yaCell", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 });
|
|
145
|
+
}
|
|
146
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: YaCellDirective, decorators: [{
|
|
147
|
+
type: Directive,
|
|
148
|
+
args: [{
|
|
149
|
+
selector: 'ng-template[yaCell]',
|
|
150
|
+
standalone: true,
|
|
151
|
+
}]
|
|
152
|
+
}] });
|
|
153
|
+
|
|
154
|
+
class YaDetailDirective {
|
|
155
|
+
/**
|
|
156
|
+
* Optional type-inference binding: pass `[yaDetail]="rowData()"` to get full
|
|
157
|
+
* strict TypeScript inference on `let-row` inside Angular templates.
|
|
158
|
+
*/
|
|
159
|
+
yaDetail = input('');
|
|
160
|
+
templateRef = inject((TemplateRef));
|
|
161
|
+
static ngTemplateContextGuard(_dir, ctx) {
|
|
162
|
+
return true;
|
|
163
|
+
}
|
|
164
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: YaDetailDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
165
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.25", type: YaDetailDirective, isStandalone: true, selector: "ng-template[yaDetail]", inputs: { yaDetail: { classPropertyName: "yaDetail", publicName: "yaDetail", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
|
|
166
|
+
}
|
|
167
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: YaDetailDirective, decorators: [{
|
|
168
|
+
type: Directive,
|
|
169
|
+
args: [{
|
|
170
|
+
selector: 'ng-template[yaDetail]',
|
|
171
|
+
standalone: true,
|
|
172
|
+
}]
|
|
173
|
+
}] });
|
|
174
|
+
|
|
175
|
+
class YaGridComponent {
|
|
176
|
+
appRef = inject(ApplicationRef);
|
|
177
|
+
envInjector = inject(EnvironmentInjector);
|
|
178
|
+
destroyRef = inject(DestroyRef);
|
|
179
|
+
gridHost = viewChild.required('gridHost');
|
|
180
|
+
cellTemplates = contentChildren(YaCellDirective);
|
|
181
|
+
detailTemplate = contentChild(YaDetailDirective);
|
|
182
|
+
// Inputs
|
|
183
|
+
rowData = input([]);
|
|
184
|
+
columnDefs = input([]);
|
|
185
|
+
defaultColDef = input(undefined);
|
|
186
|
+
columnTypes = input(undefined);
|
|
187
|
+
getRowId = input(undefined);
|
|
188
|
+
rowModelType = input(undefined);
|
|
189
|
+
serverSideDatasource = input(undefined);
|
|
190
|
+
masterDetail = input(undefined);
|
|
191
|
+
isRowMaster = input(undefined);
|
|
192
|
+
detailRowHeight = input(undefined);
|
|
193
|
+
detailCellRenderer = input(undefined);
|
|
194
|
+
pinnedTopRowData = input(undefined);
|
|
195
|
+
pinnedBottomRowData = input(undefined);
|
|
196
|
+
pinnedBottomSummary = input(undefined);
|
|
197
|
+
globalSearch = input(undefined);
|
|
198
|
+
quickFilterText = input(undefined);
|
|
199
|
+
columnChooser = input(undefined);
|
|
200
|
+
csvExport = input(undefined);
|
|
201
|
+
rowSelection = input(undefined);
|
|
202
|
+
pagination = input(undefined);
|
|
203
|
+
paginationPageSize = input(undefined);
|
|
204
|
+
paginationPageSizeSelector = input(undefined);
|
|
205
|
+
virtualization = input(undefined);
|
|
206
|
+
responsivePinning = input(undefined);
|
|
207
|
+
undoRedoCellEditing = input(undefined);
|
|
208
|
+
undoRedoCellEditingLimit = input(undefined);
|
|
209
|
+
initialState = input(undefined);
|
|
210
|
+
initialSortModel = input(undefined);
|
|
211
|
+
initialFilterModel = input(undefined);
|
|
212
|
+
rowHeight = input(undefined);
|
|
213
|
+
headerHeight = input(undefined);
|
|
214
|
+
// Unbound inputs stay undefined so the grid's own defaults (and values set through the
|
|
215
|
+
// API, e.g. api.setTheme) are not overwritten when another input changes
|
|
216
|
+
theme = input(undefined);
|
|
217
|
+
density = input(undefined);
|
|
218
|
+
enableCellChangeFlash = input(undefined);
|
|
219
|
+
ariaLabel = input(undefined);
|
|
220
|
+
noRowsMessage = input(undefined);
|
|
221
|
+
noMatchingRowsMessage = input(undefined);
|
|
222
|
+
loading = input(undefined);
|
|
223
|
+
// Outputs
|
|
224
|
+
gridReady = output();
|
|
225
|
+
rowClicked = output();
|
|
226
|
+
cellClicked = output();
|
|
227
|
+
cellValueChanged = output();
|
|
228
|
+
selectionChanged = output();
|
|
229
|
+
sortChanged = output();
|
|
230
|
+
filterChanged = output();
|
|
231
|
+
columnResized = output();
|
|
232
|
+
columnMoved = output();
|
|
233
|
+
columnPinned = output();
|
|
234
|
+
columnVisibilityChanged = output();
|
|
235
|
+
paginationChanged = output();
|
|
236
|
+
stateChanged = output();
|
|
237
|
+
rowDetailToggled = output();
|
|
238
|
+
api = null;
|
|
239
|
+
mountAdapter = new AngularMountAdapter(this.appRef, this.envInjector);
|
|
240
|
+
/** Input-derived options as last sent to the grid; only differences are sent later. */
|
|
241
|
+
sentOptions = {};
|
|
242
|
+
templateSignature = [];
|
|
243
|
+
/** Output bridges; created once so they never count as changed options. */
|
|
244
|
+
eventOptions = {
|
|
245
|
+
componentMountAdapter: this.mountAdapter,
|
|
246
|
+
onGridReady: (e) => {
|
|
247
|
+
// Fires synchronously inside createGrid: expose the API before handlers run
|
|
248
|
+
this.api = e.api;
|
|
249
|
+
this.gridReady.emit(e);
|
|
250
|
+
},
|
|
251
|
+
onRowClicked: (e) => this.rowClicked.emit(e),
|
|
252
|
+
onCellClicked: (e) => this.cellClicked.emit(e),
|
|
253
|
+
onCellValueChanged: (e) => this.cellValueChanged.emit(e),
|
|
254
|
+
onSelectionChanged: (e) => this.selectionChanged.emit(e),
|
|
255
|
+
onSortChanged: (e) => this.sortChanged.emit(e),
|
|
256
|
+
onFilterChanged: (e) => this.filterChanged.emit(e),
|
|
257
|
+
onColumnResized: (e) => this.columnResized.emit(e),
|
|
258
|
+
onColumnMoved: (e) => this.columnMoved.emit(e),
|
|
259
|
+
onColumnPinned: (e) => this.columnPinned.emit(e),
|
|
260
|
+
onColumnVisibilityChanged: (e) => this.columnVisibilityChanged.emit(e),
|
|
261
|
+
onPaginationChanged: (e) => this.paginationChanged.emit(e),
|
|
262
|
+
onStateChanged: (e) => this.stateChanged.emit(e),
|
|
263
|
+
onRowDetailToggled: (e) => this.rowDetailToggled.emit(e),
|
|
264
|
+
};
|
|
265
|
+
constructor() {
|
|
266
|
+
afterNextRender(() => {
|
|
267
|
+
this.syncTemplateMap();
|
|
268
|
+
const options = this.buildOptions();
|
|
269
|
+
this.sentOptions = options;
|
|
270
|
+
untracked(() => {
|
|
271
|
+
this.api = createGrid(this.gridHost().nativeElement, {
|
|
272
|
+
...options,
|
|
273
|
+
...this.eventOptions,
|
|
274
|
+
});
|
|
275
|
+
});
|
|
276
|
+
});
|
|
277
|
+
effect(() => {
|
|
278
|
+
// Reading the inputs and content templates here makes the effect track them
|
|
279
|
+
const templatesChanged = this.syncTemplateMap();
|
|
280
|
+
const options = this.buildOptions();
|
|
281
|
+
const api = this.api;
|
|
282
|
+
if (!api)
|
|
283
|
+
return;
|
|
284
|
+
const changed = this.diffOptions(options);
|
|
285
|
+
this.sentOptions = options;
|
|
286
|
+
// Grid callbacks (valueFormatter, cellClass, getRowId, …) run inside these calls;
|
|
287
|
+
// signals they read must not become dependencies of this effect
|
|
288
|
+
untracked(() => {
|
|
289
|
+
if (changed)
|
|
290
|
+
api.updateOptions(changed);
|
|
291
|
+
if (templatesChanged)
|
|
292
|
+
api.refreshCells();
|
|
293
|
+
});
|
|
294
|
+
});
|
|
295
|
+
this.destroyRef.onDestroy(() => {
|
|
296
|
+
this.api?.destroy();
|
|
297
|
+
this.api = null;
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
diffOptions(next) {
|
|
301
|
+
const prev = this.sentOptions;
|
|
302
|
+
const changed = {};
|
|
303
|
+
let any = false;
|
|
304
|
+
for (const [key, value] of Object.entries(next)) {
|
|
305
|
+
if (!Object.is(prev[key], value)) {
|
|
306
|
+
changed[key] = value;
|
|
307
|
+
any = true;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
return any ? changed : null;
|
|
311
|
+
}
|
|
312
|
+
getApi() {
|
|
313
|
+
return this.api;
|
|
314
|
+
}
|
|
315
|
+
/** Updates the adapter's templates. Returns true when they differ from the last call. */
|
|
316
|
+
syncTemplateMap() {
|
|
317
|
+
const map = new Map();
|
|
318
|
+
const signature = [];
|
|
319
|
+
for (const dir of this.cellTemplates()) {
|
|
320
|
+
const colId = dir.colId();
|
|
321
|
+
map.set(colId, dir.templateRef);
|
|
322
|
+
signature.push(colId, dir.templateRef);
|
|
323
|
+
}
|
|
324
|
+
const detail = this.detailTemplate()?.templateRef ?? null;
|
|
325
|
+
signature.push(detail);
|
|
326
|
+
this.mountAdapter.setTemplates(map);
|
|
327
|
+
this.mountAdapter.setDetailTemplate(detail);
|
|
328
|
+
const changed = signature.length !== this.templateSignature.length ||
|
|
329
|
+
signature.some((v, i) => v !== this.templateSignature[i]);
|
|
330
|
+
this.templateSignature = signature;
|
|
331
|
+
return changed;
|
|
332
|
+
}
|
|
333
|
+
buildOptions() {
|
|
334
|
+
return {
|
|
335
|
+
rowData: this.rowData(),
|
|
336
|
+
columnDefs: this.columnDefs(),
|
|
337
|
+
defaultColDef: this.defaultColDef(),
|
|
338
|
+
columnTypes: this.columnTypes(),
|
|
339
|
+
getRowId: this.getRowId(),
|
|
340
|
+
rowModelType: this.rowModelType(),
|
|
341
|
+
serverSideDatasource: this.serverSideDatasource(),
|
|
342
|
+
masterDetail: this.masterDetail(),
|
|
343
|
+
isRowMaster: this.isRowMaster(),
|
|
344
|
+
detailRowHeight: this.detailRowHeight(),
|
|
345
|
+
detailCellRenderer: this.detailCellRenderer(),
|
|
346
|
+
pinnedTopRowData: this.pinnedTopRowData(),
|
|
347
|
+
pinnedBottomRowData: this.pinnedBottomRowData(),
|
|
348
|
+
pinnedBottomSummary: this.pinnedBottomSummary(),
|
|
349
|
+
globalSearch: this.globalSearch(),
|
|
350
|
+
quickFilterText: this.quickFilterText(),
|
|
351
|
+
columnChooser: this.columnChooser(),
|
|
352
|
+
csvExport: this.csvExport(),
|
|
353
|
+
rowSelection: this.rowSelection(),
|
|
354
|
+
pagination: this.pagination(),
|
|
355
|
+
paginationPageSize: this.paginationPageSize(),
|
|
356
|
+
paginationPageSizeSelector: this.paginationPageSizeSelector(),
|
|
357
|
+
virtualization: this.virtualization(),
|
|
358
|
+
responsivePinning: this.responsivePinning(),
|
|
359
|
+
undoRedoCellEditing: this.undoRedoCellEditing(),
|
|
360
|
+
undoRedoCellEditingLimit: this.undoRedoCellEditingLimit(),
|
|
361
|
+
initialState: this.initialState(),
|
|
362
|
+
initialSortModel: this.initialSortModel(),
|
|
363
|
+
initialFilterModel: this.initialFilterModel(),
|
|
364
|
+
rowHeight: this.rowHeight(),
|
|
365
|
+
headerHeight: this.headerHeight(),
|
|
366
|
+
theme: this.theme(),
|
|
367
|
+
density: this.density(),
|
|
368
|
+
enableCellChangeFlash: this.enableCellChangeFlash(),
|
|
369
|
+
ariaLabel: this.ariaLabel(),
|
|
370
|
+
noRowsMessage: this.noRowsMessage(),
|
|
371
|
+
noMatchingRowsMessage: this.noMatchingRowsMessage(),
|
|
372
|
+
loading: this.loading(),
|
|
373
|
+
};
|
|
374
|
+
}
|
|
375
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: YaGridComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
376
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.25", type: YaGridComponent, isStandalone: true, selector: "ya-grid", inputs: { rowData: { classPropertyName: "rowData", publicName: "rowData", isSignal: true, isRequired: false, transformFunction: null }, columnDefs: { classPropertyName: "columnDefs", publicName: "columnDefs", isSignal: true, isRequired: false, transformFunction: null }, defaultColDef: { classPropertyName: "defaultColDef", publicName: "defaultColDef", isSignal: true, isRequired: false, transformFunction: null }, columnTypes: { classPropertyName: "columnTypes", publicName: "columnTypes", isSignal: true, isRequired: false, transformFunction: null }, getRowId: { classPropertyName: "getRowId", publicName: "getRowId", isSignal: true, isRequired: false, transformFunction: null }, rowModelType: { classPropertyName: "rowModelType", publicName: "rowModelType", isSignal: true, isRequired: false, transformFunction: null }, serverSideDatasource: { classPropertyName: "serverSideDatasource", publicName: "serverSideDatasource", isSignal: true, isRequired: false, transformFunction: null }, masterDetail: { classPropertyName: "masterDetail", publicName: "masterDetail", isSignal: true, isRequired: false, transformFunction: null }, isRowMaster: { classPropertyName: "isRowMaster", publicName: "isRowMaster", isSignal: true, isRequired: false, transformFunction: null }, detailRowHeight: { classPropertyName: "detailRowHeight", publicName: "detailRowHeight", isSignal: true, isRequired: false, transformFunction: null }, detailCellRenderer: { classPropertyName: "detailCellRenderer", publicName: "detailCellRenderer", isSignal: true, isRequired: false, transformFunction: null }, pinnedTopRowData: { classPropertyName: "pinnedTopRowData", publicName: "pinnedTopRowData", isSignal: true, isRequired: false, transformFunction: null }, pinnedBottomRowData: { classPropertyName: "pinnedBottomRowData", publicName: "pinnedBottomRowData", isSignal: true, isRequired: false, transformFunction: null }, pinnedBottomSummary: { classPropertyName: "pinnedBottomSummary", publicName: "pinnedBottomSummary", isSignal: true, isRequired: false, transformFunction: null }, globalSearch: { classPropertyName: "globalSearch", publicName: "globalSearch", isSignal: true, isRequired: false, transformFunction: null }, quickFilterText: { classPropertyName: "quickFilterText", publicName: "quickFilterText", isSignal: true, isRequired: false, transformFunction: null }, columnChooser: { classPropertyName: "columnChooser", publicName: "columnChooser", isSignal: true, isRequired: false, transformFunction: null }, csvExport: { classPropertyName: "csvExport", publicName: "csvExport", isSignal: true, isRequired: false, transformFunction: null }, rowSelection: { classPropertyName: "rowSelection", publicName: "rowSelection", isSignal: true, isRequired: false, transformFunction: null }, pagination: { classPropertyName: "pagination", publicName: "pagination", isSignal: true, isRequired: false, transformFunction: null }, paginationPageSize: { classPropertyName: "paginationPageSize", publicName: "paginationPageSize", isSignal: true, isRequired: false, transformFunction: null }, paginationPageSizeSelector: { classPropertyName: "paginationPageSizeSelector", publicName: "paginationPageSizeSelector", isSignal: true, isRequired: false, transformFunction: null }, virtualization: { classPropertyName: "virtualization", publicName: "virtualization", isSignal: true, isRequired: false, transformFunction: null }, responsivePinning: { classPropertyName: "responsivePinning", publicName: "responsivePinning", isSignal: true, isRequired: false, transformFunction: null }, undoRedoCellEditing: { classPropertyName: "undoRedoCellEditing", publicName: "undoRedoCellEditing", isSignal: true, isRequired: false, transformFunction: null }, undoRedoCellEditingLimit: { classPropertyName: "undoRedoCellEditingLimit", publicName: "undoRedoCellEditingLimit", isSignal: true, isRequired: false, transformFunction: null }, initialState: { classPropertyName: "initialState", publicName: "initialState", isSignal: true, isRequired: false, transformFunction: null }, initialSortModel: { classPropertyName: "initialSortModel", publicName: "initialSortModel", isSignal: true, isRequired: false, transformFunction: null }, initialFilterModel: { classPropertyName: "initialFilterModel", publicName: "initialFilterModel", isSignal: true, isRequired: false, transformFunction: null }, rowHeight: { classPropertyName: "rowHeight", publicName: "rowHeight", isSignal: true, isRequired: false, transformFunction: null }, headerHeight: { classPropertyName: "headerHeight", publicName: "headerHeight", isSignal: true, isRequired: false, transformFunction: null }, theme: { classPropertyName: "theme", publicName: "theme", isSignal: true, isRequired: false, transformFunction: null }, density: { classPropertyName: "density", publicName: "density", isSignal: true, isRequired: false, transformFunction: null }, enableCellChangeFlash: { classPropertyName: "enableCellChangeFlash", publicName: "enableCellChangeFlash", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, noRowsMessage: { classPropertyName: "noRowsMessage", publicName: "noRowsMessage", isSignal: true, isRequired: false, transformFunction: null }, noMatchingRowsMessage: { classPropertyName: "noMatchingRowsMessage", publicName: "noMatchingRowsMessage", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { gridReady: "gridReady", rowClicked: "rowClicked", cellClicked: "cellClicked", cellValueChanged: "cellValueChanged", selectionChanged: "selectionChanged", sortChanged: "sortChanged", filterChanged: "filterChanged", columnResized: "columnResized", columnMoved: "columnMoved", columnPinned: "columnPinned", columnVisibilityChanged: "columnVisibilityChanged", paginationChanged: "paginationChanged", stateChanged: "stateChanged", rowDetailToggled: "rowDetailToggled" }, queries: [{ propertyName: "cellTemplates", predicate: YaCellDirective, isSignal: true }, { propertyName: "detailTemplate", first: true, predicate: YaDetailDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "gridHost", first: true, predicate: ["gridHost"], descendants: true, isSignal: true }], ngImport: i0, template: `<div #gridHost class="ya-grid-angular-host"></div>`, isInline: true, styles: [":host{display:block;width:100%;height:100%}.ya-grid-angular-host{width:100%;height:100%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
377
|
+
}
|
|
378
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: YaGridComponent, decorators: [{
|
|
379
|
+
type: Component,
|
|
380
|
+
args: [{ selector: 'ya-grid', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: `<div #gridHost class="ya-grid-angular-host"></div>`, styles: [":host{display:block;width:100%;height:100%}.ya-grid-angular-host{width:100%;height:100%}\n"] }]
|
|
381
|
+
}], ctorParameters: () => [] });
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* Generated bundle index. Do not edit.
|
|
385
|
+
*/
|
|
386
|
+
|
|
387
|
+
export { AngularMountAdapter, YaCellDirective, YaDetailDirective, YaGridComponent };
|
|
388
|
+
//# sourceMappingURL=ya-grid-angular.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ya-grid-angular.mjs","sources":["../../src/angular-mount-adapter.ts","../../src/ya-cell.directive.ts","../../src/ya-detail.directive.ts","../../src/ya-grid.component.ts","../../src/ya-grid-angular.ts"],"sourcesContent":["import {\n type ApplicationRef,\n type ComponentRef,\n createComponent,\n type EnvironmentInjector,\n reflectComponentType,\n type TemplateRef,\n type Type,\n} from '@angular/core';\nimport type {\n CellRendererParams,\n ComponentMountAdapter,\n DetailCellRendererParams,\n MountedComponentHandle,\n} from '@ya-grid/core';\nimport type { YaCellTemplateContext } from './ya-cell.directive';\nimport type { YaDetailTemplateContext } from './ya-detail.directive';\n\nexport interface YaCellRendererComponent<TData = Record<string, unknown>, TValue = unknown> {\n params?: CellRendererParams<TData, TValue>;\n}\n\nexport interface YaDetailRendererComponent<TData = Record<string, unknown>> {\n params?: DetailCellRendererParams<TData>;\n}\n\nfunction isAngularComponentClass(value: unknown): value is Type<unknown> {\n return typeof value === 'function' && 'ɵcmp' in value;\n}\n\n/**\n * Passes `params` to a mounted component. Uses setInput when the component declares a\n * `params` input (signal or decorator); otherwise assigns the plain property. setInput on\n * an undeclared input does not throw (it only logs NG0303 in dev mode), so it cannot be\n * used as a try/catch probe.\n */\nfunction setParams(compRef: ComponentRef<unknown>, renderer: Type<unknown>, params: unknown): void {\n const declaresInput = reflectComponentType(renderer)?.inputs.some(\n (input) => input.templateName === 'params' || input.propName === 'params',\n );\n if (declaresInput) {\n compRef.setInput('params', params);\n } else {\n (compRef.instance as { params?: unknown }).params = params;\n }\n}\n\nexport class AngularMountAdapter implements ComponentMountAdapter {\n private templateMap = new Map<string, TemplateRef<YaCellTemplateContext<any, any>>>();\n private detailTemplate: TemplateRef<YaDetailTemplateContext<any>> | null = null;\n\n constructor(\n private readonly appRef: ApplicationRef,\n private readonly envInjector: EnvironmentInjector,\n ) {}\n\n setTemplates(map: Map<string, TemplateRef<YaCellTemplateContext<any, any>>>): void {\n this.templateMap = map;\n }\n\n setDetailTemplate(tpl: TemplateRef<YaDetailTemplateContext<any>> | null): void {\n this.detailTemplate = tpl;\n }\n\n canMount(renderer: unknown, colId: string): boolean {\n if (this.templateMap.has(colId)) return true;\n return isAngularComponentClass(renderer);\n }\n\n canMountDetail(renderer: unknown): boolean {\n if (this.detailTemplate) return true;\n return isAngularComponentClass(renderer);\n }\n\n mountDetail(\n container: HTMLElement,\n renderer: unknown,\n params: DetailCellRendererParams<any>,\n ): MountedComponentHandle {\n if (this.detailTemplate) {\n const context: YaDetailTemplateContext<any> = {\n $implicit: params.data,\n data: params.data,\n node: params.node,\n api: params.api,\n };\n const viewRef = this.detailTemplate.createEmbeddedView(context);\n this.appRef.attachView(viewRef);\n for (const node of viewRef.rootNodes) {\n container.appendChild(node);\n }\n viewRef.detectChanges();\n\n return {\n destroy: () => {\n this.appRef.detachView(viewRef);\n viewRef.destroy();\n },\n };\n }\n\n if (isAngularComponentClass(renderer)) {\n const host = document.createElement('div');\n host.style.display = 'contents';\n container.appendChild(host);\n\n const compRef = createComponent(renderer, {\n environmentInjector: this.envInjector,\n hostElement: host,\n });\n\n setParams(compRef, renderer, params);\n\n this.appRef.attachView(compRef.hostView);\n compRef.changeDetectorRef.detectChanges();\n\n return {\n destroy: () => {\n this.appRef.detachView(compRef.hostView);\n compRef.destroy();\n },\n };\n }\n\n return { destroy: () => {} };\n }\n\n mount(\n container: HTMLElement,\n renderer: unknown,\n params: CellRendererParams<any, any>,\n ): MountedComponentHandle {\n const templateRef = this.templateMap.get(params.colDef.colId);\n if (templateRef) {\n const context: YaCellTemplateContext<any, any> = {\n $implicit: params.value,\n value: params.value,\n formattedValue: params.formattedValue,\n data: params.data,\n node: params.node,\n colDef: params.colDef,\n api: params.api,\n };\n const viewRef = templateRef.createEmbeddedView(context);\n this.appRef.attachView(viewRef);\n for (const node of viewRef.rootNodes) {\n container.appendChild(node);\n }\n viewRef.detectChanges();\n\n return {\n destroy: () => {\n this.appRef.detachView(viewRef);\n viewRef.destroy();\n },\n };\n }\n\n if (isAngularComponentClass(renderer)) {\n const host = document.createElement('div');\n host.style.display = 'contents';\n container.appendChild(host);\n\n const compRef = createComponent(renderer, {\n environmentInjector: this.envInjector,\n hostElement: host,\n });\n\n setParams(compRef, renderer, params);\n\n this.appRef.attachView(compRef.hostView);\n compRef.changeDetectorRef.detectChanges();\n\n return {\n destroy: () => {\n this.appRef.detachView(compRef.hostView);\n compRef.destroy();\n },\n };\n }\n\n return { destroy: () => {} };\n }\n}\n","import { Directive, inject, input, TemplateRef } from '@angular/core';\nimport type { GridApi, ResolvedColDef, RowNode } from '@ya-grid/core';\n\nexport interface YaCellTemplateContext<TData = Record<string, unknown>, TValue = unknown> {\n $implicit: TValue;\n value: TValue;\n formattedValue: string;\n data: TData;\n node: RowNode<TData>;\n colDef: ResolvedColDef<TData, TValue>;\n api: GridApi<TData>;\n}\n\n@Directive({\n selector: 'ng-template[yaCell]',\n standalone: true,\n})\nexport class YaCellDirective<TData = Record<string, unknown>, TValue = unknown> {\n readonly colId = input.required<string>({ alias: 'yaCell' });\n readonly templateRef = inject(TemplateRef<YaCellTemplateContext<TData, TValue>>);\n\n static ngTemplateContextGuard<TData, TValue>(\n _dir: YaCellDirective<TData, TValue>,\n ctx: unknown,\n ): ctx is YaCellTemplateContext<TData, TValue> {\n return true;\n }\n}\n","import { Directive, inject, input, TemplateRef } from '@angular/core';\nimport type { GridApi, RowNode } from '@ya-grid/core';\n\nexport interface YaDetailTemplateContext<TData = Record<string, unknown>> {\n $implicit: TData;\n data: TData;\n node: RowNode<TData>;\n api: GridApi<TData>;\n}\n\n@Directive({\n selector: 'ng-template[yaDetail]',\n standalone: true,\n})\nexport class YaDetailDirective<TData = Record<string, unknown>> {\n /**\n * Optional type-inference binding: pass `[yaDetail]=\"rowData()\"` to get full\n * strict TypeScript inference on `let-row` inside Angular templates.\n */\n readonly yaDetail = input<readonly TData[] | TData | ''>('');\n readonly templateRef = inject(TemplateRef<YaDetailTemplateContext<TData>>);\n\n static ngTemplateContextGuard<TData>(\n _dir: YaDetailDirective<TData>,\n ctx: unknown,\n ): ctx is YaDetailTemplateContext<TData> {\n return true;\n }\n}\n","import {\n ApplicationRef,\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n contentChild,\n contentChildren,\n DestroyRef,\n type ElementRef,\n EnvironmentInjector,\n effect,\n inject,\n input,\n output,\n type TemplateRef,\n untracked,\n viewChild,\n} from '@angular/core';\nimport {\n type CellClickedEvent,\n type CellValueChangedEvent,\n type ColDef,\n type ColumnDefItem,\n type ColumnMovedEvent,\n type ColumnPinnedEvent,\n type ColumnResizedEvent,\n type ColumnTypeDef,\n type ColumnVisibilityChangedEvent,\n type CsvExportParams,\n createGrid,\n type DetailCellRenderer,\n type FilterChangedEvent,\n type FilterModel,\n type GlobalSearchConfig,\n type GridApi,\n type GridDensity,\n type GridOptions,\n type GridReadyEvent,\n type GridState,\n type GridThemeMode,\n type PaginationChangedEvent,\n type PinnedSummaryConfig,\n type ResponsivePinningConfig,\n type RowClickedEvent,\n type RowDetailToggledEvent,\n type RowModelType,\n type RowNode,\n type RowSelectionConfig,\n type SelectionChangedEvent,\n type ServerSideDatasource,\n type SortChangedEvent,\n type SortModelItem,\n type StateChangedEvent,\n type VirtualizationConfig,\n} from '@ya-grid/core';\nimport { AngularMountAdapter } from './angular-mount-adapter';\nimport { YaCellDirective, type YaCellTemplateContext } from './ya-cell.directive';\nimport { YaDetailDirective } from './ya-detail.directive';\n\n@Component({\n selector: 'ya-grid',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `<div #gridHost class=\"ya-grid-angular-host\"></div>`,\n styles: `\n :host {\n display: block;\n width: 100%;\n height: 100%;\n }\n .ya-grid-angular-host {\n width: 100%;\n height: 100%;\n }\n `,\n})\nexport class YaGridComponent<TData = Record<string, unknown>> {\n private readonly appRef = inject(ApplicationRef);\n private readonly envInjector = inject(EnvironmentInjector);\n private readonly destroyRef = inject(DestroyRef);\n\n private readonly gridHost = viewChild.required<ElementRef<HTMLElement>>('gridHost');\n private readonly cellTemplates = contentChildren(YaCellDirective);\n private readonly detailTemplate = contentChild(YaDetailDirective);\n\n // Inputs\n readonly rowData = input<TData[]>([]);\n readonly columnDefs = input<ColumnDefItem<TData>[]>([]);\n readonly defaultColDef = input<Partial<ColDef<TData, any>> | undefined>(undefined);\n readonly columnTypes = input<Record<string, ColumnTypeDef<TData>> | undefined>(undefined);\n readonly getRowId = input<((params: { data: TData; index: number }) => string) | undefined>(\n undefined,\n );\n readonly rowModelType = input<RowModelType | undefined>(undefined);\n readonly serverSideDatasource = input<ServerSideDatasource<TData> | null | undefined>(undefined);\n readonly masterDetail = input<boolean | undefined>(undefined);\n readonly isRowMaster = input<((data: TData, node: RowNode<TData>) => boolean) | undefined>(\n undefined,\n );\n readonly detailRowHeight = input<number | undefined>(undefined);\n readonly detailCellRenderer = input<DetailCellRenderer<TData> | undefined>(undefined);\n readonly pinnedTopRowData = input<TData[] | undefined>(undefined);\n readonly pinnedBottomRowData = input<TData[] | undefined>(undefined);\n readonly pinnedBottomSummary = input<boolean | PinnedSummaryConfig | undefined>(undefined);\n readonly globalSearch = input<boolean | GlobalSearchConfig | undefined>(undefined);\n readonly quickFilterText = input<string | undefined>(undefined);\n readonly columnChooser = input<boolean | undefined>(undefined);\n readonly csvExport = input<boolean | CsvExportParams | undefined>(undefined);\n readonly rowSelection = input<'single' | 'multiple' | RowSelectionConfig<TData> | undefined>(\n undefined,\n );\n readonly pagination = input<boolean | undefined>(undefined);\n readonly paginationPageSize = input<number | undefined>(undefined);\n readonly paginationPageSizeSelector = input<number[] | false | undefined>(undefined);\n readonly virtualization = input<boolean | VirtualizationConfig | undefined>(undefined);\n readonly responsivePinning = input<boolean | ResponsivePinningConfig | undefined>(undefined);\n readonly undoRedoCellEditing = input<boolean | undefined>(undefined);\n readonly undoRedoCellEditingLimit = input<number | undefined>(undefined);\n readonly initialState = input<Partial<GridState> | undefined>(undefined);\n readonly initialSortModel = input<SortModelItem[] | undefined>(undefined);\n readonly initialFilterModel = input<FilterModel | undefined>(undefined);\n readonly rowHeight = input<number | undefined>(undefined);\n readonly headerHeight = input<number | undefined>(undefined);\n // Unbound inputs stay undefined so the grid's own defaults (and values set through the\n // API, e.g. api.setTheme) are not overwritten when another input changes\n readonly theme = input<GridThemeMode | undefined>(undefined);\n readonly density = input<GridDensity | undefined>(undefined);\n readonly enableCellChangeFlash = input<boolean | undefined>(undefined);\n readonly ariaLabel = input<string | undefined>(undefined);\n readonly noRowsMessage = input<string | undefined>(undefined);\n readonly noMatchingRowsMessage = input<string | undefined>(undefined);\n readonly loading = input<boolean | undefined>(undefined);\n\n // Outputs\n readonly gridReady = output<GridReadyEvent<TData>>();\n readonly rowClicked = output<RowClickedEvent<TData>>();\n readonly cellClicked = output<CellClickedEvent<TData>>();\n readonly cellValueChanged = output<CellValueChangedEvent<TData, any>>();\n readonly selectionChanged = output<SelectionChangedEvent<TData>>();\n readonly sortChanged = output<SortChangedEvent<TData>>();\n readonly filterChanged = output<FilterChangedEvent<TData>>();\n readonly columnResized = output<ColumnResizedEvent<TData>>();\n readonly columnMoved = output<ColumnMovedEvent<TData>>();\n readonly columnPinned = output<ColumnPinnedEvent<TData>>();\n readonly columnVisibilityChanged = output<ColumnVisibilityChangedEvent<TData>>();\n readonly paginationChanged = output<PaginationChangedEvent<TData>>();\n readonly stateChanged = output<StateChangedEvent<TData>>();\n readonly rowDetailToggled = output<RowDetailToggledEvent<TData>>();\n\n private api: GridApi<TData> | null = null;\n private readonly mountAdapter = new AngularMountAdapter(this.appRef, this.envInjector);\n /** Input-derived options as last sent to the grid; only differences are sent later. */\n private sentOptions: Partial<GridOptions<TData>> = {};\n private templateSignature: unknown[] = [];\n\n /** Output bridges; created once so they never count as changed options. */\n private readonly eventOptions: Partial<GridOptions<TData>> = {\n componentMountAdapter: this.mountAdapter,\n onGridReady: (e) => {\n // Fires synchronously inside createGrid: expose the API before handlers run\n this.api = e.api;\n this.gridReady.emit(e);\n },\n onRowClicked: (e) => this.rowClicked.emit(e),\n onCellClicked: (e) => this.cellClicked.emit(e),\n onCellValueChanged: (e) => this.cellValueChanged.emit(e),\n onSelectionChanged: (e) => this.selectionChanged.emit(e),\n onSortChanged: (e) => this.sortChanged.emit(e),\n onFilterChanged: (e) => this.filterChanged.emit(e),\n onColumnResized: (e) => this.columnResized.emit(e),\n onColumnMoved: (e) => this.columnMoved.emit(e),\n onColumnPinned: (e) => this.columnPinned.emit(e),\n onColumnVisibilityChanged: (e) => this.columnVisibilityChanged.emit(e),\n onPaginationChanged: (e) => this.paginationChanged.emit(e),\n onStateChanged: (e) => this.stateChanged.emit(e),\n onRowDetailToggled: (e) => this.rowDetailToggled.emit(e),\n };\n\n constructor() {\n afterNextRender(() => {\n this.syncTemplateMap();\n const options = this.buildOptions();\n this.sentOptions = options;\n untracked(() => {\n this.api = createGrid<TData>(this.gridHost().nativeElement, {\n ...options,\n ...this.eventOptions,\n } as GridOptions<TData>);\n });\n });\n\n effect(() => {\n // Reading the inputs and content templates here makes the effect track them\n const templatesChanged = this.syncTemplateMap();\n const options = this.buildOptions();\n const api = this.api;\n if (!api) return;\n const changed = this.diffOptions(options);\n this.sentOptions = options;\n // Grid callbacks (valueFormatter, cellClass, getRowId, …) run inside these calls;\n // signals they read must not become dependencies of this effect\n untracked(() => {\n if (changed) api.updateOptions(changed);\n if (templatesChanged) api.refreshCells();\n });\n });\n\n this.destroyRef.onDestroy(() => {\n this.api?.destroy();\n this.api = null;\n });\n }\n\n private diffOptions(next: Partial<GridOptions<TData>>): Partial<GridOptions<TData>> | null {\n const prev = this.sentOptions as Record<string, unknown>;\n const changed: Record<string, unknown> = {};\n let any = false;\n for (const [key, value] of Object.entries(next)) {\n if (!Object.is(prev[key], value)) {\n changed[key] = value;\n any = true;\n }\n }\n return any ? (changed as Partial<GridOptions<TData>>) : null;\n }\n\n getApi(): GridApi<TData> | null {\n return this.api;\n }\n\n /** Updates the adapter's templates. Returns true when they differ from the last call. */\n private syncTemplateMap(): boolean {\n const map = new Map<string, TemplateRef<YaCellTemplateContext<any, any>>>();\n const signature: unknown[] = [];\n for (const dir of this.cellTemplates()) {\n const colId = dir.colId();\n map.set(colId, dir.templateRef);\n signature.push(colId, dir.templateRef);\n }\n const detail = this.detailTemplate()?.templateRef ?? null;\n signature.push(detail);\n this.mountAdapter.setTemplates(map);\n this.mountAdapter.setDetailTemplate(detail);\n const changed =\n signature.length !== this.templateSignature.length ||\n signature.some((v, i) => v !== this.templateSignature[i]);\n this.templateSignature = signature;\n return changed;\n }\n\n private buildOptions(): Partial<GridOptions<TData>> {\n return {\n rowData: this.rowData(),\n columnDefs: this.columnDefs(),\n defaultColDef: this.defaultColDef(),\n columnTypes: this.columnTypes(),\n getRowId: this.getRowId(),\n rowModelType: this.rowModelType(),\n serverSideDatasource: this.serverSideDatasource(),\n masterDetail: this.masterDetail(),\n isRowMaster: this.isRowMaster(),\n detailRowHeight: this.detailRowHeight(),\n detailCellRenderer: this.detailCellRenderer(),\n pinnedTopRowData: this.pinnedTopRowData(),\n pinnedBottomRowData: this.pinnedBottomRowData(),\n pinnedBottomSummary: this.pinnedBottomSummary(),\n globalSearch: this.globalSearch(),\n quickFilterText: this.quickFilterText(),\n columnChooser: this.columnChooser(),\n csvExport: this.csvExport(),\n rowSelection: this.rowSelection(),\n pagination: this.pagination(),\n paginationPageSize: this.paginationPageSize(),\n paginationPageSizeSelector: this.paginationPageSizeSelector(),\n virtualization: this.virtualization(),\n responsivePinning: this.responsivePinning(),\n undoRedoCellEditing: this.undoRedoCellEditing(),\n undoRedoCellEditingLimit: this.undoRedoCellEditingLimit(),\n initialState: this.initialState(),\n initialSortModel: this.initialSortModel(),\n initialFilterModel: this.initialFilterModel(),\n rowHeight: this.rowHeight(),\n headerHeight: this.headerHeight(),\n theme: this.theme(),\n density: this.density(),\n enableCellChangeFlash: this.enableCellChangeFlash(),\n ariaLabel: this.ariaLabel(),\n noRowsMessage: this.noRowsMessage(),\n noMatchingRowsMessage: this.noMatchingRowsMessage(),\n loading: this.loading(),\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AA0BA,SAAS,uBAAuB,CAAC,KAAc,EAAA;IAC7C,OAAO,OAAO,KAAK,KAAK,UAAU,IAAI,MAAM,IAAI,KAAK;AACvD;AAEA;;;;;AAKG;AACH,SAAS,SAAS,CAAC,OAA8B,EAAE,QAAuB,EAAE,MAAe,EAAA;AACzF,IAAA,MAAM,aAAa,GAAG,oBAAoB,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,IAAI,CAC/D,CAAC,KAAK,KAAK,KAAK,CAAC,YAAY,KAAK,QAAQ,IAAI,KAAK,CAAC,QAAQ,KAAK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AA,SAAA,EACjB,iBAAiB,sLApBtD,CAAA,kDAAA,CAAoD,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,4FAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAanD,eAAe,EAAA,UAAA,EAAA,CAAA;kBAjB3B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,SAAS,cACP,IAAI,EAAA,eAAA,EACC,uBAAuB,CAAC,MAAM,YACrC,CAAA,kDAAA,CAAoD,EAAA,MAAA,EAAA,CAAA,4FAAA,CAAA,EAAA;;;AC/DhE;;AAEG;;"}
|
package/index.d.ts
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,50 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ya-grid/angular",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"description": "Modern Angular (v18+, Signals, zoneless) adapter for YA-Grid",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Erik-Jan van Baaren <erikjan@gmail.com>",
|
|
7
|
+
"homepage": "https://github.com/eriky/ya-grid#readme",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/eriky/ya-grid.git",
|
|
11
|
+
"directory": "packages/angular"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/eriky/ya-grid/issues"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"angular",
|
|
18
|
+
"angular-signals",
|
|
19
|
+
"zoneless",
|
|
20
|
+
"data-grid",
|
|
21
|
+
"datagrid",
|
|
22
|
+
"table",
|
|
23
|
+
"ya-grid"
|
|
24
|
+
],
|
|
25
|
+
"publishConfig": {
|
|
26
|
+
"access": "public",
|
|
27
|
+
"directory": "dist"
|
|
28
|
+
},
|
|
29
|
+
"type": "module",
|
|
30
|
+
"module": "fesm2022/ya-grid-angular.mjs",
|
|
31
|
+
"typings": "index.d.ts",
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"tslib": "^2.3.0",
|
|
34
|
+
"@ya-grid/core": "0.4.0"
|
|
35
|
+
},
|
|
36
|
+
"peerDependencies": {
|
|
37
|
+
"@angular/common": ">=18.0.0",
|
|
38
|
+
"@angular/core": ">=18.0.0"
|
|
39
|
+
},
|
|
40
|
+
"exports": {
|
|
41
|
+
"./package.json": {
|
|
42
|
+
"default": "./package.json"
|
|
43
|
+
},
|
|
44
|
+
".": {
|
|
45
|
+
"types": "./index.d.ts",
|
|
46
|
+
"default": "./fesm2022/ya-grid-angular.mjs"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"sideEffects": false
|
|
6
50
|
}
|
package/public-api.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type { AggFunc, AggFuncParams, BadgeColumnOptions, BadgeStyleConfig, BadgeTone, BarColumnOptions, BarColumnThresholds, BooleanColumnOptions, BuiltInAggFunc, CellClassParams, CellClickedEvent, CellEditorParams, CellEditorType, CellRenderer, CellRendererParams, CellValidatorParams, CellValueChangedEvent, ColDef, ColGroupDef, ColumnDefItem, ColumnFilterModel, ColumnMovedEvent, ColumnPinnedEvent, ColumnResizedEvent, ColumnStateItem, ColumnTypeDef, ColumnVisibilityChangedEvent, CsvExportParams, CurrencyColumnOptions, DetailCellRenderer, DetailCellRendererParams, EditableParams, FilterChangedEvent, FilterModel, FilterType, GlobalSearchConfig, GridApi, GridDensity, GridOptions, GridReadyEvent, GridState, GridThemeMode, HeaderGroupMeta, PaginationChangedEvent, PaginationState, PercentColumnOptions, PinnedDirection, PinnedSummaryConfig, ResolvedColDef, ResponsivePinningConfig, RowClickedEvent, RowDataTransaction, RowDataTransactionResult, RowDetailToggledEvent, RowModelType, RowNode, RowSelectionConfig, SelectionChangedEvent, ServerSideDatasource, ServerSideGetRowsRequest, ServerSideGetRowsResult, SortChangedEvent, SortDirection, SortModelItem, SparklineColumnOptions, StateChangedEvent, ValueParserParams, ValueSetterParams, VirtualizationConfig, } from '@ya-grid/core';
|
|
2
|
+
export { badgeColumn, barColumn, booleanColumn, createBuiltInColumnTypes, currencyColumn, percentColumn, sparklineColumn, } from '@ya-grid/core';
|
|
3
|
+
export { AngularMountAdapter, type YaCellRendererComponent, type YaDetailRendererComponent, } from './angular-mount-adapter';
|
|
4
|
+
export { YaCellDirective, type YaCellTemplateContext } from './ya-cell.directive';
|
|
5
|
+
export { YaDetailDirective, type YaDetailTemplateContext } from './ya-detail.directive';
|
|
6
|
+
export { YaGridComponent } from './ya-grid.component';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { TemplateRef } from '@angular/core';
|
|
2
|
+
import type { GridApi, ResolvedColDef, RowNode } from '@ya-grid/core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export interface YaCellTemplateContext<TData = Record<string, unknown>, TValue = unknown> {
|
|
5
|
+
$implicit: TValue;
|
|
6
|
+
value: TValue;
|
|
7
|
+
formattedValue: string;
|
|
8
|
+
data: TData;
|
|
9
|
+
node: RowNode<TData>;
|
|
10
|
+
colDef: ResolvedColDef<TData, TValue>;
|
|
11
|
+
api: GridApi<TData>;
|
|
12
|
+
}
|
|
13
|
+
export declare class YaCellDirective<TData = Record<string, unknown>, TValue = unknown> {
|
|
14
|
+
readonly colId: import("@angular/core").InputSignal<string>;
|
|
15
|
+
readonly templateRef: TemplateRef<any>;
|
|
16
|
+
static ngTemplateContextGuard<TData, TValue>(_dir: YaCellDirective<TData, TValue>, ctx: unknown): ctx is YaCellTemplateContext<TData, TValue>;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<YaCellDirective<any, any>, never>;
|
|
18
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<YaCellDirective<any, any>, "ng-template[yaCell]", never, { "colId": { "alias": "yaCell"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { TemplateRef } from '@angular/core';
|
|
2
|
+
import type { GridApi, RowNode } from '@ya-grid/core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export interface YaDetailTemplateContext<TData = Record<string, unknown>> {
|
|
5
|
+
$implicit: TData;
|
|
6
|
+
data: TData;
|
|
7
|
+
node: RowNode<TData>;
|
|
8
|
+
api: GridApi<TData>;
|
|
9
|
+
}
|
|
10
|
+
export declare class YaDetailDirective<TData = Record<string, unknown>> {
|
|
11
|
+
/**
|
|
12
|
+
* Optional type-inference binding: pass `[yaDetail]="rowData()"` to get full
|
|
13
|
+
* strict TypeScript inference on `let-row` inside Angular templates.
|
|
14
|
+
*/
|
|
15
|
+
readonly yaDetail: import("@angular/core").InputSignal<"" | TData | readonly TData[]>;
|
|
16
|
+
readonly templateRef: TemplateRef<any>;
|
|
17
|
+
static ngTemplateContextGuard<TData>(_dir: YaDetailDirective<TData>, ctx: unknown): ctx is YaDetailTemplateContext<TData>;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<YaDetailDirective<any>, never>;
|
|
19
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<YaDetailDirective<any>, "ng-template[yaDetail]", never, { "yaDetail": { "alias": "yaDetail"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { type CellClickedEvent, type CellValueChangedEvent, type ColDef, type ColumnDefItem, type ColumnMovedEvent, type ColumnPinnedEvent, type ColumnResizedEvent, type ColumnVisibilityChangedEvent, type CsvExportParams, type DetailCellRenderer, type FilterChangedEvent, type FilterModel, type GlobalSearchConfig, type GridApi, type GridDensity, type GridReadyEvent, type GridState, type GridThemeMode, type PaginationChangedEvent, type PinnedSummaryConfig, type ResponsivePinningConfig, type RowClickedEvent, type RowDetailToggledEvent, type RowModelType, type RowNode, type RowSelectionConfig, type SelectionChangedEvent, type ServerSideDatasource, type SortChangedEvent, type SortModelItem, type StateChangedEvent, type VirtualizationConfig } from '@ya-grid/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class YaGridComponent<TData = Record<string, unknown>> {
|
|
4
|
+
private readonly appRef;
|
|
5
|
+
private readonly envInjector;
|
|
6
|
+
private readonly destroyRef;
|
|
7
|
+
private readonly gridHost;
|
|
8
|
+
private readonly cellTemplates;
|
|
9
|
+
private readonly detailTemplate;
|
|
10
|
+
readonly rowData: import("@angular/core").InputSignal<TData[]>;
|
|
11
|
+
readonly columnDefs: import("@angular/core").InputSignal<ColumnDefItem<TData>[]>;
|
|
12
|
+
readonly defaultColDef: import("@angular/core").InputSignal<Partial<ColDef<TData, any>>>;
|
|
13
|
+
readonly columnTypes: import("@angular/core").InputSignal<Record<string, Partial<ColDef<TData, any>>>>;
|
|
14
|
+
readonly getRowId: import("@angular/core").InputSignal<(params: {
|
|
15
|
+
data: TData;
|
|
16
|
+
index: number;
|
|
17
|
+
}) => string>;
|
|
18
|
+
readonly rowModelType: import("@angular/core").InputSignal<RowModelType>;
|
|
19
|
+
readonly serverSideDatasource: import("@angular/core").InputSignal<ServerSideDatasource<TData>>;
|
|
20
|
+
readonly masterDetail: import("@angular/core").InputSignal<boolean>;
|
|
21
|
+
readonly isRowMaster: import("@angular/core").InputSignal<(data: TData, node: RowNode<TData>) => boolean>;
|
|
22
|
+
readonly detailRowHeight: import("@angular/core").InputSignal<number>;
|
|
23
|
+
readonly detailCellRenderer: import("@angular/core").InputSignal<DetailCellRenderer<TData>>;
|
|
24
|
+
readonly pinnedTopRowData: import("@angular/core").InputSignal<TData[]>;
|
|
25
|
+
readonly pinnedBottomRowData: import("@angular/core").InputSignal<TData[]>;
|
|
26
|
+
readonly pinnedBottomSummary: import("@angular/core").InputSignal<boolean | PinnedSummaryConfig>;
|
|
27
|
+
readonly globalSearch: import("@angular/core").InputSignal<boolean | GlobalSearchConfig>;
|
|
28
|
+
readonly quickFilterText: import("@angular/core").InputSignal<string>;
|
|
29
|
+
readonly columnChooser: import("@angular/core").InputSignal<boolean>;
|
|
30
|
+
readonly csvExport: import("@angular/core").InputSignal<boolean | CsvExportParams>;
|
|
31
|
+
readonly rowSelection: import("@angular/core").InputSignal<RowSelectionConfig<TData> | "single" | "multiple">;
|
|
32
|
+
readonly pagination: import("@angular/core").InputSignal<boolean>;
|
|
33
|
+
readonly paginationPageSize: import("@angular/core").InputSignal<number>;
|
|
34
|
+
readonly paginationPageSizeSelector: import("@angular/core").InputSignal<false | number[]>;
|
|
35
|
+
readonly virtualization: import("@angular/core").InputSignal<boolean | VirtualizationConfig>;
|
|
36
|
+
readonly responsivePinning: import("@angular/core").InputSignal<boolean | ResponsivePinningConfig>;
|
|
37
|
+
readonly undoRedoCellEditing: import("@angular/core").InputSignal<boolean>;
|
|
38
|
+
readonly undoRedoCellEditingLimit: import("@angular/core").InputSignal<number>;
|
|
39
|
+
readonly initialState: import("@angular/core").InputSignal<Partial<GridState>>;
|
|
40
|
+
readonly initialSortModel: import("@angular/core").InputSignal<SortModelItem[]>;
|
|
41
|
+
readonly initialFilterModel: import("@angular/core").InputSignal<FilterModel>;
|
|
42
|
+
readonly rowHeight: import("@angular/core").InputSignal<number>;
|
|
43
|
+
readonly headerHeight: import("@angular/core").InputSignal<number>;
|
|
44
|
+
readonly theme: import("@angular/core").InputSignal<GridThemeMode>;
|
|
45
|
+
readonly density: import("@angular/core").InputSignal<GridDensity>;
|
|
46
|
+
readonly enableCellChangeFlash: import("@angular/core").InputSignal<boolean>;
|
|
47
|
+
readonly ariaLabel: import("@angular/core").InputSignal<string>;
|
|
48
|
+
readonly noRowsMessage: import("@angular/core").InputSignal<string>;
|
|
49
|
+
readonly noMatchingRowsMessage: import("@angular/core").InputSignal<string>;
|
|
50
|
+
readonly loading: import("@angular/core").InputSignal<boolean>;
|
|
51
|
+
readonly gridReady: import("@angular/core").OutputEmitterRef<GridReadyEvent<TData>>;
|
|
52
|
+
readonly rowClicked: import("@angular/core").OutputEmitterRef<RowClickedEvent<TData>>;
|
|
53
|
+
readonly cellClicked: import("@angular/core").OutputEmitterRef<CellClickedEvent<TData>>;
|
|
54
|
+
readonly cellValueChanged: import("@angular/core").OutputEmitterRef<CellValueChangedEvent<TData, any>>;
|
|
55
|
+
readonly selectionChanged: import("@angular/core").OutputEmitterRef<SelectionChangedEvent<TData>>;
|
|
56
|
+
readonly sortChanged: import("@angular/core").OutputEmitterRef<SortChangedEvent<TData>>;
|
|
57
|
+
readonly filterChanged: import("@angular/core").OutputEmitterRef<FilterChangedEvent<TData>>;
|
|
58
|
+
readonly columnResized: import("@angular/core").OutputEmitterRef<ColumnResizedEvent<TData>>;
|
|
59
|
+
readonly columnMoved: import("@angular/core").OutputEmitterRef<ColumnMovedEvent<TData>>;
|
|
60
|
+
readonly columnPinned: import("@angular/core").OutputEmitterRef<ColumnPinnedEvent<TData>>;
|
|
61
|
+
readonly columnVisibilityChanged: import("@angular/core").OutputEmitterRef<ColumnVisibilityChangedEvent<TData>>;
|
|
62
|
+
readonly paginationChanged: import("@angular/core").OutputEmitterRef<PaginationChangedEvent<TData>>;
|
|
63
|
+
readonly stateChanged: import("@angular/core").OutputEmitterRef<StateChangedEvent<TData>>;
|
|
64
|
+
readonly rowDetailToggled: import("@angular/core").OutputEmitterRef<RowDetailToggledEvent<TData>>;
|
|
65
|
+
private api;
|
|
66
|
+
private readonly mountAdapter;
|
|
67
|
+
/** Input-derived options as last sent to the grid; only differences are sent later. */
|
|
68
|
+
private sentOptions;
|
|
69
|
+
private templateSignature;
|
|
70
|
+
/** Output bridges; created once so they never count as changed options. */
|
|
71
|
+
private readonly eventOptions;
|
|
72
|
+
constructor();
|
|
73
|
+
private diffOptions;
|
|
74
|
+
getApi(): GridApi<TData> | null;
|
|
75
|
+
/** Updates the adapter's templates. Returns true when they differ from the last call. */
|
|
76
|
+
private syncTemplateMap;
|
|
77
|
+
private buildOptions;
|
|
78
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<YaGridComponent<any>, never>;
|
|
79
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<YaGridComponent<any>, "ya-grid", never, { "rowData": { "alias": "rowData"; "required": false; "isSignal": true; }; "columnDefs": { "alias": "columnDefs"; "required": false; "isSignal": true; }; "defaultColDef": { "alias": "defaultColDef"; "required": false; "isSignal": true; }; "columnTypes": { "alias": "columnTypes"; "required": false; "isSignal": true; }; "getRowId": { "alias": "getRowId"; "required": false; "isSignal": true; }; "rowModelType": { "alias": "rowModelType"; "required": false; "isSignal": true; }; "serverSideDatasource": { "alias": "serverSideDatasource"; "required": false; "isSignal": true; }; "masterDetail": { "alias": "masterDetail"; "required": false; "isSignal": true; }; "isRowMaster": { "alias": "isRowMaster"; "required": false; "isSignal": true; }; "detailRowHeight": { "alias": "detailRowHeight"; "required": false; "isSignal": true; }; "detailCellRenderer": { "alias": "detailCellRenderer"; "required": false; "isSignal": true; }; "pinnedTopRowData": { "alias": "pinnedTopRowData"; "required": false; "isSignal": true; }; "pinnedBottomRowData": { "alias": "pinnedBottomRowData"; "required": false; "isSignal": true; }; "pinnedBottomSummary": { "alias": "pinnedBottomSummary"; "required": false; "isSignal": true; }; "globalSearch": { "alias": "globalSearch"; "required": false; "isSignal": true; }; "quickFilterText": { "alias": "quickFilterText"; "required": false; "isSignal": true; }; "columnChooser": { "alias": "columnChooser"; "required": false; "isSignal": true; }; "csvExport": { "alias": "csvExport"; "required": false; "isSignal": true; }; "rowSelection": { "alias": "rowSelection"; "required": false; "isSignal": true; }; "pagination": { "alias": "pagination"; "required": false; "isSignal": true; }; "paginationPageSize": { "alias": "paginationPageSize"; "required": false; "isSignal": true; }; "paginationPageSizeSelector": { "alias": "paginationPageSizeSelector"; "required": false; "isSignal": true; }; "virtualization": { "alias": "virtualization"; "required": false; "isSignal": true; }; "responsivePinning": { "alias": "responsivePinning"; "required": false; "isSignal": true; }; "undoRedoCellEditing": { "alias": "undoRedoCellEditing"; "required": false; "isSignal": true; }; "undoRedoCellEditingLimit": { "alias": "undoRedoCellEditingLimit"; "required": false; "isSignal": true; }; "initialState": { "alias": "initialState"; "required": false; "isSignal": true; }; "initialSortModel": { "alias": "initialSortModel"; "required": false; "isSignal": true; }; "initialFilterModel": { "alias": "initialFilterModel"; "required": false; "isSignal": true; }; "rowHeight": { "alias": "rowHeight"; "required": false; "isSignal": true; }; "headerHeight": { "alias": "headerHeight"; "required": false; "isSignal": true; }; "theme": { "alias": "theme"; "required": false; "isSignal": true; }; "density": { "alias": "density"; "required": false; "isSignal": true; }; "enableCellChangeFlash": { "alias": "enableCellChangeFlash"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "noRowsMessage": { "alias": "noRowsMessage"; "required": false; "isSignal": true; }; "noMatchingRowsMessage": { "alias": "noMatchingRowsMessage"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; }, { "gridReady": "gridReady"; "rowClicked": "rowClicked"; "cellClicked": "cellClicked"; "cellValueChanged": "cellValueChanged"; "selectionChanged": "selectionChanged"; "sortChanged": "sortChanged"; "filterChanged": "filterChanged"; "columnResized": "columnResized"; "columnMoved": "columnMoved"; "columnPinned": "columnPinned"; "columnVisibilityChanged": "columnVisibilityChanged"; "paginationChanged": "paginationChanged"; "stateChanged": "stateChanged"; "rowDetailToggled": "rowDetailToggled"; }, ["cellTemplates", "detailTemplate"], never, true, never>;
|
|
80
|
+
}
|