You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
educoder/public/react/build/static/js/58.e7b2c876.chunk.js

33028 lines
1.8 MiB

5 years ago
webpackJsonp([58,49],{
/***/ 1000:
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(312)(true);
// imports
// module
exports.push([module.i, ".ant-row{position:relative;height:auto;margin-right:0;margin-left:0;zoom:1;display:block;-webkit-box-sizing:border-box;box-sizing:border-box}.ant-row:after,.ant-row:before{display:table;content:\"\"}.ant-row:after{clear:both}.ant-row-flex{-ms-flex-flow:row wrap;flex-flow:row wrap}.ant-row-flex,.ant-row-flex:after,.ant-row-flex:before{display:-ms-flexbox;display:flex}.ant-row-flex-start{-ms-flex-pack:start;justify-content:flex-start}.ant-row-flex-center{-ms-flex-pack:center;justify-content:center}.ant-row-flex-end{-ms-flex-pack:end;justify-content:flex-end}.ant-row-flex-space-between{-ms-flex-pack:justify;justify-content:space-between}.ant-row-flex-space-around{-ms-flex-pack:distribute;justify-content:space-around}.ant-row-flex-top{-ms-flex-align:start;align-items:flex-start}.ant-row-flex-middle{-ms-flex-align:center;align-items:center}.ant-row-flex-bottom{-ms-flex-align:end;align-items:flex-end}.ant-col{position:relative;min-height:1px}.ant-col-1,.ant-col-2,.ant-col-3,.ant-col-4,.ant-col-5,.ant-col-6,.ant-col-7,.ant-col-8,.ant-col-9,.ant-col-10,.ant-col-11,.ant-col-12,.ant-col-13,.ant-col-14,.ant-col-15,.ant-col-16,.ant-col-17,.ant-col-18,.ant-col-19,.ant-col-20,.ant-col-21,.ant-col-22,.ant-col-23,.ant-col-24,.ant-col-lg-1,.ant-col-lg-2,.ant-col-lg-3,.ant-col-lg-4,.ant-col-lg-5,.ant-col-lg-6,.ant-col-lg-7,.ant-col-lg-8,.ant-col-lg-9,.ant-col-lg-10,.ant-col-lg-11,.ant-col-lg-12,.ant-col-lg-13,.ant-col-lg-14,.ant-col-lg-15,.ant-col-lg-16,.ant-col-lg-17,.ant-col-lg-18,.ant-col-lg-19,.ant-col-lg-20,.ant-col-lg-21,.ant-col-lg-22,.ant-col-lg-23,.ant-col-lg-24,.ant-col-md-1,.ant-col-md-2,.ant-col-md-3,.ant-col-md-4,.ant-col-md-5,.ant-col-md-6,.ant-col-md-7,.ant-col-md-8,.ant-col-md-9,.ant-col-md-10,.ant-col-md-11,.ant-col-md-12,.ant-col-md-13,.ant-col-md-14,.ant-col-md-15,.ant-col-md-16,.ant-col-md-17,.ant-col-md-18,.ant-col-md-19,.ant-col-md-20,.ant-col-md-21,.ant-col-md-22,.ant-col-md-23,.ant-col-md-24,.ant-col-sm-1,.ant-col-sm-2,.ant-col-sm-3,.ant-col-sm-4,.ant-col-sm-5,.ant-col-sm-6,.ant-col-sm-7,.ant-col-sm-8,.ant-col-sm-9,.ant-col-sm-10,.ant-col-sm-11,.ant-col-sm-12,.ant-col-sm-13,.ant-col-sm-14,.ant-col-sm-15,.ant-col-sm-16,.ant-col-sm-17,.ant-col-sm-18,.ant-col-sm-19,.ant-col-sm-20,.ant-col-sm-21,.ant-col-sm-22,.ant-col-sm-23,.ant-col-sm-24,.ant-col-xs-1,.ant-col-xs-2,.ant-col-xs-3,.ant-col-xs-4,.ant-col-xs-5,.ant-col-xs-6,.ant-col-xs-7,.ant-col-xs-8,.ant-col-xs-9,.ant-col-xs-10,.ant-col-xs-11,.ant-col-xs-12,.ant-col-xs-13,.ant-col-xs-14,.ant-col-xs-15,.ant-col-xs-16,.ant-col-xs-17,.ant-col-xs-18,.ant-col-xs-19,.ant-col-xs-20,.ant-col-xs-21,.ant-col-xs-22,.ant-col-xs-23,.ant-col-xs-24{position:relative;padding-right:0;padding-left:0}.ant-col-1,.ant-col-2,.ant-col-3,.ant-col-4,.ant-col-5,.ant-col-6,.ant-col-7,.ant-col-8,.ant-col-9,.ant-col-10,.ant-col-11,.ant-col-12,.ant-col-13,.ant-col-14,.ant-col-15,.ant-col-16,.ant-col-17,.ant-col-18,.ant-col-19,.ant-col-20,.ant-col-21,.ant-col-22,.ant-col-23,.ant-col-24{-ms-flex:0 0 auto;flex:0 0 auto;float:left}.ant-col-24{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%}.ant-col-push-24{left:100%}.ant-col-pull-24{right:100%}.ant-col-offset-24{margin-left:100%}.ant-col-order-24{-ms-flex-order:24;order:24}.ant-col-23{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:95.83333333%}.ant-col-push-23{left:95.83333333%}.ant-col-pull-23{right:95.83333333%}.ant-col-offset-23{margin-left:95.83333333%}.ant-col-order-23{-ms-flex-order:23;order:23}.ant-col-22{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:91.66666667%}.ant-col-push-22{left:91.66666667%}.ant-col-pull-22{right:91.66666667%}.ant-col-offset-22{margin-left:91.66666667%}.ant-col-order-22{-ms-flex-order:22;order:22}.ant-col-21{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:87.5%}.ant-col-push-21{left:87.5%}.ant-col-pull-21{right:87.5%}.ant-col-offset-21{margin-left:87.5%}.ant-col-order-21{-ms-flex-order:21;order:21}.ant-col-20{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:83.33333333%}.
// exports
/***/ }),
/***/ 1001:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = exports.responsiveMap = exports.responsiveArray = void 0;
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _extends() { _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; }; return _extends.apply(this, arguments); }
// matchMedia polyfill for
// https://github.com/WickyNilliams/enquire.js/issues/82
var enquire; // TODO: Will be removed in antd 4.0 because we will no longer support ie9
if (typeof window !== 'undefined') {
var matchMediaPolyfill = function matchMediaPolyfill(mediaQuery) {
return {
media: mediaQuery,
matches: false,
addListener: function addListener() {},
removeListener: function removeListener() {}
};
}; // ref: https://github.com/ant-design/ant-design/issues/18774
if (!window.matchMedia) window.matchMedia = matchMediaPolyfill; // eslint-disable-next-line global-require
enquire = __webpack_require__(993);
}
var responsiveArray = ['xxl', 'xl', 'lg', 'md', 'sm', 'xs'];
exports.responsiveArray = responsiveArray;
var responsiveMap = {
xs: '(max-width: 575px)',
sm: '(min-width: 576px)',
md: '(min-width: 768px)',
lg: '(min-width: 992px)',
xl: '(min-width: 1200px)',
xxl: '(min-width: 1600px)'
};
exports.responsiveMap = responsiveMap;
var subscribers = [];
var subUid = -1;
var screens = {};
var responsiveObserve = {
dispatch: function dispatch(pointMap) {
screens = pointMap;
if (subscribers.length < 1) {
return false;
}
subscribers.forEach(function (item) {
item.func(screens);
});
return true;
},
subscribe: function subscribe(func) {
if (subscribers.length === 0) {
this.register();
}
var token = (++subUid).toString();
subscribers.push({
token: token,
func: func
});
func(screens);
return token;
},
unsubscribe: function unsubscribe(token) {
subscribers = subscribers.filter(function (item) {
return item.token !== token;
});
if (subscribers.length === 0) {
this.unregister();
}
},
unregister: function unregister() {
Object.keys(responsiveMap).map(function (screen) {
return enquire.unregister(responsiveMap[screen]);
});
},
register: function register() {
var _this = this;
Object.keys(responsiveMap).map(function (screen) {
return enquire.register(responsiveMap[screen], {
match: function match() {
var pointMap = _extends(_extends({}, screens), _defineProperty({}, screen, true));
_this.dispatch(pointMap);
},
unmatch: function unmatch() {
var pointMap = _extends(_extends({}, screens), _defineProperty({}, screen, false));
_this.dispatch(pointMap);
},
// Keep a empty destory to avoid triggering unmatch when unregister
destroy: function destroy() {}
});
});
}
};
var _default = responsiveObserve;
exports["default"] = _default;
//# sourceMappingURL=responsiveObserve.js.map
/***/ }),
/***/ 1002:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(__webpack_require__(0));
var PropTypes = _interopRequireWildcard(__webpack_require__(1));
var _rcMenu = __webpack_require__(172);
var _classnames = _interopRequireDefault(__webpack_require__(3));
var _MenuContext = _interopRequireDefault(__webpack_require__(893));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _extends() { _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; }; return _extends.apply(this, arguments); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var SubMenu =
/*#__PURE__*/
function (_React$Component) {
_inherits(SubMenu, _React$Component);
function SubMenu() {
var _this;
_classCallCheck(this, SubMenu);
_this = _possibleConstructorReturn(this, _getPrototypeOf(SubMenu).apply(this, arguments));
_this.onKeyDown = function (e) {
_this.subMenu.onKeyDown(e);
};
_this.saveSubMenu = function (subMenu) {
_this.subMenu = subMenu;
};
return _this;
}
_createClass(SubMenu, [{
key: "render",
value: function render() {
var _this2 = this;
var _this$props = this.props,
rootPrefixCls = _this$props.rootPrefixCls,
popupClassName = _this$props.popupClassName;
return React.createElement(_MenuContext["default"].Consumer, null, function (_ref) {
var antdMenuTheme = _ref.antdMenuTheme;
return React.createElement(_rcMenu.SubMenu, _extends({}, _this2.props, {
ref: _this2.saveSubMenu,
popupClassName: (0, _classnames["default"])("".concat(rootPrefixCls, "-").concat(antdMenuTheme), popupClassName)
}));
});
}
}]);
return SubMenu;
}(React.Component);
SubMenu.contextTypes = {
antdMenuTheme: PropTypes.string
}; // fix issue:https://github.com/ant-design/ant-design/issues/8666
SubMenu.isSubMenu = 1;
var _default = SubMenu;
exports["default"] = _default;
//# sourceMappingURL=SubMenu.js.map
/***/ }),
/***/ 1003:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(__webpack_require__(0));
var _rcMenu = __webpack_require__(172);
var _MenuContext = _interopRequireDefault(__webpack_require__(893));
var _tooltip = _interopRequireDefault(__webpack_require__(168));
var _Sider = __webpack_require__(908);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _extends() { _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; }; return _extends.apply(this, arguments); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var __rest = void 0 && (void 0).__rest || function (s, e) {
var t = {};
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
var MenuItem =
/*#__PURE__*/
function (_React$Component) {
_inherits(MenuItem, _React$Component);
function MenuItem() {
var _this;
_classCallCheck(this, MenuItem);
_this = _possibleConstructorReturn(this, _getPrototypeOf(MenuItem).apply(this, arguments));
_this.onKeyDown = function (e) {
_this.menuItem.onKeyDown(e);
};
_this.saveMenuItem = function (menuItem) {
_this.menuItem = menuItem;
};
_this.renderItem = function (_ref) {
var siderCollapsed = _ref.siderCollapsed;
var _this$props = _this.props,
level = _this$props.level,
children = _this$props.children,
rootPrefixCls = _this$props.rootPrefixCls;
var _a = _this.props,
title = _a.title,
rest = __rest(_a, ["title"]);
return React.createElement(_MenuContext["default"].Consumer, null, function (_ref2) {
var inlineCollapsed = _ref2.inlineCollapsed;
var tooltipProps = {
title: title || (level === 1 ? children : '')
};
if (!siderCollapsed && !inlineCollapsed) {
tooltipProps.title = null; // Reset `visible` to fix control mode tooltip display not correct
// ref: https://github.com/ant-design/ant-design/issues/16742
tooltipProps.visible = false;
}
return React.createElement(_tooltip["default"], _extends({}, tooltipProps, {
placement: "right",
overlayClassName: "".concat(rootPrefixCls, "-inline-collapsed-tooltip")
}), React.createElement(_rcMenu.Item, _extends({}, rest, {
title: title,
ref: _this.saveMenuItem
})));
});
};
return _this;
}
_createClass(MenuItem, [{
key: "render",
value: function render() {
return React.createElement(_Sider.SiderContext.Consumer, null, this.renderItem);
}
}]);
return MenuItem;
}(React.Component);
exports["default"] = MenuItem;
MenuItem.isMenuItem = true;
//# sourceMappingURL=MenuItem.js.map
/***/ }),
/***/ 1004:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
if (true) {
module.exports = __webpack_require__(1014);
} else {
module.exports = require('./cjs/react-is.development.js');
}
/***/ }),
/***/ 1007:
/***/ (function(module, exports, __webpack_require__) {
module.exports = { "default": __webpack_require__(335), __esModule: true };
/***/ }),
/***/ 1008:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _from = __webpack_require__(1007);
var _from2 = _interopRequireDefault(_from);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.default = function (arr) {
if (Array.isArray(arr)) {
for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {
arr2[i] = arr[i];
}
return arr2;
} else {
return (0, _from2.default)(arr);
}
};
/***/ }),
/***/ 1009:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
var React = __webpack_require__(0);
var factory = __webpack_require__(1010);
if (typeof React === 'undefined') {
throw Error(
'create-react-class could not find the React object. If you are using script tags, ' +
'make sure that React is being loaded before create-react-class.'
);
}
// Hack to grab NoopUpdateQueue from isomorphic React
var ReactNoopUpdateQueue = new React.Component().updater;
module.exports = factory(
React.Component,
React.isValidElement,
ReactNoopUpdateQueue
);
/***/ }),
/***/ 1010:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
var _assign = __webpack_require__(76);
var emptyObject = __webpack_require__(1011);
var _invariant = __webpack_require__(1012);
if (false) {
var warning = require('fbjs/lib/warning');
}
var MIXINS_KEY = 'mixins';
// Helper function to allow the creation of anonymous functions which do not
// have .name set to the name of the variable being assigned to.
function identity(fn) {
return fn;
}
var ReactPropTypeLocationNames;
if (false) {
ReactPropTypeLocationNames = {
prop: 'prop',
context: 'context',
childContext: 'child context'
};
} else {
ReactPropTypeLocationNames = {};
}
function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) {
/**
* Policies that describe methods in `ReactClassInterface`.
*/
var injectedMixins = [];
/**
* Composite components are higher-level components that compose other composite
* or host components.
*
* To create a new type of `ReactClass`, pass a specification of
* your new class to `React.createClass`. The only requirement of your class
* specification is that you implement a `render` method.
*
* var MyComponent = React.createClass({
* render: function() {
* return <div>Hello World</div>;
* }
* });
*
* The class specification supports a specific protocol of methods that have
* special meaning (e.g. `render`). See `ReactClassInterface` for
* more the comprehensive protocol. Any other properties and methods in the
* class specification will be available on the prototype.
*
* @interface ReactClassInterface
* @internal
*/
var ReactClassInterface = {
/**
* An array of Mixin objects to include when defining your component.
*
* @type {array}
* @optional
*/
mixins: 'DEFINE_MANY',
/**
* An object containing properties and methods that should be defined on
* the component's constructor instead of its prototype (static methods).
*
* @type {object}
* @optional
*/
statics: 'DEFINE_MANY',
/**
* Definition of prop types for this component.
*
* @type {object}
* @optional
*/
propTypes: 'DEFINE_MANY',
/**
* Definition of context types for this component.
*
* @type {object}
* @optional
*/
contextTypes: 'DEFINE_MANY',
/**
* Definition of context types this component sets for its children.
*
* @type {object}
* @optional
*/
childContextTypes: 'DEFINE_MANY',
// ==== Definition methods ====
/**
* Invoked when the component is mounted. Values in the mapping will be set on
* `this.props` if that prop is not specified (i.e. using an `in` check).
*
* This method is invoked before `getInitialState` and therefore cannot rely
* on `this.state` or use `this.setState`.
*
* @return {object}
* @optional
*/
getDefaultProps: 'DEFINE_MANY_MERGED',
/**
* Invoked once before the component is mounted. The return value will be used
* as the initial value of `this.state`.
*
* getInitialState: function() {
* return {
* isOn: false,
* fooBaz: new BazFoo()
* }
* }
*
* @return {object}
* @optional
*/
getInitialState: 'DEFINE_MANY_MERGED',
/**
* @return {object}
* @optional
*/
getChildContext: 'DEFINE_MANY_MERGED',
/**
* Uses props from `this.props` and state from `this.state` to render the
* structure of the component.
*
* No guarantees are made about when or how often this method is invoked, so
* it must not have side effects.
*
* render: function() {
* var name = this.props.name;
* return <div>Hello, {name}!</div>;
* }
*
* @return {ReactComponent}
* @required
*/
render: 'DEFINE_ONCE',
// ==== Delegate methods ====
/**
* Invoked when the component is initially created and about to be mounted.
* This may have side effects, but any external subscriptions or data created
* by this method must be cleaned up in `componentWillUnmount`.
*
* @optional
*/
componentWillMount: 'DEFINE_MANY',
/**
* Invoked when the component has been mounted and has a DOM representation.
* However, there is no guarantee that the DOM node is in the document.
*
* Use this as an opportunity to operate on the DOM when the component has
* been mounted (initialized and rendered) for the first time.
*
* @param {DOMElement} rootNode DOM element representing the component.
* @optional
*/
componentDidMount: 'DEFINE_MANY',
/**
* Invoked before the component receives new props.
*
* Use this as an opportunity to react to a prop transition by updating the
* state using `this.setState`. Current props are accessed via `this.props`.
*
* componentWillReceiveProps: function(nextProps, nextContext) {
* this.setState({
* likesIncreasing: nextProps.likeCount > this.props.likeCount
* });
* }
*
* NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop
* transition may cause a state change, but the opposite is not true. If you
* need it, you are probably looking for `componentWillUpdate`.
*
* @param {object} nextProps
* @optional
*/
componentWillReceiveProps: 'DEFINE_MANY',
/**
* Invoked while deciding if the component should be updated as a result of
* receiving new props, state and/or context.
*
* Use this as an opportunity to `return false` when you're certain that the
* transition to the new props/state/context will not require a component
* update.
*
* shouldComponentUpdate: function(nextProps, nextState, nextContext) {
* return !equal(nextProps, this.props) ||
* !equal(nextState, this.state) ||
* !equal(nextContext, this.context);
* }
*
* @param {object} nextProps
* @param {?object} nextState
* @param {?object} nextContext
* @return {boolean} True if the component should update.
* @optional
*/
shouldComponentUpdate: 'DEFINE_ONCE',
/**
* Invoked when the component is about to update due to a transition from
* `this.props`, `this.state` and `this.context` to `nextProps`, `nextState`
* and `nextContext`.
*
* Use this as an opportunity to perform preparation before an update occurs.
*
* NOTE: You **cannot** use `this.setState()` in this method.
*
* @param {object} nextProps
* @param {?object} nextState
* @param {?object} nextContext
* @param {ReactReconcileTransaction} transaction
* @optional
*/
componentWillUpdate: 'DEFINE_MANY',
/**
* Invoked when the component's DOM representation has been updated.
*
* Use this as an opportunity to operate on the DOM when the component has
* been updated.
*
* @param {object} prevProps
* @param {?object} prevState
* @param {?object} prevContext
* @param {DOMElement} rootNode DOM element representing the component.
* @optional
*/
componentDidUpdate: 'DEFINE_MANY',
/**
* Invoked when the component is about to be removed from its parent and have
* its DOM representation destroyed.
*
* Use this as an opportunity to deallocate any external resources.
*
* NOTE: There is no `componentDidUnmount` since your component will have been
* destroyed by that point.
*
* @optional
*/
componentWillUnmount: 'DEFINE_MANY',
/**
* Replacement for (deprecated) `componentWillMount`.
*
* @optional
*/
UNSAFE_componentWillMount: 'DEFINE_MANY',
/**
* Replacement for (deprecated) `componentWillReceiveProps`.
*
* @optional
*/
UNSAFE_componentWillReceiveProps: 'DEFINE_MANY',
/**
* Replacement for (deprecated) `componentWillUpdate`.
*
* @optional
*/
UNSAFE_componentWillUpdate: 'DEFINE_MANY',
// ==== Advanced methods ====
/**
* Updates the component's currently mounted DOM representation.
*
* By default, this implements React's rendering and reconciliation algorithm.
* Sophisticated clients may wish to override this.
*
* @param {ReactReconcileTransaction} transaction
* @internal
* @overridable
*/
updateComponent: 'OVERRIDE_BASE'
};
/**
* Similar to ReactClassInterface but for static methods.
*/
var ReactClassStaticInterface = {
/**
* This method is invoked after a component is instantiated and when it
* receives new props. Return an object to update state in response to
* prop changes. Return null to indicate no change to state.
*
* If an object is returned, its keys will be merged into the existing state.
*
* @return {object || null}
* @optional
*/
getDerivedStateFromProps: 'DEFINE_MANY_MERGED'
};
/**
* Mapping from class specification keys to special processing functions.
*
* Although these are declared like instance properties in the specification
* when defining classes using `React.createClass`, they are actually static
* and are accessible on the constructor instead of the prototype. Despite
* being static, they must be defined outside of the "statics" key under
* which all other static methods are defined.
*/
var RESERVED_SPEC_KEYS = {
displayName: function(Constructor, displayName) {
Constructor.displayName = displayName;
},
mixins: function(Constructor, mixins) {
if (mixins) {
for (var i = 0; i < mixins.length; i++) {
mixSpecIntoComponent(Constructor, mixins[i]);
}
}
},
childContextTypes: function(Constructor, childContextTypes) {
if (false) {
validateTypeDef(Constructor, childContextTypes, 'childContext');
}
Constructor.childContextTypes = _assign(
{},
Constructor.childContextTypes,
childContextTypes
);
},
contextTypes: function(Constructor, contextTypes) {
if (false) {
validateTypeDef(Constructor, contextTypes, 'context');
}
Constructor.contextTypes = _assign(
{},
Constructor.contextTypes,
contextTypes
);
},
/**
* Special case getDefaultProps which should move into statics but requires
* automatic merging.
*/
getDefaultProps: function(Constructor, getDefaultProps) {
if (Constructor.getDefaultProps) {
Constructor.getDefaultProps = createMergedResultFunction(
Constructor.getDefaultProps,
getDefaultProps
);
} else {
Constructor.getDefaultProps = getDefaultProps;
}
},
propTypes: function(Constructor, propTypes) {
if (false) {
validateTypeDef(Constructor, propTypes, 'prop');
}
Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes);
},
statics: function(Constructor, statics) {
mixStaticSpecIntoComponent(Constructor, statics);
},
autobind: function() {}
};
function validateTypeDef(Constructor, typeDef, location) {
for (var propName in typeDef) {
if (typeDef.hasOwnProperty(propName)) {
// use a warning instead of an _invariant so components
// don't show up in prod but only in __DEV__
if (false) {
warning(
typeof typeDef[propName] === 'function',
'%s: %s type `%s` is invalid; it must be a function, usually from ' +
'React.PropTypes.',
Constructor.displayName || 'ReactClass',
ReactPropTypeLocationNames[location],
propName
);
}
}
}
}
function validateMethodOverride(isAlreadyDefined, name) {
var specPolicy = ReactClassInterface.hasOwnProperty(name)
? ReactClassInterface[name]
: null;
// Disallow overriding of base class methods unless explicitly allowed.
if (ReactClassMixin.hasOwnProperty(name)) {
_invariant(
specPolicy === 'OVERRIDE_BASE',
'ReactClassInterface: You are attempting to override ' +
'`%s` from your class specification. Ensure that your method names ' +
'do not overlap with React methods.',
name
);
}
// Disallow defining methods more than once unless explicitly allowed.
if (isAlreadyDefined) {
_invariant(
specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED',
'ReactClassInterface: You are attempting to define ' +
'`%s` on your component more than once. This conflict may be due ' +
'to a mixin.',
name
);
}
}
/**
* Mixin helper which handles policy validation and reserved
* specification keys when building React classes.
*/
function mixSpecIntoComponent(Constructor, spec) {
if (!spec) {
if (false) {
var typeofSpec = typeof spec;
var isMixinValid = typeofSpec === 'object' && spec !== null;
if (process.env.NODE_ENV !== 'production') {
warning(
isMixinValid,
"%s: You're attempting to include a mixin that is either null " +
'or not an object. Check the mixins included by the component, ' +
'as well as any mixins they include themselves. ' +
'Expected object but got %s.',
Constructor.displayName || 'ReactClass',
spec === null ? null : typeofSpec
);
}
}
return;
}
_invariant(
typeof spec !== 'function',
"ReactClass: You're attempting to " +
'use a component class or function as a mixin. Instead, just use a ' +
'regular object.'
);
_invariant(
!isValidElement(spec),
"ReactClass: You're attempting to " +
'use a component as a mixin. Instead, just use a regular object.'
);
var proto = Constructor.prototype;
var autoBindPairs = proto.__reactAutoBindPairs;
// By handling mixins before any other properties, we ensure the same
// chaining order is applied to methods with DEFINE_MANY policy, whether
// mixins are listed before or after these methods in the spec.
if (spec.hasOwnProperty(MIXINS_KEY)) {
RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);
}
for (var name in spec) {
if (!spec.hasOwnProperty(name)) {
continue;
}
if (name === MIXINS_KEY) {
// We have already handled mixins in a special case above.
continue;
}
var property = spec[name];
var isAlreadyDefined = proto.hasOwnProperty(name);
validateMethodOverride(isAlreadyDefined, name);
if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {
RESERVED_SPEC_KEYS[name](Constructor, property);
} else {
// Setup methods on prototype:
// The following member methods should not be automatically bound:
// 1. Expected ReactClass methods (in the "interface").
// 2. Overridden methods (that were mixed in).
var isReactClassMethod = ReactClassInterface.hasOwnProperty(name);
var isFunction = typeof property === 'function';
var shouldAutoBind =
isFunction &&
!isReactClassMethod &&
!isAlreadyDefined &&
spec.autobind !== false;
if (shouldAutoBind) {
autoBindPairs.push(name, property);
proto[name] = property;
} else {
if (isAlreadyDefined) {
var specPolicy = ReactClassInterface[name];
// These cases should already be caught by validateMethodOverride.
_invariant(
isReactClassMethod &&
(specPolicy === 'DEFINE_MANY_MERGED' ||
specPolicy === 'DEFINE_MANY'),
'ReactClass: Unexpected spec policy %s for key %s ' +
'when mixing in component specs.',
specPolicy,
name
);
// For methods which are defined more than once, call the existing
// methods before calling the new property, merging if appropriate.
if (specPolicy === 'DEFINE_MANY_MERGED') {
proto[name] = createMergedResultFunction(proto[name], property);
} else if (specPolicy === 'DEFINE_MANY') {
proto[name] = createChainedFunction(proto[name], property);
}
} else {
proto[name] = property;
if (false) {
// Add verbose displayName to the function, which helps when looking
// at profiling tools.
if (typeof property === 'function' && spec.displayName) {
proto[name].displayName = spec.displayName + '_' + name;
}
}
}
}
}
}
}
function mixStaticSpecIntoComponent(Constructor, statics) {
if (!statics) {
return;
}
for (var name in statics) {
var property = statics[name];
if (!statics.hasOwnProperty(name)) {
continue;
}
var isReserved = name in RESERVED_SPEC_KEYS;
_invariant(
!isReserved,
'ReactClass: You are attempting to define a reserved ' +
'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' +
'as an instance property instead; it will still be accessible on the ' +
'constructor.',
name
);
var isAlreadyDefined = name in Constructor;
if (isAlreadyDefined) {
var specPolicy = ReactClassStaticInterface.hasOwnProperty(name)
? ReactClassStaticInterface[name]
: null;
_invariant(
specPolicy === 'DEFINE_MANY_MERGED',
'ReactClass: You are attempting to define ' +
'`%s` on your component more than once. This conflict may be ' +
'due to a mixin.',
name
);
Constructor[name] = createMergedResultFunction(Constructor[name], property);
return;
}
Constructor[name] = property;
}
}
/**
* Merge two objects, but throw if both contain the same key.
*
* @param {object} one The first object, which is mutated.
* @param {object} two The second object
* @return {object} one after it has been mutated to contain everything in two.
*/
function mergeIntoWithNoDuplicateKeys(one, two) {
_invariant(
one && two && typeof one === 'object' && typeof two === 'object',
'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.'
);
for (var key in two) {
if (two.hasOwnProperty(key)) {
_invariant(
one[key] === undefined,
'mergeIntoWithNoDuplicateKeys(): ' +
'Tried to merge two objects with the same key: `%s`. This conflict ' +
'may be due to a mixin; in particular, this may be caused by two ' +
'getInitialState() or getDefaultProps() methods returning objects ' +
'with clashing keys.',
key
);
one[key] = two[key];
}
}
return one;
}
/**
* Creates a function that invokes two functions and merges their return values.
*
* @param {function} one Function to invoke first.
* @param {function} two Function to invoke second.
* @return {function} Function that invokes the two argument functions.
* @private
*/
function createMergedResultFunction(one, two) {
return function mergedResult() {
var a = one.apply(this, arguments);
var b = two.apply(this, arguments);
if (a == null) {
return b;
} else if (b == null) {
return a;
}
var c = {};
mergeIntoWithNoDuplicateKeys(c, a);
mergeIntoWithNoDuplicateKeys(c, b);
return c;
};
}
/**
* Creates a function that invokes two functions and ignores their return vales.
*
* @param {function} one Function to invoke first.
* @param {function} two Function to invoke second.
* @return {function} Function that invokes the two argument functions.
* @private
*/
function createChainedFunction(one, two) {
return function chainedFunction() {
one.apply(this, arguments);
two.apply(this, arguments);
};
}
/**
* Binds a method to the component.
*
* @param {object} component Component whose method is going to be bound.
* @param {function} method Method to be bound.
* @return {function} The bound method.
*/
function bindAutoBindMethod(component, method) {
var boundMethod = method.bind(component);
if (false) {
boundMethod.__reactBoundContext = component;
boundMethod.__reactBoundMethod = method;
boundMethod.__reactBoundArguments = null;
var componentName = component.constructor.displayName;
var _bind = boundMethod.bind;
boundMethod.bind = function(newThis) {
for (
var _len = arguments.length,
args = Array(_len > 1 ? _len - 1 : 0),
_key = 1;
_key < _len;
_key++
) {
args[_key - 1] = arguments[_key];
}
// User is trying to bind() an autobound method; we effectively will
// ignore the value of "this" that the user is trying to use, so
// let's warn.
if (newThis !== component && newThis !== null) {
if (process.env.NODE_ENV !== 'production') {
warning(
false,
'bind(): React component methods may only be bound to the ' +
'component instance. See %s',
componentName
);
}
} else if (!args.length) {
if (process.env.NODE_ENV !== 'production') {
warning(
false,
'bind(): You are binding a component method to the component. ' +
'React does this for you automatically in a high-performance ' +
'way, so you can safely remove this call. See %s',
componentName
);
}
return boundMethod;
}
var reboundMethod = _bind.apply(boundMethod, arguments);
reboundMethod.__reactBoundContext = component;
reboundMethod.__reactBoundMethod = method;
reboundMethod.__reactBoundArguments = args;
return reboundMethod;
};
}
return boundMethod;
}
/**
* Binds all auto-bound methods in a component.
*
* @param {object} component Component whose method is going to be bound.
*/
function bindAutoBindMethods(component) {
var pairs = component.__reactAutoBindPairs;
for (var i = 0; i < pairs.length; i += 2) {
var autoBindKey = pairs[i];
var method = pairs[i + 1];
component[autoBindKey] = bindAutoBindMethod(component, method);
}
}
var IsMountedPreMixin = {
componentDidMount: function() {
this.__isMounted = true;
}
};
var IsMountedPostMixin = {
componentWillUnmount: function() {
this.__isMounted = false;
}
};
/**
* Add more to the ReactClass base class. These are all legacy features and
* therefore not already part of the modern ReactComponent.
*/
var ReactClassMixin = {
/**
* TODO: This will be deprecated because state should always keep a consistent
* type signature and the only use case for this, is to avoid that.
*/
replaceState: function(newState, callback) {
this.updater.enqueueReplaceState(this, newState, callback);
},
/**
* Checks whether or not this composite component is mounted.
* @return {boolean} True if mounted, false otherwise.
* @protected
* @final
*/
isMounted: function() {
if (false) {
warning(
this.__didWarnIsMounted,
'%s: isMounted is deprecated. Instead, make sure to clean up ' +
'subscriptions and pending requests in componentWillUnmount to ' +
'prevent memory leaks.',
(this.constructor && this.constructor.displayName) ||
this.name ||
'Component'
);
this.__didWarnIsMounted = true;
}
return !!this.__isMounted;
}
};
var ReactClassComponent = function() {};
_assign(
ReactClassComponent.prototype,
ReactComponent.prototype,
ReactClassMixin
);
/**
* Creates a composite component class given a class specification.
* See https://facebook.github.io/react/docs/top-level-api.html#react.createclass
*
* @param {object} spec Class specification (which must define `render`).
* @return {function} Component constructor function.
* @public
*/
function createClass(spec) {
// To keep our warnings more understandable, we'll use a little hack here to
// ensure that Constructor.name !== 'Constructor'. This makes sure we don't
// unnecessarily identify a class without displayName as 'Constructor'.
var Constructor = identity(function(props, context, updater) {
// This constructor gets overridden by mocks. The argument is used
// by mocks to assert on what gets mounted.
if (false) {
warning(
this instanceof Constructor,
'Something is calling a React component directly. Use a factory or ' +
'JSX instead. See: https://fb.me/react-legacyfactory'
);
}
// Wire up auto-binding
if (this.__reactAutoBindPairs.length) {
bindAutoBindMethods(this);
}
this.props = props;
this.context = context;
this.refs = emptyObject;
this.updater = updater || ReactNoopUpdateQueue;
this.state = null;
// ReactClasses doesn't have constructors. Instead, they use the
// getInitialState and componentWillMount methods for initialization.
var initialState = this.getInitialState ? this.getInitialState() : null;
if (false) {
// We allow auto-mocks to proceed as if they're returning null.
if (
initialState === undefined &&
this.getInitialState._isMockFunction
) {
// This is probably bad practice. Consider warning here and
// deprecating this convenience.
initialState = null;
}
}
_invariant(
typeof initialState === 'object' && !Array.isArray(initialState),
'%s.getInitialState(): must return an object or null',
Constructor.displayName || 'ReactCompositeComponent'
);
this.state = initialState;
});
Constructor.prototype = new ReactClassComponent();
Constructor.prototype.constructor = Constructor;
Constructor.prototype.__reactAutoBindPairs = [];
injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor));
mixSpecIntoComponent(Constructor, IsMountedPreMixin);
mixSpecIntoComponent(Constructor, spec);
mixSpecIntoComponent(Constructor, IsMountedPostMixin);
// Initialize the defaultProps property after all mixins have been merged.
if (Constructor.getDefaultProps) {
Constructor.defaultProps = Constructor.getDefaultProps();
}
if (false) {
// This is a tag to indicate that the use of these method names is ok,
// since it's used with createClass. If it's not, then it's likely a
// mistake so we'll warn you to use the static property, property
// initializer or constructor respectively.
if (Constructor.getDefaultProps) {
Constructor.getDefaultProps.isReactClassApproved = {};
}
if (Constructor.prototype.getInitialState) {
Constructor.prototype.getInitialState.isReactClassApproved = {};
}
}
_invariant(
Constructor.prototype.render,
'createClass(...): Class specification must implement a `render` method.'
);
if (false) {
warning(
!Constructor.prototype.componentShouldUpdate,
'%s has a method called ' +
'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' +
'The name is phrased as a question because the function is ' +
'expected to return a value.',
spec.displayName || 'A component'
);
warning(
!Constructor.prototype.componentWillRecieveProps,
'%s has a method called ' +
'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?',
spec.displayName || 'A component'
);
warning(
!Constructor.prototype.UNSAFE_componentWillRecieveProps,
'%s has a method called UNSAFE_componentWillRecieveProps(). ' +
'Did you mean UNSAFE_componentWillReceiveProps()?',
spec.displayName || 'A component'
);
}
// Reduce time spent doing lookups by setting these on the prototype.
for (var methodName in ReactClassInterface) {
if (!Constructor.prototype[methodName]) {
Constructor.prototype[methodName] = null;
}
}
return Constructor;
}
return createClass;
}
module.exports = factory;
/***/ }),
/***/ 1011:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
var emptyObject = {};
if (false) {
Object.freeze(emptyObject);
}
module.exports = emptyObject;
/***/ }),
/***/ 1012:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
/**
* Use invariant() to assert state which your program assumes to be true.
*
* Provide sprintf-style format (only %s is supported) and arguments
* to provide information about what broke and what you were
* expecting.
*
* The invariant message will be stripped in production, but the invariant
* will remain to ensure logic does not differ in production.
*/
var validateFormat = function validateFormat(format) {};
if (false) {
validateFormat = function validateFormat(format) {
if (format === undefined) {
throw new Error('invariant requires an error message argument');
}
};
}
function invariant(condition, format, a, b, c, d, e, f) {
validateFormat(format);
if (!condition) {
var error;
if (format === undefined) {
error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
} else {
var args = [a, b, c, d, e, f];
var argIndex = 0;
error = new Error(format.replace(/%s/g, function () {
return args[argIndex++];
}));
error.name = 'Invariant Violation';
}
error.framesToPop = 1; // we don't care about invariant's own frame
throw error;
}
}
module.exports = invariant;
/***/ }),
/***/ 1013:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
* Copyright 2015, Yahoo! Inc.
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
*/
var ReactIs = __webpack_require__(1004);
var REACT_STATICS = {
childContextTypes: true,
contextType: true,
contextTypes: true,
defaultProps: true,
displayName: true,
getDefaultProps: true,
getDerivedStateFromError: true,
getDerivedStateFromProps: true,
mixins: true,
propTypes: true,
type: true
};
var KNOWN_STATICS = {
name: true,
length: true,
prototype: true,
caller: true,
callee: true,
arguments: true,
arity: true
};
var FORWARD_REF_STATICS = {
'$$typeof': true,
render: true,
defaultProps: true,
displayName: true,
propTypes: true
};
var MEMO_STATICS = {
'$$typeof': true,
compare: true,
defaultProps: true,
displayName: true,
propTypes: true,
type: true
};
var TYPE_STATICS = {};
TYPE_STATICS[ReactIs.ForwardRef] = FORWARD_REF_STATICS;
function getStatics(component) {
if (ReactIs.isMemo(component)) {
return MEMO_STATICS;
}
return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;
}
var defineProperty = Object.defineProperty;
var getOwnPropertyNames = Object.getOwnPropertyNames;
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
var getPrototypeOf = Object.getPrototypeOf;
var objectPrototype = Object.prototype;
function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
if (typeof sourceComponent !== 'string') {
// don't hoist over string (html) components
if (objectPrototype) {
var inheritedComponent = getPrototypeOf(sourceComponent);
if (inheritedComponent && inheritedComponent !== objectPrototype) {
hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
}
}
var keys = getOwnPropertyNames(sourceComponent);
if (getOwnPropertySymbols) {
keys = keys.concat(getOwnPropertySymbols(sourceComponent));
}
var targetStatics = getStatics(targetComponent);
var sourceStatics = getStatics(sourceComponent);
for (var i = 0; i < keys.length; ++i) {
var key = keys[i];
if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
try {
// Avoid failures from read-only properties
defineProperty(targetComponent, key, descriptor);
} catch (e) {}
}
}
return targetComponent;
}
return targetComponent;
}
module.exports = hoistNonReactStatics;
/***/ }),
/***/ 1014:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/** @license React v16.8.6
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
Object.defineProperty(exports,"__esModule",{value:!0});
var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?Symbol.for("react.memo"):
60115,r=b?Symbol.for("react.lazy"):60116;function t(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case h:return a;default:return u}}case r:case q:case d:return u}}}function v(a){return t(a)===m}exports.typeOf=t;exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;
exports.Fragment=e;exports.Lazy=r;exports.Memo=q;exports.Portal=d;exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||"object"===typeof a&&null!==a&&(a.$$typeof===r||a.$$typeof===q||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n)};exports.isAsyncMode=function(a){return v(a)||t(a)===l};exports.isConcurrentMode=v;exports.isContextConsumer=function(a){return t(a)===k};
exports.isContextProvider=function(a){return t(a)===h};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return t(a)===n};exports.isFragment=function(a){return t(a)===e};exports.isLazy=function(a){return t(a)===r};exports.isMemo=function(a){return t(a)===q};exports.isPortal=function(a){return t(a)===d};exports.isProfiler=function(a){return t(a)===g};exports.isStrictMode=function(a){return t(a)===f};
exports.isSuspense=function(a){return t(a)===p};
/***/ }),
/***/ 1015:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(__webpack_require__(0));
var _reactLifecyclesCompat = __webpack_require__(7);
var _rcUpload = _interopRequireDefault(__webpack_require__(1155));
var _classnames = _interopRequireDefault(__webpack_require__(3));
var _uniqBy = _interopRequireDefault(__webpack_require__(1162));
var _findIndex = _interopRequireDefault(__webpack_require__(1214));
var _UploadList = _interopRequireDefault(__webpack_require__(1215));
var _utils = __webpack_require__(1030);
var _LocaleReceiver = _interopRequireDefault(__webpack_require__(71));
var _default2 = _interopRequireDefault(__webpack_require__(181));
var _configProvider = __webpack_require__(12);
var _warning = _interopRequireDefault(__webpack_require__(40));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _extends() { _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; }; return _extends.apply(this, arguments); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var Upload =
/*#__PURE__*/
function (_React$Component) {
_inherits(Upload, _React$Component);
function Upload(props) {
var _this;
_classCallCheck(this, Upload);
_this = _possibleConstructorReturn(this, _getPrototypeOf(Upload).call(this, props));
_this.saveUpload = function (node) {
_this.upload = node;
};
_this.onStart = function (file) {
var fileList = _this.state.fileList;
var targetItem = (0, _utils.fileToObject)(file);
targetItem.status = 'uploading';
var nextFileList = fileList.concat();
var fileIndex = (0, _findIndex["default"])(nextFileList, function (_ref) {
var uid = _ref.uid;
return uid === targetItem.uid;
});
if (fileIndex === -1) {
nextFileList.push(targetItem);
} else {
nextFileList[fileIndex] = targetItem;
}
_this.onChange({
file: targetItem,
fileList: nextFileList
}); // fix ie progress
if (!window.File || Object({"NODE_ENV":"production","PUBLIC_URL":"/react/build/."}).TEST_IE) {
_this.autoUpdateProgress(0, targetItem);
}
};
_this.onSuccess = function (response, file, xhr) {
_this.clearProgressTimer();
try {
if (typeof response === 'string') {
response = JSON.parse(response);
}
} catch (e) {
/* do nothing */
}
var fileList = _this.state.fileList;
var targetItem = (0, _utils.getFileItem)(file, fileList); // removed
if (!targetItem) {
return;
}
targetItem.status = 'done';
targetItem.response = response;
targetItem.xhr = xhr;
_this.onChange({
file: _extends({}, targetItem),
fileList: fileList
});
};
_this.onProgress = function (e, file) {
var fileList = _this.state.fileList;
var targetItem = (0, _utils.getFileItem)(file, fileList); // removed
if (!targetItem) {
return;
}
targetItem.percent = e.percent;
_this.onChange({
event: e,
file: _extends({}, targetItem),
fileList: fileList
});
};
_this.onError = function (error, response, file) {
_this.clearProgressTimer();
var fileList = _this.state.fileList;
var targetItem = (0, _utils.getFileItem)(file, fileList); // removed
if (!targetItem) {
return;
}
targetItem.error = error;
targetItem.response = response;
targetItem.status = 'error';
_this.onChange({
file: _extends({}, targetItem),
fileList: fileList
});
};
_this.handleRemove = function (file) {
var onRemove = _this.props.onRemove;
var fileList = _this.state.fileList;
Promise.resolve(typeof onRemove === 'function' ? onRemove(file) : onRemove).then(function (ret) {
// Prevent removing file
if (ret === false) {
return;
}
var removedFileList = (0, _utils.removeFileItem)(file, fileList);
if (removedFileList) {
file.status = 'removed'; // eslint-disable-line
if (_this.upload) {
_this.upload.abort(file);
}
_this.onChange({
file: file,
fileList: removedFileList
});
}
});
};
_this.onChange = function (info) {
if (!('fileList' in _this.props)) {
_this.setState({
fileList: info.fileList
});
}
var onChange = _this.props.onChange;
if (onChange) {
onChange(info);
}
};
_this.onFileDrop = function (e) {
_this.setState({
dragState: e.type
});
};
_this.beforeUpload = function (file, fileList) {
var beforeUpload = _this.props.beforeUpload;
var stateFileList = _this.state.fileList;
if (!beforeUpload) {
return true;
}
var result = beforeUpload(file, fileList);
if (result === false) {
_this.onChange({
file: file,
fileList: (0, _uniqBy["default"])(stateFileList.concat(fileList.map(_utils.fileToObject)), function (item) {
return item.uid;
})
});
return false;
}
if (result && result.then) {
return result;
}
return true;
};
_this.renderUploadList = function (locale) {
var _this$props = _this.props,
showUploadList = _this$props.showUploadList,
listType = _this$props.listType,
onPreview = _this$props.onPreview,
onDownload = _this$props.onDownload,
previewFile = _this$props.previewFile,
disabled = _this$props.disabled,
propLocale = _this$props.locale;
var showRemoveIcon = showUploadList.showRemoveIcon,
showPreviewIcon = showUploadList.showPreviewIcon,
showDownloadIcon = showUploadList.showDownloadIcon;
var fileList = _this.state.fileList;
return React.createElement(_UploadList["default"], {
listType: listType,
items: fileList,
previewFile: previewFile,
onPreview: onPreview,
onDownload: onDownload,
onRemove: _this.handleRemove,
showRemoveIcon: !disabled && showRemoveIcon,
showPreviewIcon: showPreviewIcon,
showDownloadIcon: showDownloadIcon,
locale: _extends(_extends({}, locale), propLocale)
});
};
_this.renderUpload = function (_ref2) {
var _classNames2;
var getPrefixCls = _ref2.getPrefixCls;
var _this$props2 = _this.props,
customizePrefixCls = _this$props2.prefixCls,
className = _this$props2.className,
showUploadList = _this$props2.showUploadList,
listType = _this$props2.listType,
type = _this$props2.type,
disabled = _this$props2.disabled,
children = _this$props2.children,
style = _this$props2.style;
var _this$state = _this.state,
fileList = _this$state.fileList,
dragState = _this$state.dragState;
var prefixCls = getPrefixCls('upload', customizePrefixCls);
var rcUploadProps = _extends(_extends({
onStart: _this.onStart,
onError: _this.onError,
onProgress: _this.onProgress,
onSuccess: _this.onSuccess
}, _this.props), {
prefixCls: prefixCls,
beforeUpload: _this.beforeUpload
});
delete rcUploadProps.className;
delete rcUploadProps.style;
var uploadList = showUploadList ? React.createElement(_LocaleReceiver["default"], {
componentName: "Upload",
defaultLocale: _default2["default"].Upload
}, _this.renderUploadList) : null;
if (type === 'drag') {
var _classNames;
var dragCls = (0, _classnames["default"])(prefixCls, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-drag"), true), _defineProperty(_classNames, "".concat(prefixCls, "-drag-uploading"), fileList.some(function (file) {
return file.status === 'uploading';
})), _defineProperty(_classNames, "".concat(prefixCls, "-drag-hover"), dragState === 'dragover'), _defineProperty(_classNames, "".concat(prefixCls, "-disabled"), disabled), _classNames), className);
return React.createElement("span", null, React.createElement("div", {
className: dragCls,
onDrop: _this.onFileDrop,
onDragOver: _this.onFileDrop,
onDragLeave: _this.onFileDrop,
style: style
}, React.createElement(_rcUpload["default"], _extends({}, rcUploadProps, {
ref: _this.saveUpload,
className: "".concat(prefixCls, "-btn")
}), React.createElement("div", {
className: "".concat(prefixCls, "-drag-container")
}, children))), uploadList);
}
var uploadButtonCls = (0, _classnames["default"])(prefixCls, (_classNames2 = {}, _defineProperty(_classNames2, "".concat(prefixCls, "-select"), true), _defineProperty(_classNames2, "".concat(prefixCls, "-select-").concat(listType), true), _defineProperty(_classNames2, "".concat(prefixCls, "-disabled"), disabled), _classNames2)); // Remove id to avoid open by label when trigger is hidden
// https://github.com/ant-design/ant-design/issues/14298
// https://github.com/ant-design/ant-design/issues/16478
if (!children || disabled) {
delete rcUploadProps.id;
}
var uploadButton = React.createElement("div", {
className: uploadButtonCls,
style: children ? undefined : {
display: 'none'
}
}, React.createElement(_rcUpload["default"], _extends({}, rcUploadProps, {
ref: _this.saveUpload
})));
if (listType === 'picture-card') {
return React.createElement("span", {
className: (0, _classnames["default"])(className, "".concat(prefixCls, "-picture-card-wrapper"))
}, uploadList, uploadButton);
}
return React.createElement("span", {
className: className
}, uploadButton, uploadList);
};
_this.state = {
fileList: props.fileList || props.defaultFileList || [],
dragState: 'drop'
};
(0, _warning["default"])('fileList' in props || !('value' in props), 'Upload', '`value` is not validate prop, do you mean `fileList`?');
return _this;
}
_createClass(Upload, [{
key: "componentWillUnmount",
value: function componentWillUnmount() {
this.clearProgressTimer();
}
}, {
key: "clearProgressTimer",
value: function clearProgressTimer() {
clearInterval(this.progressTimer);
}
}, {
key: "autoUpdateProgress",
value: function autoUpdateProgress(_, file) {
var _this2 = this;
var getPercent = (0, _utils.genPercentAdd)();
var curPercent = 0;
this.clearProgressTimer();
this.progressTimer = setInterval(function () {
curPercent = getPercent(curPercent);
_this2.onProgress({
percent: curPercent * 100
}, file);
}, 200);
}
}, {
key: "render",
value: function render() {
return React.createElement(_configProvider.ConfigConsumer, null, this.renderUpload);
}
}], [{
key: "getDerivedStateFromProps",
value: function getDerivedStateFromProps(nextProps) {
if ('fileList' in nextProps) {
return {
fileList: nextProps.fileList || []
};
}
return null;
}
}]);
return Upload;
}(React.Component);
Upload.defaultProps = {
type: 'select',
multiple: false,
action: '',
data: {},
accept: '',
beforeUpload: _utils.T,
showUploadList: true,
listType: 'text',
className: '',
disabled: false,
supportServerRender: true
};
(0, _reactLifecyclesCompat.polyfill)(Upload);
var _default = Upload;
exports["default"] = _default;
//# sourceMappingURL=Upload.js.map
/***/ }),
/***/ 1016:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = uid;
var now = +new Date();
var index = 0;
function uid() {
return "rc-upload-" + now + "-" + ++index;
}
/***/ }),
/***/ 1017:
/***/ (function(module, exports, __webpack_require__) {
var baseMatches = __webpack_require__(1163),
baseMatchesProperty = __webpack_require__(1200),
identity = __webpack_require__(1203),
isArray = __webpack_require__(877),
property = __webpack_require__(1204);
/**
* The base implementation of `_.iteratee`.
*
* @private
* @param {*} [value=_.identity] The value to convert to an iteratee.
* @returns {Function} Returns the iteratee.
*/
function baseIteratee(value) {
// Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
// See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
if (typeof value == 'function') {
return value;
}
if (value == null) {
return identity;
}
if (typeof value == 'object') {
return isArray(value)
? baseMatchesProperty(value[0], value[1])
: baseMatches(value);
}
return property(value);
}
module.exports = baseIteratee;
/***/ }),
/***/ 1018:
/***/ (function(module, exports, __webpack_require__) {
var ListCache = __webpack_require__(888),
stackClear = __webpack_require__(1165),
stackDelete = __webpack_require__(1166),
stackGet = __webpack_require__(1167),
stackHas = __webpack_require__(1168),
stackSet = __webpack_require__(1169);
/**
* Creates a stack cache object to store key-value pairs.
*
* @private
* @constructor
* @param {Array} [entries] The key-value pairs to cache.
*/
function Stack(entries) {
var data = this.__data__ = new ListCache(entries);
this.size = data.size;
}
// Add methods to `Stack`.
Stack.prototype.clear = stackClear;
Stack.prototype['delete'] = stackDelete;
Stack.prototype.get = stackGet;
Stack.prototype.has = stackHas;
Stack.prototype.set = stackSet;
module.exports = Stack;
/***/ }),
/***/ 1019:
/***/ (function(module, exports, __webpack_require__) {
var baseIsEqualDeep = __webpack_require__(1170),
isObjectLike = __webpack_require__(320);
/**
* The base implementation of `_.isEqual` which supports partial comparisons
* and tracks traversed objects.
*
* @private
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @param {boolean} bitmask The bitmask flags.
* 1 - Unordered comparison
* 2 - Partial comparison
* @param {Function} [customizer] The function to customize comparisons.
* @param {Object} [stack] Tracks traversed `value` and `other` objects.
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
*/
function baseIsEqual(value, other, bitmask, customizer, stack) {
if (value === other) {
return true;
}
if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
return value !== value && other !== other;
}
return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
}
module.exports = baseIsEqual;
/***/ }),
/***/ 1020:
/***/ (function(module, exports, __webpack_require__) {
var SetCache = __webpack_require__(1021),
arraySome = __webpack_require__(1173),
cacheHas = __webpack_require__(1022);
/** Used to compose bitmasks for value comparisons. */
var COMPARE_PARTIAL_FLAG = 1,
COMPARE_UNORDERED_FLAG = 2;
/**
* A specialized version of `baseIsEqualDeep` for arrays with support for
* partial deep comparisons.
*
* @private
* @param {Array} array The array to compare.
* @param {Array} other The other array to compare.
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
* @param {Function} customizer The function to customize comparisons.
* @param {Function} equalFunc The function to determine equivalents of values.
* @param {Object} stack Tracks traversed `array` and `other` objects.
* @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
*/
function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
arrLength = array.length,
othLength = other.length;
if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
return false;
}
// Assume cyclic values are equal.
var stacked = stack.get(array);
if (stacked && stack.get(other)) {
return stacked == other;
}
var index = -1,
result = true,
seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
stack.set(array, other);
stack.set(other, array);
// Ignore non-index properties.
while (++index < arrLength) {
var arrValue = array[index],
othValue = other[index];
if (customizer) {
var compared = isPartial
? customizer(othValue, arrValue, index, other, array, stack)
: customizer(arrValue, othValue, index, array, other, stack);
}
if (compared !== undefined) {
if (compared) {
continue;
}
result = false;
break;
}
// Recursively compare arrays (susceptible to call stack limits).
if (seen) {
if (!arraySome(other, function(othValue, othIndex) {
if (!cacheHas(seen, othIndex) &&
(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
return seen.push(othIndex);
}
})) {
result = false;
break;
}
} else if (!(
arrValue === othValue ||
equalFunc(arrValue, othValue, bitmask, customizer, stack)
)) {
result = false;
break;
}
}
stack['delete'](array);
stack['delete'](other);
return result;
}
module.exports = equalArrays;
/***/ }),
/***/ 1021:
/***/ (function(module, exports, __webpack_require__) {
var MapCache = __webpack_require__(898),
setCacheAdd = __webpack_require__(1171),
setCacheHas = __webpack_require__(1172);
/**
*
* Creates an array cache object to store unique values.
*
* @private
* @constructor
* @param {Array} [values] The values to cache.
*/
function SetCache(values) {
var index = -1,
length = values == null ? 0 : values.length;
this.__data__ = new MapCache;
while (++index < length) {
this.add(values[index]);
}
}
// Add methods to `SetCache`.
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
SetCache.prototype.has = setCacheHas;
module.exports = SetCache;
/***/ }),
/***/ 1022:
/***/ (function(module, exports) {
/**
* Checks if a `cache` value for `key` exists.
*
* @private
* @param {Object} cache The cache to query.
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function cacheHas(cache, key) {
return cache.has(key);
}
module.exports = cacheHas;
/***/ }),
/***/ 1023:
/***/ (function(module, exports, __webpack_require__) {
var arrayLikeKeys = __webpack_require__(1184),
baseKeys = __webpack_require__(1190),
isArrayLike = __webpack_require__(1194);
/**
* Creates an array of the own enumerable property names of `object`.
*
* **Note:** Non-object values are coerced to objects. See the
* [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
* for more details.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Object
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.keys(new Foo);
* // => ['a', 'b'] (iteration order is not guaranteed)
*
* _.keys('hi');
* // => ['0', '1']
*/
function keys(object) {
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
}
module.exports = keys;
/***/ }),
/***/ 1024:
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(167),
stubFalse = __webpack_require__(1186);
/** Detect free variable `exports`. */
var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
/** Detect free variable `module`. */
var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
/** Detect the popular CommonJS extension `module.exports`. */
var moduleExports = freeModule && freeModule.exports === freeExports;
/** Built-in value references. */
var Buffer = moduleExports ? root.Buffer : undefined;
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
/**
* Checks if `value` is a buffer.
*
* @static
* @memberOf _
* @since 4.3.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
* @example
*
* _.isBuffer(new Buffer(2));
* // => true
*
* _.isBuffer(new Uint8Array(2));
* // => false
*/
var isBuffer = nativeIsBuffer || stubFalse;
module.exports = isBuffer;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(321)(module)))
/***/ }),
/***/ 1025:
/***/ (function(module, exports, __webpack_require__) {
var baseIsTypedArray = __webpack_require__(1187),
baseUnary = __webpack_require__(1188),
nodeUtil = __webpack_require__(1189);
/* Node.js helper references. */
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
/**
* Checks if `value` is classified as a typed array.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
* @example
*
* _.isTypedArray(new Uint8Array);
* // => true
*
* _.isTypedArray([]);
* // => false
*/
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
module.exports = isTypedArray;
/***/ }),
/***/ 1026:
/***/ (function(module, exports, __webpack_require__) {
var getNative = __webpack_require__(878),
root = __webpack_require__(167);
/* Built-in method references that are verified to be native. */
var Set = getNative(root, 'Set');
module.exports = Set;
/***/ }),
/***/ 1027:
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(171);
/**
* Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` if suitable for strict
* equality comparisons, else `false`.
*/
function isStrictComparable(value) {
return value === value && !isObject(value);
}
module.exports = isStrictComparable;
/***/ }),
/***/ 1028:
/***/ (function(module, exports) {
/**
* A specialized version of `matchesProperty` for source values suitable
* for strict equality comparisons, i.e. `===`.
*
* @private
* @param {string} key The key of the property to get.
* @param {*} srcValue The value to match.
* @returns {Function} Returns the new spec function.
*/
function matchesStrictComparable(key, srcValue) {
return function(object) {
if (object == null) {
return false;
}
return object[key] === srcValue &&
(srcValue !== undefined || (key in Object(object)));
};
}
module.exports = matchesStrictComparable;
/***/ }),
/***/ 1029:
/***/ (function(module, exports) {
/**
* The base implementation of `_.findIndex` and `_.findLastIndex` without
* support for iteratee shorthands.
*
* @private
* @param {Array} array The array to inspect.
* @param {Function} predicate The function invoked per iteration.
* @param {number} fromIndex The index to search from.
* @param {boolean} [fromRight] Specify iterating from right to left.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function baseFindIndex(array, predicate, fromIndex, fromRight) {
var length = array.length,
index = fromIndex + (fromRight ? 1 : -1);
while ((fromRight ? index-- : ++index < length)) {
if (predicate(array[index], index, array)) {
return index;
}
}
return -1;
}
module.exports = baseFindIndex;
/***/ }),
/***/ 1030:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.T = T;
exports.fileToObject = fileToObject;
exports.genPercentAdd = genPercentAdd;
exports.getFileItem = getFileItem;
exports.removeFileItem = removeFileItem;
exports.previewImage = previewImage;
exports.isImageUrl = void 0;
function _extends() { _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; }; return _extends.apply(this, arguments); }
function T() {
return true;
} // Fix IE file.status problem
// via coping a new Object
function fileToObject(file) {
return _extends(_extends({}, file), {
lastModified: file.lastModified,
lastModifiedDate: file.lastModifiedDate,
name: file.name,
size: file.size,
type: file.type,
uid: file.uid,
percent: 0,
originFileObj: file
});
}
/**
* 生成Progress percent: 0.1 -> 0.98
* - for ie
*/
function genPercentAdd() {
var k = 0.1;
var i = 0.01;
var end = 0.98;
return function (s) {
var start = s;
if (start >= end) {
return start;
}
start += k;
k -= i;
if (k < 0.001) {
k = 0.001;
}
return start;
};
}
function getFileItem(file, fileList) {
var matchKey = file.uid !== undefined ? 'uid' : 'name';
return fileList.filter(function (item) {
return item[matchKey] === file[matchKey];
})[0];
}
function removeFileItem(file, fileList) {
var matchKey = file.uid !== undefined ? 'uid' : 'name';
var removed = fileList.filter(function (item) {
return item[matchKey] !== file[matchKey];
});
if (removed.length === fileList.length) {
return null;
}
return removed;
} // ==================== Default Image Preview ====================
var extname = function extname() {
var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
var temp = url.split('/');
var filename = temp[temp.length - 1];
var filenameWithoutSuffix = filename.split(/#|\?/)[0];
return (/\.[^./\\]*$/.exec(filenameWithoutSuffix) || [''])[0];
};
var isImageFileType = function isImageFileType(type) {
return !!type && type.indexOf('image/') === 0;
};
var isImageUrl = function isImageUrl(file) {
if (isImageFileType(file.type)) {
return true;
}
var url = file.thumbUrl || file.url;
var extension = extname(url);
if (/^data:image\//.test(url) || /(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico)$/i.test(extension)) {
return true;
}
if (/^data:/.test(url)) {
// other file types of base64
return false;
}
if (extension) {
// other file types which have extension
return false;
}
return true;
};
exports.isImageUrl = isImageUrl;
var MEASURE_SIZE = 200;
function previewImage(file) {
return new Promise(function (resolve) {
if (!isImageFileType(file.type)) {
resolve('');
return;
}
var canvas = document.createElement('canvas');
canvas.width = MEASURE_SIZE;
canvas.height = MEASURE_SIZE;
canvas.style.cssText = "position: fixed; left: 0; top: 0; width: ".concat(MEASURE_SIZE, "px; height: ").concat(MEASURE_SIZE, "px; z-index: 9999; display: none;");
document.body.appendChild(canvas);
var ctx = canvas.getContext('2d');
var img = new Image();
img.onload = function () {
var width = img.width,
height = img.height;
var drawWidth = MEASURE_SIZE;
var drawHeight = MEASURE_SIZE;
var offsetX = 0;
var offsetY = 0;
if (width < height) {
drawHeight = height * (MEASURE_SIZE / width);
offsetY = -(drawHeight - drawWidth) / 2;
} else {
drawWidth = width * (MEASURE_SIZE / height);
offsetX = -(drawWidth - drawHeight) / 2;
}
ctx.drawImage(img, offsetX, offsetY, drawWidth, drawHeight);
var dataURL = canvas.toDataURL();
document.body.removeChild(canvas);
resolve(dataURL);
};
img.src = window.URL.createObjectURL(file);
});
}
//# sourceMappingURL=utils.js.map
/***/ }),
/***/ 1032:
/***/ (function(module, exports, __webpack_require__) {
// style-loader: Adds some css to the DOM by adding a <style> tag
// load the styles
var content = __webpack_require__(1033);
if(typeof content === 'string') content = [[module.i, content, '']];
// Prepare cssTransformation
var transform;
var options = {"hmr":false}
options.transform = transform
// add the styles to the DOM
var update = __webpack_require__(313)(content, options);
if(content.locals) module.exports = content.locals;
/***/ }),
/***/ 1033:
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(312)(true);
// imports
// module
exports.push([module.i, ".ant-form{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;color:rgba(0,0,0,.65);font-size:14px;font-variant:tabular-nums;line-height:1.5;list-style:none;-webkit-font-feature-settings:\"tnum\";font-feature-settings:\"tnum\"}.ant-form legend{display:block;width:100%;margin-bottom:20px;padding:0;color:rgba(0,0,0,.45);font-size:16px;line-height:inherit;border:0;border-bottom:1px solid #d9d9d9}.ant-form label{font-size:14px}.ant-form input[type=search]{-webkit-box-sizing:border-box;box-sizing:border-box}.ant-form input[type=checkbox],.ant-form input[type=radio]{line-height:normal}.ant-form input[type=file]{display:block}.ant-form input[type=range]{display:block;width:100%}.ant-form select[multiple],.ant-form select[size]{height:auto}.ant-form input[type=checkbox]:focus,.ant-form input[type=file]:focus,.ant-form input[type=radio]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.ant-form output{display:block;padding-top:15px;color:rgba(0,0,0,.65);font-size:14px;line-height:1.5}.ant-form-item-required:before{display:inline-block;margin-right:4px;color:#f5222d;font-size:14px;font-family:SimSun,sans-serif;line-height:1;content:\"*\"}.ant-form-hide-required-mark .ant-form-item-required:before{display:none}.ant-form-item-label>label{color:rgba(0,0,0,.85)}.ant-form-item-label>label:after{content:\":\";position:relative;top:-.5px;margin:0 8px 0 2px}.ant-form-item-label>label.ant-form-item-no-colon:after{content:\" \"}.ant-form-item{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;color:rgba(0,0,0,.65);font-size:14px;font-variant:tabular-nums;line-height:1.5;list-style:none;-webkit-font-feature-settings:\"tnum\";font-feature-settings:\"tnum\";margin-bottom:24px;vertical-align:top}.ant-form-item label{position:relative}.ant-form-item label>.anticon{font-size:14px;vertical-align:top}.ant-form-item-control{position:relative;line-height:40px;zoom:1}.ant-form-item-control:after,.ant-form-item-control:before{display:table;content:\"\"}.ant-form-item-control:after{clear:both}.ant-form-item-children{position:relative}.ant-form-item-with-help{margin-bottom:5px}.ant-form-item-label{display:inline-block;overflow:hidden;line-height:39.9999px;white-space:nowrap;text-align:right;vertical-align:middle}.ant-form-item-label-left{text-align:left}.ant-form-item .ant-switch{margin:2px 0 4px}.ant-form-explain,.ant-form-extra{clear:both;min-height:22px;margin-top:-2px;color:rgba(0,0,0,.45);font-size:14px;line-height:1.5;-webkit-transition:color .3s cubic-bezier(.215,.61,.355,1);-o-transition:color .3s cubic-bezier(.215,.61,.355,1);transition:color .3s cubic-bezier(.215,.61,.355,1)}.ant-form-explain{margin-bottom:-1px}.ant-form-extra{padding-top:4px}.ant-form-text{display:inline-block;padding-right:8px}.ant-form-split{display:block;text-align:center}form .has-feedback .ant-input{padding-right:30px}form .has-feedback .ant-input-affix-wrapper .ant-input-suffix{padding-right:18px}form .has-feedback .ant-input-affix-wrapper .ant-input{padding-right:49px}form .has-feedback .ant-input-affix-wrapper.ant-input-affix-wrapper-input-with-clear-btn .ant-input{padding-right:68px}form .has-feedback :not(.ant-input-group-addon)>.ant-select .ant-select-arrow,form .has-feedback :not(.ant-input-group-addon)>.ant-select .ant-select-selection__clear,form .has-feedback>.ant-select .ant-select-arrow,form .has-feedback>.ant-select .ant-select-selection__clear{right:28px}form .has-feedback :not(.ant-input-group-addon)>.ant-select .ant-select-selection-selected-value,form .has-feedback>.ant-select .ant-select-selection-selected-value{padding-right:42px}form .has-feedback .ant-cascader-picker-arrow{margin-right:17px}form .has-feedback .ant-calendar-picker-clear,form .has-feedback .ant-calendar-picker-icon,form .has-feedback .ant-cascader-picker-clear,form .has-feedback .ant-input-search:not(.ant-input-search-enter-button) .ant-input-suffix,form .has-feedback .ant-time-picker-clear,form .has-feedback .ant-time-picker-icon{right:28px}form .ant-mentions,form textarea.ant-input{
// exports
/***/ }),
/***/ 1034:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(__webpack_require__(0));
var PropTypes = _interopRequireWildcard(__webpack_require__(1));
var _classnames = _interopRequireDefault(__webpack_require__(3));
var _createDOMForm = _interopRequireDefault(__webpack_require__(1035));
var _createFormField = _interopRequireDefault(__webpack_require__(929));
var _omit = _interopRequireDefault(__webpack_require__(43));
var _configProvider = __webpack_require__(12);
var _type = __webpack_require__(70);
var _warning = _interopRequireDefault(__webpack_require__(40));
var _FormItem = _interopRequireDefault(__webpack_require__(1067));
var _constants = __webpack_require__(930);
var _context = _interopRequireDefault(__webpack_require__(931));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _extends() { _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; }; return _extends.apply(this, arguments); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var FormLayouts = (0, _type.tuple)('horizontal', 'inline', 'vertical');
var Form =
/*#__PURE__*/
function (_React$Component) {
_inherits(Form, _React$Component);
function Form(props) {
var _this;
_classCallCheck(this, Form);
_this = _possibleConstructorReturn(this, _getPrototypeOf(Form).call(this, props));
_this.renderForm = function (_ref) {
var _classNames;
var getPrefixCls = _ref.getPrefixCls;
var _this$props = _this.props,
customizePrefixCls = _this$props.prefixCls,
hideRequiredMark = _this$props.hideRequiredMark,
_this$props$className = _this$props.className,
className = _this$props$className === void 0 ? '' : _this$props$className,
layout = _this$props.layout;
var prefixCls = getPrefixCls('form', customizePrefixCls);
var formClassName = (0, _classnames["default"])(prefixCls, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-horizontal"), layout === 'horizontal'), _defineProperty(_classNames, "".concat(prefixCls, "-vertical"), layout === 'vertical'), _defineProperty(_classNames, "".concat(prefixCls, "-inline"), layout === 'inline'), _defineProperty(_classNames, "".concat(prefixCls, "-hide-required-mark"), hideRequiredMark), _classNames), className);
var formProps = (0, _omit["default"])(_this.props, ['prefixCls', 'className', 'layout', 'form', 'hideRequiredMark', 'wrapperCol', 'labelAlign', 'labelCol', 'colon']);
return React.createElement("form", _extends({}, formProps, {
className: formClassName
}));
};
(0, _warning["default"])(!props.form, 'Form', 'It is unnecessary to pass `form` to `Form` after antd@1.7.0.');
return _this;
}
_createClass(Form, [{
key: "render",
value: function render() {
var _this$props2 = this.props,
wrapperCol = _this$props2.wrapperCol,
labelAlign = _this$props2.labelAlign,
labelCol = _this$props2.labelCol,
layout = _this$props2.layout,
colon = _this$props2.colon;
return React.createElement(_context["default"].Provider, {
value: {
wrapperCol: wrapperCol,
labelAlign: labelAlign,
labelCol: labelCol,
vertical: layout === 'vertical',
colon: colon
}
}, React.createElement(_configProvider.ConfigConsumer, null, this.renderForm));
}
}]);
return Form;
}(React.Component);
exports["default"] = Form;
Form.defaultProps = {
colon: true,
layout: 'horizontal',
hideRequiredMark: false,
onSubmit: function onSubmit(e) {
e.preventDefault();
}
};
Form.propTypes = {
prefixCls: PropTypes.string,
layout: PropTypes.oneOf(FormLayouts),
children: PropTypes.any,
onSubmit: PropTypes.func,
hideRequiredMark: PropTypes.bool,
colon: PropTypes.bool
};
Form.Item = _FormItem["default"];
Form.createFormField = _createFormField["default"];
Form.create = function create() {
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
return (0, _createDOMForm["default"])(_extends(_extends({
fieldNameProp: 'id'
}, options), {
fieldMetaProp: _constants.FIELD_META_PROP,
fieldDataProp: _constants.FIELD_DATA_PROP
}));
};
//# sourceMappingURL=Form.js.map
/***/ }),
/***/ 1035:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends2 = __webpack_require__(18);
var _extends3 = _interopRequireDefault(_extends2);
var _reactDom = __webpack_require__(4);
var _reactDom2 = _interopRequireDefault(_reactDom);
var _domScrollIntoView = __webpack_require__(183);
var _domScrollIntoView2 = _interopRequireDefault(_domScrollIntoView);
var _has = __webpack_require__(1036);
var _has2 = _interopRequireDefault(_has);
var _createBaseForm = __webpack_require__(926);
var _createBaseForm2 = _interopRequireDefault(_createBaseForm);
var _createForm = __webpack_require__(1066);
var _utils = __webpack_require__(896);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function computedStyle(el, prop) {
var getComputedStyle = window.getComputedStyle;
var style =
// If we have getComputedStyle
getComputedStyle ?
// Query it
// TODO: From CSS-Query notes, we might need (node, null) for FF
getComputedStyle(el) :
// Otherwise, we are in IE and use currentStyle
el.currentStyle;
if (style) {
return style[
// Switch to camelCase for CSSOM
// DEV: Grabbed from jQuery
// https://github.com/jquery/jquery/blob/1.9-stable/src/css.js#L191-L194
// https://github.com/jquery/jquery/blob/1.9-stable/src/core.js#L593-L597
prop.replace(/-(\w)/gi, function (word, letter) {
return letter.toUpperCase();
})];
}
return undefined;
}
function getScrollableContainer(n) {
var node = n;
var nodeName = void 0;
/* eslint no-cond-assign:0 */
while ((nodeName = node.nodeName.toLowerCase()) !== 'body') {
var overflowY = computedStyle(node, 'overflowY');
// https://stackoverflow.com/a/36900407/3040605
if (node !== n && (overflowY === 'auto' || overflowY === 'scroll') && node.scrollHeight > node.clientHeight) {
return node;
}
node = node.parentNode;
}
return nodeName === 'body' ? node.ownerDocument : node;
}
var mixin = {
getForm: function getForm() {
return (0, _extends3['default'])({}, _createForm.mixin.getForm.call(this), {
validateFieldsAndScroll: this.validateFieldsAndScroll
});
},
validateFieldsAndScroll: function validateFieldsAndScroll(ns, opt, cb) {
var _this = this;
var _getParams = (0, _utils.getParams)(ns, opt, cb),
names = _getParams.names,
callback = _getParams.callback,
options = _getParams.options;
var newCb = function newCb(error, values) {
if (error) {
var validNames = _this.fieldsStore.getValidFieldsName();
var firstNode = void 0;
var firstTop = void 0;
validNames.forEach(function (name) {
if ((0, _has2['default'])(error, name)) {
var instance = _this.getFieldInstance(name);
if (instance) {
var node = _reactDom2['default'].findDOMNode(instance);
var top = node.getBoundingClientRect().top;
if (node.type !== 'hidden' && (firstTop === undefined || firstTop > top)) {
firstTop = top;
firstNode = node;
}
}
}
});
if (firstNode) {
var c = options.container || getScrollableContainer(firstNode);
(0, _domScrollIntoView2['default'])(firstNode, c, (0, _extends3['default'])({
onlyScrollIfNeeded: true
}, options.scroll));
}
}
if (typeof callback === 'function') {
callback(error, values);
}
};
return this.validateFields(names, options, newCb);
}
};
function createDOMForm(option) {
return (0, _createBaseForm2['default'])((0, _extends3['default'])({}, option), [mixin]);
}
exports['default'] = createDOMForm;
module.exports = exports['default'];
/***/ }),
/***/ 1036:
/***/ (function(module, exports, __webpack_require__) {
var baseHas = __webpack_require__(1037),
hasPath = __webpack_require__(935);
/**
* Checks if `path` is a direct property of `object`.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Object
* @param {Object} object The object to query.
* @param {Array|string} path The path to check.
* @returns {boolean} Returns `true` if `path` exists, else `false`.
* @example
*
* var object = { 'a': { 'b': 2 } };
* var other = _.create({ 'a': _.create({ 'b': 2 }) });
*
* _.has(object, 'a');
* // => true
*
* _.has(object, 'a.b');
* // => true
*
* _.has(object, ['a', 'b']);
* // => true
*
* _.has(other, 'a');
* // => false
*/
function has(object, path) {
return object != null && hasPath(object, path, baseHas);
}
module.exports = has;
/***/ }),
/***/ 1037:
/***/ (function(module, exports) {
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* The base implementation of `_.has` without support for deep paths.
*
* @private
* @param {Object} [object] The object to query.
* @param {Array|string} key The key to check.
* @returns {boolean} Returns `true` if `key` exists, else `false`.
*/
function baseHas(object, key) {
return object != null && hasOwnProperty.call(object, key);
}
module.exports = baseHas;
/***/ }),
/***/ 1038:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(__webpack_require__(0));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var unsafeLifecyclesPolyfill = function unsafeLifecyclesPolyfill(Component) {
var prototype = Component.prototype;
if (!prototype || !prototype.isReactComponent) {
throw new Error('Can only polyfill class components');
} // only handle componentWillReceiveProps
if (typeof prototype.componentWillReceiveProps !== 'function') {
return Component;
} // In React 16.9, React.Profiler was introduced together with UNSAFE_componentWillReceiveProps
// https://reactjs.org/blog/2019/08/08/react-v16.9.0.html#performance-measurements-with-reactprofiler
if (!_react.default.Profiler) {
return Component;
} // Here polyfill get started
prototype.UNSAFE_componentWillReceiveProps = prototype.componentWillReceiveProps;
delete prototype.componentWillReceiveProps;
return Component;
};
var _default = unsafeLifecyclesPolyfill;
exports.default = _default;
/***/ }),
/***/ 1039:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
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; };
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var _util = __webpack_require__(874);
var _validator = __webpack_require__(1040);
var _validator2 = _interopRequireDefault(_validator);
var _messages2 = __webpack_require__(1060);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
/**
* Encapsulates a validation schema.
*
* @param descriptor An object declaring validation rules
* for this schema.
*/
function Schema(descriptor) {
this.rules = null;
this._messages = _messages2.messages;
this.define(descriptor);
}
Schema.prototype = {
messages: function messages(_messages) {
if (_messages) {
this._messages = (0, _util.deepMerge)((0, _messages2.newMessages)(), _messages);
}
return this._messages;
},
define: function define(rules) {
if (!rules) {
throw new Error('Cannot configure a schema with no rules');
}
if ((typeof rules === 'undefined' ? 'undefined' : _typeof(rules)) !== 'object' || Array.isArray(rules)) {
throw new Error('Rules must be an object');
}
this.rules = {};
var z = void 0;
var item = void 0;
for (z in rules) {
if (rules.hasOwnProperty(z)) {
item = rules[z];
this.rules[z] = Array.isArray(item) ? item : [item];
}
}
},
validate: function validate(source_) {
var _this = this;
var o = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var oc = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function () {};
var source = source_;
var options = o;
var callback = oc;
if (typeof options === 'function') {
callback = options;
options = {};
}
if (!this.rules || Object.keys(this.rules).length === 0) {
if (callback) {
callback();
}
return Promise.resolve();
}
function complete(results) {
var i = void 0;
var errors = [];
var fields = {};
function add(e) {
if (Array.isArray(e)) {
var _errors;
errors = (_errors = errors).concat.apply(_errors, e);
} else {
errors.push(e);
}
}
for (i = 0; i < results.length; i++) {
add(results[i]);
}
if (!errors.length) {
errors = null;
fields = null;
} else {
fields = (0, _util.convertFieldsError)(errors);
}
callback(errors, fields);
}
if (options.messages) {
var messages = this.messages();
if (messages === _messages2.messages) {
messages = (0, _messages2.newMessages)();
}
(0, _util.deepMerge)(messages, options.messages);
options.messages = messages;
} else {
options.messages = this.messages();
}
var arr = void 0;
var value = void 0;
var series = {};
var keys = options.keys || Object.keys(this.rules);
keys.forEach(function (z) {
arr = _this.rules[z];
value = source[z];
arr.forEach(function (r) {
var rule = r;
if (typeof rule.transform === 'function') {
if (source === source_) {
source = _extends({}, source);
}
value = source[z] = rule.transform(value);
}
if (typeof rule === 'function') {
rule = {
validator: rule
};
} else {
rule = _extends({}, rule);
}
rule.validator = _this.getValidationMethod(rule);
rule.field = z;
rule.fullField = rule.fullField || z;
rule.type = _this.getType(rule);
if (!rule.validator) {
return;
}
series[z] = series[z] || [];
series[z].push({
rule: rule,
value: value,
source: source,
field: z
});
});
});
var errorFields = {};
return (0, _util.asyncMap)(series, options, function (data, doIt) {
var rule = data.rule;
var deep = (rule.type === 'object' || rule.type === 'array') && (_typeof(rule.fields) === 'object' || _typeof(rule.defaultField) === 'object');
deep = deep && (rule.required || !rule.required && data.value);
rule.field = data.field;
function addFullfield(key, schema) {
return _extends({}, schema, {
fullField: rule.fullField + '.' + key
});
}
function cb() {
var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
var errors = e;
if (!Array.isArray(errors)) {
errors = [errors];
}
if (!options.suppressWarning && errors.length) {
Schema.warning('async-validator:', errors);
}
if (errors.length && rule.message) {
errors = [].concat(rule.message);
}
errors = errors.map((0, _util.complementError)(rule));
if (options.first && errors.length) {
errorFields[rule.field] = 1;
return doIt(errors);
}
if (!deep) {
doIt(errors);
} else {
// if rule is required but the target object
// does not exist fail at the rule level and don't
// go deeper
if (rule.required && !data.value) {
if (rule.message) {
errors = [].concat(rule.message).map((0, _util.complementError)(rule));
} else if (options.error) {
errors = [options.error(rule, (0, _util.format)(options.messages.required, rule.field))];
} else {
errors = [];
}
return doIt(errors);
}
var fieldsSchema = {};
if (rule.defaultField) {
for (var k in data.value) {
if (data.value.hasOwnProperty(k)) {
fieldsSchema[k] = rule.defaultField;
}
}
}
fieldsSchema = _extends({}, fieldsSchema, data.rule.fields);
for (var f in fieldsSchema) {
if (fieldsSchema.hasOwnProperty(f)) {
var fieldSchema = Array.isArray(fieldsSchema[f]) ? fieldsSchema[f] : [fieldsSchema[f]];
fieldsSchema[f] = fieldSchema.map(addFullfield.bind(null, f));
}
}
var schema = new Schema(fieldsSchema);
schema.messages(options.messages);
if (data.rule.options) {
data.rule.options.messages = options.messages;
data.rule.options.error = options.error;
}
schema.validate(data.value, data.rule.options || options, function (errs) {
var finalErrors = [];
if (errors && errors.length) {
finalErrors.push.apply(finalErrors, errors);
}
if (errs && errs.length) {
finalErrors.push.apply(finalErrors, errs);
}
doIt(finalErrors.length ? finalErrors : null);
});
}
}
var res = void 0;
if (rule.asyncValidator) {
res = rule.asyncValidator(rule, data.value, cb, data.source, options);
} else if (rule.validator) {
res = rule.validator(rule, data.value, cb, data.source, options);
if (res === true) {
cb();
} else if (res === false) {
cb(rule.message || rule.field + ' fails');
} else if (res instanceof Array) {
cb(res);
} else if (res instanceof Error) {
cb(res.message);
}
}
if (res && res.then) {
res.then(function () {
return cb();
}, function (e) {
return cb(e);
});
}
}, function (results) {
complete(results);
});
},
getType: function getType(rule) {
if (rule.type === undefined && rule.pattern instanceof RegExp) {
rule.type = 'pattern';
}
if (typeof rule.validator !== 'function' && rule.type && !_validator2['default'].hasOwnProperty(rule.type)) {
throw new Error((0, _util.format)('Unknown rule type %s', rule.type));
}
return rule.type || 'string';
},
getValidationMethod: function getValidationMethod(rule) {
if (typeof rule.validator === 'function') {
return rule.validator;
}
var keys = Object.keys(rule);
var messageIndex = keys.indexOf('message');
if (messageIndex !== -1) {
keys.splice(messageIndex, 1);
}
if (keys.length === 1 && keys[0] === 'required') {
return _validator2['default'].required;
}
return _validator2['default'][this.getType(rule)] || false;
}
};
Schema.register = function register(type, validator) {
if (typeof validator !== 'function') {
throw new Error('Cannot register a validator by type, validator is not a function');
}
_validator2['default'][type] = validator;
};
Schema.warning = _util.warning;
Schema.messages = _messages2.messages;
exports['default'] = Schema;
/***/ }),
/***/ 1040:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _string = __webpack_require__(1041);
var _string2 = _interopRequireDefault(_string);
var _method = __webpack_require__(1047);
var _method2 = _interopRequireDefault(_method);
var _number = __webpack_require__(1048);
var _number2 = _interopRequireDefault(_number);
var _boolean = __webpack_require__(1049);
var _boolean2 = _interopRequireDefault(_boolean);
var _regexp = __webpack_require__(1050);
var _regexp2 = _interopRequireDefault(_regexp);
var _integer = __webpack_require__(1051);
var _integer2 = _interopRequireDefault(_integer);
var _float = __webpack_require__(1052);
var _float2 = _interopRequireDefault(_float);
var _array = __webpack_require__(1053);
var _array2 = _interopRequireDefault(_array);
var _object = __webpack_require__(1054);
var _object2 = _interopRequireDefault(_object);
var _enum = __webpack_require__(1055);
var _enum2 = _interopRequireDefault(_enum);
var _pattern = __webpack_require__(1056);
var _pattern2 = _interopRequireDefault(_pattern);
var _date = __webpack_require__(1057);
var _date2 = _interopRequireDefault(_date);
var _required = __webpack_require__(1058);
var _required2 = _interopRequireDefault(_required);
var _type = __webpack_require__(1059);
var _type2 = _interopRequireDefault(_type);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
exports['default'] = {
string: _string2['default'],
method: _method2['default'],
number: _number2['default'],
boolean: _boolean2['default'],
regexp: _regexp2['default'],
integer: _integer2['default'],
float: _float2['default'],
array: _array2['default'],
object: _object2['default'],
'enum': _enum2['default'],
pattern: _pattern2['default'],
date: _date2['default'],
url: _type2['default'],
hex: _type2['default'],
email: _type2['default'],
required: _required2['default']
};
/***/ }),
/***/ 1041:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _rule = __webpack_require__(875);
var _rule2 = _interopRequireDefault(_rule);
var _util = __webpack_require__(874);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
/**
* Performs validation for string types.
*
* @param rule The validation rule.
* @param value The value of the field on the source object.
* @param callback The callback function.
* @param source The source object being validated.
* @param options The validation options.
* @param options.messages The validation messages.
*/
function string(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if ((0, _util.isEmptyValue)(value, 'string') && !rule.required) {
return callback();
}
_rule2['default'].required(rule, value, source, errors, options, 'string');
if (!(0, _util.isEmptyValue)(value, 'string')) {
_rule2['default'].type(rule, value, source, errors, options);
_rule2['default'].range(rule, value, source, errors, options);
_rule2['default'].pattern(rule, value, source, errors, options);
if (rule.whitespace === true) {
_rule2['default'].whitespace(rule, value, source, errors, options);
}
}
}
callback(errors);
}
exports['default'] = string;
/***/ }),
/***/ 1042:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _util = __webpack_require__(874);
var util = _interopRequireWildcard(_util);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
/**
* Rule for validating whitespace.
*
* @param rule The validation rule.
* @param value The value of the field on the source object.
* @param source The source object being validated.
* @param errors An array of errors that this rule may add
* validation errors to.
* @param options The validation options.
* @param options.messages The validation messages.
*/
function whitespace(rule, value, source, errors, options) {
if (/^\s+$/.test(value) || value === '') {
errors.push(util.format(options.messages.whitespace, rule.fullField));
}
}
exports['default'] = whitespace;
/***/ }),
/***/ 1043:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var _util = __webpack_require__(874);
var util = _interopRequireWildcard(_util);
var _required = __webpack_require__(927);
var _required2 = _interopRequireDefault(_required);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
/* eslint max-len:0 */
var pattern = {
// http://emailregex.com/
email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
url: new RegExp('^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$', 'i'),
hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
};
var types = {
integer: function integer(value) {
return types.number(value) && parseInt(value, 10) === value;
},
float: function float(value) {
return types.number(value) && !types.integer(value);
},
array: function array(value) {
return Array.isArray(value);
},
regexp: function regexp(value) {
if (value instanceof RegExp) {
return true;
}
try {
return !!new RegExp(value);
} catch (e) {
return false;
}
},
date: function date(value) {
return typeof value.getTime === 'function' && typeof value.getMonth === 'function' && typeof value.getYear === 'function';
},
number: function number(value) {
if (isNaN(value)) {
return false;
}
return typeof value === 'number';
},
object: function object(value) {
return (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && !types.array(value);
},
method: function method(value) {
return typeof value === 'function';
},
email: function email(value) {
return typeof value === 'string' && !!value.match(pattern.email) && value.length < 255;
},
url: function url(value) {
return typeof value === 'string' && !!value.match(pattern.url);
},
hex: function hex(value) {
return typeof value === 'string' && !!value.match(pattern.hex);
}
};
/**
* Rule for validating the type of a value.
*
* @param rule The validation rule.
* @param value The value of the field on the source object.
* @param source The source object being validated.
* @param errors An array of errors that this rule may add
* validation errors to.
* @param options The validation options.
* @param options.messages The validation messages.
*/
function type(rule, value, source, errors, options) {
if (rule.required && value === undefined) {
(0, _required2['default'])(rule, value, source, errors, options);
return;
}
var custom = ['integer', 'float', 'array', 'regexp', 'object', 'method', 'email', 'number', 'date', 'url', 'hex'];
var ruleType = rule.type;
if (custom.indexOf(ruleType) > -1) {
if (!types[ruleType](value)) {
errors.push(util.format(options.messages.types[ruleType], rule.fullField, rule.type));
}
// straight typeof check
} else if (ruleType && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) !== rule.type) {
errors.push(util.format(options.messages.types[ruleType], rule.fullField, rule.type));
}
}
exports['default'] = type;
/***/ }),
/***/ 1044:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _util = __webpack_require__(874);
var util = _interopRequireWildcard(_util);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
/**
* Rule for validating minimum and maximum allowed values.
*
* @param rule The validation rule.
* @param value The value of the field on the source object.
* @param source The source object being validated.
* @param errors An array of errors that this rule may add
* validation errors to.
* @param options The validation options.
* @param options.messages The validation messages.
*/
function range(rule, value, source, errors, options) {
var len = typeof rule.len === 'number';
var min = typeof rule.min === 'number';
var max = typeof rule.max === 'number';
// 正则匹配码点范围从U+010000一直到U+10FFFF的文字补充平面Supplementary Plane
var spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
var val = value;
var key = null;
var num = typeof value === 'number';
var str = typeof value === 'string';
var arr = Array.isArray(value);
if (num) {
key = 'number';
} else if (str) {
key = 'string';
} else if (arr) {
key = 'array';
}
// if the value is not of a supported type for range validation
// the validation rule rule should use the
// type property to also test for a particular type
if (!key) {
return false;
}
if (arr) {
val = value.length;
}
if (str) {
// 处理码点大于U+010000的文字length属性不准确的bug如"𠮷𠮷𠮷".lenght !== 3
val = value.replace(spRegexp, '_').length;
}
if (len) {
if (val !== rule.len) {
errors.push(util.format(options.messages[key].len, rule.fullField, rule.len));
}
} else if (min && !max && val < rule.min) {
errors.push(util.format(options.messages[key].min, rule.fullField, rule.min));
} else if (max && !min && val > rule.max) {
errors.push(util.format(options.messages[key].max, rule.fullField, rule.max));
} else if (min && max && (val < rule.min || val > rule.max)) {
errors.push(util.format(options.messages[key].range, rule.fullField, rule.min, rule.max));
}
}
exports['default'] = range;
/***/ }),
/***/ 1045:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _util = __webpack_require__(874);
var util = _interopRequireWildcard(_util);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
var ENUM = 'enum';
/**
* Rule for validating a value exists in an enumerable list.
*
* @param rule The validation rule.
* @param value The value of the field on the source object.
* @param source The source object being validated.
* @param errors An array of errors that this rule may add
* validation errors to.
* @param options The validation options.
* @param options.messages The validation messages.
*/
function enumerable(rule, value, source, errors, options) {
rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : [];
if (rule[ENUM].indexOf(value) === -1) {
errors.push(util.format(options.messages[ENUM], rule.fullField, rule[ENUM].join(', ')));
}
}
exports['default'] = enumerable;
/***/ }),
/***/ 1046:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _util = __webpack_require__(874);
var util = _interopRequireWildcard(_util);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
/**
* Rule for validating a regular expression pattern.
*
* @param rule The validation rule.
* @param value The value of the field on the source object.
* @param source The source object being validated.
* @param errors An array of errors that this rule may add
* validation errors to.
* @param options The validation options.
* @param options.messages The validation messages.
*/
function pattern(rule, value, source, errors, options) {
if (rule.pattern) {
if (rule.pattern instanceof RegExp) {
// if a RegExp instance is passed, reset `lastIndex` in case its `global`
// flag is accidentally set to `true`, which in a validation scenario
// is not necessary and the result might be misleading
rule.pattern.lastIndex = 0;
if (!rule.pattern.test(value)) {
errors.push(util.format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
}
} else if (typeof rule.pattern === 'string') {
var _pattern = new RegExp(rule.pattern);
if (!_pattern.test(value)) {
errors.push(util.format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
}
}
}
}
exports['default'] = pattern;
/***/ }),
/***/ 1047:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _rule = __webpack_require__(875);
var _rule2 = _interopRequireDefault(_rule);
var _util = __webpack_require__(874);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
/**
* Validates a function.
*
* @param rule The validation rule.
* @param value The value of the field on the source object.
* @param callback The callback function.
* @param source The source object being validated.
* @param options The validation options.
* @param options.messages The validation messages.
*/
function method(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if ((0, _util.isEmptyValue)(value) && !rule.required) {
return callback();
}
_rule2['default'].required(rule, value, source, errors, options);
if (value !== undefined) {
_rule2['default'].type(rule, value, source, errors, options);
}
}
callback(errors);
}
exports['default'] = method;
/***/ }),
/***/ 1048:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _rule = __webpack_require__(875);
var _rule2 = _interopRequireDefault(_rule);
var _util = __webpack_require__(874);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
/**
* Validates a number.
*
* @param rule The validation rule.
* @param value The value of the field on the source object.
* @param callback The callback function.
* @param source The source object being validated.
* @param options The validation options.
* @param options.messages The validation messages.
*/
function number(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if (value === '') {
value = undefined;
}
if ((0, _util.isEmptyValue)(value) && !rule.required) {
return callback();
}
_rule2['default'].required(rule, value, source, errors, options);
if (value !== undefined) {
_rule2['default'].type(rule, value, source, errors, options);
_rule2['default'].range(rule, value, source, errors, options);
}
}
callback(errors);
}
exports['default'] = number;
/***/ }),
/***/ 1049:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _util = __webpack_require__(874);
var _rule = __webpack_require__(875);
var _rule2 = _interopRequireDefault(_rule);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
/**
* Validates a boolean.
*
* @param rule The validation rule.
* @param value The value of the field on the source object.
* @param callback The callback function.
* @param source The source object being validated.
* @param options The validation options.
* @param options.messages The validation messages.
*/
function boolean(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if ((0, _util.isEmptyValue)(value) && !rule.required) {
return callback();
}
_rule2['default'].required(rule, value, source, errors, options);
if (value !== undefined) {
_rule2['default'].type(rule, value, source, errors, options);
}
}
callback(errors);
}
exports['default'] = boolean;
/***/ }),
/***/ 1050:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _rule = __webpack_require__(875);
var _rule2 = _interopRequireDefault(_rule);
var _util = __webpack_require__(874);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
/**
* Validates the regular expression type.
*
* @param rule The validation rule.
* @param value The value of the field on the source object.
* @param callback The callback function.
* @param source The source object being validated.
* @param options The validation options.
* @param options.messages The validation messages.
*/
function regexp(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if ((0, _util.isEmptyValue)(value) && !rule.required) {
return callback();
}
_rule2['default'].required(rule, value, source, errors, options);
if (!(0, _util.isEmptyValue)(value)) {
_rule2['default'].type(rule, value, source, errors, options);
}
}
callback(errors);
}
exports['default'] = regexp;
/***/ }),
/***/ 1051:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _rule = __webpack_require__(875);
var _rule2 = _interopRequireDefault(_rule);
var _util = __webpack_require__(874);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
/**
* Validates a number is an integer.
*
* @param rule The validation rule.
* @param value The value of the field on the source object.
* @param callback The callback function.
* @param source The source object being validated.
* @param options The validation options.
* @param options.messages The validation messages.
*/
function integer(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if ((0, _util.isEmptyValue)(value) && !rule.required) {
return callback();
}
_rule2['default'].required(rule, value, source, errors, options);
if (value !== undefined) {
_rule2['default'].type(rule, value, source, errors, options);
_rule2['default'].range(rule, value, source, errors, options);
}
}
callback(errors);
}
exports['default'] = integer;
/***/ }),
/***/ 1052:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _rule = __webpack_require__(875);
var _rule2 = _interopRequireDefault(_rule);
var _util = __webpack_require__(874);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
/**
* Validates a number is a floating point number.
*
* @param rule The validation rule.
* @param value The value of the field on the source object.
* @param callback The callback function.
* @param source The source object being validated.
* @param options The validation options.
* @param options.messages The validation messages.
*/
function floatFn(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if ((0, _util.isEmptyValue)(value) && !rule.required) {
return callback();
}
_rule2['default'].required(rule, value, source, errors, options);
if (value !== undefined) {
_rule2['default'].type(rule, value, source, errors, options);
_rule2['default'].range(rule, value, source, errors, options);
}
}
callback(errors);
}
exports['default'] = floatFn;
/***/ }),
/***/ 1053:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _rule = __webpack_require__(875);
var _rule2 = _interopRequireDefault(_rule);
var _util = __webpack_require__(874);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
/**
* Validates an array.
*
* @param rule The validation rule.
* @param value The value of the field on the source object.
* @param callback The callback function.
* @param source The source object being validated.
* @param options The validation options.
* @param options.messages The validation messages.
*/
function array(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if ((0, _util.isEmptyValue)(value, 'array') && !rule.required) {
return callback();
}
_rule2['default'].required(rule, value, source, errors, options, 'array');
if (!(0, _util.isEmptyValue)(value, 'array')) {
_rule2['default'].type(rule, value, source, errors, options);
_rule2['default'].range(rule, value, source, errors, options);
}
}
callback(errors);
}
exports['default'] = array;
/***/ }),
/***/ 1054:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _rule = __webpack_require__(875);
var _rule2 = _interopRequireDefault(_rule);
var _util = __webpack_require__(874);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
/**
* Validates an object.
*
* @param rule The validation rule.
* @param value The value of the field on the source object.
* @param callback The callback function.
* @param source The source object being validated.
* @param options The validation options.
* @param options.messages The validation messages.
*/
function object(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if ((0, _util.isEmptyValue)(value) && !rule.required) {
return callback();
}
_rule2['default'].required(rule, value, source, errors, options);
if (value !== undefined) {
_rule2['default'].type(rule, value, source, errors, options);
}
}
callback(errors);
}
exports['default'] = object;
/***/ }),
/***/ 1055:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _rule = __webpack_require__(875);
var _rule2 = _interopRequireDefault(_rule);
var _util = __webpack_require__(874);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var ENUM = 'enum';
/**
* Validates an enumerable list.
*
* @param rule The validation rule.
* @param value The value of the field on the source object.
* @param callback The callback function.
* @param source The source object being validated.
* @param options The validation options.
* @param options.messages The validation messages.
*/
function enumerable(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if ((0, _util.isEmptyValue)(value) && !rule.required) {
return callback();
}
_rule2['default'].required(rule, value, source, errors, options);
if (value) {
_rule2['default'][ENUM](rule, value, source, errors, options);
}
}
callback(errors);
}
exports['default'] = enumerable;
/***/ }),
/***/ 1056:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _rule = __webpack_require__(875);
var _rule2 = _interopRequireDefault(_rule);
var _util = __webpack_require__(874);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
/**
* Validates a regular expression pattern.
*
* Performs validation when a rule only contains
* a pattern property but is not declared as a string type.
*
* @param rule The validation rule.
* @param value The value of the field on the source object.
* @param callback The callback function.
* @param source The source object being validated.
* @param options The validation options.
* @param options.messages The validation messages.
*/
function pattern(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if ((0, _util.isEmptyValue)(value, 'string') && !rule.required) {
return callback();
}
_rule2['default'].required(rule, value, source, errors, options);
if (!(0, _util.isEmptyValue)(value, 'string')) {
_rule2['default'].pattern(rule, value, source, errors, options);
}
}
callback(errors);
}
exports['default'] = pattern;
/***/ }),
/***/ 1057:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _rule = __webpack_require__(875);
var _rule2 = _interopRequireDefault(_rule);
var _util = __webpack_require__(874);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function date(rule, value, callback, source, options) {
// console.log('integer rule called %j', rule);
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
// console.log('validate on %s value', value);
if (validate) {
if ((0, _util.isEmptyValue)(value) && !rule.required) {
return callback();
}
_rule2['default'].required(rule, value, source, errors, options);
if (!(0, _util.isEmptyValue)(value)) {
var dateObject = void 0;
if (typeof value === 'number') {
dateObject = new Date(value);
} else {
dateObject = value;
}
_rule2['default'].type(rule, dateObject, source, errors, options);
if (dateObject) {
_rule2['default'].range(rule, dateObject.getTime(), source, errors, options);
}
}
}
callback(errors);
}
exports['default'] = date;
/***/ }),
/***/ 1058:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var _rule = __webpack_require__(875);
var _rule2 = _interopRequireDefault(_rule);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function required(rule, value, callback, source, options) {
var errors = [];
var type = Array.isArray(value) ? 'array' : typeof value === 'undefined' ? 'undefined' : _typeof(value);
_rule2['default'].required(rule, value, source, errors, options, type);
callback(errors);
}
exports['default'] = required;
/***/ }),
/***/ 1059:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _rule = __webpack_require__(875);
var _rule2 = _interopRequireDefault(_rule);
var _util = __webpack_require__(874);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function type(rule, value, callback, source, options) {
var ruleType = rule.type;
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if ((0, _util.isEmptyValue)(value, ruleType) && !rule.required) {
return callback();
}
_rule2['default'].required(rule, value, source, errors, options, ruleType);
if (!(0, _util.isEmptyValue)(value, ruleType)) {
_rule2['default'].type(rule, value, source, errors, options);
}
}
callback(errors);
}
exports['default'] = type;
/***/ }),
/***/ 1060:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.newMessages = newMessages;
function newMessages() {
return {
'default': 'Validation error on field %s',
required: '%s is required',
'enum': '%s must be one of %s',
whitespace: '%s cannot be empty',
date: {
format: '%s date %s is invalid for format %s',
parse: '%s date could not be parsed, %s is invalid ',
invalid: '%s date %s is invalid'
},
types: {
string: '%s is not a %s',
method: '%s is not a %s (function)',
array: '%s is not an %s',
object: '%s is not an %s',
number: '%s is not a %s',
date: '%s is not a %s',
boolean: '%s is not a %s',
integer: '%s is not an %s',
float: '%s is not a %s',
regexp: '%s is not a valid %s',
email: '%s is not a valid %s',
url: '%s is not a valid %s',
hex: '%s is not a valid %s'
},
string: {
len: '%s must be exactly %s characters',
min: '%s must be at least %s characters',
max: '%s cannot be longer than %s characters',
range: '%s must be between %s and %s characters'
},
number: {
len: '%s must equal %s',
min: '%s cannot be less than %s',
max: '%s cannot be greater than %s',
range: '%s must be between %s and %s'
},
array: {
len: '%s must be exactly %s in length',
min: '%s cannot be less than %s in length',
max: '%s cannot be greater than %s in length',
range: '%s must be between %s and %s in length'
},
pattern: {
mismatch: '%s value %s does not match pattern %s'
},
clone: function clone() {
var cloned = JSON.parse(JSON.stringify(this));
cloned.clone = this.clone;
return cloned;
}
};
}
var messages = exports.messages = newMessages();
/***/ }),
/***/ 1061:
/***/ (function(module, exports, __webpack_require__) {
var assignValue = __webpack_require__(1062),
castPath = __webpack_require__(887),
isIndex = __webpack_require__(894),
isObject = __webpack_require__(171),
toKey = __webpack_require__(882);
/**
* The base implementation of `_.set`.
*
* @private
* @param {Object} object The object to modify.
* @param {Array|string} path The path of the property to set.
* @param {*} value The value to set.
* @param {Function} [customizer] The function to customize path creation.
* @returns {Object} Returns `object`.
*/
function baseSet(object, path, value, customizer) {
if (!isObject(object)) {
return object;
}
path = castPath(path, object);
var index = -1,
length = path.length,
lastIndex = length - 1,
nested = object;
while (nested != null && ++index < length) {
var key = toKey(path[index]),
newValue = value;
if (index != lastIndex) {
var objValue = nested[key];
newValue = customizer ? customizer(objValue, key, nested) : undefined;
if (newValue === undefined) {
newValue = isObject(objValue)
? objValue
: (isIndex(path[index + 1]) ? [] : {});
}
}
assignValue(nested, key, newValue);
nested = nested[key];
}
return object;
}
module.exports = baseSet;
/***/ }),
/***/ 1062:
/***/ (function(module, exports, __webpack_require__) {
var baseAssignValue = __webpack_require__(1063),
eq = __webpack_require__(884);
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Assigns `value` to `key` of `object` if the existing value is not equivalent
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* for equality comparisons.
*
* @private
* @param {Object} object The object to modify.
* @param {string} key The key of the property to assign.
* @param {*} value The value to assign.
*/
function assignValue(object, key, value) {
var objValue = object[key];
if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
(value === undefined && !(key in object))) {
baseAssignValue(object, key, value);
}
}
module.exports = assignValue;
/***/ }),
/***/ 1063:
/***/ (function(module, exports, __webpack_require__) {
var defineProperty = __webpack_require__(1064);
/**
* The base implementation of `assignValue` and `assignMergeValue` without
* value checks.
*
* @private
* @param {Object} object The object to modify.
* @param {string} key The key of the property to assign.
* @param {*} value The value to assign.
*/
function baseAssignValue(object, key, value) {
if (key == '__proto__' && defineProperty) {
defineProperty(object, key, {
'configurable': true,
'enumerable': true,
'value': value,
'writable': true
});
} else {
object[key] = value;
}
}
module.exports = baseAssignValue;
/***/ }),
/***/ 1064:
/***/ (function(module, exports, __webpack_require__) {
var getNative = __webpack_require__(878);
var defineProperty = (function() {
try {
var func = getNative(Object, 'defineProperty');
func({}, '', {});
return func;
} catch (e) {}
}());
module.exports = defineProperty;
/***/ }),
/***/ 1065:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _defineProperty2 = __webpack_require__(59);
var _defineProperty3 = _interopRequireDefault(_defineProperty2);
var _extends2 = __webpack_require__(18);
var _extends3 = _interopRequireDefault(_extends2);
var _classCallCheck2 = __webpack_require__(9);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(31);
var _createClass3 = _interopRequireDefault(_createClass2);
exports['default'] = createFieldsStore;
var _set = __webpack_require__(928);
var _set2 = _interopRequireDefault(_set);
var _createFormField = __webpack_require__(929);
var _createFormField2 = _interopRequireDefault(_createFormField);
var _utils = __webpack_require__(896);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function partOf(a, b) {
return b.indexOf(a) === 0 && ['.', '['].indexOf(b[a.length]) !== -1;
}
function internalFlattenFields(fields) {
return (0, _utils.flattenFields)(fields, function (_, node) {
return (0, _createFormField.isFormField)(node);
}, 'You must wrap field data with `createFormField`.');
}
var FieldsStore = function () {
function FieldsStore(fields) {
(0, _classCallCheck3['default'])(this, FieldsStore);
_initialiseProps.call(this);
this.fields = internalFlattenFields(fields);
this.fieldsMeta = {};
}
(0, _createClass3['default'])(FieldsStore, [{
key: 'updateFields',
value: function updateFields(fields) {
this.fields = internalFlattenFields(fields);
}
}, {
key: 'flattenRegisteredFields',
value: function flattenRegisteredFields(fields) {
var validFieldsName = this.getAllFieldsName();
return (0, _utils.flattenFields)(fields, function (path) {
return validFieldsName.indexOf(path) >= 0;
}, 'You cannot set a form field before rendering a field associated with the value.');
}
}, {
key: 'setFields',
value: function setFields(fields) {
var _this = this;
var fieldsMeta = this.fieldsMeta;
var nowFields = (0, _extends3['default'])({}, this.fields, fields);
var nowValues = {};
Object.keys(fieldsMeta).forEach(function (f) {
nowValues[f] = _this.getValueFromFields(f, nowFields);
});
Object.keys(nowValues).forEach(function (f) {
var value = nowValues[f];
var fieldMeta = _this.getFieldMeta(f);
if (fieldMeta && fieldMeta.normalize) {
var nowValue = fieldMeta.normalize(value, _this.getValueFromFields(f, _this.fields), nowValues);
if (nowValue !== value) {
nowFields[f] = (0, _extends3['default'])({}, nowFields[f], {
value: nowValue
});
}
}
});
this.fields = nowFields;
}
}, {
key: 'resetFields',
value: function resetFields(ns) {
var fields = this.fields;
var names = ns ? this.getValidFieldsFullName(ns) : this.getAllFieldsName();
return names.reduce(function (acc, name) {
var field = fields[name];
if (field && 'value' in field) {
acc[name] = {};
}
return acc;
}, {});
}
}, {
key: 'setFieldMeta',
value: function setFieldMeta(name, meta) {
this.fieldsMeta[name] = meta;
}
}, {
key: 'setFieldsAsDirty',
value: function setFieldsAsDirty() {
var _this2 = this;
Object.keys(this.fields).forEach(function (name) {
var field = _this2.fields[name];
var fieldMeta = _this2.fieldsMeta[name];
if (field && fieldMeta && (0, _utils.hasRules)(fieldMeta.validate)) {
_this2.fields[name] = (0, _extends3['default'])({}, field, {
dirty: true
});
}
});
}
}, {
key: 'getFieldMeta',
value: function getFieldMeta(name) {
this.fieldsMeta[name] = this.fieldsMeta[name] || {};
return this.fieldsMeta[name];
}
}, {
key: 'getValueFromFields',
value: function getValueFromFields(name, fields) {
var field = fields[name];
if (field && 'value' in field) {
return field.value;
}
var fieldMeta = this.getFieldMeta(name);
return fieldMeta && fieldMeta.initialValue;
}
}, {
key: 'getValidFieldsName',
value: function getValidFieldsName() {
var _this3 = this;
var fieldsMeta = this.fieldsMeta;
return fieldsMeta ? Object.keys(fieldsMeta).filter(function (name) {
return !_this3.getFieldMeta(name).hidden;
}) : [];
}
}, {
key: 'getAllFieldsName',
value: function getAllFieldsName() {
var fieldsMeta = this.fieldsMeta;
return fieldsMeta ? Object.keys(fieldsMeta) : [];
}
}, {
key: 'getValidFieldsFullName',
value: function getValidFieldsFullName(maybePartialName) {
var maybePartialNames = Array.isArray(maybePartialName) ? maybePartialName : [maybePartialName];
return this.getValidFieldsName().filter(function (fullName) {
return maybePartialNames.some(function (partialName) {
return fullName === partialName || (0, _utils.startsWith)(fullName, partialName) && ['.', '['].indexOf(fullName[partialName.length]) >= 0;
});
});
}
}, {
key: 'getFieldValuePropValue',
value: function getFieldValuePropValue(fieldMeta) {
var name = fieldMeta.name,
getValueProps = fieldMeta.getValueProps,
valuePropName = fieldMeta.valuePropName;
var field = this.getField(name);
var fieldValue = 'value' in field ? field.value : fieldMeta.initialValue;
if (getValueProps) {
return getValueProps(fieldValue);
}
return (0, _defineProperty3['default'])({}, valuePropName, fieldValue);
}
}, {
key: 'getField',
value: function getField(name) {
return (0, _extends3['default'])({}, this.fields[name], {
name: name
});
}
}, {
key: 'getNotCollectedFields',
value: function getNotCollectedFields() {
var _this4 = this;
var fieldsName = this.getValidFieldsName();
return fieldsName.filter(function (name) {
return !_this4.fields[name];
}).map(function (name) {
return {
name: name,
dirty: false,
value: _this4.getFieldMeta(name).initialValue
};
}).reduce(function (acc, field) {
return (0, _set2['default'])(acc, field.name, (0, _createFormField2['default'])(field));
}, {});
}
}, {
key: 'getNestedAllFields',
value: function getNestedAllFields() {
var _this5 = this;
return Object.keys(this.fields).reduce(function (acc, name) {
return (0, _set2['default'])(acc, name, (0, _createFormField2['default'])(_this5.fields[name]));
}, this.getNotCollectedFields());
}
}, {
key: 'getFieldMember',
value: function getFieldMember(name, member) {
return this.getField(name)[member];
}
}, {
key: 'getNestedFields',
value: function getNestedFields(names, getter) {
var fields = names || this.getValidFieldsName();
return fields.reduce(function (acc, f) {
return (0, _set2['default'])(acc, f, getter(f));
}, {});
}
}, {
key: 'getNestedField',
value: function getNestedField(name, getter) {
var fullNames = this.getValidFieldsFullName(name);
if (fullNames.length === 0 || // Not registered
fullNames.length === 1 && fullNames[0] === name // Name already is full name.
) {
return getter(name);
}
var isArrayValue = fullNames[0][name.length] === '[';
var suffixNameStartIndex = isArrayValue ? name.length : name.length + 1;
return fullNames.reduce(function (acc, fullName) {
return (0, _set2['default'])(acc, fullName.slice(suffixNameStartIndex), getter(fullName));
}, isArrayValue ? [] : {});
}
}, {
key: 'isValidNestedFieldName',
// @private
// BG: `a` and `a.b` cannot be use in the same form
value: function isValidNestedFieldName(name) {
var names = this.getAllFieldsName();
return names.every(function (n) {
return !partOf(n, name) && !partOf(name, n);
});
}
}, {
key: 'clearField',
value: function clearField(name) {
delete this.fields[name];
delete this.fieldsMeta[name];
}
}]);
return FieldsStore;
}();
var _initialiseProps = function _initialiseProps() {
var _this6 = this;
this.setFieldsInitialValue = function (initialValues) {
var flattenedInitialValues = _this6.flattenRegisteredFields(initialValues);
var fieldsMeta = _this6.fieldsMeta;
Object.keys(flattenedInitialValues).forEach(function (name) {
if (fieldsMeta[name]) {
_this6.setFieldMeta(name, (0, _extends3['default'])({}, _this6.getFieldMeta(name), {
initialValue: flattenedInitialValues[name]
}));
}
});
};
this.getAllValues = function () {
var fieldsMeta = _this6.fieldsMeta,
fields = _this6.fields;
return Object.keys(fieldsMeta).reduce(function (acc, name) {
return (0, _set2['default'])(acc, name, _this6.getValueFromFields(name, fields));
}, {});
};
this.getFieldsValue = function (names) {
return _this6.getNestedFields(names, _this6.getFieldValue);
};
this.getFieldValue = function (name) {
var fields = _this6.fields;
return _this6.getNestedField(name, function (fullName) {
return _this6.getValueFromFields(fullName, fields);
});
};
this.getFieldsError = function (names) {
return _this6.getNestedFields(names, _this6.getFieldError);
};
this.getFieldError = function (name) {
return _this6.getNestedField(name, function (fullName) {
return (0, _utils.getErrorStrs)(_this6.getFieldMember(fullName, 'errors'));
});
};
this.isFieldValidating = function (name) {
return _this6.getFieldMember(name, 'validating');
};
this.isFieldsValidating = function (ns) {
var names = ns || _this6.getValidFieldsName();
return names.some(function (n) {
return _this6.isFieldValidating(n);
});
};
this.isFieldTouched = function (name) {
return _this6.getFieldMember(name, 'touched');
};
this.isFieldsTouched = function (ns) {
var names = ns || _this6.getValidFieldsName();
return names.some(function (n) {
return _this6.isFieldTouched(n);
});
};
};
function createFieldsStore(fields) {
return new FieldsStore(fields);
}
module.exports = exports['default'];
/***/ }),
/***/ 1066:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.mixin = undefined;
var _createBaseForm = __webpack_require__(926);
var _createBaseForm2 = _interopRequireDefault(_createBaseForm);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var mixin = exports.mixin = {
getForm: function getForm() {
return {
getFieldsValue: this.fieldsStore.getFieldsValue,
getFieldValue: this.fieldsStore.getFieldValue,
getFieldInstance: this.getFieldInstance,
setFieldsValue: this.setFieldsValue,
setFields: this.setFields,
setFieldsInitialValue: this.fieldsStore.setFieldsInitialValue,
getFieldDecorator: this.getFieldDecorator,
getFieldProps: this.getFieldProps,
getFieldsError: this.fieldsStore.getFieldsError,
getFieldError: this.fieldsStore.getFieldError,
isFieldValidating: this.fieldsStore.isFieldValidating,
isFieldsValidating: this.fieldsStore.isFieldsValidating,
isFieldsTouched: this.fieldsStore.isFieldsTouched,
isFieldTouched: this.fieldsStore.isFieldTouched,
isSubmitting: this.isSubmitting,
submit: this.submit,
validateFields: this.validateFields,
resetFields: this.resetFields
};
}
};
function createForm(options) {
return (0, _createBaseForm2['default'])(options, [mixin]);
}
exports['default'] = createForm;
/***/ }),
/***/ 1067:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(__webpack_require__(0));
var ReactDOM = _interopRequireWildcard(__webpack_require__(4));
var PropTypes = _interopRequireWildcard(__webpack_require__(1));
var _classnames = _interopRequireDefault(__webpack_require__(3));
var _rcAnimate = _interopRequireDefault(__webpack_require__(331));
var _omit = _interopRequireDefault(__webpack_require__(43));
var _row = _interopRequireDefault(__webpack_require__(986));
var _col = _interopRequireDefault(__webpack_require__(987));
var _icon = _interopRequireDefault(__webpack_require__(26));
var _configProvider = __webpack_require__(12);
var _warning = _interopRequireDefault(__webpack_require__(40));
var _type = __webpack_require__(70);
var _constants = __webpack_require__(930);
var _context = _interopRequireDefault(__webpack_require__(931));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _extends() { _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; }; return _extends.apply(this, arguments); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }
var __rest = void 0 && (void 0).__rest || function (s, e) {
var t = {};
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
var ValidateStatuses = (0, _type.tuple)('success', 'warning', 'error', 'validating', '');
var FormLabelAligns = (0, _type.tuple)('left', 'right');
function intersperseSpace(list) {
return list.reduce(function (current, item) {
return [].concat(_toConsumableArray(current), [' ', item]);
}, []).slice(1);
}
var FormItem =
/*#__PURE__*/
function (_React$Component) {
_inherits(FormItem, _React$Component);
function FormItem() {
var _this;
_classCallCheck(this, FormItem);
_this = _possibleConstructorReturn(this, _getPrototypeOf(FormItem).apply(this, arguments));
_this.helpShow = false; // Resolve duplicated ids bug between different forms
// https://github.com/ant-design/ant-design/issues/7351
_this.onLabelClick = function () {
var id = _this.props.id || _this.getId();
if (!id) {
return;
}
var formItemNode = ReactDOM.findDOMNode(_assertThisInitialized(_this));
var control = formItemNode.querySelector("[id=\"".concat(id, "\"]"));
if (control && control.focus) {
control.focus();
}
};
_this.onHelpAnimEnd = function (_key, helpShow) {
_this.helpShow = helpShow;
if (!helpShow) {
_this.setState({});
}
};
_this.renderFormItem = function (_ref) {
var _itemClassName;
var getPrefixCls = _ref.getPrefixCls;
var _a = _this.props,
customizePrefixCls = _a.prefixCls,
style = _a.style,
className = _a.className,
restProps = __rest(_a, ["prefixCls", "style", "className"]);
var prefixCls = getPrefixCls('form', customizePrefixCls);
var children = _this.renderChildren(prefixCls);
var itemClassName = (_itemClassName = {}, _defineProperty(_itemClassName, "".concat(prefixCls, "-item"), true), _defineProperty(_itemClassName, "".concat(prefixCls, "-item-with-help"), _this.helpShow), _defineProperty(_itemClassName, "".concat(className), !!className), _itemClassName);
return React.createElement(_row["default"], _extends({
className: (0, _classnames["default"])(itemClassName),
style: style
}, (0, _omit["default"])(restProps, ['id', 'htmlFor', 'label', 'labelAlign', 'labelCol', 'wrapperCol', 'help', 'extra', 'validateStatus', 'hasFeedback', 'required', 'colon']), {
key: "row"
}), children);
};
return _this;
}
_createClass(FormItem, [{
key: "componentDidMount",
value: function componentDidMount() {
var _this$props = this.props,
children = _this$props.children,
help = _this$props.help,
validateStatus = _this$props.validateStatus,
id = _this$props.id;
(0, _warning["default"])(this.getControls(children, true).length <= 1 || help !== undefined || validateStatus !== undefined, 'Form.Item', 'Cannot generate `validateStatus` and `help` automatically, ' + 'while there are more than one `getFieldDecorator` in it.');
(0, _warning["default"])(!id, 'Form.Item', '`id` is deprecated for its label `htmlFor`. Please use `htmlFor` directly.');
}
}, {
key: "getHelpMessage",
value: function getHelpMessage() {
var help = this.props.help;
if (help === undefined && this.getOnlyControl()) {
var _this$getField = this.getField(),
errors = _this$getField.errors;
if (errors) {
return intersperseSpace(errors.map(function (e, index) {
var node = null;
if (React.isValidElement(e)) {
node = e;
} else if (React.isValidElement(e.message)) {
node = e.message;
} // eslint-disable-next-line react/no-array-index-key
return node ? React.cloneElement(node, {
key: index
}) : e.message;
}));
}
return '';
}
return help;
}
}, {
key: "getControls",
value: function getControls(children, recursively) {
var controls = [];
var childrenArray = React.Children.toArray(children);
for (var i = 0; i < childrenArray.length; i++) {
if (!recursively && controls.length > 0) {
break;
}
var child = childrenArray[i];
if (child.type && (child.type === FormItem || child.type.displayName === 'FormItem')) {
continue;
}
if (!child.props) {
continue;
}
if (_constants.FIELD_META_PROP in child.props) {
// And means FIELD_DATA_PROP in child.props, too.
controls.push(child);
} else if (child.props.children) {
controls = controls.concat(this.getControls(child.props.children, recursively));
}
}
return controls;
}
}, {
key: "getOnlyControl",
value: function getOnlyControl() {
var child = this.getControls(this.props.children, false)[0];
return child !== undefined ? child : null;
}
}, {
key: "getChildProp",
value: function getChildProp(prop) {
var child = this.getOnlyControl();
return child && child.props && child.props[prop];
}
}, {
key: "getId",
value: function getId() {
return this.getChildProp('id');
}
}, {
key: "getMeta",
value: function getMeta() {
return this.getChildProp(_constants.FIELD_META_PROP);
}
}, {
key: "getField",
value: function getField() {
return this.getChildProp(_constants.FIELD_DATA_PROP);
}
}, {
key: "getValidateStatus",
value: function getValidateStatus() {
var onlyControl = this.getOnlyControl();
if (!onlyControl) {
return '';
}
var field = this.getField();
if (field.validating) {
return 'validating';
}
if (field.errors) {
return 'error';
}
var fieldValue = 'value' in field ? field.value : this.getMeta().initialValue;
if (fieldValue !== undefined && fieldValue !== null && fieldValue !== '') {
return 'success';
}
return '';
}
}, {
key: "isRequired",
value: function isRequired() {
var required = this.props.required;
if (required !== undefined) {
return required;
}
if (this.getOnlyControl()) {
var meta = this.getMeta() || {};
var validate = meta.validate || [];
return validate.filter(function (item) {
return !!item.rules;
}).some(function (item) {
return item.rules.some(function (rule) {
return rule.required;
});
});
}
return false;
}
}, {
key: "renderHelp",
value: function renderHelp(prefixCls) {
var help = this.getHelpMessage();
var children = help ? React.createElement("div", {
className: "".concat(prefixCls, "-explain"),
key: "help"
}, help) : null;
if (children) {
this.helpShow = !!children;
}
return React.createElement(_rcAnimate["default"], {
transitionName: "show-help",
component: "",
transitionAppear: true,
key: "help",
onEnd: this.onHelpAnimEnd
}, children);
}
}, {
key: "renderExtra",
value: function renderExtra(prefixCls) {
var extra = this.props.extra;
return extra ? React.createElement("div", {
className: "".concat(prefixCls, "-extra")
}, extra) : null;
}
}, {
key: "renderValidateWrapper",
value: function renderValidateWrapper(prefixCls, c1, c2, c3) {
var props = this.props;
var onlyControl = this.getOnlyControl;
var validateStatus = props.validateStatus === undefined && onlyControl ? this.getValidateStatus() : props.validateStatus;
var classes = "".concat(prefixCls, "-item-control");
if (validateStatus) {
classes = (0, _classnames["default"])("".concat(prefixCls, "-item-control"), {
'has-feedback': props.hasFeedback || validateStatus === 'validating',
'has-success': validateStatus === 'success',
'has-warning': validateStatus === 'warning',
'has-error': validateStatus === 'error',
'is-validating': validateStatus === 'validating'
});
}
var iconType = '';
switch (validateStatus) {
case 'success':
iconType = 'check-circle';
break;
case 'warning':
iconType = 'exclamation-circle';
break;
case 'error':
iconType = 'close-circle';
break;
case 'validating':
iconType = 'loading';
break;
default:
iconType = '';
break;
}
var icon = props.hasFeedback && iconType ? React.createElement("span", {
className: "".concat(prefixCls, "-item-children-icon")
}, React.createElement(_icon["default"], {
type: iconType,
theme: iconType === 'loading' ? 'outlined' : 'filled'
})) : null;
return React.createElement("div", {
className: classes
}, React.createElement("span", {
className: "".concat(prefixCls, "-item-children")
}, c1, icon), c2, c3);
}
}, {
key: "renderWrapper",
value: function renderWrapper(prefixCls, children) {
var _this2 = this;
return React.createElement(_context["default"].Consumer, {
key: "wrapper"
}, function (_ref2) {
var contextWrapperCol = _ref2.wrapperCol,
vertical = _ref2.vertical;
var wrapperCol = _this2.props.wrapperCol;
var mergedWrapperCol = ('wrapperCol' in _this2.props ? wrapperCol : contextWrapperCol) || {};
var className = (0, _classnames["default"])("".concat(prefixCls, "-item-control-wrapper"), mergedWrapperCol.className); // No pass FormContext since it's useless
return React.createElement(_context["default"].Provider, {
value: {
vertical: vertical
}
}, React.createElement(_col["default"], _extends({}, mergedWrapperCol, {
className: className
}), children));
});
}
}, {
key: "renderLabel",
value: function renderLabel(prefixCls) {
var _this3 = this;
return React.createElement(_context["default"].Consumer, {
key: "label"
}, function (_ref3) {
var _classNames;
var vertical = _ref3.vertical,
contextLabelAlign = _ref3.labelAlign,
contextLabelCol = _ref3.labelCol,
contextColon = _ref3.colon;
var _this3$props = _this3.props,
label = _this3$props.label,
labelCol = _this3$props.labelCol,
labelAlign = _this3$props.labelAlign,
colon = _this3$props.colon,
id = _this3$props.id,
htmlFor = _this3$props.htmlFor;
var required = _this3.isRequired();
var mergedLabelCol = ('labelCol' in _this3.props ? labelCol : contextLabelCol) || {};
var mergedLabelAlign = 'labelAlign' in _this3.props ? labelAlign : contextLabelAlign;
var labelClsBasic = "".concat(prefixCls, "-item-label");
var labelColClassName = (0, _classnames["default"])(labelClsBasic, mergedLabelAlign === 'left' && "".concat(labelClsBasic, "-left"), mergedLabelCol.className);
var labelChildren = label; // Keep label is original where there should have no colon
var computedColon = colon === true || contextColon !== false && colon !== false;
var haveColon = computedColon && !vertical; // Remove duplicated user input colon
if (haveColon && typeof label === 'string' && label.trim() !== '') {
labelChildren = label.replace(/[:]\s*$/, '');
}
var labelClassName = (0, _classnames["default"])((_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-item-required"), required), _defineProperty(_classNames, "".concat(prefixCls, "-item-no-colon"), !computedColon), _classNames));
return label ? React.createElement(_col["default"], _extends({}, mergedLabelCol, {
className: labelColClassName
}), React.createElement("label", {
htmlFor: htmlFor || id || _this3.getId(),
className: labelClassName,
title: typeof label === 'string' ? label : '',
onClick: _this3.onLabelClick
}, labelChildren)) : null;
});
}
}, {
key: "renderChildren",
value: function renderChildren(prefixCls) {
var children = this.props.children;
return [this.renderLabel(prefixCls), this.renderWrapper(prefixCls, this.renderValidateWrapper(prefixCls, children, this.renderHelp(prefixCls), this.renderExtra(prefixCls)))];
}
}, {
key: "render",
value: function render() {
return React.createElement(_configProvider.ConfigConsumer, null, this.renderFormItem);
}
}]);
return FormItem;
}(React.Component);
exports["default"] = FormItem;
FormItem.defaultProps = {
hasFeedback: false
};
FormItem.propTypes = {
prefixCls: PropTypes.string,
label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
labelCol: PropTypes.object,
help: PropTypes.oneOfType([PropTypes.node, PropTypes.bool]),
validateStatus: PropTypes.oneOf(ValidateStatuses),
hasFeedback: PropTypes.bool,
wrapperCol: PropTypes.object,
className: PropTypes.string,
id: PropTypes.string,
children: PropTypes.node,
colon: PropTypes.bool
};
//# sourceMappingURL=FormItem.js.map
/***/ }),
/***/ 1074:
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(174),
stubFalse = __webpack_require__(1283);
/** Detect free variable `exports`. */
var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
/** Detect free variable `module`. */
var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
/** Detect the popular CommonJS extension `module.exports`. */
var moduleExports = freeModule && freeModule.exports === freeExports;
/** Built-in value references. */
var Buffer = moduleExports ? root.Buffer : undefined;
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
/**
* Checks if `value` is a buffer.
*
* @static
* @memberOf _
* @since 4.3.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
* @example
*
* _.isBuffer(new Buffer(2));
* // => true
*
* _.isBuffer(new Uint8Array(2));
* // => false
*/
var isBuffer = nativeIsBuffer || stubFalse;
module.exports = isBuffer;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(321)(module)))
/***/ }),
/***/ 1075:
/***/ (function(module, exports, __webpack_require__) {
var getNative = __webpack_require__(945),
root = __webpack_require__(174);
/* Built-in method references that are verified to be native. */
var Map = getNative(root, 'Map');
module.exports = Map;
/***/ }),
/***/ 1076:
/***/ (function(module, exports, __webpack_require__) {
var mapCacheClear = __webpack_require__(1268),
mapCacheDelete = __webpack_require__(1275),
mapCacheGet = __webpack_require__(1277),
mapCacheHas = __webpack_require__(1278),
mapCacheSet = __webpack_require__(1279);
/**
* Creates a map cache object to store key-value pairs.
*
* @private
* @constructor
* @param {Array} [entries] The key-value pairs to cache.
*/
function MapCache(entries) {
var index = -1,
length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
// Add methods to `MapCache`.
MapCache.prototype.clear = mapCacheClear;
MapCache.prototype['delete'] = mapCacheDelete;
MapCache.prototype.get = mapCacheGet;
MapCache.prototype.has = mapCacheHas;
MapCache.prototype.set = mapCacheSet;
module.exports = MapCache;
/***/ }),
/***/ 1077:
/***/ (function(module, exports, __webpack_require__) {
var overArg = __webpack_require__(1232);
/** Built-in value references. */
var getPrototype = overArg(Object.getPrototypeOf, Object);
module.exports = getPrototype;
/***/ }),
/***/ 1078:
/***/ (function(module, exports) {
/** Used for built-in method references. */
var objectProto = Object.prototype;
/**
* Checks if `value` is likely a prototype object.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
*/
function isPrototype(value) {
var Ctor = value && value.constructor,
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
return value === proto;
}
module.exports = isPrototype;
/***/ }),
/***/ 1079:
/***/ (function(module, exports) {
/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER = 9007199254740991;
/**
* Checks if `value` is a valid array-like length.
*
* **Note:** This method is loosely based on
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
* @example
*
* _.isLength(3);
* // => true
*
* _.isLength(Number.MIN_VALUE);
* // => false
*
* _.isLength(Infinity);
* // => false
*
* _.isLength('3');
* // => false
*/
function isLength(value) {
return typeof value == 'number' &&
value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}
module.exports = isLength;
/***/ }),
/***/ 1082:
/***/ (function(module, exports, __webpack_require__) {
var arrayLikeKeys = __webpack_require__(1233),
baseKeysIn = __webpack_require__(1286),
isArrayLike = __webpack_require__(948);
/**
* Creates an array of the own and inherited enumerable property names of `object`.
*
* **Note:** Non-object values are coerced to objects.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Object
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.keysIn(new Foo);
* // => ['a', 'b', 'c'] (iteration order is not guaranteed)
*/
function keysIn(object) {
return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
}
module.exports = keysIn;
/***/ }),
/***/ 1083:
/***/ (function(module, exports) {
/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER = 9007199254740991;
/** Used to detect unsigned integer values. */
var reIsUint = /^(?:0|[1-9]\d*)$/;
/**
* Checks if `value` is a valid array-like index.
*
* @private
* @param {*} value The value to check.
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
*/
function isIndex(value, length) {
var type = typeof value;
length = length == null ? MAX_SAFE_INTEGER : length;
return !!length &&
(type == 'number' ||
(type != 'symbol' && reIsUint.test(value))) &&
(value > -1 && value % 1 == 0 && value < length);
}
module.exports = isIndex;
/***/ }),
/***/ 1084:
/***/ (function(module, exports) {
/**
* This method returns the first argument it receives.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Util
* @param {*} value Any value.
* @returns {*} Returns `value`.
* @example
*
* var object = { 'a': 1 };
*
* console.log(_.identity(object) === object);
* // => true
*/
function identity(value) {
return value;
}
module.exports = identity;
/***/ }),
/***/ 1085:
/***/ (function(module, exports, __webpack_require__) {
// style-loader: Adds some css to the DOM by adding a <style> tag
// load the styles
var content = __webpack_require__(1086);
if(typeof content === 'string') content = [[module.i, content, '']];
// Prepare cssTransformation
var transform;
var options = {"hmr":false}
options.transform = transform
// add the styles to the DOM
var update = __webpack_require__(313)(content, options);
if(content.locals) module.exports = content.locals;
/***/ }),
/***/ 1086:
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(312)(true);
// imports
// module
exports.push([module.i, ".ant-dropdown{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;color:rgba(0,0,0,.65);font-size:14px;font-variant:tabular-nums;line-height:1.5;list-style:none;-webkit-font-feature-settings:\"tnum\";font-feature-settings:\"tnum\";position:absolute;top:-9999px;left:-9999px;z-index:1050;display:block}.ant-dropdown:before{position:absolute;top:-7px;right:0;bottom:-7px;left:-7px;z-index:-9999;opacity:.0001;content:\" \"}.ant-dropdown-wrap{position:relative}.ant-dropdown-wrap .ant-btn>.anticon-down{display:inline-block;font-size:12px;font-size:10px\\9;-webkit-transform:scale(.83333333) rotate(0deg);-ms-transform:scale(.83333333) rotate(0deg);transform:scale(.83333333) rotate(0deg)}:root .ant-dropdown-wrap .ant-btn>.anticon-down{font-size:12px}.ant-dropdown-wrap .anticon-down:before{-webkit-transition:-webkit-transform .2s;transition:-webkit-transform .2s;-o-transition:transform .2s;transition:transform .2s;transition:transform .2s,-webkit-transform .2s}.ant-dropdown-wrap-open .anticon-down:before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.ant-dropdown-hidden,.ant-dropdown-menu-hidden{display:none}.ant-dropdown-menu{position:relative;margin:0;padding:4px 0;text-align:left;list-style-type:none;background-color:#fff;background-clip:padding-box;border-radius:4px;outline:none;-webkit-box-shadow:0 2px 8px rgba(0,0,0,.15);box-shadow:0 2px 8px rgba(0,0,0,.15);-webkit-transform:translateZ(0)}.ant-dropdown-menu-item-group-title{padding:5px 12px;color:rgba(0,0,0,.45);-webkit-transition:all .3s;-o-transition:all .3s;transition:all .3s}.ant-dropdown-menu-submenu-popup{position:absolute;z-index:1050}.ant-dropdown-menu-submenu-popup>.ant-dropdown-menu{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}.ant-dropdown-menu-submenu-popup li,.ant-dropdown-menu-submenu-popup ul{list-style:none}.ant-dropdown-menu-submenu-popup ul{margin-right:.3em;margin-left:.3em;padding:0}.ant-dropdown-menu-item,.ant-dropdown-menu-submenu-title{clear:both;margin:0;padding:5px 12px;color:rgba(0,0,0,.65);font-weight:400;font-size:14px;line-height:22px;white-space:nowrap;cursor:pointer;-webkit-transition:all .3s;-o-transition:all .3s;transition:all .3s}.ant-dropdown-menu-item>.anticon:first-child,.ant-dropdown-menu-item>span>.anticon:first-child,.ant-dropdown-menu-submenu-title>.anticon:first-child,.ant-dropdown-menu-submenu-title>span>.anticon:first-child{min-width:12px;margin-right:8px;font-size:12px}.ant-dropdown-menu-item>a,.ant-dropdown-menu-submenu-title>a{display:block;margin:-5px -12px;padding:5px 12px;color:rgba(0,0,0,.65);-webkit-transition:all .3s;-o-transition:all .3s;transition:all .3s}.ant-dropdown-menu-item-selected,.ant-dropdown-menu-item-selected>a,.ant-dropdown-menu-submenu-title-selected,.ant-dropdown-menu-submenu-title-selected>a{color:#1890ff;background-color:#e6f7ff}.ant-dropdown-menu-item:hover,.ant-dropdown-menu-submenu-title:hover{background-color:#e6f7ff}.ant-dropdown-menu-item-disabled,.ant-dropdown-menu-submenu-title-disabled{color:rgba(0,0,0,.25);cursor:not-allowed}.ant-dropdown-menu-item-disabled:hover,.ant-dropdown-menu-submenu-title-disabled:hover{color:rgba(0,0,0,.25);background-color:#fff;cursor:not-allowed}.ant-dropdown-menu-item-divider,.ant-dropdown-menu-submenu-title-divider{height:1px;margin:4px 0;overflow:hidden;line-height:0;background-color:#e8e8e8}.ant-dropdown-menu-item .ant-dropdown-menu-submenu-arrow,.ant-dropdown-menu-submenu-title .ant-dropdown-menu-submenu-arrow{position:absolute;right:8px}.ant-dropdown-menu-item .ant-dropdown-menu-submenu-arrow-icon,.ant-dropdown-menu-submenu-title .ant-dropdown-menu-submenu-arrow-icon{color:rgba(0,0,0,.45);font-style:normal;display:inline-block;font-size:12px;font-size:10px\\9;-webkit-transform:scale(.83333333) rotate(0deg);-ms-transform:scale(.83333333) rotate(0deg);transform:scale(.83333333) rotate(0deg)}:root .ant-dropdown-menu-item .ant-dropdown-menu-submenu-arrow-icon,:root .ant-dropdown-menu-submenu-title .ant-dropdown-menu-submenu-arrow-icon{font-size:12px}.ant-
// exports
/***/ }),
/***/ 1087:
/***/ (function(module, exports, __webpack_require__) {
var baseIsArguments = __webpack_require__(1282),
isObjectLike = __webpack_require__(323);
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/** Built-in value references. */
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
/**
* Checks if `value` is likely an `arguments` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
* else `false`.
* @example
*
* _.isArguments(function() { return arguments; }());
* // => true
*
* _.isArguments([1, 2, 3]);
* // => false
*/
var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
!propertyIsEnumerable.call(value, 'callee');
};
module.exports = isArguments;
/***/ }),
/***/ 1088:
/***/ (function(module, exports, __webpack_require__) {
var baseIsTypedArray = __webpack_require__(1284),
baseUnary = __webpack_require__(1150),
nodeUtil = __webpack_require__(1151);
/* Node.js helper references. */
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
/**
* Checks if `value` is classified as a typed array.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
* @example
*
* _.isTypedArray(new Uint8Array);
* // => true
*
* _.isTypedArray([]);
* // => false
*/
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
module.exports = isTypedArray;
/***/ }),
/***/ 1089:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Dropdown__ = __webpack_require__(1090);
/* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__Dropdown__["a" /* default */]);
/***/ }),
/***/ 1090:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_dom__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_dom__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_rc_trigger__ = __webpack_require__(89);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames__ = __webpack_require__(3);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_classnames__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__placements__ = __webpack_require__(1091);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react_lifecycles_compat__ = __webpack_require__(7);
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 _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } 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; }
var Dropdown = function (_Component) {
_inherits(Dropdown, _Component);
function Dropdown(props) {
_classCallCheck(this, Dropdown);
var _this = _possibleConstructorReturn(this, _Component.call(this, props));
_initialiseProps.call(_this);
if ('visible' in props) {
_this.state = {
visible: props.visible
};
} else {
_this.state = {
visible: props.defaultVisible
};
}
return _this;
}
Dropdown.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps) {
if ('visible' in nextProps) {
return {
visible: nextProps.visible
};
}
return null;
};
Dropdown.prototype.getOverlayElement = function getOverlayElement() {
var overlay = this.props.overlay;
var overlayElement = void 0;
if (typeof overlay === 'function') {
overlayElement = overlay();
} else {
overlayElement = overlay;
}
return overlayElement;
};
Dropdown.prototype.getMenuElementOrLambda = function getMenuElementOrLambda() {
var overlay = this.props.overlay;
if (typeof overlay === 'function') {
return this.getMenuElement;
}
return this.getMenuElement();
};
Dropdown.prototype.getPopupDomNode = function getPopupDomNode() {
return this.trigger.getPopupDomNode();
};
Dropdown.prototype.getOpenClassName = function getOpenClassName() {
var _props = this.props,
openClassName = _props.openClassName,
prefixCls = _props.prefixCls;
if (openClassName !== undefined) {
return openClassName;
}
return prefixCls + '-open';
};
Dropdown.prototype.renderChildren = function renderChildren() {
var children = this.props.children;
var visible = this.state.visible;
var childrenProps = children.props ? children.props : {};
var childClassName = __WEBPACK_IMPORTED_MODULE_4_classnames___default()(childrenProps.className, this.getOpenClassName());
return visible && children ? Object(__WEBPACK_IMPORTED_MODULE_0_react__["cloneElement"])(children, { className: childClassName }) : children;
};
Dropdown.prototype.render = function render() {
var _props2 = this.props,
prefixCls = _props2.prefixCls,
transitionName = _props2.transitionName,
animation = _props2.animation,
align = _props2.align,
placement = _props2.placement,
getPopupContainer = _props2.getPopupContainer,
showAction = _props2.showAction,
hideAction = _props2.hideAction,
overlayClassName = _props2.overlayClassName,
overlayStyle = _props2.overlayStyle,
trigger = _props2.trigger,
otherProps = _objectWithoutProperties(_props2, ['prefixCls', 'transitionName', 'animation', 'align', 'placement', 'getPopupContainer', 'showAction', 'hideAction', 'overlayClassName', 'overlayStyle', 'trigger']);
var triggerHideAction = hideAction;
if (!triggerHideAction && trigger.indexOf('contextMenu') !== -1) {
triggerHideAction = ['click'];
}
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(
__WEBPACK_IMPORTED_MODULE_3_rc_trigger__["default"],
_extends({}, otherProps, {
prefixCls: prefixCls,
ref: this.saveTrigger,
popupClassName: overlayClassName,
popupStyle: overlayStyle,
builtinPlacements: __WEBPACK_IMPORTED_MODULE_5__placements__["a" /* default */],
action: trigger,
showAction: showAction,
hideAction: triggerHideAction || [],
popupPlacement: placement,
popupAlign: align,
popupTransitionName: transitionName,
popupAnimation: animation,
popupVisible: this.state.visible,
afterPopupVisibleChange: this.afterVisibleChange,
popup: this.getMenuElementOrLambda(),
onPopupVisibleChange: this.onVisibleChange,
getPopupContainer: getPopupContainer
}),
this.renderChildren()
);
};
return Dropdown;
}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);
Dropdown.propTypes = {
minOverlayWidthMatchTrigger: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,
onVisibleChange: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func,
onOverlayClick: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func,
prefixCls: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string,
children: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.any,
transitionName: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string,
overlayClassName: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string,
openClassName: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string,
animation: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.any,
align: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object,
overlayStyle: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object,
placement: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string,
overlay: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.node, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func]),
trigger: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.array,
alignPoint: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,
showAction: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.array,
hideAction: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.array,
getPopupContainer: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func,
visible: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,
defaultVisible: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool
};
Dropdown.defaultProps = {
prefixCls: 'rc-dropdown',
trigger: ['hover'],
showAction: [],
overlayClassName: '',
overlayStyle: {},
defaultVisible: false,
onVisibleChange: function onVisibleChange() {},
placement: 'bottomLeft'
};
var _initialiseProps = function _initialiseProps() {
var _this2 = this;
this.onClick = function (e) {
var props = _this2.props;
var overlayProps = _this2.getOverlayElement().props;
// do no call onVisibleChange, if you need click to hide, use onClick and control visible
if (!('visible' in props)) {
_this2.setState({
visible: false
});
}
if (props.onOverlayClick) {
props.onOverlayClick(e);
}
if (overlayProps.onClick) {
overlayProps.onClick(e);
}
};
this.onVisibleChange = function (visible) {
var props = _this2.props;
if (!('visible' in props)) {
_this2.setState({
visible: visible
});
}
props.onVisibleChange(visible);
};
this.getMinOverlayWidthMatchTrigger = function () {
var _props3 = _this2.props,
minOverlayWidthMatchTrigger = _props3.minOverlayWidthMatchTrigger,
alignPoint = _props3.alignPoint;
if ('minOverlayWidthMatchTrigger' in _this2.props) {
return minOverlayWidthMatchTrigger;
}
return !alignPoint;
};
this.getMenuElement = function () {
var prefixCls = _this2.props.prefixCls;
var overlayElement = _this2.getOverlayElement();
var extraOverlayProps = {
prefixCls: prefixCls + '-menu',
onClick: _this2.onClick
};
if (typeof overlayElement.type === 'string') {
delete extraOverlayProps.prefixCls;
}
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.cloneElement(overlayElement, extraOverlayProps);
};
this.afterVisibleChange = function (visible) {
if (visible && _this2.getMinOverlayWidthMatchTrigger()) {
var overlayNode = _this2.getPopupDomNode();
var rootNode = __WEBPACK_IMPORTED_MODULE_2_react_dom___default.a.findDOMNode(_this2);
if (rootNode && overlayNode && rootNode.offsetWidth > overlayNode.offsetWidth) {
overlayNode.style.minWidth = rootNode.offsetWidth + 'px';
if (_this2.trigger && _this2.trigger._component && _this2.trigger._component.alignInstance) {
_this2.trigger._component.alignInstance.forceAlign();
}
}
}
};
this.saveTrigger = function (node) {
_this2.trigger = node;
};
};
Object(__WEBPACK_IMPORTED_MODULE_6_react_lifecycles_compat__["polyfill"])(Dropdown);
/* harmony default export */ __webpack_exports__["a"] = (Dropdown);
/***/ }),
/***/ 1091:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony export placements */
var autoAdjustOverflow = {
adjustX: 1,
adjustY: 1
};
var targetOffset = [0, 0];
var placements = {
topLeft: {
points: ['bl', 'tl'],
overflow: autoAdjustOverflow,
offset: [0, -4],
targetOffset: targetOffset
},
topCenter: {
points: ['bc', 'tc'],
overflow: autoAdjustOverflow,
offset: [0, -4],
targetOffset: targetOffset
},
topRight: {
points: ['br', 'tr'],
overflow: autoAdjustOverflow,
offset: [0, -4],
targetOffset: targetOffset
},
bottomLeft: {
points: ['tl', 'bl'],
overflow: autoAdjustOverflow,
offset: [0, 4],
targetOffset: targetOffset
},
bottomCenter: {
points: ['tc', 'bc'],
overflow: autoAdjustOverflow,
offset: [0, 4],
targetOffset: targetOffset
},
bottomRight: {
points: ['tr', 'br'],
overflow: autoAdjustOverflow,
offset: [0, 4],
targetOffset: targetOffset
}
};
/* harmony default export */ __webpack_exports__["a"] = (placements);
/***/ }),
/***/ 1105:
/***/ (function(module, exports, __webpack_require__) {
var getNative = __webpack_require__(945);
var defineProperty = (function() {
try {
var func = getNative(Object, 'defineProperty');
func({}, '', {});
return func;
} catch (e) {}
}());
module.exports = defineProperty;
/***/ }),
/***/ 1106:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(__webpack_require__(0));
var _classnames = _interopRequireDefault(__webpack_require__(3));
var _button = _interopRequireDefault(__webpack_require__(74));
var _configProvider = __webpack_require__(12);
var _dropdown = _interopRequireDefault(__webpack_require__(922));
var _icon = _interopRequireDefault(__webpack_require__(26));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _extends() { _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; }; return _extends.apply(this, arguments); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var __rest = void 0 && (void 0).__rest || function (s, e) {
var t = {};
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
var ButtonGroup = _button["default"].Group;
var DropdownButton =
/*#__PURE__*/
function (_React$Component) {
_inherits(DropdownButton, _React$Component);
function DropdownButton() {
var _this;
_classCallCheck(this, DropdownButton);
_this = _possibleConstructorReturn(this, _getPrototypeOf(DropdownButton).apply(this, arguments));
_this.renderButton = function (_ref) {
var getContextPopupContainer = _ref.getPopupContainer,
getPrefixCls = _ref.getPrefixCls;
var _a = _this.props,
customizePrefixCls = _a.prefixCls,
type = _a.type,
disabled = _a.disabled,
onClick = _a.onClick,
htmlType = _a.htmlType,
children = _a.children,
className = _a.className,
overlay = _a.overlay,
trigger = _a.trigger,
align = _a.align,
visible = _a.visible,
onVisibleChange = _a.onVisibleChange,
placement = _a.placement,
getPopupContainer = _a.getPopupContainer,
href = _a.href,
_a$icon = _a.icon,
icon = _a$icon === void 0 ? React.createElement(_icon["default"], {
type: "ellipsis"
}) : _a$icon,
title = _a.title,
restProps = __rest(_a, ["prefixCls", "type", "disabled", "onClick", "htmlType", "children", "className", "overlay", "trigger", "align", "visible", "onVisibleChange", "placement", "getPopupContainer", "href", "icon", "title"]);
var prefixCls = getPrefixCls('dropdown-button', customizePrefixCls);
var dropdownProps = {
align: align,
overlay: overlay,
disabled: disabled,
trigger: disabled ? [] : trigger,
onVisibleChange: onVisibleChange,
placement: placement,
getPopupContainer: getPopupContainer || getContextPopupContainer
};
if ('visible' in _this.props) {
dropdownProps.visible = visible;
}
return React.createElement(ButtonGroup, _extends({}, restProps, {
className: (0, _classnames["default"])(prefixCls, className)
}), React.createElement(_button["default"], {
type: type,
disabled: disabled,
onClick: onClick,
htmlType: htmlType,
href: href,
title: title
}, children), React.createElement(_dropdown["default"], dropdownProps, React.createElement(_button["default"], {
type: type
}, icon)));
};
return _this;
}
_createClass(DropdownButton, [{
key: "render",
value: function render() {
return React.createElement(_configProvider.ConfigConsumer, null, this.renderButton);
}
}]);
return DropdownButton;
}(React.Component);
exports["default"] = DropdownButton;
DropdownButton.defaultProps = {
placement: 'bottomRight',
type: 'default'
};
//# sourceMappingURL=dropdown-button.js.map
/***/ }),
/***/ 1108:
/***/ (function(module, exports, __webpack_require__) {
var baseAssignValue = __webpack_require__(984),
eq = __webpack_require__(925);
/**
* This function is like `assignValue` except that it doesn't assign
* `undefined` values.
*
* @private
* @param {Object} object The object to modify.
* @param {string} key The key of the property to assign.
* @param {*} value The value to assign.
*/
function assignMergeValue(object, key, value) {
if ((value !== undefined && !eq(object[key], value)) ||
(value === undefined && !(key in object))) {
baseAssignValue(object, key, value);
}
}
module.exports = assignMergeValue;
/***/ }),
/***/ 1109:
/***/ (function(module, exports) {
/**
* Gets the value at `key`, unless `key` is "__proto__".
*
* @private
* @param {Object} object The object to query.
* @param {string} key The key of the property to get.
* @returns {*} Returns the property value.
*/
function safeGet(object, key) {
if (key == '__proto__') {
return;
}
return object[key];
}
module.exports = safeGet;
/***/ }),
/***/ 1112:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.warning = warning;
exports.note = note;
exports.resetWarned = resetWarned;
exports.call = call;
exports.warningOnce = warningOnce;
exports.noteOnce = noteOnce;
exports.default = void 0;
/* eslint-disable no-console */
var warned = {};
function warning(valid, message) {
// Support uglify
if (false) {
console.error("Warning: ".concat(message));
}
}
function note(valid, message) {
// Support uglify
if (false) {
console.warn("Note: ".concat(message));
}
}
function resetWarned() {
warned = {};
}
function call(method, valid, message) {
if (!valid && !warned[message]) {
method(false, message);
warned[message] = true;
}
}
function warningOnce(valid, message) {
call(warning, valid, message);
}
function noteOnce(valid, message) {
call(note, valid, message);
}
var _default = warningOnce;
/* eslint-enable */
exports.default = _default;
/***/ }),
/***/ 1113:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var __importStar = this && this.__importStar || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) {
if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
}
result["default"] = mod;
return result;
};
var __importDefault = this && this.__importDefault || function (mod) {
return mod && mod.__esModule ? mod : {
"default": mod
};
};
Object.defineProperty(exports, "__esModule", {
value: true
});
var React = __importStar(__webpack_require__(0));
var PropTypes = __importStar(__webpack_require__(1));
var mini_store_1 = __webpack_require__(88);
var classnames_1 = __importDefault(__webpack_require__(3));
var ColGroup_1 = __importDefault(__webpack_require__(1380));
var TableHeader_1 = __importDefault(__webpack_require__(1381));
var TableRow_1 = __importDefault(__webpack_require__(1114));
var ExpandableRow_1 = __importDefault(__webpack_require__(1384));
var BaseTable =
/*#__PURE__*/
function (_React$Component) {
_inherits(BaseTable, _React$Component);
function BaseTable() {
var _this;
_classCallCheck(this, BaseTable);
_this = _possibleConstructorReturn(this, _getPrototypeOf(BaseTable).apply(this, arguments));
_this.handleRowHover = function (isHover, key) {
_this.props.store.setState({
currentHoverKey: isHover ? key : null
});
};
_this.renderRows = function (renderData, indent) {
var ancestorKeys = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
var table = _this.context.table;
var columnManager = table.columnManager,
components = table.components;
var _table$props = table.props,
prefixCls = _table$props.prefixCls,
childrenColumnName = _table$props.childrenColumnName,
rowClassName = _table$props.rowClassName,
rowRef = _table$props.rowRef,
onRowClick = _table$props.onRowClick,
onRowDoubleClick = _table$props.onRowDoubleClick,
onRowContextMenu = _table$props.onRowContextMenu,
onRowMouseEnter = _table$props.onRowMouseEnter,
onRowMouseLeave = _table$props.onRowMouseLeave,
onRow = _table$props.onRow;
var _this$props = _this.props,
getRowKey = _this$props.getRowKey,
fixed = _this$props.fixed,
expander = _this$props.expander,
isAnyColumnsFixed = _this$props.isAnyColumnsFixed;
var rows = [];
var _loop = function _loop(i) {
var record = renderData[i];
var key = getRowKey(record, i);
var className = typeof rowClassName === 'string' ? rowClassName : rowClassName(record, i, indent);
var onHoverProps = {};
if (columnManager.isAnyColumnsFixed()) {
onHoverProps.onHover = _this.handleRowHover;
}
var leafColumns = void 0;
if (fixed === 'left') {
leafColumns = columnManager.leftLeafColumns();
} else if (fixed === 'right') {
leafColumns = columnManager.rightLeafColumns();
} else {
leafColumns = _this.getColumns(columnManager.leafColumns());
}
var rowPrefixCls = "".concat(prefixCls, "-row");
var row = React.createElement(ExpandableRow_1.default, Object.assign({}, expander.props, {
fixed: fixed,
index: i,
prefixCls: rowPrefixCls,
record: record,
key: key,
rowKey: key,
onRowClick: onRowClick,
needIndentSpaced: expander.needIndentSpaced,
onExpandedChange: expander.handleExpandChange
}), function (expandableRow) {
return React.createElement(TableRow_1.default, Object.assign({
fixed: fixed,
indent: indent,
className: className,
record: record,
index: i,
prefixCls: rowPrefixCls,
childrenColumnName: childrenColumnName,
columns: leafColumns,
onRow: onRow,
onRowDoubleClick: onRowDoubleClick,
onRowContextMenu: onRowContextMenu,
onRowMouseEnter: onRowMouseEnter,
onRowMouseLeave: onRowMouseLeave
}, onHoverProps, {
rowKey: key,
ancestorKeys: ancestorKeys,
ref: rowRef(record, i, indent),
components: components,
isAnyColumnsFixed: isAnyColumnsFixed
}, expandableRow));
});
rows.push(row);
expander.renderRows(_this.renderRows, rows, record, i, indent, fixed, key, ancestorKeys);
};
for (var i = 0; i < renderData.length; i += 1) {
_loop(i);
}
return rows;
};
return _this;
}
_createClass(BaseTable, [{
key: "getColumns",
value: function getColumns(cols) {
var _this$props2 = this.props,
_this$props2$columns = _this$props2.columns,
columns = _this$props2$columns === void 0 ? [] : _this$props2$columns,
fixed = _this$props2.fixed;
var table = this.context.table;
var prefixCls = table.props.prefixCls;
return (cols || columns).map(function (column) {
return _objectSpread({}, column, {
className: !!column.fixed && !fixed ? classnames_1.default("".concat(prefixCls, "-fixed-columns-in-body"), column.className) : column.className
});
});
}
}, {
key: "render",
value: function render() {
var table = this.context.table;
var components = table.components;
var _table$props2 = table.props,
prefixCls = _table$props2.prefixCls,
scroll = _table$props2.scroll,
data = _table$props2.data,
getBodyWrapper = _table$props2.getBodyWrapper;
var _this$props3 = this.props,
expander = _this$props3.expander,
tableClassName = _this$props3.tableClassName,
hasHead = _this$props3.hasHead,
hasBody = _this$props3.hasBody,
fixed = _this$props3.fixed;
var tableStyle = {};
if (!fixed && scroll.x) {
// not set width, then use content fixed width
tableStyle.width = scroll.x === true ? 'max-content' : scroll.x;
}
var Table = hasBody ? components.table : 'table';
var BodyWrapper = components.body.wrapper;
var body;
if (hasBody) {
body = React.createElement(BodyWrapper, {
className: "".concat(prefixCls, "-tbody")
}, this.renderRows(data, 0));
if (getBodyWrapper) {
body = getBodyWrapper(body);
}
}
var columns = this.getColumns();
return React.createElement(Table, {
className: tableClassName,
style: tableStyle,
key: "table"
}, React.createElement(ColGroup_1.default, {
columns: columns,
fixed: fixed
}), hasHead && React.createElement(TableHeader_1.default, {
expander: expander,
columns: columns,
fixed: fixed
}), body);
}
}]);
return BaseTable;
}(React.Component);
BaseTable.contextTypes = {
table: PropTypes.any
};
exports.default = mini_store_1.connect()(BaseTable);
/***/ }),
/***/ 1114:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var __importStar = this && this.__importStar || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) {
if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
}
result["default"] = mod;
return result;
};
var __importDefault = this && this.__importDefault || function (mod) {
return mod && mod.__esModule ? mod : {
"default": mod
};
};
Object.defineProperty(exports, "__esModule", {
value: true
});
var React = __importStar(__webpack_require__(0));
var react_dom_1 = __importDefault(__webpack_require__(4));
var warning_1 = __importDefault(__webpack_require__(1112));
var mini_store_1 = __webpack_require__(88);
var react_lifecycles_compat_1 = __webpack_require__(7);
var classnames_1 = __importDefault(__webpack_require__(3));
var TableCell_1 = __importDefault(__webpack_require__(1383));
var TableRow =
/*#__PURE__*/
function (_React$Component) {
_inherits(TableRow, _React$Component);
function TableRow() {
var _this;
_classCallCheck(this, TableRow);
_this = _possibleConstructorReturn(this, _getPrototypeOf(TableRow).apply(this, arguments));
_this.state = {};
_this.onTriggerEvent = function (rowPropFunc, legacyFunc, additionalFunc) {
var _this$props = _this.props,
record = _this$props.record,
index = _this$props.index;
return function () {
// Additional function like trigger `this.onHover` to handle self logic
if (additionalFunc) {
additionalFunc();
} // [Legacy] Some legacy function like `onRowClick`.
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
var event = args[0];
if (legacyFunc) {
legacyFunc(record, index, event);
} // Pass to the function from `onRow`
if (rowPropFunc) {
rowPropFunc.apply(void 0, args);
}
};
};
_this.onMouseEnter = function () {
var _this$props2 = _this.props,
onHover = _this$props2.onHover,
rowKey = _this$props2.rowKey;
onHover(true, rowKey);
};
_this.onMouseLeave = function () {
var _this$props3 = _this.props,
onHover = _this$props3.onHover,
rowKey = _this$props3.rowKey;
onHover(false, rowKey);
};
return _this;
}
_createClass(TableRow, [{
key: "componentDidMount",
value: function componentDidMount() {
if (this.state.shouldRender) {
this.saveRowRef();
}
}
}, {
key: "shouldComponentUpdate",
value: function shouldComponentUpdate(nextProps) {
return !!(this.props.visible || nextProps.visible);
}
}, {
key: "componentDidUpdate",
value: function componentDidUpdate() {
if (this.state.shouldRender && !this.rowRef) {
this.saveRowRef();
}
}
}, {
key: "setExpandedRowHeight",
value: function setExpandedRowHeight() {
var _this$props4 = this.props,
store = _this$props4.store,
rowKey = _this$props4.rowKey;
var _store$getState = store.getState(),
expandedRowsHeight = _store$getState.expandedRowsHeight;
var _this$rowRef$getBound = this.rowRef.getBoundingClientRect(),
height = _this$rowRef$getBound.height;
expandedRowsHeight = _objectSpread({}, expandedRowsHeight, _defineProperty({}, rowKey, height));
store.setState({
expandedRowsHeight: expandedRowsHeight
});
}
}, {
key: "setRowHeight",
value: function setRowHeight() {
var _this$props5 = this.props,
store = _this$props5.store,
rowKey = _this$props5.rowKey;
var _store$getState2 = store.getState(),
fixedColumnsBodyRowsHeight = _store$getState2.fixedColumnsBodyRowsHeight;
var _this$rowRef$getBound2 = this.rowRef.getBoundingClientRect(),
height = _this$rowRef$getBound2.height;
store.setState({
fixedColumnsBodyRowsHeight: _objectSpread({}, fixedColumnsBodyRowsHeight, _defineProperty({}, rowKey, height))
});
}
}, {
key: "getStyle",
value: function getStyle() {
var _this$props6 = this.props,
height = _this$props6.height,
visible = _this$props6.visible;
if (height && height !== this.style.height) {
this.style = _objectSpread({}, this.style, {
height: height
});
}
if (!visible && !this.style.display) {
this.style = _objectSpread({}, this.style, {
display: 'none'
});
}
return this.style;
}
}, {
key: "saveRowRef",
value: function saveRowRef() {
this.rowRef = react_dom_1.default.findDOMNode(this);
var _this$props7 = this.props,
isAnyColumnsFixed = _this$props7.isAnyColumnsFixed,
fixed = _this$props7.fixed,
expandedRow = _this$props7.expandedRow,
ancestorKeys = _this$props7.ancestorKeys;
if (!isAnyColumnsFixed || !this.rowRef) {
return;
}
if (!fixed && expandedRow) {
this.setExpandedRowHeight();
}
if (!fixed && ancestorKeys.length >= 0) {
this.setRowHeight();
}
}
}, {
key: "render",
value: function render() {
if (!this.state.shouldRender) {
return null;
}
var _this$props8 = this.props,
prefixCls = _this$props8.prefixCls,
columns = _this$props8.columns,
record = _this$props8.record,
rowKey = _this$props8.rowKey,
index = _this$props8.index,
onRow = _this$props8.onRow,
indent = _this$props8.indent,
indentSize = _this$props8.indentSize,
hovered = _this$props8.hovered,
height = _this$props8.height,
visible = _this$props8.visible,
components = _this$props8.components,
hasExpandIcon = _this$props8.hasExpandIcon,
renderExpandIcon = _this$props8.renderExpandIcon,
renderExpandIconCell = _this$props8.renderExpandIconCell,
onRowClick = _this$props8.onRowClick,
onRowDoubleClick = _this$props8.onRowDoubleClick,
onRowMouseEnter = _this$props8.onRowMouseEnter,
onRowMouseLeave = _this$props8.onRowMouseLeave,
onRowContextMenu = _this$props8.onRowContextMenu;
var BodyRow = components.body.row;
var BodyCell = components.body.cell;
var className = this.props.className;
if (hovered) {
className += " ".concat(prefixCls, "-hover");
}
var cells = [];
renderExpandIconCell(cells);
for (var i = 0; i < columns.length; i += 1) {
var column = columns[i];
warning_1.default(column.onCellClick === undefined, 'column[onCellClick] is deprecated, please use column[onCell] instead.');
cells.push(React.createElement(TableCell_1.default, {
prefixCls: prefixCls,
record: record,
indentSize: indentSize,
indent: indent,
index: index,
column: column,
key: column.key || column.dataIndex,
expandIcon: hasExpandIcon(i) && renderExpandIcon(),
component: BodyCell
}));
}
var _ref = onRow(record, index) || {},
customClassName = _ref.className,
customStyle = _ref.style,
rowProps = _objectWithoutProperties(_ref, ["className", "style"]);
var style = {
height: height
};
if (!visible) {
style.display = 'none';
}
style = _objectSpread({}, style, {}, customStyle);
var rowClassName = classnames_1.default(prefixCls, className, "".concat(prefixCls, "-level-").concat(indent), customClassName);
return React.createElement(BodyRow, Object.assign({}, rowProps, {
onClick: this.onTriggerEvent(rowProps.onClick, onRowClick),
onDoubleClick: this.onTriggerEvent(rowProps.onDoubleClick, onRowDoubleClick),
onMouseEnter: this.onTriggerEvent(rowProps.onMouseEnter, onRowMouseEnter, this.onMouseEnter),
onMouseLeave: this.onTriggerEvent(rowProps.onMouseLeave, onRowMouseLeave, this.onMouseLeave),
onContextMenu: this.onTriggerEvent(rowProps.onContextMenu, onRowContextMenu),
className: rowClassName,
style: style,
"data-row-key": rowKey
}), cells);
}
}], [{
key: "getDerivedStateFromProps",
value: function getDerivedStateFromProps(nextProps, prevState) {
if (prevState.visible || !prevState.visible && nextProps.visible) {
return {
shouldRender: true,
visible: nextProps.visible
};
}
return {
visible: nextProps.visible
};
}
}]);
return TableRow;
}(React.Component);
TableRow.defaultProps = {
onRow: function onRow() {},
onHover: function onHover() {},
hasExpandIcon: function hasExpandIcon() {},
renderExpandIcon: function renderExpandIcon() {},
renderExpandIconCell: function renderExpandIconCell() {}
};
function getRowHeight(state, props) {
var expandedRowsHeight = state.expandedRowsHeight,
fixedColumnsBodyRowsHeight = state.fixedColumnsBodyRowsHeight;
var fixed = props.fixed,
rowKey = props.rowKey;
if (!fixed) {
return null;
}
if (expandedRowsHeight[rowKey]) {
return expandedRowsHeight[rowKey];
}
if (fixedColumnsBodyRowsHeight[rowKey]) {
return fixedColumnsBodyRowsHeight[rowKey];
}
return null;
}
react_lifecycles_compat_1.polyfill(TableRow);
exports.default = mini_store_1.connect(function (state, props) {
var currentHoverKey = state.currentHoverKey,
expandedRowKeys = state.expandedRowKeys;
var rowKey = props.rowKey,
ancestorKeys = props.ancestorKeys;
var visible = ancestorKeys.length === 0 || ancestorKeys.every(function (k) {
return expandedRowKeys.includes(k);
});
return {
visible: visible,
hovered: currentHoverKey === rowKey,
height: getRowHeight(state, props)
};
})(TableRow);
/***/ }),
/***/ 1115:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var Column = function Column() {
return null;
};
exports.default = Column;
/***/ }),
/***/ 1116:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var __importStar = this && this.__importStar || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) {
if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
}
result["default"] = mod;
return result;
};
Object.defineProperty(exports, "__esModule", {
value: true
});
var React = __importStar(__webpack_require__(0));
var ColumnGroup =
/*#__PURE__*/
function (_React$Component) {
_inherits(ColumnGroup, _React$Component);
function ColumnGroup() {
_classCallCheck(this, ColumnGroup);
return _possibleConstructorReturn(this, _getPrototypeOf(ColumnGroup).apply(this, arguments));
}
return ColumnGroup;
}(React.Component);
exports.default = ColumnGroup;
ColumnGroup.isTableColumnGroup = true;
/***/ }),
/***/ 1117:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.flatArray = flatArray;
exports.treeMap = treeMap;
exports.flatFilter = flatFilter;
exports.normalizeColumns = normalizeColumns;
exports.generateValueMaps = generateValueMaps;
var React = _interopRequireWildcard(__webpack_require__(0));
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }
function _extends() { _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; }; return _extends.apply(this, arguments); }
function flatArray() {
var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
var childrenName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'children';
var result = [];
var loop = function loop(array) {
array.forEach(function (item) {
if (item[childrenName]) {
var newItem = _extends({}, item);
delete newItem[childrenName];
result.push(newItem);
if (item[childrenName].length > 0) {
loop(item[childrenName]);
}
} else {
result.push(item);
}
});
};
loop(data);
return result;
}
function treeMap(tree, mapper) {
var childrenName = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'children';
return tree.map(function (node, index) {
var extra = {};
if (node[childrenName]) {
extra[childrenName] = treeMap(node[childrenName], mapper, childrenName);
}
return _extends(_extends({}, mapper(node, index)), extra);
});
}
function flatFilter(tree, callback) {
return tree.reduce(function (acc, node) {
if (callback(node)) {
acc.push(node);
}
if (node.children) {
var children = flatFilter(node.children, callback);
acc.push.apply(acc, _toConsumableArray(children));
}
return acc;
}, []);
}
function normalizeColumns(elements) {
var columns = [];
React.Children.forEach(elements, function (element) {
if (!React.isValidElement(element)) {
return;
}
var column = _extends({}, element.props);
if (element.key) {
column.key = element.key;
}
if (element.type && element.type.__ANT_TABLE_COLUMN_GROUP) {
column.children = normalizeColumns(column.children);
}
columns.push(column);
});
return columns;
}
function generateValueMaps(items) {
var maps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
(items || []).forEach(function (_ref) {
var value = _ref.value,
children = _ref.children;
maps[value.toString()] = value;
generateValueMaps(children, maps);
});
return maps;
}
//# sourceMappingURL=util.js.map
/***/ }),
/***/ 1118:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
__webpack_require__(28);
__webpack_require__(1153);
__webpack_require__(1126);
__webpack_require__(169);
//# sourceMappingURL=css.js.map
/***/ }),
/***/ 1119:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _Upload = _interopRequireDefault(__webpack_require__(1015));
var _Dragger = _interopRequireDefault(__webpack_require__(1216));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
_Upload["default"].Dragger = _Dragger["default"];
var _default = _Upload["default"];
exports["default"] = _default;
//# sourceMappingURL=index.js.map
/***/ }),
/***/ 1120:
/***/ (function(module, exports, __webpack_require__) {
// style-loader: Adds some css to the DOM by adding a <style> tag
// load the styles
var content = __webpack_require__(1121);
if(typeof content === 'string') content = [[module.i, content, '']];
// Prepare cssTransformation
var transform;
var options = {"hmr":false}
options.transform = transform
// add the styles to the DOM
var update = __webpack_require__(313)(content, options);
if(content.locals) module.exports = content.locals;
/***/ }),
/***/ 1121:
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(312)(true);
// imports
// module
exports.push([module.i, ".ant-menu{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;font-size:14px;font-variant:tabular-nums;line-height:1.5;-webkit-font-feature-settings:\"tnum\";font-feature-settings:\"tnum\";margin-bottom:0;padding-left:0;color:rgba(0,0,0,.65);line-height:0;list-style:none;background:#fff;outline:none;-webkit-box-shadow:0 2px 8px rgba(0,0,0,.15);box-shadow:0 2px 8px rgba(0,0,0,.15);-webkit-transition:background .3s,width .2s;-o-transition:background .3s,width .2s;transition:background .3s,width .2s;zoom:1}.ant-menu:after,.ant-menu:before{display:table;content:\"\"}.ant-menu:after{clear:both}.ant-menu ol,.ant-menu ul{margin:0;padding:0;list-style:none}.ant-menu-hidden{display:none}.ant-menu-item-group-title{padding:8px 16px;color:rgba(0,0,0,.45);font-size:14px;line-height:1.5;-webkit-transition:all .3s;-o-transition:all .3s;transition:all .3s}.ant-menu-submenu,.ant-menu-submenu-inline{-webkit-transition:border-color .3s cubic-bezier(.645,.045,.355,1),background .3s cubic-bezier(.645,.045,.355,1),padding .15s cubic-bezier(.645,.045,.355,1);-o-transition:border-color .3s cubic-bezier(.645,.045,.355,1),background .3s cubic-bezier(.645,.045,.355,1),padding .15s cubic-bezier(.645,.045,.355,1);transition:border-color .3s cubic-bezier(.645,.045,.355,1),background .3s cubic-bezier(.645,.045,.355,1),padding .15s cubic-bezier(.645,.045,.355,1)}.ant-menu-submenu-selected{color:#1890ff}.ant-menu-item:active,.ant-menu-submenu-title:active{background:#e6f7ff}.ant-menu-submenu .ant-menu-sub{cursor:auto;-webkit-transition:background .3s cubic-bezier(.645,.045,.355,1),padding .3s cubic-bezier(.645,.045,.355,1);-o-transition:background .3s cubic-bezier(.645,.045,.355,1),padding .3s cubic-bezier(.645,.045,.355,1);transition:background .3s cubic-bezier(.645,.045,.355,1),padding .3s cubic-bezier(.645,.045,.355,1)}.ant-menu-item>a{display:block;color:rgba(0,0,0,.65)}.ant-menu-item>a:hover{color:#1890ff}.ant-menu-item>a:before{position:absolute;top:0;right:0;bottom:0;left:0;background-color:transparent;content:\"\"}.ant-menu-item>.ant-badge>a{color:rgba(0,0,0,.65)}.ant-menu-item>.ant-badge>a:hover{color:#1890ff}.ant-menu-item-divider{height:1px;overflow:hidden;line-height:0;background-color:#e8e8e8}.ant-menu-item-active,.ant-menu-item:hover,.ant-menu-submenu-active,.ant-menu-submenu-title:hover,.ant-menu:not(.ant-menu-inline) .ant-menu-submenu-open{color:#1890ff}.ant-menu-horizontal .ant-menu-item,.ant-menu-horizontal .ant-menu-submenu{margin-top:-1px}.ant-menu-horizontal>.ant-menu-item-active,.ant-menu-horizontal>.ant-menu-item:hover,.ant-menu-horizontal>.ant-menu-submenu .ant-menu-submenu-title:hover{background-color:transparent}.ant-menu-item-selected,.ant-menu-item-selected>a,.ant-menu-item-selected>a:hover{color:#1890ff}.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected{background-color:#e6f7ff}.ant-menu-inline,.ant-menu-vertical,.ant-menu-vertical-left{border-right:1px solid #e8e8e8}.ant-menu-vertical-right{border-left:1px solid #e8e8e8}.ant-menu-vertical-left.ant-menu-sub,.ant-menu-vertical-right.ant-menu-sub,.ant-menu-vertical.ant-menu-sub{min-width:160px;padding:0;border-right:0;-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}.ant-menu-vertical-left.ant-menu-sub .ant-menu-item,.ant-menu-vertical-right.ant-menu-sub .ant-menu-item,.ant-menu-vertical.ant-menu-sub .ant-menu-item{left:0;margin-left:0;border-right:0}.ant-menu-vertical-left.ant-menu-sub .ant-menu-item:after,.ant-menu-vertical-right.ant-menu-sub .ant-menu-item:after,.ant-menu-vertical.ant-menu-sub .ant-menu-item:after{border-right:0}.ant-menu-vertical-left.ant-menu-sub>.ant-menu-item,.ant-menu-vertical-left.ant-menu-sub>.ant-menu-submenu,.ant-menu-vertical-right.ant-menu-sub>.ant-menu-item,.ant-menu-vertical-right.ant-menu-sub>.ant-menu-submenu,.ant-menu-vertical.ant-menu-sub>.ant-menu-item,.ant-menu-vertical.ant-menu-sub>.ant-menu-submenu{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}.ant-menu-horizontal.ant-menu-sub{min-width:114px}.ant-menu-item,.ant-menu-submenu-titl
// exports
/***/ }),
/***/ 1126:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
__webpack_require__(28);
__webpack_require__(1129);
//# sourceMappingURL=css.js.map
/***/ }),
/***/ 1127:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _progress = _interopRequireDefault(__webpack_require__(1131));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _default = _progress["default"];
exports["default"] = _default;
//# sourceMappingURL=index.js.map
/***/ }),
/***/ 1129:
/***/ (function(module, exports, __webpack_require__) {
// style-loader: Adds some css to the DOM by adding a <style> tag
// load the styles
var content = __webpack_require__(1130);
if(typeof content === 'string') content = [[module.i, content, '']];
// Prepare cssTransformation
var transform;
var options = {"hmr":false}
options.transform = transform
// add the styles to the DOM
var update = __webpack_require__(313)(content, options);
if(content.locals) module.exports = content.locals;
/***/ }),
/***/ 1130:
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(312)(true);
// imports
// module
exports.push([module.i, ".ant-progress{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;color:rgba(0,0,0,.65);font-size:14px;font-variant:tabular-nums;line-height:1.5;list-style:none;-webkit-font-feature-settings:\"tnum\";font-feature-settings:\"tnum\";display:inline-block}.ant-progress-line{position:relative;width:100%;font-size:14px}.ant-progress-small.ant-progress-line,.ant-progress-small.ant-progress-line .ant-progress-text .anticon{font-size:12px}.ant-progress-outer{display:inline-block;width:100%;margin-right:0;padding-right:0}.ant-progress-show-info .ant-progress-outer{margin-right:calc(-2em - 8px);padding-right:calc(2em + 8px)}.ant-progress-inner{position:relative;display:inline-block;width:100%;overflow:hidden;vertical-align:middle;background-color:#f5f5f5;border-radius:100px}.ant-progress-circle-trail{stroke:#f5f5f5}.ant-progress-circle-path{-webkit-animation:ant-progress-appear .3s;animation:ant-progress-appear .3s}.ant-progress-inner:not(.ant-progress-circle-gradient) .ant-progress-circle-path{stroke:#1890ff}.ant-progress-bg,.ant-progress-success-bg{position:relative;background-color:#1890ff;border-radius:100px;-webkit-transition:all .4s cubic-bezier(.08,.82,.17,1) 0s;-o-transition:all .4s cubic-bezier(.08,.82,.17,1) 0s;transition:all .4s cubic-bezier(.08,.82,.17,1) 0s}.ant-progress-success-bg{position:absolute;top:0;left:0;background-color:#52c41a}.ant-progress-text{display:inline-block;width:2em;margin-left:8px;color:rgba(0,0,0,.45);font-size:1em;line-height:1;white-space:nowrap;text-align:left;vertical-align:middle;word-break:normal}.ant-progress-text .anticon{font-size:14px}.ant-progress-status-active .ant-progress-bg:before{position:absolute;top:0;right:0;bottom:0;left:0;background:#fff;border-radius:10px;opacity:0;-webkit-animation:ant-progress-active 2.4s cubic-bezier(.23,1,.32,1) infinite;animation:ant-progress-active 2.4s cubic-bezier(.23,1,.32,1) infinite;content:\"\"}.ant-progress-status-exception .ant-progress-bg{background-color:#f5222d}.ant-progress-status-exception .ant-progress-text{color:#f5222d}.ant-progress-status-exception .ant-progress-inner:not(.ant-progress-circle-gradient) .ant-progress-circle-path{stroke:#f5222d}.ant-progress-status-success .ant-progress-bg{background-color:#52c41a}.ant-progress-status-success .ant-progress-text{color:#52c41a}.ant-progress-status-success .ant-progress-inner:not(.ant-progress-circle-gradient) .ant-progress-circle-path{stroke:#52c41a}.ant-progress-circle .ant-progress-inner{position:relative;line-height:1;background-color:transparent}.ant-progress-circle .ant-progress-text{position:absolute;top:50%;left:50%;width:100%;margin:0;padding:0;color:rgba(0,0,0,.65);line-height:1;white-space:normal;text-align:center;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ant-progress-circle .ant-progress-text .anticon{font-size:1.16666667em}.ant-progress-circle.ant-progress-status-exception .ant-progress-text{color:#f5222d}.ant-progress-circle.ant-progress-status-success .ant-progress-text{color:#52c41a}@-webkit-keyframes ant-progress-active{0%{width:0;opacity:.1}20%{width:0;opacity:.5}to{width:100%;opacity:0}}@keyframes ant-progress-active{0%{width:0;opacity:.1}20%{width:0;opacity:.5}to{width:100%;opacity:0}}", "", {"version":3,"sources":["/Users/hs/edu/educoder/public/react/node_modules/antd/lib/progress/style/index.css"],"names":[],"mappings":"AAIA,cACE,8BAA+B,AACvB,sBAAuB,AAC/B,SAAU,AACV,UAAW,AACX,sBAA2B,AAC3B,eAAgB,AAChB,0BAA2B,AAC3B,gBAAiB,AACjB,gBAAiB,AACjB,qCAAsC,AAC9B,6BAA8B,AACtC,oBAAsB,CACvB,AACD,mBACE,kBAAmB,AACnB,WAAY,AACZ,cAAgB,CACjB,AACD,wGAEE,cAAgB,CACjB,AACD,oBACE,qBAAsB,AACtB,WAAY,AACZ,eAAgB,AAChB,eAAiB,CAClB,AACD,4CACE,8BAA+B,AAC/B,6BAA+B,CAChC,AACD,oBACE,kBAAmB,AACnB,qBAAsB,AACtB,WAAY,AACZ,gBAAiB,AACjB,sBAAuB,AACvB,yBAA0B,AAC1B,mBAAqB,CACtB,AACD,2BACE,cAAgB,CACjB,AACD,0BACE,0CAA4C,AACpC,iCAAoC,CAC7C,AACD,iFACE,cAAgB,CACjB,AACD,0CAEE,kBAAmB,AACnB,yBAA0B,AAC1B,oBAAqB,AACrB,0DAAkE,AAClE,qDAA6D,AAC7D,iDAA0D,CAC3D,AACD,yBACE,kBAAmB,AACnB,MAAO,AACP,OAAQ,AACR,wBAA0B,CAC3B,AACD
// exports
/***/ }),
/***/ 1131:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var PropTypes = _interopRequireWildcard(__webpack_require__(1));
var React = _interopRequireWildcard(__webpack_require__(0));
var _classnames = _interopRequireDefault(__webpack_require__(3));
var _omit = _interopRequireDefault(__webpack_require__(43));
var _icon = _interopRequireDefault(__webpack_require__(26));
var _configProvider = __webpack_require__(12);
var _type = __webpack_require__(70);
var _Line = _interopRequireDefault(__webpack_require__(1132));
var _Circle = _interopRequireDefault(__webpack_require__(1133));
var _utils = __webpack_require__(932);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _extends() { _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; }; return _extends.apply(this, arguments); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var __rest = void 0 && (void 0).__rest || function (s, e) {
var t = {};
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
var ProgressTypes = (0, _type.tuple)('line', 'circle', 'dashboard');
var ProgressStatuses = (0, _type.tuple)('normal', 'exception', 'active', 'success');
var Progress =
/*#__PURE__*/
function (_React$Component) {
_inherits(Progress, _React$Component);
function Progress() {
var _this;
_classCallCheck(this, Progress);
_this = _possibleConstructorReturn(this, _getPrototypeOf(Progress).apply(this, arguments));
_this.renderProgress = function (_ref) {
var _classNames;
var getPrefixCls = _ref.getPrefixCls;
var _assertThisInitialize = _assertThisInitialized(_this),
props = _assertThisInitialize.props;
var customizePrefixCls = props.prefixCls,
className = props.className,
size = props.size,
type = props.type,
showInfo = props.showInfo,
restProps = __rest(props, ["prefixCls", "className", "size", "type", "showInfo"]);
var prefixCls = getPrefixCls('progress', customizePrefixCls);
var progressStatus = _this.getProgressStatus();
var progressInfo = _this.renderProcessInfo(prefixCls, progressStatus);
var progress; // Render progress shape
if (type === 'line') {
progress = React.createElement(_Line["default"], _extends({}, _this.props, {
prefixCls: prefixCls
}), progressInfo);
} else if (type === 'circle' || type === 'dashboard') {
progress = React.createElement(_Circle["default"], _extends({}, _this.props, {
prefixCls: prefixCls,
progressStatus: progressStatus
}), progressInfo);
}
var classString = (0, _classnames["default"])(prefixCls, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-").concat(type === 'dashboard' && 'circle' || type), true), _defineProperty(_classNames, "".concat(prefixCls, "-status-").concat(progressStatus), true), _defineProperty(_classNames, "".concat(prefixCls, "-show-info"), showInfo), _defineProperty(_classNames, "".concat(prefixCls, "-").concat(size), size), _classNames), className);
return React.createElement("div", _extends({}, (0, _omit["default"])(restProps, ['status', 'format', 'trailColor', 'successPercent', 'strokeWidth', 'width', 'gapDegree', 'gapPosition', 'strokeColor', 'strokeLinecap', 'percent']), {
className: classString
}), progress);
};
return _this;
}
_createClass(Progress, [{
key: "getPercentNumber",
value: function getPercentNumber() {
var _this$props = this.props,
successPercent = _this$props.successPercent,
_this$props$percent = _this$props.percent,
percent = _this$props$percent === void 0 ? 0 : _this$props$percent;
return parseInt(successPercent !== undefined ? successPercent.toString() : percent.toString(), 10);
}
}, {
key: "getProgressStatus",
value: function getProgressStatus() {
var status = this.props.status;
if (ProgressStatuses.indexOf(status) < 0 && this.getPercentNumber() >= 100) {
return 'success';
}
return status || 'normal';
}
}, {
key: "renderProcessInfo",
value: function renderProcessInfo(prefixCls, progressStatus) {
var _this$props2 = this.props,
showInfo = _this$props2.showInfo,
format = _this$props2.format,
type = _this$props2.type,
percent = _this$props2.percent,
successPercent = _this$props2.successPercent;
if (!showInfo) return null;
var text;
var textFormatter = format || function (percentNumber) {
return "".concat(percentNumber, "%");
};
var iconType = type === 'circle' || type === 'dashboard' ? '' : '-circle';
if (format || progressStatus !== 'exception' && progressStatus !== 'success') {
text = textFormatter((0, _utils.validProgress)(percent), (0, _utils.validProgress)(successPercent));
} else if (progressStatus === 'exception') {
text = React.createElement(_icon["default"], {
type: "close".concat(iconType),
theme: type === 'line' ? 'filled' : 'outlined'
});
} else if (progressStatus === 'success') {
text = React.createElement(_icon["default"], {
type: "check".concat(iconType),
theme: type === 'line' ? 'filled' : 'outlined'
});
}
return React.createElement("span", {
className: "".concat(prefixCls, "-text"),
title: typeof text === 'string' ? text : undefined
}, text);
}
}, {
key: "render",
value: function render() {
return React.createElement(_configProvider.ConfigConsumer, null, this.renderProgress);
}
}]);
return Progress;
}(React.Component);
exports["default"] = Progress;
Progress.defaultProps = {
type: 'line',
percent: 0,
showInfo: true,
trailColor: '#f3f3f3',
size: 'default',
gapDegree: 0,
strokeLinecap: 'round'
};
Progress.propTypes = {
status: PropTypes.oneOf(ProgressStatuses),
type: PropTypes.oneOf(ProgressTypes),
showInfo: PropTypes.bool,
percent: PropTypes.number,
width: PropTypes.number,
strokeWidth: PropTypes.number,
strokeLinecap: PropTypes.oneOf(['round', 'square']),
strokeColor: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),
trailColor: PropTypes.string,
format: PropTypes.func,
gapDegree: PropTypes.number
};
//# sourceMappingURL=progress.js.map
/***/ }),
/***/ 1132:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = exports.handleGradient = exports.sortGradient = void 0;
var React = _interopRequireWildcard(__webpack_require__(0));
var _utils = __webpack_require__(932);
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _extends() { _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; }; return _extends.apply(this, arguments); }
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
var __rest = void 0 && (void 0).__rest || function (s, e) {
var t = {};
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
/**
* {
* '0%': '#afc163',
* '75%': '#009900',
* '50%': 'green', ====> '#afc163 0%, #66FF00 25%, #00CC00 50%, #009900 75%, #ffffff 100%'
* '25%': '#66FF00',
* '100%': '#ffffff'
* }
*/
var sortGradient = function sortGradient(gradients) {
var tempArr = []; // eslint-disable-next-line no-restricted-syntax
for (var _i = 0, _Object$entries = Object.entries(gradients); _i < _Object$entries.length; _i++) {
var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
key = _Object$entries$_i[0],
value = _Object$entries$_i[1];
var formatKey = parseFloat(key.replace(/%/g, ''));
if (isNaN(formatKey)) {
return {};
}
tempArr.push({
key: formatKey,
value: value
});
}
tempArr = tempArr.sort(function (a, b) {
return a.key - b.key;
});
return tempArr.map(function (_ref) {
var key = _ref.key,
value = _ref.value;
return "".concat(value, " ").concat(key, "%");
}).join(', ');
};
/**
* {
* '0%': '#afc163',
* '25%': '#66FF00',
* '50%': '#00CC00', ====> linear-gradient(to right, #afc163 0%, #66FF00 25%,
* '75%': '#009900', #00CC00 50%, #009900 75%, #ffffff 100%)
* '100%': '#ffffff'
* }
*
* Then this man came to realize the truth:
* Besides six pence, there is the moon.
* Besides bread and butter, there is the bug.
* And...
* Besides women, there is the code.
*/
exports.sortGradient = sortGradient;
var handleGradient = function handleGradient(strokeColor) {
var _strokeColor$from = strokeColor.from,
from = _strokeColor$from === void 0 ? '#1890ff' : _strokeColor$from,
_strokeColor$to = strokeColor.to,
to = _strokeColor$to === void 0 ? '#1890ff' : _strokeColor$to,
_strokeColor$directio = strokeColor.direction,
direction = _strokeColor$directio === void 0 ? 'to right' : _strokeColor$directio,
rest = __rest(strokeColor, ["from", "to", "direction"]);
if (Object.keys(rest).length !== 0) {
var sortedGradients = sortGradient(rest);
return {
backgroundImage: "linear-gradient(".concat(direction, ", ").concat(sortedGradients, ")")
};
}
return {
backgroundImage: "linear-gradient(".concat(direction, ", ").concat(from, ", ").concat(to, ")")
};
};
exports.handleGradient = handleGradient;
var Line = function Line(props) {
var prefixCls = props.prefixCls,
percent = props.percent,
successPercent = props.successPercent,
strokeWidth = props.strokeWidth,
size = props.size,
strokeColor = props.strokeColor,
strokeLinecap = props.strokeLinecap,
children = props.children;
var backgroundProps;
if (strokeColor && typeof strokeColor !== 'string') {
backgroundProps = handleGradient(strokeColor);
} else {
backgroundProps = {
background: strokeColor
};
}
var percentStyle = _extends({
width: "".concat((0, _utils.validProgress)(percent), "%"),
height: strokeWidth || (size === 'small' ? 6 : 8),
borderRadius: strokeLinecap === 'square' ? 0 : ''
}, backgroundProps);
var successPercentStyle = {
width: "".concat((0, _utils.validProgress)(successPercent), "%"),
height: strokeWidth || (size === 'small' ? 6 : 8),
borderRadius: strokeLinecap === 'square' ? 0 : ''
};
var successSegment = successPercent !== undefined ? React.createElement("div", {
className: "".concat(prefixCls, "-success-bg"),
style: successPercentStyle
}) : null;
return React.createElement("div", null, React.createElement("div", {
className: "".concat(prefixCls, "-outer")
}, React.createElement("div", {
className: "".concat(prefixCls, "-inner")
}, React.createElement("div", {
className: "".concat(prefixCls, "-bg"),
style: percentStyle
}), successSegment)), children);
};
var _default = Line;
exports["default"] = _default;
//# sourceMappingURL=Line.js.map
/***/ }),
/***/ 1133:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(__webpack_require__(0));
var _rcProgress = __webpack_require__(1134);
var _classnames = _interopRequireDefault(__webpack_require__(3));
var _utils = __webpack_require__(932);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var statusColorMap = {
normal: '#108ee9',
exception: '#ff5500',
success: '#87d068'
};
function getPercentage(_ref) {
var percent = _ref.percent,
successPercent = _ref.successPercent;
var ptg = (0, _utils.validProgress)(percent);
if (!successPercent) {
return ptg;
}
var successPtg = (0, _utils.validProgress)(successPercent);
return [successPercent, (0, _utils.validProgress)(ptg - successPtg)];
}
function getStrokeColor(_ref2) {
var progressStatus = _ref2.progressStatus,
successPercent = _ref2.successPercent,
strokeColor = _ref2.strokeColor;
var color = strokeColor || statusColorMap[progressStatus];
if (!successPercent) {
return color;
}
return [statusColorMap.success, color];
}
var Circle = function Circle(props) {
var prefixCls = props.prefixCls,
width = props.width,
strokeWidth = props.strokeWidth,
trailColor = props.trailColor,
strokeLinecap = props.strokeLinecap,
gapPosition = props.gapPosition,
gapDegree = props.gapDegree,
type = props.type,
children = props.children;
var circleSize = width || 120;
var circleStyle = {
width: circleSize,
height: circleSize,
fontSize: circleSize * 0.15 + 6
};
var circleWidth = strokeWidth || 6;
var gapPos = gapPosition || type === 'dashboard' && 'bottom' || 'top';
var gapDeg = gapDegree || (type === 'dashboard' ? 75 : undefined);
var strokeColor = getStrokeColor(props);
var isGradient = Object.prototype.toString.call(strokeColor) === '[object Object]';
var wrapperClassName = (0, _classnames["default"])("".concat(prefixCls, "-inner"), _defineProperty({}, "".concat(prefixCls, "-circle-gradient"), isGradient));
return React.createElement("div", {
className: wrapperClassName,
style: circleStyle
}, React.createElement(_rcProgress.Circle, {
percent: getPercentage(props),
strokeWidth: circleWidth,
trailWidth: circleWidth,
strokeColor: strokeColor,
strokeLinecap: strokeLinecap,
trailColor: trailColor,
prefixCls: prefixCls,
gapDegree: gapDeg,
gapPosition: gapPos
}), children);
};
var _default = Circle;
exports["default"] = _default;
//# sourceMappingURL=Circle.js.map
/***/ }),
/***/ 1134:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Line__ = __webpack_require__(1135);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Circle__ = __webpack_require__(1136);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Line", function() { return __WEBPACK_IMPORTED_MODULE_0__Line__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Circle", function() { return __WEBPACK_IMPORTED_MODULE_1__Circle__["a"]; });
/* harmony default export */ __webpack_exports__["default"] = ({
Line: __WEBPACK_IMPORTED_MODULE_0__Line__["a" /* default */],
Circle: __WEBPACK_IMPORTED_MODULE_1__Circle__["a" /* default */]
});
/***/ }),
/***/ 1135:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__enhancer__ = __webpack_require__(990);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__types__ = __webpack_require__(991);
function _extends() { _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; }; return _extends.apply(this, arguments); }
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; 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 _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var Line =
/*#__PURE__*/
function (_Component) {
_inherits(Line, _Component);
function Line() {
var _getPrototypeOf2;
var _this;
_classCallCheck(this, Line);
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Line)).call.apply(_getPrototypeOf2, [this].concat(args)));
_defineProperty(_assertThisInitialized(_this), "paths", {});
return _this;
}
_createClass(Line, [{
key: "render",
value: function render() {
var _this2 = this;
var _this$props = this.props,
className = _this$props.className,
percent = _this$props.percent,
prefixCls = _this$props.prefixCls,
strokeColor = _this$props.strokeColor,
strokeLinecap = _this$props.strokeLinecap,
strokeWidth = _this$props.strokeWidth,
style = _this$props.style,
trailColor = _this$props.trailColor,
trailWidth = _this$props.trailWidth,
transition = _this$props.transition,
restProps = _objectWithoutProperties(_this$props, ["className", "percent", "prefixCls", "strokeColor", "strokeLinecap", "strokeWidth", "style", "trailColor", "trailWidth", "transition"]);
delete restProps.gapPosition;
var percentList = Array.isArray(percent) ? percent : [percent];
var strokeColorList = Array.isArray(strokeColor) ? strokeColor : [strokeColor];
var center = strokeWidth / 2;
var right = 100 - strokeWidth / 2;
var pathString = "M ".concat(strokeLinecap === 'round' ? center : 0, ",").concat(center, "\n L ").concat(strokeLinecap === 'round' ? right : 100, ",").concat(center);
var viewBoxString = "0 0 100 ".concat(strokeWidth);
var stackPtg = 0;
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("svg", _extends({
className: "".concat(prefixCls, "-line ").concat(className),
viewBox: viewBoxString,
preserveAspectRatio: "none",
style: style
}, restProps), __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("path", {
className: "".concat(prefixCls, "-line-trail"),
d: pathString,
strokeLinecap: strokeLinecap,
stroke: trailColor,
strokeWidth: trailWidth || strokeWidth,
fillOpacity: "0"
}), percentList.map(function (ptg, index) {
var pathStyle = {
strokeDasharray: "".concat(ptg, "px, 100px"),
strokeDashoffset: "-".concat(stackPtg, "px"),
transition: transition || 'stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear'
};
var color = strokeColorList[index] || strokeColorList[strokeColorList.length - 1];
stackPtg += ptg;
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("path", {
key: index,
className: "".concat(prefixCls, "-line-path"),
d: pathString,
strokeLinecap: strokeLinecap,
stroke: color,
strokeWidth: strokeWidth,
fillOpacity: "0",
ref: function ref(path) {
_this2.paths[index] = path;
},
style: pathStyle
});
}));
}
}]);
return Line;
}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);
Line.propTypes = __WEBPACK_IMPORTED_MODULE_2__types__["b" /* propTypes */];
Line.defaultProps = __WEBPACK_IMPORTED_MODULE_2__types__["a" /* defaultProps */];
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_1__enhancer__["a" /* default */])(Line));
/***/ }),
/***/ 1136:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__enhancer__ = __webpack_require__(990);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__types__ = __webpack_require__(991);
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _extends() { _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; }; return _extends.apply(this, arguments); }
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; 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 _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
/* eslint react/prop-types: 0 */
var gradientSeed = 0;
function stripPercentToNumber(percent) {
return +percent.replace('%', '');
}
function toArray(symArray) {
return Array.isArray(symArray) ? symArray : [symArray];
}
function getPathStyles(offset, percent, strokeColor, strokeWidth) {
var gapDegree = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
var gapPosition = arguments.length > 5 ? arguments[5] : undefined;
var radius = 50 - strokeWidth / 2;
var beginPositionX = 0;
var beginPositionY = -radius;
var endPositionX = 0;
var endPositionY = -2 * radius;
switch (gapPosition) {
case 'left':
beginPositionX = -radius;
beginPositionY = 0;
endPositionX = 2 * radius;
endPositionY = 0;
break;
case 'right':
beginPositionX = radius;
beginPositionY = 0;
endPositionX = -2 * radius;
endPositionY = 0;
break;
case 'bottom':
beginPositionY = radius;
endPositionY = 2 * radius;
break;
default:
}
var pathString = "M 50,50 m ".concat(beginPositionX, ",").concat(beginPositionY, "\n a ").concat(radius, ",").concat(radius, " 0 1 1 ").concat(endPositionX, ",").concat(-endPositionY, "\n a ").concat(radius, ",").concat(radius, " 0 1 1 ").concat(-endPositionX, ",").concat(endPositionY);
var len = Math.PI * 2 * radius;
var pathStyle = {
stroke: strokeColor,
strokeDasharray: "".concat(percent / 100 * (len - gapDegree), "px ").concat(len, "px"),
strokeDashoffset: "-".concat(gapDegree / 2 + offset / 100 * (len - gapDegree), "px"),
transition: 'stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s' // eslint-disable-line
};
return {
pathString: pathString,
pathStyle: pathStyle
};
}
var Circle =
/*#__PURE__*/
function (_Component) {
_inherits(Circle, _Component);
function Circle() {
var _this;
_classCallCheck(this, Circle);
_this = _possibleConstructorReturn(this, _getPrototypeOf(Circle).call(this));
_defineProperty(_assertThisInitialized(_this), "paths", {});
_defineProperty(_assertThisInitialized(_this), "gradientId", 0);
_this.gradientId = gradientSeed;
gradientSeed += 1;
return _this;
}
_createClass(Circle, [{
key: "getStokeList",
value: function getStokeList() {
var _this2 = this;
var _this$props = this.props,
prefixCls = _this$props.prefixCls,
percent = _this$props.percent,
strokeColor = _this$props.strokeColor,
strokeWidth = _this$props.strokeWidth,
strokeLinecap = _this$props.strokeLinecap,
gapDegree = _this$props.gapDegree,
gapPosition = _this$props.gapPosition;
var percentList = toArray(percent);
var strokeColorList = toArray(strokeColor);
var stackPtg = 0;
return percentList.map(function (ptg, index) {
var color = strokeColorList[index] || strokeColorList[strokeColorList.length - 1];
var stroke = Object.prototype.toString.call(color) === '[object Object]' ? "url(#".concat(prefixCls, "-gradient-").concat(_this2.gradientId, ")") : '';
var _getPathStyles = getPathStyles(stackPtg, ptg, color, strokeWidth, gapDegree, gapPosition),
pathString = _getPathStyles.pathString,
pathStyle = _getPathStyles.pathStyle;
stackPtg += ptg;
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("path", {
key: index,
className: "".concat(prefixCls, "-circle-path"),
d: pathString,
stroke: stroke,
strokeLinecap: strokeLinecap,
strokeWidth: ptg === 0 ? 0 : strokeWidth,
fillOpacity: "0",
style: pathStyle,
ref: function ref(path) {
_this2.paths[index] = path;
}
});
});
}
}, {
key: "render",
value: function render() {
var _this$props2 = this.props,
prefixCls = _this$props2.prefixCls,
strokeWidth = _this$props2.strokeWidth,
trailWidth = _this$props2.trailWidth,
gapDegree = _this$props2.gapDegree,
gapPosition = _this$props2.gapPosition,
trailColor = _this$props2.trailColor,
strokeLinecap = _this$props2.strokeLinecap,
style = _this$props2.style,
className = _this$props2.className,
strokeColor = _this$props2.strokeColor,
restProps = _objectWithoutProperties(_this$props2, ["prefixCls", "strokeWidth", "trailWidth", "gapDegree", "gapPosition", "trailColor", "strokeLinecap", "style", "className", "strokeColor"]);
var _getPathStyles2 = getPathStyles(0, 100, trailColor, strokeWidth, gapDegree, gapPosition),
pathString = _getPathStyles2.pathString,
pathStyle = _getPathStyles2.pathStyle;
delete restProps.percent;
var strokeColorList = toArray(strokeColor);
var gradient = strokeColorList.find(function (color) {
return Object.prototype.toString.call(color) === '[object Object]';
});
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("svg", _extends({
className: "".concat(prefixCls, "-circle ").concat(className),
viewBox: "0 0 100 100",
style: style
}, restProps), gradient && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("defs", null, __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("linearGradient", {
id: "".concat(prefixCls, "-gradient-").concat(this.gradientId),
x1: "100%",
y1: "0%",
x2: "0%",
y2: "0%"
}, Object.keys(gradient).sort(function (a, b) {
return stripPercentToNumber(a) - stripPercentToNumber(b);
}).map(function (key, index) {
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("stop", {
key: index,
offset: key,
stopColor: gradient[key]
});
}))), __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("path", {
className: "".concat(prefixCls, "-circle-trail"),
d: pathString,
stroke: trailColor,
strokeLinecap: strokeLinecap,
strokeWidth: trailWidth || strokeWidth,
fillOpacity: "0",
style: pathStyle
}), this.getStokeList().reverse());
}
}]);
return Circle;
}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);
Circle.propTypes = _objectSpread({}, __WEBPACK_IMPORTED_MODULE_3__types__["b" /* propTypes */], {
gapPosition: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOf(['top', 'bottom', 'left', 'right'])
});
Circle.defaultProps = _objectSpread({}, __WEBPACK_IMPORTED_MODULE_3__types__["a" /* defaultProps */], {
gapPosition: 'top'
});
/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_2__enhancer__["a" /* default */])(Circle));
/***/ }),
/***/ 1137:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.PresetColorTypes = void 0;
var _type = __webpack_require__(70);
// eslint-disable-next-line import/prefer-default-export
var PresetColorTypes = (0, _type.tuple)('pink', 'red', 'yellow', 'orange', 'cyan', 'green', 'blue', 'purple', 'geekblue', 'magenta', 'volcano', 'gold', 'lime');
exports.PresetColorTypes = PresetColorTypes;
//# sourceMappingURL=colors.js.map
/***/ }),
/***/ 1138:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _defineProperty2 = __webpack_require__(59);
var _defineProperty3 = _interopRequireDefault(_defineProperty2);
exports.toArray = toArray;
exports.getActiveIndex = getActiveIndex;
exports.getActiveKey = getActiveKey;
exports.setTransform = setTransform;
exports.isTransform3dSupported = isTransform3dSupported;
exports.setTransition = setTransition;
exports.getTransformPropValue = getTransformPropValue;
exports.isVertical = isVertical;
exports.getTransformByIndex = getTransformByIndex;
exports.getMarginStyle = getMarginStyle;
exports.getStyle = getStyle;
exports.setPxStyle = setPxStyle;
exports.getDataAttr = getDataAttr;
exports.getLeft = getLeft;
exports.getTop = getTop;
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function toArray(children) {
// allow [c,[a,b]]
var c = [];
_react2['default'].Children.forEach(children, function (child) {
if (child) {
c.push(child);
}
});
return c;
}
function getActiveIndex(children, activeKey) {
var c = toArray(children);
for (var i = 0; i < c.length; i++) {
if (c[i].key === activeKey) {
return i;
}
}
return -1;
}
function getActiveKey(children, index) {
var c = toArray(children);
return c[index].key;
}
function setTransform(style, v) {
style.transform = v;
style.webkitTransform = v;
style.mozTransform = v;
}
function isTransform3dSupported(style) {
return ('transform' in style || 'webkitTransform' in style || 'MozTransform' in style) && window.atob;
}
function setTransition(style, v) {
style.transition = v;
style.webkitTransition = v;
style.MozTransition = v;
}
function getTransformPropValue(v) {
return {
transform: v,
WebkitTransform: v,
MozTransform: v
};
}
function isVertical(tabBarPosition) {
return tabBarPosition === 'left' || tabBarPosition === 'right';
}
function getTransformByIndex(index, tabBarPosition) {
var direction = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'ltr';
var translate = isVertical(tabBarPosition) ? 'translateY' : 'translateX';
if (!isVertical(tabBarPosition) && direction === 'rtl') {
return translate + '(' + index * 100 + '%) translateZ(0)';
}
return translate + '(' + -index * 100 + '%) translateZ(0)';
}
function getMarginStyle(index, tabBarPosition) {
var marginDirection = isVertical(tabBarPosition) ? 'marginTop' : 'marginLeft';
return (0, _defineProperty3['default'])({}, marginDirection, -index * 100 + '%');
}
function getStyle(el, property) {
return +window.getComputedStyle(el).getPropertyValue(property).replace('px', '');
}
function setPxStyle(el, value, vertical) {
value = vertical ? '0px, ' + value + 'px, 0px' : value + 'px, 0px, 0px';
setTransform(el.style, 'translate3d(' + value + ')');
}
function getDataAttr(props) {
return Object.keys(props).reduce(function (prev, key) {
if (key.substr(0, 5) === 'aria-' || key.substr(0, 5) === 'data-' || key === 'role') {
prev[key] = props[key];
}
return prev;
}, {});
}
function toNum(style, property) {
return +style.getPropertyValue(property).replace('px', '');
}
function getTypeValue(start, current, end, tabNode, wrapperNode) {
var total = getStyle(wrapperNode, 'padding-' + start);
if (!tabNode || !tabNode.parentNode) {
return total;
}
var childNodes = tabNode.parentNode.childNodes;
Array.prototype.some.call(childNodes, function (node) {
var style = window.getComputedStyle(node);
if (node !== tabNode) {
total += toNum(style, 'margin-' + start);
total += node[current];
total += toNum(style, 'margin-' + end);
if (style.boxSizing === 'content-box') {
total += toNum(style, 'border-' + start + '-width') + toNum(style, 'border-' + end + '-width');
}
return false;
}
// We need count current node margin
// ref: https://github.com/react-component/tabs/pull/139#issuecomment-431005262
total += toNum(style, 'margin-' + start);
return true;
});
return total;
}
function getLeft(tabNode, wrapperNode) {
return getTypeValue('left', 'offsetWidth', 'right', tabNode, wrapperNode);
}
function getTop(tabNode, wrapperNode) {
return getTypeValue('top', 'offsetHeight', 'bottom', tabNode, wrapperNode);
}
/***/ }),
/***/ 1139:
/***/ (function(module, exports, __webpack_require__) {
var assignValue = __webpack_require__(1226),
baseAssignValue = __webpack_require__(984);
/**
* Copies properties of `source` to `object`.
*
* @private
* @param {Object} source The object to copy properties from.
* @param {Array} props The property identifiers to copy.
* @param {Object} [object={}] The object to copy properties to.
* @param {Function} [customizer] The function to customize copied values.
* @returns {Object} Returns `object`.
*/
function copyObject(source, props, object, customizer) {
var isNew = !object;
object || (object = {});
var index = -1,
length = props.length;
while (++index < length) {
var key = props[index];
var newValue = customizer
? customizer(object[key], source[key], key, object, source)
: undefined;
if (newValue === undefined) {
newValue = source[key];
}
if (isNew) {
baseAssignValue(object, key, newValue);
} else {
assignValue(object, key, newValue);
}
}
return object;
}
module.exports = copyObject;
/***/ }),
/***/ 1140:
/***/ (function(module, exports, __webpack_require__) {
var isSymbol = __webpack_require__(330);
/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0;
/**
* Converts `value` to a string key if it's not a string or symbol.
*
* @private
* @param {*} value The value to inspect.
* @returns {string|symbol} Returns the key.
*/
function toKey(value) {
if (typeof value == 'string' || isSymbol(value)) {
return value;
}
var result = (value + '');
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
}
module.exports = toKey;
/***/ }),
/***/ 1143:
/***/ (function(module, exports, __webpack_require__) {
var toFinite = __webpack_require__(1146);
/**
* Converts `value` to an integer.
*
* **Note:** This method is loosely based on
* [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to convert.
* @returns {number} Returns the converted integer.
* @example
*
* _.toInteger(3.2);
* // => 3
*
* _.toInteger(Number.MIN_VALUE);
* // => 0
*
* _.toInteger(Infinity);
* // => 1.7976931348623157e+308
*
* _.toInteger('3.2');
* // => 3
*/
function toInteger(value) {
var result = toFinite(value),
remainder = result % 1;
return result === result ? (remainder ? result - remainder : result) : 0;
}
module.exports = toInteger;
/***/ }),
/***/ 1145:
/***/ (function(module, exports) {
/**
* The base implementation of `_.property` without support for deep paths.
*
* @private
* @param {string} key The key of the property to get.
* @returns {Function} Returns the new accessor function.
*/
function baseProperty(key) {
return function(object) {
return object == null ? undefined : object[key];
};
}
module.exports = baseProperty;
/***/ }),
/***/ 1146:
/***/ (function(module, exports, __webpack_require__) {
var toNumber = __webpack_require__(337);
/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0,
MAX_INTEGER = 1.7976931348623157e+308;
/**
* Converts `value` to a finite number.
*
* @static
* @memberOf _
* @since 4.12.0
* @category Lang
* @param {*} value The value to convert.
* @returns {number} Returns the converted number.
* @example
*
* _.toFinite(3.2);
* // => 3.2
*
* _.toFinite(Number.MIN_VALUE);
* // => 5e-324
*
* _.toFinite(Infinity);
* // => 1.7976931348623157e+308
*
* _.toFinite('3.2');
* // => 3.2
*/
function toFinite(value) {
if (!value) {
return value === 0 ? value : 0;
}
value = toNumber(value);
if (value === INFINITY || value === -INFINITY) {
var sign = (value < 0 ? -1 : 1);
return sign * MAX_INTEGER;
}
return value === value ? value : 0;
}
module.exports = toFinite;
/***/ }),
/***/ 1148:
/***/ (function(module, exports, __webpack_require__) {
var ListCache = __webpack_require__(918),
stackClear = __webpack_require__(1259),
stackDelete = __webpack_require__(1260),
stackGet = __webpack_require__(1261),
stackHas = __webpack_require__(1262),
stackSet = __webpack_require__(1263);
/**
* Creates a stack cache object to store key-value pairs.
*
* @private
* @constructor
* @param {Array} [entries] The key-value pairs to cache.
*/
function Stack(entries) {
var data = this.__data__ = new ListCache(entries);
this.size = data.size;
}
// Add methods to `Stack`.
Stack.prototype.clear = stackClear;
Stack.prototype['delete'] = stackDelete;
Stack.prototype.get = stackGet;
Stack.prototype.has = stackHas;
Stack.prototype.set = stackSet;
module.exports = Stack;
/***/ }),
/***/ 1149:
/***/ (function(module, exports, __webpack_require__) {
var Uint8Array = __webpack_require__(1231);
/**
* Creates a clone of `arrayBuffer`.
*
* @private
* @param {ArrayBuffer} arrayBuffer The array buffer to clone.
* @returns {ArrayBuffer} Returns the cloned array buffer.
*/
function cloneArrayBuffer(arrayBuffer) {
var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
new Uint8Array(result).set(new Uint8Array(arrayBuffer));
return result;
}
module.exports = cloneArrayBuffer;
/***/ }),
/***/ 1150:
/***/ (function(module, exports) {
/**
* The base implementation of `_.unary` without support for storing metadata.
*
* @private
* @param {Function} func The function to cap arguments for.
* @returns {Function} Returns the new capped function.
*/
function baseUnary(func) {
return function(value) {
return func(value);
};
}
module.exports = baseUnary;
/***/ }),
/***/ 1151:
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(module) {var freeGlobal = __webpack_require__(344);
/** Detect free variable `exports`. */
var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
/** Detect free variable `module`. */
var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
/** Detect the popular CommonJS extension `module.exports`. */
var moduleExports = freeModule && freeModule.exports === freeExports;
/** Detect free variable `process` from Node.js. */
var freeProcess = moduleExports && freeGlobal.process;
/** Used to access faster Node.js helpers. */
var nodeUtil = (function() {
try {
// Use `util.types` for Node.js 10+.
var types = freeModule && freeModule.require && freeModule.require('util').types;
if (types) {
return types;
}
// Legacy `process.binding('util')` for Node.js < 10.
return freeProcess && freeProcess.binding && freeProcess.binding('util');
} catch (e) {}
}());
module.exports = nodeUtil;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(321)(module)))
/***/ }),
/***/ 1152:
/***/ (function(module, exports, __webpack_require__) {
var isArray = __webpack_require__(895),
isSymbol = __webpack_require__(330);
/** Used to match property names within property paths. */
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
reIsPlainProp = /^\w*$/;
/**
* Checks if `value` is a property name and not a property path.
*
* @private
* @param {*} value The value to check.
* @param {Object} [object] The object to query keys on.
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
*/
function isKey(value, object) {
if (isArray(value)) {
return false;
}
var type = typeof value;
if (type == 'number' || type == 'symbol' || type == 'boolean' ||
value == null || isSymbol(value)) {
return true;
}
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
(object != null && value in Object(object));
}
module.exports = isKey;
/***/ }),
/***/ 1153:
/***/ (function(module, exports, __webpack_require__) {
// style-loader: Adds some css to the DOM by adding a <style> tag
// load the styles
var content = __webpack_require__(1154);
if(typeof content === 'string') content = [[module.i, content, '']];
// Prepare cssTransformation
var transform;
var options = {"hmr":false}
options.transform = transform
// add the styles to the DOM
var update = __webpack_require__(313)(content, options);
if(content.locals) module.exports = content.locals;
/***/ }),
/***/ 1154:
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(312)(true);
// imports
// module
exports.push([module.i, ".ant-upload{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;color:rgba(0,0,0,.65);font-size:14px;font-variant:tabular-nums;line-height:1.5;list-style:none;-webkit-font-feature-settings:\"tnum\";font-feature-settings:\"tnum\";outline:0}.ant-upload p{margin:0}.ant-upload-btn{display:block;width:100%;outline:none}.ant-upload input[type=file]{cursor:pointer}.ant-upload.ant-upload-select{display:inline-block}.ant-upload.ant-upload-disabled{cursor:not-allowed}.ant-upload.ant-upload-select-picture-card{display:table;float:left;width:104px;height:104px;margin-right:8px;margin-bottom:8px;text-align:center;vertical-align:top;background-color:#fafafa;border:1px dashed #d9d9d9;border-radius:4px;cursor:pointer;-webkit-transition:border-color .3s ease;-o-transition:border-color .3s ease;transition:border-color .3s ease}.ant-upload.ant-upload-select-picture-card>.ant-upload{display:table-cell;width:100%;height:100%;padding:8px;text-align:center;vertical-align:middle}.ant-upload.ant-upload-select-picture-card:hover{border-color:#1890ff}.ant-upload.ant-upload-drag{position:relative;width:100%;height:100%;text-align:center;background:#fafafa;border:1px dashed #d9d9d9;border-radius:4px;cursor:pointer;-webkit-transition:border-color .3s;-o-transition:border-color .3s;transition:border-color .3s}.ant-upload.ant-upload-drag .ant-upload{padding:16px 0}.ant-upload.ant-upload-drag.ant-upload-drag-hover:not(.ant-upload-disabled){border-color:#096dd9}.ant-upload.ant-upload-drag.ant-upload-disabled{cursor:not-allowed}.ant-upload.ant-upload-drag .ant-upload-btn{display:table;height:100%}.ant-upload.ant-upload-drag .ant-upload-drag-container{display:table-cell;vertical-align:middle}.ant-upload.ant-upload-drag:not(.ant-upload-disabled):hover{border-color:#40a9ff}.ant-upload.ant-upload-drag p.ant-upload-drag-icon{margin-bottom:20px}.ant-upload.ant-upload-drag p.ant-upload-drag-icon .anticon{color:#40a9ff;font-size:48px}.ant-upload.ant-upload-drag p.ant-upload-text{margin:0 0 4px;color:rgba(0,0,0,.85);font-size:16px}.ant-upload.ant-upload-drag p.ant-upload-hint{color:rgba(0,0,0,.45);font-size:14px}.ant-upload.ant-upload-drag .anticon-plus{color:rgba(0,0,0,.25);font-size:30px;-webkit-transition:all .3s;-o-transition:all .3s;transition:all .3s}.ant-upload.ant-upload-drag .anticon-plus:hover,.ant-upload.ant-upload-drag:hover .anticon-plus{color:rgba(0,0,0,.45)}.ant-upload-picture-card-wrapper{zoom:1;display:inline-block;width:100%}.ant-upload-picture-card-wrapper:after,.ant-upload-picture-card-wrapper:before{display:table;content:\"\"}.ant-upload-picture-card-wrapper:after{clear:both}.ant-upload-list{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;color:rgba(0,0,0,.65);font-size:14px;font-variant:tabular-nums;line-height:1.5;list-style:none;-webkit-font-feature-settings:\"tnum\";font-feature-settings:\"tnum\";zoom:1}.ant-upload-list:after,.ant-upload-list:before{display:table;content:\"\"}.ant-upload-list:after{clear:both}.ant-upload-list-item-list-type-text:hover .ant-upload-list-item-name-icon-count-1{padding-right:14px}.ant-upload-list-item-list-type-text:hover .ant-upload-list-item-name-icon-count-2{padding-right:28px}.ant-upload-list-item{position:relative;height:22px;margin-top:8px;font-size:14px}.ant-upload-list-item-name{display:inline-block;width:100%;padding-left:22px;overflow:hidden;white-space:nowrap;-o-text-overflow:ellipsis;text-overflow:ellipsis}.ant-upload-list-item-name-icon-count-1{padding-right:14px}.ant-upload-list-item-card-actions{position:absolute;right:0;opacity:0}.ant-upload-list-item-card-actions.picture{top:25px;line-height:1;opacity:1}.ant-upload-list-item-card-actions .anticon{padding-right:5px;color:rgba(0,0,0,.45)}.ant-upload-list-item-info{height:100%;padding:0 12px 0 4px;-webkit-transition:background-color .3s;-o-transition:background-color .3s;transition:background-color .3s}.ant-upload-list-item-info>span{display:block;width:100%;height:100%}.ant-upload-list-item-info .anticon-loading,.ant-upload-list-item-info .anticon-paper-clip{position:absolute;to
// exports
/***/ }),
/***/ 1155:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Upload__ = __webpack_require__(1156);
// export this package's api
/* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__Upload__["a" /* default */]);
/***/ }),
/***/ 1156:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(18);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__ = __webpack_require__(9);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass__ = __webpack_require__(31);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(10);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(11);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__AjaxUploader__ = __webpack_require__(1157);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__IframeUploader__ = __webpack_require__(1161);
function empty() {}
var Upload = function (_Component) {
__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(Upload, _Component);
function Upload() {
var _ref;
var _temp, _this, _ret;
__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default()(this, Upload);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, (_ref = Upload.__proto__ || Object.getPrototypeOf(Upload)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
Component: null
}, _this.saveUploader = function (node) {
_this.uploader = node;
}, _temp), __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(_this, _ret);
}
__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass___default()(Upload, [{
key: 'componentDidMount',
value: function componentDidMount() {
if (this.props.supportServerRender) {
/* eslint react/no-did-mount-set-state:0 */
this.setState({
Component: this.getComponent()
}, this.props.onReady);
}
}
}, {
key: 'getComponent',
value: function getComponent() {
return typeof File !== 'undefined' ? __WEBPACK_IMPORTED_MODULE_7__AjaxUploader__["a" /* default */] : __WEBPACK_IMPORTED_MODULE_8__IframeUploader__["a" /* default */];
}
}, {
key: 'abort',
value: function abort(file) {
this.uploader.abort(file);
}
}, {
key: 'render',
value: function render() {
if (this.props.supportServerRender) {
var _ComponentUploader = this.state.Component;
if (_ComponentUploader) {
return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(_ComponentUploader, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, this.props, { ref: this.saveUploader }));
}
return null;
}
var ComponentUploader = this.getComponent();
return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(ComponentUploader, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, this.props, { ref: this.saveUploader }));
}
}]);
return Upload;
}(__WEBPACK_IMPORTED_MODULE_5_react__["Component"]);
Upload.propTypes = {
component: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
style: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.object,
prefixCls: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
action: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func]),
name: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
multipart: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,
directory: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,
onError: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
onSuccess: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
onProgress: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
onStart: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
data: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.object, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func]),
headers: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.object,
accept: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
multiple: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,
disabled: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,
beforeUpload: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
customRequest: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
onReady: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
withCredentials: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,
supportServerRender: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,
openFileDialogOnClick: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool
};
Upload.defaultProps = {
component: 'span',
prefixCls: 'rc-upload',
data: {},
headers: {},
name: 'file',
multipart: false,
onReady: empty,
onStart: empty,
onError: empty,
onSuccess: empty,
supportServerRender: false,
multiple: false,
beforeUpload: null,
customRequest: null,
withCredentials: false,
openFileDialogOnClick: true
};
/* harmony default export */ __webpack_exports__["a"] = (Upload);
/***/ }),
/***/ 1157:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(18);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty__ = __webpack_require__(59);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(9);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass__ = __webpack_require__(31);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(10);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__ = __webpack_require__(11);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_classnames__ = __webpack_require__(3);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_classnames__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__request__ = __webpack_require__(1158);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__uid__ = __webpack_require__(1016);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__attr_accept__ = __webpack_require__(1159);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__traverseFileTree__ = __webpack_require__(1160);
/* eslint react/no-is-mounted:0 react/sort-comp:0 */
var AjaxUploader = function (_Component) {
__WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default()(AjaxUploader, _Component);
function AjaxUploader() {
var _ref;
var _temp, _this, _ret;
__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, AjaxUploader);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default()(this, (_ref = AjaxUploader.__proto__ || Object.getPrototypeOf(AjaxUploader)).call.apply(_ref, [this].concat(args))), _this), _this.state = { uid: Object(__WEBPACK_IMPORTED_MODULE_10__uid__["a" /* default */])() }, _this.reqs = {}, _this.onChange = function (e) {
var files = e.target.files;
_this.uploadFiles(files);
_this.reset();
}, _this.onClick = function () {
var el = _this.fileInput;
if (!el) {
return;
}
el.click();
}, _this.onKeyDown = function (e) {
if (e.key === 'Enter') {
_this.onClick();
}
}, _this.onFileDrop = function (e) {
var multiple = _this.props.multiple;
e.preventDefault();
if (e.type === 'dragover') {
return;
}
if (_this.props.directory) {
Object(__WEBPACK_IMPORTED_MODULE_12__traverseFileTree__["a" /* default */])(e.dataTransfer.items, _this.uploadFiles, function (_file) {
return Object(__WEBPACK_IMPORTED_MODULE_11__attr_accept__["a" /* default */])(_file, _this.props.accept);
});
} else {
var files = Array.prototype.slice.call(e.dataTransfer.files).filter(function (file) {
return Object(__WEBPACK_IMPORTED_MODULE_11__attr_accept__["a" /* default */])(file, _this.props.accept);
});
if (multiple === false) {
files = files.slice(0, 1);
}
_this.uploadFiles(files);
}
}, _this.uploadFiles = function (files) {
var postFiles = Array.prototype.slice.call(files);
postFiles.map(function (file) {
file.uid = Object(__WEBPACK_IMPORTED_MODULE_10__uid__["a" /* default */])();
return file;
}).forEach(function (file) {
_this.upload(file, postFiles);
});
}, _this.saveFileInput = function (node) {
_this.fileInput = node;
}, _temp), __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default()(_this, _ret);
}
__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass___default()(AjaxUploader, [{
key: 'componentDidMount',
value: function componentDidMount() {
this._isMounted = true;
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
this._isMounted = false;
this.abort();
}
}, {
key: 'upload',
value: function upload(file, fileList) {
var _this2 = this;
var props = this.props;
if (!props.beforeUpload) {
// always async in case use react state to keep fileList
return setTimeout(function () {
return _this2.post(file);
}, 0);
}
var before = props.beforeUpload(file, fileList);
if (before && before.then) {
before.then(function (processedFile) {
var processedFileType = Object.prototype.toString.call(processedFile);
if (processedFileType === '[object File]' || processedFileType === '[object Blob]') {
return _this2.post(processedFile);
}
return _this2.post(file);
})['catch'](function (e) {
console && console.log(e); // eslint-disable-line
});
} else if (before !== false) {
setTimeout(function () {
return _this2.post(file);
}, 0);
}
}
}, {
key: 'post',
value: function post(file) {
var _this3 = this;
if (!this._isMounted) {
return;
}
var props = this.props;
var data = props.data;
var onStart = props.onStart,
onProgress = props.onProgress,
_props$transformFile = props.transformFile,
transformFile = _props$transformFile === undefined ? function (originFile) {
return originFile;
} : _props$transformFile;
new Promise(function (resolve) {
var action = props.action;
if (typeof action === 'function') {
return resolve(action(file));
}
resolve(action);
}).then(function (action) {
var uid = file.uid;
var request = props.customRequest || __WEBPACK_IMPORTED_MODULE_9__request__["a" /* default */];
var transform = Promise.resolve(transformFile(file))['catch'](function (e) {
console.error(e); // eslint-disable-line no-console
});
transform.then(function (transformedFile) {
if (typeof data === 'function') {
data = data(file);
}
var requestOption = {
action: action,
filename: props.name,
data: data,
file: transformedFile,
headers: props.headers,
withCredentials: props.withCredentials,
method: props.method || 'post',
onProgress: onProgress ? function (e) {
onProgress(e, file);
} : null,
onSuccess: function onSuccess(ret, xhr) {
delete _this3.reqs[uid];
props.onSuccess(ret, file, xhr);
},
onError: function onError(err, ret) {
delete _this3.reqs[uid];
props.onError(err, ret, file);
}
};
_this3.reqs[uid] = request(requestOption);
onStart(file);
});
});
}
}, {
key: 'reset',
value: function reset() {
this.setState({
uid: Object(__WEBPACK_IMPORTED_MODULE_10__uid__["a" /* default */])()
});
}
}, {
key: 'abort',
value: function abort(file) {
var reqs = this.reqs;
if (file) {
var uid = file;
if (file && file.uid) {
uid = file.uid;
}
if (reqs[uid] && reqs[uid].abort) {
reqs[uid].abort();
}
delete reqs[uid];
} else {
Object.keys(reqs).forEach(function (uid) {
if (reqs[uid] && reqs[uid].abort) {
reqs[uid].abort();
}
delete reqs[uid];
});
}
}
}, {
key: 'render',
value: function render() {
var _classNames;
var _props = this.props,
Tag = _props.component,
prefixCls = _props.prefixCls,
className = _props.className,
disabled = _props.disabled,
id = _props.id,
style = _props.style,
multiple = _props.multiple,
accept = _props.accept,
children = _props.children,
directory = _props.directory,
openFileDialogOnClick = _props.openFileDialogOnClick;
var cls = __WEBPACK_IMPORTED_MODULE_8_classnames___default()((_classNames = {}, __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()(_classNames, prefixCls, true), __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()(_classNames, prefixCls + '-disabled', disabled), __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()(_classNames, className, className), _classNames));
var events = disabled ? {} : {
onClick: openFileDialogOnClick ? this.onClick : function () {},
onKeyDown: openFileDialogOnClick ? this.onKeyDown : function () {},
onDrop: this.onFileDrop,
onDragOver: this.onFileDrop,
tabIndex: '0'
};
return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(
Tag,
__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, events, {
className: cls,
role: 'button',
style: style
}),
__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('input', {
id: id,
type: 'file',
ref: this.saveFileInput,
onClick: function onClick(e) {
return e.stopPropagation();
} // https://github.com/ant-design/ant-design/issues/19948
, key: this.state.uid,
style: { display: 'none' },
accept: accept,
directory: directory ? 'directory' : null,
webkitdirectory: directory ? 'webkitdirectory' : null,
multiple: multiple,
onChange: this.onChange
}),
children
);
}
}]);
return AjaxUploader;
}(__WEBPACK_IMPORTED_MODULE_6_react__["Component"]);
AjaxUploader.propTypes = {
id: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,
component: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,
style: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.object,
prefixCls: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,
className: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,
multiple: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,
directory: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,
disabled: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,
accept: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,
children: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.any,
onStart: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,
data: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.object, __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func]),
action: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func]),
headers: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.object,
beforeUpload: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,
customRequest: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,
onProgress: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,
withCredentials: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,
openFileDialogOnClick: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,
transformFile: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func
};
/* harmony default export */ __webpack_exports__["a"] = (AjaxUploader);
/***/ }),
/***/ 1158:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = upload;
function getError(option, xhr) {
var msg = 'cannot ' + option.method + ' ' + option.action + ' ' + xhr.status + '\'';
var err = new Error(msg);
err.status = xhr.status;
err.method = option.method;
err.url = option.action;
return err;
}
function getBody(xhr) {
var text = xhr.responseText || xhr.response;
if (!text) {
return text;
}
try {
return JSON.parse(text);
} catch (e) {
return text;
}
}
// option {
// onProgress: (event: { percent: number }): void,
// onError: (event: Error, body?: Object): void,
// onSuccess: (body: Object): void,
// data: Object,
// filename: String,
// file: File,
// withCredentials: Boolean,
// action: String,
// headers: Object,
// }
function upload(option) {
var xhr = new XMLHttpRequest();
if (option.onProgress && xhr.upload) {
xhr.upload.onprogress = function progress(e) {
if (e.total > 0) {
e.percent = e.loaded / e.total * 100;
}
option.onProgress(e);
};
}
var formData = new FormData();
if (option.data) {
Object.keys(option.data).forEach(function (key) {
var value = option.data[key];
// support key-value array data
if (Array.isArray(value)) {
value.forEach(function (item) {
// { list: [ 11, 22 ] }
// formData.append('list[]', 11);
formData.append(key + '[]', item);
});
return;
}
formData.append(key, option.data[key]);
});
}
formData.append(option.filename, option.file);
xhr.onerror = function error(e) {
option.onError(e);
};
xhr.onload = function onload() {
// allow success when 2xx status
// see https://github.com/react-component/upload/issues/34
if (xhr.status < 200 || xhr.status >= 300) {
return option.onError(getError(option, xhr), getBody(xhr));
}
option.onSuccess(getBody(xhr), xhr);
};
xhr.open(option.method, option.action, true);
// Has to be after `.open()`. See https://github.com/enyo/dropzone/issues/179
if (option.withCredentials && 'withCredentials' in xhr) {
xhr.withCredentials = true;
}
var headers = option.headers || {};
// when set headers['X-Requested-With'] = null , can close default XHR header
// see https://github.com/react-component/upload/issues/33
if (headers['X-Requested-With'] !== null) {
xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
}
for (var h in headers) {
if (headers.hasOwnProperty(h) && headers[h] !== null) {
xhr.setRequestHeader(h, headers[h]);
}
}
xhr.send(formData);
return {
abort: function abort() {
xhr.abort();
}
};
}
/***/ }),
/***/ 1159:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
function endsWith(str, suffix) {
return str.indexOf(suffix, str.length - suffix.length) !== -1;
}
/* harmony default export */ __webpack_exports__["a"] = (function (file, acceptedFiles) {
if (file && acceptedFiles) {
var acceptedFilesArray = Array.isArray(acceptedFiles) ? acceptedFiles : acceptedFiles.split(',');
var fileName = file.name || '';
var mimeType = file.type || '';
var baseMimeType = mimeType.replace(/\/.*$/, '');
return acceptedFilesArray.some(function (type) {
var validType = type.trim();
if (validType.charAt(0) === '.') {
return endsWith(fileName.toLowerCase(), validType.toLowerCase());
} else if (/\/\*$/.test(validType)) {
// This is something like a image/* mime type
return baseMimeType === validType.replace(/\/.*$/, '');
}
return mimeType === validType;
});
}
return true;
});
/***/ }),
/***/ 1160:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
function loopFiles(item, callback) {
var dirReader = item.createReader();
var fileList = [];
function sequence() {
dirReader.readEntries(function (entries) {
var entryList = Array.prototype.slice.apply(entries);
fileList = fileList.concat(entryList);
// Check if all the file has been viewed
var isFinished = !entryList.length;
if (isFinished) {
callback(fileList);
} else {
sequence();
}
});
}
sequence();
}
var traverseFileTree = function traverseFileTree(files, callback, isAccepted) {
var _traverseFileTree = function _traverseFileTree(item, path) {
path = path || '';
if (item.isFile) {
item.file(function (file) {
if (isAccepted(file)) {
// https://github.com/ant-design/ant-design/issues/16426
if (item.fullPath && !file.webkitRelativePath) {
Object.defineProperties(file, {
webkitRelativePath: {
writable: true
}
});
file.webkitRelativePath = item.fullPath.replace(/^\//, '');
Object.defineProperties(file, {
webkitRelativePath: {
writable: false
}
});
}
callback([file]);
}
});
} else if (item.isDirectory) {
loopFiles(item, function (entries) {
entries.forEach(function (entryItem) {
_traverseFileTree(entryItem, '' + path + item.name + '/');
});
});
}
};
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
try {
for (var _iterator = files[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
var file = _step.value;
_traverseFileTree(file.webkitGetAsEntry());
}
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
try {
if (!_iteratorNormalCompletion && _iterator['return']) {
_iterator['return']();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
}
};
/* harmony default export */ __webpack_exports__["a"] = (traverseFileTree);
/***/ }),
/***/ 1161:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__ = __webpack_require__(59);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends__ = __webpack_require__(18);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(9);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass__ = __webpack_require__(31);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(10);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__ = __webpack_require__(11);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react_dom__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_react_dom__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_classnames__ = __webpack_require__(3);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_classnames__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__uid__ = __webpack_require__(1016);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_warning__ = __webpack_require__(324);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_warning__);
/* eslint react/sort-comp:0 */
var IFRAME_STYLE = {
position: 'absolute',
top: 0,
opacity: 0,
filter: 'alpha(opacity=0)',
left: 0,
zIndex: 9999
};
// diferent from AjaxUpload, can only upload on at one time, serial seriously
var IframeUploader = function (_Component) {
__WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default()(IframeUploader, _Component);
function IframeUploader() {
var _ref;
var _temp, _this, _ret;
__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, IframeUploader);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default()(this, (_ref = IframeUploader.__proto__ || Object.getPrototypeOf(IframeUploader)).call.apply(_ref, [this].concat(args))), _this), _this.state = { uploading: false }, _this.file = {}, _this.onLoad = function () {
if (!_this.state.uploading) {
return;
}
var _this2 = _this,
props = _this2.props,
file = _this2.file;
var response = void 0;
try {
var doc = _this.getIframeDocument();
var script = doc.getElementsByTagName('script')[0];
if (script && script.parentNode === doc.body) {
doc.body.removeChild(script);
}
response = doc.body.innerHTML;
props.onSuccess(response, file);
} catch (err) {
__WEBPACK_IMPORTED_MODULE_11_warning___default()(false, 'cross domain error for Upload. Maybe server should return document.domain script. see Note from https://github.com/react-component/upload');
response = 'cross-domain';
props.onError(err, null, file);
}
_this.endUpload();
}, _this.onChange = function () {
var target = _this.getFormInputNode();
// ie8/9 don't support FileList Object
// http://stackoverflow.com/questions/12830058/ie8-input-type-file-get-files
var file = _this.file = {
uid: Object(__WEBPACK_IMPORTED_MODULE_10__uid__["a" /* default */])(),
name: target.value && target.value.substring(target.value.lastIndexOf('\\') + 1, target.value.length)
};
_this.startUpload();
var _this3 = _this,
props = _this3.props;
if (!props.beforeUpload) {
return _this.post(file);
}
var before = props.beforeUpload(file);
if (before && before.then) {
before.then(function () {
_this.post(file);
}, function () {
_this.endUpload();
});
} else if (before !== false) {
_this.post(file);
} else {
_this.endUpload();
}
}, _this.saveIframe = function (node) {
_this.iframe = node;
}, _temp), __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default()(_this, _ret);
}
__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass___default()(IframeUploader, [{
key: 'componentDidMount',
value: function componentDidMount() {
this.updateIframeWH();
this.initIframe();
}
}, {
key: 'componentDidUpdate',
value: function componentDidUpdate() {
this.updateIframeWH();
}
}, {
key: 'getIframeNode',
value: function getIframeNode() {
return this.iframe;
}
}, {
key: 'getIframeDocument',
value: function getIframeDocument() {
return this.getIframeNode().contentDocument;
}
}, {
key: 'getFormNode',
value: function getFormNode() {
return this.getIframeDocument().getElementById('form');
}
}, {
key: 'getFormInputNode',
value: function getFormInputNode() {
return this.getIframeDocument().getElementById('input');
}
}, {
key: 'getFormDataNode',
value: function getFormDataNode() {
return this.getIframeDocument().getElementById('data');
}
}, {
key: 'getFileForMultiple',
value: function getFileForMultiple(file) {
return this.props.multiple ? [file] : file;
}
}, {
key: 'getIframeHTML',
value: function getIframeHTML(domain) {
var domainScript = '';
var domainInput = '';
if (domain) {
var script = 'script';
domainScript = '<' + script + '>document.domain="' + domain + '";</' + script + '>';
domainInput = '<input name="_documentDomain" value="' + domain + '" />';
}
return '\n <!DOCTYPE html>\n <html>\n <head>\n <meta http-equiv="X-UA-Compatible" content="IE=edge" />\n <style>\n body,html {padding:0;margin:0;border:0;overflow:hidden;}\n </style>\n ' + domainScript + '\n </head>\n <body>\n <form method="post"\n encType="multipart/form-data"\n action="" id="form"\n style="display:block;height:9999px;position:relative;overflow:hidden;">\n <input id="input" type="file"\n name="' + this.props.name + '"\n style="position:absolute;top:0;right:0;height:9999px;font-size:9999px;cursor:pointer;"/>\n ' + domainInput + '\n <span id="data"></span>\n </form>\n </body>\n </html>\n ';
}
}, {
key: 'initIframeSrc',
value: function initIframeSrc() {
if (this.domain) {
this.getIframeNode().src = 'javascript:void((function(){\n var d = document;\n d.open();\n d.domain=\'' + this.domain + '\';\n d.write(\'\');\n d.close();\n })())';
}
}
}, {
key: 'initIframe',
value: function initIframe() {
var iframeNode = this.getIframeNode();
var win = iframeNode.contentWindow;
var doc = void 0;
this.domain = this.domain || '';
this.initIframeSrc();
try {
doc = win.document;
} catch (e) {
this.domain = document.domain;
this.initIframeSrc();
win = iframeNode.contentWindow;
doc = win.document;
}
doc.open('text/html', 'replace');
doc.write(this.getIframeHTML(this.domain));
doc.close();
this.getFormInputNode().onchange = this.onChange;
}
}, {
key: 'endUpload',
value: function endUpload() {
if (this.state.uploading) {
this.file = {};
// hack avoid batch
this.state.uploading = false;
this.setState({
uploading: false
});
this.initIframe();
}
}
}, {
key: 'startUpload',
value: function startUpload() {
if (!this.state.uploading) {
this.state.uploading = true;
this.setState({
uploading: true
});
}
}
}, {
key: 'updateIframeWH',
value: function updateIframeWH() {
var rootNode = __WEBPACK_IMPORTED_MODULE_8_react_dom___default.a.findDOMNode(this);
var iframeNode = this.getIframeNode();
iframeNode.style.height = rootNode.offsetHeight + 'px';
iframeNode.style.width = rootNode.offsetWidth + 'px';
}
}, {
key: 'abort',
value: function abort(file) {
if (file) {
var uid = file;
if (file && file.uid) {
uid = file.uid;
}
if (uid === this.file.uid) {
this.endUpload();
}
} else {
this.endUpload();
}
}
}, {
key: 'post',
value: function post(file) {
var _this4 = this;
var formNode = this.getFormNode();
var dataSpan = this.getFormDataNode();
var data = this.props.data;
var onStart = this.props.onStart;
if (typeof data === 'function') {
data = data(file);
}
var inputs = document.createDocumentFragment();
for (var key in data) {
if (data.hasOwnProperty(key)) {
var input = document.createElement('input');
input.setAttribute('name', key);
input.value = data[key];
inputs.appendChild(input);
}
}
dataSpan.appendChild(inputs);
new Promise(function (resolve) {
var action = _this4.props.action;
if (typeof action === 'function') {
return resolve(action(file));
}
resolve(action);
}).then(function (action) {
formNode.setAttribute('action', action);
formNode.submit();
dataSpan.innerHTML = '';
onStart(file);
});
}
}, {
key: 'render',
value: function render() {
var _classNames;
var _props = this.props,
Tag = _props.component,
disabled = _props.disabled,
className = _props.className,
prefixCls = _props.prefixCls,
children = _props.children,
style = _props.style;
var iframeStyle = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default()({}, IFRAME_STYLE, {
display: this.state.uploading || disabled ? 'none' : ''
});
var cls = __WEBPACK_IMPORTED_MODULE_9_classnames___default()((_classNames = {}, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_classNames, prefixCls, true), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_classNames, prefixCls + '-disabled', disabled), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_classNames, className, className), _classNames));
return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(
Tag,
{
className: cls,
style: __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default()({ position: 'relative', zIndex: 0 }, style)
},
__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('iframe', {
ref: this.saveIframe,
onLoad: this.onLoad,
style: iframeStyle
}),
children
);
}
}]);
return IframeUploader;
}(__WEBPACK_IMPORTED_MODULE_6_react__["Component"]);
IframeUploader.propTypes = {
component: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,
style: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.object,
disabled: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,
prefixCls: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,
className: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,
accept: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,
onStart: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,
multiple: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,
children: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.any,
data: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.object, __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func]),
action: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func]),
name: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string
};
/* harmony default export */ __webpack_exports__["a"] = (IframeUploader);
/***/ }),
/***/ 1162:
/***/ (function(module, exports, __webpack_require__) {
var baseIteratee = __webpack_require__(1017),
baseUniq = __webpack_require__(1206);
/**
* This method is like `_.uniq` except that it accepts `iteratee` which is
* invoked for each element in `array` to generate the criterion by which
* uniqueness is computed. The order of result values is determined by the
* order they occur in the array. The iteratee is invoked with one argument:
* (value).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} array The array to inspect.
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
* @returns {Array} Returns the new duplicate free array.
* @example
*
* _.uniqBy([2.1, 1.2, 2.3], Math.floor);
* // => [2.1, 1.2]
*
* // The `_.property` iteratee shorthand.
* _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
* // => [{ 'x': 1 }, { 'x': 2 }]
*/
function uniqBy(array, iteratee) {
return (array && array.length) ? baseUniq(array, baseIteratee(iteratee, 2)) : [];
}
module.exports = uniqBy;
/***/ }),
/***/ 1163:
/***/ (function(module, exports, __webpack_require__) {
var baseIsMatch = __webpack_require__(1164),
getMatchData = __webpack_require__(1199),
matchesStrictComparable = __webpack_require__(1028);
/**
* The base implementation of `_.matches` which doesn't clone `source`.
*
* @private
* @param {Object} source The object of property values to match.
* @returns {Function} Returns the new spec function.
*/
function baseMatches(source) {
var matchData = getMatchData(source);
if (matchData.length == 1 && matchData[0][2]) {
return matchesStrictComparable(matchData[0][0], matchData[0][1]);
}
return function(object) {
return object === source || baseIsMatch(object, source, matchData);
};
}
module.exports = baseMatches;
/***/ }),
/***/ 1164:
/***/ (function(module, exports, __webpack_require__) {
var Stack = __webpack_require__(1018),
baseIsEqual = __webpack_require__(1019);
/** Used to compose bitmasks for value comparisons. */
var COMPARE_PARTIAL_FLAG = 1,
COMPARE_UNORDERED_FLAG = 2;
/**
* The base implementation of `_.isMatch` without support for iteratee shorthands.
*
* @private
* @param {Object} object The object to inspect.
* @param {Object} source The object of property values to match.
* @param {Array} matchData The property names, values, and compare flags to match.
* @param {Function} [customizer] The function to customize comparisons.
* @returns {boolean} Returns `true` if `object` is a match, else `false`.
*/
function baseIsMatch(object, source, matchData, customizer) {
var index = matchData.length,
length = index,
noCustomizer = !customizer;
if (object == null) {
return !length;
}
object = Object(object);
while (index--) {
var data = matchData[index];
if ((noCustomizer && data[2])
? data[1] !== object[data[0]]
: !(data[0] in object)
) {
return false;
}
}
while (++index < length) {
data = matchData[index];
var key = data[0],
objValue = object[key],
srcValue = data[1];
if (noCustomizer && data[2]) {
if (objValue === undefined && !(key in object)) {
return false;
}
} else {
var stack = new Stack;
if (customizer) {
var result = customizer(objValue, srcValue, key, object, source, stack);
}
if (!(result === undefined
? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
: result
)) {
return false;
}
}
}
return true;
}
module.exports = baseIsMatch;
/***/ }),
/***/ 1165:
/***/ (function(module, exports, __webpack_require__) {
var ListCache = __webpack_require__(888);
/**
* Removes all key-value entries from the stack.
*
* @private
* @name clear
* @memberOf Stack
*/
function stackClear() {
this.__data__ = new ListCache;
this.size = 0;
}
module.exports = stackClear;
/***/ }),
/***/ 1166:
/***/ (function(module, exports) {
/**
* Removes `key` and its value from the stack.
*
* @private
* @name delete
* @memberOf Stack
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function stackDelete(key) {
var data = this.__data__,
result = data['delete'](key);
this.size = data.size;
return result;
}
module.exports = stackDelete;
/***/ }),
/***/ 1167:
/***/ (function(module, exports) {
/**
* Gets the stack value for `key`.
*
* @private
* @name get
* @memberOf Stack
* @param {string} key The key of the value to get.
* @returns {*} Returns the entry value.
*/
function stackGet(key) {
return this.__data__.get(key);
}
module.exports = stackGet;
/***/ }),
/***/ 1168:
/***/ (function(module, exports) {
/**
* Checks if a stack value for `key` exists.
*
* @private
* @name has
* @memberOf Stack
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function stackHas(key) {
return this.__data__.has(key);
}
module.exports = stackHas;
/***/ }),
/***/ 1169:
/***/ (function(module, exports, __webpack_require__) {
var ListCache = __webpack_require__(888),
Map = __webpack_require__(897),
MapCache = __webpack_require__(898);
/** Used as the size to enable large array optimizations. */
var LARGE_ARRAY_SIZE = 200;
/**
* Sets the stack `key` to `value`.
*
* @private
* @name set
* @memberOf Stack
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
* @returns {Object} Returns the stack cache instance.
*/
function stackSet(key, value) {
var data = this.__data__;
if (data instanceof ListCache) {
var pairs = data.__data__;
if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
pairs.push([key, value]);
this.size = ++data.size;
return this;
}
data = this.__data__ = new MapCache(pairs);
}
data.set(key, value);
this.size = data.size;
return this;
}
module.exports = stackSet;
/***/ }),
/***/ 1170:
/***/ (function(module, exports, __webpack_require__) {
var Stack = __webpack_require__(1018),
equalArrays = __webpack_require__(1020),
equalByTag = __webpack_require__(1174),
equalObjects = __webpack_require__(1177),
getTag = __webpack_require__(1195),
isArray = __webpack_require__(877),
isBuffer = __webpack_require__(1024),
isTypedArray = __webpack_require__(1025);
/** Used to compose bitmasks for value comparisons. */
var COMPARE_PARTIAL_FLAG = 1;
/** `Object#toString` result references. */
var argsTag = '[object Arguments]',
arrayTag = '[object Array]',
objectTag = '[object Object]';
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* A specialized version of `baseIsEqual` for arrays and objects which performs
* deep comparisons and tracks traversed objects enabling objects with circular
* references to be compared.
*
* @private
* @param {Object} object The object to compare.
* @param {Object} other The other object to compare.
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
* @param {Function} customizer The function to customize comparisons.
* @param {Function} equalFunc The function to determine equivalents of values.
* @param {Object} [stack] Tracks traversed `object` and `other` objects.
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
*/
function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
var objIsArr = isArray(object),
othIsArr = isArray(other),
objTag = objIsArr ? arrayTag : getTag(object),
othTag = othIsArr ? arrayTag : getTag(other);
objTag = objTag == argsTag ? objectTag : objTag;
othTag = othTag == argsTag ? objectTag : othTag;
var objIsObj = objTag == objectTag,
othIsObj = othTag == objectTag,
isSameTag = objTag == othTag;
if (isSameTag && isBuffer(object)) {
if (!isBuffer(other)) {
return false;
}
objIsArr = true;
objIsObj = false;
}
if (isSameTag && !objIsObj) {
stack || (stack = new Stack);
return (objIsArr || isTypedArray(object))
? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
: equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
}
if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
if (objIsWrapped || othIsWrapped) {
var objUnwrapped = objIsWrapped ? object.value() : object,
othUnwrapped = othIsWrapped ? other.value() : other;
stack || (stack = new Stack);
return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
}
}
if (!isSameTag) {
return false;
}
stack || (stack = new Stack);
return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
}
module.exports = baseIsEqualDeep;
/***/ }),
/***/ 1171:
/***/ (function(module, exports) {
/** Used to stand-in for `undefined` hash values. */
var HASH_UNDEFINED = '__lodash_hash_undefined__';
/**
* Adds `value` to the array cache.
*
* @private
* @name add
* @memberOf SetCache
* @alias push
* @param {*} value The value to cache.
* @returns {Object} Returns the cache instance.
*/
function setCacheAdd(value) {
this.__data__.set(value, HASH_UNDEFINED);
return this;
}
module.exports = setCacheAdd;
/***/ }),
/***/ 1172:
/***/ (function(module, exports) {
/**
* Checks if `value` is in the array cache.
*
* @private
* @name has
* @memberOf SetCache
* @param {*} value The value to search for.
* @returns {number} Returns `true` if `value` is found, else `false`.
*/
function setCacheHas(value) {
return this.__data__.has(value);
}
module.exports = setCacheHas;
/***/ }),
/***/ 1173:
/***/ (function(module, exports) {
/**
* A specialized version of `_.some` for arrays without support for iteratee
* shorthands.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} predicate The function invoked per iteration.
* @returns {boolean} Returns `true` if any element passes the predicate check,
* else `false`.
*/
function arraySome(array, predicate) {
var index = -1,
length = array == null ? 0 : array.length;
while (++index < length) {
if (predicate(array[index], index, array)) {
return true;
}
}
return false;
}
module.exports = arraySome;
/***/ }),
/***/ 1174:
/***/ (function(module, exports, __webpack_require__) {
var Symbol = __webpack_require__(179),
Uint8Array = __webpack_require__(1175),
eq = __webpack_require__(884),
equalArrays = __webpack_require__(1020),
mapToArray = __webpack_require__(1176),
setToArray = __webpack_require__(946);
/** Used to compose bitmasks for value comparisons. */
var COMPARE_PARTIAL_FLAG = 1,
COMPARE_UNORDERED_FLAG = 2;
/** `Object#toString` result references. */
var boolTag = '[object Boolean]',
dateTag = '[object Date]',
errorTag = '[object Error]',
mapTag = '[object Map]',
numberTag = '[object Number]',
regexpTag = '[object RegExp]',
setTag = '[object Set]',
stringTag = '[object String]',
symbolTag = '[object Symbol]';
var arrayBufferTag = '[object ArrayBuffer]',
dataViewTag = '[object DataView]';
/** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol ? Symbol.prototype : undefined,
symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
/**
* A specialized version of `baseIsEqualDeep` for comparing objects of
* the same `toStringTag`.
*
* **Note:** This function only supports comparing values with tags of
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
*
* @private
* @param {Object} object The object to compare.
* @param {Object} other The other object to compare.
* @param {string} tag The `toStringTag` of the objects to compare.
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
* @param {Function} customizer The function to customize comparisons.
* @param {Function} equalFunc The function to determine equivalents of values.
* @param {Object} stack Tracks traversed `object` and `other` objects.
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
*/
function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
switch (tag) {
case dataViewTag:
if ((object.byteLength != other.byteLength) ||
(object.byteOffset != other.byteOffset)) {
return false;
}
object = object.buffer;
other = other.buffer;
case arrayBufferTag:
if ((object.byteLength != other.byteLength) ||
!equalFunc(new Uint8Array(object), new Uint8Array(other))) {
return false;
}
return true;
case boolTag:
case dateTag:
case numberTag:
// Coerce booleans to `1` or `0` and dates to milliseconds.
// Invalid dates are coerced to `NaN`.
return eq(+object, +other);
case errorTag:
return object.name == other.name && object.message == other.message;
case regexpTag:
case stringTag:
// Coerce regexes to strings and treat strings, primitives and objects,
// as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
// for more details.
return object == (other + '');
case mapTag:
var convert = mapToArray;
case setTag:
var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
convert || (convert = setToArray);
if (object.size != other.size && !isPartial) {
return false;
}
// Assume cyclic values are equal.
var stacked = stack.get(object);
if (stacked) {
return stacked == other;
}
bitmask |= COMPARE_UNORDERED_FLAG;
// Recursively compare objects (susceptible to call stack limits).
stack.set(object, other);
var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
stack['delete'](object);
return result;
case symbolTag:
if (symbolValueOf) {
return symbolValueOf.call(object) == symbolValueOf.call(other);
}
}
return false;
}
module.exports = equalByTag;
/***/ }),
/***/ 1175:
/***/ (function(module, exports, __webpack_require__) {
var root = __webpack_require__(167);
/** Built-in value references. */
var Uint8Array = root.Uint8Array;
module.exports = Uint8Array;
/***/ }),
/***/ 1176:
/***/ (function(module, exports) {
/**
* Converts `map` to its key-value pairs.
*
* @private
* @param {Object} map The map to convert.
* @returns {Array} Returns the key-value pairs.
*/
function mapToArray(map) {
var index = -1,
result = Array(map.size);
map.forEach(function(value, key) {
result[++index] = [key, value];
});
return result;
}
module.exports = mapToArray;
/***/ }),
/***/ 1177:
/***/ (function(module, exports, __webpack_require__) {
var getAllKeys = __webpack_require__(1178);
/** Used to compose bitmasks for value comparisons. */
var COMPARE_PARTIAL_FLAG = 1;
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* A specialized version of `baseIsEqualDeep` for objects with support for
* partial deep comparisons.
*
* @private
* @param {Object} object The object to compare.
* @param {Object} other The other object to compare.
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
* @param {Function} customizer The function to customize comparisons.
* @param {Function} equalFunc The function to determine equivalents of values.
* @param {Object} stack Tracks traversed `object` and `other` objects.
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
*/
function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
objProps = getAllKeys(object),
objLength = objProps.length,
othProps = getAllKeys(other),
othLength = othProps.length;
if (objLength != othLength && !isPartial) {
return false;
}
var index = objLength;
while (index--) {
var key = objProps[index];
if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
return false;
}
}
// Assume cyclic values are equal.
var stacked = stack.get(object);
if (stacked && stack.get(other)) {
return stacked == other;
}
var result = true;
stack.set(object, other);
stack.set(other, object);
var skipCtor = isPartial;
while (++index < objLength) {
key = objProps[index];
var objValue = object[key],
othValue = other[key];
if (customizer) {
var compared = isPartial
? customizer(othValue, objValue, key, other, object, stack)
: customizer(objValue, othValue, key, object, other, stack);
}
// Recursively compare objects (susceptible to call stack limits).
if (!(compared === undefined
? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
: compared
)) {
result = false;
break;
}
skipCtor || (skipCtor = key == 'constructor');
}
if (result && !skipCtor) {
var objCtor = object.constructor,
othCtor = other.constructor;
// Non `Object` object instances with different constructors are not equal.
if (objCtor != othCtor &&
('constructor' in object && 'constructor' in other) &&
!(typeof objCtor == 'function' && objCtor instanceof objCtor &&
typeof othCtor == 'function' && othCtor instanceof othCtor)) {
result = false;
}
}
stack['delete'](object);
stack['delete'](other);
return result;
}
module.exports = equalObjects;
/***/ }),
/***/ 1178:
/***/ (function(module, exports, __webpack_require__) {
var baseGetAllKeys = __webpack_require__(1179),
getSymbols = __webpack_require__(1181),
keys = __webpack_require__(1023);
/**
* Creates an array of own enumerable property names and symbols of `object`.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names and symbols.
*/
function getAllKeys(object) {
return baseGetAllKeys(object, keys, getSymbols);
}
module.exports = getAllKeys;
/***/ }),
/***/ 1179:
/***/ (function(module, exports, __webpack_require__) {
var arrayPush = __webpack_require__(1180),
isArray = __webpack_require__(877);
/**
* The base implementation of `getAllKeys` and `getAllKeysIn` which uses
* `keysFunc` and `symbolsFunc` to get the enumerable property names and
* symbols of `object`.
*
* @private
* @param {Object} object The object to query.
* @param {Function} keysFunc The function to get the keys of `object`.
* @param {Function} symbolsFunc The function to get the symbols of `object`.
* @returns {Array} Returns the array of property names and symbols.
*/
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
var result = keysFunc(object);
return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
}
module.exports = baseGetAllKeys;
/***/ }),
/***/ 1180:
/***/ (function(module, exports) {
/**
* Appends the elements of `values` to `array`.
*
* @private
* @param {Array} array The array to modify.
* @param {Array} values The values to append.
* @returns {Array} Returns `array`.
*/
function arrayPush(array, values) {
var index = -1,
length = values.length,
offset = array.length;
while (++index < length) {
array[offset + index] = values[index];
}
return array;
}
module.exports = arrayPush;
/***/ }),
/***/ 1181:
/***/ (function(module, exports, __webpack_require__) {
var arrayFilter = __webpack_require__(1182),
stubArray = __webpack_require__(1183);
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Built-in value references. */
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeGetSymbols = Object.getOwnPropertySymbols;
/**
* Creates an array of the own enumerable symbols of `object`.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of symbols.
*/
var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
if (object == null) {
return [];
}
object = Object(object);
return arrayFilter(nativeGetSymbols(object), function(symbol) {
return propertyIsEnumerable.call(object, symbol);
});
};
module.exports = getSymbols;
/***/ }),
/***/ 1182:
/***/ (function(module, exports) {
/**
* A specialized version of `_.filter` for arrays without support for
* iteratee shorthands.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} predicate The function invoked per iteration.
* @returns {Array} Returns the new filtered array.
*/
function arrayFilter(array, predicate) {
var index = -1,
length = array == null ? 0 : array.length,
resIndex = 0,
result = [];
while (++index < length) {
var value = array[index];
if (predicate(value, index, array)) {
result[resIndex++] = value;
}
}
return result;
}
module.exports = arrayFilter;
/***/ }),
/***/ 1183:
/***/ (function(module, exports) {
/**
* This method returns a new empty array.
*
* @static
* @memberOf _
* @since 4.13.0
* @category Util
* @returns {Array} Returns the new empty array.
* @example
*
* var arrays = _.times(2, _.stubArray);
*
* console.log(arrays);
* // => [[], []]
*
* console.log(arrays[0] === arrays[1]);
* // => false
*/
function stubArray() {
return [];
}
module.exports = stubArray;
/***/ }),
/***/ 1184:
/***/ (function(module, exports, __webpack_require__) {
var baseTimes = __webpack_require__(1185),
isArguments = __webpack_require__(912),
isArray = __webpack_require__(877),
isBuffer = __webpack_require__(1024),
isIndex = __webpack_require__(894),
isTypedArray = __webpack_require__(1025);
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Creates an array of the enumerable property names of the array-like `value`.
*
* @private
* @param {*} value The value to query.
* @param {boolean} inherited Specify returning inherited property names.
* @returns {Array} Returns the array of property names.
*/
function arrayLikeKeys(value, inherited) {
var isArr = isArray(value),
isArg = !isArr && isArguments(value),
isBuff = !isArr && !isArg && isBuffer(value),
isType = !isArr && !isArg && !isBuff && isTypedArray(value),
skipIndexes = isArr || isArg || isBuff || isType,
result = skipIndexes ? baseTimes(value.length, String) : [],
length = result.length;
for (var key in value) {
if ((inherited || hasOwnProperty.call(value, key)) &&
!(skipIndexes && (
// Safari 9 has enumerable `arguments.length` in strict mode.
key == 'length' ||
// Node.js 0.10 has enumerable non-index properties on buffers.
(isBuff && (key == 'offset' || key == 'parent')) ||
// PhantomJS 2 has enumerable non-index properties on typed arrays.
(isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
// Skip index properties.
isIndex(key, length)
))) {
result.push(key);
}
}
return result;
}
module.exports = arrayLikeKeys;
/***/ }),
/***/ 1185:
/***/ (function(module, exports) {
/**
* The base implementation of `_.times` without support for iteratee shorthands
* or max array length checks.
*
* @private
* @param {number} n The number of times to invoke `iteratee`.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns the array of results.
*/
function baseTimes(n, iteratee) {
var index = -1,
result = Array(n);
while (++index < n) {
result[index] = iteratee(index);
}
return result;
}
module.exports = baseTimes;
/***/ }),
/***/ 1186:
/***/ (function(module, exports) {
/**
* This method returns `false`.
*
* @static
* @memberOf _
* @since 4.13.0
* @category Util
* @returns {boolean} Returns `false`.
* @example
*
* _.times(2, _.stubFalse);
* // => [false, false]
*/
function stubFalse() {
return false;
}
module.exports = stubFalse;
/***/ }),
/***/ 1187:
/***/ (function(module, exports, __webpack_require__) {
var baseGetTag = __webpack_require__(319),
isLength = __webpack_require__(899),
isObjectLike = __webpack_require__(320);
/** `Object#toString` result references. */
var argsTag = '[object Arguments]',
arrayTag = '[object Array]',
boolTag = '[object Boolean]',
dateTag = '[object Date]',
errorTag = '[object Error]',
funcTag = '[object Function]',
mapTag = '[object Map]',
numberTag = '[object Number]',
objectTag = '[object Object]',
regexpTag = '[object RegExp]',
setTag = '[object Set]',
stringTag = '[object String]',
weakMapTag = '[object WeakMap]';
var arrayBufferTag = '[object ArrayBuffer]',
dataViewTag = '[object DataView]',
float32Tag = '[object Float32Array]',
float64Tag = '[object Float64Array]',
int8Tag = '[object Int8Array]',
int16Tag = '[object Int16Array]',
int32Tag = '[object Int32Array]',
uint8Tag = '[object Uint8Array]',
uint8ClampedTag = '[object Uint8ClampedArray]',
uint16Tag = '[object Uint16Array]',
uint32Tag = '[object Uint32Array]';
/** Used to identify `toStringTag` values of typed arrays. */
var typedArrayTags = {};
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
typedArrayTags[uint32Tag] = true;
typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
typedArrayTags[errorTag] = typedArrayTags[funcTag] =
typedArrayTags[mapTag] = typedArrayTags[numberTag] =
typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
typedArrayTags[setTag] = typedArrayTags[stringTag] =
typedArrayTags[weakMapTag] = false;
/**
* The base implementation of `_.isTypedArray` without Node.js optimizations.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
*/
function baseIsTypedArray(value) {
return isObjectLike(value) &&
isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
}
module.exports = baseIsTypedArray;
/***/ }),
/***/ 1188:
/***/ (function(module, exports) {
/**
* The base implementation of `_.unary` without support for storing metadata.
*
* @private
* @param {Function} func The function to cap arguments for.
* @returns {Function} Returns the new capped function.
*/
function baseUnary(func) {
return function(value) {
return func(value);
};
}
module.exports = baseUnary;
/***/ }),
/***/ 1189:
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(module) {var freeGlobal = __webpack_require__(340);
/** Detect free variable `exports`. */
var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
/** Detect free variable `module`. */
var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
/** Detect the popular CommonJS extension `module.exports`. */
var moduleExports = freeModule && freeModule.exports === freeExports;
/** Detect free variable `process` from Node.js. */
var freeProcess = moduleExports && freeGlobal.process;
/** Used to access faster Node.js helpers. */
var nodeUtil = (function() {
try {
// Use `util.types` for Node.js 10+.
var types = freeModule && freeModule.require && freeModule.require('util').types;
if (types) {
return types;
}
// Legacy `process.binding('util')` for Node.js < 10.
return freeProcess && freeProcess.binding && freeProcess.binding('util');
} catch (e) {}
}());
module.exports = nodeUtil;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(321)(module)))
/***/ }),
/***/ 1190:
/***/ (function(module, exports, __webpack_require__) {
var isPrototype = __webpack_require__(1191),
nativeKeys = __webpack_require__(1192);
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
*/
function baseKeys(object) {
if (!isPrototype(object)) {
return nativeKeys(object);
}
var result = [];
for (var key in Object(object)) {
if (hasOwnProperty.call(object, key) && key != 'constructor') {
result.push(key);
}
}
return result;
}
module.exports = baseKeys;
/***/ }),
/***/ 1191:
/***/ (function(module, exports) {
/** Used for built-in method references. */
var objectProto = Object.prototype;
/**
* Checks if `value` is likely a prototype object.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
*/
function isPrototype(value) {
var Ctor = value && value.constructor,
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
return value === proto;
}
module.exports = isPrototype;
/***/ }),
/***/ 1192:
/***/ (function(module, exports, __webpack_require__) {
var overArg = __webpack_require__(1193);
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeKeys = overArg(Object.keys, Object);
module.exports = nativeKeys;
/***/ }),
/***/ 1193:
/***/ (function(module, exports) {
/**
* Creates a unary function that invokes `func` with its argument transformed.
*
* @private
* @param {Function} func The function to wrap.
* @param {Function} transform The argument transform.
* @returns {Function} Returns the new function.
*/
function overArg(func, transform) {
return function(arg) {
return func(transform(arg));
};
}
module.exports = overArg;
/***/ }),
/***/ 1194:
/***/ (function(module, exports, __webpack_require__) {
var isFunction = __webpack_require__(910),
isLength = __webpack_require__(899);
/**
* Checks if `value` is array-like. A value is considered array-like if it's
* not a function and has a `value.length` that's an integer greater than or
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
* @example
*
* _.isArrayLike([1, 2, 3]);
* // => true
*
* _.isArrayLike(document.body.children);
* // => true
*
* _.isArrayLike('abc');
* // => true
*
* _.isArrayLike(_.noop);
* // => false
*/
function isArrayLike(value) {
return value != null && isLength(value.length) && !isFunction(value);
}
module.exports = isArrayLike;
/***/ }),
/***/ 1195:
/***/ (function(module, exports, __webpack_require__) {
var DataView = __webpack_require__(1196),
Map = __webpack_require__(897),
Promise = __webpack_require__(1197),
Set = __webpack_require__(1026),
WeakMap = __webpack_require__(1198),
baseGetTag = __webpack_require__(319),
toSource = __webpack_require__(911);
/** `Object#toString` result references. */
var mapTag = '[object Map]',
objectTag = '[object Object]',
promiseTag = '[object Promise]',
setTag = '[object Set]',
weakMapTag = '[object WeakMap]';
var dataViewTag = '[object DataView]';
/** Used to detect maps, sets, and weakmaps. */
var dataViewCtorString = toSource(DataView),
mapCtorString = toSource(Map),
promiseCtorString = toSource(Promise),
setCtorString = toSource(Set),
weakMapCtorString = toSource(WeakMap);
/**
* Gets the `toStringTag` of `value`.
*
* @private
* @param {*} value The value to query.
* @returns {string} Returns the `toStringTag`.
*/
var getTag = baseGetTag;
// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
(Map && getTag(new Map) != mapTag) ||
(Promise && getTag(Promise.resolve()) != promiseTag) ||
(Set && getTag(new Set) != setTag) ||
(WeakMap && getTag(new WeakMap) != weakMapTag)) {
getTag = function(value) {
var result = baseGetTag(value),
Ctor = result == objectTag ? value.constructor : undefined,
ctorString = Ctor ? toSource(Ctor) : '';
if (ctorString) {
switch (ctorString) {
case dataViewCtorString: return dataViewTag;
case mapCtorString: return mapTag;
case promiseCtorString: return promiseTag;
case setCtorString: return setTag;
case weakMapCtorString: return weakMapTag;
}
}
return result;
};
}
module.exports = getTag;
/***/ }),
/***/ 1196:
/***/ (function(module, exports, __webpack_require__) {
var getNative = __webpack_require__(878),
root = __webpack_require__(167);
/* Built-in method references that are verified to be native. */
var DataView = getNative(root, 'DataView');
module.exports = DataView;
/***/ }),
/***/ 1197:
/***/ (function(module, exports, __webpack_require__) {
var getNative = __webpack_require__(878),
root = __webpack_require__(167);
/* Built-in method references that are verified to be native. */
var Promise = getNative(root, 'Promise');
module.exports = Promise;
/***/ }),
/***/ 1198:
/***/ (function(module, exports, __webpack_require__) {
var getNative = __webpack_require__(878),
root = __webpack_require__(167);
/* Built-in method references that are verified to be native. */
var WeakMap = getNative(root, 'WeakMap');
module.exports = WeakMap;
/***/ }),
/***/ 1199:
/***/ (function(module, exports, __webpack_require__) {
var isStrictComparable = __webpack_require__(1027),
keys = __webpack_require__(1023);
/**
* Gets the property names, values, and compare flags of `object`.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the match data of `object`.
*/
function getMatchData(object) {
var result = keys(object),
length = result.length;
while (length--) {
var key = result[length],
value = object[key];
result[length] = [key, value, isStrictComparable(value)];
}
return result;
}
module.exports = getMatchData;
/***/ }),
/***/ 1200:
/***/ (function(module, exports, __webpack_require__) {
var baseIsEqual = __webpack_require__(1019),
get = __webpack_require__(934),
hasIn = __webpack_require__(1201),
isKey = __webpack_require__(900),
isStrictComparable = __webpack_require__(1027),
matchesStrictComparable = __webpack_require__(1028),
toKey = __webpack_require__(882);
/** Used to compose bitmasks for value comparisons. */
var COMPARE_PARTIAL_FLAG = 1,
COMPARE_UNORDERED_FLAG = 2;
/**
* The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
*
* @private
* @param {string} path The path of the property to get.
* @param {*} srcValue The value to match.
* @returns {Function} Returns the new spec function.
*/
function baseMatchesProperty(path, srcValue) {
if (isKey(path) && isStrictComparable(srcValue)) {
return matchesStrictComparable(toKey(path), srcValue);
}
return function(object) {
var objValue = get(object, path);
return (objValue === undefined && objValue === srcValue)
? hasIn(object, path)
: baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
};
}
module.exports = baseMatchesProperty;
/***/ }),
/***/ 1201:
/***/ (function(module, exports, __webpack_require__) {
var baseHasIn = __webpack_require__(1202),
hasPath = __webpack_require__(935);
/**
* Checks if `path` is a direct or inherited property of `object`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Object
* @param {Object} object The object to query.
* @param {Array|string} path The path to check.
* @returns {boolean} Returns `true` if `path` exists, else `false`.
* @example
*
* var object = _.create({ 'a': _.create({ 'b': 2 }) });
*
* _.hasIn(object, 'a');
* // => true
*
* _.hasIn(object, 'a.b');
* // => true
*
* _.hasIn(object, ['a', 'b']);
* // => true
*
* _.hasIn(object, 'b');
* // => false
*/
function hasIn(object, path) {
return object != null && hasPath(object, path, baseHasIn);
}
module.exports = hasIn;
/***/ }),
/***/ 1202:
/***/ (function(module, exports) {
/**
* The base implementation of `_.hasIn` without support for deep paths.
*
* @private
* @param {Object} [object] The object to query.
* @param {Array|string} key The key to check.
* @returns {boolean} Returns `true` if `key` exists, else `false`.
*/
function baseHasIn(object, key) {
return object != null && key in Object(object);
}
module.exports = baseHasIn;
/***/ }),
/***/ 1203:
/***/ (function(module, exports) {
/**
* This method returns the first argument it receives.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Util
* @param {*} value Any value.
* @returns {*} Returns `value`.
* @example
*
* var object = { 'a': 1 };
*
* console.log(_.identity(object) === object);
* // => true
*/
function identity(value) {
return value;
}
module.exports = identity;
/***/ }),
/***/ 1204:
/***/ (function(module, exports, __webpack_require__) {
var baseProperty = __webpack_require__(1145),
basePropertyDeep = __webpack_require__(1205),
isKey = __webpack_require__(900),
toKey = __webpack_require__(882);
/**
* Creates a function that returns the value at `path` of a given object.
*
* @static
* @memberOf _
* @since 2.4.0
* @category Util
* @param {Array|string} path The path of the property to get.
* @returns {Function} Returns the new accessor function.
* @example
*
* var objects = [
* { 'a': { 'b': 2 } },
* { 'a': { 'b': 1 } }
* ];
*
* _.map(objects, _.property('a.b'));
* // => [2, 1]
*
* _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
* // => [1, 2]
*/
function property(path) {
return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
}
module.exports = property;
/***/ }),
/***/ 1205:
/***/ (function(module, exports, __webpack_require__) {
var baseGet = __webpack_require__(913);
/**
* A specialized version of `baseProperty` which supports deep paths.
*
* @private
* @param {Array|string} path The path of the property to get.
* @returns {Function} Returns the new accessor function.
*/
function basePropertyDeep(path) {
return function(object) {
return baseGet(object, path);
};
}
module.exports = basePropertyDeep;
/***/ }),
/***/ 1206:
/***/ (function(module, exports, __webpack_require__) {
var SetCache = __webpack_require__(1021),
arrayIncludes = __webpack_require__(1207),
arrayIncludesWith = __webpack_require__(1211),
cacheHas = __webpack_require__(1022),
createSet = __webpack_require__(1212),
setToArray = __webpack_require__(946);
/** Used as the size to enable large array optimizations. */
var LARGE_ARRAY_SIZE = 200;
/**
* The base implementation of `_.uniqBy` without support for iteratee shorthands.
*
* @private
* @param {Array} array The array to inspect.
* @param {Function} [iteratee] The iteratee invoked per element.
* @param {Function} [comparator] The comparator invoked per element.
* @returns {Array} Returns the new duplicate free array.
*/
function baseUniq(array, iteratee, comparator) {
var index = -1,
includes = arrayIncludes,
length = array.length,
isCommon = true,
result = [],
seen = result;
if (comparator) {
isCommon = false;
includes = arrayIncludesWith;
}
else if (length >= LARGE_ARRAY_SIZE) {
var set = iteratee ? null : createSet(array);
if (set) {
return setToArray(set);
}
isCommon = false;
includes = cacheHas;
seen = new SetCache;
}
else {
seen = iteratee ? [] : result;
}
outer:
while (++index < length) {
var value = array[index],
computed = iteratee ? iteratee(value) : value;
value = (comparator || value !== 0) ? value : 0;
if (isCommon && computed === computed) {
var seenIndex = seen.length;
while (seenIndex--) {
if (seen[seenIndex] === computed) {
continue outer;
}
}
if (iteratee) {
seen.push(computed);
}
result.push(value);
}
else if (!includes(seen, computed, comparator)) {
if (seen !== result) {
seen.push(computed);
}
result.push(value);
}
}
return result;
}
module.exports = baseUniq;
/***/ }),
/***/ 1207:
/***/ (function(module, exports, __webpack_require__) {
var baseIndexOf = __webpack_require__(1208);
/**
* A specialized version of `_.includes` for arrays without support for
* specifying an index to search from.
*
* @private
* @param {Array} [array] The array to inspect.
* @param {*} target The value to search for.
* @returns {boolean} Returns `true` if `target` is found, else `false`.
*/
function arrayIncludes(array, value) {
var length = array == null ? 0 : array.length;
return !!length && baseIndexOf(array, value, 0) > -1;
}
module.exports = arrayIncludes;
/***/ }),
/***/ 1208:
/***/ (function(module, exports, __webpack_require__) {
var baseFindIndex = __webpack_require__(1029),
baseIsNaN = __webpack_require__(1209),
strictIndexOf = __webpack_require__(1210);
/**
* The base implementation of `_.indexOf` without `fromIndex` bounds checks.
*
* @private
* @param {Array} array The array to inspect.
* @param {*} value The value to search for.
* @param {number} fromIndex The index to search from.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function baseIndexOf(array, value, fromIndex) {
return value === value
? strictIndexOf(array, value, fromIndex)
: baseFindIndex(array, baseIsNaN, fromIndex);
}
module.exports = baseIndexOf;
/***/ }),
/***/ 1209:
/***/ (function(module, exports) {
/**
* The base implementation of `_.isNaN` without support for number objects.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
*/
function baseIsNaN(value) {
return value !== value;
}
module.exports = baseIsNaN;
/***/ }),
/***/ 1210:
/***/ (function(module, exports) {
/**
* A specialized version of `_.indexOf` which performs strict equality
* comparisons of values, i.e. `===`.
*
* @private
* @param {Array} array The array to inspect.
* @param {*} value The value to search for.
* @param {number} fromIndex The index to search from.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function strictIndexOf(array, value, fromIndex) {
var index = fromIndex - 1,
length = array.length;
while (++index < length) {
if (array[index] === value) {
return index;
}
}
return -1;
}
module.exports = strictIndexOf;
/***/ }),
/***/ 1211:
/***/ (function(module, exports) {
/**
* This function is like `arrayIncludes` except that it accepts a comparator.
*
* @private
* @param {Array} [array] The array to inspect.
* @param {*} target The value to search for.
* @param {Function} comparator The comparator invoked per element.
* @returns {boolean} Returns `true` if `target` is found, else `false`.
*/
function arrayIncludesWith(array, value, comparator) {
var index = -1,
length = array == null ? 0 : array.length;
while (++index < length) {
if (comparator(value, array[index])) {
return true;
}
}
return false;
}
module.exports = arrayIncludesWith;
/***/ }),
/***/ 1212:
/***/ (function(module, exports, __webpack_require__) {
var Set = __webpack_require__(1026),
noop = __webpack_require__(1213),
setToArray = __webpack_require__(946);
/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0;
/**
* Creates a set object of `values`.
*
* @private
* @param {Array} values The values to add to the set.
* @returns {Object} Returns the new set.
*/
var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
return new Set(values);
};
module.exports = createSet;
/***/ }),
/***/ 1213:
/***/ (function(module, exports) {
/**
* This method returns `undefined`.
*
* @static
* @memberOf _
* @since 2.3.0
* @category Util
* @example
*
* _.times(2, _.noop);
* // => [undefined, undefined]
*/
function noop() {
// No operation performed.
}
module.exports = noop;
/***/ }),
/***/ 1214:
/***/ (function(module, exports, __webpack_require__) {
var baseFindIndex = __webpack_require__(1029),
baseIteratee = __webpack_require__(1017),
toInteger = __webpack_require__(1143);
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMax = Math.max;
/**
* This method is like `_.find` except that it returns the index of the first
* element `predicate` returns truthy for instead of the element itself.
*
* @static
* @memberOf _
* @since 1.1.0
* @category Array
* @param {Array} array The array to inspect.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @param {number} [fromIndex=0] The index to search from.
* @returns {number} Returns the index of the found element, else `-1`.
* @example
*
* var users = [
* { 'user': 'barney', 'active': false },
* { 'user': 'fred', 'active': false },
* { 'user': 'pebbles', 'active': true }
* ];
*
* _.findIndex(users, function(o) { return o.user == 'barney'; });
* // => 0
*
* // The `_.matches` iteratee shorthand.
* _.findIndex(users, { 'user': 'fred', 'active': false });
* // => 1
*
* // The `_.matchesProperty` iteratee shorthand.
* _.findIndex(users, ['active', false]);
* // => 0
*
* // The `_.property` iteratee shorthand.
* _.findIndex(users, 'active');
* // => 2
*/
function findIndex(array, predicate, fromIndex) {
var length = array == null ? 0 : array.length;
if (!length) {
return -1;
}
var index = fromIndex == null ? 0 : toInteger(fromIndex);
if (index < 0) {
index = nativeMax(length + index, 0);
}
return baseFindIndex(array, baseIteratee(predicate, 3), index);
}
module.exports = findIndex;
/***/ }),
/***/ 1215:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(__webpack_require__(0));
var _rcAnimate = _interopRequireDefault(__webpack_require__(331));
var _classnames = _interopRequireDefault(__webpack_require__(3));
var _utils = __webpack_require__(1030);
var _icon = _interopRequireDefault(__webpack_require__(26));
var _tooltip = _interopRequireDefault(__webpack_require__(168));
var _progress = _interopRequireDefault(__webpack_require__(1127));
var _configProvider = __webpack_require__(12);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _extends() { _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; }; return _extends.apply(this, arguments); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var UploadList =
/*#__PURE__*/
function (_React$Component) {
_inherits(UploadList, _React$Component);
function UploadList() {
var _this;
_classCallCheck(this, UploadList);
_this = _possibleConstructorReturn(this, _getPrototypeOf(UploadList).apply(this, arguments));
_this.handlePreview = function (file, e) {
var onPreview = _this.props.onPreview;
if (!onPreview) {
return;
}
e.preventDefault();
return onPreview(file);
};
_this.handleDownload = function (file) {
var onDownload = _this.props.onDownload;
if (typeof onDownload === 'function') {
onDownload(file);
} else if (file.url) {
window.open(file.url);
}
};
_this.handleClose = function (file) {
var onRemove = _this.props.onRemove;
if (onRemove) {
onRemove(file);
}
};
_this.renderUploadList = function (_ref) {
var _classNames4;
var getPrefixCls = _ref.getPrefixCls;
var _this$props = _this.props,
customizePrefixCls = _this$props.prefixCls,
_this$props$items = _this$props.items,
items = _this$props$items === void 0 ? [] : _this$props$items,
listType = _this$props.listType,
showPreviewIcon = _this$props.showPreviewIcon,
showRemoveIcon = _this$props.showRemoveIcon,
showDownloadIcon = _this$props.showDownloadIcon,
locale = _this$props.locale,
progressAttr = _this$props.progressAttr;
var prefixCls = getPrefixCls('upload', customizePrefixCls);
var list = items.map(function (file) {
var _classNames, _classNames2;
var progress;
var icon = React.createElement(_icon["default"], {
type: file.status === 'uploading' ? 'loading' : 'paper-clip'
});
if (listType === 'picture' || listType === 'picture-card') {
if (listType === 'picture-card' && file.status === 'uploading') {
icon = React.createElement("div", {
className: "".concat(prefixCls, "-list-item-uploading-text")
}, locale.uploading);
} else if (!file.thumbUrl && !file.url) {
icon = React.createElement(_icon["default"], {
className: "".concat(prefixCls, "-list-item-thumbnail"),
type: "picture",
theme: "twoTone"
});
} else {
var thumbnail = (0, _utils.isImageUrl)(file) ? React.createElement("img", {
src: file.thumbUrl || file.url,
alt: file.name,
className: "".concat(prefixCls, "-list-item-image")
}) : React.createElement(_icon["default"], {
type: "file",
className: "".concat(prefixCls, "-list-item-icon"),
theme: "twoTone"
});
icon = React.createElement("a", {
className: "".concat(prefixCls, "-list-item-thumbnail"),
onClick: function onClick(e) {
return _this.handlePreview(file, e);
},
href: file.url || file.thumbUrl,
target: "_blank",
rel: "noopener noreferrer"
}, thumbnail);
}
}
if (file.status === 'uploading') {
// show loading icon if upload progress listener is disabled
var loadingProgress = 'percent' in file ? React.createElement(_progress["default"], _extends({
type: "line"
}, progressAttr, {
percent: file.percent
})) : null;
progress = React.createElement("div", {
className: "".concat(prefixCls, "-list-item-progress"),
key: "progress"
}, loadingProgress);
}
var infoUploadingClass = (0, _classnames["default"])((_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-list-item"), true), _defineProperty(_classNames, "".concat(prefixCls, "-list-item-").concat(file.status), true), _defineProperty(_classNames, "".concat(prefixCls, "-list-item-list-type-").concat(listType), true), _classNames));
var linkProps = typeof file.linkProps === 'string' ? JSON.parse(file.linkProps) : file.linkProps;
var removeIcon = showRemoveIcon ? React.createElement(_icon["default"], {
type: "delete",
title: locale.removeFile,
onClick: function onClick() {
return _this.handleClose(file);
}
}) : null;
var downloadIcon = showDownloadIcon && file.status === 'done' ? React.createElement(_icon["default"], {
type: "download",
title: locale.downloadFile,
onClick: function onClick() {
return _this.handleDownload(file);
}
}) : null;
var downloadOrDelete = listType !== 'picture-card' && React.createElement("span", {
key: "download-delete",
className: "".concat(prefixCls, "-list-item-card-actions ").concat(listType === 'picture' ? 'picture' : '')
}, downloadIcon && React.createElement("a", {
title: locale.downloadFile
}, downloadIcon), removeIcon && React.createElement("a", {
title: locale.removeFile
}, removeIcon));
var listItemNameClass = (0, _classnames["default"])((_classNames2 = {}, _defineProperty(_classNames2, "".concat(prefixCls, "-list-item-name"), true), _defineProperty(_classNames2, "".concat(prefixCls, "-list-item-name-icon-count-").concat([downloadIcon, removeIcon].filter(function (x) {
return x;
}).length), true), _classNames2));
var preview = file.url ? [React.createElement("a", _extends({
key: "view",
target: "_blank",
rel: "noopener noreferrer",
className: listItemNameClass,
title: file.name
}, linkProps, {
href: file.url,
onClick: function onClick(e) {
return _this.handlePreview(file, e);
}
}), file.name), downloadOrDelete] : [React.createElement("span", {
key: "view",
className: listItemNameClass,
onClick: function onClick(e) {
return _this.handlePreview(file, e);
},
title: file.name
}, file.name), downloadOrDelete];
var style = {
pointerEvents: 'none',
opacity: 0.5
};
var previewIcon = showPreviewIcon ? React.createElement("a", {
href: file.url || file.thumbUrl,
target: "_blank",
rel: "noopener noreferrer",
style: file.url || file.thumbUrl ? undefined : style,
onClick: function onClick(e) {
return _this.handlePreview(file, e);
},
title: locale.previewFile
}, React.createElement(_icon["default"], {
type: "eye-o"
})) : null;
var actions = listType === 'picture-card' && file.status !== 'uploading' && React.createElement("span", {
className: "".concat(prefixCls, "-list-item-actions")
}, previewIcon, file.status === 'done' && downloadIcon, removeIcon);
var message;
if (file.response && typeof file.response === 'string') {
message = file.response;
} else {
message = file.error && file.error.statusText || locale.uploadError;
}
var iconAndPreview = React.createElement("span", null, icon, preview);
var dom = React.createElement("div", {
className: infoUploadingClass
}, React.createElement("div", {
className: "".concat(prefixCls, "-list-item-info")
}, iconAndPreview), actions, React.createElement(_rcAnimate["default"], {
transitionName: "fade",
component: ""
}, progress));
var listContainerNameClass = (0, _classnames["default"])(_defineProperty({}, "".concat(prefixCls, "-list-picture-card-container"), listType === 'picture-card'));
return React.createElement("div", {
key: file.uid,
className: listContainerNameClass
}, file.status === 'error' ? React.createElement(_tooltip["default"], {
title: message
}, dom) : React.createElement("span", null, dom));
});
var listClassNames = (0, _classnames["default"])((_classNames4 = {}, _defineProperty(_classNames4, "".concat(prefixCls, "-list"), true), _defineProperty(_classNames4, "".concat(prefixCls, "-list-").concat(listType), true), _classNames4));
var animationDirection = listType === 'picture-card' ? 'animate-inline' : 'animate';
return React.createElement(_rcAnimate["default"], {
transitionName: "".concat(prefixCls, "-").concat(animationDirection),
component: "div",
className: listClassNames
}, list);
};
return _this;
}
_createClass(UploadList, [{
key: "componentDidUpdate",
value: function componentDidUpdate() {
var _this2 = this;
var _this$props2 = this.props,
listType = _this$props2.listType,
items = _this$props2.items,
previewFile = _this$props2.previewFile;
if (listType !== 'picture' && listType !== 'picture-card') {
return;
}
(items || []).forEach(function (file) {
if (typeof document === 'undefined' || typeof window === 'undefined' || !window.FileReader || !window.File || !(file.originFileObj instanceof File || file.originFileObj instanceof Blob) || file.thumbUrl !== undefined) {
return;
}
file.thumbUrl = '';
if (previewFile) {
previewFile(file.originFileObj).then(function (previewDataUrl) {
// Need append '' to avoid dead loop
file.thumbUrl = previewDataUrl || '';
_this2.forceUpdate();
});
}
});
}
}, {
key: "render",
value: function render() {
return React.createElement(_configProvider.ConfigConsumer, null, this.renderUploadList);
}
}]);
return UploadList;
}(React.Component);
exports["default"] = UploadList;
UploadList.defaultProps = {
listType: 'text',
progressAttr: {
strokeWidth: 2,
showInfo: false
},
showRemoveIcon: true,
showDownloadIcon: true,
showPreviewIcon: true,
previewFile: _utils.previewImage
};
//# sourceMappingURL=UploadList.js.map
/***/ }),
/***/ 1216:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(__webpack_require__(0));
var _Upload = _interopRequireDefault(__webpack_require__(1015));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _extends() { _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; }; return _extends.apply(this, arguments); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
// stick class comoponent to avoid React ref warning inside Form
// https://github.com/ant-design/ant-design/issues/18707
// eslint-disable-next-line react/prefer-stateless-function
var Dragger =
/*#__PURE__*/
function (_React$Component) {
_inherits(Dragger, _React$Component);
function Dragger() {
_classCallCheck(this, Dragger);
return _possibleConstructorReturn(this, _getPrototypeOf(Dragger).apply(this, arguments));
}
_createClass(Dragger, [{
key: "render",
value: function render() {
var props = this.props;
return React.createElement(_Upload["default"], _extends({}, props, {
type: "drag",
style: _extends(_extends({}, props.style), {
height: props.height
})
}));
}
}]);
return Dragger;
}(React.Component);
exports["default"] = Dragger;
//# sourceMappingURL=Dragger.js.map
/***/ }),
/***/ 1222:
/***/ (function(module, exports, __webpack_require__) {
var baseMerge = __webpack_require__(1355),
createAssigner = __webpack_require__(1359);
/**
* This method is like `_.assign` except that it recursively merges own and
* inherited enumerable string keyed properties of source objects into the
* destination object. Source properties that resolve to `undefined` are
* skipped if a destination value exists. Array and plain object properties
* are merged recursively. Other objects and value types are overridden by
* assignment. Source objects are applied from left to right. Subsequent
* sources overwrite property assignments of previous sources.
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 0.5.0
* @category Object
* @param {Object} object The destination object.
* @param {...Object} [sources] The source objects.
* @returns {Object} Returns `object`.
* @example
*
* var object = {
* 'a': [{ 'b': 2 }, { 'd': 4 }]
* };
*
* var other = {
* 'a': [{ 'c': 3 }, { 'e': 5 }]
* };
*
* _.merge(object, other);
* // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
*/
var merge = createAssigner(function(object, source, srcIndex) {
baseMerge(object, source, srcIndex);
});
module.exports = merge;
/***/ }),
/***/ 1226:
/***/ (function(module, exports, __webpack_require__) {
var baseAssignValue = __webpack_require__(984),
eq = __webpack_require__(925);
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Assigns `value` to `key` of `object` if the existing value is not equivalent
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* for equality comparisons.
*
* @private
* @param {Object} object The object to modify.
* @param {string} key The key of the property to assign.
* @param {*} value The value to assign.
*/
function assignValue(object, key, value) {
var objValue = object[key];
if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
(value === undefined && !(key in object))) {
baseAssignValue(object, key, value);
}
}
module.exports = assignValue;
/***/ }),
/***/ 1227:
/***/ (function(module, exports, __webpack_require__) {
var isArray = __webpack_require__(895),
isKey = __webpack_require__(1152),
stringToPath = __webpack_require__(1288),
toString = __webpack_require__(1291);
/**
* Casts `value` to a path array if it's not one.
*
* @private
* @param {*} value The value to inspect.
* @param {Object} [object] The object to query keys on.
* @returns {Array} Returns the cast property path array.
*/
function castPath(value, object) {
if (isArray(value)) {
return value;
}
return isKey(value, object) ? [value] : stringToPath(toString(value));
}
module.exports = castPath;
/***/ }),
/***/ 1230:
/***/ (function(module, exports) {
/** Used for built-in method references. */
var funcProto = Function.prototype;
/** Used to resolve the decompiled source of functions. */
var funcToString = funcProto.toString;
/**
* Converts `func` to its source code.
*
* @private
* @param {Function} func The function to convert.
* @returns {string} Returns the source code.
*/
function toSource(func) {
if (func != null) {
try {
return funcToString.call(func);
} catch (e) {}
try {
return (func + '');
} catch (e) {}
}
return '';
}
module.exports = toSource;
/***/ }),
/***/ 1231:
/***/ (function(module, exports, __webpack_require__) {
var root = __webpack_require__(174);
/** Built-in value references. */
var Uint8Array = root.Uint8Array;
module.exports = Uint8Array;
/***/ }),
/***/ 1232:
/***/ (function(module, exports) {
/**
* Creates a unary function that invokes `func` with its argument transformed.
*
* @private
* @param {Function} func The function to wrap.
* @param {Function} transform The argument transform.
* @returns {Function} Returns the new function.
*/
function overArg(func, transform) {
return function(arg) {
return func(transform(arg));
};
}
module.exports = overArg;
/***/ }),
/***/ 1233:
/***/ (function(module, exports, __webpack_require__) {
var baseTimes = __webpack_require__(1285),
isArguments = __webpack_require__(1087),
isArray = __webpack_require__(895),
isBuffer = __webpack_require__(1074),
isIndex = __webpack_require__(1083),
isTypedArray = __webpack_require__(1088);
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Creates an array of the enumerable property names of the array-like `value`.
*
* @private
* @param {*} value The value to query.
* @param {boolean} inherited Specify returning inherited property names.
* @returns {Array} Returns the array of property names.
*/
function arrayLikeKeys(value, inherited) {
var isArr = isArray(value),
isArg = !isArr && isArguments(value),
isBuff = !isArr && !isArg && isBuffer(value),
isType = !isArr && !isArg && !isBuff && isTypedArray(value),
skipIndexes = isArr || isArg || isBuff || isType,
result = skipIndexes ? baseTimes(value.length, String) : [],
length = result.length;
for (var key in value) {
if ((inherited || hasOwnProperty.call(value, key)) &&
!(skipIndexes && (
// Safari 9 has enumerable `arguments.length` in strict mode.
key == 'length' ||
// Node.js 0.10 has enumerable non-index properties on buffers.
(isBuff && (key == 'offset' || key == 'parent')) ||
// PhantomJS 2 has enumerable non-index properties on typed arrays.
(isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
// Skip index properties.
isIndex(key, length)
))) {
result.push(key);
}
}
return result;
}
module.exports = arrayLikeKeys;
/***/ }),
/***/ 1234:
/***/ (function(module, exports, __webpack_require__) {
var castPath = __webpack_require__(1227),
toKey = __webpack_require__(1140);
/**
* The base implementation of `_.get` without support for default values.
*
* @private
* @param {Object} object The object to query.
* @param {Array|string} path The path of the property to get.
* @returns {*} Returns the resolved value.
*/
function baseGet(object, path) {
path = castPath(path, object);
var index = 0,
length = path.length;
while (object != null && index < length) {
object = object[toKey(path[index++])];
}
return (index && index == length) ? object : undefined;
}
module.exports = baseGet;
/***/ }),
/***/ 1235:
/***/ (function(module, exports) {
/**
* A specialized version of `_.map` for arrays without support for iteratee
* shorthands.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns the new mapped array.
*/
function arrayMap(array, iteratee) {
var index = -1,
length = array == null ? 0 : array.length,
result = Array(length);
while (++index < length) {
result[index] = iteratee(array[index], index, array);
}
return result;
}
module.exports = arrayMap;
/***/ }),
/***/ 1242:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
__webpack_require__(28);
__webpack_require__(1370);
__webpack_require__(188);
__webpack_require__(177);
__webpack_require__(317);
__webpack_require__(985);
__webpack_require__(72);
__webpack_require__(905);
//# sourceMappingURL=css.js.map
/***/ }),
/***/ 1243:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _Table = _interopRequireDefault(__webpack_require__(1374));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _default = _Table["default"];
exports["default"] = _default;
//# sourceMappingURL=index.js.map
/***/ }),
/***/ 1246:
/***/ (function(module, exports, __webpack_require__) {
var createBaseFor = __webpack_require__(1280);
/**
* The base implementation of `baseForOwn` which iterates over `object`
* properties returned by `keysFunc` and invokes `iteratee` for each property.
* Iteratee functions may exit iteration early by explicitly returning `false`.
*
* @private
* @param {Object} object The object to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @param {Function} keysFunc The function to get the keys of `object`.
* @returns {Object} Returns `object`.
*/
var baseFor = createBaseFor();
module.exports = baseFor;
/***/ }),
/***/ 1247:
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(174);
/** Detect free variable `exports`. */
var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
/** Detect free variable `module`. */
var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
/** Detect the popular CommonJS extension `module.exports`. */
var moduleExports = freeModule && freeModule.exports === freeExports;
/** Built-in value references. */
var Buffer = moduleExports ? root.Buffer : undefined,
allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
/**
* Creates a clone of `buffer`.
*
* @private
* @param {Buffer} buffer The buffer to clone.
* @param {boolean} [isDeep] Specify a deep clone.
* @returns {Buffer} Returns the cloned buffer.
*/
function cloneBuffer(buffer, isDeep) {
if (isDeep) {
return buffer.slice();
}
var length = buffer.length,
result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
buffer.copy(result);
return result;
}
module.exports = cloneBuffer;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(321)(module)))
/***/ }),
/***/ 1248:
/***/ (function(module, exports, __webpack_require__) {
var cloneArrayBuffer = __webpack_require__(1149);
/**
* Creates a clone of `typedArray`.
*
* @private
* @param {Object} typedArray The typed array to clone.
* @param {boolean} [isDeep] Specify a deep clone.
* @returns {Object} Returns the cloned typed array.
*/
function cloneTypedArray(typedArray, isDeep) {
var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
}
module.exports = cloneTypedArray;
/***/ }),
/***/ 1249:
/***/ (function(module, exports) {
/**
* Copies the values of `source` to `array`.
*
* @private
* @param {Array} source The array to copy values from.
* @param {Array} [array=[]] The array to copy values to.
* @returns {Array} Returns `array`.
*/
function copyArray(source, array) {
var index = -1,
length = source.length;
array || (array = Array(length));
while (++index < length) {
array[index] = source[index];
}
return array;
}
module.exports = copyArray;
/***/ }),
/***/ 1250:
/***/ (function(module, exports, __webpack_require__) {
var baseCreate = __webpack_require__(1281),
getPrototype = __webpack_require__(1077),
isPrototype = __webpack_require__(1078);
/**
* Initializes an object clone.
*
* @private
* @param {Object} object The object to clone.
* @returns {Object} Returns the initialized clone.
*/
function initCloneObject(object) {
return (typeof object.constructor == 'function' && !isPrototype(object))
? baseCreate(getPrototype(object))
: {};
}
module.exports = initCloneObject;
/***/ }),
/***/ 1251:
/***/ (function(module, exports, __webpack_require__) {
var baseGetTag = __webpack_require__(327),
getPrototype = __webpack_require__(1077),
isObjectLike = __webpack_require__(323);
/** `Object#toString` result references. */
var objectTag = '[object Object]';
/** Used for built-in method references. */
var funcProto = Function.prototype,
objectProto = Object.prototype;
/** Used to resolve the decompiled source of functions. */
var funcToString = funcProto.toString;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/** Used to infer the `Object` constructor. */
var objectCtorString = funcToString.call(Object);
/**
* Checks if `value` is a plain object, that is, an object created by the
* `Object` constructor or one with a `[[Prototype]]` of `null`.
*
* @static
* @memberOf _
* @since 0.8.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
* @example
*
* function Foo() {
* this.a = 1;
* }
*
* _.isPlainObject(new Foo);
* // => false
*
* _.isPlainObject([1, 2, 3]);
* // => false
*
* _.isPlainObject({ 'x': 0, 'y': 0 });
* // => true
*
* _.isPlainObject(Object.create(null));
* // => true
*/
function isPlainObject(value) {
if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
return false;
}
var proto = getPrototype(value);
if (proto === null) {
return true;
}
var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
return typeof Ctor == 'function' && Ctor instanceof Ctor &&
funcToString.call(Ctor) == objectCtorString;
}
module.exports = isPlainObject;
/***/ }),
/***/ 1252:
/***/ (function(module, exports, __webpack_require__) {
var baseGet = __webpack_require__(1234);
/**
* Gets the value at `path` of `object`. If the resolved value is
* `undefined`, the `defaultValue` is returned in its place.
*
* @static
* @memberOf _
* @since 3.7.0
* @category Object
* @param {Object} object The object to query.
* @param {Array|string} path The path of the property to get.
* @param {*} [defaultValue] The value returned for `undefined` resolved values.
* @returns {*} Returns the resolved value.
* @example
*
* var object = { 'a': [{ 'b': { 'c': 3 } }] };
*
* _.get(object, 'a[0].b.c');
* // => 3
*
* _.get(object, ['a', '0', 'b', 'c']);
* // => 3
*
* _.get(object, 'a.b.c', 'default');
* // => 'default'
*/
function get(object, path, defaultValue) {
var result = object == null ? undefined : baseGet(object, path);
return result === undefined ? defaultValue : result;
}
module.exports = get;
/***/ }),
/***/ 1254:
/***/ (function(module, exports) {
/**
* Removes all key-value entries from the list cache.
*
* @private
* @name clear
* @memberOf ListCache
*/
function listCacheClear() {
this.__data__ = [];
this.size = 0;
}
module.exports = listCacheClear;
/***/ }),
/***/ 1255:
/***/ (function(module, exports, __webpack_require__) {
var assocIndexOf = __webpack_require__(919);
/** Used for built-in method references. */
var arrayProto = Array.prototype;
/** Built-in value references. */
var splice = arrayProto.splice;
/**
* Removes `key` and its value from the list cache.
*
* @private
* @name delete
* @memberOf ListCache
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function listCacheDelete(key) {
var data = this.__data__,
index = assocIndexOf(data, key);
if (index < 0) {
return false;
}
var lastIndex = data.length - 1;
if (index == lastIndex) {
data.pop();
} else {
splice.call(data, index, 1);
}
--this.size;
return true;
}
module.exports = listCacheDelete;
/***/ }),
/***/ 1256:
/***/ (function(module, exports, __webpack_require__) {
var assocIndexOf = __webpack_require__(919);
/**
* Gets the list cache value for `key`.
*
* @private
* @name get
* @memberOf ListCache
* @param {string} key The key of the value to get.
* @returns {*} Returns the entry value.
*/
function listCacheGet(key) {
var data = this.__data__,
index = assocIndexOf(data, key);
return index < 0 ? undefined : data[index][1];
}
module.exports = listCacheGet;
/***/ }),
/***/ 1257:
/***/ (function(module, exports, __webpack_require__) {
var assocIndexOf = __webpack_require__(919);
/**
* Checks if a list cache value for `key` exists.
*
* @private
* @name has
* @memberOf ListCache
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function listCacheHas(key) {
return assocIndexOf(this.__data__, key) > -1;
}
module.exports = listCacheHas;
/***/ }),
/***/ 1258:
/***/ (function(module, exports, __webpack_require__) {
var assocIndexOf = __webpack_require__(919);
/**
* Sets the list cache `key` to `value`.
*
* @private
* @name set
* @memberOf ListCache
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
* @returns {Object} Returns the list cache instance.
*/
function listCacheSet(key, value) {
var data = this.__data__,
index = assocIndexOf(data, key);
if (index < 0) {
++this.size;
data.push([key, value]);
} else {
data[index][1] = value;
}
return this;
}
module.exports = listCacheSet;
/***/ }),
/***/ 1259:
/***/ (function(module, exports, __webpack_require__) {
var ListCache = __webpack_require__(918);
/**
* Removes all key-value entries from the stack.
*
* @private
* @name clear
* @memberOf Stack
*/
function stackClear() {
this.__data__ = new ListCache;
this.size = 0;
}
module.exports = stackClear;
/***/ }),
/***/ 1260:
/***/ (function(module, exports) {
/**
* Removes `key` and its value from the stack.
*
* @private
* @name delete
* @memberOf Stack
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function stackDelete(key) {
var data = this.__data__,
result = data['delete'](key);
this.size = data.size;
return result;
}
module.exports = stackDelete;
/***/ }),
/***/ 1261:
/***/ (function(module, exports) {
/**
* Gets the stack value for `key`.
*
* @private
* @name get
* @memberOf Stack
* @param {string} key The key of the value to get.
* @returns {*} Returns the entry value.
*/
function stackGet(key) {
return this.__data__.get(key);
}
module.exports = stackGet;
/***/ }),
/***/ 1262:
/***/ (function(module, exports) {
/**
* Checks if a stack value for `key` exists.
*
* @private
* @name has
* @memberOf Stack
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function stackHas(key) {
return this.__data__.has(key);
}
module.exports = stackHas;
/***/ }),
/***/ 1263:
/***/ (function(module, exports, __webpack_require__) {
var ListCache = __webpack_require__(918),
Map = __webpack_require__(1075),
MapCache = __webpack_require__(1076);
/** Used as the size to enable large array optimizations. */
var LARGE_ARRAY_SIZE = 200;
/**
* Sets the stack `key` to `value`.
*
* @private
* @name set
* @memberOf Stack
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
* @returns {Object} Returns the stack cache instance.
*/
function stackSet(key, value) {
var data = this.__data__;
if (data instanceof ListCache) {
var pairs = data.__data__;
if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
pairs.push([key, value]);
this.size = ++data.size;
return this;
}
data = this.__data__ = new MapCache(pairs);
}
data.set(key, value);
this.size = data.size;
return this;
}
module.exports = stackSet;
/***/ }),
/***/ 1264:
/***/ (function(module, exports, __webpack_require__) {
var isFunction = __webpack_require__(983),
isMasked = __webpack_require__(1265),
isObject = __webpack_require__(170),
toSource = __webpack_require__(1230);
/**
* Used to match `RegExp`
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
*/
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
/** Used to detect host constructors (Safari). */
var reIsHostCtor = /^\[object .+?Constructor\]$/;
/** Used for built-in method references. */
var funcProto = Function.prototype,
objectProto = Object.prototype;
/** Used to resolve the decompiled source of functions. */
var funcToString = funcProto.toString;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/** Used to detect if a method is native. */
var reIsNative = RegExp('^' +
funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
);
/**
* The base implementation of `_.isNative` without bad shim checks.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a native function,
* else `false`.
*/
function baseIsNative(value) {
if (!isObject(value) || isMasked(value)) {
return false;
}
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
return pattern.test(toSource(value));
}
module.exports = baseIsNative;
/***/ }),
/***/ 1265:
/***/ (function(module, exports, __webpack_require__) {
var coreJsData = __webpack_require__(1266);
/** Used to detect methods masquerading as native. */
var maskSrcKey = (function() {
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
return uid ? ('Symbol(src)_1.' + uid) : '';
}());
/**
* Checks if `func` has its source masked.
*
* @private
* @param {Function} func The function to check.
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
*/
function isMasked(func) {
return !!maskSrcKey && (maskSrcKey in func);
}
module.exports = isMasked;
/***/ }),
/***/ 1266:
/***/ (function(module, exports, __webpack_require__) {
var root = __webpack_require__(174);
/** Used to detect overreaching core-js shims. */
var coreJsData = root['__core-js_shared__'];
module.exports = coreJsData;
/***/ }),
/***/ 1267:
/***/ (function(module, exports) {
/**
* Gets the value at `key` of `object`.
*
* @private
* @param {Object} [object] The object to query.
* @param {string} key The key of the property to get.
* @returns {*} Returns the property value.
*/
function getValue(object, key) {
return object == null ? undefined : object[key];
}
module.exports = getValue;
/***/ }),
/***/ 1268:
/***/ (function(module, exports, __webpack_require__) {
var Hash = __webpack_require__(1269),
ListCache = __webpack_require__(918),
Map = __webpack_require__(1075);
/**
* Removes all key-value entries from the map.
*
* @private
* @name clear
* @memberOf MapCache
*/
function mapCacheClear() {
this.size = 0;
this.__data__ = {
'hash': new Hash,
'map': new (Map || ListCache),
'string': new Hash
};
}
module.exports = mapCacheClear;
/***/ }),
/***/ 1269:
/***/ (function(module, exports, __webpack_require__) {
var hashClear = __webpack_require__(1270),
hashDelete = __webpack_require__(1271),
hashGet = __webpack_require__(1272),
hashHas = __webpack_require__(1273),
hashSet = __webpack_require__(1274);
/**
* Creates a hash object.
*
* @private
* @constructor
* @param {Array} [entries] The key-value pairs to cache.
*/
function Hash(entries) {
var index = -1,
length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
// Add methods to `Hash`.
Hash.prototype.clear = hashClear;
Hash.prototype['delete'] = hashDelete;
Hash.prototype.get = hashGet;
Hash.prototype.has = hashHas;
Hash.prototype.set = hashSet;
module.exports = Hash;
/***/ }),
/***/ 1270:
/***/ (function(module, exports, __webpack_require__) {
var nativeCreate = __webpack_require__(920);
/**
* Removes all key-value entries from the hash.
*
* @private
* @name clear
* @memberOf Hash
*/
function hashClear() {
this.__data__ = nativeCreate ? nativeCreate(null) : {};
this.size = 0;
}
module.exports = hashClear;
/***/ }),
/***/ 1271:
/***/ (function(module, exports) {
/**
* Removes `key` and its value from the hash.
*
* @private
* @name delete
* @memberOf Hash
* @param {Object} hash The hash to modify.
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function hashDelete(key) {
var result = this.has(key) && delete this.__data__[key];
this.size -= result ? 1 : 0;
return result;
}
module.exports = hashDelete;
/***/ }),
/***/ 1272:
/***/ (function(module, exports, __webpack_require__) {
var nativeCreate = __webpack_require__(920);
/** Used to stand-in for `undefined` hash values. */
var HASH_UNDEFINED = '__lodash_hash_undefined__';
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Gets the hash value for `key`.
*
* @private
* @name get
* @memberOf Hash
* @param {string} key The key of the value to get.
* @returns {*} Returns the entry value.
*/
function hashGet(key) {
var data = this.__data__;
if (nativeCreate) {
var result = data[key];
return result === HASH_UNDEFINED ? undefined : result;
}
return hasOwnProperty.call(data, key) ? data[key] : undefined;
}
module.exports = hashGet;
/***/ }),
/***/ 1273:
/***/ (function(module, exports, __webpack_require__) {
var nativeCreate = __webpack_require__(920);
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Checks if a hash value for `key` exists.
*
* @private
* @name has
* @memberOf Hash
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function hashHas(key) {
var data = this.__data__;
return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
}
module.exports = hashHas;
/***/ }),
/***/ 1274:
/***/ (function(module, exports, __webpack_require__) {
var nativeCreate = __webpack_require__(920);
/** Used to stand-in for `undefined` hash values. */
var HASH_UNDEFINED = '__lodash_hash_undefined__';
/**
* Sets the hash `key` to `value`.
*
* @private
* @name set
* @memberOf Hash
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
* @returns {Object} Returns the hash instance.
*/
function hashSet(key, value) {
var data = this.__data__;
this.size += this.has(key) ? 0 : 1;
data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
return this;
}
module.exports = hashSet;
/***/ }),
/***/ 1275:
/***/ (function(module, exports, __webpack_require__) {
var getMapData = __webpack_require__(921);
/**
* Removes `key` and its value from the map.
*
* @private
* @name delete
* @memberOf MapCache
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function mapCacheDelete(key) {
var result = getMapData(this, key)['delete'](key);
this.size -= result ? 1 : 0;
return result;
}
module.exports = mapCacheDelete;
/***/ }),
/***/ 1276:
/***/ (function(module, exports) {
/**
* Checks if `value` is suitable for use as unique object key.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
*/
function isKeyable(value) {
var type = typeof value;
return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
? (value !== '__proto__')
: (value === null);
}
module.exports = isKeyable;
/***/ }),
/***/ 1277:
/***/ (function(module, exports, __webpack_require__) {
var getMapData = __webpack_require__(921);
/**
* Gets the map value for `key`.
*
* @private
* @name get
* @memberOf MapCache
* @param {string} key The key of the value to get.
* @returns {*} Returns the entry value.
*/
function mapCacheGet(key) {
return getMapData(this, key).get(key);
}
module.exports = mapCacheGet;
/***/ }),
/***/ 1278:
/***/ (function(module, exports, __webpack_require__) {
var getMapData = __webpack_require__(921);
/**
* Checks if a map value for `key` exists.
*
* @private
* @name has
* @memberOf MapCache
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function mapCacheHas(key) {
return getMapData(this, key).has(key);
}
module.exports = mapCacheHas;
/***/ }),
/***/ 1279:
/***/ (function(module, exports, __webpack_require__) {
var getMapData = __webpack_require__(921);
/**
* Sets the map `key` to `value`.
*
* @private
* @name set
* @memberOf MapCache
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
* @returns {Object} Returns the map cache instance.
*/
function mapCacheSet(key, value) {
var data = getMapData(this, key),
size = data.size;
data.set(key, value);
this.size += data.size == size ? 0 : 1;
return this;
}
module.exports = mapCacheSet;
/***/ }),
/***/ 1280:
/***/ (function(module, exports) {
/**
* Creates a base function for methods like `_.forIn` and `_.forOwn`.
*
* @private
* @param {boolean} [fromRight] Specify iterating from right to left.
* @returns {Function} Returns the new base function.
*/
function createBaseFor(fromRight) {
return function(object, iteratee, keysFunc) {
var index = -1,
iterable = Object(object),
props = keysFunc(object),
length = props.length;
while (length--) {
var key = props[fromRight ? length : ++index];
if (iteratee(iterable[key], key, iterable) === false) {
break;
}
}
return object;
};
}
module.exports = createBaseFor;
/***/ }),
/***/ 1281:
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(170);
/** Built-in value references. */
var objectCreate = Object.create;
/**
* The base implementation of `_.create` without support for assigning
* properties to the created object.
*
* @private
* @param {Object} proto The object to inherit from.
* @returns {Object} Returns the new object.
*/
var baseCreate = (function() {
function object() {}
return function(proto) {
if (!isObject(proto)) {
return {};
}
if (objectCreate) {
return objectCreate(proto);
}
object.prototype = proto;
var result = new object;
object.prototype = undefined;
return result;
};
}());
module.exports = baseCreate;
/***/ }),
/***/ 1282:
/***/ (function(module, exports, __webpack_require__) {
var baseGetTag = __webpack_require__(327),
isObjectLike = __webpack_require__(323);
/** `Object#toString` result references. */
var argsTag = '[object Arguments]';
/**
* The base implementation of `_.isArguments`.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
*/
function baseIsArguments(value) {
return isObjectLike(value) && baseGetTag(value) == argsTag;
}
module.exports = baseIsArguments;
/***/ }),
/***/ 1283:
/***/ (function(module, exports) {
/**
* This method returns `false`.
*
* @static
* @memberOf _
* @since 4.13.0
* @category Util
* @returns {boolean} Returns `false`.
* @example
*
* _.times(2, _.stubFalse);
* // => [false, false]
*/
function stubFalse() {
return false;
}
module.exports = stubFalse;
/***/ }),
/***/ 1284:
/***/ (function(module, exports, __webpack_require__) {
var baseGetTag = __webpack_require__(327),
isLength = __webpack_require__(1079),
isObjectLike = __webpack_require__(323);
/** `Object#toString` result references. */
var argsTag = '[object Arguments]',
arrayTag = '[object Array]',
boolTag = '[object Boolean]',
dateTag = '[object Date]',
errorTag = '[object Error]',
funcTag = '[object Function]',
mapTag = '[object Map]',
numberTag = '[object Number]',
objectTag = '[object Object]',
regexpTag = '[object RegExp]',
setTag = '[object Set]',
stringTag = '[object String]',
weakMapTag = '[object WeakMap]';
var arrayBufferTag = '[object ArrayBuffer]',
dataViewTag = '[object DataView]',
float32Tag = '[object Float32Array]',
float64Tag = '[object Float64Array]',
int8Tag = '[object Int8Array]',
int16Tag = '[object Int16Array]',
int32Tag = '[object Int32Array]',
uint8Tag = '[object Uint8Array]',
uint8ClampedTag = '[object Uint8ClampedArray]',
uint16Tag = '[object Uint16Array]',
uint32Tag = '[object Uint32Array]';
/** Used to identify `toStringTag` values of typed arrays. */
var typedArrayTags = {};
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
typedArrayTags[uint32Tag] = true;
typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
typedArrayTags[errorTag] = typedArrayTags[funcTag] =
typedArrayTags[mapTag] = typedArrayTags[numberTag] =
typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
typedArrayTags[setTag] = typedArrayTags[stringTag] =
typedArrayTags[weakMapTag] = false;
/**
* The base implementation of `_.isTypedArray` without Node.js optimizations.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
*/
function baseIsTypedArray(value) {
return isObjectLike(value) &&
isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
}
module.exports = baseIsTypedArray;
/***/ }),
/***/ 1285:
/***/ (function(module, exports) {
/**
* The base implementation of `_.times` without support for iteratee shorthands
* or max array length checks.
*
* @private
* @param {number} n The number of times to invoke `iteratee`.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns the array of results.
*/
function baseTimes(n, iteratee) {
var index = -1,
result = Array(n);
while (++index < n) {
result[index] = iteratee(index);
}
return result;
}
module.exports = baseTimes;
/***/ }),
/***/ 1286:
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(170),
isPrototype = __webpack_require__(1078),
nativeKeysIn = __webpack_require__(1287);
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
*/
function baseKeysIn(object) {
if (!isObject(object)) {
return nativeKeysIn(object);
}
var isProto = isPrototype(object),
result = [];
for (var key in object) {
if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
result.push(key);
}
}
return result;
}
module.exports = baseKeysIn;
/***/ }),
/***/ 1287:
/***/ (function(module, exports) {
/**
* This function is like
* [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
* except that it includes inherited enumerable properties.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
*/
function nativeKeysIn(object) {
var result = [];
if (object != null) {
for (var key in Object(object)) {
result.push(key);
}
}
return result;
}
module.exports = nativeKeysIn;
/***/ }),
/***/ 1288:
/***/ (function(module, exports, __webpack_require__) {
var memoizeCapped = __webpack_require__(1289);
/** Used to match property names within property paths. */
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
/** Used to match backslashes in property paths. */
var reEscapeChar = /\\(\\)?/g;
/**
* Converts `string` to a property path array.
*
* @private
* @param {string} string The string to convert.
* @returns {Array} Returns the property path array.
*/
var stringToPath = memoizeCapped(function(string) {
var result = [];
if (string.charCodeAt(0) === 46 /* . */) {
result.push('');
}
string.replace(rePropName, function(match, number, quote, subString) {
result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
});
return result;
});
module.exports = stringToPath;
/***/ }),
/***/ 1289:
/***/ (function(module, exports, __webpack_require__) {
var memoize = __webpack_require__(1290);
/** Used as the maximum memoize cache size. */
var MAX_MEMOIZE_SIZE = 500;
/**
* A specialized version of `_.memoize` which clears the memoized function's
* cache when it exceeds `MAX_MEMOIZE_SIZE`.
*
* @private
* @param {Function} func The function to have its output memoized.
* @returns {Function} Returns the new memoized function.
*/
function memoizeCapped(func) {
var result = memoize(func, function(key) {
if (cache.size === MAX_MEMOIZE_SIZE) {
cache.clear();
}
return key;
});
var cache = result.cache;
return result;
}
module.exports = memoizeCapped;
/***/ }),
/***/ 1290:
/***/ (function(module, exports, __webpack_require__) {
var MapCache = __webpack_require__(1076);
/** Error message constants. */
var FUNC_ERROR_TEXT = 'Expected a function';
/**
* Creates a function that memoizes the result of `func`. If `resolver` is
* provided, it determines the cache key for storing the result based on the
* arguments provided to the memoized function. By default, the first argument
* provided to the memoized function is used as the map cache key. The `func`
* is invoked with the `this` binding of the memoized function.
*
* **Note:** The cache is exposed as the `cache` property on the memoized
* function. Its creation may be customized by replacing the `_.memoize.Cache`
* constructor with one whose instances implement the
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
* method interface of `clear`, `delete`, `get`, `has`, and `set`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Function
* @param {Function} func The function to have its output memoized.
* @param {Function} [resolver] The function to resolve the cache key.
* @returns {Function} Returns the new memoized function.
* @example
*
* var object = { 'a': 1, 'b': 2 };
* var other = { 'c': 3, 'd': 4 };
*
* var values = _.memoize(_.values);
* values(object);
* // => [1, 2]
*
* values(other);
* // => [3, 4]
*
* object.a = 2;
* values(object);
* // => [1, 2]
*
* // Modify the result cache.
* values.cache.set(object, ['a', 'b']);
* values(object);
* // => ['a', 'b']
*
* // Replace `_.memoize.Cache`.
* _.memoize.Cache = WeakMap;
*/
function memoize(func, resolver) {
if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
throw new TypeError(FUNC_ERROR_TEXT);
}
var memoized = function() {
var args = arguments,
key = resolver ? resolver.apply(this, args) : args[0],
cache = memoized.cache;
if (cache.has(key)) {
return cache.get(key);
}
var result = func.apply(this, args);
memoized.cache = cache.set(key, result) || cache;
return result;
};
memoized.cache = new (memoize.Cache || MapCache);
return memoized;
}
// Expose `MapCache`.
memoize.Cache = MapCache;
module.exports = memoize;
/***/ }),
/***/ 1291:
/***/ (function(module, exports, __webpack_require__) {
var baseToString = __webpack_require__(1292);
/**
* Converts `value` to a string. An empty string is returned for `null`
* and `undefined` values. The sign of `-0` is preserved.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to convert.
* @returns {string} Returns the converted string.
* @example
*
* _.toString(null);
* // => ''
*
* _.toString(-0);
* // => '-0'
*
* _.toString([1, 2, 3]);
* // => '1,2,3'
*/
function toString(value) {
return value == null ? '' : baseToString(value);
}
module.exports = toString;
/***/ }),
/***/ 1292:
/***/ (function(module, exports, __webpack_require__) {
var Symbol = __webpack_require__(186),
arrayMap = __webpack_require__(1235),
isArray = __webpack_require__(895),
isSymbol = __webpack_require__(330);
/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0;
/** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol ? Symbol.prototype : undefined,
symbolToString = symbolProto ? symbolProto.toString : undefined;
/**
* The base implementation of `_.toString` which doesn't convert nullish
* values to empty strings.
*
* @private
* @param {*} value The value to process.
* @returns {string} Returns the string.
*/
function baseToString(value) {
// Exit early for strings to avoid a performance hit in some environments.
if (typeof value == 'string') {
return value;
}
if (isArray(value)) {
// Recursively convert values (susceptible to call stack limits).
return arrayMap(value, baseToString) + '';
}
if (isSymbol(value)) {
return symbolToString ? symbolToString.call(value) : '';
}
var result = (value + '');
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
}
module.exports = baseToString;
/***/ }),
/***/ 1343:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = toArray;
var _react = _interopRequireDefault(__webpack_require__(0));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function toArray(children) {
var ret = [];
_react.default.Children.forEach(children, function (c) {
ret.push(c);
});
return ret;
}
/***/ }),
/***/ 1345:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(__webpack_require__(0));
var PropTypes = _interopRequireWildcard(__webpack_require__(1));
var _omit = _interopRequireDefault(__webpack_require__(43));
var _dropdown = _interopRequireDefault(__webpack_require__(922));
var _icon = _interopRequireDefault(__webpack_require__(26));
var _configProvider = __webpack_require__(12);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _extends() { _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; }; return _extends.apply(this, arguments); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var __rest = void 0 && (void 0).__rest || function (s, e) {
var t = {};
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
var BreadcrumbItem =
/*#__PURE__*/
function (_React$Component) {
_inherits(BreadcrumbItem, _React$Component);
function BreadcrumbItem() {
var _this;
_classCallCheck(this, BreadcrumbItem);
_this = _possibleConstructorReturn(this, _getPrototypeOf(BreadcrumbItem).apply(this, arguments));
_this.renderBreadcrumbItem = function (_ref) {
var getPrefixCls = _ref.getPrefixCls;
var _a = _this.props,
customizePrefixCls = _a.prefixCls,
separator = _a.separator,
children = _a.children,
restProps = __rest(_a, ["prefixCls", "separator", "children"]);
var prefixCls = getPrefixCls('breadcrumb', customizePrefixCls);
var link;
if ('href' in _this.props) {
link = React.createElement("a", _extends({
className: "".concat(prefixCls, "-link")
}, (0, _omit["default"])(restProps, ['overlay'])), children);
} else {
link = React.createElement("span", _extends({
className: "".concat(prefixCls, "-link")
}, (0, _omit["default"])(restProps, ['overlay'])), children);
} // wrap to dropDown
link = _this.renderBreadcrumbNode(link, prefixCls);
if (children) {
return React.createElement("span", null, link, separator && separator !== '' && React.createElement("span", {
className: "".concat(prefixCls, "-separator")
}, separator));
}
return null;
};
/**
* if overlay is have
* Wrap a DropDown
*/
_this.renderBreadcrumbNode = function (breadcrumbItem, prefixCls) {
var overlay = _this.props.overlay;
if (overlay) {
return React.createElement(_dropdown["default"], {
overlay: overlay,
placement: "bottomCenter"
}, React.createElement("span", {
className: "".concat(prefixCls, "-overlay-link")
}, breadcrumbItem, React.createElement(_icon["default"], {
type: "down"
})));
}
return breadcrumbItem;
};
return _this;
}
_createClass(BreadcrumbItem, [{
key: "render",
value: function render() {
return React.createElement(_configProvider.ConfigConsumer, null, this.renderBreadcrumbItem);
}
}]);
return BreadcrumbItem;
}(React.Component);
exports["default"] = BreadcrumbItem;
BreadcrumbItem.__ANT_BREADCRUMB_ITEM = true;
BreadcrumbItem.defaultProps = {
separator: '/'
};
BreadcrumbItem.propTypes = {
prefixCls: PropTypes.string,
separator: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
href: PropTypes.string
};
//# sourceMappingURL=BreadcrumbItem.js.map
/***/ }),
/***/ 1355:
/***/ (function(module, exports, __webpack_require__) {
var Stack = __webpack_require__(1148),
assignMergeValue = __webpack_require__(1108),
baseFor = __webpack_require__(1246),
baseMergeDeep = __webpack_require__(1356),
isObject = __webpack_require__(170),
keysIn = __webpack_require__(1082),
safeGet = __webpack_require__(1109);
/**
* The base implementation of `_.merge` without support for multiple sources.
*
* @private
* @param {Object} object The destination object.
* @param {Object} source The source object.
* @param {number} srcIndex The index of `source`.
* @param {Function} [customizer] The function to customize merged values.
* @param {Object} [stack] Tracks traversed source values and their merged
* counterparts.
*/
function baseMerge(object, source, srcIndex, customizer, stack) {
if (object === source) {
return;
}
baseFor(source, function(srcValue, key) {
if (isObject(srcValue)) {
stack || (stack = new Stack);
baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
}
else {
var newValue = customizer
? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
: undefined;
if (newValue === undefined) {
newValue = srcValue;
}
assignMergeValue(object, key, newValue);
}
}, keysIn);
}
module.exports = baseMerge;
/***/ }),
/***/ 1356:
/***/ (function(module, exports, __webpack_require__) {
var assignMergeValue = __webpack_require__(1108),
cloneBuffer = __webpack_require__(1247),
cloneTypedArray = __webpack_require__(1248),
copyArray = __webpack_require__(1249),
initCloneObject = __webpack_require__(1250),
isArguments = __webpack_require__(1087),
isArray = __webpack_require__(895),
isArrayLikeObject = __webpack_require__(1357),
isBuffer = __webpack_require__(1074),
isFunction = __webpack_require__(983),
isObject = __webpack_require__(170),
isPlainObject = __webpack_require__(1251),
isTypedArray = __webpack_require__(1088),
safeGet = __webpack_require__(1109),
toPlainObject = __webpack_require__(1358);
/**
* A specialized version of `baseMerge` for arrays and objects which performs
* deep merges and tracks traversed objects enabling objects with circular
* references to be merged.
*
* @private
* @param {Object} object The destination object.
* @param {Object} source The source object.
* @param {string} key The key of the value to merge.
* @param {number} srcIndex The index of `source`.
* @param {Function} mergeFunc The function to merge values.
* @param {Function} [customizer] The function to customize assigned values.
* @param {Object} [stack] Tracks traversed source values and their merged
* counterparts.
*/
function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
var objValue = safeGet(object, key),
srcValue = safeGet(source, key),
stacked = stack.get(srcValue);
if (stacked) {
assignMergeValue(object, key, stacked);
return;
}
var newValue = customizer
? customizer(objValue, srcValue, (key + ''), object, source, stack)
: undefined;
var isCommon = newValue === undefined;
if (isCommon) {
var isArr = isArray(srcValue),
isBuff = !isArr && isBuffer(srcValue),
isTyped = !isArr && !isBuff && isTypedArray(srcValue);
newValue = srcValue;
if (isArr || isBuff || isTyped) {
if (isArray(objValue)) {
newValue = objValue;
}
else if (isArrayLikeObject(objValue)) {
newValue = copyArray(objValue);
}
else if (isBuff) {
isCommon = false;
newValue = cloneBuffer(srcValue, true);
}
else if (isTyped) {
isCommon = false;
newValue = cloneTypedArray(srcValue, true);
}
else {
newValue = [];
}
}
else if (isPlainObject(srcValue) || isArguments(srcValue)) {
newValue = objValue;
if (isArguments(objValue)) {
newValue = toPlainObject(objValue);
}
else if (!isObject(objValue) || isFunction(objValue)) {
newValue = initCloneObject(srcValue);
}
}
else {
isCommon = false;
}
}
if (isCommon) {
// Recursively merge objects and arrays (susceptible to call stack limits).
stack.set(srcValue, newValue);
mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
stack['delete'](srcValue);
}
assignMergeValue(object, key, newValue);
}
module.exports = baseMergeDeep;
/***/ }),
/***/ 1357:
/***/ (function(module, exports, __webpack_require__) {
var isArrayLike = __webpack_require__(948),
isObjectLike = __webpack_require__(323);
/**
* This method is like `_.isArrayLike` except that it also checks if `value`
* is an object.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an array-like object,
* else `false`.
* @example
*
* _.isArrayLikeObject([1, 2, 3]);
* // => true
*
* _.isArrayLikeObject(document.body.children);
* // => true
*
* _.isArrayLikeObject('abc');
* // => false
*
* _.isArrayLikeObject(_.noop);
* // => false
*/
function isArrayLikeObject(value) {
return isObjectLike(value) && isArrayLike(value);
}
module.exports = isArrayLikeObject;
/***/ }),
/***/ 1358:
/***/ (function(module, exports, __webpack_require__) {
var copyObject = __webpack_require__(1139),
keysIn = __webpack_require__(1082);
/**
* Converts `value` to a plain object flattening inherited enumerable string
* keyed properties of `value` to own properties of the plain object.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Lang
* @param {*} value The value to convert.
* @returns {Object} Returns the converted plain object.
* @example
*
* function Foo() {
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.assign({ 'a': 1 }, new Foo);
* // => { 'a': 1, 'b': 2 }
*
* _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
* // => { 'a': 1, 'b': 2, 'c': 3 }
*/
function toPlainObject(value) {
return copyObject(value, keysIn(value));
}
module.exports = toPlainObject;
/***/ }),
/***/ 1359:
/***/ (function(module, exports, __webpack_require__) {
var baseRest = __webpack_require__(1360),
isIterateeCall = __webpack_require__(1367);
/**
* Creates a function like `_.assign`.
*
* @private
* @param {Function} assigner The function to assign values.
* @returns {Function} Returns the new assigner function.
*/
function createAssigner(assigner) {
return baseRest(function(object, sources) {
var index = -1,
length = sources.length,
customizer = length > 1 ? sources[length - 1] : undefined,
guard = length > 2 ? sources[2] : undefined;
customizer = (assigner.length > 3 && typeof customizer == 'function')
? (length--, customizer)
: undefined;
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
customizer = length < 3 ? undefined : customizer;
length = 1;
}
object = Object(object);
while (++index < length) {
var source = sources[index];
if (source) {
assigner(object, source, index, customizer);
}
}
return object;
});
}
module.exports = createAssigner;
/***/ }),
/***/ 1360:
/***/ (function(module, exports, __webpack_require__) {
var identity = __webpack_require__(1084),
overRest = __webpack_require__(1361),
setToString = __webpack_require__(1363);
/**
* The base implementation of `_.rest` which doesn't validate or coerce arguments.
*
* @private
* @param {Function} func The function to apply a rest parameter to.
* @param {number} [start=func.length-1] The start position of the rest parameter.
* @returns {Function} Returns the new function.
*/
function baseRest(func, start) {
return setToString(overRest(func, start, identity), func + '');
}
module.exports = baseRest;
/***/ }),
/***/ 1361:
/***/ (function(module, exports, __webpack_require__) {
var apply = __webpack_require__(1362);
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMax = Math.max;
/**
* A specialized version of `baseRest` which transforms the rest array.
*
* @private
* @param {Function} func The function to apply a rest parameter to.
* @param {number} [start=func.length-1] The start position of the rest parameter.
* @param {Function} transform The rest array transform.
* @returns {Function} Returns the new function.
*/
function overRest(func, start, transform) {
start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
return function() {
var args = arguments,
index = -1,
length = nativeMax(args.length - start, 0),
array = Array(length);
while (++index < length) {
array[index] = args[start + index];
}
index = -1;
var otherArgs = Array(start + 1);
while (++index < start) {
otherArgs[index] = args[index];
}
otherArgs[start] = transform(array);
return apply(func, this, otherArgs);
};
}
module.exports = overRest;
/***/ }),
/***/ 1362:
/***/ (function(module, exports) {
/**
* A faster alternative to `Function#apply`, this function invokes `func`
* with the `this` binding of `thisArg` and the arguments of `args`.
*
* @private
* @param {Function} func The function to invoke.
* @param {*} thisArg The `this` binding of `func`.
* @param {Array} args The arguments to invoke `func` with.
* @returns {*} Returns the result of `func`.
*/
function apply(func, thisArg, args) {
switch (args.length) {
case 0: return func.call(thisArg);
case 1: return func.call(thisArg, args[0]);
case 2: return func.call(thisArg, args[0], args[1]);
case 3: return func.call(thisArg, args[0], args[1], args[2]);
}
return func.apply(thisArg, args);
}
module.exports = apply;
/***/ }),
/***/ 1363:
/***/ (function(module, exports, __webpack_require__) {
var baseSetToString = __webpack_require__(1364),
shortOut = __webpack_require__(1366);
/**
* Sets the `toString` method of `func` to return `string`.
*
* @private
* @param {Function} func The function to modify.
* @param {Function} string The `toString` result.
* @returns {Function} Returns `func`.
*/
var setToString = shortOut(baseSetToString);
module.exports = setToString;
/***/ }),
/***/ 1364:
/***/ (function(module, exports, __webpack_require__) {
var constant = __webpack_require__(1365),
defineProperty = __webpack_require__(1105),
identity = __webpack_require__(1084);
/**
* The base implementation of `setToString` without support for hot loop shorting.
*
* @private
* @param {Function} func The function to modify.
* @param {Function} string The `toString` result.
* @returns {Function} Returns `func`.
*/
var baseSetToString = !defineProperty ? identity : function(func, string) {
return defineProperty(func, 'toString', {
'configurable': true,
'enumerable': false,
'value': constant(string),
'writable': true
});
};
module.exports = baseSetToString;
/***/ }),
/***/ 1365:
/***/ (function(module, exports) {
/**
* Creates a function that returns `value`.
*
* @static
* @memberOf _
* @since 2.4.0
* @category Util
* @param {*} value The value to return from the new function.
* @returns {Function} Returns the new constant function.
* @example
*
* var objects = _.times(2, _.constant({ 'a': 1 }));
*
* console.log(objects);
* // => [{ 'a': 1 }, { 'a': 1 }]
*
* console.log(objects[0] === objects[1]);
* // => true
*/
function constant(value) {
return function() {
return value;
};
}
module.exports = constant;
/***/ }),
/***/ 1366:
/***/ (function(module, exports) {
/** Used to detect hot functions by number of calls within a span of milliseconds. */
var HOT_COUNT = 800,
HOT_SPAN = 16;
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeNow = Date.now;
/**
* Creates a function that'll short out and invoke `identity` instead
* of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
* milliseconds.
*
* @private
* @param {Function} func The function to restrict.
* @returns {Function} Returns the new shortable function.
*/
function shortOut(func) {
var count = 0,
lastCalled = 0;
return function() {
var stamp = nativeNow(),
remaining = HOT_SPAN - (stamp - lastCalled);
lastCalled = stamp;
if (remaining > 0) {
if (++count >= HOT_COUNT) {
return arguments[0];
}
} else {
count = 0;
}
return func.apply(undefined, arguments);
};
}
module.exports = shortOut;
/***/ }),
/***/ 1367:
/***/ (function(module, exports, __webpack_require__) {
var eq = __webpack_require__(925),
isArrayLike = __webpack_require__(948),
isIndex = __webpack_require__(1083),
isObject = __webpack_require__(170);
/**
* Checks if the given arguments are from an iteratee call.
*
* @private
* @param {*} value The potential iteratee value argument.
* @param {*} index The potential iteratee index or key argument.
* @param {*} object The potential iteratee object argument.
* @returns {boolean} Returns `true` if the arguments are from an iteratee call,
* else `false`.
*/
function isIterateeCall(value, index, object) {
if (!isObject(object)) {
return false;
}
var type = typeof index;
if (type == 'number'
? (isArrayLike(object) && isIndex(index, object.length))
: (type == 'string' && index in object)
) {
return eq(object[index], value);
}
return false;
}
module.exports = isIterateeCall;
/***/ }),
/***/ 1368:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(__webpack_require__(0));
var _KeyCode = _interopRequireDefault(__webpack_require__(345));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _extends() { _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; }; return _extends.apply(this, arguments); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var __rest = void 0 && (void 0).__rest || function (s, e) {
var t = {};
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
/**
* Wrap of sub component which need use as Button capacity (like Icon component).
* This helps accessibility reader to tread as a interactive button to operation.
*/
var inlineStyle = {
border: 0,
background: 'transparent',
padding: 0,
lineHeight: 'inherit',
display: 'inline-block'
};
var TransButton =
/*#__PURE__*/
function (_React$Component) {
_inherits(TransButton, _React$Component);
function TransButton() {
var _this;
_classCallCheck(this, TransButton);
_this = _possibleConstructorReturn(this, _getPrototypeOf(TransButton).apply(this, arguments));
_this.onKeyDown = function (event) {
var keyCode = event.keyCode;
if (keyCode === _KeyCode["default"].ENTER) {
event.preventDefault();
}
};
_this.onKeyUp = function (event) {
var keyCode = event.keyCode;
var onClick = _this.props.onClick;
if (keyCode === _KeyCode["default"].ENTER && onClick) {
onClick();
}
};
_this.setRef = function (btn) {
_this.div = btn;
};
return _this;
}
_createClass(TransButton, [{
key: "focus",
value: function focus() {
if (this.div) {
this.div.focus();
}
}
}, {
key: "blur",
value: function blur() {
if (this.div) {
this.div.blur();
}
}
}, {
key: "render",
value: function render() {
var _a = this.props,
style = _a.style,
noStyle = _a.noStyle,
restProps = __rest(_a, ["style", "noStyle"]);
return React.createElement("div", _extends({
role: "button",
tabIndex: 0,
ref: this.setRef
}, restProps, {
onKeyDown: this.onKeyDown,
onKeyUp: this.onKeyUp,
style: _extends(_extends({}, !noStyle ? inlineStyle : null), style)
}));
}
}]);
return TransButton;
}(React.Component);
var _default = TransButton;
exports["default"] = _default;
//# sourceMappingURL=transButton.js.map
/***/ }),
/***/ 1370:
/***/ (function(module, exports, __webpack_require__) {
// style-loader: Adds some css to the DOM by adding a <style> tag
// load the styles
var content = __webpack_require__(1373);
if(typeof content === 'string') content = [[module.i, content, '']];
// Prepare cssTransformation
var transform;
var options = {"hmr":false}
options.transform = transform
// add the styles to the DOM
var update = __webpack_require__(313)(content, options);
if(content.locals) module.exports = content.locals;
/***/ }),
/***/ 1373:
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(312)(true);
// imports
// module
exports.push([module.i, ".ant-table-wrapper{zoom:1}.ant-table-wrapper:after,.ant-table-wrapper:before{display:table;content:\"\"}.ant-table-wrapper:after{clear:both}.ant-table{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;color:rgba(0,0,0,.65);font-size:14px;font-variant:tabular-nums;line-height:1.5;list-style:none;-webkit-font-feature-settings:\"tnum\";font-feature-settings:\"tnum\";position:relative;clear:both}.ant-table-body{-webkit-transition:opacity .3s;-o-transition:opacity .3s;transition:opacity .3s}.ant-table-empty .ant-table-body{overflow-x:auto!important;overflow-y:hidden!important}.ant-table table{width:100%;text-align:left;border-radius:4px 4px 0 0;border-collapse:separate;border-spacing:0}.ant-table-layout-fixed table{table-layout:fixed}.ant-table-thead>tr>th{color:rgba(0,0,0,.85);font-weight:500;text-align:left;background:#fafafa;border-bottom:1px solid #e8e8e8;-webkit-transition:background .3s ease;-o-transition:background .3s ease;transition:background .3s ease}.ant-table-thead>tr>th[colspan]:not([colspan=\"1\"]){text-align:center}.ant-table-thead>tr>th .ant-table-filter-icon,.ant-table-thead>tr>th .anticon-filter{position:absolute;top:0;right:0;width:28px;height:100%;color:#bfbfbf;font-size:12px;text-align:center;cursor:pointer;-webkit-transition:all .3s;-o-transition:all .3s;transition:all .3s}.ant-table-thead>tr>th .ant-table-filter-icon>svg,.ant-table-thead>tr>th .anticon-filter>svg{position:absolute;top:50%;left:50%;margin-top:-5px;margin-left:-6px}.ant-table-thead>tr>th .ant-table-filter-selected.anticon-filter{color:#1890ff}.ant-table-thead>tr>th .ant-table-column-sorter{display:table-cell;vertical-align:middle}.ant-table-thead>tr>th .ant-table-column-sorter .ant-table-column-sorter-inner{height:1em;margin-top:.35em;margin-left:.57142857em;color:#bfbfbf;line-height:1em;text-align:center;-webkit-transition:all .3s;-o-transition:all .3s;transition:all .3s}.ant-table-thead>tr>th .ant-table-column-sorter .ant-table-column-sorter-inner .ant-table-column-sorter-down,.ant-table-thead>tr>th .ant-table-column-sorter .ant-table-column-sorter-inner .ant-table-column-sorter-up{display:inline-block;font-size:12px;font-size:11px\\9;-webkit-transform:scale(.91666667) rotate(0deg);-ms-transform:scale(.91666667) rotate(0deg);transform:scale(.91666667) rotate(0deg);display:block;height:1em;line-height:1em;-webkit-transition:all .3s;-o-transition:all .3s;transition:all .3s}:root .ant-table-thead>tr>th .ant-table-column-sorter .ant-table-column-sorter-inner .ant-table-column-sorter-down,:root .ant-table-thead>tr>th .ant-table-column-sorter .ant-table-column-sorter-inner .ant-table-column-sorter-up{font-size:12px}.ant-table-thead>tr>th .ant-table-column-sorter .ant-table-column-sorter-inner .ant-table-column-sorter-down.on,.ant-table-thead>tr>th .ant-table-column-sorter .ant-table-column-sorter-inner .ant-table-column-sorter-up.on{color:#1890ff}.ant-table-thead>tr>th .ant-table-column-sorter .ant-table-column-sorter-inner-full{margin-top:-.15em}.ant-table-thead>tr>th .ant-table-column-sorter .ant-table-column-sorter-inner-full .ant-table-column-sorter-down,.ant-table-thead>tr>th .ant-table-column-sorter .ant-table-column-sorter-inner-full .ant-table-column-sorter-up{height:.5em;line-height:.5em}.ant-table-thead>tr>th .ant-table-column-sorter .ant-table-column-sorter-inner-full .ant-table-column-sorter-down{margin-top:.125em}.ant-table-thead>tr>th.ant-table-column-has-actions{position:relative;background-clip:padding-box;-webkit-background-clip:border-box}.ant-table-thead>tr>th.ant-table-column-has-actions.ant-table-column-has-filters{padding-right:30px!important}.ant-table-thead>tr>th.ant-table-column-has-actions.ant-table-column-has-filters .ant-table-filter-icon.ant-table-filter-open,.ant-table-thead>tr>th.ant-table-column-has-actions.ant-table-column-has-filters .anticon-filter.ant-table-filter-open,.ant-table-thead>tr>th.ant-table-column-has-actions.ant-table-column-has-filters:hover .ant-table-filter-icon:hover,.ant-table-thead>tr>th.ant-table-column-has-actions.ant-table-column-has-filte
// exports
/***/ }),
/***/ 1374:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(__webpack_require__(0));
var _omit = _interopRequireDefault(__webpack_require__(43));
var _rcTable = _interopRequireWildcard(__webpack_require__(1375));
var PropTypes = _interopRequireWildcard(__webpack_require__(1));
var _classnames = _interopRequireDefault(__webpack_require__(3));
var _shallowequal = _interopRequireDefault(__webpack_require__(60));
var _reactLifecyclesCompat = __webpack_require__(7);
var _filterDropdown = _interopRequireDefault(__webpack_require__(1388));
var _createStore = _interopRequireDefault(__webpack_require__(1392));
var _SelectionBox = _interopRequireDefault(__webpack_require__(1393));
var _SelectionCheckboxAll = _interopRequireDefault(__webpack_require__(1394));
var _Column = _interopRequireDefault(__webpack_require__(1395));
var _ColumnGroup = _interopRequireDefault(__webpack_require__(1396));
var _createBodyRow = _interopRequireDefault(__webpack_require__(1397));
var _util = __webpack_require__(1117);
var _scrollTo = _interopRequireDefault(__webpack_require__(1398));
var _pagination = _interopRequireDefault(__webpack_require__(906));
var _icon = _interopRequireDefault(__webpack_require__(26));
var _spin = _interopRequireDefault(__webpack_require__(73));
var _transButton = _interopRequireDefault(__webpack_require__(1368));
var _LocaleReceiver = _interopRequireDefault(__webpack_require__(71));
var _default2 = _interopRequireDefault(__webpack_require__(181));
var _configProvider = __webpack_require__(12);
var _warning = _interopRequireDefault(__webpack_require__(40));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _extends() { _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; }; return _extends.apply(this, arguments); }
var __rest = void 0 && (void 0).__rest || function (s, e) {
var t = {};
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
/* eslint-disable prefer-spread */
function noop() {}
function stopPropagation(e) {
e.stopPropagation();
}
function getRowSelection(props) {
return props.rowSelection || {};
}
function getColumnKey(column, index) {
return column.key || column.dataIndex || index;
}
function isSameColumn(a, b) {
if (a && b && a.key && a.key === b.key) {
return true;
}
return a === b || (0, _shallowequal["default"])(a, b, function (value, other) {
// https://github.com/ant-design/ant-design/issues/12737
if (typeof value === 'function' && typeof other === 'function') {
return value === other || value.toString() === other.toString();
} // https://github.com/ant-design/ant-design/issues/19398
if (Array.isArray(value) && Array.isArray(other)) {
return value === other || (0, _shallowequal["default"])(value, other);
}
});
}
var defaultPagination = {
onChange: noop,
onShowSizeChange: noop
};
/**
* Avoid creating new object, so that parent component's shouldComponentUpdate
* can works appropriately
*/
var emptyObject = {};
var createComponents = function createComponents() {
var components = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var bodyRow = components && components.body && components.body.row;
return _extends(_extends({}, components), {
body: _extends(_extends({}, components.body), {
row: (0, _createBodyRow["default"])(bodyRow)
})
});
};
function isTheSameComponents() {
var components1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var components2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
return components1 === components2 || ['table', 'header', 'body'].every(function (key) {
return (0, _shallowequal["default"])(components1[key], components2[key]);
});
}
function getFilteredValueColumns(state, columns) {
return (0, _util.flatFilter)(columns || (state || {}).columns || [], function (column) {
return typeof column.filteredValue !== 'undefined';
});
}
function getFiltersFromColumns() {
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var columns = arguments.length > 1 ? arguments[1] : undefined;
var filters = {};
getFilteredValueColumns(state, columns).forEach(function (col) {
var colKey = getColumnKey(col);
filters[colKey] = col.filteredValue;
});
return filters;
}
function isFiltersChanged(state, filters) {
if (Object.keys(filters).length !== Object.keys(state.filters).length) {
return true;
}
return Object.keys(filters).some(function (columnKey) {
return filters[columnKey] !== state.filters[columnKey];
});
}
var Table =
/*#__PURE__*/
function (_React$Component) {
_inherits(Table, _React$Component);
function Table(props) {
var _this;
_classCallCheck(this, Table);
_this = _possibleConstructorReturn(this, _getPrototypeOf(Table).call(this, props));
_this.setTableRef = function (table) {
_this.rcTable = table;
};
_this.getCheckboxPropsByItem = function (item, index) {
var rowSelection = getRowSelection(_this.props);
if (!rowSelection.getCheckboxProps) {
return {};
}
var key = _this.getRecordKey(item, index); // Cache checkboxProps
if (!_this.props.checkboxPropsCache[key]) {
_this.props.checkboxPropsCache[key] = rowSelection.getCheckboxProps(item) || {};
var checkboxProps = _this.props.checkboxPropsCache[key];
(0, _warning["default"])(!('checked' in checkboxProps) && !('defaultChecked' in checkboxProps), 'Table', 'Do not set `checked` or `defaultChecked` in `getCheckboxProps`. Please use `selectedRowKeys` instead.');
}
return _this.props.checkboxPropsCache[key];
};
_this.getRecordKey = function (record, index) {
var rowKey = _this.props.rowKey;
var recordKey = typeof rowKey === 'function' ? rowKey(record, index) : record[rowKey];
(0, _warning["default"])(recordKey !== undefined, 'Table', 'Each record in dataSource of table should have a unique `key` prop, ' + 'or set `rowKey` of Table to an unique primary key, ' + 'see https://u.ant.design/table-row-key');
return recordKey === undefined ? index : recordKey;
};
_this.onRow = function (prefixCls, record, index) {
var onRow = _this.props.onRow;
var custom = onRow ? onRow(record, index) : {};
return _extends(_extends({}, custom), {
prefixCls: prefixCls,
store: _this.props.store,
rowKey: _this.getRecordKey(record, index)
});
};
_this.generatePopupContainerFunc = function (getPopupContainer) {
var scroll = _this.props.scroll;
var table = _this.rcTable;
if (getPopupContainer) {
return getPopupContainer;
} // Use undefined to let rc component use default logic.
return scroll && table ? function () {
return table.tableNode;
} : undefined;
};
_this.scrollToFirstRow = function () {
var scroll = _this.props.scroll;
if (scroll && scroll.scrollToFirstRowOnChange !== false) {
(0, _scrollTo["default"])(0, {
getContainer: function getContainer() {
return _this.rcTable.bodyTable;
}
});
}
};
_this.handleFilter = function (column, nextFilters) {
var props = _this.props;
var pagination = _extends({}, _this.state.pagination);
var filters = _extends(_extends({}, _this.state.filters), _defineProperty({}, getColumnKey(column), nextFilters)); // Remove filters not in current columns
var currentColumnKeys = [];
(0, _util.treeMap)(_this.state.columns, function (c) {
if (!c.children) {
currentColumnKeys.push(getColumnKey(c));
}
});
Object.keys(filters).forEach(function (columnKey) {
if (currentColumnKeys.indexOf(columnKey) < 0) {
delete filters[columnKey];
}
});
if (props.pagination) {
// Reset current prop
pagination.current = 1;
pagination.onChange(pagination.current);
}
var newState = {
pagination: pagination,
filters: {}
};
var filtersToSetState = _extends({}, filters); // Remove filters which is controlled
getFilteredValueColumns(_this.state).forEach(function (col) {
var columnKey = getColumnKey(col);
if (columnKey) {
delete filtersToSetState[columnKey];
}
});
if (Object.keys(filtersToSetState).length > 0) {
newState.filters = filtersToSetState;
} // Controlled current prop will not respond user interaction
if (_typeof(props.pagination) === 'object' && 'current' in props.pagination) {
newState.pagination = _extends(_extends({}, pagination), {
current: _this.state.pagination.current
});
}
_this.setState(newState, function () {
_this.scrollToFirstRow();
_this.props.store.setState({
selectionDirty: false
});
var onChange = _this.props.onChange;
if (onChange) {
onChange.apply(null, _this.prepareParamsArguments(_extends(_extends({}, _this.state), {
selectionDirty: false,
filters: filters,
pagination: pagination
})));
}
});
};
_this.handleSelect = function (record, rowIndex, e) {
var checked = e.target.checked;
var nativeEvent = e.nativeEvent;
var defaultSelection = _this.props.store.getState().selectionDirty ? [] : _this.getDefaultSelection();
var selectedRowKeys = _this.props.store.getState().selectedRowKeys.concat(defaultSelection);
var key = _this.getRecordKey(record, rowIndex);
var pivot = _this.state.pivot;
var rows = _this.getFlatCurrentPageData();
var realIndex = rowIndex;
if (_this.props.expandedRowRender) {
realIndex = rows.findIndex(function (row) {
return _this.getRecordKey(row, rowIndex) === key;
});
}
if (nativeEvent.shiftKey && pivot !== undefined && realIndex !== pivot) {
var changeRowKeys = [];
var direction = Math.sign(pivot - realIndex);
var dist = Math.abs(pivot - realIndex);
var step = 0;
var _loop = function _loop() {
var i = realIndex + step * direction;
step += 1;
var row = rows[i];
var rowKey = _this.getRecordKey(row, i);
var checkboxProps = _this.getCheckboxPropsByItem(row, i);
if (!checkboxProps.disabled) {
if (selectedRowKeys.includes(rowKey)) {
if (!checked) {
selectedRowKeys = selectedRowKeys.filter(function (j) {
return rowKey !== j;
});
changeRowKeys.push(rowKey);
}
} else if (checked) {
selectedRowKeys.push(rowKey);
changeRowKeys.push(rowKey);
}
}
};
while (step <= dist) {
_loop();
}
_this.setState({
pivot: realIndex
});
_this.props.store.setState({
selectionDirty: true
});
_this.setSelectedRowKeys(selectedRowKeys, {
selectWay: 'onSelectMultiple',
record: record,
checked: checked,
changeRowKeys: changeRowKeys,
nativeEvent: nativeEvent
});
} else {
if (checked) {
selectedRowKeys.push(_this.getRecordKey(record, realIndex));
} else {
selectedRowKeys = selectedRowKeys.filter(function (i) {
return key !== i;
});
}
_this.setState({
pivot: realIndex
});
_this.props.store.setState({
selectionDirty: true
});
_this.setSelectedRowKeys(selectedRowKeys, {
selectWay: 'onSelect',
record: record,
checked: checked,
changeRowKeys: undefined,
nativeEvent: nativeEvent
});
}
};
_this.handleRadioSelect = function (record, rowIndex, e) {
var checked = e.target.checked;
var nativeEvent = e.nativeEvent;
var key = _this.getRecordKey(record, rowIndex);
var selectedRowKeys = [key];
_this.props.store.setState({
selectionDirty: true
});
_this.setSelectedRowKeys(selectedRowKeys, {
selectWay: 'onSelect',
record: record,
checked: checked,
changeRowKeys: undefined,
nativeEvent: nativeEvent
});
};
_this.handleSelectRow = function (selectionKey, index, onSelectFunc) {
var data = _this.getFlatCurrentPageData();
var defaultSelection = _this.props.store.getState().selectionDirty ? [] : _this.getDefaultSelection();
var selectedRowKeys = _this.props.store.getState().selectedRowKeys.concat(defaultSelection);
var changeableRowKeys = data.filter(function (item, i) {
return !_this.getCheckboxPropsByItem(item, i).disabled;
}).map(function (item, i) {
return _this.getRecordKey(item, i);
});
var changeRowKeys = [];
var selectWay = 'onSelectAll';
var checked; // handle default selection
switch (selectionKey) {
case 'all':
changeableRowKeys.forEach(function (key) {
if (selectedRowKeys.indexOf(key) < 0) {
selectedRowKeys.push(key);
changeRowKeys.push(key);
}
});
selectWay = 'onSelectAll';
checked = true;
break;
case 'removeAll':
changeableRowKeys.forEach(function (key) {
if (selectedRowKeys.indexOf(key) >= 0) {
selectedRowKeys.splice(selectedRowKeys.indexOf(key), 1);
changeRowKeys.push(key);
}
});
selectWay = 'onSelectAll';
checked = false;
break;
case 'invert':
changeableRowKeys.forEach(function (key) {
if (selectedRowKeys.indexOf(key) < 0) {
selectedRowKeys.push(key);
} else {
selectedRowKeys.splice(selectedRowKeys.indexOf(key), 1);
}
changeRowKeys.push(key);
selectWay = 'onSelectInvert';
});
break;
default:
break;
}
_this.props.store.setState({
selectionDirty: true
}); // when select custom selection, callback selections[n].onSelect
var rowSelection = _this.props.rowSelection;
var customSelectionStartIndex = 2;
if (rowSelection && rowSelection.hideDefaultSelections) {
customSelectionStartIndex = 0;
}
if (index >= customSelectionStartIndex && typeof onSelectFunc === 'function') {
return onSelectFunc(changeableRowKeys);
}
_this.setSelectedRowKeys(selectedRowKeys, {
selectWay: selectWay,
checked: checked,
changeRowKeys: changeRowKeys
});
};
_this.handlePageChange = function (current) {
var props = _this.props;
var pagination = _extends({}, _this.state.pagination);
if (current) {
pagination.current = current;
} else {
pagination.current = pagination.current || 1;
}
for (var _len = arguments.length, otherArguments = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
otherArguments[_key - 1] = arguments[_key];
}
pagination.onChange.apply(pagination, [pagination.current].concat(otherArguments));
var newState = {
pagination: pagination
}; // Controlled current prop will not respond user interaction
if (props.pagination && _typeof(props.pagination) === 'object' && 'current' in props.pagination) {
newState.pagination = _extends(_extends({}, pagination), {
current: _this.state.pagination.current
});
}
_this.setState(newState, _this.scrollToFirstRow);
_this.props.store.setState({
selectionDirty: false
});
var onChange = _this.props.onChange;
if (onChange) {
onChange.apply(null, _this.prepareParamsArguments(_extends(_extends({}, _this.state), {
selectionDirty: false,
pagination: pagination
})));
}
};
_this.handleShowSizeChange = function (current, pageSize) {
var pagination = _this.state.pagination;
pagination.onShowSizeChange(current, pageSize);
var nextPagination = _extends(_extends({}, pagination), {
pageSize: pageSize,
current: current
});
_this.setState({
pagination: nextPagination
}, _this.scrollToFirstRow);
var onChange = _this.props.onChange;
if (onChange) {
onChange.apply(null, _this.prepareParamsArguments(_extends(_extends({}, _this.state), {
pagination: nextPagination
})));
}
};
_this.renderExpandIcon = function (prefixCls) {
return function (_ref) {
var expandable = _ref.expandable,
expanded = _ref.expanded,
needIndentSpaced = _ref.needIndentSpaced,
record = _ref.record,
onExpand = _ref.onExpand;
if (expandable) {
return React.createElement(_LocaleReceiver["default"], {
componentName: "Table",
defaultLocale: _default2["default"].Table
}, function (locale) {
var _classNames;
return React.createElement(_transButton["default"], {
className: (0, _classnames["default"])("".concat(prefixCls, "-row-expand-icon"), (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-row-collapsed"), !expanded), _defineProperty(_classNames, "".concat(prefixCls, "-row-expanded"), expanded), _classNames)),
onClick: function onClick(event) {
onExpand(record, event);
},
"aria-label": expanded ? locale.collapse : locale.expand,
noStyle: true
});
});
}
if (needIndentSpaced) {
return React.createElement("span", {
className: "".concat(prefixCls, "-row-expand-icon ").concat(prefixCls, "-row-spaced")
});
}
return null;
};
};
_this.renderSelectionBox = function (type) {
return function (_, record, index) {
var rowKey = _this.getRecordKey(record, index);
var props = _this.getCheckboxPropsByItem(record, index);
var handleChange = function handleChange(e) {
return type === 'radio' ? _this.handleRadioSelect(record, index, e) : _this.handleSelect(record, index, e);
};
return React.createElement("span", {
onClick: stopPropagation
}, React.createElement(_SelectionBox["default"], _extends({
type: type,
store: _this.props.store,
rowIndex: rowKey,
onChange: handleChange,
defaultSelection: _this.getDefaultSelection()
}, props)));
};
};
_this.renderTable = function (_ref2) {
var _classNames2;
var prefixCls = _ref2.prefixCls,
renderEmpty = _ref2.renderEmpty,
dropdownPrefixCls = _ref2.dropdownPrefixCls,
contextLocale = _ref2.contextLocale,
contextGetPopupContainer = _ref2.getPopupContainer;
var _a = _this.props,
showHeader = _a.showHeader,
locale = _a.locale,
getPopupContainer = _a.getPopupContainer,
restTableProps = __rest(_a, ["showHeader", "locale", "getPopupContainer"]); // do not pass prop.style to rc-table, since already apply it to container div
var restProps = (0, _omit["default"])(restTableProps, ['style']);
var data = _this.getCurrentPageData();
var expandIconAsCell = _this.props.expandedRowRender && _this.props.expandIconAsCell !== false; // use props.getPopupContainer first
var realGetPopupContainer = getPopupContainer || contextGetPopupContainer; // Merge too locales
var mergedLocale = _extends(_extends({}, contextLocale), locale);
if (!locale || !locale.emptyText) {
mergedLocale.emptyText = renderEmpty('Table');
}
var classString = (0, _classnames["default"])("".concat(prefixCls, "-").concat(_this.props.size), (_classNames2 = {}, _defineProperty(_classNames2, "".concat(prefixCls, "-bordered"), _this.props.bordered), _defineProperty(_classNames2, "".concat(prefixCls, "-empty"), !data.length), _defineProperty(_classNames2, "".concat(prefixCls, "-without-column-header"), !showHeader), _classNames2));
var columnsWithRowSelection = _this.renderRowSelection({
prefixCls: prefixCls,
locale: mergedLocale,
getPopupContainer: realGetPopupContainer
});
var columns = _this.renderColumnsDropdown({
columns: columnsWithRowSelection,
prefixCls: prefixCls,
dropdownPrefixCls: dropdownPrefixCls,
locale: mergedLocale,
getPopupContainer: realGetPopupContainer
}).map(function (column, i) {
var newColumn = _extends({}, column);
newColumn.key = getColumnKey(newColumn, i);
return newColumn;
});
var expandIconColumnIndex = columns[0] && columns[0].key === 'selection-column' ? 1 : 0;
if ('expandIconColumnIndex' in restProps) {
expandIconColumnIndex = restProps.expandIconColumnIndex;
}
return React.createElement(_rcTable["default"], _extends({
ref: _this.setTableRef,
key: "table",
expandIcon: _this.renderExpandIcon(prefixCls)
}, restProps, {
onRow: function onRow(record, index) {
return _this.onRow(prefixCls, record, index);
},
components: _this.state.components,
prefixCls: prefixCls,
data: data,
columns: columns,
showHeader: showHeader,
className: classString,
expandIconColumnIndex: expandIconColumnIndex,
expandIconAsCell: expandIconAsCell,
emptyText: mergedLocale.emptyText
}));
};
_this.renderComponent = function (_ref3) {
var getPrefixCls = _ref3.getPrefixCls,
renderEmpty = _ref3.renderEmpty,
getPopupContainer = _ref3.getPopupContainer;
var _this$props = _this.props,
customizePrefixCls = _this$props.prefixCls,
customizeDropdownPrefixCls = _this$props.dropdownPrefixCls,
style = _this$props.style,
className = _this$props.className;
var data = _this.getCurrentPageData();
var loading = _this.props.loading;
if (typeof loading === 'boolean') {
loading = {
spinning: loading
};
}
var prefixCls = getPrefixCls('table', customizePrefixCls);
var dropdownPrefixCls = getPrefixCls('dropdown', customizeDropdownPrefixCls);
var table = React.createElement(_LocaleReceiver["default"], {
componentName: "Table",
defaultLocale: _default2["default"].Table
}, function (locale) {
return _this.renderTable({
prefixCls: prefixCls,
renderEmpty: renderEmpty,
dropdownPrefixCls: dropdownPrefixCls,
contextLocale: locale,
getPopupContainer: getPopupContainer
});
}); // if there is no pagination or no data,
// the height of spin should decrease by half of pagination
var paginationPatchClass = _this.hasPagination() && data && data.length !== 0 ? "".concat(prefixCls, "-with-pagination") : "".concat(prefixCls, "-without-pagination");
return React.createElement("div", {
className: (0, _classnames["default"])("".concat(prefixCls, "-wrapper"), className),
style: style
}, React.createElement(_spin["default"], _extends({}, loading, {
className: loading.spinning ? "".concat(paginationPatchClass, " ").concat(prefixCls, "-spin-holder") : ''
}), _this.renderPagination(prefixCls, 'top'), table, _this.renderPagination(prefixCls, 'bottom')));
};
var expandedRowRender = props.expandedRowRender,
columnsProp = props.columns;
(0, _warning["default"])(!('columnsPageRange' in props || 'columnsPageSize' in props), 'Table', '`columnsPageRange` and `columnsPageSize` are removed, please use ' + 'fixed columns instead, see: https://u.ant.design/fixed-columns.');
if (expandedRowRender && (columnsProp || []).some(function (_ref4) {
var fixed = _ref4.fixed;
return !!fixed;
})) {
(0, _warning["default"])(false, 'Table', '`expandedRowRender` and `Column.fixed` are not compatible. Please use one of them at one time.');
}
var columns = columnsProp || (0, _util.normalizeColumns)(props.children);
_this.state = _extends(_extends({}, _this.getDefaultSortOrder(columns || [])), {
// 减少状态
filters: _this.getDefaultFilters(columns),
pagination: _this.getDefaultPagination(props),
pivot: undefined,
prevProps: props,
components: createComponents(props.components),
columns: columns
});
return _this;
}
_createClass(Table, [{
key: "componentDidUpdate",
value: function componentDidUpdate() {
var _this$state = this.state,
columns = _this$state.columns,
sortColumn = _this$state.sortColumn,
sortOrder = _this$state.sortOrder;
if (this.getSortOrderColumns(columns).length > 0) {
var sortState = this.getSortStateFromColumns(columns);
if (!isSameColumn(sortState.sortColumn, sortColumn) || sortState.sortOrder !== sortOrder) {
this.setState(sortState);
}
}
}
}, {
key: "getDefaultSelection",
value: function getDefaultSelection() {
var _this2 = this;
var rowSelection = getRowSelection(this.props);
if (!rowSelection.getCheckboxProps) {
return [];
}
return this.getFlatData().filter(function (item, rowIndex) {
return _this2.getCheckboxPropsByItem(item, rowIndex).defaultChecked;
}).map(function (record, rowIndex) {
return _this2.getRecordKey(record, rowIndex);
});
}
}, {
key: "getDefaultPagination",
value: function getDefaultPagination(props) {
var pagination = _typeof(props.pagination) === 'object' ? props.pagination : {};
var current;
if ('current' in pagination) {
current = pagination.current;
} else if ('defaultCurrent' in pagination) {
current = pagination.defaultCurrent;
}
var pageSize;
if ('pageSize' in pagination) {
pageSize = pagination.pageSize;
} else if ('defaultPageSize' in pagination) {
pageSize = pagination.defaultPageSize;
}
return this.hasPagination(props) ? _extends(_extends(_extends({}, defaultPagination), pagination), {
current: current || 1,
pageSize: pageSize || 10
}) : {};
}
}, {
key: "getSortOrderColumns",
value: function getSortOrderColumns(columns) {
return (0, _util.flatFilter)(columns || (this.state || {}).columns || [], function (column) {
return 'sortOrder' in column;
});
}
}, {
key: "getDefaultFilters",
value: function getDefaultFilters(columns) {
var definedFilters = getFiltersFromColumns(this.state, columns);
var defaultFilteredValueColumns = (0, _util.flatFilter)(columns || [], function (column) {
return typeof column.defaultFilteredValue !== 'undefined';
});
var defaultFilters = defaultFilteredValueColumns.reduce(function (soFar, col) {
var colKey = getColumnKey(col);
soFar[colKey] = col.defaultFilteredValue;
return soFar;
}, {});
return _extends(_extends({}, defaultFilters), definedFilters);
}
}, {
key: "getDefaultSortOrder",
value: function getDefaultSortOrder(columns) {
var definedSortState = this.getSortStateFromColumns(columns);
var defaultSortedColumn = (0, _util.flatFilter)(columns || [], function (column) {
return column.defaultSortOrder != null;
})[0];
if (defaultSortedColumn && !definedSortState.sortColumn) {
return {
sortColumn: defaultSortedColumn,
sortOrder: defaultSortedColumn.defaultSortOrder
};
}
return definedSortState;
}
}, {
key: "getSortStateFromColumns",
value: function getSortStateFromColumns(columns) {
// return first column which sortOrder is not falsy
var sortedColumn = this.getSortOrderColumns(columns).filter(function (col) {
return col.sortOrder;
})[0];
if (sortedColumn) {
return {
sortColumn: sortedColumn,
sortOrder: sortedColumn.sortOrder
};
}
return {
sortColumn: null,
sortOrder: null
};
}
}, {
key: "getMaxCurrent",
value: function getMaxCurrent(total) {
var _this$state$paginatio = this.state.pagination,
current = _this$state$paginatio.current,
pageSize = _this$state$paginatio.pageSize;
if ((current - 1) * pageSize >= total) {
return Math.floor((total - 1) / pageSize) + 1;
}
return current;
}
}, {
key: "getSorterFn",
value: function getSorterFn(state) {
var _ref5 = state || this.state,
sortOrder = _ref5.sortOrder,
sortColumn = _ref5.sortColumn;
if (!sortOrder || !sortColumn || typeof sortColumn.sorter !== 'function') {
return;
}
return function (a, b) {
var result = sortColumn.sorter(a, b, sortOrder);
if (result !== 0) {
return sortOrder === 'descend' ? -result : result;
}
return 0;
};
}
}, {
key: "getCurrentPageData",
value: function getCurrentPageData() {
var data = this.getLocalData();
var current;
var pageSize;
var state = this.state; // 如果没有分页的话,默认全部展示
if (!this.hasPagination()) {
pageSize = Number.MAX_VALUE;
current = 1;
} else {
pageSize = state.pagination.pageSize;
current = this.getMaxCurrent(state.pagination.total || data.length);
} // 分页
// ---
// 当数据量少于等于每页数量时,直接设置数据
// 否则进行读取分页数据
if (data.length > pageSize || pageSize === Number.MAX_VALUE) {
data = data.slice((current - 1) * pageSize, current * pageSize);
}
return data;
}
}, {
key: "getFlatData",
value: function getFlatData() {
var childrenColumnName = this.props.childrenColumnName;
return (0, _util.flatArray)(this.getLocalData(null, false), childrenColumnName);
}
}, {
key: "getFlatCurrentPageData",
value: function getFlatCurrentPageData() {
var childrenColumnName = this.props.childrenColumnName;
return (0, _util.flatArray)(this.getCurrentPageData(), childrenColumnName);
}
}, {
key: "getLocalData",
value: function getLocalData(state) {
var _this3 = this;
var filter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
var currentState = state || this.state;
var dataSource = this.props.dataSource;
var data = dataSource || []; // 优化本地排序
data = data.slice(0);
var sorterFn = this.getSorterFn(currentState);
if (sorterFn) {
data = this.recursiveSort(data, sorterFn);
} // 筛选
if (filter && currentState.filters) {
Object.keys(currentState.filters).forEach(function (columnKey) {
var col = _this3.findColumn(columnKey);
if (!col) {
return;
}
var values = currentState.filters[columnKey] || [];
if (values.length === 0) {
return;
}
var onFilter = col.onFilter;
data = onFilter ? data.filter(function (record) {
return values.some(function (v) {
return onFilter(v, record);
});
}) : data;
});
}
return data;
}
}, {
key: "setSelectedRowKeys",
value: function setSelectedRowKeys(selectedRowKeys, selectionInfo) {
var _this4 = this;
var selectWay = selectionInfo.selectWay,
record = selectionInfo.record,
checked = selectionInfo.checked,
changeRowKeys = selectionInfo.changeRowKeys,
nativeEvent = selectionInfo.nativeEvent;
var rowSelection = getRowSelection(this.props);
if (rowSelection && !('selectedRowKeys' in rowSelection)) {
this.props.store.setState({
selectedRowKeys: selectedRowKeys
});
}
var data = this.getFlatData();
if (!rowSelection.onChange && !rowSelection[selectWay]) {
return;
}
var selectedRows = data.filter(function (row, i) {
return selectedRowKeys.indexOf(_this4.getRecordKey(row, i)) >= 0;
});
if (rowSelection.onChange) {
rowSelection.onChange(selectedRowKeys, selectedRows);
}
if (selectWay === 'onSelect' && rowSelection.onSelect) {
rowSelection.onSelect(record, checked, selectedRows, nativeEvent);
} else if (selectWay === 'onSelectMultiple' && rowSelection.onSelectMultiple) {
var changeRows = data.filter(function (row, i) {
return changeRowKeys.indexOf(_this4.getRecordKey(row, i)) >= 0;
});
rowSelection.onSelectMultiple(checked, selectedRows, changeRows);
} else if (selectWay === 'onSelectAll' && rowSelection.onSelectAll) {
var _changeRows = data.filter(function (row, i) {
return changeRowKeys.indexOf(_this4.getRecordKey(row, i)) >= 0;
});
rowSelection.onSelectAll(checked, selectedRows, _changeRows);
} else if (selectWay === 'onSelectInvert' && rowSelection.onSelectInvert) {
rowSelection.onSelectInvert(selectedRowKeys);
}
}
}, {
key: "toggleSortOrder",
value: function toggleSortOrder(column) {
var sortDirections = column.sortDirections || this.props.sortDirections;
var _this$state2 = this.state,
sortOrder = _this$state2.sortOrder,
sortColumn = _this$state2.sortColumn; // 只同时允许一列进行排序,否则会导致排序顺序的逻辑问题
var newSortOrder; // 切换另一列时,丢弃 sortOrder 的状态
if (isSameColumn(sortColumn, column) && sortOrder !== undefined) {
// 按照sortDirections的内容依次切换排序状态
var methodIndex = sortDirections.indexOf(sortOrder) + 1;
newSortOrder = methodIndex === sortDirections.length ? undefined : sortDirections[methodIndex];
} else {
newSortOrder = sortDirections[0];
}
var newState = {
sortOrder: newSortOrder,
sortColumn: newSortOrder ? column : null
}; // Controlled
if (this.getSortOrderColumns().length === 0) {
this.setState(newState, this.scrollToFirstRow);
}
var onChange = this.props.onChange;
if (onChange) {
onChange.apply(null, this.prepareParamsArguments(_extends(_extends({}, this.state), newState), column));
}
}
}, {
key: "hasPagination",
value: function hasPagination(props) {
return (props || this.props).pagination !== false;
}
}, {
key: "isSortColumn",
value: function isSortColumn(column) {
var sortColumn = this.state.sortColumn;
if (!column || !sortColumn) {
return false;
}
return getColumnKey(sortColumn) === getColumnKey(column);
} // Get pagination, filters, sorter
}, {
key: "prepareParamsArguments",
value: function prepareParamsArguments(state, column) {
var pagination = _extends({}, state.pagination); // remove useless handle function in Table.onChange
delete pagination.onChange;
delete pagination.onShowSizeChange;
var filters = state.filters;
var sorter = {};
var currentColumn = column;
if (state.sortColumn && state.sortOrder) {
currentColumn = state.sortColumn;
sorter.column = state.sortColumn;
sorter.order = state.sortOrder;
}
if (currentColumn) {
sorter.field = currentColumn.dataIndex;
sorter.columnKey = getColumnKey(currentColumn);
}
var extra = {
currentDataSource: this.getLocalData(state)
};
return [pagination, filters, sorter, extra];
}
}, {
key: "findColumn",
value: function findColumn(myKey) {
var column;
(0, _util.treeMap)(this.state.columns, function (c) {
if (getColumnKey(c) === myKey) {
column = c;
}
});
return column;
}
}, {
key: "recursiveSort",
value: function recursiveSort(data, sorterFn) {
var _this5 = this;
var _this$props$childrenC = this.props.childrenColumnName,
childrenColumnName = _this$props$childrenC === void 0 ? 'children' : _this$props$childrenC;
return data.sort(sorterFn).map(function (item) {
return item[childrenColumnName] ? _extends(_extends({}, item), _defineProperty({}, childrenColumnName, _this5.recursiveSort(item[childrenColumnName], sorterFn))) : item;
});
}
}, {
key: "renderPagination",
value: function renderPagination(prefixCls, paginationPosition) {
// 强制不需要分页
if (!this.hasPagination()) {
return null;
}
var size = 'default';
var pagination = this.state.pagination;
if (pagination.size) {
size = pagination.size;
} else if (this.props.size === 'middle' || this.props.size === 'small') {
size = 'small';
}
var position = pagination.position || 'bottom';
var total = pagination.total || this.getLocalData().length;
return total > 0 && (position === paginationPosition || position === 'both') ? React.createElement(_pagination["default"], _extends({
key: "pagination-".concat(paginationPosition)
}, pagination, {
className: (0, _classnames["default"])(pagination.className, "".concat(prefixCls, "-pagination")),
onChange: this.handlePageChange,
total: total,
size: size,
current: this.getMaxCurrent(total),
onShowSizeChange: this.handleShowSizeChange
})) : null;
}
}, {
key: "renderRowSelection",
value: function renderRowSelection(_ref6) {
var _this6 = this;
var prefixCls = _ref6.prefixCls,
locale = _ref6.locale,
getPopupContainer = _ref6.getPopupContainer;
var rowSelection = this.props.rowSelection;
var columns = this.state.columns.concat();
if (rowSelection) {
var data = this.getFlatCurrentPageData().filter(function (item, index) {
if (rowSelection.getCheckboxProps) {
return !_this6.getCheckboxPropsByItem(item, index).disabled;
}
return true;
});
var selectionColumnClass = (0, _classnames["default"])("".concat(prefixCls, "-selection-column"), _defineProperty({}, "".concat(prefixCls, "-selection-column-custom"), rowSelection.selections));
var selectionColumn = _defineProperty({
key: 'selection-column',
render: this.renderSelectionBox(rowSelection.type),
className: selectionColumnClass,
fixed: rowSelection.fixed,
width: rowSelection.columnWidth,
title: rowSelection.columnTitle
}, _rcTable.INTERNAL_COL_DEFINE, {
className: "".concat(prefixCls, "-selection-col")
});
if (rowSelection.type !== 'radio') {
var checkboxAllDisabled = data.every(function (item, index) {
return _this6.getCheckboxPropsByItem(item, index).disabled;
});
selectionColumn.title = selectionColumn.title || React.createElement(_SelectionCheckboxAll["default"], {
store: this.props.store,
locale: locale,
data: data,
getCheckboxPropsByItem: this.getCheckboxPropsByItem,
getRecordKey: this.getRecordKey,
disabled: checkboxAllDisabled,
prefixCls: prefixCls,
onSelect: this.handleSelectRow,
selections: rowSelection.selections,
hideDefaultSelections: rowSelection.hideDefaultSelections,
getPopupContainer: this.generatePopupContainerFunc(getPopupContainer)
});
}
if ('fixed' in rowSelection) {
selectionColumn.fixed = rowSelection.fixed;
} else if (columns.some(function (column) {
return column.fixed === 'left' || column.fixed === true;
})) {
selectionColumn.fixed = 'left';
}
if (columns[0] && columns[0].key === 'selection-column') {
columns[0] = selectionColumn;
} else {
columns.unshift(selectionColumn);
}
}
return columns;
}
}, {
key: "renderColumnsDropdown",
value: function renderColumnsDropdown(_ref7) {
var _this7 = this;
var prefixCls = _ref7.prefixCls,
dropdownPrefixCls = _ref7.dropdownPrefixCls,
columns = _ref7.columns,
locale = _ref7.locale,
getPopupContainer = _ref7.getPopupContainer;
var _this$state3 = this.state,
sortOrder = _this$state3.sortOrder,
filters = _this$state3.filters;
return (0, _util.treeMap)(columns, function (column, i) {
var _classNames4;
var key = getColumnKey(column, i);
var filterDropdown;
var sortButton;
var onHeaderCell = column.onHeaderCell;
var isSortColumn = _this7.isSortColumn(column);
if (column.filters && column.filters.length > 0 || column.filterDropdown) {
var colFilters = key in filters ? filters[key] : [];
filterDropdown = React.createElement(_filterDropdown["default"], {
locale: locale,
column: column,
selectedKeys: colFilters,
confirmFilter: _this7.handleFilter,
prefixCls: "".concat(prefixCls, "-filter"),
dropdownPrefixCls: dropdownPrefixCls || 'ant-dropdown',
getPopupContainer: _this7.generatePopupContainerFunc(getPopupContainer),
key: "filter-dropdown"
});
}
if (column.sorter) {
var sortDirections = column.sortDirections || _this7.props.sortDirections;
var isAscend = isSortColumn && sortOrder === 'ascend';
var isDescend = isSortColumn && sortOrder === 'descend';
var ascend = sortDirections.indexOf('ascend') !== -1 && React.createElement(_icon["default"], {
className: "".concat(prefixCls, "-column-sorter-up ").concat(isAscend ? 'on' : 'off'),
type: "caret-up",
theme: "filled"
});
var descend = sortDirections.indexOf('descend') !== -1 && React.createElement(_icon["default"], {
className: "".concat(prefixCls, "-column-sorter-down ").concat(isDescend ? 'on' : 'off'),
type: "caret-down",
theme: "filled"
});
sortButton = React.createElement("div", {
title: locale.sortTitle,
className: (0, _classnames["default"])("".concat(prefixCls, "-column-sorter-inner"), ascend && descend && "".concat(prefixCls, "-column-sorter-inner-full")),
key: "sorter"
}, ascend, descend);
onHeaderCell = function onHeaderCell(col) {
var colProps = {}; // Get original first
if (column.onHeaderCell) {
colProps = _extends({}, column.onHeaderCell(col));
} // Add sorter logic
var onHeaderCellClick = colProps.onClick;
colProps.onClick = function () {
_this7.toggleSortOrder(column);
if (onHeaderCellClick) {
onHeaderCellClick.apply(void 0, arguments);
}
};
return colProps;
};
}
return _extends(_extends({}, column), {
className: (0, _classnames["default"])(column.className, (_classNames4 = {}, _defineProperty(_classNames4, "".concat(prefixCls, "-column-has-actions"), sortButton || filterDropdown), _defineProperty(_classNames4, "".concat(prefixCls, "-column-has-filters"), filterDropdown), _defineProperty(_classNames4, "".concat(prefixCls, "-column-has-sorters"), sortButton), _defineProperty(_classNames4, "".concat(prefixCls, "-column-sort"), isSortColumn && sortOrder), _classNames4)),
title: [React.createElement("span", {
key: "title",
className: "".concat(prefixCls, "-header-column")
}, React.createElement("div", {
className: sortButton ? "".concat(prefixCls, "-column-sorters") : undefined
}, React.createElement("span", {
className: "".concat(prefixCls, "-column-title")
}, _this7.renderColumnTitle(column.title)), React.createElement("span", {
className: "".concat(prefixCls, "-column-sorter")
}, sortButton))), filterDropdown],
onHeaderCell: onHeaderCell
});
});
}
}, {
key: "renderColumnTitle",
value: function renderColumnTitle(title) {
var _this$state4 = this.state,
filters = _this$state4.filters,
sortOrder = _this$state4.sortOrder,
sortColumn = _this$state4.sortColumn; // https://github.com/ant-design/ant-design/issues/11246#issuecomment-405009167
if (title instanceof Function) {
return title({
filters: filters,
sortOrder: sortOrder,
sortColumn: sortColumn
});
}
return title;
}
}, {
key: "render",
value: function render() {
return React.createElement(_configProvider.ConfigConsumer, null, this.renderComponent);
}
}], [{
key: "getDerivedStateFromProps",
value: function getDerivedStateFromProps(nextProps, prevState) {
var prevProps = prevState.prevProps;
var columns = nextProps.columns || (0, _util.normalizeColumns)(nextProps.children);
var nextState = _extends(_extends({}, prevState), {
prevProps: nextProps,
columns: columns
});
if ('pagination' in nextProps || 'pagination' in prevProps) {
var newPagination = _extends(_extends(_extends({}, defaultPagination), prevState.pagination), nextProps.pagination);
newPagination.current = newPagination.current || 1;
newPagination.pageSize = newPagination.pageSize || 10;
nextState = _extends(_extends({}, nextState), {
pagination: nextProps.pagination !== false ? newPagination : emptyObject
});
}
if (nextProps.rowSelection && 'selectedRowKeys' in nextProps.rowSelection) {
nextProps.store.setState({
selectedRowKeys: nextProps.rowSelection.selectedRowKeys || []
});
} else if (prevProps.rowSelection && !nextProps.rowSelection) {
nextProps.store.setState({
selectedRowKeys: []
});
}
if ('dataSource' in nextProps && nextProps.dataSource !== prevProps.dataSource) {
nextProps.store.setState({
selectionDirty: false
});
} // https://github.com/ant-design/ant-design/issues/10133
nextProps.setCheckboxPropsCache({}); // Update filters
var filteredValueColumns = getFilteredValueColumns(nextState, nextState.columns);
if (filteredValueColumns.length > 0) {
var filtersFromColumns = getFiltersFromColumns(nextState, nextState.columns);
var newFilters = _extends({}, nextState.filters);
Object.keys(filtersFromColumns).forEach(function (key) {
newFilters[key] = filtersFromColumns[key];
});
if (isFiltersChanged(nextState, newFilters)) {
nextState = _extends(_extends({}, nextState), {
filters: newFilters
});
}
}
if (!isTheSameComponents(nextProps.components, prevProps.components)) {
var components = createComponents(nextProps.components);
nextState = _extends(_extends({}, nextState), {
components: components
});
}
return nextState;
}
}]);
return Table;
}(React.Component);
Table.propTypes = {
dataSource: PropTypes.array,
columns: PropTypes.array,
prefixCls: PropTypes.string,
useFixedHeader: PropTypes.bool,
rowSelection: PropTypes.object,
className: PropTypes.string,
size: PropTypes.string,
loading: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),
bordered: PropTypes.bool,
onChange: PropTypes.func,
locale: PropTypes.object,
dropdownPrefixCls: PropTypes.string,
sortDirections: PropTypes.array,
getPopupContainer: PropTypes.func
};
Table.defaultProps = {
dataSource: [],
useFixedHeader: false,
className: '',
size: 'default',
loading: false,
bordered: false,
indentSize: 20,
locale: {},
rowKey: 'key',
showHeader: true,
sortDirections: ['ascend', 'descend'],
childrenColumnName: 'children'
};
(0, _reactLifecyclesCompat.polyfill)(Table);
var StoreTable =
/*#__PURE__*/
function (_React$Component2) {
_inherits(StoreTable, _React$Component2);
function StoreTable(props) {
var _this8;
_classCallCheck(this, StoreTable);
_this8 = _possibleConstructorReturn(this, _getPrototypeOf(StoreTable).call(this, props));
_this8.setCheckboxPropsCache = function (cache) {
return _this8.CheckboxPropsCache = cache;
};
_this8.CheckboxPropsCache = {};
_this8.store = (0, _createStore["default"])({
selectedRowKeys: getRowSelection(props).selectedRowKeys || [],
selectionDirty: false
});
return _this8;
}
_createClass(StoreTable, [{
key: "render",
value: function render() {
return React.createElement(Table, _extends({}, this.props, {
store: this.store,
checkboxPropsCache: this.CheckboxPropsCache,
setCheckboxPropsCache: this.setCheckboxPropsCache
}));
}
}]);
return StoreTable;
}(React.Component);
StoreTable.displayName = 'withStore(Table)';
StoreTable.Column = _Column["default"];
StoreTable.ColumnGroup = _ColumnGroup["default"];
var _default = StoreTable;
exports["default"] = _default;
//# sourceMappingURL=Table.js.map
/***/ }),
/***/ 1375:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __importDefault = this && this.__importDefault || function (mod) {
return mod && mod.__esModule ? mod : {
"default": mod
};
};
Object.defineProperty(exports, "__esModule", {
value: true
});
var Table_1 = __importDefault(__webpack_require__(1376));
var Column_1 = __importDefault(__webpack_require__(1115));
exports.Column = Column_1.default;
var ColumnGroup_1 = __importDefault(__webpack_require__(1116));
exports.ColumnGroup = ColumnGroup_1.default;
var utils_1 = __webpack_require__(901);
exports.INTERNAL_COL_DEFINE = utils_1.INTERNAL_COL_DEFINE;
exports.default = Table_1.default;
/***/ }),
/***/ 1376:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var __importStar = this && this.__importStar || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) {
if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
}
result["default"] = mod;
return result;
};
var __importDefault = this && this.__importDefault || function (mod) {
return mod && mod.__esModule ? mod : {
"default": mod
};
};
Object.defineProperty(exports, "__esModule", {
value: true
});
var React = __importStar(__webpack_require__(0));
var PropTypes = __importStar(__webpack_require__(1));
var shallowequal_1 = __importDefault(__webpack_require__(60));
var addEventListener_1 = __importDefault(__webpack_require__(1377));
var warning_1 = __importDefault(__webpack_require__(1112));
var mini_store_1 = __webpack_require__(88);
var merge_1 = __importDefault(__webpack_require__(1222));
var component_classes_1 = __importDefault(__webpack_require__(191));
var classnames_1 = __importDefault(__webpack_require__(3));
var react_lifecycles_compat_1 = __webpack_require__(7);
var utils_1 = __webpack_require__(901);
var ColumnManager_1 = __importDefault(__webpack_require__(1378));
var HeadTable_1 = __importDefault(__webpack_require__(1379));
var BodyTable_1 = __importDefault(__webpack_require__(1386));
var Column_1 = __importDefault(__webpack_require__(1115));
var ColumnGroup_1 = __importDefault(__webpack_require__(1116));
var ExpandableTable_1 = __importDefault(__webpack_require__(1387));
var Table =
/*#__PURE__*/
function (_React$Component) {
_inherits(Table, _React$Component);
function Table(props) {
var _this;
_classCallCheck(this, Table);
_this = _possibleConstructorReturn(this, _getPrototypeOf(Table).call(this, props));
_this.state = {};
_this.getRowKey = function (record, index) {
var rowKey = _this.props.rowKey;
var key = typeof rowKey === 'function' ? rowKey(record, index) : record[rowKey];
warning_1.default(key !== undefined, 'Each record in table should have a unique `key` prop,' + 'or set `rowKey` to an unique primary key.');
return key === undefined ? index : key;
};
_this.handleWindowResize = function () {
_this.syncFixedTableRowHeight();
_this.setScrollPositionClassName();
};
_this.syncFixedTableRowHeight = function () {
var tableRect = _this.tableNode.getBoundingClientRect(); // If tableNode's height less than 0, suppose it is hidden and don't recalculate rowHeight.
// see: https://github.com/ant-design/ant-design/issues/4836
if (tableRect.height !== undefined && tableRect.height <= 0) {
return;
}
var prefixCls = _this.props.prefixCls;
var headRows = _this.headTable ? _this.headTable.querySelectorAll('thead') : _this.bodyTable.querySelectorAll('thead');
var bodyRows = _this.bodyTable.querySelectorAll(".".concat(prefixCls, "-row")) || [];
var fixedColumnsHeadRowsHeight = [].map.call(headRows, function (row) {
return row.getBoundingClientRect().height || 'auto';
});
var state = _this.store.getState();
var fixedColumnsBodyRowsHeight = [].reduce.call(bodyRows, function (acc, row) {
var rowKey = row.getAttribute('data-row-key');
var height = row.getBoundingClientRect().height || state.fixedColumnsBodyRowsHeight[rowKey] || 'auto';
acc[rowKey] = height;
return acc;
}, {});
if (shallowequal_1.default(state.fixedColumnsHeadRowsHeight, fixedColumnsHeadRowsHeight) && shallowequal_1.default(state.fixedColumnsBodyRowsHeight, fixedColumnsBodyRowsHeight)) {
return;
}
_this.store.setState({
fixedColumnsHeadRowsHeight: fixedColumnsHeadRowsHeight,
fixedColumnsBodyRowsHeight: fixedColumnsBodyRowsHeight
});
};
_this.handleBodyScrollLeft = function (e) {
// Fix https://github.com/ant-design/ant-design/issues/7635
if (e.currentTarget !== e.target) {
return;
}
var target = e.target;
var _this$props$scroll = _this.props.scroll,
scroll = _this$props$scroll === void 0 ? {} : _this$props$scroll;
var _assertThisInitialize = _assertThisInitialized(_this),
headTable = _assertThisInitialize.headTable,
bodyTable = _assertThisInitialize.bodyTable;
if (target.scrollLeft !== _this.lastScrollLeft && scroll.x) {
if (target === bodyTable && headTable) {
headTable.scrollLeft = target.scrollLeft;
} else if (target === headTable && bodyTable) {
bodyTable.scrollLeft = target.scrollLeft;
}
_this.setScrollPositionClassName();
} // Remember last scrollLeft for scroll direction detecting.
_this.lastScrollLeft = target.scrollLeft;
};
_this.handleBodyScrollTop = function (e) {
var target = e.target; // Fix https://github.com/ant-design/ant-design/issues/9033
if (e.currentTarget !== target) {
return;
}
var _this$props$scroll2 = _this.props.scroll,
scroll = _this$props$scroll2 === void 0 ? {} : _this$props$scroll2;
var _assertThisInitialize2 = _assertThisInitialized(_this),
headTable = _assertThisInitialize2.headTable,
bodyTable = _assertThisInitialize2.bodyTable,
fixedColumnsBodyLeft = _assertThisInitialize2.fixedColumnsBodyLeft,
fixedColumnsBodyRight = _assertThisInitialize2.fixedColumnsBodyRight;
if (target.scrollTop !== _this.lastScrollTop && scroll.y && target !== headTable) {
var scrollTop = target.scrollTop;
if (fixedColumnsBodyLeft && target !== fixedColumnsBodyLeft) {
fixedColumnsBodyLeft.scrollTop = scrollTop;
}
if (fixedColumnsBodyRight && target !== fixedColumnsBodyRight) {
fixedColumnsBodyRight.scrollTop = scrollTop;
}
if (bodyTable && target !== bodyTable) {
bodyTable.scrollTop = scrollTop;
}
} // Remember last scrollTop for scroll direction detecting.
_this.lastScrollTop = target.scrollTop;
};
_this.handleBodyScroll = function (e) {
_this.handleBodyScrollLeft(e);
_this.handleBodyScrollTop(e);
};
_this.handleWheel = function (event) {
var _this$props$scroll3 = _this.props.scroll,
scroll = _this$props$scroll3 === void 0 ? {} : _this$props$scroll3;
if (window.navigator.userAgent.match(/Trident\/7\./) && scroll.y) {
event.preventDefault();
var wd = event.deltaY;
var target = event.target;
var _assertThisInitialize3 = _assertThisInitialized(_this),
bodyTable = _assertThisInitialize3.bodyTable,
fixedColumnsBodyLeft = _assertThisInitialize3.fixedColumnsBodyLeft,
fixedColumnsBodyRight = _assertThisInitialize3.fixedColumnsBodyRight;
var scrollTop = 0;
if (_this.lastScrollTop) {
scrollTop = _this.lastScrollTop + wd;
} else {
scrollTop = wd;
}
if (fixedColumnsBodyLeft && target !== fixedColumnsBodyLeft) {
fixedColumnsBodyLeft.scrollTop = scrollTop;
}
if (fixedColumnsBodyRight && target !== fixedColumnsBodyRight) {
fixedColumnsBodyRight.scrollTop = scrollTop;
}
if (bodyTable && target !== bodyTable) {
bodyTable.scrollTop = scrollTop;
}
}
};
_this.saveRef = function (name) {
return function (node) {
_this[name] = node;
};
};
_this.saveTableNodeRef = function (node) {
_this.tableNode = node;
};
['onRowClick', 'onRowDoubleClick', 'onRowContextMenu', 'onRowMouseEnter', 'onRowMouseLeave'].forEach(function (name) {
warning_1.default(props[name] === undefined, "".concat(name, " is deprecated, please use onRow instead."));
});
warning_1.default(props.getBodyWrapper === undefined, 'getBodyWrapper is deprecated, please use custom components instead.');
_this.columnManager = new ColumnManager_1.default(props.columns, props.children);
_this.store = mini_store_1.create({
currentHoverKey: null,
fixedColumnsHeadRowsHeight: [],
fixedColumnsBodyRowsHeight: {}
});
_this.setScrollPosition('left');
_this.debouncedWindowResize = utils_1.debounce(_this.handleWindowResize, 150);
return _this;
}
_createClass(Table, [{
key: "getChildContext",
value: function getChildContext() {
return {
table: {
props: this.props,
columnManager: this.columnManager,
saveRef: this.saveRef,
components: merge_1.default({
table: 'table',
header: {
wrapper: 'thead',
row: 'tr',
cell: 'th'
},
body: {
wrapper: 'tbody',
row: 'tr',
cell: 'td'
}
}, this.props.components)
}
};
}
}, {
key: "componentDidMount",
value: function componentDidMount() {
if (this.columnManager.isAnyColumnsFixed()) {
this.handleWindowResize();
this.resizeEvent = addEventListener_1.default(window, 'resize', this.debouncedWindowResize);
} // https://github.com/ant-design/ant-design/issues/11635
if (this.headTable) {
this.headTable.scrollLeft = 0;
}
if (this.bodyTable) {
this.bodyTable.scrollLeft = 0;
}
}
}, {
key: "componentDidUpdate",
value: function componentDidUpdate(prevProps) {
if (this.columnManager.isAnyColumnsFixed()) {
this.handleWindowResize();
if (!this.resizeEvent) {
this.resizeEvent = addEventListener_1.default(window, 'resize', this.debouncedWindowResize);
}
} // when table changes to empty, reset scrollLeft
if (prevProps.data.length > 0 && this.props.data.length === 0 && this.hasScrollX()) {
this.resetScrollX();
}
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
if (this.resizeEvent) {
this.resizeEvent.remove();
}
if (this.debouncedWindowResize) {
this.debouncedWindowResize.cancel();
}
}
}, {
key: "setScrollPosition",
value: function setScrollPosition(position) {
this.scrollPosition = position;
if (this.tableNode) {
var prefixCls = this.props.prefixCls;
if (position === 'both') {
component_classes_1.default(this.tableNode).remove(new RegExp("^".concat(prefixCls, "-scroll-position-.+$"))).add("".concat(prefixCls, "-scroll-position-left")).add("".concat(prefixCls, "-scroll-position-right"));
} else {
component_classes_1.default(this.tableNode).remove(new RegExp("^".concat(prefixCls, "-scroll-position-.+$"))).add("".concat(prefixCls, "-scroll-position-").concat(position));
}
}
}
}, {
key: "setScrollPositionClassName",
value: function setScrollPositionClassName() {
var node = this.bodyTable;
var scrollToLeft = node.scrollLeft === 0;
var scrollToRight = node.scrollLeft + 1 >= node.children[0].getBoundingClientRect().width - node.getBoundingClientRect().width;
if (scrollToLeft && scrollToRight) {
this.setScrollPosition('both');
} else if (scrollToLeft) {
this.setScrollPosition('left');
} else if (scrollToRight) {
this.setScrollPosition('right');
} else if (this.scrollPosition !== 'middle') {
this.setScrollPosition('middle');
}
}
}, {
key: "isTableLayoutFixed",
value: function isTableLayoutFixed() {
var _this$props = this.props,
tableLayout = _this$props.tableLayout,
_this$props$columns = _this$props.columns,
columns = _this$props$columns === void 0 ? [] : _this$props$columns,
useFixedHeader = _this$props.useFixedHeader,
_this$props$scroll4 = _this$props.scroll,
scroll = _this$props$scroll4 === void 0 ? {} : _this$props$scroll4;
if (typeof tableLayout !== 'undefined') {
return tableLayout === 'fixed';
} // if one column is ellipsis, use fixed table layout to fix align issue
if (columns.some(function (_ref) {
var ellipsis = _ref.ellipsis;
return !!ellipsis;
})) {
return true;
} // if header fixed, use fixed table layout to fix align issue
if (useFixedHeader || scroll.y) {
return true;
} // if scroll.x is number/px/% width value, we should fixed table layout
// to avoid long word layout broken issue
if (scroll.x && scroll.x !== true && scroll.x !== 'max-content') {
return true;
}
return false;
}
}, {
key: "resetScrollX",
value: function resetScrollX() {
if (this.headTable) {
this.headTable.scrollLeft = 0;
}
if (this.bodyTable) {
this.bodyTable.scrollLeft = 0;
}
}
}, {
key: "hasScrollX",
value: function hasScrollX() {
var _this$props$scroll5 = this.props.scroll,
scroll = _this$props$scroll5 === void 0 ? {} : _this$props$scroll5;
return 'x' in scroll;
}
}, {
key: "renderMainTable",
value: function renderMainTable() {
var _this$props2 = this.props,
scroll = _this$props2.scroll,
prefixCls = _this$props2.prefixCls;
var isAnyColumnsFixed = this.columnManager.isAnyColumnsFixed();
var scrollable = isAnyColumnsFixed || scroll.x || scroll.y;
var table = [this.renderTable({
columns: this.columnManager.groupedColumns(),
isAnyColumnsFixed: isAnyColumnsFixed
}), this.renderEmptyText(), this.renderFooter()];
return scrollable ? React.createElement("div", {
className: "".concat(prefixCls, "-scroll")
}, table) : table;
}
}, {
key: "renderLeftFixedTable",
value: function renderLeftFixedTable() {
var prefixCls = this.props.prefixCls;
return React.createElement("div", {
className: "".concat(prefixCls, "-fixed-left")
}, this.renderTable({
columns: this.columnManager.leftColumns(),
fixed: 'left'
}));
}
}, {
key: "renderRightFixedTable",
value: function renderRightFixedTable() {
var prefixCls = this.props.prefixCls;
return React.createElement("div", {
className: "".concat(prefixCls, "-fixed-right")
}, this.renderTable({
columns: this.columnManager.rightColumns(),
fixed: 'right'
}));
}
}, {
key: "renderTable",
value: function renderTable(options) {
var columns = options.columns,
fixed = options.fixed,
isAnyColumnsFixed = options.isAnyColumnsFixed;
var _this$props3 = this.props,
prefixCls = _this$props3.prefixCls,
_this$props3$scroll = _this$props3.scroll,
scroll = _this$props3$scroll === void 0 ? {} : _this$props3$scroll;
var tableClassName = scroll.x || fixed ? "".concat(prefixCls, "-fixed") : '';
var headTable = React.createElement(HeadTable_1.default, {
key: "head",
columns: columns,
fixed: fixed,
tableClassName: tableClassName,
handleBodyScrollLeft: this.handleBodyScrollLeft,
expander: this.expander
});
var bodyTable = React.createElement(BodyTable_1.default, {
key: "body",
columns: columns,
fixed: fixed,
tableClassName: tableClassName,
getRowKey: this.getRowKey,
handleWheel: this.handleWheel,
handleBodyScroll: this.handleBodyScroll,
expander: this.expander,
isAnyColumnsFixed: isAnyColumnsFixed
});
return [headTable, bodyTable];
}
}, {
key: "renderTitle",
value: function renderTitle() {
var _this$props4 = this.props,
title = _this$props4.title,
prefixCls = _this$props4.prefixCls;
return title ? React.createElement("div", {
className: "".concat(prefixCls, "-title"),
key: "title"
}, title(this.props.data)) : null;
}
}, {
key: "renderFooter",
value: function renderFooter() {
var _this$props5 = this.props,
footer = _this$props5.footer,
prefixCls = _this$props5.prefixCls;
return footer ? React.createElement("div", {
className: "".concat(prefixCls, "-footer"),
key: "footer"
}, footer(this.props.data)) : null;
}
}, {
key: "renderEmptyText",
value: function renderEmptyText() {
var _this$props6 = this.props,
emptyText = _this$props6.emptyText,
prefixCls = _this$props6.prefixCls,
data = _this$props6.data;
if (data.length) {
return null;
}
var emptyClassName = "".concat(prefixCls, "-placeholder");
return React.createElement("div", {
className: emptyClassName,
key: "emptyText"
}, typeof emptyText === 'function' ? emptyText() : emptyText);
}
}, {
key: "render",
value: function render() {
var _classnames_1$default,
_this2 = this;
var props = this.props;
var prefixCls = props.prefixCls;
if (this.state.columns) {
this.columnManager.reset(props.columns);
} else if (this.state.children) {
this.columnManager.reset(null, props.children);
}
var tableClassName = classnames_1.default(props.prefixCls, props.className, (_classnames_1$default = {}, _defineProperty(_classnames_1$default, "".concat(prefixCls, "-fixed-header"), props.useFixedHeader || props.scroll && props.scroll.y), _defineProperty(_classnames_1$default, "".concat(prefixCls, "-scroll-position-left ").concat(prefixCls, "-scroll-position-right"), this.scrollPosition === 'both'), _defineProperty(_classnames_1$default, "".concat(prefixCls, "-scroll-position-").concat(this.scrollPosition), this.scrollPosition !== 'both'), _defineProperty(_classnames_1$default, "".concat(prefixCls, "-layout-fixed"), this.isTableLayoutFixed()), _classnames_1$default));
var hasLeftFixed = this.columnManager.isAnyColumnsLeftFixed();
var hasRightFixed = this.columnManager.isAnyColumnsRightFixed();
var dataAndAriaProps = utils_1.getDataAndAriaProps(props);
return React.createElement(mini_store_1.Provider, {
store: this.store
}, React.createElement(ExpandableTable_1.default, Object.assign({}, props, {
columnManager: this.columnManager,
getRowKey: this.getRowKey
}), function (expander) {
_this2.expander = expander;
return React.createElement("div", Object.assign({
ref: _this2.saveTableNodeRef,
className: tableClassName,
style: props.style,
id: props.id
}, dataAndAriaProps), _this2.renderTitle(), React.createElement("div", {
className: "".concat(prefixCls, "-content")
}, _this2.renderMainTable(), hasLeftFixed && _this2.renderLeftFixedTable(), hasRightFixed && _this2.renderRightFixedTable()));
}));
}
}], [{
key: "getDerivedStateFromProps",
value: function getDerivedStateFromProps(nextProps, prevState) {
if (nextProps.columns && nextProps.columns !== prevState.columns) {
return {
columns: nextProps.columns,
children: null
};
}
if (nextProps.children !== prevState.children) {
return {
columns: null,
children: nextProps.children
};
}
return null;
}
}]);
return Table;
}(React.Component);
Table.childContextTypes = {
table: PropTypes.any,
components: PropTypes.any
};
Table.Column = Column_1.default;
Table.ColumnGroup = ColumnGroup_1.default;
Table.defaultProps = {
data: [],
useFixedHeader: false,
rowKey: 'key',
rowClassName: function rowClassName() {
return '';
},
onRow: function onRow() {},
onHeaderRow: function onHeaderRow() {},
prefixCls: 'rc-table',
bodyStyle: {},
style: {},
showHeader: true,
scroll: {},
rowRef: function rowRef() {
return null;
},
emptyText: function emptyText() {
return 'No Data';
}
};
react_lifecycles_compat_1.polyfill(Table);
exports.default = Table;
/***/ }),
/***/ 1377:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = addEventListenerWrap;
var _addDomEventListener = _interopRequireDefault(__webpack_require__(192));
var _reactDom = _interopRequireDefault(__webpack_require__(4));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function addEventListenerWrap(target, eventType, cb, option) {
/* eslint camelcase: 2 */
var callback = _reactDom.default.unstable_batchedUpdates ? function run(e) {
_reactDom.default.unstable_batchedUpdates(cb, e);
} : cb;
return (0, _addDomEventListener.default)(target, eventType, callback, option);
}
/***/ }),
/***/ 1378:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
var __importStar = this && this.__importStar || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) {
if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
}
result["default"] = mod;
return result;
};
Object.defineProperty(exports, "__esModule", {
value: true
});
/* eslint-disable no-underscore-dangle */
var React = __importStar(__webpack_require__(0));
var ColumnManager =
/*#__PURE__*/
function () {
function ColumnManager(columns, elements) {
_classCallCheck(this, ColumnManager);
this._cached = {};
this.columns = columns || this.normalize(elements);
}
_createClass(ColumnManager, [{
key: "isAnyColumnsFixed",
value: function isAnyColumnsFixed() {
var _this = this;
return this._cache('isAnyColumnsFixed', function () {
return _this.columns.some(function (column) {
return !!column.fixed;
});
});
}
}, {
key: "isAnyColumnsLeftFixed",
value: function isAnyColumnsLeftFixed() {
var _this2 = this;
return this._cache('isAnyColumnsLeftFixed', function () {
return _this2.columns.some(function (column) {
return column.fixed === 'left' || column.fixed === true;
});
});
}
}, {
key: "isAnyColumnsRightFixed",
value: function isAnyColumnsRightFixed() {
var _this3 = this;
return this._cache('isAnyColumnsRightFixed', function () {
return _this3.columns.some(function (column) {
return column.fixed === 'right';
});
});
}
}, {
key: "leftColumns",
value: function leftColumns() {
var _this4 = this;
return this._cache('leftColumns', function () {
return _this4.groupedColumns().filter(function (column) {
return column.fixed === 'left' || column.fixed === true;
});
});
}
}, {
key: "rightColumns",
value: function rightColumns() {
var _this5 = this;
return this._cache('rightColumns', function () {
return _this5.groupedColumns().filter(function (column) {
return column.fixed === 'right';
});
});
}
}, {
key: "leafColumns",
value: function leafColumns() {
var _this6 = this;
return this._cache('leafColumns', function () {
return _this6._leafColumns(_this6.columns);
});
}
}, {
key: "leftLeafColumns",
value: function leftLeafColumns() {
var _this7 = this;
return this._cache('leftLeafColumns', function () {
return _this7._leafColumns(_this7.leftColumns());
});
}
}, {
key: "rightLeafColumns",
value: function rightLeafColumns() {
var _this8 = this;
return this._cache('rightLeafColumns', function () {
return _this8._leafColumns(_this8.rightColumns());
});
} // add appropriate rowspan and colspan to column
}, {
key: "groupedColumns",
value: function groupedColumns() {
var _this9 = this;
return this._cache('groupedColumns', function () {
var _groupColumns = function _groupColumns(columns) {
var currentRow = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
var parentColumn = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
var rows = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
/* eslint-disable no-param-reassign */
// track how many rows we got
rows[currentRow] = rows[currentRow] || [];
var grouped = [];
var setRowSpan = function setRowSpan(column) {
var rowSpan = rows.length - currentRow;
if (column && !column.children && // parent columns are supposed to be one row
rowSpan > 1 && (!column.rowSpan || column.rowSpan < rowSpan)) {
column.rowSpan = rowSpan;
}
};
columns.forEach(function (column, index) {
var newColumn = _objectSpread({}, column);
rows[currentRow].push(newColumn);
parentColumn.colSpan = parentColumn.colSpan || 0;
if (newColumn.children && newColumn.children.length > 0) {
newColumn.children = _groupColumns(newColumn.children, currentRow + 1, newColumn, rows);
parentColumn.colSpan += newColumn.colSpan;
} else {
parentColumn.colSpan += 1;
} // update rowspan to all same row columns
for (var i = 0; i < rows[currentRow].length - 1; i += 1) {
setRowSpan(rows[currentRow][i]);
} // last column, update rowspan immediately
if (index + 1 === columns.length) {
setRowSpan(newColumn);
}
grouped.push(newColumn);
});
return grouped;
/* eslint-enable no-param-reassign */
};
return _groupColumns(_this9.columns);
});
}
}, {
key: "normalize",
value: function normalize(elements) {
var _this10 = this;
var columns = [];
React.Children.forEach(elements, function (element) {
if (!React.isValidElement(element)) {
return;
}
var column = _objectSpread({}, element.props);
if (element.key) {
column.key = element.key;
}
if (element.type.isTableColumnGroup) {
column.children = _this10.normalize(column.children);
}
columns.push(column);
});
return columns;
}
}, {
key: "reset",
value: function reset(columns, elements) {
this.columns = columns || this.normalize(elements);
this._cached = {};
}
}, {
key: "_cache",
value: function _cache(name, fn) {
if (name in this._cached) {
return this._cached[name];
}
this._cached[name] = fn();
return this._cached[name];
}
}, {
key: "_leafColumns",
value: function _leafColumns(columns) {
var _this11 = this;
var leafColumns = [];
columns.forEach(function (column) {
if (!column.children) {
leafColumns.push(column);
} else {
leafColumns.push.apply(leafColumns, _toConsumableArray(_this11._leafColumns(column.children)));
}
});
return leafColumns;
}
}]);
return ColumnManager;
}();
exports.default = ColumnManager;
/* eslint-enable */
/***/ }),
/***/ 1379:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var __importStar = this && this.__importStar || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) {
if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
}
result["default"] = mod;
return result;
};
var __importDefault = this && this.__importDefault || function (mod) {
return mod && mod.__esModule ? mod : {
"default": mod
};
};
Object.defineProperty(exports, "__esModule", {
value: true
});
var React = __importStar(__webpack_require__(0));
var PropTypes = __importStar(__webpack_require__(1));
var classnames_1 = __importDefault(__webpack_require__(3));
var utils_1 = __webpack_require__(901);
var BaseTable_1 = __importDefault(__webpack_require__(1113));
function HeadTable(props, _ref) {
var table = _ref.table;
var _table$props = table.props,
prefixCls = _table$props.prefixCls,
scroll = _table$props.scroll,
showHeader = _table$props.showHeader;
var columns = props.columns,
fixed = props.fixed,
tableClassName = props.tableClassName,
handleBodyScrollLeft = props.handleBodyScrollLeft,
expander = props.expander;
var saveRef = table.saveRef;
var useFixedHeader = table.props.useFixedHeader;
var headStyle = {};
var scrollbarWidth = utils_1.measureScrollbar({
direction: 'vertical'
});
if (scroll.y) {
useFixedHeader = true; // https://github.com/ant-design/ant-design/issues/17051
var scrollbarWidthOfHeader = utils_1.measureScrollbar({
direction: 'horizontal',
prefixCls: prefixCls
}); // Add negative margin bottom for scroll bar overflow bug
if (scrollbarWidthOfHeader > 0 && !fixed) {
headStyle.marginBottom = "-".concat(scrollbarWidthOfHeader, "px");
headStyle.paddingBottom = '0px'; // https://github.com/ant-design/ant-design/pull/19986
headStyle.minWidth = "".concat(scrollbarWidth, "px"); // https://github.com/ant-design/ant-design/issues/17051
headStyle.overflowX = 'scroll';
headStyle.overflowY = scrollbarWidth === 0 ? 'hidden' : 'scroll';
}
}
if (!useFixedHeader || !showHeader) {
return null;
}
return React.createElement("div", {
key: "headTable",
ref: fixed ? null : saveRef('headTable'),
className: classnames_1.default("".concat(prefixCls, "-header"), _defineProperty({}, "".concat(prefixCls, "-hide-scrollbar"), scrollbarWidth > 0)),
style: headStyle,
onScroll: handleBodyScrollLeft
}, React.createElement(BaseTable_1.default, {
tableClassName: tableClassName,
hasHead: true,
hasBody: false,
fixed: fixed,
columns: columns,
expander: expander
}));
}
exports.default = HeadTable;
HeadTable.contextTypes = {
table: PropTypes.any
};
/***/ }),
/***/ 1380:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __importStar = this && this.__importStar || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) {
if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
}
result["default"] = mod;
return result;
};
Object.defineProperty(exports, "__esModule", {
value: true
});
var React = __importStar(__webpack_require__(0));
var PropTypes = __importStar(__webpack_require__(1));
var utils_1 = __webpack_require__(901);
var ColGroup = function ColGroup(props, _ref) {
var table = _ref.table;
var _table$props = table.props,
prefixCls = _table$props.prefixCls,
expandIconAsCell = _table$props.expandIconAsCell;
var fixed = props.fixed;
var cols = [];
if (expandIconAsCell && fixed !== 'right') {
cols.push(React.createElement("col", {
className: "".concat(prefixCls, "-expand-icon-col"),
key: "rc-table-expand-icon-col"
}));
}
var leafColumns;
if (fixed === 'left') {
leafColumns = table.columnManager.leftLeafColumns();
} else if (fixed === 'right') {
leafColumns = table.columnManager.rightLeafColumns();
} else {
leafColumns = table.columnManager.leafColumns();
}
cols = cols.concat(leafColumns.map(function (_ref2) {
var key = _ref2.key,
dataIndex = _ref2.dataIndex,
width = _ref2.width,
additionalProps = _ref2[utils_1.INTERNAL_COL_DEFINE];
var mergedKey = key !== undefined ? key : dataIndex;
return React.createElement("col", Object.assign({
key: mergedKey,
style: {
width: width,
minWidth: width
}
}, additionalProps));
}));
return React.createElement("colgroup", null, cols);
};
ColGroup.contextTypes = {
table: PropTypes.any
};
exports.default = ColGroup;
/***/ }),
/***/ 1381:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __importStar = this && this.__importStar || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) {
if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
}
result["default"] = mod;
return result;
};
var __importDefault = this && this.__importDefault || function (mod) {
return mod && mod.__esModule ? mod : {
"default": mod
};
};
Object.defineProperty(exports, "__esModule", {
value: true
});
var React = __importStar(__webpack_require__(0));
var PropTypes = __importStar(__webpack_require__(1));
var TableHeaderRow_1 = __importDefault(__webpack_require__(1382));
function getHeaderRows(_ref) {
var _ref$columns = _ref.columns,
columns = _ref$columns === void 0 ? [] : _ref$columns,
_ref$currentRow = _ref.currentRow,
currentRow = _ref$currentRow === void 0 ? 0 : _ref$currentRow,
_ref$rows = _ref.rows,
rows = _ref$rows === void 0 ? [] : _ref$rows,
_ref$isLast = _ref.isLast,
isLast = _ref$isLast === void 0 ? true : _ref$isLast;
// eslint-disable-next-line no-param-reassign
rows[currentRow] = rows[currentRow] || [];
columns.forEach(function (column, i) {
if (column.rowSpan && rows.length < column.rowSpan) {
while (rows.length < column.rowSpan) {
rows.push([]);
}
}
var cellIsLast = isLast && i === columns.length - 1;
var cell = {
key: column.key,
className: column.className || '',
children: column.title,
isLast: cellIsLast,
column: column
};
if (column.children) {
getHeaderRows({
columns: column.children,
currentRow: currentRow + 1,
rows: rows,
isLast: cellIsLast
});
}
if ('colSpan' in column) {
cell.colSpan = column.colSpan;
}
if ('rowSpan' in column) {
cell.rowSpan = column.rowSpan;
}
if (cell.colSpan !== 0) {
rows[currentRow].push(cell);
}
});
return rows.filter(function (row) {
return row.length > 0;
});
}
var TableHeader = function TableHeader(props, _ref2) {
var table = _ref2.table;
var components = table.components;
var _table$props = table.props,
prefixCls = _table$props.prefixCls,
showHeader = _table$props.showHeader,
onHeaderRow = _table$props.onHeaderRow;
var expander = props.expander,
columns = props.columns,
fixed = props.fixed;
if (!showHeader) {
return null;
}
var rows = getHeaderRows({
columns: columns
});
expander.renderExpandIndentCell(rows, fixed);
var HeaderWrapper = components.header.wrapper;
return React.createElement(HeaderWrapper, {
className: "".concat(prefixCls, "-thead")
}, rows.map(function (row, index) {
return React.createElement(TableHeaderRow_1.default, {
prefixCls: prefixCls,
key: index,
index: index,
fixed: fixed,
columns: columns,
rows: rows,
row: row,
components: components,
onHeaderRow: onHeaderRow
});
}));
};
TableHeader.contextTypes = {
table: PropTypes.any
};
exports.default = TableHeader;
/***/ }),
/***/ 1382:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var __importStar = this && this.__importStar || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) {
if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
}
result["default"] = mod;
return result;
};
var __importDefault = this && this.__importDefault || function (mod) {
return mod && mod.__esModule ? mod : {
"default": mod
};
};
Object.defineProperty(exports, "__esModule", {
value: true
});
var React = __importStar(__webpack_require__(0));
var mini_store_1 = __webpack_require__(88);
var classnames_1 = __importDefault(__webpack_require__(3));
function TableHeaderRow(_ref) {
var row = _ref.row,
index = _ref.index,
height = _ref.height,
components = _ref.components,
onHeaderRow = _ref.onHeaderRow,
prefixCls = _ref.prefixCls;
var HeaderRow = components.header.row;
var HeaderCell = components.header.cell;
var rowProps = onHeaderRow(row.map(function (cell) {
return cell.column;
}), index);
var customStyle = rowProps ? rowProps.style : {};
var style = _objectSpread({
// https://github.com/ant-design/ant-design/issues/20126
// https://github.com/ant-design/ant-design/issues/20269
// https://github.com/ant-design/ant-design/issues/20495
height: row.length > 1 && index === 0 && height && height !== 'auto' ? parseInt(height.toString(), 10) : height
}, customStyle);
return React.createElement(HeaderRow, Object.assign({}, rowProps, {
style: style
}), row.map(function (cell, i) {
var _classnames_1$default;
var column = cell.column,
isLast = cell.isLast,
cellProps = _objectWithoutProperties(cell, ["column", "isLast"]);
var customProps = column.onHeaderCell ? column.onHeaderCell(column) : {};
if (column.align) {
customProps.style = _objectSpread({}, customProps.style, {
textAlign: column.align
});
}
customProps.className = classnames_1.default(customProps.className, column.className, (_classnames_1$default = {}, _defineProperty(_classnames_1$default, "".concat(prefixCls, "-align-").concat(column.align), !!column.align), _defineProperty(_classnames_1$default, "".concat(prefixCls, "-row-cell-ellipsis"), !!column.ellipsis), _defineProperty(_classnames_1$default, "".concat(prefixCls, "-row-cell-break-word"), !!column.width), _defineProperty(_classnames_1$default, "".concat(prefixCls, "-row-cell-last"), isLast), _classnames_1$default));
return React.createElement(HeaderCell, Object.assign({}, cellProps, customProps, {
key: column.key || column.dataIndex || i
}));
}));
}
function getRowHeight(state, props) {
var fixedColumnsHeadRowsHeight = state.fixedColumnsHeadRowsHeight;
var columns = props.columns,
rows = props.rows,
fixed = props.fixed;
var headerHeight = fixedColumnsHeadRowsHeight[0];
if (!fixed) {
return null;
}
if (headerHeight && columns) {
if (headerHeight === 'auto') {
return 'auto';
}
return headerHeight / rows.length;
}
return null;
}
exports.default = mini_store_1.connect(function (state, props) {
return {
height: getRowHeight(state, props)
};
})(TableHeaderRow);
/***/ }),
/***/ 1383:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var __importStar = this && this.__importStar || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) {
if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
}
result["default"] = mod;
return result;
};
var __importDefault = this && this.__importDefault || function (mod) {
return mod && mod.__esModule ? mod : {
"default": mod
};
};
Object.defineProperty(exports, "__esModule", {
value: true
});
var React = __importStar(__webpack_require__(0));
var classnames_1 = __importDefault(__webpack_require__(3));
var get_1 = __importDefault(__webpack_require__(1252));
function isInvalidRenderCellText(text) {
return text && !React.isValidElement(text) && Object.prototype.toString.call(text) === '[object Object]';
}
var TableCell =
/*#__PURE__*/
function (_React$Component) {
_inherits(TableCell, _React$Component);
function TableCell() {
var _this;
_classCallCheck(this, TableCell);
_this = _possibleConstructorReturn(this, _getPrototypeOf(TableCell).apply(this, arguments));
_this.handleClick = function (e) {
var _this$props = _this.props,
record = _this$props.record,
onCellClick = _this$props.column.onCellClick;
if (onCellClick) {
onCellClick(record, e);
}
};
return _this;
}
_createClass(TableCell, [{
key: "render",
value: function render() {
var _classnames_1$default;
var _this$props2 = this.props,
record = _this$props2.record,
indentSize = _this$props2.indentSize,
prefixCls = _this$props2.prefixCls,
indent = _this$props2.indent,
index = _this$props2.index,
expandIcon = _this$props2.expandIcon,
column = _this$props2.column,
BodyCell = _this$props2.component;
var dataIndex = column.dataIndex,
render = column.render,
_column$className = column.className,
className = _column$className === void 0 ? '' : _column$className; // We should return undefined if no dataIndex is specified, but in order to
// be compatible with object-path's behavior, we return the record object instead.
var text;
if (typeof dataIndex === 'number') {
text = get_1.default(record, dataIndex);
} else if (!dataIndex || dataIndex.length === 0) {
text = record;
} else {
text = get_1.default(record, dataIndex);
}
var tdProps = {};
var colSpan;
var rowSpan;
if (render) {
text = render(text, record, index); // `render` support cell with additional config like `props`
if (isInvalidRenderCellText(text)) {
tdProps = text.props || tdProps;
var _tdProps = tdProps;
colSpan = _tdProps.colSpan;
rowSpan = _tdProps.rowSpan;
text = text.children;
}
}
if (column.onCell) {
tdProps = _objectSpread({}, tdProps, {}, column.onCell(record, index));
} // Fix https://github.com/ant-design/ant-design/issues/1202
if (isInvalidRenderCellText(text)) {
text = null;
}
var indentText = expandIcon ? React.createElement("span", {
style: {
paddingLeft: "".concat(indentSize * indent, "px")
},
className: "".concat(prefixCls, "-indent indent-level-").concat(indent)
}) : null;
if (rowSpan === 0 || colSpan === 0) {
return null;
}
if (column.align) {
tdProps.style = _objectSpread({
textAlign: column.align
}, tdProps.style);
}
var cellClassName = classnames_1.default(className, (_classnames_1$default = {}, _defineProperty(_classnames_1$default, "".concat(prefixCls, "-cell-ellipsis"), !!column.ellipsis), _defineProperty(_classnames_1$default, "".concat(prefixCls, "-cell-break-word"), !!column.width), _classnames_1$default));
if (column.ellipsis) {
if (typeof text === 'string') {
tdProps.title = text;
} else if (text) {
var _text = text,
textProps = _text.props;
if (textProps && textProps.children && typeof textProps.children === 'string') {
tdProps.title = textProps.children;
}
}
}
return React.createElement(BodyCell, Object.assign({
className: cellClassName,
onClick: this.handleClick
}, tdProps), indentText, expandIcon, text);
}
}]);
return TableCell;
}(React.Component);
exports.default = TableCell;
/***/ }),
/***/ 1384:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var __importStar = this && this.__importStar || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) {
if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
}
result["default"] = mod;
return result;
};
var __importDefault = this && this.__importDefault || function (mod) {
return mod && mod.__esModule ? mod : {
"default": mod
};
};
Object.defineProperty(exports, "__esModule", {
value: true
});
var React = __importStar(__webpack_require__(0));
var mini_store_1 = __webpack_require__(88);
var ExpandIcon_1 = __importDefault(__webpack_require__(1385));
var ExpandableRow =
/*#__PURE__*/
function (_React$Component) {
_inherits(ExpandableRow, _React$Component);
function ExpandableRow() {
var _this;
_classCallCheck(this, ExpandableRow);
_this = _possibleConstructorReturn(this, _getPrototypeOf(ExpandableRow).apply(this, arguments)); // Show icon within first column
_this.hasExpandIcon = function (columnIndex) {
var _this$props = _this.props,
expandRowByClick = _this$props.expandRowByClick,
expandIcon = _this$props.expandIcon;
if (_this.expandIconAsCell || columnIndex !== _this.expandIconColumnIndex) {
return false;
}
return !!expandIcon || !expandRowByClick;
};
_this.handleExpandChange = function (record, event) {
var _this$props2 = _this.props,
onExpandedChange = _this$props2.onExpandedChange,
expanded = _this$props2.expanded,
rowKey = _this$props2.rowKey;
if (_this.expandable) {
onExpandedChange(!expanded, record, event, rowKey);
}
};
_this.handleRowClick = function (record, index, event) {
var _this$props3 = _this.props,
expandRowByClick = _this$props3.expandRowByClick,
onRowClick = _this$props3.onRowClick;
if (expandRowByClick) {
_this.handleExpandChange(record, event);
}
if (onRowClick) {
onRowClick(record, index, event);
}
};
_this.renderExpandIcon = function () {
var _this$props4 = _this.props,
prefixCls = _this$props4.prefixCls,
expanded = _this$props4.expanded,
record = _this$props4.record,
needIndentSpaced = _this$props4.needIndentSpaced,
expandIcon = _this$props4.expandIcon;
if (expandIcon) {
return expandIcon({
prefixCls: prefixCls,
expanded: expanded,
record: record,
needIndentSpaced: needIndentSpaced,
expandable: _this.expandable,
onExpand: _this.handleExpandChange
});
}
return React.createElement(ExpandIcon_1.default, {
expandable: _this.expandable,
prefixCls: prefixCls,
onExpand: _this.handleExpandChange,
needIndentSpaced: needIndentSpaced,
expanded: expanded,
record: record
});
};
_this.renderExpandIconCell = function (cells) {
if (!_this.expandIconAsCell) {
return;
}
var prefixCls = _this.props.prefixCls;
cells.push(React.createElement("td", {
className: "".concat(prefixCls, "-expand-icon-cell"),
key: "rc-table-expand-icon-cell"
}, _this.renderExpandIcon()));
};
return _this;
}
_createClass(ExpandableRow, [{
key: "componentWillUnmount",
value: function componentWillUnmount() {
this.handleDestroy();
}
}, {
key: "handleDestroy",
value: function handleDestroy() {
var _this$props5 = this.props,
onExpandedChange = _this$props5.onExpandedChange,
rowKey = _this$props5.rowKey,
record = _this$props5.record;
if (this.expandable) {
onExpandedChange(false, record, null, rowKey, true);
}
}
}, {
key: "render",
value: function render() {
var _this$props6 = this.props,
childrenColumnName = _this$props6.childrenColumnName,
expandedRowRender = _this$props6.expandedRowRender,
indentSize = _this$props6.indentSize,
record = _this$props6.record,
fixed = _this$props6.fixed,
expanded = _this$props6.expanded;
this.expandIconAsCell = fixed !== 'right' ? this.props.expandIconAsCell : false;
this.expandIconColumnIndex = fixed !== 'right' ? this.props.expandIconColumnIndex : -1;
var childrenData = record[childrenColumnName];
this.expandable = !!(childrenData || expandedRowRender);
var expandableRowProps = {
indentSize: indentSize,
// not used in TableRow, but it's required to re-render TableRow when `expanded` changes
expanded: expanded,
onRowClick: this.handleRowClick,
hasExpandIcon: this.hasExpandIcon,
renderExpandIcon: this.renderExpandIcon,
renderExpandIconCell: this.renderExpandIconCell
};
return this.props.children(expandableRowProps);
}
}]);
return ExpandableRow;
}(React.Component);
exports.default = mini_store_1.connect(function (_ref, _ref2) {
var expandedRowKeys = _ref.expandedRowKeys;
var rowKey = _ref2.rowKey;
return {
expanded: expandedRowKeys.includes(rowKey)
};
})(ExpandableRow);
/***/ }),
/***/ 1385:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var __importStar = this && this.__importStar || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) {
if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
}
result["default"] = mod;
return result;
};
var __importDefault = this && this.__importDefault || function (mod) {
return mod && mod.__esModule ? mod : {
"default": mod
};
};
Object.defineProperty(exports, "__esModule", {
value: true
});
var React = __importStar(__webpack_require__(0));
var shallowequal_1 = __importDefault(__webpack_require__(60));
var ExpandIcon =
/*#__PURE__*/
function (_React$Component) {
_inherits(ExpandIcon, _React$Component);
function ExpandIcon() {
_classCallCheck(this, ExpandIcon);
return _possibleConstructorReturn(this, _getPrototypeOf(ExpandIcon).apply(this, arguments));
}
_createClass(ExpandIcon, [{
key: "shouldComponentUpdate",
value: function shouldComponentUpdate(nextProps) {
return !shallowequal_1.default(nextProps, this.props);
}
}, {
key: "render",
value: function render() {
var _this$props = this.props,
expandable = _this$props.expandable,
prefixCls = _this$props.prefixCls,
onExpand = _this$props.onExpand,
needIndentSpaced = _this$props.needIndentSpaced,
expanded = _this$props.expanded,
record = _this$props.record;
if (expandable) {
var expandClassName = expanded ? 'expanded' : 'collapsed';
return React.createElement("span", {
className: "".concat(prefixCls, "-expand-icon ").concat(prefixCls, "-").concat(expandClassName),
onClick: function onClick(e) {
return onExpand(record, e);
}
});
}
if (needIndentSpaced) {
return React.createElement("span", {
className: "".concat(prefixCls, "-expand-icon ").concat(prefixCls, "-spaced")
});
}
return null;
}
}]);
return ExpandIcon;
}(React.Component);
exports.default = ExpandIcon;
/***/ }),
/***/ 1386:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var __importStar = this && this.__importStar || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) {
if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
}
result["default"] = mod;
return result;
};
var __importDefault = this && this.__importDefault || function (mod) {
return mod && mod.__esModule ? mod : {
"default": mod
};
};
Object.defineProperty(exports, "__esModule", {
value: true
});
var React = __importStar(__webpack_require__(0));
var PropTypes = __importStar(__webpack_require__(1));
var utils_1 = __webpack_require__(901);
var BaseTable_1 = __importDefault(__webpack_require__(1113));
function BodyTable(props, _ref) {
var table = _ref.table;
var _table$props = table.props,
prefixCls = _table$props.prefixCls,
scroll = _table$props.scroll;
var columns = props.columns,
fixed = props.fixed,
tableClassName = props.tableClassName,
getRowKey = props.getRowKey,
handleBodyScroll = props.handleBodyScroll,
handleWheel = props.handleWheel,
expander = props.expander,
isAnyColumnsFixed = props.isAnyColumnsFixed;
var saveRef = table.saveRef;
var useFixedHeader = table.props.useFixedHeader;
var bodyStyle = _objectSpread({}, table.props.bodyStyle);
var innerBodyStyle = {};
if (scroll.x || fixed) {
bodyStyle.overflowX = bodyStyle.overflowX || 'scroll'; // Fix weird webkit render bug
// https://github.com/ant-design/ant-design/issues/7783
bodyStyle.WebkitTransform = 'translate3d (0, 0, 0)';
}
if (scroll.y) {
// maxHeight will make fixed-Table scrolling not working
// so we only set maxHeight to body-Table here
if (fixed) {
innerBodyStyle.maxHeight = bodyStyle.maxHeight || scroll.y;
innerBodyStyle.overflowY = bodyStyle.overflowY || 'scroll';
} else {
bodyStyle.maxHeight = bodyStyle.maxHeight || scroll.y;
}
bodyStyle.overflowY = bodyStyle.overflowY || 'scroll';
useFixedHeader = true; // Add negative margin bottom for scroll bar overflow bug
var scrollbarWidth = utils_1.measureScrollbar({
direction: 'vertical'
});
if (scrollbarWidth > 0 && fixed) {
bodyStyle.marginBottom = "-".concat(scrollbarWidth, "px");
bodyStyle.paddingBottom = '0px';
}
}
var baseTable = React.createElement(BaseTable_1.default, {
tableClassName: tableClassName,
hasHead: !useFixedHeader,
hasBody: true,
fixed: fixed,
columns: columns,
expander: expander,
getRowKey: getRowKey,
isAnyColumnsFixed: isAnyColumnsFixed
});
if (fixed && columns.length) {
var refName;
if (columns[0].fixed === 'left' || columns[0].fixed === true) {
refName = 'fixedColumnsBodyLeft';
} else if (columns[0].fixed === 'right') {
refName = 'fixedColumnsBodyRight';
}
delete bodyStyle.overflowX;
delete bodyStyle.overflowY;
return React.createElement("div", {
key: "bodyTable",
className: "".concat(prefixCls, "-body-outer"),
style: _objectSpread({}, bodyStyle)
}, React.createElement("div", {
className: "".concat(prefixCls, "-body-inner"),
style: innerBodyStyle,
ref: saveRef(refName),
onWheel: handleWheel,
onScroll: handleBodyScroll
}, baseTable));
} // Should provides `tabIndex` if use scroll to enable keyboard scroll
var useTabIndex = scroll && (scroll.x || scroll.y);
return React.createElement("div", {
tabIndex: useTabIndex ? -1 : undefined,
key: "bodyTable",
className: "".concat(prefixCls, "-body"),
style: bodyStyle,
ref: saveRef('bodyTable'),
onWheel: handleWheel,
onScroll: handleBodyScroll
}, baseTable);
}
exports.default = BodyTable;
BodyTable.contextTypes = {
table: PropTypes.any
};
/***/ }),
/***/ 1387:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var __importStar = this && this.__importStar || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) {
if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
}
result["default"] = mod;
return result;
};
var __importDefault = this && this.__importDefault || function (mod) {
return mod && mod.__esModule ? mod : {
"default": mod
};
};
Object.defineProperty(exports, "__esModule", {
value: true
});
var React = __importStar(__webpack_require__(0));
var mini_store_1 = __webpack_require__(88);
var react_lifecycles_compat_1 = __webpack_require__(7);
var shallowequal_1 = __importDefault(__webpack_require__(60));
var TableRow_1 = __importDefault(__webpack_require__(1114));
var utils_1 = __webpack_require__(901);
var ExpandableTable =
/*#__PURE__*/
function (_React$Component) {
_inherits(ExpandableTable, _React$Component);
function ExpandableTable(props) {
var _this;
_classCallCheck(this, ExpandableTable);
_this = _possibleConstructorReturn(this, _getPrototypeOf(ExpandableTable).call(this, props));
_this.handleExpandChange = function (expanded, record, event, rowKey) {
var destroy = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
if (event) {
event.stopPropagation();
}
var _this$props = _this.props,
onExpandedRowsChange = _this$props.onExpandedRowsChange,
onExpand = _this$props.onExpand;
var _this$store$getState = _this.store.getState(),
expandedRowKeys = _this$store$getState.expandedRowKeys;
if (expanded) {
// row was expanded
expandedRowKeys = [].concat(_toConsumableArray(expandedRowKeys), [rowKey]);
} else {
// row was collapse
var expandedRowIndex = expandedRowKeys.indexOf(rowKey);
if (expandedRowIndex !== -1) {
expandedRowKeys = utils_1.remove(expandedRowKeys, rowKey);
}
}
if (!_this.props.expandedRowKeys) {
_this.store.setState({
expandedRowKeys: expandedRowKeys
});
} // De-dup of repeat call
if (!_this.latestExpandedRows || !shallowequal_1.default(_this.latestExpandedRows, expandedRowKeys)) {
_this.latestExpandedRows = expandedRowKeys;
onExpandedRowsChange(expandedRowKeys);
}
if (!destroy) {
onExpand(expanded, record);
}
};
_this.renderExpandIndentCell = function (rows, fixed) {
var _this$props2 = _this.props,
prefixCls = _this$props2.prefixCls,
expandIconAsCell = _this$props2.expandIconAsCell;
if (!expandIconAsCell || fixed === 'right' || !rows.length) {
return;
}
var iconColumn = {
key: 'rc-table-expand-icon-cell',
className: "".concat(prefixCls, "-expand-icon-th"),
title: '',
rowSpan: rows.length
};
rows[0].unshift(_objectSpread({}, iconColumn, {
column: iconColumn
}));
};
_this.renderRows = function (renderRows, rows, record, index, indent, fixed, parentKey, ancestorKeys) {
var _this$props3 = _this.props,
expandedRowClassName = _this$props3.expandedRowClassName,
expandedRowRender = _this$props3.expandedRowRender,
childrenColumnName = _this$props3.childrenColumnName;
var childrenData = record[childrenColumnName];
var nextAncestorKeys = [].concat(_toConsumableArray(ancestorKeys), [parentKey]);
var nextIndent = indent + 1;
if (expandedRowRender) {
rows.push(_this.renderExpandedRow(record, index, expandedRowRender, expandedRowClassName(record, index, indent), nextAncestorKeys, nextIndent, fixed));
}
if (childrenData) {
rows.push.apply(rows, _toConsumableArray(renderRows(childrenData, nextIndent, nextAncestorKeys)));
}
};
var data = props.data,
childrenColumnName = props.childrenColumnName,
defaultExpandAllRows = props.defaultExpandAllRows,
expandedRowKeys = props.expandedRowKeys,
defaultExpandedRowKeys = props.defaultExpandedRowKeys,
getRowKey = props.getRowKey;
var finalExpandedRowKeys = [];
var rows = _toConsumableArray(data);
if (defaultExpandAllRows) {
for (var i = 0; i < rows.length; i += 1) {
var row = rows[i];
finalExpandedRowKeys.push(getRowKey(row, i));
rows = rows.concat(row[childrenColumnName] || []);
}
} else {
finalExpandedRowKeys = expandedRowKeys || defaultExpandedRowKeys;
}
_this.columnManager = props.columnManager;
_this.store = props.store;
_this.store.setState({
expandedRowsHeight: {},
expandedRowKeys: finalExpandedRowKeys
});
return _this;
}
_createClass(ExpandableTable, [{
key: "componentDidMount",
value: function componentDidMount() {
this.handleUpdated();
}
}, {
key: "componentDidUpdate",
value: function componentDidUpdate() {
if ('expandedRowKeys' in this.props) {
this.store.setState({
expandedRowKeys: this.props.expandedRowKeys
});
}
this.handleUpdated();
}
}, {
key: "handleUpdated",
value: function handleUpdated() {
/**
* We should record latest expanded rows to avoid
* multiple rows remove cause `onExpandedRowsChange` trigger many times
*/
this.latestExpandedRows = null;
}
}, {
key: "renderExpandedRow",
value: function renderExpandedRow(record, index, _render, className, ancestorKeys, indent, fixed) {
var _this2 = this;
var _this$props4 = this.props,
prefixCls = _this$props4.prefixCls,
expandIconAsCell = _this$props4.expandIconAsCell,
indentSize = _this$props4.indentSize;
var parentKey = ancestorKeys[ancestorKeys.length - 1];
var rowKey = "".concat(parentKey, "-extra-row");
var components = {
body: {
row: 'tr',
cell: 'td'
}
};
var colCount;
if (fixed === 'left') {
colCount = this.columnManager.leftLeafColumns().length;
} else if (fixed === 'right') {
colCount = this.columnManager.rightLeafColumns().length;
} else {
colCount = this.columnManager.leafColumns().length;
}
var columns = [{
key: 'extra-row',
render: function render() {
var _this2$store$getState = _this2.store.getState(),
expandedRowKeys = _this2$store$getState.expandedRowKeys;
var expanded = expandedRowKeys.includes(parentKey);
return {
props: {
colSpan: colCount
},
children: fixed !== 'right' ? _render(record, index, indent, expanded) : '&nbsp;'
};
}
}];
if (expandIconAsCell && fixed !== 'right') {
columns.unshift({
key: 'expand-icon-placeholder',
render: function render() {
return null;
}
});
}
return React.createElement(TableRow_1.default, {
key: rowKey,
columns: columns,
className: className,
rowKey: rowKey,
ancestorKeys: ancestorKeys,
prefixCls: "".concat(prefixCls, "-expanded-row"),
indentSize: indentSize,
indent: indent,
fixed: fixed,
components: components,
expandedRow: true
});
}
}, {
key: "render",
value: function render() {
var _this$props5 = this.props,
data = _this$props5.data,
childrenColumnName = _this$props5.childrenColumnName,
children = _this$props5.children;
var needIndentSpaced = data.some(function (record) {
return record[childrenColumnName];
});
return children({
props: this.props,
needIndentSpaced: needIndentSpaced,
renderRows: this.renderRows,
handleExpandChange: this.handleExpandChange,
renderExpandIndentCell: this.renderExpandIndentCell
});
}
}]);
return ExpandableTable;
}(React.Component);
ExpandableTable.defaultProps = {
expandIconAsCell: false,
expandedRowClassName: function expandedRowClassName() {
return '';
},
expandIconColumnIndex: 0,
defaultExpandAllRows: false,
defaultExpandedRowKeys: [],
childrenColumnName: 'children',
indentSize: 15,
onExpand: function onExpand() {},
onExpandedRowsChange: function onExpandedRowsChange() {}
};
react_lifecycles_compat_1.polyfill(ExpandableTable);
exports.default = mini_store_1.connect()(ExpandableTable);
/***/ }),
/***/ 1388:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(__webpack_require__(0));
var ReactDOM = _interopRequireWildcard(__webpack_require__(4));
var _reactLifecyclesCompat = __webpack_require__(7);
var _rcMenu = _interopRequireWildcard(__webpack_require__(172));
var _domClosest = _interopRequireDefault(__webpack_require__(1389));
var _classnames = _interopRequireDefault(__webpack_require__(3));
var _shallowequal = _interopRequireDefault(__webpack_require__(60));
var _dropdown = _interopRequireDefault(__webpack_require__(982));
var _icon = _interopRequireDefault(__webpack_require__(26));
var _checkbox = _interopRequireDefault(__webpack_require__(314));
var _radio = _interopRequireDefault(__webpack_require__(175));
var _FilterDropdownMenuWrapper = _interopRequireDefault(__webpack_require__(1391));
var _util = __webpack_require__(1117);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function stopPropagation(e) {
e.stopPropagation();
if (e.nativeEvent.stopImmediatePropagation) {
e.nativeEvent.stopImmediatePropagation();
}
}
var FilterMenu =
/*#__PURE__*/
function (_React$Component) {
_inherits(FilterMenu, _React$Component);
function FilterMenu(props) {
var _this;
_classCallCheck(this, FilterMenu);
_this = _possibleConstructorReturn(this, _getPrototypeOf(FilterMenu).call(this, props));
_this.setNeverShown = function (column) {
var rootNode = ReactDOM.findDOMNode(_assertThisInitialized(_this));
var filterBelongToScrollBody = !!(0, _domClosest["default"])(rootNode, ".ant-table-scroll");
if (filterBelongToScrollBody) {
// When fixed column have filters, there will be two dropdown menus
// Filter dropdown menu inside scroll body should never be shown
// To fix https://github.com/ant-design/ant-design/issues/5010 and
// https://github.com/ant-design/ant-design/issues/7909
_this.neverShown = !!column.fixed;
}
};
_this.setSelectedKeys = function (_ref) {
var selectedKeys = _ref.selectedKeys;
_this.setState({
selectedKeys: selectedKeys
});
};
_this.handleClearFilters = function () {
_this.setState({
selectedKeys: []
}, _this.handleConfirm);
};
_this.handleConfirm = function () {
_this.setVisible(false); // Call `setSelectedKeys` & `confirm` in the same time will make filter data not up to date
// https://github.com/ant-design/ant-design/issues/12284
_this.setState({}, _this.confirmFilter);
};
_this.onVisibleChange = function (visible) {
_this.setVisible(visible);
var column = _this.props.column; // https://github.com/ant-design/ant-design/issues/17833
if (!visible && !(column.filterDropdown instanceof Function)) {
_this.confirmFilter();
}
};
_this.handleMenuItemClick = function (info) {
var selectedKeys = _this.state.selectedKeys;
if (!info.keyPath || info.keyPath.length <= 1) {
return;
}
var keyPathOfSelectedItem = _this.state.keyPathOfSelectedItem;
if (selectedKeys && selectedKeys.indexOf(info.key) >= 0) {
// deselect SubMenu child
delete keyPathOfSelectedItem[info.key];
} else {
// select SubMenu child
keyPathOfSelectedItem[info.key] = info.keyPath;
}
_this.setState({
keyPathOfSelectedItem: keyPathOfSelectedItem
});
};
_this.renderFilterIcon = function () {
var _classNames;
var _this$props = _this.props,
column = _this$props.column,
locale = _this$props.locale,
prefixCls = _this$props.prefixCls,
selectedKeys = _this$props.selectedKeys;
var filtered = selectedKeys && selectedKeys.length > 0;
var filterIcon = column.filterIcon;
if (typeof filterIcon === 'function') {
filterIcon = filterIcon(filtered);
}
var dropdownIconClass = (0, _classnames["default"])((_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-selected"), filtered), _defineProperty(_classNames, "".concat(prefixCls, "-open"), _this.getDropdownVisible()), _classNames));
if (!filterIcon) {
return React.createElement(_icon["default"], {
title: locale.filterTitle,
type: "filter",
theme: "filled",
className: dropdownIconClass,
onClick: stopPropagation
});
}
if (React.isValidElement(filterIcon)) {
return React.cloneElement(filterIcon, {
title: filterIcon.props.title || locale.filterTitle,
className: (0, _classnames["default"])("".concat(prefixCls, "-icon"), dropdownIconClass, filterIcon.props.className),
onClick: stopPropagation
});
}
return React.createElement("span", {
className: (0, _classnames["default"])("".concat(prefixCls, "-icon"), dropdownIconClass)
}, filterIcon);
};
var visible = 'filterDropdownVisible' in props.column ? props.column.filterDropdownVisible : false;
_this.state = {
selectedKeys: props.selectedKeys,
valueKeys: (0, _util.generateValueMaps)(props.column.filters),
keyPathOfSelectedItem: {},
visible: visible,
prevProps: props
};
return _this;
}
_createClass(FilterMenu, [{
key: "componentDidMount",
value: function componentDidMount() {
var column = this.props.column;
this.setNeverShown(column);
}
}, {
key: "componentDidUpdate",
value: function componentDidUpdate() {
var column = this.props.column;
this.setNeverShown(column);
}
}, {
key: "getDropdownVisible",
value: function getDropdownVisible() {
return this.neverShown ? false : this.state.visible;
}
}, {
key: "setVisible",
value: function setVisible(visible) {
var column = this.props.column;
if (!('filterDropdownVisible' in column)) {
this.setState({
visible: visible
});
}
if (column.onFilterDropdownVisibleChange) {
column.onFilterDropdownVisibleChange(visible);
}
}
}, {
key: "hasSubMenu",
value: function hasSubMenu() {
var _this$props$column$fi = this.props.column.filters,
filters = _this$props$column$fi === void 0 ? [] : _this$props$column$fi;
return filters.some(function (item) {
return !!(item.children && item.children.length > 0);
});
}
}, {
key: "confirmFilter",
value: function confirmFilter() {
var _this$props2 = this.props,
column = _this$props2.column,
propSelectedKeys = _this$props2.selectedKeys,
confirmFilter = _this$props2.confirmFilter;
var _this$state = this.state,
selectedKeys = _this$state.selectedKeys,
valueKeys = _this$state.valueKeys;
var filterDropdown = column.filterDropdown;
if (!(0, _shallowequal["default"])(selectedKeys, propSelectedKeys)) {
confirmFilter(column, filterDropdown ? selectedKeys : selectedKeys.map(function (key) {
return valueKeys[key];
}).filter(function (key) {
return key !== undefined;
}));
}
}
}, {
key: "renderMenus",
value: function renderMenus(items) {
var _this2 = this;
var _this$props3 = this.props,
dropdownPrefixCls = _this$props3.dropdownPrefixCls,
prefixCls = _this$props3.prefixCls;
return items.map(function (item) {
if (item.children && item.children.length > 0) {
var keyPathOfSelectedItem = _this2.state.keyPathOfSelectedItem;
var containSelected = Object.keys(keyPathOfSelectedItem).some(function (key) {
return keyPathOfSelectedItem[key].indexOf(item.value) >= 0;
});
var subMenuCls = (0, _classnames["default"])("".concat(prefixCls, "-dropdown-submenu"), _defineProperty({}, "".concat(dropdownPrefixCls, "-submenu-contain-selected"), containSelected));
return React.createElement(_rcMenu.SubMenu, {
title: item.text,
popupClassName: subMenuCls,
key: item.value.toString()
}, _this2.renderMenus(item.children));
}
return _this2.renderMenuItem(item);
});
}
}, {
key: "renderMenuItem",
value: function renderMenuItem(item) {
var column = this.props.column;
var selectedKeys = this.state.selectedKeys;
var multiple = 'filterMultiple' in column ? column.filterMultiple : true; // We still need trade key as string since Menu render need string
var internalSelectedKeys = (selectedKeys || []).map(function (key) {
return key.toString();
});
var input = multiple ? React.createElement(_checkbox["default"], {
checked: internalSelectedKeys.indexOf(item.value.toString()) >= 0
}) : React.createElement(_radio["default"], {
checked: internalSelectedKeys.indexOf(item.value.toString()) >= 0
});
return React.createElement(_rcMenu.Item, {
key: item.value
}, input, React.createElement("span", null, item.text));
}
}, {
key: "render",
value: function render() {
var _this3 = this;
var originSelectedKeys = this.state.selectedKeys;
var _this$props4 = this.props,
column = _this$props4.column,
locale = _this$props4.locale,
prefixCls = _this$props4.prefixCls,
dropdownPrefixCls = _this$props4.dropdownPrefixCls,
getPopupContainer = _this$props4.getPopupContainer; // default multiple selection in filter dropdown
var multiple = 'filterMultiple' in column ? column.filterMultiple : true;
var dropdownMenuClass = (0, _classnames["default"])(_defineProperty({}, "".concat(dropdownPrefixCls, "-menu-without-submenu"), !this.hasSubMenu()));
var filterDropdown = column.filterDropdown;
if (filterDropdown instanceof Function) {
filterDropdown = filterDropdown({
prefixCls: "".concat(dropdownPrefixCls, "-custom"),
setSelectedKeys: function setSelectedKeys(selectedKeys) {
return _this3.setSelectedKeys({
selectedKeys: selectedKeys
});
},
selectedKeys: originSelectedKeys,
confirm: this.handleConfirm,
clearFilters: this.handleClearFilters,
filters: column.filters,
visible: this.getDropdownVisible()
});
}
var menus = filterDropdown ? React.createElement(_FilterDropdownMenuWrapper["default"], {
className: "".concat(prefixCls, "-dropdown")
}, filterDropdown) : React.createElement(_FilterDropdownMenuWrapper["default"], {
className: "".concat(prefixCls, "-dropdown")
}, React.createElement(_rcMenu["default"], {
multiple: multiple,
onClick: this.handleMenuItemClick,
prefixCls: "".concat(dropdownPrefixCls, "-menu"),
className: dropdownMenuClass,
onSelect: this.setSelectedKeys,
onDeselect: this.setSelectedKeys,
selectedKeys: originSelectedKeys && originSelectedKeys.map(function (val) {
return val.toString();
}),
getPopupContainer: getPopupContainer
}, this.renderMenus(column.filters)), React.createElement("div", {
className: "".concat(prefixCls, "-dropdown-btns")
}, React.createElement("a", {
className: "".concat(prefixCls, "-dropdown-link confirm"),
onClick: this.handleConfirm
}, locale.filterConfirm), React.createElement("a", {
className: "".concat(prefixCls, "-dropdown-link clear"),
onClick: this.handleClearFilters
}, locale.filterReset)));
return React.createElement(_dropdown["default"], {
trigger: ['click'],
placement: "bottomRight",
overlay: menus,
visible: this.getDropdownVisible(),
onVisibleChange: this.onVisibleChange,
getPopupContainer: getPopupContainer,
forceRender: true
}, this.renderFilterIcon());
}
}], [{
key: "getDerivedStateFromProps",
value: function getDerivedStateFromProps(nextProps, prevState) {
var column = nextProps.column;
var prevProps = prevState.prevProps;
var newState = {
prevProps: nextProps
};
/**
* if the state is visible the component should ignore updates on selectedKeys prop to avoid
* that the user selection is lost
* this happens frequently when a table is connected on some sort of realtime data
* Fixes https://github.com/ant-design/ant-design/issues/10289 and
* https://github.com/ant-design/ant-design/issues/10209
*/
if ('selectedKeys' in nextProps && !(0, _shallowequal["default"])(prevProps.selectedKeys, nextProps.selectedKeys)) {
newState.selectedKeys = nextProps.selectedKeys;
}
if (!(0, _shallowequal["default"])((prevProps.column || {}).filters, (nextProps.column || {}).filters)) {
newState.valueKeys = (0, _util.generateValueMaps)(nextProps.column.filters);
}
if ('filterDropdownVisible' in column) {
newState.visible = column.filterDropdownVisible;
}
return newState;
}
}]);
return FilterMenu;
}(React.Component);
FilterMenu.defaultProps = {
column: {}
};
(0, _reactLifecyclesCompat.polyfill)(FilterMenu);
var _default = FilterMenu;
exports["default"] = _default;
//# sourceMappingURL=filterDropdown.js.map
/***/ }),
/***/ 1389:
/***/ (function(module, exports, __webpack_require__) {
/**
* Module dependencies
*/
var matches = __webpack_require__(1390);
/**
* @param element {Element}
* @param selector {String}
* @param context {Element}
* @return {Element}
*/
module.exports = function (element, selector, context) {
context = context || document;
// guard against orphans
element = { parentNode: element };
while ((element = element.parentNode) && element !== context) {
if (matches(element, selector)) {
return element;
}
}
};
/***/ }),
/***/ 1390:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
* Determine if a DOM element matches a CSS selector
*
* @param {Element} elem
* @param {String} selector
* @return {Boolean}
* @api public
*/
function matches(elem, selector) {
// Vendor-specific implementations of `Element.prototype.matches()`.
var proto = window.Element.prototype;
var nativeMatches = proto.matches ||
proto.mozMatchesSelector ||
proto.msMatchesSelector ||
proto.oMatchesSelector ||
proto.webkitMatchesSelector;
if (!elem || elem.nodeType !== 1) {
return false;
}
var parentElem = elem.parentNode;
// use native 'matches'
if (nativeMatches) {
return nativeMatches.call(elem, selector);
}
// native support for `matches` is missing and a fallback is required
var nodes = parentElem.querySelectorAll(selector);
var len = nodes.length;
for (var i = 0; i < len; i++) {
if (nodes[i] === elem) {
return true;
}
}
return false;
}
/**
* Expose `matches`
*/
module.exports = matches;
/***/ }),
/***/ 1391:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(__webpack_require__(0));
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
var FilterDropdownMenuWrapper = function FilterDropdownMenuWrapper(props) {
return React.createElement("div", {
className: props.className,
onClick: function onClick(e) {
return e.stopPropagation();
}
}, props.children);
};
var _default = FilterDropdownMenuWrapper;
exports["default"] = _default;
//# sourceMappingURL=FilterDropdownMenuWrapper.js.map
/***/ }),
/***/ 1392:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = createStore;
function _extends() { _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; }; return _extends.apply(this, arguments); }
function createStore(initialState) {
var state = initialState;
var listeners = [];
function setState(partial) {
state = _extends(_extends({}, state), partial);
for (var i = 0; i < listeners.length; i++) {
listeners[i]();
}
}
function getState() {
return state;
}
function subscribe(listener) {
listeners.push(listener);
return function unsubscribe() {
var index = listeners.indexOf(listener);
listeners.splice(index, 1);
};
}
return {
setState: setState,
getState: getState,
subscribe: subscribe
};
}
//# sourceMappingURL=createStore.js.map
/***/ }),
/***/ 1393:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(__webpack_require__(0));
var _checkbox = _interopRequireDefault(__webpack_require__(314));
var _radio = _interopRequireDefault(__webpack_require__(175));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _extends() { _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; }; return _extends.apply(this, arguments); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var __rest = void 0 && (void 0).__rest || function (s, e) {
var t = {};
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
var SelectionBox =
/*#__PURE__*/
function (_React$Component) {
_inherits(SelectionBox, _React$Component);
function SelectionBox(props) {
var _this;
_classCallCheck(this, SelectionBox);
_this = _possibleConstructorReturn(this, _getPrototypeOf(SelectionBox).call(this, props));
_this.state = {
checked: _this.getCheckState(props)
};
return _this;
}
_createClass(SelectionBox, [{
key: "componentDidMount",
value: function componentDidMount() {
this.subscribe();
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
if (this.unsubscribe) {
this.unsubscribe();
}
} // eslint-disable-next-line class-methods-use-this
}, {
key: "getCheckState",
value: function getCheckState(props) {
var store = props.store,
defaultSelection = props.defaultSelection,
rowIndex = props.rowIndex;
var checked = false;
if (store.getState().selectionDirty) {
checked = store.getState().selectedRowKeys.indexOf(rowIndex) >= 0;
} else {
checked = store.getState().selectedRowKeys.indexOf(rowIndex) >= 0 || defaultSelection.indexOf(rowIndex) >= 0;
}
return checked;
}
}, {
key: "subscribe",
value: function subscribe() {
var _this2 = this;
var store = this.props.store;
this.unsubscribe = store.subscribe(function () {
var checked = _this2.getCheckState(_this2.props);
_this2.setState({
checked: checked
});
});
}
}, {
key: "render",
value: function render() {
var _a = this.props,
type = _a.type,
rowIndex = _a.rowIndex,
rest = __rest(_a, ["type", "rowIndex"]);
var checked = this.state.checked;
if (type === 'radio') {
return React.createElement(_radio["default"], _extends({
checked: checked,
value: rowIndex
}, rest));
}
return React.createElement(_checkbox["default"], _extends({
checked: checked
}, rest));
}
}]);
return SelectionBox;
}(React.Component);
exports["default"] = SelectionBox;
//# sourceMappingURL=SelectionBox.js.map
/***/ }),
/***/ 1394:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(__webpack_require__(0));
var _classnames = _interopRequireDefault(__webpack_require__(3));
var _reactLifecyclesCompat = __webpack_require__(7);
var _checkbox = _interopRequireDefault(__webpack_require__(314));
var _dropdown = _interopRequireDefault(__webpack_require__(982));
var _menu = _interopRequireDefault(__webpack_require__(924));
var _icon = _interopRequireDefault(__webpack_require__(26));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _extends() { _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; }; return _extends.apply(this, arguments); }
function checkSelection(_ref) {
var store = _ref.store,
getCheckboxPropsByItem = _ref.getCheckboxPropsByItem,
getRecordKey = _ref.getRecordKey,
data = _ref.data,
type = _ref.type,
byDefaultChecked = _ref.byDefaultChecked;
return byDefaultChecked ? data[type](function (item, i) {
return getCheckboxPropsByItem(item, i).defaultChecked;
}) : data[type](function (item, i) {
return store.getState().selectedRowKeys.indexOf(getRecordKey(item, i)) >= 0;
});
}
function getIndeterminateState(props) {
var store = props.store,
data = props.data;
if (!data.length) {
return false;
}
var someCheckedNotByDefaultChecked = checkSelection(_extends(_extends({}, props), {
data: data,
type: 'some',
byDefaultChecked: false
})) && !checkSelection(_extends(_extends({}, props), {
data: data,
type: 'every',
byDefaultChecked: false
}));
var someCheckedByDefaultChecked = checkSelection(_extends(_extends({}, props), {
data: data,
type: 'some',
byDefaultChecked: true
})) && !checkSelection(_extends(_extends({}, props), {
data: data,
type: 'every',
byDefaultChecked: true
}));
if (store.getState().selectionDirty) {
return someCheckedNotByDefaultChecked;
}
return someCheckedNotByDefaultChecked || someCheckedByDefaultChecked;
}
function getCheckState(props) {
var store = props.store,
data = props.data;
if (!data.length) {
return false;
}
if (store.getState().selectionDirty) {
return checkSelection(_extends(_extends({}, props), {
data: data,
type: 'every',
byDefaultChecked: false
}));
}
return checkSelection(_extends(_extends({}, props), {
data: data,
type: 'every',
byDefaultChecked: false
})) || checkSelection(_extends(_extends({}, props), {
data: data,
type: 'every',
byDefaultChecked: true
}));
}
var SelectionCheckboxAll =
/*#__PURE__*/
function (_React$Component) {
_inherits(SelectionCheckboxAll, _React$Component);
function SelectionCheckboxAll(props) {
var _this;
_classCallCheck(this, SelectionCheckboxAll);
_this = _possibleConstructorReturn(this, _getPrototypeOf(SelectionCheckboxAll).call(this, props));
_this.state = {
checked: false,
indeterminate: false
};
_this.handleSelectAllChange = function (e) {
var checked = e.target.checked;
_this.props.onSelect(checked ? 'all' : 'removeAll', 0, null);
};
_this.defaultSelections = props.hideDefaultSelections ? [] : [{
key: 'all',
text: props.locale.selectAll
}, {
key: 'invert',
text: props.locale.selectInvert
}];
return _this;
}
_createClass(SelectionCheckboxAll, [{
key: "componentDidMount",
value: function componentDidMount() {
this.subscribe();
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
if (this.unsubscribe) {
this.unsubscribe();
}
}
}, {
key: "setCheckState",
value: function setCheckState(props) {
var checked = getCheckState(props);
var indeterminate = getIndeterminateState(props);
this.setState(function (prevState) {
var newState = {};
if (indeterminate !== prevState.indeterminate) {
newState.indeterminate = indeterminate;
}
if (checked !== prevState.checked) {
newState.checked = checked;
}
return newState;
});
}
}, {
key: "subscribe",
value: function subscribe() {
var _this2 = this;
var store = this.props.store;
this.unsubscribe = store.subscribe(function () {
_this2.setCheckState(_this2.props);
});
}
}, {
key: "renderMenus",
value: function renderMenus(selections) {
var _this3 = this;
return selections.map(function (selection, index) {
return React.createElement(_menu["default"].Item, {
key: selection.key || index
}, React.createElement("div", {
onClick: function onClick() {
_this3.props.onSelect(selection.key, index, selection.onSelect);
}
}, selection.text));
});
}
}, {
key: "render",
value: function render() {
var _this$props = this.props,
disabled = _this$props.disabled,
prefixCls = _this$props.prefixCls,
selections = _this$props.selections,
getPopupContainer = _this$props.getPopupContainer;
var _this$state = this.state,
checked = _this$state.checked,
indeterminate = _this$state.indeterminate;
var selectionPrefixCls = "".concat(prefixCls, "-selection");
var customSelections = null;
if (selections) {
var newSelections = Array.isArray(selections) ? this.defaultSelections.concat(selections) : this.defaultSelections;
var menu = React.createElement(_menu["default"], {
className: "".concat(selectionPrefixCls, "-menu"),
selectedKeys: []
}, this.renderMenus(newSelections));
customSelections = newSelections.length > 0 ? React.createElement(_dropdown["default"], {
overlay: menu,
getPopupContainer: getPopupContainer
}, React.createElement("div", {
className: "".concat(selectionPrefixCls, "-down")
}, React.createElement(_icon["default"], {
type: "down"
}))) : null;
}
return React.createElement("div", {
className: selectionPrefixCls
}, React.createElement(_checkbox["default"], {
className: (0, _classnames["default"])(_defineProperty({}, "".concat(selectionPrefixCls, "-select-all-custom"), customSelections)),
checked: checked,
indeterminate: indeterminate,
disabled: disabled,
onChange: this.handleSelectAllChange
}), customSelections);
}
}], [{
key: "getDerivedStateFromProps",
value: function getDerivedStateFromProps(props, state) {
var checked = getCheckState(props);
var indeterminate = getIndeterminateState(props);
var newState = {};
if (indeterminate !== state.indeterminate) {
newState.indeterminate = indeterminate;
}
if (checked !== state.checked) {
newState.checked = checked;
}
return newState;
}
}]);
return SelectionCheckboxAll;
}(React.Component);
(0, _reactLifecyclesCompat.polyfill)(SelectionCheckboxAll);
var _default = SelectionCheckboxAll;
exports["default"] = _default;
//# sourceMappingURL=SelectionCheckboxAll.js.map
/***/ }),
/***/ 1395:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(__webpack_require__(0));
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
/* eslint-disable react/prefer-stateless-function */
var Column =
/*#__PURE__*/
function (_React$Component) {
_inherits(Column, _React$Component);
function Column() {
_classCallCheck(this, Column);
return _possibleConstructorReturn(this, _getPrototypeOf(Column).apply(this, arguments));
}
return Column;
}(React.Component);
exports["default"] = Column;
//# sourceMappingURL=Column.js.map
/***/ }),
/***/ 1396:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(__webpack_require__(0));
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var ColumnGroup =
/*#__PURE__*/
function (_React$Component) {
_inherits(ColumnGroup, _React$Component);
function ColumnGroup() {
_classCallCheck(this, ColumnGroup);
return _possibleConstructorReturn(this, _getPrototypeOf(ColumnGroup).apply(this, arguments));
}
return ColumnGroup;
}(React.Component);
exports["default"] = ColumnGroup;
ColumnGroup.__ANT_TABLE_COLUMN_GROUP = true;
//# sourceMappingURL=ColumnGroup.js.map
/***/ }),
/***/ 1397:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = createBodyRow;
var React = _interopRequireWildcard(__webpack_require__(0));
var _classnames2 = _interopRequireDefault(__webpack_require__(3));
var _omit = _interopRequireDefault(__webpack_require__(43));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _extends() { _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; }; return _extends.apply(this, arguments); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function createBodyRow() {
var Component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'tr';
var BodyRow =
/*#__PURE__*/
function (_React$Component) {
_inherits(BodyRow, _React$Component);
function BodyRow(props) {
var _this;
_classCallCheck(this, BodyRow);
_this = _possibleConstructorReturn(this, _getPrototypeOf(BodyRow).call(this, props));
_this.store = props.store;
var _this$store$getState = _this.store.getState(),
selectedRowKeys = _this$store$getState.selectedRowKeys;
_this.state = {
selected: selectedRowKeys.indexOf(props.rowKey) >= 0
};
return _this;
}
_createClass(BodyRow, [{
key: "componentDidMount",
value: function componentDidMount() {
this.subscribe();
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
if (this.unsubscribe) {
this.unsubscribe();
}
}
}, {
key: "subscribe",
value: function subscribe() {
var _this2 = this;
var _this$props = this.props,
store = _this$props.store,
rowKey = _this$props.rowKey;
this.unsubscribe = store.subscribe(function () {
var _this2$store$getState = _this2.store.getState(),
selectedRowKeys = _this2$store$getState.selectedRowKeys;
var selected = selectedRowKeys.indexOf(rowKey) >= 0;
if (selected !== _this2.state.selected) {
_this2.setState({
selected: selected
});
}
});
}
}, {
key: "render",
value: function render() {
var rowProps = (0, _omit["default"])(this.props, ['prefixCls', 'rowKey', 'store']);
var className = (0, _classnames2["default"])(this.props.className, _defineProperty({}, "".concat(this.props.prefixCls, "-row-selected"), this.state.selected));
return React.createElement(Component, _extends(_extends({}, rowProps), {
className: className
}), this.props.children);
}
}]);
return BodyRow;
}(React.Component);
return BodyRow;
}
//# sourceMappingURL=createBodyRow.js.map
/***/ }),
/***/ 1398:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = scrollTo;
var _raf = _interopRequireDefault(__webpack_require__(90));
var _getScroll = _interopRequireDefault(__webpack_require__(1399));
var _easings = __webpack_require__(1400);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function scrollTo(y) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var _options$getContainer = options.getContainer,
getContainer = _options$getContainer === void 0 ? function () {
return window;
} : _options$getContainer,
callback = options.callback,
_options$duration = options.duration,
duration = _options$duration === void 0 ? 450 : _options$duration;
var container = getContainer();
var scrollTop = (0, _getScroll["default"])(container, true);
var startTime = Date.now();
var frameFunc = function frameFunc() {
var timestamp = Date.now();
var time = timestamp - startTime;
var nextScrollTop = (0, _easings.easeInOutCubic)(time > duration ? duration : time, scrollTop, y, duration);
if (container === window) {
window.scrollTo(window.pageXOffset, nextScrollTop);
} else {
container.scrollTop = nextScrollTop;
}
if (time < duration) {
(0, _raf["default"])(frameFunc);
} else if (typeof callback === 'function') {
callback();
}
};
(0, _raf["default"])(frameFunc);
}
//# sourceMappingURL=scrollTo.js.map
/***/ }),
/***/ 1399:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = getScroll;
function getScroll(target, top) {
if (typeof window === 'undefined') {
return 0;
}
var prop = top ? 'pageYOffset' : 'pageXOffset';
var method = top ? 'scrollTop' : 'scrollLeft';
var isWindow = target === window;
var ret = isWindow ? target[prop] : target[method]; // ie6,7,8 standard mode
if (isWindow && typeof ret !== 'number') {
ret = document.documentElement[method];
}
return ret;
}
//# sourceMappingURL=getScroll.js.map
/***/ }),
/***/ 1400:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.easeInOutCubic = easeInOutCubic;
// eslint-disable-next-line import/prefer-default-export
function easeInOutCubic(t, b, c, d) {
var cc = c - b;
t /= d / 2;
if (t < 1) {
return cc / 2 * t * t * t + b;
}
return cc / 2 * ((t -= 2) * t * t + 2) + b;
}
//# sourceMappingURL=easings.js.map
/***/ }),
/***/ 1408:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony export toArray */
/* harmony export (immutable) */ __webpack_exports__["a"] = getActiveIndex;
/* unused harmony export getActiveKey */
/* unused harmony export setTransform */
/* unused harmony export isTransform3dSupported */
/* unused harmony export setTransition */
/* harmony export (immutable) */ __webpack_exports__["e"] = getTransformPropValue;
/* unused harmony export isVertical */
/* harmony export (immutable) */ __webpack_exports__["d"] = getTransformByIndex;
/* harmony export (immutable) */ __webpack_exports__["c"] = getMarginStyle;
/* unused harmony export getStyle */
/* unused harmony export setPxStyle */
/* harmony export (immutable) */ __webpack_exports__["b"] = getDataAttr;
/* unused harmony export getLeft */
/* unused harmony export getTop */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__ = __webpack_require__(59);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);
function toArray(children) {
// allow [c,[a,b]]
var c = [];
__WEBPACK_IMPORTED_MODULE_1_react___default.a.Children.forEach(children, function (child) {
if (child) {
c.push(child);
}
});
return c;
}
function getActiveIndex(children, activeKey) {
var c = toArray(children);
for (var i = 0; i < c.length; i++) {
if (c[i].key === activeKey) {
return i;
}
}
return -1;
}
function getActiveKey(children, index) {
var c = toArray(children);
return c[index].key;
}
function setTransform(style, v) {
style.transform = v;
style.webkitTransform = v;
style.mozTransform = v;
}
function isTransform3dSupported(style) {
return ('transform' in style || 'webkitTransform' in style || 'MozTransform' in style) && window.atob;
}
function setTransition(style, v) {
style.transition = v;
style.webkitTransition = v;
style.MozTransition = v;
}
function getTransformPropValue(v) {
return {
transform: v,
WebkitTransform: v,
MozTransform: v
};
}
function isVertical(tabBarPosition) {
return tabBarPosition === 'left' || tabBarPosition === 'right';
}
function getTransformByIndex(index, tabBarPosition) {
var direction = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'ltr';
var translate = isVertical(tabBarPosition) ? 'translateY' : 'translateX';
if (!isVertical(tabBarPosition) && direction === 'rtl') {
return translate + '(' + index * 100 + '%) translateZ(0)';
}
return translate + '(' + -index * 100 + '%) translateZ(0)';
}
function getMarginStyle(index, tabBarPosition) {
var marginDirection = isVertical(tabBarPosition) ? 'marginTop' : 'marginLeft';
return __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()({}, marginDirection, -index * 100 + '%');
}
function getStyle(el, property) {
return +window.getComputedStyle(el).getPropertyValue(property).replace('px', '');
}
function setPxStyle(el, value, vertical) {
value = vertical ? '0px, ' + value + 'px, 0px' : value + 'px, 0px, 0px';
setTransform(el.style, 'translate3d(' + value + ')');
}
function getDataAttr(props) {
return Object.keys(props).reduce(function (prev, key) {
if (key.substr(0, 5) === 'aria-' || key.substr(0, 5) === 'data-' || key === 'role') {
prev[key] = props[key];
}
return prev;
}, {});
}
function toNum(style, property) {
return +style.getPropertyValue(property).replace('px', '');
}
function getTypeValue(start, current, end, tabNode, wrapperNode) {
var total = getStyle(wrapperNode, 'padding-' + start);
if (!tabNode || !tabNode.parentNode) {
return total;
}
var childNodes = tabNode.parentNode.childNodes;
Array.prototype.some.call(childNodes, function (node) {
var style = window.getComputedStyle(node);
if (node !== tabNode) {
total += toNum(style, 'margin-' + start);
total += node[current];
total += toNum(style, 'margin-' + end);
if (style.boxSizing === 'content-box') {
total += toNum(style, 'border-' + start + '-width') + toNum(style, 'border-' + end + '-width');
}
return false;
}
// We need count current node margin
// ref: https://github.com/react-component/tabs/pull/139#issuecomment-431005262
total += toNum(style, 'margin-' + start);
return true;
});
return total;
}
function getLeft(tabNode, wrapperNode) {
return getTypeValue('left', 'offsetWidth', 'right', tabNode, wrapperNode);
}
function getTop(tabNode, wrapperNode) {
return getTypeValue('top', 'offsetHeight', 'bottom', tabNode, wrapperNode);
}
/***/ }),
/***/ 1412:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
__webpack_require__(28);
__webpack_require__(1430);
//# sourceMappingURL=css.js.map
/***/ }),
/***/ 1413:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(__webpack_require__(0));
var _classnames = _interopRequireDefault(__webpack_require__(3));
var _configProvider = __webpack_require__(12);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _extends() { _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; }; return _extends.apply(this, arguments); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var __rest = void 0 && (void 0).__rest || function (s, e) {
var t = {};
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
var Divider = function Divider(props) {
return React.createElement(_configProvider.ConfigConsumer, null, function (_ref) {
var _classNames;
var getPrefixCls = _ref.getPrefixCls;
var customizePrefixCls = props.prefixCls,
_props$type = props.type,
type = _props$type === void 0 ? 'horizontal' : _props$type,
_props$orientation = props.orientation,
orientation = _props$orientation === void 0 ? 'center' : _props$orientation,
className = props.className,
children = props.children,
dashed = props.dashed,
restProps = __rest(props, ["prefixCls", "type", "orientation", "className", "children", "dashed"]);
var prefixCls = getPrefixCls('divider', customizePrefixCls);
var orientationPrefix = orientation.length > 0 ? "-".concat(orientation) : orientation;
var classString = (0, _classnames["default"])(className, prefixCls, "".concat(prefixCls, "-").concat(type), (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-with-text").concat(orientationPrefix), children), _defineProperty(_classNames, "".concat(prefixCls, "-dashed"), !!dashed), _classNames));
return React.createElement("div", _extends({
className: classString
}, restProps, {
role: "separator"
}), children && React.createElement("span", {
className: "".concat(prefixCls, "-inner-text")
}, children));
});
};
var _default = Divider;
exports["default"] = _default;
//# sourceMappingURL=index.js.map
/***/ }),
/***/ 1427:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
__webpack_require__(28);
__webpack_require__(1439);
__webpack_require__(989);
__webpack_require__(985);
//# sourceMappingURL=css.js.map
/***/ }),
/***/ 1428:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _Breadcrumb = _interopRequireDefault(__webpack_require__(1441));
var _BreadcrumbItem = _interopRequireDefault(__webpack_require__(1345));
var _BreadcrumbSeparator = _interopRequireDefault(__webpack_require__(1442));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
_Breadcrumb["default"].Item = _BreadcrumbItem["default"];
_Breadcrumb["default"].Separator = _BreadcrumbSeparator["default"];
var _default = _Breadcrumb["default"];
exports["default"] = _default;
//# sourceMappingURL=index.js.map
/***/ }),
/***/ 1430:
/***/ (function(module, exports, __webpack_require__) {
// style-loader: Adds some css to the DOM by adding a <style> tag
// load the styles
var content = __webpack_require__(1431);
if(typeof content === 'string') content = [[module.i, content, '']];
// Prepare cssTransformation
var transform;
var options = {"hmr":false}
options.transform = transform
// add the styles to the DOM
var update = __webpack_require__(313)(content, options);
if(content.locals) module.exports = content.locals;
/***/ }),
/***/ 1431:
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(312)(true);
// imports
// module
exports.push([module.i, ".ant-divider{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;color:rgba(0,0,0,.65);font-size:14px;font-variant:tabular-nums;line-height:1.5;list-style:none;-webkit-font-feature-settings:\"tnum\";font-feature-settings:\"tnum\";background:#e8e8e8}.ant-divider,.ant-divider-vertical{position:relative;top:-.06em;display:inline-block;width:1px;height:.9em;margin:0 8px;vertical-align:middle}.ant-divider-horizontal{display:block;clear:both;width:100%;min-width:100%;height:1px;margin:24px 0}.ant-divider-horizontal.ant-divider-with-text-center,.ant-divider-horizontal.ant-divider-with-text-left,.ant-divider-horizontal.ant-divider-with-text-right{display:table;margin:16px 0;color:rgba(0,0,0,.85);font-weight:500;font-size:16px;white-space:nowrap;text-align:center;background:transparent}.ant-divider-horizontal.ant-divider-with-text-center:after,.ant-divider-horizontal.ant-divider-with-text-center:before,.ant-divider-horizontal.ant-divider-with-text-left:after,.ant-divider-horizontal.ant-divider-with-text-left:before,.ant-divider-horizontal.ant-divider-with-text-right:after,.ant-divider-horizontal.ant-divider-with-text-right:before{position:relative;top:50%;display:table-cell;width:50%;border-top:1px solid #e8e8e8;-webkit-transform:translateY(50%);-ms-transform:translateY(50%);transform:translateY(50%);content:\"\"}.ant-divider-horizontal.ant-divider-with-text-left .ant-divider-inner-text,.ant-divider-horizontal.ant-divider-with-text-right .ant-divider-inner-text{display:inline-block;padding:0 10px}.ant-divider-horizontal.ant-divider-with-text-left:before{top:50%;width:5%}.ant-divider-horizontal.ant-divider-with-text-left:after,.ant-divider-horizontal.ant-divider-with-text-right:before{top:50%;width:95%}.ant-divider-horizontal.ant-divider-with-text-right:after{top:50%;width:5%}.ant-divider-inner-text{display:inline-block;padding:0 24px}.ant-divider-dashed{background:none;border-color:#e8e8e8;border-style:dashed;border-width:1px 0 0}.ant-divider-horizontal.ant-divider-with-text-center.ant-divider-dashed,.ant-divider-horizontal.ant-divider-with-text-left.ant-divider-dashed,.ant-divider-horizontal.ant-divider-with-text-right.ant-divider-dashed{border-top:0}.ant-divider-horizontal.ant-divider-with-text-center.ant-divider-dashed:after,.ant-divider-horizontal.ant-divider-with-text-center.ant-divider-dashed:before,.ant-divider-horizontal.ant-divider-with-text-left.ant-divider-dashed:after,.ant-divider-horizontal.ant-divider-with-text-left.ant-divider-dashed:before,.ant-divider-horizontal.ant-divider-with-text-right.ant-divider-dashed:after,.ant-divider-horizontal.ant-divider-with-text-right.ant-divider-dashed:before{border-style:dashed none none}.ant-divider-vertical.ant-divider-dashed{border-width:0 0 0 1px}", "", {"version":3,"sources":["/Users/hs/edu/educoder/public/react/node_modules/antd/lib/divider/style/index.css"],"names":[],"mappings":"AAIA,aACE,8BAA+B,AACvB,sBAAuB,AAC/B,SAAU,AACV,UAAW,AACX,sBAA2B,AAC3B,eAAgB,AAChB,0BAA2B,AAC3B,gBAAiB,AACjB,gBAAiB,AACjB,qCAAsC,AAC9B,6BAA8B,AACtC,kBAAoB,CACrB,AACD,mCAEE,kBAAmB,AACnB,WAAa,AACb,qBAAsB,AACtB,UAAW,AACX,YAAc,AACd,aAAc,AACd,qBAAuB,CACxB,AACD,wBACE,cAAe,AACf,WAAY,AACZ,WAAY,AACZ,eAAgB,AAChB,WAAY,AACZ,aAAe,CAChB,AACD,4JAGE,cAAe,AACf,cAAe,AACf,sBAA2B,AAC3B,gBAAiB,AACjB,eAAgB,AAChB,mBAAoB,AACpB,kBAAmB,AACnB,sBAAwB,CACzB,AACD,+VAME,kBAAmB,AACnB,QAAS,AACT,mBAAoB,AACpB,UAAW,AACX,6BAA8B,AAC9B,kCAAmC,AAC/B,8BAA+B,AAC3B,0BAA2B,AACnC,UAAY,CACb,AACD,uJAEE,qBAAsB,AACtB,cAAgB,CACjB,AACD,0DACE,QAAS,AACT,QAAU,CACX,AAKD,oHAHE,QAAS,AACT,SAAW,CAKZ,AACD,0DACE,QAAS,AACT,QAAU,CACX,AACD,wBACE,qBAAsB,AACtB,cAAgB,CACjB,AACD,oBACE,gBAAiB,AACjB,qBAAsB,AACtB,oBAAqB,AACrB,oBAAsB,CACvB,AACD,qNAGE,YAAc,CACf,AACD,idAME,6BAA+B,CAChC,AACD,yCACE,sBAAwB,CACzB","file":"index.css","sourcesContent":["/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */\n/* stylelint-disable no-duplicate-selectors */\n/* stylelint-disable */\n/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */\n.ant-divider {\n -web
// exports
/***/ }),
/***/ 1439:
/***/ (function(module, exports, __webpack_require__) {
// style-loader: Adds some css to the DOM by adding a <style> tag
// load the styles
var content = __webpack_require__(1440);
if(typeof content === 'string') content = [[module.i, content, '']];
// Prepare cssTransformation
var transform;
var options = {"hmr":false}
options.transform = transform
// add the styles to the DOM
var update = __webpack_require__(313)(content, options);
if(content.locals) module.exports = content.locals;
/***/ }),
/***/ 1440:
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(312)(true);
// imports
// module
exports.push([module.i, ".ant-breadcrumb{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;color:rgba(0,0,0,.65);font-variant:tabular-nums;line-height:1.5;list-style:none;-webkit-font-feature-settings:\"tnum\";font-feature-settings:\"tnum\";color:rgba(0,0,0,.45);font-size:14px}.ant-breadcrumb .anticon{font-size:14px}.ant-breadcrumb a{color:rgba(0,0,0,.45);-webkit-transition:color .3s;-o-transition:color .3s;transition:color .3s}.ant-breadcrumb a:hover{color:#40a9ff}.ant-breadcrumb>span:last-child,.ant-breadcrumb>span:last-child a{color:rgba(0,0,0,.65)}.ant-breadcrumb>span:last-child .ant-breadcrumb-separator{display:none}.ant-breadcrumb-separator{margin:0 8px;color:rgba(0,0,0,.45)}.ant-breadcrumb-link>.anticon+span,.ant-breadcrumb-overlay-link>.anticon{margin-left:4px}", "", {"version":3,"sources":["/Users/hs/edu/educoder/public/react/node_modules/antd/lib/breadcrumb/style/index.css"],"names":[],"mappings":"AAIA,gBACE,8BAA+B,AACvB,sBAAuB,AAC/B,SAAU,AACV,UAAW,AACX,sBAA2B,AAC3B,0BAA2B,AAC3B,gBAAiB,AACjB,gBAAiB,AACjB,qCAAsC,AAC9B,6BAA8B,AACtC,sBAA2B,AAC3B,cAAgB,CACjB,AACD,yBACE,cAAgB,CACjB,AACD,kBACE,sBAA2B,AAC3B,6BAA+B,AAC/B,wBAA0B,AAC1B,oBAAuB,CACxB,AACD,wBACE,aAAe,CAChB,AAID,kEACE,qBAA2B,CAC5B,AACD,0DACE,YAAc,CACf,AACD,0BACE,aAAc,AACd,qBAA2B,CAC5B,AAID,yEACE,eAAiB,CAClB","file":"index.css","sourcesContent":["/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */\n/* stylelint-disable no-duplicate-selectors */\n/* stylelint-disable */\n/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */\n.ant-breadcrumb {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n color: rgba(0, 0, 0, 0.65);\n font-variant: tabular-nums;\n line-height: 1.5;\n list-style: none;\n -webkit-font-feature-settings: 'tnum';\n font-feature-settings: 'tnum';\n color: rgba(0, 0, 0, 0.45);\n font-size: 14px;\n}\n.ant-breadcrumb .anticon {\n font-size: 14px;\n}\n.ant-breadcrumb a {\n color: rgba(0, 0, 0, 0.45);\n -webkit-transition: color 0.3s;\n -o-transition: color 0.3s;\n transition: color 0.3s;\n}\n.ant-breadcrumb a:hover {\n color: #40a9ff;\n}\n.ant-breadcrumb > span:last-child {\n color: rgba(0, 0, 0, 0.65);\n}\n.ant-breadcrumb > span:last-child a {\n color: rgba(0, 0, 0, 0.65);\n}\n.ant-breadcrumb > span:last-child .ant-breadcrumb-separator {\n display: none;\n}\n.ant-breadcrumb-separator {\n margin: 0 8px;\n color: rgba(0, 0, 0, 0.45);\n}\n.ant-breadcrumb-link > .anticon + span {\n margin-left: 4px;\n}\n.ant-breadcrumb-overlay-link > .anticon {\n margin-left: 4px;\n}\n"],"sourceRoot":""}]);
// exports
/***/ }),
/***/ 1441:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(__webpack_require__(0));
var PropTypes = _interopRequireWildcard(__webpack_require__(1));
var _classnames = _interopRequireDefault(__webpack_require__(3));
var _toArray = _interopRequireDefault(__webpack_require__(1343));
var _omit = _interopRequireDefault(__webpack_require__(43));
var _BreadcrumbItem = _interopRequireDefault(__webpack_require__(1345));
var _menu = _interopRequireDefault(__webpack_require__(924));
var _configProvider = __webpack_require__(12);
var _warning = _interopRequireDefault(__webpack_require__(40));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _extends() { _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; }; return _extends.apply(this, arguments); }
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var __rest = void 0 && (void 0).__rest || function (s, e) {
var t = {};
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
function getBreadcrumbName(route, params) {
if (!route.breadcrumbName) {
return null;
}
var paramsKeys = Object.keys(params).join('|');
var name = route.breadcrumbName.replace(new RegExp(":(".concat(paramsKeys, ")"), 'g'), function (replacement, key) {
return params[key] || replacement;
});
return name;
}
function defaultItemRender(route, params, routes, paths) {
var isLastItem = routes.indexOf(route) === routes.length - 1;
var name = getBreadcrumbName(route, params);
return isLastItem ? React.createElement("span", null, name) : React.createElement("a", {
href: "#/".concat(paths.join('/'))
}, name);
}
function filterFragment(children) {
return (0, _toArray["default"])(children).map(function (element) {
if (React.isValidElement(element) && element.type === React.Fragment) {
var props = element.props;
return props.children;
}
return element;
});
}
var Breadcrumb =
/*#__PURE__*/
function (_React$Component) {
_inherits(Breadcrumb, _React$Component);
function Breadcrumb() {
var _this;
_classCallCheck(this, Breadcrumb);
_this = _possibleConstructorReturn(this, _getPrototypeOf(Breadcrumb).apply(this, arguments));
_this.getPath = function (path, params) {
path = (path || '').replace(/^\//, '');
Object.keys(params).forEach(function (key) {
path = path.replace(":".concat(key), params[key]);
});
return path;
};
_this.addChildPath = function (paths) {
var childPath = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
var params = arguments.length > 2 ? arguments[2] : undefined;
var originalPaths = _toConsumableArray(paths);
var path = _this.getPath(childPath, params);
if (path) {
originalPaths.push(path);
}
return originalPaths;
};
_this.genForRoutes = function (_ref) {
var _ref$routes = _ref.routes,
routes = _ref$routes === void 0 ? [] : _ref$routes,
_ref$params = _ref.params,
params = _ref$params === void 0 ? {} : _ref$params,
separator = _ref.separator,
_ref$itemRender = _ref.itemRender,
itemRender = _ref$itemRender === void 0 ? defaultItemRender : _ref$itemRender;
var paths = [];
return routes.map(function (route) {
var path = _this.getPath(route.path, params);
if (path) {
paths.push(path);
} // generated overlay by route.children
var overlay = null;
if (route.children && route.children.length) {
overlay = React.createElement(_menu["default"], null, route.children.map(function (child) {
return React.createElement(_menu["default"].Item, {
key: child.breadcrumbName || child.path
}, itemRender(child, params, routes, _this.addChildPath(paths, child.path, params)));
}));
}
return React.createElement(_BreadcrumbItem["default"], {
overlay: overlay,
separator: separator,
key: route.breadcrumbName || path
}, itemRender(route, params, routes, paths));
});
};
_this.renderBreadcrumb = function (_ref2) {
var getPrefixCls = _ref2.getPrefixCls;
var crumbs;
var _a = _this.props,
customizePrefixCls = _a.prefixCls,
separator = _a.separator,
style = _a.style,
className = _a.className,
routes = _a.routes,
children = _a.children,
restProps = __rest(_a, ["prefixCls", "separator", "style", "className", "routes", "children"]);
var prefixCls = getPrefixCls('breadcrumb', customizePrefixCls);
if (routes && routes.length > 0) {
// generated by route
crumbs = _this.genForRoutes(_this.props);
} else if (children) {
crumbs = React.Children.map(filterFragment(children), function (element, index) {
if (!element) {
return element;
}
(0, _warning["default"])(element.type && (element.type.__ANT_BREADCRUMB_ITEM === true || element.type.__ANT_BREADCRUMB_SEPARATOR === true), 'Breadcrumb', "Only accepts Breadcrumb.Item and Breadcrumb.Separator as it's children");
return React.cloneElement(element, {
separator: separator,
key: index
});
});
}
return React.createElement("div", _extends({
className: (0, _classnames["default"])(className, prefixCls),
style: style
}, (0, _omit["default"])(restProps, ['itemRender', 'params'])), crumbs);
};
return _this;
}
_createClass(Breadcrumb, [{
key: "componentDidMount",
value: function componentDidMount() {
var props = this.props;
(0, _warning["default"])(!('linkRender' in props || 'nameRender' in props), 'Breadcrumb', '`linkRender` and `nameRender` are removed, please use `itemRender` instead, ' + 'see: https://u.ant.design/item-render.');
}
}, {
key: "render",
value: function render() {
return React.createElement(_configProvider.ConfigConsumer, null, this.renderBreadcrumb);
}
}]);
return Breadcrumb;
}(React.Component);
exports["default"] = Breadcrumb;
Breadcrumb.defaultProps = {
separator: '/'
};
Breadcrumb.propTypes = {
prefixCls: PropTypes.string,
separator: PropTypes.node,
routes: PropTypes.array
};
//# sourceMappingURL=Breadcrumb.js.map
/***/ }),
/***/ 1442:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(__webpack_require__(0));
var _configProvider = __webpack_require__(12);
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var BreadcrumbSeparator =
/*#__PURE__*/
function (_React$Component) {
_inherits(BreadcrumbSeparator, _React$Component);
function BreadcrumbSeparator() {
var _this;
_classCallCheck(this, BreadcrumbSeparator);
_this = _possibleConstructorReturn(this, _getPrototypeOf(BreadcrumbSeparator).apply(this, arguments));
_this.renderSeparator = function (_ref) {
var getPrefixCls = _ref.getPrefixCls;
var children = _this.props.children;
var prefixCls = getPrefixCls('breadcrumb');
return React.createElement("span", {
className: "".concat(prefixCls, "-separator")
}, children || '/');
};
return _this;
}
_createClass(BreadcrumbSeparator, [{
key: "render",
value: function render() {
return React.createElement(_configProvider.ConfigConsumer, null, this.renderSeparator);
}
}]);
return BreadcrumbSeparator;
}(React.Component);
exports["default"] = BreadcrumbSeparator;
BreadcrumbSeparator.__ANT_BREADCRUMB_SEPARATOR = true;
//# sourceMappingURL=BreadcrumbSeparator.js.map
/***/ }),
/***/ 1445:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(18);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty__ = __webpack_require__(59);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(75);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_objectWithoutProperties__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck__ = __webpack_require__(9);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_createClass__ = __webpack_require__(31);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_createClass__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(10);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_possibleConstructorReturn__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_babel_runtime_helpers_inherits__ = __webpack_require__(11);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_babel_runtime_helpers_inherits__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_prop_types__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_prop_types__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_classnames__ = __webpack_require__(3);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_classnames__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils__ = __webpack_require__(1408);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__Sentinel__ = __webpack_require__(1446);
var TabPane = function (_React$Component) {
__WEBPACK_IMPORTED_MODULE_6_babel_runtime_helpers_inherits___default()(TabPane, _React$Component);
function TabPane() {
__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck___default()(this, TabPane);
return __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_possibleConstructorReturn___default()(this, (TabPane.__proto__ || Object.getPrototypeOf(TabPane)).apply(this, arguments));
}
__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_createClass___default()(TabPane, [{
key: 'render',
value: function render() {
var _classnames;
var _props = this.props,
id = _props.id,
className = _props.className,
destroyInactiveTabPane = _props.destroyInactiveTabPane,
active = _props.active,
forceRender = _props.forceRender,
rootPrefixCls = _props.rootPrefixCls,
style = _props.style,
children = _props.children,
placeholder = _props.placeholder,
restProps = __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['id', 'className', 'destroyInactiveTabPane', 'active', 'forceRender', 'rootPrefixCls', 'style', 'children', 'placeholder']);
this._isActived = this._isActived || active;
var prefixCls = rootPrefixCls + '-tabpane';
var cls = __WEBPACK_IMPORTED_MODULE_9_classnames___default()((_classnames = {}, __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()(_classnames, prefixCls, 1), __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()(_classnames, prefixCls + '-inactive', !active), __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()(_classnames, prefixCls + '-active', active), __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()(_classnames, className, className), _classnames));
var isRender = destroyInactiveTabPane ? active : this._isActived;
var shouldRender = isRender || forceRender;
return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(
__WEBPACK_IMPORTED_MODULE_11__Sentinel__["a" /* SentinelConsumer */],
null,
function (_ref) {
var sentinelStart = _ref.sentinelStart,
sentinelEnd = _ref.sentinelEnd,
setPanelSentinelStart = _ref.setPanelSentinelStart,
setPanelSentinelEnd = _ref.setPanelSentinelEnd;
// Create sentinel
var panelSentinelStart = void 0;
var panelSentinelEnd = void 0;
if (active && shouldRender) {
panelSentinelStart = __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11__Sentinel__["c" /* default */], {
setRef: setPanelSentinelStart,
prevElement: sentinelStart
});
panelSentinelEnd = __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11__Sentinel__["c" /* default */], {
setRef: setPanelSentinelEnd,
nextElement: sentinelEnd
});
}
return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(
'div',
__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({
style: style,
role: 'tabpanel',
'aria-hidden': active ? 'false' : 'true',
className: cls,
id: id
}, Object(__WEBPACK_IMPORTED_MODULE_10__utils__["b" /* getDataAttr */])(restProps)),
panelSentinelStart,
shouldRender ? children : placeholder,
panelSentinelEnd
);
}
);
}
}]);
return TabPane;
}(__WEBPACK_IMPORTED_MODULE_7_react___default.a.Component);
/* harmony default export */ __webpack_exports__["a"] = (TabPane);
TabPane.propTypes = {
className: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string,
active: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool,
style: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.any,
destroyInactiveTabPane: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool,
forceRender: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool,
placeholder: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.node,
rootPrefixCls: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string,
children: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.node,
id: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string
};
TabPane.defaultProps = {
placeholder: null
};
/***/ }),
/***/ 1446:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return SentinelProvider; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SentinelConsumer; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__ = __webpack_require__(9);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass__ = __webpack_require__(31);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(10);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__ = __webpack_require__(11);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_rc_util_es_KeyCode__ = __webpack_require__(178);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__ant_design_create_react_context__ = __webpack_require__(316);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__ant_design_create_react_context___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7__ant_design_create_react_context__);
/* eslint-disable jsx-a11y/no-noninteractive-tabindex */
var SentinelContext = __WEBPACK_IMPORTED_MODULE_7__ant_design_create_react_context___default()({});
var SentinelProvider = SentinelContext.Provider;
var SentinelConsumer = SentinelContext.Consumer;
var sentinelStyle = { width: 0, height: 0, overflow: 'hidden', position: 'absolute' };
var Sentinel = function (_React$Component) {
__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default()(Sentinel, _React$Component);
function Sentinel() {
var _ref;
var _temp, _this, _ret;
__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default()(this, Sentinel);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default()(this, (_ref = Sentinel.__proto__ || Object.getPrototypeOf(Sentinel)).call.apply(_ref, [this].concat(args))), _this), _this.onKeyDown = function (_ref2) {
var target = _ref2.target,
which = _ref2.which,
shiftKey = _ref2.shiftKey;
var _this$props = _this.props,
nextElement = _this$props.nextElement,
prevElement = _this$props.prevElement;
if (which !== __WEBPACK_IMPORTED_MODULE_6_rc_util_es_KeyCode__["a" /* default */].TAB || document.activeElement !== target) return;
// Tab next
if (!shiftKey && nextElement) {
nextElement.focus();
}
// Tab prev
if (shiftKey && prevElement) {
prevElement.focus();
}
}, _temp), __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default()(_this, _ret);
}
__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass___default()(Sentinel, [{
key: 'render',
value: function render() {
var setRef = this.props.setRef;
return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('div', {
tabIndex: 0,
ref: setRef,
style: sentinelStyle,
onKeyDown: this.onKeyDown,
role: 'presentation'
});
}
}]);
return Sentinel;
}(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component);
Sentinel.propTypes = {
setRef: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func,
prevElement: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.object,
nextElement: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.object
};
/* harmony default export */ __webpack_exports__["c"] = (Sentinel);
/***/ }),
/***/ 1447:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "Row", {
enumerable: true,
get: function get() {
return _row["default"];
}
});
Object.defineProperty(exports, "Col", {
enumerable: true,
get: function get() {
return _col["default"];
}
});
var _row = _interopRequireDefault(__webpack_require__(986));
var _col = _interopRequireDefault(__webpack_require__(987));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
//# sourceMappingURL=index.js.map
/***/ }),
/***/ 1482:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
__webpack_require__(28);
__webpack_require__(949);
//# sourceMappingURL=css.js.map
/***/ }),
/***/ 1483:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _grid = __webpack_require__(1447);
var _default = _grid.Row;
exports["default"] = _default;
//# sourceMappingURL=index.js.map
/***/ }),
/***/ 1484:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
__webpack_require__(28);
__webpack_require__(949);
//# sourceMappingURL=css.js.map
/***/ }),
/***/ 1485:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _grid = __webpack_require__(1447);
var _default = _grid.Col;
exports["default"] = _default;
//# sourceMappingURL=index.js.map
/***/ }),
/***/ 1491:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
__webpack_require__(28);
__webpack_require__(1495);
__webpack_require__(318);
__webpack_require__(68);
//# sourceMappingURL=css.js.map
/***/ }),
/***/ 1492:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(__webpack_require__(0));
var _rcSelect = __webpack_require__(351);
var _classnames = _interopRequireDefault(__webpack_require__(3));
var _InputElement = _interopRequireDefault(__webpack_require__(1497));
var _input = _interopRequireDefault(__webpack_require__(69));
var _select = _interopRequireDefault(__webpack_require__(315));
var _configProvider = __webpack_require__(12);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _extends() { _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; }; return _extends.apply(this, arguments); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function isSelectOptionOrSelectOptGroup(child) {
return child && child.type && (child.type.isSelectOption || child.type.isSelectOptGroup);
}
var AutoComplete =
/*#__PURE__*/
function (_React$Component) {
_inherits(AutoComplete, _React$Component);
function AutoComplete() {
var _this;
_classCallCheck(this, AutoComplete);
_this = _possibleConstructorReturn(this, _getPrototypeOf(AutoComplete).apply(this, arguments));
_this.saveSelect = function (node) {
_this.select = node;
};
_this.getInputElement = function () {
var children = _this.props.children;
var element = children && React.isValidElement(children) && children.type !== _rcSelect.Option ? React.Children.only(_this.props.children) : React.createElement(_input["default"], null);
var elementProps = _extends({}, element.props); // https://github.com/ant-design/ant-design/pull/7742
delete elementProps.children;
return React.createElement(_InputElement["default"], elementProps, element);
};
_this.renderAutoComplete = function (_ref) {
var _classNames;
var getPrefixCls = _ref.getPrefixCls;
var _this$props = _this.props,
customizePrefixCls = _this$props.prefixCls,
size = _this$props.size,
_this$props$className = _this$props.className,
className = _this$props$className === void 0 ? '' : _this$props$className,
notFoundContent = _this$props.notFoundContent,
optionLabelProp = _this$props.optionLabelProp,
dataSource = _this$props.dataSource,
children = _this$props.children;
var prefixCls = getPrefixCls('select', customizePrefixCls);
var cls = (0, _classnames["default"])((_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-lg"), size === 'large'), _defineProperty(_classNames, "".concat(prefixCls, "-sm"), size === 'small'), _defineProperty(_classNames, className, !!className), _defineProperty(_classNames, "".concat(prefixCls, "-show-search"), true), _defineProperty(_classNames, "".concat(prefixCls, "-auto-complete"), true), _classNames));
var options;
var childArray = React.Children.toArray(children);
if (childArray.length && isSelectOptionOrSelectOptGroup(childArray[0])) {
options = children;
} else {
options = dataSource ? dataSource.map(function (item) {
if (React.isValidElement(item)) {
return item;
}
switch (_typeof(item)) {
case 'string':
return React.createElement(_rcSelect.Option, {
key: item
}, item);
case 'object':
return React.createElement(_rcSelect.Option, {
key: item.value
}, item.text);
default:
throw new Error('AutoComplete[dataSource] only supports type `string[] | Object[]`.');
}
}) : [];
}
return React.createElement(_select["default"], _extends({}, _this.props, {
className: cls,
mode: _select["default"].SECRET_COMBOBOX_MODE_DO_NOT_USE,
optionLabelProp: optionLabelProp,
getInputElement: _this.getInputElement,
notFoundContent: notFoundContent,
ref: _this.saveSelect
}), options);
};
return _this;
}
_createClass(AutoComplete, [{
key: "focus",
value: function focus() {
this.select.focus();
}
}, {
key: "blur",
value: function blur() {
this.select.blur();
}
}, {
key: "render",
value: function render() {
return React.createElement(_configProvider.ConfigConsumer, null, this.renderAutoComplete);
}
}]);
return AutoComplete;
}(React.Component);
exports["default"] = AutoComplete;
AutoComplete.Option = _rcSelect.Option;
AutoComplete.OptGroup = _rcSelect.OptGroup;
AutoComplete.defaultProps = {
transitionName: 'slide-up',
optionLabelProp: 'children',
choiceTransitionName: 'zoom',
showSearch: false,
filterOption: false
};
//# sourceMappingURL=index.js.map
/***/ }),
/***/ 1495:
/***/ (function(module, exports, __webpack_require__) {
// style-loader: Adds some css to the DOM by adding a <style> tag
// load the styles
var content = __webpack_require__(1496);
if(typeof content === 'string') content = [[module.i, content, '']];
// Prepare cssTransformation
var transform;
var options = {"hmr":false}
options.transform = transform
// add the styles to the DOM
var update = __webpack_require__(313)(content, options);
if(content.locals) module.exports = content.locals;
/***/ }),
/***/ 1496:
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(312)(true);
// imports
// module
exports.push([module.i, ".ant-select-auto-complete{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;color:rgba(0,0,0,.65);font-size:14px;font-variant:tabular-nums;line-height:1.5;list-style:none;-webkit-font-feature-settings:\"tnum\";font-feature-settings:\"tnum\"}.ant-select-auto-complete.ant-select .ant-select-selection{border:0;-webkit-box-shadow:none;box-shadow:none}.ant-select-auto-complete.ant-select .ant-select-selection__rendered{height:100%;margin-right:0;margin-left:0;line-height:32px}.ant-select-auto-complete.ant-select .ant-select-selection__placeholder{margin-right:12px;margin-left:12px}.ant-select-auto-complete.ant-select .ant-select-selection--single{height:auto}.ant-select-auto-complete.ant-select .ant-select-search--inline{position:static;float:left}.ant-select-auto-complete.ant-select-allow-clear .ant-select-selection:hover .ant-select-selection__rendered{margin-right:0!important}.ant-select-auto-complete.ant-select .ant-input{height:32px;line-height:1.5;background:transparent;border-width:1px}.ant-select-auto-complete.ant-select .ant-input:focus,.ant-select-auto-complete.ant-select .ant-input:hover{border-color:#40a9ff;border-right-width:1px!important}.ant-select-auto-complete.ant-select .ant-input[disabled]{color:rgba(0,0,0,.25);background-color:#f5f5f5;cursor:not-allowed;opacity:1;background-color:transparent}.ant-select-auto-complete.ant-select .ant-input[disabled]:hover{border-color:#d9d9d9;border-right-width:1px!important}.ant-select-auto-complete.ant-select-lg .ant-select-selection__rendered{line-height:40px}.ant-select-auto-complete.ant-select-lg .ant-input{height:40px;padding-top:6px;padding-bottom:6px}.ant-select-auto-complete.ant-select-sm .ant-select-selection__rendered{line-height:24px}.ant-select-auto-complete.ant-select-sm .ant-input{height:24px;padding-top:1px;padding-bottom:1px}.ant-input-group>.ant-select-auto-complete .ant-select-search__field.ant-input-affix-wrapper{display:inline;float:none}", "", {"version":3,"sources":["/Users/hs/edu/educoder/public/react/node_modules/antd/lib/auto-complete/style/index.css"],"names":[],"mappings":"AAIA,0BACE,8BAA+B,AACvB,sBAAuB,AAC/B,SAAU,AACV,UAAW,AACX,sBAA2B,AAC3B,eAAgB,AAChB,0BAA2B,AAC3B,gBAAiB,AACjB,gBAAiB,AACjB,qCAAsC,AAC9B,4BAA8B,CACvC,AACD,2DACE,SAAU,AACV,wBAAyB,AACjB,eAAiB,CAC1B,AACD,qEACE,YAAa,AACb,eAAgB,AAChB,cAAe,AACf,gBAAkB,CACnB,AACD,wEACE,kBAAmB,AACnB,gBAAkB,CACnB,AACD,mEACE,WAAa,CACd,AACD,gEACE,gBAAiB,AACjB,UAAY,CACb,AACD,6GACE,wBAA2B,CAC5B,AACD,gDACE,YAAa,AACb,gBAAiB,AACjB,uBAAwB,AACxB,gBAAkB,CACnB,AACD,4GAEE,qBAAsB,AACtB,gCAAmC,CACpC,AACD,0DACE,sBAA2B,AAC3B,yBAA0B,AAC1B,mBAAoB,AACpB,UAAW,AACX,4BAA8B,CAC/B,AACD,gEACE,qBAAsB,AACtB,gCAAmC,CACpC,AACD,wEACE,gBAAkB,CACnB,AACD,mDACE,YAAa,AACb,gBAAiB,AACjB,kBAAoB,CACrB,AACD,wEACE,gBAAkB,CACnB,AACD,mDACE,YAAa,AACb,gBAAiB,AACjB,kBAAoB,CACrB,AACD,6FACE,eAAgB,AAChB,UAAY,CACb","file":"index.css","sourcesContent":["/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */\n/* stylelint-disable no-duplicate-selectors */\n/* stylelint-disable */\n/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */\n.ant-select-auto-complete {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n color: rgba(0, 0, 0, 0.65);\n font-size: 14px;\n font-variant: tabular-nums;\n line-height: 1.5;\n list-style: none;\n -webkit-font-feature-settings: 'tnum';\n font-feature-settings: 'tnum';\n}\n.ant-select-auto-complete.ant-select .ant-select-selection {\n border: 0;\n -webkit-box-shadow: none;\n box-shadow: none;\n}\n.ant-select-auto-complete.ant-select .ant-select-selection__rendered {\n height: 100%;\n margin-right: 0;\n margin-left: 0;\n line-height: 32px;\n}\n.ant-select-auto-complete.ant-select .ant-select-selection__placeholder {\n margin-right: 12px;\n margin-left: 12px;\n}\n.ant-select-auto-complete.ant-select .ant-select-selection--single {\n height: auto;\n}\n.ant-select-auto-complete.ant-select .ant-select-search--inline {\n posi
// exports
/***/ }),
/***/ 1497:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(__webpack_require__(0));
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _extends() { _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; }; return _extends.apply(this, arguments); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var InputElement =
/*#__PURE__*/
function (_React$Component) {
_inherits(InputElement, _React$Component);
function InputElement() {
var _this;
_classCallCheck(this, InputElement);
_this = _possibleConstructorReturn(this, _getPrototypeOf(InputElement).apply(this, arguments));
_this.saveRef = function (ele) {
var childRef = _this.props.children.ref;
if (typeof childRef === 'function') {
childRef(ele);
}
};
return _this;
}
_createClass(InputElement, [{
key: "render",
value: function render() {
return React.cloneElement(this.props.children, _extends(_extends({}, this.props), {
ref: this.saveRef
}), null);
}
}]);
return InputElement;
}(React.Component);
exports["default"] = InputElement;
//# sourceMappingURL=InputElement.js.map
/***/ }),
/***/ 1499:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
__webpack_require__(28);
__webpack_require__(1541);
//# sourceMappingURL=css.js.map
/***/ }),
/***/ 1500:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(__webpack_require__(0));
var ReactDOM = _interopRequireWildcard(__webpack_require__(4));
var _rcTabs = _interopRequireWildcard(__webpack_require__(1543));
var _TabContent = _interopRequireDefault(__webpack_require__(1548));
var _classnames = _interopRequireDefault(__webpack_require__(3));
var _omit = _interopRequireDefault(__webpack_require__(43));
var _TabBar = _interopRequireDefault(__webpack_require__(1549));
var _icon = _interopRequireDefault(__webpack_require__(26));
var _configProvider = __webpack_require__(12);
var _warning = _interopRequireDefault(__webpack_require__(40));
var _styleChecker = __webpack_require__(1512);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _extends() { _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; }; return _extends.apply(this, arguments); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var __rest = void 0 && (void 0).__rest || function (s, e) {
var t = {};
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
var Tabs =
/*#__PURE__*/
function (_React$Component) {
_inherits(Tabs, _React$Component);
function Tabs() {
var _this;
_classCallCheck(this, Tabs);
_this = _possibleConstructorReturn(this, _getPrototypeOf(Tabs).apply(this, arguments));
_this.removeTab = function (targetKey, e) {
e.stopPropagation();
if (!targetKey) {
return;
}
var onEdit = _this.props.onEdit;
if (onEdit) {
onEdit(targetKey, 'remove');
}
};
_this.handleChange = function (activeKey) {
var onChange = _this.props.onChange;
if (onChange) {
onChange(activeKey);
}
};
_this.createNewTab = function (targetKey) {
var onEdit = _this.props.onEdit;
if (onEdit) {
onEdit(targetKey, 'add');
}
};
_this.renderTabs = function (_ref) {
var _classNames;
var getPrefixCls = _ref.getPrefixCls;
var _this$props = _this.props,
customizePrefixCls = _this$props.prefixCls,
_this$props$className = _this$props.className,
className = _this$props$className === void 0 ? '' : _this$props$className,
size = _this$props.size,
_this$props$type = _this$props.type,
type = _this$props$type === void 0 ? 'line' : _this$props$type,
tabPosition = _this$props.tabPosition,
children = _this$props.children,
_this$props$animated = _this$props.animated,
animated = _this$props$animated === void 0 ? true : _this$props$animated,
hideAdd = _this$props.hideAdd;
var tabBarExtraContent = _this.props.tabBarExtraContent;
var tabPaneAnimated = _typeof(animated) === 'object' ? animated.tabPane : animated; // card tabs should not have animation
if (type !== 'line') {
tabPaneAnimated = 'animated' in _this.props ? tabPaneAnimated : false;
}
(0, _warning["default"])(!(type.indexOf('card') >= 0 && (size === 'small' || size === 'large')), 'Tabs', "`type=card|editable-card` doesn't have small or large size, it's by design.");
var prefixCls = getPrefixCls('tabs', customizePrefixCls);
var cls = (0, _classnames["default"])(className, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-vertical"), tabPosition === 'left' || tabPosition === 'right'), _defineProperty(_classNames, "".concat(prefixCls, "-").concat(size), !!size), _defineProperty(_classNames, "".concat(prefixCls, "-card"), type.indexOf('card') >= 0), _defineProperty(_classNames, "".concat(prefixCls, "-").concat(type), true), _defineProperty(_classNames, "".concat(prefixCls, "-no-animation"), !tabPaneAnimated), _classNames)); // only card type tabs can be added and closed
var childrenWithClose = [];
if (type === 'editable-card') {
childrenWithClose = [];
React.Children.forEach(children, function (child, index) {
if (!React.isValidElement(child)) return child;
var closable = child.props.closable;
closable = typeof closable === 'undefined' ? true : closable;
var closeIcon = closable ? React.createElement(_icon["default"], {
type: "close",
className: "".concat(prefixCls, "-close-x"),
onClick: function onClick(e) {
return _this.removeTab(child.key, e);
}
}) : null;
childrenWithClose.push(React.cloneElement(child, {
tab: React.createElement("div", {
className: closable ? undefined : "".concat(prefixCls, "-tab-unclosable")
}, child.props.tab, closeIcon),
key: child.key || index
}));
}); // Add new tab handler
if (!hideAdd) {
tabBarExtraContent = React.createElement("span", null, React.createElement(_icon["default"], {
type: "plus",
className: "".concat(prefixCls, "-new-tab"),
onClick: _this.createNewTab
}), tabBarExtraContent);
}
}
tabBarExtraContent = tabBarExtraContent ? React.createElement("div", {
className: "".concat(prefixCls, "-extra-content")
}, tabBarExtraContent) : null;
var tabBarProps = __rest(_this.props, []);
var contentCls = (0, _classnames["default"])("".concat(prefixCls, "-").concat(tabPosition, "-content"), type.indexOf('card') >= 0 && "".concat(prefixCls, "-card-content"));
return React.createElement(_rcTabs["default"], _extends({}, _this.props, {
prefixCls: prefixCls,
className: cls,
tabBarPosition: tabPosition,
renderTabBar: function renderTabBar() {
return React.createElement(_TabBar["default"], _extends({}, (0, _omit["default"])(tabBarProps, ['className']), {
tabBarExtraContent: tabBarExtraContent
}));
},
renderTabContent: function renderTabContent() {
return React.createElement(_TabContent["default"], {
className: contentCls,
animated: tabPaneAnimated,
animatedWithMargin: true
});
},
onChange: _this.handleChange
}), childrenWithClose.length > 0 ? childrenWithClose : children);
};
return _this;
}
_createClass(Tabs, [{
key: "componentDidMount",
value: function componentDidMount() {
var NO_FLEX = ' no-flex';
var tabNode = ReactDOM.findDOMNode(this);
if (tabNode && !_styleChecker.isFlexSupported && tabNode.className.indexOf(NO_FLEX) === -1) {
tabNode.className += NO_FLEX;
}
}
}, {
key: "render",
value: function render() {
return React.createElement(_configProvider.ConfigConsumer, null, this.renderTabs);
}
}]);
return Tabs;
}(React.Component);
exports["default"] = Tabs;
Tabs.TabPane = _rcTabs.TabPane;
Tabs.defaultProps = {
hideAdd: false,
tabPosition: 'top'
};
//# sourceMappingURL=index.js.map
/***/ }),
/***/ 1512:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = exports.isFlexSupported = void 0;
var isStyleSupport = function isStyleSupport(styleName) {
if (typeof window !== 'undefined' && window.document && window.document.documentElement) {
var styleNameList = Array.isArray(styleName) ? styleName : [styleName];
var documentElement = window.document.documentElement;
return styleNameList.some(function (name) {
return name in documentElement.style;
});
}
return false;
};
var isFlexSupported = isStyleSupport(['flex', 'webkitFlex', 'Flex', 'msFlex']);
exports.isFlexSupported = isFlexSupported;
var _default = isStyleSupport;
exports["default"] = _default;
//# sourceMappingURL=styleChecker.js.map
/***/ }),
/***/ 1541:
/***/ (function(module, exports, __webpack_require__) {
// style-loader: Adds some css to the DOM by adding a <style> tag
// load the styles
var content = __webpack_require__(1542);
if(typeof content === 'string') content = [[module.i, content, '']];
// Prepare cssTransformation
var transform;
var options = {"hmr":false}
options.transform = transform
// add the styles to the DOM
var update = __webpack_require__(313)(content, options);
if(content.locals) module.exports = content.locals;
/***/ }),
/***/ 1542:
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(312)(true);
// imports
// module
exports.push([module.i, ".ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-nav-container{height:40px}.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-ink-bar{visibility:hidden}.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab{height:40px;margin:0;margin-right:2px;padding:0 16px;line-height:38px;background:#fafafa;border:1px solid #e8e8e8;border-radius:4px 4px 0 0;-webkit-transition:all .3s cubic-bezier(.645,.045,.355,1);-o-transition:all .3s cubic-bezier(.645,.045,.355,1);transition:all .3s cubic-bezier(.645,.045,.355,1)}.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab-active{height:40px;color:#1890ff;background:#fff;border-color:#e8e8e8;border-bottom:1px solid #fff}.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab-active:before{border-top:2px solid transparent}.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab-disabled{color:#1890ff;color:rgba(0,0,0,.25)}.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab-inactive{padding:0}.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-nav-wrap{margin-bottom:0}.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab .ant-tabs-close-x{width:16px;height:16px;height:14px;margin-right:-5px;margin-left:3px;overflow:hidden;color:rgba(0,0,0,.45);font-size:12px;vertical-align:middle;-webkit-transition:all .3s;-o-transition:all .3s;transition:all .3s}.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab .ant-tabs-close-x:hover{color:rgba(0,0,0,.85)}.ant-tabs.ant-tabs-card .ant-tabs-card-content>.ant-tabs-tabpane,.ant-tabs.ant-tabs-editable-card .ant-tabs-card-content>.ant-tabs-tabpane{-webkit-transition:none!important;-o-transition:none!important;transition:none!important}.ant-tabs.ant-tabs-card .ant-tabs-card-content>.ant-tabs-tabpane-inactive,.ant-tabs.ant-tabs-editable-card .ant-tabs-card-content>.ant-tabs-tabpane-inactive{overflow:hidden}.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab:hover .anticon-close{opacity:1}.ant-tabs-extra-content{line-height:45px}.ant-tabs-extra-content .ant-tabs-new-tab{position:relative;width:20px;height:20px;color:rgba(0,0,0,.65);font-size:12px;line-height:20px;text-align:center;border:1px solid #e8e8e8;border-radius:2px;cursor:pointer;-webkit-transition:all .3s;-o-transition:all .3s;transition:all .3s}.ant-tabs-extra-content .ant-tabs-new-tab:hover{color:#1890ff;border-color:#1890ff}.ant-tabs-extra-content .ant-tabs-new-tab svg{position:absolute;top:0;right:0;bottom:0;left:0;margin:auto}.ant-tabs.ant-tabs-large .ant-tabs-extra-content{line-height:56px}.ant-tabs.ant-tabs-small .ant-tabs-extra-content{line-height:37px}.ant-tabs.ant-tabs-card .ant-tabs-extra-content{line-height:40px}.ant-tabs-vertical.ant-tabs-card .ant-tabs-card-bar.ant-tabs-left-bar .ant-tabs-nav-container,.ant-tabs-vertical.ant-tabs-card .ant-tabs-card-bar.ant-tabs-right-bar .ant-tabs-nav-container{height:100%}.ant-tabs-vertical.ant-tabs-card .ant-tabs-card-bar.ant-tabs-left-bar .ant-tabs-tab,.ant-tabs-vertical.ant-tabs-card .ant-tabs-card-bar.ant-tabs-right-bar .ant-tabs-tab{margin-bottom:8px;border-bottom:1px solid #e8e8e8}.ant-tabs-vertical.ant-tabs-card .ant-tabs-card-bar.ant-tabs-left-bar .ant-tabs-tab-active,.ant-tabs-vertical.ant-tabs-card .ant-tabs-card-bar.ant-tabs-right-bar .ant-tabs-tab-active{padding-bottom:4px}.ant-tabs-vertical.ant-tabs-card .ant-tabs-card-bar.ant-tabs-left-bar .ant-tabs-tab:last-child,.ant-tabs-vertical.ant-tabs-card .ant-tabs-card-bar.ant-tabs-right-bar .ant-tabs-tab:last-child{margin-bottom:8px}.ant-tabs-vertical.ant-tabs-card .ant-tabs-card-bar.ant-tabs-left-bar .ant-tabs-new-tab,.ant-tabs-vertical.ant-tabs-card .ant-tabs-card-bar.ant-tabs-right-bar .ant-tabs-new-tab{width:90%}.ant-tabs-vertical.ant-tabs-card.ant-tabs-left .ant-tabs-card-bar.ant-tabs-left-bar .ant-tabs-nav-wrap{margin-right:0}.ant-tabs-vertical.ant-tabs-card.ant-tabs-left .ant-tabs-card-bar.ant-tabs-left-bar .ant-tabs-tab{margin-right:1px;border-right:0;border-radius:4px 0 0 4px}.ant-tabs-vertical.ant-tabs-card.ant-tabs-left .ant-tabs-card-bar.ant-tabs-left-bar .ant-tabs-tab-active{margin-right:-1px;padding-right:18px}.ant-tabs-vertica
// exports
/***/ }),
/***/ 1543:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Tabs__ = __webpack_require__(1544);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__TabPane__ = __webpack_require__(1445);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__TabContent__ = __webpack_require__(1547);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "TabPane", function() { return __WEBPACK_IMPORTED_MODULE_1__TabPane__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "TabContent", function() { return __WEBPACK_IMPORTED_MODULE_2__TabContent__["a"]; });
/* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__Tabs__["a" /* default */]);
/***/ }),
/***/ 1544:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(18);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty__ = __webpack_require__(59);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(75);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_objectWithoutProperties__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck__ = __webpack_require__(9);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_createClass__ = __webpack_require__(31);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_createClass__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(10);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_possibleConstructorReturn__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_babel_runtime_helpers_inherits__ = __webpack_require__(11);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_babel_runtime_helpers_inherits__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_prop_types__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_prop_types__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_classnames__ = __webpack_require__(3);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_classnames__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_raf__ = __webpack_require__(1545);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_raf___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_raf__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_react_lifecycles_compat__ = __webpack_require__(7);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__KeyCode__ = __webpack_require__(1546);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__TabPane__ = __webpack_require__(1445);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__utils__ = __webpack_require__(1408);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__Sentinel__ = __webpack_require__(1446);
function noop() {}
function getDefaultActiveKey(props) {
var activeKey = void 0;
__WEBPACK_IMPORTED_MODULE_7_react___default.a.Children.forEach(props.children, function (child) {
if (child && !activeKey && !child.props.disabled) {
activeKey = child.key;
}
});
return activeKey;
}
function activeKeyIsValid(props, key) {
var keys = __WEBPACK_IMPORTED_MODULE_7_react___default.a.Children.map(props.children, function (child) {
return child && child.key;
});
return keys.indexOf(key) >= 0;
}
var Tabs = function (_React$Component) {
__WEBPACK_IMPORTED_MODULE_6_babel_runtime_helpers_inherits___default()(Tabs, _React$Component);
function Tabs(props) {
__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck___default()(this, Tabs);
var _this = __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_possibleConstructorReturn___default()(this, (Tabs.__proto__ || Object.getPrototypeOf(Tabs)).call(this, props));
_initialiseProps.call(_this);
var activeKey = void 0;
if ('activeKey' in props) {
activeKey = props.activeKey;
} else if ('defaultActiveKey' in props) {
activeKey = props.defaultActiveKey;
} else {
activeKey = getDefaultActiveKey(props);
}
_this.state = {
activeKey: activeKey
};
return _this;
}
__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_createClass___default()(Tabs, [{
key: 'componentWillUnmount',
value: function componentWillUnmount() {
this.destroy = true;
__WEBPACK_IMPORTED_MODULE_10_raf___default.a.cancel(this.sentinelId);
}
// Sentinel for tab index
}, {
key: 'updateSentinelContext',
value: function updateSentinelContext() {
var _this2 = this;
if (this.destroy) return;
__WEBPACK_IMPORTED_MODULE_10_raf___default.a.cancel(this.sentinelId);
this.sentinelId = __WEBPACK_IMPORTED_MODULE_10_raf___default()(function () {
if (_this2.destroy) return;
_this2.forceUpdate();
});
}
}, {
key: 'render',
value: function render() {
var _classnames;
var props = this.props;
var prefixCls = props.prefixCls,
navWrapper = props.navWrapper,
tabBarPosition = props.tabBarPosition,
className = props.className,
renderTabContent = props.renderTabContent,
renderTabBar = props.renderTabBar,
destroyInactiveTabPane = props.destroyInactiveTabPane,
direction = props.direction,
restProps = __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_objectWithoutProperties___default()(props, ['prefixCls', 'navWrapper', 'tabBarPosition', 'className', 'renderTabContent', 'renderTabBar', 'destroyInactiveTabPane', 'direction']);
var cls = __WEBPACK_IMPORTED_MODULE_9_classnames___default()((_classnames = {}, __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()(_classnames, prefixCls, 1), __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()(_classnames, prefixCls + '-' + tabBarPosition, 1), __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()(_classnames, className, !!className), __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()(_classnames, prefixCls + '-rtl', direction === 'rtl'), _classnames));
this.tabBar = renderTabBar();
var tabBar = __WEBPACK_IMPORTED_MODULE_7_react___default.a.cloneElement(this.tabBar, {
prefixCls: prefixCls,
navWrapper: navWrapper,
key: 'tabBar',
onKeyDown: this.onNavKeyDown,
tabBarPosition: tabBarPosition,
onTabClick: this.onTabClick,
panels: props.children,
activeKey: this.state.activeKey,
direction: this.props.direction
});
var tabContent = __WEBPACK_IMPORTED_MODULE_7_react___default.a.cloneElement(renderTabContent(), {
prefixCls: prefixCls,
tabBarPosition: tabBarPosition,
activeKey: this.state.activeKey,
destroyInactiveTabPane: destroyInactiveTabPane,
children: props.children,
onChange: this.setActiveKey,
key: 'tabContent',
direction: this.props.direction
});
var sentinelStart = __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_15__Sentinel__["c" /* default */], {
key: 'sentinelStart',
setRef: this.setSentinelStart,
nextElement: this.panelSentinelStart
});
var sentinelEnd = __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_15__Sentinel__["c" /* default */], {
key: 'sentinelEnd',
setRef: this.setSentinelEnd,
prevElement: this.panelSentinelEnd
});
var contents = [];
if (tabBarPosition === 'bottom') {
contents.push(sentinelStart, tabContent, sentinelEnd, tabBar);
} else {
contents.push(tabBar, sentinelStart, tabContent, sentinelEnd);
}
return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(
__WEBPACK_IMPORTED_MODULE_15__Sentinel__["b" /* SentinelProvider */],
{
value: {
sentinelStart: this.sentinelStart,
sentinelEnd: this.sentinelEnd,
setPanelSentinelStart: this.setPanelSentinelStart,
setPanelSentinelEnd: this.setPanelSentinelEnd
}
},
__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(
'div',
__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({
className: cls,
style: props.style
}, Object(__WEBPACK_IMPORTED_MODULE_14__utils__["b" /* getDataAttr */])(restProps), {
onScroll: this.onScroll
}),
contents
)
);
}
}], [{
key: 'getDerivedStateFromProps',
value: function getDerivedStateFromProps(props, state) {
var newState = {};
if ('activeKey' in props) {
newState.activeKey = props.activeKey;
} else if (!activeKeyIsValid(props, state.activeKey)) {
newState.activeKey = getDefaultActiveKey(props);
}
if (Object.keys(newState).length > 0) {
return newState;
}
return null;
}
}]);
return Tabs;
}(__WEBPACK_IMPORTED_MODULE_7_react___default.a.Component);
var _initialiseProps = function _initialiseProps() {
var _this3 = this;
this.onTabClick = function (activeKey, e) {
if (_this3.tabBar.props.onTabClick) {
_this3.tabBar.props.onTabClick(activeKey, e);
}
_this3.setActiveKey(activeKey);
};
this.onNavKeyDown = function (e) {
var eventKeyCode = e.keyCode;
if (eventKeyCode === __WEBPACK_IMPORTED_MODULE_12__KeyCode__["a" /* default */].RIGHT || eventKeyCode === __WEBPACK_IMPORTED_MODULE_12__KeyCode__["a" /* default */].DOWN) {
e.preventDefault();
var nextKey = _this3.getNextActiveKey(true);
_this3.onTabClick(nextKey);
} else if (eventKeyCode === __WEBPACK_IMPORTED_MODULE_12__KeyCode__["a" /* default */].LEFT || eventKeyCode === __WEBPACK_IMPORTED_MODULE_12__KeyCode__["a" /* default */].UP) {
e.preventDefault();
var previousKey = _this3.getNextActiveKey(false);
_this3.onTabClick(previousKey);
}
};
this.onScroll = function (_ref) {
var target = _ref.target,
currentTarget = _ref.currentTarget;
if (target === currentTarget && target.scrollLeft > 0) {
target.scrollLeft = 0;
}
};
this.setSentinelStart = function (node) {
_this3.sentinelStart = node;
};
this.setSentinelEnd = function (node) {
_this3.sentinelEnd = node;
};
this.setPanelSentinelStart = function (node) {
if (node !== _this3.panelSentinelStart) {
_this3.updateSentinelContext();
}
_this3.panelSentinelStart = node;
};
this.setPanelSentinelEnd = function (node) {
if (node !== _this3.panelSentinelEnd) {
_this3.updateSentinelContext();
}
_this3.panelSentinelEnd = node;
};
this.setActiveKey = function (activeKey) {
if (_this3.state.activeKey !== activeKey) {
if (!('activeKey' in _this3.props)) {
_this3.setState({
activeKey: activeKey
});
}
_this3.props.onChange(activeKey);
}
};
this.getNextActiveKey = function (next) {
var activeKey = _this3.state.activeKey;
var children = [];
__WEBPACK_IMPORTED_MODULE_7_react___default.a.Children.forEach(_this3.props.children, function (c) {
if (c && !c.props.disabled) {
if (next) {
children.push(c);
} else {
children.unshift(c);
}
}
});
var length = children.length;
var ret = length && children[0].key;
children.forEach(function (child, i) {
if (child.key === activeKey) {
if (i === length - 1) {
ret = children[0].key;
} else {
ret = children[i + 1].key;
}
}
});
return ret;
};
};
Tabs.propTypes = {
destroyInactiveTabPane: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool,
renderTabBar: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func.isRequired,
renderTabContent: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func.isRequired,
navWrapper: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func,
onChange: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func,
children: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.node,
prefixCls: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string,
className: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string,
tabBarPosition: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string,
style: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.object,
activeKey: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string,
defaultActiveKey: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string,
direction: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string
};
Tabs.defaultProps = {
prefixCls: 'rc-tabs',
destroyInactiveTabPane: false,
onChange: noop,
navWrapper: function navWrapper(arg) {
return arg;
},
tabBarPosition: 'top',
children: null,
style: {},
direction: 'ltr'
};
Tabs.TabPane = __WEBPACK_IMPORTED_MODULE_13__TabPane__["a" /* default */];
Object(__WEBPACK_IMPORTED_MODULE_11_react_lifecycles_compat__["polyfill"])(Tabs);
/* harmony default export */ __webpack_exports__["a"] = (Tabs);
/***/ }),
/***/ 1545:
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {var now = __webpack_require__(336)
, root = typeof window === 'undefined' ? global : window
, vendors = ['moz', 'webkit']
, suffix = 'AnimationFrame'
, raf = root['request' + suffix]
, caf = root['cancel' + suffix] || root['cancelRequest' + suffix]
for(var i = 0; !raf && i < vendors.length; i++) {
raf = root[vendors[i] + 'Request' + suffix]
caf = root[vendors[i] + 'Cancel' + suffix]
|| root[vendors[i] + 'CancelRequest' + suffix]
}
// Some versions of FF have rAF but not cAF
if(!raf || !caf) {
var last = 0
, id = 0
, queue = []
, frameDuration = 1000 / 60
raf = function(callback) {
if(queue.length === 0) {
var _now = now()
, next = Math.max(0, frameDuration - (_now - last))
last = next + _now
setTimeout(function() {
var cp = queue.slice(0)
// Clear queue here to prevent
// callbacks from appending listeners
// to the current frame's queue
queue.length = 0
for(var i = 0; i < cp.length; i++) {
if(!cp[i].cancelled) {
try{
cp[i].callback(last)
} catch(e) {
setTimeout(function() { throw e }, 0)
}
}
}
}, Math.round(next))
}
queue.push({
handle: ++id,
callback: callback,
cancelled: false
})
return id
}
caf = function(handle) {
for(var i = 0; i < queue.length; i++) {
if(queue[i].handle === handle) {
queue[i].cancelled = true
}
}
}
}
module.exports = function(fn) {
// Wrap in a new function to prevent
// `cancel` potentially being assigned
// to the native rAF function
return raf.call(root, fn)
}
module.exports.cancel = function() {
caf.apply(root, arguments)
}
module.exports.polyfill = function(object) {
if (!object) {
object = root;
}
object.requestAnimationFrame = raf
object.cancelAnimationFrame = caf
}
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(34)))
/***/ }),
/***/ 1546:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony default export */ __webpack_exports__["a"] = ({
/**
* LEFT
*/
LEFT: 37, // also NUM_WEST
/**
* UP
*/
UP: 38, // also NUM_NORTH
/**
* RIGHT
*/
RIGHT: 39, // also NUM_EAST
/**
* DOWN
*/
DOWN: 40 // also NUM_SOUTH
});
/***/ }),
/***/ 1547:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(18);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty__ = __webpack_require__(59);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(9);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass__ = __webpack_require__(31);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(10);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__ = __webpack_require__(11);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_classnames__ = __webpack_require__(3);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_classnames__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils__ = __webpack_require__(1408);
var TabContent = function (_React$Component) {
__WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default()(TabContent, _React$Component);
function TabContent() {
__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, TabContent);
return __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default()(this, (TabContent.__proto__ || Object.getPrototypeOf(TabContent)).apply(this, arguments));
}
__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass___default()(TabContent, [{
key: 'getTabPanes',
value: function getTabPanes() {
var props = this.props;
var activeKey = props.activeKey;
var children = props.children;
var newChildren = [];
__WEBPACK_IMPORTED_MODULE_6_react___default.a.Children.forEach(children, function (child) {
if (!child) {
return;
}
var key = child.key;
var active = activeKey === key;
newChildren.push(__WEBPACK_IMPORTED_MODULE_6_react___default.a.cloneElement(child, {
active: active,
destroyInactiveTabPane: props.destroyInactiveTabPane,
rootPrefixCls: props.prefixCls
}));
});
return newChildren;
}
}, {
key: 'render',
value: function render() {
var _classnames;
var props = this.props;
var prefixCls = props.prefixCls,
children = props.children,
activeKey = props.activeKey,
className = props.className,
tabBarPosition = props.tabBarPosition,
animated = props.animated,
animatedWithMargin = props.animatedWithMargin,
direction = props.direction;
var style = props.style;
var classes = __WEBPACK_IMPORTED_MODULE_8_classnames___default()((_classnames = {}, __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()(_classnames, prefixCls + '-content', true), __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()(_classnames, animated ? prefixCls + '-content-animated' : prefixCls + '-content-no-animated', true), _classnames), className);
if (animated) {
var activeIndex = Object(__WEBPACK_IMPORTED_MODULE_9__utils__["a" /* getActiveIndex */])(children, activeKey);
if (activeIndex !== -1) {
var animatedStyle = animatedWithMargin ? Object(__WEBPACK_IMPORTED_MODULE_9__utils__["c" /* getMarginStyle */])(activeIndex, tabBarPosition) : Object(__WEBPACK_IMPORTED_MODULE_9__utils__["e" /* getTransformPropValue */])(Object(__WEBPACK_IMPORTED_MODULE_9__utils__["d" /* getTransformByIndex */])(activeIndex, tabBarPosition, direction));
style = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, style, animatedStyle);
} else {
style = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, style, {
display: 'none'
});
}
}
return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(
'div',
{
className: classes,
style: style
},
this.getTabPanes()
);
}
}]);
return TabContent;
}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);
/* harmony default export */ __webpack_exports__["a"] = (TabContent);
TabContent.propTypes = {
animated: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,
animatedWithMargin: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,
prefixCls: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,
children: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.node,
activeKey: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,
style: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.any,
tabBarPosition: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,
className: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,
destroyInactiveTabPane: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,
direction: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string
};
TabContent.defaultProps = {
animated: true
};
/***/ }),
/***/ 1548:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends2 = __webpack_require__(18);
var _extends3 = _interopRequireDefault(_extends2);
var _defineProperty2 = __webpack_require__(59);
var _defineProperty3 = _interopRequireDefault(_defineProperty2);
var _classCallCheck2 = __webpack_require__(9);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(31);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(10);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(11);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _propTypes = __webpack_require__(1);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _classnames2 = __webpack_require__(3);
var _classnames3 = _interopRequireDefault(_classnames2);
var _utils = __webpack_require__(1138);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var TabContent = function (_React$Component) {
(0, _inherits3['default'])(TabContent, _React$Component);
function TabContent() {
(0, _classCallCheck3['default'])(this, TabContent);
return (0, _possibleConstructorReturn3['default'])(this, (TabContent.__proto__ || Object.getPrototypeOf(TabContent)).apply(this, arguments));
}
(0, _createClass3['default'])(TabContent, [{
key: 'getTabPanes',
value: function getTabPanes() {
var props = this.props;
var activeKey = props.activeKey;
var children = props.children;
var newChildren = [];
_react2['default'].Children.forEach(children, function (child) {
if (!child) {
return;
}
var key = child.key;
var active = activeKey === key;
newChildren.push(_react2['default'].cloneElement(child, {
active: active,
destroyInactiveTabPane: props.destroyInactiveTabPane,
rootPrefixCls: props.prefixCls
}));
});
return newChildren;
}
}, {
key: 'render',
value: function render() {
var _classnames;
var props = this.props;
var prefixCls = props.prefixCls,
children = props.children,
activeKey = props.activeKey,
className = props.className,
tabBarPosition = props.tabBarPosition,
animated = props.animated,
animatedWithMargin = props.animatedWithMargin,
direction = props.direction;
var style = props.style;
var classes = (0, _classnames3['default'])((_classnames = {}, (0, _defineProperty3['default'])(_classnames, prefixCls + '-content', true), (0, _defineProperty3['default'])(_classnames, animated ? prefixCls + '-content-animated' : prefixCls + '-content-no-animated', true), _classnames), className);
if (animated) {
var activeIndex = (0, _utils.getActiveIndex)(children, activeKey);
if (activeIndex !== -1) {
var animatedStyle = animatedWithMargin ? (0, _utils.getMarginStyle)(activeIndex, tabBarPosition) : (0, _utils.getTransformPropValue)((0, _utils.getTransformByIndex)(activeIndex, tabBarPosition, direction));
style = (0, _extends3['default'])({}, style, animatedStyle);
} else {
style = (0, _extends3['default'])({}, style, {
display: 'none'
});
}
}
return _react2['default'].createElement(
'div',
{
className: classes,
style: style
},
this.getTabPanes()
);
}
}]);
return TabContent;
}(_react2['default'].Component);
exports['default'] = TabContent;
TabContent.propTypes = {
animated: _propTypes2['default'].bool,
animatedWithMargin: _propTypes2['default'].bool,
prefixCls: _propTypes2['default'].string,
children: _propTypes2['default'].node,
activeKey: _propTypes2['default'].string,
style: _propTypes2['default'].any,
tabBarPosition: _propTypes2['default'].string,
className: _propTypes2['default'].string,
destroyInactiveTabPane: _propTypes2['default'].bool,
direction: _propTypes2['default'].string
};
TabContent.defaultProps = {
animated: true
};
module.exports = exports['default'];
/***/ }),
/***/ 1549:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(__webpack_require__(0));
var _ScrollableInkTabBar = _interopRequireDefault(__webpack_require__(1550));
var _classnames = _interopRequireDefault(__webpack_require__(3));
var _icon = _interopRequireDefault(__webpack_require__(26));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _extends() { _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; }; return _extends.apply(this, arguments); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var TabBar =
/*#__PURE__*/
function (_React$Component) {
_inherits(TabBar, _React$Component);
function TabBar() {
_classCallCheck(this, TabBar);
return _possibleConstructorReturn(this, _getPrototypeOf(TabBar).apply(this, arguments));
}
_createClass(TabBar, [{
key: "render",
value: function render() {
var _classNames;
var _this$props = this.props,
tabBarStyle = _this$props.tabBarStyle,
animated = _this$props.animated,
renderTabBar = _this$props.renderTabBar,
tabBarExtraContent = _this$props.tabBarExtraContent,
tabPosition = _this$props.tabPosition,
prefixCls = _this$props.prefixCls,
className = _this$props.className,
size = _this$props.size,
type = _this$props.type;
var inkBarAnimated = _typeof(animated) === 'object' ? animated.inkBar : animated;
var isVertical = tabPosition === 'left' || tabPosition === 'right';
var prevIconType = isVertical ? 'up' : 'left';
var nextIconType = isVertical ? 'down' : 'right';
var prevIcon = React.createElement("span", {
className: "".concat(prefixCls, "-tab-prev-icon")
}, React.createElement(_icon["default"], {
type: prevIconType,
className: "".concat(prefixCls, "-tab-prev-icon-target")
}));
var nextIcon = React.createElement("span", {
className: "".concat(prefixCls, "-tab-next-icon")
}, React.createElement(_icon["default"], {
type: nextIconType,
className: "".concat(prefixCls, "-tab-next-icon-target")
})); // Additional className for style usage
var cls = (0, _classnames["default"])("".concat(prefixCls, "-").concat(tabPosition, "-bar"), (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-").concat(size, "-bar"), !!size), _defineProperty(_classNames, "".concat(prefixCls, "-card-bar"), type && type.indexOf('card') >= 0), _classNames), className);
var renderProps = _extends(_extends({}, this.props), {
children: null,
inkBarAnimated: inkBarAnimated,
extraContent: tabBarExtraContent,
style: tabBarStyle,
prevIcon: prevIcon,
nextIcon: nextIcon,
className: cls
});
var RenderTabBar;
if (renderTabBar) {
RenderTabBar = renderTabBar(renderProps, _ScrollableInkTabBar["default"]);
} else {
RenderTabBar = React.createElement(_ScrollableInkTabBar["default"], renderProps);
}
return React.cloneElement(RenderTabBar);
}
}]);
return TabBar;
}(React.Component);
exports["default"] = TabBar;
TabBar.defaultProps = {
animated: true,
type: 'line'
};
//# sourceMappingURL=TabBar.js.map
/***/ }),
/***/ 1550:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends2 = __webpack_require__(18);
var _extends3 = _interopRequireDefault(_extends2);
var _objectWithoutProperties2 = __webpack_require__(75);
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
var _classCallCheck2 = __webpack_require__(9);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(31);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(10);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(11);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _propTypes = __webpack_require__(1);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _InkTabBarNode = __webpack_require__(1551);
var _InkTabBarNode2 = _interopRequireDefault(_InkTabBarNode);
var _TabBarTabsNode = __webpack_require__(1552);
var _TabBarTabsNode2 = _interopRequireDefault(_TabBarTabsNode);
var _TabBarRootNode = __webpack_require__(1554);
var _TabBarRootNode2 = _interopRequireDefault(_TabBarRootNode);
var _ScrollableTabBarNode = __webpack_require__(1555);
var _ScrollableTabBarNode2 = _interopRequireDefault(_ScrollableTabBarNode);
var _SaveRef = __webpack_require__(1556);
var _SaveRef2 = _interopRequireDefault(_SaveRef);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var ScrollableInkTabBar = function (_React$Component) {
(0, _inherits3['default'])(ScrollableInkTabBar, _React$Component);
function ScrollableInkTabBar() {
(0, _classCallCheck3['default'])(this, ScrollableInkTabBar);
return (0, _possibleConstructorReturn3['default'])(this, (ScrollableInkTabBar.__proto__ || Object.getPrototypeOf(ScrollableInkTabBar)).apply(this, arguments));
}
(0, _createClass3['default'])(ScrollableInkTabBar, [{
key: 'render',
value: function render() {
var _props = this.props,
renderTabBarNode = _props.children,
restProps = (0, _objectWithoutProperties3['default'])(_props, ['children']);
return _react2['default'].createElement(
_SaveRef2['default'],
null,
function (saveRef, getRef) {
return _react2['default'].createElement(
_TabBarRootNode2['default'],
(0, _extends3['default'])({ saveRef: saveRef }, restProps),
_react2['default'].createElement(
_ScrollableTabBarNode2['default'],
(0, _extends3['default'])({ saveRef: saveRef, getRef: getRef }, restProps),
_react2['default'].createElement(_TabBarTabsNode2['default'], (0, _extends3['default'])({ saveRef: saveRef, renderTabBarNode: renderTabBarNode }, restProps)),
_react2['default'].createElement(_InkTabBarNode2['default'], (0, _extends3['default'])({ saveRef: saveRef, getRef: getRef }, restProps))
)
);
}
);
}
}]);
return ScrollableInkTabBar;
}(_react2['default'].Component); /* eslint-disable react/prefer-stateless-function */
exports['default'] = ScrollableInkTabBar;
ScrollableInkTabBar.propTypes = {
children: _propTypes2['default'].func
};
module.exports = exports['default'];
/***/ }),
/***/ 1551:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _defineProperty2 = __webpack_require__(59);
var _defineProperty3 = _interopRequireDefault(_defineProperty2);
var _classCallCheck2 = __webpack_require__(9);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(31);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(10);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(11);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _propTypes = __webpack_require__(1);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _classnames2 = __webpack_require__(3);
var _classnames3 = _interopRequireDefault(_classnames2);
var _utils = __webpack_require__(1138);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _componentDidUpdate(component, init) {
var _component$props = component.props,
styles = _component$props.styles,
panels = _component$props.panels,
activeKey = _component$props.activeKey,
direction = _component$props.direction;
var rootNode = component.props.getRef('root');
var wrapNode = component.props.getRef('nav') || rootNode;
var inkBarNode = component.props.getRef('inkBar');
var activeTab = component.props.getRef('activeTab');
var inkBarNodeStyle = inkBarNode.style;
var tabBarPosition = component.props.tabBarPosition;
var activeIndex = (0, _utils.getActiveIndex)(panels, activeKey);
if (init) {
// prevent mount animation
inkBarNodeStyle.display = 'none';
}
if (activeTab) {
var tabNode = activeTab;
var transformSupported = (0, _utils.isTransform3dSupported)(inkBarNodeStyle);
// Reset current style
(0, _utils.setTransform)(inkBarNodeStyle, '');
inkBarNodeStyle.width = '';
inkBarNodeStyle.height = '';
inkBarNodeStyle.left = '';
inkBarNodeStyle.top = '';
inkBarNodeStyle.bottom = '';
inkBarNodeStyle.right = '';
if (tabBarPosition === 'top' || tabBarPosition === 'bottom') {
var left = (0, _utils.getLeft)(tabNode, wrapNode);
var width = tabNode.offsetWidth;
// If tabNode'width width equal to wrapNode'width when tabBarPosition is top or bottom
// It means no css working, then ink bar should not have width until css is loaded
// Fix https://github.com/ant-design/ant-design/issues/7564
if (width === rootNode.offsetWidth) {
width = 0;
} else if (styles.inkBar && styles.inkBar.width !== undefined) {
width = parseFloat(styles.inkBar.width, 10);
if (width) {
left += (tabNode.offsetWidth - width) / 2;
}
}
if (direction === 'rtl') {
left = (0, _utils.getStyle)(tabNode, 'margin-left') - left;
}
// use 3d gpu to optimize render
if (transformSupported) {
(0, _utils.setTransform)(inkBarNodeStyle, 'translate3d(' + left + 'px,0,0)');
} else {
inkBarNodeStyle.left = left + 'px';
}
inkBarNodeStyle.width = width + 'px';
} else {
var top = (0, _utils.getTop)(tabNode, wrapNode, true);
var height = tabNode.offsetHeight;
if (styles.inkBar && styles.inkBar.height !== undefined) {
height = parseFloat(styles.inkBar.height, 10);
if (height) {
top += (tabNode.offsetHeight - height) / 2;
}
}
if (transformSupported) {
(0, _utils.setTransform)(inkBarNodeStyle, 'translate3d(0,' + top + 'px,0)');
inkBarNodeStyle.top = '0';
} else {
inkBarNodeStyle.top = top + 'px';
}
inkBarNodeStyle.height = height + 'px';
}
}
inkBarNodeStyle.display = activeIndex !== -1 ? 'block' : 'none';
}
var InkTabBarNode = function (_React$Component) {
(0, _inherits3['default'])(InkTabBarNode, _React$Component);
function InkTabBarNode() {
(0, _classCallCheck3['default'])(this, InkTabBarNode);
return (0, _possibleConstructorReturn3['default'])(this, (InkTabBarNode.__proto__ || Object.getPrototypeOf(InkTabBarNode)).apply(this, arguments));
}
(0, _createClass3['default'])(InkTabBarNode, [{
key: 'componentDidMount',
value: function componentDidMount() {
var _this2 = this;
// ref https://github.com/ant-design/ant-design/issues/8678
// ref https://github.com/react-component/tabs/issues/135
// InkTabBarNode need parent/root ref for calculating position
// since parent componentDidMount triggered after child componentDidMount
// we're doing a quick fix here to use setTimeout to calculate position
// after parent/root component mounted
this.timeout = setTimeout(function () {
_componentDidUpdate(_this2, true);
}, 0);
}
}, {
key: 'componentDidUpdate',
value: function componentDidUpdate() {
_componentDidUpdate(this);
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
clearTimeout(this.timeout);
}
}, {
key: 'render',
value: function render() {
var _classnames;
var _props = this.props,
prefixCls = _props.prefixCls,
styles = _props.styles,
inkBarAnimated = _props.inkBarAnimated;
var className = prefixCls + '-ink-bar';
var classes = (0, _classnames3['default'])((_classnames = {}, (0, _defineProperty3['default'])(_classnames, className, true), (0, _defineProperty3['default'])(_classnames, inkBarAnimated ? className + '-animated' : className + '-no-animated', true), _classnames));
return _react2['default'].createElement('div', {
style: styles.inkBar,
className: classes,
key: 'inkBar',
ref: this.props.saveRef('inkBar')
});
}
}]);
return InkTabBarNode;
}(_react2['default'].Component);
exports['default'] = InkTabBarNode;
InkTabBarNode.propTypes = {
prefixCls: _propTypes2['default'].string,
styles: _propTypes2['default'].object,
inkBarAnimated: _propTypes2['default'].bool,
saveRef: _propTypes2['default'].func,
direction: _propTypes2['default'].string
};
InkTabBarNode.defaultProps = {
prefixCls: '',
inkBarAnimated: true,
styles: {},
saveRef: function saveRef() {}
};
module.exports = exports['default'];
/***/ }),
/***/ 1552:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends2 = __webpack_require__(18);
var _extends3 = _interopRequireDefault(_extends2);
var _defineProperty2 = __webpack_require__(59);
var _defineProperty3 = _interopRequireDefault(_defineProperty2);
var _classCallCheck2 = __webpack_require__(9);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(31);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(10);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(11);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _warning = __webpack_require__(1553);
var _warning2 = _interopRequireDefault(_warning);
var _propTypes = __webpack_require__(1);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _utils = __webpack_require__(1138);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var TabBarTabsNode = function (_React$Component) {
(0, _inherits3['default'])(TabBarTabsNode, _React$Component);
function TabBarTabsNode() {
(0, _classCallCheck3['default'])(this, TabBarTabsNode);
return (0, _possibleConstructorReturn3['default'])(this, (TabBarTabsNode.__proto__ || Object.getPrototypeOf(TabBarTabsNode)).apply(this, arguments));
}
(0, _createClass3['default'])(TabBarTabsNode, [{
key: 'render',
value: function render() {
var _this2 = this;
var _props = this.props,
children = _props.panels,
activeKey = _props.activeKey,
prefixCls = _props.prefixCls,
tabBarGutter = _props.tabBarGutter,
saveRef = _props.saveRef,
tabBarPosition = _props.tabBarPosition,
renderTabBarNode = _props.renderTabBarNode,
direction = _props.direction;
var rst = [];
_react2['default'].Children.forEach(children, function (child, index) {
if (!child) {
return;
}
var key = child.key;
var cls = activeKey === key ? prefixCls + '-tab-active' : '';
cls += ' ' + prefixCls + '-tab';
var events = {};
if (child.props.disabled) {
cls += ' ' + prefixCls + '-tab-disabled';
} else {
events = {
onClick: _this2.props.onTabClick.bind(_this2, key)
};
}
var ref = {};
if (activeKey === key) {
ref.ref = saveRef('activeTab');
}
var gutter = tabBarGutter && index === children.length - 1 ? 0 : tabBarGutter;
var marginProperty = direction === 'rtl' ? 'marginLeft' : 'marginRight';
var style = (0, _defineProperty3['default'])({}, (0, _utils.isVertical)(tabBarPosition) ? 'marginBottom' : marginProperty, gutter);
(0, _warning2['default'])('tab' in child.props, 'There must be `tab` property on children of Tabs.');
var node = _react2['default'].createElement(
'div',
(0, _extends3['default'])({
role: 'tab',
'aria-disabled': child.props.disabled ? 'true' : 'false',
'aria-selected': activeKey === key ? 'true' : 'false'
}, events, {
className: cls,
key: key,
style: style
}, ref),
child.props.tab
);
if (renderTabBarNode) {
node = renderTabBarNode(node);
}
rst.push(node);
});
return _react2['default'].createElement(
'div',
{ ref: saveRef('navTabsContainer') },
rst
);
}
}]);
return TabBarTabsNode;
}(_react2['default'].Component);
exports['default'] = TabBarTabsNode;
TabBarTabsNode.propTypes = {
activeKey: _propTypes2['default'].string,
panels: _propTypes2['default'].node,
prefixCls: _propTypes2['default'].string,
tabBarGutter: _propTypes2['default'].number,
onTabClick: _propTypes2['default'].func,
saveRef: _propTypes2['default'].func,
renderTabBarNode: _propTypes2['default'].func,
tabBarPosition: _propTypes2['default'].string,
direction: _propTypes2['default'].string
};
TabBarTabsNode.defaultProps = {
panels: [],
prefixCls: [],
tabBarGutter: null,
onTabClick: function onTabClick() {},
saveRef: function saveRef() {}
};
module.exports = exports['default'];
/***/ }),
/***/ 1553:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
* Copyright (c) 2014-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* Similar to invariant but only logs a warning if the condition is not met.
* This can be used to log issues in development environments in critical
* paths. Removing the logging code for production environments will keep the
* same logic and follow the same code paths.
*/
var __DEV__ = "production" !== 'production';
var warning = function() {};
if (__DEV__) {
var printWarning = function printWarning(format, args) {
var len = arguments.length;
args = new Array(len > 1 ? len - 1 : 0);
for (var key = 1; key < len; key++) {
args[key - 1] = arguments[key];
}
var argIndex = 0;
var message = 'Warning: ' +
format.replace(/%s/g, function() {
return args[argIndex++];
});
if (typeof console !== 'undefined') {
console.error(message);
}
try {
// --- Welcome to debugging React ---
// This error was thrown as a convenience so that you can use this stack
// to find the callsite that caused this warning to fire.
throw new Error(message);
} catch (x) {}
}
warning = function(condition, format, args) {
var len = arguments.length;
args = new Array(len > 2 ? len - 2 : 0);
for (var key = 2; key < len; key++) {
args[key - 2] = arguments[key];
}
if (format === undefined) {
throw new Error(
'`warning(condition, format, ...args)` requires a warning ' +
'message argument'
);
}
if (!condition) {
printWarning.apply(null, [format].concat(args));
}
};
}
module.exports = warning;
/***/ }),
/***/ 1554:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends2 = __webpack_require__(18);
var _extends3 = _interopRequireDefault(_extends2);
var _defineProperty2 = __webpack_require__(59);
var _defineProperty3 = _interopRequireDefault(_defineProperty2);
var _objectWithoutProperties2 = __webpack_require__(75);
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
var _classCallCheck2 = __webpack_require__(9);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(31);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(10);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(11);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _propTypes = __webpack_require__(1);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _classnames2 = __webpack_require__(3);
var _classnames3 = _interopRequireDefault(_classnames2);
var _utils = __webpack_require__(1138);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var TabBarRootNode = function (_React$Component) {
(0, _inherits3['default'])(TabBarRootNode, _React$Component);
function TabBarRootNode() {
(0, _classCallCheck3['default'])(this, TabBarRootNode);
return (0, _possibleConstructorReturn3['default'])(this, (TabBarRootNode.__proto__ || Object.getPrototypeOf(TabBarRootNode)).apply(this, arguments));
}
(0, _createClass3['default'])(TabBarRootNode, [{
key: 'render',
value: function render() {
var _props = this.props,
prefixCls = _props.prefixCls,
onKeyDown = _props.onKeyDown,
className = _props.className,
extraContent = _props.extraContent,
style = _props.style,
tabBarPosition = _props.tabBarPosition,
children = _props.children,
restProps = (0, _objectWithoutProperties3['default'])(_props, ['prefixCls', 'onKeyDown', 'className', 'extraContent', 'style', 'tabBarPosition', 'children']);
var cls = (0, _classnames3['default'])(prefixCls + '-bar', (0, _defineProperty3['default'])({}, className, !!className));
var topOrBottom = tabBarPosition === 'top' || tabBarPosition === 'bottom';
var tabBarExtraContentStyle = topOrBottom ? { float: 'right' } : {};
var extraContentStyle = extraContent && extraContent.props ? extraContent.props.style : {};
var newChildren = children;
if (extraContent) {
newChildren = [(0, _react.cloneElement)(extraContent, {
key: 'extra',
style: (0, _extends3['default'])({}, tabBarExtraContentStyle, extraContentStyle)
}), (0, _react.cloneElement)(children, { key: 'content' })];
newChildren = topOrBottom ? newChildren : newChildren.reverse();
}
return _react2['default'].createElement(
'div',
(0, _extends3['default'])({
role: 'tablist',
className: cls,
tabIndex: '0',
ref: this.props.saveRef('root'),
onKeyDown: onKeyDown,
style: style
}, (0, _utils.getDataAttr)(restProps)),
newChildren
);
}
}]);
return TabBarRootNode;
}(_react2['default'].Component);
exports['default'] = TabBarRootNode;
TabBarRootNode.propTypes = {
prefixCls: _propTypes2['default'].string,
className: _propTypes2['default'].string,
style: _propTypes2['default'].object,
tabBarPosition: _propTypes2['default'].oneOf(['left', 'right', 'top', 'bottom']),
children: _propTypes2['default'].node,
extraContent: _propTypes2['default'].node,
onKeyDown: _propTypes2['default'].func,
saveRef: _propTypes2['default'].func
};
TabBarRootNode.defaultProps = {
prefixCls: '',
className: '',
style: {},
tabBarPosition: 'top',
extraContent: null,
children: null,
onKeyDown: function onKeyDown() {},
saveRef: function saveRef() {}
};
module.exports = exports['default'];
/***/ }),
/***/ 1555:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _defineProperty2 = __webpack_require__(59);
var _defineProperty3 = _interopRequireDefault(_defineProperty2);
var _classCallCheck2 = __webpack_require__(9);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(31);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(10);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(11);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _propTypes = __webpack_require__(1);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _classnames5 = __webpack_require__(3);
var _classnames6 = _interopRequireDefault(_classnames5);
var _debounce = __webpack_require__(187);
var _debounce2 = _interopRequireDefault(_debounce);
var _resizeObserverPolyfill = __webpack_require__(194);
var _resizeObserverPolyfill2 = _interopRequireDefault(_resizeObserverPolyfill);
var _utils = __webpack_require__(1138);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var ScrollableTabBarNode = function (_React$Component) {
(0, _inherits3['default'])(ScrollableTabBarNode, _React$Component);
function ScrollableTabBarNode(props) {
(0, _classCallCheck3['default'])(this, ScrollableTabBarNode);
var _this = (0, _possibleConstructorReturn3['default'])(this, (ScrollableTabBarNode.__proto__ || Object.getPrototypeOf(ScrollableTabBarNode)).call(this, props));
_this.prevTransitionEnd = function (e) {
if (e.propertyName !== 'opacity') {
return;
}
var container = _this.props.getRef('container');
_this.scrollToActiveTab({
target: container,
currentTarget: container
});
};
_this.scrollToActiveTab = function (e) {
var activeTab = _this.props.getRef('activeTab');
var navWrap = _this.props.getRef('navWrap');
if (e && e.target !== e.currentTarget || !activeTab) {
return;
}
// when not scrollable or enter scrollable first time, don't emit scrolling
var needToSroll = _this.isNextPrevShown() && _this.lastNextPrevShown;
_this.lastNextPrevShown = _this.isNextPrevShown();
if (!needToSroll) {
return;
}
var activeTabWH = _this.getScrollWH(activeTab);
var navWrapNodeWH = _this.getOffsetWH(navWrap);
var offset = _this.offset;
var wrapOffset = _this.getOffsetLT(navWrap);
var activeTabOffset = _this.getOffsetLT(activeTab);
if (wrapOffset > activeTabOffset) {
offset += wrapOffset - activeTabOffset;
_this.setOffset(offset);
} else if (wrapOffset + navWrapNodeWH < activeTabOffset + activeTabWH) {
offset -= activeTabOffset + activeTabWH - (wrapOffset + navWrapNodeWH);
_this.setOffset(offset);
}
};
_this.prev = function (e) {
_this.props.onPrevClick(e);
var navWrapNode = _this.props.getRef('navWrap');
var navWrapNodeWH = _this.getOffsetWH(navWrapNode);
var offset = _this.offset;
_this.setOffset(offset + navWrapNodeWH);
};
_this.next = function (e) {
_this.props.onNextClick(e);
var navWrapNode = _this.props.getRef('navWrap');
var navWrapNodeWH = _this.getOffsetWH(navWrapNode);
var offset = _this.offset;
_this.setOffset(offset - navWrapNodeWH);
};
_this.offset = 0;
_this.state = {
next: false,
prev: false
};
return _this;
}
(0, _createClass3['default'])(ScrollableTabBarNode, [{
key: 'componentDidMount',
value: function componentDidMount() {
var _this2 = this;
this.componentDidUpdate();
this.debouncedResize = (0, _debounce2['default'])(function () {
_this2.setNextPrev();
_this2.scrollToActiveTab();
}, 200);
this.resizeObserver = new _resizeObserverPolyfill2['default'](this.debouncedResize);
this.resizeObserver.observe(this.props.getRef('container'));
}
}, {
key: 'componentDidUpdate',
value: function componentDidUpdate(prevProps) {
var props = this.props;
if (prevProps && prevProps.tabBarPosition !== props.tabBarPosition) {
this.setOffset(0);
return;
}
var nextPrev = this.setNextPrev();
// wait next, prev show hide
/* eslint react/no-did-update-set-state:0 */
if (this.isNextPrevShown(this.state) !== this.isNextPrevShown(nextPrev)) {
this.setState({}, this.scrollToActiveTab);
} else if (!prevProps || props.activeKey !== prevProps.activeKey) {
// can not use props.activeKey
this.scrollToActiveTab();
}
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
if (this.resizeObserver) {
this.resizeObserver.disconnect();
}
if (this.debouncedResize && this.debouncedResize.cancel) {
this.debouncedResize.cancel();
}
}
}, {
key: 'setNextPrev',
value: function setNextPrev() {
var navNode = this.props.getRef('nav');
var navTabsContainer = this.props.getRef('navTabsContainer');
var navNodeWH = this.getScrollWH(navTabsContainer || navNode);
// Add 1px to fix `offsetWidth` with decimal in Chrome not correct handle
// https://github.com/ant-design/ant-design/issues/13423
var containerWH = this.getOffsetWH(this.props.getRef('container')) + 1;
var navWrapNodeWH = this.getOffsetWH(this.props.getRef('navWrap'));
var offset = this.offset;
var minOffset = containerWH - navNodeWH;
var _state = this.state,
next = _state.next,
prev = _state.prev;
if (minOffset >= 0) {
next = false;
this.setOffset(0, false);
offset = 0;
} else if (minOffset < offset) {
next = true;
} else {
next = false;
// Fix https://github.com/ant-design/ant-design/issues/8861
// Test with container offset which is stable
// and set the offset of the nav wrap node
var realOffset = navWrapNodeWH - navNodeWH;
this.setOffset(realOffset, false);
offset = realOffset;
}
if (offset < 0) {
prev = true;
} else {
prev = false;
}
this.setNext(next);
this.setPrev(prev);
return {
next: next,
prev: prev
};
}
}, {
key: 'getOffsetWH',
value: function getOffsetWH(node) {
var tabBarPosition = this.props.tabBarPosition;
var prop = 'offsetWidth';
if (tabBarPosition === 'left' || tabBarPosition === 'right') {
prop = 'offsetHeight';
}
return node[prop];
}
}, {
key: 'getScrollWH',
value: function getScrollWH(node) {
var tabBarPosition = this.props.tabBarPosition;
var prop = 'scrollWidth';
if (tabBarPosition === 'left' || tabBarPosition === 'right') {
prop = 'scrollHeight';
}
return node[prop];
}
}, {
key: 'getOffsetLT',
value: function getOffsetLT(node) {
var tabBarPosition = this.props.tabBarPosition;
var prop = 'left';
if (tabBarPosition === 'left' || tabBarPosition === 'right') {
prop = 'top';
}
return node.getBoundingClientRect()[prop];
}
}, {
key: 'setOffset',
value: function setOffset(offset) {
var checkNextPrev = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
var target = Math.min(0, offset);
if (this.offset !== target) {
this.offset = target;
var navOffset = {};
var tabBarPosition = this.props.tabBarPosition;
var navStyle = this.props.getRef('nav').style;
var transformSupported = (0, _utils.isTransform3dSupported)(navStyle);
if (tabBarPosition === 'left' || tabBarPosition === 'right') {
if (transformSupported) {
navOffset = {
value: 'translate3d(0,' + target + 'px,0)'
};
} else {
navOffset = {
name: 'top',
value: target + 'px'
};
}
} else if (transformSupported) {
if (this.props.direction === 'rtl') {
target = -target;
}
navOffset = {
value: 'translate3d(' + target + 'px,0,0)'
};
} else {
navOffset = {
name: 'left',
value: target + 'px'
};
}
if (transformSupported) {
(0, _utils.setTransform)(navStyle, navOffset.value);
} else {
navStyle[navOffset.name] = navOffset.value;
}
if (checkNextPrev) {
this.setNextPrev();
}
}
}
}, {
key: 'setPrev',
value: function setPrev(v) {
if (this.state.prev !== v) {
this.setState({
prev: v
});
}
}
}, {
key: 'setNext',
value: function setNext(v) {
if (this.state.next !== v) {
this.setState({
next: v
});
}
}
}, {
key: 'isNextPrevShown',
value: function isNextPrevShown(state) {
if (state) {
return state.next || state.prev;
}
return this.state.next || this.state.prev;
}
}, {
key: 'render',
value: function render() {
var _classnames, _classnames2, _classnames3, _classnames4;
var _state2 = this.state,
next = _state2.next,
prev = _state2.prev;
var _props = this.props,
prefixCls = _props.prefixCls,
scrollAnimated = _props.scrollAnimated,
navWrapper = _props.navWrapper,
prevIcon = _props.prevIcon,
nextIcon = _props.nextIcon;
var showNextPrev = prev || next;
var prevButton = _react2['default'].createElement(
'span',
{
onClick: prev ? this.prev : null,
unselectable: 'unselectable',
className: (0, _classnames6['default'])((_classnames = {}, (0, _defineProperty3['default'])(_classnames, prefixCls + '-tab-prev', 1), (0, _defineProperty3['default'])(_classnames, prefixCls + '-tab-btn-disabled', !prev), (0, _defineProperty3['default'])(_classnames, prefixCls + '-tab-arrow-show', showNextPrev), _classnames)),
onTransitionEnd: this.prevTransitionEnd
},
prevIcon || _react2['default'].createElement('span', { className: prefixCls + '-tab-prev-icon' })
);
var nextButton = _react2['default'].createElement(
'span',
{
onClick: next ? this.next : null,
unselectable: 'unselectable',
className: (0, _classnames6['default'])((_classnames2 = {}, (0, _defineProperty3['default'])(_classnames2, prefixCls + '-tab-next', 1), (0, _defineProperty3['default'])(_classnames2, prefixCls + '-tab-btn-disabled', !next), (0, _defineProperty3['default'])(_classnames2, prefixCls + '-tab-arrow-show', showNextPrev), _classnames2))
},
nextIcon || _react2['default'].createElement('span', { className: prefixCls + '-tab-next-icon' })
);
var navClassName = prefixCls + '-nav';
var navClasses = (0, _classnames6['default'])((_classnames3 = {}, (0, _defineProperty3['default'])(_classnames3, navClassName, true), (0, _defineProperty3['default'])(_classnames3, scrollAnimated ? navClassName + '-animated' : navClassName + '-no-animated', true), _classnames3));
return _react2['default'].createElement(
'div',
{
className: (0, _classnames6['default'])((_classnames4 = {}, (0, _defineProperty3['default'])(_classnames4, prefixCls + '-nav-container', 1), (0, _defineProperty3['default'])(_classnames4, prefixCls + '-nav-container-scrolling', showNextPrev), _classnames4)),
key: 'container',
ref: this.props.saveRef('container')
},
prevButton,
nextButton,
_react2['default'].createElement(
'div',
{ className: prefixCls + '-nav-wrap', ref: this.props.saveRef('navWrap') },
_react2['default'].createElement(
'div',
{ className: prefixCls + '-nav-scroll' },
_react2['default'].createElement(
'div',
{ className: navClasses, ref: this.props.saveRef('nav') },
navWrapper(this.props.children)
)
)
)
);
}
}]);
return ScrollableTabBarNode;
}(_react2['default'].Component);
exports['default'] = ScrollableTabBarNode;
ScrollableTabBarNode.propTypes = {
activeKey: _propTypes2['default'].string,
getRef: _propTypes2['default'].func.isRequired,
saveRef: _propTypes2['default'].func.isRequired,
tabBarPosition: _propTypes2['default'].oneOf(['left', 'right', 'top', 'bottom']),
prefixCls: _propTypes2['default'].string,
scrollAnimated: _propTypes2['default'].bool,
onPrevClick: _propTypes2['default'].func,
onNextClick: _propTypes2['default'].func,
navWrapper: _propTypes2['default'].func,
children: _propTypes2['default'].node,
prevIcon: _propTypes2['default'].node,
nextIcon: _propTypes2['default'].node,
direction: _propTypes2['default'].node
};
ScrollableTabBarNode.defaultProps = {
tabBarPosition: 'left',
prefixCls: '',
scrollAnimated: true,
onPrevClick: function onPrevClick() {},
onNextClick: function onNextClick() {},
navWrapper: function navWrapper(ele) {
return ele;
}
};
module.exports = exports['default'];
/***/ }),
/***/ 1556:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(9);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(31);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(10);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(11);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _propTypes = __webpack_require__(1);
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var SaveRef = function (_React$Component) {
(0, _inherits3['default'])(SaveRef, _React$Component);
function SaveRef() {
var _ref;
var _temp, _this, _ret;
(0, _classCallCheck3['default'])(this, SaveRef);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = (0, _possibleConstructorReturn3['default'])(this, (_ref = SaveRef.__proto__ || Object.getPrototypeOf(SaveRef)).call.apply(_ref, [this].concat(args))), _this), _this.getRef = function (name) {
return _this[name];
}, _this.saveRef = function (name) {
return function (node) {
if (node) {
_this[name] = node;
}
};
}, _temp), (0, _possibleConstructorReturn3['default'])(_this, _ret);
}
(0, _createClass3['default'])(SaveRef, [{
key: 'render',
value: function render() {
return this.props.children(this.saveRef, this.getRef);
}
}]);
return SaveRef;
}(_react2['default'].Component);
exports['default'] = SaveRef;
SaveRef.propTypes = {
children: _propTypes2['default'].func
};
SaveRef.defaultProps = {
children: function children() {
return null;
}
};
module.exports = exports['default'];
/***/ }),
/***/ 1564:
/***/ (function(module, exports, __webpack_require__) {
// style-loader: Adds some css to the DOM by adding a <style> tag
// load the styles
var content = __webpack_require__(1736);
if(typeof content === 'string') content = [[module.i, content, '']];
// Prepare cssTransformation
var transform;
var options = {"hmr":false}
options.transform = transform
// add the styles to the DOM
var update = __webpack_require__(313)(content, options);
if(content.locals) module.exports = content.locals;
/***/ }),
/***/ 1736:
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(312)(true);
// imports
// module
exports.push([module.i, ".basicForm{background:#fff;padding:30px;margin-bottom:10px;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;min-height:390px}.basicForm .title{font-size:16px;padding-left:30px;margin-bottom:10px}.flexTable{-ms-flex-direction:column;flex-direction:column}.flexRow,.flexTable{display:-ms-flexbox;display:flex}.mb15{margin-bottom:15px!important}.ant-btn{border-radius:2px}button.ant-btn.ant-btn-primary.grayBtn{background:#cbcbcb;border-color:#cbcbcb}.borderBottom{border-bottom:1px solid #4cacff}.formItemInline{display:-ms-flexbox;display:flex}.formItemInline .ant-form-item-control-wrapper{display:inline-block}.hideRequireTag .ant-form-item-required:before{display:none}.courseNormalForm .ant-input-affix-wrapper,.courseNormalForm .ant-input-lg,.courseNormalForm .ant-select-auto-complete.ant-select .ant-input,.courseNormalForm .ant-select-auto-complete.ant-select .ant-select-selection--single,.courseNormalForm .ant-select-search__field__mirror,.courseNormalForm .ant-select-selection--single,.courseNormalForm .ant-select-show-search{height:40px}.courseNormalForm .ant-select-selection-selected-value{line-height:38px}.courseNormalForm input{height:40px}.autoModal .ant-modal-body{height:auto;overflow-y:auto}@media screen and (max-height:765px){.autoModal .ant-modal-body{height:670px;overflow-y:auto}}@media screen and (max-height:735px){.autoModal .ant-modal-body{height:600px;overflow-y:auto}}@media screen and (max-height:635px){.autoModal .ant-modal-body{height:500px;overflow-y:auto}}@media screen and (max-height:566px){.autoModal .ant-modal-body{height:465px;overflow-y:auto}}@media screen and (max-height:472px){.autoModal .ant-modal-body{height:360px;overflow-y:auto}}", "", {"version":3,"sources":["/Users/hs/edu/educoder/public/react/src/modules/user/account/common.css"],"names":[],"mappings":"AAAA,WACE,gBAAiB,AACjB,aAAc,AACd,mBAAoB,AACpB,8BAA+B,AACvB,sBAAuB,AAC/B,WAAY,AACZ,gBAAkB,CACnB,AACC,kBACE,eAAgB,AAChB,kBAAmB,AACnB,kBAAoB,CACrB,AACH,WAGE,0BAA2B,AACvB,qBAAuB,CAC5B,AACD,oBALE,oBAAqB,AACrB,YAAc,CAOf,AAED,MAAM,4BAA8B,CAAC,AAErC,SACG,iBAAmB,CACrB,AACD,uCACE,mBAAoB,AACpB,oBAAsB,CACvB,AACD,cACE,+BAAiC,CAClC,AAGD,gBACE,oBAAqB,AACrB,YAAc,CACf,AACD,+CACE,oBAAsB,CACvB,AACD,+CACE,YAAc,CACf,AA8BD,gXACE,WAAa,CACd,AAED,uDACE,gBAAiB,CAClB,AACD,wBACE,WAAa,CACd,AACD,2BACE,YAAa,AACb,eAAiB,CAClB,AAED,qCACE,2BACI,aAAc,AACd,eAAiB,CACpB,CACF,AACD,qCACE,2BACI,aAAc,AACd,eAAiB,CACpB,CACF,AACD,qCACE,2BACI,aAAc,AACd,eAAiB,CACpB,CACF,AACD,qCACE,2BACI,aAAc,AACd,eAAiB,CACpB,CACF,AACD,qCACE,2BACI,aAAc,AACd,eAAiB,CACpB,CACF","file":"common.css","sourcesContent":[".basicForm {\r\n background: #fff;\r\n padding: 30px;\r\n margin-bottom: 10px;\r\n -webkit-box-sizing: border-box;\r\n box-sizing: border-box;\r\n width: 100%;\r\n min-height: 390px;\r\n}\r\n .basicForm .title {\r\n font-size: 16px;\r\n padding-left: 30px;\r\n margin-bottom: 10px;\r\n }\r\n.flexTable {\r\n display: -ms-flexbox;\r\n display: flex;\r\n -ms-flex-direction: column;\r\n flex-direction: column;\r\n}\r\n.flexRow {\r\n display: -ms-flexbox;\r\n display: flex;\r\n}\r\n\r\n.mb15{margin-bottom: 15px!important;}\r\n/* BUTTOn */\r\n.ant-btn {\r\n border-radius: 2px;\r\n}\r\nbutton.ant-btn.ant-btn-primary.grayBtn {\r\n background: #CBCBCB;\r\n border-color: #CBCBCB;\r\n}\r\n.borderBottom {\r\n border-bottom: 1px solid #4CACFF;\r\n}\r\n\r\n/* form ---------------- START */\r\n.formItemInline { \r\n display: -ms-flexbox; \r\n display: flex;\r\n}\r\n.formItemInline .ant-form-item-control-wrapper {\r\n display: inline-block;\r\n}\r\n.hideRequireTag .ant-form-item-required:before{\r\n display: none;\r\n}\r\n\r\n\r\n /* .basicForm .ant-form-item-label {\r\n width: 100px;\r\n padding-right: 10px;\r\n }\r\n .basicForm .ant-form-item-label label {\r\n color: #979797\r\n } */\r\n\r\n\r\n.courseNormalForm .ant-select-show-search {\r\n height: 40px;\r\n}\r\n.courseNormalForm .ant-select-auto-complete.ant-select .ant-input {\r\n height: 40px;\r\n}\r\n.courseNormalForm .ant-select-search__field__mir
// exports
/***/ }),
/***/ 1768:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
__webpack_require__(28);
__webpack_require__(1769);
__webpack_require__(1499);
__webpack_require__(1482);
__webpack_require__(1484);
//# sourceMappingURL=css.js.map
/***/ }),
/***/ 1769:
/***/ (function(module, exports, __webpack_require__) {
// style-loader: Adds some css to the DOM by adding a <style> tag
// load the styles
var content = __webpack_require__(1770);
if(typeof content === 'string') content = [[module.i, content, '']];
// Prepare cssTransformation
var transform;
var options = {"hmr":false}
options.transform = transform
// add the styles to the DOM
var update = __webpack_require__(313)(content, options);
if(content.locals) module.exports = content.locals;
/***/ }),
/***/ 1770:
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(312)(true);
// imports
// module
exports.push([module.i, ".ant-card{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;color:rgba(0,0,0,.65);font-size:14px;font-variant:tabular-nums;line-height:1.5;list-style:none;-webkit-font-feature-settings:\"tnum\";font-feature-settings:\"tnum\";position:relative;background:#fff;border-radius:2px;-webkit-transition:all .3s;-o-transition:all .3s;transition:all .3s}.ant-card-hoverable{cursor:pointer}.ant-card-hoverable:hover{border-color:rgba(0,0,0,.09);-webkit-box-shadow:0 2px 8px rgba(0,0,0,.09);box-shadow:0 2px 8px rgba(0,0,0,.09)}.ant-card-bordered{border:1px solid #e8e8e8}.ant-card-head{min-height:48px;margin-bottom:-1px;padding:0 24px;color:rgba(0,0,0,.85);font-weight:500;font-size:16px;background:transparent;border-bottom:1px solid #e8e8e8;border-radius:2px 2px 0 0;zoom:1}.ant-card-head:after,.ant-card-head:before{display:table;content:\"\"}.ant-card-head:after{clear:both}.ant-card-head-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.ant-card-head-title{display:inline-block;-ms-flex:1;flex:1 1;padding:16px 0;overflow:hidden;white-space:nowrap;-o-text-overflow:ellipsis;text-overflow:ellipsis}.ant-card-head .ant-tabs{clear:both;margin-bottom:-17px;color:rgba(0,0,0,.65);font-weight:400;font-size:14px}.ant-card-head .ant-tabs-bar{border-bottom:1px solid #e8e8e8}.ant-card-extra{float:right;margin-left:auto;padding:16px 0;color:rgba(0,0,0,.65);font-weight:400;font-size:14px}.ant-card-body{padding:24px;zoom:1}.ant-card-body:after,.ant-card-body:before{display:table;content:\"\"}.ant-card-body:after{clear:both}.ant-card-contain-grid:not(.ant-card-loading) .ant-card-body{margin:-1px 0 0 -1px;padding:0}.ant-card-grid{float:left;width:33.33%;padding:24px;border:0;border-radius:0;-webkit-box-shadow:1px 0 0 0 #e8e8e8,0 1px 0 0 #e8e8e8,1px 1px 0 0 #e8e8e8,1px 0 0 0 #e8e8e8 inset,0 1px 0 0 #e8e8e8 inset;box-shadow:1px 0 0 0 #e8e8e8,0 1px 0 0 #e8e8e8,1px 1px 0 0 #e8e8e8,inset 1px 0 0 0 #e8e8e8,inset 0 1px 0 0 #e8e8e8;-webkit-transition:all .3s;-o-transition:all .3s;transition:all .3s}.ant-card-grid-hoverable:hover{position:relative;z-index:1;-webkit-box-shadow:0 2px 8px rgba(0,0,0,.15);box-shadow:0 2px 8px rgba(0,0,0,.15)}.ant-card-contain-tabs>.ant-card-head .ant-card-head-title{min-height:32px;padding-bottom:0}.ant-card-contain-tabs>.ant-card-head .ant-card-extra{padding-bottom:0}.ant-card-cover>*{display:block;width:100%}.ant-card-cover img{border-radius:2px 2px 0 0}.ant-card-actions{margin:0;padding:0;list-style:none;background:#fafafa;border-top:1px solid #e8e8e8;zoom:1}.ant-card-actions:after,.ant-card-actions:before{display:table;content:\"\"}.ant-card-actions:after{clear:both}.ant-card-actions>li{float:left;margin:12px 0;color:rgba(0,0,0,.45);text-align:center}.ant-card-actions>li>span{position:relative;display:block;min-width:32px;font-size:14px;line-height:22px;cursor:pointer}.ant-card-actions>li>span:hover{color:#1890ff;-webkit-transition:color .3s;-o-transition:color .3s;transition:color .3s}.ant-card-actions>li>span>.anticon,.ant-card-actions>li>span a:not(.ant-btn){display:inline-block;width:100%;color:rgba(0,0,0,.45);line-height:22px;-webkit-transition:color .3s;-o-transition:color .3s;transition:color .3s}.ant-card-actions>li>span>.anticon:hover,.ant-card-actions>li>span a:not(.ant-btn):hover{color:#1890ff}.ant-card-actions>li>span>.anticon{font-size:16px;line-height:22px}.ant-card-actions>li:not(:last-child){border-right:1px solid #e8e8e8}.ant-card-type-inner .ant-card-head{padding:0 24px;background:#fafafa}.ant-card-type-inner .ant-card-head-title{padding:12px 0;font-size:14px}.ant-card-type-inner .ant-card-body{padding:16px 24px}.ant-card-type-inner .ant-card-extra{padding:13.5px 0}.ant-card-meta{margin:-4px 0;zoom:1}.ant-card-meta:after,.ant-card-meta:before{display:table;content:\"\"}.ant-card-meta:after{clear:both}.ant-card-meta-avatar{float:left;padding-right:16px}.ant-card-meta-detail{overflow:hidden}.ant-card-meta-detail>div:not(:last-child){margin-bottom:8px}.ant-card-meta-title{overflow:hidden;color:rgba(0,0,0,.85);font-weight:500;font-size:16px
// exports
/***/ }),
/***/ 1771:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(__webpack_require__(0));
var _classnames = _interopRequireDefault(__webpack_require__(3));
var _omit = _interopRequireDefault(__webpack_require__(43));
var _Grid = _interopRequireDefault(__webpack_require__(1772));
var _Meta = _interopRequireDefault(__webpack_require__(1773));
var _tabs = _interopRequireDefault(__webpack_require__(1500));
var _row = _interopRequireDefault(__webpack_require__(1483));
var _col = _interopRequireDefault(__webpack_require__(1485));
var _configProvider = __webpack_require__(12);
var _warning = _interopRequireDefault(__webpack_require__(40));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _extends() { _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; }; return _extends.apply(this, arguments); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var __rest = void 0 && (void 0).__rest || function (s, e) {
var t = {};
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
function getAction(actions) {
var actionList = actions.map(function (action, index) {
return (// eslint-disable-next-line react/no-array-index-key
React.createElement("li", {
style: {
width: "".concat(100 / actions.length, "%")
},
key: "action-".concat(index)
}, React.createElement("span", null, action))
);
});
return actionList;
}
var Card =
/*#__PURE__*/
function (_React$Component) {
_inherits(Card, _React$Component);
function Card() {
var _this;
_classCallCheck(this, Card);
_this = _possibleConstructorReturn(this, _getPrototypeOf(Card).apply(this, arguments));
_this.onTabChange = function (key) {
if (_this.props.onTabChange) {
_this.props.onTabChange(key);
}
};
_this.renderCard = function (_ref) {
var _classNames, _extraProps;
var getPrefixCls = _ref.getPrefixCls;
var _a = _this.props,
customizePrefixCls = _a.prefixCls,
className = _a.className,
extra = _a.extra,
_a$headStyle = _a.headStyle,
headStyle = _a$headStyle === void 0 ? {} : _a$headStyle,
_a$bodyStyle = _a.bodyStyle,
bodyStyle = _a$bodyStyle === void 0 ? {} : _a$bodyStyle,
title = _a.title,
loading = _a.loading,
_a$bordered = _a.bordered,
bordered = _a$bordered === void 0 ? true : _a$bordered,
_a$size = _a.size,
size = _a$size === void 0 ? 'default' : _a$size,
type = _a.type,
cover = _a.cover,
actions = _a.actions,
tabList = _a.tabList,
children = _a.children,
activeTabKey = _a.activeTabKey,
defaultActiveTabKey = _a.defaultActiveTabKey,
tabBarExtraContent = _a.tabBarExtraContent,
others = __rest(_a, ["prefixCls", "className", "extra", "headStyle", "bodyStyle", "title", "loading", "bordered", "size", "type", "cover", "actions", "tabList", "children", "activeTabKey", "defaultActiveTabKey", "tabBarExtraContent"]);
var prefixCls = getPrefixCls('card', customizePrefixCls);
var classString = (0, _classnames["default"])(prefixCls, className, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-loading"), loading), _defineProperty(_classNames, "".concat(prefixCls, "-bordered"), bordered), _defineProperty(_classNames, "".concat(prefixCls, "-hoverable"), _this.getCompatibleHoverable()), _defineProperty(_classNames, "".concat(prefixCls, "-contain-grid"), _this.isContainGrid()), _defineProperty(_classNames, "".concat(prefixCls, "-contain-tabs"), tabList && tabList.length), _defineProperty(_classNames, "".concat(prefixCls, "-").concat(size), size !== 'default'), _defineProperty(_classNames, "".concat(prefixCls, "-type-").concat(type), !!type), _classNames));
var loadingBlockStyle = bodyStyle.padding === 0 || bodyStyle.padding === '0px' ? {
padding: 24
} : undefined;
var loadingBlock = React.createElement("div", {
className: "".concat(prefixCls, "-loading-content"),
style: loadingBlockStyle
}, React.createElement(_row["default"], {
gutter: 8
}, React.createElement(_col["default"], {
span: 22
}, React.createElement("div", {
className: "".concat(prefixCls, "-loading-block")
}))), React.createElement(_row["default"], {
gutter: 8
}, React.createElement(_col["default"], {
span: 8
}, React.createElement("div", {
className: "".concat(prefixCls, "-loading-block")
})), React.createElement(_col["default"], {
span: 15
}, React.createElement("div", {
className: "".concat(prefixCls, "-loading-block")
}))), React.createElement(_row["default"], {
gutter: 8
}, React.createElement(_col["default"], {
span: 6
}, React.createElement("div", {
className: "".concat(prefixCls, "-loading-block")
})), React.createElement(_col["default"], {
span: 18
}, React.createElement("div", {
className: "".concat(prefixCls, "-loading-block")
}))), React.createElement(_row["default"], {
gutter: 8
}, React.createElement(_col["default"], {
span: 13
}, React.createElement("div", {
className: "".concat(prefixCls, "-loading-block")
})), React.createElement(_col["default"], {
span: 9
}, React.createElement("div", {
className: "".concat(prefixCls, "-loading-block")
}))), React.createElement(_row["default"], {
gutter: 8
}, React.createElement(_col["default"], {
span: 4
}, React.createElement("div", {
className: "".concat(prefixCls, "-loading-block")
})), React.createElement(_col["default"], {
span: 3
}, React.createElement("div", {
className: "".concat(prefixCls, "-loading-block")
})), React.createElement(_col["default"], {
span: 16
}, React.createElement("div", {
className: "".concat(prefixCls, "-loading-block")
}))));
var hasActiveTabKey = activeTabKey !== undefined;
var extraProps = (_extraProps = {}, _defineProperty(_extraProps, hasActiveTabKey ? 'activeKey' : 'defaultActiveKey', hasActiveTabKey ? activeTabKey : defaultActiveTabKey), _defineProperty(_extraProps, "tabBarExtraContent", tabBarExtraContent), _extraProps);
var head;
var tabs = tabList && tabList.length ? React.createElement(_tabs["default"], _extends({}, extraProps, {
className: "".concat(prefixCls, "-head-tabs"),
size: "large",
onChange: _this.onTabChange
}), tabList.map(function (item) {
return React.createElement(_tabs["default"].TabPane, {
tab: item.tab,
disabled: item.disabled,
key: item.key
});
})) : null;
if (title || extra || tabs) {
head = React.createElement("div", {
className: "".concat(prefixCls, "-head"),
style: headStyle
}, React.createElement("div", {
className: "".concat(prefixCls, "-head-wrapper")
}, title && React.createElement("div", {
className: "".concat(prefixCls, "-head-title")
}, title), extra && React.createElement("div", {
className: "".concat(prefixCls, "-extra")
}, extra)), tabs);
}
var coverDom = cover ? React.createElement("div", {
className: "".concat(prefixCls, "-cover")
}, cover) : null;
var body = React.createElement("div", {
className: "".concat(prefixCls, "-body"),
style: bodyStyle
}, loading ? loadingBlock : children);
var actionDom = actions && actions.length ? React.createElement("ul", {
className: "".concat(prefixCls, "-actions")
}, getAction(actions)) : null;
var divProps = (0, _omit["default"])(others, ['onTabChange', 'noHovering', 'hoverable']);
return React.createElement("div", _extends({}, divProps, {
className: classString
}), head, coverDom, body, actionDom);
};
return _this;
}
_createClass(Card, [{
key: "componentDidMount",
value: function componentDidMount() {
if ('noHovering' in this.props) {
(0, _warning["default"])(!this.props.noHovering, 'Card', '`noHovering` is deprecated, you can remove it safely or use `hoverable` instead.');
(0, _warning["default"])(!!this.props.noHovering, 'Card', '`noHovering={false}` is deprecated, use `hoverable` instead.');
}
} // For 2.x compatible
}, {
key: "getCompatibleHoverable",
value: function getCompatibleHoverable() {
var _this$props = this.props,
noHovering = _this$props.noHovering,
hoverable = _this$props.hoverable;
if ('noHovering' in this.props) {
return !noHovering || hoverable;
}
return !!hoverable;
}
}, {
key: "isContainGrid",
value: function isContainGrid() {
var containGrid;
React.Children.forEach(this.props.children, function (element) {
if (element && element.type && element.type === _Grid["default"]) {
containGrid = true;
}
});
return containGrid;
}
}, {
key: "render",
value: function render() {
return React.createElement(_configProvider.ConfigConsumer, null, this.renderCard);
}
}]);
return Card;
}(React.Component);
exports["default"] = Card;
Card.Grid = _Grid["default"];
Card.Meta = _Meta["default"];
//# sourceMappingURL=index.js.map
/***/ }),
/***/ 1772:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(__webpack_require__(0));
var _classnames = _interopRequireDefault(__webpack_require__(3));
var _configProvider = __webpack_require__(12);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _extends() { _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; }; return _extends.apply(this, arguments); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var __rest = void 0 && (void 0).__rest || function (s, e) {
var t = {};
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
var Grid = function Grid(props) {
return React.createElement(_configProvider.ConfigConsumer, null, function (_ref) {
var getPrefixCls = _ref.getPrefixCls;
var customizePrefixCls = props.prefixCls,
className = props.className,
_props$hoverable = props.hoverable,
hoverable = _props$hoverable === void 0 ? true : _props$hoverable,
others = __rest(props, ["prefixCls", "className", "hoverable"]);
var prefixCls = getPrefixCls('card', customizePrefixCls);
var classString = (0, _classnames["default"])("".concat(prefixCls, "-grid"), className, _defineProperty({}, "".concat(prefixCls, "-grid-hoverable"), hoverable));
return React.createElement("div", _extends({}, others, {
className: classString
}));
});
};
var _default = Grid;
exports["default"] = _default;
//# sourceMappingURL=Grid.js.map
/***/ }),
/***/ 1773:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(__webpack_require__(0));
var _classnames = _interopRequireDefault(__webpack_require__(3));
var _configProvider = __webpack_require__(12);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _extends() { _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; }; return _extends.apply(this, arguments); }
var __rest = void 0 && (void 0).__rest || function (s, e) {
var t = {};
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
var Meta = function Meta(props) {
return React.createElement(_configProvider.ConfigConsumer, null, function (_ref) {
var getPrefixCls = _ref.getPrefixCls;
var customizePrefixCls = props.prefixCls,
className = props.className,
avatar = props.avatar,
title = props.title,
description = props.description,
others = __rest(props, ["prefixCls", "className", "avatar", "title", "description"]);
var prefixCls = getPrefixCls('card', customizePrefixCls);
var classString = (0, _classnames["default"])("".concat(prefixCls, "-meta"), className);
var avatarDom = avatar ? React.createElement("div", {
className: "".concat(prefixCls, "-meta-avatar")
}, avatar) : null;
var titleDom = title ? React.createElement("div", {
className: "".concat(prefixCls, "-meta-title")
}, title) : null;
var descriptionDom = description ? React.createElement("div", {
className: "".concat(prefixCls, "-meta-description")
}, description) : null;
var MetaDetail = titleDom || descriptionDom ? React.createElement("div", {
className: "".concat(prefixCls, "-meta-detail")
}, titleDom, descriptionDom) : null;
return React.createElement("div", _extends({}, others, {
className: classString
}), avatarDom, MetaDetail);
});
};
var _default = Meta;
exports["default"] = _default;
//# sourceMappingURL=Meta.js.map
/***/ }),
/***/ 1776:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_form_style_css__ = __webpack_require__(953);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_form_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_antd_lib_form_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_form__ = __webpack_require__(954);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_form___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_antd_lib_form__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_input_style_css__ = __webpack_require__(68);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_input_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_antd_lib_input_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_input__ = __webpack_require__(69);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_input___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_antd_lib_input__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_axios__ = __webpack_require__(15);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_axios___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_axios__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__courses_common_ModalWrapper__ = __webpack_require__(333);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_educoder__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__account_common_css__ = __webpack_require__(1564);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__account_common_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8__account_common_css__);
var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();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;}var TextArea=__WEBPACK_IMPORTED_MODULE_3_antd_lib_input___default.a.TextArea;var Search=__WEBPACK_IMPORTED_MODULE_3_antd_lib_input___default.a.Search;var ApplyForAddOrgModal=function(_Component){_inherits(ApplyForAddOrgModal,_Component);function ApplyForAddOrgModal(props){_classCallCheck(this,ApplyForAddOrgModal);var _this=_possibleConstructorReturn(this,(ApplyForAddOrgModal.__proto__||Object.getPrototypeOf(ApplyForAddOrgModal)).call(this,props));_this.componentDidUpdate=function(prevState){if(_this.props.schoolName&&prevState.schoolName!=_this.props.schoolName){_this.props.form.setFieldsValue({schoolName:_this.props.schoolName});}};_this.componentDidMount=function(){if(_this.props.schoolName){_this.props.form.setFieldsValue({schoolName:_this.props.schoolName});}};_this.setVisible=function(visible){_this.refs.modalWrapper.setVisible(visible);};_this.onSendOk=function(){_this.props.form.validateFieldsAndScroll(function(err,values){console.log(values);if(!err){var url="/add_school_applies.json";__WEBPACK_IMPORTED_MODULE_5_axios___default.a.post(url,{name:values.schoolName,province:values.city&&values.city[0],city:values.city&&values.city[1],address:values.address,remarks:values.remarks}).then(function(result){if(result){_this.props.showNotification("新增学校/单位成功!");_this.setVisible(false);_this.props.addOrgSuccess(values.schoolName);}}).catch(function(error){console.log(error);});}});};_this.onOk=function(){_this.onSendOk();};_this.state={};return _this;}_createClass(ApplyForAddOrgModal,[{key:"render",value:function render(){var _state=this.state,course_lists=_state.course_lists,checkBoxValues=_state.checkBoxValues,searchValue=_state.searchValue,loading=_state.loading,hasMore=_state.hasMore;var moduleName=this.props.moduleName;var getFieldDecorator=this.props.form.getFieldDecorator;return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__courses_common_ModalWrapper__["a" /* default */],Object.assign({ref:"modalWrapper",title:"\u7533\u8BF7\u6DFB\u52A0\u5355\u4F4D\u540D\u79F0"},this.props,{onOk:this.onOk,okText:"\u4FDD\u5B58",className:"applyForModal courseNormalForm"}),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("style",null,"\n .applyForModal .ant-form-item-label {\n width: 100px;\n padding-right: 10px;\n }\n .applyForModal .ant-form-item-label label {\n color: #979797\n }\n .applyForModal .formItemInline .ant-form-item-control-wrapper{\n width: 390px;\n }\n .applyForModal .formItemInline .ant-form-item-control .ant-cascader-picker,.applyForModal .formItemInline .ant-cascader-picker-large .ant-input{\n width: 100%;\n height:40px
required:true,message:'请输入学校或工作单位'}]})(__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_input___default.a,{placeholder:"\u5B66\u6821\u6216\u5DE5\u4F5C\u5355\u4F4D",className:"validateInput"})),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("div",{className:"df mt18"},__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("li",{style:{lineHeight:"22px"}},"\u793A\u4F8B\uFF1A"),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("ul",{style:{lineHeight:"22px"}},__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("li",null,__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("i",{className:"iconfont icon-chenggong color-green-light font-14 ml2 mr5 fl"}),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("span",null," \u56FD\u9632\u79D1\u5B66\u6280\u672F\u5927\u5B66")),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("li",null,__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("i",{className:"iconfont icon-htmal5icon19 font-18 fl mr4",style:{color:"#FF9348"}}),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("span",null," \u56FD\u9632\u79D1\u5B66\u6280\u672F\u5927\u5B66\u5F00\u798F\u6821\u533A"))))),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_antd_lib_form___default.a.Item,{label:"\u5730\u533A\uFF1A",className:"mt15 formItemInline hideRequireTag"},getFieldDecorator('city',{rules:[]})(__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_educoder__["e" /* City */],{matchInputWidth:true,popupClassName:"addOrg"}))),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_antd_lib_form___default.a.Item,{label:"\u8BE6\u7EC6\u5730\u5740\uFF1A",className:"mt15 formItemInline hideRequireTag"},getFieldDecorator('address',{rules:[]})(__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_input___default.a,{placeholder:"\u8BF7\u586B\u5199\u5B8C\u6574\u7684\u5730\u5740\u4FE1\u606F",className:"validateInput"}))),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_antd_lib_form___default.a.Item,{label:"\u8BF4\u660E\uFF1A",className:"mt15 formItemInline hideRequireTag"},getFieldDecorator('remarks',{})(__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(TextArea,{placeholder:"\u518D\u6B21\u8BF4\u660E\u7279\u522B\u60C5\u51B5\uFF08\u9009\u586B\uFF09",className:"validateInput"})))));}}]);return ApplyForAddOrgModal;}(__WEBPACK_IMPORTED_MODULE_4_react__["Component"]);var WrappedApplyForAddOrgModal=__WEBPACK_IMPORTED_MODULE_1_antd_lib_form___default.a.create({name:'ApplyForAddOrgModal'})(ApplyForAddOrgModal);/* harmony default export */ __webpack_exports__["a"] = (WrappedApplyForAddOrgModal);
/***/ }),
/***/ 1922:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
__webpack_require__(28);
__webpack_require__(1923);
//# sourceMappingURL=css.js.map
/***/ }),
/***/ 1923:
/***/ (function(module, exports, __webpack_require__) {
// style-loader: Adds some css to the DOM by adding a <style> tag
// load the styles
var content = __webpack_require__(1924);
if(typeof content === 'string') content = [[module.i, content, '']];
// Prepare cssTransformation
var transform;
var options = {"hmr":false}
options.transform = transform
// add the styles to the DOM
var update = __webpack_require__(313)(content, options);
if(content.locals) module.exports = content.locals;
/***/ }),
/***/ 1924:
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(312)(true);
// imports
// module
exports.push([module.i, ".ant-badge{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;color:rgba(0,0,0,.65);font-size:14px;font-variant:tabular-nums;line-height:1.5;list-style:none;-webkit-font-feature-settings:\"tnum\";font-feature-settings:\"tnum\";position:relative;display:inline-block;color:unset;line-height:1}.ant-badge-count{z-index:auto;min-width:20px;height:20px;padding:0 6px;color:#fff;font-weight:400;font-size:12px;line-height:20px;white-space:nowrap;text-align:center;background:#f5222d;border-radius:10px;-webkit-box-shadow:0 0 0 1px #fff;box-shadow:0 0 0 1px #fff}.ant-badge-count a,.ant-badge-count a:hover{color:#fff}.ant-badge-multiple-words{padding:0 8px}.ant-badge-dot{z-index:auto;width:6px;height:6px;background:#f5222d;border-radius:100%;-webkit-box-shadow:0 0 0 1px #fff;box-shadow:0 0 0 1px #fff}.ant-badge-count,.ant-badge-dot,.ant-badge .ant-scroll-number-custom-component{position:absolute;top:0;right:0;-webkit-transform:translate(50%,-50%);-ms-transform:translate(50%,-50%);transform:translate(50%,-50%);-webkit-transform-origin:100% 0;-ms-transform-origin:100% 0;transform-origin:100% 0}.ant-badge-status{line-height:inherit;vertical-align:baseline}.ant-badge-status-dot{position:relative;top:-1px;display:inline-block;width:6px;height:6px;vertical-align:middle;border-radius:50%}.ant-badge-status-success{background-color:#52c41a}.ant-badge-status-processing{position:relative;background-color:#1890ff}.ant-badge-status-processing:after{position:absolute;top:0;left:0;width:100%;height:100%;border:1px solid #1890ff;border-radius:50%;-webkit-animation:antStatusProcessing 1.2s infinite ease-in-out;animation:antStatusProcessing 1.2s infinite ease-in-out;content:\"\"}.ant-badge-status-default{background-color:#d9d9d9}.ant-badge-status-error{background-color:#f5222d}.ant-badge-status-warning{background-color:#faad14}.ant-badge-status-magenta,.ant-badge-status-pink{background:#eb2f96}.ant-badge-status-red{background:#f5222d}.ant-badge-status-volcano{background:#fa541c}.ant-badge-status-orange{background:#fa8c16}.ant-badge-status-yellow{background:#fadb14}.ant-badge-status-gold{background:#faad14}.ant-badge-status-cyan{background:#13c2c2}.ant-badge-status-lime{background:#a0d911}.ant-badge-status-green{background:#52c41a}.ant-badge-status-blue{background:#1890ff}.ant-badge-status-geekblue{background:#2f54eb}.ant-badge-status-purple{background:#722ed1}.ant-badge-status-text{margin-left:8px;color:rgba(0,0,0,.65);font-size:14px}.ant-badge-zoom-appear,.ant-badge-zoom-enter{-webkit-animation:antZoomBadgeIn .3s cubic-bezier(.12,.4,.29,1.46);animation:antZoomBadgeIn .3s cubic-bezier(.12,.4,.29,1.46);-webkit-animation-fill-mode:both;animation-fill-mode:both}.ant-badge-zoom-leave{-webkit-animation:antZoomBadgeOut .3s cubic-bezier(.71,-.46,.88,.6);animation:antZoomBadgeOut .3s cubic-bezier(.71,-.46,.88,.6);-webkit-animation-fill-mode:both;animation-fill-mode:both}.ant-badge-not-a-wrapper:not(.ant-badge-status){vertical-align:middle}.ant-badge-not-a-wrapper .ant-scroll-number{position:relative;top:auto;display:block}.ant-badge-not-a-wrapper .ant-badge-count{-webkit-transform:none;-ms-transform:none;transform:none}@-webkit-keyframes antStatusProcessing{0%{-webkit-transform:scale(.8);transform:scale(.8);opacity:.5}to{-webkit-transform:scale(2.4);transform:scale(2.4);opacity:0}}@keyframes antStatusProcessing{0%{-webkit-transform:scale(.8);transform:scale(.8);opacity:.5}to{-webkit-transform:scale(2.4);transform:scale(2.4);opacity:0}}.ant-scroll-number{overflow:hidden}.ant-scroll-number-only{display:inline-block;height:20px;-webkit-transition:all .3s cubic-bezier(.645,.045,.355,1);-o-transition:all .3s cubic-bezier(.645,.045,.355,1);transition:all .3s cubic-bezier(.645,.045,.355,1)}.ant-scroll-number-only>p.ant-scroll-number-only-unit{height:20px;margin:0}.ant-scroll-number-symbol{vertical-align:top}@-webkit-keyframes antZoomBadgeIn{0%{-webkit-transform:scale(0) translate(50%,-50%);transform:scale(0) translate(50%,-50%);opacity:0}to{-webkit-transform:scale(1) translate(50%,-50%);transform:scale(1) translate(50%,-
// exports
/***/ }),
/***/ 1925:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(__webpack_require__(0));
var PropTypes = _interopRequireWildcard(__webpack_require__(1));
var _rcAnimate = _interopRequireDefault(__webpack_require__(331));
var _omit = _interopRequireDefault(__webpack_require__(43));
var _classnames = _interopRequireDefault(__webpack_require__(3));
var _ScrollNumber = _interopRequireDefault(__webpack_require__(1926));
var _colors = __webpack_require__(1137);
var _configProvider = __webpack_require__(12);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _extends() { _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; }; return _extends.apply(this, arguments); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var __rest = void 0 && (void 0).__rest || function (s, e) {
var t = {};
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
function isPresetColor(color) {
return _colors.PresetColorTypes.indexOf(color) !== -1;
}
var Badge =
/*#__PURE__*/
function (_React$Component) {
_inherits(Badge, _React$Component);
function Badge() {
var _this;
_classCallCheck(this, Badge);
_this = _possibleConstructorReturn(this, _getPrototypeOf(Badge).apply(this, arguments));
_this.renderBadge = function (_ref) {
var _classNames;
var getPrefixCls = _ref.getPrefixCls;
var _a = _this.props,
customizePrefixCls = _a.prefixCls,
customizeScrollNumberPrefixCls = _a.scrollNumberPrefixCls,
children = _a.children,
status = _a.status,
text = _a.text,
color = _a.color,
restProps = __rest(_a, ["prefixCls", "scrollNumberPrefixCls", "children", "status", "text", "color"]);
var omitArr = ['count', 'showZero', 'overflowCount', 'className', 'style', 'dot', 'offset', 'title'];
var prefixCls = getPrefixCls('badge', customizePrefixCls);
var scrollNumberPrefixCls = getPrefixCls('scroll-number', customizeScrollNumberPrefixCls);
var scrollNumber = _this.renderBadgeNumber(prefixCls, scrollNumberPrefixCls);
var statusText = _this.renderStatusText(prefixCls);
var statusCls = (0, _classnames["default"])((_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-status-dot"), _this.hasStatus()), _defineProperty(_classNames, "".concat(prefixCls, "-status-").concat(status), !!status), _defineProperty(_classNames, "".concat(prefixCls, "-status-").concat(color), isPresetColor(color)), _classNames));
var statusStyle = {};
if (color && !isPresetColor(color)) {
statusStyle.background = color;
} // <Badge status="success" />
if (!children && _this.hasStatus()) {
var styleWithOffset = _this.getStyleWithOffset();
var statusTextColor = styleWithOffset && styleWithOffset.color;
return React.createElement("span", _extends({}, (0, _omit["default"])(restProps, omitArr), {
className: _this.getBadgeClassName(prefixCls),
style: styleWithOffset
}), React.createElement("span", {
className: statusCls,
style: statusStyle
}), React.createElement("span", {
style: {
color: statusTextColor
},
className: "".concat(prefixCls, "-status-text")
}, text));
}
return React.createElement("span", _extends({}, (0, _omit["default"])(restProps, omitArr), {
className: _this.getBadgeClassName(prefixCls)
}), children, React.createElement(_rcAnimate["default"], {
component: "",
showProp: "data-show",
transitionName: children ? "".concat(prefixCls, "-zoom") : '',
transitionAppear: true
}, scrollNumber), statusText);
};
return _this;
}
_createClass(Badge, [{
key: "getNumberedDispayCount",
value: function getNumberedDispayCount() {
var _this$props = this.props,
count = _this$props.count,
overflowCount = _this$props.overflowCount;
var displayCount = count > overflowCount ? "".concat(overflowCount, "+") : count;
return displayCount;
}
}, {
key: "getDispayCount",
value: function getDispayCount() {
var isDot = this.isDot(); // dot mode don't need count
if (isDot) {
return '';
}
return this.getNumberedDispayCount();
}
}, {
key: "getScrollNumberTitle",
value: function getScrollNumberTitle() {
var _this$props2 = this.props,
title = _this$props2.title,
count = _this$props2.count;
if (title) {
return title;
}
return typeof count === 'string' || typeof count === 'number' ? count : undefined;
}
}, {
key: "getStyleWithOffset",
value: function getStyleWithOffset() {
var _this$props3 = this.props,
offset = _this$props3.offset,
style = _this$props3.style;
return offset ? _extends({
right: -parseInt(offset[0], 10),
marginTop: offset[1]
}, style) : style;
}
}, {
key: "getBadgeClassName",
value: function getBadgeClassName(prefixCls) {
var _classNames2;
var _this$props4 = this.props,
className = _this$props4.className,
children = _this$props4.children;
return (0, _classnames["default"])(className, prefixCls, (_classNames2 = {}, _defineProperty(_classNames2, "".concat(prefixCls, "-status"), this.hasStatus()), _defineProperty(_classNames2, "".concat(prefixCls, "-not-a-wrapper"), !children), _classNames2));
}
}, {
key: "hasStatus",
value: function hasStatus() {
var _this$props5 = this.props,
status = _this$props5.status,
color = _this$props5.color;
return !!status || !!color;
}
}, {
key: "isZero",
value: function isZero() {
var numberedDispayCount = this.getNumberedDispayCount();
return numberedDispayCount === '0' || numberedDispayCount === 0;
}
}, {
key: "isDot",
value: function isDot() {
var dot = this.props.dot;
var isZero = this.isZero();
return dot && !isZero || this.hasStatus();
}
}, {
key: "isHidden",
value: function isHidden() {
var showZero = this.props.showZero;
var displayCount = this.getDispayCount();
var isZero = this.isZero();
var isDot = this.isDot();
var isEmpty = displayCount === null || displayCount === undefined || displayCount === '';
return (isEmpty || isZero && !showZero) && !isDot;
}
}, {
key: "renderStatusText",
value: function renderStatusText(prefixCls) {
var text = this.props.text;
var hidden = this.isHidden();
return hidden || !text ? null : React.createElement("span", {
className: "".concat(prefixCls, "-status-text")
}, text);
}
}, {
key: "renderDispayComponent",
value: function renderDispayComponent() {
var count = this.props.count;
var customNode = count;
if (!customNode || _typeof(customNode) !== 'object') {
return undefined;
}
return React.cloneElement(customNode, {
style: _extends(_extends({}, this.getStyleWithOffset()), customNode.props && customNode.props.style)
});
}
}, {
key: "renderBadgeNumber",
value: function renderBadgeNumber(prefixCls, scrollNumberPrefixCls) {
var _classNames3;
var _this$props6 = this.props,
status = _this$props6.status,
count = _this$props6.count;
var displayCount = this.getDispayCount();
var isDot = this.isDot();
var hidden = this.isHidden();
var scrollNumberCls = (0, _classnames["default"])((_classNames3 = {}, _defineProperty(_classNames3, "".concat(prefixCls, "-dot"), isDot), _defineProperty(_classNames3, "".concat(prefixCls, "-count"), !isDot), _defineProperty(_classNames3, "".concat(prefixCls, "-multiple-words"), !isDot && count && count.toString && count.toString().length > 1), _defineProperty(_classNames3, "".concat(prefixCls, "-status-").concat(status), this.hasStatus()), _classNames3));
return hidden ? null : React.createElement(_ScrollNumber["default"], {
prefixCls: scrollNumberPrefixCls,
"data-show": !hidden,
className: scrollNumberCls,
count: displayCount,
displayComponent: this.renderDispayComponent() // <Badge status="success" count={<Icon type="xxx" />}></Badge>
,
title: this.getScrollNumberTitle(),
style: this.getStyleWithOffset(),
key: "scrollNumber"
});
}
}, {
key: "render",
value: function render() {
return React.createElement(_configProvider.ConfigConsumer, null, this.renderBadge);
}
}]);
return Badge;
}(React.Component);
exports["default"] = Badge;
Badge.defaultProps = {
count: null,
showZero: false,
dot: false,
overflowCount: 99
};
Badge.propTypes = {
count: PropTypes.node,
showZero: PropTypes.bool,
dot: PropTypes.bool,
overflowCount: PropTypes.number
};
//# sourceMappingURL=index.js.map
/***/ }),
/***/ 1926:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(__webpack_require__(0));
var _omit = _interopRequireDefault(__webpack_require__(43));
var _classnames = _interopRequireDefault(__webpack_require__(3));
var _reactLifecyclesCompat = __webpack_require__(7);
var _configProvider = __webpack_require__(12);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _extends() { _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; }; return _extends.apply(this, arguments); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function getNumberArray(num) {
return num ? num.toString().split('').reverse().map(function (i) {
var current = Number(i);
return isNaN(current) ? i : current;
}) : [];
}
function renderNumberList(position, className) {
var childrenToReturn = [];
for (var i = 0; i < 30; i++) {
childrenToReturn.push(React.createElement("p", {
key: i.toString(),
className: (0, _classnames["default"])(className, {
current: position === i
})
}, i % 10));
}
return childrenToReturn;
}
var ScrollNumber =
/*#__PURE__*/
function (_React$Component) {
_inherits(ScrollNumber, _React$Component);
function ScrollNumber(props) {
var _this;
_classCallCheck(this, ScrollNumber);
_this = _possibleConstructorReturn(this, _getPrototypeOf(ScrollNumber).call(this, props));
_this.onAnimated = function () {
var onAnimated = _this.props.onAnimated;
if (onAnimated) {
onAnimated();
}
};
_this.renderScrollNumber = function (_ref) {
var getPrefixCls = _ref.getPrefixCls;
var _this$props = _this.props,
customizePrefixCls = _this$props.prefixCls,
className = _this$props.className,
style = _this$props.style,
title = _this$props.title,
_this$props$component = _this$props.component,
component = _this$props$component === void 0 ? 'sup' : _this$props$component,
displayComponent = _this$props.displayComponent; // fix https://fb.me/react-unknown-prop
var restProps = (0, _omit["default"])(_this.props, ['count', 'onAnimated', 'component', 'prefixCls', 'displayComponent']);
var prefixCls = getPrefixCls('scroll-number', customizePrefixCls);
var newProps = _extends(_extends({}, restProps), {
className: (0, _classnames["default"])(prefixCls, className),
title: title
}); // allow specify the border
// mock border-color by box-shadow for compatible with old usage:
// <Badge count={4} style={{ backgroundColor: '#fff', color: '#999', borderColor: '#d9d9d9' }} />
if (style && style.borderColor) {
newProps.style = _extends(_extends({}, style), {
boxShadow: "0 0 0 1px ".concat(style.borderColor, " inset")
});
}
if (displayComponent) {
return React.cloneElement(displayComponent, {
className: (0, _classnames["default"])("".concat(prefixCls, "-custom-component"), displayComponent.props && displayComponent.props.className)
});
}
return React.createElement(component, newProps, _this.renderNumberElement(prefixCls));
};
_this.state = {
animateStarted: true,
count: props.count
};
return _this;
}
_createClass(ScrollNumber, [{
key: "componentDidUpdate",
value: function componentDidUpdate(_, prevState) {
this.lastCount = prevState.count;
var animateStarted = this.state.animateStarted;
if (animateStarted) {
// eslint-disable-next-line react/no-did-update-set-state
this.setState(function (__, props) {
return {
animateStarted: false,
count: props.count
};
}, this.onAnimated);
}
}
}, {
key: "getPositionByNum",
value: function getPositionByNum(num, i) {
var count = this.state.count;
var currentCount = Math.abs(Number(count));
var lastCount = Math.abs(Number(this.lastCount));
var currentDigit = Math.abs(getNumberArray(this.state.count)[i]);
var lastDigit = Math.abs(getNumberArray(this.lastCount)[i]);
if (this.state.animateStarted) {
return 10 + num;
} // 同方向则在同一侧切换数字
if (currentCount > lastCount) {
if (currentDigit >= lastDigit) {
return 10 + num;
}
return 20 + num;
}
if (currentDigit <= lastDigit) {
return 10 + num;
}
return num;
}
}, {
key: "renderCurrentNumber",
value: function renderCurrentNumber(prefixCls, num, i) {
if (typeof num === 'number') {
var position = this.getPositionByNum(num, i);
var removeTransition = this.state.animateStarted || getNumberArray(this.lastCount)[i] === undefined;
return React.createElement('span', {
className: "".concat(prefixCls, "-only"),
style: {
transition: removeTransition ? 'none' : undefined,
msTransform: "translateY(".concat(-position * 100, "%)"),
WebkitTransform: "translateY(".concat(-position * 100, "%)"),
transform: "translateY(".concat(-position * 100, "%)")
},
key: i
}, renderNumberList(position, "".concat(prefixCls, "-only-unit")));
}
return React.createElement("span", {
key: "symbol",
className: "".concat(prefixCls, "-symbol")
}, num);
}
}, {
key: "renderNumberElement",
value: function renderNumberElement(prefixCls) {
var _this2 = this;
var count = this.state.count;
if (count && Number(count) % 1 === 0) {
return getNumberArray(count).map(function (num, i) {
return _this2.renderCurrentNumber(prefixCls, num, i);
}).reverse();
}
return count;
}
}, {
key: "render",
value: function render() {
return React.createElement(_configProvider.ConfigConsumer, null, this.renderScrollNumber);
}
}], [{
key: "getDerivedStateFromProps",
value: function getDerivedStateFromProps(nextProps, nextState) {
if ('count' in nextProps) {
if (nextState.count === nextProps.count) {
return null;
}
return {
animateStarted: true
};
}
return null;
}
}]);
return ScrollNumber;
}(React.Component);
ScrollNumber.defaultProps = {
count: null,
onAnimated: function onAnimated() {}
};
(0, _reactLifecyclesCompat.polyfill)(ScrollNumber);
var _default = ScrollNumber;
exports["default"] = _default;
//# sourceMappingURL=ScrollNumber.js.map
/***/ }),
/***/ 2386:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony export (immutable) */ __webpack_exports__["getHiddenName"] = getHiddenName;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_button_style_css__ = __webpack_require__(87);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_button_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_antd_lib_button_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_button__ = __webpack_require__(74);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_button___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_antd_lib_button__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_tooltip_style_css__ = __webpack_require__(169);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_tooltip_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_antd_lib_tooltip_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_tooltip__ = __webpack_require__(168);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_tooltip___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_antd_lib_tooltip__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_antd_lib_form_style_css__ = __webpack_require__(953);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_antd_lib_form_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_antd_lib_form_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_antd_lib_form__ = __webpack_require__(954);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_antd_lib_form___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_antd_lib_form__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_antd_lib_input_style_css__ = __webpack_require__(68);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_antd_lib_input_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_antd_lib_input_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_antd_lib_input__ = __webpack_require__(69);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_antd_lib_input___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_antd_lib_input__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_antd_lib_select_style_css__ = __webpack_require__(318);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_antd_lib_select_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_antd_lib_select_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_antd_lib_select__ = __webpack_require__(315);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_antd_lib_select___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_antd_lib_select__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_antd_lib_radio_style_css__ = __webpack_require__(177);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_antd_lib_radio_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_antd_lib_radio_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_antd_lib_radio__ = __webpack_require__(175);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_antd_lib_radio___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_antd_lib_radio__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_12_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13_educoder__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__modal_ApplyForAddOrgModal__ = __webpack_require__(1776);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__modal_ApplyForAddChildOrgModal__ = __webpack_require__(2510);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__AccountBasicEditItem__ = __webpack_require__(2511);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17_axios__ = __webpack_require__(15);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17_axios___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_17_axios__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__AccountBasic__ = __webpack_require__(3118);
var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();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;}var RadioGroup=__WEBPACK_IMPORTED_MODULE_11_antd_lib_radio___default.a.Group;var Option=__WEBPACK_IMPORTED_MODULE_9_antd_lib_select___default.a.Option;var map=__WEBPACK_IMPORTED_MODULE_18__AccountBasic__["identityMap"];// {"teacher":"教师", "student":"学生", "professional":"专业人士"}
function getHiddenName(name){if(!name)return'';var len=parseInt(name.length)-1;var str="";for(var i=0;i<len;i++){str+="*";}var newName=name.substr(0,1)+str;return newName;}var MAX_NAME_LENGTH=10;var MAX_NICKNAME_LENGTH=20;var AccountBasic=function(_Component){_inherits(AccountBasic,_Component);function AccountBasic(props){_classCallCheck(this,AccountBasic);var _this=_possibleConstructorReturn(this,(AccountBasic.__proto__||Object.getPrototypeOf(AccountBasic)).call(this,props));_this.componentDidUpdate=function(prevProps){if(_this.props.basicInfo&&(prevProps.basicInfo==undefined||prevProps.basicInfo.id!=_this.props.basicInfo.id)){_this.setValue(_this.props.basicInfo);_this.getSchoolList(_this.props.basicInfo);}};_this.componentDidMount=function(){if(_this.props.basicInfo){_this.setValue(_this.props.basicInfo);_this.getSchoolList(_this.props.basicInfo);}};_this.setValue=function(basicInfo){if(basicInfo){_this.props.form.setFieldsValue({nickname:basicInfo.nickname,name:!basicInfo.show_realname?_this.hideRealName(basicInfo.name):basicInfo.name,sex:String(basicInfo.gender),job:basicInfo.identity,org:basicInfo.school_name,org2:basicInfo.department_name,city:[basicInfo.location,basicInfo.location_city]});setTimeout(function(){// 等显示后再set
_this.props.form.setFieldsValue({student_No:basicInfo.student_id,job1:basicInfo&&basicInfo.identity=="teacher"?basicInfo.technical_title:"教授",job2:basicInfo&&basicInfo.identity=="professional"?basicInfo.technical_title:"企业管理者"});},100);//if(basicInfo.nickname){
_this.setState({forDisable:true,nameLength:basicInfo.nickname?basicInfo.nickname.length:0,showRealName:basicInfo.show_realname,realName:basicInfo.name,identity:basicInfo.identity,school_id:basicInfo.school_id,department_id:basicInfo.department_id});//}
}};_this.getSchoolList=function(basicInfo,selectedName){var url='/schools/for_option.json';__WEBPACK_IMPORTED_MODULE_17_axios___default.a.get(url).then(function(result){if(result){_this.setState({schoolList:result.data.schools});if(selectedName){var school_id=void 0;result.data.schools.reverse().some(function(item){if(item.name==selectedName){school_id=item.id;return true;}});_this.props.form.setFieldsValue({org:selectedName});_this.setState({school_id:school_id,school:selectedName},function(){_this.filterList(selectedName);});}else if(basicInfo&&basicInfo.school_name){_this.setState({school:basicInfo.school_name,filterSchoolList:_this.state.schoolList.filter(function(item){return item.name.indexOf(basicInfo.school_name)>-1;})});_this.getDepartments(basicInfo.school_name,false);}}}).catch(function(error){console.log(error);});};_this.changeNickName=function(e){var num=MAX_NICKNAME_LENGTH-parseInt(e.target.value.length);_this.setState({nameLength:num<0?0:num});};_this.handleSubmit=function(){_this.props.form.validateFieldsAndScroll({force:true},function(err,values){console.log(values);var basicInfo=_this.props.basicInfo;if(!err){if(!_this.state.school_id){_this.props.showNotification('请先选择学校/单位');return;}if(!_this.state.department_id){_this.props.showNotification('请先选择院系/部门');return;}var url='/users/accounts/'+basicInfo.id+'.json';__WEBPACK_IMPORTED_MODULE_17_axios___default.a.put(url,{nickname:values.nickname,// 认证中的不能修改
name:basicInfo.authentication=='uncertified'?_this.state.showRealName?values.name:_this.state.realName:basicInfo.name,show_realname:_this.state.showRealName,gender:parseInt(values.sex),location:values.city[0],location_city:values.city[1],identity:_this.state.identity||(values.job=="teacher"?"teacher":values.job=="student"?"student":"professional"),technical_title:values.job1||values.job2,student_id:values.job=="student"?values.student_No:null,school_id:_this.state.school_id,department_id:_this.state.department_id}).then(function(result){if(result){_this.props.showNotification('保存成功');// 如果是第一次完善资料,重新拉头部接口更新
if(!_this.props.basicInfo.base_info_completed){_this.props.fetchUser();}_this.props.getBasicInfo();_this.props.history.push('/account/profile');}}).catch(function(error){console.log(error);});}});};_this.showOrHide=function(flag){var name=_this.props.form.getFieldsValue().name||_this.props.basicInfo.name;_this.setState({showRealName:flag==true?false:true});if(flag==true){// 隐藏真实姓名
_this.hideRealName(name);}else{// 显示
_this.props.form.setFieldsValue({name:_this.state.realName});}};_this.hideRealName=function(name){_this.setState({realName:name});var newName=getHiddenName(name);_this.props.form.setFieldsValue({name:newName});return newName;};_this.filterList=function(e){var inputVal=e.trim();var arr=[];if(inputVal){arr=_this.state.schoolList.filter(function(item){return item.name.indexOf(inputVal)>-1;});_this.props.form.setFieldsValue({org:inputVal});_this.setState({school:inputVal,filterSchoolList:arr});}else{_this.setState({school:''});}// else{
// let {school}=this.state;
// arr= this.state.schoolList.filter(function(item){
// return item.name.indexOf(school)>-1;
// });
// }
};_this.searchDepartment=function(e){if(e){_this.props.form.setFieldsValue({org2:e});var arr=_this.state.departments&&_this.state.departments.filter?_this.state.departments.filter(function(item){return item.name.indexOf(e)>-1;}):[];_this.setState({filterDepartments:arr,departmentsName:e});}else{_this.setState({filterDepartments:_this.state.departments});}};_this.changeDepartment=function(e){var arr=_this.state.departments&&_this.state.departments.filter?_this.state.departments.filter(function(item){return item.name==e;}):[];if(!arr[0]){_this.setState({department_id:'',departmentsName:e,filterDepartments:[]});_this.this_department_id='';return;}_this.this_department_id=arr[0].id;_this.setState({departmentsName:e,department_id:arr[0].id});};_this.changeList=function(e){_this.getDepartments(e.trim(),true);};_this.getDepartments=function(e,flag){var arr=_this.state.schoolList.filter(function(item){if(item.name.indexOf(e)>-1){return item.name;}});if(!arr[0]){if(!e){_this.setState({filterSchoolList:[]});}// 没找到学校,清空部门
_this.setState({departments:[],filterDepartments:[],departmentsName:'',school_id:'',department_id:''});_this.this_school_id='';_this.props.form.setFieldsValue({org2:''});return;}_this.props.form.setFieldsValue({org:arr[0].name});_this.filterList(e);// 保存选择的学校id
_this.this_school_id=arr[0].id;_this.setState({school_id:arr[0].id,school:e});_this._getDepartments(arr[0].id,flag);};_this._getDepartments=function(schoolId,flag,selectedName){var url='/schools/'+(schoolId||_this.state.school_id)+'/departments/for_option.json';__WEBPACK_IMPORTED_MODULE_17_axios___default.a.get(url).then(function(result){if(result){_this.setState({departments:result.data.departments,filterDepartments:result.data.departments});if(selectedName){var department_id=void 0;result.data.departments.reverse().some(function(item){if(item.name==selectedName){department_id=item.id;return true;}});_this.props.form.setFieldsValue({org2:selectedName});_this.setState({department_id:department_id// school: selectedName
});}else if(result.data.departments&&result.data.departments.length>0&&flag==true){// 切换学校后,部门默认选择第一个
_this.props.form.setFieldsValue({org2:result.data.departments[0].name});_this.setState({department_id:result.data.departments[0].id});}}}).catch(function(error){console.log(error);});};_this.addOrgSuccess=function(name){// const schoolList = this.state.schoolList.slice(0)
// schoolList.push({ id: schoolList.length + 2000, name: name})
// this.setState({ schoolList })
_this.getSchoolList(_this.props.basicInfo,name);_this.props.form.setFieldsValue({org:name});};_this.addChildOrgSuccess=function(deptName){_this._getDepartments(_this.state.school_id,false,deptName);};_this.showApplyForAddOrgModal=function(){_this.applyForAddOrgForm.setVisible(true);};_this.showApplyForAddChildOrgModal=function(){var _this$state=_this.state,school=_this$state.school,schoolList=_this$state.schoolList;var arr=schoolList.filter(function(item){return item.name==school;});if(arr.length>0){_this.applyForAddChildOrgForm.setVisible(true);}else{_this.props.showNotification("请先选择正确的单位或者学校!");}};_this.changeJob=function(e){_this.setState({identity:e});var basicInfo=_this.props.basicInfo;if(basicInfo){_this.props.form.setFieldsValue({job1:basicInfo&&basicInfo.identity=="teacher"?basicInfo.technical_title:"教授",job2:basicInfo&&basicInfo.identity=="professional"?basicInfo.technical_title:"企业管理者"});}};_this.state={nameLength:0,showRealName:true,schoolList:undefined,filterSchoolList:undefined,school:undefined,departments:undefined,filterDepartments:undefined,departmentsName:undefined,identity:"teacher",school_id:undefined,department_id:undefined};return _this;}// 获取学校、单位
// 输入昵称时change剩余的字数
// 隐藏或显示真实姓名
// 将名字隐藏起来
// 过滤学校
//搜索部门
// 选择部门、学院
// 选择学校(获取对应学校的学院、部门)
// checkNameLength = (rule, value, callback) => {
// if (value && value.length <= MAX_NAME_LENGTH) {
// callback();
// return;
// }
// callback(`请输入真实姓名,最大限制${MAX_NAME_LENGTH}个字符`);
// }
// 切换职称
_createClass(AccountBasic,[{key:'handleSubmitName',//昵称
value:function handleSubmitName(rule,value,callback){if(value){var iconRule1=/[`~!@#$%^&*()\-+=<>?:"{}|,.\/;'\\[\]·~@#¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、]/im;// 判断是否含有emoji表情
var iconRule2=/[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/ig;// 如果为true字符串含有emoji表情 false不含
var iconRule2s=iconRule2.test(value);// 如果为true字符串含有特殊符号 false不
var iconRule1s=iconRule1.test(value);if(iconRule2s===true||iconRule1s===true){callback('2-20位中英文、数字及下划线');}else if(value.length<2){callback('2-20位中英文、数字及下划线');}else if(value.length>=21){callback('2-20位中英文、数字及下划线');}}callback();}// 姓名
},{key:'handleSubmitNames',value:function handleSubmitNames(rule,value,callback){if(value){var iconRule1=/[`~!@#$%^&()_\-+=<>?:"{}|,.\/;'\\[\]·~@#¥%……&()——\-+={}|《》?:“”【】、;‘’,。、]/im;// 判断是否含有emoji表情
var iconRule2=/[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/ig;// 如果为true字符串含有emoji表情 false不含
var iconRule2s=iconRule2.test(value);// 如果为true字符串含有特殊符号 false不
var iconRule1s=iconRule1.test(value);if(iconRule2s===true||iconRule1s===true){callback('2-10位中英文、数字');}else if(value.length<2){callback('2-10位中英文、数字');}else if(value.length>=11){callback('2-10位中英文、数字');}}callback();}},{key:'render',value:function render(){var _this2=this;var _state=this.state,nameLength=_state.nameLength,showRealName=_state.showRealName,filterSchoolList=_state.filterSchoolList,filterDepartments=_state.filterDepartments,school=_state.school,school_id=_state.school_id,departments=_state.departments,departmentsName=_state.departmentsName,identity=_state.identity;var getFieldDecorator=this.props.form.getFieldDecorator;var basicInfo=this.props.basicInfo;var common={changeJob:this.changeJob,filterList:this.filterList,changeList:this.changeList,searchDepartment:this.searchDepartment,changeDepartment:this.changeDepartment,showApplyForAddOrgModal:this.showApplyForAddOrgModal,showApplyForAddChildOrgModal:this.showApplyForAddChildOrgModal// 已职业认证的账户不能修改职业,学校/单位,院系/部门true为disable
};var professionalFlag=basicInfo&&basicInfo.professional_certification=="certified";// form合并了
var propsWithoutForm=Object.assign({},this.props);delete propsWithoutForm.form;return __WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement('div',null,__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_14__modal_ApplyForAddOrgModal__["a" /* default */],Object.assign({ref:'applyForAddOrgModal',wrappedComponentRef:function wrappedComponentRef(form){return _this2.applyForAddOrgForm=form;},schoolName:school},propsWithoutForm,{addOrgSuccess:this.addOrgSuccess})),__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_15__modal_ApplyForAddChildOrgModal__["a" /* default */],Object.assign({ref:'applyForAddChildOrgModal',schoolName:school,schoolId:school_id,departmentName:departmentsName},propsWithoutForm,{wrappedComponentRef:function wrappedComponentRef(form){return _this2.applyForAddChildOrgForm=form;},addChildOrgSuccess:this.addChildOrgSuccess})),__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement('div',{className:'basicForm courseNormalForm'},__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement('style',null,'\n .formItemInline { \n display: flex;\n margin-bottom: 10px;\n position:relative;\n }\n .formItemInline .ant-form-explain{\n /* position:absolute;*/\n bottom:-20px;\n left:0px;\n width:100%;\n }\n .formItemInline .ant-form-item-control-wrapper {\n display: inline-block;\n }\n .resetSexStyle .ant-form-item-label,.resetSexStyle .ant-form-item-control-wrapper .ant-form-item-control{\n height:25px;\n line-height:25px;\n }\n .basicForm .title {\n font-size: 16px;\n padding-left: 30px;\n margin-bottom: 10px;\n }\n .basicForm input, .basicForm .ant-input-affix-wrapper, .basicForm .ant-select {\n width: 400px;\n font-size: 14px;\n }\n .basicForm .saveBtn {\n width: 100px;\n margin-left: 100px;\n }\n .basicForm .cancelBtn {\n margin-left: 0px;\n }\n\n .basicForm .ant-form-item-label {\n width: 100px;\n padding-right: 10px;\n }\n .basicForm .ant-form-item-label label {\n color: #979797\n }\n .basicForm .ant-cascader-picker-label{\n font-size:14px;\n }\n .resetCityStyle .ant-form-item-control{\n width:220px;\n }\n .basicForm .ant-input-suffix {\n line-height: 2.8;\n background: transparent !important;\n }\n '),__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement('div',{className:'title'},'\u57FA\u672C\u4FE1\u606F'),__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement('style',null,'\n .exercicenewinputysl .ant-input{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tborder-right: none !important;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\theight: 40px !important;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n \n '),__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_antd_lib_form___default.a,{onSubmit:this.handleSubmit},__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_antd_lib_form___default.a.Item,{label:'\u6635\u79F0',className:'mt15 formItemInline'},getFieldDecorator('nickname',{rules:[{// initialValue: this.state.cityDefaultValue,
required:true,message:'请输入您的昵称'},{validator:this.handleSubmitName}],validateTrigger:'onSubmit'// 设置进行表单验证的时机为onSubmit
})(__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_antd_lib_input___default.a,{placeholder:'\u8BF7\u8F93\u5165\u60A8\u7684\u6635\u79F0\uFF0C\u6700\u5927\u9650\u5236'+MAX_NICKNAME_LENGTH+'\u4E2A\u5B57\u7B26',className:'exercicenewinputysl',onInput:this.changeNickName,maxLength:MAX_NICKNAME_LENGTH,addonAfter:__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement('span',{className:'color-grey-6 font-13'},String(nameLength),'/',MAX_NICKNAME_LENGTH)}))),__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement('style',null,'\n .yslgraduainputedit .ant-input{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tborder-right: none !important;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\theight: 40px !important;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n \n '),__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_antd_lib_form___default.a.Item,{label:'\u59D3\u540D',className:'formItemInline'},basicInfo.authentication=='uncertified'?__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_12_react___default.a.Fragment,null,getFieldDecorator('name',{rules:[{// initialValue: this.state.cityDefaultValue,
required:true,message:'\u8BF7\u8F93\u5165\u771F\u5B9E\u59D3\u540D\uFF0C\u6700\u5927\u9650\u5236'+MAX_NAME_LENGTH+'\u4E2A\u5B57\u7B26'},{validator:this.handleSubmitNames}],validateTrigger:'onSubmit'// 设置进行表单验证的时机为onSubmit
})(__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_antd_lib_input___default.a,{placeholder:'\u8BF7\u8F93\u5165\u771F\u5B9E\u59D3\u540D\uFF0C\u6700\u5927\u9650\u5236'+MAX_NAME_LENGTH+'\u4E2A\u5B57\u7B26',className:'yslgraduainputedit',disabled:!showRealName&&this.state.forDisable==true,addonAfter:__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement('i',{className:showRealName?"iconfont icon-xianshi font-18 color-blue":"iconfont icon-yincang font-18 color-blue",onClick:function onClick(){return _this2.showOrHide(showRealName);}})})),__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement('span',null,showRealName?'(显示:平台将显示您的真实姓名)':'(隐藏:平台将显示你的昵称)')):__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement('div',{className:'df',style:{}},__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_tooltip___default.a,{title:'\u5DF2\u5B8C\u6210\u5B9E\u540D\u8BA4\u8BC1\uFF0C\u4E0D\u80FD\u4FEE\u6539'},__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement('span',{className:'mr8'},showRealName?this.props.basicInfo.name:getHiddenName(this.props.basicInfo.name))),__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement('i',{className:showRealName?"iconfont icon-xianshi font-18 color-blue":"iconfont icon-yincang font-18 color-blue",onClick:function onClick(){return _this2.showOrHide(showRealName);}}),__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement('span',null,showRealName?'(显示:平台将显示您的真实姓名)':'(隐藏:平台将显示你的昵称)'))),__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_antd_lib_form___default.a.Item,{label:'\u6027\u522B',className:'formItemInline resetSexStyle'},getFieldDecorator('sex',{rules:[{required:true,message:'请选择性别'}]})(__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement(RadioGroup,null,__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_13_educoder__["g" /* ConditionToolTip */],{title:'\u5DF2\u5B8C\u6210\u5B9E\u540D\u8BA4\u8BC1\uFF0C\u4E0D\u80FD\u4FEE\u6539',condition:basicInfo.authentication!='uncertified'},__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11_antd_lib_radio___default.a,{value:'0',disabled:basicInfo.authentication!='uncertified'},'\u7537'),__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11_antd_lib_radio___default.a,{value:'1',disabled:basicInfo.authentication!='uncertified'},'\u5973'))))),__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_antd_lib_form___default.a.Item,{label:'\u6240\u5728\u5730',className:'formItemInline resetCityStyle'},getFieldDecorator('city',{rules:[{type:'array',required:true,message:'请先选择所在地'}]})(__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_13_educoder__["e" /* City */],null))),__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_16__AccountBasicEditItem__["a" /* default */],Object.assign({identity:identity,getFieldDecorator:getFieldDecorator,professionalFlag:professionalFlag,basicInfo:basicInfo},this.props,this.state,common,{form:this.props.form,filterSchoolList:filterSchoolList,filterDepartments:filterDepartments,departmentsName:departmentsName,school:school,department_id:this.state.department_id,departments:departments})),__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_antd_lib_button___default.a,{type:'primary',onClick:this.handleSubmit,size:'middle',className:'saveBtn mr20 mt30'},"保存"),this.props.basicInfo.base_info_completed&&__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_antd_lib_button___default.a,{type:'',onClick:function onClick(){_this2.props.history.push('/account/profile');},size:'middle',className:'saveBtn cancelBtn mr20 mt30'},"取消"))),__WEBPACK_IMPORTED_MODULE_
/***/ }),
/***/ 2392:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
__webpack_require__(28);
__webpack_require__(2517);
//# sourceMappingURL=css.js.map
/***/ }),
/***/ 2393:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _layout = _interopRequireDefault(__webpack_require__(997));
var _Sider = _interopRequireDefault(__webpack_require__(908));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
_layout["default"].Sider = _Sider["default"];
var _default = _layout["default"];
exports["default"] = _default;
//# sourceMappingURL=index.js.map
/***/ }),
/***/ 2510:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_form_style_css__ = __webpack_require__(953);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_form_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_antd_lib_form_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_form__ = __webpack_require__(954);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_form___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_antd_lib_form__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_input_style_css__ = __webpack_require__(68);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_input_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_antd_lib_input_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_input__ = __webpack_require__(69);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_input___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_antd_lib_input__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_axios__ = __webpack_require__(15);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_axios___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_axios__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__courses_common_ModalWrapper__ = __webpack_require__(333);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_educoder__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__account_common_css__ = __webpack_require__(1564);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__account_common_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8__account_common_css__);
var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();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;}var TextArea=__WEBPACK_IMPORTED_MODULE_3_antd_lib_input___default.a.TextArea;var ApplyForAddChildOrgModal=function(_Component){_inherits(ApplyForAddChildOrgModal,_Component);function ApplyForAddChildOrgModal(props){_classCallCheck(this,ApplyForAddChildOrgModal);var _this=_possibleConstructorReturn(this,(ApplyForAddChildOrgModal.__proto__||Object.getPrototypeOf(ApplyForAddChildOrgModal)).call(this,props));_this.componentDidUpdate=function(prevState){if(prevState.departmentName!=_this.props.departmentName){_this.setValue(_this.props.departmentName);}};_this.componentDidMount=function(){if(_this.props.departmentName){_this.setValue(_this.props.departmentName);}};_this.setValue=function(name){_this.props.form.setFieldsValue({depart:name});};_this.setVisible=function(visible){_this.refs.modalWrapper.setVisible(visible);};_this.onSendOk=function(){_this.props.form.validateFieldsAndScroll(function(err,values){console.log(values);if(!err){var _this$props=_this.props,schoolId=_this$props.schoolId,departmentName=_this$props.departmentName;var url="/add_department_applies.json";__WEBPACK_IMPORTED_MODULE_5_axios___default.a.post(url,{name:values.depart,school_id:schoolId,remarks:values.desc}).then(function(result){if(result){_this.props.showNotification("新增院系/部门成功!");_this.props.addChildOrgSuccess(values.depart);_this.setVisible(false);}}).catch(function(error){console.log(error);});}});};_this.onOk=function(){var _this$state=_this.state,course_lists=_this$state.course_lists,checkBoxValues=_this$state.checkBoxValues;_this.onSendOk();};_this.state={};return _this;}_createClass(ApplyForAddChildOrgModal,[{key:"render",value:function render(){var _state=this.state,course_lists=_state.course_lists,checkBoxValues=_state.checkBoxValues,searchValue=_state.searchValue,loading=_state.loading,hasMore=_state.hasMore;var moduleName=this.props.moduleName;var getFieldDecorator=this.props.form.getFieldDecorator;return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__courses_common_ModalWrapper__["a" /* default */],Object.assign({ref:"modalWrapper",title:"\u7533\u8BF7\u6DFB\u52A0\u5B50\u5355\u4F4D\u540D\u79F0"},this.props,{onOk:this.onOk,okText:"\u4FDD\u5B58",className:"applyForModal courseNormalForm styleForapply"}),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("style",null,"\n .applyForModal .ant-form-item-label {\n width: 100px;\n padding-right: 10px;\n }\n .applyForModal .ant-form-item-label label {\n color: #979797\n }\n .styleForapply .formItemInline .ant-form-item-control-wrapper {\n width: 390px;\n }\n "),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WE
required:true,message:'请输入部门名称'}]})(__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_input___default.a,{placeholder:"\u8BF7\u8F93\u5165\u90E8\u95E8\u6216\u8005\u5B66\u9662\u540D\u79F0"}))),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_antd_lib_form___default.a.Item,{label:"\u8BF4\u660E\uFF1A",className:"mt15 formItemInline hideRequireTag"},getFieldDecorator('desc',{})(__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(TextArea,{placeholder:"\u518D\u6B21\u8BF4\u660E\u7279\u522B\u60C5\u51B5\uFF08\u9009\u586B\uFF09",className:"validateInput"})))));}}]);return ApplyForAddChildOrgModal;}(__WEBPACK_IMPORTED_MODULE_4_react__["Component"]);var WrappedApplyForAddChildOrgModal=__WEBPACK_IMPORTED_MODULE_1_antd_lib_form___default.a.create({name:'ApplyForAddChildOrgModal'})(ApplyForAddChildOrgModal);/* harmony default export */ __webpack_exports__["a"] = (WrappedApplyForAddChildOrgModal);
/***/ }),
/***/ 2511:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_auto_complete_style_css__ = __webpack_require__(1491);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_auto_complete_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_antd_lib_auto_complete_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_auto_complete__ = __webpack_require__(1492);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_auto_complete___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_antd_lib_auto_complete__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_input_style_css__ = __webpack_require__(68);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_input_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_antd_lib_input_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_input__ = __webpack_require__(69);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_input___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_antd_lib_input__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_antd_lib_form_style_css__ = __webpack_require__(953);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_antd_lib_form_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_antd_lib_form_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_antd_lib_form__ = __webpack_require__(954);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_antd_lib_form___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_antd_lib_form__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_antd_lib_select_style_css__ = __webpack_require__(318);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_antd_lib_select_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_antd_lib_select_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_antd_lib_select__ = __webpack_require__(315);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_antd_lib_select___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_antd_lib_select__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_antd_lib_radio_style_css__ = __webpack_require__(177);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_antd_lib_radio_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_antd_lib_radio_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_antd_lib_radio__ = __webpack_require__(175);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_antd_lib_radio___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_antd_lib_radio__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_educoder__ = __webpack_require__(5);
var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();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;}var RadioGroup=__WEBPACK_IMPORTED_MODULE_9_antd_lib_radio___default.a.Group;var Option=__WEBPACK_IMPORTED_MODULE_7_antd_lib_select___default.a.Option;var AccountBasicEditItem=function(_Component){_inherits(AccountBasicEditItem,_Component);function AccountBasicEditItem(props){_classCallCheck(this,AccountBasicEditItem);return _possibleConstructorReturn(this,(AccountBasicEditItem.__proto__||Object.getPrototypeOf(AccountBasicEditItem)).call(this,props));}_createClass(AccountBasicEditItem,[{key:'render',value:function render(){var _this2=this;var _props=this.props,professionalFlag=_props.professionalFlag,getFieldDecorator=_props.getFieldDecorator,identity=_props.identity,filterSchoolList=_props.filterSchoolList,filterDepartments=_props.filterDepartments,departmentsName=_props.departmentsName,school=_props.school,departments=_props.departments,department_id=_props.department_id;return __WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('div',null,__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('div',{className:'clearfix mt10'},__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_antd_lib_form___default.a.Item,{label:'\u804C\u4E1A',className:'formItemInline fl'},__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11_educoder__["g" /* ConditionToolTip */],{title:function title(){return __WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('div',null,__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('p',null,'\u5DF2\u63D0\u4EA4\u804C\u4E1A\u8BA4\u8BC1'),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('p',null,'\u53EF\u5728',__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('a',{href:'/account/certification',className:'color-blue'},'\u8BA4\u8BC1\u4FE1\u606F'),'\u4E2D\u901A\u8FC7\u201C\u91CD\u65B0\u8BA4\u8BC1\u201D\u8FDB\u884C\u4FEE\u6539'));},condition:professionalFlag},getFieldDecorator('job',{rules:[{initialValue:"teacher",required:true,message:'请先选择职业'}]})(__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_antd_lib_select___default.a,{style:{width:"190px",marginRight:"20px"},onChange:function onChange(e){return _this2.props.changeJob(e);},disabled:professionalFlag},__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(Option,{value:'teacher'},'\u6559\u5E08'),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(Option,{value:'student'},'\u5B66\u751F'),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(Option,{value:'professional'},'\u4E13\u4E1A\u4EBA\u58EB'))))),identity&&identity=="student"&&__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_antd_lib_form___default.a.Item,{label:'',cla
},__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11_educoder__["g" /* ConditionToolTip */],{title:function title(){return __WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('div',null,__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('p',null,'\u5DF2\u63D0\u4EA4\u804C\u4E1A\u8BA4\u8BC1'),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('p',null,'\u53EF\u5728',__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('a',{href:'/account/certification',className:'color-blue'},'\u8BA4\u8BC1\u4FE1\u606F'),'\u4E2D\u901A\u8FC7\u201C\u91CD\u65B0\u8BA4\u8BC1\u201D\u8FDB\u884C\u4FEE\u6539'));},condition:professionalFlag},getFieldDecorator('student_No',{rules:[{required:true,message:'请先输入学号'}]})(__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_input___default.a,{type:'text',placeholder:'\u8BF7\u8F93\u5165\u5B66\u53F7',style:{width:"190px"},disabled:professionalFlag})))),identity&&identity=="teacher"&&__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_antd_lib_form___default.a.Item,{label:'',className:'formItemInline fl'// style={{display:identity && identity=="teacher" ? "block":"none"}}
},__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11_educoder__["g" /* ConditionToolTip */],{title:function title(){return __WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('div',null,__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('p',null,'\u5DF2\u63D0\u4EA4\u804C\u4E1A\u8BA4\u8BC1'),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('p',null,'\u53EF\u5728',__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('a',{href:'/account/certification',className:'color-blue'},'\u8BA4\u8BC1\u4FE1\u606F'),'\u4E2D\u901A\u8FC7\u201C\u91CD\u65B0\u8BA4\u8BC1\u201D\u8FDB\u884C\u4FEE\u6539'));},condition:professionalFlag},getFieldDecorator('job1',{rules:[{initialValue:"教授",required:true,message:'请先选择职称'}]})(__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_antd_lib_select___default.a,{style:{width:"190px"},disabled:professionalFlag},__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(Option,{value:'\u6559\u6388'},'\u6559\u6388'),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(Option,{value:'\u526F\u6559\u6388'},'\u526F\u6559\u6388'),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(Option,{value:'\u8BB2\u5E08'},'\u8BB2\u5E08'),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(Option,{value:'\u52A9\u6559'},'\u52A9\u6559'))))),identity&&identity=="professional"&&__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_antd_lib_form___default.a.Item,{label:'',className:'formItemInline fl mb0'// style={{display:identity && identity=="professional" ? "block":"none"}}
},__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11_educoder__["g" /* ConditionToolTip */],{title:function title(){return __WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('div',null,__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('p',null,'\u5DF2\u63D0\u4EA4\u804C\u4E1A\u8BA4\u8BC1'),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('p',null,'\u53EF\u5728',__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('a',{href:'/account/certification',className:'color-blue'},'\u8BA4\u8BC1\u4FE1\u606F'),'\u4E2D\u901A\u8FC7\u201C\u91CD\u65B0\u8BA4\u8BC1\u201D\u8FDB\u884C\u4FEE\u6539'));},condition:professionalFlag},getFieldDecorator('job2',{rules:[{initialValue:"企业管理者",required:true,message:'请先选择职称'}]})(__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_antd_lib_select___default.a,{style:{width:"190px"},disabled:professionalFlag},__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(Option,{value:'\u4F01\u4E1A\u7BA1\u7406\u8005'},'\u4F01\u4E1A\u7BA1\u7406\u8005'),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(Option,{value:'\u90E8\u95E8\u7BA1\u7406\u8005'},'\u90E8\u95E8\u7BA1\u7406\u8005'),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(Option,{value:'\u9AD8\u7EA7\u5DE5\u7A0B\u5E08'},'\u9AD8\u7EA7\u5DE5\u7A0B\u5E08'),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(Option,{value:'\u5DE5\u7A0B\u5E08'},'\u5DE5\u7A0B\u5E08'),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(Option,{value:'\u52A9\u7406\u5DE5\u7A0B\u5E08'},'\u52A9\u7406\u5DE5\u7A0B\u5E08')))))),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_antd_lib_form___default.a.Item,{label:'\u5B66\u6821/\u5355\u4F4D',className:'formItemInline mb0'},__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11_educoder__["g" /* ConditionToolTip */],{title:function title(){return __WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('div',null,__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('p',null,'\u5DF2\u63D0\u4EA4\u804C\u4E1A\u8BA4\u8BC1'),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('p',null,'\u53EF\u5728',__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('a',{href:'/account/certification',className:'color-blue'},'\u8BA4\u8BC1\u4FE1\u606F'),'\u4E2D\u901A\u8FC7\u201C\u91CD\u65B0\u8BA4\u8BC1\u201D\u8FDB\u884C\u4FEE\u6539'));},condition:professionalFlag},getFieldDecorator('org',{rules:[{// initialValue: this.state.cityDefaultValue,
// type: 'array',
required:true,message:'请先选择学校/单位'// 做不了输入时和submit时都会执行这里
// validator: (rule, value, callback) => {
// if (this.this_school_id) {
// callback();
// return;
// }
// callback('请先选择学校/单位');
// }
}]})(__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_antd_lib_auto_complete___default.a,{width:400,showSearch:true,onSearch:this.props.filterList,onChange:this.props.changeList,disabled:professionalFlag},filterSchoolList&&filterSchoolList.map(function(item,key){return __WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(Option,{value:item.name,key:item.id},item.name);}))))),!filterSchoolList||filterSchoolList&&filterSchoolList.length==0&&school&&__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('div',{style:{marginLeft:'113px',height:"20px",lineHeight:"20px"}},__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('span',null,__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('span',{style:{color:'#CDCDCD'}},'\u672A\u627E\u5230\u5305\u542B\u201C',school,'\u201D\u7684\u9AD8\u6821\uFF0C'),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('span',{style:{color:'#4CACFF',cursor:'pointer'},onClick:this.props.showApplyForAddOrgModal},'\u7533\u8BF7\u65B0\u589E'))),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_antd_lib_form___default.a.Item,{label:'\u9662\u7CFB/\u90E8\u95E8',className:'formItemInline mb0',style:{'margin-top':'10px'}},__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11_educoder__["g" /* ConditionToolTip */],{title:function title(){return __WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('div',null,__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('p',null,'\u5DF2\u63D0\u4EA4\u804C\u4E1A\u8BA4\u8BC1'),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('p',null,'\u53EF\u5728',__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('a',{href:'/account/certification',className:'color-blue'},'\u8BA4\u8BC1\u4FE1\u606F'),'\u4E2D\u901A\u8FC7\u201C\u91CD\u65B0\u8BA4\u8BC1\u201D\u8FDB\u884C\u4FEE\u6539'));},condition:professionalFlag},getFieldDecorator('org2',{rules:[{// initialValue: this.state.cityDefaultValue,
// type: 'array',
required:true,message:'请先选择院系/部门'// validator: (rule, value, callback) => {
// if (this.this_department_id) {
// callback();
// return;
// }
// callback('请先选择院系/部门');
// }
}]})(__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_antd_lib_auto_complete___default.a,{width:400,showSearch:true,onSearch:this.props.searchDepartment,onChange:this.props.changeDepartment,disabled:professionalFlag},filterDepartments&&filterDepartments.map(function(item,key){return __WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(Option,{value:item.name,key:item.name},item.name);}))))),filterDepartments!=undefined&&(filterDepartments&&filterDepartments.length==0||departmentsName==''&&!department_id&&(!departments||departments.length==0))&&__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('div',{style:{marginLeft:'113px',height:"20px",lineHeight:"20px"}},__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('span',null,__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('span',{style:{color:'#CDCDCD'}},departmentsName?'\u672A\u627E\u5230\u5305\u542B\u201C'+departmentsName+'\u201D\u7684\u9662\u7CFB/\u90E8\u95E8':'未找到院系','\uFF0C'),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement('span',{style:{color:'#4CACFF',cursor:'pointer'},onClick:this.props.showApplyForAddChildOrgModal},'\u7533\u8BF7\u65B0\u589E'))));}}]);return AccountBasicEditItem;}(__WEBPACK_IMPORTED_MODULE_10_react__["Component"]);/* harmony default export */ __webpack_exports__["a"] = (AccountBasicEditItem);
/***/ }),
/***/ 2517:
/***/ (function(module, exports, __webpack_require__) {
// style-loader: Adds some css to the DOM by adding a <style> tag
// load the styles
var content = __webpack_require__(2518);
if(typeof content === 'string') content = [[module.i, content, '']];
// Prepare cssTransformation
var transform;
var options = {"hmr":false}
options.transform = transform
// add the styles to the DOM
var update = __webpack_require__(313)(content, options);
if(content.locals) module.exports = content.locals;
/***/ }),
/***/ 2518:
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(312)(true);
// imports
// module
exports.push([module.i, ".ant-layout{display:-ms-flexbox;display:flex;-ms-flex:auto;flex:auto;-ms-flex-direction:column;flex-direction:column;min-height:0;background:#f0f2f5}.ant-layout,.ant-layout *{-webkit-box-sizing:border-box;box-sizing:border-box}.ant-layout.ant-layout-has-sider{-ms-flex-direction:row;flex-direction:row}.ant-layout.ant-layout-has-sider>.ant-layout,.ant-layout.ant-layout-has-sider>.ant-layout-content{overflow-x:hidden}.ant-layout-footer,.ant-layout-header{-ms-flex:0 0 auto;flex:0 0 auto}.ant-layout-header{height:64px;padding:0 50px;line-height:64px;background:#001529}.ant-layout-footer{padding:24px 50px;color:rgba(0,0,0,.65);font-size:14px;background:#f0f2f5}.ant-layout-content{-ms-flex:auto;flex:auto;min-height:0}.ant-layout-sider{position:relative;min-width:0;background:#001529;-webkit-transition:all .2s;-o-transition:all .2s;transition:all .2s}.ant-layout-sider-children{height:100%;margin-top:-.1px;padding-top:.1px}.ant-layout-sider-has-trigger{padding-bottom:48px}.ant-layout-sider-right{-ms-flex-order:1;order:1}.ant-layout-sider-trigger{position:fixed;bottom:0;z-index:1;height:48px;color:#fff;line-height:48px;text-align:center;background:#002140;cursor:pointer;-webkit-transition:all .2s;-o-transition:all .2s;transition:all .2s}.ant-layout-sider-zero-width>*{overflow:hidden}.ant-layout-sider-zero-width-trigger{position:absolute;top:64px;right:-36px;z-index:1;width:36px;height:42px;color:#fff;font-size:18px;line-height:42px;text-align:center;background:#001529;border-radius:0 4px 4px 0;cursor:pointer;-webkit-transition:background .3s ease;-o-transition:background .3s ease;transition:background .3s ease}.ant-layout-sider-zero-width-trigger:hover{background:#192c3e}.ant-layout-sider-zero-width-trigger-right{left:-36px;border-radius:4px 0 0 4px}.ant-layout-sider-light{background:#fff}.ant-layout-sider-light .ant-layout-sider-trigger,.ant-layout-sider-light .ant-layout-sider-zero-width-trigger{color:rgba(0,0,0,.65);background:#fff}", "", {"version":3,"sources":["/Users/hs/edu/educoder/public/react/node_modules/antd/lib/layout/style/index.css"],"names":[],"mappings":"AAIA,YACE,oBAAqB,AACrB,aAAc,AACd,cAAe,AACX,UAAW,AACf,0BAA2B,AAC3B,sBAAuB,AAEvB,aAAc,AACd,kBAAoB,CACrB,AACD,0BAEE,8BAA+B,AACvB,qBAAuB,CAChC,AACD,iCACE,uBAAwB,AACxB,kBAAoB,CACrB,AACD,kGAEE,iBAAmB,CACpB,AACD,sCAEE,kBAAmB,AACf,aAAe,CACpB,AACD,mBACE,YAAa,AACb,eAAgB,AAChB,iBAAkB,AAClB,kBAAoB,CACrB,AACD,mBACE,kBAAmB,AACnB,sBAA2B,AAC3B,eAAgB,AAChB,kBAAoB,CACrB,AACD,oBACE,cAAe,AACX,UAAW,AAEf,YAAc,CACf,AACD,kBACE,kBAAmB,AAEnB,YAAa,AACb,mBAAoB,AACpB,2BAA6B,AAC7B,sBAAwB,AACxB,kBAAqB,CACtB,AACD,2BACE,YAAa,AACb,iBAAmB,AACnB,gBAAmB,CACpB,AACD,8BACE,mBAAqB,CACtB,AACD,wBACE,iBAAkB,AACd,OAAS,CACd,AACD,0BACE,eAAgB,AAChB,SAAU,AACV,UAAW,AACX,YAAa,AACb,WAAY,AACZ,iBAAkB,AAClB,kBAAmB,AACnB,mBAAoB,AACpB,eAAgB,AAChB,2BAA6B,AAC7B,sBAAwB,AACxB,kBAAqB,CACtB,AACD,+BACE,eAAiB,CAClB,AACD,qCACE,kBAAmB,AACnB,SAAU,AACV,YAAa,AACb,UAAW,AACX,WAAY,AACZ,YAAa,AACb,WAAY,AACZ,eAAgB,AAChB,iBAAkB,AAClB,kBAAmB,AACnB,mBAAoB,AACpB,0BAA2B,AAC3B,eAAgB,AAChB,uCAAyC,AACzC,kCAAoC,AACpC,8BAAiC,CAClC,AACD,2CACE,kBAAoB,CACrB,AACD,2CACE,WAAY,AACZ,yBAA2B,CAC5B,AACD,wBACE,eAAiB,CAClB,AAKD,+GAHE,sBAA2B,AAC3B,eAAiB,CAKlB","file":"index.css","sourcesContent":["/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */\n/* stylelint-disable no-duplicate-selectors */\n/* stylelint-disable */\n/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */\n.ant-layout {\n display: -ms-flexbox;\n display: flex;\n -ms-flex: auto;\n flex: auto;\n -ms-flex-direction: column;\n flex-direction: column;\n /* fix firefox can't set height smaller than content on flex item */\n min-height: 0;\n background: #f0f2f5;\n}\n.ant-layout,\n.ant-layout * {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n.ant-layout.ant-layout-has-sider {\n -ms-flex-direction: row;\n flex-direction: row;\n}\n.ant-layout.ant-layout-has-sider > .ant-layout,\n.ant-layout.ant-layout-has-sider > .ant-layout-content {\n overflow-x: hidde
// exports
/***/ }),
/***/ 3118:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "identityMap", function() { return identityMap; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_form_style_css__ = __webpack_require__(953);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_form_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_antd_lib_form_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_form__ = __webpack_require__(954);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_form___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_antd_lib_form__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_button_style_css__ = __webpack_require__(87);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_button_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_antd_lib_button_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_button__ = __webpack_require__(74);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_button___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_antd_lib_button__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_antd_lib_select_style_css__ = __webpack_require__(318);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_antd_lib_select_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_antd_lib_select_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_antd_lib_select__ = __webpack_require__(315);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_antd_lib_select___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_antd_lib_select__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_antd_lib_radio_style_css__ = __webpack_require__(177);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_antd_lib_radio_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_antd_lib_radio_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_antd_lib_radio__ = __webpack_require__(175);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_antd_lib_radio___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_antd_lib_radio__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_educoder__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__common_css__ = __webpack_require__(1564);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__common_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10__common_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__AccountBasicEdit__ = __webpack_require__(2386);
var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();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;}var RadioGroup=__WEBPACK_IMPORTED_MODULE_7_antd_lib_radio___default.a.Group;var Option=__WEBPACK_IMPORTED_MODULE_5_antd_lib_select___default.a.Option;var radioOptions=[{label:'男',value:'boy'},{label:'女',value:'girl'}];var identityMap={"teacher":"教师","student":"学生","professional":"专业人士"};var AccountBasicEdit=function(_Component){_inherits(AccountBasicEdit,_Component);function AccountBasicEdit(props){_classCallCheck(this,AccountBasicEdit);return _possibleConstructorReturn(this,(AccountBasicEdit.__proto__||Object.getPrototypeOf(AccountBasicEdit)).call(this,props));}_createClass(AccountBasicEdit,[{key:'render',value:function render(){var _this2=this;var getFieldDecorator=this.props.form.getFieldDecorator;var basicInfo=this.props.basicInfo;var showRealName=false;return __WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement('div',null,__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement('div',{className:'basicForm'},__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement('style',null,'\n .formItemInline { \n display: flex;\n }\n .formItemInline .ant-form-item-control-wrapper {\n display: inline-block;\n }\n .basicForm .title {\n font-size: 16px;\n padding-left: 30px;\n margin-bottom: 10px;\n }\n .basicForm .ant-form-item-label {\n width: 100px;\n padding-right: 10px;\n }\n .basicForm .ant-form-item-label label {\n color: #979797\n }\n .basicForm .display {\n margin: 0\n }\n .titleWrap {\n display: flex;\n justify-content: space-between;\n }\n '),__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement('div',{className:'titleWrap'},__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement('div',{className:'title'},'\u57FA\u672C\u4FE1\u606F'),__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_button___default.a,{type:'primary',style:{marginRight:'16px'},ghost:true,onClick:function onClick(){return _this2.props.history.push('/account/profile/edit');}},'\u4FEE\u6539')),__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_antd_lib_form___default.a,{onSubmit:this.handleSubmit},__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_antd_lib_form___default.a.Item,{label:'\u6635\u79F0',className:'display formItemInline'},basicInfo&&basicInfo.nickname),__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_antd_lib_form___default.a.It
/***/ }),
/***/ 3119:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony export getHiddenName */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_form_style_css__ = __webpack_require__(953);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_form_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_antd_lib_form_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_form__ = __webpack_require__(954);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_form___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_antd_lib_form__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_input_style_css__ = __webpack_require__(68);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_input_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_antd_lib_input_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_input__ = __webpack_require__(69);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_input___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_antd_lib_input__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_antd_lib_message_style_css__ = __webpack_require__(184);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_antd_lib_message_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_antd_lib_message_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_antd_lib_message__ = __webpack_require__(185);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_antd_lib_message___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_antd_lib_message__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_antd_lib_upload_style_css__ = __webpack_require__(1118);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_antd_lib_upload_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_antd_lib_upload_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_antd_lib_upload__ = __webpack_require__(1119);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_antd_lib_upload___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_antd_lib_upload__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_antd_lib_radio_style_css__ = __webpack_require__(177);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_antd_lib_radio_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_antd_lib_radio_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_antd_lib_radio__ = __webpack_require__(175);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_antd_lib_radio___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_antd_lib_radio__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_axios__ = __webpack_require__(15);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_axios___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_axios__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__courses_common_ModalWrapper__ = __webpack_require__(333);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13_educoder__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__account_common_css__ = __webpack_require__(1564);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__account_common_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_14__account_common_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__account_AccountBasicEditItem__ = __webpack_require__(2511);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__ApplyForAddOrgModal__ = __webpack_require__(1776);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__ApplyForAddChildOrgModal__ = __webpack_require__(2510);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__images_account_auth_png__ = __webpack_require__(3310);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__images_account_auth_png___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_18__images_account_auth_png__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__images_account_job_png__ = __webpack_require__(3311);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__images_account_job_png___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_19__images_account_job_png__);
var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}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;}var RadioGroup=__WEBPACK_IMPORTED_MODULE_9_antd_lib_radio___default.a.Group;var Dragger=__WEBPACK_IMPORTED_MODULE_7_antd_lib_upload___default.a.Dragger;var MAX_NAME_LENGTH=10;function getBase64(img,callback){var reader=new FileReader();reader.addEventListener('load',function(){return callback(reader.result);});reader.readAsDataURL(img);}function beforeUpload(file){var isJPG=file.type==='image/jpeg';if(!isJPG){__WEBPACK_IMPORTED_MODULE_5_antd_lib_message___default.a.error('You can only upload JPG file!');}var isLt2M=file.size/1024/1024<2;if(!isLt2M){__WEBPACK_IMPORTED_MODULE_5_antd_lib_message___default.a.error('Image must smaller than 2MB!');}return isJPG&&isLt2M;}function getHiddenName(name){if(!name)return'';var len=parseInt(name.length)-1;var str="";for(var i=0;i<len;i++){str+="*";}var newName=name.substr(0,1)+str;return newName;}var RealNameCertificationModal=function(_Component){_inherits(RealNameCertificationModal,_Component);function RealNameCertificationModal(props){_classCallCheck(this,RealNameCertificationModal);var _this=_possibleConstructorReturn(this,(RealNameCertificationModal.__proto__||Object.getPrototypeOf(RealNameCertificationModal)).call(this,props));_this.setVisible=function(visible){_this.refs.modalWrapper.setVisible(visible);_this.setState({imageUrl2:undefined});if(visible&&_this.props.basicInfo){_this.setValue(_this.props.basicInfo);_this.getSchoolList(_this.props.basicInfo);}};_this.setValue=function(basicInfo){// debugger;
if(basicInfo){_this.props.form.setFieldsValue({nickname:basicInfo.nickname,name:!basicInfo.show_realname?_this.hideRealName(basicInfo.name):basicInfo.name,job:basicInfo.identity,org:basicInfo.school_name});setTimeout(function(){// 等显示后再set
_this.props.form.setFieldsValue({job:basicInfo.identity,sex:String(basicInfo.gender),student_No:basicInfo.student_id,org2:basicInfo.department_name,job1:basicInfo&&basicInfo.identity=="teacher"?basicInfo.technical_title:"教授",job2:basicInfo&&basicInfo.identity=="professional"?basicInfo.technical_title:"企业管理者"});},100);_this.setState({forDisable:true,nameLength:basicInfo.nickname?basicInfo.nickname.length:0,showRealName:basicInfo.show_realname,realName:basicInfo.name,identity:basicInfo.identity,school_id:basicInfo.school_id,department_id:basicInfo.department_id});}};_this.getSchoolList=function(basicInfo,selectedName){var url="/schools/for_option.json";__WEBPACK_IMPORTED_MODULE_11_axios___default.a.get(url).then(function(result){if(result){_this.setState({schoolList:result.data.schools});if(selectedName){var school_id=void 0;result.data.schools.reverse().some(function(item){if(item.name==selectedName){school_id=item.id;return true;}});_this.props.form.setFieldsValue({org:selectedName});_this.setState({school_id:school_id,school:selectedName},function(){_this.filterList(selectedName);});}else if(basicInfo&&basicInfo.school_name){_this.setState({school:basicInfo.school_name,filterSchoolList:_this.state.schoolList.filter(function(item){return item.name.indexOf(basicInfo.school_name)>-1;})});_this.getDepartments(basicInfo.school_name,false);}}}).catch(function(error){console.log(error);});};_this.getDepartments=function(e,flag){var arr=_this.state.schoolList.filter(function(item){if(item.name.indexOf(e)>-1){return item.name;}});if(!arr[0]){if(!e){_this.setState({filterSchoolList:[]});}// 没找到学校,清空部门
_this.setState({departments:[],filterDepartments:[],departmentsName:'',school_id:'',department_id:''});_this.this_school_id='';_this.props.form.setFieldsValue({org2:''});return;}_this.props.form.setFieldsValue({org:arr[0].name});_this.filterList(e);// 保存选择的学校id
_this.this_school_id=arr[0].id;_this.setState({school_id:arr[0].id,school:e});_this._getDepartments(arr[0].id,flag);};_this._getDepartments=function(schoolId,flag,selectedName){var url="/schools/"+(schoolId||_this.state.school_id)+"/departments/for_option.json";__WEBPACK_IMPORTED_MODULE_11_axios___default.a.get(url).then(function(result){if(result){_this.setState({departments:result.data.departments,filterDepartments:result.data.departments});if(selectedName){var department_id=void 0;result.data.departments.reverse().some(function(item){if(item.name==selectedName){department_id=item.id;return true;}});_this.props.form.setFieldsValue({org2:selectedName});_this.setState({department_id:department_id// school: selectedName
});}else if(result.data.departments&&result.data.departments.length>0&&flag==true){// 切换学校后,部门默认选择第一个
_this.props.form.setFieldsValue({org2:result.data.departments[0].name});_this.setState({department_id:result.data.departments[0].id});}else if(result.data.departments&&result.data.departments.length==0&&flag==true){_this.props.form.setFieldsValue({org2:''});}}}).catch(function(error){console.log(error);});};_this.filterList=function(e){var inputVal=e.trim();var arr=[];if(inputVal){arr=_this.state.schoolList.filter(function(item){return item.name.indexOf(inputVal)>-1;});_this.props.form.setFieldsValue({org:inputVal});_this.setState({school:inputVal,filterSchoolList:arr});}else{_this.setState({school:''});}// else{
// let {school}=this.state;
// arr= this.state.schoolList.filter(function(item){
// return item.name.indexOf(school)>-1;
// });
// }
};_this.onSendOk=function(){_this.props.form.validateFieldsAndScroll(function(err,values){console.log(values);console.log(_this.state.showRealName?values.name:_this.state.realName);// return;
if(!err){var _this$state=_this.state,imageUrl2=_this$state.imageUrl2,showRealName=_this$state.showRealName,realName=_this$state.realName;var _this$props=_this.props,current_user=_this$props.current_user,basicInfo=_this$props.basicInfo;if(imageUrl2){var certification=_this.props.certification;if(certification==1){// 实名认证
var url="";if(basicInfo===undefined){url="/users/accounts/"+(current_user&&current_user.login)+"/authentication_apply.json";}else{url="/users/accounts/"+(basicInfo&&basicInfo.id)+"/authentication_apply.json";}__WEBPACK_IMPORTED_MODULE_11_axios___default.a.post(url,{name:_this.state.showRealName?values.name:realName,gender:parseInt(values.sex),id_number:values.credentials,show_realname:showRealName,attachment_ids:[_this.state.fileID]}).then(function(result){if(result){_this.props.showNotification("申请已提交,请等待审核!");try{_this.props.getBasicInfo();}catch(e){}try{_this.props.Getdata(_this.props.userdata.id);}catch(e){}_this.setVisible(false);}}).catch(function(error){console.log(error);});}else{// 职业认证
// console.log(values.job == "student" ? values.student_No : values.job == "teacher" ? values.job1 : values.job2);
var _url="";if(basicInfo===undefined){_url="/users/accounts/"+(current_user&&current_user.login)+"/professional_auth_apply.json";}else{_url="/users/accounts/"+(basicInfo&&basicInfo.id)+"/professional_auth_apply.json";}__WEBPACK_IMPORTED_MODULE_11_axios___default.a.post(_url,{school_id:_this.state.school_id,department_id:_this.state.department_id,identity:_this.state.identity,extra:values.job=="student"?values.student_No:values.job=="teacher"?values.job1:values.job2,attachment_ids:[_this.state.fileID]}).then(function(result){if(result){_this.props.showNotification("申请已提交,请等待审核!");try{_this.props.getBasicInfo();}catch(e){}try{_this.props.Getdata(_this.props.userdata.id);}catch(e){}_this.setVisible(false);}}).catch(function(error){console.log(error);});}}else{_this.props.showNotification("请先上传照片!");}}});};_this.onOk=function(){var _this$state2=_this.state,course_lists=_this$state2.course_lists,checkBoxValues=_this$state2.checkBoxValues;_this.onSendOk();};_this.handleChange2=function(info){if(info.file.status==='uploading'){_this.setState({loading:true});return;}if(info.file.status==='done'){// Get this url from response in real world.
console.log(info.file.response);getBase64(info.file.originFileObj,function(imageUrl2){return _this.setState({imageUrl2:imageUrl2,loading:false,fileID:info.file.response&&info.file.response.id});});}};_this.changeJob=function(e){_this.setState({identity:e});var basicInfo=_this.props.basicInfo;if(basicInfo){_this.props.form.setFieldsValue({job1:basicInfo&&basicInfo.identity=="teacher"?basicInfo.technical_title:"教授",job2:basicInfo&&basicInfo.identity=="professional"?basicInfo.technical_title:"企业管理者"});}};_this.changeList=function(e){_this.getDepartments(e.trim(),true);};_this.showApplyForAddOrgModal=function(){_this.applyForAddOrgForm.setVisible(true);};_this.showApplyForAddChildOrgModal=function(){var _this$state3=_this.state,school=_this$state3.school,schoolList=_this$state3.schoolList;var arr=schoolList.filter(function(item){return item.name==school;});if(arr.length>0){_this.applyForAddChildOrgForm.setVisible(true);}else{_this.props.showNotification("请先选择正确的单位或者学校!");}};_this.addOrgSuccess=function(name){// const schoolList = this.state.schoolList.slice(0)
// schoolList.push({ id: schoolList.length + 2000, name: name})
// this.setState({ schoolList })
_this.getSchoolList(_this.props.basicInfo,name);_this.props.form.setFieldsValue({org:name});};_this.addChildOrgSuccess=function(deptName){_this._getDepartments(_this.state.school_id,false,deptName);};_this.showOrHide=function(flag){var name=_this.props.form.getFieldsValue().name||_this.props.basicInfo.name;_this.setState({showRealName:flag==true?false:true});if(flag==true){// 隐藏真实姓名
_this.hideRealName(name);}else{// 显示
_this.props.form.setFieldsValue({name:_this.state.realName});}};_this.hideRealName=function(name){_this.setState({realName:name});var newName=getHiddenName(name);_this.props.form.setFieldsValue({name:newName});return newName;};_this.changeDepartment=function(e){var arr=_this.state.departments&&_this.state.departments.filter?_this.state.departments.filter(function(item){return item.name==e;}):[];if(!arr[0]){_this.setState({department_id:'',departmentsName:e,filterDepartments:[]});_this.this_department_id='';return;}_this.this_department_id=arr[0].id;_this.setState({departmentsName:e,department_id:arr[0].id});};_this.state={identity:"teacher",departmentsName:undefined,fileID:undefined,filterSchoolList:undefined,filterDepartments:undefined,school:undefined,school_id:undefined,department_id:undefined,schoolList:undefined,departments:undefined,showRealName:true,realName:undefined,imageUrl2:undefined};return _this;}// 弹框出现visible==true时给formitem赋值
// 切换职称
// 选择学校(获取对应学校的学院、部门)
// 隐藏或显示真实姓名
// 将名字隐藏起来
// 选择部门、学院
_createClass(RealNameCertificationModal,[{key:"handleSubmitNames",// 姓名
value:function handleSubmitNames(rule,value,callback){if(value){var iconRule1=/[`~!@#$%^&()_\-+=<>?:"{}|,.\/;'\\[\]·~@#¥%……&()——\-+={}|《》?:“”【】、;‘’,。、]/im;// 判断是否含有emoji表情
var iconRule2=/[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/ig;// 如果为true字符串含有emoji表情 false不含
var iconRule2s=iconRule2.test(value);// 如果为true字符串含有特殊符号 false不
var iconRule1s=iconRule1.test(value);if(iconRule2s===true||iconRule1s===true){callback('2-10位中英文、数字');}else if(value.length<2){callback('2-10位中英文、数字');}else if(value.length>=11){callback('2-10位中英文、数字');}}callback();}},{key:"render",value:function render(){var _this2=this;var _state=this.state,course_lists=_state.course_lists,checkBoxValues=_state.checkBoxValues,searchValue=_state.searchValue,loading=_state.loading,imageUrl=_state.imageUrl,imageUrl2=_state.imageUrl2,identity=_state.identity,departmentsName=_state.departmentsName,filterSchoolList=_state.filterSchoolList,filterDepartments=_state.filterDepartments,school=_state.school,department_id=_state.department_id,departments=_state.departments,school_id=_state.school_id,showRealName=_state.showRealName;var moduleName=this.props.moduleName;var getFieldDecorator=this.props.form.getFieldDecorator;var certification=this.props.certification;// /api/users/accounts/${this.props.current_user.login}/auth_attachment.json
// 已职业认证的账户不能修改职业,学校/单位,院系/部门true为disable
// const professionalFlag = basicInfo && basicInfo.professional_certification == "certified" ;
var basicInfo=this.props.basicInfo;var common={changeJob:this.changeJob,filterList:this.filterList,changeList:this.changeList,changeDepartment:this.changeDepartment,showApplyForAddOrgModal:this.showApplyForAddOrgModal,showApplyForAddChildOrgModal:this.showApplyForAddChildOrgModal};var uploadProps2={// name: 'image',
data:{type:certification==1?"real_name":"professional"},multiple:true,showUploadList:false,// https://newweb.educoder.net
action:this.props.current_user?""+Object(__WEBPACK_IMPORTED_MODULE_13_educoder__["P" /* getUploadActionUrl */])():'',className:'idPic-uploader',onChange:this.handleChange2,beforeUpload:function beforeUpload(file){var isJpgOrPng=file.type==='image/jpeg'||file.type==='image/png'||file.type==='image/jpg'||file.type==='image/bmp';if(!isJpgOrPng){_this2.props.showNotification('请上传正确文件格式');}return isJpgOrPng;}};// form合并了
var propsWithoutForm=Object.assign({},this.props);delete propsWithoutForm.form;return __WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_16__ApplyForAddOrgModal__["a" /* default */],Object.assign({ref:"applyForAddOrgModal",wrappedComponentRef:function wrappedComponentRef(form){return _this2.applyForAddOrgForm=form;},schoolName:school},propsWithoutForm,{addOrgSuccess:this.addOrgSuccess})),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_17__ApplyForAddChildOrgModal__["a" /* default */],Object.assign({ref:"applyForAddChildOrgModal",schoolName:school,schoolId:school_id,departmentName:departmentsName},propsWithoutForm,{wrappedComponentRef:function wrappedComponentRef(form){return _this2.applyForAddChildOrgForm=form;},addChildOrgSuccess:this.addChildOrgSuccess})),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_12__courses_common_ModalWrapper__["a" /* default */],Object.assign({ref:"modalWrapper",title:certification&&certification==1?__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement("span",null,__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement("i",{className:"iconfont icon-shenfenrenzheng font-18 color-blue mr5",style:{fontWeight:"normal"}}),"\u5B9E\u540D\u8BA4\u8BC1"):__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement("span",null,__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement("i",{className:"iconfont icon-zhiyerenzheng font-18 color-blue mr5",style:{fontWeight:"normal"}}),"\u804C\u4E1A\u8BA4\u8BC1")},this.props,this.state,{onOk:this.onOk,okText:"\u4FDD\u5B58",className:"applyForModal certificationModal courseNormalForm autoModal",width:"660px",bottomRender:certification&&certification==1?__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement("div",{className:"bottomRender"},__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement("p",null,"\u8BA4\u8BC1\u987B\u77E5\uFF1A"),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement("p",null,"1.\u4F60\u9700\u8981\u51C6\u5907\u6709\u6548\u7684\u8EAB\u4EFD\u8BC1\u6B63\u9762\uFF08\u4EBA\u50CF\u9762\uFF09\u7684\u8BC1\u4EF6\u7167\u7167\u7247\uFF0C\u8BF7\u786E\u4FDD\u8BC1\u4EF6\u7167\u7247\u6E05\u6670\u53EF\u89C1\uFF0C\u4E25\u7981PS\uFF1B"),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement("p",null,"2.\u6211\u4EEC\u5C06\u5728\u4F60\u63D0\u4EA4\u8BA4\u8BC1\u4FE1\u606F\u540E\u768424\u5C0F\u65F6\uFF08\u4E0D\u5305\u542B\u8282\u5047\u65E5\uFF09\u5185\u5B8C\u6210\u5BA1\u6838\uFF0C\u5BA1\u6838\u7ED3\u679C\u5C06\u4F1A\u4EE5\u7CFB\u7EDF\u6D88\u606F\u7684\u5F62\u5F0F\u53D1\u9001\u7ED9\u4F60\uFF1B"),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement("p",null,"3.\u5B9E\u540D\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u65E0\u6CD5\u5220\u9664\uFF0C\u8BF7\u8C28\u614E\u586B\u5199\uFF1B"),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement("p",null,"4.\u5B9E\u540D\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u7CFB\u7EDF\u5C06\u81EA\u52A8\u53D1\u653E500\u4E2A\u91D1\u5E01\u4F5C\u4E3A\u5956\u52B1\uFF1B"),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement("p",null,"5.\u6211\u4EEC\u4F1A\u786E\u4FDD\u4F60\u6240\u63D0\u4F9B\u7684\u4FE1\u606F\u5747\u5904\u4E8E\u4E25\u683C\u7684\u4FDD\u5BC6\u72B6\u6001\uFF0C\u4E0D\u4F1A\u6CC4\u9732\uFF1B"),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement("p",null,"6.\u5982\u5B58\u5728\u6076\u610F\u4E71\u586B\u5199\u59D3\u540D\uFF0C\u8BC1\u4EF6\u53F7\uFF0C\u53CA\u4E0A\u4F20\u4E0E\u5B9E\u540D\u8BA4\u8BC1\u8BC1\u4EF6\u65E0\u5173\u56FE\u7247\u8005\uFF0C\u4E00\u7ECF\u53D1\u73B0\u5C06\u51BB\u7ED3EduCoder\u8D26\u53F7\u3002"),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement("p",null,"7.\u63D0\u4EA4\u5B9E\u540D\u8BA4\u8BC1\u540E\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u5C06\u72B6\u6001\u6539\u4E3A\u5DF2\u8BA4\u8BC1\uFF0C\u4F60\u5C06\u53EF\u4EE5\u4F53\u9A8C\u5E73\u53F0\u9700\u8981\u5B9E\u540D\u8BA4\u8BC1\u7684\u529F\u80FD\uFF1B\u5982\u679C\u5728\u8BA4\u8BC1\u540E\u7684\u4F7F\u7528\u8FC7
required:true,message:"\u8BF7\u8F93\u5165\u771F\u5B9E\u59D3\u540D\uFF0C\u6700\u5927\u9650\u5236"+MAX_NAME_LENGTH+"\u4E2A\u5B57\u7B26"},{validator:this.handleSubmitNames}]})(__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_input___default.a,{placeholder:"\u8BF7\u8F93\u5165\u771F\u5B9E\u59D3\u540D\uFF0C\u6700\u5927\u9650\u5236"+MAX_NAME_LENGTH+"\u4E2A\u5B57\u7B26",className:"yslgraduainputedit",disabled:!showRealName&&this.state.forDisable==true,addonAfter:__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement("i",{className:showRealName?"iconfont icon-xianshi font-18 color-blue":"iconfont icon-yincang font-18 color-blue",onClick:function onClick(){return _this2.showOrHide(showRealName);}})})),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement("span",null,showRealName?'(显示:平台将显示您的真实姓名)':'(隐藏:平台将显示你的昵称)'))),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_antd_lib_form___default.a.Item,{label:"\u6027\u522B",className:"formItemInline resetSexStyle"},getFieldDecorator('sex',{rules:[{required:true,message:'请选择性别'}]})(__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(RadioGroup,null,__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9_antd_lib_radio___default.a,{value:"0"},"\u7537"),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9_antd_lib_radio___default.a,{value:"1"},"\u5973")))),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_antd_lib_form___default.a.Item,{label:"\u8BC1\u4EF6\u53F7\uFF1A",className:"formItemInline"},getFieldDecorator('credentials',{rules:[{// initialValue: this.state.cityDefaultValue,
required:true,message:'请输入证件号'}]})(__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_input___default.a,{placeholder:"\u8BF7\u8F93\u5165\u8BC1\u4EF6\u53F7"})))):__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_15__account_AccountBasicEditItem__["a" /* default */],Object.assign({identity:identity,getFieldDecorator:getFieldDecorator,professionalFlag:false,basicInfo:basicInfo},this.props,this.state,common,{form:this.props.form,filterSchoolList:filterSchoolList,filterDepartments:filterDepartments,departmentsName:departmentsName,school:school,department_id:department_id,departments:departments})),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement("div",{className:"mt15",style:{marginLeft:'18px'}},__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement("div",{className:"df"},__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement("span",{style:{color:'#999999'}},certification&&certification==1?"身份证上传:":"职业证上传:"),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement("div",{className:"df ml10",style:{justifyContent:'center'}},__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement("span",{className:"idPic-uploader demoImg"},__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement("img",{src:""+(certification==1?__WEBPACK_IMPORTED_MODULE_18__images_account_auth_png___default.a:__WEBPACK_IMPORTED_MODULE_19__images_account_job_png___default.a),alt:"avatar",style:{maxHeight:'110px'}})),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(Dragger,Object.assign({},uploadProps2,{accept:".png,.jpg,.bmp,.jpeg"}),imageUrl2?// <a href={imageUrl2} target="_blank" title="点击重新上传图片"></a>
__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement("img",{src:imageUrl2,alt:"avatar",style:{maxHeight:'110px'}}):__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10_react___default.a.Fragment,null,__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement("p",{className:"ant-upload-drag-icon"},__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement("i",{className:"iconfont icon-cuban2shangchuanyunduan",style:{color:"#4B667F",font:"42px"}})),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement("p",{className:"ant-upload-text mt20"},__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement("a",null,"\u70B9\u51FB\u6216\u62D6\u62FD\u4E0A\u4F20\u56FE\u7247")))))),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement("div",{className:"df mt10 color-grey-9"},__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement("span",{className:"fl edu-txt-center",style:{width:"200px",marginLeft:"65px"}},__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement("p",null,"\u793A\u4F8B\u56FE\u7247"),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement("p",{className:"font-12",style:{color:'#FF6800'}},"\uFF08png/jpg/bmp\u683C\u5F0F\uFF0C\u4E0D\u8D85\u8FC72MB\uFF09")),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement("span",{className:"fl edu-txt-center",style:{width:"160px"}},__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_13_educoder__["q" /* ImageLayer2 */],_defineProperty({parentSel:'#imageLayerBtn'},"parentSel",'#imageLayerBtn')),__WEBPACK_IMPORTED_MODULE_10_react___default.a.createElement("a",{href:"javascript:void(0)",id:"imageLayerBtn",src:imageUrl||imageUrl2,className:"color-orange",style:{borderBottom:"1px solid #ff6800"}},"\u67E5\u770B\u5927\u56FE")))))));}}]);return RealNameCertificationModal;}(__WEBPACK_IMPORTED_MODULE_10_react__["Component"]);var WrappedRealNameCertificationModal=__WEBPACK_IMPORTED_MODULE_1_antd_lib_form___default.a.create({name:'RealNameCertificationModal'})(RealNameCertificationModal);/* harmony default export */ __webpack_exports__["a"] = (WrappedRealNameCertificationModal);
/***/ }),
/***/ 3120:
/***/ (function(module, exports, __webpack_require__) {
// style-loader: Adds some css to the DOM by adding a <style> tag
// load the styles
var content = __webpack_require__(4852);
if(typeof content === 'string') content = [[module.i, content, '']];
// Prepare cssTransformation
var transform;
var options = {"hmr":false}
options.transform = transform
// add the styles to the DOM
var update = __webpack_require__(313)(content, options);
if(content.locals) module.exports = content.locals;
/***/ }),
/***/ 3310:
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "static/media/auth.43f1c749.png";
/***/ }),
/***/ 3311:
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "static/media/job.b2881c7d.png";
/***/ }),
/***/ 4843:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_menu_style_css__ = __webpack_require__(989);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_menu_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_antd_lib_menu_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_menu__ = __webpack_require__(924);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_menu___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_antd_lib_menu__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_button_style_css__ = __webpack_require__(87);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_button_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_antd_lib_button_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_button__ = __webpack_require__(74);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_button___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_antd_lib_button__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_antd_lib_row_style_css__ = __webpack_require__(1482);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_antd_lib_row_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_antd_lib_row_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_antd_lib_row__ = __webpack_require__(1483);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_antd_lib_row___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_antd_lib_row__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_antd_lib_col_style_css__ = __webpack_require__(1484);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_antd_lib_col_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_antd_lib_col_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_antd_lib_col__ = __webpack_require__(1485);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_antd_lib_col___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_antd_lib_col__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_antd_lib_breadcrumb_style_css__ = __webpack_require__(1427);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_antd_lib_breadcrumb_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_antd_lib_breadcrumb_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_antd_lib_breadcrumb__ = __webpack_require__(1428);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_antd_lib_breadcrumb___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_antd_lib_breadcrumb__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_antd_lib_layout_style_css__ = __webpack_require__(2392);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_antd_lib_layout_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_antd_lib_layout_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_antd_lib_layout__ = __webpack_require__(2393);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_antd_lib_layout___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_antd_lib_layout__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_12_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13_react_router_dom__ = __webpack_require__(44);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14_axios__ = __webpack_require__(15);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14_axios___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_14_axios__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15_educoder__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__CompetitionCommonChild_CompetitionContents__ = __webpack_require__(4844);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__CompetitionCommonChild_CompetitionContentsChart__ = __webpack_require__(4845);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__CompetitionCommonChild_CompetitionContentsMd__ = __webpack_require__(4846);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__CompetitionCommonChild_CompetitionContentspdf__ = __webpack_require__(4847);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__CompetitionCommon_css__ = __webpack_require__(4856);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__CompetitionCommon_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_20__CompetitionCommon_css__);
var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();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;}var Sider=__WEBPACK_IMPORTED_MODULE_11_antd_lib_layout___default.a.Sider;var CompetitionCommon=function(_Component){_inherits(CompetitionCommon,_Component);function CompetitionCommon(props){_classCallCheck(this,CompetitionCommon);var _this=_possibleConstructorReturn(this,(CompetitionCommon.__proto__||Object.getPrototypeOf(CompetitionCommon)).call(this,props));_this.componentDidUpdate=function(prevProps){if(prevProps.user!=_this.props.user){//console.log("componentDidUpdatess");
//console.log(this.props.user);
if(_this.props.user&&_this.props.user.login!=""){var zul='/competitions/'+_this.props.match.params.identifier+'/competition_staff.json';__WEBPACK_IMPORTED_MODULE_14_axios___default.a.get(zul).then(function(result){if(result){if(result.data){_this.setState({signupdata:result.data});}}}).catch(function(error){////console.log(error);
});}}};_this.getbannerdata=function(){// let menuid=this.props.location.search.replace('?menu=', '');
var query=_this.props.location&&_this.props.location.search;var types=query.split('&');var menuid=types[0].split('?menu=');var url='/competitions/'+_this.props.match.params.identifier+'/common_header.json';__WEBPACK_IMPORTED_MODULE_14_axios___default.a.get(url).then(function(response){if(response.status===200){_this.setState({data:response.data,thiskeys:menuid[1]===undefined||menuid[1]===""?response.data.competition_modules[0].id:menuid[1],mode:response.data.mode});if(menuid[1]===undefined||menuid[1]===""){_this.getrightdata(response.data.competition_modules[0].id,response.data.competition_modules[0].module_type,response.data.competition_modules[0].module_url,response.data.competition_modules[0].has_url);}else{var newlist=response.data.competition_modules;newlist.map(function(item,key){if(''+item.id===''+menuid[1]){_this.getrightdata(item.id,item.module_type,item.module_url,item.has_url);}});}}}).catch(function(error){//console.log(error)
});//this.props.user 有可能为空
if(_this.props.user&&_this.props.user.login!=""){var zul='/competitions/'+_this.props.match.params.identifier+'/competition_staff.json';__WEBPACK_IMPORTED_MODULE_14_axios___default.a.get(zul).then(function(result){if(result){if(result.data){_this.setState({signupdata:result.data});}}}).catch(function(error){////console.log(error);
});}};_this.getrightdatas=function(e){var keys=parseInt(e.key);_this.getlistdata(keys);_this.props.history.replace('?menu='+keys);};_this.getlistdata=function(keys,listkey){var data=_this.state.data;_this.setState({thiskeys:keys});data&&data.competition_modules.map(function(item,key){if(item.module_type!="enroll"){if(keys===item.id){_this.getrightdata(item.id,item.module_type,item.module_url,item.has_url,listkey);return;}}});};_this.getnewchartdata=function(typeid,tabkey){if(typeid==="chart"){var url='/competitions/'+_this.props.match.params.identifier+'/chart_rules.json';__WEBPACK_IMPORTED_MODULE_14_axios___default.a.get(url).then(function(response){if(response.status===200){_this.setState({chart_rules:response.data,tabkey:tabkey===undefined?response.data.stages[0].id===null?"0":''+response.data.stages[0].id:tabkey});}}).catch(function(error){//console.log(error)
});}};_this.getrightdata=function(id,typeid,module_url,has_url,listkey){// if(typeid==="enroll"){
// this.props.history.replace(`/competitions/${this.props.match.params.identifier}/enroll`);
// return
// }
_this.getnewchartdata(typeid,listkey);if(has_url===false){var url=''+module_url;__WEBPACK_IMPORTED_MODULE_14_axios___default.a.get(url).then(function(response){if(response.status===200){if(typeid==="chart"){_this.setState({chartdata:response.data});}else{_this.setState({mdContentdata:response.data});}}}).catch(function(error){//console.log(error)
});}else{if(module_url.substring(0,7)=='http://'||module_url.substring(0,8)=='https://'){// window.location.href= module_url
window.open(module_url);}else{window.open('https://'+module_url);// window.location.href=;
}return;}_this.setState({module_id:id,module_type:typeid,has_url:has_url});};_this.Competitionedit=function(){_this.setState({Competitionedittype:true});};_this.hideCompetitionedit=function(){_this.setState({Competitionedittype:false});};_this.newgotocourse=function(url){if(_this.props.checkIfLogin()===false){_this.props.showLoginDialog();return;}if(_this.props.checkIfProfileCompleted()===false){_this.props.showProfileCompleteDialog();return;}window.open(url);};_this.gotocourse=function(url){if(_this.props.checkIfLogin()===false){_this.props.showLoginDialog();return;}if(_this.props.checkIfProfileCompleted()===false){_this.props.showProfileCompleteDialog();return;}if(url===undefined){var _this$state=_this.state,data=_this$state.data,signupdata=_this$state.signupdata;// if(signupdata.enrolled===true){
// this.props.history.replace(`/courses/${data.course_id}`);
// }else{ }
if(data.member_of_course===true){// this.props.history.replace(`/courses/${data.course_id}`);
window.open('/courses/'+data.course_id);}else{// 以学生身份调用加入课堂 进入课堂首页
var _url="/courses/apply_to_join_course.json";__WEBPACK_IMPORTED_MODULE_14_axios___default.a.post(_url,{invite_code:data.invite_code,student:1}).then(function(response){if(response.data.status===0){// this.props.history.replace();
_this.getbannerdata();window.open('/courses/'+data.course_id);}});}}else{if(url==="personal"){var urls='/competitions/'+_this.props.match.params.identifier+'/enroll';_this.Personalregistration(urls);}else{window.open(url);}}};_this.Personalregistration=function(urls){var signupdata=_this.state.signupdata;if(signupdata.enroll_ended===true){//已截止
_this.props.showNotification('\u62A5\u540D\u5DF2\u622A\u6B62');return;}if(signupdata.enrolled===true){_this.props.showNotification('\u4F60\u5DF2\u7ECF\u62A5\u540D,\u4E0D\u80FD\u91CD\u590D\u62A5\u540D\uFF01');return;}var url='/competitions/'+_this.props.match.params.identifier+'/competition_teams.json';__WEBPACK_IMPORTED_MODULE_14_axios___default.a.post(url).then(function(response){if(response){if(response.data){_this.props.showNotification('\u62A5\u540D\u6210\u529F,\u9884\u795D\u60A8\u593A\u5F97\u6842\u51A0!');// this.props.history.replace(urls);
_this.getbannerdata();window.open(urls);}}}).catch(function(error){});};_this.Competitioncallback=function(key){_this.setState({tabkey:key});var url='/competitions/'+_this.props.match.params.identifier+'/charts.json';__WEBPACK_IMPORTED_MODULE_14_axios___default.a.get(url,{params:{stage_id:key===0||key===null?undefined:key}}).then(function(response){if(response.status===200){_this.setState({chartdata:response.data});}}).catch(function(error){//console.log(error)
});};_this.state={data:undefined,bannerdata:undefined,module_type:undefined,mdContentdata:undefined,chart_rules:undefined,Competitionedittype:false,chartdata:undefined,has_url:false,signupdata:undefined};return _this;}_createClass(CompetitionCommon,[{key:'componentDidMount',value:function componentDidMount(){window.document.title='竞赛';if(this.props.match.params.identifier!=null){this.getbannerdata();// this.setState({
// thiskeys:this.props.location.search.replace('?menu=', '')
// })
// let url=`/competitions/${this.props.match.params.identifier}.json`;
// axios.get(url).then((response) => {
// if(response.status===200){
// this.setState({
// bannerdata:response.data
// })
// }
// }).catch((error) => {
// //console.log(error)
// })
}}//获取头部信息
},{key:'render',value:function render(){var _this2=this;var _state=this.state,data=_state.data,module_type=_state.module_type,Competitionedittype=_state.Competitionedittype,signupdata=_state.signupdata;return data===undefined?"":__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement('div',{className:"educontent clearfix mt20 "},__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9_antd_lib_breadcrumb___default.a,{separator:'>'},__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9_antd_lib_breadcrumb___default.a.Item,null,__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_13_react_router_dom__["b" /* Link */],{to:"/competitions"},'\u5728\u7EBF\u7ADE\u8D5B')),__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9_antd_lib_breadcrumb___default.a.Item,null,data&&data.name)),__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement('div',{className:"mt10 relative"},__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_antd_lib_row___default.a,{className:"CompetitionCommonbanner"},data.competition_status==="nearly_published"?data&&data.permission.editable===true?"":__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement('div',{className:"CompetitionsListzhezhao"},'\u5373\u5C06\u53D1\u5E03 \u656C\u8BF7\u671F\u5F85'):"",__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement('img',{className:"Commonimg",src:data.competition_status==="ended"?Object(__WEBPACK_IMPORTED_MODULE_15_educoder__["M" /* getImageUrl */])('images/educoder/competitions/groups1.png'):data.competition_status==="nearly_published"?Object(__WEBPACK_IMPORTED_MODULE_15_educoder__["M" /* getImageUrl */])('images/educoder/competitions/groups2.png'):data.competition_status==="progressing"?Object(__WEBPACK_IMPORTED_MODULE_15_educoder__["M" /* getImageUrl */])('images/educoder/competitions/groups3.png'):""}),__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_antd_lib_col___default.a,{span:15,className:"Commonimgbox"},__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement('img',{className:"image_urlbox",src:data===undefined?Object(__WEBPACK_IMPORTED_MODULE_15_educoder__["M" /* getImageUrl */])('images/educoder/competitions/mainbanner.jpg'):data.avatar_url===null?Object(__WEBPACK_IMPORTED_MODULE_15_educoder__["M" /* getImageUrl */])('images/educoder/competitions/mainbanner.jpg'):Object(__WEBPACK_IMPORTED_MODULE_15_educoder__["M" /* getImageUrl */])(data.avatar_url)})),__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_antd_lib_col___default.a,{className:"CompetitionCommonbannerfont",span:9},__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_antd_lib_col___default.a,{className:data&&data.name.length>15?"competitionbannerdiv mt30":"competitionbannerdiv mt30"},data&&data.name),__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_antd_lib_col___default.a,{className:"competitionbannerdiv mt10"},__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_antd_lib_col___default.a,{className:"Competitioncolor9b"},'\u7ADE\u8D5B\u65F6\u95F4\uFF1A',__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement('span',{className:"color000"},data&&data.start_time,'\uFF5E',data&&data.end_time))),__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement('style',null,'\n\t\t\t\t\t\t\t\t \t.ant-col-6{\n\t\t\t\t\t\t\t\t\t\t\t\twidth: 30%;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t '),__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_antd_lib_col___default.a,{className:"competitionbannerdiv mt10"},__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_antd_lib_row___default.a,{gutter:16},__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_antd_lib_col___default.a,{className:'gutter-row',span:6},__WEBPACK_I
,onClick:data.mode===2?data.member_of_course==true?function(){return _this2.newgotocourse('/courses/'+data.course_id);}:"":function(){return _this2.newgotocourse('/competitions/'+_this2.props.match.params.identifier+'/enroll');}},data&&data.member_count):data.competition_status==="nearly_published"?__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement('div',{className:'gutter-box CompetitionsIndexbottomvalue Competitioncolor516'// onClick={data.competition_status === "nearly_published" ? "" : () => this.gotocourse(`/competitions/${this.props.match.params.identifier}/enroll`)}
},"--"):data.competition_status==="progressing"?data.mode===2?__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement('div',{className:'gutter-box CompetitionsIndexbottomvalue Competitioncolor516 cursorpointer',onClick:function onClick(){return _this2.gotocourse();}},data&&data.member_count):signupdata&&signupdata.personal===true?__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement('div',{className:'gutter-box CompetitionsIndexbottomvalue Competitioncolor516 cursorpointer',onClick:function onClick(){return _this2.gotocourse("personal");}},data&&data.member_count):__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement('div',{className:'gutter-box CompetitionsIndexbottomvalue Competitioncolor516 cursorpointer',onClick:function onClick(){return _this2.gotocourse('/competitions/'+_this2.props.match.params.identifier+'/enroll');}},data&&data.member_count):""))),data.competition_status==="ended"?__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement('style',null,'\n\t\t\t\t\t\t\t\t\t\t.Competitionfontsize22{\n\t\t\t\t\t\t\t\t\t\t\t\t\theight: 50px;\n\t\t\t\t\t\t\t\t\t\t\t\t\tborder-radius: 4px;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t'):__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement('style',null,'\n\t\t\t\t\t\t\t\t\t\t.Competitionfontsize22{\n\t\t\t\t\t\t\t\t\t\t\t\t\theight: 50px;\n\t\t\t\t\t\t\t\t\t\t\t\t\tbackground: rgba(76,172,255,1);\n\t\t\t\t\t\t\t\t\t\t\t\t\tborder-radius: 4px;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t'),__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_antd_lib_col___default.a,{className:"competitionbannerdiv mt20"},data.competition_status==="ended"?__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_button___default.a,{type:'primary',block:true,className:"Competitionfontsize22",disabled:true},'\u5DF2\u7ED3\u675F'):data.enroll_end===true?__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_button___default.a,{type:'primary',block:true,className:"Competitionfontsize22",disabled:true},data.competition_status==="nearly_published"?"未发布":"报名截止"):data.competition_status==="progressing"?__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_button___default.a,{type:'primary',block:true,className:"Competitionfontsize22"},data.mode===2?__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement('a',{onClick:function onClick(){return _this2.gotocourse();}},'\u7ACB\u5373\u62A5\u540D'):signupdata&&signupdata.personal===true?__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement('a',{onClick:function onClick(){return _this2.gotocourse("personal");}},'\u7ACB\u5373\u62A5\u540D'):__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement('a',{onClick:function onClick(){return _this2.gotocourse('/competitions/'+_this2.props.match.params.identifier+'/enroll');}},'\u7ACB\u5373\u62A5\u540D')):""),__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_antd_lib_col___default.a,{className:"mt10 Competitionfontsize16"},data&&data.enroll_end_time===null?"":'\u62A5\u540D\u622A\u6B62\u65F6\u95F4\uFF1A'+(data&&data.enroll_end_time))))),__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement('style',null,'\n\t\t\t\t\t\t.CompetitionMenu .ant-menu-item a{\n\t\t\t\t\t\t overflow:hidden;\n\t\t\t\t\t\t\t\ttext-overflow:ellipsis;\n\t\t\t\t\t\t\t\twhite-space:nowrap\n\t\t\t\t\t\t}\n\t\t\t\t\t\t'),__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11_antd_lib_layout___default.a,{className:'teamsLayout mt40'},__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement(Sider,null,__WEBPACK_IMPORTED_MODULE_12_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_antd_lib_menu___default.a,{mode:'inline',className:'CompetitionMenu',selectedKeys:[''+this.state.thiskeys],onClick:function onClick(e){return _this2.getrightdatas(e);}},data&&data.competition_modules.map(function(item,key){if(item.module_type!="enroll"){ret
/***/ }),
/***/ 4844:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_button_style_css__ = __webpack_require__(87);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_button_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_antd_lib_button_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_button__ = __webpack_require__(74);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_button___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_antd_lib_button__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_layout_style_css__ = __webpack_require__(2392);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_layout_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_antd_lib_layout_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_layout__ = __webpack_require__(2393);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_layout___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_antd_lib_layout__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_axios__ = __webpack_require__(15);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_axios___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_axios__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_educoder__ = __webpack_require__(5);
var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();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;}var Header=__WEBPACK_IMPORTED_MODULE_3_antd_lib_layout___default.a.Header,Footer=__WEBPACK_IMPORTED_MODULE_3_antd_lib_layout___default.a.Footer,Sider=__WEBPACK_IMPORTED_MODULE_3_antd_lib_layout___default.a.Sider,Content=__WEBPACK_IMPORTED_MODULE_3_antd_lib_layout___default.a.Content;var CompetitionContents=function(_Component){_inherits(CompetitionContents,_Component);function CompetitionContents(props){_classCallCheck(this,CompetitionContents);var _this=_possibleConstructorReturn(this,(CompetitionContents.__proto__||Object.getPrototypeOf(CompetitionContents)).call(this,props));_this.state={hash:undefined};return _this;}_createClass(CompetitionContents,[{key:'componentDidMount',value:function componentDidMount(){window.document.title='竞赛';this.props.MdifHasAnchorJustScorll();}},{key:'render',value:function render(){var _this2=this;var _props=this.props,mdContentdata=_props.mdContentdata,data=_props.data;//mdhash滚动
this.props.MdifHasAnchorJustScorll();return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('div',{className:"fr"},data&&data.permission.editable===true?this.props.Competitionedittype===false?this.props.has_url===false?__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_antd_lib_button___default.a,{className:"fr",type:'primary',ghost:true,onClick:function onClick(){return _this2.props.Competitionedit();}},'\u7F16\u8F91'):"":"":"",__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('div',{className:this.props.current_user&&this.props.current_user.admin===true||this.props.current_user&&this.props.current_user.business===true?"mt50 mb100 ":"mb100 "},__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(Content,{className:"markdown-body",dangerouslySetInnerHTML:{__html:Object(__WEBPACK_IMPORTED_MODULE_6_educoder__["X" /* markdownToHTML */])(mdContentdata===undefined?"":mdContentdata.md_content===undefined||mdContentdata.md_content===null?"":mdContentdata.md_content).replace(/▁/g,"▁▁▁")}}),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('div',{className:"mt30"},__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6_educoder__["b" /* AttachmentList */],Object.assign({},this.props,this.state,{attachments:mdContentdata===undefined?[]:mdContentdata.attachments===undefined?[]:mdContentdata.attachments})))));}}]);return CompetitionContents;}(__WEBPACK_IMPORTED_MODULE_4_react__["Component"]);/* harmony default export */ __webpack_exports__["a"] = (CompetitionContents);
/***/ }),
/***/ 4845:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_table_style_css__ = __webpack_require__(1242);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_table_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_antd_lib_table_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_table__ = __webpack_require__(1243);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_table___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_antd_lib_table__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_row_style_css__ = __webpack_require__(1482);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_row_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_antd_lib_row_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_row__ = __webpack_require__(1483);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_row___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_antd_lib_row__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_antd_lib_col_style_css__ = __webpack_require__(1484);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_antd_lib_col_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_antd_lib_col_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_antd_lib_col__ = __webpack_require__(1485);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_antd_lib_col___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_antd_lib_col__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_antd_lib_badge_style_css__ = __webpack_require__(1922);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_antd_lib_badge_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_antd_lib_badge_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_antd_lib_badge__ = __webpack_require__(1925);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_antd_lib_badge___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_antd_lib_badge__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_antd_lib_button_style_css__ = __webpack_require__(87);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_antd_lib_button_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_antd_lib_button_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_antd_lib_button__ = __webpack_require__(74);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_antd_lib_button___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_antd_lib_button__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_antd_lib_card_style_css__ = __webpack_require__(1768);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_antd_lib_card_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_antd_lib_card_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_antd_lib_card__ = __webpack_require__(1771);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_antd_lib_card___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_antd_lib_card__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_antd_lib_tabs_style_css__ = __webpack_require__(1499);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_antd_lib_tabs_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_12_antd_lib_tabs_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13_antd_lib_tabs__ = __webpack_require__(1500);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13_antd_lib_tabs___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_13_antd_lib_tabs__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14_antd_lib_layout_style_css__ = __webpack_require__(2392);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14_antd_lib_layout_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_14_antd_lib_layout_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15_antd_lib_layout__ = __webpack_require__(2393);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15_antd_lib_layout___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_15_antd_lib_layout__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_16_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17_educoder__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18_axios__ = __webpack_require__(15);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18_axios___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_18_axios__);
var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}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;}var Content=__WEBPACK_IMPORTED_MODULE_15_antd_lib_layout___default.a.Content;var TabPane=__WEBPACK_IMPORTED_MODULE_13_antd_lib_tabs___default.a.TabPane;var Meta=__WEBPACK_IMPORTED_MODULE_11_antd_lib_card___default.a.Meta;var CompetitionContents=function(_Component){_inherits(CompetitionContents,_Component);function CompetitionContents(props){_classCallCheck(this,CompetitionContents);var _this=_possibleConstructorReturn(this,(CompetitionContents.__proto__||Object.getPrototypeOf(CompetitionContents)).call(this,props));_this.derivefun=function(url){__WEBPACK_IMPORTED_MODULE_18_axios___default.a.get(url).then(function(response){if(response===undefined){return;}if(response.data.status&&response.data.status===-1){_this.props.showNotification(response.data.message);}else if(response.data.status&&response.data.status===-2){// if(response.data.message === "100"){
// // 已超出文件导出的上限数量100 ),建议:
//
// this.setState({
// DownloadType:true,
// DownloadMessageval:100
// })
// }else {
// //因附件资料超过500M
// this.setState({
// DownloadType:true,
// DownloadMessageval:500
// })
// }
_this.props.showNotification(response.data.message);}else{// this.props.showNotification(`正在下载中`);
// window.open("/api"+url, '_blank');
_this.props.slowDownload(url);}}).catch(function(error){console.log(error);});};_this.state={personal:undefined};return _this;}_createClass(CompetitionContents,[{key:'componentDidMount',value:function componentDidMount(){var _this2=this;window.document.title='竞赛';var url='/competitions/'+this.props.match.params.identifier+'/competition_staff.json';__WEBPACK_IMPORTED_MODULE_18_axios___default.a.get(url).then(function(response){if(response.status===200){console.log(response);_this2.setState({personal:response.data.personal});}}).catch(function(error){console.log(error);});this.props.MdifHasAnchorJustScorll();}},{key:'render',value:function render(){var _this3=this;this.props.MdifHasAnchorJustScorll();var operations=__WEBPACK_IMPORTED_MODULE_16_react___default.a.createElement('div',null,__WEBPACK_IMPORTED_MODULE_16_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9_antd_lib_button___default.a,{className:"fr",type:'primary',ghost:true,onClick:function onClick(){return _this3.props.Competitionedit();}},'\u7F16\u8F91'),__WEBPACK_IMPORTED_MODULE_16_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9_antd_lib_button___default.a,{className:"fr mr20",type:'primary',ghost:true},__WEBPACK_IMPORTED_MODULE_16_react___default.a.createElement('a',{onClick:function onClick(){return _this3.derivefun('/competitions/'+_this3.props.match.params.identifier+'/charts.xlsx');}},'\u5BFC\u51FA')));var columns=[{title:'usersum',dataIndex:'usersum',key:'name',render:function render(text){return __WEBPACK_IMPORTED_MODULE_16_react___default.a.createElement('span',{className:"color-blue"},text);}},{title:'userimg',dataIndex:'userimg',key:'userimg',render:function render(text,record){return __WEBPACK_IMPORTED_MODULE_16_react___default.a.createElement('a',{href:'/users/'+record.user_login,target:"_blank",className:'color-dark'},__WEBPACK_IMPORTED_MODULE_16_react___default.a.createElement('div',{className:"relativef"},__WEBPACK_IMPORTED_MODULE_16_react___default.a.createElement('img',{className:"Competitionuserimg mb10",src:Object(__WEBPACK_IMPORTED_MODULE_17_educoder__["M" /* getImageUrl */])('images/'+(record.userimg===null?'avatars/User/0?1442652658':record.userimg))}),__WEBPACK_IMPORTED_MODULE_16_react___default.a.createElement('div',{className:"competimgabsoluteijmg"},__WEBPACK_IMPORTED_MODULE_16_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_antd_lib_badge___default.a,{count:record.competition_prize,style:{backgroundColor:'#459BE5'},title:record.competition_prize}))));}},{title:'username',dataIndex:'username',key:'username',render:function render(text){return __WEBPACK_IMPORTED_MODULE_16_react___default.a.createElement('span',_defineProperty({title:text},'title',text),text);}},{title:'school',dataIndex:'school',key:'school',render:function render(text){return __WEBPACK_IMPORTED_MODULE_16_react___default.a.createElement('span',_defineProperty({title:text},'title',text),text);}},{title:'spendtime',dataIndex:'spendtime',key:'spendtime',render:function render(text){return __WEBPACK_IMPORTED_MODULE_16_react___default.a.createElement('span',null,text);}},{title:'score',dataIndex:'score',key:'score',render:function render(text){return __WEBPACK_IMPORTED_MODULE_16_react___default.a.createElement('span',{className:"color-blue"},text);}}];var datas=[];var _props=this.props,chart_rules=_props.chart_rules,chartdata=_props.chartdata,data=_props.data;var personal=this.state.personal;if(this.props&&this.props.mode!=1){columns.some(function(item,key){if(item.title==="spendtime"){columns.splice(key,1);return true;}});}{chartdata===undefined?"":chartdata.teams.length===0?"":chartdata.teams.map(function(item,key){var list={usersum:key+1,userimg:item.user_image,username:personal===undefined||personal===null?item.record_user_name:personal===true?item.record_user_name:item.team_name,school:item.school_name,spendtime:item.spend_time,score:item.score<50?"< 50 分":item.score,user_login:item.user_login,competition_prize:item.competition_prize};datas.push(list);});}// console.log(this.props&&this.props.mode)
// console.log(columns)
return __WEBPACK_IMPORTED_MODULE_16_react___default.a.createElement('div',null,__WEBPACK_IMPORTED_MODULE_16_react___default.a.createElement('style',null,'\n\t\t\t\t\t\t.ant-tabs-nav .ant-tabs-tab{\n\t\t\t\t\t\t\t\tfont-size: 20px;\n\t\t\t\t\t\t\t\tmargin: 0 10px 0 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.ant-badge{\n\t\t\t\t\t\t\t\twidth:90px;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.ant-badge sup{\n\t\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\t\ttext-overflow: ellipsis;\n\t\t\t\t\t\t\twhite-space: nowrap;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t'),chart_rules===undefined?"":__WEBPACK_IMPORTED_MODULE_16_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_13_antd_lib_tabs___default.a,{onChange:function onChange(e){return _this3.props.Competitioncallback(e);},activeKey:this.props.tabkey,tabBarExtraContent:data&&data.permission.editable===true?this.props.Competitionedittype===false?this.props.has_url===false?operations:"":"":""},chart_rules.stages.map(function(item,key){return __WEBPACK_IMPORTED_MODULE_16_react___default.a.createElement(TabPane,{tab:item.name,key:item.id===null?0:item.id},chart_rules.rule_contents.map(function(items,keys){if(item.id===items.competition_stage_id){return __WEBPACK_IMPORTED_MODULE_16_react___default.a.createElement(Content,{key:keys,className:"markdown-body ",dangerouslySetInnerHTML:{__html:Object(__WEBPACK_IMPORTED_MODULE_17_educoder__["X" /* markdownToHTML */])(items.content===undefined||items.content===null?"":items.content).replace(/▁/g,"▁▁▁")}});}else if(item.id===null&&items.competition_stage_id===0){return __WEBPACK_IMPORTED_MODULE_16_react___default.a.createElement(Content,{key:keys,className:"markdown-body ",dangerouslySetInnerHTML:{__html:Object(__WEBPACK_IMPORTED_MODULE_17_educoder__["X" /* markdownToHTML */])(items.content===undefined||items.content===null?"":items.content).replace(/▁/g,"▁▁▁")}});}}));})),__WEBPACK_IMPORTED_MODULE_16_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_antd_lib_col___default.a,{className:'gutter-row Competitioncharts mt30 mb30'},'\u603B\u6392\u540D'),chartdata===undefined?"":chartdata.teams.length===0?__WEBPACK_IMPORTED_MODULE_16_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_antd_lib_col___default.a,{className:'gutter-row Competitioncharts mt30 mb30 rankbeicenter'},__WEBPACK_IMPORTED_MODULE_16_react___default.a.createElement('img',{src:Object(__WEBPACK_IMPORTED_MODULE_17_educoder__["M" /* getImageUrl */])('images/educoder/competitions/trophy.png')}),__WEBPACK_IMPORTED_MODULE_16_react___default.a.createElement('div',{className:"rankbei mt10"},'\u8981\u6293\u4F4F\u4E00\u5207\u673A\u4F1A\uFF0C\u5411\u6240\u6709\u4EBA\u8BC1\u660E\u4F60\u81EA\u5DF1\uFF0C\u8BC1\u660E\u4F60\u80FD\u591F\u8FCE\u63A5\u8363\u8000')):"",__WEBPACK_IMPORTED_MODULE_16_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_row___default.a,{calssName:"Competition399"},chartdata===undefined?"":chartdata.teams.length===0?"":chartdata.teams.map(function(item,key){if(key===1){return __WEBPACK_IMPORTED_MODULE_16_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_antd_lib_col___default.a,{className:'mt40',xs:{span:5,offset:1},lg:{span:6,offset:2}},__WEBPACK_IMPORTED_MODULE_16_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11_antd_lib_card___default.a,{className:"Competitionthird",cover:__WEBPACK_IMPORTED_MODULE_16_react___default.a.createElement('div',{className:"Competitionthirdbox center"},__WEBPACK_IMPORTED_MODULE_16_react___default.a.createElement('li',{className:'pr Competitioncenter'},__WEBPACK_IMPORTED_MODULE_16_react___default.a.createElement('img',{src:Object(__WEBPACK_IMPORTED_MODULE_17_educoder__["M" /* getImageUrl */])("images/educoder/huangguan-two.png")}),__WEBPACK_IMPORTED_MODULE_16_react___default.a.createElement('div',{className:"mt10"},__WEBPACK_IMPORTED_MODULE_16_react___default.a.createElement('a',{href:'/users/'+item.user_login,target:"_blank",className:'color-dark '},__WEBPACK_IMPORTED_MODULE_16_react___default.a.createElement('div',{className:"relativef"},__WEBPACK_IMPORTED_MODULE_16_react___default.a.createElement('img',
/***/ }),
/***/ 4846:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_upload_style_css__ = __webpack_require__(1118);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_upload_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_antd_lib_upload_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_upload__ = __webpack_require__(1119);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_upload___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_antd_lib_upload__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_button_style_css__ = __webpack_require__(87);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_button_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_antd_lib_button_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_button__ = __webpack_require__(74);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_button___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_antd_lib_button__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_antd_lib_icon_style_css__ = __webpack_require__(176);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_antd_lib_icon_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_antd_lib_icon_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_antd_lib_icon__ = __webpack_require__(26);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_antd_lib_icon___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_antd_lib_icon__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_antd_lib_tabs_style_css__ = __webpack_require__(1499);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_antd_lib_tabs_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_antd_lib_tabs_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_antd_lib_tabs__ = __webpack_require__(1500);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_antd_lib_tabs___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_antd_lib_tabs__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_axios__ = __webpack_require__(15);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_axios___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_axios__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_educoder__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__tpm_challengesnew_TPMMDEditor__ = __webpack_require__(334);
var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}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;}var TabPane=__WEBPACK_IMPORTED_MODULE_7_antd_lib_tabs___default.a.TabPane;var CompetitionContentsMd=function(_Component){_inherits(CompetitionContentsMd,_Component);function CompetitionContentsMd(props){_classCallCheck(this,CompetitionContentsMd);var _this=_possibleConstructorReturn(this,(CompetitionContentsMd.__proto__||Object.getPrototypeOf(CompetitionContentsMd)).call(this,props));_this.componentDidUpdate=function(prevState){if(prevState!=_this.props){_this.getchartdata();}};_this.getchartdata=function(){var _this$props=_this.props,mdContentdata=_this$props.mdContentdata,chart_rules=_this$props.chart_rules;// is_pdf: false
if(_this.props.module_type==="chart"){var type=true;if(chart_rules===undefined){}else{chart_rules.rule_contents.map(function(items,keys){debugger;if(parseInt(_this.props.tabkey)===items.competition_stage_id){console.log(items);_this.contentMdRef.current.setValue(items.content);_this.setState({contentFileList:undefined,chartmodule_id:items.id});type=false;}});if(type===true){_this.contentMdRef.current.setValue("");_this.setState({contentFileList:undefined,chartmodule_id:undefined});}}}else{var contentFileList=mdContentdata===undefined?[]:mdContentdata.attachments===undefined?[]:mdContentdata.attachments.map(function(item){return{id:item.id,uid:item.id,name:Object(__WEBPACK_IMPORTED_MODULE_10_educoder__["B" /* appendFileSizeToUploadFile */])(item),url:item.url,filesize:item.filesize,status:'done',response:{id:item.id}};});_this.setState({contentFileList:contentFileList});_this.contentMdRef.current.setValue(mdContentdata===undefined?"":mdContentdata.md_content===undefined?"":mdContentdata.md_content||'');}};_this.handleContentUploadChange=function(info){if(info.file.status==='uploading'||info.file.status==='done'||info.file.status==='removed'){var contentFileList=info.fileList;_this.setState({contentFileList:Object(__WEBPACK_IMPORTED_MODULE_10_educoder__["C" /* appendFileSizeToUploadFileAll */])(contentFileList)});}};_this.onAttachmentRemove=function(file,stateName){if(file.response!=undefined){_this.props.confirm({content:'是否确认删除?',onOk:function onOk(){_this.deleteAttachment(file,stateName);},onCancel:function onCancel(){console.log('Cancel');}});return false;}};_this.deleteAttachment=function(file,stateName){// 初次上传不能直接取uid
var url='/attachments/'+(file.response?file.response.id:file.uid)+'.json';__WEBPACK_IMPORTED_MODULE_9_axios___default.a.delete(url,{}).then(function(response){if(response.data){var status=response.data.status;if(status==0){console.log('--- success');_this.props.showNotification(response.data.message);_this.setState(function(state){var index=state[stateName].indexOf(file);var newFileList=state[stateName].slice();newFileList.splice(index,1);return _defineProperty({},stateName,newFileList);});}}}).catch(function(error){console.log(error);});};_this.handleSubmit=function(){var contentFileList=_this.state.contentFileList;var mdContnet=_this.contentMdRef.current.getValue().trim();// if(mdContnet.length>10000){
// this.props.showNotification("内容超过10000个字");
// return
// }
var attachment_ids=undefined;if(contentFileList!=undefined){attachment_ids=contentFileList.map(function(item){return item.response?item.response.id:item.id;});}var newstage_id=parseInt(_this.props.tabkey)===0||null?undefined:parseInt(_this.props.tabkey);var data={};if(_this.props.module_type==="chart"){data={md_content_id:_this.state.chartmodule_id,competition_module_id:_this.props.module_id,stage_id:newstage_id,content:mdContnet};}else{data={md_content_id:_this.props.mdContentdata.md_id,competition_module_id:_this.props.mdContentdata.id,content:mdContnet,attachment_ids:attachment_ids};}var url='/competitions/'+_this.props.match.params.identifier+'/update_md_content.json';__WEBPACK_IMPORTED_MODULE_9_axios___default.a.post(url,data).then(function(response){if(response.data.status===0){_this.props.showNotification(response.data.message);_this.props.getlistdata(_this.props.thiskeys,_this.props.tabkey);_this.props.hideCompetitionedit();}else{_this.props.showNotification(response.data.message);}}).catch(function(error){console.log(error);});};_this.contentMdRef=__WEBPACK_IMPORTED_MODULE_8_react___default.a.createRef();_this.state={contentFileList:[],chartmodule_id:undefined};return _this;}_createClass(CompetitionContentsMd,[{key:'componentDidMount',value:function componentDidMount(){window.document.title='竞赛';this.getchartdata();}},{key:'render',value:function render(){var _this2=this;var contentFileList=this.state.contentFileList;var chart_rules=this.props.chart_rules;var uploadProps={width:600,fileList:contentFileList,multiple:true,// https://github.com/ant-design/ant-design/issues/15505
// showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。
// showUploadList: false,
action:Object(__WEBPACK_IMPORTED_MODULE_10_educoder__["R" /* getUrl */])()+'/api/attachments.json',onChange:this.handleContentUploadChange,onRemove:function onRemove(file){return _this2.onAttachmentRemove(file,'contentFileList');},beforeUpload:function beforeUpload(file){console.log('beforeUpload',file.name);var isLt150M=file.size/1024/1024<150;if(!isLt150M){_this2.props.showNotification("文件大小必须小于150MB");}return isLt150M;}};// console.log(this.props.tabkey)
// console.log(chart_rules)
console.log(this.props.mdContentdata);return __WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement('div',null,chart_rules===undefined?"":this.props.module_type==="chart"?__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_antd_lib_tabs___default.a,{activeKey:this.props.tabkey,onChange:function onChange(e){return _this2.props.Competitioncallback(e);}},chart_rules.stages.map(function(item,key){return __WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(TabPane,{tab:item.name,key:item.id===null?0:item.id});})):"",__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11__tpm_challengesnew_TPMMDEditor__["a" /* default */],{ref:this.contentMdRef,placeholder:'\u8BF7\u8F93\u5165\u5185\u5BB9\u8BF4\u660E',mdID:'courseContentMD',refreshTimeout:1500,className:'courseMessageMD',initValue:this.state.description}),this.props.module_type==="chart"?"":__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_antd_lib_upload___default.a,Object.assign({},uploadProps,{className:'upload_1 newWorkUpload'}),__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_button___default.a,{className:'uploadBtn'},__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_antd_lib_icon___default.a,{type:'upload'}),' \u4E0A\u4F20\u9644\u4EF6'),'(\u5355\u4E2A\u6587\u4EF6150M\u4EE5\u5185)'),__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement('div',{className:'clearfix mt30 mb30'},__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_button___default.a,{type:'primary',onClick:this.handleSubmit,className:'defalutSubmitbtn fl mr20'},'\u63D0\u4EA4'),__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement('a',{className:'defalutCancelbtn fl',onClick:function onClick(){return _this2.props.hideCompetitionedit();}},'\u53D6\u6D88')));}}]);return CompetitionContentsMd;}(__WEBPACK_IMPORTED_MODULE_8_react__["Component"]);/* harmony default export */ __webpack_exports__["a"] = (CompetitionContentsMd);
/***/ }),
/***/ 4847:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_tabs_style_css__ = __webpack_require__(1499);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_tabs_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_antd_lib_tabs_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_tabs__ = __webpack_require__(1500);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_tabs___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_antd_lib_tabs__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_axios__ = __webpack_require__(15);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_axios___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_axios__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_educoder__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__CompetitionContentspdfChild_CompetitionContentspdfdownload__ = __webpack_require__(4848);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__CompetitionContentspdfChild_CompetitionContentspdfpeopledata__ = __webpack_require__(4851);
var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();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;}// import NoneData from "../../../courses/shixunHomework/shixunHomework";
var TabPane=__WEBPACK_IMPORTED_MODULE_1_antd_lib_tabs___default.a.TabPane;var CompetitionContentspdf=function(_Component){_inherits(CompetitionContentspdf,_Component);function CompetitionContentspdf(props){_classCallCheck(this,CompetitionContentspdf);var _this=_possibleConstructorReturn(this,(CompetitionContentspdf.__proto__||Object.getPrototypeOf(CompetitionContentspdf)).call(this,props));_this.Competitioncallback=function(key){_this.setState({Tabskey:key});};_this.state={Tabskey:"1"};return _this;}_createClass(CompetitionContentspdf,[{key:'componentDidMount',value:function componentDidMount(){window.document.title='竞赛';var query=this.props.location&&this.props.location.search;var types=query.split('user_id=');if(types[1]===undefined){}else{this.setState({Tabskey:"2"});}}},{key:'render',value:function render(){var _this2=this;return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('div',{className:"fr"},__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('div',{className:"mb100 "},__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_antd_lib_tabs___default.a,{defaultActiveKey:'1',onChange:function onChange(e){return _this2.Competitioncallback(e);},activeKey:this.state.Tabskey},__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(TabPane,{tab:'\u83B7\u5956\u8BC1\u4E66\u4E0B\u8F7D',key:'1'},this.state.Tabskey==="1"?__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5__CompetitionContentspdfChild_CompetitionContentspdfdownload__["a" /* default */],Object.assign({},this.props,this.state,{Competitioncallback:function Competitioncallback(e){return _this2.Competitioncallback(e);}})):""),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(TabPane,{tab:'\u5B8C\u5584\u4E2A\u4EBA\u4FE1\u606F',key:'2'},this.state.Tabskey==="2"?__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__CompetitionContentspdfChild_CompetitionContentspdfpeopledata__["a" /* default */],Object.assign({},this.props,this.state)):""))));}}]);return CompetitionContentspdf;}(__WEBPACK_IMPORTED_MODULE_2_react__["Component"]);/* harmony default export */ __webpack_exports__["a"] = (CompetitionContentspdf);
/***/ }),
/***/ 4848:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_table_style_css__ = __webpack_require__(1242);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_table_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_antd_lib_table_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_table__ = __webpack_require__(1243);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_table___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_antd_lib_table__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_divider_style_css__ = __webpack_require__(1412);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_divider_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_antd_lib_divider_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_divider__ = __webpack_require__(1413);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_divider___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_antd_lib_divider__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_antd_lib_row_style_css__ = __webpack_require__(1482);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_antd_lib_row_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_antd_lib_row_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_antd_lib_row__ = __webpack_require__(1483);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_antd_lib_row___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_antd_lib_row__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_antd_lib_col_style_css__ = __webpack_require__(1484);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_antd_lib_col_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_antd_lib_col_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_antd_lib_col__ = __webpack_require__(1485);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_antd_lib_col___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_antd_lib_col__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_axios__ = __webpack_require__(15);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_axios___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_axios__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_educoder__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__CompetitionContentspdfdownload_css__ = __webpack_require__(4849);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__CompetitionContentspdfdownload_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11__CompetitionContentspdfdownload_css__);
var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();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;}// import NoneData from "../../../courses/shixunHomework/shixunHomework";
var CompetitionContentspdfdownload=function(_Component){_inherits(CompetitionContentspdfdownload,_Component);function CompetitionContentspdfdownload(props){_classCallCheck(this,CompetitionContentspdfdownload);var _this=_possibleConstructorReturn(this,(CompetitionContentspdfdownload.__proto__||Object.getPrototypeOf(CompetitionContentspdfdownload)).call(this,props));_this.state={data:undefined,teams:undefined};return _this;}_createClass(CompetitionContentspdfdownload,[{key:'componentDidMount',value:function componentDidMount(){var _this2=this;window.document.title='竞赛';var url='/competitions/'+this.props.match.params.identifier+'/prize.json';var query=this.props.location&&this.props.location.search;var types=query.split('user_id=');var userid=void 0;if(types[1]===undefined){userid=this.props.user&&this.props.user.user_id;}else{userid=types[1];}__WEBPACK_IMPORTED_MODULE_9_axios___default.a.get(url,{params:{user_id:userid}}).then(function(response){if(response.status===200){var datas=response.data.teams;if(datas.length>0){datas.map(function(item,key){var lista=item.team_members;if(lista.length>0){console.log(lista);lista.map(function(i,k){i["bank_account"]=item.bank_account;});}});}_this2.setState({data:response.data,teams:datas});}}).catch(function(error){console.log(error);});}},{key:'render',value:function render(){var _this3=this;var _state=this.state,data=_state.data,teams=_state.teams;var columns=[{title:'角色',dataIndex:'type',key:'type',render:function render(text,record){return __WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement('span',null,record.role);}},{title:'姓名',dataIndex:'name',key:'name',render:function render(text,record){return __WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement('span',null,record.name);}},{title:'实名认证',dataIndex:'namecertify',key:'namecertify',render:function render(text,record){return __WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement('span',null,record.real_name_auth==="authed"?__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement('span',{className:"pdfdownloadfont00CC5F"},'\u5DF2\u8BA4\u8BC1'):record.real_name_auth==="authing"?__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement('span',{className:"pdfdownloadfontFF6602"},'\u5F85\u5BA1\u6838'):record.real_name_auth==="not_authed"?__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement('span',{className:"color-red"},'\u672A\u8BA4\u8BC1'):"");}},{title:'职业认证',key:'certify',dataIndex:'certify',render:function render(text,record){return __WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement('span',null,record.professional_auth==="authed"?__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement('span',{className:"pdfdownloadfont00CC5F"},'\u5DF2\u8BA4\u8BC1'):record.professional_auth==="authing"?__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement('span',{className:"pdfdownloadfontFF6602"},'\u5F85\u5BA1\u6838'):record.professional_auth==="not_authed"?__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement('span',{className:"color-red"},'\u672A\u8BA4\u8BC1'):"");}},{title:'手机绑定',key:'mobile',dataIndex:'mobile',render:function render(text,record){return __WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement('span',null,record.phone_binded===true?__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement('span',{className:"pdfdownloadfont00CC5F"},'\u5DF2\u7ED1\u5B9A'):__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement('span',{className:"color-red"},'\u672A\u7ED1\u5B9A'));}},{title:'邮箱绑定',key:'mail',dataIndex:'mail',render:function render(text,record){return __WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement('span',null,record.email_binded===true?__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement('span',{className:"pdfdownloadfont00CC5F"},'\u5DF2\u7ED1\u5B9A'):__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement('span',{className:"color-red"},'\u672A\u7ED1\u5B9A'));}},{title:'开户行及银行卡号信息(队长填写)',key:'idcard',dataIndex:'idcard',render:function render(value,record,index){if(ind
/***/ }),
/***/ 4849:
/***/ (function(module, exports, __webpack_require__) {
// style-loader: Adds some css to the DOM by adding a <style> tag
// load the styles
var content = __webpack_require__(4850);
if(typeof content === 'string') content = [[module.i, content, '']];
// Prepare cssTransformation
var transform;
var options = {"hmr":false}
options.transform = transform
// add the styles to the DOM
var update = __webpack_require__(313)(content, options);
if(content.locals) module.exports = content.locals;
/***/ }),
/***/ 4850:
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(312)(true);
// imports
// module
exports.push([module.i, ".pdfdownload{max-width:791px;height:40px;background:#f9f9f9;line-height:40px;padding-left:15px}.pdfpicture{font-size:16px;color:#000}.pdfdownloadfont4CACFF{color:#4cacff!important}.pdfdownloadfont00CC5F{color:#00cc5f}.pdfdownloadfontFF6602{color:#ff6602}", "", {"version":3,"sources":["/Users/hs/edu/educoder/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfdownload.css"],"names":[],"mappings":"AAAA,aACI,gBAAiB,AACjB,YAAa,AACb,mBAAmC,AACnC,iBAAkB,AAClB,iBAAmB,CACtB,AAED,YACI,eAAgB,AAChB,UAAwB,CAC3B,AAED,uBACI,uBAA0B,CAC7B,AAED,uBACI,aAAe,CAClB,AAED,uBACI,aAAe,CAClB","file":"CompetitionContentspdfdownload.css","sourcesContent":[".pdfdownload {\n max-width: 791px;\n height: 40px;\n background: rgba(249, 249, 249, 1);\n line-height: 40px;\n padding-left: 15px;\n}\n\n.pdfpicture {\n font-size: 16px;\n color: rgba(0, 0, 0, 1);\n}\n\n.pdfdownloadfont4CACFF {\n color: #4CACFF !important;\n}\n\n.pdfdownloadfont00CC5F {\n color: #00CC5F;\n}\n\n.pdfdownloadfontFF6602 {\n color: #FF6602;\n}\n"],"sourceRoot":""}]);
// exports
/***/ }),
/***/ 4851:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony export identityMap */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_axios__ = __webpack_require__(15);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_axios___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_axios__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_educoder__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__mycompetotionchild_css__ = __webpack_require__(3120);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__mycompetotionchild_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__mycompetotionchild_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__user_account_AccountBasicEdit__ = __webpack_require__(2386);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__courses_css_Courses_css__ = __webpack_require__(326);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__courses_css_Courses_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__courses_css_Courses_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__user_modal_RealNameCertificationModal__ = __webpack_require__(3119);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Phonenumberverification__ = __webpack_require__(4853);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Mailboxvalidation__ = __webpack_require__(4854);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__Bankcardnumberverification__ = __webpack_require__(4855);
var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();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;}var identityMap={"teacher":"教师","student":"学生","professional":"专业人士"};var CompetitionContentspdfpeopledata=function(_Component){_inherits(CompetitionContentspdfpeopledata,_Component);function CompetitionContentspdfpeopledata(props){_classCallCheck(this,CompetitionContentspdfpeopledata);var _this=_possibleConstructorReturn(this,(CompetitionContentspdfpeopledata.__proto__||Object.getPrototypeOf(CompetitionContentspdfpeopledata)).call(this,props));_this.GetuseridApi=function(id){//个人信息API 获取个人信息
var url='/users/accounts/'+id+'.json';__WEBPACK_IMPORTED_MODULE_1_axios___default.a.get(url).then(function(result){if(result.data){console.log("GetuseridApi");console.log(result.data);_this.setState({userdata:result.data});}}).catch(function(error){console.log(error);});};_this.GetawardinformationAPI=function(){var url='/competitions/'+_this.props.match.params.identifier+'/prize.json';var query=_this.props.location&&_this.props.location.search;var types=query.split('user_id=');var userid=void 0;if(types[1]===undefined){userid=_this.props.user&&_this.props.user.user_id;}else{userid=types[1];}__WEBPACK_IMPORTED_MODULE_1_axios___default.a.get(url,{params:{user_id:userid}}).then(function(result){if(result.data){_this.setState({formationdata:result.data.formationdata,bank_account_editable:result.data.bank_account_editable,//队长是否可以编辑
leader:result.data.leader,//是否是队长
bank_account:result.data.bank_account//队长银行卡号信息
});}}).catch(function(error){console.log(error);});};_this.getdata=function(id){_this.setState({certification:3});_this.GetuseridApi(id);};_this.onPhoneSubmit=function(){_this.props.form.validateFieldsAndScroll(function(err,values){if(!err){var id=_this.state.userdata.id;var reg=/^1\d{10}$/;if(reg.test(values.phone)){var url='/users/accounts/'+id+'/phone_bind.json';__WEBPACK_IMPORTED_MODULE_1_axios___default.a.post(url,{phone:values.phone,code:values.phoneValidateCode}).then(function(result){if(result){_this.props.showNotification("手机号码绑定成功!");_this.setState({phonebool:false});_this.getdata(_this.state.userdata.id);}}).catch(function(error){console.log(error);});}else{_this.props.showNotification("请输入有效的11位手机号码");}}});};_this.onEmailSubmit=function(){_this.props.form.validateFieldsAndScroll(function(err,values){if(!err){var id=_this.state.userdata.id;var reg=/^[a-zA-Z0-9]+([.\-_\\]*[a-zA-Z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/;if(reg.test(values.email)){var url='/users/accounts/'+id+'/email_bind.json';__WEBPACK_IMPORTED_MODULE_1_axios___default.a.post(url,{email:values.email,code:values.emailValidateCode}).then(function(result){if(result){_this.props.showNotification("邮箱地址绑定成功!");_this.setState({emailbool:false});_this.getdata(_this.state.userdata.id);}}).catch(function(error){console.log(error);});}else{_this.props.showNotification("请输入正确的邮箱地址");}}});};_this.hideUpdating=function(i){if(i===1){_this.setState({phonebool:false});}else if(i===2){_this.setState({emailbool:false});}else if(i===3){}};_this.getCode=function(index){var url='/accounts/get_verification_code.json';var login='';var values=_this.props.form.getFieldsValue();if(index==3){//绑定手机号码
login=values.phone;var reg=/^1\d{10}$/;if(reg.test(login)==false){_this.props.showNotification('\u8BF7\u5148\u8F93\u5165\u6B63\u786E\u7684\u624B\u673A\u53F7\u7801');return;}}else if(index==4){// 绑定邮箱
login=values.email;var _reg=/^[a-zA-Z0-9]+([.\-_\\]*[a-zA-Z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/;if(_reg.test(login)==false){_this.props.showNotification('\u8BF7\u5148\u8F93\u5165\u6B63\u786E\u7684\u90AE\u7BB1\u5730\u5740');return;}}var type=index;if(!login){_this.props.showNotification('\u8BF7\u5148\u8F93\u5165'+(index==3?"手机号码":"邮箱地址"));return;}__WEBPACK_IMPORTED_MODULE_1_axios___default.a.get(url,{params:{login:login,type:type}}).then(function(result){if(result){// 倒计时
_this.setState({secondsFlag:true});_this.remainTime();}}).catch(function(error){console.log(error);});};_this.remainTime=function(){_this.setState({seconds:60});_this.timer=setInterval(function(){var seconds=_this.state.seconds;var s=parseInt(seconds)-1;if(s>-1){_this.setState({seconds:s});}else{_this.setState({secondsFlag:false});clearInterval(_this.timer);}},1000);};_this.phonebools=function(){_this.setState({phonebool:true});};_this.emailbools=function(){console.log("点击了邮箱");_this.setState({emailbool:true});};_this.checkBasicInfo=function(index){if(_this.state.userdata.base_info_completed==true){_this.showRealNameCertificationModal(index);}else{try{_this.props.confirm({okText:'\u7ACB\u5373\u5B8C\u5584',content:'\u8BF7\u5148\u5B8C\u5584\u57FA\u672C\u4FE1\u606F',onOk:function onOk(){_this.props.history.push('/account/profile/edit');}});}catch(e){_this.props.history.push('/account/profile/edit');}}};_this.showRealNameCertificationModal=function(index){_this.setState({certification:index},function(){if(index==1){_this.realNameCertificationModal1.setVisible(true);}else if(index==2){_this.realNameCertificationModal2.setVisible(true);}});};_this.yhBankstrue=function(){_this.props.form.validateFieldsAndScroll(function(err,values){if(!err){var url='/competitions/'+_this.props.match.params.identifier+'/prize_leader_account.json';__WEBPACK_IMPORTED_MODULE_1_axios___default.a.patch(url,{user_id:_this.state.userdata.id,bank:values.openingbank,second_bank:values.subbranchs,card_no:values.subbranch}).then(function(result){try{if(result.data.status==0){// console.log(JSON.stringify(result));
_this.props.showNotification('\u63D0\u4EA4\u6210\u529F');_this.getdata(_this.state.userdata.id);_this.GetawardinformationAPI();}}catch(e){}}).catch(function(error){console.log(error);});}});};_this.onCancel=function(){_this.getdata(_this.state.userdata.id);};_this.bindRef=function(ref){_this.child=ref;};_this.Cancellationofapplication=function(index){var userid=void 0;var query=_this.props.location&&_this.props.location.search;var types=query.split('user_id=');if(types[1]===undefined){userid=_this.props.user&&_this.props.user.user_id;}else{userid=types[1];}var url="";if(index===1){url='/users/accounts/'+userid+'/authentication_apply.json';}else if(index===2){url='/users/accounts/'+userid+'/professional_auth_apply.json';}__WEBPACK_IMPORTED_MODULE_1_axios___default.a.delete(url).then(function(response){try{if(response.data.status==0){if(index===1){_this.props.showNotification('撤销实名认证成功');}else if(index===2){_this.props.showNotification('撤销职业认证成功');}try{_this.getdata(_this.state.userdata.id);}catch(e){}}}catch(e){}}).catch(function(error){console.log(error);});};_this.state={basicInfo:{},updating:'',secondsFlag:false,seconds:60,phonebool:false,emailbool:false,formationdata:[],bank_account_editable:false,leader:false,bank_account:undefined,certification:1,userdata:undefined};return _this;}_createClass(CompetitionContentspdfpeopledata,[{key:'componentDidMount',value:function componentDidMount(){window.document.title='竞赛';console.log("获取用户信息");console.log(this.props);this.GetawardinformationAPI();var query=this.props.location&&this.props.location.search;var types=query.split('user_id=');var userid=void 0;if(types[1]===undefined){userid=this.props.user&&this.props.user.user_id;}else{userid=types[1];}this.getdata(userid);this.GetuseridApi(userid);}// 绑定手机
// 绑定邮箱
//取消编辑
// 获取验证码
// 获取验证码倒计时
//立即认证
//绑定银行确认
//取消认证弹框
//撤销认证
},{key:'render',value:function render(){var _this2=this;var admins=this.props.user.admin;if(admins===undefined||admins===null){admins===false;}var _state=this.state,updating=_state.updating,seconds=_state.seconds,secondsFlag=_state.secondsFlag,userdata=_state.userdata,basicInfo=_state.basicInfo,phonebool=_state.phonebool,emailbool=_state.emailbool,certification=_state.certification,formationdata=_state.formationdata,bank_account_editable=_state.bank_account_editable,leader=_state.leader,bank_account=_state.bank_account;return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'flexdidirectionss mt17'},this.state.certification===1&&userdata?__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__user_modal_RealNameCertificationModal__["a" /* default */],Object.assign({},this.props,this.state,{basicInfo:userdata,wrappedComponentRef:function wrappedComponentRef(form){return _this2.realNameCertificationModal1=form;},certification:certification,Getdata:function Getdata(id){return _this2.getdata(id);},onCancel:function onCancel(){return _this2.onCancel();}})):"",this.state.certification===2&&userdata?__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__user_modal_RealNameCertificationModal__["a" /* default */],Object.assign({},this.props,this.state,{basicInfo:userdata,wrappedComponentRef:function wrappedComponentRef(form){return _this2.realNameCertificationModal2=form;},certification:certification,Getdata:function Getdata(id){return _this2.getdata(id);},onCancel:function onCancel(){return _this2.onCancel();}})):"",__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'flexdirections '},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('p',{className:'fontcolorsyslhei font-16 w98'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('span',{className:'fontcolorsysl font-16'},'*'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('span',null,'\u5B9E\u540D\u4FE1\u606F')),userdata&&userdata.authentication=="uncertified"?__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('p',{className:'fontcolorsyslhui font-14 w200'},'\u901A\u8FC7\u5B9E\u540D\u8BA4\u8BC1\u540E\u624D\u80FD\u83B7\u5F97\u8BC1\u4E66'):"",userdata&&userdata.authentication=="uncertified"?__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('p',{className:'fontcolorsysllan font-14 ml3 mycompitcursor',onClick:function onClick(){return _this2.checkBasicInfo(1);}},'\u7ACB\u5373\u8BA4\u8BC1'):""),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'flexdirections ml38 mt23'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('p',{className:'fontcolorsyslhui1'},'\u59D3\u540D\uFF1A'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('p',{className:'fontcolorsyslhei flexdirections'},userdata&&userdata.name,userdata&&userdata.authentication=="uncertified"?"":userdata&&userdata.authentication=="applying"?__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('p',{className:'flexdirections'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('p',{className:'iconfont icon-tishi colorgreenorg font-14 ml20'}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('p',{className:'colorgreenorg font-14 ml6'},'\u5F85\u5BA1\u6838\uFF01'),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('p',{className:'fontcolorsysllan borcolors font-12 w64 mycompitcursor',onClick:function onClick(){return _this2.Cancellationofapplication(1);}},'\u64A4\u9500\u8BA4\u8BC1')):__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('p',{className:'flexdirections'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('p',{className:'iconfont icon-wancheng colorgreenlight font-14 ml20'}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('p',{className:'colorgreenlight font-14 ml6'},'\u5DF2\u8BA4\u8BC1')))),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:'flexdirections ml38 mt19'},__WEBPACK_IMPORTED_MODULE_0_react___default.a.cre
/***/ }),
/***/ 4852:
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(312)(true);
// imports
// module
exports.push([module.i, ".flexdirectionjust{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.directstwebkitflex,.flexdirectionjust{-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center}.directstwebkitflex,.diredisplayitflex{display:-ms-flexbox;display:flex;display:-webkit-flex}.diredisplayitflex{-ms-flex-align:center;align-items:center}.flexdirection{-ms-flex-direction:row}.flexdirection,.flexdirections{display:-ms-flexbox;display:flex;flex-direction:row}.flexdirections{-ms-flex-direction:initial}.flexdirectionss{display:-ms-flexbox;display:flex;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.flexdidirectionss{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.flexdidireverses{display:-ms-flexbox;display:flex;-ms-flex-direction:column-reverse;flex-direction:column-reverse}.fontcolorsysl{color:red}.fontcolorsyslhei{color:#000}.fontcolorsyslhui{color:#888}.fontcolorsyslhui1{color:#666}.fontcolorsysllan{color:#4cacff}.fontcolorsysljin{color:#dd7600}.w200{width:200px}.w64{width:64px}.w60{width:60px}.w98{width:98px}.myysllineheight{line-height:40px}.myyslminwidth{min-width:60px}.myyslminwidth276{width:276px}.buttongo{background:#e7e7e7;border:1px solid #e7e7e7;width:60px;height:30px;border-radius:4px;color:#999;font-size:16px}.buttongo2{background:#4cacff;border:1px solid #4cacff;width:64px;height:32px;border-radius:4px;color:#fff;font-size:16px}.fontwenzi{text-align:center;line-height:30px}.mt17{margin-top:17px}.mt36{margin-top:36px}.mt19{margin-top:19px}.mt23{margin-top:23px}.mt34{margin-top:34px}.ml11{margin-left:11px}.ml38{margin-left:38px}.ml7{margin-left:7px}.colorgreenlight{color:#6ec76e}.colorgreenorg{color:#ff7300}.borcolors{border:1px solid #4cacff;text-align:center}.mycompitcursor{cursor:pointer}.basicForm{background:#fff;padding:30px;margin-bottom:10px;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;min-height:390px}.basicForm .title{font-size:16px;padding-left:30px;margin-bottom:10px}.flexTable{-ms-flex-direction:column;flex-direction:column}.flexRow,.flexTable{display:-ms-flexbox;display:flex}.mb15{margin-bottom:15px!important}.ant-btn{border-radius:2px}button.ant-btn.ant-btn-primary.grayBtn{background:#cbcbcb;border-color:#cbcbcb}.borderBottom{border-bottom:1px solid #4cacff}.formItemInline{display:-ms-flexbox;display:flex}.formItemInline .ant-form-item-control-wrapper{display:inline-block}.hideRequireTag .ant-form-item-required:before{display:none}.courseNormalForm .ant-input-affix-wrapper,.courseNormalForm .ant-input-lg,.courseNormalForm .ant-select-auto-complete.ant-select .ant-input,.courseNormalForm .ant-select-auto-complete.ant-select .ant-select-selection--single,.courseNormalForm .ant-select-search__field__mirror,.courseNormalForm .ant-select-selection--single,.courseNormalForm .ant-select-show-search{height:40px}.courseNormalForm .ant-select-selection-selected-value{line-height:38px}.courseNormalForm input{height:40px}.w300{width:300px}.w56{width:56px}", "", {"version":3,"sources":["/Users/hs/edu/educoder/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/mycompetotionchild.css"],"names":[],"mappings":"AAMA,mBACI,oBAAqB,AACrB,aAAc,AAKd,qBAAsB,AAClB,sBAAwB,CAC/B,AAGD,uCATI,0BAA2B,AACvB,sBAAuB,AAC3B,sBAAuB,AACnB,kBAAoB,CAc3B,AAED,uCATI,oBAAqB,AACrB,aAAc,AACd,oBAAsB,CAazB,AAND,mBAII,sBAAuB,AACnB,kBAAoB,CAC3B,AAMD,eAGI,sBAAwB,CAE3B,AAED,+BANI,oBAAqB,AACrB,aAAc,AAEV,kBAAoB,CAQ3B,AALD,gBAGI,0BAA4B,CAE/B,AAOD,iBACI,oBAAqB,AACrB,aAAc,AACd,+BAAgC,AAC5B,0BAA4B,CACnC,AASD,mBACI,oBAAqB,AACrB,aAAc,AACd,0BAA2B,AACvB,qBAAuB,CAC9B,AAQD,kBACI,oBAAqB,AACrB,aAAc,AACd,kCAAmC,AAC/B,6BAA+B,CACtC,AAED,eACI,SAAc,CACjB,AAED,kBACI,UAAc,CACjB,AAED,kBACI,UAAc,CACjB,AAED,mBACI,UAAe,CAClB,AAED,kBACI,aAAc,CACjB,AAED,kBACI,aAAc,CACjB,AAED,MACI,WAAa,CAChB,AAED,KACI,UAAY,CACf,AAED,KACI,UAAY,CACf,AAED,KACI,UAAY,CACf,AAED,iBACI,gBAAkB,CACrB,AAED,eACI,cAAgB,CACnB,AAED,kBACI,WAAa,CAChB,AAED,UACI,mBAAoB,AACpB,yBAA0B,AAC1B,WAAY,AACZ,YAAa,AACb,kBAAmB,AACnB,WAAe,AACf,c
// exports
/***/ }),
/***/ 4853:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony export identityMap */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_button_style_css__ = __webpack_require__(87);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_button_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_antd_lib_button_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_button__ = __webpack_require__(74);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_button___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_antd_lib_button__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_form_style_css__ = __webpack_require__(953);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_form_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_antd_lib_form_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_form__ = __webpack_require__(954);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_form___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_antd_lib_form__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_antd_lib_input_style_css__ = __webpack_require__(68);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_antd_lib_input_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_antd_lib_input_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_antd_lib_input__ = __webpack_require__(69);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_antd_lib_input___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_antd_lib_input__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_axios__ = __webpack_require__(15);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_axios___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_axios__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_educoder__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__mycompetotionchild_css__ = __webpack_require__(3120);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__mycompetotionchild_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9__mycompetotionchild_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__user_account_AccountBasicEdit__ = __webpack_require__(2386);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__courses_css_Courses_css__ = __webpack_require__(326);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__courses_css_Courses_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11__courses_css_Courses_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__user_modal_RealNameCertificationModal__ = __webpack_require__(3119);
var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();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;}var identityMap={"teacher":"教师","student":"学生","professional":"专业人士"};var Phonenumberverification=function(_Component){_inherits(Phonenumberverification,_Component);function Phonenumberverification(props){_classCallCheck(this,Phonenumberverification);var _this=_possibleConstructorReturn(this,(Phonenumberverification.__proto__||Object.getPrototypeOf(Phonenumberverification)).call(this,props));_this.onPhoneSubmit=function(){_this.props.form.validateFieldsAndScroll(function(err,values){if(!err){var id=_this.props.userdata.id;var reg=/^1\d{10}$/;if(reg.test(values.phone)){var url='/users/accounts/'+id+'/phone_bind.json';__WEBPACK_IMPORTED_MODULE_7_axios___default.a.post(url,{phone:values.phone,code:values.phoneValidateCode}).then(function(result){if(result){_this.props.showNotification("手机号码绑定成功!");_this.props.hideUpdating(1);_this.props.getdata(id);}}).catch(function(error){console.log(error);});}else{_this.props.showNotification("请输入有效的11位手机号码");}}});};_this.hideUpdating=function(i){if(i===1){_this.props.hideUpdating(1);}else if(i===2){_this.props.hideUpdating(2);}else if(i===3){}};_this.getCode=function(index){var url='/accounts/get_verification_code.json';var login='';var values=_this.props.form.getFieldsValue();if(index==3){//绑定手机号码
login=values.phone;var reg=/^1\d{10}$/;if(reg.test(login)==false){_this.props.showNotification('\u8BF7\u5148\u8F93\u5165\u6B63\u786E\u7684\u624B\u673A\u53F7\u7801');return;}}else if(index==4){// 绑定邮箱
login=values.email;var _reg=/^[a-zA-Z0-9]+([.\-_\\]*[a-zA-Z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/;if(_reg.test(login)==false){_this.props.showNotification('\u8BF7\u5148\u8F93\u5165\u6B63\u786E\u7684\u90AE\u7BB1\u5730\u5740');return;}}var type=index;if(!login){_this.props.showNotification('\u8BF7\u5148\u8F93\u5165'+(index==3?"手机号码":"邮箱地址"));return;}__WEBPACK_IMPORTED_MODULE_7_axios___default.a.get(url,{params:{login:login,type:type}}).then(function(result){if(result){// 倒计时
_this.setState({secondsFlag:true});_this.remainTime();}}).catch(function(error){console.log(error);});};_this.remainTime=function(){_this.setState({seconds:60});_this.timer=setInterval(function(){var seconds=_this.state.seconds;var s=parseInt(seconds)-1;if(s>-1){_this.setState({seconds:s});}else{_this.setState({secondsFlag:false});clearInterval(_this.timer);}},1000);};_this.phonebools=function(){_this.setState({phonebool:true});};_this.state={updating:'',secondsFlag:false,seconds:60,phonebool:false,emailbool:false,formationdata:[],bank_account_editable:false,leader:false,bank_account:undefined,certification:1};return _this;}_createClass(Phonenumberverification,[{key:'componentDidMount',value:function componentDidMount(){window.document.title='竞赛';// console.log("获取用户信息");
// console.log(this.props);
}// 绑定手机
//取消编辑
// 获取验证码
// 获取验证码倒计时
},{key:'render',value:function render(){var _this2=this;var getFieldDecorator=this.props.form.getFieldDecorator;var _state=this.state,updating=_state.updating,seconds=_state.seconds,secondsFlag=_state.secondsFlag,phonebool=_state.phonebool,emailbool=_state.emailbool,certification=_state.certification,formationdata=_state.formationdata,bank_account_editable=_state.bank_account_editable,leader=_state.leader,bank_account=_state.bank_account;var basicInfo=this.props.basicInfo;console.log(emailbool);return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('div',null,__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('style',null,'\n\n .flexRow {\n padding: 20px 0;\n }\n .flexRow .name {\n margin-left: 12px;\n color: #666666;\n\n text-align: center;\n flex: 0 0 100px;\n }\n .flexRow .description {\n margin-left: 10px;\n flex: 1;\n color: #CDCDCD;\n }\n .description span {\n margin-right: 20px;\n color: #05101A;\n }\n .flexRow .status {\n width: 100px;\n color: #28AC7F;\n text-align: right;\n }\n .flexTable .flexTable {\n border-bottom: 1px solid #EBEBEB;\n }\n \n .settingForm label{\n color: #666666;\n font-size: 14px !important ; \n }\n .settingForm input {\n width: 340px;\n height: 40px;\n }\n .settingForm input.validateInput {\n width: 220px;\n }\n .settingForm .formItemInline button {\n width: 110px;\n margin-left: 10px;\n }\n .settingForm .ant-form-item-label {\n text-align: left;\n width: 84px;\n }\n .formItemInline .ant-form-explain{\n position:absolute;\n bottom:-22px;\n left:0px;\n width:100%;\n }\n '),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('div',{className:'settingForm ml38'},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Fragment,null,__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_form___default.a,null,__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_form___default.a.Item,{label:'\u4F60\u7684\u624B\u673A\u53F7',className:'formItemInline hideRequireTag mb20 mt20'},getFieldDecorator('phone',{rules:[{// initialValue: this.state.cityDefaultValue,
required:true,message:'\u8BF7\u8F93\u5165\u8981'+(basicInfo.phone?'更换':'绑定')+'\u7684\u624B\u673A\u53F7\u7801'}]})(__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_antd_lib_input___default.a,{placeholder:'\u8BF7\u8F93\u5165\u8981'+(basicInfo.phone?'更换':'绑定')+'\u7684\u624B\u673A\u53F7\u7801'}))),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_form___default.a.Item,{label:'\u624B\u673A\u9A8C\u8BC1\u7801',className:'mb20 formItemInline hideRequireTag'},getFieldDecorator('phoneValidateCode',{rules:[{// initialValue: this.state.cityDefaultValue,
required:true,message:'请输入手机获取的验证码'}]})(__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_antd_lib_input___default.a,{placeholder:'\u8BF7\u8F93\u5165\u624B\u673A\u83B7\u53D6\u7684\u9A8C\u8BC1\u7801',className:'validateInput'})),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_antd_lib_button___default.a,{type:'primary',disabled:secondsFlag,onClick:function onClick(){return _this2.getCode(3);}},!secondsFlag?"获取验证码":'\u91CD\u65B0\u53D1\u9001'+seconds+'s')),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('div',{className:'mb20',style:{marginLeft:'204px'}},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_antd_lib_button___default.a,{type:'primary',onClick:function onClick(){return _this2.onPhoneSubmit();}},'\u786E\u5B9A'),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_antd_lib_button___default.a,{type:'primary grayBtn',style:{marginLeft:'20px'},onClick:function onClick(){return _this2.hideUpdating(1);}},'\u53D6\u6D88'))))));}}]);return Phonenumberverification;}(__WEBPACK_IMPORTED_MODULE_6_react__["Component"]);var Phonenumberverifications=__WEBPACK_IMPORTED_MODULE_3_antd_lib_form___default.a.create({name:'Phonenumberverification'})(Phonenumberverification);/* harmony default export */ __webpack_exports__["a"] = (Phonenumberverifications);
/***/ }),
/***/ 4854:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony export identityMap */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_button_style_css__ = __webpack_require__(87);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_button_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_antd_lib_button_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_button__ = __webpack_require__(74);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_button___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_antd_lib_button__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_form_style_css__ = __webpack_require__(953);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_form_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_antd_lib_form_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_form__ = __webpack_require__(954);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_form___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_antd_lib_form__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_antd_lib_input_style_css__ = __webpack_require__(68);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_antd_lib_input_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_antd_lib_input_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_antd_lib_input__ = __webpack_require__(69);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_antd_lib_input___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_antd_lib_input__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_axios__ = __webpack_require__(15);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_axios___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_axios__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_educoder__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__mycompetotionchild_css__ = __webpack_require__(3120);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__mycompetotionchild_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9__mycompetotionchild_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__user_account_AccountBasicEdit__ = __webpack_require__(2386);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__courses_css_Courses_css__ = __webpack_require__(326);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__courses_css_Courses_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11__courses_css_Courses_css__);
var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();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;}var identityMap={"teacher":"教师","student":"学生","professional":"专业人士"};var Mailboxvalidation=function(_Component){_inherits(Mailboxvalidation,_Component);function Mailboxvalidation(props){_classCallCheck(this,Mailboxvalidation);var _this=_possibleConstructorReturn(this,(Mailboxvalidation.__proto__||Object.getPrototypeOf(Mailboxvalidation)).call(this,props));_this.onEmailSubmit=function(){_this.props.form.validateFieldsAndScroll(function(err,values){if(!err){var id=_this.props.userdata.id;var reg=/^[a-zA-Z0-9]+([.\-_\\]*[a-zA-Z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/;if(reg.test(values.email)){var url='/users/accounts/'+id+'/email_bind.json';__WEBPACK_IMPORTED_MODULE_7_axios___default.a.post(url,{email:values.email,code:values.emailValidateCode}).then(function(result){if(result){_this.props.showNotification("邮箱地址绑定成功!");_this.hideUpdating(2);_this.props.getdata(id);}}).catch(function(error){console.log(error);});}else{_this.props.showNotification("请输入正确的邮箱地址");}}});};_this.hideUpdating=function(i){if(i===1){_this.props.hideUpdating(1);}else if(i===2){_this.props.hideUpdating(2);}else if(i===3){}};_this.getCode=function(index){var url='/accounts/get_verification_code.json';var login='';var values=_this.props.form.getFieldsValue();if(index==3){//绑定手机号码
login=values.phone;var reg=/^1\d{10}$/;if(reg.test(login)==false){_this.props.showNotification('\u8BF7\u5148\u8F93\u5165\u6B63\u786E\u7684\u624B\u673A\u53F7\u7801');return;}}else if(index==4){// 绑定邮箱
login=values.email;var _reg=/^[a-zA-Z0-9]+([.\-_\\]*[a-zA-Z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/;if(_reg.test(login)==false){_this.props.showNotification('\u8BF7\u5148\u8F93\u5165\u6B63\u786E\u7684\u90AE\u7BB1\u5730\u5740');return;}}var type=index;if(!login){_this.props.showNotification('\u8BF7\u5148\u8F93\u5165'+(index==3?"手机号码":"邮箱地址"));return;}__WEBPACK_IMPORTED_MODULE_7_axios___default.a.get(url,{params:{login:login,type:type}}).then(function(result){if(result){// 倒计时
_this.setState({secondsFlag:true});_this.remainTime();}}).catch(function(error){console.log(error);});};_this.remainTime=function(){_this.setState({seconds:60});_this.timer=setInterval(function(){var seconds=_this.state.seconds;var s=parseInt(seconds)-1;if(s>-1){_this.setState({seconds:s});}else{_this.setState({secondsFlag:false});clearInterval(_this.timer);}},1000);};_this.phonebools=function(){_this.setState({phonebool:true});};_this.emailbools=function(){console.log("点击了邮箱");_this.setState({emailbool:true});};_this.state={basicInfo:{},updating:'',secondsFlag:false,seconds:60,phonebool:false,emailbool:false,formationdata:[],bank_account_editable:false,leader:false,bank_account:undefined,certification:1};return _this;}_createClass(Mailboxvalidation,[{key:'componentDidMount',value:function componentDidMount(){window.document.title='竞赛';// console.log("3获取用户信息");
// console.log(this.props);
}// 绑定邮箱
//取消编辑
// 获取验证码
// 获取验证码倒计时
},{key:'render',value:function render(){var _this2=this;var getFieldDecorator=this.props.form.getFieldDecorator;var _state=this.state,updating=_state.updating,seconds=_state.seconds,secondsFlag=_state.secondsFlag,basicInfo=_state.basicInfo,phonebool=_state.phonebool,emailbool=_state.emailbool,certification=_state.certification,formationdata=_state.formationdata,bank_account_editable=_state.bank_account_editable,leader=_state.leader,bank_account=_state.bank_account;console.log(emailbool);return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('div',null,__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('style',null,'\n\n .flexRow {\n padding: 20px 0;\n }\n .flexRow .name {\n margin-left: 12px;\n color: #666666;\n\n text-align: center;\n flex: 0 0 100px;\n }\n .flexRow .description {\n margin-left: 10px;\n flex: 1;\n color: #CDCDCD;\n }\n .description span {\n margin-right: 20px;\n color: #05101A;\n }\n .flexRow .status {\n width: 100px;\n color: #28AC7F;\n text-align: right;\n }\n .flexTable .flexTable {\n border-bottom: 1px solid #EBEBEB;\n }\n \n .settingForm label{\n color: #666666;\n font-size: 14px !important ; \n }\n .settingForm input {\n width: 340px;\n height: 40px;\n }\n .settingForm input.validateInput {\n width: 220px;\n }\n .settingForm .formItemInline button {\n width: 110px;\n margin-left: 10px;\n }\n .settingForm .ant-form-item-label {\n text-align: left;\n width: 84px;\n }\n \n \n .formItemInline .ant-form-explain{\n position:absolute;\n bottom:-22px;\n left:0px;\n width:100%;\n }\n '),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('div',{className:'settingForm ml38'},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Fragment,null,__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_form___default.a,null,__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_form___default.a.Item,{label:'\u90AE\u7BB1\u5730\u5740',className:'formItemInline hideRequireTag mb20 mt20'},getFieldDecorator('email',{rules:[{// initialValue: this.state.cityDefaultValue,
required:true,message:basicInfo&&basicInfo.mail?'请输入要更换的新邮箱地址':'请输入邮箱地址'}]})(__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_antd_lib_input___default.a,{placeholder:''+(basicInfo&&basicInfo.mail?'请输入要更换的新邮箱地址':'请输入邮箱地址')}))),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_form___default.a.Item,{label:'\u90AE\u7BB1\u9A8C\u8BC1\u7801',className:'mb20 formItemInline hideRequireTag'},getFieldDecorator('emailValidateCode',{rules:[{// initialValue: this.state.cityDefaultValue,
required:true,message:'请输入邮箱收到的验证码'}]})(__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_antd_lib_input___default.a,{placeholder:'\u8BF7\u8F93\u5165\u90AE\u7BB1\u6536\u5230\u7684\u9A8C\u8BC1\u7801',className:'validateInput'})),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_antd_lib_button___default.a,{type:'primary',disabled:secondsFlag,onClick:function onClick(){return _this2.getCode(4);}},!secondsFlag?"获取验证码":'\u91CD\u65B0\u53D1\u9001'+seconds+'s')),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('div',{className:'mb20',style:{marginLeft:'204px'}},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_antd_lib_button___default.a,{type:'primary',onClick:function onClick(){return _this2.onEmailSubmit();}},'\u786E\u5B9A'),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_antd_lib_button___default.a,{type:'primary grayBtn',style:{marginLeft:'20px'},onClick:function onClick(){return _this2.hideUpdating(2);}},'\u53D6\u6D88'))))));}}]);return Mailboxvalidation;}(__WEBPACK_IMPORTED_MODULE_6_react__["Component"]);var Mailboxvalidations=__WEBPACK_IMPORTED_MODULE_3_antd_lib_form___default.a.create({name:'Mailboxvalidation'})(Mailboxvalidation);/* harmony default export */ __webpack_exports__["a"] = (Mailboxvalidations);
/***/ }),
/***/ 4855:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony export identityMap */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_button_style_css__ = __webpack_require__(87);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_button_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_antd_lib_button_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_button__ = __webpack_require__(74);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_button___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_antd_lib_button__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_form_style_css__ = __webpack_require__(953);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_form_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_antd_lib_form_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_form__ = __webpack_require__(954);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_form___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_antd_lib_form__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_antd_lib_input_style_css__ = __webpack_require__(68);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_antd_lib_input_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_antd_lib_input_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_antd_lib_input__ = __webpack_require__(69);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_antd_lib_input___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_antd_lib_input__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_axios__ = __webpack_require__(15);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_axios___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_axios__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_educoder__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__mycompetotionchild_css__ = __webpack_require__(3120);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__mycompetotionchild_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9__mycompetotionchild_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__user_account_AccountBasicEdit__ = __webpack_require__(2386);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__courses_css_Courses_css__ = __webpack_require__(326);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__courses_css_Courses_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11__courses_css_Courses_css__);
var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();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;}var identityMap={"teacher":"教师","student":"学生","professional":"专业人士"};var Bankcardnumberverification=function(_Component){_inherits(Bankcardnumberverification,_Component);function Bankcardnumberverification(props){_classCallCheck(this,Bankcardnumberverification);var _this=_possibleConstructorReturn(this,(Bankcardnumberverification.__proto__||Object.getPrototypeOf(Bankcardnumberverification)).call(this,props));_this.componentDidUpdate=function(prevProps){if(prevProps.bank_account!=_this.props.bank_account){console.log("componentDidUpdate");console.log(_this.props);//是新数据
console.log(prevProps);//是老数据
////console.log("Registration");
////console.log("componentDidUpdate");
////console.log(this.props.user.admin);
try{if(_this.props.bank_account){_this.props.form.setFieldsValue({openingbank:_this.props.bank_account.bank,subbranch:_this.props.bank_account.second_bank,subbranchs:_this.props.bank_account.card_no});}_this.setState({openingbank:_this.props.bank_account.bank,subbranch:_this.props.bank_account.second_bank,subbranchs:_this.props.bank_account.card_no});}catch(e){}}};_this.yhBankstrue=function(){_this.props.form.validateFieldsAndScroll(function(err,values){if(!err){var url='/competitions/'+_this.props.match.params.identifier+'/prize_leader_account.json';__WEBPACK_IMPORTED_MODULE_7_axios___default.a.patch(url,{user_id:_this.props.userdata.id,bank:values.openingbank,second_bank:values.subbranch,card_no:values.subbranchs}).then(function(result){try{if(result.data.status===0){try{// console.log(values.openingbank);
// console.log(values.subbranch);
// console.log(values.subbranchs);
_this.props.form.setFieldsValue({openingbank:values.openingbank,subbranch:values.subbranch,subbranchs:values.subbranchs});_this.setState({openingbank:values.openingbank,subbranch:values.subbranch,subbranchs:values.subbranchs});}catch(e){}try{_this.props.showNotification('\u63D0\u4EA4\u6210\u529F,\u7B49\u5F85\u5BA1\u6838!');}catch(e){}try{_this.props.getdata(_this.props.userdata.id);}catch(e){}try{_this.props.GetawardinformationAPI();}catch(e){}}}catch(e){}}).catch(function(error){console.log(error);});}});};_this.state={basicInfo:{},updating:'',secondsFlag:false,seconds:60,phonebool:false,emailbool:false,formationdata:[],bank_account_editable:false,leader:false,bank_account:undefined,certification:1};return _this;}_createClass(Bankcardnumberverification,[{key:'componentDidMount',value:function componentDidMount(){window.document.title='竞赛';// console.log("3获取用户信息");
// console.log(this.props)
try{this.props.triggerRef(this);}catch(e){}console.log(this.props.bank_account);//初始化值
if(this.props.bank_account){this.props.form.setFieldsValue({openingbank:this.props.bank_account.bank,subbranch:this.props.bank_account.second_bank,subbranchs:this.props.bank_account.card_no});this.setState({openingbank:this.props.bank_account.bank,subbranch:this.props.bank_account.second_bank,subbranchs:this.props.bank_account.card_no});}}},{key:'setdata',value:function setdata(bank,second_bank,card_no){this.props.form.setFieldsValue({openingbank:bank,subbranch:second_bank,subbranchs:card_no});}},{key:'render',value:function render(){var _this2=this;var getFieldDecorator=this.props.form.getFieldDecorator;var _state=this.state,updating=_state.updating,seconds=_state.seconds,secondsFlag=_state.secondsFlag,basicInfo=_state.basicInfo,phonebool=_state.phonebool,emailbool=_state.emailbool,certification=_state.certification,formationdata=_state.formationdata,bank_account_editable=_state.bank_account_editable,leader=_state.leader,bank_account=_state.bank_account;return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('div',null,__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('div',{className:'flexdirections mt36'},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('p',{className:'fontcolorsyslhei font-16'},'\u7B7E/\u9886/\u5F00\u6237\u884C\u53CA\u94F6\u884C\u5361\u53F7'),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('p',{className:'fontcolorsyslhui font-14 ml11'},'\u4E3A\u4FDD\u969C\u5956\u91D1\u7684\u53CA\u65F6\u53D1\u653E\uFF0C\u8BF7\u961F\u957F\u5982\u5B9E\u586B\u5199\u4F60\u540D\u4E0B\u7684\u94F6\u884C\u5361\u4FE1\u606F')),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('div',{className:'ml38'},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('style',null,'\n\n .flexRow {\n padding: 20px 0;\n }\n .flexRow .name {\n margin-left: 12px;\n color: #666666;\n\n text-align: center;\n flex: 0 0 100px;\n }\n .flexRow .description {\n margin-left: 10px;\n flex: 1;\n color: #CDCDCD;\n }\n .description span {\n margin-right: 20px;\n color: #05101A;\n }\n .flexRow .status {\n width: 100px;\n color: #28AC7F;\n text-align: right;\n }\n .flexTable .flexTable {\n border-bottom: 1px solid #EBEBEB;\n }\n \n .settingFormsy label{\n color: #666666;\n font-size: 14px !important ; \n \n }\n .settingFormsy input {\n width: 340px;\n height: 40px;\n }\n .settingFormsy input.validateInput {\n width: 220px;\n }\n .settingFormsy .formItemInline button {\n width: 110px;\n margin-left: 10px;\n }\n .settingFormsy .ant-form-item-label {\n width: 60px;\n text-align: left;\n }\n .formItemInline .ant-form-explain{\n position:absolute;\n bottom:-22px;\n left:0px;\n width:100%;\n }\n .yslzxueshi .ant-input{\n\t\t\t\t\t\t\t\t\t\t\theight: 40px !important;\n\t\t\t\t\t\t\t\t\t\t\twidth: 276px !important\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t// class="ant-col ant-form-item-label"\n '),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('div',{className:'settingFormsy'},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Fragment,null,__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_form___default.a,null,__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_form___default.a.Item,{label:'\u5F00\u6237\u884C\uFF1A',classN
/***/ }),
/***/ 4856:
/***/ (function(module, exports, __webpack_require__) {
// style-loader: Adds some css to the DOM by adding a <style> tag
// load the styles
var content = __webpack_require__(4857);
if(typeof content === 'string') content = [[module.i, content, '']];
// Prepare cssTransformation
var transform;
var options = {"hmr":false}
options.transform = transform
// add the styles to the DOM
var update = __webpack_require__(313)(content, options);
if(content.locals) module.exports = content.locals;
/***/ }),
/***/ 4857:
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(312)(true);
// imports
// module
exports.push([module.i, ".teamsLayout,.teamsLayout .ant-layout-sider{background:transparent!important}.teamsLayout .ant-layout-sider{-ms-flex:0 0 180px!important;flex:0 0 180px!important;max-width:180px!important;min-width:180px!important;width:180px!important}.teamsLayout .teamsLayoutitle{font-size:18px;font-family:PingFangSC-Semibold,PingFang SC;font-weight:600;color:#05101a;line-height:25px;margin-top:10px;margin-bottom:10px}.ant-table-bordered .ant-table-tbody>tr>td,.teamsLayoutTable .ant-table-bordered .ant-table-thead>tr>th{border-right:1px solid transparent!important}.teamsLayoutTable .ant-table-body .ant-table-tbody>tr>td:last-child,.teamsLayoutTable .ant-table-body .ant-table-thead>tr>th:last-child{border-right:1px solid #e8e8e8!important}.teamsLayoutTable .ant-table-bordered .ant-table-thead>tr>th{background:#eee;font-size:14px;font-family:PingFangSC-Regular,PingFang SC;font-weight:400;color:#666;line-height:20px}.teamsLayoutTable .ant-table-bordered .ant-table-tbody>tr>th{background:#eee;font-size:14px;font-family:PingFangSC-Regular,PingFang SC;font-weight:400;color:#05101a;line-height:20px}.teamsLayout .mt40{margin-top:40px!important}.teamsLayoutheji{color:#878787;font-size:16px}.teamsLayoucolor-orange{color:#ff6800!important;font-size:16px}.CompetitionCommonbanner{padding:20px;background:#fff;-webkit-box-shadow:3px 2px 12px 2px rgba(0,0,0,.05);box-shadow:3px 2px 12px 2px rgba(0,0,0,.05);position:relative}.CompetitionCommonbannerfont{height:100%;width:365px!important;line-height:34px}.CompetitionCommonbannerfont .competitionbannerdiv:first-child{max-height:100px;font-size:25px;font-weight:400;color:#05101a;line-height:30px}.CompetitionCommonbannerfont .competitionbannerdiv:nth-child(2),.CompetitionCommonbannerfont .competitionbannerdiv:nth-child(3){max-height:70px;font-size:16px;font-weight:400;color:#05101a}.Competitioncolor9b{color:#9b9b9b}.Competitioncolor77{color:#777;font-size:14px}.Competitioncolor516{font-size:24px;color:#05101a}.Competitionfontsize22{font-size:22px;font-weight:500;color:#fff}.Competitionfontsize16{font-size:16px;font-weight:400;color:#666}.ant-layout-sider{position:relative;min-width:0;background:#001529;-webkit-transition:all .2s;-o-transition:all .2s;transition:all .2s}.CompetitionMenu .ant-menu-item:after{left:0!important;right:auto;border-right:5px solid #4cacff}.CompetitionMenu .ant-menu-item{height:30px;line-height:30px;background:none;color:#666}.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected{background-color:transparent}.CompetitionMenu .ant-menu-item:not(:last-child){margin-bottom:40px;background:transparent;color:#666}.CompetitionMenu .ant-menu-item{font-size:18px}.CompetitionMenu .ant-menu-item-selected{color:#4cacff!important}.CompetitionMenu{width:145px;background:#fff;border:1px solid #efefef;padding-top:20px;padding-bottom:40px!important}.teamsLayoutleft{background:transparent!important}.Competitioncharts{font-size:24px;color:#05101a}.Competitionfirst{width:233px;height:298px;background:#fafafa;-webkit-box-shadow:0 2px 8px 2px rgba(255,134,34,.5);box-shadow:0 2px 8px 2px rgba(255,134,34,.5);border-radius:5px}.Competitionsecondary{-webkit-box-shadow:0 3px 5px 0 #febe9a;box-shadow:0 3px 5px 0 #febe9a}.Competitionsecondary,.Competitionthird{width:234px;height:298px;background:#fafafa;border-radius:5px}.Competitionthird{-webkit-box-shadow:0 4px 5px 0 #c8c8ca;box-shadow:0 4px 5px 0 #c8c8ca}.Competition399{height:399px}.Competitiontransparent table{background:transparent}.Commonimg{position:absolute;right:-5px;width:93px;top:10px}.Competitionthirdbox{width:234px;height:167px;background:#dfdfe1;position:relative}.Competitionfirstbox{width:233px;height:167px;background:#ffe7a0;position:relative}.Competitionsecondarybox{width:234px;height:167px;background:#fde6d9;position:relative}.rankingimg{width:60px;height:60px;border-radius:50%!important;-webkit-box-shadow:0 0 12px rgba(0,0,0,.2);box-shadow:0 0 12px rgba(0,0,0,.2);border:2px solid #459be5}.Competitioncenter{text-align:center;padding-top:20px}.jinshaifont{font-size:16px;color:#05101a;margin-top:13px!important}.C
// exports
/***/ }),
/***/ 874:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
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; };
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
exports.convertFieldsError = convertFieldsError;
exports.format = format;
exports.isEmptyValue = isEmptyValue;
exports.isEmptyObject = isEmptyObject;
exports.asyncMap = asyncMap;
exports.complementError = complementError;
exports.deepMerge = deepMerge;
/* eslint no-console:0 */
var formatRegExp = /%[sdj%]/g;
var warning = exports.warning = function warning() {};
// don't print warning message when in production env or node runtime
if (false) {
exports.warning = warning = function warning(type, errors) {
if (typeof console !== 'undefined' && console.warn) {
if (errors.every(function (e) {
return typeof e === 'string';
})) {
console.warn(type, errors);
}
}
};
}
function convertFieldsError(errors) {
if (!errors || !errors.length) return null;
var fields = {};
errors.forEach(function (error) {
var field = error.field;
fields[field] = fields[field] || [];
fields[field].push(error);
});
return fields;
}
function format() {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
var i = 1;
var f = args[0];
var len = args.length;
if (typeof f === 'function') {
return f.apply(null, args.slice(1));
}
if (typeof f === 'string') {
var str = String(f).replace(formatRegExp, function (x) {
if (x === '%%') {
return '%';
}
if (i >= len) {
return x;
}
switch (x) {
case '%s':
return String(args[i++]);
case '%d':
return Number(args[i++]);
case '%j':
try {
return JSON.stringify(args[i++]);
} catch (_) {
return '[Circular]';
}
break;
default:
return x;
}
});
for (var arg = args[i]; i < len; arg = args[++i]) {
str += ' ' + arg;
}
return str;
}
return f;
}
function isNativeStringType(type) {
return type === 'string' || type === 'url' || type === 'hex' || type === 'email' || type === 'pattern';
}
function isEmptyValue(value, type) {
if (value === undefined || value === null) {
return true;
}
if (type === 'array' && Array.isArray(value) && !value.length) {
return true;
}
if (isNativeStringType(type) && typeof value === 'string' && !value) {
return true;
}
return false;
}
function isEmptyObject(obj) {
return Object.keys(obj).length === 0;
}
function asyncParallelArray(arr, func, callback) {
var results = [];
var total = 0;
var arrLength = arr.length;
function count(errors) {
results.push.apply(results, errors);
total++;
if (total === arrLength) {
callback(results);
}
}
arr.forEach(function (a) {
func(a, count);
});
}
function asyncSerialArray(arr, func, callback) {
var index = 0;
var arrLength = arr.length;
function next(errors) {
if (errors && errors.length) {
callback(errors);
return;
}
var original = index;
index = index + 1;
if (original < arrLength) {
func(arr[original], next);
} else {
callback([]);
}
}
next([]);
}
function flattenObjArr(objArr) {
var ret = [];
Object.keys(objArr).forEach(function (k) {
ret.push.apply(ret, objArr[k]);
});
return ret;
}
function asyncMap(objArr, option, func, callback) {
if (option.first) {
var flattenArr = flattenObjArr(objArr);
return asyncSerialArray(flattenArr, func, callback);
}
var firstFields = option.firstFields || [];
if (firstFields === true) {
firstFields = Object.keys(objArr);
}
var objArrKeys = Object.keys(objArr);
var objArrLength = objArrKeys.length;
var total = 0;
var results = [];
var pending = new Promise(function (resolve, reject) {
var next = function next(errors) {
results.push.apply(results, errors);
total++;
if (total === objArrLength) {
callback(results);
return results.length ? reject({ errors: results, fields: convertFieldsError(results) }) : resolve();
}
};
objArrKeys.forEach(function (key) {
var arr = objArr[key];
if (firstFields.indexOf(key) !== -1) {
asyncSerialArray(arr, func, next);
} else {
asyncParallelArray(arr, func, next);
}
});
});
pending['catch'](function (e) {
return e;
});
return pending;
}
function complementError(rule) {
return function (oe) {
if (oe && oe.message) {
oe.field = oe.field || rule.fullField;
return oe;
}
return {
message: typeof oe === 'function' ? oe() : oe,
field: oe.field || rule.fullField
};
};
}
function deepMerge(target, source) {
if (source) {
for (var s in source) {
if (source.hasOwnProperty(s)) {
var value = source[s];
if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && _typeof(target[s]) === 'object') {
target[s] = _extends({}, target[s], value);
} else {
target[s] = value;
}
}
}
}
return target;
}
/***/ }),
/***/ 875:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _required = __webpack_require__(927);
var _required2 = _interopRequireDefault(_required);
var _whitespace = __webpack_require__(1042);
var _whitespace2 = _interopRequireDefault(_whitespace);
var _type = __webpack_require__(1043);
var _type2 = _interopRequireDefault(_type);
var _range = __webpack_require__(1044);
var _range2 = _interopRequireDefault(_range);
var _enum = __webpack_require__(1045);
var _enum2 = _interopRequireDefault(_enum);
var _pattern = __webpack_require__(1046);
var _pattern2 = _interopRequireDefault(_pattern);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
exports['default'] = {
required: _required2['default'],
whitespace: _whitespace2['default'],
type: _type2['default'],
range: _range2['default'],
'enum': _enum2['default'],
pattern: _pattern2['default']
};
/***/ }),
/***/ 877:
/***/ (function(module, exports) {
/**
* Checks if `value` is classified as an `Array` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
* @example
*
* _.isArray([1, 2, 3]);
* // => true
*
* _.isArray(document.body.children);
* // => false
*
* _.isArray('abc');
* // => false
*
* _.isArray(_.noop);
* // => false
*/
var isArray = Array.isArray;
module.exports = isArray;
/***/ }),
/***/ 878:
/***/ (function(module, exports, __webpack_require__) {
var baseIsNative = __webpack_require__(960),
getValue = __webpack_require__(963);
/**
* Gets the native function at `key` of `object`.
*
* @private
* @param {Object} object The object to query.
* @param {string} key The key of the method to get.
* @returns {*} Returns the function if it's native, else `undefined`.
*/
function getNative(object, key) {
var value = getValue(object, key);
return baseIsNative(value) ? value : undefined;
}
module.exports = getNative;
/***/ }),
/***/ 879:
/***/ (function(module, exports, __webpack_require__) {
var eq = __webpack_require__(884);
/**
* Gets the index at which the `key` is found in `array` of key-value pairs.
*
* @private
* @param {Array} array The array to inspect.
* @param {*} key The key to search for.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function assocIndexOf(array, key) {
var length = array.length;
while (length--) {
if (eq(array[length][0], key)) {
return length;
}
}
return -1;
}
module.exports = assocIndexOf;
/***/ }),
/***/ 880:
/***/ (function(module, exports, __webpack_require__) {
var getNative = __webpack_require__(878);
/* Built-in method references that are verified to be native. */
var nativeCreate = getNative(Object, 'create');
module.exports = nativeCreate;
/***/ }),
/***/ 881:
/***/ (function(module, exports, __webpack_require__) {
var isKeyable = __webpack_require__(972);
/**
* Gets the data for `map`.
*
* @private
* @param {Object} map The map to query.
* @param {string} key The reference key.
* @returns {*} Returns the map data.
*/
function getMapData(map, key) {
var data = map.__data__;
return isKeyable(key)
? data[typeof key == 'string' ? 'string' : 'hash']
: data.map;
}
module.exports = getMapData;
/***/ }),
/***/ 882:
/***/ (function(module, exports, __webpack_require__) {
var isSymbol = __webpack_require__(322);
/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0;
/**
* Converts `value` to a string key if it's not a string or symbol.
*
* @private
* @param {*} value The value to inspect.
* @returns {string|symbol} Returns the key.
*/
function toKey(value) {
if (typeof value == 'string' || isSymbol(value)) {
return value;
}
var result = (value + '');
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
}
module.exports = toKey;
/***/ }),
/***/ 884:
/***/ (function(module, exports) {
/**
* Performs a
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* comparison between two values to determine if they are equivalent.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
* @example
*
* var object = { 'a': 1 };
* var other = { 'a': 1 };
*
* _.eq(object, object);
* // => true
*
* _.eq(object, other);
* // => false
*
* _.eq('a', 'a');
* // => true
*
* _.eq('a', Object('a'));
* // => false
*
* _.eq(NaN, NaN);
* // => true
*/
function eq(value, other) {
return value === other || (value !== value && other !== other);
}
module.exports = eq;
/***/ }),
/***/ 887:
/***/ (function(module, exports, __webpack_require__) {
var isArray = __webpack_require__(877),
isKey = __webpack_require__(900),
stringToPath = __webpack_require__(977),
toString = __webpack_require__(950);
/**
* Casts `value` to a path array if it's not one.
*
* @private
* @param {*} value The value to inspect.
* @param {Object} [object] The object to query keys on.
* @returns {Array} Returns the cast property path array.
*/
function castPath(value, object) {
if (isArray(value)) {
return value;
}
return isKey(value, object) ? [value] : stringToPath(toString(value));
}
module.exports = castPath;
/***/ }),
/***/ 888:
/***/ (function(module, exports, __webpack_require__) {
var listCacheClear = __webpack_require__(955),
listCacheDelete = __webpack_require__(956),
listCacheGet = __webpack_require__(957),
listCacheHas = __webpack_require__(958),
listCacheSet = __webpack_require__(959);
/**
* Creates an list cache object.
*
* @private
* @constructor
* @param {Array} [entries] The key-value pairs to cache.
*/
function ListCache(entries) {
var index = -1,
length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
// Add methods to `ListCache`.
ListCache.prototype.clear = listCacheClear;
ListCache.prototype['delete'] = listCacheDelete;
ListCache.prototype.get = listCacheGet;
ListCache.prototype.has = listCacheHas;
ListCache.prototype.set = listCacheSet;
module.exports = ListCache;
/***/ }),
/***/ 890:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony default export */ __webpack_exports__["a"] = ({
ZERO: 48,
NINE: 57,
NUMPAD_ZERO: 96,
NUMPAD_NINE: 105,
BACKSPACE: 8,
DELETE: 46,
ENTER: 13,
ARROW_UP: 38,
ARROW_DOWN: 40
});
/***/ }),
/***/ 893:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _createReactContext = _interopRequireDefault(__webpack_require__(316));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var MenuContext = (0, _createReactContext["default"])({
inlineCollapsed: false
});
var _default = MenuContext;
exports["default"] = _default;
//# sourceMappingURL=MenuContext.js.map
/***/ }),
/***/ 894:
/***/ (function(module, exports) {
/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER = 9007199254740991;
/** Used to detect unsigned integer values. */
var reIsUint = /^(?:0|[1-9]\d*)$/;
/**
* Checks if `value` is a valid array-like index.
*
* @private
* @param {*} value The value to check.
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
*/
function isIndex(value, length) {
var type = typeof value;
length = length == null ? MAX_SAFE_INTEGER : length;
return !!length &&
(type == 'number' ||
(type != 'symbol' && reIsUint.test(value))) &&
(value > -1 && value % 1 == 0 && value < length);
}
module.exports = isIndex;
/***/ }),
/***/ 895:
/***/ (function(module, exports) {
/**
* Checks if `value` is classified as an `Array` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
* @example
*
* _.isArray([1, 2, 3]);
* // => true
*
* _.isArray(document.body.children);
* // => false
*
* _.isArray('abc');
* // => false
*
* _.isArray(_.noop);
* // => false
*/
var isArray = Array.isArray;
module.exports = isArray;
/***/ }),
/***/ 896:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends2 = __webpack_require__(18);
var _extends3 = _interopRequireDefault(_extends2);
exports.argumentContainer = argumentContainer;
exports.identity = identity;
exports.flattenArray = flattenArray;
exports.treeTraverse = treeTraverse;
exports.flattenFields = flattenFields;
exports.normalizeValidateRules = normalizeValidateRules;
exports.getValidateTriggers = getValidateTriggers;
exports.getValueFromEvent = getValueFromEvent;
exports.getErrorStrs = getErrorStrs;
exports.getParams = getParams;
exports.isEmptyObject = isEmptyObject;
exports.hasRules = hasRules;
exports.startsWith = startsWith;
var _hoistNonReactStatics = __webpack_require__(1013);
var _hoistNonReactStatics2 = _interopRequireDefault(_hoistNonReactStatics);
var _warning = __webpack_require__(324);
var _warning2 = _interopRequireDefault(_warning);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function getDisplayName(WrappedComponent) {
return WrappedComponent.displayName || WrappedComponent.name || 'WrappedComponent';
}
function argumentContainer(Container, WrappedComponent) {
/* eslint no-param-reassign:0 */
Container.displayName = 'Form(' + getDisplayName(WrappedComponent) + ')';
Container.WrappedComponent = WrappedComponent;
return (0, _hoistNonReactStatics2['default'])(Container, WrappedComponent);
}
function identity(obj) {
return obj;
}
function flattenArray(arr) {
return Array.prototype.concat.apply([], arr);
}
function treeTraverse() {
var path = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
var tree = arguments[1];
var isLeafNode = arguments[2];
var errorMessage = arguments[3];
var callback = arguments[4];
if (isLeafNode(path, tree)) {
callback(path, tree);
} else if (tree === undefined || tree === null) {
// Do nothing
} else if (Array.isArray(tree)) {
tree.forEach(function (subTree, index) {
return treeTraverse(path + '[' + index + ']', subTree, isLeafNode, errorMessage, callback);
});
} else {
// It's object and not a leaf node
if (typeof tree !== 'object') {
(0, _warning2['default'])(false, errorMessage);
return;
}
Object.keys(tree).forEach(function (subTreeKey) {
var subTree = tree[subTreeKey];
treeTraverse('' + path + (path ? '.' : '') + subTreeKey, subTree, isLeafNode, errorMessage, callback);
});
}
}
function flattenFields(maybeNestedFields, isLeafNode, errorMessage) {
var fields = {};
treeTraverse(undefined, maybeNestedFields, isLeafNode, errorMessage, function (path, node) {
fields[path] = node;
});
return fields;
}
function normalizeValidateRules(validate, rules, validateTrigger) {
var validateRules = validate.map(function (item) {
var newItem = (0, _extends3['default'])({}, item, {
trigger: item.trigger || []
});
if (typeof newItem.trigger === 'string') {
newItem.trigger = [newItem.trigger];
}
return newItem;
});
if (rules) {
validateRules.push({
trigger: validateTrigger ? [].concat(validateTrigger) : [],
rules: rules
});
}
return validateRules;
}
function getValidateTriggers(validateRules) {
return validateRules.filter(function (item) {
return !!item.rules && item.rules.length;
}).map(function (item) {
return item.trigger;
}).reduce(function (pre, curr) {
return pre.concat(curr);
}, []);
}
function getValueFromEvent(e) {
// To support custom element
if (!e || !e.target) {
return e;
}
var target = e.target;
return target.type === 'checkbox' ? target.checked : target.value;
}
function getErrorStrs(errors) {
if (errors) {
return errors.map(function (e) {
if (e && e.message) {
return e.message;
}
return e;
});
}
return errors;
}
function getParams(ns, opt, cb) {
var names = ns;
var options = opt;
var callback = cb;
if (cb === undefined) {
if (typeof names === 'function') {
callback = names;
options = {};
names = undefined;
} else if (Array.isArray(names)) {
if (typeof options === 'function') {
callback = options;
options = {};
} else {
options = options || {};
}
} else {
callback = options;
options = names || {};
names = undefined;
}
}
return {
names: names,
options: options,
callback: callback
};
}
function isEmptyObject(obj) {
return Object.keys(obj).length === 0;
}
function hasRules(validate) {
if (validate) {
return validate.some(function (item) {
return item.rules && item.rules.length;
});
}
return false;
}
function startsWith(str, prefix) {
return str.lastIndexOf(prefix, 0) === 0;
}
/***/ }),
/***/ 897:
/***/ (function(module, exports, __webpack_require__) {
var getNative = __webpack_require__(878),
root = __webpack_require__(167);
/* Built-in method references that are verified to be native. */
var Map = getNative(root, 'Map');
module.exports = Map;
/***/ }),
/***/ 898:
/***/ (function(module, exports, __webpack_require__) {
var mapCacheClear = __webpack_require__(964),
mapCacheDelete = __webpack_require__(971),
mapCacheGet = __webpack_require__(973),
mapCacheHas = __webpack_require__(974),
mapCacheSet = __webpack_require__(975);
/**
* Creates a map cache object to store key-value pairs.
*
* @private
* @constructor
* @param {Array} [entries] The key-value pairs to cache.
*/
function MapCache(entries) {
var index = -1,
length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
// Add methods to `MapCache`.
MapCache.prototype.clear = mapCacheClear;
MapCache.prototype['delete'] = mapCacheDelete;
MapCache.prototype.get = mapCacheGet;
MapCache.prototype.has = mapCacheHas;
MapCache.prototype.set = mapCacheSet;
module.exports = MapCache;
/***/ }),
/***/ 899:
/***/ (function(module, exports) {
/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER = 9007199254740991;
/**
* Checks if `value` is a valid array-like length.
*
* **Note:** This method is loosely based on
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
* @example
*
* _.isLength(3);
* // => true
*
* _.isLength(Number.MIN_VALUE);
* // => false
*
* _.isLength(Infinity);
* // => false
*
* _.isLength('3');
* // => false
*/
function isLength(value) {
return typeof value == 'number' &&
value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}
module.exports = isLength;
/***/ }),
/***/ 900:
/***/ (function(module, exports, __webpack_require__) {
var isArray = __webpack_require__(877),
isSymbol = __webpack_require__(322);
/** Used to match property names within property paths. */
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
reIsPlainProp = /^\w*$/;
/**
* Checks if `value` is a property name and not a property path.
*
* @private
* @param {*} value The value to check.
* @param {Object} [object] The object to query keys on.
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
*/
function isKey(value, object) {
if (isArray(value)) {
return false;
}
var type = typeof value;
if (type == 'number' || type == 'symbol' || type == 'boolean' ||
value == null || isSymbol(value)) {
return true;
}
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
(object != null && value in Object(object));
}
module.exports = isKey;
/***/ }),
/***/ 901:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var scrollbarVerticalSize;
var scrollbarHorizontalSize; // Measure scrollbar width for padding body during modal show/hide
var scrollbarMeasure = {
position: 'absolute',
top: '-9999px',
width: '50px',
height: '50px'
}; // This const is used for colgroup.col internal props. And should not provides to user.
exports.INTERNAL_COL_DEFINE = 'RC_TABLE_INTERNAL_COL_DEFINE';
function measureScrollbar(_ref) {
var _ref$direction = _ref.direction,
direction = _ref$direction === void 0 ? 'vertical' : _ref$direction,
prefixCls = _ref.prefixCls;
if (typeof document === 'undefined' || typeof window === 'undefined') {
return 0;
}
var isVertical = direction === 'vertical';
if (isVertical && scrollbarVerticalSize) {
return scrollbarVerticalSize;
}
if (!isVertical && scrollbarHorizontalSize) {
return scrollbarHorizontalSize;
}
var scrollDiv = document.createElement('div');
Object.keys(scrollbarMeasure).forEach(function (scrollProp) {
scrollDiv.style[scrollProp] = scrollbarMeasure[scrollProp];
}); // apply hide scrollbar className ahead
scrollDiv.className = "".concat(prefixCls, "-hide-scrollbar scroll-div-append-to-body"); // Append related overflow style
if (isVertical) {
scrollDiv.style.overflowY = 'scroll';
} else {
scrollDiv.style.overflowX = 'scroll';
}
document.body.appendChild(scrollDiv);
var size = 0;
if (isVertical) {
size = scrollDiv.offsetWidth - scrollDiv.clientWidth;
scrollbarVerticalSize = size;
} else {
size = scrollDiv.offsetHeight - scrollDiv.clientHeight;
scrollbarHorizontalSize = size;
}
document.body.removeChild(scrollDiv);
return size;
}
exports.measureScrollbar = measureScrollbar;
function debounce(func, wait, immediate) {
var timeout;
function debounceFunc() {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
var context = this; // https://fb.me/react-event-pooling
if (args[0] && args[0].persist) {
args[0].persist();
}
var later = function later() {
timeout = null;
if (!immediate) {
func.apply(context, args);
}
};
var callNow = immediate && !timeout;
clearTimeout(timeout);
timeout = setTimeout(later, wait);
if (callNow) {
func.apply(context, args);
}
}
debounceFunc.cancel = function cancel() {
if (timeout) {
clearTimeout(timeout);
timeout = null;
}
};
return debounceFunc;
}
exports.debounce = debounce;
function remove(array, item) {
var index = array.indexOf(item);
var front = array.slice(0, index);
var last = array.slice(index + 1, array.length);
return front.concat(last);
}
exports.remove = remove;
/**
* Returns only data- and aria- key/value pairs
* @param {object} props
*/
function getDataAndAriaProps(props) {
return Object.keys(props).reduce(function (memo, key) {
if (key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-') {
memo[key] = props[key];
}
return memo;
}, {});
}
exports.getDataAndAriaProps = getDataAndAriaProps;
/***/ }),
/***/ 905:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
__webpack_require__(28);
__webpack_require__(933);
__webpack_require__(318);
//# sourceMappingURL=css.js.map
/***/ }),
/***/ 906:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _Pagination = _interopRequireDefault(__webpack_require__(938));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _default = _Pagination["default"];
exports["default"] = _default;
//# sourceMappingURL=index.js.map
/***/ }),
/***/ 907:
/***/ (function(module, exports) {
/**
* Helper function for iterating over a collection
*
* @param collection
* @param fn
*/
function each(collection, fn) {
var i = 0,
length = collection.length,
cont;
for(i; i < length; i++) {
cont = fn(collection[i], i);
if(cont === false) {
break; //allow early exit
}
}
}
/**
* Helper function for determining whether target object is an array
*
* @param target the object under test
* @return {Boolean} true if array, false otherwise
*/
function isArray(target) {
return Object.prototype.toString.apply(target) === '[object Array]';
}
/**
* Helper function for determining whether target object is a function
*
* @param target the object under test
* @return {Boolean} true if function, false otherwise
*/
function isFunction(target) {
return typeof target === 'function';
}
module.exports = {
isFunction : isFunction,
isArray : isArray,
each : each
};
/***/ }),
/***/ 908:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = exports.SiderContext = void 0;
var _createReactContext = _interopRequireDefault(__webpack_require__(316));
var React = _interopRequireWildcard(__webpack_require__(0));
var _reactLifecyclesCompat = __webpack_require__(7);
var _classnames = _interopRequireDefault(__webpack_require__(3));
var _omit = _interopRequireDefault(__webpack_require__(43));
var _layout = __webpack_require__(997);
var _configProvider = __webpack_require__(12);
var _icon = _interopRequireDefault(__webpack_require__(26));
var _isNumeric = _interopRequireDefault(__webpack_require__(998));
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _extends() { _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; }; return _extends.apply(this, arguments); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var __rest = void 0 && (void 0).__rest || function (s, e) {
var t = {};
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
// matchMedia polyfill for
// https://github.com/WickyNilliams/enquire.js/issues/82
// TODO: Will be removed in antd 4.0 because we will no longer support ie9
if (typeof window !== 'undefined') {
var matchMediaPolyfill = function matchMediaPolyfill(mediaQuery) {
return {
media: mediaQuery,
matches: false,
addListener: function addListener() {},
removeListener: function removeListener() {}
};
}; // ref: https://github.com/ant-design/ant-design/issues/18774
if (!window.matchMedia) window.matchMedia = matchMediaPolyfill;
}
var dimensionMaxMap = {
xs: '479.98px',
sm: '575.98px',
md: '767.98px',
lg: '991.98px',
xl: '1199.98px',
xxl: '1599.98px'
};
var SiderContext = (0, _createReactContext["default"])({});
exports.SiderContext = SiderContext;
var generateId = function () {
var i = 0;
return function () {
var prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
i += 1;
return "".concat(prefix).concat(i);
};
}();
var InternalSider =
/*#__PURE__*/
function (_React$Component) {
_inherits(InternalSider, _React$Component);
function InternalSider(props) {
var _this;
_classCallCheck(this, InternalSider);
_this = _possibleConstructorReturn(this, _getPrototypeOf(InternalSider).call(this, props));
_this.responsiveHandler = function (mql) {
_this.setState({
below: mql.matches
});
var onBreakpoint = _this.props.onBreakpoint;
if (onBreakpoint) {
onBreakpoint(mql.matches);
}
if (_this.state.collapsed !== mql.matches) {
_this.setCollapsed(mql.matches, 'responsive');
}
};
_this.setCollapsed = function (collapsed, type) {
if (!('collapsed' in _this.props)) {
_this.setState({
collapsed: collapsed
});
}
var onCollapse = _this.props.onCollapse;
if (onCollapse) {
onCollapse(collapsed, type);
}
};
_this.toggle = function () {
var collapsed = !_this.state.collapsed;
_this.setCollapsed(collapsed, 'clickTrigger');
};
_this.belowShowChange = function () {
_this.setState(function (_ref) {
var belowShow = _ref.belowShow;
return {
belowShow: !belowShow
};
});
};
_this.renderSider = function (_ref2) {
var _classNames;
var getPrefixCls = _ref2.getPrefixCls;
var _a = _this.props,
customizePrefixCls = _a.prefixCls,
className = _a.className,
theme = _a.theme,
collapsible = _a.collapsible,
reverseArrow = _a.reverseArrow,
trigger = _a.trigger,
style = _a.style,
width = _a.width,
collapsedWidth = _a.collapsedWidth,
zeroWidthTriggerStyle = _a.zeroWidthTriggerStyle,
others = __rest(_a, ["prefixCls", "className", "theme", "collapsible", "reverseArrow", "trigger", "style", "width", "collapsedWidth", "zeroWidthTriggerStyle"]);
var prefixCls = getPrefixCls('layout-sider', customizePrefixCls);
var divProps = (0, _omit["default"])(others, ['collapsed', 'defaultCollapsed', 'onCollapse', 'breakpoint', 'onBreakpoint', 'siderHook', 'zeroWidthTriggerStyle']);
var rawWidth = _this.state.collapsed ? collapsedWidth : width; // use "px" as fallback unit for width
var siderWidth = (0, _isNumeric["default"])(rawWidth) ? "".concat(rawWidth, "px") : String(rawWidth); // special trigger when collapsedWidth == 0
var zeroWidthTrigger = parseFloat(String(collapsedWidth || 0)) === 0 ? React.createElement("span", {
onClick: _this.toggle,
className: "".concat(prefixCls, "-zero-width-trigger ").concat(prefixCls, "-zero-width-trigger-").concat(reverseArrow ? 'right' : 'left'),
style: zeroWidthTriggerStyle
}, React.createElement(_icon["default"], {
type: "bars"
})) : null;
var iconObj = {
expanded: reverseArrow ? React.createElement(_icon["default"], {
type: "right"
}) : React.createElement(_icon["default"], {
type: "left"
}),
collapsed: reverseArrow ? React.createElement(_icon["default"], {
type: "left"
}) : React.createElement(_icon["default"], {
type: "right"
})
};
var status = _this.state.collapsed ? 'collapsed' : 'expanded';
var defaultTrigger = iconObj[status];
var triggerDom = trigger !== null ? zeroWidthTrigger || React.createElement("div", {
className: "".concat(prefixCls, "-trigger"),
onClick: _this.toggle,
style: {
width: siderWidth
}
}, trigger || defaultTrigger) : null;
var divStyle = _extends(_extends({}, style), {
flex: "0 0 ".concat(siderWidth),
maxWidth: siderWidth,
minWidth: siderWidth,
width: siderWidth
});
var siderCls = (0, _classnames["default"])(className, prefixCls, "".concat(prefixCls, "-").concat(theme), (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-collapsed"), !!_this.state.collapsed), _defineProperty(_classNames, "".concat(prefixCls, "-has-trigger"), collapsible && trigger !== null && !zeroWidthTrigger), _defineProperty(_classNames, "".concat(prefixCls, "-below"), !!_this.state.below), _defineProperty(_classNames, "".concat(prefixCls, "-zero-width"), parseFloat(siderWidth) === 0), _classNames));
return React.createElement("aside", _extends({
className: siderCls
}, divProps, {
style: divStyle
}), React.createElement("div", {
className: "".concat(prefixCls, "-children")
}, _this.props.children), collapsible || _this.state.below && zeroWidthTrigger ? triggerDom : null);
};
_this.uniqueId = generateId('ant-sider-');
var matchMedia;
if (typeof window !== 'undefined') {
matchMedia = window.matchMedia;
}
if (matchMedia && props.breakpoint && props.breakpoint in dimensionMaxMap) {
_this.mql = matchMedia("(max-width: ".concat(dimensionMaxMap[props.breakpoint], ")"));
}
var collapsed;
if ('collapsed' in props) {
collapsed = props.collapsed;
} else {
collapsed = props.defaultCollapsed;
}
_this.state = {
collapsed: collapsed,
below: false
};
return _this;
}
_createClass(InternalSider, [{
key: "componentDidMount",
value: function componentDidMount() {
if (this.mql) {
this.mql.addListener(this.responsiveHandler);
this.responsiveHandler(this.mql);
}
if (this.props.siderHook) {
this.props.siderHook.addSider(this.uniqueId);
}
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
if (this.mql) {
this.mql.removeListener(this.responsiveHandler);
}
if (this.props.siderHook) {
this.props.siderHook.removeSider(this.uniqueId);
}
}
}, {
key: "render",
value: function render() {
var collapsed = this.state.collapsed;
var collapsedWidth = this.props.collapsedWidth;
return React.createElement(SiderContext.Provider, {
value: {
siderCollapsed: collapsed,
collapsedWidth: collapsedWidth
}
}, React.createElement(_configProvider.ConfigConsumer, null, this.renderSider));
}
}], [{
key: "getDerivedStateFromProps",
value: function getDerivedStateFromProps(nextProps) {
if ('collapsed' in nextProps) {
return {
collapsed: nextProps.collapsed
};
}
return null;
}
}]);
return InternalSider;
}(React.Component);
InternalSider.defaultProps = {
collapsible: false,
defaultCollapsed: false,
reverseArrow: false,
width: 200,
collapsedWidth: 80,
style: {},
theme: 'dark'
};
(0, _reactLifecyclesCompat.polyfill)(InternalSider); // eslint-disable-next-line react/prefer-stateless-function
var Sider =
/*#__PURE__*/
function (_React$Component2) {
_inherits(Sider, _React$Component2);
function Sider() {
_classCallCheck(this, Sider);
return _possibleConstructorReturn(this, _getPrototypeOf(Sider).apply(this, arguments));
}
_createClass(Sider, [{
key: "render",
value: function render() {
var _this2 = this;
return React.createElement(_layout.LayoutContext.Consumer, null, function (context) {
return React.createElement(InternalSider, _extends({}, context, _this2.props));
});
}
}]);
return Sider;
}(React.Component);
exports["default"] = Sider;
//# sourceMappingURL=Sider.js.map
/***/ }),
/***/ 909:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _createReactContext = _interopRequireDefault(__webpack_require__(316));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var RowContext = (0, _createReactContext["default"])({});
var _default = RowContext;
exports["default"] = _default;
//# sourceMappingURL=RowContext.js.map
/***/ }),
/***/ 910:
/***/ (function(module, exports, __webpack_require__) {
var baseGetTag = __webpack_require__(319),
isObject = __webpack_require__(171);
/** `Object#toString` result references. */
var asyncTag = '[object AsyncFunction]',
funcTag = '[object Function]',
genTag = '[object GeneratorFunction]',
proxyTag = '[object Proxy]';
/**
* Checks if `value` is classified as a `Function` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
* @example
*
* _.isFunction(_);
* // => true
*
* _.isFunction(/abc/);
* // => false
*/
function isFunction(value) {
if (!isObject(value)) {
return false;
}
// The use of `Object#toString` avoids issues with the `typeof` operator
// in Safari 9 which returns 'object' for typed arrays and other constructors.
var tag = baseGetTag(value);
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
}
module.exports = isFunction;
/***/ }),
/***/ 911:
/***/ (function(module, exports) {
/** Used for built-in method references. */
var funcProto = Function.prototype;
/** Used to resolve the decompiled source of functions. */
var funcToString = funcProto.toString;
/**
* Converts `func` to its source code.
*
* @private
* @param {Function} func The function to convert.
* @returns {string} Returns the source code.
*/
function toSource(func) {
if (func != null) {
try {
return funcToString.call(func);
} catch (e) {}
try {
return (func + '');
} catch (e) {}
}
return '';
}
module.exports = toSource;
/***/ }),
/***/ 912:
/***/ (function(module, exports, __webpack_require__) {
var baseIsArguments = __webpack_require__(976),
isObjectLike = __webpack_require__(320);
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/** Built-in value references. */
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
/**
* Checks if `value` is likely an `arguments` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
* else `false`.
* @example
*
* _.isArguments(function() { return arguments; }());
* // => true
*
* _.isArguments([1, 2, 3]);
* // => false
*/
var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
!propertyIsEnumerable.call(value, 'callee');
};
module.exports = isArguments;
/***/ }),
/***/ 913:
/***/ (function(module, exports, __webpack_require__) {
var castPath = __webpack_require__(887),
toKey = __webpack_require__(882);
/**
* The base implementation of `_.get` without support for default values.
*
* @private
* @param {Object} object The object to query.
* @param {Array|string} path The path of the property to get.
* @returns {*} Returns the resolved value.
*/
function baseGet(object, path) {
path = castPath(path, object);
var index = 0,
length = path.length;
while (object != null && index < length) {
object = object[toKey(path[index++])];
}
return (index && index == length) ? object : undefined;
}
module.exports = baseGet;
/***/ }),
/***/ 918:
/***/ (function(module, exports, __webpack_require__) {
var listCacheClear = __webpack_require__(1254),
listCacheDelete = __webpack_require__(1255),
listCacheGet = __webpack_require__(1256),
listCacheHas = __webpack_require__(1257),
listCacheSet = __webpack_require__(1258);
/**
* Creates an list cache object.
*
* @private
* @constructor
* @param {Array} [entries] The key-value pairs to cache.
*/
function ListCache(entries) {
var index = -1,
length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
// Add methods to `ListCache`.
ListCache.prototype.clear = listCacheClear;
ListCache.prototype['delete'] = listCacheDelete;
ListCache.prototype.get = listCacheGet;
ListCache.prototype.has = listCacheHas;
ListCache.prototype.set = listCacheSet;
module.exports = ListCache;
/***/ }),
/***/ 919:
/***/ (function(module, exports, __webpack_require__) {
var eq = __webpack_require__(925);
/**
* Gets the index at which the `key` is found in `array` of key-value pairs.
*
* @private
* @param {Array} array The array to inspect.
* @param {*} key The key to search for.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function assocIndexOf(array, key) {
var length = array.length;
while (length--) {
if (eq(array[length][0], key)) {
return length;
}
}
return -1;
}
module.exports = assocIndexOf;
/***/ }),
/***/ 920:
/***/ (function(module, exports, __webpack_require__) {
var getNative = __webpack_require__(945);
/* Built-in method references that are verified to be native. */
var nativeCreate = getNative(Object, 'create');
module.exports = nativeCreate;
/***/ }),
/***/ 921:
/***/ (function(module, exports, __webpack_require__) {
var isKeyable = __webpack_require__(1276);
/**
* Gets the data for `map`.
*
* @private
* @param {Object} map The map to query.
* @param {string} key The reference key.
* @returns {*} Returns the map data.
*/
function getMapData(map, key) {
var data = map.__data__;
return isKeyable(key)
? data[typeof key == 'string' ? 'string' : 'hash']
: data.map;
}
module.exports = getMapData;
/***/ }),
/***/ 922:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(__webpack_require__(0));
var _rcDropdown = _interopRequireDefault(__webpack_require__(1089));
var _classnames = _interopRequireDefault(__webpack_require__(3));
var _configProvider = __webpack_require__(12);
var _warning = _interopRequireDefault(__webpack_require__(40));
var _icon = _interopRequireDefault(__webpack_require__(26));
var _type = __webpack_require__(70);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _extends() { _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; }; return _extends.apply(this, arguments); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var Placements = (0, _type.tuple)('topLeft', 'topCenter', 'topRight', 'bottomLeft', 'bottomCenter', 'bottomRight');
var Dropdown =
/*#__PURE__*/
function (_React$Component) {
_inherits(Dropdown, _React$Component);
function Dropdown() {
var _this;
_classCallCheck(this, Dropdown);
_this = _possibleConstructorReturn(this, _getPrototypeOf(Dropdown).apply(this, arguments));
_this.renderOverlay = function (prefixCls) {
// rc-dropdown already can process the function of overlay, but we have check logic here.
// So we need render the element to check and pass back to rc-dropdown.
var overlay = _this.props.overlay;
var overlayNode;
if (typeof overlay === 'function') {
overlayNode = overlay();
} else {
overlayNode = overlay;
}
overlayNode = React.Children.only(overlayNode);
var overlayProps = overlayNode.props; // Warning if use other mode
(0, _warning["default"])(!overlayProps.mode || overlayProps.mode === 'vertical', 'Dropdown', "mode=\"".concat(overlayProps.mode, "\" is not supported for Dropdown's Menu.")); // menu cannot be selectable in dropdown defaultly
// menu should be focusable in dropdown defaultly
var _overlayProps$selecta = overlayProps.selectable,
selectable = _overlayProps$selecta === void 0 ? false : _overlayProps$selecta,
_overlayProps$focusab = overlayProps.focusable,
focusable = _overlayProps$focusab === void 0 ? true : _overlayProps$focusab;
var expandIcon = React.createElement("span", {
className: "".concat(prefixCls, "-menu-submenu-arrow")
}, React.createElement(_icon["default"], {
type: "right",
className: "".concat(prefixCls, "-menu-submenu-arrow-icon")
}));
var fixedModeOverlay = typeof overlayNode.type === 'string' ? overlay : React.cloneElement(overlayNode, {
mode: 'vertical',
selectable: selectable,
focusable: focusable,
expandIcon: expandIcon
});
return fixedModeOverlay;
};
_this.renderDropDown = function (_ref) {
var getContextPopupContainer = _ref.getPopupContainer,
getPrefixCls = _ref.getPrefixCls;
var _this$props = _this.props,
customizePrefixCls = _this$props.prefixCls,
children = _this$props.children,
trigger = _this$props.trigger,
disabled = _this$props.disabled,
getPopupContainer = _this$props.getPopupContainer;
var prefixCls = getPrefixCls('dropdown', customizePrefixCls);
var child = React.Children.only(children);
var dropdownTrigger = React.cloneElement(child, {
className: (0, _classnames["default"])(child.props.className, "".concat(prefixCls, "-trigger")),
disabled: disabled
});
var triggerActions = disabled ? [] : trigger;
var alignPoint;
if (triggerActions && triggerActions.indexOf('contextMenu') !== -1) {
alignPoint = true;
}
return React.createElement(_rcDropdown["default"], _extends({
alignPoint: alignPoint
}, _this.props, {
prefixCls: prefixCls,
getPopupContainer: getPopupContainer || getContextPopupContainer,
transitionName: _this.getTransitionName(),
trigger: triggerActions,
overlay: function overlay() {
return _this.renderOverlay(prefixCls);
}
}), dropdownTrigger);
};
return _this;
}
_createClass(Dropdown, [{
key: "getTransitionName",
value: function getTransitionName() {
var _this$props2 = this.props,
_this$props2$placemen = _this$props2.placement,
placement = _this$props2$placemen === void 0 ? '' : _this$props2$placemen,
transitionName = _this$props2.transitionName;
if (transitionName !== undefined) {
return transitionName;
}
if (placement.indexOf('top') >= 0) {
return 'slide-down';
}
return 'slide-up';
}
}, {
key: "render",
value: function render() {
return React.createElement(_configProvider.ConfigConsumer, null, this.renderDropDown);
}
}]);
return Dropdown;
}(React.Component);
exports["default"] = Dropdown;
Dropdown.defaultProps = {
mouseEnterDelay: 0.15,
mouseLeaveDelay: 0.1,
placement: 'bottomLeft'
};
//# sourceMappingURL=dropdown.js.map
/***/ }),
/***/ 924:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(__webpack_require__(0));
var _rcMenu = _interopRequireWildcard(__webpack_require__(172));
var _classnames = _interopRequireDefault(__webpack_require__(3));
var _omit = _interopRequireDefault(__webpack_require__(43));
var _reactLifecyclesCompat = __webpack_require__(7);
var _SubMenu = _interopRequireDefault(__webpack_require__(1002));
var _MenuItem = _interopRequireDefault(__webpack_require__(1003));
var _configProvider = __webpack_require__(12);
var _warning = _interopRequireDefault(__webpack_require__(40));
var _Sider = __webpack_require__(908);
var _raf = _interopRequireDefault(__webpack_require__(182));
var _motion = _interopRequireDefault(__webpack_require__(988));
var _MenuContext = _interopRequireDefault(__webpack_require__(893));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _extends() { _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; }; return _extends.apply(this, arguments); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var InternalMenu =
/*#__PURE__*/
function (_React$Component) {
_inherits(InternalMenu, _React$Component);
function InternalMenu(props) {
var _this;
_classCallCheck(this, InternalMenu);
_this = _possibleConstructorReturn(this, _getPrototypeOf(InternalMenu).call(this, props)); // Restore vertical mode when menu is collapsed responsively when mounted
// https://github.com/ant-design/ant-design/issues/13104
// TODO: not a perfect solution, looking a new way to avoid setting switchingModeFromInline in this situation
_this.handleMouseEnter = function (e) {
_this.restoreModeVerticalFromInline();
var onMouseEnter = _this.props.onMouseEnter;
if (onMouseEnter) {
onMouseEnter(e);
}
};
_this.handleTransitionEnd = function (e) {
// when inlineCollapsed menu width animation finished
// https://github.com/ant-design/ant-design/issues/12864
var widthCollapsed = e.propertyName === 'width' && e.target === e.currentTarget; // Fix SVGElement e.target.className.indexOf is not a function
// https://github.com/ant-design/ant-design/issues/15699
var className = e.target.className; // SVGAnimatedString.animVal should be identical to SVGAnimatedString.baseVal, unless during an animation.
var classNameValue = Object.prototype.toString.call(className) === '[object SVGAnimatedString]' ? className.animVal : className; // Fix for <Menu style={{ width: '100%' }} />, the width transition won't trigger when menu is collapsed
// https://github.com/ant-design/ant-design-pro/issues/2783
var iconScaled = e.propertyName === 'font-size' && classNameValue.indexOf('anticon') >= 0;
if (widthCollapsed || iconScaled) {
_this.restoreModeVerticalFromInline();
}
};
_this.handleClick = function (e) {
_this.handleOpenChange([]);
var onClick = _this.props.onClick;
if (onClick) {
onClick(e);
}
};
_this.handleOpenChange = function (openKeys) {
_this.setOpenKeys(openKeys);
var onOpenChange = _this.props.onOpenChange;
if (onOpenChange) {
onOpenChange(openKeys);
}
};
_this.renderMenu = function (_ref) {
var getPopupContainer = _ref.getPopupContainer,
getPrefixCls = _ref.getPrefixCls;
var _this$props = _this.props,
customizePrefixCls = _this$props.prefixCls,
className = _this$props.className,
theme = _this$props.theme,
collapsedWidth = _this$props.collapsedWidth;
var passProps = (0, _omit["default"])(_this.props, ['collapsedWidth', 'siderCollapsed']);
var menuMode = _this.getRealMenuMode();
var menuOpenMotion = _this.getOpenMotionProps(menuMode);
var prefixCls = getPrefixCls('menu', customizePrefixCls);
var menuClassName = (0, _classnames["default"])(className, "".concat(prefixCls, "-").concat(theme), _defineProperty({}, "".concat(prefixCls, "-inline-collapsed"), _this.getInlineCollapsed()));
var menuProps = _extends({
openKeys: _this.state.openKeys,
onOpenChange: _this.handleOpenChange,
className: menuClassName,
mode: menuMode
}, menuOpenMotion);
if (menuMode !== 'inline') {
// closing vertical popup submenu after click it
menuProps.onClick = _this.handleClick;
} // https://github.com/ant-design/ant-design/issues/8587
var hideMenu = _this.getInlineCollapsed() && (collapsedWidth === 0 || collapsedWidth === '0' || collapsedWidth === '0px');
if (hideMenu) {
menuProps.openKeys = [];
}
return React.createElement(_rcMenu["default"], _extends({
getPopupContainer: getPopupContainer
}, passProps, menuProps, {
prefixCls: prefixCls,
onTransitionEnd: _this.handleTransitionEnd,
onMouseEnter: _this.handleMouseEnter
}));
};
(0, _warning["default"])(!('onOpen' in props || 'onClose' in props), 'Menu', '`onOpen` and `onClose` are removed, please use `onOpenChange` instead, ' + 'see: https://u.ant.design/menu-on-open-change.');
(0, _warning["default"])(!('inlineCollapsed' in props && props.mode !== 'inline'), 'Menu', '`inlineCollapsed` should only be used when `mode` is inline.');
(0, _warning["default"])(!(props.siderCollapsed !== undefined && 'inlineCollapsed' in props), 'Menu', '`inlineCollapsed` not control Menu under Sider. Should set `collapsed` on Sider instead.');
var openKeys;
if ('openKeys' in props) {
openKeys = props.openKeys;
} else if ('defaultOpenKeys' in props) {
openKeys = props.defaultOpenKeys;
}
_this.state = {
openKeys: openKeys || [],
switchingModeFromInline: false,
inlineOpenKeys: [],
prevProps: props
};
return _this;
}
_createClass(InternalMenu, [{
key: "componentWillUnmount",
value: function componentWillUnmount() {
_raf["default"].cancel(this.mountRafId);
}
}, {
key: "setOpenKeys",
value: function setOpenKeys(openKeys) {
if (!('openKeys' in this.props)) {
this.setState({
openKeys: openKeys
});
}
}
}, {
key: "getRealMenuMode",
value: function getRealMenuMode() {
var inlineCollapsed = this.getInlineCollapsed();
if (this.state.switchingModeFromInline && inlineCollapsed) {
return 'inline';
}
var mode = this.props.mode;
return inlineCollapsed ? 'vertical' : mode;
}
}, {
key: "getInlineCollapsed",
value: function getInlineCollapsed() {
var inlineCollapsed = this.props.inlineCollapsed;
if (this.props.siderCollapsed !== undefined) {
return this.props.siderCollapsed;
}
return inlineCollapsed;
}
}, {
key: "getOpenMotionProps",
value: function getOpenMotionProps(menuMode) {
var _this$props2 = this.props,
openTransitionName = _this$props2.openTransitionName,
openAnimation = _this$props2.openAnimation,
motion = _this$props2.motion; // Provides by user
if (motion) {
return {
motion: motion
};
}
if (openAnimation) {
(0, _warning["default"])(typeof openAnimation === 'string', 'Menu', '`openAnimation` do not support object. Please use `motion` instead.');
return {
openAnimation: openAnimation
};
}
if (openTransitionName) {
return {
openTransitionName: openTransitionName
};
} // Default logic
if (menuMode === 'horizontal') {
return {
motion: {
motionName: 'slide-up'
}
};
}
if (menuMode === 'inline') {
return {
motion: _motion["default"]
};
} // When mode switch from inline
// submenu should hide without animation
return {
motion: {
motionName: this.state.switchingModeFromInline ? '' : 'zoom-big'
}
};
}
}, {
key: "restoreModeVerticalFromInline",
value: function restoreModeVerticalFromInline() {
var switchingModeFromInline = this.state.switchingModeFromInline;
if (switchingModeFromInline) {
this.setState({
switchingModeFromInline: false
});
}
}
}, {
key: "render",
value: function render() {
return React.createElement(_MenuContext["default"].Provider, {
value: {
inlineCollapsed: this.getInlineCollapsed() || false,
antdMenuTheme: this.props.theme
}
}, React.createElement(_configProvider.ConfigConsumer, null, this.renderMenu));
}
}], [{
key: "getDerivedStateFromProps",
value: function getDerivedStateFromProps(nextProps, prevState) {
var prevProps = prevState.prevProps;
var newState = {
prevProps: nextProps
};
if (prevProps.mode === 'inline' && nextProps.mode !== 'inline') {
newState.switchingModeFromInline = true;
}
if ('openKeys' in nextProps) {
newState.openKeys = nextProps.openKeys;
} else {
// [Legacy] Old code will return after `openKeys` changed.
// Not sure the reason, we should keep this logic still.
if (nextProps.inlineCollapsed && !prevProps.inlineCollapsed || nextProps.siderCollapsed && !prevProps.siderCollapsed) {
newState.switchingModeFromInline = true;
newState.inlineOpenKeys = prevState.openKeys;
newState.openKeys = [];
}
if (!nextProps.inlineCollapsed && prevProps.inlineCollapsed || !nextProps.siderCollapsed && prevProps.siderCollapsed) {
newState.openKeys = prevState.inlineOpenKeys;
newState.inlineOpenKeys = [];
}
}
return newState;
}
}]);
return InternalMenu;
}(React.Component);
InternalMenu.defaultProps = {
className: '',
theme: 'light',
focusable: false
};
(0, _reactLifecyclesCompat.polyfill)(InternalMenu); // We should keep this as ref-able
var Menu =
/*#__PURE__*/
function (_React$Component2) {
_inherits(Menu, _React$Component2);
function Menu() {
_classCallCheck(this, Menu);
return _possibleConstructorReturn(this, _getPrototypeOf(Menu).apply(this, arguments));
}
_createClass(Menu, [{
key: "render",
value: function render() {
var _this2 = this;
return React.createElement(_Sider.SiderContext.Consumer, null, function (context) {
return React.createElement(InternalMenu, _extends({}, _this2.props, context));
});
}
}]);
return Menu;
}(React.Component);
exports["default"] = Menu;
Menu.Divider = _rcMenu.Divider;
Menu.Item = _MenuItem["default"];
Menu.SubMenu = _SubMenu["default"];
Menu.ItemGroup = _rcMenu.ItemGroup;
//# sourceMappingURL=index.js.map
/***/ }),
/***/ 925:
/***/ (function(module, exports) {
/**
* Performs a
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* comparison between two values to determine if they are equivalent.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
* @example
*
* var object = { 'a': 1 };
* var other = { 'a': 1 };
*
* _.eq(object, object);
* // => true
*
* _.eq(object, other);
* // => false
*
* _.eq('a', 'a');
* // => true
*
* _.eq('a', Object('a'));
* // => false
*
* _.eq(NaN, NaN);
* // => true
*/
function eq(value, other) {
return value === other || (value !== value && other !== other);
}
module.exports = eq;
/***/ }),
/***/ 926:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _objectWithoutProperties2 = __webpack_require__(75);
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
var _defineProperty2 = __webpack_require__(59);
var _defineProperty3 = _interopRequireDefault(_defineProperty2);
var _extends5 = __webpack_require__(18);
var _extends6 = _interopRequireDefault(_extends5);
var _toConsumableArray2 = __webpack_require__(1008);
var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _createReactClass = __webpack_require__(1009);
var _createReactClass2 = _interopRequireDefault(_createReactClass);
var _unsafeLifecyclesPolyfill = __webpack_require__(1038);
var _unsafeLifecyclesPolyfill2 = _interopRequireDefault(_unsafeLifecyclesPolyfill);
var _asyncValidator = __webpack_require__(1039);
var _asyncValidator2 = _interopRequireDefault(_asyncValidator);
var _warning = __webpack_require__(324);
var _warning2 = _interopRequireDefault(_warning);
var _get = __webpack_require__(934);
var _get2 = _interopRequireDefault(_get);
var _set = __webpack_require__(928);
var _set2 = _interopRequireDefault(_set);
var _eq = __webpack_require__(884);
var _eq2 = _interopRequireDefault(_eq);
var _createFieldsStore = __webpack_require__(1065);
var _createFieldsStore2 = _interopRequireDefault(_createFieldsStore);
var _utils = __webpack_require__(896);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
/* eslint-disable react/prefer-es6-class */
/* eslint-disable prefer-promise-reject-errors */
var DEFAULT_TRIGGER = 'onChange';
function createBaseForm() {
var option = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var mixins = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
var validateMessages = option.validateMessages,
onFieldsChange = option.onFieldsChange,
onValuesChange = option.onValuesChange,
_option$mapProps = option.mapProps,
mapProps = _option$mapProps === undefined ? _utils.identity : _option$mapProps,
mapPropsToFields = option.mapPropsToFields,
fieldNameProp = option.fieldNameProp,
fieldMetaProp = option.fieldMetaProp,
fieldDataProp = option.fieldDataProp,
_option$formPropName = option.formPropName,
formPropName = _option$formPropName === undefined ? 'form' : _option$formPropName,
formName = option.name,
withRef = option.withRef;
return function decorate(WrappedComponent) {
var Form = (0, _createReactClass2['default'])({
displayName: 'Form',
mixins: mixins,
getInitialState: function getInitialState() {
var _this = this;
var fields = mapPropsToFields && mapPropsToFields(this.props);
this.fieldsStore = (0, _createFieldsStore2['default'])(fields || {});
this.instances = {};
this.cachedBind = {};
this.clearedFieldMetaCache = {};
this.renderFields = {};
this.domFields = {};
// HACK: https://github.com/ant-design/ant-design/issues/6406
['getFieldsValue', 'getFieldValue', 'setFieldsInitialValue', 'getFieldsError', 'getFieldError', 'isFieldValidating', 'isFieldsValidating', 'isFieldsTouched', 'isFieldTouched'].forEach(function (key) {
_this[key] = function () {
var _fieldsStore;
if (false) {
(0, _warning2['default'])(false, 'you should not use `ref` on enhanced form, please use `wrappedComponentRef`. ' + 'See: https://github.com/react-component/form#note-use-wrappedcomponentref-instead-of-withref-after-rc-form140');
}
return (_fieldsStore = _this.fieldsStore)[key].apply(_fieldsStore, arguments);
};
});
return {
submitting: false
};
},
componentDidMount: function componentDidMount() {
this.cleanUpUselessFields();
},
componentWillReceiveProps: function componentWillReceiveProps(nextProps) {
if (mapPropsToFields) {
this.fieldsStore.updateFields(mapPropsToFields(nextProps));
}
},
componentDidUpdate: function componentDidUpdate() {
this.cleanUpUselessFields();
},
onCollectCommon: function onCollectCommon(name, action, args) {
var fieldMeta = this.fieldsStore.getFieldMeta(name);
if (fieldMeta[action]) {
fieldMeta[action].apply(fieldMeta, (0, _toConsumableArray3['default'])(args));
} else if (fieldMeta.originalProps && fieldMeta.originalProps[action]) {
var _fieldMeta$originalPr;
(_fieldMeta$originalPr = fieldMeta.originalProps)[action].apply(_fieldMeta$originalPr, (0, _toConsumableArray3['default'])(args));
}
var value = fieldMeta.getValueFromEvent ? fieldMeta.getValueFromEvent.apply(fieldMeta, (0, _toConsumableArray3['default'])(args)) : _utils.getValueFromEvent.apply(undefined, (0, _toConsumableArray3['default'])(args));
if (onValuesChange && value !== this.fieldsStore.getFieldValue(name)) {
var valuesAll = this.fieldsStore.getAllValues();
var valuesAllSet = {};
valuesAll[name] = value;
Object.keys(valuesAll).forEach(function (key) {
return (0, _set2['default'])(valuesAllSet, key, valuesAll[key]);
});
onValuesChange((0, _extends6['default'])((0, _defineProperty3['default'])({}, formPropName, this.getForm()), this.props), (0, _set2['default'])({}, name, value), valuesAllSet);
}
var field = this.fieldsStore.getField(name);
return { name: name, field: (0, _extends6['default'])({}, field, { value: value, touched: true }), fieldMeta: fieldMeta };
},
onCollect: function onCollect(name_, action) {
for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
args[_key - 2] = arguments[_key];
}
var _onCollectCommon = this.onCollectCommon(name_, action, args),
name = _onCollectCommon.name,
field = _onCollectCommon.field,
fieldMeta = _onCollectCommon.fieldMeta;
var validate = fieldMeta.validate;
this.fieldsStore.setFieldsAsDirty();
var newField = (0, _extends6['default'])({}, field, {
dirty: (0, _utils.hasRules)(validate)
});
this.setFields((0, _defineProperty3['default'])({}, name, newField));
},
onCollectValidate: function onCollectValidate(name_, action) {
for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
args[_key2 - 2] = arguments[_key2];
}
var _onCollectCommon2 = this.onCollectCommon(name_, action, args),
field = _onCollectCommon2.field,
fieldMeta = _onCollectCommon2.fieldMeta;
var newField = (0, _extends6['default'])({}, field, {
dirty: true
});
this.fieldsStore.setFieldsAsDirty();
this.validateFieldsInternal([newField], {
action: action,
options: {
firstFields: !!fieldMeta.validateFirst
}
});
},
getCacheBind: function getCacheBind(name, action, fn) {
if (!this.cachedBind[name]) {
this.cachedBind[name] = {};
}
var cache = this.cachedBind[name];
if (!cache[action] || cache[action].oriFn !== fn) {
cache[action] = {
fn: fn.bind(this, name, action),
oriFn: fn
};
}
return cache[action].fn;
},
getFieldDecorator: function getFieldDecorator(name, fieldOption) {
var _this2 = this;
var props = this.getFieldProps(name, fieldOption);
return function (fieldElem) {
// We should put field in record if it is rendered
_this2.renderFields[name] = true;
var fieldMeta = _this2.fieldsStore.getFieldMeta(name);
var originalProps = fieldElem.props;
if (false) {
var valuePropName = fieldMeta.valuePropName;
(0, _warning2['default'])(!(valuePropName in originalProps), '`getFieldDecorator` will override `' + valuePropName + '`, ' + ('so please don\'t set `' + valuePropName + '` directly ') + 'and use `setFieldsValue` to set it.');
var defaultValuePropName = 'default' + valuePropName[0].toUpperCase() + valuePropName.slice(1);
(0, _warning2['default'])(!(defaultValuePropName in originalProps), '`' + defaultValuePropName + '` is invalid ' + ('for `getFieldDecorator` will set `' + valuePropName + '`,') + ' please use `option.initialValue` instead.');
}
fieldMeta.originalProps = originalProps;
fieldMeta.ref = fieldElem.ref;
return _react2['default'].cloneElement(fieldElem, (0, _extends6['default'])({}, props, _this2.fieldsStore.getFieldValuePropValue(fieldMeta)));
};
},
getFieldProps: function getFieldProps(name) {
var _this3 = this;
var usersFieldOption = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
if (!name) {
throw new Error('Must call `getFieldProps` with valid name string!');
}
if (false) {
(0, _warning2['default'])(this.fieldsStore.isValidNestedFieldName(name), 'One field name cannot be part of another, e.g. `a` and `a.b`. Check field: ' + name);
(0, _warning2['default'])(!('exclusive' in usersFieldOption), '`option.exclusive` of `getFieldProps`|`getFieldDecorator` had been remove.');
}
delete this.clearedFieldMetaCache[name];
var fieldOption = (0, _extends6['default'])({
name: name,
trigger: DEFAULT_TRIGGER,
valuePropName: 'value',
validate: []
}, usersFieldOption);
var rules = fieldOption.rules,
trigger = fieldOption.trigger,
_fieldOption$validate = fieldOption.validateTrigger,
validateTrigger = _fieldOption$validate === undefined ? trigger : _fieldOption$validate,
validate = fieldOption.validate;
var fieldMeta = this.fieldsStore.getFieldMeta(name);
if ('initialValue' in fieldOption) {
fieldMeta.initialValue = fieldOption.initialValue;
}
var inputProps = (0, _extends6['default'])({}, this.fieldsStore.getFieldValuePropValue(fieldOption), {
ref: this.getCacheBind(name, name + '__ref', this.saveRef)
});
if (fieldNameProp) {
inputProps[fieldNameProp] = formName ? formName + '_' + name : name;
}
var validateRules = (0, _utils.normalizeValidateRules)(validate, rules, validateTrigger);
var validateTriggers = (0, _utils.getValidateTriggers)(validateRules);
validateTriggers.forEach(function (action) {
if (inputProps[action]) return;
inputProps[action] = _this3.getCacheBind(name, action, _this3.onCollectValidate);
});
// make sure that the value will be collect
if (trigger && validateTriggers.indexOf(trigger) === -1) {
inputProps[trigger] = this.getCacheBind(name, trigger, this.onCollect);
}
var meta = (0, _extends6['default'])({}, fieldMeta, fieldOption, {
validate: validateRules
});
this.fieldsStore.setFieldMeta(name, meta);
if (fieldMetaProp) {
inputProps[fieldMetaProp] = meta;
}
if (fieldDataProp) {
inputProps[fieldDataProp] = this.fieldsStore.getField(name);
}
// This field is rendered, record it
this.renderFields[name] = true;
return inputProps;
},
getFieldInstance: function getFieldInstance(name) {
return this.instances[name];
},
getRules: function getRules(fieldMeta, action) {
var actionRules = fieldMeta.validate.filter(function (item) {
return !action || item.trigger.indexOf(action) >= 0;
}).map(function (item) {
return item.rules;
});
return (0, _utils.flattenArray)(actionRules);
},
setFields: function setFields(maybeNestedFields, callback) {
var _this4 = this;
var fields = this.fieldsStore.flattenRegisteredFields(maybeNestedFields);
this.fieldsStore.setFields(fields);
if (onFieldsChange) {
var changedFields = Object.keys(fields).reduce(function (acc, name) {
return (0, _set2['default'])(acc, name, _this4.fieldsStore.getField(name));
}, {});
onFieldsChange((0, _extends6['default'])((0, _defineProperty3['default'])({}, formPropName, this.getForm()), this.props), changedFields, this.fieldsStore.getNestedAllFields());
}
this.forceUpdate(callback);
},
setFieldsValue: function setFieldsValue(changedValues, callback) {
var fieldsMeta = this.fieldsStore.fieldsMeta;
var values = this.fieldsStore.flattenRegisteredFields(changedValues);
var newFields = Object.keys(values).reduce(function (acc, name) {
var isRegistered = fieldsMeta[name];
if (false) {
(0, _warning2['default'])(isRegistered, 'Cannot use `setFieldsValue` until ' + 'you use `getFieldDecorator` or `getFieldProps` to register it.');
}
if (isRegistered) {
var value = values[name];
acc[name] = {
value: value
};
}
return acc;
}, {});
this.setFields(newFields, callback);
if (onValuesChange) {
var allValues = this.fieldsStore.getAllValues();
onValuesChange((0, _extends6['default'])((0, _defineProperty3['default'])({}, formPropName, this.getForm()), this.props), changedValues, allValues);
}
},
saveRef: function saveRef(name, _, component) {
if (!component) {
var _fieldMeta = this.fieldsStore.getFieldMeta(name);
if (!_fieldMeta.preserve) {
// after destroy, delete data
this.clearedFieldMetaCache[name] = {
field: this.fieldsStore.getField(name),
meta: _fieldMeta
};
this.clearField(name);
}
delete this.domFields[name];
return;
}
this.domFields[name] = true;
this.recoverClearedField(name);
var fieldMeta = this.fieldsStore.getFieldMeta(name);
if (fieldMeta) {
var ref = fieldMeta.ref;
if (ref) {
if (typeof ref === 'string') {
throw new Error('can not set ref string for ' + name);
} else if (typeof ref === 'function') {
ref(component);
} else if (Object.prototype.hasOwnProperty.call(ref, 'current')) {
ref.current = component;
}
}
}
this.instances[name] = component;
},
cleanUpUselessFields: function cleanUpUselessFields() {
var _this5 = this;
var fieldList = this.fieldsStore.getAllFieldsName();
var removedList = fieldList.filter(function (field) {
var fieldMeta = _this5.fieldsStore.getFieldMeta(field);
return !_this5.renderFields[field] && !_this5.domFields[field] && !fieldMeta.preserve;
});
if (removedList.length) {
removedList.forEach(this.clearField);
}
this.renderFields = {};
},
clearField: function clearField(name) {
this.fieldsStore.clearField(name);
delete this.instances[name];
delete this.cachedBind[name];
},
resetFields: function resetFields(ns) {
var _this6 = this;
var newFields = this.fieldsStore.resetFields(ns);
if (Object.keys(newFields).length > 0) {
this.setFields(newFields);
}
if (ns) {
var names = Array.isArray(ns) ? ns : [ns];
names.forEach(function (name) {
return delete _this6.clearedFieldMetaCache[name];
});
} else {
this.clearedFieldMetaCache = {};
}
},
recoverClearedField: function recoverClearedField(name) {
if (this.clearedFieldMetaCache[name]) {
this.fieldsStore.setFields((0, _defineProperty3['default'])({}, name, this.clearedFieldMetaCache[name].field));
this.fieldsStore.setFieldMeta(name, this.clearedFieldMetaCache[name].meta);
delete this.clearedFieldMetaCache[name];
}
},
validateFieldsInternal: function validateFieldsInternal(fields, _ref, callback) {
var _this7 = this;
var fieldNames = _ref.fieldNames,
action = _ref.action,
_ref$options = _ref.options,
options = _ref$options === undefined ? {} : _ref$options;
var allRules = {};
var allValues = {};
var allFields = {};
var alreadyErrors = {};
fields.forEach(function (field) {
var name = field.name;
if (options.force !== true && field.dirty === false) {
if (field.errors) {
(0, _set2['default'])(alreadyErrors, name, { errors: field.errors });
}
return;
}
var fieldMeta = _this7.fieldsStore.getFieldMeta(name);
var newField = (0, _extends6['default'])({}, field);
newField.errors = undefined;
newField.validating = true;
newField.dirty = true;
allRules[name] = _this7.getRules(fieldMeta, action);
allValues[name] = newField.value;
allFields[name] = newField;
});
this.setFields(allFields);
// in case normalize
Object.keys(allValues).forEach(function (f) {
allValues[f] = _this7.fieldsStore.getFieldValue(f);
});
if (callback && (0, _utils.isEmptyObject)(allFields)) {
callback((0, _utils.isEmptyObject)(alreadyErrors) ? null : alreadyErrors, this.fieldsStore.getFieldsValue(fieldNames));
return;
}
var validator = new _asyncValidator2['default'](allRules);
if (validateMessages) {
validator.messages(validateMessages);
}
validator.validate(allValues, options, function (errors) {
var errorsGroup = (0, _extends6['default'])({}, alreadyErrors);
if (errors && errors.length) {
errors.forEach(function (e) {
var errorFieldName = e.field;
var fieldName = errorFieldName;
// Handle using array validation rule.
// ref: https://github.com/ant-design/ant-design/issues/14275
Object.keys(allRules).some(function (ruleFieldName) {
var rules = allRules[ruleFieldName] || [];
// Exist if match rule
if (ruleFieldName === errorFieldName) {
fieldName = ruleFieldName;
return true;
}
// Skip if not match array type
if (rules.every(function (_ref2) {
var type = _ref2.type;
return type !== 'array';
}) || errorFieldName.indexOf(ruleFieldName + '.') !== 0) {
return false;
}
// Exist if match the field name
var restPath = errorFieldName.slice(ruleFieldName.length + 1);
if (/^\d+$/.test(restPath)) {
fieldName = ruleFieldName;
return true;
}
return false;
});
var field = (0, _get2['default'])(errorsGroup, fieldName);
if (typeof field !== 'object' || Array.isArray(field)) {
(0, _set2['default'])(errorsGroup, fieldName, { errors: [] });
}
var fieldErrors = (0, _get2['default'])(errorsGroup, fieldName.concat('.errors'));
fieldErrors.push(e);
});
}
var expired = [];
var nowAllFields = {};
Object.keys(allRules).forEach(function (name) {
var fieldErrors = (0, _get2['default'])(errorsGroup, name);
var nowField = _this7.fieldsStore.getField(name);
// avoid concurrency problems
if (!(0, _eq2['default'])(nowField.value, allValues[name])) {
expired.push({
name: name
});
} else {
nowField.errors = fieldErrors && fieldErrors.errors;
nowField.value = allValues[name];
nowField.validating = false;
nowField.dirty = false;
nowAllFields[name] = nowField;
}
});
_this7.setFields(nowAllFields);
if (callback) {
if (expired.length) {
expired.forEach(function (_ref3) {
var name = _ref3.name;
var fieldErrors = [{
message: name + ' need to revalidate',
field: name
}];
(0, _set2['default'])(errorsGroup, name, {
expired: true,
errors: fieldErrors
});
});
}
callback((0, _utils.isEmptyObject)(errorsGroup) ? null : errorsGroup, _this7.fieldsStore.getFieldsValue(fieldNames));
}
});
},
validateFields: function validateFields(ns, opt, cb) {
var _this8 = this;
var pending = new Promise(function (resolve, reject) {
var _getParams = (0, _utils.getParams)(ns, opt, cb),
names = _getParams.names,
options = _getParams.options;
var _getParams2 = (0, _utils.getParams)(ns, opt, cb),
callback = _getParams2.callback;
if (!callback || typeof callback === 'function') {
var oldCb = callback;
callback = function callback(errors, values) {
if (oldCb) {
oldCb(errors, values);
}
if (errors) {
reject({ errors: errors, values: values });
} else {
resolve(values);
}
};
}
var fieldNames = names ? _this8.fieldsStore.getValidFieldsFullName(names) : _this8.fieldsStore.getValidFieldsName();
var fields = fieldNames.filter(function (name) {
var fieldMeta = _this8.fieldsStore.getFieldMeta(name);
return (0, _utils.hasRules)(fieldMeta.validate);
}).map(function (name) {
var field = _this8.fieldsStore.getField(name);
field.value = _this8.fieldsStore.getFieldValue(name);
return field;
});
if (!fields.length) {
callback(null, _this8.fieldsStore.getFieldsValue(fieldNames));
return;
}
if (!('firstFields' in options)) {
options.firstFields = fieldNames.filter(function (name) {
var fieldMeta = _this8.fieldsStore.getFieldMeta(name);
return !!fieldMeta.validateFirst;
});
}
_this8.validateFieldsInternal(fields, {
fieldNames: fieldNames,
options: options
}, callback);
});
pending['catch'](function (e) {
// eslint-disable-next-line no-console
if (console.error && "production" !== 'production') {
// eslint-disable-next-line no-console
console.error(e);
}
return e;
});
return pending;
},
isSubmitting: function isSubmitting() {
if (false) {
(0, _warning2['default'])(false, '`isSubmitting` is deprecated. ' + "Actually, it's more convenient to handle submitting status by yourself.");
}
return this.state.submitting;
},
submit: function submit(callback) {
var _this9 = this;
if (false) {
(0, _warning2['default'])(false, '`submit` is deprecated. ' + "Actually, it's more convenient to handle submitting status by yourself.");
}
var fn = function fn() {
_this9.setState({
submitting: false
});
};
this.setState({
submitting: true
});
callback(fn);
},
render: function render() {
var _props = this.props,
wrappedComponentRef = _props.wrappedComponentRef,
restProps = (0, _objectWithoutProperties3['default'])(_props, ['wrappedComponentRef']); // eslint-disable-line
var formProps = (0, _defineProperty3['default'])({}, formPropName, this.getForm());
if (withRef) {
if (false) {
(0, _warning2['default'])(false, '`withRef` is deprecated, please use `wrappedComponentRef` instead. ' + 'See: https://github.com/react-component/form#note-use-wrappedcomponentref-instead-of-withref-after-rc-form140');
}
formProps.ref = 'wrappedComponent';
} else if (wrappedComponentRef) {
formProps.ref = wrappedComponentRef;
}
var props = mapProps.call(this, (0, _extends6['default'])({}, formProps, restProps));
return _react2['default'].createElement(WrappedComponent, props);
}
});
return (0, _utils.argumentContainer)((0, _unsafeLifecyclesPolyfill2['default'])(Form), WrappedComponent);
};
}
exports['default'] = createBaseForm;
module.exports = exports['default'];
/***/ }),
/***/ 927:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _util = __webpack_require__(874);
var util = _interopRequireWildcard(_util);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
/**
* Rule for validating required fields.
*
* @param rule The validation rule.
* @param value The value of the field on the source object.
* @param source The source object being validated.
* @param errors An array of errors that this rule may add
* validation errors to.
* @param options The validation options.
* @param options.messages The validation messages.
*/
function required(rule, value, source, errors, options, type) {
if (rule.required && (!source.hasOwnProperty(rule.field) || util.isEmptyValue(value, type || rule.type))) {
errors.push(util.format(options.messages.required, rule.fullField));
}
}
exports['default'] = required;
/***/ }),
/***/ 928:
/***/ (function(module, exports, __webpack_require__) {
var baseSet = __webpack_require__(1061);
/**
* Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
* it's created. Arrays are created for missing index properties while objects
* are created for all other missing properties. Use `_.setWith` to customize
* `path` creation.
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 3.7.0
* @category Object
* @param {Object} object The object to modify.
* @param {Array|string} path The path of the property to set.
* @param {*} value The value to set.
* @returns {Object} Returns `object`.
* @example
*
* var object = { 'a': [{ 'b': { 'c': 3 } }] };
*
* _.set(object, 'a[0].b.c', 4);
* console.log(object.a[0].b.c);
* // => 4
*
* _.set(object, ['x', '0', 'y', 'z'], 5);
* console.log(object.x[0].y.z);
* // => 5
*/
function set(object, path, value) {
return object == null ? object : baseSet(object, path, value);
}
module.exports = set;
/***/ }),
/***/ 929:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends2 = __webpack_require__(18);
var _extends3 = _interopRequireDefault(_extends2);
var _classCallCheck2 = __webpack_require__(9);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
exports.isFormField = isFormField;
exports["default"] = createFormField;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var Field = function Field(fields) {
(0, _classCallCheck3["default"])(this, Field);
(0, _extends3["default"])(this, fields);
};
function isFormField(obj) {
return obj instanceof Field;
}
function createFormField(field) {
if (isFormField(field)) {
return field;
}
return new Field(field);
}
/***/ }),
/***/ 930:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.FIELD_DATA_PROP = exports.FIELD_META_PROP = void 0;
var FIELD_META_PROP = 'data-__meta';
exports.FIELD_META_PROP = FIELD_META_PROP;
var FIELD_DATA_PROP = 'data-__field';
exports.FIELD_DATA_PROP = FIELD_DATA_PROP;
//# sourceMappingURL=constants.js.map
/***/ }),
/***/ 931:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _createReactContext = _interopRequireDefault(__webpack_require__(316));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var FormContext = (0, _createReactContext["default"])({
labelAlign: 'right',
vertical: false
});
var _default = FormContext;
exports["default"] = _default;
//# sourceMappingURL=context.js.map
/***/ }),
/***/ 932:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.validProgress = validProgress;
// eslint-disable-next-line import/prefer-default-export
function validProgress(progress) {
if (!progress || progress < 0) {
return 0;
}
if (progress > 100) {
return 100;
}
return progress;
}
//# sourceMappingURL=utils.js.map
/***/ }),
/***/ 933:
/***/ (function(module, exports, __webpack_require__) {
// style-loader: Adds some css to the DOM by adding a <style> tag
// load the styles
var content = __webpack_require__(937);
if(typeof content === 'string') content = [[module.i, content, '']];
// Prepare cssTransformation
var transform;
var options = {"hmr":false}
options.transform = transform
// add the styles to the DOM
var update = __webpack_require__(313)(content, options);
if(content.locals) module.exports = content.locals;
/***/ }),
/***/ 934:
/***/ (function(module, exports, __webpack_require__) {
var baseGet = __webpack_require__(913);
/**
* Gets the value at `path` of `object`. If the resolved value is
* `undefined`, the `defaultValue` is returned in its place.
*
* @static
* @memberOf _
* @since 3.7.0
* @category Object
* @param {Object} object The object to query.
* @param {Array|string} path The path of the property to get.
* @param {*} [defaultValue] The value returned for `undefined` resolved values.
* @returns {*} Returns the resolved value.
* @example
*
* var object = { 'a': [{ 'b': { 'c': 3 } }] };
*
* _.get(object, 'a[0].b.c');
* // => 3
*
* _.get(object, ['a', '0', 'b', 'c']);
* // => 3
*
* _.get(object, 'a.b.c', 'default');
* // => 'default'
*/
function get(object, path, defaultValue) {
var result = object == null ? undefined : baseGet(object, path);
return result === undefined ? defaultValue : result;
}
module.exports = get;
/***/ }),
/***/ 935:
/***/ (function(module, exports, __webpack_require__) {
var castPath = __webpack_require__(887),
isArguments = __webpack_require__(912),
isArray = __webpack_require__(877),
isIndex = __webpack_require__(894),
isLength = __webpack_require__(899),
toKey = __webpack_require__(882);
/**
* Checks if `path` exists on `object`.
*
* @private
* @param {Object} object The object to query.
* @param {Array|string} path The path to check.
* @param {Function} hasFunc The function to check properties.
* @returns {boolean} Returns `true` if `path` exists, else `false`.
*/
function hasPath(object, path, hasFunc) {
path = castPath(path, object);
var index = -1,
length = path.length,
result = false;
while (++index < length) {
var key = toKey(path[index]);
if (!(result = object != null && hasFunc(object, key))) {
break;
}
object = object[key];
}
if (result || ++index != length) {
return result;
}
length = object == null ? 0 : object.length;
return !!length && isLength(length) && isIndex(key, length) &&
(isArray(object) || isArguments(object));
}
module.exports = hasPath;
/***/ }),
/***/ 937:
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(312)(true);
// imports
// module
exports.push([module.i, ".ant-pagination{-webkit-box-sizing:border-box;box-sizing:border-box;color:rgba(0,0,0,.65);font-size:14px;font-variant:tabular-nums;line-height:1.5;-webkit-font-feature-settings:\"tnum\";font-feature-settings:\"tnum\"}.ant-pagination,.ant-pagination ol,.ant-pagination ul{margin:0;padding:0;list-style:none}.ant-pagination:after{display:block;clear:both;height:0;overflow:hidden;visibility:hidden;content:\" \"}.ant-pagination-item,.ant-pagination-total-text{display:inline-block;height:32px;margin-right:8px;line-height:30px;vertical-align:middle}.ant-pagination-item{min-width:32px;font-family:Arial;text-align:center;list-style:none;background-color:#fff;border:1px solid #d9d9d9;border-radius:4px;outline:0;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ant-pagination-item a{display:block;padding:0 6px;color:rgba(0,0,0,.65);-webkit-transition:none;-o-transition:none;transition:none}.ant-pagination-item a:hover{text-decoration:none}.ant-pagination-item:focus,.ant-pagination-item:hover{border-color:#1890ff;-webkit-transition:all .3s;-o-transition:all .3s;transition:all .3s}.ant-pagination-item:focus a,.ant-pagination-item:hover a{color:#1890ff}.ant-pagination-item-active{font-weight:500;background:#fff;border-color:#1890ff}.ant-pagination-item-active a{color:#1890ff}.ant-pagination-item-active:focus,.ant-pagination-item-active:hover{border-color:#40a9ff}.ant-pagination-item-active:focus a,.ant-pagination-item-active:hover a{color:#40a9ff}.ant-pagination-jump-next,.ant-pagination-jump-prev{outline:0}.ant-pagination-jump-next .ant-pagination-item-container,.ant-pagination-jump-prev .ant-pagination-item-container{position:relative}.ant-pagination-jump-next .ant-pagination-item-container .ant-pagination-item-link-icon,.ant-pagination-jump-prev .ant-pagination-item-container .ant-pagination-item-link-icon{display:inline-block;font-size:12px;font-size:12px\\9;-webkit-transform:scale(1) rotate(0deg);-ms-transform:scale(1) rotate(0deg);transform:scale(1) rotate(0deg);color:#1890ff;letter-spacing:-1px;opacity:0;-webkit-transition:all .2s;-o-transition:all .2s;transition:all .2s}:root .ant-pagination-jump-next .ant-pagination-item-container .ant-pagination-item-link-icon,:root .ant-pagination-jump-prev .ant-pagination-item-container .ant-pagination-item-link-icon{font-size:12px}.ant-pagination-jump-next .ant-pagination-item-container .ant-pagination-item-link-icon-svg,.ant-pagination-jump-prev .ant-pagination-item-container .ant-pagination-item-link-icon-svg{top:0;right:0;bottom:0;left:0;margin:auto}.ant-pagination-jump-next .ant-pagination-item-container .ant-pagination-item-ellipsis,.ant-pagination-jump-prev .ant-pagination-item-container .ant-pagination-item-ellipsis{position:absolute;top:0;right:0;bottom:0;left:0;display:block;margin:auto;color:rgba(0,0,0,.25);letter-spacing:2px;text-align:center;text-indent:.13em;opacity:1;-webkit-transition:all .2s;-o-transition:all .2s;transition:all .2s}.ant-pagination-jump-next:focus .ant-pagination-item-link-icon,.ant-pagination-jump-next:hover .ant-pagination-item-link-icon,.ant-pagination-jump-prev:focus .ant-pagination-item-link-icon,.ant-pagination-jump-prev:hover .ant-pagination-item-link-icon{opacity:1}.ant-pagination-jump-next:focus .ant-pagination-item-ellipsis,.ant-pagination-jump-next:hover .ant-pagination-item-ellipsis,.ant-pagination-jump-prev:focus .ant-pagination-item-ellipsis,.ant-pagination-jump-prev:hover .ant-pagination-item-ellipsis{opacity:0}.ant-pagination-jump-next,.ant-pagination-jump-prev,.ant-pagination-prev{margin-right:8px}.ant-pagination-jump-next,.ant-pagination-jump-prev,.ant-pagination-next,.ant-pagination-prev{display:inline-block;min-width:32px;height:32px;color:rgba(0,0,0,.65);font-family:Arial;line-height:32px;text-align:center;vertical-align:middle;list-style:none;border-radius:4px;cursor:pointer;-webkit-transition:all .3s;-o-transition:all .3s;transition:all .3s}.ant-pagination-next,.ant-pagination-prev{outline:0}.ant-pagination-next a,.ant-pagination-prev a{color:rgba(0,0,0,.65);-
// exports
/***/ }),
/***/ 938:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(__webpack_require__(0));
var _rcPagination = _interopRequireDefault(__webpack_require__(939));
var _en_US = _interopRequireDefault(__webpack_require__(332));
var _classnames = _interopRequireDefault(__webpack_require__(3));
var _MiniSelect = _interopRequireDefault(__webpack_require__(944));
var _icon = _interopRequireDefault(__webpack_require__(26));
var _select = _interopRequireDefault(__webpack_require__(315));
var _LocaleReceiver = _interopRequireDefault(__webpack_require__(71));
var _configProvider = __webpack_require__(12);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _extends() { _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; }; return _extends.apply(this, arguments); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var __rest = void 0 && (void 0).__rest || function (s, e) {
var t = {};
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
var Pagination =
/*#__PURE__*/
function (_React$Component) {
_inherits(Pagination, _React$Component);
function Pagination() {
var _this;
_classCallCheck(this, Pagination);
_this = _possibleConstructorReturn(this, _getPrototypeOf(Pagination).apply(this, arguments));
_this.getIconsProps = function (prefixCls) {
var prevIcon = React.createElement("a", {
className: "".concat(prefixCls, "-item-link")
}, React.createElement(_icon["default"], {
type: "left"
}));
var nextIcon = React.createElement("a", {
className: "".concat(prefixCls, "-item-link")
}, React.createElement(_icon["default"], {
type: "right"
}));
var jumpPrevIcon = React.createElement("a", {
className: "".concat(prefixCls, "-item-link")
}, React.createElement("div", {
className: "".concat(prefixCls, "-item-container")
}, React.createElement(_icon["default"], {
className: "".concat(prefixCls, "-item-link-icon"),
type: "double-left"
}), React.createElement("span", {
className: "".concat(prefixCls, "-item-ellipsis")
}, "\u2022\u2022\u2022")));
var jumpNextIcon = React.createElement("a", {
className: "".concat(prefixCls, "-item-link")
}, React.createElement("div", {
className: "".concat(prefixCls, "-item-container")
}, React.createElement(_icon["default"], {
className: "".concat(prefixCls, "-item-link-icon"),
type: "double-right"
}), React.createElement("span", {
className: "".concat(prefixCls, "-item-ellipsis")
}, "\u2022\u2022\u2022")));
return {
prevIcon: prevIcon,
nextIcon: nextIcon,
jumpPrevIcon: jumpPrevIcon,
jumpNextIcon: jumpNextIcon
};
};
_this.renderPagination = function (contextLocale) {
var _a = _this.props,
customizePrefixCls = _a.prefixCls,
customizeSelectPrefixCls = _a.selectPrefixCls,
className = _a.className,
size = _a.size,
customLocale = _a.locale,
restProps = __rest(_a, ["prefixCls", "selectPrefixCls", "className", "size", "locale"]);
var locale = _extends(_extends({}, contextLocale), customLocale);
var isSmall = size === 'small';
return React.createElement(_configProvider.ConfigConsumer, null, function (_ref) {
var getPrefixCls = _ref.getPrefixCls;
var prefixCls = getPrefixCls('pagination', customizePrefixCls);
var selectPrefixCls = getPrefixCls('select', customizeSelectPrefixCls);
return React.createElement(_rcPagination["default"], _extends({}, restProps, {
prefixCls: prefixCls,
selectPrefixCls: selectPrefixCls
}, _this.getIconsProps(prefixCls), {
className: (0, _classnames["default"])(className, {
mini: isSmall
}),
selectComponentClass: isSmall ? _MiniSelect["default"] : _select["default"],
locale: locale
}));
});
};
return _this;
}
_createClass(Pagination, [{
key: "render",
value: function render() {
return React.createElement(_LocaleReceiver["default"], {
componentName: "Pagination",
defaultLocale: _en_US["default"]
}, this.renderPagination);
}
}]);
return Pagination;
}(React.Component);
exports["default"] = Pagination;
//# sourceMappingURL=Pagination.js.map
/***/ }),
/***/ 939:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Pagination__ = __webpack_require__(940);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return __WEBPACK_IMPORTED_MODULE_0__Pagination__["a"]; });
/***/ }),
/***/ 940:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__ = __webpack_require__(59);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends__ = __webpack_require__(18);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(9);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass__ = __webpack_require__(31);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(10);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__ = __webpack_require__(11);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_classnames__ = __webpack_require__(3);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_classnames__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_prop_types__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_prop_types__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__Pager__ = __webpack_require__(941);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__Options__ = __webpack_require__(942);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__KeyCode__ = __webpack_require__(890);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__locale_zh_CN__ = __webpack_require__(943);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13_react_lifecycles_compat__ = __webpack_require__(7);
function noop() {}
function isInteger(value) {
return typeof value === 'number' && isFinite(value) && Math.floor(value) === value;
}
function defaultItemRender(page, type, element) {
return element;
}
function calculatePage(p, state, props) {
var pageSize = p;
if (typeof pageSize === 'undefined') {
pageSize = state.pageSize;
}
return Math.floor((props.total - 1) / pageSize) + 1;
}
var Pagination = function (_React$Component) {
__WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default()(Pagination, _React$Component);
function Pagination(props) {
__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, Pagination);
var _this = __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default()(this, (Pagination.__proto__ || Object.getPrototypeOf(Pagination)).call(this, props));
_initialiseProps.call(_this);
var hasOnChange = props.onChange !== noop;
var hasCurrent = 'current' in props;
if (hasCurrent && !hasOnChange) {
console.warn('Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.'); // eslint-disable-line
}
var current = props.defaultCurrent;
if ('current' in props) {
current = props.current;
}
var pageSize = props.defaultPageSize;
if ('pageSize' in props) {
pageSize = props.pageSize;
}
current = Math.min(current, calculatePage(pageSize, undefined, props));
_this.state = {
current: current,
currentInputValue: current,
pageSize: pageSize
};
return _this;
}
__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass___default()(Pagination, [{
key: 'componentDidUpdate',
value: function componentDidUpdate(prevProps, prevState) {
// When current page change, fix focused style of prev item
// A hacky solution of https://github.com/ant-design/ant-design/issues/8948
var prefixCls = this.props.prefixCls;
if (prevState.current !== this.state.current && this.paginationNode) {
var lastCurrentNode = this.paginationNode.querySelector('.' + prefixCls + '-item-' + prevState.current);
if (lastCurrentNode && document.activeElement === lastCurrentNode) {
lastCurrentNode.blur();
}
}
}
}, {
key: 'getValidValue',
value: function getValidValue(e) {
var inputValue = e.target.value;
var allPages = calculatePage(undefined, this.state, this.props);
var currentInputValue = this.state.currentInputValue;
var value = void 0;
if (inputValue === '') {
value = inputValue;
} else if (isNaN(Number(inputValue))) {
value = currentInputValue;
} else if (inputValue >= allPages) {
value = allPages;
} else {
value = Number(inputValue);
}
return value;
}
}, {
key: 'render',
value: function render() {
var _props = this.props,
prefixCls = _props.prefixCls,
className = _props.className,
disabled = _props.disabled;
// When hideOnSinglePage is true and there is only 1 page, hide the pager
if (this.props.hideOnSinglePage === true && this.props.total <= this.state.pageSize) {
return null;
}
var props = this.props;
var locale = props.locale;
var allPages = calculatePage(undefined, this.state, this.props);
var pagerList = [];
var jumpPrev = null;
var jumpNext = null;
var firstPager = null;
var lastPager = null;
var gotoButton = null;
var goButton = props.showQuickJumper && props.showQuickJumper.goButton;
var pageBufferSize = props.showLessItems ? 1 : 2;
var _state = this.state,
current = _state.current,
pageSize = _state.pageSize;
var prevPage = current - 1 > 0 ? current - 1 : 0;
var nextPage = current + 1 < allPages ? current + 1 : allPages;
var dataOrAriaAttributeProps = Object.keys(props).reduce(function (prev, key) {
if (key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-' || key === 'role') {
prev[key] = props[key];
}
return prev;
}, {});
if (props.simple) {
if (goButton) {
if (typeof goButton === 'boolean') {
gotoButton = __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(
'button',
{
type: 'button',
onClick: this.handleGoTO,
onKeyUp: this.handleGoTO
},
locale.jump_to_confirm
);
} else {
gotoButton = __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(
'span',
{
onClick: this.handleGoTO,
onKeyUp: this.handleGoTO
},
goButton
);
}
gotoButton = __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(
'li',
{
title: props.showTitle ? '' + locale.jump_to + this.state.current + '/' + allPages : null,
className: prefixCls + '-simple-pager'
},
gotoButton
);
}
return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(
'ul',
__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default()({
className: prefixCls + ' ' + prefixCls + '-simple ' + props.className,
style: props.style,
ref: this.savePaginationNode
}, dataOrAriaAttributeProps),
__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(
'li',
{
title: props.showTitle ? locale.prev_page : null,
onClick: this.prev,
tabIndex: this.hasPrev() ? 0 : null,
onKeyPress: this.runIfEnterPrev,
className: (this.hasPrev() ? '' : prefixCls + '-disabled') + ' ' + prefixCls + '-prev',
'aria-disabled': !this.hasPrev()
},
props.itemRender(prevPage, 'prev', this.getItemIcon(props.prevIcon))
),
__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(
'li',
{
title: props.showTitle ? this.state.current + '/' + allPages : null,
className: prefixCls + '-simple-pager'
},
__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('input', {
type: 'text',
value: this.state.currentInputValue,
onKeyDown: this.handleKeyDown,
onKeyUp: this.handleKeyUp,
onChange: this.handleKeyUp,
size: '3'
}),
__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(
'span',
{ className: prefixCls + '-slash' },
'/'
),
allPages
),
__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(
'li',
{
title: props.showTitle ? locale.next_page : null,
onClick: this.next,
tabIndex: this.hasPrev() ? 0 : null,
onKeyPress: this.runIfEnterNext,
className: (this.hasNext() ? '' : prefixCls + '-disabled') + ' ' + prefixCls + '-next',
'aria-disabled': !this.hasNext()
},
props.itemRender(nextPage, 'next', this.getItemIcon(props.nextIcon))
),
gotoButton
);
}
if (allPages <= 5 + pageBufferSize * 2) {
var pagerProps = {
locale: locale,
rootPrefixCls: prefixCls,
onClick: this.handleChange,
onKeyPress: this.runIfEnter,
showTitle: props.showTitle,
itemRender: props.itemRender
};
if (!allPages) {
pagerList.push(__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9__Pager__["a" /* default */], __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default()({}, pagerProps, {
key: 'noPager',
page: allPages,
className: prefixCls + '-disabled'
})));
}
for (var i = 1; i <= allPages; i++) {
var active = this.state.current === i;
pagerList.push(__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9__Pager__["a" /* default */], __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default()({}, pagerProps, {
key: i,
page: i,
active: active
})));
}
} else {
var prevItemTitle = props.showLessItems ? locale.prev_3 : locale.prev_5;
var nextItemTitle = props.showLessItems ? locale.next_3 : locale.next_5;
if (props.showPrevNextJumpers) {
var jumpPrevClassString = prefixCls + '-jump-prev';
if (props.jumpPrevIcon) {
jumpPrevClassString += ' ' + prefixCls + '-jump-prev-custom-icon';
}
jumpPrev = __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(
'li',
{
title: props.showTitle ? prevItemTitle : null,
key: 'prev',
onClick: this.jumpPrev,
tabIndex: '0',
onKeyPress: this.runIfEnterJumpPrev,
className: jumpPrevClassString
},
props.itemRender(this.getJumpPrevPage(), 'jump-prev', this.getItemIcon(props.jumpPrevIcon))
);
var jumpNextClassString = prefixCls + '-jump-next';
if (props.jumpNextIcon) {
jumpNextClassString += ' ' + prefixCls + '-jump-next-custom-icon';
}
jumpNext = __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(
'li',
{
title: props.showTitle ? nextItemTitle : null,
key: 'next',
tabIndex: '0',
onClick: this.jumpNext,
onKeyPress: this.runIfEnterJumpNext,
className: jumpNextClassString
},
props.itemRender(this.getJumpNextPage(), 'jump-next', this.getItemIcon(props.jumpNextIcon))
);
}
lastPager = __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9__Pager__["a" /* default */], {
locale: props.locale,
last: true,
rootPrefixCls: prefixCls,
onClick: this.handleChange,
onKeyPress: this.runIfEnter,
key: allPages,
page: allPages,
active: false,
showTitle: props.showTitle,
itemRender: props.itemRender
});
firstPager = __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9__Pager__["a" /* default */], {
locale: props.locale,
rootPrefixCls: prefixCls,
onClick: this.handleChange,
onKeyPress: this.runIfEnter,
key: 1,
page: 1,
active: false,
showTitle: props.showTitle,
itemRender: props.itemRender
});
var left = Math.max(1, current - pageBufferSize);
var right = Math.min(current + pageBufferSize, allPages);
if (current - 1 <= pageBufferSize) {
right = 1 + pageBufferSize * 2;
}
if (allPages - current <= pageBufferSize) {
left = allPages - pageBufferSize * 2;
}
for (var _i = left; _i <= right; _i++) {
var _active = current === _i;
pagerList.push(__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9__Pager__["a" /* default */], {
locale: props.locale,
rootPrefixCls: prefixCls,
onClick: this.handleChange,
onKeyPress: this.runIfEnter,
key: _i,
page: _i,
active: _active,
showTitle: props.showTitle,
itemRender: props.itemRender
}));
}
if (current - 1 >= pageBufferSize * 2 && current !== 1 + 2) {
pagerList[0] = __WEBPACK_IMPORTED_MODULE_6_react___default.a.cloneElement(pagerList[0], {
className: prefixCls + '-item-after-jump-prev'
});
pagerList.unshift(jumpPrev);
}
if (allPages - current >= pageBufferSize * 2 && current !== allPages - 2) {
pagerList[pagerList.length - 1] = __WEBPACK_IMPORTED_MODULE_6_react___default.a.cloneElement(pagerList[pagerList.length - 1], {
className: prefixCls + '-item-before-jump-next'
});
pagerList.push(jumpNext);
}
if (left !== 1) {
pagerList.unshift(firstPager);
}
if (right !== allPages) {
pagerList.push(lastPager);
}
}
var totalText = null;
if (props.showTotal) {
totalText = __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(
'li',
{ className: prefixCls + '-total-text' },
props.showTotal(props.total, [props.total === 0 ? 0 : (current - 1) * pageSize + 1, current * pageSize > props.total ? props.total : current * pageSize])
);
}
var prevDisabled = !this.hasPrev() || !allPages;
var nextDisabled = !this.hasNext() || !allPages;
return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(
'ul',
__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default()({
className: __WEBPACK_IMPORTED_MODULE_7_classnames___default()(prefixCls, className, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()({}, prefixCls + '-disabled', disabled)),
style: props.style,
unselectable: 'unselectable',
ref: this.savePaginationNode
}, dataOrAriaAttributeProps),
totalText,
__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(
'li',
{
title: props.showTitle ? locale.prev_page : null,
onClick: this.prev,
tabIndex: prevDisabled ? null : 0,
onKeyPress: this.runIfEnterPrev,
className: (!prevDisabled ? '' : prefixCls + '-disabled') + ' ' + prefixCls + '-prev',
'aria-disabled': prevDisabled
},
props.itemRender(prevPage, 'prev', this.getItemIcon(props.prevIcon))
),
pagerList,
__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(
'li',
{
title: props.showTitle ? locale.next_page : null,
onClick: this.next,
tabIndex: nextDisabled ? null : 0,
onKeyPress: this.runIfEnterNext,
className: (!nextDisabled ? '' : prefixCls + '-disabled') + ' ' + prefixCls + '-next',
'aria-disabled': nextDisabled
},
props.itemRender(nextPage, 'next', this.getItemIcon(props.nextIcon))
),
__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10__Options__["a" /* default */], {
disabled: disabled,
locale: props.locale,
rootPrefixCls: prefixCls,
selectComponentClass: props.selectComponentClass,
selectPrefixCls: props.selectPrefixCls,
changeSize: this.props.showSizeChanger ? this.changePageSize : null,
current: this.state.current,
pageSize: this.state.pageSize,
pageSizeOptions: this.props.pageSizeOptions,
quickGo: this.shouldDisplayQuickJumper() ? this.handleChange : null,
goButton: goButton
})
);
}
}], [{
key: 'getDerivedStateFromProps',
value: function getDerivedStateFromProps(props, prevState) {
var newState = {};
if ('current' in props) {
newState.current = props.current;
if (props.current !== prevState.current) {
newState.currentInputValue = newState.current;
}
}
if ('pageSize' in props && props.pageSize !== prevState.pageSize) {
var current = prevState.current;
var newCurrent = calculatePage(props.pageSize, prevState, props);
current = current > newCurrent ? newCurrent : current;
if (!('current' in props)) {
newState.current = current;
newState.currentInputValue = current;
}
newState.pageSize = props.pageSize;
}
return newState;
}
/**
* computed icon node that need to be rendered.
* @param {React.ReactNode | React.ComponentType<PaginationProps>} icon received icon.
* @returns {React.ReactNode}
*/
}]);
return Pagination;
}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);
Pagination.propTypes = {
disabled: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool,
prefixCls: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string,
className: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string,
current: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number,
defaultCurrent: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number,
total: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number,
pageSize: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number,
defaultPageSize: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number,
onChange: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func,
hideOnSinglePage: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool,
showSizeChanger: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool,
showLessItems: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool,
onShowSizeChange: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func,
selectComponentClass: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func,
showPrevNextJumpers: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool,
showQuickJumper: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool, __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.object]),
showTitle: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool,
pageSizeOptions: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string),
showTotal: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func,
locale: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.object,
style: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.object,
itemRender: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func,
prevIcon: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.node]),
nextIcon: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.node]),
jumpPrevIcon: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.node]),
jumpNextIcon: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.node])
};
Pagination.defaultProps = {
defaultCurrent: 1,
total: 0,
defaultPageSize: 10,
onChange: noop,
className: '',
selectPrefixCls: 'rc-select',
prefixCls: 'rc-pagination',
selectComponentClass: null,
hideOnSinglePage: false,
showPrevNextJumpers: true,
showQuickJumper: false,
showSizeChanger: false,
showLessItems: false,
showTitle: true,
onShowSizeChange: noop,
locale: __WEBPACK_IMPORTED_MODULE_12__locale_zh_CN__["a" /* default */],
style: {},
itemRender: defaultItemRender
};
var _initialiseProps = function _initialiseProps() {
var _this2 = this;
this.getJumpPrevPage = function () {
return Math.max(1, _this2.state.current - (_this2.props.showLessItems ? 3 : 5));
};
this.getJumpNextPage = function () {
return Math.min(calculatePage(undefined, _this2.state, _this2.props), _this2.state.current + (_this2.props.showLessItems ? 3 : 5));
};
this.getItemIcon = function (icon) {
var prefixCls = _this2.props.prefixCls;
var iconNode = icon || __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('a', { className: prefixCls + '-item-link' });
if (typeof icon === 'function') {
iconNode = __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(icon, __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default()({}, _this2.props));
}
return iconNode;
};
this.savePaginationNode = function (node) {
_this2.paginationNode = node;
};
this.isValid = function (page) {
return isInteger(page) && page !== _this2.state.current;
};
this.shouldDisplayQuickJumper = function () {
var _props2 = _this2.props,
showQuickJumper = _props2.showQuickJumper,
pageSize = _props2.pageSize,
total = _props2.total;
if (total <= pageSize) {
return false;
}
return showQuickJumper;
};
this.handleKeyDown = function (e) {
if (e.keyCode === __WEBPACK_IMPORTED_MODULE_11__KeyCode__["a" /* default */].ARROW_UP || e.keyCode === __WEBPACK_IMPORTED_MODULE_11__KeyCode__["a" /* default */].ARROW_DOWN) {
e.preventDefault();
}
};
this.handleKeyUp = function (e) {
var value = _this2.getValidValue(e);
var currentInputValue = _this2.state.currentInputValue;
if (value !== currentInputValue) {
_this2.setState({
currentInputValue: value
});
}
if (e.keyCode === __WEBPACK_IMPORTED_MODULE_11__KeyCode__["a" /* default */].ENTER) {
_this2.handleChange(value);
} else if (e.keyCode === __WEBPACK_IMPORTED_MODULE_11__KeyCode__["a" /* default */].ARROW_UP) {
_this2.handleChange(value - 1);
} else if (e.keyCode === __WEBPACK_IMPORTED_MODULE_11__KeyCode__["a" /* default */].ARROW_DOWN) {
_this2.handleChange(value + 1);
}
};
this.changePageSize = function (size) {
var current = _this2.state.current;
var newCurrent = calculatePage(size, _this2.state, _this2.props);
current = current > newCurrent ? newCurrent : current;
// fix the issue:
// Once 'total' is 0, 'current' in 'onShowSizeChange' is 0, which is not correct.
if (newCurrent === 0) {
current = _this2.state.current;
}
if (typeof size === 'number') {
if (!('pageSize' in _this2.props)) {
_this2.setState({
pageSize: size
});
}
if (!('current' in _this2.props)) {
_this2.setState({
current: current,
currentInputValue: current
});
}
}
_this2.props.onShowSizeChange(current, size);
};
this.handleChange = function (p) {
var disabled = _this2.props.disabled;
var page = p;
if (_this2.isValid(page) && !disabled) {
var currentPage = calculatePage(undefined, _this2.state, _this2.props);
if (page > currentPage) {
page = currentPage;
} else if (page < 1) {
page = 1;
}
if (!('current' in _this2.props)) {
_this2.setState({
current: page,
currentInputValue: page
});
}
var pageSize = _this2.state.pageSize;
_this2.props.onChange(page, pageSize);
return page;
}
return _this2.state.current;
};
this.prev = function () {
if (_this2.hasPrev()) {
_this2.handleChange(_this2.state.current - 1);
}
};
this.next = function () {
if (_this2.hasNext()) {
_this2.handleChange(_this2.state.current + 1);
}
};
this.jumpPrev = function () {
_this2.handleChange(_this2.getJumpPrevPage());
};
this.jumpNext = function () {
_this2.handleChange(_this2.getJumpNextPage());
};
this.hasPrev = function () {
return _this2.state.current > 1;
};
this.hasNext = function () {
return _this2.state.current < calculatePage(undefined, _this2.state, _this2.props);
};
this.runIfEnter = function (event, callback) {
for (var _len = arguments.length, restParams = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
restParams[_key - 2] = arguments[_key];
}
if (event.key === 'Enter' || event.charCode === 13) {
callback.apply(undefined, restParams);
}
};
this.runIfEnterPrev = function (e) {
_this2.runIfEnter(e, _this2.prev);
};
this.runIfEnterNext = function (e) {
_this2.runIfEnter(e, _this2.next);
};
this.runIfEnterJumpPrev = function (e) {
_this2.runIfEnter(e, _this2.jumpPrev);
};
this.runIfEnterJumpNext = function (e) {
_this2.runIfEnter(e, _this2.jumpNext);
};
this.handleGoTO = function (e) {
if (e.keyCode === __WEBPACK_IMPORTED_MODULE_11__KeyCode__["a" /* default */].ENTER || e.type === 'click') {
_this2.handleChange(_this2.state.currentInputValue);
}
};
};
Object(__WEBPACK_IMPORTED_MODULE_13_react_lifecycles_compat__["polyfill"])(Pagination);
/* harmony default export */ __webpack_exports__["a"] = (Pagination);
/***/ }),
/***/ 941:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__ = __webpack_require__(59);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_prop_types__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(3);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__);
var Pager = function Pager(props) {
var _classNames;
var prefixCls = props.rootPrefixCls + '-item';
var cls = __WEBPACK_IMPORTED_MODULE_3_classnames___default()(prefixCls, prefixCls + '-' + props.page, (_classNames = {}, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_classNames, prefixCls + '-active', props.active), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_classNames, props.className, !!props.className), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_classNames, prefixCls + '-disabled', !props.page), _classNames));
var handleClick = function handleClick() {
props.onClick(props.page);
};
var handleKeyPress = function handleKeyPress(e) {
props.onKeyPress(e, props.onClick, props.page);
};
return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(
'li',
{
title: props.showTitle ? props.page : null,
className: cls,
onClick: handleClick,
onKeyPress: handleKeyPress,
tabIndex: '0'
},
props.itemRender(props.page, 'page', __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(
'a',
null,
props.page
))
);
};
Pager.propTypes = {
page: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number,
active: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.bool,
last: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.bool,
locale: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.object,
className: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.string,
showTitle: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.bool,
rootPrefixCls: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.string,
onClick: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func,
onKeyPress: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func,
itemRender: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func
};
/* harmony default export */ __webpack_exports__["a"] = (Pager);
/***/ }),
/***/ 942:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__ = __webpack_require__(9);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass__ = __webpack_require__(31);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(10);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__ = __webpack_require__(11);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__KeyCode__ = __webpack_require__(890);
var Options = function (_React$Component) {
__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default()(Options, _React$Component);
function Options() {
var _ref;
var _temp, _this, _ret;
__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default()(this, Options);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default()(this, (_ref = Options.__proto__ || Object.getPrototypeOf(Options)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
goInputText: ''
}, _this.buildOptionText = function (value) {
return value + ' ' + _this.props.locale.items_per_page;
}, _this.changeSize = function (value) {
_this.props.changeSize(Number(value));
}, _this.handleChange = function (e) {
_this.setState({
goInputText: e.target.value
});
}, _this.handleBlur = function (e) {
var _this$props = _this.props,
goButton = _this$props.goButton,
quickGo = _this$props.quickGo,
rootPrefixCls = _this$props.rootPrefixCls;
if (goButton) {
return;
}
if (e.relatedTarget && (e.relatedTarget.className.indexOf(rootPrefixCls + '-prev') >= 0 || e.relatedTarget.className.indexOf(rootPrefixCls + '-next') >= 0)) {
return;
}
quickGo(_this.getValidValue());
}, _this.go = function (e) {
var goInputText = _this.state.goInputText;
if (goInputText === '') {
return;
}
if (e.keyCode === __WEBPACK_IMPORTED_MODULE_6__KeyCode__["a" /* default */].ENTER || e.type === 'click') {
_this.setState({
goInputText: ''
});
_this.props.quickGo(_this.getValidValue());
}
}, _temp), __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default()(_this, _ret);
}
__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass___default()(Options, [{
key: 'getValidValue',
value: function getValidValue() {
var _state = this.state,
goInputText = _state.goInputText,
current = _state.current;
return !goInputText || isNaN(goInputText) ? current : Number(goInputText);
}
}, {
key: 'render',
value: function render() {
var _this2 = this;
var _props = this.props,
pageSize = _props.pageSize,
pageSizeOptions = _props.pageSizeOptions,
locale = _props.locale,
rootPrefixCls = _props.rootPrefixCls,
changeSize = _props.changeSize,
quickGo = _props.quickGo,
goButton = _props.goButton,
selectComponentClass = _props.selectComponentClass,
buildOptionText = _props.buildOptionText,
selectPrefixCls = _props.selectPrefixCls,
disabled = _props.disabled;
var goInputText = this.state.goInputText;
var prefixCls = rootPrefixCls + '-options';
var Select = selectComponentClass;
var changeSelect = null;
var goInput = null;
var gotoButton = null;
if (!changeSize && !quickGo) {
return null;
}
if (changeSize && Select) {
var options = pageSizeOptions.map(function (opt, i) {
return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(
Select.Option,
{ key: i, value: opt },
(buildOptionText || _this2.buildOptionText)(opt)
);
});
changeSelect = __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(
Select,
{
disabled: disabled,
prefixCls: selectPrefixCls,
showSearch: false,
className: prefixCls + '-size-changer',
optionLabelProp: 'children',
dropdownMatchSelectWidth: false,
value: (pageSize || pageSizeOptions[0]).toString(),
onChange: this.changeSize,
getPopupContainer: function getPopupContainer(triggerNode) {
return triggerNode.parentNode;
}
},
options
);
}
if (quickGo) {
if (goButton) {
gotoButton = typeof goButton === 'boolean' ? __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(
'button',
{
type: 'button',
onClick: this.go,
onKeyUp: this.go,
disabled: disabled
},
locale.jump_to_confirm
) : __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(
'span',
{
onClick: this.go,
onKeyUp: this.go
},
goButton
);
}
goInput = __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(
'div',
{ className: prefixCls + '-quick-jumper' },
locale.jump_to,
__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('input', {
disabled: disabled,
type: 'text',
value: goInputText,
onChange: this.handleChange,
onKeyUp: this.go,
onBlur: this.handleBlur
}),
locale.page,
gotoButton
);
}
return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(
'li',
{ className: '' + prefixCls },
changeSelect,
goInput
);
}
}]);
return Options;
}(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component);
Options.propTypes = {
disabled: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool,
changeSize: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func,
quickGo: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func,
selectComponentClass: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func,
current: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number,
pageSizeOptions: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string),
pageSize: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number,
buildOptionText: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func,
locale: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.object,
rootPrefixCls: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string,
selectPrefixCls: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string,
goButton: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.node])
};
Options.defaultProps = {
pageSizeOptions: ['10', '20', '30', '40']
};
/* harmony default export */ __webpack_exports__["a"] = (Options);
/***/ }),
/***/ 943:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony default export */ __webpack_exports__["a"] = ({
// Options.jsx
items_per_page: '条/页',
jump_to: '跳至',
jump_to_confirm: '确定',
page: '页',
// Pagination.jsx
prev_page: '上一页',
next_page: '下一页',
prev_5: '向前 5 页',
next_5: '向后 5 页',
prev_3: '向前 3 页',
next_3: '向后 3 页'
});
/***/ }),
/***/ 944:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(__webpack_require__(0));
var _select = _interopRequireDefault(__webpack_require__(315));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _extends() { _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; }; return _extends.apply(this, arguments); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var MiniSelect =
/*#__PURE__*/
function (_React$Component) {
_inherits(MiniSelect, _React$Component);
function MiniSelect() {
_classCallCheck(this, MiniSelect);
return _possibleConstructorReturn(this, _getPrototypeOf(MiniSelect).apply(this, arguments));
}
_createClass(MiniSelect, [{
key: "render",
value: function render() {
return React.createElement(_select["default"], _extends({
size: "small"
}, this.props));
}
}]);
return MiniSelect;
}(React.Component);
exports["default"] = MiniSelect;
MiniSelect.Option = _select["default"].Option;
//# sourceMappingURL=MiniSelect.js.map
/***/ }),
/***/ 945:
/***/ (function(module, exports, __webpack_require__) {
var baseIsNative = __webpack_require__(1264),
getValue = __webpack_require__(1267);
/**
* Gets the native function at `key` of `object`.
*
* @private
* @param {Object} object The object to query.
* @param {string} key The key of the method to get.
* @returns {*} Returns the function if it's native, else `undefined`.
*/
function getNative(object, key) {
var value = getValue(object, key);
return baseIsNative(value) ? value : undefined;
}
module.exports = getNative;
/***/ }),
/***/ 946:
/***/ (function(module, exports) {
/**
* Converts `set` to an array of its values.
*
* @private
* @param {Object} set The set to convert.
* @returns {Array} Returns the values.
*/
function setToArray(set) {
var index = -1,
result = Array(set.size);
set.forEach(function(value) {
result[++index] = value;
});
return result;
}
module.exports = setToArray;
/***/ }),
/***/ 948:
/***/ (function(module, exports, __webpack_require__) {
var isFunction = __webpack_require__(983),
isLength = __webpack_require__(1079);
/**
* Checks if `value` is array-like. A value is considered array-like if it's
* not a function and has a `value.length` that's an integer greater than or
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
* @example
*
* _.isArrayLike([1, 2, 3]);
* // => true
*
* _.isArrayLike(document.body.children);
* // => true
*
* _.isArrayLike('abc');
* // => true
*
* _.isArrayLike(_.noop);
* // => false
*/
function isArrayLike(value) {
return value != null && isLength(value.length) && !isFunction(value);
}
module.exports = isArrayLike;
/***/ }),
/***/ 949:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
__webpack_require__(28);
__webpack_require__(999);
//# sourceMappingURL=css.js.map
/***/ }),
/***/ 950:
/***/ (function(module, exports, __webpack_require__) {
var baseToString = __webpack_require__(951);
/**
* Converts `value` to a string. An empty string is returned for `null`
* and `undefined` values. The sign of `-0` is preserved.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to convert.
* @returns {string} Returns the converted string.
* @example
*
* _.toString(null);
* // => ''
*
* _.toString(-0);
* // => '-0'
*
* _.toString([1, 2, 3]);
* // => '1,2,3'
*/
function toString(value) {
return value == null ? '' : baseToString(value);
}
module.exports = toString;
/***/ }),
/***/ 951:
/***/ (function(module, exports, __webpack_require__) {
var Symbol = __webpack_require__(179),
arrayMap = __webpack_require__(952),
isArray = __webpack_require__(877),
isSymbol = __webpack_require__(322);
/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0;
/** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol ? Symbol.prototype : undefined,
symbolToString = symbolProto ? symbolProto.toString : undefined;
/**
* The base implementation of `_.toString` which doesn't convert nullish
* values to empty strings.
*
* @private
* @param {*} value The value to process.
* @returns {string} Returns the string.
*/
function baseToString(value) {
// Exit early for strings to avoid a performance hit in some environments.
if (typeof value == 'string') {
return value;
}
if (isArray(value)) {
// Recursively convert values (susceptible to call stack limits).
return arrayMap(value, baseToString) + '';
}
if (isSymbol(value)) {
return symbolToString ? symbolToString.call(value) : '';
}
var result = (value + '');
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
}
module.exports = baseToString;
/***/ }),
/***/ 952:
/***/ (function(module, exports) {
/**
* A specialized version of `_.map` for arrays without support for iteratee
* shorthands.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns the new mapped array.
*/
function arrayMap(array, iteratee) {
var index = -1,
length = array == null ? 0 : array.length,
result = Array(length);
while (++index < length) {
result[index] = iteratee(array[index], index, array);
}
return result;
}
module.exports = arrayMap;
/***/ }),
/***/ 953:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
__webpack_require__(28);
__webpack_require__(1032);
__webpack_require__(949);
//# sourceMappingURL=css.js.map
/***/ }),
/***/ 954:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _Form = _interopRequireDefault(__webpack_require__(1034));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _default = _Form["default"];
exports["default"] = _default;
//# sourceMappingURL=index.js.map
/***/ }),
/***/ 955:
/***/ (function(module, exports) {
/**
* Removes all key-value entries from the list cache.
*
* @private
* @name clear
* @memberOf ListCache
*/
function listCacheClear() {
this.__data__ = [];
this.size = 0;
}
module.exports = listCacheClear;
/***/ }),
/***/ 956:
/***/ (function(module, exports, __webpack_require__) {
var assocIndexOf = __webpack_require__(879);
/** Used for built-in method references. */
var arrayProto = Array.prototype;
/** Built-in value references. */
var splice = arrayProto.splice;
/**
* Removes `key` and its value from the list cache.
*
* @private
* @name delete
* @memberOf ListCache
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function listCacheDelete(key) {
var data = this.__data__,
index = assocIndexOf(data, key);
if (index < 0) {
return false;
}
var lastIndex = data.length - 1;
if (index == lastIndex) {
data.pop();
} else {
splice.call(data, index, 1);
}
--this.size;
return true;
}
module.exports = listCacheDelete;
/***/ }),
/***/ 957:
/***/ (function(module, exports, __webpack_require__) {
var assocIndexOf = __webpack_require__(879);
/**
* Gets the list cache value for `key`.
*
* @private
* @name get
* @memberOf ListCache
* @param {string} key The key of the value to get.
* @returns {*} Returns the entry value.
*/
function listCacheGet(key) {
var data = this.__data__,
index = assocIndexOf(data, key);
return index < 0 ? undefined : data[index][1];
}
module.exports = listCacheGet;
/***/ }),
/***/ 958:
/***/ (function(module, exports, __webpack_require__) {
var assocIndexOf = __webpack_require__(879);
/**
* Checks if a list cache value for `key` exists.
*
* @private
* @name has
* @memberOf ListCache
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function listCacheHas(key) {
return assocIndexOf(this.__data__, key) > -1;
}
module.exports = listCacheHas;
/***/ }),
/***/ 959:
/***/ (function(module, exports, __webpack_require__) {
var assocIndexOf = __webpack_require__(879);
/**
* Sets the list cache `key` to `value`.
*
* @private
* @name set
* @memberOf ListCache
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
* @returns {Object} Returns the list cache instance.
*/
function listCacheSet(key, value) {
var data = this.__data__,
index = assocIndexOf(data, key);
if (index < 0) {
++this.size;
data.push([key, value]);
} else {
data[index][1] = value;
}
return this;
}
module.exports = listCacheSet;
/***/ }),
/***/ 960:
/***/ (function(module, exports, __webpack_require__) {
var isFunction = __webpack_require__(910),
isMasked = __webpack_require__(961),
isObject = __webpack_require__(171),
toSource = __webpack_require__(911);
/**
* Used to match `RegExp`
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
*/
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
/** Used to detect host constructors (Safari). */
var reIsHostCtor = /^\[object .+?Constructor\]$/;
/** Used for built-in method references. */
var funcProto = Function.prototype,
objectProto = Object.prototype;
/** Used to resolve the decompiled source of functions. */
var funcToString = funcProto.toString;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/** Used to detect if a method is native. */
var reIsNative = RegExp('^' +
funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
);
/**
* The base implementation of `_.isNative` without bad shim checks.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a native function,
* else `false`.
*/
function baseIsNative(value) {
if (!isObject(value) || isMasked(value)) {
return false;
}
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
return pattern.test(toSource(value));
}
module.exports = baseIsNative;
/***/ }),
/***/ 961:
/***/ (function(module, exports, __webpack_require__) {
var coreJsData = __webpack_require__(962);
/** Used to detect methods masquerading as native. */
var maskSrcKey = (function() {
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
return uid ? ('Symbol(src)_1.' + uid) : '';
}());
/**
* Checks if `func` has its source masked.
*
* @private
* @param {Function} func The function to check.
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
*/
function isMasked(func) {
return !!maskSrcKey && (maskSrcKey in func);
}
module.exports = isMasked;
/***/ }),
/***/ 962:
/***/ (function(module, exports, __webpack_require__) {
var root = __webpack_require__(167);
/** Used to detect overreaching core-js shims. */
var coreJsData = root['__core-js_shared__'];
module.exports = coreJsData;
/***/ }),
/***/ 963:
/***/ (function(module, exports) {
/**
* Gets the value at `key` of `object`.
*
* @private
* @param {Object} [object] The object to query.
* @param {string} key The key of the property to get.
* @returns {*} Returns the property value.
*/
function getValue(object, key) {
return object == null ? undefined : object[key];
}
module.exports = getValue;
/***/ }),
/***/ 964:
/***/ (function(module, exports, __webpack_require__) {
var Hash = __webpack_require__(965),
ListCache = __webpack_require__(888),
Map = __webpack_require__(897);
/**
* Removes all key-value entries from the map.
*
* @private
* @name clear
* @memberOf MapCache
*/
function mapCacheClear() {
this.size = 0;
this.__data__ = {
'hash': new Hash,
'map': new (Map || ListCache),
'string': new Hash
};
}
module.exports = mapCacheClear;
/***/ }),
/***/ 965:
/***/ (function(module, exports, __webpack_require__) {
var hashClear = __webpack_require__(966),
hashDelete = __webpack_require__(967),
hashGet = __webpack_require__(968),
hashHas = __webpack_require__(969),
hashSet = __webpack_require__(970);
/**
* Creates a hash object.
*
* @private
* @constructor
* @param {Array} [entries] The key-value pairs to cache.
*/
function Hash(entries) {
var index = -1,
length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
// Add methods to `Hash`.
Hash.prototype.clear = hashClear;
Hash.prototype['delete'] = hashDelete;
Hash.prototype.get = hashGet;
Hash.prototype.has = hashHas;
Hash.prototype.set = hashSet;
module.exports = Hash;
/***/ }),
/***/ 966:
/***/ (function(module, exports, __webpack_require__) {
var nativeCreate = __webpack_require__(880);
/**
* Removes all key-value entries from the hash.
*
* @private
* @name clear
* @memberOf Hash
*/
function hashClear() {
this.__data__ = nativeCreate ? nativeCreate(null) : {};
this.size = 0;
}
module.exports = hashClear;
/***/ }),
/***/ 967:
/***/ (function(module, exports) {
/**
* Removes `key` and its value from the hash.
*
* @private
* @name delete
* @memberOf Hash
* @param {Object} hash The hash to modify.
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function hashDelete(key) {
var result = this.has(key) && delete this.__data__[key];
this.size -= result ? 1 : 0;
return result;
}
module.exports = hashDelete;
/***/ }),
/***/ 968:
/***/ (function(module, exports, __webpack_require__) {
var nativeCreate = __webpack_require__(880);
/** Used to stand-in for `undefined` hash values. */
var HASH_UNDEFINED = '__lodash_hash_undefined__';
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Gets the hash value for `key`.
*
* @private
* @name get
* @memberOf Hash
* @param {string} key The key of the value to get.
* @returns {*} Returns the entry value.
*/
function hashGet(key) {
var data = this.__data__;
if (nativeCreate) {
var result = data[key];
return result === HASH_UNDEFINED ? undefined : result;
}
return hasOwnProperty.call(data, key) ? data[key] : undefined;
}
module.exports = hashGet;
/***/ }),
/***/ 969:
/***/ (function(module, exports, __webpack_require__) {
var nativeCreate = __webpack_require__(880);
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Checks if a hash value for `key` exists.
*
* @private
* @name has
* @memberOf Hash
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function hashHas(key) {
var data = this.__data__;
return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
}
module.exports = hashHas;
/***/ }),
/***/ 970:
/***/ (function(module, exports, __webpack_require__) {
var nativeCreate = __webpack_require__(880);
/** Used to stand-in for `undefined` hash values. */
var HASH_UNDEFINED = '__lodash_hash_undefined__';
/**
* Sets the hash `key` to `value`.
*
* @private
* @name set
* @memberOf Hash
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
* @returns {Object} Returns the hash instance.
*/
function hashSet(key, value) {
var data = this.__data__;
this.size += this.has(key) ? 0 : 1;
data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
return this;
}
module.exports = hashSet;
/***/ }),
/***/ 971:
/***/ (function(module, exports, __webpack_require__) {
var getMapData = __webpack_require__(881);
/**
* Removes `key` and its value from the map.
*
* @private
* @name delete
* @memberOf MapCache
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function mapCacheDelete(key) {
var result = getMapData(this, key)['delete'](key);
this.size -= result ? 1 : 0;
return result;
}
module.exports = mapCacheDelete;
/***/ }),
/***/ 972:
/***/ (function(module, exports) {
/**
* Checks if `value` is suitable for use as unique object key.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
*/
function isKeyable(value) {
var type = typeof value;
return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
? (value !== '__proto__')
: (value === null);
}
module.exports = isKeyable;
/***/ }),
/***/ 973:
/***/ (function(module, exports, __webpack_require__) {
var getMapData = __webpack_require__(881);
/**
* Gets the map value for `key`.
*
* @private
* @name get
* @memberOf MapCache
* @param {string} key The key of the value to get.
* @returns {*} Returns the entry value.
*/
function mapCacheGet(key) {
return getMapData(this, key).get(key);
}
module.exports = mapCacheGet;
/***/ }),
/***/ 974:
/***/ (function(module, exports, __webpack_require__) {
var getMapData = __webpack_require__(881);
/**
* Checks if a map value for `key` exists.
*
* @private
* @name has
* @memberOf MapCache
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function mapCacheHas(key) {
return getMapData(this, key).has(key);
}
module.exports = mapCacheHas;
/***/ }),
/***/ 975:
/***/ (function(module, exports, __webpack_require__) {
var getMapData = __webpack_require__(881);
/**
* Sets the map `key` to `value`.
*
* @private
* @name set
* @memberOf MapCache
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
* @returns {Object} Returns the map cache instance.
*/
function mapCacheSet(key, value) {
var data = getMapData(this, key),
size = data.size;
data.set(key, value);
this.size += data.size == size ? 0 : 1;
return this;
}
module.exports = mapCacheSet;
/***/ }),
/***/ 976:
/***/ (function(module, exports, __webpack_require__) {
var baseGetTag = __webpack_require__(319),
isObjectLike = __webpack_require__(320);
/** `Object#toString` result references. */
var argsTag = '[object Arguments]';
/**
* The base implementation of `_.isArguments`.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
*/
function baseIsArguments(value) {
return isObjectLike(value) && baseGetTag(value) == argsTag;
}
module.exports = baseIsArguments;
/***/ }),
/***/ 977:
/***/ (function(module, exports, __webpack_require__) {
var memoizeCapped = __webpack_require__(978);
/** Used to match property names within property paths. */
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
/** Used to match backslashes in property paths. */
var reEscapeChar = /\\(\\)?/g;
/**
* Converts `string` to a property path array.
*
* @private
* @param {string} string The string to convert.
* @returns {Array} Returns the property path array.
*/
var stringToPath = memoizeCapped(function(string) {
var result = [];
if (string.charCodeAt(0) === 46 /* . */) {
result.push('');
}
string.replace(rePropName, function(match, number, quote, subString) {
result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
});
return result;
});
module.exports = stringToPath;
/***/ }),
/***/ 978:
/***/ (function(module, exports, __webpack_require__) {
var memoize = __webpack_require__(979);
/** Used as the maximum memoize cache size. */
var MAX_MEMOIZE_SIZE = 500;
/**
* A specialized version of `_.memoize` which clears the memoized function's
* cache when it exceeds `MAX_MEMOIZE_SIZE`.
*
* @private
* @param {Function} func The function to have its output memoized.
* @returns {Function} Returns the new memoized function.
*/
function memoizeCapped(func) {
var result = memoize(func, function(key) {
if (cache.size === MAX_MEMOIZE_SIZE) {
cache.clear();
}
return key;
});
var cache = result.cache;
return result;
}
module.exports = memoizeCapped;
/***/ }),
/***/ 979:
/***/ (function(module, exports, __webpack_require__) {
var MapCache = __webpack_require__(898);
/** Error message constants. */
var FUNC_ERROR_TEXT = 'Expected a function';
/**
* Creates a function that memoizes the result of `func`. If `resolver` is
* provided, it determines the cache key for storing the result based on the
* arguments provided to the memoized function. By default, the first argument
* provided to the memoized function is used as the map cache key. The `func`
* is invoked with the `this` binding of the memoized function.
*
* **Note:** The cache is exposed as the `cache` property on the memoized
* function. Its creation may be customized by replacing the `_.memoize.Cache`
* constructor with one whose instances implement the
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
* method interface of `clear`, `delete`, `get`, `has`, and `set`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Function
* @param {Function} func The function to have its output memoized.
* @param {Function} [resolver] The function to resolve the cache key.
* @returns {Function} Returns the new memoized function.
* @example
*
* var object = { 'a': 1, 'b': 2 };
* var other = { 'c': 3, 'd': 4 };
*
* var values = _.memoize(_.values);
* values(object);
* // => [1, 2]
*
* values(other);
* // => [3, 4]
*
* object.a = 2;
* values(object);
* // => [1, 2]
*
* // Modify the result cache.
* values.cache.set(object, ['a', 'b']);
* values(object);
* // => ['a', 'b']
*
* // Replace `_.memoize.Cache`.
* _.memoize.Cache = WeakMap;
*/
function memoize(func, resolver) {
if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
throw new TypeError(FUNC_ERROR_TEXT);
}
var memoized = function() {
var args = arguments,
key = resolver ? resolver.apply(this, args) : args[0],
cache = memoized.cache;
if (cache.has(key)) {
return cache.get(key);
}
var result = func.apply(this, args);
memoized.cache = cache.set(key, result) || cache;
return result;
};
memoized.cache = new (memoize.Cache || MapCache);
return memoized;
}
// Expose `MapCache`.
memoize.Cache = MapCache;
module.exports = memoize;
/***/ }),
/***/ 982:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _dropdown = _interopRequireDefault(__webpack_require__(922));
var _dropdownButton = _interopRequireDefault(__webpack_require__(1106));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
_dropdown["default"].Button = _dropdownButton["default"];
var _default = _dropdown["default"];
exports["default"] = _default;
//# sourceMappingURL=index.js.map
/***/ }),
/***/ 983:
/***/ (function(module, exports, __webpack_require__) {
var baseGetTag = __webpack_require__(327),
isObject = __webpack_require__(170);
/** `Object#toString` result references. */
var asyncTag = '[object AsyncFunction]',
funcTag = '[object Function]',
genTag = '[object GeneratorFunction]',
proxyTag = '[object Proxy]';
/**
* Checks if `value` is classified as a `Function` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
* @example
*
* _.isFunction(_);
* // => true
*
* _.isFunction(/abc/);
* // => false
*/
function isFunction(value) {
if (!isObject(value)) {
return false;
}
// The use of `Object#toString` avoids issues with the `typeof` operator
// in Safari 9 which returns 'object' for typed arrays and other constructors.
var tag = baseGetTag(value);
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
}
module.exports = isFunction;
/***/ }),
/***/ 984:
/***/ (function(module, exports, __webpack_require__) {
var defineProperty = __webpack_require__(1105);
/**
* The base implementation of `assignValue` and `assignMergeValue` without
* value checks.
*
* @private
* @param {Object} object The object to modify.
* @param {string} key The key of the property to assign.
* @param {*} value The value to assign.
*/
function baseAssignValue(object, key, value) {
if (key == '__proto__' && defineProperty) {
defineProperty(object, key, {
'configurable': true,
'enumerable': true,
'value': value,
'writable': true
});
} else {
object[key] = value;
}
}
module.exports = baseAssignValue;
/***/ }),
/***/ 985:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
__webpack_require__(28);
__webpack_require__(1085);
__webpack_require__(87);
//# sourceMappingURL=css.js.map
/***/ }),
/***/ 986:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(__webpack_require__(0));
var _classnames = _interopRequireDefault(__webpack_require__(3));
var PropTypes = _interopRequireWildcard(__webpack_require__(1));
var _configProvider = __webpack_require__(12);
var _RowContext = _interopRequireDefault(__webpack_require__(909));
var _type = __webpack_require__(70);
var _responsiveObserve = _interopRequireWildcard(__webpack_require__(1001));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _extends() { _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; }; return _extends.apply(this, arguments); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var __rest = void 0 && (void 0).__rest || function (s, e) {
var t = {};
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
var RowAligns = (0, _type.tuple)('top', 'middle', 'bottom', 'stretch');
var RowJustify = (0, _type.tuple)('start', 'end', 'center', 'space-around', 'space-between');
var Row =
/*#__PURE__*/
function (_React$Component) {
_inherits(Row, _React$Component);
function Row() {
var _this;
_classCallCheck(this, Row);
_this = _possibleConstructorReturn(this, _getPrototypeOf(Row).apply(this, arguments));
_this.state = {
screens: {}
};
_this.renderRow = function (_ref) {
var _classNames;
var getPrefixCls = _ref.getPrefixCls;
var _a = _this.props,
customizePrefixCls = _a.prefixCls,
type = _a.type,
justify = _a.justify,
align = _a.align,
className = _a.className,
style = _a.style,
children = _a.children,
others = __rest(_a, ["prefixCls", "type", "justify", "align", "className", "style", "children"]);
var prefixCls = getPrefixCls('row', customizePrefixCls);
var gutter = _this.getGutter();
var classes = (0, _classnames["default"])((_classNames = {}, _defineProperty(_classNames, prefixCls, !type), _defineProperty(_classNames, "".concat(prefixCls, "-").concat(type), type), _defineProperty(_classNames, "".concat(prefixCls, "-").concat(type, "-").concat(justify), type && justify), _defineProperty(_classNames, "".concat(prefixCls, "-").concat(type, "-").concat(align), type && align), _classNames), className);
var rowStyle = _extends(_extends(_extends({}, gutter[0] > 0 ? {
marginLeft: gutter[0] / -2,
marginRight: gutter[0] / -2
} : {}), gutter[1] > 0 ? {
marginTop: gutter[1] / -2,
marginBottom: gutter[1] / -2
} : {}), style);
var otherProps = _extends({}, others);
delete otherProps.gutter;
return React.createElement(_RowContext["default"].Provider, {
value: {
gutter: gutter
}
}, React.createElement("div", _extends({}, otherProps, {
className: classes,
style: rowStyle
}), children));
};
return _this;
}
_createClass(Row, [{
key: "componentDidMount",
value: function componentDidMount() {
var _this2 = this;
this.token = _responsiveObserve["default"].subscribe(function (screens) {
var gutter = _this2.props.gutter;
if (_typeof(gutter) === 'object' || Array.isArray(gutter) && (_typeof(gutter[0]) === 'object' || _typeof(gutter[1]) === 'object')) {
_this2.setState({
screens: screens
});
}
});
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
_responsiveObserve["default"].unsubscribe(this.token);
}
}, {
key: "getGutter",
value: function getGutter() {
var results = [0, 0];
var gutter = this.props.gutter;
var screens = this.state.screens;
var normalizedGutter = Array.isArray(gutter) ? gutter : [gutter, 0];
normalizedGutter.forEach(function (g, index) {
if (_typeof(g) === 'object') {
for (var i = 0; i < _responsiveObserve.responsiveArray.length; i++) {
var breakpoint = _responsiveObserve.responsiveArray[i];
if (screens[breakpoint] && g[breakpoint] !== undefined) {
results[index] = g[breakpoint];
break;
}
}
} else {
results[index] = g || 0;
}
});
return results;
}
}, {
key: "render",
value: function render() {
return React.createElement(_configProvider.ConfigConsumer, null, this.renderRow);
}
}]);
return Row;
}(React.Component);
exports["default"] = Row;
Row.defaultProps = {
gutter: 0
};
Row.propTypes = {
type: PropTypes.oneOf(['flex']),
align: PropTypes.oneOf(RowAligns),
justify: PropTypes.oneOf(RowJustify),
className: PropTypes.string,
children: PropTypes.node,
gutter: PropTypes.oneOfType([PropTypes.object, PropTypes.number, PropTypes.array]),
prefixCls: PropTypes.string
};
//# sourceMappingURL=row.js.map
/***/ }),
/***/ 987:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var React = _interopRequireWildcard(__webpack_require__(0));
var PropTypes = _interopRequireWildcard(__webpack_require__(1));
var _classnames = _interopRequireDefault(__webpack_require__(3));
var _RowContext = _interopRequireDefault(__webpack_require__(909));
var _configProvider = __webpack_require__(12);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _extends() { _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; }; return _extends.apply(this, arguments); }
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var __rest = void 0 && (void 0).__rest || function (s, e) {
var t = {};
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
var objectOrNumber = PropTypes.oneOfType([PropTypes.object, PropTypes.number]);
var Col =
/*#__PURE__*/
function (_React$Component) {
_inherits(Col, _React$Component);
function Col() {
var _this;
_classCallCheck(this, Col);
_this = _possibleConstructorReturn(this, _getPrototypeOf(Col).apply(this, arguments));
_this.renderCol = function (_ref) {
var _classNames;
var getPrefixCls = _ref.getPrefixCls;
var _assertThisInitialize = _assertThisInitialized(_this),
props = _assertThisInitialize.props;
var customizePrefixCls = props.prefixCls,
span = props.span,
order = props.order,
offset = props.offset,
push = props.push,
pull = props.pull,
className = props.className,
children = props.children,
others = __rest(props, ["prefixCls", "span", "order", "offset", "push", "pull", "className", "children"]);
var prefixCls = getPrefixCls('col', customizePrefixCls);
var sizeClassObj = {};
['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].forEach(function (size) {
var _extends2;
var sizeProps = {};
var propSize = props[size];
if (typeof propSize === 'number') {
sizeProps.span = propSize;
} else if (_typeof(propSize) === 'object') {
sizeProps = propSize || {};
}
delete others[size];
sizeClassObj = _extends(_extends({}, sizeClassObj), (_extends2 = {}, _defineProperty(_extends2, "".concat(prefixCls, "-").concat(size, "-").concat(sizeProps.span), sizeProps.span !== undefined), _defineProperty(_extends2, "".concat(prefixCls, "-").concat(size, "-order-").concat(sizeProps.order), sizeProps.order || sizeProps.order === 0), _defineProperty(_extends2, "".concat(prefixCls, "-").concat(size, "-offset-").concat(sizeProps.offset), sizeProps.offset || sizeProps.offset === 0), _defineProperty(_extends2, "".concat(prefixCls, "-").concat(size, "-push-").concat(sizeProps.push), sizeProps.push || sizeProps.push === 0), _defineProperty(_extends2, "".concat(prefixCls, "-").concat(size, "-pull-").concat(sizeProps.pull), sizeProps.pull || sizeProps.pull === 0), _extends2));
});
var classes = (0, _classnames["default"])(prefixCls, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-").concat(span), span !== undefined), _defineProperty(_classNames, "".concat(prefixCls, "-order-").concat(order), order), _defineProperty(_classNames, "".concat(prefixCls, "-offset-").concat(offset), offset), _defineProperty(_classNames, "".concat(prefixCls, "-push-").concat(push), push), _defineProperty(_classNames, "".concat(prefixCls, "-pull-").concat(pull), pull), _classNames), className, sizeClassObj);
return React.createElement(_RowContext["default"].Consumer, null, function (_ref2) {
var gutter = _ref2.gutter;
var style = others.style;
if (gutter) {
style = _extends(_extends(_extends({}, gutter[0] > 0 ? {
paddingLeft: gutter[0] / 2,
paddingRight: gutter[0] / 2
} : {}), gutter[1] > 0 ? {
paddingTop: gutter[1] / 2,
paddingBottom: gutter[1] / 2
} : {}), style);
}
return React.createElement("div", _extends({}, others, {
style: style,
className: classes
}), children);
});
};
return _this;
}
_createClass(Col, [{
key: "render",
value: function render() {
return React.createElement(_configProvider.ConfigConsumer, null, this.renderCol);
}
}]);
return Col;
}(React.Component);
exports["default"] = Col;
Col.propTypes = {
span: PropTypes.number,
order: PropTypes.number,
offset: PropTypes.number,
push: PropTypes.number,
pull: PropTypes.number,
className: PropTypes.string,
children: PropTypes.node,
xs: objectOrNumber,
sm: objectOrNumber,
md: objectOrNumber,
lg: objectOrNumber,
xl: objectOrNumber,
xxl: objectOrNumber
};
//# sourceMappingURL=col.js.map
/***/ }),
/***/ 988:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
// ================== Collapse Motion ==================
var getCollapsedHeight = function getCollapsedHeight() {
return {
height: 0,
opacity: 0
};
};
var getRealHeight = function getRealHeight(node) {
return {
height: node.scrollHeight,
opacity: 1
};
};
var getCurrentHeight = function getCurrentHeight(node) {
return {
height: node.offsetHeight
};
};
var collapseMotion = {
motionName: 'ant-motion-collapse',
onAppearStart: getCollapsedHeight,
onEnterStart: getCollapsedHeight,
onAppearActive: getRealHeight,
onEnterActive: getRealHeight,
onLeaveStart: getCurrentHeight,
onLeaveActive: getCollapsedHeight
};
var _default = collapseMotion;
exports["default"] = _default;
//# sourceMappingURL=motion.js.map
/***/ }),
/***/ 989:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
__webpack_require__(28);
__webpack_require__(1120);
__webpack_require__(169);
//# sourceMappingURL=css.js.map
/***/ }),
/***/ 990:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var enhancer = function enhancer(WrappedComponent) {
return (
/*#__PURE__*/
function (_WrappedComponent) {
_inherits(Progress, _WrappedComponent);
function Progress() {
_classCallCheck(this, Progress);
return _possibleConstructorReturn(this, _getPrototypeOf(Progress).apply(this, arguments));
}
_createClass(Progress, [{
key: "componentDidUpdate",
value: function componentDidUpdate() {
var _this = this;
var now = Date.now();
var updated = false;
Object.keys(this.paths).forEach(function (key) {
var path = _this.paths[key];
if (!path) {
return;
}
updated = true;
var pathStyle = path.style;
pathStyle.transitionDuration = '.3s, .3s, .3s, .06s';
if (_this.prevTimeStamp && now - _this.prevTimeStamp < 100) {
pathStyle.transitionDuration = '0s, 0s';
}
});
if (updated) {
this.prevTimeStamp = Date.now();
}
}
}, {
key: "render",
value: function render() {
return _get(_getPrototypeOf(Progress.prototype), "render", this).call(this);
}
}]);
return Progress;
}(WrappedComponent)
);
};
/* harmony default export */ __webpack_exports__["a"] = (enhancer);
/***/ }),
/***/ 991:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return defaultProps; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return propTypes; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);
var defaultProps = {
className: '',
percent: 0,
prefixCls: 'rc-progress',
strokeColor: '#2db7f5',
strokeLinecap: 'round',
strokeWidth: 1,
style: {},
trailColor: '#D9D9D9',
trailWidth: 1
};
var mixedType = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string]);
var propTypes = {
className: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,
percent: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.oneOfType([mixedType, __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.arrayOf(mixedType)]),
prefixCls: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,
strokeColor: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object])), __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object]),
strokeLinecap: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.oneOf(['butt', 'round', 'square']),
strokeWidth: mixedType,
style: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object,
trailColor: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,
trailWidth: mixedType
};
/***/ }),
/***/ 993:
/***/ (function(module, exports, __webpack_require__) {
var MediaQueryDispatch = __webpack_require__(994);
module.exports = new MediaQueryDispatch();
/***/ }),
/***/ 994:
/***/ (function(module, exports, __webpack_require__) {
var MediaQuery = __webpack_require__(995);
var Util = __webpack_require__(907);
var each = Util.each;
var isFunction = Util.isFunction;
var isArray = Util.isArray;
/**
* Allows for registration of query handlers.
* Manages the query handler's state and is responsible for wiring up browser events
*
* @constructor
*/
function MediaQueryDispatch () {
if(!window.matchMedia) {
throw new Error('matchMedia not present, legacy browsers require a polyfill');
}
this.queries = {};
this.browserIsIncapable = !window.matchMedia('only all').matches;
}
MediaQueryDispatch.prototype = {
constructor : MediaQueryDispatch,
/**
* Registers a handler for the given media query
*
* @param {string} q the media query
* @param {object || Array || Function} options either a single query handler object, a function, or an array of query handlers
* @param {function} options.match fired when query matched
* @param {function} [options.unmatch] fired when a query is no longer matched
* @param {function} [options.setup] fired when handler first triggered
* @param {boolean} [options.deferSetup=false] whether setup should be run immediately or deferred until query is first matched
* @param {boolean} [shouldDegrade=false] whether this particular media query should always run on incapable browsers
*/
register : function(q, options, shouldDegrade) {
var queries = this.queries,
isUnconditional = shouldDegrade && this.browserIsIncapable;
if(!queries[q]) {
queries[q] = new MediaQuery(q, isUnconditional);
}
//normalise to object in an array
if(isFunction(options)) {
options = { match : options };
}
if(!isArray(options)) {
options = [options];
}
each(options, function(handler) {
if (isFunction(handler)) {
handler = { match : handler };
}
queries[q].addHandler(handler);
});
return this;
},
/**
* unregisters a query and all it's handlers, or a specific handler for a query
*
* @param {string} q the media query to target
* @param {object || function} [handler] specific handler to unregister
*/
unregister : function(q, handler) {
var query = this.queries[q];
if(query) {
if(handler) {
query.removeHandler(handler);
}
else {
query.clear();
delete this.queries[q];
}
}
return this;
}
};
module.exports = MediaQueryDispatch;
/***/ }),
/***/ 995:
/***/ (function(module, exports, __webpack_require__) {
var QueryHandler = __webpack_require__(996);
var each = __webpack_require__(907).each;
/**
* Represents a single media query, manages it's state and registered handlers for this query
*
* @constructor
* @param {string} query the media query string
* @param {boolean} [isUnconditional=false] whether the media query should run regardless of whether the conditions are met. Primarily for helping older browsers deal with mobile-first design
*/
function MediaQuery(query, isUnconditional) {
this.query = query;
this.isUnconditional = isUnconditional;
this.handlers = [];
this.mql = window.matchMedia(query);
var self = this;
this.listener = function(mql) {
// Chrome passes an MediaQueryListEvent object, while other browsers pass MediaQueryList directly
self.mql = mql.currentTarget || mql;
self.assess();
};
this.mql.addListener(this.listener);
}
MediaQuery.prototype = {
constuctor : MediaQuery,
/**
* add a handler for this query, triggering if already active
*
* @param {object} handler
* @param {function} handler.match callback for when query is activated
* @param {function} [handler.unmatch] callback for when query is deactivated
* @param {function} [handler.setup] callback for immediate execution when a query handler is registered
* @param {boolean} [handler.deferSetup=false] should the setup callback be deferred until the first time the handler is matched?
*/
addHandler : function(handler) {
var qh = new QueryHandler(handler);
this.handlers.push(qh);
this.matches() && qh.on();
},
/**
* removes the given handler from the collection, and calls it's destroy methods
*
* @param {object || function} handler the handler to remove
*/
removeHandler : function(handler) {
var handlers = this.handlers;
each(handlers, function(h, i) {
if(h.equals(handler)) {
h.destroy();
return !handlers.splice(i,1); //remove from array and exit each early
}
});
},
/**
* Determine whether the media query should be considered a match
*
* @return {Boolean} true if media query can be considered a match, false otherwise
*/
matches : function() {
return this.mql.matches || this.isUnconditional;
},
/**
* Clears all handlers and unbinds events
*/
clear : function() {
each(this.handlers, function(handler) {
handler.destroy();
});
this.mql.removeListener(this.listener);
this.handlers.length = 0; //clear array
},
/*
* Assesses the query, turning on all handlers if it matches, turning them off if it doesn't match
*/
assess : function() {
var action = this.matches() ? 'on' : 'off';
each(this.handlers, function(handler) {
handler[action]();
});
}
};
module.exports = MediaQuery;
/***/ }),
/***/ 996:
/***/ (function(module, exports) {
/**
* Delegate to handle a media query being matched and unmatched.
*
* @param {object} options
* @param {function} options.match callback for when the media query is matched
* @param {function} [options.unmatch] callback for when the media query is unmatched
* @param {function} [options.setup] one-time callback triggered the first time a query is matched
* @param {boolean} [options.deferSetup=false] should the setup callback be run immediately, rather than first time query is matched?
* @constructor
*/
function QueryHandler(options) {
this.options = options;
!options.deferSetup && this.setup();
}
QueryHandler.prototype = {
constructor : QueryHandler,
/**
* coordinates setup of the handler
*
* @function
*/
setup : function() {
if(this.options.setup) {
this.options.setup();
}
this.initialised = true;
},
/**
* coordinates setup and triggering of the handler
*
* @function
*/
on : function() {
!this.initialised && this.setup();
this.options.match && this.options.match();
},
/**
* coordinates the unmatch event for the handler
*
* @function
*/
off : function() {
this.options.unmatch && this.options.unmatch();
},
/**
* called when a handler is to be destroyed.
* delegates to the destroy or unmatch callbacks, depending on availability.
*
* @function
*/
destroy : function() {
this.options.destroy ? this.options.destroy() : this.off();
},
/**
* determines equality by reference.
* if object is supplied compare options, if function, compare match callback
*
* @function
* @param {object || function} [target] the target for comparison
*/
equals : function(target) {
return this.options === target || this.options.match === target;
}
};
module.exports = QueryHandler;
/***/ }),
/***/ 997:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = exports.LayoutContext = void 0;
var React = _interopRequireWildcard(__webpack_require__(0));
var _classnames = _interopRequireDefault(__webpack_require__(3));
var _createReactContext = _interopRequireDefault(__webpack_require__(316));
var _configProvider = __webpack_require__(12);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }
function _extends() { _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; }; return _extends.apply(this, arguments); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var __rest = void 0 && (void 0).__rest || function (s, e) {
var t = {};
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
var LayoutContext = (0, _createReactContext["default"])({
siderHook: {
addSider: function addSider() {
return null;
},
removeSider: function removeSider() {
return null;
}
}
});
exports.LayoutContext = LayoutContext;
function generator(_ref) {
var suffixCls = _ref.suffixCls,
tagName = _ref.tagName,
displayName = _ref.displayName;
return function (BasicComponent) {
var _a;
return _a =
/*#__PURE__*/
function (_React$Component) {
_inherits(Adapter, _React$Component);
function Adapter() {
var _this;
_classCallCheck(this, Adapter);
_this = _possibleConstructorReturn(this, _getPrototypeOf(Adapter).apply(this, arguments));
_this.renderComponent = function (_ref2) {
var getPrefixCls = _ref2.getPrefixCls;
var customizePrefixCls = _this.props.prefixCls;
var prefixCls = getPrefixCls(suffixCls, customizePrefixCls);
return React.createElement(BasicComponent, _extends({
prefixCls: prefixCls,
tagName: tagName
}, _this.props));
};
return _this;
}
_createClass(Adapter, [{
key: "render",
value: function render() {
return React.createElement(_configProvider.ConfigConsumer, null, this.renderComponent);
}
}]);
return Adapter;
}(React.Component), _a.displayName = displayName, _a;
};
}
var Basic = function Basic(props) {
var prefixCls = props.prefixCls,
className = props.className,
children = props.children,
tagName = props.tagName,
others = __rest(props, ["prefixCls", "className", "children", "tagName"]);
var classString = (0, _classnames["default"])(className, prefixCls);
return React.createElement(tagName, _extends({
className: classString
}, others), children);
};
var BasicLayout =
/*#__PURE__*/
function (_React$Component2) {
_inherits(BasicLayout, _React$Component2);
function BasicLayout() {
var _this2;
_classCallCheck(this, BasicLayout);
_this2 = _possibleConstructorReturn(this, _getPrototypeOf(BasicLayout).apply(this, arguments));
_this2.state = {
siders: []
};
return _this2;
}
_createClass(BasicLayout, [{
key: "getSiderHook",
value: function getSiderHook() {
var _this3 = this;
return {
addSider: function addSider(id) {
_this3.setState(function (state) {
return {
siders: [].concat(_toConsumableArray(state.siders), [id])
};
});
},
removeSider: function removeSider(id) {
_this3.setState(function (state) {
return {
siders: state.siders.filter(function (currentId) {
return currentId !== id;
})
};
});
}
};
}
}, {
key: "render",
value: function render() {
var _a = this.props,
prefixCls = _a.prefixCls,
className = _a.className,
children = _a.children,
hasSider = _a.hasSider,
Tag = _a.tagName,
others = __rest(_a, ["prefixCls", "className", "children", "hasSider", "tagName"]);
var classString = (0, _classnames["default"])(className, prefixCls, _defineProperty({}, "".concat(prefixCls, "-has-sider"), typeof hasSider === 'boolean' ? hasSider : this.state.siders.length > 0));
return React.createElement(LayoutContext.Provider, {
value: {
siderHook: this.getSiderHook()
}
}, React.createElement(Tag, _extends({
className: classString
}, others), children));
}
}]);
return BasicLayout;
}(React.Component);
var Layout = generator({
suffixCls: 'layout',
tagName: 'section',
displayName: 'Layout'
})(BasicLayout);
var Header = generator({
suffixCls: 'layout-header',
tagName: 'header',
displayName: 'Header'
})(Basic);
var Footer = generator({
suffixCls: 'layout-footer',
tagName: 'footer',
displayName: 'Footer'
})(Basic);
var Content = generator({
suffixCls: 'layout-content',
tagName: 'main',
displayName: 'Content'
})(Basic);
Layout.Header = Header;
Layout.Footer = Footer;
Layout.Content = Content;
var _default = Layout;
exports["default"] = _default;
//# sourceMappingURL=layout.js.map
/***/ }),
/***/ 998:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var isNumeric = function isNumeric(value) {
return !isNaN(parseFloat(value)) && isFinite(value);
};
var _default = isNumeric;
exports["default"] = _default;
//# sourceMappingURL=isNumeric.js.map
/***/ }),
/***/ 999:
/***/ (function(module, exports, __webpack_require__) {
// style-loader: Adds some css to the DOM by adding a <style> tag
// load the styles
var content = __webpack_require__(1000);
if(typeof content === 'string') content = [[module.i, content, '']];
// Prepare cssTransformation
var transform;
var options = {"hmr":false}
options.transform = transform
// add the styles to the DOM
var update = __webpack_require__(313)(content, options);
if(content.locals) module.exports = content.locals;
/***/ })
});