@skyux/ag-grid 12.15.0 → 12.17.0
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.
|
@@ -676,11 +676,11 @@ class SkyAgGridWrapperComponent {
|
|
|
676
676
|
}
|
|
677
677
|
}
|
|
678
678
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: SkyAgGridWrapperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
679
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.7", type: SkyAgGridWrapperComponent, isStandalone: true, selector: "sky-ag-grid-wrapper", inputs: { compact: { classPropertyName: "compact", publicName: "compact", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, minHeight: { classPropertyName: "minHeight", publicName: "minHeight", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.sky-ag-grid-layout-normal": "this.isNormalLayout" } }, queries: [{ propertyName: "agGrid", first: true, predicate: AgGridAngular, descendants: true, static: true }], viewQueries: [{ propertyName: "skyAgGridDiv", first: true, predicate: ["skyAgGridDiv"], descendants: true, isSignal: true }], ngImport: i0, template: "<span\n class=\"nav-anchor\"\n tabindex=\"0\"\n [id]=\"beforeAnchorId\"\n (focusin)=\"onAnchorFocus($event)\"\n>\n</span>\n<div\n #skyAgGridDiv\n class=\"sky-ag-grid\"\n tabindex=\"0\"\n [class.sky-ag-grid-top-scrollbar]=\"\n agGrid?.gridOptions?.context &&\n agGrid?.gridOptions?.context['enableTopScroll']\n \"\n [ngClass]=\"wrapperClasses$ | async\"\n [id]=\"gridId\"\n [skyViewkeeper]=\"viewkeeperClasses\"\n (keydown)=\"onGridKeydown($event)\"\n (keyup.escape)=\"onKeyUpEscape($event)\"\n>\n <ng-content />\n</div>\n<span\n tabindex=\"0\"\n class=\"nav-anchor\"\n [id]=\"afterAnchorId\"\n (focusin)=\"onAnchorFocus($event)\"\n>\n</span>\n", dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: SkyIdModule }, { kind: "ngmodule", type: SkyViewkeeperModule }, { kind: "directive", type: i1.λ3, selector: "[skyViewkeeper]", inputs: ["skyViewkeeper"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
679
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.7", type: SkyAgGridWrapperComponent, isStandalone: true, selector: "sky-ag-grid-wrapper", inputs: { compact: { classPropertyName: "compact", publicName: "compact", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, minHeight: { classPropertyName: "minHeight", publicName: "minHeight", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.sky-ag-grid-layout-normal": "this.isNormalLayout" } }, queries: [{ propertyName: "agGrid", first: true, predicate: AgGridAngular, descendants: true, static: true }], viewQueries: [{ propertyName: "skyAgGridDiv", first: true, predicate: ["skyAgGridDiv"], descendants: true, isSignal: true }], ngImport: i0, template: "<span\n class=\"nav-anchor\"\n tabindex=\"0\"\n [id]=\"beforeAnchorId\"\n (focusin)=\"onAnchorFocus($event)\"\n>\n</span>\n<div\n #skyAgGridDiv\n class=\"sky-ag-grid\"\n skyViewkeeperOmitShadow=\".ag-body-horizontal-scroll\"\n tabindex=\"0\"\n [class.sky-ag-grid-top-scrollbar]=\"\n agGrid?.gridOptions?.context &&\n agGrid?.gridOptions?.context['enableTopScroll']\n \"\n [ngClass]=\"wrapperClasses$ | async\"\n [id]=\"gridId\"\n [skyViewkeeper]=\"viewkeeperClasses\"\n (keydown)=\"onGridKeydown($event)\"\n (keyup.escape)=\"onKeyUpEscape($event)\"\n>\n <ng-content />\n</div>\n<span\n tabindex=\"0\"\n class=\"nav-anchor\"\n [id]=\"afterAnchorId\"\n (focusin)=\"onAnchorFocus($event)\"\n>\n</span>\n", dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: SkyIdModule }, { kind: "ngmodule", type: SkyViewkeeperModule }, { kind: "directive", type: i1.λ3, selector: "[skyViewkeeper]", inputs: ["skyViewkeeper", "skyViewkeeperOmitShadow"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
680
680
|
}
|
|
681
681
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: SkyAgGridWrapperComponent, decorators: [{
|
|
682
682
|
type: Component,
|
|
683
|
-
args: [{ selector: 'sky-ag-grid-wrapper', changeDetection: ChangeDetectionStrategy.OnPush, imports: [AsyncPipe, NgClass, SkyIdModule, SkyViewkeeperModule], template: "<span\n class=\"nav-anchor\"\n tabindex=\"0\"\n [id]=\"beforeAnchorId\"\n (focusin)=\"onAnchorFocus($event)\"\n>\n</span>\n<div\n #skyAgGridDiv\n class=\"sky-ag-grid\"\n tabindex=\"0\"\n [class.sky-ag-grid-top-scrollbar]=\"\n agGrid?.gridOptions?.context &&\n agGrid?.gridOptions?.context['enableTopScroll']\n \"\n [ngClass]=\"wrapperClasses$ | async\"\n [id]=\"gridId\"\n [skyViewkeeper]=\"viewkeeperClasses\"\n (keydown)=\"onGridKeydown($event)\"\n (keyup.escape)=\"onKeyUpEscape($event)\"\n>\n <ng-content />\n</div>\n<span\n tabindex=\"0\"\n class=\"nav-anchor\"\n [id]=\"afterAnchorId\"\n (focusin)=\"onAnchorFocus($event)\"\n>\n</span>\n" }]
|
|
683
|
+
args: [{ selector: 'sky-ag-grid-wrapper', changeDetection: ChangeDetectionStrategy.OnPush, imports: [AsyncPipe, NgClass, SkyIdModule, SkyViewkeeperModule], template: "<span\n class=\"nav-anchor\"\n tabindex=\"0\"\n [id]=\"beforeAnchorId\"\n (focusin)=\"onAnchorFocus($event)\"\n>\n</span>\n<div\n #skyAgGridDiv\n class=\"sky-ag-grid\"\n skyViewkeeperOmitShadow=\".ag-body-horizontal-scroll\"\n tabindex=\"0\"\n [class.sky-ag-grid-top-scrollbar]=\"\n agGrid?.gridOptions?.context &&\n agGrid?.gridOptions?.context['enableTopScroll']\n \"\n [ngClass]=\"wrapperClasses$ | async\"\n [id]=\"gridId\"\n [skyViewkeeper]=\"viewkeeperClasses\"\n (keydown)=\"onGridKeydown($event)\"\n (keyup.escape)=\"onKeyUpEscape($event)\"\n>\n <ng-content />\n</div>\n<span\n tabindex=\"0\"\n class=\"nav-anchor\"\n [id]=\"afterAnchorId\"\n (focusin)=\"onAnchorFocus($event)\"\n>\n</span>\n" }]
|
|
684
684
|
}], ctorParameters: () => [], propDecorators: { agGrid: [{
|
|
685
685
|
type: ContentChild,
|
|
686
686
|
args: [AgGridAngular, {
|
|
@@ -1087,6 +1087,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImpor
|
|
|
1087
1087
|
}], ctorParameters: () => [] });
|
|
1088
1088
|
|
|
1089
1089
|
class SkyAgGridRowDeleteDirective {
|
|
1090
|
+
#agGridBodyViewport;
|
|
1091
|
+
#agGridBodyClipElements;
|
|
1090
1092
|
#ngUnsubscribe;
|
|
1091
1093
|
#rowDeleteIdsInternal;
|
|
1092
1094
|
#clipPath;
|
|
@@ -1111,7 +1113,8 @@ class SkyAgGridRowDeleteDirective {
|
|
|
1111
1113
|
*/
|
|
1112
1114
|
this.rowDeleteConfirm = output();
|
|
1113
1115
|
this.agGrid = contentChild(AgGridAngular);
|
|
1114
|
-
this
|
|
1116
|
+
this.#agGridBodyViewport = new BehaviorSubject([]);
|
|
1117
|
+
this.#agGridBodyClipElements = new BehaviorSubject([]);
|
|
1115
1118
|
this.#ngUnsubscribe = new Subject();
|
|
1116
1119
|
this.#rowDeleteIdsInternal = linkedSignal({
|
|
1117
1120
|
source: this.rowDeleteIds,
|
|
@@ -1135,7 +1138,7 @@ class SkyAgGridRowDeleteDirective {
|
|
|
1135
1138
|
this.#zIndex.next(zIndex);
|
|
1136
1139
|
});
|
|
1137
1140
|
}
|
|
1138
|
-
this.#rowDeleteSvc = new SkyAgGridRowDeleteContext(this.#rowDeleteIdsInternal.asReadonly(), toSignal(this
|
|
1141
|
+
this.#rowDeleteSvc = new SkyAgGridRowDeleteContext(this.#rowDeleteIdsInternal.asReadonly(), toSignal(this.#agGridBodyViewport), signal(undefined));
|
|
1139
1142
|
this.#rowDeleteSvc.cancelRowDelete
|
|
1140
1143
|
.pipe(takeUntil(this.#ngUnsubscribe))
|
|
1141
1144
|
.subscribe((rowId) => {
|
|
@@ -1152,13 +1155,26 @@ class SkyAgGridRowDeleteDirective {
|
|
|
1152
1155
|
}
|
|
1153
1156
|
});
|
|
1154
1157
|
const agGrid = toObservable(this.agGrid);
|
|
1155
|
-
agGrid
|
|
1156
|
-
|
|
1157
|
-
.
|
|
1158
|
-
this.agGridBodyViewport.next([
|
|
1158
|
+
const agGridReady = agGrid.pipe(filter$1((agGrid) => !!agGrid), switchMap((agGrid) => agGrid.gridReady), take(1), takeUntil(this.#ngUnsubscribe));
|
|
1159
|
+
agGridReady.subscribe((ready) => {
|
|
1160
|
+
this.#agGridBodyViewport.next([
|
|
1159
1161
|
new ElementRef(this.#elementRef.nativeElement.querySelector('div.ag-root-wrapper')),
|
|
1160
1162
|
]);
|
|
1161
|
-
this.#rowDeleteSvc.gridApi.set(
|
|
1163
|
+
this.#rowDeleteSvc.gridApi.set(ready.api);
|
|
1164
|
+
});
|
|
1165
|
+
agGrid
|
|
1166
|
+
.pipe(filter$1((grid) => !!grid), switchMap((grid) => merge(grid.firstDataRendered.asObservable(), grid.rowDataUpdated.asObservable(), agGridReady.pipe(switchMap(() => fromEvent(grid.api, 'gridOptionsChanged')))).pipe(takeUntil(this.#ngUnsubscribe), takeUntil(agGridReady.pipe(switchMap(() => fromEvent(grid.api, 'gridPreDestroyed').pipe(take(1))))), startWith(grid.api?.getGridOption('domLayout')), map(() => grid.api?.getGridOption('domLayout')), switchMap((domLayout) => {
|
|
1167
|
+
if (domLayout === 'normal') {
|
|
1168
|
+
return this.#agGridBodyViewport.asObservable();
|
|
1169
|
+
}
|
|
1170
|
+
return of([]);
|
|
1171
|
+
}))))
|
|
1172
|
+
.subscribe((agGridBodyClipElements) => {
|
|
1173
|
+
// When using AG Grid's `domLayout: 'autoHeight'` option,
|
|
1174
|
+
// the grid's body viewport is clipped by the scrollable host.
|
|
1175
|
+
// But when using `domLayout: 'normal'`, the grid's body viewport
|
|
1176
|
+
// should be used as the scrollable host for the row delete overlay.
|
|
1177
|
+
this.#agGridBodyClipElements.next(agGridBodyClipElements);
|
|
1162
1178
|
});
|
|
1163
1179
|
agGrid
|
|
1164
1180
|
.pipe(filter$1((agGrid) => !!agGrid), switchMap((agGrid) => agGrid.rowDataUpdated), takeUntil(this.#ngUnsubscribe))
|
|
@@ -1194,7 +1210,7 @@ class SkyAgGridRowDeleteDirective {
|
|
|
1194
1210
|
}
|
|
1195
1211
|
ngAfterViewInit() {
|
|
1196
1212
|
this.#scrollableHostService
|
|
1197
|
-
.watchScrollableHostClipPathChanges(this.#elementRef, this.
|
|
1213
|
+
.watchScrollableHostClipPathChanges(this.#elementRef, this.#agGridBodyClipElements.asObservable())
|
|
1198
1214
|
.pipe(takeUntil(this.#ngUnsubscribe))
|
|
1199
1215
|
.subscribe((clipPath) => {
|
|
1200
1216
|
this.#clipPath.next(clipPath);
|