1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- 'use strict';
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
- 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
- * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- */
- define(['react', 'prop-types'], function (React, PropTypes) {
- var _class, _temp;
- return _temp = _class = function (_React$Component) {
- _inherits(GridDropTarget, _React$Component);
- function GridDropTarget(props) {
- _classCallCheck(this, GridDropTarget);
- var _this = _possibleConstructorReturn(this, _React$Component.call(this, props));
- _this.ref = React.createRef();
- return _this;
- }
- GridDropTarget.prototype.componentDidMount = function componentDidMount() {
- this.props.dndManager.registerElement(this, this.ref.current);
- };
- GridDropTarget.prototype.componentWillUnmount = function componentWillUnmount() {
- this.props.dndManager.deregisterElement(this.ref.current);
- };
- GridDropTarget.prototype.render = function render() {
- var props = _extends({}, this.props);
- delete props.dndManager;
- return React.createElement('div', _extends({ ref: this.ref }, props));
- };
- return GridDropTarget;
- }(React.Component), _class.propTypes = {
- dndManager: PropTypes.any
- }, _temp;
- });
- //# sourceMappingURL=GridDropTarget.js.map
|