@zengrid/angular 1.2.0 → 1.2.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/README.md +13 -0
- package/package.json +27 -7
- package/src/lib/components/zen-grid.component.ts +96 -55
- package/src/lib/plugins/angular-plugin-wrapper.ts +9 -3
- package/src/lib/types.ts +29 -1
- package/src/public-api.ts +330 -3
package/README.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# @zengrid/angular
|
|
2
|
+
|
|
3
|
+
Angular wrapper for ZenGrid.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @zengrid/angular @zengrid/core @zengrid/shared
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
Import `ZenGridComponent` into your Angular application and bind standard grid inputs such as `rowCount`, `colCount`, `columns`, and `data`.
|
package/package.json
CHANGED
|
@@ -1,18 +1,38 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zengrid/angular",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "Angular wrapper for ZenGrid high-performance data grid",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"angular",
|
|
7
|
+
"grid",
|
|
8
|
+
"data-grid",
|
|
9
|
+
"spreadsheet",
|
|
10
|
+
"virtual-scroll"
|
|
11
|
+
],
|
|
12
|
+
"author": "ZenGrid Team",
|
|
5
13
|
"license": "MIT",
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "https://github.com/zengrid-dev/zengrid.git",
|
|
17
|
+
"directory": "packages/angular"
|
|
18
|
+
},
|
|
19
|
+
"bugs": {
|
|
20
|
+
"url": "https://github.com/zengrid-dev/zengrid/issues"
|
|
21
|
+
},
|
|
22
|
+
"homepage": "https://github.com/zengrid-dev/zengrid#readme",
|
|
6
23
|
"peerDependencies": {
|
|
7
24
|
"@angular/core": ">=18.0.0",
|
|
8
25
|
"@angular/common": ">=18.0.0",
|
|
9
26
|
"@angular/forms": ">=18.0.0",
|
|
10
|
-
"@zengrid/core": ">=1.
|
|
27
|
+
"@zengrid/core": ">=1.2.2"
|
|
11
28
|
},
|
|
12
29
|
"dependencies": {
|
|
13
|
-
"
|
|
14
|
-
"@zengrid/
|
|
15
|
-
"
|
|
30
|
+
"@zengrid/core": "1.2.2",
|
|
31
|
+
"@zengrid/shared": "1.2.2",
|
|
32
|
+
"tslib": "^2.3.0"
|
|
16
33
|
},
|
|
17
|
-
"sideEffects": false
|
|
18
|
-
|
|
34
|
+
"sideEffects": false,
|
|
35
|
+
"publishConfig": {
|
|
36
|
+
"access": "public"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -41,7 +41,7 @@ import type {
|
|
|
41
41
|
RendererCacheConfig,
|
|
42
42
|
} from '@zengrid/core';
|
|
43
43
|
import { GridApiImpl, PluginHost } from '@zengrid/core';
|
|
44
|
-
import type
|
|
44
|
+
import { resolveOperationMode, type OperationMode } from '@zengrid/shared';
|
|
45
45
|
import { EVENT_MAP } from '../utils/event-map';
|
|
46
46
|
import { ZenColumnComponent } from './zen-column.component';
|
|
47
47
|
import { TemplateBridgeService } from '../services/template-bridge.service';
|
|
@@ -88,9 +88,9 @@ export class ZenGridComponent {
|
|
|
88
88
|
readonly _isBrowser = isPlatformBrowser(this.platformId);
|
|
89
89
|
|
|
90
90
|
get placeholderHeight(): number {
|
|
91
|
-
const
|
|
92
|
-
const
|
|
93
|
-
return this.rowCount() *
|
|
91
|
+
const rowHeight = this.getResolvedRowHeight();
|
|
92
|
+
const height = typeof rowHeight === 'number' ? rowHeight : 30;
|
|
93
|
+
return this.rowCount() * height;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
private readonly gridContainerRef = viewChild<ElementRef<HTMLElement>>('gridContainer');
|
|
@@ -98,13 +98,21 @@ export class ZenGridComponent {
|
|
|
98
98
|
|
|
99
99
|
private grid: Grid | null = null;
|
|
100
100
|
private gridReady = false;
|
|
101
|
+
private readonly explicitInputs = new Set<'rowHeight' | 'colWidth' | 'columns'>();
|
|
102
|
+
private pendingModelDataSync: any[][] | null = null;
|
|
101
103
|
|
|
102
104
|
// --- Core Inputs ---
|
|
103
105
|
readonly rowCount = input.required<number>();
|
|
104
106
|
readonly colCount = input.required<number>();
|
|
105
|
-
readonly rowHeight = input<number | number[]>(30
|
|
106
|
-
|
|
107
|
-
|
|
107
|
+
readonly rowHeight = input<number | number[], number | number[]>(30, {
|
|
108
|
+
transform: (value: number | number[]) => this.markExplicitInput('rowHeight', value),
|
|
109
|
+
});
|
|
110
|
+
readonly colWidth = input<number | number[], number | number[]>(100, {
|
|
111
|
+
transform: (value: number | number[]) => this.markExplicitInput('colWidth', value),
|
|
112
|
+
});
|
|
113
|
+
readonly columns = input<ColumnDef[], ColumnDef[]>([], {
|
|
114
|
+
transform: (value: ColumnDef[]) => this.markExplicitInput('columns', value),
|
|
115
|
+
});
|
|
108
116
|
|
|
109
117
|
// --- Feature Inputs ---
|
|
110
118
|
readonly enableSelection = input<boolean | undefined>(undefined);
|
|
@@ -118,13 +126,9 @@ export class ZenGridComponent {
|
|
|
118
126
|
|
|
119
127
|
// --- Mode Inputs ---
|
|
120
128
|
readonly dataMode = input<OperationMode | undefined>(undefined);
|
|
121
|
-
readonly sortMode = input<OperationMode | undefined>(undefined);
|
|
122
|
-
readonly filterMode = input<OperationMode | undefined>(undefined);
|
|
123
129
|
|
|
124
130
|
// --- Backend Callback Inputs ---
|
|
125
131
|
readonly onDataRequest = input<GridOptions['onDataRequest']>(undefined);
|
|
126
|
-
readonly onSortRequest = input<GridOptions['onSortRequest']>(undefined);
|
|
127
|
-
readonly onFilterRequest = input<GridOptions['onFilterRequest']>(undefined);
|
|
128
132
|
readonly onLoadMoreRows = input<GridOptions['onLoadMoreRows']>(undefined);
|
|
129
133
|
|
|
130
134
|
// --- Config Object Inputs ---
|
|
@@ -279,27 +283,26 @@ export class ZenGridComponent {
|
|
|
279
283
|
|
|
280
284
|
// Sync data input → grid (skip first run, initGrid handles initial data)
|
|
281
285
|
effect(() => {
|
|
282
|
-
const
|
|
283
|
-
if (!this.gridReady) return;
|
|
284
|
-
if (
|
|
285
|
-
|
|
286
|
+
const data = this.data();
|
|
287
|
+
if (!this.gridReady || this.getResolvedDataMode() !== 'frontend') return;
|
|
288
|
+
if (!Array.isArray(data)) return;
|
|
289
|
+
|
|
290
|
+
if (this.pendingModelDataSync === data) {
|
|
291
|
+
this.pendingModelDataSync = null;
|
|
292
|
+
return;
|
|
286
293
|
}
|
|
294
|
+
|
|
295
|
+
this.grid!.setData(data);
|
|
287
296
|
});
|
|
288
297
|
|
|
289
298
|
// Sync columns from content children or input (skip first run)
|
|
290
299
|
effect(() => {
|
|
291
|
-
|
|
292
|
-
|
|
300
|
+
this.columnChildren();
|
|
301
|
+
this.columns();
|
|
293
302
|
if (!this.gridReady) return;
|
|
294
303
|
|
|
295
|
-
|
|
296
|
-
if (
|
|
297
|
-
resolvedColumns = cols.map(c => c.toColumnDef(this.templateBridge));
|
|
298
|
-
} else {
|
|
299
|
-
resolvedColumns = inputCols;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
if (resolvedColumns.length > 0) {
|
|
304
|
+
const resolvedColumns = this.getComponentColumns();
|
|
305
|
+
if (resolvedColumns !== undefined) {
|
|
303
306
|
this.grid!.updateOptions({ columns: resolvedColumns });
|
|
304
307
|
}
|
|
305
308
|
});
|
|
@@ -308,8 +311,8 @@ export class ZenGridComponent {
|
|
|
308
311
|
const prevOptions: Record<string, any> = {};
|
|
309
312
|
effect(() => {
|
|
310
313
|
const current: Array<[string, any]> = [
|
|
311
|
-
['rowHeight', this.
|
|
312
|
-
['colWidth', this.
|
|
314
|
+
['rowHeight', this.getResolvedRowHeight()],
|
|
315
|
+
['colWidth', this.getResolvedColWidth()],
|
|
313
316
|
['selectionType', this.selectionType()],
|
|
314
317
|
['enableSelection', this.enableSelection()],
|
|
315
318
|
['enableMultiSelection', this.enableMultiSelection()],
|
|
@@ -317,9 +320,7 @@ export class ZenGridComponent {
|
|
|
317
320
|
['enableA11y', this.enableA11y()],
|
|
318
321
|
['enableColumnResize', this.enableColumnResize()],
|
|
319
322
|
['enableColumnDrag', this.enableColumnDrag()],
|
|
320
|
-
['dataMode', this.
|
|
321
|
-
['sortMode', this.sortMode()],
|
|
322
|
-
['filterMode', this.filterMode()],
|
|
323
|
+
['dataMode', this.getConfiguredDataMode()],
|
|
323
324
|
['pagination', this.pagination()],
|
|
324
325
|
['loading', this.loading()],
|
|
325
326
|
['infiniteScrolling', this.infiniteScrolling()],
|
|
@@ -358,6 +359,55 @@ export class ZenGridComponent {
|
|
|
358
359
|
});
|
|
359
360
|
}
|
|
360
361
|
|
|
362
|
+
private markExplicitInput<T>(name: 'rowHeight' | 'colWidth' | 'columns', value: T): T {
|
|
363
|
+
this.explicitInputs.add(name);
|
|
364
|
+
return value;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
private hasExplicitInput(name: 'rowHeight' | 'colWidth' | 'columns'): boolean {
|
|
368
|
+
return this.explicitInputs.has(name);
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
private getResolvedDataMode(): 'frontend' | 'backend' {
|
|
372
|
+
return resolveOperationMode(
|
|
373
|
+
{
|
|
374
|
+
mode: this.getConfiguredDataMode(),
|
|
375
|
+
callback:
|
|
376
|
+
this.onDataRequest() ??
|
|
377
|
+
(this.globalConfig?.['onDataRequest'] as GridOptions['onDataRequest'] | undefined),
|
|
378
|
+
},
|
|
379
|
+
{ rowCount: this.rowCount() }
|
|
380
|
+
);
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
private getConfiguredDataMode(): OperationMode | undefined {
|
|
384
|
+
return this.dataMode() ?? (this.globalConfig?.['dataMode'] as OperationMode | undefined);
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
private getResolvedRowHeight(): number | number[] {
|
|
388
|
+
const configured = this.globalConfig?.['rowHeight'] as GridOptions['rowHeight'] | undefined;
|
|
389
|
+
return this.hasExplicitInput('rowHeight') || configured === undefined ? this.rowHeight() : configured;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
private getResolvedColWidth(): number | number[] {
|
|
393
|
+
const configured = this.globalConfig?.['colWidth'] as GridOptions['colWidth'] | undefined;
|
|
394
|
+
return this.hasExplicitInput('colWidth') || configured === undefined ? this.colWidth() : configured;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
private getComponentColumns(): ColumnDef[] | undefined {
|
|
398
|
+
const columnChildren = this.columnChildren();
|
|
399
|
+
if (columnChildren.length > 0) {
|
|
400
|
+
return columnChildren.map(c => c.toColumnDef(this.templateBridge));
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
const inputColumns = this.columns();
|
|
404
|
+
if (this.hasExplicitInput('columns') || inputColumns.length > 0) {
|
|
405
|
+
return inputColumns;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
return undefined;
|
|
409
|
+
}
|
|
410
|
+
|
|
361
411
|
private buildOutputMap(): void {
|
|
362
412
|
this.outputMap = {
|
|
363
413
|
cellClick: this.cellClick,
|
|
@@ -433,25 +483,18 @@ export class ZenGridComponent {
|
|
|
433
483
|
if (!containerRef) return;
|
|
434
484
|
|
|
435
485
|
const container = containerRef.nativeElement;
|
|
436
|
-
const columnChildren = this.columnChildren();
|
|
437
|
-
const inputColumns = this.columns();
|
|
438
486
|
const dataValue = this.data();
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
if (columnChildren.length > 0) {
|
|
442
|
-
resolvedColumns = columnChildren.map(c => c.toColumnDef(this.templateBridge));
|
|
443
|
-
} else {
|
|
444
|
-
resolvedColumns = inputColumns;
|
|
445
|
-
}
|
|
487
|
+
const componentColumns = this.getComponentColumns();
|
|
488
|
+
const resolvedDataMode = this.getResolvedDataMode();
|
|
446
489
|
|
|
447
490
|
const options: GridOptions = {
|
|
491
|
+
...(this.globalConfig ?? {}),
|
|
448
492
|
rowCount: this.rowCount(),
|
|
449
493
|
colCount: this.colCount(),
|
|
450
|
-
rowHeight: this.rowHeight(),
|
|
451
|
-
colWidth: this.colWidth(),
|
|
452
|
-
columns: resolvedColumns.length > 0 ? resolvedColumns : undefined,
|
|
453
494
|
...this.getOptionalOptions(),
|
|
454
|
-
|
|
495
|
+
rowHeight: this.getResolvedRowHeight(),
|
|
496
|
+
colWidth: this.getResolvedColWidth(),
|
|
497
|
+
...(componentColumns !== undefined ? { columns: componentColumns } : {}),
|
|
455
498
|
};
|
|
456
499
|
|
|
457
500
|
this.grid = new Grid(container, options);
|
|
@@ -459,8 +502,8 @@ export class ZenGridComponent {
|
|
|
459
502
|
// Wire up events
|
|
460
503
|
this.wireEvents();
|
|
461
504
|
|
|
462
|
-
//
|
|
463
|
-
if (
|
|
505
|
+
// Frontend mode owns the in-memory dataset, including an explicit empty array.
|
|
506
|
+
if (resolvedDataMode === 'frontend' && Array.isArray(dataValue)) {
|
|
464
507
|
this.grid.setData(dataValue);
|
|
465
508
|
}
|
|
466
509
|
|
|
@@ -485,12 +528,8 @@ export class ZenGridComponent {
|
|
|
485
528
|
const enPool = this.enableCellPooling();
|
|
486
529
|
const enResize = this.enableColumnResize();
|
|
487
530
|
const enDrag = this.enableColumnDrag();
|
|
488
|
-
const dMode = this.
|
|
489
|
-
const sMode = this.sortMode();
|
|
490
|
-
const fMode = this.filterMode();
|
|
531
|
+
const dMode = this.getConfiguredDataMode();
|
|
491
532
|
const dReq = this.onDataRequest();
|
|
492
|
-
const sReq = this.onSortRequest();
|
|
493
|
-
const fReq = this.onFilterRequest();
|
|
494
533
|
const loadMore = this.onLoadMoreRows();
|
|
495
534
|
const pag = this.pagination();
|
|
496
535
|
const load = this.loading();
|
|
@@ -522,11 +561,7 @@ export class ZenGridComponent {
|
|
|
522
561
|
if (enResize !== undefined) opts.enableColumnResize = enResize;
|
|
523
562
|
if (enDrag !== undefined) opts.enableColumnDrag = enDrag;
|
|
524
563
|
if (dMode !== undefined) opts.dataMode = dMode;
|
|
525
|
-
if (sMode !== undefined) opts.sortMode = sMode;
|
|
526
|
-
if (fMode !== undefined) opts.filterMode = fMode;
|
|
527
564
|
if (dReq !== undefined) opts.onDataRequest = dReq;
|
|
528
|
-
if (sReq !== undefined) opts.onSortRequest = sReq;
|
|
529
|
-
if (fReq !== undefined) opts.onFilterRequest = fReq;
|
|
530
565
|
if (loadMore !== undefined) opts.onLoadMoreRows = loadMore;
|
|
531
566
|
if (pag !== undefined) opts.pagination = pag;
|
|
532
567
|
if (load !== undefined) opts.loading = load;
|
|
@@ -606,7 +641,13 @@ export class ZenGridComponent {
|
|
|
606
641
|
}
|
|
607
642
|
|
|
608
643
|
setData(data: any[][]): void {
|
|
609
|
-
this.
|
|
644
|
+
if (this.getResolvedDataMode() === 'frontend') {
|
|
645
|
+
if (this.grid) {
|
|
646
|
+
this.pendingModelDataSync = data;
|
|
647
|
+
this.grid.setData(data);
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
|
|
610
651
|
this.data.set(data);
|
|
611
652
|
}
|
|
612
653
|
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { Injector } from '@angular/core';
|
|
2
|
-
import type {
|
|
2
|
+
import type {
|
|
3
|
+
GridPlugin,
|
|
4
|
+
GridStore,
|
|
5
|
+
GridApiInterface,
|
|
6
|
+
GridPluginSetupContext,
|
|
7
|
+
PluginDisposable,
|
|
8
|
+
} from '@zengrid/core';
|
|
3
9
|
|
|
4
10
|
export class AngularPluginWrapper implements GridPlugin {
|
|
5
11
|
readonly name: string;
|
|
@@ -16,9 +22,9 @@ export class AngularPluginWrapper implements GridPlugin {
|
|
|
16
22
|
this.dependencies = plugin.dependencies;
|
|
17
23
|
}
|
|
18
24
|
|
|
19
|
-
setup(store: GridStore, api: GridApiInterface): PluginDisposable | void {
|
|
25
|
+
setup(store: GridStore, api: GridApiInterface, context: GridPluginSetupContext): PluginDisposable | void {
|
|
20
26
|
const plugin = this.pluginFactory(this.injector);
|
|
21
|
-
return plugin.setup(store, api);
|
|
27
|
+
return plugin.setup(store, api, context);
|
|
22
28
|
}
|
|
23
29
|
|
|
24
30
|
dispose(): void {
|
package/src/lib/types.ts
CHANGED
|
@@ -11,13 +11,25 @@ import type {
|
|
|
11
11
|
ColumnStateSnapshot,
|
|
12
12
|
GridExportOptions,
|
|
13
13
|
SortState,
|
|
14
|
+
SortDescriptor,
|
|
14
15
|
FilterModel,
|
|
16
|
+
FilterAst,
|
|
17
|
+
FilterAstNode,
|
|
18
|
+
FilterAstTarget,
|
|
19
|
+
FilterValueType,
|
|
20
|
+
QueryState,
|
|
21
|
+
QueryPaginationState,
|
|
22
|
+
DataLoadRequest,
|
|
23
|
+
DataLoadResponse,
|
|
15
24
|
RenderParams,
|
|
16
25
|
EditorParams,
|
|
17
26
|
HeaderRenderParams,
|
|
18
27
|
GridPlugin,
|
|
19
28
|
GridStore,
|
|
20
29
|
GridApiInterface,
|
|
30
|
+
GridPluginSetupContext,
|
|
31
|
+
GridOptionsChange,
|
|
32
|
+
GridOptionsListener,
|
|
21
33
|
CellRenderer,
|
|
22
34
|
CellEditor,
|
|
23
35
|
HeaderRenderer,
|
|
@@ -35,13 +47,25 @@ export type {
|
|
|
35
47
|
ColumnStateSnapshot,
|
|
36
48
|
GridExportOptions,
|
|
37
49
|
SortState,
|
|
50
|
+
SortDescriptor,
|
|
38
51
|
FilterModel,
|
|
52
|
+
FilterAst,
|
|
53
|
+
FilterAstNode,
|
|
54
|
+
FilterAstTarget,
|
|
55
|
+
FilterValueType,
|
|
56
|
+
QueryState,
|
|
57
|
+
QueryPaginationState,
|
|
58
|
+
DataLoadRequest,
|
|
59
|
+
DataLoadResponse,
|
|
39
60
|
RenderParams,
|
|
40
61
|
EditorParams,
|
|
41
62
|
HeaderRenderParams,
|
|
42
63
|
GridPlugin,
|
|
43
64
|
GridStore,
|
|
44
65
|
GridApiInterface,
|
|
66
|
+
GridPluginSetupContext,
|
|
67
|
+
GridOptionsChange,
|
|
68
|
+
GridOptionsListener,
|
|
45
69
|
CellRenderer,
|
|
46
70
|
CellEditor,
|
|
47
71
|
HeaderRenderer,
|
|
@@ -76,4 +100,8 @@ export interface ZenGridConfig {
|
|
|
76
100
|
|
|
77
101
|
export type RendererInput = string | CellRenderer | TemplateRef<ZenCellTemplateContext> | Type<any>;
|
|
78
102
|
export type EditorInput = string | CellEditor | TemplateRef<ZenEditorTemplateContext> | Type<any>;
|
|
79
|
-
export type HeaderRendererInput =
|
|
103
|
+
export type HeaderRendererInput =
|
|
104
|
+
| string
|
|
105
|
+
| HeaderRenderer
|
|
106
|
+
| TemplateRef<ZenHeaderTemplateContext>
|
|
107
|
+
| Type<any>;
|
package/src/public-api.ts
CHANGED
|
@@ -12,14 +12,14 @@ export { ZenGridValueAccessorDirective } from './lib/directives/zen-grid-value-a
|
|
|
12
12
|
export { TemplateBridgeService } from './lib/services/template-bridge.service';
|
|
13
13
|
export { ZEN_GRID_CONFIG, provideZenGrid } from './lib/services/zen-grid-config.token';
|
|
14
14
|
|
|
15
|
-
// Plugins
|
|
15
|
+
// Angular Plugins
|
|
16
16
|
export { AngularPluginWrapper, createAngularPlugin } from './lib/plugins/angular-plugin-wrapper';
|
|
17
17
|
|
|
18
18
|
// Utils
|
|
19
19
|
export { EVENT_MAP } from './lib/utils/event-map';
|
|
20
20
|
export { bridgeStoreSignal } from './lib/utils/signal-bridge';
|
|
21
21
|
|
|
22
|
-
// Types
|
|
22
|
+
// Angular-specific Types
|
|
23
23
|
export type {
|
|
24
24
|
ZenCellTemplateContext,
|
|
25
25
|
ZenEditorTemplateContext,
|
|
@@ -30,7 +30,8 @@ export type {
|
|
|
30
30
|
HeaderRendererInput,
|
|
31
31
|
} from './lib/types';
|
|
32
32
|
|
|
33
|
-
// Re-export
|
|
33
|
+
// ─── Re-export Core Types ───────────────────────────────────────────────────
|
|
34
|
+
|
|
34
35
|
export type {
|
|
35
36
|
CellRef,
|
|
36
37
|
CellRange,
|
|
@@ -43,14 +44,340 @@ export type {
|
|
|
43
44
|
GridExportOptions,
|
|
44
45
|
GridEvents,
|
|
45
46
|
SortState,
|
|
47
|
+
SortDescriptor,
|
|
46
48
|
FilterModel,
|
|
49
|
+
FilterAst,
|
|
50
|
+
FilterAstNode,
|
|
51
|
+
FilterAstTarget,
|
|
52
|
+
FilterValueType,
|
|
53
|
+
QueryState,
|
|
54
|
+
QueryPaginationState,
|
|
55
|
+
DataLoadRequest,
|
|
56
|
+
DataLoadResponse,
|
|
47
57
|
RenderParams,
|
|
48
58
|
EditorParams,
|
|
49
59
|
HeaderRenderParams,
|
|
50
60
|
GridPlugin,
|
|
51
61
|
GridStore,
|
|
52
62
|
GridApiInterface,
|
|
63
|
+
GridPluginSetupContext,
|
|
64
|
+
GridOptionsChange,
|
|
65
|
+
GridOptionsListener,
|
|
53
66
|
CellRenderer,
|
|
54
67
|
CellEditor,
|
|
55
68
|
HeaderRenderer,
|
|
56
69
|
} from './lib/types';
|
|
70
|
+
|
|
71
|
+
// ─── Re-export Core Renderers ───────────────────────────────────────────────
|
|
72
|
+
|
|
73
|
+
export {
|
|
74
|
+
// Standard renderers
|
|
75
|
+
TextRenderer,
|
|
76
|
+
NumberRenderer,
|
|
77
|
+
ImageRenderer,
|
|
78
|
+
AdvancedCellRenderer,
|
|
79
|
+
// Interactive renderers
|
|
80
|
+
CheckboxRenderer,
|
|
81
|
+
ProgressBarRenderer,
|
|
82
|
+
ButtonRenderer,
|
|
83
|
+
LinkRenderer,
|
|
84
|
+
ChipRenderer,
|
|
85
|
+
SelectRenderer,
|
|
86
|
+
DropdownRenderer,
|
|
87
|
+
// Date renderers
|
|
88
|
+
DateRenderer,
|
|
89
|
+
DateRangeRenderer,
|
|
90
|
+
// DateTime suite renderers
|
|
91
|
+
DatePickerRenderer,
|
|
92
|
+
createDatePickerRenderer,
|
|
93
|
+
TimePickerRenderer,
|
|
94
|
+
createTimePickerRenderer,
|
|
95
|
+
DateTimePickerRenderer,
|
|
96
|
+
createDateTimePickerRenderer,
|
|
97
|
+
TimeRenderer,
|
|
98
|
+
createTimeRenderer,
|
|
99
|
+
DateTimeRenderer,
|
|
100
|
+
createDateTimeRenderer,
|
|
101
|
+
// Renderer infrastructure
|
|
102
|
+
RendererRegistry,
|
|
103
|
+
} from '@zengrid/core';
|
|
104
|
+
|
|
105
|
+
export type {
|
|
106
|
+
NumberRendererOptions,
|
|
107
|
+
ImageRendererOptions,
|
|
108
|
+
AdvancedCellRendererOptions,
|
|
109
|
+
CompositeElement,
|
|
110
|
+
ConditionalStyle,
|
|
111
|
+
CheckboxRendererOptions,
|
|
112
|
+
ProgressBarRendererOptions,
|
|
113
|
+
LinkRendererOptions,
|
|
114
|
+
ButtonRendererOptions,
|
|
115
|
+
ChipRendererOptions,
|
|
116
|
+
Chip,
|
|
117
|
+
SelectRendererOptions,
|
|
118
|
+
SelectOption,
|
|
119
|
+
DropdownRendererOptions,
|
|
120
|
+
DateRendererOptions,
|
|
121
|
+
DateRangeRendererOptions,
|
|
122
|
+
DatePickerRendererOptions,
|
|
123
|
+
TimePickerRendererOptions,
|
|
124
|
+
DateTimePickerRendererOptions,
|
|
125
|
+
TimeRendererOptions,
|
|
126
|
+
DateTimeRendererOptions,
|
|
127
|
+
} from '@zengrid/core';
|
|
128
|
+
|
|
129
|
+
// ─── Re-export Core Header Renderers ────────────────────────────────────────
|
|
130
|
+
|
|
131
|
+
export {
|
|
132
|
+
TextHeaderRenderer,
|
|
133
|
+
SortableHeaderRenderer,
|
|
134
|
+
FilterableHeaderRenderer,
|
|
135
|
+
CheckboxHeaderRenderer,
|
|
136
|
+
IconHeaderRenderer,
|
|
137
|
+
} from '@zengrid/core';
|
|
138
|
+
|
|
139
|
+
export type { ResolvedHeaderConfig } from '@zengrid/core';
|
|
140
|
+
|
|
141
|
+
// ─── Re-export Core Editors ─────────────────────────────────────────────────
|
|
142
|
+
|
|
143
|
+
export {
|
|
144
|
+
TextEditor,
|
|
145
|
+
CheckboxEditor,
|
|
146
|
+
DropdownEditor,
|
|
147
|
+
DateEditor,
|
|
148
|
+
DateRangeEditor,
|
|
149
|
+
TimeEditor,
|
|
150
|
+
DateTimeEditor,
|
|
151
|
+
EditorManager,
|
|
152
|
+
} from '@zengrid/core';
|
|
153
|
+
|
|
154
|
+
export type {
|
|
155
|
+
TextEditorOptions,
|
|
156
|
+
CheckboxEditorOptions,
|
|
157
|
+
DropdownEditorOptions,
|
|
158
|
+
DropdownOption,
|
|
159
|
+
DateEditorOptions,
|
|
160
|
+
DateRangeEditorOptions,
|
|
161
|
+
TimeEditorOptions,
|
|
162
|
+
DateTimeEditorOptions,
|
|
163
|
+
EditorManagerOptions,
|
|
164
|
+
} from '@zengrid/core';
|
|
165
|
+
|
|
166
|
+
// ─── Re-export Core Plugins ─────────────────────────────────────────────────
|
|
167
|
+
|
|
168
|
+
export {
|
|
169
|
+
createCorePlugin,
|
|
170
|
+
createSortPlugin,
|
|
171
|
+
createFilterPlugin,
|
|
172
|
+
createSelectionPlugin,
|
|
173
|
+
createEditingPlugin,
|
|
174
|
+
createUndoRedoPlugin,
|
|
175
|
+
createDevToolsConnector,
|
|
176
|
+
createAsyncSortPlugin,
|
|
177
|
+
createAsyncFilterPlugin,
|
|
178
|
+
createLifecyclePlugin,
|
|
179
|
+
PluginHost,
|
|
180
|
+
GridApiImpl,
|
|
181
|
+
} from '@zengrid/core';
|
|
182
|
+
|
|
183
|
+
export type {
|
|
184
|
+
CorePluginOptions,
|
|
185
|
+
SortPluginOptions,
|
|
186
|
+
FilterPluginOptions,
|
|
187
|
+
SelectionPluginOptions,
|
|
188
|
+
EditingPluginOptions,
|
|
189
|
+
UndoRedoPluginOptions,
|
|
190
|
+
DevToolsConnectorOptions,
|
|
191
|
+
AsyncSortPluginOptions,
|
|
192
|
+
AsyncFilterPluginOptions,
|
|
193
|
+
LifecyclePluginOptions,
|
|
194
|
+
} from '@zengrid/core';
|
|
195
|
+
|
|
196
|
+
// ─── Re-export Theming ──────────────────────────────────────────────────────
|
|
197
|
+
|
|
198
|
+
export {
|
|
199
|
+
applyTheme,
|
|
200
|
+
removeTheme,
|
|
201
|
+
themeToCSSVariables,
|
|
202
|
+
registerTheme,
|
|
203
|
+
getTheme,
|
|
204
|
+
hasTheme,
|
|
205
|
+
listThemes,
|
|
206
|
+
getAllThemes,
|
|
207
|
+
unregisterTheme,
|
|
208
|
+
ThemeBuilder,
|
|
209
|
+
createTheme,
|
|
210
|
+
lighten,
|
|
211
|
+
darken,
|
|
212
|
+
alpha,
|
|
213
|
+
// Theme presets
|
|
214
|
+
lightTheme,
|
|
215
|
+
darkTheme,
|
|
216
|
+
materialTheme,
|
|
217
|
+
githubTheme,
|
|
218
|
+
nordTheme,
|
|
219
|
+
draculaTheme,
|
|
220
|
+
oneDarkTheme,
|
|
221
|
+
solarizedTheme,
|
|
222
|
+
} from '@zengrid/core';
|
|
223
|
+
|
|
224
|
+
export type {
|
|
225
|
+
ZenGridTheme,
|
|
226
|
+
PartialTheme,
|
|
227
|
+
ThemeColors,
|
|
228
|
+
ThemeTypography,
|
|
229
|
+
ThemeSpacing,
|
|
230
|
+
ThemeBorders,
|
|
231
|
+
ThemeShadows,
|
|
232
|
+
ThemeTransitions,
|
|
233
|
+
} from '@zengrid/core';
|
|
234
|
+
|
|
235
|
+
// ─── Re-export Sorting ──────────────────────────────────────────────────────
|
|
236
|
+
|
|
237
|
+
export { SingleColumnSorter, MultiColumnSorter, SortStateManager } from '@zengrid/core';
|
|
238
|
+
|
|
239
|
+
export type { SortOptions, NullPosition } from '@zengrid/core';
|
|
240
|
+
|
|
241
|
+
// ─── Re-export Column Features ──────────────────────────────────────────────
|
|
242
|
+
|
|
243
|
+
export {
|
|
244
|
+
ColumnModel,
|
|
245
|
+
ColumnReorderPlugin,
|
|
246
|
+
ColumnPinPlugin,
|
|
247
|
+
ColumnVisibilityPlugin,
|
|
248
|
+
ColumnResizeManager,
|
|
249
|
+
AutoFitCalculator,
|
|
250
|
+
ResizeHandleRenderer,
|
|
251
|
+
ResizePreview,
|
|
252
|
+
ColumnDragManager,
|
|
253
|
+
DragVisualFeedback,
|
|
254
|
+
DragKeyboardHandler,
|
|
255
|
+
DragTouchHandler,
|
|
256
|
+
ColumnDragCommand,
|
|
257
|
+
ColumnGroupManager,
|
|
258
|
+
ColumnGroupModel,
|
|
259
|
+
ColumnGroupRenderer,
|
|
260
|
+
createColumnGroupRenderer,
|
|
261
|
+
} from '@zengrid/core';
|
|
262
|
+
|
|
263
|
+
export type {
|
|
264
|
+
ColumnState,
|
|
265
|
+
ColumnEvent,
|
|
266
|
+
ColumnEventType,
|
|
267
|
+
ColumnPinPosition,
|
|
268
|
+
ColumnBatchUpdate,
|
|
269
|
+
ColumnConstraints,
|
|
270
|
+
ColumnResizeOptions,
|
|
271
|
+
ResizeState,
|
|
272
|
+
ResizeZoneResult,
|
|
273
|
+
AutoFitCalculatorOptions,
|
|
274
|
+
DragState,
|
|
275
|
+
DragEvent,
|
|
276
|
+
DropPosition,
|
|
277
|
+
ColumnDragOptions,
|
|
278
|
+
AutoScrollOptions,
|
|
279
|
+
DragStateSnapshot,
|
|
280
|
+
DropZoneResult,
|
|
281
|
+
ColumnDragEvents,
|
|
282
|
+
ColumnGroup,
|
|
283
|
+
ColumnGroupModelConfig,
|
|
284
|
+
ColumnGroupRenderParams,
|
|
285
|
+
ColumnGroupRendererOptions,
|
|
286
|
+
} from '@zengrid/core';
|
|
287
|
+
|
|
288
|
+
// ─── Re-export Viewport & Scroll ────────────────────────────────────────────
|
|
289
|
+
|
|
290
|
+
export { ScrollModel, ViewportModel } from '@zengrid/core';
|
|
291
|
+
|
|
292
|
+
export type {
|
|
293
|
+
ScrollState,
|
|
294
|
+
ViewportState,
|
|
295
|
+
ScrollEvent,
|
|
296
|
+
ScrollEventType,
|
|
297
|
+
ViewportEvent,
|
|
298
|
+
ViewportEventType,
|
|
299
|
+
} from '@zengrid/core';
|
|
300
|
+
|
|
301
|
+
// ─── Re-export Selection Utilities ──────────────────────────────────────────
|
|
302
|
+
|
|
303
|
+
export {
|
|
304
|
+
normalizeRange,
|
|
305
|
+
mergeRanges,
|
|
306
|
+
containsCell,
|
|
307
|
+
rangesIntersect,
|
|
308
|
+
createHitTester,
|
|
309
|
+
} from '@zengrid/core';
|
|
310
|
+
|
|
311
|
+
// ─── Re-export DateTime Utilities ───────────────────────────────────────────
|
|
312
|
+
|
|
313
|
+
export {
|
|
314
|
+
setDatetimeTheme,
|
|
315
|
+
setDatetimeThemeConfig,
|
|
316
|
+
parseDate,
|
|
317
|
+
parseTime,
|
|
318
|
+
parseDateTime,
|
|
319
|
+
formatDate,
|
|
320
|
+
formatDateForDisplay,
|
|
321
|
+
formatTime,
|
|
322
|
+
formatDateTime,
|
|
323
|
+
formatDateRange,
|
|
324
|
+
isValidDate,
|
|
325
|
+
isDateInRange,
|
|
326
|
+
} from '@zengrid/core';
|
|
327
|
+
|
|
328
|
+
export type { DatetimeTheme } from '@zengrid/core';
|
|
329
|
+
|
|
330
|
+
// ─── Re-export Keyboard & Accessibility ─────────────────────────────────────
|
|
331
|
+
|
|
332
|
+
export { KeyboardNavigator, ARIAManager, FocusManager } from '@zengrid/core';
|
|
333
|
+
|
|
334
|
+
export type {
|
|
335
|
+
KeyboardNavigatorOptions,
|
|
336
|
+
ARIAManagerOptions,
|
|
337
|
+
FocusManagerOptions,
|
|
338
|
+
} from '@zengrid/core';
|
|
339
|
+
|
|
340
|
+
// ─── Re-export Data & Utilities ─────────────────────────────────────────────
|
|
341
|
+
|
|
342
|
+
export {
|
|
343
|
+
SparseMatrix,
|
|
344
|
+
ColumnStore,
|
|
345
|
+
createIndexMap,
|
|
346
|
+
createIdentityIndexMap,
|
|
347
|
+
ClipboardManager,
|
|
348
|
+
CSVExporter,
|
|
349
|
+
DependencyGraph,
|
|
350
|
+
EventEmitter,
|
|
351
|
+
GridStore as CoreGridStore,
|
|
352
|
+
PipelineRegistry,
|
|
353
|
+
} from '@zengrid/core';
|
|
354
|
+
|
|
355
|
+
export type {
|
|
356
|
+
SparseMatrixOptions,
|
|
357
|
+
ReadonlySparseMatrix,
|
|
358
|
+
ColumnStoreOptions,
|
|
359
|
+
ColumnDefinition,
|
|
360
|
+
ColumnType,
|
|
361
|
+
AggregateOperation,
|
|
362
|
+
AggregationResult,
|
|
363
|
+
IndexMap,
|
|
364
|
+
IndexMapOptions,
|
|
365
|
+
DataAccessor,
|
|
366
|
+
StoreKeys,
|
|
367
|
+
WrappedSignal,
|
|
368
|
+
WrappedComputed,
|
|
369
|
+
AsyncState,
|
|
370
|
+
AsyncComputedOptions,
|
|
371
|
+
} from '@zengrid/core';
|
|
372
|
+
|
|
373
|
+
// ─── Re-export Grid API Types ───────────────────────────────────────────────
|
|
374
|
+
|
|
375
|
+
export type {
|
|
376
|
+
SortApi,
|
|
377
|
+
FilterApi,
|
|
378
|
+
PaginationApi,
|
|
379
|
+
ColumnApi,
|
|
380
|
+
ScrollApi,
|
|
381
|
+
StateApi,
|
|
382
|
+
ExportApi,
|
|
383
|
+
} from '@zengrid/core';
|