ngx-core-components 0.3.31 → 0.3.32
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 +988 -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/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/column-range-chart/column-range-chart.component.d.ts +5 -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/heatmap-chart/heatmap-chart.component.d.ts +4 -0
- package/charts/line-chart/line-chart.component.d.ts +2 -0
- package/charts/lollipop-chart/lollipop-chart.component.d.ts +5 -1
- package/charts/marimekko-chart/marimekko-chart.component.d.ts +25 -1
- package/charts/pie-chart/pie-chart.component.d.ts +9 -0
- package/charts/pyramid-chart/pyramid-chart.component.d.ts +5 -0
- 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/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/sunburst-chart/sunburst-chart.component.d.ts +6 -3
- package/charts/treemap-chart/treemap-chart.component.d.ts +6 -4
- package/charts/waterfall-chart/waterfall-chart.component.d.ts +8 -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 +1399 -875
- package/fesm2022/ngx-core-components-charts.mjs.map +1 -1
- package/fesm2022/ngx-core-components-grid.mjs +2075 -545
- package/fesm2022/ngx-core-components-grid.mjs.map +1 -1
- package/fesm2022/ngx-core-components-i18n.mjs +129 -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 +71 -53
- 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 +19 -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 +94 -1
- package/i18n/public-api.d.ts +1 -1
- package/inputs/form-builder/form-builder.component.d.ts +17 -1
- package/package.json +6 -2
- 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,26 @@ 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();
|
|
2229
2469
|
}
|
|
2230
2470
|
isColumnPinned(field) {
|
|
2231
2471
|
if (!field)
|
|
@@ -2244,20 +2484,20 @@ class DataGridComponent {
|
|
|
2244
2484
|
const overrides = { ...this.columnPinnedOverrides() };
|
|
2245
2485
|
overrides[field] = currentlyPinned ? null : 'left';
|
|
2246
2486
|
this.columnPinnedOverrides.set(overrides);
|
|
2247
|
-
this.
|
|
2487
|
+
this.closeContextMenu();
|
|
2248
2488
|
}
|
|
2249
2489
|
contextMenuHideColumn(field) {
|
|
2250
2490
|
if (field) {
|
|
2251
2491
|
this.toggleColumnVisibility(field);
|
|
2252
2492
|
}
|
|
2253
|
-
this.
|
|
2493
|
+
this.closeContextMenu();
|
|
2254
2494
|
}
|
|
2255
2495
|
contextMenuClearFilters() {
|
|
2256
2496
|
this.filterStates.set(new Map());
|
|
2257
2497
|
this.currentPage.set(1);
|
|
2258
2498
|
this.filterChange.emit({ filters: [] });
|
|
2259
2499
|
this.emitDataState();
|
|
2260
|
-
this.
|
|
2500
|
+
this.closeContextMenu();
|
|
2261
2501
|
}
|
|
2262
2502
|
contextMenuCopy() {
|
|
2263
2503
|
const text = this.getSelectedCellsText();
|
|
@@ -2266,7 +2506,7 @@ class DataGridComponent {
|
|
|
2266
2506
|
console.error('Failed to copy to clipboard', err);
|
|
2267
2507
|
});
|
|
2268
2508
|
}
|
|
2269
|
-
this.
|
|
2509
|
+
this.closeContextMenu();
|
|
2270
2510
|
}
|
|
2271
2511
|
onCellMouseDown(event, row, colField) {
|
|
2272
2512
|
if (!this.cellSelection())
|
|
@@ -2274,7 +2514,11 @@ class DataGridComponent {
|
|
|
2274
2514
|
if (event.button !== 0)
|
|
2275
2515
|
return;
|
|
2276
2516
|
const target = event.target;
|
|
2277
|
-
if (target &&
|
|
2517
|
+
if (target &&
|
|
2518
|
+
(target.closest('.grid-edit-input') ||
|
|
2519
|
+
target.closest('.action-btn') ||
|
|
2520
|
+
target.closest('.toggle-btn') ||
|
|
2521
|
+
target.closest('input[type="checkbox"]'))) {
|
|
2278
2522
|
return;
|
|
2279
2523
|
}
|
|
2280
2524
|
event.preventDefault();
|
|
@@ -2283,7 +2527,7 @@ class DataGridComponent {
|
|
|
2283
2527
|
this.isCellDragging.set(true);
|
|
2284
2528
|
this.cellSelectionChange.emit({
|
|
2285
2529
|
start: { row, colField },
|
|
2286
|
-
end: { row, colField }
|
|
2530
|
+
end: { row, colField },
|
|
2287
2531
|
});
|
|
2288
2532
|
}
|
|
2289
2533
|
onCellMouseEnter(row, colField) {
|
|
@@ -2294,17 +2538,17 @@ class DataGridComponent {
|
|
|
2294
2538
|
if (start) {
|
|
2295
2539
|
this.cellSelectionChange.emit({
|
|
2296
2540
|
start,
|
|
2297
|
-
end: { row, colField }
|
|
2541
|
+
end: { row, colField },
|
|
2298
2542
|
});
|
|
2299
2543
|
}
|
|
2300
2544
|
}
|
|
2301
2545
|
openColumnChooser(event) {
|
|
2302
2546
|
event.stopPropagation();
|
|
2303
2547
|
if (this.activeColumnChooserPopover()) {
|
|
2304
|
-
this.
|
|
2548
|
+
this.closeColumnChooser();
|
|
2305
2549
|
return;
|
|
2306
2550
|
}
|
|
2307
|
-
this.
|
|
2551
|
+
this.closeFilterPopover(false);
|
|
2308
2552
|
const buttonEl = event.currentTarget;
|
|
2309
2553
|
const gridEl = this.elementRef.nativeElement.querySelector('.ngx-data-grid');
|
|
2310
2554
|
const buttonRect = buttonEl.getBoundingClientRect();
|
|
@@ -2313,8 +2557,49 @@ class DataGridComponent {
|
|
|
2313
2557
|
const left = buttonRect.left - gridRect.left;
|
|
2314
2558
|
this.activeColumnChooserPopover.set({
|
|
2315
2559
|
top,
|
|
2316
|
-
left: Math.min(left, gridRect.width -
|
|
2560
|
+
left: Math.max(8, Math.min(left, gridRect.width - 368)),
|
|
2317
2561
|
});
|
|
2562
|
+
afterNextRender(() => this.elementRef.nativeElement.querySelector(`#${this.instanceId}-column-chooser input[type="checkbox"]`)?.focus(), { injector: this.injector });
|
|
2563
|
+
}
|
|
2564
|
+
closeColumnChooser(restoreFocus = true) {
|
|
2565
|
+
this.activeColumnChooserPopover.set(null);
|
|
2566
|
+
if (restoreFocus) {
|
|
2567
|
+
const trigger = this.elementRef.nativeElement.querySelector(`[aria-controls="${this.instanceId}-column-chooser"]`);
|
|
2568
|
+
trigger?.focus();
|
|
2569
|
+
}
|
|
2570
|
+
}
|
|
2571
|
+
openFilterBuilder(event) {
|
|
2572
|
+
this.filterBuilderTrigger = event.currentTarget;
|
|
2573
|
+
this.isFilterBuilderOpen.set(true);
|
|
2574
|
+
afterNextRender(() => this.elementRef.nativeElement.querySelector('.filter-builder-panel')?.focus(), { injector: this.injector });
|
|
2575
|
+
}
|
|
2576
|
+
closeFilterBuilder() {
|
|
2577
|
+
this.isFilterBuilderOpen.set(false);
|
|
2578
|
+
const trigger = this.filterBuilderTrigger;
|
|
2579
|
+
this.filterBuilderTrigger = null;
|
|
2580
|
+
trigger?.focus();
|
|
2581
|
+
}
|
|
2582
|
+
columnIndex(field) {
|
|
2583
|
+
return this.fullColumnOrder().indexOf(field);
|
|
2584
|
+
}
|
|
2585
|
+
moveColumn(field, direction) {
|
|
2586
|
+
const order = this.fullColumnOrder();
|
|
2587
|
+
const index = order.indexOf(field);
|
|
2588
|
+
const nextIndex = index + direction;
|
|
2589
|
+
if (index < 0 || nextIndex < 0 || nextIndex >= order.length)
|
|
2590
|
+
return;
|
|
2591
|
+
[order[index], order[nextIndex]] = [order[nextIndex], order[index]];
|
|
2592
|
+
this.columnOrder.set(order);
|
|
2593
|
+
const columnsByField = new Map(this.columns().map(column => [column.field, column]));
|
|
2594
|
+
const reorderedColumns = order
|
|
2595
|
+
.map(columnField => columnsByField.get(columnField))
|
|
2596
|
+
.filter((column) => column !== undefined);
|
|
2597
|
+
this.columnReorder.emit({ columns: reorderedColumns });
|
|
2598
|
+
}
|
|
2599
|
+
fullColumnOrder() {
|
|
2600
|
+
const fields = this.columns().map(column => column.field);
|
|
2601
|
+
const currentOrder = this.columnOrder().filter(field => fields.includes(field));
|
|
2602
|
+
return [...currentOrder, ...fields.filter(field => !currentOrder.includes(field))];
|
|
2318
2603
|
}
|
|
2319
2604
|
toggleColumnVisibility(field) {
|
|
2320
2605
|
const hidden = new Set(this.hiddenColumns());
|
|
@@ -2405,7 +2690,7 @@ class DataGridComponent {
|
|
|
2405
2690
|
const newWidth = Math.max(50, this.resizeStartWidth + deltaX);
|
|
2406
2691
|
this.columnWidths.update(widths => ({
|
|
2407
2692
|
...widths,
|
|
2408
|
-
[this.resizingField]: newWidth
|
|
2693
|
+
[this.resizingField]: newWidth,
|
|
2409
2694
|
}));
|
|
2410
2695
|
};
|
|
2411
2696
|
const onMouseUp = () => {
|
|
@@ -2439,7 +2724,7 @@ class DataGridComponent {
|
|
|
2439
2724
|
const computedWidth = Math.max(60, Math.min(600, longestText.length * 8 + padding));
|
|
2440
2725
|
this.columnWidths.update(widths => ({
|
|
2441
2726
|
...widths,
|
|
2442
|
-
[colField]: computedWidth
|
|
2727
|
+
[colField]: computedWidth,
|
|
2443
2728
|
}));
|
|
2444
2729
|
}
|
|
2445
2730
|
getColumnPinnedState(field) {
|
|
@@ -2461,7 +2746,7 @@ class DataGridComponent {
|
|
|
2461
2746
|
openFilterPopover(event, field) {
|
|
2462
2747
|
event.stopPropagation();
|
|
2463
2748
|
if (this.activeFilterPopover()?.field === field) {
|
|
2464
|
-
this.
|
|
2749
|
+
this.closeFilterPopover(false);
|
|
2465
2750
|
return;
|
|
2466
2751
|
}
|
|
2467
2752
|
this.filterSearchQuery.set('');
|
|
@@ -2476,6 +2761,7 @@ class DataGridComponent {
|
|
|
2476
2761
|
this.tempSelectedValues.set(new Set(distinct));
|
|
2477
2762
|
}
|
|
2478
2763
|
const buttonEl = event.currentTarget;
|
|
2764
|
+
this.filterPopoverTrigger = buttonEl;
|
|
2479
2765
|
const gridEl = this.elementRef.nativeElement.querySelector('.ngx-data-grid');
|
|
2480
2766
|
const buttonRect = buttonEl.getBoundingClientRect();
|
|
2481
2767
|
const gridRect = gridEl.getBoundingClientRect();
|
|
@@ -2484,8 +2770,18 @@ class DataGridComponent {
|
|
|
2484
2770
|
this.activeFilterPopover.set({
|
|
2485
2771
|
field,
|
|
2486
2772
|
top,
|
|
2487
|
-
left: Math.min(left, gridRect.width - 260)
|
|
2773
|
+
left: Math.min(left, gridRect.width - 260),
|
|
2488
2774
|
});
|
|
2775
|
+
afterNextRender(() => this.elementRef.nativeElement
|
|
2776
|
+
.querySelector('.grid-filter-popover select')
|
|
2777
|
+
?.focus(), { injector: this.injector });
|
|
2778
|
+
}
|
|
2779
|
+
closeFilterPopover(restoreFocus = true) {
|
|
2780
|
+
this.activeFilterPopover.set(null);
|
|
2781
|
+
const trigger = this.filterPopoverTrigger;
|
|
2782
|
+
this.filterPopoverTrigger = null;
|
|
2783
|
+
if (restoreFocus)
|
|
2784
|
+
trigger?.focus();
|
|
2489
2785
|
}
|
|
2490
2786
|
getDistinctValues(field) {
|
|
2491
2787
|
const vals = new Set();
|
|
@@ -2536,30 +2832,19 @@ class DataGridComponent {
|
|
|
2536
2832
|
const selected = this.tempSelectedValues();
|
|
2537
2833
|
let filterState = null;
|
|
2538
2834
|
if (this.tempFilterValue()) {
|
|
2539
|
-
filterState = {
|
|
2540
|
-
field,
|
|
2541
|
-
value: this.tempFilterValue(),
|
|
2542
|
-
operator: this.tempFilterOperator()
|
|
2543
|
-
};
|
|
2835
|
+
filterState = { field, value: this.tempFilterValue(), operator: this.tempFilterOperator() };
|
|
2544
2836
|
}
|
|
2545
2837
|
else if (selected.size < distinct.length) {
|
|
2546
|
-
filterState = {
|
|
2547
|
-
field,
|
|
2548
|
-
value: '',
|
|
2549
|
-
operator: 'in',
|
|
2550
|
-
selectedValues: Array.from(selected)
|
|
2551
|
-
};
|
|
2838
|
+
filterState = { field, value: '', operator: 'in', selectedValues: Array.from(selected) };
|
|
2552
2839
|
}
|
|
2553
2840
|
const nextStates = new Map(this.filterStates());
|
|
2554
|
-
if (filterState)
|
|
2841
|
+
if (filterState)
|
|
2555
2842
|
nextStates.set(field, filterState);
|
|
2556
|
-
|
|
2557
|
-
else {
|
|
2843
|
+
else
|
|
2558
2844
|
nextStates.delete(field);
|
|
2559
|
-
}
|
|
2560
2845
|
this.filterStates.set(nextStates);
|
|
2561
2846
|
this.currentPage.set(1);
|
|
2562
|
-
this.
|
|
2847
|
+
this.closeFilterPopover();
|
|
2563
2848
|
this.filterChange.emit({ filters: this.activeFilters() });
|
|
2564
2849
|
this.emitDataState();
|
|
2565
2850
|
}
|
|
@@ -2567,19 +2852,18 @@ class DataGridComponent {
|
|
|
2567
2852
|
const pop = this.activeFilterPopover();
|
|
2568
2853
|
if (!pop)
|
|
2569
2854
|
return;
|
|
2570
|
-
const field = pop.field;
|
|
2571
2855
|
const nextStates = new Map(this.filterStates());
|
|
2572
|
-
nextStates.delete(field);
|
|
2856
|
+
nextStates.delete(pop.field);
|
|
2573
2857
|
this.filterStates.set(nextStates);
|
|
2574
2858
|
this.currentPage.set(1);
|
|
2575
|
-
this.
|
|
2859
|
+
this.closeFilterPopover();
|
|
2576
2860
|
this.filterChange.emit({ filters: this.activeFilters() });
|
|
2577
2861
|
this.emitDataState();
|
|
2578
2862
|
}
|
|
2579
2863
|
clearAllFilters() {
|
|
2580
2864
|
this.filterStates.set(new Map());
|
|
2581
2865
|
this.currentPage.set(1);
|
|
2582
|
-
this.
|
|
2866
|
+
this.closeFilterPopover(false);
|
|
2583
2867
|
this.filterChange.emit({ filters: [] });
|
|
2584
2868
|
this.emitDataState();
|
|
2585
2869
|
}
|
|
@@ -2588,10 +2872,12 @@ class DataGridComponent {
|
|
|
2588
2872
|
const rows = this.clientFilteredData();
|
|
2589
2873
|
if (rows.length === 0)
|
|
2590
2874
|
return '-';
|
|
2591
|
-
const values = rows
|
|
2875
|
+
const values = rows
|
|
2876
|
+
.map(r => {
|
|
2592
2877
|
const val = r[col.field];
|
|
2593
2878
|
return typeof val === 'number' ? val : Number(val);
|
|
2594
|
-
})
|
|
2879
|
+
})
|
|
2880
|
+
.filter(v => !isNaN(v));
|
|
2595
2881
|
if (col.aggregation === 'count') {
|
|
2596
2882
|
return String(rows.length);
|
|
2597
2883
|
}
|
|
@@ -2715,9 +3001,7 @@ class DataGridComponent {
|
|
|
2715
3001
|
const sourceField = this.draggingField();
|
|
2716
3002
|
const targetField = targetCol.field;
|
|
2717
3003
|
if (sourceField && sourceField !== targetField) {
|
|
2718
|
-
const currentOrder = this.columnOrder().length > 0
|
|
2719
|
-
? [...this.columnOrder()]
|
|
2720
|
-
: this.columns().map(c => c.field);
|
|
3004
|
+
const currentOrder = this.columnOrder().length > 0 ? [...this.columnOrder()] : this.columns().map(c => c.field);
|
|
2721
3005
|
const sourceIndex = currentOrder.indexOf(sourceField);
|
|
2722
3006
|
const targetIndex = currentOrder.indexOf(targetField);
|
|
2723
3007
|
if (sourceIndex !== -1 && targetIndex !== -1) {
|
|
@@ -2766,7 +3050,7 @@ class DataGridComponent {
|
|
|
2766
3050
|
this.rowReorder.emit({
|
|
2767
3051
|
previousIndex: actualSourceIdx,
|
|
2768
3052
|
currentIndex: actualTargetIdx,
|
|
2769
|
-
data: currentData
|
|
3053
|
+
data: currentData,
|
|
2770
3054
|
});
|
|
2771
3055
|
}
|
|
2772
3056
|
}
|
|
@@ -2862,35 +3146,35 @@ class DataGridComponent {
|
|
|
2862
3146
|
this.internalGroupBy.set(groupState);
|
|
2863
3147
|
this.groupChange.emit({ group: groupState });
|
|
2864
3148
|
this.emitDataState(groupState);
|
|
2865
|
-
this.
|
|
3149
|
+
this.closeContextMenu();
|
|
2866
3150
|
}
|
|
2867
3151
|
contextMenuClearGrouping() {
|
|
2868
3152
|
this.internalGroupBy.set(null);
|
|
2869
3153
|
this.groupChange.emit({ group: null });
|
|
2870
3154
|
this.emitDataState(null);
|
|
2871
|
-
this.
|
|
3155
|
+
this.closeContextMenu();
|
|
2872
3156
|
}
|
|
2873
3157
|
collapseAllGroups() {
|
|
2874
3158
|
const keys = this.groupedRows().map(g => g.key);
|
|
2875
3159
|
this.collapsedGroups.set(new Set(keys));
|
|
2876
|
-
this.
|
|
3160
|
+
this.closeContextMenu();
|
|
2877
3161
|
}
|
|
2878
3162
|
expandAllGroups() {
|
|
2879
3163
|
this.collapsedGroups.set(new Set());
|
|
2880
|
-
this.
|
|
3164
|
+
this.closeContextMenu();
|
|
2881
3165
|
}
|
|
2882
3166
|
contextMenuToggleDetail(row) {
|
|
2883
3167
|
this.toggleDetail(row);
|
|
2884
|
-
this.
|
|
3168
|
+
this.closeContextMenu();
|
|
2885
3169
|
}
|
|
2886
3170
|
expandAllDetails() {
|
|
2887
3171
|
const keys = this.flatRenderedRows().map(r => this.keyOf(r));
|
|
2888
3172
|
this.expandedRows.set(new Set(keys));
|
|
2889
|
-
this.
|
|
3173
|
+
this.closeContextMenu();
|
|
2890
3174
|
}
|
|
2891
3175
|
collapseAllDetails() {
|
|
2892
3176
|
this.expandedRows.set(new Set());
|
|
2893
|
-
this.
|
|
3177
|
+
this.closeContextMenu();
|
|
2894
3178
|
}
|
|
2895
3179
|
onRowClick(row, index) {
|
|
2896
3180
|
this.rowClick.emit({ row, index });
|
|
@@ -2908,6 +3192,7 @@ class DataGridComponent {
|
|
|
2908
3192
|
next.add(key);
|
|
2909
3193
|
}
|
|
2910
3194
|
this.selectedRows.set(next);
|
|
3195
|
+
this.selectionAnnouncement.set(this.i18n.grid.selectedRows(next.size));
|
|
2911
3196
|
this.selectionChange.emit(this.resolveSelectedRows(next));
|
|
2912
3197
|
}
|
|
2913
3198
|
toggleAll() {
|
|
@@ -2924,8 +3209,12 @@ class DataGridComponent {
|
|
|
2924
3209
|
}
|
|
2925
3210
|
}
|
|
2926
3211
|
this.selectedRows.set(next);
|
|
3212
|
+
this.selectionAnnouncement.set(this.i18n.grid.selectedRows(next.size));
|
|
2927
3213
|
this.selectionChange.emit(this.resolveSelectedRows(next));
|
|
2928
3214
|
}
|
|
3215
|
+
rowSelectionKey(row) {
|
|
3216
|
+
return this.keyOf(row);
|
|
3217
|
+
}
|
|
2929
3218
|
toggleDetail(row) {
|
|
2930
3219
|
const key = this.keyOf(row);
|
|
2931
3220
|
const next = new Set(this.expandedRows());
|
|
@@ -2959,9 +3248,7 @@ class DataGridComponent {
|
|
|
2959
3248
|
return row[field];
|
|
2960
3249
|
}
|
|
2961
3250
|
const draft = this.editingDraft();
|
|
2962
|
-
return Object.prototype.hasOwnProperty.call(draft, field)
|
|
2963
|
-
? draft[field]
|
|
2964
|
-
: row[field];
|
|
3251
|
+
return Object.prototype.hasOwnProperty.call(draft, field) ? draft[field] : row[field];
|
|
2965
3252
|
}
|
|
2966
3253
|
saveEdit(row, index) {
|
|
2967
3254
|
const updated = { ...row, ...this.editingDraft() };
|
|
@@ -3107,23 +3394,31 @@ class DataGridComponent {
|
|
|
3107
3394
|
group: overrideGroup === undefined ? this.internalGroupBy() : overrideGroup,
|
|
3108
3395
|
});
|
|
3109
3396
|
}
|
|
3110
|
-
onCellClick(row, colField) {
|
|
3397
|
+
onCellClick(row, colField, event) {
|
|
3111
3398
|
if (!this.keyboardNavigation())
|
|
3112
3399
|
return;
|
|
3113
|
-
this.
|
|
3400
|
+
this.focusCell(row, colField);
|
|
3114
3401
|
this.focusedCellEditActive.set(this.isEditing(row));
|
|
3402
|
+
event?.currentTarget?.focus();
|
|
3115
3403
|
}
|
|
3116
3404
|
handleKeyDown(event) {
|
|
3117
3405
|
if (!this.keyboardNavigation())
|
|
3118
3406
|
return;
|
|
3407
|
+
const target = event.target instanceof HTMLElement ? event.target : this.elementRef.nativeElement;
|
|
3408
|
+
const grid = this.elementRef.nativeElement;
|
|
3409
|
+
const editInput = target.closest('.grid-edit-input');
|
|
3410
|
+
if (target !== grid && !target.closest('.grid-td') && !editInput)
|
|
3411
|
+
return;
|
|
3412
|
+
if (target.closest('button, input, select, textarea, [contenteditable="true"]') && !editInput)
|
|
3413
|
+
return;
|
|
3119
3414
|
const key = event.key;
|
|
3120
3415
|
const focused = this.focusedCell();
|
|
3121
3416
|
if (!focused) {
|
|
3122
|
-
if (
|
|
3417
|
+
if (target === grid && ['ArrowDown', 'ArrowUp', 'ArrowLeft', 'ArrowRight'].includes(key)) {
|
|
3123
3418
|
const rows = this.flatRenderedRows();
|
|
3124
3419
|
const cols = this.orderedColumns();
|
|
3125
3420
|
if (rows.length > 0 && cols.length > 0) {
|
|
3126
|
-
this.
|
|
3421
|
+
this.focusCell(rows[0], cols[0].field);
|
|
3127
3422
|
event.preventDefault();
|
|
3128
3423
|
}
|
|
3129
3424
|
}
|
|
@@ -3135,18 +3430,20 @@ class DataGridComponent {
|
|
|
3135
3430
|
const colIndex = cols.findIndex(c => c.field === focused.colField);
|
|
3136
3431
|
if (rowIndex === -1 || colIndex === -1)
|
|
3137
3432
|
return;
|
|
3433
|
+
const isRtl = this.elementRef.nativeElement.closest('[dir="rtl"]') !== null;
|
|
3138
3434
|
if (this.focusedCellEditActive()) {
|
|
3139
3435
|
if (key === 'Enter') {
|
|
3140
3436
|
this.saveEdit(focused.row, rowIndex);
|
|
3141
3437
|
this.focusedCellEditActive.set(false);
|
|
3142
3438
|
if (rowIndex < rows.length - 1) {
|
|
3143
|
-
this.
|
|
3439
|
+
this.focusCell(rows[rowIndex + 1], focused.colField);
|
|
3144
3440
|
}
|
|
3145
3441
|
event.preventDefault();
|
|
3146
3442
|
}
|
|
3147
3443
|
else if (key === 'Escape') {
|
|
3148
3444
|
this.cancelEdit();
|
|
3149
3445
|
this.focusedCellEditActive.set(false);
|
|
3446
|
+
this.focusCell(focused.row, focused.colField);
|
|
3150
3447
|
event.preventDefault();
|
|
3151
3448
|
}
|
|
3152
3449
|
return;
|
|
@@ -3154,56 +3451,64 @@ class DataGridComponent {
|
|
|
3154
3451
|
switch (key) {
|
|
3155
3452
|
case 'ArrowUp':
|
|
3156
3453
|
if (rowIndex > 0) {
|
|
3157
|
-
this.
|
|
3454
|
+
this.focusCell(rows[rowIndex - 1], focused.colField);
|
|
3158
3455
|
event.preventDefault();
|
|
3159
3456
|
}
|
|
3160
3457
|
break;
|
|
3161
3458
|
case 'ArrowDown':
|
|
3162
3459
|
if (rowIndex < rows.length - 1) {
|
|
3163
|
-
this.
|
|
3460
|
+
this.focusCell(rows[rowIndex + 1], focused.colField);
|
|
3164
3461
|
event.preventDefault();
|
|
3165
3462
|
}
|
|
3166
3463
|
break;
|
|
3167
|
-
case 'ArrowLeft':
|
|
3168
|
-
|
|
3169
|
-
|
|
3464
|
+
case 'ArrowLeft': {
|
|
3465
|
+
const nextColIndex = isRtl ? colIndex + 1 : colIndex - 1;
|
|
3466
|
+
if (nextColIndex >= 0 && nextColIndex < cols.length) {
|
|
3467
|
+
this.focusCell(focused.row, cols[nextColIndex].field);
|
|
3170
3468
|
event.preventDefault();
|
|
3171
3469
|
}
|
|
3172
3470
|
break;
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3471
|
+
}
|
|
3472
|
+
case 'ArrowRight': {
|
|
3473
|
+
const nextColIndex = isRtl ? colIndex - 1 : colIndex + 1;
|
|
3474
|
+
if (nextColIndex >= 0 && nextColIndex < cols.length) {
|
|
3475
|
+
this.focusCell(focused.row, cols[nextColIndex].field);
|
|
3176
3476
|
event.preventDefault();
|
|
3177
3477
|
}
|
|
3178
3478
|
break;
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3479
|
+
}
|
|
3480
|
+
case 'Tab': {
|
|
3481
|
+
const nextRowIndex = event.shiftKey
|
|
3482
|
+
? colIndex === 0
|
|
3483
|
+
? rowIndex - 1
|
|
3484
|
+
: rowIndex
|
|
3485
|
+
: colIndex === cols.length - 1
|
|
3486
|
+
? rowIndex + 1
|
|
3487
|
+
: rowIndex;
|
|
3488
|
+
const nextColIndex = event.shiftKey
|
|
3489
|
+
? colIndex === 0
|
|
3490
|
+
? cols.length - 1
|
|
3491
|
+
: colIndex - 1
|
|
3492
|
+
: colIndex === cols.length - 1
|
|
3493
|
+
? 0
|
|
3494
|
+
: colIndex + 1;
|
|
3495
|
+
if (nextRowIndex >= 0 && nextRowIndex < rows.length) {
|
|
3496
|
+
this.focusCell(rows[nextRowIndex], cols[nextColIndex].field);
|
|
3497
|
+
event.preventDefault();
|
|
3187
3498
|
}
|
|
3188
3499
|
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
|
-
}
|
|
3500
|
+
this.focusedCell.set(null);
|
|
3195
3501
|
}
|
|
3196
|
-
event.preventDefault();
|
|
3197
3502
|
break;
|
|
3503
|
+
}
|
|
3198
3504
|
case 'Enter': {
|
|
3199
3505
|
const col = cols[colIndex];
|
|
3200
3506
|
if (this.editable() && col.editable) {
|
|
3201
3507
|
this.beginEdit(focused.row, rowIndex);
|
|
3202
3508
|
this.focusedCellEditActive.set(true);
|
|
3203
3509
|
setTimeout(() => {
|
|
3204
|
-
const inputEl =
|
|
3205
|
-
|
|
3206
|
-
inputEl.focus();
|
|
3510
|
+
const inputEl = grid.querySelector('.grid-edit-input');
|
|
3511
|
+
inputEl?.focus();
|
|
3207
3512
|
}, 0);
|
|
3208
3513
|
event.preventDefault();
|
|
3209
3514
|
}
|
|
@@ -3211,6 +3516,7 @@ class DataGridComponent {
|
|
|
3211
3516
|
}
|
|
3212
3517
|
case 'Escape':
|
|
3213
3518
|
this.focusedCell.set(null);
|
|
3519
|
+
grid.focus();
|
|
3214
3520
|
event.preventDefault();
|
|
3215
3521
|
break;
|
|
3216
3522
|
default:
|
|
@@ -3221,7 +3527,7 @@ class DataGridComponent {
|
|
|
3221
3527
|
this.focusedCellEditActive.set(true);
|
|
3222
3528
|
this.updateDraft(focused.colField, key);
|
|
3223
3529
|
setTimeout(() => {
|
|
3224
|
-
const inputEl =
|
|
3530
|
+
const inputEl = grid.querySelector('.grid-edit-input');
|
|
3225
3531
|
if (inputEl) {
|
|
3226
3532
|
inputEl.focus();
|
|
3227
3533
|
inputEl.value = key;
|
|
@@ -3233,6 +3539,13 @@ class DataGridComponent {
|
|
|
3233
3539
|
break;
|
|
3234
3540
|
}
|
|
3235
3541
|
}
|
|
3542
|
+
focusCell(row, colField) {
|
|
3543
|
+
this.focusedCell.set({ row, colField });
|
|
3544
|
+
setTimeout(() => {
|
|
3545
|
+
const focusedCell = this.elementRef.nativeElement.querySelector('.grid-td.cell-focused');
|
|
3546
|
+
focusedCell?.focus();
|
|
3547
|
+
}, 0);
|
|
3548
|
+
}
|
|
3236
3549
|
getCellRowSpan(row, colField, rowIndex, groupItems) {
|
|
3237
3550
|
const col = this.columns().find(c => c.field === colField);
|
|
3238
3551
|
if (!col || !col.mergeRows) {
|
|
@@ -3284,10 +3597,12 @@ class DataGridComponent {
|
|
|
3284
3597
|
const rows = group.items;
|
|
3285
3598
|
if (rows.length === 0)
|
|
3286
3599
|
return '-';
|
|
3287
|
-
const values = rows
|
|
3600
|
+
const values = rows
|
|
3601
|
+
.map(r => {
|
|
3288
3602
|
const val = r[col.field];
|
|
3289
3603
|
return typeof val === 'number' ? val : Number(val);
|
|
3290
|
-
})
|
|
3604
|
+
})
|
|
3605
|
+
.filter(v => !isNaN(v));
|
|
3291
3606
|
if (col.aggregation === 'count') {
|
|
3292
3607
|
return String(rows.length);
|
|
3293
3608
|
}
|
|
@@ -3314,10 +3629,16 @@ class DataGridComponent {
|
|
|
3314
3629
|
}
|
|
3315
3630
|
}
|
|
3316
3631
|
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
|
-
|
|
3632
|
+
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: `
|
|
3633
|
+
<div
|
|
3634
|
+
class="ngx-data-grid"
|
|
3635
|
+
[class.loading]="loading()"
|
|
3636
|
+
[class.compact]="compact()"
|
|
3637
|
+
role="region"
|
|
3638
|
+
[attr.aria-label]="i18n.grid.dataGrid"
|
|
3639
|
+
[attr.tabindex]="keyboardNavigation() || enableContextMenu() ? 0 : null"
|
|
3640
|
+
>
|
|
3641
|
+
<div class="visually-hidden" aria-live="polite" aria-atomic="true">{{ selectionAnnouncement() }}</div>
|
|
3321
3642
|
|
|
3322
3643
|
@if (showGroupingPanel()) {
|
|
3323
3644
|
<div
|
|
@@ -3329,20 +3650,20 @@ class DataGridComponent {
|
|
|
3329
3650
|
>
|
|
3330
3651
|
<div class="grouping-panel-label">
|
|
3331
3652
|
@if (internalGroupBy(); as gb) {
|
|
3332
|
-
<span>
|
|
3653
|
+
<span>{{ i18n.grid.groupedBy }}</span>
|
|
3333
3654
|
<span class="group-chip">
|
|
3334
3655
|
{{ getColumnTitle(gb.field) }}
|
|
3335
3656
|
<button class="remove-group-btn" (click)="clearGrouping()">×</button>
|
|
3336
3657
|
</span>
|
|
3337
3658
|
} @else {
|
|
3338
|
-
<span>
|
|
3659
|
+
<span>{{ i18n.grid.groupColumnsHint }}</span>
|
|
3339
3660
|
}
|
|
3340
3661
|
</div>
|
|
3341
3662
|
</div>
|
|
3342
3663
|
}
|
|
3343
3664
|
|
|
3344
|
-
<div class="grid-toolbar">
|
|
3345
|
-
<span class="grid-toolbar-title">
|
|
3665
|
+
<div class="grid-toolbar" role="toolbar" [attr.aria-label]="i18n.grid.toolbar">
|
|
3666
|
+
<span class="grid-toolbar-title">{{ i18n.grid.dataGrid }}</span>
|
|
3346
3667
|
<div class="grid-toolbar-actions">
|
|
3347
3668
|
@if (showGlobalSearch()) {
|
|
3348
3669
|
<div class="grid-search-wrap">
|
|
@@ -3354,28 +3675,97 @@ class DataGridComponent {
|
|
|
3354
3675
|
(input)="searchText.set($any($event.target).value)"
|
|
3355
3676
|
/>
|
|
3356
3677
|
@if (searchText()) {
|
|
3357
|
-
<button
|
|
3678
|
+
<button
|
|
3679
|
+
class="grid-search-clear"
|
|
3680
|
+
(click)="searchText.set('')"
|
|
3681
|
+
[attr.title]="i18n.grid.clearSearch"
|
|
3682
|
+
[attr.aria-label]="i18n.grid.clearSearch"
|
|
3683
|
+
>
|
|
3684
|
+
×
|
|
3685
|
+
</button>
|
|
3358
3686
|
}
|
|
3359
3687
|
</div>
|
|
3360
3688
|
}
|
|
3361
3689
|
@if (activeFilters().length > 0) {
|
|
3362
|
-
<button
|
|
3690
|
+
<button
|
|
3691
|
+
class="grid-action-btn clear-filters-btn"
|
|
3692
|
+
(click)="clearAllFilters()"
|
|
3693
|
+
[attr.title]="i18n.grid.clearFilters"
|
|
3694
|
+
[attr.aria-label]="i18n.grid.clearFilters"
|
|
3695
|
+
>
|
|
3696
|
+
Clear Filters
|
|
3697
|
+
</button>
|
|
3363
3698
|
}
|
|
3364
3699
|
@if (showColumnChooser()) {
|
|
3365
|
-
<button
|
|
3700
|
+
<button
|
|
3701
|
+
class="grid-action-btn"
|
|
3702
|
+
(click)="openColumnChooser($event)"
|
|
3703
|
+
[attr.aria-expanded]="activeColumnChooserPopover() !== null"
|
|
3704
|
+
[attr.aria-controls]="instanceId + '-column-chooser'"
|
|
3705
|
+
[attr.aria-label]="i18n.grid.chooseColumns"
|
|
3706
|
+
type="button"
|
|
3707
|
+
>
|
|
3708
|
+
{{ i18n.grid.chooseColumns }}
|
|
3709
|
+
</button>
|
|
3366
3710
|
}
|
|
3367
3711
|
@if (showFilterBuilder()) {
|
|
3368
|
-
<button
|
|
3712
|
+
<button
|
|
3713
|
+
class="grid-action-btn"
|
|
3714
|
+
type="button"
|
|
3715
|
+
(click)="openFilterBuilder($event)"
|
|
3716
|
+
[attr.aria-haspopup]="'dialog'"
|
|
3717
|
+
[attr.aria-expanded]="isFilterBuilderOpen()"
|
|
3718
|
+
[attr.aria-controls]="instanceId + '-filter-builder'"
|
|
3719
|
+
[attr.title]="i18n.grid.advancedFilterBuilder"
|
|
3720
|
+
[attr.aria-label]="i18n.grid.advancedFilterBuilder"
|
|
3721
|
+
>
|
|
3722
|
+
🔍 Filter
|
|
3723
|
+
</button>
|
|
3369
3724
|
}
|
|
3370
|
-
<button
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3725
|
+
<button
|
|
3726
|
+
class="grid-action-btn"
|
|
3727
|
+
(click)="exportToJson()"
|
|
3728
|
+
[attr.title]="i18n.grid.exportJson"
|
|
3729
|
+
[attr.aria-label]="i18n.grid.exportJson"
|
|
3730
|
+
>
|
|
3731
|
+
JSON
|
|
3732
|
+
</button>
|
|
3733
|
+
<button
|
|
3734
|
+
class="grid-action-btn"
|
|
3735
|
+
(click)="exportToCsv()"
|
|
3736
|
+
[attr.title]="i18n.grid.exportCsv"
|
|
3737
|
+
[attr.aria-label]="i18n.grid.exportCsv"
|
|
3738
|
+
>
|
|
3739
|
+
CSV
|
|
3740
|
+
</button>
|
|
3741
|
+
<button
|
|
3742
|
+
class="grid-action-btn"
|
|
3743
|
+
(click)="exportToXlsx()"
|
|
3744
|
+
[attr.title]="i18n.grid.exportXlsx"
|
|
3745
|
+
[attr.aria-label]="i18n.grid.exportXlsx"
|
|
3746
|
+
>
|
|
3747
|
+
XLSX
|
|
3748
|
+
</button>
|
|
3749
|
+
<button
|
|
3750
|
+
class="grid-action-btn"
|
|
3751
|
+
(click)="exportToExcel()"
|
|
3752
|
+
[attr.title]="i18n.grid.exportExcel"
|
|
3753
|
+
[attr.aria-label]="i18n.grid.exportExcel"
|
|
3754
|
+
>
|
|
3755
|
+
Excel
|
|
3756
|
+
</button>
|
|
3757
|
+
<button
|
|
3758
|
+
class="grid-action-btn"
|
|
3759
|
+
(click)="exportToPdf()"
|
|
3760
|
+
[attr.title]="i18n.grid.exportPdf"
|
|
3761
|
+
[attr.aria-label]="i18n.grid.exportPdf"
|
|
3762
|
+
>
|
|
3763
|
+
PDF
|
|
3764
|
+
</button>
|
|
3375
3765
|
</div>
|
|
3376
3766
|
</div>
|
|
3377
3767
|
|
|
3378
|
-
<div class="grid-table-wrap" #viewportEl (scroll)="onViewportScroll($event)">
|
|
3768
|
+
<div class="grid-table-wrap" #viewportEl (scroll)="onViewportScroll($event)" [attr.aria-busy]="loading()">
|
|
3379
3769
|
<table class="grid-table" [class.striped]="striped()">
|
|
3380
3770
|
<colgroup>
|
|
3381
3771
|
@if (rowReorderable()) {
|
|
@@ -3398,13 +3788,18 @@ class DataGridComponent {
|
|
|
3398
3788
|
<ng-template #headerCellContent let-col="col">
|
|
3399
3789
|
<div class="th-content-wrapper">
|
|
3400
3790
|
@if (resolveHeaderTemplate(col); as activeHeaderTemplate) {
|
|
3401
|
-
<ng-container
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3791
|
+
<ng-container
|
|
3792
|
+
*ngTemplateOutlet="
|
|
3793
|
+
activeHeaderTemplate;
|
|
3794
|
+
context: {
|
|
3795
|
+
$implicit: col,
|
|
3796
|
+
column: col,
|
|
3797
|
+
sort: sortState(),
|
|
3798
|
+
filters: activeFilters(),
|
|
3799
|
+
isServerMode: isAnyServerMode(),
|
|
3800
|
+
}
|
|
3801
|
+
"
|
|
3802
|
+
/>
|
|
3408
3803
|
} @else {
|
|
3409
3804
|
<span class="th-text">{{ col.title }}</span>
|
|
3410
3805
|
@if (col.sortable) {
|
|
@@ -3421,25 +3816,70 @@ class DataGridComponent {
|
|
|
3421
3816
|
}
|
|
3422
3817
|
}
|
|
3423
3818
|
@if (col.filterable) {
|
|
3424
|
-
<button
|
|
3425
|
-
|
|
3819
|
+
<button
|
|
3820
|
+
class="grid-filter-btn"
|
|
3821
|
+
[class.active]="filterStates().has(col.field)"
|
|
3822
|
+
(click)="openFilterPopover($event, col.field); $event.stopPropagation()"
|
|
3823
|
+
[attr.title]="i18n.grid.filterColumn"
|
|
3824
|
+
[attr.aria-label]="i18n.grid.filterColumn"
|
|
3825
|
+
>
|
|
3826
|
+
<svg
|
|
3827
|
+
viewBox="0 0 24 24"
|
|
3828
|
+
width="12"
|
|
3829
|
+
height="12"
|
|
3830
|
+
fill="none"
|
|
3831
|
+
stroke="currentColor"
|
|
3832
|
+
stroke-width="2"
|
|
3833
|
+
stroke-linecap="round"
|
|
3834
|
+
stroke-linejoin="round"
|
|
3835
|
+
>
|
|
3426
3836
|
<polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"></polygon>
|
|
3427
3837
|
</svg>
|
|
3428
3838
|
</button>
|
|
3429
3839
|
}
|
|
3430
3840
|
</div>
|
|
3431
|
-
<div
|
|
3841
|
+
<div
|
|
3842
|
+
class="grid-resize-handle"
|
|
3843
|
+
(mousedown)="onResizeStart($event, col)"
|
|
3844
|
+
(dblclick)="onResizeDoubleClick($event, col)"
|
|
3845
|
+
(click)="$event.stopPropagation()"
|
|
3846
|
+
></div>
|
|
3432
3847
|
</ng-template>
|
|
3433
3848
|
|
|
3434
3849
|
<tr class="grid-header-row">
|
|
3435
3850
|
@if (rowReorderable()) {
|
|
3436
|
-
<th
|
|
3851
|
+
<th
|
|
3852
|
+
class="grid-th grid-th-reorder pinned-left"
|
|
3853
|
+
[class.pinned-left-last]="isRowReorderableLastPinned()"
|
|
3854
|
+
[attr.rowspan]="hasColumnCategories() ? 2 : 1"
|
|
3855
|
+
style="width:44px; left:0px"
|
|
3856
|
+
></th>
|
|
3437
3857
|
}
|
|
3438
3858
|
@if (showDetailToggle()) {
|
|
3439
|
-
<th
|
|
3859
|
+
<th
|
|
3860
|
+
class="grid-th grid-th-toggle pinned-left"
|
|
3861
|
+
[class.pinned-left-last]="isDetailToggleLastPinned()"
|
|
3862
|
+
[attr.rowspan]="hasColumnCategories() ? 2 : 1"
|
|
3863
|
+
[style.left.px]="rowReorderable() ? 44 : 0"
|
|
3864
|
+
style="width:44px"
|
|
3865
|
+
></th>
|
|
3440
3866
|
}
|
|
3441
3867
|
@if (selectable()) {
|
|
3442
|
-
<th
|
|
3868
|
+
<th
|
|
3869
|
+
class="grid-th grid-th-check pinned-left"
|
|
3870
|
+
[class.pinned-left-last]="isSelectableLastPinned()"
|
|
3871
|
+
[attr.rowspan]="hasColumnCategories() ? 2 : 1"
|
|
3872
|
+
[style.left.px]="(rowReorderable() ? 44 : 0) + (showDetailToggle() ? 44 : 0)"
|
|
3873
|
+
style="width:44px"
|
|
3874
|
+
>
|
|
3875
|
+
<input
|
|
3876
|
+
type="checkbox"
|
|
3877
|
+
[attr.aria-label]="allSelected() ? i18n.grid.deselectAll : i18n.grid.selectAll"
|
|
3878
|
+
[checked]="allSelected()"
|
|
3879
|
+
[indeterminate]="someSelected() && !allSelected()"
|
|
3880
|
+
(change)="toggleAll()"
|
|
3881
|
+
/>
|
|
3882
|
+
</th>
|
|
3443
3883
|
}
|
|
3444
3884
|
@for (cell of headerRows().row1; track cell.field) {
|
|
3445
3885
|
@if (cell.isCategory) {
|
|
@@ -3492,7 +3932,9 @@ class DataGridComponent {
|
|
|
3492
3932
|
[style.right.px]="firstPinnedRightColumnField() !== null ? 0 : null"
|
|
3493
3933
|
[attr.rowspan]="hasColumnCategories() ? 2 : 1"
|
|
3494
3934
|
style="width:120px"
|
|
3495
|
-
>
|
|
3935
|
+
>
|
|
3936
|
+
Actions
|
|
3937
|
+
</th>
|
|
3496
3938
|
}
|
|
3497
3939
|
</tr>
|
|
3498
3940
|
@if (hasColumnCategories()) {
|
|
@@ -3543,13 +3985,34 @@ class DataGridComponent {
|
|
|
3543
3985
|
<tr class="grid-group-row" (click)="toggleGroup(group.key)">
|
|
3544
3986
|
@if (groupAggregations()) {
|
|
3545
3987
|
@if (rowReorderable()) {
|
|
3546
|
-
<td
|
|
3988
|
+
<td
|
|
3989
|
+
class="grid-td grid-td-reorder pinned-left"
|
|
3990
|
+
[class.pinned-left-last]="isRowReorderableLastPinned()"
|
|
3991
|
+
style="left:0px; width:44px"
|
|
3992
|
+
></td>
|
|
3547
3993
|
}
|
|
3548
3994
|
@if (showDetailToggle()) {
|
|
3549
|
-
<td
|
|
3995
|
+
<td
|
|
3996
|
+
class="grid-td grid-td-toggle pinned-left"
|
|
3997
|
+
[class.pinned-left-last]="isDetailToggleLastPinned()"
|
|
3998
|
+
[style.left.px]="rowReorderable() ? 44 : 0"
|
|
3999
|
+
style="width:44px"
|
|
4000
|
+
></td>
|
|
3550
4001
|
}
|
|
3551
4002
|
@if (selectable()) {
|
|
3552
|
-
<td
|
|
4003
|
+
<td
|
|
4004
|
+
class="grid-td grid-td-check pinned-left"
|
|
4005
|
+
[class.pinned-left-last]="isSelectableLastPinned()"
|
|
4006
|
+
[style.left.px]="(rowReorderable() ? 44 : 0) + (showDetailToggle() ? 44 : 0)"
|
|
4007
|
+
style="width:44px"
|
|
4008
|
+
>
|
|
4009
|
+
<input
|
|
4010
|
+
type="checkbox"
|
|
4011
|
+
[checked]="isGroupAllSelected(group)"
|
|
4012
|
+
(change)="toggleGroupSelection(group, $event)"
|
|
4013
|
+
(click)="$event.stopPropagation()"
|
|
4014
|
+
/>
|
|
4015
|
+
</td>
|
|
3553
4016
|
}
|
|
3554
4017
|
@for (col of orderedColumns(); track col.field; let first = $first) {
|
|
3555
4018
|
<td
|
|
@@ -3557,7 +4020,9 @@ class DataGridComponent {
|
|
|
3557
4020
|
[class.pinned-left]="col.pinned === 'left'"
|
|
3558
4021
|
[class.pinned-left-last]="col.pinned === 'left' && lastPinnedColumnField() === col.field"
|
|
3559
4022
|
[class.pinned-right]="col.pinned === 'right'"
|
|
3560
|
-
[class.pinned-right-first]="
|
|
4023
|
+
[class.pinned-right-first]="
|
|
4024
|
+
col.pinned === 'right' && firstPinnedRightColumnField() === col.field
|
|
4025
|
+
"
|
|
3561
4026
|
[style.left.px]="col.pinned === 'left' ? columnOffsets()[col.field] : null"
|
|
3562
4027
|
[style.right.px]="col.pinned === 'right' ? columnRightOffsets()[col.field] : null"
|
|
3563
4028
|
[style.text-align]="col.align ?? 'left'"
|
|
@@ -3565,10 +4030,16 @@ class DataGridComponent {
|
|
|
3565
4030
|
>
|
|
3566
4031
|
@if (first) {
|
|
3567
4032
|
<div style="display: flex; align-items: center; gap: 4px;">
|
|
3568
|
-
<button
|
|
4033
|
+
<button
|
|
4034
|
+
class="group-toggle"
|
|
4035
|
+
type="button"
|
|
4036
|
+
(click)="toggleGroup(group.key); $event.stopPropagation()"
|
|
4037
|
+
style="background: transparent; border: none; cursor: pointer; padding: 0 4px; font-weight: bold; color: inherit; outline: none;"
|
|
4038
|
+
>
|
|
3569
4039
|
{{ isGroupCollapsed(group.key) ? '▸' : '▾' }}
|
|
3570
4040
|
</button>
|
|
3571
|
-
<strong>{{ col.category ? '' : group.field + ': ' }}</strong
|
|
4041
|
+
<strong>{{ col.category ? '' : group.field + ': ' }}</strong
|
|
4042
|
+
>{{ group.value }} <span class="group-count">({{ group.count }})</span>
|
|
3572
4043
|
</div>
|
|
3573
4044
|
} @else if (col.aggregation) {
|
|
3574
4045
|
<span class="agg-label">{{ col.aggregation }}: </span>
|
|
@@ -3585,10 +4056,15 @@ class DataGridComponent {
|
|
|
3585
4056
|
}
|
|
3586
4057
|
} @else {
|
|
3587
4058
|
<td [attr.colspan]="renderColumnCount()">
|
|
3588
|
-
<button
|
|
4059
|
+
<button
|
|
4060
|
+
class="group-toggle"
|
|
4061
|
+
type="button"
|
|
4062
|
+
(click)="toggleGroup(group.key); $event.stopPropagation()"
|
|
4063
|
+
>
|
|
3589
4064
|
{{ isGroupCollapsed(group.key) ? '▸' : '▾' }}
|
|
3590
4065
|
</button>
|
|
3591
|
-
<strong>{{ group.field }}</strong
|
|
4066
|
+
<strong>{{ group.field }}</strong
|
|
4067
|
+
>: {{ group.value }}
|
|
3592
4068
|
<span class="group-count">({{ group.count }})</span>
|
|
3593
4069
|
</td>
|
|
3594
4070
|
}
|
|
@@ -3608,9 +4084,30 @@ class DataGridComponent {
|
|
|
3608
4084
|
(dblclick)="editable() ? beginEdit(row, i) : null"
|
|
3609
4085
|
>
|
|
3610
4086
|
@if (rowReorderable()) {
|
|
3611
|
-
<td
|
|
3612
|
-
|
|
3613
|
-
|
|
4087
|
+
<td
|
|
4088
|
+
class="grid-td grid-td-reorder pinned-left"
|
|
4089
|
+
[class.pinned-left-last]="isRowReorderableLastPinned()"
|
|
4090
|
+
style="left:0px; text-align:center; width:44px"
|
|
4091
|
+
>
|
|
4092
|
+
<span
|
|
4093
|
+
class="row-drag-handle"
|
|
4094
|
+
draggable="true"
|
|
4095
|
+
(dragstart)="onRowDragStart($event, i)"
|
|
4096
|
+
(dragend)="onRowDragEnd()"
|
|
4097
|
+
[attr.title]="i18n.grid.dragRowToReorder"
|
|
4098
|
+
[attr.aria-label]="i18n.grid.dragRowToReorder"
|
|
4099
|
+
>
|
|
4100
|
+
<svg
|
|
4101
|
+
viewBox="0 0 24 24"
|
|
4102
|
+
width="16"
|
|
4103
|
+
height="16"
|
|
4104
|
+
fill="none"
|
|
4105
|
+
stroke="currentColor"
|
|
4106
|
+
stroke-width="2.5"
|
|
4107
|
+
stroke-linecap="round"
|
|
4108
|
+
stroke-linejoin="round"
|
|
4109
|
+
style="display: block;"
|
|
4110
|
+
>
|
|
3614
4111
|
<circle cx="9" cy="5" r="1.5"></circle>
|
|
3615
4112
|
<circle cx="9" cy="12" r="1.5"></circle>
|
|
3616
4113
|
<circle cx="9" cy="19" r="1.5"></circle>
|
|
@@ -3623,9 +4120,30 @@ class DataGridComponent {
|
|
|
3623
4120
|
}
|
|
3624
4121
|
|
|
3625
4122
|
@if (showDetailToggle()) {
|
|
3626
|
-
<td
|
|
3627
|
-
|
|
3628
|
-
|
|
4123
|
+
<td
|
|
4124
|
+
class="grid-td grid-td-toggle pinned-left"
|
|
4125
|
+
[class.pinned-left-last]="isDetailToggleLastPinned()"
|
|
4126
|
+
[style.left.px]="rowReorderable() ? 44 : 0"
|
|
4127
|
+
>
|
|
4128
|
+
<button
|
|
4129
|
+
class="toggle-btn"
|
|
4130
|
+
[class.expanded]="isExpanded(row)"
|
|
4131
|
+
type="button"
|
|
4132
|
+
(click)="toggleDetail(row); $event.stopPropagation()"
|
|
4133
|
+
[attr.title]="i18n.grid.toggleDetails"
|
|
4134
|
+
[attr.aria-label]="i18n.grid.toggleDetails"
|
|
4135
|
+
>
|
|
4136
|
+
<svg
|
|
4137
|
+
viewBox="0 0 24 24"
|
|
4138
|
+
width="12"
|
|
4139
|
+
height="12"
|
|
4140
|
+
fill="none"
|
|
4141
|
+
stroke="currentColor"
|
|
4142
|
+
stroke-width="3.5"
|
|
4143
|
+
stroke-linecap="round"
|
|
4144
|
+
stroke-linejoin="round"
|
|
4145
|
+
class="chevron-icon"
|
|
4146
|
+
>
|
|
3629
4147
|
<polyline points="9 18 15 12 9 6"></polyline>
|
|
3630
4148
|
</svg>
|
|
3631
4149
|
</button>
|
|
@@ -3633,18 +4151,35 @@ class DataGridComponent {
|
|
|
3633
4151
|
}
|
|
3634
4152
|
|
|
3635
4153
|
@if (selectable()) {
|
|
3636
|
-
<td
|
|
4154
|
+
<td
|
|
4155
|
+
class="grid-td grid-td-check pinned-left"
|
|
4156
|
+
[class.pinned-left-last]="isSelectableLastPinned()"
|
|
4157
|
+
[style.left.px]="(rowReorderable() ? 44 : 0) + (showDetailToggle() ? 44 : 0)"
|
|
4158
|
+
>
|
|
4159
|
+
<input
|
|
4160
|
+
type="checkbox"
|
|
4161
|
+
[attr.aria-label]="i18n.grid.selectRow(rowSelectionKey(row))"
|
|
4162
|
+
[checked]="isRowSelected(row)"
|
|
4163
|
+
(change)="toggleRow(row)"
|
|
4164
|
+
(click)="$event.stopPropagation()"
|
|
4165
|
+
/>
|
|
4166
|
+
</td>
|
|
3637
4167
|
}
|
|
3638
4168
|
|
|
3639
4169
|
@if (rowTemplate()) {
|
|
3640
4170
|
<td class="grid-td" [attr.colspan]="orderedColumns().length + (editable() ? 1 : 0)">
|
|
3641
|
-
<ng-container
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
4171
|
+
<ng-container
|
|
4172
|
+
*ngTemplateOutlet="
|
|
4173
|
+
rowTemplate();
|
|
4174
|
+
context: {
|
|
4175
|
+
$implicit: row,
|
|
4176
|
+
row: row,
|
|
4177
|
+
index: i,
|
|
4178
|
+
editing: isEditing(row),
|
|
4179
|
+
expanded: isExpanded(row),
|
|
4180
|
+
}
|
|
4181
|
+
"
|
|
4182
|
+
/>
|
|
3648
4183
|
</td>
|
|
3649
4184
|
} @else {
|
|
3650
4185
|
@for (col of orderedColumns(); track col.field) {
|
|
@@ -3655,9 +4190,22 @@ class DataGridComponent {
|
|
|
3655
4190
|
[class.pinned-left]="col.pinned === 'left'"
|
|
3656
4191
|
[class.pinned-left-last]="col.pinned === 'left' && lastPinnedColumnField() === col.field"
|
|
3657
4192
|
[class.pinned-right]="col.pinned === 'right'"
|
|
3658
|
-
[class.pinned-right-first]="
|
|
4193
|
+
[class.pinned-right-first]="
|
|
4194
|
+
col.pinned === 'right' && firstPinnedRightColumnField() === col.field
|
|
4195
|
+
"
|
|
3659
4196
|
[class.cell-focused]="focusedCell()?.row === row && focusedCell()?.colField === col.field"
|
|
3660
|
-
[
|
|
4197
|
+
[attr.tabindex]="
|
|
4198
|
+
keyboardNavigation() || enableContextMenu()
|
|
4199
|
+
? focusedCell()?.row === row && focusedCell()?.colField === col.field
|
|
4200
|
+
? 0
|
|
4201
|
+
: -1
|
|
4202
|
+
: null
|
|
4203
|
+
"
|
|
4204
|
+
[class.cell-focused-editing]="
|
|
4205
|
+
focusedCell()?.row === row &&
|
|
4206
|
+
focusedCell()?.colField === col.field &&
|
|
4207
|
+
focusedCellEditActive()
|
|
4208
|
+
"
|
|
3661
4209
|
[style.left.px]="col.pinned === 'left' ? columnOffsets()[col.field] : null"
|
|
3662
4210
|
[style.right.px]="col.pinned === 'right' ? columnRightOffsets()[col.field] : null"
|
|
3663
4211
|
[style.text-align]="col.align ?? 'left'"
|
|
@@ -3666,20 +4214,25 @@ class DataGridComponent {
|
|
|
3666
4214
|
(mousedown)="onCellMouseDown($event, row, col.field)"
|
|
3667
4215
|
(mouseenter)="onCellMouseEnter(row, col.field)"
|
|
3668
4216
|
(contextmenu)="onCellContextMenu($event, row, col.field)"
|
|
3669
|
-
(click)="onCellClick(row, col.field)"
|
|
4217
|
+
(click)="onCellClick(row, col.field, $event)"
|
|
3670
4218
|
>
|
|
3671
4219
|
@if (isEditing(row) && editable() && col.editable) {
|
|
3672
4220
|
@if (resolveEditCellTemplate(col); as activeEditTemplate) {
|
|
3673
|
-
<ng-container
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
4221
|
+
<ng-container
|
|
4222
|
+
*ngTemplateOutlet="
|
|
4223
|
+
activeEditTemplate;
|
|
4224
|
+
context: {
|
|
4225
|
+
$implicit: getDraftValue(row, col.field),
|
|
4226
|
+
value: getCellValue(row, col.field),
|
|
4227
|
+
row: row,
|
|
4228
|
+
column: col,
|
|
4229
|
+
index: i,
|
|
4230
|
+
editing: true,
|
|
4231
|
+
draftValue: getDraftValue(row, col.field),
|
|
4232
|
+
updateDraft: getUpdateDraftCallback(col.field),
|
|
4233
|
+
}
|
|
4234
|
+
"
|
|
4235
|
+
/>
|
|
3683
4236
|
} @else {
|
|
3684
4237
|
<input
|
|
3685
4238
|
class="grid-edit-input"
|
|
@@ -3689,14 +4242,19 @@ class DataGridComponent {
|
|
|
3689
4242
|
/>
|
|
3690
4243
|
}
|
|
3691
4244
|
} @else if (resolveCellTemplate(col)) {
|
|
3692
|
-
<ng-container
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
4245
|
+
<ng-container
|
|
4246
|
+
*ngTemplateOutlet="
|
|
4247
|
+
resolveCellTemplate(col)!;
|
|
4248
|
+
context: {
|
|
4249
|
+
$implicit: getCellValue(row, col.field),
|
|
4250
|
+
value: getCellValue(row, col.field),
|
|
4251
|
+
row: row,
|
|
4252
|
+
column: col,
|
|
4253
|
+
index: i,
|
|
4254
|
+
editing: isEditing(row),
|
|
4255
|
+
}
|
|
4256
|
+
"
|
|
4257
|
+
/>
|
|
3700
4258
|
} @else {
|
|
3701
4259
|
@if (showGlobalSearch() && searchText()) {
|
|
3702
4260
|
<span [innerHTML]="highlightSearchText(getCellValue(row, col.field))"></span>
|
|
@@ -3717,10 +4275,24 @@ class DataGridComponent {
|
|
|
3717
4275
|
style="width:120px"
|
|
3718
4276
|
>
|
|
3719
4277
|
@if (!isEditing(row)) {
|
|
3720
|
-
<button
|
|
4278
|
+
<button
|
|
4279
|
+
class="action-btn"
|
|
4280
|
+
type="button"
|
|
4281
|
+
(click)="beginEdit(row, i); $event.stopPropagation()"
|
|
4282
|
+
>
|
|
4283
|
+
Edit
|
|
4284
|
+
</button>
|
|
3721
4285
|
} @else {
|
|
3722
|
-
<button
|
|
3723
|
-
|
|
4286
|
+
<button
|
|
4287
|
+
class="action-btn save"
|
|
4288
|
+
type="button"
|
|
4289
|
+
(click)="saveEdit(row, i); $event.stopPropagation()"
|
|
4290
|
+
>
|
|
4291
|
+
Save
|
|
4292
|
+
</button>
|
|
4293
|
+
<button class="action-btn" type="button" (click)="cancelEdit(); $event.stopPropagation()">
|
|
4294
|
+
Cancel
|
|
4295
|
+
</button>
|
|
3724
4296
|
}
|
|
3725
4297
|
</td>
|
|
3726
4298
|
}
|
|
@@ -3731,11 +4303,16 @@ class DataGridComponent {
|
|
|
3731
4303
|
<tr class="grid-detail-row" [class.expanded]="isExpanded(row)">
|
|
3732
4304
|
<td [attr.colspan]="renderColumnCount()" class="grid-detail-cell">
|
|
3733
4305
|
<div class="detail-wrapper" [class.expanded]="isExpanded(row)">
|
|
3734
|
-
<ng-container
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
4306
|
+
<ng-container
|
|
4307
|
+
*ngTemplateOutlet="
|
|
4308
|
+
detailRowTemplate();
|
|
4309
|
+
context: {
|
|
4310
|
+
$implicit: row,
|
|
4311
|
+
row: row,
|
|
4312
|
+
index: i,
|
|
4313
|
+
}
|
|
4314
|
+
"
|
|
4315
|
+
/>
|
|
3739
4316
|
</div>
|
|
3740
4317
|
</td>
|
|
3741
4318
|
</tr>
|
|
@@ -3749,7 +4326,11 @@ class DataGridComponent {
|
|
|
3749
4326
|
<td [attr.colspan]="renderColumnCount()" style="padding:0; border:none; height: inherit;"></td>
|
|
3750
4327
|
</tr>
|
|
3751
4328
|
}
|
|
3752
|
-
@for (
|
|
4329
|
+
@for (
|
|
4330
|
+
row of virtualScroll() ? visibleRows() : flatRenderedRows();
|
|
4331
|
+
track getKey(row, $index);
|
|
4332
|
+
let i = $index
|
|
4333
|
+
) {
|
|
3753
4334
|
@let actualIndex = virtualScroll() ? startIndex() + i : i;
|
|
3754
4335
|
<tr
|
|
3755
4336
|
[class]="'grid-row ' + getRowCustomClass(row)"
|
|
@@ -3764,9 +4345,30 @@ class DataGridComponent {
|
|
|
3764
4345
|
(dblclick)="editable() ? beginEdit(row, actualIndex) : null"
|
|
3765
4346
|
>
|
|
3766
4347
|
@if (rowReorderable()) {
|
|
3767
|
-
<td
|
|
3768
|
-
|
|
3769
|
-
|
|
4348
|
+
<td
|
|
4349
|
+
class="grid-td grid-td-reorder pinned-left"
|
|
4350
|
+
[class.pinned-left-last]="isRowReorderableLastPinned()"
|
|
4351
|
+
style="left:0px; text-align:center; width:44px"
|
|
4352
|
+
>
|
|
4353
|
+
<span
|
|
4354
|
+
class="row-drag-handle"
|
|
4355
|
+
draggable="true"
|
|
4356
|
+
(dragstart)="onRowDragStart($event, actualIndex)"
|
|
4357
|
+
(dragend)="onRowDragEnd()"
|
|
4358
|
+
[attr.title]="i18n.grid.dragRowToReorder"
|
|
4359
|
+
[attr.aria-label]="i18n.grid.dragRowToReorder"
|
|
4360
|
+
>
|
|
4361
|
+
<svg
|
|
4362
|
+
viewBox="0 0 24 24"
|
|
4363
|
+
width="16"
|
|
4364
|
+
height="16"
|
|
4365
|
+
fill="none"
|
|
4366
|
+
stroke="currentColor"
|
|
4367
|
+
stroke-width="2.5"
|
|
4368
|
+
stroke-linecap="round"
|
|
4369
|
+
stroke-linejoin="round"
|
|
4370
|
+
style="display: block;"
|
|
4371
|
+
>
|
|
3770
4372
|
<circle cx="9" cy="5" r="1.5"></circle>
|
|
3771
4373
|
<circle cx="9" cy="12" r="1.5"></circle>
|
|
3772
4374
|
<circle cx="9" cy="19" r="1.5"></circle>
|
|
@@ -3779,9 +4381,30 @@ class DataGridComponent {
|
|
|
3779
4381
|
}
|
|
3780
4382
|
|
|
3781
4383
|
@if (showDetailToggle()) {
|
|
3782
|
-
<td
|
|
3783
|
-
|
|
3784
|
-
|
|
4384
|
+
<td
|
|
4385
|
+
class="grid-td grid-td-toggle pinned-left"
|
|
4386
|
+
[class.pinned-left-last]="isDetailToggleLastPinned()"
|
|
4387
|
+
[style.left.px]="rowReorderable() ? 44 : 0"
|
|
4388
|
+
>
|
|
4389
|
+
<button
|
|
4390
|
+
class="toggle-btn"
|
|
4391
|
+
[class.expanded]="isExpanded(row)"
|
|
4392
|
+
type="button"
|
|
4393
|
+
(click)="toggleDetail(row); $event.stopPropagation()"
|
|
4394
|
+
[attr.title]="i18n.grid.toggleDetails"
|
|
4395
|
+
[attr.aria-label]="i18n.grid.toggleDetails"
|
|
4396
|
+
>
|
|
4397
|
+
<svg
|
|
4398
|
+
viewBox="0 0 24 24"
|
|
4399
|
+
width="12"
|
|
4400
|
+
height="12"
|
|
4401
|
+
fill="none"
|
|
4402
|
+
stroke="currentColor"
|
|
4403
|
+
stroke-width="3.5"
|
|
4404
|
+
stroke-linecap="round"
|
|
4405
|
+
stroke-linejoin="round"
|
|
4406
|
+
class="chevron-icon"
|
|
4407
|
+
>
|
|
3785
4408
|
<polyline points="9 18 15 12 9 6"></polyline>
|
|
3786
4409
|
</svg>
|
|
3787
4410
|
</button>
|
|
@@ -3789,18 +4412,35 @@ class DataGridComponent {
|
|
|
3789
4412
|
}
|
|
3790
4413
|
|
|
3791
4414
|
@if (selectable()) {
|
|
3792
|
-
<td
|
|
4415
|
+
<td
|
|
4416
|
+
class="grid-td grid-td-check pinned-left"
|
|
4417
|
+
[class.pinned-left-last]="isSelectableLastPinned()"
|
|
4418
|
+
[style.left.px]="(rowReorderable() ? 44 : 0) + (showDetailToggle() ? 44 : 0)"
|
|
4419
|
+
>
|
|
4420
|
+
<input
|
|
4421
|
+
type="checkbox"
|
|
4422
|
+
[attr.aria-label]="i18n.grid.selectRow(rowSelectionKey(row))"
|
|
4423
|
+
[checked]="isRowSelected(row)"
|
|
4424
|
+
(change)="toggleRow(row)"
|
|
4425
|
+
(click)="$event.stopPropagation()"
|
|
4426
|
+
/>
|
|
4427
|
+
</td>
|
|
3793
4428
|
}
|
|
3794
4429
|
|
|
3795
4430
|
@if (rowTemplate()) {
|
|
3796
4431
|
<td class="grid-td" [attr.colspan]="orderedColumns().length + (editable() ? 1 : 0)">
|
|
3797
|
-
<ng-container
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
4432
|
+
<ng-container
|
|
4433
|
+
*ngTemplateOutlet="
|
|
4434
|
+
rowTemplate();
|
|
4435
|
+
context: {
|
|
4436
|
+
$implicit: row,
|
|
4437
|
+
row: row,
|
|
4438
|
+
index: actualIndex,
|
|
4439
|
+
editing: isEditing(row),
|
|
4440
|
+
expanded: isExpanded(row),
|
|
4441
|
+
}
|
|
4442
|
+
"
|
|
4443
|
+
/>
|
|
3804
4444
|
</td>
|
|
3805
4445
|
} @else {
|
|
3806
4446
|
@for (col of orderedColumns(); track col.field) {
|
|
@@ -3811,9 +4451,22 @@ class DataGridComponent {
|
|
|
3811
4451
|
[class.pinned-left]="col.pinned === 'left'"
|
|
3812
4452
|
[class.pinned-left-last]="col.pinned === 'left' && lastPinnedColumnField() === col.field"
|
|
3813
4453
|
[class.pinned-right]="col.pinned === 'right'"
|
|
3814
|
-
[class.pinned-right-first]="
|
|
4454
|
+
[class.pinned-right-first]="
|
|
4455
|
+
col.pinned === 'right' && firstPinnedRightColumnField() === col.field
|
|
4456
|
+
"
|
|
3815
4457
|
[class.cell-focused]="focusedCell()?.row === row && focusedCell()?.colField === col.field"
|
|
3816
|
-
[
|
|
4458
|
+
[attr.tabindex]="
|
|
4459
|
+
keyboardNavigation() || enableContextMenu()
|
|
4460
|
+
? focusedCell()?.row === row && focusedCell()?.colField === col.field
|
|
4461
|
+
? 0
|
|
4462
|
+
: -1
|
|
4463
|
+
: null
|
|
4464
|
+
"
|
|
4465
|
+
[class.cell-focused-editing]="
|
|
4466
|
+
focusedCell()?.row === row &&
|
|
4467
|
+
focusedCell()?.colField === col.field &&
|
|
4468
|
+
focusedCellEditActive()
|
|
4469
|
+
"
|
|
3817
4470
|
[style.left.px]="col.pinned === 'left' ? columnOffsets()[col.field] : null"
|
|
3818
4471
|
[style.right.px]="col.pinned === 'right' ? columnRightOffsets()[col.field] : null"
|
|
3819
4472
|
[style.text-align]="col.align ?? 'left'"
|
|
@@ -3822,20 +4475,25 @@ class DataGridComponent {
|
|
|
3822
4475
|
(mousedown)="onCellMouseDown($event, row, col.field)"
|
|
3823
4476
|
(mouseenter)="onCellMouseEnter(row, col.field)"
|
|
3824
4477
|
(contextmenu)="onCellContextMenu($event, row, col.field)"
|
|
3825
|
-
(click)="onCellClick(row, col.field)"
|
|
4478
|
+
(click)="onCellClick(row, col.field, $event)"
|
|
3826
4479
|
>
|
|
3827
4480
|
@if (isEditing(row) && editable() && col.editable) {
|
|
3828
4481
|
@if (resolveEditCellTemplate(col); as activeEditTemplate) {
|
|
3829
|
-
<ng-container
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
4482
|
+
<ng-container
|
|
4483
|
+
*ngTemplateOutlet="
|
|
4484
|
+
activeEditTemplate;
|
|
4485
|
+
context: {
|
|
4486
|
+
$implicit: getDraftValue(row, col.field),
|
|
4487
|
+
value: getCellValue(row, col.field),
|
|
4488
|
+
row: row,
|
|
4489
|
+
column: col,
|
|
4490
|
+
index: actualIndex,
|
|
4491
|
+
editing: true,
|
|
4492
|
+
draftValue: getDraftValue(row, col.field),
|
|
4493
|
+
updateDraft: getUpdateDraftCallback(col.field),
|
|
4494
|
+
}
|
|
4495
|
+
"
|
|
4496
|
+
/>
|
|
3839
4497
|
} @else {
|
|
3840
4498
|
<input
|
|
3841
4499
|
class="grid-edit-input"
|
|
@@ -3845,14 +4503,19 @@ class DataGridComponent {
|
|
|
3845
4503
|
/>
|
|
3846
4504
|
}
|
|
3847
4505
|
} @else if (resolveCellTemplate(col)) {
|
|
3848
|
-
<ng-container
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
4506
|
+
<ng-container
|
|
4507
|
+
*ngTemplateOutlet="
|
|
4508
|
+
resolveCellTemplate(col)!;
|
|
4509
|
+
context: {
|
|
4510
|
+
$implicit: getCellValue(row, col.field),
|
|
4511
|
+
value: getCellValue(row, col.field),
|
|
4512
|
+
row: row,
|
|
4513
|
+
column: col,
|
|
4514
|
+
index: actualIndex,
|
|
4515
|
+
editing: isEditing(row),
|
|
4516
|
+
}
|
|
4517
|
+
"
|
|
4518
|
+
/>
|
|
3856
4519
|
} @else {
|
|
3857
4520
|
@if (showGlobalSearch() && searchText()) {
|
|
3858
4521
|
<span [innerHTML]="highlightSearchText(getCellValue(row, col.field))"></span>
|
|
@@ -3873,10 +4536,24 @@ class DataGridComponent {
|
|
|
3873
4536
|
style="width:120px"
|
|
3874
4537
|
>
|
|
3875
4538
|
@if (!isEditing(row)) {
|
|
3876
|
-
<button
|
|
4539
|
+
<button
|
|
4540
|
+
class="action-btn"
|
|
4541
|
+
type="button"
|
|
4542
|
+
(click)="beginEdit(row, actualIndex); $event.stopPropagation()"
|
|
4543
|
+
>
|
|
4544
|
+
Edit
|
|
4545
|
+
</button>
|
|
3877
4546
|
} @else {
|
|
3878
|
-
<button
|
|
3879
|
-
|
|
4547
|
+
<button
|
|
4548
|
+
class="action-btn save"
|
|
4549
|
+
type="button"
|
|
4550
|
+
(click)="saveEdit(row, actualIndex); $event.stopPropagation()"
|
|
4551
|
+
>
|
|
4552
|
+
Save
|
|
4553
|
+
</button>
|
|
4554
|
+
<button class="action-btn" type="button" (click)="cancelEdit(); $event.stopPropagation()">
|
|
4555
|
+
Cancel
|
|
4556
|
+
</button>
|
|
3880
4557
|
}
|
|
3881
4558
|
</td>
|
|
3882
4559
|
}
|
|
@@ -3887,11 +4564,16 @@ class DataGridComponent {
|
|
|
3887
4564
|
<tr class="grid-detail-row" [class.expanded]="isExpanded(row)">
|
|
3888
4565
|
<td [attr.colspan]="renderColumnCount()" class="grid-detail-cell">
|
|
3889
4566
|
<div class="detail-wrapper" [class.expanded]="isExpanded(row)">
|
|
3890
|
-
<ng-container
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
4567
|
+
<ng-container
|
|
4568
|
+
*ngTemplateOutlet="
|
|
4569
|
+
detailRowTemplate();
|
|
4570
|
+
context: {
|
|
4571
|
+
$implicit: row,
|
|
4572
|
+
row: row,
|
|
4573
|
+
index: actualIndex,
|
|
4574
|
+
}
|
|
4575
|
+
"
|
|
4576
|
+
/>
|
|
3895
4577
|
</div>
|
|
3896
4578
|
</td>
|
|
3897
4579
|
</tr>
|
|
@@ -3908,13 +4590,27 @@ class DataGridComponent {
|
|
|
3908
4590
|
<tfoot>
|
|
3909
4591
|
<tr class="grid-footer-row">
|
|
3910
4592
|
@if (rowReorderable()) {
|
|
3911
|
-
<td
|
|
4593
|
+
<td
|
|
4594
|
+
class="grid-td-reorder pinned-left"
|
|
4595
|
+
[class.pinned-left-last]="isRowReorderableLastPinned()"
|
|
4596
|
+
style="left:0px; width:44px"
|
|
4597
|
+
></td>
|
|
3912
4598
|
}
|
|
3913
4599
|
@if (showDetailToggle()) {
|
|
3914
|
-
<td
|
|
4600
|
+
<td
|
|
4601
|
+
class="grid-td-toggle pinned-left"
|
|
4602
|
+
[class.pinned-left-last]="isDetailToggleLastPinned()"
|
|
4603
|
+
[style.left.px]="rowReorderable() ? 44 : 0"
|
|
4604
|
+
style="width:44px"
|
|
4605
|
+
></td>
|
|
3915
4606
|
}
|
|
3916
4607
|
@if (selectable()) {
|
|
3917
|
-
<td
|
|
4608
|
+
<td
|
|
4609
|
+
class="grid-td-check pinned-left"
|
|
4610
|
+
[class.pinned-left-last]="isSelectableLastPinned()"
|
|
4611
|
+
[style.left.px]="(rowReorderable() ? 44 : 0) + (showDetailToggle() ? 44 : 0)"
|
|
4612
|
+
style="width:44px"
|
|
4613
|
+
></td>
|
|
3918
4614
|
}
|
|
3919
4615
|
@for (col of orderedColumns(); track col.field) {
|
|
3920
4616
|
<td
|
|
@@ -3929,12 +4625,17 @@ class DataGridComponent {
|
|
|
3929
4625
|
[style.width.px]="getColumnWidth(col)"
|
|
3930
4626
|
>
|
|
3931
4627
|
@if (resolveFooterTemplate(col); as activeFooterTemplate) {
|
|
3932
|
-
<ng-container
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
4628
|
+
<ng-container
|
|
4629
|
+
*ngTemplateOutlet="
|
|
4630
|
+
activeFooterTemplate;
|
|
4631
|
+
context: {
|
|
4632
|
+
$implicit: col,
|
|
4633
|
+
column: col,
|
|
4634
|
+
aggregationValue: getAggregationValue(col),
|
|
4635
|
+
data: flatRenderedRows(),
|
|
4636
|
+
}
|
|
4637
|
+
"
|
|
4638
|
+
/>
|
|
3938
4639
|
} @else if (col.aggregation) {
|
|
3939
4640
|
<span class="agg-label">{{ col.aggregation }}: </span>
|
|
3940
4641
|
<strong class="agg-value">{{ getAggregationValue(col) }}</strong>
|
|
@@ -3958,11 +4659,17 @@ class DataGridComponent {
|
|
|
3958
4659
|
<div class="grid-pagination">
|
|
3959
4660
|
<div class="pagination-left">
|
|
3960
4661
|
<span class="page-info">
|
|
3961
|
-
{{ i18n.pagination.page }}
|
|
4662
|
+
{{ i18n.pagination.page }}
|
|
4663
|
+
<strong class="page-info-highlight">{{ pagerRangeStart() }}–{{ pagerRangeEnd() }}</strong>
|
|
4664
|
+
{{ i18n.pagination.of }} <strong class="page-info-highlight">{{ totalItems() }}</strong>
|
|
3962
4665
|
</span>
|
|
3963
4666
|
<div class="page-size-selector">
|
|
3964
4667
|
<span class="page-size-label">{{ i18n.pagination.itemsPerPage }}:</span>
|
|
3965
|
-
<select
|
|
4668
|
+
<select
|
|
4669
|
+
[value]="internalPageSize()"
|
|
4670
|
+
(change)="changePageSize(+$any($event.target).value)"
|
|
4671
|
+
class="page-size-select"
|
|
4672
|
+
>
|
|
3966
4673
|
<option [value]="5">5</option>
|
|
3967
4674
|
<option [value]="8">8</option>
|
|
3968
4675
|
<option [value]="10">10</option>
|
|
@@ -3973,31 +4680,89 @@ class DataGridComponent {
|
|
|
3973
4680
|
</div>
|
|
3974
4681
|
</div>
|
|
3975
4682
|
<div class="page-btns">
|
|
3976
|
-
<button
|
|
3977
|
-
|
|
4683
|
+
<button
|
|
4684
|
+
class="page-btn ctrl"
|
|
4685
|
+
[disabled]="currentPage() === 1"
|
|
4686
|
+
(click)="goPage(1)"
|
|
4687
|
+
[title]="i18n.pagination.firstPage"
|
|
4688
|
+
>
|
|
4689
|
+
<svg
|
|
4690
|
+
viewBox="0 0 24 24"
|
|
4691
|
+
width="14"
|
|
4692
|
+
height="14"
|
|
4693
|
+
fill="none"
|
|
4694
|
+
stroke="currentColor"
|
|
4695
|
+
stroke-width="2.5"
|
|
4696
|
+
stroke-linecap="round"
|
|
4697
|
+
stroke-linejoin="round"
|
|
4698
|
+
>
|
|
3978
4699
|
<polyline points="11 17 6 12 11 7"></polyline>
|
|
3979
4700
|
<polyline points="18 17 13 12 18 7"></polyline>
|
|
3980
4701
|
</svg>
|
|
3981
4702
|
</button>
|
|
3982
|
-
<button
|
|
3983
|
-
|
|
4703
|
+
<button
|
|
4704
|
+
class="page-btn ctrl"
|
|
4705
|
+
[disabled]="currentPage() === 1"
|
|
4706
|
+
(click)="goPage(currentPage() - 1)"
|
|
4707
|
+
[title]="i18n.pagination.previousPage"
|
|
4708
|
+
>
|
|
4709
|
+
<svg
|
|
4710
|
+
viewBox="0 0 24 24"
|
|
4711
|
+
width="14"
|
|
4712
|
+
height="14"
|
|
4713
|
+
fill="none"
|
|
4714
|
+
stroke="currentColor"
|
|
4715
|
+
stroke-width="2.5"
|
|
4716
|
+
stroke-linecap="round"
|
|
4717
|
+
stroke-linejoin="round"
|
|
4718
|
+
>
|
|
3984
4719
|
<polyline points="15 18 9 12 15 6"></polyline>
|
|
3985
4720
|
</svg>
|
|
3986
4721
|
</button>
|
|
3987
|
-
|
|
4722
|
+
|
|
3988
4723
|
<div class="page-numbers">
|
|
3989
4724
|
@for (p of pageNumbers(); track p) {
|
|
3990
|
-
<button class="page-btn number" [class.active]="p === currentPage()" (click)="goPage(p)">
|
|
4725
|
+
<button class="page-btn number" [class.active]="p === currentPage()" (click)="goPage(p)">
|
|
4726
|
+
{{ p }}
|
|
4727
|
+
</button>
|
|
3991
4728
|
}
|
|
3992
4729
|
</div>
|
|
3993
4730
|
|
|
3994
|
-
<button
|
|
3995
|
-
|
|
4731
|
+
<button
|
|
4732
|
+
class="page-btn ctrl"
|
|
4733
|
+
[disabled]="currentPage() === totalPages()"
|
|
4734
|
+
(click)="goPage(currentPage() + 1)"
|
|
4735
|
+
[title]="i18n.pagination.nextPage"
|
|
4736
|
+
>
|
|
4737
|
+
<svg
|
|
4738
|
+
viewBox="0 0 24 24"
|
|
4739
|
+
width="14"
|
|
4740
|
+
height="14"
|
|
4741
|
+
fill="none"
|
|
4742
|
+
stroke="currentColor"
|
|
4743
|
+
stroke-width="2.5"
|
|
4744
|
+
stroke-linecap="round"
|
|
4745
|
+
stroke-linejoin="round"
|
|
4746
|
+
>
|
|
3996
4747
|
<polyline points="9 18 15 12 9 6"></polyline>
|
|
3997
4748
|
</svg>
|
|
3998
4749
|
</button>
|
|
3999
|
-
<button
|
|
4000
|
-
|
|
4750
|
+
<button
|
|
4751
|
+
class="page-btn ctrl"
|
|
4752
|
+
[disabled]="currentPage() === totalPages()"
|
|
4753
|
+
(click)="goPage(totalPages())"
|
|
4754
|
+
[title]="i18n.pagination.lastPage"
|
|
4755
|
+
>
|
|
4756
|
+
<svg
|
|
4757
|
+
viewBox="0 0 24 24"
|
|
4758
|
+
width="14"
|
|
4759
|
+
height="14"
|
|
4760
|
+
fill="none"
|
|
4761
|
+
stroke="currentColor"
|
|
4762
|
+
stroke-width="2.5"
|
|
4763
|
+
stroke-linecap="round"
|
|
4764
|
+
stroke-linejoin="round"
|
|
4765
|
+
>
|
|
4001
4766
|
<polyline points="13 17 18 12 13 7"></polyline>
|
|
4002
4767
|
<polyline points="6 17 11 12 6 7"></polyline>
|
|
4003
4768
|
</svg>
|
|
@@ -4008,31 +4773,72 @@ class DataGridComponent {
|
|
|
4008
4773
|
|
|
4009
4774
|
<!-- Excel-Style Filter Popover Overlay -->
|
|
4010
4775
|
@if (activeFilterPopover(); as pop) {
|
|
4011
|
-
<div
|
|
4776
|
+
<div
|
|
4777
|
+
class="grid-filter-popover"
|
|
4778
|
+
role="dialog"
|
|
4779
|
+
[attr.aria-label]="i18n.grid.filterColumn + ': ' + getColumnTitle(pop.field)"
|
|
4780
|
+
[style.top.px]="pop.top"
|
|
4781
|
+
[style.left.px]="pop.left"
|
|
4782
|
+
(click)="$event.stopPropagation()"
|
|
4783
|
+
>
|
|
4012
4784
|
<div class="popover-section pinning-section">
|
|
4013
|
-
<label class="popover-label">
|
|
4785
|
+
<label class="popover-label">{{ i18n.grid.pinColumn }}</label>
|
|
4014
4786
|
<div class="pinning-actions">
|
|
4015
|
-
<button
|
|
4016
|
-
|
|
4017
|
-
|
|
4787
|
+
<button
|
|
4788
|
+
class="pin-btn"
|
|
4789
|
+
[class.active]="getColumnPinnedState(pop.field) === 'left'"
|
|
4790
|
+
[attr.aria-pressed]="getColumnPinnedState(pop.field) === 'left'"
|
|
4791
|
+
(click)="pinColumnPopover(pop.field, 'left')"
|
|
4792
|
+
type="button"
|
|
4793
|
+
>
|
|
4794
|
+
{{ i18n.grid.pinLeft }}
|
|
4795
|
+
</button>
|
|
4796
|
+
<button
|
|
4797
|
+
class="pin-btn"
|
|
4798
|
+
[class.active]="getColumnPinnedState(pop.field) === 'right'"
|
|
4799
|
+
[attr.aria-pressed]="getColumnPinnedState(pop.field) === 'right'"
|
|
4800
|
+
(click)="pinColumnPopover(pop.field, 'right')"
|
|
4801
|
+
type="button"
|
|
4802
|
+
>
|
|
4803
|
+
{{ i18n.grid.pinRight }}
|
|
4804
|
+
</button>
|
|
4805
|
+
<button
|
|
4806
|
+
class="pin-btn"
|
|
4807
|
+
[class.active]="getColumnPinnedState(pop.field) === null"
|
|
4808
|
+
[attr.aria-pressed]="getColumnPinnedState(pop.field) === null"
|
|
4809
|
+
(click)="pinColumnPopover(pop.field, null)"
|
|
4810
|
+
type="button"
|
|
4811
|
+
>
|
|
4812
|
+
{{ i18n.grid.noPin }}
|
|
4813
|
+
</button>
|
|
4018
4814
|
</div>
|
|
4019
4815
|
</div>
|
|
4020
4816
|
|
|
4021
4817
|
<div class="popover-section text-filter-section">
|
|
4022
|
-
<label class="popover-label">
|
|
4818
|
+
<label class="popover-label">{{ i18n.grid.textFilter }}</label>
|
|
4023
4819
|
<div class="text-filter-row">
|
|
4024
|
-
<select
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4820
|
+
<select
|
|
4821
|
+
class="popover-select"
|
|
4822
|
+
[value]="tempFilterOperator()"
|
|
4823
|
+
(change)="tempFilterOperator.set($any($event.target).value)"
|
|
4824
|
+
>
|
|
4825
|
+
<option value="contains">{{ i18n.grid.contains }}</option>
|
|
4826
|
+
<option value="eq">{{ i18n.grid.equals }}</option>
|
|
4827
|
+
<option value="startsWith">{{ i18n.grid.startsWith }}</option>
|
|
4828
|
+
<option value="endsWith">{{ i18n.grid.endsWith }}</option>
|
|
4029
4829
|
</select>
|
|
4030
|
-
<input
|
|
4830
|
+
<input
|
|
4831
|
+
class="popover-input"
|
|
4832
|
+
type="text"
|
|
4833
|
+
[value]="tempFilterValue()"
|
|
4834
|
+
(input)="tempFilterValue.set($any($event.target).value)"
|
|
4835
|
+
[placeholder]="i18n.grid.filterPlaceholder"
|
|
4836
|
+
/>
|
|
4031
4837
|
</div>
|
|
4032
4838
|
</div>
|
|
4033
|
-
|
|
4839
|
+
|
|
4034
4840
|
<div class="popover-section checklist-section">
|
|
4035
|
-
<label class="popover-label">
|
|
4841
|
+
<label class="popover-label">{{ i18n.grid.checklistFilter }}</label>
|
|
4036
4842
|
<input
|
|
4037
4843
|
class="checklist-search"
|
|
4038
4844
|
type="text"
|
|
@@ -4042,25 +4848,39 @@ class DataGridComponent {
|
|
|
4042
4848
|
/>
|
|
4043
4849
|
<div class="checklist-actions">
|
|
4044
4850
|
<label class="checklist-item select-all">
|
|
4045
|
-
<input
|
|
4851
|
+
<input
|
|
4852
|
+
type="checkbox"
|
|
4853
|
+
[checked]="tempSelectedValues().size === getFilteredDistinctValues(pop.field).length"
|
|
4854
|
+
[indeterminate]="
|
|
4855
|
+
tempSelectedValues().size > 0 &&
|
|
4856
|
+
tempSelectedValues().size < getFilteredDistinctValues(pop.field).length
|
|
4857
|
+
"
|
|
4858
|
+
(change)="toggleSelectAllChecklist()"
|
|
4859
|
+
/>
|
|
4046
4860
|
<span>({{ i18n.grid.selectAll }})</span>
|
|
4047
4861
|
</label>
|
|
4048
4862
|
</div>
|
|
4049
4863
|
<div class="checklist-scroll">
|
|
4050
4864
|
@for (val of getFilteredDistinctValues(pop.field); track val) {
|
|
4051
4865
|
<label class="checklist-item">
|
|
4052
|
-
<input
|
|
4866
|
+
<input
|
|
4867
|
+
type="checkbox"
|
|
4868
|
+
[checked]="tempSelectedValues().has(val)"
|
|
4869
|
+
(change)="toggleChecklistItem(val)"
|
|
4870
|
+
/>
|
|
4053
4871
|
<span>{{ val }}</span>
|
|
4054
4872
|
</label>
|
|
4055
4873
|
}
|
|
4056
4874
|
</div>
|
|
4057
4875
|
</div>
|
|
4058
|
-
|
|
4876
|
+
|
|
4059
4877
|
<div class="popover-footer">
|
|
4060
4878
|
<button class="popover-btn clear" (click)="clearPopoverFilter()">{{ i18n.datePicker.clear }}</button>
|
|
4061
4879
|
<div class="footer-actions">
|
|
4062
|
-
<button class="popover-btn cancel" (click)="
|
|
4063
|
-
|
|
4880
|
+
<button class="popover-btn cancel" (click)="closeFilterPopover()">
|
|
4881
|
+
{{ i18n.common.cancel }}
|
|
4882
|
+
</button>
|
|
4883
|
+
<button class="popover-btn apply" (click)="applyPopoverFilter()">{{ i18n.grid.apply }}</button>
|
|
4064
4884
|
</div>
|
|
4065
4885
|
</div>
|
|
4066
4886
|
</div>
|
|
@@ -4068,27 +4888,104 @@ class DataGridComponent {
|
|
|
4068
4888
|
|
|
4069
4889
|
<!-- Column Chooser Popover Overlay -->
|
|
4070
4890
|
@if (activeColumnChooserPopover(); as pop) {
|
|
4071
|
-
<div
|
|
4891
|
+
<div
|
|
4892
|
+
[id]="instanceId + '-column-chooser'"
|
|
4893
|
+
class="grid-column-chooser-popover"
|
|
4894
|
+
role="region"
|
|
4895
|
+
[attr.aria-label]="i18n.grid.chooseColumns"
|
|
4896
|
+
[style.top.px]="pop.top"
|
|
4897
|
+
[style.left.px]="pop.left"
|
|
4898
|
+
(click)="$event.stopPropagation()"
|
|
4899
|
+
>
|
|
4072
4900
|
<div class="popover-section checklist-section" style="border-top: none; padding-top: 0;">
|
|
4073
|
-
<
|
|
4901
|
+
<span class="popover-label">{{ i18n.grid.visibleColumns }}</span>
|
|
4074
4902
|
<div class="checklist-scroll">
|
|
4075
4903
|
@for (col of columns(); track col.field) {
|
|
4076
|
-
<
|
|
4077
|
-
<
|
|
4078
|
-
|
|
4079
|
-
|
|
4904
|
+
<div class="column-config-item">
|
|
4905
|
+
<label class="checklist-item">
|
|
4906
|
+
<input
|
|
4907
|
+
#firstColumnToggle
|
|
4908
|
+
type="checkbox"
|
|
4909
|
+
[checked]="!hiddenColumns().has(col.field)"
|
|
4910
|
+
[disabled]="!hiddenColumns().has(col.field) && visibleColumnsCount() === 1"
|
|
4911
|
+
(change)="toggleColumnVisibility(col.field)"
|
|
4912
|
+
/>
|
|
4913
|
+
<span>{{ col.title }}</span>
|
|
4914
|
+
</label>
|
|
4915
|
+
<div class="column-config-actions">
|
|
4916
|
+
<button
|
|
4917
|
+
class="column-config-btn"
|
|
4918
|
+
type="button"
|
|
4919
|
+
[attr.aria-label]="i18n.grid.pinLeft + ': ' + col.title"
|
|
4920
|
+
[attr.aria-pressed]="getColumnPinnedState(col.field) === 'left'"
|
|
4921
|
+
[title]="i18n.grid.pinLeft"
|
|
4922
|
+
(click)="pinColumnPopover(col.field, 'left')"
|
|
4923
|
+
>
|
|
4924
|
+
⇤
|
|
4925
|
+
</button>
|
|
4926
|
+
<button
|
|
4927
|
+
class="column-config-btn"
|
|
4928
|
+
type="button"
|
|
4929
|
+
[attr.aria-label]="i18n.grid.pinRight + ': ' + col.title"
|
|
4930
|
+
[attr.aria-pressed]="getColumnPinnedState(col.field) === 'right'"
|
|
4931
|
+
[title]="i18n.grid.pinRight"
|
|
4932
|
+
(click)="pinColumnPopover(col.field, 'right')"
|
|
4933
|
+
>
|
|
4934
|
+
⇥
|
|
4935
|
+
</button>
|
|
4936
|
+
<button
|
|
4937
|
+
class="column-config-btn"
|
|
4938
|
+
type="button"
|
|
4939
|
+
[attr.aria-label]="i18n.grid.noPin + ': ' + col.title"
|
|
4940
|
+
[attr.aria-pressed]="getColumnPinnedState(col.field) === null"
|
|
4941
|
+
[title]="i18n.grid.noPin"
|
|
4942
|
+
(click)="pinColumnPopover(col.field, null)"
|
|
4943
|
+
>
|
|
4944
|
+
×
|
|
4945
|
+
</button>
|
|
4946
|
+
<button
|
|
4947
|
+
class="column-config-btn"
|
|
4948
|
+
type="button"
|
|
4949
|
+
[attr.aria-label]="i18n.grid.moveColumnLeft(col.title)"
|
|
4950
|
+
[title]="i18n.grid.moveColumnLeft(col.title)"
|
|
4951
|
+
[disabled]="columnIndex(col.field) === 0"
|
|
4952
|
+
(click)="moveColumn(col.field, -1)"
|
|
4953
|
+
>
|
|
4954
|
+
←
|
|
4955
|
+
</button>
|
|
4956
|
+
<button
|
|
4957
|
+
class="column-config-btn"
|
|
4958
|
+
type="button"
|
|
4959
|
+
[attr.aria-label]="i18n.grid.moveColumnRight(col.title)"
|
|
4960
|
+
[title]="i18n.grid.moveColumnRight(col.title)"
|
|
4961
|
+
[disabled]="columnIndex(col.field) === columns().length - 1"
|
|
4962
|
+
(click)="moveColumn(col.field, 1)"
|
|
4963
|
+
>
|
|
4964
|
+
→
|
|
4965
|
+
</button>
|
|
4966
|
+
</div>
|
|
4967
|
+
</div>
|
|
4080
4968
|
}
|
|
4081
4969
|
</div>
|
|
4082
4970
|
</div>
|
|
4083
4971
|
<div class="popover-footer">
|
|
4084
|
-
<button class="popover-btn apply" (click)="
|
|
4972
|
+
<button class="popover-btn apply" type="button" (click)="closeColumnChooser()">
|
|
4973
|
+
{{ i18n.grid.closeColumnChooser }}
|
|
4974
|
+
</button>
|
|
4085
4975
|
</div>
|
|
4086
4976
|
</div>
|
|
4087
4977
|
}
|
|
4088
4978
|
|
|
4089
4979
|
<!-- Custom Context Menu Overlay -->
|
|
4090
4980
|
@if (activeContextMenu(); as menu) {
|
|
4091
|
-
<div
|
|
4981
|
+
<div
|
|
4982
|
+
class="grid-context-menu"
|
|
4983
|
+
role="group"
|
|
4984
|
+
[attr.aria-label]="i18n.grid.contextMenu"
|
|
4985
|
+
[style.top.px]="menu.y"
|
|
4986
|
+
[style.left.px]="menu.x"
|
|
4987
|
+
(click)="$event.stopPropagation()"
|
|
4988
|
+
>
|
|
4092
4989
|
<button class="menu-item" [disabled]="!selectedCellStart()" (click)="contextMenuCopy()">
|
|
4093
4990
|
<span class="menu-icon">📋</span> Copy Selection
|
|
4094
4991
|
</button>
|
|
@@ -4138,16 +5035,16 @@ class DataGridComponent {
|
|
|
4138
5035
|
<span class="menu-icon">🧹</span> Clear All Filters
|
|
4139
5036
|
</button>
|
|
4140
5037
|
<div class="menu-divider"></div>
|
|
4141
|
-
<button class="menu-item" (click)="exportToJson();
|
|
5038
|
+
<button class="menu-item" (click)="exportToJson(); closeContextMenu()">
|
|
4142
5039
|
<span class="menu-icon">📄</span> Export to JSON
|
|
4143
5040
|
</button>
|
|
4144
|
-
<button class="menu-item" (click)="exportToCsv();
|
|
5041
|
+
<button class="menu-item" (click)="exportToCsv(); closeContextMenu()">
|
|
4145
5042
|
<span class="menu-icon">📊</span> Export to CSV
|
|
4146
5043
|
</button>
|
|
4147
|
-
<button class="menu-item" (click)="exportToExcel();
|
|
5044
|
+
<button class="menu-item" (click)="exportToExcel(); closeContextMenu()">
|
|
4148
5045
|
<span class="menu-icon">📈</span> Export to Excel
|
|
4149
5046
|
</button>
|
|
4150
|
-
<button class="menu-item" (click)="exportToPdf();
|
|
5047
|
+
<button class="menu-item" (click)="exportToPdf(); closeContextMenu()">
|
|
4151
5048
|
<span class="menu-icon">📕</span> Export to PDF
|
|
4152
5049
|
</button>
|
|
4153
5050
|
</div>
|
|
@@ -4159,25 +5056,28 @@ class DataGridComponent {
|
|
|
4159
5056
|
<!-- Advanced Filter Builder Overlay -->
|
|
4160
5057
|
@if (isFilterBuilderOpen()) {
|
|
4161
5058
|
<ngx-grid-filter-builder
|
|
5059
|
+
[gridInstanceId]="instanceId"
|
|
4162
5060
|
[columns]="$any(columns())"
|
|
4163
5061
|
[expression]="internalFilterExpression()"
|
|
4164
5062
|
(expressionChange)="onFilterExpressionChange($event)"
|
|
4165
|
-
(close)="
|
|
5063
|
+
(close)="closeFilterBuilder()"
|
|
4166
5064
|
/>
|
|
4167
5065
|
}
|
|
4168
5066
|
</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 });
|
|
5067
|
+
`, 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
5068
|
}
|
|
4171
5069
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: DataGridComponent, decorators: [{
|
|
4172
5070
|
type: Component,
|
|
4173
|
-
args: [{ selector: 'ngx-data-grid', standalone: true, imports: [
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
|
|
5071
|
+
args: [{ selector: 'ngx-data-grid', standalone: true, imports: [NgTemplateOutlet, GridStatusBarComponent, GridFilterBuilderComponent], providers: [GridExportXlsxService], changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
5072
|
+
<div
|
|
5073
|
+
class="ngx-data-grid"
|
|
5074
|
+
[class.loading]="loading()"
|
|
5075
|
+
[class.compact]="compact()"
|
|
5076
|
+
role="region"
|
|
5077
|
+
[attr.aria-label]="i18n.grid.dataGrid"
|
|
5078
|
+
[attr.tabindex]="keyboardNavigation() || enableContextMenu() ? 0 : null"
|
|
5079
|
+
>
|
|
5080
|
+
<div class="visually-hidden" aria-live="polite" aria-atomic="true">{{ selectionAnnouncement() }}</div>
|
|
4181
5081
|
|
|
4182
5082
|
@if (showGroupingPanel()) {
|
|
4183
5083
|
<div
|
|
@@ -4189,20 +5089,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4189
5089
|
>
|
|
4190
5090
|
<div class="grouping-panel-label">
|
|
4191
5091
|
@if (internalGroupBy(); as gb) {
|
|
4192
|
-
<span>
|
|
5092
|
+
<span>{{ i18n.grid.groupedBy }}</span>
|
|
4193
5093
|
<span class="group-chip">
|
|
4194
5094
|
{{ getColumnTitle(gb.field) }}
|
|
4195
5095
|
<button class="remove-group-btn" (click)="clearGrouping()">×</button>
|
|
4196
5096
|
</span>
|
|
4197
5097
|
} @else {
|
|
4198
|
-
<span>
|
|
5098
|
+
<span>{{ i18n.grid.groupColumnsHint }}</span>
|
|
4199
5099
|
}
|
|
4200
5100
|
</div>
|
|
4201
5101
|
</div>
|
|
4202
5102
|
}
|
|
4203
5103
|
|
|
4204
|
-
<div class="grid-toolbar">
|
|
4205
|
-
<span class="grid-toolbar-title">
|
|
5104
|
+
<div class="grid-toolbar" role="toolbar" [attr.aria-label]="i18n.grid.toolbar">
|
|
5105
|
+
<span class="grid-toolbar-title">{{ i18n.grid.dataGrid }}</span>
|
|
4206
5106
|
<div class="grid-toolbar-actions">
|
|
4207
5107
|
@if (showGlobalSearch()) {
|
|
4208
5108
|
<div class="grid-search-wrap">
|
|
@@ -4214,28 +5114,97 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4214
5114
|
(input)="searchText.set($any($event.target).value)"
|
|
4215
5115
|
/>
|
|
4216
5116
|
@if (searchText()) {
|
|
4217
|
-
<button
|
|
5117
|
+
<button
|
|
5118
|
+
class="grid-search-clear"
|
|
5119
|
+
(click)="searchText.set('')"
|
|
5120
|
+
[attr.title]="i18n.grid.clearSearch"
|
|
5121
|
+
[attr.aria-label]="i18n.grid.clearSearch"
|
|
5122
|
+
>
|
|
5123
|
+
×
|
|
5124
|
+
</button>
|
|
4218
5125
|
}
|
|
4219
5126
|
</div>
|
|
4220
5127
|
}
|
|
4221
5128
|
@if (activeFilters().length > 0) {
|
|
4222
|
-
<button
|
|
5129
|
+
<button
|
|
5130
|
+
class="grid-action-btn clear-filters-btn"
|
|
5131
|
+
(click)="clearAllFilters()"
|
|
5132
|
+
[attr.title]="i18n.grid.clearFilters"
|
|
5133
|
+
[attr.aria-label]="i18n.grid.clearFilters"
|
|
5134
|
+
>
|
|
5135
|
+
Clear Filters
|
|
5136
|
+
</button>
|
|
4223
5137
|
}
|
|
4224
5138
|
@if (showColumnChooser()) {
|
|
4225
|
-
<button
|
|
5139
|
+
<button
|
|
5140
|
+
class="grid-action-btn"
|
|
5141
|
+
(click)="openColumnChooser($event)"
|
|
5142
|
+
[attr.aria-expanded]="activeColumnChooserPopover() !== null"
|
|
5143
|
+
[attr.aria-controls]="instanceId + '-column-chooser'"
|
|
5144
|
+
[attr.aria-label]="i18n.grid.chooseColumns"
|
|
5145
|
+
type="button"
|
|
5146
|
+
>
|
|
5147
|
+
{{ i18n.grid.chooseColumns }}
|
|
5148
|
+
</button>
|
|
4226
5149
|
}
|
|
4227
5150
|
@if (showFilterBuilder()) {
|
|
4228
|
-
<button
|
|
5151
|
+
<button
|
|
5152
|
+
class="grid-action-btn"
|
|
5153
|
+
type="button"
|
|
5154
|
+
(click)="openFilterBuilder($event)"
|
|
5155
|
+
[attr.aria-haspopup]="'dialog'"
|
|
5156
|
+
[attr.aria-expanded]="isFilterBuilderOpen()"
|
|
5157
|
+
[attr.aria-controls]="instanceId + '-filter-builder'"
|
|
5158
|
+
[attr.title]="i18n.grid.advancedFilterBuilder"
|
|
5159
|
+
[attr.aria-label]="i18n.grid.advancedFilterBuilder"
|
|
5160
|
+
>
|
|
5161
|
+
🔍 Filter
|
|
5162
|
+
</button>
|
|
4229
5163
|
}
|
|
4230
|
-
<button
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
5164
|
+
<button
|
|
5165
|
+
class="grid-action-btn"
|
|
5166
|
+
(click)="exportToJson()"
|
|
5167
|
+
[attr.title]="i18n.grid.exportJson"
|
|
5168
|
+
[attr.aria-label]="i18n.grid.exportJson"
|
|
5169
|
+
>
|
|
5170
|
+
JSON
|
|
5171
|
+
</button>
|
|
5172
|
+
<button
|
|
5173
|
+
class="grid-action-btn"
|
|
5174
|
+
(click)="exportToCsv()"
|
|
5175
|
+
[attr.title]="i18n.grid.exportCsv"
|
|
5176
|
+
[attr.aria-label]="i18n.grid.exportCsv"
|
|
5177
|
+
>
|
|
5178
|
+
CSV
|
|
5179
|
+
</button>
|
|
5180
|
+
<button
|
|
5181
|
+
class="grid-action-btn"
|
|
5182
|
+
(click)="exportToXlsx()"
|
|
5183
|
+
[attr.title]="i18n.grid.exportXlsx"
|
|
5184
|
+
[attr.aria-label]="i18n.grid.exportXlsx"
|
|
5185
|
+
>
|
|
5186
|
+
XLSX
|
|
5187
|
+
</button>
|
|
5188
|
+
<button
|
|
5189
|
+
class="grid-action-btn"
|
|
5190
|
+
(click)="exportToExcel()"
|
|
5191
|
+
[attr.title]="i18n.grid.exportExcel"
|
|
5192
|
+
[attr.aria-label]="i18n.grid.exportExcel"
|
|
5193
|
+
>
|
|
5194
|
+
Excel
|
|
5195
|
+
</button>
|
|
5196
|
+
<button
|
|
5197
|
+
class="grid-action-btn"
|
|
5198
|
+
(click)="exportToPdf()"
|
|
5199
|
+
[attr.title]="i18n.grid.exportPdf"
|
|
5200
|
+
[attr.aria-label]="i18n.grid.exportPdf"
|
|
5201
|
+
>
|
|
5202
|
+
PDF
|
|
5203
|
+
</button>
|
|
4235
5204
|
</div>
|
|
4236
5205
|
</div>
|
|
4237
5206
|
|
|
4238
|
-
<div class="grid-table-wrap" #viewportEl (scroll)="onViewportScroll($event)">
|
|
5207
|
+
<div class="grid-table-wrap" #viewportEl (scroll)="onViewportScroll($event)" [attr.aria-busy]="loading()">
|
|
4239
5208
|
<table class="grid-table" [class.striped]="striped()">
|
|
4240
5209
|
<colgroup>
|
|
4241
5210
|
@if (rowReorderable()) {
|
|
@@ -4258,13 +5227,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4258
5227
|
<ng-template #headerCellContent let-col="col">
|
|
4259
5228
|
<div class="th-content-wrapper">
|
|
4260
5229
|
@if (resolveHeaderTemplate(col); as activeHeaderTemplate) {
|
|
4261
|
-
<ng-container
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
5230
|
+
<ng-container
|
|
5231
|
+
*ngTemplateOutlet="
|
|
5232
|
+
activeHeaderTemplate;
|
|
5233
|
+
context: {
|
|
5234
|
+
$implicit: col,
|
|
5235
|
+
column: col,
|
|
5236
|
+
sort: sortState(),
|
|
5237
|
+
filters: activeFilters(),
|
|
5238
|
+
isServerMode: isAnyServerMode(),
|
|
5239
|
+
}
|
|
5240
|
+
"
|
|
5241
|
+
/>
|
|
4268
5242
|
} @else {
|
|
4269
5243
|
<span class="th-text">{{ col.title }}</span>
|
|
4270
5244
|
@if (col.sortable) {
|
|
@@ -4281,25 +5255,70 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4281
5255
|
}
|
|
4282
5256
|
}
|
|
4283
5257
|
@if (col.filterable) {
|
|
4284
|
-
<button
|
|
4285
|
-
|
|
5258
|
+
<button
|
|
5259
|
+
class="grid-filter-btn"
|
|
5260
|
+
[class.active]="filterStates().has(col.field)"
|
|
5261
|
+
(click)="openFilterPopover($event, col.field); $event.stopPropagation()"
|
|
5262
|
+
[attr.title]="i18n.grid.filterColumn"
|
|
5263
|
+
[attr.aria-label]="i18n.grid.filterColumn"
|
|
5264
|
+
>
|
|
5265
|
+
<svg
|
|
5266
|
+
viewBox="0 0 24 24"
|
|
5267
|
+
width="12"
|
|
5268
|
+
height="12"
|
|
5269
|
+
fill="none"
|
|
5270
|
+
stroke="currentColor"
|
|
5271
|
+
stroke-width="2"
|
|
5272
|
+
stroke-linecap="round"
|
|
5273
|
+
stroke-linejoin="round"
|
|
5274
|
+
>
|
|
4286
5275
|
<polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"></polygon>
|
|
4287
5276
|
</svg>
|
|
4288
5277
|
</button>
|
|
4289
5278
|
}
|
|
4290
5279
|
</div>
|
|
4291
|
-
<div
|
|
5280
|
+
<div
|
|
5281
|
+
class="grid-resize-handle"
|
|
5282
|
+
(mousedown)="onResizeStart($event, col)"
|
|
5283
|
+
(dblclick)="onResizeDoubleClick($event, col)"
|
|
5284
|
+
(click)="$event.stopPropagation()"
|
|
5285
|
+
></div>
|
|
4292
5286
|
</ng-template>
|
|
4293
5287
|
|
|
4294
5288
|
<tr class="grid-header-row">
|
|
4295
5289
|
@if (rowReorderable()) {
|
|
4296
|
-
<th
|
|
5290
|
+
<th
|
|
5291
|
+
class="grid-th grid-th-reorder pinned-left"
|
|
5292
|
+
[class.pinned-left-last]="isRowReorderableLastPinned()"
|
|
5293
|
+
[attr.rowspan]="hasColumnCategories() ? 2 : 1"
|
|
5294
|
+
style="width:44px; left:0px"
|
|
5295
|
+
></th>
|
|
4297
5296
|
}
|
|
4298
5297
|
@if (showDetailToggle()) {
|
|
4299
|
-
<th
|
|
5298
|
+
<th
|
|
5299
|
+
class="grid-th grid-th-toggle pinned-left"
|
|
5300
|
+
[class.pinned-left-last]="isDetailToggleLastPinned()"
|
|
5301
|
+
[attr.rowspan]="hasColumnCategories() ? 2 : 1"
|
|
5302
|
+
[style.left.px]="rowReorderable() ? 44 : 0"
|
|
5303
|
+
style="width:44px"
|
|
5304
|
+
></th>
|
|
4300
5305
|
}
|
|
4301
5306
|
@if (selectable()) {
|
|
4302
|
-
<th
|
|
5307
|
+
<th
|
|
5308
|
+
class="grid-th grid-th-check pinned-left"
|
|
5309
|
+
[class.pinned-left-last]="isSelectableLastPinned()"
|
|
5310
|
+
[attr.rowspan]="hasColumnCategories() ? 2 : 1"
|
|
5311
|
+
[style.left.px]="(rowReorderable() ? 44 : 0) + (showDetailToggle() ? 44 : 0)"
|
|
5312
|
+
style="width:44px"
|
|
5313
|
+
>
|
|
5314
|
+
<input
|
|
5315
|
+
type="checkbox"
|
|
5316
|
+
[attr.aria-label]="allSelected() ? i18n.grid.deselectAll : i18n.grid.selectAll"
|
|
5317
|
+
[checked]="allSelected()"
|
|
5318
|
+
[indeterminate]="someSelected() && !allSelected()"
|
|
5319
|
+
(change)="toggleAll()"
|
|
5320
|
+
/>
|
|
5321
|
+
</th>
|
|
4303
5322
|
}
|
|
4304
5323
|
@for (cell of headerRows().row1; track cell.field) {
|
|
4305
5324
|
@if (cell.isCategory) {
|
|
@@ -4352,7 +5371,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4352
5371
|
[style.right.px]="firstPinnedRightColumnField() !== null ? 0 : null"
|
|
4353
5372
|
[attr.rowspan]="hasColumnCategories() ? 2 : 1"
|
|
4354
5373
|
style="width:120px"
|
|
4355
|
-
>
|
|
5374
|
+
>
|
|
5375
|
+
Actions
|
|
5376
|
+
</th>
|
|
4356
5377
|
}
|
|
4357
5378
|
</tr>
|
|
4358
5379
|
@if (hasColumnCategories()) {
|
|
@@ -4403,13 +5424,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4403
5424
|
<tr class="grid-group-row" (click)="toggleGroup(group.key)">
|
|
4404
5425
|
@if (groupAggregations()) {
|
|
4405
5426
|
@if (rowReorderable()) {
|
|
4406
|
-
<td
|
|
5427
|
+
<td
|
|
5428
|
+
class="grid-td grid-td-reorder pinned-left"
|
|
5429
|
+
[class.pinned-left-last]="isRowReorderableLastPinned()"
|
|
5430
|
+
style="left:0px; width:44px"
|
|
5431
|
+
></td>
|
|
4407
5432
|
}
|
|
4408
5433
|
@if (showDetailToggle()) {
|
|
4409
|
-
<td
|
|
5434
|
+
<td
|
|
5435
|
+
class="grid-td grid-td-toggle pinned-left"
|
|
5436
|
+
[class.pinned-left-last]="isDetailToggleLastPinned()"
|
|
5437
|
+
[style.left.px]="rowReorderable() ? 44 : 0"
|
|
5438
|
+
style="width:44px"
|
|
5439
|
+
></td>
|
|
4410
5440
|
}
|
|
4411
5441
|
@if (selectable()) {
|
|
4412
|
-
<td
|
|
5442
|
+
<td
|
|
5443
|
+
class="grid-td grid-td-check pinned-left"
|
|
5444
|
+
[class.pinned-left-last]="isSelectableLastPinned()"
|
|
5445
|
+
[style.left.px]="(rowReorderable() ? 44 : 0) + (showDetailToggle() ? 44 : 0)"
|
|
5446
|
+
style="width:44px"
|
|
5447
|
+
>
|
|
5448
|
+
<input
|
|
5449
|
+
type="checkbox"
|
|
5450
|
+
[checked]="isGroupAllSelected(group)"
|
|
5451
|
+
(change)="toggleGroupSelection(group, $event)"
|
|
5452
|
+
(click)="$event.stopPropagation()"
|
|
5453
|
+
/>
|
|
5454
|
+
</td>
|
|
4413
5455
|
}
|
|
4414
5456
|
@for (col of orderedColumns(); track col.field; let first = $first) {
|
|
4415
5457
|
<td
|
|
@@ -4417,7 +5459,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4417
5459
|
[class.pinned-left]="col.pinned === 'left'"
|
|
4418
5460
|
[class.pinned-left-last]="col.pinned === 'left' && lastPinnedColumnField() === col.field"
|
|
4419
5461
|
[class.pinned-right]="col.pinned === 'right'"
|
|
4420
|
-
[class.pinned-right-first]="
|
|
5462
|
+
[class.pinned-right-first]="
|
|
5463
|
+
col.pinned === 'right' && firstPinnedRightColumnField() === col.field
|
|
5464
|
+
"
|
|
4421
5465
|
[style.left.px]="col.pinned === 'left' ? columnOffsets()[col.field] : null"
|
|
4422
5466
|
[style.right.px]="col.pinned === 'right' ? columnRightOffsets()[col.field] : null"
|
|
4423
5467
|
[style.text-align]="col.align ?? 'left'"
|
|
@@ -4425,10 +5469,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4425
5469
|
>
|
|
4426
5470
|
@if (first) {
|
|
4427
5471
|
<div style="display: flex; align-items: center; gap: 4px;">
|
|
4428
|
-
<button
|
|
5472
|
+
<button
|
|
5473
|
+
class="group-toggle"
|
|
5474
|
+
type="button"
|
|
5475
|
+
(click)="toggleGroup(group.key); $event.stopPropagation()"
|
|
5476
|
+
style="background: transparent; border: none; cursor: pointer; padding: 0 4px; font-weight: bold; color: inherit; outline: none;"
|
|
5477
|
+
>
|
|
4429
5478
|
{{ isGroupCollapsed(group.key) ? '▸' : '▾' }}
|
|
4430
5479
|
</button>
|
|
4431
|
-
<strong>{{ col.category ? '' : group.field + ': ' }}</strong
|
|
5480
|
+
<strong>{{ col.category ? '' : group.field + ': ' }}</strong
|
|
5481
|
+
>{{ group.value }} <span class="group-count">({{ group.count }})</span>
|
|
4432
5482
|
</div>
|
|
4433
5483
|
} @else if (col.aggregation) {
|
|
4434
5484
|
<span class="agg-label">{{ col.aggregation }}: </span>
|
|
@@ -4445,10 +5495,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4445
5495
|
}
|
|
4446
5496
|
} @else {
|
|
4447
5497
|
<td [attr.colspan]="renderColumnCount()">
|
|
4448
|
-
<button
|
|
5498
|
+
<button
|
|
5499
|
+
class="group-toggle"
|
|
5500
|
+
type="button"
|
|
5501
|
+
(click)="toggleGroup(group.key); $event.stopPropagation()"
|
|
5502
|
+
>
|
|
4449
5503
|
{{ isGroupCollapsed(group.key) ? '▸' : '▾' }}
|
|
4450
5504
|
</button>
|
|
4451
|
-
<strong>{{ group.field }}</strong
|
|
5505
|
+
<strong>{{ group.field }}</strong
|
|
5506
|
+
>: {{ group.value }}
|
|
4452
5507
|
<span class="group-count">({{ group.count }})</span>
|
|
4453
5508
|
</td>
|
|
4454
5509
|
}
|
|
@@ -4468,9 +5523,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4468
5523
|
(dblclick)="editable() ? beginEdit(row, i) : null"
|
|
4469
5524
|
>
|
|
4470
5525
|
@if (rowReorderable()) {
|
|
4471
|
-
<td
|
|
4472
|
-
|
|
4473
|
-
|
|
5526
|
+
<td
|
|
5527
|
+
class="grid-td grid-td-reorder pinned-left"
|
|
5528
|
+
[class.pinned-left-last]="isRowReorderableLastPinned()"
|
|
5529
|
+
style="left:0px; text-align:center; width:44px"
|
|
5530
|
+
>
|
|
5531
|
+
<span
|
|
5532
|
+
class="row-drag-handle"
|
|
5533
|
+
draggable="true"
|
|
5534
|
+
(dragstart)="onRowDragStart($event, i)"
|
|
5535
|
+
(dragend)="onRowDragEnd()"
|
|
5536
|
+
[attr.title]="i18n.grid.dragRowToReorder"
|
|
5537
|
+
[attr.aria-label]="i18n.grid.dragRowToReorder"
|
|
5538
|
+
>
|
|
5539
|
+
<svg
|
|
5540
|
+
viewBox="0 0 24 24"
|
|
5541
|
+
width="16"
|
|
5542
|
+
height="16"
|
|
5543
|
+
fill="none"
|
|
5544
|
+
stroke="currentColor"
|
|
5545
|
+
stroke-width="2.5"
|
|
5546
|
+
stroke-linecap="round"
|
|
5547
|
+
stroke-linejoin="round"
|
|
5548
|
+
style="display: block;"
|
|
5549
|
+
>
|
|
4474
5550
|
<circle cx="9" cy="5" r="1.5"></circle>
|
|
4475
5551
|
<circle cx="9" cy="12" r="1.5"></circle>
|
|
4476
5552
|
<circle cx="9" cy="19" r="1.5"></circle>
|
|
@@ -4483,9 +5559,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4483
5559
|
}
|
|
4484
5560
|
|
|
4485
5561
|
@if (showDetailToggle()) {
|
|
4486
|
-
<td
|
|
4487
|
-
|
|
4488
|
-
|
|
5562
|
+
<td
|
|
5563
|
+
class="grid-td grid-td-toggle pinned-left"
|
|
5564
|
+
[class.pinned-left-last]="isDetailToggleLastPinned()"
|
|
5565
|
+
[style.left.px]="rowReorderable() ? 44 : 0"
|
|
5566
|
+
>
|
|
5567
|
+
<button
|
|
5568
|
+
class="toggle-btn"
|
|
5569
|
+
[class.expanded]="isExpanded(row)"
|
|
5570
|
+
type="button"
|
|
5571
|
+
(click)="toggleDetail(row); $event.stopPropagation()"
|
|
5572
|
+
[attr.title]="i18n.grid.toggleDetails"
|
|
5573
|
+
[attr.aria-label]="i18n.grid.toggleDetails"
|
|
5574
|
+
>
|
|
5575
|
+
<svg
|
|
5576
|
+
viewBox="0 0 24 24"
|
|
5577
|
+
width="12"
|
|
5578
|
+
height="12"
|
|
5579
|
+
fill="none"
|
|
5580
|
+
stroke="currentColor"
|
|
5581
|
+
stroke-width="3.5"
|
|
5582
|
+
stroke-linecap="round"
|
|
5583
|
+
stroke-linejoin="round"
|
|
5584
|
+
class="chevron-icon"
|
|
5585
|
+
>
|
|
4489
5586
|
<polyline points="9 18 15 12 9 6"></polyline>
|
|
4490
5587
|
</svg>
|
|
4491
5588
|
</button>
|
|
@@ -4493,18 +5590,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4493
5590
|
}
|
|
4494
5591
|
|
|
4495
5592
|
@if (selectable()) {
|
|
4496
|
-
<td
|
|
5593
|
+
<td
|
|
5594
|
+
class="grid-td grid-td-check pinned-left"
|
|
5595
|
+
[class.pinned-left-last]="isSelectableLastPinned()"
|
|
5596
|
+
[style.left.px]="(rowReorderable() ? 44 : 0) + (showDetailToggle() ? 44 : 0)"
|
|
5597
|
+
>
|
|
5598
|
+
<input
|
|
5599
|
+
type="checkbox"
|
|
5600
|
+
[attr.aria-label]="i18n.grid.selectRow(rowSelectionKey(row))"
|
|
5601
|
+
[checked]="isRowSelected(row)"
|
|
5602
|
+
(change)="toggleRow(row)"
|
|
5603
|
+
(click)="$event.stopPropagation()"
|
|
5604
|
+
/>
|
|
5605
|
+
</td>
|
|
4497
5606
|
}
|
|
4498
5607
|
|
|
4499
5608
|
@if (rowTemplate()) {
|
|
4500
5609
|
<td class="grid-td" [attr.colspan]="orderedColumns().length + (editable() ? 1 : 0)">
|
|
4501
|
-
<ng-container
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
5610
|
+
<ng-container
|
|
5611
|
+
*ngTemplateOutlet="
|
|
5612
|
+
rowTemplate();
|
|
5613
|
+
context: {
|
|
5614
|
+
$implicit: row,
|
|
5615
|
+
row: row,
|
|
5616
|
+
index: i,
|
|
5617
|
+
editing: isEditing(row),
|
|
5618
|
+
expanded: isExpanded(row),
|
|
5619
|
+
}
|
|
5620
|
+
"
|
|
5621
|
+
/>
|
|
4508
5622
|
</td>
|
|
4509
5623
|
} @else {
|
|
4510
5624
|
@for (col of orderedColumns(); track col.field) {
|
|
@@ -4515,9 +5629,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4515
5629
|
[class.pinned-left]="col.pinned === 'left'"
|
|
4516
5630
|
[class.pinned-left-last]="col.pinned === 'left' && lastPinnedColumnField() === col.field"
|
|
4517
5631
|
[class.pinned-right]="col.pinned === 'right'"
|
|
4518
|
-
[class.pinned-right-first]="
|
|
5632
|
+
[class.pinned-right-first]="
|
|
5633
|
+
col.pinned === 'right' && firstPinnedRightColumnField() === col.field
|
|
5634
|
+
"
|
|
4519
5635
|
[class.cell-focused]="focusedCell()?.row === row && focusedCell()?.colField === col.field"
|
|
4520
|
-
[
|
|
5636
|
+
[attr.tabindex]="
|
|
5637
|
+
keyboardNavigation() || enableContextMenu()
|
|
5638
|
+
? focusedCell()?.row === row && focusedCell()?.colField === col.field
|
|
5639
|
+
? 0
|
|
5640
|
+
: -1
|
|
5641
|
+
: null
|
|
5642
|
+
"
|
|
5643
|
+
[class.cell-focused-editing]="
|
|
5644
|
+
focusedCell()?.row === row &&
|
|
5645
|
+
focusedCell()?.colField === col.field &&
|
|
5646
|
+
focusedCellEditActive()
|
|
5647
|
+
"
|
|
4521
5648
|
[style.left.px]="col.pinned === 'left' ? columnOffsets()[col.field] : null"
|
|
4522
5649
|
[style.right.px]="col.pinned === 'right' ? columnRightOffsets()[col.field] : null"
|
|
4523
5650
|
[style.text-align]="col.align ?? 'left'"
|
|
@@ -4526,20 +5653,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4526
5653
|
(mousedown)="onCellMouseDown($event, row, col.field)"
|
|
4527
5654
|
(mouseenter)="onCellMouseEnter(row, col.field)"
|
|
4528
5655
|
(contextmenu)="onCellContextMenu($event, row, col.field)"
|
|
4529
|
-
(click)="onCellClick(row, col.field)"
|
|
5656
|
+
(click)="onCellClick(row, col.field, $event)"
|
|
4530
5657
|
>
|
|
4531
5658
|
@if (isEditing(row) && editable() && col.editable) {
|
|
4532
5659
|
@if (resolveEditCellTemplate(col); as activeEditTemplate) {
|
|
4533
|
-
<ng-container
|
|
4534
|
-
|
|
4535
|
-
|
|
4536
|
-
|
|
4537
|
-
|
|
4538
|
-
|
|
4539
|
-
|
|
4540
|
-
|
|
4541
|
-
|
|
4542
|
-
|
|
5660
|
+
<ng-container
|
|
5661
|
+
*ngTemplateOutlet="
|
|
5662
|
+
activeEditTemplate;
|
|
5663
|
+
context: {
|
|
5664
|
+
$implicit: getDraftValue(row, col.field),
|
|
5665
|
+
value: getCellValue(row, col.field),
|
|
5666
|
+
row: row,
|
|
5667
|
+
column: col,
|
|
5668
|
+
index: i,
|
|
5669
|
+
editing: true,
|
|
5670
|
+
draftValue: getDraftValue(row, col.field),
|
|
5671
|
+
updateDraft: getUpdateDraftCallback(col.field),
|
|
5672
|
+
}
|
|
5673
|
+
"
|
|
5674
|
+
/>
|
|
4543
5675
|
} @else {
|
|
4544
5676
|
<input
|
|
4545
5677
|
class="grid-edit-input"
|
|
@@ -4549,14 +5681,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4549
5681
|
/>
|
|
4550
5682
|
}
|
|
4551
5683
|
} @else if (resolveCellTemplate(col)) {
|
|
4552
|
-
<ng-container
|
|
4553
|
-
|
|
4554
|
-
|
|
4555
|
-
|
|
4556
|
-
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
|
|
5684
|
+
<ng-container
|
|
5685
|
+
*ngTemplateOutlet="
|
|
5686
|
+
resolveCellTemplate(col)!;
|
|
5687
|
+
context: {
|
|
5688
|
+
$implicit: getCellValue(row, col.field),
|
|
5689
|
+
value: getCellValue(row, col.field),
|
|
5690
|
+
row: row,
|
|
5691
|
+
column: col,
|
|
5692
|
+
index: i,
|
|
5693
|
+
editing: isEditing(row),
|
|
5694
|
+
}
|
|
5695
|
+
"
|
|
5696
|
+
/>
|
|
4560
5697
|
} @else {
|
|
4561
5698
|
@if (showGlobalSearch() && searchText()) {
|
|
4562
5699
|
<span [innerHTML]="highlightSearchText(getCellValue(row, col.field))"></span>
|
|
@@ -4577,10 +5714,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4577
5714
|
style="width:120px"
|
|
4578
5715
|
>
|
|
4579
5716
|
@if (!isEditing(row)) {
|
|
4580
|
-
<button
|
|
5717
|
+
<button
|
|
5718
|
+
class="action-btn"
|
|
5719
|
+
type="button"
|
|
5720
|
+
(click)="beginEdit(row, i); $event.stopPropagation()"
|
|
5721
|
+
>
|
|
5722
|
+
Edit
|
|
5723
|
+
</button>
|
|
4581
5724
|
} @else {
|
|
4582
|
-
<button
|
|
4583
|
-
|
|
5725
|
+
<button
|
|
5726
|
+
class="action-btn save"
|
|
5727
|
+
type="button"
|
|
5728
|
+
(click)="saveEdit(row, i); $event.stopPropagation()"
|
|
5729
|
+
>
|
|
5730
|
+
Save
|
|
5731
|
+
</button>
|
|
5732
|
+
<button class="action-btn" type="button" (click)="cancelEdit(); $event.stopPropagation()">
|
|
5733
|
+
Cancel
|
|
5734
|
+
</button>
|
|
4584
5735
|
}
|
|
4585
5736
|
</td>
|
|
4586
5737
|
}
|
|
@@ -4591,11 +5742,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4591
5742
|
<tr class="grid-detail-row" [class.expanded]="isExpanded(row)">
|
|
4592
5743
|
<td [attr.colspan]="renderColumnCount()" class="grid-detail-cell">
|
|
4593
5744
|
<div class="detail-wrapper" [class.expanded]="isExpanded(row)">
|
|
4594
|
-
<ng-container
|
|
4595
|
-
|
|
4596
|
-
|
|
4597
|
-
|
|
4598
|
-
|
|
5745
|
+
<ng-container
|
|
5746
|
+
*ngTemplateOutlet="
|
|
5747
|
+
detailRowTemplate();
|
|
5748
|
+
context: {
|
|
5749
|
+
$implicit: row,
|
|
5750
|
+
row: row,
|
|
5751
|
+
index: i,
|
|
5752
|
+
}
|
|
5753
|
+
"
|
|
5754
|
+
/>
|
|
4599
5755
|
</div>
|
|
4600
5756
|
</td>
|
|
4601
5757
|
</tr>
|
|
@@ -4609,7 +5765,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4609
5765
|
<td [attr.colspan]="renderColumnCount()" style="padding:0; border:none; height: inherit;"></td>
|
|
4610
5766
|
</tr>
|
|
4611
5767
|
}
|
|
4612
|
-
@for (
|
|
5768
|
+
@for (
|
|
5769
|
+
row of virtualScroll() ? visibleRows() : flatRenderedRows();
|
|
5770
|
+
track getKey(row, $index);
|
|
5771
|
+
let i = $index
|
|
5772
|
+
) {
|
|
4613
5773
|
@let actualIndex = virtualScroll() ? startIndex() + i : i;
|
|
4614
5774
|
<tr
|
|
4615
5775
|
[class]="'grid-row ' + getRowCustomClass(row)"
|
|
@@ -4624,9 +5784,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4624
5784
|
(dblclick)="editable() ? beginEdit(row, actualIndex) : null"
|
|
4625
5785
|
>
|
|
4626
5786
|
@if (rowReorderable()) {
|
|
4627
|
-
<td
|
|
4628
|
-
|
|
4629
|
-
|
|
5787
|
+
<td
|
|
5788
|
+
class="grid-td grid-td-reorder pinned-left"
|
|
5789
|
+
[class.pinned-left-last]="isRowReorderableLastPinned()"
|
|
5790
|
+
style="left:0px; text-align:center; width:44px"
|
|
5791
|
+
>
|
|
5792
|
+
<span
|
|
5793
|
+
class="row-drag-handle"
|
|
5794
|
+
draggable="true"
|
|
5795
|
+
(dragstart)="onRowDragStart($event, actualIndex)"
|
|
5796
|
+
(dragend)="onRowDragEnd()"
|
|
5797
|
+
[attr.title]="i18n.grid.dragRowToReorder"
|
|
5798
|
+
[attr.aria-label]="i18n.grid.dragRowToReorder"
|
|
5799
|
+
>
|
|
5800
|
+
<svg
|
|
5801
|
+
viewBox="0 0 24 24"
|
|
5802
|
+
width="16"
|
|
5803
|
+
height="16"
|
|
5804
|
+
fill="none"
|
|
5805
|
+
stroke="currentColor"
|
|
5806
|
+
stroke-width="2.5"
|
|
5807
|
+
stroke-linecap="round"
|
|
5808
|
+
stroke-linejoin="round"
|
|
5809
|
+
style="display: block;"
|
|
5810
|
+
>
|
|
4630
5811
|
<circle cx="9" cy="5" r="1.5"></circle>
|
|
4631
5812
|
<circle cx="9" cy="12" r="1.5"></circle>
|
|
4632
5813
|
<circle cx="9" cy="19" r="1.5"></circle>
|
|
@@ -4639,9 +5820,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4639
5820
|
}
|
|
4640
5821
|
|
|
4641
5822
|
@if (showDetailToggle()) {
|
|
4642
|
-
<td
|
|
4643
|
-
|
|
4644
|
-
|
|
5823
|
+
<td
|
|
5824
|
+
class="grid-td grid-td-toggle pinned-left"
|
|
5825
|
+
[class.pinned-left-last]="isDetailToggleLastPinned()"
|
|
5826
|
+
[style.left.px]="rowReorderable() ? 44 : 0"
|
|
5827
|
+
>
|
|
5828
|
+
<button
|
|
5829
|
+
class="toggle-btn"
|
|
5830
|
+
[class.expanded]="isExpanded(row)"
|
|
5831
|
+
type="button"
|
|
5832
|
+
(click)="toggleDetail(row); $event.stopPropagation()"
|
|
5833
|
+
[attr.title]="i18n.grid.toggleDetails"
|
|
5834
|
+
[attr.aria-label]="i18n.grid.toggleDetails"
|
|
5835
|
+
>
|
|
5836
|
+
<svg
|
|
5837
|
+
viewBox="0 0 24 24"
|
|
5838
|
+
width="12"
|
|
5839
|
+
height="12"
|
|
5840
|
+
fill="none"
|
|
5841
|
+
stroke="currentColor"
|
|
5842
|
+
stroke-width="3.5"
|
|
5843
|
+
stroke-linecap="round"
|
|
5844
|
+
stroke-linejoin="round"
|
|
5845
|
+
class="chevron-icon"
|
|
5846
|
+
>
|
|
4645
5847
|
<polyline points="9 18 15 12 9 6"></polyline>
|
|
4646
5848
|
</svg>
|
|
4647
5849
|
</button>
|
|
@@ -4649,18 +5851,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4649
5851
|
}
|
|
4650
5852
|
|
|
4651
5853
|
@if (selectable()) {
|
|
4652
|
-
<td
|
|
5854
|
+
<td
|
|
5855
|
+
class="grid-td grid-td-check pinned-left"
|
|
5856
|
+
[class.pinned-left-last]="isSelectableLastPinned()"
|
|
5857
|
+
[style.left.px]="(rowReorderable() ? 44 : 0) + (showDetailToggle() ? 44 : 0)"
|
|
5858
|
+
>
|
|
5859
|
+
<input
|
|
5860
|
+
type="checkbox"
|
|
5861
|
+
[attr.aria-label]="i18n.grid.selectRow(rowSelectionKey(row))"
|
|
5862
|
+
[checked]="isRowSelected(row)"
|
|
5863
|
+
(change)="toggleRow(row)"
|
|
5864
|
+
(click)="$event.stopPropagation()"
|
|
5865
|
+
/>
|
|
5866
|
+
</td>
|
|
4653
5867
|
}
|
|
4654
5868
|
|
|
4655
5869
|
@if (rowTemplate()) {
|
|
4656
5870
|
<td class="grid-td" [attr.colspan]="orderedColumns().length + (editable() ? 1 : 0)">
|
|
4657
|
-
<ng-container
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
|
|
4662
|
-
|
|
4663
|
-
|
|
5871
|
+
<ng-container
|
|
5872
|
+
*ngTemplateOutlet="
|
|
5873
|
+
rowTemplate();
|
|
5874
|
+
context: {
|
|
5875
|
+
$implicit: row,
|
|
5876
|
+
row: row,
|
|
5877
|
+
index: actualIndex,
|
|
5878
|
+
editing: isEditing(row),
|
|
5879
|
+
expanded: isExpanded(row),
|
|
5880
|
+
}
|
|
5881
|
+
"
|
|
5882
|
+
/>
|
|
4664
5883
|
</td>
|
|
4665
5884
|
} @else {
|
|
4666
5885
|
@for (col of orderedColumns(); track col.field) {
|
|
@@ -4671,9 +5890,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4671
5890
|
[class.pinned-left]="col.pinned === 'left'"
|
|
4672
5891
|
[class.pinned-left-last]="col.pinned === 'left' && lastPinnedColumnField() === col.field"
|
|
4673
5892
|
[class.pinned-right]="col.pinned === 'right'"
|
|
4674
|
-
[class.pinned-right-first]="
|
|
5893
|
+
[class.pinned-right-first]="
|
|
5894
|
+
col.pinned === 'right' && firstPinnedRightColumnField() === col.field
|
|
5895
|
+
"
|
|
4675
5896
|
[class.cell-focused]="focusedCell()?.row === row && focusedCell()?.colField === col.field"
|
|
4676
|
-
[
|
|
5897
|
+
[attr.tabindex]="
|
|
5898
|
+
keyboardNavigation() || enableContextMenu()
|
|
5899
|
+
? focusedCell()?.row === row && focusedCell()?.colField === col.field
|
|
5900
|
+
? 0
|
|
5901
|
+
: -1
|
|
5902
|
+
: null
|
|
5903
|
+
"
|
|
5904
|
+
[class.cell-focused-editing]="
|
|
5905
|
+
focusedCell()?.row === row &&
|
|
5906
|
+
focusedCell()?.colField === col.field &&
|
|
5907
|
+
focusedCellEditActive()
|
|
5908
|
+
"
|
|
4677
5909
|
[style.left.px]="col.pinned === 'left' ? columnOffsets()[col.field] : null"
|
|
4678
5910
|
[style.right.px]="col.pinned === 'right' ? columnRightOffsets()[col.field] : null"
|
|
4679
5911
|
[style.text-align]="col.align ?? 'left'"
|
|
@@ -4682,20 +5914,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4682
5914
|
(mousedown)="onCellMouseDown($event, row, col.field)"
|
|
4683
5915
|
(mouseenter)="onCellMouseEnter(row, col.field)"
|
|
4684
5916
|
(contextmenu)="onCellContextMenu($event, row, col.field)"
|
|
4685
|
-
(click)="onCellClick(row, col.field)"
|
|
5917
|
+
(click)="onCellClick(row, col.field, $event)"
|
|
4686
5918
|
>
|
|
4687
5919
|
@if (isEditing(row) && editable() && col.editable) {
|
|
4688
5920
|
@if (resolveEditCellTemplate(col); as activeEditTemplate) {
|
|
4689
|
-
<ng-container
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
|
|
5921
|
+
<ng-container
|
|
5922
|
+
*ngTemplateOutlet="
|
|
5923
|
+
activeEditTemplate;
|
|
5924
|
+
context: {
|
|
5925
|
+
$implicit: getDraftValue(row, col.field),
|
|
5926
|
+
value: getCellValue(row, col.field),
|
|
5927
|
+
row: row,
|
|
5928
|
+
column: col,
|
|
5929
|
+
index: actualIndex,
|
|
5930
|
+
editing: true,
|
|
5931
|
+
draftValue: getDraftValue(row, col.field),
|
|
5932
|
+
updateDraft: getUpdateDraftCallback(col.field),
|
|
5933
|
+
}
|
|
5934
|
+
"
|
|
5935
|
+
/>
|
|
4699
5936
|
} @else {
|
|
4700
5937
|
<input
|
|
4701
5938
|
class="grid-edit-input"
|
|
@@ -4705,14 +5942,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4705
5942
|
/>
|
|
4706
5943
|
}
|
|
4707
5944
|
} @else if (resolveCellTemplate(col)) {
|
|
4708
|
-
<ng-container
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
|
|
4715
|
-
|
|
5945
|
+
<ng-container
|
|
5946
|
+
*ngTemplateOutlet="
|
|
5947
|
+
resolveCellTemplate(col)!;
|
|
5948
|
+
context: {
|
|
5949
|
+
$implicit: getCellValue(row, col.field),
|
|
5950
|
+
value: getCellValue(row, col.field),
|
|
5951
|
+
row: row,
|
|
5952
|
+
column: col,
|
|
5953
|
+
index: actualIndex,
|
|
5954
|
+
editing: isEditing(row),
|
|
5955
|
+
}
|
|
5956
|
+
"
|
|
5957
|
+
/>
|
|
4716
5958
|
} @else {
|
|
4717
5959
|
@if (showGlobalSearch() && searchText()) {
|
|
4718
5960
|
<span [innerHTML]="highlightSearchText(getCellValue(row, col.field))"></span>
|
|
@@ -4733,10 +5975,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4733
5975
|
style="width:120px"
|
|
4734
5976
|
>
|
|
4735
5977
|
@if (!isEditing(row)) {
|
|
4736
|
-
<button
|
|
5978
|
+
<button
|
|
5979
|
+
class="action-btn"
|
|
5980
|
+
type="button"
|
|
5981
|
+
(click)="beginEdit(row, actualIndex); $event.stopPropagation()"
|
|
5982
|
+
>
|
|
5983
|
+
Edit
|
|
5984
|
+
</button>
|
|
4737
5985
|
} @else {
|
|
4738
|
-
<button
|
|
4739
|
-
|
|
5986
|
+
<button
|
|
5987
|
+
class="action-btn save"
|
|
5988
|
+
type="button"
|
|
5989
|
+
(click)="saveEdit(row, actualIndex); $event.stopPropagation()"
|
|
5990
|
+
>
|
|
5991
|
+
Save
|
|
5992
|
+
</button>
|
|
5993
|
+
<button class="action-btn" type="button" (click)="cancelEdit(); $event.stopPropagation()">
|
|
5994
|
+
Cancel
|
|
5995
|
+
</button>
|
|
4740
5996
|
}
|
|
4741
5997
|
</td>
|
|
4742
5998
|
}
|
|
@@ -4747,11 +6003,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4747
6003
|
<tr class="grid-detail-row" [class.expanded]="isExpanded(row)">
|
|
4748
6004
|
<td [attr.colspan]="renderColumnCount()" class="grid-detail-cell">
|
|
4749
6005
|
<div class="detail-wrapper" [class.expanded]="isExpanded(row)">
|
|
4750
|
-
<ng-container
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
6006
|
+
<ng-container
|
|
6007
|
+
*ngTemplateOutlet="
|
|
6008
|
+
detailRowTemplate();
|
|
6009
|
+
context: {
|
|
6010
|
+
$implicit: row,
|
|
6011
|
+
row: row,
|
|
6012
|
+
index: actualIndex,
|
|
6013
|
+
}
|
|
6014
|
+
"
|
|
6015
|
+
/>
|
|
4755
6016
|
</div>
|
|
4756
6017
|
</td>
|
|
4757
6018
|
</tr>
|
|
@@ -4768,13 +6029,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4768
6029
|
<tfoot>
|
|
4769
6030
|
<tr class="grid-footer-row">
|
|
4770
6031
|
@if (rowReorderable()) {
|
|
4771
|
-
<td
|
|
6032
|
+
<td
|
|
6033
|
+
class="grid-td-reorder pinned-left"
|
|
6034
|
+
[class.pinned-left-last]="isRowReorderableLastPinned()"
|
|
6035
|
+
style="left:0px; width:44px"
|
|
6036
|
+
></td>
|
|
4772
6037
|
}
|
|
4773
6038
|
@if (showDetailToggle()) {
|
|
4774
|
-
<td
|
|
6039
|
+
<td
|
|
6040
|
+
class="grid-td-toggle pinned-left"
|
|
6041
|
+
[class.pinned-left-last]="isDetailToggleLastPinned()"
|
|
6042
|
+
[style.left.px]="rowReorderable() ? 44 : 0"
|
|
6043
|
+
style="width:44px"
|
|
6044
|
+
></td>
|
|
4775
6045
|
}
|
|
4776
6046
|
@if (selectable()) {
|
|
4777
|
-
<td
|
|
6047
|
+
<td
|
|
6048
|
+
class="grid-td-check pinned-left"
|
|
6049
|
+
[class.pinned-left-last]="isSelectableLastPinned()"
|
|
6050
|
+
[style.left.px]="(rowReorderable() ? 44 : 0) + (showDetailToggle() ? 44 : 0)"
|
|
6051
|
+
style="width:44px"
|
|
6052
|
+
></td>
|
|
4778
6053
|
}
|
|
4779
6054
|
@for (col of orderedColumns(); track col.field) {
|
|
4780
6055
|
<td
|
|
@@ -4789,12 +6064,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4789
6064
|
[style.width.px]="getColumnWidth(col)"
|
|
4790
6065
|
>
|
|
4791
6066
|
@if (resolveFooterTemplate(col); as activeFooterTemplate) {
|
|
4792
|
-
<ng-container
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
|
|
4796
|
-
|
|
4797
|
-
|
|
6067
|
+
<ng-container
|
|
6068
|
+
*ngTemplateOutlet="
|
|
6069
|
+
activeFooterTemplate;
|
|
6070
|
+
context: {
|
|
6071
|
+
$implicit: col,
|
|
6072
|
+
column: col,
|
|
6073
|
+
aggregationValue: getAggregationValue(col),
|
|
6074
|
+
data: flatRenderedRows(),
|
|
6075
|
+
}
|
|
6076
|
+
"
|
|
6077
|
+
/>
|
|
4798
6078
|
} @else if (col.aggregation) {
|
|
4799
6079
|
<span class="agg-label">{{ col.aggregation }}: </span>
|
|
4800
6080
|
<strong class="agg-value">{{ getAggregationValue(col) }}</strong>
|
|
@@ -4818,11 +6098,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4818
6098
|
<div class="grid-pagination">
|
|
4819
6099
|
<div class="pagination-left">
|
|
4820
6100
|
<span class="page-info">
|
|
4821
|
-
{{ i18n.pagination.page }}
|
|
6101
|
+
{{ i18n.pagination.page }}
|
|
6102
|
+
<strong class="page-info-highlight">{{ pagerRangeStart() }}–{{ pagerRangeEnd() }}</strong>
|
|
6103
|
+
{{ i18n.pagination.of }} <strong class="page-info-highlight">{{ totalItems() }}</strong>
|
|
4822
6104
|
</span>
|
|
4823
6105
|
<div class="page-size-selector">
|
|
4824
6106
|
<span class="page-size-label">{{ i18n.pagination.itemsPerPage }}:</span>
|
|
4825
|
-
<select
|
|
6107
|
+
<select
|
|
6108
|
+
[value]="internalPageSize()"
|
|
6109
|
+
(change)="changePageSize(+$any($event.target).value)"
|
|
6110
|
+
class="page-size-select"
|
|
6111
|
+
>
|
|
4826
6112
|
<option [value]="5">5</option>
|
|
4827
6113
|
<option [value]="8">8</option>
|
|
4828
6114
|
<option [value]="10">10</option>
|
|
@@ -4833,31 +6119,89 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4833
6119
|
</div>
|
|
4834
6120
|
</div>
|
|
4835
6121
|
<div class="page-btns">
|
|
4836
|
-
<button
|
|
4837
|
-
|
|
6122
|
+
<button
|
|
6123
|
+
class="page-btn ctrl"
|
|
6124
|
+
[disabled]="currentPage() === 1"
|
|
6125
|
+
(click)="goPage(1)"
|
|
6126
|
+
[title]="i18n.pagination.firstPage"
|
|
6127
|
+
>
|
|
6128
|
+
<svg
|
|
6129
|
+
viewBox="0 0 24 24"
|
|
6130
|
+
width="14"
|
|
6131
|
+
height="14"
|
|
6132
|
+
fill="none"
|
|
6133
|
+
stroke="currentColor"
|
|
6134
|
+
stroke-width="2.5"
|
|
6135
|
+
stroke-linecap="round"
|
|
6136
|
+
stroke-linejoin="round"
|
|
6137
|
+
>
|
|
4838
6138
|
<polyline points="11 17 6 12 11 7"></polyline>
|
|
4839
6139
|
<polyline points="18 17 13 12 18 7"></polyline>
|
|
4840
6140
|
</svg>
|
|
4841
6141
|
</button>
|
|
4842
|
-
<button
|
|
4843
|
-
|
|
6142
|
+
<button
|
|
6143
|
+
class="page-btn ctrl"
|
|
6144
|
+
[disabled]="currentPage() === 1"
|
|
6145
|
+
(click)="goPage(currentPage() - 1)"
|
|
6146
|
+
[title]="i18n.pagination.previousPage"
|
|
6147
|
+
>
|
|
6148
|
+
<svg
|
|
6149
|
+
viewBox="0 0 24 24"
|
|
6150
|
+
width="14"
|
|
6151
|
+
height="14"
|
|
6152
|
+
fill="none"
|
|
6153
|
+
stroke="currentColor"
|
|
6154
|
+
stroke-width="2.5"
|
|
6155
|
+
stroke-linecap="round"
|
|
6156
|
+
stroke-linejoin="round"
|
|
6157
|
+
>
|
|
4844
6158
|
<polyline points="15 18 9 12 15 6"></polyline>
|
|
4845
6159
|
</svg>
|
|
4846
6160
|
</button>
|
|
4847
|
-
|
|
6161
|
+
|
|
4848
6162
|
<div class="page-numbers">
|
|
4849
6163
|
@for (p of pageNumbers(); track p) {
|
|
4850
|
-
<button class="page-btn number" [class.active]="p === currentPage()" (click)="goPage(p)">
|
|
6164
|
+
<button class="page-btn number" [class.active]="p === currentPage()" (click)="goPage(p)">
|
|
6165
|
+
{{ p }}
|
|
6166
|
+
</button>
|
|
4851
6167
|
}
|
|
4852
6168
|
</div>
|
|
4853
6169
|
|
|
4854
|
-
<button
|
|
4855
|
-
|
|
6170
|
+
<button
|
|
6171
|
+
class="page-btn ctrl"
|
|
6172
|
+
[disabled]="currentPage() === totalPages()"
|
|
6173
|
+
(click)="goPage(currentPage() + 1)"
|
|
6174
|
+
[title]="i18n.pagination.nextPage"
|
|
6175
|
+
>
|
|
6176
|
+
<svg
|
|
6177
|
+
viewBox="0 0 24 24"
|
|
6178
|
+
width="14"
|
|
6179
|
+
height="14"
|
|
6180
|
+
fill="none"
|
|
6181
|
+
stroke="currentColor"
|
|
6182
|
+
stroke-width="2.5"
|
|
6183
|
+
stroke-linecap="round"
|
|
6184
|
+
stroke-linejoin="round"
|
|
6185
|
+
>
|
|
4856
6186
|
<polyline points="9 18 15 12 9 6"></polyline>
|
|
4857
6187
|
</svg>
|
|
4858
6188
|
</button>
|
|
4859
|
-
<button
|
|
4860
|
-
|
|
6189
|
+
<button
|
|
6190
|
+
class="page-btn ctrl"
|
|
6191
|
+
[disabled]="currentPage() === totalPages()"
|
|
6192
|
+
(click)="goPage(totalPages())"
|
|
6193
|
+
[title]="i18n.pagination.lastPage"
|
|
6194
|
+
>
|
|
6195
|
+
<svg
|
|
6196
|
+
viewBox="0 0 24 24"
|
|
6197
|
+
width="14"
|
|
6198
|
+
height="14"
|
|
6199
|
+
fill="none"
|
|
6200
|
+
stroke="currentColor"
|
|
6201
|
+
stroke-width="2.5"
|
|
6202
|
+
stroke-linecap="round"
|
|
6203
|
+
stroke-linejoin="round"
|
|
6204
|
+
>
|
|
4861
6205
|
<polyline points="13 17 18 12 13 7"></polyline>
|
|
4862
6206
|
<polyline points="6 17 11 12 6 7"></polyline>
|
|
4863
6207
|
</svg>
|
|
@@ -4868,31 +6212,72 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4868
6212
|
|
|
4869
6213
|
<!-- Excel-Style Filter Popover Overlay -->
|
|
4870
6214
|
@if (activeFilterPopover(); as pop) {
|
|
4871
|
-
<div
|
|
6215
|
+
<div
|
|
6216
|
+
class="grid-filter-popover"
|
|
6217
|
+
role="dialog"
|
|
6218
|
+
[attr.aria-label]="i18n.grid.filterColumn + ': ' + getColumnTitle(pop.field)"
|
|
6219
|
+
[style.top.px]="pop.top"
|
|
6220
|
+
[style.left.px]="pop.left"
|
|
6221
|
+
(click)="$event.stopPropagation()"
|
|
6222
|
+
>
|
|
4872
6223
|
<div class="popover-section pinning-section">
|
|
4873
|
-
<label class="popover-label">
|
|
6224
|
+
<label class="popover-label">{{ i18n.grid.pinColumn }}</label>
|
|
4874
6225
|
<div class="pinning-actions">
|
|
4875
|
-
<button
|
|
4876
|
-
|
|
4877
|
-
|
|
6226
|
+
<button
|
|
6227
|
+
class="pin-btn"
|
|
6228
|
+
[class.active]="getColumnPinnedState(pop.field) === 'left'"
|
|
6229
|
+
[attr.aria-pressed]="getColumnPinnedState(pop.field) === 'left'"
|
|
6230
|
+
(click)="pinColumnPopover(pop.field, 'left')"
|
|
6231
|
+
type="button"
|
|
6232
|
+
>
|
|
6233
|
+
{{ i18n.grid.pinLeft }}
|
|
6234
|
+
</button>
|
|
6235
|
+
<button
|
|
6236
|
+
class="pin-btn"
|
|
6237
|
+
[class.active]="getColumnPinnedState(pop.field) === 'right'"
|
|
6238
|
+
[attr.aria-pressed]="getColumnPinnedState(pop.field) === 'right'"
|
|
6239
|
+
(click)="pinColumnPopover(pop.field, 'right')"
|
|
6240
|
+
type="button"
|
|
6241
|
+
>
|
|
6242
|
+
{{ i18n.grid.pinRight }}
|
|
6243
|
+
</button>
|
|
6244
|
+
<button
|
|
6245
|
+
class="pin-btn"
|
|
6246
|
+
[class.active]="getColumnPinnedState(pop.field) === null"
|
|
6247
|
+
[attr.aria-pressed]="getColumnPinnedState(pop.field) === null"
|
|
6248
|
+
(click)="pinColumnPopover(pop.field, null)"
|
|
6249
|
+
type="button"
|
|
6250
|
+
>
|
|
6251
|
+
{{ i18n.grid.noPin }}
|
|
6252
|
+
</button>
|
|
4878
6253
|
</div>
|
|
4879
6254
|
</div>
|
|
4880
6255
|
|
|
4881
6256
|
<div class="popover-section text-filter-section">
|
|
4882
|
-
<label class="popover-label">
|
|
6257
|
+
<label class="popover-label">{{ i18n.grid.textFilter }}</label>
|
|
4883
6258
|
<div class="text-filter-row">
|
|
4884
|
-
<select
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
6259
|
+
<select
|
|
6260
|
+
class="popover-select"
|
|
6261
|
+
[value]="tempFilterOperator()"
|
|
6262
|
+
(change)="tempFilterOperator.set($any($event.target).value)"
|
|
6263
|
+
>
|
|
6264
|
+
<option value="contains">{{ i18n.grid.contains }}</option>
|
|
6265
|
+
<option value="eq">{{ i18n.grid.equals }}</option>
|
|
6266
|
+
<option value="startsWith">{{ i18n.grid.startsWith }}</option>
|
|
6267
|
+
<option value="endsWith">{{ i18n.grid.endsWith }}</option>
|
|
4889
6268
|
</select>
|
|
4890
|
-
<input
|
|
6269
|
+
<input
|
|
6270
|
+
class="popover-input"
|
|
6271
|
+
type="text"
|
|
6272
|
+
[value]="tempFilterValue()"
|
|
6273
|
+
(input)="tempFilterValue.set($any($event.target).value)"
|
|
6274
|
+
[placeholder]="i18n.grid.filterPlaceholder"
|
|
6275
|
+
/>
|
|
4891
6276
|
</div>
|
|
4892
6277
|
</div>
|
|
4893
|
-
|
|
6278
|
+
|
|
4894
6279
|
<div class="popover-section checklist-section">
|
|
4895
|
-
<label class="popover-label">
|
|
6280
|
+
<label class="popover-label">{{ i18n.grid.checklistFilter }}</label>
|
|
4896
6281
|
<input
|
|
4897
6282
|
class="checklist-search"
|
|
4898
6283
|
type="text"
|
|
@@ -4902,25 +6287,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4902
6287
|
/>
|
|
4903
6288
|
<div class="checklist-actions">
|
|
4904
6289
|
<label class="checklist-item select-all">
|
|
4905
|
-
<input
|
|
6290
|
+
<input
|
|
6291
|
+
type="checkbox"
|
|
6292
|
+
[checked]="tempSelectedValues().size === getFilteredDistinctValues(pop.field).length"
|
|
6293
|
+
[indeterminate]="
|
|
6294
|
+
tempSelectedValues().size > 0 &&
|
|
6295
|
+
tempSelectedValues().size < getFilteredDistinctValues(pop.field).length
|
|
6296
|
+
"
|
|
6297
|
+
(change)="toggleSelectAllChecklist()"
|
|
6298
|
+
/>
|
|
4906
6299
|
<span>({{ i18n.grid.selectAll }})</span>
|
|
4907
6300
|
</label>
|
|
4908
6301
|
</div>
|
|
4909
6302
|
<div class="checklist-scroll">
|
|
4910
6303
|
@for (val of getFilteredDistinctValues(pop.field); track val) {
|
|
4911
6304
|
<label class="checklist-item">
|
|
4912
|
-
<input
|
|
6305
|
+
<input
|
|
6306
|
+
type="checkbox"
|
|
6307
|
+
[checked]="tempSelectedValues().has(val)"
|
|
6308
|
+
(change)="toggleChecklistItem(val)"
|
|
6309
|
+
/>
|
|
4913
6310
|
<span>{{ val }}</span>
|
|
4914
6311
|
</label>
|
|
4915
6312
|
}
|
|
4916
6313
|
</div>
|
|
4917
6314
|
</div>
|
|
4918
|
-
|
|
6315
|
+
|
|
4919
6316
|
<div class="popover-footer">
|
|
4920
6317
|
<button class="popover-btn clear" (click)="clearPopoverFilter()">{{ i18n.datePicker.clear }}</button>
|
|
4921
6318
|
<div class="footer-actions">
|
|
4922
|
-
<button class="popover-btn cancel" (click)="
|
|
4923
|
-
|
|
6319
|
+
<button class="popover-btn cancel" (click)="closeFilterPopover()">
|
|
6320
|
+
{{ i18n.common.cancel }}
|
|
6321
|
+
</button>
|
|
6322
|
+
<button class="popover-btn apply" (click)="applyPopoverFilter()">{{ i18n.grid.apply }}</button>
|
|
4924
6323
|
</div>
|
|
4925
6324
|
</div>
|
|
4926
6325
|
</div>
|
|
@@ -4928,27 +6327,104 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4928
6327
|
|
|
4929
6328
|
<!-- Column Chooser Popover Overlay -->
|
|
4930
6329
|
@if (activeColumnChooserPopover(); as pop) {
|
|
4931
|
-
<div
|
|
6330
|
+
<div
|
|
6331
|
+
[id]="instanceId + '-column-chooser'"
|
|
6332
|
+
class="grid-column-chooser-popover"
|
|
6333
|
+
role="region"
|
|
6334
|
+
[attr.aria-label]="i18n.grid.chooseColumns"
|
|
6335
|
+
[style.top.px]="pop.top"
|
|
6336
|
+
[style.left.px]="pop.left"
|
|
6337
|
+
(click)="$event.stopPropagation()"
|
|
6338
|
+
>
|
|
4932
6339
|
<div class="popover-section checklist-section" style="border-top: none; padding-top: 0;">
|
|
4933
|
-
<
|
|
6340
|
+
<span class="popover-label">{{ i18n.grid.visibleColumns }}</span>
|
|
4934
6341
|
<div class="checklist-scroll">
|
|
4935
6342
|
@for (col of columns(); track col.field) {
|
|
4936
|
-
<
|
|
4937
|
-
<
|
|
4938
|
-
|
|
4939
|
-
|
|
6343
|
+
<div class="column-config-item">
|
|
6344
|
+
<label class="checklist-item">
|
|
6345
|
+
<input
|
|
6346
|
+
#firstColumnToggle
|
|
6347
|
+
type="checkbox"
|
|
6348
|
+
[checked]="!hiddenColumns().has(col.field)"
|
|
6349
|
+
[disabled]="!hiddenColumns().has(col.field) && visibleColumnsCount() === 1"
|
|
6350
|
+
(change)="toggleColumnVisibility(col.field)"
|
|
6351
|
+
/>
|
|
6352
|
+
<span>{{ col.title }}</span>
|
|
6353
|
+
</label>
|
|
6354
|
+
<div class="column-config-actions">
|
|
6355
|
+
<button
|
|
6356
|
+
class="column-config-btn"
|
|
6357
|
+
type="button"
|
|
6358
|
+
[attr.aria-label]="i18n.grid.pinLeft + ': ' + col.title"
|
|
6359
|
+
[attr.aria-pressed]="getColumnPinnedState(col.field) === 'left'"
|
|
6360
|
+
[title]="i18n.grid.pinLeft"
|
|
6361
|
+
(click)="pinColumnPopover(col.field, 'left')"
|
|
6362
|
+
>
|
|
6363
|
+
⇤
|
|
6364
|
+
</button>
|
|
6365
|
+
<button
|
|
6366
|
+
class="column-config-btn"
|
|
6367
|
+
type="button"
|
|
6368
|
+
[attr.aria-label]="i18n.grid.pinRight + ': ' + col.title"
|
|
6369
|
+
[attr.aria-pressed]="getColumnPinnedState(col.field) === 'right'"
|
|
6370
|
+
[title]="i18n.grid.pinRight"
|
|
6371
|
+
(click)="pinColumnPopover(col.field, 'right')"
|
|
6372
|
+
>
|
|
6373
|
+
⇥
|
|
6374
|
+
</button>
|
|
6375
|
+
<button
|
|
6376
|
+
class="column-config-btn"
|
|
6377
|
+
type="button"
|
|
6378
|
+
[attr.aria-label]="i18n.grid.noPin + ': ' + col.title"
|
|
6379
|
+
[attr.aria-pressed]="getColumnPinnedState(col.field) === null"
|
|
6380
|
+
[title]="i18n.grid.noPin"
|
|
6381
|
+
(click)="pinColumnPopover(col.field, null)"
|
|
6382
|
+
>
|
|
6383
|
+
×
|
|
6384
|
+
</button>
|
|
6385
|
+
<button
|
|
6386
|
+
class="column-config-btn"
|
|
6387
|
+
type="button"
|
|
6388
|
+
[attr.aria-label]="i18n.grid.moveColumnLeft(col.title)"
|
|
6389
|
+
[title]="i18n.grid.moveColumnLeft(col.title)"
|
|
6390
|
+
[disabled]="columnIndex(col.field) === 0"
|
|
6391
|
+
(click)="moveColumn(col.field, -1)"
|
|
6392
|
+
>
|
|
6393
|
+
←
|
|
6394
|
+
</button>
|
|
6395
|
+
<button
|
|
6396
|
+
class="column-config-btn"
|
|
6397
|
+
type="button"
|
|
6398
|
+
[attr.aria-label]="i18n.grid.moveColumnRight(col.title)"
|
|
6399
|
+
[title]="i18n.grid.moveColumnRight(col.title)"
|
|
6400
|
+
[disabled]="columnIndex(col.field) === columns().length - 1"
|
|
6401
|
+
(click)="moveColumn(col.field, 1)"
|
|
6402
|
+
>
|
|
6403
|
+
→
|
|
6404
|
+
</button>
|
|
6405
|
+
</div>
|
|
6406
|
+
</div>
|
|
4940
6407
|
}
|
|
4941
6408
|
</div>
|
|
4942
6409
|
</div>
|
|
4943
6410
|
<div class="popover-footer">
|
|
4944
|
-
<button class="popover-btn apply" (click)="
|
|
6411
|
+
<button class="popover-btn apply" type="button" (click)="closeColumnChooser()">
|
|
6412
|
+
{{ i18n.grid.closeColumnChooser }}
|
|
6413
|
+
</button>
|
|
4945
6414
|
</div>
|
|
4946
6415
|
</div>
|
|
4947
6416
|
}
|
|
4948
6417
|
|
|
4949
6418
|
<!-- Custom Context Menu Overlay -->
|
|
4950
6419
|
@if (activeContextMenu(); as menu) {
|
|
4951
|
-
<div
|
|
6420
|
+
<div
|
|
6421
|
+
class="grid-context-menu"
|
|
6422
|
+
role="group"
|
|
6423
|
+
[attr.aria-label]="i18n.grid.contextMenu"
|
|
6424
|
+
[style.top.px]="menu.y"
|
|
6425
|
+
[style.left.px]="menu.x"
|
|
6426
|
+
(click)="$event.stopPropagation()"
|
|
6427
|
+
>
|
|
4952
6428
|
<button class="menu-item" [disabled]="!selectedCellStart()" (click)="contextMenuCopy()">
|
|
4953
6429
|
<span class="menu-icon">📋</span> Copy Selection
|
|
4954
6430
|
</button>
|
|
@@ -4998,16 +6474,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4998
6474
|
<span class="menu-icon">🧹</span> Clear All Filters
|
|
4999
6475
|
</button>
|
|
5000
6476
|
<div class="menu-divider"></div>
|
|
5001
|
-
<button class="menu-item" (click)="exportToJson();
|
|
6477
|
+
<button class="menu-item" (click)="exportToJson(); closeContextMenu()">
|
|
5002
6478
|
<span class="menu-icon">📄</span> Export to JSON
|
|
5003
6479
|
</button>
|
|
5004
|
-
<button class="menu-item" (click)="exportToCsv();
|
|
6480
|
+
<button class="menu-item" (click)="exportToCsv(); closeContextMenu()">
|
|
5005
6481
|
<span class="menu-icon">📊</span> Export to CSV
|
|
5006
6482
|
</button>
|
|
5007
|
-
<button class="menu-item" (click)="exportToExcel();
|
|
6483
|
+
<button class="menu-item" (click)="exportToExcel(); closeContextMenu()">
|
|
5008
6484
|
<span class="menu-icon">📈</span> Export to Excel
|
|
5009
6485
|
</button>
|
|
5010
|
-
<button class="menu-item" (click)="exportToPdf();
|
|
6486
|
+
<button class="menu-item" (click)="exportToPdf(); closeContextMenu()">
|
|
5011
6487
|
<span class="menu-icon">📕</span> Export to PDF
|
|
5012
6488
|
</button>
|
|
5013
6489
|
</div>
|
|
@@ -5019,14 +6495,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
5019
6495
|
<!-- Advanced Filter Builder Overlay -->
|
|
5020
6496
|
@if (isFilterBuilderOpen()) {
|
|
5021
6497
|
<ngx-grid-filter-builder
|
|
6498
|
+
[gridInstanceId]="instanceId"
|
|
5022
6499
|
[columns]="$any(columns())"
|
|
5023
6500
|
[expression]="internalFilterExpression()"
|
|
5024
6501
|
(expressionChange)="onFilterExpressionChange($event)"
|
|
5025
|
-
(close)="
|
|
6502
|
+
(close)="closeFilterBuilder()"
|
|
5026
6503
|
/>
|
|
5027
6504
|
}
|
|
5028
6505
|
</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"] }]
|
|
6506
|
+
`, 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
6507
|
}], ctorParameters: () => [], propDecorators: { cellTemplates: [{
|
|
5031
6508
|
type: ContentChildren,
|
|
5032
6509
|
args: [NgxGridCellTemplateDirective]
|
|
@@ -5044,7 +6521,61 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
5044
6521
|
args: ['keydown', ['$event']]
|
|
5045
6522
|
}] } });
|
|
5046
6523
|
|
|
6524
|
+
function isRecord(value) {
|
|
6525
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
6526
|
+
}
|
|
6527
|
+
function isGridPersistedState(value) {
|
|
6528
|
+
if (!isRecord(value))
|
|
6529
|
+
return false;
|
|
6530
|
+
const page = value['page'];
|
|
6531
|
+
const pageSize = value['pageSize'];
|
|
6532
|
+
const pinnedColumns = value['pinnedColumns'];
|
|
6533
|
+
return (Number.isInteger(page) &&
|
|
6534
|
+
Number(page) >= 1 &&
|
|
6535
|
+
Number.isInteger(pageSize) &&
|
|
6536
|
+
Number(pageSize) > 0 &&
|
|
6537
|
+
Array.isArray(value['columnOrder']) &&
|
|
6538
|
+
value['columnOrder'].every(column => typeof column === 'string') &&
|
|
6539
|
+
Array.isArray(value['sorts']) &&
|
|
6540
|
+
value['sorts'].every(sort => isRecord(sort) && typeof sort['field'] === 'string' && (sort['dir'] === 'asc' || sort['dir'] === 'desc')) &&
|
|
6541
|
+
Array.isArray(value['filters']) &&
|
|
6542
|
+
value['filters'].every(filter => isRecord(filter) && typeof filter['field'] === 'string') &&
|
|
6543
|
+
Array.isArray(value['groups']) &&
|
|
6544
|
+
value['groups'].every(group => isRecord(group) && typeof group['field'] === 'string') &&
|
|
6545
|
+
Array.isArray(value['hiddenColumns']) &&
|
|
6546
|
+
value['hiddenColumns'].every(column => typeof column === 'string') &&
|
|
6547
|
+
isRecord(value['columnWidths']) &&
|
|
6548
|
+
Object.values(value['columnWidths']).every(width => typeof width === 'number' && Number.isFinite(width) && width > 0) &&
|
|
6549
|
+
isRecord(pinnedColumns) &&
|
|
6550
|
+
Object.values(pinnedColumns).every(pin => pin === 'left' || pin === 'right' || pin === null));
|
|
6551
|
+
}
|
|
5047
6552
|
class GridStateService {
|
|
6553
|
+
exportSavedView(name, state) {
|
|
6554
|
+
const trimmedName = name.trim();
|
|
6555
|
+
if (!trimmedName) {
|
|
6556
|
+
throw new TypeError('A saved grid view must have a non-empty name.');
|
|
6557
|
+
}
|
|
6558
|
+
if (!isGridPersistedState(state)) {
|
|
6559
|
+
throw new TypeError('Cannot export an invalid grid state.');
|
|
6560
|
+
}
|
|
6561
|
+
const savedView = { version: 1, name: trimmedName, state };
|
|
6562
|
+
return JSON.stringify(savedView);
|
|
6563
|
+
}
|
|
6564
|
+
importSavedView(serialized) {
|
|
6565
|
+
const parsed = JSON.parse(serialized);
|
|
6566
|
+
if (!isRecord(parsed) ||
|
|
6567
|
+
parsed['version'] !== 1 ||
|
|
6568
|
+
typeof parsed['name'] !== 'string' ||
|
|
6569
|
+
!parsed['name'].trim() ||
|
|
6570
|
+
!isGridPersistedState(parsed['state'])) {
|
|
6571
|
+
throw new TypeError('Saved grid view is invalid or uses an unsupported version.');
|
|
6572
|
+
}
|
|
6573
|
+
return {
|
|
6574
|
+
version: 1,
|
|
6575
|
+
name: parsed['name'],
|
|
6576
|
+
state: parsed['state'],
|
|
6577
|
+
};
|
|
6578
|
+
}
|
|
5048
6579
|
/**
|
|
5049
6580
|
* Save grid state to localStorage
|
|
5050
6581
|
* @param key Storage key
|
|
@@ -6195,7 +7726,7 @@ class GridKeyboardService {
|
|
|
6195
7726
|
type: 'extend-selection',
|
|
6196
7727
|
row: this.focusedRow(),
|
|
6197
7728
|
col: this.focusedCol(),
|
|
6198
|
-
direction
|
|
7729
|
+
direction,
|
|
6199
7730
|
};
|
|
6200
7731
|
}
|
|
6201
7732
|
canEditCurrentCell() {
|
|
@@ -6719,11 +8250,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
6719
8250
|
/*
|
|
6720
8251
|
* Public API Surface — secondary entry point: ngx-core-components/grid
|
|
6721
8252
|
*/
|
|
6722
|
-
// ─── Core Component & Directives ──────────────────────────────────────────
|
|
6723
8253
|
|
|
6724
8254
|
/**
|
|
6725
8255
|
* Generated bundle index. Do not edit.
|
|
6726
8256
|
*/
|
|
6727
8257
|
|
|
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 };
|
|
8258
|
+
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
8259
|
//# sourceMappingURL=ngx-core-components-grid.mjs.map
|