@pushwoosh/dumb-components 1.1.8 → 1.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -67,9 +67,12 @@ export const RichMessageEditor = ({
67
67
  Transforms.move(editor);
68
68
  setShowDrop(undefined);
69
69
  };
70
- const clickAwayHandler = usePersistentFunction(() => {
70
+ const onClose = () => {
71
71
  setShowDrop(undefined);
72
72
  setIsFocused(false);
73
+ };
74
+ const clickAwayHandler = usePersistentFunction(() => {
75
+ onClose();
73
76
  onBlur === null || onBlur === void 0 || onBlur();
74
77
  });
75
78
  useEffect(() => {
@@ -138,6 +141,7 @@ export const RichMessageEditor = ({
138
141
  insertDynamicContent(editor, newDC);
139
142
  }
140
143
  },
144
+ onClose,
141
145
  update
142
146
  })), showDrop.type === 'emoji' && React.createElement(EmojiPicker, {
143
147
  onEmojiSelect: s => editor.insertText(s)
@@ -11,6 +11,7 @@ export type DropValue = DropValueEmoji | DropValuePersonalization;
11
11
  export type RenderDynamicContentProps = {
12
12
  dc?: DynamicContent;
13
13
  onChange: (newDC: DynamicContent) => void;
14
+ onClose: () => void;
14
15
  update: () => void;
15
16
  };
16
17
  export type RichMessageEditorProps = {
@@ -1,3 +1,4 @@
1
1
  export { type RichMessageEditorContent } from './types';
2
2
  export { RichMessageEditor } from './RichMessageEditor';
3
3
  export { RichMessageViewer } from './RichMessageViewer';
4
+ export { type DynamicContent } from './slate/types';
package/index.d.ts CHANGED
@@ -36,4 +36,4 @@ export { NumberPicker } from './NumberPicker';
36
36
  export { CodeEditor } from './CodeEditor';
37
37
  export { EnhancedInput, SearchInput } from './EnhancedInput';
38
38
  export { Chip } from './Chip';
39
- export { RichMessageEditor, RichMessageViewer } from './RichMessageEditor';
39
+ export { RichMessageEditor, RichMessageViewer, type DynamicContent } from './RichMessageEditor';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/dumb-components",
3
- "version": "1.1.8",
3
+ "version": "1.1.9",
4
4
  "description": "React components to build Pushwoosh products",
5
5
  "main": "index.js",
6
6
  "module": "index.js",