ngx-core-components 0.3.20 → 0.3.21
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/charts/gantt-chart/gantt-chart.component.d.ts +1 -0
- package/dialog/dialog-container.component.d.ts +4 -0
- package/dialog/dialog.service.d.ts +1 -0
- package/fesm2022/ngx-core-components-charts.mjs +8 -6
- package/fesm2022/ngx-core-components-charts.mjs.map +1 -1
- package/fesm2022/ngx-core-components-dialog.mjs +78 -11
- package/fesm2022/ngx-core-components-dialog.mjs.map +1 -1
- package/fesm2022/ngx-core-components-feedback.mjs +8 -4
- package/fesm2022/ngx-core-components-feedback.mjs.map +1 -1
- package/fesm2022/ngx-core-components-grid.mjs +143 -115
- package/fesm2022/ngx-core-components-grid.mjs.map +1 -1
- package/fesm2022/ngx-core-components-i18n.mjs +149 -0
- package/fesm2022/ngx-core-components-i18n.mjs.map +1 -0
- package/fesm2022/ngx-core-components-inputs.mjs +145 -75
- package/fesm2022/ngx-core-components-inputs.mjs.map +1 -1
- package/fesm2022/ngx-core-components-layout.mjs +12 -8
- package/fesm2022/ngx-core-components-layout.mjs.map +1 -1
- package/fesm2022/ngx-core-components-views.mjs +86 -20
- package/fesm2022/ngx-core-components-views.mjs.map +1 -1
- package/fesm2022/ngx-core-components.mjs +1 -0
- package/fesm2022/ngx-core-components.mjs.map +1 -1
- package/grid/data-grid/data-grid.component.d.ts +4 -104
- package/grid/data-grid/grid-export.service.d.ts +26 -0
- package/grid/data-grid/models.d.ts +105 -0
- package/grid/public-api.d.ts +2 -1
- package/i18n/index.d.ts +5 -0
- package/i18n/ngx-core-i18n.d.ts +111 -0
- package/i18n/public-api.d.ts +2 -0
- package/inputs/autocomplete/autocomplete.component.d.ts +3 -1
- package/inputs/date-picker/date-picker.component.d.ts +4 -2
- package/inputs/dropdown/dropdown.component.d.ts +3 -1
- package/inputs/file-upload/file-upload.component.d.ts +1 -0
- package/inputs/multi-select/multi-select.component.d.ts +3 -1
- package/layout/accordion/accordion.component.d.ts +1 -0
- package/layout/drawer/drawer.component.d.ts +1 -0
- package/package.json +30 -12
- package/public-api.d.ts +2 -0
- package/schematics/collection.json +7 -1
- package/schematics/grid/index.js +68 -0
- package/schematics/grid/schema.json +19 -0
- package/schematics/ng-add/index.js +177 -9
- package/schematics/ng-add/schema.json +29 -0
- package/themes/theme.css +118 -26
- package/views/kanban/kanban.component.d.ts +1 -0
- package/views/list-view/list-view.component.d.ts +1 -0
- 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, ElementRef, DestroyRef, effect, untracked, computed, 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;
|
|
@@ -125,8 +237,10 @@ class DataGridComponent {
|
|
|
125
237
|
internalPageSize = signal(10);
|
|
126
238
|
internalGroupBy = signal(null);
|
|
127
239
|
// Enterprise Extensions
|
|
240
|
+
i18n = inject(NGX_CORE_I18N);
|
|
128
241
|
elementRef = inject(ElementRef);
|
|
129
242
|
destroyRef = inject(DestroyRef);
|
|
243
|
+
gridExportService = inject(GridExportService);
|
|
130
244
|
columnWidths = signal({});
|
|
131
245
|
filterStates = signal(new Map());
|
|
132
246
|
sortStates = signal([]);
|
|
@@ -885,99 +999,13 @@ class DataGridComponent {
|
|
|
885
999
|
return this.filterStates().get(field)?.value ?? '';
|
|
886
1000
|
}
|
|
887
1001
|
exportToJson() {
|
|
888
|
-
|
|
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();
|
|
1002
|
+
this.gridExportService.exportToJson(this.data());
|
|
895
1003
|
}
|
|
896
1004
|
exportToCsv() {
|
|
897
|
-
|
|
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();
|
|
1005
|
+
this.gridExportService.exportToCsv(this.data(), this.orderedColumns());
|
|
919
1006
|
}
|
|
920
1007
|
exportToExcel() {
|
|
921
|
-
|
|
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();
|
|
1008
|
+
this.gridExportService.exportToExcel(this.data(), this.orderedColumns());
|
|
981
1009
|
}
|
|
982
1010
|
setFilter(field, value) {
|
|
983
1011
|
const nextStates = new Map(this.filterStates());
|
|
@@ -2041,7 +2069,7 @@ class DataGridComponent {
|
|
|
2041
2069
|
</tr>
|
|
2042
2070
|
} @else if (flatRenderedRows().length === 0 && groupedRows().length === 0) {
|
|
2043
2071
|
<tr>
|
|
2044
|
-
<td [attr.colspan]="renderColumnCount()" class="grid-empty-cell">
|
|
2072
|
+
<td [attr.colspan]="renderColumnCount()" class="grid-empty-cell">{{ i18n.grid.noData }}</td>
|
|
2045
2073
|
</tr>
|
|
2046
2074
|
} @else if (groupedRows().length > 0) {
|
|
2047
2075
|
@for (group of groupedRows(); track group.key) {
|
|
@@ -2452,10 +2480,10 @@ class DataGridComponent {
|
|
|
2452
2480
|
<div class="grid-pagination">
|
|
2453
2481
|
<div class="pagination-left">
|
|
2454
2482
|
<span class="page-info">
|
|
2455
|
-
|
|
2483
|
+
{{ i18n.pagination.page }} <strong class="page-info-highlight">{{ pagerRangeStart() }}–{{ pagerRangeEnd() }}</strong> {{ i18n.pagination.of }} <strong class="page-info-highlight">{{ totalItems() }}</strong>
|
|
2456
2484
|
</span>
|
|
2457
2485
|
<div class="page-size-selector">
|
|
2458
|
-
<span class="page-size-label">
|
|
2486
|
+
<span class="page-size-label">{{ i18n.pagination.itemsPerPage }}:</span>
|
|
2459
2487
|
<select [value]="internalPageSize()" (change)="changePageSize(+$any($event.target).value)" class="page-size-select">
|
|
2460
2488
|
<option [value]="5">5</option>
|
|
2461
2489
|
<option [value]="8">8</option>
|
|
@@ -2467,13 +2495,13 @@ class DataGridComponent {
|
|
|
2467
2495
|
</div>
|
|
2468
2496
|
</div>
|
|
2469
2497
|
<div class="page-btns">
|
|
2470
|
-
<button class="page-btn ctrl" [disabled]="currentPage() === 1" (click)="goPage(1)" title="
|
|
2498
|
+
<button class="page-btn ctrl" [disabled]="currentPage() === 1" (click)="goPage(1)" [title]="i18n.pagination.firstPage">
|
|
2471
2499
|
<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
2500
|
<polyline points="11 17 6 12 11 7"></polyline>
|
|
2473
2501
|
<polyline points="18 17 13 12 18 7"></polyline>
|
|
2474
2502
|
</svg>
|
|
2475
2503
|
</button>
|
|
2476
|
-
<button class="page-btn ctrl" [disabled]="currentPage() === 1" (click)="goPage(currentPage() - 1)" title="
|
|
2504
|
+
<button class="page-btn ctrl" [disabled]="currentPage() === 1" (click)="goPage(currentPage() - 1)" [title]="i18n.pagination.previousPage">
|
|
2477
2505
|
<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
2506
|
<polyline points="15 18 9 12 15 6"></polyline>
|
|
2479
2507
|
</svg>
|
|
@@ -2485,12 +2513,12 @@ class DataGridComponent {
|
|
|
2485
2513
|
}
|
|
2486
2514
|
</div>
|
|
2487
2515
|
|
|
2488
|
-
<button class="page-btn ctrl" [disabled]="currentPage() === totalPages()" (click)="goPage(currentPage() + 1)" title="
|
|
2516
|
+
<button class="page-btn ctrl" [disabled]="currentPage() === totalPages()" (click)="goPage(currentPage() + 1)" [title]="i18n.pagination.nextPage">
|
|
2489
2517
|
<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
2518
|
<polyline points="9 18 15 12 9 6"></polyline>
|
|
2491
2519
|
</svg>
|
|
2492
2520
|
</button>
|
|
2493
|
-
<button class="page-btn ctrl" [disabled]="currentPage() === totalPages()" (click)="goPage(totalPages())" title="
|
|
2521
|
+
<button class="page-btn ctrl" [disabled]="currentPage() === totalPages()" (click)="goPage(totalPages())" [title]="i18n.pagination.lastPage">
|
|
2494
2522
|
<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
2523
|
<polyline points="13 17 18 12 13 7"></polyline>
|
|
2496
2524
|
<polyline points="6 17 11 12 6 7"></polyline>
|
|
@@ -2512,7 +2540,7 @@ class DataGridComponent {
|
|
|
2512
2540
|
<option value="startsWith">Starts With</option>
|
|
2513
2541
|
<option value="endsWith">Ends With</option>
|
|
2514
2542
|
</select>
|
|
2515
|
-
<input class="popover-input" type="text" [value]="tempFilterValue()" (input)="tempFilterValue.set($any($event.target).value)" placeholder="
|
|
2543
|
+
<input class="popover-input" type="text" [value]="tempFilterValue()" (input)="tempFilterValue.set($any($event.target).value)" [placeholder]="i18n.grid.filterPlaceholder" />
|
|
2516
2544
|
</div>
|
|
2517
2545
|
</div>
|
|
2518
2546
|
|
|
@@ -2523,12 +2551,12 @@ class DataGridComponent {
|
|
|
2523
2551
|
type="text"
|
|
2524
2552
|
[value]="filterSearchQuery()"
|
|
2525
2553
|
(input)="filterSearchQuery.set($any($event.target).value)"
|
|
2526
|
-
placeholder="
|
|
2554
|
+
[placeholder]="i18n.common.search"
|
|
2527
2555
|
/>
|
|
2528
2556
|
<div class="checklist-actions">
|
|
2529
2557
|
<label class="checklist-item select-all">
|
|
2530
2558
|
<input type="checkbox" [checked]="tempSelectedValues().size === getFilteredDistinctValues(pop.field).length" [indeterminate]="tempSelectedValues().size > 0 && tempSelectedValues().size < getFilteredDistinctValues(pop.field).length" (change)="toggleSelectAllChecklist()" />
|
|
2531
|
-
<span>(
|
|
2559
|
+
<span>({{ i18n.grid.selectAll }})</span>
|
|
2532
2560
|
</label>
|
|
2533
2561
|
</div>
|
|
2534
2562
|
<div class="checklist-scroll">
|
|
@@ -2542,9 +2570,9 @@ class DataGridComponent {
|
|
|
2542
2570
|
</div>
|
|
2543
2571
|
|
|
2544
2572
|
<div class="popover-footer">
|
|
2545
|
-
<button class="popover-btn clear" (click)="clearPopoverFilter()">
|
|
2573
|
+
<button class="popover-btn clear" (click)="clearPopoverFilter()">{{ i18n.datePicker.clear }}</button>
|
|
2546
2574
|
<div class="footer-actions">
|
|
2547
|
-
<button class="popover-btn cancel" (click)="activeFilterPopover.set(null)">
|
|
2575
|
+
<button class="popover-btn cancel" (click)="activeFilterPopover.set(null)">{{ i18n.common.cancel }}</button>
|
|
2548
2576
|
<button class="popover-btn apply" (click)="applyPopoverFilter()">Apply</button>
|
|
2549
2577
|
</div>
|
|
2550
2578
|
</div>
|
|
@@ -2831,7 +2859,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
2831
2859
|
</tr>
|
|
2832
2860
|
} @else if (flatRenderedRows().length === 0 && groupedRows().length === 0) {
|
|
2833
2861
|
<tr>
|
|
2834
|
-
<td [attr.colspan]="renderColumnCount()" class="grid-empty-cell">
|
|
2862
|
+
<td [attr.colspan]="renderColumnCount()" class="grid-empty-cell">{{ i18n.grid.noData }}</td>
|
|
2835
2863
|
</tr>
|
|
2836
2864
|
} @else if (groupedRows().length > 0) {
|
|
2837
2865
|
@for (group of groupedRows(); track group.key) {
|
|
@@ -3242,10 +3270,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
3242
3270
|
<div class="grid-pagination">
|
|
3243
3271
|
<div class="pagination-left">
|
|
3244
3272
|
<span class="page-info">
|
|
3245
|
-
|
|
3273
|
+
{{ i18n.pagination.page }} <strong class="page-info-highlight">{{ pagerRangeStart() }}–{{ pagerRangeEnd() }}</strong> {{ i18n.pagination.of }} <strong class="page-info-highlight">{{ totalItems() }}</strong>
|
|
3246
3274
|
</span>
|
|
3247
3275
|
<div class="page-size-selector">
|
|
3248
|
-
<span class="page-size-label">
|
|
3276
|
+
<span class="page-size-label">{{ i18n.pagination.itemsPerPage }}:</span>
|
|
3249
3277
|
<select [value]="internalPageSize()" (change)="changePageSize(+$any($event.target).value)" class="page-size-select">
|
|
3250
3278
|
<option [value]="5">5</option>
|
|
3251
3279
|
<option [value]="8">8</option>
|
|
@@ -3257,13 +3285,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
3257
3285
|
</div>
|
|
3258
3286
|
</div>
|
|
3259
3287
|
<div class="page-btns">
|
|
3260
|
-
<button class="page-btn ctrl" [disabled]="currentPage() === 1" (click)="goPage(1)" title="
|
|
3288
|
+
<button class="page-btn ctrl" [disabled]="currentPage() === 1" (click)="goPage(1)" [title]="i18n.pagination.firstPage">
|
|
3261
3289
|
<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
3290
|
<polyline points="11 17 6 12 11 7"></polyline>
|
|
3263
3291
|
<polyline points="18 17 13 12 18 7"></polyline>
|
|
3264
3292
|
</svg>
|
|
3265
3293
|
</button>
|
|
3266
|
-
<button class="page-btn ctrl" [disabled]="currentPage() === 1" (click)="goPage(currentPage() - 1)" title="
|
|
3294
|
+
<button class="page-btn ctrl" [disabled]="currentPage() === 1" (click)="goPage(currentPage() - 1)" [title]="i18n.pagination.previousPage">
|
|
3267
3295
|
<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
3296
|
<polyline points="15 18 9 12 15 6"></polyline>
|
|
3269
3297
|
</svg>
|
|
@@ -3275,12 +3303,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
3275
3303
|
}
|
|
3276
3304
|
</div>
|
|
3277
3305
|
|
|
3278
|
-
<button class="page-btn ctrl" [disabled]="currentPage() === totalPages()" (click)="goPage(currentPage() + 1)" title="
|
|
3306
|
+
<button class="page-btn ctrl" [disabled]="currentPage() === totalPages()" (click)="goPage(currentPage() + 1)" [title]="i18n.pagination.nextPage">
|
|
3279
3307
|
<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
3308
|
<polyline points="9 18 15 12 9 6"></polyline>
|
|
3281
3309
|
</svg>
|
|
3282
3310
|
</button>
|
|
3283
|
-
<button class="page-btn ctrl" [disabled]="currentPage() === totalPages()" (click)="goPage(totalPages())" title="
|
|
3311
|
+
<button class="page-btn ctrl" [disabled]="currentPage() === totalPages()" (click)="goPage(totalPages())" [title]="i18n.pagination.lastPage">
|
|
3284
3312
|
<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
3313
|
<polyline points="13 17 18 12 13 7"></polyline>
|
|
3286
3314
|
<polyline points="6 17 11 12 6 7"></polyline>
|
|
@@ -3302,7 +3330,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
3302
3330
|
<option value="startsWith">Starts With</option>
|
|
3303
3331
|
<option value="endsWith">Ends With</option>
|
|
3304
3332
|
</select>
|
|
3305
|
-
<input class="popover-input" type="text" [value]="tempFilterValue()" (input)="tempFilterValue.set($any($event.target).value)" placeholder="
|
|
3333
|
+
<input class="popover-input" type="text" [value]="tempFilterValue()" (input)="tempFilterValue.set($any($event.target).value)" [placeholder]="i18n.grid.filterPlaceholder" />
|
|
3306
3334
|
</div>
|
|
3307
3335
|
</div>
|
|
3308
3336
|
|
|
@@ -3313,12 +3341,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
3313
3341
|
type="text"
|
|
3314
3342
|
[value]="filterSearchQuery()"
|
|
3315
3343
|
(input)="filterSearchQuery.set($any($event.target).value)"
|
|
3316
|
-
placeholder="
|
|
3344
|
+
[placeholder]="i18n.common.search"
|
|
3317
3345
|
/>
|
|
3318
3346
|
<div class="checklist-actions">
|
|
3319
3347
|
<label class="checklist-item select-all">
|
|
3320
3348
|
<input type="checkbox" [checked]="tempSelectedValues().size === getFilteredDistinctValues(pop.field).length" [indeterminate]="tempSelectedValues().size > 0 && tempSelectedValues().size < getFilteredDistinctValues(pop.field).length" (change)="toggleSelectAllChecklist()" />
|
|
3321
|
-
<span>(
|
|
3349
|
+
<span>({{ i18n.grid.selectAll }})</span>
|
|
3322
3350
|
</label>
|
|
3323
3351
|
</div>
|
|
3324
3352
|
<div class="checklist-scroll">
|
|
@@ -3332,9 +3360,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
3332
3360
|
</div>
|
|
3333
3361
|
|
|
3334
3362
|
<div class="popover-footer">
|
|
3335
|
-
<button class="popover-btn clear" (click)="clearPopoverFilter()">
|
|
3363
|
+
<button class="popover-btn clear" (click)="clearPopoverFilter()">{{ i18n.datePicker.clear }}</button>
|
|
3336
3364
|
<div class="footer-actions">
|
|
3337
|
-
<button class="popover-btn cancel" (click)="activeFilterPopover.set(null)">
|
|
3365
|
+
<button class="popover-btn cancel" (click)="activeFilterPopover.set(null)">{{ i18n.common.cancel }}</button>
|
|
3338
3366
|
<button class="popover-btn apply" (click)="applyPopoverFilter()">Apply</button>
|
|
3339
3367
|
</div>
|
|
3340
3368
|
</div>
|
|
@@ -3567,5 +3595,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
3567
3595
|
* Generated bundle index. Do not edit.
|
|
3568
3596
|
*/
|
|
3569
3597
|
|
|
3570
|
-
export { DataGridComponent, NgxGridCellTemplateDirective, NgxGridEditCellTemplateDirective, NgxGridFooterTemplateDirective, NgxGridHeaderTemplateDirective, PivotGridComponent };
|
|
3598
|
+
export { DataGridComponent, GridExportService, NgxGridCellTemplateDirective, NgxGridEditCellTemplateDirective, NgxGridFooterTemplateDirective, NgxGridHeaderTemplateDirective, PivotGridComponent };
|
|
3571
3599
|
//# sourceMappingURL=ngx-core-components-grid.mjs.map
|