@alaarab/ogrid-angular-primeng 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.
- package/dist/esm/column-chooser/column-chooser.component.js +131 -0
- package/dist/esm/column-header-filter/column-header-filter.component.js +465 -0
- package/dist/esm/column-header-menu/column-header-menu.component.js +68 -0
- package/dist/esm/datagrid-table/datagrid-table.component.js +1229 -0
- package/dist/esm/datagrid-table/inline-cell-editor.component.js +154 -0
- package/dist/esm/datagrid-table/popover-cell-editor.component.js +30 -0
- package/dist/esm/index.js +16 -1152
- package/dist/esm/ogrid/ogrid.component.js +178 -0
- package/dist/esm/pagination-controls/pagination-controls.component.js +212 -0
- package/dist/types/column-chooser/column-chooser.component.d.ts +3 -0
- package/dist/types/column-header-filter/column-header-filter.component.d.ts +3 -0
- package/dist/types/column-header-menu/column-header-menu.component.d.ts +3 -0
- package/dist/types/datagrid-table/datagrid-table.component.d.ts +3 -0
- package/dist/types/datagrid-table/inline-cell-editor.component.d.ts +3 -0
- package/dist/types/datagrid-table/popover-cell-editor.component.d.ts +3 -0
- package/dist/types/ogrid/ogrid.component.d.ts +3 -0
- package/dist/types/pagination-controls/pagination-controls.component.d.ts +3 -0
- package/package.json +3 -3
|
@@ -0,0 +1,1229 @@
|
|
|
1
|
+
import { Component, Input, signal, computed, effect, ViewChild, ChangeDetectionStrategy, ViewEncapsulation, } from '@angular/core';
|
|
2
|
+
import { BaseDataGridTableComponent, DataGridStateService, ColumnReorderService, VirtualScrollService, StatusBarComponent, GridContextMenuComponent, MarchingAntsOverlayComponent, EmptyStateComponent, FormulaRefOverlayComponent, DEFAULT_MIN_COLUMN_WIDTH, ROW_NUMBER_COLUMN_ID, ROW_NUMBER_COLUMN_MIN_WIDTH, indexToColumnLetter, formatCellReference, } from '@alaarab/ogrid-angular';
|
|
3
|
+
import { ColumnHeaderFilterComponent } from '../column-header-filter/column-header-filter.component';
|
|
4
|
+
import { ColumnHeaderMenuComponent } from '../column-header-menu/column-header-menu.component';
|
|
5
|
+
import { InlineCellEditorComponent } from './inline-cell-editor.component';
|
|
6
|
+
import { PopoverCellEditorComponent } from './popover-cell-editor.component';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
const _c0 = ["wrapper"];
|
|
9
|
+
const _c1 = ["tableContainer"];
|
|
10
|
+
const _c2 = () => [];
|
|
11
|
+
const _forTrack0 = ($index, $item) => $item.columnId;
|
|
12
|
+
const _forTrack1 = ($index, $item) => ($item.columnDef == null ? null : $item.columnDef.columnId) ?? $index;
|
|
13
|
+
function DataGridTableComponent_Conditional_9_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
14
|
+
i0.ɵɵelement(0, "th", 14);
|
|
15
|
+
} }
|
|
16
|
+
function DataGridTableComponent_Conditional_9_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
17
|
+
i0.ɵɵelement(0, "th", 14);
|
|
18
|
+
} }
|
|
19
|
+
function DataGridTableComponent_Conditional_9_For_4_Template(rf, ctx) { if (rf & 1) {
|
|
20
|
+
i0.ɵɵelementStart(0, "th", 14);
|
|
21
|
+
i0.ɵɵtext(1);
|
|
22
|
+
i0.ɵɵelementEnd();
|
|
23
|
+
} if (rf & 2) {
|
|
24
|
+
const ɵ$index_24_r2 = ctx.$index;
|
|
25
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
26
|
+
i0.ɵɵadvance();
|
|
27
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r2.getColumnLetter(ɵ$index_24_r2), " ");
|
|
28
|
+
} }
|
|
29
|
+
function DataGridTableComponent_Conditional_9_Template(rf, ctx) { if (rf & 1) {
|
|
30
|
+
i0.ɵɵelementStart(0, "tr", 6);
|
|
31
|
+
i0.ɵɵconditionalCreate(1, DataGridTableComponent_Conditional_9_Conditional_1_Template, 1, 0, "th", 14);
|
|
32
|
+
i0.ɵɵconditionalCreate(2, DataGridTableComponent_Conditional_9_Conditional_2_Template, 1, 0, "th", 14);
|
|
33
|
+
i0.ɵɵrepeaterCreate(3, DataGridTableComponent_Conditional_9_For_4_Template, 2, 1, "th", 14, _forTrack0);
|
|
34
|
+
i0.ɵɵelementEnd();
|
|
35
|
+
} if (rf & 2) {
|
|
36
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
37
|
+
i0.ɵɵadvance();
|
|
38
|
+
i0.ɵɵconditional(ctx_r2.hasCheckboxCol() ? 1 : -1);
|
|
39
|
+
i0.ɵɵadvance();
|
|
40
|
+
i0.ɵɵconditional(ctx_r2.hasRowNumbersCol() ? 2 : -1);
|
|
41
|
+
i0.ɵɵadvance();
|
|
42
|
+
i0.ɵɵrepeater(ctx_r2.visibleCols());
|
|
43
|
+
} }
|
|
44
|
+
function DataGridTableComponent_For_11_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
45
|
+
const _r4 = i0.ɵɵgetCurrentView();
|
|
46
|
+
i0.ɵɵelementStart(0, "th", 15)(1, "input", 18);
|
|
47
|
+
i0.ɵɵlistener("change", function DataGridTableComponent_For_11_Conditional_1_Template_input_change_1_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.onSelectAllChangePrimeng($event.target.checked)); });
|
|
48
|
+
i0.ɵɵelementEnd()();
|
|
49
|
+
} if (rf & 2) {
|
|
50
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
51
|
+
i0.ɵɵadvance();
|
|
52
|
+
i0.ɵɵproperty("checked", ctx_r2.allSelected())("indeterminate", ctx_r2.someSelected() && !ctx_r2.allSelected());
|
|
53
|
+
} }
|
|
54
|
+
function DataGridTableComponent_For_11_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
55
|
+
i0.ɵɵelement(0, "th");
|
|
56
|
+
} if (rf & 2) {
|
|
57
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
58
|
+
i0.ɵɵattribute("rowSpan", ctx_r2.headerRows().length - 1);
|
|
59
|
+
} }
|
|
60
|
+
function DataGridTableComponent_For_11_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
61
|
+
const _r5 = i0.ɵɵgetCurrentView();
|
|
62
|
+
i0.ɵɵelementStart(0, "th", 19);
|
|
63
|
+
i0.ɵɵtext(1, " # ");
|
|
64
|
+
i0.ɵɵelementStart(2, "div", 20);
|
|
65
|
+
i0.ɵɵlistener("pointerdown", function DataGridTableComponent_For_11_Conditional_3_Template_div_pointerdown_2_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.onResizeRowNumber($event)); })("dblclick", function DataGridTableComponent_For_11_Conditional_3_Template_div_dblclick_2_listener($event) { i0.ɵɵrestoreView(_r5); return i0.ɵɵresetView($event.stopPropagation()); });
|
|
66
|
+
i0.ɵɵelementEnd()();
|
|
67
|
+
} if (rf & 2) {
|
|
68
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
69
|
+
i0.ɵɵstyleProp("width", ctx_r2.getRowNumberWidth(), "px")("min-width", ctx_r2.getRowNumberWidth(), "px")("max-width", ctx_r2.getRowNumberWidth(), "px");
|
|
70
|
+
} }
|
|
71
|
+
function DataGridTableComponent_For_11_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
72
|
+
i0.ɵɵelement(0, "th", 17);
|
|
73
|
+
} if (rf & 2) {
|
|
74
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
75
|
+
i0.ɵɵattribute("rowSpan", ctx_r2.headerRows().length - 1);
|
|
76
|
+
} }
|
|
77
|
+
function DataGridTableComponent_For_11_For_6_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
78
|
+
i0.ɵɵelementStart(0, "th", 21);
|
|
79
|
+
i0.ɵɵtext(1);
|
|
80
|
+
i0.ɵɵelementEnd();
|
|
81
|
+
} if (rf & 2) {
|
|
82
|
+
const cell_r6 = i0.ɵɵnextContext().$implicit;
|
|
83
|
+
i0.ɵɵattribute("colSpan", cell_r6.colSpan);
|
|
84
|
+
i0.ɵɵadvance();
|
|
85
|
+
i0.ɵɵtextInterpolate1(" ", cell_r6.label, " ");
|
|
86
|
+
} }
|
|
87
|
+
function DataGridTableComponent_For_11_For_6_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
88
|
+
const _r7 = i0.ɵɵgetCurrentView();
|
|
89
|
+
i0.ɵɵdeclareLet(0);
|
|
90
|
+
i0.ɵɵelementStart(1, "th", 23);
|
|
91
|
+
i0.ɵɵlistener("pointerdown", function DataGridTableComponent_For_11_For_6_Conditional_1_Template_th_pointerdown_1_listener($event) { i0.ɵɵrestoreView(_r7); const col_r8 = i0.ɵɵreadContextLet(0); const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.onHeaderMouseDown(col_r8.columnId, $event)); });
|
|
92
|
+
i0.ɵɵelementStart(2, "div", 24);
|
|
93
|
+
i0.ɵɵelement(3, "ogrid-primeng-column-header-filter", 25)(4, "column-header-menu", 26);
|
|
94
|
+
i0.ɵɵelementEnd();
|
|
95
|
+
i0.ɵɵelementStart(5, "div", 27);
|
|
96
|
+
i0.ɵɵlistener("pointerdown", function DataGridTableComponent_For_11_For_6_Conditional_1_Template_div_pointerdown_5_listener($event) { i0.ɵɵrestoreView(_r7); const col_r8 = i0.ɵɵreadContextLet(0); const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.onResizeStartPrimeng($event, col_r8)); })("dblclick", function DataGridTableComponent_For_11_For_6_Conditional_1_Template_div_dblclick_5_listener($event) { i0.ɵɵrestoreView(_r7); const col_r8 = i0.ɵɵreadContextLet(0); const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.onResizeDoubleClick($event, col_r8)); });
|
|
97
|
+
i0.ɵɵelementEnd()();
|
|
98
|
+
} if (rf & 2) {
|
|
99
|
+
const cell_r6 = i0.ɵɵnextContext().$implicit;
|
|
100
|
+
const ɵ$index_28_r9 = i0.ɵɵnextContext().$index;
|
|
101
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
102
|
+
const col_r10 = i0.ɵɵstoreLet(ctx_r2.asColumnDef(cell_r6.columnDef));
|
|
103
|
+
const pinned_r11 = ctx_r2.isPinned(col_r10.columnId);
|
|
104
|
+
const config_r12 = ctx_r2.getFilterConfig(col_r10);
|
|
105
|
+
const sortState_r13 = ctx_r2.getSortState(col_r10.columnId);
|
|
106
|
+
const ariaSort_r14 = sortState_r13 === "asc" ? "ascending" : sortState_r13 === "desc" ? "descending" : null;
|
|
107
|
+
i0.ɵɵadvance();
|
|
108
|
+
i0.ɵɵstyleProp("min-width", ctx_r2.getEffectiveMinWidth(col_r10), "px")("width", ctx_r2.getColumnWidth(col_r10), "px")("max-width", ctx_r2.getColumnWidth(col_r10), "px")("left", pinned_r11 === "left" ? ctx_r2.getPinnedLeftOffset(col_r10.columnId) : null, "px")("right", pinned_r11 === "right" ? ctx_r2.getPinnedRightOffset(col_r10.columnId) : null, "px")("cursor", ctx_r2.columnReorderService.isDragging() ? "grabbing" : "grab");
|
|
109
|
+
i0.ɵɵclassProp("ogrid-th-pinned-left", pinned_r11 === "left")("ogrid-th-pinned-right", pinned_r11 === "right");
|
|
110
|
+
i0.ɵɵattribute("data-column-id", col_r10.columnId)("aria-sort", ariaSort_r14)("rowSpan", ctx_r2.headerRows().length > 1 && ɵ$index_28_r9 < ctx_r2.headerRows().length - 1 ? ctx_r2.headerRows().length - ɵ$index_28_r9 : null);
|
|
111
|
+
i0.ɵɵadvance(2);
|
|
112
|
+
i0.ɵɵproperty("columnKey", col_r10.columnId)("columnName", col_r10.name)("filterType", config_r12.filterType)("isSorted", config_r12.isSorted ?? false)("isSortedDescending", config_r12.isSortedDescending ?? false)("onSort", config_r12.onSort)("selectedValues", config_r12.selectedValues)("onFilterChange", config_r12.onFilterChange)("options", config_r12.options ?? i0.ɵɵpureFunction0(46, _c2))("isLoadingOptions", config_r12.isLoadingOptions ?? false)("textValue", config_r12.textValue ?? "")("onTextChange", config_r12.onTextChange)("selectedUser", config_r12.selectedUser)("onUserChange", config_r12.onUserChange)("peopleSearch", config_r12.peopleSearch)("dateValue", config_r12.dateValue)("onDateChange", config_r12.onDateChange);
|
|
113
|
+
const colPinState_r15 = ctx_r2.getPinState(col_r10.columnId);
|
|
114
|
+
i0.ɵɵadvance();
|
|
115
|
+
i0.ɵɵproperty("columnId", col_r10.columnId)("canPinLeft", colPinState_r15.canPinLeft)("canPinRight", colPinState_r15.canPinRight)("canUnpin", colPinState_r15.canUnpin)("currentSort", sortState_r13)("isSortable", col_r10.sortable !== false)("isResizable", col_r10.resizable !== false)("handlers", ctx_r2.getColumnMenuHandlersMemoized(col_r10.columnId));
|
|
116
|
+
i0.ɵɵadvance();
|
|
117
|
+
i0.ɵɵattribute("aria-label", "Resize " + col_r10.name);
|
|
118
|
+
} }
|
|
119
|
+
function DataGridTableComponent_For_11_For_6_Template(rf, ctx) { if (rf & 1) {
|
|
120
|
+
i0.ɵɵconditionalCreate(0, DataGridTableComponent_For_11_For_6_Conditional_0_Template, 2, 2, "th", 21)(1, DataGridTableComponent_For_11_For_6_Conditional_1_Template, 6, 47, "th", 22);
|
|
121
|
+
} if (rf & 2) {
|
|
122
|
+
const cell_r6 = ctx.$implicit;
|
|
123
|
+
i0.ɵɵconditional(cell_r6.isGroup ? 0 : 1);
|
|
124
|
+
} }
|
|
125
|
+
function DataGridTableComponent_For_11_Template(rf, ctx) { if (rf & 1) {
|
|
126
|
+
i0.ɵɵelementStart(0, "tr");
|
|
127
|
+
i0.ɵɵconditionalCreate(1, DataGridTableComponent_For_11_Conditional_1_Template, 2, 2, "th", 15);
|
|
128
|
+
i0.ɵɵconditionalCreate(2, DataGridTableComponent_For_11_Conditional_2_Template, 1, 1, "th");
|
|
129
|
+
i0.ɵɵconditionalCreate(3, DataGridTableComponent_For_11_Conditional_3_Template, 3, 6, "th", 16);
|
|
130
|
+
i0.ɵɵconditionalCreate(4, DataGridTableComponent_For_11_Conditional_4_Template, 1, 1, "th", 17);
|
|
131
|
+
i0.ɵɵrepeaterCreate(5, DataGridTableComponent_For_11_For_6_Template, 2, 1, null, null, _forTrack1);
|
|
132
|
+
i0.ɵɵelementEnd();
|
|
133
|
+
} if (rf & 2) {
|
|
134
|
+
const row_r16 = ctx.$implicit;
|
|
135
|
+
const ɵ$index_28_r9 = ctx.$index;
|
|
136
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
137
|
+
i0.ɵɵadvance();
|
|
138
|
+
i0.ɵɵconditional(ɵ$index_28_r9 === ctx_r2.headerRows().length - 1 && ctx_r2.hasCheckboxCol() ? 1 : -1);
|
|
139
|
+
i0.ɵɵadvance();
|
|
140
|
+
i0.ɵɵconditional(ɵ$index_28_r9 === 0 && ɵ$index_28_r9 < ctx_r2.headerRows().length - 1 && ctx_r2.hasCheckboxCol() ? 2 : -1);
|
|
141
|
+
i0.ɵɵadvance();
|
|
142
|
+
i0.ɵɵconditional(ɵ$index_28_r9 === ctx_r2.headerRows().length - 1 && ctx_r2.hasRowNumbersCol() ? 3 : -1);
|
|
143
|
+
i0.ɵɵadvance();
|
|
144
|
+
i0.ɵɵconditional(ɵ$index_28_r9 === 0 && ɵ$index_28_r9 < ctx_r2.headerRows().length - 1 && ctx_r2.hasRowNumbersCol() ? 4 : -1);
|
|
145
|
+
i0.ɵɵadvance();
|
|
146
|
+
i0.ɵɵrepeater(row_r16);
|
|
147
|
+
} }
|
|
148
|
+
function DataGridTableComponent_Conditional_12_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
149
|
+
i0.ɵɵelement(0, "tr");
|
|
150
|
+
} if (rf & 2) {
|
|
151
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
152
|
+
i0.ɵɵstyleProp("height", ctx_r2.vsTopSpacerHeight(), "px");
|
|
153
|
+
} }
|
|
154
|
+
function DataGridTableComponent_Conditional_12_For_3_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
155
|
+
const _r19 = i0.ɵɵgetCurrentView();
|
|
156
|
+
i0.ɵɵelementStart(0, "td", 35);
|
|
157
|
+
i0.ɵɵlistener("click", function DataGridTableComponent_Conditional_12_For_3_Conditional_3_Template_td_click_0_listener($event) { i0.ɵɵrestoreView(_r19); return i0.ɵɵresetView($event.stopPropagation()); });
|
|
158
|
+
i0.ɵɵelementStart(1, "input", 36);
|
|
159
|
+
i0.ɵɵlistener("change", function DataGridTableComponent_Conditional_12_For_3_Conditional_3_Template_input_change_1_listener($event) { i0.ɵɵrestoreView(_r19); const item_r18 = i0.ɵɵnextContext().$implicit; const rowIndex_r20 = i0.ɵɵreadContextLet(0); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.onRowCheckboxChangePrimeng(item_r18, $event.target.checked, rowIndex_r20, $event)); });
|
|
160
|
+
i0.ɵɵelementEnd()();
|
|
161
|
+
} if (rf & 2) {
|
|
162
|
+
i0.ɵɵnextContext();
|
|
163
|
+
const rowIndex_r20 = i0.ɵɵreadContextLet(0);
|
|
164
|
+
const isSelected_r21 = i0.ɵɵreadContextLet(1);
|
|
165
|
+
i0.ɵɵattribute("data-row-index", rowIndex_r20)("data-col-index", 0);
|
|
166
|
+
i0.ɵɵadvance();
|
|
167
|
+
i0.ɵɵproperty("checked", isSelected_r21);
|
|
168
|
+
i0.ɵɵattribute("aria-label", "Select row " + (rowIndex_r20 + 1));
|
|
169
|
+
} }
|
|
170
|
+
function DataGridTableComponent_Conditional_12_For_3_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
171
|
+
i0.ɵɵelementStart(0, "td", 37);
|
|
172
|
+
i0.ɵɵtext(1);
|
|
173
|
+
i0.ɵɵelementEnd();
|
|
174
|
+
} if (rf & 2) {
|
|
175
|
+
i0.ɵɵnextContext();
|
|
176
|
+
const rowIndex_r20 = i0.ɵɵreadContextLet(0);
|
|
177
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
178
|
+
i0.ɵɵstyleProp("width", ctx_r2.getRowNumberWidth(), "px")("min-width", ctx_r2.getRowNumberWidth(), "px")("max-width", ctx_r2.getRowNumberWidth(), "px");
|
|
179
|
+
i0.ɵɵadvance();
|
|
180
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r2.rowNumberOffset() + rowIndex_r20 + 1, " ");
|
|
181
|
+
} }
|
|
182
|
+
function DataGridTableComponent_Conditional_12_For_3_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
183
|
+
i0.ɵɵelement(0, "td");
|
|
184
|
+
} if (rf & 2) {
|
|
185
|
+
const ctx_r2 = i0.ɵɵnextContext(3);
|
|
186
|
+
i0.ɵɵstyleProp("width", ctx_r2.vsLeftSpacerWidth(), "px")("min-width", ctx_r2.vsLeftSpacerWidth(), "px")("max-width", ctx_r2.vsLeftSpacerWidth(), "px")("padding", "0");
|
|
187
|
+
} }
|
|
188
|
+
function DataGridTableComponent_Conditional_12_For_3_For_7_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
189
|
+
const _r22 = i0.ɵɵgetCurrentView();
|
|
190
|
+
i0.ɵɵelementStart(0, "div", 39)(1, "ogrid-primeng-inline-cell-editor", 42);
|
|
191
|
+
i0.ɵɵlistener("commit", function DataGridTableComponent_Conditional_12_For_3_For_7_Conditional_2_Template_ogrid_primeng_inline_cell_editor_commit_1_listener($event) { i0.ɵɵrestoreView(_r22); const col_r23 = i0.ɵɵnextContext().$implicit; const descriptor_r24 = i0.ɵɵreadContextLet(1); const item_r18 = i0.ɵɵnextContext().$implicit; const rowIndex_r20 = i0.ɵɵreadContextLet(0); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.commitEdit(item_r18, col_r23.columnId, descriptor_r24.value, $event, rowIndex_r20, descriptor_r24.globalColIndex)); })("cancel", function DataGridTableComponent_Conditional_12_For_3_For_7_Conditional_2_Template_ogrid_primeng_inline_cell_editor_cancel_1_listener() { i0.ɵɵrestoreView(_r22); const ctx_r2 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r2.cancelEdit()); });
|
|
192
|
+
i0.ɵɵelementEnd()();
|
|
193
|
+
} if (rf & 2) {
|
|
194
|
+
const col_r23 = i0.ɵɵnextContext().$implicit;
|
|
195
|
+
const descriptor_r24 = i0.ɵɵreadContextLet(1);
|
|
196
|
+
const item_r18 = i0.ɵɵnextContext().$implicit;
|
|
197
|
+
const rowIndex_r20 = i0.ɵɵreadContextLet(0);
|
|
198
|
+
i0.ɵɵadvance();
|
|
199
|
+
i0.ɵɵproperty("value", descriptor_r24.value)("item", item_r18)("column", col_r23)("rowIndex", rowIndex_r20)("editorType", descriptor_r24.editorType ?? "text");
|
|
200
|
+
} }
|
|
201
|
+
function DataGridTableComponent_Conditional_12_For_3_For_7_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
202
|
+
i0.ɵɵelement(0, "ogrid-primeng-popover-cell-editor", 40);
|
|
203
|
+
} if (rf & 2) {
|
|
204
|
+
const col_r23 = i0.ɵɵnextContext().$implicit;
|
|
205
|
+
const descriptor_r24 = i0.ɵɵreadContextLet(1);
|
|
206
|
+
const item_r18 = i0.ɵɵnextContext().$implicit;
|
|
207
|
+
const rowIndex_r20 = i0.ɵɵreadContextLet(0);
|
|
208
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
209
|
+
const editorProps_r25 = ctx_r2.buildPopoverEditorProps(item_r18, col_r23, descriptor_r24);
|
|
210
|
+
i0.ɵɵproperty("item", item_r18)("column", col_r23)("rowIndex", rowIndex_r20)("globalColIndex", descriptor_r24.globalColIndex)("displayValue", descriptor_r24.displayValue)("editorProps", editorProps_r25)("onCancel", ctx_r2.cancelEditHandler);
|
|
211
|
+
} }
|
|
212
|
+
function DataGridTableComponent_Conditional_12_For_3_For_7_Conditional_4_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
213
|
+
const _r27 = i0.ɵɵgetCurrentView();
|
|
214
|
+
i0.ɵɵelementStart(0, "input", 47);
|
|
215
|
+
i0.ɵɵlistener("change", function DataGridTableComponent_Conditional_12_For_3_For_7_Conditional_4_Conditional_1_Template_input_change_0_listener() { i0.ɵɵrestoreView(_r27); const col_r23 = i0.ɵɵnextContext(2).$implicit; const descriptor_r24 = i0.ɵɵreadContextLet(1); const item_r18 = i0.ɵɵnextContext().$implicit; const rowIndex_r20 = i0.ɵɵreadContextLet(0); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(descriptor_r24.canEditAny ? ctx_r2.commitBooleanEdit(item_r18, col_r23.columnId, !!descriptor_r24.displayValue, rowIndex_r20, descriptor_r24.globalColIndex) : null); })("pointerdown", function DataGridTableComponent_Conditional_12_For_3_For_7_Conditional_4_Conditional_1_Template_input_pointerdown_0_listener($event) { i0.ɵɵrestoreView(_r27); i0.ɵɵnextContext(2); const descriptor_r24 = i0.ɵɵreadContextLet(1); i0.ɵɵnextContext(); const rowIndex_r20 = i0.ɵɵreadContextLet(0); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.onBooleanCheckboxPointerDown($event, rowIndex_r20, descriptor_r24.globalColIndex)); })("click", function DataGridTableComponent_Conditional_12_For_3_For_7_Conditional_4_Conditional_1_Template_input_click_0_listener($event) { i0.ɵɵrestoreView(_r27); return i0.ɵɵresetView($event.stopPropagation()); });
|
|
216
|
+
i0.ɵɵelementEnd();
|
|
217
|
+
} if (rf & 2) {
|
|
218
|
+
i0.ɵɵnextContext(2);
|
|
219
|
+
const descriptor_r24 = i0.ɵɵreadContextLet(1);
|
|
220
|
+
i0.ɵɵstyleProp("cursor", descriptor_r24.canEditAny ? "pointer" : "default");
|
|
221
|
+
i0.ɵɵproperty("checked", !!descriptor_r24.displayValue)("disabled", !descriptor_r24.canEditAny);
|
|
222
|
+
i0.ɵɵattribute("aria-label", descriptor_r24.displayValue ? "Checked" : "Unchecked");
|
|
223
|
+
} }
|
|
224
|
+
function DataGridTableComponent_Conditional_12_For_3_For_7_Conditional_4_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
225
|
+
i0.ɵɵelementStart(0, "span");
|
|
226
|
+
i0.ɵɵtext(1);
|
|
227
|
+
i0.ɵɵelementEnd();
|
|
228
|
+
} if (rf & 2) {
|
|
229
|
+
const col_r23 = i0.ɵɵnextContext(2).$implicit;
|
|
230
|
+
const descriptor_r24 = i0.ɵɵreadContextLet(1);
|
|
231
|
+
const item_r18 = i0.ɵɵnextContext().$implicit;
|
|
232
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
233
|
+
i0.ɵɵstyleMap(ctx_r2.resolveCellStyleFn(col_r23, item_r18, descriptor_r24.displayValue));
|
|
234
|
+
i0.ɵɵadvance();
|
|
235
|
+
i0.ɵɵtextInterpolate(ctx_r2.resolveCellContent(col_r23, item_r18, descriptor_r24.displayValue));
|
|
236
|
+
} }
|
|
237
|
+
function DataGridTableComponent_Conditional_12_For_3_For_7_Conditional_4_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
238
|
+
const _r28 = i0.ɵɵgetCurrentView();
|
|
239
|
+
i0.ɵɵelementStart(0, "div", 48);
|
|
240
|
+
i0.ɵɵlistener("pointerdown", function DataGridTableComponent_Conditional_12_For_3_For_7_Conditional_4_Conditional_3_Template_div_pointerdown_0_listener($event) { i0.ɵɵrestoreView(_r28); const ctx_r2 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r2.onFillHandleMouseDown($event)); });
|
|
241
|
+
i0.ɵɵelementEnd();
|
|
242
|
+
} }
|
|
243
|
+
function DataGridTableComponent_Conditional_12_For_3_For_7_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
244
|
+
const _r26 = i0.ɵɵgetCurrentView();
|
|
245
|
+
i0.ɵɵelementStart(0, "div", 43);
|
|
246
|
+
i0.ɵɵlistener("pointerdown", function DataGridTableComponent_Conditional_12_For_3_For_7_Conditional_4_Template_div_pointerdown_0_listener($event) { i0.ɵɵrestoreView(_r26); i0.ɵɵnextContext(); const descriptor_r24 = i0.ɵɵreadContextLet(1); i0.ɵɵnextContext(); const rowIndex_r20 = i0.ɵɵreadContextLet(0); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.onCellMouseDown($event, rowIndex_r20, descriptor_r24.globalColIndex)); })("click", function DataGridTableComponent_Conditional_12_For_3_For_7_Conditional_4_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r26); i0.ɵɵnextContext(); const descriptor_r24 = i0.ɵɵreadContextLet(1); i0.ɵɵnextContext(); const rowIndex_r20 = i0.ɵɵreadContextLet(0); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.onCellClick(rowIndex_r20, descriptor_r24.globalColIndex)); })("dblclick", function DataGridTableComponent_Conditional_12_For_3_For_7_Conditional_4_Template_div_dblclick_0_listener() { i0.ɵɵrestoreView(_r26); const col_r23 = i0.ɵɵnextContext().$implicit; const descriptor_r24 = i0.ɵɵreadContextLet(1); const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(descriptor_r24.canEditAny ? ctx_r2.onCellDblClick(descriptor_r24.rowId, col_r23.columnId) : null); })("contextmenu", function DataGridTableComponent_Conditional_12_For_3_For_7_Conditional_4_Template_div_contextmenu_0_listener($event) { i0.ɵɵrestoreView(_r26); const ctx_r2 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r2.onCellContextMenu($event)); });
|
|
247
|
+
i0.ɵɵconditionalCreate(1, DataGridTableComponent_Conditional_12_For_3_For_7_Conditional_4_Conditional_1_Template, 1, 5, "input", 44)(2, DataGridTableComponent_Conditional_12_For_3_For_7_Conditional_4_Conditional_2_Template, 2, 3, "span", 45);
|
|
248
|
+
i0.ɵɵconditionalCreate(3, DataGridTableComponent_Conditional_12_For_3_For_7_Conditional_4_Conditional_3_Template, 1, 0, "div", 46);
|
|
249
|
+
i0.ɵɵelementEnd();
|
|
250
|
+
} if (rf & 2) {
|
|
251
|
+
const col_r23 = i0.ɵɵnextContext().$implicit;
|
|
252
|
+
const descriptor_r24 = i0.ɵɵreadContextLet(1);
|
|
253
|
+
i0.ɵɵnextContext();
|
|
254
|
+
const rowIndex_r20 = i0.ɵɵreadContextLet(0);
|
|
255
|
+
i0.ɵɵstyleProp("cursor", descriptor_r24.canEditAny ? "cell" : "default")("background", descriptor_r24.isInRange && !descriptor_r24.isActive ? "var(--ogrid-range-bg, rgba(33, 115, 70, 0.08))" : descriptor_r24.isActive && descriptor_r24.isInRange ? "var(--ogrid-bg, #fff)" : null)("outline", descriptor_r24.isActive && !descriptor_r24.isInRange ? "2px solid var(--ogrid-selection, #217346)" : null)("outline-offset", descriptor_r24.isActive && !descriptor_r24.isInRange ? "-2px" : null);
|
|
256
|
+
i0.ɵɵattribute("data-row-index", rowIndex_r20)("data-col-index", descriptor_r24.globalColIndex)("data-active-cell", descriptor_r24.isActive ? "true" : null)("data-in-range", descriptor_r24.isInRange ? "true" : null)("tabindex", descriptor_r24.isActive ? 0 : -1);
|
|
257
|
+
i0.ɵɵadvance();
|
|
258
|
+
i0.ɵɵconditional(col_r23.type === "boolean" ? 1 : 2);
|
|
259
|
+
i0.ɵɵadvance(2);
|
|
260
|
+
i0.ɵɵconditional(descriptor_r24.canEditAny && descriptor_r24.isSelectionEndCell ? 3 : -1);
|
|
261
|
+
} }
|
|
262
|
+
function DataGridTableComponent_Conditional_12_For_3_For_7_Template(rf, ctx) { if (rf & 1) {
|
|
263
|
+
i0.ɵɵelementStart(0, "td", 38);
|
|
264
|
+
i0.ɵɵdeclareLet(1);
|
|
265
|
+
i0.ɵɵconditionalCreate(2, DataGridTableComponent_Conditional_12_For_3_For_7_Conditional_2_Template, 2, 5, "div", 39)(3, DataGridTableComponent_Conditional_12_For_3_For_7_Conditional_3_Template, 1, 7, "ogrid-primeng-popover-cell-editor", 40)(4, DataGridTableComponent_Conditional_12_For_3_For_7_Conditional_4_Template, 4, 15, "div", 41);
|
|
266
|
+
i0.ɵɵelementEnd();
|
|
267
|
+
} if (rf & 2) {
|
|
268
|
+
const col_r23 = ctx.$implicit;
|
|
269
|
+
const item_r18 = i0.ɵɵnextContext().$implicit;
|
|
270
|
+
const rowIndex_r20 = i0.ɵɵreadContextLet(0);
|
|
271
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
272
|
+
const pinned_r29 = ctx_r2.isPinned(col_r23.columnId);
|
|
273
|
+
i0.ɵɵstyleProp("min-width", ctx_r2.getEffectiveMinWidth(col_r23), "px")("width", ctx_r2.getColumnWidth(col_r23), "px")("max-width", ctx_r2.getColumnWidth(col_r23), "px")("left", pinned_r29 === "left" ? ctx_r2.getPinnedLeftOffset(col_r23.columnId) : null, "px")("right", pinned_r29 === "right" ? ctx_r2.getPinnedRightOffset(col_r23.columnId) : null, "px")("text-align", col_r23.type === "numeric" ? "right" : null);
|
|
274
|
+
i0.ɵɵclassProp("ogrid-td-pinned-left", pinned_r29 === "left")("ogrid-td-pinned-right", pinned_r29 === "right");
|
|
275
|
+
i0.ɵɵattribute("data-column-id", col_r23.columnId);
|
|
276
|
+
i0.ɵɵadvance();
|
|
277
|
+
const descriptor_r30 = i0.ɵɵstoreLet(ctx_r2.getCellDescriptor(item_r18, col_r23, rowIndex_r20, ctx_r2.getGlobalColIndex(col_r23)));
|
|
278
|
+
i0.ɵɵadvance();
|
|
279
|
+
i0.ɵɵconditional(descriptor_r30.mode === "editing-inline" ? 2 : descriptor_r30.mode === "editing-popover" ? 3 : 4);
|
|
280
|
+
} }
|
|
281
|
+
function DataGridTableComponent_Conditional_12_For_3_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
282
|
+
i0.ɵɵelement(0, "td");
|
|
283
|
+
} if (rf & 2) {
|
|
284
|
+
const ctx_r2 = i0.ɵɵnextContext(3);
|
|
285
|
+
i0.ɵɵstyleProp("width", ctx_r2.vsRightSpacerWidth(), "px")("min-width", ctx_r2.vsRightSpacerWidth(), "px")("max-width", ctx_r2.vsRightSpacerWidth(), "px")("padding", "0");
|
|
286
|
+
} }
|
|
287
|
+
function DataGridTableComponent_Conditional_12_For_3_Template(rf, ctx) { if (rf & 1) {
|
|
288
|
+
const _r17 = i0.ɵɵgetCurrentView();
|
|
289
|
+
i0.ɵɵdeclareLet(0)(1);
|
|
290
|
+
i0.ɵɵelementStart(2, "tr", 30);
|
|
291
|
+
i0.ɵɵlistener("click", function DataGridTableComponent_Conditional_12_For_3_Template_tr_click_2_listener($event) { const item_r18 = i0.ɵɵrestoreView(_r17).$implicit; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.onRowClickPrimeng($event, item_r18)); });
|
|
292
|
+
i0.ɵɵconditionalCreate(3, DataGridTableComponent_Conditional_12_For_3_Conditional_3_Template, 2, 4, "td", 31);
|
|
293
|
+
i0.ɵɵconditionalCreate(4, DataGridTableComponent_Conditional_12_For_3_Conditional_4_Template, 2, 7, "td", 32);
|
|
294
|
+
i0.ɵɵconditionalCreate(5, DataGridTableComponent_Conditional_12_For_3_Conditional_5_Template, 1, 8, "td", 33);
|
|
295
|
+
i0.ɵɵrepeaterCreate(6, DataGridTableComponent_Conditional_12_For_3_For_7_Template, 5, 19, "td", 34, _forTrack0);
|
|
296
|
+
i0.ɵɵconditionalCreate(8, DataGridTableComponent_Conditional_12_For_3_Conditional_8_Template, 1, 8, "td", 33);
|
|
297
|
+
i0.ɵɵelementEnd();
|
|
298
|
+
} if (rf & 2) {
|
|
299
|
+
const item_r18 = ctx.$implicit;
|
|
300
|
+
const ɵ$index_76_r31 = ctx.$index;
|
|
301
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
302
|
+
i0.ɵɵstoreLet(ctx_r2.vsStartIndex() + ɵ$index_76_r31);
|
|
303
|
+
const rowId_r32 = ctx_r2.getRowIdInput(item_r18);
|
|
304
|
+
i0.ɵɵadvance();
|
|
305
|
+
const isSelected_r33 = i0.ɵɵstoreLet(ctx_r2.selectedRowIds().has(rowId_r32));
|
|
306
|
+
i0.ɵɵadvance();
|
|
307
|
+
i0.ɵɵstyleProp("background", isSelected_r33 ? "var(--ogrid-selected-bg, #e8f0fe)" : null);
|
|
308
|
+
i0.ɵɵattribute("data-row-id", rowId_r32)("aria-selected", isSelected_r33 || null);
|
|
309
|
+
i0.ɵɵadvance();
|
|
310
|
+
i0.ɵɵconditional(ctx_r2.hasCheckboxCol() ? 3 : -1);
|
|
311
|
+
i0.ɵɵadvance();
|
|
312
|
+
i0.ɵɵconditional(ctx_r2.hasRowNumbersCol() ? 4 : -1);
|
|
313
|
+
i0.ɵɵadvance();
|
|
314
|
+
i0.ɵɵconditional(ctx_r2.vsColumnsEnabled() && ctx_r2.vsLeftSpacerWidth() > 0 ? 5 : -1);
|
|
315
|
+
i0.ɵɵadvance();
|
|
316
|
+
i0.ɵɵrepeater(ctx_r2.vsVisibleCols());
|
|
317
|
+
i0.ɵɵadvance(2);
|
|
318
|
+
i0.ɵɵconditional(ctx_r2.vsColumnsEnabled() && ctx_r2.vsRightSpacerWidth() > 0 ? 8 : -1);
|
|
319
|
+
} }
|
|
320
|
+
function DataGridTableComponent_Conditional_12_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
321
|
+
i0.ɵɵelement(0, "tr");
|
|
322
|
+
} if (rf & 2) {
|
|
323
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
324
|
+
i0.ɵɵstyleProp("height", ctx_r2.vsBottomSpacerHeight(), "px");
|
|
325
|
+
} }
|
|
326
|
+
function DataGridTableComponent_Conditional_12_Template(rf, ctx) { if (rf & 1) {
|
|
327
|
+
i0.ɵɵelementStart(0, "tbody");
|
|
328
|
+
i0.ɵɵconditionalCreate(1, DataGridTableComponent_Conditional_12_Conditional_1_Template, 1, 2, "tr", 28);
|
|
329
|
+
i0.ɵɵrepeaterCreate(2, DataGridTableComponent_Conditional_12_For_3_Template, 9, 10, "tr", 29, i0.ɵɵcomponentInstance().trackByRowId, true);
|
|
330
|
+
i0.ɵɵconditionalCreate(4, DataGridTableComponent_Conditional_12_Conditional_4_Template, 1, 2, "tr", 28);
|
|
331
|
+
i0.ɵɵelementEnd();
|
|
332
|
+
} if (rf & 2) {
|
|
333
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
334
|
+
i0.ɵɵadvance();
|
|
335
|
+
i0.ɵɵconditional(ctx_r2.vsEnabled() && ctx_r2.vsTopSpacerHeight() > 0 ? 1 : -1);
|
|
336
|
+
i0.ɵɵadvance();
|
|
337
|
+
i0.ɵɵrepeater(ctx_r2.vsVisibleItems());
|
|
338
|
+
i0.ɵɵadvance(2);
|
|
339
|
+
i0.ɵɵconditional(ctx_r2.vsEnabled() && ctx_r2.vsBottomSpacerHeight() > 0 ? 4 : -1);
|
|
340
|
+
} }
|
|
341
|
+
function DataGridTableComponent_Conditional_14_Template(rf, ctx) { if (rf & 1) {
|
|
342
|
+
i0.ɵɵelement(0, "ogrid-formula-ref-overlay", 8);
|
|
343
|
+
} if (rf & 2) {
|
|
344
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
345
|
+
i0.ɵɵproperty("containerEl", ctx_r2.tableContainerEl())("references", ctx_r2.formulaReferences())("colOffset", ctx_r2.colOffset());
|
|
346
|
+
} }
|
|
347
|
+
function DataGridTableComponent_Conditional_15_Template(rf, ctx) { if (rf & 1) {
|
|
348
|
+
const _r34 = i0.ɵɵgetCurrentView();
|
|
349
|
+
i0.ɵɵelementStart(0, "div", 9)(1, "div")(2, "div", 49);
|
|
350
|
+
i0.ɵɵtext(3, "No results found");
|
|
351
|
+
i0.ɵɵelementEnd();
|
|
352
|
+
i0.ɵɵelementStart(4, "ogrid-empty-state", 50);
|
|
353
|
+
i0.ɵɵlistener("clearAll", function DataGridTableComponent_Conditional_15_Template_ogrid_empty_state_clearAll_4_listener() { let tmp_5_0; i0.ɵɵrestoreView(_r34); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView((tmp_5_0 = ctx_r2.emptyState()) == null ? null : tmp_5_0.onClearAll()); });
|
|
354
|
+
i0.ɵɵelementEnd()()();
|
|
355
|
+
} if (rf & 2) {
|
|
356
|
+
let tmp_4_0;
|
|
357
|
+
let tmp_5_0;
|
|
358
|
+
let tmp_6_0;
|
|
359
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
360
|
+
i0.ɵɵadvance(4);
|
|
361
|
+
i0.ɵɵproperty("message", (tmp_4_0 = ctx_r2.emptyState()) == null ? null : tmp_4_0.message)("hasActiveFilters", ((tmp_5_0 = ctx_r2.emptyState()) == null ? null : tmp_5_0.hasActiveFilters) ?? false)("render", (tmp_6_0 = ctx_r2.emptyState()) == null ? null : tmp_6_0.render);
|
|
362
|
+
} }
|
|
363
|
+
function DataGridTableComponent_Conditional_16_Template(rf, ctx) { if (rf & 1) {
|
|
364
|
+
i0.ɵɵelement(0, "div", 51);
|
|
365
|
+
} if (rf & 2) {
|
|
366
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
367
|
+
i0.ɵɵstyleProp("left", ctx_r2.columnReorderService.dropIndicatorX(), "px");
|
|
368
|
+
} }
|
|
369
|
+
function DataGridTableComponent_Conditional_17_Template(rf, ctx) { if (rf & 1) {
|
|
370
|
+
const _r35 = i0.ɵɵgetCurrentView();
|
|
371
|
+
i0.ɵɵelementStart(0, "ogrid-context-menu", 52);
|
|
372
|
+
i0.ɵɵlistener("copyAction", function DataGridTableComponent_Conditional_17_Template_ogrid_context_menu_copyAction_0_listener() { i0.ɵɵrestoreView(_r35); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.handleCopy()); })("cutAction", function DataGridTableComponent_Conditional_17_Template_ogrid_context_menu_cutAction_0_listener() { i0.ɵɵrestoreView(_r35); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.handleCut()); })("pasteAction", function DataGridTableComponent_Conditional_17_Template_ogrid_context_menu_pasteAction_0_listener() { i0.ɵɵrestoreView(_r35); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.handlePaste()); })("selectAllAction", function DataGridTableComponent_Conditional_17_Template_ogrid_context_menu_selectAllAction_0_listener() { i0.ɵɵrestoreView(_r35); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.handleSelectAllCells()); })("undoAction", function DataGridTableComponent_Conditional_17_Template_ogrid_context_menu_undoAction_0_listener() { i0.ɵɵrestoreView(_r35); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onUndo()); })("redoAction", function DataGridTableComponent_Conditional_17_Template_ogrid_context_menu_redoAction_0_listener() { i0.ɵɵrestoreView(_r35); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onRedo()); })("closeAction", function DataGridTableComponent_Conditional_17_Template_ogrid_context_menu_closeAction_0_listener() { i0.ɵɵrestoreView(_r35); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.closeContextMenu()); });
|
|
373
|
+
i0.ɵɵelementEnd();
|
|
374
|
+
} if (rf & 2) {
|
|
375
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
376
|
+
i0.ɵɵproperty("x", ctx_r2.menuPosition().x)("y", ctx_r2.menuPosition().y)("hasSelection", ctx_r2.hasCellSelection())("canUndoProp", ctx_r2.canUndo())("canRedoProp", ctx_r2.canRedo())("classNames", ctx_r2.contextMenuClasses);
|
|
377
|
+
} }
|
|
378
|
+
function DataGridTableComponent_Conditional_19_Template(rf, ctx) { if (rf & 1) {
|
|
379
|
+
i0.ɵɵelement(0, "ogrid-status-bar", 12);
|
|
380
|
+
} if (rf & 2) {
|
|
381
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
382
|
+
const sbConfig_r36 = i0.ɵɵreadContextLet(18);
|
|
383
|
+
i0.ɵɵproperty("totalCount", sbConfig_r36.totalCount)("filteredCount", sbConfig_r36.filteredCount)("selectedCount", sbConfig_r36.selectedCount ?? ctx_r2.selectedRowIds().size)("selectedCellCount", ctx_r2.selectionCellCount())("aggregation", sbConfig_r36.aggregation)("suppressRowCount", sbConfig_r36.suppressRowCount)("classNames", ctx_r2.statusBarClasses);
|
|
384
|
+
} }
|
|
385
|
+
function DataGridTableComponent_Conditional_20_Template(rf, ctx) { if (rf & 1) {
|
|
386
|
+
i0.ɵɵelementStart(0, "div", 13)(1, "div", 53)(2, "span", 54);
|
|
387
|
+
i0.ɵɵtext(3);
|
|
388
|
+
i0.ɵɵelementEnd()()();
|
|
389
|
+
} if (rf & 2) {
|
|
390
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
391
|
+
i0.ɵɵadvance(3);
|
|
392
|
+
i0.ɵɵtextInterpolate(ctx_r2.loadingMessage());
|
|
393
|
+
} }
|
|
394
|
+
export class DataGridTableComponent extends BaseDataGridTableComponent {
|
|
395
|
+
constructor() {
|
|
396
|
+
super();
|
|
397
|
+
this.sortBy = undefined;
|
|
398
|
+
this.sortDirection = 'asc';
|
|
399
|
+
this.columnOrder = undefined;
|
|
400
|
+
this.onColumnOrderChange = undefined;
|
|
401
|
+
this.onColumnResized = undefined;
|
|
402
|
+
this.onColumnPinned = undefined;
|
|
403
|
+
this.pinnedColumnsInput = undefined;
|
|
404
|
+
this.initialColumnWidths = undefined;
|
|
405
|
+
this.layoutMode = 'fill';
|
|
406
|
+
this.suppressHorizontalScroll = undefined;
|
|
407
|
+
this.stickyHeaderInput = undefined;
|
|
408
|
+
this.columnReorder = undefined;
|
|
409
|
+
this.isLoadingInput = false;
|
|
410
|
+
this.loadingMessageInput = 'Loading\u2026';
|
|
411
|
+
this.editable = undefined;
|
|
412
|
+
this.cellSelection = undefined;
|
|
413
|
+
this.onCellValueChanged = undefined;
|
|
414
|
+
this.onUndoInput = undefined;
|
|
415
|
+
this.onRedoInput = undefined;
|
|
416
|
+
this.canUndoInput = undefined;
|
|
417
|
+
this.canRedoInput = undefined;
|
|
418
|
+
this.rowSelectionMode = 'none';
|
|
419
|
+
this.selectedRows = undefined;
|
|
420
|
+
this.onSelectionChange = undefined;
|
|
421
|
+
this.statusBar = undefined;
|
|
422
|
+
this.filterOptions = {};
|
|
423
|
+
this.loadingFilterOptions = {};
|
|
424
|
+
this.peopleSearch = undefined;
|
|
425
|
+
this.getUserByEmail = undefined;
|
|
426
|
+
this.emptyStateInput = undefined;
|
|
427
|
+
this.onCellError = undefined;
|
|
428
|
+
this.ariaLabelInput = undefined;
|
|
429
|
+
this.ariaLabelledByInput = undefined;
|
|
430
|
+
this.showRowNumbers = false;
|
|
431
|
+
this.showColumnLettersInput = false;
|
|
432
|
+
this.showNameBoxInput = false;
|
|
433
|
+
this.onActiveCellChange = undefined;
|
|
434
|
+
this.formulaReferencesInput = undefined;
|
|
435
|
+
this.currentPageInput = 1;
|
|
436
|
+
this.pageSizeInput = 25;
|
|
437
|
+
this.defaultMinWidth = DEFAULT_MIN_COLUMN_WIDTH;
|
|
438
|
+
this.statusBarClasses = {
|
|
439
|
+
statusBar: 'ogrid-status-bar',
|
|
440
|
+
statusBarItem: 'ogrid-status-bar-item',
|
|
441
|
+
statusBarLabel: 'ogrid-status-bar-label',
|
|
442
|
+
statusBarValue: 'ogrid-status-bar-value',
|
|
443
|
+
};
|
|
444
|
+
this.contextMenuClasses = {
|
|
445
|
+
contextMenu: 'ogrid-context-menu',
|
|
446
|
+
contextMenuItem: 'ogrid-context-menu-item',
|
|
447
|
+
contextMenuItemLabel: 'ogrid-context-menu-item-label',
|
|
448
|
+
contextMenuItemShortcut: 'ogrid-context-menu-item-shortcut',
|
|
449
|
+
contextMenuDivider: 'ogrid-context-menu-divider',
|
|
450
|
+
};
|
|
451
|
+
// PrimeNG uses flat number overrides for column sizing
|
|
452
|
+
this.primengColumnSizingOverrides = signal({}, ...(ngDevMode ? [{ debugName: "primengColumnSizingOverrides" }] : []));
|
|
453
|
+
this.propsSignal = signal(undefined, ...(ngDevMode ? [{ debugName: "propsSignal" }] : []));
|
|
454
|
+
this.resizeStartX = 0;
|
|
455
|
+
this.resizeColumnId = '';
|
|
456
|
+
this.resizeStartWidth = 0;
|
|
457
|
+
// Bound method reference for template
|
|
458
|
+
this.cancelEditHandler = () => this.cancelEdit();
|
|
459
|
+
this.showColumnLetters = computed(() => !!this.getProps()?.showColumnLetters, ...(ngDevMode ? [{ debugName: "showColumnLetters" }] : []));
|
|
460
|
+
this.formulaReferences = computed(() => this.getProps()?.formulaReferences, ...(ngDevMode ? [{ debugName: "formulaReferences" }] : []));
|
|
461
|
+
// --- PrimeNG-specific computed signals ---
|
|
462
|
+
this.resolvedAriaLabel = computed(() => this.ariaLabelInput ?? (this.ariaLabelledByInput ? undefined : 'Data grid'), ...(ngDevMode ? [{ debugName: "resolvedAriaLabel" }] : []));
|
|
463
|
+
this.tableWidthStyle = computed(() => {
|
|
464
|
+
if (this.showEmptyInGrid())
|
|
465
|
+
return '100%';
|
|
466
|
+
if (this.allowOverflowX())
|
|
467
|
+
return 'fit-content';
|
|
468
|
+
if (this.layoutMode === 'content')
|
|
469
|
+
return 'fit-content';
|
|
470
|
+
return '100%';
|
|
471
|
+
}, ...(ngDevMode ? [{ debugName: "tableWidthStyle" }] : []));
|
|
472
|
+
this.tableMinWidthStyle = computed(() => {
|
|
473
|
+
if (this.showEmptyInGrid())
|
|
474
|
+
return '100%';
|
|
475
|
+
if (this.allowOverflowX())
|
|
476
|
+
return 'max-content';
|
|
477
|
+
if (this.layoutMode === 'content')
|
|
478
|
+
return 'max-content';
|
|
479
|
+
return '100%';
|
|
480
|
+
}, ...(ngDevMode ? [{ debugName: "tableMinWidthStyle" }] : []));
|
|
481
|
+
this.initBase();
|
|
482
|
+
// Watch active cell and notify parent via onActiveCellChange when cellReferences is enabled
|
|
483
|
+
effect(() => {
|
|
484
|
+
const props = this.getProps();
|
|
485
|
+
const onActiveCellChange = props?.onActiveCellChange;
|
|
486
|
+
if (!onActiveCellChange)
|
|
487
|
+
return;
|
|
488
|
+
const ac = this.activeCell();
|
|
489
|
+
if (ac) {
|
|
490
|
+
const colIndex = ac.columnIndex - this.colOffset();
|
|
491
|
+
const rowNumber = ac.rowIndex + 1;
|
|
492
|
+
onActiveCellChange(formatCellReference(colIndex, rowNumber));
|
|
493
|
+
}
|
|
494
|
+
else {
|
|
495
|
+
onActiveCellChange(null);
|
|
496
|
+
}
|
|
497
|
+
});
|
|
498
|
+
}
|
|
499
|
+
ngOnChanges(changes) {
|
|
500
|
+
// Initialize column sizing from initial widths
|
|
501
|
+
if (changes['initialColumnWidths']) {
|
|
502
|
+
const iw = this.initialColumnWidths;
|
|
503
|
+
if (iw) {
|
|
504
|
+
this.primengColumnSizingOverrides.set({ ...iw });
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
// Rebuild props and only set if values actually changed (shallow compare)
|
|
508
|
+
const next = this.buildProps();
|
|
509
|
+
const prev = this.propsSignal();
|
|
510
|
+
if (!prev || !this.shallowEqual(prev, next)) {
|
|
511
|
+
this.propsSignal.set(next);
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
/** Shallow-compare two props objects by their top-level keys. */
|
|
515
|
+
shallowEqual(a, b) {
|
|
516
|
+
const aObj = a;
|
|
517
|
+
const bObj = b;
|
|
518
|
+
const keysA = Object.keys(aObj);
|
|
519
|
+
const keysB = Object.keys(bObj);
|
|
520
|
+
if (keysA.length !== keysB.length)
|
|
521
|
+
return false;
|
|
522
|
+
for (const key of keysA) {
|
|
523
|
+
if (aObj[key] !== bObj[key])
|
|
524
|
+
return false;
|
|
525
|
+
}
|
|
526
|
+
return true;
|
|
527
|
+
}
|
|
528
|
+
// --- Abstract method implementations ---
|
|
529
|
+
getProps() {
|
|
530
|
+
return this.propsSignal();
|
|
531
|
+
}
|
|
532
|
+
getWrapperRef() {
|
|
533
|
+
return this.wrapperRef;
|
|
534
|
+
}
|
|
535
|
+
getTableContainerRef() {
|
|
536
|
+
return this.tableContainerRefEl;
|
|
537
|
+
}
|
|
538
|
+
// --- Column width override (PrimeNG uses flat number instead of { widthPx }) ---
|
|
539
|
+
getColumnWidth(col) {
|
|
540
|
+
const override = this.primengColumnSizingOverrides()[col.columnId];
|
|
541
|
+
if (override)
|
|
542
|
+
return override;
|
|
543
|
+
return col.idealWidth ?? col.defaultWidth ?? col.minWidth ?? DEFAULT_MIN_COLUMN_WIDTH;
|
|
544
|
+
}
|
|
545
|
+
// --- PrimeNG-specific helpers ---
|
|
546
|
+
trackByRowId(_index, item) {
|
|
547
|
+
return this.getRowIdInput(item);
|
|
548
|
+
}
|
|
549
|
+
// --- PrimeNG-specific event handlers ---
|
|
550
|
+
onSelectAllChangePrimeng(checked) {
|
|
551
|
+
this.state().rowSelection.handleSelectAll(checked);
|
|
552
|
+
}
|
|
553
|
+
onRowClickPrimeng(e, item) {
|
|
554
|
+
if (this.rowSelectionMode !== 'single')
|
|
555
|
+
return;
|
|
556
|
+
const rowId = this.getRowIdInput(item);
|
|
557
|
+
const ids = this.selectedRowIds();
|
|
558
|
+
this.state().rowSelection.updateSelection(ids.has(rowId) ? new Set() : new Set([rowId]));
|
|
559
|
+
}
|
|
560
|
+
onRowCheckboxChangePrimeng(item, checked, rowIndex, _e) {
|
|
561
|
+
const rowId = this.getRowIdInput(item);
|
|
562
|
+
this.state().rowSelection.handleRowCheckboxChange(rowId, checked, rowIndex, this.lastMouseShift);
|
|
563
|
+
}
|
|
564
|
+
onResizeStartPrimeng(e, col) {
|
|
565
|
+
e.preventDefault();
|
|
566
|
+
// Clear cell selection before resize so selection outlines don't persist during drag
|
|
567
|
+
this.state().interaction.setActiveCell?.(null);
|
|
568
|
+
this.state().interaction.setSelectionRange?.(null);
|
|
569
|
+
this.getWrapperRef()?.nativeElement.focus({ preventScroll: true });
|
|
570
|
+
this.resizeStartX = e.clientX;
|
|
571
|
+
this.resizeColumnId = col.columnId;
|
|
572
|
+
this.resizeStartWidth = col.columnId === ROW_NUMBER_COLUMN_ID ? this.getRowNumberWidth() : this.getColumnWidth(col);
|
|
573
|
+
const onMove = (me) => {
|
|
574
|
+
const delta = me.clientX - this.resizeStartX;
|
|
575
|
+
const minW = col.columnId === ROW_NUMBER_COLUMN_ID ? ROW_NUMBER_COLUMN_MIN_WIDTH : (col.minWidth ?? DEFAULT_MIN_COLUMN_WIDTH);
|
|
576
|
+
const newWidth = Math.max(minW, this.resizeStartWidth + delta);
|
|
577
|
+
this.primengColumnSizingOverrides.update((prev) => ({ ...prev, [this.resizeColumnId]: newWidth }));
|
|
578
|
+
this.columnSizingVersion.update(v => v + 1);
|
|
579
|
+
};
|
|
580
|
+
const onUp = () => {
|
|
581
|
+
window.removeEventListener('pointermove', onMove, true);
|
|
582
|
+
window.removeEventListener('pointerup', onUp, true);
|
|
583
|
+
const finalWidth = this.primengColumnSizingOverrides()[this.resizeColumnId];
|
|
584
|
+
if (finalWidth) {
|
|
585
|
+
this.onColumnResized?.(this.resizeColumnId, finalWidth);
|
|
586
|
+
const overrides = {};
|
|
587
|
+
for (const [id, w] of Object.entries(this.primengColumnSizingOverrides())) {
|
|
588
|
+
overrides[id] = { widthPx: w };
|
|
589
|
+
}
|
|
590
|
+
this.state().layout.setColumnSizingOverrides(overrides);
|
|
591
|
+
}
|
|
592
|
+
};
|
|
593
|
+
window.addEventListener('pointermove', onMove, true);
|
|
594
|
+
window.addEventListener('pointerup', onUp, true);
|
|
595
|
+
}
|
|
596
|
+
onResizeRowNumber(event) {
|
|
597
|
+
event.stopPropagation();
|
|
598
|
+
this.onResizeStartPrimeng(event, { columnId: ROW_NUMBER_COLUMN_ID, name: '#' });
|
|
599
|
+
}
|
|
600
|
+
getRowNumberWidth() {
|
|
601
|
+
const override = this.primengColumnSizingOverrides()[ROW_NUMBER_COLUMN_ID];
|
|
602
|
+
if (override)
|
|
603
|
+
return override;
|
|
604
|
+
return super.getRowNumberWidth();
|
|
605
|
+
}
|
|
606
|
+
// --- Build props ---
|
|
607
|
+
buildProps() {
|
|
608
|
+
return {
|
|
609
|
+
items: this.itemsInput,
|
|
610
|
+
columns: this.columns,
|
|
611
|
+
getRowId: this.getRowIdInput,
|
|
612
|
+
sortBy: this.sortBy,
|
|
613
|
+
sortDirection: this.sortDirection,
|
|
614
|
+
onColumnSort: this.onColumnSort,
|
|
615
|
+
visibleColumns: this.visibleColumns,
|
|
616
|
+
columnOrder: this.columnOrder,
|
|
617
|
+
onColumnOrderChange: this.onColumnOrderChange,
|
|
618
|
+
onColumnResized: this.onColumnResized,
|
|
619
|
+
onColumnPinned: this.onColumnPinned,
|
|
620
|
+
pinnedColumns: this.pinnedColumnsInput,
|
|
621
|
+
initialColumnWidths: this.initialColumnWidths,
|
|
622
|
+
layoutMode: this.layoutMode,
|
|
623
|
+
suppressHorizontalScroll: this.suppressHorizontalScroll,
|
|
624
|
+
columnReorder: this.columnReorder,
|
|
625
|
+
isLoading: this.isLoadingInput,
|
|
626
|
+
loadingMessage: this.loadingMessageInput,
|
|
627
|
+
editable: this.editable,
|
|
628
|
+
cellSelection: this.cellSelection,
|
|
629
|
+
onCellValueChanged: this.onCellValueChanged,
|
|
630
|
+
onUndo: this.onUndoInput,
|
|
631
|
+
onRedo: this.onRedoInput,
|
|
632
|
+
canUndo: this.canUndoInput,
|
|
633
|
+
canRedo: this.canRedoInput,
|
|
634
|
+
rowSelection: this.rowSelectionMode,
|
|
635
|
+
selectedRows: this.selectedRows,
|
|
636
|
+
onSelectionChange: this.onSelectionChange,
|
|
637
|
+
showRowNumbers: this.showRowNumbers,
|
|
638
|
+
showColumnLetters: this.showColumnLettersInput,
|
|
639
|
+
showNameBox: this.showNameBoxInput,
|
|
640
|
+
onActiveCellChange: this.onActiveCellChange,
|
|
641
|
+
currentPage: this.currentPageInput,
|
|
642
|
+
pageSize: this.pageSizeInput,
|
|
643
|
+
statusBar: this.statusBar,
|
|
644
|
+
filters: this.filters,
|
|
645
|
+
onFilterChange: this.onFilterChange,
|
|
646
|
+
filterOptions: this.filterOptions,
|
|
647
|
+
loadingFilterOptions: this.loadingFilterOptions,
|
|
648
|
+
peopleSearch: this.peopleSearch,
|
|
649
|
+
getUserByEmail: this.getUserByEmail,
|
|
650
|
+
emptyState: this.emptyStateInput,
|
|
651
|
+
onCellError: this.onCellError,
|
|
652
|
+
stickyHeader: this.stickyHeaderInput,
|
|
653
|
+
'aria-label': this.ariaLabelInput,
|
|
654
|
+
'aria-labelledby': this.ariaLabelledByInput,
|
|
655
|
+
formulaReferences: this.formulaReferencesInput,
|
|
656
|
+
};
|
|
657
|
+
}
|
|
658
|
+
getColumnLetter(colIdx) {
|
|
659
|
+
return indexToColumnLetter(colIdx);
|
|
660
|
+
}
|
|
661
|
+
static { this.ɵfac = function DataGridTableComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || DataGridTableComponent)(); }; }
|
|
662
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DataGridTableComponent, selectors: [["ogrid-primeng-datagrid-table"]], viewQuery: function DataGridTableComponent_Query(rf, ctx) { if (rf & 1) {
|
|
663
|
+
i0.ɵɵviewQuery(_c0, 5)(_c1, 5);
|
|
664
|
+
} if (rf & 2) {
|
|
665
|
+
let _t;
|
|
666
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.wrapperRef = _t.first);
|
|
667
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.tableContainerRefEl = _t.first);
|
|
668
|
+
} }, inputs: { itemsInput: [0, "items", "itemsInput"], columns: "columns", getRowIdInput: [0, "getRowId", "getRowIdInput"], sortBy: "sortBy", sortDirection: "sortDirection", onColumnSort: "onColumnSort", visibleColumns: "visibleColumns", columnOrder: "columnOrder", onColumnOrderChange: "onColumnOrderChange", onColumnResized: "onColumnResized", onColumnPinned: "onColumnPinned", pinnedColumnsInput: [0, "pinnedColumns", "pinnedColumnsInput"], initialColumnWidths: "initialColumnWidths", layoutMode: "layoutMode", suppressHorizontalScroll: "suppressHorizontalScroll", stickyHeaderInput: "stickyHeaderInput", columnReorder: "columnReorder", isLoadingInput: [0, "isLoading", "isLoadingInput"], loadingMessageInput: [0, "loadingMessage", "loadingMessageInput"], editable: "editable", cellSelection: "cellSelection", onCellValueChanged: "onCellValueChanged", onUndoInput: [0, "onUndo", "onUndoInput"], onRedoInput: [0, "onRedo", "onRedoInput"], canUndoInput: [0, "canUndo", "canUndoInput"], canRedoInput: [0, "canRedo", "canRedoInput"], rowSelectionMode: [0, "rowSelection", "rowSelectionMode"], selectedRows: "selectedRows", onSelectionChange: "onSelectionChange", statusBar: "statusBar", filters: "filters", onFilterChange: "onFilterChange", filterOptions: "filterOptions", loadingFilterOptions: "loadingFilterOptions", peopleSearch: "peopleSearch", getUserByEmail: "getUserByEmail", emptyStateInput: [0, "emptyState", "emptyStateInput"], onCellError: "onCellError", ariaLabelInput: [0, "aria-label", "ariaLabelInput"], ariaLabelledByInput: [0, "aria-labelledby", "ariaLabelledByInput"], showRowNumbers: "showRowNumbers", showColumnLettersInput: [0, "showColumnLetters", "showColumnLettersInput"], showNameBoxInput: [0, "showNameBox", "showNameBoxInput"], onActiveCellChange: "onActiveCellChange", formulaReferencesInput: [0, "formulaReferences", "formulaReferencesInput"], currentPageInput: [0, "currentPage", "currentPageInput"], pageSizeInput: [0, "pageSize", "pageSizeInput"] }, features: [i0.ɵɵProvidersFeature([DataGridStateService, ColumnReorderService, VirtualScrollService]), i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 21, vars: 36, consts: [["wrapper", ""], ["tableContainer", ""], [1, "ogrid-root"], ["tabindex", "0", "role", "region", "data-ogrid-scroll-container", "", 1, "ogrid-scroll-wrapper", 3, "contextmenu", "keydown", "pointerdown", "scroll"], [1, "ogrid-table-wrapper"], ["role", "grid", 1, "ogrid-table"], [1, "ogrid-column-letter-row"], [3, "containerEl", "selectionRange", "copyRange", "cutRange", "colOffset", "columnSizingVersion", "items", "visibleColumns", "columnOrder"], [3, "containerEl", "references", "colOffset"], [1, "ogrid-empty-container"], [1, "ogrid-drop-indicator", 3, "left"], [3, "x", "y", "hasSelection", "canUndoProp", "canRedoProp", "classNames"], [3, "totalCount", "filteredCount", "selectedCount", "selectedCellCount", "aggregation", "suppressRowCount", "classNames"], ["aria-live", "polite", 1, "ogrid-loading-overlay"], [1, "ogrid-column-letter-cell"], ["scope", "col", "rowSpan", "1", 1, "ogrid-checkbox-header"], ["scope", "col", "rowSpan", "1", 1, "ogrid-row-number-header", 3, "width", "min-width", "max-width"], [1, "ogrid-row-number-spacer"], ["type", "checkbox", "aria-label", "Select all rows", 3, "change", "checked", "indeterminate"], ["scope", "col", "rowSpan", "1", 1, "ogrid-row-number-header"], ["role", "separator", "aria-label", "Resize row numbers", 1, "ogrid-resize-handle", 3, "pointerdown", "dblclick"], ["scope", "colgroup", 1, "ogrid-column-group-header"], ["scope", "col", 1, "ogrid-header-cell", 3, "ogrid-th-pinned-left", "ogrid-th-pinned-right", "min-width", "width", "max-width", "left", "right", "cursor"], ["scope", "col", 1, "ogrid-header-cell", 3, "pointerdown"], [1, "ogrid-header-content"], [3, "columnKey", "columnName", "filterType", "isSorted", "isSortedDescending", "onSort", "selectedValues", "onFilterChange", "options", "isLoadingOptions", "textValue", "onTextChange", "selectedUser", "onUserChange", "peopleSearch", "dateValue", "onDateChange"], [3, "columnId", "canPinLeft", "canPinRight", "canUnpin", "currentSort", "isSortable", "isResizable", "handlers"], ["role", "separator", 1, "ogrid-resize-handle", 3, "pointerdown", "dblclick"], [3, "height"], [3, "background"], [3, "click"], [1, "ogrid-checkbox-cell"], [1, "ogrid-row-number-cell", 3, "width", "min-width", "max-width"], [3, "width", "minWidth", "maxWidth", "padding"], [1, "ogrid-data-cell", 3, "ogrid-td-pinned-left", "ogrid-td-pinned-right", "min-width", "width", "max-width", "left", "right", "text-align"], [1, "ogrid-checkbox-cell", 3, "click"], ["type", "checkbox", 3, "change", "checked"], [1, "ogrid-row-number-cell"], [1, "ogrid-data-cell"], [1, "ogrid-editing-cell"], [3, "item", "column", "rowIndex", "globalColIndex", "displayValue", "editorProps", "onCancel"], [1, "ogrid-cell-content", 3, "cursor", "background", "outline", "outline-offset"], [3, "commit", "cancel", "value", "item", "column", "rowIndex", "editorType"], [1, "ogrid-cell-content", 3, "pointerdown", "click", "dblclick", "contextmenu"], ["type", "checkbox", 2, "margin", "0", "outline", "none", 3, "checked", "disabled", "cursor"], [3, "style"], ["aria-label", "Fill handle", 1, "ogrid-fill-handle"], ["type", "checkbox", 2, "margin", "0", "outline", "none", 3, "change", "pointerdown", "click", "checked", "disabled"], ["aria-label", "Fill handle", 1, "ogrid-fill-handle", 3, "pointerdown"], [1, "ogrid-empty-title"], [3, "clearAll", "message", "hasActiveFilters", "render"], [1, "ogrid-drop-indicator"], [3, "copyAction", "cutAction", "pasteAction", "selectAllAction", "undoAction", "redoAction", "closeAction", "x", "y", "hasSelection", "canUndoProp", "canRedoProp", "classNames"], [1, "ogrid-loading-content"], [1, "ogrid-loading-text"]], template: function DataGridTableComponent_Template(rf, ctx) { if (rf & 1) {
|
|
669
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
670
|
+
i0.ɵɵelementStart(0, "div", 2)(1, "div", 3, 0);
|
|
671
|
+
i0.ɵɵlistener("contextmenu", function DataGridTableComponent_Template_div_contextmenu_1_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView($event.preventDefault()); })("keydown", function DataGridTableComponent_Template_div_keydown_1_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onGridKeyDown($event)); })("pointerdown", function DataGridTableComponent_Template_div_pointerdown_1_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onWrapperMouseDown($event)); })("scroll", function DataGridTableComponent_Template_div_scroll_1_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onWrapperScroll($event)); });
|
|
672
|
+
i0.ɵɵelementStart(3, "div", 4)(4, "div", 4)(5, "div", 4, 1)(7, "table", 5)(8, "thead");
|
|
673
|
+
i0.ɵɵconditionalCreate(9, DataGridTableComponent_Conditional_9_Template, 5, 2, "tr", 6);
|
|
674
|
+
i0.ɵɵrepeaterCreate(10, DataGridTableComponent_For_11_Template, 7, 4, "tr", null, i0.ɵɵrepeaterTrackByIndex);
|
|
675
|
+
i0.ɵɵelementEnd();
|
|
676
|
+
i0.ɵɵconditionalCreate(12, DataGridTableComponent_Conditional_12_Template, 5, 2, "tbody");
|
|
677
|
+
i0.ɵɵelementEnd();
|
|
678
|
+
i0.ɵɵelement(13, "ogrid-marching-ants-overlay", 7);
|
|
679
|
+
i0.ɵɵconditionalCreate(14, DataGridTableComponent_Conditional_14_Template, 1, 3, "ogrid-formula-ref-overlay", 8);
|
|
680
|
+
i0.ɵɵconditionalCreate(15, DataGridTableComponent_Conditional_15_Template, 5, 3, "div", 9);
|
|
681
|
+
i0.ɵɵelementEnd()()()();
|
|
682
|
+
i0.ɵɵconditionalCreate(16, DataGridTableComponent_Conditional_16_Template, 1, 2, "div", 10);
|
|
683
|
+
i0.ɵɵconditionalCreate(17, DataGridTableComponent_Conditional_17_Template, 1, 6, "ogrid-context-menu", 11);
|
|
684
|
+
i0.ɵɵdeclareLet(18);
|
|
685
|
+
i0.ɵɵconditionalCreate(19, DataGridTableComponent_Conditional_19_Template, 1, 7, "ogrid-status-bar", 12);
|
|
686
|
+
i0.ɵɵconditionalCreate(20, DataGridTableComponent_Conditional_20_Template, 4, 1, "div", 13);
|
|
687
|
+
i0.ɵɵelementEnd();
|
|
688
|
+
} if (rf & 2) {
|
|
689
|
+
i0.ɵɵadvance();
|
|
690
|
+
i0.ɵɵstyleProp("--data-table-column-count", ctx.state().layout.totalColCount)("--ogrid-row-height", ctx.rowHeightCssVar());
|
|
691
|
+
i0.ɵɵclassProp("ogrid-scroll-wrapper--loading-empty", ctx.isLoading() && ctx.items().length === 0);
|
|
692
|
+
i0.ɵɵattribute("aria-label", ctx.resolvedAriaLabel())("aria-labelledby", ctx.ariaLabelledBy())("data-empty", ctx.showEmptyInGrid() ? "true" : null)("data-column-count", ctx.state().layout.totalColCount)("data-overflow-x", ctx.allowOverflowX() ? "true" : "false")("data-virtual-scroll", ctx.vsEnabled() ? "" : null)("data-has-selection", ctx.rowSelectionMode !== "none" ? "true" : null);
|
|
693
|
+
i0.ɵɵadvance(3);
|
|
694
|
+
i0.ɵɵclassProp("loading-dimmed", ctx.isLoading() && ctx.items().length > 0);
|
|
695
|
+
i0.ɵɵadvance(3);
|
|
696
|
+
i0.ɵɵattribute("data-virtual-scroll", ctx.vsEnabled() ? "" : null);
|
|
697
|
+
i0.ɵɵadvance();
|
|
698
|
+
i0.ɵɵclassMap(ctx.stickyHeader() ? "ogrid-thead ogrid-sticky-header" : "ogrid-thead");
|
|
699
|
+
i0.ɵɵadvance();
|
|
700
|
+
i0.ɵɵconditional(ctx.showColumnLetters() ? 9 : -1);
|
|
701
|
+
i0.ɵɵadvance();
|
|
702
|
+
i0.ɵɵrepeater(ctx.headerRows());
|
|
703
|
+
i0.ɵɵadvance(2);
|
|
704
|
+
i0.ɵɵconditional(!ctx.showEmptyInGrid() ? 12 : -1);
|
|
705
|
+
i0.ɵɵadvance();
|
|
706
|
+
i0.ɵɵproperty("containerEl", ctx.tableContainerEl())("selectionRange", ctx.state().interaction.selectionRange)("copyRange", ctx.state().interaction.copyRange)("cutRange", ctx.state().interaction.cutRange)("colOffset", ctx.state().layout.colOffset)("columnSizingVersion", ctx.columnSizingVersion())("items", ctx.items())("visibleColumns", ctx.propsVisibleColumns())("columnOrder", ctx.propsColumnOrder());
|
|
707
|
+
i0.ɵɵadvance();
|
|
708
|
+
i0.ɵɵconditional(ctx.formulaReferences() && ctx.formulaReferences().length > 0 ? 14 : -1);
|
|
709
|
+
i0.ɵɵadvance();
|
|
710
|
+
i0.ɵɵconditional(ctx.showEmptyInGrid() && ctx.emptyState() ? 15 : -1);
|
|
711
|
+
i0.ɵɵadvance();
|
|
712
|
+
i0.ɵɵconditional(ctx.columnReorderService.isDragging() && ctx.columnReorderService.dropIndicatorX() !== null ? 16 : -1);
|
|
713
|
+
i0.ɵɵadvance();
|
|
714
|
+
i0.ɵɵconditional(ctx.menuPosition() ? 17 : -1);
|
|
715
|
+
i0.ɵɵadvance();
|
|
716
|
+
const sbConfig_r37 = i0.ɵɵstoreLet(ctx.statusBarConfig());
|
|
717
|
+
i0.ɵɵadvance();
|
|
718
|
+
i0.ɵɵconditional(sbConfig_r37 ? 19 : -1);
|
|
719
|
+
i0.ɵɵadvance();
|
|
720
|
+
i0.ɵɵconditional(ctx.isLoading() ? 20 : -1);
|
|
721
|
+
} }, dependencies: [StatusBarComponent,
|
|
722
|
+
GridContextMenuComponent,
|
|
723
|
+
MarchingAntsOverlayComponent,
|
|
724
|
+
EmptyStateComponent,
|
|
725
|
+
FormulaRefOverlayComponent,
|
|
726
|
+
ColumnHeaderFilterComponent,
|
|
727
|
+
ColumnHeaderMenuComponent,
|
|
728
|
+
InlineCellEditorComponent,
|
|
729
|
+
PopoverCellEditorComponent], styles: ["\n :host { display: block; }\n .ogrid-root {\n position: relative;\n flex: 1;\n min-height: 0;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n }\n .ogrid-scroll-wrapper {\n overflow: auto;\n position: relative;\n background: var(--ogrid-bg, #ffffff);\n color: var(--ogrid-fg, rgba(0, 0, 0, 0.87));\n outline: none;\n }\n .ogrid-scroll-wrapper:focus-visible { outline: none; }\n .ogrid-scroll-wrapper[data-virtual-scroll] { flex: 1; min-height: 0; }\n .ogrid-scroll-wrapper--loading-empty { min-height: 200px; }\n .ogrid-table-wrapper {\n position: relative;\n overflow-x: clip;\n }\n .ogrid-table {\n width: var(--data-table-width, 100%);\n min-width: var(--data-table-min-width, 100%);\n border-collapse: collapse;\n table-layout: fixed;\n }\n .ogrid-table tr th:first-child,\n .ogrid-table tr td:first-child { border-left: none; }\n .ogrid-table tbody tr { height: var(--ogrid-row-height, auto); }\n .ogrid-thead {\n z-index: 3;\n background: var(--ogrid-header-bg, #f5f5f5);\n }\n .ogrid-sticky-header { position: sticky; top: 0; }\n .ogrid-sticky-header .ogrid-checkbox-header,\n .ogrid-sticky-header .ogrid-row-number-header { position: sticky; top: 0; }\n .ogrid-checkbox-header {\n width: 48px;\n min-width: 48px;\n max-width: 48px;\n text-align: center;\n background: var(--ogrid-header-bg, #f5f5f5);\n border-bottom: 2px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));\n z-index: 3;\n }\n .ogrid-row-number-header {\n text-align: center;\n font-weight: 600;\n background: var(--ogrid-header-bg, #f5f5f5);\n border-bottom: 2px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));\n z-index: 3;\n position: relative;\n }\n .ogrid-row-number-spacer {\n background: var(--ogrid-header-bg, #f5f5f5);\n }\n .ogrid-column-group-header {\n text-align: center;\n font-weight: 600;\n background: var(--ogrid-header-bg, #f5f5f5);\n border-bottom: 2px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));\n padding: 6px 10px;\n }\n .ogrid-header-cell {\n background: var(--ogrid-header-bg, #f5f5f5);\n border-bottom: 2px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));\n padding: 0;\n position: relative;\n user-select: none;\n }\n .ogrid-header-content {\n display: flex;\n align-items: center;\n gap: 4px;\n padding: 6px 10px;\n }\n .ogrid-resize-handle {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n width: 4px;\n cursor: col-resize;\n touch-action: none;\n }\n @media (pointer: coarse) {\n .ogrid-resize-handle { width: 16px; right: -6px; }\n }\n .ogrid-checkbox-cell {\n width: 48px;\n min-width: 48px;\n max-width: 48px;\n padding: 6px 4px;\n text-align: center;\n border-bottom: 1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));\n }\n .ogrid-row-number-cell {\n padding: 6px;\n text-align: center;\n font-weight: 600;\n font-variant-numeric: tabular-nums;\n color: var(--ogrid-fg-secondary, rgba(0, 0, 0, 0.6));\n background: var(--ogrid-header-bg, rgba(0, 0, 0, 0.04));\n border-bottom: 1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));\n position: sticky;\n left: 0;\n z-index: 3;\n }\n .ogrid-data-cell {\n padding: 0;\n border-bottom: 1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));\n position: relative;\n }\n .ogrid-data-cell:has(> [data-active-cell]),\n .ogrid-data-cell:has(> .ogrid-editing-cell) { z-index: 2; }\n .ogrid-cell-content {\n padding: var(--ogrid-cell-padding, 6px 10px);\n min-height: 20px;\n cursor: default;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .ogrid-editing-cell {\n width: 100%; height: 100%; display: flex; align-items: center; box-sizing: border-box;\n outline: 2px solid var(--ogrid-selection-color, #217346); outline-offset: -1px;\n z-index: 2; position: relative; background: var(--ogrid-bg, #fff); overflow: hidden; padding: 0;\n }\n .ogrid-scroll-wrapper [data-drag-range] { background: var(--ogrid-range-bg, rgba(33, 115, 70, 0.12)); }\n .ogrid-fill-handle {\n position: absolute;\n bottom: -3px;\n right: -3px;\n width: 7px;\n height: 7px;\n background: var(--ogrid-selection, #217346);\n cursor: crosshair;\n touch-action: none;\n z-index: 2;\n }\n @media (pointer: coarse) {\n .ogrid-fill-handle { width: 14px; height: 14px; right: -7px; bottom: -7px; border-radius: 2px; }\n }\n .ogrid-empty-container {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 48px 24px;\n text-align: center;\n color: var(--ogrid-fg-muted, rgba(0, 0, 0, 0.5));\n }\n .ogrid-empty-title {\n font-weight: 600;\n margin-bottom: 8px;\n }\n .ogrid-status-bar {\n display: flex;\n align-items: center;\n gap: 16px;\n width: 100%;\n min-height: 33px;\n padding: 6px 12px;\n box-sizing: border-box;\n font-size: 12px;\n line-height: 20px;\n color: var(--ogrid-fg-secondary, rgba(0, 0, 0, 0.6));\n background: var(--ogrid-header-bg, #f5f5f5);\n border-top: 1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));\n }\n .ogrid-status-bar-item {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n }\n .ogrid-status-bar-item:not(:last-child)::after {\n content: '';\n width: 1px;\n height: 14px;\n margin-left: 12px;\n background: var(--ogrid-border, rgba(0, 0, 0, 0.12));\n }\n .ogrid-status-bar-label {\n color: var(--ogrid-fg-secondary, rgba(0, 0, 0, 0.6));\n }\n .ogrid-status-bar-value {\n color: var(--ogrid-fg, rgba(0, 0, 0, 0.87));\n font-weight: 600;\n }\n .ogrid-loading-overlay {\n position: absolute;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n background: var(--ogrid-loading-overlay, rgba(255, 255, 255, 0.7));\n z-index: 10;\n }\n .ogrid-loading-content {\n display: flex;\n align-items: center;\n gap: 8px;\n color: var(--ogrid-fg, #242424);\n }\n .ogrid-loading-text {\n font-size: 14px;\n }\n .loading-dimmed {\n opacity: 0.5;\n pointer-events: none;\n }\n .ogrid-drop-indicator {\n position: absolute;\n top: 0;\n bottom: 0;\n width: 3px;\n background: var(--ogrid-primary, #217346);\n pointer-events: none;\n z-index: 100;\n transition: left 0.05s;\n }\n .ogrid-th-pinned-left {\n position: sticky;\n top: 0;\n left: 0;\n z-index: 10;\n background: var(--ogrid-header-bg, #f5f5f5);\n border-right: 1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));\n box-shadow: 2px 0 4px -1px rgba(0, 0, 0, 0.1);\n }\n .ogrid-th-pinned-right {\n position: sticky;\n top: 0;\n right: 0;\n z-index: 10;\n background: var(--ogrid-header-bg, #f5f5f5);\n border-left: 1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));\n box-shadow: -2px 0 4px -1px rgba(0, 0, 0, 0.1);\n }\n .ogrid-td-pinned-left {\n position: sticky;\n left: 0;\n z-index: 5;\n background: var(--ogrid-bg, #fff);\n border-right: 1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));\n box-shadow: 2px 0 4px -1px rgba(0, 0, 0, 0.1);\n }\n .ogrid-td-pinned-right {\n position: sticky;\n right: 0;\n z-index: 5;\n background: var(--ogrid-bg, #fff);\n border-left: 1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));\n box-shadow: -2px 0 4px -1px rgba(0, 0, 0, 0.1);\n }\n ::ng-deep th:focus-visible,\n ::ng-deep td:focus-visible {\n outline: 2px solid var(--primary-color, #6366f1);\n outline-offset: -2px;\n z-index: 11;\n }\n ::ng-deep .p-button:focus-visible,\n ::ng-deep button:focus-visible {\n outline: 2px solid var(--primary-color, #6366f1);\n outline-offset: 2px;\n }\n\n /* Context menu */\n .ogrid-context-menu {\n position: fixed;\n z-index: 1000;\n min-width: 160px;\n padding: 4px 0;\n background: var(--ogrid-bg, #fff);\n border: 1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));\n border-radius: 6px;\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);\n }\n .ogrid-context-menu-item {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 24px;\n width: 100%;\n padding: 6px 12px;\n border: none;\n background: none;\n font-size: 13px;\n text-align: left;\n cursor: pointer;\n color: var(--ogrid-fg, rgba(0, 0, 0, 0.87));\n }\n .ogrid-context-menu-item:hover:not(:disabled) {\n background: var(--ogrid-hover-bg, rgba(0, 0, 0, 0.04));\n }\n .ogrid-context-menu-item:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n .ogrid-context-menu-item-label {\n flex: 1;\n }\n .ogrid-context-menu-item-shortcut {\n color: var(--ogrid-fg-muted, rgba(0, 0, 0, 0.5));\n font-size: 0.85em;\n }\n .ogrid-context-menu-divider {\n height: 1px;\n margin: 4px 0;\n background: var(--ogrid-border, rgba(0, 0, 0, 0.12));\n }\n ::ng-deep .p-checkbox:focus-visible {\n outline: 2px solid var(--primary-color, #6366f1);\n outline-offset: 2px;\n }\n\n /* PrimeNG Menu popup overrides.\n Double-class selectors (0,2,0) beat PrimeNG's single-class (0,1,0) defaults. */\n .p-menu.p-menu {\n background: var(--ogrid-bg, #ffffff);\n color: var(--ogrid-fg, rgba(0, 0, 0, 0.87));\n border: 1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));\n border-radius: 4px;\n padding: 4px 0;\n }\n .p-menu-overlay.p-menu-overlay {\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--ogrid-border, rgba(0, 0, 0, 0.12));\n }\n .p-menu-item-content.p-menu-item-content {\n color: var(--ogrid-fg, rgba(0, 0, 0, 0.87));\n }\n .p-menu-item-link.p-menu-item-link {\n color: var(--ogrid-fg, rgba(0, 0, 0, 0.87));\n padding: 6px 12px;\n }\n .p-menu-item-label.p-menu-item-label {\n color: var(--ogrid-fg, rgba(0, 0, 0, 0.87));\n font-size: 0.875rem;\n }\n .p-menu-item:not(.p-disabled) .p-menu-item-content.p-menu-item-content:hover {\n background: var(--ogrid-hover-bg, rgba(0, 0, 0, 0.04));\n color: var(--ogrid-fg, rgba(0, 0, 0, 0.87));\n }\n .p-menu-separator.p-menu-separator {\n border-color: var(--ogrid-border, rgba(0, 0, 0, 0.12));\n margin: 4px 0;\n }\n .ogrid-column-letter-cell {\n text-align: center;\n font-size: 11px;\n font-weight: 500;\n color: var(--ogrid-fg-muted, rgba(0, 0, 0, 0.4));\n padding: 2px 4px;\n background: var(--ogrid-column-letter-bg, var(--ogrid-header-bg, #f5f5f5));\n border-bottom: 1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));\n user-select: none;\n font-variant-numeric: tabular-nums;\n }\n /* Reveal column menu trigger on header hover without layout shift.\n The button always takes up space (visibility: hidden); shown when column is hovered. */\n @media (hover: hover) {\n th:hover .column-header-menu-trigger { visibility: visible; }\n }\n "], encapsulation: 2, changeDetection: 0 }); }
|
|
730
|
+
}
|
|
731
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DataGridTableComponent, [{
|
|
732
|
+
type: Component,
|
|
733
|
+
args: [{ selector: 'ogrid-primeng-datagrid-table', standalone: true, imports: [
|
|
734
|
+
StatusBarComponent,
|
|
735
|
+
GridContextMenuComponent,
|
|
736
|
+
MarchingAntsOverlayComponent,
|
|
737
|
+
EmptyStateComponent,
|
|
738
|
+
FormulaRefOverlayComponent,
|
|
739
|
+
ColumnHeaderFilterComponent,
|
|
740
|
+
ColumnHeaderMenuComponent,
|
|
741
|
+
InlineCellEditorComponent,
|
|
742
|
+
PopoverCellEditorComponent,
|
|
743
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [DataGridStateService, ColumnReorderService, VirtualScrollService], template: `
|
|
744
|
+
<div class="ogrid-root">
|
|
745
|
+
<div
|
|
746
|
+
#wrapper
|
|
747
|
+
tabindex="0"
|
|
748
|
+
role="region"
|
|
749
|
+
class="ogrid-scroll-wrapper"
|
|
750
|
+
[class.ogrid-scroll-wrapper--loading-empty]="isLoading() && items().length === 0"
|
|
751
|
+
[attr.aria-label]="resolvedAriaLabel()"
|
|
752
|
+
[attr.aria-labelledby]="ariaLabelledBy()"
|
|
753
|
+
[attr.data-empty]="showEmptyInGrid() ? 'true' : null"
|
|
754
|
+
[attr.data-column-count]="state().layout.totalColCount"
|
|
755
|
+
[attr.data-overflow-x]="allowOverflowX() ? 'true' : 'false'"
|
|
756
|
+
[attr.data-virtual-scroll]="vsEnabled() ? '' : null"
|
|
757
|
+
data-ogrid-scroll-container
|
|
758
|
+
[attr.data-has-selection]="rowSelectionMode !== 'none' ? 'true' : null"
|
|
759
|
+
(contextmenu)="$event.preventDefault()"
|
|
760
|
+
(keydown)="onGridKeyDown($event)"
|
|
761
|
+
(pointerdown)="onWrapperMouseDown($event)"
|
|
762
|
+
(scroll)="onWrapperScroll($event)"
|
|
763
|
+
[style.--data-table-column-count]="state().layout.totalColCount"
|
|
764
|
+
[style.--ogrid-row-height]="rowHeightCssVar()"
|
|
765
|
+
>
|
|
766
|
+
<div class="ogrid-table-wrapper">
|
|
767
|
+
<div [class.loading-dimmed]="isLoading() && items().length > 0" class="ogrid-table-wrapper">
|
|
768
|
+
<div #tableContainer class="ogrid-table-wrapper">
|
|
769
|
+
<table class="ogrid-table" role="grid" [attr.data-virtual-scroll]="vsEnabled() ? '' : null">
|
|
770
|
+
<thead [class]="stickyHeader() ? 'ogrid-thead ogrid-sticky-header' : 'ogrid-thead'">
|
|
771
|
+
@if (showColumnLetters()) {
|
|
772
|
+
<tr class="ogrid-column-letter-row">
|
|
773
|
+
@if (hasCheckboxCol()) {
|
|
774
|
+
<th class="ogrid-column-letter-cell"></th>
|
|
775
|
+
}
|
|
776
|
+
@if (hasRowNumbersCol()) {
|
|
777
|
+
<th class="ogrid-column-letter-cell"></th>
|
|
778
|
+
}
|
|
779
|
+
@for (col of visibleCols(); track col.columnId; let colIdx = $index) {
|
|
780
|
+
<th class="ogrid-column-letter-cell">
|
|
781
|
+
{{ getColumnLetter(colIdx) }}
|
|
782
|
+
</th>
|
|
783
|
+
}
|
|
784
|
+
</tr>
|
|
785
|
+
}
|
|
786
|
+
@for (row of headerRows(); track $index; let rowIdx = $index) {
|
|
787
|
+
<tr>
|
|
788
|
+
@if (rowIdx === headerRows().length - 1 && hasCheckboxCol()) {
|
|
789
|
+
<th scope="col" rowSpan="1" class="ogrid-checkbox-header">
|
|
790
|
+
<input
|
|
791
|
+
type="checkbox"
|
|
792
|
+
[checked]="allSelected()"
|
|
793
|
+
[indeterminate]="someSelected() && !allSelected()"
|
|
794
|
+
(change)="onSelectAllChangePrimeng($any($event.target).checked)"
|
|
795
|
+
aria-label="Select all rows"
|
|
796
|
+
/>
|
|
797
|
+
</th>
|
|
798
|
+
}
|
|
799
|
+
@if (rowIdx === 0 && rowIdx < headerRows().length - 1 && hasCheckboxCol()) {
|
|
800
|
+
<th [attr.rowSpan]="headerRows().length - 1"></th>
|
|
801
|
+
}
|
|
802
|
+
@if (rowIdx === headerRows().length - 1 && hasRowNumbersCol()) {
|
|
803
|
+
<th scope="col" rowSpan="1" class="ogrid-row-number-header"
|
|
804
|
+
[style.width.px]="getRowNumberWidth()"
|
|
805
|
+
[style.min-width.px]="getRowNumberWidth()"
|
|
806
|
+
[style.max-width.px]="getRowNumberWidth()"
|
|
807
|
+
>
|
|
808
|
+
#
|
|
809
|
+
<div
|
|
810
|
+
class="ogrid-resize-handle"
|
|
811
|
+
role="separator"
|
|
812
|
+
aria-label="Resize row numbers"
|
|
813
|
+
(pointerdown)="onResizeRowNumber($event)"
|
|
814
|
+
(dblclick)="$event.stopPropagation()"
|
|
815
|
+
></div>
|
|
816
|
+
</th>
|
|
817
|
+
}
|
|
818
|
+
@if (rowIdx === 0 && rowIdx < headerRows().length - 1 && hasRowNumbersCol()) {
|
|
819
|
+
<th [attr.rowSpan]="headerRows().length - 1" class="ogrid-row-number-spacer"></th>
|
|
820
|
+
}
|
|
821
|
+
@for (cell of row; track cell.columnDef?.columnId ?? $index; let cellIdx = $index) {
|
|
822
|
+
@if (cell.isGroup) {
|
|
823
|
+
<th
|
|
824
|
+
[attr.colSpan]="cell.colSpan"
|
|
825
|
+
scope="colgroup"
|
|
826
|
+
class="ogrid-column-group-header"
|
|
827
|
+
>
|
|
828
|
+
{{ cell.label }}
|
|
829
|
+
</th>
|
|
830
|
+
} @else {
|
|
831
|
+
@let col = asColumnDef(cell.columnDef);
|
|
832
|
+
@let pinned = isPinned(col.columnId);
|
|
833
|
+
@let config = getFilterConfig(col);
|
|
834
|
+
@let sortState = getSortState(col.columnId);
|
|
835
|
+
@let ariaSort = sortState === 'asc' ? 'ascending' : sortState === 'desc' ? 'descending' : null;
|
|
836
|
+
<th
|
|
837
|
+
scope="col"
|
|
838
|
+
class="ogrid-header-cell"
|
|
839
|
+
[attr.data-column-id]="col.columnId"
|
|
840
|
+
[attr.aria-sort]="ariaSort"
|
|
841
|
+
[attr.rowSpan]="headerRows().length > 1 && rowIdx < headerRows().length - 1 ? headerRows().length - rowIdx : null"
|
|
842
|
+
[class.ogrid-th-pinned-left]="pinned === 'left'"
|
|
843
|
+
[class.ogrid-th-pinned-right]="pinned === 'right'"
|
|
844
|
+
[style.min-width.px]="getEffectiveMinWidth(col)"
|
|
845
|
+
[style.width.px]="getColumnWidth(col)"
|
|
846
|
+
[style.max-width.px]="getColumnWidth(col)"
|
|
847
|
+
[style.left.px]="pinned === 'left' ? getPinnedLeftOffset(col.columnId) : null"
|
|
848
|
+
[style.right.px]="pinned === 'right' ? getPinnedRightOffset(col.columnId) : null"
|
|
849
|
+
[style.cursor]="columnReorderService.isDragging() ? 'grabbing' : 'grab'"
|
|
850
|
+
(pointerdown)="onHeaderMouseDown(col.columnId, $event)"
|
|
851
|
+
>
|
|
852
|
+
<div class="ogrid-header-content">
|
|
853
|
+
<ogrid-primeng-column-header-filter
|
|
854
|
+
[columnKey]="col.columnId"
|
|
855
|
+
[columnName]="col.name"
|
|
856
|
+
[filterType]="config.filterType"
|
|
857
|
+
[isSorted]="config.isSorted ?? false"
|
|
858
|
+
[isSortedDescending]="config.isSortedDescending ?? false"
|
|
859
|
+
[onSort]="config.onSort"
|
|
860
|
+
[selectedValues]="config.selectedValues"
|
|
861
|
+
[onFilterChange]="config.onFilterChange"
|
|
862
|
+
[options]="config.options ?? []"
|
|
863
|
+
[isLoadingOptions]="config.isLoadingOptions ?? false"
|
|
864
|
+
[textValue]="config.textValue ?? ''"
|
|
865
|
+
[onTextChange]="config.onTextChange"
|
|
866
|
+
[selectedUser]="config.selectedUser"
|
|
867
|
+
[onUserChange]="config.onUserChange"
|
|
868
|
+
[peopleSearch]="config.peopleSearch"
|
|
869
|
+
[dateValue]="config.dateValue"
|
|
870
|
+
[onDateChange]="config.onDateChange"
|
|
871
|
+
></ogrid-primeng-column-header-filter>
|
|
872
|
+
@let colPinState = getPinState(col.columnId);
|
|
873
|
+
<column-header-menu
|
|
874
|
+
[columnId]="col.columnId"
|
|
875
|
+
[canPinLeft]="colPinState.canPinLeft"
|
|
876
|
+
[canPinRight]="colPinState.canPinRight"
|
|
877
|
+
[canUnpin]="colPinState.canUnpin"
|
|
878
|
+
[currentSort]="sortState"
|
|
879
|
+
[isSortable]="col.sortable !== false"
|
|
880
|
+
[isResizable]="col.resizable !== false"
|
|
881
|
+
[handlers]="getColumnMenuHandlersMemoized(col.columnId)"
|
|
882
|
+
/>
|
|
883
|
+
</div>
|
|
884
|
+
<div
|
|
885
|
+
class="ogrid-resize-handle"
|
|
886
|
+
role="separator"
|
|
887
|
+
(pointerdown)="onResizeStartPrimeng($event, col)"
|
|
888
|
+
(dblclick)="onResizeDoubleClick($event, col)"
|
|
889
|
+
[attr.aria-label]="'Resize ' + col.name"
|
|
890
|
+
></div>
|
|
891
|
+
</th>
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
</tr>
|
|
895
|
+
}
|
|
896
|
+
</thead>
|
|
897
|
+
|
|
898
|
+
@if (!showEmptyInGrid()) {
|
|
899
|
+
<tbody>
|
|
900
|
+
@if (vsEnabled() && vsTopSpacerHeight() > 0) {
|
|
901
|
+
<tr [style.height.px]="vsTopSpacerHeight()"></tr>
|
|
902
|
+
}
|
|
903
|
+
@for (item of vsVisibleItems(); track trackByRowId($index, item); let localIdx = $index) {
|
|
904
|
+
@let rowIndex = vsStartIndex() + localIdx;
|
|
905
|
+
@let rowId = getRowIdInput(item);
|
|
906
|
+
@let isSelected = selectedRowIds().has(rowId);
|
|
907
|
+
<tr
|
|
908
|
+
[attr.data-row-id]="rowId"
|
|
909
|
+
[attr.aria-selected]="isSelected || null"
|
|
910
|
+
[style.background]="isSelected ? 'var(--ogrid-selected-bg, #e8f0fe)' : null"
|
|
911
|
+
(click)="onRowClickPrimeng($event, item)"
|
|
912
|
+
>
|
|
913
|
+
@if (hasCheckboxCol()) {
|
|
914
|
+
<td
|
|
915
|
+
class="ogrid-checkbox-cell"
|
|
916
|
+
[attr.data-row-index]="rowIndex"
|
|
917
|
+
[attr.data-col-index]="0"
|
|
918
|
+
(click)="$event.stopPropagation()"
|
|
919
|
+
>
|
|
920
|
+
<input
|
|
921
|
+
type="checkbox"
|
|
922
|
+
[checked]="isSelected"
|
|
923
|
+
(change)="onRowCheckboxChangePrimeng(item, $any($event.target).checked, rowIndex, $event)"
|
|
924
|
+
[attr.aria-label]="'Select row ' + (rowIndex + 1)"
|
|
925
|
+
/>
|
|
926
|
+
</td>
|
|
927
|
+
}
|
|
928
|
+
@if (hasRowNumbersCol()) {
|
|
929
|
+
<td class="ogrid-row-number-cell"
|
|
930
|
+
[style.width.px]="getRowNumberWidth()"
|
|
931
|
+
[style.min-width.px]="getRowNumberWidth()"
|
|
932
|
+
[style.max-width.px]="getRowNumberWidth()"
|
|
933
|
+
>
|
|
934
|
+
{{ rowNumberOffset() + rowIndex + 1 }}
|
|
935
|
+
</td>
|
|
936
|
+
}
|
|
937
|
+
@if (vsColumnsEnabled() && vsLeftSpacerWidth() > 0) {
|
|
938
|
+
<td [style.width.px]="vsLeftSpacerWidth()" [style.minWidth.px]="vsLeftSpacerWidth()" [style.maxWidth.px]="vsLeftSpacerWidth()" [style.padding]="'0'"></td>
|
|
939
|
+
}
|
|
940
|
+
@for (col of vsVisibleCols(); track col.columnId) {
|
|
941
|
+
@let pinned = isPinned(col.columnId);
|
|
942
|
+
<td
|
|
943
|
+
[attr.data-column-id]="col.columnId"
|
|
944
|
+
[class.ogrid-td-pinned-left]="pinned === 'left'"
|
|
945
|
+
[class.ogrid-td-pinned-right]="pinned === 'right'"
|
|
946
|
+
class="ogrid-data-cell"
|
|
947
|
+
[style.min-width.px]="getEffectiveMinWidth(col)"
|
|
948
|
+
[style.width.px]="getColumnWidth(col)"
|
|
949
|
+
[style.max-width.px]="getColumnWidth(col)"
|
|
950
|
+
[style.left.px]="pinned === 'left' ? getPinnedLeftOffset(col.columnId) : null"
|
|
951
|
+
[style.right.px]="pinned === 'right' ? getPinnedRightOffset(col.columnId) : null"
|
|
952
|
+
[style.text-align]="col.type === 'numeric' ? 'right' : null"
|
|
953
|
+
>
|
|
954
|
+
@let descriptor = getCellDescriptor(item, col, rowIndex, getGlobalColIndex(col));
|
|
955
|
+
@if (descriptor.mode === 'editing-inline') {
|
|
956
|
+
<div class="ogrid-editing-cell">
|
|
957
|
+
<ogrid-primeng-inline-cell-editor
|
|
958
|
+
[value]="descriptor.value"
|
|
959
|
+
[item]="item"
|
|
960
|
+
[column]="col"
|
|
961
|
+
[rowIndex]="rowIndex"
|
|
962
|
+
[editorType]="descriptor.editorType ?? 'text'"
|
|
963
|
+
(commit)="commitEdit(item, col.columnId, descriptor.value, $event, rowIndex, descriptor.globalColIndex)"
|
|
964
|
+
(cancel)="cancelEdit()"
|
|
965
|
+
></ogrid-primeng-inline-cell-editor>
|
|
966
|
+
</div>
|
|
967
|
+
} @else if (descriptor.mode === 'editing-popover') {
|
|
968
|
+
@let editorProps = buildPopoverEditorProps(item, col, descriptor);
|
|
969
|
+
<ogrid-primeng-popover-cell-editor
|
|
970
|
+
[item]="item"
|
|
971
|
+
[column]="col"
|
|
972
|
+
[rowIndex]="rowIndex"
|
|
973
|
+
[globalColIndex]="descriptor.globalColIndex"
|
|
974
|
+
[displayValue]="descriptor.displayValue"
|
|
975
|
+
[editorProps]="editorProps"
|
|
976
|
+
[onCancel]="cancelEditHandler"
|
|
977
|
+
></ogrid-primeng-popover-cell-editor>
|
|
978
|
+
} @else {
|
|
979
|
+
<div
|
|
980
|
+
[attr.data-row-index]="rowIndex"
|
|
981
|
+
[attr.data-col-index]="descriptor.globalColIndex"
|
|
982
|
+
[attr.data-active-cell]="descriptor.isActive ? 'true' : null"
|
|
983
|
+
[attr.data-in-range]="descriptor.isInRange ? 'true' : null"
|
|
984
|
+
[attr.tabindex]="descriptor.isActive ? 0 : -1"
|
|
985
|
+
(pointerdown)="onCellMouseDown($event, rowIndex, descriptor.globalColIndex)"
|
|
986
|
+
(click)="onCellClick(rowIndex, descriptor.globalColIndex)"
|
|
987
|
+
(dblclick)="descriptor.canEditAny ? onCellDblClick(descriptor.rowId, col.columnId) : null"
|
|
988
|
+
(contextmenu)="onCellContextMenu($event)"
|
|
989
|
+
class="ogrid-cell-content"
|
|
990
|
+
[style.cursor]="descriptor.canEditAny ? 'cell' : 'default'"
|
|
991
|
+
[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)"
|
|
992
|
+
[style.outline]="descriptor.isActive && !descriptor.isInRange ? '2px solid var(--ogrid-selection, #217346)' : null"
|
|
993
|
+
[style.outline-offset]="descriptor.isActive && !descriptor.isInRange ? '-2px' : null"
|
|
994
|
+
>
|
|
995
|
+
@if (col.type === 'boolean') {
|
|
996
|
+
<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'" />
|
|
997
|
+
} @else {
|
|
998
|
+
<span [style]="resolveCellStyleFn(col, item, descriptor.displayValue)">{{ resolveCellContent(col, item, descriptor.displayValue) }}</span>
|
|
999
|
+
}
|
|
1000
|
+
@if (descriptor.canEditAny && descriptor.isSelectionEndCell) {
|
|
1001
|
+
<div
|
|
1002
|
+
(pointerdown)="onFillHandleMouseDown($event)"
|
|
1003
|
+
class="ogrid-fill-handle"
|
|
1004
|
+
aria-label="Fill handle"
|
|
1005
|
+
></div>
|
|
1006
|
+
}
|
|
1007
|
+
</div>
|
|
1008
|
+
}
|
|
1009
|
+
</td>
|
|
1010
|
+
}
|
|
1011
|
+
@if (vsColumnsEnabled() && vsRightSpacerWidth() > 0) {
|
|
1012
|
+
<td [style.width.px]="vsRightSpacerWidth()" [style.minWidth.px]="vsRightSpacerWidth()" [style.maxWidth.px]="vsRightSpacerWidth()" [style.padding]="'0'"></td>
|
|
1013
|
+
}
|
|
1014
|
+
</tr>
|
|
1015
|
+
}
|
|
1016
|
+
@if (vsEnabled() && vsBottomSpacerHeight() > 0) {
|
|
1017
|
+
<tr [style.height.px]="vsBottomSpacerHeight()"></tr>
|
|
1018
|
+
}
|
|
1019
|
+
</tbody>
|
|
1020
|
+
}
|
|
1021
|
+
</table>
|
|
1022
|
+
|
|
1023
|
+
<ogrid-marching-ants-overlay
|
|
1024
|
+
[containerEl]="tableContainerEl()"
|
|
1025
|
+
[selectionRange]="state().interaction.selectionRange"
|
|
1026
|
+
[copyRange]="state().interaction.copyRange"
|
|
1027
|
+
[cutRange]="state().interaction.cutRange"
|
|
1028
|
+
[colOffset]="state().layout.colOffset"
|
|
1029
|
+
[columnSizingVersion]="columnSizingVersion()"
|
|
1030
|
+
[items]="items()"
|
|
1031
|
+
[visibleColumns]="propsVisibleColumns()"
|
|
1032
|
+
[columnOrder]="propsColumnOrder()"
|
|
1033
|
+
></ogrid-marching-ants-overlay>
|
|
1034
|
+
|
|
1035
|
+
@if (formulaReferences() && formulaReferences()!.length > 0) {
|
|
1036
|
+
<ogrid-formula-ref-overlay
|
|
1037
|
+
[containerEl]="tableContainerEl()"
|
|
1038
|
+
[references]="formulaReferences()!"
|
|
1039
|
+
[colOffset]="colOffset()"
|
|
1040
|
+
/>
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
@if (showEmptyInGrid() && emptyState()) {
|
|
1044
|
+
<div class="ogrid-empty-container">
|
|
1045
|
+
<div>
|
|
1046
|
+
<div class="ogrid-empty-title">No results found</div>
|
|
1047
|
+
<ogrid-empty-state
|
|
1048
|
+
[message]="emptyState()?.message"
|
|
1049
|
+
[hasActiveFilters]="emptyState()?.hasActiveFilters ?? false"
|
|
1050
|
+
[render]="emptyState()?.render"
|
|
1051
|
+
(clearAll)="emptyState()?.onClearAll()"
|
|
1052
|
+
></ogrid-empty-state>
|
|
1053
|
+
</div>
|
|
1054
|
+
</div>
|
|
1055
|
+
}
|
|
1056
|
+
</div>
|
|
1057
|
+
</div>
|
|
1058
|
+
</div>
|
|
1059
|
+
</div>
|
|
1060
|
+
|
|
1061
|
+
@if (columnReorderService.isDragging() && columnReorderService.dropIndicatorX() !== null) {
|
|
1062
|
+
<div class="ogrid-drop-indicator" [style.left.px]="columnReorderService.dropIndicatorX()"></div>
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
@if (menuPosition()) {
|
|
1066
|
+
<ogrid-context-menu
|
|
1067
|
+
[x]="menuPosition()!.x"
|
|
1068
|
+
[y]="menuPosition()!.y"
|
|
1069
|
+
[hasSelection]="hasCellSelection()"
|
|
1070
|
+
[canUndoProp]="canUndo()"
|
|
1071
|
+
[canRedoProp]="canRedo()"
|
|
1072
|
+
[classNames]="contextMenuClasses"
|
|
1073
|
+
(copyAction)="handleCopy()"
|
|
1074
|
+
(cutAction)="handleCut()"
|
|
1075
|
+
(pasteAction)="handlePaste()"
|
|
1076
|
+
(selectAllAction)="handleSelectAllCells()"
|
|
1077
|
+
(undoAction)="onUndo()"
|
|
1078
|
+
(redoAction)="onRedo()"
|
|
1079
|
+
(closeAction)="closeContextMenu()"
|
|
1080
|
+
></ogrid-context-menu>
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
@let sbConfig = statusBarConfig();
|
|
1084
|
+
@if (sbConfig) {
|
|
1085
|
+
<ogrid-status-bar
|
|
1086
|
+
[totalCount]="sbConfig.totalCount"
|
|
1087
|
+
[filteredCount]="sbConfig.filteredCount"
|
|
1088
|
+
[selectedCount]="sbConfig.selectedCount ?? selectedRowIds().size"
|
|
1089
|
+
[selectedCellCount]="selectionCellCount()"
|
|
1090
|
+
[aggregation]="sbConfig.aggregation"
|
|
1091
|
+
[suppressRowCount]="sbConfig.suppressRowCount"
|
|
1092
|
+
[classNames]="statusBarClasses"
|
|
1093
|
+
></ogrid-status-bar>
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
@if (isLoading()) {
|
|
1097
|
+
<div class="ogrid-loading-overlay" aria-live="polite">
|
|
1098
|
+
<div class="ogrid-loading-content">
|
|
1099
|
+
<span class="ogrid-loading-text">{{ loadingMessage() }}</span>
|
|
1100
|
+
</div>
|
|
1101
|
+
</div>
|
|
1102
|
+
}
|
|
1103
|
+
</div>
|
|
1104
|
+
`, styles: ["\n :host { display: block; }\n .ogrid-root {\n position: relative;\n flex: 1;\n min-height: 0;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n }\n .ogrid-scroll-wrapper {\n overflow: auto;\n position: relative;\n background: var(--ogrid-bg, #ffffff);\n color: var(--ogrid-fg, rgba(0, 0, 0, 0.87));\n outline: none;\n }\n .ogrid-scroll-wrapper:focus-visible { outline: none; }\n .ogrid-scroll-wrapper[data-virtual-scroll] { flex: 1; min-height: 0; }\n .ogrid-scroll-wrapper--loading-empty { min-height: 200px; }\n .ogrid-table-wrapper {\n position: relative;\n overflow-x: clip;\n }\n .ogrid-table {\n width: var(--data-table-width, 100%);\n min-width: var(--data-table-min-width, 100%);\n border-collapse: collapse;\n table-layout: fixed;\n }\n .ogrid-table tr th:first-child,\n .ogrid-table tr td:first-child { border-left: none; }\n .ogrid-table tbody tr { height: var(--ogrid-row-height, auto); }\n .ogrid-thead {\n z-index: 3;\n background: var(--ogrid-header-bg, #f5f5f5);\n }\n .ogrid-sticky-header { position: sticky; top: 0; }\n .ogrid-sticky-header .ogrid-checkbox-header,\n .ogrid-sticky-header .ogrid-row-number-header { position: sticky; top: 0; }\n .ogrid-checkbox-header {\n width: 48px;\n min-width: 48px;\n max-width: 48px;\n text-align: center;\n background: var(--ogrid-header-bg, #f5f5f5);\n border-bottom: 2px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));\n z-index: 3;\n }\n .ogrid-row-number-header {\n text-align: center;\n font-weight: 600;\n background: var(--ogrid-header-bg, #f5f5f5);\n border-bottom: 2px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));\n z-index: 3;\n position: relative;\n }\n .ogrid-row-number-spacer {\n background: var(--ogrid-header-bg, #f5f5f5);\n }\n .ogrid-column-group-header {\n text-align: center;\n font-weight: 600;\n background: var(--ogrid-header-bg, #f5f5f5);\n border-bottom: 2px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));\n padding: 6px 10px;\n }\n .ogrid-header-cell {\n background: var(--ogrid-header-bg, #f5f5f5);\n border-bottom: 2px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));\n padding: 0;\n position: relative;\n user-select: none;\n }\n .ogrid-header-content {\n display: flex;\n align-items: center;\n gap: 4px;\n padding: 6px 10px;\n }\n .ogrid-resize-handle {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n width: 4px;\n cursor: col-resize;\n touch-action: none;\n }\n @media (pointer: coarse) {\n .ogrid-resize-handle { width: 16px; right: -6px; }\n }\n .ogrid-checkbox-cell {\n width: 48px;\n min-width: 48px;\n max-width: 48px;\n padding: 6px 4px;\n text-align: center;\n border-bottom: 1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));\n }\n .ogrid-row-number-cell {\n padding: 6px;\n text-align: center;\n font-weight: 600;\n font-variant-numeric: tabular-nums;\n color: var(--ogrid-fg-secondary, rgba(0, 0, 0, 0.6));\n background: var(--ogrid-header-bg, rgba(0, 0, 0, 0.04));\n border-bottom: 1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));\n position: sticky;\n left: 0;\n z-index: 3;\n }\n .ogrid-data-cell {\n padding: 0;\n border-bottom: 1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));\n position: relative;\n }\n .ogrid-data-cell:has(> [data-active-cell]),\n .ogrid-data-cell:has(> .ogrid-editing-cell) { z-index: 2; }\n .ogrid-cell-content {\n padding: var(--ogrid-cell-padding, 6px 10px);\n min-height: 20px;\n cursor: default;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .ogrid-editing-cell {\n width: 100%; height: 100%; display: flex; align-items: center; box-sizing: border-box;\n outline: 2px solid var(--ogrid-selection-color, #217346); outline-offset: -1px;\n z-index: 2; position: relative; background: var(--ogrid-bg, #fff); overflow: hidden; padding: 0;\n }\n .ogrid-scroll-wrapper [data-drag-range] { background: var(--ogrid-range-bg, rgba(33, 115, 70, 0.12)); }\n .ogrid-fill-handle {\n position: absolute;\n bottom: -3px;\n right: -3px;\n width: 7px;\n height: 7px;\n background: var(--ogrid-selection, #217346);\n cursor: crosshair;\n touch-action: none;\n z-index: 2;\n }\n @media (pointer: coarse) {\n .ogrid-fill-handle { width: 14px; height: 14px; right: -7px; bottom: -7px; border-radius: 2px; }\n }\n .ogrid-empty-container {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 48px 24px;\n text-align: center;\n color: var(--ogrid-fg-muted, rgba(0, 0, 0, 0.5));\n }\n .ogrid-empty-title {\n font-weight: 600;\n margin-bottom: 8px;\n }\n .ogrid-status-bar {\n display: flex;\n align-items: center;\n gap: 16px;\n width: 100%;\n min-height: 33px;\n padding: 6px 12px;\n box-sizing: border-box;\n font-size: 12px;\n line-height: 20px;\n color: var(--ogrid-fg-secondary, rgba(0, 0, 0, 0.6));\n background: var(--ogrid-header-bg, #f5f5f5);\n border-top: 1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));\n }\n .ogrid-status-bar-item {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n }\n .ogrid-status-bar-item:not(:last-child)::after {\n content: '';\n width: 1px;\n height: 14px;\n margin-left: 12px;\n background: var(--ogrid-border, rgba(0, 0, 0, 0.12));\n }\n .ogrid-status-bar-label {\n color: var(--ogrid-fg-secondary, rgba(0, 0, 0, 0.6));\n }\n .ogrid-status-bar-value {\n color: var(--ogrid-fg, rgba(0, 0, 0, 0.87));\n font-weight: 600;\n }\n .ogrid-loading-overlay {\n position: absolute;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n background: var(--ogrid-loading-overlay, rgba(255, 255, 255, 0.7));\n z-index: 10;\n }\n .ogrid-loading-content {\n display: flex;\n align-items: center;\n gap: 8px;\n color: var(--ogrid-fg, #242424);\n }\n .ogrid-loading-text {\n font-size: 14px;\n }\n .loading-dimmed {\n opacity: 0.5;\n pointer-events: none;\n }\n .ogrid-drop-indicator {\n position: absolute;\n top: 0;\n bottom: 0;\n width: 3px;\n background: var(--ogrid-primary, #217346);\n pointer-events: none;\n z-index: 100;\n transition: left 0.05s;\n }\n .ogrid-th-pinned-left {\n position: sticky;\n top: 0;\n left: 0;\n z-index: 10;\n background: var(--ogrid-header-bg, #f5f5f5);\n border-right: 1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));\n box-shadow: 2px 0 4px -1px rgba(0, 0, 0, 0.1);\n }\n .ogrid-th-pinned-right {\n position: sticky;\n top: 0;\n right: 0;\n z-index: 10;\n background: var(--ogrid-header-bg, #f5f5f5);\n border-left: 1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));\n box-shadow: -2px 0 4px -1px rgba(0, 0, 0, 0.1);\n }\n .ogrid-td-pinned-left {\n position: sticky;\n left: 0;\n z-index: 5;\n background: var(--ogrid-bg, #fff);\n border-right: 1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));\n box-shadow: 2px 0 4px -1px rgba(0, 0, 0, 0.1);\n }\n .ogrid-td-pinned-right {\n position: sticky;\n right: 0;\n z-index: 5;\n background: var(--ogrid-bg, #fff);\n border-left: 1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));\n box-shadow: -2px 0 4px -1px rgba(0, 0, 0, 0.1);\n }\n ::ng-deep th:focus-visible,\n ::ng-deep td:focus-visible {\n outline: 2px solid var(--primary-color, #6366f1);\n outline-offset: -2px;\n z-index: 11;\n }\n ::ng-deep .p-button:focus-visible,\n ::ng-deep button:focus-visible {\n outline: 2px solid var(--primary-color, #6366f1);\n outline-offset: 2px;\n }\n\n /* Context menu */\n .ogrid-context-menu {\n position: fixed;\n z-index: 1000;\n min-width: 160px;\n padding: 4px 0;\n background: var(--ogrid-bg, #fff);\n border: 1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));\n border-radius: 6px;\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);\n }\n .ogrid-context-menu-item {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 24px;\n width: 100%;\n padding: 6px 12px;\n border: none;\n background: none;\n font-size: 13px;\n text-align: left;\n cursor: pointer;\n color: var(--ogrid-fg, rgba(0, 0, 0, 0.87));\n }\n .ogrid-context-menu-item:hover:not(:disabled) {\n background: var(--ogrid-hover-bg, rgba(0, 0, 0, 0.04));\n }\n .ogrid-context-menu-item:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n .ogrid-context-menu-item-label {\n flex: 1;\n }\n .ogrid-context-menu-item-shortcut {\n color: var(--ogrid-fg-muted, rgba(0, 0, 0, 0.5));\n font-size: 0.85em;\n }\n .ogrid-context-menu-divider {\n height: 1px;\n margin: 4px 0;\n background: var(--ogrid-border, rgba(0, 0, 0, 0.12));\n }\n ::ng-deep .p-checkbox:focus-visible {\n outline: 2px solid var(--primary-color, #6366f1);\n outline-offset: 2px;\n }\n\n /* PrimeNG Menu popup overrides.\n Double-class selectors (0,2,0) beat PrimeNG's single-class (0,1,0) defaults. */\n .p-menu.p-menu {\n background: var(--ogrid-bg, #ffffff);\n color: var(--ogrid-fg, rgba(0, 0, 0, 0.87));\n border: 1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));\n border-radius: 4px;\n padding: 4px 0;\n }\n .p-menu-overlay.p-menu-overlay {\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--ogrid-border, rgba(0, 0, 0, 0.12));\n }\n .p-menu-item-content.p-menu-item-content {\n color: var(--ogrid-fg, rgba(0, 0, 0, 0.87));\n }\n .p-menu-item-link.p-menu-item-link {\n color: var(--ogrid-fg, rgba(0, 0, 0, 0.87));\n padding: 6px 12px;\n }\n .p-menu-item-label.p-menu-item-label {\n color: var(--ogrid-fg, rgba(0, 0, 0, 0.87));\n font-size: 0.875rem;\n }\n .p-menu-item:not(.p-disabled) .p-menu-item-content.p-menu-item-content:hover {\n background: var(--ogrid-hover-bg, rgba(0, 0, 0, 0.04));\n color: var(--ogrid-fg, rgba(0, 0, 0, 0.87));\n }\n .p-menu-separator.p-menu-separator {\n border-color: var(--ogrid-border, rgba(0, 0, 0, 0.12));\n margin: 4px 0;\n }\n .ogrid-column-letter-cell {\n text-align: center;\n font-size: 11px;\n font-weight: 500;\n color: var(--ogrid-fg-muted, rgba(0, 0, 0, 0.4));\n padding: 2px 4px;\n background: var(--ogrid-column-letter-bg, var(--ogrid-header-bg, #f5f5f5));\n border-bottom: 1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12));\n user-select: none;\n font-variant-numeric: tabular-nums;\n }\n /* Reveal column menu trigger on header hover without layout shift.\n The button always takes up space (visibility: hidden); shown when column is hovered. */\n @media (hover: hover) {\n th:hover .column-header-menu-trigger { visibility: visible; }\n }\n "] }]
|
|
1105
|
+
}], () => [], { wrapperRef: [{
|
|
1106
|
+
type: ViewChild,
|
|
1107
|
+
args: ['wrapper']
|
|
1108
|
+
}], tableContainerRefEl: [{
|
|
1109
|
+
type: ViewChild,
|
|
1110
|
+
args: ['tableContainer']
|
|
1111
|
+
}], itemsInput: [{
|
|
1112
|
+
type: Input,
|
|
1113
|
+
args: [{ required: true, alias: 'items' }]
|
|
1114
|
+
}], columns: [{
|
|
1115
|
+
type: Input,
|
|
1116
|
+
args: [{ required: true }]
|
|
1117
|
+
}], getRowIdInput: [{
|
|
1118
|
+
type: Input,
|
|
1119
|
+
args: [{ required: true, alias: 'getRowId' }]
|
|
1120
|
+
}], sortBy: [{
|
|
1121
|
+
type: Input
|
|
1122
|
+
}], sortDirection: [{
|
|
1123
|
+
type: Input
|
|
1124
|
+
}], onColumnSort: [{
|
|
1125
|
+
type: Input,
|
|
1126
|
+
args: [{ required: true }]
|
|
1127
|
+
}], visibleColumns: [{
|
|
1128
|
+
type: Input,
|
|
1129
|
+
args: [{ required: true }]
|
|
1130
|
+
}], columnOrder: [{
|
|
1131
|
+
type: Input
|
|
1132
|
+
}], onColumnOrderChange: [{
|
|
1133
|
+
type: Input
|
|
1134
|
+
}], onColumnResized: [{
|
|
1135
|
+
type: Input
|
|
1136
|
+
}], onColumnPinned: [{
|
|
1137
|
+
type: Input
|
|
1138
|
+
}], pinnedColumnsInput: [{
|
|
1139
|
+
type: Input,
|
|
1140
|
+
args: [{ alias: 'pinnedColumns' }]
|
|
1141
|
+
}], initialColumnWidths: [{
|
|
1142
|
+
type: Input
|
|
1143
|
+
}], layoutMode: [{
|
|
1144
|
+
type: Input
|
|
1145
|
+
}], suppressHorizontalScroll: [{
|
|
1146
|
+
type: Input
|
|
1147
|
+
}], stickyHeaderInput: [{
|
|
1148
|
+
type: Input
|
|
1149
|
+
}], columnReorder: [{
|
|
1150
|
+
type: Input
|
|
1151
|
+
}], isLoadingInput: [{
|
|
1152
|
+
type: Input,
|
|
1153
|
+
args: [{ alias: 'isLoading' }]
|
|
1154
|
+
}], loadingMessageInput: [{
|
|
1155
|
+
type: Input,
|
|
1156
|
+
args: [{ alias: 'loadingMessage' }]
|
|
1157
|
+
}], editable: [{
|
|
1158
|
+
type: Input
|
|
1159
|
+
}], cellSelection: [{
|
|
1160
|
+
type: Input
|
|
1161
|
+
}], onCellValueChanged: [{
|
|
1162
|
+
type: Input
|
|
1163
|
+
}], onUndoInput: [{
|
|
1164
|
+
type: Input,
|
|
1165
|
+
args: [{ alias: 'onUndo' }]
|
|
1166
|
+
}], onRedoInput: [{
|
|
1167
|
+
type: Input,
|
|
1168
|
+
args: [{ alias: 'onRedo' }]
|
|
1169
|
+
}], canUndoInput: [{
|
|
1170
|
+
type: Input,
|
|
1171
|
+
args: [{ alias: 'canUndo' }]
|
|
1172
|
+
}], canRedoInput: [{
|
|
1173
|
+
type: Input,
|
|
1174
|
+
args: [{ alias: 'canRedo' }]
|
|
1175
|
+
}], rowSelectionMode: [{
|
|
1176
|
+
type: Input,
|
|
1177
|
+
args: [{ alias: 'rowSelection' }]
|
|
1178
|
+
}], selectedRows: [{
|
|
1179
|
+
type: Input
|
|
1180
|
+
}], onSelectionChange: [{
|
|
1181
|
+
type: Input
|
|
1182
|
+
}], statusBar: [{
|
|
1183
|
+
type: Input
|
|
1184
|
+
}], filters: [{
|
|
1185
|
+
type: Input,
|
|
1186
|
+
args: [{ required: true }]
|
|
1187
|
+
}], onFilterChange: [{
|
|
1188
|
+
type: Input,
|
|
1189
|
+
args: [{ required: true }]
|
|
1190
|
+
}], filterOptions: [{
|
|
1191
|
+
type: Input
|
|
1192
|
+
}], loadingFilterOptions: [{
|
|
1193
|
+
type: Input
|
|
1194
|
+
}], peopleSearch: [{
|
|
1195
|
+
type: Input
|
|
1196
|
+
}], getUserByEmail: [{
|
|
1197
|
+
type: Input
|
|
1198
|
+
}], emptyStateInput: [{
|
|
1199
|
+
type: Input,
|
|
1200
|
+
args: [{ alias: 'emptyState' }]
|
|
1201
|
+
}], onCellError: [{
|
|
1202
|
+
type: Input
|
|
1203
|
+
}], ariaLabelInput: [{
|
|
1204
|
+
type: Input,
|
|
1205
|
+
args: [{ alias: 'aria-label' }]
|
|
1206
|
+
}], ariaLabelledByInput: [{
|
|
1207
|
+
type: Input,
|
|
1208
|
+
args: [{ alias: 'aria-labelledby' }]
|
|
1209
|
+
}], showRowNumbers: [{
|
|
1210
|
+
type: Input
|
|
1211
|
+
}], showColumnLettersInput: [{
|
|
1212
|
+
type: Input,
|
|
1213
|
+
args: [{ alias: 'showColumnLetters' }]
|
|
1214
|
+
}], showNameBoxInput: [{
|
|
1215
|
+
type: Input,
|
|
1216
|
+
args: [{ alias: 'showNameBox' }]
|
|
1217
|
+
}], onActiveCellChange: [{
|
|
1218
|
+
type: Input
|
|
1219
|
+
}], formulaReferencesInput: [{
|
|
1220
|
+
type: Input,
|
|
1221
|
+
args: [{ alias: 'formulaReferences' }]
|
|
1222
|
+
}], currentPageInput: [{
|
|
1223
|
+
type: Input,
|
|
1224
|
+
args: [{ alias: 'currentPage' }]
|
|
1225
|
+
}], pageSizeInput: [{
|
|
1226
|
+
type: Input,
|
|
1227
|
+
args: [{ alias: 'pageSize' }]
|
|
1228
|
+
}] }); })();
|
|
1229
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(DataGridTableComponent, { className: "DataGridTableComponent", filePath: "datagrid-table/datagrid-table.component.ts", lineNumber: 788 }); })();
|