8907f2530c9994c8fab9e0378d0112c7.json
7.37 KB
{"ast":null,"code":"import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport * as React from 'react';\nimport Preview from './Preview';\nexport var context = /*#__PURE__*/React.createContext({\n previewUrls: [],\n setPreviewUrls: function setPreviewUrls() {\n return null;\n },\n setCurrent: function setCurrent() {\n return null;\n },\n setShowPreview: function setShowPreview() {\n return null;\n },\n setMousePosition: function setMousePosition() {\n return null;\n }\n});\nvar Provider = context.Provider;\n\nvar Group = function Group(_ref) {\n var _ref$previewPrefixCls = _ref.previewPrefixCls,\n previewPrefixCls = _ref$previewPrefixCls === void 0 ? 'rc-image-preview' : _ref$previewPrefixCls,\n children = _ref.children;\n\n var _React$useState = React.useState([]),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n previewUrls = _React$useState2[0],\n setPreviewUrls = _React$useState2[1];\n\n var _React$useState3 = React.useState(),\n _React$useState4 = _slicedToArray(_React$useState3, 2),\n current = _React$useState4[0],\n setCurrent = _React$useState4[1];\n\n var _React$useState5 = React.useState(false),\n _React$useState6 = _slicedToArray(_React$useState5, 2),\n isShowPreview = _React$useState6[0],\n setShowPreview = _React$useState6[1];\n\n var _React$useState7 = React.useState(null),\n _React$useState8 = _slicedToArray(_React$useState7, 2),\n mousePosition = _React$useState8[0],\n setMousePosition = _React$useState8[1];\n\n var onPreviewClose = function onPreviewClose(e) {\n e.stopPropagation();\n setShowPreview(false);\n setMousePosition(null);\n };\n\n return /*#__PURE__*/React.createElement(Provider, {\n value: {\n isPreviewGroup: true,\n previewUrls: previewUrls,\n setPreviewUrls: setPreviewUrls,\n setCurrent: setCurrent,\n setShowPreview: setShowPreview,\n setMousePosition: setMousePosition\n }\n }, children, /*#__PURE__*/React.createElement(Preview, {\n \"ria-hidden\": !isShowPreview,\n visible: isShowPreview,\n prefixCls: previewPrefixCls,\n onClose: onPreviewClose,\n mousePosition: mousePosition,\n src: current\n }));\n};\n\nexport default Group;","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/rc-image/es/PreviewGroup.js"],"names":["_slicedToArray","React","Preview","context","createContext","previewUrls","setPreviewUrls","setCurrent","setShowPreview","setMousePosition","Provider","Group","_ref","_ref$previewPrefixCls","previewPrefixCls","children","_React$useState","useState","_React$useState2","_React$useState3","_React$useState4","current","_React$useState5","_React$useState6","isShowPreview","_React$useState7","_React$useState8","mousePosition","onPreviewClose","e","stopPropagation","createElement","value","isPreviewGroup","visible","prefixCls","onClose","src"],"mappings":"AAAA,OAAOA,cAAP,MAA2B,0CAA3B;AACA,OAAO,KAAKC,KAAZ,MAAuB,OAAvB;AACA,OAAOC,OAAP,MAAoB,WAApB;AACA,OAAO,IAAIC,OAAO,GAAG,aAAaF,KAAK,CAACG,aAAN,CAAoB;AACpDC,EAAAA,WAAW,EAAE,EADuC;AAEpDC,EAAAA,cAAc,EAAE,SAASA,cAAT,GAA0B;AACxC,WAAO,IAAP;AACD,GAJmD;AAKpDC,EAAAA,UAAU,EAAE,SAASA,UAAT,GAAsB;AAChC,WAAO,IAAP;AACD,GAPmD;AAQpDC,EAAAA,cAAc,EAAE,SAASA,cAAT,GAA0B;AACxC,WAAO,IAAP;AACD,GAVmD;AAWpDC,EAAAA,gBAAgB,EAAE,SAASA,gBAAT,GAA4B;AAC5C,WAAO,IAAP;AACD;AAbmD,CAApB,CAA3B;AAeP,IAAIC,QAAQ,GAAGP,OAAO,CAACO,QAAvB;;AAEA,IAAIC,KAAK,GAAG,SAASA,KAAT,CAAeC,IAAf,EAAqB;AAC/B,MAAIC,qBAAqB,GAAGD,IAAI,CAACE,gBAAjC;AAAA,MACIA,gBAAgB,GAAGD,qBAAqB,KAAK,KAAK,CAA/B,GAAmC,kBAAnC,GAAwDA,qBAD/E;AAAA,MAEIE,QAAQ,GAAGH,IAAI,CAACG,QAFpB;;AAIA,MAAIC,eAAe,GAAGf,KAAK,CAACgB,QAAN,CAAe,EAAf,CAAtB;AAAA,MACIC,gBAAgB,GA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;AAGLC,MAAAA,cAAc,EAAEA,cAHX;AAILC,MAAAA,UAAU,EAAEA,UAJP;AAKLC,MAAAA,cAAc,EAAEA,cALX;AAMLC,MAAAA,gBAAgB,EAAEA;AANb;AADyC,GAA9B,EASjBM,QATiB,EASP,aAAad,KAAK,CAAC8B,aAAN,CAAoB7B,OAApB,EAA6B;AACrD,kBAAc,CAACsB,aADsC;AAErDU,IAAAA,OAAO,EAAEV,aAF4C;AAGrDW,IAAAA,SAAS,EAAErB,gBAH0C;AAIrDsB,IAAAA,OAAO,EAAER,cAJ4C;AAKrDD,IAAAA,aAAa,EAAEA,aALsC;AAMrDU,IAAAA,GAAG,EAAEhB;AANgD,GAA7B,CATN,CAApB;AAiBD,CAhDD;;AAkDA,eAAeV,KAAf","sourcesContent":["import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport * as React from 'react';\nimport Preview from './Preview';\nexport var context = /*#__PURE__*/React.createContext({\n previewUrls: [],\n setPreviewUrls: function setPreviewUrls() {\n return null;\n },\n setCurrent: function setCurrent() {\n return null;\n },\n setShowPreview: function setShowPreview() {\n return null;\n },\n setMousePosition: function setMousePosition() {\n return null;\n }\n});\nvar Provider = context.Provider;\n\nvar Group = function Group(_ref) {\n var _ref$previewPrefixCls = _ref.previewPrefixCls,\n previewPrefixCls = _ref$previewPrefixCls === void 0 ? 'rc-image-preview' : _ref$previewPrefixCls,\n children = _ref.children;\n\n var _React$useState = React.useState([]),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n previewUrls = _React$useState2[0],\n setPreviewUrls = _React$useState2[1];\n\n var _React$useState3 = React.useState(),\n _React$useState4 = _slicedToArray(_React$useState3, 2),\n current = _React$useState4[0],\n setCurrent = _React$useState4[1];\n\n var _React$useState5 = React.useState(false),\n _React$useState6 = _slicedToArray(_React$useState5, 2),\n isShowPreview = _React$useState6[0],\n setShowPreview = _React$useState6[1];\n\n var _React$useState7 = React.useState(null),\n _React$useState8 = _slicedToArray(_React$useState7, 2),\n mousePosition = _React$useState8[0],\n setMousePosition = _React$useState8[1];\n\n var onPreviewClose = function onPreviewClose(e) {\n e.stopPropagation();\n setShowPreview(false);\n setMousePosition(null);\n };\n\n return /*#__PURE__*/React.createElement(Provider, {\n value: {\n isPreviewGroup: true,\n previewUrls: previewUrls,\n setPreviewUrls: setPreviewUrls,\n setCurrent: setCurrent,\n setShowPreview: setShowPreview,\n setMousePosition: setMousePosition\n }\n }, children, /*#__PURE__*/React.createElement(Preview, {\n \"ria-hidden\": !isShowPreview,\n visible: isShowPreview,\n prefixCls: previewPrefixCls,\n onClose: onPreviewClose,\n mousePosition: mousePosition,\n src: current\n }));\n};\n\nexport default Group;"]},"metadata":{},"sourceType":"module"}