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

1 line
55 KiB
JSON
Raw Normal View History

2024-08-20 23:25:37 +04:00
{"ast":null,"code":"import _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 = [\"prefixCls\", \"className\", \"style\", \"prefix\", \"split\", \"notFoundContent\", \"value\", \"defaultValue\", \"children\", \"options\", \"open\", \"allowClear\", \"silent\", \"validateSearch\", \"filterOption\", \"onChange\", \"onKeyDown\", \"onKeyUp\", \"onPressEnter\", \"onSearch\", \"onSelect\", \"onFocus\", \"onBlur\", \"transitionName\", \"placement\", \"direction\", \"getPopupContainer\", \"dropdownClassName\", \"rows\"],\n _excluded2 = [\"suffix\", \"prefixCls\", \"defaultValue\", \"value\", \"allowClear\", \"onChange\", \"classNames\", \"className\", \"disabled\", \"onClear\"];\nimport classNames from 'classnames';\nimport { BaseInput } from 'rc-input';\nimport TextArea from 'rc-textarea';\nimport toArray from \"rc-util/es/Children/toArray\";\nimport useMergedState from \"rc-util/es/hooks/useMergedState\";\nimport KeyCode from \"rc-util/es/KeyCode\";\nimport warning from \"rc-util/es/warning\";\nimport React, { forwardRef, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';\nimport useEffectState from \"./hooks/useEffectState\";\nimport KeywordTrigger from \"./KeywordTrigger\";\nimport MentionsContext from \"./MentionsContext\";\nimport Option from \"./Option\";\nimport { filterOption as defaultFilterOption, validateSearch as defaultValidateSearch, getBeforeSelectionText, getLastMeasureIndex, replaceWithMeasure, setInputSelection } from \"./util\";\nvar InternalMentions = /*#__PURE__*/forwardRef(function (props, ref) {\n var prefixCls = props.prefixCls,\n className = props.className,\n style = props.style,\n _props$prefix = props.prefix,\n prefix = _props$prefix === void 0 ? '@' : _props$prefix,\n _props$split = props.split,\n split = _props$split === void 0 ? ' ' : _props$split,\n _props$notFoundConten = props.notFoundContent,\n notFoundContent = _props$notFoundConten === void 0 ? 'Not Found' : _props$notFoundConten,\n value = props.value,\n defaultValue = props.defaultValue,\n children = props.children,\n options = props.options,\n open = props.open,\n allowClear = props.allowClear,\n silent = props.silent,\n _props$validateSearch = props.validateSearch,\n validateSearch = _props$validateSearch === void 0 ? defaultValidateSearch : _props$validateSearch,\n _props$filterOption = props.filterOption,\n filterOption = _props$filterOption === void 0 ? defaultFilterOption : _props$filterOption,\n onChange = props.onChange,\n onKeyDown = props.onKeyDown,\n onKeyUp = props.onKeyUp,\n onPressEnter = props.onPressEnter,\n onSearch = props.onSearch,\n onSelect = props.onSelect,\n onFocus = props.onFocus,\n onBlur = props.onBlur,\n transitionName = props.transitionName,\n placement = props.placement,\n direction = props.direction,\n getPopupContainer = props.getPopupContainer,\n dropdownClassName = props.dropdownClassName,\n _props$rows = props.rows,\n rows = _props$rows === void 0 ? 1 : _props$rows,\n restProps = _objectWithoutProperties(props, _excluded);\n var mergedPrefix = useMemo(function () {\n return Array.isArray(prefix) ? prefix : [prefix];\n }, [prefix]);\n\n // =============================== Refs ===============================\n var containerRef = useRef(null);\n var textareaRef = useRef(null);\n var measureRef = useRef(null);\n var getTextArea = function getTextArea() {\n var _textareaRef$current;\n return (_textareaRef$current = textareaRef.current) === null || _textareaRef$current === void 0 || (_textareaRef$current = _textareaRef$current.resizableTextArea) === null || _textareaRef$current === void 0 ? void 0 : _textareaRef$current.textArea;\n };\n React.useImperativeHandle(ref, function () {\n var _textareaRef$current4;