eru-grid 0.0.21 → 0.0.22-b
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/eru-grid.mjs +165 -63
- package/fesm2022/eru-grid.mjs.map +1 -1
- package/package.json +3 -3
- package/{index.d.ts → types/eru-grid.d.ts} +56 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eru-grid",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.22-b",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^20.1.3",
|
|
6
6
|
"@angular/core": "^20.1.3"
|
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
},
|
|
11
11
|
"sideEffects": false,
|
|
12
12
|
"module": "fesm2022/eru-grid.mjs",
|
|
13
|
-
"typings": "
|
|
13
|
+
"typings": "types/eru-grid.d.ts",
|
|
14
14
|
"exports": {
|
|
15
15
|
"./package.json": {
|
|
16
16
|
"default": "./package.json"
|
|
17
17
|
},
|
|
18
18
|
".": {
|
|
19
|
-
"types": "./
|
|
19
|
+
"types": "./types/eru-grid.d.ts",
|
|
20
20
|
"default": "./fesm2022/eru-grid.mjs"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as eru_grid from 'eru-grid';
|
|
2
2
|
import * as _angular_core from '@angular/core';
|
|
3
|
-
import { OnInit, AfterViewInit, OnDestroy, ElementRef, ChangeDetectorRef } from '@angular/core';
|
|
3
|
+
import { OnInit, AfterViewInit, OnDestroy, ElementRef, ChangeDetectorRef, Provider } from '@angular/core';
|
|
4
4
|
import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';
|
|
5
|
+
import { MatCommonModule } from '@angular/material/core';
|
|
5
6
|
|
|
6
7
|
interface Row {
|
|
7
8
|
entity_id: string;
|
|
@@ -57,6 +58,13 @@ interface GridFeatures {
|
|
|
57
58
|
replaceZeroValue?: string;
|
|
58
59
|
gridHeight?: number;
|
|
59
60
|
allowSelection?: boolean;
|
|
61
|
+
actionColumn?: boolean;
|
|
62
|
+
actionColumnPosition?: 'before' | 'after';
|
|
63
|
+
actions?: {
|
|
64
|
+
menu: string;
|
|
65
|
+
icon: string;
|
|
66
|
+
action: string;
|
|
67
|
+
}[];
|
|
60
68
|
}
|
|
61
69
|
interface GridStyles {
|
|
62
70
|
subTotalStyle?: 'bold' | 'italic' | 'highlighted';
|
|
@@ -184,6 +192,15 @@ interface RowDataResponse {
|
|
|
184
192
|
hasMore: boolean;
|
|
185
193
|
totalCount?: number;
|
|
186
194
|
}
|
|
195
|
+
interface ActionClick {
|
|
196
|
+
rowId: string;
|
|
197
|
+
rowData?: any;
|
|
198
|
+
action?: {
|
|
199
|
+
menu: string;
|
|
200
|
+
icon: string;
|
|
201
|
+
action: string;
|
|
202
|
+
};
|
|
203
|
+
}
|
|
187
204
|
|
|
188
205
|
declare class PivotTransformService {
|
|
189
206
|
private columnGroupState;
|
|
@@ -464,6 +481,7 @@ declare class EruGridStore {
|
|
|
464
481
|
private readonly _pivotConfiguration;
|
|
465
482
|
private readonly _pivotResult;
|
|
466
483
|
private readonly _drilldown;
|
|
484
|
+
private readonly _actionClick;
|
|
467
485
|
private readonly _dataRequest;
|
|
468
486
|
readonly columns: _angular_core.Signal<Field[]>;
|
|
469
487
|
readonly groups: _angular_core.Signal<RowGroup[]>;
|
|
@@ -473,6 +491,7 @@ declare class EruGridStore {
|
|
|
473
491
|
readonly isLoading: _angular_core.Signal<boolean>;
|
|
474
492
|
readonly error: _angular_core.Signal<string | null>;
|
|
475
493
|
readonly activeCell: _angular_core.Signal<any>;
|
|
494
|
+
readonly actionClick: _angular_core.Signal<ActionClick | null>;
|
|
476
495
|
readonly pivotConfiguration: _angular_core.Signal<PivotConfiguration | null>;
|
|
477
496
|
readonly pivotResult: _angular_core.Signal<PivotResult | null>;
|
|
478
497
|
readonly drilldown: _angular_core.Signal<Drilldown | null>;
|
|
@@ -576,6 +595,7 @@ declare class EruGridStore {
|
|
|
576
595
|
isFreezeGrandTotalEnabled(): boolean;
|
|
577
596
|
setDrilldown(drilldown: Drilldown, columnValues: string): void;
|
|
578
597
|
clearPivotDrilldown(): void;
|
|
598
|
+
setActionClick(actionClick: ActionClick): void;
|
|
579
599
|
/**
|
|
580
600
|
* Emit a data request signal (called by grid component)
|
|
581
601
|
*/
|
|
@@ -803,6 +823,30 @@ declare class EruGridComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
803
823
|
private initializeColumnWidths;
|
|
804
824
|
toggleRowSelection(event: Event, row: any): void;
|
|
805
825
|
toggleGroupSelection(event: Event, groupId: string): void;
|
|
826
|
+
onActionClick(event: Event, row: any, action?: {
|
|
827
|
+
menu: string;
|
|
828
|
+
icon: string;
|
|
829
|
+
action: string;
|
|
830
|
+
}): void;
|
|
831
|
+
/**
|
|
832
|
+
* Get actions from configuration
|
|
833
|
+
*/
|
|
834
|
+
gridActions: _angular_core.Signal<{
|
|
835
|
+
menu: string;
|
|
836
|
+
icon: string;
|
|
837
|
+
action: string;
|
|
838
|
+
}[]>;
|
|
839
|
+
/**
|
|
840
|
+
* Check if action column is enabled
|
|
841
|
+
* @returns true if actionColumn is enabled, false otherwise (default: false)
|
|
842
|
+
*/
|
|
843
|
+
isActionColumnEnabled: _angular_core.Signal<boolean>;
|
|
844
|
+
/**
|
|
845
|
+
* Get action column position
|
|
846
|
+
* @returns 'before' | 'after' (default: 'after')
|
|
847
|
+
*/
|
|
848
|
+
getActionColumnPosition: _angular_core.Signal<"before" | "after">;
|
|
849
|
+
shouldShowActionColumn(position: 'before' | 'after'): boolean;
|
|
806
850
|
toggleAllGroups(event: Event): void;
|
|
807
851
|
isRowSelected(rowId?: string): boolean;
|
|
808
852
|
isGroupSelected(groupId: string): boolean;
|
|
@@ -913,5 +957,14 @@ declare class ThemeToggleComponent {
|
|
|
913
957
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ThemeToggleComponent, "eru-theme-toggle", never, {}, {}, never, never, true, never>;
|
|
914
958
|
}
|
|
915
959
|
|
|
916
|
-
|
|
917
|
-
|
|
960
|
+
declare class HelloWorldComponent {
|
|
961
|
+
constructor();
|
|
962
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<HelloWorldComponent, never>;
|
|
963
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<HelloWorldComponent, "eru-hello-world", never, {}, {}, never, never, true, never>;
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
declare const MATERIAL_PROVIDERS: Provider[];
|
|
967
|
+
declare const MATERIAL_MODULES: (typeof MatCommonModule)[];
|
|
968
|
+
|
|
969
|
+
export { ColumnConstraintsService, EruGridComponent, EruGridService, EruGridStore, HelloWorldComponent, MATERIAL_MODULES, MATERIAL_PROVIDERS, ThemeService, ThemeToggleComponent };
|
|
970
|
+
export type { ActionClick, AggregationFunction, ColumnWidthConstraints, DataTypes, Drilldown, Field, GridConfiguration, GridFeatures, GridMode, GridStyles, GridTokens, GroupItem$1 as GroupItem, PivotColumnGroupState, PivotColumnHeader, PivotConfiguration, PivotHeaderStructure, PivotMetadata, PivotResult, PivotRow, Row, RowDataRequest, RowDataResponse, RowGroup, Theme };
|