UNPKG

igniteui-react-grids

Version:

Ignite UI React grid components.

93 lines (92 loc) 3 kB
import { IgrBaseEventArgsDetail } from "./igr-base-event-args-detail"; import { GridToolbarExportEventArgsDetail as GridToolbarExportEventArgsDetail_internal } from "./GridToolbarExportEventArgsDetail"; import { ensureBool } from "igniteui-react-core"; /** * Represents the arguments for the grid toolbar export event. * It provides information about the grid instance, exporter service, export options, * and allows the event to be canceled. */ export class IgrGridToolbarExportEventArgsDetail extends IgrBaseEventArgsDetail { createImplementation() { return new GridToolbarExportEventArgsDetail_internal(); } /** * @hidden */ get i() { return this._implementation; } constructor() { super(); } /** * `grid` represents a reference to the instance of the grid te event originated from */ get grid() { const r = this.i.i; if (r == null) { return null; } return r.externalObject; } set grid(v) { v == null ? this.i.i = null : this.i.i = v.i; } /** * The `exporter` is a base service. * The type (an abstract class `IgxBaseExporter`) has it's own properties and methods * It is used to define the format and options of the export, the exported element * and methods for preparing the data from the elements for exporting */ get exporter() { const r = this.i.g; if (r == null) { return null; } return r.externalObject; } set exporter(v) { v == null ? this.i.g = null : this.i.g = v.i; } /** * Represents the different settings, that can be given to an export * The type (an abstract class `IgxExporterOptionsBase`) has properties for column settings * (whether they should be ignored) as well as method for generating a file name */ get options() { const r = this.i.h; if (r == null) { return null; } return r.externalObject; } set options(v) { v == null ? this.i.h = null : this.i.h = v.i; } /** * `cancel` returns whether the event has been intercepted and stopped * If the value becomes "true", it returns/exits from the method, instantiating the interface */ get cancel() { return this.i.j; } set cancel(v) { this.i.j = ensureBool(v); } findByName(name) { var baseResult = super.findByName(name); if (baseResult) { return baseResult; } if (this.grid && this.grid.name && this.grid.name == name) { return this.grid; } if (this.exporter && this.exporter.name && this.exporter.name == name) { return this.exporter; } if (this.options && this.options.name && this.options.name == name) { return this.options; } return null; } }