@@ -2,7 +2,7 @@ import { EasyField } from 'react-formutil';
22export * from 'react-formutil' ;
33import React , { Children , cloneElement , Component , isValidElement , createContext , Fragment } from 'react' ;
44import PropTypes from 'prop-types' ;
5- import { FormControl , FormLabel , InputGroup , FormText , FormGroup , ToggleButtonGroup , ToggleButton , FormCheck , Col , Row } from 'react-bootstrap' ;
5+ import { FormControl , FormLabel , InputGroup , FormGroup , ToggleButtonGroup , ToggleButton , FormCheck , Col , Row , FormText } from 'react-bootstrap' ;
66import reactIs from 'react-is' ;
77import isEqual from 'react-fast-compare' ;
88
@@ -24,17 +24,11 @@ function _defineProperty(obj, key, value) {
2424function _typeof ( obj ) {
2525 "@babel/helpers - typeof" ;
2626
27- if ( typeof Symbol === "function" && typeof Symbol . iterator === "symbol" ) {
28- _typeof = function _typeof ( obj ) {
29- return typeof obj ;
30- } ;
31- } else {
32- _typeof = function _typeof ( obj ) {
33- return obj && typeof Symbol === "function" && obj . constructor === Symbol && obj !== Symbol . prototype ? "symbol" : typeof obj ;
34- } ;
35- }
36-
37- return _typeof ( obj ) ;
27+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol . iterator ? function ( obj ) {
28+ return typeof obj ;
29+ } : function ( obj ) {
30+ return obj && "function" == typeof Symbol && obj . constructor === Symbol && obj !== Symbol . prototype ? "symbol" : typeof obj ;
31+ } , _typeof ( obj ) ;
3832}
3933
4034function _toPrimitive ( input , hint ) {
@@ -60,30 +54,22 @@ function ownKeys(object, enumerableOnly) {
6054
6155 if ( Object . getOwnPropertySymbols ) {
6256 var symbols = Object . getOwnPropertySymbols ( object ) ;
63- if ( enumerableOnly ) symbols = symbols . filter ( function ( sym ) {
57+ enumerableOnly && ( symbols = symbols . filter ( function ( sym ) {
6458 return Object . getOwnPropertyDescriptor ( object , sym ) . enumerable ;
65- } ) ;
66- keys . push . apply ( keys , symbols ) ;
59+ } ) ) , keys . push . apply ( keys , symbols ) ;
6760 }
6861
6962 return keys ;
7063}
7164
7265function _objectSpread2 ( target ) {
7366 for ( var i = 1 ; i < arguments . length ; i ++ ) {
74- var source = arguments [ i ] != null ? arguments [ i ] : { } ;
75-
76- if ( i % 2 ) {
77- ownKeys ( Object ( source ) , true ) . forEach ( function ( key ) {
78- _defineProperty ( target , key , source [ key ] ) ;
79- } ) ;
80- } else if ( Object . getOwnPropertyDescriptors ) {
81- Object . defineProperties ( target , Object . getOwnPropertyDescriptors ( source ) ) ;
82- } else {
83- ownKeys ( Object ( source ) ) . forEach ( function ( key ) {
84- Object . defineProperty ( target , key , Object . getOwnPropertyDescriptor ( source , key ) ) ;
85- } ) ;
86- }
67+ var source = null != arguments [ i ] ? arguments [ i ] : { } ;
68+ i % 2 ? ownKeys ( Object ( source ) , ! 0 ) . forEach ( function ( key ) {
69+ _defineProperty ( target , key , source [ key ] ) ;
70+ } ) : Object . getOwnPropertyDescriptors ? Object . defineProperties ( target , Object . getOwnPropertyDescriptors ( source ) ) : ownKeys ( Object ( source ) ) . forEach ( function ( key ) {
71+ Object . defineProperty ( target , key , Object . getOwnPropertyDescriptor ( source , key ) ) ;
72+ } ) ;
8773 }
8874
8975 return target ;
@@ -142,15 +128,17 @@ function _defineProperties(target, props) {
142128function _createClass ( Constructor , protoProps , staticProps ) {
143129 if ( protoProps ) _defineProperties ( Constructor . prototype , protoProps ) ;
144130 if ( staticProps ) _defineProperties ( Constructor , staticProps ) ;
131+ Object . defineProperty ( Constructor , "prototype" , {
132+ writable : false
133+ } ) ;
145134 return Constructor ;
146135}
147136
148137function _setPrototypeOf ( o , p ) {
149- _setPrototypeOf = Object . setPrototypeOf || function _setPrototypeOf ( o , p ) {
138+ _setPrototypeOf = Object . setPrototypeOf ? Object . setPrototypeOf . bind ( ) : function _setPrototypeOf ( o , p ) {
150139 o . __proto__ = p ;
151140 return o ;
152141 } ;
153-
154142 return _setPrototypeOf ( o , p ) ;
155143}
156144
@@ -166,11 +154,14 @@ function _inherits(subClass, superClass) {
166154 configurable : true
167155 }
168156 } ) ;
157+ Object . defineProperty ( subClass , "prototype" , {
158+ writable : false
159+ } ) ;
169160 if ( superClass ) _setPrototypeOf ( subClass , superClass ) ;
170161}
171162
172163function _getPrototypeOf ( o ) {
173- _getPrototypeOf = Object . setPrototypeOf ? Object . getPrototypeOf : function _getPrototypeOf ( o ) {
164+ _getPrototypeOf = Object . setPrototypeOf ? Object . getPrototypeOf . bind ( ) : function _getPrototypeOf ( o ) {
174165 return o . __proto__ || Object . getPrototypeOf ( o ) ;
175166 } ;
176167 return _getPrototypeOf ( o ) ;
@@ -182,7 +173,7 @@ function _isNativeReflectConstruct() {
182173 if ( typeof Proxy === "function" ) return true ;
183174
184175 try {
185- Date . prototype . toString . call ( Reflect . construct ( Date , [ ] , function ( ) { } ) ) ;
176+ Boolean . prototype . valueOf . call ( Reflect . construct ( Boolean , [ ] , function ( ) { } ) ) ;
186177 return true ;
187178 } catch ( e ) {
188179 return false ;
@@ -200,6 +191,8 @@ function _assertThisInitialized(self) {
200191function _possibleConstructorReturn ( self , call ) {
201192 if ( call && ( _typeof ( call ) === "object" || typeof call === "function" ) ) {
202193 return call ;
194+ } else if ( call !== void 0 ) {
195+ throw new TypeError ( "Derived constructors may only return object or undefined" ) ;
203196 }
204197
205198 return _assertThisInitialized ( self ) ;
@@ -281,6 +274,7 @@ CheckboxGroup.propTypes = {
281274 onBlur : PropTypes . func ,
282275 value : PropTypes . array
283276} ;
277+ var CheckboxGroup$1 = CheckboxGroup ;
284278
285279var styleSheet ;
286280
@@ -301,6 +295,7 @@ function insertRule(selector, content) {
301295 }
302296}
303297
298+ var _excluded = [ "children" , "addons" , "label" , "helper" , "labelCol" , "wrapperCol" , "validationState" , "className" , "as" , "feedback" , "extra" , "noStyle" , "errorLevel" ] ;
304299var isValidElementType = reactIs . isValidElementType ;
305300
306301var _createContext = /*#__PURE__*/ createContext ( { } ) ,
@@ -469,16 +464,16 @@ var _FormGroup = /*#__PURE__*/function (_Component) {
469464 label = props . label ,
470465 helper = props . helper ,
471466 labelCol = props . labelCol ,
472- wrapperCol = props . wrapperCol ,
473- validationState = props . validationState ,
474- className = props . className ,
475- as = props . as ,
476- feedback = props . feedback ,
477- extraNode = props . extra ,
467+ wrapperCol = props . wrapperCol ;
468+ props . validationState ;
469+ props . className ;
470+ var as = props . as ;
471+ props . feedback ;
472+ var extraNode = props . extra ,
478473 noStyle = props . noStyle ,
479474 _props$errorLevel = props . errorLevel ,
480475 errorLevel = _props$errorLevel === void 0 ? errorLevelGlobal : _props$errorLevel ,
481- fieldProps = _objectWithoutProperties ( props , [ "children" , "addons" , "label" , "helper" , "labelCol" , "wrapperCol" , "validationState" , "className" , "as" , "feedback" , "extra" , "noStyle" , "errorLevel" ] ) ;
476+ fieldProps = _objectWithoutProperties ( props , _excluded ) ;
482477
483478 var Wrapper = wrapperCol ? Col : Fragment ;
484479 var groupAsProps = ! as && ( labelCol || wrapperCol ) ? Row : as ;
@@ -572,7 +567,7 @@ var _FormGroup = /*#__PURE__*/function (_Component) {
572567 fieldProps . __TYPE__ = 'array' ;
573568 break ;
574569
575- case CheckboxGroup :
570+ case CheckboxGroup$1 :
576571 case ToggleButtonGroup :
577572 if ( children . props . type !== 'radio' ) {
578573 fieldProps . __TYPE__ = 'array' ;
@@ -732,6 +727,7 @@ _FormGroup.propTypes = {
732727 errorLevel : PropTypes . oneOf ( [ 0 , 1 , 2 , 'off' ] ) // $parser $formatter checked unchecked $validators validMessage等传递给 EasyField 组件的额外参数
733728
734729} ;
730+ var _FormGroup$1 = _FormGroup ;
735731insertRule ( '.valid-feedback:empty,.invalid-feedback:empty' , 'display: none !important' ) ;
736732insertRule ( '.has-error .invalid-feedback' , 'display: block' ) ;
737733
@@ -787,5 +783,6 @@ RadioGroup.propTypes = {
787783 onBlur : PropTypes . func ,
788784 value : PropTypes . string
789785} ;
786+ var RadioGroup$1 = RadioGroup ;
790787
791- export { CheckboxGroup , _FormGroup as FormGroup , RadioGroup , CheckboxGroup as SwitchGroup , setErrorLevel } ;
788+ export { CheckboxGroup$1 as CheckboxGroup , _FormGroup$1 as FormGroup , RadioGroup$1 as RadioGroup , CheckboxGroup$1 as SwitchGroup , setErrorLevel } ;
0 commit comments