@colijnit/corecomponents_v12 259.1.22 → 259.1.24
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 +14 -3
- package/bundles/colijnit-corecomponents_v12.umd.js.map +1 -1
- package/colijnit-corecomponents_v12.metadata.json +1 -1
- package/esm2015/lib/components/base/base-input.component.js +3 -1
- package/esm2015/lib/components/list-of-values/list-of-values.component.js +2 -2
- package/esm2015/lib/components/simple-grid/simple-grid.component.js +22 -14
- package/fesm2015/colijnit-corecomponents_v12.js +24 -14
- package/fesm2015/colijnit-corecomponents_v12.js.map +1 -1
- package/lib/components/base/base-input.component.d.ts +1 -0
- package/lib/components/simple-grid/simple-grid.component.d.ts +2 -1
- package/lib/components/simple-grid/style/_layout.scss +7 -25
- package/package.json +1 -1
|
@@ -2274,6 +2274,7 @@
|
|
|
2274
2274
|
this.keyDown = new i0.EventEmitter();
|
|
2275
2275
|
this.keyUp = new i0.EventEmitter();
|
|
2276
2276
|
this.modelChange = new i0.EventEmitter();
|
|
2277
|
+
this.selectedValueChange = new i0.EventEmitter();
|
|
2277
2278
|
this.userModelChange = new i0.EventEmitter();
|
|
2278
2279
|
this.hiddenChange = new i0.EventEmitter();
|
|
2279
2280
|
this.cancelClicked = new i0.EventEmitter();
|
|
@@ -3186,6 +3187,7 @@
|
|
|
3186
3187
|
keyDown: [{ type: i0.Output }],
|
|
3187
3188
|
keyUp: [{ type: i0.Output }],
|
|
3188
3189
|
modelChange: [{ type: i0.Output }],
|
|
3190
|
+
selectedValueChange: [{ type: i0.Output }],
|
|
3189
3191
|
userModelChange: [{ type: i0.Output }],
|
|
3190
3192
|
hiddenChange: [{ type: i0.Output }],
|
|
3191
3193
|
cancelClicked: [{ type: i0.Output }],
|
|
@@ -10393,7 +10395,16 @@
|
|
|
10393
10395
|
this._resetEdit();
|
|
10394
10396
|
this._detectChanges();
|
|
10395
10397
|
};
|
|
10396
|
-
SimpleGridComponent.prototype.removeRow = function () {
|
|
10398
|
+
SimpleGridComponent.prototype.removeRow = function (row) {
|
|
10399
|
+
this.deleteRow.next(row);
|
|
10400
|
+
if (this.currentPage !== 1) {
|
|
10401
|
+
this.currentPage = 1;
|
|
10402
|
+
this.selectedRowIndex = -1;
|
|
10403
|
+
window.scrollTo({ top: 0, behavior: 'smooth' });
|
|
10404
|
+
}
|
|
10405
|
+
this._detectChanges();
|
|
10406
|
+
};
|
|
10407
|
+
SimpleGridComponent.prototype.removeSelectedRow = function () {
|
|
10397
10408
|
var absoluteIndex = this.selectedRowIndex;
|
|
10398
10409
|
if (this.rowsPerPage) {
|
|
10399
10410
|
absoluteIndex = (this.currentPage - 1) * this.rowsPerPage + this.selectedRowIndex;
|
|
@@ -10839,7 +10850,7 @@
|
|
|
10839
10850
|
SimpleGridComponent.decorators = [
|
|
10840
10851
|
{ type: i0.Component, args: [{
|
|
10841
10852
|
selector: 'co-simple-grid',
|
|
10842
|
-
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)=\"
|
|
10853
|
+
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)=\"removeSelectedRow()\">\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 <col\n *ngIf=\"showRowButtons\"\n [class.simple-grid-column-auto-fit]=\"true\"\n [style.min-width.px]=\"MIN_COLUMN_WIDTH\">\n >\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 [class.with-sort]=\"showColumnSort\"\n [textContent]=\"column.headerText || ' '\" [title]=\"column.headerText\"\n (click)=\"showColumnSort ? sortColumn(column, column.field) : toggleColumnMenu(column)\">\n </div>\n\n <div class=\"sort-column\" *ngIf=\"showColumnSort\">\n <co-button\n (click)=\"sortColumn(column, column?.field)\"\n [iconData]=\"icons.getIcon(Icons.ArrowUpArrowDown)\">\n </co-button>\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 </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 #rowElement\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)\" (dblclick)=\"handleDblClickRow($event, rowIndex, row)\"\n (visibilityChange)=\"rowVisible.next(row)\"\n (mouseenter)=\"hoveredRowIndex = rowIndex\"\n (mouseleave)=\"hoveredRowIndex = -1\"\n >\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 *ngIf=\"showRowButtons\">\n <td class=\"icons-container\" [class.show-content]=\"selectedRowIndex === rowIndex || hoveredRowIndex === rowIndex\">\n <ng-container>\n <co-icon class=\"icon-item icon-edit\"\n *ngIf=\"editRowIndex !== rowIndex && inlineEdit\"\n [iconData]=\"icons.getIcon(Icons.PenToSquareSolid)\"\n (click)=\"editRow($event, true, rowIndex); $event.stopPropagation()\"></co-icon>\n <co-icon class=\"icon-item icon-delete\"\n [iconData]=\"icons.getIcon(Icons.TrashBin)\"\n *ngIf=\"(editRowIndex !== rowIndex && showDelete)\"\n (click)=\"removeRow(data[rowIndex])\"></co-icon>\n </ng-container>\n <ng-container *ngIf=\"editing && inlineEdit && (selectedRowIndex === rowIndex || isNewRow) && editRowIndex === rowIndex\">\n <co-button class=\"save-button\"\n [iconData]=\"icons.getIcon(Icons.CheckDuotone)\"\n (click)=\"validateAndSave(); $event.stopPropagation()\"></co-button>\n <co-button class=\"close-button\"\n [iconData]=\"icons.getIcon(Icons.CrossSkinny)\"\n (click)=\"cancelEditRow(); $event.stopPropagation() \"></co-button>\n </ng-container>\n </td>\n </ng-container>\n </ng-container>\n </tr>\n </co-form>\n </tbody>\n </table>\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 ",
|
|
10843
10854
|
providers: [FormMasterService],
|
|
10844
10855
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
10845
10856
|
encapsulation: i0.ViewEncapsulation.None
|
|
@@ -12175,7 +12186,7 @@
|
|
|
12175
12186
|
}
|
|
12176
12187
|
}
|
|
12177
12188
|
this.setModel(option);
|
|
12178
|
-
this.
|
|
12189
|
+
this.selectedValueChange.emit(option);
|
|
12179
12190
|
this.detectChanges();
|
|
12180
12191
|
};
|
|
12181
12192
|
ListOfValuesComponent.prototype.closePopup = function () {
|