{"version":3,"sources":["webpack:///./node_modules/rmc-dialog/es/LazyRenderBox.js","webpack:///./node_modules/rmc-dialog/es/Dialog.js","webpack:///./node_modules/rmc-dialog/es/DialogWrap.js"],"names":["_React$Component","LazyRenderBox","this","__proto__","Object","getPrototypeOf","apply","arguments","key","value","nextProps","hiddenClassName","visible","className","props","createElement","Component","noop","Dialog","_this","getDialogElement","closable","prefixCls","footer","ref","el","footerRef","header","title","headerRef","closer","onClick","close","transitionName","getTransitionName","dialogElement","role","dialogRef","style","bodyStyle","bodyRef","children","Animate","showProp","onAppear","onAnimateAppear","onLeave","onAnimateLeave","component","transitionAppear","document","body","overflow","wrapRef","display","afterClose","e","onClose","onMaskClick","target","currentTarget","undefined","zIndex","wrapStyle","getZIndexStyle","maskStyle","maskTransitionName","animation","maskAnimation","maskElement","mask","maskTransition","getMaskTransitionName","getMaskStyle","maskProps","_this2","maskClosable","getWrapStyle","getMaskElement","wrapClassName","wrapProps","defaultProps","IS_REACT_16","createPortal","CAN_USE_DOM","window","DialogWrap","saveRef","node","_component","getComponent","forEach","hasOwnProperty","removeContainer","container","unmountComponentAtNode","parentNode","removeChild","getContainer","containerId","Date","getTime","setAttribute","appendChild","componentDidUpdate","_ref","renderDialog","unstable_renderSubtreeIntoContainer"],"mappings":"+NAuCe,EAhCK,SAAUA,GAG1B,SAASC,IAGL,OAFA,IAAgBC,KAAMD,GAEf,IAA2BC,MAAOD,EAAcE,WAAaC,OAAOC,eAAeJ,IAAgBK,MAAMJ,KAAMK,YAuB1H,OA5BA,IAAUN,EAAeD,GAQzB,IAAaC,EAAe,CAAC,CACzBO,IAAK,wBACLC,MAAO,SAA+BC,GAClC,QAASA,EAAUC,mBAAqBD,EAAUE,UAEvD,CACCJ,IAAK,SACLC,MAAO,WACH,IAAII,EAAYX,KAAKY,MAAMD,UACrBX,KAAKY,MAAMH,kBAAoBT,KAAKY,MAAMF,UAC5CC,GAAa,IAAMX,KAAKY,MAAMH,iBAElC,IAAIG,EAAQ,IAAS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AMH,GAC7BjD,SAASC,KAAKoD,YAAYT,GAC1B3E,EAAM2E,UAAYA,EAEtB,OAAO3E,EAAM2E,WAEV3E,EA0DX,OAlGA,IAAUmE,EAAYtF,GA2CtB,IAAasF,EAAY,CAAC,CACtB9E,IAAK,oBACLC,MAAO,WACCP,KAAKY,MAAMF,SACXV,KAAKsG,uBAGd,CACChG,IAAK,wBACLC,MAAO,SAA+BgG,GAClC,IAAI7F,EAAU6F,EAAK7F,QAEnB,SAAUV,KAAKY,MAAMF,UAAWA,KAErC,CACCJ,IAAK,uBACLC,MAAO,WACCP,KAAKY,MAAMF,QACNsE,EAIDhF,KAAK2F,kBAHL3F,KAAKwG,cAAa,GAMtBxG,KAAK2F,oBAGd,CACCrF,IAAK,qBACLC,MAAO,WACEyE,GACDhF,KAAKwG,aAAaxG,KAAKY,MAAMF,WAGtC,CACCJ,IAAK,eACLC,MAAO,SAAsBG,GACzB,IAAS+F,oCAAoCzG,KAAMA,KAAKwF,aAAa9E,GAAUV,KAAKgG,kBAEzF,CACC1F,IAAK,SACLC,MAAO,WACH,IAAK2E,EACD,OAAO,KAEX,IAAIxE,EAAUV,KAAKY,MAAMF,QAEzB,OAAIsE,IAAgBtE,GAAWV,KAAKuF,YACzB,IAASN,aAAajF,KAAKwF,aAAa9E,GAAUV,KAAKgG,gBAE3D,SAIRZ,EAnGM,CAoGf,IAAMtE,WAEO,YAEf,EAAWiE,aAAe,CACtBrE,SAAS,EACTU,UAAW,aACXmC,QA/GJ","file":"npm.rmc-dialog.c920b4ddeb9b68365139.js","sourcesContent":["import _extends from \"babel-runtime/helpers/extends\";\nimport _classCallCheck from \"babel-runtime/helpers/classCallCheck\";\nimport _createClass from \"babel-runtime/helpers/createClass\";\nimport _possibleConstructorReturn from \"babel-runtime/helpers/possibleConstructorReturn\";\nimport _inherits from \"babel-runtime/helpers/inherits\";\nimport React from 'react';\n\nvar LazyRenderBox = function (_React$Component) {\n    _inherits(LazyRenderBox, _React$Component);\n\n    function LazyRenderBox() {\n        _classCallCheck(this, LazyRenderBox);\n\n        return _possibleConstructorReturn(this, (LazyRenderBox.__proto__ || Object.getPrototypeOf(LazyRenderBox)).apply(this, arguments));\n    }\n\n    _createClass(LazyRenderBox, [{\n        key: \"shouldComponentUpdate\",\n        value: function shouldComponentUpdate(nextProps) {\n            return !!nextProps.hiddenClassName || !!nextProps.visible;\n        }\n    }, {\n        key: \"render\",\n        value: function render() {\n            var className = this.props.className;\n            if (!!this.props.hiddenClassName && !this.props.visible) {\n                className += \" \" + this.props.hiddenClassName;\n            }\n            var props = _extends({}, this.props);\n            delete props.hiddenClassName;\n            delete props.visible;\n            props.className = className;\n            return React.createElement(\"div\", _extends({}, props));\n        }\n    }]);\n\n    return LazyRenderBox;\n}(React.Component);\n\nexport default LazyRenderBox;","import _extends from 'babel-runtime/helpers/extends';\nimport _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _createClass from 'babel-runtime/helpers/createClass';\nimport _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';\nimport _inherits from 'babel-runtime/helpers/inherits';\nimport React from 'react';\nimport Animate from 'rc-animate';\nimport LazyRenderBox from './LazyRenderBox';\nfunction noop() {}\n\nvar Dialog = function (_React$Component) {\n    _inherits(Dialog, _React$Component);\n\n    function Dialog() {\n        _classCallCheck(this, Dialog);\n\n        var _this = _possibleConstructorReturn(this, (Dialog.__proto__ || Object.getPrototypeOf(Dialog)).apply(this, arguments));\n\n        _this.getDialogElement = function () {\n            var props = _this.props;\n            var closable = props.closable;\n            var prefixCls = props.prefixCls;\n            var footer = void 0;\n            if (props.footer) {\n                footer = React.createElement(\"div\", { className: prefixCls + '-footer', ref: function ref(el) {\n                        return _this.footerRef = el;\n                    } }, props.footer);\n            }\n            var header = void 0;\n            if (props.title) {\n                header = React.createElement(\"div\", { className: prefixCls + '-header', ref: function ref(el) {\n                        return _this.headerRef = el;\n                    } }, React.createElement(\"div\", { className: prefixCls + '-title' }, props.title));\n            }\n            var closer = void 0;\n            if (closable) {\n                closer = React.createElement(\"button\", { onClick: _this.close, \"aria-label\": \"Close\", className: prefixCls + '-close' }, React.createElement(\"span\", { className: prefixCls + '-close-x' }));\n            }\n            var transitionName = _this.getTransitionName();\n            var dialogElement = React.createElement(LazyRenderBox, { key: \"dialog-element\", role: \"document\", ref: function ref(el) {\n                    return _this.dialogRef = el;\n                }, style: props.style || {}, className: prefixCls + ' ' + (props.className || ''), visible: props.visible }, React.createElement(\"div\", { className: prefixCls + '-content' }, closer, header, React.createElement(\"div\", { className: prefixCls + '-body', style: props.bodyStyle, ref: function ref(el) {\n                    return _this.bodyRef = el;\n                } }, props.children), footer));\n            return React.createElement(Animate, { key: \"dialog\", showProp: \"visible\", onAppear: _this.onAnimateAppear, onLeave: _this.onAnimateLeave, transitionName: transitionName, component: \"\", transitionAppear: true }, dialogElement);\n        };\n        _this.onAnimateAppear = function () {\n            document.body.style.overflow = 'hidden';\n        };\n        _this.onAnimateLeave = function () {\n            document.body.style.overflow = '';\n            if (_this.wrapRef) {\n                _this.wrapRef.style.display = 'none';\n            }\n            if (_this.props.onAnimateLeave) {\n                _this.props.onAnimateLeave();\n            }\n            if (_this.props.afterClose) {\n                _this.props.afterClose();\n            }\n        };\n        _this.close = function (e) {\n            if (_this.props.onClose) {\n                _this.props.onClose(e);\n            }\n        };\n        _this.onMaskClick = function (e) {\n            if (e.target === e.currentTarget) {\n                _this.close(e);\n            }\n        };\n        return _this;\n    }\n\n    _createClass(Dialog, [{\n        key: 'componentWillUnmount',\n        value: function componentWillUnmount() {\n            // fix: react@16 no dismissing animation\n            document.body.style.overflow = '';\n            if (this.wrapRef) {\n                this.wrapRef.style.display = 'none';\n            }\n        }\n    }, {\n        key: 'getZIndexStyle',\n        value: function getZIndexStyle() {\n            var style = {};\n            var props = this.props;\n            if (props.zIndex !== undefined) {\n                style.zIndex = props.zIndex;\n            }\n            return style;\n        }\n    }, {\n        key: 'getWrapStyle',\n        value: function getWrapStyle() {\n            var wrapStyle = this.props.wrapStyle || {};\n            return _extends({}, this.getZIndexStyle(), wrapStyle);\n        }\n    }, {\n        key: 'getMaskStyle',\n        value: function getMaskStyle() {\n            var maskStyle = this.props.maskStyle || {};\n            return _extends({}, this.getZIndexStyle(), maskStyle);\n        }\n    }, {\n        key: 'getMaskTransitionName',\n        value: function getMaskTransitionName() {\n            var props = this.props;\n            var transitionName = props.maskTransitionName;\n            var animation = props.maskAnimation;\n            if (!transitionName && animation) {\n                transitionName = props.prefixCls + '-' + animation;\n            }\n            return transitionName;\n        }\n    }, {\n        key: 'getTransitionName',\n        value: function getTransitionName() {\n            var props = this.props;\n            var transitionName = props.transitionName;\n            var animation = props.animation;\n            if (!transitionName && animation) {\n                transitionName = props.prefixCls + '-' + animation;\n            }\n            return transitionName;\n        }\n    }, {\n        key: 'getMaskElement',\n        value: function getMaskElement() {\n            var props = this.props;\n            var maskElement = void 0;\n            if (props.mask) {\n                var maskTransition = this.getMaskTransitionName();\n                maskElement = React.createElement(LazyRenderBox, _extends({ style: this.getMaskStyle(), key: \"mask-element\", className: props.prefixCls + '-mask', hiddenClassName: props.prefixCls + '-mask-hidden', visible: props.visible }, props.maskProps));\n                if (maskTransition) {\n                    maskElement = React.createElement(Animate, { key: \"mask\", showProp: \"visible\", transitionAppear: true, component: \"\", transitionName: maskTransition }, maskElement);\n                }\n            }\n            return maskElement;\n        }\n    }, {\n        key: 'render',\n        value: function render() {\n            var _this2 = this;\n\n            var props = this.props;\n            var prefixCls = props.prefixCls,\n                maskClosable = props.maskClosable;\n\n            var style = this.getWrapStyle();\n            if (props.visible) {\n                style.display = null;\n            }\n            return React.createElement(\"div\", null, this.getMaskElement(), React.createElement(\"div\", _extends({ className: prefixCls + '-wrap ' + (props.wrapClassName || ''), ref: function ref(el) {\n                    return _this2.wrapRef = el;\n                }, onClick: maskClosable ? this.onMaskClick : undefined, role: \"dialog\", \"aria-labelledby\": props.title, style: style }, props.wrapProps), this.getDialogElement()));\n        }\n    }]);\n\n    return Dialog;\n}(React.Component);\n\nexport default Dialog;\n\nDialog.defaultProps = {\n    afterClose: noop,\n    className: '',\n    mask: true,\n    visible: false,\n    closable: true,\n    maskClosable: true,\n    prefixCls: 'rmc-dialog',\n    onClose: noop\n};","import _extends from 'babel-runtime/helpers/extends';\nimport _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _createClass from 'babel-runtime/helpers/createClass';\nimport _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';\nimport _inherits from 'babel-runtime/helpers/inherits';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport Dialog from './Dialog';\nfunction noop() {}\nvar IS_REACT_16 = !!ReactDOM.createPortal;\nvar CAN_USE_DOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\nvar DialogWrap = function (_React$Component) {\n    _inherits(DialogWrap, _React$Component);\n\n    function DialogWrap() {\n        _classCallCheck(this, DialogWrap);\n\n        var _this = _possibleConstructorReturn(this, (DialogWrap.__proto__ || Object.getPrototypeOf(DialogWrap)).apply(this, arguments));\n\n        _this.saveRef = function (node) {\n            if (IS_REACT_16) {\n                _this._component = node;\n            }\n        };\n        _this.getComponent = function (visible) {\n            var props = _extends({}, _this.props);\n            ['visible', 'onAnimateLeave'].forEach(function (key) {\n                if (props.hasOwnProperty(key)) {\n                    delete props[key];\n                }\n            });\n            return React.createElement(Dialog, _extends({}, props, { visible: visible, onAnimateLeave: _this.removeContainer, ref: _this.saveRef }));\n        };\n        _this.removeContainer = function () {\n            if (_this.container) {\n                if (!IS_REACT_16) {\n                    ReactDOM.unmountComponentAtNode(_this.container);\n                }\n                _this.container.parentNode.removeChild(_this.container);\n                _this.container = null;\n            }\n        };\n        _this.getContainer = function () {\n            if (!_this.container) {\n                var container = document.createElement('div');\n                var containerId = _this.props.prefixCls + '-container-' + new Date().getTime();\n                container.setAttribute('id', containerId);\n                document.body.appendChild(container);\n                _this.container = container;\n            }\n            return _this.container;\n        };\n        return _this;\n    }\n\n    _createClass(DialogWrap, [{\n        key: 'componentDidMount',\n        value: function componentDidMount() {\n            if (this.props.visible) {\n                this.componentDidUpdate();\n            }\n        }\n    }, {\n        key: 'shouldComponentUpdate',\n        value: function shouldComponentUpdate(_ref) {\n            var visible = _ref.visible;\n\n            return !!(this.props.visible || visible);\n        }\n    }, {\n        key: 'componentWillUnmount',\n        value: function componentWillUnmount() {\n            if (this.props.visible) {\n                if (!IS_REACT_16) {\n                    this.renderDialog(false);\n                } else {\n                    // TODO for react@16 createPortal animation\n                    this.removeContainer();\n                }\n            } else {\n                this.removeContainer();\n            }\n        }\n    }, {\n        key: 'componentDidUpdate',\n        value: function componentDidUpdate() {\n            if (!IS_REACT_16) {\n                this.renderDialog(this.props.visible);\n            }\n        }\n    }, {\n        key: 'renderDialog',\n        value: function renderDialog(visible) {\n            ReactDOM.unstable_renderSubtreeIntoContainer(this, this.getComponent(visible), this.getContainer());\n        }\n    }, {\n        key: 'render',\n        value: function render() {\n            if (!CAN_USE_DOM) {\n                return null;\n            }\n            var visible = this.props.visible;\n\n            if (IS_REACT_16 && (visible || this._component)) {\n                return ReactDOM.createPortal(this.getComponent(visible), this.getContainer());\n            }\n            return null;\n        }\n    }]);\n\n    return DialogWrap;\n}(React.Component);\n\nexport default DialogWrap;\n\nDialogWrap.defaultProps = {\n    visible: false,\n    prefixCls: 'rmc-dialog',\n    onClose: noop\n};"],"sourceRoot":""}