@gooddata/react-components
Version:
GoodData.UI - A powerful JavaScript library for building analytical applications
43 lines • 2.14 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 react_intl_1 = require("react-intl");
var classNames = require("classnames");
var Bubble_1 = require("@gooddata/goodstrap/lib/Bubble/Bubble");
var BubbleHoverTrigger_1 = require("@gooddata/goodstrap/lib/Bubble/BubbleHoverTrigger");
var translations_1 = require("../utils/translations");
var DisabledBubbleMessage = /** @class */ (function (_super) {
__extends(DisabledBubbleMessage, _super);
function DisabledBubbleMessage() {
return _super !== null && _super.apply(this, arguments) || this;
}
DisabledBubbleMessage.prototype.render = function () {
var _a = this.props, className = _a.className, children = _a.children, intl = _a.intl;
return (React.createElement(BubbleHoverTrigger_1.default, { className: className },
children,
React.createElement(Bubble_1.default, { className: this.getBubbleClassNames(), alignPoints: [{ align: "cr cl" }] }, translations_1.getTranslation("properties.not_applicable", intl))));
};
DisabledBubbleMessage.prototype.getBubbleClassNames = function () {
return classNames("bubble-primary", {
invisible: !this.props.showDisabledMessage,
});
};
return DisabledBubbleMessage;
}(React.PureComponent));
exports.DisabledBubbleMessage = DisabledBubbleMessage;
exports.default = react_intl_1.injectIntl(DisabledBubbleMessage);
//# sourceMappingURL=DisabledBubbleMessage.js.map