@alaarab/ogrid-angular-primeng 2.6.0 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/index.js CHANGED
@@ -1,1174 +1,16 @@
1
- import {INLINE_CELL_EDITOR_STYLES,INLINE_CELL_EDITOR_TEMPLATE,POPOVER_CELL_EDITOR_OVERLAY_STYLES,POPOVER_CELL_EDITOR_TEMPLATE,OGRID_THEME_VARS_CSS,DataGridStateService,ColumnReorderService,VirtualScrollService,StatusBarComponent,GridContextMenuComponent,MarchingAntsOverlayComponent,EmptyStateComponent,FormulaRefOverlayComponent,OGridService,OGridLayoutComponent,BaseColumnHeaderFilterComponent,BaseColumnHeaderMenuComponent,BaseInlineCellEditorComponent,BasePopoverCellEditorComponent,BaseDataGridTableComponent,DEFAULT_MIN_COLUMN_WIDTH,formatCellReference,ROW_NUMBER_COLUMN_ID,indexToColumnLetter,BaseColumnChooserComponent,BasePaginationControlsComponent,ROW_NUMBER_COLUMN_MIN_WIDTH}from'@alaarab/ogrid-angular';export{AUTOSIZE_EXTRA_PX,AUTOSIZE_MAX_PX,BaseColumnChooserComponent,BaseColumnHeaderFilterComponent,BaseDataGridTableComponent,BaseInlineCellEditorComponent,BaseOGridComponent,BasePaginationControlsComponent,BasePopoverCellEditorComponent,CELL_PADDING,CHECKBOX_COLUMN_WIDTH,COLUMN_HEADER_MENU_ITEMS,ColumnReorderService,DEFAULT_DEBOUNCE_MS,DEFAULT_MIN_COLUMN_WIDTH,DataGridEditingHelper,DataGridInteractionHelper,DataGridLayoutHelper,DataGridStateService,EmptyStateComponent,GRID_BORDER_RADIUS,GRID_CONTEXT_MENU_ITEMS,GridContextMenuComponent,INLINE_CELL_EDITOR_STYLES,INLINE_CELL_EDITOR_TEMPLATE,MAX_PAGE_BUTTONS,MarchingAntsOverlayComponent,OGRID_THEME_VARS_CSS,OGridLayoutComponent,OGridService,PAGE_SIZE_OPTIONS,PEOPLE_SEARCH_DEBOUNCE_MS,POPOVER_CELL_EDITOR_OVERLAY_STYLES,POPOVER_CELL_EDITOR_TEMPLATE,ROW_NUMBER_COLUMN_WIDTH,SIDEBAR_TRANSITION_MS,SideBarComponent,StatusBarComponent,UndoRedoStack,VirtualScrollService,Z_INDEX,applyCellDeletion,applyCutClear,applyFillValues,applyPastedValues,applyRangeRowSelection,areGridRowPropsEqual,booleanParser,buildCsvHeader,buildCsvRows,buildHeaderRows,buildInlineEditorProps,buildPopoverEditorProps,calculateDropTarget,clampSelectionToBounds,computeAggregations,computeArrowNavigation,computeAutoScrollSpeed,computeNextSortState,computeRowSelectionState,computeTabNavigation,computeTotalHeight,computeVisibleRange,createDebouncedCallback,createDebouncedSignal,createLatestCallback,currencyParser,dateParser,debounce,deriveFilterOptionsFromData,emailParser,escapeCsvValue,exportToCsv,findCtrlArrowTarget,flattenColumns,formatCellValueForTsv,formatSelectionAsTsv,formatShortcut,getCellRenderDescriptor,getCellValue,getColumnHeaderMenuItems,getContextMenuHandlers,getDataGridStatusBarConfig,getFilterField,getHeaderFilterConfig,getMultiSelectFilterFields,getPaginationViewModel,getPinStateForColumn,getScrollTopForRow,getStatusBarParts,injectGlobalStyles,isFilterConfig,isInSelectionRange,isRowInRange,measureColumnContentWidth,measureRange,mergeFilter,normalizeSelectionRange,numberParser,parseTsvClipboard,parseValue,processClientSideData,rangesEqual,reorderColumnArray,resolveCellDisplayContent,resolveCellStyle,toUserLike,triggerCsvDownload,validateColumns,validateRowIds}from'@alaarab/ogrid-angular';import {ViewChild,Component,ChangeDetectionStrategy,Input,ViewEncapsulation,inject,DestroyRef,effect,computed,signal}from'@angular/core';import {ButtonModule}from'primeng/button';import {MenuModule}from'primeng/menu';var E=Object.defineProperty;var O=Object.getOwnPropertyDescriptor;var e=(d,l,o,r)=>{for(var n=r>1?void 0:r?O(l,o):l,a=d.length-1,s;a>=0;a--)(s=d[a])&&(n=(r?s(l,o,n):s(n))||n);return r&&n&&E(l,o,n),n};var p=class extends BaseColumnHeaderFilterComponent{constructor(){super();this.destroyRef=inject(DestroyRef);this.clickOutsideHandler=o=>{let r=this.filterTrigger?.nativeElement,n=this.filterPanel?.nativeElement;r&&!r.contains(o.target)&&(!n||!n.contains(o.target))&&this.isFilterOpen.set(false);};effect(()=>{if(this.isFilterOpen()){this.tempTextValue.set(this.textValue??""),this.searchText.set("");let o=this.selectedValues;this.tempSelected.set(new Set(o??[]));let r=this.dateValue;this.tempDateFrom.set(r?.from??""),this.tempDateTo.set(r?.to??""),document.addEventListener("mousedown",this.clickOutsideHandler,true);}else document.removeEventListener("mousedown",this.clickOutsideHandler,true);}),this.destroyRef.onDestroy(()=>{document.removeEventListener("mousedown",this.clickOutsideHandler,true);});}getHeaderEl(){return this.filterTrigger}handleSortClick(){this.onSort?.();}toggleFilter(){this.isFilterOpen.update(o=>!o);}handleSelectAllOptions(){this.handleSelectAllFiltered();}};e([ViewChild("filterTrigger")],p.prototype,"filterTrigger",2),e([ViewChild("filterPanel")],p.prototype,"filterPanel",2),p=e([Component({selector:"ogrid-primeng-column-header-filter",standalone:true,changeDetection:ChangeDetectionStrategy.OnPush,template:`
2
- <div style="display:flex;align-items:center;flex:1;min-width:0;gap:4px">
3
- <div style="flex:1;min-width:0;overflow:hidden">
4
- <span style="overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block" [title]="columnName" data-header-label>
5
- {{ columnName }}
6
- </span>
7
- </div>
8
- <div style="display:flex;align-items:center;gap:2px;flex-shrink:0">
9
- @if (filterType !== 'none') {
10
- <button
11
- type="button"
12
- #filterTrigger
13
- (click)="toggleFilter()"
14
- [attr.aria-label]="'Filter ' + columnName"
15
- [attr.aria-expanded]="isFilterOpen()"
16
- aria-haspopup="dialog"
17
- [title]="'Filter ' + columnName"
18
- style="border:none;background:transparent;cursor:pointer;padding:2px 4px;font-size:12px;position:relative;color:var(--ogrid-fg, #242424)"
19
- [style.font-weight]="hasActiveFilter() ? 'bold' : 'normal'"
20
- >
21
- &#9662;
22
- @if (hasActiveFilter()) {
23
- <span style="position:absolute;top:0;right:0;width:6px;height:6px;border-radius:50%;background:var(--ogrid-selection, #217346)"></span>
24
- }
25
- </button>
26
-
27
- @if (isFilterOpen()) {
28
- <div
29
- #filterPanel
30
- style="position:absolute;top:100%;left:0;z-index:1000;min-width:200px;background:var(--ogrid-bg, #fff);border:1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));border-radius:6px;box-shadow:0 2px 8px rgba(0,0,0,0.12);font-weight:normal"
31
- >
32
- <div style="padding:8px 12px;font-weight:600;font-size:12px;border-bottom:1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12))">
33
- Filter: {{ columnName }}
34
- </div>
35
-
36
- @if (filterType === 'text') {
37
- <div style="padding:8px 12px">
38
- <input
39
- type="text"
40
- [value]="tempTextValue()"
41
- (input)="tempTextValue.set($any($event.target).value)"
42
- placeholder="Filter text..."
43
- style="width:100%;box-sizing:border-box;padding:6px 8px;border:1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));border-radius:4px;font-size:13px;background:var(--ogrid-bg, #fff);color:var(--ogrid-fg, #242424)"
44
- [attr.aria-label]="'Filter ' + columnName"
45
- />
46
- </div>
47
- <div style="display:flex;justify-content:flex-end;gap:6px;padding:6px 12px;border-top:1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12))">
48
- <button
49
- type="button"
50
- class="p-button p-button-text p-button-sm"
51
- (click)="handleTextClear()"
52
- [disabled]="!textValue"
53
- style="font-size:12px"
54
- >Clear</button>
55
- <button
56
- type="button"
57
- class="p-button p-button-sm"
58
- (click)="handleTextApply()"
59
- style="font-size:12px"
60
- >Apply</button>
61
- </div>
62
- }
63
-
64
- @if (filterType === 'multiSelect') {
65
- <div style="padding:8px 12px">
66
- <input
67
- type="text"
68
- [value]="searchText()"
69
- (input)="searchText.set($any($event.target).value)"
70
- placeholder="Search options..."
71
- style="width:100%;box-sizing:border-box;padding:6px 8px;border:1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));border-radius:4px;font-size:13px;margin-bottom:6px;background:var(--ogrid-bg, #fff);color:var(--ogrid-fg, #242424)"
72
- [attr.aria-label]="'Search ' + columnName + ' options'"
73
- />
74
- @if (isLoadingOptions) {
75
- <div style="padding:8px 0;color:var(--ogrid-fg-muted, rgba(0, 0, 0, 0.5));font-size:12px">Loading...</div>
76
- } @else {
77
- <div style="display:flex;gap:4px;margin-bottom:6px">
78
- <button type="button" class="p-button p-button-text p-button-sm" (click)="handleSelectAllOptions()" style="font-size:11px">All</button>
79
- <button type="button" class="p-button p-button-text p-button-sm" (click)="handleClearSelection()" style="font-size:11px">None</button>
80
- </div>
81
- <div style="max-height:160px;overflow-y:auto" role="group" [attr.aria-label]="columnName + ' filter options'">
82
- @for (opt of filteredOptions(); track opt) {
83
- <label style="display:flex;align-items:center;gap:6px;padding:2px 0;cursor:pointer;font-size:13px">
84
- <input
85
- type="checkbox"
86
- [checked]="tempSelected().has(opt)"
87
- (change)="handleCheckboxChange(opt, $event)"
88
- />
89
- {{ opt }}
90
- </label>
91
- }
92
- </div>
93
- }
94
- </div>
95
- <div style="display:flex;justify-content:flex-end;gap:6px;padding:6px 12px;border-top:1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12))">
96
- <button
97
- type="button"
98
- class="p-button p-button-sm"
99
- (click)="handleApplyMultiSelect()"
100
- style="font-size:12px"
101
- >Apply</button>
102
- </div>
103
- }
104
-
105
- @if (filterType === 'people') {
106
- <div style="padding:8px 12px">
107
- @if (selectedUser) {
108
- <div style="display:flex;align-items:center;justify-content:space-between;padding:4px 0;margin-bottom:4px">
109
- <span style="font-size:13px">{{ selectedUser!.displayName ?? selectedUser!.email }}</span>
110
- <button type="button" class="p-button p-button-text p-button-sm" (click)="handleClearUser()" style="font-size:11px">Clear</button>
111
- </div>
112
- }
113
- <input
114
- type="text"
115
- [value]="peopleSearchText()"
116
- (input)="onPeopleSearchInput($event)"
117
- placeholder="Search people..."
118
- style="width:100%;box-sizing:border-box;padding:6px 8px;border:1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));border-radius:4px;font-size:13px;background:var(--ogrid-bg, #fff);color:var(--ogrid-fg, #242424)"
119
- [attr.aria-label]="'Search people for ' + columnName"
120
- />
121
- @if (isPeopleLoading()) {
122
- <div style="padding:8px 0;color:var(--ogrid-fg-muted, rgba(0, 0, 0, 0.5));font-size:12px">Loading...</div>
123
- }
124
- @for (user of peopleSuggestions(); track user.email) {
125
- <button
126
- type="button"
127
- (click)="handleUserSelect(user)"
128
- style="display:block;width:100%;text-align:left;padding:6px 0;border:none;background:transparent;cursor:pointer;font-size:13px;color:var(--ogrid-fg, #242424)"
129
- >
130
- {{ user.displayName ?? user.email }}
131
- </button>
132
- }
133
- </div>
134
- }
135
-
136
- @if (filterType === 'date') {
137
- <div style="padding:8px 12px;display:flex;flex-direction:column;gap:6px">
138
- <label style="display:flex;align-items:center;gap:6px;font-size:12px">
139
- From:
140
- <input
141
- type="date"
142
- [value]="tempDateFrom()"
143
- (change)="tempDateFrom.set($any($event.target).value)"
144
- style="flex:1;padding:4px 6px;border:1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));border-radius:4px;background:var(--ogrid-bg, #fff);color:var(--ogrid-fg, #242424)"
145
- />
146
- </label>
147
- <label style="display:flex;align-items:center;gap:6px;font-size:12px">
148
- To:
149
- <input
150
- type="date"
151
- [value]="tempDateTo()"
152
- (change)="tempDateTo.set($any($event.target).value)"
153
- style="flex:1;padding:4px 6px;border:1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));border-radius:4px;background:var(--ogrid-bg, #fff);color:var(--ogrid-fg, #242424)"
154
- />
155
- </label>
156
- </div>
157
- <div style="display:flex;justify-content:flex-end;gap:6px;padding:6px 12px;border-top:1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12))">
158
- <button
159
- type="button"
160
- class="p-button p-button-text p-button-sm"
161
- (click)="handleDateClear()"
162
- [disabled]="!tempDateFrom() && !tempDateTo()"
163
- style="font-size:12px"
164
- >Clear</button>
165
- <button
166
- type="button"
167
- class="p-button p-button-sm"
168
- (click)="handleDateApply()"
169
- style="font-size:12px"
170
- >Apply</button>
171
- </div>
172
- }
173
- </div>
174
- }
175
- }
176
- </div>
177
- </div>
178
- `,styles:[`
179
- :host {
180
- display: flex;
181
- position: relative;
182
- flex: 1;
183
- min-width: 0;
184
- }
185
- `]})],p);var c=class extends BaseColumnHeaderMenuComponent{constructor(){super(...arguments);this.menuModel=computed(()=>{let o=[];for(let r of this.menuItems())o.push({label:r.label,disabled:r.disabled,command:()=>this.handleMenuItemClick(r.id)}),r.divider&&o.push({separator:true});return o});}};e([ViewChild("menu")],c.prototype,"menuRef",2),c=e([Component({selector:"column-header-menu",standalone:true,imports:[ButtonModule,MenuModule],changeDetection:ChangeDetectionStrategy.OnPush,template:`
186
- <button
187
- pButton
188
- type="button"
189
- icon="pi pi-ellipsis-v"
190
- class="p-button-text p-button-sm column-header-menu-trigger"
191
- (click)="menu.toggle($event)"
192
- [attr.aria-label]="'Column options for ' + columnId"
193
- ></button>
194
-
195
- <p-menu
196
- #menu
197
- [model]="menuModel()"
198
- [popup]="true"
199
- appendTo="body"
200
- ></p-menu>
201
- `,styles:[`
202
- .column-header-menu-trigger {
203
- padding: 0.25rem;
204
- min-width: 24px;
205
- height: 24px;
206
- display: inline-flex;
207
- align-items: center;
208
- justify-content: center;
209
- color: var(--ogrid-fg-secondary, rgba(0, 0, 0, 0.6));
210
- border-radius: 4px;
211
- transition: background-color 0.15s;
212
- }
213
- /* Always reserve space; hide on hover-capable devices until column is hovered.
214
- The th:hover rule lives in the parent (ViewEncapsulation.None) styles. */
215
- @media (hover: hover) {
216
- .column-header-menu-trigger { visibility: hidden; }
217
- }
218
- .column-header-menu-trigger:hover {
219
- background: var(--ogrid-hover-bg, rgba(0, 0, 0, 0.04));
220
- color: var(--ogrid-fg, rgba(0, 0, 0, 0.87));
221
- }
222
- `]})],c);var u=class extends BaseInlineCellEditorComponent{};u=e([Component({selector:"ogrid-primeng-inline-cell-editor",standalone:true,changeDetection:ChangeDetectionStrategy.OnPush,template:INLINE_CELL_EDITOR_TEMPLATE,styles:[INLINE_CELL_EDITOR_STYLES]})],u);var g=class extends BasePopoverCellEditorComponent{};g=e([Component({selector:"ogrid-primeng-popover-cell-editor",standalone:true,changeDetection:ChangeDetectionStrategy.OnPush,template:POPOVER_CELL_EDITOR_TEMPLATE,styles:[`
223
- ${POPOVER_CELL_EDITOR_OVERLAY_STYLES}
224
- .ogrid-popover-anchor {
225
- padding: 6px 10px; min-height: 20px; cursor: default; overflow: hidden;
226
- text-overflow: ellipsis; white-space: nowrap;
227
- outline: 2px solid var(--ogrid-selection, #217346); outline-offset: -2px;
228
- }
229
- `]})],g);var t=class extends BaseDataGridTableComponent{constructor(){super();this.sortBy=void 0;this.sortDirection="asc";this.columnOrder=void 0;this.onColumnOrderChange=void 0;this.onColumnResized=void 0;this.onColumnPinned=void 0;this.pinnedColumnsInput=void 0;this.initialColumnWidths=void 0;this.layoutMode="fill";this.suppressHorizontalScroll=void 0;this.stickyHeaderInput=void 0;this.columnReorder=void 0;this.isLoadingInput=false;this.loadingMessageInput="Loading\u2026";this.editable=void 0;this.cellSelection=void 0;this.onCellValueChanged=void 0;this.onUndoInput=void 0;this.onRedoInput=void 0;this.canUndoInput=void 0;this.canRedoInput=void 0;this.rowSelectionMode="none";this.selectedRows=void 0;this.onSelectionChange=void 0;this.statusBar=void 0;this.filterOptions={};this.loadingFilterOptions={};this.peopleSearch=void 0;this.getUserByEmail=void 0;this.emptyStateInput=void 0;this.onCellError=void 0;this.ariaLabelInput=void 0;this.ariaLabelledByInput=void 0;this.showRowNumbers=false;this.groupByInput=void 0;this.showColumnLettersInput=false;this.showNameBoxInput=false;this.onActiveCellChange=void 0;this.formulaReferencesInput=void 0;this.currentPageInput=1;this.pageSizeInput=25;this.defaultMinWidth=DEFAULT_MIN_COLUMN_WIDTH;this.statusBarClasses={statusBar:"ogrid-status-bar",statusBarItem:"ogrid-status-bar-item",statusBarLabel:"ogrid-status-bar-label",statusBarValue:"ogrid-status-bar-value"};this.contextMenuClasses={contextMenu:"ogrid-context-menu",contextMenuItem:"ogrid-context-menu-item",contextMenuItemLabel:"ogrid-context-menu-item-label",contextMenuItemShortcut:"ogrid-context-menu-item-shortcut",contextMenuDivider:"ogrid-context-menu-divider"};this.primengColumnSizingOverrides=signal({});this.propsSignal=signal(void 0);this.resizeStartX=0;this.resizeColumnId="";this.resizeStartWidth=0;this.cancelEditHandler=()=>this.cancelEdit();this.showColumnLetters=computed(()=>!!this.getProps()?.showColumnLetters);this.formulaReferences=computed(()=>this.getProps()?.formulaReferences);this.resolvedAriaLabel=computed(()=>this.ariaLabelInput??(this.ariaLabelledByInput?void 0:"Data grid"));this.tableWidthStyle=computed(()=>this.showEmptyInGrid()?"100%":this.allowOverflowX()||this.layoutMode==="content"?"fit-content":"100%");this.tableMinWidthStyle=computed(()=>this.showEmptyInGrid()?"100%":this.allowOverflowX()||this.layoutMode==="content"?"max-content":"100%");this.initBase(),effect(()=>{let r=this.getProps()?.onActiveCellChange;if(!r)return;let n=this.activeCell();if(n){let a=n.columnIndex-this.colOffset(),s=n.rowIndex+1;r(formatCellReference(a,s));}else r(null);});}ngOnChanges(o){if(o.initialColumnWidths){let a=this.initialColumnWidths;a&&this.primengColumnSizingOverrides.set({...a});}let r=this.buildProps(),n=this.propsSignal();(!n||!this.shallowEqual(n,r))&&this.propsSignal.set(r);}shallowEqual(o,r){let n=o,a=r,s=Object.keys(n),f=Object.keys(a);if(s.length!==f.length)return false;for(let b of s)if(n[b]!==a[b])return false;return true}getProps(){return this.propsSignal()}getWrapperRef(){return this.wrapperRef}getTableContainerRef(){return this.tableContainerRefEl}getColumnWidth(o){let r=this.primengColumnSizingOverrides()[o.columnId];return r||(o.idealWidth??o.defaultWidth??o.minWidth??DEFAULT_MIN_COLUMN_WIDTH)}trackByRowId(o,r){return this.getRowIdInput(r)}onSelectAllChangePrimeng(o){this.state().rowSelection.handleSelectAll(o);}onRowClickPrimeng(o,r){if(this.rowSelectionMode!=="single")return;let n=this.getRowIdInput(r),a=this.selectedRowIds();this.state().rowSelection.updateSelection(a.has(n)?new Set:new Set([n]));}onRowCheckboxChangePrimeng(o,r,n,a){let s=this.getRowIdInput(o);this.state().rowSelection.handleRowCheckboxChange(s,r,n,this.lastMouseShift);}onResizeStartPrimeng(o,r){o.preventDefault(),this.state().interaction.setActiveCell?.(null),this.state().interaction.setSelectionRange?.(null),this.getWrapperRef()?.nativeElement.focus({preventScroll:true}),this.resizeStartX=o.clientX,this.resizeColumnId=r.columnId,this.resizeStartWidth=r.columnId===ROW_NUMBER_COLUMN_ID?this.getRowNumberWidth():this.getColumnWidth(r);let n=s=>{let f=s.clientX-this.resizeStartX,b=r.columnId===ROW_NUMBER_COLUMN_ID?ROW_NUMBER_COLUMN_MIN_WIDTH:r.minWidth??DEFAULT_MIN_COLUMN_WIDTH,C=Math.max(b,this.resizeStartWidth+f);this.primengColumnSizingOverrides.update(w=>({...w,[this.resizeColumnId]:C})),this.columnSizingVersion.update(w=>w+1);},a=()=>{window.removeEventListener("pointermove",n,true),window.removeEventListener("pointerup",a,true);let s=this.primengColumnSizingOverrides()[this.resizeColumnId];if(s){this.onColumnResized?.(this.resizeColumnId,s);let f={};for(let[b,C]of Object.entries(this.primengColumnSizingOverrides()))f[b]={widthPx:C};this.state().layout.setColumnSizingOverrides(f);}};window.addEventListener("pointermove",n,true),window.addEventListener("pointerup",a,true);}onResizeRowNumber(o){o.stopPropagation(),this.onResizeStartPrimeng(o,{columnId:ROW_NUMBER_COLUMN_ID,name:"#"});}getRowNumberWidth(){let o=this.primengColumnSizingOverrides()[ROW_NUMBER_COLUMN_ID];return o||super.getRowNumberWidth()}buildProps(){return {items:this.itemsInput,columns:this.columns,getRowId:this.getRowIdInput,sortBy:this.sortBy,sortDirection:this.sortDirection,onColumnSort:this.onColumnSort,visibleColumns:this.visibleColumns,columnOrder:this.columnOrder,onColumnOrderChange:this.onColumnOrderChange,onColumnResized:this.onColumnResized,onColumnPinned:this.onColumnPinned,pinnedColumns:this.pinnedColumnsInput,initialColumnWidths:this.initialColumnWidths,layoutMode:this.layoutMode,suppressHorizontalScroll:this.suppressHorizontalScroll,columnReorder:this.columnReorder,isLoading:this.isLoadingInput,loadingMessage:this.loadingMessageInput,editable:this.editable,cellSelection:this.cellSelection,onCellValueChanged:this.onCellValueChanged,onUndo:this.onUndoInput,onRedo:this.onRedoInput,canUndo:this.canUndoInput,canRedo:this.canRedoInput,rowSelection:this.rowSelectionMode,selectedRows:this.selectedRows,onSelectionChange:this.onSelectionChange,showRowNumbers:this.showRowNumbers,showColumnLetters:this.showColumnLettersInput,showNameBox:this.showNameBoxInput,onActiveCellChange:this.onActiveCellChange,currentPage:this.currentPageInput,pageSize:this.pageSizeInput,statusBar:this.statusBar,filters:this.filters,onFilterChange:this.onFilterChange,filterOptions:this.filterOptions,loadingFilterOptions:this.loadingFilterOptions,peopleSearch:this.peopleSearch,getUserByEmail:this.getUserByEmail,emptyState:this.emptyStateInput,onCellError:this.onCellError,stickyHeader:this.stickyHeaderInput,groupBy:this.groupByInput,"aria-label":this.ariaLabelInput,"aria-labelledby":this.ariaLabelledByInput,formulaReferences:this.formulaReferencesInput}}getColumnLetter(o){return indexToColumnLetter(o)}};e([ViewChild("wrapper")],t.prototype,"wrapperRef",2),e([ViewChild("tableContainer")],t.prototype,"tableContainerRefEl",2),e([Input({required:true,alias:"items"})],t.prototype,"itemsInput",2),e([Input({required:true})],t.prototype,"columns",2),e([Input({required:true,alias:"getRowId"})],t.prototype,"getRowIdInput",2),e([Input()],t.prototype,"sortBy",2),e([Input()],t.prototype,"sortDirection",2),e([Input({required:true})],t.prototype,"onColumnSort",2),e([Input({required:true})],t.prototype,"visibleColumns",2),e([Input()],t.prototype,"columnOrder",2),e([Input()],t.prototype,"onColumnOrderChange",2),e([Input()],t.prototype,"onColumnResized",2),e([Input()],t.prototype,"onColumnPinned",2),e([Input({alias:"pinnedColumns"})],t.prototype,"pinnedColumnsInput",2),e([Input()],t.prototype,"initialColumnWidths",2),e([Input()],t.prototype,"layoutMode",2),e([Input()],t.prototype,"suppressHorizontalScroll",2),e([Input()],t.prototype,"stickyHeaderInput",2),e([Input()],t.prototype,"columnReorder",2),e([Input({alias:"isLoading"})],t.prototype,"isLoadingInput",2),e([Input({alias:"loadingMessage"})],t.prototype,"loadingMessageInput",2),e([Input()],t.prototype,"editable",2),e([Input()],t.prototype,"cellSelection",2),e([Input()],t.prototype,"onCellValueChanged",2),e([Input({alias:"onUndo"})],t.prototype,"onUndoInput",2),e([Input({alias:"onRedo"})],t.prototype,"onRedoInput",2),e([Input({alias:"canUndo"})],t.prototype,"canUndoInput",2),e([Input({alias:"canRedo"})],t.prototype,"canRedoInput",2),e([Input({alias:"rowSelection"})],t.prototype,"rowSelectionMode",2),e([Input()],t.prototype,"selectedRows",2),e([Input()],t.prototype,"onSelectionChange",2),e([Input()],t.prototype,"statusBar",2),e([Input({required:true})],t.prototype,"filters",2),e([Input({required:true})],t.prototype,"onFilterChange",2),e([Input()],t.prototype,"filterOptions",2),e([Input()],t.prototype,"loadingFilterOptions",2),e([Input()],t.prototype,"peopleSearch",2),e([Input()],t.prototype,"getUserByEmail",2),e([Input({alias:"emptyState"})],t.prototype,"emptyStateInput",2),e([Input()],t.prototype,"onCellError",2),e([Input({alias:"aria-label"})],t.prototype,"ariaLabelInput",2),e([Input({alias:"aria-labelledby"})],t.prototype,"ariaLabelledByInput",2),e([Input()],t.prototype,"showRowNumbers",2),e([Input({alias:"groupBy"})],t.prototype,"groupByInput",2),e([Input({alias:"showColumnLetters"})],t.prototype,"showColumnLettersInput",2),e([Input({alias:"showNameBox"})],t.prototype,"showNameBoxInput",2),e([Input()],t.prototype,"onActiveCellChange",2),e([Input({alias:"formulaReferences"})],t.prototype,"formulaReferencesInput",2),e([Input({alias:"currentPage"})],t.prototype,"currentPageInput",2),e([Input({alias:"pageSize"})],t.prototype,"pageSizeInput",2),t=e([Component({selector:"ogrid-primeng-datagrid-table",standalone:true,imports:[StatusBarComponent,GridContextMenuComponent,MarchingAntsOverlayComponent,EmptyStateComponent,FormulaRefOverlayComponent,p,c,u,g],changeDetection:ChangeDetectionStrategy.OnPush,encapsulation:ViewEncapsulation.None,providers:[DataGridStateService,ColumnReorderService,VirtualScrollService],template:`
230
- <div class="ogrid-root">
231
- <div
232
- #wrapper
233
- tabindex="0"
234
- role="region"
235
- class="ogrid-scroll-wrapper"
236
- [class.ogrid-scroll-wrapper--loading-empty]="isLoading() && items().length === 0"
237
- [attr.aria-label]="resolvedAriaLabel()"
238
- [attr.aria-labelledby]="ariaLabelledBy()"
239
- [attr.data-empty]="showEmptyInGrid() ? 'true' : null"
240
- [attr.data-column-count]="state().layout.totalColCount"
241
- [attr.data-overflow-x]="allowOverflowX() ? 'true' : 'false'"
242
- [attr.data-virtual-scroll]="vsEnabled() ? '' : null"
243
- data-ogrid-scroll-container
244
- [attr.data-has-selection]="rowSelectionMode !== 'none' ? 'true' : null"
245
- (contextmenu)="$event.preventDefault()"
246
- (keydown)="onGridKeyDown($event)"
247
- (pointerdown)="onWrapperMouseDown($event)"
248
- (scroll)="onWrapperScroll($event)"
249
- [style.--data-table-column-count]="state().layout.totalColCount"
250
- [style.--ogrid-row-height]="rowHeightCssVar()"
251
- >
252
- <div class="ogrid-table-wrapper">
253
- <div [class.loading-dimmed]="isLoading() && items().length > 0" class="ogrid-table-wrapper">
254
- <div #tableContainer class="ogrid-table-wrapper">
255
- <table class="ogrid-table" role="grid" [attr.data-virtual-scroll]="vsEnabled() ? '' : null">
256
- <thead [class]="stickyHeader() ? 'ogrid-thead ogrid-sticky-header' : 'ogrid-thead'">
257
- @if (showColumnLetters()) {
258
- <tr class="ogrid-column-letter-row">
259
- @if (hasCheckboxCol()) {
260
- <th class="ogrid-column-letter-cell"></th>
261
- }
262
- @if (hasRowNumbersCol()) {
263
- <th class="ogrid-column-letter-cell"></th>
264
- }
265
- @for (col of visibleCols(); track col.columnId; let colIdx = $index) {
266
- <th class="ogrid-column-letter-cell">
267
- {{ getColumnLetter(colIdx) }}
268
- </th>
269
- }
270
- </tr>
271
- }
272
- @for (row of headerRows(); track $index; let rowIdx = $index) {
273
- <tr>
274
- @if (rowIdx === headerRows().length - 1 && hasCheckboxCol()) {
275
- <th scope="col" rowSpan="1" class="ogrid-checkbox-header">
276
- <input
277
- type="checkbox"
278
- [checked]="allSelected()"
279
- [indeterminate]="someSelected() && !allSelected()"
280
- (change)="onSelectAllChangePrimeng($any($event.target).checked)"
281
- aria-label="Select all rows"
282
- />
283
- </th>
284
- }
285
- @if (rowIdx === 0 && rowIdx < headerRows().length - 1 && hasCheckboxCol()) {
286
- <th [attr.rowSpan]="headerRows().length - 1"></th>
287
- }
288
- @if (rowIdx === headerRows().length - 1 && hasRowNumbersCol()) {
289
- <th scope="col" rowSpan="1" class="ogrid-row-number-header"
290
- [style.width.px]="getRowNumberWidth()"
291
- [style.min-width.px]="getRowNumberWidth()"
292
- [style.max-width.px]="getRowNumberWidth()"
293
- >
294
- #
295
- <div
296
- class="ogrid-resize-handle"
297
- (pointerdown)="onResizeRowNumber($event)"
298
- (dblclick)="$event.stopPropagation()"
299
- ></div>
300
- </th>
301
- }
302
- @if (rowIdx === 0 && rowIdx < headerRows().length - 1 && hasRowNumbersCol()) {
303
- <th [attr.rowSpan]="headerRows().length - 1" class="ogrid-row-number-spacer"></th>
304
- }
305
- @for (cell of row; track cell.columnDef?.columnId ?? $index; let cellIdx = $index) {
306
- @if (cell.isGroup) {
307
- <th
308
- [attr.colSpan]="cell.colSpan"
309
- scope="colgroup"
310
- class="ogrid-column-group-header"
311
- >
312
- {{ cell.label }}
313
- </th>
314
- } @else {
315
- @let col = asColumnDef(cell.columnDef);
316
- @let pinned = isPinned(col.columnId);
317
- @let config = getFilterConfig(col);
318
- @let sortState = getSortState(col.columnId);
319
- @let ariaSort = sortState === 'asc' ? 'ascending' : sortState === 'desc' ? 'descending' : null;
320
- <th
321
- scope="col"
322
- class="ogrid-header-cell"
323
- [attr.data-column-id]="col.columnId"
324
- [attr.aria-sort]="ariaSort"
325
- [attr.rowSpan]="headerRows().length > 1 && rowIdx < headerRows().length - 1 ? headerRows().length - rowIdx : null"
326
- [class.ogrid-th-pinned-left]="pinned === 'left'"
327
- [class.ogrid-th-pinned-right]="pinned === 'right'"
328
- [style.min-width.px]="getEffectiveMinWidth(col)"
329
- [style.width.px]="getColumnWidth(col)"
330
- [style.max-width.px]="getColumnWidth(col)"
331
- [style.left.px]="pinned === 'left' ? getPinnedLeftOffset(col.columnId) : null"
332
- [style.right.px]="pinned === 'right' ? getPinnedRightOffset(col.columnId) : null"
333
- [style.cursor]="columnReorderService.isDragging() ? 'grabbing' : 'grab'"
334
- (pointerdown)="onHeaderMouseDown(col.columnId, $event)"
335
- >
336
- <div class="ogrid-header-content">
337
- <ogrid-primeng-column-header-filter
338
- [columnKey]="col.columnId"
339
- [columnName]="col.name"
340
- [filterType]="config.filterType"
341
- [isSorted]="config.isSorted ?? false"
342
- [isSortedDescending]="config.isSortedDescending ?? false"
343
- [onSort]="config.onSort"
344
- [selectedValues]="config.selectedValues"
345
- [onFilterChange]="config.onFilterChange"
346
- [options]="config.options ?? []"
347
- [isLoadingOptions]="config.isLoadingOptions ?? false"
348
- [textValue]="config.textValue ?? ''"
349
- [onTextChange]="config.onTextChange"
350
- [selectedUser]="config.selectedUser"
351
- [onUserChange]="config.onUserChange"
352
- [peopleSearch]="config.peopleSearch"
353
- [dateValue]="config.dateValue"
354
- [onDateChange]="config.onDateChange"
355
- ></ogrid-primeng-column-header-filter>
356
- @let colPinState = getPinState(col.columnId);
357
- <column-header-menu
358
- [columnId]="col.columnId"
359
- [canPinLeft]="colPinState.canPinLeft"
360
- [canPinRight]="colPinState.canPinRight"
361
- [canUnpin]="colPinState.canUnpin"
362
- [currentSort]="sortState"
363
- [isSortable]="col.sortable !== false"
364
- [isResizable]="col.resizable !== false"
365
- [handlers]="getColumnMenuHandlersMemoized(col.columnId)"
366
- />
367
- </div>
368
- <div
369
- class="ogrid-resize-handle"
370
- (pointerdown)="onResizeStartPrimeng($event, col)"
371
- (dblclick)="onResizeDoubleClick($event, col)"
372
- [attr.aria-label]="'Resize ' + col.name"
373
- ></div>
374
- </th>
375
- }
376
- }
377
- </tr>
378
- }
379
- </thead>
380
-
381
- @if (!showEmptyInGrid()) {
382
- <tbody>
383
- @if (vsEnabled() && vsTopSpacerHeight() > 0) {
384
- <tr [style.height.px]="vsTopSpacerHeight()"></tr>
385
- }
386
- @for (item of vsVisibleItems(); track trackRow(localIdx, item); let localIdx = $index) {
387
- @if (isRowGroupHeader(item)) {
388
- <tr
389
- style="background: var(--ogrid-bg-row-group, var(--ogrid-bg-hover, #f5f5f5)); font-weight: 500"
390
- >
391
- <td [attr.colspan]="totalColCount()" [style.padding-left.px]="$any(item).group.depth * 16 + 8">
392
- <button
393
- (click)="toggleGroup($any(item).group.groupKey)"
394
- (keydown.enter)="$event.preventDefault(); toggleGroup($any(item).group.groupKey)"
395
- (keydown.space)="$event.preventDefault(); toggleGroup($any(item).group.groupKey)"
396
- tabindex="0"
397
- style="background: none; border: none; cursor: pointer; padding: 2px 6px; font: inherit; display: inline-flex; align-items: center; gap: 6px"
398
- >
399
- <span style="display: inline-block; transition: transform 0.15s; font-size: 12px"
400
- [style.transform]="rowGroupExpandedGroups().has($any(item).group.groupKey) ? 'rotate(90deg)' : 'rotate(0deg)'"
401
- >&#9654;</span>
402
- <span>{{ $any(item).group.displayText }} ({{ $any(item).group.itemCount }})</span>
403
- </button>
404
- </td>
405
- </tr>
406
- } @else {
407
- @let rowIndex = vsStartIndex() + localIdx;
408
- @let rowId = getRowIdInput(item);
409
- @let isSelected = selectedRowIds().has(rowId);
410
- <tr
411
- [attr.data-row-id]="rowId"
412
- [attr.aria-selected]="isSelected || null"
413
- [style.background]="isSelected ? 'var(--ogrid-selected-bg, #e8f0fe)' : null"
414
- (click)="onRowClickPrimeng($event, item)"
415
- >
416
- @if (hasCheckboxCol()) {
417
- <td
418
- class="ogrid-checkbox-cell"
419
- [attr.data-row-index]="rowIndex"
420
- [attr.data-col-index]="0"
421
- (click)="$event.stopPropagation()"
422
- >
423
- <input
424
- type="checkbox"
425
- [checked]="isSelected"
426
- (change)="onRowCheckboxChangePrimeng(item, $any($event.target).checked, rowIndex, $event)"
427
- [attr.aria-label]="'Select row ' + (rowIndex + 1)"
428
- />
429
- </td>
430
- }
431
- @if (hasRowNumbersCol()) {
432
- <td class="ogrid-row-number-cell"
433
- [style.width.px]="getRowNumberWidth()"
434
- [style.min-width.px]="getRowNumberWidth()"
435
- [style.max-width.px]="getRowNumberWidth()"
436
- >
437
- {{ rowNumberOffset() + rowIndex + 1 }}
438
- </td>
439
- }
440
- @if (vsColumnsEnabled() && vsLeftSpacerWidth() > 0) {
441
- <td [style.width.px]="vsLeftSpacerWidth()" [style.minWidth.px]="vsLeftSpacerWidth()" [style.maxWidth.px]="vsLeftSpacerWidth()" [style.padding]="'0'"></td>
442
- }
443
- @for (col of vsVisibleCols(); track col.columnId) {
444
- @let pinned = isPinned(col.columnId);
445
- <td
446
- [attr.data-column-id]="col.columnId"
447
- [class.ogrid-td-pinned-left]="pinned === 'left'"
448
- [class.ogrid-td-pinned-right]="pinned === 'right'"
449
- class="ogrid-data-cell"
450
- [style.min-width.px]="getEffectiveMinWidth(col)"
451
- [style.width.px]="getColumnWidth(col)"
452
- [style.max-width.px]="getColumnWidth(col)"
453
- [style.left.px]="pinned === 'left' ? getPinnedLeftOffset(col.columnId) : null"
454
- [style.right.px]="pinned === 'right' ? getPinnedRightOffset(col.columnId) : null"
455
- [style.text-align]="col.type === 'numeric' ? 'right' : null"
456
- >
457
- @let descriptor = getCellDescriptor(item, col, rowIndex, getGlobalColIndex(col));
458
- @if (descriptor.mode === 'editing-inline') {
459
- <div class="ogrid-editing-cell">
460
- <ogrid-primeng-inline-cell-editor
461
- [value]="descriptor.value"
462
- [item]="item"
463
- [column]="col"
464
- [rowIndex]="rowIndex"
465
- [editorType]="descriptor.editorType ?? 'text'"
466
- (commit)="commitEdit(item, col.columnId, descriptor.value, $event, rowIndex, descriptor.globalColIndex)"
467
- (cancel)="cancelEdit()"
468
- ></ogrid-primeng-inline-cell-editor>
469
- </div>
470
- } @else if (descriptor.mode === 'editing-popover') {
471
- @let editorProps = buildPopoverEditorProps(item, col, descriptor);
472
- <ogrid-primeng-popover-cell-editor
473
- [item]="item"
474
- [column]="col"
475
- [rowIndex]="rowIndex"
476
- [globalColIndex]="descriptor.globalColIndex"
477
- [displayValue]="descriptor.displayValue"
478
- [editorProps]="editorProps"
479
- [onCancel]="cancelEditHandler"
480
- ></ogrid-primeng-popover-cell-editor>
481
- } @else {
482
- <div
483
- [attr.data-row-index]="rowIndex"
484
- [attr.data-col-index]="descriptor.globalColIndex"
485
- [attr.data-active-cell]="descriptor.isActive ? 'true' : null"
486
- [attr.data-in-range]="descriptor.isInRange ? 'true' : null"
487
- [attr.tabindex]="descriptor.isActive ? 0 : -1"
488
- (pointerdown)="onCellMouseDown($event, rowIndex, descriptor.globalColIndex)"
489
- (click)="onCellClick(rowIndex, descriptor.globalColIndex)"
490
- (dblclick)="descriptor.canEditAny ? onCellDblClick(descriptor.rowId, col.columnId) : null"
491
- (contextmenu)="onCellContextMenu($event)"
492
- class="ogrid-cell-content"
493
- [style.cursor]="descriptor.canEditAny ? 'cell' : 'default'"
494
- [style.background]="descriptor.isInRange && !descriptor.isActive ? 'var(--ogrid-range-bg, rgba(33, 115, 70, 0.08))' : (descriptor.isActive && descriptor.isInRange ? 'var(--ogrid-bg, #fff)' : null)"
495
- [style.outline]="descriptor.isActive && !descriptor.isInRange ? '2px solid var(--ogrid-selection, #217346)' : null"
496
- [style.outline-offset]="descriptor.isActive && !descriptor.isInRange ? '-2px' : null"
497
- >
498
- @if (col.type === 'boolean') {
499
- <input type="checkbox" [checked]="!!descriptor.displayValue" [disabled]="!descriptor.canEditAny" (change)="descriptor.canEditAny ? commitBooleanEdit(item, col.columnId, !!descriptor.displayValue, rowIndex, descriptor.globalColIndex) : null" (pointerdown)="onBooleanCheckboxPointerDown($event, rowIndex, descriptor.globalColIndex)" (click)="$event.stopPropagation()" style="margin:0;outline:none" [style.cursor]="descriptor.canEditAny ? 'pointer' : 'default'" [attr.aria-label]="descriptor.displayValue ? 'Checked' : 'Unchecked'" />
500
- } @else {
501
- <span [style]="resolveCellStyleFn(col, item, descriptor.displayValue)">{{ resolveCellContent(col, item, descriptor.displayValue) }}</span>
502
- }
503
- @if (descriptor.canEditAny && descriptor.isSelectionEndCell) {
504
- <div
505
- (pointerdown)="onFillHandleMouseDown($event)"
506
- class="ogrid-fill-handle"
507
- aria-label="Fill handle"
508
- ></div>
509
- }
510
- </div>
511
- }
512
- </td>
513
- }
514
- @if (vsColumnsEnabled() && vsRightSpacerWidth() > 0) {
515
- <td [style.width.px]="vsRightSpacerWidth()" [style.minWidth.px]="vsRightSpacerWidth()" [style.maxWidth.px]="vsRightSpacerWidth()" [style.padding]="'0'"></td>
516
- }
517
- </tr>
518
- }
519
- }
520
- @if (vsEnabled() && vsBottomSpacerHeight() > 0) {
521
- <tr [style.height.px]="vsBottomSpacerHeight()"></tr>
522
- }
523
- </tbody>
524
- }
525
- </table>
526
-
527
- <ogrid-marching-ants-overlay
528
- [containerEl]="tableContainerEl()"
529
- [selectionRange]="state().interaction.selectionRange"
530
- [copyRange]="state().interaction.copyRange"
531
- [cutRange]="state().interaction.cutRange"
532
- [colOffset]="state().layout.colOffset"
533
- [columnSizingVersion]="columnSizingVersion()"
534
- [items]="items()"
535
- [visibleColumns]="propsVisibleColumns()"
536
- [columnOrder]="propsColumnOrder()"
537
- ></ogrid-marching-ants-overlay>
538
-
539
- @if (formulaReferences() && formulaReferences()!.length > 0) {
540
- <ogrid-formula-ref-overlay
541
- [containerEl]="tableContainerEl()"
542
- [references]="formulaReferences()!"
543
- [colOffset]="colOffset()"
544
- />
545
- }
546
-
547
- @if (showEmptyInGrid() && emptyState()) {
548
- <div class="ogrid-empty-container">
549
- <div>
550
- <div class="ogrid-empty-title">No results found</div>
551
- <ogrid-empty-state
552
- [message]="emptyState()?.message"
553
- [hasActiveFilters]="emptyState()?.hasActiveFilters ?? false"
554
- [render]="emptyState()?.render"
555
- (clearAll)="emptyState()?.onClearAll()"
556
- ></ogrid-empty-state>
557
- </div>
558
- </div>
559
- }
560
- </div>
561
- </div>
562
- </div>
563
- </div>
564
-
565
- @if (columnReorderService.isDragging() && columnReorderService.dropIndicatorX() !== null) {
566
- <div class="ogrid-drop-indicator" [style.left.px]="columnReorderService.dropIndicatorX()"></div>
567
- }
568
-
569
- @if (menuPosition()) {
570
- <ogrid-context-menu
571
- [x]="menuPosition()!.x"
572
- [y]="menuPosition()!.y"
573
- [hasSelection]="hasCellSelection()"
574
- [canUndoProp]="canUndo()"
575
- [canRedoProp]="canRedo()"
576
- [classNames]="contextMenuClasses"
577
- (copyAction)="handleCopy()"
578
- (cutAction)="handleCut()"
579
- (pasteAction)="handlePaste()"
580
- (selectAllAction)="handleSelectAllCells()"
581
- (undoAction)="onUndo()"
582
- (redoAction)="onRedo()"
583
- (closeAction)="closeContextMenu()"
584
- ></ogrid-context-menu>
585
- }
586
-
587
- @let sbConfig = statusBarConfig();
588
- @if (sbConfig) {
589
- <ogrid-status-bar
590
- [totalCount]="sbConfig.totalCount"
591
- [filteredCount]="sbConfig.filteredCount"
592
- [selectedCount]="sbConfig.selectedCount ?? selectedRowIds().size"
593
- [selectedCellCount]="selectionCellCount()"
594
- [aggregation]="sbConfig.aggregation"
595
- [suppressRowCount]="sbConfig.suppressRowCount"
596
- [classNames]="statusBarClasses"
597
- ></ogrid-status-bar>
598
- }
599
-
600
- @if (isLoading()) {
601
- <div class="ogrid-loading-overlay" aria-live="polite">
602
- <div class="ogrid-loading-content">
603
- <span class="ogrid-loading-text">{{ loadingMessage() }}</span>
604
- </div>
605
- </div>
606
- }
607
- </div>
608
- `,styles:[OGRID_THEME_VARS_CSS,`
609
- :host { display: block; }
610
- .ogrid-root {
611
- position: relative;
612
- flex: 1;
613
- min-height: 0;
614
- display: flex;
615
- flex-direction: column;
616
- overflow: hidden;
617
- }
618
- .ogrid-scroll-wrapper {
619
- overflow: auto;
620
- position: relative;
621
- background: var(--ogrid-bg, #ffffff);
622
- color: var(--ogrid-fg, rgba(0, 0, 0, 0.87));
623
- }
624
- .ogrid-scroll-wrapper[data-virtual-scroll] { flex: 1; min-height: 0; }
625
- .ogrid-scroll-wrapper--loading-empty { min-height: 200px; }
626
- .ogrid-table-wrapper {
627
- position: relative;
628
- overflow-x: clip;
629
- }
630
- .ogrid-table {
631
- width: var(--data-table-width, 100%);
632
- min-width: var(--data-table-min-width, 100%);
633
- border-collapse: collapse;
634
- table-layout: fixed;
635
- }
636
- .ogrid-table tr th:first-child,
637
- .ogrid-table tr td:first-child { border-left: none; }
638
- .ogrid-table tbody tr { height: var(--ogrid-row-height, auto); }
639
- .ogrid-thead {
640
- z-index: 3;
641
- background: var(--ogrid-header-bg, #f5f5f5);
642
- }
643
- .ogrid-sticky-header { position: sticky; top: 0; }
644
- .ogrid-sticky-header .ogrid-checkbox-header,
645
- .ogrid-sticky-header .ogrid-row-number-header { position: sticky; top: 0; }
646
- .ogrid-checkbox-header {
647
- width: 48px;
648
- min-width: 48px;
649
- max-width: 48px;
650
- text-align: center;
651
- background: var(--ogrid-header-bg, #f5f5f5);
652
- border-bottom: 2px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));
653
- z-index: 3;
654
- }
655
- .ogrid-row-number-header {
656
- text-align: center;
657
- font-weight: 600;
658
- background: var(--ogrid-header-bg, #f5f5f5);
659
- border-bottom: 2px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));
660
- z-index: 3;
661
- position: relative;
662
- }
663
- .ogrid-row-number-spacer {
664
- background: var(--ogrid-header-bg, #f5f5f5);
665
- }
666
- .ogrid-column-group-header {
667
- text-align: center;
668
- font-weight: 600;
669
- background: var(--ogrid-header-bg, #f5f5f5);
670
- border-bottom: 2px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));
671
- padding: 6px 10px;
672
- }
673
- .ogrid-header-cell {
674
- background: var(--ogrid-header-bg, #f5f5f5);
675
- border-bottom: 2px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));
676
- padding: 0;
677
- position: relative;
678
- user-select: none;
679
- }
680
- .ogrid-header-content {
681
- display: flex;
682
- align-items: center;
683
- gap: 4px;
684
- padding: 6px 10px;
685
- }
686
- .ogrid-resize-handle {
687
- position: absolute;
688
- top: 0;
689
- right: 0;
690
- bottom: 0;
691
- width: 4px;
692
- cursor: col-resize;
693
- touch-action: none;
694
- }
695
- @media (pointer: coarse) {
696
- .ogrid-resize-handle { width: 16px; right: -6px; }
697
- }
698
- .ogrid-checkbox-cell {
699
- width: 48px;
700
- min-width: 48px;
701
- max-width: 48px;
702
- padding: 6px 4px;
703
- text-align: center;
704
- border-bottom: 1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));
705
- }
706
- .ogrid-row-number-cell {
707
- padding: 6px;
708
- text-align: center;
709
- font-weight: 600;
710
- font-variant-numeric: tabular-nums;
711
- color: var(--ogrid-fg-secondary, rgba(0, 0, 0, 0.6));
712
- background: var(--ogrid-header-bg, rgba(0, 0, 0, 0.04));
713
- border-bottom: 1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));
714
- position: sticky;
715
- left: 0;
716
- z-index: 3;
717
- }
718
- .ogrid-data-cell {
719
- padding: 0;
720
- border-bottom: 1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));
721
- position: relative;
722
- }
723
- .ogrid-data-cell:has(> [data-active-cell]),
724
- .ogrid-data-cell:has(> .ogrid-editing-cell) { z-index: 2; }
725
- .ogrid-cell-content {
726
- padding: var(--ogrid-cell-padding, 6px 10px);
727
- min-height: 20px;
728
- cursor: default;
729
- overflow: hidden;
730
- text-overflow: ellipsis;
731
- white-space: nowrap;
732
- }
733
- .ogrid-editing-cell {
734
- width: 100%; height: 100%; display: flex; align-items: center; box-sizing: border-box;
735
- outline: 2px solid var(--ogrid-selection-color, #217346); outline-offset: -1px;
736
- z-index: 2; position: relative; background: var(--ogrid-bg, #fff); overflow: hidden; padding: 0;
737
- }
738
- .ogrid-scroll-wrapper [data-drag-range] { background: var(--ogrid-range-bg, rgba(33, 115, 70, 0.12)); }
739
- .ogrid-fill-handle {
740
- position: absolute;
741
- bottom: -3px;
742
- right: -3px;
743
- width: 7px;
744
- height: 7px;
745
- background: var(--ogrid-selection, #217346);
746
- cursor: crosshair;
747
- touch-action: none;
748
- z-index: 2;
749
- }
750
- @media (pointer: coarse) {
751
- .ogrid-fill-handle { width: 14px; height: 14px; right: -7px; bottom: -7px; border-radius: 2px; }
752
- }
753
- .ogrid-empty-container {
754
- display: flex;
755
- align-items: center;
756
- justify-content: center;
757
- padding: 48px 24px;
758
- text-align: center;
759
- color: var(--ogrid-fg-muted, rgba(0, 0, 0, 0.5));
760
- }
761
- .ogrid-empty-title {
762
- font-weight: 600;
763
- margin-bottom: 8px;
764
- }
765
- .ogrid-loading-overlay {
766
- position: absolute;
767
- inset: 0;
768
- display: flex;
769
- align-items: center;
770
- justify-content: center;
771
- background: var(--ogrid-loading-overlay, rgba(255, 255, 255, 0.7));
772
- z-index: 10;
773
- }
774
- .ogrid-loading-content {
775
- display: flex;
776
- align-items: center;
777
- gap: 8px;
778
- color: var(--ogrid-fg, #242424);
779
- }
780
- .ogrid-loading-text {
781
- font-size: 14px;
782
- }
783
- .loading-dimmed {
784
- opacity: 0.5;
785
- pointer-events: none;
786
- }
787
- .ogrid-drop-indicator {
788
- position: absolute;
789
- top: 0;
790
- bottom: 0;
791
- width: 3px;
792
- background: var(--ogrid-primary, #217346);
793
- pointer-events: none;
794
- z-index: 100;
795
- transition: left 0.05s;
796
- }
797
- .ogrid-th-pinned-left {
798
- position: sticky;
799
- top: 0;
800
- left: 0;
801
- z-index: 10;
802
- background: var(--ogrid-header-bg, #f5f5f5);
803
- border-right: 1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));
804
- box-shadow: 2px 0 4px -1px rgba(0, 0, 0, 0.1);
805
- }
806
- .ogrid-th-pinned-right {
807
- position: sticky;
808
- top: 0;
809
- right: 0;
810
- z-index: 10;
811
- background: var(--ogrid-header-bg, #f5f5f5);
812
- border-left: 1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));
813
- box-shadow: -2px 0 4px -1px rgba(0, 0, 0, 0.1);
814
- }
815
- .ogrid-td-pinned-left {
816
- position: sticky;
817
- left: 0;
818
- z-index: 5;
819
- background: var(--ogrid-bg, #fff);
820
- border-right: 1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));
821
- box-shadow: 2px 0 4px -1px rgba(0, 0, 0, 0.1);
822
- }
823
- .ogrid-td-pinned-right {
824
- position: sticky;
825
- right: 0;
826
- z-index: 5;
827
- background: var(--ogrid-bg, #fff);
828
- border-left: 1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));
829
- box-shadow: -2px 0 4px -1px rgba(0, 0, 0, 0.1);
830
- }
831
- ::ng-deep th:focus-visible,
832
- ::ng-deep td:focus-visible {
833
- outline: 2px solid var(--primary-color, #6366f1);
834
- outline-offset: -2px;
835
- z-index: 11;
836
- }
837
- ::ng-deep .p-button:focus-visible,
838
- ::ng-deep button:focus-visible {
839
- outline: 2px solid var(--primary-color, #6366f1);
840
- outline-offset: 2px;
841
- }
842
-
843
- /* Context menu */
844
- .ogrid-context-menu {
845
- position: fixed;
846
- z-index: 1000;
847
- min-width: 160px;
848
- padding: 4px 0;
849
- background: var(--ogrid-bg, #fff);
850
- border: 1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));
851
- border-radius: 6px;
852
- box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
853
- }
854
- .ogrid-context-menu-item {
855
- display: flex;
856
- align-items: center;
857
- justify-content: space-between;
858
- gap: 24px;
859
- width: 100%;
860
- padding: 6px 12px;
861
- border: none;
862
- background: none;
863
- font-size: 13px;
864
- text-align: left;
865
- cursor: pointer;
866
- color: var(--ogrid-fg, rgba(0, 0, 0, 0.87));
867
- }
868
- .ogrid-context-menu-item:hover:not(:disabled) {
869
- background: var(--ogrid-hover-bg, rgba(0, 0, 0, 0.04));
870
- }
871
- .ogrid-context-menu-item:disabled {
872
- opacity: 0.5;
873
- cursor: not-allowed;
874
- }
875
- .ogrid-context-menu-item-label {
876
- flex: 1;
877
- }
878
- .ogrid-context-menu-item-shortcut {
879
- color: var(--ogrid-fg-muted, rgba(0, 0, 0, 0.5));
880
- font-size: 0.85em;
881
- }
882
- .ogrid-context-menu-divider {
883
- height: 1px;
884
- margin: 4px 0;
885
- background: var(--ogrid-border, rgba(0, 0, 0, 0.12));
886
- }
887
- ::ng-deep .p-checkbox:focus-visible {
888
- outline: 2px solid var(--primary-color, #6366f1);
889
- outline-offset: 2px;
890
- }
891
-
892
- /* PrimeNG Menu popup overrides.
893
- Double-class selectors (0,2,0) beat PrimeNG's single-class (0,1,0) defaults. */
894
- .p-menu.p-menu {
895
- background: var(--ogrid-bg, #ffffff);
896
- color: var(--ogrid-fg, rgba(0, 0, 0, 0.87));
897
- border: 1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));
898
- border-radius: 4px;
899
- padding: 4px 0;
900
- }
901
- .p-menu-overlay.p-menu-overlay {
902
- box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--ogrid-border, rgba(0, 0, 0, 0.12));
903
- }
904
- .p-menu-item-content.p-menu-item-content {
905
- color: var(--ogrid-fg, rgba(0, 0, 0, 0.87));
906
- }
907
- .p-menu-item-link.p-menu-item-link {
908
- color: var(--ogrid-fg, rgba(0, 0, 0, 0.87));
909
- padding: 6px 12px;
910
- }
911
- .p-menu-item-label.p-menu-item-label {
912
- color: var(--ogrid-fg, rgba(0, 0, 0, 0.87));
913
- font-size: 0.875rem;
914
- }
915
- .p-menu-item:not(.p-disabled) .p-menu-item-content.p-menu-item-content:hover {
916
- background: var(--ogrid-hover-bg, rgba(0, 0, 0, 0.04));
917
- color: var(--ogrid-fg, rgba(0, 0, 0, 0.87));
918
- }
919
- .p-menu-separator.p-menu-separator {
920
- border-color: var(--ogrid-border, rgba(0, 0, 0, 0.12));
921
- margin: 4px 0;
922
- }
923
- .ogrid-column-letter-cell {
924
- text-align: center;
925
- font-size: 11px;
926
- font-weight: 500;
927
- color: var(--ogrid-fg-muted, rgba(0, 0, 0, 0.4));
928
- padding: 2px 4px;
929
- background: var(--ogrid-column-letter-bg, var(--ogrid-header-bg, #f5f5f5));
930
- border-bottom: 1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));
931
- user-select: none;
932
- font-variant-numeric: tabular-nums;
933
- }
934
- /* Reveal column menu trigger on header hover without layout shift.
935
- The button always takes up space (visibility: hidden); shown when column is hovered. */
936
- @media (hover: hover) {
937
- th:hover .column-header-menu-trigger { visibility: visible; }
938
- }
939
- `]})],t);var m=class extends BaseColumnChooserComponent{get open(){return this.isOpen}};m=e([Component({selector:"ogrid-primeng-column-chooser",standalone:true,changeDetection:ChangeDetectionStrategy.OnPush,template:`
940
- <div style="position:relative;display:inline-block">
941
- <button
942
- type="button"
943
- class="p-button p-button-text p-button-sm"
944
- (click)="open.set(!open())"
945
- [attr.aria-expanded]="open()"
946
- aria-haspopup="listbox"
947
- style="display:flex;align-items:center;gap:6px;font-size:13px"
948
- >
949
- <span aria-hidden>&#9881;</span>
950
- <span>Column Visibility ({{ visibleCount() }} of {{ totalCount() }})</span>
951
- <span aria-hidden>{{ open() ? '\u25B2' : '\u25BC' }}</span>
952
- </button>
953
-
954
- @if (open()) {
955
- <div
956
- style="position:absolute;right:0;top:100%;z-index:1000;min-width:220px;max-height:320px;overflow-y:auto;background:var(--ogrid-bg, #fff);border:1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));border-radius:6px;box-shadow:0 2px 8px rgba(0,0,0,0.12);padding:8px 0"
957
- >
958
- <div style="padding:4px 12px;font-weight:600;font-size:12px;color:var(--ogrid-fg-secondary, rgba(0, 0, 0, 0.6))">
959
- Select Columns ({{ visibleCount() }} of {{ totalCount() }})
960
- </div>
961
- @for (col of columns; track col.columnId) {
962
- <label style="display:flex;align-items:center;gap:8px;padding:4px 12px;cursor:pointer;font-size:13px">
963
- <input
964
- type="checkbox"
965
- [checked]="visibleColumns.has(col.columnId)"
966
- (change)="onToggle(col.columnId, $any($event.target).checked)"
967
- [disabled]="col.required === true"
968
- />
969
- {{ col.name }}
970
- </label>
971
- }
972
- <div style="display:flex;gap:4px;padding:8px 12px;border-top:1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));margin-top:4px">
973
- <button
974
- type="button"
975
- class="p-button p-button-text p-button-sm"
976
- (click)="onClearAll()"
977
- style="flex:1;font-size:12px"
978
- >Clear All</button>
979
- <button
980
- type="button"
981
- class="p-button p-button-text p-button-sm"
982
- (click)="onSelectAll()"
983
- style="flex:1;font-size:12px"
984
- >Select All</button>
985
- </div>
986
- </div>
987
- }
988
- </div>
989
- `})],m);var h=class extends BasePaginationControlsComponent{};h=e([Component({selector:"ogrid-primeng-pagination-controls",standalone:true,changeDetection:ChangeDetectionStrategy.OnPush,template:`
990
- @if (vm()) {
991
- <div class="ogrid-pagination" style="display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;font-size:13px;color:var(--ogrid-fg, #242424)">
992
- <div class="ogrid-pagination__info">
993
- Showing {{ vm()!.startItem }} to {{ vm()!.endItem }} of {{ totalCount.toLocaleString() }} {{ labelPlural() }}
994
- </div>
995
-
996
- <div class="ogrid-pagination__pages" style="display:flex;align-items:center;gap:4px" role="navigation" aria-label="Pagination">
997
- <button
998
- type="button"
999
- class="p-button p-button-text p-button-sm"
1000
- [disabled]="currentPage === 1"
1001
- (click)="pageChange.emit(1)"
1002
- aria-label="First page"
1003
- style="min-width:32px;padding:4px 8px"
1004
- >&laquo;</button>
1005
- <button
1006
- type="button"
1007
- class="p-button p-button-text p-button-sm"
1008
- [disabled]="currentPage === 1"
1009
- (click)="pageChange.emit(currentPage - 1)"
1010
- aria-label="Previous page"
1011
- style="min-width:32px;padding:4px 8px"
1012
- >&lsaquo;</button>
1013
-
1014
- @if (vm()!.showStartEllipsis) {
1015
- <button
1016
- type="button"
1017
- class="p-button p-button-text p-button-sm"
1018
- (click)="pageChange.emit(1)"
1019
- aria-label="Page 1"
1020
- style="min-width:32px;padding:4px 8px"
1021
- >1</button>
1022
- <span aria-hidden style="padding:0 4px">&hellip;</span>
1023
- }
1024
-
1025
- @for (pageNum of vm()!.pageNumbers; track pageNum) {
1026
- <button
1027
- type="button"
1028
- class="p-button p-button-sm"
1029
- [class.p-button-outlined]="currentPage !== pageNum"
1030
- (click)="pageChange.emit(pageNum)"
1031
- [attr.aria-label]="'Page ' + pageNum"
1032
- [attr.aria-current]="currentPage === pageNum ? 'page' : null"
1033
- style="min-width:32px;padding:4px 8px"
1034
- >{{ pageNum }}</button>
1035
- }
1036
-
1037
- @if (vm()!.showEndEllipsis) {
1038
- <span aria-hidden style="padding:0 4px">&hellip;</span>
1039
- <button
1040
- type="button"
1041
- class="p-button p-button-text p-button-sm"
1042
- (click)="pageChange.emit(vm()!.totalPages)"
1043
- [attr.aria-label]="'Page ' + vm()!.totalPages"
1044
- style="min-width:32px;padding:4px 8px"
1045
- >{{ vm()!.totalPages }}</button>
1046
- }
1047
-
1048
- <button
1049
- type="button"
1050
- class="p-button p-button-text p-button-sm"
1051
- [disabled]="currentPage >= vm()!.totalPages"
1052
- (click)="pageChange.emit(currentPage + 1)"
1053
- aria-label="Next page"
1054
- style="min-width:32px;padding:4px 8px"
1055
- >&rsaquo;</button>
1056
- <button
1057
- type="button"
1058
- class="p-button p-button-text p-button-sm"
1059
- [disabled]="currentPage >= vm()!.totalPages"
1060
- (click)="pageChange.emit(vm()!.totalPages)"
1061
- aria-label="Last page"
1062
- style="min-width:32px;padding:4px 8px"
1063
- >&raquo;</button>
1064
- </div>
1065
-
1066
- <div class="ogrid-pagination__size" style="display:flex;align-items:center;gap:6px">
1067
- <span style="font-size:12px">Rows</span>
1068
- <select
1069
- [value]="'' + pageSize"
1070
- (change)="onPageSizeChange($any($event.target).value)"
1071
- aria-label="Rows per page"
1072
- style="padding:4px 6px;border:1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));border-radius:4px;background:var(--ogrid-bg, #fff);color:var(--ogrid-fg, #242424)"
1073
- >
1074
- @for (opt of vm()!.pageSizeOptions; track opt) {
1075
- <option [value]="opt">{{ opt }}</option>
1076
- }
1077
- </select>
1078
- </div>
1079
- </div>
1080
- }
1081
- `,styles:[`
1082
- :host { display: block; }
1083
- @media (max-width: 576px) {
1084
- .ogrid-pagination { flex-direction: column; align-items: stretch; gap: 6px; padding: 6px 8px; font-size: 12px; }
1085
- .ogrid-pagination__pages { order: -1; justify-content: center; }
1086
- .ogrid-pagination__info { text-align: center; font-size: 11px; }
1087
- .ogrid-pagination__size { font-size: 11px; justify-content: center; }
1088
- }
1089
- `]})],h);var v=class{constructor(){this.service=inject(OGridService);this.propsSignal=signal(void 0);this.onColumnSortFn=(l,o)=>this.service.handleSort(l,o);this.onColumnResizedFn=(l,o)=>this.service.handleColumnResized(l,o);this.onColumnPinnedFn=(l,o)=>this.service.handleColumnPinned(l,o);this.onSelectionChangeFn=l=>this.service.handleSelectionChange(l);this.onFilterChangeFn=(l,o)=>this.service.handleFilterChange(l,o);this.clearAllFiltersFn=()=>this.service.setFilters({});this.emptyStateComputed=computed(()=>({hasActiveFilters:this.service.hasActiveFilters(),onClearAll:this.clearAllFiltersFn,message:this.service.emptyState()?.message,render:this.service.emptyState()?.render}));effect(()=>{let l=this.propsSignal();l&&this.service.configure(l);});}set props(l){this.propsSignal.set(l);}get showToolbar(){return this.service.columnChooserPlacement()==="toolbar"||this.service.toolbar()!=null||this.service.fullScreen()}get emptyStateObj(){return this.emptyStateComputed()}onPageSizeChange(l){this.service.setPageSize(l);}};e([Input({required:true})],v.prototype,"props",1),v=e([Component({selector:"ogrid-primeng",standalone:true,imports:[OGridLayoutComponent,t,m,h],changeDetection:ChangeDetectionStrategy.OnPush,providers:[OGridService],styles:[":host { display: block; height: 100%; }"],template:`
1090
- <ogrid-layout
1091
- [className]="service.className()"
1092
- [hasToolbar]="showToolbar"
1093
- [hasToolbarBelow]="false"
1094
- [hasPagination]="true"
1095
- [sideBar]="service.sideBarProps()"
1096
- [fullScreen]="service.fullScreen()"
1097
- [showNameBox]="!!(service.cellReferences() && !service.formulasEnabled())"
1098
- [activeCellRef]="service.activeCellRef()"
1099
- [formulaBar]="service.formulasEnabled() ? service.formulaBarState() : null"
1100
- [sheetDefs]="service.sheetDefs()"
1101
- [activeSheet]="service.activeSheet()"
1102
- [onSheetChange]="service.onSheetChange()"
1103
- [onSheetAdd]="service.onSheetAdd()"
1104
- >
1105
- <ng-content select="[toolbar]" toolbar></ng-content>
1106
-
1107
- <div toolbarEnd>
1108
- @if (service.columnChooserPlacement() === 'toolbar') {
1109
- <ogrid-primeng-column-chooser
1110
- [columns]="service.columnChooser().columns"
1111
- [visibleColumns]="service.columnChooser().visibleColumns"
1112
- (visibilityChange)="service.handleVisibilityChange($event.columnKey, $event.visible)"
1113
- ></ogrid-primeng-column-chooser>
1114
- }
1115
- </div>
1116
-
1117
- <ogrid-primeng-datagrid-table
1118
- [items]="service.displayItems()"
1119
- [columns]="service.columnsProp()"
1120
- [getRowId]="service.getRowId()"
1121
- [sortBy]="service.sort().field"
1122
- [sortDirection]="service.sort().direction"
1123
- [onColumnSort]="onColumnSortFn"
1124
- [visibleColumns]="service.visibleColumns()"
1125
- [columnOrder]="service.columnOrder()"
1126
- [onColumnOrderChange]="service.onColumnOrderChange()"
1127
- [onColumnResized]="onColumnResizedFn"
1128
- [onColumnPinned]="onColumnPinnedFn"
1129
- [editable]="service.editable()"
1130
- [cellSelection]="service.cellSelection()"
1131
- [onCellValueChanged]="service.onCellValueChanged()"
1132
- [onUndo]="service.onUndo()"
1133
- [onRedo]="service.onRedo()"
1134
- [canUndo]="service.canUndo()"
1135
- [canRedo]="service.canRedo()"
1136
- [rowSelection]="service.rowSelection()"
1137
- [selectedRows]="service.effectiveSelectedRows()"
1138
- [onSelectionChange]="onSelectionChangeFn"
1139
- [statusBar]="service.statusBarConfig()"
1140
- [isLoading]="service.isLoadingResolved()"
1141
- [filters]="service.filters()"
1142
- [onFilterChange]="onFilterChangeFn"
1143
- [filterOptions]="service.clientFilterOptions()"
1144
- [loadingFilterOptions]="service.loadingFilterOptions()"
1145
- [peopleSearch]="service.dataSource()?.searchPeople?.bind(service.dataSource())"
1146
- [getUserByEmail]="service.dataSource()?.getUserByEmail?.bind(service.dataSource())"
1147
- [layoutMode]="service.layoutMode()"
1148
- [suppressHorizontalScroll]="service.suppressHorizontalScroll()"
1149
- [stickyHeaderInput]="service.stickyHeader()"
1150
- [columnReorder]="service.columnReorder()"
1151
- [aria-label]="service.ariaLabel()"
1152
- [aria-labelledby]="service.ariaLabelledBy()"
1153
- [emptyState]="emptyStateObj"
1154
- [groupBy]="service.groupBy()"
1155
- [showRowNumbers]="service.dataGridProps().showRowNumbers ?? false"
1156
- [showColumnLetters]="service.dataGridProps().showColumnLetters ?? false"
1157
- [showNameBox]="service.dataGridProps().showNameBox ?? false"
1158
- [onActiveCellChange]="service.dataGridProps().onActiveCellChange"
1159
- [formulaReferences]="service.dataGridProps().formulaReferences"
1160
- ></ogrid-primeng-datagrid-table>
1161
-
1162
- <div pagination>
1163
- <ogrid-primeng-pagination-controls
1164
- [currentPage]="service.pagination().page"
1165
- [pageSize]="service.pagination().pageSize"
1166
- [totalCount]="service.pagination().displayTotalCount"
1167
- [pageSizeOptions]="service.pageSizeOptions()"
1168
- [entityLabelPlural]="service.entityLabelPlural()"
1169
- (pageChange)="service.setPage($event)"
1170
- (pageSizeChange)="onPageSizeChange($event)"
1171
- ></ogrid-primeng-pagination-controls>
1172
- </div>
1173
- </ogrid-layout>
1174
- `})],v);export{m as ColumnChooserComponent,p as ColumnHeaderFilterComponent,c as ColumnHeaderMenuComponent,t as DataGridTableComponent,u as InlineCellEditorComponent,v as OGridComponent,h as PaginationControlsComponent,g as PopoverCellEditorComponent};
1
+ // Explicit named re-exports from base package (replaces export * for better tree-shaking).
2
+ // Core value exports
3
+ export { toUserLike, isInSelectionRange, normalizeSelectionRange, escapeCsvValue, buildCsvHeader, buildCsvRows, exportToCsv, triggerCsvDownload, getCellValue, 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, getHeaderFilterConfig, getCellRenderDescriptor, resolveCellDisplayContent, resolveCellStyle, buildInlineEditorProps, buildPopoverEditorProps, debounce, measureRange, 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, CHECKBOX_COLUMN_WIDTH, ROW_NUMBER_COLUMN_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-angular';
4
+ // Angular services and components
5
+ export { OGridService, DataGridStateService, DataGridLayoutHelper, DataGridEditingHelper, DataGridInteractionHelper, ColumnReorderService, VirtualScrollService, OGridLayoutComponent, StatusBarComponent, GridContextMenuComponent, SideBarComponent, MarchingAntsOverlayComponent, EmptyStateComponent, BaseOGridComponent, BaseDataGridTableComponent, BaseColumnHeaderFilterComponent, BaseColumnChooserComponent, BasePaginationControlsComponent, BaseInlineCellEditorComponent, INLINE_CELL_EDITOR_TEMPLATE, INLINE_CELL_EDITOR_STYLES, BasePopoverCellEditorComponent, POPOVER_CELL_EDITOR_TEMPLATE, POPOVER_CELL_EDITOR_OVERLAY_STYLES, OGRID_THEME_VARS_CSS, createDebouncedSignal, createDebouncedCallback, createLatestCallback, } from '@alaarab/ogrid-angular';
6
+ // PrimeNG UI components
7
+ export { OGridComponent } from './ogrid/ogrid.component';
8
+ export { DataGridTableComponent } from './datagrid-table/datagrid-table.component';
9
+ export { InlineCellEditorComponent } from './datagrid-table/inline-cell-editor.component';
10
+ export { PopoverCellEditorComponent } from './datagrid-table/popover-cell-editor.component';
11
+ export { ColumnHeaderFilterComponent } from './column-header-filter/column-header-filter.component';
12
+ // IColumnHeaderFilterProps is now exported from @alaarab/ogrid-angular (base class)
13
+ export { ColumnChooserComponent } from './column-chooser/column-chooser.component';
14
+ // IColumnChooserProps is now exported from @alaarab/ogrid-angular (base class)
15
+ export { PaginationControlsComponent } from './pagination-controls/pagination-controls.component';
16
+ export { ColumnHeaderMenuComponent } from './column-header-menu/column-header-menu.component';