UNPKG

2.35 kBJavaScriptView Raw
1// ag-grid-react v26.2.0
2"use strict";
3var __extends = (this && this.__extends) || (function () {
4 var extendStatics = function (d, b) {
5 extendStatics = Object.setPrototypeOf ||
6 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
7 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
8 return extendStatics(d, b);
9 };
10 return function (d, b) {
11 extendStatics(d, b);
12 function __() { this.constructor = d; }
13 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14 };
15})();
16var __assign = (this && this.__assign) || function () {
17 __assign = Object.assign || function(t) {
18 for (var s, i = 1, n = arguments.length; i < n; i++) {
19 s = arguments[i];
20 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
21 t[p] = s[p];
22 }
23 return t;
24 };
25 return __assign.apply(this, arguments);
26};
27var __importStar = (this && this.__importStar) || function (mod) {
28 if (mod && mod.__esModule) return mod;
29 var result = {};
30 if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
31 result["default"] = mod;
32 return result;
33};
34Object.defineProperty(exports, "__esModule", { value: true });
35var react_1 = __importStar(require("react"));
36var agGridReactLegacy_1 = require("./legacy/agGridReactLegacy");
37var agGridReactUi_1 = require("./reactUi/agGridReactUi");
38var AgGridReact = /** @class */ (function (_super) {
39 __extends(AgGridReact, _super);
40 function AgGridReact() {
41 var _this = _super !== null && _super.apply(this, arguments) || this;
42 _this.setGridApi = function (api, columnApi) {
43 _this.api = api;
44 _this.columnApi = columnApi;
45 };
46 return _this;
47 }
48 AgGridReact.prototype.render = function () {
49 if (this.props.reactUi) {
50 return react_1.default.createElement(agGridReactUi_1.AgGridReactUi, __assign({}, this.props, { setGridApi: this.setGridApi }));
51 }
52 return react_1.default.createElement(agGridReactLegacy_1.AgGridReactLegacy, __assign({}, this.props, { setGridApi: this.setGridApi }));
53 };
54 return AgGridReact;
55}(react_1.Component));
56exports.AgGridReact = AgGridReact;