@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
@@ -0,0 +1,114 @@
1
+ import { Injectable, signal, computed, DestroyRef, inject } from '@angular/core';
2
+ import { computeVisibleRange, computeTotalHeight, getScrollTopForRow, validateVirtualScrollConfig, computeVisibleColumnRange, } from '@alaarab/ogrid-core';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * Default minimum row count before virtual scrolling activates.
6
+ * Grids with fewer rows than this render all rows without virtualization
7
+ * to avoid scroll offset artifacts on small datasets.
8
+ */
9
+ const DEFAULT_PASSTHROUGH_THRESHOLD = 100;
10
+ /**
11
+ * Manages virtual scrolling state using Angular signals.
12
+ * Port of React's useVirtualScroll hook.
13
+ *
14
+ * Uses core's pure-TS `computeVisibleRange` and `getScrollTopForRow` utilities.
15
+ * The UI layer (Angular Material / PrimeNG) provides the scrollable container
16
+ * and calls `onScroll()` / sets `containerHeight`.
17
+ */
18
+ export class VirtualScrollService {
19
+ constructor() {
20
+ this.destroyRef = inject(DestroyRef);
21
+ // --- Input signals (set by consuming component) ---
22
+ this.totalRows = signal(0, ...(ngDevMode ? [{ debugName: "totalRows" }] : []));
23
+ this.config = signal({ rowHeight: 36 }, ...(ngDevMode ? [{ debugName: "config" }] : []));
24
+ this.containerHeight = signal(0, ...(ngDevMode ? [{ debugName: "containerHeight" }] : []));
25
+ // --- Internal state ---
26
+ this.scrollTop = signal(0, ...(ngDevMode ? [{ debugName: "scrollTop" }] : []));
27
+ this.scrollLeft = signal(0, ...(ngDevMode ? [{ debugName: "scrollLeft" }] : []));
28
+ // --- Column virtualization inputs ---
29
+ this.columnWidths = signal([], ...(ngDevMode ? [{ debugName: "columnWidths" }] : []));
30
+ this.containerWidth = signal(0, ...(ngDevMode ? [{ debugName: "containerWidth" }] : []));
31
+ // Scrollable container reference for programmatic scrolling
32
+ this.containerEl = null;
33
+ // --- Derived computed signals ---
34
+ this.rowHeight = computed(() => this.config().rowHeight ?? 36, ...(ngDevMode ? [{ debugName: "rowHeight" }] : []));
35
+ this.overscan = computed(() => this.config().overscan ?? 5, ...(ngDevMode ? [{ debugName: "overscan" }] : []));
36
+ this.enabled = computed(() => this.config().enabled !== false, ...(ngDevMode ? [{ debugName: "enabled" }] : []));
37
+ this.threshold = computed(() => this.config().threshold ?? DEFAULT_PASSTHROUGH_THRESHOLD, ...(ngDevMode ? [{ debugName: "threshold" }] : []));
38
+ /** Whether virtual scrolling is actually active (enabled + enough rows). */
39
+ this.isActive = computed(() => this.enabled() && this.totalRows() >= this.threshold(), ...(ngDevMode ? [{ debugName: "isActive" }] : []));
40
+ /** The visible range of rows with spacer offsets. */
41
+ this.visibleRange = computed(() => {
42
+ if (!this.isActive()) {
43
+ // Passthrough: render all rows
44
+ return {
45
+ startIndex: 0,
46
+ endIndex: Math.max(0, this.totalRows() - 1),
47
+ offsetTop: 0,
48
+ offsetBottom: 0,
49
+ };
50
+ }
51
+ return computeVisibleRange(this.scrollTop(), this.rowHeight(), this.containerHeight(), this.totalRows(), this.overscan());
52
+ }, ...(ngDevMode ? [{ debugName: "visibleRange" }] : []));
53
+ /** Total scrollable height in pixels. */
54
+ this.totalHeight = computed(() => computeTotalHeight(this.totalRows(), this.rowHeight()), ...(ngDevMode ? [{ debugName: "totalHeight" }] : []));
55
+ // --- Column virtualization ---
56
+ this.columnsEnabled = computed(() => this.config().columns === true, ...(ngDevMode ? [{ debugName: "columnsEnabled" }] : []));
57
+ this.columnOverscan = computed(() => this.config().columnOverscan ?? 2, ...(ngDevMode ? [{ debugName: "columnOverscan" }] : []));
58
+ /** The visible column range with spacer widths, or null when column virtualization is off. */
59
+ this.columnRange = computed(() => {
60
+ if (!this.columnsEnabled())
61
+ return null;
62
+ const widths = this.columnWidths();
63
+ if (widths.length === 0)
64
+ return null;
65
+ return computeVisibleColumnRange(this.scrollLeft(), widths, this.containerWidth(), this.columnOverscan());
66
+ }, ...(ngDevMode ? [{ debugName: "columnRange" }] : []));
67
+ this.destroyRef.onDestroy(() => {
68
+ this.containerEl = null;
69
+ });
70
+ }
71
+ /**
72
+ * Set the scrollable container element.
73
+ * Used for programmatic scrolling (scrollToRow).
74
+ */
75
+ setContainer(el) {
76
+ this.containerEl = el;
77
+ }
78
+ /**
79
+ * Call this from the container's scroll event handler.
80
+ * Tracks both vertical and horizontal scroll positions.
81
+ */
82
+ onScroll(event) {
83
+ const target = event.target;
84
+ this.scrollTop.set(target.scrollTop);
85
+ this.scrollLeft.set(target.scrollLeft);
86
+ }
87
+ /**
88
+ * Scroll to a specific row index.
89
+ * @param index - The row index to scroll to.
90
+ * @param align - Where to position the row: 'start' (top), 'center', or 'end' (bottom). Default: 'start'.
91
+ */
92
+ scrollToRow(index, align = 'start') {
93
+ const container = this.containerEl;
94
+ if (!container)
95
+ return;
96
+ const targetScrollTop = getScrollTopForRow(index, this.rowHeight(), this.containerHeight(), align);
97
+ container.scrollTo({ top: targetScrollTop, behavior: 'auto' });
98
+ }
99
+ /**
100
+ * Update the virtual scroll configuration.
101
+ */
102
+ updateConfig(updates) {
103
+ this.config.update((prev) => {
104
+ const next = { ...prev, ...updates };
105
+ validateVirtualScrollConfig(next);
106
+ return next;
107
+ });
108
+ }
109
+ static { this.ɵfac = function VirtualScrollService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || VirtualScrollService)(); }; }
110
+ static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: VirtualScrollService, factory: VirtualScrollService.ɵfac }); }
111
+ }
112
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(VirtualScrollService, [{
113
+ type: Injectable
114
+ }], () => [], null); })();
@@ -0,0 +1,112 @@
1
+ /**
2
+ * Shared OGrid CSS theme variables (light + dark mode).
3
+ * Used by all Angular UI packages (Material, PrimeNG, Radix) to avoid duplication.
4
+ *
5
+ * Uses :where() selectors for ZERO specificity - consumer overrides always win.
6
+ * Dark mode: auto via prefers-color-scheme, explicit via [data-theme="dark"].
7
+ */
8
+ export const OGRID_THEME_VARS_CSS = `
9
+ /* ─── OGrid Light Theme (default) ─── */
10
+ :where(:root) {
11
+ --ogrid-bg: #ffffff;
12
+ --ogrid-fg: rgba(0, 0, 0, 0.87);
13
+ --ogrid-fg-secondary: rgba(0, 0, 0, 0.6);
14
+ --ogrid-fg-muted: rgba(0, 0, 0, 0.5);
15
+ --ogrid-border: rgba(0, 0, 0, 0.12);
16
+ --ogrid-border-strong: rgba(0, 0, 0, 0.5);
17
+ --ogrid-border-hover: rgba(0, 0, 0, 0.3);
18
+ --ogrid-header-bg: #f5f5f5;
19
+ --ogrid-hover-bg: rgba(0, 0, 0, 0.04);
20
+ --ogrid-selected-row-bg: #e6f0fb;
21
+ --ogrid-bg-selected-hover: #dae8f8;
22
+ --ogrid-active-cell-bg: rgba(0, 0, 0, 0.02);
23
+ --ogrid-range-bg: rgba(33, 115, 70, 0.12);
24
+ --ogrid-accent: #0078d4;
25
+ --ogrid-accent-dark: #005a9e;
26
+ --ogrid-selection-color: #217346;
27
+ --ogrid-primary: #0078d4;
28
+ --ogrid-primary-fg: #fff;
29
+ --ogrid-primary-hover: #106ebe;
30
+ --ogrid-bg-subtle: #f5f5f5;
31
+ --ogrid-bg-hover: rgba(0, 0, 0, 0.04);
32
+ --ogrid-active-bg: rgba(0, 0, 0, 0.06);
33
+ --ogrid-muted: rgba(0, 0, 0, 0.5);
34
+ --ogrid-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
35
+ --ogrid-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
36
+ --ogrid-pinned-shadow: rgba(0, 0, 0, 0.1);
37
+ --ogrid-loading-overlay: rgba(255, 255, 255, 0.7);
38
+ --ogrid-selection: #217346;
39
+ --ogrid-bg-range: rgba(33, 115, 70, 0.12);
40
+ --ogrid-bg-selected: #e6f0fb;
41
+ --ogrid-loading-bg: rgba(255, 255, 255, 0.7);
42
+ }
43
+ /* ─── Auto Dark (system preference) ─── */
44
+ @media (prefers-color-scheme: dark) {
45
+ :where(:root:not([data-theme="light"])) {
46
+ --ogrid-bg: #1e1e1e;
47
+ --ogrid-fg: rgba(255, 255, 255, 0.87);
48
+ --ogrid-fg-secondary: rgba(255, 255, 255, 0.6);
49
+ --ogrid-fg-muted: rgba(255, 255, 255, 0.5);
50
+ --ogrid-border: rgba(255, 255, 255, 0.12);
51
+ --ogrid-border-strong: rgba(255, 255, 255, 0.5);
52
+ --ogrid-border-hover: rgba(255, 255, 255, 0.3);
53
+ --ogrid-header-bg: #2c2c2c;
54
+ --ogrid-hover-bg: rgba(255, 255, 255, 0.08);
55
+ --ogrid-selected-row-bg: #1a3a5c;
56
+ --ogrid-bg-selected-hover: #1f3650;
57
+ --ogrid-active-cell-bg: rgba(255, 255, 255, 0.06);
58
+ --ogrid-range-bg: rgba(46, 160, 67, 0.15);
59
+ --ogrid-accent: #4da6ff;
60
+ --ogrid-accent-dark: #3390e0;
61
+ --ogrid-selection-color: #2ea043;
62
+ --ogrid-primary: #4da6ff;
63
+ --ogrid-primary-fg: #fff;
64
+ --ogrid-primary-hover: #66b3ff;
65
+ --ogrid-bg-subtle: rgba(255, 255, 255, 0.04);
66
+ --ogrid-bg-hover: rgba(255, 255, 255, 0.08);
67
+ --ogrid-active-bg: rgba(255, 255, 255, 0.08);
68
+ --ogrid-muted: rgba(255, 255, 255, 0.5);
69
+ --ogrid-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
70
+ --ogrid-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.25);
71
+ --ogrid-pinned-shadow: rgba(0, 0, 0, 0.3);
72
+ --ogrid-loading-overlay: rgba(0, 0, 0, 0.7);
73
+ --ogrid-selection: #2ea043;
74
+ --ogrid-bg-range: rgba(46, 160, 67, 0.15);
75
+ --ogrid-bg-selected: #1a3a5c;
76
+ --ogrid-loading-bg: rgba(0, 0, 0, 0.7);
77
+ }
78
+ }
79
+ /* ─── Explicit Dark ─── */
80
+ :where([data-theme="dark"]) {
81
+ --ogrid-bg: #1e1e1e;
82
+ --ogrid-fg: rgba(255, 255, 255, 0.87);
83
+ --ogrid-fg-secondary: rgba(255, 255, 255, 0.6);
84
+ --ogrid-fg-muted: rgba(255, 255, 255, 0.5);
85
+ --ogrid-border: rgba(255, 255, 255, 0.12);
86
+ --ogrid-border-strong: rgba(255, 255, 255, 0.5);
87
+ --ogrid-border-hover: rgba(255, 255, 255, 0.3);
88
+ --ogrid-header-bg: #2c2c2c;
89
+ --ogrid-hover-bg: rgba(255, 255, 255, 0.08);
90
+ --ogrid-selected-row-bg: #1a3a5c;
91
+ --ogrid-bg-selected-hover: #1f3650;
92
+ --ogrid-active-cell-bg: rgba(255, 255, 255, 0.06);
93
+ --ogrid-range-bg: rgba(46, 160, 67, 0.15);
94
+ --ogrid-accent: #4da6ff;
95
+ --ogrid-accent-dark: #3390e0;
96
+ --ogrid-selection-color: #2ea043;
97
+ --ogrid-primary: #4da6ff;
98
+ --ogrid-primary-fg: #fff;
99
+ --ogrid-primary-hover: #66b3ff;
100
+ --ogrid-bg-subtle: rgba(255, 255, 255, 0.04);
101
+ --ogrid-bg-hover: rgba(255, 255, 255, 0.08);
102
+ --ogrid-active-bg: rgba(255, 255, 255, 0.08);
103
+ --ogrid-muted: rgba(255, 255, 255, 0.5);
104
+ --ogrid-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
105
+ --ogrid-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.25);
106
+ --ogrid-pinned-shadow: rgba(0, 0, 0, 0.3);
107
+ --ogrid-loading-overlay: rgba(0, 0, 0, 0.7);
108
+ --ogrid-selection: #2ea043;
109
+ --ogrid-bg-range: rgba(46, 160, 67, 0.15);
110
+ --ogrid-bg-selected: #1a3a5c;
111
+ --ogrid-loading-bg: rgba(0, 0, 0, 0.7);
112
+ }`;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export { toUserLike, isInSelectionRange, normalizeSelectionRange } from '@alaarab/ogrid-core';
@@ -0,0 +1 @@
1
+ export { toUserLike, isInSelectionRange, normalizeSelectionRange } from './dataGridTypes';
@@ -0,0 +1,6 @@
1
+ /**
2
+ * View model helpers for Angular DataGridTable.
3
+ * Pure functions live in @alaarab/ogrid-core. This file re-exports them.
4
+ */
5
+ // Re-export everything from core's dataGridViewModel
6
+ export { getHeaderFilterConfig, getCellRenderDescriptor, resolveCellDisplayContent, resolveCellStyle, buildInlineEditorProps, buildPopoverEditorProps, } from '@alaarab/ogrid-core';
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Debounce utilities for Angular using signals.
3
+ * Provides functional parity with React's useDebounce and useDebouncedCallback.
4
+ */
5
+ import { signal, effect } from '@angular/core';
6
+ /**
7
+ * Creates a debounced signal that updates after the specified delay when the source value changes.
8
+ *
9
+ * @param source - The signal to debounce
10
+ * @param delayMs - Delay in milliseconds
11
+ * @returns A signal containing the debounced value
12
+ *
13
+ * @example
14
+ * ```typescript
15
+ * const searchQuery = signal('');
16
+ * const debouncedQuery = createDebouncedSignal(searchQuery, 300);
17
+ *
18
+ * effect(() => {
19
+ * console.log('Debounced search:', debouncedQuery());
20
+ * });
21
+ * ```
22
+ */
23
+ export function createDebouncedSignal(source, delayMs) {
24
+ const debouncedValue = signal(source(), ...(ngDevMode ? [{ debugName: "debouncedValue" }] : []));
25
+ effect((onCleanup) => {
26
+ const currentValue = source();
27
+ const timeoutId = setTimeout(() => {
28
+ debouncedValue.set(currentValue);
29
+ }, delayMs);
30
+ onCleanup(() => clearTimeout(timeoutId));
31
+ });
32
+ return debouncedValue;
33
+ }
34
+ /**
35
+ * Creates a debounced function that delays invoking the provided function
36
+ * until after `delayMs` milliseconds have elapsed since the last time it was invoked.
37
+ *
38
+ * @param fn - The function to debounce
39
+ * @param delayMs - Delay in milliseconds
40
+ * @returns A debounced version of the function
41
+ *
42
+ * @example
43
+ * ```typescript
44
+ * const saveData = (value: string) => {
45
+ * console.log('Saving:', value);
46
+ * };
47
+ *
48
+ * const debouncedSave = createDebouncedCallback(saveData, 500);
49
+ *
50
+ * // Multiple rapid calls will only trigger once after 500ms
51
+ * debouncedSave('hello');
52
+ * debouncedSave('world'); // Only this will execute after 500ms
53
+ * ```
54
+ */
55
+ export function createDebouncedCallback(fn, delayMs) {
56
+ let timeoutId = null;
57
+ return ((...args) => {
58
+ if (timeoutId !== null) {
59
+ clearTimeout(timeoutId);
60
+ }
61
+ timeoutId = setTimeout(() => {
62
+ fn(...args);
63
+ timeoutId = null;
64
+ }, delayMs);
65
+ });
66
+ }
67
+ // Re-export simple debounce from core
68
+ export { debounce } from '@alaarab/ogrid-core';
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Shared utilities for Angular DataGridTable view layer.
3
+ */
4
+ export { getHeaderFilterConfig, getCellRenderDescriptor, resolveCellDisplayContent, resolveCellStyle, buildInlineEditorProps, buildPopoverEditorProps, } from './dataGridViewModel';
5
+ // Debounce utilities
6
+ export { createDebouncedSignal, createDebouncedCallback, debounce, } from './debounce';
7
+ // Latest ref utilities
8
+ export { createLatestCallback, } from './latestRef';
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Latest ref utility for Angular using signals.
3
+ * Provides functional parity with React's useLatestRef.
4
+ */
5
+ /**
6
+ * Creates a stable wrapper function that always calls the latest version of the provided function.
7
+ * Useful for event handlers and callbacks where you want a stable reference but need to call
8
+ * the latest implementation.
9
+ *
10
+ * @param fn - Signal containing the function to wrap
11
+ * @returns A stable function that always invokes the latest version
12
+ *
13
+ * @example
14
+ * ```typescript
15
+ * class MyService {
16
+ * readonly onSave = signal<(value: string) => void>((val) => console.log('Default:', val));
17
+ * readonly stableOnSave = createLatestCallback(this.onSave);
18
+ *
19
+ * constructor() {
20
+ * // Setup event listener with stable reference
21
+ * effect((onCleanup) => {
22
+ * // stableOnSave never changes, so this effect only runs once
23
+ * const callback = () => this.stableOnSave('data');
24
+ * window.addEventListener('click', callback);
25
+ * onCleanup(() => window.removeEventListener('click', callback));
26
+ * });
27
+ * }
28
+ *
29
+ * updateHandler(newFn: (value: string) => void) {
30
+ * // Even though we change the function, the callback reference stays stable
31
+ * this.onSave.set(newFn);
32
+ * }
33
+ * }
34
+ * ```
35
+ */
36
+ export function createLatestCallback(fn) {
37
+ // Return a stable function that always calls the current value of the signal
38
+ return ((...args) => {
39
+ return fn()(...args);
40
+ });
41
+ }
@@ -1,5 +1,6 @@
1
1
  import { EventEmitter } from '@angular/core';
2
2
  import type { IColumnDefinition } from '../types';
3
+ import * as i0 from "@angular/core";
3
4
  export interface IColumnChooserProps {
4
5
  columns: IColumnDefinition[];
5
6
  visibleColumns: Set<string>;
@@ -34,4 +35,6 @@ export declare abstract class BaseColumnChooserComponent {
34
35
  clearAll(): void;
35
36
  onClearAll(): void;
36
37
  onSelectAll(): void;
38
+ static ɵfac: i0.ɵɵFactoryDeclaration<BaseColumnChooserComponent, never>;
39
+ static ɵdir: i0.ɵɵDirectiveDeclaration<BaseColumnChooserComponent, never, never, { "columns": { "alias": "columns"; "required": true; }; "visibleColumns": { "alias": "visibleColumns"; "required": true; }; }, { "visibilityChange": "visibilityChange"; }, never, never, true, never>;
37
40
  }
@@ -1,5 +1,6 @@
1
1
  import { ElementRef } from '@angular/core';
2
2
  import type { ColumnFilterType, IDateFilterValue, UserLike } from '../types';
3
+ import * as i0 from "@angular/core";
3
4
  export interface IColumnHeaderFilterProps {
4
5
  columnKey: string;
5
6
  columnName: string;
@@ -89,4 +90,6 @@ export declare abstract class BaseColumnHeaderFilterComponent {
89
90
  /** Clean up debounce timer on destroy. */
90
91
  ngOnDestroy(): void;
91
92
  onDocumentClick(event: MouseEvent, selectorName: string): void;
93
+ static ɵfac: i0.ɵɵFactoryDeclaration<BaseColumnHeaderFilterComponent, never>;
94
+ static ɵdir: i0.ɵɵDirectiveDeclaration<BaseColumnHeaderFilterComponent, never, never, { "columnKey": { "alias": "columnKey"; "required": true; }; "columnName": { "alias": "columnName"; "required": true; }; "filterType": { "alias": "filterType"; "required": true; }; "selectedValues": { "alias": "selectedValues"; "required": false; }; "options": { "alias": "options"; "required": false; }; "textValue": { "alias": "textValue"; "required": false; }; "selectedUser": { "alias": "selectedUser"; "required": false; }; "dateValue": { "alias": "dateValue"; "required": false; }; "isSorted": { "alias": "isSorted"; "required": false; }; "isSortedDescending": { "alias": "isSortedDescending"; "required": false; }; "onSort": { "alias": "onSort"; "required": false; }; "onFilterChange": { "alias": "onFilterChange"; "required": false; }; "isLoadingOptions": { "alias": "isLoadingOptions"; "required": false; }; "onTextChange": { "alias": "onTextChange"; "required": false; }; "onUserChange": { "alias": "onUserChange"; "required": false; }; "peopleSearch": { "alias": "peopleSearch"; "required": false; }; "onDateChange": { "alias": "onDateChange"; "required": false; }; }, {}, never, never, true, never>;
92
95
  }
@@ -1,4 +1,5 @@
1
1
  import { type IColumnHeaderMenuItem, type ColumnHeaderMenuHandlers } from '@alaarab/ogrid-core';
2
+ import * as i0 from "@angular/core";
2
3
  /**
3
4
  * Abstract base class containing all shared TypeScript logic for ColumnHeaderMenu components.
4
5
  * Framework-specific UI packages extend this with their templates and style overrides.
@@ -27,4 +28,6 @@ export declare abstract class BaseColumnHeaderMenuComponent {
27
28
  handlers: Partial<ColumnHeaderMenuHandlers>;
28
29
  readonly menuItems: import("@angular/core").Signal<IColumnHeaderMenuItem[]>;
29
30
  handleMenuItemClick(itemId: string): void;
31
+ static ɵfac: i0.ɵɵFactoryDeclaration<BaseColumnHeaderMenuComponent, never>;
32
+ static ɵdir: i0.ɵɵDirectiveDeclaration<BaseColumnHeaderMenuComponent, never, never, { "columnId": { "alias": "columnId"; "required": true; }; "canPinLeft": { "alias": "canPinLeft"; "required": false; }; "canPinRight": { "alias": "canPinRight"; "required": false; }; "canUnpin": { "alias": "canUnpin"; "required": false; }; "currentSort": { "alias": "currentSort"; "required": false; }; "isSortable": { "alias": "isSortable"; "required": false; }; "isResizable": { "alias": "isResizable"; "required": false; }; "handlers": { "alias": "handlers"; "required": false; }; }, {}, never, never, true, never>;
30
33
  }
@@ -4,6 +4,7 @@ import { ColumnReorderService } from '../services/column-reorder.service';
4
4
  import { VirtualScrollService } from '../services/virtual-scroll.service';
5
5
  import type { IOGridDataGridProps, IColumnDef, RowId } from '../types';
6
6
  import type { HeaderFilterConfig, CellRenderDescriptor } from '../utils';
7
+ import * as i0 from "@angular/core";
7
8
  /**
8
9
  * Abstract base class containing all shared TypeScript logic for DataGridTable components.
9
10
  * Framework-specific UI packages extend this with their templates and style overrides.
@@ -311,4 +312,6 @@ export declare abstract class BaseDataGridTableComponent<T = unknown> {
311
312
  getSortState(columnId: string): 'asc' | 'desc' | null;
312
313
  onAutosizeColumn(columnId: string): void;
313
314
  onAutosizeAllColumns(): void;
315
+ static ɵfac: i0.ɵɵFactoryDeclaration<BaseDataGridTableComponent<any>, never>;
316
+ static ɵdir: i0.ɵɵDirectiveDeclaration<BaseDataGridTableComponent<any>, never, never, {}, {}, never, never, true, never>;
314
317
  }
@@ -1,5 +1,6 @@
1
1
  import { EventEmitter, ElementRef } from '@angular/core';
2
2
  import type { IColumnDef } from '@alaarab/ogrid-core';
3
+ import * as i0 from "@angular/core";
3
4
  /**
4
5
  * Abstract base class for Angular inline cell editors.
5
6
  * Contains all shared signals, lifecycle hooks, keyboard handlers,
@@ -27,6 +28,7 @@ export declare abstract class BaseInlineCellEditorComponent<T = unknown> {
27
28
  readonly selectOptions: import("@angular/core").WritableSignal<unknown[]>;
28
29
  readonly searchText: import("@angular/core").WritableSignal<string>;
29
30
  private scrollCleanup;
31
+ private suppressNextBlur;
30
32
  readonly filteredOptions: import("@angular/core").Signal<unknown[]>;
31
33
  private _initialized;
32
34
  ngOnInit(): void;
@@ -39,6 +41,9 @@ export declare abstract class BaseInlineCellEditorComponent<T = unknown> {
39
41
  * (e.g. focus-triggered scroll, layout-shift scroll from DOM changes). */
40
42
  private attachScrollClose;
41
43
  commitValue(value: unknown): void;
44
+ private commitAndSuppressBlur;
45
+ private cancelAndSuppressBlur;
46
+ private shouldSkipBlur;
42
47
  onTextKeyDown(e: KeyboardEvent): void;
43
48
  private commitDateOrValue;
44
49
  getDateFormat(): string;
@@ -55,4 +60,6 @@ export declare abstract class BaseInlineCellEditorComponent<T = unknown> {
55
60
  protected positionFixedDropdown(wrapperRef: ElementRef<HTMLDivElement> | undefined, dropdownRef: ElementRef<HTMLDivElement> | undefined): void;
56
61
  /** Scroll the highlighted option into view within a dropdown element. */
57
62
  protected scrollOptionIntoView(dropdownRef: ElementRef<HTMLDivElement> | undefined): void;
63
+ static ɵfac: i0.ɵɵFactoryDeclaration<BaseInlineCellEditorComponent<any>, never>;
64
+ static ɵdir: i0.ɵɵDirectiveDeclaration<BaseInlineCellEditorComponent<any>, never, never, { "value": { "alias": "value"; "required": true; }; "item": { "alias": "item"; "required": true; }; "column": { "alias": "column"; "required": true; }; "rowIndex": { "alias": "rowIndex"; "required": true; }; "editorType": { "alias": "editorType"; "required": true; }; }, { "commit": "commit"; "cancel": "cancel"; }, never, never, true, never>;
58
65
  }
@@ -1,5 +1,6 @@
1
1
  import { OGridService } from '../services/ogrid.service';
2
2
  import type { IOGridProps } from '../types';
3
+ import * as i0 from "@angular/core";
3
4
  export declare abstract class BaseOGridComponent<T> {
4
5
  private readonly propsSignal;
5
6
  readonly ogridService: OGridService<T>;
@@ -7,4 +8,6 @@ export declare abstract class BaseOGridComponent<T> {
7
8
  constructor();
8
9
  get showToolbar(): boolean;
9
10
  onPageSizeChange(size: number): void;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<BaseOGridComponent<any>, never>;
12
+ static ɵdir: i0.ɵɵDirectiveDeclaration<BaseOGridComponent<any>, never, never, { "props": { "alias": "props"; "required": true; }; }, {}, never, never, true, never>;
10
13
  }
@@ -1,4 +1,5 @@
1
1
  import { EventEmitter } from '@angular/core';
2
+ import * as i0 from "@angular/core";
2
3
  /**
3
4
  * Abstract base class containing all shared TypeScript logic for PaginationControls components.
4
5
  * Framework-specific UI packages extend this with their templates and style overrides.
@@ -31,4 +32,6 @@ export declare abstract class BasePaginationControlsComponent {
31
32
  readonly vm: import("@angular/core").Signal<import("@alaarab/ogrid-core").PaginationViewModel | null>;
32
33
  onPageSizeSelect(event: Event): void;
33
34
  onPageSizeChange(value: string): void;
35
+ static ɵfac: i0.ɵɵFactoryDeclaration<BasePaginationControlsComponent, never>;
36
+ static ɵdir: i0.ɵɵDirectiveDeclaration<BasePaginationControlsComponent, never, never, { "currentPage": { "alias": "currentPage"; "required": true; }; "pageSize": { "alias": "pageSize"; "required": true; }; "totalCount": { "alias": "totalCount"; "required": true; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; }; "entityLabelPlural": { "alias": "entityLabelPlural"; "required": false; }; }, { "pageChange": "pageChange"; "pageSizeChange": "pageSizeChange"; }, never, never, true, never>;
34
37
  }
@@ -1,4 +1,5 @@
1
1
  import type { IColumnDef, ICellEditorProps } from '../types';
2
+ import * as i0 from "@angular/core";
2
3
  /**
3
4
  * Shared popover cell editor template used by all Angular UI packages.
4
5
  */
@@ -30,4 +31,6 @@ export declare abstract class BasePopoverCellEditorComponent<T = unknown> {
30
31
  protected readonly showEditor: import("@angular/core").WritableSignal<boolean>;
31
32
  constructor();
32
33
  protected handleOverlayClick(): void;
34
+ static ɵfac: i0.ɵɵFactoryDeclaration<BasePopoverCellEditorComponent<any>, never>;
35
+ static ɵdir: i0.ɵɵDirectiveDeclaration<BasePopoverCellEditorComponent<any>, never, never, { "item": { "alias": "item"; "required": true; }; "column": { "alias": "column"; "required": true; }; "rowIndex": { "alias": "rowIndex"; "required": true; }; "globalColIndex": { "alias": "globalColIndex"; "required": true; }; "displayValue": { "alias": "displayValue"; "required": true; }; "editorProps": { "alias": "editorProps"; "required": true; }; "onCancel": { "alias": "onCancel"; "required": true; }; }, {}, never, never, true, never>;
33
36
  }
@@ -1,7 +1,10 @@
1
1
  import { EventEmitter } from '@angular/core';
2
+ import * as i0 from "@angular/core";
2
3
  export declare class EmptyStateComponent {
3
4
  message: string | undefined;
4
5
  hasActiveFilters: boolean;
5
6
  render: unknown;
6
7
  clearAll: EventEmitter<void>;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<EmptyStateComponent, never>;
9
+ static ɵcmp: i0.ɵɵComponentDeclaration<EmptyStateComponent, "ogrid-empty-state", never, { "message": { "alias": "message"; "required": false; }; "hasActiveFilters": { "alias": "hasActiveFilters"; "required": false; }; "render": { "alias": "render"; "required": false; }; }, { "clearAll": "clearAll"; }, never, never, true, never>;
7
10
  }
@@ -1,11 +1,4 @@
1
- /**
2
- * FormulaBarComponent -- Standalone Angular formula bar component.
3
- *
4
- * Layout: [Name Box] [fx] [Formula Input]
5
- *
6
- * Uses --ogrid-* CSS variables for theming.
7
- * Port of React's FormulaBar component.
8
- */
1
+ import * as i0 from "@angular/core";
9
2
  export declare class FormulaBarComponent {
10
3
  /** Active cell reference (e.g. "A1"). */
11
4
  readonly cellRef: import("@angular/core").InputSignal<string | null>;
@@ -26,4 +19,6 @@ export declare class FormulaBarComponent {
26
19
  onInput(event: Event): void;
27
20
  onKeyDown(event: KeyboardEvent): void;
28
21
  onClick(): void;
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormulaBarComponent, never>;
23
+ static ɵcmp: i0.ɵɵComponentDeclaration<FormulaBarComponent, "ogrid-formula-bar", never, { "cellRef": { "alias": "cellRef"; "required": false; "isSignal": true; }; "formulaText": { "alias": "formulaText"; "required": false; "isSignal": true; }; "isEditing": { "alias": "isEditing"; "required": false; "isSignal": true; }; }, { "inputChange": "inputChange"; "commit": "commit"; "cancel": "cancel"; "startEditing": "startEditing"; }, never, never, true, never>;
29
24
  }
@@ -1,10 +1,5 @@
1
- /**
2
- * FormulaRefOverlayComponent -- Renders colored border overlays on cells
3
- * referenced by the active formula, like Excel's reference highlighting.
4
- *
5
- * Port of React's FormulaRefOverlay component.
6
- */
7
1
  import { type FormulaReference } from '@alaarab/ogrid-core/formula';
2
+ import * as i0 from "@angular/core";
8
3
  interface RefRect {
9
4
  top: number;
10
5
  left: number;
@@ -23,5 +18,7 @@ export declare class FormulaRefOverlayComponent {
23
18
  private rafId;
24
19
  constructor();
25
20
  max0(v: number): number;
21
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormulaRefOverlayComponent, never>;
22
+ static ɵcmp: i0.ɵɵComponentDeclaration<FormulaRefOverlayComponent, "ogrid-formula-ref-overlay", never, { "containerEl": { "alias": "containerEl"; "required": false; "isSignal": true; }; "references": { "alias": "references"; "required": false; "isSignal": true; }; "colOffset": { "alias": "colOffset"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
26
23
  }
27
24
  export {};
@@ -1,5 +1,6 @@
1
1
  import { EventEmitter, ElementRef } from '@angular/core';
2
2
  import { GRID_CONTEXT_MENU_ITEMS, formatShortcut } from '@alaarab/ogrid-core';
3
+ import * as i0 from "@angular/core";
3
4
  export declare class GridContextMenuComponent {
4
5
  private destroyRef;
5
6
  x: number;
@@ -29,4 +30,6 @@ export declare class GridContextMenuComponent {
29
30
  constructor();
30
31
  isDisabled(item: (typeof GRID_CONTEXT_MENU_ITEMS)[number]): boolean;
31
32
  onItemClick(id: string): void;
33
+ static ɵfac: i0.ɵɵFactoryDeclaration<GridContextMenuComponent, never>;
34
+ static ɵcmp: i0.ɵɵComponentDeclaration<GridContextMenuComponent, "ogrid-context-menu", never, { "x": { "alias": "x"; "required": true; }; "y": { "alias": "y"; "required": true; }; "hasSelection": { "alias": "hasSelection"; "required": false; }; "canUndoProp": { "alias": "canUndoProp"; "required": false; }; "canRedoProp": { "alias": "canRedoProp"; "required": false; }; "classNames": { "alias": "classNames"; "required": false; }; }, { "copyAction": "copyAction"; "cutAction": "cutAction"; "pasteAction": "pasteAction"; "selectAllAction": "selectAllAction"; "undoAction": "undoAction"; "redoAction": "redoAction"; "closeAction": "closeAction"; }, never, never, true, never>;
32
35
  }
@@ -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
  }