How to use the @babel/runtime/helpers/defineProperty function in @babel/runtime

To help you get started, we’ve selected a few @babel/runtime examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github leefsmp / Re-Flex / dist / es / ReflexHandle.js View on Github external
//
  /////////////////////////////////////////////////////////
  render() {
    const className = [...this.props.className.split(' '), this.state.active ? 'active' : '', 'reflex-handle'].join(' ').trim();
    return React.createElement("div", _extends({}, getDataProps(this.props), {
      onTouchStart: this.onMouseDown,
      onMouseDown: this.onMouseDown,
      style: this.props.style,
      className: className,
      id: this.props.id
    }), this.props.children);
  }

}

_defineProperty(ReflexHandle, "propTypes", {
  children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),
  onStartResize: PropTypes.func,
  onStopResize: PropTypes.func,
  className: PropTypes.string,
  propagate: PropTypes.bool,
  onResize: PropTypes.func,
  style: PropTypes.object /////////////////////////////////////////////////////////
  //
  //
  /////////////////////////////////////////////////////////

});

_defineProperty(ReflexHandle, "defaultProps", {
  document: typeof document === 'undefined' ? null : document,
  onStartResize: null,
github CalvinVon / vue-mount / es / mount.js View on Github external
function Mount(component, options) {
    _classCallCheck(this, Mount);

    _defineProperty(this, "options", void 0);

    _defineProperty(this, "component_options", void 0);

    _defineProperty(this, "component_constructor", void 0);

    _defineProperty(this, "component_instance", void 0);

    _defineProperty(this, "unwatchMapper", {});

    _defineProperty(this, "_to_mount_component", false);

    _defineProperty(this, "_to_mount_root", false);

    _defineProperty(this, "_to_create_root", false);

    _defineProperty(this, "_is_destroyed", false);

    _defineProperty(this, "_created_root_vue", void 0);

    inspectVueVersion();
    this.component_options = component;
    this.options = parseOptions(options);
    this.component_constructor = Vue.extend(component);
  }
  /**
github leefsmp / Re-Flex / dist / es / ReflexContainer.js View on Github external
constructor(props) {
    super(props);

    _defineProperty(this, "onWindowResize", () => {
      this.setState({
        flexData: this.computeFlexData()
      });
    });

    _defineProperty(this, "onStartResize", data => {
      const pos = data.event.changedTouches ? data.event.changedTouches[0] : data.event;

      switch (this.props.orientation) {
        case 'horizontal':
          document.body.classList.add('row-resize');
          this.previousPos = pos.pageY;
          break;

        case 'vertical':
        default:
          document.body.classList.add('col-resize');
          this.previousPos = pos.pageX;
          break;
      }

      this.elements = [this.children[data.index - 1], this.children[data.index + 1]];
github cube-js / cube.js / packages / cubejs-client-core / dist / cubejs-client-core.esm.js View on Github external
return function (field, index) {
          return _defineProperty({}, field === 'measures' ? valuesArray[index] : field, field === 'measures' ? measureValue : valuesArray[index]);
        };
      };
github cube-js / cube.js / packages / cubejs-react / dist / cubejs-react.esm.js View on Github external
remove: function remove(member) {
            var query = _this2.state.query;
            var members = (query[memberType] || []).concat([]);
            members.splice(member.index, 1);
            return _this2.updateQuery(_defineProperty({}, memberType, members));
          },
          update: function update(member, updateWith) {
github cube-js / cube.js / packages / cubejs-react / dist / cubejs-react.esm.js View on Github external
add: function add(member) {
            var query = _this2.state.query;

            _this2.updateQuery(_defineProperty({}, memberType, (query[memberType] || []).concat(toQuery(member))));
          },
          remove: function remove(member) {
github leefsmp / Re-Flex / dist / es / ReflexElement.js View on Github external
}

_defineProperty(ReflexElement, "propTypes", {
  renderOnResizeRate: PropTypes.number,
  propagateDimensions: PropTypes.bool,
  resizeHeight: PropTypes.bool,
  resizeWidth: PropTypes.bool,
  className: PropTypes.string,
  size: PropTypes.number /////////////////////////////////////////////////////////
  //
  //
  /////////////////////////////////////////////////////////

});

_defineProperty(ReflexElement, "defaultProps", {
  propagateDimensionsRate: 100,
  propagateDimensions: false,
  resizeHeight: true,
  resizeWidth: true,
  direction: [1],
  className: '' /////////////////////////////////////////////////////////
  //
  //
  /////////////////////////////////////////////////////////

});
github ashleyw / react-sane-contenteditable / lib / esm / react-sane-contenteditable.js View on Github external
function ContentEditable(props) {
    var _this;

    _classCallCheck(this, ContentEditable);

    _this = _possibleConstructorReturn(this, _getPrototypeOf(ContentEditable).call(this));

    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "insertAtCaret", function (prevValue, valueToInsert) {
      var _this$getRange = _this.getRange(),
          startOffset = _this$getRange.startOffset,
          endOffset = _this$getRange.endOffset;

      var prefix = prevValue.slice(0, startOffset);
      var suffix = prevValue.slice(endOffset);
      return [prefix, valueToInsert, suffix].join('');
    });

    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onBlur", function (ev) {
      var value = _this.state.value;
      var onBlur = _this.props.onBlur;

      if (isFunction(onBlur)) {
        onBlur(ev, value);
      }