UNPKG

@gooddata/react-components

Version:

GoodData.UI - A powerful JavaScript library for building analytical applications

42 lines 2.68 kB
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); // (C) 2019 GoodData Corporation var React = require("react"); var VisualizationLoadingHOC_1 = require("./base/VisualizationLoadingHOC"); var BaseVisualization_1 = require("./base/BaseVisualization"); var IntlWrapper_1 = require("./base/IntlWrapper"); var TranslationsProvider_1 = require("./base/TranslationsProvider"); var XirrTransformation_1 = require("../visualizations/headline/XirrTransformation"); var fixEmptyHeaderItems_1 = require("./base/utils/fixEmptyHeaderItems"); var XirrStateless = /** @class */ (function (_super) { __extends(XirrStateless, _super); function XirrStateless() { return _super !== null && _super.apply(this, arguments) || this; } XirrStateless.prototype.renderVisualization = function () { var _a = this.props, afterRender = _a.afterRender, drillableItems = _a.drillableItems, locale = _a.locale, dataSource = _a.dataSource, resultSpec = _a.resultSpec, execution = _a.execution, onFiredDrillEvent = _a.onFiredDrillEvent, onDrill = _a.onDrill, config = _a.config; return (React.createElement(IntlWrapper_1.IntlWrapper, { locale: locale }, React.createElement(TranslationsProvider_1.IntlTranslationsProvider, null, function (props) { return (React.createElement(XirrTransformation_1.default, { onAfterRender: afterRender, onFiredDrillEvent: onFiredDrillEvent, drillableItems: drillableItems, onDrill: onDrill, config: config, executionRequest: { afm: dataSource.getAfm(), resultSpec: resultSpec, }, executionResponse: execution.executionResponse, executionResult: fixEmptyHeaderItems_1.fixEmptyHeaderItems(execution.executionResult, props.emptyHeaderString) })); }))); }; XirrStateless.defaultProps = VisualizationLoadingHOC_1.commonDefaultProps; return XirrStateless; }(BaseVisualization_1.BaseVisualization)); exports.XirrStateless = XirrStateless; exports.Xirr = VisualizationLoadingHOC_1.visualizationLoadingHOC(XirrStateless); //# sourceMappingURL=Xirr.js.map