rc-mentions
Advanced tools
Comparing version 2.13.1 to 2.13.2
@@ -1,2 +0,2 @@ | ||
export type Trigger = (callback?: VoidFunction) => void; | ||
export declare type Trigger = (callback?: VoidFunction) => void; | ||
/** | ||
@@ -3,0 +3,0 @@ * Trigger a callback on state change |
@@ -25,5 +25,5 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; | ||
var _effectId$callback; | ||
(_effectId$callback = effectId.callback) === null || _effectId$callback === void 0 || _effectId$callback.call(effectId); | ||
(_effectId$callback = effectId.callback) === null || _effectId$callback === void 0 ? void 0 : _effectId$callback.call(effectId); | ||
}, [effectId]); | ||
return update; | ||
} |
@@ -7,5 +7,5 @@ import type { CommonInputProps } from 'rc-input/lib/interface'; | ||
import { filterOption as defaultFilterOption, validateSearch as defaultValidateSearch } from './util'; | ||
type BaseTextareaAttrs = Omit<TextAreaProps, 'prefix' | 'onChange' | 'onSelect' | 'showCount' | 'classNames'>; | ||
export type Placement = 'top' | 'bottom'; | ||
export type Direction = 'ltr' | 'rtl'; | ||
declare type BaseTextareaAttrs = Omit<TextAreaProps, 'prefix' | 'onChange' | 'onSelect' | 'showCount' | 'classNames'>; | ||
export declare type Placement = 'top' | 'bottom'; | ||
export declare type Direction = 'ltr' | 'rtl'; | ||
export interface DataDrivenOptionProps extends Omit<OptionProps, 'children'> { | ||
@@ -12,0 +12,0 @@ label?: React.ReactNode; |
@@ -65,7 +65,7 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
var getTextArea = function getTextArea() { | ||
var _textareaRef$current; | ||
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; | ||
var _textareaRef$current, _textareaRef$current$; | ||
return (_textareaRef$current = textareaRef.current) === null || _textareaRef$current === void 0 ? void 0 : (_textareaRef$current$ = _textareaRef$current.resizableTextArea) === null || _textareaRef$current$ === void 0 ? void 0 : _textareaRef$current$.textArea; | ||
}; | ||
React.useImperativeHandle(ref, function () { | ||
var _textareaRef$current4; | ||
var _textareaRef$current4, _textareaRef$current5; | ||
return { | ||
@@ -80,3 +80,3 @@ focus: function focus() { | ||
}, | ||
textarea: (_textareaRef$current4 = textareaRef.current) === null || _textareaRef$current4 === void 0 || (_textareaRef$current4 = _textareaRef$current4.resizableTextArea) === null || _textareaRef$current4 === void 0 ? void 0 : _textareaRef$current4.textArea, | ||
textarea: (_textareaRef$current4 = textareaRef.current) === null || _textareaRef$current4 === void 0 ? void 0 : (_textareaRef$current5 = _textareaRef$current4.resizableTextArea) === null || _textareaRef$current5 === void 0 ? void 0 : _textareaRef$current5.textArea, | ||
nativeElement: containerRef.current | ||
@@ -201,3 +201,3 @@ }; | ||
setMergedValue(nextValue); | ||
onChange === null || onChange === void 0 || onChange(nextValue); | ||
onChange === null || onChange === void 0 ? void 0 : onChange(nextValue); | ||
}; | ||
@@ -226,3 +226,3 @@ var onInternalChange = function onInternalChange(_ref2) { | ||
}); | ||
onSelect === null || onSelect === void 0 || onSelect(option, mergedMeasurePrefix); | ||
onSelect === null || onSelect === void 0 ? void 0 : onSelect(option, mergedMeasurePrefix); | ||
}; | ||
@@ -234,3 +234,3 @@ | ||
var which = event.which; | ||
onKeyDown === null || onKeyDown === void 0 || onKeyDown(event); | ||
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(event); | ||
@@ -284,3 +284,3 @@ // Skip if not measuring | ||
// If the client implements an onKeyUp handler, call it | ||
onKeyUp === null || onKeyUp === void 0 || onKeyUp(event); | ||
onKeyUp === null || onKeyUp === void 0 ? void 0 : onKeyUp(event); | ||
@@ -334,3 +334,3 @@ // Skip if match the white key list | ||
stopMeasure(); | ||
onBlur === null || onBlur === void 0 || onBlur(event); | ||
onBlur === null || onBlur === void 0 ? void 0 : onBlur(event); | ||
}, 0); | ||
@@ -418,3 +418,3 @@ }; | ||
setMergedValue(currentValue); | ||
onChange === null || onChange === void 0 || onChange(currentValue); | ||
onChange === null || onChange === void 0 ? void 0 : onChange(currentValue); | ||
}; | ||
@@ -440,3 +440,4 @@ | ||
ref: mentionRef, | ||
onChange: triggerChange | ||
onChange: triggerChange, | ||
disabled: disabled | ||
}, rest))); | ||
@@ -443,0 +444,0 @@ }); |
@@ -59,2 +59,3 @@ "use strict"; | ||
} | ||
var _default = exports.default = DropdownMenu; | ||
var _default = DropdownMenu; | ||
exports.default = _default; |
@@ -1,2 +0,2 @@ | ||
export type Trigger = (callback?: VoidFunction) => void; | ||
export declare type Trigger = (callback?: VoidFunction) => void; | ||
/** | ||
@@ -3,0 +3,0 @@ * Trigger a callback on state change |
@@ -32,5 +32,5 @@ "use strict"; | ||
var _effectId$callback; | ||
(_effectId$callback = effectId.callback) === null || _effectId$callback === void 0 || _effectId$callback.call(effectId); | ||
(_effectId$callback = effectId.callback) === null || _effectId$callback === void 0 ? void 0 : _effectId$callback.call(effectId); | ||
}, [effectId]); | ||
return update; | ||
} |
@@ -9,2 +9,3 @@ "use strict"; | ||
var _Mentions = _interopRequireDefault(require("./Mentions")); | ||
var _default = exports.default = _Mentions.default; | ||
var _default = _Mentions.default; | ||
exports.default = _default; |
@@ -10,4 +10,3 @@ "use strict"; | ||
var _trigger = _interopRequireDefault(require("@rc-component/trigger")); | ||
var _react = _interopRequireWildcard(require("react")); | ||
var React = _react; | ||
var React = _interopRequireWildcard(require("react")); | ||
var _DropdownMenu = _interopRequireDefault(require("./DropdownMenu")); | ||
@@ -63,3 +62,3 @@ var BUILT_IN_PLACEMENTS = { | ||
}); | ||
var dropdownPlacement = (0, _react.useMemo)(function () { | ||
var dropdownPlacement = (0, React.useMemo)(function () { | ||
var popupPlacement; | ||
@@ -84,2 +83,3 @@ if (direction === 'rtl') { | ||
}; | ||
var _default = exports.default = KeywordTrigger; | ||
var _default = KeywordTrigger; | ||
exports.default = _default; |
@@ -7,5 +7,5 @@ import type { CommonInputProps } from 'rc-input/lib/interface'; | ||
import { filterOption as defaultFilterOption, validateSearch as defaultValidateSearch } from './util'; | ||
type BaseTextareaAttrs = Omit<TextAreaProps, 'prefix' | 'onChange' | 'onSelect' | 'showCount' | 'classNames'>; | ||
export type Placement = 'top' | 'bottom'; | ||
export type Direction = 'ltr' | 'rtl'; | ||
declare type BaseTextareaAttrs = Omit<TextAreaProps, 'prefix' | 'onChange' | 'onSelect' | 'showCount' | 'classNames'>; | ||
export declare type Placement = 'top' | 'bottom'; | ||
export declare type Direction = 'ltr' | 'rtl'; | ||
export interface DataDrivenOptionProps extends Omit<OptionProps, 'children'> { | ||
@@ -12,0 +12,0 @@ label?: React.ReactNode; |
@@ -73,7 +73,7 @@ "use strict"; | ||
var getTextArea = function getTextArea() { | ||
var _textareaRef$current; | ||
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; | ||
var _textareaRef$current, _textareaRef$current$; | ||
return (_textareaRef$current = textareaRef.current) === null || _textareaRef$current === void 0 ? void 0 : (_textareaRef$current$ = _textareaRef$current.resizableTextArea) === null || _textareaRef$current$ === void 0 ? void 0 : _textareaRef$current$.textArea; | ||
}; | ||
_react.default.useImperativeHandle(ref, function () { | ||
var _textareaRef$current4; | ||
var _textareaRef$current4, _textareaRef$current5; | ||
return { | ||
@@ -88,3 +88,3 @@ focus: function focus() { | ||
}, | ||
textarea: (_textareaRef$current4 = textareaRef.current) === null || _textareaRef$current4 === void 0 || (_textareaRef$current4 = _textareaRef$current4.resizableTextArea) === null || _textareaRef$current4 === void 0 ? void 0 : _textareaRef$current4.textArea, | ||
textarea: (_textareaRef$current4 = textareaRef.current) === null || _textareaRef$current4 === void 0 ? void 0 : (_textareaRef$current5 = _textareaRef$current4.resizableTextArea) === null || _textareaRef$current5 === void 0 ? void 0 : _textareaRef$current5.textArea, | ||
nativeElement: containerRef.current | ||
@@ -209,3 +209,3 @@ }; | ||
setMergedValue(nextValue); | ||
onChange === null || onChange === void 0 || onChange(nextValue); | ||
onChange === null || onChange === void 0 ? void 0 : onChange(nextValue); | ||
}; | ||
@@ -234,3 +234,3 @@ var onInternalChange = function onInternalChange(_ref2) { | ||
}); | ||
onSelect === null || onSelect === void 0 || onSelect(option, mergedMeasurePrefix); | ||
onSelect === null || onSelect === void 0 ? void 0 : onSelect(option, mergedMeasurePrefix); | ||
}; | ||
@@ -242,3 +242,3 @@ | ||
var which = event.which; | ||
onKeyDown === null || onKeyDown === void 0 || onKeyDown(event); | ||
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(event); | ||
@@ -292,3 +292,3 @@ // Skip if not measuring | ||
// If the client implements an onKeyUp handler, call it | ||
onKeyUp === null || onKeyUp === void 0 || onKeyUp(event); | ||
onKeyUp === null || onKeyUp === void 0 ? void 0 : onKeyUp(event); | ||
@@ -342,3 +342,3 @@ // Skip if match the white key list | ||
stopMeasure(); | ||
onBlur === null || onBlur === void 0 || onBlur(event); | ||
onBlur === null || onBlur === void 0 ? void 0 : onBlur(event); | ||
}, 0); | ||
@@ -426,3 +426,3 @@ }; | ||
setMergedValue(currentValue); | ||
onChange === null || onChange === void 0 || onChange(currentValue); | ||
onChange === null || onChange === void 0 ? void 0 : onChange(currentValue); | ||
}; | ||
@@ -448,6 +448,8 @@ | ||
ref: mentionRef, | ||
onChange: triggerChange | ||
onChange: triggerChange, | ||
disabled: disabled | ||
}, rest))); | ||
}); | ||
Mentions.Option = _Option.default; | ||
var _default = exports.default = Mentions; | ||
var _default = Mentions; | ||
exports.default = _default; |
@@ -13,2 +13,3 @@ "use strict"; | ||
var MentionsContext = /*#__PURE__*/React.createContext(null); | ||
var _default = exports.default = MentionsContext; | ||
var _default = MentionsContext; | ||
exports.default = _default; |
@@ -10,2 +10,3 @@ "use strict"; | ||
}; | ||
var _default = exports.default = Option; | ||
var _default = Option; | ||
exports.default = _default; |
{ | ||
"name": "rc-mentions", | ||
"version": "2.13.1", | ||
"version": "2.13.2", | ||
"description": "React Mentions", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
76740
1699