UNPKG

igniteui-react-grids

Version:

Ignite UI React grid components.

91 lines (90 loc) 3.18 kB
import { GridClipboardEventDetail as GridClipboardEventDetail_internal } from "./GridClipboardEventDetail"; import { ensureBool } from "igniteui-react-core"; /** * The event arguments when data from a grid is being copied. */ var IgrGridClipboardEventDetail = /** @class */ /*@__PURE__*/ (function () { function IgrGridClipboardEventDetail() { this.mounted = false; this._implementation = this.createImplementation(); this._implementation.externalObject = this; this.onImplementationCreated(); if (this._initializeAdapters) { this._initializeAdapters(); } } IgrGridClipboardEventDetail.prototype.createImplementation = function () { return new GridClipboardEventDetail_internal(); }; Object.defineProperty(IgrGridClipboardEventDetail.prototype, "nativeElement", { get: function () { return this._implementation.nativeElement; }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridClipboardEventDetail.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); IgrGridClipboardEventDetail.prototype.onImplementationCreated = function () { }; IgrGridClipboardEventDetail.prototype._provideImplementation = function (i) { this._implementation = i; this._implementation.externalObject = this; this.onImplementationCreated(); if (this._initializeAdapters) { this._initializeAdapters(); } }; Object.defineProperty(IgrGridClipboardEventDetail.prototype, "data", { /** * `data` can be of any type and refers to the data that is being copied/stored to the clipboard */ get: function () { return this.i.a; }, set: function (v) { if (v && !Array.isArray(v) && typeof (v) == "string") { var re = /\s*(?:,|\s|$)\s*/gm; v = v.split(re); } this.i.a = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridClipboardEventDetail.prototype, "cancel", { /** * `cancel` returns whether an external event has intercepted the copying * If the value becomes "true", it returns/exits from the method, instantiating the interface */ get: function () { return this.i.d; }, set: function (v) { this.i.d = ensureBool(v); }, enumerable: false, configurable: true }); IgrGridClipboardEventDetail.prototype.findByName = function (name) { if (this.findEphemera) { if (name && name.indexOf("@@e:") == 0) { return this.findEphemera(name); } } return null; }; IgrGridClipboardEventDetail.prototype.setNativeElement = function (element) { this.i.setNativeElement(element); }; return IgrGridClipboardEventDetail; }()); export { IgrGridClipboardEventDetail };