5137e662fe53c17434e6f04aa9f50307.json 14.9 KB
{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _typeof from \"@babel/runtime/helpers/typeof\";\nimport _slicedToArray from \"@babel/runtime/helpers/slicedToArray\";\n\nvar __rest = this && this.__rest || function (s, e) {\n  var t = {};\n\n  for (var p in s) {\n    if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n  }\n\n  if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n    if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n  }\n  return t;\n};\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { ConfigContext } from '../config-provider';\nimport RowContext from './RowContext';\nimport { tuple } from '../_util/type';\nimport ResponsiveObserve, { responsiveArray } from '../_util/responsiveObserve';\nvar RowAligns = tuple('top', 'middle', 'bottom', 'stretch');\nvar RowJustify = tuple('start', 'end', 'center', 'space-around', 'space-between');\nvar Row = /*#__PURE__*/React.forwardRef(function (props, ref) {\n  var _classNames;\n\n  var customizePrefixCls = props.prefixCls,\n      justify = props.justify,\n      align = props.align,\n      className = props.className,\n      style = props.style,\n      children = props.children,\n      _props$gutter = props.gutter,\n      gutter = _props$gutter === void 0 ? 0 : _props$gutter,\n      wrap = props.wrap,\n      others = __rest(props, [\"prefixCls\", \"justify\", \"align\", \"className\", \"style\", \"children\", \"gutter\", \"wrap\"]);\n\n  var _React$useContext = React.useContext(ConfigContext),\n      getPrefixCls = _React$useContext.getPrefixCls,\n      direction = _React$useContext.direction;\n\n  var _React$useState = React.useState({\n    xs: true,\n    sm: true,\n    md: true,\n    lg: true,\n    xl: true,\n    xxl: true\n  }),\n      _React$useState2 = _slicedToArray(_React$useState, 2),\n      screens = _React$useState2[0],\n      setScreens = _React$useState2[1];\n\n  var gutterRef = React.useRef(gutter);\n  React.useEffect(function () {\n    var token = ResponsiveObserve.subscribe(function (screen) {\n      var currentGutter = gutterRef.current || 0;\n\n      if (!Array.isArray(currentGutter) && _typeof(currentGutter) === 'object' || Array.isArray(currentGutter) && (_typeof(currentGutter[0]) === 'object' || _typeof(currentGutter[1]) === 'object')) {\n        setScreens(screen);\n      }\n    });\n    return function () {\n      return ResponsiveObserve.unsubscribe(token);\n    };\n  }, []);\n\n  var getGutter = function getGutter() {\n    var results = [0, 0];\n    var normalizedGutter = Array.isArray(gutter) ? gutter : [gutter, 0];\n    normalizedGutter.forEach(function (g, index) {\n      if (_typeof(g) === 'object') {\n        for (var i = 0; i < responsiveArray.length; i++) {\n          var breakpoint = responsiveArray[i];\n\n          if (screens[breakpoint] && g[breakpoint] !== undefined) {\n            results[index] = g[breakpoint];\n            break;\n          }\n        }\n      } else {\n        results[index] = g || 0;\n      }\n    });\n    return results;\n  };\n\n  var prefixCls = getPrefixCls('row', customizePrefixCls);\n  var gutters = getGutter();\n  var classes = classNames(prefixCls, (_classNames = {}, _defineProperty(_classNames, \"\".concat(prefixCls, \"-no-wrap\"), wrap === false), _defineProperty(_classNames, \"\".concat(prefixCls, \"-\").concat(justify), justify), _defineProperty(_classNames, \"\".concat(prefixCls, \"-\").concat(align), align), _defineProperty(_classNames, \"\".concat(prefixCls, \"-rtl\"), direction === 'rtl'), _classNames), className);\n\n  var rowStyle = _extends(_extends(_extends({}, gutters[0] > 0 ? {\n    marginLeft: gutters[0] / -2,\n    marginRight: gutters[0] / -2\n  } : {}), gutters[1] > 0 ? {\n    marginTop: gutters[1] / -2,\n    marginBottom: gutters[1] / 2\n  } : {}), style);\n\n  return /*#__PURE__*/React.createElement(RowContext.Provider, {\n    value: {\n      gutter: gutters,\n      wrap: wrap\n    }\n  }, /*#__PURE__*/React.createElement(\"div\", _extends({}, others, {\n    className: classes,\n    style: rowStyle,\n    ref: ref\n  }), children));\n});\nRow.displayName = 'Row';\nexport default Row;","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/antd/es/grid/row.js"],"names":["_extends","_defineProperty","_typeof","_slicedToArray","__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","React","classNames","ConfigContext","RowContext","tuple","ResponsiveObserve","responsiveArray","RowAligns","RowJustify","Row","forwardRef","props","ref","_classNames","customizePrefixCls","prefixCls","justify","align","className","style","children","_props$gutter","gutter","wrap","others","_React$useContext","useContext","getPrefixCls","direction","_React$useState","useState","xs","sm","md","lg","xl","xxl","_React$useState2","screens","setScreens","gutterRef","useRef","useEffect","token","subscribe","screen","currentGutter","current","Array","isArray","unsubscribe","getGutter","results","normalizedGutter","forEach","g","index","breakpoint","undefined","gutters","classes","concat","rowStyle","marginLeft","marginRight","marginTop","marginBottom","createElement","Provider","value","displayName"],"mappings":"AAAA,OAAOA,QAAP,MAAqB,gCAArB;AACA,OAAOC,eAAP,MAA4B,uCAA5B;AACA,OAAOC,OAAP,MAAoB,+BAApB;AACA,OAAOC,cAAP,MAA2B,sCAA3B;;AAEA,IAAIC,MAAM,GAAG,QAAQ,KAAKA,MAAb,IAAuB,UAAUC,CAAV,EAAaC,CAAb,EAAgB;AAClD,MAAIC,CAAC,GAAG,EAAR;;AAEA,OAAK,IAAIC,CAAT,IAAcH,CAAd,EAAiB;AACf,QAAII,MAAM,CAACC,SAAP,CAAiBC,cAAjB,CAAgCC,IAAhC,CAAqCP,CAArC,EAAwCG,CAAxC,KAA8CF,CAAC,CAACO,OAAF,CAAUL,CAAV,IAAe,CAAjE,EAAoED,CAAC,CAACC,CAAD,CAAD,GAAOH,CAAC,CAACG,CAAD,CAAR;AACrE;;AAED,MAAIH,CAAC,IAAI,IAAL,IAAa,OAAOI,MAAM,CAACK,qBAAd,KAAwC,UAAzD,EAAqE,KAAK,IAAIC,CAAC,GAAG,CAAR,EAAWP,CAAC,GAAGC,MAAM,CAACK,qBAAP,C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AAA,YAAY,EAAEP,OAAO,CAAC,CAAD,CAAP,GAAa;AAFH,GAAjB,GAGL,EAN4B,CAAT,EAMdxC,KANc,CAAvB;;AAQA,SAAO,aAAanB,KAAK,CAACmE,aAAN,CAAoBhE,UAAU,CAACiE,QAA/B,EAAyC;AAC3DC,IAAAA,KAAK,EAAE;AACL/C,MAAAA,MAAM,EAAEqC,OADH;AAELpC,MAAAA,IAAI,EAAEA;AAFD;AADoD,GAAzC,EAKjB,aAAavB,KAAK,CAACmE,aAAN,CAAoB,KAApB,EAA2BrF,QAAQ,CAAC,EAAD,EAAK0C,MAAL,EAAa;AAC9DN,IAAAA,SAAS,EAAE0C,OADmD;AAE9DzC,IAAAA,KAAK,EAAE2C,QAFuD;AAG9DlD,IAAAA,GAAG,EAAEA;AAHyD,GAAb,CAAnC,EAIZQ,QAJY,CALI,CAApB;AAUD,CAtFsB,CAAvB;AAuFAX,GAAG,CAAC6D,WAAJ,GAAkB,KAAlB;AACA,eAAe7D,GAAf","sourcesContent":["import _extends from \"@babel/runtime/helpers/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _typeof from \"@babel/runtime/helpers/typeof\";\nimport _slicedToArray from \"@babel/runtime/helpers/slicedToArray\";\n\nvar __rest = this && this.__rest || function (s, e) {\n  var t = {};\n\n  for (var p in s) {\n    if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n  }\n\n  if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n    if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n  }\n  return t;\n};\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { ConfigContext } from '../config-provider';\nimport RowContext from './RowContext';\nimport { tuple } from '../_util/type';\nimport ResponsiveObserve, { responsiveArray } from '../_util/responsiveObserve';\nvar RowAligns = tuple('top', 'middle', 'bottom', 'stretch');\nvar RowJustify = tuple('start', 'end', 'center', 'space-around', 'space-between');\nvar Row = /*#__PURE__*/React.forwardRef(function (props, ref) {\n  var _classNames;\n\n  var customizePrefixCls = props.prefixCls,\n      justify = props.justify,\n      align = props.align,\n      className = props.className,\n      style = props.style,\n      children = props.children,\n      _props$gutter = props.gutter,\n      gutter = _props$gutter === void 0 ? 0 : _props$gutter,\n      wrap = props.wrap,\n      others = __rest(props, [\"prefixCls\", \"justify\", \"align\", \"className\", \"style\", \"children\", \"gutter\", \"wrap\"]);\n\n  var _React$useContext = React.useContext(ConfigContext),\n      getPrefixCls = _React$useContext.getPrefixCls,\n      direction = _React$useContext.direction;\n\n  var _React$useState = React.useState({\n    xs: true,\n    sm: true,\n    md: true,\n    lg: true,\n    xl: true,\n    xxl: true\n  }),\n      _React$useState2 = _slicedToArray(_React$useState, 2),\n      screens = _React$useState2[0],\n      setScreens = _React$useState2[1];\n\n  var gutterRef = React.useRef(gutter);\n  React.useEffect(function () {\n    var token = ResponsiveObserve.subscribe(function (screen) {\n      var currentGutter = gutterRef.current || 0;\n\n      if (!Array.isArray(currentGutter) && _typeof(currentGutter) === 'object' || Array.isArray(currentGutter) && (_typeof(currentGutter[0]) === 'object' || _typeof(currentGutter[1]) === 'object')) {\n        setScreens(screen);\n      }\n    });\n    return function () {\n      return ResponsiveObserve.unsubscribe(token);\n    };\n  }, []);\n\n  var getGutter = function getGutter() {\n    var results = [0, 0];\n    var normalizedGutter = Array.isArray(gutter) ? gutter : [gutter, 0];\n    normalizedGutter.forEach(function (g, index) {\n      if (_typeof(g) === 'object') {\n        for (var i = 0; i < responsiveArray.length; i++) {\n          var breakpoint = responsiveArray[i];\n\n          if (screens[breakpoint] && g[breakpoint] !== undefined) {\n            results[index] = g[breakpoint];\n            break;\n          }\n        }\n      } else {\n        results[index] = g || 0;\n      }\n    });\n    return results;\n  };\n\n  var prefixCls = getPrefixCls('row', customizePrefixCls);\n  var gutters = getGutter();\n  var classes = classNames(prefixCls, (_classNames = {}, _defineProperty(_classNames, \"\".concat(prefixCls, \"-no-wrap\"), wrap === false), _defineProperty(_classNames, \"\".concat(prefixCls, \"-\").concat(justify), justify), _defineProperty(_classNames, \"\".concat(prefixCls, \"-\").concat(align), align), _defineProperty(_classNames, \"\".concat(prefixCls, \"-rtl\"), direction === 'rtl'), _classNames), className);\n\n  var rowStyle = _extends(_extends(_extends({}, gutters[0] > 0 ? {\n    marginLeft: gutters[0] / -2,\n    marginRight: gutters[0] / -2\n  } : {}), gutters[1] > 0 ? {\n    marginTop: gutters[1] / -2,\n    marginBottom: gutters[1] / 2\n  } : {}), style);\n\n  return /*#__PURE__*/React.createElement(RowContext.Provider, {\n    value: {\n      gutter: gutters,\n      wrap: wrap\n    }\n  }, /*#__PURE__*/React.createElement(\"div\", _extends({}, others, {\n    className: classes,\n    style: rowStyle,\n    ref: ref\n  }), children));\n});\nRow.displayName = 'Row';\nexport default Row;"]},"metadata":{},"sourceType":"module"}