@colijnit/corecomponents_v12 256.1.23 → 256.1.25
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 +166 -98
- 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/calendar/calendar-template.component.js +11 -6
- package/esm2015/lib/components/simple-grid/simple-grid.component.js +146 -205
- package/esm2015/lib/service/excel-export.service.js +125 -0
- package/fesm2015/colijnit-corecomponents_v12.js +275 -207
- 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
|
@@ -7100,9 +7100,14 @@
|
|
|
7100
7100
|
};
|
|
7101
7101
|
CalendarTemplateComponent.prototype.selectDate = function (day) {
|
|
7102
7102
|
if (day) {
|
|
7103
|
-
this.
|
|
7104
|
-
|
|
7105
|
-
|
|
7103
|
+
if (!this.doubleCalendar) {
|
|
7104
|
+
// Single calendar → select and close
|
|
7105
|
+
this.selectedDate = day;
|
|
7106
|
+
this.setAndClose();
|
|
7107
|
+
}
|
|
7108
|
+
else {
|
|
7109
|
+
this.selectedDate = day;
|
|
7110
|
+
this._fillDatesBetweenSelected();
|
|
7106
7111
|
this.dateSelected.emit(new Date(this.selectedDate));
|
|
7107
7112
|
}
|
|
7108
7113
|
}
|
|
@@ -7238,7 +7243,7 @@
|
|
|
7238
7243
|
CalendarTemplateComponent.decorators = [
|
|
7239
7244
|
{ type: i0.Component, args: [{
|
|
7240
7245
|
selector: "calendar-template",
|
|
7241
|
-
template: "\n <div class=\"calendar\">\n <div class=\"selected-date-display\">\n <span *ngIf=\"selectedDate\" class=\"selected-date-year\">\n {{ selectedDate.getFullYear() }}\n </span>\n <span *ngIf=\"selectedDate\" class=\"selected-date-day\">\n {{ selectedDate | date: 'EEE d MMM' }}\n </span>\n <span *ngIf=\"!selectedDate\" class=\"no-date-selected\" [textContent]=\"'Selecteer datum'\"></span>\n </div>\n <div class=\"calendar-header\" *ngIf=\"monthSelection || yearSelection\">\n <co-icon class=\"calendar-change-month-button\" [icon]=\"icons.ArrowPointLeft\" (click)=\"prevMonth()\"></co-icon>\n\n <div class=\"calendar-header-title-wrapper\">\n <span class=\"calendar-header-title\" [textContent]=\"monthSelection ? monthHeader : yearHeader\"\n (click)=\"monthSelection ? openMonthSelection() : openYearSelection()\"\n ></span>\n </div>\n\n <co-icon class=\"calendar-change-month-button\" [icon]=\"icons.ArrowPointRight\" (click)=\"nextMonth()\"></co-icon>\n </div>\n\n <div class=\"selection-grid month\" *ngIf=\"showMonthSelection\">\n <div *ngFor=\"let month of monthSelectionNames\"\n class=\"calendar-month-or-year\"\n (click)=\"selectMonth(month)\">\n <ng-container *ngIf=\"month\">\n <div class=\"month\" [textContent]=\"month\"></div>\n </ng-container>\n </div>\n </div>\n\n <div class=\"selection-grid year\" *ngIf=\"showYearSelection\">\n <div *ngFor=\"let year of yearSelectionYears\"\n class=\"calendar-month-or-year\"\n (click)=\"selectYear(year)\"\n [textContent]=\"year\">\n <ng-container *ngIf=\"year\">\n <div class=\"year\" [textContent]=\"year\"></div>\n </ng-container>\n </div>\n </div>\n <div class=\"calendar-wrapper\">\n <div class=\"week-wrapper\" *ngIf=\"showWeekNumbers && showCalendarBody\">\n <div class=\"week-number\" [textContent]=\"'W'\"></div>\n <div class=\"week-number\" *ngFor=\"let weekNumber of weekNumbers\">\n {{ weekNumber }}\n </div>\n </div>\n <div class=\"calendar-body\" *ngIf=\"showCalendarBody\">\n <div class=\"day-names\">\n <div class=\"weekday\" *ngFor=\"let dayName of dayNames\" [textContent]=\"dayName\"></div>\n </div>\n <div *ngFor=\"let day of daysInMonth\" class=\"calendar-day\"\n [class.highlighted-day]=\"daysToHighlight.includes(day)\"\n [class.selected-day]=\"selectedDate && (day && day.getTime() === selectedDate.getTime()) ||\n secondSelectedDate && (day && day.getTime() === secondSelectedDate.getTime()) ||\n temporarySelectedSecondaryDate && (day && day.getTime() === temporarySelectedSecondaryDate.getTime())\"\n (click)=\"selectDate(day)\"\n (mouseover)=\"handleMouseOverDay(day)\">\n <!-- Day number -->\n <ng-container *ngIf=\"day\">\n <div class=\"day-number\" [textContent]=\"day.getDate()\"></div>\n </ng-container>\n </div>\n </div>\n </div>\n <div class=\"calendar-action-buttons\" *ngIf=\"showButtons\">\n <span class=\"set-and-close-button\" (click)=\"setAndClose()\">Instellen</span>\n <span class=\"clear-date-button\" (click)=\"clearDate()\">Wissen</span>\n <span class=\"cancel-button\" (click)=\"closeDate()\">Annuleren</span>\n </div>\n </div>\n ",
|
|
7246
|
+
template: "\n <div class=\"calendar\">\n <div class=\"selected-date-display\">\n <span *ngIf=\"selectedDate\" class=\"selected-date-year\">\n {{ selectedDate.getFullYear() }}\n </span>\n <span *ngIf=\"selectedDate\" class=\"selected-date-day\">\n {{ selectedDate | date: 'EEE d MMM' }}\n </span>\n <span *ngIf=\"!selectedDate\" class=\"no-date-selected\" [textContent]=\"'Selecteer datum'\"></span>\n </div>\n <div class=\"calendar-header\" *ngIf=\"monthSelection || yearSelection\">\n <co-icon class=\"calendar-change-month-button\" [icon]=\"icons.ArrowPointLeft\" (click)=\"prevMonth()\"></co-icon>\n\n <div class=\"calendar-header-title-wrapper\">\n <span class=\"calendar-header-title\" [textContent]=\"monthSelection ? monthHeader : yearHeader\"\n (click)=\"monthSelection ? openMonthSelection() : openYearSelection()\"\n ></span>\n </div>\n\n <co-icon class=\"calendar-change-month-button\" [icon]=\"icons.ArrowPointRight\" (click)=\"nextMonth()\"></co-icon>\n </div>\n\n <div class=\"selection-grid month\" *ngIf=\"showMonthSelection\">\n <div *ngFor=\"let month of monthSelectionNames\"\n class=\"calendar-month-or-year\"\n (click)=\"selectMonth(month)\">\n <ng-container *ngIf=\"month\">\n <div class=\"month\" [textContent]=\"month\"></div>\n </ng-container>\n </div>\n </div>\n\n <div class=\"selection-grid year\" *ngIf=\"showYearSelection\">\n <div *ngFor=\"let year of yearSelectionYears\"\n class=\"calendar-month-or-year\"\n (click)=\"selectYear(year)\"\n [textContent]=\"year\">\n <ng-container *ngIf=\"year\">\n <div class=\"year\" [textContent]=\"year\"></div>\n </ng-container>\n </div>\n </div>\n <div class=\"calendar-wrapper\">\n <div class=\"week-wrapper\" *ngIf=\"showWeekNumbers && showCalendarBody\">\n <div class=\"week-number\" [textContent]=\"'W'\"></div>\n <div class=\"week-number\" *ngFor=\"let weekNumber of weekNumbers\">\n {{ weekNumber }}\n </div>\n </div>\n <div class=\"calendar-body\" *ngIf=\"showCalendarBody\">\n <div class=\"day-names\">\n <div class=\"weekday\" *ngFor=\"let dayName of dayNames\" [textContent]=\"dayName\"></div>\n </div>\n <div *ngFor=\"let day of daysInMonth\" class=\"calendar-day\"\n [class.highlighted-day]=\"daysToHighlight.includes(day)\"\n [class.selected-day]=\"selectedDate && (day && day.getTime() === selectedDate.getTime()) ||\n secondSelectedDate && (day && day.getTime() === secondSelectedDate.getTime()) ||\n temporarySelectedSecondaryDate && (day && day.getTime() === temporarySelectedSecondaryDate.getTime())\"\n (click)=\"selectDate(day)\"\n (mouseover)=\"handleMouseOverDay(day)\">\n <!-- Day number -->\n <ng-container *ngIf=\"day\">\n <div class=\"day-number\" [textContent]=\"day.getDate()\"></div>\n </ng-container>\n </div>\n </div>\n </div>\n <div class=\"calendar-action-buttons\" *ngIf=\"showButtons\">\n <span class=\"set-and-close-button\" *ngIf=\"this.doubleCalendar\" (click)=\"setAndClose()\">Instellen</span>\n <span class=\"clear-date-button\" *ngIf=\"this.selectedDate\" (click)=\"clearDate()\">Wissen</span>\n <span class=\"cancel-button\" (click)=\"closeDate()\">Annuleren</span>\n </div>\n </div>\n ",
|
|
7242
7247
|
encapsulation: i0.ViewEncapsulation.None
|
|
7243
7248
|
},] }
|
|
7244
7249
|
];
|
|
@@ -10068,13 +10073,147 @@
|
|
|
10068
10073
|
handleMouseUp: [{ type: i0.HostListener, args: ['document:mouseup', ['$event'],] }]
|
|
10069
10074
|
};
|
|
10070
10075
|
|
|
10076
|
+
var ExcelExportService = /** @class */ (function () {
|
|
10077
|
+
function ExcelExportService() {
|
|
10078
|
+
}
|
|
10079
|
+
/**
|
|
10080
|
+
* Export data to Excel file
|
|
10081
|
+
* @param data - Array of objects to export
|
|
10082
|
+
* @param columns - Column configuration (optional)
|
|
10083
|
+
* @param fileName - Name of the exported file
|
|
10084
|
+
* @param sheetName - Name of the Excel sheet
|
|
10085
|
+
*/
|
|
10086
|
+
ExcelExportService.prototype.exportToExcel = function (data, columns, fileName, sheetName) {
|
|
10087
|
+
var _this = this;
|
|
10088
|
+
if (fileName === void 0) { fileName = 'export'; }
|
|
10089
|
+
if (sheetName === void 0) { sheetName = 'Sheet1'; }
|
|
10090
|
+
// If columns are specified, transform data to match column structure
|
|
10091
|
+
var exportData = data;
|
|
10092
|
+
if (columns && columns.length > 0) {
|
|
10093
|
+
exportData = data.map(function (item) {
|
|
10094
|
+
var newItem = {};
|
|
10095
|
+
columns.forEach(function (col) {
|
|
10096
|
+
newItem[col.header] = _this.getNestedValue(item, col.key);
|
|
10097
|
+
});
|
|
10098
|
+
return newItem;
|
|
10099
|
+
});
|
|
10100
|
+
}
|
|
10101
|
+
// Create workbook and worksheet
|
|
10102
|
+
var wb = XLSX__namespace.utils.book_new();
|
|
10103
|
+
var ws = XLSX__namespace.utils.json_to_sheet(exportData);
|
|
10104
|
+
// Set column widths if specified
|
|
10105
|
+
if (columns && columns.some(function (col) { return col.width; })) {
|
|
10106
|
+
var colWidths = columns.map(function (col) { return ({ wch: col.width || 20 }); });
|
|
10107
|
+
ws['!cols'] = colWidths;
|
|
10108
|
+
}
|
|
10109
|
+
// Add worksheet to workbook
|
|
10110
|
+
XLSX__namespace.utils.book_append_sheet(wb, ws, sheetName);
|
|
10111
|
+
// Save file
|
|
10112
|
+
XLSX__namespace.writeFile(wb, fileName + ".xlsx");
|
|
10113
|
+
};
|
|
10114
|
+
/**
|
|
10115
|
+
* Export multiple sheets to one Excel file
|
|
10116
|
+
* @param sheets - Array of sheet data
|
|
10117
|
+
* @param fileName - Name of the exported file
|
|
10118
|
+
*/
|
|
10119
|
+
ExcelExportService.prototype.exportMultipleSheets = function (sheets, fileName) {
|
|
10120
|
+
var _this = this;
|
|
10121
|
+
if (fileName === void 0) { fileName = 'multi-sheet-export'; }
|
|
10122
|
+
var wb = XLSX__namespace.utils.book_new();
|
|
10123
|
+
sheets.forEach(function (sheet) {
|
|
10124
|
+
var exportData = sheet.data;
|
|
10125
|
+
if (sheet.columns && sheet.columns.length > 0) {
|
|
10126
|
+
exportData = sheet.data.map(function (item) {
|
|
10127
|
+
var newItem = {};
|
|
10128
|
+
sheet.columns.forEach(function (col) {
|
|
10129
|
+
newItem[col.header] = _this.getNestedValue(item, col.key);
|
|
10130
|
+
});
|
|
10131
|
+
return newItem;
|
|
10132
|
+
});
|
|
10133
|
+
}
|
|
10134
|
+
var ws = XLSX__namespace.utils.json_to_sheet(exportData);
|
|
10135
|
+
if (sheet.columns && sheet.columns.some(function (col) { return col.width; })) {
|
|
10136
|
+
var colWidths = sheet.columns.map(function (col) { return ({ wch: col.width || 20 }); });
|
|
10137
|
+
ws['!cols'] = colWidths;
|
|
10138
|
+
}
|
|
10139
|
+
XLSX__namespace.utils.book_append_sheet(wb, ws, sheet.sheetName);
|
|
10140
|
+
});
|
|
10141
|
+
XLSX__namespace.writeFile(wb, fileName + ".xlsx");
|
|
10142
|
+
};
|
|
10143
|
+
/**
|
|
10144
|
+
* Export HTML table to Excel
|
|
10145
|
+
* @param tableId - ID of the HTML table element
|
|
10146
|
+
* @param fileName - Name of the exported file
|
|
10147
|
+
* @param sheetName - Name of the Excel sheet
|
|
10148
|
+
*/
|
|
10149
|
+
ExcelExportService.prototype.exportTableToExcel = function (tableId, fileName, sheetName) {
|
|
10150
|
+
if (fileName === void 0) { fileName = 'table-export'; }
|
|
10151
|
+
if (sheetName === void 0) { sheetName = 'Sheet1'; }
|
|
10152
|
+
var table = document.getElementById(tableId);
|
|
10153
|
+
if (!table) {
|
|
10154
|
+
console.error("Table with ID '" + tableId + "' not found");
|
|
10155
|
+
return;
|
|
10156
|
+
}
|
|
10157
|
+
var wb = XLSX__namespace.utils.book_new();
|
|
10158
|
+
var ws = XLSX__namespace.utils.table_to_sheet(table);
|
|
10159
|
+
XLSX__namespace.utils.book_append_sheet(wb, ws, sheetName);
|
|
10160
|
+
XLSX__namespace.writeFile(wb, fileName + ".xlsx");
|
|
10161
|
+
};
|
|
10162
|
+
/**
|
|
10163
|
+
* Get nested object value using dot notation
|
|
10164
|
+
* @param obj - Object to search in
|
|
10165
|
+
* @param path - Dot notation path (e.g., 'user.address.city')
|
|
10166
|
+
*/
|
|
10167
|
+
ExcelExportService.prototype.getNestedValue = function (obj, path) {
|
|
10168
|
+
return path.split('.').reduce(function (current, key) {
|
|
10169
|
+
return current && current[key] !== undefined ? current[key] : '';
|
|
10170
|
+
}, obj);
|
|
10171
|
+
};
|
|
10172
|
+
/**
|
|
10173
|
+
* Format date for Excel export
|
|
10174
|
+
* @param date - Date to format
|
|
10175
|
+
* @param format - Format string (default: 'MM/DD/YYYY')
|
|
10176
|
+
*/
|
|
10177
|
+
ExcelExportService.prototype.formatDateForExport = function (date, format) {
|
|
10178
|
+
if (format === void 0) { format = 'MM/DD/YYYY'; }
|
|
10179
|
+
if (!date) {
|
|
10180
|
+
return '';
|
|
10181
|
+
}
|
|
10182
|
+
var d = new Date(date);
|
|
10183
|
+
if (isNaN(d.getTime())) {
|
|
10184
|
+
return '';
|
|
10185
|
+
}
|
|
10186
|
+
var month = (d.getMonth() + 1).toString().padStart(2, '0');
|
|
10187
|
+
var day = d.getDate().toString().padStart(2, '0');
|
|
10188
|
+
var year = d.getFullYear();
|
|
10189
|
+
switch (format) {
|
|
10190
|
+
case 'MM/DD/YYYY':
|
|
10191
|
+
return month + "/" + day + "/" + year;
|
|
10192
|
+
case 'DD/MM/YYYY':
|
|
10193
|
+
return day + "/" + month + "/" + year;
|
|
10194
|
+
case 'YYYY-MM-DD':
|
|
10195
|
+
return year + "-" + month + "-" + day;
|
|
10196
|
+
default:
|
|
10197
|
+
return d.toLocaleDateString();
|
|
10198
|
+
}
|
|
10199
|
+
};
|
|
10200
|
+
return ExcelExportService;
|
|
10201
|
+
}());
|
|
10202
|
+
ExcelExportService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function ExcelExportService_Factory() { return new ExcelExportService(); }, token: ExcelExportService, providedIn: "root" });
|
|
10203
|
+
ExcelExportService.decorators = [
|
|
10204
|
+
{ type: i0.Injectable, args: [{
|
|
10205
|
+
providedIn: 'root'
|
|
10206
|
+
},] }
|
|
10207
|
+
];
|
|
10208
|
+
|
|
10071
10209
|
var SimpleGridComponent = /** @class */ (function (_super) {
|
|
10072
10210
|
__extends(SimpleGridComponent, _super);
|
|
10073
|
-
function SimpleGridComponent(icons, _changeDetection, _formMaster) {
|
|
10211
|
+
function SimpleGridComponent(icons, _changeDetection, _formMaster, excelExportService) {
|
|
10074
10212
|
var _this = _super.call(this) || this;
|
|
10075
10213
|
_this.icons = icons;
|
|
10076
10214
|
_this._changeDetection = _changeDetection;
|
|
10077
10215
|
_this._formMaster = _formMaster;
|
|
10216
|
+
_this.excelExportService = excelExportService;
|
|
10078
10217
|
_this.defaultTextAlign = exports.ColumnAlign.Left;
|
|
10079
10218
|
_this.showAdd = false;
|
|
10080
10219
|
_this.showDelete = false;
|
|
@@ -10164,14 +10303,6 @@
|
|
|
10164
10303
|
});
|
|
10165
10304
|
});
|
|
10166
10305
|
};
|
|
10167
|
-
SimpleGridComponent.prototype.isSingleColumn = function (column) {
|
|
10168
|
-
return column.singleColumn;
|
|
10169
|
-
};
|
|
10170
|
-
SimpleGridComponent.prototype.rowContainsSingleColumn = function (row, columns) {
|
|
10171
|
-
var _this = this;
|
|
10172
|
-
var singleColumn = columns.find(function (column) { return _this.isSingleColumn(column) && !!row[column.field]; });
|
|
10173
|
-
return !!singleColumn;
|
|
10174
|
-
};
|
|
10175
10306
|
SimpleGridComponent.prototype.addNewRow = function () {
|
|
10176
10307
|
return __awaiter(this, void 0, void 0, function () {
|
|
10177
10308
|
var valid, _a;
|
|
@@ -10348,75 +10479,12 @@
|
|
|
10348
10479
|
return obj !== col;
|
|
10349
10480
|
});
|
|
10350
10481
|
};
|
|
10351
|
-
// TODO Fix this sort method
|
|
10352
|
-
// public sortColumn(col: any, columnValue: string): void {
|
|
10353
|
-
// console.log(col);
|
|
10354
|
-
// console.log("columnValue " + columnValue);
|
|
10355
|
-
// col.isSelected = false;
|
|
10356
|
-
//
|
|
10357
|
-
// if (this.sortColumnValue === columnValue) {
|
|
10358
|
-
// this.sortDirection = this.sortDirection === 'asc' ? 'desc' : 'asc';
|
|
10359
|
-
// } else {
|
|
10360
|
-
// this.sortColumnValue = columnValue;
|
|
10361
|
-
// this.sortDirection = 'asc';
|
|
10362
|
-
// }
|
|
10363
|
-
//
|
|
10364
|
-
// console.log(this.data);
|
|
10365
|
-
// // this.data = this._sortData(this.data);
|
|
10366
|
-
//
|
|
10367
|
-
//
|
|
10368
|
-
// this.data.sort((a, b) => {
|
|
10369
|
-
// const sign = this.sortDirection === 'asc' ? 1 : -1;
|
|
10370
|
-
//
|
|
10371
|
-
// console.log("a " + a);
|
|
10372
|
-
// console.log("b " + b);
|
|
10373
|
-
// console.log(a[this.sortColumnValue]);
|
|
10374
|
-
// console.log(b[this.sortColumnValue]);
|
|
10375
|
-
// console.log("sign " + sign);
|
|
10376
|
-
//
|
|
10377
|
-
// if (a[this.sortColumnValue] < b[this.sortColumnValue]) {
|
|
10378
|
-
// return -1 * sign;
|
|
10379
|
-
// } else if (a[this.sortColumnValue] > b[this.sortColumnValue]) {
|
|
10380
|
-
// return 1 * sign;
|
|
10381
|
-
// }
|
|
10382
|
-
// return 0;
|
|
10383
|
-
// });
|
|
10384
|
-
//
|
|
10385
|
-
//
|
|
10386
|
-
//
|
|
10387
|
-
// this._detectChanges();
|
|
10388
|
-
// // this.data.sort((a, b) => a[this.sortColumnValue] - b[this.sortColumnValue]);
|
|
10389
|
-
// console.log(this.data);
|
|
10390
|
-
// }
|
|
10391
|
-
SimpleGridComponent.prototype._sortData = function (tableData) {
|
|
10392
|
-
var _this = this;
|
|
10393
|
-
return tableData.sort(function (a, b) {
|
|
10394
|
-
var sign = _this.sortDirection === 'asc' ? 1 : -1;
|
|
10395
|
-
console.log("a " + a);
|
|
10396
|
-
console.log("b " + b);
|
|
10397
|
-
console.log(a[_this.sortColumnValue]);
|
|
10398
|
-
console.log(b[_this.sortColumnValue]);
|
|
10399
|
-
console.log("sign " + sign);
|
|
10400
|
-
if (a[_this.sortColumnValue] < b[_this.sortColumnValue]) {
|
|
10401
|
-
return -1 * sign;
|
|
10402
|
-
}
|
|
10403
|
-
else if (a[_this.sortColumnValue] > b[_this.sortColumnValue]) {
|
|
10404
|
-
return 1 * sign;
|
|
10405
|
-
}
|
|
10406
|
-
return 0;
|
|
10407
|
-
});
|
|
10408
|
-
};
|
|
10409
10482
|
SimpleGridComponent.prototype.showAllColumns = function () {
|
|
10410
10483
|
this.isSettingsMenuOpen = false;
|
|
10411
10484
|
this.headerColumnsCopy = this.headerColumns;
|
|
10412
10485
|
};
|
|
10413
10486
|
SimpleGridComponent.prototype.exportToExcel = function () {
|
|
10414
|
-
this.
|
|
10415
|
-
var element = document.getElementById('simple-grid-table');
|
|
10416
|
-
var ws = XLSX__namespace.utils.table_to_sheet(element);
|
|
10417
|
-
var wb = XLSX__namespace.utils.book_new();
|
|
10418
|
-
XLSX__namespace.utils.book_append_sheet(wb, ws, 'Sheet1');
|
|
10419
|
-
XLSX__namespace.writeFile(wb, 'ExcelSheet.xlsx');
|
|
10487
|
+
this.excelExportService.exportTableToExcel('simple-grid-table', 'ExcelSheet', 'Sheet1');
|
|
10420
10488
|
};
|
|
10421
10489
|
SimpleGridComponent.prototype.prepareDataRow = function (row, index) {
|
|
10422
10490
|
this.isRowDisabled(row, index);
|
|
@@ -10569,10 +10637,8 @@
|
|
|
10569
10637
|
SimpleGridComponent.decorators = [
|
|
10570
10638
|
{ type: i0.Component, args: [{
|
|
10571
10639
|
selector: 'co-simple-grid',
|
|
10572
|
-
template: "\n
|
|
10573
|
-
providers: [
|
|
10574
|
-
FormMasterService
|
|
10575
|
-
],
|
|
10640
|
+
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 [textContent]=\"column.headerText || ' '\"\n (click)=\"toggleColumnMenu(column)\">\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\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 <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>\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 ",
|
|
10641
|
+
providers: [FormMasterService],
|
|
10576
10642
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
10577
10643
|
encapsulation: i0.ViewEncapsulation.None
|
|
10578
10644
|
},] }
|
|
@@ -10580,7 +10646,8 @@
|
|
|
10580
10646
|
SimpleGridComponent.ctorParameters = function () { return [
|
|
10581
10647
|
{ type: IconCacheService },
|
|
10582
10648
|
{ type: i0.ChangeDetectorRef },
|
|
10583
|
-
{ type: FormMasterService }
|
|
10649
|
+
{ type: FormMasterService },
|
|
10650
|
+
{ type: ExcelExportService }
|
|
10584
10651
|
]; };
|
|
10585
10652
|
SimpleGridComponent.propDecorators = {
|
|
10586
10653
|
headerCells: [{ type: i0.ViewChildren, args: ['headerCell',] }],
|
|
@@ -15187,21 +15254,22 @@
|
|
|
15187
15254
|
exports.showHideDialog = showHideDialog;
|
|
15188
15255
|
exports["ɵa"] = InputBoolean;
|
|
15189
15256
|
exports["ɵb"] = RippleModule;
|
|
15190
|
-
exports["ɵba"] =
|
|
15191
|
-
exports["ɵbb"] =
|
|
15192
|
-
exports["ɵbc"] =
|
|
15193
|
-
exports["ɵbd"] =
|
|
15194
|
-
exports["ɵbe"] =
|
|
15195
|
-
exports["ɵbf"] =
|
|
15196
|
-
exports["ɵbg"] =
|
|
15197
|
-
exports["ɵbh"] =
|
|
15198
|
-
exports["ɵbi"] =
|
|
15199
|
-
exports["ɵbj"] =
|
|
15200
|
-
exports["ɵbk"] =
|
|
15201
|
-
exports["ɵbl"] =
|
|
15202
|
-
exports["ɵbm"] =
|
|
15203
|
-
exports["ɵbn"] =
|
|
15204
|
-
exports["ɵbo"] =
|
|
15257
|
+
exports["ɵba"] = ObserveVisibilityDirective;
|
|
15258
|
+
exports["ɵbb"] = PaginationService;
|
|
15259
|
+
exports["ɵbc"] = PaginatePipe;
|
|
15260
|
+
exports["ɵbd"] = SimpleGridCellComponent;
|
|
15261
|
+
exports["ɵbe"] = ListOfValuesMultiselectPopupComponent;
|
|
15262
|
+
exports["ɵbf"] = ConfirmationDialogComponent;
|
|
15263
|
+
exports["ɵbg"] = DialogBaseComponent;
|
|
15264
|
+
exports["ɵbh"] = CoreDynamicComponentService;
|
|
15265
|
+
exports["ɵbi"] = PrependPipeModule;
|
|
15266
|
+
exports["ɵbj"] = PrependPipe;
|
|
15267
|
+
exports["ɵbk"] = CheckmarkOverlayComponent;
|
|
15268
|
+
exports["ɵbl"] = ScannerService;
|
|
15269
|
+
exports["ɵbm"] = TooltipModule;
|
|
15270
|
+
exports["ɵbn"] = TooltipComponent;
|
|
15271
|
+
exports["ɵbo"] = TooltipDirective;
|
|
15272
|
+
exports["ɵbp"] = HourSchedulingTestObjectComponent;
|
|
15205
15273
|
exports["ɵc"] = MD_RIPPLE_GLOBAL_OPTIONS;
|
|
15206
15274
|
exports["ɵd"] = CoRippleDirective;
|
|
15207
15275
|
exports["ɵe"] = CoViewportRulerService;
|
|
@@ -15225,7 +15293,7 @@
|
|
|
15225
15293
|
exports["ɵw"] = CalendarTemplateComponent;
|
|
15226
15294
|
exports["ɵx"] = PopupShowerService;
|
|
15227
15295
|
exports["ɵy"] = BaseSimpleGridComponent;
|
|
15228
|
-
exports["ɵz"] =
|
|
15296
|
+
exports["ɵz"] = ExcelExportService;
|
|
15229
15297
|
|
|
15230
15298
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
15231
15299
|
|