eru-grid 0.0.3 → 0.0.4
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 +144 -320
- package/fesm2022/eru-grid.mjs.map +1 -1
- package/index.d.ts +23 -17
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -49,21 +49,21 @@ interface GridFeatures {
|
|
|
49
49
|
subtotalPosition?: 'before' | 'after';
|
|
50
50
|
subtotalLabel?: string;
|
|
51
51
|
freezeField?: string;
|
|
52
|
-
gridLineColor?: string;
|
|
53
|
-
gridLineWidth?: number;
|
|
54
52
|
replaceZeroValue?: string;
|
|
55
53
|
}
|
|
56
54
|
interface GridStyles {
|
|
57
|
-
gridLineColor?: string;
|
|
58
|
-
gridLineWidth?: number;
|
|
59
55
|
subTotalStyle?: 'bold' | 'italic' | 'highlighted';
|
|
60
56
|
grandTotalStyle?: 'bold' | 'italic' | 'highlighted';
|
|
61
57
|
}
|
|
58
|
+
interface GridTokens {
|
|
59
|
+
[key: string]: string;
|
|
60
|
+
}
|
|
62
61
|
interface GridConfiguration {
|
|
63
62
|
mode: GridMode;
|
|
64
63
|
config: GridFeatures;
|
|
65
64
|
fields: Field[];
|
|
66
65
|
styles?: GridStyles;
|
|
66
|
+
tokens?: GridTokens;
|
|
67
67
|
pivot?: PivotConfiguration;
|
|
68
68
|
data?: any[];
|
|
69
69
|
columnConstraints?: {
|
|
@@ -393,6 +393,20 @@ declare class EruGridStore {
|
|
|
393
393
|
deselectAllRowsInGroup(groupId: string): void;
|
|
394
394
|
clearSelection(): void;
|
|
395
395
|
setConfiguration(configuration: GridConfiguration): void;
|
|
396
|
+
/**
|
|
397
|
+
* Validates and enforces rules for grid configuration
|
|
398
|
+
*/
|
|
399
|
+
validateAndEnforceConfiguration(config: GridConfiguration): GridConfiguration;
|
|
400
|
+
/**
|
|
401
|
+
* Update specific configuration properties
|
|
402
|
+
* This method ensures proper signal updates for nested properties
|
|
403
|
+
*/
|
|
404
|
+
updateConfigurationProperties(updates: Partial<GridConfiguration['config']>): void;
|
|
405
|
+
/**
|
|
406
|
+
* Update grid lines configuration
|
|
407
|
+
* This method specifically handles grid lines updates
|
|
408
|
+
*/
|
|
409
|
+
updateGridLines(showColumnLines?: boolean, showRowLines?: boolean): void;
|
|
396
410
|
gridConfiguration(): GridConfiguration;
|
|
397
411
|
setActiveCell(activeCell: any): void;
|
|
398
412
|
setLoading(isLoading: boolean): void;
|
|
@@ -574,10 +588,11 @@ declare class EruGridComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
574
588
|
currentPivotScrollIndex: _angular_core.WritableSignal<number>;
|
|
575
589
|
firstDataRowIndex: _angular_core.WritableSignal<number>;
|
|
576
590
|
private _virtualRowspanCache;
|
|
591
|
+
mode: _angular_core.Signal<eru_grid.GridMode>;
|
|
592
|
+
isResizable: _angular_core.Signal<boolean>;
|
|
593
|
+
isEditable: _angular_core.Signal<boolean>;
|
|
577
594
|
showColumnLines: _angular_core.Signal<boolean>;
|
|
578
595
|
showRowLines: _angular_core.Signal<boolean>;
|
|
579
|
-
gridLineColor: _angular_core.Signal<string>;
|
|
580
|
-
gridLineWidth: _angular_core.Signal<number>;
|
|
581
596
|
maxDepth: _angular_core.Signal<number>;
|
|
582
597
|
subTotalStyle: _angular_core.Signal<"bold" | "italic" | "highlighted">;
|
|
583
598
|
grandTotalStyle: _angular_core.Signal<"bold" | "italic" | "highlighted">;
|
|
@@ -647,11 +662,11 @@ declare class EruGridComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
647
662
|
dataLength: number;
|
|
648
663
|
viewportHeight: number;
|
|
649
664
|
};
|
|
650
|
-
private updateGridLineStyles;
|
|
651
665
|
private readonly ROWS_PER_PAGE;
|
|
652
666
|
private readonly SCROLL_THRESHOLD;
|
|
653
667
|
private lastLoadedGroupIds;
|
|
654
668
|
constructor(changeDetectorRef: ChangeDetectorRef);
|
|
669
|
+
applyTokens(): void;
|
|
655
670
|
ngOnInit(): void;
|
|
656
671
|
ngAfterViewInit(): void;
|
|
657
672
|
ngOnDestroy(): void;
|
|
@@ -725,14 +740,6 @@ declare class EruGridComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
725
740
|
* This method ensures proper rowspan continuity when scrolling
|
|
726
741
|
*/
|
|
727
742
|
getEffectiveRowspan(visibleRowIndex: number, columnName: string): number | null;
|
|
728
|
-
/**
|
|
729
|
-
* Find virtual parent information for cells that inherit rowspan from a parent row
|
|
730
|
-
*/
|
|
731
|
-
private findVirtualParent;
|
|
732
|
-
/**
|
|
733
|
-
* Find the first visible row index that should show the value for a given column
|
|
734
|
-
*/
|
|
735
|
-
private findFirstVisibleRowForColumn;
|
|
736
743
|
/**
|
|
737
744
|
* Check if a cell should be skipped (hidden due to rowspan) - ENHANCED FOR VIRTUAL SCROLLING
|
|
738
745
|
*/
|
|
@@ -774,7 +781,6 @@ declare class EruGridComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
774
781
|
* Check if a column is a row dimension column
|
|
775
782
|
*/
|
|
776
783
|
isRowDimensionColumn(columnName: string): boolean;
|
|
777
|
-
private setupScrollSync;
|
|
778
784
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EruGridComponent, never>;
|
|
779
785
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EruGridComponent, "eru-grid", never, {}, {}, never, never, true, never>;
|
|
780
786
|
}
|
|
@@ -800,4 +806,4 @@ declare class ThemeToggleComponent {
|
|
|
800
806
|
}
|
|
801
807
|
|
|
802
808
|
export { ColumnConstraintsService, EruGridComponent, EruGridService, EruGridStore, ThemeService, ThemeToggleComponent };
|
|
803
|
-
export type { AggregationFunction, ColumnWidthConstraints, DataTypes, Field, GridConfiguration, GridFeatures, GridMode, GridStyles, GroupItem$1 as GroupItem, PivotColumnGroupState, PivotColumnHeader, PivotConfiguration, PivotDrilldown, PivotHeaderStructure, PivotMetadata, PivotResult, PivotRow, Row, RowGroup, Theme };
|
|
809
|
+
export type { AggregationFunction, ColumnWidthConstraints, DataTypes, Field, GridConfiguration, GridFeatures, GridMode, GridStyles, GridTokens, GroupItem$1 as GroupItem, PivotColumnGroupState, PivotColumnHeader, PivotConfiguration, PivotDrilldown, PivotHeaderStructure, PivotMetadata, PivotResult, PivotRow, Row, RowGroup, Theme };
|