react-input-emoji 5.7.1 → 5.8.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -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>;
@@ -17,7 +17,7 @@ export type Props = {
17
17
  onClick?: (() => void) | undefined;
18
18
  onFocus?: (() => void) | undefined;
19
19
  onBlur?: (() => void) | undefined;
20
- shouldReturn?: boolean | undefined;
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.7.1",
3
+ "version": "5.8.0",
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",
@@ -78,6 +78,7 @@
78
78
  "dependencies": {
79
79
  "@emoji-mart/data": "1.1.2",
80
80
  "@emoji-mart/react": "1.1.1",
81
- "emoji-mart": "5.5.2"
81
+ "emoji-mart": "5.5.2",
82
+ "react-easy-emoji": "^1.8.1"
82
83
  }
83
84
  }