@alaarab/ogrid-angular 2.0.16 → 2.0.18
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/dist/esm/components/base-datagrid-table.component.js +2 -6
- package/dist/esm/services/ogrid.service.js +0 -8
- package/dist/types/components/base-datagrid-table.component.d.ts +0 -2
- package/dist/types/services/ogrid.service.d.ts +0 -2
- package/dist/types/types/dataGridTypes.d.ts +0 -4
- package/package.json +2 -2
|
@@ -37,8 +37,6 @@ export class BaseDataGridTableComponent {
|
|
|
37
37
|
this.getRowId = computed(() => this.getProps()?.getRowId ?? ((item) => item['id']));
|
|
38
38
|
this.isLoading = computed(() => this.getProps()?.isLoading ?? false);
|
|
39
39
|
this.loadingMessage = computed(() => 'Loading\u2026');
|
|
40
|
-
this.freezeRows = computed(() => this.getProps()?.freezeRows);
|
|
41
|
-
this.freezeCols = computed(() => this.getProps()?.freezeCols);
|
|
42
40
|
this.layoutModeFit = computed(() => (this.getProps()?.layoutMode ?? 'fill') === 'content');
|
|
43
41
|
this.ariaLabel = computed(() => this.getProps()?.['aria-label'] ?? 'Data grid');
|
|
44
42
|
this.ariaLabelledBy = computed(() => this.getProps()?.['aria-labelledby']);
|
|
@@ -130,15 +128,13 @@ export class BaseDataGridTableComponent {
|
|
|
130
128
|
// Pre-computed column layouts
|
|
131
129
|
this.columnLayouts = computed(() => {
|
|
132
130
|
const cols = this.visibleCols();
|
|
133
|
-
const fc = this.freezeCols();
|
|
134
131
|
const props = this.getProps();
|
|
135
132
|
const pinnedCols = props?.pinnedColumns ?? {};
|
|
136
133
|
const measuredWidths = this.measuredColumnWidths();
|
|
137
134
|
const sizingOverrides = this.columnSizingOverrides();
|
|
138
|
-
return cols.map((col
|
|
139
|
-
const isFreezeCol = fc != null && fc >= 1 && colIdx < fc;
|
|
135
|
+
return cols.map((col) => {
|
|
140
136
|
const runtimePinned = pinnedCols[col.columnId];
|
|
141
|
-
const pinnedLeft = runtimePinned === 'left' || col.pinned === 'left'
|
|
137
|
+
const pinnedLeft = runtimePinned === 'left' || col.pinned === 'left';
|
|
142
138
|
const pinnedRight = runtimePinned === 'right' || col.pinned === 'right';
|
|
143
139
|
const w = this.getColumnWidth(col);
|
|
144
140
|
// Use previously-measured DOM width as a minWidth floor to prevent columns
|
|
@@ -38,8 +38,6 @@ let OGridService = class OGridService {
|
|
|
38
38
|
this.onColumnOrderChange = signal(undefined);
|
|
39
39
|
this.onColumnResized = signal(undefined);
|
|
40
40
|
this.onColumnPinned = signal(undefined);
|
|
41
|
-
this.freezeRows = signal(undefined);
|
|
42
|
-
this.freezeCols = signal(undefined);
|
|
43
41
|
this.defaultPageSize = signal(DEFAULT_PAGE_SIZE);
|
|
44
42
|
this.defaultSortBy = signal(undefined);
|
|
45
43
|
this.defaultSortDirection = signal('asc');
|
|
@@ -224,8 +222,6 @@ let OGridService = class OGridService {
|
|
|
224
222
|
onColumnPinned: (columnId, pinned) => this.handleColumnPinned(columnId, pinned),
|
|
225
223
|
pinnedColumns: this.pinnedOverrides(),
|
|
226
224
|
initialColumnWidths: this.columnWidthOverrides(),
|
|
227
|
-
freezeRows: this.freezeRows(),
|
|
228
|
-
freezeCols: this.freezeCols(),
|
|
229
225
|
editable: this.editable(),
|
|
230
226
|
cellSelection: this.cellSelection(),
|
|
231
227
|
density: this.density(),
|
|
@@ -475,10 +471,6 @@ let OGridService = class OGridService {
|
|
|
475
471
|
this.onColumnResized.set(props.onColumnResized);
|
|
476
472
|
if (props.onColumnPinned)
|
|
477
473
|
this.onColumnPinned.set(props.onColumnPinned);
|
|
478
|
-
if (props.freezeRows !== undefined)
|
|
479
|
-
this.freezeRows.set(props.freezeRows);
|
|
480
|
-
if (props.freezeCols !== undefined)
|
|
481
|
-
this.freezeCols.set(props.freezeCols);
|
|
482
474
|
if (props.defaultPageSize !== undefined)
|
|
483
475
|
this.defaultPageSize.set(props.defaultPageSize);
|
|
484
476
|
if (props.defaultSortBy !== undefined)
|
|
@@ -45,8 +45,6 @@ export declare abstract class BaseDataGridTableComponent<T = unknown> {
|
|
|
45
45
|
readonly getRowId: import("@angular/core").Signal<(item: T) => RowId>;
|
|
46
46
|
readonly isLoading: import("@angular/core").Signal<boolean>;
|
|
47
47
|
readonly loadingMessage: import("@angular/core").Signal<string>;
|
|
48
|
-
readonly freezeRows: import("@angular/core").Signal<number | undefined>;
|
|
49
|
-
readonly freezeCols: import("@angular/core").Signal<number | undefined>;
|
|
50
48
|
readonly layoutModeFit: import("@angular/core").Signal<boolean>;
|
|
51
49
|
readonly ariaLabel: import("@angular/core").Signal<string>;
|
|
52
50
|
readonly ariaLabelledBy: import("@angular/core").Signal<string | undefined>;
|
|
@@ -69,8 +69,6 @@ export declare class OGridService<T> {
|
|
|
69
69
|
readonly onColumnOrderChange: import("@angular/core").WritableSignal<((order: string[]) => void) | undefined>;
|
|
70
70
|
readonly onColumnResized: import("@angular/core").WritableSignal<((columnId: string, width: number) => void) | undefined>;
|
|
71
71
|
readonly onColumnPinned: import("@angular/core").WritableSignal<((columnId: string, pinned: "left" | "right" | null) => void) | undefined>;
|
|
72
|
-
readonly freezeRows: import("@angular/core").WritableSignal<number | undefined>;
|
|
73
|
-
readonly freezeCols: import("@angular/core").WritableSignal<number | undefined>;
|
|
74
72
|
readonly defaultPageSize: import("@angular/core").WritableSignal<number>;
|
|
75
73
|
readonly defaultSortBy: import("@angular/core").WritableSignal<string | undefined>;
|
|
76
74
|
readonly defaultSortDirection: import("@angular/core").WritableSignal<"asc" | "desc">;
|
|
@@ -28,8 +28,6 @@ interface IOGridBaseProps<T> {
|
|
|
28
28
|
onColumnOrderChange?: (order: string[]) => void;
|
|
29
29
|
onColumnResized?: (columnId: string, width: number) => void;
|
|
30
30
|
onColumnPinned?: (columnId: string, pinned: 'left' | 'right' | null) => void;
|
|
31
|
-
freezeRows?: number;
|
|
32
|
-
freezeCols?: number;
|
|
33
31
|
editable?: boolean;
|
|
34
32
|
cellSelection?: boolean;
|
|
35
33
|
density?: 'compact' | 'normal' | 'comfortable';
|
|
@@ -94,8 +92,6 @@ export interface IOGridDataGridProps<T> {
|
|
|
94
92
|
onColumnPinned?: (columnId: string, pinned: 'left' | 'right' | null) => void;
|
|
95
93
|
pinnedColumns?: Record<string, 'left' | 'right'>;
|
|
96
94
|
initialColumnWidths?: Record<string, number>;
|
|
97
|
-
freezeRows?: number;
|
|
98
|
-
freezeCols?: number;
|
|
99
95
|
layoutMode?: 'content' | 'fill';
|
|
100
96
|
suppressHorizontalScroll?: boolean;
|
|
101
97
|
isLoading?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alaarab/ogrid-angular",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.18",
|
|
4
4
|
"description": "OGrid Angular – Angular services, signals, and headless components for OGrid data grids.",
|
|
5
5
|
"main": "dist/esm/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"node": ">=18"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@alaarab/ogrid-core": "2.0.
|
|
38
|
+
"@alaarab/ogrid-core": "2.0.18"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"@angular/core": "^21.0.0",
|