7afb761dd7cce95a3ba4a05a9edf63e6.json 3.85 KB
{"ast":null,"code":"import _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport warning from \"rc-util/es/warning\";\nexport function getMotion(_ref, _ref2, menuMode) {\n  var prefixCls = _ref.prefixCls,\n      motion = _ref.motion,\n      _ref$defaultMotions = _ref.defaultMotions,\n      defaultMotions = _ref$defaultMotions === void 0 ? {} : _ref$defaultMotions,\n      openAnimation = _ref.openAnimation,\n      openTransitionName = _ref.openTransitionName;\n  var switchingModeFromInline = _ref2.switchingModeFromInline;\n\n  if (motion) {\n    return motion;\n  }\n\n  if (_typeof(openAnimation) === 'object' && openAnimation) {\n    warning(false, 'Object type of `openAnimation` is removed. Please use `motion` instead.');\n  } else if (typeof openAnimation === 'string') {\n    return {\n      motionName: \"\".concat(prefixCls, \"-open-\").concat(openAnimation)\n    };\n  }\n\n  if (openTransitionName) {\n    return {\n      motionName: openTransitionName\n    };\n  } // Default logic\n\n\n  var defaultMotion = defaultMotions[menuMode];\n\n  if (defaultMotion) {\n    return defaultMotion;\n  } // When mode switch from inline\n  // submenu should hide without animation\n\n\n  return switchingModeFromInline ? null : defaultMotions.other;\n}","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/rc-menu/es/utils/legacyUtil.js"],"names":["_typeof","warning","getMotion","_ref","_ref2","menuMode","prefixCls","motion","_ref$defaultMotions","defaultMotions","openAnimation","openTransitionName","switchingModeFromInline","motionName","concat","defaultMotion","other"],"mappings":"AAAA,OAAOA,OAAP,MAAoB,mCAApB;AACA,OAAOC,OAAP,MAAoB,oBAApB;AACA,OAAO,SAASC,SAAT,CAAmBC,IAAnB,EAAyBC,KAAzB,EAAgCC,QAAhC,EAA0C;AAC/C,MAAIC,SAAS,GAAGH,IAAI,CAACG,SAArB;AAAA,MACIC,MAAM,GAAGJ,IAAI,CAACI,MADlB;AAAA,MAEIC,mBAAmB,GAAGL,IAAI,CAACM,cAF/B;AAAA,MAGIA,cAAc,GAAGD,mBAAmB,KAAK,KAAK,CAA7B,GAAiC,EAAjC,GAAsCA,mBAH3D;AAAA,MAIIE,aAAa,GAAGP,IAAI,CAACO,aAJzB;AAAA,MAKIC,kBAAkB,GAAGR,IAAI,CAACQ,kBAL9B;AAMA,MAAIC,uBAAuB,GAAGR,KAAK,CAACQ,uBAApC;;AAEA,MAAIL,MAAJ,EAAY;AACV,WAAOA,MAAP;AACD;;AAED,MAAIP,OAAO,CAACU,aAAD,CAAP,KAA2B,QAA3B,IAAuCA,aAA3C,EAA0D;AACxDT,IAAAA,OAAO,CAAC,KAAD,EAAQ,yEAAR,CAAP;AACD,GAFD,MAEO,IAAI,OAAOS,aAAP,KAAyB,QAA7B,EAAuC;AAC5C,WAAO;AACLG,MAAAA,UAAU,EAAE,GAAGC,MAAH,CAAUR,SAAV,EAAqB,QAArB,EAA+BQ,MAA/B,CAAsCJ,aAAtC;AADP,KAAP;AAGD;;AAED,MAAIC,kBAAJ,EAAwB;AACtB,WAAO;AACLE,MAAAA,UAAU,EAAEF;AADP,KAAP;AAGD,GAzB8C,CAyB7C;;;AAGF,MAAII,aAAa,GAAGN,cAAc,CAACJ,QAAD,CAAlC;;AAEA,MAAIU,aAAJ,EAAmB;AACjB,WAAOA,aAAP;AACD,GAhC8C,CAgC7C;AACF;;;AAGA,SAAOH,uBAAuB,GAAG,IAAH,GAAUH,cAAc,CAACO,KAAvD;AACD","sourcesContent":["import _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport warning from \"rc-util/es/warning\";\nexport function getMotion(_ref, _ref2, menuMode) {\n  var prefixCls = _ref.prefixCls,\n      motion = _ref.motion,\n      _ref$defaultMotions = _ref.defaultMotions,\n      defaultMotions = _ref$defaultMotions === void 0 ? {} : _ref$defaultMotions,\n      openAnimation = _ref.openAnimation,\n      openTransitionName = _ref.openTransitionName;\n  var switchingModeFromInline = _ref2.switchingModeFromInline;\n\n  if (motion) {\n    return motion;\n  }\n\n  if (_typeof(openAnimation) === 'object' && openAnimation) {\n    warning(false, 'Object type of `openAnimation` is removed. Please use `motion` instead.');\n  } else if (typeof openAnimation === 'string') {\n    return {\n      motionName: \"\".concat(prefixCls, \"-open-\").concat(openAnimation)\n    };\n  }\n\n  if (openTransitionName) {\n    return {\n      motionName: openTransitionName\n    };\n  } // Default logic\n\n\n  var defaultMotion = defaultMotions[menuMode];\n\n  if (defaultMotion) {\n    return defaultMotion;\n  } // When mode switch from inline\n  // submenu should hide without animation\n\n\n  return switchingModeFromInline ? null : defaultMotions.other;\n}"]},"metadata":{},"sourceType":"module"}