@alaarab/ogrid-angular 2.5.9 → 2.6.1

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.
Files changed (60) hide show
  1. package/dist/esm/components/base-column-chooser.component.js +77 -0
  2. package/dist/esm/components/base-column-header-filter.component.js +267 -0
  3. package/dist/esm/components/base-column-header-menu.component.js +80 -0
  4. package/dist/esm/components/base-datagrid-table.component.js +768 -0
  5. package/dist/esm/components/base-inline-cell-editor.component.js +380 -0
  6. package/dist/esm/components/base-ogrid.component.js +36 -0
  7. package/dist/esm/components/base-pagination-controls.component.js +68 -0
  8. package/dist/esm/components/base-popover-cell-editor.component.js +122 -0
  9. package/dist/esm/components/empty-state.component.js +68 -0
  10. package/dist/esm/components/formula-bar.component.js +99 -0
  11. package/dist/esm/components/formula-ref-overlay.component.js +115 -0
  12. package/dist/esm/components/grid-context-menu.component.js +197 -0
  13. package/dist/esm/components/inline-cell-editor-template.js +134 -0
  14. package/dist/esm/components/marching-ants-overlay.component.js +177 -0
  15. package/dist/esm/components/ogrid-layout.component.js +302 -0
  16. package/dist/esm/components/sheet-tabs.component.js +83 -0
  17. package/dist/esm/components/sidebar.component.js +431 -0
  18. package/dist/esm/components/status-bar.component.js +92 -0
  19. package/dist/esm/index.js +39 -819
  20. package/dist/esm/services/column-reorder.service.js +176 -0
  21. package/dist/esm/services/datagrid-editing.service.js +59 -0
  22. package/dist/esm/services/datagrid-interaction.service.js +744 -0
  23. package/dist/esm/services/datagrid-layout.service.js +157 -0
  24. package/dist/esm/services/datagrid-state.service.js +636 -0
  25. package/dist/esm/services/formula-engine.service.js +223 -0
  26. package/dist/esm/services/ogrid.service.js +1094 -0
  27. package/dist/esm/services/virtual-scroll.service.js +114 -0
  28. package/dist/esm/styles/ogrid-theme-vars.js +112 -0
  29. package/dist/esm/types/columnTypes.js +1 -0
  30. package/dist/esm/types/dataGridTypes.js +1 -0
  31. package/dist/esm/types/index.js +1 -0
  32. package/dist/esm/utils/dataGridViewModel.js +6 -0
  33. package/dist/esm/utils/debounce.js +68 -0
  34. package/dist/esm/utils/index.js +8 -0
  35. package/dist/esm/utils/latestRef.js +41 -0
  36. package/dist/types/components/base-column-chooser.component.d.ts +3 -0
  37. package/dist/types/components/base-column-header-filter.component.d.ts +3 -0
  38. package/dist/types/components/base-column-header-menu.component.d.ts +3 -0
  39. package/dist/types/components/base-datagrid-table.component.d.ts +3 -0
  40. package/dist/types/components/base-inline-cell-editor.component.d.ts +7 -0
  41. package/dist/types/components/base-ogrid.component.d.ts +3 -0
  42. package/dist/types/components/base-pagination-controls.component.d.ts +3 -0
  43. package/dist/types/components/base-popover-cell-editor.component.d.ts +3 -0
  44. package/dist/types/components/empty-state.component.d.ts +3 -0
  45. package/dist/types/components/formula-bar.component.d.ts +3 -8
  46. package/dist/types/components/formula-ref-overlay.component.d.ts +3 -6
  47. package/dist/types/components/grid-context-menu.component.d.ts +3 -0
  48. package/dist/types/components/inline-cell-editor-template.d.ts +2 -2
  49. package/dist/types/components/marching-ants-overlay.component.d.ts +3 -0
  50. package/dist/types/components/ogrid-layout.component.d.ts +3 -0
  51. package/dist/types/components/sheet-tabs.component.d.ts +3 -8
  52. package/dist/types/components/sidebar.component.d.ts +3 -0
  53. package/dist/types/components/status-bar.component.d.ts +3 -0
  54. package/dist/types/services/column-reorder.service.d.ts +3 -0
  55. package/dist/types/services/datagrid-interaction.service.d.ts +1 -0
  56. package/dist/types/services/datagrid-state.service.d.ts +5 -0
  57. package/dist/types/services/formula-engine.service.d.ts +3 -9
  58. package/dist/types/services/ogrid.service.d.ts +8 -2
  59. package/dist/types/services/virtual-scroll.service.d.ts +3 -0
  60. package/package.json +4 -3
@@ -1,6 +1,7 @@
1
1
  import type { SideBarProps } from './sidebar.component';
2
2
  import type { OGridFormulaBarState } from '../services/ogrid.service';
3
3
  import type { ISheetDef } from '@alaarab/ogrid-core';
4
+ import * as i0 from "@angular/core";
4
5
  export declare class OGridLayoutComponent {
5
6
  className?: string;
6
7
  hasToolbar: boolean;
@@ -21,4 +22,6 @@ export declare class OGridLayoutComponent {
21
22
  get rootClass(): string;
22
23
  toggleFullScreen(): void;
23
24
  private removeEscListener;
25
+ static ɵfac: i0.ɵɵFactoryDeclaration<OGridLayoutComponent, never>;
26
+ static ɵcmp: i0.ɵɵComponentDeclaration<OGridLayoutComponent, "ogrid-layout", never, { "className": { "alias": "className"; "required": false; }; "hasToolbar": { "alias": "hasToolbar"; "required": false; }; "hasToolbarBelow": { "alias": "hasToolbarBelow"; "required": false; }; "hasPagination": { "alias": "hasPagination"; "required": false; }; "sideBar": { "alias": "sideBar"; "required": false; }; "fullScreen": { "alias": "fullScreen"; "required": false; }; "showNameBox": { "alias": "showNameBox"; "required": false; }; "activeCellRef": { "alias": "activeCellRef"; "required": false; }; "formulaBar": { "alias": "formulaBar"; "required": false; }; "sheetDefs": { "alias": "sheetDefs"; "required": false; }; "activeSheet": { "alias": "activeSheet"; "required": false; }; "onSheetChange": { "alias": "onSheetChange"; "required": false; }; "onSheetAdd": { "alias": "onSheetAdd"; "required": false; }; }, {}, never, ["[toolbar]", "[toolbarEnd]", "[toolbarBelow]", "*", "[pagination]"], true, never>;
24
27
  }
@@ -1,16 +1,11 @@
1
- /**
2
- * SheetTabsComponent -- Excel-style sheet tab bar at the bottom of the grid.
3
- *
4
- * Layout: [+] [Sheet1] [Sheet2] [Sheet3]
5
- *
6
- * Uses --ogrid-* CSS variables for theming.
7
- * Port of React's SheetTabs component.
8
- */
9
1
  import type { ISheetDef } from '@alaarab/ogrid-core';
2
+ import * as i0 from "@angular/core";
10
3
  export declare class SheetTabsComponent {
11
4
  readonly sheets: import("@angular/core").InputSignal<ISheetDef[]>;
12
5
  readonly activeSheet: import("@angular/core").InputSignal<string>;
13
6
  readonly showAddButton: import("@angular/core").InputSignal<boolean>;
14
7
  readonly sheetChange: import("@angular/core").OutputEmitterRef<string>;
15
8
  readonly sheetAdd: import("@angular/core").OutputEmitterRef<void>;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<SheetTabsComponent, never>;
10
+ static ɵcmp: i0.ɵɵComponentDeclaration<SheetTabsComponent, "ogrid-sheet-tabs", never, { "sheets": { "alias": "sheets"; "required": true; "isSignal": true; }; "activeSheet": { "alias": "activeSheet"; "required": true; "isSignal": true; }; "showAddButton": { "alias": "showAddButton"; "required": false; "isSignal": true; }; }, { "sheetChange": "sheetChange"; "sheetAdd": "sheetAdd"; }, never, never, true, never>;
16
11
  }
@@ -1,4 +1,5 @@
1
1
  import type { IColumnDefinition, SideBarPanelId, IFilters, FilterValue } from '../types';
2
+ import * as i0 from "@angular/core";
2
3
  /** Describes a filterable column for the sidebar filters panel. */
3
4
  export interface SideBarFilterColumn {
4
5
  columnId: string;
@@ -37,4 +38,6 @@ export declare class SideBarComponent {
37
38
  getFilterOptions(filterField: string): string[];
38
39
  isMultiSelectChecked(filterField: string, opt: string): boolean;
39
40
  onMultiSelectChange(filterField: string, opt: string, checked: boolean): void;
41
+ static ɵfac: i0.ɵɵFactoryDeclaration<SideBarComponent, never>;
42
+ static ɵcmp: i0.ɵɵComponentDeclaration<SideBarComponent, "ogrid-sidebar", never, { "sideBarProps": { "alias": "sideBarProps"; "required": false; }; }, {}, never, never, true, never>;
40
43
  }
@@ -1,4 +1,5 @@
1
1
  import { OnChanges } from '@angular/core';
2
+ import * as i0 from "@angular/core";
2
3
  export declare class StatusBarComponent implements OnChanges {
3
4
  totalCount: number;
4
5
  filteredCount: number | undefined;
@@ -21,4 +22,6 @@ export declare class StatusBarComponent implements OnChanges {
21
22
  private cachedParts;
22
23
  ngOnChanges(): void;
23
24
  getParts(): import("@alaarab/ogrid-core").StatusBarPart[];
25
+ static ɵfac: i0.ɵɵFactoryDeclaration<StatusBarComponent, never>;
26
+ static ɵcmp: i0.ɵɵComponentDeclaration<StatusBarComponent, "ogrid-status-bar", never, { "totalCount": { "alias": "totalCount"; "required": true; }; "filteredCount": { "alias": "filteredCount"; "required": false; }; "selectedCount": { "alias": "selectedCount"; "required": false; }; "selectedCellCount": { "alias": "selectedCellCount"; "required": false; }; "aggregation": { "alias": "aggregation"; "required": false; }; "suppressRowCount": { "alias": "suppressRowCount"; "required": false; }; "classNames": { "alias": "classNames"; "required": false; }; }, {}, never, never, true, never>;
24
27
  }
@@ -1,4 +1,5 @@
1
1
  import type { IColumnDef } from '../types';
2
+ import * as i0 from "@angular/core";
2
3
  /**
3
4
  * Manages column reorder drag interactions with RAF-throttled updates.
4
5
  * Angular signals-based port of React's useColumnReorder hook.
@@ -27,4 +28,6 @@ export declare class ColumnReorderService<T> {
27
28
  * Same logic as React's useColumnReorder inline calculation.
28
29
  */
29
30
  private calculateDrop;
31
+ static ɵfac: i0.ɵɵFactoryDeclaration<ColumnReorderService<any>, never>;
32
+ static ɵprov: i0.ɵɵInjectableDeclaration<ColumnReorderService<any>>;
30
33
  }
@@ -19,6 +19,7 @@ export declare class DataGridInteractionHelper<T> {
19
19
  readonly cutRangeSig: import("@angular/core").WritableSignal<ISelectionRange | null>;
20
20
  readonly copyRangeSig: import("@angular/core").WritableSignal<ISelectionRange | null>;
21
21
  private internalClipboard;
22
+ private preferInternalClipboard;
22
23
  readonly undoRedoStack: UndoRedoStack<ICellValueChangedEvent<T>>;
23
24
  readonly undoLengthSig: import("@angular/core").WritableSignal<number>;
24
25
  readonly redoLengthSig: import("@angular/core").WritableSignal<number>;
@@ -4,6 +4,7 @@ import type { IOGridDataGridProps } from '../types';
4
4
  import { DataGridLayoutHelper } from './datagrid-layout.service';
5
5
  import { DataGridEditingHelper } from './datagrid-editing.service';
6
6
  import { DataGridInteractionHelper } from './datagrid-interaction.service';
7
+ import * as i0 from "@angular/core";
7
8
  type IColumnDef<T> = IAngularColumnDef<T>;
8
9
  export interface DataGridLayoutState<T> {
9
10
  flatColumns: IColumnDef<T>[];
@@ -168,6 +169,7 @@ export interface DataGridStateResult<T> {
168
169
  export declare class DataGridStateService<T> {
169
170
  private destroyRef;
170
171
  private ngZone;
172
+ private readonly mutationTick;
171
173
  readonly props: import("@angular/core").WritableSignal<IOGridDataGridProps<T> | null>;
172
174
  readonly wrapperEl: import("@angular/core").WritableSignal<HTMLElement | null>;
173
175
  /** Layout helper: column layout, visibility, sizing, container measurement. */
@@ -209,6 +211,7 @@ export declare class DataGridStateService<T> {
209
211
  totalCount: number;
210
212
  filteredCount?: number;
211
213
  selectedCount?: number;
214
+ selectedCellCount?: number;
212
215
  panels?: import("@alaarab/ogrid-core").StatusBarPanel[];
213
216
  suppressRowCount?: boolean;
214
217
  } | null>;
@@ -301,5 +304,7 @@ export declare class DataGridStateService<T> {
301
304
  private onWindowMouseMove;
302
305
  private onWindowMouseUp;
303
306
  private setupFillHandleDrag;
307
+ static ɵfac: i0.ɵɵFactoryDeclaration<DataGridStateService<any>, never>;
308
+ static ɵprov: i0.ɵɵInjectableDeclaration<DataGridStateService<any>>;
304
309
  }
305
310
  export {};
@@ -1,13 +1,5 @@
1
- /**
2
- * FormulaEngineService - Angular service for integrating the formula engine with the grid.
3
- *
4
- * Lazily creates a FormulaEngine instance when configured with `formulas: true`.
5
- * Provides an accessor bridge between grid data and formula coordinates.
6
- * Uses Angular signals for reactive state.
7
- *
8
- * Port of React's useFormulaEngine hook.
9
- */
10
1
  import type { IGridDataAccessor, IFormulaFunction, IRecalcResult, IColumnDef, IAuditEntry, IAuditTrail } from '@alaarab/ogrid-core';
2
+ import * as i0 from "@angular/core";
11
3
  export interface FormulaEngineConfig {
12
4
  /** Enable formula support. */
13
5
  formulas?: boolean;
@@ -128,4 +120,6 @@ export declare class FormulaEngineService<T = unknown> {
128
120
  getAuditTrail(col: number, row: number): IAuditTrail | null;
129
121
  /** Create a data accessor that bridges grid data to formula coordinates. */
130
122
  private createAccessor;
123
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormulaEngineService<any>, never>;
124
+ static ɵprov: i0.ɵɵInjectableDeclaration<FormulaEngineService<any>>;
131
125
  }
@@ -3,6 +3,7 @@ import type { RowId, IOGridApi, IFilters, FilterValue, IRowSelectionChangeEvent,
3
3
  import type { IOGridProps, IOGridDataGridProps } from '../types';
4
4
  import type { IColumnDef, IColumnGroupDef, ICellValueChangedEvent } from '../types';
5
5
  import type { SideBarProps } from '../components/sidebar.component';
6
+ import * as i0 from "@angular/core";
6
7
  /** Resolved column chooser placement. */
7
8
  export type ColumnChooserPlacement = 'toolbar' | 'sidebar' | 'none';
8
9
  /** Pagination state and handlers. */
@@ -79,6 +80,7 @@ export declare class OGridService<T> {
79
80
  readonly onFiltersChange: import("@angular/core").WritableSignal<((filters: IFilters) => void) | undefined>;
80
81
  readonly onVisibleColumnsChange: import("@angular/core").WritableSignal<((cols: Set<string>) => void) | undefined>;
81
82
  readonly columnOrder: import("@angular/core").WritableSignal<string[] | undefined>;
83
+ readonly internalColumnOrder: import("@angular/core").WritableSignal<string[] | undefined>;
82
84
  readonly onColumnOrderChange: import("@angular/core").WritableSignal<((order: string[]) => void) | undefined>;
83
85
  readonly onColumnResized: import("@angular/core").WritableSignal<((columnId: string, width: number) => void) | undefined>;
84
86
  readonly onAutosizeColumn: import("@angular/core").WritableSignal<((columnId: string, width: number) => void) | undefined>;
@@ -121,7 +123,7 @@ export declare class OGridService<T> {
121
123
  readonly virtualScroll: import("@angular/core").WritableSignal<IVirtualScrollConfig | undefined>;
122
124
  readonly ariaLabel: import("@angular/core").WritableSignal<string | undefined>;
123
125
  readonly ariaLabelledBy: import("@angular/core").WritableSignal<string | undefined>;
124
- readonly workerSort: import("@angular/core").WritableSignal<boolean>;
126
+ readonly workerSort: import("@angular/core").WritableSignal<boolean | "auto">;
125
127
  readonly showRowNumbers: import("@angular/core").WritableSignal<boolean>;
126
128
  readonly cellReferences: import("@angular/core").WritableSignal<boolean>;
127
129
  readonly formulasEnabled: import("@angular/core").WritableSignal<boolean>;
@@ -187,7 +189,7 @@ export declare class OGridService<T> {
187
189
  private readonly sortSnapshotVersion;
188
190
  private readonly sideBarActivePanel;
189
191
  private readonly serverFilterOptions;
190
- private readonly loadingFilterOptions;
192
+ readonly loadingFilterOptions: import("@angular/core").WritableSignal<Record<string, boolean>>;
191
193
  readonly columns: import("@angular/core").Signal<IColumnDef<T>[]>;
192
194
  readonly isServerSide: import("@angular/core").Signal<boolean>;
193
195
  readonly isClientSide: import("@angular/core").Signal<boolean>;
@@ -202,11 +204,13 @@ export declare class OGridService<T> {
202
204
  }>;
203
205
  readonly filters: import("@angular/core").Signal<IFilters>;
204
206
  readonly visibleColumns: import("@angular/core").Signal<Set<string>>;
207
+ readonly effectiveColumnOrder: import("@angular/core").Signal<string[] | undefined>;
205
208
  readonly effectiveSelectedRows: import("@angular/core").Signal<Set<RowId>>;
206
209
  readonly columnChooserPlacement: import("@angular/core").Signal<ColumnChooserPlacement>;
207
210
  readonly multiSelectFilterFields: import("@angular/core").Signal<string[]>;
208
211
  readonly hasServerFilterOptions: import("@angular/core").Signal<boolean>;
209
212
  readonly clientFilterOptions: import("@angular/core").Signal<Record<string, string[]>>;
213
+ readonly workerSortEnabled: import("@angular/core").Signal<boolean>;
210
214
  /** Sync path: used when workerSort is off. */
211
215
  readonly clientItemsAndTotal: import("@angular/core").Signal<{
212
216
  items: T[];
@@ -308,4 +312,6 @@ export declare class OGridService<T> {
308
312
  columnId: string;
309
313
  }[], columnWidths: Record<string, number>, defaultWidth: number): Record<string, number>;
310
314
  getApi(): IOGridApi<T>;
315
+ static ɵfac: i0.ɵɵFactoryDeclaration<OGridService<any>, never>;
316
+ static ɵprov: i0.ɵɵInjectableDeclaration<OGridService<any>>;
311
317
  }
@@ -1,4 +1,5 @@
1
1
  import type { IVisibleRange, IVisibleColumnRange, IVirtualScrollConfig } from '@alaarab/ogrid-core';
2
+ import * as i0 from "@angular/core";
2
3
  /**
3
4
  * Manages virtual scrolling state using Angular signals.
4
5
  * Port of React's useVirtualScroll hook.
@@ -52,4 +53,6 @@ export declare class VirtualScrollService {
52
53
  * Update the virtual scroll configuration.
53
54
  */
54
55
  updateConfig(updates: Partial<IVirtualScrollConfig>): void;
56
+ static ɵfac: i0.ɵɵFactoryDeclaration<VirtualScrollService, never>;
57
+ static ɵprov: i0.ɵɵInjectableDeclaration<VirtualScrollService>;
55
58
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alaarab/ogrid-angular",
3
- "version": "2.5.9",
3
+ "version": "2.6.1",
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",
@@ -13,7 +13,7 @@
13
13
  }
14
14
  },
15
15
  "scripts": {
16
- "build": "rimraf dist && tsup && tsc -p tsconfig.build.json",
16
+ "build": "rimraf dist && ngc -p tsconfig.build.json",
17
17
  "test": "jest --passWithNoTests"
18
18
  },
19
19
  "keywords": [
@@ -35,13 +35,14 @@
35
35
  "node": ">=18"
36
36
  },
37
37
  "dependencies": {
38
- "@alaarab/ogrid-core": "2.5.9"
38
+ "@alaarab/ogrid-core": "2.6.1"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "@angular/core": "^21.0.0",
42
42
  "@angular/common": "^21.0.0"
43
43
  },
44
44
  "devDependencies": {
45
+ "@angular/compiler-cli": "^21.1.4",
45
46
  "@angular/core": "^21.1.4",
46
47
  "@angular/common": "^21.1.4",
47
48
  "@angular/compiler": "^21.1.4",