@gooddata/react-components
Version:
GoodData.UI - A powerful JavaScript library for building analytical applications
51 lines • 3.1 kB
JavaScript
;
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 classNames = require("classnames");
var react_intl_1 = require("react-intl");
var Bubble_1 = require("@gooddata/goodstrap/lib/Bubble/Bubble");
var BubbleHoverTrigger_1 = require("@gooddata/goodstrap/lib/Bubble/BubbleHoverTrigger");
var ConfigurationPanelContent_1 = require("./ConfigurationPanelContent");
var ConfigSection_1 = require("../configurationControls/ConfigSection");
var DataLabelsControl_1 = require("../configurationControls/DataLabelsControl");
var bubble_1 = require("../../constants/bubble");
var PieChartConfigurationPanel = /** @class */ (function (_super) {
__extends(PieChartConfigurationPanel, _super);
function PieChartConfigurationPanel() {
return _super !== null && _super.apply(this, arguments) || this;
}
PieChartConfigurationPanel.prototype.renderConfigurationPanel = function () {
var _a = this.props, propertiesMeta = _a.propertiesMeta, properties = _a.properties, pushData = _a.pushData;
var controlsDisabled = this.isControlDisabled();
return (React.createElement(BubbleHoverTrigger_1.default, { showDelay: bubble_1.SHOW_DELAY_DEFAULT, hideDelay: bubble_1.HIDE_DELAY_DEFAULT },
React.createElement("div", null,
this.renderColorSection(),
this.renderLegendSection(),
React.createElement(ConfigSection_1.default, { id: "canvas_section", title: "properties.canvas.title", propertiesMeta: propertiesMeta, properties: properties, pushData: pushData },
React.createElement(DataLabelsControl_1.default, { pushData: pushData, properties: properties, isDisabled: controlsDisabled, defaultValue: false }))),
React.createElement(Bubble_1.default, { className: this.getBubbleClassNames(), arrowOffsets: { "tc bc": [bubble_1.BUBBLE_ARROW_OFFSET_X, bubble_1.BUBBLE_ARROW_OFFSET_Y] }, alignPoints: [{ align: "tc bc" }] },
React.createElement(react_intl_1.FormattedMessage, { id: "properties.config.not_applicable" }))));
};
PieChartConfigurationPanel.prototype.getBubbleClassNames = function () {
return classNames("bubble-primary", {
invisible: !this.isControlDisabled(),
});
};
return PieChartConfigurationPanel;
}(ConfigurationPanelContent_1.default));
exports.default = PieChartConfigurationPanel;
//# sourceMappingURL=PieChartConfigurationPanel.js.map