@progress/kendo-angular-grid
Version:
Kendo UI Grid for Angular - high performance data grid with paging, filtering, virtualization, CRUD, and more.
73 lines (72 loc) • 2.83 kB
JavaScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
import { Injectable } from "@angular/core";
import { Subject } from "rxjs";
import { AdaptiveService } from "@progress/kendo-angular-utils";
import { ContextService } from "./provider.service";
import * as i0 from "@angular/core";
import * as i1 from "./provider.service";
import * as i2 from "@progress/kendo-angular-utils";
/**
* @hidden
*
* The AdaptiveGridService is used to provide common information for the ActionSheet used in adaptive mode.
*/
export class AdaptiveGridService {
ctx;
adaptiveService;
/**
* Emits when the ActionSheet view animation ends.
*/
get animationEnd() {
return this.animationEndSubject.asObservable();
}
columnMenuService;
columns = [];
secondaryView;
viewType;
popupRef;
column;
filterMenuContainer;
filterMenuContainerComponentRef;
animationEndSubject = new Subject();
constructor(ctx, adaptiveService) {
this.ctx = ctx;
this.adaptiveService = adaptiveService;
}
submitFilter() {
this.filterMenuContainer.submit();
this.ctx.grid.adaptiveRenderer.actionSheet.toggle(false);
this.reset();
}
resetFilter() {
this.filterMenuContainer.reset();
this.ctx.grid.adaptiveRenderer.actionSheet.toggle(false);
this.reset();
}
reset() {
this.ctx.grid.adaptiveRenderer.actionSheet.currentView = 1;
this.filterMenuContainerComponentRef?.destroy();
this.column = null;
this.popupRef = null;
this.filterMenuContainer = null;
this.viewType = null;
this.secondaryView = null;
}
/**
* Notifies that the ActionSheet animation has ended.
*/
notifyAnimationEnd() {
this.animationEndSubject.next();
}
get windowSize() {
return this.adaptiveService.size;
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AdaptiveGridService, deps: [{ token: i1.ContextService }, { token: i2.AdaptiveService }], target: i0.ɵɵFactoryTarget.Injectable });
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AdaptiveGridService });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AdaptiveGridService, decorators: [{
type: Injectable
}], ctorParameters: () => [{ type: i1.ContextService }, { type: i2.AdaptiveService }] });