rc-mentions
Advanced tools
Comparing version 2.4.1 to 2.5.0
@@ -14,3 +14,3 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import warning from "rc-util/es/warning"; | ||
import React, { forwardRef, useEffect, useRef, useState } from 'react'; | ||
import React, { forwardRef, useEffect, useMemo, useRef, useState } from 'react'; | ||
import useEffectState from "./hooks/useEffectState"; | ||
@@ -57,3 +57,5 @@ import KeywordTrigger from "./KeywordTrigger"; | ||
restProps = _objectWithoutProperties(props, _excluded); | ||
var mergedPrefix = Array.isArray(prefix) ? prefix : [prefix]; | ||
var mergedPrefix = useMemo(function () { | ||
return Array.isArray(prefix) ? prefix : [prefix]; | ||
}, [prefix]); | ||
@@ -60,0 +62,0 @@ // =============================== Refs =============================== |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
var _typeof = require("@babel/runtime/helpers/typeof"); | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default; | ||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default; | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -12,4 +12,2 @@ value: true | ||
var _MentionsContext = _interopRequireDefault(require("./MentionsContext")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
/** | ||
@@ -16,0 +14,0 @@ * We only use Menu to display the candidate. |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default; | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -5,0 +5,0 @@ value: true |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default; | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -5,0 +5,0 @@ value: true |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
var _typeof = require("@babel/runtime/helpers/typeof"); | ||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default; | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -12,4 +12,2 @@ value: true | ||
var _DropdownMenu = _interopRequireDefault(require("./DropdownMenu")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
var BUILT_IN_PLACEMENTS = { | ||
@@ -16,0 +14,0 @@ bottomRight: { |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
var _typeof = require("@babel/runtime/helpers/typeof"); | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default; | ||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default; | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -28,4 +28,2 @@ value: true | ||
_excluded2 = ["suffix", "prefixCls", "classes", "value"]; | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
var InternalMentions = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) { | ||
@@ -67,3 +65,5 @@ var _props$prefixCls = props.prefixCls, | ||
restProps = (0, _objectWithoutProperties2.default)(props, _excluded); | ||
var mergedPrefix = Array.isArray(prefix) ? prefix : [prefix]; | ||
var mergedPrefix = (0, _react.useMemo)(function () { | ||
return Array.isArray(prefix) ? prefix : [prefix]; | ||
}, [prefix]); | ||
@@ -70,0 +70,0 @@ // =============================== Refs =============================== |
"use strict"; | ||
var _typeof = require("@babel/runtime/helpers/typeof"); | ||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default; | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,4 +9,2 @@ value: true | ||
var React = _interopRequireWildcard(require("react")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
/* tslint:disable: no-object-literal-type-assertion */ | ||
@@ -13,0 +11,0 @@ |
{ | ||
"name": "rc-mentions", | ||
"version": "2.4.1", | ||
"version": "2.5.0", | ||
"description": "React Mentions", | ||
@@ -48,7 +48,7 @@ "keywords": [ | ||
"dependencies": { | ||
"@babel/runtime": "^7.10.1", | ||
"@babel/runtime": "^7.22.5", | ||
"@rc-component/trigger": "^1.5.0", | ||
"classnames": "^2.2.6", | ||
"rc-input": "~1.1.0", | ||
"rc-menu": "~9.9.0", | ||
"rc-menu": "~9.10.0", | ||
"rc-textarea": "~1.3.0", | ||
@@ -55,0 +55,0 @@ "rc-util": "^5.22.5" |
# rc-mentions | ||
[![NPM version][npm-image]][npm-url] | ||
[![Test coverage][codecov-image]][codecov-url] | ||
[![Dependencies](https://img.shields.io/david/react-component/mentions.svg?style=flat-square)](https://david-dm.org/react-component/mentions) | ||
[![DevDependencies](https://img.shields.io/david/dev/react-component/mentions.svg?style=flat-square)](https://david-dm.org/react-component/mentions?type=dev) | ||
[![npm download][download-image]][download-url] | ||
[![build status][github-actions-image]][github-actions-url] | ||
[![Codecov][codecov-image]][codecov-url] | ||
[![bundle size][bundlephobia-image]][bundlephobia-url] | ||
[![dumi][dumi-image]][dumi-url] | ||
[npm-image]: http://img.shields.io/npm/v/rc-mentions.svg?style=flat-square | ||
[npm-url]: http://npmjs.org/package/rc-mentions | ||
[codecov-image]: https://img.shields.io/codecov/c/github/react-component/mentions.svg?style=flat-square | ||
[codecov-url]: https://codecov.io/gh/react-component/mentions/branch/master | ||
[node-image]: https://img.shields.io/badge/node.js-%3E=_0.10-green.svg?style=flat-square | ||
[node-url]: http://nodejs.org/download/ | ||
[travis-image]: https://img.shields.io/travis/react-component/mentions/master?style=flat-square | ||
[travis-url]: https://travis-ci.com/react-component/mentions | ||
[github-actions-image]: https://github.com/react-component/mentions/workflows/CI/badge.svg | ||
[github-actions-url]: https://github.com/react-component/mentions/actions | ||
[codecov-image]: https://img.shields.io/codecov/c/github/react-component/mentions/master.svg?style=flat-square | ||
[codecov-url]: https://app.codecov.io/gh/react-component/mentions | ||
[david-url]: https://david-dm.org/react-component/mentions | ||
[david-image]: https://david-dm.org/react-component/mentions/status.svg?style=flat-square | ||
[david-dev-url]: https://david-dm.org/react-component/mentions?type=dev | ||
[david-dev-image]: https://david-dm.org/react-component/mentions/dev-status.svg?style=flat-square | ||
[download-image]: https://img.shields.io/npm/dm/rc-mentions.svg?style=flat-square | ||
[download-url]: https://npmjs.org/package/rc-mentions | ||
[bundlephobia-url]: https://bundlephobia.com/package/rc-mentions | ||
[bundlephobia-image]: https://badgen.net/bundlephobia/minzip/rc-mentions | ||
[dumi-url]: https://github.com/umijs/dumi | ||
[dumi-image]: https://img.shields.io/badge/docs%20by-dumi-blue?style=flat-square | ||
@@ -18,0 +29,0 @@ ## Screenshots |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
132
72284
1605
+ Addedrc-menu@9.10.0(transitive)
- Removedrc-menu@9.9.2(transitive)
Updated@babel/runtime@^7.22.5
Updatedrc-menu@~9.10.0