@pushwoosh/dumb-components 1.1.135 → 1.1.136

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.
Files changed (144) hide show
  1. package/AccessForbidden/AccessForbidden.js +17 -11
  2. package/Alert/Alert.d.ts +1 -2
  3. package/Alert/Alert.js +31 -25
  4. package/ApplicationPreloader/ApplicationPreloader.d.ts +1 -2
  5. package/ApplicationPreloader/ApplicationPreloader.js +5 -4
  6. package/Badge/Badge.js +2 -2
  7. package/Banner/Banner.js +40 -24
  8. package/Button/Button.js +20 -9
  9. package/Button/RemoveButton.js +7 -6
  10. package/Calendar/CalendarDropdown/CalendarDropdown.js +121 -108
  11. package/Calendar/CalendarMonth/CalendarMonth.js +68 -66
  12. package/Calendar/CalendarMonthSlider/CalendarMonthSlider.d.ts +2 -2
  13. package/Calendar/CalendarMonthSlider/CalendarMonthSlider.js +68 -55
  14. package/Calendar/CalendarSuperForm/CalendarSuperForm.js +75 -70
  15. package/Calendar/CalendarSuperForm/components/CalendarRangePicker/CalendarRangePicker.d.ts +2 -2
  16. package/Calendar/CalendarSuperForm/components/CalendarRangePicker/CalendarRangePicker.js +3 -2
  17. package/Calendar/CalendarSuperForm/components/CalendarTimeAndTimezoneSection/CalendarTimeAndTimezoneSection.js +106 -88
  18. package/Calendar/CalendarSuperForm/components/CalendarTimeInput.d.ts +1 -2
  19. package/Calendar/CalendarSuperForm/components/CalendarTimeInput.js +2 -2
  20. package/Calendar/CalendarSuperForm/components/CalendarTimezoneSelect.js +3 -2
  21. package/CardMetric/CardChildren.js +9 -6
  22. package/CardMetric/CardCollapse.js +8 -6
  23. package/CardMetric/CardMetric.js +52 -33
  24. package/Checkbox/Checkbox.js +30 -24
  25. package/Chip/Chip.d.ts +6 -7
  26. package/Chip/Chip.js +22 -15
  27. package/CodeEditor/CodeEditor.d.ts +1 -2
  28. package/CodeEditor/CodeEditor.js +2 -2
  29. package/CrashScreen/CrashScreen.js +18 -10
  30. package/DateTimePicker/components/AutosizeInput/AutosizeInput.js +17 -13
  31. package/DateTimePicker/components/DatePicker/DatePicker.js +35 -32
  32. package/DateTimePicker/components/DatePickerField/DatePickerField.js +31 -24
  33. package/DateTimePicker/components/DateTimePicker/DateTimePicker.js +22 -20
  34. package/DateTimePicker/components/DateTimePickerField/DateTimePickerField.js +29 -24
  35. package/DateTimePicker/components/DecadeView/DecadeView.js +19 -17
  36. package/DateTimePicker/components/Input/Input.js +2 -2
  37. package/DateTimePicker/components/Month/Month.js +51 -35
  38. package/DateTimePicker/components/MonthView/MonthView.js +21 -17
  39. package/DateTimePicker/components/NumberPicker/NumberPicker.js +49 -40
  40. package/DateTimePicker/components/PickerPlate/PickerPlate.js +17 -14
  41. package/DateTimePicker/components/YearView/YearView.js +22 -18
  42. package/Drawer/components/Drawer/Drawer.js +18 -13
  43. package/Drawer/components/Drawer/styles.d.ts +2 -2
  44. package/Drawer/components/Drawer/styles.js +5 -4
  45. package/Drawer/components/DrawerDocs/DrawerDocs.js +25 -20
  46. package/DropdownMenu/components/DropdownMenu/DropdownMenu.js +28 -24
  47. package/DropdownMenu/components/DropdownMenuButton/DropdownMenuButton.js +8 -6
  48. package/DropdownMenu/components/DropdownMenuItem/DropdownMenuItem.js +6 -4
  49. package/DropdownMenu/components/DropdownMenuSection/DropdownMenuSection.js +13 -10
  50. package/DropdownMenu/components/DropdownMenuSubmenu/DropdownMenuSubmenu.js +40 -31
  51. package/EditableField/EditableField.js +55 -43
  52. package/EmailTemplatePreview/EmailTemplatePreview.js +10 -8
  53. package/EmailTemplatePreview/components/NoEmailTemplatePreview/NoEmailTemplatePreview.js +28 -22
  54. package/EnhancedInput/EnhancedInput.d.ts +3 -4
  55. package/EnhancedInput/EnhancedInput.js +14 -10
  56. package/EnhancedInput/SearchInput.js +3 -3
  57. package/ExportResult/ExportResult.js +33 -23
  58. package/ExternalImagePreview/ExternalImagePreview.js +24 -20
  59. package/FieldBox/FieldBox.js +50 -37
  60. package/FrequencyCapping/FrequencyCappingEdit.js +41 -33
  61. package/FrequencyCapping/FrequencyCappingInApps.js +41 -33
  62. package/FrequencyCapping/FrequencyCappingReadonly.d.ts +1 -2
  63. package/FrequencyCapping/FrequencyCappingReadonly.js +24 -20
  64. package/FrequencyCapping/components/Condition/index.d.ts +1 -2
  65. package/FrequencyCapping/components/Condition/index.js +24 -20
  66. package/FrequencyCapping/components/Description/index.d.ts +2 -2
  67. package/FrequencyCapping/components/Description/index.js +7 -5
  68. package/FrequencyCapping/components/Settings/EditCappingSettings.js +28 -20
  69. package/FrequencyCapping/components/Settings/EditInAppCappingSettings.js +86 -71
  70. package/FrequencyCapping/helpers/getReadonlyCappingHelpers.d.ts +1 -2
  71. package/FrequencyCapping/helpers/getReadonlyCappingHelpers.js +41 -32
  72. package/GetStartedPage/GetStartedPage.js +44 -25
  73. package/InputFile/InputFile.js +44 -35
  74. package/Link/Link.js +2 -2
  75. package/Modal/components/Modal/Modal.js +17 -12
  76. package/Modal/components/Modal/styles.js +5 -4
  77. package/Modal/components/ModalConfirm/ModalConfirm.js +33 -19
  78. package/Modal/components/ModalConfirm/ModalConfirmProvider.d.ts +2 -2
  79. package/Modal/components/ModalConfirm/ModalConfirmProvider.js +8 -6
  80. package/Modal/components/ModalTitle/ModalTitle.js +10 -8
  81. package/NotificationInbox/NotificationBar.js +19 -11
  82. package/NotificationInbox/NotificationBell.js +15 -12
  83. package/NotificationInbox/NotificationInbox.js +159 -118
  84. package/NumberPicker/NumberPicker.js +53 -44
  85. package/NumberPicker/components/AutosizeInput/AutosizeInput.js +19 -15
  86. package/PageHeader/components/AutosizeInput/AutosizeInput.js +30 -22
  87. package/PageHeader/components/PageHeader/PageHeader.js +44 -27
  88. package/PageHeader/components/PageHeaderEditable/PageHeaderEditable.js +51 -34
  89. package/PageHeader/components/PageHeaderError/PageHeaderError.js +17 -10
  90. package/PageHeader/components/PageHeaderSkeleton/PageHeaderSkeleton.js +20 -16
  91. package/Pagination/Pagination.js +60 -49
  92. package/Popover/Popover.js +6 -5
  93. package/ProgressBar/ProgressBar.js +25 -10
  94. package/PushPreview/PushPreview.js +30 -22
  95. package/PushPreview/components/MissedContentPreview/MissedContentPreview.js +22 -15
  96. package/PushPreview/components/SilentPushPreview/SilentPushPreview.js +20 -13
  97. package/Radio/Radio.js +32 -26
  98. package/RadioCard/RadioCard.js +17 -9
  99. package/ReCaptcha/ReCaptcha.js +2 -2
  100. package/RichMessageEditor/EditorEmojiPicker.js +9 -7
  101. package/RichMessageEditor/RichMessageEditor.js +77 -67
  102. package/RichMessageEditor/RichMessageViewer.js +19 -13
  103. package/RichMessageEditor/slate/DynamicContentElement.d.ts +1 -2
  104. package/RichMessageEditor/slate/DynamicContentElement.js +13 -9
  105. package/RichMessageEditor/slate/SlateEditor.js +9 -7
  106. package/RichmediaPreview/RichmediaPreview.js +13 -11
  107. package/Select/Select.js +10 -8
  108. package/SendRate/SendRateEdit.d.ts +1 -2
  109. package/SendRate/SendRateEdit.js +42 -34
  110. package/SendRate/SendRateReadonly.d.ts +1 -2
  111. package/SendRate/SendRateReadonly.js +24 -20
  112. package/SendRate/components/Condition/index.d.ts +1 -2
  113. package/SendRate/components/Condition/index.js +15 -13
  114. package/SendRate/components/Description/index.d.ts +2 -2
  115. package/SendRate/components/Description/index.js +30 -22
  116. package/SendRate/components/Settings/index.d.ts +1 -2
  117. package/SendRate/components/Settings/index.js +20 -14
  118. package/SendRate/helpers/getReadonlySendRateHelpers.d.ts +1 -2
  119. package/SendRate/helpers/getReadonlySendRateHelpers.js +39 -30
  120. package/Skeleton/TextSkeleton.js +5 -4
  121. package/SortButton/SortButton.js +11 -7
  122. package/Spinner/Spinner.js +7 -4
  123. package/StatisticCard/StatisticCard.js +44 -29
  124. package/Switch/Switch.js +16 -13
  125. package/Tabs/components/Tab/Tab.d.ts +3 -4
  126. package/Tabs/components/Tab/Tab.js +6 -4
  127. package/Tabs/components/TabBar/TabBar.d.ts +3 -4
  128. package/Tabs/components/TabBar/TabBar.js +12 -4
  129. package/Tabs/components/TabBarScrollableFrame/TabBarScrollableFrame.d.ts +1 -2
  130. package/Tabs/components/TabBarScrollableFrame/TabBarScrollableFrame.js +27 -21
  131. package/Tabs/components/TabBase/TabBase.d.ts +3 -4
  132. package/Tabs/components/TabBase/TabBase.js +11 -6
  133. package/Tabs/components/TabPanel/TabPanel.js +4 -2
  134. package/Tabs/components/Tabs/Tabs.js +8 -4
  135. package/Toast/Toast.js +31 -18
  136. package/Toast/ToastProvider.d.ts +2 -3
  137. package/Toast/ToastProvider.js +10 -8
  138. package/Tooltip/Tooltip.js +2 -2
  139. package/Tooltip/TooltipTrigger.js +13 -11
  140. package/package.json +2 -2
  141. package/polyglot/__tests__/render.test.js +46 -16
  142. package/polyglot/liquid/render.d.ts +2 -2
  143. package/polyglot/liquid/render.js +7 -6
  144. package/polyglot/react.js +7 -5
@@ -1,19 +1,26 @@
1
- import React from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Color } from '@pushwoosh/kit-constants';
3
3
  import { Vertical } from '@pushwoosh/kit-helpers';
4
4
  import { NotificationIcon } from '@pushwoosh/kit-icons';
5
5
  import { PushBox, IconContainer, PushTitle, PushDescription } from '../../styles';
6
6
  export function SilentPushPreview() {
7
- return React.createElement(PushBox, {
8
- view: "silent"
9
- }, React.createElement(IconContainer, null, React.createElement(NotificationIcon, {
10
- size: "small",
11
- view: "lined",
12
- type: "disabled",
13
- color: Color.CLEAR
14
- })), React.createElement(Vertical, null, React.createElement(PushTitle, {
15
- locked: true
16
- }, "Silent push notification"), React.createElement(PushDescription, {
17
- locked: true
18
- }, "There is no content to preview")));
7
+ return _jsxs(PushBox, {
8
+ view: "silent",
9
+ children: [_jsx(IconContainer, {
10
+ children: _jsx(NotificationIcon, {
11
+ size: "small",
12
+ view: "lined",
13
+ type: "disabled",
14
+ color: Color.CLEAR
15
+ })
16
+ }), _jsxs(Vertical, {
17
+ children: [_jsx(PushTitle, {
18
+ locked: true,
19
+ children: "Silent push notification"
20
+ }), _jsx(PushDescription, {
21
+ locked: true,
22
+ children: "There is no content to preview"
23
+ })]
24
+ })]
25
+ });
19
26
  }
package/Radio/Radio.js CHANGED
@@ -1,4 +1,5 @@
1
- import React, { useState } from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState } from 'react';
2
3
  import { Color } from '@pushwoosh/kit-constants';
3
4
  import { Horizontal } from '@pushwoosh/kit-helpers';
4
5
  import { InputContainer, NativeLabel, NativeRadio } from './styles';
@@ -25,36 +26,41 @@ export function Radio(props) {
25
26
  const newCounter = counter++;
26
27
  return `radio-id-${newCounter}`;
27
28
  });
28
- const radioMarkup = React.createElement(NativeLabel, {
29
+ const radioMarkup = _jsxs(NativeLabel, {
29
30
  htmlFor: localId,
30
31
  "$color": isDisabled ? Color.LOCKED : Color.MAIN,
31
- "$size": size
32
- }, React.createElement(InputContainer, {
33
32
  "$size": size,
34
- "$alignItems": "center",
35
- "$justifyContent": "center"
36
- }, React.createElement(NativeRadio, {
37
- type: "radio",
38
- id: localId,
39
- value: value,
40
- name: name,
41
- checked: isChecked,
42
- disabled: isDisabled,
43
- "$size": size,
44
- "$type": type,
45
- onChange: event => onChange === null || onChange === void 0 ? void 0 : onChange(event.currentTarget.value),
46
- onBlur: onBlur
47
- })), label && React.createElement("span", null, label));
33
+ children: [_jsx(InputContainer, {
34
+ "$size": size,
35
+ "$alignItems": "center",
36
+ "$justifyContent": "center",
37
+ children: _jsx(NativeRadio, {
38
+ type: "radio",
39
+ id: localId,
40
+ value: value,
41
+ name: name,
42
+ checked: isChecked,
43
+ disabled: isDisabled,
44
+ "$size": size,
45
+ "$type": type,
46
+ onChange: event => onChange === null || onChange === void 0 ? void 0 : onChange(event.currentTarget.value),
47
+ onBlur: onBlur
48
+ })
49
+ }), label && _jsx("span", {
50
+ children: label
51
+ })]
52
+ });
48
53
  if (tooltip) {
49
- return React.createElement(Horizontal, {
54
+ return _jsxs(Horizontal, {
50
55
  "$gap": 4,
51
- "$alignItems": "start"
52
- }, radioMarkup, React.createElement(TooltipTrigger, {
53
- content: tooltip,
54
- padding: size === 'compact' ? '0' : '4px 0',
55
- position: "top-middle",
56
- view: "question"
57
- }));
56
+ "$alignItems": "start",
57
+ children: [radioMarkup, _jsx(TooltipTrigger, {
58
+ content: tooltip,
59
+ padding: size === 'compact' ? '0' : '4px 0',
60
+ position: "top-middle",
61
+ view: "question"
62
+ })]
63
+ });
58
64
  }
59
65
  return radioMarkup;
60
66
  }
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Horizontal, Vertical } from '@pushwoosh/kit-helpers';
3
3
  import { H4, Paragraph } from '@pushwoosh/kit-typography';
4
4
  import { Radio } from '../Radio';
@@ -12,14 +12,22 @@ export function RadioCard(props) {
12
12
  onClick,
13
13
  children
14
14
  } = props;
15
- return React.createElement(RootBox, {
15
+ return _jsxs(RootBox, {
16
16
  "$width": width,
17
17
  isActive: isActive,
18
- onClick: onClick
19
- }, React.createElement(Vertical, null, React.createElement(Horizontal, {
20
- "$alignItems": "center",
21
- "$justifyContent": "space-between"
22
- }, React.createElement(H4, null, title), React.createElement(Radio, {
23
- isChecked: isActive
24
- })), React.createElement(Paragraph, null, description)), children);
18
+ onClick: onClick,
19
+ children: [_jsxs(Vertical, {
20
+ children: [_jsxs(Horizontal, {
21
+ "$alignItems": "center",
22
+ "$justifyContent": "space-between",
23
+ children: [_jsx(H4, {
24
+ children: title
25
+ }), _jsx(Radio, {
26
+ isChecked: isActive
27
+ })]
28
+ }), _jsx(Paragraph, {
29
+ children: description
30
+ })]
31
+ }), children]
32
+ });
25
33
  }
@@ -1,8 +1,8 @@
1
- import React from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { RECAPTCHA_CONTAINER_ID } from './constants';
3
3
  import { RecaptchaElement } from './styles';
4
4
  export function ReCaptcha() {
5
- return React.createElement(RecaptchaElement, {
5
+ return _jsx(RecaptchaElement, {
6
6
  id: RECAPTCHA_CONTAINER_ID
7
7
  });
8
8
  }
@@ -1,13 +1,15 @@
1
- import React from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { EditorEmojiPickerStyled } from './EditorEmojiPicker.styled';
3
3
  import { EmojiPicker } from '../EmojiPicker';
4
4
  export const EditorEmojiPicker = ({
5
5
  onEmojiSelect
6
6
  }) => {
7
- return React.createElement(EditorEmojiPickerStyled, null, React.createElement(EmojiPicker, {
8
- onEmojiSelect: emoji => {
9
- onEmojiSelect(emoji.native);
10
- },
11
- theme: "light"
12
- }));
7
+ return _jsx(EditorEmojiPickerStyled, {
8
+ children: _jsx(EmojiPicker, {
9
+ onEmojiSelect: emoji => {
10
+ onEmojiSelect(emoji.native);
11
+ },
12
+ theme: "light"
13
+ })
14
+ });
13
15
  };
@@ -1,6 +1,7 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  import { arrow, autoPlacement, offset, useFloating } from '@floating-ui/react-dom';
2
3
  import { isEqual } from 'es-toolkit';
3
- import React, { useEffect, useRef, useState } from 'react';
4
+ import { useEffect, useRef, useState } from 'react';
4
5
  import { Transforms } from 'slate';
5
6
  import { Collapse, elementAddListener, Horizontal, usePersistentFunction } from '@pushwoosh/kit-helpers';
6
7
  import { FieldBox } from '../FieldBox';
@@ -85,73 +86,82 @@ export const RichMessageEditor = ({
85
86
  }
86
87
  });
87
88
  }, [clickAwayHandler, isFocused, refs.reference]);
88
- return React.createElement(SlateEditor, {
89
+ return _jsx(SlateEditor, {
89
90
  initialValue: initialValue,
90
91
  onChange: onChange,
91
- onSelectionChange: onSelectionChange
92
- }, ({
93
- editor
94
- }) => {
95
- var _getDcByPath, _middlewareData$arrow, _middlewareData$arrow2;
96
- return React.createElement(FieldBox, {
97
- title: title,
98
- boxRef: refs.setReference,
99
- error: error,
100
- actions: React.createElement(Collapse, {
101
- expanded: isFocused
102
- }, React.createElement(Horizontal, {
103
- "$gap": 8
104
- }, canUsePersonalization && React.createElement(ImSpan, {
105
- onClick: () => setShowDrop({
106
- type: 'personalization'
107
- })
108
- }, React.createElement(PersonalizationIcon, null), "Personalization"), canUseEmoji && React.createElement(ImSpan, {
109
- onClick: () => setShowDrop({
110
- type: 'emoji'
111
- })
112
- }, React.createElement(EmojiIcon, null), "Emoji")))
113
- }, React.createElement(SlateEditable, {
114
- minHeight: minHeight,
115
- onFocus: () => {
116
- setIsFocused(true);
117
- const {
118
- selection
119
- } = editor;
120
- if (selection) {
121
- onSelectionChange(selection);
122
- }
123
- },
124
- onDelete: () => {
125
- setShowDrop(undefined);
126
- }
127
- }), showDrop && React.createElement(DropArea, {
128
- style: floatingStyles,
129
- ref: refs.setFloating,
130
- key: showDrop.type
131
- }, showDrop.type === 'personalization' && React.createElement(DropContent, null, renderDynamicContent === null || renderDynamicContent === void 0 ? void 0 : renderDynamicContent({
132
- dc: showDrop.path ? (_getDcByPath = getDcByPath(editor.children, showDrop.path)) === null || _getDcByPath === void 0 ? void 0 : _getDcByPath.dc : undefined,
133
- onChange: newDC => {
134
- if (showDrop.path) {
135
- Transforms.setNodes(editor, {
136
- dc: newDC
137
- }, {
138
- at: showDrop.path
139
- });
140
- } else {
141
- insertDynamicContent(editor, newDC);
142
- }
143
- },
144
- onClose,
145
- update
146
- })), showDrop.type === 'emoji' && React.createElement(EditorEmojiPicker, {
147
- onEmojiSelect: s => editor.insertText(s)
148
- }), React.createElement(Arrow, {
149
- "$direction": placementToDirection(placement),
150
- ref: arrowRef,
151
- style: {
152
- left: (_middlewareData$arrow = middlewareData.arrow) === null || _middlewareData$arrow === void 0 ? void 0 : _middlewareData$arrow.x,
153
- top: (_middlewareData$arrow2 = middlewareData.arrow) === null || _middlewareData$arrow2 === void 0 ? void 0 : _middlewareData$arrow2.y
154
- }
155
- }, React.createElement(ArrowIcon, null))));
92
+ onSelectionChange: onSelectionChange,
93
+ children: ({
94
+ editor
95
+ }) => {
96
+ var _getDcByPath, _middlewareData$arrow, _middlewareData$arrow2;
97
+ return _jsxs(FieldBox, {
98
+ title: title,
99
+ boxRef: refs.setReference,
100
+ error: error,
101
+ actions: _jsx(Collapse, {
102
+ expanded: isFocused,
103
+ children: _jsxs(Horizontal, {
104
+ "$gap": 8,
105
+ children: [canUsePersonalization && _jsxs(ImSpan, {
106
+ onClick: () => setShowDrop({
107
+ type: 'personalization'
108
+ }),
109
+ children: [_jsx(PersonalizationIcon, {}), "Personalization"]
110
+ }), canUseEmoji && _jsxs(ImSpan, {
111
+ onClick: () => setShowDrop({
112
+ type: 'emoji'
113
+ }),
114
+ children: [_jsx(EmojiIcon, {}), "Emoji"]
115
+ })]
116
+ })
117
+ }),
118
+ children: [_jsx(SlateEditable, {
119
+ minHeight: minHeight,
120
+ onFocus: () => {
121
+ setIsFocused(true);
122
+ const {
123
+ selection
124
+ } = editor;
125
+ if (selection) {
126
+ onSelectionChange(selection);
127
+ }
128
+ },
129
+ onDelete: () => {
130
+ setShowDrop(undefined);
131
+ }
132
+ }), showDrop && _jsxs(DropArea, {
133
+ style: floatingStyles,
134
+ ref: refs.setFloating,
135
+ children: [showDrop.type === 'personalization' && _jsx(DropContent, {
136
+ children: renderDynamicContent === null || renderDynamicContent === void 0 ? void 0 : renderDynamicContent({
137
+ dc: showDrop.path ? (_getDcByPath = getDcByPath(editor.children, showDrop.path)) === null || _getDcByPath === void 0 ? void 0 : _getDcByPath.dc : undefined,
138
+ onChange: newDC => {
139
+ if (showDrop.path) {
140
+ Transforms.setNodes(editor, {
141
+ dc: newDC
142
+ }, {
143
+ at: showDrop.path
144
+ });
145
+ } else {
146
+ insertDynamicContent(editor, newDC);
147
+ }
148
+ },
149
+ onClose,
150
+ update
151
+ })
152
+ }), showDrop.type === 'emoji' && _jsx(EditorEmojiPicker, {
153
+ onEmojiSelect: s => editor.insertText(s)
154
+ }), _jsx(Arrow, {
155
+ "$direction": placementToDirection(placement),
156
+ ref: arrowRef,
157
+ style: {
158
+ left: (_middlewareData$arrow = middlewareData.arrow) === null || _middlewareData$arrow === void 0 ? void 0 : _middlewareData$arrow.x,
159
+ top: (_middlewareData$arrow2 = middlewareData.arrow) === null || _middlewareData$arrow2 === void 0 ? void 0 : _middlewareData$arrow2.y
160
+ },
161
+ children: _jsx(ArrowIcon, {})
162
+ })]
163
+ }, showDrop.type)]
164
+ });
165
+ }
156
166
  });
157
167
  };
@@ -1,4 +1,5 @@
1
- import React, { Fragment, useMemo } from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Fragment, useMemo } from 'react';
2
3
  import { DynamicContentBracket, DynamicContentRoot, Paragraph } from './RichMessageViewer.styled';
3
4
  import { isElement, string2content } from './slate/helpers';
4
5
  export const RichMessageViewer = ({
@@ -13,9 +14,13 @@ export const RichMessageViewer = ({
13
14
  if (isElement(child) && child.type === 'dc') {
14
15
  return (
15
16
  // eslint-disable-next-line react/no-array-index-key
16
- React.createElement(DynamicContentRoot, {
17
- key: idx
18
- }, React.createElement(DynamicContentBracket, null, '{'), "\u00A0", child.dc.tagName, "\u00A0", React.createElement(DynamicContentBracket, null, '}'))
17
+ _jsxs(DynamicContentRoot, {
18
+ children: [_jsx(DynamicContentBracket, {
19
+ children: '{'
20
+ }), "\u00A0", child.dc.tagName, "\u00A0", _jsx(DynamicContentBracket, {
21
+ children: '}'
22
+ })]
23
+ }, idx)
19
24
  );
20
25
  }
21
26
  return child.text;
@@ -23,19 +28,20 @@ export const RichMessageViewer = ({
23
28
  if (flat) {
24
29
  return (
25
30
  // eslint-disable-next-line react/no-array-index-key
26
- React.createElement(Fragment, {
27
- key: index
28
- }, index > 0 && ' ', React.createElement("span", {
29
- dir: "auto"
30
- }, children))
31
+ _jsxs(Fragment, {
32
+ children: [index > 0 && ' ', _jsx("span", {
33
+ dir: "auto",
34
+ children: children
35
+ })]
36
+ }, index)
31
37
  );
32
38
  }
33
39
  return (
34
40
  // eslint-disable-next-line react/no-array-index-key
35
- React.createElement(Paragraph, {
36
- key: index,
37
- dir: "auto"
38
- }, children)
41
+ _jsx(Paragraph, {
42
+ dir: "auto",
43
+ children: children
44
+ }, index)
39
45
  );
40
46
  });
41
47
  };
@@ -1,2 +1 @@
1
- import React from 'react';
2
- export declare function renderElement(props: any, onDelete: () => void): React.JSX.Element;
1
+ export declare function renderElement(props: any, onDelete: () => void): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Transforms } from 'slate';
3
3
  import { useSelected, useSlateStatic } from 'slate-react';
4
4
  import { findPath } from './helpers';
@@ -14,7 +14,7 @@ const DynamicContentElementComponent = ({
14
14
  const {
15
15
  tagName
16
16
  } = element.dc;
17
- return React.createElement(Chip, {
17
+ return _jsxs(Chip, {
18
18
  ...attributes,
19
19
  as: "span",
20
20
  contentEditable: false,
@@ -40,8 +40,11 @@ const DynamicContentElementComponent = ({
40
40
  });
41
41
  }
42
42
  onDelete();
43
- }
44
- }, React.createElement("span", null, tagName || 'Not set'), children);
43
+ },
44
+ children: [_jsx("span", {
45
+ children: tagName || 'Not set'
46
+ }), children]
47
+ });
45
48
  };
46
49
  const Element = props => {
47
50
  const {
@@ -52,18 +55,19 @@ const Element = props => {
52
55
  } = props;
53
56
  switch (element.type) {
54
57
  case 'dc':
55
- return React.createElement(DynamicContentElementComponent, {
58
+ return _jsx(DynamicContentElementComponent, {
56
59
  ...props,
57
60
  onDelete: onDelete
58
61
  });
59
62
  default:
60
- return React.createElement("p", {
61
- ...attributes
62
- }, children);
63
+ return _jsx("p", {
64
+ ...attributes,
65
+ children: children
66
+ });
63
67
  }
64
68
  };
65
69
  export function renderElement(props, onDelete) {
66
- return React.createElement(Element, {
70
+ return _jsx(Element, {
67
71
  ...props,
68
72
  onDelete: onDelete
69
73
  });
@@ -1,4 +1,5 @@
1
- import React, { useState } from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useState } from 'react';
2
3
  import { Slate } from 'slate-react';
3
4
  import { usePersistentFunction } from '@pushwoosh/kit-helpers';
4
5
  import { renderElement } from './DynamicContentElement';
@@ -13,14 +14,15 @@ export const SlateEditor = ({
13
14
  }) => {
14
15
  const [initialValue] = useState(() => string2content(initialValueString));
15
16
  const [editor] = useState(createMKEditor);
16
- return React.createElement(Slate, {
17
+ return _jsx(Slate, {
17
18
  editor: editor,
18
19
  initialValue: initialValue,
19
20
  onValueChange: value => onChange(content2string(value)),
20
- onSelectionChange: onSelectionChange
21
- }, children({
22
- editor
23
- }));
21
+ onSelectionChange: onSelectionChange,
22
+ children: children({
23
+ editor
24
+ })
25
+ });
24
26
  };
25
27
  export const SlateEditable = ({
26
28
  minHeight,
@@ -30,7 +32,7 @@ export const SlateEditable = ({
30
32
  const renderElementPersistent = usePersistentFunction(props => {
31
33
  return renderElement(props, onDelete);
32
34
  });
33
- return React.createElement(EditableStyled, {
35
+ return _jsx(EditableStyled, {
34
36
  "$minHeight": minHeight,
35
37
  renderElement: renderElementPersistent,
36
38
  onFocus: onFocus
@@ -1,4 +1,5 @@
1
- import React, { useRef, useEffect } from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useRef, useEffect } from 'react';
2
3
  import { Color } from '@pushwoosh/kit-constants';
3
4
  import { Spinner } from '../Spinner';
4
5
  import { useRichmediaHtml } from './hooks';
@@ -32,17 +33,18 @@ export function RichmediaPreview(props) {
32
33
  $ref.current.contentWindow.document.write(richmediaHtml);
33
34
  $ref.current.contentWindow.document.close();
34
35
  }, [$ref, richmediaHtml]);
35
- return React.createElement(RichMediaPreviewContainer, {
36
+ return _jsx(RichMediaPreviewContainer, {
36
37
  width: width,
37
38
  height: height,
38
39
  "$isLoading": isLoading,
39
- "$placeItems": "center"
40
- }, isLoading ? React.createElement(Spinner, {
41
- size: "medium",
42
- color: Color.LOCKED
43
- }) : React.createElement(RichMediaPreviewIframe, {
44
- ref: $ref,
45
- title: name,
46
- sandbox: "allow-same-origin allow-scripts"
47
- }));
40
+ "$placeItems": "center",
41
+ children: isLoading ? _jsx(Spinner, {
42
+ size: "medium",
43
+ color: Color.LOCKED
44
+ }) : _jsx(RichMediaPreviewIframe, {
45
+ ref: $ref,
46
+ title: name,
47
+ sandbox: "allow-same-origin allow-scripts"
48
+ })
49
+ });
48
50
  }
package/Select/Select.js CHANGED
@@ -1,14 +1,16 @@
1
- import React from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { CloseIcon } from '@pushwoosh/kit-icons';
3
3
  import { CLASS_NAME_PREFIX } from './constants';
4
4
  import { SelectStyled, SelectAsyncStyled, SelectCreatableStyled, ClearIndicatorBox } from './styles';
5
5
  const componentsProps = {
6
6
  ClearIndicator: ({
7
7
  clearValue
8
- }) => React.createElement(ClearIndicatorBox, null, React.createElement(CloseIcon, {
9
- size: "small",
10
- onClick: clearValue
11
- }))
8
+ }) => _jsx(ClearIndicatorBox, {
9
+ children: _jsx(CloseIcon, {
10
+ size: "small",
11
+ onClick: clearValue
12
+ })
13
+ })
12
14
  };
13
15
  export function Select(props) {
14
16
  const {
@@ -18,7 +20,7 @@ export function Select(props) {
18
20
  ...props,
19
21
  classNamePrefix
20
22
  };
21
- return React.createElement(SelectStyled, {
23
+ return _jsx(SelectStyled, {
22
24
  components: componentsProps,
23
25
  ...customProps
24
26
  });
@@ -31,7 +33,7 @@ export function SelectAsync(props) {
31
33
  ...props,
32
34
  classNamePrefix
33
35
  };
34
- return React.createElement(SelectAsyncStyled, {
36
+ return _jsx(SelectAsyncStyled, {
35
37
  components: componentsProps,
36
38
  ...customProps
37
39
  });
@@ -44,7 +46,7 @@ export function CreatableSelect(props) {
44
46
  ...props,
45
47
  classNamePrefix
46
48
  };
47
- return React.createElement(SelectCreatableStyled, {
49
+ return _jsx(SelectCreatableStyled, {
48
50
  components: componentsProps,
49
51
  ...customProps
50
52
  });
@@ -1,3 +1,2 @@
1
- import React from 'react';
2
1
  import { type SendRateEditProps, type SendRateBase } from './types';
3
- export declare function SendRateEdit<T extends SendRateBase>({ sendRate, globalSendRate, onChange, applicationCode, minValue, maxValue, editGlobalClicked, }: SendRateEditProps<T>): React.JSX.Element;
2
+ export declare function SendRateEdit<T extends SendRateBase>({ sendRate, globalSendRate, onChange, applicationCode, minValue, maxValue, editGlobalClicked, }: SendRateEditProps<T>): import("react/jsx-runtime").JSX.Element;