@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,3 +1,2 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { type SendRateReadonlyProps, type SendRateBase } from './types';
|
|
3
|
-
export declare function SendRateReadonly<T extends SendRateBase>({ sendRate, globalSendRate, applicationCode, editGlobalClicked, }: SendRateReadonlyProps<T>):
|
|
2
|
+
export declare function SendRateReadonly<T extends SendRateBase>({ sendRate, globalSendRate, applicationCode, editGlobalClicked, }: SendRateReadonlyProps<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';
|
|
@@ -18,23 +18,27 @@ export function SendRateReadonly({
|
|
|
18
18
|
const isGlobalSendRateDisabled = globalSendRate.count === 0 && globalSendRate.seconds === 0;
|
|
19
19
|
const globalSendRateLinkText = getGlobalSendRateLinkText(lang, isGlobalSendRateDisabled);
|
|
20
20
|
const label = getReadonlySendRateLabel(sendRate, isGlobalSendRateDisabled, globalSendRate, lang);
|
|
21
|
-
return
|
|
22
|
-
"$gap": 24
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
21
|
+
return _jsx(Vertical, {
|
|
22
|
+
"$gap": 24,
|
|
23
|
+
children: _jsxs(Horizontal, {
|
|
24
|
+
"$gap": 8,
|
|
25
|
+
"$justifyContent": "start",
|
|
26
|
+
"$alignItems": "center",
|
|
27
|
+
children: [label, policy === 'GLOBAL' && _jsx(Link, {
|
|
28
|
+
href: `/applications/${applicationCode}/message-delivery?tab=sendRate`,
|
|
29
|
+
title: globalSendRateLinkText,
|
|
30
|
+
target: "_blank",
|
|
31
|
+
onClick: editGlobalClicked,
|
|
32
|
+
children: _jsxs(Horizontal, {
|
|
33
|
+
"$gap": 4,
|
|
34
|
+
"$justifyContent": "start",
|
|
35
|
+
"$alignItems": "center",
|
|
36
|
+
children: [globalSendRateLinkText, _jsx(OpenIcon, {
|
|
37
|
+
size: "small",
|
|
38
|
+
view: "lined"
|
|
39
|
+
})]
|
|
40
|
+
})
|
|
41
|
+
})]
|
|
42
|
+
})
|
|
43
|
+
});
|
|
40
44
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
type ChipSendRateProps = {
|
|
3
2
|
messages: number;
|
|
4
3
|
tooltip?: string;
|
|
5
4
|
$inText?: boolean;
|
|
6
5
|
};
|
|
7
|
-
export declare function ChipSendRate({ messages, $inText }: ChipSendRateProps):
|
|
6
|
+
export declare function ChipSendRate({ messages, $inText }: ChipSendRateProps): import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { ChipWithinTextContainer } from './styles';
|
|
3
3
|
import { Chip } from '../../../Chip';
|
|
4
4
|
import { useLang } from '../../polyglot';
|
|
@@ -7,16 +7,18 @@ export function ChipSendRate({
|
|
|
7
7
|
$inText = false
|
|
8
8
|
}) {
|
|
9
9
|
const lang = useLang();
|
|
10
|
-
return
|
|
11
|
-
"$inText": $inText
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
10
|
+
return _jsx(ChipWithinTextContainer, {
|
|
11
|
+
"$inText": $inText,
|
|
12
|
+
children: _jsx(Chip, {
|
|
13
|
+
"$variant": "primary",
|
|
14
|
+
"$readOnly": true,
|
|
15
|
+
as: "span",
|
|
16
|
+
children: messages === 0 ? lang({
|
|
17
|
+
message: 'DUMB.SEND_RATE.CHIP.UNLIMITED'
|
|
18
|
+
}) : lang({
|
|
19
|
+
message: 'DUMB.SEND_RATE.CHIP.RATE',
|
|
20
|
+
messages
|
|
21
|
+
})
|
|
22
|
+
})
|
|
23
|
+
});
|
|
22
24
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
2
|
import { type SendRatePolicy } from '../../types';
|
|
3
3
|
type DescriptionProps = {
|
|
4
4
|
sendRateOption: SendRatePolicy;
|
|
@@ -6,5 +6,5 @@ type DescriptionProps = {
|
|
|
6
6
|
seconds: number;
|
|
7
7
|
children?: ReactNode;
|
|
8
8
|
};
|
|
9
|
-
export declare function Description(props: DescriptionProps):
|
|
9
|
+
export declare function Description(props: DescriptionProps): import("react/jsx-runtime").JSX.Element | undefined;
|
|
10
10
|
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 { useLang } from '../../polyglot';
|
|
4
4
|
import { ChipSendRate } from '../Condition';
|
|
@@ -12,32 +12,40 @@ export function Description(props) {
|
|
|
12
12
|
const lang = useLang();
|
|
13
13
|
if (sendRateOption === 'GLOBAL') {
|
|
14
14
|
if (messages === 0 && seconds === 0) {
|
|
15
|
-
return
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
return _jsxs(Paragraph, {
|
|
16
|
+
children: [lang({
|
|
17
|
+
message: 'DUMB.SEND_RATE.DESC.GLOBAL_UNSET_PREFIX'
|
|
18
|
+
}), _jsx(ChipSendRate, {
|
|
19
|
+
messages: 0,
|
|
20
|
+
"$inText": true
|
|
21
|
+
}), lang({
|
|
22
|
+
message: 'DUMB.SEND_RATE.DESC.GLOBAL_UNSET_SUFFIX'
|
|
23
|
+
}), ' ', children]
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
return _jsxs(Paragraph, {
|
|
27
|
+
children: [lang({
|
|
28
|
+
message: 'DUMB.SEND_RATE.DESC.GLOBAL_SET_PREFIX'
|
|
29
|
+
}), _jsx(ChipSendRate, {
|
|
30
|
+
messages: messages,
|
|
19
31
|
"$inText": true
|
|
20
32
|
}), lang({
|
|
21
|
-
message: 'DUMB.SEND_RATE.DESC.
|
|
22
|
-
}), ' ', children
|
|
23
|
-
}
|
|
24
|
-
return React.createElement(Paragraph, null, lang({
|
|
25
|
-
message: 'DUMB.SEND_RATE.DESC.GLOBAL_SET_PREFIX'
|
|
26
|
-
}), React.createElement(ChipSendRate, {
|
|
27
|
-
messages: messages,
|
|
28
|
-
"$inText": true
|
|
29
|
-
}), lang({
|
|
30
|
-
message: 'DUMB.SEND_RATE.DESC.GLOBAL_SET_SUFFIX'
|
|
31
|
-
}), ' ', children);
|
|
33
|
+
message: 'DUMB.SEND_RATE.DESC.GLOBAL_SET_SUFFIX'
|
|
34
|
+
}), ' ', children]
|
|
35
|
+
});
|
|
32
36
|
}
|
|
33
37
|
if (sendRateOption === 'CUSTOM') {
|
|
34
|
-
return
|
|
35
|
-
|
|
36
|
-
|
|
38
|
+
return _jsxs(Paragraph, {
|
|
39
|
+
children: [lang({
|
|
40
|
+
message: 'DUMB.SEND_RATE.DESC.CUSTOM'
|
|
41
|
+
}), ' ', children]
|
|
42
|
+
});
|
|
37
43
|
}
|
|
38
44
|
if (sendRateOption === 'IGNORE') {
|
|
39
|
-
return
|
|
40
|
-
|
|
41
|
-
|
|
45
|
+
return _jsxs(Paragraph, {
|
|
46
|
+
children: [lang({
|
|
47
|
+
message: 'DUMB.SEND_RATE.DESC.IGNORE'
|
|
48
|
+
}), ' ', children]
|
|
49
|
+
});
|
|
42
50
|
}
|
|
43
51
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
type Props = {
|
|
3
2
|
messages: number;
|
|
4
3
|
onChange: (messages: number) => void;
|
|
5
4
|
minValue: number;
|
|
6
5
|
maxValue: number;
|
|
7
6
|
};
|
|
8
|
-
export declare function EditSendRateSettings(props: Props):
|
|
7
|
+
export declare function EditSendRateSettings(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export {};
|
|
@@ -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';
|
|
@@ -10,23 +11,28 @@ export function EditSendRateSettings(props) {
|
|
|
10
11
|
minValue,
|
|
11
12
|
maxValue
|
|
12
13
|
} = props;
|
|
13
|
-
const onMessagesChange =
|
|
14
|
+
const onMessagesChange = useCallback(value => {
|
|
14
15
|
onChange(value);
|
|
15
16
|
}, [onChange]);
|
|
16
|
-
return
|
|
17
|
+
return _jsxs(Horizontal, {
|
|
17
18
|
"$gap": 12,
|
|
18
19
|
"$alignItems": "center",
|
|
19
20
|
style: {
|
|
20
21
|
gridTemplateColumns: '145px 70px 150px'
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
22
|
+
},
|
|
23
|
+
children: [_jsx(Paragraph, {
|
|
24
|
+
children: _jsx(Lang, {
|
|
25
|
+
message: "DUMB.SEND_RATE.SETTINGS.LIMIT_TO_MAX"
|
|
26
|
+
})
|
|
27
|
+
}), _jsx(NumberPicker, {
|
|
28
|
+
onChange: value => onMessagesChange(value),
|
|
29
|
+
value: messages,
|
|
30
|
+
minValue: minValue,
|
|
31
|
+
maxValue: maxValue
|
|
32
|
+
}), _jsx(Paragraph, {
|
|
33
|
+
children: _jsx(Lang, {
|
|
34
|
+
message: "DUMB.SEND_RATE.SETTINGS.MESSAGES_PER_SEC"
|
|
35
|
+
})
|
|
36
|
+
})]
|
|
37
|
+
});
|
|
32
38
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { type SendRateLang } from '../polyglot';
|
|
3
2
|
import { type SendRateBase } from '../types';
|
|
4
3
|
export declare function getReadonlySendRateLabel<T extends SendRateBase>(sendRateOption: T, isGlobalSendRateDisabled: boolean, globalSendRate: {
|
|
5
4
|
count: number;
|
|
6
5
|
seconds: number;
|
|
7
|
-
}, lang: SendRateLang):
|
|
6
|
+
}, lang: SendRateLang): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
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 { Tooltip } from '../../Tooltip';
|
|
@@ -11,40 +11,49 @@ export function getReadonlySendRateLabel(sendRateOption, isGlobalSendRateDisable
|
|
|
11
11
|
} = sendRateOption;
|
|
12
12
|
const tooltip = getReadonlyTooltip(policy, lang);
|
|
13
13
|
if (policy === 'CUSTOM') {
|
|
14
|
-
return
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
return _jsxs(_Fragment, {
|
|
15
|
+
children: [lang({
|
|
16
|
+
message: 'DUMB.SEND_RATE.RO.CUSTOM_LABEL'
|
|
17
|
+
}), _jsx(ChipSendRate, {
|
|
18
|
+
messages: sendRate
|
|
19
|
+
})]
|
|
20
|
+
});
|
|
19
21
|
}
|
|
20
22
|
if (policy === 'IGNORE') {
|
|
21
|
-
return
|
|
23
|
+
return _jsxs(Horizontal, {
|
|
22
24
|
"$alignItems": "center",
|
|
23
25
|
"$gap": 4,
|
|
24
|
-
"$justifyContent": "start"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
26
|
+
"$justifyContent": "start",
|
|
27
|
+
children: [lang({
|
|
28
|
+
message: 'DUMB.SEND_RATE.RO.IGNORE_LABEL'
|
|
29
|
+
}), _jsx(Tooltip, {
|
|
30
|
+
content: tooltip,
|
|
31
|
+
position: "top-middle",
|
|
32
|
+
children: _jsx(IconWrapper, {
|
|
33
|
+
"$padding": "4px 0",
|
|
34
|
+
children: _jsx(HelpRoundIcon, {
|
|
35
|
+
size: "small",
|
|
36
|
+
view: "lined"
|
|
37
|
+
})
|
|
38
|
+
})
|
|
39
|
+
})]
|
|
40
|
+
});
|
|
36
41
|
}
|
|
37
|
-
return isGlobalSendRateDisabled ?
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
})
|
|
46
|
-
|
|
47
|
-
|
|
42
|
+
return isGlobalSendRateDisabled ? _jsxs(_Fragment, {
|
|
43
|
+
children: [lang({
|
|
44
|
+
message: 'DUMB.SEND_RATE.RO.GLOBAL_LABEL'
|
|
45
|
+
}), _jsx(ChipSendRate, {
|
|
46
|
+
messages: 0
|
|
47
|
+
}), lang({
|
|
48
|
+
message: 'DUMB.SEND_RATE.RO.BECAUSE_UNSET'
|
|
49
|
+
})]
|
|
50
|
+
}) : _jsxs(_Fragment, {
|
|
51
|
+
children: [lang({
|
|
52
|
+
message: 'DUMB.SEND_RATE.RO.GLOBAL_LABEL'
|
|
53
|
+
}), _jsx(ChipSendRate, {
|
|
54
|
+
messages: globalSendRate.count
|
|
55
|
+
})]
|
|
56
|
+
});
|
|
48
57
|
}
|
|
49
58
|
function getReadonlyTooltip(sendRateOption, lang) {
|
|
50
59
|
if (sendRateOption === 'IGNORE') {
|
package/Skeleton/TextSkeleton.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { TextSkeletonTag } from './styles';
|
|
3
3
|
export function TextSkeleton(props) {
|
|
4
4
|
const {
|
|
@@ -6,11 +6,12 @@ export function TextSkeleton(props) {
|
|
|
6
6
|
width,
|
|
7
7
|
...rest
|
|
8
8
|
} = props;
|
|
9
|
-
return
|
|
9
|
+
return _jsx(TextSkeletonTag, {
|
|
10
10
|
as: width ? 'div' : 'span',
|
|
11
11
|
style: width ? {
|
|
12
12
|
width
|
|
13
13
|
} : undefined,
|
|
14
|
-
...rest
|
|
15
|
-
|
|
14
|
+
...rest,
|
|
15
|
+
children: children || '-'
|
|
16
|
+
});
|
|
16
17
|
}
|
package/SortButton/SortButton.js
CHANGED
|
@@ -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 { SortIcon } from '@pushwoosh/kit-icons';
|
|
3
4
|
import { AVAILABLE_ACTIVE_ORDERS } from './constants';
|
|
4
5
|
import { IconTypeByOrderMap, NextOrderMap, ReversedNextOrderMap } from './maps';
|
|
@@ -19,15 +20,18 @@ export function SortButton(props) {
|
|
|
19
20
|
order: isReversed ? ReversedNextOrderMap[order || 'none'] : NextOrderMap[order || 'none']
|
|
20
21
|
});
|
|
21
22
|
}, [name, order, isReversed, onClick]);
|
|
22
|
-
return
|
|
23
|
+
return _jsxs(SortButtonBox, {
|
|
23
24
|
ref: boxRef,
|
|
24
25
|
type: "button",
|
|
25
26
|
...rest,
|
|
26
27
|
onClick: handleClick,
|
|
27
|
-
"$isActive": AVAILABLE_ACTIVE_ORDERS.includes(order)
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
"$isActive": AVAILABLE_ACTIVE_ORDERS.includes(order),
|
|
29
|
+
children: [_jsx("span", {
|
|
30
|
+
children: children
|
|
31
|
+
}), _jsx(SortIcon, {
|
|
32
|
+
size: "small",
|
|
33
|
+
type: IconTypeByOrderMap[order || 'none']
|
|
34
|
+
})]
|
|
35
|
+
});
|
|
32
36
|
}
|
|
33
37
|
SortButton.displayName = 'SortButton';
|
package/Spinner/Spinner.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { AssetsMap } from './assets';
|
|
3
3
|
import { SpinnerBox, SpinnerAnimate } from './styles';
|
|
4
4
|
export function Spinner(props) {
|
|
@@ -12,9 +12,12 @@ export function Spinner(props) {
|
|
|
12
12
|
console.error(`[Spinner]: incorrect size: ${size}!`);
|
|
13
13
|
return null;
|
|
14
14
|
}
|
|
15
|
-
return
|
|
15
|
+
return _jsx(SpinnerBox, {
|
|
16
16
|
...rest,
|
|
17
17
|
size: size,
|
|
18
|
-
ref: boxRef
|
|
19
|
-
|
|
18
|
+
ref: boxRef,
|
|
19
|
+
children: _jsx(SpinnerAnimate, {
|
|
20
|
+
children: _jsx(Icon, {})
|
|
21
|
+
})
|
|
22
|
+
});
|
|
20
23
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from 'react';
|
|
2
3
|
import { Color } from '@pushwoosh/kit-constants';
|
|
3
4
|
import { formatNumber, Horizontal } from '@pushwoosh/kit-helpers';
|
|
4
5
|
import { KebabIcon } from '@pushwoosh/kit-icons';
|
|
@@ -24,30 +25,36 @@ export function StatisticCard(props) {
|
|
|
24
25
|
} = props;
|
|
25
26
|
const statisticValue = useMemo(() => {
|
|
26
27
|
if (isLoading) {
|
|
27
|
-
return
|
|
28
|
+
return _jsx(TextSkeleton, {
|
|
28
29
|
width: "92px"
|
|
29
30
|
});
|
|
30
31
|
}
|
|
31
32
|
if (valueSubtext) {
|
|
32
|
-
return
|
|
33
|
+
return _jsxs(Horizontal, {
|
|
33
34
|
"$alignItems": "end",
|
|
34
|
-
"$gap": 8
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
"$gap": 8,
|
|
36
|
+
children: [_jsx(StatValue, {
|
|
37
|
+
children: typeof value === 'number' ? formatNumber(value, 'spaced') : value
|
|
38
|
+
}), _jsx(Text, {
|
|
39
|
+
"$variant": "footnote",
|
|
40
|
+
"$color": Color.LOCKED,
|
|
41
|
+
children: valueSubtext
|
|
42
|
+
})]
|
|
43
|
+
});
|
|
39
44
|
}
|
|
40
|
-
return
|
|
45
|
+
return _jsx(StatValue, {
|
|
46
|
+
children: typeof value === 'number' ? formatNumber(value, 'spaced') : value
|
|
47
|
+
});
|
|
41
48
|
}, [isLoading, value, valueSubtext]);
|
|
42
|
-
const resolvedRightSlot = rightSlot ?? (actions ?
|
|
49
|
+
const resolvedRightSlot = rightSlot ?? (actions ? _jsx(DropdownMenu, {
|
|
43
50
|
renderHandler: ({
|
|
44
51
|
onClick,
|
|
45
52
|
ref,
|
|
46
53
|
isOpen
|
|
47
|
-
}) =>
|
|
54
|
+
}) => _jsx(Button, {
|
|
48
55
|
color: "secondary",
|
|
49
56
|
view: "ghost",
|
|
50
|
-
icon:
|
|
57
|
+
icon: _jsx(KebabIcon, {
|
|
51
58
|
size: "small"
|
|
52
59
|
}),
|
|
53
60
|
onClick: onClick,
|
|
@@ -57,26 +64,34 @@ export function StatisticCard(props) {
|
|
|
57
64
|
width: '28px',
|
|
58
65
|
height: '28px'
|
|
59
66
|
}
|
|
67
|
+
}),
|
|
68
|
+
children: _jsx(DropdownMenuSection, {
|
|
69
|
+
children: actions.map(a => _jsx(DropdownMenuItem, {
|
|
70
|
+
onClick: a.onClick,
|
|
71
|
+
disabled: a.disabled,
|
|
72
|
+
children: _jsx(Text, {
|
|
73
|
+
"$ellipsis": true,
|
|
74
|
+
children: a.label
|
|
75
|
+
})
|
|
76
|
+
}, a.id))
|
|
60
77
|
})
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
onClick: a.onClick,
|
|
64
|
-
disabled: a.disabled
|
|
65
|
-
}, React.createElement(Text, {
|
|
66
|
-
"$ellipsis": true
|
|
67
|
-
}, a.label))))) : null);
|
|
68
|
-
return React.createElement(Container, {
|
|
78
|
+
}) : null);
|
|
79
|
+
return _jsxs(Container, {
|
|
69
80
|
"$active": active,
|
|
70
81
|
"$selectable": selectable,
|
|
71
82
|
"$width": width,
|
|
72
83
|
onClick: onClick,
|
|
73
|
-
...rest
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
84
|
+
...rest,
|
|
85
|
+
children: [_jsx(Title, {
|
|
86
|
+
"$hasRightSlot": !!resolvedRightSlot,
|
|
87
|
+
children: title
|
|
88
|
+
}), resolvedRightSlot && _jsx(RightSlotContainer, {
|
|
89
|
+
onClick: e => e.stopPropagation(),
|
|
90
|
+
children: resolvedRightSlot
|
|
91
|
+
}), statisticValue, footer && _jsx(Text, {
|
|
92
|
+
"$variant": "footnote",
|
|
93
|
+
"$color": Color.LOCKED,
|
|
94
|
+
children: footer
|
|
95
|
+
})]
|
|
96
|
+
});
|
|
82
97
|
}
|
package/Switch/Switch.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Container, Box, Circle, Label } from './styles';
|
|
3
3
|
export function Switch({
|
|
4
4
|
labelPosition = 'right',
|
|
@@ -7,16 +7,19 @@ export function Switch({
|
|
|
7
7
|
children,
|
|
8
8
|
onChange
|
|
9
9
|
}) {
|
|
10
|
-
return
|
|
11
|
-
labelPosition: labelPosition
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
10
|
+
return _jsxs(Container, {
|
|
11
|
+
labelPosition: labelPosition,
|
|
12
|
+
children: [_jsx(Box, {
|
|
13
|
+
enabled: enabled,
|
|
14
|
+
isDisabled: isDisabled,
|
|
15
|
+
onClick: onChange,
|
|
16
|
+
children: _jsx(Circle, {
|
|
17
|
+
enabled: enabled,
|
|
18
|
+
isDisabled: isDisabled
|
|
19
|
+
})
|
|
20
|
+
}), children && _jsx(Label, {
|
|
21
|
+
labelPosition: labelPosition,
|
|
22
|
+
children: children
|
|
23
|
+
})]
|
|
24
|
+
});
|
|
22
25
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const Tab: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref" | "onClick"> & Readonly<{
|
|
1
|
+
export declare const Tab: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref" | "onClick"> & Readonly<{
|
|
3
2
|
code: import("../..").TabCode;
|
|
4
3
|
onActivate?: (code: import("../..").TabCode) => void;
|
|
5
4
|
isDisabled?: boolean;
|
|
6
5
|
isNew?: boolean;
|
|
7
|
-
icon?:
|
|
8
|
-
}> &
|
|
6
|
+
icon?: import("react").ReactNode;
|
|
7
|
+
}> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
2
3
|
import { TabBase } from '../TabBase';
|
|
3
4
|
import { useTabsContext } from '../../context';
|
|
4
5
|
export const Tab = forwardRef((props, ref) => {
|
|
@@ -12,7 +13,7 @@ export const Tab = forwardRef((props, ref) => {
|
|
|
12
13
|
activeTabCode,
|
|
13
14
|
setActiveTabCode
|
|
14
15
|
} = useTabsContext();
|
|
15
|
-
return
|
|
16
|
+
return _jsx(TabBase, {
|
|
16
17
|
isActive: code === activeTabCode,
|
|
17
18
|
ref: ref,
|
|
18
19
|
onClick: () => {
|
|
@@ -21,6 +22,7 @@ export const Tab = forwardRef((props, ref) => {
|
|
|
21
22
|
onActivate === null || onActivate === void 0 || onActivate(code);
|
|
22
23
|
}
|
|
23
24
|
},
|
|
24
|
-
...rest
|
|
25
|
-
|
|
25
|
+
...rest,
|
|
26
|
+
children: children
|
|
27
|
+
});
|
|
26
28
|
});
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}> & React.RefAttributes<HTMLDivElement>>;
|
|
1
|
+
export declare const TabBar: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & Readonly<{
|
|
2
|
+
title?: import("react").ReactNode;
|
|
3
|
+
}> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
2
3
|
import { H4 } from '@pushwoosh/kit-typography';
|
|
3
4
|
import { TabBarTitleBox, TabBarContainer } from './styles';
|
|
4
5
|
import { TabBarScrollableFrame } from '../TabBarScrollableFrame';
|
|
@@ -8,9 +9,16 @@ export const TabBar = forwardRef((props, ref) => {
|
|
|
8
9
|
title,
|
|
9
10
|
...rest
|
|
10
11
|
} = props;
|
|
11
|
-
return
|
|
12
|
+
return _jsxs(TabBarContainer, {
|
|
12
13
|
hasTitle: !!title,
|
|
13
14
|
ref: ref,
|
|
14
|
-
...rest
|
|
15
|
-
|
|
15
|
+
...rest,
|
|
16
|
+
children: [title && _jsx(TabBarTitleBox, {
|
|
17
|
+
children: _jsx(H4, {
|
|
18
|
+
children: title
|
|
19
|
+
})
|
|
20
|
+
}), _jsx(TabBarScrollableFrame, {
|
|
21
|
+
children: children
|
|
22
|
+
})]
|
|
23
|
+
});
|
|
16
24
|
});
|