CustomVisPreviewMessage.js 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. 'use strict';
  2. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  3. 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; }
  4. 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; }
  5. /**
  6. * Licensed Materials - Property of IBM
  7. * IBM Cognos Products: BI Cloud (C) Copyright IBM Corp. 2019
  8. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  9. */
  10. define(['react', 'react-dom', 'prop-types', 'ca-ui-toolkit', '../../../../widgets/livewidget/nls/StringResources'], function (React, ReactDOM, PropTypes, UI_Toolkit, stringResources) {
  11. var Component = React.Component;
  12. var FlexLayout = UI_Toolkit.FlexLayout,
  13. FlexItem = UI_Toolkit.FlexItem,
  14. Label = UI_Toolkit.Label,
  15. SVGIcon = UI_Toolkit.SVGIcon;
  16. var CustomVisPreviewMessage = function (_Component) {
  17. _inherits(CustomVisPreviewMessage, _Component);
  18. function CustomVisPreviewMessage(props) {
  19. _classCallCheck(this, CustomVisPreviewMessage);
  20. var _this = _possibleConstructorReturn(this, _Component.call(this, props));
  21. _this.getInformation16 = props.iconsFeature.getIcon('getInformation');
  22. return _this;
  23. }
  24. CustomVisPreviewMessage.prototype.render = function render() {
  25. return React.createElement(
  26. FlexLayout,
  27. {
  28. direction: 'row',
  29. fullHeight: true,
  30. justifyContent: 'center'
  31. },
  32. React.createElement(
  33. FlexItem,
  34. null,
  35. React.createElement(
  36. FlexLayout,
  37. {
  38. wrap: 'wrap',
  39. direction: 'row'
  40. },
  41. React.createElement(
  42. FlexItem,
  43. null,
  44. React.createElement(SVGIcon, {
  45. iconId: this.getInformation16.id,
  46. verticalAlign: 'middle',
  47. className: 'customVisInfoIcon' })
  48. ),
  49. React.createElement(
  50. FlexItem,
  51. {
  52. wrap: 'wrap',
  53. 'white-space': 'normal'
  54. },
  55. React.createElement(Label, {
  56. label: stringResources.get('extVisPreviewMessage')
  57. })
  58. )
  59. )
  60. )
  61. );
  62. };
  63. return CustomVisPreviewMessage;
  64. }(Component);
  65. CustomVisPreviewMessage.propTypes = {
  66. iconsFeature: PropTypes.object.isRequired
  67. };
  68. return CustomVisPreviewMessage;
  69. });
  70. //# sourceMappingURL=CustomVisPreviewMessage.js.map