123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157 |
- 'use strict';
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
- /**
- * Licensed Materials - Property of IBM
- * IBM Cognos Products: BI Cloud (C) Copyright IBM Corp. 2019, 2020
- * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- */
- define(['react', 'prop-types', 'ca-ui-toolkit', '../../../widgets/livewidget/nls/StringResources', '../../../lib/@waca/dashboard-common/dist/lib/@ba-ui-toolkit/ba-graphics/dist/illustrations-js/nothing-here_128'], function (React, PropTypes, UI_Toolkit, StringResources, emptyCustomStateIcon) {
- var Component = React.Component;
- var FlexLayout = UI_Toolkit.FlexLayout,
- FlexItem = UI_Toolkit.FlexItem,
- VSpacer = UI_Toolkit.VSpacer,
- SVGIcon = UI_Toolkit.SVGIcon,
- Label = UI_Toolkit.Label,
- Button = UI_Toolkit.Button;
- var NoCustomVisuals = function (_Component) {
- _inherits(NoCustomVisuals, _Component);
- function NoCustomVisuals() {
- _classCallCheck(this, NoCustomVisuals);
- return _possibleConstructorReturn(this, _Component.apply(this, arguments));
- }
- NoCustomVisuals.prototype.render = function render() {
- var customVisAction = this.props.customVisAction;
- var openSelectBundleFileDialog = customVisAction.openSelectBundleFileDialog.bind(customVisAction);
- var msg = void 0;
- var buttonLabel = void 0;
- if (customVisAction.canManage()) {
- msg = StringResources.get('extVisNoCustomVisualsAdminMsg');
- buttonLabel = StringResources.get('extVisAddCustomVisual');
- } else {
- msg = StringResources.get('extVisNoCustomVisualsMsg');
- }
- return React.createElement(
- FlexLayout,
- {
- fullHeight: true,
- direction: 'column',
- justifyContent: 'space-between',
- alignItems: 'center'
- },
- React.createElement(
- FlexItem,
- null,
- React.createElement(VSpacer, { size: 3 })
- ),
- React.createElement(
- FlexItem,
- null,
- React.createElement(
- FlexLayout,
- {
- fullHeight: true,
- direction: 'column',
- justifyContent: 'center',
- alignItems: 'center',
- className: 'vis-no-custom-visuals'
- },
- React.createElement(
- FlexLayout,
- {
- fullHeight: true,
- direction: 'column',
- justifyContent: 'center',
- alignItems: 'center'
- },
- React.createElement(
- FlexItem,
- null,
- React.createElement(SVGIcon, {
- size: 'xxlarge',
- className: 'svgIcon',
- iconId: emptyCustomStateIcon.default.id })
- ),
- React.createElement(
- FlexItem,
- null,
- React.createElement(VSpacer, { size: 3 })
- ),
- React.createElement(
- FlexItem,
- null,
- React.createElement(Label, {
- className: 'vis-no-custom-visuals-label',
- label: StringResources.get('extVisNoCustomVisuals')
- })
- ),
- React.createElement(
- FlexItem,
- null,
- React.createElement(VSpacer, { size: 2 })
- ),
- React.createElement(
- FlexItem,
- null,
- React.createElement(Label, {
- className: 'vis-no-custom-visuals-msg',
- label: msg
- })
- ),
- customVisAction.canManage() && React.createElement(
- 'div',
- null,
- React.createElement(
- FlexItem,
- null,
- React.createElement(VSpacer, { size: 4 })
- ),
- React.createElement(
- FlexItem,
- null,
- React.createElement(Button, {
- set: 'primary',
- label: buttonLabel,
- title: buttonLabel,
- onClick: function onClick() {
- return openSelectBundleFileDialog();
- }
- })
- )
- )
- )
- )
- ),
- React.createElement(
- FlexItem,
- null,
- React.createElement(VSpacer, { size: 3 })
- )
- );
- };
- return NoCustomVisuals;
- }(Component);
- NoCustomVisuals.propTypes = {
- handlers: PropTypes.shape({
- openSelectBundleFileDialog: PropTypes.func.isRequired
- }).isRequired,
- customVisAction: PropTypes.object.isRequired
- };
- return NoCustomVisuals;
- });
- //# sourceMappingURL=NoCustomVisuals.js.map
|