@pushwoosh/smart-components-kit 1.0.90 → 1.1.1
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.d.ts +6 -10
- package/MediaStore/MediaStore.js +201 -161
- package/MediaStore/MediaStorePaginated.d.ts +8 -0
- package/MediaStore/MediaStorePaginated.js +24 -0
- package/MediaStore/index.d.ts +3 -1
- package/MediaStore/index.js +2 -1
- package/MediaStore/types.d.ts +22 -0
- package/MediaStore/types.js +1 -0
- 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,4 @@
|
|
|
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 } from '@pushwoosh/kit-constants';
|
|
4
4
|
import { Columns, Vertical } from '@pushwoosh/kit-helpers';
|
|
@@ -13,94 +13,141 @@ export function MobilePage(props) {
|
|
|
13
13
|
onClose
|
|
14
14
|
} = props;
|
|
15
15
|
const lang = useLang();
|
|
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
|
-
|
|
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
|
-
|
|
16
|
+
return _jsxs(_Fragment, {
|
|
17
|
+
children: [_jsx(Header, {
|
|
18
|
+
children: _jsxs(ColumnsWrapper, {
|
|
19
|
+
children: [_jsxs(Columns, {
|
|
20
|
+
"$sizes": "auto 1fr auto",
|
|
21
|
+
"$alignItems": "center",
|
|
22
|
+
"$gap": 6,
|
|
23
|
+
children: [_jsx(Button, {
|
|
24
|
+
color: "primary",
|
|
25
|
+
view: "ghost",
|
|
26
|
+
onClick: onBack,
|
|
27
|
+
children: _jsx(ArrowRoundIcon, {
|
|
28
|
+
direction: "left",
|
|
29
|
+
size: "medium",
|
|
30
|
+
view: "filled"
|
|
31
|
+
})
|
|
32
|
+
}), _jsx(H2, {
|
|
33
|
+
children: lang({
|
|
34
|
+
message: 'SMART.PLATFORMS_CONFIGURATION_DRAWER.MOBILE.HEADING'
|
|
35
|
+
})
|
|
36
|
+
}), _jsx(Close, {
|
|
37
|
+
children: _jsx(Button, {
|
|
38
|
+
view: "ghost",
|
|
39
|
+
color: "secondary",
|
|
40
|
+
icon: _jsx(CloseIcon, {
|
|
41
|
+
size: "medium"
|
|
42
|
+
}),
|
|
43
|
+
onClick: onClose
|
|
44
|
+
})
|
|
45
|
+
})]
|
|
46
|
+
}), _jsxs(BreadCrumbs, {
|
|
47
|
+
children: [_jsx(Text, {
|
|
48
|
+
"$color": Color.LOCKED,
|
|
49
|
+
children: lang({
|
|
50
|
+
message: 'SMART.PLATFORMS_CONFIGURATION_DRAWER.BREADCRUMB.CHANNEL'
|
|
51
|
+
})
|
|
52
|
+
}), _jsx(Text, {
|
|
53
|
+
"$color": Color.LOCKED,
|
|
54
|
+
children: "\u00A0\u203A\u00A0"
|
|
55
|
+
}), _jsx(Text, {
|
|
56
|
+
"$color": Color.LOCKED,
|
|
57
|
+
children: lang({
|
|
58
|
+
message: 'SMART.PLATFORMS_CONFIGURATION_DRAWER.BREADCRUMB.PLATFORM'
|
|
59
|
+
})
|
|
60
|
+
}), _jsx(Text, {
|
|
61
|
+
"$color": Color.PHANTOM,
|
|
62
|
+
children: "\u00A0\u203A\u00A0"
|
|
63
|
+
}), _jsx(Text, {
|
|
64
|
+
"$color": Color.PHANTOM,
|
|
65
|
+
children: lang({
|
|
66
|
+
message: 'SMART.PLATFORMS_CONFIGURATION_DRAWER.BREADCRUMB.GATEWAY'
|
|
67
|
+
})
|
|
68
|
+
}), _jsx(Text, {
|
|
69
|
+
"$color": Color.PHANTOM,
|
|
70
|
+
children: "\u00A0\u203A\u00A0"
|
|
71
|
+
}), _jsx(Text, {
|
|
72
|
+
"$color": Color.PHANTOM,
|
|
73
|
+
children: lang({
|
|
74
|
+
message: 'SMART.PLATFORMS_CONFIGURATION_DRAWER.BREADCRUMB.SDK'
|
|
75
|
+
})
|
|
76
|
+
}), _jsx(Text, {
|
|
77
|
+
"$color": Color.PHANTOM,
|
|
78
|
+
children: "\u00A0\u203A\u00A0"
|
|
79
|
+
}), _jsx(Text, {
|
|
80
|
+
"$color": Color.PHANTOM,
|
|
81
|
+
children: lang({
|
|
82
|
+
message: 'SMART.PLATFORMS_CONFIGURATION_DRAWER.BREADCRUMB.TEST_MESSAGE'
|
|
83
|
+
})
|
|
84
|
+
})]
|
|
85
|
+
})]
|
|
86
|
+
})
|
|
87
|
+
}), _jsxs(Vertical, {
|
|
88
|
+
"$padding": "12px 0 0",
|
|
89
|
+
"$gap": 8,
|
|
90
|
+
children: [_jsx(H4, {
|
|
91
|
+
children: lang({
|
|
92
|
+
message: 'SMART.PLATFORMS_CONFIGURATION_DRAWER.PLATFORM_QUESTION'
|
|
93
|
+
})
|
|
94
|
+
}), _jsxs(Columns, {
|
|
95
|
+
"$sizes": "1fr 1fr",
|
|
96
|
+
"$gap": 6,
|
|
97
|
+
children: [_jsxs(Card, {
|
|
98
|
+
as: "a",
|
|
99
|
+
href: `/applications/${application === null || application === void 0 ? void 0 : application.code}/configure/ios`,
|
|
100
|
+
children: [_jsx(CardIcon, {
|
|
101
|
+
children: _jsx(PlatformLogoIcon, {
|
|
102
|
+
type: "apple",
|
|
103
|
+
size: "medium"
|
|
104
|
+
})
|
|
105
|
+
}), _jsx(H4, {
|
|
106
|
+
children: lang({
|
|
107
|
+
message: 'SMART.PLATFORMS_CONFIGURATION_DRAWER.CARD.IOS'
|
|
108
|
+
})
|
|
109
|
+
})]
|
|
110
|
+
}), _jsxs(Card, {
|
|
111
|
+
as: "a",
|
|
112
|
+
href: `/applications/${application === null || application === void 0 ? void 0 : application.code}/configure/android`,
|
|
113
|
+
children: [_jsx(CardIcon, {
|
|
114
|
+
children: _jsx(PlatformLogoIcon, {
|
|
115
|
+
type: "android",
|
|
116
|
+
size: "medium"
|
|
117
|
+
})
|
|
118
|
+
}), _jsx(H4, {
|
|
119
|
+
children: lang({
|
|
120
|
+
message: 'SMART.PLATFORMS_CONFIGURATION_DRAWER.CARD.ANDROID'
|
|
121
|
+
})
|
|
122
|
+
})]
|
|
123
|
+
}), _jsxs(Card, {
|
|
124
|
+
as: "a",
|
|
125
|
+
href: `/applications/${application === null || application === void 0 ? void 0 : application.code}/configure/huawei`,
|
|
126
|
+
children: [_jsx(CardIcon, {
|
|
127
|
+
children: _jsx(PlatformLogoIcon, {
|
|
128
|
+
type: "huawei",
|
|
129
|
+
size: "medium"
|
|
130
|
+
})
|
|
131
|
+
}), _jsx(H4, {
|
|
132
|
+
children: lang({
|
|
133
|
+
message: 'SMART.PLATFORMS_CONFIGURATION_DRAWER.CARD.HUAWEI'
|
|
134
|
+
})
|
|
135
|
+
})]
|
|
136
|
+
}), _jsxs(Card, {
|
|
137
|
+
as: "a",
|
|
138
|
+
href: `/applications/${application === null || application === void 0 ? void 0 : application.code}/configure`,
|
|
139
|
+
children: [_jsx(CardIcon, {
|
|
140
|
+
children: _jsx(PlatformLogoIcon, {
|
|
141
|
+
type: "amazon",
|
|
142
|
+
size: "medium"
|
|
143
|
+
})
|
|
144
|
+
}), _jsx(H4, {
|
|
145
|
+
children: lang({
|
|
146
|
+
message: 'SMART.PLATFORMS_CONFIGURATION_DRAWER.CARD.AMAZON'
|
|
147
|
+
})
|
|
148
|
+
})]
|
|
149
|
+
})]
|
|
150
|
+
})]
|
|
151
|
+
})]
|
|
152
|
+
});
|
|
106
153
|
}
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { type ResendModalProps } from './types';
|
|
3
|
-
export declare const ResendModal: ({ isOpen, onClose, applicationCode, message, emailTemplate: providedEmailTemplate, }: ResendModalProps) =>
|
|
2
|
+
export declare const ResendModal: ({ isOpen, onClose, applicationCode, message, emailTemplate: providedEmailTemplate, }: ResendModalProps) => import("react").JSX.Element | null;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useEffect, useMemo } from 'react';
|
|
2
3
|
import { Controller, useForm } from 'react-hook-form';
|
|
3
4
|
import { Button, FieldBox, Modal, ModalBody, ModalFooter, ModalHeader, ModalTitle, NativeInput } from '@pushwoosh/dumb-components';
|
|
4
5
|
import { Color } from '@pushwoosh/kit-constants';
|
|
@@ -118,79 +119,98 @@ export const ResendModal = ({
|
|
|
118
119
|
}
|
|
119
120
|
}, [applicationCode, message, onClose, presetSubject, resendEmail]);
|
|
120
121
|
if (!message) return null;
|
|
121
|
-
return
|
|
122
|
+
return _jsxs(Modal, {
|
|
122
123
|
size: "medium",
|
|
123
124
|
isOpen: isOpen,
|
|
124
|
-
onClose: onClose
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
message: 'SMART.RESEND_MODAL.DESCRIPTION'
|
|
131
|
-
})), React.createElement(Controller, {
|
|
132
|
-
control: control,
|
|
133
|
-
name: "presetSubject",
|
|
134
|
-
rules: {
|
|
135
|
-
required: lang({
|
|
136
|
-
message: 'SMART.RESEND_MODAL.ERROR.SUBJECT_REQUIRED'
|
|
125
|
+
onClose: onClose,
|
|
126
|
+
children: [_jsx(ModalHeader, {
|
|
127
|
+
children: _jsx(ModalTitle, {
|
|
128
|
+
children: lang({
|
|
129
|
+
message: 'SMART.RESEND_MODAL.TITLE'
|
|
130
|
+
})
|
|
137
131
|
})
|
|
138
|
-
},
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
132
|
+
}), _jsx(ModalBody, {
|
|
133
|
+
children: _jsxs(Vertical, {
|
|
134
|
+
"$gap": 16,
|
|
135
|
+
children: [_jsx(Paragraph, {
|
|
136
|
+
children: lang({
|
|
137
|
+
message: 'SMART.RESEND_MODAL.DESCRIPTION'
|
|
138
|
+
})
|
|
139
|
+
}), _jsx(Controller, {
|
|
140
|
+
control: control,
|
|
141
|
+
name: "presetSubject",
|
|
142
|
+
rules: {
|
|
143
|
+
required: lang({
|
|
144
|
+
message: 'SMART.RESEND_MODAL.ERROR.SUBJECT_REQUIRED'
|
|
145
|
+
})
|
|
146
|
+
},
|
|
147
|
+
render: ({
|
|
148
|
+
field,
|
|
149
|
+
fieldState
|
|
150
|
+
}) => {
|
|
151
|
+
var _fieldState$error;
|
|
152
|
+
return _jsx(FieldBox, {
|
|
153
|
+
title: lang({
|
|
154
|
+
message: 'SMART.RESEND_MODAL.FIELD.SUBJECT'
|
|
155
|
+
}),
|
|
156
|
+
error: !!fieldState.error && _jsx(Text, {
|
|
157
|
+
"$color": Color.DANGER,
|
|
158
|
+
children: (_fieldState$error = fieldState.error) === null || _fieldState$error === void 0 ? void 0 : _fieldState$error.message
|
|
159
|
+
}),
|
|
160
|
+
children: _jsx(NativeInput, {
|
|
161
|
+
value: field.value ?? '',
|
|
162
|
+
disabled: isMultilanguage,
|
|
163
|
+
"$isErrored": fieldState.invalid,
|
|
164
|
+
name: field.name,
|
|
165
|
+
onChange: ({
|
|
166
|
+
target: {
|
|
167
|
+
value
|
|
168
|
+
}
|
|
169
|
+
}) => {
|
|
170
|
+
if (value) {
|
|
171
|
+
clearErrors('presetSubject');
|
|
172
|
+
}
|
|
173
|
+
field.onChange(value);
|
|
174
|
+
}
|
|
175
|
+
})
|
|
176
|
+
});
|
|
159
177
|
}
|
|
160
|
-
})
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
178
|
+
})]
|
|
179
|
+
})
|
|
180
|
+
}), _jsx(ModalFooter, {
|
|
181
|
+
children: _jsxs(Horizontal, {
|
|
182
|
+
"$justifyContent": "space-between",
|
|
183
|
+
children: [_jsx(Button, {
|
|
184
|
+
color: "secondary",
|
|
185
|
+
icon: _jsx(EditIcon, {
|
|
186
|
+
size: "medium",
|
|
187
|
+
view: "lined"
|
|
188
|
+
}),
|
|
189
|
+
onClick: handleSubmit(() => {
|
|
190
|
+
history.push(editMessageUrl);
|
|
191
|
+
}),
|
|
192
|
+
children: lang({
|
|
193
|
+
message: 'SMART.RESEND_MODAL.BUTTON.EDIT'
|
|
194
|
+
})
|
|
195
|
+
}), _jsxs(Horizontal, {
|
|
196
|
+
"$gap": 8,
|
|
197
|
+
children: [_jsx(Button, {
|
|
198
|
+
color: "secondary",
|
|
199
|
+
onClick: onClose,
|
|
200
|
+
children: lang({
|
|
201
|
+
message: 'SMART.RESEND_MODAL.BUTTON.CANCEL'
|
|
202
|
+
})
|
|
203
|
+
}), _jsx(Button, {
|
|
204
|
+
color: "primary",
|
|
205
|
+
onClick: handleSubmit(() => {
|
|
206
|
+
handleResend();
|
|
207
|
+
}),
|
|
208
|
+
children: lang({
|
|
209
|
+
message: 'SMART.RESEND_MODAL.BUTTON.RESEND'
|
|
210
|
+
})
|
|
211
|
+
})]
|
|
212
|
+
})]
|
|
213
|
+
})
|
|
214
|
+
})]
|
|
215
|
+
});
|
|
196
216
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
2
3
|
import { Button } from '@pushwoosh/dumb-components';
|
|
3
4
|
import { Horizontal } from '@pushwoosh/kit-helpers';
|
|
4
5
|
import { SimpleDynamicContentPickerFormSmart } from '../DynamicContentPickerForm';
|
|
@@ -9,17 +10,20 @@ export const NewDynamicContentForm = ({
|
|
|
9
10
|
}) => {
|
|
10
11
|
const [dc, setDc] = useState();
|
|
11
12
|
const lang = useLang();
|
|
12
|
-
return
|
|
13
|
+
return _jsx(SimpleDynamicContentPickerFormSmart, {
|
|
13
14
|
dc: dc,
|
|
14
15
|
onChange: setDc,
|
|
15
|
-
update: update
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
update: update,
|
|
17
|
+
children: _jsx(Horizontal, {
|
|
18
|
+
"$justifyContent": "end",
|
|
19
|
+
children: _jsx(Button, {
|
|
20
|
+
color: "secondary",
|
|
21
|
+
onClick: () => onSubmit(dc),
|
|
22
|
+
isDisabled: !dc,
|
|
23
|
+
children: lang({
|
|
24
|
+
message: 'SMART.RICH_MESSAGE_EDITOR.INSERT'
|
|
25
|
+
})
|
|
26
|
+
})
|
|
27
|
+
})
|
|
28
|
+
});
|
|
25
29
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { RichMessageEditor } from '@pushwoosh/dumb-components';
|
|
3
3
|
import { SimpleDynamicContentPickerFormSmart } from '../DynamicContentPickerForm';
|
|
4
4
|
import { NewDynamicContentForm } from './NewDynamicContentForm';
|
|
5
5
|
export const RichMessageEditorSmart = props => {
|
|
6
|
-
return
|
|
6
|
+
return _jsx(RichMessageEditor, {
|
|
7
7
|
...props,
|
|
8
8
|
renderDynamicContent: ({
|
|
9
9
|
dc,
|
|
10
10
|
onChange,
|
|
11
11
|
update
|
|
12
|
-
}) => dc ?
|
|
12
|
+
}) => dc ? _jsx(SimpleDynamicContentPickerFormSmart, {
|
|
13
13
|
dc: dc,
|
|
14
14
|
onChange: onChange,
|
|
15
15
|
update: update
|
|
16
|
-
}) :
|
|
16
|
+
}) : _jsx(NewDynamicContentForm, {
|
|
17
17
|
update: update,
|
|
18
18
|
onSubmit: onChange
|
|
19
19
|
})
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ComponentType } from 'react';
|
|
2
2
|
type SystemParcelProps = {
|
|
3
3
|
importPath: string;
|
|
4
4
|
methodName?: string;
|
|
5
5
|
mountRootParcel: any;
|
|
6
|
-
Parcel:
|
|
6
|
+
Parcel: ComponentType<any>;
|
|
7
7
|
} & Record<string, unknown>;
|
|
8
|
-
export declare function SystemParcel({ importPath, mountRootParcel, methodName, Parcel, ...restProps }: SystemParcelProps):
|
|
8
|
+
export declare function SystemParcel({ importPath, mountRootParcel, methodName, Parcel, ...restProps }: SystemParcelProps): import("react").JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from 'react';
|
|
2
3
|
import { useSPAContext } from '@pushwoosh/spa-context';
|
|
3
4
|
export function SystemParcel({
|
|
4
5
|
importPath,
|
|
@@ -9,7 +10,7 @@ export function SystemParcel({
|
|
|
9
10
|
}) {
|
|
10
11
|
const spaContext = useSPAContext();
|
|
11
12
|
const parcelConfig = useMemo(() => createSystemParcelConfig(importPath, methodName), [importPath, methodName]);
|
|
12
|
-
return
|
|
13
|
+
return _jsx(Parcel, {
|
|
13
14
|
config: parcelConfig,
|
|
14
15
|
spaContext: spaContext,
|
|
15
16
|
mountParcel: mountRootParcel,
|