@pushwoosh/smart-components-kit 1.0.89 → 1.1.0
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.d.ts +1 -2
- package/CampaignsConfigurationDrawer/CampaignsConfigurationDrawer.js +105 -56
- package/CampaignsConfigurationDrawer/components/Card/Card.d.ts +1 -2
- package/CampaignsConfigurationDrawer/components/Card/Card.js +19 -13
- 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/DocsButton/DocsButton.d.ts +1 -2
- package/DocsButton/DocsButton.js +21 -18
- package/DynamicContentPicker/DynamicContentPicker.js +76 -63
- package/DynamicContentPicker/Line.js +24 -22
- package/DynamicContentPickerForm/DynamicContentCustomPickerForm.js +20 -15
- package/DynamicContentPickerForm/DynamicContentEventPickerForm.js +62 -51
- package/DynamicContentPickerForm/DynamicContentTagPickerForm.js +62 -51
- package/DynamicContentPickerForm/SimpleDynamicContentPickerFormSmart.js +74 -59
- package/DynamicContentPickerForm/VariedDynamicContentPickerFormSmart.js +104 -78
- 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 +10 -4
- 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.d.ts +1 -2
- package/ExportCSV/ExportCsvBanner/ExportCsvBanner.js +63 -42
- 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/ExportCSV/useExportService/useExportService.js +1 -0
- package/LanguagesSelector/LanguagesModal.js +38 -24
- package/LanguagesSelector/LanguagesSelectForm.js +73 -62
- package/LanguagesSelector/LanguagesSelectFormLoader.js +8 -7
- package/LanguagesSelector/LanguagesSelector.js +92 -78
- package/MediaStore/CreateVariantDrawer.js +134 -85
- package/MediaStore/MediaStore.js +137 -112
- package/ModalCloningJourney/ModalCloningJourney.d.ts +1 -2
- package/ModalCloningJourney/ModalCloningJourney.js +113 -91
- package/OpenActions/components/OpenActionsSummary/OpenActionsSummary.d.ts +1 -2
- package/OpenActions/components/OpenActionsSummary/OpenActionsSummary.js +101 -37
- package/OpenActions/components/OpenActionsSummaryByPreset.d.ts +1 -2
- package/OpenActions/components/OpenActionsSummaryByPreset.js +2 -2
- 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/PlatformsConfigurationDrawer.js +21 -17
- package/PlatformsConfigurationDrawer/components/DesktopPage/DesktopPage.js +114 -57
- package/PlatformsConfigurationDrawer/components/MainPage/MainPage.js +157 -75
- package/PlatformsConfigurationDrawer/components/MobilePage/MobilePage.js +140 -69
- 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.d.ts +1 -2
- package/ResendModal/ResendModal.js +95 -59
- 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/RichMessageEditorSmart/NewDynamicContentForm.js +16 -12
- package/RichMessageEditorSmart/RichMessageEditorSmart.js +4 -4
- package/SystemParcel/SystemParcel.d.ts +3 -3
- package/SystemParcel/SystemParcel.js +3 -2
- package/Table/components/DataTable/DataTable.js +80 -61
- package/Table/components/DataTableGetContext/DataTableGetContext.d.ts +1 -2
- package/Table/components/DataTableGetContext/DataTableGetContext.js +5 -2
- package/Table/components/DataTableList/DataTableList.d.ts +1 -2
- package/Table/components/DataTableList/DataTableList.js +86 -68
- package/Table/components/DataTablePagination/DataTablePagination.js +6 -4
- package/Table/components/DataTableSearchInput/DataTableSearchInput.js +3 -2
- package/Table/components/DataTableSortableCell/DataTableSortableCell.js +6 -4
- package/Table/components/Loading/Loading.d.ts +1 -2
- package/Table/components/Loading/Loading.js +16 -14
- package/Table/components/TablePagination/TablePagination.js +31 -25
- package/_devel/index.js +36 -24
- package/_devel/lib/dynamic-content-picker.d.ts +1 -2
- package/_devel/lib/dynamic-content-picker.js +16 -10
- package/_devel/lib/index.d.ts +2 -2
- package/_devel/lib/index.js +38 -19
- package/_devel/test-place.d.ts +1 -2
- package/_devel/test-place.js +4 -2
- package/package.json +2 -2
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { type CampaignsConfigurationDrawerProps } from './types';
|
|
3
|
-
export declare function CampaignsConfigurationDrawer(props: CampaignsConfigurationDrawerProps):
|
|
2
|
+
export declare function CampaignsConfigurationDrawer(props: CampaignsConfigurationDrawerProps): import("react").JSX.Element;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Drawer, DrawerBody, DrawerHeader } from '@pushwoosh/dumb-components';
|
|
3
3
|
import { Columns, Horizontal, Vertical } from '@pushwoosh/kit-helpers';
|
|
4
4
|
import { CloseIcon, EmailIcon, MobileIcon, PushIcon, SmsIcon, WhatsappIcon } from '@pushwoosh/kit-icons';
|
|
5
5
|
import { H1, H3 } from '@pushwoosh/kit-typography';
|
|
6
6
|
import { Card } from './components/Card';
|
|
7
|
+
import { useLang } from './polyglot';
|
|
7
8
|
import { CloseButtonWrap } from './styled';
|
|
8
9
|
export function CampaignsConfigurationDrawer(props) {
|
|
9
10
|
const {
|
|
@@ -13,61 +14,109 @@ export function CampaignsConfigurationDrawer(props) {
|
|
|
13
14
|
segmentTitle = '',
|
|
14
15
|
onClose
|
|
15
16
|
} = props;
|
|
16
|
-
|
|
17
|
+
const lang = useLang();
|
|
18
|
+
return _jsxs(Drawer, {
|
|
17
19
|
size: "medium",
|
|
18
20
|
isOpen: isOpen,
|
|
19
|
-
onClose: onClose
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
21
|
+
onClose: onClose,
|
|
22
|
+
children: [_jsx(DrawerHeader, {
|
|
23
|
+
children: _jsxs(Horizontal, {
|
|
24
|
+
"$justifyContent": "space-between",
|
|
25
|
+
"$alignItems": "center",
|
|
26
|
+
"$margin": "0 0 4px",
|
|
27
|
+
children: [_jsx(H1, {
|
|
28
|
+
children: lang({
|
|
29
|
+
message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.HEADING'
|
|
30
|
+
})
|
|
31
|
+
}), _jsx(CloseButtonWrap, {
|
|
32
|
+
onClick: onClose,
|
|
33
|
+
children: _jsx(CloseIcon, {
|
|
34
|
+
size: "medium"
|
|
35
|
+
})
|
|
36
|
+
})]
|
|
37
|
+
})
|
|
38
|
+
}), _jsx(DrawerBody, {
|
|
39
|
+
children: _jsxs(Vertical, {
|
|
40
|
+
"$gap": "32px",
|
|
41
|
+
children: [_jsxs(Horizontal, {
|
|
42
|
+
"$gap": "6px",
|
|
43
|
+
children: [_jsx(Card, {
|
|
44
|
+
title: lang({
|
|
45
|
+
message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.ONE_TIME_PUSH.TITLE'
|
|
46
|
+
}),
|
|
47
|
+
description: lang({
|
|
48
|
+
message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.ONE_TIME_PUSH.DESC'
|
|
49
|
+
}),
|
|
50
|
+
icon: PushIcon,
|
|
51
|
+
href: `/applications/${applicationCode}/one-time-messages/send?type=push&segment=${segmentCode}`
|
|
52
|
+
}), _jsx(Card, {
|
|
53
|
+
title: lang({
|
|
54
|
+
message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.ONE_TIME_EMAIL.TITLE'
|
|
55
|
+
}),
|
|
56
|
+
description: lang({
|
|
57
|
+
message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.ONE_TIME_EMAIL.DESC'
|
|
58
|
+
}),
|
|
59
|
+
icon: EmailIcon,
|
|
60
|
+
href: `/applications/${applicationCode}/one-time-messages/send?type=email&segment=${segmentCode}`
|
|
61
|
+
})]
|
|
62
|
+
}), _jsxs(Vertical, {
|
|
63
|
+
"$gap": "8px",
|
|
64
|
+
children: [_jsx(H3, {
|
|
65
|
+
children: lang({
|
|
66
|
+
message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.ADVANCED_HEADING'
|
|
67
|
+
})
|
|
68
|
+
}), _jsxs(Columns, {
|
|
69
|
+
"$sizes": "1fr 1fr",
|
|
70
|
+
"$gap": "6px",
|
|
71
|
+
children: [_jsx(Card, {
|
|
72
|
+
title: lang({
|
|
73
|
+
message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.PUSH.TITLE'
|
|
74
|
+
}),
|
|
75
|
+
description: lang({
|
|
76
|
+
message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.PUSH.DESC'
|
|
77
|
+
}),
|
|
78
|
+
icon: PushIcon,
|
|
79
|
+
href: `/journeys/${applicationCode}/create?channel=push&segment=${segmentCode}&segment_title=${segmentTitle}`
|
|
80
|
+
}), _jsx(Card, {
|
|
81
|
+
title: lang({
|
|
82
|
+
message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.EMAIL.TITLE'
|
|
83
|
+
}),
|
|
84
|
+
description: lang({
|
|
85
|
+
message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.EMAIL.DESC'
|
|
86
|
+
}),
|
|
87
|
+
icon: EmailIcon,
|
|
88
|
+
href: `/journeys/${applicationCode}/create?channel=email&segment=${segmentCode}&segment_title=${segmentTitle}`
|
|
89
|
+
}), _jsx(Card, {
|
|
90
|
+
title: lang({
|
|
91
|
+
message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.INAPP.TITLE'
|
|
92
|
+
}),
|
|
93
|
+
description: lang({
|
|
94
|
+
message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.INAPP.DESC'
|
|
95
|
+
}),
|
|
96
|
+
icon: MobileIcon,
|
|
97
|
+
href: `/journeys/${applicationCode}/create?channel=inapp&segment=${segmentCode}&segment_title=${segmentTitle}`
|
|
98
|
+
}), _jsx(Card, {
|
|
99
|
+
title: lang({
|
|
100
|
+
message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.SMS.TITLE'
|
|
101
|
+
}),
|
|
102
|
+
description: lang({
|
|
103
|
+
message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.SMS.DESC'
|
|
104
|
+
}),
|
|
105
|
+
icon: SmsIcon,
|
|
106
|
+
href: `/journeys/${applicationCode}/create?channel=sms&segment=${segmentCode}&segment_title=${segmentTitle}`
|
|
107
|
+
}), _jsx(Card, {
|
|
108
|
+
title: lang({
|
|
109
|
+
message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.WHATSAPP.TITLE'
|
|
110
|
+
}),
|
|
111
|
+
description: lang({
|
|
112
|
+
message: 'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.WHATSAPP.DESC'
|
|
113
|
+
}),
|
|
114
|
+
icon: WhatsappIcon,
|
|
115
|
+
href: `/journeys/${applicationCode}/create?channel=whatsapp&segment=${segmentCode}&segment_title=${segmentTitle}`
|
|
116
|
+
})]
|
|
117
|
+
})]
|
|
118
|
+
})]
|
|
119
|
+
})
|
|
120
|
+
})]
|
|
121
|
+
});
|
|
73
122
|
}
|
|
@@ -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 { Text } from '@pushwoosh/kit-typography';
|
|
4
4
|
import { Container, IconWrap, Title } from './styled';
|
|
@@ -9,16 +9,22 @@ export function Card(props) {
|
|
|
9
9
|
icon: Icon,
|
|
10
10
|
href
|
|
11
11
|
} = props;
|
|
12
|
-
return
|
|
13
|
-
href: href
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
12
|
+
return _jsxs(Container, {
|
|
13
|
+
href: href,
|
|
14
|
+
children: [_jsx(IconWrap, {
|
|
15
|
+
children: _jsx(Icon, {
|
|
16
|
+
color: Color.PRIMARY,
|
|
17
|
+
size: "medium",
|
|
18
|
+
view: "lined",
|
|
19
|
+
type: "mobile",
|
|
20
|
+
direction: "right"
|
|
21
|
+
})
|
|
22
|
+
}), _jsx(Title, {
|
|
23
|
+
children: title
|
|
24
|
+
}), _jsx(Text, {
|
|
25
|
+
"$variant": "footnote",
|
|
26
|
+
"$color": Color.LOCKED,
|
|
27
|
+
children: description
|
|
28
|
+
})]
|
|
29
|
+
});
|
|
24
30
|
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { type CampaignsConfigurationDrawerMessages } from './types';
|
|
2
|
+
export declare const Lang: import("react").FC<import("@pushwoosh/dumb-components/polyglot").LangProps<CampaignsConfigurationDrawerMessages>>, useLang: () => (props: import("@pushwoosh/dumb-components/polyglot").LangProps<CampaignsConfigurationDrawerMessages>) => string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export const messages = {
|
|
2
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.HEADING': 'Create campaign',
|
|
3
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.ADVANCED_HEADING': 'Advanced campaign based by channel',
|
|
4
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.ONE_TIME_PUSH.TITLE': 'One-time push notification',
|
|
5
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.ONE_TIME_PUSH.DESC': 'Select or create content, adjust notifications, and choose the best time to send.',
|
|
6
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.ONE_TIME_EMAIL.TITLE': 'One-time email',
|
|
7
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.ONE_TIME_EMAIL.DESC': 'Select content, set a subject, personalize sender info, and choose a send time.',
|
|
8
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.PUSH.TITLE': 'Push notification based',
|
|
9
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.PUSH.DESC': 'Create a targeted campaign for users and plan follow-up for unopened messages.',
|
|
10
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.EMAIL.TITLE': 'Email campaign',
|
|
11
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.EMAIL.DESC': 'Create tailored communication strategies with follow-ups based on user actions.',
|
|
12
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.INAPP.TITLE': 'In-app campaign',
|
|
13
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.INAPP.DESC': 'Display the banner to the intended users and monitor their subsequent actions.',
|
|
14
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.SMS.TITLE': 'SMS campaign',
|
|
15
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.SMS.DESC': 'Automate SMS delivery for quick, reliable messaging.',
|
|
16
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.WHATSAPP.TITLE': 'WhatsApp campaign',
|
|
17
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.WHATSAPP.DESC': 'Engage your audience on WhatsApp with rich, personalized messages.'
|
|
18
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export const messages = {
|
|
2
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.HEADING': 'Создать кампанию',
|
|
3
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.ADVANCED_HEADING': 'Расширенная кампания по каналу',
|
|
4
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.ONE_TIME_PUSH.TITLE': 'Разовое push-уведомление',
|
|
5
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.ONE_TIME_PUSH.DESC': 'Выберите или создайте контент, настройте уведомления и выберите лучшее время отправки.',
|
|
6
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.ONE_TIME_EMAIL.TITLE': 'Разовое письмо',
|
|
7
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.ONE_TIME_EMAIL.DESC': 'Выберите контент, задайте тему, настройте данные отправителя и выберите время отправки.',
|
|
8
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.PUSH.TITLE': 'На основе push-уведомлений',
|
|
9
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.PUSH.DESC': 'Создайте таргетированную кампанию и спланируйте дополнительные сообщения для тех, кто не открыл.',
|
|
10
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.EMAIL.TITLE': 'Email-кампания',
|
|
11
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.EMAIL.DESC': 'Создавайте индивидуальные коммуникационные стратегии с дополнительными сообщениями на основе действий пользователей.',
|
|
12
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.INAPP.TITLE': 'In-app кампания',
|
|
13
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.INAPP.DESC': 'Показывайте баннер нужным пользователям и отслеживайте их дальнейшие действия.',
|
|
14
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.SMS.TITLE': 'SMS-кампания',
|
|
15
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.SMS.DESC': 'Автоматизируйте отправку SMS для быстрых и надёжных сообщений.',
|
|
16
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.WHATSAPP.TITLE': 'WhatsApp-кампания',
|
|
17
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.WHATSAPP.DESC': 'Взаимодействуйте с аудиторией в WhatsApp с помощью насыщенных персонализированных сообщений.'
|
|
18
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { NoParams } from '@pushwoosh/dumb-components/polyglot';
|
|
2
|
+
export type CampaignsConfigurationDrawerMessages = {
|
|
3
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.HEADING': NoParams;
|
|
4
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.ADVANCED_HEADING': NoParams;
|
|
5
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.ONE_TIME_PUSH.TITLE': NoParams;
|
|
6
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.ONE_TIME_PUSH.DESC': NoParams;
|
|
7
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.ONE_TIME_EMAIL.TITLE': NoParams;
|
|
8
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.ONE_TIME_EMAIL.DESC': NoParams;
|
|
9
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.PUSH.TITLE': NoParams;
|
|
10
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.PUSH.DESC': NoParams;
|
|
11
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.EMAIL.TITLE': NoParams;
|
|
12
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.EMAIL.DESC': NoParams;
|
|
13
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.INAPP.TITLE': NoParams;
|
|
14
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.INAPP.DESC': NoParams;
|
|
15
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.SMS.TITLE': NoParams;
|
|
16
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.SMS.DESC': NoParams;
|
|
17
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.WHATSAPP.TITLE': NoParams;
|
|
18
|
+
'SMART.CAMPAIGNS_CONFIGURATION_DRAWER.CARD.WHATSAPP.DESC': NoParams;
|
|
19
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/DocsButton/DocsButton.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Button, DrawerDocs, useDocs } from '@pushwoosh/dumb-components';
|
|
3
3
|
import { DocsIcon } from '@pushwoosh/kit-icons';
|
|
4
4
|
import { useDocsButtonUrl } from './hooks';
|
|
@@ -29,21 +29,24 @@ export function DocsButton(props) {
|
|
|
29
29
|
}
|
|
30
30
|
openDocsDrawer();
|
|
31
31
|
};
|
|
32
|
-
return
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
32
|
+
return _jsxs(_Fragment, {
|
|
33
|
+
children: [_jsx(Button, {
|
|
34
|
+
"aria-label": lang({
|
|
35
|
+
message: 'SMART.DOCS_BUTTON.ARIA_LABEL'
|
|
36
|
+
}),
|
|
37
|
+
color: color,
|
|
38
|
+
view: view,
|
|
39
|
+
size: size,
|
|
40
|
+
icon: _jsx(DocsIcon, {
|
|
41
|
+
size: "medium",
|
|
42
|
+
view: "lined"
|
|
43
|
+
}),
|
|
44
|
+
onClick: handleClick,
|
|
45
|
+
children: children
|
|
46
|
+
}), !openInNewWindow && _jsx(DrawerDocs, {
|
|
47
|
+
url: url,
|
|
48
|
+
isOpen: docsOpen,
|
|
49
|
+
onClose: closeDocsDrawer
|
|
50
|
+
})]
|
|
51
|
+
});
|
|
49
52
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
1
2
|
import { arrow, autoPlacement, offset, useFloating } from '@floating-ui/react-dom';
|
|
2
|
-
import
|
|
3
|
+
import { useEffect, useMemo, useReducer, useRef, useState } from 'react';
|
|
3
4
|
import { Color } from '@pushwoosh/kit-constants';
|
|
4
5
|
import { elementAddListener, Horizontal, usePersistentFunction } from '@pushwoosh/kit-helpers';
|
|
5
6
|
import { WarningRoundIcon } from '@pushwoosh/kit-icons';
|
|
@@ -79,66 +80,78 @@ export const DynamicContentPicker = ({
|
|
|
79
80
|
}
|
|
80
81
|
});
|
|
81
82
|
}, [clickAwayHandler, activeVar, refs.reference, refs.floating]);
|
|
82
|
-
return
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
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
|
-
|
|
83
|
+
return _jsxs(_Fragment, {
|
|
84
|
+
children: [_jsxs(FieldPlace, {
|
|
85
|
+
ref: refs.setReference,
|
|
86
|
+
children: [_jsxs(Horizontal, {
|
|
87
|
+
"$padding": "8px 16px",
|
|
88
|
+
"$justifyContent": "space-between",
|
|
89
|
+
children: [_jsxs(Horizontal, {
|
|
90
|
+
"$alignItems": "center",
|
|
91
|
+
"$gap": 8,
|
|
92
|
+
children: [icon && icon, _jsx(Text, {
|
|
93
|
+
"$variant": "h4",
|
|
94
|
+
children: title
|
|
95
|
+
})]
|
|
96
|
+
}), error && _jsxs(Horizontal, {
|
|
97
|
+
"$alignItems": "center",
|
|
98
|
+
"$gap": 8,
|
|
99
|
+
children: [_jsx(WarningRoundIcon, {
|
|
100
|
+
size: "small",
|
|
101
|
+
view: "lined",
|
|
102
|
+
color: Color.WARNING
|
|
103
|
+
}), _jsx(Text, {
|
|
104
|
+
"$variant": "footnote",
|
|
105
|
+
"$color": Color.WARNING,
|
|
106
|
+
children: error
|
|
107
|
+
})]
|
|
108
|
+
}), !error && hintText && _jsx(Text, {
|
|
109
|
+
"$variant": "footnote",
|
|
110
|
+
"$color": Color.LOCKED,
|
|
111
|
+
children: hintText
|
|
112
|
+
})]
|
|
113
|
+
}), _jsx(Horizontal, {
|
|
114
|
+
"$padding": "12px 16px",
|
|
115
|
+
children: _jsx(TextPlace, {
|
|
116
|
+
children: parsedLines.map((line, index) => _jsx(Line, {
|
|
117
|
+
activeVar: activeVar,
|
|
118
|
+
line: line,
|
|
119
|
+
state: state,
|
|
120
|
+
onClickVar: setActiveVar
|
|
121
|
+
}, index /* eslint-disable-line react/no-array-index-key */))
|
|
122
|
+
})
|
|
123
|
+
})]
|
|
124
|
+
}), !!activeVar && _jsxs("div", {
|
|
125
|
+
ref: refs.setFloating,
|
|
126
|
+
style: floatingStyles,
|
|
127
|
+
children: [renderDynamicContent ? renderDynamicContent({
|
|
128
|
+
activeVar,
|
|
129
|
+
onChange: newDC => dispatch({
|
|
130
|
+
type: 'set',
|
|
131
|
+
key: activeVar,
|
|
132
|
+
value: newDC
|
|
133
|
+
}),
|
|
134
|
+
onClose,
|
|
135
|
+
update
|
|
136
|
+
}) : _jsx(VariedDynamicContentPickerFormSmart, {
|
|
137
|
+
applicationCode: applicationCode,
|
|
138
|
+
initialDc: state[activeVar],
|
|
139
|
+
onChange: newDc => dispatch({
|
|
140
|
+
type: 'set',
|
|
141
|
+
key: activeVar,
|
|
142
|
+
value: newDc
|
|
143
|
+
}),
|
|
144
|
+
onClose: () => setActiveVar(undefined),
|
|
145
|
+
update: update
|
|
146
|
+
}, activeVar), _jsx(Arrow, {
|
|
147
|
+
"$direction": placementToDirection(placement),
|
|
148
|
+
ref: arrowRef,
|
|
149
|
+
style: {
|
|
150
|
+
left: (_middlewareData$arrow = middlewareData.arrow) === null || _middlewareData$arrow === void 0 ? void 0 : _middlewareData$arrow.x,
|
|
151
|
+
top: (_middlewareData$arrow2 = middlewareData.arrow) === null || _middlewareData$arrow2 === void 0 ? void 0 : _middlewareData$arrow2.y
|
|
152
|
+
},
|
|
153
|
+
children: _jsx(ArrowIcon, {})
|
|
154
|
+
})]
|
|
155
|
+
})]
|
|
156
|
+
});
|
|
144
157
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Chip } from '@pushwoosh/dumb-components';
|
|
3
3
|
import { WarningRoundIcon } from '@pushwoosh/kit-icons';
|
|
4
4
|
import { dc2text } from './helpers';
|
|
@@ -8,26 +8,28 @@ export const Line = ({
|
|
|
8
8
|
state,
|
|
9
9
|
onClickVar
|
|
10
10
|
}) => {
|
|
11
|
-
return
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
return React.createElement(Chip, {
|
|
19
|
-
key: index /* eslint-disable-line react/no-array-index-key */,
|
|
20
|
-
as: "span",
|
|
21
|
-
"$variant": state[item.varname] ? 'primary' : 'warning',
|
|
22
|
-
"$selected": activeVar === item.varname,
|
|
23
|
-
onClick: () => {
|
|
24
|
-
onClickVar(item.varname);
|
|
11
|
+
return _jsx("p", {
|
|
12
|
+
children: line.map((item, index) => {
|
|
13
|
+
if (typeof item === 'string') {
|
|
14
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
15
|
+
return _jsx("span", {
|
|
16
|
+
children: item
|
|
17
|
+
}, index);
|
|
25
18
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
19
|
+
return _jsx(Chip, {
|
|
20
|
+
as: "span",
|
|
21
|
+
"$variant": state[item.varname] ? 'primary' : 'warning',
|
|
22
|
+
"$selected": activeVar === item.varname,
|
|
23
|
+
onClick: () => {
|
|
24
|
+
onClickVar(item.varname);
|
|
25
|
+
},
|
|
26
|
+
children: state[item.varname] ? dc2text(state[item.varname]) : _jsx(WarningRoundIcon, {
|
|
27
|
+
size: "small",
|
|
28
|
+
view: "lined",
|
|
29
|
+
as: "span",
|
|
30
|
+
onClick: () => onClickVar(item.varname)
|
|
31
|
+
})
|
|
32
|
+
}, index /* eslint-disable-line react/no-array-index-key */);
|
|
33
|
+
})
|
|
34
|
+
});
|
|
33
35
|
};
|
|
@@ -1,22 +1,27 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { NativeTextarea } from '@pushwoosh/dumb-components';
|
|
3
3
|
import { Vertical } from '@pushwoosh/kit-helpers';
|
|
4
|
+
import { useLang } from './polyglot';
|
|
4
5
|
export const DynamicContentCustomPickerForm = ({
|
|
5
6
|
dc,
|
|
6
7
|
onChange
|
|
7
8
|
}) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
onChange
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
9
|
+
const lang = useLang();
|
|
10
|
+
return _jsx(Vertical, {
|
|
11
|
+
"$gap": 16,
|
|
12
|
+
children: _jsx(NativeTextarea, {
|
|
13
|
+
value: dc.text,
|
|
14
|
+
onChange: e => {
|
|
15
|
+
onChange({
|
|
16
|
+
text: e.target.value
|
|
17
|
+
});
|
|
18
|
+
},
|
|
19
|
+
placeholder: lang({
|
|
20
|
+
message: 'SMART.DYNAMIC_CONTENT_PICKER_FORM.CUSTOM.PLACEHOLDER'
|
|
21
|
+
}),
|
|
22
|
+
style: {
|
|
23
|
+
minHeight: 200
|
|
24
|
+
}
|
|
25
|
+
})
|
|
26
|
+
});
|
|
22
27
|
};
|