@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
package/MediaStore/MediaStore.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
2
3
|
import { Button, DropdownMenuButton, DropdownMenuItem, DropdownMenuSection, useToast } from '@pushwoosh/dumb-components';
|
|
3
4
|
import { Horizontal } from '@pushwoosh/kit-helpers';
|
|
4
5
|
import { CheckIcon, EditIcon, UploadIcon } from '@pushwoosh/kit-icons';
|
|
@@ -143,116 +144,140 @@ export const MediaStore = ({
|
|
|
143
144
|
}));
|
|
144
145
|
};
|
|
145
146
|
const totalPages = Math.ceil(total / perPage);
|
|
146
|
-
return
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
event
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
event
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
}), isUploading ? lang({
|
|
168
|
-
message: 'SMART.MEDIA_STORE.UPLOADING'
|
|
169
|
-
}) : lang({
|
|
170
|
-
message: 'SMART.MEDIA_STORE.DROPZONE_HINT'
|
|
171
|
-
})), React.createElement(HiddenInput, {
|
|
172
|
-
ref: uploadInputRef,
|
|
173
|
-
type: "file",
|
|
174
|
-
accept: "image/*",
|
|
175
|
-
multiple: true,
|
|
176
|
-
onChange: event => void uploadFiles(Array.from(event.target.files ?? []))
|
|
177
|
-
}), loading && React.createElement(EmptyState, null, lang({
|
|
178
|
-
message: 'SMART.MEDIA_STORE.LOADING'
|
|
179
|
-
})), !loading && files.length === 0 && React.createElement(EmptyState, null, lang({
|
|
180
|
-
message: 'SMART.MEDIA_STORE.EMPTY'
|
|
181
|
-
})), !loading && files.length > 0 && React.createElement(React.Fragment, null, React.createElement(Grid, null, files.map(file => {
|
|
182
|
-
const variants = variantsByUuid[file.uuid] ?? [];
|
|
183
|
-
return React.createElement(Tile, {
|
|
184
|
-
key: file.uuid
|
|
185
|
-
}, React.createElement(TileImage, {
|
|
186
|
-
src: getThumbUrl(file),
|
|
187
|
-
alt: file.filename
|
|
188
|
-
}), variants.length > 0 && React.createElement(VariantBadge, null, lang({
|
|
189
|
-
message: 'SMART.MEDIA_STORE.VARIANTS_BADGE',
|
|
190
|
-
count: variants.length
|
|
191
|
-
})), React.createElement(TileActions, null, variants.length > 0 ? React.createElement(DropdownMenuButton, {
|
|
192
|
-
color: "secondary",
|
|
193
|
-
size: "compact",
|
|
194
|
-
icon: React.createElement(CheckIcon, {
|
|
195
|
-
size: "small"
|
|
196
|
-
}),
|
|
197
|
-
menuPlacement: "bottom-start"
|
|
198
|
-
}, React.createElement(DropdownMenuSection, null, React.createElement(DropdownMenuItem, {
|
|
199
|
-
onClick: () => onSelect(file.url)
|
|
200
|
-
}, lang({
|
|
201
|
-
message: 'SMART.MEDIA_STORE.SELECT_ORIGINAL'
|
|
202
|
-
})), variants.map(variant => React.createElement(DropdownMenuItem, {
|
|
203
|
-
key: variant.uuid,
|
|
204
|
-
onClick: () => onSelect(variant.url)
|
|
205
|
-
}, getRatioLabel(variant) || variant.filename)))) : React.createElement(Button, {
|
|
206
|
-
color: "secondary",
|
|
207
|
-
size: "compact",
|
|
208
|
-
icon: React.createElement(CheckIcon, {
|
|
209
|
-
size: "small"
|
|
210
|
-
}),
|
|
211
|
-
"aria-label": lang({
|
|
212
|
-
message: 'SMART.MEDIA_STORE.SELECT_HINT'
|
|
213
|
-
}),
|
|
214
|
-
onClick: () => onSelect(file.url)
|
|
215
|
-
}), React.createElement(Button, {
|
|
216
|
-
color: "secondary",
|
|
217
|
-
size: "compact",
|
|
218
|
-
icon: React.createElement(EditIcon, {
|
|
219
|
-
size: "small",
|
|
147
|
+
return _jsxs(_Fragment, {
|
|
148
|
+
children: [_jsxs(Dropzone, {
|
|
149
|
+
type: "button",
|
|
150
|
+
"$dragOver": isDragOver,
|
|
151
|
+
disabled: isUploading,
|
|
152
|
+
onClick: () => {
|
|
153
|
+
var _uploadInputRef$curre;
|
|
154
|
+
return (_uploadInputRef$curre = uploadInputRef.current) === null || _uploadInputRef$curre === void 0 ? void 0 : _uploadInputRef$curre.click();
|
|
155
|
+
},
|
|
156
|
+
onDragOver: event => {
|
|
157
|
+
event.preventDefault();
|
|
158
|
+
setIsDragOver(true);
|
|
159
|
+
},
|
|
160
|
+
onDragLeave: () => setIsDragOver(false),
|
|
161
|
+
onDrop: event => {
|
|
162
|
+
event.preventDefault();
|
|
163
|
+
setIsDragOver(false);
|
|
164
|
+
void uploadFiles(Array.from(event.dataTransfer.files));
|
|
165
|
+
},
|
|
166
|
+
children: [_jsx(UploadIcon, {
|
|
167
|
+
size: "medium",
|
|
220
168
|
view: "lined"
|
|
221
|
-
}),
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
})
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
169
|
+
}), isUploading ? lang({
|
|
170
|
+
message: 'SMART.MEDIA_STORE.UPLOADING'
|
|
171
|
+
}) : lang({
|
|
172
|
+
message: 'SMART.MEDIA_STORE.DROPZONE_HINT'
|
|
173
|
+
})]
|
|
174
|
+
}), _jsx(HiddenInput, {
|
|
175
|
+
ref: uploadInputRef,
|
|
176
|
+
type: "file",
|
|
177
|
+
accept: "image/*",
|
|
178
|
+
multiple: true,
|
|
179
|
+
onChange: event => void uploadFiles(Array.from(event.target.files ?? []))
|
|
180
|
+
}), loading && _jsx(EmptyState, {
|
|
181
|
+
children: lang({
|
|
182
|
+
message: 'SMART.MEDIA_STORE.LOADING'
|
|
183
|
+
})
|
|
184
|
+
}), !loading && files.length === 0 && _jsx(EmptyState, {
|
|
185
|
+
children: lang({
|
|
186
|
+
message: 'SMART.MEDIA_STORE.EMPTY'
|
|
187
|
+
})
|
|
188
|
+
}), !loading && files.length > 0 && _jsxs(_Fragment, {
|
|
189
|
+
children: [_jsx(Grid, {
|
|
190
|
+
children: files.map(file => {
|
|
191
|
+
const variants = variantsByUuid[file.uuid] ?? [];
|
|
192
|
+
return _jsxs(Tile, {
|
|
193
|
+
children: [_jsx(TileImage, {
|
|
194
|
+
src: getThumbUrl(file),
|
|
195
|
+
alt: file.filename
|
|
196
|
+
}), variants.length > 0 && _jsx(VariantBadge, {
|
|
197
|
+
children: lang({
|
|
198
|
+
message: 'SMART.MEDIA_STORE.VARIANTS_BADGE',
|
|
199
|
+
count: variants.length
|
|
200
|
+
})
|
|
201
|
+
}), _jsxs(TileActions, {
|
|
202
|
+
children: [variants.length > 0 ? _jsx(DropdownMenuButton, {
|
|
203
|
+
color: "secondary",
|
|
204
|
+
size: "compact",
|
|
205
|
+
icon: _jsx(CheckIcon, {
|
|
206
|
+
size: "small"
|
|
207
|
+
}),
|
|
208
|
+
menuPlacement: "bottom-start",
|
|
209
|
+
children: _jsxs(DropdownMenuSection, {
|
|
210
|
+
children: [_jsx(DropdownMenuItem, {
|
|
211
|
+
onClick: () => onSelect(file.url),
|
|
212
|
+
children: lang({
|
|
213
|
+
message: 'SMART.MEDIA_STORE.SELECT_ORIGINAL'
|
|
214
|
+
})
|
|
215
|
+
}), variants.map(variant => _jsx(DropdownMenuItem, {
|
|
216
|
+
onClick: () => onSelect(variant.url),
|
|
217
|
+
children: getRatioLabel(variant) || variant.filename
|
|
218
|
+
}, variant.uuid))]
|
|
219
|
+
})
|
|
220
|
+
}) : _jsx(Button, {
|
|
221
|
+
color: "secondary",
|
|
222
|
+
size: "compact",
|
|
223
|
+
icon: _jsx(CheckIcon, {
|
|
224
|
+
size: "small"
|
|
225
|
+
}),
|
|
226
|
+
"aria-label": lang({
|
|
227
|
+
message: 'SMART.MEDIA_STORE.SELECT_HINT'
|
|
228
|
+
}),
|
|
229
|
+
onClick: () => onSelect(file.url)
|
|
230
|
+
}), _jsx(Button, {
|
|
231
|
+
color: "secondary",
|
|
232
|
+
size: "compact",
|
|
233
|
+
icon: _jsx(EditIcon, {
|
|
234
|
+
size: "small",
|
|
235
|
+
view: "lined"
|
|
236
|
+
}),
|
|
237
|
+
"aria-label": lang({
|
|
238
|
+
message: 'SMART.MEDIA_STORE.CREATE_VARIANT_HINT'
|
|
239
|
+
}),
|
|
240
|
+
onClick: () => setCreateVariantFor(file)
|
|
241
|
+
})]
|
|
242
|
+
})]
|
|
243
|
+
}, file.uuid);
|
|
244
|
+
})
|
|
245
|
+
}), totalPages > 1 && _jsxs(Horizontal, {
|
|
246
|
+
"$justifyContent": "center",
|
|
247
|
+
"$alignItems": "center",
|
|
248
|
+
"$gap": 8,
|
|
249
|
+
"$margin": {
|
|
250
|
+
top: 16
|
|
251
|
+
},
|
|
252
|
+
children: [_jsx(Button, {
|
|
253
|
+
view: "ghost",
|
|
254
|
+
color: "secondary",
|
|
255
|
+
size: "field",
|
|
256
|
+
isDisabled: page <= 0,
|
|
257
|
+
onClick: () => void fetchFiles(page - 1),
|
|
258
|
+
children: lang({
|
|
259
|
+
message: 'SMART.MEDIA_STORE.PREV_BUTTON'
|
|
260
|
+
})
|
|
261
|
+
}), _jsx(Text, {
|
|
262
|
+
children: `${page + 1} / ${totalPages}`
|
|
263
|
+
}), _jsx(Button, {
|
|
264
|
+
view: "ghost",
|
|
265
|
+
color: "secondary",
|
|
266
|
+
size: "field",
|
|
267
|
+
isDisabled: page + 1 >= totalPages,
|
|
268
|
+
onClick: () => void fetchFiles(page + 1),
|
|
269
|
+
children: lang({
|
|
270
|
+
message: 'SMART.MEDIA_STORE.NEXT_BUTTON'
|
|
271
|
+
})
|
|
272
|
+
})]
|
|
273
|
+
})]
|
|
274
|
+
}), _jsx(CreateVariantDrawer, {
|
|
275
|
+
application: application,
|
|
276
|
+
original: createVariantFor,
|
|
277
|
+
isOpen: createVariantFor !== null,
|
|
278
|
+
existingVariants: createVariantFor ? variantsByUuid[createVariantFor.uuid] ?? [] : [],
|
|
279
|
+
onClose: () => setCreateVariantFor(null),
|
|
280
|
+
onCreated: handleVariantCreated
|
|
281
|
+
})]
|
|
282
|
+
});
|
|
258
283
|
};
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { type ModalCloningJourneyProps } from './types';
|
|
3
|
-
export declare function ModalCloningJourney({ journeyId, journeyTitle, onAfterClone, onCancel, isOpen }: ModalCloningJourneyProps):
|
|
2
|
+
export declare function ModalCloningJourney({ journeyId, journeyTitle, onAfterClone, onCancel, isOpen }: ModalCloningJourneyProps): import("react").JSX.Element;
|
|
@@ -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;
|