@pushwoosh/dumb-components 1.0.62 → 1.0.63

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.
@@ -25,7 +25,8 @@ export const RichMessageEditor = ({
25
25
  const [isFocused, setIsFocused] = useState(false);
26
26
  const {
27
27
  refs,
28
- floatingStyles
28
+ floatingStyles,
29
+ update
29
30
  } = useFloating({
30
31
  middleware: [offset(8), autoPlacement({
31
32
  allowedPlacements: ['left', 'left-start', 'left-end', 'right', 'right-start', 'right-end']
@@ -125,7 +126,8 @@ export const RichMessageEditor = ({
125
126
  } else {
126
127
  insertDynamicContent(editor, newDC);
127
128
  }
128
- }
129
+ },
130
+ update
129
131
  })), showDrop.type === 'emoji' && React.createElement(EmojiPicker, {
130
132
  onEmojiSelect: s => editor.insertText(s)
131
133
  })));
@@ -8,6 +8,11 @@ export type DropValueEmoji = {
8
8
  type: 'emoji';
9
9
  };
10
10
  export type DropValue = DropValueEmoji | DropValuePersonalization;
11
+ export type RenderDynamicContentProps = {
12
+ dc?: DynamicContent;
13
+ onChange: (newDC: DynamicContent) => void;
14
+ update: () => void;
15
+ };
11
16
  export type RichMessageEditorProps = {
12
17
  title: ReactNode;
13
18
  initialValue: string;
@@ -17,8 +22,5 @@ export type RichMessageEditorProps = {
17
22
  canUsePersonalization?: boolean;
18
23
  canUseEmoji?: boolean;
19
24
  onBlur?: () => void;
20
- renderDynamicContent?: (props: {
21
- dc?: DynamicContent;
22
- onChange: (newDC: DynamicContent) => void;
23
- }) => ReactNode;
25
+ renderDynamicContent?: (props: RenderDynamicContentProps) => ReactNode;
24
26
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/dumb-components",
3
- "version": "1.0.62",
3
+ "version": "1.0.63",
4
4
  "description": "React components to build Pushwoosh products",
5
5
  "main": "index.js",
6
6
  "module": "index.js",