@@ -428,6 +428,15 @@ return /******/ (function(modules) { // webpackBootstrap
428428
429429 if ( duration <= 0 ) setTimeout ( done . bind ( null , fakeEvent ) , 0 ) ;
430430
431+ return {
432+ cancel : function cancel ( ) {
433+ if ( fired ) return ;
434+ fired = true ;
435+ _domHelpersEventsOff2 [ 'default' ] ( event . target , _domHelpersTransitionProperties2 [ 'default' ] . end , done ) ;
436+ _domHelpersStyle2 [ 'default' ] ( node , reset ) ;
437+ }
438+ } ;
439+
431440 function done ( event ) {
432441 if ( event . target !== event . currentTarget ) return ;
433442
@@ -899,14 +908,16 @@ return /******/ (function(modules) { // webpackBootstrap
899908 function createWrapper ( ) {
900909 var dummy = { } ;
901910
902- [ 'formats' , 'parse' , 'format' , 'firstOfWeek' , 'precision' ] . forEach ( function ( name ) {
903- return Object . defineProperty ( dummy , name , {
904- enumerable : true ,
905- get : function get ( ) {
906- throw new Error ( '[React Widgets] You are attempting to use a widget that requires localization ' + '(Calendar, DateTimePicker, NumberPicker). ' + 'However there is no localizer set. Please configure a localizer. \n\n' + 'see http://jquense.github.io/react-widgets/docs/#/i18n for more info.' ) ;
907- }
911+ if ( process . env . NODE_ENV !== 'production' ) {
912+ [ 'formats' , 'parse' , 'format' , 'firstOfWeek' , 'precision' ] . forEach ( function ( name ) {
913+ return Object . defineProperty ( dummy , name , {
914+ enumerable : true ,
915+ get : function get ( ) {
916+ throw new Error ( '[React Widgets] You are attempting to use a widget that requires localization ' + '(Calendar, DateTimePicker, NumberPicker). ' + 'However there is no localizer set. Please configure a localizer. \n\n' + 'see http://jquense.github.io/react-widgets/docs/#/i18n for more info.' ) ;
917+ }
918+ } ) ;
908919 } ) ;
909- } ) ;
920+ }
910921 return dummy ;
911922 }
912923 /* WEBPACK VAR INJECTION */ } . call ( exports , __webpack_require__ ( 1 ) ) )
@@ -1742,6 +1753,10 @@ return /******/ (function(modules) { // webpackBootstrap
17421753
17431754 var transform = _utilConfiguration2 [ 'default' ] . animate . transform ;
17441755
1756+ var CLOSING = 0 ,
1757+ OPENING = 1 ,
1758+ NONE = 2 ;
1759+
17451760 function properties ( prop , value ) {
17461761 var _ref , _ref2 ;
17471762
@@ -1816,6 +1831,13 @@ return /******/ (function(modules) { // webpackBootstrap
18161831 opening = ! pvProps . open && this . props . open ,
18171832 open = this . props . open ;
18181833
1834+ if ( pvProps . dropUp !== this . props . dropUp && this . transitionState !== NONE ) {
1835+ this . _transition && this . _transition . cancel ( ) ;
1836+ this . reset ( ) ;
1837+ opening = this . transitionState === OPENING ;
1838+ closing = this . transitionState === CLOSING ;
1839+ }
1840+
18191841 if ( opening ) this . open ( ) ; else if ( closing ) this . close ( ) ; else if ( open ) this . height ( ) ;
18201842 } ,
18211843
@@ -1863,7 +1885,7 @@ return /******/ (function(modules) { // webpackBootstrap
18631885 content = _utilCompat2 [ 'default' ] . findDOMNode ( this . refs . content ) ,
18641886 margin = parseInt ( _domHelpersStyle2 [ 'default' ] ( content , 'margin-top' ) , 10 ) + parseInt ( _domHelpersStyle2 [ 'default' ] ( content , 'margin-bottom' ) , 10 ) ;
18651887
1866- var height = _domHelpersQueryHeight2 [ 'default' ] ( content ) + ( isNaN ( margin ) ? 0 : margin ) ;
1888+ var height = ( _domHelpersQueryHeight2 [ 'default' ] ( content ) || 0 ) + ( isNaN ( margin ) ? 0 : margin ) ;
18671889
18681890 if ( this . state . height !== height ) {
18691891 el . style . height = height + 'px' ;
@@ -1872,12 +1894,14 @@ return /******/ (function(modules) { // webpackBootstrap
18721894 } ,
18731895
18741896 open : function open ( ) {
1897+ var _this = this ;
1898+
18751899 var self = this ,
18761900 anim = _utilCompat2 [ 'default' ] . findDOMNode ( this ) ,
18771901 el = _utilCompat2 [ 'default' ] . findDOMNode ( this . refs . content ) ;
18781902
18791903 this . ORGINAL_POSITION = _domHelpersStyle2 [ 'default' ] ( el , 'position' ) ;
1880- this . _isOpening = true ;
1904+ this . transitionState = OPENING ;
18811905
18821906 if ( this . _initialPosition ) {
18831907 this . _initialPosition = false ;
@@ -1889,43 +1913,47 @@ return /******/ (function(modules) { // webpackBootstrap
18891913 anim . className += ' rw-popup-animating' ;
18901914 el . style . position = 'absolute' ;
18911915
1892- _utilConfiguration2 [ 'default' ] . animate ( el , { top : 0 } , self . props . duration , 'ease' , function ( ) {
1893- if ( ! self . _isOpening ) return ;
1916+ this . _transition = _utilConfiguration2 [ 'default' ] . animate ( el , { top : 0 } , self . props . duration , 'ease' , function ( ) {
1917+ if ( _this . transitionState !== OPENING ) return ;
18941918
1919+ _this . transitionState = NONE ;
18951920 anim . className = anim . className . replace ( / ? r w - p o p u p - a n i m a t i n g / g, '' ) ;
18961921
18971922 el . style . position = self . ORGINAL_POSITION ;
18981923 anim . style . overflow = 'visible' ;
1899- self . ORGINAL_POSITION = null ;
1924+ _this . ORGINAL_POSITION = null ;
19001925
1901- self . props . onOpen ( ) ;
1926+ _this . props . onOpen ( ) ;
19021927 } ) ;
19031928 } ,
19041929
19051930 close : function close ( dur ) {
1906- var self = this ,
1907- el = _utilCompat2 [ 'default' ] . findDOMNode ( this . refs . content ) ,
1931+ var _this2 = this ;
1932+
1933+ var el = _utilCompat2 [ 'default' ] . findDOMNode ( this . refs . content ) ,
19081934 anim = _utilCompat2 [ 'default' ] . findDOMNode ( this ) ;
19091935
19101936 this . ORGINAL_POSITION = _domHelpersStyle2 [ 'default' ] ( el , 'position' ) ;
19111937
1912- this . _isOpening = false ;
1938+ this . transitionState = CLOSING ;
1939+
19131940 this . height ( ) ;
19141941 this . props . onClosing ( ) ;
19151942
19161943 anim . style . overflow = 'hidden' ;
19171944 anim . className += ' rw-popup-animating' ;
19181945 el . style . position = 'absolute' ;
19191946
1920- _utilConfiguration2 [ 'default' ] . animate ( el , { top : this . props . dropUp ? '100%' : '-100%' } , dur === undefined ? this . props . duration : dur , 'ease' , function ( ) {
1921- if ( self . _isOpening ) return ;
1947+ this . _transition = _utilConfiguration2 [ 'default' ] . animate ( el , { top : this . props . dropUp ? '100%' : '-100%' } , dur === undefined ? this . props . duration : dur , 'ease' , function ( ) {
1948+ if ( _this2 . transitionState !== CLOSING ) return ;
19221949
1950+ _this2 . transitionState = NONE ;
19231951 el . style . position = self . ORGINAL_POSITION ;
19241952 anim . className = anim . className . replace ( / ? r w - p o p u p - a n i m a t i n g / g, '' ) ;
19251953
19261954 anim . style . display = 'none' ;
1927- self . ORGINAL_POSITION = null ;
1928- self . props . onClose ( ) ;
1955+ _this2 . ORGINAL_POSITION = null ;
1956+ _this2 . props . onClose ( ) ;
19291957 } ) ;
19301958 }
19311959
@@ -4958,7 +4986,11 @@ return /******/ (function(modules) { // webpackBootstrap
49584986 } , msgs ) ;
49594987 }
49604988
4961- exports [ 'default' ] = _uncontrollable2 [ 'default' ] ( Calendar , { value : 'onChange' } ) ;
4989+ exports [ 'default' ] = _uncontrollable2 [ 'default' ] ( Calendar , {
4990+ value : 'onChange' ,
4991+ viewDate : 'onViewDateChange' ,
4992+ view : 'onViewChange'
4993+ } ) ;
49624994 module . exports = exports [ 'default' ] ;
49634995
49644996/***/ } ,
@@ -8413,10 +8445,15 @@ return /******/ (function(modules) { // webpackBootstrap
84138445
84148446 if ( altKey ) this . close ( ) ; else if ( isOpen ) this . setState ( babelHelpers . _extends ( { focusedItem : prev } , nullTag ) ) ;
84158447 } else if ( key === 'End' ) {
8448+ e . preventDefault ( ) ;
84168449 if ( isOpen ) this . setState ( babelHelpers . _extends ( { focusedItem : list . last ( ) } , nullTag ) ) ; else tagList && this . setState ( { focusedTag : tagList . last ( ) } ) ;
84178450 } else if ( key === 'Home' ) {
8451+ e . preventDefault ( ) ;
84188452 if ( isOpen ) this . setState ( babelHelpers . _extends ( { focusedItem : list . first ( ) } , nullTag ) ) ; else tagList && this . setState ( { focusedTag : tagList . first ( ) } ) ;
8419- } else if ( isOpen && key === 'Enter' ) ctrlKey && this . props . onCreate || focusedItem === null ? this . _onCreate ( this . props . searchTerm ) : this . _onSelect ( this . state . focusedItem ) ; else if ( key === 'Escape' ) isOpen ? this . close ( ) : tagList && this . setState ( nullTag ) ; else if ( noSearch && key === 'ArrowLeft' ) tagList && this . setState ( { focusedTag : tagList . prev ( focusedTag ) } ) ; else if ( noSearch && key === 'ArrowRight' ) tagList && this . setState ( { focusedTag : tagList . next ( focusedTag ) } ) ; else if ( noSearch && key === 'Delete' ) tagList && tagList . remove ( focusedTag ) ; else if ( noSearch && key === 'Backspace' ) tagList && tagList . removeNext ( ) ;
8453+ } else if ( isOpen && key === 'Enter' ) {
8454+ e . preventDefault ( ) ;
8455+ ctrlKey && this . props . onCreate || focusedItem === null ? this . _onCreate ( this . props . searchTerm ) : this . _onSelect ( this . state . focusedItem ) ;
8456+ } else if ( key === 'Escape' ) isOpen ? this . close ( ) : tagList && this . setState ( nullTag ) ; else if ( noSearch && key === 'ArrowLeft' ) tagList && this . setState ( { focusedTag : tagList . prev ( focusedTag ) } ) ; else if ( noSearch && key === 'ArrowRight' ) tagList && this . setState ( { focusedTag : tagList . next ( focusedTag ) } ) ; else if ( noSearch && key === 'Delete' ) tagList && tagList . remove ( focusedTag ) ; else if ( noSearch && key === 'Backspace' ) tagList && tagList . removeNext ( ) ;
84208457 }
84218458 } , {
84228459 key : 'change' ,
0 commit comments