ngx-core-components 0.3.31 → 0.3.33
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/README.md +1079 -601
- package/barcodes/barcode/barcode-encoding.d.ts +1 -0
- package/barcodes/barcode/barcode.component.d.ts +4 -4
- package/barcodes/public-api.d.ts +1 -0
- package/charts/adjacency-matrix/adjacency-matrix.component.d.ts +4 -1
- package/charts/agentic-cognitive-topology/agentic-cognitive-topology.component.d.ts +5 -0
- package/charts/arc-diagram/arc-diagram.component.d.ts +7 -0
- package/charts/area-chart/area-chart.component.d.ts +5 -0
- package/charts/area-range-chart/area-range-chart.component.d.ts +4 -0
- package/charts/area-spline-range-chart/area-spline-range-chart.component.d.ts +4 -0
- package/charts/bar-chart/bar-chart.component.d.ts +5 -1
- package/charts/box-plot-chart/box-plot-chart.component.d.ts +6 -0
- package/charts/bubble-chart/bubble-chart.component.d.ts +4 -0
- package/charts/bullet-chart/bullet-chart.component.d.ts +3 -0
- package/charts/calendar-heatmap/calendar-heatmap.component.d.ts +3 -0
- package/charts/candlestick-chart/candlestick-chart.component.d.ts +4 -0
- package/charts/chord-diagram/chord-diagram.component.d.ts +7 -1
- package/charts/column-pyramid-chart/column-pyramid-chart.component.d.ts +4 -1
- package/charts/column-range-chart/column-range-chart.component.d.ts +5 -1
- package/charts/combo-chart/combo-chart.component.d.ts +4 -0
- package/charts/dependency-wheel/dependency-wheel.component.d.ts +7 -1
- package/charts/dumbbell-chart/dumbbell-chart.component.d.ts +5 -1
- package/charts/funnel-chart/funnel-chart.component.d.ts +4 -0
- package/charts/gauge-chart/gauge-chart.component.d.ts +4 -0
- package/charts/geo-heatmap/geo-heatmap.component.d.ts +4 -1
- package/charts/heatmap-chart/heatmap-chart.component.d.ts +4 -0
- package/charts/heikin-ashi-chart/heikin-ashi-chart.component.d.ts +4 -0
- package/charts/histogram/histogram.component.d.ts +3 -0
- package/charts/hlc-chart/hlc-chart.component.d.ts +5 -0
- package/charts/hollow-candlestick-chart/hollow-candlestick-chart.component.d.ts +4 -0
- package/charts/kagi-chart/kagi-chart.component.d.ts +4 -1
- package/charts/line-chart/line-chart.component.d.ts +2 -0
- package/charts/lollipop-chart/lollipop-chart.component.d.ts +5 -1
- package/charts/map-bubble/map-bubble.component.d.ts +4 -1
- package/charts/map-choropleth/map-choropleth.component.d.ts +9 -1
- package/charts/map-line-point/map-line-point.component.d.ts +8 -2
- package/charts/marimekko-chart/marimekko-chart.component.d.ts +25 -1
- package/charts/multi-needle-gauge/multi-needle-gauge.component.d.ts +6 -0
- package/charts/nested-donut-chart/nested-donut-chart.component.d.ts +7 -0
- package/charts/network-graph/network-graph.component.d.ts +7 -0
- package/charts/ohlc-chart/ohlc-chart.component.d.ts +4 -0
- package/charts/org-chart/org-chart.component.d.ts +5 -0
- package/charts/packed-bubble-chart/packed-bubble-chart.component.d.ts +3 -0
- package/charts/parallel-coordinates/parallel-coordinates.component.d.ts +3 -0
- package/charts/pareto-chart/pareto-chart.component.d.ts +4 -1
- package/charts/pictorial-chart/pictorial-chart.component.d.ts +3 -0
- package/charts/pie-chart/pie-chart.component.d.ts +9 -0
- package/charts/point-figure-chart/point-figure-chart.component.d.ts +4 -1
- package/charts/polar-area-chart/polar-area-chart.component.d.ts +11 -0
- package/charts/pyramid-chart/pyramid-chart.component.d.ts +5 -0
- package/charts/radar-chart/radar-chart.component.d.ts +5 -3
- package/charts/radial-bar-chart/radial-bar-chart.component.d.ts +4 -0
- package/charts/range-bar-chart/range-bar-chart.component.d.ts +4 -0
- package/charts/renko-chart/renko-chart.component.d.ts +4 -1
- package/charts/ridgeline-chart/ridgeline-chart.component.d.ts +11 -1
- package/charts/sankey-chart/sankey-chart.component.d.ts +7 -1
- package/charts/scatter-plot/scatter-plot.component.d.ts +4 -0
- package/charts/shared/chart-accessible-mark.directive.d.ts +9 -0
- package/charts/shared/chart-export-menu.component.d.ts +7 -0
- package/charts/shared/chart-skeleton.component.d.ts +1 -1
- package/charts/slope-chart/slope-chart.component.d.ts +5 -1
- package/charts/step-line-chart/step-line-chart.component.d.ts +5 -0
- package/charts/sunburst-chart/sunburst-chart.component.d.ts +6 -3
- package/charts/timeline-chart/timeline-chart.component.d.ts +2 -0
- package/charts/treemap-chart/treemap-chart.component.d.ts +6 -4
- package/charts/variable-pie-chart/variable-pie-chart.component.d.ts +4 -0
- package/charts/variwide-chart/variwide-chart.component.d.ts +8 -1
- package/charts/waterfall-chart/waterfall-chart.component.d.ts +8 -0
- package/charts/wind-rose/wind-rose.component.d.ts +3 -0
- package/charts/word-cloud/word-cloud.component.d.ts +3 -0
- package/fesm2022/ngx-core-components-barcodes.mjs +196 -42
- package/fesm2022/ngx-core-components-barcodes.mjs.map +1 -1
- package/fesm2022/ngx-core-components-charts.mjs +4949 -2863
- package/fesm2022/ngx-core-components-charts.mjs.map +1 -1
- package/fesm2022/ngx-core-components-grid.mjs +2145 -567
- package/fesm2022/ngx-core-components-grid.mjs.map +1 -1
- package/fesm2022/ngx-core-components-i18n.mjs +163 -35
- package/fesm2022/ngx-core-components-i18n.mjs.map +1 -1
- package/fesm2022/ngx-core-components-inputs.mjs +297 -39
- package/fesm2022/ngx-core-components-inputs.mjs.map +1 -1
- package/fesm2022/ngx-core-components-layout.mjs +89 -66
- package/fesm2022/ngx-core-components-layout.mjs.map +1 -1
- package/fesm2022/ngx-core-components-testing.mjs +30 -0
- package/fesm2022/ngx-core-components-testing.mjs.map +1 -0
- package/fesm2022/ngx-core-components-views.mjs +69 -29
- package/fesm2022/ngx-core-components-views.mjs.map +1 -1
- package/fesm2022/ngx-core-components.mjs +2 -2
- package/fesm2022/ngx-core-components.mjs.map +1 -1
- package/grid/data-grid/components/grid-filter-builder/grid-filter-builder.component.d.ts +6 -1
- package/grid/data-grid/data-grid.component.d.ts +20 -1
- package/grid/data-grid/grid-data-source.d.ts +22 -0
- package/grid/data-grid/services/grid-state.service.d.ts +7 -0
- package/grid/public-api.d.ts +6 -3
- package/i18n/ngx-core-i18n.d.ts +128 -1
- package/i18n/public-api.d.ts +1 -1
- package/inputs/form-builder/form-builder.component.d.ts +17 -1
- package/layout/tab-strip/tab-strip.component.d.ts +2 -0
- package/package.json +13 -9
- package/public-api.d.ts +8 -7
- package/testing/component-test-harness.d.ts +10 -0
- package/testing/index.d.ts +5 -0
- package/testing/public-api.d.ts +1 -0
- package/views/kanban/kanban.component.d.ts +1 -0
|
@@ -1,9 +1,54 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, input, computed, ChangeDetectionStrategy, Component,
|
|
2
|
+
import { signal, Injectable, input, computed, ChangeDetectionStrategy, Component, inject, ElementRef, output, HostListener, TemplateRef, Input, Directive, Injector, DestroyRef, effect, untracked, afterNextRender, ContentChildren } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule, NgTemplateOutlet } from '@angular/common';
|
|
5
5
|
import { NGX_CORE_I18N } from 'ngx-core-components/i18n';
|
|
6
6
|
|
|
7
|
+
class GridRemoteDataController {
|
|
8
|
+
state = signal({
|
|
9
|
+
items: [],
|
|
10
|
+
total: 0,
|
|
11
|
+
loading: false,
|
|
12
|
+
error: null,
|
|
13
|
+
});
|
|
14
|
+
activeRequest = null;
|
|
15
|
+
requestId = 0;
|
|
16
|
+
async load(source, request) {
|
|
17
|
+
this.cancel();
|
|
18
|
+
const requestId = ++this.requestId;
|
|
19
|
+
const controller = new AbortController();
|
|
20
|
+
this.activeRequest = controller;
|
|
21
|
+
this.state.update(state => ({ ...state, loading: true, error: null }));
|
|
22
|
+
try {
|
|
23
|
+
const result = await source.load(request, controller.signal);
|
|
24
|
+
if (controller.signal.aborted || requestId !== this.requestId) {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
if (!Array.isArray(result.items) || !Number.isInteger(result.total) || result.total < 0) {
|
|
28
|
+
throw new TypeError('Grid data source must return an items array and a non-negative integer total.');
|
|
29
|
+
}
|
|
30
|
+
const nextState = { items: result.items, total: result.total, loading: false, error: null };
|
|
31
|
+
this.state.set(nextState);
|
|
32
|
+
this.activeRequest = null;
|
|
33
|
+
return nextState;
|
|
34
|
+
}
|
|
35
|
+
catch (error) {
|
|
36
|
+
if (controller.signal.aborted || requestId !== this.requestId) {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
this.state.update(state => ({ ...state, loading: false, error }));
|
|
40
|
+
this.activeRequest = null;
|
|
41
|
+
throw error;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
cancel() {
|
|
45
|
+
this.requestId++;
|
|
46
|
+
this.activeRequest?.abort();
|
|
47
|
+
this.activeRequest = null;
|
|
48
|
+
this.state.update(state => ({ ...state, loading: false }));
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
7
52
|
/**
|
|
8
53
|
* Standalone injectable service for exporting grid data to JSON, CSV, and Excel formats.
|
|
9
54
|
* Extracted from DataGridComponent to enable reuse and reduce component size.
|
|
@@ -1001,6 +1046,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
1001
1046
|
* @usage
|
|
1002
1047
|
* ```html
|
|
1003
1048
|
* <ngx-grid-filter-builder
|
|
1049
|
+
* [gridInstanceId]="gridInstanceId"
|
|
1004
1050
|
* [columns]="filterableColumns()"
|
|
1005
1051
|
* [expression]="currentFilterExpression()"
|
|
1006
1052
|
* (expressionChange)="onFilterExpressionChange($event)"
|
|
@@ -1009,6 +1055,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
1009
1055
|
* ```
|
|
1010
1056
|
*/
|
|
1011
1057
|
class GridFilterBuilderComponent {
|
|
1058
|
+
i18n = inject(NGX_CORE_I18N);
|
|
1059
|
+
host = inject((ElementRef));
|
|
1060
|
+
gridInstanceId = input(null);
|
|
1012
1061
|
/** Available columns for filter field selection */
|
|
1013
1062
|
columns = input([]);
|
|
1014
1063
|
/** Current filter expression to edit */
|
|
@@ -1045,41 +1094,41 @@ class GridFilterBuilderComponent {
|
|
|
1045
1094
|
const col = this.columns().find(c => c.field === field);
|
|
1046
1095
|
const colType = col?.columnType ?? 'text';
|
|
1047
1096
|
const common = [
|
|
1048
|
-
{ value: 'isEmpty', label:
|
|
1049
|
-
{ value: 'isNotEmpty', label:
|
|
1097
|
+
{ value: 'isEmpty', label: this.i18n.grid.operatorIsEmpty },
|
|
1098
|
+
{ value: 'isNotEmpty', label: this.i18n.grid.operatorIsNotEmpty },
|
|
1050
1099
|
];
|
|
1051
1100
|
switch (colType) {
|
|
1052
1101
|
case 'number':
|
|
1053
1102
|
return [
|
|
1054
|
-
{ value: 'eq', label:
|
|
1055
|
-
{ value: 'neq', label:
|
|
1056
|
-
{ value: 'gt', label:
|
|
1057
|
-
{ value: 'gte', label:
|
|
1058
|
-
{ value: 'lt', label:
|
|
1059
|
-
{ value: 'lte', label:
|
|
1060
|
-
{ value: 'between', label:
|
|
1103
|
+
{ value: 'eq', label: this.i18n.grid.equals },
|
|
1104
|
+
{ value: 'neq', label: this.i18n.grid.operatorNotEquals },
|
|
1105
|
+
{ value: 'gt', label: this.i18n.grid.operatorGreaterThan },
|
|
1106
|
+
{ value: 'gte', label: this.i18n.grid.operatorGreaterOrEqual },
|
|
1107
|
+
{ value: 'lt', label: this.i18n.grid.operatorLessThan },
|
|
1108
|
+
{ value: 'lte', label: this.i18n.grid.operatorLessOrEqual },
|
|
1109
|
+
{ value: 'between', label: this.i18n.grid.operatorBetween },
|
|
1061
1110
|
...common,
|
|
1062
1111
|
];
|
|
1063
1112
|
case 'date':
|
|
1064
1113
|
return [
|
|
1065
|
-
{ value: 'eq', label:
|
|
1066
|
-
{ value: 'before', label:
|
|
1067
|
-
{ value: 'after', label:
|
|
1068
|
-
{ value: 'between', label:
|
|
1114
|
+
{ value: 'eq', label: this.i18n.grid.equals },
|
|
1115
|
+
{ value: 'before', label: this.i18n.grid.operatorBefore },
|
|
1116
|
+
{ value: 'after', label: this.i18n.grid.operatorAfter },
|
|
1117
|
+
{ value: 'between', label: this.i18n.grid.operatorBetween },
|
|
1069
1118
|
...common,
|
|
1070
1119
|
];
|
|
1071
1120
|
case 'boolean':
|
|
1072
1121
|
return [
|
|
1073
|
-
{ value: 'isTrue', label:
|
|
1074
|
-
{ value: 'isFalse', label:
|
|
1122
|
+
{ value: 'isTrue', label: this.i18n.grid.operatorIsTrue },
|
|
1123
|
+
{ value: 'isFalse', label: this.i18n.grid.operatorIsFalse },
|
|
1075
1124
|
];
|
|
1076
1125
|
default:
|
|
1077
1126
|
return [
|
|
1078
|
-
{ value: 'contains', label:
|
|
1079
|
-
{ value: 'eq', label:
|
|
1080
|
-
{ value: 'neq', label:
|
|
1081
|
-
{ value: 'startsWith', label:
|
|
1082
|
-
{ value: 'endsWith', label:
|
|
1127
|
+
{ value: 'contains', label: this.i18n.grid.contains },
|
|
1128
|
+
{ value: 'eq', label: this.i18n.grid.equals },
|
|
1129
|
+
{ value: 'neq', label: this.i18n.grid.operatorNotEquals },
|
|
1130
|
+
{ value: 'startsWith', label: this.i18n.grid.startsWith },
|
|
1131
|
+
{ value: 'endsWith', label: this.i18n.grid.endsWith },
|
|
1083
1132
|
...common,
|
|
1084
1133
|
];
|
|
1085
1134
|
}
|
|
@@ -1168,6 +1217,30 @@ class GridFilterBuilderComponent {
|
|
|
1168
1217
|
clearAll() {
|
|
1169
1218
|
this.editExpression.set(this.createEmptyGroup());
|
|
1170
1219
|
}
|
|
1220
|
+
onDialogKeydown(event) {
|
|
1221
|
+
if (event.key === 'Escape') {
|
|
1222
|
+
event.preventDefault();
|
|
1223
|
+
this.close.emit();
|
|
1224
|
+
return;
|
|
1225
|
+
}
|
|
1226
|
+
if (event.key !== 'Tab')
|
|
1227
|
+
return;
|
|
1228
|
+
const panel = this.host.nativeElement.querySelector('.filter-builder-panel');
|
|
1229
|
+
const focusable = panel?.querySelectorAll('button:not(:disabled), input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex="-1"])');
|
|
1230
|
+
if (!panel || !focusable?.length)
|
|
1231
|
+
return;
|
|
1232
|
+
const first = focusable[0];
|
|
1233
|
+
const last = focusable[focusable.length - 1];
|
|
1234
|
+
const active = event.target;
|
|
1235
|
+
if (event.shiftKey && (active === first || active === panel)) {
|
|
1236
|
+
event.preventDefault();
|
|
1237
|
+
last.focus();
|
|
1238
|
+
}
|
|
1239
|
+
else if (!event.shiftKey && active === last) {
|
|
1240
|
+
event.preventDefault();
|
|
1241
|
+
first.focus();
|
|
1242
|
+
}
|
|
1243
|
+
}
|
|
1171
1244
|
// ─── Private helpers ──────────────────────────────────────────────
|
|
1172
1245
|
createEmptyGroup() {
|
|
1173
1246
|
return { operator: 'AND', conditions: [] };
|
|
@@ -1202,15 +1275,30 @@ class GridFilterBuilderComponent {
|
|
|
1202
1275
|
return JSON.parse(JSON.stringify(obj));
|
|
1203
1276
|
}
|
|
1204
1277
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: GridFilterBuilderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1205
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: GridFilterBuilderComponent, isStandalone: true, selector: "ngx-grid-filter-builder", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, expression: { classPropertyName: "expression", publicName: "expression", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expressionChange: "expressionChange", close: "close" }, ngImport: i0, template: `
|
|
1278
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: GridFilterBuilderComponent, isStandalone: true, selector: "ngx-grid-filter-builder", inputs: { gridInstanceId: { classPropertyName: "gridInstanceId", publicName: "gridInstanceId", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, expression: { classPropertyName: "expression", publicName: "expression", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expressionChange: "expressionChange", close: "close" }, host: { listeners: { "keydown": "onDialogKeydown($event)" } }, ngImport: i0, template: `
|
|
1206
1279
|
<div class="filter-builder-overlay" (click)="close.emit()">
|
|
1207
|
-
<div
|
|
1280
|
+
<div
|
|
1281
|
+
class="filter-builder-panel"
|
|
1282
|
+
[id]="gridInstanceId() ? gridInstanceId() + '-filter-builder' : null"
|
|
1283
|
+
role="dialog"
|
|
1284
|
+
aria-modal="true"
|
|
1285
|
+
[attr.aria-label]="i18n.grid.advancedFilterBuilder"
|
|
1286
|
+
tabindex="-1"
|
|
1287
|
+
(click)="$event.stopPropagation()"
|
|
1288
|
+
>
|
|
1208
1289
|
<div class="fb-header">
|
|
1209
1290
|
<div class="fb-title">
|
|
1210
1291
|
<span class="fb-icon">🔍</span>
|
|
1211
|
-
<span>
|
|
1292
|
+
<span>{{ i18n.grid.advancedFilterBuilder }}</span>
|
|
1212
1293
|
</div>
|
|
1213
|
-
<button
|
|
1294
|
+
<button
|
|
1295
|
+
type="button"
|
|
1296
|
+
class="fb-close"
|
|
1297
|
+
[attr.aria-label]="i18n.grid.closeFilterBuilder"
|
|
1298
|
+
(click)="close.emit()"
|
|
1299
|
+
>
|
|
1300
|
+
✕
|
|
1301
|
+
</button>
|
|
1214
1302
|
</div>
|
|
1215
1303
|
|
|
1216
1304
|
<div class="fb-body">
|
|
@@ -1218,10 +1306,14 @@ class GridFilterBuilderComponent {
|
|
|
1218
1306
|
</div>
|
|
1219
1307
|
|
|
1220
1308
|
<div class="fb-footer">
|
|
1221
|
-
<button type="button" class="fb-btn fb-btn-clear" (click)="clearAll()">
|
|
1309
|
+
<button type="button" class="fb-btn fb-btn-clear" (click)="clearAll()">{{ i18n.grid.clearAll }}</button>
|
|
1222
1310
|
<div class="fb-footer-actions">
|
|
1223
|
-
<button type="button" class="fb-btn fb-btn-cancel" (click)="close.emit()">
|
|
1224
|
-
|
|
1311
|
+
<button type="button" class="fb-btn fb-btn-cancel" (click)="close.emit()">
|
|
1312
|
+
{{ i18n.common.cancel }}
|
|
1313
|
+
</button>
|
|
1314
|
+
<button type="button" class="fb-btn fb-btn-apply" (click)="applyFilter()">
|
|
1315
|
+
{{ i18n.grid.applyFilter }}
|
|
1316
|
+
</button>
|
|
1225
1317
|
</div>
|
|
1226
1318
|
</div>
|
|
1227
1319
|
</div>
|
|
@@ -1231,22 +1323,41 @@ class GridFilterBuilderComponent {
|
|
|
1231
1323
|
<div class="fb-group">
|
|
1232
1324
|
<div class="fb-group-header">
|
|
1233
1325
|
<div class="fb-operator-toggle">
|
|
1234
|
-
<button
|
|
1326
|
+
<button
|
|
1327
|
+
type="button"
|
|
1235
1328
|
class="op-btn"
|
|
1236
1329
|
[class.active]="group.operator === 'AND'"
|
|
1330
|
+
[attr.aria-pressed]="group.operator === 'AND'"
|
|
1237
1331
|
(click)="setGroupOperator(path, 'AND')"
|
|
1238
|
-
>
|
|
1239
|
-
|
|
1332
|
+
>
|
|
1333
|
+
{{ i18n.grid.filterGroupAnd }}
|
|
1334
|
+
</button>
|
|
1335
|
+
<button
|
|
1336
|
+
type="button"
|
|
1240
1337
|
class="op-btn"
|
|
1241
1338
|
[class.active]="group.operator === 'OR'"
|
|
1339
|
+
[attr.aria-pressed]="group.operator === 'OR'"
|
|
1242
1340
|
(click)="setGroupOperator(path, 'OR')"
|
|
1243
|
-
>
|
|
1341
|
+
>
|
|
1342
|
+
{{ i18n.grid.filterGroupOr }}
|
|
1343
|
+
</button>
|
|
1244
1344
|
</div>
|
|
1245
1345
|
<div class="fb-group-actions">
|
|
1246
|
-
<button type="button" class="fb-add-btn" (click)="addCondition(path)"
|
|
1247
|
-
|
|
1346
|
+
<button type="button" class="fb-add-btn" (click)="addCondition(path)">
|
|
1347
|
+
+ {{ i18n.grid.addCondition }}
|
|
1348
|
+
</button>
|
|
1349
|
+
<button type="button" class="fb-add-btn fb-add-group" (click)="addGroup(path)">
|
|
1350
|
+
+ {{ i18n.grid.addGroup }}
|
|
1351
|
+
</button>
|
|
1248
1352
|
@if (path.length > 0) {
|
|
1249
|
-
<button
|
|
1353
|
+
<button
|
|
1354
|
+
type="button"
|
|
1355
|
+
class="fb-remove-group"
|
|
1356
|
+
[attr.aria-label]="i18n.grid.removeFilterGroup"
|
|
1357
|
+
(click)="removeItem(path)"
|
|
1358
|
+
>
|
|
1359
|
+
✕
|
|
1360
|
+
</button>
|
|
1250
1361
|
}
|
|
1251
1362
|
</div>
|
|
1252
1363
|
</div>
|
|
@@ -1257,33 +1368,62 @@ class GridFilterBuilderComponent {
|
|
|
1257
1368
|
<ng-container *ngTemplateOutlet="groupTpl; context: { group: item, path: path.concat($index) }" />
|
|
1258
1369
|
} @else {
|
|
1259
1370
|
<div class="fb-condition-row">
|
|
1260
|
-
<select
|
|
1371
|
+
<select
|
|
1372
|
+
class="fb-select fb-field-select"
|
|
1373
|
+
[attr.aria-label]="i18n.grid.filterField"
|
|
1374
|
+
[value]="asCondition(item).field"
|
|
1375
|
+
(change)="updateConditionField(path.concat($index), $any($event.target).value)"
|
|
1376
|
+
>
|
|
1261
1377
|
@for (col of filterableColumnsList(); track col.field) {
|
|
1262
|
-
<option [value]="col.field" [selected]="col.field === asCondition(item).field">
|
|
1378
|
+
<option [value]="col.field" [selected]="col.field === asCondition(item).field">
|
|
1379
|
+
{{ col.title }}
|
|
1380
|
+
</option>
|
|
1263
1381
|
}
|
|
1264
1382
|
</select>
|
|
1265
1383
|
|
|
1266
|
-
<select
|
|
1384
|
+
<select
|
|
1385
|
+
class="fb-select fb-operator-select"
|
|
1386
|
+
[attr.aria-label]="i18n.grid.filterOperator"
|
|
1387
|
+
[value]="asCondition(item).type"
|
|
1388
|
+
(change)="updateConditionType(path.concat($index), $any($event.target).value)"
|
|
1389
|
+
>
|
|
1267
1390
|
@for (op of getOperatorsForField(asCondition(item).field); track op.value) {
|
|
1268
1391
|
<option [value]="op.value" [selected]="op.value === asCondition(item).type">{{ op.label }}</option>
|
|
1269
1392
|
}
|
|
1270
1393
|
</select>
|
|
1271
1394
|
|
|
1272
1395
|
@if (!isUnaryOperator(asCondition(item).type)) {
|
|
1273
|
-
<input
|
|
1396
|
+
<input
|
|
1397
|
+
class="fb-input"
|
|
1398
|
+
[value]="asCondition(item).value ?? ''"
|
|
1399
|
+
(input)="updateConditionValue(path.concat($index), $any($event.target).value)"
|
|
1400
|
+
[placeholder]="i18n.grid.filterValuePlaceholder"
|
|
1401
|
+
/>
|
|
1274
1402
|
@if (asCondition(item).type === 'between') {
|
|
1275
|
-
<span class="fb-between-label">
|
|
1276
|
-
<input
|
|
1403
|
+
<span class="fb-between-label">{{ i18n.grid.filterRangeAnd }}</span>
|
|
1404
|
+
<input
|
|
1405
|
+
class="fb-input"
|
|
1406
|
+
[value]="asCondition(item).valueTo ?? ''"
|
|
1407
|
+
(input)="updateConditionValueTo(path.concat($index), $any($event.target).value)"
|
|
1408
|
+
[placeholder]="i18n.grid.filterRangeEndPlaceholder"
|
|
1409
|
+
/>
|
|
1277
1410
|
}
|
|
1278
1411
|
}
|
|
1279
1412
|
|
|
1280
|
-
<button
|
|
1413
|
+
<button
|
|
1414
|
+
type="button"
|
|
1415
|
+
class="fb-remove-condition"
|
|
1416
|
+
[attr.aria-label]="i18n.grid.removeFilterCondition"
|
|
1417
|
+
(click)="removeItem(path.concat($index))"
|
|
1418
|
+
>
|
|
1419
|
+
✕
|
|
1420
|
+
</button>
|
|
1281
1421
|
</div>
|
|
1282
1422
|
}
|
|
1283
1423
|
}
|
|
1284
1424
|
|
|
1285
1425
|
@if (group.conditions.length === 0) {
|
|
1286
|
-
<div class="fb-empty">
|
|
1426
|
+
<div class="fb-empty">{{ i18n.grid.noFilterConditions }}</div>
|
|
1287
1427
|
}
|
|
1288
1428
|
</div>
|
|
1289
1429
|
</div>
|
|
@@ -1294,13 +1434,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
1294
1434
|
type: Component,
|
|
1295
1435
|
args: [{ selector: 'ngx-grid-filter-builder', standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
1296
1436
|
<div class="filter-builder-overlay" (click)="close.emit()">
|
|
1297
|
-
<div
|
|
1437
|
+
<div
|
|
1438
|
+
class="filter-builder-panel"
|
|
1439
|
+
[id]="gridInstanceId() ? gridInstanceId() + '-filter-builder' : null"
|
|
1440
|
+
role="dialog"
|
|
1441
|
+
aria-modal="true"
|
|
1442
|
+
[attr.aria-label]="i18n.grid.advancedFilterBuilder"
|
|
1443
|
+
tabindex="-1"
|
|
1444
|
+
(click)="$event.stopPropagation()"
|
|
1445
|
+
>
|
|
1298
1446
|
<div class="fb-header">
|
|
1299
1447
|
<div class="fb-title">
|
|
1300
1448
|
<span class="fb-icon">🔍</span>
|
|
1301
|
-
<span>
|
|
1449
|
+
<span>{{ i18n.grid.advancedFilterBuilder }}</span>
|
|
1302
1450
|
</div>
|
|
1303
|
-
<button
|
|
1451
|
+
<button
|
|
1452
|
+
type="button"
|
|
1453
|
+
class="fb-close"
|
|
1454
|
+
[attr.aria-label]="i18n.grid.closeFilterBuilder"
|
|
1455
|
+
(click)="close.emit()"
|
|
1456
|
+
>
|
|
1457
|
+
✕
|
|
1458
|
+
</button>
|
|
1304
1459
|
</div>
|
|
1305
1460
|
|
|
1306
1461
|
<div class="fb-body">
|
|
@@ -1308,10 +1463,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
1308
1463
|
</div>
|
|
1309
1464
|
|
|
1310
1465
|
<div class="fb-footer">
|
|
1311
|
-
<button type="button" class="fb-btn fb-btn-clear" (click)="clearAll()">
|
|
1466
|
+
<button type="button" class="fb-btn fb-btn-clear" (click)="clearAll()">{{ i18n.grid.clearAll }}</button>
|
|
1312
1467
|
<div class="fb-footer-actions">
|
|
1313
|
-
<button type="button" class="fb-btn fb-btn-cancel" (click)="close.emit()">
|
|
1314
|
-
|
|
1468
|
+
<button type="button" class="fb-btn fb-btn-cancel" (click)="close.emit()">
|
|
1469
|
+
{{ i18n.common.cancel }}
|
|
1470
|
+
</button>
|
|
1471
|
+
<button type="button" class="fb-btn fb-btn-apply" (click)="applyFilter()">
|
|
1472
|
+
{{ i18n.grid.applyFilter }}
|
|
1473
|
+
</button>
|
|
1315
1474
|
</div>
|
|
1316
1475
|
</div>
|
|
1317
1476
|
</div>
|
|
@@ -1321,22 +1480,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
1321
1480
|
<div class="fb-group">
|
|
1322
1481
|
<div class="fb-group-header">
|
|
1323
1482
|
<div class="fb-operator-toggle">
|
|
1324
|
-
<button
|
|
1483
|
+
<button
|
|
1484
|
+
type="button"
|
|
1325
1485
|
class="op-btn"
|
|
1326
1486
|
[class.active]="group.operator === 'AND'"
|
|
1487
|
+
[attr.aria-pressed]="group.operator === 'AND'"
|
|
1327
1488
|
(click)="setGroupOperator(path, 'AND')"
|
|
1328
|
-
>
|
|
1329
|
-
|
|
1489
|
+
>
|
|
1490
|
+
{{ i18n.grid.filterGroupAnd }}
|
|
1491
|
+
</button>
|
|
1492
|
+
<button
|
|
1493
|
+
type="button"
|
|
1330
1494
|
class="op-btn"
|
|
1331
1495
|
[class.active]="group.operator === 'OR'"
|
|
1496
|
+
[attr.aria-pressed]="group.operator === 'OR'"
|
|
1332
1497
|
(click)="setGroupOperator(path, 'OR')"
|
|
1333
|
-
>
|
|
1498
|
+
>
|
|
1499
|
+
{{ i18n.grid.filterGroupOr }}
|
|
1500
|
+
</button>
|
|
1334
1501
|
</div>
|
|
1335
1502
|
<div class="fb-group-actions">
|
|
1336
|
-
<button type="button" class="fb-add-btn" (click)="addCondition(path)"
|
|
1337
|
-
|
|
1503
|
+
<button type="button" class="fb-add-btn" (click)="addCondition(path)">
|
|
1504
|
+
+ {{ i18n.grid.addCondition }}
|
|
1505
|
+
</button>
|
|
1506
|
+
<button type="button" class="fb-add-btn fb-add-group" (click)="addGroup(path)">
|
|
1507
|
+
+ {{ i18n.grid.addGroup }}
|
|
1508
|
+
</button>
|
|
1338
1509
|
@if (path.length > 0) {
|
|
1339
|
-
<button
|
|
1510
|
+
<button
|
|
1511
|
+
type="button"
|
|
1512
|
+
class="fb-remove-group"
|
|
1513
|
+
[attr.aria-label]="i18n.grid.removeFilterGroup"
|
|
1514
|
+
(click)="removeItem(path)"
|
|
1515
|
+
>
|
|
1516
|
+
✕
|
|
1517
|
+
</button>
|
|
1340
1518
|
}
|
|
1341
1519
|
</div>
|
|
1342
1520
|
</div>
|
|
@@ -1347,39 +1525,71 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
1347
1525
|
<ng-container *ngTemplateOutlet="groupTpl; context: { group: item, path: path.concat($index) }" />
|
|
1348
1526
|
} @else {
|
|
1349
1527
|
<div class="fb-condition-row">
|
|
1350
|
-
<select
|
|
1528
|
+
<select
|
|
1529
|
+
class="fb-select fb-field-select"
|
|
1530
|
+
[attr.aria-label]="i18n.grid.filterField"
|
|
1531
|
+
[value]="asCondition(item).field"
|
|
1532
|
+
(change)="updateConditionField(path.concat($index), $any($event.target).value)"
|
|
1533
|
+
>
|
|
1351
1534
|
@for (col of filterableColumnsList(); track col.field) {
|
|
1352
|
-
<option [value]="col.field" [selected]="col.field === asCondition(item).field">
|
|
1535
|
+
<option [value]="col.field" [selected]="col.field === asCondition(item).field">
|
|
1536
|
+
{{ col.title }}
|
|
1537
|
+
</option>
|
|
1353
1538
|
}
|
|
1354
1539
|
</select>
|
|
1355
1540
|
|
|
1356
|
-
<select
|
|
1541
|
+
<select
|
|
1542
|
+
class="fb-select fb-operator-select"
|
|
1543
|
+
[attr.aria-label]="i18n.grid.filterOperator"
|
|
1544
|
+
[value]="asCondition(item).type"
|
|
1545
|
+
(change)="updateConditionType(path.concat($index), $any($event.target).value)"
|
|
1546
|
+
>
|
|
1357
1547
|
@for (op of getOperatorsForField(asCondition(item).field); track op.value) {
|
|
1358
1548
|
<option [value]="op.value" [selected]="op.value === asCondition(item).type">{{ op.label }}</option>
|
|
1359
1549
|
}
|
|
1360
1550
|
</select>
|
|
1361
1551
|
|
|
1362
1552
|
@if (!isUnaryOperator(asCondition(item).type)) {
|
|
1363
|
-
<input
|
|
1553
|
+
<input
|
|
1554
|
+
class="fb-input"
|
|
1555
|
+
[value]="asCondition(item).value ?? ''"
|
|
1556
|
+
(input)="updateConditionValue(path.concat($index), $any($event.target).value)"
|
|
1557
|
+
[placeholder]="i18n.grid.filterValuePlaceholder"
|
|
1558
|
+
/>
|
|
1364
1559
|
@if (asCondition(item).type === 'between') {
|
|
1365
|
-
<span class="fb-between-label">
|
|
1366
|
-
<input
|
|
1560
|
+
<span class="fb-between-label">{{ i18n.grid.filterRangeAnd }}</span>
|
|
1561
|
+
<input
|
|
1562
|
+
class="fb-input"
|
|
1563
|
+
[value]="asCondition(item).valueTo ?? ''"
|
|
1564
|
+
(input)="updateConditionValueTo(path.concat($index), $any($event.target).value)"
|
|
1565
|
+
[placeholder]="i18n.grid.filterRangeEndPlaceholder"
|
|
1566
|
+
/>
|
|
1367
1567
|
}
|
|
1368
1568
|
}
|
|
1369
1569
|
|
|
1370
|
-
<button
|
|
1570
|
+
<button
|
|
1571
|
+
type="button"
|
|
1572
|
+
class="fb-remove-condition"
|
|
1573
|
+
[attr.aria-label]="i18n.grid.removeFilterCondition"
|
|
1574
|
+
(click)="removeItem(path.concat($index))"
|
|
1575
|
+
>
|
|
1576
|
+
✕
|
|
1577
|
+
</button>
|
|
1371
1578
|
</div>
|
|
1372
1579
|
}
|
|
1373
1580
|
}
|
|
1374
1581
|
|
|
1375
1582
|
@if (group.conditions.length === 0) {
|
|
1376
|
-
<div class="fb-empty">
|
|
1583
|
+
<div class="fb-empty">{{ i18n.grid.noFilterConditions }}</div>
|
|
1377
1584
|
}
|
|
1378
1585
|
</div>
|
|
1379
1586
|
</div>
|
|
1380
1587
|
</ng-template>
|
|
1381
1588
|
`, styles: [":host{display:block}.filter-builder-overlay{position:fixed;inset:0;background:#0f172a66;backdrop-filter:blur(4px);z-index:10000;display:flex;align-items:center;justify-content:center;animation:fbFadeIn .2s ease}@keyframes fbFadeIn{0%{opacity:0}to{opacity:1}}.filter-builder-panel{background:var(--ngx-grid-bg, #ffffff);border-radius:16px;box-shadow:0 25px 50px -12px #00000040;width:720px;max-width:95vw;max-height:80vh;display:flex;flex-direction:column;overflow:hidden;animation:fbSlideIn .25s ease;font-family:var(--ngx-font-family, inherit)}@keyframes fbSlideIn{0%{transform:scale(.95) translateY(10px);opacity:0}to{transform:scale(1) translateY(0);opacity:1}}.fb-header{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;border-bottom:1px solid var(--ngx-grid-border, #e2e8f0);background:var(--ngx-grid-header-bg, #f8fafc)}.fb-title{display:flex;align-items:center;gap:8px;font-weight:700;font-size:15px;color:var(--ngx-grid-text, #0f172a)}.fb-icon{font-size:16px}.fb-close{background:transparent;border:none;font-size:16px;cursor:pointer;color:var(--ngx-grid-text-secondary, #64748b);padding:4px 8px;border-radius:6px;transition:all .15s}.fb-close:hover{background:#f1f5f9;color:#ef4444}.fb-body{padding:20px;overflow-y:auto;flex:1}.fb-group{border:1.5px solid var(--ngx-grid-border, #e2e8f0);border-radius:12px;padding:12px;background:#f8fafc80}.fb-group .fb-group{margin-top:8px;border-color:#c7d2fe;background:#eef2ff4d}.fb-group-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.fb-operator-toggle{display:flex;gap:0;border:1px solid var(--ngx-grid-border, #cbd5e1);border-radius:8px;overflow:hidden}.op-btn{padding:4px 12px;font-size:11px;font-weight:700;border:none;background:var(--ngx-grid-bg, #ffffff);cursor:pointer;color:var(--ngx-grid-text-secondary, #64748b);transition:all .15s}.op-btn.active{background:var(--ngx-btn-primary-bg, #4f46e5);color:#fff}.fb-group-actions{display:flex;gap:6px;align-items:center}.fb-add-btn{padding:4px 10px;font-size:11px;font-weight:600;border:1px solid var(--ngx-grid-border, #cbd5e1);background:var(--ngx-grid-bg, #ffffff);border-radius:6px;cursor:pointer;color:var(--ngx-grid-text, #334155);transition:all .15s}.fb-add-btn:hover{border-color:var(--ngx-input-focus, #4f46e5);color:var(--ngx-input-focus, #4f46e5)}.fb-add-group{border-style:dashed}.fb-remove-group,.fb-remove-condition{background:transparent;border:none;font-size:12px;cursor:pointer;color:#94a3b8;padding:2px 6px;border-radius:4px;transition:all .15s}.fb-remove-group:hover,.fb-remove-condition:hover{color:#ef4444;background:#fef2f2}.fb-conditions{display:flex;flex-direction:column;gap:6px}.fb-condition-row{display:flex;align-items:center;gap:6px;padding:6px 8px;background:var(--ngx-grid-bg, #ffffff);border:1px solid var(--ngx-grid-border, #e2e8f0);border-radius:8px;transition:all .15s}.fb-condition-row:hover{border-color:var(--ngx-input-focus, #4f46e5);box-shadow:0 0 0 2px #4f46e50f}.fb-select,.fb-input{padding:5px 8px;font-size:12px;border:1px solid var(--ngx-grid-border, #cbd5e1);border-radius:6px;background:var(--ngx-grid-bg, #ffffff);color:var(--ngx-grid-text, #0f172a);font-family:inherit;outline:none;transition:all .15s}.fb-select:focus,.fb-input:focus{border-color:var(--ngx-input-focus, #4f46e5);box-shadow:0 0 0 2px #4f46e51f}.fb-field-select{min-width:140px;flex:1}.fb-operator-select{min-width:120px}.fb-input{flex:1;min-width:80px}.fb-between-label{font-size:11px;font-weight:600;color:var(--ngx-grid-text-secondary, #94a3b8);flex-shrink:0}.fb-empty{padding:16px;text-align:center;color:var(--ngx-grid-text-secondary, #94a3b8);font-size:12px;font-style:italic}.fb-footer{display:flex;justify-content:space-between;align-items:center;padding:12px 20px;border-top:1px solid var(--ngx-grid-border, #e2e8f0);background:var(--ngx-grid-header-bg, #f8fafc)}.fb-footer-actions{display:flex;gap:8px}.fb-btn{padding:7px 16px;font-size:12px;font-weight:600;border-radius:8px;cursor:pointer;border:1px solid var(--ngx-grid-border, #cbd5e1);background:var(--ngx-grid-bg, #ffffff);color:var(--ngx-grid-text, #334155);font-family:inherit;transition:all .2s}.fb-btn:hover{border-color:var(--ngx-input-border-hover, #94a3b8)}.fb-btn-clear{border-color:transparent;background:transparent;color:#ef4444}.fb-btn-clear:hover{background:#fef2f2}.fb-btn-apply{background:var(--ngx-btn-primary-bg, #4f46e5);color:#fff;border-color:var(--ngx-btn-primary-bg, #4f46e5)}.fb-btn-apply:hover{background:var(--ngx-btn-primary-hover, #4338ca);box-shadow:0 4px 6px -1px #4f46e540}\n"] }]
|
|
1382
|
-
}], ctorParameters: () => []
|
|
1589
|
+
}], ctorParameters: () => [], propDecorators: { onDialogKeydown: [{
|
|
1590
|
+
type: HostListener,
|
|
1591
|
+
args: ['keydown', ['$event']]
|
|
1592
|
+
}] } });
|
|
1383
1593
|
|
|
1384
1594
|
class NgxGridCellTemplateDirective {
|
|
1385
1595
|
columnField;
|
|
@@ -1391,7 +1601,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
1391
1601
|
type: Directive,
|
|
1392
1602
|
args: [{
|
|
1393
1603
|
selector: '[ngxGridCellTemplate]',
|
|
1394
|
-
standalone: true
|
|
1604
|
+
standalone: true,
|
|
1395
1605
|
}]
|
|
1396
1606
|
}], propDecorators: { columnField: [{
|
|
1397
1607
|
type: Input,
|
|
@@ -1407,7 +1617,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
1407
1617
|
type: Directive,
|
|
1408
1618
|
args: [{
|
|
1409
1619
|
selector: '[ngxGridEditCellTemplate]',
|
|
1410
|
-
standalone: true
|
|
1620
|
+
standalone: true,
|
|
1411
1621
|
}]
|
|
1412
1622
|
}], propDecorators: { columnField: [{
|
|
1413
1623
|
type: Input,
|
|
@@ -1423,7 +1633,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
1423
1633
|
type: Directive,
|
|
1424
1634
|
args: [{
|
|
1425
1635
|
selector: '[ngxGridHeaderTemplate]',
|
|
1426
|
-
standalone: true
|
|
1636
|
+
standalone: true,
|
|
1427
1637
|
}]
|
|
1428
1638
|
}], propDecorators: { columnField: [{
|
|
1429
1639
|
type: Input,
|
|
@@ -1439,13 +1649,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
1439
1649
|
type: Directive,
|
|
1440
1650
|
args: [{
|
|
1441
1651
|
selector: '[ngxGridFooterTemplate]',
|
|
1442
|
-
standalone: true
|
|
1652
|
+
standalone: true,
|
|
1443
1653
|
}]
|
|
1444
1654
|
}], propDecorators: { columnField: [{
|
|
1445
1655
|
type: Input,
|
|
1446
1656
|
args: ['ngxGridFooterTemplate']
|
|
1447
1657
|
}] } });
|
|
1448
1658
|
class DataGridComponent {
|
|
1659
|
+
static nextInstanceId = 0;
|
|
1660
|
+
instanceId = `ngx-data-grid-${DataGridComponent.nextInstanceId++}`;
|
|
1449
1661
|
cellTemplates;
|
|
1450
1662
|
editCellTemplates;
|
|
1451
1663
|
headerTemplates;
|
|
@@ -1480,6 +1692,7 @@ class DataGridComponent {
|
|
|
1480
1692
|
xlsxExportService = inject(GridExportXlsxService);
|
|
1481
1693
|
// Filter builder state
|
|
1482
1694
|
isFilterBuilderOpen = signal(false);
|
|
1695
|
+
filterBuilderTrigger = null;
|
|
1483
1696
|
internalFilterExpression = signal(null);
|
|
1484
1697
|
/** Live selection aggregates for status bar */
|
|
1485
1698
|
selectionAggregates = computed(() => {
|
|
@@ -1488,7 +1701,8 @@ class DataGridComponent {
|
|
|
1488
1701
|
const selRows = this.selectedRows();
|
|
1489
1702
|
return { count: selRows.size, sum: null, average: null, min: null, max: null };
|
|
1490
1703
|
}
|
|
1491
|
-
const numbers = selectedText
|
|
1704
|
+
const numbers = selectedText
|
|
1705
|
+
.split(/[\t\n]/)
|
|
1492
1706
|
.map(str => str.trim())
|
|
1493
1707
|
.filter(str => str !== '' && !isNaN(Number(str)))
|
|
1494
1708
|
.map(str => Number(str));
|
|
@@ -1506,7 +1720,9 @@ class DataGridComponent {
|
|
|
1506
1720
|
this.filterExpressionChange.emit(expr);
|
|
1507
1721
|
}
|
|
1508
1722
|
exportToXlsx(filename = 'grid-data.xlsx') {
|
|
1509
|
-
this.xlsxExportService.exportToXlsx(this.clientFilteredData(), this.columns(), filename, {
|
|
1723
|
+
this.xlsxExportService.exportToXlsx(this.clientFilteredData(), this.columns(), filename, {
|
|
1724
|
+
groupBy: this.internalGroupBy(),
|
|
1725
|
+
});
|
|
1510
1726
|
}
|
|
1511
1727
|
/**
|
|
1512
1728
|
* Number of rows to render per page in paginated mode.
|
|
@@ -1575,6 +1791,7 @@ class DataGridComponent {
|
|
|
1575
1791
|
sortState = signal(null);
|
|
1576
1792
|
currentPage = signal(1);
|
|
1577
1793
|
selectedRows = signal(new Set());
|
|
1794
|
+
selectionAnnouncement = signal('');
|
|
1578
1795
|
expandedRows = signal(new Set());
|
|
1579
1796
|
collapsedGroups = signal(new Set());
|
|
1580
1797
|
editingRowKey = signal(null);
|
|
@@ -1603,6 +1820,7 @@ class DataGridComponent {
|
|
|
1603
1820
|
});
|
|
1604
1821
|
// Enterprise Extensions
|
|
1605
1822
|
i18n = inject(NGX_CORE_I18N);
|
|
1823
|
+
injector = inject(Injector);
|
|
1606
1824
|
elementRef = inject(ElementRef);
|
|
1607
1825
|
destroyRef = inject(DestroyRef);
|
|
1608
1826
|
gridExportService = inject(GridExportService);
|
|
@@ -1613,6 +1831,7 @@ class DataGridComponent {
|
|
|
1613
1831
|
// Column Chooser state
|
|
1614
1832
|
hiddenColumns = signal(new Set());
|
|
1615
1833
|
activeColumnChooserPopover = signal(null);
|
|
1834
|
+
visibleColumnsCount = computed(() => this.columns().length - this.hiddenColumns().size);
|
|
1616
1835
|
// Cell Selection state
|
|
1617
1836
|
selectedCellStart = signal(null);
|
|
1618
1837
|
selectedCellEnd = signal(null);
|
|
@@ -1635,6 +1854,8 @@ class DataGridComponent {
|
|
|
1635
1854
|
isInitialPageSync = true;
|
|
1636
1855
|
// Filter Popover state
|
|
1637
1856
|
activeFilterPopover = signal(null);
|
|
1857
|
+
filterPopoverTrigger = null;
|
|
1858
|
+
contextMenuTrigger = null;
|
|
1638
1859
|
tempFilterValue = signal('');
|
|
1639
1860
|
tempFilterOperator = signal('contains');
|
|
1640
1861
|
tempSelectedValues = signal(new Set());
|
|
@@ -1717,7 +1938,7 @@ class DataGridComponent {
|
|
|
1717
1938
|
filters: Array.from(this.filterStates().values()),
|
|
1718
1939
|
searchText: this.searchText(),
|
|
1719
1940
|
hiddenColumns: Array.from(this.hiddenColumns()),
|
|
1720
|
-
columnPinnedOverrides: this.columnPinnedOverrides()
|
|
1941
|
+
columnPinnedOverrides: this.columnPinnedOverrides(),
|
|
1721
1942
|
};
|
|
1722
1943
|
try {
|
|
1723
1944
|
localStorage.setItem(`ngx_grid_state_${key}`, JSON.stringify(state));
|
|
@@ -1729,9 +1950,9 @@ class DataGridComponent {
|
|
|
1729
1950
|
// Window event listeners for closing popovers and copy behavior
|
|
1730
1951
|
if (typeof window !== 'undefined') {
|
|
1731
1952
|
const clickListener = () => {
|
|
1732
|
-
this.
|
|
1733
|
-
this.
|
|
1734
|
-
this.
|
|
1953
|
+
this.closeFilterPopover(false);
|
|
1954
|
+
this.closeColumnChooser(false);
|
|
1955
|
+
this.closeContextMenu(false);
|
|
1735
1956
|
};
|
|
1736
1957
|
const mouseUpListener = () => {
|
|
1737
1958
|
if (this.isCellDragging()) {
|
|
@@ -1740,9 +1961,14 @@ class DataGridComponent {
|
|
|
1740
1961
|
};
|
|
1741
1962
|
const keydownListener = (e) => {
|
|
1742
1963
|
if (e.key === 'Escape') {
|
|
1743
|
-
this.activeFilterPopover
|
|
1744
|
-
|
|
1745
|
-
this.
|
|
1964
|
+
if (this.activeFilterPopover())
|
|
1965
|
+
this.closeFilterPopover();
|
|
1966
|
+
if (this.activeColumnChooserPopover())
|
|
1967
|
+
this.closeColumnChooser();
|
|
1968
|
+
if (this.isFilterBuilderOpen())
|
|
1969
|
+
this.closeFilterBuilder();
|
|
1970
|
+
if (this.activeContextMenu())
|
|
1971
|
+
this.closeContextMenu();
|
|
1746
1972
|
}
|
|
1747
1973
|
if (!this.cellSelection())
|
|
1748
1974
|
return;
|
|
@@ -1933,9 +2159,9 @@ class DataGridComponent {
|
|
|
1933
2159
|
leftOffset: c.pinned === 'left' ? this.columnOffsets()[c.field] : null,
|
|
1934
2160
|
rightOffset: c.pinned === 'right' ? this.columnRightOffsets()[c.field] : null,
|
|
1935
2161
|
isPinnedLast: c.pinned === 'left' && this.lastPinnedColumnField() === c.field,
|
|
1936
|
-
isPinnedFirst: c.pinned === 'right' && this.firstPinnedRightColumnField() === c.field
|
|
2162
|
+
isPinnedFirst: c.pinned === 'right' && this.firstPinnedRightColumnField() === c.field,
|
|
1937
2163
|
})),
|
|
1938
|
-
row2: []
|
|
2164
|
+
row2: [],
|
|
1939
2165
|
};
|
|
1940
2166
|
}
|
|
1941
2167
|
const row1 = [];
|
|
@@ -1955,7 +2181,7 @@ class DataGridComponent {
|
|
|
1955
2181
|
leftOffset: col.pinned === 'left' ? this.columnOffsets()[col.field] : null,
|
|
1956
2182
|
rightOffset: col.pinned === 'right' ? this.columnRightOffsets()[col.field] : null,
|
|
1957
2183
|
isPinnedLast: col.pinned === 'left' && this.lastPinnedColumnField() === col.field,
|
|
1958
|
-
isPinnedFirst: col.pinned === 'right' && this.firstPinnedRightColumnField() === col.field
|
|
2184
|
+
isPinnedFirst: col.pinned === 'right' && this.firstPinnedRightColumnField() === col.field,
|
|
1959
2185
|
});
|
|
1960
2186
|
i++;
|
|
1961
2187
|
}
|
|
@@ -1975,7 +2201,7 @@ class DataGridComponent {
|
|
|
1975
2201
|
leftOffset: currentCol.pinned === 'left' ? this.columnOffsets()[currentCol.field] : null,
|
|
1976
2202
|
rightOffset: currentCol.pinned === 'right' ? this.columnRightOffsets()[currentCol.field] : null,
|
|
1977
2203
|
isPinnedLast: currentCol.pinned === 'left' && this.lastPinnedColumnField() === currentCol.field,
|
|
1978
|
-
isPinnedFirst: currentCol.pinned === 'right' && this.firstPinnedRightColumnField() === currentCol.field
|
|
2204
|
+
isPinnedFirst: currentCol.pinned === 'right' && this.firstPinnedRightColumnField() === currentCol.field,
|
|
1979
2205
|
});
|
|
1980
2206
|
i++;
|
|
1981
2207
|
}
|
|
@@ -1991,7 +2217,7 @@ class DataGridComponent {
|
|
|
1991
2217
|
rightOffset: col.pinned === 'right' ? this.columnRightOffsets()[lastColInGroup.field] : null,
|
|
1992
2218
|
isPinnedLast: col.pinned === 'left' && this.lastPinnedColumnField() === lastColInGroup.field,
|
|
1993
2219
|
isPinnedFirst: col.pinned === 'right' && this.firstPinnedRightColumnField() === col.field,
|
|
1994
|
-
field: `__cat_${cat}_${startIdx}
|
|
2220
|
+
field: `__cat_${cat}_${startIdx}`,
|
|
1995
2221
|
});
|
|
1996
2222
|
}
|
|
1997
2223
|
}
|
|
@@ -2109,9 +2335,7 @@ class DataGridComponent {
|
|
|
2109
2335
|
if (!group) {
|
|
2110
2336
|
return [];
|
|
2111
2337
|
}
|
|
2112
|
-
const source = this.pagingMode() === 'server'
|
|
2113
|
-
? this.data()
|
|
2114
|
-
: this.paginateRows(this.baseFlatData());
|
|
2338
|
+
const source = this.pagingMode() === 'server' ? this.data() : this.paginateRows(this.baseFlatData());
|
|
2115
2339
|
const map = new Map();
|
|
2116
2340
|
for (const row of source) {
|
|
2117
2341
|
const value = row[group.field];
|
|
@@ -2199,8 +2423,12 @@ class DataGridComponent {
|
|
|
2199
2423
|
const startColIndex = cols.findIndex(c => c.field === start.colField);
|
|
2200
2424
|
const endColIndex = cols.findIndex(c => c.field === end.colField);
|
|
2201
2425
|
const colIndex = cols.findIndex(c => c.field === colField);
|
|
2202
|
-
if (startRowIndex === -1 ||
|
|
2203
|
-
|
|
2426
|
+
if (startRowIndex === -1 ||
|
|
2427
|
+
endRowIndex === -1 ||
|
|
2428
|
+
rowIndex === -1 ||
|
|
2429
|
+
startColIndex === -1 ||
|
|
2430
|
+
endColIndex === -1 ||
|
|
2431
|
+
colIndex === -1) {
|
|
2204
2432
|
return false;
|
|
2205
2433
|
}
|
|
2206
2434
|
const minRow = Math.min(startRowIndex, endRowIndex);
|
|
@@ -2218,14 +2446,51 @@ class DataGridComponent {
|
|
|
2218
2446
|
const gridRect = gridEl.getBoundingClientRect();
|
|
2219
2447
|
const x = event.clientX - gridRect.left;
|
|
2220
2448
|
const y = event.clientY - gridRect.top;
|
|
2221
|
-
this.
|
|
2222
|
-
this.
|
|
2449
|
+
this.closeFilterPopover(false);
|
|
2450
|
+
this.closeColumnChooser(false);
|
|
2451
|
+
this.focusedCell.set({ row, colField });
|
|
2452
|
+
this.contextMenuTrigger = event.currentTarget;
|
|
2223
2453
|
this.activeContextMenu.set({
|
|
2224
2454
|
x: Math.min(x, gridRect.width - 190),
|
|
2225
|
-
y
|
|
2455
|
+
y,
|
|
2226
2456
|
row,
|
|
2227
|
-
colField
|
|
2457
|
+
colField,
|
|
2228
2458
|
});
|
|
2459
|
+
afterNextRender(() => this.elementRef.nativeElement
|
|
2460
|
+
.querySelector('.grid-context-menu .menu-item:not(:disabled)')
|
|
2461
|
+
?.focus(), { injector: this.injector });
|
|
2462
|
+
}
|
|
2463
|
+
closeContextMenu(restoreFocus = true) {
|
|
2464
|
+
this.activeContextMenu.set(null);
|
|
2465
|
+
const trigger = this.contextMenuTrigger;
|
|
2466
|
+
this.contextMenuTrigger = null;
|
|
2467
|
+
if (restoreFocus)
|
|
2468
|
+
trigger?.focus();
|
|
2469
|
+
}
|
|
2470
|
+
onContextMenuKeydown(event) {
|
|
2471
|
+
if (event.key === 'Escape') {
|
|
2472
|
+
event.preventDefault();
|
|
2473
|
+
this.closeContextMenu();
|
|
2474
|
+
return;
|
|
2475
|
+
}
|
|
2476
|
+
if (!['ArrowDown', 'ArrowUp', 'Home', 'End'].includes(event.key))
|
|
2477
|
+
return;
|
|
2478
|
+
const menu = event.currentTarget;
|
|
2479
|
+
const items = Array.from(menu.querySelectorAll('.menu-item:not(:disabled)'));
|
|
2480
|
+
if (items.length === 0)
|
|
2481
|
+
return;
|
|
2482
|
+
const currentIndex = items.indexOf(menu.ownerDocument.activeElement);
|
|
2483
|
+
const nextIndex = event.key === 'Home'
|
|
2484
|
+
? 0
|
|
2485
|
+
: event.key === 'End'
|
|
2486
|
+
? items.length - 1
|
|
2487
|
+
: event.key === 'ArrowDown'
|
|
2488
|
+
? (currentIndex + 1) % items.length
|
|
2489
|
+
: currentIndex <= 0
|
|
2490
|
+
? items.length - 1
|
|
2491
|
+
: currentIndex - 1;
|
|
2492
|
+
event.preventDefault();
|
|
2493
|
+
items[nextIndex].focus();
|
|
2229
2494
|
}
|
|
2230
2495
|
isColumnPinned(field) {
|
|
2231
2496
|
if (!field)
|
|
@@ -2244,20 +2509,20 @@ class DataGridComponent {
|
|
|
2244
2509
|
const overrides = { ...this.columnPinnedOverrides() };
|
|
2245
2510
|
overrides[field] = currentlyPinned ? null : 'left';
|
|
2246
2511
|
this.columnPinnedOverrides.set(overrides);
|
|
2247
|
-
this.
|
|
2512
|
+
this.closeContextMenu();
|
|
2248
2513
|
}
|
|
2249
2514
|
contextMenuHideColumn(field) {
|
|
2250
2515
|
if (field) {
|
|
2251
2516
|
this.toggleColumnVisibility(field);
|
|
2252
2517
|
}
|
|
2253
|
-
this.
|
|
2518
|
+
this.closeContextMenu();
|
|
2254
2519
|
}
|
|
2255
2520
|
contextMenuClearFilters() {
|
|
2256
2521
|
this.filterStates.set(new Map());
|
|
2257
2522
|
this.currentPage.set(1);
|
|
2258
2523
|
this.filterChange.emit({ filters: [] });
|
|
2259
2524
|
this.emitDataState();
|
|
2260
|
-
this.
|
|
2525
|
+
this.closeContextMenu();
|
|
2261
2526
|
}
|
|
2262
2527
|
contextMenuCopy() {
|
|
2263
2528
|
const text = this.getSelectedCellsText();
|
|
@@ -2266,7 +2531,7 @@ class DataGridComponent {
|
|
|
2266
2531
|
console.error('Failed to copy to clipboard', err);
|
|
2267
2532
|
});
|
|
2268
2533
|
}
|
|
2269
|
-
this.
|
|
2534
|
+
this.closeContextMenu();
|
|
2270
2535
|
}
|
|
2271
2536
|
onCellMouseDown(event, row, colField) {
|
|
2272
2537
|
if (!this.cellSelection())
|
|
@@ -2274,7 +2539,11 @@ class DataGridComponent {
|
|
|
2274
2539
|
if (event.button !== 0)
|
|
2275
2540
|
return;
|
|
2276
2541
|
const target = event.target;
|
|
2277
|
-
if (target &&
|
|
2542
|
+
if (target &&
|
|
2543
|
+
(target.closest('.grid-edit-input') ||
|
|
2544
|
+
target.closest('.action-btn') ||
|
|
2545
|
+
target.closest('.toggle-btn') ||
|
|
2546
|
+
target.closest('input[type="checkbox"]'))) {
|
|
2278
2547
|
return;
|
|
2279
2548
|
}
|
|
2280
2549
|
event.preventDefault();
|
|
@@ -2283,7 +2552,7 @@ class DataGridComponent {
|
|
|
2283
2552
|
this.isCellDragging.set(true);
|
|
2284
2553
|
this.cellSelectionChange.emit({
|
|
2285
2554
|
start: { row, colField },
|
|
2286
|
-
end: { row, colField }
|
|
2555
|
+
end: { row, colField },
|
|
2287
2556
|
});
|
|
2288
2557
|
}
|
|
2289
2558
|
onCellMouseEnter(row, colField) {
|
|
@@ -2294,17 +2563,17 @@ class DataGridComponent {
|
|
|
2294
2563
|
if (start) {
|
|
2295
2564
|
this.cellSelectionChange.emit({
|
|
2296
2565
|
start,
|
|
2297
|
-
end: { row, colField }
|
|
2566
|
+
end: { row, colField },
|
|
2298
2567
|
});
|
|
2299
2568
|
}
|
|
2300
2569
|
}
|
|
2301
2570
|
openColumnChooser(event) {
|
|
2302
2571
|
event.stopPropagation();
|
|
2303
2572
|
if (this.activeColumnChooserPopover()) {
|
|
2304
|
-
this.
|
|
2573
|
+
this.closeColumnChooser();
|
|
2305
2574
|
return;
|
|
2306
2575
|
}
|
|
2307
|
-
this.
|
|
2576
|
+
this.closeFilterPopover(false);
|
|
2308
2577
|
const buttonEl = event.currentTarget;
|
|
2309
2578
|
const gridEl = this.elementRef.nativeElement.querySelector('.ngx-data-grid');
|
|
2310
2579
|
const buttonRect = buttonEl.getBoundingClientRect();
|
|
@@ -2313,8 +2582,49 @@ class DataGridComponent {
|
|
|
2313
2582
|
const left = buttonRect.left - gridRect.left;
|
|
2314
2583
|
this.activeColumnChooserPopover.set({
|
|
2315
2584
|
top,
|
|
2316
|
-
left: Math.min(left, gridRect.width -
|
|
2585
|
+
left: Math.max(8, Math.min(left, gridRect.width - 368)),
|
|
2317
2586
|
});
|
|
2587
|
+
afterNextRender(() => this.elementRef.nativeElement.querySelector(`#${this.instanceId}-column-chooser input[type="checkbox"]`)?.focus(), { injector: this.injector });
|
|
2588
|
+
}
|
|
2589
|
+
closeColumnChooser(restoreFocus = true) {
|
|
2590
|
+
this.activeColumnChooserPopover.set(null);
|
|
2591
|
+
if (restoreFocus) {
|
|
2592
|
+
const trigger = this.elementRef.nativeElement.querySelector(`[aria-controls="${this.instanceId}-column-chooser"]`);
|
|
2593
|
+
trigger?.focus();
|
|
2594
|
+
}
|
|
2595
|
+
}
|
|
2596
|
+
openFilterBuilder(event) {
|
|
2597
|
+
this.filterBuilderTrigger = event.currentTarget;
|
|
2598
|
+
this.isFilterBuilderOpen.set(true);
|
|
2599
|
+
afterNextRender(() => this.elementRef.nativeElement.querySelector('.filter-builder-panel')?.focus(), { injector: this.injector });
|
|
2600
|
+
}
|
|
2601
|
+
closeFilterBuilder() {
|
|
2602
|
+
this.isFilterBuilderOpen.set(false);
|
|
2603
|
+
const trigger = this.filterBuilderTrigger;
|
|
2604
|
+
this.filterBuilderTrigger = null;
|
|
2605
|
+
trigger?.focus();
|
|
2606
|
+
}
|
|
2607
|
+
columnIndex(field) {
|
|
2608
|
+
return this.fullColumnOrder().indexOf(field);
|
|
2609
|
+
}
|
|
2610
|
+
moveColumn(field, direction) {
|
|
2611
|
+
const order = this.fullColumnOrder();
|
|
2612
|
+
const index = order.indexOf(field);
|
|
2613
|
+
const nextIndex = index + direction;
|
|
2614
|
+
if (index < 0 || nextIndex < 0 || nextIndex >= order.length)
|
|
2615
|
+
return;
|
|
2616
|
+
[order[index], order[nextIndex]] = [order[nextIndex], order[index]];
|
|
2617
|
+
this.columnOrder.set(order);
|
|
2618
|
+
const columnsByField = new Map(this.columns().map(column => [column.field, column]));
|
|
2619
|
+
const reorderedColumns = order
|
|
2620
|
+
.map(columnField => columnsByField.get(columnField))
|
|
2621
|
+
.filter((column) => column !== undefined);
|
|
2622
|
+
this.columnReorder.emit({ columns: reorderedColumns });
|
|
2623
|
+
}
|
|
2624
|
+
fullColumnOrder() {
|
|
2625
|
+
const fields = this.columns().map(column => column.field);
|
|
2626
|
+
const currentOrder = this.columnOrder().filter(field => fields.includes(field));
|
|
2627
|
+
return [...currentOrder, ...fields.filter(field => !currentOrder.includes(field))];
|
|
2318
2628
|
}
|
|
2319
2629
|
toggleColumnVisibility(field) {
|
|
2320
2630
|
const hidden = new Set(this.hiddenColumns());
|
|
@@ -2405,7 +2715,7 @@ class DataGridComponent {
|
|
|
2405
2715
|
const newWidth = Math.max(50, this.resizeStartWidth + deltaX);
|
|
2406
2716
|
this.columnWidths.update(widths => ({
|
|
2407
2717
|
...widths,
|
|
2408
|
-
[this.resizingField]: newWidth
|
|
2718
|
+
[this.resizingField]: newWidth,
|
|
2409
2719
|
}));
|
|
2410
2720
|
};
|
|
2411
2721
|
const onMouseUp = () => {
|
|
@@ -2439,7 +2749,7 @@ class DataGridComponent {
|
|
|
2439
2749
|
const computedWidth = Math.max(60, Math.min(600, longestText.length * 8 + padding));
|
|
2440
2750
|
this.columnWidths.update(widths => ({
|
|
2441
2751
|
...widths,
|
|
2442
|
-
[colField]: computedWidth
|
|
2752
|
+
[colField]: computedWidth,
|
|
2443
2753
|
}));
|
|
2444
2754
|
}
|
|
2445
2755
|
getColumnPinnedState(field) {
|
|
@@ -2461,7 +2771,7 @@ class DataGridComponent {
|
|
|
2461
2771
|
openFilterPopover(event, field) {
|
|
2462
2772
|
event.stopPropagation();
|
|
2463
2773
|
if (this.activeFilterPopover()?.field === field) {
|
|
2464
|
-
this.
|
|
2774
|
+
this.closeFilterPopover(false);
|
|
2465
2775
|
return;
|
|
2466
2776
|
}
|
|
2467
2777
|
this.filterSearchQuery.set('');
|
|
@@ -2476,6 +2786,7 @@ class DataGridComponent {
|
|
|
2476
2786
|
this.tempSelectedValues.set(new Set(distinct));
|
|
2477
2787
|
}
|
|
2478
2788
|
const buttonEl = event.currentTarget;
|
|
2789
|
+
this.filterPopoverTrigger = buttonEl;
|
|
2479
2790
|
const gridEl = this.elementRef.nativeElement.querySelector('.ngx-data-grid');
|
|
2480
2791
|
const buttonRect = buttonEl.getBoundingClientRect();
|
|
2481
2792
|
const gridRect = gridEl.getBoundingClientRect();
|
|
@@ -2484,8 +2795,18 @@ class DataGridComponent {
|
|
|
2484
2795
|
this.activeFilterPopover.set({
|
|
2485
2796
|
field,
|
|
2486
2797
|
top,
|
|
2487
|
-
left: Math.min(left, gridRect.width - 260)
|
|
2798
|
+
left: Math.min(left, gridRect.width - 260),
|
|
2488
2799
|
});
|
|
2800
|
+
afterNextRender(() => this.elementRef.nativeElement
|
|
2801
|
+
.querySelector('.grid-filter-popover select')
|
|
2802
|
+
?.focus(), { injector: this.injector });
|
|
2803
|
+
}
|
|
2804
|
+
closeFilterPopover(restoreFocus = true) {
|
|
2805
|
+
this.activeFilterPopover.set(null);
|
|
2806
|
+
const trigger = this.filterPopoverTrigger;
|
|
2807
|
+
this.filterPopoverTrigger = null;
|
|
2808
|
+
if (restoreFocus)
|
|
2809
|
+
trigger?.focus();
|
|
2489
2810
|
}
|
|
2490
2811
|
getDistinctValues(field) {
|
|
2491
2812
|
const vals = new Set();
|
|
@@ -2536,30 +2857,19 @@ class DataGridComponent {
|
|
|
2536
2857
|
const selected = this.tempSelectedValues();
|
|
2537
2858
|
let filterState = null;
|
|
2538
2859
|
if (this.tempFilterValue()) {
|
|
2539
|
-
filterState = {
|
|
2540
|
-
field,
|
|
2541
|
-
value: this.tempFilterValue(),
|
|
2542
|
-
operator: this.tempFilterOperator()
|
|
2543
|
-
};
|
|
2860
|
+
filterState = { field, value: this.tempFilterValue(), operator: this.tempFilterOperator() };
|
|
2544
2861
|
}
|
|
2545
2862
|
else if (selected.size < distinct.length) {
|
|
2546
|
-
filterState = {
|
|
2547
|
-
field,
|
|
2548
|
-
value: '',
|
|
2549
|
-
operator: 'in',
|
|
2550
|
-
selectedValues: Array.from(selected)
|
|
2551
|
-
};
|
|
2863
|
+
filterState = { field, value: '', operator: 'in', selectedValues: Array.from(selected) };
|
|
2552
2864
|
}
|
|
2553
2865
|
const nextStates = new Map(this.filterStates());
|
|
2554
|
-
if (filterState)
|
|
2866
|
+
if (filterState)
|
|
2555
2867
|
nextStates.set(field, filterState);
|
|
2556
|
-
|
|
2557
|
-
else {
|
|
2868
|
+
else
|
|
2558
2869
|
nextStates.delete(field);
|
|
2559
|
-
}
|
|
2560
2870
|
this.filterStates.set(nextStates);
|
|
2561
2871
|
this.currentPage.set(1);
|
|
2562
|
-
this.
|
|
2872
|
+
this.closeFilterPopover();
|
|
2563
2873
|
this.filterChange.emit({ filters: this.activeFilters() });
|
|
2564
2874
|
this.emitDataState();
|
|
2565
2875
|
}
|
|
@@ -2567,19 +2877,18 @@ class DataGridComponent {
|
|
|
2567
2877
|
const pop = this.activeFilterPopover();
|
|
2568
2878
|
if (!pop)
|
|
2569
2879
|
return;
|
|
2570
|
-
const field = pop.field;
|
|
2571
2880
|
const nextStates = new Map(this.filterStates());
|
|
2572
|
-
nextStates.delete(field);
|
|
2881
|
+
nextStates.delete(pop.field);
|
|
2573
2882
|
this.filterStates.set(nextStates);
|
|
2574
2883
|
this.currentPage.set(1);
|
|
2575
|
-
this.
|
|
2884
|
+
this.closeFilterPopover();
|
|
2576
2885
|
this.filterChange.emit({ filters: this.activeFilters() });
|
|
2577
2886
|
this.emitDataState();
|
|
2578
2887
|
}
|
|
2579
2888
|
clearAllFilters() {
|
|
2580
2889
|
this.filterStates.set(new Map());
|
|
2581
2890
|
this.currentPage.set(1);
|
|
2582
|
-
this.
|
|
2891
|
+
this.closeFilterPopover(false);
|
|
2583
2892
|
this.filterChange.emit({ filters: [] });
|
|
2584
2893
|
this.emitDataState();
|
|
2585
2894
|
}
|
|
@@ -2588,10 +2897,12 @@ class DataGridComponent {
|
|
|
2588
2897
|
const rows = this.clientFilteredData();
|
|
2589
2898
|
if (rows.length === 0)
|
|
2590
2899
|
return '-';
|
|
2591
|
-
const values = rows
|
|
2900
|
+
const values = rows
|
|
2901
|
+
.map(r => {
|
|
2592
2902
|
const val = r[col.field];
|
|
2593
2903
|
return typeof val === 'number' ? val : Number(val);
|
|
2594
|
-
})
|
|
2904
|
+
})
|
|
2905
|
+
.filter(v => !isNaN(v));
|
|
2595
2906
|
if (col.aggregation === 'count') {
|
|
2596
2907
|
return String(rows.length);
|
|
2597
2908
|
}
|
|
@@ -2715,9 +3026,7 @@ class DataGridComponent {
|
|
|
2715
3026
|
const sourceField = this.draggingField();
|
|
2716
3027
|
const targetField = targetCol.field;
|
|
2717
3028
|
if (sourceField && sourceField !== targetField) {
|
|
2718
|
-
const currentOrder = this.columnOrder().length > 0
|
|
2719
|
-
? [...this.columnOrder()]
|
|
2720
|
-
: this.columns().map(c => c.field);
|
|
3029
|
+
const currentOrder = this.columnOrder().length > 0 ? [...this.columnOrder()] : this.columns().map(c => c.field);
|
|
2721
3030
|
const sourceIndex = currentOrder.indexOf(sourceField);
|
|
2722
3031
|
const targetIndex = currentOrder.indexOf(targetField);
|
|
2723
3032
|
if (sourceIndex !== -1 && targetIndex !== -1) {
|
|
@@ -2766,7 +3075,7 @@ class DataGridComponent {
|
|
|
2766
3075
|
this.rowReorder.emit({
|
|
2767
3076
|
previousIndex: actualSourceIdx,
|
|
2768
3077
|
currentIndex: actualTargetIdx,
|
|
2769
|
-
data: currentData
|
|
3078
|
+
data: currentData,
|
|
2770
3079
|
});
|
|
2771
3080
|
}
|
|
2772
3081
|
}
|
|
@@ -2862,35 +3171,35 @@ class DataGridComponent {
|
|
|
2862
3171
|
this.internalGroupBy.set(groupState);
|
|
2863
3172
|
this.groupChange.emit({ group: groupState });
|
|
2864
3173
|
this.emitDataState(groupState);
|
|
2865
|
-
this.
|
|
3174
|
+
this.closeContextMenu();
|
|
2866
3175
|
}
|
|
2867
3176
|
contextMenuClearGrouping() {
|
|
2868
3177
|
this.internalGroupBy.set(null);
|
|
2869
3178
|
this.groupChange.emit({ group: null });
|
|
2870
3179
|
this.emitDataState(null);
|
|
2871
|
-
this.
|
|
3180
|
+
this.closeContextMenu();
|
|
2872
3181
|
}
|
|
2873
3182
|
collapseAllGroups() {
|
|
2874
3183
|
const keys = this.groupedRows().map(g => g.key);
|
|
2875
3184
|
this.collapsedGroups.set(new Set(keys));
|
|
2876
|
-
this.
|
|
3185
|
+
this.closeContextMenu();
|
|
2877
3186
|
}
|
|
2878
3187
|
expandAllGroups() {
|
|
2879
3188
|
this.collapsedGroups.set(new Set());
|
|
2880
|
-
this.
|
|
3189
|
+
this.closeContextMenu();
|
|
2881
3190
|
}
|
|
2882
3191
|
contextMenuToggleDetail(row) {
|
|
2883
3192
|
this.toggleDetail(row);
|
|
2884
|
-
this.
|
|
3193
|
+
this.closeContextMenu();
|
|
2885
3194
|
}
|
|
2886
3195
|
expandAllDetails() {
|
|
2887
3196
|
const keys = this.flatRenderedRows().map(r => this.keyOf(r));
|
|
2888
3197
|
this.expandedRows.set(new Set(keys));
|
|
2889
|
-
this.
|
|
3198
|
+
this.closeContextMenu();
|
|
2890
3199
|
}
|
|
2891
3200
|
collapseAllDetails() {
|
|
2892
3201
|
this.expandedRows.set(new Set());
|
|
2893
|
-
this.
|
|
3202
|
+
this.closeContextMenu();
|
|
2894
3203
|
}
|
|
2895
3204
|
onRowClick(row, index) {
|
|
2896
3205
|
this.rowClick.emit({ row, index });
|
|
@@ -2908,6 +3217,7 @@ class DataGridComponent {
|
|
|
2908
3217
|
next.add(key);
|
|
2909
3218
|
}
|
|
2910
3219
|
this.selectedRows.set(next);
|
|
3220
|
+
this.selectionAnnouncement.set(this.i18n.grid.selectedRows(next.size));
|
|
2911
3221
|
this.selectionChange.emit(this.resolveSelectedRows(next));
|
|
2912
3222
|
}
|
|
2913
3223
|
toggleAll() {
|
|
@@ -2924,8 +3234,12 @@ class DataGridComponent {
|
|
|
2924
3234
|
}
|
|
2925
3235
|
}
|
|
2926
3236
|
this.selectedRows.set(next);
|
|
3237
|
+
this.selectionAnnouncement.set(this.i18n.grid.selectedRows(next.size));
|
|
2927
3238
|
this.selectionChange.emit(this.resolveSelectedRows(next));
|
|
2928
3239
|
}
|
|
3240
|
+
rowSelectionKey(row) {
|
|
3241
|
+
return this.keyOf(row);
|
|
3242
|
+
}
|
|
2929
3243
|
toggleDetail(row) {
|
|
2930
3244
|
const key = this.keyOf(row);
|
|
2931
3245
|
const next = new Set(this.expandedRows());
|
|
@@ -2959,9 +3273,7 @@ class DataGridComponent {
|
|
|
2959
3273
|
return row[field];
|
|
2960
3274
|
}
|
|
2961
3275
|
const draft = this.editingDraft();
|
|
2962
|
-
return Object.prototype.hasOwnProperty.call(draft, field)
|
|
2963
|
-
? draft[field]
|
|
2964
|
-
: row[field];
|
|
3276
|
+
return Object.prototype.hasOwnProperty.call(draft, field) ? draft[field] : row[field];
|
|
2965
3277
|
}
|
|
2966
3278
|
saveEdit(row, index) {
|
|
2967
3279
|
const updated = { ...row, ...this.editingDraft() };
|
|
@@ -3107,23 +3419,31 @@ class DataGridComponent {
|
|
|
3107
3419
|
group: overrideGroup === undefined ? this.internalGroupBy() : overrideGroup,
|
|
3108
3420
|
});
|
|
3109
3421
|
}
|
|
3110
|
-
onCellClick(row, colField) {
|
|
3422
|
+
onCellClick(row, colField, event) {
|
|
3111
3423
|
if (!this.keyboardNavigation())
|
|
3112
3424
|
return;
|
|
3113
|
-
this.
|
|
3425
|
+
this.focusCell(row, colField);
|
|
3114
3426
|
this.focusedCellEditActive.set(this.isEditing(row));
|
|
3427
|
+
event?.currentTarget?.focus();
|
|
3115
3428
|
}
|
|
3116
3429
|
handleKeyDown(event) {
|
|
3117
3430
|
if (!this.keyboardNavigation())
|
|
3118
3431
|
return;
|
|
3432
|
+
const target = event.target instanceof HTMLElement ? event.target : this.elementRef.nativeElement;
|
|
3433
|
+
const grid = this.elementRef.nativeElement;
|
|
3434
|
+
const editInput = target.closest('.grid-edit-input');
|
|
3435
|
+
if (target !== grid && !target.closest('.grid-td') && !editInput)
|
|
3436
|
+
return;
|
|
3437
|
+
if (target.closest('button, input, select, textarea, [contenteditable="true"]') && !editInput)
|
|
3438
|
+
return;
|
|
3119
3439
|
const key = event.key;
|
|
3120
3440
|
const focused = this.focusedCell();
|
|
3121
3441
|
if (!focused) {
|
|
3122
|
-
if (
|
|
3442
|
+
if (target === grid && ['ArrowDown', 'ArrowUp', 'ArrowLeft', 'ArrowRight'].includes(key)) {
|
|
3123
3443
|
const rows = this.flatRenderedRows();
|
|
3124
3444
|
const cols = this.orderedColumns();
|
|
3125
3445
|
if (rows.length > 0 && cols.length > 0) {
|
|
3126
|
-
this.
|
|
3446
|
+
this.focusCell(rows[0], cols[0].field);
|
|
3127
3447
|
event.preventDefault();
|
|
3128
3448
|
}
|
|
3129
3449
|
}
|
|
@@ -3135,18 +3455,20 @@ class DataGridComponent {
|
|
|
3135
3455
|
const colIndex = cols.findIndex(c => c.field === focused.colField);
|
|
3136
3456
|
if (rowIndex === -1 || colIndex === -1)
|
|
3137
3457
|
return;
|
|
3458
|
+
const isRtl = this.elementRef.nativeElement.closest('[dir="rtl"]') !== null;
|
|
3138
3459
|
if (this.focusedCellEditActive()) {
|
|
3139
3460
|
if (key === 'Enter') {
|
|
3140
3461
|
this.saveEdit(focused.row, rowIndex);
|
|
3141
3462
|
this.focusedCellEditActive.set(false);
|
|
3142
3463
|
if (rowIndex < rows.length - 1) {
|
|
3143
|
-
this.
|
|
3464
|
+
this.focusCell(rows[rowIndex + 1], focused.colField);
|
|
3144
3465
|
}
|
|
3145
3466
|
event.preventDefault();
|
|
3146
3467
|
}
|
|
3147
3468
|
else if (key === 'Escape') {
|
|
3148
3469
|
this.cancelEdit();
|
|
3149
3470
|
this.focusedCellEditActive.set(false);
|
|
3471
|
+
this.focusCell(focused.row, focused.colField);
|
|
3150
3472
|
event.preventDefault();
|
|
3151
3473
|
}
|
|
3152
3474
|
return;
|
|
@@ -3154,56 +3476,73 @@ class DataGridComponent {
|
|
|
3154
3476
|
switch (key) {
|
|
3155
3477
|
case 'ArrowUp':
|
|
3156
3478
|
if (rowIndex > 0) {
|
|
3157
|
-
this.
|
|
3479
|
+
this.focusCell(rows[rowIndex - 1], focused.colField);
|
|
3158
3480
|
event.preventDefault();
|
|
3159
3481
|
}
|
|
3160
3482
|
break;
|
|
3161
3483
|
case 'ArrowDown':
|
|
3162
3484
|
if (rowIndex < rows.length - 1) {
|
|
3163
|
-
this.
|
|
3485
|
+
this.focusCell(rows[rowIndex + 1], focused.colField);
|
|
3164
3486
|
event.preventDefault();
|
|
3165
3487
|
}
|
|
3166
3488
|
break;
|
|
3167
|
-
case 'ArrowLeft':
|
|
3168
|
-
|
|
3169
|
-
|
|
3489
|
+
case 'ArrowLeft': {
|
|
3490
|
+
const nextColIndex = isRtl ? colIndex + 1 : colIndex - 1;
|
|
3491
|
+
if (nextColIndex >= 0 && nextColIndex < cols.length) {
|
|
3492
|
+
this.focusCell(focused.row, cols[nextColIndex].field);
|
|
3170
3493
|
event.preventDefault();
|
|
3171
3494
|
}
|
|
3172
3495
|
break;
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3496
|
+
}
|
|
3497
|
+
case 'ArrowRight': {
|
|
3498
|
+
const nextColIndex = isRtl ? colIndex - 1 : colIndex + 1;
|
|
3499
|
+
if (nextColIndex >= 0 && nextColIndex < cols.length) {
|
|
3500
|
+
this.focusCell(focused.row, cols[nextColIndex].field);
|
|
3176
3501
|
event.preventDefault();
|
|
3177
3502
|
}
|
|
3178
3503
|
break;
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3504
|
+
}
|
|
3505
|
+
case 'Home':
|
|
3506
|
+
case 'End': {
|
|
3507
|
+
const toEnd = key === 'End';
|
|
3508
|
+
const nextRowIndex = event.ctrlKey || event.metaKey ? (toEnd ? rows.length - 1 : 0) : rowIndex;
|
|
3509
|
+
const nextColIndex = toEnd ? cols.length - 1 : 0;
|
|
3510
|
+
this.focusCell(rows[nextRowIndex], cols[nextColIndex].field);
|
|
3511
|
+
event.preventDefault();
|
|
3512
|
+
break;
|
|
3513
|
+
}
|
|
3514
|
+
case 'Tab': {
|
|
3515
|
+
const nextRowIndex = event.shiftKey
|
|
3516
|
+
? colIndex === 0
|
|
3517
|
+
? rowIndex - 1
|
|
3518
|
+
: rowIndex
|
|
3519
|
+
: colIndex === cols.length - 1
|
|
3520
|
+
? rowIndex + 1
|
|
3521
|
+
: rowIndex;
|
|
3522
|
+
const nextColIndex = event.shiftKey
|
|
3523
|
+
? colIndex === 0
|
|
3524
|
+
? cols.length - 1
|
|
3525
|
+
: colIndex - 1
|
|
3526
|
+
: colIndex === cols.length - 1
|
|
3527
|
+
? 0
|
|
3528
|
+
: colIndex + 1;
|
|
3529
|
+
if (nextRowIndex >= 0 && nextRowIndex < rows.length) {
|
|
3530
|
+
this.focusCell(rows[nextRowIndex], cols[nextColIndex].field);
|
|
3531
|
+
event.preventDefault();
|
|
3187
3532
|
}
|
|
3188
3533
|
else {
|
|
3189
|
-
|
|
3190
|
-
this.focusedCell.set({ row: focused.row, colField: cols[colIndex + 1].field });
|
|
3191
|
-
}
|
|
3192
|
-
else if (rowIndex < rows.length - 1) {
|
|
3193
|
-
this.focusedCell.set({ row: rows[rowIndex + 1], colField: cols[0].field });
|
|
3194
|
-
}
|
|
3534
|
+
this.focusedCell.set(null);
|
|
3195
3535
|
}
|
|
3196
|
-
event.preventDefault();
|
|
3197
3536
|
break;
|
|
3537
|
+
}
|
|
3198
3538
|
case 'Enter': {
|
|
3199
3539
|
const col = cols[colIndex];
|
|
3200
3540
|
if (this.editable() && col.editable) {
|
|
3201
3541
|
this.beginEdit(focused.row, rowIndex);
|
|
3202
3542
|
this.focusedCellEditActive.set(true);
|
|
3203
3543
|
setTimeout(() => {
|
|
3204
|
-
const inputEl =
|
|
3205
|
-
|
|
3206
|
-
inputEl.focus();
|
|
3544
|
+
const inputEl = grid.querySelector('.grid-edit-input');
|
|
3545
|
+
inputEl?.focus();
|
|
3207
3546
|
}, 0);
|
|
3208
3547
|
event.preventDefault();
|
|
3209
3548
|
}
|
|
@@ -3211,6 +3550,7 @@ class DataGridComponent {
|
|
|
3211
3550
|
}
|
|
3212
3551
|
case 'Escape':
|
|
3213
3552
|
this.focusedCell.set(null);
|
|
3553
|
+
grid.focus();
|
|
3214
3554
|
event.preventDefault();
|
|
3215
3555
|
break;
|
|
3216
3556
|
default:
|
|
@@ -3221,7 +3561,7 @@ class DataGridComponent {
|
|
|
3221
3561
|
this.focusedCellEditActive.set(true);
|
|
3222
3562
|
this.updateDraft(focused.colField, key);
|
|
3223
3563
|
setTimeout(() => {
|
|
3224
|
-
const inputEl =
|
|
3564
|
+
const inputEl = grid.querySelector('.grid-edit-input');
|
|
3225
3565
|
if (inputEl) {
|
|
3226
3566
|
inputEl.focus();
|
|
3227
3567
|
inputEl.value = key;
|
|
@@ -3233,6 +3573,13 @@ class DataGridComponent {
|
|
|
3233
3573
|
break;
|
|
3234
3574
|
}
|
|
3235
3575
|
}
|
|
3576
|
+
focusCell(row, colField) {
|
|
3577
|
+
this.focusedCell.set({ row, colField });
|
|
3578
|
+
setTimeout(() => {
|
|
3579
|
+
const focusedCell = this.elementRef.nativeElement.querySelector('.grid-td.cell-focused');
|
|
3580
|
+
focusedCell?.focus();
|
|
3581
|
+
}, 0);
|
|
3582
|
+
}
|
|
3236
3583
|
getCellRowSpan(row, colField, rowIndex, groupItems) {
|
|
3237
3584
|
const col = this.columns().find(c => c.field === colField);
|
|
3238
3585
|
if (!col || !col.mergeRows) {
|
|
@@ -3284,10 +3631,12 @@ class DataGridComponent {
|
|
|
3284
3631
|
const rows = group.items;
|
|
3285
3632
|
if (rows.length === 0)
|
|
3286
3633
|
return '-';
|
|
3287
|
-
const values = rows
|
|
3634
|
+
const values = rows
|
|
3635
|
+
.map(r => {
|
|
3288
3636
|
const val = r[col.field];
|
|
3289
3637
|
return typeof val === 'number' ? val : Number(val);
|
|
3290
|
-
})
|
|
3638
|
+
})
|
|
3639
|
+
.filter(v => !isNaN(v));
|
|
3291
3640
|
if (col.aggregation === 'count') {
|
|
3292
3641
|
return String(rows.length);
|
|
3293
3642
|
}
|
|
@@ -3314,10 +3663,16 @@ class DataGridComponent {
|
|
|
3314
3663
|
}
|
|
3315
3664
|
}
|
|
3316
3665
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: DataGridComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3317
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: DataGridComponent, isStandalone: true, selector: "ngx-data-grid", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, stateKey: { classPropertyName: "stateKey", publicName: "stateKey", isSignal: true, isRequired: false, transformFunction: null }, reorderable: { classPropertyName: "reorderable", publicName: "reorderable", isSignal: true, isRequired: false, transformFunction: null }, multiSort: { classPropertyName: "multiSort", publicName: "multiSort", isSignal: true, isRequired: false, transformFunction: null }, rowReorderable: { classPropertyName: "rowReorderable", publicName: "rowReorderable", isSignal: true, isRequired: false, transformFunction: null }, showGlobalSearch: { classPropertyName: "showGlobalSearch", publicName: "showGlobalSearch", isSignal: true, isRequired: false, transformFunction: null }, globalSearchPlaceholder: { classPropertyName: "globalSearchPlaceholder", publicName: "globalSearchPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, showStatusBar: { classPropertyName: "showStatusBar", publicName: "showStatusBar", isSignal: true, isRequired: false, transformFunction: null }, showFilterBuilder: { classPropertyName: "showFilterBuilder", publicName: "showFilterBuilder", isSignal: true, isRequired: false, transformFunction: null }, treeData: { classPropertyName: "treeData", publicName: "treeData", isSignal: true, isRequired: false, transformFunction: null }, pinnedTopRows: { classPropertyName: "pinnedTopRows", publicName: "pinnedTopRows", isSignal: true, isRequired: false, transformFunction: null }, pinnedBottomRows: { classPropertyName: "pinnedBottomRows", publicName: "pinnedBottomRows", isSignal: true, isRequired: false, transformFunction: null }, infiniteScroll: { classPropertyName: "infiniteScroll", publicName: "infiniteScroll", isSignal: true, isRequired: false, transformFunction: null }, filterExpression: { classPropertyName: "filterExpression", publicName: "filterExpression", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, page: { classPropertyName: "page", publicName: "page", isSignal: true, isRequired: false, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: false, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, striped: { classPropertyName: "striped", publicName: "striped", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, editable: { classPropertyName: "editable", publicName: "editable", isSignal: true, isRequired: false, transformFunction: null }, sortMode: { classPropertyName: "sortMode", publicName: "sortMode", isSignal: true, isRequired: false, transformFunction: null }, filterMode: { classPropertyName: "filterMode", publicName: "filterMode", isSignal: true, isRequired: false, transformFunction: null }, groupMode: { classPropertyName: "groupMode", publicName: "groupMode", isSignal: true, isRequired: false, transformFunction: null }, pagingMode: { classPropertyName: "pagingMode", publicName: "pagingMode", isSignal: true, isRequired: false, transformFunction: null }, groupBy: { classPropertyName: "groupBy", publicName: "groupBy", isSignal: true, isRequired: false, transformFunction: null }, groupedData: { classPropertyName: "groupedData", publicName: "groupedData", isSignal: true, isRequired: false, transformFunction: null }, headerTemplate: { classPropertyName: "headerTemplate", publicName: "headerTemplate", isSignal: true, isRequired: false, transformFunction: null }, cellTemplate: { classPropertyName: "cellTemplate", publicName: "cellTemplate", isSignal: true, isRequired: false, transformFunction: null }, editCellTemplate: { classPropertyName: "editCellTemplate", publicName: "editCellTemplate", isSignal: true, isRequired: false, transformFunction: null }, rowTemplate: { classPropertyName: "rowTemplate", publicName: "rowTemplate", isSignal: true, isRequired: false, transformFunction: null }, detailRowTemplate: { classPropertyName: "detailRowTemplate", publicName: "detailRowTemplate", isSignal: true, isRequired: false, transformFunction: null }, footerTemplate: { classPropertyName: "footerTemplate", publicName: "footerTemplate", isSignal: true, isRequired: false, transformFunction: null }, showColumnChooser: { classPropertyName: "showColumnChooser", publicName: "showColumnChooser", isSignal: true, isRequired: false, transformFunction: null }, cellSelection: { classPropertyName: "cellSelection", publicName: "cellSelection", isSignal: true, isRequired: false, transformFunction: null }, enableContextMenu: { classPropertyName: "enableContextMenu", publicName: "enableContextMenu", isSignal: true, isRequired: false, transformFunction: null }, keyboardNavigation: { classPropertyName: "keyboardNavigation", publicName: "keyboardNavigation", isSignal: true, isRequired: false, transformFunction: null }, groupAggregations: { classPropertyName: "groupAggregations", publicName: "groupAggregations", isSignal: true, isRequired: false, transformFunction: null }, showGroupingPanel: { classPropertyName: "showGroupingPanel", publicName: "showGroupingPanel", isSignal: true, isRequired: false, transformFunction: null }, rowClass: { classPropertyName: "rowClass", publicName: "rowClass", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, virtualScroll: { classPropertyName: "virtualScroll", publicName: "virtualScroll", isSignal: true, isRequired: false, transformFunction: null }, rowHeight: { classPropertyName: "rowHeight", publicName: "rowHeight", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { columnReorder: "columnReorder", rowReorder: "rowReorder", filterExpressionChange: "filterExpressionChange", infiniteScrollLoad: "infiniteScrollLoad", rowClick: "rowClick", selectionChange: "selectionChange", sortChange: "sortChange", filterChange: "filterChange", groupChange: "groupChange", pageChange: "pageChange", dataStateChange: "dataStateChange", rowUpdate: "rowUpdate", cellSelectionChange: "cellSelectionChange" }, host: { listeners: { "keydown": "handleKeyDown($event)" } }, providers: [
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3666
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: DataGridComponent, isStandalone: true, selector: "ngx-data-grid", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, stateKey: { classPropertyName: "stateKey", publicName: "stateKey", isSignal: true, isRequired: false, transformFunction: null }, reorderable: { classPropertyName: "reorderable", publicName: "reorderable", isSignal: true, isRequired: false, transformFunction: null }, multiSort: { classPropertyName: "multiSort", publicName: "multiSort", isSignal: true, isRequired: false, transformFunction: null }, rowReorderable: { classPropertyName: "rowReorderable", publicName: "rowReorderable", isSignal: true, isRequired: false, transformFunction: null }, showGlobalSearch: { classPropertyName: "showGlobalSearch", publicName: "showGlobalSearch", isSignal: true, isRequired: false, transformFunction: null }, globalSearchPlaceholder: { classPropertyName: "globalSearchPlaceholder", publicName: "globalSearchPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, showStatusBar: { classPropertyName: "showStatusBar", publicName: "showStatusBar", isSignal: true, isRequired: false, transformFunction: null }, showFilterBuilder: { classPropertyName: "showFilterBuilder", publicName: "showFilterBuilder", isSignal: true, isRequired: false, transformFunction: null }, treeData: { classPropertyName: "treeData", publicName: "treeData", isSignal: true, isRequired: false, transformFunction: null }, pinnedTopRows: { classPropertyName: "pinnedTopRows", publicName: "pinnedTopRows", isSignal: true, isRequired: false, transformFunction: null }, pinnedBottomRows: { classPropertyName: "pinnedBottomRows", publicName: "pinnedBottomRows", isSignal: true, isRequired: false, transformFunction: null }, infiniteScroll: { classPropertyName: "infiniteScroll", publicName: "infiniteScroll", isSignal: true, isRequired: false, transformFunction: null }, filterExpression: { classPropertyName: "filterExpression", publicName: "filterExpression", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, page: { classPropertyName: "page", publicName: "page", isSignal: true, isRequired: false, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: false, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, striped: { classPropertyName: "striped", publicName: "striped", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, editable: { classPropertyName: "editable", publicName: "editable", isSignal: true, isRequired: false, transformFunction: null }, sortMode: { classPropertyName: "sortMode", publicName: "sortMode", isSignal: true, isRequired: false, transformFunction: null }, filterMode: { classPropertyName: "filterMode", publicName: "filterMode", isSignal: true, isRequired: false, transformFunction: null }, groupMode: { classPropertyName: "groupMode", publicName: "groupMode", isSignal: true, isRequired: false, transformFunction: null }, pagingMode: { classPropertyName: "pagingMode", publicName: "pagingMode", isSignal: true, isRequired: false, transformFunction: null }, groupBy: { classPropertyName: "groupBy", publicName: "groupBy", isSignal: true, isRequired: false, transformFunction: null }, groupedData: { classPropertyName: "groupedData", publicName: "groupedData", isSignal: true, isRequired: false, transformFunction: null }, headerTemplate: { classPropertyName: "headerTemplate", publicName: "headerTemplate", isSignal: true, isRequired: false, transformFunction: null }, cellTemplate: { classPropertyName: "cellTemplate", publicName: "cellTemplate", isSignal: true, isRequired: false, transformFunction: null }, editCellTemplate: { classPropertyName: "editCellTemplate", publicName: "editCellTemplate", isSignal: true, isRequired: false, transformFunction: null }, rowTemplate: { classPropertyName: "rowTemplate", publicName: "rowTemplate", isSignal: true, isRequired: false, transformFunction: null }, detailRowTemplate: { classPropertyName: "detailRowTemplate", publicName: "detailRowTemplate", isSignal: true, isRequired: false, transformFunction: null }, footerTemplate: { classPropertyName: "footerTemplate", publicName: "footerTemplate", isSignal: true, isRequired: false, transformFunction: null }, showColumnChooser: { classPropertyName: "showColumnChooser", publicName: "showColumnChooser", isSignal: true, isRequired: false, transformFunction: null }, cellSelection: { classPropertyName: "cellSelection", publicName: "cellSelection", isSignal: true, isRequired: false, transformFunction: null }, enableContextMenu: { classPropertyName: "enableContextMenu", publicName: "enableContextMenu", isSignal: true, isRequired: false, transformFunction: null }, keyboardNavigation: { classPropertyName: "keyboardNavigation", publicName: "keyboardNavigation", isSignal: true, isRequired: false, transformFunction: null }, groupAggregations: { classPropertyName: "groupAggregations", publicName: "groupAggregations", isSignal: true, isRequired: false, transformFunction: null }, showGroupingPanel: { classPropertyName: "showGroupingPanel", publicName: "showGroupingPanel", isSignal: true, isRequired: false, transformFunction: null }, rowClass: { classPropertyName: "rowClass", publicName: "rowClass", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, virtualScroll: { classPropertyName: "virtualScroll", publicName: "virtualScroll", isSignal: true, isRequired: false, transformFunction: null }, rowHeight: { classPropertyName: "rowHeight", publicName: "rowHeight", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { columnReorder: "columnReorder", rowReorder: "rowReorder", filterExpressionChange: "filterExpressionChange", infiniteScrollLoad: "infiniteScrollLoad", rowClick: "rowClick", selectionChange: "selectionChange", sortChange: "sortChange", filterChange: "filterChange", groupChange: "groupChange", pageChange: "pageChange", dataStateChange: "dataStateChange", rowUpdate: "rowUpdate", cellSelectionChange: "cellSelectionChange" }, host: { listeners: { "keydown": "handleKeyDown($event)" } }, providers: [GridExportXlsxService], queries: [{ propertyName: "cellTemplates", predicate: NgxGridCellTemplateDirective }, { propertyName: "editCellTemplates", predicate: NgxGridEditCellTemplateDirective }, { propertyName: "headerTemplates", predicate: NgxGridHeaderTemplateDirective }, { propertyName: "footerTemplates", predicate: NgxGridFooterTemplateDirective }], ngImport: i0, template: `
|
|
3667
|
+
<div
|
|
3668
|
+
class="ngx-data-grid"
|
|
3669
|
+
[class.loading]="loading()"
|
|
3670
|
+
[class.compact]="compact()"
|
|
3671
|
+
role="region"
|
|
3672
|
+
[attr.aria-label]="i18n.grid.dataGrid"
|
|
3673
|
+
[attr.tabindex]="keyboardNavigation() || enableContextMenu() ? 0 : null"
|
|
3674
|
+
>
|
|
3675
|
+
<div class="visually-hidden" aria-live="polite" aria-atomic="true">{{ selectionAnnouncement() }}</div>
|
|
3321
3676
|
|
|
3322
3677
|
@if (showGroupingPanel()) {
|
|
3323
3678
|
<div
|
|
@@ -3329,20 +3684,20 @@ class DataGridComponent {
|
|
|
3329
3684
|
>
|
|
3330
3685
|
<div class="grouping-panel-label">
|
|
3331
3686
|
@if (internalGroupBy(); as gb) {
|
|
3332
|
-
<span>
|
|
3687
|
+
<span>{{ i18n.grid.groupedBy }}</span>
|
|
3333
3688
|
<span class="group-chip">
|
|
3334
3689
|
{{ getColumnTitle(gb.field) }}
|
|
3335
3690
|
<button class="remove-group-btn" (click)="clearGrouping()">×</button>
|
|
3336
3691
|
</span>
|
|
3337
3692
|
} @else {
|
|
3338
|
-
<span>
|
|
3693
|
+
<span>{{ i18n.grid.groupColumnsHint }}</span>
|
|
3339
3694
|
}
|
|
3340
3695
|
</div>
|
|
3341
3696
|
</div>
|
|
3342
3697
|
}
|
|
3343
3698
|
|
|
3344
|
-
<div class="grid-toolbar">
|
|
3345
|
-
<span class="grid-toolbar-title">
|
|
3699
|
+
<div class="grid-toolbar" role="toolbar" [attr.aria-label]="i18n.grid.toolbar">
|
|
3700
|
+
<span class="grid-toolbar-title">{{ i18n.grid.dataGrid }}</span>
|
|
3346
3701
|
<div class="grid-toolbar-actions">
|
|
3347
3702
|
@if (showGlobalSearch()) {
|
|
3348
3703
|
<div class="grid-search-wrap">
|
|
@@ -3354,28 +3709,97 @@ class DataGridComponent {
|
|
|
3354
3709
|
(input)="searchText.set($any($event.target).value)"
|
|
3355
3710
|
/>
|
|
3356
3711
|
@if (searchText()) {
|
|
3357
|
-
<button
|
|
3712
|
+
<button
|
|
3713
|
+
class="grid-search-clear"
|
|
3714
|
+
(click)="searchText.set('')"
|
|
3715
|
+
[attr.title]="i18n.grid.clearSearch"
|
|
3716
|
+
[attr.aria-label]="i18n.grid.clearSearch"
|
|
3717
|
+
>
|
|
3718
|
+
×
|
|
3719
|
+
</button>
|
|
3358
3720
|
}
|
|
3359
3721
|
</div>
|
|
3360
3722
|
}
|
|
3361
3723
|
@if (activeFilters().length > 0) {
|
|
3362
|
-
<button
|
|
3724
|
+
<button
|
|
3725
|
+
class="grid-action-btn clear-filters-btn"
|
|
3726
|
+
(click)="clearAllFilters()"
|
|
3727
|
+
[attr.title]="i18n.grid.clearFilters"
|
|
3728
|
+
[attr.aria-label]="i18n.grid.clearFilters"
|
|
3729
|
+
>
|
|
3730
|
+
Clear Filters
|
|
3731
|
+
</button>
|
|
3363
3732
|
}
|
|
3364
3733
|
@if (showColumnChooser()) {
|
|
3365
|
-
<button
|
|
3734
|
+
<button
|
|
3735
|
+
class="grid-action-btn"
|
|
3736
|
+
(click)="openColumnChooser($event)"
|
|
3737
|
+
[attr.aria-expanded]="activeColumnChooserPopover() !== null"
|
|
3738
|
+
[attr.aria-controls]="instanceId + '-column-chooser'"
|
|
3739
|
+
[attr.aria-label]="i18n.grid.chooseColumns"
|
|
3740
|
+
type="button"
|
|
3741
|
+
>
|
|
3742
|
+
{{ i18n.grid.chooseColumns }}
|
|
3743
|
+
</button>
|
|
3366
3744
|
}
|
|
3367
3745
|
@if (showFilterBuilder()) {
|
|
3368
|
-
<button
|
|
3746
|
+
<button
|
|
3747
|
+
class="grid-action-btn"
|
|
3748
|
+
type="button"
|
|
3749
|
+
(click)="openFilterBuilder($event)"
|
|
3750
|
+
[attr.aria-haspopup]="'dialog'"
|
|
3751
|
+
[attr.aria-expanded]="isFilterBuilderOpen()"
|
|
3752
|
+
[attr.aria-controls]="instanceId + '-filter-builder'"
|
|
3753
|
+
[attr.title]="i18n.grid.advancedFilterBuilder"
|
|
3754
|
+
[attr.aria-label]="i18n.grid.advancedFilterBuilder"
|
|
3755
|
+
>
|
|
3756
|
+
🔍 Filter
|
|
3757
|
+
</button>
|
|
3369
3758
|
}
|
|
3370
|
-
<button
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3759
|
+
<button
|
|
3760
|
+
class="grid-action-btn"
|
|
3761
|
+
(click)="exportToJson()"
|
|
3762
|
+
[attr.title]="i18n.grid.exportJson"
|
|
3763
|
+
[attr.aria-label]="i18n.grid.exportJson"
|
|
3764
|
+
>
|
|
3765
|
+
JSON
|
|
3766
|
+
</button>
|
|
3767
|
+
<button
|
|
3768
|
+
class="grid-action-btn"
|
|
3769
|
+
(click)="exportToCsv()"
|
|
3770
|
+
[attr.title]="i18n.grid.exportCsv"
|
|
3771
|
+
[attr.aria-label]="i18n.grid.exportCsv"
|
|
3772
|
+
>
|
|
3773
|
+
CSV
|
|
3774
|
+
</button>
|
|
3775
|
+
<button
|
|
3776
|
+
class="grid-action-btn"
|
|
3777
|
+
(click)="exportToXlsx()"
|
|
3778
|
+
[attr.title]="i18n.grid.exportXlsx"
|
|
3779
|
+
[attr.aria-label]="i18n.grid.exportXlsx"
|
|
3780
|
+
>
|
|
3781
|
+
XLSX
|
|
3782
|
+
</button>
|
|
3783
|
+
<button
|
|
3784
|
+
class="grid-action-btn"
|
|
3785
|
+
(click)="exportToExcel()"
|
|
3786
|
+
[attr.title]="i18n.grid.exportExcel"
|
|
3787
|
+
[attr.aria-label]="i18n.grid.exportExcel"
|
|
3788
|
+
>
|
|
3789
|
+
Excel
|
|
3790
|
+
</button>
|
|
3791
|
+
<button
|
|
3792
|
+
class="grid-action-btn"
|
|
3793
|
+
(click)="exportToPdf()"
|
|
3794
|
+
[attr.title]="i18n.grid.exportPdf"
|
|
3795
|
+
[attr.aria-label]="i18n.grid.exportPdf"
|
|
3796
|
+
>
|
|
3797
|
+
PDF
|
|
3798
|
+
</button>
|
|
3375
3799
|
</div>
|
|
3376
3800
|
</div>
|
|
3377
3801
|
|
|
3378
|
-
<div class="grid-table-wrap" #viewportEl (scroll)="onViewportScroll($event)">
|
|
3802
|
+
<div class="grid-table-wrap" #viewportEl (scroll)="onViewportScroll($event)" [attr.aria-busy]="loading()">
|
|
3379
3803
|
<table class="grid-table" [class.striped]="striped()">
|
|
3380
3804
|
<colgroup>
|
|
3381
3805
|
@if (rowReorderable()) {
|
|
@@ -3398,13 +3822,18 @@ class DataGridComponent {
|
|
|
3398
3822
|
<ng-template #headerCellContent let-col="col">
|
|
3399
3823
|
<div class="th-content-wrapper">
|
|
3400
3824
|
@if (resolveHeaderTemplate(col); as activeHeaderTemplate) {
|
|
3401
|
-
<ng-container
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3825
|
+
<ng-container
|
|
3826
|
+
*ngTemplateOutlet="
|
|
3827
|
+
activeHeaderTemplate;
|
|
3828
|
+
context: {
|
|
3829
|
+
$implicit: col,
|
|
3830
|
+
column: col,
|
|
3831
|
+
sort: sortState(),
|
|
3832
|
+
filters: activeFilters(),
|
|
3833
|
+
isServerMode: isAnyServerMode(),
|
|
3834
|
+
}
|
|
3835
|
+
"
|
|
3836
|
+
/>
|
|
3408
3837
|
} @else {
|
|
3409
3838
|
<span class="th-text">{{ col.title }}</span>
|
|
3410
3839
|
@if (col.sortable) {
|
|
@@ -3421,25 +3850,70 @@ class DataGridComponent {
|
|
|
3421
3850
|
}
|
|
3422
3851
|
}
|
|
3423
3852
|
@if (col.filterable) {
|
|
3424
|
-
<button
|
|
3425
|
-
|
|
3853
|
+
<button
|
|
3854
|
+
class="grid-filter-btn"
|
|
3855
|
+
[class.active]="filterStates().has(col.field)"
|
|
3856
|
+
(click)="openFilterPopover($event, col.field); $event.stopPropagation()"
|
|
3857
|
+
[attr.title]="i18n.grid.filterColumn"
|
|
3858
|
+
[attr.aria-label]="i18n.grid.filterColumn"
|
|
3859
|
+
>
|
|
3860
|
+
<svg
|
|
3861
|
+
viewBox="0 0 24 24"
|
|
3862
|
+
width="12"
|
|
3863
|
+
height="12"
|
|
3864
|
+
fill="none"
|
|
3865
|
+
stroke="currentColor"
|
|
3866
|
+
stroke-width="2"
|
|
3867
|
+
stroke-linecap="round"
|
|
3868
|
+
stroke-linejoin="round"
|
|
3869
|
+
>
|
|
3426
3870
|
<polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"></polygon>
|
|
3427
3871
|
</svg>
|
|
3428
3872
|
</button>
|
|
3429
3873
|
}
|
|
3430
3874
|
</div>
|
|
3431
|
-
<div
|
|
3875
|
+
<div
|
|
3876
|
+
class="grid-resize-handle"
|
|
3877
|
+
(mousedown)="onResizeStart($event, col)"
|
|
3878
|
+
(dblclick)="onResizeDoubleClick($event, col)"
|
|
3879
|
+
(click)="$event.stopPropagation()"
|
|
3880
|
+
></div>
|
|
3432
3881
|
</ng-template>
|
|
3433
3882
|
|
|
3434
3883
|
<tr class="grid-header-row">
|
|
3435
3884
|
@if (rowReorderable()) {
|
|
3436
|
-
<th
|
|
3885
|
+
<th
|
|
3886
|
+
class="grid-th grid-th-reorder pinned-left"
|
|
3887
|
+
[class.pinned-left-last]="isRowReorderableLastPinned()"
|
|
3888
|
+
[attr.rowspan]="hasColumnCategories() ? 2 : 1"
|
|
3889
|
+
style="width:44px; left:0px"
|
|
3890
|
+
></th>
|
|
3437
3891
|
}
|
|
3438
3892
|
@if (showDetailToggle()) {
|
|
3439
|
-
<th
|
|
3893
|
+
<th
|
|
3894
|
+
class="grid-th grid-th-toggle pinned-left"
|
|
3895
|
+
[class.pinned-left-last]="isDetailToggleLastPinned()"
|
|
3896
|
+
[attr.rowspan]="hasColumnCategories() ? 2 : 1"
|
|
3897
|
+
[style.left.px]="rowReorderable() ? 44 : 0"
|
|
3898
|
+
style="width:44px"
|
|
3899
|
+
></th>
|
|
3440
3900
|
}
|
|
3441
3901
|
@if (selectable()) {
|
|
3442
|
-
<th
|
|
3902
|
+
<th
|
|
3903
|
+
class="grid-th grid-th-check pinned-left"
|
|
3904
|
+
[class.pinned-left-last]="isSelectableLastPinned()"
|
|
3905
|
+
[attr.rowspan]="hasColumnCategories() ? 2 : 1"
|
|
3906
|
+
[style.left.px]="(rowReorderable() ? 44 : 0) + (showDetailToggle() ? 44 : 0)"
|
|
3907
|
+
style="width:44px"
|
|
3908
|
+
>
|
|
3909
|
+
<input
|
|
3910
|
+
type="checkbox"
|
|
3911
|
+
[attr.aria-label]="allSelected() ? i18n.grid.deselectAll : i18n.grid.selectAll"
|
|
3912
|
+
[checked]="allSelected()"
|
|
3913
|
+
[indeterminate]="someSelected() && !allSelected()"
|
|
3914
|
+
(change)="toggleAll()"
|
|
3915
|
+
/>
|
|
3916
|
+
</th>
|
|
3443
3917
|
}
|
|
3444
3918
|
@for (cell of headerRows().row1; track cell.field) {
|
|
3445
3919
|
@if (cell.isCategory) {
|
|
@@ -3492,7 +3966,9 @@ class DataGridComponent {
|
|
|
3492
3966
|
[style.right.px]="firstPinnedRightColumnField() !== null ? 0 : null"
|
|
3493
3967
|
[attr.rowspan]="hasColumnCategories() ? 2 : 1"
|
|
3494
3968
|
style="width:120px"
|
|
3495
|
-
>
|
|
3969
|
+
>
|
|
3970
|
+
Actions
|
|
3971
|
+
</th>
|
|
3496
3972
|
}
|
|
3497
3973
|
</tr>
|
|
3498
3974
|
@if (hasColumnCategories()) {
|
|
@@ -3543,13 +4019,34 @@ class DataGridComponent {
|
|
|
3543
4019
|
<tr class="grid-group-row" (click)="toggleGroup(group.key)">
|
|
3544
4020
|
@if (groupAggregations()) {
|
|
3545
4021
|
@if (rowReorderable()) {
|
|
3546
|
-
<td
|
|
4022
|
+
<td
|
|
4023
|
+
class="grid-td grid-td-reorder pinned-left"
|
|
4024
|
+
[class.pinned-left-last]="isRowReorderableLastPinned()"
|
|
4025
|
+
style="left:0px; width:44px"
|
|
4026
|
+
></td>
|
|
3547
4027
|
}
|
|
3548
4028
|
@if (showDetailToggle()) {
|
|
3549
|
-
<td
|
|
4029
|
+
<td
|
|
4030
|
+
class="grid-td grid-td-toggle pinned-left"
|
|
4031
|
+
[class.pinned-left-last]="isDetailToggleLastPinned()"
|
|
4032
|
+
[style.left.px]="rowReorderable() ? 44 : 0"
|
|
4033
|
+
style="width:44px"
|
|
4034
|
+
></td>
|
|
3550
4035
|
}
|
|
3551
4036
|
@if (selectable()) {
|
|
3552
|
-
<td
|
|
4037
|
+
<td
|
|
4038
|
+
class="grid-td grid-td-check pinned-left"
|
|
4039
|
+
[class.pinned-left-last]="isSelectableLastPinned()"
|
|
4040
|
+
[style.left.px]="(rowReorderable() ? 44 : 0) + (showDetailToggle() ? 44 : 0)"
|
|
4041
|
+
style="width:44px"
|
|
4042
|
+
>
|
|
4043
|
+
<input
|
|
4044
|
+
type="checkbox"
|
|
4045
|
+
[checked]="isGroupAllSelected(group)"
|
|
4046
|
+
(change)="toggleGroupSelection(group, $event)"
|
|
4047
|
+
(click)="$event.stopPropagation()"
|
|
4048
|
+
/>
|
|
4049
|
+
</td>
|
|
3553
4050
|
}
|
|
3554
4051
|
@for (col of orderedColumns(); track col.field; let first = $first) {
|
|
3555
4052
|
<td
|
|
@@ -3557,7 +4054,9 @@ class DataGridComponent {
|
|
|
3557
4054
|
[class.pinned-left]="col.pinned === 'left'"
|
|
3558
4055
|
[class.pinned-left-last]="col.pinned === 'left' && lastPinnedColumnField() === col.field"
|
|
3559
4056
|
[class.pinned-right]="col.pinned === 'right'"
|
|
3560
|
-
[class.pinned-right-first]="
|
|
4057
|
+
[class.pinned-right-first]="
|
|
4058
|
+
col.pinned === 'right' && firstPinnedRightColumnField() === col.field
|
|
4059
|
+
"
|
|
3561
4060
|
[style.left.px]="col.pinned === 'left' ? columnOffsets()[col.field] : null"
|
|
3562
4061
|
[style.right.px]="col.pinned === 'right' ? columnRightOffsets()[col.field] : null"
|
|
3563
4062
|
[style.text-align]="col.align ?? 'left'"
|
|
@@ -3565,10 +4064,16 @@ class DataGridComponent {
|
|
|
3565
4064
|
>
|
|
3566
4065
|
@if (first) {
|
|
3567
4066
|
<div style="display: flex; align-items: center; gap: 4px;">
|
|
3568
|
-
<button
|
|
4067
|
+
<button
|
|
4068
|
+
class="group-toggle"
|
|
4069
|
+
type="button"
|
|
4070
|
+
(click)="toggleGroup(group.key); $event.stopPropagation()"
|
|
4071
|
+
style="background: transparent; border: none; cursor: pointer; padding: 0 4px; font-weight: bold; color: inherit; outline: none;"
|
|
4072
|
+
>
|
|
3569
4073
|
{{ isGroupCollapsed(group.key) ? '▸' : '▾' }}
|
|
3570
4074
|
</button>
|
|
3571
|
-
<strong>{{ col.category ? '' : group.field + ': ' }}</strong
|
|
4075
|
+
<strong>{{ col.category ? '' : group.field + ': ' }}</strong
|
|
4076
|
+
>{{ group.value }} <span class="group-count">({{ group.count }})</span>
|
|
3572
4077
|
</div>
|
|
3573
4078
|
} @else if (col.aggregation) {
|
|
3574
4079
|
<span class="agg-label">{{ col.aggregation }}: </span>
|
|
@@ -3585,10 +4090,15 @@ class DataGridComponent {
|
|
|
3585
4090
|
}
|
|
3586
4091
|
} @else {
|
|
3587
4092
|
<td [attr.colspan]="renderColumnCount()">
|
|
3588
|
-
<button
|
|
4093
|
+
<button
|
|
4094
|
+
class="group-toggle"
|
|
4095
|
+
type="button"
|
|
4096
|
+
(click)="toggleGroup(group.key); $event.stopPropagation()"
|
|
4097
|
+
>
|
|
3589
4098
|
{{ isGroupCollapsed(group.key) ? '▸' : '▾' }}
|
|
3590
4099
|
</button>
|
|
3591
|
-
<strong>{{ group.field }}</strong
|
|
4100
|
+
<strong>{{ group.field }}</strong
|
|
4101
|
+
>: {{ group.value }}
|
|
3592
4102
|
<span class="group-count">({{ group.count }})</span>
|
|
3593
4103
|
</td>
|
|
3594
4104
|
}
|
|
@@ -3608,9 +4118,30 @@ class DataGridComponent {
|
|
|
3608
4118
|
(dblclick)="editable() ? beginEdit(row, i) : null"
|
|
3609
4119
|
>
|
|
3610
4120
|
@if (rowReorderable()) {
|
|
3611
|
-
<td
|
|
3612
|
-
|
|
3613
|
-
|
|
4121
|
+
<td
|
|
4122
|
+
class="grid-td grid-td-reorder pinned-left"
|
|
4123
|
+
[class.pinned-left-last]="isRowReorderableLastPinned()"
|
|
4124
|
+
style="left:0px; text-align:center; width:44px"
|
|
4125
|
+
>
|
|
4126
|
+
<span
|
|
4127
|
+
class="row-drag-handle"
|
|
4128
|
+
draggable="true"
|
|
4129
|
+
(dragstart)="onRowDragStart($event, i)"
|
|
4130
|
+
(dragend)="onRowDragEnd()"
|
|
4131
|
+
[attr.title]="i18n.grid.dragRowToReorder"
|
|
4132
|
+
[attr.aria-label]="i18n.grid.dragRowToReorder"
|
|
4133
|
+
>
|
|
4134
|
+
<svg
|
|
4135
|
+
viewBox="0 0 24 24"
|
|
4136
|
+
width="16"
|
|
4137
|
+
height="16"
|
|
4138
|
+
fill="none"
|
|
4139
|
+
stroke="currentColor"
|
|
4140
|
+
stroke-width="2.5"
|
|
4141
|
+
stroke-linecap="round"
|
|
4142
|
+
stroke-linejoin="round"
|
|
4143
|
+
style="display: block;"
|
|
4144
|
+
>
|
|
3614
4145
|
<circle cx="9" cy="5" r="1.5"></circle>
|
|
3615
4146
|
<circle cx="9" cy="12" r="1.5"></circle>
|
|
3616
4147
|
<circle cx="9" cy="19" r="1.5"></circle>
|
|
@@ -3623,9 +4154,30 @@ class DataGridComponent {
|
|
|
3623
4154
|
}
|
|
3624
4155
|
|
|
3625
4156
|
@if (showDetailToggle()) {
|
|
3626
|
-
<td
|
|
3627
|
-
|
|
3628
|
-
|
|
4157
|
+
<td
|
|
4158
|
+
class="grid-td grid-td-toggle pinned-left"
|
|
4159
|
+
[class.pinned-left-last]="isDetailToggleLastPinned()"
|
|
4160
|
+
[style.left.px]="rowReorderable() ? 44 : 0"
|
|
4161
|
+
>
|
|
4162
|
+
<button
|
|
4163
|
+
class="toggle-btn"
|
|
4164
|
+
[class.expanded]="isExpanded(row)"
|
|
4165
|
+
type="button"
|
|
4166
|
+
(click)="toggleDetail(row); $event.stopPropagation()"
|
|
4167
|
+
[attr.title]="i18n.grid.toggleDetails"
|
|
4168
|
+
[attr.aria-label]="i18n.grid.toggleDetails"
|
|
4169
|
+
>
|
|
4170
|
+
<svg
|
|
4171
|
+
viewBox="0 0 24 24"
|
|
4172
|
+
width="12"
|
|
4173
|
+
height="12"
|
|
4174
|
+
fill="none"
|
|
4175
|
+
stroke="currentColor"
|
|
4176
|
+
stroke-width="3.5"
|
|
4177
|
+
stroke-linecap="round"
|
|
4178
|
+
stroke-linejoin="round"
|
|
4179
|
+
class="chevron-icon"
|
|
4180
|
+
>
|
|
3629
4181
|
<polyline points="9 18 15 12 9 6"></polyline>
|
|
3630
4182
|
</svg>
|
|
3631
4183
|
</button>
|
|
@@ -3633,18 +4185,35 @@ class DataGridComponent {
|
|
|
3633
4185
|
}
|
|
3634
4186
|
|
|
3635
4187
|
@if (selectable()) {
|
|
3636
|
-
<td
|
|
4188
|
+
<td
|
|
4189
|
+
class="grid-td grid-td-check pinned-left"
|
|
4190
|
+
[class.pinned-left-last]="isSelectableLastPinned()"
|
|
4191
|
+
[style.left.px]="(rowReorderable() ? 44 : 0) + (showDetailToggle() ? 44 : 0)"
|
|
4192
|
+
>
|
|
4193
|
+
<input
|
|
4194
|
+
type="checkbox"
|
|
4195
|
+
[attr.aria-label]="i18n.grid.selectRow(rowSelectionKey(row))"
|
|
4196
|
+
[checked]="isRowSelected(row)"
|
|
4197
|
+
(change)="toggleRow(row)"
|
|
4198
|
+
(click)="$event.stopPropagation()"
|
|
4199
|
+
/>
|
|
4200
|
+
</td>
|
|
3637
4201
|
}
|
|
3638
4202
|
|
|
3639
4203
|
@if (rowTemplate()) {
|
|
3640
4204
|
<td class="grid-td" [attr.colspan]="orderedColumns().length + (editable() ? 1 : 0)">
|
|
3641
|
-
<ng-container
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
4205
|
+
<ng-container
|
|
4206
|
+
*ngTemplateOutlet="
|
|
4207
|
+
rowTemplate();
|
|
4208
|
+
context: {
|
|
4209
|
+
$implicit: row,
|
|
4210
|
+
row: row,
|
|
4211
|
+
index: i,
|
|
4212
|
+
editing: isEditing(row),
|
|
4213
|
+
expanded: isExpanded(row),
|
|
4214
|
+
}
|
|
4215
|
+
"
|
|
4216
|
+
/>
|
|
3648
4217
|
</td>
|
|
3649
4218
|
} @else {
|
|
3650
4219
|
@for (col of orderedColumns(); track col.field) {
|
|
@@ -3655,9 +4224,22 @@ class DataGridComponent {
|
|
|
3655
4224
|
[class.pinned-left]="col.pinned === 'left'"
|
|
3656
4225
|
[class.pinned-left-last]="col.pinned === 'left' && lastPinnedColumnField() === col.field"
|
|
3657
4226
|
[class.pinned-right]="col.pinned === 'right'"
|
|
3658
|
-
[class.pinned-right-first]="
|
|
4227
|
+
[class.pinned-right-first]="
|
|
4228
|
+
col.pinned === 'right' && firstPinnedRightColumnField() === col.field
|
|
4229
|
+
"
|
|
3659
4230
|
[class.cell-focused]="focusedCell()?.row === row && focusedCell()?.colField === col.field"
|
|
3660
|
-
[
|
|
4231
|
+
[attr.tabindex]="
|
|
4232
|
+
keyboardNavigation() || enableContextMenu()
|
|
4233
|
+
? focusedCell()?.row === row && focusedCell()?.colField === col.field
|
|
4234
|
+
? 0
|
|
4235
|
+
: -1
|
|
4236
|
+
: null
|
|
4237
|
+
"
|
|
4238
|
+
[class.cell-focused-editing]="
|
|
4239
|
+
focusedCell()?.row === row &&
|
|
4240
|
+
focusedCell()?.colField === col.field &&
|
|
4241
|
+
focusedCellEditActive()
|
|
4242
|
+
"
|
|
3661
4243
|
[style.left.px]="col.pinned === 'left' ? columnOffsets()[col.field] : null"
|
|
3662
4244
|
[style.right.px]="col.pinned === 'right' ? columnRightOffsets()[col.field] : null"
|
|
3663
4245
|
[style.text-align]="col.align ?? 'left'"
|
|
@@ -3666,20 +4248,25 @@ class DataGridComponent {
|
|
|
3666
4248
|
(mousedown)="onCellMouseDown($event, row, col.field)"
|
|
3667
4249
|
(mouseenter)="onCellMouseEnter(row, col.field)"
|
|
3668
4250
|
(contextmenu)="onCellContextMenu($event, row, col.field)"
|
|
3669
|
-
(click)="onCellClick(row, col.field)"
|
|
4251
|
+
(click)="onCellClick(row, col.field, $event)"
|
|
3670
4252
|
>
|
|
3671
4253
|
@if (isEditing(row) && editable() && col.editable) {
|
|
3672
4254
|
@if (resolveEditCellTemplate(col); as activeEditTemplate) {
|
|
3673
|
-
<ng-container
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
4255
|
+
<ng-container
|
|
4256
|
+
*ngTemplateOutlet="
|
|
4257
|
+
activeEditTemplate;
|
|
4258
|
+
context: {
|
|
4259
|
+
$implicit: getDraftValue(row, col.field),
|
|
4260
|
+
value: getCellValue(row, col.field),
|
|
4261
|
+
row: row,
|
|
4262
|
+
column: col,
|
|
4263
|
+
index: i,
|
|
4264
|
+
editing: true,
|
|
4265
|
+
draftValue: getDraftValue(row, col.field),
|
|
4266
|
+
updateDraft: getUpdateDraftCallback(col.field),
|
|
4267
|
+
}
|
|
4268
|
+
"
|
|
4269
|
+
/>
|
|
3683
4270
|
} @else {
|
|
3684
4271
|
<input
|
|
3685
4272
|
class="grid-edit-input"
|
|
@@ -3689,14 +4276,19 @@ class DataGridComponent {
|
|
|
3689
4276
|
/>
|
|
3690
4277
|
}
|
|
3691
4278
|
} @else if (resolveCellTemplate(col)) {
|
|
3692
|
-
<ng-container
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
4279
|
+
<ng-container
|
|
4280
|
+
*ngTemplateOutlet="
|
|
4281
|
+
resolveCellTemplate(col)!;
|
|
4282
|
+
context: {
|
|
4283
|
+
$implicit: getCellValue(row, col.field),
|
|
4284
|
+
value: getCellValue(row, col.field),
|
|
4285
|
+
row: row,
|
|
4286
|
+
column: col,
|
|
4287
|
+
index: i,
|
|
4288
|
+
editing: isEditing(row),
|
|
4289
|
+
}
|
|
4290
|
+
"
|
|
4291
|
+
/>
|
|
3700
4292
|
} @else {
|
|
3701
4293
|
@if (showGlobalSearch() && searchText()) {
|
|
3702
4294
|
<span [innerHTML]="highlightSearchText(getCellValue(row, col.field))"></span>
|
|
@@ -3717,10 +4309,24 @@ class DataGridComponent {
|
|
|
3717
4309
|
style="width:120px"
|
|
3718
4310
|
>
|
|
3719
4311
|
@if (!isEditing(row)) {
|
|
3720
|
-
<button
|
|
4312
|
+
<button
|
|
4313
|
+
class="action-btn"
|
|
4314
|
+
type="button"
|
|
4315
|
+
(click)="beginEdit(row, i); $event.stopPropagation()"
|
|
4316
|
+
>
|
|
4317
|
+
Edit
|
|
4318
|
+
</button>
|
|
3721
4319
|
} @else {
|
|
3722
|
-
<button
|
|
3723
|
-
|
|
4320
|
+
<button
|
|
4321
|
+
class="action-btn save"
|
|
4322
|
+
type="button"
|
|
4323
|
+
(click)="saveEdit(row, i); $event.stopPropagation()"
|
|
4324
|
+
>
|
|
4325
|
+
Save
|
|
4326
|
+
</button>
|
|
4327
|
+
<button class="action-btn" type="button" (click)="cancelEdit(); $event.stopPropagation()">
|
|
4328
|
+
Cancel
|
|
4329
|
+
</button>
|
|
3724
4330
|
}
|
|
3725
4331
|
</td>
|
|
3726
4332
|
}
|
|
@@ -3731,11 +4337,16 @@ class DataGridComponent {
|
|
|
3731
4337
|
<tr class="grid-detail-row" [class.expanded]="isExpanded(row)">
|
|
3732
4338
|
<td [attr.colspan]="renderColumnCount()" class="grid-detail-cell">
|
|
3733
4339
|
<div class="detail-wrapper" [class.expanded]="isExpanded(row)">
|
|
3734
|
-
<ng-container
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
4340
|
+
<ng-container
|
|
4341
|
+
*ngTemplateOutlet="
|
|
4342
|
+
detailRowTemplate();
|
|
4343
|
+
context: {
|
|
4344
|
+
$implicit: row,
|
|
4345
|
+
row: row,
|
|
4346
|
+
index: i,
|
|
4347
|
+
}
|
|
4348
|
+
"
|
|
4349
|
+
/>
|
|
3739
4350
|
</div>
|
|
3740
4351
|
</td>
|
|
3741
4352
|
</tr>
|
|
@@ -3749,7 +4360,11 @@ class DataGridComponent {
|
|
|
3749
4360
|
<td [attr.colspan]="renderColumnCount()" style="padding:0; border:none; height: inherit;"></td>
|
|
3750
4361
|
</tr>
|
|
3751
4362
|
}
|
|
3752
|
-
@for (
|
|
4363
|
+
@for (
|
|
4364
|
+
row of virtualScroll() ? visibleRows() : flatRenderedRows();
|
|
4365
|
+
track getKey(row, $index);
|
|
4366
|
+
let i = $index
|
|
4367
|
+
) {
|
|
3753
4368
|
@let actualIndex = virtualScroll() ? startIndex() + i : i;
|
|
3754
4369
|
<tr
|
|
3755
4370
|
[class]="'grid-row ' + getRowCustomClass(row)"
|
|
@@ -3764,9 +4379,30 @@ class DataGridComponent {
|
|
|
3764
4379
|
(dblclick)="editable() ? beginEdit(row, actualIndex) : null"
|
|
3765
4380
|
>
|
|
3766
4381
|
@if (rowReorderable()) {
|
|
3767
|
-
<td
|
|
3768
|
-
|
|
3769
|
-
|
|
4382
|
+
<td
|
|
4383
|
+
class="grid-td grid-td-reorder pinned-left"
|
|
4384
|
+
[class.pinned-left-last]="isRowReorderableLastPinned()"
|
|
4385
|
+
style="left:0px; text-align:center; width:44px"
|
|
4386
|
+
>
|
|
4387
|
+
<span
|
|
4388
|
+
class="row-drag-handle"
|
|
4389
|
+
draggable="true"
|
|
4390
|
+
(dragstart)="onRowDragStart($event, actualIndex)"
|
|
4391
|
+
(dragend)="onRowDragEnd()"
|
|
4392
|
+
[attr.title]="i18n.grid.dragRowToReorder"
|
|
4393
|
+
[attr.aria-label]="i18n.grid.dragRowToReorder"
|
|
4394
|
+
>
|
|
4395
|
+
<svg
|
|
4396
|
+
viewBox="0 0 24 24"
|
|
4397
|
+
width="16"
|
|
4398
|
+
height="16"
|
|
4399
|
+
fill="none"
|
|
4400
|
+
stroke="currentColor"
|
|
4401
|
+
stroke-width="2.5"
|
|
4402
|
+
stroke-linecap="round"
|
|
4403
|
+
stroke-linejoin="round"
|
|
4404
|
+
style="display: block;"
|
|
4405
|
+
>
|
|
3770
4406
|
<circle cx="9" cy="5" r="1.5"></circle>
|
|
3771
4407
|
<circle cx="9" cy="12" r="1.5"></circle>
|
|
3772
4408
|
<circle cx="9" cy="19" r="1.5"></circle>
|
|
@@ -3779,9 +4415,30 @@ class DataGridComponent {
|
|
|
3779
4415
|
}
|
|
3780
4416
|
|
|
3781
4417
|
@if (showDetailToggle()) {
|
|
3782
|
-
<td
|
|
3783
|
-
|
|
3784
|
-
|
|
4418
|
+
<td
|
|
4419
|
+
class="grid-td grid-td-toggle pinned-left"
|
|
4420
|
+
[class.pinned-left-last]="isDetailToggleLastPinned()"
|
|
4421
|
+
[style.left.px]="rowReorderable() ? 44 : 0"
|
|
4422
|
+
>
|
|
4423
|
+
<button
|
|
4424
|
+
class="toggle-btn"
|
|
4425
|
+
[class.expanded]="isExpanded(row)"
|
|
4426
|
+
type="button"
|
|
4427
|
+
(click)="toggleDetail(row); $event.stopPropagation()"
|
|
4428
|
+
[attr.title]="i18n.grid.toggleDetails"
|
|
4429
|
+
[attr.aria-label]="i18n.grid.toggleDetails"
|
|
4430
|
+
>
|
|
4431
|
+
<svg
|
|
4432
|
+
viewBox="0 0 24 24"
|
|
4433
|
+
width="12"
|
|
4434
|
+
height="12"
|
|
4435
|
+
fill="none"
|
|
4436
|
+
stroke="currentColor"
|
|
4437
|
+
stroke-width="3.5"
|
|
4438
|
+
stroke-linecap="round"
|
|
4439
|
+
stroke-linejoin="round"
|
|
4440
|
+
class="chevron-icon"
|
|
4441
|
+
>
|
|
3785
4442
|
<polyline points="9 18 15 12 9 6"></polyline>
|
|
3786
4443
|
</svg>
|
|
3787
4444
|
</button>
|
|
@@ -3789,18 +4446,35 @@ class DataGridComponent {
|
|
|
3789
4446
|
}
|
|
3790
4447
|
|
|
3791
4448
|
@if (selectable()) {
|
|
3792
|
-
<td
|
|
4449
|
+
<td
|
|
4450
|
+
class="grid-td grid-td-check pinned-left"
|
|
4451
|
+
[class.pinned-left-last]="isSelectableLastPinned()"
|
|
4452
|
+
[style.left.px]="(rowReorderable() ? 44 : 0) + (showDetailToggle() ? 44 : 0)"
|
|
4453
|
+
>
|
|
4454
|
+
<input
|
|
4455
|
+
type="checkbox"
|
|
4456
|
+
[attr.aria-label]="i18n.grid.selectRow(rowSelectionKey(row))"
|
|
4457
|
+
[checked]="isRowSelected(row)"
|
|
4458
|
+
(change)="toggleRow(row)"
|
|
4459
|
+
(click)="$event.stopPropagation()"
|
|
4460
|
+
/>
|
|
4461
|
+
</td>
|
|
3793
4462
|
}
|
|
3794
4463
|
|
|
3795
4464
|
@if (rowTemplate()) {
|
|
3796
4465
|
<td class="grid-td" [attr.colspan]="orderedColumns().length + (editable() ? 1 : 0)">
|
|
3797
|
-
<ng-container
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
4466
|
+
<ng-container
|
|
4467
|
+
*ngTemplateOutlet="
|
|
4468
|
+
rowTemplate();
|
|
4469
|
+
context: {
|
|
4470
|
+
$implicit: row,
|
|
4471
|
+
row: row,
|
|
4472
|
+
index: actualIndex,
|
|
4473
|
+
editing: isEditing(row),
|
|
4474
|
+
expanded: isExpanded(row),
|
|
4475
|
+
}
|
|
4476
|
+
"
|
|
4477
|
+
/>
|
|
3804
4478
|
</td>
|
|
3805
4479
|
} @else {
|
|
3806
4480
|
@for (col of orderedColumns(); track col.field) {
|
|
@@ -3811,9 +4485,22 @@ class DataGridComponent {
|
|
|
3811
4485
|
[class.pinned-left]="col.pinned === 'left'"
|
|
3812
4486
|
[class.pinned-left-last]="col.pinned === 'left' && lastPinnedColumnField() === col.field"
|
|
3813
4487
|
[class.pinned-right]="col.pinned === 'right'"
|
|
3814
|
-
[class.pinned-right-first]="
|
|
4488
|
+
[class.pinned-right-first]="
|
|
4489
|
+
col.pinned === 'right' && firstPinnedRightColumnField() === col.field
|
|
4490
|
+
"
|
|
3815
4491
|
[class.cell-focused]="focusedCell()?.row === row && focusedCell()?.colField === col.field"
|
|
3816
|
-
[
|
|
4492
|
+
[attr.tabindex]="
|
|
4493
|
+
keyboardNavigation() || enableContextMenu()
|
|
4494
|
+
? focusedCell()?.row === row && focusedCell()?.colField === col.field
|
|
4495
|
+
? 0
|
|
4496
|
+
: -1
|
|
4497
|
+
: null
|
|
4498
|
+
"
|
|
4499
|
+
[class.cell-focused-editing]="
|
|
4500
|
+
focusedCell()?.row === row &&
|
|
4501
|
+
focusedCell()?.colField === col.field &&
|
|
4502
|
+
focusedCellEditActive()
|
|
4503
|
+
"
|
|
3817
4504
|
[style.left.px]="col.pinned === 'left' ? columnOffsets()[col.field] : null"
|
|
3818
4505
|
[style.right.px]="col.pinned === 'right' ? columnRightOffsets()[col.field] : null"
|
|
3819
4506
|
[style.text-align]="col.align ?? 'left'"
|
|
@@ -3822,20 +4509,25 @@ class DataGridComponent {
|
|
|
3822
4509
|
(mousedown)="onCellMouseDown($event, row, col.field)"
|
|
3823
4510
|
(mouseenter)="onCellMouseEnter(row, col.field)"
|
|
3824
4511
|
(contextmenu)="onCellContextMenu($event, row, col.field)"
|
|
3825
|
-
(click)="onCellClick(row, col.field)"
|
|
4512
|
+
(click)="onCellClick(row, col.field, $event)"
|
|
3826
4513
|
>
|
|
3827
4514
|
@if (isEditing(row) && editable() && col.editable) {
|
|
3828
4515
|
@if (resolveEditCellTemplate(col); as activeEditTemplate) {
|
|
3829
|
-
<ng-container
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
4516
|
+
<ng-container
|
|
4517
|
+
*ngTemplateOutlet="
|
|
4518
|
+
activeEditTemplate;
|
|
4519
|
+
context: {
|
|
4520
|
+
$implicit: getDraftValue(row, col.field),
|
|
4521
|
+
value: getCellValue(row, col.field),
|
|
4522
|
+
row: row,
|
|
4523
|
+
column: col,
|
|
4524
|
+
index: actualIndex,
|
|
4525
|
+
editing: true,
|
|
4526
|
+
draftValue: getDraftValue(row, col.field),
|
|
4527
|
+
updateDraft: getUpdateDraftCallback(col.field),
|
|
4528
|
+
}
|
|
4529
|
+
"
|
|
4530
|
+
/>
|
|
3839
4531
|
} @else {
|
|
3840
4532
|
<input
|
|
3841
4533
|
class="grid-edit-input"
|
|
@@ -3845,14 +4537,19 @@ class DataGridComponent {
|
|
|
3845
4537
|
/>
|
|
3846
4538
|
}
|
|
3847
4539
|
} @else if (resolveCellTemplate(col)) {
|
|
3848
|
-
<ng-container
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
4540
|
+
<ng-container
|
|
4541
|
+
*ngTemplateOutlet="
|
|
4542
|
+
resolveCellTemplate(col)!;
|
|
4543
|
+
context: {
|
|
4544
|
+
$implicit: getCellValue(row, col.field),
|
|
4545
|
+
value: getCellValue(row, col.field),
|
|
4546
|
+
row: row,
|
|
4547
|
+
column: col,
|
|
4548
|
+
index: actualIndex,
|
|
4549
|
+
editing: isEditing(row),
|
|
4550
|
+
}
|
|
4551
|
+
"
|
|
4552
|
+
/>
|
|
3856
4553
|
} @else {
|
|
3857
4554
|
@if (showGlobalSearch() && searchText()) {
|
|
3858
4555
|
<span [innerHTML]="highlightSearchText(getCellValue(row, col.field))"></span>
|
|
@@ -3873,10 +4570,24 @@ class DataGridComponent {
|
|
|
3873
4570
|
style="width:120px"
|
|
3874
4571
|
>
|
|
3875
4572
|
@if (!isEditing(row)) {
|
|
3876
|
-
<button
|
|
4573
|
+
<button
|
|
4574
|
+
class="action-btn"
|
|
4575
|
+
type="button"
|
|
4576
|
+
(click)="beginEdit(row, actualIndex); $event.stopPropagation()"
|
|
4577
|
+
>
|
|
4578
|
+
Edit
|
|
4579
|
+
</button>
|
|
3877
4580
|
} @else {
|
|
3878
|
-
<button
|
|
3879
|
-
|
|
4581
|
+
<button
|
|
4582
|
+
class="action-btn save"
|
|
4583
|
+
type="button"
|
|
4584
|
+
(click)="saveEdit(row, actualIndex); $event.stopPropagation()"
|
|
4585
|
+
>
|
|
4586
|
+
Save
|
|
4587
|
+
</button>
|
|
4588
|
+
<button class="action-btn" type="button" (click)="cancelEdit(); $event.stopPropagation()">
|
|
4589
|
+
Cancel
|
|
4590
|
+
</button>
|
|
3880
4591
|
}
|
|
3881
4592
|
</td>
|
|
3882
4593
|
}
|
|
@@ -3887,11 +4598,16 @@ class DataGridComponent {
|
|
|
3887
4598
|
<tr class="grid-detail-row" [class.expanded]="isExpanded(row)">
|
|
3888
4599
|
<td [attr.colspan]="renderColumnCount()" class="grid-detail-cell">
|
|
3889
4600
|
<div class="detail-wrapper" [class.expanded]="isExpanded(row)">
|
|
3890
|
-
<ng-container
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
4601
|
+
<ng-container
|
|
4602
|
+
*ngTemplateOutlet="
|
|
4603
|
+
detailRowTemplate();
|
|
4604
|
+
context: {
|
|
4605
|
+
$implicit: row,
|
|
4606
|
+
row: row,
|
|
4607
|
+
index: actualIndex,
|
|
4608
|
+
}
|
|
4609
|
+
"
|
|
4610
|
+
/>
|
|
3895
4611
|
</div>
|
|
3896
4612
|
</td>
|
|
3897
4613
|
</tr>
|
|
@@ -3908,13 +4624,27 @@ class DataGridComponent {
|
|
|
3908
4624
|
<tfoot>
|
|
3909
4625
|
<tr class="grid-footer-row">
|
|
3910
4626
|
@if (rowReorderable()) {
|
|
3911
|
-
<td
|
|
4627
|
+
<td
|
|
4628
|
+
class="grid-td-reorder pinned-left"
|
|
4629
|
+
[class.pinned-left-last]="isRowReorderableLastPinned()"
|
|
4630
|
+
style="left:0px; width:44px"
|
|
4631
|
+
></td>
|
|
3912
4632
|
}
|
|
3913
4633
|
@if (showDetailToggle()) {
|
|
3914
|
-
<td
|
|
4634
|
+
<td
|
|
4635
|
+
class="grid-td-toggle pinned-left"
|
|
4636
|
+
[class.pinned-left-last]="isDetailToggleLastPinned()"
|
|
4637
|
+
[style.left.px]="rowReorderable() ? 44 : 0"
|
|
4638
|
+
style="width:44px"
|
|
4639
|
+
></td>
|
|
3915
4640
|
}
|
|
3916
4641
|
@if (selectable()) {
|
|
3917
|
-
<td
|
|
4642
|
+
<td
|
|
4643
|
+
class="grid-td-check pinned-left"
|
|
4644
|
+
[class.pinned-left-last]="isSelectableLastPinned()"
|
|
4645
|
+
[style.left.px]="(rowReorderable() ? 44 : 0) + (showDetailToggle() ? 44 : 0)"
|
|
4646
|
+
style="width:44px"
|
|
4647
|
+
></td>
|
|
3918
4648
|
}
|
|
3919
4649
|
@for (col of orderedColumns(); track col.field) {
|
|
3920
4650
|
<td
|
|
@@ -3929,12 +4659,17 @@ class DataGridComponent {
|
|
|
3929
4659
|
[style.width.px]="getColumnWidth(col)"
|
|
3930
4660
|
>
|
|
3931
4661
|
@if (resolveFooterTemplate(col); as activeFooterTemplate) {
|
|
3932
|
-
<ng-container
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
4662
|
+
<ng-container
|
|
4663
|
+
*ngTemplateOutlet="
|
|
4664
|
+
activeFooterTemplate;
|
|
4665
|
+
context: {
|
|
4666
|
+
$implicit: col,
|
|
4667
|
+
column: col,
|
|
4668
|
+
aggregationValue: getAggregationValue(col),
|
|
4669
|
+
data: flatRenderedRows(),
|
|
4670
|
+
}
|
|
4671
|
+
"
|
|
4672
|
+
/>
|
|
3938
4673
|
} @else if (col.aggregation) {
|
|
3939
4674
|
<span class="agg-label">{{ col.aggregation }}: </span>
|
|
3940
4675
|
<strong class="agg-value">{{ getAggregationValue(col) }}</strong>
|
|
@@ -3958,11 +4693,17 @@ class DataGridComponent {
|
|
|
3958
4693
|
<div class="grid-pagination">
|
|
3959
4694
|
<div class="pagination-left">
|
|
3960
4695
|
<span class="page-info">
|
|
3961
|
-
{{ i18n.pagination.page }}
|
|
4696
|
+
{{ i18n.pagination.page }}
|
|
4697
|
+
<strong class="page-info-highlight">{{ pagerRangeStart() }}–{{ pagerRangeEnd() }}</strong>
|
|
4698
|
+
{{ i18n.pagination.of }} <strong class="page-info-highlight">{{ totalItems() }}</strong>
|
|
3962
4699
|
</span>
|
|
3963
4700
|
<div class="page-size-selector">
|
|
3964
4701
|
<span class="page-size-label">{{ i18n.pagination.itemsPerPage }}:</span>
|
|
3965
|
-
<select
|
|
4702
|
+
<select
|
|
4703
|
+
[value]="internalPageSize()"
|
|
4704
|
+
(change)="changePageSize(+$any($event.target).value)"
|
|
4705
|
+
class="page-size-select"
|
|
4706
|
+
>
|
|
3966
4707
|
<option [value]="5">5</option>
|
|
3967
4708
|
<option [value]="8">8</option>
|
|
3968
4709
|
<option [value]="10">10</option>
|
|
@@ -3973,31 +4714,89 @@ class DataGridComponent {
|
|
|
3973
4714
|
</div>
|
|
3974
4715
|
</div>
|
|
3975
4716
|
<div class="page-btns">
|
|
3976
|
-
<button
|
|
3977
|
-
|
|
4717
|
+
<button
|
|
4718
|
+
class="page-btn ctrl"
|
|
4719
|
+
[disabled]="currentPage() === 1"
|
|
4720
|
+
(click)="goPage(1)"
|
|
4721
|
+
[title]="i18n.pagination.firstPage"
|
|
4722
|
+
>
|
|
4723
|
+
<svg
|
|
4724
|
+
viewBox="0 0 24 24"
|
|
4725
|
+
width="14"
|
|
4726
|
+
height="14"
|
|
4727
|
+
fill="none"
|
|
4728
|
+
stroke="currentColor"
|
|
4729
|
+
stroke-width="2.5"
|
|
4730
|
+
stroke-linecap="round"
|
|
4731
|
+
stroke-linejoin="round"
|
|
4732
|
+
>
|
|
3978
4733
|
<polyline points="11 17 6 12 11 7"></polyline>
|
|
3979
4734
|
<polyline points="18 17 13 12 18 7"></polyline>
|
|
3980
4735
|
</svg>
|
|
3981
4736
|
</button>
|
|
3982
|
-
<button
|
|
3983
|
-
|
|
4737
|
+
<button
|
|
4738
|
+
class="page-btn ctrl"
|
|
4739
|
+
[disabled]="currentPage() === 1"
|
|
4740
|
+
(click)="goPage(currentPage() - 1)"
|
|
4741
|
+
[title]="i18n.pagination.previousPage"
|
|
4742
|
+
>
|
|
4743
|
+
<svg
|
|
4744
|
+
viewBox="0 0 24 24"
|
|
4745
|
+
width="14"
|
|
4746
|
+
height="14"
|
|
4747
|
+
fill="none"
|
|
4748
|
+
stroke="currentColor"
|
|
4749
|
+
stroke-width="2.5"
|
|
4750
|
+
stroke-linecap="round"
|
|
4751
|
+
stroke-linejoin="round"
|
|
4752
|
+
>
|
|
3984
4753
|
<polyline points="15 18 9 12 15 6"></polyline>
|
|
3985
4754
|
</svg>
|
|
3986
4755
|
</button>
|
|
3987
|
-
|
|
4756
|
+
|
|
3988
4757
|
<div class="page-numbers">
|
|
3989
4758
|
@for (p of pageNumbers(); track p) {
|
|
3990
|
-
<button class="page-btn number" [class.active]="p === currentPage()" (click)="goPage(p)">
|
|
4759
|
+
<button class="page-btn number" [class.active]="p === currentPage()" (click)="goPage(p)">
|
|
4760
|
+
{{ p }}
|
|
4761
|
+
</button>
|
|
3991
4762
|
}
|
|
3992
4763
|
</div>
|
|
3993
4764
|
|
|
3994
|
-
<button
|
|
3995
|
-
|
|
4765
|
+
<button
|
|
4766
|
+
class="page-btn ctrl"
|
|
4767
|
+
[disabled]="currentPage() === totalPages()"
|
|
4768
|
+
(click)="goPage(currentPage() + 1)"
|
|
4769
|
+
[title]="i18n.pagination.nextPage"
|
|
4770
|
+
>
|
|
4771
|
+
<svg
|
|
4772
|
+
viewBox="0 0 24 24"
|
|
4773
|
+
width="14"
|
|
4774
|
+
height="14"
|
|
4775
|
+
fill="none"
|
|
4776
|
+
stroke="currentColor"
|
|
4777
|
+
stroke-width="2.5"
|
|
4778
|
+
stroke-linecap="round"
|
|
4779
|
+
stroke-linejoin="round"
|
|
4780
|
+
>
|
|
3996
4781
|
<polyline points="9 18 15 12 9 6"></polyline>
|
|
3997
4782
|
</svg>
|
|
3998
4783
|
</button>
|
|
3999
|
-
<button
|
|
4000
|
-
|
|
4784
|
+
<button
|
|
4785
|
+
class="page-btn ctrl"
|
|
4786
|
+
[disabled]="currentPage() === totalPages()"
|
|
4787
|
+
(click)="goPage(totalPages())"
|
|
4788
|
+
[title]="i18n.pagination.lastPage"
|
|
4789
|
+
>
|
|
4790
|
+
<svg
|
|
4791
|
+
viewBox="0 0 24 24"
|
|
4792
|
+
width="14"
|
|
4793
|
+
height="14"
|
|
4794
|
+
fill="none"
|
|
4795
|
+
stroke="currentColor"
|
|
4796
|
+
stroke-width="2.5"
|
|
4797
|
+
stroke-linecap="round"
|
|
4798
|
+
stroke-linejoin="round"
|
|
4799
|
+
>
|
|
4001
4800
|
<polyline points="13 17 18 12 13 7"></polyline>
|
|
4002
4801
|
<polyline points="6 17 11 12 6 7"></polyline>
|
|
4003
4802
|
</svg>
|
|
@@ -4008,31 +4807,72 @@ class DataGridComponent {
|
|
|
4008
4807
|
|
|
4009
4808
|
<!-- Excel-Style Filter Popover Overlay -->
|
|
4010
4809
|
@if (activeFilterPopover(); as pop) {
|
|
4011
|
-
<div
|
|
4810
|
+
<div
|
|
4811
|
+
class="grid-filter-popover"
|
|
4812
|
+
role="dialog"
|
|
4813
|
+
[attr.aria-label]="i18n.grid.filterColumn + ': ' + getColumnTitle(pop.field)"
|
|
4814
|
+
[style.top.px]="pop.top"
|
|
4815
|
+
[style.left.px]="pop.left"
|
|
4816
|
+
(click)="$event.stopPropagation()"
|
|
4817
|
+
>
|
|
4012
4818
|
<div class="popover-section pinning-section">
|
|
4013
|
-
<label class="popover-label">
|
|
4819
|
+
<label class="popover-label">{{ i18n.grid.pinColumn }}</label>
|
|
4014
4820
|
<div class="pinning-actions">
|
|
4015
|
-
<button
|
|
4016
|
-
|
|
4017
|
-
|
|
4821
|
+
<button
|
|
4822
|
+
class="pin-btn"
|
|
4823
|
+
[class.active]="getColumnPinnedState(pop.field) === 'left'"
|
|
4824
|
+
[attr.aria-pressed]="getColumnPinnedState(pop.field) === 'left'"
|
|
4825
|
+
(click)="pinColumnPopover(pop.field, 'left')"
|
|
4826
|
+
type="button"
|
|
4827
|
+
>
|
|
4828
|
+
{{ i18n.grid.pinLeft }}
|
|
4829
|
+
</button>
|
|
4830
|
+
<button
|
|
4831
|
+
class="pin-btn"
|
|
4832
|
+
[class.active]="getColumnPinnedState(pop.field) === 'right'"
|
|
4833
|
+
[attr.aria-pressed]="getColumnPinnedState(pop.field) === 'right'"
|
|
4834
|
+
(click)="pinColumnPopover(pop.field, 'right')"
|
|
4835
|
+
type="button"
|
|
4836
|
+
>
|
|
4837
|
+
{{ i18n.grid.pinRight }}
|
|
4838
|
+
</button>
|
|
4839
|
+
<button
|
|
4840
|
+
class="pin-btn"
|
|
4841
|
+
[class.active]="getColumnPinnedState(pop.field) === null"
|
|
4842
|
+
[attr.aria-pressed]="getColumnPinnedState(pop.field) === null"
|
|
4843
|
+
(click)="pinColumnPopover(pop.field, null)"
|
|
4844
|
+
type="button"
|
|
4845
|
+
>
|
|
4846
|
+
{{ i18n.grid.noPin }}
|
|
4847
|
+
</button>
|
|
4018
4848
|
</div>
|
|
4019
4849
|
</div>
|
|
4020
4850
|
|
|
4021
4851
|
<div class="popover-section text-filter-section">
|
|
4022
|
-
<label class="popover-label">
|
|
4852
|
+
<label class="popover-label">{{ i18n.grid.textFilter }}</label>
|
|
4023
4853
|
<div class="text-filter-row">
|
|
4024
|
-
<select
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4854
|
+
<select
|
|
4855
|
+
class="popover-select"
|
|
4856
|
+
[value]="tempFilterOperator()"
|
|
4857
|
+
(change)="tempFilterOperator.set($any($event.target).value)"
|
|
4858
|
+
>
|
|
4859
|
+
<option value="contains">{{ i18n.grid.contains }}</option>
|
|
4860
|
+
<option value="eq">{{ i18n.grid.equals }}</option>
|
|
4861
|
+
<option value="startsWith">{{ i18n.grid.startsWith }}</option>
|
|
4862
|
+
<option value="endsWith">{{ i18n.grid.endsWith }}</option>
|
|
4029
4863
|
</select>
|
|
4030
|
-
<input
|
|
4864
|
+
<input
|
|
4865
|
+
class="popover-input"
|
|
4866
|
+
type="text"
|
|
4867
|
+
[value]="tempFilterValue()"
|
|
4868
|
+
(input)="tempFilterValue.set($any($event.target).value)"
|
|
4869
|
+
[placeholder]="i18n.grid.filterPlaceholder"
|
|
4870
|
+
/>
|
|
4031
4871
|
</div>
|
|
4032
4872
|
</div>
|
|
4033
|
-
|
|
4873
|
+
|
|
4034
4874
|
<div class="popover-section checklist-section">
|
|
4035
|
-
<label class="popover-label">
|
|
4875
|
+
<label class="popover-label">{{ i18n.grid.checklistFilter }}</label>
|
|
4036
4876
|
<input
|
|
4037
4877
|
class="checklist-search"
|
|
4038
4878
|
type="text"
|
|
@@ -4042,25 +4882,39 @@ class DataGridComponent {
|
|
|
4042
4882
|
/>
|
|
4043
4883
|
<div class="checklist-actions">
|
|
4044
4884
|
<label class="checklist-item select-all">
|
|
4045
|
-
<input
|
|
4885
|
+
<input
|
|
4886
|
+
type="checkbox"
|
|
4887
|
+
[checked]="tempSelectedValues().size === getFilteredDistinctValues(pop.field).length"
|
|
4888
|
+
[indeterminate]="
|
|
4889
|
+
tempSelectedValues().size > 0 &&
|
|
4890
|
+
tempSelectedValues().size < getFilteredDistinctValues(pop.field).length
|
|
4891
|
+
"
|
|
4892
|
+
(change)="toggleSelectAllChecklist()"
|
|
4893
|
+
/>
|
|
4046
4894
|
<span>({{ i18n.grid.selectAll }})</span>
|
|
4047
4895
|
</label>
|
|
4048
4896
|
</div>
|
|
4049
4897
|
<div class="checklist-scroll">
|
|
4050
4898
|
@for (val of getFilteredDistinctValues(pop.field); track val) {
|
|
4051
4899
|
<label class="checklist-item">
|
|
4052
|
-
<input
|
|
4900
|
+
<input
|
|
4901
|
+
type="checkbox"
|
|
4902
|
+
[checked]="tempSelectedValues().has(val)"
|
|
4903
|
+
(change)="toggleChecklistItem(val)"
|
|
4904
|
+
/>
|
|
4053
4905
|
<span>{{ val }}</span>
|
|
4054
4906
|
</label>
|
|
4055
4907
|
}
|
|
4056
4908
|
</div>
|
|
4057
4909
|
</div>
|
|
4058
|
-
|
|
4910
|
+
|
|
4059
4911
|
<div class="popover-footer">
|
|
4060
4912
|
<button class="popover-btn clear" (click)="clearPopoverFilter()">{{ i18n.datePicker.clear }}</button>
|
|
4061
4913
|
<div class="footer-actions">
|
|
4062
|
-
<button class="popover-btn cancel" (click)="
|
|
4063
|
-
|
|
4914
|
+
<button class="popover-btn cancel" (click)="closeFilterPopover()">
|
|
4915
|
+
{{ i18n.common.cancel }}
|
|
4916
|
+
</button>
|
|
4917
|
+
<button class="popover-btn apply" (click)="applyPopoverFilter()">{{ i18n.grid.apply }}</button>
|
|
4064
4918
|
</div>
|
|
4065
4919
|
</div>
|
|
4066
4920
|
</div>
|
|
@@ -4068,39 +4922,118 @@ class DataGridComponent {
|
|
|
4068
4922
|
|
|
4069
4923
|
<!-- Column Chooser Popover Overlay -->
|
|
4070
4924
|
@if (activeColumnChooserPopover(); as pop) {
|
|
4071
|
-
<div
|
|
4925
|
+
<div
|
|
4926
|
+
[id]="instanceId + '-column-chooser'"
|
|
4927
|
+
class="grid-column-chooser-popover"
|
|
4928
|
+
role="region"
|
|
4929
|
+
[attr.aria-label]="i18n.grid.chooseColumns"
|
|
4930
|
+
[style.top.px]="pop.top"
|
|
4931
|
+
[style.left.px]="pop.left"
|
|
4932
|
+
(click)="$event.stopPropagation()"
|
|
4933
|
+
>
|
|
4072
4934
|
<div class="popover-section checklist-section" style="border-top: none; padding-top: 0;">
|
|
4073
|
-
<
|
|
4935
|
+
<span class="popover-label">{{ i18n.grid.visibleColumns }}</span>
|
|
4074
4936
|
<div class="checklist-scroll">
|
|
4075
4937
|
@for (col of columns(); track col.field) {
|
|
4076
|
-
<
|
|
4077
|
-
<
|
|
4078
|
-
|
|
4079
|
-
|
|
4938
|
+
<div class="column-config-item">
|
|
4939
|
+
<label class="checklist-item">
|
|
4940
|
+
<input
|
|
4941
|
+
#firstColumnToggle
|
|
4942
|
+
type="checkbox"
|
|
4943
|
+
[checked]="!hiddenColumns().has(col.field)"
|
|
4944
|
+
[disabled]="!hiddenColumns().has(col.field) && visibleColumnsCount() === 1"
|
|
4945
|
+
(change)="toggleColumnVisibility(col.field)"
|
|
4946
|
+
/>
|
|
4947
|
+
<span>{{ col.title }}</span>
|
|
4948
|
+
</label>
|
|
4949
|
+
<div class="column-config-actions">
|
|
4950
|
+
<button
|
|
4951
|
+
class="column-config-btn"
|
|
4952
|
+
type="button"
|
|
4953
|
+
[attr.aria-label]="i18n.grid.pinLeft + ': ' + col.title"
|
|
4954
|
+
[attr.aria-pressed]="getColumnPinnedState(col.field) === 'left'"
|
|
4955
|
+
[title]="i18n.grid.pinLeft"
|
|
4956
|
+
(click)="pinColumnPopover(col.field, 'left')"
|
|
4957
|
+
>
|
|
4958
|
+
⇤
|
|
4959
|
+
</button>
|
|
4960
|
+
<button
|
|
4961
|
+
class="column-config-btn"
|
|
4962
|
+
type="button"
|
|
4963
|
+
[attr.aria-label]="i18n.grid.pinRight + ': ' + col.title"
|
|
4964
|
+
[attr.aria-pressed]="getColumnPinnedState(col.field) === 'right'"
|
|
4965
|
+
[title]="i18n.grid.pinRight"
|
|
4966
|
+
(click)="pinColumnPopover(col.field, 'right')"
|
|
4967
|
+
>
|
|
4968
|
+
⇥
|
|
4969
|
+
</button>
|
|
4970
|
+
<button
|
|
4971
|
+
class="column-config-btn"
|
|
4972
|
+
type="button"
|
|
4973
|
+
[attr.aria-label]="i18n.grid.noPin + ': ' + col.title"
|
|
4974
|
+
[attr.aria-pressed]="getColumnPinnedState(col.field) === null"
|
|
4975
|
+
[title]="i18n.grid.noPin"
|
|
4976
|
+
(click)="pinColumnPopover(col.field, null)"
|
|
4977
|
+
>
|
|
4978
|
+
×
|
|
4979
|
+
</button>
|
|
4980
|
+
<button
|
|
4981
|
+
class="column-config-btn"
|
|
4982
|
+
type="button"
|
|
4983
|
+
[attr.aria-label]="i18n.grid.moveColumnLeft(col.title)"
|
|
4984
|
+
[title]="i18n.grid.moveColumnLeft(col.title)"
|
|
4985
|
+
[disabled]="columnIndex(col.field) === 0"
|
|
4986
|
+
(click)="moveColumn(col.field, -1)"
|
|
4987
|
+
>
|
|
4988
|
+
←
|
|
4989
|
+
</button>
|
|
4990
|
+
<button
|
|
4991
|
+
class="column-config-btn"
|
|
4992
|
+
type="button"
|
|
4993
|
+
[attr.aria-label]="i18n.grid.moveColumnRight(col.title)"
|
|
4994
|
+
[title]="i18n.grid.moveColumnRight(col.title)"
|
|
4995
|
+
[disabled]="columnIndex(col.field) === columns().length - 1"
|
|
4996
|
+
(click)="moveColumn(col.field, 1)"
|
|
4997
|
+
>
|
|
4998
|
+
→
|
|
4999
|
+
</button>
|
|
5000
|
+
</div>
|
|
5001
|
+
</div>
|
|
4080
5002
|
}
|
|
4081
5003
|
</div>
|
|
4082
5004
|
</div>
|
|
4083
5005
|
<div class="popover-footer">
|
|
4084
|
-
<button class="popover-btn apply" (click)="
|
|
5006
|
+
<button class="popover-btn apply" type="button" (click)="closeColumnChooser()">
|
|
5007
|
+
{{ i18n.grid.closeColumnChooser }}
|
|
5008
|
+
</button>
|
|
4085
5009
|
</div>
|
|
4086
5010
|
</div>
|
|
4087
5011
|
}
|
|
4088
5012
|
|
|
4089
5013
|
<!-- Custom Context Menu Overlay -->
|
|
4090
5014
|
@if (activeContextMenu(); as menu) {
|
|
4091
|
-
<div
|
|
4092
|
-
|
|
5015
|
+
<div
|
|
5016
|
+
class="grid-context-menu"
|
|
5017
|
+
role="menu"
|
|
5018
|
+
aria-orientation="vertical"
|
|
5019
|
+
[attr.aria-label]="i18n.grid.contextMenu"
|
|
5020
|
+
[style.top.px]="menu.y"
|
|
5021
|
+
[style.left.px]="menu.x"
|
|
5022
|
+
(click)="$event.stopPropagation()"
|
|
5023
|
+
(keydown)="onContextMenuKeydown($event)"
|
|
5024
|
+
>
|
|
5025
|
+
<button class="menu-item" role="menuitem" [disabled]="!selectedCellStart()" (click)="contextMenuCopy()">
|
|
4093
5026
|
<span class="menu-icon">📋</span> Copy Selection
|
|
4094
5027
|
</button>
|
|
4095
5028
|
<div class="menu-divider"></div>
|
|
4096
5029
|
@if (showDetailToggle() && detailRowTemplate() && menu.row) {
|
|
4097
|
-
<button class="menu-item" (click)="contextMenuToggleDetail(menu.row)">
|
|
5030
|
+
<button class="menu-item" role="menuitem" (click)="contextMenuToggleDetail(menu.row)">
|
|
4098
5031
|
<span class="menu-icon">🔍</span> {{ isExpanded(menu.row) ? 'Collapse Details' : 'Expand Details' }}
|
|
4099
5032
|
</button>
|
|
4100
|
-
<button class="menu-item" (click)="expandAllDetails()">
|
|
5033
|
+
<button class="menu-item" role="menuitem" (click)="expandAllDetails()">
|
|
4101
5034
|
<span class="menu-icon">📂</span> Expand All Details
|
|
4102
5035
|
</button>
|
|
4103
|
-
<button class="menu-item" (click)="collapseAllDetails()">
|
|
5036
|
+
<button class="menu-item" role="menuitem" (click)="collapseAllDetails()">
|
|
4104
5037
|
<span class="menu-icon">📁</span> Collapse All Details
|
|
4105
5038
|
</button>
|
|
4106
5039
|
<div class="menu-divider"></div>
|
|
@@ -4108,46 +5041,51 @@ class DataGridComponent {
|
|
|
4108
5041
|
@if (getColumnDef(menu.colField); as columnDef) {
|
|
4109
5042
|
@if (columnDef.groupable) {
|
|
4110
5043
|
@if (internalGroupBy()?.field === menu.colField) {
|
|
4111
|
-
<button class="menu-item" (click)="contextMenuClearGrouping()">
|
|
5044
|
+
<button class="menu-item" role="menuitem" (click)="contextMenuClearGrouping()">
|
|
4112
5045
|
<span class="menu-icon">📁</span> Clear Grouping
|
|
4113
5046
|
</button>
|
|
4114
5047
|
} @else {
|
|
4115
|
-
<button class="menu-item" (click)="contextMenuGroupBy(menu.colField)">
|
|
5048
|
+
<button class="menu-item" role="menuitem" (click)="contextMenuGroupBy(menu.colField)">
|
|
4116
5049
|
<span class="menu-icon">🗂️</span> Group by {{ columnDef.title }}
|
|
4117
5050
|
</button>
|
|
4118
5051
|
}
|
|
4119
5052
|
}
|
|
4120
5053
|
}
|
|
4121
5054
|
@if (hasGrouping()) {
|
|
4122
|
-
<button class="menu-item" (click)="expandAllGroups()">
|
|
5055
|
+
<button class="menu-item" role="menuitem" (click)="expandAllGroups()">
|
|
4123
5056
|
<span class="menu-icon">↕️</span> Expand All Groups
|
|
4124
5057
|
</button>
|
|
4125
|
-
<button class="menu-item" (click)="collapseAllGroups()">
|
|
5058
|
+
<button class="menu-item" role="menuitem" (click)="collapseAllGroups()">
|
|
4126
5059
|
<span class="menu-icon">⋯</span> Collapse All Groups
|
|
4127
5060
|
</button>
|
|
4128
5061
|
}
|
|
4129
5062
|
<div class="menu-divider"></div>
|
|
4130
|
-
<button class="menu-item" (click)="contextMenuTogglePin(menu.colField)">
|
|
5063
|
+
<button class="menu-item" role="menuitem" (click)="contextMenuTogglePin(menu.colField)">
|
|
4131
5064
|
<span class="menu-icon">📌</span> {{ isColumnPinned(menu.colField) ? 'Unpin Column' : 'Pin Column Left' }}
|
|
4132
5065
|
</button>
|
|
4133
|
-
<button class="menu-item" (click)="contextMenuHideColumn(menu.colField)">
|
|
5066
|
+
<button class="menu-item" role="menuitem" (click)="contextMenuHideColumn(menu.colField)">
|
|
4134
5067
|
<span class="menu-icon">👁️</span> Hide Column
|
|
4135
5068
|
</button>
|
|
4136
5069
|
<div class="menu-divider"></div>
|
|
4137
|
-
<button
|
|
5070
|
+
<button
|
|
5071
|
+
class="menu-item"
|
|
5072
|
+
role="menuitem"
|
|
5073
|
+
[disabled]="filterStates().size === 0"
|
|
5074
|
+
(click)="contextMenuClearFilters()"
|
|
5075
|
+
>
|
|
4138
5076
|
<span class="menu-icon">🧹</span> Clear All Filters
|
|
4139
5077
|
</button>
|
|
4140
5078
|
<div class="menu-divider"></div>
|
|
4141
|
-
<button class="menu-item" (click)="exportToJson();
|
|
5079
|
+
<button class="menu-item" role="menuitem" (click)="exportToJson(); closeContextMenu()">
|
|
4142
5080
|
<span class="menu-icon">📄</span> Export to JSON
|
|
4143
5081
|
</button>
|
|
4144
|
-
<button class="menu-item" (click)="exportToCsv();
|
|
5082
|
+
<button class="menu-item" role="menuitem" (click)="exportToCsv(); closeContextMenu()">
|
|
4145
5083
|
<span class="menu-icon">📊</span> Export to CSV
|
|
4146
5084
|
</button>
|
|
4147
|
-
<button class="menu-item" (click)="exportToExcel();
|
|
5085
|
+
<button class="menu-item" role="menuitem" (click)="exportToExcel(); closeContextMenu()">
|
|
4148
5086
|
<span class="menu-icon">📈</span> Export to Excel
|
|
4149
5087
|
</button>
|
|
4150
|
-
<button class="menu-item" (click)="exportToPdf();
|
|
5088
|
+
<button class="menu-item" role="menuitem" (click)="exportToPdf(); closeContextMenu()">
|
|
4151
5089
|
<span class="menu-icon">📕</span> Export to PDF
|
|
4152
5090
|
</button>
|
|
4153
5091
|
</div>
|
|
@@ -4159,25 +5097,28 @@ class DataGridComponent {
|
|
|
4159
5097
|
<!-- Advanced Filter Builder Overlay -->
|
|
4160
5098
|
@if (isFilterBuilderOpen()) {
|
|
4161
5099
|
<ngx-grid-filter-builder
|
|
5100
|
+
[gridInstanceId]="instanceId"
|
|
4162
5101
|
[columns]="$any(columns())"
|
|
4163
5102
|
[expression]="internalFilterExpression()"
|
|
4164
5103
|
(expressionChange)="onFilterExpressionChange($event)"
|
|
4165
|
-
(close)="
|
|
5104
|
+
(close)="closeFilterBuilder()"
|
|
4166
5105
|
/>
|
|
4167
5106
|
}
|
|
4168
5107
|
</div>
|
|
4169
|
-
`, isInline: true, styles: [":host{display:block}.grid-table-wrap::-webkit-scrollbar,.checklist-scroll::-webkit-scrollbar{width:6px;height:6px}.grid-table-wrap::-webkit-scrollbar-track,.checklist-scroll::-webkit-scrollbar-track{background:transparent}.grid-table-wrap::-webkit-scrollbar-thumb,.checklist-scroll::-webkit-scrollbar-thumb{background:#64748b33;border-radius:99px}.grid-table-wrap::-webkit-scrollbar-thumb:hover,.checklist-scroll::-webkit-scrollbar-thumb:hover{background:#64748b66}.ngx-data-grid{position:relative;font-family:inherit;border:1px solid var(--ngx-grid-border, #e2e8f0);border-radius:var(--ngx-grid-radius, 12px);overflow:hidden;background:var(--ngx-grid-bg, #ffffff);box-shadow:0 10px 15px -3px #00000008,0 4px 6px -4px #00000008,0 0 0 1px #00000005;transition:background-color .3s,border-color .3s,box-shadow .3s}.grid-toolbar{display:flex;justify-content:space-between;align-items:center;padding:14px 18px;background:var(--ngx-grid-header-bg, #f8fafc);border-bottom:1px solid var(--ngx-grid-border, #e2e8f0);flex-wrap:wrap;gap:12px}.grid-toolbar-title{font-family:var(--ngx-heading-font-family, \"Outfit\", sans-serif);font-weight:700;font-size:15px;color:var(--ngx-grid-text, #0f172a);letter-spacing:-.01em}.grid-toolbar-actions{display:flex;gap:8px}.grid-action-btn{padding:6px 14px;border:1px solid var(--ngx-grid-border, #e2e8f0);border-radius:8px;background:var(--ngx-grid-bg, #ffffff);color:var(--ngx-grid-text, #0f172a);font-size:12px;font-weight:600;cursor:pointer;font-family:inherit;transition:all .2s cubic-bezier(.4,0,.2,1);outline:none;display:inline-flex;align-items:center;gap:6px}.grid-action-btn:hover{background:var(--ngx-grid-hover-bg, #f8fafc);border-color:var(--ngx-input-focus, #4f46e5);color:var(--ngx-input-focus, #4f46e5);box-shadow:0 4px 6px -1px #4f46e514;transform:translateY(-.5px)}.grid-action-btn:active{transform:scale(.97)}.grid-table-wrap{overflow-x:auto;overflow-y:hidden}.grid-table{width:100%;border-collapse:collapse;font-size:13px;table-layout:fixed}.ngx-data-grid.compact .grid-td{padding:7px 12px;font-size:12px}.ngx-data-grid.compact .grid-th{padding:9px 12px;font-size:10px}.ngx-data-grid.compact .grid-grouping-panel,.ngx-data-grid.compact .grid-toolbar{padding:8px 14px}.clear-filters-btn{border-color:#ef444440!important;background:#ef44440d!important;color:#ef4444!important;font-weight:600}.clear-filters-btn:hover{background:#ef4444!important;color:#fff!important;border-color:transparent!important}.grid-th{position:sticky;top:0;z-index:10;padding:14px 18px;text-align:left;font-size:11px;font-weight:750;color:var(--ngx-grid-text-secondary, #64748b);background:var(--ngx-grid-header-bg, #f8fafc);border-bottom:2px solid var(--ngx-grid-border, #e2e8f0);white-space:nowrap;-webkit-user-select:none;user-select:none;text-transform:uppercase;letter-spacing:.06em;font-family:var(--ngx-heading-font-family, \"Outfit\", sans-serif);transition:background-color .2s ease}.grid-category-th{text-align:center;border-bottom:1px solid var(--ngx-grid-border, #e2e8f0);border-right:1px solid var(--ngx-grid-border, #e2e8f0)}.sub-header-row .grid-th{border-bottom:2px solid var(--ngx-grid-border, #e2e8f0);border-right:1px solid var(--ngx-grid-border, #f1f5f9)}.grid-th.sortable{cursor:pointer}.grid-th.sortable:hover{background:var(--ngx-grid-hover-bg, #f1f5f9);color:var(--ngx-grid-text, #0f172a)}.grid-th.sort-asc,.grid-th.sort-desc{color:var(--ngx-input-focus, #4f46e5);background:#4f46e505}.th-text{margin-right:4px}.sort-icon{font-size:10px;color:#cbd5e1;transition:color .2s ease}.sort-asc .sort-icon,.sort-desc .sort-icon{color:var(--ngx-input-focus, #4f46e5)}.th-content-wrapper{display:flex;align-items:center;justify-content:space-between;gap:6px;width:100%}.grid-filter-btn{background:transparent;border:none;color:var(--ngx-grid-text-secondary, #94a3b8);cursor:pointer;padding:4px;border-radius:6px;display:flex;align-items:center;justify-content:center;transition:all .2s}.grid-filter-btn:hover{background:var(--ngx-grid-hover-bg, #cbd5e1);color:var(--ngx-grid-text, #0f172a)}.grid-filter-btn.active{color:var(--ngx-input-focus, #4f46e5);background:#4f46e51a}.grid-resize-handle{position:absolute;right:0;top:0;bottom:0;width:6px;cursor:col-resize;background:transparent;z-index:10;transition:background-color .2s}.grid-resize-handle:hover,.grid-resize-handle.resizing{background:var(--ngx-input-focus, #4f46e5)}.grid-filter-popover,.grid-column-chooser-popover,.grid-context-menu{position:absolute;width:250px;background:var(--ngx-grid-bg-glass, rgba(255, 255, 255, .8));backdrop-filter:blur(16px) saturate(180%);-webkit-backdrop-filter:blur(16px) saturate(180%);border:1px solid rgba(255,255,255,.5);border-radius:14px;box-shadow:0 20px 25px -5px #00000014,0 10px 10px -5px #0000000a,0 0 0 1px #00000005;z-index:1000;padding:12px;box-sizing:border-box;display:flex;flex-direction:column;gap:12px;font-family:inherit;animation:popoverFadeIn .2s cubic-bezier(.16,1,.3,1) forwards;transform-origin:top center}.grid-context-menu{width:190px;padding:6px;gap:2px}@keyframes popoverFadeIn{0%{opacity:0;transform:scale(.95) translateY(-5px)}to{opacity:1;transform:scale(1) translateY(0)}}.checklist-search{padding:8px 12px;border:1px solid var(--ngx-grid-border, #cbd5e1);border-radius:8px;font-size:12px;font-family:inherit;outline:none;background:var(--ngx-input-bg, #ffffff);color:var(--ngx-grid-text, #0f172a);width:100%;box-sizing:border-box;margin-bottom:4px;transition:all .2s ease}.checklist-search:focus{border-color:var(--ngx-input-focus, #4f46e5);box-shadow:0 0 0 3px var(--primary-glow, rgba(79, 70, 229, .15))}.pinning-section{border-bottom:1px solid var(--ngx-grid-border, #e2e8f0);padding-bottom:10px}.pinning-actions{display:flex;gap:6px}.pin-btn{flex:1;padding:6px 4px;border:1px solid var(--ngx-grid-border, #cbd5e1);border-radius:6px;background:var(--ngx-input-bg, #ffffff);color:var(--ngx-grid-text, #0f172a);font-size:11px;font-weight:600;cursor:pointer;text-align:center;transition:all .15s ease;outline:none}.pin-btn:hover{border-color:var(--ngx-input-focus, #4f46e5);color:var(--ngx-input-focus, #4f46e5);background:#4f46e505}.pin-btn.active{border-color:var(--ngx-btn-primary-bg, #4f46e5);background:var(--ngx-btn-primary-bg, #4f46e5);color:#fff;box-shadow:0 2px 4px #4f46e526}.popover-section{display:flex;flex-direction:column;gap:6px}.popover-label{font-size:10px;font-weight:800;color:var(--ngx-grid-text-secondary, #64748b);text-transform:uppercase;letter-spacing:.06em}.text-filter-row{display:flex;flex-direction:column;gap:6px}.popover-select{padding:6px 10px;border:1px solid var(--ngx-grid-border, #cbd5e1);border-radius:8px;font-size:12px;font-family:inherit;outline:none;background:var(--ngx-input-bg, #ffffff);color:var(--ngx-grid-text, #0f172a);cursor:pointer}.popover-input{padding:6px 10px;border:1px solid var(--ngx-grid-border, #cbd5e1);border-radius:8px;font-size:12px;font-family:inherit;outline:none;background:var(--ngx-input-bg, #ffffff);color:var(--ngx-grid-text, #0f172a);transition:all .2s}.popover-input:focus{border-color:var(--ngx-input-focus, #4f46e5);box-shadow:0 0 0 3px var(--primary-glow, rgba(79, 70, 229, .15))}.checklist-section{border-top:1px solid var(--ngx-grid-border, #e2e8f0);padding-top:10px}.checklist-scroll{max-height:140px;overflow-y:auto;display:flex;flex-direction:column;gap:4px;border:1px solid var(--ngx-grid-border, #e2e8f0);border-radius:8px;padding:8px;background:#ffffff73}.checklist-item{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--ngx-grid-text, #0f172a);cursor:pointer;-webkit-user-select:none;user-select:none}.popover-footer{display:flex;justify-content:space-between;align-items:center;border-top:1px solid var(--ngx-grid-border, #e2e8f0);padding-top:10px;margin-top:4px}.footer-actions{display:flex;gap:6px}.popover-btn{padding:5px 12px;font-size:11px;font-weight:600;border-radius:6px;cursor:pointer;border:1px solid var(--ngx-grid-border, #cbd5e1);background:var(--ngx-grid-bg, #ffffff);color:var(--ngx-grid-text, #0f172a);transition:all .2s ease;font-family:inherit}.popover-btn:hover{background:var(--ngx-grid-hover-bg, #f8fafc);border-color:var(--ngx-input-border, #cbd5e1)}.popover-btn.apply{background:var(--ngx-btn-primary-bg, #4f46e5);color:#fff;border-color:var(--ngx-btn-primary-bg, #4f46e5)}.popover-btn.apply:hover{background:var(--ngx-btn-primary-hover, #4338ca);border-color:var(--ngx-btn-primary-hover, #4338ca);box-shadow:0 4px 6px -1px #4f46e533}.popover-btn.clear{color:#ef4444;border-color:transparent;background:transparent}.popover-btn.clear:hover{background:#fef2f2}.grid-group-row td{background:var(--ngx-grid-header-bg, #f8fafc);border-bottom:1.5px solid var(--ngx-grid-border, #e2e8f0);color:var(--ngx-grid-text, #0f172a);font-size:12px;font-weight:600;padding:12px 18px;cursor:pointer}.group-toggle{border:none;background:transparent;margin-right:6px;cursor:pointer;color:var(--ngx-grid-text-secondary, #64748b);font-size:12px;transition:transform .2s ease}.group-count{color:var(--ngx-grid-text-secondary, #64748b);margin-left:6px;font-weight:500}.grid-row{border-bottom:1px solid var(--ngx-grid-border, #f1f5f9);transition:background-color .15s ease}.grid-row:hover{background:var(--ngx-grid-hover-bg, #f5f3ff)!important}.grid-row.selected{background:var(--ngx-grid-selected-bg, #e0e7ff)!important}.grid-row.selected:hover{background:var(--ngx-grid-selected-bg-hover, #c7d2fe)!important}.grid-table.striped .grid-row:nth-child(2n){background:var(--ngx-grid-stripe-bg, #f8fafc)}.grid-table.striped .grid-row:nth-child(2n):hover{background:var(--ngx-grid-hover-bg, #f5f3ff)!important}.grid-table.striped .grid-row.selected{background:var(--ngx-grid-selected-bg, #e0e7ff)!important}.grid-td{padding:12px 18px;color:var(--ngx-grid-text, #0f172a);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:middle;box-sizing:border-box}.grid-th-check,.grid-td-check,.grid-th-toggle,.grid-td-toggle,.grid-td-reorder,.grid-th-reorder{width:44px!important;text-align:center;padding:0!important;text-overflow:clip!important}.toggle-btn{border:none;background:transparent;color:var(--ngx-grid-text-secondary, #64748b);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:6px;transition:all .2s cubic-bezier(.4,0,.2,1);outline:none}.toggle-btn:hover{background:var(--ngx-grid-hover-bg, #f1f5f9);color:var(--ngx-input-focus, #4f46e5)}.toggle-btn .chevron-icon{transition:transform .25s cubic-bezier(.4,0,.2,1)}.toggle-btn.expanded .chevron-icon{transform:rotate(90deg);color:var(--ngx-input-focus, #4f46e5)}.grid-detail-row{background:var(--ngx-grid-bg, #ffffff)}.grid-detail-cell{padding:0!important;border-bottom:1px solid var(--ngx-grid-border, #e2e8f0);white-space:normal}.detail-wrapper{max-height:0;opacity:0;overflow:hidden;padding:0 24px;transition:max-height .3s cubic-bezier(.4,0,.2,1),opacity .25s ease-out,padding .3s cubic-bezier(.4,0,.2,1);box-sizing:border-box}.detail-wrapper.expanded{max-height:800px;opacity:1;padding:16px 24px 20px}.grid-edit-input{width:100%;min-width:80px;padding:6px 10px;border:1px solid var(--ngx-grid-border, #cbd5e1);border-radius:8px;font-size:12px;font-family:inherit;background:var(--ngx-input-bg, #ffffff);color:var(--ngx-grid-text, #0f172a);box-sizing:border-box;outline:none;transition:border-color .2s,box-shadow .2s}.grid-edit-input:focus{border-color:var(--ngx-input-focus, #4f46e5);box-shadow:0 0 0 3px var(--primary-glow, rgba(79, 70, 229, .15))}.grid-actions{white-space:nowrap}.action-btn{border:1px solid var(--ngx-grid-border, #cbd5e1);background:var(--ngx-grid-bg, #ffffff);color:var(--ngx-grid-text, #0f172a);border-radius:8px;padding:6px 12px;font-size:12px;font-weight:600;margin-right:6px;cursor:pointer;transition:all .2s;outline:none}.action-btn:hover{background:var(--ngx-grid-hover-bg, #f8fafc);border-color:var(--ngx-input-border, #cbd5e1)}.action-btn.save{border-color:var(--ngx-btn-primary-bg, #4f46e5);background:var(--ngx-btn-primary-bg, #4f46e5);color:#fff}.action-btn.save:hover{background:var(--ngx-btn-primary-hover, #4338ca);border-color:var(--ngx-btn-primary-hover, #4338ca);box-shadow:0 4px 6px -1px #4f46e533}.action-btn:last-child{margin-right:0}.grid-loading-cell,.grid-empty-cell{padding:48px;text-align:center;color:var(--ngx-grid-text-secondary, #64748b);font-weight:500}.grid-spinner{width:28px;height:28px;border:3.5px solid var(--ngx-grid-border, #e2e8f0);border-top-color:var(--ngx-btn-primary-bg, #4f46e5);border-radius:50%;animation:spin .8s cubic-bezier(.4,0,.2,1) infinite;margin:0 auto}@keyframes spin{to{transform:rotate(360deg)}}.grid-pagination{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;border-top:1px solid var(--ngx-grid-border, #e2e8f0);background:var(--ngx-grid-header-bg, #f8fafc);flex-wrap:wrap;gap:16px}.pagination-left{display:flex;align-items:center;gap:20px;flex-wrap:wrap}.page-info{font-size:13px;color:var(--ngx-grid-text-secondary, #64748b);font-weight:500}.page-info-highlight{color:var(--ngx-grid-text, #0f172a);font-weight:600}.page-size-selector{display:flex;align-items:center;gap:8px}.page-size-label{font-size:12px;color:var(--ngx-grid-text-secondary, #64748b);font-weight:500}.page-size-select{padding:4px 28px 4px 10px;border:1px solid var(--ngx-grid-border, #cbd5e1);border-radius:6px;font-size:12px;font-weight:600;background:var(--ngx-grid-bg, #ffffff);color:var(--ngx-grid-text, #0f172a);cursor:pointer;outline:none;transition:all .2s;appearance:none;-webkit-appearance:none;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E\");background-repeat:no-repeat;background-position:right 8px center;background-size:12px}.page-size-select:hover{border-color:var(--ngx-input-border-hover, #94a3b8)}.page-size-select:focus{border-color:var(--ngx-input-focus, #4f46e5);box-shadow:0 0 0 3px var(--primary-glow, rgba(79, 70, 229, .15))}.page-btns{display:flex;align-items:center;gap:6px}.page-numbers{display:flex;gap:4px}.page-btn{min-width:32px;height:32px;padding:0 8px;font-size:13px;font-weight:600;border:1px solid var(--ngx-grid-border, #e2e8f0);background:var(--ngx-grid-bg, #ffffff);border-radius:8px;cursor:pointer;font-family:inherit;color:var(--ngx-grid-text, #0f172a);transition:all .2s cubic-bezier(.4,0,.2,1);outline:none;display:inline-flex;align-items:center;justify-content:center}.page-btn.ctrl{color:var(--ngx-grid-text-secondary, #64748b);background:var(--ngx-grid-bg, #ffffff)}.page-btn:hover:not(:disabled){background:var(--ngx-grid-hover-bg, #f1f5f9);border-color:var(--ngx-input-border-hover, #cbd5e1);color:var(--ngx-input-focus, #4f46e5);transform:translateY(-.5px)}.page-btn.active{background:var(--ngx-btn-primary-bg, #4f46e5);color:#fff!important;border-color:var(--ngx-btn-primary-bg, #4f46e5);box-shadow:0 4px 6px -1px #4f46e540}.page-btn:disabled{opacity:.35;cursor:not-allowed;transform:none!important}.grid-footer-row td{background:var(--ngx-grid-header-bg, #f8fafc);border-top:2px solid var(--ngx-grid-border, #e2e8f0);font-size:12px;padding:12px 18px;color:var(--ngx-grid-text, #0f172a)}.agg-label{font-size:10px;font-weight:800;color:var(--ngx-grid-text-secondary, #64748b);text-transform:uppercase;letter-spacing:.05em}.agg-value{font-weight:700;color:var(--ngx-input-focus, #4f46e5)}.pinned-left{position:sticky!important;z-index:5;background:var(--ngx-grid-bg, #ffffff)}th.pinned-left{position:sticky!important;top:0;z-index:30!important;background:var(--ngx-grid-header-bg, #f8fafc)!important}.sticky-toggle{position:sticky!important;left:0;z-index:5;background:var(--ngx-grid-bg, #ffffff)}th.sticky-toggle{position:sticky!important;top:0;z-index:30!important;background:var(--ngx-grid-header-bg, #f8fafc)!important}.sticky-check{position:sticky!important;z-index:5;background:var(--ngx-grid-bg, #ffffff)}th.sticky-check{position:sticky!important;top:0;z-index:30!important;background:var(--ngx-grid-header-bg, #f8fafc)!important}.pinned-left-last,.sticky-toggle-last,.sticky-check-last{border-right:1px solid var(--ngx-grid-border, #cbd5e1)!important;box-shadow:4px 0 10px -3px #00000014}.grid-table.striped .grid-row:nth-child(2n) .pinned-left,.grid-table.striped .grid-row:nth-child(2n) .sticky-toggle,.grid-table.striped .grid-row:nth-child(2n) .sticky-check{background:var(--ngx-grid-stripe-bg, #f8fafc)}.grid-row:hover .pinned-left,.grid-row:hover .sticky-toggle,.grid-row:hover .sticky-check{background:var(--ngx-grid-hover-bg, #f5f3ff)!important}.grid-row.selected .pinned-left,.grid-row.selected .sticky-toggle,.grid-row.selected .sticky-check{background:var(--ngx-grid-selected-bg, #e0e7ff)!important}.grid-footer-row .pinned-left,.grid-footer-row .sticky-toggle,.grid-footer-row .sticky-check{background:var(--ngx-grid-header-bg, #f8fafc)}.pinned-right{position:sticky!important;z-index:5;background:var(--ngx-grid-bg, #ffffff)}th.pinned-right{position:sticky!important;top:0;z-index:30!important;background:var(--ngx-grid-header-bg, #f8fafc)!important}.pinned-right-first{border-left:1px solid var(--ngx-grid-border, #cbd5e1)!important;box-shadow:-4px 0 10px -3px #00000014}.grid-table.striped .grid-row:nth-child(2n) .pinned-right{background:var(--ngx-grid-stripe-bg, #f8fafc)}.grid-row:hover .pinned-right{background:var(--ngx-grid-hover-bg, #f5f3ff)!important}.grid-row.selected .pinned-right{background:var(--ngx-grid-selected-bg, #e0e7ff)!important}.grid-footer-row .pinned-right{background:var(--ngx-grid-header-bg, #f8fafc)}.grid-td.cell-focused{outline:2px solid var(--ngx-input-focus, #4f46e5)!important;outline-offset:-2px;z-index:5}.grid-td.cell-focused-editing{padding:0!important}.grid-td.cell-focused-editing .grid-edit-input{width:100%;height:100%;border:none;outline:none;padding:12px 18px;box-sizing:border-box;background:var(--ngx-grid-bg, #ffffff);color:var(--ngx-grid-text, #0f172a);font-family:inherit;font-size:inherit;border-radius:0}.grid-th[draggable=true]{cursor:grab}.grid-th[draggable=true]:active{cursor:grabbing}.grid-th.dragging{opacity:.4;background:var(--ngx-grid-hover-bg, #f1f5f9)!important;border:1.5px dashed var(--ngx-input-border, #cbd5e1)}.grid-th.drag-over{border-left:3px solid var(--ngx-input-focus, #4f46e5)!important}.sort-icon.active{color:var(--ngx-input-focus, #4f46e5);font-weight:700}.sort-order-badge{font-size:8px;line-height:1;background:var(--ngx-input-focus, #4f46e5);color:#fff;padding:2px 4px;border-radius:4px;vertical-align:super;margin-left:2px;font-weight:700}.grid-search-wrap{position:relative;display:inline-flex;align-items:center}.grid-search-input{padding:6px 30px 6px 12px;border:1px solid var(--ngx-grid-border, #cbd5e1);border-radius:8px;font-size:13px;font-family:inherit;background:var(--ngx-input-bg, #ffffff);color:var(--ngx-grid-text, #0f172a);outline:none;transition:all .2s cubic-bezier(.4,0,.2,1);width:180px}.grid-search-input:focus{border-color:var(--ngx-input-focus, #4f46e5);box-shadow:0 0 0 3px var(--primary-glow, rgba(79, 70, 229, .15));width:220px}.grid-search-clear{position:absolute;right:8px;background:transparent;border:none;color:var(--ngx-grid-text-secondary, #94a3b8);font-size:16px;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:2px;line-height:1}.grid-search-clear:hover{color:var(--ngx-grid-text, #0f172a)}.search-highlight{background-color:#fbbf2440;color:inherit;font-weight:600;padding:1px 2px;border-radius:4px}.grid-td.cell-selected{background:var(--ngx-grid-cell-selected-bg, rgba(79, 70, 229, .1))!important;outline:1.5px solid var(--ngx-grid-cell-selected-border, #4f46e5);outline-offset:-1.5px}.row-drag-handle{cursor:grab;-webkit-user-select:none;user-select:none;color:var(--ngx-grid-text-secondary, #94a3b8);display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:6px;padding:0;transition:all .2s ease}.row-drag-handle:hover{color:var(--ngx-input-focus, #4f46e5);background:var(--ngx-grid-hover-bg, #f1f5f9);transform:scale(1.1)}.row-drag-handle:active{cursor:grabbing;transform:scale(.95)}.grid-row{transition:background-color .15s ease,opacity .2s ease,transform .28s cubic-bezier(.2,.8,.2,1)}.grid-row.dragging-row td{opacity:.35;background:var(--ngx-grid-hover-bg, rgba(79, 70, 229, .04))!important;color:var(--ngx-grid-text-secondary, #94a3b8);transition:opacity .2s ease}.grid-row.drag-over-row td{border-top:2.5px solid var(--ngx-btn-primary-bg, #4f46e5)!important;background:#4f46e508!important;box-shadow:inset 0 2px 4px #4f46e50d}.grid-context-menu{position:absolute;width:215px;background:var(--ngx-grid-bg, rgba(255, 255, 255, .95));backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);border:1px solid var(--ngx-grid-border, #e2e8f0);border-radius:10px;box-shadow:0 10px 25px -5px #0000001a,0 8px 10px -6px #0000001a;z-index:2000;padding:6px;box-sizing:border-box;display:flex;flex-direction:column;gap:2px;font-family:inherit}.menu-item{display:flex;align-items:center;gap:8px;padding:8px 10px;border:none;background:transparent;color:var(--ngx-grid-text, #0f172a);font-size:12px;font-weight:500;cursor:pointer;text-align:left;border-radius:6px;transition:all .15s ease;font-family:inherit;width:100%;box-sizing:border-box;outline:none}.menu-item:hover:not(:disabled){background:var(--ngx-grid-hover-bg, #f1f5f9);color:var(--ngx-btn-primary-bg, #4f46e5)}.menu-item:disabled{opacity:.4;cursor:not-allowed}.menu-icon{font-size:14px;width:16px;text-align:center}.menu-divider{height:1px;background:var(--ngx-grid-border, #e2e8f0);margin:4px 6px}.grid-th-check input[type=checkbox],.grid-td-check input[type=checkbox],.checklist-item input[type=checkbox]{appearance:none;-webkit-appearance:none;width:16px;height:16px;border:1.5px solid var(--ngx-grid-border, #cbd5e1);border-radius:4px;outline:none;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;background:var(--ngx-grid-bg, #ffffff);transition:all .2s ease;margin:0;position:relative}.grid-th-check input[type=checkbox]:hover,.grid-td-check input[type=checkbox]:hover,.checklist-item input[type=checkbox]:hover{border-color:var(--ngx-input-focus, #4f46e5);box-shadow:0 0 0 2.5px #4f46e526}.grid-th-check input[type=checkbox]:checked,.grid-td-check input[type=checkbox]:checked,.checklist-item input[type=checkbox]:checked{background:var(--ngx-btn-primary-bg, #4f46e5);border-color:var(--ngx-btn-primary-bg, #4f46e5)}.grid-th-check input[type=checkbox]:checked:after,.grid-td-check input[type=checkbox]:checked:after,.checklist-item input[type=checkbox]:checked:after{content:\"\";display:block;width:4px;height:8px;border:solid #ffffff;border-width:0 2px 2px 0;transform:rotate(45deg);margin-bottom:2px}.grid-th-check input[type=checkbox]:indeterminate{background:var(--ngx-btn-primary-bg, #4f46e5);border-color:var(--ngx-btn-primary-bg, #4f46e5)}.grid-th-check input[type=checkbox]:indeterminate:after{content:\"\";display:block;width:8px;height:2px;background:#fff}.grid-grouping-panel{display:flex;align-items:center;padding:10px 16px;background:var(--ngx-grid-header-bg, #f8fafc);border:1.5px dashed var(--ngx-grid-border, #cbd5e1);border-radius:10px;margin-bottom:12px;font-size:12px;color:var(--ngx-grid-text-secondary, #64748b);transition:all .2s cubic-bezier(.4,0,.2,1);min-height:44px;box-sizing:border-box}.grid-grouping-panel.drag-over{background:var(--ngx-grid-hover-bg, rgba(79, 70, 229, .05));border-color:var(--ngx-input-focus, #4f46e5);border-style:solid;color:var(--ngx-input-focus, #4f46e5)}.grouping-panel-label{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.group-chip{display:inline-flex;align-items:center;gap:6px;background:var(--ngx-btn-primary-bg, #4f46e5);color:#fff;padding:3px 10px;border-radius:99px;font-size:11px;font-weight:700;box-shadow:0 2px 4px #4f46e526}.remove-group-btn{background:transparent;border:none;color:#fff;font-size:14px;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;line-height:1;opacity:.8;transition:opacity .15s}.remove-group-btn:hover{opacity:1}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: GridStatusBarComponent, selector: "ngx-grid-status-bar", inputs: ["aggregates", "visible"] }, { kind: "component", type: GridFilterBuilderComponent, selector: "ngx-grid-filter-builder", inputs: ["columns", "expression"], outputs: ["expressionChange", "close"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5108
|
+
`, isInline: true, styles: [":host{display:block}.grid-table-wrap::-webkit-scrollbar,.checklist-scroll::-webkit-scrollbar{width:6px;height:6px}.grid-table-wrap::-webkit-scrollbar-track,.checklist-scroll::-webkit-scrollbar-track{background:transparent}.grid-table-wrap::-webkit-scrollbar-thumb,.checklist-scroll::-webkit-scrollbar-thumb{background:#64748b33;border-radius:99px}.grid-table-wrap::-webkit-scrollbar-thumb:hover,.checklist-scroll::-webkit-scrollbar-thumb:hover{background:#64748b66}.ngx-data-grid{position:relative;font-family:inherit;border:1px solid var(--ngx-grid-border, #e2e8f0);border-radius:var(--ngx-grid-radius, 12px);overflow:hidden;background:var(--ngx-grid-bg, #ffffff);box-shadow:0 10px 15px -3px #00000008,0 4px 6px -4px #00000008,0 0 0 1px #00000005;transition:background-color .3s,border-color .3s,box-shadow .3s}.grid-toolbar{display:flex;justify-content:space-between;align-items:center;padding:14px 18px;background:var(--ngx-grid-header-bg, #f8fafc);border-bottom:1px solid var(--ngx-grid-border, #e2e8f0);flex-wrap:wrap;gap:12px}.grid-toolbar-title{font-family:var(--ngx-heading-font-family, \"Outfit\", sans-serif);font-weight:700;font-size:15px;color:var(--ngx-grid-text, #0f172a);letter-spacing:-.01em}.grid-toolbar-actions{display:flex;gap:8px;flex-wrap:wrap}.grid-action-btn{padding:6px 14px;border:1px solid var(--ngx-grid-border, #e2e8f0);border-radius:8px;background:var(--ngx-grid-bg, #ffffff);color:var(--ngx-grid-text, #0f172a);font-size:12px;font-weight:600;cursor:pointer;font-family:inherit;transition:all .2s cubic-bezier(.4,0,.2,1);outline:none;display:inline-flex;align-items:center;gap:6px}.grid-action-btn,.column-config-btn,.pin-btn,.popover-btn,.grid-search-clear{min-height:44px}.grid-action-btn:focus-visible,.column-config-btn:focus-visible,.pin-btn:focus-visible,.popover-btn:focus-visible,.grid-search-clear:focus-visible,.checklist-item input:focus-visible{outline:3px solid var(--ngx-input-focus, #4f46e5);outline-offset:2px;z-index:1}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.column-config-item,.column-config-actions{display:flex;align-items:center}.column-config-item{justify-content:space-between;gap:8px;border-bottom:1px solid var(--ngx-grid-border, #e2e8f0)}.column-config-actions{gap:2px}.column-config-btn{width:44px;min-width:44px;padding:0;border:0;border-radius:4px;background:transparent;color:var(--ngx-grid-text, #0f172a);cursor:pointer}.column-config-btn:hover:not(:disabled),.column-config-btn[aria-pressed=true]{background:var(--ngx-grid-hover-bg, #e2e8f0);color:var(--ngx-input-focus, #4f46e5)}.column-config-btn:disabled{cursor:not-allowed;opacity:.45}.grid-action-btn:hover{background:var(--ngx-grid-hover-bg, #f8fafc);border-color:var(--ngx-input-focus, #4f46e5);color:var(--ngx-input-focus, #4f46e5);box-shadow:0 4px 6px -1px #4f46e514;transform:translateY(-.5px)}.grid-action-btn:active{transform:scale(.97)}@media (max-width: 600px){.grid-toolbar{align-items:stretch;padding:10px}.grid-toolbar-actions{width:100%}.grid-column-chooser-popover,.grid-filter-popover{max-width:calc(100% - 16px)}}.grid-table-wrap{overflow-x:auto;overflow-y:hidden}.grid-table{width:100%;border-collapse:collapse;font-size:13px;table-layout:fixed}.ngx-data-grid.compact .grid-td{padding:7px 12px;font-size:12px}.ngx-data-grid.compact .grid-th{padding:9px 12px;font-size:10px}.ngx-data-grid.compact .grid-grouping-panel,.ngx-data-grid.compact .grid-toolbar{padding:8px 14px}.clear-filters-btn{border-color:#ef444440!important;background:#ef44440d!important;color:#ef4444!important;font-weight:600}.clear-filters-btn:hover{background:#ef4444!important;color:#fff!important;border-color:transparent!important}.grid-th{position:sticky;top:0;z-index:10;padding:14px 18px;text-align:left;font-size:11px;font-weight:750;color:var(--ngx-grid-text-secondary, #64748b);background:var(--ngx-grid-header-bg, #f8fafc);border-bottom:2px solid var(--ngx-grid-border, #e2e8f0);white-space:nowrap;-webkit-user-select:none;user-select:none;text-transform:uppercase;letter-spacing:.06em;font-family:var(--ngx-heading-font-family, \"Outfit\", sans-serif);transition:background-color .2s ease}.grid-category-th{text-align:center;border-bottom:1px solid var(--ngx-grid-border, #e2e8f0);border-right:1px solid var(--ngx-grid-border, #e2e8f0)}.sub-header-row .grid-th{border-bottom:2px solid var(--ngx-grid-border, #e2e8f0);border-right:1px solid var(--ngx-grid-border, #f1f5f9)}.grid-th.sortable{cursor:pointer}.grid-th.sortable:hover{background:var(--ngx-grid-hover-bg, #f1f5f9);color:var(--ngx-grid-text, #0f172a)}.grid-th.sort-asc,.grid-th.sort-desc{color:var(--ngx-input-focus, #4f46e5);background:#4f46e505}.th-text{margin-right:4px}.sort-icon{font-size:10px;color:#cbd5e1;transition:color .2s ease}.sort-asc .sort-icon,.sort-desc .sort-icon{color:var(--ngx-input-focus, #4f46e5)}.th-content-wrapper{display:flex;align-items:center;justify-content:space-between;gap:6px;width:100%}.grid-filter-btn{background:transparent;border:none;color:var(--ngx-grid-text-secondary, #94a3b8);cursor:pointer;padding:4px;border-radius:6px;display:flex;align-items:center;justify-content:center;transition:all .2s}.grid-filter-btn:hover{background:var(--ngx-grid-hover-bg, #cbd5e1);color:var(--ngx-grid-text, #0f172a)}.grid-filter-btn.active{color:var(--ngx-input-focus, #4f46e5);background:#4f46e51a}.grid-resize-handle{position:absolute;right:0;top:0;bottom:0;width:6px;cursor:col-resize;background:transparent;z-index:10;transition:background-color .2s}.grid-resize-handle:hover,.grid-resize-handle.resizing{background:var(--ngx-input-focus, #4f46e5)}.grid-filter-popover,.grid-column-chooser-popover,.grid-context-menu{position:absolute;width:250px;background:var(--ngx-grid-bg-glass, rgba(255, 255, 255, .8));backdrop-filter:blur(16px) saturate(180%);-webkit-backdrop-filter:blur(16px) saturate(180%);border:1px solid rgba(255,255,255,.5);border-radius:14px;box-shadow:0 20px 25px -5px #00000014,0 10px 10px -5px #0000000a,0 0 0 1px #00000005;z-index:1000;padding:12px;box-sizing:border-box;display:flex;flex-direction:column;gap:12px;font-family:inherit;animation:popoverFadeIn .2s cubic-bezier(.16,1,.3,1) forwards;transform-origin:top center}.grid-column-chooser-popover{width:min(360px,100% - 16px)}.grid-context-menu{width:190px;padding:6px;gap:2px}@keyframes popoverFadeIn{0%{opacity:0;transform:scale(.95) translateY(-5px)}to{opacity:1;transform:scale(1) translateY(0)}}.checklist-search{padding:8px 12px;border:1px solid var(--ngx-grid-border, #cbd5e1);border-radius:8px;font-size:12px;font-family:inherit;outline:none;background:var(--ngx-input-bg, #ffffff);color:var(--ngx-grid-text, #0f172a);width:100%;box-sizing:border-box;margin-bottom:4px;transition:all .2s ease}.checklist-search:focus{border-color:var(--ngx-input-focus, #4f46e5);box-shadow:0 0 0 3px var(--primary-glow, rgba(79, 70, 229, .15))}.pinning-section{border-bottom:1px solid var(--ngx-grid-border, #e2e8f0);padding-bottom:10px}.pinning-actions{display:flex;gap:6px}.pin-btn{flex:1;padding:6px 4px;border:1px solid var(--ngx-grid-border, #cbd5e1);border-radius:6px;background:var(--ngx-input-bg, #ffffff);color:var(--ngx-grid-text, #0f172a);font-size:11px;font-weight:600;cursor:pointer;text-align:center;transition:all .15s ease;outline:none}.pin-btn:hover{border-color:var(--ngx-input-focus, #4f46e5);color:var(--ngx-input-focus, #4f46e5);background:#4f46e505}.pin-btn.active{border-color:var(--ngx-btn-primary-bg, #4f46e5);background:var(--ngx-btn-primary-bg, #4f46e5);color:#fff;box-shadow:0 2px 4px #4f46e526}.popover-section{display:flex;flex-direction:column;gap:6px}.popover-label{font-size:10px;font-weight:800;color:var(--ngx-grid-text-secondary, #64748b);text-transform:uppercase;letter-spacing:.06em}.text-filter-row{display:flex;flex-direction:column;gap:6px}.popover-select{padding:6px 10px;border:1px solid var(--ngx-grid-border, #cbd5e1);border-radius:8px;font-size:12px;font-family:inherit;outline:none;background:var(--ngx-input-bg, #ffffff);color:var(--ngx-grid-text, #0f172a);cursor:pointer}.popover-input{padding:6px 10px;border:1px solid var(--ngx-grid-border, #cbd5e1);border-radius:8px;font-size:12px;font-family:inherit;outline:none;background:var(--ngx-input-bg, #ffffff);color:var(--ngx-grid-text, #0f172a);transition:all .2s}.popover-input:focus{border-color:var(--ngx-input-focus, #4f46e5);box-shadow:0 0 0 3px var(--primary-glow, rgba(79, 70, 229, .15))}.checklist-section{border-top:1px solid var(--ngx-grid-border, #e2e8f0);padding-top:10px}.checklist-scroll{max-height:140px;overflow-y:auto;display:flex;flex-direction:column;gap:4px;border:1px solid var(--ngx-grid-border, #e2e8f0);border-radius:8px;padding:8px;background:#ffffff73}.checklist-item{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--ngx-grid-text, #0f172a);cursor:pointer;-webkit-user-select:none;user-select:none}.popover-footer{display:flex;justify-content:space-between;align-items:center;border-top:1px solid var(--ngx-grid-border, #e2e8f0);padding-top:10px;margin-top:4px}.footer-actions{display:flex;gap:6px}.popover-btn{padding:5px 12px;font-size:11px;font-weight:600;border-radius:6px;cursor:pointer;border:1px solid var(--ngx-grid-border, #cbd5e1);background:var(--ngx-grid-bg, #ffffff);color:var(--ngx-grid-text, #0f172a);transition:all .2s ease;font-family:inherit}.popover-btn:hover{background:var(--ngx-grid-hover-bg, #f8fafc);border-color:var(--ngx-input-border, #cbd5e1)}.popover-btn.apply{background:var(--ngx-btn-primary-bg, #4f46e5);color:#fff;border-color:var(--ngx-btn-primary-bg, #4f46e5)}.popover-btn.apply:hover{background:var(--ngx-btn-primary-hover, #4338ca);border-color:var(--ngx-btn-primary-hover, #4338ca);box-shadow:0 4px 6px -1px #4f46e533}.popover-btn.clear{color:#ef4444;border-color:transparent;background:transparent}.popover-btn.clear:hover{background:#fef2f2}.grid-group-row td{background:var(--ngx-grid-header-bg, #f8fafc);border-bottom:1.5px solid var(--ngx-grid-border, #e2e8f0);color:var(--ngx-grid-text, #0f172a);font-size:12px;font-weight:600;padding:12px 18px;cursor:pointer}.group-toggle{border:none;background:transparent;margin-right:6px;cursor:pointer;color:var(--ngx-grid-text-secondary, #64748b);font-size:12px;transition:transform .2s ease}.group-count{color:var(--ngx-grid-text-secondary, #64748b);margin-left:6px;font-weight:500}.grid-row{border-bottom:1px solid var(--ngx-grid-border, #f1f5f9);transition:background-color .15s ease}.grid-row:hover{background:var(--ngx-grid-hover-bg, #f5f3ff)!important}.grid-row.selected{background:var(--ngx-grid-selected-bg, #e0e7ff)!important}.grid-row.selected:hover{background:var(--ngx-grid-selected-bg-hover, #c7d2fe)!important}.grid-table.striped .grid-row:nth-child(2n){background:var(--ngx-grid-stripe-bg, #f8fafc)}.grid-table.striped .grid-row:nth-child(2n):hover{background:var(--ngx-grid-hover-bg, #f5f3ff)!important}.grid-table.striped .grid-row.selected{background:var(--ngx-grid-selected-bg, #e0e7ff)!important}.grid-td{padding:12px 18px;color:var(--ngx-grid-text, #0f172a);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:middle;box-sizing:border-box}.grid-th-check,.grid-td-check,.grid-th-toggle,.grid-td-toggle,.grid-td-reorder,.grid-th-reorder{width:44px!important;text-align:center;padding:0!important;text-overflow:clip!important}.toggle-btn{border:none;background:transparent;color:var(--ngx-grid-text-secondary, #64748b);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:6px;transition:all .2s cubic-bezier(.4,0,.2,1);outline:none}.toggle-btn:hover{background:var(--ngx-grid-hover-bg, #f1f5f9);color:var(--ngx-input-focus, #4f46e5)}.toggle-btn .chevron-icon{transition:transform .25s cubic-bezier(.4,0,.2,1)}.toggle-btn.expanded .chevron-icon{transform:rotate(90deg);color:var(--ngx-input-focus, #4f46e5)}.grid-detail-row{background:var(--ngx-grid-bg, #ffffff)}.grid-detail-cell{padding:0!important;border-bottom:1px solid var(--ngx-grid-border, #e2e8f0);white-space:normal}.detail-wrapper{max-height:0;opacity:0;overflow:hidden;padding:0 24px;transition:max-height .3s cubic-bezier(.4,0,.2,1),opacity .25s ease-out,padding .3s cubic-bezier(.4,0,.2,1);box-sizing:border-box}.detail-wrapper.expanded{max-height:800px;opacity:1;padding:16px 24px 20px}.grid-edit-input{width:100%;min-width:80px;padding:6px 10px;border:1px solid var(--ngx-grid-border, #cbd5e1);border-radius:8px;font-size:12px;font-family:inherit;background:var(--ngx-input-bg, #ffffff);color:var(--ngx-grid-text, #0f172a);box-sizing:border-box;outline:none;transition:border-color .2s,box-shadow .2s}.grid-edit-input:focus{border-color:var(--ngx-input-focus, #4f46e5);box-shadow:0 0 0 3px var(--primary-glow, rgba(79, 70, 229, .15))}.grid-actions{white-space:nowrap}.action-btn{border:1px solid var(--ngx-grid-border, #cbd5e1);background:var(--ngx-grid-bg, #ffffff);color:var(--ngx-grid-text, #0f172a);border-radius:8px;padding:6px 12px;font-size:12px;font-weight:600;margin-right:6px;cursor:pointer;transition:all .2s;outline:none}.action-btn:hover{background:var(--ngx-grid-hover-bg, #f8fafc);border-color:var(--ngx-input-border, #cbd5e1)}.action-btn.save{border-color:var(--ngx-btn-primary-bg, #4f46e5);background:var(--ngx-btn-primary-bg, #4f46e5);color:#fff}.action-btn.save:hover{background:var(--ngx-btn-primary-hover, #4338ca);border-color:var(--ngx-btn-primary-hover, #4338ca);box-shadow:0 4px 6px -1px #4f46e533}.action-btn:last-child{margin-right:0}.grid-loading-cell,.grid-empty-cell{padding:48px;text-align:center;color:var(--ngx-grid-text-secondary, #64748b);font-weight:500}.grid-spinner{width:28px;height:28px;border:3.5px solid var(--ngx-grid-border, #e2e8f0);border-top-color:var(--ngx-btn-primary-bg, #4f46e5);border-radius:50%;animation:spin .8s cubic-bezier(.4,0,.2,1) infinite;margin:0 auto}@keyframes spin{to{transform:rotate(360deg)}}.grid-pagination{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;border-top:1px solid var(--ngx-grid-border, #e2e8f0);background:var(--ngx-grid-header-bg, #f8fafc);flex-wrap:wrap;gap:16px}.pagination-left{display:flex;align-items:center;gap:20px;flex-wrap:wrap}.page-info{font-size:13px;color:var(--ngx-grid-text-secondary, #64748b);font-weight:500}.page-info-highlight{color:var(--ngx-grid-text, #0f172a);font-weight:600}.page-size-selector{display:flex;align-items:center;gap:8px}.page-size-label{font-size:12px;color:var(--ngx-grid-text-secondary, #64748b);font-weight:500}.page-size-select{padding:4px 28px 4px 10px;border:1px solid var(--ngx-grid-border, #cbd5e1);border-radius:6px;font-size:12px;font-weight:600;background:var(--ngx-grid-bg, #ffffff);color:var(--ngx-grid-text, #0f172a);cursor:pointer;outline:none;transition:all .2s;appearance:none;-webkit-appearance:none;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E\");background-repeat:no-repeat;background-position:right 8px center;background-size:12px}.page-size-select:hover{border-color:var(--ngx-input-border-hover, #94a3b8)}.page-size-select:focus{border-color:var(--ngx-input-focus, #4f46e5);box-shadow:0 0 0 3px var(--primary-glow, rgba(79, 70, 229, .15))}.page-btns{display:flex;align-items:center;gap:6px}.page-numbers{display:flex;gap:4px}.page-btn{min-width:32px;height:32px;padding:0 8px;font-size:13px;font-weight:600;border:1px solid var(--ngx-grid-border, #e2e8f0);background:var(--ngx-grid-bg, #ffffff);border-radius:8px;cursor:pointer;font-family:inherit;color:var(--ngx-grid-text, #0f172a);transition:all .2s cubic-bezier(.4,0,.2,1);outline:none;display:inline-flex;align-items:center;justify-content:center}.page-btn.ctrl{color:var(--ngx-grid-text-secondary, #64748b);background:var(--ngx-grid-bg, #ffffff)}.page-btn:hover:not(:disabled){background:var(--ngx-grid-hover-bg, #f1f5f9);border-color:var(--ngx-input-border-hover, #cbd5e1);color:var(--ngx-input-focus, #4f46e5);transform:translateY(-.5px)}.page-btn.active{background:var(--ngx-btn-primary-bg, #4f46e5);color:#fff!important;border-color:var(--ngx-btn-primary-bg, #4f46e5);box-shadow:0 4px 6px -1px #4f46e540}.page-btn:disabled{opacity:.35;cursor:not-allowed;transform:none!important}.grid-footer-row td{background:var(--ngx-grid-header-bg, #f8fafc);border-top:2px solid var(--ngx-grid-border, #e2e8f0);font-size:12px;padding:12px 18px;color:var(--ngx-grid-text, #0f172a)}.agg-label{font-size:10px;font-weight:800;color:var(--ngx-grid-text-secondary, #64748b);text-transform:uppercase;letter-spacing:.05em}.agg-value{font-weight:700;color:var(--ngx-input-focus, #4f46e5)}.pinned-left{position:sticky!important;z-index:5;background:var(--ngx-grid-bg, #ffffff)}th.pinned-left{position:sticky!important;top:0;z-index:30!important;background:var(--ngx-grid-header-bg, #f8fafc)!important}.sticky-toggle{position:sticky!important;left:0;z-index:5;background:var(--ngx-grid-bg, #ffffff)}th.sticky-toggle{position:sticky!important;top:0;z-index:30!important;background:var(--ngx-grid-header-bg, #f8fafc)!important}.sticky-check{position:sticky!important;z-index:5;background:var(--ngx-grid-bg, #ffffff)}th.sticky-check{position:sticky!important;top:0;z-index:30!important;background:var(--ngx-grid-header-bg, #f8fafc)!important}.pinned-left-last,.sticky-toggle-last,.sticky-check-last{border-right:1px solid var(--ngx-grid-border, #cbd5e1)!important;box-shadow:4px 0 10px -3px #00000014}.grid-table.striped .grid-row:nth-child(2n) .pinned-left,.grid-table.striped .grid-row:nth-child(2n) .sticky-toggle,.grid-table.striped .grid-row:nth-child(2n) .sticky-check{background:var(--ngx-grid-stripe-bg, #f8fafc)}.grid-row:hover .pinned-left,.grid-row:hover .sticky-toggle,.grid-row:hover .sticky-check{background:var(--ngx-grid-hover-bg, #f5f3ff)!important}.grid-row.selected .pinned-left,.grid-row.selected .sticky-toggle,.grid-row.selected .sticky-check{background:var(--ngx-grid-selected-bg, #e0e7ff)!important}.grid-footer-row .pinned-left,.grid-footer-row .sticky-toggle,.grid-footer-row .sticky-check{background:var(--ngx-grid-header-bg, #f8fafc)}.pinned-right{position:sticky!important;z-index:5;background:var(--ngx-grid-bg, #ffffff)}th.pinned-right{position:sticky!important;top:0;z-index:30!important;background:var(--ngx-grid-header-bg, #f8fafc)!important}.pinned-right-first{border-left:1px solid var(--ngx-grid-border, #cbd5e1)!important;box-shadow:-4px 0 10px -3px #00000014}.grid-table.striped .grid-row:nth-child(2n) .pinned-right{background:var(--ngx-grid-stripe-bg, #f8fafc)}.grid-row:hover .pinned-right{background:var(--ngx-grid-hover-bg, #f5f3ff)!important}.grid-row.selected .pinned-right{background:var(--ngx-grid-selected-bg, #e0e7ff)!important}.grid-footer-row .pinned-right{background:var(--ngx-grid-header-bg, #f8fafc)}.grid-td.cell-focused{outline:2px solid var(--ngx-input-focus, #4f46e5)!important;outline-offset:-2px;z-index:5}.grid-td.cell-focused-editing{padding:0!important}.grid-td.cell-focused-editing .grid-edit-input{width:100%;height:100%;border:none;outline:none;padding:12px 18px;box-sizing:border-box;background:var(--ngx-grid-bg, #ffffff);color:var(--ngx-grid-text, #0f172a);font-family:inherit;font-size:inherit;border-radius:0}.grid-th[draggable=true]{cursor:grab}.grid-th[draggable=true]:active{cursor:grabbing}.grid-th.dragging{opacity:.4;background:var(--ngx-grid-hover-bg, #f1f5f9)!important;border:1.5px dashed var(--ngx-input-border, #cbd5e1)}.grid-th.drag-over{border-left:3px solid var(--ngx-input-focus, #4f46e5)!important}.sort-icon.active{color:var(--ngx-input-focus, #4f46e5);font-weight:700}.sort-order-badge{font-size:8px;line-height:1;background:var(--ngx-input-focus, #4f46e5);color:#fff;padding:2px 4px;border-radius:4px;vertical-align:super;margin-left:2px;font-weight:700}.grid-search-wrap{position:relative;display:inline-flex;align-items:center}.grid-search-input{padding:6px 30px 6px 12px;border:1px solid var(--ngx-grid-border, #cbd5e1);border-radius:8px;font-size:13px;font-family:inherit;background:var(--ngx-input-bg, #ffffff);color:var(--ngx-grid-text, #0f172a);outline:none;transition:all .2s cubic-bezier(.4,0,.2,1);width:180px}.grid-search-input:focus{border-color:var(--ngx-input-focus, #4f46e5);box-shadow:0 0 0 3px var(--primary-glow, rgba(79, 70, 229, .15));width:220px}.grid-search-clear{position:absolute;right:8px;background:transparent;border:none;color:var(--ngx-grid-text-secondary, #94a3b8);font-size:16px;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:2px;line-height:1}.grid-search-clear:hover{color:var(--ngx-grid-text, #0f172a)}.search-highlight{background-color:#fbbf2440;color:inherit;font-weight:600;padding:1px 2px;border-radius:4px}.grid-td.cell-selected{background:var(--ngx-grid-cell-selected-bg, rgba(79, 70, 229, .1))!important;outline:1.5px solid var(--ngx-grid-cell-selected-border, #4f46e5);outline-offset:-1.5px}.row-drag-handle{cursor:grab;-webkit-user-select:none;user-select:none;color:var(--ngx-grid-text-secondary, #94a3b8);display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:6px;padding:0;transition:all .2s ease}.row-drag-handle:hover{color:var(--ngx-input-focus, #4f46e5);background:var(--ngx-grid-hover-bg, #f1f5f9);transform:scale(1.1)}.row-drag-handle:active{cursor:grabbing;transform:scale(.95)}.grid-row{transition:background-color .15s ease,opacity .2s ease,transform .28s cubic-bezier(.2,.8,.2,1)}.grid-row.dragging-row td{opacity:.35;background:var(--ngx-grid-hover-bg, rgba(79, 70, 229, .04))!important;color:var(--ngx-grid-text-secondary, #94a3b8);transition:opacity .2s ease}.grid-row.drag-over-row td{border-top:2.5px solid var(--ngx-btn-primary-bg, #4f46e5)!important;background:#4f46e508!important;box-shadow:inset 0 2px 4px #4f46e50d}.grid-context-menu{position:absolute;width:215px;background:var(--ngx-grid-bg, rgba(255, 255, 255, .95));backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);border:1px solid var(--ngx-grid-border, #e2e8f0);border-radius:10px;box-shadow:0 10px 25px -5px #0000001a,0 8px 10px -6px #0000001a;z-index:2000;padding:6px;box-sizing:border-box;display:flex;flex-direction:column;gap:2px;font-family:inherit}.menu-item{display:flex;align-items:center;gap:8px;padding:8px 10px;border:none;background:transparent;color:var(--ngx-grid-text, #0f172a);font-size:12px;font-weight:500;cursor:pointer;text-align:left;border-radius:6px;transition:all .15s ease;font-family:inherit;width:100%;box-sizing:border-box;outline:none}.menu-item:hover:not(:disabled){background:var(--ngx-grid-hover-bg, #f1f5f9);color:var(--ngx-btn-primary-bg, #4f46e5)}.menu-item:disabled{opacity:.4;cursor:not-allowed}.menu-icon{font-size:14px;width:16px;text-align:center}.menu-divider{height:1px;background:var(--ngx-grid-border, #e2e8f0);margin:4px 6px}.grid-th-check input[type=checkbox],.grid-td-check input[type=checkbox],.checklist-item input[type=checkbox]{appearance:none;-webkit-appearance:none;width:16px;height:16px;border:1.5px solid var(--ngx-grid-border, #cbd5e1);border-radius:4px;outline:none;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;background:var(--ngx-grid-bg, #ffffff);transition:all .2s ease;margin:0;position:relative}.grid-th-check input[type=checkbox]:hover,.grid-td-check input[type=checkbox]:hover,.checklist-item input[type=checkbox]:hover{border-color:var(--ngx-input-focus, #4f46e5);box-shadow:0 0 0 2.5px #4f46e526}.grid-th-check input[type=checkbox]:checked,.grid-td-check input[type=checkbox]:checked,.checklist-item input[type=checkbox]:checked{background:var(--ngx-btn-primary-bg, #4f46e5);border-color:var(--ngx-btn-primary-bg, #4f46e5)}.grid-th-check input[type=checkbox]:checked:after,.grid-td-check input[type=checkbox]:checked:after,.checklist-item input[type=checkbox]:checked:after{content:\"\";display:block;width:4px;height:8px;border:solid #ffffff;border-width:0 2px 2px 0;transform:rotate(45deg);margin-bottom:2px}.grid-th-check input[type=checkbox]:indeterminate{background:var(--ngx-btn-primary-bg, #4f46e5);border-color:var(--ngx-btn-primary-bg, #4f46e5)}.grid-th-check input[type=checkbox]:indeterminate:after{content:\"\";display:block;width:8px;height:2px;background:#fff}.grid-grouping-panel{display:flex;align-items:center;padding:10px 16px;background:var(--ngx-grid-header-bg, #f8fafc);border:1.5px dashed var(--ngx-grid-border, #cbd5e1);border-radius:10px;margin-bottom:12px;font-size:12px;color:var(--ngx-grid-text-secondary, #64748b);transition:all .2s cubic-bezier(.4,0,.2,1);min-height:44px;box-sizing:border-box}.grid-grouping-panel.drag-over{background:var(--ngx-grid-hover-bg, rgba(79, 70, 229, .05));border-color:var(--ngx-input-focus, #4f46e5);border-style:solid;color:var(--ngx-input-focus, #4f46e5)}.grouping-panel-label{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.group-chip{display:inline-flex;align-items:center;gap:6px;background:var(--ngx-btn-primary-bg, #4f46e5);color:#fff;padding:3px 10px;border-radius:99px;font-size:11px;font-weight:700;box-shadow:0 2px 4px #4f46e526}.remove-group-btn{background:transparent;border:none;color:#fff;font-size:14px;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;line-height:1;opacity:.8;transition:opacity .15s}.remove-group-btn:hover{opacity:1}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: GridStatusBarComponent, selector: "ngx-grid-status-bar", inputs: ["aggregates", "visible"] }, { kind: "component", type: GridFilterBuilderComponent, selector: "ngx-grid-filter-builder", inputs: ["gridInstanceId", "columns", "expression"], outputs: ["expressionChange", "close"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4170
5109
|
}
|
|
4171
5110
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: DataGridComponent, decorators: [{
|
|
4172
5111
|
type: Component,
|
|
4173
|
-
args: [{ selector: 'ngx-data-grid', standalone: true, imports: [
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
|
|
5112
|
+
args: [{ selector: 'ngx-data-grid', standalone: true, imports: [NgTemplateOutlet, GridStatusBarComponent, GridFilterBuilderComponent], providers: [GridExportXlsxService], changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
5113
|
+
<div
|
|
5114
|
+
class="ngx-data-grid"
|
|
5115
|
+
[class.loading]="loading()"
|
|
5116
|
+
[class.compact]="compact()"
|
|
5117
|
+
role="region"
|
|
5118
|
+
[attr.aria-label]="i18n.grid.dataGrid"
|
|
5119
|
+
[attr.tabindex]="keyboardNavigation() || enableContextMenu() ? 0 : null"
|
|
5120
|
+
>
|
|
5121
|
+
<div class="visually-hidden" aria-live="polite" aria-atomic="true">{{ selectionAnnouncement() }}</div>
|
|
4181
5122
|
|
|
4182
5123
|
@if (showGroupingPanel()) {
|
|
4183
5124
|
<div
|
|
@@ -4189,20 +5130,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4189
5130
|
>
|
|
4190
5131
|
<div class="grouping-panel-label">
|
|
4191
5132
|
@if (internalGroupBy(); as gb) {
|
|
4192
|
-
<span>
|
|
5133
|
+
<span>{{ i18n.grid.groupedBy }}</span>
|
|
4193
5134
|
<span class="group-chip">
|
|
4194
5135
|
{{ getColumnTitle(gb.field) }}
|
|
4195
5136
|
<button class="remove-group-btn" (click)="clearGrouping()">×</button>
|
|
4196
5137
|
</span>
|
|
4197
5138
|
} @else {
|
|
4198
|
-
<span>
|
|
5139
|
+
<span>{{ i18n.grid.groupColumnsHint }}</span>
|
|
4199
5140
|
}
|
|
4200
5141
|
</div>
|
|
4201
5142
|
</div>
|
|
4202
5143
|
}
|
|
4203
5144
|
|
|
4204
|
-
<div class="grid-toolbar">
|
|
4205
|
-
<span class="grid-toolbar-title">
|
|
5145
|
+
<div class="grid-toolbar" role="toolbar" [attr.aria-label]="i18n.grid.toolbar">
|
|
5146
|
+
<span class="grid-toolbar-title">{{ i18n.grid.dataGrid }}</span>
|
|
4206
5147
|
<div class="grid-toolbar-actions">
|
|
4207
5148
|
@if (showGlobalSearch()) {
|
|
4208
5149
|
<div class="grid-search-wrap">
|
|
@@ -4214,28 +5155,97 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4214
5155
|
(input)="searchText.set($any($event.target).value)"
|
|
4215
5156
|
/>
|
|
4216
5157
|
@if (searchText()) {
|
|
4217
|
-
<button
|
|
5158
|
+
<button
|
|
5159
|
+
class="grid-search-clear"
|
|
5160
|
+
(click)="searchText.set('')"
|
|
5161
|
+
[attr.title]="i18n.grid.clearSearch"
|
|
5162
|
+
[attr.aria-label]="i18n.grid.clearSearch"
|
|
5163
|
+
>
|
|
5164
|
+
×
|
|
5165
|
+
</button>
|
|
4218
5166
|
}
|
|
4219
5167
|
</div>
|
|
4220
5168
|
}
|
|
4221
5169
|
@if (activeFilters().length > 0) {
|
|
4222
|
-
<button
|
|
5170
|
+
<button
|
|
5171
|
+
class="grid-action-btn clear-filters-btn"
|
|
5172
|
+
(click)="clearAllFilters()"
|
|
5173
|
+
[attr.title]="i18n.grid.clearFilters"
|
|
5174
|
+
[attr.aria-label]="i18n.grid.clearFilters"
|
|
5175
|
+
>
|
|
5176
|
+
Clear Filters
|
|
5177
|
+
</button>
|
|
4223
5178
|
}
|
|
4224
5179
|
@if (showColumnChooser()) {
|
|
4225
|
-
<button
|
|
5180
|
+
<button
|
|
5181
|
+
class="grid-action-btn"
|
|
5182
|
+
(click)="openColumnChooser($event)"
|
|
5183
|
+
[attr.aria-expanded]="activeColumnChooserPopover() !== null"
|
|
5184
|
+
[attr.aria-controls]="instanceId + '-column-chooser'"
|
|
5185
|
+
[attr.aria-label]="i18n.grid.chooseColumns"
|
|
5186
|
+
type="button"
|
|
5187
|
+
>
|
|
5188
|
+
{{ i18n.grid.chooseColumns }}
|
|
5189
|
+
</button>
|
|
4226
5190
|
}
|
|
4227
5191
|
@if (showFilterBuilder()) {
|
|
4228
|
-
<button
|
|
5192
|
+
<button
|
|
5193
|
+
class="grid-action-btn"
|
|
5194
|
+
type="button"
|
|
5195
|
+
(click)="openFilterBuilder($event)"
|
|
5196
|
+
[attr.aria-haspopup]="'dialog'"
|
|
5197
|
+
[attr.aria-expanded]="isFilterBuilderOpen()"
|
|
5198
|
+
[attr.aria-controls]="instanceId + '-filter-builder'"
|
|
5199
|
+
[attr.title]="i18n.grid.advancedFilterBuilder"
|
|
5200
|
+
[attr.aria-label]="i18n.grid.advancedFilterBuilder"
|
|
5201
|
+
>
|
|
5202
|
+
🔍 Filter
|
|
5203
|
+
</button>
|
|
4229
5204
|
}
|
|
4230
|
-
<button
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
5205
|
+
<button
|
|
5206
|
+
class="grid-action-btn"
|
|
5207
|
+
(click)="exportToJson()"
|
|
5208
|
+
[attr.title]="i18n.grid.exportJson"
|
|
5209
|
+
[attr.aria-label]="i18n.grid.exportJson"
|
|
5210
|
+
>
|
|
5211
|
+
JSON
|
|
5212
|
+
</button>
|
|
5213
|
+
<button
|
|
5214
|
+
class="grid-action-btn"
|
|
5215
|
+
(click)="exportToCsv()"
|
|
5216
|
+
[attr.title]="i18n.grid.exportCsv"
|
|
5217
|
+
[attr.aria-label]="i18n.grid.exportCsv"
|
|
5218
|
+
>
|
|
5219
|
+
CSV
|
|
5220
|
+
</button>
|
|
5221
|
+
<button
|
|
5222
|
+
class="grid-action-btn"
|
|
5223
|
+
(click)="exportToXlsx()"
|
|
5224
|
+
[attr.title]="i18n.grid.exportXlsx"
|
|
5225
|
+
[attr.aria-label]="i18n.grid.exportXlsx"
|
|
5226
|
+
>
|
|
5227
|
+
XLSX
|
|
5228
|
+
</button>
|
|
5229
|
+
<button
|
|
5230
|
+
class="grid-action-btn"
|
|
5231
|
+
(click)="exportToExcel()"
|
|
5232
|
+
[attr.title]="i18n.grid.exportExcel"
|
|
5233
|
+
[attr.aria-label]="i18n.grid.exportExcel"
|
|
5234
|
+
>
|
|
5235
|
+
Excel
|
|
5236
|
+
</button>
|
|
5237
|
+
<button
|
|
5238
|
+
class="grid-action-btn"
|
|
5239
|
+
(click)="exportToPdf()"
|
|
5240
|
+
[attr.title]="i18n.grid.exportPdf"
|
|
5241
|
+
[attr.aria-label]="i18n.grid.exportPdf"
|
|
5242
|
+
>
|
|
5243
|
+
PDF
|
|
5244
|
+
</button>
|
|
4235
5245
|
</div>
|
|
4236
5246
|
</div>
|
|
4237
5247
|
|
|
4238
|
-
<div class="grid-table-wrap" #viewportEl (scroll)="onViewportScroll($event)">
|
|
5248
|
+
<div class="grid-table-wrap" #viewportEl (scroll)="onViewportScroll($event)" [attr.aria-busy]="loading()">
|
|
4239
5249
|
<table class="grid-table" [class.striped]="striped()">
|
|
4240
5250
|
<colgroup>
|
|
4241
5251
|
@if (rowReorderable()) {
|
|
@@ -4258,13 +5268,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4258
5268
|
<ng-template #headerCellContent let-col="col">
|
|
4259
5269
|
<div class="th-content-wrapper">
|
|
4260
5270
|
@if (resolveHeaderTemplate(col); as activeHeaderTemplate) {
|
|
4261
|
-
<ng-container
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
5271
|
+
<ng-container
|
|
5272
|
+
*ngTemplateOutlet="
|
|
5273
|
+
activeHeaderTemplate;
|
|
5274
|
+
context: {
|
|
5275
|
+
$implicit: col,
|
|
5276
|
+
column: col,
|
|
5277
|
+
sort: sortState(),
|
|
5278
|
+
filters: activeFilters(),
|
|
5279
|
+
isServerMode: isAnyServerMode(),
|
|
5280
|
+
}
|
|
5281
|
+
"
|
|
5282
|
+
/>
|
|
4268
5283
|
} @else {
|
|
4269
5284
|
<span class="th-text">{{ col.title }}</span>
|
|
4270
5285
|
@if (col.sortable) {
|
|
@@ -4281,25 +5296,70 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4281
5296
|
}
|
|
4282
5297
|
}
|
|
4283
5298
|
@if (col.filterable) {
|
|
4284
|
-
<button
|
|
4285
|
-
|
|
5299
|
+
<button
|
|
5300
|
+
class="grid-filter-btn"
|
|
5301
|
+
[class.active]="filterStates().has(col.field)"
|
|
5302
|
+
(click)="openFilterPopover($event, col.field); $event.stopPropagation()"
|
|
5303
|
+
[attr.title]="i18n.grid.filterColumn"
|
|
5304
|
+
[attr.aria-label]="i18n.grid.filterColumn"
|
|
5305
|
+
>
|
|
5306
|
+
<svg
|
|
5307
|
+
viewBox="0 0 24 24"
|
|
5308
|
+
width="12"
|
|
5309
|
+
height="12"
|
|
5310
|
+
fill="none"
|
|
5311
|
+
stroke="currentColor"
|
|
5312
|
+
stroke-width="2"
|
|
5313
|
+
stroke-linecap="round"
|
|
5314
|
+
stroke-linejoin="round"
|
|
5315
|
+
>
|
|
4286
5316
|
<polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"></polygon>
|
|
4287
5317
|
</svg>
|
|
4288
5318
|
</button>
|
|
4289
5319
|
}
|
|
4290
5320
|
</div>
|
|
4291
|
-
<div
|
|
5321
|
+
<div
|
|
5322
|
+
class="grid-resize-handle"
|
|
5323
|
+
(mousedown)="onResizeStart($event, col)"
|
|
5324
|
+
(dblclick)="onResizeDoubleClick($event, col)"
|
|
5325
|
+
(click)="$event.stopPropagation()"
|
|
5326
|
+
></div>
|
|
4292
5327
|
</ng-template>
|
|
4293
5328
|
|
|
4294
5329
|
<tr class="grid-header-row">
|
|
4295
5330
|
@if (rowReorderable()) {
|
|
4296
|
-
<th
|
|
5331
|
+
<th
|
|
5332
|
+
class="grid-th grid-th-reorder pinned-left"
|
|
5333
|
+
[class.pinned-left-last]="isRowReorderableLastPinned()"
|
|
5334
|
+
[attr.rowspan]="hasColumnCategories() ? 2 : 1"
|
|
5335
|
+
style="width:44px; left:0px"
|
|
5336
|
+
></th>
|
|
4297
5337
|
}
|
|
4298
5338
|
@if (showDetailToggle()) {
|
|
4299
|
-
<th
|
|
5339
|
+
<th
|
|
5340
|
+
class="grid-th grid-th-toggle pinned-left"
|
|
5341
|
+
[class.pinned-left-last]="isDetailToggleLastPinned()"
|
|
5342
|
+
[attr.rowspan]="hasColumnCategories() ? 2 : 1"
|
|
5343
|
+
[style.left.px]="rowReorderable() ? 44 : 0"
|
|
5344
|
+
style="width:44px"
|
|
5345
|
+
></th>
|
|
4300
5346
|
}
|
|
4301
5347
|
@if (selectable()) {
|
|
4302
|
-
<th
|
|
5348
|
+
<th
|
|
5349
|
+
class="grid-th grid-th-check pinned-left"
|
|
5350
|
+
[class.pinned-left-last]="isSelectableLastPinned()"
|
|
5351
|
+
[attr.rowspan]="hasColumnCategories() ? 2 : 1"
|
|
5352
|
+
[style.left.px]="(rowReorderable() ? 44 : 0) + (showDetailToggle() ? 44 : 0)"
|
|
5353
|
+
style="width:44px"
|
|
5354
|
+
>
|
|
5355
|
+
<input
|
|
5356
|
+
type="checkbox"
|
|
5357
|
+
[attr.aria-label]="allSelected() ? i18n.grid.deselectAll : i18n.grid.selectAll"
|
|
5358
|
+
[checked]="allSelected()"
|
|
5359
|
+
[indeterminate]="someSelected() && !allSelected()"
|
|
5360
|
+
(change)="toggleAll()"
|
|
5361
|
+
/>
|
|
5362
|
+
</th>
|
|
4303
5363
|
}
|
|
4304
5364
|
@for (cell of headerRows().row1; track cell.field) {
|
|
4305
5365
|
@if (cell.isCategory) {
|
|
@@ -4352,7 +5412,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4352
5412
|
[style.right.px]="firstPinnedRightColumnField() !== null ? 0 : null"
|
|
4353
5413
|
[attr.rowspan]="hasColumnCategories() ? 2 : 1"
|
|
4354
5414
|
style="width:120px"
|
|
4355
|
-
>
|
|
5415
|
+
>
|
|
5416
|
+
Actions
|
|
5417
|
+
</th>
|
|
4356
5418
|
}
|
|
4357
5419
|
</tr>
|
|
4358
5420
|
@if (hasColumnCategories()) {
|
|
@@ -4403,13 +5465,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4403
5465
|
<tr class="grid-group-row" (click)="toggleGroup(group.key)">
|
|
4404
5466
|
@if (groupAggregations()) {
|
|
4405
5467
|
@if (rowReorderable()) {
|
|
4406
|
-
<td
|
|
5468
|
+
<td
|
|
5469
|
+
class="grid-td grid-td-reorder pinned-left"
|
|
5470
|
+
[class.pinned-left-last]="isRowReorderableLastPinned()"
|
|
5471
|
+
style="left:0px; width:44px"
|
|
5472
|
+
></td>
|
|
4407
5473
|
}
|
|
4408
5474
|
@if (showDetailToggle()) {
|
|
4409
|
-
<td
|
|
5475
|
+
<td
|
|
5476
|
+
class="grid-td grid-td-toggle pinned-left"
|
|
5477
|
+
[class.pinned-left-last]="isDetailToggleLastPinned()"
|
|
5478
|
+
[style.left.px]="rowReorderable() ? 44 : 0"
|
|
5479
|
+
style="width:44px"
|
|
5480
|
+
></td>
|
|
4410
5481
|
}
|
|
4411
5482
|
@if (selectable()) {
|
|
4412
|
-
<td
|
|
5483
|
+
<td
|
|
5484
|
+
class="grid-td grid-td-check pinned-left"
|
|
5485
|
+
[class.pinned-left-last]="isSelectableLastPinned()"
|
|
5486
|
+
[style.left.px]="(rowReorderable() ? 44 : 0) + (showDetailToggle() ? 44 : 0)"
|
|
5487
|
+
style="width:44px"
|
|
5488
|
+
>
|
|
5489
|
+
<input
|
|
5490
|
+
type="checkbox"
|
|
5491
|
+
[checked]="isGroupAllSelected(group)"
|
|
5492
|
+
(change)="toggleGroupSelection(group, $event)"
|
|
5493
|
+
(click)="$event.stopPropagation()"
|
|
5494
|
+
/>
|
|
5495
|
+
</td>
|
|
4413
5496
|
}
|
|
4414
5497
|
@for (col of orderedColumns(); track col.field; let first = $first) {
|
|
4415
5498
|
<td
|
|
@@ -4417,7 +5500,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4417
5500
|
[class.pinned-left]="col.pinned === 'left'"
|
|
4418
5501
|
[class.pinned-left-last]="col.pinned === 'left' && lastPinnedColumnField() === col.field"
|
|
4419
5502
|
[class.pinned-right]="col.pinned === 'right'"
|
|
4420
|
-
[class.pinned-right-first]="
|
|
5503
|
+
[class.pinned-right-first]="
|
|
5504
|
+
col.pinned === 'right' && firstPinnedRightColumnField() === col.field
|
|
5505
|
+
"
|
|
4421
5506
|
[style.left.px]="col.pinned === 'left' ? columnOffsets()[col.field] : null"
|
|
4422
5507
|
[style.right.px]="col.pinned === 'right' ? columnRightOffsets()[col.field] : null"
|
|
4423
5508
|
[style.text-align]="col.align ?? 'left'"
|
|
@@ -4425,10 +5510,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4425
5510
|
>
|
|
4426
5511
|
@if (first) {
|
|
4427
5512
|
<div style="display: flex; align-items: center; gap: 4px;">
|
|
4428
|
-
<button
|
|
5513
|
+
<button
|
|
5514
|
+
class="group-toggle"
|
|
5515
|
+
type="button"
|
|
5516
|
+
(click)="toggleGroup(group.key); $event.stopPropagation()"
|
|
5517
|
+
style="background: transparent; border: none; cursor: pointer; padding: 0 4px; font-weight: bold; color: inherit; outline: none;"
|
|
5518
|
+
>
|
|
4429
5519
|
{{ isGroupCollapsed(group.key) ? '▸' : '▾' }}
|
|
4430
5520
|
</button>
|
|
4431
|
-
<strong>{{ col.category ? '' : group.field + ': ' }}</strong
|
|
5521
|
+
<strong>{{ col.category ? '' : group.field + ': ' }}</strong
|
|
5522
|
+
>{{ group.value }} <span class="group-count">({{ group.count }})</span>
|
|
4432
5523
|
</div>
|
|
4433
5524
|
} @else if (col.aggregation) {
|
|
4434
5525
|
<span class="agg-label">{{ col.aggregation }}: </span>
|
|
@@ -4445,10 +5536,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4445
5536
|
}
|
|
4446
5537
|
} @else {
|
|
4447
5538
|
<td [attr.colspan]="renderColumnCount()">
|
|
4448
|
-
<button
|
|
5539
|
+
<button
|
|
5540
|
+
class="group-toggle"
|
|
5541
|
+
type="button"
|
|
5542
|
+
(click)="toggleGroup(group.key); $event.stopPropagation()"
|
|
5543
|
+
>
|
|
4449
5544
|
{{ isGroupCollapsed(group.key) ? '▸' : '▾' }}
|
|
4450
5545
|
</button>
|
|
4451
|
-
<strong>{{ group.field }}</strong
|
|
5546
|
+
<strong>{{ group.field }}</strong
|
|
5547
|
+
>: {{ group.value }}
|
|
4452
5548
|
<span class="group-count">({{ group.count }})</span>
|
|
4453
5549
|
</td>
|
|
4454
5550
|
}
|
|
@@ -4468,9 +5564,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4468
5564
|
(dblclick)="editable() ? beginEdit(row, i) : null"
|
|
4469
5565
|
>
|
|
4470
5566
|
@if (rowReorderable()) {
|
|
4471
|
-
<td
|
|
4472
|
-
|
|
4473
|
-
|
|
5567
|
+
<td
|
|
5568
|
+
class="grid-td grid-td-reorder pinned-left"
|
|
5569
|
+
[class.pinned-left-last]="isRowReorderableLastPinned()"
|
|
5570
|
+
style="left:0px; text-align:center; width:44px"
|
|
5571
|
+
>
|
|
5572
|
+
<span
|
|
5573
|
+
class="row-drag-handle"
|
|
5574
|
+
draggable="true"
|
|
5575
|
+
(dragstart)="onRowDragStart($event, i)"
|
|
5576
|
+
(dragend)="onRowDragEnd()"
|
|
5577
|
+
[attr.title]="i18n.grid.dragRowToReorder"
|
|
5578
|
+
[attr.aria-label]="i18n.grid.dragRowToReorder"
|
|
5579
|
+
>
|
|
5580
|
+
<svg
|
|
5581
|
+
viewBox="0 0 24 24"
|
|
5582
|
+
width="16"
|
|
5583
|
+
height="16"
|
|
5584
|
+
fill="none"
|
|
5585
|
+
stroke="currentColor"
|
|
5586
|
+
stroke-width="2.5"
|
|
5587
|
+
stroke-linecap="round"
|
|
5588
|
+
stroke-linejoin="round"
|
|
5589
|
+
style="display: block;"
|
|
5590
|
+
>
|
|
4474
5591
|
<circle cx="9" cy="5" r="1.5"></circle>
|
|
4475
5592
|
<circle cx="9" cy="12" r="1.5"></circle>
|
|
4476
5593
|
<circle cx="9" cy="19" r="1.5"></circle>
|
|
@@ -4483,9 +5600,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4483
5600
|
}
|
|
4484
5601
|
|
|
4485
5602
|
@if (showDetailToggle()) {
|
|
4486
|
-
<td
|
|
4487
|
-
|
|
4488
|
-
|
|
5603
|
+
<td
|
|
5604
|
+
class="grid-td grid-td-toggle pinned-left"
|
|
5605
|
+
[class.pinned-left-last]="isDetailToggleLastPinned()"
|
|
5606
|
+
[style.left.px]="rowReorderable() ? 44 : 0"
|
|
5607
|
+
>
|
|
5608
|
+
<button
|
|
5609
|
+
class="toggle-btn"
|
|
5610
|
+
[class.expanded]="isExpanded(row)"
|
|
5611
|
+
type="button"
|
|
5612
|
+
(click)="toggleDetail(row); $event.stopPropagation()"
|
|
5613
|
+
[attr.title]="i18n.grid.toggleDetails"
|
|
5614
|
+
[attr.aria-label]="i18n.grid.toggleDetails"
|
|
5615
|
+
>
|
|
5616
|
+
<svg
|
|
5617
|
+
viewBox="0 0 24 24"
|
|
5618
|
+
width="12"
|
|
5619
|
+
height="12"
|
|
5620
|
+
fill="none"
|
|
5621
|
+
stroke="currentColor"
|
|
5622
|
+
stroke-width="3.5"
|
|
5623
|
+
stroke-linecap="round"
|
|
5624
|
+
stroke-linejoin="round"
|
|
5625
|
+
class="chevron-icon"
|
|
5626
|
+
>
|
|
4489
5627
|
<polyline points="9 18 15 12 9 6"></polyline>
|
|
4490
5628
|
</svg>
|
|
4491
5629
|
</button>
|
|
@@ -4493,18 +5631,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4493
5631
|
}
|
|
4494
5632
|
|
|
4495
5633
|
@if (selectable()) {
|
|
4496
|
-
<td
|
|
5634
|
+
<td
|
|
5635
|
+
class="grid-td grid-td-check pinned-left"
|
|
5636
|
+
[class.pinned-left-last]="isSelectableLastPinned()"
|
|
5637
|
+
[style.left.px]="(rowReorderable() ? 44 : 0) + (showDetailToggle() ? 44 : 0)"
|
|
5638
|
+
>
|
|
5639
|
+
<input
|
|
5640
|
+
type="checkbox"
|
|
5641
|
+
[attr.aria-label]="i18n.grid.selectRow(rowSelectionKey(row))"
|
|
5642
|
+
[checked]="isRowSelected(row)"
|
|
5643
|
+
(change)="toggleRow(row)"
|
|
5644
|
+
(click)="$event.stopPropagation()"
|
|
5645
|
+
/>
|
|
5646
|
+
</td>
|
|
4497
5647
|
}
|
|
4498
5648
|
|
|
4499
5649
|
@if (rowTemplate()) {
|
|
4500
5650
|
<td class="grid-td" [attr.colspan]="orderedColumns().length + (editable() ? 1 : 0)">
|
|
4501
|
-
<ng-container
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
5651
|
+
<ng-container
|
|
5652
|
+
*ngTemplateOutlet="
|
|
5653
|
+
rowTemplate();
|
|
5654
|
+
context: {
|
|
5655
|
+
$implicit: row,
|
|
5656
|
+
row: row,
|
|
5657
|
+
index: i,
|
|
5658
|
+
editing: isEditing(row),
|
|
5659
|
+
expanded: isExpanded(row),
|
|
5660
|
+
}
|
|
5661
|
+
"
|
|
5662
|
+
/>
|
|
4508
5663
|
</td>
|
|
4509
5664
|
} @else {
|
|
4510
5665
|
@for (col of orderedColumns(); track col.field) {
|
|
@@ -4515,9 +5670,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4515
5670
|
[class.pinned-left]="col.pinned === 'left'"
|
|
4516
5671
|
[class.pinned-left-last]="col.pinned === 'left' && lastPinnedColumnField() === col.field"
|
|
4517
5672
|
[class.pinned-right]="col.pinned === 'right'"
|
|
4518
|
-
[class.pinned-right-first]="
|
|
5673
|
+
[class.pinned-right-first]="
|
|
5674
|
+
col.pinned === 'right' && firstPinnedRightColumnField() === col.field
|
|
5675
|
+
"
|
|
4519
5676
|
[class.cell-focused]="focusedCell()?.row === row && focusedCell()?.colField === col.field"
|
|
4520
|
-
[
|
|
5677
|
+
[attr.tabindex]="
|
|
5678
|
+
keyboardNavigation() || enableContextMenu()
|
|
5679
|
+
? focusedCell()?.row === row && focusedCell()?.colField === col.field
|
|
5680
|
+
? 0
|
|
5681
|
+
: -1
|
|
5682
|
+
: null
|
|
5683
|
+
"
|
|
5684
|
+
[class.cell-focused-editing]="
|
|
5685
|
+
focusedCell()?.row === row &&
|
|
5686
|
+
focusedCell()?.colField === col.field &&
|
|
5687
|
+
focusedCellEditActive()
|
|
5688
|
+
"
|
|
4521
5689
|
[style.left.px]="col.pinned === 'left' ? columnOffsets()[col.field] : null"
|
|
4522
5690
|
[style.right.px]="col.pinned === 'right' ? columnRightOffsets()[col.field] : null"
|
|
4523
5691
|
[style.text-align]="col.align ?? 'left'"
|
|
@@ -4526,20 +5694,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4526
5694
|
(mousedown)="onCellMouseDown($event, row, col.field)"
|
|
4527
5695
|
(mouseenter)="onCellMouseEnter(row, col.field)"
|
|
4528
5696
|
(contextmenu)="onCellContextMenu($event, row, col.field)"
|
|
4529
|
-
(click)="onCellClick(row, col.field)"
|
|
5697
|
+
(click)="onCellClick(row, col.field, $event)"
|
|
4530
5698
|
>
|
|
4531
5699
|
@if (isEditing(row) && editable() && col.editable) {
|
|
4532
5700
|
@if (resolveEditCellTemplate(col); as activeEditTemplate) {
|
|
4533
|
-
<ng-container
|
|
4534
|
-
|
|
4535
|
-
|
|
4536
|
-
|
|
4537
|
-
|
|
4538
|
-
|
|
4539
|
-
|
|
4540
|
-
|
|
4541
|
-
|
|
4542
|
-
|
|
5701
|
+
<ng-container
|
|
5702
|
+
*ngTemplateOutlet="
|
|
5703
|
+
activeEditTemplate;
|
|
5704
|
+
context: {
|
|
5705
|
+
$implicit: getDraftValue(row, col.field),
|
|
5706
|
+
value: getCellValue(row, col.field),
|
|
5707
|
+
row: row,
|
|
5708
|
+
column: col,
|
|
5709
|
+
index: i,
|
|
5710
|
+
editing: true,
|
|
5711
|
+
draftValue: getDraftValue(row, col.field),
|
|
5712
|
+
updateDraft: getUpdateDraftCallback(col.field),
|
|
5713
|
+
}
|
|
5714
|
+
"
|
|
5715
|
+
/>
|
|
4543
5716
|
} @else {
|
|
4544
5717
|
<input
|
|
4545
5718
|
class="grid-edit-input"
|
|
@@ -4549,14 +5722,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4549
5722
|
/>
|
|
4550
5723
|
}
|
|
4551
5724
|
} @else if (resolveCellTemplate(col)) {
|
|
4552
|
-
<ng-container
|
|
4553
|
-
|
|
4554
|
-
|
|
4555
|
-
|
|
4556
|
-
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
|
|
5725
|
+
<ng-container
|
|
5726
|
+
*ngTemplateOutlet="
|
|
5727
|
+
resolveCellTemplate(col)!;
|
|
5728
|
+
context: {
|
|
5729
|
+
$implicit: getCellValue(row, col.field),
|
|
5730
|
+
value: getCellValue(row, col.field),
|
|
5731
|
+
row: row,
|
|
5732
|
+
column: col,
|
|
5733
|
+
index: i,
|
|
5734
|
+
editing: isEditing(row),
|
|
5735
|
+
}
|
|
5736
|
+
"
|
|
5737
|
+
/>
|
|
4560
5738
|
} @else {
|
|
4561
5739
|
@if (showGlobalSearch() && searchText()) {
|
|
4562
5740
|
<span [innerHTML]="highlightSearchText(getCellValue(row, col.field))"></span>
|
|
@@ -4577,10 +5755,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4577
5755
|
style="width:120px"
|
|
4578
5756
|
>
|
|
4579
5757
|
@if (!isEditing(row)) {
|
|
4580
|
-
<button
|
|
5758
|
+
<button
|
|
5759
|
+
class="action-btn"
|
|
5760
|
+
type="button"
|
|
5761
|
+
(click)="beginEdit(row, i); $event.stopPropagation()"
|
|
5762
|
+
>
|
|
5763
|
+
Edit
|
|
5764
|
+
</button>
|
|
4581
5765
|
} @else {
|
|
4582
|
-
<button
|
|
4583
|
-
|
|
5766
|
+
<button
|
|
5767
|
+
class="action-btn save"
|
|
5768
|
+
type="button"
|
|
5769
|
+
(click)="saveEdit(row, i); $event.stopPropagation()"
|
|
5770
|
+
>
|
|
5771
|
+
Save
|
|
5772
|
+
</button>
|
|
5773
|
+
<button class="action-btn" type="button" (click)="cancelEdit(); $event.stopPropagation()">
|
|
5774
|
+
Cancel
|
|
5775
|
+
</button>
|
|
4584
5776
|
}
|
|
4585
5777
|
</td>
|
|
4586
5778
|
}
|
|
@@ -4591,11 +5783,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4591
5783
|
<tr class="grid-detail-row" [class.expanded]="isExpanded(row)">
|
|
4592
5784
|
<td [attr.colspan]="renderColumnCount()" class="grid-detail-cell">
|
|
4593
5785
|
<div class="detail-wrapper" [class.expanded]="isExpanded(row)">
|
|
4594
|
-
<ng-container
|
|
4595
|
-
|
|
4596
|
-
|
|
4597
|
-
|
|
4598
|
-
|
|
5786
|
+
<ng-container
|
|
5787
|
+
*ngTemplateOutlet="
|
|
5788
|
+
detailRowTemplate();
|
|
5789
|
+
context: {
|
|
5790
|
+
$implicit: row,
|
|
5791
|
+
row: row,
|
|
5792
|
+
index: i,
|
|
5793
|
+
}
|
|
5794
|
+
"
|
|
5795
|
+
/>
|
|
4599
5796
|
</div>
|
|
4600
5797
|
</td>
|
|
4601
5798
|
</tr>
|
|
@@ -4609,7 +5806,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4609
5806
|
<td [attr.colspan]="renderColumnCount()" style="padding:0; border:none; height: inherit;"></td>
|
|
4610
5807
|
</tr>
|
|
4611
5808
|
}
|
|
4612
|
-
@for (
|
|
5809
|
+
@for (
|
|
5810
|
+
row of virtualScroll() ? visibleRows() : flatRenderedRows();
|
|
5811
|
+
track getKey(row, $index);
|
|
5812
|
+
let i = $index
|
|
5813
|
+
) {
|
|
4613
5814
|
@let actualIndex = virtualScroll() ? startIndex() + i : i;
|
|
4614
5815
|
<tr
|
|
4615
5816
|
[class]="'grid-row ' + getRowCustomClass(row)"
|
|
@@ -4624,9 +5825,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4624
5825
|
(dblclick)="editable() ? beginEdit(row, actualIndex) : null"
|
|
4625
5826
|
>
|
|
4626
5827
|
@if (rowReorderable()) {
|
|
4627
|
-
<td
|
|
4628
|
-
|
|
4629
|
-
|
|
5828
|
+
<td
|
|
5829
|
+
class="grid-td grid-td-reorder pinned-left"
|
|
5830
|
+
[class.pinned-left-last]="isRowReorderableLastPinned()"
|
|
5831
|
+
style="left:0px; text-align:center; width:44px"
|
|
5832
|
+
>
|
|
5833
|
+
<span
|
|
5834
|
+
class="row-drag-handle"
|
|
5835
|
+
draggable="true"
|
|
5836
|
+
(dragstart)="onRowDragStart($event, actualIndex)"
|
|
5837
|
+
(dragend)="onRowDragEnd()"
|
|
5838
|
+
[attr.title]="i18n.grid.dragRowToReorder"
|
|
5839
|
+
[attr.aria-label]="i18n.grid.dragRowToReorder"
|
|
5840
|
+
>
|
|
5841
|
+
<svg
|
|
5842
|
+
viewBox="0 0 24 24"
|
|
5843
|
+
width="16"
|
|
5844
|
+
height="16"
|
|
5845
|
+
fill="none"
|
|
5846
|
+
stroke="currentColor"
|
|
5847
|
+
stroke-width="2.5"
|
|
5848
|
+
stroke-linecap="round"
|
|
5849
|
+
stroke-linejoin="round"
|
|
5850
|
+
style="display: block;"
|
|
5851
|
+
>
|
|
4630
5852
|
<circle cx="9" cy="5" r="1.5"></circle>
|
|
4631
5853
|
<circle cx="9" cy="12" r="1.5"></circle>
|
|
4632
5854
|
<circle cx="9" cy="19" r="1.5"></circle>
|
|
@@ -4639,9 +5861,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4639
5861
|
}
|
|
4640
5862
|
|
|
4641
5863
|
@if (showDetailToggle()) {
|
|
4642
|
-
<td
|
|
4643
|
-
|
|
4644
|
-
|
|
5864
|
+
<td
|
|
5865
|
+
class="grid-td grid-td-toggle pinned-left"
|
|
5866
|
+
[class.pinned-left-last]="isDetailToggleLastPinned()"
|
|
5867
|
+
[style.left.px]="rowReorderable() ? 44 : 0"
|
|
5868
|
+
>
|
|
5869
|
+
<button
|
|
5870
|
+
class="toggle-btn"
|
|
5871
|
+
[class.expanded]="isExpanded(row)"
|
|
5872
|
+
type="button"
|
|
5873
|
+
(click)="toggleDetail(row); $event.stopPropagation()"
|
|
5874
|
+
[attr.title]="i18n.grid.toggleDetails"
|
|
5875
|
+
[attr.aria-label]="i18n.grid.toggleDetails"
|
|
5876
|
+
>
|
|
5877
|
+
<svg
|
|
5878
|
+
viewBox="0 0 24 24"
|
|
5879
|
+
width="12"
|
|
5880
|
+
height="12"
|
|
5881
|
+
fill="none"
|
|
5882
|
+
stroke="currentColor"
|
|
5883
|
+
stroke-width="3.5"
|
|
5884
|
+
stroke-linecap="round"
|
|
5885
|
+
stroke-linejoin="round"
|
|
5886
|
+
class="chevron-icon"
|
|
5887
|
+
>
|
|
4645
5888
|
<polyline points="9 18 15 12 9 6"></polyline>
|
|
4646
5889
|
</svg>
|
|
4647
5890
|
</button>
|
|
@@ -4649,18 +5892,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4649
5892
|
}
|
|
4650
5893
|
|
|
4651
5894
|
@if (selectable()) {
|
|
4652
|
-
<td
|
|
5895
|
+
<td
|
|
5896
|
+
class="grid-td grid-td-check pinned-left"
|
|
5897
|
+
[class.pinned-left-last]="isSelectableLastPinned()"
|
|
5898
|
+
[style.left.px]="(rowReorderable() ? 44 : 0) + (showDetailToggle() ? 44 : 0)"
|
|
5899
|
+
>
|
|
5900
|
+
<input
|
|
5901
|
+
type="checkbox"
|
|
5902
|
+
[attr.aria-label]="i18n.grid.selectRow(rowSelectionKey(row))"
|
|
5903
|
+
[checked]="isRowSelected(row)"
|
|
5904
|
+
(change)="toggleRow(row)"
|
|
5905
|
+
(click)="$event.stopPropagation()"
|
|
5906
|
+
/>
|
|
5907
|
+
</td>
|
|
4653
5908
|
}
|
|
4654
5909
|
|
|
4655
5910
|
@if (rowTemplate()) {
|
|
4656
5911
|
<td class="grid-td" [attr.colspan]="orderedColumns().length + (editable() ? 1 : 0)">
|
|
4657
|
-
<ng-container
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
|
|
4662
|
-
|
|
4663
|
-
|
|
5912
|
+
<ng-container
|
|
5913
|
+
*ngTemplateOutlet="
|
|
5914
|
+
rowTemplate();
|
|
5915
|
+
context: {
|
|
5916
|
+
$implicit: row,
|
|
5917
|
+
row: row,
|
|
5918
|
+
index: actualIndex,
|
|
5919
|
+
editing: isEditing(row),
|
|
5920
|
+
expanded: isExpanded(row),
|
|
5921
|
+
}
|
|
5922
|
+
"
|
|
5923
|
+
/>
|
|
4664
5924
|
</td>
|
|
4665
5925
|
} @else {
|
|
4666
5926
|
@for (col of orderedColumns(); track col.field) {
|
|
@@ -4671,9 +5931,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4671
5931
|
[class.pinned-left]="col.pinned === 'left'"
|
|
4672
5932
|
[class.pinned-left-last]="col.pinned === 'left' && lastPinnedColumnField() === col.field"
|
|
4673
5933
|
[class.pinned-right]="col.pinned === 'right'"
|
|
4674
|
-
[class.pinned-right-first]="
|
|
5934
|
+
[class.pinned-right-first]="
|
|
5935
|
+
col.pinned === 'right' && firstPinnedRightColumnField() === col.field
|
|
5936
|
+
"
|
|
4675
5937
|
[class.cell-focused]="focusedCell()?.row === row && focusedCell()?.colField === col.field"
|
|
4676
|
-
[
|
|
5938
|
+
[attr.tabindex]="
|
|
5939
|
+
keyboardNavigation() || enableContextMenu()
|
|
5940
|
+
? focusedCell()?.row === row && focusedCell()?.colField === col.field
|
|
5941
|
+
? 0
|
|
5942
|
+
: -1
|
|
5943
|
+
: null
|
|
5944
|
+
"
|
|
5945
|
+
[class.cell-focused-editing]="
|
|
5946
|
+
focusedCell()?.row === row &&
|
|
5947
|
+
focusedCell()?.colField === col.field &&
|
|
5948
|
+
focusedCellEditActive()
|
|
5949
|
+
"
|
|
4677
5950
|
[style.left.px]="col.pinned === 'left' ? columnOffsets()[col.field] : null"
|
|
4678
5951
|
[style.right.px]="col.pinned === 'right' ? columnRightOffsets()[col.field] : null"
|
|
4679
5952
|
[style.text-align]="col.align ?? 'left'"
|
|
@@ -4682,20 +5955,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4682
5955
|
(mousedown)="onCellMouseDown($event, row, col.field)"
|
|
4683
5956
|
(mouseenter)="onCellMouseEnter(row, col.field)"
|
|
4684
5957
|
(contextmenu)="onCellContextMenu($event, row, col.field)"
|
|
4685
|
-
(click)="onCellClick(row, col.field)"
|
|
5958
|
+
(click)="onCellClick(row, col.field, $event)"
|
|
4686
5959
|
>
|
|
4687
5960
|
@if (isEditing(row) && editable() && col.editable) {
|
|
4688
5961
|
@if (resolveEditCellTemplate(col); as activeEditTemplate) {
|
|
4689
|
-
<ng-container
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
|
|
5962
|
+
<ng-container
|
|
5963
|
+
*ngTemplateOutlet="
|
|
5964
|
+
activeEditTemplate;
|
|
5965
|
+
context: {
|
|
5966
|
+
$implicit: getDraftValue(row, col.field),
|
|
5967
|
+
value: getCellValue(row, col.field),
|
|
5968
|
+
row: row,
|
|
5969
|
+
column: col,
|
|
5970
|
+
index: actualIndex,
|
|
5971
|
+
editing: true,
|
|
5972
|
+
draftValue: getDraftValue(row, col.field),
|
|
5973
|
+
updateDraft: getUpdateDraftCallback(col.field),
|
|
5974
|
+
}
|
|
5975
|
+
"
|
|
5976
|
+
/>
|
|
4699
5977
|
} @else {
|
|
4700
5978
|
<input
|
|
4701
5979
|
class="grid-edit-input"
|
|
@@ -4705,14 +5983,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4705
5983
|
/>
|
|
4706
5984
|
}
|
|
4707
5985
|
} @else if (resolveCellTemplate(col)) {
|
|
4708
|
-
<ng-container
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
|
|
4715
|
-
|
|
5986
|
+
<ng-container
|
|
5987
|
+
*ngTemplateOutlet="
|
|
5988
|
+
resolveCellTemplate(col)!;
|
|
5989
|
+
context: {
|
|
5990
|
+
$implicit: getCellValue(row, col.field),
|
|
5991
|
+
value: getCellValue(row, col.field),
|
|
5992
|
+
row: row,
|
|
5993
|
+
column: col,
|
|
5994
|
+
index: actualIndex,
|
|
5995
|
+
editing: isEditing(row),
|
|
5996
|
+
}
|
|
5997
|
+
"
|
|
5998
|
+
/>
|
|
4716
5999
|
} @else {
|
|
4717
6000
|
@if (showGlobalSearch() && searchText()) {
|
|
4718
6001
|
<span [innerHTML]="highlightSearchText(getCellValue(row, col.field))"></span>
|
|
@@ -4733,10 +6016,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4733
6016
|
style="width:120px"
|
|
4734
6017
|
>
|
|
4735
6018
|
@if (!isEditing(row)) {
|
|
4736
|
-
<button
|
|
6019
|
+
<button
|
|
6020
|
+
class="action-btn"
|
|
6021
|
+
type="button"
|
|
6022
|
+
(click)="beginEdit(row, actualIndex); $event.stopPropagation()"
|
|
6023
|
+
>
|
|
6024
|
+
Edit
|
|
6025
|
+
</button>
|
|
4737
6026
|
} @else {
|
|
4738
|
-
<button
|
|
4739
|
-
|
|
6027
|
+
<button
|
|
6028
|
+
class="action-btn save"
|
|
6029
|
+
type="button"
|
|
6030
|
+
(click)="saveEdit(row, actualIndex); $event.stopPropagation()"
|
|
6031
|
+
>
|
|
6032
|
+
Save
|
|
6033
|
+
</button>
|
|
6034
|
+
<button class="action-btn" type="button" (click)="cancelEdit(); $event.stopPropagation()">
|
|
6035
|
+
Cancel
|
|
6036
|
+
</button>
|
|
4740
6037
|
}
|
|
4741
6038
|
</td>
|
|
4742
6039
|
}
|
|
@@ -4747,11 +6044,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4747
6044
|
<tr class="grid-detail-row" [class.expanded]="isExpanded(row)">
|
|
4748
6045
|
<td [attr.colspan]="renderColumnCount()" class="grid-detail-cell">
|
|
4749
6046
|
<div class="detail-wrapper" [class.expanded]="isExpanded(row)">
|
|
4750
|
-
<ng-container
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
6047
|
+
<ng-container
|
|
6048
|
+
*ngTemplateOutlet="
|
|
6049
|
+
detailRowTemplate();
|
|
6050
|
+
context: {
|
|
6051
|
+
$implicit: row,
|
|
6052
|
+
row: row,
|
|
6053
|
+
index: actualIndex,
|
|
6054
|
+
}
|
|
6055
|
+
"
|
|
6056
|
+
/>
|
|
4755
6057
|
</div>
|
|
4756
6058
|
</td>
|
|
4757
6059
|
</tr>
|
|
@@ -4768,13 +6070,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4768
6070
|
<tfoot>
|
|
4769
6071
|
<tr class="grid-footer-row">
|
|
4770
6072
|
@if (rowReorderable()) {
|
|
4771
|
-
<td
|
|
6073
|
+
<td
|
|
6074
|
+
class="grid-td-reorder pinned-left"
|
|
6075
|
+
[class.pinned-left-last]="isRowReorderableLastPinned()"
|
|
6076
|
+
style="left:0px; width:44px"
|
|
6077
|
+
></td>
|
|
4772
6078
|
}
|
|
4773
6079
|
@if (showDetailToggle()) {
|
|
4774
|
-
<td
|
|
6080
|
+
<td
|
|
6081
|
+
class="grid-td-toggle pinned-left"
|
|
6082
|
+
[class.pinned-left-last]="isDetailToggleLastPinned()"
|
|
6083
|
+
[style.left.px]="rowReorderable() ? 44 : 0"
|
|
6084
|
+
style="width:44px"
|
|
6085
|
+
></td>
|
|
4775
6086
|
}
|
|
4776
6087
|
@if (selectable()) {
|
|
4777
|
-
<td
|
|
6088
|
+
<td
|
|
6089
|
+
class="grid-td-check pinned-left"
|
|
6090
|
+
[class.pinned-left-last]="isSelectableLastPinned()"
|
|
6091
|
+
[style.left.px]="(rowReorderable() ? 44 : 0) + (showDetailToggle() ? 44 : 0)"
|
|
6092
|
+
style="width:44px"
|
|
6093
|
+
></td>
|
|
4778
6094
|
}
|
|
4779
6095
|
@for (col of orderedColumns(); track col.field) {
|
|
4780
6096
|
<td
|
|
@@ -4789,12 +6105,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4789
6105
|
[style.width.px]="getColumnWidth(col)"
|
|
4790
6106
|
>
|
|
4791
6107
|
@if (resolveFooterTemplate(col); as activeFooterTemplate) {
|
|
4792
|
-
<ng-container
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
|
|
4796
|
-
|
|
4797
|
-
|
|
6108
|
+
<ng-container
|
|
6109
|
+
*ngTemplateOutlet="
|
|
6110
|
+
activeFooterTemplate;
|
|
6111
|
+
context: {
|
|
6112
|
+
$implicit: col,
|
|
6113
|
+
column: col,
|
|
6114
|
+
aggregationValue: getAggregationValue(col),
|
|
6115
|
+
data: flatRenderedRows(),
|
|
6116
|
+
}
|
|
6117
|
+
"
|
|
6118
|
+
/>
|
|
4798
6119
|
} @else if (col.aggregation) {
|
|
4799
6120
|
<span class="agg-label">{{ col.aggregation }}: </span>
|
|
4800
6121
|
<strong class="agg-value">{{ getAggregationValue(col) }}</strong>
|
|
@@ -4818,11 +6139,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4818
6139
|
<div class="grid-pagination">
|
|
4819
6140
|
<div class="pagination-left">
|
|
4820
6141
|
<span class="page-info">
|
|
4821
|
-
{{ i18n.pagination.page }}
|
|
6142
|
+
{{ i18n.pagination.page }}
|
|
6143
|
+
<strong class="page-info-highlight">{{ pagerRangeStart() }}–{{ pagerRangeEnd() }}</strong>
|
|
6144
|
+
{{ i18n.pagination.of }} <strong class="page-info-highlight">{{ totalItems() }}</strong>
|
|
4822
6145
|
</span>
|
|
4823
6146
|
<div class="page-size-selector">
|
|
4824
6147
|
<span class="page-size-label">{{ i18n.pagination.itemsPerPage }}:</span>
|
|
4825
|
-
<select
|
|
6148
|
+
<select
|
|
6149
|
+
[value]="internalPageSize()"
|
|
6150
|
+
(change)="changePageSize(+$any($event.target).value)"
|
|
6151
|
+
class="page-size-select"
|
|
6152
|
+
>
|
|
4826
6153
|
<option [value]="5">5</option>
|
|
4827
6154
|
<option [value]="8">8</option>
|
|
4828
6155
|
<option [value]="10">10</option>
|
|
@@ -4833,31 +6160,89 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4833
6160
|
</div>
|
|
4834
6161
|
</div>
|
|
4835
6162
|
<div class="page-btns">
|
|
4836
|
-
<button
|
|
4837
|
-
|
|
6163
|
+
<button
|
|
6164
|
+
class="page-btn ctrl"
|
|
6165
|
+
[disabled]="currentPage() === 1"
|
|
6166
|
+
(click)="goPage(1)"
|
|
6167
|
+
[title]="i18n.pagination.firstPage"
|
|
6168
|
+
>
|
|
6169
|
+
<svg
|
|
6170
|
+
viewBox="0 0 24 24"
|
|
6171
|
+
width="14"
|
|
6172
|
+
height="14"
|
|
6173
|
+
fill="none"
|
|
6174
|
+
stroke="currentColor"
|
|
6175
|
+
stroke-width="2.5"
|
|
6176
|
+
stroke-linecap="round"
|
|
6177
|
+
stroke-linejoin="round"
|
|
6178
|
+
>
|
|
4838
6179
|
<polyline points="11 17 6 12 11 7"></polyline>
|
|
4839
6180
|
<polyline points="18 17 13 12 18 7"></polyline>
|
|
4840
6181
|
</svg>
|
|
4841
6182
|
</button>
|
|
4842
|
-
<button
|
|
4843
|
-
|
|
6183
|
+
<button
|
|
6184
|
+
class="page-btn ctrl"
|
|
6185
|
+
[disabled]="currentPage() === 1"
|
|
6186
|
+
(click)="goPage(currentPage() - 1)"
|
|
6187
|
+
[title]="i18n.pagination.previousPage"
|
|
6188
|
+
>
|
|
6189
|
+
<svg
|
|
6190
|
+
viewBox="0 0 24 24"
|
|
6191
|
+
width="14"
|
|
6192
|
+
height="14"
|
|
6193
|
+
fill="none"
|
|
6194
|
+
stroke="currentColor"
|
|
6195
|
+
stroke-width="2.5"
|
|
6196
|
+
stroke-linecap="round"
|
|
6197
|
+
stroke-linejoin="round"
|
|
6198
|
+
>
|
|
4844
6199
|
<polyline points="15 18 9 12 15 6"></polyline>
|
|
4845
6200
|
</svg>
|
|
4846
6201
|
</button>
|
|
4847
|
-
|
|
6202
|
+
|
|
4848
6203
|
<div class="page-numbers">
|
|
4849
6204
|
@for (p of pageNumbers(); track p) {
|
|
4850
|
-
<button class="page-btn number" [class.active]="p === currentPage()" (click)="goPage(p)">
|
|
6205
|
+
<button class="page-btn number" [class.active]="p === currentPage()" (click)="goPage(p)">
|
|
6206
|
+
{{ p }}
|
|
6207
|
+
</button>
|
|
4851
6208
|
}
|
|
4852
6209
|
</div>
|
|
4853
6210
|
|
|
4854
|
-
<button
|
|
4855
|
-
|
|
6211
|
+
<button
|
|
6212
|
+
class="page-btn ctrl"
|
|
6213
|
+
[disabled]="currentPage() === totalPages()"
|
|
6214
|
+
(click)="goPage(currentPage() + 1)"
|
|
6215
|
+
[title]="i18n.pagination.nextPage"
|
|
6216
|
+
>
|
|
6217
|
+
<svg
|
|
6218
|
+
viewBox="0 0 24 24"
|
|
6219
|
+
width="14"
|
|
6220
|
+
height="14"
|
|
6221
|
+
fill="none"
|
|
6222
|
+
stroke="currentColor"
|
|
6223
|
+
stroke-width="2.5"
|
|
6224
|
+
stroke-linecap="round"
|
|
6225
|
+
stroke-linejoin="round"
|
|
6226
|
+
>
|
|
4856
6227
|
<polyline points="9 18 15 12 9 6"></polyline>
|
|
4857
6228
|
</svg>
|
|
4858
6229
|
</button>
|
|
4859
|
-
<button
|
|
4860
|
-
|
|
6230
|
+
<button
|
|
6231
|
+
class="page-btn ctrl"
|
|
6232
|
+
[disabled]="currentPage() === totalPages()"
|
|
6233
|
+
(click)="goPage(totalPages())"
|
|
6234
|
+
[title]="i18n.pagination.lastPage"
|
|
6235
|
+
>
|
|
6236
|
+
<svg
|
|
6237
|
+
viewBox="0 0 24 24"
|
|
6238
|
+
width="14"
|
|
6239
|
+
height="14"
|
|
6240
|
+
fill="none"
|
|
6241
|
+
stroke="currentColor"
|
|
6242
|
+
stroke-width="2.5"
|
|
6243
|
+
stroke-linecap="round"
|
|
6244
|
+
stroke-linejoin="round"
|
|
6245
|
+
>
|
|
4861
6246
|
<polyline points="13 17 18 12 13 7"></polyline>
|
|
4862
6247
|
<polyline points="6 17 11 12 6 7"></polyline>
|
|
4863
6248
|
</svg>
|
|
@@ -4868,31 +6253,72 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4868
6253
|
|
|
4869
6254
|
<!-- Excel-Style Filter Popover Overlay -->
|
|
4870
6255
|
@if (activeFilterPopover(); as pop) {
|
|
4871
|
-
<div
|
|
6256
|
+
<div
|
|
6257
|
+
class="grid-filter-popover"
|
|
6258
|
+
role="dialog"
|
|
6259
|
+
[attr.aria-label]="i18n.grid.filterColumn + ': ' + getColumnTitle(pop.field)"
|
|
6260
|
+
[style.top.px]="pop.top"
|
|
6261
|
+
[style.left.px]="pop.left"
|
|
6262
|
+
(click)="$event.stopPropagation()"
|
|
6263
|
+
>
|
|
4872
6264
|
<div class="popover-section pinning-section">
|
|
4873
|
-
<label class="popover-label">
|
|
6265
|
+
<label class="popover-label">{{ i18n.grid.pinColumn }}</label>
|
|
4874
6266
|
<div class="pinning-actions">
|
|
4875
|
-
<button
|
|
4876
|
-
|
|
4877
|
-
|
|
6267
|
+
<button
|
|
6268
|
+
class="pin-btn"
|
|
6269
|
+
[class.active]="getColumnPinnedState(pop.field) === 'left'"
|
|
6270
|
+
[attr.aria-pressed]="getColumnPinnedState(pop.field) === 'left'"
|
|
6271
|
+
(click)="pinColumnPopover(pop.field, 'left')"
|
|
6272
|
+
type="button"
|
|
6273
|
+
>
|
|
6274
|
+
{{ i18n.grid.pinLeft }}
|
|
6275
|
+
</button>
|
|
6276
|
+
<button
|
|
6277
|
+
class="pin-btn"
|
|
6278
|
+
[class.active]="getColumnPinnedState(pop.field) === 'right'"
|
|
6279
|
+
[attr.aria-pressed]="getColumnPinnedState(pop.field) === 'right'"
|
|
6280
|
+
(click)="pinColumnPopover(pop.field, 'right')"
|
|
6281
|
+
type="button"
|
|
6282
|
+
>
|
|
6283
|
+
{{ i18n.grid.pinRight }}
|
|
6284
|
+
</button>
|
|
6285
|
+
<button
|
|
6286
|
+
class="pin-btn"
|
|
6287
|
+
[class.active]="getColumnPinnedState(pop.field) === null"
|
|
6288
|
+
[attr.aria-pressed]="getColumnPinnedState(pop.field) === null"
|
|
6289
|
+
(click)="pinColumnPopover(pop.field, null)"
|
|
6290
|
+
type="button"
|
|
6291
|
+
>
|
|
6292
|
+
{{ i18n.grid.noPin }}
|
|
6293
|
+
</button>
|
|
4878
6294
|
</div>
|
|
4879
6295
|
</div>
|
|
4880
6296
|
|
|
4881
6297
|
<div class="popover-section text-filter-section">
|
|
4882
|
-
<label class="popover-label">
|
|
6298
|
+
<label class="popover-label">{{ i18n.grid.textFilter }}</label>
|
|
4883
6299
|
<div class="text-filter-row">
|
|
4884
|
-
<select
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
6300
|
+
<select
|
|
6301
|
+
class="popover-select"
|
|
6302
|
+
[value]="tempFilterOperator()"
|
|
6303
|
+
(change)="tempFilterOperator.set($any($event.target).value)"
|
|
6304
|
+
>
|
|
6305
|
+
<option value="contains">{{ i18n.grid.contains }}</option>
|
|
6306
|
+
<option value="eq">{{ i18n.grid.equals }}</option>
|
|
6307
|
+
<option value="startsWith">{{ i18n.grid.startsWith }}</option>
|
|
6308
|
+
<option value="endsWith">{{ i18n.grid.endsWith }}</option>
|
|
4889
6309
|
</select>
|
|
4890
|
-
<input
|
|
6310
|
+
<input
|
|
6311
|
+
class="popover-input"
|
|
6312
|
+
type="text"
|
|
6313
|
+
[value]="tempFilterValue()"
|
|
6314
|
+
(input)="tempFilterValue.set($any($event.target).value)"
|
|
6315
|
+
[placeholder]="i18n.grid.filterPlaceholder"
|
|
6316
|
+
/>
|
|
4891
6317
|
</div>
|
|
4892
6318
|
</div>
|
|
4893
|
-
|
|
6319
|
+
|
|
4894
6320
|
<div class="popover-section checklist-section">
|
|
4895
|
-
<label class="popover-label">
|
|
6321
|
+
<label class="popover-label">{{ i18n.grid.checklistFilter }}</label>
|
|
4896
6322
|
<input
|
|
4897
6323
|
class="checklist-search"
|
|
4898
6324
|
type="text"
|
|
@@ -4902,25 +6328,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4902
6328
|
/>
|
|
4903
6329
|
<div class="checklist-actions">
|
|
4904
6330
|
<label class="checklist-item select-all">
|
|
4905
|
-
<input
|
|
6331
|
+
<input
|
|
6332
|
+
type="checkbox"
|
|
6333
|
+
[checked]="tempSelectedValues().size === getFilteredDistinctValues(pop.field).length"
|
|
6334
|
+
[indeterminate]="
|
|
6335
|
+
tempSelectedValues().size > 0 &&
|
|
6336
|
+
tempSelectedValues().size < getFilteredDistinctValues(pop.field).length
|
|
6337
|
+
"
|
|
6338
|
+
(change)="toggleSelectAllChecklist()"
|
|
6339
|
+
/>
|
|
4906
6340
|
<span>({{ i18n.grid.selectAll }})</span>
|
|
4907
6341
|
</label>
|
|
4908
6342
|
</div>
|
|
4909
6343
|
<div class="checklist-scroll">
|
|
4910
6344
|
@for (val of getFilteredDistinctValues(pop.field); track val) {
|
|
4911
6345
|
<label class="checklist-item">
|
|
4912
|
-
<input
|
|
6346
|
+
<input
|
|
6347
|
+
type="checkbox"
|
|
6348
|
+
[checked]="tempSelectedValues().has(val)"
|
|
6349
|
+
(change)="toggleChecklistItem(val)"
|
|
6350
|
+
/>
|
|
4913
6351
|
<span>{{ val }}</span>
|
|
4914
6352
|
</label>
|
|
4915
6353
|
}
|
|
4916
6354
|
</div>
|
|
4917
6355
|
</div>
|
|
4918
|
-
|
|
6356
|
+
|
|
4919
6357
|
<div class="popover-footer">
|
|
4920
6358
|
<button class="popover-btn clear" (click)="clearPopoverFilter()">{{ i18n.datePicker.clear }}</button>
|
|
4921
6359
|
<div class="footer-actions">
|
|
4922
|
-
<button class="popover-btn cancel" (click)="
|
|
4923
|
-
|
|
6360
|
+
<button class="popover-btn cancel" (click)="closeFilterPopover()">
|
|
6361
|
+
{{ i18n.common.cancel }}
|
|
6362
|
+
</button>
|
|
6363
|
+
<button class="popover-btn apply" (click)="applyPopoverFilter()">{{ i18n.grid.apply }}</button>
|
|
4924
6364
|
</div>
|
|
4925
6365
|
</div>
|
|
4926
6366
|
</div>
|
|
@@ -4928,39 +6368,118 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4928
6368
|
|
|
4929
6369
|
<!-- Column Chooser Popover Overlay -->
|
|
4930
6370
|
@if (activeColumnChooserPopover(); as pop) {
|
|
4931
|
-
<div
|
|
6371
|
+
<div
|
|
6372
|
+
[id]="instanceId + '-column-chooser'"
|
|
6373
|
+
class="grid-column-chooser-popover"
|
|
6374
|
+
role="region"
|
|
6375
|
+
[attr.aria-label]="i18n.grid.chooseColumns"
|
|
6376
|
+
[style.top.px]="pop.top"
|
|
6377
|
+
[style.left.px]="pop.left"
|
|
6378
|
+
(click)="$event.stopPropagation()"
|
|
6379
|
+
>
|
|
4932
6380
|
<div class="popover-section checklist-section" style="border-top: none; padding-top: 0;">
|
|
4933
|
-
<
|
|
6381
|
+
<span class="popover-label">{{ i18n.grid.visibleColumns }}</span>
|
|
4934
6382
|
<div class="checklist-scroll">
|
|
4935
6383
|
@for (col of columns(); track col.field) {
|
|
4936
|
-
<
|
|
4937
|
-
<
|
|
4938
|
-
|
|
4939
|
-
|
|
6384
|
+
<div class="column-config-item">
|
|
6385
|
+
<label class="checklist-item">
|
|
6386
|
+
<input
|
|
6387
|
+
#firstColumnToggle
|
|
6388
|
+
type="checkbox"
|
|
6389
|
+
[checked]="!hiddenColumns().has(col.field)"
|
|
6390
|
+
[disabled]="!hiddenColumns().has(col.field) && visibleColumnsCount() === 1"
|
|
6391
|
+
(change)="toggleColumnVisibility(col.field)"
|
|
6392
|
+
/>
|
|
6393
|
+
<span>{{ col.title }}</span>
|
|
6394
|
+
</label>
|
|
6395
|
+
<div class="column-config-actions">
|
|
6396
|
+
<button
|
|
6397
|
+
class="column-config-btn"
|
|
6398
|
+
type="button"
|
|
6399
|
+
[attr.aria-label]="i18n.grid.pinLeft + ': ' + col.title"
|
|
6400
|
+
[attr.aria-pressed]="getColumnPinnedState(col.field) === 'left'"
|
|
6401
|
+
[title]="i18n.grid.pinLeft"
|
|
6402
|
+
(click)="pinColumnPopover(col.field, 'left')"
|
|
6403
|
+
>
|
|
6404
|
+
⇤
|
|
6405
|
+
</button>
|
|
6406
|
+
<button
|
|
6407
|
+
class="column-config-btn"
|
|
6408
|
+
type="button"
|
|
6409
|
+
[attr.aria-label]="i18n.grid.pinRight + ': ' + col.title"
|
|
6410
|
+
[attr.aria-pressed]="getColumnPinnedState(col.field) === 'right'"
|
|
6411
|
+
[title]="i18n.grid.pinRight"
|
|
6412
|
+
(click)="pinColumnPopover(col.field, 'right')"
|
|
6413
|
+
>
|
|
6414
|
+
⇥
|
|
6415
|
+
</button>
|
|
6416
|
+
<button
|
|
6417
|
+
class="column-config-btn"
|
|
6418
|
+
type="button"
|
|
6419
|
+
[attr.aria-label]="i18n.grid.noPin + ': ' + col.title"
|
|
6420
|
+
[attr.aria-pressed]="getColumnPinnedState(col.field) === null"
|
|
6421
|
+
[title]="i18n.grid.noPin"
|
|
6422
|
+
(click)="pinColumnPopover(col.field, null)"
|
|
6423
|
+
>
|
|
6424
|
+
×
|
|
6425
|
+
</button>
|
|
6426
|
+
<button
|
|
6427
|
+
class="column-config-btn"
|
|
6428
|
+
type="button"
|
|
6429
|
+
[attr.aria-label]="i18n.grid.moveColumnLeft(col.title)"
|
|
6430
|
+
[title]="i18n.grid.moveColumnLeft(col.title)"
|
|
6431
|
+
[disabled]="columnIndex(col.field) === 0"
|
|
6432
|
+
(click)="moveColumn(col.field, -1)"
|
|
6433
|
+
>
|
|
6434
|
+
←
|
|
6435
|
+
</button>
|
|
6436
|
+
<button
|
|
6437
|
+
class="column-config-btn"
|
|
6438
|
+
type="button"
|
|
6439
|
+
[attr.aria-label]="i18n.grid.moveColumnRight(col.title)"
|
|
6440
|
+
[title]="i18n.grid.moveColumnRight(col.title)"
|
|
6441
|
+
[disabled]="columnIndex(col.field) === columns().length - 1"
|
|
6442
|
+
(click)="moveColumn(col.field, 1)"
|
|
6443
|
+
>
|
|
6444
|
+
→
|
|
6445
|
+
</button>
|
|
6446
|
+
</div>
|
|
6447
|
+
</div>
|
|
4940
6448
|
}
|
|
4941
6449
|
</div>
|
|
4942
6450
|
</div>
|
|
4943
6451
|
<div class="popover-footer">
|
|
4944
|
-
<button class="popover-btn apply" (click)="
|
|
6452
|
+
<button class="popover-btn apply" type="button" (click)="closeColumnChooser()">
|
|
6453
|
+
{{ i18n.grid.closeColumnChooser }}
|
|
6454
|
+
</button>
|
|
4945
6455
|
</div>
|
|
4946
6456
|
</div>
|
|
4947
6457
|
}
|
|
4948
6458
|
|
|
4949
6459
|
<!-- Custom Context Menu Overlay -->
|
|
4950
6460
|
@if (activeContextMenu(); as menu) {
|
|
4951
|
-
<div
|
|
4952
|
-
|
|
6461
|
+
<div
|
|
6462
|
+
class="grid-context-menu"
|
|
6463
|
+
role="menu"
|
|
6464
|
+
aria-orientation="vertical"
|
|
6465
|
+
[attr.aria-label]="i18n.grid.contextMenu"
|
|
6466
|
+
[style.top.px]="menu.y"
|
|
6467
|
+
[style.left.px]="menu.x"
|
|
6468
|
+
(click)="$event.stopPropagation()"
|
|
6469
|
+
(keydown)="onContextMenuKeydown($event)"
|
|
6470
|
+
>
|
|
6471
|
+
<button class="menu-item" role="menuitem" [disabled]="!selectedCellStart()" (click)="contextMenuCopy()">
|
|
4953
6472
|
<span class="menu-icon">📋</span> Copy Selection
|
|
4954
6473
|
</button>
|
|
4955
6474
|
<div class="menu-divider"></div>
|
|
4956
6475
|
@if (showDetailToggle() && detailRowTemplate() && menu.row) {
|
|
4957
|
-
<button class="menu-item" (click)="contextMenuToggleDetail(menu.row)">
|
|
6476
|
+
<button class="menu-item" role="menuitem" (click)="contextMenuToggleDetail(menu.row)">
|
|
4958
6477
|
<span class="menu-icon">🔍</span> {{ isExpanded(menu.row) ? 'Collapse Details' : 'Expand Details' }}
|
|
4959
6478
|
</button>
|
|
4960
|
-
<button class="menu-item" (click)="expandAllDetails()">
|
|
6479
|
+
<button class="menu-item" role="menuitem" (click)="expandAllDetails()">
|
|
4961
6480
|
<span class="menu-icon">📂</span> Expand All Details
|
|
4962
6481
|
</button>
|
|
4963
|
-
<button class="menu-item" (click)="collapseAllDetails()">
|
|
6482
|
+
<button class="menu-item" role="menuitem" (click)="collapseAllDetails()">
|
|
4964
6483
|
<span class="menu-icon">📁</span> Collapse All Details
|
|
4965
6484
|
</button>
|
|
4966
6485
|
<div class="menu-divider"></div>
|
|
@@ -4968,46 +6487,51 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4968
6487
|
@if (getColumnDef(menu.colField); as columnDef) {
|
|
4969
6488
|
@if (columnDef.groupable) {
|
|
4970
6489
|
@if (internalGroupBy()?.field === menu.colField) {
|
|
4971
|
-
<button class="menu-item" (click)="contextMenuClearGrouping()">
|
|
6490
|
+
<button class="menu-item" role="menuitem" (click)="contextMenuClearGrouping()">
|
|
4972
6491
|
<span class="menu-icon">📁</span> Clear Grouping
|
|
4973
6492
|
</button>
|
|
4974
6493
|
} @else {
|
|
4975
|
-
<button class="menu-item" (click)="contextMenuGroupBy(menu.colField)">
|
|
6494
|
+
<button class="menu-item" role="menuitem" (click)="contextMenuGroupBy(menu.colField)">
|
|
4976
6495
|
<span class="menu-icon">🗂️</span> Group by {{ columnDef.title }}
|
|
4977
6496
|
</button>
|
|
4978
6497
|
}
|
|
4979
6498
|
}
|
|
4980
6499
|
}
|
|
4981
6500
|
@if (hasGrouping()) {
|
|
4982
|
-
<button class="menu-item" (click)="expandAllGroups()">
|
|
6501
|
+
<button class="menu-item" role="menuitem" (click)="expandAllGroups()">
|
|
4983
6502
|
<span class="menu-icon">↕️</span> Expand All Groups
|
|
4984
6503
|
</button>
|
|
4985
|
-
<button class="menu-item" (click)="collapseAllGroups()">
|
|
6504
|
+
<button class="menu-item" role="menuitem" (click)="collapseAllGroups()">
|
|
4986
6505
|
<span class="menu-icon">⋯</span> Collapse All Groups
|
|
4987
6506
|
</button>
|
|
4988
6507
|
}
|
|
4989
6508
|
<div class="menu-divider"></div>
|
|
4990
|
-
<button class="menu-item" (click)="contextMenuTogglePin(menu.colField)">
|
|
6509
|
+
<button class="menu-item" role="menuitem" (click)="contextMenuTogglePin(menu.colField)">
|
|
4991
6510
|
<span class="menu-icon">📌</span> {{ isColumnPinned(menu.colField) ? 'Unpin Column' : 'Pin Column Left' }}
|
|
4992
6511
|
</button>
|
|
4993
|
-
<button class="menu-item" (click)="contextMenuHideColumn(menu.colField)">
|
|
6512
|
+
<button class="menu-item" role="menuitem" (click)="contextMenuHideColumn(menu.colField)">
|
|
4994
6513
|
<span class="menu-icon">👁️</span> Hide Column
|
|
4995
6514
|
</button>
|
|
4996
6515
|
<div class="menu-divider"></div>
|
|
4997
|
-
<button
|
|
6516
|
+
<button
|
|
6517
|
+
class="menu-item"
|
|
6518
|
+
role="menuitem"
|
|
6519
|
+
[disabled]="filterStates().size === 0"
|
|
6520
|
+
(click)="contextMenuClearFilters()"
|
|
6521
|
+
>
|
|
4998
6522
|
<span class="menu-icon">🧹</span> Clear All Filters
|
|
4999
6523
|
</button>
|
|
5000
6524
|
<div class="menu-divider"></div>
|
|
5001
|
-
<button class="menu-item" (click)="exportToJson();
|
|
6525
|
+
<button class="menu-item" role="menuitem" (click)="exportToJson(); closeContextMenu()">
|
|
5002
6526
|
<span class="menu-icon">📄</span> Export to JSON
|
|
5003
6527
|
</button>
|
|
5004
|
-
<button class="menu-item" (click)="exportToCsv();
|
|
6528
|
+
<button class="menu-item" role="menuitem" (click)="exportToCsv(); closeContextMenu()">
|
|
5005
6529
|
<span class="menu-icon">📊</span> Export to CSV
|
|
5006
6530
|
</button>
|
|
5007
|
-
<button class="menu-item" (click)="exportToExcel();
|
|
6531
|
+
<button class="menu-item" role="menuitem" (click)="exportToExcel(); closeContextMenu()">
|
|
5008
6532
|
<span class="menu-icon">📈</span> Export to Excel
|
|
5009
6533
|
</button>
|
|
5010
|
-
<button class="menu-item" (click)="exportToPdf();
|
|
6534
|
+
<button class="menu-item" role="menuitem" (click)="exportToPdf(); closeContextMenu()">
|
|
5011
6535
|
<span class="menu-icon">📕</span> Export to PDF
|
|
5012
6536
|
</button>
|
|
5013
6537
|
</div>
|
|
@@ -5019,14 +6543,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
5019
6543
|
<!-- Advanced Filter Builder Overlay -->
|
|
5020
6544
|
@if (isFilterBuilderOpen()) {
|
|
5021
6545
|
<ngx-grid-filter-builder
|
|
6546
|
+
[gridInstanceId]="instanceId"
|
|
5022
6547
|
[columns]="$any(columns())"
|
|
5023
6548
|
[expression]="internalFilterExpression()"
|
|
5024
6549
|
(expressionChange)="onFilterExpressionChange($event)"
|
|
5025
|
-
(close)="
|
|
6550
|
+
(close)="closeFilterBuilder()"
|
|
5026
6551
|
/>
|
|
5027
6552
|
}
|
|
5028
6553
|
</div>
|
|
5029
|
-
`, styles: [":host{display:block}.grid-table-wrap::-webkit-scrollbar,.checklist-scroll::-webkit-scrollbar{width:6px;height:6px}.grid-table-wrap::-webkit-scrollbar-track,.checklist-scroll::-webkit-scrollbar-track{background:transparent}.grid-table-wrap::-webkit-scrollbar-thumb,.checklist-scroll::-webkit-scrollbar-thumb{background:#64748b33;border-radius:99px}.grid-table-wrap::-webkit-scrollbar-thumb:hover,.checklist-scroll::-webkit-scrollbar-thumb:hover{background:#64748b66}.ngx-data-grid{position:relative;font-family:inherit;border:1px solid var(--ngx-grid-border, #e2e8f0);border-radius:var(--ngx-grid-radius, 12px);overflow:hidden;background:var(--ngx-grid-bg, #ffffff);box-shadow:0 10px 15px -3px #00000008,0 4px 6px -4px #00000008,0 0 0 1px #00000005;transition:background-color .3s,border-color .3s,box-shadow .3s}.grid-toolbar{display:flex;justify-content:space-between;align-items:center;padding:14px 18px;background:var(--ngx-grid-header-bg, #f8fafc);border-bottom:1px solid var(--ngx-grid-border, #e2e8f0);flex-wrap:wrap;gap:12px}.grid-toolbar-title{font-family:var(--ngx-heading-font-family, \"Outfit\", sans-serif);font-weight:700;font-size:15px;color:var(--ngx-grid-text, #0f172a);letter-spacing:-.01em}.grid-toolbar-actions{display:flex;gap:8px}.grid-action-btn{padding:6px 14px;border:1px solid var(--ngx-grid-border, #e2e8f0);border-radius:8px;background:var(--ngx-grid-bg, #ffffff);color:var(--ngx-grid-text, #0f172a);font-size:12px;font-weight:600;cursor:pointer;font-family:inherit;transition:all .2s cubic-bezier(.4,0,.2,1);outline:none;display:inline-flex;align-items:center;gap:6px}.grid-action-btn:hover{background:var(--ngx-grid-hover-bg, #f8fafc);border-color:var(--ngx-input-focus, #4f46e5);color:var(--ngx-input-focus, #4f46e5);box-shadow:0 4px 6px -1px #4f46e514;transform:translateY(-.5px)}.grid-action-btn:active{transform:scale(.97)}.grid-table-wrap{overflow-x:auto;overflow-y:hidden}.grid-table{width:100%;border-collapse:collapse;font-size:13px;table-layout:fixed}.ngx-data-grid.compact .grid-td{padding:7px 12px;font-size:12px}.ngx-data-grid.compact .grid-th{padding:9px 12px;font-size:10px}.ngx-data-grid.compact .grid-grouping-panel,.ngx-data-grid.compact .grid-toolbar{padding:8px 14px}.clear-filters-btn{border-color:#ef444440!important;background:#ef44440d!important;color:#ef4444!important;font-weight:600}.clear-filters-btn:hover{background:#ef4444!important;color:#fff!important;border-color:transparent!important}.grid-th{position:sticky;top:0;z-index:10;padding:14px 18px;text-align:left;font-size:11px;font-weight:750;color:var(--ngx-grid-text-secondary, #64748b);background:var(--ngx-grid-header-bg, #f8fafc);border-bottom:2px solid var(--ngx-grid-border, #e2e8f0);white-space:nowrap;-webkit-user-select:none;user-select:none;text-transform:uppercase;letter-spacing:.06em;font-family:var(--ngx-heading-font-family, \"Outfit\", sans-serif);transition:background-color .2s ease}.grid-category-th{text-align:center;border-bottom:1px solid var(--ngx-grid-border, #e2e8f0);border-right:1px solid var(--ngx-grid-border, #e2e8f0)}.sub-header-row .grid-th{border-bottom:2px solid var(--ngx-grid-border, #e2e8f0);border-right:1px solid var(--ngx-grid-border, #f1f5f9)}.grid-th.sortable{cursor:pointer}.grid-th.sortable:hover{background:var(--ngx-grid-hover-bg, #f1f5f9);color:var(--ngx-grid-text, #0f172a)}.grid-th.sort-asc,.grid-th.sort-desc{color:var(--ngx-input-focus, #4f46e5);background:#4f46e505}.th-text{margin-right:4px}.sort-icon{font-size:10px;color:#cbd5e1;transition:color .2s ease}.sort-asc .sort-icon,.sort-desc .sort-icon{color:var(--ngx-input-focus, #4f46e5)}.th-content-wrapper{display:flex;align-items:center;justify-content:space-between;gap:6px;width:100%}.grid-filter-btn{background:transparent;border:none;color:var(--ngx-grid-text-secondary, #94a3b8);cursor:pointer;padding:4px;border-radius:6px;display:flex;align-items:center;justify-content:center;transition:all .2s}.grid-filter-btn:hover{background:var(--ngx-grid-hover-bg, #cbd5e1);color:var(--ngx-grid-text, #0f172a)}.grid-filter-btn.active{color:var(--ngx-input-focus, #4f46e5);background:#4f46e51a}.grid-resize-handle{position:absolute;right:0;top:0;bottom:0;width:6px;cursor:col-resize;background:transparent;z-index:10;transition:background-color .2s}.grid-resize-handle:hover,.grid-resize-handle.resizing{background:var(--ngx-input-focus, #4f46e5)}.grid-filter-popover,.grid-column-chooser-popover,.grid-context-menu{position:absolute;width:250px;background:var(--ngx-grid-bg-glass, rgba(255, 255, 255, .8));backdrop-filter:blur(16px) saturate(180%);-webkit-backdrop-filter:blur(16px) saturate(180%);border:1px solid rgba(255,255,255,.5);border-radius:14px;box-shadow:0 20px 25px -5px #00000014,0 10px 10px -5px #0000000a,0 0 0 1px #00000005;z-index:1000;padding:12px;box-sizing:border-box;display:flex;flex-direction:column;gap:12px;font-family:inherit;animation:popoverFadeIn .2s cubic-bezier(.16,1,.3,1) forwards;transform-origin:top center}.grid-context-menu{width:190px;padding:6px;gap:2px}@keyframes popoverFadeIn{0%{opacity:0;transform:scale(.95) translateY(-5px)}to{opacity:1;transform:scale(1) translateY(0)}}.checklist-search{padding:8px 12px;border:1px solid var(--ngx-grid-border, #cbd5e1);border-radius:8px;font-size:12px;font-family:inherit;outline:none;background:var(--ngx-input-bg, #ffffff);color:var(--ngx-grid-text, #0f172a);width:100%;box-sizing:border-box;margin-bottom:4px;transition:all .2s ease}.checklist-search:focus{border-color:var(--ngx-input-focus, #4f46e5);box-shadow:0 0 0 3px var(--primary-glow, rgba(79, 70, 229, .15))}.pinning-section{border-bottom:1px solid var(--ngx-grid-border, #e2e8f0);padding-bottom:10px}.pinning-actions{display:flex;gap:6px}.pin-btn{flex:1;padding:6px 4px;border:1px solid var(--ngx-grid-border, #cbd5e1);border-radius:6px;background:var(--ngx-input-bg, #ffffff);color:var(--ngx-grid-text, #0f172a);font-size:11px;font-weight:600;cursor:pointer;text-align:center;transition:all .15s ease;outline:none}.pin-btn:hover{border-color:var(--ngx-input-focus, #4f46e5);color:var(--ngx-input-focus, #4f46e5);background:#4f46e505}.pin-btn.active{border-color:var(--ngx-btn-primary-bg, #4f46e5);background:var(--ngx-btn-primary-bg, #4f46e5);color:#fff;box-shadow:0 2px 4px #4f46e526}.popover-section{display:flex;flex-direction:column;gap:6px}.popover-label{font-size:10px;font-weight:800;color:var(--ngx-grid-text-secondary, #64748b);text-transform:uppercase;letter-spacing:.06em}.text-filter-row{display:flex;flex-direction:column;gap:6px}.popover-select{padding:6px 10px;border:1px solid var(--ngx-grid-border, #cbd5e1);border-radius:8px;font-size:12px;font-family:inherit;outline:none;background:var(--ngx-input-bg, #ffffff);color:var(--ngx-grid-text, #0f172a);cursor:pointer}.popover-input{padding:6px 10px;border:1px solid var(--ngx-grid-border, #cbd5e1);border-radius:8px;font-size:12px;font-family:inherit;outline:none;background:var(--ngx-input-bg, #ffffff);color:var(--ngx-grid-text, #0f172a);transition:all .2s}.popover-input:focus{border-color:var(--ngx-input-focus, #4f46e5);box-shadow:0 0 0 3px var(--primary-glow, rgba(79, 70, 229, .15))}.checklist-section{border-top:1px solid var(--ngx-grid-border, #e2e8f0);padding-top:10px}.checklist-scroll{max-height:140px;overflow-y:auto;display:flex;flex-direction:column;gap:4px;border:1px solid var(--ngx-grid-border, #e2e8f0);border-radius:8px;padding:8px;background:#ffffff73}.checklist-item{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--ngx-grid-text, #0f172a);cursor:pointer;-webkit-user-select:none;user-select:none}.popover-footer{display:flex;justify-content:space-between;align-items:center;border-top:1px solid var(--ngx-grid-border, #e2e8f0);padding-top:10px;margin-top:4px}.footer-actions{display:flex;gap:6px}.popover-btn{padding:5px 12px;font-size:11px;font-weight:600;border-radius:6px;cursor:pointer;border:1px solid var(--ngx-grid-border, #cbd5e1);background:var(--ngx-grid-bg, #ffffff);color:var(--ngx-grid-text, #0f172a);transition:all .2s ease;font-family:inherit}.popover-btn:hover{background:var(--ngx-grid-hover-bg, #f8fafc);border-color:var(--ngx-input-border, #cbd5e1)}.popover-btn.apply{background:var(--ngx-btn-primary-bg, #4f46e5);color:#fff;border-color:var(--ngx-btn-primary-bg, #4f46e5)}.popover-btn.apply:hover{background:var(--ngx-btn-primary-hover, #4338ca);border-color:var(--ngx-btn-primary-hover, #4338ca);box-shadow:0 4px 6px -1px #4f46e533}.popover-btn.clear{color:#ef4444;border-color:transparent;background:transparent}.popover-btn.clear:hover{background:#fef2f2}.grid-group-row td{background:var(--ngx-grid-header-bg, #f8fafc);border-bottom:1.5px solid var(--ngx-grid-border, #e2e8f0);color:var(--ngx-grid-text, #0f172a);font-size:12px;font-weight:600;padding:12px 18px;cursor:pointer}.group-toggle{border:none;background:transparent;margin-right:6px;cursor:pointer;color:var(--ngx-grid-text-secondary, #64748b);font-size:12px;transition:transform .2s ease}.group-count{color:var(--ngx-grid-text-secondary, #64748b);margin-left:6px;font-weight:500}.grid-row{border-bottom:1px solid var(--ngx-grid-border, #f1f5f9);transition:background-color .15s ease}.grid-row:hover{background:var(--ngx-grid-hover-bg, #f5f3ff)!important}.grid-row.selected{background:var(--ngx-grid-selected-bg, #e0e7ff)!important}.grid-row.selected:hover{background:var(--ngx-grid-selected-bg-hover, #c7d2fe)!important}.grid-table.striped .grid-row:nth-child(2n){background:var(--ngx-grid-stripe-bg, #f8fafc)}.grid-table.striped .grid-row:nth-child(2n):hover{background:var(--ngx-grid-hover-bg, #f5f3ff)!important}.grid-table.striped .grid-row.selected{background:var(--ngx-grid-selected-bg, #e0e7ff)!important}.grid-td{padding:12px 18px;color:var(--ngx-grid-text, #0f172a);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:middle;box-sizing:border-box}.grid-th-check,.grid-td-check,.grid-th-toggle,.grid-td-toggle,.grid-td-reorder,.grid-th-reorder{width:44px!important;text-align:center;padding:0!important;text-overflow:clip!important}.toggle-btn{border:none;background:transparent;color:var(--ngx-grid-text-secondary, #64748b);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:6px;transition:all .2s cubic-bezier(.4,0,.2,1);outline:none}.toggle-btn:hover{background:var(--ngx-grid-hover-bg, #f1f5f9);color:var(--ngx-input-focus, #4f46e5)}.toggle-btn .chevron-icon{transition:transform .25s cubic-bezier(.4,0,.2,1)}.toggle-btn.expanded .chevron-icon{transform:rotate(90deg);color:var(--ngx-input-focus, #4f46e5)}.grid-detail-row{background:var(--ngx-grid-bg, #ffffff)}.grid-detail-cell{padding:0!important;border-bottom:1px solid var(--ngx-grid-border, #e2e8f0);white-space:normal}.detail-wrapper{max-height:0;opacity:0;overflow:hidden;padding:0 24px;transition:max-height .3s cubic-bezier(.4,0,.2,1),opacity .25s ease-out,padding .3s cubic-bezier(.4,0,.2,1);box-sizing:border-box}.detail-wrapper.expanded{max-height:800px;opacity:1;padding:16px 24px 20px}.grid-edit-input{width:100%;min-width:80px;padding:6px 10px;border:1px solid var(--ngx-grid-border, #cbd5e1);border-radius:8px;font-size:12px;font-family:inherit;background:var(--ngx-input-bg, #ffffff);color:var(--ngx-grid-text, #0f172a);box-sizing:border-box;outline:none;transition:border-color .2s,box-shadow .2s}.grid-edit-input:focus{border-color:var(--ngx-input-focus, #4f46e5);box-shadow:0 0 0 3px var(--primary-glow, rgba(79, 70, 229, .15))}.grid-actions{white-space:nowrap}.action-btn{border:1px solid var(--ngx-grid-border, #cbd5e1);background:var(--ngx-grid-bg, #ffffff);color:var(--ngx-grid-text, #0f172a);border-radius:8px;padding:6px 12px;font-size:12px;font-weight:600;margin-right:6px;cursor:pointer;transition:all .2s;outline:none}.action-btn:hover{background:var(--ngx-grid-hover-bg, #f8fafc);border-color:var(--ngx-input-border, #cbd5e1)}.action-btn.save{border-color:var(--ngx-btn-primary-bg, #4f46e5);background:var(--ngx-btn-primary-bg, #4f46e5);color:#fff}.action-btn.save:hover{background:var(--ngx-btn-primary-hover, #4338ca);border-color:var(--ngx-btn-primary-hover, #4338ca);box-shadow:0 4px 6px -1px #4f46e533}.action-btn:last-child{margin-right:0}.grid-loading-cell,.grid-empty-cell{padding:48px;text-align:center;color:var(--ngx-grid-text-secondary, #64748b);font-weight:500}.grid-spinner{width:28px;height:28px;border:3.5px solid var(--ngx-grid-border, #e2e8f0);border-top-color:var(--ngx-btn-primary-bg, #4f46e5);border-radius:50%;animation:spin .8s cubic-bezier(.4,0,.2,1) infinite;margin:0 auto}@keyframes spin{to{transform:rotate(360deg)}}.grid-pagination{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;border-top:1px solid var(--ngx-grid-border, #e2e8f0);background:var(--ngx-grid-header-bg, #f8fafc);flex-wrap:wrap;gap:16px}.pagination-left{display:flex;align-items:center;gap:20px;flex-wrap:wrap}.page-info{font-size:13px;color:var(--ngx-grid-text-secondary, #64748b);font-weight:500}.page-info-highlight{color:var(--ngx-grid-text, #0f172a);font-weight:600}.page-size-selector{display:flex;align-items:center;gap:8px}.page-size-label{font-size:12px;color:var(--ngx-grid-text-secondary, #64748b);font-weight:500}.page-size-select{padding:4px 28px 4px 10px;border:1px solid var(--ngx-grid-border, #cbd5e1);border-radius:6px;font-size:12px;font-weight:600;background:var(--ngx-grid-bg, #ffffff);color:var(--ngx-grid-text, #0f172a);cursor:pointer;outline:none;transition:all .2s;appearance:none;-webkit-appearance:none;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E\");background-repeat:no-repeat;background-position:right 8px center;background-size:12px}.page-size-select:hover{border-color:var(--ngx-input-border-hover, #94a3b8)}.page-size-select:focus{border-color:var(--ngx-input-focus, #4f46e5);box-shadow:0 0 0 3px var(--primary-glow, rgba(79, 70, 229, .15))}.page-btns{display:flex;align-items:center;gap:6px}.page-numbers{display:flex;gap:4px}.page-btn{min-width:32px;height:32px;padding:0 8px;font-size:13px;font-weight:600;border:1px solid var(--ngx-grid-border, #e2e8f0);background:var(--ngx-grid-bg, #ffffff);border-radius:8px;cursor:pointer;font-family:inherit;color:var(--ngx-grid-text, #0f172a);transition:all .2s cubic-bezier(.4,0,.2,1);outline:none;display:inline-flex;align-items:center;justify-content:center}.page-btn.ctrl{color:var(--ngx-grid-text-secondary, #64748b);background:var(--ngx-grid-bg, #ffffff)}.page-btn:hover:not(:disabled){background:var(--ngx-grid-hover-bg, #f1f5f9);border-color:var(--ngx-input-border-hover, #cbd5e1);color:var(--ngx-input-focus, #4f46e5);transform:translateY(-.5px)}.page-btn.active{background:var(--ngx-btn-primary-bg, #4f46e5);color:#fff!important;border-color:var(--ngx-btn-primary-bg, #4f46e5);box-shadow:0 4px 6px -1px #4f46e540}.page-btn:disabled{opacity:.35;cursor:not-allowed;transform:none!important}.grid-footer-row td{background:var(--ngx-grid-header-bg, #f8fafc);border-top:2px solid var(--ngx-grid-border, #e2e8f0);font-size:12px;padding:12px 18px;color:var(--ngx-grid-text, #0f172a)}.agg-label{font-size:10px;font-weight:800;color:var(--ngx-grid-text-secondary, #64748b);text-transform:uppercase;letter-spacing:.05em}.agg-value{font-weight:700;color:var(--ngx-input-focus, #4f46e5)}.pinned-left{position:sticky!important;z-index:5;background:var(--ngx-grid-bg, #ffffff)}th.pinned-left{position:sticky!important;top:0;z-index:30!important;background:var(--ngx-grid-header-bg, #f8fafc)!important}.sticky-toggle{position:sticky!important;left:0;z-index:5;background:var(--ngx-grid-bg, #ffffff)}th.sticky-toggle{position:sticky!important;top:0;z-index:30!important;background:var(--ngx-grid-header-bg, #f8fafc)!important}.sticky-check{position:sticky!important;z-index:5;background:var(--ngx-grid-bg, #ffffff)}th.sticky-check{position:sticky!important;top:0;z-index:30!important;background:var(--ngx-grid-header-bg, #f8fafc)!important}.pinned-left-last,.sticky-toggle-last,.sticky-check-last{border-right:1px solid var(--ngx-grid-border, #cbd5e1)!important;box-shadow:4px 0 10px -3px #00000014}.grid-table.striped .grid-row:nth-child(2n) .pinned-left,.grid-table.striped .grid-row:nth-child(2n) .sticky-toggle,.grid-table.striped .grid-row:nth-child(2n) .sticky-check{background:var(--ngx-grid-stripe-bg, #f8fafc)}.grid-row:hover .pinned-left,.grid-row:hover .sticky-toggle,.grid-row:hover .sticky-check{background:var(--ngx-grid-hover-bg, #f5f3ff)!important}.grid-row.selected .pinned-left,.grid-row.selected .sticky-toggle,.grid-row.selected .sticky-check{background:var(--ngx-grid-selected-bg, #e0e7ff)!important}.grid-footer-row .pinned-left,.grid-footer-row .sticky-toggle,.grid-footer-row .sticky-check{background:var(--ngx-grid-header-bg, #f8fafc)}.pinned-right{position:sticky!important;z-index:5;background:var(--ngx-grid-bg, #ffffff)}th.pinned-right{position:sticky!important;top:0;z-index:30!important;background:var(--ngx-grid-header-bg, #f8fafc)!important}.pinned-right-first{border-left:1px solid var(--ngx-grid-border, #cbd5e1)!important;box-shadow:-4px 0 10px -3px #00000014}.grid-table.striped .grid-row:nth-child(2n) .pinned-right{background:var(--ngx-grid-stripe-bg, #f8fafc)}.grid-row:hover .pinned-right{background:var(--ngx-grid-hover-bg, #f5f3ff)!important}.grid-row.selected .pinned-right{background:var(--ngx-grid-selected-bg, #e0e7ff)!important}.grid-footer-row .pinned-right{background:var(--ngx-grid-header-bg, #f8fafc)}.grid-td.cell-focused{outline:2px solid var(--ngx-input-focus, #4f46e5)!important;outline-offset:-2px;z-index:5}.grid-td.cell-focused-editing{padding:0!important}.grid-td.cell-focused-editing .grid-edit-input{width:100%;height:100%;border:none;outline:none;padding:12px 18px;box-sizing:border-box;background:var(--ngx-grid-bg, #ffffff);color:var(--ngx-grid-text, #0f172a);font-family:inherit;font-size:inherit;border-radius:0}.grid-th[draggable=true]{cursor:grab}.grid-th[draggable=true]:active{cursor:grabbing}.grid-th.dragging{opacity:.4;background:var(--ngx-grid-hover-bg, #f1f5f9)!important;border:1.5px dashed var(--ngx-input-border, #cbd5e1)}.grid-th.drag-over{border-left:3px solid var(--ngx-input-focus, #4f46e5)!important}.sort-icon.active{color:var(--ngx-input-focus, #4f46e5);font-weight:700}.sort-order-badge{font-size:8px;line-height:1;background:var(--ngx-input-focus, #4f46e5);color:#fff;padding:2px 4px;border-radius:4px;vertical-align:super;margin-left:2px;font-weight:700}.grid-search-wrap{position:relative;display:inline-flex;align-items:center}.grid-search-input{padding:6px 30px 6px 12px;border:1px solid var(--ngx-grid-border, #cbd5e1);border-radius:8px;font-size:13px;font-family:inherit;background:var(--ngx-input-bg, #ffffff);color:var(--ngx-grid-text, #0f172a);outline:none;transition:all .2s cubic-bezier(.4,0,.2,1);width:180px}.grid-search-input:focus{border-color:var(--ngx-input-focus, #4f46e5);box-shadow:0 0 0 3px var(--primary-glow, rgba(79, 70, 229, .15));width:220px}.grid-search-clear{position:absolute;right:8px;background:transparent;border:none;color:var(--ngx-grid-text-secondary, #94a3b8);font-size:16px;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:2px;line-height:1}.grid-search-clear:hover{color:var(--ngx-grid-text, #0f172a)}.search-highlight{background-color:#fbbf2440;color:inherit;font-weight:600;padding:1px 2px;border-radius:4px}.grid-td.cell-selected{background:var(--ngx-grid-cell-selected-bg, rgba(79, 70, 229, .1))!important;outline:1.5px solid var(--ngx-grid-cell-selected-border, #4f46e5);outline-offset:-1.5px}.row-drag-handle{cursor:grab;-webkit-user-select:none;user-select:none;color:var(--ngx-grid-text-secondary, #94a3b8);display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:6px;padding:0;transition:all .2s ease}.row-drag-handle:hover{color:var(--ngx-input-focus, #4f46e5);background:var(--ngx-grid-hover-bg, #f1f5f9);transform:scale(1.1)}.row-drag-handle:active{cursor:grabbing;transform:scale(.95)}.grid-row{transition:background-color .15s ease,opacity .2s ease,transform .28s cubic-bezier(.2,.8,.2,1)}.grid-row.dragging-row td{opacity:.35;background:var(--ngx-grid-hover-bg, rgba(79, 70, 229, .04))!important;color:var(--ngx-grid-text-secondary, #94a3b8);transition:opacity .2s ease}.grid-row.drag-over-row td{border-top:2.5px solid var(--ngx-btn-primary-bg, #4f46e5)!important;background:#4f46e508!important;box-shadow:inset 0 2px 4px #4f46e50d}.grid-context-menu{position:absolute;width:215px;background:var(--ngx-grid-bg, rgba(255, 255, 255, .95));backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);border:1px solid var(--ngx-grid-border, #e2e8f0);border-radius:10px;box-shadow:0 10px 25px -5px #0000001a,0 8px 10px -6px #0000001a;z-index:2000;padding:6px;box-sizing:border-box;display:flex;flex-direction:column;gap:2px;font-family:inherit}.menu-item{display:flex;align-items:center;gap:8px;padding:8px 10px;border:none;background:transparent;color:var(--ngx-grid-text, #0f172a);font-size:12px;font-weight:500;cursor:pointer;text-align:left;border-radius:6px;transition:all .15s ease;font-family:inherit;width:100%;box-sizing:border-box;outline:none}.menu-item:hover:not(:disabled){background:var(--ngx-grid-hover-bg, #f1f5f9);color:var(--ngx-btn-primary-bg, #4f46e5)}.menu-item:disabled{opacity:.4;cursor:not-allowed}.menu-icon{font-size:14px;width:16px;text-align:center}.menu-divider{height:1px;background:var(--ngx-grid-border, #e2e8f0);margin:4px 6px}.grid-th-check input[type=checkbox],.grid-td-check input[type=checkbox],.checklist-item input[type=checkbox]{appearance:none;-webkit-appearance:none;width:16px;height:16px;border:1.5px solid var(--ngx-grid-border, #cbd5e1);border-radius:4px;outline:none;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;background:var(--ngx-grid-bg, #ffffff);transition:all .2s ease;margin:0;position:relative}.grid-th-check input[type=checkbox]:hover,.grid-td-check input[type=checkbox]:hover,.checklist-item input[type=checkbox]:hover{border-color:var(--ngx-input-focus, #4f46e5);box-shadow:0 0 0 2.5px #4f46e526}.grid-th-check input[type=checkbox]:checked,.grid-td-check input[type=checkbox]:checked,.checklist-item input[type=checkbox]:checked{background:var(--ngx-btn-primary-bg, #4f46e5);border-color:var(--ngx-btn-primary-bg, #4f46e5)}.grid-th-check input[type=checkbox]:checked:after,.grid-td-check input[type=checkbox]:checked:after,.checklist-item input[type=checkbox]:checked:after{content:\"\";display:block;width:4px;height:8px;border:solid #ffffff;border-width:0 2px 2px 0;transform:rotate(45deg);margin-bottom:2px}.grid-th-check input[type=checkbox]:indeterminate{background:var(--ngx-btn-primary-bg, #4f46e5);border-color:var(--ngx-btn-primary-bg, #4f46e5)}.grid-th-check input[type=checkbox]:indeterminate:after{content:\"\";display:block;width:8px;height:2px;background:#fff}.grid-grouping-panel{display:flex;align-items:center;padding:10px 16px;background:var(--ngx-grid-header-bg, #f8fafc);border:1.5px dashed var(--ngx-grid-border, #cbd5e1);border-radius:10px;margin-bottom:12px;font-size:12px;color:var(--ngx-grid-text-secondary, #64748b);transition:all .2s cubic-bezier(.4,0,.2,1);min-height:44px;box-sizing:border-box}.grid-grouping-panel.drag-over{background:var(--ngx-grid-hover-bg, rgba(79, 70, 229, .05));border-color:var(--ngx-input-focus, #4f46e5);border-style:solid;color:var(--ngx-input-focus, #4f46e5)}.grouping-panel-label{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.group-chip{display:inline-flex;align-items:center;gap:6px;background:var(--ngx-btn-primary-bg, #4f46e5);color:#fff;padding:3px 10px;border-radius:99px;font-size:11px;font-weight:700;box-shadow:0 2px 4px #4f46e526}.remove-group-btn{background:transparent;border:none;color:#fff;font-size:14px;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;line-height:1;opacity:.8;transition:opacity .15s}.remove-group-btn:hover{opacity:1}\n"] }]
|
|
6554
|
+
`, styles: [":host{display:block}.grid-table-wrap::-webkit-scrollbar,.checklist-scroll::-webkit-scrollbar{width:6px;height:6px}.grid-table-wrap::-webkit-scrollbar-track,.checklist-scroll::-webkit-scrollbar-track{background:transparent}.grid-table-wrap::-webkit-scrollbar-thumb,.checklist-scroll::-webkit-scrollbar-thumb{background:#64748b33;border-radius:99px}.grid-table-wrap::-webkit-scrollbar-thumb:hover,.checklist-scroll::-webkit-scrollbar-thumb:hover{background:#64748b66}.ngx-data-grid{position:relative;font-family:inherit;border:1px solid var(--ngx-grid-border, #e2e8f0);border-radius:var(--ngx-grid-radius, 12px);overflow:hidden;background:var(--ngx-grid-bg, #ffffff);box-shadow:0 10px 15px -3px #00000008,0 4px 6px -4px #00000008,0 0 0 1px #00000005;transition:background-color .3s,border-color .3s,box-shadow .3s}.grid-toolbar{display:flex;justify-content:space-between;align-items:center;padding:14px 18px;background:var(--ngx-grid-header-bg, #f8fafc);border-bottom:1px solid var(--ngx-grid-border, #e2e8f0);flex-wrap:wrap;gap:12px}.grid-toolbar-title{font-family:var(--ngx-heading-font-family, \"Outfit\", sans-serif);font-weight:700;font-size:15px;color:var(--ngx-grid-text, #0f172a);letter-spacing:-.01em}.grid-toolbar-actions{display:flex;gap:8px;flex-wrap:wrap}.grid-action-btn{padding:6px 14px;border:1px solid var(--ngx-grid-border, #e2e8f0);border-radius:8px;background:var(--ngx-grid-bg, #ffffff);color:var(--ngx-grid-text, #0f172a);font-size:12px;font-weight:600;cursor:pointer;font-family:inherit;transition:all .2s cubic-bezier(.4,0,.2,1);outline:none;display:inline-flex;align-items:center;gap:6px}.grid-action-btn,.column-config-btn,.pin-btn,.popover-btn,.grid-search-clear{min-height:44px}.grid-action-btn:focus-visible,.column-config-btn:focus-visible,.pin-btn:focus-visible,.popover-btn:focus-visible,.grid-search-clear:focus-visible,.checklist-item input:focus-visible{outline:3px solid var(--ngx-input-focus, #4f46e5);outline-offset:2px;z-index:1}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.column-config-item,.column-config-actions{display:flex;align-items:center}.column-config-item{justify-content:space-between;gap:8px;border-bottom:1px solid var(--ngx-grid-border, #e2e8f0)}.column-config-actions{gap:2px}.column-config-btn{width:44px;min-width:44px;padding:0;border:0;border-radius:4px;background:transparent;color:var(--ngx-grid-text, #0f172a);cursor:pointer}.column-config-btn:hover:not(:disabled),.column-config-btn[aria-pressed=true]{background:var(--ngx-grid-hover-bg, #e2e8f0);color:var(--ngx-input-focus, #4f46e5)}.column-config-btn:disabled{cursor:not-allowed;opacity:.45}.grid-action-btn:hover{background:var(--ngx-grid-hover-bg, #f8fafc);border-color:var(--ngx-input-focus, #4f46e5);color:var(--ngx-input-focus, #4f46e5);box-shadow:0 4px 6px -1px #4f46e514;transform:translateY(-.5px)}.grid-action-btn:active{transform:scale(.97)}@media (max-width: 600px){.grid-toolbar{align-items:stretch;padding:10px}.grid-toolbar-actions{width:100%}.grid-column-chooser-popover,.grid-filter-popover{max-width:calc(100% - 16px)}}.grid-table-wrap{overflow-x:auto;overflow-y:hidden}.grid-table{width:100%;border-collapse:collapse;font-size:13px;table-layout:fixed}.ngx-data-grid.compact .grid-td{padding:7px 12px;font-size:12px}.ngx-data-grid.compact .grid-th{padding:9px 12px;font-size:10px}.ngx-data-grid.compact .grid-grouping-panel,.ngx-data-grid.compact .grid-toolbar{padding:8px 14px}.clear-filters-btn{border-color:#ef444440!important;background:#ef44440d!important;color:#ef4444!important;font-weight:600}.clear-filters-btn:hover{background:#ef4444!important;color:#fff!important;border-color:transparent!important}.grid-th{position:sticky;top:0;z-index:10;padding:14px 18px;text-align:left;font-size:11px;font-weight:750;color:var(--ngx-grid-text-secondary, #64748b);background:var(--ngx-grid-header-bg, #f8fafc);border-bottom:2px solid var(--ngx-grid-border, #e2e8f0);white-space:nowrap;-webkit-user-select:none;user-select:none;text-transform:uppercase;letter-spacing:.06em;font-family:var(--ngx-heading-font-family, \"Outfit\", sans-serif);transition:background-color .2s ease}.grid-category-th{text-align:center;border-bottom:1px solid var(--ngx-grid-border, #e2e8f0);border-right:1px solid var(--ngx-grid-border, #e2e8f0)}.sub-header-row .grid-th{border-bottom:2px solid var(--ngx-grid-border, #e2e8f0);border-right:1px solid var(--ngx-grid-border, #f1f5f9)}.grid-th.sortable{cursor:pointer}.grid-th.sortable:hover{background:var(--ngx-grid-hover-bg, #f1f5f9);color:var(--ngx-grid-text, #0f172a)}.grid-th.sort-asc,.grid-th.sort-desc{color:var(--ngx-input-focus, #4f46e5);background:#4f46e505}.th-text{margin-right:4px}.sort-icon{font-size:10px;color:#cbd5e1;transition:color .2s ease}.sort-asc .sort-icon,.sort-desc .sort-icon{color:var(--ngx-input-focus, #4f46e5)}.th-content-wrapper{display:flex;align-items:center;justify-content:space-between;gap:6px;width:100%}.grid-filter-btn{background:transparent;border:none;color:var(--ngx-grid-text-secondary, #94a3b8);cursor:pointer;padding:4px;border-radius:6px;display:flex;align-items:center;justify-content:center;transition:all .2s}.grid-filter-btn:hover{background:var(--ngx-grid-hover-bg, #cbd5e1);color:var(--ngx-grid-text, #0f172a)}.grid-filter-btn.active{color:var(--ngx-input-focus, #4f46e5);background:#4f46e51a}.grid-resize-handle{position:absolute;right:0;top:0;bottom:0;width:6px;cursor:col-resize;background:transparent;z-index:10;transition:background-color .2s}.grid-resize-handle:hover,.grid-resize-handle.resizing{background:var(--ngx-input-focus, #4f46e5)}.grid-filter-popover,.grid-column-chooser-popover,.grid-context-menu{position:absolute;width:250px;background:var(--ngx-grid-bg-glass, rgba(255, 255, 255, .8));backdrop-filter:blur(16px) saturate(180%);-webkit-backdrop-filter:blur(16px) saturate(180%);border:1px solid rgba(255,255,255,.5);border-radius:14px;box-shadow:0 20px 25px -5px #00000014,0 10px 10px -5px #0000000a,0 0 0 1px #00000005;z-index:1000;padding:12px;box-sizing:border-box;display:flex;flex-direction:column;gap:12px;font-family:inherit;animation:popoverFadeIn .2s cubic-bezier(.16,1,.3,1) forwards;transform-origin:top center}.grid-column-chooser-popover{width:min(360px,100% - 16px)}.grid-context-menu{width:190px;padding:6px;gap:2px}@keyframes popoverFadeIn{0%{opacity:0;transform:scale(.95) translateY(-5px)}to{opacity:1;transform:scale(1) translateY(0)}}.checklist-search{padding:8px 12px;border:1px solid var(--ngx-grid-border, #cbd5e1);border-radius:8px;font-size:12px;font-family:inherit;outline:none;background:var(--ngx-input-bg, #ffffff);color:var(--ngx-grid-text, #0f172a);width:100%;box-sizing:border-box;margin-bottom:4px;transition:all .2s ease}.checklist-search:focus{border-color:var(--ngx-input-focus, #4f46e5);box-shadow:0 0 0 3px var(--primary-glow, rgba(79, 70, 229, .15))}.pinning-section{border-bottom:1px solid var(--ngx-grid-border, #e2e8f0);padding-bottom:10px}.pinning-actions{display:flex;gap:6px}.pin-btn{flex:1;padding:6px 4px;border:1px solid var(--ngx-grid-border, #cbd5e1);border-radius:6px;background:var(--ngx-input-bg, #ffffff);color:var(--ngx-grid-text, #0f172a);font-size:11px;font-weight:600;cursor:pointer;text-align:center;transition:all .15s ease;outline:none}.pin-btn:hover{border-color:var(--ngx-input-focus, #4f46e5);color:var(--ngx-input-focus, #4f46e5);background:#4f46e505}.pin-btn.active{border-color:var(--ngx-btn-primary-bg, #4f46e5);background:var(--ngx-btn-primary-bg, #4f46e5);color:#fff;box-shadow:0 2px 4px #4f46e526}.popover-section{display:flex;flex-direction:column;gap:6px}.popover-label{font-size:10px;font-weight:800;color:var(--ngx-grid-text-secondary, #64748b);text-transform:uppercase;letter-spacing:.06em}.text-filter-row{display:flex;flex-direction:column;gap:6px}.popover-select{padding:6px 10px;border:1px solid var(--ngx-grid-border, #cbd5e1);border-radius:8px;font-size:12px;font-family:inherit;outline:none;background:var(--ngx-input-bg, #ffffff);color:var(--ngx-grid-text, #0f172a);cursor:pointer}.popover-input{padding:6px 10px;border:1px solid var(--ngx-grid-border, #cbd5e1);border-radius:8px;font-size:12px;font-family:inherit;outline:none;background:var(--ngx-input-bg, #ffffff);color:var(--ngx-grid-text, #0f172a);transition:all .2s}.popover-input:focus{border-color:var(--ngx-input-focus, #4f46e5);box-shadow:0 0 0 3px var(--primary-glow, rgba(79, 70, 229, .15))}.checklist-section{border-top:1px solid var(--ngx-grid-border, #e2e8f0);padding-top:10px}.checklist-scroll{max-height:140px;overflow-y:auto;display:flex;flex-direction:column;gap:4px;border:1px solid var(--ngx-grid-border, #e2e8f0);border-radius:8px;padding:8px;background:#ffffff73}.checklist-item{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--ngx-grid-text, #0f172a);cursor:pointer;-webkit-user-select:none;user-select:none}.popover-footer{display:flex;justify-content:space-between;align-items:center;border-top:1px solid var(--ngx-grid-border, #e2e8f0);padding-top:10px;margin-top:4px}.footer-actions{display:flex;gap:6px}.popover-btn{padding:5px 12px;font-size:11px;font-weight:600;border-radius:6px;cursor:pointer;border:1px solid var(--ngx-grid-border, #cbd5e1);background:var(--ngx-grid-bg, #ffffff);color:var(--ngx-grid-text, #0f172a);transition:all .2s ease;font-family:inherit}.popover-btn:hover{background:var(--ngx-grid-hover-bg, #f8fafc);border-color:var(--ngx-input-border, #cbd5e1)}.popover-btn.apply{background:var(--ngx-btn-primary-bg, #4f46e5);color:#fff;border-color:var(--ngx-btn-primary-bg, #4f46e5)}.popover-btn.apply:hover{background:var(--ngx-btn-primary-hover, #4338ca);border-color:var(--ngx-btn-primary-hover, #4338ca);box-shadow:0 4px 6px -1px #4f46e533}.popover-btn.clear{color:#ef4444;border-color:transparent;background:transparent}.popover-btn.clear:hover{background:#fef2f2}.grid-group-row td{background:var(--ngx-grid-header-bg, #f8fafc);border-bottom:1.5px solid var(--ngx-grid-border, #e2e8f0);color:var(--ngx-grid-text, #0f172a);font-size:12px;font-weight:600;padding:12px 18px;cursor:pointer}.group-toggle{border:none;background:transparent;margin-right:6px;cursor:pointer;color:var(--ngx-grid-text-secondary, #64748b);font-size:12px;transition:transform .2s ease}.group-count{color:var(--ngx-grid-text-secondary, #64748b);margin-left:6px;font-weight:500}.grid-row{border-bottom:1px solid var(--ngx-grid-border, #f1f5f9);transition:background-color .15s ease}.grid-row:hover{background:var(--ngx-grid-hover-bg, #f5f3ff)!important}.grid-row.selected{background:var(--ngx-grid-selected-bg, #e0e7ff)!important}.grid-row.selected:hover{background:var(--ngx-grid-selected-bg-hover, #c7d2fe)!important}.grid-table.striped .grid-row:nth-child(2n){background:var(--ngx-grid-stripe-bg, #f8fafc)}.grid-table.striped .grid-row:nth-child(2n):hover{background:var(--ngx-grid-hover-bg, #f5f3ff)!important}.grid-table.striped .grid-row.selected{background:var(--ngx-grid-selected-bg, #e0e7ff)!important}.grid-td{padding:12px 18px;color:var(--ngx-grid-text, #0f172a);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:middle;box-sizing:border-box}.grid-th-check,.grid-td-check,.grid-th-toggle,.grid-td-toggle,.grid-td-reorder,.grid-th-reorder{width:44px!important;text-align:center;padding:0!important;text-overflow:clip!important}.toggle-btn{border:none;background:transparent;color:var(--ngx-grid-text-secondary, #64748b);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:6px;transition:all .2s cubic-bezier(.4,0,.2,1);outline:none}.toggle-btn:hover{background:var(--ngx-grid-hover-bg, #f1f5f9);color:var(--ngx-input-focus, #4f46e5)}.toggle-btn .chevron-icon{transition:transform .25s cubic-bezier(.4,0,.2,1)}.toggle-btn.expanded .chevron-icon{transform:rotate(90deg);color:var(--ngx-input-focus, #4f46e5)}.grid-detail-row{background:var(--ngx-grid-bg, #ffffff)}.grid-detail-cell{padding:0!important;border-bottom:1px solid var(--ngx-grid-border, #e2e8f0);white-space:normal}.detail-wrapper{max-height:0;opacity:0;overflow:hidden;padding:0 24px;transition:max-height .3s cubic-bezier(.4,0,.2,1),opacity .25s ease-out,padding .3s cubic-bezier(.4,0,.2,1);box-sizing:border-box}.detail-wrapper.expanded{max-height:800px;opacity:1;padding:16px 24px 20px}.grid-edit-input{width:100%;min-width:80px;padding:6px 10px;border:1px solid var(--ngx-grid-border, #cbd5e1);border-radius:8px;font-size:12px;font-family:inherit;background:var(--ngx-input-bg, #ffffff);color:var(--ngx-grid-text, #0f172a);box-sizing:border-box;outline:none;transition:border-color .2s,box-shadow .2s}.grid-edit-input:focus{border-color:var(--ngx-input-focus, #4f46e5);box-shadow:0 0 0 3px var(--primary-glow, rgba(79, 70, 229, .15))}.grid-actions{white-space:nowrap}.action-btn{border:1px solid var(--ngx-grid-border, #cbd5e1);background:var(--ngx-grid-bg, #ffffff);color:var(--ngx-grid-text, #0f172a);border-radius:8px;padding:6px 12px;font-size:12px;font-weight:600;margin-right:6px;cursor:pointer;transition:all .2s;outline:none}.action-btn:hover{background:var(--ngx-grid-hover-bg, #f8fafc);border-color:var(--ngx-input-border, #cbd5e1)}.action-btn.save{border-color:var(--ngx-btn-primary-bg, #4f46e5);background:var(--ngx-btn-primary-bg, #4f46e5);color:#fff}.action-btn.save:hover{background:var(--ngx-btn-primary-hover, #4338ca);border-color:var(--ngx-btn-primary-hover, #4338ca);box-shadow:0 4px 6px -1px #4f46e533}.action-btn:last-child{margin-right:0}.grid-loading-cell,.grid-empty-cell{padding:48px;text-align:center;color:var(--ngx-grid-text-secondary, #64748b);font-weight:500}.grid-spinner{width:28px;height:28px;border:3.5px solid var(--ngx-grid-border, #e2e8f0);border-top-color:var(--ngx-btn-primary-bg, #4f46e5);border-radius:50%;animation:spin .8s cubic-bezier(.4,0,.2,1) infinite;margin:0 auto}@keyframes spin{to{transform:rotate(360deg)}}.grid-pagination{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;border-top:1px solid var(--ngx-grid-border, #e2e8f0);background:var(--ngx-grid-header-bg, #f8fafc);flex-wrap:wrap;gap:16px}.pagination-left{display:flex;align-items:center;gap:20px;flex-wrap:wrap}.page-info{font-size:13px;color:var(--ngx-grid-text-secondary, #64748b);font-weight:500}.page-info-highlight{color:var(--ngx-grid-text, #0f172a);font-weight:600}.page-size-selector{display:flex;align-items:center;gap:8px}.page-size-label{font-size:12px;color:var(--ngx-grid-text-secondary, #64748b);font-weight:500}.page-size-select{padding:4px 28px 4px 10px;border:1px solid var(--ngx-grid-border, #cbd5e1);border-radius:6px;font-size:12px;font-weight:600;background:var(--ngx-grid-bg, #ffffff);color:var(--ngx-grid-text, #0f172a);cursor:pointer;outline:none;transition:all .2s;appearance:none;-webkit-appearance:none;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E\");background-repeat:no-repeat;background-position:right 8px center;background-size:12px}.page-size-select:hover{border-color:var(--ngx-input-border-hover, #94a3b8)}.page-size-select:focus{border-color:var(--ngx-input-focus, #4f46e5);box-shadow:0 0 0 3px var(--primary-glow, rgba(79, 70, 229, .15))}.page-btns{display:flex;align-items:center;gap:6px}.page-numbers{display:flex;gap:4px}.page-btn{min-width:32px;height:32px;padding:0 8px;font-size:13px;font-weight:600;border:1px solid var(--ngx-grid-border, #e2e8f0);background:var(--ngx-grid-bg, #ffffff);border-radius:8px;cursor:pointer;font-family:inherit;color:var(--ngx-grid-text, #0f172a);transition:all .2s cubic-bezier(.4,0,.2,1);outline:none;display:inline-flex;align-items:center;justify-content:center}.page-btn.ctrl{color:var(--ngx-grid-text-secondary, #64748b);background:var(--ngx-grid-bg, #ffffff)}.page-btn:hover:not(:disabled){background:var(--ngx-grid-hover-bg, #f1f5f9);border-color:var(--ngx-input-border-hover, #cbd5e1);color:var(--ngx-input-focus, #4f46e5);transform:translateY(-.5px)}.page-btn.active{background:var(--ngx-btn-primary-bg, #4f46e5);color:#fff!important;border-color:var(--ngx-btn-primary-bg, #4f46e5);box-shadow:0 4px 6px -1px #4f46e540}.page-btn:disabled{opacity:.35;cursor:not-allowed;transform:none!important}.grid-footer-row td{background:var(--ngx-grid-header-bg, #f8fafc);border-top:2px solid var(--ngx-grid-border, #e2e8f0);font-size:12px;padding:12px 18px;color:var(--ngx-grid-text, #0f172a)}.agg-label{font-size:10px;font-weight:800;color:var(--ngx-grid-text-secondary, #64748b);text-transform:uppercase;letter-spacing:.05em}.agg-value{font-weight:700;color:var(--ngx-input-focus, #4f46e5)}.pinned-left{position:sticky!important;z-index:5;background:var(--ngx-grid-bg, #ffffff)}th.pinned-left{position:sticky!important;top:0;z-index:30!important;background:var(--ngx-grid-header-bg, #f8fafc)!important}.sticky-toggle{position:sticky!important;left:0;z-index:5;background:var(--ngx-grid-bg, #ffffff)}th.sticky-toggle{position:sticky!important;top:0;z-index:30!important;background:var(--ngx-grid-header-bg, #f8fafc)!important}.sticky-check{position:sticky!important;z-index:5;background:var(--ngx-grid-bg, #ffffff)}th.sticky-check{position:sticky!important;top:0;z-index:30!important;background:var(--ngx-grid-header-bg, #f8fafc)!important}.pinned-left-last,.sticky-toggle-last,.sticky-check-last{border-right:1px solid var(--ngx-grid-border, #cbd5e1)!important;box-shadow:4px 0 10px -3px #00000014}.grid-table.striped .grid-row:nth-child(2n) .pinned-left,.grid-table.striped .grid-row:nth-child(2n) .sticky-toggle,.grid-table.striped .grid-row:nth-child(2n) .sticky-check{background:var(--ngx-grid-stripe-bg, #f8fafc)}.grid-row:hover .pinned-left,.grid-row:hover .sticky-toggle,.grid-row:hover .sticky-check{background:var(--ngx-grid-hover-bg, #f5f3ff)!important}.grid-row.selected .pinned-left,.grid-row.selected .sticky-toggle,.grid-row.selected .sticky-check{background:var(--ngx-grid-selected-bg, #e0e7ff)!important}.grid-footer-row .pinned-left,.grid-footer-row .sticky-toggle,.grid-footer-row .sticky-check{background:var(--ngx-grid-header-bg, #f8fafc)}.pinned-right{position:sticky!important;z-index:5;background:var(--ngx-grid-bg, #ffffff)}th.pinned-right{position:sticky!important;top:0;z-index:30!important;background:var(--ngx-grid-header-bg, #f8fafc)!important}.pinned-right-first{border-left:1px solid var(--ngx-grid-border, #cbd5e1)!important;box-shadow:-4px 0 10px -3px #00000014}.grid-table.striped .grid-row:nth-child(2n) .pinned-right{background:var(--ngx-grid-stripe-bg, #f8fafc)}.grid-row:hover .pinned-right{background:var(--ngx-grid-hover-bg, #f5f3ff)!important}.grid-row.selected .pinned-right{background:var(--ngx-grid-selected-bg, #e0e7ff)!important}.grid-footer-row .pinned-right{background:var(--ngx-grid-header-bg, #f8fafc)}.grid-td.cell-focused{outline:2px solid var(--ngx-input-focus, #4f46e5)!important;outline-offset:-2px;z-index:5}.grid-td.cell-focused-editing{padding:0!important}.grid-td.cell-focused-editing .grid-edit-input{width:100%;height:100%;border:none;outline:none;padding:12px 18px;box-sizing:border-box;background:var(--ngx-grid-bg, #ffffff);color:var(--ngx-grid-text, #0f172a);font-family:inherit;font-size:inherit;border-radius:0}.grid-th[draggable=true]{cursor:grab}.grid-th[draggable=true]:active{cursor:grabbing}.grid-th.dragging{opacity:.4;background:var(--ngx-grid-hover-bg, #f1f5f9)!important;border:1.5px dashed var(--ngx-input-border, #cbd5e1)}.grid-th.drag-over{border-left:3px solid var(--ngx-input-focus, #4f46e5)!important}.sort-icon.active{color:var(--ngx-input-focus, #4f46e5);font-weight:700}.sort-order-badge{font-size:8px;line-height:1;background:var(--ngx-input-focus, #4f46e5);color:#fff;padding:2px 4px;border-radius:4px;vertical-align:super;margin-left:2px;font-weight:700}.grid-search-wrap{position:relative;display:inline-flex;align-items:center}.grid-search-input{padding:6px 30px 6px 12px;border:1px solid var(--ngx-grid-border, #cbd5e1);border-radius:8px;font-size:13px;font-family:inherit;background:var(--ngx-input-bg, #ffffff);color:var(--ngx-grid-text, #0f172a);outline:none;transition:all .2s cubic-bezier(.4,0,.2,1);width:180px}.grid-search-input:focus{border-color:var(--ngx-input-focus, #4f46e5);box-shadow:0 0 0 3px var(--primary-glow, rgba(79, 70, 229, .15));width:220px}.grid-search-clear{position:absolute;right:8px;background:transparent;border:none;color:var(--ngx-grid-text-secondary, #94a3b8);font-size:16px;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:2px;line-height:1}.grid-search-clear:hover{color:var(--ngx-grid-text, #0f172a)}.search-highlight{background-color:#fbbf2440;color:inherit;font-weight:600;padding:1px 2px;border-radius:4px}.grid-td.cell-selected{background:var(--ngx-grid-cell-selected-bg, rgba(79, 70, 229, .1))!important;outline:1.5px solid var(--ngx-grid-cell-selected-border, #4f46e5);outline-offset:-1.5px}.row-drag-handle{cursor:grab;-webkit-user-select:none;user-select:none;color:var(--ngx-grid-text-secondary, #94a3b8);display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:6px;padding:0;transition:all .2s ease}.row-drag-handle:hover{color:var(--ngx-input-focus, #4f46e5);background:var(--ngx-grid-hover-bg, #f1f5f9);transform:scale(1.1)}.row-drag-handle:active{cursor:grabbing;transform:scale(.95)}.grid-row{transition:background-color .15s ease,opacity .2s ease,transform .28s cubic-bezier(.2,.8,.2,1)}.grid-row.dragging-row td{opacity:.35;background:var(--ngx-grid-hover-bg, rgba(79, 70, 229, .04))!important;color:var(--ngx-grid-text-secondary, #94a3b8);transition:opacity .2s ease}.grid-row.drag-over-row td{border-top:2.5px solid var(--ngx-btn-primary-bg, #4f46e5)!important;background:#4f46e508!important;box-shadow:inset 0 2px 4px #4f46e50d}.grid-context-menu{position:absolute;width:215px;background:var(--ngx-grid-bg, rgba(255, 255, 255, .95));backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);border:1px solid var(--ngx-grid-border, #e2e8f0);border-radius:10px;box-shadow:0 10px 25px -5px #0000001a,0 8px 10px -6px #0000001a;z-index:2000;padding:6px;box-sizing:border-box;display:flex;flex-direction:column;gap:2px;font-family:inherit}.menu-item{display:flex;align-items:center;gap:8px;padding:8px 10px;border:none;background:transparent;color:var(--ngx-grid-text, #0f172a);font-size:12px;font-weight:500;cursor:pointer;text-align:left;border-radius:6px;transition:all .15s ease;font-family:inherit;width:100%;box-sizing:border-box;outline:none}.menu-item:hover:not(:disabled){background:var(--ngx-grid-hover-bg, #f1f5f9);color:var(--ngx-btn-primary-bg, #4f46e5)}.menu-item:disabled{opacity:.4;cursor:not-allowed}.menu-icon{font-size:14px;width:16px;text-align:center}.menu-divider{height:1px;background:var(--ngx-grid-border, #e2e8f0);margin:4px 6px}.grid-th-check input[type=checkbox],.grid-td-check input[type=checkbox],.checklist-item input[type=checkbox]{appearance:none;-webkit-appearance:none;width:16px;height:16px;border:1.5px solid var(--ngx-grid-border, #cbd5e1);border-radius:4px;outline:none;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;background:var(--ngx-grid-bg, #ffffff);transition:all .2s ease;margin:0;position:relative}.grid-th-check input[type=checkbox]:hover,.grid-td-check input[type=checkbox]:hover,.checklist-item input[type=checkbox]:hover{border-color:var(--ngx-input-focus, #4f46e5);box-shadow:0 0 0 2.5px #4f46e526}.grid-th-check input[type=checkbox]:checked,.grid-td-check input[type=checkbox]:checked,.checklist-item input[type=checkbox]:checked{background:var(--ngx-btn-primary-bg, #4f46e5);border-color:var(--ngx-btn-primary-bg, #4f46e5)}.grid-th-check input[type=checkbox]:checked:after,.grid-td-check input[type=checkbox]:checked:after,.checklist-item input[type=checkbox]:checked:after{content:\"\";display:block;width:4px;height:8px;border:solid #ffffff;border-width:0 2px 2px 0;transform:rotate(45deg);margin-bottom:2px}.grid-th-check input[type=checkbox]:indeterminate{background:var(--ngx-btn-primary-bg, #4f46e5);border-color:var(--ngx-btn-primary-bg, #4f46e5)}.grid-th-check input[type=checkbox]:indeterminate:after{content:\"\";display:block;width:8px;height:2px;background:#fff}.grid-grouping-panel{display:flex;align-items:center;padding:10px 16px;background:var(--ngx-grid-header-bg, #f8fafc);border:1.5px dashed var(--ngx-grid-border, #cbd5e1);border-radius:10px;margin-bottom:12px;font-size:12px;color:var(--ngx-grid-text-secondary, #64748b);transition:all .2s cubic-bezier(.4,0,.2,1);min-height:44px;box-sizing:border-box}.grid-grouping-panel.drag-over{background:var(--ngx-grid-hover-bg, rgba(79, 70, 229, .05));border-color:var(--ngx-input-focus, #4f46e5);border-style:solid;color:var(--ngx-input-focus, #4f46e5)}.grouping-panel-label{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.group-chip{display:inline-flex;align-items:center;gap:6px;background:var(--ngx-btn-primary-bg, #4f46e5);color:#fff;padding:3px 10px;border-radius:99px;font-size:11px;font-weight:700;box-shadow:0 2px 4px #4f46e526}.remove-group-btn{background:transparent;border:none;color:#fff;font-size:14px;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;line-height:1;opacity:.8;transition:opacity .15s}.remove-group-btn:hover{opacity:1}\n"] }]
|
|
5030
6555
|
}], ctorParameters: () => [], propDecorators: { cellTemplates: [{
|
|
5031
6556
|
type: ContentChildren,
|
|
5032
6557
|
args: [NgxGridCellTemplateDirective]
|
|
@@ -5044,7 +6569,61 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
5044
6569
|
args: ['keydown', ['$event']]
|
|
5045
6570
|
}] } });
|
|
5046
6571
|
|
|
6572
|
+
function isRecord(value) {
|
|
6573
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
6574
|
+
}
|
|
6575
|
+
function isGridPersistedState(value) {
|
|
6576
|
+
if (!isRecord(value))
|
|
6577
|
+
return false;
|
|
6578
|
+
const page = value['page'];
|
|
6579
|
+
const pageSize = value['pageSize'];
|
|
6580
|
+
const pinnedColumns = value['pinnedColumns'];
|
|
6581
|
+
return (Number.isInteger(page) &&
|
|
6582
|
+
Number(page) >= 1 &&
|
|
6583
|
+
Number.isInteger(pageSize) &&
|
|
6584
|
+
Number(pageSize) > 0 &&
|
|
6585
|
+
Array.isArray(value['columnOrder']) &&
|
|
6586
|
+
value['columnOrder'].every(column => typeof column === 'string') &&
|
|
6587
|
+
Array.isArray(value['sorts']) &&
|
|
6588
|
+
value['sorts'].every(sort => isRecord(sort) && typeof sort['field'] === 'string' && (sort['dir'] === 'asc' || sort['dir'] === 'desc')) &&
|
|
6589
|
+
Array.isArray(value['filters']) &&
|
|
6590
|
+
value['filters'].every(filter => isRecord(filter) && typeof filter['field'] === 'string') &&
|
|
6591
|
+
Array.isArray(value['groups']) &&
|
|
6592
|
+
value['groups'].every(group => isRecord(group) && typeof group['field'] === 'string') &&
|
|
6593
|
+
Array.isArray(value['hiddenColumns']) &&
|
|
6594
|
+
value['hiddenColumns'].every(column => typeof column === 'string') &&
|
|
6595
|
+
isRecord(value['columnWidths']) &&
|
|
6596
|
+
Object.values(value['columnWidths']).every(width => typeof width === 'number' && Number.isFinite(width) && width > 0) &&
|
|
6597
|
+
isRecord(pinnedColumns) &&
|
|
6598
|
+
Object.values(pinnedColumns).every(pin => pin === 'left' || pin === 'right' || pin === null));
|
|
6599
|
+
}
|
|
5047
6600
|
class GridStateService {
|
|
6601
|
+
exportSavedView(name, state) {
|
|
6602
|
+
const trimmedName = name.trim();
|
|
6603
|
+
if (!trimmedName) {
|
|
6604
|
+
throw new TypeError('A saved grid view must have a non-empty name.');
|
|
6605
|
+
}
|
|
6606
|
+
if (!isGridPersistedState(state)) {
|
|
6607
|
+
throw new TypeError('Cannot export an invalid grid state.');
|
|
6608
|
+
}
|
|
6609
|
+
const savedView = { version: 1, name: trimmedName, state };
|
|
6610
|
+
return JSON.stringify(savedView);
|
|
6611
|
+
}
|
|
6612
|
+
importSavedView(serialized) {
|
|
6613
|
+
const parsed = JSON.parse(serialized);
|
|
6614
|
+
if (!isRecord(parsed) ||
|
|
6615
|
+
parsed['version'] !== 1 ||
|
|
6616
|
+
typeof parsed['name'] !== 'string' ||
|
|
6617
|
+
!parsed['name'].trim() ||
|
|
6618
|
+
!isGridPersistedState(parsed['state'])) {
|
|
6619
|
+
throw new TypeError('Saved grid view is invalid or uses an unsupported version.');
|
|
6620
|
+
}
|
|
6621
|
+
return {
|
|
6622
|
+
version: 1,
|
|
6623
|
+
name: parsed['name'],
|
|
6624
|
+
state: parsed['state'],
|
|
6625
|
+
};
|
|
6626
|
+
}
|
|
5048
6627
|
/**
|
|
5049
6628
|
* Save grid state to localStorage
|
|
5050
6629
|
* @param key Storage key
|
|
@@ -6195,7 +7774,7 @@ class GridKeyboardService {
|
|
|
6195
7774
|
type: 'extend-selection',
|
|
6196
7775
|
row: this.focusedRow(),
|
|
6197
7776
|
col: this.focusedCol(),
|
|
6198
|
-
direction
|
|
7777
|
+
direction,
|
|
6199
7778
|
};
|
|
6200
7779
|
}
|
|
6201
7780
|
canEditCurrentCell() {
|
|
@@ -6719,11 +8298,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
6719
8298
|
/*
|
|
6720
8299
|
* Public API Surface — secondary entry point: ngx-core-components/grid
|
|
6721
8300
|
*/
|
|
6722
|
-
// ─── Core Component & Directives ──────────────────────────────────────────
|
|
6723
8301
|
|
|
6724
8302
|
/**
|
|
6725
8303
|
* Generated bundle index. Do not edit.
|
|
6726
8304
|
*/
|
|
6727
8305
|
|
|
6728
|
-
export { DataGridComponent, GridClipboardService, GridEditService, GridExportService, GridExportXlsxService, GridFilterBuilderComponent, GridKeyboardService, GridSelectionService, GridStateService, GridStatusBarComponent, GridVirtualizationService, NgxGridCellTemplateDirective, NgxGridEditCellTemplateDirective, NgxGridFooterTemplateDirective, NgxGridHeaderTemplateDirective, PivotGridComponent, applyFilterExpression, applyGlobalSearch, applyLegacyFilters, compareValues, computeAggregate, computeGroupAggregates, computeStatusBarAggregates, evaluateCondition, evaluateExpression, formatAggregateValue, naturalCompare, sortByField, sortByMultipleFields };
|
|
8306
|
+
export { DataGridComponent, GridClipboardService, GridEditService, GridExportService, GridExportXlsxService, GridFilterBuilderComponent, GridKeyboardService, GridRemoteDataController, GridSelectionService, GridStateService, GridStatusBarComponent, GridVirtualizationService, NgxGridCellTemplateDirective, NgxGridEditCellTemplateDirective, NgxGridFooterTemplateDirective, NgxGridHeaderTemplateDirective, PivotGridComponent, applyFilterExpression, applyGlobalSearch, applyLegacyFilters, compareValues, computeAggregate, computeGroupAggregates, computeStatusBarAggregates, evaluateCondition, evaluateExpression, formatAggregateValue, naturalCompare, sortByField, sortByMultipleFields };
|
|
6729
8307
|
//# sourceMappingURL=ngx-core-components-grid.mjs.map
|