eru-grid 0.0.31 → 0.0.33
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 +124 -21
- package/fesm2022/eru-grid.mjs.map +1 -1
- package/package.json +1 -1
- package/types/eru-grid.d.ts +33 -1
package/package.json
CHANGED
package/types/eru-grid.d.ts
CHANGED
|
@@ -73,6 +73,9 @@ interface GridFeatures {
|
|
|
73
73
|
headerRowHeight?: number;
|
|
74
74
|
dataRowHeight?: number;
|
|
75
75
|
cursorOnHover?: string;
|
|
76
|
+
boardCardHoverBg?: string;
|
|
77
|
+
boardCardSelectedBg?: string;
|
|
78
|
+
boardCardSelectedOutline?: string;
|
|
76
79
|
}
|
|
77
80
|
interface GridStyles {
|
|
78
81
|
subTotalStyle?: 'bold' | 'italic' | 'highlighted';
|
|
@@ -92,6 +95,7 @@ interface GridConfiguration {
|
|
|
92
95
|
tokens?: GridTokens;
|
|
93
96
|
preset?: GridPreset;
|
|
94
97
|
pivot?: PivotConfiguration;
|
|
98
|
+
pageSize?: number;
|
|
95
99
|
data?: any[];
|
|
96
100
|
columnConstraints?: {
|
|
97
101
|
global?: ColumnWidthConstraints;
|
|
@@ -153,6 +157,11 @@ interface Field {
|
|
|
153
157
|
enableDrilldown?: boolean;
|
|
154
158
|
open_status?: any[];
|
|
155
159
|
close_status?: any[];
|
|
160
|
+
color_ranges?: {
|
|
161
|
+
from: number;
|
|
162
|
+
to: number;
|
|
163
|
+
color: string;
|
|
164
|
+
}[];
|
|
156
165
|
data_length?: number;
|
|
157
166
|
start_value?: number;
|
|
158
167
|
end_value?: number;
|
|
@@ -568,6 +577,7 @@ declare class EruGridStore {
|
|
|
568
577
|
private readonly _rows;
|
|
569
578
|
private _groupRows;
|
|
570
579
|
private readonly _selectedRowIds;
|
|
580
|
+
private readonly _activeBoardRow;
|
|
571
581
|
private readonly _rowGrandTotal;
|
|
572
582
|
private readonly _dynamicDataRequest;
|
|
573
583
|
private readonly _dynamicData;
|
|
@@ -589,6 +599,11 @@ declare class EruGridStore {
|
|
|
589
599
|
readonly selectedDesignColumn: _angular_core.Signal<string | null>;
|
|
590
600
|
private readonly _columnDesignUpdate;
|
|
591
601
|
readonly columnDesignUpdate: _angular_core.Signal<Field[] | null>;
|
|
602
|
+
private readonly _columnMetaPatch;
|
|
603
|
+
readonly columnMetaPatch: _angular_core.Signal<{
|
|
604
|
+
name: string;
|
|
605
|
+
patch: Partial<Field>;
|
|
606
|
+
} | null>;
|
|
592
607
|
readonly columns: _angular_core.Signal<Field[]>;
|
|
593
608
|
readonly groups: _angular_core.Signal<RowGroup[]>;
|
|
594
609
|
readonly rows: _angular_core.Signal<Row[]>;
|
|
@@ -599,6 +614,7 @@ declare class EruGridStore {
|
|
|
599
614
|
count: number;
|
|
600
615
|
}[]>;
|
|
601
616
|
readonly selectedRowIds: _angular_core.Signal<Set<string>>;
|
|
617
|
+
readonly activeBoardRow: _angular_core.Signal<any>;
|
|
602
618
|
readonly configuration: _angular_core.Signal<GridConfiguration>;
|
|
603
619
|
readonly isLoading: _angular_core.Signal<boolean>;
|
|
604
620
|
readonly requestQueue: _angular_core.Signal<RowDataRequest[]>;
|
|
@@ -658,6 +674,8 @@ declare class EruGridStore {
|
|
|
658
674
|
addRows(newRows: Row[]): void;
|
|
659
675
|
updateRow(rowId: string, updates: Partial<Row>): void;
|
|
660
676
|
selectRow(rowId: string): void;
|
|
677
|
+
/** Mark the single active board card (last clicked) for the selected-state highlight. */
|
|
678
|
+
setActiveBoardRow(row: any): void;
|
|
661
679
|
deselectRow(rowId: string): void;
|
|
662
680
|
toggleRowSelection(rowId: string): void;
|
|
663
681
|
selectAllRowsInGroup(groupId: string): void;
|
|
@@ -996,6 +1014,14 @@ declare class EruGridComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
996
1014
|
* Default: 208 (matches the built-in default card height).
|
|
997
1015
|
*/
|
|
998
1016
|
boardCardHeight: number;
|
|
1017
|
+
/**
|
|
1018
|
+
* Vertical gap in pixels between board cards. Added to the CDK virtual-scroll
|
|
1019
|
+
* item size so the space appears below each card without overlap.
|
|
1020
|
+
* Default: 0 (cards stacked flush).
|
|
1021
|
+
*/
|
|
1022
|
+
boardCardGap: number;
|
|
1023
|
+
/** Total slot size per board card = card height + gap. Drives CDK itemSize. */
|
|
1024
|
+
get boardCardSlot(): number;
|
|
999
1025
|
/**
|
|
1000
1026
|
* Fires when a user clicks a row (table mode) or card (board mode).
|
|
1001
1027
|
* Consumers can subscribe to drive navigation, side-panel detail views,
|
|
@@ -1007,6 +1033,9 @@ declare class EruGridComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
1007
1033
|
group?: RowGroup;
|
|
1008
1034
|
}>;
|
|
1009
1035
|
emitRowSelect(row: Row, mode: 'table' | 'board', group?: RowGroup): void;
|
|
1036
|
+
/** Whether a board card is the active (last-clicked) one. Compared by row
|
|
1037
|
+
* reference so it works for entity and query data alike. */
|
|
1038
|
+
isBoardCardActive(row: Row): boolean;
|
|
1010
1039
|
initialMinHeight: number;
|
|
1011
1040
|
initialTotalWidth: number;
|
|
1012
1041
|
viewport: CdkVirtualScrollViewport;
|
|
@@ -1093,6 +1122,8 @@ declare class EruGridComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
1093
1122
|
*/
|
|
1094
1123
|
private readonly ROWS_PER_PAGE;
|
|
1095
1124
|
private readonly SCROLL_THRESHOLD;
|
|
1125
|
+
/** Rows per lazy page: grid config `pageSize` if set, else ROWS_PER_PAGE. */
|
|
1126
|
+
private get rowsPerPage();
|
|
1096
1127
|
private lastLoadedGroupIds;
|
|
1097
1128
|
private requestedGroupIds;
|
|
1098
1129
|
private columnsInitialized;
|
|
@@ -1323,7 +1354,7 @@ declare class EruGridComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
1323
1354
|
requestBoardRowsForGroup(group: RowGroup): void;
|
|
1324
1355
|
loadBoardAll(): void;
|
|
1325
1356
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EruGridComponent, never>;
|
|
1326
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EruGridComponent, "eru-grid", never, { "gridConfig": { "alias": "gridConfig"; "required": false; }; "boardCardTemplate": { "alias": "boardCardTemplate"; "required": false; }; "boardCardHeight": { "alias": "boardCardHeight"; "required": false; }; }, { "rowSelect": "rowSelect"; }, never, never, true, never>;
|
|
1357
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EruGridComponent, "eru-grid", never, { "gridConfig": { "alias": "gridConfig"; "required": false; }; "boardCardTemplate": { "alias": "boardCardTemplate"; "required": false; }; "boardCardHeight": { "alias": "boardCardHeight"; "required": false; }; "boardCardGap": { "alias": "boardCardGap"; "required": false; }; }, { "rowSelect": "rowSelect"; }, never, never, true, never>;
|
|
1327
1358
|
}
|
|
1328
1359
|
interface GroupItem {
|
|
1329
1360
|
type: 'header' | 'row' | 'table-header' | 'row-place-holder' | 'ghost-loading';
|
|
@@ -1882,6 +1913,7 @@ declare class ProgressComponent implements OnInit {
|
|
|
1882
1913
|
editModeChange: EventEmitter<boolean>;
|
|
1883
1914
|
currentValue: _angular_core.WritableSignal<number>;
|
|
1884
1915
|
displayValue: _angular_core.Signal<number>;
|
|
1916
|
+
barColor: _angular_core.Signal<string | null>;
|
|
1885
1917
|
constructor();
|
|
1886
1918
|
ngOnInit(): void;
|
|
1887
1919
|
onActivate(): void;
|