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 godaner / vm-engine / vm-backend / src / main / resources / static / node_modules / antd / es / spin / index.js View on Github external
value: function render() {
            var _classNames;

            var _a = this.props,
                className = _a.className,
                size = _a.size,
                prefixCls = _a.prefixCls,
                tip = _a.tip,
                wrapperClassName = _a.wrapperClassName,
                restProps = __rest(_a, ["className", "size", "prefixCls", "tip", "wrapperClassName"]);var _state = this.state,
                spinning = _state.spinning,
                notCssAnimationSupported = _state.notCssAnimationSupported;

            var spinClassName = classNames(prefixCls, (_classNames = {}, _defineProperty(_classNames, prefixCls + '-sm', size === 'small'), _defineProperty(_classNames, prefixCls + '-lg', size === 'large'), _defineProperty(_classNames, prefixCls + '-spinning', spinning), _defineProperty(_classNames, prefixCls + '-show-text', !!tip || notCssAnimationSupported), _classNames), className);
            // fix https://fb.me/react-unknown-prop
            var divProps = omit(restProps, ['spinning', 'delay']);
            var spinElement = React.createElement(
                'div',
                _extends({}, divProps, { className: spinClassName }),
                React.createElement(
                    'span',
                    { className: prefixCls + '-dot' },
                    React.createElement('i', null),
                    React.createElement('i', null),
                    React.createElement('i', null),
                    React.createElement('i', null)
                ),
                tip ? React.createElement(
                    'div',
                    { className: prefixCls + '-text' },
github godaner / vm-engine / vm-backend / src / main / resources / static / node_modules / antd / es / badge / index.js View on Github external
style = _a.style,
                children = _a.children,
                dot = _a.dot,
                status = _a.status,
                text = _a.text,
                restProps = __rest(_a, ["count", "showZero", "prefixCls", "scrollNumberPrefixCls", "overflowCount", "className", "style", "children", "dot", "status", "text"]);
            var isDot = dot || status;
            var displayCount = count > overflowCount ? overflowCount + '+' : count;
            // dot mode don't need count
            if (isDot) {
                displayCount = '';
            }
            var isZero = displayCount === '0' || displayCount === 0;
            var isEmpty = displayCount === null || displayCount === undefined || displayCount === '';
            var hidden = (isEmpty || isZero && !showZero) && !isDot;
            var scrollNumberCls = classNames((_classNames = {}, _defineProperty(_classNames, prefixCls + '-dot', isDot), _defineProperty(_classNames, prefixCls + '-count', !isDot), _classNames));
            var badgeCls = classNames(className, prefixCls, (_classNames2 = {}, _defineProperty(_classNames2, prefixCls + '-status', !!status), _defineProperty(_classNames2, prefixCls + '-not-a-wrapper', !children), _classNames2));
            warning(!(children && status), '`Badge[children]` and `Badge[status]` cannot be used at the same time.');
            // 
            if (!children && status) {
                var _classNames3;

                var statusCls = classNames((_classNames3 = {}, _defineProperty(_classNames3, prefixCls + '-status-dot', !!status), _defineProperty(_classNames3, prefixCls + '-status-' + status, true), _classNames3));
                return React.createElement(
                    'span',
                    { className: badgeCls },
                    React.createElement('span', { className: statusCls }),
                    React.createElement(
                        'span',
                        { className: prefixCls + '-status-text' },
                        text
                    )
github godaner / vm-engine / vm-backend / src / main / resources / static / node_modules / rc-calendar / es / decade / DecadePanel.js View on Github external
var tds = row.map(function (decadeData) {
          var _classNameMap;

          var dStartDecade = decadeData.startDecade;
          var dEndDecade = decadeData.endDecade;
          var isLast = dStartDecade < startYear;
          var isNext = dEndDecade > endYear;
          var classNameMap = (_classNameMap = {}, _defineProperty(_classNameMap, prefixCls + '-cell', 1), _defineProperty(_classNameMap, prefixCls + '-selected-cell', dStartDecade <= currentYear && currentYear <= dEndDecade), _defineProperty(_classNameMap, prefixCls + '-last-century-cell', isLast), _defineProperty(_classNameMap, prefixCls + '-next-century-cell', isNext), _classNameMap);
          var content = dStartDecade + '-' + dEndDecade;
          var clickHandler = void 0;
          if (isLast) {
            clickHandler = _this2.previousCentury;
          } else if (isNext) {
            clickHandler = _this2.nextCentury;
          } else {
            clickHandler = chooseDecade.bind(_this2, dStartDecade);
          }
          return React.createElement(
            'td',
            {
              key: dStartDecade,
              onClick: clickHandler,
              role: 'gridcell',
              className: classnames(classNameMap)
github godaner / vm-engine / vm-backend / src / main / resources / static / node_modules / antd / es / layout / layout.js View on Github external
value: function render() {
            var _a = this.props,
                prefixCls = _a.prefixCls,
                className = _a.className,
                children = _a.children,
                others = __rest(_a, ["prefixCls", "className", "children"]);
            var divCls = classNames(className, prefixCls, _defineProperty({}, prefixCls + '-has-sider', this.state.siders.length > 0));
            return React.createElement(
                'div',
                _extends({ className: divCls }, others),
                children
            );
        }
    }]);
github godaner / vm-engine / vm-backend / src / main / resources / static / node_modules / antd / es / spin / index.js View on Github external
React.createElement('i', null)
                ),
                tip ? React.createElement(
                    'div',
                    { className: prefixCls + '-text' },
                    tip
                ) : null
            );
            if (this.isNestedPattern()) {
                var _classNames2;

                var animateClassName = prefixCls + '-nested-loading';
                if (wrapperClassName) {
                    animateClassName += ' ' + wrapperClassName;
                }
                var containerClassName = classNames((_classNames2 = {}, _defineProperty(_classNames2, prefixCls + '-container', true), _defineProperty(_classNames2, prefixCls + '-blur', spinning), _classNames2));
                return React.createElement(
                    Animate,
                    _extends({}, divProps, { component: 'div', className: animateClassName, style: null, transitionName: 'fade' }),
                    spinning && React.createElement(
                        'div',
                        { key: 'loading' },
                        spinElement
                    ),
                    React.createElement(
                        'div',
                        { className: containerClassName, key: 'container' },
                        this.props.children
                    )
                );
            }
            return spinElement;
github godaner / vm-engine / vm-backend / src / main / resources / static / node_modules / antd / es / grid / col.js View on Github external
others = __rest(props, ["span", "order", "offset", "push", "pull", "className", "children", "prefixCls"]);

            var sizeClassObj = {};
            ['xs', 'sm', 'md', 'lg', 'xl'].forEach(function (size) {
                var _extends2;

                var sizeProps = {};
                if (typeof props[size] === 'number') {
                    sizeProps.span = props[size];
                } else if (_typeof(props[size]) === 'object') {
                    sizeProps = props[size] || {};
                }
                delete others[size];
                sizeClassObj = _extends({}, sizeClassObj, (_extends2 = {}, _defineProperty(_extends2, prefixCls + '-' + size + '-' + sizeProps.span, sizeProps.span !== undefined), _defineProperty(_extends2, prefixCls + '-' + size + '-order-' + sizeProps.order, sizeProps.order || sizeProps.order === 0), _defineProperty(_extends2, prefixCls + '-' + size + '-offset-' + sizeProps.offset, sizeProps.offset || sizeProps.offset === 0), _defineProperty(_extends2, prefixCls + '-' + size + '-push-' + sizeProps.push, sizeProps.push || sizeProps.push === 0), _defineProperty(_extends2, prefixCls + '-' + size + '-pull-' + sizeProps.pull, sizeProps.pull || sizeProps.pull === 0), _extends2));
            });
            var classes = classNames((_classNames = {}, _defineProperty(_classNames, prefixCls + '-' + span, span !== undefined), _defineProperty(_classNames, prefixCls + '-order-' + order, order), _defineProperty(_classNames, prefixCls + '-offset-' + offset, offset), _defineProperty(_classNames, prefixCls + '-push-' + push, push), _defineProperty(_classNames, prefixCls + '-pull-' + pull, pull), _classNames), className, sizeClassObj);
            return React.createElement(
                'div',
                _extends({}, others, { className: classes }),
                children
            );
        }
    }]);
github godaner / vm-engine / vm-backend / src / main / resources / static / node_modules / rc-checkbox / es / Checkbox.js View on Github external
tabIndex = _props.tabIndex,
          onClick = _props.onClick,
          onFocus = _props.onFocus,
          onBlur = _props.onBlur,
          others = _objectWithoutProperties(_props, ['prefixCls', 'className', 'style', 'name', 'type', 'disabled', 'readOnly', 'tabIndex', 'onClick', 'onFocus', 'onBlur']);

      var globalProps = Object.keys(others).reduce(function (prev, key) {
        if (key.substr(0, 5) === 'aria-' || key.substr(0, 5) === 'data-' || key === 'role') {
          prev[key] = others[key];
        }
        return prev;
      }, {});

      var checked = this.state.checked;

      var classString = classNames(prefixCls, className, (_classNames = {}, _defineProperty(_classNames, prefixCls + '-checked', checked), _defineProperty(_classNames, prefixCls + '-disabled', disabled), _classNames));

      return React.createElement(
        'span',
        { className: classString, style: style },
        React.createElement('input', _extends({
          name: name,
          type: type,
          readOnly: readOnly,
          disabled: disabled,
          tabIndex: tabIndex,
          className: prefixCls + '-input',
          checked: !!checked,
          onClick: onClick,
          onFocus: onFocus,
          onBlur: onBlur,
          onChange: this.handleChange
github godaner / vm-engine / vm-backend / src / main / resources / static / node_modules / rc-calendar / es / date / DateTBody.js View on Github external
onMouseEnter: disabled ? undefined : props.onDayHover && props.onDayHover.bind(null, current) || undefined,
            role: 'gridcell',
            title: getTitleString(current), className: cls
          },
          dateHtml
        ));

        passed++;
      }

      tableHtml.push(React.createElement(
        'tr',
        {
          key: iIndex,
          role: 'row',
          className: cx((_cx = {}, _defineProperty(_cx, prefixCls + '-current-week', isCurrentWeek), _defineProperty(_cx, prefixCls + '-active-week', isActiveWeek), _cx))
        },
        weekNumberCell,
        dateCells
      ));
    }
    return React.createElement(
      'tbody',
      { className: prefixCls + '-tbody' },
      tableHtml
    );
  }
});
github godaner / vm-engine / vm-backend / src / main / resources / static / node_modules / rc-calendar / es / year / YearPanel.js View on Github external
var tds = row.map(function (yearData) {
          var _classNameMap;

          var classNameMap = (_classNameMap = {}, _defineProperty(_classNameMap, prefixCls + '-cell', 1), _defineProperty(_classNameMap, prefixCls + '-selected-cell', yearData.year === currentYear), _defineProperty(_classNameMap, prefixCls + '-last-decade-cell', yearData.year < startYear), _defineProperty(_classNameMap, prefixCls + '-next-decade-cell', yearData.year > endYear), _classNameMap);
          var clickHandler = void 0;
          if (yearData.year < startYear) {
            clickHandler = _this2.previousDecade;
          } else if (yearData.year > endYear) {
            clickHandler = _this2.nextDecade;
          } else {
            clickHandler = chooseYear.bind(_this2, yearData.year);
          }
          return React.createElement(
            'td',
            {
              role: 'gridcell',
              title: yearData.title,
              key: yearData.content,
              onClick: clickHandler,
              className: classnames(classNameMap)