@progress/kendo-angular-grid
Version:
Kendo UI Grid for Angular - high performance data grid with paging, filtering, virtualization, CRUD, and more.
42 lines (41 loc) • 1.73 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 { EventEmitter, Injectable, isDevMode } from '@angular/core';
import { GridConfigurationErrorMessages } from '../common/error-messages';
import * as i0 from "@angular/core";
/**
* @hidden
*/
export class PDFService {
savePDF = new EventEmitter();
drawPDF = new EventEmitter();
exportClick = new EventEmitter();
dataChanged = new EventEmitter();
exporting;
save(component) {
this.emitEvent(this.savePDF, component);
}
draw(component, promise) {
this.emitEvent(this.drawPDF, { component, promise });
}
/**
* @hidden
*/
emitEvent(emitter, args) {
if (emitter.observers.length === 0) {
if (isDevMode()) {
throw new Error(GridConfigurationErrorMessages.requiredModule('PDF', 'PDFModule', '<kendo-grid-pdf>'));
}
}
else {
emitter.emit(args);
}
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PDFService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PDFService });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PDFService, decorators: [{
type: Injectable
}] });