UNPKG

choerodon-ui

Version:

An enterprise-class UI design language and React-based implementation

110 lines (88 loc) 3.2 kB
import _extends from "@babel/runtime/helpers/extends"; import _classCallCheck from "@babel/runtime/helpers/classCallCheck"; import _createClass from "@babel/runtime/helpers/createClass"; import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized"; import _inherits from "@babel/runtime/helpers/inherits"; import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn"; import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf"; import _defineProperty from "@babel/runtime/helpers/defineProperty"; function _createSuper(Derived) { function isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } return function () { var Super = _getPrototypeOf(Derived), result; if (isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } /* eslint react/no-did-mount-set-state: 0 */ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import StepGroup from './StepGroup'; var Steps = /*#__PURE__*/ function (_Component) { _inherits(Steps, _Component); var _super = _createSuper(Steps); function Steps() { var _this; _classCallCheck(this, Steps); for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = _super.call.apply(_super, [this].concat(args)); _defineProperty(_assertThisInitialized(_this), "_stepIndex", 0); _defineProperty(_assertThisInitialized(_this), "setNumberChange", function (index) { _this._stepIndex = index; }); _defineProperty(_assertThisInitialized(_this), "getNumberChange", function () { return _this._stepIndex; }); return _this; } _createClass(Steps, [{ key: "render", value: function render() { var stepsProps = this.props; return React.createElement(StepGroup, _extends({}, stepsProps, { setNumberChange: this.setNumberChange, getNumberChange: this.getNumberChange })); } }]); return Steps; }(Component); _defineProperty(Steps, "propTypes", { prefixCls: PropTypes.string, className: PropTypes.string, iconPrefix: PropTypes.string, direction: PropTypes.string, labelPlacement: PropTypes.string, children: PropTypes.any, status: PropTypes.string, size: PropTypes.string, progressDot: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]), style: PropTypes.object, current: PropTypes.number, GroupIndex: PropTypes.number, headerRender: PropTypes.oneOfType([PropTypes.object, PropTypes.func]), headerIcon: PropTypes.string, headerText: PropTypes.string }); export { Steps as default }; //# sourceMappingURL=Steps.js.map