@colijnit/corecomponents_v12 259.1.12 → 259.1.14
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 +19 -2
- package/bundles/colijnit-corecomponents_v12.umd.js.map +1 -1
- package/colijnit-corecomponents_v12.metadata.json +1 -1
- package/esm2015/lib/components/co-dialog-wizard/co-dialog-wizard.component.js +2 -2
- package/esm2015/lib/components/double-calendar/double-calendar.component.js +13 -1
- package/esm2015/lib/components/list-of-icons/list-of-icons.component.js +3 -2
- package/esm2015/lib/components/simple-grid/simple-grid.component.js +173 -172
- package/esm2015/lib/core/enum/core-components-icon.enum.js +3 -1
- package/esm2015/lib/core/model/core-components-icon-svg.js +3 -1
- package/fesm2015/colijnit-corecomponents_v12.js +191 -173
- 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/lib/components/list-of-icons/style/_layout.scss +3 -11
- package/lib/core/enum/core-components-icon.enum.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1039,6 +1039,8 @@ var CoreComponentsIcon;
|
|
|
1039
1039
|
CoreComponentsIcon["Cancel"] = "cancel";
|
|
1040
1040
|
CoreComponentsIcon["CancelRoundFilled"] = "cancel_round_filled";
|
|
1041
1041
|
CoreComponentsIcon["CancelRoundOpen"] = "cancel_round_open";
|
|
1042
|
+
CoreComponentsIcon["CaretDownSolid"] = "caret_down_solid";
|
|
1043
|
+
CoreComponentsIcon["CaretUpSolid"] = "caret_up_solid";
|
|
1042
1044
|
CoreComponentsIcon["Cart"] = "cart";
|
|
1043
1045
|
CoreComponentsIcon["CartOpen"] = "cart_open";
|
|
1044
1046
|
CoreComponentsIcon["CaseManager"] = "case_manager";
|
|
@@ -1343,6 +1345,8 @@ const CoreComponentsIconSvg = {
|
|
|
1343
1345
|
"cancel": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><polygon points=\"36 35.16 30.45 35.16 14 14.84 19.55 14.84 36 35.16\" fill=\"#484f60\"/><polygon points=\"14 35.16 19.55 35.16 36 14.84 30.45 14.84 14 35.16\" fill=\"#484f60\"/></svg>",
|
|
1344
1346
|
"cancel_round_filled": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M25,10A15,15,0,1,0,40,25,15,15,0,0,0,25,10Zm9.38,23.32h-5.3L25,28.27l-4.08,5.05H15.63L22.35,25l-6.72-8.32h5.29L25,21.73l4.08-5.05h5.3L27.64,25Z\" fill=\"#484f60\"/></svg>",
|
|
1345
1347
|
"cancel_round_open": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M25,40.17a15,15,0,1,1,15-15A15,15,0,0,1,25,40.17Zm0-29a14,14,0,1,0,14,14A14,14,0,0,0,25,11.13Z\" fill=\"#484f60\"/><polygon points=\"29.41 32.25 25 26.79 20.59 32.25 17.96 32.25 23.68 25.17 17.96 18.09 20.59 18.09 25 23.54 29.41 18.09 32.04 18.09 26.32 25.17 32.04 32.25 29.41 32.25\" fill=\"#484f60\"/></svg>",
|
|
1348
|
+
"caret_down_solid": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 640\"><path d=\"M480 224C492.9 224 504.6 231.8 509.6 243.8C514.6 255.8 511.8 269.5 502.7 278.7L342.7 438.7C330.2 451.2 309.9 451.2 297.4 438.7L137.4 278.7C128.2 269.5 125.5 255.8 130.5 243.8C135.5 231.8 147.1 224 160 224L480 224z\"/></svg>",
|
|
1349
|
+
"caret_up_solid": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 640\"><path d=\"M160 416C147.1 416 135.4 408.2 130.4 396.2C125.4 384.2 128.2 370.5 137.4 361.4L297.4 201.4C309.9 188.9 330.2 188.9 342.7 201.4L502.7 361.4C511.9 370.6 514.6 384.3 509.6 396.3C504.6 408.3 492.9 416 480 416L160 416z\"/></svg>",
|
|
1346
1350
|
"cart": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M16.58,34.84a1.8,1.8,0,1,0,1.8,1.8A1.79,1.79,0,0,0,16.58,34.84Z\" fill=\"#484f60\"/><path d=\"M31.49,34.84a1.8,1.8,0,1,0,1.8,1.8A1.79,1.79,0,0,0,31.49,34.84Z\" fill=\"#484f60\"/><path d=\"M13.39,31.55A1.73,1.73,0,0,0,15,32.72H32.64a1.51,1.51,0,0,0,1.43-1.2L36.6,19a.89.89,0,0,0-1-1.09L10.92,20.83a1,1,0,0,0-.87,1.28Zm19-2.05a1.52,1.52,0,0,1-1.44,1.2H16.51a1.75,1.75,0,0,1-1.57-1.17l-2.31-5.6a1,1,0,0,1,.85-1.29l19.71-2.51a.88.88,0,0,1,1,1.08Z\" fill=\"#484f60\"/><path d=\"M39,17a1.87,1.87,0,0,0-1.36,1.46l-.42,2.89c-.1.67.31,1,.9.7a2.75,2.75,0,0,0,1.33-1.7L40,18A.73.73,0,0,0,39,17Z\" fill=\"#484f60\"/></svg>",
|
|
1347
1351
|
"cart_open": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 51 51\"><circle cx=\"17.08\" cy=\"34.14\" r=\"1.8\" fill=\"#4d5050\"/><circle cx=\"31.99\" cy=\"34.14\" r=\"1.8\" fill=\"#4d5050\"/><path d=\"M672.39,388.55a1.73,1.73,0,0,0,1.56,1.17h17.69a1.51,1.51,0,0,0,1.43-1.2L695.6,376a.88.88,0,0,0-1-1.08l-24.68,2.93a1,1,0,0,0-.87,1.28Zm19-2.05a1.52,1.52,0,0,1-1.43,1.2h-14.4a1.75,1.75,0,0,1-1.57-1.16l-2.31-5.61a1,1,0,0,1,.86-1.28l19.71-2.51a.87.87,0,0,1,1,1.08Z\" transform=\"translate(-658.5 -359.5)\" fill=\"#4d5050\"/><path d=\"M698,374a1.88,1.88,0,0,0-1.37,1.46l-.42,2.9c-.1.66.31,1,.9.7a2.74,2.74,0,0,0,1.33-1.7L699,375A.74.74,0,0,0,698,374Z\" transform=\"translate(-658.5 -359.5)\" fill=\"#4d5050\"/></svg>",
|
|
1348
1352
|
"case_manager": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M26.85,29H23.46a.89.89,0,0,0-.88.88v5.28L24,32.3c.08-.74.69-1.32,2.86-1.36H36v-1.1a.89.89,0,0,0-.88-.88H26.85Z\" fill=\"#484f60\" opacity=\"0.5\"/><path d=\"M35.38,38.29a.88.88,0,0,1-.88.88H23.76a.88.88,0,0,1-.88-.88l2.2-5.38A.88.88,0,0,1,26,32H36.7a.88.88,0,0,1,.88.88Z\" fill=\"#484f60\" opacity=\"0.75\"/><path d=\"M20.58,35.11V29.83A2.89,2.89,0,0,1,23.46,27h7.4l1.72-1.89a4.22,4.22,0,0,0-4-3.87h-.49c-1.11,1.57-3.41,3.44-5.56,3.44S18,22.76,16.94,21.19h-.49a4.21,4.21,0,0,0-4,3.87l2.68,3c0,1.77,1.81,8.15,4,8.15h1.44Z\" fill=\"#484f60\"/><path d=\"M28.68,16.31c0,2.71-2.77,5.77-6.18,5.77S16.31,19,16.31,16.31s2.77-5.14,6.19-5.14S28.68,13.59,28.68,16.31Z\" fill=\"#484f60\"/></svg>",
|
|
@@ -4533,7 +4537,7 @@ CoDialogWizardComponent.decorators = [
|
|
|
4533
4537
|
<div class="dialog-header">
|
|
4534
4538
|
<ng-content select="[header]"></ng-content>
|
|
4535
4539
|
<div class="dialog-close-button" *ngIf="showCloseIcon" (click)="closeClick.emit($event)">
|
|
4536
|
-
<co-icon [icon]="icons.
|
|
4540
|
+
<co-icon [icon]="icons.CrossSkinny"></co-icon>
|
|
4537
4541
|
</div>
|
|
4538
4542
|
</div>
|
|
4539
4543
|
|
|
@@ -6989,6 +6993,7 @@ class DoubleCalendarComponent extends BaseInputDatePickerDirective {
|
|
|
6989
6993
|
}
|
|
6990
6994
|
}
|
|
6991
6995
|
this.outputRangeIfValid();
|
|
6996
|
+
this._closeIfRangeComplete();
|
|
6992
6997
|
}
|
|
6993
6998
|
handleSecondDateSelected(date) {
|
|
6994
6999
|
this.selectedSecondDate = date;
|
|
@@ -7004,6 +7009,7 @@ class DoubleCalendarComponent extends BaseInputDatePickerDirective {
|
|
|
7004
7009
|
this.outputRangeIfValid();
|
|
7005
7010
|
this.secondDateSelected.next();
|
|
7006
7011
|
}
|
|
7012
|
+
this._closeIfRangeComplete();
|
|
7007
7013
|
}
|
|
7008
7014
|
outputRangeIfValid() {
|
|
7009
7015
|
if (this.selectedDates[0] instanceof Date && this.selectedDates[1] instanceof Date) {
|
|
@@ -7020,6 +7026,16 @@ class DoubleCalendarComponent extends BaseInputDatePickerDirective {
|
|
|
7020
7026
|
// Emit updated state to parent
|
|
7021
7027
|
this.datesSelected.emit(this.selectedDates);
|
|
7022
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
|
+
}
|
|
7023
7039
|
}
|
|
7024
7040
|
DoubleCalendarComponent.decorators = [
|
|
7025
7041
|
{ type: Component, args: [{
|
|
@@ -9632,6 +9648,7 @@ class SimpleGridComponent extends BaseSimpleGridComponent {
|
|
|
9632
9648
|
this.rowToEdit = this._newRowReference;
|
|
9633
9649
|
this.editCellIndex = yield this._nextAvailableCellToEdit(true);
|
|
9634
9650
|
}
|
|
9651
|
+
this.addRow.next();
|
|
9635
9652
|
this._detectChanges();
|
|
9636
9653
|
}
|
|
9637
9654
|
}
|
|
@@ -10059,177 +10076,177 @@ class SimpleGridComponent extends BaseSimpleGridComponent {
|
|
|
10059
10076
|
SimpleGridComponent.decorators = [
|
|
10060
10077
|
{ type: Component, args: [{
|
|
10061
10078
|
selector: 'co-simple-grid',
|
|
10062
|
-
template: `
|
|
10063
|
-
<co-grid-toolbar
|
|
10064
|
-
*ngIf="showToolbar" [class.right]="rightToolbar"
|
|
10065
|
-
[showEdit]="showEdit"
|
|
10066
|
-
[showAdd]="showAdd"
|
|
10067
|
-
[showDelete]="showDelete"
|
|
10068
|
-
[deleteEnabled]="selectedRowIndex > -1"
|
|
10069
|
-
(addClick)="addNewRow()"
|
|
10070
|
-
(editClick)="editRow($event)"
|
|
10071
|
-
(saveClick)="validateAndSave()"
|
|
10072
|
-
(cancelClick)="cancelEditRow()"
|
|
10073
|
-
(deleteClick)="removeRow()">
|
|
10074
|
-
</co-grid-toolbar>
|
|
10075
|
-
|
|
10076
|
-
<table
|
|
10077
|
-
id="simple-grid-table"
|
|
10078
|
-
class="simple-grid-table"
|
|
10079
|
-
[clickOutside]="editing"
|
|
10080
|
-
(clickOutside)="handleClickOutsideRow()">
|
|
10081
|
-
<colgroup>
|
|
10082
|
-
<col
|
|
10083
|
-
*ngFor="let column of headerColumnsCopy; let index = index"
|
|
10084
|
-
[class.simple-grid-column-auto-fit]="column.autoFit"
|
|
10085
|
-
[style.width.px]="column.width"
|
|
10086
|
-
[style.min-width.px]="MIN_COLUMN_WIDTH">
|
|
10087
|
-
</colgroup>
|
|
10088
|
-
<thead>
|
|
10089
|
-
<tr>
|
|
10090
|
-
<th
|
|
10091
|
-
scope="col"
|
|
10092
|
-
#headerCell
|
|
10093
|
-
class="simple-grid-column-header"
|
|
10094
|
-
*ngFor="let column of headerColumnsCopy; let index = index">
|
|
10095
|
-
<div
|
|
10096
|
-
class="simple-grid-column-header-wrapper"
|
|
10097
|
-
[class.resizable]="resizable"
|
|
10098
|
-
[class.selected]="column.isSelected"
|
|
10099
|
-
[ngClass]="column.textAlign ? column.textAlign : defaultTextAlign">
|
|
10100
|
-
<ng-container *ngIf="column.headerTemplate; else noHeaderTemplate">
|
|
10101
|
-
<ng-container [ngTemplateOutlet]="column.headerTemplate"></ng-container>
|
|
10102
|
-
</ng-container>
|
|
10103
|
-
<ng-template #noHeaderTemplate>
|
|
10104
|
-
<div
|
|
10105
|
-
class="simple-grid-column-header-label"
|
|
10106
|
-
[ngClass]="column.textAlign ? column.textAlign : defaultTextAlign"
|
|
10107
|
-
[class.with-menu]="showGridSettings"
|
|
10108
|
-
[class.with-sort]="showColumnSort"
|
|
10109
|
-
[textContent]="column.headerText || ' '"
|
|
10110
|
-
(click)="showColumnSort ? sortColumn(column, column.field) : toggleColumnMenu(column)">
|
|
10111
|
-
</div>
|
|
10112
|
-
|
|
10113
|
-
<div class="sort-column" *ngIf="showColumnSort">
|
|
10114
|
-
<co-button
|
|
10115
|
-
(click)="sortColumn(column, column?.field)"
|
|
10116
|
-
[iconData]="icons.getIcon(Icons.ArrowUpArrowDown)">
|
|
10117
|
-
</co-button>
|
|
10118
|
-
</div>
|
|
10119
|
-
|
|
10120
|
-
<div class="column-menu" *ngIf="column.isSelected">
|
|
10121
|
-
<h3 [textContent]="'COLUMN_OPTIONS' | coreLocalize"></h3>
|
|
10122
|
-
<ul>
|
|
10123
|
-
<li (click)="hideColumn(column)">Hide Column</li>
|
|
10124
|
-
<li (click)="sortColumn(column, column.field)">Sort Column</li>
|
|
10125
|
-
</ul>
|
|
10126
|
-
</div>
|
|
10127
|
-
</ng-template>
|
|
10128
|
-
<div
|
|
10129
|
-
*ngIf="resizable && column.resizable"
|
|
10130
|
-
class="simple-grid-column-sizer"
|
|
10131
|
-
(mousedown)="handleSizerMouseDown($event, column)">
|
|
10132
|
-
</div>
|
|
10133
|
-
</div>
|
|
10134
|
-
</th>
|
|
10135
|
-
</tr>
|
|
10136
|
-
|
|
10137
|
-
<div *ngIf="showGridSettings" class="grid-settings">
|
|
10138
|
-
<co-button
|
|
10139
|
-
[class.selected]="isSettingsMenuOpen"
|
|
10140
|
-
[iconData]="icons.getIcon(Icons.CogWheels)"
|
|
10141
|
-
(click)="toggleSettingsMenu()">
|
|
10142
|
-
</co-button>
|
|
10143
|
-
|
|
10144
|
-
<div class="settings-menu" *ngIf="isSettingsMenuOpen">
|
|
10145
|
-
<h3 [textContent]="'GRID_OPTIONS' | coreLocalize"></h3>
|
|
10146
|
-
<ul>
|
|
10147
|
-
<li (click)="exportToExcel()">Export to Excel</li>
|
|
10148
|
-
<li *ngIf="headerColumnsCopy.length !== headerColumns.length" (click)="showAllColumns()">
|
|
10149
|
-
Show All Columns
|
|
10150
|
-
</li>
|
|
10151
|
-
</ul>
|
|
10152
|
-
</div>
|
|
10153
|
-
</div>
|
|
10154
|
-
</thead>
|
|
10155
|
-
<tbody
|
|
10156
|
-
#dropList cdkDropList cdkDropListOrientation="vertical"
|
|
10157
|
-
class="simple-grid-drag-drop-list"
|
|
10158
|
-
[cdkDropListDisabled]="!dragDropEnabled || editing"
|
|
10159
|
-
[cdkDropListData]="data"
|
|
10160
|
-
[cdkDropListEnterPredicate]="handleCanDragDrop"
|
|
10161
|
-
(cdkDropListDropped)="handleDrop($event)">
|
|
10162
|
-
<co-form class="simple-grid-row-form">
|
|
10163
|
-
<tr
|
|
10164
|
-
#rowElement
|
|
10165
|
-
class="simple-grid-row"
|
|
10166
|
-
[class.selected]="rowIndex === selectedRowIndex && !editing" observeVisibility
|
|
10167
|
-
[class.disabled]="getIsRowDisabled(rowIndex)"
|
|
10168
|
-
[class.editing]="rowIndex === editRowIndex"
|
|
10169
|
-
*ngFor="let row of (!!rowsPerPage ? (data | paginate: {itemsPerPage: rowsPerPage, currentPage: currentPage}) : data); last as last; let rowIndex = index"
|
|
10170
|
-
cdkDrag
|
|
10171
|
-
(click)="handleClickRow($event, rowIndex)" (dblclick)="handleDblClickRow($event, rowIndex, row)"
|
|
10172
|
-
(visibilityChange)="rowVisible.next(row)"
|
|
10173
|
-
(mouseenter)="hoveredRowIndex = rowIndex"
|
|
10174
|
-
(mouseleave)="hoveredRowIndex = -1"
|
|
10175
|
-
>
|
|
10176
|
-
<ng-container *ngIf="isSingleColumnRow(row)">
|
|
10177
|
-
<td class="simple-grid-single-column-cell" [attr.colspan]="headerColumnsCopy.length">
|
|
10178
|
-
<co-simple-grid-cell
|
|
10179
|
-
[column]="columns[singleColumnIndex(row)]"
|
|
10180
|
-
[row]="row"
|
|
10181
|
-
[editMode]="false">
|
|
10182
|
-
</co-simple-grid-cell>
|
|
10183
|
-
</td>
|
|
10184
|
-
</ng-container>
|
|
10185
|
-
<ng-container *ngIf="!isSingleColumnRow(row)">
|
|
10186
|
-
<ng-container *ngFor="let column of headerColumnsCopy; let columnIndex = index">
|
|
10187
|
-
<td class="simple-grid-column-cell" *ngIf="columnIndex !== singleColumnIndex(row)">
|
|
10188
|
-
<co-simple-grid-cell
|
|
10189
|
-
[column]="column"
|
|
10190
|
-
[row]="row"
|
|
10191
|
-
[editMode]="inlineEdit && editing && rowIndex === editRowIndex"
|
|
10192
|
-
[fieldEditMode]="editCellIndex === columnIndex && rowIndex === editRowIndex"
|
|
10193
|
-
(cellClick)="handleCellClick($event, row, rowIndex, columnIndex)">
|
|
10194
|
-
</co-simple-grid-cell>
|
|
10195
|
-
<div *ngIf="column.resizable" class="simple-grid-column-sizer-placeholder"></div>
|
|
10196
|
-
</td>
|
|
10197
|
-
</ng-container>
|
|
10198
|
-
<ng-container *ngIf="inlineEdit && showRowButtons">
|
|
10199
|
-
<div class="icons-container" *ngIf="!editing">
|
|
10200
|
-
<co-icon class="icon-item icon-edit"
|
|
10201
|
-
[iconData]="icons.getIcon(Icons.PenToSquareSolid)" *ngIf="hoveredRowIndex === rowIndex"
|
|
10202
|
-
(click)="editRow($event, true, rowIndex); $event.stopPropagation()"></co-icon>
|
|
10203
|
-
<co-icon class="icon-item icon-delete"
|
|
10204
|
-
[iconData]="icons.getIcon(Icons.TrashBin)" *ngIf="hoveredRowIndex === rowIndex"
|
|
10205
|
-
(click)="selectTheRow(rowIndex); removeRow();"></co-icon>
|
|
10206
|
-
</div>
|
|
10207
|
-
<div class="icons-container">
|
|
10208
|
-
<co-button class="save-button"
|
|
10209
|
-
*ngIf="editing && (selectedRowIndex === rowIndex || (isNewRow && rowIndex === editRowIndex))"
|
|
10210
|
-
[iconData]="icons.getIcon(Icons.CheckDuotone)"
|
|
10211
|
-
(click)="validateAndSave(); $event.stopPropagation()"></co-button>
|
|
10212
|
-
<co-button class="close-button"
|
|
10213
|
-
*ngIf="editing && (selectedRowIndex === rowIndex || (isNewRow && rowIndex === editRowIndex))"
|
|
10214
|
-
[iconData]="icons.getIcon(Icons.CrossSkinny)"
|
|
10215
|
-
(click)="cancelEditRow(); $event.stopPropagation() "></co-button>
|
|
10216
|
-
</div>
|
|
10217
|
-
</ng-container>
|
|
10218
|
-
</ng-container>
|
|
10219
|
-
</tr>
|
|
10220
|
-
</co-form>
|
|
10221
|
-
</tbody>
|
|
10222
|
-
</table>
|
|
10223
|
-
<co-pagination-bar
|
|
10224
|
-
*ngIf="data?.length > rowsPerPage" class="pagination-bar"
|
|
10225
|
-
[itemsPerPage]="rowsPerPage"
|
|
10226
|
-
[currentPage]="currentPage"
|
|
10227
|
-
[totalItems]="data.length"
|
|
10228
|
-
[autoHide]="true"
|
|
10229
|
-
(previousClick)="goToPreviousPage()"
|
|
10230
|
-
(nextClick)="goToNextPage()"
|
|
10231
|
-
(pageClick)="setCurrentPage($event)">
|
|
10232
|
-
</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 || ' '"
|
|
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>
|
|
10233
10250
|
`,
|
|
10234
10251
|
providers: [FormMasterService],
|
|
10235
10252
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -11863,7 +11880,8 @@ ListOfIconsComponent.decorators = [
|
|
|
11863
11880
|
template: `
|
|
11864
11881
|
<div class="icon-item active" [class.menu-opened]="showMenu" (click)="toggleMenu()">
|
|
11865
11882
|
<co-icon [iconData]="activeItem.icon" [style.width.px]="iconSize" [style.height.px]="iconSize"></co-icon>
|
|
11866
|
-
<co-icon class="drop-arrow" [iconData]="icons.getIcon(Icon.
|
|
11883
|
+
<co-icon *ngIf="!showMenu" class="drop-arrow" [iconData]="icons.getIcon(Icon.CaretDownSolid)"></co-icon>
|
|
11884
|
+
<co-icon *ngIf="showMenu" class="drop-arrow" [iconData]="icons.getIcon(Icon.CaretUpSolid)"></co-icon>
|
|
11867
11885
|
</div>
|
|
11868
11886
|
<div class="dropdown-menu" *ngIf="showMenu" (clickOutside)="onClickOutside()">
|
|
11869
11887
|
<div class="icon-item" *ngFor="let item of collection" (click)="selectItem(item)"
|