@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.
- package/AccessForbidden/AccessForbidden.js +19 -5
- package/AccessForbidden/polyglot/index.d.ts +2 -0
- package/AccessForbidden/polyglot/index.js +10 -0
- package/AccessForbidden/polyglot/messages_en.d.ts +3 -0
- package/AccessForbidden/polyglot/messages_en.js +4 -0
- package/AccessForbidden/polyglot/messages_ru.d.ts +3 -0
- package/AccessForbidden/polyglot/messages_ru.js +4 -0
- package/AccessForbidden/polyglot/types.d.ts +5 -0
- package/AccessForbidden/polyglot/types.js +1 -0
- package/Alert/Alert.d.ts +1 -2
- package/Alert/Alert.js +31 -25
- package/ApplicationPreloader/ApplicationPreloader.d.ts +1 -2
- package/ApplicationPreloader/ApplicationPreloader.js +5 -4
- package/Badge/Badge.js +2 -2
- package/Banner/Banner.js +40 -24
- package/Button/Button.js +20 -9
- package/Button/RemoveButton.js +7 -6
- package/Calendar/CalendarDropdown/CalendarDropdown.js +121 -108
- package/Calendar/CalendarMonth/CalendarMonth.js +68 -66
- package/Calendar/CalendarMonthSlider/CalendarMonthSlider.d.ts +2 -2
- package/Calendar/CalendarMonthSlider/CalendarMonthSlider.js +68 -55
- package/Calendar/CalendarSuperForm/CalendarSuperForm.js +75 -70
- package/Calendar/CalendarSuperForm/components/CalendarRangePicker/CalendarRangePicker.d.ts +2 -2
- package/Calendar/CalendarSuperForm/components/CalendarRangePicker/CalendarRangePicker.js +3 -2
- package/Calendar/CalendarSuperForm/components/CalendarTimeAndTimezoneSection/CalendarTimeAndTimezoneSection.js +106 -88
- package/Calendar/CalendarSuperForm/components/CalendarTimeInput.d.ts +1 -2
- package/Calendar/CalendarSuperForm/components/CalendarTimeInput.js +2 -2
- package/Calendar/CalendarSuperForm/components/CalendarTimezoneSelect.js +3 -2
- package/CardMetric/CardChildren.js +9 -6
- package/CardMetric/CardCollapse.js +8 -6
- package/CardMetric/CardMetric.js +52 -33
- package/Checkbox/Checkbox.js +30 -24
- package/Chip/Chip.d.ts +6 -7
- package/Chip/Chip.js +22 -15
- package/CodeEditor/CodeEditor.d.ts +1 -2
- package/CodeEditor/CodeEditor.js +2 -2
- package/CrashScreen/CrashScreen.js +19 -6
- package/CrashScreen/polyglot/index.d.ts +2 -0
- package/CrashScreen/polyglot/index.js +10 -0
- package/CrashScreen/polyglot/messages_en.d.ts +3 -0
- package/CrashScreen/polyglot/messages_en.js +4 -0
- package/CrashScreen/polyglot/messages_ru.d.ts +3 -0
- package/CrashScreen/polyglot/messages_ru.js +4 -0
- package/CrashScreen/polyglot/types.d.ts +5 -0
- package/CrashScreen/polyglot/types.js +1 -0
- package/DateTimePicker/components/AutosizeInput/AutosizeInput.js +17 -13
- package/DateTimePicker/components/DatePicker/DatePicker.js +35 -32
- package/DateTimePicker/components/DatePickerField/DatePickerField.js +32 -22
- package/DateTimePicker/components/DateTimePicker/DateTimePicker.js +22 -20
- package/DateTimePicker/components/DateTimePickerField/DateTimePickerField.js +30 -22
- package/DateTimePicker/components/DecadeView/DecadeView.js +19 -17
- package/DateTimePicker/components/Input/Input.js +2 -2
- package/DateTimePicker/components/Month/Month.js +52 -21
- package/DateTimePicker/components/MonthView/MonthView.js +21 -17
- package/DateTimePicker/components/NumberPicker/NumberPicker.js +49 -40
- package/DateTimePicker/components/PickerPlate/PickerPlate.js +17 -14
- package/DateTimePicker/components/YearView/YearView.js +22 -18
- package/DateTimePicker/polyglot/index.d.ts +2 -0
- package/DateTimePicker/polyglot/index.js +9 -0
- package/DateTimePicker/polyglot/messages_en.d.ts +3 -0
- package/DateTimePicker/polyglot/messages_en.js +11 -0
- package/DateTimePicker/polyglot/messages_ru.d.ts +3 -0
- package/DateTimePicker/polyglot/messages_ru.js +11 -0
- package/DateTimePicker/polyglot/types.d.ts +12 -0
- package/DateTimePicker/polyglot/types.js +1 -0
- package/Drawer/components/Drawer/Drawer.js +18 -13
- package/Drawer/components/Drawer/styles.d.ts +2 -2
- package/Drawer/components/Drawer/styles.js +5 -4
- package/Drawer/components/DrawerDocs/DrawerDocs.js +28 -17
- package/Drawer/polyglot/index.d.ts +2 -0
- package/Drawer/polyglot/index.js +10 -0
- package/Drawer/polyglot/messages_en.d.ts +3 -0
- package/Drawer/polyglot/messages_en.js +4 -0
- package/Drawer/polyglot/messages_ru.d.ts +3 -0
- package/Drawer/polyglot/messages_ru.js +4 -0
- package/Drawer/polyglot/types.d.ts +5 -0
- package/Drawer/polyglot/types.js +1 -0
- package/DropdownMenu/components/DropdownMenu/DropdownMenu.js +28 -24
- package/DropdownMenu/components/DropdownMenuButton/DropdownMenuButton.js +8 -6
- package/DropdownMenu/components/DropdownMenuItem/DropdownMenuItem.js +6 -4
- package/DropdownMenu/components/DropdownMenuSection/DropdownMenuSection.js +13 -10
- package/DropdownMenu/components/DropdownMenuSubmenu/DropdownMenuSubmenu.js +40 -31
- package/EditableField/EditableField.js +56 -39
- package/EditableField/polyglot/index.d.ts +2 -0
- package/EditableField/polyglot/index.js +9 -0
- package/EditableField/polyglot/messages_en.d.ts +3 -0
- package/EditableField/polyglot/messages_en.js +4 -0
- package/EditableField/polyglot/messages_ru.d.ts +3 -0
- package/EditableField/polyglot/messages_ru.js +4 -0
- package/EditableField/polyglot/types.d.ts +5 -0
- package/EditableField/polyglot/types.js +1 -0
- package/EmailTemplatePreview/EmailTemplatePreview.js +10 -8
- package/EmailTemplatePreview/components/NoEmailTemplatePreview/NoEmailTemplatePreview.js +30 -16
- package/EmailTemplatePreview/polyglot/index.d.ts +2 -0
- package/EmailTemplatePreview/polyglot/index.js +10 -0
- package/EmailTemplatePreview/polyglot/messages_en.d.ts +3 -0
- package/EmailTemplatePreview/polyglot/messages_en.js +5 -0
- package/EmailTemplatePreview/polyglot/messages_ru.d.ts +3 -0
- package/EmailTemplatePreview/polyglot/messages_ru.js +5 -0
- package/EmailTemplatePreview/polyglot/types.d.ts +6 -0
- package/EmailTemplatePreview/polyglot/types.js +1 -0
- package/EnhancedInput/EnhancedInput.d.ts +3 -4
- package/EnhancedInput/EnhancedInput.js +14 -10
- package/EnhancedInput/SearchInput.js +3 -3
- package/ExportResult/ExportResult.js +33 -23
- package/ExternalImagePreview/ExternalImagePreview.js +24 -20
- package/FieldBox/FieldBox.js +50 -37
- package/FrequencyCapping/FrequencyCappingEdit.js +41 -33
- package/FrequencyCapping/FrequencyCappingInApps.js +41 -33
- package/FrequencyCapping/FrequencyCappingReadonly.d.ts +1 -2
- package/FrequencyCapping/FrequencyCappingReadonly.js +24 -20
- package/FrequencyCapping/components/Condition/index.d.ts +1 -2
- package/FrequencyCapping/components/Condition/index.js +24 -20
- package/FrequencyCapping/components/Description/index.d.ts +2 -2
- package/FrequencyCapping/components/Description/index.js +7 -5
- package/FrequencyCapping/components/Settings/EditCappingSettings.js +28 -20
- package/FrequencyCapping/components/Settings/EditInAppCappingSettings.js +86 -71
- package/FrequencyCapping/helpers/getReadonlyCappingHelpers.d.ts +1 -2
- package/FrequencyCapping/helpers/getReadonlyCappingHelpers.js +41 -32
- package/GetStartedPage/GetStartedPage.js +44 -25
- package/InputFile/InputFile.js +44 -35
- package/Link/Link.js +2 -2
- package/Modal/components/Modal/Modal.js +17 -12
- package/Modal/components/Modal/styles.js +5 -4
- package/Modal/components/ModalConfirm/ModalConfirm.js +51 -24
- package/Modal/components/ModalConfirm/ModalConfirmProvider.d.ts +2 -2
- package/Modal/components/ModalConfirm/ModalConfirmProvider.js +8 -6
- package/Modal/components/ModalConfirm/types.d.ts +1 -1
- package/Modal/components/ModalTitle/ModalTitle.js +10 -8
- package/Modal/polyglot/index.d.ts +2 -0
- package/Modal/polyglot/index.js +9 -0
- package/Modal/polyglot/messages_en.d.ts +3 -0
- package/Modal/polyglot/messages_en.js +6 -0
- package/Modal/polyglot/messages_ru.d.ts +3 -0
- package/Modal/polyglot/messages_ru.js +6 -0
- package/Modal/polyglot/types.d.ts +7 -0
- package/Modal/polyglot/types.js +1 -0
- package/NotificationInbox/NotificationBar.js +19 -11
- package/NotificationInbox/NotificationBell.js +21 -12
- package/NotificationInbox/NotificationInbox.js +160 -105
- package/NotificationInbox/polyglot/index.d.ts +2 -0
- package/NotificationInbox/polyglot/index.js +10 -0
- package/NotificationInbox/polyglot/messages_en.d.ts +3 -0
- package/NotificationInbox/polyglot/messages_en.js +8 -0
- package/NotificationInbox/polyglot/messages_ru.d.ts +3 -0
- package/NotificationInbox/polyglot/messages_ru.js +8 -0
- package/NotificationInbox/polyglot/types.d.ts +11 -0
- package/NotificationInbox/polyglot/types.js +1 -0
- package/NumberPicker/NumberPicker.js +53 -44
- package/NumberPicker/components/AutosizeInput/AutosizeInput.js +19 -15
- package/PageHeader/components/AutosizeInput/AutosizeInput.js +30 -22
- package/PageHeader/components/PageHeader/PageHeader.js +44 -27
- package/PageHeader/components/PageHeaderEditable/PageHeaderEditable.js +51 -34
- package/PageHeader/components/PageHeaderError/PageHeaderError.js +17 -10
- package/PageHeader/components/PageHeaderSkeleton/PageHeaderSkeleton.js +20 -16
- package/Pagination/Pagination.js +60 -49
- package/Popover/Popover.js +6 -5
- package/ProgressBar/ProgressBar.js +25 -10
- package/PushPreview/PushPreview.js +30 -22
- package/PushPreview/components/MissedContentPreview/MissedContentPreview.js +23 -11
- package/PushPreview/components/SilentPushPreview/SilentPushPreview.js +20 -13
- package/PushPreview/polyglot/index.d.ts +2 -0
- package/PushPreview/polyglot/index.js +9 -0
- package/PushPreview/polyglot/messages_en.d.ts +3 -0
- package/PushPreview/polyglot/messages_en.js +4 -0
- package/PushPreview/polyglot/messages_ru.d.ts +3 -0
- package/PushPreview/polyglot/messages_ru.js +4 -0
- package/PushPreview/polyglot/types.d.ts +5 -0
- package/PushPreview/polyglot/types.js +1 -0
- package/Radio/Radio.js +32 -26
- package/RadioCard/RadioCard.js +17 -9
- package/ReCaptcha/ReCaptcha.js +2 -2
- package/RichMessageEditor/EditorEmojiPicker.js +9 -7
- package/RichMessageEditor/RichMessageEditor.js +77 -67
- package/RichMessageEditor/RichMessageViewer.js +19 -13
- package/RichMessageEditor/slate/DynamicContentElement.d.ts +1 -2
- package/RichMessageEditor/slate/DynamicContentElement.js +13 -9
- package/RichMessageEditor/slate/SlateEditor.js +9 -7
- package/RichmediaPreview/RichmediaPreview.js +13 -11
- package/Select/Select.js +10 -8
- package/SendRate/SendRateEdit.d.ts +1 -2
- package/SendRate/SendRateEdit.js +42 -34
- package/SendRate/SendRateReadonly.d.ts +1 -2
- package/SendRate/SendRateReadonly.js +24 -20
- package/SendRate/components/Condition/index.d.ts +1 -2
- package/SendRate/components/Condition/index.js +15 -13
- package/SendRate/components/Description/index.d.ts +2 -2
- package/SendRate/components/Description/index.js +30 -22
- package/SendRate/components/Settings/index.d.ts +1 -2
- package/SendRate/components/Settings/index.js +20 -14
- package/SendRate/helpers/getReadonlySendRateHelpers.d.ts +1 -2
- package/SendRate/helpers/getReadonlySendRateHelpers.js +39 -30
- package/Skeleton/TextSkeleton.js +5 -4
- package/SortButton/SortButton.js +11 -7
- package/Spinner/Spinner.js +7 -4
- package/StatisticCard/StatisticCard.js +44 -29
- package/Switch/Switch.js +16 -13
- package/Tabs/components/Tab/Tab.d.ts +3 -4
- package/Tabs/components/Tab/Tab.js +6 -4
- package/Tabs/components/TabBar/TabBar.d.ts +3 -4
- package/Tabs/components/TabBar/TabBar.js +12 -4
- package/Tabs/components/TabBarScrollableFrame/TabBarScrollableFrame.d.ts +1 -2
- package/Tabs/components/TabBarScrollableFrame/TabBarScrollableFrame.js +27 -21
- package/Tabs/components/TabBase/TabBase.d.ts +3 -4
- package/Tabs/components/TabBase/TabBase.js +11 -6
- package/Tabs/components/TabPanel/TabPanel.js +4 -2
- package/Tabs/components/Tabs/Tabs.js +8 -4
- package/Toast/Toast.js +31 -18
- package/Toast/ToastProvider.d.ts +2 -3
- package/Toast/ToastProvider.js +10 -8
- package/Tooltip/Tooltip.js +2 -2
- package/Tooltip/TooltipTrigger.js +13 -11
- package/package.json +2 -2
- package/polyglot/__tests__/render.test.js +46 -16
- package/polyglot/liquid/render.d.ts +2 -2
- package/polyglot/liquid/render.js +7 -6
- package/polyglot/react.js +7 -5
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
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
|
|
68
|
+
return _jsx(Container, {
|
|
68
69
|
"$padding": 16,
|
|
69
70
|
"$bgColor": Color.SOFT_LIGHT,
|
|
70
|
-
"$borderRadius": 8
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
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
|
-
}
|
|
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
|
|
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
|
|
61
|
+
return _jsx(Container, {
|
|
61
62
|
"$padding": 16,
|
|
62
63
|
"$bgColor": Color.SOFT_LIGHT,
|
|
63
|
-
"$borderRadius": 8
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
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
|
-
}
|
|
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>):
|
|
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
|
|
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
|
|
23
|
-
"$gap": 24
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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):
|
|
6
|
+
export declare function ChipFrequencyCapping({ text, tooltip, $inText }: ChipFrequencyCappingProps): import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
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
|
|
13
|
-
"$inText": $inText
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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
|
|
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):
|
|
11
|
+
export declare function Description(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
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
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
return _jsxs(Paragraph, {
|
|
28
|
+
children: [prefix, chip && _jsx(ChipFrequencyCapping, {
|
|
29
|
+
text: chip,
|
|
30
|
+
"$inText": true
|
|
31
|
+
}), suffix, ' ', children]
|
|
32
|
+
});
|
|
31
33
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
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
|
|
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
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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
|
|
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
|
|
91
|
-
"$gap": 8
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
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):
|
|
6
|
+
}, isInJourney: boolean, lang: FrequencyCappingLang): import("react/jsx-runtime").JSX.Element;
|