@colijnit/corecomponents_v12 12.0.67 → 12.0.69
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 +119 -112
- 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 +7 -1
- package/esm2015/lib/components/co-dialog/co-dialog.component.js +3 -2
- package/esm2015/lib/components/drop-down-list/drop-down-list.component.js +1 -7
- package/esm2015/lib/components/input-listbox/input-listbox.component.js +3 -2
- package/esm2015/lib/components/input-search/input-search.component.js +7 -1
- package/esm2015/lib/components/pagination/paginate.pipe.js +4 -11
- package/esm2015/lib/components/pagination-bar/pagination-bar.component.js +5 -5
- package/esm2015/lib/components/simple-grid/base-simple-grid.component.js +4 -1
- package/esm2015/lib/components/simple-grid/simple-grid.component.js +5 -2
- package/fesm2015/colijnit-corecomponents_v12.js +115 -108
- package/fesm2015/colijnit-corecomponents_v12.js.map +1 -1
- package/lib/components/base/base-input.component.d.ts +1 -0
- package/lib/components/co-dialog/co-dialog.component.d.ts +1 -0
- package/lib/components/drop-down-list/drop-down-list.component.d.ts +0 -1
- package/lib/components/input-listbox/input-listbox.component.d.ts +1 -0
- package/lib/components/input-radio-button/style/_layout.scss +1 -0
- package/lib/components/input-radio-button/style/_material-definition.scss +1 -0
- package/lib/components/input-search/input-search.component.d.ts +1 -0
- package/lib/components/input-search/style/_layout.scss +1 -0
- package/lib/components/input-search/style/_material-definition.scss +2 -1
- package/lib/components/pagination/paginate.pipe.d.ts +0 -3
- package/lib/components/simple-grid/base-simple-grid.component.d.ts +2 -0
- package/lib/components/simple-grid/style/_layout.scss +6 -0
- package/lib/components/simple-grid/style/_material-definition.scss +1 -0
- package/package.json +1 -1
|
@@ -3723,7 +3723,7 @@
|
|
|
3723
3723
|
CoDialogComponent.decorators = [
|
|
3724
3724
|
{ type: core.Component, args: [{
|
|
3725
3725
|
selector: 'co-dialog',
|
|
3726
|
-
template: "\n <div class=\"co-dialog-overlay\" *ngIf=\"show\" (click)=\"handleOverlayClick($event)\" @showHideOverlay></div>\n <div class=\"co-dialog-wrapper\" *ngIf=\"show\" @showHideDialog>\n <div class=\"dialog-header\" *ngIf=\"!borderless\">\n <div class=\"dialog-header-caption\" *ngIf=\"headerTemplate\">\n <ng-container [ngTemplateOutlet]=\"headerTemplate\"></ng-container>\n </div>\n <div class=\"dialog-close-button\" *ngIf=\"showCloseIcon\" (click)=\"handleCloseDialog($event)\">\n <co-icon [icon]=\"icons.Cancel\"></co-icon>\n </div>\n </div>\n <div class=\"dialog-content\">\n <ng-content></ng-content>\n </div>\n <div class=\"dialog-footer\" *ngIf=\"footerTemplate\">\n <ng-container [ngTemplateOutlet]=\"footerTemplate\"></ng-container>\n </div>\n </div>\n ",
|
|
3726
|
+
template: "\n <div class=\"co-dialog-overlay\" *ngIf=\"show\" (click)=\"handleOverlayClick($event)\" @showHideOverlay></div>\n <div class=\"co-dialog-wrapper\" *ngIf=\"show\" @showHideDialog>\n <div class=\"dialog-header\" *ngIf=\"!borderless\">\n <div class=\"dialog-header-caption\" *ngIf=\"headerTemplate\">\n <ng-container [ngTemplateOutlet]=\"headerTemplate\"></ng-container>\n </div>\n <div class=\"dialog-close-button\" *ngIf=\"showCloseIcon\" (click)=\"handleCloseDialog($event)\">\n <co-icon [icon]=\"icons.Cancel\"></co-icon>\n </div>\n </div>\n <div class=\"dialog-content\" [ngClass]=\"customCssClass ? customCssClass : undefined\">\n <ng-content></ng-content>\n </div>\n <div class=\"dialog-footer\" *ngIf=\"footerTemplate\">\n <ng-container [ngTemplateOutlet]=\"footerTemplate\"></ng-container>\n </div>\n </div>\n ",
|
|
3727
3727
|
animations: [
|
|
3728
3728
|
animations.trigger('showHideOverlay', [
|
|
3729
3729
|
animations.state('*', animations.style({ opacity: 1 })),
|
|
@@ -3737,6 +3737,7 @@
|
|
|
3737
3737
|
},] }
|
|
3738
3738
|
];
|
|
3739
3739
|
CoDialogComponent.propDecorators = {
|
|
3740
|
+
customCssClass: [{ type: core.Input }],
|
|
3740
3741
|
headerTemplate: [{ type: core.Input }],
|
|
3741
3742
|
footerTemplate: [{ type: core.Input }],
|
|
3742
3743
|
showCloseIcon: [{ type: core.Input }],
|
|
@@ -4432,6 +4433,7 @@
|
|
|
4432
4433
|
this.focused = false;
|
|
4433
4434
|
this.formInput = true;
|
|
4434
4435
|
this.customWidth = false;
|
|
4436
|
+
this.customHeight = false;
|
|
4435
4437
|
this.noTriangleGraphic = false;
|
|
4436
4438
|
this.halfWidth = false;
|
|
4437
4439
|
this.fullWidth = false;
|
|
@@ -4728,6 +4730,7 @@
|
|
|
4728
4730
|
if (this.showSaveCancel && this.canSaveOrCancel) {
|
|
4729
4731
|
this._handleKeyDown(event);
|
|
4730
4732
|
}
|
|
4733
|
+
this._positionValidationError();
|
|
4731
4734
|
};
|
|
4732
4735
|
Object.defineProperty(BaseInputComponent.prototype, "canChange", {
|
|
4733
4736
|
get: function () {
|
|
@@ -5252,6 +5255,7 @@
|
|
|
5252
5255
|
focused: [{ type: core.HostBinding, args: ["class.cc-input-focused",] }],
|
|
5253
5256
|
formInput: [{ type: core.HostBinding, args: ["class.form-input",] }],
|
|
5254
5257
|
customWidth: [{ type: core.Input }, { type: core.HostBinding, args: ["class.custom-width",] }],
|
|
5258
|
+
customHeight: [{ type: core.Input }, { type: core.HostBinding, args: ['class.custom-height',] }],
|
|
5255
5259
|
noTriangleGraphic: [{ type: core.Input }],
|
|
5256
5260
|
halfWidth: [{ type: core.Input }, { type: core.HostBinding, args: ["class.half-width",] }],
|
|
5257
5261
|
fullWidth: [{ type: core.Input }, { type: core.HostBinding, args: ["class.full-width-important",] }],
|
|
@@ -5288,6 +5292,9 @@
|
|
|
5288
5292
|
__decorate([
|
|
5289
5293
|
InputBoolean()
|
|
5290
5294
|
], BaseInputComponent.prototype, "customWidth", void 0);
|
|
5295
|
+
__decorate([
|
|
5296
|
+
InputBoolean()
|
|
5297
|
+
], BaseInputComponent.prototype, "customHeight", void 0);
|
|
5291
5298
|
__decorate([
|
|
5292
5299
|
InputBoolean()
|
|
5293
5300
|
], BaseInputComponent.prototype, "noTriangleGraphic", void 0);
|
|
@@ -5622,17 +5629,12 @@
|
|
|
5622
5629
|
DropDownListComponent.prototype.showClass = function () {
|
|
5623
5630
|
return true;
|
|
5624
5631
|
};
|
|
5625
|
-
DropDownListComponent.prototype.handleValueChanged = function (value) {
|
|
5626
|
-
if (value !== this.model) {
|
|
5627
|
-
this.modelChange.next(value);
|
|
5628
|
-
}
|
|
5629
|
-
};
|
|
5630
5632
|
return DropDownListComponent;
|
|
5631
5633
|
}(BaseInputComponent));
|
|
5632
5634
|
DropDownListComponent.decorators = [
|
|
5633
5635
|
{ type: core.Component, args: [{
|
|
5634
5636
|
selector: "co-drop-down-list",
|
|
5635
|
-
template: "\n <ejs-dropdownlist\n [dataSource]=\"collection\"\n [allowFiltering]=\"allowFiltering\"\n [value]=\"model\"\n [fields]=\"fields\"\n [filterBarPlaceholder]=\"filterBarPlaceholder\"\n [filterType]=\"filterType\"\n [placeholder]=\"placeholder\"\n [readonly]=\"readonly\"\n [itemTemplate]=\"itemTemplate\"\n [headerTemplate]=\"headerTemplate\"\n [valueTemplate]=\"valueTemplate\"\n [disabled]=\"disabled\"\n [ngModel]=\"model\"\n (ngModelChange)=\"modelChange.emit($event)\"\n
|
|
5637
|
+
template: "\n <ejs-dropdownlist\n [dataSource]=\"collection\"\n [allowFiltering]=\"allowFiltering\"\n [value]=\"model\"\n [fields]=\"fields\"\n [filterBarPlaceholder]=\"filterBarPlaceholder\"\n [filterType]=\"filterType\"\n [placeholder]=\"placeholder\"\n [readonly]=\"readonly\"\n [itemTemplate]=\"itemTemplate\"\n [headerTemplate]=\"headerTemplate\"\n [valueTemplate]=\"valueTemplate\"\n [disabled]=\"disabled\"\n [ngModel]=\"model\"\n (ngModelChange)=\"modelChange.emit($event)\"\n showClearButton=\"true\"\n floatLabelType=\"Auto\"\n >\n </ejs-dropdownlist>\n <div class=\"required-indicator\"></div>\n <ng-template #validationError></ng-template>\n ",
|
|
5636
5638
|
providers: [
|
|
5637
5639
|
ej2AngularDropdowns.CheckBoxSelectionService,
|
|
5638
5640
|
{
|
|
@@ -6995,7 +6997,7 @@
|
|
|
6995
6997
|
InputListboxComponent.decorators = [
|
|
6996
6998
|
{ type: core.Component, args: [{
|
|
6997
6999
|
selector: 'co-input-listbox',
|
|
6998
|
-
template: "\n <div class=\"co-input-listbox-header\" [textContent]=\"placeholder\"></div>\n <div class=\"co-input-listbox-content\">\n <ejs-listbox\n [ngModel]=\"value\"\n [dataSource]=\"collection\"\n [fields]=\"fields\"\n [disabled]=\"readonly\"\n [selectionSettings]=\"selectionSettings\"\n (ngModelChange)=\"modelChange.emit($event)\"\n ></ejs-listbox>\n </div>\n <div class=\"required-indicator\"></div>\n <ng-template #validationError></ng-template>\n ",
|
|
7000
|
+
template: "\n <div class=\"co-input-listbox-header\" [textContent]=\"placeholder\"></div>\n <div class=\"co-input-listbox-content\" [ngClass]=\"customCssClass ? customCssClass : undefined\">\n <ejs-listbox\n [ngModel]=\"value\"\n [dataSource]=\"collection\"\n [fields]=\"fields\"\n [disabled]=\"readonly\"\n [selectionSettings]=\"selectionSettings\"\n (ngModelChange)=\"modelChange.emit($event)\"\n ></ejs-listbox>\n </div>\n <div class=\"required-indicator\"></div>\n <ng-template #validationError></ng-template>\n ",
|
|
6999
7001
|
providers: [{
|
|
7000
7002
|
provide: COMPONENT_INTERFACE_NAME, useExisting: core.forwardRef(function () { return InputListboxComponent; })
|
|
7001
7003
|
}, {
|
|
@@ -7014,6 +7016,7 @@
|
|
|
7014
7016
|
{ type: core.ElementRef }
|
|
7015
7017
|
]; };
|
|
7016
7018
|
InputListboxComponent.propDecorators = {
|
|
7019
|
+
customCssClass: [{ type: core.Input }],
|
|
7017
7020
|
placeholder: [{ type: core.Input }],
|
|
7018
7021
|
value: [{ type: core.Input }],
|
|
7019
7022
|
collection: [{ type: core.Input }],
|
|
@@ -7916,6 +7919,7 @@
|
|
|
7916
7919
|
_this.search = new core.EventEmitter();
|
|
7917
7920
|
_this.useLeftIcon = false;
|
|
7918
7921
|
_this.useRightIcon = false;
|
|
7922
|
+
_this.customHeight = false;
|
|
7919
7923
|
_this.noIcon = false;
|
|
7920
7924
|
_this.isSmall = false;
|
|
7921
7925
|
return _this;
|
|
@@ -7937,7 +7941,7 @@
|
|
|
7937
7941
|
InputSearchComponent.decorators = [
|
|
7938
7942
|
{ type: core.Component, args: [{
|
|
7939
7943
|
selector: 'co-input-search',
|
|
7940
|
-
template: "\n <co-input-text\n [model]=\"model\"\n [leftIcon]=\"useLeftIcon ? searchIcon : null\"\n [rightIcon]=\"useRightIcon ? searchIcon : null\"\n [placeholder]=\"placeholder\"\n [showPlaceholderOnFocus]=\"false\"\n (modelChange)=\"modelChange.emit($event)\"\n ></co-input-text>\n ",
|
|
7944
|
+
template: "\n <co-input-text\n [model]=\"model\"\n [leftIcon]=\"useLeftIcon ? searchIcon : null\"\n [rightIcon]=\"useRightIcon ? searchIcon : null\"\n [placeholder]=\"placeholder\"\n [customHeight]=\"customHeight\"\n [showPlaceholderOnFocus]=\"false\"\n (modelChange)=\"modelChange.emit($event)\"\n ></co-input-text>\n ",
|
|
7941
7945
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
7942
7946
|
encapsulation: core.ViewEncapsulation.None
|
|
7943
7947
|
},] }
|
|
@@ -7947,6 +7951,7 @@
|
|
|
7947
7951
|
search: [{ type: core.Output }],
|
|
7948
7952
|
useLeftIcon: [{ type: core.Input }],
|
|
7949
7953
|
useRightIcon: [{ type: core.Input }],
|
|
7954
|
+
customHeight: [{ type: core.Input }],
|
|
7950
7955
|
noIcon: [{ type: core.HostBinding, args: ['class.no-icon',] }, { type: core.Input }],
|
|
7951
7956
|
isSmall: [{ type: core.HostBinding, args: ['class.is-small',] }, { type: core.Input }],
|
|
7952
7957
|
showClass: [{ type: core.HostBinding, args: ['class.co-input-search',] }]
|
|
@@ -7956,7 +7961,10 @@
|
|
|
7956
7961
|
], InputSearchComponent.prototype, "useLeftIcon", void 0);
|
|
7957
7962
|
__decorate([
|
|
7958
7963
|
InputBoolean()
|
|
7959
|
-
], InputSearchComponent.prototype, "useRightIcon", void 0);
|
|
7964
|
+
], InputSearchComponent.prototype, "useRightIcon", void 0);
|
|
7965
|
+
__decorate([
|
|
7966
|
+
InputBoolean()
|
|
7967
|
+
], InputSearchComponent.prototype, "customHeight", void 0);
|
|
7960
7968
|
|
|
7961
7969
|
var InputSearchModule = /** @class */ (function () {
|
|
7962
7970
|
function InputSearchModule() {
|
|
@@ -9697,6 +9705,7 @@
|
|
|
9697
9705
|
var BaseSimpleGridComponent = /** @class */ (function () {
|
|
9698
9706
|
function BaseSimpleGridComponent() {
|
|
9699
9707
|
this.MIN_COLUMN_WIDTH = 50;
|
|
9708
|
+
this.dataChanged = new rxjs.Subject();
|
|
9700
9709
|
this.dragDropEnabled = false;
|
|
9701
9710
|
this.resizable = false;
|
|
9702
9711
|
this.inlineEdit = false;
|
|
@@ -9734,6 +9743,7 @@
|
|
|
9734
9743
|
set: function (value) {
|
|
9735
9744
|
this._data = value;
|
|
9736
9745
|
this._prepareData();
|
|
9746
|
+
this.dataChanged.next();
|
|
9737
9747
|
},
|
|
9738
9748
|
enumerable: false,
|
|
9739
9749
|
configurable: true
|
|
@@ -9877,6 +9887,9 @@
|
|
|
9877
9887
|
_this.currentPage = 1;
|
|
9878
9888
|
_this._doubleClicked = false;
|
|
9879
9889
|
_this._newRow = false;
|
|
9890
|
+
_this.dataChanged.subscribe(function () {
|
|
9891
|
+
_this.currentPage = 1;
|
|
9892
|
+
});
|
|
9880
9893
|
return _this;
|
|
9881
9894
|
}
|
|
9882
9895
|
Object.defineProperty(SimpleGridComponent.prototype, "headerCells", {
|
|
@@ -10158,7 +10171,7 @@
|
|
|
10158
10171
|
SimpleGridComponent.decorators = [
|
|
10159
10172
|
{ type: core.Component, args: [{
|
|
10160
10173
|
selector: 'co-simple-grid',
|
|
10161
|
-
template: "\n <co-grid-toolbar *ngIf=\"showToolbar\" [class.right]=\"rightToolbar\"\n [showEdit]=\"inlineEdit\"\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)=\"removeRow()\"\n ></co-grid-toolbar>\n <table class=\"simple-grid-table\">\n <colgroup>\n <col *ngFor=\"let column of headerColumns; 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 </colgroup>\n <thead>\n <tr>\n <th scope=\"col\" #headerCell class=\"simple-grid-column-header\" *ngFor=\"let column of headerColumns; let index = index\">\n <div class=\"simple-grid-column-header-wrapper\" [class.resizable]=\"resizable\"\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 class=\"simple-grid-column-header-label\" [ngClass]=\"column.textAlign ? column.textAlign : defaultTextAlign\"\n [textContent]=\"column.headerText || ' '\"\n ></div>\n </ng-template>\n <div *ngIf=\"resizable && column.resizable\" class=\"simple-grid-column-sizer\"\n (mousedown)=\"handleSizerMouseDown($event, column)\"\n ></div>\n </div>\n </th>\n </tr>\n </thead>\n <tbody #dropList cdkDropList cdkDropListOrientation=\"vertical\"\n class=\"simple-grid-drag-drop-list\"\n [cdkDropListDisabled]=\"!dragDropEnabled\"\n [cdkDropListData]=\"data\"\n [cdkDropListEnterPredicate]=\"handleCanDragDrop\"\n (cdkDropListDropped)=\"handleDrop($event)\">\n <tr class=\"simple-grid-row\" [class.selected]=\"rowIndex === selectedRowIndex && !editing\" observeVisibility\n [class.editing]=\"rowIndex === editRowIndex\" *ngFor=\"let row of (!!rowsPerPage ? (data | paginate: {itemsPerPage: rowsPerPage, currentPage: currentPage}) : data); last as last; let rowIndex = index\" cdkDrag\n (click)=\"handleClickRow($event, rowIndex)\" (dblclick)=\"handleDblClickRow($event, rowIndex)\" (visible)=\"rowVisible.next(row)\">\n <co-form class=\"simple-grid-row-form\">\n <ng-container *ngIf=\"isSingleColumnRow(row)\">\n <td class=\"simple-grid-single-column-cell\" [attr.colspan]=\"headerColumns.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 headerColumns; 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\"\n (cellClick)=\"handleCellClick(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>\n </co-form>\n </tr>\n </tbody>\n </table>\n <co-pagination-bar *ngIf=\"data?.length > rowsPerPage\"\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 ",
|
|
10174
|
+
template: "\n <co-grid-toolbar *ngIf=\"showToolbar\" [class.right]=\"rightToolbar\"\n [showEdit]=\"inlineEdit\"\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)=\"removeRow()\"\n ></co-grid-toolbar>\n <table class=\"simple-grid-table\">\n <colgroup>\n <col *ngFor=\"let column of headerColumns; 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 </colgroup>\n <thead>\n <tr>\n <th scope=\"col\" #headerCell class=\"simple-grid-column-header\" *ngFor=\"let column of headerColumns; let index = index\">\n <div class=\"simple-grid-column-header-wrapper\" [class.resizable]=\"resizable\"\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 class=\"simple-grid-column-header-label\" [ngClass]=\"column.textAlign ? column.textAlign : defaultTextAlign\"\n [textContent]=\"column.headerText || ' '\"\n ></div>\n </ng-template>\n <div *ngIf=\"resizable && column.resizable\" class=\"simple-grid-column-sizer\"\n (mousedown)=\"handleSizerMouseDown($event, column)\"\n ></div>\n </div>\n </th>\n </tr>\n </thead>\n <tbody #dropList cdkDropList cdkDropListOrientation=\"vertical\"\n class=\"simple-grid-drag-drop-list\"\n [cdkDropListDisabled]=\"!dragDropEnabled\"\n [cdkDropListData]=\"data\"\n [cdkDropListEnterPredicate]=\"handleCanDragDrop\"\n (cdkDropListDropped)=\"handleDrop($event)\">\n <tr class=\"simple-grid-row\" [class.selected]=\"rowIndex === selectedRowIndex && !editing\" observeVisibility\n [class.editing]=\"rowIndex === editRowIndex\" *ngFor=\"let row of (!!rowsPerPage ? (data | paginate: {itemsPerPage: rowsPerPage, currentPage: currentPage}) : data); last as last; let rowIndex = index\" cdkDrag\n (click)=\"handleClickRow($event, rowIndex)\" (dblclick)=\"handleDblClickRow($event, rowIndex)\" (visible)=\"rowVisible.next(row)\">\n <co-form class=\"simple-grid-row-form\">\n <ng-container *ngIf=\"isSingleColumnRow(row)\">\n <td class=\"simple-grid-single-column-cell\" [attr.colspan]=\"headerColumns.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 headerColumns; 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\"\n (cellClick)=\"handleCellClick(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>\n </co-form>\n </tr>\n </tbody>\n </table>\n <co-pagination-bar *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 ",
|
|
10162
10175
|
providers: [
|
|
10163
10176
|
FormMasterService
|
|
10164
10177
|
],
|
|
@@ -10302,7 +10315,7 @@
|
|
|
10302
10315
|
PaginationBarComponent.decorators = [
|
|
10303
10316
|
{ type: core.Component, args: [{
|
|
10304
10317
|
selector: "co-pagination-bar",
|
|
10305
|
-
template: "\n <ul class=\"pagination\" *ngIf=\"!shouldBeHidden()\">\n <li *ngIf=\"directionLinks\" class=\"pagination-previous\" [class.disabled]=\"isOnFirstPage()\"
|
|
10318
|
+
template: "\n <ul class=\"pagination\" *ngIf=\"!shouldBeHidden()\">\n <li *ngIf=\"directionLinks\" class=\"pagination-previous\" [class.disabled]=\"isOnFirstPage()\" (click)=\"onPreviousClick()\">\n <a [class.disabled]=\"isOnFirstPage()\">{{ previousLabel }}</a>\n </li>\n <li *ngFor=\"let page of pages\" [class.current]=\"currentPage === page.value\" (click)=\"onPageClick(page.value)\">\n <span>{{page.label}}</span>\n </li>\n <li *ngIf=\"directionLinks\" class=\"pagination-next\" [class.disabled]=\"isOnLastPage()\" (click)=\"onNextClick()\" >\n <a [class.disabled]=\"isOnLastPage()\">{{ nextLabel }}</a>\n </li>\n </ul>\n ",
|
|
10306
10319
|
encapsulation: core.ViewEncapsulation.None
|
|
10307
10320
|
},] }
|
|
10308
10321
|
];
|
|
@@ -10340,101 +10353,9 @@
|
|
|
10340
10353
|
},] }
|
|
10341
10354
|
];
|
|
10342
10355
|
|
|
10343
|
-
var PaginationService = /** @class */ (function () {
|
|
10344
|
-
function PaginationService() {
|
|
10345
|
-
this.change = new rxjs.Subject();
|
|
10346
|
-
this.instances = {};
|
|
10347
|
-
}
|
|
10348
|
-
Object.defineProperty(PaginationService.prototype, "DEFAULT_ID", {
|
|
10349
|
-
get: function () {
|
|
10350
|
-
return PaginationService.DEFAULT_ID;
|
|
10351
|
-
},
|
|
10352
|
-
enumerable: false,
|
|
10353
|
-
configurable: true
|
|
10354
|
-
});
|
|
10355
|
-
PaginationService.prototype.register = function (instance) {
|
|
10356
|
-
if (!instance.id) {
|
|
10357
|
-
instance.id = PaginationService.DEFAULT_ID;
|
|
10358
|
-
}
|
|
10359
|
-
if (!this.instances[instance.id]) {
|
|
10360
|
-
this.instances[instance.id] = instance;
|
|
10361
|
-
this.change.next(instance.id);
|
|
10362
|
-
}
|
|
10363
|
-
else {
|
|
10364
|
-
var changed = this.updateInstance(instance);
|
|
10365
|
-
if (changed) {
|
|
10366
|
-
this.change.next(instance.id);
|
|
10367
|
-
}
|
|
10368
|
-
}
|
|
10369
|
-
};
|
|
10370
|
-
// Returns the current page number.
|
|
10371
|
-
PaginationService.prototype.getCurrentPage = function (id) {
|
|
10372
|
-
if (this.instances[id]) {
|
|
10373
|
-
return this.instances[id].currentPage;
|
|
10374
|
-
}
|
|
10375
|
-
};
|
|
10376
|
-
// Sets the current page number.
|
|
10377
|
-
PaginationService.prototype.setCurrentPage = function (id, page) {
|
|
10378
|
-
if (this.instances[id]) {
|
|
10379
|
-
var instance = this.instances[id];
|
|
10380
|
-
var maxPage = Math.ceil(instance.totalItems / instance.itemsPerPage);
|
|
10381
|
-
if (page <= maxPage && 1 <= page) {
|
|
10382
|
-
this.instances[id].currentPage = page;
|
|
10383
|
-
this.change.next(id);
|
|
10384
|
-
}
|
|
10385
|
-
}
|
|
10386
|
-
};
|
|
10387
|
-
// Sets the value of instance.totalItems
|
|
10388
|
-
PaginationService.prototype.setTotalItems = function (id, totalItems) {
|
|
10389
|
-
if (this.instances[id] && 0 <= totalItems) {
|
|
10390
|
-
this.instances[id].totalItems = totalItems;
|
|
10391
|
-
this.change.next(id);
|
|
10392
|
-
}
|
|
10393
|
-
};
|
|
10394
|
-
// Sets the value of instance.itemsPerPage.
|
|
10395
|
-
PaginationService.prototype.setItemsPerPage = function (id, itemsPerPage) {
|
|
10396
|
-
if (this.instances[id]) {
|
|
10397
|
-
this.instances[id].itemsPerPage = itemsPerPage;
|
|
10398
|
-
this.change.next(id);
|
|
10399
|
-
}
|
|
10400
|
-
};
|
|
10401
|
-
/**
|
|
10402
|
-
* Returns a clone of the pagination instance object matching the id. If no
|
|
10403
|
-
* id specified, returns the instance corresponding to the default id.
|
|
10404
|
-
*/
|
|
10405
|
-
PaginationService.prototype.getInstance = function (id) {
|
|
10406
|
-
if (id === void 0) { id = PaginationService.DEFAULT_ID; }
|
|
10407
|
-
if (this.instances[id]) {
|
|
10408
|
-
return ObjectUtils.GetShallowClone(this.instances[id]);
|
|
10409
|
-
}
|
|
10410
|
-
return {};
|
|
10411
|
-
};
|
|
10412
|
-
/**
|
|
10413
|
-
* Check each property of the instance and update any that have changed. Return
|
|
10414
|
-
* true if any changes were made, else return false.
|
|
10415
|
-
*/
|
|
10416
|
-
PaginationService.prototype.updateInstance = function (instance) {
|
|
10417
|
-
var changed = false;
|
|
10418
|
-
for (var prop in this.instances[instance.id]) {
|
|
10419
|
-
if (instance[prop] !== this.instances[instance.id][prop]) {
|
|
10420
|
-
this.instances[instance.id][prop] = instance[prop];
|
|
10421
|
-
changed = true;
|
|
10422
|
-
}
|
|
10423
|
-
}
|
|
10424
|
-
return changed;
|
|
10425
|
-
};
|
|
10426
|
-
return PaginationService;
|
|
10427
|
-
}());
|
|
10428
|
-
PaginationService.DEFAULT_ID = "DEFAULT_PAGINATION_ID";
|
|
10429
|
-
PaginationService.decorators = [
|
|
10430
|
-
{ type: core.Injectable }
|
|
10431
|
-
];
|
|
10432
|
-
PaginationService.ctorParameters = function () { return []; };
|
|
10433
|
-
|
|
10434
10356
|
var LARGE_NUMBER = 999999999;
|
|
10435
10357
|
var PaginatePipe = /** @class */ (function () {
|
|
10436
|
-
function PaginatePipe(
|
|
10437
|
-
this.paginateService = paginateService;
|
|
10358
|
+
function PaginatePipe() {
|
|
10438
10359
|
// store the values from the last time the pipe
|
|
10439
10360
|
this.state = {};
|
|
10440
10361
|
}
|
|
@@ -10444,7 +10365,7 @@
|
|
|
10444
10365
|
// use the cached data from the `state` object to prevent the NgFor
|
|
10445
10366
|
// from flashing empty until the real values arrive.
|
|
10446
10367
|
if (!(collection instanceof Array)) {
|
|
10447
|
-
var _id = args.id
|
|
10368
|
+
var _id = args.id;
|
|
10448
10369
|
if (this.state[_id]) {
|
|
10449
10370
|
return this.state[_id].slice;
|
|
10450
10371
|
}
|
|
@@ -10458,7 +10379,6 @@
|
|
|
10458
10379
|
var start;
|
|
10459
10380
|
var end;
|
|
10460
10381
|
var perPage = instance.itemsPerPage;
|
|
10461
|
-
this.paginateService.register(instance);
|
|
10462
10382
|
if (!serverSideMode && collection instanceof Array) {
|
|
10463
10383
|
perPage = perPage || LARGE_NUMBER;
|
|
10464
10384
|
start = (instance.currentPage - 1) * perPage;
|
|
@@ -10470,7 +10390,6 @@
|
|
|
10470
10390
|
else {
|
|
10471
10391
|
var slice = collection.slice(start, end);
|
|
10472
10392
|
this._saveState(id, collection, slice, start, end);
|
|
10473
|
-
this.paginateService.change.next(id);
|
|
10474
10393
|
return slice;
|
|
10475
10394
|
}
|
|
10476
10395
|
}
|
|
@@ -10484,7 +10403,7 @@
|
|
|
10484
10403
|
var config = args;
|
|
10485
10404
|
this._checkConfig(config);
|
|
10486
10405
|
return {
|
|
10487
|
-
id: config.id
|
|
10406
|
+
id: config.id,
|
|
10488
10407
|
itemsPerPage: config.itemsPerPage || 0,
|
|
10489
10408
|
currentPage: config.currentPage || 1,
|
|
10490
10409
|
totalItems: config.totalItems || collection.length
|
|
@@ -10531,10 +10450,98 @@
|
|
|
10531
10450
|
name: 'paginate',
|
|
10532
10451
|
pure: false
|
|
10533
10452
|
},] }
|
|
10453
|
+
];
|
|
10454
|
+
|
|
10455
|
+
var PaginationService = /** @class */ (function () {
|
|
10456
|
+
function PaginationService() {
|
|
10457
|
+
this.change = new rxjs.Subject();
|
|
10458
|
+
this.instances = {};
|
|
10459
|
+
}
|
|
10460
|
+
Object.defineProperty(PaginationService.prototype, "DEFAULT_ID", {
|
|
10461
|
+
get: function () {
|
|
10462
|
+
return PaginationService.DEFAULT_ID;
|
|
10463
|
+
},
|
|
10464
|
+
enumerable: false,
|
|
10465
|
+
configurable: true
|
|
10466
|
+
});
|
|
10467
|
+
PaginationService.prototype.register = function (instance) {
|
|
10468
|
+
if (!instance.id) {
|
|
10469
|
+
instance.id = PaginationService.DEFAULT_ID;
|
|
10470
|
+
}
|
|
10471
|
+
if (!this.instances[instance.id]) {
|
|
10472
|
+
this.instances[instance.id] = instance;
|
|
10473
|
+
this.change.next(instance.id);
|
|
10474
|
+
}
|
|
10475
|
+
else {
|
|
10476
|
+
var changed = this.updateInstance(instance);
|
|
10477
|
+
if (changed) {
|
|
10478
|
+
this.change.next(instance.id);
|
|
10479
|
+
}
|
|
10480
|
+
}
|
|
10481
|
+
};
|
|
10482
|
+
// Returns the current page number.
|
|
10483
|
+
PaginationService.prototype.getCurrentPage = function (id) {
|
|
10484
|
+
if (this.instances[id]) {
|
|
10485
|
+
return this.instances[id].currentPage;
|
|
10486
|
+
}
|
|
10487
|
+
};
|
|
10488
|
+
// Sets the current page number.
|
|
10489
|
+
PaginationService.prototype.setCurrentPage = function (id, page) {
|
|
10490
|
+
if (this.instances[id]) {
|
|
10491
|
+
var instance = this.instances[id];
|
|
10492
|
+
var maxPage = Math.ceil(instance.totalItems / instance.itemsPerPage);
|
|
10493
|
+
if (page <= maxPage && 1 <= page) {
|
|
10494
|
+
this.instances[id].currentPage = page;
|
|
10495
|
+
this.change.next(id);
|
|
10496
|
+
}
|
|
10497
|
+
}
|
|
10498
|
+
};
|
|
10499
|
+
// Sets the value of instance.totalItems
|
|
10500
|
+
PaginationService.prototype.setTotalItems = function (id, totalItems) {
|
|
10501
|
+
if (this.instances[id] && 0 <= totalItems) {
|
|
10502
|
+
this.instances[id].totalItems = totalItems;
|
|
10503
|
+
this.change.next(id);
|
|
10504
|
+
}
|
|
10505
|
+
};
|
|
10506
|
+
// Sets the value of instance.itemsPerPage.
|
|
10507
|
+
PaginationService.prototype.setItemsPerPage = function (id, itemsPerPage) {
|
|
10508
|
+
if (this.instances[id]) {
|
|
10509
|
+
this.instances[id].itemsPerPage = itemsPerPage;
|
|
10510
|
+
this.change.next(id);
|
|
10511
|
+
}
|
|
10512
|
+
};
|
|
10513
|
+
/**
|
|
10514
|
+
* Returns a clone of the pagination instance object matching the id. If no
|
|
10515
|
+
* id specified, returns the instance corresponding to the default id.
|
|
10516
|
+
*/
|
|
10517
|
+
PaginationService.prototype.getInstance = function (id) {
|
|
10518
|
+
if (id === void 0) { id = PaginationService.DEFAULT_ID; }
|
|
10519
|
+
if (this.instances[id]) {
|
|
10520
|
+
return ObjectUtils.GetShallowClone(this.instances[id]);
|
|
10521
|
+
}
|
|
10522
|
+
return {};
|
|
10523
|
+
};
|
|
10524
|
+
/**
|
|
10525
|
+
* Check each property of the instance and update any that have changed. Return
|
|
10526
|
+
* true if any changes were made, else return false.
|
|
10527
|
+
*/
|
|
10528
|
+
PaginationService.prototype.updateInstance = function (instance) {
|
|
10529
|
+
var changed = false;
|
|
10530
|
+
for (var prop in this.instances[instance.id]) {
|
|
10531
|
+
if (instance[prop] !== this.instances[instance.id][prop]) {
|
|
10532
|
+
this.instances[instance.id][prop] = instance[prop];
|
|
10533
|
+
changed = true;
|
|
10534
|
+
}
|
|
10535
|
+
}
|
|
10536
|
+
return changed;
|
|
10537
|
+
};
|
|
10538
|
+
return PaginationService;
|
|
10539
|
+
}());
|
|
10540
|
+
PaginationService.DEFAULT_ID = "DEFAULT_PAGINATION_ID";
|
|
10541
|
+
PaginationService.decorators = [
|
|
10542
|
+
{ type: core.Injectable }
|
|
10534
10543
|
];
|
|
10535
|
-
|
|
10536
|
-
{ type: PaginationService }
|
|
10537
|
-
]; };
|
|
10544
|
+
PaginationService.ctorParameters = function () { return []; };
|
|
10538
10545
|
|
|
10539
10546
|
var PaginationComponent = /** @class */ (function () {
|
|
10540
10547
|
function PaginationComponent(_paginationService) {
|