ngx-core-components 0.3.20 → 0.3.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/ai/ai-chat/ai-chat.component.d.ts +2 -1
  2. package/ai/ngx-web-llm.service.d.ts +22 -0
  3. package/ai/public-api.d.ts +2 -0
  4. package/charts/gantt-chart/gantt-chart.component.d.ts +5 -1
  5. package/charts/line-chart/line-chart.component.d.ts +19 -1
  6. package/dialog/dialog-container.component.d.ts +4 -0
  7. package/dialog/dialog.service.d.ts +1 -0
  8. package/fesm2022/ngx-core-components-ai.mjs +173 -9
  9. package/fesm2022/ngx-core-components-ai.mjs.map +1 -1
  10. package/fesm2022/ngx-core-components-charts.mjs +127 -18
  11. package/fesm2022/ngx-core-components-charts.mjs.map +1 -1
  12. package/fesm2022/ngx-core-components-dialog.mjs +78 -11
  13. package/fesm2022/ngx-core-components-dialog.mjs.map +1 -1
  14. package/fesm2022/ngx-core-components-feedback.mjs +8 -4
  15. package/fesm2022/ngx-core-components-feedback.mjs.map +1 -1
  16. package/fesm2022/ngx-core-components-grid.mjs +261 -152
  17. package/fesm2022/ngx-core-components-grid.mjs.map +1 -1
  18. package/fesm2022/ngx-core-components-i18n.mjs +149 -0
  19. package/fesm2022/ngx-core-components-i18n.mjs.map +1 -0
  20. package/fesm2022/ngx-core-components-inputs.mjs +859 -78
  21. package/fesm2022/ngx-core-components-inputs.mjs.map +1 -1
  22. package/fesm2022/ngx-core-components-layout.mjs +12 -8
  23. package/fesm2022/ngx-core-components-layout.mjs.map +1 -1
  24. package/fesm2022/ngx-core-components-navigation.mjs +19 -13
  25. package/fesm2022/ngx-core-components-navigation.mjs.map +1 -1
  26. package/fesm2022/ngx-core-components-views.mjs +86 -20
  27. package/fesm2022/ngx-core-components-views.mjs.map +1 -1
  28. package/fesm2022/ngx-core-components.mjs +3 -2
  29. package/fesm2022/ngx-core-components.mjs.map +1 -1
  30. package/grid/data-grid/data-grid.component.d.ts +44 -105
  31. package/grid/data-grid/grid-export.service.d.ts +26 -0
  32. package/grid/data-grid/models.d.ts +105 -0
  33. package/grid/public-api.d.ts +2 -1
  34. package/i18n/index.d.ts +5 -0
  35. package/i18n/ngx-core-i18n.d.ts +111 -0
  36. package/i18n/public-api.d.ts +2 -0
  37. package/inputs/autocomplete/autocomplete.component.d.ts +3 -1
  38. package/inputs/date-picker/date-picker.component.d.ts +4 -2
  39. package/inputs/dropdown/dropdown.component.d.ts +3 -1
  40. package/inputs/file-upload/file-upload.component.d.ts +1 -0
  41. package/inputs/form-builder/form-builder.component.d.ts +20 -0
  42. package/inputs/form-builder/form-designer.component.d.ts +42 -0
  43. package/inputs/multi-select/multi-select.component.d.ts +3 -1
  44. package/inputs/public-api.d.ts +1 -0
  45. package/layout/accordion/accordion.component.d.ts +1 -0
  46. package/layout/drawer/drawer.component.d.ts +1 -0
  47. package/package.json +31 -13
  48. package/public-api.d.ts +5 -1
  49. package/schematics/collection.json +7 -1
  50. package/schematics/grid/index.js +68 -0
  51. package/schematics/grid/schema.json +19 -0
  52. package/schematics/ng-add/index.js +177 -9
  53. package/schematics/ng-add/schema.json +29 -0
  54. package/themes/theme.css +140 -26
  55. package/views/kanban/kanban.component.d.ts +1 -0
  56. package/views/list-view/list-view.component.d.ts +1 -0
  57. package/views/scheduler/scheduler.component.d.ts +2 -0
@@ -1,6 +1,118 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, TemplateRef, Input, Directive, input, output, signal, ElementRef, DestroyRef, effect, untracked, computed, HostListener, ContentChildren, ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { Injectable, inject, TemplateRef, Input, Directive, input, output, signal, computed, ElementRef, DestroyRef, effect, untracked, HostListener, ContentChildren, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { NgTemplateOutlet, CommonModule } from '@angular/common';
4
+ import { NGX_CORE_I18N } from 'ngx-core-components/i18n';
5
+
6
+ /**
7
+ * Standalone injectable service for exporting grid data to JSON, CSV, and Excel formats.
8
+ * Extracted from DataGridComponent to enable reuse and reduce component size.
9
+ */
10
+ class GridExportService {
11
+ /**
12
+ * Export data as a JSON file download.
13
+ */
14
+ exportToJson(data, filename = 'grid-data.json') {
15
+ const dataStr = 'data:text/json;charset=utf-8,' + encodeURIComponent(JSON.stringify(data, null, 2));
16
+ this.triggerDownload(dataStr, filename);
17
+ }
18
+ /**
19
+ * Export data as a CSV file download.
20
+ */
21
+ exportToCsv(data, columns, filename = 'grid-data.csv') {
22
+ if (data.length === 0)
23
+ return;
24
+ const headers = columns.map(c => c.title);
25
+ const fields = columns.map(c => c.field);
26
+ const rows = data.map(row => {
27
+ const r = row;
28
+ return fields.map(field => {
29
+ const val = r[field] ?? '';
30
+ const valStr = typeof val === 'object' ? JSON.stringify(val) : String(val);
31
+ return `"${valStr.replace(/"/g, '""')}"`;
32
+ });
33
+ });
34
+ const csvContent = [headers.join(','), ...rows.map(e => e.join(','))].join('\n');
35
+ const blob = new Blob([csvContent], { type: 'text/csv;charset=utf-8;' });
36
+ const url = URL.createObjectURL(blob);
37
+ this.triggerDownload(url, filename);
38
+ }
39
+ /**
40
+ * Export data as an Excel (.xls) file download using an HTML table template.
41
+ */
42
+ exportToExcel(data, columns, filename = 'grid-data.xls') {
43
+ if (data.length === 0)
44
+ return;
45
+ let tableHtml = '<table><thead><tr>';
46
+ columns.forEach(c => {
47
+ tableHtml += `<th>${c.title}</th>`;
48
+ });
49
+ tableHtml += '</tr></thead><tbody>';
50
+ data.forEach(row => {
51
+ const r = row;
52
+ tableHtml += '<tr>';
53
+ columns.forEach(c => {
54
+ const val = r[c.field] ?? '';
55
+ const valStr = typeof val === 'object' ? JSON.stringify(val) : String(val);
56
+ const alignClass = c.align ? ` class="text-${c.align}"` : '';
57
+ tableHtml += `<td${alignClass}>${valStr}</td>`;
58
+ });
59
+ tableHtml += '</tr>';
60
+ });
61
+ tableHtml += '</tbody></table>';
62
+ const worksheetName = 'Grid Export';
63
+ const template = `
64
+ <html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40">
65
+ <head>
66
+ <!--[if gte mso 9]>
67
+ <xml>
68
+ <x:ExcelWorkbook>
69
+ <x:ExcelWorksheets>
70
+ <x:ExcelWorksheet>
71
+ <x:Name>${worksheetName}</x:Name>
72
+ <x:WorksheetOptions>
73
+ <x:DisplayGridlines/>
74
+ </x:WorksheetOptions>
75
+ </x:ExcelWorksheet>
76
+ </x:ExcelWorksheets>
77
+ </x:ExcelWorkbook>
78
+ </xml>
79
+ <![endif]-->
80
+ <style>
81
+ table { border-collapse: collapse; font-family: sans-serif; font-size: 11pt; }
82
+ th { background-color: #f1f5f9; color: #1e293b; font-weight: bold; border: 1px solid #cbd5e1; padding: 6px; }
83
+ td { border: 1px solid #cbd5e1; padding: 6px; }
84
+ .text-right { text-align: right; }
85
+ .text-center { text-align: center; }
86
+ .text-left { text-align: left; }
87
+ </style>
88
+ </head>
89
+ <body>
90
+ ${tableHtml}
91
+ </body>
92
+ </html>
93
+ `;
94
+ const blob = new Blob([template], { type: 'application/vnd.ms-excel;charset=utf-8;' });
95
+ const url = URL.createObjectURL(blob);
96
+ this.triggerDownload(url, filename);
97
+ }
98
+ /**
99
+ * Create a temporary anchor element, trigger a download, and clean up.
100
+ */
101
+ triggerDownload(href, filename) {
102
+ const downloadAnchor = document.createElement('a');
103
+ downloadAnchor.setAttribute('href', href);
104
+ downloadAnchor.setAttribute('download', filename);
105
+ document.body.appendChild(downloadAnchor);
106
+ downloadAnchor.click();
107
+ downloadAnchor.remove();
108
+ }
109
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: GridExportService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
110
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: GridExportService, providedIn: 'root' });
111
+ }
112
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: GridExportService, decorators: [{
113
+ type: Injectable,
114
+ args: [{ providedIn: 'root' }]
115
+ }] });
4
116
 
5
117
  class NgxGridCellTemplateDirective {
6
118
  columnField;
@@ -71,7 +183,13 @@ class DataGridComponent {
71
183
  editCellTemplates;
72
184
  headerTemplates;
73
185
  footerTemplates;
186
+ /**
187
+ * The tabular dataset to render in the grid.
188
+ */
74
189
  data = input([]);
190
+ /**
191
+ * The column definition metadata specifying header labels, fields, sorting/filtering settings, and templates.
192
+ */
75
193
  columns = input([]);
76
194
  stateKey = input('');
77
195
  reorderable = input(false);
@@ -81,12 +199,28 @@ class DataGridComponent {
81
199
  showGlobalSearch = input(false);
82
200
  globalSearchPlaceholder = input('Search...');
83
201
  rowReorder = output();
202
+ /**
203
+ * Number of rows to render per page in paginated mode.
204
+ * @default 10
205
+ */
84
206
  pageSize = input(10);
207
+ /**
208
+ * The current active 1-indexed page number.
209
+ * @default 1
210
+ */
85
211
  page = input(1);
86
212
  total = input(0);
213
+ /**
214
+ * Whether row selection is enabled.
215
+ * @default false
216
+ */
87
217
  selectable = input(false);
88
218
  striped = input(true);
89
219
  loading = input(false);
220
+ /**
221
+ * Whether inline cell/row editing is enabled.
222
+ * @default false
223
+ */
90
224
  editable = input(false);
91
225
  sortMode = input('client');
92
226
  filterMode = input('client');
@@ -115,6 +249,17 @@ class DataGridComponent {
115
249
  enableContextMenu = input(false);
116
250
  keyboardNavigation = input(false);
117
251
  groupAggregations = input(false);
252
+ /**
253
+ * Whether to render only the visible rows using high-performance row virtualization.
254
+ * Useful when rendering large datasets (1,000+ items).
255
+ * @default false
256
+ */
257
+ virtualScroll = input(false);
258
+ /**
259
+ * The height of each row in pixels. Required for virtual scrolling viewport calculations.
260
+ * @default 49
261
+ */
262
+ rowHeight = input(49);
118
263
  sortState = signal(null);
119
264
  currentPage = signal(1);
120
265
  selectedRows = signal(new Set());
@@ -124,9 +269,30 @@ class DataGridComponent {
124
269
  editingDraft = signal({});
125
270
  internalPageSize = signal(10);
126
271
  internalGroupBy = signal(null);
272
+ scrollTop = signal(0);
273
+ viewportHeight = signal(400);
274
+ startIndex = computed(() => {
275
+ if (!this.virtualScroll())
276
+ return 0;
277
+ return Math.max(0, Math.floor(this.scrollTop() / this.rowHeight()) - 3);
278
+ });
279
+ endIndex = computed(() => {
280
+ const totalCount = this.flatRenderedRows().length;
281
+ if (!this.virtualScroll())
282
+ return totalCount;
283
+ return Math.min(totalCount, Math.ceil((this.scrollTop() + this.viewportHeight()) / this.rowHeight()) + 3);
284
+ });
285
+ visibleRows = computed(() => {
286
+ const rendered = this.flatRenderedRows();
287
+ if (!this.virtualScroll())
288
+ return rendered;
289
+ return rendered.slice(this.startIndex(), this.endIndex());
290
+ });
127
291
  // Enterprise Extensions
292
+ i18n = inject(NGX_CORE_I18N);
128
293
  elementRef = inject(ElementRef);
129
294
  destroyRef = inject(DestroyRef);
295
+ gridExportService = inject(GridExportService);
130
296
  columnWidths = signal({});
131
297
  filterStates = signal(new Map());
132
298
  sortStates = signal([]);
@@ -885,99 +1051,13 @@ class DataGridComponent {
885
1051
  return this.filterStates().get(field)?.value ?? '';
886
1052
  }
887
1053
  exportToJson() {
888
- const dataStr = "data:text/json;charset=utf-8," + encodeURIComponent(JSON.stringify(this.data(), null, 2));
889
- const downloadAnchor = document.createElement('a');
890
- downloadAnchor.setAttribute("href", dataStr);
891
- downloadAnchor.setAttribute("download", "grid-data.json");
892
- document.body.appendChild(downloadAnchor);
893
- downloadAnchor.click();
894
- downloadAnchor.remove();
1054
+ this.gridExportService.exportToJson(this.data());
895
1055
  }
896
1056
  exportToCsv() {
897
- if (this.data().length === 0)
898
- return;
899
- const cols = this.orderedColumns();
900
- const headers = cols.map(c => c.title);
901
- const fields = cols.map(c => c.field);
902
- const rows = this.data().map(row => {
903
- const r = row;
904
- return fields.map(field => {
905
- const val = r[field] ?? '';
906
- const valStr = typeof val === 'object' ? JSON.stringify(val) : String(val);
907
- return `"${valStr.replace(/"/g, '""')}"`;
908
- });
909
- });
910
- const csvContent = [headers.join(','), ...rows.map(e => e.join(','))].join('\n');
911
- const blob = new Blob([csvContent], { type: 'text/csv;charset=utf-8;' });
912
- const url = URL.createObjectURL(blob);
913
- const downloadAnchor = document.createElement('a');
914
- downloadAnchor.setAttribute("href", url);
915
- downloadAnchor.setAttribute("download", "grid-data.csv");
916
- document.body.appendChild(downloadAnchor);
917
- downloadAnchor.click();
918
- downloadAnchor.remove();
1057
+ this.gridExportService.exportToCsv(this.data(), this.orderedColumns());
919
1058
  }
920
1059
  exportToExcel() {
921
- if (this.data().length === 0)
922
- return;
923
- const cols = this.orderedColumns();
924
- let tableHtml = '<table><thead><tr>';
925
- cols.forEach(c => {
926
- tableHtml += `<th>${c.title}</th>`;
927
- });
928
- tableHtml += '</tr></thead><tbody>';
929
- this.data().forEach(row => {
930
- const r = row;
931
- tableHtml += '<tr>';
932
- cols.forEach(c => {
933
- const val = r[c.field] ?? '';
934
- const valStr = typeof val === 'object' ? JSON.stringify(val) : String(val);
935
- const alignClass = c.align ? ` class="text-${c.align}"` : '';
936
- tableHtml += `<td${alignClass}>${valStr}</td>`;
937
- });
938
- tableHtml += '</tr>';
939
- });
940
- tableHtml += '</tbody></table>';
941
- const worksheetName = 'Grid Export';
942
- const template = `
943
- <html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40">
944
- <head>
945
- <!--[if gte mso 9]>
946
- <xml>
947
- <x:ExcelWorkbook>
948
- <x:ExcelWorksheets>
949
- <x:ExcelWorksheet>
950
- <x:Name>${worksheetName}</x:Name>
951
- <x:WorksheetOptions>
952
- <x:DisplayGridlines/>
953
- </x:WorksheetOptions>
954
- </x:ExcelWorksheet>
955
- </x:ExcelWorksheets>
956
- </x:ExcelWorkbook>
957
- </xml>
958
- <![endif]-->
959
- <style>
960
- table { border-collapse: collapse; font-family: sans-serif; font-size: 11pt; }
961
- th { background-color: #f1f5f9; color: #1e293b; font-weight: bold; border: 1px solid #cbd5e1; padding: 6px; }
962
- td { border: 1px solid #cbd5e1; padding: 6px; }
963
- .text-right { text-align: right; }
964
- .text-center { text-align: center; }
965
- .text-left { text-align: left; }
966
- </style>
967
- </head>
968
- <body>
969
- ${tableHtml}
970
- </body>
971
- </html>
972
- `;
973
- const blob = new Blob([template], { type: 'application/vnd.ms-excel;charset=utf-8;' });
974
- const url = URL.createObjectURL(blob);
975
- const downloadAnchor = document.createElement('a');
976
- downloadAnchor.setAttribute("href", url);
977
- downloadAnchor.setAttribute("download", "grid-data.xls");
978
- document.body.appendChild(downloadAnchor);
979
- downloadAnchor.click();
980
- downloadAnchor.remove();
1060
+ this.gridExportService.exportToExcel(this.data(), this.orderedColumns());
981
1061
  }
982
1062
  setFilter(field, value) {
983
1063
  const nextStates = new Map(this.filterStates());
@@ -1317,6 +1397,13 @@ class DataGridComponent {
1317
1397
  this.draggingRowIndex.set(null);
1318
1398
  this.dragOverRowIndex.set(null);
1319
1399
  }
1400
+ onViewportScroll(event) {
1401
+ const target = event.target;
1402
+ if (target && this.virtualScroll()) {
1403
+ this.scrollTop.set(target.scrollTop);
1404
+ this.viewportHeight.set(target.clientHeight || 400);
1405
+ }
1406
+ }
1320
1407
  onRowDragEnd() {
1321
1408
  this.draggingRowIndex.set(null);
1322
1409
  this.dragOverRowIndex.set(null);
@@ -1851,7 +1938,7 @@ class DataGridComponent {
1851
1938
  }
1852
1939
  }
1853
1940
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: DataGridComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1854
- 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 }, 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 } }, outputs: { columnReorder: "columnReorder", rowReorder: "rowReorder", rowClick: "rowClick", selectionChange: "selectionChange", sortChange: "sortChange", filterChange: "filterChange", groupChange: "groupChange", pageChange: "pageChange", dataStateChange: "dataStateChange", rowUpdate: "rowUpdate", cellSelectionChange: "cellSelectionChange" }, host: { listeners: { "keydown": "handleKeyDown($event)" } }, queries: [{ propertyName: "cellTemplates", predicate: NgxGridCellTemplateDirective }, { propertyName: "editCellTemplates", predicate: NgxGridEditCellTemplateDirective }, { propertyName: "headerTemplates", predicate: NgxGridHeaderTemplateDirective }, { propertyName: "footerTemplates", predicate: NgxGridFooterTemplateDirective }], ngImport: i0, template: `
1941
+ 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 }, 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 }, 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", rowClick: "rowClick", selectionChange: "selectionChange", sortChange: "sortChange", filterChange: "filterChange", groupChange: "groupChange", pageChange: "pageChange", dataStateChange: "dataStateChange", rowUpdate: "rowUpdate", cellSelectionChange: "cellSelectionChange" }, host: { listeners: { "keydown": "handleKeyDown($event)" } }, queries: [{ propertyName: "cellTemplates", predicate: NgxGridCellTemplateDirective }, { propertyName: "editCellTemplates", predicate: NgxGridEditCellTemplateDirective }, { propertyName: "headerTemplates", predicate: NgxGridHeaderTemplateDirective }, { propertyName: "footerTemplates", predicate: NgxGridFooterTemplateDirective }], ngImport: i0, template: `
1855
1942
  <div class="ngx-data-grid" [class.loading]="loading()">
1856
1943
 
1857
1944
  <div class="grid-toolbar">
@@ -1880,7 +1967,7 @@ class DataGridComponent {
1880
1967
  </div>
1881
1968
  </div>
1882
1969
 
1883
- <div class="grid-table-wrap">
1970
+ <div class="grid-table-wrap" #viewportEl (scroll)="onViewportScroll($event)">
1884
1971
  <table class="grid-table" [class.striped]="striped()">
1885
1972
  <colgroup>
1886
1973
  @if (rowReorderable()) {
@@ -2041,7 +2128,7 @@ class DataGridComponent {
2041
2128
  </tr>
2042
2129
  } @else if (flatRenderedRows().length === 0 && groupedRows().length === 0) {
2043
2130
  <tr>
2044
- <td [attr.colspan]="renderColumnCount()" class="grid-empty-cell">No data found.</td>
2131
+ <td [attr.colspan]="renderColumnCount()" class="grid-empty-cell">{{ i18n.grid.noData }}</td>
2045
2132
  </tr>
2046
2133
  } @else if (groupedRows().length > 0) {
2047
2134
  @for (group of groupedRows(); track group.key) {
@@ -2249,22 +2336,28 @@ class DataGridComponent {
2249
2336
  }
2250
2337
  }
2251
2338
  } @else {
2252
- @for (row of flatRenderedRows(); track getKey(row, $index); let i = $index) {
2339
+ @if (virtualScroll()) {
2340
+ <tr [style.height.px]="startIndex() * rowHeight()">
2341
+ <td [attr.colspan]="renderColumnCount()" style="padding:0; border:none; height: inherit;"></td>
2342
+ </tr>
2343
+ }
2344
+ @for (row of (virtualScroll() ? visibleRows() : flatRenderedRows()); track getKey(row, $index); let i = $index) {
2345
+ @let actualIndex = virtualScroll() ? startIndex() + i : i;
2253
2346
  <tr
2254
2347
  class="grid-row"
2255
2348
  [class.selected]="isRowSelected(row)"
2256
- [class.dragging-row]="draggingRowIndex() === i"
2257
- [class.drag-over-row]="dragOverRowIndex() === i"
2258
- [style.transform]="getRowTranslation(i)"
2259
- (dragover)="onRowDragOver($event, i)"
2260
- (drop)="onRowDrop($event, i)"
2349
+ [class.dragging-row]="draggingRowIndex() === actualIndex"
2350
+ [class.drag-over-row]="dragOverRowIndex() === actualIndex"
2351
+ [style.transform]="getRowTranslation(actualIndex)"
2352
+ (dragover)="onRowDragOver($event, actualIndex)"
2353
+ (drop)="onRowDrop($event, actualIndex)"
2261
2354
  (dragend)="onRowDragEnd()"
2262
- (click)="onRowClick(row, i)"
2263
- (dblclick)="editable() ? beginEdit(row, i) : null"
2355
+ (click)="onRowClick(row, actualIndex)"
2356
+ (dblclick)="editable() ? beginEdit(row, actualIndex) : null"
2264
2357
  >
2265
2358
  @if (rowReorderable()) {
2266
2359
  <td class="grid-td grid-td-reorder pinned-left" [class.pinned-left-last]="isRowReorderableLastPinned()" style="left:0px; text-align:center; width:44px">
2267
- <span class="row-drag-handle" draggable="true" (dragstart)="onRowDragStart($event, i)" (dragend)="onRowDragEnd()" title="Drag row to reorder">
2360
+ <span class="row-drag-handle" draggable="true" (dragstart)="onRowDragStart($event, actualIndex)" (dragend)="onRowDragEnd()" title="Drag row to reorder">
2268
2361
  <svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" style="display: block;">
2269
2362
  <circle cx="9" cy="5" r="1.5"></circle>
2270
2363
  <circle cx="9" cy="12" r="1.5"></circle>
@@ -2296,17 +2389,17 @@ class DataGridComponent {
2296
2389
  <ng-container *ngTemplateOutlet="rowTemplate(); context: {
2297
2390
  $implicit: row,
2298
2391
  row: row,
2299
- index: i,
2392
+ index: actualIndex,
2300
2393
  editing: isEditing(row),
2301
2394
  expanded: isExpanded(row)
2302
2395
  }" />
2303
2396
  </td>
2304
2397
  } @else {
2305
2398
  @for (col of orderedColumns(); track col.field) {
2306
- @if (getCellRowSpan(row, col.field, i) > 0) {
2399
+ @if (getCellRowSpan(row, col.field, actualIndex) > 0) {
2307
2400
  <td
2308
2401
  class="grid-td"
2309
- [attr.rowspan]="getCellRowSpan(row, col.field, i)"
2402
+ [attr.rowspan]="getCellRowSpan(row, col.field, actualIndex)"
2310
2403
  [class.pinned-left]="col.pinned === 'left'"
2311
2404
  [class.pinned-left-last]="col.pinned === 'left' && lastPinnedColumnField() === col.field"
2312
2405
  [class.pinned-right]="col.pinned === 'right'"
@@ -2330,7 +2423,7 @@ class DataGridComponent {
2330
2423
  value: getCellValue(row, col.field),
2331
2424
  row: row,
2332
2425
  column: col,
2333
- index: i,
2426
+ index: actualIndex,
2334
2427
  editing: true,
2335
2428
  draftValue: getDraftValue(row, col.field),
2336
2429
  updateDraft: getUpdateDraftCallback(col.field)
@@ -2349,7 +2442,7 @@ class DataGridComponent {
2349
2442
  value: getCellValue(row, col.field),
2350
2443
  row: row,
2351
2444
  column: col,
2352
- index: i,
2445
+ index: actualIndex,
2353
2446
  editing: isEditing(row)
2354
2447
  }" />
2355
2448
  } @else {
@@ -2372,9 +2465,9 @@ class DataGridComponent {
2372
2465
  style="width:120px"
2373
2466
  >
2374
2467
  @if (!isEditing(row)) {
2375
- <button class="action-btn" type="button" (click)="beginEdit(row, i); $event.stopPropagation()">Edit</button>
2468
+ <button class="action-btn" type="button" (click)="beginEdit(row, actualIndex); $event.stopPropagation()">Edit</button>
2376
2469
  } @else {
2377
- <button class="action-btn save" type="button" (click)="saveEdit(row, i); $event.stopPropagation()">Save</button>
2470
+ <button class="action-btn save" type="button" (click)="saveEdit(row, actualIndex); $event.stopPropagation()">Save</button>
2378
2471
  <button class="action-btn" type="button" (click)="cancelEdit(); $event.stopPropagation()">Cancel</button>
2379
2472
  }
2380
2473
  </td>
@@ -2389,13 +2482,18 @@ class DataGridComponent {
2389
2482
  <ng-container *ngTemplateOutlet="detailRowTemplate(); context: {
2390
2483
  $implicit: row,
2391
2484
  row: row,
2392
- index: i
2485
+ index: actualIndex
2393
2486
  }" />
2394
2487
  </div>
2395
2488
  </td>
2396
2489
  </tr>
2397
2490
  }
2398
2491
  }
2492
+ @if (virtualScroll()) {
2493
+ <tr [style.height.px]="(flatRenderedRows().length - endIndex()) * rowHeight()">
2494
+ <td [attr.colspan]="renderColumnCount()" style="padding:0; border:none; height: inherit;"></td>
2495
+ </tr>
2496
+ }
2399
2497
  }
2400
2498
  </tbody>
2401
2499
  @if (hasAggregation()) {
@@ -2452,10 +2550,10 @@ class DataGridComponent {
2452
2550
  <div class="grid-pagination">
2453
2551
  <div class="pagination-left">
2454
2552
  <span class="page-info">
2455
- Showing <strong class="page-info-highlight">{{ pagerRangeStart() }}–{{ pagerRangeEnd() }}</strong> of <strong class="page-info-highlight">{{ totalItems() }}</strong> items
2553
+ {{ i18n.pagination.page }} <strong class="page-info-highlight">{{ pagerRangeStart() }}–{{ pagerRangeEnd() }}</strong> {{ i18n.pagination.of }} <strong class="page-info-highlight">{{ totalItems() }}</strong>
2456
2554
  </span>
2457
2555
  <div class="page-size-selector">
2458
- <span class="page-size-label">Items per page:</span>
2556
+ <span class="page-size-label">{{ i18n.pagination.itemsPerPage }}:</span>
2459
2557
  <select [value]="internalPageSize()" (change)="changePageSize(+$any($event.target).value)" class="page-size-select">
2460
2558
  <option [value]="5">5</option>
2461
2559
  <option [value]="8">8</option>
@@ -2467,13 +2565,13 @@ class DataGridComponent {
2467
2565
  </div>
2468
2566
  </div>
2469
2567
  <div class="page-btns">
2470
- <button class="page-btn ctrl" [disabled]="currentPage() === 1" (click)="goPage(1)" title="First Page">
2568
+ <button class="page-btn ctrl" [disabled]="currentPage() === 1" (click)="goPage(1)" [title]="i18n.pagination.firstPage">
2471
2569
  <svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
2472
2570
  <polyline points="11 17 6 12 11 7"></polyline>
2473
2571
  <polyline points="18 17 13 12 18 7"></polyline>
2474
2572
  </svg>
2475
2573
  </button>
2476
- <button class="page-btn ctrl" [disabled]="currentPage() === 1" (click)="goPage(currentPage() - 1)" title="Previous Page">
2574
+ <button class="page-btn ctrl" [disabled]="currentPage() === 1" (click)="goPage(currentPage() - 1)" [title]="i18n.pagination.previousPage">
2477
2575
  <svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
2478
2576
  <polyline points="15 18 9 12 15 6"></polyline>
2479
2577
  </svg>
@@ -2485,12 +2583,12 @@ class DataGridComponent {
2485
2583
  }
2486
2584
  </div>
2487
2585
 
2488
- <button class="page-btn ctrl" [disabled]="currentPage() === totalPages()" (click)="goPage(currentPage() + 1)" title="Next Page">
2586
+ <button class="page-btn ctrl" [disabled]="currentPage() === totalPages()" (click)="goPage(currentPage() + 1)" [title]="i18n.pagination.nextPage">
2489
2587
  <svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
2490
2588
  <polyline points="9 18 15 12 9 6"></polyline>
2491
2589
  </svg>
2492
2590
  </button>
2493
- <button class="page-btn ctrl" [disabled]="currentPage() === totalPages()" (click)="goPage(totalPages())" title="Last Page">
2591
+ <button class="page-btn ctrl" [disabled]="currentPage() === totalPages()" (click)="goPage(totalPages())" [title]="i18n.pagination.lastPage">
2494
2592
  <svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
2495
2593
  <polyline points="13 17 18 12 13 7"></polyline>
2496
2594
  <polyline points="6 17 11 12 6 7"></polyline>
@@ -2512,7 +2610,7 @@ class DataGridComponent {
2512
2610
  <option value="startsWith">Starts With</option>
2513
2611
  <option value="endsWith">Ends With</option>
2514
2612
  </select>
2515
- <input class="popover-input" type="text" [value]="tempFilterValue()" (input)="tempFilterValue.set($any($event.target).value)" placeholder="Filter value..." />
2613
+ <input class="popover-input" type="text" [value]="tempFilterValue()" (input)="tempFilterValue.set($any($event.target).value)" [placeholder]="i18n.grid.filterPlaceholder" />
2516
2614
  </div>
2517
2615
  </div>
2518
2616
 
@@ -2523,12 +2621,12 @@ class DataGridComponent {
2523
2621
  type="text"
2524
2622
  [value]="filterSearchQuery()"
2525
2623
  (input)="filterSearchQuery.set($any($event.target).value)"
2526
- placeholder="Search items..."
2624
+ [placeholder]="i18n.common.search"
2527
2625
  />
2528
2626
  <div class="checklist-actions">
2529
2627
  <label class="checklist-item select-all">
2530
2628
  <input type="checkbox" [checked]="tempSelectedValues().size === getFilteredDistinctValues(pop.field).length" [indeterminate]="tempSelectedValues().size > 0 && tempSelectedValues().size < getFilteredDistinctValues(pop.field).length" (change)="toggleSelectAllChecklist()" />
2531
- <span>(Select All)</span>
2629
+ <span>({{ i18n.grid.selectAll }})</span>
2532
2630
  </label>
2533
2631
  </div>
2534
2632
  <div class="checklist-scroll">
@@ -2542,9 +2640,9 @@ class DataGridComponent {
2542
2640
  </div>
2543
2641
 
2544
2642
  <div class="popover-footer">
2545
- <button class="popover-btn clear" (click)="clearPopoverFilter()">Clear</button>
2643
+ <button class="popover-btn clear" (click)="clearPopoverFilter()">{{ i18n.datePicker.clear }}</button>
2546
2644
  <div class="footer-actions">
2547
- <button class="popover-btn cancel" (click)="activeFilterPopover.set(null)">Cancel</button>
2645
+ <button class="popover-btn cancel" (click)="activeFilterPopover.set(null)">{{ i18n.common.cancel }}</button>
2548
2646
  <button class="popover-btn apply" (click)="applyPopoverFilter()">Apply</button>
2549
2647
  </div>
2550
2648
  </div>
@@ -2670,7 +2768,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
2670
2768
  </div>
2671
2769
  </div>
2672
2770
 
2673
- <div class="grid-table-wrap">
2771
+ <div class="grid-table-wrap" #viewportEl (scroll)="onViewportScroll($event)">
2674
2772
  <table class="grid-table" [class.striped]="striped()">
2675
2773
  <colgroup>
2676
2774
  @if (rowReorderable()) {
@@ -2831,7 +2929,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
2831
2929
  </tr>
2832
2930
  } @else if (flatRenderedRows().length === 0 && groupedRows().length === 0) {
2833
2931
  <tr>
2834
- <td [attr.colspan]="renderColumnCount()" class="grid-empty-cell">No data found.</td>
2932
+ <td [attr.colspan]="renderColumnCount()" class="grid-empty-cell">{{ i18n.grid.noData }}</td>
2835
2933
  </tr>
2836
2934
  } @else if (groupedRows().length > 0) {
2837
2935
  @for (group of groupedRows(); track group.key) {
@@ -3039,22 +3137,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
3039
3137
  }
3040
3138
  }
3041
3139
  } @else {
3042
- @for (row of flatRenderedRows(); track getKey(row, $index); let i = $index) {
3140
+ @if (virtualScroll()) {
3141
+ <tr [style.height.px]="startIndex() * rowHeight()">
3142
+ <td [attr.colspan]="renderColumnCount()" style="padding:0; border:none; height: inherit;"></td>
3143
+ </tr>
3144
+ }
3145
+ @for (row of (virtualScroll() ? visibleRows() : flatRenderedRows()); track getKey(row, $index); let i = $index) {
3146
+ @let actualIndex = virtualScroll() ? startIndex() + i : i;
3043
3147
  <tr
3044
3148
  class="grid-row"
3045
3149
  [class.selected]="isRowSelected(row)"
3046
- [class.dragging-row]="draggingRowIndex() === i"
3047
- [class.drag-over-row]="dragOverRowIndex() === i"
3048
- [style.transform]="getRowTranslation(i)"
3049
- (dragover)="onRowDragOver($event, i)"
3050
- (drop)="onRowDrop($event, i)"
3150
+ [class.dragging-row]="draggingRowIndex() === actualIndex"
3151
+ [class.drag-over-row]="dragOverRowIndex() === actualIndex"
3152
+ [style.transform]="getRowTranslation(actualIndex)"
3153
+ (dragover)="onRowDragOver($event, actualIndex)"
3154
+ (drop)="onRowDrop($event, actualIndex)"
3051
3155
  (dragend)="onRowDragEnd()"
3052
- (click)="onRowClick(row, i)"
3053
- (dblclick)="editable() ? beginEdit(row, i) : null"
3156
+ (click)="onRowClick(row, actualIndex)"
3157
+ (dblclick)="editable() ? beginEdit(row, actualIndex) : null"
3054
3158
  >
3055
3159
  @if (rowReorderable()) {
3056
3160
  <td class="grid-td grid-td-reorder pinned-left" [class.pinned-left-last]="isRowReorderableLastPinned()" style="left:0px; text-align:center; width:44px">
3057
- <span class="row-drag-handle" draggable="true" (dragstart)="onRowDragStart($event, i)" (dragend)="onRowDragEnd()" title="Drag row to reorder">
3161
+ <span class="row-drag-handle" draggable="true" (dragstart)="onRowDragStart($event, actualIndex)" (dragend)="onRowDragEnd()" title="Drag row to reorder">
3058
3162
  <svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" style="display: block;">
3059
3163
  <circle cx="9" cy="5" r="1.5"></circle>
3060
3164
  <circle cx="9" cy="12" r="1.5"></circle>
@@ -3086,17 +3190,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
3086
3190
  <ng-container *ngTemplateOutlet="rowTemplate(); context: {
3087
3191
  $implicit: row,
3088
3192
  row: row,
3089
- index: i,
3193
+ index: actualIndex,
3090
3194
  editing: isEditing(row),
3091
3195
  expanded: isExpanded(row)
3092
3196
  }" />
3093
3197
  </td>
3094
3198
  } @else {
3095
3199
  @for (col of orderedColumns(); track col.field) {
3096
- @if (getCellRowSpan(row, col.field, i) > 0) {
3200
+ @if (getCellRowSpan(row, col.field, actualIndex) > 0) {
3097
3201
  <td
3098
3202
  class="grid-td"
3099
- [attr.rowspan]="getCellRowSpan(row, col.field, i)"
3203
+ [attr.rowspan]="getCellRowSpan(row, col.field, actualIndex)"
3100
3204
  [class.pinned-left]="col.pinned === 'left'"
3101
3205
  [class.pinned-left-last]="col.pinned === 'left' && lastPinnedColumnField() === col.field"
3102
3206
  [class.pinned-right]="col.pinned === 'right'"
@@ -3120,7 +3224,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
3120
3224
  value: getCellValue(row, col.field),
3121
3225
  row: row,
3122
3226
  column: col,
3123
- index: i,
3227
+ index: actualIndex,
3124
3228
  editing: true,
3125
3229
  draftValue: getDraftValue(row, col.field),
3126
3230
  updateDraft: getUpdateDraftCallback(col.field)
@@ -3139,7 +3243,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
3139
3243
  value: getCellValue(row, col.field),
3140
3244
  row: row,
3141
3245
  column: col,
3142
- index: i,
3246
+ index: actualIndex,
3143
3247
  editing: isEditing(row)
3144
3248
  }" />
3145
3249
  } @else {
@@ -3162,9 +3266,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
3162
3266
  style="width:120px"
3163
3267
  >
3164
3268
  @if (!isEditing(row)) {
3165
- <button class="action-btn" type="button" (click)="beginEdit(row, i); $event.stopPropagation()">Edit</button>
3269
+ <button class="action-btn" type="button" (click)="beginEdit(row, actualIndex); $event.stopPropagation()">Edit</button>
3166
3270
  } @else {
3167
- <button class="action-btn save" type="button" (click)="saveEdit(row, i); $event.stopPropagation()">Save</button>
3271
+ <button class="action-btn save" type="button" (click)="saveEdit(row, actualIndex); $event.stopPropagation()">Save</button>
3168
3272
  <button class="action-btn" type="button" (click)="cancelEdit(); $event.stopPropagation()">Cancel</button>
3169
3273
  }
3170
3274
  </td>
@@ -3179,13 +3283,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
3179
3283
  <ng-container *ngTemplateOutlet="detailRowTemplate(); context: {
3180
3284
  $implicit: row,
3181
3285
  row: row,
3182
- index: i
3286
+ index: actualIndex
3183
3287
  }" />
3184
3288
  </div>
3185
3289
  </td>
3186
3290
  </tr>
3187
3291
  }
3188
3292
  }
3293
+ @if (virtualScroll()) {
3294
+ <tr [style.height.px]="(flatRenderedRows().length - endIndex()) * rowHeight()">
3295
+ <td [attr.colspan]="renderColumnCount()" style="padding:0; border:none; height: inherit;"></td>
3296
+ </tr>
3297
+ }
3189
3298
  }
3190
3299
  </tbody>
3191
3300
  @if (hasAggregation()) {
@@ -3242,10 +3351,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
3242
3351
  <div class="grid-pagination">
3243
3352
  <div class="pagination-left">
3244
3353
  <span class="page-info">
3245
- Showing <strong class="page-info-highlight">{{ pagerRangeStart() }}–{{ pagerRangeEnd() }}</strong> of <strong class="page-info-highlight">{{ totalItems() }}</strong> items
3354
+ {{ i18n.pagination.page }} <strong class="page-info-highlight">{{ pagerRangeStart() }}–{{ pagerRangeEnd() }}</strong> {{ i18n.pagination.of }} <strong class="page-info-highlight">{{ totalItems() }}</strong>
3246
3355
  </span>
3247
3356
  <div class="page-size-selector">
3248
- <span class="page-size-label">Items per page:</span>
3357
+ <span class="page-size-label">{{ i18n.pagination.itemsPerPage }}:</span>
3249
3358
  <select [value]="internalPageSize()" (change)="changePageSize(+$any($event.target).value)" class="page-size-select">
3250
3359
  <option [value]="5">5</option>
3251
3360
  <option [value]="8">8</option>
@@ -3257,13 +3366,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
3257
3366
  </div>
3258
3367
  </div>
3259
3368
  <div class="page-btns">
3260
- <button class="page-btn ctrl" [disabled]="currentPage() === 1" (click)="goPage(1)" title="First Page">
3369
+ <button class="page-btn ctrl" [disabled]="currentPage() === 1" (click)="goPage(1)" [title]="i18n.pagination.firstPage">
3261
3370
  <svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
3262
3371
  <polyline points="11 17 6 12 11 7"></polyline>
3263
3372
  <polyline points="18 17 13 12 18 7"></polyline>
3264
3373
  </svg>
3265
3374
  </button>
3266
- <button class="page-btn ctrl" [disabled]="currentPage() === 1" (click)="goPage(currentPage() - 1)" title="Previous Page">
3375
+ <button class="page-btn ctrl" [disabled]="currentPage() === 1" (click)="goPage(currentPage() - 1)" [title]="i18n.pagination.previousPage">
3267
3376
  <svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
3268
3377
  <polyline points="15 18 9 12 15 6"></polyline>
3269
3378
  </svg>
@@ -3275,12 +3384,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
3275
3384
  }
3276
3385
  </div>
3277
3386
 
3278
- <button class="page-btn ctrl" [disabled]="currentPage() === totalPages()" (click)="goPage(currentPage() + 1)" title="Next Page">
3387
+ <button class="page-btn ctrl" [disabled]="currentPage() === totalPages()" (click)="goPage(currentPage() + 1)" [title]="i18n.pagination.nextPage">
3279
3388
  <svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
3280
3389
  <polyline points="9 18 15 12 9 6"></polyline>
3281
3390
  </svg>
3282
3391
  </button>
3283
- <button class="page-btn ctrl" [disabled]="currentPage() === totalPages()" (click)="goPage(totalPages())" title="Last Page">
3392
+ <button class="page-btn ctrl" [disabled]="currentPage() === totalPages()" (click)="goPage(totalPages())" [title]="i18n.pagination.lastPage">
3284
3393
  <svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
3285
3394
  <polyline points="13 17 18 12 13 7"></polyline>
3286
3395
  <polyline points="6 17 11 12 6 7"></polyline>
@@ -3302,7 +3411,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
3302
3411
  <option value="startsWith">Starts With</option>
3303
3412
  <option value="endsWith">Ends With</option>
3304
3413
  </select>
3305
- <input class="popover-input" type="text" [value]="tempFilterValue()" (input)="tempFilterValue.set($any($event.target).value)" placeholder="Filter value..." />
3414
+ <input class="popover-input" type="text" [value]="tempFilterValue()" (input)="tempFilterValue.set($any($event.target).value)" [placeholder]="i18n.grid.filterPlaceholder" />
3306
3415
  </div>
3307
3416
  </div>
3308
3417
 
@@ -3313,12 +3422,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
3313
3422
  type="text"
3314
3423
  [value]="filterSearchQuery()"
3315
3424
  (input)="filterSearchQuery.set($any($event.target).value)"
3316
- placeholder="Search items..."
3425
+ [placeholder]="i18n.common.search"
3317
3426
  />
3318
3427
  <div class="checklist-actions">
3319
3428
  <label class="checklist-item select-all">
3320
3429
  <input type="checkbox" [checked]="tempSelectedValues().size === getFilteredDistinctValues(pop.field).length" [indeterminate]="tempSelectedValues().size > 0 && tempSelectedValues().size < getFilteredDistinctValues(pop.field).length" (change)="toggleSelectAllChecklist()" />
3321
- <span>(Select All)</span>
3430
+ <span>({{ i18n.grid.selectAll }})</span>
3322
3431
  </label>
3323
3432
  </div>
3324
3433
  <div class="checklist-scroll">
@@ -3332,9 +3441,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
3332
3441
  </div>
3333
3442
 
3334
3443
  <div class="popover-footer">
3335
- <button class="popover-btn clear" (click)="clearPopoverFilter()">Clear</button>
3444
+ <button class="popover-btn clear" (click)="clearPopoverFilter()">{{ i18n.datePicker.clear }}</button>
3336
3445
  <div class="footer-actions">
3337
- <button class="popover-btn cancel" (click)="activeFilterPopover.set(null)">Cancel</button>
3446
+ <button class="popover-btn cancel" (click)="activeFilterPopover.set(null)">{{ i18n.common.cancel }}</button>
3338
3447
  <button class="popover-btn apply" (click)="applyPopoverFilter()">Apply</button>
3339
3448
  </div>
3340
3449
  </div>
@@ -3567,5 +3676,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
3567
3676
  * Generated bundle index. Do not edit.
3568
3677
  */
3569
3678
 
3570
- export { DataGridComponent, NgxGridCellTemplateDirective, NgxGridEditCellTemplateDirective, NgxGridFooterTemplateDirective, NgxGridHeaderTemplateDirective, PivotGridComponent };
3679
+ export { DataGridComponent, GridExportService, NgxGridCellTemplateDirective, NgxGridEditCellTemplateDirective, NgxGridFooterTemplateDirective, NgxGridHeaderTemplateDirective, PivotGridComponent };
3571
3680
  //# sourceMappingURL=ngx-core-components-grid.mjs.map