@colijnit/corecomponents_v12 258.1.6 → 258.1.7
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/bundles/colijnit-corecomponents_v12.umd.js +163 -57
- package/bundles/colijnit-corecomponents_v12.umd.js.map +1 -1
- package/colijnit-corecomponents_v12.d.ts +17 -16
- package/colijnit-corecomponents_v12.metadata.json +1 -1
- package/esm2015/colijnit-corecomponents_v12.js +18 -17
- package/esm2015/lib/components/simple-grid/simple-grid.component.js +158 -174
- package/esm2015/lib/service/excel-export.service.js +125 -0
- package/fesm2015/colijnit-corecomponents_v12.js +277 -171
- package/fesm2015/colijnit-corecomponents_v12.js.map +1 -1
- package/lib/components/simple-grid/simple-grid.component.d.ts +5 -6
- package/lib/components/simple-grid/style/_layout.scss +5 -8
- package/lib/service/excel-export.service.d.ts +44 -0
- package/package.json +1 -1
|
@@ -9475,12 +9475,135 @@ BaseSimpleGridComponent.propDecorators = {
|
|
|
9475
9475
|
handleMouseUp: [{ type: HostListener, args: ['document:mouseup', ['$event'],] }]
|
|
9476
9476
|
};
|
|
9477
9477
|
|
|
9478
|
+
class ExcelExportService {
|
|
9479
|
+
/**
|
|
9480
|
+
* Export data to Excel file
|
|
9481
|
+
* @param data - Array of objects to export
|
|
9482
|
+
* @param columns - Column configuration (optional)
|
|
9483
|
+
* @param fileName - Name of the exported file
|
|
9484
|
+
* @param sheetName - Name of the Excel sheet
|
|
9485
|
+
*/
|
|
9486
|
+
exportToExcel(data, columns, fileName = 'export', sheetName = 'Sheet1') {
|
|
9487
|
+
// If columns are specified, transform data to match column structure
|
|
9488
|
+
let exportData = data;
|
|
9489
|
+
if (columns && columns.length > 0) {
|
|
9490
|
+
exportData = data.map(item => {
|
|
9491
|
+
const newItem = {};
|
|
9492
|
+
columns.forEach(col => {
|
|
9493
|
+
newItem[col.header] = this.getNestedValue(item, col.key);
|
|
9494
|
+
});
|
|
9495
|
+
return newItem;
|
|
9496
|
+
});
|
|
9497
|
+
}
|
|
9498
|
+
// Create workbook and worksheet
|
|
9499
|
+
const wb = XLSX.utils.book_new();
|
|
9500
|
+
const ws = XLSX.utils.json_to_sheet(exportData);
|
|
9501
|
+
// Set column widths if specified
|
|
9502
|
+
if (columns && columns.some(col => col.width)) {
|
|
9503
|
+
const colWidths = columns.map(col => ({ wch: col.width || 20 }));
|
|
9504
|
+
ws['!cols'] = colWidths;
|
|
9505
|
+
}
|
|
9506
|
+
// Add worksheet to workbook
|
|
9507
|
+
XLSX.utils.book_append_sheet(wb, ws, sheetName);
|
|
9508
|
+
// Save file
|
|
9509
|
+
XLSX.writeFile(wb, `${fileName}.xlsx`);
|
|
9510
|
+
}
|
|
9511
|
+
/**
|
|
9512
|
+
* Export multiple sheets to one Excel file
|
|
9513
|
+
* @param sheets - Array of sheet data
|
|
9514
|
+
* @param fileName - Name of the exported file
|
|
9515
|
+
*/
|
|
9516
|
+
exportMultipleSheets(sheets, fileName = 'multi-sheet-export') {
|
|
9517
|
+
const wb = XLSX.utils.book_new();
|
|
9518
|
+
sheets.forEach(sheet => {
|
|
9519
|
+
let exportData = sheet.data;
|
|
9520
|
+
if (sheet.columns && sheet.columns.length > 0) {
|
|
9521
|
+
exportData = sheet.data.map(item => {
|
|
9522
|
+
const newItem = {};
|
|
9523
|
+
sheet.columns.forEach(col => {
|
|
9524
|
+
newItem[col.header] = this.getNestedValue(item, col.key);
|
|
9525
|
+
});
|
|
9526
|
+
return newItem;
|
|
9527
|
+
});
|
|
9528
|
+
}
|
|
9529
|
+
const ws = XLSX.utils.json_to_sheet(exportData);
|
|
9530
|
+
if (sheet.columns && sheet.columns.some(col => col.width)) {
|
|
9531
|
+
const colWidths = sheet.columns.map(col => ({ wch: col.width || 20 }));
|
|
9532
|
+
ws['!cols'] = colWidths;
|
|
9533
|
+
}
|
|
9534
|
+
XLSX.utils.book_append_sheet(wb, ws, sheet.sheetName);
|
|
9535
|
+
});
|
|
9536
|
+
XLSX.writeFile(wb, `${fileName}.xlsx`);
|
|
9537
|
+
}
|
|
9538
|
+
/**
|
|
9539
|
+
* Export HTML table to Excel
|
|
9540
|
+
* @param tableId - ID of the HTML table element
|
|
9541
|
+
* @param fileName - Name of the exported file
|
|
9542
|
+
* @param sheetName - Name of the Excel sheet
|
|
9543
|
+
*/
|
|
9544
|
+
exportTableToExcel(tableId, fileName = 'table-export', sheetName = 'Sheet1') {
|
|
9545
|
+
const table = document.getElementById(tableId);
|
|
9546
|
+
if (!table) {
|
|
9547
|
+
console.error(`Table with ID '${tableId}' not found`);
|
|
9548
|
+
return;
|
|
9549
|
+
}
|
|
9550
|
+
const wb = XLSX.utils.book_new();
|
|
9551
|
+
const ws = XLSX.utils.table_to_sheet(table);
|
|
9552
|
+
XLSX.utils.book_append_sheet(wb, ws, sheetName);
|
|
9553
|
+
XLSX.writeFile(wb, `${fileName}.xlsx`);
|
|
9554
|
+
}
|
|
9555
|
+
/**
|
|
9556
|
+
* Get nested object value using dot notation
|
|
9557
|
+
* @param obj - Object to search in
|
|
9558
|
+
* @param path - Dot notation path (e.g., 'user.address.city')
|
|
9559
|
+
*/
|
|
9560
|
+
getNestedValue(obj, path) {
|
|
9561
|
+
return path.split('.').reduce((current, key) => {
|
|
9562
|
+
return current && current[key] !== undefined ? current[key] : '';
|
|
9563
|
+
}, obj);
|
|
9564
|
+
}
|
|
9565
|
+
/**
|
|
9566
|
+
* Format date for Excel export
|
|
9567
|
+
* @param date - Date to format
|
|
9568
|
+
* @param format - Format string (default: 'MM/DD/YYYY')
|
|
9569
|
+
*/
|
|
9570
|
+
formatDateForExport(date, format = 'MM/DD/YYYY') {
|
|
9571
|
+
if (!date) {
|
|
9572
|
+
return '';
|
|
9573
|
+
}
|
|
9574
|
+
const d = new Date(date);
|
|
9575
|
+
if (isNaN(d.getTime())) {
|
|
9576
|
+
return '';
|
|
9577
|
+
}
|
|
9578
|
+
const month = (d.getMonth() + 1).toString().padStart(2, '0');
|
|
9579
|
+
const day = d.getDate().toString().padStart(2, '0');
|
|
9580
|
+
const year = d.getFullYear();
|
|
9581
|
+
switch (format) {
|
|
9582
|
+
case 'MM/DD/YYYY':
|
|
9583
|
+
return `${month}/${day}/${year}`;
|
|
9584
|
+
case 'DD/MM/YYYY':
|
|
9585
|
+
return `${day}/${month}/${year}`;
|
|
9586
|
+
case 'YYYY-MM-DD':
|
|
9587
|
+
return `${year}-${month}-${day}`;
|
|
9588
|
+
default:
|
|
9589
|
+
return d.toLocaleDateString();
|
|
9590
|
+
}
|
|
9591
|
+
}
|
|
9592
|
+
}
|
|
9593
|
+
ExcelExportService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ExcelExportService_Factory() { return new ExcelExportService(); }, token: ExcelExportService, providedIn: "root" });
|
|
9594
|
+
ExcelExportService.decorators = [
|
|
9595
|
+
{ type: Injectable, args: [{
|
|
9596
|
+
providedIn: 'root'
|
|
9597
|
+
},] }
|
|
9598
|
+
];
|
|
9599
|
+
|
|
9478
9600
|
class SimpleGridComponent extends BaseSimpleGridComponent {
|
|
9479
|
-
constructor(icons, _changeDetection, _formMaster) {
|
|
9601
|
+
constructor(icons, _changeDetection, _formMaster, excelExportService) {
|
|
9480
9602
|
super();
|
|
9481
9603
|
this.icons = icons;
|
|
9482
9604
|
this._changeDetection = _changeDetection;
|
|
9483
9605
|
this._formMaster = _formMaster;
|
|
9606
|
+
this.excelExportService = excelExportService;
|
|
9484
9607
|
this.defaultTextAlign = ColumnAlign.Left;
|
|
9485
9608
|
this.showAdd = false;
|
|
9486
9609
|
this.showDelete = false;
|
|
@@ -9560,13 +9683,6 @@ class SimpleGridComponent extends BaseSimpleGridComponent {
|
|
|
9560
9683
|
}
|
|
9561
9684
|
});
|
|
9562
9685
|
}
|
|
9563
|
-
isSingleColumn(column) {
|
|
9564
|
-
return column.singleColumn;
|
|
9565
|
-
}
|
|
9566
|
-
rowContainsSingleColumn(row, columns) {
|
|
9567
|
-
const singleColumn = columns.find(column => this.isSingleColumn(column) && !!row[column.field]);
|
|
9568
|
-
return !!singleColumn;
|
|
9569
|
-
}
|
|
9570
9686
|
addNewRow() {
|
|
9571
9687
|
return __awaiter(this, void 0, void 0, function* () {
|
|
9572
9688
|
if (this.inlineEdit) {
|
|
@@ -9722,12 +9838,15 @@ class SimpleGridComponent extends BaseSimpleGridComponent {
|
|
|
9722
9838
|
const sorted = [...this.data].sort((a, b) => {
|
|
9723
9839
|
let valA = a[columnValue];
|
|
9724
9840
|
let valB = b[columnValue];
|
|
9725
|
-
if (valA == null && valB == null)
|
|
9841
|
+
if (valA == null && valB == null) {
|
|
9726
9842
|
return 0;
|
|
9727
|
-
|
|
9843
|
+
}
|
|
9844
|
+
if (valA == null) {
|
|
9728
9845
|
return -1 * direction;
|
|
9729
|
-
|
|
9846
|
+
}
|
|
9847
|
+
if (valB == null) {
|
|
9730
9848
|
return 1 * direction;
|
|
9849
|
+
}
|
|
9731
9850
|
// Handle ISO date string
|
|
9732
9851
|
const isDateA = typeof valA === 'string' && /^\d{4}-\d{2}-\d{2}T/.test(valA);
|
|
9733
9852
|
const isDateB = typeof valB === 'string' && /^\d{4}-\d{2}-\d{2}T/.test(valB);
|
|
@@ -9745,34 +9864,12 @@ class SimpleGridComponent extends BaseSimpleGridComponent {
|
|
|
9745
9864
|
this.data = sorted;
|
|
9746
9865
|
this._detectChanges();
|
|
9747
9866
|
}
|
|
9748
|
-
_sortData(tableData) {
|
|
9749
|
-
return tableData.sort((a, b) => {
|
|
9750
|
-
const sign = this.sortDirection === 'asc' ? 1 : -1;
|
|
9751
|
-
console.log("a " + a);
|
|
9752
|
-
console.log("b " + b);
|
|
9753
|
-
console.log(a[this.sortColumnValue]);
|
|
9754
|
-
console.log(b[this.sortColumnValue]);
|
|
9755
|
-
console.log("sign " + sign);
|
|
9756
|
-
if (a[this.sortColumnValue] < b[this.sortColumnValue]) {
|
|
9757
|
-
return -1 * sign;
|
|
9758
|
-
}
|
|
9759
|
-
else if (a[this.sortColumnValue] > b[this.sortColumnValue]) {
|
|
9760
|
-
return 1 * sign;
|
|
9761
|
-
}
|
|
9762
|
-
return 0;
|
|
9763
|
-
});
|
|
9764
|
-
}
|
|
9765
9867
|
showAllColumns() {
|
|
9766
9868
|
this.isSettingsMenuOpen = false;
|
|
9767
9869
|
this.headerColumnsCopy = this.headerColumns;
|
|
9768
9870
|
}
|
|
9769
9871
|
exportToExcel() {
|
|
9770
|
-
this.
|
|
9771
|
-
let element = document.getElementById('simple-grid-table');
|
|
9772
|
-
const ws = XLSX.utils.table_to_sheet(element);
|
|
9773
|
-
const wb = XLSX.utils.book_new();
|
|
9774
|
-
XLSX.utils.book_append_sheet(wb, ws, 'Sheet1');
|
|
9775
|
-
XLSX.writeFile(wb, 'ExcelSheet.xlsx');
|
|
9872
|
+
this.excelExportService.exportTableToExcel('simple-grid-table', 'ExcelSheet', 'Sheet1');
|
|
9776
9873
|
}
|
|
9777
9874
|
prepareDataRow(row, index) {
|
|
9778
9875
|
this.isRowDisabled(row, index);
|
|
@@ -9919,147 +10016,155 @@ SimpleGridComponent.decorators = [
|
|
|
9919
10016
|
{ type: Component, args: [{
|
|
9920
10017
|
selector: 'co-simple-grid',
|
|
9921
10018
|
template: `
|
|
9922
|
-
|
|
9923
|
-
|
|
9924
|
-
|
|
9925
|
-
|
|
9926
|
-
|
|
9927
|
-
|
|
9928
|
-
|
|
9929
|
-
|
|
9930
|
-
|
|
9931
|
-
|
|
9932
|
-
|
|
9933
|
-
|
|
9934
|
-
id="simple-grid-table"
|
|
9935
|
-
class="simple-grid-table"
|
|
9936
|
-
[clickOutside]="editing"
|
|
9937
|
-
(clickOutside)="handleClickOutsideRow()">
|
|
9938
|
-
<colgroup>
|
|
9939
|
-
<col *ngFor="let column of headerColumnsCopy; let index = index"
|
|
9940
|
-
[class.simple-grid-column-auto-fit]="column.autoFit"
|
|
9941
|
-
[style.width.px]="column.width"
|
|
9942
|
-
[style.min-width.px]="MIN_COLUMN_WIDTH">
|
|
9943
|
-
</colgroup>
|
|
9944
|
-
<thead>
|
|
9945
|
-
<tr>
|
|
9946
|
-
<th
|
|
9947
|
-
scope="col"
|
|
9948
|
-
#headerCell
|
|
9949
|
-
class="simple-grid-column-header"
|
|
9950
|
-
*ngFor="let column of headerColumnsCopy; let index = index">
|
|
9951
|
-
<div
|
|
9952
|
-
class="simple-grid-column-header-wrapper"
|
|
9953
|
-
[class.resizable]="resizable"
|
|
9954
|
-
[class.selected]="column.isSelected"
|
|
9955
|
-
[ngClass]="column.textAlign ? column.textAlign : defaultTextAlign">
|
|
9956
|
-
<ng-container *ngIf="column.headerTemplate; else noHeaderTemplate">
|
|
9957
|
-
<ng-container [ngTemplateOutlet]="column.headerTemplate"></ng-container>
|
|
9958
|
-
</ng-container>
|
|
9959
|
-
<ng-template #noHeaderTemplate>
|
|
9960
|
-
<div class="simple-grid-column-header-label"
|
|
9961
|
-
[ngClass]="column.textAlign ? column.textAlign : defaultTextAlign"
|
|
9962
|
-
[class.with-menu]="showGridSettings"
|
|
9963
|
-
[class.with-sort]="showColumnSort"
|
|
9964
|
-
[textContent]="column.headerText || ' '"
|
|
9965
|
-
(click)="showColumnSort ? sortColumn(column, column.field) : toggleColumnMenu(column)">
|
|
9966
|
-
</div>
|
|
10019
|
+
<co-grid-toolbar
|
|
10020
|
+
*ngIf="showToolbar" [class.right]="rightToolbar"
|
|
10021
|
+
[showEdit]="showEdit"
|
|
10022
|
+
[showAdd]="showAdd"
|
|
10023
|
+
[showDelete]="showDelete"
|
|
10024
|
+
[deleteEnabled]="selectedRowIndex > -1"
|
|
10025
|
+
(addClick)="addNewRow()"
|
|
10026
|
+
(editClick)="editRow($event)"
|
|
10027
|
+
(saveClick)="validateAndSave()"
|
|
10028
|
+
(cancelClick)="cancelEditRow()"
|
|
10029
|
+
(deleteClick)="removeRow()">
|
|
10030
|
+
</co-grid-toolbar>
|
|
9967
10031
|
|
|
9968
|
-
|
|
9969
|
-
|
|
9970
|
-
|
|
9971
|
-
|
|
9972
|
-
|
|
10032
|
+
<table
|
|
10033
|
+
id="simple-grid-table"
|
|
10034
|
+
class="simple-grid-table"
|
|
10035
|
+
[clickOutside]="editing"
|
|
10036
|
+
(clickOutside)="handleClickOutsideRow()">
|
|
10037
|
+
<colgroup>
|
|
10038
|
+
<col
|
|
10039
|
+
*ngFor="let column of headerColumnsCopy; let index = index"
|
|
10040
|
+
[class.simple-grid-column-auto-fit]="column.autoFit"
|
|
10041
|
+
[style.width.px]="column.width"
|
|
10042
|
+
[style.min-width.px]="MIN_COLUMN_WIDTH">
|
|
10043
|
+
</colgroup>
|
|
10044
|
+
<thead>
|
|
10045
|
+
<tr>
|
|
10046
|
+
<th
|
|
10047
|
+
scope="col"
|
|
10048
|
+
#headerCell
|
|
10049
|
+
class="simple-grid-column-header"
|
|
10050
|
+
*ngFor="let column of headerColumnsCopy; let index = index">
|
|
10051
|
+
<div
|
|
10052
|
+
class="simple-grid-column-header-wrapper"
|
|
10053
|
+
[class.resizable]="resizable"
|
|
10054
|
+
[class.selected]="column.isSelected"
|
|
10055
|
+
[ngClass]="column.textAlign ? column.textAlign : defaultTextAlign">
|
|
10056
|
+
<ng-container *ngIf="column.headerTemplate; else noHeaderTemplate">
|
|
10057
|
+
<ng-container [ngTemplateOutlet]="column.headerTemplate"></ng-container>
|
|
10058
|
+
</ng-container>
|
|
10059
|
+
<ng-template #noHeaderTemplate>
|
|
10060
|
+
<div
|
|
10061
|
+
class="simple-grid-column-header-label"
|
|
10062
|
+
[ngClass]="column.textAlign ? column.textAlign : defaultTextAlign"
|
|
10063
|
+
[class.with-menu]="showGridSettings"
|
|
10064
|
+
[class.with-sort]="showColumnSort"
|
|
10065
|
+
[textContent]="column.headerText || ' '"
|
|
10066
|
+
(click)="showColumnSort ? sortColumn(column, column.field) : toggleColumnMenu(column)">
|
|
10067
|
+
</div>
|
|
9973
10068
|
|
|
9974
|
-
|
|
9975
|
-
|
|
9976
|
-
|
|
9977
|
-
|
|
9978
|
-
|
|
9979
|
-
|
|
10069
|
+
<div class="sort-column" *ngIf="showColumnSort">
|
|
10070
|
+
<co-button
|
|
10071
|
+
(click)="sortColumn(column, column?.field)"
|
|
10072
|
+
[iconData]="icons.getIcon(Icons.ArrowUpArrowDown)">
|
|
10073
|
+
</co-button>
|
|
10074
|
+
</div>
|
|
10075
|
+
|
|
10076
|
+
<div class="column-menu" *ngIf="column.isSelected">
|
|
10077
|
+
<h3 [textContent]="'COLUMN_OPTIONS' | coreLocalize"></h3>
|
|
10078
|
+
<ul>
|
|
10079
|
+
<li (click)="hideColumn(column)">Hide Column</li>
|
|
10080
|
+
<li (click)="sortColumn(column, column.field)">Sort Column</li>
|
|
10081
|
+
</ul>
|
|
10082
|
+
</div>
|
|
10083
|
+
</ng-template>
|
|
10084
|
+
<div
|
|
10085
|
+
*ngIf="resizable && column.resizable"
|
|
10086
|
+
class="simple-grid-column-sizer"
|
|
10087
|
+
(mousedown)="handleSizerMouseDown($event, column)">
|
|
10088
|
+
</div>
|
|
10089
|
+
</div>
|
|
10090
|
+
</th>
|
|
10091
|
+
</tr>
|
|
10092
|
+
|
|
10093
|
+
<div *ngIf="showGridSettings" class="grid-settings">
|
|
10094
|
+
<co-button
|
|
10095
|
+
[class.selected]="isSettingsMenuOpen"
|
|
10096
|
+
[iconData]="icons.getIcon(Icons.CogWheels)"
|
|
10097
|
+
(click)="toggleSettingsMenu()">
|
|
10098
|
+
</co-button>
|
|
10099
|
+
|
|
10100
|
+
<div class="settings-menu" *ngIf="isSettingsMenuOpen">
|
|
10101
|
+
<h3 [textContent]="'GRID_OPTIONS' | coreLocalize"></h3>
|
|
10102
|
+
<ul>
|
|
10103
|
+
<li (click)="exportToExcel()">Export to Excel</li>
|
|
10104
|
+
<li *ngIf="headerColumnsCopy.length !== headerColumns.length" (click)="showAllColumns()">
|
|
10105
|
+
Show All Columns
|
|
10106
|
+
</li>
|
|
10107
|
+
</ul>
|
|
9980
10108
|
</div>
|
|
9981
|
-
</ng-template>
|
|
9982
|
-
<div *ngIf="resizable && column.resizable" class="simple-grid-column-sizer"
|
|
9983
|
-
(mousedown)="handleSizerMouseDown($event, column)"
|
|
9984
|
-
></div>
|
|
9985
10109
|
</div>
|
|
9986
|
-
|
|
9987
|
-
|
|
9988
|
-
|
|
9989
|
-
|
|
9990
|
-
|
|
9991
|
-
|
|
9992
|
-
|
|
10110
|
+
</thead>
|
|
10111
|
+
<tbody
|
|
10112
|
+
#dropList cdkDropList cdkDropListOrientation="vertical"
|
|
10113
|
+
class="simple-grid-drag-drop-list"
|
|
10114
|
+
[cdkDropListDisabled]="!dragDropEnabled || editing"
|
|
10115
|
+
[cdkDropListData]="data"
|
|
10116
|
+
[cdkDropListEnterPredicate]="handleCanDragDrop"
|
|
10117
|
+
(cdkDropListDropped)="handleDrop($event)">
|
|
10118
|
+
<co-form class="simple-grid-row-form">
|
|
10119
|
+
<tr
|
|
10120
|
+
class="simple-grid-row"
|
|
10121
|
+
[class.selected]="rowIndex === selectedRowIndex && !editing" observeVisibility
|
|
10122
|
+
[class.disabled]="getIsRowDisabled(rowIndex)"
|
|
10123
|
+
[class.editing]="rowIndex === editRowIndex"
|
|
10124
|
+
*ngFor="let row of (!!rowsPerPage ? (data | paginate: {itemsPerPage: rowsPerPage, currentPage: currentPage}) : data); last as last; let rowIndex = index"
|
|
10125
|
+
cdkDrag
|
|
10126
|
+
(click)="handleClickRow($event, rowIndex, row)" (dblclick)="handleDblClickRow($event, rowIndex, row)"
|
|
10127
|
+
(visibilityChange)="rowVisible.next(row)">
|
|
10128
|
+
<ng-container *ngIf="isSingleColumnRow(row)">
|
|
10129
|
+
<td class="simple-grid-single-column-cell" [attr.colspan]="headerColumnsCopy.length">
|
|
10130
|
+
<co-simple-grid-cell
|
|
10131
|
+
[column]="columns[singleColumnIndex(row)]"
|
|
10132
|
+
[row]="row"
|
|
10133
|
+
[editMode]="false">
|
|
10134
|
+
</co-simple-grid-cell>
|
|
10135
|
+
</td>
|
|
10136
|
+
</ng-container>
|
|
10137
|
+
<ng-container *ngIf="!isSingleColumnRow(row)">
|
|
10138
|
+
<ng-container *ngFor="let column of headerColumnsCopy; let columnIndex = index">
|
|
10139
|
+
<td class="simple-grid-column-cell" *ngIf="columnIndex !== singleColumnIndex(row)">
|
|
10140
|
+
<co-simple-grid-cell
|
|
10141
|
+
[column]="column"
|
|
10142
|
+
[row]="row"
|
|
10143
|
+
[editMode]="inlineEdit && editing && rowIndex === editRowIndex"
|
|
10144
|
+
[fieldEditMode]="editCellIndex === columnIndex && rowIndex === editRowIndex"
|
|
10145
|
+
(cellClick)="handleCellClick($event, row, rowIndex, columnIndex)">
|
|
10146
|
+
</co-simple-grid-cell>
|
|
10147
|
+
<div *ngIf="column.resizable" class="simple-grid-column-sizer-placeholder"></div>
|
|
10148
|
+
</td>
|
|
10149
|
+
</ng-container>
|
|
10150
|
+
</ng-container>
|
|
10151
|
+
</tr>
|
|
10152
|
+
</co-form>
|
|
10153
|
+
</tbody>
|
|
10154
|
+
</table>
|
|
9993
10155
|
|
|
9994
|
-
|
|
9995
|
-
|
|
9996
|
-
|
|
9997
|
-
|
|
9998
|
-
|
|
9999
|
-
|
|
10000
|
-
|
|
10001
|
-
|
|
10002
|
-
|
|
10003
|
-
|
|
10004
|
-
</tr>
|
|
10005
|
-
</thead>
|
|
10006
|
-
<tbody #dropList cdkDropList cdkDropListOrientation="vertical"
|
|
10007
|
-
class="simple-grid-drag-drop-list"
|
|
10008
|
-
[cdkDropListDisabled]="!dragDropEnabled || editing"
|
|
10009
|
-
[cdkDropListData]="data"
|
|
10010
|
-
[cdkDropListEnterPredicate]="handleCanDragDrop"
|
|
10011
|
-
(cdkDropListDropped)="handleDrop($event)">
|
|
10012
|
-
<tr
|
|
10013
|
-
class="simple-grid-row"
|
|
10014
|
-
[class.selected]="rowIndex === selectedRowIndex && !editing" observeVisibility
|
|
10015
|
-
[class.disabled]="getIsRowDisabled(rowIndex)"
|
|
10016
|
-
[class.editing]="rowIndex === editRowIndex"
|
|
10017
|
-
*ngFor="let row of (!!rowsPerPage ? (data | paginate: {itemsPerPage: rowsPerPage, currentPage: currentPage}) : data); last as last; let rowIndex = index"
|
|
10018
|
-
cdkDrag
|
|
10019
|
-
(click)="handleClickRow($event, rowIndex, row)" (dblclick)="handleDblClickRow($event, rowIndex, row)"
|
|
10020
|
-
(visibilityChange)="rowVisible.next(row)">
|
|
10021
|
-
<co-form class="simple-grid-row-form">
|
|
10022
|
-
<ng-container *ngIf="isSingleColumnRow(row)">
|
|
10023
|
-
<td class="simple-grid-single-column-cell" [attr.colspan]="headerColumnsCopy.length">
|
|
10024
|
-
<co-simple-grid-cell
|
|
10025
|
-
[column]="columns[singleColumnIndex(row)]"
|
|
10026
|
-
[row]="row"
|
|
10027
|
-
[editMode]="false"
|
|
10028
|
-
></co-simple-grid-cell>
|
|
10029
|
-
</td>
|
|
10030
|
-
</ng-container>
|
|
10031
|
-
<ng-container *ngIf="!isSingleColumnRow(row)">
|
|
10032
|
-
<ng-container *ngFor="let column of headerColumnsCopy; let columnIndex = index">
|
|
10033
|
-
<td class="simple-grid-column-cell" *ngIf="columnIndex !== singleColumnIndex(row)">
|
|
10034
|
-
<co-simple-grid-cell
|
|
10035
|
-
[column]="column"
|
|
10036
|
-
[row]="row"
|
|
10037
|
-
[editMode]="inlineEdit && editing && rowIndex === editRowIndex"
|
|
10038
|
-
[fieldEditMode]="editCellIndex === columnIndex && rowIndex === editRowIndex"
|
|
10039
|
-
(cellClick)="handleCellClick($event, row, rowIndex, columnIndex)"
|
|
10040
|
-
></co-simple-grid-cell>
|
|
10041
|
-
<div *ngIf="column.resizable" class="simple-grid-column-sizer-placeholder"></div>
|
|
10042
|
-
</td>
|
|
10043
|
-
</ng-container>
|
|
10044
|
-
</ng-container>
|
|
10045
|
-
<td *ngIf="showGridSettings"></td>
|
|
10046
|
-
</co-form>
|
|
10047
|
-
</tr>
|
|
10048
|
-
</tbody>
|
|
10049
|
-
</table>
|
|
10050
|
-
<co-pagination-bar *ngIf="data?.length > rowsPerPage" class="pagination-bar"
|
|
10051
|
-
[itemsPerPage]="rowsPerPage"
|
|
10052
|
-
[currentPage]="currentPage"
|
|
10053
|
-
[totalItems]="data.length"
|
|
10054
|
-
[autoHide]="true"
|
|
10055
|
-
(previousClick)="goToPreviousPage()"
|
|
10056
|
-
(nextClick)="goToNextPage()"
|
|
10057
|
-
(pageClick)="setCurrentPage($event)"
|
|
10058
|
-
></co-pagination-bar>
|
|
10156
|
+
<co-pagination-bar
|
|
10157
|
+
*ngIf="data?.length > rowsPerPage" class="pagination-bar"
|
|
10158
|
+
[itemsPerPage]="rowsPerPage"
|
|
10159
|
+
[currentPage]="currentPage"
|
|
10160
|
+
[totalItems]="data.length"
|
|
10161
|
+
[autoHide]="true"
|
|
10162
|
+
(previousClick)="goToPreviousPage()"
|
|
10163
|
+
(nextClick)="goToNextPage()"
|
|
10164
|
+
(pageClick)="setCurrentPage($event)">
|
|
10165
|
+
</co-pagination-bar>
|
|
10059
10166
|
`,
|
|
10060
|
-
providers: [
|
|
10061
|
-
FormMasterService
|
|
10062
|
-
],
|
|
10167
|
+
providers: [FormMasterService],
|
|
10063
10168
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
10064
10169
|
encapsulation: ViewEncapsulation.None
|
|
10065
10170
|
},] }
|
|
@@ -10067,7 +10172,8 @@ SimpleGridComponent.decorators = [
|
|
|
10067
10172
|
SimpleGridComponent.ctorParameters = () => [
|
|
10068
10173
|
{ type: IconCacheService },
|
|
10069
10174
|
{ type: ChangeDetectorRef },
|
|
10070
|
-
{ type: FormMasterService }
|
|
10175
|
+
{ type: FormMasterService },
|
|
10176
|
+
{ type: ExcelExportService }
|
|
10071
10177
|
];
|
|
10072
10178
|
SimpleGridComponent.propDecorators = {
|
|
10073
10179
|
headerCells: [{ type: ViewChildren, args: ['headerCell',] }],
|
|
@@ -14869,5 +14975,5 @@ HourSchedulingExpandableComponentModule.decorators = [
|
|
|
14869
14975
|
* Generated bundle index. Do not edit.
|
|
14870
14976
|
*/
|
|
14871
14977
|
|
|
14872
|
-
export { ArticleTileComponent, ArticleTileModule, BaseInputComponent, BaseInputDatePickerDirective, BaseModuleScreenConfigService, BaseModuleService, ButtonComponent, ButtonModule, CalendarComponent, CalendarModule, CardComponent, CardModule, Carousel3dComponent, Carousel3dModule, CarouselComponent, CarouselHammerConfig, CarouselModule, CheckmarkOverlayModule, ClickoutsideModule, CoDialogComponent, CoDialogModule, CoDialogWizardComponent, CoDialogWizardModule, CoDirection, CoOrientation, CollapsibleComponent, CollapsibleModule, ColorPickerComponent, ColorPickerModule, ColorSequenceService, ColumnAlign, ContentViewMode, CoreComponentsIcon, CoreComponentsTranslationModule, CoreComponentsTranslationService, CoreDialogModule, CoreDialogService, DoubleCalendarComponent, DoubleCalendarModule, FilterItemComponent, FilterItemMode, FilterItemModule, FilterItemViewmodel, FilterPipe, FilterPipeModule, FilterViewmodel, FormComponent, FormInputUserModelChangeListenerService, FormMasterService, FormModule, GridToolbarButtonComponent, GridToolbarButtonModule, GridToolbarComponent, GridToolbarModule, HourSchedulingComponent, HourSchedulingComponentModule, HourSchedulingExpandableComponent, HourSchedulingExpandableComponentModule, HourSchedulingExpandableTemplateComponent, IconCacheService, IconCollapseHandleComponent, IconCollapseHandleModule, IconComponent, IconModule, ImageComponent, ImageModule, InputCheckboxComponent, InputCheckboxModule, InputDatePickerComponent, InputDatePickerModule, InputDateRangePickerComponent, InputDateRangePickerModule, InputNumberPickerComponent, InputNumberPickerModule, InputRadioButtonComponent, InputRadioButtonModule, InputScannerComponent, InputScannerModule, InputSearchComponent, InputSearchModule, InputTextComponent, InputTextModule, InputTextareaComponent, InputTextareaModule, LevelIndicatorComponent, LevelIndicatorModule, ListOfIconsComponent, ListOfIconsModule, ListOfValuesComponent, ListOfValuesModule, ListOfValuesPopupComponent, LoaderComponent, LoaderModule, NgZoneWrapperService, ObserveVisibilityModule, OrientationOfDirection, OverlayModule, OverlayService, PaginationBarComponent, PaginationBarModule, PaginationComponent, PaginationModule, PopupButtonsComponent, PopupMessageDisplayComponent, PopupModule, PopupWindowShellComponent, PriceDisplayPipe, PriceDisplayPipeModule, PromptService, ResponsiveTextComponent, ResponsiveTextModule, SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME, ScreenConfigurationDirective, ScreenConfigurationModule, SimpleGridColumnDirective, SimpleGridComponent, SimpleGridModule, TemplateWrapperDirective, TemplateWrapperModule, TextInputPopupComponent, TileComponent, TileModule, TileSelectComponent, TileSelectModule, TooltipDirectiveModule, ViewModeButtonsComponent, ViewModeButtonsModule, emailValidator, equalValidator, getValidatePasswordErrorString, maxStringLengthValidator, passwordValidator, precisionScaleValidator, requiredValidator, showHideDialog, InputBoolean as ɵa, RippleModule as ɵb,
|
|
14978
|
+
export { ArticleTileComponent, ArticleTileModule, BaseInputComponent, BaseInputDatePickerDirective, BaseModuleScreenConfigService, BaseModuleService, ButtonComponent, ButtonModule, CalendarComponent, CalendarModule, CardComponent, CardModule, Carousel3dComponent, Carousel3dModule, CarouselComponent, CarouselHammerConfig, CarouselModule, CheckmarkOverlayModule, ClickoutsideModule, CoDialogComponent, CoDialogModule, CoDialogWizardComponent, CoDialogWizardModule, CoDirection, CoOrientation, CollapsibleComponent, CollapsibleModule, ColorPickerComponent, ColorPickerModule, ColorSequenceService, ColumnAlign, ContentViewMode, CoreComponentsIcon, CoreComponentsTranslationModule, CoreComponentsTranslationService, CoreDialogModule, CoreDialogService, DoubleCalendarComponent, DoubleCalendarModule, FilterItemComponent, FilterItemMode, FilterItemModule, FilterItemViewmodel, FilterPipe, FilterPipeModule, FilterViewmodel, FormComponent, FormInputUserModelChangeListenerService, FormMasterService, FormModule, GridToolbarButtonComponent, GridToolbarButtonModule, GridToolbarComponent, GridToolbarModule, HourSchedulingComponent, HourSchedulingComponentModule, HourSchedulingExpandableComponent, HourSchedulingExpandableComponentModule, HourSchedulingExpandableTemplateComponent, IconCacheService, IconCollapseHandleComponent, IconCollapseHandleModule, IconComponent, IconModule, ImageComponent, ImageModule, InputCheckboxComponent, InputCheckboxModule, InputDatePickerComponent, InputDatePickerModule, InputDateRangePickerComponent, InputDateRangePickerModule, InputNumberPickerComponent, InputNumberPickerModule, InputRadioButtonComponent, InputRadioButtonModule, InputScannerComponent, InputScannerModule, InputSearchComponent, InputSearchModule, InputTextComponent, InputTextModule, InputTextareaComponent, InputTextareaModule, LevelIndicatorComponent, LevelIndicatorModule, ListOfIconsComponent, ListOfIconsModule, ListOfValuesComponent, ListOfValuesModule, ListOfValuesPopupComponent, LoaderComponent, LoaderModule, NgZoneWrapperService, ObserveVisibilityModule, OrientationOfDirection, OverlayModule, OverlayService, PaginationBarComponent, PaginationBarModule, PaginationComponent, PaginationModule, PopupButtonsComponent, PopupMessageDisplayComponent, PopupModule, PopupWindowShellComponent, PriceDisplayPipe, PriceDisplayPipeModule, PromptService, ResponsiveTextComponent, ResponsiveTextModule, SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME, ScreenConfigurationDirective, ScreenConfigurationModule, SimpleGridColumnDirective, SimpleGridComponent, SimpleGridModule, TemplateWrapperDirective, TemplateWrapperModule, TextInputPopupComponent, TileComponent, TileModule, TileSelectComponent, TileSelectModule, TooltipDirectiveModule, ViewModeButtonsComponent, ViewModeButtonsModule, emailValidator, equalValidator, getValidatePasswordErrorString, maxStringLengthValidator, passwordValidator, precisionScaleValidator, requiredValidator, showHideDialog, InputBoolean as ɵa, RippleModule as ɵb, ObserveVisibilityDirective as ɵba, PaginationService as ɵbb, PaginatePipe as ɵbc, SimpleGridCellComponent as ɵbd, ListOfValuesMultiselectPopupComponent as ɵbe, ConfirmationDialogComponent as ɵbf, DialogBaseComponent as ɵbg, CoreDynamicComponentService as ɵbh, PrependPipeModule as ɵbi, PrependPipe as ɵbj, CheckmarkOverlayComponent as ɵbk, ScannerService as ɵbl, TooltipModule as ɵbm, TooltipComponent as ɵbn, TooltipDirective as ɵbo, HourSchedulingTestObjectComponent as ɵbp, MD_RIPPLE_GLOBAL_OPTIONS as ɵc, CoRippleDirective as ɵd, CoViewportRulerService as ɵe, CoScrollDispatcherService as ɵf, CoScrollableDirective as ɵg, StopClickModule as ɵh, StopClickDirective as ɵi, BaseModule as ɵj, AppendPipeModule as ɵk, AppendPipe as ɵl, ValidationErrorModule as ɵm, OverlayDirective as ɵn, OverlayParentDirective as ɵo, CoreLocalizePipe as ɵp, CoreDictionaryService as ɵq, ValidationErrorComponent as ɵr, CommitButtonsModule as ɵs, CommitButtonsComponent as ɵt, ClickOutsideDirective as ɵu, ClickOutsideMasterService as ɵv, CalendarTemplateComponent as ɵw, PopupShowerService as ɵx, BaseSimpleGridComponent as ɵy, ExcelExportService as ɵz };
|
|
14873
14979
|
//# sourceMappingURL=colijnit-corecomponents_v12.js.map
|