@colijnit/corecomponents_v12 258.1.6 → 258.1.8
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 +194 -69
- 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/grid-toolbar/grid-toolbar.component.js +2 -2
- package/esm2015/lib/components/simple-grid/simple-grid.component.js +147 -122
- package/esm2015/lib/components/simple-grid/simple-grid.module.js +4 -2
- package/esm2015/lib/service/excel-export.service.js +125 -0
- package/fesm2015/colijnit-corecomponents_v12.js +269 -121
- package/fesm2015/colijnit-corecomponents_v12.js.map +1 -1
- package/lib/components/simple-grid/simple-grid.component.d.ts +9 -6
- package/lib/components/simple-grid/style/_layout.scss +31 -8
- package/lib/service/excel-export.service.d.ts +44 -0
- package/package.json +1 -1
|
@@ -5532,7 +5532,7 @@
|
|
|
5532
5532
|
GridToolbarComponent.decorators = [
|
|
5533
5533
|
{ type: i0.Component, args: [{
|
|
5534
5534
|
selector: "co-grid-toolbar",
|
|
5535
|
-
template: "\n <div class=\"grid-toolbar-wrapper\">\n <co-icon *ngIf=\"showEdit\" [iconData]=\"iconsService.getIcon(icons.PenToSquareSolid)\" [title]=\"'edit'\" (click)=\"editClick.emit($event)\"></co-icon>\n <co-icon *ngIf=\"showEdit\" [iconData]=\"iconsService.getIcon(icons.RotateLeftSolid)\" [title]=\"'cancel'\" (click)=\"cancelClick.emit()\"></co-icon>\n <co-icon *ngIf=\"showEdit\" [iconData]=\"iconsService.getIcon(icons.FloppyDiskSolid)\" [title]=\"'save'\" (click)=\"saveClick.emit()\"></co-icon>\n <co-icon *ngIf=\"showAdd || showEdit\" [iconData]=\"iconsService.getIcon(icons.PlusSolid)\" [title]=\"'add'\" (click)=\"addClick.emit()\"></co-icon>\n <co-icon *ngIf=\"showDelete\" [iconData]=\"iconsService.getIcon(icons.TrashCanSolid)\" [title]=\"'delete'\" [class.disabled]=\"!deleteEnabled\" (click)=\"handleDeleteClick()\"></co-icon
|
|
5535
|
+
template: "\n <div class=\"grid-toolbar-wrapper\">\n <co-icon *ngIf=\"showEdit\" [iconData]=\"iconsService.getIcon(icons.PenToSquareSolid)\" [title]=\"'edit'\" (click)=\"editClick.emit($event)\"></co-icon>\n <co-icon *ngIf=\"showEdit\" [iconData]=\"iconsService.getIcon(icons.RotateLeftSolid)\" [title]=\"'cancel'\" (click)=\"cancelClick.emit()\"></co-icon>\n <co-icon *ngIf=\"showEdit\" [iconData]=\"iconsService.getIcon(icons.FloppyDiskSolid)\" [title]=\"'save'\" (click)=\"saveClick.emit()\"></co-icon>\n <co-icon *ngIf=\"showAdd || showEdit\" [iconData]=\"iconsService.getIcon(icons.PlusSolid)\" [title]=\"'add'\" (click)=\"addClick.emit()\"></co-icon>\n<!-- <co-icon *ngIf=\"showDelete\" [iconData]=\"iconsService.getIcon(icons.TrashCanSolid)\" [title]=\"'delete'\" [class.disabled]=\"!deleteEnabled\" (click)=\"handleDeleteClick()\"></co-icon>-->\n </div>\n ",
|
|
5536
5536
|
encapsulation: i0.ViewEncapsulation.None
|
|
5537
5537
|
},] }
|
|
5538
5538
|
];
|
|
@@ -10090,20 +10090,154 @@
|
|
|
10090
10090
|
handleMouseUp: [{ type: i0.HostListener, args: ['document:mouseup', ['$event'],] }]
|
|
10091
10091
|
};
|
|
10092
10092
|
|
|
10093
|
+
var ExcelExportService = /** @class */ (function () {
|
|
10094
|
+
function ExcelExportService() {
|
|
10095
|
+
}
|
|
10096
|
+
/**
|
|
10097
|
+
* Export data to Excel file
|
|
10098
|
+
* @param data - Array of objects to export
|
|
10099
|
+
* @param columns - Column configuration (optional)
|
|
10100
|
+
* @param fileName - Name of the exported file
|
|
10101
|
+
* @param sheetName - Name of the Excel sheet
|
|
10102
|
+
*/
|
|
10103
|
+
ExcelExportService.prototype.exportToExcel = function (data, columns, fileName, sheetName) {
|
|
10104
|
+
var _this = this;
|
|
10105
|
+
if (fileName === void 0) { fileName = 'export'; }
|
|
10106
|
+
if (sheetName === void 0) { sheetName = 'Sheet1'; }
|
|
10107
|
+
// If columns are specified, transform data to match column structure
|
|
10108
|
+
var exportData = data;
|
|
10109
|
+
if (columns && columns.length > 0) {
|
|
10110
|
+
exportData = data.map(function (item) {
|
|
10111
|
+
var newItem = {};
|
|
10112
|
+
columns.forEach(function (col) {
|
|
10113
|
+
newItem[col.header] = _this.getNestedValue(item, col.key);
|
|
10114
|
+
});
|
|
10115
|
+
return newItem;
|
|
10116
|
+
});
|
|
10117
|
+
}
|
|
10118
|
+
// Create workbook and worksheet
|
|
10119
|
+
var wb = XLSX__namespace.utils.book_new();
|
|
10120
|
+
var ws = XLSX__namespace.utils.json_to_sheet(exportData);
|
|
10121
|
+
// Set column widths if specified
|
|
10122
|
+
if (columns && columns.some(function (col) { return col.width; })) {
|
|
10123
|
+
var colWidths = columns.map(function (col) { return ({ wch: col.width || 20 }); });
|
|
10124
|
+
ws['!cols'] = colWidths;
|
|
10125
|
+
}
|
|
10126
|
+
// Add worksheet to workbook
|
|
10127
|
+
XLSX__namespace.utils.book_append_sheet(wb, ws, sheetName);
|
|
10128
|
+
// Save file
|
|
10129
|
+
XLSX__namespace.writeFile(wb, fileName + ".xlsx");
|
|
10130
|
+
};
|
|
10131
|
+
/**
|
|
10132
|
+
* Export multiple sheets to one Excel file
|
|
10133
|
+
* @param sheets - Array of sheet data
|
|
10134
|
+
* @param fileName - Name of the exported file
|
|
10135
|
+
*/
|
|
10136
|
+
ExcelExportService.prototype.exportMultipleSheets = function (sheets, fileName) {
|
|
10137
|
+
var _this = this;
|
|
10138
|
+
if (fileName === void 0) { fileName = 'multi-sheet-export'; }
|
|
10139
|
+
var wb = XLSX__namespace.utils.book_new();
|
|
10140
|
+
sheets.forEach(function (sheet) {
|
|
10141
|
+
var exportData = sheet.data;
|
|
10142
|
+
if (sheet.columns && sheet.columns.length > 0) {
|
|
10143
|
+
exportData = sheet.data.map(function (item) {
|
|
10144
|
+
var newItem = {};
|
|
10145
|
+
sheet.columns.forEach(function (col) {
|
|
10146
|
+
newItem[col.header] = _this.getNestedValue(item, col.key);
|
|
10147
|
+
});
|
|
10148
|
+
return newItem;
|
|
10149
|
+
});
|
|
10150
|
+
}
|
|
10151
|
+
var ws = XLSX__namespace.utils.json_to_sheet(exportData);
|
|
10152
|
+
if (sheet.columns && sheet.columns.some(function (col) { return col.width; })) {
|
|
10153
|
+
var colWidths = sheet.columns.map(function (col) { return ({ wch: col.width || 20 }); });
|
|
10154
|
+
ws['!cols'] = colWidths;
|
|
10155
|
+
}
|
|
10156
|
+
XLSX__namespace.utils.book_append_sheet(wb, ws, sheet.sheetName);
|
|
10157
|
+
});
|
|
10158
|
+
XLSX__namespace.writeFile(wb, fileName + ".xlsx");
|
|
10159
|
+
};
|
|
10160
|
+
/**
|
|
10161
|
+
* Export HTML table to Excel
|
|
10162
|
+
* @param tableId - ID of the HTML table element
|
|
10163
|
+
* @param fileName - Name of the exported file
|
|
10164
|
+
* @param sheetName - Name of the Excel sheet
|
|
10165
|
+
*/
|
|
10166
|
+
ExcelExportService.prototype.exportTableToExcel = function (tableId, fileName, sheetName) {
|
|
10167
|
+
if (fileName === void 0) { fileName = 'table-export'; }
|
|
10168
|
+
if (sheetName === void 0) { sheetName = 'Sheet1'; }
|
|
10169
|
+
var table = document.getElementById(tableId);
|
|
10170
|
+
if (!table) {
|
|
10171
|
+
console.error("Table with ID '" + tableId + "' not found");
|
|
10172
|
+
return;
|
|
10173
|
+
}
|
|
10174
|
+
var wb = XLSX__namespace.utils.book_new();
|
|
10175
|
+
var ws = XLSX__namespace.utils.table_to_sheet(table);
|
|
10176
|
+
XLSX__namespace.utils.book_append_sheet(wb, ws, sheetName);
|
|
10177
|
+
XLSX__namespace.writeFile(wb, fileName + ".xlsx");
|
|
10178
|
+
};
|
|
10179
|
+
/**
|
|
10180
|
+
* Get nested object value using dot notation
|
|
10181
|
+
* @param obj - Object to search in
|
|
10182
|
+
* @param path - Dot notation path (e.g., 'user.address.city')
|
|
10183
|
+
*/
|
|
10184
|
+
ExcelExportService.prototype.getNestedValue = function (obj, path) {
|
|
10185
|
+
return path.split('.').reduce(function (current, key) {
|
|
10186
|
+
return current && current[key] !== undefined ? current[key] : '';
|
|
10187
|
+
}, obj);
|
|
10188
|
+
};
|
|
10189
|
+
/**
|
|
10190
|
+
* Format date for Excel export
|
|
10191
|
+
* @param date - Date to format
|
|
10192
|
+
* @param format - Format string (default: 'MM/DD/YYYY')
|
|
10193
|
+
*/
|
|
10194
|
+
ExcelExportService.prototype.formatDateForExport = function (date, format) {
|
|
10195
|
+
if (format === void 0) { format = 'MM/DD/YYYY'; }
|
|
10196
|
+
if (!date) {
|
|
10197
|
+
return '';
|
|
10198
|
+
}
|
|
10199
|
+
var d = new Date(date);
|
|
10200
|
+
if (isNaN(d.getTime())) {
|
|
10201
|
+
return '';
|
|
10202
|
+
}
|
|
10203
|
+
var month = (d.getMonth() + 1).toString().padStart(2, '0');
|
|
10204
|
+
var day = d.getDate().toString().padStart(2, '0');
|
|
10205
|
+
var year = d.getFullYear();
|
|
10206
|
+
switch (format) {
|
|
10207
|
+
case 'MM/DD/YYYY':
|
|
10208
|
+
return month + "/" + day + "/" + year;
|
|
10209
|
+
case 'DD/MM/YYYY':
|
|
10210
|
+
return day + "/" + month + "/" + year;
|
|
10211
|
+
case 'YYYY-MM-DD':
|
|
10212
|
+
return year + "-" + month + "-" + day;
|
|
10213
|
+
default:
|
|
10214
|
+
return d.toLocaleDateString();
|
|
10215
|
+
}
|
|
10216
|
+
};
|
|
10217
|
+
return ExcelExportService;
|
|
10218
|
+
}());
|
|
10219
|
+
ExcelExportService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function ExcelExportService_Factory() { return new ExcelExportService(); }, token: ExcelExportService, providedIn: "root" });
|
|
10220
|
+
ExcelExportService.decorators = [
|
|
10221
|
+
{ type: i0.Injectable, args: [{
|
|
10222
|
+
providedIn: 'root'
|
|
10223
|
+
},] }
|
|
10224
|
+
];
|
|
10225
|
+
|
|
10093
10226
|
var SimpleGridComponent = /** @class */ (function (_super) {
|
|
10094
10227
|
__extends(SimpleGridComponent, _super);
|
|
10095
|
-
function SimpleGridComponent(icons, _changeDetection, _formMaster) {
|
|
10228
|
+
function SimpleGridComponent(icons, _changeDetection, _formMaster, excelExportService) {
|
|
10096
10229
|
var _this = _super.call(this) || this;
|
|
10097
10230
|
_this.icons = icons;
|
|
10098
10231
|
_this._changeDetection = _changeDetection;
|
|
10099
10232
|
_this._formMaster = _formMaster;
|
|
10233
|
+
_this.excelExportService = excelExportService;
|
|
10100
10234
|
_this.defaultTextAlign = exports.ColumnAlign.Left;
|
|
10101
10235
|
_this.showAdd = false;
|
|
10102
10236
|
_this.showDelete = false;
|
|
10103
10237
|
_this.editOnCellClick = true;
|
|
10104
10238
|
_this.rightToolbar = false;
|
|
10105
10239
|
_this.showGridSettings = false;
|
|
10106
|
-
_this.rowsPerPage =
|
|
10240
|
+
_this.rowsPerPage = 50;
|
|
10107
10241
|
_this.showColumnSort = false;
|
|
10108
10242
|
_this.editing = false;
|
|
10109
10243
|
_this.isSettingsMenuOpen = false;
|
|
@@ -10113,8 +10247,11 @@
|
|
|
10113
10247
|
_this.currentPage = 1;
|
|
10114
10248
|
_this.sortDirection = 'asc';
|
|
10115
10249
|
_this.Icons = exports.CoreComponentsIcon;
|
|
10250
|
+
_this.hoveredRowIndex = -1;
|
|
10116
10251
|
_this._doubleClicked = false;
|
|
10117
10252
|
_this._newRow = false;
|
|
10253
|
+
_this.IconCacheService = IconCacheService;
|
|
10254
|
+
_this.CoreComponentsIcon = exports.CoreComponentsIcon;
|
|
10118
10255
|
_this.dataChanged.subscribe(function () {
|
|
10119
10256
|
_this.currentPage = 1;
|
|
10120
10257
|
});
|
|
@@ -10187,40 +10324,40 @@
|
|
|
10187
10324
|
});
|
|
10188
10325
|
});
|
|
10189
10326
|
};
|
|
10190
|
-
SimpleGridComponent.prototype.isSingleColumn = function (column) {
|
|
10191
|
-
return column.singleColumn;
|
|
10192
|
-
};
|
|
10193
|
-
SimpleGridComponent.prototype.rowContainsSingleColumn = function (row, columns) {
|
|
10194
|
-
var _this = this;
|
|
10195
|
-
var singleColumn = columns.find(function (column) { return _this.isSingleColumn(column) && !!row[column.field]; });
|
|
10196
|
-
return !!singleColumn;
|
|
10197
|
-
};
|
|
10198
10327
|
SimpleGridComponent.prototype.addNewRow = function () {
|
|
10199
10328
|
return __awaiter(this, void 0, void 0, function () {
|
|
10200
|
-
var valid, _a;
|
|
10329
|
+
var valid, absoluteIndex, _a;
|
|
10201
10330
|
return __generator(this, function (_b) {
|
|
10202
10331
|
switch (_b.label) {
|
|
10203
10332
|
case 0:
|
|
10204
|
-
if (!this.inlineEdit) return [3 /*break*/,
|
|
10333
|
+
if (!this.inlineEdit) return [3 /*break*/, 4];
|
|
10205
10334
|
valid = this.validateAndSave();
|
|
10206
|
-
if (!valid) return [3 /*break*/,
|
|
10335
|
+
if (!valid) return [3 /*break*/, 3];
|
|
10207
10336
|
this.data.push({});
|
|
10208
10337
|
this._detectChanges();
|
|
10209
10338
|
this._newRow = true;
|
|
10210
10339
|
this.editing = true;
|
|
10340
|
+
if (!(this.rowsPerPage && this.data.length > this.rowsPerPage)) return [3 /*break*/, 1];
|
|
10341
|
+
// navigate to the last page to the new row
|
|
10342
|
+
this.currentPage = Math.ceil(this.data.length / this.rowsPerPage);
|
|
10343
|
+
absoluteIndex = this.data.length - 1;
|
|
10344
|
+
this.selectedRowIndex = this.rowsPerPage ? (absoluteIndex - ((this.currentPage - 1) * this.rowsPerPage)) : absoluteIndex;
|
|
10345
|
+
this.editRow(null);
|
|
10346
|
+
return [3 /*break*/, 3];
|
|
10347
|
+
case 1:
|
|
10211
10348
|
this.editRowIndex = this.data.length - 1;
|
|
10212
10349
|
this.rowToEdit = this.data[this.editRowIndex];
|
|
10213
10350
|
_a = this;
|
|
10214
10351
|
return [4 /*yield*/, this._nextAvailableCellToEdit(true)];
|
|
10215
|
-
case
|
|
10352
|
+
case 2:
|
|
10216
10353
|
_a.editCellIndex = _b.sent();
|
|
10217
10354
|
this._detectChanges();
|
|
10218
|
-
_b.label =
|
|
10219
|
-
case
|
|
10220
|
-
case
|
|
10355
|
+
_b.label = 3;
|
|
10356
|
+
case 3: return [3 /*break*/, 5];
|
|
10357
|
+
case 4:
|
|
10221
10358
|
this.addRow.next();
|
|
10222
|
-
_b.label =
|
|
10223
|
-
case
|
|
10359
|
+
_b.label = 5;
|
|
10360
|
+
case 5: return [2 /*return*/];
|
|
10224
10361
|
}
|
|
10225
10362
|
});
|
|
10226
10363
|
});
|
|
@@ -10384,12 +10521,15 @@
|
|
|
10384
10521
|
var sorted = __spreadArray([], __read(this.data)).sort(function (a, b) {
|
|
10385
10522
|
var valA = a[columnValue];
|
|
10386
10523
|
var valB = b[columnValue];
|
|
10387
|
-
if (valA == null && valB == null)
|
|
10524
|
+
if (valA == null && valB == null) {
|
|
10388
10525
|
return 0;
|
|
10389
|
-
|
|
10526
|
+
}
|
|
10527
|
+
if (valA == null) {
|
|
10390
10528
|
return -1 * direction;
|
|
10391
|
-
|
|
10529
|
+
}
|
|
10530
|
+
if (valB == null) {
|
|
10392
10531
|
return 1 * direction;
|
|
10532
|
+
}
|
|
10393
10533
|
// Handle ISO date string
|
|
10394
10534
|
var isDateA = typeof valA === 'string' && /^\d{4}-\d{2}-\d{2}T/.test(valA);
|
|
10395
10535
|
var isDateB = typeof valB === 'string' && /^\d{4}-\d{2}-\d{2}T/.test(valB);
|
|
@@ -10407,35 +10547,12 @@
|
|
|
10407
10547
|
this.data = sorted;
|
|
10408
10548
|
this._detectChanges();
|
|
10409
10549
|
};
|
|
10410
|
-
SimpleGridComponent.prototype._sortData = function (tableData) {
|
|
10411
|
-
var _this = this;
|
|
10412
|
-
return tableData.sort(function (a, b) {
|
|
10413
|
-
var sign = _this.sortDirection === 'asc' ? 1 : -1;
|
|
10414
|
-
console.log("a " + a);
|
|
10415
|
-
console.log("b " + b);
|
|
10416
|
-
console.log(a[_this.sortColumnValue]);
|
|
10417
|
-
console.log(b[_this.sortColumnValue]);
|
|
10418
|
-
console.log("sign " + sign);
|
|
10419
|
-
if (a[_this.sortColumnValue] < b[_this.sortColumnValue]) {
|
|
10420
|
-
return -1 * sign;
|
|
10421
|
-
}
|
|
10422
|
-
else if (a[_this.sortColumnValue] > b[_this.sortColumnValue]) {
|
|
10423
|
-
return 1 * sign;
|
|
10424
|
-
}
|
|
10425
|
-
return 0;
|
|
10426
|
-
});
|
|
10427
|
-
};
|
|
10428
10550
|
SimpleGridComponent.prototype.showAllColumns = function () {
|
|
10429
10551
|
this.isSettingsMenuOpen = false;
|
|
10430
10552
|
this.headerColumnsCopy = this.headerColumns;
|
|
10431
10553
|
};
|
|
10432
10554
|
SimpleGridComponent.prototype.exportToExcel = function () {
|
|
10433
|
-
this.
|
|
10434
|
-
var element = document.getElementById('simple-grid-table');
|
|
10435
|
-
var ws = XLSX__namespace.utils.table_to_sheet(element);
|
|
10436
|
-
var wb = XLSX__namespace.utils.book_new();
|
|
10437
|
-
XLSX__namespace.utils.book_append_sheet(wb, ws, 'Sheet1');
|
|
10438
|
-
XLSX__namespace.writeFile(wb, 'ExcelSheet.xlsx');
|
|
10555
|
+
this.excelExportService.exportTableToExcel('simple-grid-table', 'ExcelSheet', 'Sheet1');
|
|
10439
10556
|
};
|
|
10440
10557
|
SimpleGridComponent.prototype.prepareDataRow = function (row, index) {
|
|
10441
10558
|
this.isRowDisabled(row, index);
|
|
@@ -10583,15 +10700,20 @@
|
|
|
10583
10700
|
this.editing = false;
|
|
10584
10701
|
this.rowToEdit = undefined;
|
|
10585
10702
|
};
|
|
10703
|
+
Object.defineProperty(SimpleGridComponent.prototype, "isNewRow", {
|
|
10704
|
+
get: function () {
|
|
10705
|
+
return this._newRow;
|
|
10706
|
+
},
|
|
10707
|
+
enumerable: false,
|
|
10708
|
+
configurable: true
|
|
10709
|
+
});
|
|
10586
10710
|
return SimpleGridComponent;
|
|
10587
10711
|
}(BaseSimpleGridComponent));
|
|
10588
10712
|
SimpleGridComponent.decorators = [
|
|
10589
10713
|
{ type: i0.Component, args: [{
|
|
10590
10714
|
selector: 'co-simple-grid',
|
|
10591
|
-
template: "\n <co-grid-toolbar
|
|
10592
|
-
providers: [
|
|
10593
|
-
FormMasterService
|
|
10594
|
-
],
|
|
10715
|
+
template: "\n <co-grid-toolbar\n *ngIf=\"showToolbar\" [class.right]=\"rightToolbar\"\n [showEdit]=\"showEdit\"\n [showAdd]=\"showAdd\"\n [showDelete]=\"showDelete\"\n [deleteEnabled]=\"selectedRowIndex > -1\"\n (addClick)=\"addNewRow()\"\n (editClick)=\"editRow($event)\"\n (saveClick)=\"validateAndSave()\"\n (cancelClick)=\"cancelEditRow()\"\n (deleteClick)=\"removeRow()\">\n </co-grid-toolbar>\n\n <table\n id=\"simple-grid-table\"\n class=\"simple-grid-table\"\n [clickOutside]=\"editing\"\n (clickOutside)=\"handleClickOutsideRow()\">\n <colgroup>\n <col\n *ngFor=\"let column of headerColumnsCopy; let index = index\"\n [class.simple-grid-column-auto-fit]=\"column.autoFit\"\n [style.width.px]=\"column.width\"\n [style.min-width.px]=\"MIN_COLUMN_WIDTH\">\n </colgroup>\n <thead>\n <tr>\n <th\n scope=\"col\"\n #headerCell\n class=\"simple-grid-column-header\"\n *ngFor=\"let column of headerColumnsCopy; let index = index\">\n <div\n class=\"simple-grid-column-header-wrapper\"\n [class.resizable]=\"resizable\"\n [class.selected]=\"column.isSelected\"\n [ngClass]=\"column.textAlign ? column.textAlign : defaultTextAlign\">\n <ng-container *ngIf=\"column.headerTemplate; else noHeaderTemplate\">\n <ng-container [ngTemplateOutlet]=\"column.headerTemplate\"></ng-container>\n </ng-container>\n <ng-template #noHeaderTemplate>\n <div\n class=\"simple-grid-column-header-label\"\n [ngClass]=\"column.textAlign ? column.textAlign : defaultTextAlign\"\n [class.with-menu]=\"showGridSettings\"\n [class.with-sort]=\"showColumnSort\"\n [textContent]=\"column.headerText || ' '\"\n (click)=\"showColumnSort ? sortColumn(column, column.field) : toggleColumnMenu(column)\">\n </div>\n\n <div class=\"sort-column\" *ngIf=\"showColumnSort\">\n <co-button\n (click)=\"sortColumn(column, column?.field)\"\n [iconData]=\"icons.getIcon(Icons.ArrowUpArrowDown)\">\n </co-button>\n </div>\n\n <div class=\"column-menu\" *ngIf=\"column.isSelected\">\n <h3 [textContent]=\"'COLUMN_OPTIONS' | coreLocalize\"></h3>\n <ul>\n <li (click)=\"hideColumn(column)\">Hide Column</li>\n <li (click)=\"sortColumn(column, column.field)\">Sort Column</li>\n </ul>\n </div>\n </ng-template>\n <div\n *ngIf=\"resizable && column.resizable\"\n class=\"simple-grid-column-sizer\"\n (mousedown)=\"handleSizerMouseDown($event, column)\">\n </div>\n </div>\n </th>\n </tr>\n\n <div *ngIf=\"showGridSettings\" class=\"grid-settings\">\n <co-button\n [class.selected]=\"isSettingsMenuOpen\"\n [iconData]=\"icons.getIcon(Icons.CogWheels)\"\n (click)=\"toggleSettingsMenu()\">\n </co-button>\n\n <div class=\"settings-menu\" *ngIf=\"isSettingsMenuOpen\">\n <h3 [textContent]=\"'GRID_OPTIONS' | coreLocalize\"></h3>\n <ul>\n <li (click)=\"exportToExcel()\">Export to Excel</li>\n <li *ngIf=\"headerColumnsCopy.length !== headerColumns.length\" (click)=\"showAllColumns()\">\n Show All Columns\n </li>\n </ul>\n </div>\n </div>\n </thead>\n <tbody\n #dropList cdkDropList cdkDropListOrientation=\"vertical\"\n class=\"simple-grid-drag-drop-list\"\n [cdkDropListDisabled]=\"!dragDropEnabled || editing\"\n [cdkDropListData]=\"data\"\n [cdkDropListEnterPredicate]=\"handleCanDragDrop\"\n (cdkDropListDropped)=\"handleDrop($event)\">\n <co-form class=\"simple-grid-row-form\">\n <tr\n class=\"simple-grid-row\"\n [class.selected]=\"rowIndex === selectedRowIndex && !editing\" observeVisibility\n [class.disabled]=\"getIsRowDisabled(rowIndex)\"\n [class.editing]=\"rowIndex === editRowIndex\"\n *ngFor=\"let row of (!!rowsPerPage ? (data | paginate: {itemsPerPage: rowsPerPage, currentPage: currentPage}) : data); last as last; let rowIndex = index\"\n cdkDrag\n (click)=\"handleClickRow($event, rowIndex, row)\" (dblclick)=\"handleDblClickRow($event, rowIndex, row)\"\n (visibilityChange)=\"rowVisible.next(row)\"\n (mouseenter)=\"hoveredRowIndex = rowIndex\"\n (mouseleave)=\"hoveredRowIndex = -1\"\n >\n <ng-container *ngIf=\"isSingleColumnRow(row)\">\n <td class=\"simple-grid-single-column-cell\" [attr.colspan]=\"headerColumnsCopy.length\">\n <co-simple-grid-cell\n [column]=\"columns[singleColumnIndex(row)]\"\n [row]=\"row\"\n [editMode]=\"false\">\n </co-simple-grid-cell>\n </td>\n </ng-container>\n <ng-container *ngIf=\"!isSingleColumnRow(row)\">\n <ng-container *ngFor=\"let column of headerColumnsCopy; let columnIndex = index\">\n <td class=\"simple-grid-column-cell\" *ngIf=\"columnIndex !== singleColumnIndex(row)\">\n <co-simple-grid-cell\n [column]=\"column\"\n [row]=\"row\"\n [editMode]=\"inlineEdit && editing && rowIndex === editRowIndex\"\n [fieldEditMode]=\"editCellIndex === columnIndex && rowIndex === editRowIndex\"\n (cellClick)=\"handleCellClick($event, row, rowIndex, columnIndex)\">\n </co-simple-grid-cell>\n <div *ngIf=\"column.resizable\" class=\"simple-grid-column-sizer-placeholder\"></div>\n </td>\n </ng-container>\n <ng-container *ngIf=\"inlineEdit\">\n <div class=\"icons-container\" *ngIf=\"!editing\">\n <co-icon class=\"icon-item icon-edit\"\n [iconData]=\"icons.getIcon(Icons.PenToSquareSolid)\" *ngIf=\"hoveredRowIndex === rowIndex\"\n (click)=\"editRow($event)\"></co-icon>\n\n <co-icon class=\"icon-item icon-delete\"\n [iconData]=\"icons.getIcon(Icons.TrashBin)\" *ngIf=\"hoveredRowIndex === rowIndex\"\n (click)=\"removeRow()\"></co-icon>\n </div>\n <div class=\"icons-container\">\n <co-button class=\"save-button\"\n *ngIf=\"editing && (selectedRowIndex === rowIndex || (isNewRow && rowIndex === editRowIndex))\"\n [iconData]=\"icons.getIcon(Icons.CheckDuotone)\"\n (click)=\"validateAndSave(); $event.stopPropagation()\"></co-button>\n\n <co-button class=\"close-button\"\n *ngIf=\"editing && (selectedRowIndex === rowIndex || (isNewRow && rowIndex === editRowIndex))\"\n [iconData]=\"icons.getIcon(Icons.CrossSkinny)\"\n (click)=\"cancelEditRow(); $event.stopPropagation() \"></co-button>\n </div>\n </ng-container>\n </ng-container>\n </tr>\n </co-form>\n </tbody>\n </table>\n\n <co-pagination-bar\n *ngIf=\"data?.length > rowsPerPage\" class=\"pagination-bar\"\n [itemsPerPage]=\"rowsPerPage\"\n [currentPage]=\"currentPage\"\n [totalItems]=\"data.length\"\n [autoHide]=\"true\"\n (previousClick)=\"goToPreviousPage()\"\n (nextClick)=\"goToNextPage()\"\n (pageClick)=\"setCurrentPage($event)\">\n </co-pagination-bar>\n ",
|
|
10716
|
+
providers: [FormMasterService],
|
|
10595
10717
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
10596
10718
|
encapsulation: i0.ViewEncapsulation.None
|
|
10597
10719
|
},] }
|
|
@@ -10599,7 +10721,8 @@
|
|
|
10599
10721
|
SimpleGridComponent.ctorParameters = function () { return [
|
|
10600
10722
|
{ type: IconCacheService },
|
|
10601
10723
|
{ type: i0.ChangeDetectorRef },
|
|
10602
|
-
{ type: FormMasterService }
|
|
10724
|
+
{ type: FormMasterService },
|
|
10725
|
+
{ type: ExcelExportService }
|
|
10603
10726
|
]; };
|
|
10604
10727
|
SimpleGridComponent.propDecorators = {
|
|
10605
10728
|
headerCells: [{ type: i0.ViewChildren, args: ['headerCell',] }],
|
|
@@ -11347,7 +11470,8 @@
|
|
|
11347
11470
|
PaginationBarModule,
|
|
11348
11471
|
ClickoutsideModule,
|
|
11349
11472
|
ButtonModule,
|
|
11350
|
-
CoreComponentsTranslationModule
|
|
11473
|
+
CoreComponentsTranslationModule,
|
|
11474
|
+
IconModule
|
|
11351
11475
|
],
|
|
11352
11476
|
declarations: [
|
|
11353
11477
|
SimpleGridComponent,
|
|
@@ -15275,21 +15399,22 @@
|
|
|
15275
15399
|
exports.showHideDialog = showHideDialog;
|
|
15276
15400
|
exports["ɵa"] = InputBoolean;
|
|
15277
15401
|
exports["ɵb"] = RippleModule;
|
|
15278
|
-
exports["ɵba"] =
|
|
15279
|
-
exports["ɵbb"] =
|
|
15280
|
-
exports["ɵbc"] =
|
|
15281
|
-
exports["ɵbd"] =
|
|
15282
|
-
exports["ɵbe"] =
|
|
15283
|
-
exports["ɵbf"] =
|
|
15284
|
-
exports["ɵbg"] =
|
|
15285
|
-
exports["ɵbh"] =
|
|
15286
|
-
exports["ɵbi"] =
|
|
15287
|
-
exports["ɵbj"] =
|
|
15288
|
-
exports["ɵbk"] =
|
|
15289
|
-
exports["ɵbl"] =
|
|
15290
|
-
exports["ɵbm"] =
|
|
15291
|
-
exports["ɵbn"] =
|
|
15292
|
-
exports["ɵbo"] =
|
|
15402
|
+
exports["ɵba"] = ObserveVisibilityDirective;
|
|
15403
|
+
exports["ɵbb"] = PaginationService;
|
|
15404
|
+
exports["ɵbc"] = PaginatePipe;
|
|
15405
|
+
exports["ɵbd"] = SimpleGridCellComponent;
|
|
15406
|
+
exports["ɵbe"] = ListOfValuesMultiselectPopupComponent;
|
|
15407
|
+
exports["ɵbf"] = ConfirmationDialogComponent;
|
|
15408
|
+
exports["ɵbg"] = DialogBaseComponent;
|
|
15409
|
+
exports["ɵbh"] = CoreDynamicComponentService;
|
|
15410
|
+
exports["ɵbi"] = PrependPipeModule;
|
|
15411
|
+
exports["ɵbj"] = PrependPipe;
|
|
15412
|
+
exports["ɵbk"] = CheckmarkOverlayComponent;
|
|
15413
|
+
exports["ɵbl"] = ScannerService;
|
|
15414
|
+
exports["ɵbm"] = TooltipModule;
|
|
15415
|
+
exports["ɵbn"] = TooltipComponent;
|
|
15416
|
+
exports["ɵbo"] = TooltipDirective;
|
|
15417
|
+
exports["ɵbp"] = HourSchedulingTestObjectComponent;
|
|
15293
15418
|
exports["ɵc"] = MD_RIPPLE_GLOBAL_OPTIONS;
|
|
15294
15419
|
exports["ɵd"] = CoRippleDirective;
|
|
15295
15420
|
exports["ɵe"] = CoViewportRulerService;
|
|
@@ -15313,7 +15438,7 @@
|
|
|
15313
15438
|
exports["ɵw"] = CalendarTemplateComponent;
|
|
15314
15439
|
exports["ɵx"] = PopupShowerService;
|
|
15315
15440
|
exports["ɵy"] = BaseSimpleGridComponent;
|
|
15316
|
-
exports["ɵz"] =
|
|
15441
|
+
exports["ɵz"] = ExcelExportService;
|
|
15317
15442
|
|
|
15318
15443
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
15319
15444
|
|