@pushwoosh/smart-components-kit 1.0.90 → 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 +103 -88
- package/CampaignsConfigurationDrawer/components/Card/Card.d.ts +1 -2
- package/CampaignsConfigurationDrawer/components/Card/Card.js +19 -13
- 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 +18 -17
- package/DynamicContentPickerForm/DynamicContentEventPickerForm.js +60 -57
- package/DynamicContentPickerForm/DynamicContentTagPickerForm.js +60 -57
- package/DynamicContentPickerForm/SimpleDynamicContentPickerFormSmart.js +72 -63
- package/DynamicContentPickerForm/VariedDynamicContentPickerFormSmart.js +86 -74
- package/EmailTemplatePreview/EmailTemplatePreview.js +8 -6
- package/ExportCSV/ExportCsvBanner/ExportCsvBanner.d.ts +1 -2
- package/ExportCSV/ExportCsvBanner/ExportCsvBanner.js +54 -49
- 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 +98 -78
- package/OpenActions/components/OpenActionsSummaryByPreset.d.ts +1 -2
- package/OpenActions/components/OpenActionsSummaryByPreset.js +2 -2
- package/PlatformsConfigurationDrawer/PlatformsConfigurationDrawer.js +21 -17
- package/PlatformsConfigurationDrawer/components/DesktopPage/DesktopPage.js +112 -75
- package/PlatformsConfigurationDrawer/components/MainPage/MainPage.js +155 -101
- package/PlatformsConfigurationDrawer/components/MobilePage/MobilePage.js +138 -91
- package/ResendModal/ResendModal.d.ts +1 -2
- package/ResendModal/ResendModal.js +92 -72
- 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 } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
2
3
|
import { useForm } from 'react-hook-form';
|
|
3
4
|
import { useParams } from 'react-router-dom';
|
|
4
5
|
import { FieldBox, Modal, ModalBody, ModalHeader, ModalFooter, NativeInput, Select, Button, Banner } from '@pushwoosh/dumb-components';
|
|
@@ -183,97 +184,118 @@ export function ModalCloningJourney({
|
|
|
183
184
|
message: 'SMART.MODAL_CLONING_JOURNEY.HOW_IT_WORKS.SAME_CLEAR'
|
|
184
185
|
});
|
|
185
186
|
};
|
|
186
|
-
return
|
|
187
|
+
return _jsxs(Modal, {
|
|
187
188
|
size: "medium",
|
|
188
|
-
isOpen: isOpen
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
message: 'SMART.MODAL_CLONING_JOURNEY.DESCRIPTION'
|
|
195
|
-
})), React.createElement(FieldBox, {
|
|
196
|
-
error: (_errors$title = errors.title) === null || _errors$title === void 0 ? void 0 : _errors$title.message,
|
|
197
|
-
title: lang({
|
|
198
|
-
message: 'SMART.MODAL_CLONING_JOURNEY.FIELD.CAMPAIGN_NAME'
|
|
199
|
-
})
|
|
200
|
-
}, React.createElement(NativeInput, {
|
|
201
|
-
disabled: isCloning,
|
|
202
|
-
placeholder: lang({
|
|
203
|
-
message: 'SMART.MODAL_CLONING_JOURNEY.PLACEHOLDER.CAMPAIGN_NAME'
|
|
204
|
-
}),
|
|
205
|
-
name: "title",
|
|
206
|
-
value: values.title,
|
|
207
|
-
onChange: e => {
|
|
208
|
-
setValue('title', e.target.value);
|
|
209
|
-
if (e.target.value) {
|
|
210
|
-
clearErrors('title');
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
})), React.createElement(FieldBox, {
|
|
214
|
-
title: lang({
|
|
215
|
-
message: 'SMART.MODAL_CLONING_JOURNEY.FIELD.DESTINATION'
|
|
216
|
-
}),
|
|
217
|
-
error: (_errors$destination = errors.destination) === null || _errors$destination === void 0 ? void 0 : _errors$destination.message,
|
|
218
|
-
description: lang({
|
|
219
|
-
message: 'SMART.MODAL_CLONING_JOURNEY.FIELD.DESTINATION_HINT'
|
|
220
|
-
})
|
|
221
|
-
}, React.createElement(Select, {
|
|
222
|
-
isDisabled: isCloning || applications.loading,
|
|
223
|
-
isLoading: applications.loading,
|
|
224
|
-
isMulti: true,
|
|
225
|
-
options: applicationsOptions,
|
|
226
|
-
name: "destination",
|
|
227
|
-
isClearable: true,
|
|
228
|
-
menuPortalTarget: document.querySelector('body'),
|
|
229
|
-
styles: {
|
|
230
|
-
menuPortal: base => ({
|
|
231
|
-
...base,
|
|
232
|
-
zIndex: 10001
|
|
189
|
+
isOpen: isOpen,
|
|
190
|
+
children: [_jsx(ModalHeader, {
|
|
191
|
+
children: _jsx(H3, {
|
|
192
|
+
children: lang({
|
|
193
|
+
message: 'SMART.MODAL_CLONING_JOURNEY.HEADING'
|
|
194
|
+
})
|
|
233
195
|
})
|
|
234
|
-
},
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
196
|
+
}), _jsx(ModalBody, {
|
|
197
|
+
children: _jsxs(Vertical, {
|
|
198
|
+
"$gap": 24,
|
|
199
|
+
children: [_jsx(Paragraph, {
|
|
200
|
+
children: lang({
|
|
201
|
+
message: 'SMART.MODAL_CLONING_JOURNEY.DESCRIPTION'
|
|
202
|
+
})
|
|
203
|
+
}), _jsx(FieldBox, {
|
|
204
|
+
error: (_errors$title = errors.title) === null || _errors$title === void 0 ? void 0 : _errors$title.message,
|
|
205
|
+
title: lang({
|
|
206
|
+
message: 'SMART.MODAL_CLONING_JOURNEY.FIELD.CAMPAIGN_NAME'
|
|
207
|
+
}),
|
|
208
|
+
children: _jsx(NativeInput, {
|
|
209
|
+
disabled: isCloning,
|
|
210
|
+
placeholder: lang({
|
|
211
|
+
message: 'SMART.MODAL_CLONING_JOURNEY.PLACEHOLDER.CAMPAIGN_NAME'
|
|
212
|
+
}),
|
|
213
|
+
name: "title",
|
|
214
|
+
value: values.title,
|
|
215
|
+
onChange: e => {
|
|
216
|
+
setValue('title', e.target.value);
|
|
217
|
+
if (e.target.value) {
|
|
218
|
+
clearErrors('title');
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
})
|
|
222
|
+
}), _jsx(FieldBox, {
|
|
223
|
+
title: lang({
|
|
224
|
+
message: 'SMART.MODAL_CLONING_JOURNEY.FIELD.DESTINATION'
|
|
225
|
+
}),
|
|
226
|
+
error: (_errors$destination = errors.destination) === null || _errors$destination === void 0 ? void 0 : _errors$destination.message,
|
|
227
|
+
description: lang({
|
|
228
|
+
message: 'SMART.MODAL_CLONING_JOURNEY.FIELD.DESTINATION_HINT'
|
|
229
|
+
}),
|
|
230
|
+
children: _jsx(Select, {
|
|
231
|
+
isDisabled: isCloning || applications.loading,
|
|
232
|
+
isLoading: applications.loading,
|
|
233
|
+
isMulti: true,
|
|
234
|
+
options: applicationsOptions,
|
|
235
|
+
name: "destination",
|
|
236
|
+
isClearable: true,
|
|
237
|
+
menuPortalTarget: document.querySelector('body'),
|
|
238
|
+
styles: {
|
|
239
|
+
menuPortal: base => ({
|
|
240
|
+
...base,
|
|
241
|
+
zIndex: 10001
|
|
242
|
+
})
|
|
243
|
+
},
|
|
244
|
+
onChange: handleDestinationChange,
|
|
245
|
+
value: values.destination ? applicationsOptions.filter(app => values.destination.includes(app.value)) : []
|
|
246
|
+
})
|
|
247
|
+
}), _jsxs(FieldBox, {
|
|
248
|
+
title: lang({
|
|
249
|
+
message: 'SMART.MODAL_CLONING_JOURNEY.FIELD.CONTENT'
|
|
250
|
+
}),
|
|
251
|
+
error: (_errors$todo = errors.todo) === null || _errors$todo === void 0 ? void 0 : _errors$todo.message,
|
|
252
|
+
children: [_jsx(Select, {
|
|
253
|
+
isDisabled: isCloning,
|
|
254
|
+
name: "todo",
|
|
255
|
+
options: contentOptions,
|
|
256
|
+
onChange: params => setValue('todo', (params === null || params === void 0 ? void 0 : params.value) ?? 'keep'),
|
|
257
|
+
value: contentOptions.find(item => item.value === values.todo),
|
|
258
|
+
menuPortalTarget: document.querySelector('body'),
|
|
259
|
+
styles: {
|
|
260
|
+
menuPortal: base => ({
|
|
261
|
+
...base,
|
|
262
|
+
zIndex: 10001
|
|
263
|
+
})
|
|
264
|
+
}
|
|
265
|
+
}), _jsxs(Vertical, {
|
|
266
|
+
"$gap": 24,
|
|
267
|
+
children: [_jsx(Paragraph, {
|
|
268
|
+
children: howItWorks()
|
|
269
|
+
}), isCloningToAnotherProject && values.todo === 'keep' && _jsx(Banner, {
|
|
270
|
+
view: "ghost",
|
|
271
|
+
type: "warning",
|
|
272
|
+
title: lang({
|
|
273
|
+
message: 'SMART.MODAL_CLONING_JOURNEY.BANNER.PRESET_SYNC'
|
|
274
|
+
})
|
|
275
|
+
})]
|
|
276
|
+
})]
|
|
277
|
+
})]
|
|
253
278
|
})
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
}, lang({
|
|
277
|
-
message: 'SMART.MODAL_CLONING_JOURNEY.BUTTON.CLONE'
|
|
278
|
-
})))));
|
|
279
|
+
}), _jsx(ModalFooter, {
|
|
280
|
+
children: _jsxs(Horizontal, {
|
|
281
|
+
"$justifyContent": "end",
|
|
282
|
+
"$gap": 8,
|
|
283
|
+
children: [_jsx(Button, {
|
|
284
|
+
color: "secondary",
|
|
285
|
+
onClick: onCancel,
|
|
286
|
+
isDisabled: isCloning,
|
|
287
|
+
children: lang({
|
|
288
|
+
message: 'SMART.MODAL_CLONING_JOURNEY.BUTTON.CANCEL'
|
|
289
|
+
})
|
|
290
|
+
}), _jsx(Button, {
|
|
291
|
+
color: "primary",
|
|
292
|
+
onClick: onFormSubmit,
|
|
293
|
+
isLoading: isCloning,
|
|
294
|
+
children: lang({
|
|
295
|
+
message: 'SMART.MODAL_CLONING_JOURNEY.BUTTON.CLONE'
|
|
296
|
+
})
|
|
297
|
+
})]
|
|
298
|
+
})
|
|
299
|
+
})]
|
|
300
|
+
});
|
|
279
301
|
}
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { OpenActionsSummaryProps } from '../../types';
|
|
3
|
-
export declare const OpenActionsSummary: ({ openActions }: OpenActionsSummaryProps) =>
|
|
2
|
+
export declare const OpenActionsSummary: ({ openActions }: OpenActionsSummaryProps) => import("react").JSX.Element;
|
|
@@ -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';
|
|
@@ -27,47 +28,63 @@ export const OpenActionsSummary = ({
|
|
|
27
28
|
const {
|
|
28
29
|
rpcGateway
|
|
29
30
|
} = useSPAContext();
|
|
31
|
+
// Стабильный кэш-бастер для легаси-ссылки рич-медиа: ленивый инициализатор
|
|
32
|
+
// useState вычисляет Date.now() один раз на маунт (вне render-scope), чтобы
|
|
33
|
+
// href не менялся на каждый ререндер (react-hooks/purity).
|
|
34
|
+
const [richmediaCacheBuster] = useState(() => Date.now());
|
|
30
35
|
const applicationData = useAsync(() => applicationCode ? rpcGateway.applications.Get({
|
|
31
36
|
code: applicationCode
|
|
32
37
|
}) : Promise.resolve(undefined), [rpcGateway, applicationCode]);
|
|
33
38
|
const hasCustomPlatformsDeeplink = Object.keys(platformsDeeplinkUrls).length > 0;
|
|
34
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 ?? '');
|
|
35
|
-
const renderInfoBlock = (device, action, url = null, urlText) =>
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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
|
+
});
|
|
52
65
|
const renderPlatformDeepLink = (platformKey, url, label) => {
|
|
53
66
|
const isEnumKey = typeof platformKey === 'number';
|
|
54
67
|
const icon = isEnumKey ? PlatformsIcons[platformKey] : null;
|
|
55
68
|
const labelText = isEnumKey ? PlatformsLabels[platformKey] : platformKey;
|
|
56
|
-
return
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
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);
|
|
71
88
|
};
|
|
72
89
|
const getRichmediaLink = ({
|
|
73
90
|
url,
|
|
@@ -75,52 +92,55 @@ export const OpenActionsSummary = ({
|
|
|
75
92
|
createdType = 'BUILDER'
|
|
76
93
|
}) => {
|
|
77
94
|
if (code) {
|
|
78
|
-
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}`;
|
|
79
96
|
}
|
|
80
97
|
return url;
|
|
81
98
|
};
|
|
82
|
-
return
|
|
83
|
-
"$gap": 8
|
|
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
|
-
|
|
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
|
+
});
|
|
126
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
|
};
|
|
@@ -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
|
}
|