@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,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,4 +1,4 @@
|
|
|
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';
|
|
@@ -15,93 +15,108 @@ export function CampaignsConfigurationDrawer(props) {
|
|
|
15
15
|
onClose
|
|
16
16
|
} = props;
|
|
17
17
|
const lang = useLang();
|
|
18
|
-
return
|
|
18
|
+
return _jsxs(Drawer, {
|
|
19
19
|
size: "medium",
|
|
20
20
|
isOpen: isOpen,
|
|
21
|
-
onClose: onClose
|
|
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
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
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
|
+
});
|
|
107
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
|
}
|
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,4 +1,4 @@
|
|
|
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
4
|
import { useLang } from './polyglot';
|
|
@@ -7,20 +7,21 @@ export const DynamicContentCustomPickerForm = ({
|
|
|
7
7
|
onChange
|
|
8
8
|
}) => {
|
|
9
9
|
const lang = useLang();
|
|
10
|
-
return
|
|
11
|
-
"$gap": 16
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
+
});
|
|
26
27
|
};
|