5f0232a04da3e6e800f1202d785de9b8.json
14.8 KB
{"ast":null,"code":"import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport Dialog from './Modal';\nimport ActionButton from './ActionButton';\nimport devWarning from '../_util/devWarning';\nimport ConfigProvider from '../config-provider';\n\nvar ConfirmDialog = function ConfirmDialog(props) {\n var icon = props.icon,\n onCancel = props.onCancel,\n onOk = props.onOk,\n close = props.close,\n zIndex = props.zIndex,\n afterClose = props.afterClose,\n visible = props.visible,\n keyboard = props.keyboard,\n centered = props.centered,\n getContainer = props.getContainer,\n maskStyle = props.maskStyle,\n okText = props.okText,\n okButtonProps = props.okButtonProps,\n cancelText = props.cancelText,\n cancelButtonProps = props.cancelButtonProps,\n direction = props.direction,\n prefixCls = props.prefixCls,\n rootPrefixCls = props.rootPrefixCls,\n bodyStyle = props.bodyStyle,\n _props$closable = props.closable,\n closable = _props$closable === void 0 ? false : _props$closable,\n closeIcon = props.closeIcon,\n modalRender = props.modalRender,\n focusTriggerAfterClose = props.focusTriggerAfterClose;\n devWarning(!(typeof icon === 'string' && icon.length > 2), 'Modal', \"`icon` is using ReactNode instead of string naming in v4. Please check `\".concat(icon, \"` at https://ant.design/components/icon\")); // 支持传入{ icon: null }来隐藏`Modal.confirm`默认的Icon\n\n var okType = props.okType || 'primary';\n var contentPrefixCls = \"\".concat(prefixCls, \"-confirm\"); // 默认为 true,保持向下兼容\n\n var okCancel = 'okCancel' in props ? props.okCancel : true;\n var width = props.width || 416;\n var style = props.style || {};\n var mask = props.mask === undefined ? true : props.mask; // 默认为 false,保持旧版默认行为\n\n var maskClosable = props.maskClosable === undefined ? false : props.maskClosable;\n var autoFocusButton = props.autoFocusButton === null ? false : props.autoFocusButton || 'ok';\n var transitionName = props.transitionName || 'zoom';\n var maskTransitionName = props.maskTransitionName || 'fade';\n var classString = classNames(contentPrefixCls, \"\".concat(contentPrefixCls, \"-\").concat(props.type), _defineProperty({}, \"\".concat(contentPrefixCls, \"-rtl\"), direction === 'rtl'), props.className);\n var cancelButton = okCancel && /*#__PURE__*/React.createElement(ActionButton, {\n actionFn: onCancel,\n closeModal: close,\n autoFocus: autoFocusButton === 'cancel',\n buttonProps: cancelButtonProps,\n prefixCls: \"\".concat(rootPrefixCls, \"-btn\")\n }, cancelText);\n return /*#__PURE__*/React.createElement(Dialog, {\n prefixCls: prefixCls,\n className: classString,\n wrapClassName: classNames(_defineProperty({}, \"\".concat(contentPrefixCls, \"-centered\"), !!props.centered)),\n onCancel: function onCancel() {\n return close({\n triggerCancel: true\n });\n },\n visible: visible,\n title: \"\",\n transitionName: transitionName,\n footer: \"\",\n maskTransitionName: maskTransitionName,\n mask: mask,\n maskClosable: maskClosable,\n maskStyle: maskStyle,\n style: style,\n width: width,\n zIndex: zIndex,\n afterClose: afterClose,\n keyboard: keyboard,\n centered: centered,\n getContainer: getContainer,\n closable: closable,\n closeIcon: closeIcon,\n modalRender: modalRender,\n focusTriggerAfterClose: focusTriggerAfterClose\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(contentPrefixCls, \"-body-wrapper\")\n }, /*#__PURE__*/React.createElement(ConfigProvider, {\n prefixCls: rootPrefixCls\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(contentPrefixCls, \"-body\"),\n style: bodyStyle\n }, icon, props.title === undefined ? null : /*#__PURE__*/React.createElement(\"span\", {\n className: \"\".concat(contentPrefixCls, \"-title\")\n }, props.title), /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(contentPrefixCls, \"-content\")\n }, props.content))), /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(contentPrefixCls, \"-btns\")\n }, cancelButton, /*#__PURE__*/React.createElement(ActionButton, {\n type: okType,\n actionFn: onOk,\n closeModal: close,\n autoFocus: autoFocusButton === 'ok',\n buttonProps: okButtonProps,\n prefixCls: \"\".concat(rootPrefixCls, \"-btn\")\n }, okText))));\n};\n\nexport default ConfirmDialog;","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/antd/es/modal/ConfirmDialog.js"],"names":["_defineProperty","React","classNames","Dialog","ActionButton","devWarning","ConfigProvider","ConfirmDialog","props","icon","onCancel","onOk","close","zIndex","afterClose","visible","keyboard","centered","getContainer","maskStyle","okText","okButtonProps","cancelText","cancelButtonProps","direction","prefixCls","rootPrefixCls","bodyStyle","_props$closable","closable","closeIcon","modalRender","focusTriggerAfterClose","length","concat","okType","contentPrefixCls","okCancel","width","style","mask","undefined","maskClosable","autoFocusButton","transitionName","maskTransitionName","classString","type","className","cancelButton","createElement","actionFn","closeModal","autoFocus","buttonProps","wrapClassName","triggerCancel","title","footer","content"],"mappings":"AAAA,OAAOA,eAAP,MAA4B,uCAA5B;AACA,OAAO,KAAKC,KAAZ,MAAuB,OAAvB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,MAAP,MAAmB,SAAnB;AACA,OAAOC,YAAP,MAAyB,gBAAzB;AACA,OAAOC,UAAP,MAAuB,qBAAvB;AACA,OAAOC,cAAP,MAA2B,oBAA3B;;AAEA,IAAIC,aAAa,GAAG,SAASA,aAAT,CAAuBC,KAAvB,EAA8B;AAChD,MAAIC,IAAI,GAAGD,KAAK,CAACC,IAAjB;AAAA,MACIC,QAAQ,GAAGF,KAAK,CAACE,QADrB;AAAA,MAEIC,IAAI,GAAGH,KAAK,CAACG,IAFjB;AAAA,MAGIC,KAAK,GAAGJ,KAAK,CAACI,KAHlB;AAAA,MAIIC,MAAM,GAAGL,KAAK,CAACK,MAJnB;AAAA,MAKIC,UAAU,GAAGN,KAAK,CAACM,UALvB;AAAA,MAMIC,OAAO,GAAGP,KAAK,CAACO,OANpB;AAAA,MAOIC,QAAQ,GAAGR,KAAK,CAACQ,QAPrB;AAAA,MAQIC,QAAQ,GAAGT,KAAK,CAACS,QARrB;AAAA,MASIC,YAAY,GAAGV,KAAK,CAACU,YATzB;AAAA,MAUIC,SAAS,GAAGX,KAAK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,CA5BI,CAApB;AAiDD,CAhGD;;AAkGA,eAAeb,aAAf","sourcesContent":["import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport Dialog from './Modal';\nimport ActionButton from './ActionButton';\nimport devWarning from '../_util/devWarning';\nimport ConfigProvider from '../config-provider';\n\nvar ConfirmDialog = function ConfirmDialog(props) {\n var icon = props.icon,\n onCancel = props.onCancel,\n onOk = props.onOk,\n close = props.close,\n zIndex = props.zIndex,\n afterClose = props.afterClose,\n visible = props.visible,\n keyboard = props.keyboard,\n centered = props.centered,\n getContainer = props.getContainer,\n maskStyle = props.maskStyle,\n okText = props.okText,\n okButtonProps = props.okButtonProps,\n cancelText = props.cancelText,\n cancelButtonProps = props.cancelButtonProps,\n direction = props.direction,\n prefixCls = props.prefixCls,\n rootPrefixCls = props.rootPrefixCls,\n bodyStyle = props.bodyStyle,\n _props$closable = props.closable,\n closable = _props$closable === void 0 ? false : _props$closable,\n closeIcon = props.closeIcon,\n modalRender = props.modalRender,\n focusTriggerAfterClose = props.focusTriggerAfterClose;\n devWarning(!(typeof icon === 'string' && icon.length > 2), 'Modal', \"`icon` is using ReactNode instead of string naming in v4. Please check `\".concat(icon, \"` at https://ant.design/components/icon\")); // 支持传入{ icon: null }来隐藏`Modal.confirm`默认的Icon\n\n var okType = props.okType || 'primary';\n var contentPrefixCls = \"\".concat(prefixCls, \"-confirm\"); // 默认为 true,保持向下兼容\n\n var okCancel = 'okCancel' in props ? props.okCancel : true;\n var width = props.width || 416;\n var style = props.style || {};\n var mask = props.mask === undefined ? true : props.mask; // 默认为 false,保持旧版默认行为\n\n var maskClosable = props.maskClosable === undefined ? false : props.maskClosable;\n var autoFocusButton = props.autoFocusButton === null ? false : props.autoFocusButton || 'ok';\n var transitionName = props.transitionName || 'zoom';\n var maskTransitionName = props.maskTransitionName || 'fade';\n var classString = classNames(contentPrefixCls, \"\".concat(contentPrefixCls, \"-\").concat(props.type), _defineProperty({}, \"\".concat(contentPrefixCls, \"-rtl\"), direction === 'rtl'), props.className);\n var cancelButton = okCancel && /*#__PURE__*/React.createElement(ActionButton, {\n actionFn: onCancel,\n closeModal: close,\n autoFocus: autoFocusButton === 'cancel',\n buttonProps: cancelButtonProps,\n prefixCls: \"\".concat(rootPrefixCls, \"-btn\")\n }, cancelText);\n return /*#__PURE__*/React.createElement(Dialog, {\n prefixCls: prefixCls,\n className: classString,\n wrapClassName: classNames(_defineProperty({}, \"\".concat(contentPrefixCls, \"-centered\"), !!props.centered)),\n onCancel: function onCancel() {\n return close({\n triggerCancel: true\n });\n },\n visible: visible,\n title: \"\",\n transitionName: transitionName,\n footer: \"\",\n maskTransitionName: maskTransitionName,\n mask: mask,\n maskClosable: maskClosable,\n maskStyle: maskStyle,\n style: style,\n width: width,\n zIndex: zIndex,\n afterClose: afterClose,\n keyboard: keyboard,\n centered: centered,\n getContainer: getContainer,\n closable: closable,\n closeIcon: closeIcon,\n modalRender: modalRender,\n focusTriggerAfterClose: focusTriggerAfterClose\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(contentPrefixCls, \"-body-wrapper\")\n }, /*#__PURE__*/React.createElement(ConfigProvider, {\n prefixCls: rootPrefixCls\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(contentPrefixCls, \"-body\"),\n style: bodyStyle\n }, icon, props.title === undefined ? null : /*#__PURE__*/React.createElement(\"span\", {\n className: \"\".concat(contentPrefixCls, \"-title\")\n }, props.title), /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(contentPrefixCls, \"-content\")\n }, props.content))), /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(contentPrefixCls, \"-btns\")\n }, cancelButton, /*#__PURE__*/React.createElement(ActionButton, {\n type: okType,\n actionFn: onOk,\n closeModal: close,\n autoFocus: autoFocusButton === 'ok',\n buttonProps: okButtonProps,\n prefixCls: \"\".concat(rootPrefixCls, \"-btn\")\n }, okText))));\n};\n\nexport default ConfirmDialog;"]},"metadata":{},"sourceType":"module"}