@pushwoosh/smart-components-kit 1.0.88 → 1.0.90
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/CampaignsConfigurationDrawer/CampaignsConfigurationDrawer.js +50 -16
- package/CampaignsConfigurationDrawer/polyglot/index.d.ts +2 -0
- package/CampaignsConfigurationDrawer/polyglot/index.js +10 -0
- package/CampaignsConfigurationDrawer/polyglot/messages_en.d.ts +3 -0
- package/CampaignsConfigurationDrawer/polyglot/messages_en.js +18 -0
- package/CampaignsConfigurationDrawer/polyglot/messages_ru.d.ts +3 -0
- package/CampaignsConfigurationDrawer/polyglot/messages_ru.js +18 -0
- package/CampaignsConfigurationDrawer/polyglot/types.d.ts +19 -0
- package/CampaignsConfigurationDrawer/polyglot/types.js +1 -0
- package/DynamicContentPickerForm/DynamicContentCustomPickerForm.js +5 -1
- package/DynamicContentPickerForm/DynamicContentEventPickerForm.js +11 -3
- package/DynamicContentPickerForm/DynamicContentTagPickerForm.js +11 -3
- package/DynamicContentPickerForm/SimpleDynamicContentPickerFormSmart.js +8 -2
- package/DynamicContentPickerForm/VariedDynamicContentPickerFormSmart.js +28 -14
- package/DynamicContentPickerForm/polyglot/index.d.ts +2 -0
- package/DynamicContentPickerForm/polyglot/index.js +10 -0
- package/DynamicContentPickerForm/polyglot/messages_en.d.ts +3 -0
- package/DynamicContentPickerForm/polyglot/messages_en.js +16 -0
- package/DynamicContentPickerForm/polyglot/messages_ru.d.ts +3 -0
- package/DynamicContentPickerForm/polyglot/messages_ru.js +16 -0
- package/DynamicContentPickerForm/polyglot/types.d.ts +17 -0
- package/DynamicContentPickerForm/polyglot/types.js +1 -0
- package/EmailTemplatePreview/EmailTemplatePreview.js +5 -1
- package/EmailTemplatePreview/polyglot/index.d.ts +5 -0
- package/EmailTemplatePreview/polyglot/index.js +10 -0
- package/EmailTemplatePreview/polyglot/messages_en.d.ts +3 -0
- package/EmailTemplatePreview/polyglot/messages_en.js +3 -0
- package/EmailTemplatePreview/polyglot/messages_ru.d.ts +3 -0
- package/EmailTemplatePreview/polyglot/messages_ru.js +3 -0
- package/EmailTemplatePreview/polyglot/types.d.ts +4 -0
- package/EmailTemplatePreview/polyglot/types.js +1 -0
- package/ExportCSV/ExportCsvBanner/ExportCsvBanner.js +24 -8
- package/ExportCSV/polyglot/index.d.ts +2 -0
- package/ExportCSV/polyglot/index.js +10 -0
- package/ExportCSV/polyglot/messages_en.d.ts +3 -0
- package/ExportCSV/polyglot/messages_en.js +9 -0
- package/ExportCSV/polyglot/messages_ru.d.ts +3 -0
- package/ExportCSV/polyglot/messages_ru.js +9 -0
- package/ExportCSV/polyglot/types.d.ts +10 -0
- package/ExportCSV/polyglot/types.js +1 -0
- package/MediaStore/CreateVariantDrawer.d.ts +12 -0
- package/MediaStore/CreateVariantDrawer.js +216 -0
- package/MediaStore/MediaStore.d.ts +12 -0
- package/MediaStore/MediaStore.js +258 -0
- package/MediaStore/index.d.ts +1 -0
- package/MediaStore/index.js +1 -0
- package/MediaStore/mediaFile.utils.d.ts +5 -0
- package/MediaStore/mediaFile.utils.js +10 -0
- package/MediaStore/polyglot/index.d.ts +2 -0
- package/MediaStore/polyglot/index.js +10 -0
- package/MediaStore/polyglot/messages_en.d.ts +3 -0
- package/MediaStore/polyglot/messages_en.js +28 -0
- package/MediaStore/polyglot/messages_ru.d.ts +3 -0
- package/MediaStore/polyglot/messages_ru.js +28 -0
- package/MediaStore/polyglot/types.d.ts +31 -0
- package/MediaStore/polyglot/types.js +1 -0
- package/MediaStore/styled.d.ts +27 -0
- package/MediaStore/styled.js +95 -0
- package/OpenActions/components/OpenActionsSummary/OpenActionsSummary.js +47 -3
- package/OpenActions/polyglot/index.d.ts +2 -0
- package/OpenActions/polyglot/index.js +10 -0
- package/OpenActions/polyglot/messages_en.d.ts +3 -0
- package/OpenActions/polyglot/messages_en.js +14 -0
- package/OpenActions/polyglot/messages_ru.d.ts +3 -0
- package/OpenActions/polyglot/messages_ru.js +14 -0
- package/OpenActions/polyglot/types.d.ts +18 -0
- package/OpenActions/polyglot/types.js +1 -0
- package/PlatformsConfigurationDrawer/components/DesktopPage/DesktopPage.js +29 -9
- package/PlatformsConfigurationDrawer/components/MainPage/MainPage.js +41 -13
- package/PlatformsConfigurationDrawer/components/MobilePage/MobilePage.js +35 -11
- package/PlatformsConfigurationDrawer/polyglot/index.d.ts +2 -0
- package/PlatformsConfigurationDrawer/polyglot/index.js +10 -0
- package/PlatformsConfigurationDrawer/polyglot/messages_en.d.ts +3 -0
- package/PlatformsConfigurationDrawer/polyglot/messages_en.js +24 -0
- package/PlatformsConfigurationDrawer/polyglot/messages_ru.d.ts +3 -0
- package/PlatformsConfigurationDrawer/polyglot/messages_ru.js +24 -0
- package/PlatformsConfigurationDrawer/polyglot/types.d.ts +25 -0
- package/PlatformsConfigurationDrawer/polyglot/types.js +1 -0
- package/ResendModal/ResendModal.js +23 -7
- package/ResendModal/polyglot/index.d.ts +2 -0
- package/ResendModal/polyglot/index.js +10 -0
- package/ResendModal/polyglot/messages_en.d.ts +3 -0
- package/ResendModal/polyglot/messages_en.js +9 -0
- package/ResendModal/polyglot/messages_ru.d.ts +3 -0
- package/ResendModal/polyglot/messages_ru.js +9 -0
- package/ResendModal/polyglot/types.d.ts +10 -0
- package/ResendModal/polyglot/types.js +1 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/package.json +1 -1
|
@@ -4,6 +4,7 @@ import { Color } from '@pushwoosh/kit-constants';
|
|
|
4
4
|
import { Columns, Vertical } from '@pushwoosh/kit-helpers';
|
|
5
5
|
import { ArrowRoundIcon, CloseIcon, PlatformLogoIcon } from '@pushwoosh/kit-icons';
|
|
6
6
|
import { H2, H4, Text } from '@pushwoosh/kit-typography';
|
|
7
|
+
import { useLang } from '../../polyglot';
|
|
7
8
|
import { ColumnsWrapper, BreadCrumbs, Header, Close, Card, CardIcon } from '../../styled';
|
|
8
9
|
export function MobilePage(props) {
|
|
9
10
|
const {
|
|
@@ -11,6 +12,7 @@ export function MobilePage(props) {
|
|
|
11
12
|
onBack,
|
|
12
13
|
onClose
|
|
13
14
|
} = props;
|
|
15
|
+
const lang = useLang();
|
|
14
16
|
return React.createElement(React.Fragment, null, React.createElement(Header, null, React.createElement(ColumnsWrapper, null, React.createElement(Columns, {
|
|
15
17
|
"$sizes": "auto 1fr auto",
|
|
16
18
|
"$alignItems": "center",
|
|
@@ -23,7 +25,9 @@ export function MobilePage(props) {
|
|
|
23
25
|
direction: "left",
|
|
24
26
|
size: "medium",
|
|
25
27
|
view: "filled"
|
|
26
|
-
})), React.createElement(H2, null,
|
|
28
|
+
})), React.createElement(H2, null, lang({
|
|
29
|
+
message: 'SMART.PLATFORMS_CONFIGURATION_DRAWER.MOBILE.HEADING'
|
|
30
|
+
})), React.createElement(Close, null, React.createElement(Button, {
|
|
27
31
|
view: "ghost",
|
|
28
32
|
color: "secondary",
|
|
29
33
|
icon: React.createElement(CloseIcon, {
|
|
@@ -32,26 +36,38 @@ export function MobilePage(props) {
|
|
|
32
36
|
onClick: onClose
|
|
33
37
|
}))), React.createElement(BreadCrumbs, null, React.createElement(Text, {
|
|
34
38
|
"$color": Color.LOCKED
|
|
35
|
-
},
|
|
39
|
+
}, lang({
|
|
40
|
+
message: 'SMART.PLATFORMS_CONFIGURATION_DRAWER.BREADCRUMB.CHANNEL'
|
|
41
|
+
})), React.createElement(Text, {
|
|
36
42
|
"$color": Color.LOCKED
|
|
37
43
|
}, "\u00A0\u203A\u00A0"), React.createElement(Text, {
|
|
38
44
|
"$color": Color.LOCKED
|
|
39
|
-
},
|
|
45
|
+
}, lang({
|
|
46
|
+
message: 'SMART.PLATFORMS_CONFIGURATION_DRAWER.BREADCRUMB.PLATFORM'
|
|
47
|
+
})), React.createElement(Text, {
|
|
40
48
|
"$color": Color.PHANTOM
|
|
41
49
|
}, "\u00A0\u203A\u00A0"), React.createElement(Text, {
|
|
42
50
|
"$color": Color.PHANTOM
|
|
43
|
-
},
|
|
51
|
+
}, lang({
|
|
52
|
+
message: 'SMART.PLATFORMS_CONFIGURATION_DRAWER.BREADCRUMB.GATEWAY'
|
|
53
|
+
})), React.createElement(Text, {
|
|
44
54
|
"$color": Color.PHANTOM
|
|
45
55
|
}, "\u00A0\u203A\u00A0"), React.createElement(Text, {
|
|
46
56
|
"$color": Color.PHANTOM
|
|
47
|
-
},
|
|
57
|
+
}, lang({
|
|
58
|
+
message: 'SMART.PLATFORMS_CONFIGURATION_DRAWER.BREADCRUMB.SDK'
|
|
59
|
+
})), React.createElement(Text, {
|
|
48
60
|
"$color": Color.PHANTOM
|
|
49
61
|
}, "\u00A0\u203A\u00A0"), React.createElement(Text, {
|
|
50
62
|
"$color": Color.PHANTOM
|
|
51
|
-
},
|
|
63
|
+
}, lang({
|
|
64
|
+
message: 'SMART.PLATFORMS_CONFIGURATION_DRAWER.BREADCRUMB.TEST_MESSAGE'
|
|
65
|
+
}))))), React.createElement(Vertical, {
|
|
52
66
|
"$padding": "12px 0 0",
|
|
53
67
|
"$gap": 8
|
|
54
|
-
}, React.createElement(H4, null,
|
|
68
|
+
}, React.createElement(H4, null, lang({
|
|
69
|
+
message: 'SMART.PLATFORMS_CONFIGURATION_DRAWER.PLATFORM_QUESTION'
|
|
70
|
+
})), React.createElement(Columns, {
|
|
55
71
|
"$sizes": "1fr 1fr",
|
|
56
72
|
"$gap": 6
|
|
57
73
|
}, React.createElement(Card, {
|
|
@@ -60,23 +76,31 @@ export function MobilePage(props) {
|
|
|
60
76
|
}, React.createElement(CardIcon, null, React.createElement(PlatformLogoIcon, {
|
|
61
77
|
type: "apple",
|
|
62
78
|
size: "medium"
|
|
63
|
-
})), React.createElement(H4, null,
|
|
79
|
+
})), React.createElement(H4, null, lang({
|
|
80
|
+
message: 'SMART.PLATFORMS_CONFIGURATION_DRAWER.CARD.IOS'
|
|
81
|
+
}))), React.createElement(Card, {
|
|
64
82
|
as: "a",
|
|
65
83
|
href: `/applications/${application === null || application === void 0 ? void 0 : application.code}/configure/android`
|
|
66
84
|
}, React.createElement(CardIcon, null, React.createElement(PlatformLogoIcon, {
|
|
67
85
|
type: "android",
|
|
68
86
|
size: "medium"
|
|
69
|
-
})), React.createElement(H4, null,
|
|
87
|
+
})), React.createElement(H4, null, lang({
|
|
88
|
+
message: 'SMART.PLATFORMS_CONFIGURATION_DRAWER.CARD.ANDROID'
|
|
89
|
+
}))), React.createElement(Card, {
|
|
70
90
|
as: "a",
|
|
71
91
|
href: `/applications/${application === null || application === void 0 ? void 0 : application.code}/configure/huawei`
|
|
72
92
|
}, React.createElement(CardIcon, null, React.createElement(PlatformLogoIcon, {
|
|
73
93
|
type: "huawei",
|
|
74
94
|
size: "medium"
|
|
75
|
-
})), React.createElement(H4, null,
|
|
95
|
+
})), React.createElement(H4, null, lang({
|
|
96
|
+
message: 'SMART.PLATFORMS_CONFIGURATION_DRAWER.CARD.HUAWEI'
|
|
97
|
+
}))), React.createElement(Card, {
|
|
76
98
|
as: "a",
|
|
77
99
|
href: `/applications/${application === null || application === void 0 ? void 0 : application.code}/configure`
|
|
78
100
|
}, React.createElement(CardIcon, null, React.createElement(PlatformLogoIcon, {
|
|
79
101
|
type: "amazon",
|
|
80
102
|
size: "medium"
|
|
81
|
-
})), React.createElement(H4, null,
|
|
103
|
+
})), React.createElement(H4, null, lang({
|
|
104
|
+
message: 'SMART.PLATFORMS_CONFIGURATION_DRAWER.CARD.AMAZON'
|
|
105
|
+
}))))));
|
|
82
106
|
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { type PlatformsConfigurationDrawerMessages } from './types';
|
|
2
|
+
export declare const Lang: import("react").FC<import("@pushwoosh/dumb-components/polyglot").LangProps<PlatformsConfigurationDrawerMessages>>, useLang: () => (props: import("@pushwoosh/dumb-components/polyglot").LangProps<PlatformsConfigurationDrawerMessages>) => string;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export const messages = {
|
|
2
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.BREADCRUMB.CHANNEL': 'Channel',
|
|
3
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.BREADCRUMB.PLATFORM': 'Platform',
|
|
4
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.BREADCRUMB.GATEWAY': 'Gateway',
|
|
5
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.BREADCRUMB.SDK': 'SDK',
|
|
6
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.BREADCRUMB.TEST_MESSAGE': 'Test message',
|
|
7
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.MAIN.HEADING': 'Channel to configure',
|
|
8
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.MAIN.QUESTION': 'Where would you like to send your messages?',
|
|
9
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.MOBILE.HEADING': 'Platform for mobile app',
|
|
10
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.DESKTOP.HEADING': 'Platform for desktop app',
|
|
11
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.PLATFORM_QUESTION': 'Which platform will we configure first?',
|
|
12
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.CARD.MOBILE': 'Mobile application',
|
|
13
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.CARD.DESKTOP': 'Desktop application',
|
|
14
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.CARD.WEBSITE': 'Website',
|
|
15
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.CARD.EMAILS': 'Emails',
|
|
16
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.CARD.WHATSAPP': 'Whatsapp',
|
|
17
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.CARD.SMS': 'SMS',
|
|
18
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.CARD.IOS': 'iOS',
|
|
19
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.CARD.ANDROID': 'Android',
|
|
20
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.CARD.HUAWEI': 'Huawei',
|
|
21
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.CARD.AMAZON': 'Amazon',
|
|
22
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.CARD.WINDOWS': 'Windows',
|
|
23
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.CARD.MACOS': 'MacOS'
|
|
24
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export const messages = {
|
|
2
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.BREADCRUMB.CHANNEL': 'Канал',
|
|
3
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.BREADCRUMB.PLATFORM': 'Платформа',
|
|
4
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.BREADCRUMB.GATEWAY': 'Шлюз',
|
|
5
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.BREADCRUMB.SDK': 'SDK',
|
|
6
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.BREADCRUMB.TEST_MESSAGE': 'Тестовое сообщение',
|
|
7
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.MAIN.HEADING': 'Канал для настройки',
|
|
8
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.MAIN.QUESTION': 'Куда вы хотите отправлять сообщения?',
|
|
9
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.MOBILE.HEADING': 'Платформа для мобильного приложения',
|
|
10
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.DESKTOP.HEADING': 'Платформа для десктопного приложения',
|
|
11
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.PLATFORM_QUESTION': 'Какую платформу настроим первой?',
|
|
12
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.CARD.MOBILE': 'Мобильное приложение',
|
|
13
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.CARD.DESKTOP': 'Десктопное приложение',
|
|
14
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.CARD.WEBSITE': 'Сайт',
|
|
15
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.CARD.EMAILS': 'Email',
|
|
16
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.CARD.WHATSAPP': 'Whatsapp',
|
|
17
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.CARD.SMS': 'SMS',
|
|
18
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.CARD.IOS': 'iOS',
|
|
19
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.CARD.ANDROID': 'Android',
|
|
20
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.CARD.HUAWEI': 'Huawei',
|
|
21
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.CARD.AMAZON': 'Amazon',
|
|
22
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.CARD.WINDOWS': 'Windows',
|
|
23
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.CARD.MACOS': 'MacOS'
|
|
24
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { NoParams } from '@pushwoosh/dumb-components/polyglot';
|
|
2
|
+
export type PlatformsConfigurationDrawerMessages = {
|
|
3
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.BREADCRUMB.CHANNEL': NoParams;
|
|
4
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.BREADCRUMB.PLATFORM': NoParams;
|
|
5
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.BREADCRUMB.GATEWAY': NoParams;
|
|
6
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.BREADCRUMB.SDK': NoParams;
|
|
7
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.BREADCRUMB.TEST_MESSAGE': NoParams;
|
|
8
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.MAIN.HEADING': NoParams;
|
|
9
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.MAIN.QUESTION': NoParams;
|
|
10
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.MOBILE.HEADING': NoParams;
|
|
11
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.DESKTOP.HEADING': NoParams;
|
|
12
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.PLATFORM_QUESTION': NoParams;
|
|
13
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.CARD.MOBILE': NoParams;
|
|
14
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.CARD.DESKTOP': NoParams;
|
|
15
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.CARD.WEBSITE': NoParams;
|
|
16
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.CARD.EMAILS': NoParams;
|
|
17
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.CARD.WHATSAPP': NoParams;
|
|
18
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.CARD.SMS': NoParams;
|
|
19
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.CARD.IOS': NoParams;
|
|
20
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.CARD.ANDROID': NoParams;
|
|
21
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.CARD.HUAWEI': NoParams;
|
|
22
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.CARD.AMAZON': NoParams;
|
|
23
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.CARD.WINDOWS': NoParams;
|
|
24
|
+
'SMART.PLATFORMS_CONFIGURATION_DRAWER.CARD.MACOS': NoParams;
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -8,6 +8,7 @@ import { Paragraph, Text } from '@pushwoosh/kit-typography';
|
|
|
8
8
|
import { useSPAContext } from '@pushwoosh/spa-context';
|
|
9
9
|
import { parseMessageProperties } from './hooks/helpers';
|
|
10
10
|
import { useResend } from './hooks/useResend';
|
|
11
|
+
import { useLang } from './polyglot';
|
|
11
12
|
export const ResendModal = ({
|
|
12
13
|
isOpen,
|
|
13
14
|
onClose,
|
|
@@ -15,6 +16,7 @@ export const ResendModal = ({
|
|
|
15
16
|
message,
|
|
16
17
|
emailTemplate: providedEmailTemplate
|
|
17
18
|
}) => {
|
|
19
|
+
const lang = useLang();
|
|
18
20
|
const {
|
|
19
21
|
history,
|
|
20
22
|
rpcGateway
|
|
@@ -120,13 +122,19 @@ export const ResendModal = ({
|
|
|
120
122
|
size: "medium",
|
|
121
123
|
isOpen: isOpen,
|
|
122
124
|
onClose: onClose
|
|
123
|
-
}, React.createElement(ModalHeader, null, React.createElement(ModalTitle, null,
|
|
125
|
+
}, React.createElement(ModalHeader, null, React.createElement(ModalTitle, null, lang({
|
|
126
|
+
message: 'SMART.RESEND_MODAL.TITLE'
|
|
127
|
+
}))), React.createElement(ModalBody, null, React.createElement(Vertical, {
|
|
124
128
|
"$gap": 16
|
|
125
|
-
}, React.createElement(Paragraph, null,
|
|
129
|
+
}, React.createElement(Paragraph, null, lang({
|
|
130
|
+
message: 'SMART.RESEND_MODAL.DESCRIPTION'
|
|
131
|
+
})), React.createElement(Controller, {
|
|
126
132
|
control: control,
|
|
127
133
|
name: "presetSubject",
|
|
128
134
|
rules: {
|
|
129
|
-
required:
|
|
135
|
+
required: lang({
|
|
136
|
+
message: 'SMART.RESEND_MODAL.ERROR.SUBJECT_REQUIRED'
|
|
137
|
+
})
|
|
130
138
|
},
|
|
131
139
|
render: ({
|
|
132
140
|
field,
|
|
@@ -134,7 +142,9 @@ export const ResendModal = ({
|
|
|
134
142
|
}) => {
|
|
135
143
|
var _fieldState$error;
|
|
136
144
|
return React.createElement(FieldBox, {
|
|
137
|
-
title:
|
|
145
|
+
title: lang({
|
|
146
|
+
message: 'SMART.RESEND_MODAL.FIELD.SUBJECT'
|
|
147
|
+
}),
|
|
138
148
|
error: !!fieldState.error && React.createElement(Text, {
|
|
139
149
|
"$color": Color.DANGER
|
|
140
150
|
}, (_fieldState$error = fieldState.error) === null || _fieldState$error === void 0 ? void 0 : _fieldState$error.message)
|
|
@@ -166,15 +176,21 @@ export const ResendModal = ({
|
|
|
166
176
|
onClick: handleSubmit(() => {
|
|
167
177
|
history.push(editMessageUrl);
|
|
168
178
|
})
|
|
169
|
-
},
|
|
179
|
+
}, lang({
|
|
180
|
+
message: 'SMART.RESEND_MODAL.BUTTON.EDIT'
|
|
181
|
+
})), React.createElement(Horizontal, {
|
|
170
182
|
"$gap": 8
|
|
171
183
|
}, React.createElement(Button, {
|
|
172
184
|
color: "secondary",
|
|
173
185
|
onClick: onClose
|
|
174
|
-
},
|
|
186
|
+
}, lang({
|
|
187
|
+
message: 'SMART.RESEND_MODAL.BUTTON.CANCEL'
|
|
188
|
+
})), React.createElement(Button, {
|
|
175
189
|
color: "primary",
|
|
176
190
|
onClick: handleSubmit(() => {
|
|
177
191
|
handleResend();
|
|
178
192
|
})
|
|
179
|
-
},
|
|
193
|
+
}, lang({
|
|
194
|
+
message: 'SMART.RESEND_MODAL.BUTTON.RESEND'
|
|
195
|
+
}))))));
|
|
180
196
|
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { type ResendModalMessages } from './types';
|
|
2
|
+
export declare const Lang: import("react").FC<import("@pushwoosh/dumb-components/polyglot").LangProps<ResendModalMessages>>, useLang: () => (props: import("@pushwoosh/dumb-components/polyglot").LangProps<ResendModalMessages>) => string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export const messages = {
|
|
2
|
+
'SMART.RESEND_MODAL.TITLE': 'Resend to non-openers',
|
|
3
|
+
'SMART.RESEND_MODAL.DESCRIPTION': 'This action will send a one-time email campaign to recipients who didn’t open the original message. The subject above will be used. Before resending, you can edit the campaign if needed.',
|
|
4
|
+
'SMART.RESEND_MODAL.FIELD.SUBJECT': 'subject LINE',
|
|
5
|
+
'SMART.RESEND_MODAL.ERROR.SUBJECT_REQUIRED': 'This field cannot be empty',
|
|
6
|
+
'SMART.RESEND_MODAL.BUTTON.EDIT': 'Edit before resend',
|
|
7
|
+
'SMART.RESEND_MODAL.BUTTON.CANCEL': 'Cancel',
|
|
8
|
+
'SMART.RESEND_MODAL.BUTTON.RESEND': 'Resend now'
|
|
9
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export const messages = {
|
|
2
|
+
'SMART.RESEND_MODAL.TITLE': 'Повторная отправка не открывшим',
|
|
3
|
+
'SMART.RESEND_MODAL.DESCRIPTION': 'Это действие отправит разовую email-кампанию получателям, которые не открыли исходное сообщение. Будет использована тема, указанная выше. Перед повторной отправкой кампанию можно отредактировать.',
|
|
4
|
+
'SMART.RESEND_MODAL.FIELD.SUBJECT': 'тема письма',
|
|
5
|
+
'SMART.RESEND_MODAL.ERROR.SUBJECT_REQUIRED': 'Поле не может быть пустым',
|
|
6
|
+
'SMART.RESEND_MODAL.BUTTON.EDIT': 'Изменить перед отправкой',
|
|
7
|
+
'SMART.RESEND_MODAL.BUTTON.CANCEL': 'Отмена',
|
|
8
|
+
'SMART.RESEND_MODAL.BUTTON.RESEND': 'Отправить сейчас'
|
|
9
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { NoParams } from '@pushwoosh/dumb-components/polyglot';
|
|
2
|
+
export type ResendModalMessages = {
|
|
3
|
+
'SMART.RESEND_MODAL.TITLE': NoParams;
|
|
4
|
+
'SMART.RESEND_MODAL.DESCRIPTION': NoParams;
|
|
5
|
+
'SMART.RESEND_MODAL.FIELD.SUBJECT': NoParams;
|
|
6
|
+
'SMART.RESEND_MODAL.ERROR.SUBJECT_REQUIRED': NoParams;
|
|
7
|
+
'SMART.RESEND_MODAL.BUTTON.EDIT': NoParams;
|
|
8
|
+
'SMART.RESEND_MODAL.BUTTON.CANCEL': NoParams;
|
|
9
|
+
'SMART.RESEND_MODAL.BUTTON.RESEND': NoParams;
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export * from './EmailTemplatePreview';
|
|
|
7
7
|
export * from './ExportCSV';
|
|
8
8
|
export * from './PlatformsConfigurationDrawer';
|
|
9
9
|
export * from './LanguagesSelector';
|
|
10
|
+
export * from './MediaStore';
|
|
10
11
|
export * from './ResendModal';
|
|
11
12
|
export * from './RichMessageEditorSmart';
|
|
12
13
|
export * from './Table';
|
package/index.js
CHANGED
|
@@ -7,6 +7,7 @@ export * from './EmailTemplatePreview';
|
|
|
7
7
|
export * from './ExportCSV';
|
|
8
8
|
export * from './PlatformsConfigurationDrawer';
|
|
9
9
|
export * from './LanguagesSelector';
|
|
10
|
+
export * from './MediaStore';
|
|
10
11
|
export * from './ResendModal';
|
|
11
12
|
export * from './RichMessageEditorSmart';
|
|
12
13
|
export * from './Table';
|
package/package.json
CHANGED