@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,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
2
3
|
import { useParams } from 'react-router-dom';
|
|
3
4
|
import { Link, Spinner } from '@pushwoosh/dumb-components';
|
|
4
5
|
import { Color, PlatformsIcons, PlatformsLabels, Tag } from '@pushwoosh/kit-constants';
|
|
@@ -8,10 +9,12 @@ import { Text } from '@pushwoosh/kit-typography';
|
|
|
8
9
|
import { useSPAContext } from '@pushwoosh/spa-context';
|
|
9
10
|
import { LinkRow, ClickActionSection } from './styles';
|
|
10
11
|
import { getSafariUrl, isWebLink } from '../../helpers';
|
|
12
|
+
import { Lang, useLang } from '../../polyglot';
|
|
11
13
|
export const OpenActionsSummary = ({
|
|
12
14
|
openActions
|
|
13
15
|
}) => {
|
|
14
16
|
var _applicationData$valu;
|
|
17
|
+
const lang = useLang();
|
|
15
18
|
const {
|
|
16
19
|
platformsDeeplinkUrls = {},
|
|
17
20
|
defaultDeeplinkUrl: allPlatformsDeeplinkUrl,
|
|
@@ -25,43 +28,63 @@ export const OpenActionsSummary = ({
|
|
|
25
28
|
const {
|
|
26
29
|
rpcGateway
|
|
27
30
|
} = useSPAContext();
|
|
31
|
+
// Стабильный кэш-бастер для легаси-ссылки рич-медиа: ленивый инициализатор
|
|
32
|
+
// useState вычисляет Date.now() один раз на маунт (вне render-scope), чтобы
|
|
33
|
+
// href не менялся на каждый ререндер (react-hooks/purity).
|
|
34
|
+
const [richmediaCacheBuster] = useState(() => Date.now());
|
|
28
35
|
const applicationData = useAsync(() => applicationCode ? rpcGateway.applications.Get({
|
|
29
36
|
code: applicationCode
|
|
30
37
|
}) : Promise.resolve(undefined), [rpcGateway, applicationCode]);
|
|
31
38
|
const hasCustomPlatformsDeeplink = Object.keys(platformsDeeplinkUrls).length > 0;
|
|
32
39
|
const safariUrl = getSafariUrl((applicationData === null || applicationData === void 0 || (_applicationData$valu = applicationData.value) === null || _applicationData$valu === void 0 ? void 0 : _applicationData$valu.application) || null, safariUrlArgs ?? '');
|
|
33
|
-
const renderInfoBlock = (device, action, url = null, urlText) =>
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
40
|
+
const renderInfoBlock = (device, action, url = null, urlText) => _jsxs(Vertical, {
|
|
41
|
+
children: [_jsx("span", {
|
|
42
|
+
children: _jsx(Lang, {
|
|
43
|
+
message: "SMART.OPEN_ACTIONS.INFO_BLOCK",
|
|
44
|
+
device: device,
|
|
45
|
+
action: action
|
|
46
|
+
})
|
|
47
|
+
}), url && _jsx(LinkRow, {
|
|
48
|
+
children: _jsx(Link, {
|
|
49
|
+
as: Tag.A,
|
|
50
|
+
rel: "noopener noreferrer",
|
|
51
|
+
target: "_blank",
|
|
52
|
+
href: url,
|
|
53
|
+
children: _jsxs(Horizontal, {
|
|
54
|
+
"$alignItems": "center",
|
|
55
|
+
"$justifyContent": "start",
|
|
56
|
+
"$gap": 4,
|
|
57
|
+
children: [urlText ?? url, _jsx(OpenIcon, {
|
|
58
|
+
view: "lined",
|
|
59
|
+
size: "small"
|
|
60
|
+
})]
|
|
61
|
+
})
|
|
62
|
+
})
|
|
63
|
+
})]
|
|
64
|
+
});
|
|
65
|
+
const renderPlatformDeepLink = (platformKey, url, label) => {
|
|
47
66
|
const isEnumKey = typeof platformKey === 'number';
|
|
48
67
|
const icon = isEnumKey ? PlatformsIcons[platformKey] : null;
|
|
49
68
|
const labelText = isEnumKey ? PlatformsLabels[platformKey] : platformKey;
|
|
50
|
-
return
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
69
|
+
return _jsxs(ClickActionSection, {
|
|
70
|
+
children: [_jsxs(Horizontal, {
|
|
71
|
+
"$alignItems": "start",
|
|
72
|
+
"$justifyContent": "start",
|
|
73
|
+
"$gap": 8,
|
|
74
|
+
children: [icon && _jsx(PlatformLogoIcon, {
|
|
75
|
+
size: "small",
|
|
76
|
+
type: icon,
|
|
77
|
+
color: Color.LOCKED
|
|
78
|
+
}), _jsxs(Text, {
|
|
79
|
+
"$variant": "h4",
|
|
80
|
+
"$color": Color.LOCKED,
|
|
81
|
+
"$uppercase": true,
|
|
82
|
+
children: [labelText, ' ', label]
|
|
83
|
+
})]
|
|
84
|
+
}), _jsx(LinkRow, {
|
|
85
|
+
children: url
|
|
86
|
+
})]
|
|
87
|
+
}, platformKey);
|
|
65
88
|
};
|
|
66
89
|
const getRichmediaLink = ({
|
|
67
90
|
url,
|
|
@@ -69,14 +92,55 @@ export const OpenActionsSummary = ({
|
|
|
69
92
|
createdType = 'BUILDER'
|
|
70
93
|
}) => {
|
|
71
94
|
if (code) {
|
|
72
|
-
return createdType === 'BUILDER' ? `/applications/${applicationCode}/rich-media/${code}/edit` : `/applications/${applicationCode}/richMedia/edit/${
|
|
95
|
+
return createdType === 'BUILDER' ? `/applications/${applicationCode}/rich-media/${code}/edit` : `/applications/${applicationCode}/richMedia/edit/${richmediaCacheBuster}/${code}`;
|
|
73
96
|
}
|
|
74
97
|
return url;
|
|
75
98
|
};
|
|
76
|
-
return
|
|
77
|
-
"$gap": 8
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
99
|
+
return _jsx(Vertical, {
|
|
100
|
+
"$gap": 8,
|
|
101
|
+
children: openActions ? _jsxs(_Fragment, {
|
|
102
|
+
children: [showRichmedia && renderInfoBlock(lang({
|
|
103
|
+
message: 'SMART.OPEN_ACTIONS.DEVICE.MOBILE'
|
|
104
|
+
}), lang({
|
|
105
|
+
message: 'SMART.OPEN_ACTIONS.ACTION.OPEN_INAPP'
|
|
106
|
+
}), getRichmediaLink(showRichmedia), showRichmedia.name || showRichmedia.code), !showRichmedia && hasCustomPlatformsDeeplink && renderInfoBlock(lang({
|
|
107
|
+
message: 'SMART.OPEN_ACTIONS.DEVICE.MOBILE'
|
|
108
|
+
}), lang({
|
|
109
|
+
message: 'SMART.OPEN_ACTIONS.ACTION.FOLLOW_DEEPLINK'
|
|
110
|
+
})), !showRichmedia && Object.entries(platformsDeeplinkUrls).map(([platformKey, url]) => renderPlatformDeepLink(+platformKey, url, lang({
|
|
111
|
+
message: 'SMART.OPEN_ACTIONS.ACTION.DEEP_LINK'
|
|
112
|
+
}))), !showRichmedia && allPlatformsDeeplinkUrl && hasCustomPlatformsDeeplink && renderPlatformDeepLink(lang({
|
|
113
|
+
message: 'SMART.OPEN_ACTIONS.DEVICE.OTHER_PLATFORMS'
|
|
114
|
+
}), allPlatformsDeeplinkUrl, isWebLink(allPlatformsDeeplinkUrl) ? lang({
|
|
115
|
+
message: 'SMART.OPEN_ACTIONS.ACTION.OPEN_URL_BROWSER'
|
|
116
|
+
}) : lang({
|
|
117
|
+
message: 'SMART.OPEN_ACTIONS.ACTION.DEEP_LINK'
|
|
118
|
+
})), !showRichmedia && allPlatformsDeeplinkUrl && !hasCustomPlatformsDeeplink && renderInfoBlock(lang({
|
|
119
|
+
message: 'SMART.OPEN_ACTIONS.DEVICE.MOBILE'
|
|
120
|
+
}), isWebLink(allPlatformsDeeplinkUrl) ? lang({
|
|
121
|
+
message: 'SMART.OPEN_ACTIONS.ACTION.OPEN_URL_BROWSER'
|
|
122
|
+
}) : lang({
|
|
123
|
+
message: 'SMART.OPEN_ACTIONS.ACTION.FOLLOW_DEEPLINK'
|
|
124
|
+
}), allPlatformsDeeplinkUrl), !showRichmedia && !allPlatformsDeeplinkUrl && !hasCustomPlatformsDeeplink && renderInfoBlock(lang({
|
|
125
|
+
message: 'SMART.OPEN_ACTIONS.DEVICE.MOBILE'
|
|
126
|
+
}), lang({
|
|
127
|
+
message: 'SMART.OPEN_ACTIONS.ACTION.OPEN_HOME_APP'
|
|
128
|
+
})), webPageUrl && renderInfoBlock(lang({
|
|
129
|
+
message: 'SMART.OPEN_ACTIONS.DEVICE.WEB'
|
|
130
|
+
}), lang({
|
|
131
|
+
message: 'SMART.OPEN_ACTIONS.ACTION.OPEN_URL_BROWSER'
|
|
132
|
+
}), webPageUrl), webPageUrl && safariUrl && renderInfoBlock(lang({
|
|
133
|
+
message: 'SMART.OPEN_ACTIONS.DEVICE.SAFARI'
|
|
134
|
+
}), lang({
|
|
135
|
+
message: 'SMART.OPEN_ACTIONS.ACTION.OPEN_URL_SAFARI'
|
|
136
|
+
}), safariUrl), !webPageUrl && renderInfoBlock(lang({
|
|
137
|
+
message: 'SMART.OPEN_ACTIONS.DEVICE.WEB'
|
|
138
|
+
}), lang({
|
|
139
|
+
message: 'SMART.OPEN_ACTIONS.ACTION.OPEN_HOME_BROWSER'
|
|
140
|
+
}))]
|
|
141
|
+
}) : _jsx(Spinner, {
|
|
142
|
+
color: Color.MAIN,
|
|
143
|
+
size: "medium"
|
|
144
|
+
})
|
|
145
|
+
});
|
|
82
146
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { type Preset } from '@pushwoosh/rpc-v2-http-api-data/presets';
|
|
3
2
|
type OpenActionsByPresetProps = {
|
|
4
3
|
pushPreset: Preset;
|
|
5
4
|
};
|
|
6
|
-
export declare const OpenActionsSummaryByPreset: ({ pushPreset }: OpenActionsByPresetProps) =>
|
|
5
|
+
export declare const OpenActionsSummaryByPreset: ({ pushPreset }: OpenActionsByPresetProps) => import("react").JSX.Element;
|
|
7
6
|
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { OpenActionsSummary } from './OpenActionsSummary';
|
|
3
3
|
import { usePresetOpenActions } from '../usePresetOpenActions';
|
|
4
4
|
export const OpenActionsSummaryByPreset = ({
|
|
5
5
|
pushPreset
|
|
6
6
|
}) => {
|
|
7
7
|
const openActions = usePresetOpenActions(pushPreset);
|
|
8
|
-
return
|
|
8
|
+
return _jsx(OpenActionsSummary, {
|
|
9
9
|
openActions: openActions
|
|
10
10
|
});
|
|
11
11
|
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { type OpenActionsMessages } from './types';
|
|
2
|
+
export declare const Lang: import("react").FC<import("@pushwoosh/dumb-components/polyglot").LangProps<OpenActionsMessages>>, useLang: () => (props: import("@pushwoosh/dumb-components/polyglot").LangProps<OpenActionsMessages>) => string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export const messages = {
|
|
2
|
+
'SMART.OPEN_ACTIONS.INFO_BLOCK': 'For <strong>{{device}}</strong> subscribers: <strong>{{action}}</strong>',
|
|
3
|
+
'SMART.OPEN_ACTIONS.DEVICE.MOBILE': 'mobile',
|
|
4
|
+
'SMART.OPEN_ACTIONS.DEVICE.WEB': 'web',
|
|
5
|
+
'SMART.OPEN_ACTIONS.DEVICE.SAFARI': 'Safari',
|
|
6
|
+
'SMART.OPEN_ACTIONS.DEVICE.OTHER_PLATFORMS': 'Other platforms',
|
|
7
|
+
'SMART.OPEN_ACTIONS.ACTION.OPEN_INAPP': 'open in-app banner',
|
|
8
|
+
'SMART.OPEN_ACTIONS.ACTION.FOLLOW_DEEPLINK': 'follow the Deep link',
|
|
9
|
+
'SMART.OPEN_ACTIONS.ACTION.OPEN_URL_BROWSER': 'open URL in browser',
|
|
10
|
+
'SMART.OPEN_ACTIONS.ACTION.DEEP_LINK': 'deep link',
|
|
11
|
+
'SMART.OPEN_ACTIONS.ACTION.OPEN_HOME_APP': 'open home page in application',
|
|
12
|
+
'SMART.OPEN_ACTIONS.ACTION.OPEN_URL_SAFARI': 'open URL in Safari browser',
|
|
13
|
+
'SMART.OPEN_ACTIONS.ACTION.OPEN_HOME_BROWSER': 'open home page in browser'
|
|
14
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export const messages = {
|
|
2
|
+
'SMART.OPEN_ACTIONS.INFO_BLOCK': 'Для подписчиков <strong>{{device}}</strong>: <strong>{{action}}</strong>',
|
|
3
|
+
'SMART.OPEN_ACTIONS.DEVICE.MOBILE': 'мобильных приложений',
|
|
4
|
+
'SMART.OPEN_ACTIONS.DEVICE.WEB': 'веба',
|
|
5
|
+
'SMART.OPEN_ACTIONS.DEVICE.SAFARI': 'Safari',
|
|
6
|
+
'SMART.OPEN_ACTIONS.DEVICE.OTHER_PLATFORMS': 'Другие платформы',
|
|
7
|
+
'SMART.OPEN_ACTIONS.ACTION.OPEN_INAPP': 'открыть in-app баннер',
|
|
8
|
+
'SMART.OPEN_ACTIONS.ACTION.FOLLOW_DEEPLINK': 'перейти по диплинку',
|
|
9
|
+
'SMART.OPEN_ACTIONS.ACTION.OPEN_URL_BROWSER': 'открыть URL в браузере',
|
|
10
|
+
'SMART.OPEN_ACTIONS.ACTION.DEEP_LINK': 'диплинк',
|
|
11
|
+
'SMART.OPEN_ACTIONS.ACTION.OPEN_HOME_APP': 'открыть главную страницу в приложении',
|
|
12
|
+
'SMART.OPEN_ACTIONS.ACTION.OPEN_URL_SAFARI': 'открыть URL в браузере Safari',
|
|
13
|
+
'SMART.OPEN_ACTIONS.ACTION.OPEN_HOME_BROWSER': 'открыть главную страницу в браузере'
|
|
14
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { NoParams } from '@pushwoosh/dumb-components/polyglot';
|
|
2
|
+
export type OpenActionsMessages = {
|
|
3
|
+
'SMART.OPEN_ACTIONS.INFO_BLOCK': {
|
|
4
|
+
device: string;
|
|
5
|
+
action: string;
|
|
6
|
+
};
|
|
7
|
+
'SMART.OPEN_ACTIONS.DEVICE.MOBILE': NoParams;
|
|
8
|
+
'SMART.OPEN_ACTIONS.DEVICE.WEB': NoParams;
|
|
9
|
+
'SMART.OPEN_ACTIONS.DEVICE.SAFARI': NoParams;
|
|
10
|
+
'SMART.OPEN_ACTIONS.DEVICE.OTHER_PLATFORMS': NoParams;
|
|
11
|
+
'SMART.OPEN_ACTIONS.ACTION.OPEN_INAPP': NoParams;
|
|
12
|
+
'SMART.OPEN_ACTIONS.ACTION.FOLLOW_DEEPLINK': NoParams;
|
|
13
|
+
'SMART.OPEN_ACTIONS.ACTION.OPEN_URL_BROWSER': NoParams;
|
|
14
|
+
'SMART.OPEN_ACTIONS.ACTION.DEEP_LINK': NoParams;
|
|
15
|
+
'SMART.OPEN_ACTIONS.ACTION.OPEN_HOME_APP': NoParams;
|
|
16
|
+
'SMART.OPEN_ACTIONS.ACTION.OPEN_URL_SAFARI': NoParams;
|
|
17
|
+
'SMART.OPEN_ACTIONS.ACTION.OPEN_HOME_BROWSER': NoParams;
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
2
3
|
import { Drawer, DrawerBody } from '@pushwoosh/dumb-components';
|
|
3
4
|
import { DesktopPage } from './components/DesktopPage';
|
|
4
5
|
import { MainPage } from './components/MainPage';
|
|
@@ -19,22 +20,25 @@ export function PlatformsConfigurationDrawer(props) {
|
|
|
19
20
|
setIsOpenDesktopPage(false);
|
|
20
21
|
onClose();
|
|
21
22
|
};
|
|
22
|
-
return
|
|
23
|
+
return _jsx(Drawer, {
|
|
23
24
|
size: "medium",
|
|
24
25
|
isOpen: isOpen,
|
|
25
|
-
onClose: onClose
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
26
|
+
onClose: onClose,
|
|
27
|
+
children: _jsxs(DrawerBody, {
|
|
28
|
+
children: [isOpenMobilePage && _jsx(MobilePage, {
|
|
29
|
+
application: application,
|
|
30
|
+
onBack: toggleMobilePage,
|
|
31
|
+
onClose: onCloseHandler
|
|
32
|
+
}), isOpenDesktopPage && _jsx(DesktopPage, {
|
|
33
|
+
application: application,
|
|
34
|
+
onBack: toggleDesktopPage,
|
|
35
|
+
onClose: onCloseHandler
|
|
36
|
+
}), !isOpenDesktopPage && !isOpenMobilePage && _jsx(MainPage, {
|
|
37
|
+
application: application,
|
|
38
|
+
onClickMobile: toggleMobilePage,
|
|
39
|
+
onClickDesktop: toggleDesktopPage,
|
|
40
|
+
onClose: onCloseHandler
|
|
41
|
+
})]
|
|
42
|
+
})
|
|
43
|
+
});
|
|
40
44
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { Button } from '@pushwoosh/dumb-components';
|
|
3
3
|
import { Color, AllPlatforms } from '@pushwoosh/kit-constants';
|
|
4
4
|
import { Vertical, Columns } 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 DesktopPage(props) {
|
|
9
10
|
const {
|
|
@@ -11,62 +12,118 @@ export function DesktopPage(props) {
|
|
|
11
12
|
onBack,
|
|
12
13
|
onClose
|
|
13
14
|
} = props;
|
|
15
|
+
const lang = useLang();
|
|
14
16
|
const hasWindowsPlatform = Object.hasOwn((application === null || application === void 0 ? void 0 : application.platforms) || {}, AllPlatforms.Windows);
|
|
15
17
|
const hasMacOSPlatform = Object.hasOwn((application === null || application === void 0 ? void 0 : application.platforms) || {}, AllPlatforms.OSX);
|
|
16
|
-
return
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
|
|
18
|
+
return _jsxs(_Fragment, {
|
|
19
|
+
children: [_jsx(Header, {
|
|
20
|
+
children: _jsxs(ColumnsWrapper, {
|
|
21
|
+
children: [_jsxs(Columns, {
|
|
22
|
+
"$sizes": "auto 1fr auto",
|
|
23
|
+
"$alignItems": "center",
|
|
24
|
+
"$gap": 6,
|
|
25
|
+
children: [_jsx(Button, {
|
|
26
|
+
color: "primary",
|
|
27
|
+
view: "ghost",
|
|
28
|
+
onClick: onBack,
|
|
29
|
+
children: _jsx(ArrowRoundIcon, {
|
|
30
|
+
direction: "left",
|
|
31
|
+
size: "medium",
|
|
32
|
+
view: "filled"
|
|
33
|
+
})
|
|
34
|
+
}), _jsx(H2, {
|
|
35
|
+
children: lang({
|
|
36
|
+
message: 'SMART.PLATFORMS_CONFIGURATION_DRAWER.DESKTOP.HEADING'
|
|
37
|
+
})
|
|
38
|
+
}), _jsx(Close, {
|
|
39
|
+
children: _jsx(Button, {
|
|
40
|
+
view: "ghost",
|
|
41
|
+
color: "secondary",
|
|
42
|
+
icon: _jsx(CloseIcon, {
|
|
43
|
+
size: "medium"
|
|
44
|
+
}),
|
|
45
|
+
onClick: onClose
|
|
46
|
+
})
|
|
47
|
+
})]
|
|
48
|
+
}), _jsxs(BreadCrumbs, {
|
|
49
|
+
children: [_jsx(Text, {
|
|
50
|
+
"$color": Color.LOCKED,
|
|
51
|
+
children: lang({
|
|
52
|
+
message: 'SMART.PLATFORMS_CONFIGURATION_DRAWER.BREADCRUMB.CHANNEL'
|
|
53
|
+
})
|
|
54
|
+
}), _jsx(Text, {
|
|
55
|
+
"$color": Color.LOCKED,
|
|
56
|
+
children: "\u00A0\u203A\u00A0"
|
|
57
|
+
}), _jsx(Text, {
|
|
58
|
+
"$color": Color.LOCKED,
|
|
59
|
+
children: lang({
|
|
60
|
+
message: 'SMART.PLATFORMS_CONFIGURATION_DRAWER.BREADCRUMB.PLATFORM'
|
|
61
|
+
})
|
|
62
|
+
}), _jsx(Text, {
|
|
63
|
+
"$color": Color.PHANTOM,
|
|
64
|
+
children: "\u00A0\u203A\u00A0"
|
|
65
|
+
}), _jsx(Text, {
|
|
66
|
+
"$color": Color.PHANTOM,
|
|
67
|
+
children: lang({
|
|
68
|
+
message: 'SMART.PLATFORMS_CONFIGURATION_DRAWER.BREADCRUMB.GATEWAY'
|
|
69
|
+
})
|
|
70
|
+
}), _jsx(Text, {
|
|
71
|
+
"$color": Color.PHANTOM,
|
|
72
|
+
children: "\u00A0\u203A\u00A0"
|
|
73
|
+
}), _jsx(Text, {
|
|
74
|
+
"$color": Color.PHANTOM,
|
|
75
|
+
children: lang({
|
|
76
|
+
message: 'SMART.PLATFORMS_CONFIGURATION_DRAWER.BREADCRUMB.SDK'
|
|
77
|
+
})
|
|
78
|
+
}), _jsx(Text, {
|
|
79
|
+
"$color": Color.PHANTOM,
|
|
80
|
+
children: "\u00A0\u203A\u00A0"
|
|
81
|
+
}), _jsx(Text, {
|
|
82
|
+
"$color": Color.PHANTOM,
|
|
83
|
+
children: lang({
|
|
84
|
+
message: 'SMART.PLATFORMS_CONFIGURATION_DRAWER.BREADCRUMB.TEST_MESSAGE'
|
|
85
|
+
})
|
|
86
|
+
})]
|
|
87
|
+
})]
|
|
88
|
+
})
|
|
89
|
+
}), _jsxs(Vertical, {
|
|
90
|
+
"$padding": "12px 0 0",
|
|
91
|
+
"$gap": 8,
|
|
92
|
+
children: [_jsx(H4, {
|
|
93
|
+
children: lang({
|
|
94
|
+
message: 'SMART.PLATFORMS_CONFIGURATION_DRAWER.PLATFORM_QUESTION'
|
|
95
|
+
})
|
|
96
|
+
}), _jsxs(Columns, {
|
|
97
|
+
"$sizes": "1fr 1fr",
|
|
98
|
+
"$gap": 6,
|
|
99
|
+
children: [hasWindowsPlatform && _jsxs(Card, {
|
|
100
|
+
as: "a",
|
|
101
|
+
href: `/applications/${application === null || application === void 0 ? void 0 : application.code}/configure`,
|
|
102
|
+
children: [_jsx(CardIcon, {
|
|
103
|
+
children: _jsx(PlatformLogoIcon, {
|
|
104
|
+
type: "windows",
|
|
105
|
+
size: "medium"
|
|
106
|
+
})
|
|
107
|
+
}), _jsx(H4, {
|
|
108
|
+
children: lang({
|
|
109
|
+
message: 'SMART.PLATFORMS_CONFIGURATION_DRAWER.CARD.WINDOWS'
|
|
110
|
+
})
|
|
111
|
+
})]
|
|
112
|
+
}), hasMacOSPlatform && _jsxs(Card, {
|
|
113
|
+
as: "a",
|
|
114
|
+
href: `/applications/${application === null || application === void 0 ? void 0 : application.code}/configure/osx`,
|
|
115
|
+
children: [_jsx(CardIcon, {
|
|
116
|
+
children: _jsx(PlatformLogoIcon, {
|
|
117
|
+
type: "macos",
|
|
118
|
+
size: "medium"
|
|
119
|
+
})
|
|
120
|
+
}), _jsx(H4, {
|
|
121
|
+
children: lang({
|
|
122
|
+
message: 'SMART.PLATFORMS_CONFIGURATION_DRAWER.CARD.MACOS'
|
|
123
|
+
})
|
|
124
|
+
})]
|
|
125
|
+
})]
|
|
126
|
+
})]
|
|
127
|
+
})]
|
|
128
|
+
});
|
|
72
129
|
}
|