@colijnit/corecomponents_v12 259.1.13 → 259.1.15
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 +15 -2
- package/bundles/colijnit-corecomponents_v12.umd.js.map +1 -1
- package/colijnit-corecomponents_v12.metadata.json +1 -1
- package/esm2015/lib/components/double-calendar/double-calendar.component.js +13 -1
- package/esm2015/lib/components/simple-grid/simple-grid-cell.component.js +31 -31
- package/esm2015/lib/components/simple-grid/simple-grid.component.js +173 -172
- package/fesm2015/colijnit-corecomponents_v12.js +214 -201
- package/fesm2015/colijnit-corecomponents_v12.js.map +1 -1
- package/lib/components/card/style/_layout.scss +25 -2
- package/lib/components/double-calendar/double-calendar.component.d.ts +1 -0
- package/package.json +1 -1
|
@@ -6993,6 +6993,7 @@ class DoubleCalendarComponent extends BaseInputDatePickerDirective {
|
|
|
6993
6993
|
}
|
|
6994
6994
|
}
|
|
6995
6995
|
this.outputRangeIfValid();
|
|
6996
|
+
this._closeIfRangeComplete();
|
|
6996
6997
|
}
|
|
6997
6998
|
handleSecondDateSelected(date) {
|
|
6998
6999
|
this.selectedSecondDate = date;
|
|
@@ -7008,6 +7009,7 @@ class DoubleCalendarComponent extends BaseInputDatePickerDirective {
|
|
|
7008
7009
|
this.outputRangeIfValid();
|
|
7009
7010
|
this.secondDateSelected.next();
|
|
7010
7011
|
}
|
|
7012
|
+
this._closeIfRangeComplete();
|
|
7011
7013
|
}
|
|
7012
7014
|
outputRangeIfValid() {
|
|
7013
7015
|
if (this.selectedDates[0] instanceof Date && this.selectedDates[1] instanceof Date) {
|
|
@@ -7024,6 +7026,16 @@ class DoubleCalendarComponent extends BaseInputDatePickerDirective {
|
|
|
7024
7026
|
// Emit updated state to parent
|
|
7025
7027
|
this.datesSelected.emit(this.selectedDates);
|
|
7026
7028
|
}
|
|
7029
|
+
_closeIfRangeComplete() {
|
|
7030
|
+
if (this.selectedFirstDate instanceof Date && this.selectedSecondDate instanceof Date) {
|
|
7031
|
+
// emit the selected range (keeps current behavior)
|
|
7032
|
+
this.outputRangeIfValid();
|
|
7033
|
+
// optional: keep your “second date chosen” signal
|
|
7034
|
+
this.secondDateSelected.next();
|
|
7035
|
+
// close the overlay/popup
|
|
7036
|
+
this.clickedOutside.emit();
|
|
7037
|
+
}
|
|
7038
|
+
}
|
|
7027
7039
|
}
|
|
7028
7040
|
DoubleCalendarComponent.decorators = [
|
|
7029
7041
|
{ type: Component, args: [{
|
|
@@ -9636,6 +9648,7 @@ class SimpleGridComponent extends BaseSimpleGridComponent {
|
|
|
9636
9648
|
this.rowToEdit = this._newRowReference;
|
|
9637
9649
|
this.editCellIndex = yield this._nextAvailableCellToEdit(true);
|
|
9638
9650
|
}
|
|
9651
|
+
this.addRow.next();
|
|
9639
9652
|
this._detectChanges();
|
|
9640
9653
|
}
|
|
9641
9654
|
}
|
|
@@ -10063,177 +10076,177 @@ class SimpleGridComponent extends BaseSimpleGridComponent {
|
|
|
10063
10076
|
SimpleGridComponent.decorators = [
|
|
10064
10077
|
{ type: Component, args: [{
|
|
10065
10078
|
selector: 'co-simple-grid',
|
|
10066
|
-
template: `
|
|
10067
|
-
<co-grid-toolbar
|
|
10068
|
-
*ngIf="showToolbar" [class.right]="rightToolbar"
|
|
10069
|
-
[showEdit]="showEdit"
|
|
10070
|
-
[showAdd]="showAdd"
|
|
10071
|
-
[showDelete]="showDelete"
|
|
10072
|
-
[deleteEnabled]="selectedRowIndex > -1"
|
|
10073
|
-
(addClick)="addNewRow()"
|
|
10074
|
-
(editClick)="editRow($event)"
|
|
10075
|
-
(saveClick)="validateAndSave()"
|
|
10076
|
-
(cancelClick)="cancelEditRow()"
|
|
10077
|
-
(deleteClick)="removeRow()">
|
|
10078
|
-
</co-grid-toolbar>
|
|
10079
|
-
|
|
10080
|
-
<table
|
|
10081
|
-
id="simple-grid-table"
|
|
10082
|
-
class="simple-grid-table"
|
|
10083
|
-
[clickOutside]="editing"
|
|
10084
|
-
(clickOutside)="handleClickOutsideRow()">
|
|
10085
|
-
<colgroup>
|
|
10086
|
-
<col
|
|
10087
|
-
*ngFor="let column of headerColumnsCopy; let index = index"
|
|
10088
|
-
[class.simple-grid-column-auto-fit]="column.autoFit"
|
|
10089
|
-
[style.width.px]="column.width"
|
|
10090
|
-
[style.min-width.px]="MIN_COLUMN_WIDTH">
|
|
10091
|
-
</colgroup>
|
|
10092
|
-
<thead>
|
|
10093
|
-
<tr>
|
|
10094
|
-
<th
|
|
10095
|
-
scope="col"
|
|
10096
|
-
#headerCell
|
|
10097
|
-
class="simple-grid-column-header"
|
|
10098
|
-
*ngFor="let column of headerColumnsCopy; let index = index">
|
|
10099
|
-
<div
|
|
10100
|
-
class="simple-grid-column-header-wrapper"
|
|
10101
|
-
[class.resizable]="resizable"
|
|
10102
|
-
[class.selected]="column.isSelected"
|
|
10103
|
-
[ngClass]="column.textAlign ? column.textAlign : defaultTextAlign">
|
|
10104
|
-
<ng-container *ngIf="column.headerTemplate; else noHeaderTemplate">
|
|
10105
|
-
<ng-container [ngTemplateOutlet]="column.headerTemplate"></ng-container>
|
|
10106
|
-
</ng-container>
|
|
10107
|
-
<ng-template #noHeaderTemplate>
|
|
10108
|
-
<div
|
|
10109
|
-
class="simple-grid-column-header-label"
|
|
10110
|
-
[ngClass]="column.textAlign ? column.textAlign : defaultTextAlign"
|
|
10111
|
-
[class.with-menu]="showGridSettings"
|
|
10112
|
-
[class.with-sort]="showColumnSort"
|
|
10113
|
-
[textContent]="column.headerText || ' '"
|
|
10114
|
-
(click)="showColumnSort ? sortColumn(column, column.field) : toggleColumnMenu(column)">
|
|
10115
|
-
</div>
|
|
10116
|
-
|
|
10117
|
-
<div class="sort-column" *ngIf="showColumnSort">
|
|
10118
|
-
<co-button
|
|
10119
|
-
(click)="sortColumn(column, column?.field)"
|
|
10120
|
-
[iconData]="icons.getIcon(Icons.ArrowUpArrowDown)">
|
|
10121
|
-
</co-button>
|
|
10122
|
-
</div>
|
|
10123
|
-
|
|
10124
|
-
<div class="column-menu" *ngIf="column.isSelected">
|
|
10125
|
-
<h3 [textContent]="'COLUMN_OPTIONS' | coreLocalize"></h3>
|
|
10126
|
-
<ul>
|
|
10127
|
-
<li (click)="hideColumn(column)">Hide Column</li>
|
|
10128
|
-
<li (click)="sortColumn(column, column.field)">Sort Column</li>
|
|
10129
|
-
</ul>
|
|
10130
|
-
</div>
|
|
10131
|
-
</ng-template>
|
|
10132
|
-
<div
|
|
10133
|
-
*ngIf="resizable && column.resizable"
|
|
10134
|
-
class="simple-grid-column-sizer"
|
|
10135
|
-
(mousedown)="handleSizerMouseDown($event, column)">
|
|
10136
|
-
</div>
|
|
10137
|
-
</div>
|
|
10138
|
-
</th>
|
|
10139
|
-
</tr>
|
|
10140
|
-
|
|
10141
|
-
<div *ngIf="showGridSettings" class="grid-settings">
|
|
10142
|
-
<co-button
|
|
10143
|
-
[class.selected]="isSettingsMenuOpen"
|
|
10144
|
-
[iconData]="icons.getIcon(Icons.CogWheels)"
|
|
10145
|
-
(click)="toggleSettingsMenu()">
|
|
10146
|
-
</co-button>
|
|
10147
|
-
|
|
10148
|
-
<div class="settings-menu" *ngIf="isSettingsMenuOpen">
|
|
10149
|
-
<h3 [textContent]="'GRID_OPTIONS' | coreLocalize"></h3>
|
|
10150
|
-
<ul>
|
|
10151
|
-
<li (click)="exportToExcel()">Export to Excel</li>
|
|
10152
|
-
<li *ngIf="headerColumnsCopy.length !== headerColumns.length" (click)="showAllColumns()">
|
|
10153
|
-
Show All Columns
|
|
10154
|
-
</li>
|
|
10155
|
-
</ul>
|
|
10156
|
-
</div>
|
|
10157
|
-
</div>
|
|
10158
|
-
</thead>
|
|
10159
|
-
<tbody
|
|
10160
|
-
#dropList cdkDropList cdkDropListOrientation="vertical"
|
|
10161
|
-
class="simple-grid-drag-drop-list"
|
|
10162
|
-
[cdkDropListDisabled]="!dragDropEnabled || editing"
|
|
10163
|
-
[cdkDropListData]="data"
|
|
10164
|
-
[cdkDropListEnterPredicate]="handleCanDragDrop"
|
|
10165
|
-
(cdkDropListDropped)="handleDrop($event)">
|
|
10166
|
-
<co-form class="simple-grid-row-form">
|
|
10167
|
-
<tr
|
|
10168
|
-
#rowElement
|
|
10169
|
-
class="simple-grid-row"
|
|
10170
|
-
[class.selected]="rowIndex === selectedRowIndex && !editing" observeVisibility
|
|
10171
|
-
[class.disabled]="getIsRowDisabled(rowIndex)"
|
|
10172
|
-
[class.editing]="rowIndex === editRowIndex"
|
|
10173
|
-
*ngFor="let row of (!!rowsPerPage ? (data | paginate: {itemsPerPage: rowsPerPage, currentPage: currentPage}) : data); last as last; let rowIndex = index"
|
|
10174
|
-
cdkDrag
|
|
10175
|
-
(click)="handleClickRow($event, rowIndex)" (dblclick)="handleDblClickRow($event, rowIndex, row)"
|
|
10176
|
-
(visibilityChange)="rowVisible.next(row)"
|
|
10177
|
-
(mouseenter)="hoveredRowIndex = rowIndex"
|
|
10178
|
-
(mouseleave)="hoveredRowIndex = -1"
|
|
10179
|
-
>
|
|
10180
|
-
<ng-container *ngIf="isSingleColumnRow(row)">
|
|
10181
|
-
<td class="simple-grid-single-column-cell" [attr.colspan]="headerColumnsCopy.length">
|
|
10182
|
-
<co-simple-grid-cell
|
|
10183
|
-
[column]="columns[singleColumnIndex(row)]"
|
|
10184
|
-
[row]="row"
|
|
10185
|
-
[editMode]="false">
|
|
10186
|
-
</co-simple-grid-cell>
|
|
10187
|
-
</td>
|
|
10188
|
-
</ng-container>
|
|
10189
|
-
<ng-container *ngIf="!isSingleColumnRow(row)">
|
|
10190
|
-
<ng-container *ngFor="let column of headerColumnsCopy; let columnIndex = index">
|
|
10191
|
-
<td class="simple-grid-column-cell" *ngIf="columnIndex !== singleColumnIndex(row)">
|
|
10192
|
-
<co-simple-grid-cell
|
|
10193
|
-
[column]="column"
|
|
10194
|
-
[row]="row"
|
|
10195
|
-
[editMode]="inlineEdit && editing && rowIndex === editRowIndex"
|
|
10196
|
-
[fieldEditMode]="editCellIndex === columnIndex && rowIndex === editRowIndex"
|
|
10197
|
-
(cellClick)="handleCellClick($event, row, rowIndex, columnIndex)">
|
|
10198
|
-
</co-simple-grid-cell>
|
|
10199
|
-
<div *ngIf="column.resizable" class="simple-grid-column-sizer-placeholder"></div>
|
|
10200
|
-
</td>
|
|
10201
|
-
</ng-container>
|
|
10202
|
-
<ng-container *ngIf="inlineEdit && showRowButtons">
|
|
10203
|
-
<div class="icons-container" *ngIf="!editing">
|
|
10204
|
-
<co-icon class="icon-item icon-edit"
|
|
10205
|
-
[iconData]="icons.getIcon(Icons.PenToSquareSolid)" *ngIf="hoveredRowIndex === rowIndex"
|
|
10206
|
-
(click)="editRow($event, true, rowIndex); $event.stopPropagation()"></co-icon>
|
|
10207
|
-
<co-icon class="icon-item icon-delete"
|
|
10208
|
-
[iconData]="icons.getIcon(Icons.TrashBin)" *ngIf="hoveredRowIndex === rowIndex"
|
|
10209
|
-
(click)="selectTheRow(rowIndex); removeRow();"></co-icon>
|
|
10210
|
-
</div>
|
|
10211
|
-
<div class="icons-container">
|
|
10212
|
-
<co-button class="save-button"
|
|
10213
|
-
*ngIf="editing && (selectedRowIndex === rowIndex || (isNewRow && rowIndex === editRowIndex))"
|
|
10214
|
-
[iconData]="icons.getIcon(Icons.CheckDuotone)"
|
|
10215
|
-
(click)="validateAndSave(); $event.stopPropagation()"></co-button>
|
|
10216
|
-
<co-button class="close-button"
|
|
10217
|
-
*ngIf="editing && (selectedRowIndex === rowIndex || (isNewRow && rowIndex === editRowIndex))"
|
|
10218
|
-
[iconData]="icons.getIcon(Icons.CrossSkinny)"
|
|
10219
|
-
(click)="cancelEditRow(); $event.stopPropagation() "></co-button>
|
|
10220
|
-
</div>
|
|
10221
|
-
</ng-container>
|
|
10222
|
-
</ng-container>
|
|
10223
|
-
</tr>
|
|
10224
|
-
</co-form>
|
|
10225
|
-
</tbody>
|
|
10226
|
-
</table>
|
|
10227
|
-
<co-pagination-bar
|
|
10228
|
-
*ngIf="data?.length > rowsPerPage" class="pagination-bar"
|
|
10229
|
-
[itemsPerPage]="rowsPerPage"
|
|
10230
|
-
[currentPage]="currentPage"
|
|
10231
|
-
[totalItems]="data.length"
|
|
10232
|
-
[autoHide]="true"
|
|
10233
|
-
(previousClick)="goToPreviousPage()"
|
|
10234
|
-
(nextClick)="goToNextPage()"
|
|
10235
|
-
(pageClick)="setCurrentPage($event)">
|
|
10236
|
-
</co-pagination-bar>
|
|
10079
|
+
template: `
|
|
10080
|
+
<co-grid-toolbar
|
|
10081
|
+
*ngIf="showToolbar" [class.right]="rightToolbar"
|
|
10082
|
+
[showEdit]="showEdit"
|
|
10083
|
+
[showAdd]="showAdd"
|
|
10084
|
+
[showDelete]="showDelete"
|
|
10085
|
+
[deleteEnabled]="selectedRowIndex > -1"
|
|
10086
|
+
(addClick)="addNewRow()"
|
|
10087
|
+
(editClick)="editRow($event)"
|
|
10088
|
+
(saveClick)="validateAndSave()"
|
|
10089
|
+
(cancelClick)="cancelEditRow()"
|
|
10090
|
+
(deleteClick)="removeRow()">
|
|
10091
|
+
</co-grid-toolbar>
|
|
10092
|
+
|
|
10093
|
+
<table
|
|
10094
|
+
id="simple-grid-table"
|
|
10095
|
+
class="simple-grid-table"
|
|
10096
|
+
[clickOutside]="editing"
|
|
10097
|
+
(clickOutside)="handleClickOutsideRow()">
|
|
10098
|
+
<colgroup>
|
|
10099
|
+
<col
|
|
10100
|
+
*ngFor="let column of headerColumnsCopy; let index = index"
|
|
10101
|
+
[class.simple-grid-column-auto-fit]="column.autoFit"
|
|
10102
|
+
[style.width.px]="column.width"
|
|
10103
|
+
[style.min-width.px]="MIN_COLUMN_WIDTH">
|
|
10104
|
+
</colgroup>
|
|
10105
|
+
<thead>
|
|
10106
|
+
<tr>
|
|
10107
|
+
<th
|
|
10108
|
+
scope="col"
|
|
10109
|
+
#headerCell
|
|
10110
|
+
class="simple-grid-column-header"
|
|
10111
|
+
*ngFor="let column of headerColumnsCopy; let index = index">
|
|
10112
|
+
<div
|
|
10113
|
+
class="simple-grid-column-header-wrapper"
|
|
10114
|
+
[class.resizable]="resizable"
|
|
10115
|
+
[class.selected]="column.isSelected"
|
|
10116
|
+
[ngClass]="column.textAlign ? column.textAlign : defaultTextAlign">
|
|
10117
|
+
<ng-container *ngIf="column.headerTemplate; else noHeaderTemplate">
|
|
10118
|
+
<ng-container [ngTemplateOutlet]="column.headerTemplate"></ng-container>
|
|
10119
|
+
</ng-container>
|
|
10120
|
+
<ng-template #noHeaderTemplate>
|
|
10121
|
+
<div
|
|
10122
|
+
class="simple-grid-column-header-label"
|
|
10123
|
+
[ngClass]="column.textAlign ? column.textAlign : defaultTextAlign"
|
|
10124
|
+
[class.with-menu]="showGridSettings"
|
|
10125
|
+
[class.with-sort]="showColumnSort"
|
|
10126
|
+
[textContent]="column.headerText || ' '" [title]="column.headerText"
|
|
10127
|
+
(click)="showColumnSort ? sortColumn(column, column.field) : toggleColumnMenu(column)">
|
|
10128
|
+
</div>
|
|
10129
|
+
|
|
10130
|
+
<div class="sort-column" *ngIf="showColumnSort">
|
|
10131
|
+
<co-button
|
|
10132
|
+
(click)="sortColumn(column, column?.field)"
|
|
10133
|
+
[iconData]="icons.getIcon(Icons.ArrowUpArrowDown)">
|
|
10134
|
+
</co-button>
|
|
10135
|
+
</div>
|
|
10136
|
+
|
|
10137
|
+
<div class="column-menu" *ngIf="column.isSelected">
|
|
10138
|
+
<h3 [textContent]="'COLUMN_OPTIONS' | coreLocalize"></h3>
|
|
10139
|
+
<ul>
|
|
10140
|
+
<li (click)="hideColumn(column)">Hide Column</li>
|
|
10141
|
+
<li (click)="sortColumn(column, column.field)">Sort Column</li>
|
|
10142
|
+
</ul>
|
|
10143
|
+
</div>
|
|
10144
|
+
</ng-template>
|
|
10145
|
+
<div
|
|
10146
|
+
*ngIf="resizable && column.resizable"
|
|
10147
|
+
class="simple-grid-column-sizer"
|
|
10148
|
+
(mousedown)="handleSizerMouseDown($event, column)">
|
|
10149
|
+
</div>
|
|
10150
|
+
</div>
|
|
10151
|
+
</th>
|
|
10152
|
+
</tr>
|
|
10153
|
+
|
|
10154
|
+
<div *ngIf="showGridSettings" class="grid-settings">
|
|
10155
|
+
<co-button
|
|
10156
|
+
[class.selected]="isSettingsMenuOpen"
|
|
10157
|
+
[iconData]="icons.getIcon(Icons.CogWheels)"
|
|
10158
|
+
(click)="toggleSettingsMenu()">
|
|
10159
|
+
</co-button>
|
|
10160
|
+
|
|
10161
|
+
<div class="settings-menu" *ngIf="isSettingsMenuOpen">
|
|
10162
|
+
<h3 [textContent]="'GRID_OPTIONS' | coreLocalize"></h3>
|
|
10163
|
+
<ul>
|
|
10164
|
+
<li (click)="exportToExcel()">Export to Excel</li>
|
|
10165
|
+
<li *ngIf="headerColumnsCopy.length !== headerColumns.length" (click)="showAllColumns()">
|
|
10166
|
+
Show All Columns
|
|
10167
|
+
</li>
|
|
10168
|
+
</ul>
|
|
10169
|
+
</div>
|
|
10170
|
+
</div>
|
|
10171
|
+
</thead>
|
|
10172
|
+
<tbody
|
|
10173
|
+
#dropList cdkDropList cdkDropListOrientation="vertical"
|
|
10174
|
+
class="simple-grid-drag-drop-list"
|
|
10175
|
+
[cdkDropListDisabled]="!dragDropEnabled || editing"
|
|
10176
|
+
[cdkDropListData]="data"
|
|
10177
|
+
[cdkDropListEnterPredicate]="handleCanDragDrop"
|
|
10178
|
+
(cdkDropListDropped)="handleDrop($event)">
|
|
10179
|
+
<co-form class="simple-grid-row-form">
|
|
10180
|
+
<tr
|
|
10181
|
+
#rowElement
|
|
10182
|
+
class="simple-grid-row"
|
|
10183
|
+
[class.selected]="rowIndex === selectedRowIndex && !editing" observeVisibility
|
|
10184
|
+
[class.disabled]="getIsRowDisabled(rowIndex)"
|
|
10185
|
+
[class.editing]="rowIndex === editRowIndex"
|
|
10186
|
+
*ngFor="let row of (!!rowsPerPage ? (data | paginate: {itemsPerPage: rowsPerPage, currentPage: currentPage}) : data); last as last; let rowIndex = index"
|
|
10187
|
+
cdkDrag
|
|
10188
|
+
(click)="handleClickRow($event, rowIndex)" (dblclick)="handleDblClickRow($event, rowIndex, row)"
|
|
10189
|
+
(visibilityChange)="rowVisible.next(row)"
|
|
10190
|
+
(mouseenter)="hoveredRowIndex = rowIndex"
|
|
10191
|
+
(mouseleave)="hoveredRowIndex = -1"
|
|
10192
|
+
>
|
|
10193
|
+
<ng-container *ngIf="isSingleColumnRow(row)">
|
|
10194
|
+
<td class="simple-grid-single-column-cell" [attr.colspan]="headerColumnsCopy.length">
|
|
10195
|
+
<co-simple-grid-cell
|
|
10196
|
+
[column]="columns[singleColumnIndex(row)]"
|
|
10197
|
+
[row]="row"
|
|
10198
|
+
[editMode]="false">
|
|
10199
|
+
</co-simple-grid-cell>
|
|
10200
|
+
</td>
|
|
10201
|
+
</ng-container>
|
|
10202
|
+
<ng-container *ngIf="!isSingleColumnRow(row)">
|
|
10203
|
+
<ng-container *ngFor="let column of headerColumnsCopy; let columnIndex = index">
|
|
10204
|
+
<td class="simple-grid-column-cell" *ngIf="columnIndex !== singleColumnIndex(row)">
|
|
10205
|
+
<co-simple-grid-cell
|
|
10206
|
+
[column]="column"
|
|
10207
|
+
[row]="row"
|
|
10208
|
+
[editMode]="inlineEdit && editing && rowIndex === editRowIndex"
|
|
10209
|
+
[fieldEditMode]="editCellIndex === columnIndex && rowIndex === editRowIndex"
|
|
10210
|
+
(cellClick)="handleCellClick($event, row, rowIndex, columnIndex)">
|
|
10211
|
+
</co-simple-grid-cell>
|
|
10212
|
+
<div *ngIf="column.resizable" class="simple-grid-column-sizer-placeholder"></div>
|
|
10213
|
+
</td>
|
|
10214
|
+
</ng-container>
|
|
10215
|
+
<ng-container *ngIf="inlineEdit && showRowButtons">
|
|
10216
|
+
<div class="icons-container" *ngIf="!editing">
|
|
10217
|
+
<co-icon class="icon-item icon-edit"
|
|
10218
|
+
[iconData]="icons.getIcon(Icons.PenToSquareSolid)" *ngIf="hoveredRowIndex === rowIndex"
|
|
10219
|
+
(click)="editRow($event, true, rowIndex); $event.stopPropagation()"></co-icon>
|
|
10220
|
+
<co-icon class="icon-item icon-delete"
|
|
10221
|
+
[iconData]="icons.getIcon(Icons.TrashBin)" *ngIf="hoveredRowIndex === rowIndex"
|
|
10222
|
+
(click)="selectTheRow(rowIndex); removeRow();"></co-icon>
|
|
10223
|
+
</div>
|
|
10224
|
+
<div class="icons-container">
|
|
10225
|
+
<co-button class="save-button"
|
|
10226
|
+
*ngIf="editing && (selectedRowIndex === rowIndex || (isNewRow && rowIndex === editRowIndex))"
|
|
10227
|
+
[iconData]="icons.getIcon(Icons.CheckDuotone)"
|
|
10228
|
+
(click)="validateAndSave(); $event.stopPropagation()"></co-button>
|
|
10229
|
+
<co-button class="close-button"
|
|
10230
|
+
*ngIf="editing && (selectedRowIndex === rowIndex || (isNewRow && rowIndex === editRowIndex))"
|
|
10231
|
+
[iconData]="icons.getIcon(Icons.CrossSkinny)"
|
|
10232
|
+
(click)="cancelEditRow(); $event.stopPropagation() "></co-button>
|
|
10233
|
+
</div>
|
|
10234
|
+
</ng-container>
|
|
10235
|
+
</ng-container>
|
|
10236
|
+
</tr>
|
|
10237
|
+
</co-form>
|
|
10238
|
+
</tbody>
|
|
10239
|
+
</table>
|
|
10240
|
+
<co-pagination-bar
|
|
10241
|
+
*ngIf="data?.length > rowsPerPage" class="pagination-bar"
|
|
10242
|
+
[itemsPerPage]="rowsPerPage"
|
|
10243
|
+
[currentPage]="currentPage"
|
|
10244
|
+
[totalItems]="data.length"
|
|
10245
|
+
[autoHide]="true"
|
|
10246
|
+
(previousClick)="goToPreviousPage()"
|
|
10247
|
+
(nextClick)="goToNextPage()"
|
|
10248
|
+
(pageClick)="setCurrentPage($event)">
|
|
10249
|
+
</co-pagination-bar>
|
|
10237
10250
|
`,
|
|
10238
10251
|
providers: [FormMasterService],
|
|
10239
10252
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -10877,36 +10890,36 @@ class SimpleGridCellComponent {
|
|
|
10877
10890
|
SimpleGridCellComponent.decorators = [
|
|
10878
10891
|
{ type: Component, args: [{
|
|
10879
10892
|
selector: "co-simple-grid-cell",
|
|
10880
|
-
template: `
|
|
10881
|
-
<div class="simple-grid-column-cell-value" [ngClass]="column.textAlign ? column.textAlign : defaultTextAlign">
|
|
10882
|
-
<ng-container *ngIf="editMode; else noInlineEdit">
|
|
10883
|
-
<div class="simple-grid-column-cell-field">
|
|
10884
|
-
<ng-container #editTemplate *ngIf="column.editTemplate; else noEditTemplate"
|
|
10885
|
-
[ngTemplateOutlet]="column.editTemplate"
|
|
10886
|
-
[ngTemplateOutletContext]="{value: row[column.field], row: row}"></ng-container>
|
|
10887
|
-
<ng-template #noEditTemplate>
|
|
10888
|
-
<ng-container *ngIf="column.template; else noTemplate">
|
|
10889
|
-
<ng-container [ngTemplateOutlet]="column.template"
|
|
10890
|
-
[ngTemplateOutletContext]="{value: row[column.field], row: row}"></ng-container>
|
|
10891
|
-
</ng-container>
|
|
10892
|
-
<ng-template #noTemplate>
|
|
10893
|
-
<co-input-text [(model)]="row[column.field]" [required]="column.required"></co-input-text>
|
|
10894
|
-
</ng-template>
|
|
10895
|
-
</ng-template>
|
|
10896
|
-
</div>
|
|
10897
|
-
</ng-container>
|
|
10898
|
-
<ng-template #noInlineEdit>
|
|
10899
|
-
<div class="simple-grid-column-cell-field">
|
|
10900
|
-
<ng-container *ngIf="column.template; else noTemplate">
|
|
10901
|
-
<ng-container [ngTemplateOutlet]="column.template"
|
|
10902
|
-
[ngTemplateOutletContext]="{value: row[column.field], row: row}"></ng-container>
|
|
10903
|
-
</ng-container>
|
|
10904
|
-
<ng-template #noTemplate>
|
|
10905
|
-
<span [textContent]="column.getFieldValue(row[column.field])"></span>
|
|
10906
|
-
</ng-template>
|
|
10907
|
-
</div>
|
|
10908
|
-
</ng-template>
|
|
10909
|
-
</div>
|
|
10893
|
+
template: `
|
|
10894
|
+
<div class="simple-grid-column-cell-value" [ngClass]="column.textAlign ? column.textAlign : defaultTextAlign">
|
|
10895
|
+
<ng-container *ngIf="editMode; else noInlineEdit">
|
|
10896
|
+
<div class="simple-grid-column-cell-field">
|
|
10897
|
+
<ng-container #editTemplate *ngIf="column.editTemplate; else noEditTemplate"
|
|
10898
|
+
[ngTemplateOutlet]="column.editTemplate"
|
|
10899
|
+
[ngTemplateOutletContext]="{value: row[column.field], row: row}"></ng-container>
|
|
10900
|
+
<ng-template #noEditTemplate>
|
|
10901
|
+
<ng-container *ngIf="column.template; else noTemplate">
|
|
10902
|
+
<ng-container [ngTemplateOutlet]="column.template"
|
|
10903
|
+
[ngTemplateOutletContext]="{value: row[column.field], row: row}"></ng-container>
|
|
10904
|
+
</ng-container>
|
|
10905
|
+
<ng-template #noTemplate>
|
|
10906
|
+
<co-input-text [(model)]="row[column.field]" [required]="column.required"></co-input-text>
|
|
10907
|
+
</ng-template>
|
|
10908
|
+
</ng-template>
|
|
10909
|
+
</div>
|
|
10910
|
+
</ng-container>
|
|
10911
|
+
<ng-template #noInlineEdit>
|
|
10912
|
+
<div class="simple-grid-column-cell-field">
|
|
10913
|
+
<ng-container *ngIf="column.template; else noTemplate">
|
|
10914
|
+
<ng-container [ngTemplateOutlet]="column.template"
|
|
10915
|
+
[ngTemplateOutletContext]="{value: row[column.field], row: row}"></ng-container>
|
|
10916
|
+
</ng-container>
|
|
10917
|
+
<ng-template #noTemplate>
|
|
10918
|
+
<span [textContent]="column.getFieldValue(row[column.field])" [title]="row[column.field]"></span>
|
|
10919
|
+
</ng-template>
|
|
10920
|
+
</div>
|
|
10921
|
+
</ng-template>
|
|
10922
|
+
</div>
|
|
10910
10923
|
`,
|
|
10911
10924
|
encapsulation: ViewEncapsulation.None
|
|
10912
10925
|
},] }
|