@colijnit/corecomponents_v12 261.20.4 → 261.20.6
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.
|
@@ -11676,6 +11676,7 @@ class BaseSimpleGridComponent {
|
|
|
11676
11676
|
deleteRow = new EventEmitter();
|
|
11677
11677
|
addRow = new EventEmitter();
|
|
11678
11678
|
rowVisible = new EventEmitter();
|
|
11679
|
+
paginationPageChange = new EventEmitter();
|
|
11679
11680
|
handleMouseMove(event) {
|
|
11680
11681
|
if (this.resizable && event.buttons === 1 && this._columnForResize) {
|
|
11681
11682
|
// this._columnForResize.width = this._columnForResize.originalWidth - (this._startMousePositionX - event.clientX);
|
|
@@ -11789,7 +11790,7 @@ class BaseSimpleGridComponent {
|
|
|
11789
11790
|
});
|
|
11790
11791
|
}
|
|
11791
11792
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: BaseSimpleGridComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
11792
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.16", type: BaseSimpleGridComponent, isStandalone: true, inputs: { data: "data", exportData: "exportData", dragDropEnabled: "dragDropEnabled", resizable: "resizable", inlineEdit: "inlineEdit", showEdit: "showEdit", showToolbar: "showToolbar", autoAddRow: "autoAddRow", emitDragDrop: "emitDragDrop", extraColumns: "extraColumns" }, outputs: { onDrop: "onDrop", selectRow: "selectRow", deselectRow: "deselectRow", dblClickRow: "dblClickRow", saveRow: "saveRow", deleteRow: "deleteRow", addRow: "addRow", rowVisible: "rowVisible" }, host: { listeners: { "document:mousemove": "handleMouseMove($event)", "document:mouseup": "handleMouseUp($event)" } }, queries: [{ propertyName: "content", predicate: SimpleGridColumnDirective }], ngImport: i0 });
|
|
11793
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.16", type: BaseSimpleGridComponent, isStandalone: true, inputs: { data: "data", exportData: "exportData", dragDropEnabled: "dragDropEnabled", resizable: "resizable", inlineEdit: "inlineEdit", showEdit: "showEdit", showToolbar: "showToolbar", autoAddRow: "autoAddRow", emitDragDrop: "emitDragDrop", extraColumns: "extraColumns" }, outputs: { onDrop: "onDrop", selectRow: "selectRow", deselectRow: "deselectRow", dblClickRow: "dblClickRow", saveRow: "saveRow", deleteRow: "deleteRow", addRow: "addRow", rowVisible: "rowVisible", paginationPageChange: "paginationPageChange" }, host: { listeners: { "document:mousemove": "handleMouseMove($event)", "document:mouseup": "handleMouseUp($event)" } }, queries: [{ propertyName: "content", predicate: SimpleGridColumnDirective }], ngImport: i0 });
|
|
11793
11794
|
}
|
|
11794
11795
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: BaseSimpleGridComponent, decorators: [{
|
|
11795
11796
|
type: Directive
|
|
@@ -11832,6 +11833,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
11832
11833
|
type: Output
|
|
11833
11834
|
}], rowVisible: [{
|
|
11834
11835
|
type: Output
|
|
11836
|
+
}], paginationPageChange: [{
|
|
11837
|
+
type: Output
|
|
11835
11838
|
}], handleMouseMove: [{
|
|
11836
11839
|
type: HostListener,
|
|
11837
11840
|
args: ['document:mousemove', ['$event']]
|
|
@@ -12430,6 +12433,7 @@ class SimpleGridComponent extends BaseSimpleGridComponent {
|
|
|
12430
12433
|
rowDisabledFn;
|
|
12431
12434
|
showColumnSort = false;
|
|
12432
12435
|
showRowButtons = false;
|
|
12436
|
+
resetPageOnDataChange = true;
|
|
12433
12437
|
/**
|
|
12434
12438
|
* Promise function, if provided should return boolean
|
|
12435
12439
|
*/
|
|
@@ -12479,7 +12483,9 @@ class SimpleGridComponent extends BaseSimpleGridComponent {
|
|
|
12479
12483
|
this.changeDetection = changeDetection;
|
|
12480
12484
|
this._formMaster = _formMaster;
|
|
12481
12485
|
this.dataChanged.subscribe(() => {
|
|
12482
|
-
this.
|
|
12486
|
+
if (this.resetPageOnDataChange) {
|
|
12487
|
+
this.currentPage = 1;
|
|
12488
|
+
}
|
|
12483
12489
|
});
|
|
12484
12490
|
}
|
|
12485
12491
|
handleClickOutsideRow() {
|
|
@@ -12961,7 +12967,7 @@ class SimpleGridComponent extends BaseSimpleGridComponent {
|
|
|
12961
12967
|
this.rowToEdit = undefined;
|
|
12962
12968
|
}
|
|
12963
12969
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: SimpleGridComponent, deps: [{ token: IconCacheService }, { token: i0.ChangeDetectorRef }, { token: FormMasterService }], target: i0.ɵɵFactoryTarget.Component });
|
|
12964
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: SimpleGridComponent, isStandalone: false, selector: "co-simple-grid", inputs: { showAdd: "showAdd", showDelete: "showDelete", deselectAllowed: "deselectAllowed", editOnCellClick: "editOnCellClick", rightToolbar: "rightToolbar", showGridSettings: "showGridSettings", rowsPerPage: "rowsPerPage", rowDisabledFn: "rowDisabledFn", showColumnSort: "showColumnSort", showRowButtons: "showRowButtons", canRowBeEdittedFn: "canRowBeEdittedFn" }, host: { listeners: { "keydown": "handleKeyDown($event)" }, properties: { "class.co-simple-grid": "this.showClass" } }, providers: [FormMasterService], viewQueries: [{ propertyName: "headerCells", predicate: ["headerCell"], descendants: true }, { propertyName: "rowElements", predicate: ["rowElement"], descendants: true }], usesInheritance: true, ngImport: i0, template: `
|
|
12970
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: SimpleGridComponent, isStandalone: false, selector: "co-simple-grid", inputs: { showAdd: "showAdd", showDelete: "showDelete", deselectAllowed: "deselectAllowed", editOnCellClick: "editOnCellClick", rightToolbar: "rightToolbar", showGridSettings: "showGridSettings", rowsPerPage: "rowsPerPage", rowDisabledFn: "rowDisabledFn", showColumnSort: "showColumnSort", showRowButtons: "showRowButtons", resetPageOnDataChange: "resetPageOnDataChange", canRowBeEdittedFn: "canRowBeEdittedFn" }, host: { listeners: { "keydown": "handleKeyDown($event)" }, properties: { "class.co-simple-grid": "this.showClass" } }, providers: [FormMasterService], viewQueries: [{ propertyName: "headerCells", predicate: ["headerCell"], descendants: true }, { propertyName: "rowElements", predicate: ["rowElement"], descendants: true }], usesInheritance: true, ngImport: i0, template: `
|
|
12965
12971
|
@if (showToolbar) {
|
|
12966
12972
|
<co-grid-toolbar
|
|
12967
12973
|
[class.right]="rightToolbar"
|
|
@@ -13156,9 +13162,9 @@ class SimpleGridComponent extends BaseSimpleGridComponent {
|
|
|
13156
13162
|
[currentPage]="currentPage"
|
|
13157
13163
|
[totalItems]="data.length"
|
|
13158
13164
|
[autoHide]="true"
|
|
13159
|
-
(previousClick)="goToPreviousPage()"
|
|
13160
|
-
(nextClick)="goToNextPage()"
|
|
13161
|
-
(pageClick)="setCurrentPage($event)">
|
|
13165
|
+
(previousClick)="goToPreviousPage(); this.paginationPageChange.emit()"
|
|
13166
|
+
(nextClick)="goToNextPage(); this.paginationPageChange.emit()"
|
|
13167
|
+
(pageClick)="setCurrentPage($event); this.paginationPageChange.emit()">
|
|
13162
13168
|
</co-pagination-bar>
|
|
13163
13169
|
}
|
|
13164
13170
|
`, isInline: true, dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i3.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: GridToolbarComponent, selector: "co-grid-toolbar", inputs: ["showEdit", "showAdd", "showDelete", "deleteEnabled"], outputs: ["editClick", "cancelClick", "saveClick", "addClick", "deleteClick"] }, { kind: "component", type: FormComponent, selector: "co-form", inputs: ["readonly", "keepInView"], outputs: ["onChange", "validSubmit", "anySubmit", "validityChange", "readonlyChange", "invalidSubmit"] }, { kind: "directive", type: ObserveVisibilityDirective, selector: "[observeVisibility]", inputs: ["threshold"], outputs: ["visibilityChange"], exportAs: ["visibilityObserve"] }, { kind: "component", type: PaginationBarComponent, selector: "co-pagination-bar", inputs: ["directionLinks", "previousLabel", "nextLabel", "currentPage", "itemsPerPage", "totalItems", "paginationRange", "autoHide"], outputs: ["previousClick", "nextClick", "pageClick"] }, { kind: "directive", type: ClickOutsideDirective, selector: "[clickOutside]", inputs: ["clickOutside", "alwaysTrigger"], outputs: ["clickOutside"], exportAs: ["clickOutside"] }, { kind: "component", type: ButtonComponent, selector: "co-button", inputs: ["label", "iconData", "iconDataRight", "isToggleButton", "isToggled", "hidden", "disabled"], outputs: ["onClick", "clickedWhileDisabled", "isToggledChange"] }, { kind: "component", type: IconComponent, selector: "co-icon", inputs: ["icon", "iconData"] }, { kind: "component", type: SimpleGridCellComponent, selector: "co-simple-grid-cell", inputs: ["editMode", "column", "row", "fieldEditMode"], outputs: ["cellClick"] }, { kind: "pipe", type: PaginatePipe, name: "paginate" }, { kind: "pipe", type: CoreLocalizePipe, name: "coreLocalize" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
@@ -13362,9 +13368,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
13362
13368
|
[currentPage]="currentPage"
|
|
13363
13369
|
[totalItems]="data.length"
|
|
13364
13370
|
[autoHide]="true"
|
|
13365
|
-
(previousClick)="goToPreviousPage()"
|
|
13366
|
-
(nextClick)="goToNextPage()"
|
|
13367
|
-
(pageClick)="setCurrentPage($event)">
|
|
13371
|
+
(previousClick)="goToPreviousPage(); this.paginationPageChange.emit()"
|
|
13372
|
+
(nextClick)="goToNextPage(); this.paginationPageChange.emit()"
|
|
13373
|
+
(pageClick)="setCurrentPage($event); this.paginationPageChange.emit()">
|
|
13368
13374
|
</co-pagination-bar>
|
|
13369
13375
|
}
|
|
13370
13376
|
`,
|
|
@@ -13399,6 +13405,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
13399
13405
|
type: Input
|
|
13400
13406
|
}], showRowButtons: [{
|
|
13401
13407
|
type: Input
|
|
13408
|
+
}], resetPageOnDataChange: [{
|
|
13409
|
+
type: Input
|
|
13402
13410
|
}], canRowBeEdittedFn: [{
|
|
13403
13411
|
type: Input
|
|
13404
13412
|
}], showClass: [{
|