react-input-emoji 5.7.1 → 5.8.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -0
- package/dist/index.es.js +263 -19
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +263 -19
- package/dist/index.js.map +1 -1
- package/dist/src/hooks/use-expose.d.ts +3 -1
- package/dist/src/hooks/use-sanitize.d.ts +2 -1
- package/dist/src/index.d.ts +2 -1
- package/package.json +5 -4
@@ -4,15 +4,17 @@
|
|
4
4
|
* @property {React.MutableRefObject<import('../text-input').Ref | null>} textInputRef
|
5
5
|
* @property {(value: string) => void} setValue
|
6
6
|
* @property {() => void} emitChange
|
7
|
+
* @property {boolean=} shouldConvertEmojiToImage
|
7
8
|
*/
|
8
9
|
/**
|
9
10
|
*
|
10
11
|
* @param {Props} props
|
11
12
|
*/
|
12
|
-
export function useExpose({ ref, textInputRef, setValue, emitChange }: Props): void;
|
13
|
+
export function useExpose({ ref, textInputRef, setValue, emitChange, shouldConvertEmojiToImage }: Props): void;
|
13
14
|
export type Props = {
|
14
15
|
ref: React.Ref<any>;
|
15
16
|
textInputRef: React.MutableRefObject<import('../text-input').Ref | null>;
|
16
17
|
setValue: (value: string) => void;
|
17
18
|
emitChange: () => void;
|
19
|
+
shouldConvertEmojiToImage?: boolean | undefined;
|
18
20
|
};
|
@@ -3,8 +3,9 @@
|
|
3
3
|
*/
|
4
4
|
/**
|
5
5
|
* @param {boolean} shouldReturn
|
6
|
+
* @param {boolean} shouldConvertEmojiToImage
|
6
7
|
*/
|
7
|
-
export function useSanitize(shouldReturn: boolean): {
|
8
|
+
export function useSanitize(shouldReturn: boolean, shouldConvertEmojiToImage: boolean): {
|
8
9
|
addSanitizeFn: (fn: SanitizeFn) => void;
|
9
10
|
sanitize: (html: string) => string;
|
10
11
|
sanitizedTextRef: import("react").MutableRefObject<string>;
|
package/dist/src/index.d.ts
CHANGED
@@ -17,7 +17,7 @@ export type Props = {
|
|
17
17
|
onClick?: (() => void) | undefined;
|
18
18
|
onFocus?: (() => void) | undefined;
|
19
19
|
onBlur?: (() => void) | undefined;
|
20
|
-
shouldReturn
|
20
|
+
shouldReturn: boolean;
|
21
21
|
maxLength?: number | undefined;
|
22
22
|
keepOpened?: boolean | undefined;
|
23
23
|
onKeyDown?: (event: KeyboardEvent) => void;
|
@@ -46,6 +46,7 @@ export type Props = {
|
|
46
46
|
searchMention?: (text: string) => Promise<MetionUser[]>;
|
47
47
|
buttonElement?: HTMLDivElement | undefined;
|
48
48
|
buttonRef?: React.MutableRefObject<any> | undefined;
|
49
|
+
shouldConvertEmojiToImage: boolean;
|
49
50
|
};
|
50
51
|
declare const InputEmojiWithRef: React.ForwardRefExoticComponent<Props & React.RefAttributes<any>>;
|
51
52
|
import React from "react";
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "react-input-emoji",
|
3
|
-
"version": "5.
|
3
|
+
"version": "5.8.1",
|
4
4
|
"description": "A React input with an option to add an emoji with language support.",
|
5
5
|
"homepage": "https://cesarwbr.github.io/react-input-emoji/",
|
6
6
|
"author": "cesarwbr",
|
@@ -47,7 +47,7 @@
|
|
47
47
|
"@testing-library/react": "^11.2.7",
|
48
48
|
"@testing-library/react-hooks": "^7.0.0",
|
49
49
|
"@testing-library/user-event": "^13.1.9",
|
50
|
-
"@types/emoji-mart": "^3.0.
|
50
|
+
"@types/emoji-mart": "^3.0.14",
|
51
51
|
"@types/styled-components": "^5.1.9",
|
52
52
|
"@typescript-eslint/eslint-plugin": "^4.19.0",
|
53
53
|
"@typescript-eslint/parser": "^4.19.0",
|
@@ -76,8 +76,9 @@
|
|
76
76
|
"dist"
|
77
77
|
],
|
78
78
|
"dependencies": {
|
79
|
-
"@emoji-mart/data": "1.1
|
79
|
+
"@emoji-mart/data": "1.2.1",
|
80
80
|
"@emoji-mart/react": "1.1.1",
|
81
|
-
"emoji-mart": "5.
|
81
|
+
"emoji-mart": "5.6.0",
|
82
|
+
"react-easy-emoji": "^1.8.1"
|
82
83
|
}
|
83
84
|
}
|