1 line
30 KiB
JSON
1 line
30 KiB
JSON
{"ast":null,"code":"\"use client\";\n\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { useEvent } from 'rc-util';\nimport scrollIntoView from 'scroll-into-view-if-needed';\nimport getScroll from '../_util/getScroll';\nimport scrollTo from '../_util/scrollTo';\nimport { devUseWarning } from '../_util/warning';\nimport Affix from '../affix';\nimport { ConfigContext } from '../config-provider';\nimport useCSSVarCls from '../config-provider/hooks/useCSSVarCls';\nimport AnchorLink from './AnchorLink';\nimport AnchorContext from './context';\nimport useStyle from './style';\nfunction getDefaultContainer() {\n return window;\n}\nfunction getOffsetTop(element, container) {\n if (!element.getClientRects().length) {\n return 0;\n }\n const rect = element.getBoundingClientRect();\n if (rect.width || rect.height) {\n if (container === window) {\n return rect.top - element.ownerDocument.documentElement.clientTop;\n }\n return rect.top - container.getBoundingClientRect().top;\n }\n return rect.top;\n}\nconst sharpMatcherRegex = /#([\\S ]+)$/;\nconst Anchor = props => {\n var _a;\n const {\n rootClassName,\n prefixCls: customPrefixCls,\n className,\n style,\n offsetTop,\n affix = true,\n showInkInFixed = false,\n children,\n items,\n direction: anchorDirection = 'vertical',\n bounds,\n targetOffset,\n onClick,\n onChange,\n getContainer,\n getCurrentAnchor,\n replace\n } = props;\n // =================== Warning =====================\n if (process.env.NODE_ENV !== 'production') {\n const warning = devUseWarning('Anchor');\n warning.deprecated(!children, 'Anchor children', 'items');\n process.env.NODE_ENV !== \"production\" ? warning(!(anchorDirection === 'horizontal' && (items === null || items === void 0 ? void 0 : items.some(n => 'children' in n))), 'usage', '`Anchor items#children` is not supported when `Anchor` direction is horizontal.') : void 0;\n }\n const [links, setLinks] = React.useState([]);\n const [activeLink, setActiveLink] = React.useState(null);\n const activeLinkRef = React.useRef(activeLink);\n const wrapperRef = React.useRef(null);\n const spanLinkNode = React.useRef(null);\n const animating = React.useRef(false);\n const {\n direction,\n anchor,\n getTargetContainer,\n getPrefixCls\n } = React.useContext(ConfigContext);\n const prefixCls = getPrefixCls('anchor', customPrefixCls);\n const rootCls = useCSSVarCls(prefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls, rootCls);\n const getCurrentContainer = (_a = getContainer !== null && getContainer !== void 0 ? getContainer : getTargetContainer) !== null && _a !== void 0 ? _a : getDefaultContainer;\n const dependencyListItem = JSON.stringify(links);\n const registerLink = useEvent(link => {\n if (!links.includes(link)) {\n setLinks(prev => [].concat(_toConsumableArray(prev), [link]));\n }\n });\n const unregisterLink = useEvent(link => {\n if (links.includes(link)) {\n setLinks(prev => prev.filter(i => i !== link));\n }\n });\n const updateInk = () => {\n var _a;\n const linkNode = (_a = wrapperRef.current) === null || _a === void 0 ? void 0 : _a.querySelector(`.${prefixCls}-link-title-active`);\n if (linkNode && spanLinkNode.current) {\n const {\n style: inkStyle\n } = spanLinkNode.current;\n const horizontalAnchor = anchorDirection === 'horizontal';\n inkStyle.top = horizontalAnchor ? '' : `${linkNode.offsetTop + linkNode.clientHeight / 2}px`;\n inkStyle.height = horizontalAnchor ? '' : `${linkNode.clientHeight}px`;\n inkStyle.left = horizontalAnchor ? `${linkNode.offsetLeft}px` : '';\n inkStyle.width = horizontalAnchor ? `${linkNode.clientWidth}px` : '';\n if (horizontalAnchor) {\n scrollIntoView(linkNode, {\n scrollMode: 'if-needed',\n block: 'nearest'\n });\n }\n }\n };\n const getInternalCurrentAnchor = function (_links) {\n let _offsetTop = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n let _bounds = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 5;\n const linkSections = [];\n const container = getCurrentContainer();\n _links.forEach(link => {\n const sharpLinkMatch = sharpMatcherRegex.exec(link === null || link === void 0 ? void 0 : link.toString());\n if (!sharpLinkMatch) {\n return;\n }\n const target = document.getElementById(sharpLinkMatch[1]);\n if (target) {\n const top = getOffsetTop(target, container);\n if (top <= _offsetTop + _bounds) {\n linkSections.push({\n link,\n top\n });\n }\n }\n });\n if (linkSections.length) {\n const maxSection = linkSections.reduce((prev, curr) => curr.top > prev.top ? curr : prev);\n return maxSection.link;\n }\n return '';\n };\n const setCurrentActiveLink = useEvent(link => {\n // FIXME: Seems a bug since this compare is not equals\n // `activeLinkRef` is parsed value which will always trigger `onChange` event.\n if (activeLinkRef.current === link) {\n return;\n }\n // https://github.com/ant-design/ant-design/issues/30584\n const newLink = typeof getCurrentAnchor === 'function' ? getCurrentAnchor(link) : link;\n setActiveLink(newLink);\n activeLinkRef.current = newLink;\n // onChange should respect the original link (which may caused by\n // window scroll or user click), not the new link\n onChange === null || onChange === void 0 ? void 0 : onChange(link);\n });\n const handleScroll = React.useCallback(() => {\n if (animating.current) {\n return;\n }\n const currentActiveLink = getInternalCurrentAnchor(links, targetOffset !== undefined ? targetOffset : offsetTop || 0, bounds);\n setCurrentActiveLink(currentActiveLink);\n }, [dependencyListItem, targetOffset, offsetTop]);\n const handleScrollTo = React.useCallback(link => {\n setCurrentActiveLink(link);\n const sharpLinkMatch = sharpMatcherRegex.exec(link);\n if (!sharpLinkMatch) {\n return;\n }\n const targetElement = document.getElementById(sharpLinkMatch[1]);\n if (!targetElement) {\n return;\n }\n const container = getCurrentContainer();\n const scrollTop = getScroll(container);\n const eleOffsetTop = getOffsetTop(targetElement, container);\n let y = scrollTop + eleOffsetTop;\n y -= targetOffset !== undefined ? targetOffset : offsetTop || 0;\n animating.current = true;\n scrollTo(y, {\n getContainer: getCurrentContainer,\n callback() {\n animating.current = false;\n }\n });\n }, [targetOffset, offsetTop]);\n const wrapperClass = classNames(hashId, cssVarCls, rootCls, rootClassName, `${prefixCls}-wrapper`, {\n [`${prefixCls}-wrapper-horizontal`]: anchorDirection === 'horizontal',\n [`${prefixCls}-rtl`]: direction === 'rtl'\n }, className, anchor === null || anchor === void 0 ? void 0 : anchor.className);\n const anchorClass = classNames(prefixCls, {\n [`${prefixCls}-fixed`]: !affix && !showInkInFixed\n });\n const inkClass = classNames(`${prefixCls}-ink`, {\n [`${prefixCls}-ink-visible`]: activeLink\n });\n const wrapperStyle = Object.assign(Object.assign({\n maxHeight: offsetTop ? `calc(100vh - ${offsetTop}px)` : '100vh'\n }, anchor === null || anchor === void 0 ? void 0 : anchor.style), style);\n const createNestedLink = options => Array.isArray(options) ? options.map(item => ( /*#__PURE__*/React.createElement(AnchorLink, Object.assign({\n replace: replace\n }, item, {\n key: item.key\n }), anchorDirection === 'vertical' && createNestedLink(item.children)))) : null;\n const anchorContent = /*#__PURE__*/React.createElement(\"div\", {\n ref: wrapperRef,\n className: wrapperClass,\n style: wrapperStyle\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: anchorClass\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: inkClass,\n ref: spanLinkNode\n }), 'items' in props ? createNestedLink(items) : children));\n React.useEffect(() => {\n const scrollContainer = getCurrentContainer();\n handleScroll();\n scrollContainer === null || scrollContainer === void 0 ? void 0 : scrollContainer.addEventListener('scroll', handleScroll);\n return () => {\n scrollContainer === null || scrollContainer === void 0 ? void 0 : scrollContainer.removeEventListener('scroll', handleScroll);\n };\n }, [dependencyListItem]);\n React.useEffect(() => {\n if (typeof getCurrentAnchor === 'function') {\n setCurrentActiveLink(getCurrentAnchor(activeLinkRef.current || ''));\n }\n }, [getCurrentAnchor]);\n React.useEffect(() => {\n updateInk();\n }, [anchorDirection, getCurrentAnchor, dependencyListItem, activeLink]);\n const memoizedContextValue = React.useMemo(() => ({\n registerLink,\n unregisterLink,\n scrollTo: handleScrollTo,\n activeLink,\n onClick,\n direction: anchorDirection\n }), [activeLink, onClick, handleScrollTo, anchorDirection]);\n const affixProps = affix && typeof affix === 'object' ? affix : undefined;\n return wrapCSSVar( /*#__PURE__*/React.createElement(AnchorContext.Provider, {\n value: memoizedContextValue\n }, affix ? ( /*#__PURE__*/React.createElement(Affix, Object.assign({\n offsetTop: offsetTop,\n target: getCurrentContainer\n }, affixProps), anchorContent)) : anchorContent));\n};\nif (process.env.NODE_ENV !== 'production') {\n Anchor.displayName = 'Anchor';\n}\nexport default Anchor;","map":{"version":3,"names":["_toConsumableArray","React","classNames","useEvent","scrollIntoView","getScroll","scrollTo","devUseWarning","Affix","ConfigContext","useCSSVarCls","AnchorLink","AnchorContext","useStyle","getDefaultContainer","window","getOffsetTop","element","container","getClientRects","length","rect","getBoundingClientRect","width","height","top","ownerDocument","documentElement","clientTop","sharpMatcherRegex","Anchor","props","_a","rootClassName","prefixCls","customPrefixCls","className","style","offsetTop","affix","showInkInFixed","children","items","direction","anchorDirection","bounds","targetOffset","onClick","onChange","getContainer","getCurrentAnchor","replace","process","env","NODE_ENV","warning","deprecated","some","n","links","setLinks","useState","activeLink","setActiveLink","activeLinkRef","useRef","wrapperRef","spanLinkNode","animating","anchor","getTargetContainer","getPrefixCls","useContext","rootCls","wrapCSSVar","hashId","cssVarCls","getCurrentContainer","dependencyListItem","JSON","stringify","registerLink","link","includes","prev","concat","unregisterLink","filter","i","updateInk","linkNode","current","querySelector","inkStyle","horizontalAnchor","clientHeight","left","offsetLeft","clientWidth","scrollMode","block","getInternalCurrentAnchor","_links","_offsetTop","arguments","undefined","_bounds","linkSections","forEach","sharpLinkMatch","exec","toString","target","document","getElementById","push","maxSection","reduce","curr","setCurrentActiveLink","newLink","handleScroll","useCallback","currentActiveLink","handleScrollTo","targetElement","scrollTop","eleOffsetTop","y","callback","wrapperClass","anchorClass","inkClass","wrapperStyle","Object","assign","maxHeight","createNestedLink","options","Array","isArray","map","item","createElement","key","anchorContent","ref","useEffect","scrollContainer","addEventListener","removeEventListener","memoizedContextValue","useMemo","affixProps","Provider","value","displayName"],"sources":["C:/Users/Аришина)/Desktop/promo/node_modules/antd/es/anchor/Anchor.js"],"sourcesContent":["\"use client\";\n\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { useEvent } from 'rc-util';\nimport scrollIntoView from 'scroll-into-view-if-needed';\nimport getScroll from '../_util/getScroll';\nimport scrollTo from '../_util/scrollTo';\nimport { devUseWarning } from '../_util/warning';\nimport Affix from '../affix';\nimport { ConfigContext } from '../config-provider';\nimport useCSSVarCls from '../config-provider/hooks/useCSSVarCls';\nimport AnchorLink from './AnchorLink';\nimport AnchorContext from './context';\nimport useStyle from './style';\nfunction getDefaultContainer() {\n return window;\n}\nfunction getOffsetTop(element, container) {\n if (!element.getClientRects().length) {\n return 0;\n }\n const rect = element.getBoundingClientRect();\n if (rect.width || rect.height) {\n if (container === window) {\n return rect.top - element.ownerDocument.documentElement.clientTop;\n }\n return rect.top - container.getBoundingClientRect().top;\n }\n return rect.top;\n}\nconst sharpMatcherRegex = /#([\\S ]+)$/;\nconst Anchor = props => {\n var _a;\n const {\n rootClassName,\n prefixCls: customPrefixCls,\n className,\n style,\n offsetTop,\n affix = true,\n showInkInFixed = false,\n children,\n items,\n direction: anchorDirection = 'vertical',\n bounds,\n targetOffset,\n onClick,\n onChange,\n getContainer,\n getCurrentAnchor,\n replace\n } = props;\n // =================== Warning =====================\n if (process.env.NODE_ENV !== 'production') {\n const warning = devUseWarning('Anchor');\n warning.deprecated(!children, 'Anchor children', 'items');\n process.env.NODE_ENV !== \"production\" ? warning(!(anchorDirection === 'horizontal' && (items === null || items === void 0 ? void 0 : items.some(n => 'children' in n))), 'usage', '`Anchor items#children` is not supported when `Anchor` direction is horizontal.') : void 0;\n }\n const [links, setLinks] = React.useState([]);\n const [activeLink, setActiveLink] = React.useState(null);\n const activeLinkRef = React.useRef(activeLink);\n const wrapperRef = React.useRef(null);\n const spanLinkNode = React.useRef(null);\n const animating = React.useRef(false);\n const {\n direction,\n anchor,\n getTargetContainer,\n getPrefixCls\n } = React.useContext(ConfigContext);\n const prefixCls = getPrefixCls('anchor', customPrefixCls);\n const rootCls = useCSSVarCls(prefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls, rootCls);\n const getCurrentContainer = (_a = getContainer !== null && getContainer !== void 0 ? getContainer : getTargetContainer) !== null && _a !== void 0 ? _a : getDefaultContainer;\n const dependencyListItem = JSON.stringify(links);\n const registerLink = useEvent(link => {\n if (!links.includes(link)) {\n setLinks(prev => [].concat(_toConsumableArray(prev), [link]));\n }\n });\n const unregisterLink = useEvent(link => {\n if (links.includes(link)) {\n setLinks(prev => prev.filter(i => i !== link));\n }\n });\n const updateInk = () => {\n var _a;\n const linkNode = (_a = wrapperRef.current) === null || _a === void 0 ? void 0 : _a.querySelector(`.${prefixCls}-link-title-active`);\n if (linkNode && spanLinkNode.current) {\n const {\n style: inkStyle\n } = spanLinkNode.current;\n const horizontalAnchor = anchorDirection === 'horizontal';\n inkStyle.top = horizontalAnchor ? '' : `${linkNode.offsetTop + linkNode.clientHeight / 2}px`;\n inkStyle.height = horizontalAnchor ? '' : `${linkNode.clientHeight}px`;\n inkStyle.left = horizontalAnchor ? `${linkNode.offsetLeft}px` : '';\n inkStyle.width = horizontalAnchor ? `${linkNode.clientWidth}px` : '';\n if (horizontalAnchor) {\n scrollIntoView(linkNode, {\n scrollMode: 'if-needed',\n block: 'nearest'\n });\n }\n }\n };\n const getInternalCurrentAnchor = function (_links) {\n let _offsetTop = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n let _bounds = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 5;\n const linkSections = [];\n const container = getCurrentContainer();\n _links.forEach(link => {\n const sharpLinkMatch = sharpMatcherRegex.exec(link === null || link === void 0 ? void 0 : link.toString());\n if (!sharpLinkMatch) {\n return;\n }\n const target = document.getElementById(sharpLinkMatch[1]);\n if (target) {\n const top = getOffsetTop(target, container);\n if (top <= _offsetTop + _bounds) {\n linkSections.push({\n link,\n top\n });\n }\n }\n });\n if (linkSections.length) {\n const maxSection = linkSections.reduce((prev, curr) => curr.top > prev.top ? curr : prev);\n return maxSection.link;\n }\n return '';\n };\n const setCurrentActiveLink = useEvent(link => {\n // FIXME: Seems a bug since this compare is not equals\n // `activeLinkRef` is parsed value which will always trigger `onChange` event.\n if (activeLinkRef.current === link) {\n return;\n }\n // https://github.com/ant-design/ant-design/issues/30584\n const newLink = typeof getCurrentAnchor === 'function' ? getCurrentAnchor(link) : link;\n setActiveLink(newLink);\n activeLinkRef.current = newLink;\n // onChange should respect the original link (which may caused by\n // window scroll or user click), not the new link\n onChange === null || onChange === void 0 ? void 0 : onChange(link);\n });\n const handleScroll = React.useCallback(() => {\n if (animating.current) {\n return;\n }\n const currentActiveLink = getInternalCurrentAnchor(links, targetOffset !== undefined ? targetOffset : offsetTop || 0, bounds);\n setCurrentActiveLink(currentActiveLink);\n }, [dependencyListItem, targetOffset, offsetTop]);\n const handleScrollTo = React.useCallback(link => {\n setCurrentActiveLink(link);\n const sharpLinkMatch = sharpMatcherRegex.exec(link);\n if (!sharpLinkMatch) {\n return;\n }\n const targetElement = document.getElementById(sharpLinkMatch[1]);\n if (!targetElement) {\n return;\n }\n const container = getCurrentContainer();\n const scrollTop = getScroll(container);\n const eleOffsetTop = getOffsetTop(targetElement, container);\n let y = scrollTop + eleOffsetTop;\n y -= targetOffset !== undefined ? targetOffset : offsetTop || 0;\n animating.current = true;\n scrollTo(y, {\n getContainer: getCurrentContainer,\n callback() {\n animating.current = false;\n }\n });\n }, [targetOffset, offsetTop]);\n const wrapperClass = classNames(hashId, cssVarCls, rootCls, rootClassName, `${prefixCls}-wrapper`, {\n [`${prefixCls}-wrapper-horizontal`]: anchorDirection === 'horizontal',\n [`${prefixCls}-rtl`]: direction === 'rtl'\n }, className, anchor === null || anchor === void 0 ? void 0 : anchor.className);\n const anchorClass = classNames(prefixCls, {\n [`${prefixCls}-fixed`]: !affix && !showInkInFixed\n });\n const inkClass = classNames(`${prefixCls}-ink`, {\n [`${prefixCls}-ink-visible`]: activeLink\n });\n const wrapperStyle = Object.assign(Object.assign({\n maxHeight: offsetTop ? `calc(100vh - ${offsetTop}px)` : '100vh'\n }, anchor === null || anchor === void 0 ? void 0 : anchor.style), style);\n const createNestedLink = options => Array.isArray(options) ? options.map(item => ( /*#__PURE__*/React.createElement(AnchorLink, Object.assign({\n replace: replace\n }, item, {\n key: item.key\n }), anchorDirection === 'vertical' && createNestedLink(item.children)))) : null;\n const anchorContent = /*#__PURE__*/React.createElement(\"div\", {\n ref: wrapperRef,\n className: wrapperClass,\n style: wrapperStyle\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: anchorClass\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: inkClass,\n ref: spanLinkNode\n }), 'items' in props ? createNestedLink(items) : children));\n React.useEffect(() => {\n const scrollContainer = getCurrentContainer();\n handleScroll();\n scrollContainer === null || scrollContainer === void 0 ? void 0 : scrollContainer.addEventListener('scroll', handleScroll);\n return () => {\n scrollContainer === null || scrollContainer === void 0 ? void 0 : scrollContainer.removeEventListener('scroll', handleScroll);\n };\n }, [dependencyListItem]);\n React.useEffect(() => {\n if (typeof getCurrentAnchor === 'function') {\n setCurrentActiveLink(getCurrentAnchor(activeLinkRef.current || ''));\n }\n }, [getCurrentAnchor]);\n React.useEffect(() => {\n updateInk();\n }, [anchorDirection, getCurrentAnchor, dependencyListItem, activeLink]);\n const memoizedContextValue = React.useMemo(() => ({\n registerLink,\n unregisterLink,\n scrollTo: handleScrollTo,\n activeLink,\n onClick,\n direction: anchorDirection\n }), [activeLink, onClick, handleScrollTo, anchorDirection]);\n const affixProps = affix && typeof affix === 'object' ? affix : undefined;\n return wrapCSSVar( /*#__PURE__*/React.createElement(AnchorContext.Provider, {\n value: memoizedContextValue\n }, affix ? ( /*#__PURE__*/React.createElement(Affix, Object.assign({\n offsetTop: offsetTop,\n target: getCurrentContainer\n }, affixProps), anchorContent)) : anchorContent));\n};\nif (process.env.NODE_ENV !== 'production') {\n Anchor.displayName = 'Anchor';\n}\nexport default Anchor;"],"mappings":"AAAA,YAAY;;AAEZ,OAAOA,kBAAkB,MAAM,8CAA8C;AAC7E,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,OAAOC,UAAU,MAAM,YAAY;AACnC,SAASC,QAAQ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