@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,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
  }
@@ -1,4 +1,5 @@
1
- import React, { useCallback } from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useCallback } from 'react';
2
3
  import { Color } from '@pushwoosh/kit-constants';
3
4
  import { Vertical } from '@pushwoosh/kit-helpers';
4
5
  import { OpenIcon } from '@pushwoosh/kit-icons';
@@ -64,39 +65,46 @@ export function FrequencyCappingEdit({
64
65
  days
65
66
  });
66
67
  }, [capping, onChange]);
67
- return React.createElement(Container, {
68
+ return _jsx(Container, {
68
69
  "$padding": 16,
69
70
  "$bgColor": Color.SOFT_LIGHT,
70
- "$borderRadius": 8
71
- }, React.createElement(Vertical, {
72
- "$gap": 12
73
- }, React.createElement(FieldBox, {
74
- title: lang({
75
- message: 'DUMB.FREQUENCY_CAPPING.FIELD_TITLE'
71
+ "$borderRadius": 8,
72
+ children: _jsxs(Vertical, {
73
+ "$gap": 12,
74
+ children: [_jsx(FieldBox, {
75
+ title: lang({
76
+ message: 'DUMB.FREQUENCY_CAPPING.FIELD_TITLE'
77
+ }),
78
+ children: _jsx(Select, {
79
+ name: "cappingOption",
80
+ isDisabled: isDisabled,
81
+ options: cappingOptions,
82
+ value: cappingOptions.find(option => option.value === cappingOption),
83
+ onChange: newValue => onChangeFrequencyCapping(newValue.value)
84
+ })
85
+ }), _jsx(Description, {
86
+ cappingOption: cappingOption,
87
+ messages: globalCapping.count,
88
+ days: globalCapping.days,
89
+ isInJourney: isInJourney,
90
+ children: cappingOption === CappingTypes.GLOBAL && _jsx(Link, {
91
+ target: "_blank",
92
+ href: `/applications/${applicationCode}/message-delivery?tab=capping`,
93
+ title: globalCappingLinkText,
94
+ onClick: editGlobalClicked,
95
+ children: _jsxs(LinkWrapper, {
96
+ children: [globalCappingLinkText, _jsx(OpenIcon, {
97
+ size: "small",
98
+ view: "lined",
99
+ as: "span"
100
+ })]
101
+ })
102
+ })
103
+ }), cappingOption === CappingTypes.CUSTOM && !isDisabled && _jsx(EditCappingSettings, {
104
+ messages: messages,
105
+ days: days,
106
+ onChange: onSettingsChange
107
+ })]
76
108
  })
77
- }, React.createElement(Select, {
78
- name: "cappingOption",
79
- isDisabled: isDisabled,
80
- options: cappingOptions,
81
- value: cappingOptions.find(option => option.value === cappingOption),
82
- onChange: newValue => onChangeFrequencyCapping(newValue.value)
83
- })), React.createElement(Description, {
84
- cappingOption: cappingOption,
85
- messages: globalCapping.count,
86
- days: globalCapping.days,
87
- isInJourney: isInJourney
88
- }, cappingOption === CappingTypes.GLOBAL && React.createElement(Link, {
89
- target: "_blank",
90
- href: `/applications/${applicationCode}/message-delivery?tab=capping`,
91
- title: globalCappingLinkText,
92
- onClick: editGlobalClicked
93
- }, React.createElement(LinkWrapper, null, globalCappingLinkText, React.createElement(OpenIcon, {
94
- size: "small",
95
- view: "lined",
96
- as: "span"
97
- })))), cappingOption === CappingTypes.CUSTOM && !isDisabled && React.createElement(EditCappingSettings, {
98
- messages: messages,
99
- days: days,
100
- onChange: onSettingsChange
101
- })));
109
+ });
102
110
  }
@@ -1,4 +1,5 @@
1
- import React, { useCallback } from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useCallback } from 'react';
2
3
  import { Color } from '@pushwoosh/kit-constants';
3
4
  import { Vertical } from '@pushwoosh/kit-helpers';
4
5
  import { OpenIcon } from '@pushwoosh/kit-icons';
@@ -57,39 +58,46 @@ export function FrequencyCappingInApps(props) {
57
58
  const onSettingsChange = useCallback(newCapping => {
58
59
  onChange(newCapping);
59
60
  }, [onChange]);
60
- return React.createElement(Container, {
61
+ return _jsx(Container, {
61
62
  "$padding": 16,
62
63
  "$bgColor": Color.SOFT_LIGHT,
63
- "$borderRadius": 8
64
- }, React.createElement(Vertical, {
65
- "$gap": 12
66
- }, React.createElement(FieldBox, {
67
- title: lang({
68
- message: 'DUMB.FREQUENCY_CAPPING.FIELD_TITLE'
64
+ "$borderRadius": 8,
65
+ children: _jsxs(Vertical, {
66
+ "$gap": 12,
67
+ children: [_jsx(FieldBox, {
68
+ title: lang({
69
+ message: 'DUMB.FREQUENCY_CAPPING.FIELD_TITLE'
70
+ }),
71
+ children: _jsx(Select, {
72
+ name: "cappingOption",
73
+ isDisabled: isDisabled,
74
+ options: cappingOptions,
75
+ value: cappingOptions.find(option => option.value === cappingOption),
76
+ onChange: newValue => onChangeFrequencyCapping(newValue.value)
77
+ })
78
+ }), _jsx(Description, {
79
+ cappingOption: cappingOption,
80
+ messages: globalCapping.count,
81
+ days: globalCapping.days,
82
+ isInJourney: isInJourney,
83
+ variant: "in-app",
84
+ children: cappingOption === CappingTypes.GLOBAL && _jsx(Link, {
85
+ target: "_blank",
86
+ href: `/applications/${applicationCode}/message-delivery?tab=capping`,
87
+ title: globalCappingLinkText,
88
+ onClick: editGlobalClicked,
89
+ children: _jsxs(LinkWrapper, {
90
+ children: [globalCappingLinkText, _jsx(OpenIcon, {
91
+ size: "small",
92
+ view: "lined",
93
+ as: "span"
94
+ })]
95
+ })
96
+ })
97
+ }), cappingOption === CappingTypes.CUSTOM && !isDisabled && _jsx(EditInAppCappingSettings, {
98
+ capping: capping,
99
+ onChange: onSettingsChange
100
+ })]
69
101
  })
70
- }, React.createElement(Select, {
71
- name: "cappingOption",
72
- isDisabled: isDisabled,
73
- options: cappingOptions,
74
- value: cappingOptions.find(option => option.value === cappingOption),
75
- onChange: newValue => onChangeFrequencyCapping(newValue.value)
76
- })), React.createElement(Description, {
77
- cappingOption: cappingOption,
78
- messages: globalCapping.count,
79
- days: globalCapping.days,
80
- isInJourney: isInJourney,
81
- variant: "in-app"
82
- }, cappingOption === CappingTypes.GLOBAL && React.createElement(Link, {
83
- target: "_blank",
84
- href: `/applications/${applicationCode}/message-delivery?tab=capping`,
85
- title: globalCappingLinkText,
86
- onClick: editGlobalClicked
87
- }, React.createElement(LinkWrapper, null, globalCappingLinkText, React.createElement(OpenIcon, {
88
- size: "small",
89
- view: "lined",
90
- as: "span"
91
- })))), cappingOption === CappingTypes.CUSTOM && !isDisabled && React.createElement(EditInAppCappingSettings, {
92
- capping: capping,
93
- onChange: onSettingsChange
94
- })));
102
+ });
95
103
  }
@@ -1,3 +1,2 @@
1
- import React from 'react';
2
1
  import { type CappingBase, type FrequencyCappingReadonlyProps } from './types';
3
- export declare function FrequencyCappingReadonly<T extends CappingBase>({ capping, globalCapping, applicationCode, editGlobalClicked, isInJourney, }: FrequencyCappingReadonlyProps<T>): React.JSX.Element;
2
+ export declare function FrequencyCappingReadonly<T extends CappingBase>({ capping, globalCapping, applicationCode, editGlobalClicked, isInJourney, }: FrequencyCappingReadonlyProps<T>): 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 { Horizontal, Vertical } from '@pushwoosh/kit-helpers';
3
3
  import { OpenIcon } from '@pushwoosh/kit-icons';
4
4
  import { Link } from '../Link';
@@ -19,23 +19,27 @@ export function FrequencyCappingReadonly({
19
19
  const isGlobalCappingDisabled = globalCapping.count === 0 && globalCapping.days === 0;
20
20
  const globalCappingLinkText = getGlobalCappingLinkText(lang, isGlobalCappingDisabled);
21
21
  const label = getReadonlyCappingLabel(cappingOption, isGlobalCappingDisabled, capping, globalCapping, isInJourney, lang);
22
- return React.createElement(Vertical, {
23
- "$gap": 24
24
- }, React.createElement(Horizontal, {
25
- "$gap": 8,
26
- "$justifyContent": "start",
27
- "$alignItems": "center"
28
- }, label, cappingOption === CappingTypes.GLOBAL && React.createElement(Link, {
29
- href: `/applications/${applicationCode}/message-delivery?tab=capping`,
30
- title: globalCappingLinkText,
31
- target: "_blank",
32
- onClick: editGlobalClicked
33
- }, React.createElement(Horizontal, {
34
- "$gap": 4,
35
- "$justifyContent": "start",
36
- "$alignItems": "center"
37
- }, globalCappingLinkText, React.createElement(OpenIcon, {
38
- size: "small",
39
- view: "lined"
40
- })))));
22
+ return _jsx(Vertical, {
23
+ "$gap": 24,
24
+ children: _jsxs(Horizontal, {
25
+ "$gap": 8,
26
+ "$justifyContent": "start",
27
+ "$alignItems": "center",
28
+ children: [label, cappingOption === CappingTypes.GLOBAL && _jsx(Link, {
29
+ href: `/applications/${applicationCode}/message-delivery?tab=capping`,
30
+ title: globalCappingLinkText,
31
+ target: "_blank",
32
+ onClick: editGlobalClicked,
33
+ children: _jsxs(Horizontal, {
34
+ "$gap": 4,
35
+ "$justifyContent": "start",
36
+ "$alignItems": "center",
37
+ children: [globalCappingLinkText, _jsx(OpenIcon, {
38
+ size: "small",
39
+ view: "lined"
40
+ })]
41
+ })
42
+ })]
43
+ })
44
+ });
41
45
  }
@@ -1,8 +1,7 @@
1
- import React from 'react';
2
1
  type ChipFrequencyCappingProps = {
3
2
  text: string;
4
3
  tooltip?: string;
5
4
  $inText?: boolean;
6
5
  };
7
- export declare function ChipFrequencyCapping({ text, tooltip, $inText }: ChipFrequencyCappingProps): React.JSX.Element;
6
+ export declare function ChipFrequencyCapping({ text, tooltip, $inText }: ChipFrequencyCappingProps): import("react/jsx-runtime").JSX.Element;
8
7
  export {};
@@ -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 } from '@pushwoosh/kit-constants';
3
3
  import { HelpRoundIcon } from '@pushwoosh/kit-icons';
4
4
  import { ChipWithinTextContainer } from './styles';
@@ -9,23 +9,27 @@ export function ChipFrequencyCapping({
9
9
  tooltip,
10
10
  $inText = false
11
11
  }) {
12
- return React.createElement(ChipWithinTextContainer, {
13
- "$inText": $inText
14
- }, tooltip ? React.createElement(Tooltip, {
15
- content: tooltip,
16
- position: "top-middle"
17
- }, React.createElement(Chip, {
18
- "$variant": "primary",
19
- "$readOnly": true,
20
- as: "span"
21
- }, text, React.createElement(HelpRoundIcon, {
22
- as: "span",
23
- size: "small",
24
- view: "lined",
25
- color: Color.PHANTOM
26
- }))) : React.createElement(Chip, {
27
- "$variant": "primary",
28
- "$readOnly": true,
29
- as: "span"
30
- }, text));
12
+ return _jsx(ChipWithinTextContainer, {
13
+ "$inText": $inText,
14
+ children: tooltip ? _jsx(Tooltip, {
15
+ content: tooltip,
16
+ position: "top-middle",
17
+ children: _jsxs(Chip, {
18
+ "$variant": "primary",
19
+ "$readOnly": true,
20
+ as: "span",
21
+ children: [text, _jsx(HelpRoundIcon, {
22
+ as: "span",
23
+ size: "small",
24
+ view: "lined",
25
+ color: Color.PHANTOM
26
+ })]
27
+ })
28
+ }) : _jsx(Chip, {
29
+ "$variant": "primary",
30
+ "$readOnly": true,
31
+ as: "span",
32
+ children: text
33
+ })
34
+ });
31
35
  }
@@ -1,4 +1,4 @@
1
- import React, { type ReactNode } from 'react';
1
+ import { type ReactNode } from 'react';
2
2
  import { type CappingTypes } from '../../types';
3
3
  type Props = {
4
4
  cappingOption: CappingTypes;
@@ -8,5 +8,5 @@ type Props = {
8
8
  isInJourney: boolean;
9
9
  variant?: 'message' | 'in-app';
10
10
  };
11
- export declare function Description(props: Props): React.JSX.Element;
11
+ export declare function Description(props: Props): import("react/jsx-runtime").JSX.Element;
12
12
  export {};
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Paragraph } from '@pushwoosh/kit-typography';
3
3
  import { getDescriptionMessages } from '../../helpers/getDescriptionMessages';
4
4
  import { useLang } from '../../polyglot';
@@ -24,8 +24,10 @@ export function Description(props) {
24
24
  days,
25
25
  isInJourney
26
26
  }, lang);
27
- return React.createElement(Paragraph, null, prefix, chip && React.createElement(ChipFrequencyCapping, {
28
- text: chip,
29
- "$inText": true
30
- }), suffix, ' ', children);
27
+ return _jsxs(Paragraph, {
28
+ children: [prefix, chip && _jsx(ChipFrequencyCapping, {
29
+ text: chip,
30
+ "$inText": true
31
+ }), suffix, ' ', children]
32
+ });
31
33
  }