@colijnit/corecomponents_v12 257.1.26 → 257.1.28

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.
@@ -7945,6 +7945,7 @@
7945
7945
  _this.ngZoneWrapper = ngZoneWrapper;
7946
7946
  _this.elementRef = elementRef;
7947
7947
  _this.modelChangeOnEnter = true;
7948
+ _this.showPermanentLabel = false;
7948
7949
  _this.minusIcon = exports.CoreComponentsIcon.MinusSimple;
7949
7950
  _this.plusIcon = exports.CoreComponentsIcon.PlusSimple;
7950
7951
  // Whether to show buttons 'always', 'onFocusOnly', or 'never'
@@ -8196,7 +8197,7 @@
8196
8197
  InputNumberPickerComponent.decorators = [
8197
8198
  { type: i0.Component, args: [{
8198
8199
  selector: 'co-input-number-picker',
8199
- template: "\n <div class=\"icon-wrapper\" *ngIf=\"leftIconData\">\n <co-icon class=\"input-number-picker-icon\" [iconData]=\"leftIconData\" (click)=\"iconClick.emit($event)\"></co-icon>\n <div class=\"spacer\"></div>\n </div>\n <div class=\"button-wrapper\">\n <co-button *ngIf=\"showButtons\" class=\"minus-operator\" [class.select]=\"minSelected\" tabindex=\"-1\"\n [disabled]=\"readonly\"\n [iconData]=\"iconCacheService.getIcon(minusIcon)\"\n (mousedown)=\"onMinusMouseDown($event)\"\n (mouseup)=\"stopAutoCounting()\" (mouseleave)=\"stopAutoCounting()\"></co-button>\n </div>\n <input type=\"text\"\n [tabIndex]=\"readonly ? -1 : 0\"\n [ngModel]=\"model\"\n [readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [required]=\"required\"\n [placeholder]=\"label\"\n (ngModelChange)=\"handleChangeModel($event)\"\n (keydown)=\"handleInputKeyDown($event)\"\n (blur)=\"handleBlur()\"/>\n <div class=\"button-wrapper\">\n <co-button *ngIf=\"showButtons\" class=\"plus-operator\" [class.select]=\"plusSelected\" tabindex=\"-1\"\n [disabled]=\"readonly\"\n [iconData]=\"iconCacheService.getIcon(plusIcon)\"\n (mousedown)=\"onPlusMouseDown($event)\"\n (mouseup)=\"stopAutoCounting()\" (mouseleave)=\"stopAutoCounting()\"></co-button>\n </div>\n ",
8200
+ template: "\n <div class=\"icon-wrapper\" *ngIf=\"leftIconData\">\n <co-icon class=\"input-number-picker-icon\" [iconData]=\"leftIconData\" (click)=\"iconClick.emit($event)\"></co-icon>\n <div class=\"spacer\"></div>\n </div>\n <div class=\"button-wrapper\">\n <co-button *ngIf=\"showButtons\" class=\"minus-operator\" [class.select]=\"minSelected\" tabindex=\"-1\"\n [disabled]=\"readonly\"\n [iconData]=\"iconCacheService.getIcon(minusIcon)\"\n (mousedown)=\"onMinusMouseDown($event)\"\n (mouseup)=\"stopAutoCounting()\" (mouseleave)=\"stopAutoCounting()\"></co-button>\n </div>\n <div class=\"input-wrapper\">\n <span class='permanent-label' [textContent]=\"label\" *ngIf=\"showPermanentLabel\"></span>\n <input type=\"text\"\n [tabIndex]=\"readonly ? -1 : 0\"\n [ngModel]=\"model\"\n [readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [required]=\"required\"\n [placeholder]=\"label\"\n (ngModelChange)=\"handleChangeModel($event)\"\n (keydown)=\"handleInputKeyDown($event)\"\n (blur)=\"handleBlur()\"/>\n </div>\n <div class=\"button-wrapper\">\n <co-button *ngIf=\"showButtons\" class=\"plus-operator\" [class.select]=\"plusSelected\" tabindex=\"-1\"\n [disabled]=\"readonly\"\n [iconData]=\"iconCacheService.getIcon(plusIcon)\"\n (mousedown)=\"onPlusMouseDown($event)\"\n (mouseup)=\"stopAutoCounting()\" (mouseleave)=\"stopAutoCounting()\"></co-button>\n </div>\n ",
8200
8201
  providers: [
8201
8202
  OverlayService, {
8202
8203
  provide: SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME, useExisting: i0.forwardRef(function () { return InputNumberPickerComponent; })
@@ -8223,6 +8224,7 @@
8223
8224
  InputNumberPickerComponent.propDecorators = {
8224
8225
  model: [{ type: i0.Input }],
8225
8226
  modelChangeOnEnter: [{ type: i0.Input }],
8227
+ showPermanentLabel: [{ type: i0.Input }],
8226
8228
  leftIconData: [{ type: i0.HostBinding, args: ['class.has-icon',] }, { type: i0.Input }],
8227
8229
  min: [{ type: i0.Input }],
8228
8230
  step: [{ type: i0.Input }],
@@ -10541,7 +10543,39 @@
10541
10543
  this.headerColumnsCopy = this.headerColumns;
10542
10544
  };
10543
10545
  SimpleGridComponent.prototype.exportToExcel = function () {
10544
- this.excelExportService.exportTableToExcel('simple-grid-table', 'ExcelSheet', 'Sheet1');
10546
+ this.isSettingsMenuOpen = false;
10547
+ var columns = this.headerColumnsCopy.map(function (column) {
10548
+ return ({
10549
+ key: column.field,
10550
+ header: column.headerText
10551
+ });
10552
+ });
10553
+ var headers = columns.map(function (col) { return col.header; });
10554
+ var rows = this.data.map(function (row) { return columns.map(function (col) {
10555
+ var value = row[col.key];
10556
+ if (value instanceof Date) {
10557
+ var pad = function (n) { return String(n).padStart(2, '0'); };
10558
+ return value.getFullYear() + "-" + pad(value.getMonth() + 1) + "-" + pad(value.getDate()) + "T" + pad(value.getHours()) + ":" + pad(value.getMinutes()) + ":" + pad(value.getSeconds());
10559
+ }
10560
+ else if (Array.isArray(value)) {
10561
+ return value.join(', ');
10562
+ }
10563
+ else if (typeof value === 'object' && value !== null) {
10564
+ return JSON.stringify(value);
10565
+ }
10566
+ else {
10567
+ return String(value !== null && value !== void 0 ? value : '');
10568
+ }
10569
+ }); });
10570
+ var csvContent = __spreadArray([headers], __read(rows)).map(function (row) { return row.map(function (cell) { return "\"" + cell.replace(/"/g, '""') + "\""; }).join(','); }).join('\r\n');
10571
+ var blob = new Blob([csvContent], { type: 'text/csv;charset=utf-8;' });
10572
+ var link = document.createElement('a');
10573
+ var url = URL.createObjectURL(blob);
10574
+ link.href = url;
10575
+ link.setAttribute('download', 'ExcelSheet');
10576
+ document.body.appendChild(link);
10577
+ link.click();
10578
+ document.body.removeChild(link);
10545
10579
  };
10546
10580
  SimpleGridComponent.prototype.prepareDataRow = function (row, index) {
10547
10581
  this.isRowDisabled(row, index);