@pushwoosh/dumb-components 1.1.134 → 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 (217) hide show
  1. package/AccessForbidden/AccessForbidden.js +19 -5
  2. package/AccessForbidden/polyglot/index.d.ts +2 -0
  3. package/AccessForbidden/polyglot/index.js +10 -0
  4. package/AccessForbidden/polyglot/messages_en.d.ts +3 -0
  5. package/AccessForbidden/polyglot/messages_en.js +4 -0
  6. package/AccessForbidden/polyglot/messages_ru.d.ts +3 -0
  7. package/AccessForbidden/polyglot/messages_ru.js +4 -0
  8. package/AccessForbidden/polyglot/types.d.ts +5 -0
  9. package/AccessForbidden/polyglot/types.js +1 -0
  10. package/Alert/Alert.d.ts +1 -2
  11. package/Alert/Alert.js +31 -25
  12. package/ApplicationPreloader/ApplicationPreloader.d.ts +1 -2
  13. package/ApplicationPreloader/ApplicationPreloader.js +5 -4
  14. package/Badge/Badge.js +2 -2
  15. package/Banner/Banner.js +40 -24
  16. package/Button/Button.js +20 -9
  17. package/Button/RemoveButton.js +7 -6
  18. package/Calendar/CalendarDropdown/CalendarDropdown.js +121 -108
  19. package/Calendar/CalendarMonth/CalendarMonth.js +68 -66
  20. package/Calendar/CalendarMonthSlider/CalendarMonthSlider.d.ts +2 -2
  21. package/Calendar/CalendarMonthSlider/CalendarMonthSlider.js +68 -55
  22. package/Calendar/CalendarSuperForm/CalendarSuperForm.js +75 -70
  23. package/Calendar/CalendarSuperForm/components/CalendarRangePicker/CalendarRangePicker.d.ts +2 -2
  24. package/Calendar/CalendarSuperForm/components/CalendarRangePicker/CalendarRangePicker.js +3 -2
  25. package/Calendar/CalendarSuperForm/components/CalendarTimeAndTimezoneSection/CalendarTimeAndTimezoneSection.js +106 -88
  26. package/Calendar/CalendarSuperForm/components/CalendarTimeInput.d.ts +1 -2
  27. package/Calendar/CalendarSuperForm/components/CalendarTimeInput.js +2 -2
  28. package/Calendar/CalendarSuperForm/components/CalendarTimezoneSelect.js +3 -2
  29. package/CardMetric/CardChildren.js +9 -6
  30. package/CardMetric/CardCollapse.js +8 -6
  31. package/CardMetric/CardMetric.js +52 -33
  32. package/Checkbox/Checkbox.js +30 -24
  33. package/Chip/Chip.d.ts +6 -7
  34. package/Chip/Chip.js +22 -15
  35. package/CodeEditor/CodeEditor.d.ts +1 -2
  36. package/CodeEditor/CodeEditor.js +2 -2
  37. package/CrashScreen/CrashScreen.js +19 -6
  38. package/CrashScreen/polyglot/index.d.ts +2 -0
  39. package/CrashScreen/polyglot/index.js +10 -0
  40. package/CrashScreen/polyglot/messages_en.d.ts +3 -0
  41. package/CrashScreen/polyglot/messages_en.js +4 -0
  42. package/CrashScreen/polyglot/messages_ru.d.ts +3 -0
  43. package/CrashScreen/polyglot/messages_ru.js +4 -0
  44. package/CrashScreen/polyglot/types.d.ts +5 -0
  45. package/CrashScreen/polyglot/types.js +1 -0
  46. package/DateTimePicker/components/AutosizeInput/AutosizeInput.js +17 -13
  47. package/DateTimePicker/components/DatePicker/DatePicker.js +35 -32
  48. package/DateTimePicker/components/DatePickerField/DatePickerField.js +32 -22
  49. package/DateTimePicker/components/DateTimePicker/DateTimePicker.js +22 -20
  50. package/DateTimePicker/components/DateTimePickerField/DateTimePickerField.js +30 -22
  51. package/DateTimePicker/components/DecadeView/DecadeView.js +19 -17
  52. package/DateTimePicker/components/Input/Input.js +2 -2
  53. package/DateTimePicker/components/Month/Month.js +52 -21
  54. package/DateTimePicker/components/MonthView/MonthView.js +21 -17
  55. package/DateTimePicker/components/NumberPicker/NumberPicker.js +49 -40
  56. package/DateTimePicker/components/PickerPlate/PickerPlate.js +17 -14
  57. package/DateTimePicker/components/YearView/YearView.js +22 -18
  58. package/DateTimePicker/polyglot/index.d.ts +2 -0
  59. package/DateTimePicker/polyglot/index.js +9 -0
  60. package/DateTimePicker/polyglot/messages_en.d.ts +3 -0
  61. package/DateTimePicker/polyglot/messages_en.js +11 -0
  62. package/DateTimePicker/polyglot/messages_ru.d.ts +3 -0
  63. package/DateTimePicker/polyglot/messages_ru.js +11 -0
  64. package/DateTimePicker/polyglot/types.d.ts +12 -0
  65. package/DateTimePicker/polyglot/types.js +1 -0
  66. package/Drawer/components/Drawer/Drawer.js +18 -13
  67. package/Drawer/components/Drawer/styles.d.ts +2 -2
  68. package/Drawer/components/Drawer/styles.js +5 -4
  69. package/Drawer/components/DrawerDocs/DrawerDocs.js +28 -17
  70. package/Drawer/polyglot/index.d.ts +2 -0
  71. package/Drawer/polyglot/index.js +10 -0
  72. package/Drawer/polyglot/messages_en.d.ts +3 -0
  73. package/Drawer/polyglot/messages_en.js +4 -0
  74. package/Drawer/polyglot/messages_ru.d.ts +3 -0
  75. package/Drawer/polyglot/messages_ru.js +4 -0
  76. package/Drawer/polyglot/types.d.ts +5 -0
  77. package/Drawer/polyglot/types.js +1 -0
  78. package/DropdownMenu/components/DropdownMenu/DropdownMenu.js +28 -24
  79. package/DropdownMenu/components/DropdownMenuButton/DropdownMenuButton.js +8 -6
  80. package/DropdownMenu/components/DropdownMenuItem/DropdownMenuItem.js +6 -4
  81. package/DropdownMenu/components/DropdownMenuSection/DropdownMenuSection.js +13 -10
  82. package/DropdownMenu/components/DropdownMenuSubmenu/DropdownMenuSubmenu.js +40 -31
  83. package/EditableField/EditableField.js +56 -39
  84. package/EditableField/polyglot/index.d.ts +2 -0
  85. package/EditableField/polyglot/index.js +9 -0
  86. package/EditableField/polyglot/messages_en.d.ts +3 -0
  87. package/EditableField/polyglot/messages_en.js +4 -0
  88. package/EditableField/polyglot/messages_ru.d.ts +3 -0
  89. package/EditableField/polyglot/messages_ru.js +4 -0
  90. package/EditableField/polyglot/types.d.ts +5 -0
  91. package/EditableField/polyglot/types.js +1 -0
  92. package/EmailTemplatePreview/EmailTemplatePreview.js +10 -8
  93. package/EmailTemplatePreview/components/NoEmailTemplatePreview/NoEmailTemplatePreview.js +30 -16
  94. package/EmailTemplatePreview/polyglot/index.d.ts +2 -0
  95. package/EmailTemplatePreview/polyglot/index.js +10 -0
  96. package/EmailTemplatePreview/polyglot/messages_en.d.ts +3 -0
  97. package/EmailTemplatePreview/polyglot/messages_en.js +5 -0
  98. package/EmailTemplatePreview/polyglot/messages_ru.d.ts +3 -0
  99. package/EmailTemplatePreview/polyglot/messages_ru.js +5 -0
  100. package/EmailTemplatePreview/polyglot/types.d.ts +6 -0
  101. package/EmailTemplatePreview/polyglot/types.js +1 -0
  102. package/EnhancedInput/EnhancedInput.d.ts +3 -4
  103. package/EnhancedInput/EnhancedInput.js +14 -10
  104. package/EnhancedInput/SearchInput.js +3 -3
  105. package/ExportResult/ExportResult.js +33 -23
  106. package/ExternalImagePreview/ExternalImagePreview.js +24 -20
  107. package/FieldBox/FieldBox.js +50 -37
  108. package/FrequencyCapping/FrequencyCappingEdit.js +41 -33
  109. package/FrequencyCapping/FrequencyCappingInApps.js +41 -33
  110. package/FrequencyCapping/FrequencyCappingReadonly.d.ts +1 -2
  111. package/FrequencyCapping/FrequencyCappingReadonly.js +24 -20
  112. package/FrequencyCapping/components/Condition/index.d.ts +1 -2
  113. package/FrequencyCapping/components/Condition/index.js +24 -20
  114. package/FrequencyCapping/components/Description/index.d.ts +2 -2
  115. package/FrequencyCapping/components/Description/index.js +7 -5
  116. package/FrequencyCapping/components/Settings/EditCappingSettings.js +28 -20
  117. package/FrequencyCapping/components/Settings/EditInAppCappingSettings.js +86 -71
  118. package/FrequencyCapping/helpers/getReadonlyCappingHelpers.d.ts +1 -2
  119. package/FrequencyCapping/helpers/getReadonlyCappingHelpers.js +41 -32
  120. package/GetStartedPage/GetStartedPage.js +44 -25
  121. package/InputFile/InputFile.js +44 -35
  122. package/Link/Link.js +2 -2
  123. package/Modal/components/Modal/Modal.js +17 -12
  124. package/Modal/components/Modal/styles.js +5 -4
  125. package/Modal/components/ModalConfirm/ModalConfirm.js +51 -24
  126. package/Modal/components/ModalConfirm/ModalConfirmProvider.d.ts +2 -2
  127. package/Modal/components/ModalConfirm/ModalConfirmProvider.js +8 -6
  128. package/Modal/components/ModalConfirm/types.d.ts +1 -1
  129. package/Modal/components/ModalTitle/ModalTitle.js +10 -8
  130. package/Modal/polyglot/index.d.ts +2 -0
  131. package/Modal/polyglot/index.js +9 -0
  132. package/Modal/polyglot/messages_en.d.ts +3 -0
  133. package/Modal/polyglot/messages_en.js +6 -0
  134. package/Modal/polyglot/messages_ru.d.ts +3 -0
  135. package/Modal/polyglot/messages_ru.js +6 -0
  136. package/Modal/polyglot/types.d.ts +7 -0
  137. package/Modal/polyglot/types.js +1 -0
  138. package/NotificationInbox/NotificationBar.js +19 -11
  139. package/NotificationInbox/NotificationBell.js +21 -12
  140. package/NotificationInbox/NotificationInbox.js +160 -105
  141. package/NotificationInbox/polyglot/index.d.ts +2 -0
  142. package/NotificationInbox/polyglot/index.js +10 -0
  143. package/NotificationInbox/polyglot/messages_en.d.ts +3 -0
  144. package/NotificationInbox/polyglot/messages_en.js +8 -0
  145. package/NotificationInbox/polyglot/messages_ru.d.ts +3 -0
  146. package/NotificationInbox/polyglot/messages_ru.js +8 -0
  147. package/NotificationInbox/polyglot/types.d.ts +11 -0
  148. package/NotificationInbox/polyglot/types.js +1 -0
  149. package/NumberPicker/NumberPicker.js +53 -44
  150. package/NumberPicker/components/AutosizeInput/AutosizeInput.js +19 -15
  151. package/PageHeader/components/AutosizeInput/AutosizeInput.js +30 -22
  152. package/PageHeader/components/PageHeader/PageHeader.js +44 -27
  153. package/PageHeader/components/PageHeaderEditable/PageHeaderEditable.js +51 -34
  154. package/PageHeader/components/PageHeaderError/PageHeaderError.js +17 -10
  155. package/PageHeader/components/PageHeaderSkeleton/PageHeaderSkeleton.js +20 -16
  156. package/Pagination/Pagination.js +60 -49
  157. package/Popover/Popover.js +6 -5
  158. package/ProgressBar/ProgressBar.js +25 -10
  159. package/PushPreview/PushPreview.js +30 -22
  160. package/PushPreview/components/MissedContentPreview/MissedContentPreview.js +23 -11
  161. package/PushPreview/components/SilentPushPreview/SilentPushPreview.js +20 -13
  162. package/PushPreview/polyglot/index.d.ts +2 -0
  163. package/PushPreview/polyglot/index.js +9 -0
  164. package/PushPreview/polyglot/messages_en.d.ts +3 -0
  165. package/PushPreview/polyglot/messages_en.js +4 -0
  166. package/PushPreview/polyglot/messages_ru.d.ts +3 -0
  167. package/PushPreview/polyglot/messages_ru.js +4 -0
  168. package/PushPreview/polyglot/types.d.ts +5 -0
  169. package/PushPreview/polyglot/types.js +1 -0
  170. package/Radio/Radio.js +32 -26
  171. package/RadioCard/RadioCard.js +17 -9
  172. package/ReCaptcha/ReCaptcha.js +2 -2
  173. package/RichMessageEditor/EditorEmojiPicker.js +9 -7
  174. package/RichMessageEditor/RichMessageEditor.js +77 -67
  175. package/RichMessageEditor/RichMessageViewer.js +19 -13
  176. package/RichMessageEditor/slate/DynamicContentElement.d.ts +1 -2
  177. package/RichMessageEditor/slate/DynamicContentElement.js +13 -9
  178. package/RichMessageEditor/slate/SlateEditor.js +9 -7
  179. package/RichmediaPreview/RichmediaPreview.js +13 -11
  180. package/Select/Select.js +10 -8
  181. package/SendRate/SendRateEdit.d.ts +1 -2
  182. package/SendRate/SendRateEdit.js +42 -34
  183. package/SendRate/SendRateReadonly.d.ts +1 -2
  184. package/SendRate/SendRateReadonly.js +24 -20
  185. package/SendRate/components/Condition/index.d.ts +1 -2
  186. package/SendRate/components/Condition/index.js +15 -13
  187. package/SendRate/components/Description/index.d.ts +2 -2
  188. package/SendRate/components/Description/index.js +30 -22
  189. package/SendRate/components/Settings/index.d.ts +1 -2
  190. package/SendRate/components/Settings/index.js +20 -14
  191. package/SendRate/helpers/getReadonlySendRateHelpers.d.ts +1 -2
  192. package/SendRate/helpers/getReadonlySendRateHelpers.js +39 -30
  193. package/Skeleton/TextSkeleton.js +5 -4
  194. package/SortButton/SortButton.js +11 -7
  195. package/Spinner/Spinner.js +7 -4
  196. package/StatisticCard/StatisticCard.js +44 -29
  197. package/Switch/Switch.js +16 -13
  198. package/Tabs/components/Tab/Tab.d.ts +3 -4
  199. package/Tabs/components/Tab/Tab.js +6 -4
  200. package/Tabs/components/TabBar/TabBar.d.ts +3 -4
  201. package/Tabs/components/TabBar/TabBar.js +12 -4
  202. package/Tabs/components/TabBarScrollableFrame/TabBarScrollableFrame.d.ts +1 -2
  203. package/Tabs/components/TabBarScrollableFrame/TabBarScrollableFrame.js +27 -21
  204. package/Tabs/components/TabBase/TabBase.d.ts +3 -4
  205. package/Tabs/components/TabBase/TabBase.js +11 -6
  206. package/Tabs/components/TabPanel/TabPanel.js +4 -2
  207. package/Tabs/components/Tabs/Tabs.js +8 -4
  208. package/Toast/Toast.js +31 -18
  209. package/Toast/ToastProvider.d.ts +2 -3
  210. package/Toast/ToastProvider.js +10 -8
  211. package/Tooltip/Tooltip.js +2 -2
  212. package/Tooltip/TooltipTrigger.js +13 -11
  213. package/package.json +2 -2
  214. package/polyglot/__tests__/render.test.js +46 -16
  215. package/polyglot/liquid/render.d.ts +2 -2
  216. package/polyglot/liquid/render.js +7 -6
  217. package/polyglot/react.js +7 -5
@@ -1,10 +1,12 @@
1
- import React, { useRef } from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useRef } from 'react';
2
3
  import { Color } from '@pushwoosh/kit-constants';
3
4
  import { Vertical } from '@pushwoosh/kit-helpers';
4
5
  import { DropdownIcon, EditIcon } from '@pushwoosh/kit-icons';
5
6
  import { Button } from '../Button';
6
7
  import { useOnClickOutside } from '../hooks';
7
8
  import { Popover, PopoverContainer } from '../Popover';
9
+ import { Lang } from './polyglot';
8
10
  import { FieldBox, TitleBox, ButtonsGroup } from './styles';
9
11
  export function EditableField({
10
12
  value,
@@ -22,42 +24,57 @@ export function EditableField({
22
24
  const rootRef = useRef(null);
23
25
  const buttonRef = useRef(null);
24
26
  useOnClickOutside(rootRef, onCancel);
25
- return React.createElement(PopoverContainer, {
26
- ref: rootRef
27
- }, React.createElement(FieldBox, {
28
- open: open,
29
- onClick: onToggleOpen,
30
- ref: buttonRef
31
- }, React.createElement("span", null, value), open ? React.createElement(DropdownIcon, {
32
- direction: "up",
33
- size: "small",
34
- color: Color.CLEAR
35
- }) : React.createElement(EditIcon, {
36
- view: "lined",
37
- size: "small"
38
- })), React.createElement(Popover, {
39
- open: open,
40
- position: position,
41
- anchorEl: buttonRef,
42
- windowWidth: width,
43
- internalWindowRef: rootRef,
44
- loading: loading,
45
- zIndex: zIndex
46
- }, React.createElement(Vertical, {
47
- "$padding": 16
48
- }, title && React.createElement(TitleBox, null, title), children, React.createElement(ButtonsGroup, {
49
- "$isLoading": loading
50
- }, React.createElement(Button, {
51
- view: "shape",
52
- color: "primary",
53
- size: "compact",
54
- isLoading: loading,
55
- onClick: onSubmit
56
- }, "Submit"), React.createElement(Button, {
57
- view: "shape",
58
- color: "secondary",
59
- size: "compact",
60
- isDisabled: loading,
61
- onClick: onCancel
62
- }, "Cancel")))));
27
+ return _jsxs(PopoverContainer, {
28
+ ref: rootRef,
29
+ children: [_jsxs(FieldBox, {
30
+ open: open,
31
+ onClick: onToggleOpen,
32
+ ref: buttonRef,
33
+ children: [_jsx("span", {
34
+ children: value
35
+ }), open ? _jsx(DropdownIcon, {
36
+ direction: "up",
37
+ size: "small",
38
+ color: Color.CLEAR
39
+ }) : _jsx(EditIcon, {
40
+ view: "lined",
41
+ size: "small"
42
+ })]
43
+ }), _jsx(Popover, {
44
+ open: open,
45
+ position: position,
46
+ anchorEl: buttonRef,
47
+ windowWidth: width,
48
+ internalWindowRef: rootRef,
49
+ loading: loading,
50
+ zIndex: zIndex,
51
+ children: _jsxs(Vertical, {
52
+ "$padding": 16,
53
+ children: [title && _jsx(TitleBox, {
54
+ children: title
55
+ }), children, _jsxs(ButtonsGroup, {
56
+ "$isLoading": loading,
57
+ children: [_jsx(Button, {
58
+ view: "shape",
59
+ color: "primary",
60
+ size: "compact",
61
+ isLoading: loading,
62
+ onClick: onSubmit,
63
+ children: _jsx(Lang, {
64
+ message: "DUMB.EDITABLE_FIELD.SUBMIT"
65
+ })
66
+ }), _jsx(Button, {
67
+ view: "shape",
68
+ color: "secondary",
69
+ size: "compact",
70
+ isDisabled: loading,
71
+ onClick: onCancel,
72
+ children: _jsx(Lang, {
73
+ message: "DUMB.EDITABLE_FIELD.CANCEL"
74
+ })
75
+ })]
76
+ })]
77
+ })
78
+ })]
79
+ });
63
80
  }
@@ -0,0 +1,2 @@
1
+ import { type EditableFieldMessages } from './types';
2
+ export declare const Lang: import("react").FC<import("../../polyglot").LangProps<EditableFieldMessages>>;
@@ -0,0 +1,9 @@
1
+ import { messages as en } from './messages_en';
2
+ import { messages as ru } from './messages_ru';
3
+ import { createLang } from '../../polyglot';
4
+ export const {
5
+ Lang
6
+ } = createLang({
7
+ en,
8
+ ru
9
+ });
@@ -0,0 +1,3 @@
1
+ import { type EditableFieldMessages } from './types';
2
+ import type { LangMessages } from '../../polyglot';
3
+ export declare const messages: LangMessages<EditableFieldMessages>;
@@ -0,0 +1,4 @@
1
+ export const messages = {
2
+ 'DUMB.EDITABLE_FIELD.SUBMIT': 'Submit',
3
+ 'DUMB.EDITABLE_FIELD.CANCEL': 'Cancel'
4
+ };
@@ -0,0 +1,3 @@
1
+ import { type EditableFieldMessages } from './types';
2
+ import type { LangMessages } from '../../polyglot';
3
+ export declare const messages: LangMessages<EditableFieldMessages>;
@@ -0,0 +1,4 @@
1
+ export const messages = {
2
+ 'DUMB.EDITABLE_FIELD.SUBMIT': 'Сохранить',
3
+ 'DUMB.EDITABLE_FIELD.CANCEL': 'Отмена'
4
+ };
@@ -0,0 +1,5 @@
1
+ import type { NoParams } from '../../polyglot';
2
+ export type EditableFieldMessages = {
3
+ 'DUMB.EDITABLE_FIELD.SUBMIT': NoParams;
4
+ 'DUMB.EDITABLE_FIELD.CANCEL': NoParams;
5
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,6 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
1
2
  import { Liquid } from 'liquidjs';
2
- import React, { useMemo, useState } from 'react';
3
+ import { useMemo, useState } from 'react';
3
4
  import { replaceLocalization, replacePlaceholders } from './helpers';
4
5
  import { IframeStyled } from './styles';
5
6
  const createLiquidInstance = () => {
@@ -37,13 +38,14 @@ export function EmailTemplatePreview(props) {
37
38
  return `<body style="font-size: 24px; color: darkred">${e.message}</body>`;
38
39
  }
39
40
  }, [template, localization, values, liquidInstance]);
40
- return React.createElement(IframeStyled, {
41
+ return _jsx(IframeStyled, {
41
42
  "$scale": scale,
42
43
  "$width": width,
43
- "$height": height
44
- }, React.createElement("iframe", {
45
- srcDoc: src,
46
- sandbox: "allow-same-origin",
47
- title: "preview"
48
- }));
44
+ "$height": height,
45
+ children: _jsx("iframe", {
46
+ srcDoc: src,
47
+ sandbox: "allow-same-origin",
48
+ title: "preview"
49
+ })
50
+ });
49
51
  }
@@ -1,24 +1,38 @@
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 { Text } from '@pushwoosh/kit-typography';
5
5
  import Email from './assets/email.svg?url';
6
6
  import { Container, PreviewMock } from './styles';
7
+ import { Lang, useLang } from '../../polyglot';
7
8
  export function NoEmailTemplatePreview() {
8
- return React.createElement(Container, {
9
+ const lang = useLang();
10
+ return _jsxs(Container, {
9
11
  "$padding": "12px 12px 24px",
10
- "$gap": 12
11
- }, React.createElement(PreviewMock, {
12
- "$alignItems": "center",
13
- "$justifyContent": "center"
14
- }, React.createElement("img", {
15
- src: Email,
16
- alt: "Email envelop icon"
17
- })), React.createElement(Vertical, null, React.createElement(Text, {
18
- "$variant": "footnote",
19
- "$color": Color.LOCKED
20
- }, "Content missed..."), React.createElement(Text, {
21
- "$variant": "footnote",
22
- "$color": Color.LOCKED
23
- }, "Might be old data or deleted presets")));
12
+ "$gap": 12,
13
+ children: [_jsx(PreviewMock, {
14
+ "$alignItems": "center",
15
+ "$justifyContent": "center",
16
+ children: _jsx("img", {
17
+ src: Email,
18
+ alt: lang({
19
+ message: 'DUMB.EMAIL_TEMPLATE_PREVIEW.ALT'
20
+ })
21
+ })
22
+ }), _jsxs(Vertical, {
23
+ children: [_jsx(Text, {
24
+ "$variant": "footnote",
25
+ "$color": Color.LOCKED,
26
+ children: _jsx(Lang, {
27
+ message: "DUMB.EMAIL_TEMPLATE_PREVIEW.CONTENT_MISSED"
28
+ })
29
+ }), _jsx(Text, {
30
+ "$variant": "footnote",
31
+ "$color": Color.LOCKED,
32
+ children: _jsx(Lang, {
33
+ message: "DUMB.EMAIL_TEMPLATE_PREVIEW.HINT"
34
+ })
35
+ })]
36
+ })]
37
+ });
24
38
  }
@@ -0,0 +1,2 @@
1
+ import { type EmailTemplatePreviewMessages } from './types';
2
+ export declare const Lang: import("react").FC<import("../../polyglot").LangProps<EmailTemplatePreviewMessages>>, useLang: () => (props: import("../../polyglot").LangProps<EmailTemplatePreviewMessages>) => string;
@@ -0,0 +1,10 @@
1
+ import { messages as en } from './messages_en';
2
+ import { messages as ru } from './messages_ru';
3
+ import { createLang } from '../../polyglot';
4
+ export const {
5
+ Lang,
6
+ useLang
7
+ } = createLang({
8
+ en,
9
+ ru
10
+ });
@@ -0,0 +1,3 @@
1
+ import { type EmailTemplatePreviewMessages } from './types';
2
+ import type { LangMessages } from '../../polyglot';
3
+ export declare const messages: LangMessages<EmailTemplatePreviewMessages>;
@@ -0,0 +1,5 @@
1
+ export const messages = {
2
+ 'DUMB.EMAIL_TEMPLATE_PREVIEW.ALT': 'Email envelope icon',
3
+ 'DUMB.EMAIL_TEMPLATE_PREVIEW.CONTENT_MISSED': 'Content missed...',
4
+ 'DUMB.EMAIL_TEMPLATE_PREVIEW.HINT': 'Might be old data or deleted presets'
5
+ };
@@ -0,0 +1,3 @@
1
+ import { type EmailTemplatePreviewMessages } from './types';
2
+ import type { LangMessages } from '../../polyglot';
3
+ export declare const messages: LangMessages<EmailTemplatePreviewMessages>;
@@ -0,0 +1,5 @@
1
+ export const messages = {
2
+ 'DUMB.EMAIL_TEMPLATE_PREVIEW.ALT': 'Иконка конверта email',
3
+ 'DUMB.EMAIL_TEMPLATE_PREVIEW.CONTENT_MISSED': 'Контент отсутствует...',
4
+ 'DUMB.EMAIL_TEMPLATE_PREVIEW.HINT': 'Возможно, устаревшие данные или удалённые пресеты'
5
+ };
@@ -0,0 +1,6 @@
1
+ import type { NoParams } from '../../polyglot';
2
+ export type EmailTemplatePreviewMessages = {
3
+ 'DUMB.EMAIL_TEMPLATE_PREVIEW.ALT': NoParams;
4
+ 'DUMB.EMAIL_TEMPLATE_PREVIEW.CONTENT_MISSED': NoParams;
5
+ 'DUMB.EMAIL_TEMPLATE_PREVIEW.HINT': NoParams;
6
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -1,6 +1,5 @@
1
- import React from 'react';
2
- export declare const EnhancedInput: React.ForwardRefExoticComponent<React.InputHTMLAttributes<HTMLInputElement> & import("../native/Input").NativeInputProps & {
3
- $icon?: React.ReactNode;
1
+ export declare const EnhancedInput: import("react").ForwardRefExoticComponent<import("react").InputHTMLAttributes<HTMLInputElement> & import("../native/Input").NativeInputProps & {
2
+ $icon?: import("react").ReactNode;
4
3
  $onClear?: () => void;
5
4
  hint?: string;
6
- } & React.RefAttributes<HTMLInputElement>>;
5
+ } & import("react").RefAttributes<HTMLInputElement>>;
@@ -1,4 +1,5 @@
1
- import React, { forwardRef } from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { forwardRef } from 'react';
2
3
  import { CloseIcon } from '@pushwoosh/kit-icons';
3
4
  import { Wrapper, RightSlot } from './styles';
4
5
  import { NativeInput } from '../native';
@@ -8,16 +9,19 @@ export const EnhancedInput = forwardRef(({
8
9
  hint,
9
10
  ...props
10
11
  }, ref) => {
11
- return React.createElement(Wrapper, {
12
+ return _jsxs(Wrapper, {
12
13
  "$hasIcon": !!$icon,
13
14
  "$hasClear": !!$onClear,
14
15
  "$hasError": !!props.$isErrored,
15
- "$hasHint": !!hint
16
- }, $icon, React.createElement(NativeInput, {
17
- ...props,
18
- ref: ref
19
- }), hint && React.createElement(RightSlot, null, hint), $onClear && React.createElement(CloseIcon, {
20
- size: "small",
21
- onClick: $onClear
22
- }));
16
+ "$hasHint": !!hint,
17
+ children: [$icon, _jsx(NativeInput, {
18
+ ...props,
19
+ ref: ref
20
+ }), hint && _jsx(RightSlot, {
21
+ children: hint
22
+ }), $onClear && _jsx(CloseIcon, {
23
+ size: "small",
24
+ onClick: $onClear
25
+ })]
26
+ });
23
27
  });
@@ -1,10 +1,10 @@
1
- import React from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { SearchIcon } from '@pushwoosh/kit-icons';
3
3
  import { EnhancedInput } from './EnhancedInput';
4
4
  export const SearchInput = props => {
5
- return React.createElement(EnhancedInput, {
5
+ return _jsx(EnhancedInput, {
6
6
  ...props,
7
- "$icon": React.createElement(SearchIcon, {
7
+ "$icon": _jsx(SearchIcon, {
8
8
  size: "medium",
9
9
  view: "lined"
10
10
  })
@@ -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 } from '@pushwoosh/kit-helpers';
3
3
  import { CloseIcon, CsvIcon } from '@pushwoosh/kit-icons';
4
4
  import { Button } from '../Button';
@@ -12,28 +12,38 @@ export function ExportResult(props) {
12
12
  rightSlot,
13
13
  handleClose
14
14
  } = props;
15
- return React.createElement(Horizontal, {
15
+ return _jsxs(Horizontal, {
16
16
  "$justifyContent": "space-between",
17
17
  "$alignItems": "center",
18
- "$gap": 12
19
- }, React.createElement(Horizontal, {
20
- "$gap": 12
21
- }, React.createElement(LeftSlot, {
22
- "$type": type,
23
- "$alignItems": "center",
24
- "$padding": 4
25
- }, leftSlotIcon || React.createElement(CsvIcon, {
26
- size: "medium",
27
- view: "filled"
28
- })), React.createElement(MainInfoContainer, null, React.createElement(Title, null, title), React.createElement(Subtitle, null, subtitle))), React.createElement(RightSlotContainer, {
29
- "$alignItems": "center",
30
- "$gap": 8
31
- }, rightSlot, React.createElement(Button, {
32
- color: "secondary",
33
- onClick: handleClose,
34
- size: "compact",
35
- icon: React.createElement(CloseIcon, {
36
- size: "small"
37
- })
38
- })));
18
+ "$gap": 12,
19
+ children: [_jsxs(Horizontal, {
20
+ "$gap": 12,
21
+ children: [_jsx(LeftSlot, {
22
+ "$type": type,
23
+ "$alignItems": "center",
24
+ "$padding": 4,
25
+ children: leftSlotIcon || _jsx(CsvIcon, {
26
+ size: "medium",
27
+ view: "filled"
28
+ })
29
+ }), _jsxs(MainInfoContainer, {
30
+ children: [_jsx(Title, {
31
+ children: title
32
+ }), _jsx(Subtitle, {
33
+ children: subtitle
34
+ })]
35
+ })]
36
+ }), _jsxs(RightSlotContainer, {
37
+ "$alignItems": "center",
38
+ "$gap": 8,
39
+ children: [rightSlot, _jsx(Button, {
40
+ color: "secondary",
41
+ onClick: handleClose,
42
+ size: "compact",
43
+ icon: _jsx(CloseIcon, {
44
+ size: "small"
45
+ })
46
+ })]
47
+ })]
48
+ });
39
49
  }
@@ -1,4 +1,5 @@
1
- import React, { useState, useEffect } from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState, useEffect } from 'react';
2
3
  import { Color } from '@pushwoosh/kit-constants';
3
4
  import { Spinner } from '../Spinner';
4
5
  import { RootBox, ImgPreview, PlaceholderWrapper } from './styles';
@@ -26,25 +27,28 @@ export function ExternalImagePreview(props) {
26
27
  onError(error);
27
28
  }
28
29
  };
29
- return React.createElement(RootBox, {
30
- width: width,
31
- height: height
32
- }, (!src || isError) && React.createElement(PlaceholderWrapper, {
33
- width: width,
34
- height: height
35
- }, placeholder), isLoading && React.createElement(PlaceholderWrapper, {
36
- width: width,
37
- height: height
38
- }, React.createElement(Spinner, {
39
- size: "small",
40
- color: Color.CLEAR
41
- })), React.createElement(ImgPreview, {
30
+ return _jsxs(RootBox, {
42
31
  width: width,
43
32
  height: height,
44
- isHide: !src || isLoading || isError,
45
- alt: alt,
46
- src: src,
47
- onError: handleOnError,
48
- onLoad: () => setIsLoading(false)
49
- }));
33
+ children: [(!src || isError) && _jsx(PlaceholderWrapper, {
34
+ width: width,
35
+ height: height,
36
+ children: placeholder
37
+ }), isLoading && _jsx(PlaceholderWrapper, {
38
+ width: width,
39
+ height: height,
40
+ children: _jsx(Spinner, {
41
+ size: "small",
42
+ color: Color.CLEAR
43
+ })
44
+ }), _jsx(ImgPreview, {
45
+ width: width,
46
+ height: height,
47
+ isHide: !src || isLoading || isError,
48
+ alt: alt,
49
+ src: src,
50
+ onError: handleOnError,
51
+ onLoad: () => setIsLoading(false)
52
+ })]
53
+ });
50
54
  }
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Color, Tag } from '@pushwoosh/kit-constants';
3
3
  import { Horizontal, Vertical } from '@pushwoosh/kit-helpers';
4
4
  import { OpenIcon, InfoRoundIcon } from '@pushwoosh/kit-icons';
@@ -18,41 +18,54 @@ export function FieldBox(props) {
18
18
  actionsRef,
19
19
  children
20
20
  } = props;
21
- return React.createElement(Vertical, {
21
+ return _jsxs(Vertical, {
22
22
  ref: boxRef,
23
- "$gap": 4
24
- }, title && React.createElement(Horizontal, {
25
- "$alignItems": "center",
26
- "$justifyContent": "space-between"
27
- }, React.createElement(TitleBox, null, React.createElement(Text, {
28
- "$variant": "h5"
29
- }, title), isOptional && React.createElement(Text, {
30
- "$color": Color.LOCKED,
31
- "$variant": "footnote"
32
- }, "(optional)"), tooltip && React.createElement(Tooltip, {
33
- content: tooltip,
34
- position: "right-middle"
35
- }, React.createElement("div", null, React.createElement(InfoRoundIcon, {
36
- color: Color.LOCKED,
37
- size: "small",
38
- view: "lined"
39
- }))), link && React.createElement(Link, {
40
- as: Tag.A,
41
- href: link,
42
- target: "_blank",
43
- rel: "noopener noreferrer"
44
- }, React.createElement(OpenIcon, {
45
- size: "small",
46
- view: "lined"
47
- }))), actions && React.createElement(Horizontal, {
48
- ref: actionsRef,
49
- "$alignItems": "center",
50
- "$gap": 4
51
- }, actions)), children, description && !error && React.createElement(Text, {
52
- "$variant": "footnote",
53
- "$color": Color.LOCKED
54
- }, description), error && React.createElement(Text, {
55
- "$variant": "footnote",
56
- "$color": Color.DANGER
57
- }, error));
23
+ "$gap": 4,
24
+ children: [title && _jsxs(Horizontal, {
25
+ "$alignItems": "center",
26
+ "$justifyContent": "space-between",
27
+ children: [_jsxs(TitleBox, {
28
+ children: [_jsx(Text, {
29
+ "$variant": "h5",
30
+ children: title
31
+ }), isOptional && _jsx(Text, {
32
+ "$color": Color.LOCKED,
33
+ "$variant": "footnote",
34
+ children: "(optional)"
35
+ }), tooltip && _jsx(Tooltip, {
36
+ content: tooltip,
37
+ position: "right-middle",
38
+ children: _jsx("div", {
39
+ children: _jsx(InfoRoundIcon, {
40
+ color: Color.LOCKED,
41
+ size: "small",
42
+ view: "lined"
43
+ })
44
+ })
45
+ }), link && _jsx(Link, {
46
+ as: Tag.A,
47
+ href: link,
48
+ target: "_blank",
49
+ rel: "noopener noreferrer",
50
+ children: _jsx(OpenIcon, {
51
+ size: "small",
52
+ view: "lined"
53
+ })
54
+ })]
55
+ }), actions && _jsx(Horizontal, {
56
+ ref: actionsRef,
57
+ "$alignItems": "center",
58
+ "$gap": 4,
59
+ children: actions
60
+ })]
61
+ }), children, description && !error && _jsx(Text, {
62
+ "$variant": "footnote",
63
+ "$color": Color.LOCKED,
64
+ children: description
65
+ }), error && _jsx(Text, {
66
+ "$variant": "footnote",
67
+ "$color": Color.DANGER,
68
+ children: error
69
+ })]
70
+ });
58
71
  }