@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, { useCallback } from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useCallback } from 'react';
2
3
  import { Horizontal } from '@pushwoosh/kit-helpers';
3
4
  import { Paragraph } from '@pushwoosh/kit-typography';
4
5
  import { NumberPicker } from '../../../NumberPicker';
@@ -15,27 +16,34 @@ export function EditCappingSettings(props) {
15
16
  const onDaysChange = useCallback(value => {
16
17
  onChange(messages, value);
17
18
  }, [messages, onChange]);
18
- return React.createElement(Horizontal, {
19
+ return _jsxs(Horizontal, {
19
20
  "$gap": 12,
20
21
  "$alignItems": "center",
21
22
  style: {
22
23
  gridTemplateColumns: '145px 70px 90px 70px 40px'
23
- }
24
- }, React.createElement(Paragraph, null, React.createElement(Lang, {
25
- message: "DUMB.FREQUENCY_CAPPING.SETTINGS.LIMIT_TO_MAX"
26
- })), React.createElement(NumberPicker, {
27
- value: messages,
28
- minValue: 1,
29
- maxValue: 1000,
30
- onChange: value => onMessagesChange(value)
31
- }), React.createElement(Paragraph, null, React.createElement(Lang, {
32
- message: "DUMB.FREQUENCY_CAPPING.SETTINGS.MESSAGES_PER"
33
- })), React.createElement(NumberPicker, {
34
- maxValue: 30,
35
- minValue: 1,
36
- value: days,
37
- onChange: value => onDaysChange(value)
38
- }), React.createElement(Paragraph, null, React.createElement(Lang, {
39
- message: "DUMB.FREQUENCY_CAPPING.SETTINGS.DAYS"
40
- })));
24
+ },
25
+ children: [_jsx(Paragraph, {
26
+ children: _jsx(Lang, {
27
+ message: "DUMB.FREQUENCY_CAPPING.SETTINGS.LIMIT_TO_MAX"
28
+ })
29
+ }), _jsx(NumberPicker, {
30
+ value: messages,
31
+ minValue: 1,
32
+ maxValue: 1000,
33
+ onChange: value => onMessagesChange(value)
34
+ }), _jsx(Paragraph, {
35
+ children: _jsx(Lang, {
36
+ message: "DUMB.FREQUENCY_CAPPING.SETTINGS.MESSAGES_PER"
37
+ })
38
+ }), _jsx(NumberPicker, {
39
+ maxValue: 30,
40
+ minValue: 1,
41
+ value: days,
42
+ onChange: value => onDaysChange(value)
43
+ }), _jsx(Paragraph, {
44
+ children: _jsx(Lang, {
45
+ message: "DUMB.FREQUENCY_CAPPING.SETTINGS.DAYS"
46
+ })
47
+ })]
48
+ });
41
49
  }
@@ -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 { Columns, Vertical } from '@pushwoosh/kit-helpers';
3
4
  import { Paragraph, Text } from '@pushwoosh/kit-typography';
4
5
  import { Checkbox } from '../../../Checkbox';
@@ -87,74 +88,88 @@ export function EditInAppCappingSettings(props) {
87
88
  }
88
89
  });
89
90
  }, [capping, onChange]);
90
- return React.createElement(Vertical, {
91
- "$gap": 8
92
- }, React.createElement(Paragraph, null, React.createElement(Lang, {
93
- message: "DUMB.FREQUENCY_CAPPING.INAPP.LIMIT_DESC"
94
- })), React.createElement(Columns, {
95
- "$sizes": "100px 80px auto",
96
- "$alignItems": "center",
97
- "$justifyContent": "start",
98
- "$gap": 8
99
- }, React.createElement(Checkbox, {
100
- label: React.createElement(Lang, {
101
- message: "DUMB.FREQUENCY_CAPPING.INAPP.LIMITED_TO"
102
- }),
103
- isChecked: hasTotal,
104
- onChange: onTotalToggle
105
- }), React.createElement(NumberPicker, {
106
- value: ((_capping$total = capping.total) === null || _capping$total === void 0 ? void 0 : _capping$total.count) ?? 1,
107
- minValue: 1,
108
- maxValue: 1000,
109
- isDisabled: !hasTotal,
110
- onChange: onTotalCountChange
111
- }), React.createElement(Text, null, React.createElement(Lang, {
112
- message: "DUMB.FREQUENCY_CAPPING.INAPP.TOTAL_IMPRESSIONS"
113
- }))), React.createElement(Columns, {
114
- "$sizes": "100px 80px auto 80px auto",
115
- "$alignItems": "center",
116
- "$justifyContent": "start",
117
- "$gap": 8
118
- }, React.createElement(Checkbox, {
119
- label: React.createElement(Lang, {
120
- message: "DUMB.FREQUENCY_CAPPING.INAPP.LIMITED_TO"
121
- }),
122
- isChecked: hasPerDays,
123
- onChange: onPerDaysToggle
124
- }), React.createElement(NumberPicker, {
125
- value: ((_capping$perDays = capping.perDays) === null || _capping$perDays === void 0 ? void 0 : _capping$perDays.count) ?? 1,
126
- minValue: 1,
127
- maxValue: 1000,
128
- isDisabled: !hasPerDays,
129
- onChange: onPerDaysCountChange
130
- }), React.createElement(Text, null, React.createElement(Lang, {
131
- message: "DUMB.FREQUENCY_CAPPING.INAPP.IMPRESSIONS_IN"
132
- })), React.createElement(NumberPicker, {
133
- value: ((_capping$perDays2 = capping.perDays) === null || _capping$perDays2 === void 0 ? void 0 : _capping$perDays2.days) ?? 1,
134
- minValue: 1,
135
- maxValue: 366,
136
- isDisabled: !hasPerDays,
137
- onChange: onPerDaysDaysChange
138
- }), React.createElement(Text, null, React.createElement(Lang, {
139
- message: "DUMB.FREQUENCY_CAPPING.INAPP.DAYS"
140
- }))), React.createElement(Columns, {
141
- "$sizes": "100px 80px auto",
142
- "$alignItems": "center",
143
- "$justifyContent": "start",
144
- "$gap": 8
145
- }, React.createElement(Checkbox, {
146
- label: React.createElement(Lang, {
147
- message: "DUMB.FREQUENCY_CAPPING.INAPP.ENABLE"
148
- }),
149
- isChecked: hasLeastDays,
150
- onChange: onLeastDaysToggle
151
- }), React.createElement(NumberPicker, {
152
- value: ((_capping$leastDays = capping.leastDays) === null || _capping$leastDays === void 0 ? void 0 : _capping$leastDays.count) ?? 1,
153
- minValue: 1,
154
- maxValue: 366,
155
- isDisabled: !hasLeastDays,
156
- onChange: onLeastDaysCountChange
157
- }), React.createElement(Text, null, React.createElement(Lang, {
158
- message: "DUMB.FREQUENCY_CAPPING.INAPP.DAYS_INTERVAL"
159
- }))));
91
+ return _jsxs(Vertical, {
92
+ "$gap": 8,
93
+ children: [_jsx(Paragraph, {
94
+ children: _jsx(Lang, {
95
+ message: "DUMB.FREQUENCY_CAPPING.INAPP.LIMIT_DESC"
96
+ })
97
+ }), _jsxs(Columns, {
98
+ "$sizes": "100px 80px auto",
99
+ "$alignItems": "center",
100
+ "$justifyContent": "start",
101
+ "$gap": 8,
102
+ children: [_jsx(Checkbox, {
103
+ label: _jsx(Lang, {
104
+ message: "DUMB.FREQUENCY_CAPPING.INAPP.LIMITED_TO"
105
+ }),
106
+ isChecked: hasTotal,
107
+ onChange: onTotalToggle
108
+ }), _jsx(NumberPicker, {
109
+ value: ((_capping$total = capping.total) === null || _capping$total === void 0 ? void 0 : _capping$total.count) ?? 1,
110
+ minValue: 1,
111
+ maxValue: 1000,
112
+ isDisabled: !hasTotal,
113
+ onChange: onTotalCountChange
114
+ }), _jsx(Text, {
115
+ children: _jsx(Lang, {
116
+ message: "DUMB.FREQUENCY_CAPPING.INAPP.TOTAL_IMPRESSIONS"
117
+ })
118
+ })]
119
+ }), _jsxs(Columns, {
120
+ "$sizes": "100px 80px auto 80px auto",
121
+ "$alignItems": "center",
122
+ "$justifyContent": "start",
123
+ "$gap": 8,
124
+ children: [_jsx(Checkbox, {
125
+ label: _jsx(Lang, {
126
+ message: "DUMB.FREQUENCY_CAPPING.INAPP.LIMITED_TO"
127
+ }),
128
+ isChecked: hasPerDays,
129
+ onChange: onPerDaysToggle
130
+ }), _jsx(NumberPicker, {
131
+ value: ((_capping$perDays = capping.perDays) === null || _capping$perDays === void 0 ? void 0 : _capping$perDays.count) ?? 1,
132
+ minValue: 1,
133
+ maxValue: 1000,
134
+ isDisabled: !hasPerDays,
135
+ onChange: onPerDaysCountChange
136
+ }), _jsx(Text, {
137
+ children: _jsx(Lang, {
138
+ message: "DUMB.FREQUENCY_CAPPING.INAPP.IMPRESSIONS_IN"
139
+ })
140
+ }), _jsx(NumberPicker, {
141
+ value: ((_capping$perDays2 = capping.perDays) === null || _capping$perDays2 === void 0 ? void 0 : _capping$perDays2.days) ?? 1,
142
+ minValue: 1,
143
+ maxValue: 366,
144
+ isDisabled: !hasPerDays,
145
+ onChange: onPerDaysDaysChange
146
+ }), _jsx(Text, {
147
+ children: _jsx(Lang, {
148
+ message: "DUMB.FREQUENCY_CAPPING.INAPP.DAYS"
149
+ })
150
+ })]
151
+ }), _jsxs(Columns, {
152
+ "$sizes": "100px 80px auto",
153
+ "$alignItems": "center",
154
+ "$justifyContent": "start",
155
+ "$gap": 8,
156
+ children: [_jsx(Checkbox, {
157
+ label: _jsx(Lang, {
158
+ message: "DUMB.FREQUENCY_CAPPING.INAPP.ENABLE"
159
+ }),
160
+ isChecked: hasLeastDays,
161
+ onChange: onLeastDaysToggle
162
+ }), _jsx(NumberPicker, {
163
+ value: ((_capping$leastDays = capping.leastDays) === null || _capping$leastDays === void 0 ? void 0 : _capping$leastDays.count) ?? 1,
164
+ minValue: 1,
165
+ maxValue: 366,
166
+ isDisabled: !hasLeastDays,
167
+ onChange: onLeastDaysCountChange
168
+ }), _jsx(Text, {
169
+ children: _jsx(Lang, {
170
+ message: "DUMB.FREQUENCY_CAPPING.INAPP.DAYS_INTERVAL"
171
+ })
172
+ })]
173
+ })]
174
+ });
160
175
  }
@@ -1,7 +1,6 @@
1
- import React from 'react';
2
1
  import { type FrequencyCappingLang } from '../polyglot';
3
2
  import { type CappingBase, CappingTypes } from '../types';
4
3
  export declare function getReadonlyCappingLabel<T extends CappingBase>(cappingOption: CappingTypes, isGlobalCappingDisabled: boolean, capping: T, globalCapping: {
5
4
  count: number;
6
5
  days: number;
7
- }, isInJourney: boolean, lang: FrequencyCappingLang): React.JSX.Element;
6
+ }, isInJourney: boolean, lang: FrequencyCappingLang): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Horizontal } from '@pushwoosh/kit-helpers';
3
3
  import { HelpRoundIcon } from '@pushwoosh/kit-icons';
4
4
  import { getCappingChipText } from './getCappingChipText';
@@ -9,42 +9,51 @@ import { CappingTypes } from '../types';
9
9
  export function getReadonlyCappingLabel(cappingOption, isGlobalCappingDisabled, capping, globalCapping, isInJourney, lang) {
10
10
  const tooltip = getReadonlyTooltip(cappingOption, isInJourney, lang);
11
11
  if (cappingOption === CappingTypes.CUSTOM) {
12
- return React.createElement(React.Fragment, null, lang({
13
- message: 'DUMB.FREQUENCY_CAPPING.RO.CUSTOM_LABEL'
14
- }), React.createElement(ChipFrequencyCapping, {
15
- text: getCappingChipText(lang, capping.messages, capping.days),
16
- tooltip: tooltip
17
- }));
12
+ return _jsxs(_Fragment, {
13
+ children: [lang({
14
+ message: 'DUMB.FREQUENCY_CAPPING.RO.CUSTOM_LABEL'
15
+ }), _jsx(ChipFrequencyCapping, {
16
+ text: getCappingChipText(lang, capping.messages, capping.days),
17
+ tooltip: tooltip
18
+ })]
19
+ });
18
20
  }
19
21
  if (cappingOption === CappingTypes.IGNORE) {
20
- return React.createElement(Horizontal, {
22
+ return _jsxs(Horizontal, {
21
23
  "$alignItems": "center",
22
24
  "$gap": 4,
23
- "$justifyContent": "start"
24
- }, lang({
25
- message: 'DUMB.FREQUENCY_CAPPING.RO.IGNORE_LABEL'
26
- }), React.createElement(Tooltip, {
27
- content: tooltip,
28
- position: "top-middle"
29
- }, React.createElement(IconWrapper, {
30
- "$padding": "4px 0"
31
- }, React.createElement(HelpRoundIcon, {
32
- size: "small",
33
- view: "lined"
34
- }))));
25
+ "$justifyContent": "start",
26
+ children: [lang({
27
+ message: 'DUMB.FREQUENCY_CAPPING.RO.IGNORE_LABEL'
28
+ }), _jsx(Tooltip, {
29
+ content: tooltip,
30
+ position: "top-middle",
31
+ children: _jsx(IconWrapper, {
32
+ "$padding": "4px 0",
33
+ children: _jsx(HelpRoundIcon, {
34
+ size: "small",
35
+ view: "lined"
36
+ })
37
+ })
38
+ })]
39
+ });
35
40
  }
36
- return isGlobalCappingDisabled ? React.createElement(React.Fragment, null, lang({
37
- message: 'DUMB.FREQUENCY_CAPPING.RO.GLOBAL_LABEL'
38
- }), React.createElement(ChipFrequencyCapping, {
39
- text: getCappingChipText(lang, 0, 0)
40
- }), lang({
41
- message: 'DUMB.FREQUENCY_CAPPING.RO.BECAUSE_UNSET'
42
- })) : React.createElement(React.Fragment, null, lang({
43
- message: 'DUMB.FREQUENCY_CAPPING.RO.GLOBAL_LABEL'
44
- }), React.createElement(ChipFrequencyCapping, {
45
- text: getCappingChipText(lang, globalCapping.count, globalCapping.days),
46
- tooltip: tooltip
47
- }));
41
+ return isGlobalCappingDisabled ? _jsxs(_Fragment, {
42
+ children: [lang({
43
+ message: 'DUMB.FREQUENCY_CAPPING.RO.GLOBAL_LABEL'
44
+ }), _jsx(ChipFrequencyCapping, {
45
+ text: getCappingChipText(lang, 0, 0)
46
+ }), lang({
47
+ message: 'DUMB.FREQUENCY_CAPPING.RO.BECAUSE_UNSET'
48
+ })]
49
+ }) : _jsxs(_Fragment, {
50
+ children: [lang({
51
+ message: 'DUMB.FREQUENCY_CAPPING.RO.GLOBAL_LABEL'
52
+ }), _jsx(ChipFrequencyCapping, {
53
+ text: getCappingChipText(lang, globalCapping.count, globalCapping.days),
54
+ tooltip: tooltip
55
+ })]
56
+ });
48
57
  }
49
58
  function getReadonlyTooltip(cappingOption, isInJourney, lang) {
50
59
  if (cappingOption === CappingTypes.IGNORE) {
@@ -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 { Vertical } from '@pushwoosh/kit-helpers';
4
4
  import { CheckRoundIcon, LockIcon } from '@pushwoosh/kit-icons';
@@ -14,29 +14,48 @@ export function GetStartedPage(props) {
14
14
  checkList = [],
15
15
  actions = null
16
16
  } = props;
17
- return React.createElement(GradientBackground, null, React.createElement(Wrapper, null, React.createElement(ContentBox, null, React.createElement(Vertical, {
18
- "$gap": 16
19
- }, React.createElement(Vertical, {
20
- "$gap": 4
21
- }, React.createElement(H1, null, title), React.createElement(Paragraph, null, description)), !!checkList.length && React.createElement(UnorderedList, null, checkList.map(text => React.createElement(UnorderedListItem, {
22
- key: `item-${text}`
23
- }, React.createElement(UnorderedListIcon, null, React.createElement(CheckRoundIcon, {
24
- color: Color.SUCCESS,
25
- size: "small",
26
- type: "fill",
27
- view: "filled"
28
- })), React.createElement(UnorderedListText, null, text))))), (helpText || actions) && React.createElement(Vertical, {
29
- "$gap": 16
30
- }, helpText && React.createElement(Banner, {
31
- type: "info",
32
- view: "ghost",
33
- title: helpText,
34
- icon: React.createElement(LockIcon, {
35
- view: "filled",
36
- size: "small"
17
+ return _jsx(GradientBackground, {
18
+ children: _jsxs(Wrapper, {
19
+ children: [_jsxs(ContentBox, {
20
+ children: [_jsxs(Vertical, {
21
+ "$gap": 16,
22
+ children: [_jsxs(Vertical, {
23
+ "$gap": 4,
24
+ children: [_jsx(H1, {
25
+ children: title
26
+ }), _jsx(Paragraph, {
27
+ children: description
28
+ })]
29
+ }), !!checkList.length && _jsx(UnorderedList, {
30
+ children: checkList.map(text => _jsxs(UnorderedListItem, {
31
+ children: [_jsx(UnorderedListIcon, {
32
+ children: _jsx(CheckRoundIcon, {
33
+ color: Color.SUCCESS,
34
+ size: "small",
35
+ type: "fill",
36
+ view: "filled"
37
+ })
38
+ }), _jsx(UnorderedListText, {
39
+ children: text
40
+ })]
41
+ }, `item-${text}`))
42
+ })]
43
+ }), (helpText || actions) && _jsxs(Vertical, {
44
+ "$gap": 16,
45
+ children: [helpText && _jsx(Banner, {
46
+ type: "info",
47
+ view: "ghost",
48
+ title: helpText,
49
+ icon: _jsx(LockIcon, {
50
+ view: "filled",
51
+ size: "small"
52
+ })
53
+ }), actions]
54
+ })]
55
+ }), _jsx(Image, {
56
+ alt: title,
57
+ src: image
58
+ })]
37
59
  })
38
- }), actions)), React.createElement(Image, {
39
- alt: title,
40
- src: image
41
- })));
60
+ });
42
61
  }
@@ -1,4 +1,5 @@
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 { AttachmentIcon } from '@pushwoosh/kit-icons';
4
5
  import { Button } from '../Button';
@@ -49,39 +50,47 @@ export function InputFile({
49
50
  };
50
51
  reader.readAsDataURL(file);
51
52
  };
52
- return React.createElement(FieldBox, {
53
+ return _jsxs(FieldBox, {
53
54
  title: label,
54
- error: errorText
55
- }, React.createElement(InputFileFieldsStyled, null, React.createElement(InputFileInputHiddenStyled, {
56
- ref: fieldRef,
57
- id: fileId,
58
- type: "file",
59
- disabled: disabled,
60
- accept: accept,
61
- onChange: uploadFile,
62
- value: ""
63
- }), React.createElement(InputFileInputStyled, {
64
- id: textId,
65
- type: "text",
66
- disabled: disabled,
67
- placeholder: placeholder,
68
- value: fileName,
69
- readOnly: true,
70
- color: errorText ? Color.DANGER : Color.FORM
71
- }), React.createElement(InputFileButtonStyled, null, React.createElement(Button, {
72
- id: buttonId,
73
- type: "button",
74
- color: "secondary",
75
- size: "field",
76
- view: "shape",
77
- isDisabled: disabled,
78
- onClick: () => {
79
- var _fieldRef$current;
80
- return fieldRef === null || fieldRef === void 0 || (_fieldRef$current = fieldRef.current) === null || _fieldRef$current === void 0 ? void 0 : _fieldRef$current.click();
81
- },
82
- icon: React.createElement(AttachmentIcon, {
83
- size: "medium",
84
- view: "lined"
85
- })
86
- }, buttonText))), !!errorText && React.createElement(InputFileErrorStyled, null, errorText));
55
+ error: errorText,
56
+ children: [_jsxs(InputFileFieldsStyled, {
57
+ children: [_jsx(InputFileInputHiddenStyled, {
58
+ ref: fieldRef,
59
+ id: fileId,
60
+ type: "file",
61
+ disabled: disabled,
62
+ accept: accept,
63
+ onChange: uploadFile,
64
+ value: ""
65
+ }), _jsx(InputFileInputStyled, {
66
+ id: textId,
67
+ type: "text",
68
+ disabled: disabled,
69
+ placeholder: placeholder,
70
+ value: fileName,
71
+ readOnly: true,
72
+ color: errorText ? Color.DANGER : Color.FORM
73
+ }), _jsx(InputFileButtonStyled, {
74
+ children: _jsx(Button, {
75
+ id: buttonId,
76
+ type: "button",
77
+ color: "secondary",
78
+ size: "field",
79
+ view: "shape",
80
+ isDisabled: disabled,
81
+ onClick: () => {
82
+ var _fieldRef$current;
83
+ return fieldRef === null || fieldRef === void 0 || (_fieldRef$current = fieldRef.current) === null || _fieldRef$current === void 0 ? void 0 : _fieldRef$current.click();
84
+ },
85
+ icon: _jsx(AttachmentIcon, {
86
+ size: "medium",
87
+ view: "lined"
88
+ }),
89
+ children: buttonText
90
+ })
91
+ })]
92
+ }), !!errorText && _jsx(InputFileErrorStyled, {
93
+ children: errorText
94
+ })]
95
+ });
87
96
  }
package/Link/Link.js CHANGED
@@ -1,11 +1,11 @@
1
- import React from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { LinkBox } from './styles';
3
3
  export function Link(props) {
4
4
  const {
5
5
  boxRef,
6
6
  ...rest
7
7
  } = props;
8
- return React.createElement(LinkBox, {
8
+ return _jsx(LinkBox, {
9
9
  ...rest,
10
10
  ref: boxRef
11
11
  });
@@ -1,4 +1,5 @@
1
- import React, { useState, useCallback, useEffect, useRef } from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState, useCallback, useEffect, useRef } from 'react';
2
3
  import { createPortal } from 'react-dom';
3
4
  import { modalSizes } from './maps';
4
5
  import { LockBody, ModalBox, ModalBoxTrans, ModalContainer, ModalInner } from './styles';
@@ -33,16 +34,20 @@ export function Modal(props) {
33
34
  (_document$body$lastCh = document.body.lastChild) === null || _document$body$lastCh === void 0 || _document$body$lastCh.after(element);
34
35
  return () => element.remove();
35
36
  }, [element]);
36
- return createPortal(React.createElement(ModalBoxTrans, {
37
+ return createPortal(_jsx(ModalBoxTrans, {
37
38
  nodeRef: ref,
38
- isOpen: isOpen
39
- }, React.createElement(ModalBox, {
40
- ref: ref,
41
- "$zIndex": resolvedZIndex
42
- }, React.createElement(LockBody, null), React.createElement(ModalInner, {
43
- onMouseDown: handleClose
44
- }, React.createElement(ModalContainer, {
45
- "$width": modalSizes[size],
46
- onClick: handleClose
47
- }, typeof children === 'function' ? children() : children)))), element);
39
+ isOpen: isOpen,
40
+ children: _jsxs(ModalBox, {
41
+ ref: ref,
42
+ "$zIndex": resolvedZIndex,
43
+ children: [_jsx(LockBody, {}), _jsx(ModalInner, {
44
+ onMouseDown: handleClose,
45
+ children: _jsx(ModalContainer, {
46
+ "$width": modalSizes[size],
47
+ onClick: handleClose,
48
+ children: typeof children === 'function' ? children() : children
49
+ })
50
+ })]
51
+ })
52
+ }), element);
48
53
  }
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { CSSTransition } from 'react-transition-group';
3
3
  import styled, { createGlobalStyle } from 'styled-components';
4
4
  import { ShapeRadius } from '@pushwoosh/kit-constants';
@@ -21,14 +21,15 @@ function ModalBoxBase(props) {
21
21
  className,
22
22
  children
23
23
  } = props;
24
- return React.createElement(CSSTransition, {
24
+ return _jsx(CSSTransition, {
25
25
  appear: true,
26
26
  in: isOpen,
27
27
  timeout: animationTimeout,
28
28
  classNames: className,
29
29
  unmountOnExit: true,
30
- nodeRef: nodeRef
31
- }, children);
30
+ nodeRef: nodeRef,
31
+ children: children
32
+ });
32
33
  }
33
34
  export const ModalBoxTrans = styled(ModalBoxBase).withConfig({
34
35
  displayName: "ModalBoxTrans",
@@ -1,4 +1,5 @@
1
- import React, { useState, useCallback } from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState, useCallback } from 'react';
2
3
  import { Vertical, Horizontal } from '@pushwoosh/kit-helpers';
3
4
  import { Banner } from '../../../Banner';
4
5
  import { Button } from '../../../Button';
@@ -45,24 +46,37 @@ export function ModalConfirm(props) {
45
46
  setIsLoading(false);
46
47
  }
47
48
  }, [callback, onAccept, lang]);
48
- return React.createElement(Modal, {
49
+ return _jsxs(Modal, {
49
50
  size: size,
50
51
  isOpen: isOpen,
51
- onClose: onCancel
52
- }, React.createElement(ModalHeader, null, React.createElement(Vertical, {
53
- "$gap": 8
54
- }, React.createElement(ModalTitle, null, resolvedTitle), errorMessage && React.createElement(Banner, {
55
- type: "error",
56
- title: errorMessage
57
- }))), description && React.createElement(ModalBody, null, description), React.createElement(ModalFooter, null, React.createElement(Horizontal, {
58
- "$justifyContent": "end",
59
- "$gap": 8
60
- }, React.createElement(Button, {
61
- color: "secondary",
62
- onClick: onCancel
63
- }, resolvedCancelText), React.createElement(Button, {
64
- color: confirmButtonColor,
65
- isLoading: isLoading,
66
- onClick: handleConfirm
67
- }, resolvedConfirmText))));
52
+ onClose: onCancel,
53
+ children: [_jsx(ModalHeader, {
54
+ children: _jsxs(Vertical, {
55
+ "$gap": 8,
56
+ children: [_jsx(ModalTitle, {
57
+ children: resolvedTitle
58
+ }), errorMessage && _jsx(Banner, {
59
+ type: "error",
60
+ title: errorMessage
61
+ })]
62
+ })
63
+ }), description && _jsx(ModalBody, {
64
+ children: description
65
+ }), _jsx(ModalFooter, {
66
+ children: _jsxs(Horizontal, {
67
+ "$justifyContent": "end",
68
+ "$gap": 8,
69
+ children: [_jsx(Button, {
70
+ color: "secondary",
71
+ onClick: onCancel,
72
+ children: resolvedCancelText
73
+ }), _jsx(Button, {
74
+ color: confirmButtonColor,
75
+ isLoading: isLoading,
76
+ onClick: handleConfirm,
77
+ children: resolvedConfirmText
78
+ })]
79
+ })
80
+ })]
81
+ });
68
82
  }