@alaarab/ogrid-angular 2.6.0 → 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 (62) 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 +4 -19
  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/index.d.ts +0 -2
  55. package/dist/types/services/column-reorder.service.d.ts +3 -0
  56. package/dist/types/services/datagrid-interaction.service.d.ts +1 -0
  57. package/dist/types/services/datagrid-state.service.d.ts +5 -0
  58. package/dist/types/services/formula-engine.service.d.ts +3 -9
  59. package/dist/types/services/ogrid.service.d.ts +8 -11
  60. package/dist/types/services/virtual-scroll.service.d.ts +3 -0
  61. package/dist/types/types/dataGridTypes.d.ts +0 -4
  62. package/package.json +4 -3
@@ -2,5 +2,5 @@
2
2
  * Shared inline cell editor template used by all Angular UI packages.
3
3
  * The template is identical across Material, PrimeNG, and Radix implementations.
4
4
  */
5
- export declare const INLINE_CELL_EDITOR_TEMPLATE = "\n @switch (editorType) {\n @case ('text') {\n <input\n #inputEl\n type=\"text\"\n [value]=\"localValue()\"\n (input)=\"localValue.set($any($event.target).value)\"\n (keydown)=\"onTextKeyDown($event)\"\n (blur)=\"onTextBlur()\"\n [style]=\"getInputStyle()\"\n />\n }\n @case ('richSelect') {\n <div #richSelectWrapper\n style=\"width:100%;height:100%;display:flex;align-items:center;padding:6px 10px;box-sizing:border-box;min-width:0;position:relative\">\n <div style=\"display:flex;align-items:center;justify-content:space-between;width:100%;cursor:pointer;font-size:13px;color:inherit\">\n <span>{{ getDisplayText(value) }}</span>\n <span style=\"margin-left:4px;font-size:10px;opacity:0.5\">&#9662;</span>\n </div>\n <div #richSelectDropdown role=\"listbox\"\n style=\"position:absolute;top:100%;left:0;right:0;max-height:200px;overflow-y:auto;background:var(--ogrid-bg, #fff);border:1px solid var(--ogrid-border, rgba(0,0,0,0.12));z-index:10;box-shadow:0 4px 16px rgba(0,0,0,0.2);text-align:left;font-size:13px;font-family:inherit\">\n <input\n #richSelectInput\n type=\"text\"\n [value]=\"searchText()\"\n (input)=\"onRichSelectSearch($any($event.target).value)\"\n (keydown)=\"onRichSelectKeyDown($event)\"\n placeholder=\"Search...\"\n style=\"width:100%;padding:6px 8px;border:none;border-bottom:1px solid var(--ogrid-border, rgba(0,0,0,0.12));background:var(--ogrid-bg, #fff);color:inherit;font:inherit;font-size:13px;outline:none;box-sizing:border-box;position:sticky;top:0;z-index:1\"\n />\n <div #richSelectOptions>\n @for (opt of filteredOptions(); track opt; let i = $index) {\n <div role=\"option\"\n [attr.aria-selected]=\"i === highlightedIndex()\"\n (click)=\"commitValue(opt)\"\n [style]=\"i === highlightedIndex() ? 'padding:6px 8px;cursor:pointer;color:var(--ogrid-fg, #242424);font-size:13px;background:var(--ogrid-bg-hover, #e8f0fe)' : 'padding:6px 8px;cursor:pointer;color:var(--ogrid-fg, #242424);font-size:13px'\">\n {{ getDisplayText(opt) }}\n </div>\n }\n @if (filteredOptions().length === 0) {\n <div style=\"padding:6px 8px;color:var(--ogrid-muted, #999);font-size:13px\">No matches</div>\n }\n </div>\n </div>\n </div>\n }\n @case ('select') {\n <div #selectWrapper tabindex=\"0\"\n style=\"width:100%;height:100%;display:flex;align-items:center;padding:6px 10px;box-sizing:border-box;min-width:0;position:relative\"\n (keydown)=\"onCustomSelectKeyDown($event)\">\n <div style=\"display:flex;align-items:center;justify-content:space-between;width:100%;cursor:pointer;font-size:13px;color:inherit\">\n <span>{{ getDisplayText(value) }}</span>\n <span style=\"margin-left:4px;font-size:10px;opacity:0.5\">&#9662;</span>\n </div>\n <div #selectDropdown role=\"listbox\"\n style=\"position:absolute;top:100%;left:0;right:0;max-height:200px;overflow-y:auto;background:var(--ogrid-bg, #fff);border:1px solid var(--ogrid-border, rgba(0,0,0,0.12));z-index:10;box-shadow:0 4px 16px rgba(0,0,0,0.2);text-align:left;font-size:13px;font-family:inherit\">\n @for (opt of selectOptions(); track opt; let i = $index) {\n <div role=\"option\"\n [attr.aria-selected]=\"i === highlightedIndex()\"\n (click)=\"commitValue(opt)\"\n [style]=\"i === highlightedIndex() ? 'padding:6px 8px;cursor:pointer;color:var(--ogrid-fg, #242424);font-size:13px;background:var(--ogrid-bg-hover, #e8f0fe)' : 'padding:6px 8px;cursor:pointer;color:var(--ogrid-fg, #242424);font-size:13px'\">\n {{ getDisplayText(opt) }}\n </div>\n }\n </div>\n </div>\n }\n @case ('checkbox') {\n <div style=\"display:flex;align-items:center;justify-content:center;width:100%;height:100%\">\n <input\n type=\"checkbox\"\n [checked]=\"!!localValue()\"\n (change)=\"commitValue($any($event.target).checked)\"\n (keydown)=\"onCheckboxKeyDown($event)\"\n />\n </div>\n }\n @case ('date') {\n @if (getCellEditorType() === 'native') {\n <input\n #inputEl\n type=\"date\"\n [value]=\"localValue()\"\n (input)=\"localValue.set($any($event.target).value)\"\n (keydown)=\"onTextKeyDown($event)\"\n (blur)=\"onTextBlur()\"\n [style]=\"getInputStyle()\"\n />\n } @else {\n <input\n #inputEl\n type=\"text\"\n [placeholder]=\"getDatePlaceholder()\"\n [value]=\"localValue()\"\n (input)=\"localValue.set($any($event.target).value)\"\n (keydown)=\"onTextKeyDown($event)\"\n (blur)=\"onTextBlur()\"\n [style]=\"getInputStyle()\"\n />\n }\n }\n @default {\n <input\n #inputEl\n type=\"text\"\n [value]=\"localValue()\"\n (input)=\"localValue.set($any($event.target).value)\"\n (keydown)=\"onTextKeyDown($event)\"\n (blur)=\"onTextBlur()\"\n [style]=\"getInputStyle()\"\n />\n }\n }\n";
6
- export declare const INLINE_CELL_EDITOR_STYLES = "\n :host {\n display: block;\n width: 100%;\n height: 100%;\n }\n";
5
+ export declare const INLINE_CELL_EDITOR_TEMPLATE = "\n @switch (editorType) {\n @case ('text') {\n <input\n #inputEl\n type=\"text\"\n [value]=\"localValue()\"\n (input)=\"localValue.set($any($event.target).value)\"\n (keydown)=\"onTextKeyDown($event)\"\n (blur)=\"onTextBlur()\"\n [style]=\"getInputStyle()\"\n />\n }\n @case ('richSelect') {\n <div #richSelectWrapper\n style=\"width:100%;height:100%;display:flex;align-items:center;box-sizing:border-box;overflow:hidden;min-width:0;position:relative\">\n <div style=\"display:flex;align-items:center;justify-content:space-between;width:100%;min-width:0;cursor:pointer;font-size:var(--ogrid-cell-font-size, 13px);color:inherit\">\n <span style=\"flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap\">{{ getDisplayText(value) }}</span>\n <span style=\"margin-left:4px;font-size:10px;opacity:0.5\">&#9662;</span>\n </div>\n <div #richSelectDropdown role=\"listbox\"\n style=\"position:absolute;top:100%;left:0;right:0;max-height:200px;overflow-y:auto;background:var(--ogrid-bg, #fff);border:1px solid var(--ogrid-border, rgba(0,0,0,0.12));z-index:10;box-shadow:0 4px 16px rgba(0,0,0,0.2);text-align:left;font-size:var(--ogrid-cell-font-size, 13px);font-family:inherit\">\n <input\n #richSelectInput\n type=\"text\"\n [value]=\"searchText()\"\n (input)=\"onRichSelectSearch($any($event.target).value)\"\n (keydown)=\"onRichSelectKeyDown($event)\"\n placeholder=\"Search...\"\n style=\"width:100%;padding:6px 8px;border:none;border-bottom:1px solid var(--ogrid-border, rgba(0,0,0,0.12));background:var(--ogrid-bg, #fff);color:inherit;font:inherit;font-size:var(--ogrid-cell-font-size, 13px);outline:none;box-sizing:border-box;position:sticky;top:0;z-index:1\"\n />\n <div #richSelectOptions>\n @for (opt of filteredOptions(); track opt; let i = $index) {\n <div role=\"option\"\n [attr.aria-selected]=\"i === highlightedIndex()\"\n (click)=\"commitValue(opt)\"\n [style]=\"i === highlightedIndex() ? 'padding:6px 8px;cursor:pointer;color:var(--ogrid-fg, #242424);font-size:var(--ogrid-cell-font-size, 13px);background:var(--ogrid-bg-hover, #e8f0fe)' : 'padding:6px 8px;cursor:pointer;color:var(--ogrid-fg, #242424);font-size:var(--ogrid-cell-font-size, 13px)'\">\n {{ getDisplayText(opt) }}\n </div>\n }\n @if (filteredOptions().length === 0) {\n <div style=\"padding:6px 8px;color:var(--ogrid-muted, #999);font-size:var(--ogrid-cell-font-size, 13px)\">No matches</div>\n }\n </div>\n </div>\n </div>\n }\n @case ('select') {\n <div #selectWrapper tabindex=\"0\"\n style=\"width:100%;height:100%;display:flex;align-items:center;box-sizing:border-box;overflow:hidden;min-width:0;position:relative\"\n (keydown)=\"onCustomSelectKeyDown($event)\">\n <div style=\"display:flex;align-items:center;justify-content:space-between;width:100%;min-width:0;cursor:pointer;font-size:var(--ogrid-cell-font-size, 13px);color:inherit\">\n <span style=\"flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap\">{{ getDisplayText(value) }}</span>\n <span style=\"margin-left:4px;font-size:10px;opacity:0.5\">&#9662;</span>\n </div>\n <div #selectDropdown role=\"listbox\"\n style=\"position:absolute;top:100%;left:0;right:0;max-height:200px;overflow-y:auto;background:var(--ogrid-bg, #fff);border:1px solid var(--ogrid-border, rgba(0,0,0,0.12));z-index:10;box-shadow:0 4px 16px rgba(0,0,0,0.2);text-align:left;font-size:var(--ogrid-cell-font-size, 13px);font-family:inherit\">\n @for (opt of selectOptions(); track opt; let i = $index) {\n <div role=\"option\"\n [attr.aria-selected]=\"i === highlightedIndex()\"\n (click)=\"commitValue(opt)\"\n [style]=\"i === highlightedIndex() ? 'padding:6px 8px;cursor:pointer;color:var(--ogrid-fg, #242424);font-size:var(--ogrid-cell-font-size, 13px);background:var(--ogrid-bg-hover, #e8f0fe)' : 'padding:6px 8px;cursor:pointer;color:var(--ogrid-fg, #242424);font-size:var(--ogrid-cell-font-size, 13px)'\">\n {{ getDisplayText(opt) }}\n </div>\n }\n </div>\n </div>\n }\n @case ('checkbox') {\n <div style=\"display:flex;align-items:center;justify-content:center;width:100%;height:100%\">\n <input\n type=\"checkbox\"\n [checked]=\"!!localValue()\"\n (change)=\"commitValue($any($event.target).checked)\"\n (keydown)=\"onCheckboxKeyDown($event)\"\n />\n </div>\n }\n @case ('date') {\n @if (getCellEditorType() === 'native') {\n <input\n #inputEl\n type=\"date\"\n [value]=\"localValue()\"\n (input)=\"localValue.set($any($event.target).value)\"\n (keydown)=\"onTextKeyDown($event)\"\n (blur)=\"onTextBlur()\"\n [style]=\"getInputStyle()\"\n />\n } @else {\n <input\n #inputEl\n type=\"text\"\n [placeholder]=\"getDatePlaceholder()\"\n [value]=\"localValue()\"\n (input)=\"localValue.set($any($event.target).value)\"\n (keydown)=\"onTextKeyDown($event)\"\n (blur)=\"onTextBlur()\"\n [style]=\"getInputStyle()\"\n />\n }\n }\n @default {\n <input\n #inputEl\n type=\"text\"\n [value]=\"localValue()\"\n (input)=\"localValue.set($any($event.target).value)\"\n (keydown)=\"onTextKeyDown($event)\"\n (blur)=\"onTextBlur()\"\n [style]=\"getInputStyle()\"\n />\n }\n }\n";
6
+ export declare const INLINE_CELL_EDITOR_STYLES = "\n :host {\n display: flex;\n align-items: center;\n width: 100%;\n height: 100%;\n min-width: 0;\n padding-top: var(--ogrid-cell-padding-vertical, 6px);\n padding-bottom: var(--ogrid-cell-padding-vertical, 6px);\n padding-left: var(--ogrid-cell-padding-horizontal, 10px);\n padding-right: var(--ogrid-cell-padding-horizontal, 10px);\n box-sizing: border-box;\n overflow: hidden;\n }\n";
@@ -1,6 +1,7 @@
1
1
  import { OnChanges, SimpleChanges } from '@angular/core';
2
2
  import type { ISelectionRange } from '../types';
3
3
  import { type OverlayRect } from '@alaarab/ogrid-core';
4
+ import * as i0 from "@angular/core";
4
5
  export declare class MarchingAntsOverlayComponent implements OnChanges {
5
6
  private destroyRef;
6
7
  containerEl: HTMLElement | null;
@@ -22,4 +23,6 @@ export declare class MarchingAntsOverlayComponent implements OnChanges {
22
23
  isSingleCellSelection(): boolean;
23
24
  clipRangeMatchesSel(): boolean;
24
25
  max0(n: number): number;
26
+ static ɵfac: i0.ɵɵFactoryDeclaration<MarchingAntsOverlayComponent, never>;
27
+ static ɵcmp: i0.ɵɵComponentDeclaration<MarchingAntsOverlayComponent, "ogrid-marching-ants-overlay", never, { "containerEl": { "alias": "containerEl"; "required": true; }; "selectionRange": { "alias": "selectionRange"; "required": false; }; "copyRange": { "alias": "copyRange"; "required": false; }; "cutRange": { "alias": "cutRange"; "required": false; }; "colOffset": { "alias": "colOffset"; "required": false; }; "columnSizingVersion": { "alias": "columnSizingVersion"; "required": false; }; "items": { "alias": "items"; "required": false; }; "visibleColumns": { "alias": "visibleColumns"; "required": false; }; "columnOrder": { "alias": "columnOrder"; "required": false; }; }, {}, never, never, true, never>;
25
28
  }
@@ -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,5 +1,3 @@
1
- export { isGroupHeader, buildGroupedRows } from '@alaarab/ogrid-core';
2
- export type { IRowGroup, IRowGroupingConfig, RowGroupingDisplayRow } from '@alaarab/ogrid-core';
3
1
  export type { ISheetDef, IVirtualScrollConfig, IColumnReorderConfig, CsvColumn, FormulaExportOptions, StatusBarPart, StatusBarPartsInput, PaginationViewModel, GridContextMenuItem, IColumnHeaderMenuItem, GridContextMenuHandlerProps, ColumnHeaderMenuInput, ColumnHeaderMenuHandlers, ParseValueResult, AggregationResult, GridRowComparatorProps, ColumnPinState, IDropTarget, ICalculateDropTargetParams, IVisibleRange, IVisibleColumnRange, SortFilterRequest, SortFilterResponse, OverlayRect, ISortState, ArrowNavigationContext, ArrowNavigationResult, IFillFormulaOptions, FormulaReference, IResponsiveColumnsConfig, ZIndexKey, ICellAddress, ICellRange, CellKey, FormulaErrorType, TokenType, Token, ASTNode, BinaryOp, IFormulaContext, IFormulaFunction, IEvaluator, IRecalcResult, IFormulaEngineConfig, IGridDataAccessor, INamedRange, IAuditEntry, IAuditTrail, } from '@alaarab/ogrid-core';
4
2
  export { escapeCsvValue, buildCsvHeader, buildCsvRows, exportToCsv, triggerCsvDownload, getCellValue, isColumnEditable, createGridDataAccessor, flattenColumns, buildHeaderRows, isFilterConfig, getFilterField, mergeFilter, deriveFilterOptionsFromData, getMultiSelectFilterFields, getStatusBarParts, getDataGridStatusBarConfig, getPaginationViewModel, PAGE_SIZE_OPTIONS, MAX_PAGE_BUTTONS, GRID_CONTEXT_MENU_ITEMS, COLUMN_HEADER_MENU_ITEMS, getContextMenuHandlers, getColumnHeaderMenuItems, formatShortcut, parseValue, numberParser, currencyParser, dateParser, emailParser, booleanParser, computeAggregations, processClientSideData, areGridRowPropsEqual, isRowInRange, getPinStateForColumn, reorderColumnArray, calculateDropTarget, computeVisibleRange, computeTotalHeight, getScrollTopForRow, computeVisibleColumnRange, partitionColumnsForVirtualization, createSortFilterWorker, terminateSortFilterWorker, extractValueMatrix, processClientSideDataAsync, CellDescriptorCache, buildInlineEditorProps, buildPopoverEditorProps, measureRange, buildCellIndex, injectGlobalStyles, computeNextSortState, measureColumnContentWidth, AUTOSIZE_EXTRA_PX, AUTOSIZE_MAX_PX, findCtrlArrowTarget, computeTabNavigation, computeArrowNavigation, applyCellDeletion, rangesEqual, clampSelectionToBounds, computeAutoScrollSpeed, applyRangeRowSelection, computeRowSelectionState, formatCellValueForTsv, formatSelectionAsTsv, parseTsvClipboard, applyPastedValues, applyCutClear, applyFillValues, UndoRedoStack, validateColumns, validateRowIds, validateVirtualScrollConfig, indexToColumnLetter, columnLetterToIndex, formatCellReference, getResponsiveHiddenColumns, RESPONSIVE_BREAKPOINTS, resolveResponsiveConfig, applyResponsiveHiding, } from '@alaarab/ogrid-core';
5
3
  export { CHECKBOX_COLUMN_WIDTH, ROW_NUMBER_COLUMN_WIDTH, ROW_NUMBER_COLUMN_ID, ROW_NUMBER_COLUMN_MIN_WIDTH, DEFAULT_MIN_COLUMN_WIDTH, CELL_PADDING, GRID_BORDER_RADIUS, DEFAULT_DEBOUNCE_MS, PEOPLE_SEARCH_DEBOUNCE_MS, SIDEBAR_TRANSITION_MS, Z_INDEX, } from '@alaarab/ogrid-core';
@@ -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
  }
@@ -1,9 +1,9 @@
1
- import type { RowGroupingDisplayRow } from '@alaarab/ogrid-core';
2
1
  import type { FormulaReference } from '@alaarab/ogrid-core';
3
2
  import type { RowId, IOGridApi, IFilters, FilterValue, IRowSelectionChangeEvent, IStatusBarProps, IColumnDefinition, IDataSource, ISideBarDef, IVirtualScrollConfig, IResponsiveColumnsConfig, SideBarPanelId, IFormulaFunction, IRecalcResult, IGridDataAccessor } from '../types';
4
3
  import type { IOGridProps, IOGridDataGridProps } from '../types';
5
4
  import type { IColumnDef, IColumnGroupDef, ICellValueChangedEvent } from '../types';
6
5
  import type { SideBarProps } from '../components/sidebar.component';
6
+ import * as i0 from "@angular/core";
7
7
  /** Resolved column chooser placement. */
8
8
  export type ColumnChooserPlacement = 'toolbar' | 'sidebar' | 'none';
9
9
  /** Pagination state and handlers. */
@@ -80,6 +80,7 @@ export declare class OGridService<T> {
80
80
  readonly onFiltersChange: import("@angular/core").WritableSignal<((filters: IFilters) => void) | undefined>;
81
81
  readonly onVisibleColumnsChange: import("@angular/core").WritableSignal<((cols: Set<string>) => void) | undefined>;
82
82
  readonly columnOrder: import("@angular/core").WritableSignal<string[] | undefined>;
83
+ readonly internalColumnOrder: import("@angular/core").WritableSignal<string[] | undefined>;
83
84
  readonly onColumnOrderChange: import("@angular/core").WritableSignal<((order: string[]) => void) | undefined>;
84
85
  readonly onColumnResized: import("@angular/core").WritableSignal<((columnId: string, width: number) => void) | undefined>;
85
86
  readonly onAutosizeColumn: import("@angular/core").WritableSignal<((columnId: string, width: number) => void) | undefined>;
@@ -122,10 +123,8 @@ export declare class OGridService<T> {
122
123
  readonly virtualScroll: import("@angular/core").WritableSignal<IVirtualScrollConfig | undefined>;
123
124
  readonly ariaLabel: import("@angular/core").WritableSignal<string | undefined>;
124
125
  readonly ariaLabelledBy: import("@angular/core").WritableSignal<string | undefined>;
125
- readonly workerSort: import("@angular/core").WritableSignal<boolean>;
126
+ readonly workerSort: import("@angular/core").WritableSignal<boolean | "auto">;
126
127
  readonly showRowNumbers: import("@angular/core").WritableSignal<boolean>;
127
- readonly groupBy: import("@angular/core").WritableSignal<string[]>;
128
- readonly expandedGroups: import("@angular/core").WritableSignal<Set<string>>;
129
128
  readonly cellReferences: import("@angular/core").WritableSignal<boolean>;
130
129
  readonly formulasEnabled: import("@angular/core").WritableSignal<boolean>;
131
130
  readonly initialFormulas: import("@angular/core").WritableSignal<{
@@ -190,7 +189,7 @@ export declare class OGridService<T> {
190
189
  private readonly sortSnapshotVersion;
191
190
  private readonly sideBarActivePanel;
192
191
  private readonly serverFilterOptions;
193
- private readonly loadingFilterOptions;
192
+ readonly loadingFilterOptions: import("@angular/core").WritableSignal<Record<string, boolean>>;
194
193
  readonly columns: import("@angular/core").Signal<IColumnDef<T>[]>;
195
194
  readonly isServerSide: import("@angular/core").Signal<boolean>;
196
195
  readonly isClientSide: import("@angular/core").Signal<boolean>;
@@ -205,11 +204,13 @@ export declare class OGridService<T> {
205
204
  }>;
206
205
  readonly filters: import("@angular/core").Signal<IFilters>;
207
206
  readonly visibleColumns: import("@angular/core").Signal<Set<string>>;
207
+ readonly effectiveColumnOrder: import("@angular/core").Signal<string[] | undefined>;
208
208
  readonly effectiveSelectedRows: import("@angular/core").Signal<Set<RowId>>;
209
209
  readonly columnChooserPlacement: import("@angular/core").Signal<ColumnChooserPlacement>;
210
210
  readonly multiSelectFilterFields: import("@angular/core").Signal<string[]>;
211
211
  readonly hasServerFilterOptions: import("@angular/core").Signal<boolean>;
212
212
  readonly clientFilterOptions: import("@angular/core").Signal<Record<string, string[]>>;
213
+ readonly workerSortEnabled: import("@angular/core").Signal<boolean>;
213
214
  /** Sync path: used when workerSort is off. */
214
215
  readonly clientItemsAndTotal: import("@angular/core").Signal<{
215
216
  items: T[];
@@ -222,9 +223,6 @@ export declare class OGridService<T> {
222
223
  } | null>;
223
224
  readonly displayItems: import("@angular/core").Signal<T[]>;
224
225
  readonly displayTotalCount: import("@angular/core").Signal<number>;
225
- /** When groupBy is active, returns grouped display rows (with group headers). Otherwise returns displayItems as-is. */
226
- readonly displayRows: import("@angular/core").Signal<RowGroupingDisplayRow<T>[]>;
227
- readonly isGroupingActive: import("@angular/core").Signal<boolean>;
228
226
  readonly hasActiveFilters: import("@angular/core").Signal<boolean>;
229
227
  readonly columnChooserColumns: import("@angular/core").Signal<IColumnDefinition[]>;
230
228
  readonly statusBarConfig: import("@angular/core").Signal<IStatusBarProps | undefined>;
@@ -286,9 +284,6 @@ export declare class OGridService<T> {
286
284
  private startFormulaBarEditing;
287
285
  private commitFormulaBar;
288
286
  private cancelFormulaBar;
289
- toggleGroup(groupKey: string): void;
290
- expandAllGroups(): void;
291
- collapseAllGroups(): void;
292
287
  configure(props: IOGridProps<T>): void;
293
288
  /**
294
289
  * Pin a column to the left or right edge.
@@ -317,4 +312,6 @@ export declare class OGridService<T> {
317
312
  columnId: string;
318
313
  }[], columnWidths: Record<string, number>, defaultWidth: number): Record<string, number>;
319
314
  getApi(): IOGridApi<T>;
315
+ static ɵfac: i0.ɵɵFactoryDeclaration<OGridService<any>, never>;
316
+ static ɵprov: i0.ɵɵInjectableDeclaration<OGridService<any>>;
320
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
  }
@@ -75,8 +75,6 @@ interface IOGridBaseProps<T> {
75
75
  onError?: (error: unknown) => void;
76
76
  onCellError?: (error: Error, info: unknown) => void;
77
77
  showRowNumbers?: boolean;
78
- /** Column IDs to group rows by. When non-empty, rows are grouped and group header rows are inserted. */
79
- groupBy?: string[];
80
78
  /** Enable Excel-style cell references: column letter headers, row numbers, and name box. Implies showRowNumbers. */
81
79
  cellReferences?: boolean;
82
80
  /** Enable Excel-like formula support. When true, cells starting with '=' are treated as formulas. Default: false. */
@@ -181,8 +179,6 @@ export interface IOGridDataGridProps<T> {
181
179
  onCellError?: (error: Error, info: unknown) => void;
182
180
  'aria-label'?: string;
183
181
  'aria-labelledby'?: string;
184
- /** Column IDs to group rows by. Groups are nested in the order provided. */
185
- groupBy?: string[];
186
182
  /** Custom keydown handler. Called before grid's built-in handling. Call event.preventDefault() to suppress grid default. */
187
183
  onKeyDown?: (event: KeyboardEvent) => void;
188
184
  /** Enable formula support. When true, cell values starting with '=' are treated as formulas. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alaarab/ogrid-angular",
3
- "version": "2.6.0",
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.6.0"
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",