mirror of
https://gitee.com/dcren/cloud-native-app-initializer.git
synced 2025-04-05 17:38:04 +08:00
1 line
31 KiB
Plaintext
1 line
31 KiB
Plaintext
{"version":3,"sources":["webpack:///./node_modules/react-copy-to-clipboard/lib/index.js","webpack:///./node_modules/react-copy-to-clipboard/lib/Component.js","webpack:///./node_modules/copy-to-clipboard/index.js","webpack:///./node_modules/toggle-selection/index.js","webpack:///./src/styles/share.scss?53f2","webpack:///./src/styles/share.scss","webpack:///./src/components/utils/NoScroll.js","webpack:///./src/components/common/share/Overlay.js","webpack:///./src/components/common/share/Popover.js","webpack:///./src/components/common/share/Share.js"],"names":["CopyToClipboard","module","exports","Object","defineProperty","value","_react","_interopRequireDefault","_copyToClipboard","obj","__esModule","_typeof","Symbol","iterator","constructor","prototype","ownKeys","object","enumerableOnly","keys","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectWithoutProperties","source","excluded","key","i","target","sourceKeys","length","indexOf","_objectWithoutPropertiesLoose","sourceSymbolKeys","propertyIsEnumerable","call","_classCallCheck","instance","Constructor","TypeError","_defineProperties","props","descriptor","configurable","writable","_possibleConstructorReturn","self","_assertThisInitialized","_getPrototypeOf","o","setPrototypeOf","getPrototypeOf","__proto__","ReferenceError","_setPrototypeOf","p","_defineProperty","_React$PureComponent","_getPrototypeOf2","_this","this","_len","arguments","args","Array","_key","concat","event","_this$props","text","onCopy","children","options","elem","Children","only","result","onClick","protoProps","staticProps","subClass","superClass","create","_inherits","_this$props2","cloneElement","forEach","getOwnPropertyDescriptors","defineProperties","_objectSpread","PureComponent","undefined","deselectCurrent","clipboardToIE11Formatting","debug","message","reselectPrevious","range","selection","mark","success","document","createRange","getSelection","createElement","textContent","style","all","position","top","clip","whiteSpace","webkitUserSelect","MozUserSelect","msUserSelect","userSelect","addEventListener","e","stopPropagation","format","preventDefault","clipboardData","console","warn","window","clearData","setData","body","appendChild","selectNodeContents","addRange","execCommand","Error","err","error","copyKey","test","navigator","userAgent","replace","prompt","removeRange","removeAllRanges","removeChild","rangeCount","active","activeElement","ranges","getRangeAt","tagName","toUpperCase","blur","type","focus","api","content","default","locals","___CSS_LOADER_API_IMPORT___","noScroll","documentElement","overflow","Overlay","open","TransitionGroup","component","CSSTransition","onEnter","onExit","classNames","timeout","className","propTypes","PropTypes","bool","isRequired","Popover","shareUrl","shareSrc","onClose","useState","button","setButton","wrapper","useRef","input","link","windowsUtils","useWindowsUtils","useEffect","clickOutside","get","contains","removeEventListener","urlToShare","origin","y","left","x","ref","href","htmlFor","onFocus","select","id","readOnly","current","setTimeout","string","func","shape","number","Share"],"mappings":"0FAEA,IACIA,EADW,EAAQ,KACQA,gBAE/BA,EAAgBA,gBAAkBA,EAClCC,EAAOC,QAAUF,G,iCCJjBG,OAAOC,eAAeF,EAAS,aAAc,CAC3CG,OAAO,IAETH,EAAQF,qBAAkB,EAE1B,IAAIM,EAASC,EAAuB,EAAQ,IAExCC,EAAmBD,EAAuB,EAAQ,MAEtD,SAASA,EAAuBE,GAAO,OAAOA,GAAOA,EAAIC,WAAaD,EAAM,CAAE,QAAWA,GAEzF,SAASE,EAAQF,GAAwT,OAAtOE,EAArD,mBAAXC,QAAoD,iBAApBA,OAAOC,SAAmC,SAAiBJ,GAAO,cAAcA,GAA2B,SAAiBA,GAAO,OAAOA,GAAyB,mBAAXG,QAAyBH,EAAIK,cAAgBF,QAAUH,IAAQG,OAAOG,UAAY,gBAAkBN,IAAyBA,GAExV,SAASO,EAAQC,EAAQC,GAAkB,IAAIC,EAAOhB,OAAOgB,KAAKF,GAAS,GAAId,OAAOiB,sBAAuB,CAAE,IAAIC,EAAUlB,OAAOiB,sBAAsBH,GAAaC,IAAgBG,EAAUA,EAAQC,QAAO,SAAUC,GAAO,OAAOpB,OAAOqB,yBAAyBP,EAAQM,GAAKE,eAAgBN,EAAKO,KAAKC,MAAMR,EAAME,GAAY,OAAOF,EAI9U,SAASS,EAAyBC,EAAQC,GAAY,GAAc,MAAVD,EAAgB,MAAO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2B,EAA3BA,KAAMgB,EAAqB,EAArBA,QAASvE,EAAY,EAAZA,SAClD,OACE,oCACE,kBAAC,EAAD,CACEuD,KAAMA,IAAQ,EACdc,SAAUA,EACVC,SAAUA,EACVtE,SAAUA,EACVuE,QAASA,IAEX,kBAAC,EAAD,CAAShB,KAAMA,IAAQ,KAK7BiD,EAAMxC,UAAY,CAChBK,SAAUJ,IAAUmC,OAAOjC,WAC3BG,SAAUL,IAAUmC,OAAOjC,WAC3BZ,KAAMU,IAAUC,KAAKC,WACrBI,QAASN,IAAUoC,KAAKlC,WACxBnE,SAAUiE,IAAUqC,MAAM,CACxBZ,EAAGzB,IAAUsC,OAAOpC,WACpBqB,EAAGvB,IAAUsC,OAAOpC,aACnBA,YAGUqC","file":"chunk-379a0b03d814101d7286.js","sourcesContent":["\"use strict\";\n\nvar _require = require('./Component'),\n CopyToClipboard = _require.CopyToClipboard;\n\nCopyToClipboard.CopyToClipboard = CopyToClipboard;\nmodule.exports = CopyToClipboard;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.CopyToClipboard = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _copyToClipboard = _interopRequireDefault(require(\"copy-to-clipboard\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _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); }\n\nfunction 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; }\n\nfunction _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; }\n\nfunction _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; }\n\nfunction _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; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _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); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _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; }\n\nvar CopyToClipboard =\n/*#__PURE__*/\nfunction (_React$PureComponent) {\n _inherits(CopyToClipboard, _React$PureComponent);\n\n function CopyToClipboard() {\n var _getPrototypeOf2;\n\n var _this;\n\n _classCallCheck(this, CopyToClipboard);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(CopyToClipboard)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _defineProperty(_assertThisInitialized(_this), \"onClick\", function (event) {\n var _this$props = _this.props,\n text = _this$props.text,\n onCopy = _this$props.onCopy,\n children = _this$props.children,\n options = _this$props.options;\n\n var elem = _react[\"default\"].Children.only(children);\n\n var result = (0, _copyToClipboard[\"default\"])(text, options);\n\n if (onCopy) {\n onCopy(text, result);\n } // Bypass onClick if it was present\n\n\n if (elem && elem.props && typeof elem.props.onClick === 'function') {\n elem.props.onClick(event);\n }\n });\n\n return _this;\n }\n\n _createClass(CopyToClipboard, [{\n key: \"render\",\n value: function render() {\n var _this$props2 = this.props,\n _text = _this$props2.text,\n _onCopy = _this$props2.onCopy,\n _options = _this$props2.options,\n children = _this$props2.children,\n props = _objectWithoutProperties(_this$props2, [\"text\", \"onCopy\", \"options\", \"children\"]);\n\n var elem = _react[\"default\"].Children.only(children);\n\n return _react[\"default\"].cloneElement(elem, _objectSpread({}, props, {\n onClick: this.onClick\n }));\n }\n }]);\n\n return CopyToClipboard;\n}(_react[\"default\"].PureComponent);\n\nexports.CopyToClipboard = CopyToClipboard;\n\n_defineProperty(CopyToClipboard, \"defaultProps\", {\n onCopy: undefined,\n options: undefined\n});","\"use strict\";\n\nvar deselectCurrent = require(\"toggle-selection\");\n\nvar clipboardToIE11Formatting = {\n \"text/plain\": \"Text\",\n \"text/html\": \"Url\",\n \"default\": \"Text\"\n}\n\nvar defaultMessage = \"Copy to clipboard: #{key}, Enter\";\n\nfunction format(message) {\n var copyKey = (/mac os x/i.test(navigator.userAgent) ? \"⌘\" : \"Ctrl\") + \"+C\";\n return message.replace(/#{\\s*key\\s*}/g, copyKey);\n}\n\nfunction copy(text, options) {\n var debug,\n message,\n reselectPrevious,\n range,\n selection,\n mark,\n success = false;\n if (!options) {\n options = {};\n }\n debug = options.debug || false;\n try {\n reselectPrevious = deselectCurrent();\n\n range = document.createRange();\n selection = document.getSelection();\n\n mark = document.createElement(\"span\");\n mark.textContent = text;\n // reset user styles for span element\n mark.style.all = \"unset\";\n // prevents scrolling to the end of the page\n mark.style.position = \"fixed\";\n mark.style.top = 0;\n mark.style.clip = \"rect(0, 0, 0, 0)\";\n // used to preserve spaces and line breaks\n mark.style.whiteSpace = \"pre\";\n // do not inherit user-select (it may be `none`)\n mark.style.webkitUserSelect = \"text\";\n mark.style.MozUserSelect = \"text\";\n mark.style.msUserSelect = \"text\";\n mark.style.userSelect = \"text\";\n mark.addEventListener(\"copy\", function(e) {\n e.stopPropagation();\n if (options.format) {\n e.preventDefault();\n if (typeof e.clipboardData === \"undefined\") { // IE 11\n debug && console.warn(\"unable to use e.clipboardData\");\n debug && console.warn(\"trying IE specific stuff\");\n window.clipboardData.clearData();\n var format = clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting[\"default\"]\n window.clipboardData.setData(format, text);\n } else { // all other browsers\n e.clipboardData.clearData();\n e.clipboardData.setData(options.format, text);\n }\n }\n if (options.onCopy) {\n e.preventDefault();\n options.onCopy(e.clipboardData);\n }\n });\n\n document.body.appendChild(mark);\n\n range.selectNodeContents(mark);\n selection.addRange(range);\n\n var successful = document.execCommand(\"copy\");\n if (!successful) {\n throw new Error(\"copy command was unsuccessful\");\n }\n success = true;\n } catch (err) {\n debug && console.error(\"unable to copy using execCommand: \", err);\n debug && console.warn(\"trying IE specific stuff\");\n try {\n window.clipboardData.setData(options.format || \"text\", text);\n options.onCopy && options.onCopy(window.clipboardData);\n success = true;\n } catch (err) {\n debug && console.error(\"unable to copy using clipboardData: \", err);\n debug && console.error(\"falling back to prompt\");\n message = format(\"message\" in options ? options.message : defaultMessage);\n window.prompt(message, text);\n }\n } finally {\n if (selection) {\n if (typeof selection.removeRange == \"function\") {\n selection.removeRange(range);\n } else {\n selection.removeAllRanges();\n }\n }\n\n if (mark) {\n document.body.removeChild(mark);\n }\n reselectPrevious();\n }\n\n return success;\n}\n\nmodule.exports = copy;\n","\nmodule.exports = function () {\n var selection = document.getSelection();\n if (!selection.rangeCount) {\n return function () {};\n }\n var active = document.activeElement;\n\n var ranges = [];\n for (var i = 0; i < selection.rangeCount; i++) {\n ranges.push(selection.getRangeAt(i));\n }\n\n switch (active.tagName.toUpperCase()) { // .toUpperCase handles XHTML\n case 'INPUT':\n case 'TEXTAREA':\n active.blur();\n break;\n\n default:\n active = null;\n break;\n }\n\n selection.removeAllRanges();\n return function () {\n selection.type === 'Caret' &&\n selection.removeAllRanges();\n\n if (!selection.rangeCount) {\n ranges.forEach(function(range) {\n selection.addRange(range);\n });\n }\n\n active &&\n active.focus();\n };\n};\n","var api = require(\"!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/sass-loader/dist/cjs.js!./share.scss\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".popup-share{z-index:10000;position:fixed;top:0;left:0;width:500px;background:white;box-shadow:0 10px 40px rgba(0,0,0,0.2);-webkit-transition:all .15s;-moz-transition:all .15s;-ms-transition:all .15s;-o-transition:all .15s;transition:all .15s}.popup-share:before{content:' ';height:60px;width:500px;position:absolute;bottom:-60px;left:0}.popup-share .popup-content{padding:24px;padding-top:8px}.popup-share .popup-content label{display:block;font-size:15px;color:#222;line-height:24px;padding-top:8px}.popup-share .popup-content .control{position:relative;padding-bottom:8px}.popup-share .popup-content .control-input{padding-right:70px}.popup-share .popup-content .control-input.padding-lg{padding-right:88px}.popup-share .popup-content .link{position:absolute;top:0;padding:0 16px;height:38px;line-height:43px;right:0;color:#0188ff;text-decoration:underline}.popup-share .popup-content .link:hover{text-decoration:none}.popup-share .popup-header{position:relative;padding:4px 16px 2px;border-bottom:1px solid #ebebeb}.popup-share .popup-header h1{font-size:16px;line-height:16px}.popup-share .popup-header .close{display:block;position:absolute;top:8px;right:4px;padding:4px 8px;height:22px;cursor:pointer;opacity:0.7;color:#222}.popup-share .popup-header .close svg{width:14px}.popup-share .popup-header .close:hover{opacity:1}.button.share-ghost{position:fixed;top:0;left:0;transition:none;z-index:99000}.popup-share-overlay{position:fixed;z-index:9999;top:0;left:0;right:0;bottom:0;background:rgba(255,255,255,0.6)}.popup-enter{opacity:0.01;transform:scale(0.95)}.popup-enter-active{opacity:1;transform:scale(1);transition:all 300ms}.popup-exit{opacity:1;transform:scale(1)}.popup-exit-active{opacity:0.01;transform:scale(0.95);transition:all 300ms}.overlay-enter{opacity:0.01}.overlay-enter-active{opacity:1;transition:all 300ms}.overlay-exit{opacity:1}.overlay-exit-active{opacity:0.01;transition:all 300ms}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","export const noScroll = {\n on: () => {\n document.documentElement.style.overflow = 'hidden'\n },\n off: () => {\n document.documentElement.style.overflow = ''\n },\n}\n","import PropTypes from 'prop-types'\nimport React from 'react'\nimport {CSSTransition, TransitionGroup} from 'react-transition-group'\n\nimport {noScroll} from '../../utils/NoScroll'\n\nfunction Overlay({ open }) {\n const onEnter = () => {\n noScroll.on()\n }\n\n const onEnded = () => {\n noScroll.off()\n }\n return (\n <TransitionGroup component={null}>\n {open && (\n <CSSTransition\n onEnter={onEnter}\n onExit={onEnded}\n classNames='overlay'\n timeout={500}\n >\n <div className='popup-share-overlay' />\n </CSSTransition>\n )}\n </TransitionGroup>\n )\n}\n\nOverlay.propTypes = {\n open: PropTypes.bool.isRequired,\n}\n\nexport default Overlay\n","import PropTypes from 'prop-types'\nimport get from 'lodash.get'\nimport React, {useEffect, useRef, useState} from 'react'\nimport {CSSTransition, TransitionGroup} from 'react-transition-group'\nimport {CopyToClipboard} from 'react-copy-to-clipboard'\n\nimport useWindowsUtils from '../../utils/WindowsUtils'\nimport {IconTimes} from '../icons'\n\nfunction Popover({ shareUrl, shareSrc, open, onClose, position }) {\n const [button, setButton] = useState('Copy')\n const wrapper = useRef(null)\n const input = useRef(null)\n const link = useRef(null)\n const windowsUtils = useWindowsUtils()\n useEffect(() => {\n const clickOutside = event => {\n const children = get(wrapper, 'current')\n if (children && !children.contains(event.target)) {\n onClose()\n }\n }\n document.addEventListener('mousedown', clickOutside)\n if (get(input, 'current')) {\n get(input, 'current').focus()\n }\n return () => {\n document.removeEventListener('mousedown', clickOutside)\n }\n }, [onClose, input])\n\n const onEnter = () => {\n setButton('复制')\n }\n\n const onCopy = () => {\n setButton('已复制!')\n input.current.focus()\n setTimeout(() => {\n onClose()\n }, 500)\n }\n\n const urlToShare = `${windowsUtils.origin}/bootstrap.html/${shareSrc}#!${shareUrl}`\n return (\n <>\n <TransitionGroup component={null}>\n {open && (\n <CSSTransition onEnter={onEnter} classNames='popup' timeout={500}>\n <div\n className='popup-share'\n style={{\n top: `${position.y - 200}px`,\n left: `${position.x - 200}px`,\n }}\n >\n <div ref={wrapper}>\n <div className='popup-header'>\n <h1>分享你的配置</h1>\n <a\n href='/#'\n onClick={e => {\n e.preventDefault()\n onClose()\n }}\n className='close'\n >\n <IconTimes />\n </a>\n </div>\n <div className='popup-content'>\n {/* eslint-disable-next-line */}\n <label htmlFor='input-share'>\n 请复制下面的链接来分享你的项目配置;\n </label>\n <div className='control'>\n <input\n onFocus={event => {\n event.target.select()\n }}\n id='input-share'\n className={`control-input ${\n button === 'Copied!' ? 'padding-lg' : ''\n }`}\n readOnly\n value={urlToShare}\n ref={input}\n />\n <CopyToClipboard onCopy={onCopy} text={urlToShare}>\n <a\n href='/#'\n onClick={e => {\n e.preventDefault()\n }}\n className='link'\n ref={link}\n >\n {button}\n </a>\n </CopyToClipboard>\n </div>\n </div>\n </div>\n </div>\n </CSSTransition>\n )}\n </TransitionGroup>\n {open && (\n <button\n className='button primary share-ghost'\n type='button'\n style={{\n top: `${position.y}px`,\n left: `${position.x}px`,\n }}\n >\n 分享...\n </button>\n )}\n </>\n )\n}\n\nPopover.propTypes = {\n shareUrl: PropTypes.string.isRequired,\n shareSrc: PropTypes.string.isRequired,\n open: PropTypes.bool.isRequired,\n onClose: PropTypes.func.isRequired,\n position: PropTypes.shape({\n x: PropTypes.number.isRequired,\n y: PropTypes.number.isRequired,\n }).isRequired,\n}\n\nexport default Popover\n","import '../../../styles/share.scss'\n\nimport PropTypes from 'prop-types'\nimport React from 'react'\n\nimport Overlay from './Overlay'\nimport Popover from './Popover'\n\nfunction Share({ shareUrl, shareSrc, open, onClose, position }) {\n return (\n <>\n <Popover\n open={open || false}\n shareUrl={shareUrl}\n shareSrc={shareSrc}\n position={position}\n onClose={onClose}\n />\n <Overlay open={open || false} />\n </>\n )\n}\n\nShare.propTypes = {\n shareUrl: PropTypes.string.isRequired,\n shareSrc: PropTypes.string.isRequired,\n open: PropTypes.bool.isRequired,\n onClose: PropTypes.func.isRequired,\n position: PropTypes.shape({\n x: PropTypes.number.isRequired,\n y: PropTypes.number.isRequired,\n }).isRequired,\n}\n\nexport default Share\n"],"sourceRoot":""} |