cax-design-system 2.6.0 → 2.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/navigation/navigation.mjs +18 -5
- package/esm2022/table/components/column-filter/column-filter.mjs +52 -11
- package/esm2022/table/components/sort-icon/sort-icon.mjs +10 -7
- package/esm2022/table/table.mjs +123 -98
- package/fesm2022/cax-design-system-navigation.mjs +17 -4
- package/fesm2022/cax-design-system-navigation.mjs.map +1 -1
- package/fesm2022/cax-design-system-table.mjs +181 -113
- package/fesm2022/cax-design-system-table.mjs.map +1 -1
- package/navigation/navigation.d.ts +3 -1
- package/package.json +118 -118
- package/resources/cax.min.scss +1 -1
- package/resources/cax.scss +223 -218
- package/resources/components/table/table.scss +12 -4
- package/table/components/column-filter/column-filter.d.ts +6 -1
- package/table/components/sort-icon/sort-icon.d.ts +2 -1
- package/table/table.d.ts +6 -4
|
@@ -36,6 +36,8 @@ import { PlusIcon } from 'cax-design-system/icons/plus';
|
|
|
36
36
|
import { RadioButtonModule } from 'cax-design-system/radiobutton';
|
|
37
37
|
import * as i7$1 from 'cax-design-system/divider';
|
|
38
38
|
import { DividerModule } from 'cax-design-system/divider';
|
|
39
|
+
import * as i3$2 from 'cax-design-system/badge';
|
|
40
|
+
import { BadgeModule } from 'cax-design-system/badge';
|
|
39
41
|
import { CheckIcon } from 'cax-design-system/icons/check';
|
|
40
42
|
|
|
41
43
|
class TableService {
|
|
@@ -348,7 +350,9 @@ class Table {
|
|
|
348
350
|
* Defines whether sorting works on single column or on multiple columns.
|
|
349
351
|
* @group Props
|
|
350
352
|
*/
|
|
351
|
-
|
|
353
|
+
filterType = 'default';
|
|
354
|
+
sortType = 'default';
|
|
355
|
+
sortMode = 'single';
|
|
352
356
|
/**
|
|
353
357
|
* When true, resets paginator to first page after sorting. Available only when sortMode is set to single.
|
|
354
358
|
* @group Props
|
|
@@ -1235,10 +1239,27 @@ class Table {
|
|
|
1235
1239
|
this.resetScrollTop();
|
|
1236
1240
|
}
|
|
1237
1241
|
}
|
|
1242
|
+
nextSortOrder = (current) => {
|
|
1243
|
+
switch (current) {
|
|
1244
|
+
case 0:
|
|
1245
|
+
return 1;
|
|
1246
|
+
case 1:
|
|
1247
|
+
return -1;
|
|
1248
|
+
case -1:
|
|
1249
|
+
return 0;
|
|
1250
|
+
default:
|
|
1251
|
+
return 1; // fallback to default if somehow invalid
|
|
1252
|
+
}
|
|
1253
|
+
};
|
|
1238
1254
|
sort(event) {
|
|
1239
1255
|
let originalEvent = event.originalEvent;
|
|
1240
1256
|
if (this.sortMode === 'single') {
|
|
1241
|
-
|
|
1257
|
+
if (this.sortType === 'custom') {
|
|
1258
|
+
this._sortOrder = this.sortField === event.field ? this.nextSortOrder(this._sortOrder) : this.defaultSortOrder;
|
|
1259
|
+
}
|
|
1260
|
+
else {
|
|
1261
|
+
this._sortOrder = this.sortField === event.field ? this.sortOrder * -1 : this.defaultSortOrder;
|
|
1262
|
+
}
|
|
1242
1263
|
this._sortField = event.field;
|
|
1243
1264
|
if (this.resetPageOnSort) {
|
|
1244
1265
|
this._first = 0;
|
|
@@ -1249,29 +1270,17 @@ class Table {
|
|
|
1249
1270
|
}
|
|
1250
1271
|
this.sortSingle();
|
|
1251
1272
|
}
|
|
1252
|
-
else if (this.sortMode === 'custom') {
|
|
1253
|
-
const nextSortOrder = (current) => {
|
|
1254
|
-
switch (current) {
|
|
1255
|
-
case 0:
|
|
1256
|
-
return 1;
|
|
1257
|
-
case 1:
|
|
1258
|
-
return -1;
|
|
1259
|
-
case -1:
|
|
1260
|
-
return 0;
|
|
1261
|
-
default:
|
|
1262
|
-
return 1; // fallback to default if somehow invalid
|
|
1263
|
-
}
|
|
1264
|
-
};
|
|
1265
|
-
this._sortOrder = this.sortField === event.field ? nextSortOrder(this._sortOrder) : this.defaultSortOrder;
|
|
1266
|
-
this._sortField = event.field;
|
|
1267
|
-
this.sortCustom();
|
|
1268
|
-
}
|
|
1269
1273
|
if (this.sortMode === 'multiple') {
|
|
1270
1274
|
let metaKey = originalEvent.metaKey || originalEvent.ctrlKey;
|
|
1271
1275
|
let sortMeta = this.getSortMeta(event.field);
|
|
1272
1276
|
if (sortMeta) {
|
|
1273
1277
|
if (!metaKey) {
|
|
1274
|
-
this.
|
|
1278
|
+
if (this.sortType === 'custom') {
|
|
1279
|
+
this._multiSortMeta = [{ field: event.field, order: this.nextSortOrder(sortMeta.order) }];
|
|
1280
|
+
}
|
|
1281
|
+
else {
|
|
1282
|
+
this._multiSortMeta = [{ field: event.field, order: sortMeta.order * -1 }];
|
|
1283
|
+
}
|
|
1275
1284
|
if (this.resetPageOnSort) {
|
|
1276
1285
|
this._first = 0;
|
|
1277
1286
|
this.firstChange.emit(this._first);
|
|
@@ -1281,7 +1290,12 @@ class Table {
|
|
|
1281
1290
|
}
|
|
1282
1291
|
}
|
|
1283
1292
|
else {
|
|
1284
|
-
|
|
1293
|
+
if (this.sortType === 'custom') {
|
|
1294
|
+
sortMeta.order = this.nextSortOrder(sortMeta.order);
|
|
1295
|
+
}
|
|
1296
|
+
else {
|
|
1297
|
+
sortMeta.order = sortMeta.order * -1;
|
|
1298
|
+
}
|
|
1285
1299
|
}
|
|
1286
1300
|
}
|
|
1287
1301
|
else {
|
|
@@ -1294,6 +1308,7 @@ class Table {
|
|
|
1294
1308
|
}
|
|
1295
1309
|
this._multiSortMeta.push({ field: event.field, order: this.defaultSortOrder });
|
|
1296
1310
|
}
|
|
1311
|
+
this._multiSortMeta = this._multiSortMeta.filter((item) => item.order !== 0);
|
|
1297
1312
|
this.sortMultiple();
|
|
1298
1313
|
}
|
|
1299
1314
|
if (this.isStateful()) {
|
|
@@ -1309,45 +1324,7 @@ class Table {
|
|
|
1309
1324
|
this.sortMultiple();
|
|
1310
1325
|
return;
|
|
1311
1326
|
}
|
|
1312
|
-
if (
|
|
1313
|
-
if (this.restoringSort) {
|
|
1314
|
-
this.restoringSort = false;
|
|
1315
|
-
}
|
|
1316
|
-
if (this.lazy) {
|
|
1317
|
-
this.onLazyLoad.emit(this.createLazyLoadMetadata());
|
|
1318
|
-
}
|
|
1319
|
-
else if (this.value) {
|
|
1320
|
-
if (this.customSort) {
|
|
1321
|
-
this.sortFunction.emit({
|
|
1322
|
-
data: this.value,
|
|
1323
|
-
mode: this.sortMode,
|
|
1324
|
-
field: field,
|
|
1325
|
-
order: order
|
|
1326
|
-
});
|
|
1327
|
-
}
|
|
1328
|
-
else {
|
|
1329
|
-
this.value.sort((data1, data2) => {
|
|
1330
|
-
let value1 = ObjectUtils.resolveFieldData(data1, field);
|
|
1331
|
-
let value2 = ObjectUtils.resolveFieldData(data2, field);
|
|
1332
|
-
let result = null;
|
|
1333
|
-
if (value1 == null && value2 != null)
|
|
1334
|
-
result = -1;
|
|
1335
|
-
else if (value1 != null && value2 == null)
|
|
1336
|
-
result = 1;
|
|
1337
|
-
else if (value1 == null && value2 == null)
|
|
1338
|
-
result = 0;
|
|
1339
|
-
else if (typeof value1 === 'string' && typeof value2 === 'string')
|
|
1340
|
-
result = value1.localeCompare(value2);
|
|
1341
|
-
else
|
|
1342
|
-
result = value1 < value2 ? -1 : value1 > value2 ? 1 : 0;
|
|
1343
|
-
return order * result;
|
|
1344
|
-
});
|
|
1345
|
-
this._value = [...this.value];
|
|
1346
|
-
}
|
|
1347
|
-
if (this.hasFilter()) {
|
|
1348
|
-
this._filter();
|
|
1349
|
-
}
|
|
1350
|
-
}
|
|
1327
|
+
if (this.sortType === 'custom') {
|
|
1351
1328
|
let sortMeta = {
|
|
1352
1329
|
field: field,
|
|
1353
1330
|
order: order
|
|
@@ -1355,16 +1332,54 @@ class Table {
|
|
|
1355
1332
|
this.onSort.emit(sortMeta);
|
|
1356
1333
|
this.tableService.onSort(sortMeta);
|
|
1357
1334
|
}
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1335
|
+
else {
|
|
1336
|
+
if (field && order) {
|
|
1337
|
+
if (this.restoringSort) {
|
|
1338
|
+
this.restoringSort = false;
|
|
1339
|
+
}
|
|
1340
|
+
if (this.lazy) {
|
|
1341
|
+
this.onLazyLoad.emit(this.createLazyLoadMetadata());
|
|
1342
|
+
}
|
|
1343
|
+
else if (this.value) {
|
|
1344
|
+
if (this.customSort) {
|
|
1345
|
+
this.sortFunction.emit({
|
|
1346
|
+
data: this.value,
|
|
1347
|
+
mode: this.sortMode,
|
|
1348
|
+
field: field,
|
|
1349
|
+
order: order
|
|
1350
|
+
});
|
|
1351
|
+
}
|
|
1352
|
+
else {
|
|
1353
|
+
this.value.sort((data1, data2) => {
|
|
1354
|
+
let value1 = ObjectUtils.resolveFieldData(data1, field);
|
|
1355
|
+
let value2 = ObjectUtils.resolveFieldData(data2, field);
|
|
1356
|
+
let result = null;
|
|
1357
|
+
if (value1 == null && value2 != null)
|
|
1358
|
+
result = -1;
|
|
1359
|
+
else if (value1 != null && value2 == null)
|
|
1360
|
+
result = 1;
|
|
1361
|
+
else if (value1 == null && value2 == null)
|
|
1362
|
+
result = 0;
|
|
1363
|
+
else if (typeof value1 === 'string' && typeof value2 === 'string')
|
|
1364
|
+
result = value1.localeCompare(value2);
|
|
1365
|
+
else
|
|
1366
|
+
result = value1 < value2 ? -1 : value1 > value2 ? 1 : 0;
|
|
1367
|
+
return order * result;
|
|
1368
|
+
});
|
|
1369
|
+
this._value = [...this.value];
|
|
1370
|
+
}
|
|
1371
|
+
if (this.hasFilter()) {
|
|
1372
|
+
this._filter();
|
|
1373
|
+
}
|
|
1374
|
+
}
|
|
1375
|
+
let sortMeta = {
|
|
1376
|
+
field: field,
|
|
1377
|
+
order: order
|
|
1378
|
+
};
|
|
1379
|
+
this.onSort.emit(sortMeta);
|
|
1380
|
+
this.tableService.onSort(sortMeta);
|
|
1381
|
+
}
|
|
1382
|
+
}
|
|
1368
1383
|
}
|
|
1369
1384
|
sortMultiple() {
|
|
1370
1385
|
if (this.groupRowsBy) {
|
|
@@ -1373,33 +1388,41 @@ class Table {
|
|
|
1373
1388
|
else if (this.multiSortMeta[0].field !== this.groupRowsBy)
|
|
1374
1389
|
this._multiSortMeta = [this.getGroupRowsMeta(), ...this._multiSortMeta];
|
|
1375
1390
|
}
|
|
1376
|
-
if (this.
|
|
1377
|
-
if (this.lazy) {
|
|
1378
|
-
this.onLazyLoad.emit(this.createLazyLoadMetadata());
|
|
1379
|
-
}
|
|
1380
|
-
else if (this.value) {
|
|
1381
|
-
if (this.customSort) {
|
|
1382
|
-
this.sortFunction.emit({
|
|
1383
|
-
data: this.value,
|
|
1384
|
-
mode: this.sortMode,
|
|
1385
|
-
multiSortMeta: this.multiSortMeta
|
|
1386
|
-
});
|
|
1387
|
-
}
|
|
1388
|
-
else {
|
|
1389
|
-
this.value.sort((data1, data2) => {
|
|
1390
|
-
return this.multisortField(data1, data2, this.multiSortMeta, 0);
|
|
1391
|
-
});
|
|
1392
|
-
this._value = [...this.value];
|
|
1393
|
-
}
|
|
1394
|
-
if (this.hasFilter()) {
|
|
1395
|
-
this._filter();
|
|
1396
|
-
}
|
|
1397
|
-
}
|
|
1391
|
+
if (this.sortType === 'custom') {
|
|
1398
1392
|
this.onSort.emit({
|
|
1399
1393
|
multisortmeta: this.multiSortMeta
|
|
1400
1394
|
});
|
|
1401
1395
|
this.tableService.onSort(this.multiSortMeta);
|
|
1402
1396
|
}
|
|
1397
|
+
else {
|
|
1398
|
+
if (this.multiSortMeta) {
|
|
1399
|
+
if (this.lazy) {
|
|
1400
|
+
this.onLazyLoad.emit(this.createLazyLoadMetadata());
|
|
1401
|
+
}
|
|
1402
|
+
else if (this.value) {
|
|
1403
|
+
if (this.customSort) {
|
|
1404
|
+
this.sortFunction.emit({
|
|
1405
|
+
data: this.value,
|
|
1406
|
+
mode: this.sortMode,
|
|
1407
|
+
multiSortMeta: this.multiSortMeta
|
|
1408
|
+
});
|
|
1409
|
+
}
|
|
1410
|
+
else {
|
|
1411
|
+
this.value.sort((data1, data2) => {
|
|
1412
|
+
return this.multisortField(data1, data2, this.multiSortMeta, 0);
|
|
1413
|
+
});
|
|
1414
|
+
this._value = [...this.value];
|
|
1415
|
+
}
|
|
1416
|
+
if (this.hasFilter()) {
|
|
1417
|
+
this._filter();
|
|
1418
|
+
}
|
|
1419
|
+
}
|
|
1420
|
+
this.onSort.emit({
|
|
1421
|
+
multisortmeta: this.multiSortMeta
|
|
1422
|
+
});
|
|
1423
|
+
this.tableService.onSort(this.multiSortMeta);
|
|
1424
|
+
}
|
|
1425
|
+
}
|
|
1403
1426
|
}
|
|
1404
1427
|
multisortField(data1, data2, multiSortMeta, index) {
|
|
1405
1428
|
const value1 = ObjectUtils.resolveFieldData(data1, multiSortMeta[index].field);
|
|
@@ -1807,10 +1830,10 @@ class Table {
|
|
|
1807
1830
|
}
|
|
1808
1831
|
return true;
|
|
1809
1832
|
}
|
|
1810
|
-
_filter(
|
|
1811
|
-
if (
|
|
1833
|
+
_filter() {
|
|
1834
|
+
if (this.filterType === 'custom') {
|
|
1812
1835
|
this.onFilter.emit({
|
|
1813
|
-
filters: this.filters
|
|
1836
|
+
filters: Object.fromEntries(Object.entries(this.filters).filter(([_, value]) => value.matchMode !== null))
|
|
1814
1837
|
});
|
|
1815
1838
|
}
|
|
1816
1839
|
else {
|
|
@@ -2682,13 +2705,13 @@ class Table {
|
|
|
2682
2705
|
.trim();
|
|
2683
2706
|
}
|
|
2684
2707
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: Table, deps: [{ token: DOCUMENT }, { token: PLATFORM_ID }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: TableService }, { token: i0.ChangeDetectorRef }, { token: i2.FilterService }, { token: i2.OverlayService }, { token: i2.caxConfig }, { token: i3$1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
|
|
2685
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.2.9", type: Table, isStandalone: true, selector: "cax-table", inputs: { fontSize: "fontSize", rowSize: "rowSize", frozenColumns: "frozenColumns", frozenValue: "frozenValue", style: "style", styleClass: "styleClass", tableStyle: "tableStyle", tableStyleClass: "tableStyleClass", paginator: ["paginator", "paginator", booleanAttribute], pageLinks: ["pageLinks", "pageLinks", numberAttribute], rowsPerPageOptions: "rowsPerPageOptions", alwaysShowPaginator: ["alwaysShowPaginator", "alwaysShowPaginator", booleanAttribute], paginatorPosition: "paginatorPosition", paginatorStyleClass: "paginatorStyleClass", paginatorDropdownAppendTo: "paginatorDropdownAppendTo", paginatorDropdownScrollHeight: "paginatorDropdownScrollHeight", currentPageReportTemplate: "currentPageReportTemplate", showCurrentPageReport: ["showCurrentPageReport", "showCurrentPageReport", booleanAttribute], showJumpToPageDropdown: ["showJumpToPageDropdown", "showJumpToPageDropdown", booleanAttribute], showJumpToPageInput: ["showJumpToPageInput", "showJumpToPageInput", booleanAttribute], showFirstLastIcon: ["showFirstLastIcon", "showFirstLastIcon", booleanAttribute], showPageLinks: ["showPageLinks", "showPageLinks", booleanAttribute], defaultSortOrder: ["defaultSortOrder", "defaultSortOrder", numberAttribute], sortMode: "sortMode", resetPageOnSort: ["resetPageOnSort", "resetPageOnSort", booleanAttribute], selectionMode: "selectionMode", selectionPageOnly: ["selectionPageOnly", "selectionPageOnly", booleanAttribute], contextMenuSelection: "contextMenuSelection", contextMenuSelectionMode: "contextMenuSelectionMode", dataKey: "dataKey", metaKeySelection: ["metaKeySelection", "metaKeySelection", booleanAttribute], rowSelectable: "rowSelectable", rowTrackBy: "rowTrackBy", lazy: ["lazy", "lazy", booleanAttribute], lazyLoadOnInit: ["lazyLoadOnInit", "lazyLoadOnInit", booleanAttribute], compareSelectionBy: "compareSelectionBy", csvSeparator: "csvSeparator", exportFilename: "exportFilename", filters: "filters", globalFilterFields: "globalFilterFields", filterDelay: ["filterDelay", "filterDelay", numberAttribute], filterLocale: "filterLocale", expandedRowKeys: "expandedRowKeys", editingRowKeys: "editingRowKeys", rowExpandMode: "rowExpandMode", scrollable: ["scrollable", "scrollable", booleanAttribute], scrollDirection: "scrollDirection", rowGroupMode: "rowGroupMode", scrollHeight: "scrollHeight", virtualScroll: ["virtualScroll", "virtualScroll", booleanAttribute], virtualScrollItemSize: ["virtualScrollItemSize", "virtualScrollItemSize", numberAttribute], virtualScrollOptions: "virtualScrollOptions", virtualScrollDelay: ["virtualScrollDelay", "virtualScrollDelay", numberAttribute], frozenWidth: "frozenWidth", responsive: "responsive", contextMenu: "contextMenu", resizableColumns: ["resizableColumns", "resizableColumns", booleanAttribute], columnResizeMode: "columnResizeMode", reorderableColumns: ["reorderableColumns", "reorderableColumns", booleanAttribute], loading: ["loading", "loading", booleanAttribute], loadingIcon: "loadingIcon", showLoader: ["showLoader", "showLoader", booleanAttribute], rowHover: ["rowHover", "rowHover", booleanAttribute], customSort: ["customSort", "customSort", booleanAttribute], showInitialSortBadge: ["showInitialSortBadge", "showInitialSortBadge", booleanAttribute], autoLayout: ["autoLayout", "autoLayout", booleanAttribute], exportFunction: "exportFunction", exportHeader: "exportHeader", stateKey: "stateKey", stateStorage: "stateStorage", editMode: "editMode", groupRowsBy: "groupRowsBy", groupRowsByOrder: ["groupRowsByOrder", "groupRowsByOrder", numberAttribute], responsiveLayout: "responsiveLayout", breakpoint: "breakpoint", paginatorLocale: "paginatorLocale", value: "value", columns: "columns", first: "first", rows: "rows", totalRecords: "totalRecords", sortField: "sortField", sortOrder: "sortOrder", multiSortMeta: "multiSortMeta", selection: "selection", selectAll: "selectAll", virtualRowHeight: "virtualRowHeight" }, outputs: { contextMenuSelectionChange: "contextMenuSelectionChange", selectAllChange: "selectAllChange", selectionChange: "selectionChange", onRowSelect: "onRowSelect", onRowUnselect: "onRowUnselect", onPage: "onPage", onSort: "onSort", onFilter: "onFilter", onLazyLoad: "onLazyLoad", onRowExpand: "onRowExpand", onRowCollapse: "onRowCollapse", onContextMenuSelect: "onContextMenuSelect", onColResize: "onColResize", onColReorder: "onColReorder", onRowReorder: "onRowReorder", onEditInit: "onEditInit", onEditComplete: "onEditComplete", onEditCancel: "onEditCancel", onHeaderCheckboxToggle: "onHeaderCheckboxToggle", sortFunction: "sortFunction", firstChange: "firstChange", rowsChange: "rowsChange", onStateSave: "onStateSave", onStateRestore: "onStateRestore" }, host: { classAttribute: "cax-element" }, queries: [{ propertyName: "templates", predicate: CaxTemplate }], viewQueries: [{ propertyName: "containerViewChild", first: true, predicate: ["container"], descendants: true }, { propertyName: "resizeHelperViewChild", first: true, predicate: ["resizeHelper"], descendants: true }, { propertyName: "reorderIndicatorUpViewChild", first: true, predicate: ["reorderIndicatorUp"], descendants: true }, { propertyName: "reorderIndicatorDownViewChild", first: true, predicate: ["reorderIndicatorDown"], descendants: true }, { propertyName: "wrapperViewChild", first: true, predicate: ["wrapper"], descendants: true }, { propertyName: "tableViewChild", first: true, predicate: ["table"], descendants: true }, { propertyName: "tableHeaderViewChild", first: true, predicate: ["thead"], descendants: true }, { propertyName: "tableFooterViewChild", first: true, predicate: ["tfoot"], descendants: true }, { propertyName: "scroller", first: true, predicate: ["scroller"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div #container [ngStyle]=\"style\" [class]=\"styleClass\" [ngClass]=\"getTableClasses()\" [attr.id]=\"id\">\r\n <div class=\"cax-datatable-loading-overlay cax-component-overlay\" *ngIf=\"loading && showLoader\">\r\n <i *ngIf=\"loadingIcon\" [class]=\"'cax-datatable-loading-icon ' + loadingIcon\"></i>\r\n <ng-container *ngIf=\"!loadingIcon\">\r\n <SpinnerIcon *ngIf=\"!loadingIconTemplate\" [spin]=\"true\" [styleClass]=\"'cax-datatable-loading-icon'\" />\r\n <span *ngIf=\"loadingIconTemplate\" class=\"cax-datatable-loading-icon\">\r\n <ng-template *ngTemplateOutlet=\"loadingIconTemplate\"></ng-template>\r\n </span>\r\n </ng-container>\r\n </div>\r\n <div *ngIf=\"captionTemplate\" class=\"cax-datatable-header\">\r\n <ng-container *ngTemplateOutlet=\"captionTemplate\"></ng-container>\r\n </div>\r\n <cax-paginator\r\n [rows]=\"rows\"\r\n [first]=\"first\"\r\n [totalRecords]=\"totalRecords\"\r\n [pageLinkSize]=\"pageLinks\"\r\n [alwaysShow]=\"alwaysShowPaginator\"\r\n (onPageChange)=\"onPageChange($event)\"\r\n [rowsPerPageOptions]=\"rowsPerPageOptions\"\r\n *ngIf=\"paginator && (paginatorPosition === 'top' || paginatorPosition == 'both')\"\r\n [templateLeft]=\"paginatorLeftTemplate\"\r\n [templateRight]=\"paginatorRightTemplate\"\r\n [dropdownAppendTo]=\"paginatorDropdownAppendTo\"\r\n [dropdownScrollHeight]=\"paginatorDropdownScrollHeight\"\r\n [currentPageReportTemplate]=\"currentPageReportTemplate\"\r\n [showFirstLastIcon]=\"showFirstLastIcon\"\r\n [dropdownItemTemplate]=\"paginatorDropdownItemTemplate\"\r\n [showCurrentPageReport]=\"showCurrentPageReport\"\r\n [showJumpToPageDropdown]=\"showJumpToPageDropdown\"\r\n [showJumpToPageInput]=\"showJumpToPageInput\"\r\n [showPageLinks]=\"showPageLinks\"\r\n [styleClass]=\"getPaginatorStyleClasses('cax-paginator-top')\"\r\n [locale]=\"paginatorLocale\"\r\n >\r\n <ng-template caxTemplate=\"dropdownicon\" *ngIf=\"paginatorDropdownIconTemplate\">\r\n <ng-container *ngTemplateOutlet=\"paginatorDropdownIconTemplate\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template caxTemplate=\"firstpagelinkicon\" *ngIf=\"paginatorFirstPageLinkIconTemplate\">\r\n <ng-container *ngTemplateOutlet=\"paginatorFirstPageLinkIconTemplate\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template caxTemplate=\"previouspagelinkicon\" *ngIf=\"paginatorPreviousPageLinkIconTemplate\">\r\n <ng-container *ngTemplateOutlet=\"paginatorPreviousPageLinkIconTemplate\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template caxTemplate=\"lastpagelinkicon\" *ngIf=\"paginatorLastPageLinkIconTemplate\">\r\n <ng-container *ngTemplateOutlet=\"paginatorLastPageLinkIconTemplate\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template caxTemplate=\"nextpagelinkicon\" *ngIf=\"paginatorNextPageLinkIconTemplate\">\r\n <ng-container *ngTemplateOutlet=\"paginatorNextPageLinkIconTemplate\"></ng-container>\r\n </ng-template>\r\n </cax-paginator>\r\n\r\n <div #wrapper class=\"cax-datatable-wrapper\" [ngStyle]=\"{ maxHeight: virtualScroll ? '' : scrollHeight }\">\r\n <cax-scroller\r\n #scroller\r\n *ngIf=\"virtualScroll\"\r\n [items]=\"processedData\"\r\n [columns]=\"columns\"\r\n [style]=\"{ height: scrollHeight !== 'flex' ? scrollHeight : undefined }\"\r\n [scrollHeight]=\"scrollHeight !== 'flex' ? undefined : '100%'\"\r\n [itemSize]=\"virtualScrollItemSize || _virtualRowHeight\"\r\n [step]=\"rows\"\r\n [delay]=\"lazy ? virtualScrollDelay : 0\"\r\n [inline]=\"true\"\r\n [autoSize]=\"true\"\r\n [lazy]=\"lazy\"\r\n (onLazyLoad)=\"onLazyItemLoad($event)\"\r\n [loaderDisabled]=\"true\"\r\n [showSpacer]=\"false\"\r\n [showLoader]=\"loadingBodyTemplate\"\r\n [options]=\"virtualScrollOptions\"\r\n >\r\n <ng-template caxTemplate=\"content\" let-items let-scrollerOptions=\"options\">\r\n <ng-container *ngTemplateOutlet=\"buildInTable; context: { $implicit: items, options: scrollerOptions }\"></ng-container>\r\n </ng-template>\r\n </cax-scroller>\r\n <ng-container *ngIf=\"!virtualScroll\">\r\n <ng-container *ngTemplateOutlet=\"buildInTable; context: { $implicit: processedData, options: { columns } }\"></ng-container>\r\n </ng-container>\r\n\r\n <ng-template #buildInTable let-items let-scrollerOptions=\"options\">\r\n <table\r\n #table\r\n role=\"table\"\r\n [ngClass]=\"{ 'cax-datatable-table': true, 'cax-datatable-scrollable-table': scrollable, 'cax-datatable-resizable-table': resizableColumns, 'cax-datatable-resizable-table-fit': resizableColumns && columnResizeMode === 'fit' }\"\r\n [class]=\"tableStyleClass\"\r\n [ngStyle]=\"tableStyle\"\r\n [attr.id]=\"id + '-table'\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"colGroupTemplate; context: { $implicit: scrollerOptions.columns }\"></ng-container>\r\n <thead role=\"rowgroup\" #thead class=\"cax-datatable-thead\">\r\n <ng-container *ngTemplateOutlet=\"headerGroupedTemplate || headerTemplate; context: { $implicit: scrollerOptions.columns }\"></ng-container>\r\n </thead>\r\n <tbody\r\n role=\"rowgroup\"\r\n class=\"cax-datatable-tbody cax-datatable-frozen-tbody\"\r\n *ngIf=\"frozenValue || frozenBodyTemplate\"\r\n [value]=\"frozenValue\"\r\n [frozenRows]=\"true\"\r\n [caxTableBody]=\"scrollerOptions.columns\"\r\n [caxTableBodyTemplate]=\"frozenBodyTemplate\"\r\n [frozen]=\"true\"\r\n ></tbody>\r\n <tbody\r\n role=\"rowgroup\"\r\n class=\"cax-datatable-tbody\"\r\n [ngClass]=\"scrollerOptions.contentStyleClass\"\r\n [ngStyle]=\"scrollerOptions.contentStyle\"\r\n [value]=\"dataToRender(scrollerOptions.rows)\"\r\n [caxTableBody]=\"scrollerOptions.columns\"\r\n [caxTableBodyTemplate]=\"bodyTemplate\"\r\n [scrollerOptions]=\"scrollerOptions\"\r\n ></tbody>\r\n <tbody\r\n role=\"rowgroup\"\r\n *ngIf=\"scrollerOptions.spacerStyle\"\r\n [ngStyle]=\"{ height: 'calc(' + scrollerOptions.spacerStyle.height + ' - ' + scrollerOptions.rows.length * scrollerOptions.itemSize + 'px)' }\"\r\n class=\"cax-datatable-scroller-spacer\"\r\n ></tbody>\r\n <tfoot role=\"rowgroup\" *ngIf=\"footerGroupedTemplate || footerTemplate\" #tfoot class=\"cax-datatable-tfoot\">\r\n <ng-container *ngTemplateOutlet=\"footerGroupedTemplate || footerTemplate; context: { $implicit: scrollerOptions.columns }\"></ng-container>\r\n </tfoot>\r\n </table>\r\n </ng-template>\r\n </div>\r\n\r\n <cax-paginator\r\n [rows]=\"rows\"\r\n [first]=\"first\"\r\n [totalRecords]=\"totalRecords\"\r\n [pageLinkSize]=\"pageLinks\"\r\n [alwaysShow]=\"alwaysShowPaginator\"\r\n (onPageChange)=\"onPageChange($event)\"\r\n [rowsPerPageOptions]=\"rowsPerPageOptions\"\r\n *ngIf=\"paginator && (paginatorPosition === 'bottom' || paginatorPosition == 'both')\"\r\n [templateLeft]=\"paginatorLeftTemplate\"\r\n [templateRight]=\"paginatorRightTemplate\"\r\n [dropdownAppendTo]=\"paginatorDropdownAppendTo\"\r\n [dropdownScrollHeight]=\"paginatorDropdownScrollHeight\"\r\n [currentPageReportTemplate]=\"currentPageReportTemplate\"\r\n [showFirstLastIcon]=\"showFirstLastIcon\"\r\n [dropdownItemTemplate]=\"paginatorDropdownItemTemplate\"\r\n [showCurrentPageReport]=\"showCurrentPageReport\"\r\n [showJumpToPageDropdown]=\"showJumpToPageDropdown\"\r\n [showJumpToPageInput]=\"showJumpToPageInput\"\r\n [showPageLinks]=\"showPageLinks\"\r\n [styleClass]=\"getPaginatorStyleClasses('cax-paginator-bottom')\"\r\n [locale]=\"paginatorLocale\"\r\n >\r\n <ng-template caxTemplate=\"dropdownicon\" *ngIf=\"paginatorDropdownIconTemplate\">\r\n <ng-container *ngTemplateOutlet=\"paginatorDropdownIconTemplate\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template caxTemplate=\"firstpagelinkicon\" *ngIf=\"paginatorFirstPageLinkIconTemplate\">\r\n <ng-container *ngTemplateOutlet=\"paginatorFirstPageLinkIconTemplate\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template caxTemplate=\"previouspagelinkicon\" *ngIf=\"paginatorPreviousPageLinkIconTemplate\">\r\n <ng-container *ngTemplateOutlet=\"paginatorPreviousPageLinkIconTemplate\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template caxTemplate=\"lastpagelinkicon\" *ngIf=\"paginatorLastPageLinkIconTemplate\">\r\n <ng-container *ngTemplateOutlet=\"paginatorLastPageLinkIconTemplate\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template caxTemplate=\"nextpagelinkicon\" *ngIf=\"paginatorNextPageLinkIconTemplate\">\r\n <ng-container *ngTemplateOutlet=\"paginatorNextPageLinkIconTemplate\"></ng-container>\r\n </ng-template>\r\n </cax-paginator>\r\n\r\n <div *ngIf=\"summaryTemplate\" class=\"cax-datatable-footer\">\r\n <ng-container *ngTemplateOutlet=\"summaryTemplate\"></ng-container>\r\n </div>\r\n\r\n <div\r\n #resizeHelper\r\n class=\"cax-column-resizer-helper\"\r\n [ngStyle]=\"{\r\n display: 'none'\r\n }\"\r\n *ngIf=\"resizableColumns\"\r\n ></div>\r\n <span\r\n #reorderIndicatorUp\r\n class=\"cax-datatable-reorder-indicator-up\"\r\n [ngStyle]=\"{\r\n display: 'none'\r\n }\"\r\n *ngIf=\"reorderableColumns\"\r\n >\r\n <ArrowDownIcon *ngIf=\"!reorderIndicatorUpIconTemplate\" />\r\n <ng-template *ngTemplateOutlet=\"reorderIndicatorUpIconTemplate\"></ng-template>\r\n </span>\r\n <span\r\n #reorderIndicatorDown\r\n class=\"cax-datatable-reorder-indicator-down\"\r\n [ngStyle]=\"{\r\n display: 'none'\r\n }\"\r\n *ngIf=\"reorderableColumns\"\r\n >\r\n <ArrowUpIcon *ngIf=\"!reorderIndicatorDownIconTemplate\" />\r\n <ng-template *ngTemplateOutlet=\"reorderIndicatorDownIconTemplate\"></ng-template>\r\n </span>\r\n</div>\r\n", styles: ["@layer cax{.cax-datatable{position:relative}.cax-datatable>.cax-datatable-wrapper{overflow:auto;border-radius:12px}.cax-datatable-wrapper::-webkit-scrollbar{width:8px;height:8px}.cax-datatable-wrapper::-webkit-scrollbar-track{background:#f0f0f0;border-radius:10px}.cax-datatable-wrapper::-webkit-scrollbar-thumb{background:#888;border-radius:10px}.cax-datatable-table{border-spacing:0px;width:100%}.cax-datatable .cax-sortable-column{-webkit-user-select:none;user-select:none}.cax-datatable .cax-sortable-column .cax-column-title,.cax-datatable .cax-sortable-column .cax-sortable-column-icon,.cax-datatable .cax-sortable-column .cax-sortable-column-badge{vertical-align:middle}.cax-datatable .cax-sortable-column .cax-icon-wrapper{display:inline}.cax-datatable .cax-sortable-column .cax-sortable-column-badge{display:inline-flex;align-items:center;justify-content:center}.cax-datatable-hoverable-rows .cax-selectable-row{cursor:pointer}.cax-datatable-scrollable>.cax-datatable-wrapper{position:relative}.cax-datatable-scrollable-table>.cax-datatable-thead{position:sticky;top:0;z-index:2}.cax-datatable-scrollable-table>.cax-datatable-frozen-tbody{position:sticky;z-index:1}.cax-datatable-scrollable-table>.cax-datatable-tfoot{position:sticky;bottom:0;z-index:1}.cax-datatable-scrollable .cax-frozen-column{position:sticky;z-index:1}.cax-datatable-scrollable th.cax-frozen-column{z-index:2;background:var(--neutral-75)}.cax-datatable-scrollable td.cax-frozen-column{z-index:1;background:transparent;-webkit-backdrop-filter:blur(80px);backdrop-filter:blur(80px)}.cax-datatable-flex-scrollable{display:flex;flex-direction:column;height:100%}.cax-datatable-flex-scrollable>.cax-datatable-wrapper{display:flex;flex-direction:column;flex:1;height:100%}.cax-datatable-scrollable-table>.cax-datatable-tbody>.cax-rowgroucax-header{position:sticky;z-index:2}.cax-datatable-resizable-table>.cax-datatable-thead>tr>th,.cax-datatable-resizable-table>.cax-datatable-tfoot>tr>td,.cax-datatable-resizable-table>.cax-datatable-tbody>tr>td{overflow:hidden;white-space:nowrap}.cax-datatable-resizable-table>.cax-datatable-thead>tr>th.cax-resizable-column:not(.cax-frozen-column){background-clip:padding-box;position:relative}.cax-datatable-resizable-table-fit>.cax-datatable-thead>tr>th.cax-resizable-column:last-child .cax-column-resizer{display:none}.cax-datatable .cax-column-resizer{display:block;position:absolute!important;top:0;right:0;margin:0;width:.5rem;height:100%;padding:0;cursor:col-resize;border:1px solid transparent}.cax-datatable .cax-column-resizer-helper{width:1px;position:absolute;z-index:10;display:none}.cax-datatable .cax-row-editor-init,.cax-datatable .cax-row-editor-save,.cax-datatable .cax-row-editor-cancel,.cax-datatable .cax-row-toggler{display:inline-flex;align-items:center;justify-content:center;overflow:hidden;position:relative}.cax-datatable-reorder-indicator-up,.cax-datatable-reorder-indicator-down{position:absolute}.cax-datatable-reorderablerow-handle,[caxReorderableColumn]{cursor:move}.cax-datatable .cax-datatable-loading-overlay{position:absolute;display:flex;align-items:center;justify-content:center;z-index:3}.cax-column-filter-row{display:flex;align-items:center;width:100%}.cax-column-filter-row i{font-size:20px}.cax-column-filter-menu,.cax-column-filter-custom{display:inline-flex;position:relative;float:right}.cax-column-filter-menu i,.cax-column-filter-custom i{font-size:20px}.cax-column-filter-custom-container{padding:16px;display:flex;gap:16px;flex-direction:column}.cax-column-filter-custom-container .cax-column-filter-custom-buttons{display:flex;gap:12px}.cax-column-filter-custom-container .cax-column-filter-custom-buttons cax-button{flex:1}.cax-column-filter-overlay-custom{width:248px}.cax-column-filter-row cax-columnfilterformelement{flex:1 1 auto;width:1%}.cax-column-filter-menu-button,.cax-column-filter-clear-button{display:inline-flex;justify-content:center;align-items:center;cursor:pointer;text-decoration:none;overflow:hidden;position:relative}.cax-column-filter-overlay{position:absolute;top:0;left:0}.cax-column-filter-row-items{margin:0;padding:0;list-style:none}.cax-column-filter-row-item{cursor:pointer}.cax-column-filter-add-button,.cax-column-filter-remove-button{justify-content:center}.cax-column-filter-add-button .cax-button-label,.cax-column-filter-remove-button .cax-button-label{flex-grow:0}.cax-column-filter-buttonbar{display:flex;align-items:center;justify-content:space-between;gap:12px}.cax-column-filter-buttonbar .cax-button{width:auto}.cax-datatable-tbody>tr>td>.cax-column-title{display:none}.cax-datatable-scroller-spacer{display:flex}.cax-datatable .cax-scroller .cax-scroller-loading{transform:none!important;min-height:0;position:sticky;top:0;left:0}}.cax-datatable .cax-editable-column .cax-inputtext{width:100%;box-shadow:none;border:0;padding:0;line-height:normal}.cax-datatable.cax-datatable-font-sm .cax-datatable-tbody>tr>td{font-size:12px}.cax-datatable.cax-datatable-font-sm .cax-datatable-tbody>tr>td .cax-inputtext{font-size:12px}.cax-datatable.cax-datatable-font-sm .cax-datatable-tbody>tr>td cax-tablecheckbox .cax-checkbox .cax-checkbox-box{width:16px;height:16px}.cax-datatable.cax-datatable-font-md .cax-datatable-tbody>tr>td{font-size:14px}.cax-datatable.cax-datatable-font-md .cax-datatable-tbody>tr>td .cax-inputtext{font-size:14px}.cax-datatable.cax-datatable-font-md .cax-datatable-tbody>tr>td cax-tablecheckbox .cax-checkbox .cax-checkbox-box{width:18px;height:18px}.cax-datatable.cax-datatable-font-lg .cax-datatable-tbody>tr>td{font-size:16px}.cax-datatable.cax-datatable-font-lg .cax-datatable-tbody>tr>td .cax-inputtext{font-size:16px}.cax-datatable.cax-datatable-font-lg .cax-datatable-tbody>tr>td cax-tablecheckbox.cax-checkbox .cax-checkbox-box{width:20px;height:20px}.cax-datatable.cax-datatable-font-xl .cax-datatable-tbody>tr>td{font-size:18px}.cax-datatable.cax-datatable-font-xl .cax-datatable-tbody>tr>td .cax-inputtext{font-size:18px}.cax-datatable.cax-datatable-font-xl .cax-datatable-tbody>tr>td cax-tablecheckbox.cax-checkbox .cax-checkbox-box{width:22px;height:22px}.cax-datatable.cax-datatable-font-sm.cax-datatable-row-sm .cax-datatable-tbody>tr>td{height:42px}.cax-datatable.cax-datatable-font-sm.cax-datatable-row-md .cax-datatable-tbody>tr>td{height:56px}.cax-datatable.cax-datatable-font-sm.cax-datatable-row-lg .cax-datatable-tbody>tr>td{height:72px}.cax-datatable.cax-datatable-font-sm.cax-datatable-row-xl .cax-datatable-tbody>tr>td{height:88px}.cax-datatable.cax-datatable-font-md.cax-datatable-row-sm .cax-datatable-tbody>tr>td{height:44px}.cax-datatable.cax-datatable-font-md.cax-datatable-row-md .cax-datatable-tbody>tr>td{height:60px}.cax-datatable.cax-datatable-font-md.cax-datatable-row-lg .cax-datatable-tbody>tr>td{height:78px}.cax-datatable.cax-datatable-font-md.cax-datatable-row-xl .cax-datatable-tbody>tr>td{height:96px}.cax-datatable.cax-datatable-font-lg.cax-datatable-row-sm .cax-datatable-tbody>tr>td{height:54px}.cax-datatable.cax-datatable-font-lg.cax-datatable-row-md .cax-datatable-tbody>tr>td{height:66px}.cax-datatable.cax-datatable-font-lg.cax-datatable-row-lg .cax-datatable-tbody>tr>td{height:86px}.cax-datatable.cax-datatable-font-lg.cax-datatable-row-xl .cax-datatable-tbody>tr>td{height:108px}.cax-datatable.cax-datatable-font-xl.cax-datatable-row-sm .cax-datatable-tbody>tr>td{height:56px}.cax-datatable.cax-datatable-font-xl.cax-datatable-row-md .cax-datatable-tbody>tr>td{height:70px}.cax-datatable.cax-datatable-font-xl.cax-datatable-row-lg .cax-datatable-tbody>tr>td{height:94px}.cax-datatable.cax-datatable-font-xl.cax-datatable-row-xl .cax-datatable-tbody>tr>td{height:116px}.cax-cell-highlight-default{border:1px solid var(--primary-500)!important}.cax-cell-highlight-error{border:1px solid var(--error-600)!important}.cax-cell-background-error{background:var(--error-50)}.cax-sort-icon-button{border:0;width:28px;height:28px;display:flex;background:transparent;cursor:pointer;padding:0;align-items:center;justify-content:center}.cax-sort-icon-button i{font-size:20px}cax-sorticon{float:right;margin-left:8px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: PaginatorModule }, { kind: "component", type: i5.Paginator, selector: "cax-paginator", inputs: ["pageLinkSize", "style", "styleClass", "alwaysShow", "dropdownAppendTo", "templateLeft", "templateRight", "appendTo", "dropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showFirstLastIcon", "totalRecords", "rows", "rowsPerPageOptions", "showJumpToPageDropdown", "showJumpToPageInput", "jumpToPageItemTemplate", "showPageLinks", "locale", "dropdownItemTemplate", "first", "rightAligned"], outputs: ["onPageChange"] }, { kind: "directive", type: i2.CaxTemplate, selector: "[caxTemplate]", inputs: ["type", "caxTemplate"] }, { kind: "component", type: i6.Scroller, selector: "cax-scroller", inputs: ["id", "style", "styleClass", "tabindex", "items", "itemSize", "scrollHeight", "scrollWidth", "orientation", "step", "delay", "resizeDelay", "appendOnly", "inline", "lazy", "disabled", "loaderDisabled", "columns", "showSpacer", "showLoader", "numToleratedItems", "loading", "autoSize", "trackBy", "options"], outputs: ["onLazyLoad", "onScroll", "onScrollIndexChange"] }, { kind: "ngmodule", type: ScrollerModule }, { kind: "component", type: ArrowDownIcon, selector: "ArrowDownIcon" }, { kind: "component", type: ArrowUpIcon, selector: "ArrowUpIcon" }, { kind: "component", type: SpinnerIcon, selector: "SpinnerIcon" }, { kind: "component", type: TableBody, selector: "[caxTableBody]", inputs: ["caxTableBody", "caxTableBodyTemplate", "value", "frozen", "frozenRows", "scrollerOptions"] }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });
|
|
2708
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.2.9", type: Table, isStandalone: true, selector: "cax-table", inputs: { fontSize: "fontSize", rowSize: "rowSize", frozenColumns: "frozenColumns", frozenValue: "frozenValue", style: "style", styleClass: "styleClass", tableStyle: "tableStyle", tableStyleClass: "tableStyleClass", paginator: ["paginator", "paginator", booleanAttribute], pageLinks: ["pageLinks", "pageLinks", numberAttribute], rowsPerPageOptions: "rowsPerPageOptions", alwaysShowPaginator: ["alwaysShowPaginator", "alwaysShowPaginator", booleanAttribute], paginatorPosition: "paginatorPosition", paginatorStyleClass: "paginatorStyleClass", paginatorDropdownAppendTo: "paginatorDropdownAppendTo", paginatorDropdownScrollHeight: "paginatorDropdownScrollHeight", currentPageReportTemplate: "currentPageReportTemplate", showCurrentPageReport: ["showCurrentPageReport", "showCurrentPageReport", booleanAttribute], showJumpToPageDropdown: ["showJumpToPageDropdown", "showJumpToPageDropdown", booleanAttribute], showJumpToPageInput: ["showJumpToPageInput", "showJumpToPageInput", booleanAttribute], showFirstLastIcon: ["showFirstLastIcon", "showFirstLastIcon", booleanAttribute], showPageLinks: ["showPageLinks", "showPageLinks", booleanAttribute], defaultSortOrder: ["defaultSortOrder", "defaultSortOrder", numberAttribute], filterType: "filterType", sortType: "sortType", sortMode: "sortMode", resetPageOnSort: ["resetPageOnSort", "resetPageOnSort", booleanAttribute], selectionMode: "selectionMode", selectionPageOnly: ["selectionPageOnly", "selectionPageOnly", booleanAttribute], contextMenuSelection: "contextMenuSelection", contextMenuSelectionMode: "contextMenuSelectionMode", dataKey: "dataKey", metaKeySelection: ["metaKeySelection", "metaKeySelection", booleanAttribute], rowSelectable: "rowSelectable", rowTrackBy: "rowTrackBy", lazy: ["lazy", "lazy", booleanAttribute], lazyLoadOnInit: ["lazyLoadOnInit", "lazyLoadOnInit", booleanAttribute], compareSelectionBy: "compareSelectionBy", csvSeparator: "csvSeparator", exportFilename: "exportFilename", filters: "filters", globalFilterFields: "globalFilterFields", filterDelay: ["filterDelay", "filterDelay", numberAttribute], filterLocale: "filterLocale", expandedRowKeys: "expandedRowKeys", editingRowKeys: "editingRowKeys", rowExpandMode: "rowExpandMode", scrollable: ["scrollable", "scrollable", booleanAttribute], scrollDirection: "scrollDirection", rowGroupMode: "rowGroupMode", scrollHeight: "scrollHeight", virtualScroll: ["virtualScroll", "virtualScroll", booleanAttribute], virtualScrollItemSize: ["virtualScrollItemSize", "virtualScrollItemSize", numberAttribute], virtualScrollOptions: "virtualScrollOptions", virtualScrollDelay: ["virtualScrollDelay", "virtualScrollDelay", numberAttribute], frozenWidth: "frozenWidth", responsive: "responsive", contextMenu: "contextMenu", resizableColumns: ["resizableColumns", "resizableColumns", booleanAttribute], columnResizeMode: "columnResizeMode", reorderableColumns: ["reorderableColumns", "reorderableColumns", booleanAttribute], loading: ["loading", "loading", booleanAttribute], loadingIcon: "loadingIcon", showLoader: ["showLoader", "showLoader", booleanAttribute], rowHover: ["rowHover", "rowHover", booleanAttribute], customSort: ["customSort", "customSort", booleanAttribute], showInitialSortBadge: ["showInitialSortBadge", "showInitialSortBadge", booleanAttribute], autoLayout: ["autoLayout", "autoLayout", booleanAttribute], exportFunction: "exportFunction", exportHeader: "exportHeader", stateKey: "stateKey", stateStorage: "stateStorage", editMode: "editMode", groupRowsBy: "groupRowsBy", groupRowsByOrder: ["groupRowsByOrder", "groupRowsByOrder", numberAttribute], responsiveLayout: "responsiveLayout", breakpoint: "breakpoint", paginatorLocale: "paginatorLocale", value: "value", columns: "columns", first: "first", rows: "rows", totalRecords: "totalRecords", sortField: "sortField", sortOrder: "sortOrder", multiSortMeta: "multiSortMeta", selection: "selection", selectAll: "selectAll", virtualRowHeight: "virtualRowHeight" }, outputs: { contextMenuSelectionChange: "contextMenuSelectionChange", selectAllChange: "selectAllChange", selectionChange: "selectionChange", onRowSelect: "onRowSelect", onRowUnselect: "onRowUnselect", onPage: "onPage", onSort: "onSort", onFilter: "onFilter", onLazyLoad: "onLazyLoad", onRowExpand: "onRowExpand", onRowCollapse: "onRowCollapse", onContextMenuSelect: "onContextMenuSelect", onColResize: "onColResize", onColReorder: "onColReorder", onRowReorder: "onRowReorder", onEditInit: "onEditInit", onEditComplete: "onEditComplete", onEditCancel: "onEditCancel", onHeaderCheckboxToggle: "onHeaderCheckboxToggle", sortFunction: "sortFunction", firstChange: "firstChange", rowsChange: "rowsChange", onStateSave: "onStateSave", onStateRestore: "onStateRestore" }, host: { classAttribute: "cax-element" }, queries: [{ propertyName: "templates", predicate: CaxTemplate }], viewQueries: [{ propertyName: "containerViewChild", first: true, predicate: ["container"], descendants: true }, { propertyName: "resizeHelperViewChild", first: true, predicate: ["resizeHelper"], descendants: true }, { propertyName: "reorderIndicatorUpViewChild", first: true, predicate: ["reorderIndicatorUp"], descendants: true }, { propertyName: "reorderIndicatorDownViewChild", first: true, predicate: ["reorderIndicatorDown"], descendants: true }, { propertyName: "wrapperViewChild", first: true, predicate: ["wrapper"], descendants: true }, { propertyName: "tableViewChild", first: true, predicate: ["table"], descendants: true }, { propertyName: "tableHeaderViewChild", first: true, predicate: ["thead"], descendants: true }, { propertyName: "tableFooterViewChild", first: true, predicate: ["tfoot"], descendants: true }, { propertyName: "scroller", first: true, predicate: ["scroller"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div #container [ngStyle]=\"style\" [class]=\"styleClass\" [ngClass]=\"getTableClasses()\" [attr.id]=\"id\">\r\n <div class=\"cax-datatable-loading-overlay cax-component-overlay\" *ngIf=\"loading && showLoader\">\r\n <i *ngIf=\"loadingIcon\" [class]=\"'cax-datatable-loading-icon ' + loadingIcon\"></i>\r\n <ng-container *ngIf=\"!loadingIcon\">\r\n <SpinnerIcon *ngIf=\"!loadingIconTemplate\" [spin]=\"true\" [styleClass]=\"'cax-datatable-loading-icon'\" />\r\n <span *ngIf=\"loadingIconTemplate\" class=\"cax-datatable-loading-icon\">\r\n <ng-template *ngTemplateOutlet=\"loadingIconTemplate\"></ng-template>\r\n </span>\r\n </ng-container>\r\n </div>\r\n <div *ngIf=\"captionTemplate\" class=\"cax-datatable-header\">\r\n <ng-container *ngTemplateOutlet=\"captionTemplate\"></ng-container>\r\n </div>\r\n <cax-paginator\r\n [rows]=\"rows\"\r\n [first]=\"first\"\r\n [totalRecords]=\"totalRecords\"\r\n [pageLinkSize]=\"pageLinks\"\r\n [alwaysShow]=\"alwaysShowPaginator\"\r\n (onPageChange)=\"onPageChange($event)\"\r\n [rowsPerPageOptions]=\"rowsPerPageOptions\"\r\n *ngIf=\"paginator && (paginatorPosition === 'top' || paginatorPosition == 'both')\"\r\n [templateLeft]=\"paginatorLeftTemplate\"\r\n [templateRight]=\"paginatorRightTemplate\"\r\n [dropdownAppendTo]=\"paginatorDropdownAppendTo\"\r\n [dropdownScrollHeight]=\"paginatorDropdownScrollHeight\"\r\n [currentPageReportTemplate]=\"currentPageReportTemplate\"\r\n [showFirstLastIcon]=\"showFirstLastIcon\"\r\n [dropdownItemTemplate]=\"paginatorDropdownItemTemplate\"\r\n [showCurrentPageReport]=\"showCurrentPageReport\"\r\n [showJumpToPageDropdown]=\"showJumpToPageDropdown\"\r\n [showJumpToPageInput]=\"showJumpToPageInput\"\r\n [showPageLinks]=\"showPageLinks\"\r\n [styleClass]=\"getPaginatorStyleClasses('cax-paginator-top')\"\r\n [locale]=\"paginatorLocale\"\r\n >\r\n <ng-template caxTemplate=\"dropdownicon\" *ngIf=\"paginatorDropdownIconTemplate\">\r\n <ng-container *ngTemplateOutlet=\"paginatorDropdownIconTemplate\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template caxTemplate=\"firstpagelinkicon\" *ngIf=\"paginatorFirstPageLinkIconTemplate\">\r\n <ng-container *ngTemplateOutlet=\"paginatorFirstPageLinkIconTemplate\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template caxTemplate=\"previouspagelinkicon\" *ngIf=\"paginatorPreviousPageLinkIconTemplate\">\r\n <ng-container *ngTemplateOutlet=\"paginatorPreviousPageLinkIconTemplate\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template caxTemplate=\"lastpagelinkicon\" *ngIf=\"paginatorLastPageLinkIconTemplate\">\r\n <ng-container *ngTemplateOutlet=\"paginatorLastPageLinkIconTemplate\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template caxTemplate=\"nextpagelinkicon\" *ngIf=\"paginatorNextPageLinkIconTemplate\">\r\n <ng-container *ngTemplateOutlet=\"paginatorNextPageLinkIconTemplate\"></ng-container>\r\n </ng-template>\r\n </cax-paginator>\r\n\r\n <div #wrapper class=\"cax-datatable-wrapper\" [ngStyle]=\"{ maxHeight: virtualScroll ? '' : scrollHeight }\">\r\n <cax-scroller\r\n #scroller\r\n *ngIf=\"virtualScroll\"\r\n [items]=\"processedData\"\r\n [columns]=\"columns\"\r\n [style]=\"{ height: scrollHeight !== 'flex' ? scrollHeight : undefined }\"\r\n [scrollHeight]=\"scrollHeight !== 'flex' ? undefined : '100%'\"\r\n [itemSize]=\"virtualScrollItemSize || _virtualRowHeight\"\r\n [step]=\"rows\"\r\n [delay]=\"lazy ? virtualScrollDelay : 0\"\r\n [inline]=\"true\"\r\n [autoSize]=\"true\"\r\n [lazy]=\"lazy\"\r\n (onLazyLoad)=\"onLazyItemLoad($event)\"\r\n [loaderDisabled]=\"true\"\r\n [showSpacer]=\"false\"\r\n [showLoader]=\"loadingBodyTemplate\"\r\n [options]=\"virtualScrollOptions\"\r\n >\r\n <ng-template caxTemplate=\"content\" let-items let-scrollerOptions=\"options\">\r\n <ng-container *ngTemplateOutlet=\"buildInTable; context: { $implicit: items, options: scrollerOptions }\"></ng-container>\r\n </ng-template>\r\n </cax-scroller>\r\n <ng-container *ngIf=\"!virtualScroll\">\r\n <ng-container *ngTemplateOutlet=\"buildInTable; context: { $implicit: processedData, options: { columns } }\"></ng-container>\r\n </ng-container>\r\n\r\n <ng-template #buildInTable let-items let-scrollerOptions=\"options\">\r\n <table\r\n #table\r\n role=\"table\"\r\n [ngClass]=\"{ 'cax-datatable-table': true, 'cax-datatable-scrollable-table': scrollable, 'cax-datatable-resizable-table': resizableColumns, 'cax-datatable-resizable-table-fit': resizableColumns && columnResizeMode === 'fit' }\"\r\n [class]=\"tableStyleClass\"\r\n [ngStyle]=\"tableStyle\"\r\n [attr.id]=\"id + '-table'\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"colGroupTemplate; context: { $implicit: scrollerOptions.columns }\"></ng-container>\r\n <thead role=\"rowgroup\" #thead class=\"cax-datatable-thead\">\r\n <ng-container *ngTemplateOutlet=\"headerGroupedTemplate || headerTemplate; context: { $implicit: scrollerOptions.columns }\"></ng-container>\r\n </thead>\r\n <tbody\r\n role=\"rowgroup\"\r\n class=\"cax-datatable-tbody cax-datatable-frozen-tbody\"\r\n *ngIf=\"frozenValue || frozenBodyTemplate\"\r\n [value]=\"frozenValue\"\r\n [frozenRows]=\"true\"\r\n [caxTableBody]=\"scrollerOptions.columns\"\r\n [caxTableBodyTemplate]=\"frozenBodyTemplate\"\r\n [frozen]=\"true\"\r\n ></tbody>\r\n <tbody\r\n role=\"rowgroup\"\r\n class=\"cax-datatable-tbody\"\r\n [ngClass]=\"scrollerOptions.contentStyleClass\"\r\n [ngStyle]=\"scrollerOptions.contentStyle\"\r\n [value]=\"dataToRender(scrollerOptions.rows)\"\r\n [caxTableBody]=\"scrollerOptions.columns\"\r\n [caxTableBodyTemplate]=\"bodyTemplate\"\r\n [scrollerOptions]=\"scrollerOptions\"\r\n ></tbody>\r\n <tbody\r\n role=\"rowgroup\"\r\n *ngIf=\"scrollerOptions.spacerStyle\"\r\n [ngStyle]=\"{ height: 'calc(' + scrollerOptions.spacerStyle.height + ' - ' + scrollerOptions.rows.length * scrollerOptions.itemSize + 'px)' }\"\r\n class=\"cax-datatable-scroller-spacer\"\r\n ></tbody>\r\n <tfoot role=\"rowgroup\" *ngIf=\"footerGroupedTemplate || footerTemplate\" #tfoot class=\"cax-datatable-tfoot\">\r\n <ng-container *ngTemplateOutlet=\"footerGroupedTemplate || footerTemplate; context: { $implicit: scrollerOptions.columns }\"></ng-container>\r\n </tfoot>\r\n </table>\r\n </ng-template>\r\n </div>\r\n\r\n <cax-paginator\r\n [rows]=\"rows\"\r\n [first]=\"first\"\r\n [totalRecords]=\"totalRecords\"\r\n [pageLinkSize]=\"pageLinks\"\r\n [alwaysShow]=\"alwaysShowPaginator\"\r\n (onPageChange)=\"onPageChange($event)\"\r\n [rowsPerPageOptions]=\"rowsPerPageOptions\"\r\n *ngIf=\"paginator && (paginatorPosition === 'bottom' || paginatorPosition == 'both')\"\r\n [templateLeft]=\"paginatorLeftTemplate\"\r\n [templateRight]=\"paginatorRightTemplate\"\r\n [dropdownAppendTo]=\"paginatorDropdownAppendTo\"\r\n [dropdownScrollHeight]=\"paginatorDropdownScrollHeight\"\r\n [currentPageReportTemplate]=\"currentPageReportTemplate\"\r\n [showFirstLastIcon]=\"showFirstLastIcon\"\r\n [dropdownItemTemplate]=\"paginatorDropdownItemTemplate\"\r\n [showCurrentPageReport]=\"showCurrentPageReport\"\r\n [showJumpToPageDropdown]=\"showJumpToPageDropdown\"\r\n [showJumpToPageInput]=\"showJumpToPageInput\"\r\n [showPageLinks]=\"showPageLinks\"\r\n [styleClass]=\"getPaginatorStyleClasses('cax-paginator-bottom')\"\r\n [locale]=\"paginatorLocale\"\r\n >\r\n <ng-template caxTemplate=\"dropdownicon\" *ngIf=\"paginatorDropdownIconTemplate\">\r\n <ng-container *ngTemplateOutlet=\"paginatorDropdownIconTemplate\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template caxTemplate=\"firstpagelinkicon\" *ngIf=\"paginatorFirstPageLinkIconTemplate\">\r\n <ng-container *ngTemplateOutlet=\"paginatorFirstPageLinkIconTemplate\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template caxTemplate=\"previouspagelinkicon\" *ngIf=\"paginatorPreviousPageLinkIconTemplate\">\r\n <ng-container *ngTemplateOutlet=\"paginatorPreviousPageLinkIconTemplate\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template caxTemplate=\"lastpagelinkicon\" *ngIf=\"paginatorLastPageLinkIconTemplate\">\r\n <ng-container *ngTemplateOutlet=\"paginatorLastPageLinkIconTemplate\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template caxTemplate=\"nextpagelinkicon\" *ngIf=\"paginatorNextPageLinkIconTemplate\">\r\n <ng-container *ngTemplateOutlet=\"paginatorNextPageLinkIconTemplate\"></ng-container>\r\n </ng-template>\r\n </cax-paginator>\r\n\r\n <div *ngIf=\"summaryTemplate\" class=\"cax-datatable-footer\">\r\n <ng-container *ngTemplateOutlet=\"summaryTemplate\"></ng-container>\r\n </div>\r\n\r\n <div\r\n #resizeHelper\r\n class=\"cax-column-resizer-helper\"\r\n [ngStyle]=\"{\r\n display: 'none'\r\n }\"\r\n *ngIf=\"resizableColumns\"\r\n ></div>\r\n <span\r\n #reorderIndicatorUp\r\n class=\"cax-datatable-reorder-indicator-up\"\r\n [ngStyle]=\"{\r\n display: 'none'\r\n }\"\r\n *ngIf=\"reorderableColumns\"\r\n >\r\n <ArrowDownIcon *ngIf=\"!reorderIndicatorUpIconTemplate\" />\r\n <ng-template *ngTemplateOutlet=\"reorderIndicatorUpIconTemplate\"></ng-template>\r\n </span>\r\n <span\r\n #reorderIndicatorDown\r\n class=\"cax-datatable-reorder-indicator-down\"\r\n [ngStyle]=\"{\r\n display: 'none'\r\n }\"\r\n *ngIf=\"reorderableColumns\"\r\n >\r\n <ArrowUpIcon *ngIf=\"!reorderIndicatorDownIconTemplate\" />\r\n <ng-template *ngTemplateOutlet=\"reorderIndicatorDownIconTemplate\"></ng-template>\r\n </span>\r\n</div>\r\n", styles: ["@layer cax{.cax-datatable{position:relative}.cax-datatable>.cax-datatable-wrapper{overflow:auto;border-radius:12px}.cax-datatable-wrapper::-webkit-scrollbar{width:8px;height:8px}.cax-datatable-wrapper::-webkit-scrollbar-track{background:#f0f0f0;border-radius:10px}.cax-datatable-wrapper::-webkit-scrollbar-thumb{background:#888;border-radius:10px}.cax-datatable-table{border-spacing:0px;width:100%}.cax-datatable .cax-sortable-column{-webkit-user-select:none;user-select:none}.cax-datatable .cax-sortable-column .cax-column-title,.cax-datatable .cax-sortable-column .cax-sortable-column-icon,.cax-datatable .cax-sortable-column .cax-sortable-column-badge{vertical-align:middle}.cax-datatable .cax-sortable-column .cax-icon-wrapper{display:inline}.cax-datatable .cax-sortable-column .cax-sortable-column-badge{display:inline-flex;align-items:center;justify-content:center}.cax-datatable-hoverable-rows .cax-selectable-row{cursor:pointer}.cax-datatable-scrollable>.cax-datatable-wrapper{position:relative}.cax-datatable-scrollable-table>.cax-datatable-thead{position:sticky;top:0;z-index:2}.cax-datatable-scrollable-table>.cax-datatable-frozen-tbody{position:sticky;z-index:1}.cax-datatable-scrollable-table>.cax-datatable-tfoot{position:sticky;bottom:0;z-index:1}.cax-datatable-scrollable .cax-frozen-column{position:sticky;z-index:1}.cax-datatable-scrollable th.cax-frozen-column{z-index:2;background:var(--neutral-75)}.cax-datatable-scrollable td.cax-frozen-column{z-index:1;background:transparent;-webkit-backdrop-filter:blur(80px);backdrop-filter:blur(80px)}.cax-datatable-flex-scrollable{display:flex;flex-direction:column;height:100%}.cax-datatable-flex-scrollable>.cax-datatable-wrapper{display:flex;flex-direction:column;flex:1;height:100%}.cax-datatable-scrollable-table>.cax-datatable-tbody>.cax-rowgroucax-header{position:sticky;z-index:2}.cax-datatable-resizable-table>.cax-datatable-thead>tr>th,.cax-datatable-resizable-table>.cax-datatable-tfoot>tr>td,.cax-datatable-resizable-table>.cax-datatable-tbody>tr>td{overflow:hidden;white-space:nowrap}.cax-datatable-resizable-table>.cax-datatable-thead>tr>th.cax-resizable-column:not(.cax-frozen-column){background-clip:padding-box;position:relative}.cax-datatable-resizable-table-fit>.cax-datatable-thead>tr>th.cax-resizable-column:last-child .cax-column-resizer{display:none}.cax-datatable .cax-column-resizer{display:block;position:absolute!important;top:0;right:0;margin:0;width:.5rem;height:100%;padding:0;cursor:col-resize;border:1px solid transparent}.cax-datatable .cax-column-resizer-helper{width:1px;position:absolute;z-index:10;display:none}.cax-datatable .cax-row-editor-init,.cax-datatable .cax-row-editor-save,.cax-datatable .cax-row-editor-cancel,.cax-datatable .cax-row-toggler{display:inline-flex;align-items:center;justify-content:center;overflow:hidden;position:relative}.cax-datatable-reorder-indicator-up,.cax-datatable-reorder-indicator-down{position:absolute}.cax-datatable-reorderablerow-handle,[caxReorderableColumn]{cursor:move}.cax-datatable .cax-datatable-loading-overlay{position:absolute;display:flex;align-items:center;justify-content:center;z-index:3}.cax-column-filter-row{display:flex;align-items:center;width:100%}.cax-column-filter-row i{font-size:20px}.cax-column-filter-menu,.cax-column-filter-custom{display:inline-flex;position:relative;float:right;margin-left:4px}.cax-column-filter-menu i,.cax-column-filter-custom i{font-size:20px}.cax-column-filter-custom-container{padding:16px;display:flex;gap:16px;flex-direction:column}.cax-column-filter-custom-container .cax-column-filter-custom-buttons{display:flex;gap:12px}.cax-column-filter-custom-container .cax-column-filter-custom-buttons cax-button{flex:1}.cax-column-filter-overlay-custom{width:248px}.cax-column-filter-row cax-columnfilterformelement{flex:1 1 auto;width:1%}.cax-column-filter-menu-button,.cax-column-filter-clear-button{display:inline-flex;justify-content:center;align-items:center;cursor:pointer;text-decoration:none;overflow:hidden;position:relative}.cax-column-filter-menu-button:disabled{opacity:.5}.cax-column-filter-overlay{position:absolute;top:0;left:0}.cax-column-filter-row-items{margin:0;padding:0;list-style:none}.cax-column-filter-row-item{cursor:pointer}.cax-column-filter-add-button,.cax-column-filter-remove-button{justify-content:center}.cax-column-filter-add-button .cax-button-label,.cax-column-filter-remove-button .cax-button-label{flex-grow:0}.cax-column-filter-buttonbar{display:flex;align-items:center;justify-content:space-between;gap:12px}.cax-column-filter-buttonbar .cax-button{width:auto}.cax-datatable-tbody>tr>td>.cax-column-title{display:none}.cax-datatable-scroller-spacer{display:flex}.cax-datatable .cax-scroller .cax-scroller-loading{transform:none!important;min-height:0;position:sticky;top:0;left:0}}.cax-datatable .cax-editable-column .cax-inputtext{width:100%;box-shadow:none;border:0;padding:0;line-height:normal}.cax-datatable.cax-datatable-font-sm .cax-datatable-tbody>tr>td{font-size:12px}.cax-datatable.cax-datatable-font-sm .cax-datatable-tbody>tr>td .cax-inputtext{font-size:12px}.cax-datatable.cax-datatable-font-sm .cax-datatable-tbody>tr>td cax-tablecheckbox .cax-checkbox .cax-checkbox-box{width:16px;height:16px}.cax-datatable.cax-datatable-font-md .cax-datatable-tbody>tr>td{font-size:14px}.cax-datatable.cax-datatable-font-md .cax-datatable-tbody>tr>td .cax-inputtext{font-size:14px}.cax-datatable.cax-datatable-font-md .cax-datatable-tbody>tr>td cax-tablecheckbox .cax-checkbox .cax-checkbox-box{width:18px;height:18px}.cax-datatable.cax-datatable-font-lg .cax-datatable-tbody>tr>td{font-size:16px}.cax-datatable.cax-datatable-font-lg .cax-datatable-tbody>tr>td .cax-inputtext{font-size:16px}.cax-datatable.cax-datatable-font-lg .cax-datatable-tbody>tr>td cax-tablecheckbox.cax-checkbox .cax-checkbox-box{width:20px;height:20px}.cax-datatable.cax-datatable-font-xl .cax-datatable-tbody>tr>td{font-size:18px}.cax-datatable.cax-datatable-font-xl .cax-datatable-tbody>tr>td .cax-inputtext{font-size:18px}.cax-datatable.cax-datatable-font-xl .cax-datatable-tbody>tr>td cax-tablecheckbox.cax-checkbox .cax-checkbox-box{width:22px;height:22px}.cax-datatable.cax-datatable-font-sm.cax-datatable-row-sm .cax-datatable-tbody>tr>td{height:42px}.cax-datatable.cax-datatable-font-sm.cax-datatable-row-md .cax-datatable-tbody>tr>td{height:56px}.cax-datatable.cax-datatable-font-sm.cax-datatable-row-lg .cax-datatable-tbody>tr>td{height:72px}.cax-datatable.cax-datatable-font-sm.cax-datatable-row-xl .cax-datatable-tbody>tr>td{height:88px}.cax-datatable.cax-datatable-font-md.cax-datatable-row-sm .cax-datatable-tbody>tr>td{height:44px}.cax-datatable.cax-datatable-font-md.cax-datatable-row-md .cax-datatable-tbody>tr>td{height:60px}.cax-datatable.cax-datatable-font-md.cax-datatable-row-lg .cax-datatable-tbody>tr>td{height:78px}.cax-datatable.cax-datatable-font-md.cax-datatable-row-xl .cax-datatable-tbody>tr>td{height:96px}.cax-datatable.cax-datatable-font-lg.cax-datatable-row-sm .cax-datatable-tbody>tr>td{height:54px}.cax-datatable.cax-datatable-font-lg.cax-datatable-row-md .cax-datatable-tbody>tr>td{height:66px}.cax-datatable.cax-datatable-font-lg.cax-datatable-row-lg .cax-datatable-tbody>tr>td{height:86px}.cax-datatable.cax-datatable-font-lg.cax-datatable-row-xl .cax-datatable-tbody>tr>td{height:108px}.cax-datatable.cax-datatable-font-xl.cax-datatable-row-sm .cax-datatable-tbody>tr>td{height:56px}.cax-datatable.cax-datatable-font-xl.cax-datatable-row-md .cax-datatable-tbody>tr>td{height:70px}.cax-datatable.cax-datatable-font-xl.cax-datatable-row-lg .cax-datatable-tbody>tr>td{height:94px}.cax-datatable.cax-datatable-font-xl.cax-datatable-row-xl .cax-datatable-tbody>tr>td{height:116px}.cax-cell-highlight-default{border:1px solid var(--primary-500)!important}.cax-cell-highlight-error{border:1px solid var(--error-600)!important}.cax-cell-background-error{background:var(--error-50)}.cax-sort-icon-button{border:0;width:28px;height:28px!important;display:flex;background:transparent;cursor:pointer;padding:0!important;align-items:center;justify-content:center}.cax-sort-icon-button i{font-size:20px}.cax-sort-icon-button:disabled{opacity:.5;cursor:context-menu}cax-sorticon{float:right;margin-left:4px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: PaginatorModule }, { kind: "component", type: i5.Paginator, selector: "cax-paginator", inputs: ["pageLinkSize", "style", "styleClass", "alwaysShow", "dropdownAppendTo", "templateLeft", "templateRight", "appendTo", "dropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showFirstLastIcon", "totalRecords", "rows", "rowsPerPageOptions", "showJumpToPageDropdown", "showJumpToPageInput", "jumpToPageItemTemplate", "showPageLinks", "locale", "dropdownItemTemplate", "first", "rightAligned"], outputs: ["onPageChange"] }, { kind: "directive", type: i2.CaxTemplate, selector: "[caxTemplate]", inputs: ["type", "caxTemplate"] }, { kind: "component", type: i6.Scroller, selector: "cax-scroller", inputs: ["id", "style", "styleClass", "tabindex", "items", "itemSize", "scrollHeight", "scrollWidth", "orientation", "step", "delay", "resizeDelay", "appendOnly", "inline", "lazy", "disabled", "loaderDisabled", "columns", "showSpacer", "showLoader", "numToleratedItems", "loading", "autoSize", "trackBy", "options"], outputs: ["onLazyLoad", "onScroll", "onScrollIndexChange"] }, { kind: "ngmodule", type: ScrollerModule }, { kind: "component", type: ArrowDownIcon, selector: "ArrowDownIcon" }, { kind: "component", type: ArrowUpIcon, selector: "ArrowUpIcon" }, { kind: "component", type: SpinnerIcon, selector: "SpinnerIcon" }, { kind: "component", type: TableBody, selector: "[caxTableBody]", inputs: ["caxTableBody", "caxTableBodyTemplate", "value", "frozen", "frozenRows", "scrollerOptions"] }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });
|
|
2686
2709
|
}
|
|
2687
2710
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: Table, decorators: [{
|
|
2688
2711
|
type: Component,
|
|
2689
2712
|
args: [{ selector: 'cax-table', changeDetection: ChangeDetectionStrategy.Default, encapsulation: ViewEncapsulation.None, standalone: true, imports: [CommonModule, PaginatorModule, ScrollerModule, ArrowDownIcon, ArrowUpIcon, SpinnerIcon, TableBody], host: {
|
|
2690
2713
|
class: 'cax-element'
|
|
2691
|
-
}, template: "<div #container [ngStyle]=\"style\" [class]=\"styleClass\" [ngClass]=\"getTableClasses()\" [attr.id]=\"id\">\r\n <div class=\"cax-datatable-loading-overlay cax-component-overlay\" *ngIf=\"loading && showLoader\">\r\n <i *ngIf=\"loadingIcon\" [class]=\"'cax-datatable-loading-icon ' + loadingIcon\"></i>\r\n <ng-container *ngIf=\"!loadingIcon\">\r\n <SpinnerIcon *ngIf=\"!loadingIconTemplate\" [spin]=\"true\" [styleClass]=\"'cax-datatable-loading-icon'\" />\r\n <span *ngIf=\"loadingIconTemplate\" class=\"cax-datatable-loading-icon\">\r\n <ng-template *ngTemplateOutlet=\"loadingIconTemplate\"></ng-template>\r\n </span>\r\n </ng-container>\r\n </div>\r\n <div *ngIf=\"captionTemplate\" class=\"cax-datatable-header\">\r\n <ng-container *ngTemplateOutlet=\"captionTemplate\"></ng-container>\r\n </div>\r\n <cax-paginator\r\n [rows]=\"rows\"\r\n [first]=\"first\"\r\n [totalRecords]=\"totalRecords\"\r\n [pageLinkSize]=\"pageLinks\"\r\n [alwaysShow]=\"alwaysShowPaginator\"\r\n (onPageChange)=\"onPageChange($event)\"\r\n [rowsPerPageOptions]=\"rowsPerPageOptions\"\r\n *ngIf=\"paginator && (paginatorPosition === 'top' || paginatorPosition == 'both')\"\r\n [templateLeft]=\"paginatorLeftTemplate\"\r\n [templateRight]=\"paginatorRightTemplate\"\r\n [dropdownAppendTo]=\"paginatorDropdownAppendTo\"\r\n [dropdownScrollHeight]=\"paginatorDropdownScrollHeight\"\r\n [currentPageReportTemplate]=\"currentPageReportTemplate\"\r\n [showFirstLastIcon]=\"showFirstLastIcon\"\r\n [dropdownItemTemplate]=\"paginatorDropdownItemTemplate\"\r\n [showCurrentPageReport]=\"showCurrentPageReport\"\r\n [showJumpToPageDropdown]=\"showJumpToPageDropdown\"\r\n [showJumpToPageInput]=\"showJumpToPageInput\"\r\n [showPageLinks]=\"showPageLinks\"\r\n [styleClass]=\"getPaginatorStyleClasses('cax-paginator-top')\"\r\n [locale]=\"paginatorLocale\"\r\n >\r\n <ng-template caxTemplate=\"dropdownicon\" *ngIf=\"paginatorDropdownIconTemplate\">\r\n <ng-container *ngTemplateOutlet=\"paginatorDropdownIconTemplate\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template caxTemplate=\"firstpagelinkicon\" *ngIf=\"paginatorFirstPageLinkIconTemplate\">\r\n <ng-container *ngTemplateOutlet=\"paginatorFirstPageLinkIconTemplate\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template caxTemplate=\"previouspagelinkicon\" *ngIf=\"paginatorPreviousPageLinkIconTemplate\">\r\n <ng-container *ngTemplateOutlet=\"paginatorPreviousPageLinkIconTemplate\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template caxTemplate=\"lastpagelinkicon\" *ngIf=\"paginatorLastPageLinkIconTemplate\">\r\n <ng-container *ngTemplateOutlet=\"paginatorLastPageLinkIconTemplate\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template caxTemplate=\"nextpagelinkicon\" *ngIf=\"paginatorNextPageLinkIconTemplate\">\r\n <ng-container *ngTemplateOutlet=\"paginatorNextPageLinkIconTemplate\"></ng-container>\r\n </ng-template>\r\n </cax-paginator>\r\n\r\n <div #wrapper class=\"cax-datatable-wrapper\" [ngStyle]=\"{ maxHeight: virtualScroll ? '' : scrollHeight }\">\r\n <cax-scroller\r\n #scroller\r\n *ngIf=\"virtualScroll\"\r\n [items]=\"processedData\"\r\n [columns]=\"columns\"\r\n [style]=\"{ height: scrollHeight !== 'flex' ? scrollHeight : undefined }\"\r\n [scrollHeight]=\"scrollHeight !== 'flex' ? undefined : '100%'\"\r\n [itemSize]=\"virtualScrollItemSize || _virtualRowHeight\"\r\n [step]=\"rows\"\r\n [delay]=\"lazy ? virtualScrollDelay : 0\"\r\n [inline]=\"true\"\r\n [autoSize]=\"true\"\r\n [lazy]=\"lazy\"\r\n (onLazyLoad)=\"onLazyItemLoad($event)\"\r\n [loaderDisabled]=\"true\"\r\n [showSpacer]=\"false\"\r\n [showLoader]=\"loadingBodyTemplate\"\r\n [options]=\"virtualScrollOptions\"\r\n >\r\n <ng-template caxTemplate=\"content\" let-items let-scrollerOptions=\"options\">\r\n <ng-container *ngTemplateOutlet=\"buildInTable; context: { $implicit: items, options: scrollerOptions }\"></ng-container>\r\n </ng-template>\r\n </cax-scroller>\r\n <ng-container *ngIf=\"!virtualScroll\">\r\n <ng-container *ngTemplateOutlet=\"buildInTable; context: { $implicit: processedData, options: { columns } }\"></ng-container>\r\n </ng-container>\r\n\r\n <ng-template #buildInTable let-items let-scrollerOptions=\"options\">\r\n <table\r\n #table\r\n role=\"table\"\r\n [ngClass]=\"{ 'cax-datatable-table': true, 'cax-datatable-scrollable-table': scrollable, 'cax-datatable-resizable-table': resizableColumns, 'cax-datatable-resizable-table-fit': resizableColumns && columnResizeMode === 'fit' }\"\r\n [class]=\"tableStyleClass\"\r\n [ngStyle]=\"tableStyle\"\r\n [attr.id]=\"id + '-table'\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"colGroupTemplate; context: { $implicit: scrollerOptions.columns }\"></ng-container>\r\n <thead role=\"rowgroup\" #thead class=\"cax-datatable-thead\">\r\n <ng-container *ngTemplateOutlet=\"headerGroupedTemplate || headerTemplate; context: { $implicit: scrollerOptions.columns }\"></ng-container>\r\n </thead>\r\n <tbody\r\n role=\"rowgroup\"\r\n class=\"cax-datatable-tbody cax-datatable-frozen-tbody\"\r\n *ngIf=\"frozenValue || frozenBodyTemplate\"\r\n [value]=\"frozenValue\"\r\n [frozenRows]=\"true\"\r\n [caxTableBody]=\"scrollerOptions.columns\"\r\n [caxTableBodyTemplate]=\"frozenBodyTemplate\"\r\n [frozen]=\"true\"\r\n ></tbody>\r\n <tbody\r\n role=\"rowgroup\"\r\n class=\"cax-datatable-tbody\"\r\n [ngClass]=\"scrollerOptions.contentStyleClass\"\r\n [ngStyle]=\"scrollerOptions.contentStyle\"\r\n [value]=\"dataToRender(scrollerOptions.rows)\"\r\n [caxTableBody]=\"scrollerOptions.columns\"\r\n [caxTableBodyTemplate]=\"bodyTemplate\"\r\n [scrollerOptions]=\"scrollerOptions\"\r\n ></tbody>\r\n <tbody\r\n role=\"rowgroup\"\r\n *ngIf=\"scrollerOptions.spacerStyle\"\r\n [ngStyle]=\"{ height: 'calc(' + scrollerOptions.spacerStyle.height + ' - ' + scrollerOptions.rows.length * scrollerOptions.itemSize + 'px)' }\"\r\n class=\"cax-datatable-scroller-spacer\"\r\n ></tbody>\r\n <tfoot role=\"rowgroup\" *ngIf=\"footerGroupedTemplate || footerTemplate\" #tfoot class=\"cax-datatable-tfoot\">\r\n <ng-container *ngTemplateOutlet=\"footerGroupedTemplate || footerTemplate; context: { $implicit: scrollerOptions.columns }\"></ng-container>\r\n </tfoot>\r\n </table>\r\n </ng-template>\r\n </div>\r\n\r\n <cax-paginator\r\n [rows]=\"rows\"\r\n [first]=\"first\"\r\n [totalRecords]=\"totalRecords\"\r\n [pageLinkSize]=\"pageLinks\"\r\n [alwaysShow]=\"alwaysShowPaginator\"\r\n (onPageChange)=\"onPageChange($event)\"\r\n [rowsPerPageOptions]=\"rowsPerPageOptions\"\r\n *ngIf=\"paginator && (paginatorPosition === 'bottom' || paginatorPosition == 'both')\"\r\n [templateLeft]=\"paginatorLeftTemplate\"\r\n [templateRight]=\"paginatorRightTemplate\"\r\n [dropdownAppendTo]=\"paginatorDropdownAppendTo\"\r\n [dropdownScrollHeight]=\"paginatorDropdownScrollHeight\"\r\n [currentPageReportTemplate]=\"currentPageReportTemplate\"\r\n [showFirstLastIcon]=\"showFirstLastIcon\"\r\n [dropdownItemTemplate]=\"paginatorDropdownItemTemplate\"\r\n [showCurrentPageReport]=\"showCurrentPageReport\"\r\n [showJumpToPageDropdown]=\"showJumpToPageDropdown\"\r\n [showJumpToPageInput]=\"showJumpToPageInput\"\r\n [showPageLinks]=\"showPageLinks\"\r\n [styleClass]=\"getPaginatorStyleClasses('cax-paginator-bottom')\"\r\n [locale]=\"paginatorLocale\"\r\n >\r\n <ng-template caxTemplate=\"dropdownicon\" *ngIf=\"paginatorDropdownIconTemplate\">\r\n <ng-container *ngTemplateOutlet=\"paginatorDropdownIconTemplate\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template caxTemplate=\"firstpagelinkicon\" *ngIf=\"paginatorFirstPageLinkIconTemplate\">\r\n <ng-container *ngTemplateOutlet=\"paginatorFirstPageLinkIconTemplate\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template caxTemplate=\"previouspagelinkicon\" *ngIf=\"paginatorPreviousPageLinkIconTemplate\">\r\n <ng-container *ngTemplateOutlet=\"paginatorPreviousPageLinkIconTemplate\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template caxTemplate=\"lastpagelinkicon\" *ngIf=\"paginatorLastPageLinkIconTemplate\">\r\n <ng-container *ngTemplateOutlet=\"paginatorLastPageLinkIconTemplate\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template caxTemplate=\"nextpagelinkicon\" *ngIf=\"paginatorNextPageLinkIconTemplate\">\r\n <ng-container *ngTemplateOutlet=\"paginatorNextPageLinkIconTemplate\"></ng-container>\r\n </ng-template>\r\n </cax-paginator>\r\n\r\n <div *ngIf=\"summaryTemplate\" class=\"cax-datatable-footer\">\r\n <ng-container *ngTemplateOutlet=\"summaryTemplate\"></ng-container>\r\n </div>\r\n\r\n <div\r\n #resizeHelper\r\n class=\"cax-column-resizer-helper\"\r\n [ngStyle]=\"{\r\n display: 'none'\r\n }\"\r\n *ngIf=\"resizableColumns\"\r\n ></div>\r\n <span\r\n #reorderIndicatorUp\r\n class=\"cax-datatable-reorder-indicator-up\"\r\n [ngStyle]=\"{\r\n display: 'none'\r\n }\"\r\n *ngIf=\"reorderableColumns\"\r\n >\r\n <ArrowDownIcon *ngIf=\"!reorderIndicatorUpIconTemplate\" />\r\n <ng-template *ngTemplateOutlet=\"reorderIndicatorUpIconTemplate\"></ng-template>\r\n </span>\r\n <span\r\n #reorderIndicatorDown\r\n class=\"cax-datatable-reorder-indicator-down\"\r\n [ngStyle]=\"{\r\n display: 'none'\r\n }\"\r\n *ngIf=\"reorderableColumns\"\r\n >\r\n <ArrowUpIcon *ngIf=\"!reorderIndicatorDownIconTemplate\" />\r\n <ng-template *ngTemplateOutlet=\"reorderIndicatorDownIconTemplate\"></ng-template>\r\n </span>\r\n</div>\r\n", styles: ["@layer cax{.cax-datatable{position:relative}.cax-datatable>.cax-datatable-wrapper{overflow:auto;border-radius:12px}.cax-datatable-wrapper::-webkit-scrollbar{width:8px;height:8px}.cax-datatable-wrapper::-webkit-scrollbar-track{background:#f0f0f0;border-radius:10px}.cax-datatable-wrapper::-webkit-scrollbar-thumb{background:#888;border-radius:10px}.cax-datatable-table{border-spacing:0px;width:100%}.cax-datatable .cax-sortable-column{-webkit-user-select:none;user-select:none}.cax-datatable .cax-sortable-column .cax-column-title,.cax-datatable .cax-sortable-column .cax-sortable-column-icon,.cax-datatable .cax-sortable-column .cax-sortable-column-badge{vertical-align:middle}.cax-datatable .cax-sortable-column .cax-icon-wrapper{display:inline}.cax-datatable .cax-sortable-column .cax-sortable-column-badge{display:inline-flex;align-items:center;justify-content:center}.cax-datatable-hoverable-rows .cax-selectable-row{cursor:pointer}.cax-datatable-scrollable>.cax-datatable-wrapper{position:relative}.cax-datatable-scrollable-table>.cax-datatable-thead{position:sticky;top:0;z-index:2}.cax-datatable-scrollable-table>.cax-datatable-frozen-tbody{position:sticky;z-index:1}.cax-datatable-scrollable-table>.cax-datatable-tfoot{position:sticky;bottom:0;z-index:1}.cax-datatable-scrollable .cax-frozen-column{position:sticky;z-index:1}.cax-datatable-scrollable th.cax-frozen-column{z-index:2;background:var(--neutral-75)}.cax-datatable-scrollable td.cax-frozen-column{z-index:1;background:transparent;-webkit-backdrop-filter:blur(80px);backdrop-filter:blur(80px)}.cax-datatable-flex-scrollable{display:flex;flex-direction:column;height:100%}.cax-datatable-flex-scrollable>.cax-datatable-wrapper{display:flex;flex-direction:column;flex:1;height:100%}.cax-datatable-scrollable-table>.cax-datatable-tbody>.cax-rowgroucax-header{position:sticky;z-index:2}.cax-datatable-resizable-table>.cax-datatable-thead>tr>th,.cax-datatable-resizable-table>.cax-datatable-tfoot>tr>td,.cax-datatable-resizable-table>.cax-datatable-tbody>tr>td{overflow:hidden;white-space:nowrap}.cax-datatable-resizable-table>.cax-datatable-thead>tr>th.cax-resizable-column:not(.cax-frozen-column){background-clip:padding-box;position:relative}.cax-datatable-resizable-table-fit>.cax-datatable-thead>tr>th.cax-resizable-column:last-child .cax-column-resizer{display:none}.cax-datatable .cax-column-resizer{display:block;position:absolute!important;top:0;right:0;margin:0;width:.5rem;height:100%;padding:0;cursor:col-resize;border:1px solid transparent}.cax-datatable .cax-column-resizer-helper{width:1px;position:absolute;z-index:10;display:none}.cax-datatable .cax-row-editor-init,.cax-datatable .cax-row-editor-save,.cax-datatable .cax-row-editor-cancel,.cax-datatable .cax-row-toggler{display:inline-flex;align-items:center;justify-content:center;overflow:hidden;position:relative}.cax-datatable-reorder-indicator-up,.cax-datatable-reorder-indicator-down{position:absolute}.cax-datatable-reorderablerow-handle,[caxReorderableColumn]{cursor:move}.cax-datatable .cax-datatable-loading-overlay{position:absolute;display:flex;align-items:center;justify-content:center;z-index:3}.cax-column-filter-row{display:flex;align-items:center;width:100%}.cax-column-filter-row i{font-size:20px}.cax-column-filter-menu,.cax-column-filter-custom{display:inline-flex;position:relative;float:right}.cax-column-filter-menu i,.cax-column-filter-custom i{font-size:20px}.cax-column-filter-custom-container{padding:16px;display:flex;gap:16px;flex-direction:column}.cax-column-filter-custom-container .cax-column-filter-custom-buttons{display:flex;gap:12px}.cax-column-filter-custom-container .cax-column-filter-custom-buttons cax-button{flex:1}.cax-column-filter-overlay-custom{width:248px}.cax-column-filter-row cax-columnfilterformelement{flex:1 1 auto;width:1%}.cax-column-filter-menu-button,.cax-column-filter-clear-button{display:inline-flex;justify-content:center;align-items:center;cursor:pointer;text-decoration:none;overflow:hidden;position:relative}.cax-column-filter-overlay{position:absolute;top:0;left:0}.cax-column-filter-row-items{margin:0;padding:0;list-style:none}.cax-column-filter-row-item{cursor:pointer}.cax-column-filter-add-button,.cax-column-filter-remove-button{justify-content:center}.cax-column-filter-add-button .cax-button-label,.cax-column-filter-remove-button .cax-button-label{flex-grow:0}.cax-column-filter-buttonbar{display:flex;align-items:center;justify-content:space-between;gap:12px}.cax-column-filter-buttonbar .cax-button{width:auto}.cax-datatable-tbody>tr>td>.cax-column-title{display:none}.cax-datatable-scroller-spacer{display:flex}.cax-datatable .cax-scroller .cax-scroller-loading{transform:none!important;min-height:0;position:sticky;top:0;left:0}}.cax-datatable .cax-editable-column .cax-inputtext{width:100%;box-shadow:none;border:0;padding:0;line-height:normal}.cax-datatable.cax-datatable-font-sm .cax-datatable-tbody>tr>td{font-size:12px}.cax-datatable.cax-datatable-font-sm .cax-datatable-tbody>tr>td .cax-inputtext{font-size:12px}.cax-datatable.cax-datatable-font-sm .cax-datatable-tbody>tr>td cax-tablecheckbox .cax-checkbox .cax-checkbox-box{width:16px;height:16px}.cax-datatable.cax-datatable-font-md .cax-datatable-tbody>tr>td{font-size:14px}.cax-datatable.cax-datatable-font-md .cax-datatable-tbody>tr>td .cax-inputtext{font-size:14px}.cax-datatable.cax-datatable-font-md .cax-datatable-tbody>tr>td cax-tablecheckbox .cax-checkbox .cax-checkbox-box{width:18px;height:18px}.cax-datatable.cax-datatable-font-lg .cax-datatable-tbody>tr>td{font-size:16px}.cax-datatable.cax-datatable-font-lg .cax-datatable-tbody>tr>td .cax-inputtext{font-size:16px}.cax-datatable.cax-datatable-font-lg .cax-datatable-tbody>tr>td cax-tablecheckbox.cax-checkbox .cax-checkbox-box{width:20px;height:20px}.cax-datatable.cax-datatable-font-xl .cax-datatable-tbody>tr>td{font-size:18px}.cax-datatable.cax-datatable-font-xl .cax-datatable-tbody>tr>td .cax-inputtext{font-size:18px}.cax-datatable.cax-datatable-font-xl .cax-datatable-tbody>tr>td cax-tablecheckbox.cax-checkbox .cax-checkbox-box{width:22px;height:22px}.cax-datatable.cax-datatable-font-sm.cax-datatable-row-sm .cax-datatable-tbody>tr>td{height:42px}.cax-datatable.cax-datatable-font-sm.cax-datatable-row-md .cax-datatable-tbody>tr>td{height:56px}.cax-datatable.cax-datatable-font-sm.cax-datatable-row-lg .cax-datatable-tbody>tr>td{height:72px}.cax-datatable.cax-datatable-font-sm.cax-datatable-row-xl .cax-datatable-tbody>tr>td{height:88px}.cax-datatable.cax-datatable-font-md.cax-datatable-row-sm .cax-datatable-tbody>tr>td{height:44px}.cax-datatable.cax-datatable-font-md.cax-datatable-row-md .cax-datatable-tbody>tr>td{height:60px}.cax-datatable.cax-datatable-font-md.cax-datatable-row-lg .cax-datatable-tbody>tr>td{height:78px}.cax-datatable.cax-datatable-font-md.cax-datatable-row-xl .cax-datatable-tbody>tr>td{height:96px}.cax-datatable.cax-datatable-font-lg.cax-datatable-row-sm .cax-datatable-tbody>tr>td{height:54px}.cax-datatable.cax-datatable-font-lg.cax-datatable-row-md .cax-datatable-tbody>tr>td{height:66px}.cax-datatable.cax-datatable-font-lg.cax-datatable-row-lg .cax-datatable-tbody>tr>td{height:86px}.cax-datatable.cax-datatable-font-lg.cax-datatable-row-xl .cax-datatable-tbody>tr>td{height:108px}.cax-datatable.cax-datatable-font-xl.cax-datatable-row-sm .cax-datatable-tbody>tr>td{height:56px}.cax-datatable.cax-datatable-font-xl.cax-datatable-row-md .cax-datatable-tbody>tr>td{height:70px}.cax-datatable.cax-datatable-font-xl.cax-datatable-row-lg .cax-datatable-tbody>tr>td{height:94px}.cax-datatable.cax-datatable-font-xl.cax-datatable-row-xl .cax-datatable-tbody>tr>td{height:116px}.cax-cell-highlight-default{border:1px solid var(--primary-500)!important}.cax-cell-highlight-error{border:1px solid var(--error-600)!important}.cax-cell-background-error{background:var(--error-50)}.cax-sort-icon-button{border:0;width:28px;height:28px;display:flex;background:transparent;cursor:pointer;padding:0;align-items:center;justify-content:center}.cax-sort-icon-button i{font-size:20px}cax-sorticon{float:right;margin-left:8px}\n"] }]
|
|
2714
|
+
}, template: "<div #container [ngStyle]=\"style\" [class]=\"styleClass\" [ngClass]=\"getTableClasses()\" [attr.id]=\"id\">\r\n <div class=\"cax-datatable-loading-overlay cax-component-overlay\" *ngIf=\"loading && showLoader\">\r\n <i *ngIf=\"loadingIcon\" [class]=\"'cax-datatable-loading-icon ' + loadingIcon\"></i>\r\n <ng-container *ngIf=\"!loadingIcon\">\r\n <SpinnerIcon *ngIf=\"!loadingIconTemplate\" [spin]=\"true\" [styleClass]=\"'cax-datatable-loading-icon'\" />\r\n <span *ngIf=\"loadingIconTemplate\" class=\"cax-datatable-loading-icon\">\r\n <ng-template *ngTemplateOutlet=\"loadingIconTemplate\"></ng-template>\r\n </span>\r\n </ng-container>\r\n </div>\r\n <div *ngIf=\"captionTemplate\" class=\"cax-datatable-header\">\r\n <ng-container *ngTemplateOutlet=\"captionTemplate\"></ng-container>\r\n </div>\r\n <cax-paginator\r\n [rows]=\"rows\"\r\n [first]=\"first\"\r\n [totalRecords]=\"totalRecords\"\r\n [pageLinkSize]=\"pageLinks\"\r\n [alwaysShow]=\"alwaysShowPaginator\"\r\n (onPageChange)=\"onPageChange($event)\"\r\n [rowsPerPageOptions]=\"rowsPerPageOptions\"\r\n *ngIf=\"paginator && (paginatorPosition === 'top' || paginatorPosition == 'both')\"\r\n [templateLeft]=\"paginatorLeftTemplate\"\r\n [templateRight]=\"paginatorRightTemplate\"\r\n [dropdownAppendTo]=\"paginatorDropdownAppendTo\"\r\n [dropdownScrollHeight]=\"paginatorDropdownScrollHeight\"\r\n [currentPageReportTemplate]=\"currentPageReportTemplate\"\r\n [showFirstLastIcon]=\"showFirstLastIcon\"\r\n [dropdownItemTemplate]=\"paginatorDropdownItemTemplate\"\r\n [showCurrentPageReport]=\"showCurrentPageReport\"\r\n [showJumpToPageDropdown]=\"showJumpToPageDropdown\"\r\n [showJumpToPageInput]=\"showJumpToPageInput\"\r\n [showPageLinks]=\"showPageLinks\"\r\n [styleClass]=\"getPaginatorStyleClasses('cax-paginator-top')\"\r\n [locale]=\"paginatorLocale\"\r\n >\r\n <ng-template caxTemplate=\"dropdownicon\" *ngIf=\"paginatorDropdownIconTemplate\">\r\n <ng-container *ngTemplateOutlet=\"paginatorDropdownIconTemplate\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template caxTemplate=\"firstpagelinkicon\" *ngIf=\"paginatorFirstPageLinkIconTemplate\">\r\n <ng-container *ngTemplateOutlet=\"paginatorFirstPageLinkIconTemplate\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template caxTemplate=\"previouspagelinkicon\" *ngIf=\"paginatorPreviousPageLinkIconTemplate\">\r\n <ng-container *ngTemplateOutlet=\"paginatorPreviousPageLinkIconTemplate\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template caxTemplate=\"lastpagelinkicon\" *ngIf=\"paginatorLastPageLinkIconTemplate\">\r\n <ng-container *ngTemplateOutlet=\"paginatorLastPageLinkIconTemplate\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template caxTemplate=\"nextpagelinkicon\" *ngIf=\"paginatorNextPageLinkIconTemplate\">\r\n <ng-container *ngTemplateOutlet=\"paginatorNextPageLinkIconTemplate\"></ng-container>\r\n </ng-template>\r\n </cax-paginator>\r\n\r\n <div #wrapper class=\"cax-datatable-wrapper\" [ngStyle]=\"{ maxHeight: virtualScroll ? '' : scrollHeight }\">\r\n <cax-scroller\r\n #scroller\r\n *ngIf=\"virtualScroll\"\r\n [items]=\"processedData\"\r\n [columns]=\"columns\"\r\n [style]=\"{ height: scrollHeight !== 'flex' ? scrollHeight : undefined }\"\r\n [scrollHeight]=\"scrollHeight !== 'flex' ? undefined : '100%'\"\r\n [itemSize]=\"virtualScrollItemSize || _virtualRowHeight\"\r\n [step]=\"rows\"\r\n [delay]=\"lazy ? virtualScrollDelay : 0\"\r\n [inline]=\"true\"\r\n [autoSize]=\"true\"\r\n [lazy]=\"lazy\"\r\n (onLazyLoad)=\"onLazyItemLoad($event)\"\r\n [loaderDisabled]=\"true\"\r\n [showSpacer]=\"false\"\r\n [showLoader]=\"loadingBodyTemplate\"\r\n [options]=\"virtualScrollOptions\"\r\n >\r\n <ng-template caxTemplate=\"content\" let-items let-scrollerOptions=\"options\">\r\n <ng-container *ngTemplateOutlet=\"buildInTable; context: { $implicit: items, options: scrollerOptions }\"></ng-container>\r\n </ng-template>\r\n </cax-scroller>\r\n <ng-container *ngIf=\"!virtualScroll\">\r\n <ng-container *ngTemplateOutlet=\"buildInTable; context: { $implicit: processedData, options: { columns } }\"></ng-container>\r\n </ng-container>\r\n\r\n <ng-template #buildInTable let-items let-scrollerOptions=\"options\">\r\n <table\r\n #table\r\n role=\"table\"\r\n [ngClass]=\"{ 'cax-datatable-table': true, 'cax-datatable-scrollable-table': scrollable, 'cax-datatable-resizable-table': resizableColumns, 'cax-datatable-resizable-table-fit': resizableColumns && columnResizeMode === 'fit' }\"\r\n [class]=\"tableStyleClass\"\r\n [ngStyle]=\"tableStyle\"\r\n [attr.id]=\"id + '-table'\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"colGroupTemplate; context: { $implicit: scrollerOptions.columns }\"></ng-container>\r\n <thead role=\"rowgroup\" #thead class=\"cax-datatable-thead\">\r\n <ng-container *ngTemplateOutlet=\"headerGroupedTemplate || headerTemplate; context: { $implicit: scrollerOptions.columns }\"></ng-container>\r\n </thead>\r\n <tbody\r\n role=\"rowgroup\"\r\n class=\"cax-datatable-tbody cax-datatable-frozen-tbody\"\r\n *ngIf=\"frozenValue || frozenBodyTemplate\"\r\n [value]=\"frozenValue\"\r\n [frozenRows]=\"true\"\r\n [caxTableBody]=\"scrollerOptions.columns\"\r\n [caxTableBodyTemplate]=\"frozenBodyTemplate\"\r\n [frozen]=\"true\"\r\n ></tbody>\r\n <tbody\r\n role=\"rowgroup\"\r\n class=\"cax-datatable-tbody\"\r\n [ngClass]=\"scrollerOptions.contentStyleClass\"\r\n [ngStyle]=\"scrollerOptions.contentStyle\"\r\n [value]=\"dataToRender(scrollerOptions.rows)\"\r\n [caxTableBody]=\"scrollerOptions.columns\"\r\n [caxTableBodyTemplate]=\"bodyTemplate\"\r\n [scrollerOptions]=\"scrollerOptions\"\r\n ></tbody>\r\n <tbody\r\n role=\"rowgroup\"\r\n *ngIf=\"scrollerOptions.spacerStyle\"\r\n [ngStyle]=\"{ height: 'calc(' + scrollerOptions.spacerStyle.height + ' - ' + scrollerOptions.rows.length * scrollerOptions.itemSize + 'px)' }\"\r\n class=\"cax-datatable-scroller-spacer\"\r\n ></tbody>\r\n <tfoot role=\"rowgroup\" *ngIf=\"footerGroupedTemplate || footerTemplate\" #tfoot class=\"cax-datatable-tfoot\">\r\n <ng-container *ngTemplateOutlet=\"footerGroupedTemplate || footerTemplate; context: { $implicit: scrollerOptions.columns }\"></ng-container>\r\n </tfoot>\r\n </table>\r\n </ng-template>\r\n </div>\r\n\r\n <cax-paginator\r\n [rows]=\"rows\"\r\n [first]=\"first\"\r\n [totalRecords]=\"totalRecords\"\r\n [pageLinkSize]=\"pageLinks\"\r\n [alwaysShow]=\"alwaysShowPaginator\"\r\n (onPageChange)=\"onPageChange($event)\"\r\n [rowsPerPageOptions]=\"rowsPerPageOptions\"\r\n *ngIf=\"paginator && (paginatorPosition === 'bottom' || paginatorPosition == 'both')\"\r\n [templateLeft]=\"paginatorLeftTemplate\"\r\n [templateRight]=\"paginatorRightTemplate\"\r\n [dropdownAppendTo]=\"paginatorDropdownAppendTo\"\r\n [dropdownScrollHeight]=\"paginatorDropdownScrollHeight\"\r\n [currentPageReportTemplate]=\"currentPageReportTemplate\"\r\n [showFirstLastIcon]=\"showFirstLastIcon\"\r\n [dropdownItemTemplate]=\"paginatorDropdownItemTemplate\"\r\n [showCurrentPageReport]=\"showCurrentPageReport\"\r\n [showJumpToPageDropdown]=\"showJumpToPageDropdown\"\r\n [showJumpToPageInput]=\"showJumpToPageInput\"\r\n [showPageLinks]=\"showPageLinks\"\r\n [styleClass]=\"getPaginatorStyleClasses('cax-paginator-bottom')\"\r\n [locale]=\"paginatorLocale\"\r\n >\r\n <ng-template caxTemplate=\"dropdownicon\" *ngIf=\"paginatorDropdownIconTemplate\">\r\n <ng-container *ngTemplateOutlet=\"paginatorDropdownIconTemplate\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template caxTemplate=\"firstpagelinkicon\" *ngIf=\"paginatorFirstPageLinkIconTemplate\">\r\n <ng-container *ngTemplateOutlet=\"paginatorFirstPageLinkIconTemplate\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template caxTemplate=\"previouspagelinkicon\" *ngIf=\"paginatorPreviousPageLinkIconTemplate\">\r\n <ng-container *ngTemplateOutlet=\"paginatorPreviousPageLinkIconTemplate\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template caxTemplate=\"lastpagelinkicon\" *ngIf=\"paginatorLastPageLinkIconTemplate\">\r\n <ng-container *ngTemplateOutlet=\"paginatorLastPageLinkIconTemplate\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template caxTemplate=\"nextpagelinkicon\" *ngIf=\"paginatorNextPageLinkIconTemplate\">\r\n <ng-container *ngTemplateOutlet=\"paginatorNextPageLinkIconTemplate\"></ng-container>\r\n </ng-template>\r\n </cax-paginator>\r\n\r\n <div *ngIf=\"summaryTemplate\" class=\"cax-datatable-footer\">\r\n <ng-container *ngTemplateOutlet=\"summaryTemplate\"></ng-container>\r\n </div>\r\n\r\n <div\r\n #resizeHelper\r\n class=\"cax-column-resizer-helper\"\r\n [ngStyle]=\"{\r\n display: 'none'\r\n }\"\r\n *ngIf=\"resizableColumns\"\r\n ></div>\r\n <span\r\n #reorderIndicatorUp\r\n class=\"cax-datatable-reorder-indicator-up\"\r\n [ngStyle]=\"{\r\n display: 'none'\r\n }\"\r\n *ngIf=\"reorderableColumns\"\r\n >\r\n <ArrowDownIcon *ngIf=\"!reorderIndicatorUpIconTemplate\" />\r\n <ng-template *ngTemplateOutlet=\"reorderIndicatorUpIconTemplate\"></ng-template>\r\n </span>\r\n <span\r\n #reorderIndicatorDown\r\n class=\"cax-datatable-reorder-indicator-down\"\r\n [ngStyle]=\"{\r\n display: 'none'\r\n }\"\r\n *ngIf=\"reorderableColumns\"\r\n >\r\n <ArrowUpIcon *ngIf=\"!reorderIndicatorDownIconTemplate\" />\r\n <ng-template *ngTemplateOutlet=\"reorderIndicatorDownIconTemplate\"></ng-template>\r\n </span>\r\n</div>\r\n", styles: ["@layer cax{.cax-datatable{position:relative}.cax-datatable>.cax-datatable-wrapper{overflow:auto;border-radius:12px}.cax-datatable-wrapper::-webkit-scrollbar{width:8px;height:8px}.cax-datatable-wrapper::-webkit-scrollbar-track{background:#f0f0f0;border-radius:10px}.cax-datatable-wrapper::-webkit-scrollbar-thumb{background:#888;border-radius:10px}.cax-datatable-table{border-spacing:0px;width:100%}.cax-datatable .cax-sortable-column{-webkit-user-select:none;user-select:none}.cax-datatable .cax-sortable-column .cax-column-title,.cax-datatable .cax-sortable-column .cax-sortable-column-icon,.cax-datatable .cax-sortable-column .cax-sortable-column-badge{vertical-align:middle}.cax-datatable .cax-sortable-column .cax-icon-wrapper{display:inline}.cax-datatable .cax-sortable-column .cax-sortable-column-badge{display:inline-flex;align-items:center;justify-content:center}.cax-datatable-hoverable-rows .cax-selectable-row{cursor:pointer}.cax-datatable-scrollable>.cax-datatable-wrapper{position:relative}.cax-datatable-scrollable-table>.cax-datatable-thead{position:sticky;top:0;z-index:2}.cax-datatable-scrollable-table>.cax-datatable-frozen-tbody{position:sticky;z-index:1}.cax-datatable-scrollable-table>.cax-datatable-tfoot{position:sticky;bottom:0;z-index:1}.cax-datatable-scrollable .cax-frozen-column{position:sticky;z-index:1}.cax-datatable-scrollable th.cax-frozen-column{z-index:2;background:var(--neutral-75)}.cax-datatable-scrollable td.cax-frozen-column{z-index:1;background:transparent;-webkit-backdrop-filter:blur(80px);backdrop-filter:blur(80px)}.cax-datatable-flex-scrollable{display:flex;flex-direction:column;height:100%}.cax-datatable-flex-scrollable>.cax-datatable-wrapper{display:flex;flex-direction:column;flex:1;height:100%}.cax-datatable-scrollable-table>.cax-datatable-tbody>.cax-rowgroucax-header{position:sticky;z-index:2}.cax-datatable-resizable-table>.cax-datatable-thead>tr>th,.cax-datatable-resizable-table>.cax-datatable-tfoot>tr>td,.cax-datatable-resizable-table>.cax-datatable-tbody>tr>td{overflow:hidden;white-space:nowrap}.cax-datatable-resizable-table>.cax-datatable-thead>tr>th.cax-resizable-column:not(.cax-frozen-column){background-clip:padding-box;position:relative}.cax-datatable-resizable-table-fit>.cax-datatable-thead>tr>th.cax-resizable-column:last-child .cax-column-resizer{display:none}.cax-datatable .cax-column-resizer{display:block;position:absolute!important;top:0;right:0;margin:0;width:.5rem;height:100%;padding:0;cursor:col-resize;border:1px solid transparent}.cax-datatable .cax-column-resizer-helper{width:1px;position:absolute;z-index:10;display:none}.cax-datatable .cax-row-editor-init,.cax-datatable .cax-row-editor-save,.cax-datatable .cax-row-editor-cancel,.cax-datatable .cax-row-toggler{display:inline-flex;align-items:center;justify-content:center;overflow:hidden;position:relative}.cax-datatable-reorder-indicator-up,.cax-datatable-reorder-indicator-down{position:absolute}.cax-datatable-reorderablerow-handle,[caxReorderableColumn]{cursor:move}.cax-datatable .cax-datatable-loading-overlay{position:absolute;display:flex;align-items:center;justify-content:center;z-index:3}.cax-column-filter-row{display:flex;align-items:center;width:100%}.cax-column-filter-row i{font-size:20px}.cax-column-filter-menu,.cax-column-filter-custom{display:inline-flex;position:relative;float:right;margin-left:4px}.cax-column-filter-menu i,.cax-column-filter-custom i{font-size:20px}.cax-column-filter-custom-container{padding:16px;display:flex;gap:16px;flex-direction:column}.cax-column-filter-custom-container .cax-column-filter-custom-buttons{display:flex;gap:12px}.cax-column-filter-custom-container .cax-column-filter-custom-buttons cax-button{flex:1}.cax-column-filter-overlay-custom{width:248px}.cax-column-filter-row cax-columnfilterformelement{flex:1 1 auto;width:1%}.cax-column-filter-menu-button,.cax-column-filter-clear-button{display:inline-flex;justify-content:center;align-items:center;cursor:pointer;text-decoration:none;overflow:hidden;position:relative}.cax-column-filter-menu-button:disabled{opacity:.5}.cax-column-filter-overlay{position:absolute;top:0;left:0}.cax-column-filter-row-items{margin:0;padding:0;list-style:none}.cax-column-filter-row-item{cursor:pointer}.cax-column-filter-add-button,.cax-column-filter-remove-button{justify-content:center}.cax-column-filter-add-button .cax-button-label,.cax-column-filter-remove-button .cax-button-label{flex-grow:0}.cax-column-filter-buttonbar{display:flex;align-items:center;justify-content:space-between;gap:12px}.cax-column-filter-buttonbar .cax-button{width:auto}.cax-datatable-tbody>tr>td>.cax-column-title{display:none}.cax-datatable-scroller-spacer{display:flex}.cax-datatable .cax-scroller .cax-scroller-loading{transform:none!important;min-height:0;position:sticky;top:0;left:0}}.cax-datatable .cax-editable-column .cax-inputtext{width:100%;box-shadow:none;border:0;padding:0;line-height:normal}.cax-datatable.cax-datatable-font-sm .cax-datatable-tbody>tr>td{font-size:12px}.cax-datatable.cax-datatable-font-sm .cax-datatable-tbody>tr>td .cax-inputtext{font-size:12px}.cax-datatable.cax-datatable-font-sm .cax-datatable-tbody>tr>td cax-tablecheckbox .cax-checkbox .cax-checkbox-box{width:16px;height:16px}.cax-datatable.cax-datatable-font-md .cax-datatable-tbody>tr>td{font-size:14px}.cax-datatable.cax-datatable-font-md .cax-datatable-tbody>tr>td .cax-inputtext{font-size:14px}.cax-datatable.cax-datatable-font-md .cax-datatable-tbody>tr>td cax-tablecheckbox .cax-checkbox .cax-checkbox-box{width:18px;height:18px}.cax-datatable.cax-datatable-font-lg .cax-datatable-tbody>tr>td{font-size:16px}.cax-datatable.cax-datatable-font-lg .cax-datatable-tbody>tr>td .cax-inputtext{font-size:16px}.cax-datatable.cax-datatable-font-lg .cax-datatable-tbody>tr>td cax-tablecheckbox.cax-checkbox .cax-checkbox-box{width:20px;height:20px}.cax-datatable.cax-datatable-font-xl .cax-datatable-tbody>tr>td{font-size:18px}.cax-datatable.cax-datatable-font-xl .cax-datatable-tbody>tr>td .cax-inputtext{font-size:18px}.cax-datatable.cax-datatable-font-xl .cax-datatable-tbody>tr>td cax-tablecheckbox.cax-checkbox .cax-checkbox-box{width:22px;height:22px}.cax-datatable.cax-datatable-font-sm.cax-datatable-row-sm .cax-datatable-tbody>tr>td{height:42px}.cax-datatable.cax-datatable-font-sm.cax-datatable-row-md .cax-datatable-tbody>tr>td{height:56px}.cax-datatable.cax-datatable-font-sm.cax-datatable-row-lg .cax-datatable-tbody>tr>td{height:72px}.cax-datatable.cax-datatable-font-sm.cax-datatable-row-xl .cax-datatable-tbody>tr>td{height:88px}.cax-datatable.cax-datatable-font-md.cax-datatable-row-sm .cax-datatable-tbody>tr>td{height:44px}.cax-datatable.cax-datatable-font-md.cax-datatable-row-md .cax-datatable-tbody>tr>td{height:60px}.cax-datatable.cax-datatable-font-md.cax-datatable-row-lg .cax-datatable-tbody>tr>td{height:78px}.cax-datatable.cax-datatable-font-md.cax-datatable-row-xl .cax-datatable-tbody>tr>td{height:96px}.cax-datatable.cax-datatable-font-lg.cax-datatable-row-sm .cax-datatable-tbody>tr>td{height:54px}.cax-datatable.cax-datatable-font-lg.cax-datatable-row-md .cax-datatable-tbody>tr>td{height:66px}.cax-datatable.cax-datatable-font-lg.cax-datatable-row-lg .cax-datatable-tbody>tr>td{height:86px}.cax-datatable.cax-datatable-font-lg.cax-datatable-row-xl .cax-datatable-tbody>tr>td{height:108px}.cax-datatable.cax-datatable-font-xl.cax-datatable-row-sm .cax-datatable-tbody>tr>td{height:56px}.cax-datatable.cax-datatable-font-xl.cax-datatable-row-md .cax-datatable-tbody>tr>td{height:70px}.cax-datatable.cax-datatable-font-xl.cax-datatable-row-lg .cax-datatable-tbody>tr>td{height:94px}.cax-datatable.cax-datatable-font-xl.cax-datatable-row-xl .cax-datatable-tbody>tr>td{height:116px}.cax-cell-highlight-default{border:1px solid var(--primary-500)!important}.cax-cell-highlight-error{border:1px solid var(--error-600)!important}.cax-cell-background-error{background:var(--error-50)}.cax-sort-icon-button{border:0;width:28px;height:28px!important;display:flex;background:transparent;cursor:pointer;padding:0!important;align-items:center;justify-content:center}.cax-sort-icon-button i{font-size:20px}.cax-sort-icon-button:disabled{opacity:.5;cursor:context-menu}cax-sorticon{float:right;margin-left:4px}\n"] }]
|
|
2692
2715
|
}], ctorParameters: () => [{ type: Document, decorators: [{
|
|
2693
2716
|
type: Inject,
|
|
2694
2717
|
args: [DOCUMENT]
|
|
@@ -2750,6 +2773,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
|
|
|
2750
2773
|
}], defaultSortOrder: [{
|
|
2751
2774
|
type: Input,
|
|
2752
2775
|
args: [{ transform: numberAttribute }]
|
|
2776
|
+
}], filterType: [{
|
|
2777
|
+
type: Input
|
|
2778
|
+
}], sortType: [{
|
|
2779
|
+
type: Input
|
|
2753
2780
|
}], sortMode: [{
|
|
2754
2781
|
type: Input
|
|
2755
2782
|
}], resetPageOnSort: [{
|
|
@@ -3500,11 +3527,12 @@ class ColumnFilter {
|
|
|
3500
3527
|
* @group Props
|
|
3501
3528
|
*/
|
|
3502
3529
|
type = 'text';
|
|
3530
|
+
disabled = false;
|
|
3503
3531
|
/**
|
|
3504
3532
|
* Filter display.
|
|
3505
3533
|
* @group Props
|
|
3506
3534
|
*/
|
|
3507
|
-
display = '
|
|
3535
|
+
display = 'menu';
|
|
3508
3536
|
/**
|
|
3509
3537
|
* Decides whether to display filter menu popup.
|
|
3510
3538
|
* @group Props
|
|
@@ -3783,6 +3811,28 @@ class ColumnFilter {
|
|
|
3783
3811
|
if (!this.dt.filters[this.field]) {
|
|
3784
3812
|
this.initFieldFilterConstraint();
|
|
3785
3813
|
}
|
|
3814
|
+
if (this.dt.filters[this.field] && this.dt.filterType === 'custom') {
|
|
3815
|
+
let filterData = this.dt.filters[this.field];
|
|
3816
|
+
if (!Array.isArray(filterData)) {
|
|
3817
|
+
this.selectedCustomFilter = this.getSelectedFilter(filterData.matchMode);
|
|
3818
|
+
if (this.isCustomStringFilterSelected)
|
|
3819
|
+
this.customInputFilter = filterData.value;
|
|
3820
|
+
if (this.isCustomNumberFilterSelected) {
|
|
3821
|
+
if (this.selectedCustomFilter.key === 'gtlt') {
|
|
3822
|
+
this.customNumberFilter1 = filterData.value.gt;
|
|
3823
|
+
this.customNumberFilter2 = filterData.value.lt;
|
|
3824
|
+
}
|
|
3825
|
+
else {
|
|
3826
|
+
this.customNumberFilter1 = filterData.value;
|
|
3827
|
+
}
|
|
3828
|
+
}
|
|
3829
|
+
if (this.isCustomDateFilterSelected) {
|
|
3830
|
+
if (this.selectedCustomFilter.key !== 'today') {
|
|
3831
|
+
this.customDateFilter = new Date(filterData.value);
|
|
3832
|
+
}
|
|
3833
|
+
}
|
|
3834
|
+
}
|
|
3835
|
+
}
|
|
3786
3836
|
this.translationSubscription = this.config.translationObserver.subscribe(() => {
|
|
3787
3837
|
this.generateMatchModeOptions();
|
|
3788
3838
|
this.generateOperatorOptions();
|
|
@@ -3790,6 +3840,10 @@ class ColumnFilter {
|
|
|
3790
3840
|
this.generateMatchModeOptions();
|
|
3791
3841
|
this.generateOperatorOptions();
|
|
3792
3842
|
}
|
|
3843
|
+
getSelectedFilter(key) {
|
|
3844
|
+
const allOptions = [...this.commonFilterOptions, ...this.stringFilterOptions, ...this.numberFilterOptions, ...this.dateFilterOptions];
|
|
3845
|
+
return allOptions.find((option) => option.key === key);
|
|
3846
|
+
}
|
|
3793
3847
|
generateMatchModeOptions() {
|
|
3794
3848
|
this.matchModes =
|
|
3795
3849
|
this.matchModeOptions ||
|
|
@@ -3835,8 +3889,12 @@ class ColumnFilter {
|
|
|
3835
3889
|
}
|
|
3836
3890
|
initFieldFilterConstraint() {
|
|
3837
3891
|
let defaultMatchMode = this.getDefaultMatchMode();
|
|
3838
|
-
this.dt.
|
|
3839
|
-
this.
|
|
3892
|
+
if (this.dt.filterType === 'custom') {
|
|
3893
|
+
this.dt.filters[this.field] = { value: null, matchMode: null };
|
|
3894
|
+
}
|
|
3895
|
+
else {
|
|
3896
|
+
this.dt.filters[this.field] = this.display == 'row' ? { value: null, matchMode: defaultMatchMode } : [{ value: null, matchMode: defaultMatchMode, operator: this.operator }];
|
|
3897
|
+
}
|
|
3840
3898
|
}
|
|
3841
3899
|
onMenuMatchModeChange(value, filterMeta) {
|
|
3842
3900
|
filterMeta.matchMode = value;
|
|
@@ -4016,10 +4074,18 @@ class ColumnFilter {
|
|
|
4016
4074
|
hasFilter() {
|
|
4017
4075
|
let fieldFilter = this.dt.filters[this.field];
|
|
4018
4076
|
if (fieldFilter) {
|
|
4019
|
-
if (
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4077
|
+
if (this.dt.filterType === 'custom') {
|
|
4078
|
+
if (Array.isArray(fieldFilter))
|
|
4079
|
+
return false;
|
|
4080
|
+
else
|
|
4081
|
+
return fieldFilter.matchMode != null || undefined ? true : false;
|
|
4082
|
+
}
|
|
4083
|
+
else {
|
|
4084
|
+
if (Array.isArray(fieldFilter))
|
|
4085
|
+
return !this.dt.isFilterBlank(fieldFilter[0].value);
|
|
4086
|
+
else
|
|
4087
|
+
return !this.dt.isFilterBlank(fieldFilter.value);
|
|
4088
|
+
}
|
|
4023
4089
|
}
|
|
4024
4090
|
return false;
|
|
4025
4091
|
}
|
|
@@ -4184,17 +4250,17 @@ class ColumnFilter {
|
|
|
4184
4250
|
appliedFilters.value = this.customDateFilter;
|
|
4185
4251
|
}
|
|
4186
4252
|
this.dt.filters[this.field] = appliedFilters;
|
|
4187
|
-
this.dt._filter(
|
|
4253
|
+
this.dt._filter();
|
|
4188
4254
|
this.hide();
|
|
4189
4255
|
}
|
|
4190
4256
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: ColumnFilter, deps: [{ token: DOCUMENT }, { token: i0.ElementRef }, { token: Table }, { token: i0.Renderer2 }, { token: i2.caxConfig }, { token: i2.OverlayService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4191
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.2.9", type: ColumnFilter, isStandalone: true, selector: "cax-columnFilter", inputs: { field: "field", type: "type", display: "display", showMenu: ["showMenu", "showMenu", booleanAttribute], matchMode: "matchMode", operator: "operator", showOperator: ["showOperator", "showOperator", booleanAttribute], showClearButton: ["showClearButton", "showClearButton", booleanAttribute], showApplyButton: ["showApplyButton", "showApplyButton", booleanAttribute], showMatchModes: ["showMatchModes", "showMatchModes", booleanAttribute], showAddButton: ["showAddButton", "showAddButton", booleanAttribute], hideOnClear: ["hideOnClear", "hideOnClear", booleanAttribute], placeholder: "placeholder", matchModeOptions: "matchModeOptions", maxConstraints: ["maxConstraints", "maxConstraints", numberAttribute], minFractionDigits: ["minFractionDigits", "minFractionDigits", (value) => numberAttribute(value, null)], maxFractionDigits: ["maxFractionDigits", "maxFractionDigits", (value) => numberAttribute(value, null)], prefix: "prefix", suffix: "suffix", locale: "locale", localeMatcher: "localeMatcher", currency: "currency", currencyDisplay: "currencyDisplay", useGrouping: ["useGrouping", "useGrouping", booleanAttribute], showButtons: ["showButtons", "showButtons", booleanAttribute], ariaLabel: "ariaLabel" }, outputs: { onShow: "onShow", onHide: "onHide" }, host: { classAttribute: "cax-element" }, queries: [{ propertyName: "templates", predicate: CaxTemplate }], viewQueries: [{ propertyName: "icon", first: true, predicate: ["icon"], descendants: true }, { propertyName: "clearButtonViewChild", first: true, predicate: ["clearBtn"], descendants: true }], ngImport: i0, template: "<div class=\"cax-column-filter\" [ngClass]=\"{ 'cax-column-filter-row': display === 'row', 'cax-column-filter-menu': display === 'menu', 'cax-column-filter-custom': display === 'custom' }\">\r\n <cax-columnFilterFormElement\r\n *ngIf=\"display === 'row'\"\r\n class=\"cax-fluid\"\r\n [type]=\"type\"\r\n [field]=\"field\"\r\n [ariaLabel]=\"ariaLabel\"\r\n [filterConstraint]=\"dt.filters[field]\"\r\n [filterTemplate]=\"filterTemplate\"\r\n [placeholder]=\"placeholder\"\r\n [minFractionDigits]=\"minFractionDigits\"\r\n [maxFractionDigits]=\"maxFractionDigits\"\r\n [prefix]=\"prefix\"\r\n [suffix]=\"suffix\"\r\n [locale]=\"locale\"\r\n [localeMatcher]=\"localeMatcher\"\r\n [currency]=\"currency\"\r\n [currencyDisplay]=\"currencyDisplay\"\r\n [useGrouping]=\"useGrouping\"\r\n [showButtons]=\"showButtons\"\r\n ></cax-columnFilterFormElement>\r\n <button\r\n #icon\r\n *ngIf=\"showMenuButton\"\r\n type=\"button\"\r\n class=\"cax-column-filter-menu-button cax-link\"\r\n aria-haspopup=\"true\"\r\n [attr.aria-label]=\"filterMenuButtonAriaLabel\"\r\n [attr.aria-controls]=\"overlayVisible ? overlayId : null\"\r\n [attr.aria-expanded]=\"overlayVisible ?? false\"\r\n [ngClass]=\"{ 'cax-column-filter-menu-button-open': overlayVisible, 'cax-column-filter-menu-button-active': hasFilter() }\"\r\n (click)=\"toggleMenu()\"\r\n (keydown)=\"onToggleButtonKeyDown($event)\"\r\n >\r\n <i *ngIf=\"!filterIconTemplate\" [styleClass]=\"'pi-filter-icon'\" class=\"cax cax-filter\"></i>\r\n <span class=\"pi-filter-icon\" *ngIf=\"filterIconTemplate\">\r\n <ng-template *ngTemplateOutlet=\"filterIconTemplate\"></ng-template>\r\n </span>\r\n </button>\r\n <button #icon *ngIf=\"showClearButton && display === 'row'\" [ngClass]=\"{ 'cax-hidden-space': !hasRowFilter() }\" type=\"button\" class=\"cax-column-filter-clear-button cax-link\" (click)=\"clearFilter()\" [attr.aria-label]=\"clearButtonLabel\">\r\n <FilterSlashIcon *ngIf=\"!clearFilterIconTemplate\" />\r\n <ng-template *ngTemplateOutlet=\"clearFilterIconTemplate\"></ng-template>\r\n </button>\r\n <div\r\n *ngIf=\"showMenu && overlayVisible\"\r\n [ngClass]=\"{ 'cax-column-filter-overlay cax-component cax-fluid': true, 'cax-column-filter-overlay-menu': display === 'menu', 'cax-column-filter-overlay-custom': display === 'custom' }\"\r\n [id]=\"overlayId\"\r\n [attr.aria-modal]=\"true\"\r\n role=\"dialog\"\r\n (click)=\"onContentClick()\"\r\n [@overlayAnimation]=\"'visible'\"\r\n (@overlayAnimation.start)=\"onOverlayAnimationStart($event)\"\r\n (@overlayAnimation.done)=\"onOverlayAnimationEnd($event)\"\r\n (keydown.escape)=\"onEscape()\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"headerTemplate; context: { $implicit: field }\"></ng-container>\r\n <ul *ngIf=\"display === 'row'; else menu\" class=\"cax-column-filter-row-items\">\r\n <li\r\n class=\"cax-column-filter-row-item\"\r\n *ngFor=\"let matchMode of matchModes; let i = index\"\r\n (click)=\"onRowMatchModeChange(matchMode.value)\"\r\n (keydown)=\"onRowMatchModeKeyDown($event)\"\r\n (keydown.enter)=\"this.onRowMatchModeChange(matchMode.value)\"\r\n [ngClass]=\"{ 'cax-highlight': isRowMatchModeSelected(matchMode.value) }\"\r\n [attr.tabindex]=\"i === 0 ? '0' : null\"\r\n >\r\n {{ matchMode.label }}\r\n </li>\r\n <li class=\"cax-column-filter-separator\"></li>\r\n <li class=\"cax-column-filter-row-item\" (click)=\"onRowClearItemClick()\" (keydown)=\"onRowMatchModeKeyDown($event)\" (keydown.enter)=\"onRowClearItemClick()\">{{ noFilterLabel }}</li>\r\n </ul>\r\n <ng-template #menu>\r\n <ng-container *ngIf=\"display === 'menu'; else custom\">\r\n <div class=\"cax-column-filter-operator\" *ngIf=\"isShowOperator\">\r\n <cax-dropdown [options]=\"operatorOptions\" [ngModel]=\"operator\" (ngModelChange)=\"onOperatorChange($event)\" styleClass=\"cax-column-filter-operator-dropdown\"></cax-dropdown>\r\n </div>\r\n <div class=\"cax-column-filter-constraints\">\r\n <div *ngFor=\"let fieldConstraint of fieldConstraints; let i = index\" class=\"cax-column-filter-constraint\">\r\n <cax-dropdown\r\n *ngIf=\"showMatchModes && matchModes\"\r\n [options]=\"matchModes\"\r\n [ngModel]=\"fieldConstraint.matchMode\"\r\n (ngModelChange)=\"onMenuMatchModeChange($event, fieldConstraint)\"\r\n styleClass=\"cax-column-filter-matchmode-dropdown\"\r\n ></cax-dropdown>\r\n <cax-columnFilterFormElement\r\n [type]=\"type\"\r\n [field]=\"field\"\r\n [filterConstraint]=\"fieldConstraint\"\r\n [filterTemplate]=\"filterTemplate\"\r\n [placeholder]=\"placeholder\"\r\n [minFractionDigits]=\"minFractionDigits\"\r\n [maxFractionDigits]=\"maxFractionDigits\"\r\n [prefix]=\"prefix\"\r\n [suffix]=\"suffix\"\r\n [locale]=\"locale\"\r\n [localeMatcher]=\"localeMatcher\"\r\n [currency]=\"currency\"\r\n [currencyDisplay]=\"currencyDisplay\"\r\n [useGrouping]=\"useGrouping\"\r\n ></cax-columnFilterFormElement>\r\n <div>\r\n <button\r\n *ngIf=\"showRemoveIcon\"\r\n type=\"button\"\r\n caxButton\r\n class=\"cax-column-filter-remove-button cax-button-text cax-button-danger cax-button-sm\"\r\n (click)=\"removeConstraint(fieldConstraint)\"\r\n pRipple\r\n [attr.aria-label]=\"removeRuleButtonLabel\"\r\n [label]=\"removeRuleButtonLabel\"\r\n >\r\n <TrashIcon *ngIf=\"!removeRuleIconTemplate\" [styleClass]=\"'cax-button-icon-left'\" />\r\n <ng-template *ngTemplateOutlet=\"removeRuleIconTemplate\"></ng-template>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"cax-column-filter-add-rule\" *ngIf=\"isShowAddConstraint\">\r\n <button type=\"button\" caxButton [label]=\"addRuleButtonLabel\" [attr.aria-label]=\"addRuleButtonLabel\" class=\"cax-column-filter-add-button cax-button-text cax-button-sm\" (click)=\"addConstraint()\" pRipple>\r\n <PlusIcon *ngIf=\"!addRuleIconTemplate\" [styleClass]=\"'cax-button-icon-left'\" />\r\n <ng-template *ngTemplateOutlet=\"addRuleIconTemplate\"></ng-template>\r\n </button>\r\n </div>\r\n <div class=\"cax-column-filter-buttonbar\" *ngIf=\"showButtons\">\r\n <button\r\n #clearBtn\r\n *ngIf=\"showClearButton\"\r\n type=\"button\"\r\n caxButton\r\n class=\"cax-button-outlined cax-button-danger cax-button-sm\"\r\n (click)=\"clearFilter()\"\r\n [attr.aria-label]=\"clearButtonLabel\"\r\n [label]=\"clearButtonLabel\"\r\n pRipple\r\n ></button>\r\n <button *ngIf=\"showApplyButton\" type=\"button\" caxButton (click)=\"applyFilter()\" class=\"cax-button-sm\" [label]=\"applyButtonLabel\" pRipple [attr.aria-label]=\"applyButtonLabel\"></button>\r\n </div>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #custom>\r\n <div class=\"cax-column-filter-custom-container\">\r\n <div>\r\n <div class=\"cax-column-filter-custom-list-header\" (click)=\"toggleCustomFilterList()\">\r\n <span *ngIf=\"!selectedCustomFilter?.label?.length\">Select a condition</span>\r\n <div *ngIf=\"selectedCustomFilter\">{{ selectedCustomFilter.label }}</div>\r\n <i class=\"cax cax-alt-arrow-down\"></i>\r\n </div>\r\n <div class=\"cax-column-filter-custom-list\" *ngIf=\"customFilterListVisible\">\r\n <div class=\"cax-column-filter-custom-list-item\" *ngFor=\"let opt of commonFilterOptions\" (click)=\"selectCustomFilter(opt)\">\r\n <span>{{ opt.label }}</span>\r\n </div>\r\n <cax-divider [style]=\"{margin: 0}\"></cax-divider>\r\n <div class=\"cax-column-filter-custom-list-item\" *ngFor=\"let opt of stringFilterOptions\" (click)=\"selectCustomFilter(opt)\">\r\n <span>{{ opt.label }}</span>\r\n </div>\r\n <cax-divider [style]=\"{margin: 0}\"></cax-divider>\r\n <div class=\"cax-column-filter-custom-list-item\" *ngFor=\"let opt of numberFilterOptions\" (click)=\"selectCustomFilter(opt)\">\r\n <span>{{ opt.label }}</span>\r\n </div>\r\n <cax-divider [style]=\"{margin: 0}\"></cax-divider>\r\n <div class=\"cax-column-filter-custom-list-item\" *ngFor=\"let opt of dateFilterOptions\" (click)=\"selectCustomFilter(opt)\">\r\n <span>{{ opt.label }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"isCustomStringFilterSelected\">\r\n <cax-inputtext [(ngModel)]=\"customInputFilter\" [clearIcon]=\"false\"></cax-inputtext>\r\n </div>\r\n <div *ngIf=\"isCustomNumberFilterSelected\" style=\"display: flex; gap: 12px\">\r\n <cax-inputNumber [(ngModel)]=\"customNumberFilter1\"></cax-inputNumber>\r\n <cax-inputNumber [(ngModel)]=\"customNumberFilter2\" *ngIf=\"selectedCustomFilter.key === 'gtlt'\"></cax-inputNumber>\r\n </div>\r\n <div *ngIf=\"isCustomDateFilterSelected && selectedCustomFilter.key !== 'today'\">\r\n <cax-calendar [(ngModel)]=\"customDateFilter\" [showIcon]=\"true\" iconDisplay=\"input\"></cax-calendar>\r\n </div>\r\n <div class=\"cax-column-filter-custom-buttons\">\r\n <cax-button (click)=\"onClearCustomFilters()\" [disabled]=\"!selectedCustomFilter\" [label]=\"'Clear'\" [severity]=\"'danger'\" outlined=\"true\"></cax-button>\r\n <cax-button (click)=\"onApplyCustomFilters()\" [label]=\"'Apply'\"></cax-button>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-container *ngTemplateOutlet=\"footerTemplate; context: { $implicit: field }\"></ng-container>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: DropdownModule }, { kind: "component", type: i4$1.Dropdown, selector: "cax-dropdown", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "autoShowPanelOnPrintableCharacterKeyDown", "labelText", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i5$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i6$2.ButtonDirective, selector: "[caxButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "link"] }, { kind: "component", type: i6$2.Button, selector: "cax-button", inputs: ["type", "iconPos", "icon", "badge", "rightIcon", "leftIcon", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "style", "styleClass", "badgeClass", "ariaLabel", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: FilterSlashIcon, selector: "FilterSlashIcon" }, { kind: "component", type: PlusIcon, selector: "PlusIcon" }, { kind: "component", type: TrashIcon, selector: "TrashIcon" }, { kind: "component", type: ColumnFilterFormElement, selector: "cax-columnFilterFormElement", inputs: ["field", "type", "filterConstraint", "filterTemplate", "placeholder", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "locale", "localeMatcher", "currency", "currencyDisplay", "useGrouping", "ariaLabel"] }, { kind: "ngmodule", type: RadioButtonModule }, { kind: "ngmodule", type: DividerModule }, { kind: "component", type: i7$1.Divider, selector: "cax-divider", inputs: ["style", "styleClass", "layout", "type", "align"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "component", type: i4.InputTextComponent, selector: "cax-inputtext", inputs: ["value", "placeholder", "disabled", "maxlength", "successText", "errorText", "showLabel", "leftIcon", "rightIcon", "clearIcon", "label", "iconPath", "disabledIcon", "showIcon", "iconClass", "leftIconClass", "rightIconClass", "invalid", "required", "style", "size", "styleClass"], outputs: ["valueChange"] }, { kind: "ngmodule", type: InputNumberModule }, { kind: "component", type: i7.InputNumber, selector: "cax-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabelledBy", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "variant", "minFractionDigits", "maxFractionDigits", "prefixIcon", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "ngmodule", type: CalendarModule }, { kind: "component", type: i6$1.Calendar, selector: "cax-calendar", inputs: ["iconDisplay", "style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepYearPicker", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "leftIcon", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "variant", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale", "view", "defaultDate"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }], animations: [trigger('overlayAnimation', [transition(':enter', [style({ opacity: 0, transform: 'scaleY(0.8)' }), animate('.12s cubic-bezier(0, 0, 0.2, 1)')]), transition(':leave', [animate('.1s linear', style({ opacity: 0 }))])])], encapsulation: i0.ViewEncapsulation.None });
|
|
4257
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.2.9", type: ColumnFilter, isStandalone: true, selector: "cax-columnFilter", inputs: { field: "field", type: "type", disabled: "disabled", display: "display", showMenu: ["showMenu", "showMenu", booleanAttribute], matchMode: "matchMode", operator: "operator", showOperator: ["showOperator", "showOperator", booleanAttribute], showClearButton: ["showClearButton", "showClearButton", booleanAttribute], showApplyButton: ["showApplyButton", "showApplyButton", booleanAttribute], showMatchModes: ["showMatchModes", "showMatchModes", booleanAttribute], showAddButton: ["showAddButton", "showAddButton", booleanAttribute], hideOnClear: ["hideOnClear", "hideOnClear", booleanAttribute], placeholder: "placeholder", matchModeOptions: "matchModeOptions", maxConstraints: ["maxConstraints", "maxConstraints", numberAttribute], minFractionDigits: ["minFractionDigits", "minFractionDigits", (value) => numberAttribute(value, null)], maxFractionDigits: ["maxFractionDigits", "maxFractionDigits", (value) => numberAttribute(value, null)], prefix: "prefix", suffix: "suffix", locale: "locale", localeMatcher: "localeMatcher", currency: "currency", currencyDisplay: "currencyDisplay", useGrouping: ["useGrouping", "useGrouping", booleanAttribute], showButtons: ["showButtons", "showButtons", booleanAttribute], ariaLabel: "ariaLabel" }, outputs: { onShow: "onShow", onHide: "onHide" }, host: { classAttribute: "cax-element" }, queries: [{ propertyName: "templates", predicate: CaxTemplate }], viewQueries: [{ propertyName: "icon", first: true, predicate: ["icon"], descendants: true }, { propertyName: "clearButtonViewChild", first: true, predicate: ["clearBtn"], descendants: true }], ngImport: i0, template: "<div\r\n class=\"cax-column-filter\"\r\n [ngClass]=\"{ 'cax-column-filter-row': display === 'row' && dt.filterType === 'default', 'cax-column-filter-menu': display === 'menu' && dt.filterType === 'default', 'cax-column-filter-custom': dt.filterType === 'custom' }\"\r\n>\r\n <cax-columnFilterFormElement\r\n *ngIf=\"display === 'row' && dt.filterType === 'default'\"\r\n class=\"cax-fluid\"\r\n [type]=\"type\"\r\n [field]=\"field\"\r\n [ariaLabel]=\"ariaLabel\"\r\n [filterConstraint]=\"dt.filters[field]\"\r\n [filterTemplate]=\"filterTemplate\"\r\n [placeholder]=\"placeholder\"\r\n [minFractionDigits]=\"minFractionDigits\"\r\n [maxFractionDigits]=\"maxFractionDigits\"\r\n [prefix]=\"prefix\"\r\n [suffix]=\"suffix\"\r\n [locale]=\"locale\"\r\n [localeMatcher]=\"localeMatcher\"\r\n [currency]=\"currency\"\r\n [currencyDisplay]=\"currencyDisplay\"\r\n [useGrouping]=\"useGrouping\"\r\n [showButtons]=\"showButtons\"\r\n ></cax-columnFilterFormElement>\r\n <button\r\n #icon\r\n *ngIf=\"showMenuButton\"\r\n type=\"button\"\r\n class=\"cax-column-filter-menu-button cax-link\"\r\n aria-haspopup=\"true\"\r\n [attr.aria-label]=\"filterMenuButtonAriaLabel\"\r\n [attr.aria-controls]=\"overlayVisible ? overlayId : null\"\r\n [attr.aria-expanded]=\"overlayVisible ?? false\"\r\n [disabled]=\"disabled\"\r\n [ngClass]=\"{ 'cax-column-filter-menu-button-open': overlayVisible, 'cax-column-filter-menu-button-active': hasFilter() }\"\r\n (click)=\"toggleMenu()\"\r\n (keydown)=\"onToggleButtonKeyDown($event)\"\r\n >\r\n <i *ngIf=\"!filterIconTemplate\" [styleClass]=\"'pi-filter-icon'\" class=\"cax cax-filter\"></i>\r\n <span class=\"pi-filter-icon\" *ngIf=\"filterIconTemplate\">\r\n <ng-template *ngTemplateOutlet=\"filterIconTemplate\"></ng-template>\r\n </span>\r\n </button>\r\n <button\r\n #icon\r\n *ngIf=\"showClearButton && display === 'row' && dt.filterType === 'default'\"\r\n [ngClass]=\"{ 'cax-hidden-space': !hasRowFilter() }\"\r\n type=\"button\"\r\n class=\"cax-column-filter-clear-button cax-link\"\r\n (click)=\"clearFilter()\"\r\n [attr.aria-label]=\"clearButtonLabel\"\r\n >\r\n <FilterSlashIcon *ngIf=\"!clearFilterIconTemplate\" />\r\n <ng-template *ngTemplateOutlet=\"clearFilterIconTemplate\"></ng-template>\r\n </button>\r\n <div\r\n *ngIf=\"showMenu && overlayVisible\"\r\n [ngClass]=\"{ 'cax-column-filter-overlay cax-component cax-fluid': true, 'cax-column-filter-overlay-menu': display === 'menu' && dt.filterType === 'default' , 'cax-column-filter-overlay-custom': dt.filterType === 'custom' }\"\r\n [id]=\"overlayId\"\r\n [attr.aria-modal]=\"true\"\r\n role=\"dialog\"\r\n (click)=\"onContentClick()\"\r\n [@overlayAnimation]=\"'visible'\"\r\n (@overlayAnimation.start)=\"onOverlayAnimationStart($event)\"\r\n (@overlayAnimation.done)=\"onOverlayAnimationEnd($event)\"\r\n (keydown.escape)=\"onEscape()\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"headerTemplate; context: { $implicit: field }\"></ng-container>\r\n <ul *ngIf=\"display === 'row' && dt.filterType === 'default'; else menu\" class=\"cax-column-filter-row-items\">\r\n <li\r\n class=\"cax-column-filter-row-item\"\r\n *ngFor=\"let matchMode of matchModes; let i = index\"\r\n (click)=\"onRowMatchModeChange(matchMode.value)\"\r\n (keydown)=\"onRowMatchModeKeyDown($event)\"\r\n (keydown.enter)=\"this.onRowMatchModeChange(matchMode.value)\"\r\n [ngClass]=\"{ 'cax-highlight': isRowMatchModeSelected(matchMode.value) }\"\r\n [attr.tabindex]=\"i === 0 ? '0' : null\"\r\n >\r\n {{ matchMode.label }}\r\n </li>\r\n <li class=\"cax-column-filter-separator\"></li>\r\n <li class=\"cax-column-filter-row-item\" (click)=\"onRowClearItemClick()\" (keydown)=\"onRowMatchModeKeyDown($event)\" (keydown.enter)=\"onRowClearItemClick()\">{{ noFilterLabel }}</li>\r\n </ul>\r\n <ng-template #menu>\r\n <ng-container *ngIf=\"display === 'menu' && dt.filterType === 'default'; else custom\">\r\n <div class=\"cax-column-filter-operator\" *ngIf=\"isShowOperator\">\r\n <cax-dropdown [options]=\"operatorOptions\" [ngModel]=\"operator\" (ngModelChange)=\"onOperatorChange($event)\" styleClass=\"cax-column-filter-operator-dropdown\"></cax-dropdown>\r\n </div>\r\n <div class=\"cax-column-filter-constraints\">\r\n <div *ngFor=\"let fieldConstraint of fieldConstraints; let i = index\" class=\"cax-column-filter-constraint\">\r\n <cax-dropdown\r\n *ngIf=\"showMatchModes && matchModes\"\r\n [options]=\"matchModes\"\r\n [ngModel]=\"fieldConstraint.matchMode\"\r\n (ngModelChange)=\"onMenuMatchModeChange($event, fieldConstraint)\"\r\n styleClass=\"cax-column-filter-matchmode-dropdown\"\r\n ></cax-dropdown>\r\n <cax-columnFilterFormElement\r\n [type]=\"type\"\r\n [field]=\"field\"\r\n [filterConstraint]=\"fieldConstraint\"\r\n [filterTemplate]=\"filterTemplate\"\r\n [placeholder]=\"placeholder\"\r\n [minFractionDigits]=\"minFractionDigits\"\r\n [maxFractionDigits]=\"maxFractionDigits\"\r\n [prefix]=\"prefix\"\r\n [suffix]=\"suffix\"\r\n [locale]=\"locale\"\r\n [localeMatcher]=\"localeMatcher\"\r\n [currency]=\"currency\"\r\n [currencyDisplay]=\"currencyDisplay\"\r\n [useGrouping]=\"useGrouping\"\r\n ></cax-columnFilterFormElement>\r\n <div>\r\n <button\r\n *ngIf=\"showRemoveIcon\"\r\n type=\"button\"\r\n caxButton\r\n class=\"cax-column-filter-remove-button cax-button-text cax-button-danger cax-button-sm\"\r\n (click)=\"removeConstraint(fieldConstraint)\"\r\n pRipple\r\n [attr.aria-label]=\"removeRuleButtonLabel\"\r\n [label]=\"removeRuleButtonLabel\"\r\n >\r\n <TrashIcon *ngIf=\"!removeRuleIconTemplate\" [styleClass]=\"'cax-button-icon-left'\" />\r\n <ng-template *ngTemplateOutlet=\"removeRuleIconTemplate\"></ng-template>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"cax-column-filter-add-rule\" *ngIf=\"isShowAddConstraint\">\r\n <button type=\"button\" caxButton [label]=\"addRuleButtonLabel\" [attr.aria-label]=\"addRuleButtonLabel\" class=\"cax-column-filter-add-button cax-button-text cax-button-sm\" (click)=\"addConstraint()\" pRipple>\r\n <PlusIcon *ngIf=\"!addRuleIconTemplate\" [styleClass]=\"'cax-button-icon-left'\" />\r\n <ng-template *ngTemplateOutlet=\"addRuleIconTemplate\"></ng-template>\r\n </button>\r\n </div>\r\n <div class=\"cax-column-filter-buttonbar\" *ngIf=\"showButtons\">\r\n <button\r\n #clearBtn\r\n *ngIf=\"showClearButton\"\r\n type=\"button\"\r\n caxButton\r\n class=\"cax-button-outlined cax-button-danger cax-button-sm\"\r\n (click)=\"clearFilter()\"\r\n [attr.aria-label]=\"clearButtonLabel\"\r\n [label]=\"clearButtonLabel\"\r\n pRipple\r\n ></button>\r\n <button *ngIf=\"showApplyButton\" type=\"button\" caxButton (click)=\"applyFilter()\" class=\"cax-button-sm\" [label]=\"applyButtonLabel\" pRipple [attr.aria-label]=\"applyButtonLabel\"></button>\r\n </div>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #custom>\r\n <div class=\"cax-column-filter-custom-container\">\r\n <div>\r\n <div class=\"cax-column-filter-custom-list-header\" (click)=\"toggleCustomFilterList()\">\r\n <span *ngIf=\"!selectedCustomFilter?.label?.length\">Select a condition</span>\r\n <div *ngIf=\"selectedCustomFilter\">{{ selectedCustomFilter.label }}</div>\r\n <i class=\"cax cax-alt-arrow-down\"></i>\r\n </div>\r\n <div class=\"cax-column-filter-custom-list\" *ngIf=\"customFilterListVisible\">\r\n <div class=\"cax-column-filter-custom-list-item\" *ngFor=\"let opt of commonFilterOptions\" (click)=\"selectCustomFilter(opt)\">\r\n <span>{{ opt.label }}</span>\r\n </div>\r\n <cax-divider [style]=\"{margin: 0}\"></cax-divider>\r\n <div class=\"cax-column-filter-custom-list-item\" *ngFor=\"let opt of stringFilterOptions\" (click)=\"selectCustomFilter(opt)\">\r\n <span>{{ opt.label }}</span>\r\n </div>\r\n <cax-divider [style]=\"{margin: 0}\"></cax-divider>\r\n <div class=\"cax-column-filter-custom-list-item\" *ngFor=\"let opt of numberFilterOptions\" (click)=\"selectCustomFilter(opt)\">\r\n <span>{{ opt.label }}</span>\r\n </div>\r\n <cax-divider [style]=\"{margin: 0}\"></cax-divider>\r\n <div class=\"cax-column-filter-custom-list-item\" *ngFor=\"let opt of dateFilterOptions\" (click)=\"selectCustomFilter(opt)\">\r\n <span>{{ opt.label }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"isCustomStringFilterSelected\">\r\n <cax-inputtext [(ngModel)]=\"customInputFilter\" [clearIcon]=\"false\"></cax-inputtext>\r\n </div>\r\n <div *ngIf=\"isCustomNumberFilterSelected\" style=\"display: flex; gap: 12px\">\r\n <cax-inputNumber [(ngModel)]=\"customNumberFilter1\"></cax-inputNumber>\r\n <cax-inputNumber [(ngModel)]=\"customNumberFilter2\" *ngIf=\"selectedCustomFilter.key === 'gtlt'\"></cax-inputNumber>\r\n </div>\r\n <div *ngIf=\"isCustomDateFilterSelected && selectedCustomFilter.key !== 'today'\">\r\n <cax-calendar [(ngModel)]=\"customDateFilter\" [showIcon]=\"true\" iconDisplay=\"input\"></cax-calendar>\r\n </div>\r\n <div class=\"cax-column-filter-custom-buttons\">\r\n <cax-button (click)=\"onClearCustomFilters()\" [disabled]=\"!selectedCustomFilter\" [label]=\"'Clear'\" [severity]=\"'danger'\" outlined=\"true\"></cax-button>\r\n <cax-button (click)=\"onApplyCustomFilters()\" [label]=\"'Apply'\"></cax-button>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-container *ngTemplateOutlet=\"footerTemplate; context: { $implicit: field }\"></ng-container>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: DropdownModule }, { kind: "component", type: i4$1.Dropdown, selector: "cax-dropdown", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "autoShowPanelOnPrintableCharacterKeyDown", "labelText", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i5$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i6$2.ButtonDirective, selector: "[caxButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "link"] }, { kind: "component", type: i6$2.Button, selector: "cax-button", inputs: ["type", "iconPos", "icon", "badge", "rightIcon", "leftIcon", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "style", "styleClass", "badgeClass", "ariaLabel", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: FilterSlashIcon, selector: "FilterSlashIcon" }, { kind: "component", type: PlusIcon, selector: "PlusIcon" }, { kind: "component", type: TrashIcon, selector: "TrashIcon" }, { kind: "component", type: ColumnFilterFormElement, selector: "cax-columnFilterFormElement", inputs: ["field", "type", "filterConstraint", "filterTemplate", "placeholder", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "locale", "localeMatcher", "currency", "currencyDisplay", "useGrouping", "ariaLabel"] }, { kind: "ngmodule", type: RadioButtonModule }, { kind: "ngmodule", type: DividerModule }, { kind: "component", type: i7$1.Divider, selector: "cax-divider", inputs: ["style", "styleClass", "layout", "type", "align"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "component", type: i4.InputTextComponent, selector: "cax-inputtext", inputs: ["value", "placeholder", "disabled", "maxlength", "successText", "errorText", "showLabel", "leftIcon", "rightIcon", "clearIcon", "label", "iconPath", "disabledIcon", "showIcon", "iconClass", "leftIconClass", "rightIconClass", "invalid", "required", "style", "size", "styleClass"], outputs: ["valueChange"] }, { kind: "ngmodule", type: InputNumberModule }, { kind: "component", type: i7.InputNumber, selector: "cax-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabelledBy", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "variant", "minFractionDigits", "maxFractionDigits", "prefixIcon", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "ngmodule", type: CalendarModule }, { kind: "component", type: i6$1.Calendar, selector: "cax-calendar", inputs: ["iconDisplay", "style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepYearPicker", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "leftIcon", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "variant", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale", "view", "defaultDate"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }], animations: [trigger('overlayAnimation', [transition(':enter', [style({ opacity: 0, transform: 'scaleY(0.8)' }), animate('.12s cubic-bezier(0, 0, 0.2, 1)')]), transition(':leave', [animate('.1s linear', style({ opacity: 0 }))])])], encapsulation: i0.ViewEncapsulation.None });
|
|
4192
4258
|
}
|
|
4193
4259
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: ColumnFilter, decorators: [{
|
|
4194
4260
|
type: Component,
|
|
4195
4261
|
args: [{ selector: 'cax-columnFilter', animations: [trigger('overlayAnimation', [transition(':enter', [style({ opacity: 0, transform: 'scaleY(0.8)' }), animate('.12s cubic-bezier(0, 0, 0.2, 1)')]), transition(':leave', [animate('.1s linear', style({ opacity: 0 }))])])], encapsulation: ViewEncapsulation.None, standalone: true, imports: [CommonModule, DropdownModule, FormsModule, ButtonModule, FilterSlashIcon, PlusIcon, TrashIcon, ColumnFilterFormElement, RadioButtonModule, DividerModule, InputTextModule, InputNumberModule, CalendarModule], host: {
|
|
4196
4262
|
class: 'cax-element'
|
|
4197
|
-
}, template: "<div class=\"cax-column-filter\" [ngClass]=\"{ 'cax-column-filter-row': display === 'row', 'cax-column-filter-menu': display === 'menu', 'cax-column-filter-custom': display === 'custom' }\">\r\n <cax-columnFilterFormElement\r\n *ngIf=\"display === 'row'\"\r\n class=\"cax-fluid\"\r\n [type]=\"type\"\r\n [field]=\"field\"\r\n [ariaLabel]=\"ariaLabel\"\r\n [filterConstraint]=\"dt.filters[field]\"\r\n [filterTemplate]=\"filterTemplate\"\r\n [placeholder]=\"placeholder\"\r\n [minFractionDigits]=\"minFractionDigits\"\r\n [maxFractionDigits]=\"maxFractionDigits\"\r\n [prefix]=\"prefix\"\r\n [suffix]=\"suffix\"\r\n [locale]=\"locale\"\r\n [localeMatcher]=\"localeMatcher\"\r\n [currency]=\"currency\"\r\n [currencyDisplay]=\"currencyDisplay\"\r\n [useGrouping]=\"useGrouping\"\r\n [showButtons]=\"showButtons\"\r\n ></cax-columnFilterFormElement>\r\n <button\r\n #icon\r\n *ngIf=\"showMenuButton\"\r\n type=\"button\"\r\n class=\"cax-column-filter-menu-button cax-link\"\r\n aria-haspopup=\"true\"\r\n [attr.aria-label]=\"filterMenuButtonAriaLabel\"\r\n [attr.aria-controls]=\"overlayVisible ? overlayId : null\"\r\n [attr.aria-expanded]=\"overlayVisible ?? false\"\r\n [ngClass]=\"{ 'cax-column-filter-menu-button-open': overlayVisible, 'cax-column-filter-menu-button-active': hasFilter() }\"\r\n (click)=\"toggleMenu()\"\r\n (keydown)=\"onToggleButtonKeyDown($event)\"\r\n >\r\n <i *ngIf=\"!filterIconTemplate\" [styleClass]=\"'pi-filter-icon'\" class=\"cax cax-filter\"></i>\r\n <span class=\"pi-filter-icon\" *ngIf=\"filterIconTemplate\">\r\n <ng-template *ngTemplateOutlet=\"filterIconTemplate\"></ng-template>\r\n </span>\r\n </button>\r\n <button #icon *ngIf=\"showClearButton && display === 'row'\" [ngClass]=\"{ 'cax-hidden-space': !hasRowFilter() }\" type=\"button\" class=\"cax-column-filter-clear-button cax-link\" (click)=\"clearFilter()\" [attr.aria-label]=\"clearButtonLabel\">\r\n <FilterSlashIcon *ngIf=\"!clearFilterIconTemplate\" />\r\n <ng-template *ngTemplateOutlet=\"clearFilterIconTemplate\"></ng-template>\r\n </button>\r\n <div\r\n *ngIf=\"showMenu && overlayVisible\"\r\n [ngClass]=\"{ 'cax-column-filter-overlay cax-component cax-fluid': true, 'cax-column-filter-overlay-menu': display === 'menu', 'cax-column-filter-overlay-custom': display === 'custom' }\"\r\n [id]=\"overlayId\"\r\n [attr.aria-modal]=\"true\"\r\n role=\"dialog\"\r\n (click)=\"onContentClick()\"\r\n [@overlayAnimation]=\"'visible'\"\r\n (@overlayAnimation.start)=\"onOverlayAnimationStart($event)\"\r\n (@overlayAnimation.done)=\"onOverlayAnimationEnd($event)\"\r\n (keydown.escape)=\"onEscape()\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"headerTemplate; context: { $implicit: field }\"></ng-container>\r\n <ul *ngIf=\"display === 'row'; else menu\" class=\"cax-column-filter-row-items\">\r\n <li\r\n class=\"cax-column-filter-row-item\"\r\n *ngFor=\"let matchMode of matchModes; let i = index\"\r\n (click)=\"onRowMatchModeChange(matchMode.value)\"\r\n (keydown)=\"onRowMatchModeKeyDown($event)\"\r\n (keydown.enter)=\"this.onRowMatchModeChange(matchMode.value)\"\r\n [ngClass]=\"{ 'cax-highlight': isRowMatchModeSelected(matchMode.value) }\"\r\n [attr.tabindex]=\"i === 0 ? '0' : null\"\r\n >\r\n {{ matchMode.label }}\r\n </li>\r\n <li class=\"cax-column-filter-separator\"></li>\r\n <li class=\"cax-column-filter-row-item\" (click)=\"onRowClearItemClick()\" (keydown)=\"onRowMatchModeKeyDown($event)\" (keydown.enter)=\"onRowClearItemClick()\">{{ noFilterLabel }}</li>\r\n </ul>\r\n <ng-template #menu>\r\n <ng-container *ngIf=\"display === 'menu'; else custom\">\r\n <div class=\"cax-column-filter-operator\" *ngIf=\"isShowOperator\">\r\n <cax-dropdown [options]=\"operatorOptions\" [ngModel]=\"operator\" (ngModelChange)=\"onOperatorChange($event)\" styleClass=\"cax-column-filter-operator-dropdown\"></cax-dropdown>\r\n </div>\r\n <div class=\"cax-column-filter-constraints\">\r\n <div *ngFor=\"let fieldConstraint of fieldConstraints; let i = index\" class=\"cax-column-filter-constraint\">\r\n <cax-dropdown\r\n *ngIf=\"showMatchModes && matchModes\"\r\n [options]=\"matchModes\"\r\n [ngModel]=\"fieldConstraint.matchMode\"\r\n (ngModelChange)=\"onMenuMatchModeChange($event, fieldConstraint)\"\r\n styleClass=\"cax-column-filter-matchmode-dropdown\"\r\n ></cax-dropdown>\r\n <cax-columnFilterFormElement\r\n [type]=\"type\"\r\n [field]=\"field\"\r\n [filterConstraint]=\"fieldConstraint\"\r\n [filterTemplate]=\"filterTemplate\"\r\n [placeholder]=\"placeholder\"\r\n [minFractionDigits]=\"minFractionDigits\"\r\n [maxFractionDigits]=\"maxFractionDigits\"\r\n [prefix]=\"prefix\"\r\n [suffix]=\"suffix\"\r\n [locale]=\"locale\"\r\n [localeMatcher]=\"localeMatcher\"\r\n [currency]=\"currency\"\r\n [currencyDisplay]=\"currencyDisplay\"\r\n [useGrouping]=\"useGrouping\"\r\n ></cax-columnFilterFormElement>\r\n <div>\r\n <button\r\n *ngIf=\"showRemoveIcon\"\r\n type=\"button\"\r\n caxButton\r\n class=\"cax-column-filter-remove-button cax-button-text cax-button-danger cax-button-sm\"\r\n (click)=\"removeConstraint(fieldConstraint)\"\r\n pRipple\r\n [attr.aria-label]=\"removeRuleButtonLabel\"\r\n [label]=\"removeRuleButtonLabel\"\r\n >\r\n <TrashIcon *ngIf=\"!removeRuleIconTemplate\" [styleClass]=\"'cax-button-icon-left'\" />\r\n <ng-template *ngTemplateOutlet=\"removeRuleIconTemplate\"></ng-template>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"cax-column-filter-add-rule\" *ngIf=\"isShowAddConstraint\">\r\n <button type=\"button\" caxButton [label]=\"addRuleButtonLabel\" [attr.aria-label]=\"addRuleButtonLabel\" class=\"cax-column-filter-add-button cax-button-text cax-button-sm\" (click)=\"addConstraint()\" pRipple>\r\n <PlusIcon *ngIf=\"!addRuleIconTemplate\" [styleClass]=\"'cax-button-icon-left'\" />\r\n <ng-template *ngTemplateOutlet=\"addRuleIconTemplate\"></ng-template>\r\n </button>\r\n </div>\r\n <div class=\"cax-column-filter-buttonbar\" *ngIf=\"showButtons\">\r\n <button\r\n #clearBtn\r\n *ngIf=\"showClearButton\"\r\n type=\"button\"\r\n caxButton\r\n class=\"cax-button-outlined cax-button-danger cax-button-sm\"\r\n (click)=\"clearFilter()\"\r\n [attr.aria-label]=\"clearButtonLabel\"\r\n [label]=\"clearButtonLabel\"\r\n pRipple\r\n ></button>\r\n <button *ngIf=\"showApplyButton\" type=\"button\" caxButton (click)=\"applyFilter()\" class=\"cax-button-sm\" [label]=\"applyButtonLabel\" pRipple [attr.aria-label]=\"applyButtonLabel\"></button>\r\n </div>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #custom>\r\n <div class=\"cax-column-filter-custom-container\">\r\n <div>\r\n <div class=\"cax-column-filter-custom-list-header\" (click)=\"toggleCustomFilterList()\">\r\n <span *ngIf=\"!selectedCustomFilter?.label?.length\">Select a condition</span>\r\n <div *ngIf=\"selectedCustomFilter\">{{ selectedCustomFilter.label }}</div>\r\n <i class=\"cax cax-alt-arrow-down\"></i>\r\n </div>\r\n <div class=\"cax-column-filter-custom-list\" *ngIf=\"customFilterListVisible\">\r\n <div class=\"cax-column-filter-custom-list-item\" *ngFor=\"let opt of commonFilterOptions\" (click)=\"selectCustomFilter(opt)\">\r\n <span>{{ opt.label }}</span>\r\n </div>\r\n <cax-divider [style]=\"{margin: 0}\"></cax-divider>\r\n <div class=\"cax-column-filter-custom-list-item\" *ngFor=\"let opt of stringFilterOptions\" (click)=\"selectCustomFilter(opt)\">\r\n <span>{{ opt.label }}</span>\r\n </div>\r\n <cax-divider [style]=\"{margin: 0}\"></cax-divider>\r\n <div class=\"cax-column-filter-custom-list-item\" *ngFor=\"let opt of numberFilterOptions\" (click)=\"selectCustomFilter(opt)\">\r\n <span>{{ opt.label }}</span>\r\n </div>\r\n <cax-divider [style]=\"{margin: 0}\"></cax-divider>\r\n <div class=\"cax-column-filter-custom-list-item\" *ngFor=\"let opt of dateFilterOptions\" (click)=\"selectCustomFilter(opt)\">\r\n <span>{{ opt.label }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"isCustomStringFilterSelected\">\r\n <cax-inputtext [(ngModel)]=\"customInputFilter\" [clearIcon]=\"false\"></cax-inputtext>\r\n </div>\r\n <div *ngIf=\"isCustomNumberFilterSelected\" style=\"display: flex; gap: 12px\">\r\n <cax-inputNumber [(ngModel)]=\"customNumberFilter1\"></cax-inputNumber>\r\n <cax-inputNumber [(ngModel)]=\"customNumberFilter2\" *ngIf=\"selectedCustomFilter.key === 'gtlt'\"></cax-inputNumber>\r\n </div>\r\n <div *ngIf=\"isCustomDateFilterSelected && selectedCustomFilter.key !== 'today'\">\r\n <cax-calendar [(ngModel)]=\"customDateFilter\" [showIcon]=\"true\" iconDisplay=\"input\"></cax-calendar>\r\n </div>\r\n <div class=\"cax-column-filter-custom-buttons\">\r\n <cax-button (click)=\"onClearCustomFilters()\" [disabled]=\"!selectedCustomFilter\" [label]=\"'Clear'\" [severity]=\"'danger'\" outlined=\"true\"></cax-button>\r\n <cax-button (click)=\"onApplyCustomFilters()\" [label]=\"'Apply'\"></cax-button>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-container *ngTemplateOutlet=\"footerTemplate; context: { $implicit: field }\"></ng-container>\r\n </div>\r\n</div>\r\n" }]
|
|
4263
|
+
}, template: "<div\r\n class=\"cax-column-filter\"\r\n [ngClass]=\"{ 'cax-column-filter-row': display === 'row' && dt.filterType === 'default', 'cax-column-filter-menu': display === 'menu' && dt.filterType === 'default', 'cax-column-filter-custom': dt.filterType === 'custom' }\"\r\n>\r\n <cax-columnFilterFormElement\r\n *ngIf=\"display === 'row' && dt.filterType === 'default'\"\r\n class=\"cax-fluid\"\r\n [type]=\"type\"\r\n [field]=\"field\"\r\n [ariaLabel]=\"ariaLabel\"\r\n [filterConstraint]=\"dt.filters[field]\"\r\n [filterTemplate]=\"filterTemplate\"\r\n [placeholder]=\"placeholder\"\r\n [minFractionDigits]=\"minFractionDigits\"\r\n [maxFractionDigits]=\"maxFractionDigits\"\r\n [prefix]=\"prefix\"\r\n [suffix]=\"suffix\"\r\n [locale]=\"locale\"\r\n [localeMatcher]=\"localeMatcher\"\r\n [currency]=\"currency\"\r\n [currencyDisplay]=\"currencyDisplay\"\r\n [useGrouping]=\"useGrouping\"\r\n [showButtons]=\"showButtons\"\r\n ></cax-columnFilterFormElement>\r\n <button\r\n #icon\r\n *ngIf=\"showMenuButton\"\r\n type=\"button\"\r\n class=\"cax-column-filter-menu-button cax-link\"\r\n aria-haspopup=\"true\"\r\n [attr.aria-label]=\"filterMenuButtonAriaLabel\"\r\n [attr.aria-controls]=\"overlayVisible ? overlayId : null\"\r\n [attr.aria-expanded]=\"overlayVisible ?? false\"\r\n [disabled]=\"disabled\"\r\n [ngClass]=\"{ 'cax-column-filter-menu-button-open': overlayVisible, 'cax-column-filter-menu-button-active': hasFilter() }\"\r\n (click)=\"toggleMenu()\"\r\n (keydown)=\"onToggleButtonKeyDown($event)\"\r\n >\r\n <i *ngIf=\"!filterIconTemplate\" [styleClass]=\"'pi-filter-icon'\" class=\"cax cax-filter\"></i>\r\n <span class=\"pi-filter-icon\" *ngIf=\"filterIconTemplate\">\r\n <ng-template *ngTemplateOutlet=\"filterIconTemplate\"></ng-template>\r\n </span>\r\n </button>\r\n <button\r\n #icon\r\n *ngIf=\"showClearButton && display === 'row' && dt.filterType === 'default'\"\r\n [ngClass]=\"{ 'cax-hidden-space': !hasRowFilter() }\"\r\n type=\"button\"\r\n class=\"cax-column-filter-clear-button cax-link\"\r\n (click)=\"clearFilter()\"\r\n [attr.aria-label]=\"clearButtonLabel\"\r\n >\r\n <FilterSlashIcon *ngIf=\"!clearFilterIconTemplate\" />\r\n <ng-template *ngTemplateOutlet=\"clearFilterIconTemplate\"></ng-template>\r\n </button>\r\n <div\r\n *ngIf=\"showMenu && overlayVisible\"\r\n [ngClass]=\"{ 'cax-column-filter-overlay cax-component cax-fluid': true, 'cax-column-filter-overlay-menu': display === 'menu' && dt.filterType === 'default' , 'cax-column-filter-overlay-custom': dt.filterType === 'custom' }\"\r\n [id]=\"overlayId\"\r\n [attr.aria-modal]=\"true\"\r\n role=\"dialog\"\r\n (click)=\"onContentClick()\"\r\n [@overlayAnimation]=\"'visible'\"\r\n (@overlayAnimation.start)=\"onOverlayAnimationStart($event)\"\r\n (@overlayAnimation.done)=\"onOverlayAnimationEnd($event)\"\r\n (keydown.escape)=\"onEscape()\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"headerTemplate; context: { $implicit: field }\"></ng-container>\r\n <ul *ngIf=\"display === 'row' && dt.filterType === 'default'; else menu\" class=\"cax-column-filter-row-items\">\r\n <li\r\n class=\"cax-column-filter-row-item\"\r\n *ngFor=\"let matchMode of matchModes; let i = index\"\r\n (click)=\"onRowMatchModeChange(matchMode.value)\"\r\n (keydown)=\"onRowMatchModeKeyDown($event)\"\r\n (keydown.enter)=\"this.onRowMatchModeChange(matchMode.value)\"\r\n [ngClass]=\"{ 'cax-highlight': isRowMatchModeSelected(matchMode.value) }\"\r\n [attr.tabindex]=\"i === 0 ? '0' : null\"\r\n >\r\n {{ matchMode.label }}\r\n </li>\r\n <li class=\"cax-column-filter-separator\"></li>\r\n <li class=\"cax-column-filter-row-item\" (click)=\"onRowClearItemClick()\" (keydown)=\"onRowMatchModeKeyDown($event)\" (keydown.enter)=\"onRowClearItemClick()\">{{ noFilterLabel }}</li>\r\n </ul>\r\n <ng-template #menu>\r\n <ng-container *ngIf=\"display === 'menu' && dt.filterType === 'default'; else custom\">\r\n <div class=\"cax-column-filter-operator\" *ngIf=\"isShowOperator\">\r\n <cax-dropdown [options]=\"operatorOptions\" [ngModel]=\"operator\" (ngModelChange)=\"onOperatorChange($event)\" styleClass=\"cax-column-filter-operator-dropdown\"></cax-dropdown>\r\n </div>\r\n <div class=\"cax-column-filter-constraints\">\r\n <div *ngFor=\"let fieldConstraint of fieldConstraints; let i = index\" class=\"cax-column-filter-constraint\">\r\n <cax-dropdown\r\n *ngIf=\"showMatchModes && matchModes\"\r\n [options]=\"matchModes\"\r\n [ngModel]=\"fieldConstraint.matchMode\"\r\n (ngModelChange)=\"onMenuMatchModeChange($event, fieldConstraint)\"\r\n styleClass=\"cax-column-filter-matchmode-dropdown\"\r\n ></cax-dropdown>\r\n <cax-columnFilterFormElement\r\n [type]=\"type\"\r\n [field]=\"field\"\r\n [filterConstraint]=\"fieldConstraint\"\r\n [filterTemplate]=\"filterTemplate\"\r\n [placeholder]=\"placeholder\"\r\n [minFractionDigits]=\"minFractionDigits\"\r\n [maxFractionDigits]=\"maxFractionDigits\"\r\n [prefix]=\"prefix\"\r\n [suffix]=\"suffix\"\r\n [locale]=\"locale\"\r\n [localeMatcher]=\"localeMatcher\"\r\n [currency]=\"currency\"\r\n [currencyDisplay]=\"currencyDisplay\"\r\n [useGrouping]=\"useGrouping\"\r\n ></cax-columnFilterFormElement>\r\n <div>\r\n <button\r\n *ngIf=\"showRemoveIcon\"\r\n type=\"button\"\r\n caxButton\r\n class=\"cax-column-filter-remove-button cax-button-text cax-button-danger cax-button-sm\"\r\n (click)=\"removeConstraint(fieldConstraint)\"\r\n pRipple\r\n [attr.aria-label]=\"removeRuleButtonLabel\"\r\n [label]=\"removeRuleButtonLabel\"\r\n >\r\n <TrashIcon *ngIf=\"!removeRuleIconTemplate\" [styleClass]=\"'cax-button-icon-left'\" />\r\n <ng-template *ngTemplateOutlet=\"removeRuleIconTemplate\"></ng-template>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"cax-column-filter-add-rule\" *ngIf=\"isShowAddConstraint\">\r\n <button type=\"button\" caxButton [label]=\"addRuleButtonLabel\" [attr.aria-label]=\"addRuleButtonLabel\" class=\"cax-column-filter-add-button cax-button-text cax-button-sm\" (click)=\"addConstraint()\" pRipple>\r\n <PlusIcon *ngIf=\"!addRuleIconTemplate\" [styleClass]=\"'cax-button-icon-left'\" />\r\n <ng-template *ngTemplateOutlet=\"addRuleIconTemplate\"></ng-template>\r\n </button>\r\n </div>\r\n <div class=\"cax-column-filter-buttonbar\" *ngIf=\"showButtons\">\r\n <button\r\n #clearBtn\r\n *ngIf=\"showClearButton\"\r\n type=\"button\"\r\n caxButton\r\n class=\"cax-button-outlined cax-button-danger cax-button-sm\"\r\n (click)=\"clearFilter()\"\r\n [attr.aria-label]=\"clearButtonLabel\"\r\n [label]=\"clearButtonLabel\"\r\n pRipple\r\n ></button>\r\n <button *ngIf=\"showApplyButton\" type=\"button\" caxButton (click)=\"applyFilter()\" class=\"cax-button-sm\" [label]=\"applyButtonLabel\" pRipple [attr.aria-label]=\"applyButtonLabel\"></button>\r\n </div>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #custom>\r\n <div class=\"cax-column-filter-custom-container\">\r\n <div>\r\n <div class=\"cax-column-filter-custom-list-header\" (click)=\"toggleCustomFilterList()\">\r\n <span *ngIf=\"!selectedCustomFilter?.label?.length\">Select a condition</span>\r\n <div *ngIf=\"selectedCustomFilter\">{{ selectedCustomFilter.label }}</div>\r\n <i class=\"cax cax-alt-arrow-down\"></i>\r\n </div>\r\n <div class=\"cax-column-filter-custom-list\" *ngIf=\"customFilterListVisible\">\r\n <div class=\"cax-column-filter-custom-list-item\" *ngFor=\"let opt of commonFilterOptions\" (click)=\"selectCustomFilter(opt)\">\r\n <span>{{ opt.label }}</span>\r\n </div>\r\n <cax-divider [style]=\"{margin: 0}\"></cax-divider>\r\n <div class=\"cax-column-filter-custom-list-item\" *ngFor=\"let opt of stringFilterOptions\" (click)=\"selectCustomFilter(opt)\">\r\n <span>{{ opt.label }}</span>\r\n </div>\r\n <cax-divider [style]=\"{margin: 0}\"></cax-divider>\r\n <div class=\"cax-column-filter-custom-list-item\" *ngFor=\"let opt of numberFilterOptions\" (click)=\"selectCustomFilter(opt)\">\r\n <span>{{ opt.label }}</span>\r\n </div>\r\n <cax-divider [style]=\"{margin: 0}\"></cax-divider>\r\n <div class=\"cax-column-filter-custom-list-item\" *ngFor=\"let opt of dateFilterOptions\" (click)=\"selectCustomFilter(opt)\">\r\n <span>{{ opt.label }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"isCustomStringFilterSelected\">\r\n <cax-inputtext [(ngModel)]=\"customInputFilter\" [clearIcon]=\"false\"></cax-inputtext>\r\n </div>\r\n <div *ngIf=\"isCustomNumberFilterSelected\" style=\"display: flex; gap: 12px\">\r\n <cax-inputNumber [(ngModel)]=\"customNumberFilter1\"></cax-inputNumber>\r\n <cax-inputNumber [(ngModel)]=\"customNumberFilter2\" *ngIf=\"selectedCustomFilter.key === 'gtlt'\"></cax-inputNumber>\r\n </div>\r\n <div *ngIf=\"isCustomDateFilterSelected && selectedCustomFilter.key !== 'today'\">\r\n <cax-calendar [(ngModel)]=\"customDateFilter\" [showIcon]=\"true\" iconDisplay=\"input\"></cax-calendar>\r\n </div>\r\n <div class=\"cax-column-filter-custom-buttons\">\r\n <cax-button (click)=\"onClearCustomFilters()\" [disabled]=\"!selectedCustomFilter\" [label]=\"'Clear'\" [severity]=\"'danger'\" outlined=\"true\"></cax-button>\r\n <cax-button (click)=\"onApplyCustomFilters()\" [label]=\"'Apply'\"></cax-button>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-container *ngTemplateOutlet=\"footerTemplate; context: { $implicit: field }\"></ng-container>\r\n </div>\r\n</div>\r\n" }]
|
|
4198
4264
|
}], ctorParameters: () => [{ type: Document, decorators: [{
|
|
4199
4265
|
type: Inject,
|
|
4200
4266
|
args: [DOCUMENT]
|
|
@@ -4202,6 +4268,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
|
|
|
4202
4268
|
type: Input
|
|
4203
4269
|
}], type: [{
|
|
4204
4270
|
type: Input
|
|
4271
|
+
}], disabled: [{
|
|
4272
|
+
type: Input
|
|
4205
4273
|
}], display: [{
|
|
4206
4274
|
type: Input
|
|
4207
4275
|
}], showMenu: [{
|
|
@@ -4281,6 +4349,7 @@ class SortIcon {
|
|
|
4281
4349
|
dt;
|
|
4282
4350
|
cd;
|
|
4283
4351
|
field;
|
|
4352
|
+
disabled = false;
|
|
4284
4353
|
subscription;
|
|
4285
4354
|
sortOrder;
|
|
4286
4355
|
constructor(dt, cd) {
|
|
@@ -4304,9 +4373,6 @@ class SortIcon {
|
|
|
4304
4373
|
let sortMeta = this.dt.getSortMeta(this.field);
|
|
4305
4374
|
this.sortOrder = sortMeta ? sortMeta.order : 0;
|
|
4306
4375
|
}
|
|
4307
|
-
else if (this.dt.sortMode === 'custom') {
|
|
4308
|
-
this.sortOrder = this.dt.isSorted(this.field) ? this.dt.sortOrder : 0;
|
|
4309
|
-
}
|
|
4310
4376
|
this.cd.markForCheck();
|
|
4311
4377
|
}
|
|
4312
4378
|
getMultiSortMetaIndex() {
|
|
@@ -4336,15 +4402,17 @@ class SortIcon {
|
|
|
4336
4402
|
}
|
|
4337
4403
|
}
|
|
4338
4404
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: SortIcon, deps: [{ token: Table }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4339
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: SortIcon, isStandalone: true, selector: "cax-sortIcon", inputs: { field: "field" }, host: { classAttribute: "cax-element" }, ngImport: i0, template: "<ng-container *ngIf=\"!dt.sortIconTemplate\">\r\n <button class=\"cax-sort-icon-button\">\r\n
|
|
4405
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: SortIcon, isStandalone: true, selector: "cax-sortIcon", inputs: { field: "field", disabled: "disabled" }, host: { classAttribute: "cax-element" }, ngImport: i0, template: "<ng-container *ngIf=\"!dt.sortIconTemplate\">\r\n <ng-container *ngIf=\"isMultiSorted(); else noBadge\">\r\n <button [disabled]=\"disabled\" caxBadge [badgeSize]=\"'xs'\" [value]=\"getBadgeValue()\" class=\"cax-sort-icon-button\" [ngClass]=\"{ 'cax-sort-icon-button-active': sortOrder !== 0 }\">\r\n <i class=\"cax cax-sort-vertical\" [styleClass]=\"'cax-sortable-column-icon'\" *ngIf=\"sortOrder === 0\"></i>\r\n <i class=\"cax cax-sort-from-bottom-to-top\" style=\"color: var(--primary-color)\" [styleClass]=\"'cax-sortable-column-icon'\" *ngIf=\"sortOrder === 1\"></i>\r\n <i class=\"cax cax-sort-from-top-to-bottom\" style=\"color: var(--primary-color)\" [styleClass]=\"'cax-sortable-column-icon'\" *ngIf=\"sortOrder === -1\"></i>\r\n </button>\r\n </ng-container>\r\n <ng-template #noBadge>\r\n <button [disabled]=\"disabled\" class=\"cax-sort-icon-button\" [ngClass]=\"{ 'cax-sort-icon-button-active': sortOrder !== 0 }\">\r\n <i class=\"cax cax-sort-vertical\" [styleClass]=\"'cax-sortable-column-icon'\" *ngIf=\"sortOrder === 0\"></i>\r\n <i class=\"cax cax-sort-from-bottom-to-top\" style=\"color: var(--primary-color)\" [styleClass]=\"'cax-sortable-column-icon'\" *ngIf=\"sortOrder === 1\"></i>\r\n <i class=\"cax cax-sort-from-top-to-bottom\" style=\"color: var(--primary-color)\" [styleClass]=\"'cax-sortable-column-icon'\" *ngIf=\"sortOrder === -1\"></i>\r\n </button>\r\n </ng-template>\r\n</ng-container>\r\n<span *ngIf=\"dt.sortIconTemplate\" class=\"cax-sortable-column-icon\">\r\n <ng-template *ngTemplateOutlet=\"dt.sortIconTemplate; context: { $implicit: sortOrder }\"></ng-template>\r\n</span>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "ngmodule", type: BadgeModule }, { kind: "directive", type: i3$2.BadgeDirective, selector: "[caxBadge]", inputs: ["badgeDisabled", "badgeSize", "size", "caxBadge", "value", "badgeSeverity", "severity", "badgeStyle", "badgeStyleClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
4340
4406
|
}
|
|
4341
4407
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: SortIcon, decorators: [{
|
|
4342
4408
|
type: Component,
|
|
4343
|
-
args: [{ selector: 'cax-sortIcon', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: true, imports: [CommonModule], host: {
|
|
4409
|
+
args: [{ selector: 'cax-sortIcon', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: true, imports: [CommonModule, ButtonModule, BadgeModule], host: {
|
|
4344
4410
|
class: 'cax-element'
|
|
4345
|
-
}, template: "<ng-container *ngIf=\"!dt.sortIconTemplate\">\r\n <button class=\"cax-sort-icon-button\">\r\n
|
|
4411
|
+
}, template: "<ng-container *ngIf=\"!dt.sortIconTemplate\">\r\n <ng-container *ngIf=\"isMultiSorted(); else noBadge\">\r\n <button [disabled]=\"disabled\" caxBadge [badgeSize]=\"'xs'\" [value]=\"getBadgeValue()\" class=\"cax-sort-icon-button\" [ngClass]=\"{ 'cax-sort-icon-button-active': sortOrder !== 0 }\">\r\n <i class=\"cax cax-sort-vertical\" [styleClass]=\"'cax-sortable-column-icon'\" *ngIf=\"sortOrder === 0\"></i>\r\n <i class=\"cax cax-sort-from-bottom-to-top\" style=\"color: var(--primary-color)\" [styleClass]=\"'cax-sortable-column-icon'\" *ngIf=\"sortOrder === 1\"></i>\r\n <i class=\"cax cax-sort-from-top-to-bottom\" style=\"color: var(--primary-color)\" [styleClass]=\"'cax-sortable-column-icon'\" *ngIf=\"sortOrder === -1\"></i>\r\n </button>\r\n </ng-container>\r\n <ng-template #noBadge>\r\n <button [disabled]=\"disabled\" class=\"cax-sort-icon-button\" [ngClass]=\"{ 'cax-sort-icon-button-active': sortOrder !== 0 }\">\r\n <i class=\"cax cax-sort-vertical\" [styleClass]=\"'cax-sortable-column-icon'\" *ngIf=\"sortOrder === 0\"></i>\r\n <i class=\"cax cax-sort-from-bottom-to-top\" style=\"color: var(--primary-color)\" [styleClass]=\"'cax-sortable-column-icon'\" *ngIf=\"sortOrder === 1\"></i>\r\n <i class=\"cax cax-sort-from-top-to-bottom\" style=\"color: var(--primary-color)\" [styleClass]=\"'cax-sortable-column-icon'\" *ngIf=\"sortOrder === -1\"></i>\r\n </button>\r\n </ng-template>\r\n</ng-container>\r\n<span *ngIf=\"dt.sortIconTemplate\" class=\"cax-sortable-column-icon\">\r\n <ng-template *ngTemplateOutlet=\"dt.sortIconTemplate; context: { $implicit: sortOrder }\"></ng-template>\r\n</span>\r\n" }]
|
|
4346
4412
|
}], ctorParameters: () => [{ type: Table }, { type: i0.ChangeDetectorRef }], propDecorators: { field: [{
|
|
4347
4413
|
type: Input
|
|
4414
|
+
}], disabled: [{
|
|
4415
|
+
type: Input
|
|
4348
4416
|
}] } });
|
|
4349
4417
|
|
|
4350
4418
|
class TableCheckbox {
|