@pushwoosh/dumb-components 1.0.46 → 1.0.47

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.
@@ -71,44 +71,47 @@ export const RichMessageEditor = ({
71
71
  onSelectionChange: onSelectionChange
72
72
  }, ({
73
73
  editor
74
- }) => React.createElement(FieldBox, {
75
- title: title,
76
- boxRef: rootRef,
77
- actions: React.createElement(Collapse, {
78
- expanded: isFocused
79
- }, React.createElement(Horizontal, {
80
- "$gap": 8
81
- }, canUsePersonalization && React.createElement(ImSpan, {
82
- onClick: () => insertDynamicContent(editor)
83
- }, React.createElement(PersonalizationIcon, null), "Personalization"), canUseEmoji && React.createElement(ImSpan, {
84
- onClick: () => showDropArea({
85
- type: 'emoji'
86
- })
87
- }, React.createElement(EmojiIcon, null), "Emoji")))
88
- }, React.createElement(SlateEditable, {
89
- minHeight: minHeight,
90
- onFocus: () => {
91
- setIsFocused(true);
92
- const {
93
- selection
94
- } = editor;
95
- if (selection) {
96
- onSelectionChange(selection);
74
+ }) => {
75
+ var _getDcByPath;
76
+ return React.createElement(FieldBox, {
77
+ title: title,
78
+ boxRef: rootRef,
79
+ actions: React.createElement(Collapse, {
80
+ expanded: isFocused
81
+ }, React.createElement(Horizontal, {
82
+ "$gap": 8
83
+ }, canUsePersonalization && React.createElement(ImSpan, {
84
+ onClick: () => insertDynamicContent(editor)
85
+ }, React.createElement(PersonalizationIcon, null), "Personalization"), canUseEmoji && React.createElement(ImSpan, {
86
+ onClick: () => showDropArea({
87
+ type: 'emoji'
88
+ })
89
+ }, React.createElement(EmojiIcon, null), "Emoji")))
90
+ }, React.createElement(SlateEditable, {
91
+ minHeight: minHeight,
92
+ onFocus: () => {
93
+ setIsFocused(true);
94
+ const {
95
+ selection
96
+ } = editor;
97
+ if (selection) {
98
+ onSelectionChange(selection);
99
+ }
97
100
  }
98
- }
99
- }), showDrop && React.createElement(DropContent, {
100
- top: showDrop.yValue,
101
- left: showDrop.xValue
102
- }, showDrop.type === 'personalization' && (renderDynamicContent === null || renderDynamicContent === void 0 ? void 0 : renderDynamicContent({
103
- dc: getDcByPath(editor.children, showDrop.path).dc,
104
- onChange: newDC => {
105
- Transforms.setNodes(editor, {
106
- dc: newDC
107
- }, {
108
- at: showDrop.path
109
- });
110
- }
111
- })), showDrop.type === 'emoji' && React.createElement(EmojiPicker, {
112
- onEmojiSelect: s => editor.insertText(s)
113
- }))));
101
+ }), showDrop && React.createElement(DropContent, {
102
+ top: showDrop.yValue,
103
+ left: showDrop.xValue
104
+ }, showDrop.type === 'personalization' && (renderDynamicContent === null || renderDynamicContent === void 0 ? void 0 : renderDynamicContent({
105
+ dc: ((_getDcByPath = getDcByPath(editor.children, showDrop.path)) === null || _getDcByPath === void 0 ? void 0 : _getDcByPath.dc) || {},
106
+ onChange: newDC => {
107
+ Transforms.setNodes(editor, {
108
+ dc: newDC
109
+ }, {
110
+ at: showDrop.path
111
+ });
112
+ }
113
+ })), showDrop.type === 'emoji' && React.createElement(EmojiPicker, {
114
+ onEmojiSelect: s => editor.insertText(s)
115
+ })));
116
+ });
114
117
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/dumb-components",
3
- "version": "1.0.46",
3
+ "version": "1.0.47",
4
4
  "description": "React components to build Pushwoosh products",
5
5
  "main": "index.js",
6
6
  "module": "index.js",