@colijnit/corecomponents_v12 258.1.8 → 258.1.9
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 +40 -15
- package/bundles/colijnit-corecomponents_v12.umd.js.map +1 -1
- package/colijnit-corecomponents_v12.metadata.json +1 -1
- package/esm2015/lib/components/input-number-picker/input-number-picker.component.js +16 -11
- package/esm2015/lib/components/simple-grid/simple-grid.component.js +24 -17
- package/esm2015/lib/service/excel-export.service.js +5 -2
- package/fesm2015/colijnit-corecomponents_v12.js +42 -27
- package/fesm2015/colijnit-corecomponents_v12.js.map +1 -1
- package/lib/components/input-number-picker/input-number-picker.component.d.ts +1 -0
- package/lib/components/input-number-picker/style/_layout.scss +14 -1
- package/lib/components/simple-grid/simple-grid.component.d.ts +2 -2
- package/lib/components/simple-grid/style/_layout.scss +5 -0
- package/lib/service/excel-export.service.d.ts +1 -0
- package/package.json +1 -1
|
@@ -7450,6 +7450,7 @@ class InputNumberPickerComponent extends BaseInputComponent {
|
|
|
7450
7450
|
this.ngZoneWrapper = ngZoneWrapper;
|
|
7451
7451
|
this.elementRef = elementRef;
|
|
7452
7452
|
this.modelChangeOnEnter = true;
|
|
7453
|
+
this.showPermanentLabel = false;
|
|
7453
7454
|
this.minusIcon = CoreComponentsIcon.MinusSimple;
|
|
7454
7455
|
this.plusIcon = CoreComponentsIcon.PlusSimple;
|
|
7455
7456
|
// Whether to show buttons 'always', 'onFocusOnly', or 'never'
|
|
@@ -7675,16 +7676,19 @@ InputNumberPickerComponent.decorators = [
|
|
|
7675
7676
|
(mousedown)="onMinusMouseDown($event)"
|
|
7676
7677
|
(mouseup)="stopAutoCounting()" (mouseleave)="stopAutoCounting()"></co-button>
|
|
7677
7678
|
</div>
|
|
7678
|
-
<
|
|
7679
|
-
|
|
7680
|
-
|
|
7681
|
-
|
|
7682
|
-
|
|
7683
|
-
|
|
7684
|
-
|
|
7685
|
-
|
|
7686
|
-
|
|
7687
|
-
|
|
7679
|
+
<div class="input-wrapper">
|
|
7680
|
+
<span class='permanent-label' [textContent]="label" *ngIf="showPermanentLabel"></span>
|
|
7681
|
+
<input type="text"
|
|
7682
|
+
[tabIndex]="readonly ? -1 : 0"
|
|
7683
|
+
[ngModel]="model"
|
|
7684
|
+
[readonly]="readonly"
|
|
7685
|
+
[disabled]="disabled"
|
|
7686
|
+
[required]="required"
|
|
7687
|
+
[placeholder]="label"
|
|
7688
|
+
(ngModelChange)="handleChangeModel($event)"
|
|
7689
|
+
(keydown)="handleInputKeyDown($event)"
|
|
7690
|
+
(blur)="handleBlur()"/>
|
|
7691
|
+
</div>
|
|
7688
7692
|
<div class="button-wrapper">
|
|
7689
7693
|
<co-button *ngIf="showButtons" class="plus-operator" [class.select]="plusSelected" tabindex="-1"
|
|
7690
7694
|
[disabled]="readonly"
|
|
@@ -7719,6 +7723,7 @@ InputNumberPickerComponent.ctorParameters = () => [
|
|
|
7719
7723
|
InputNumberPickerComponent.propDecorators = {
|
|
7720
7724
|
model: [{ type: Input }],
|
|
7721
7725
|
modelChangeOnEnter: [{ type: Input }],
|
|
7726
|
+
showPermanentLabel: [{ type: Input }],
|
|
7722
7727
|
leftIconData: [{ type: HostBinding, args: ['class.has-icon',] }, { type: Input }],
|
|
7723
7728
|
min: [{ type: Input }],
|
|
7724
7729
|
step: [{ type: Input }],
|
|
@@ -9490,7 +9495,7 @@ class ExcelExportService {
|
|
|
9490
9495
|
exportData = data.map(item => {
|
|
9491
9496
|
const newItem = {};
|
|
9492
9497
|
columns.forEach(col => {
|
|
9493
|
-
newItem[col.header] = this.
|
|
9498
|
+
newItem[col.header] = this.getFlatValue(item, col.key);
|
|
9494
9499
|
});
|
|
9495
9500
|
return newItem;
|
|
9496
9501
|
});
|
|
@@ -9562,6 +9567,9 @@ class ExcelExportService {
|
|
|
9562
9567
|
return current && current[key] !== undefined ? current[key] : '';
|
|
9563
9568
|
}, obj);
|
|
9564
9569
|
}
|
|
9570
|
+
getFlatValue(obj, key) {
|
|
9571
|
+
return obj && obj[key] !== undefined ? obj[key] : '';
|
|
9572
|
+
}
|
|
9565
9573
|
/**
|
|
9566
9574
|
* Format date for Excel export
|
|
9567
9575
|
* @param date - Date to format
|
|
@@ -9619,8 +9627,8 @@ class SimpleGridComponent extends BaseSimpleGridComponent {
|
|
|
9619
9627
|
this.selectedRowIndex = -1;
|
|
9620
9628
|
this.currentPage = 1;
|
|
9621
9629
|
this.sortDirection = 'asc';
|
|
9622
|
-
this.Icons = CoreComponentsIcon;
|
|
9623
9630
|
this.hoveredRowIndex = -1;
|
|
9631
|
+
this.Icons = CoreComponentsIcon;
|
|
9624
9632
|
this._doubleClicked = false;
|
|
9625
9633
|
this._newRow = false;
|
|
9626
9634
|
this.IconCacheService = IconCacheService;
|
|
@@ -9783,16 +9791,19 @@ class SimpleGridComponent extends BaseSimpleGridComponent {
|
|
|
9783
9791
|
this._resetDblClick();
|
|
9784
9792
|
});
|
|
9785
9793
|
}
|
|
9786
|
-
editRow(event, selectCell = true) {
|
|
9787
|
-
this
|
|
9788
|
-
|
|
9789
|
-
|
|
9790
|
-
|
|
9791
|
-
this.
|
|
9792
|
-
|
|
9793
|
-
|
|
9794
|
-
|
|
9795
|
-
|
|
9794
|
+
editRow(event, selectCell = true, rowIndex) {
|
|
9795
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
9796
|
+
if (rowIndex !== undefined) {
|
|
9797
|
+
this.selectTheRow(rowIndex, false);
|
|
9798
|
+
}
|
|
9799
|
+
this.editRowIndex = this.selectedRowIndex;
|
|
9800
|
+
this.rowToEdit = this.data[this.editRowIndex];
|
|
9801
|
+
this.editing = true;
|
|
9802
|
+
if (selectCell) {
|
|
9803
|
+
this.editCellIndex = yield this._nextAvailableCellToEdit(true);
|
|
9804
|
+
}
|
|
9805
|
+
this._detectChanges();
|
|
9806
|
+
});
|
|
9796
9807
|
}
|
|
9797
9808
|
handleCellClick(event, row, rowIndex, cellIndex) {
|
|
9798
9809
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -9882,7 +9893,14 @@ class SimpleGridComponent extends BaseSimpleGridComponent {
|
|
|
9882
9893
|
this.headerColumnsCopy = this.headerColumns;
|
|
9883
9894
|
}
|
|
9884
9895
|
exportToExcel() {
|
|
9885
|
-
this.
|
|
9896
|
+
this.isSettingsMenuOpen = false;
|
|
9897
|
+
const columns = this.headerColumnsCopy.map(column => {
|
|
9898
|
+
return ({
|
|
9899
|
+
key: column.field,
|
|
9900
|
+
header: column.headerText
|
|
9901
|
+
});
|
|
9902
|
+
});
|
|
9903
|
+
this.excelExportService.exportToExcel(this.data, columns, 'ExcelSheet', 'Sheet1');
|
|
9886
9904
|
}
|
|
9887
9905
|
prepareDataRow(row, index) {
|
|
9888
9906
|
this.isRowDisabled(row, index);
|
|
@@ -10170,8 +10188,7 @@ SimpleGridComponent.decorators = [
|
|
|
10170
10188
|
<div class="icons-container" *ngIf="!editing">
|
|
10171
10189
|
<co-icon class="icon-item icon-edit"
|
|
10172
10190
|
[iconData]="icons.getIcon(Icons.PenToSquareSolid)" *ngIf="hoveredRowIndex === rowIndex"
|
|
10173
|
-
(click)="editRow($event)"></co-icon>
|
|
10174
|
-
|
|
10191
|
+
(click)="editRow($event, true, rowIndex); $event.stopPropagation()"></co-icon>
|
|
10175
10192
|
<co-icon class="icon-item icon-delete"
|
|
10176
10193
|
[iconData]="icons.getIcon(Icons.TrashBin)" *ngIf="hoveredRowIndex === rowIndex"
|
|
10177
10194
|
(click)="removeRow()"></co-icon>
|
|
@@ -10181,7 +10198,6 @@ SimpleGridComponent.decorators = [
|
|
|
10181
10198
|
*ngIf="editing && (selectedRowIndex === rowIndex || (isNewRow && rowIndex === editRowIndex))"
|
|
10182
10199
|
[iconData]="icons.getIcon(Icons.CheckDuotone)"
|
|
10183
10200
|
(click)="validateAndSave(); $event.stopPropagation()"></co-button>
|
|
10184
|
-
|
|
10185
10201
|
<co-button class="close-button"
|
|
10186
10202
|
*ngIf="editing && (selectedRowIndex === rowIndex || (isNewRow && rowIndex === editRowIndex))"
|
|
10187
10203
|
[iconData]="icons.getIcon(Icons.CrossSkinny)"
|
|
@@ -10193,7 +10209,6 @@ SimpleGridComponent.decorators = [
|
|
|
10193
10209
|
</co-form>
|
|
10194
10210
|
</tbody>
|
|
10195
10211
|
</table>
|
|
10196
|
-
|
|
10197
10212
|
<co-pagination-bar
|
|
10198
10213
|
*ngIf="data?.length > rowsPerPage" class="pagination-bar"
|
|
10199
10214
|
[itemsPerPage]="rowsPerPage"
|