PromoCursed/node_modules/.cache/babel-loader/b23949110824c8403d4182d1b8180bcbce5c61e754f60cf6c78951a3556e0965.json

1 line
36 KiB
JSON
Raw Normal View History

2024-08-20 23:25:37 +04:00
{"ast":null,"code":"import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nvar _excluded = [\"style\", \"className\", \"title\", \"eventKey\", \"warnKey\", \"disabled\", \"internalPopupClose\", \"children\", \"itemIcon\", \"expandIcon\", \"popupClassName\", \"popupOffset\", \"popupStyle\", \"onClick\", \"onMouseEnter\", \"onMouseLeave\", \"onTitleClick\", \"onTitleMouseEnter\", \"onTitleMouseLeave\"],\n _excluded2 = [\"active\"];\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport Overflow from 'rc-overflow';\nimport warning from \"rc-util/es/warning\";\nimport SubMenuList from \"./SubMenuList\";\nimport { parseChildren } from \"../utils/commonUtil\";\nimport MenuContextProvider, { MenuContext } from \"../context/MenuContext\";\nimport useMemoCallback from \"../hooks/useMemoCallback\";\nimport PopupTrigger from \"./PopupTrigger\";\nimport Icon from \"../Icon\";\nimport useActive from \"../hooks/useActive\";\nimport { warnItemProp } from \"../utils/warnUtil\";\nimport useDirectionStyle from \"../hooks/useDirectionStyle\";\nimport InlineSubMenuList from \"./InlineSubMenuList\";\nimport { PathTrackerContext, PathUserContext, useFullPath, useMeasure } from \"../context/PathContext\";\nimport { useMenuId } from \"../context/IdContext\";\nimport PrivateContext from \"../context/PrivateContext\";\nvar InternalSubMenu = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var _classNames;\n var style = props.style,\n className = props.className,\n title = props.title,\n eventKey = props.eventKey,\n warnKey = props.warnKey,\n disabled = props.disabled,\n internalPopupClose = props.internalPopupClose,\n children = props.children,\n itemIcon = props.itemIcon,\n expandIcon = props.expandIcon,\n popupClassName = props.popupClassName,\n popupOffset = props.popupOffset,\n popupStyle = props.popupStyle,\n onClick = props.onClick,\n onMouseEnter = props.onMouseEnter,\n onMouseLeave = props.onMouseLeave,\n onTitleClick = props.onTitleClick,\n onTitleMouseEnter = props.onTitleMouseEnter,\n onTitleMouseLeave = props.onTitleMouseLeave,\n restProps = _objectWithoutProperties(props, _excluded);\n var domDataId = useMenuId(eventKey);\n var _React$useContext = React.useContext(MenuContext),\n prefixCls = _React$useContext.prefixCls,\n mode = _React$useContext.mode,\n openKeys = _React$useContext.openKeys,\n contextDisabled = _React$useContext.disabled,\n overflowDisabled = _React$useContext.overflowDisabled,\n activeKey = _React$useContext.activeKey,\n selectedKeys = _React$useContext.selectedKeys,\n contextItemIcon = _React$useContext.itemIcon,\n contextExpandIcon = _React$useContext.expandIcon,\n onItemClick = _React$useContext.onItemClick,\n onOpenChange = _React$useContext.onOpenChange,\n onActive = _React$useContext.onActive;\n var _React$useContext2 = React.useContext(PrivateContext),\n _internalRenderSubMenuItem = _React$useContext2._internalRenderSubMenuItem;\n var _React$useContext3 = React.useContext(PathUserContext),\n isSubPathKey = _React$useContext3.isSubPathKey;\n var connectedPath = useFullPath();\n var subMenuPrefixCls = \"\".concat(prefixCls, \"-submenu\");\n var mergedDisabled = contextDisabled || disabled;\n var elementRef = React.useRef();\n var popupRef = React.useRef();\n\n // ================================ Warn ================================\n if (process.env.NODE_ENV !== 'production' && warnKey) {\n warning(false, 'SubMenu should not leave undefined `key`.');\n }\n\n // ================================ Icon ================================\n var mergedItemIcon = itemIcon !== null && itemIcon !== void 0 ? itemIcon : contextItemIcon;\n var mergedExpandI