@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.
Files changed (114) hide show
  1. package/CampaignsConfigurationDrawer/CampaignsConfigurationDrawer.d.ts +1 -2
  2. package/CampaignsConfigurationDrawer/CampaignsConfigurationDrawer.js +105 -56
  3. package/CampaignsConfigurationDrawer/components/Card/Card.d.ts +1 -2
  4. package/CampaignsConfigurationDrawer/components/Card/Card.js +19 -13
  5. package/CampaignsConfigurationDrawer/polyglot/index.d.ts +2 -0
  6. package/CampaignsConfigurationDrawer/polyglot/index.js +10 -0
  7. package/CampaignsConfigurationDrawer/polyglot/messages_en.d.ts +3 -0
  8. package/CampaignsConfigurationDrawer/polyglot/messages_en.js +18 -0
  9. package/CampaignsConfigurationDrawer/polyglot/messages_ru.d.ts +3 -0
  10. package/CampaignsConfigurationDrawer/polyglot/messages_ru.js +18 -0
  11. package/CampaignsConfigurationDrawer/polyglot/types.d.ts +19 -0
  12. package/CampaignsConfigurationDrawer/polyglot/types.js +1 -0
  13. package/DocsButton/DocsButton.d.ts +1 -2
  14. package/DocsButton/DocsButton.js +21 -18
  15. package/DynamicContentPicker/DynamicContentPicker.js +76 -63
  16. package/DynamicContentPicker/Line.js +24 -22
  17. package/DynamicContentPickerForm/DynamicContentCustomPickerForm.js +20 -15
  18. package/DynamicContentPickerForm/DynamicContentEventPickerForm.js +62 -51
  19. package/DynamicContentPickerForm/DynamicContentTagPickerForm.js +62 -51
  20. package/DynamicContentPickerForm/SimpleDynamicContentPickerFormSmart.js +74 -59
  21. package/DynamicContentPickerForm/VariedDynamicContentPickerFormSmart.js +104 -78
  22. package/DynamicContentPickerForm/polyglot/index.d.ts +2 -0
  23. package/DynamicContentPickerForm/polyglot/index.js +10 -0
  24. package/DynamicContentPickerForm/polyglot/messages_en.d.ts +3 -0
  25. package/DynamicContentPickerForm/polyglot/messages_en.js +16 -0
  26. package/DynamicContentPickerForm/polyglot/messages_ru.d.ts +3 -0
  27. package/DynamicContentPickerForm/polyglot/messages_ru.js +16 -0
  28. package/DynamicContentPickerForm/polyglot/types.d.ts +17 -0
  29. package/DynamicContentPickerForm/polyglot/types.js +1 -0
  30. package/EmailTemplatePreview/EmailTemplatePreview.js +10 -4
  31. package/EmailTemplatePreview/polyglot/index.d.ts +5 -0
  32. package/EmailTemplatePreview/polyglot/index.js +10 -0
  33. package/EmailTemplatePreview/polyglot/messages_en.d.ts +3 -0
  34. package/EmailTemplatePreview/polyglot/messages_en.js +3 -0
  35. package/EmailTemplatePreview/polyglot/messages_ru.d.ts +3 -0
  36. package/EmailTemplatePreview/polyglot/messages_ru.js +3 -0
  37. package/EmailTemplatePreview/polyglot/types.d.ts +4 -0
  38. package/EmailTemplatePreview/polyglot/types.js +1 -0
  39. package/ExportCSV/ExportCsvBanner/ExportCsvBanner.d.ts +1 -2
  40. package/ExportCSV/ExportCsvBanner/ExportCsvBanner.js +63 -42
  41. package/ExportCSV/polyglot/index.d.ts +2 -0
  42. package/ExportCSV/polyglot/index.js +10 -0
  43. package/ExportCSV/polyglot/messages_en.d.ts +3 -0
  44. package/ExportCSV/polyglot/messages_en.js +9 -0
  45. package/ExportCSV/polyglot/messages_ru.d.ts +3 -0
  46. package/ExportCSV/polyglot/messages_ru.js +9 -0
  47. package/ExportCSV/polyglot/types.d.ts +10 -0
  48. package/ExportCSV/polyglot/types.js +1 -0
  49. package/ExportCSV/useExportService/useExportService.js +1 -0
  50. package/LanguagesSelector/LanguagesModal.js +38 -24
  51. package/LanguagesSelector/LanguagesSelectForm.js +73 -62
  52. package/LanguagesSelector/LanguagesSelectFormLoader.js +8 -7
  53. package/LanguagesSelector/LanguagesSelector.js +92 -78
  54. package/MediaStore/CreateVariantDrawer.js +134 -85
  55. package/MediaStore/MediaStore.js +137 -112
  56. package/ModalCloningJourney/ModalCloningJourney.d.ts +1 -2
  57. package/ModalCloningJourney/ModalCloningJourney.js +113 -91
  58. package/OpenActions/components/OpenActionsSummary/OpenActionsSummary.d.ts +1 -2
  59. package/OpenActions/components/OpenActionsSummary/OpenActionsSummary.js +101 -37
  60. package/OpenActions/components/OpenActionsSummaryByPreset.d.ts +1 -2
  61. package/OpenActions/components/OpenActionsSummaryByPreset.js +2 -2
  62. package/OpenActions/polyglot/index.d.ts +2 -0
  63. package/OpenActions/polyglot/index.js +10 -0
  64. package/OpenActions/polyglot/messages_en.d.ts +3 -0
  65. package/OpenActions/polyglot/messages_en.js +14 -0
  66. package/OpenActions/polyglot/messages_ru.d.ts +3 -0
  67. package/OpenActions/polyglot/messages_ru.js +14 -0
  68. package/OpenActions/polyglot/types.d.ts +18 -0
  69. package/OpenActions/polyglot/types.js +1 -0
  70. package/PlatformsConfigurationDrawer/PlatformsConfigurationDrawer.js +21 -17
  71. package/PlatformsConfigurationDrawer/components/DesktopPage/DesktopPage.js +114 -57
  72. package/PlatformsConfigurationDrawer/components/MainPage/MainPage.js +157 -75
  73. package/PlatformsConfigurationDrawer/components/MobilePage/MobilePage.js +140 -69
  74. package/PlatformsConfigurationDrawer/polyglot/index.d.ts +2 -0
  75. package/PlatformsConfigurationDrawer/polyglot/index.js +10 -0
  76. package/PlatformsConfigurationDrawer/polyglot/messages_en.d.ts +3 -0
  77. package/PlatformsConfigurationDrawer/polyglot/messages_en.js +24 -0
  78. package/PlatformsConfigurationDrawer/polyglot/messages_ru.d.ts +3 -0
  79. package/PlatformsConfigurationDrawer/polyglot/messages_ru.js +24 -0
  80. package/PlatformsConfigurationDrawer/polyglot/types.d.ts +25 -0
  81. package/PlatformsConfigurationDrawer/polyglot/types.js +1 -0
  82. package/ResendModal/ResendModal.d.ts +1 -2
  83. package/ResendModal/ResendModal.js +95 -59
  84. package/ResendModal/polyglot/index.d.ts +2 -0
  85. package/ResendModal/polyglot/index.js +10 -0
  86. package/ResendModal/polyglot/messages_en.d.ts +3 -0
  87. package/ResendModal/polyglot/messages_en.js +9 -0
  88. package/ResendModal/polyglot/messages_ru.d.ts +3 -0
  89. package/ResendModal/polyglot/messages_ru.js +9 -0
  90. package/ResendModal/polyglot/types.d.ts +10 -0
  91. package/ResendModal/polyglot/types.js +1 -0
  92. package/RichMessageEditorSmart/NewDynamicContentForm.js +16 -12
  93. package/RichMessageEditorSmart/RichMessageEditorSmart.js +4 -4
  94. package/SystemParcel/SystemParcel.d.ts +3 -3
  95. package/SystemParcel/SystemParcel.js +3 -2
  96. package/Table/components/DataTable/DataTable.js +80 -61
  97. package/Table/components/DataTableGetContext/DataTableGetContext.d.ts +1 -2
  98. package/Table/components/DataTableGetContext/DataTableGetContext.js +5 -2
  99. package/Table/components/DataTableList/DataTableList.d.ts +1 -2
  100. package/Table/components/DataTableList/DataTableList.js +86 -68
  101. package/Table/components/DataTablePagination/DataTablePagination.js +6 -4
  102. package/Table/components/DataTableSearchInput/DataTableSearchInput.js +3 -2
  103. package/Table/components/DataTableSortableCell/DataTableSortableCell.js +6 -4
  104. package/Table/components/Loading/Loading.d.ts +1 -2
  105. package/Table/components/Loading/Loading.js +16 -14
  106. package/Table/components/TablePagination/TablePagination.js +31 -25
  107. package/_devel/index.js +36 -24
  108. package/_devel/lib/dynamic-content-picker.d.ts +1 -2
  109. package/_devel/lib/dynamic-content-picker.js +16 -10
  110. package/_devel/lib/index.d.ts +2 -2
  111. package/_devel/lib/index.js +38 -19
  112. package/_devel/test-place.d.ts +1 -2
  113. package/_devel/test-place.js +4 -2
  114. package/package.json +2 -2
@@ -1,4 +1,5 @@
1
- import React, { useCallback, useEffect, useRef, useState } from 'react';
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 React.createElement(React.Fragment, null, React.createElement(Dropzone, {
147
- type: "button",
148
- "$dragOver": isDragOver,
149
- disabled: isUploading,
150
- onClick: () => {
151
- var _uploadInputRef$curre;
152
- return (_uploadInputRef$curre = uploadInputRef.current) === null || _uploadInputRef$curre === void 0 ? void 0 : _uploadInputRef$curre.click();
153
- },
154
- onDragOver: event => {
155
- event.preventDefault();
156
- setIsDragOver(true);
157
- },
158
- onDragLeave: () => setIsDragOver(false),
159
- onDrop: event => {
160
- event.preventDefault();
161
- setIsDragOver(false);
162
- void uploadFiles(Array.from(event.dataTransfer.files));
163
- }
164
- }, React.createElement(UploadIcon, {
165
- size: "medium",
166
- view: "lined"
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
- "aria-label": lang({
223
- message: 'SMART.MEDIA_STORE.CREATE_VARIANT_HINT'
224
- }),
225
- onClick: () => setCreateVariantFor(file)
226
- })));
227
- })), totalPages > 1 && React.createElement(Horizontal, {
228
- "$justifyContent": "center",
229
- "$alignItems": "center",
230
- "$gap": 8,
231
- "$margin": {
232
- top: 16
233
- }
234
- }, React.createElement(Button, {
235
- view: "ghost",
236
- color: "secondary",
237
- size: "field",
238
- isDisabled: page <= 0,
239
- onClick: () => void fetchFiles(page - 1)
240
- }, lang({
241
- message: 'SMART.MEDIA_STORE.PREV_BUTTON'
242
- })), React.createElement(Text, null, `${page + 1} / ${totalPages}`), React.createElement(Button, {
243
- view: "ghost",
244
- color: "secondary",
245
- size: "field",
246
- isDisabled: page + 1 >= totalPages,
247
- onClick: () => void fetchFiles(page + 1)
248
- }, lang({
249
- message: 'SMART.MEDIA_STORE.NEXT_BUTTON'
250
- })))), React.createElement(CreateVariantDrawer, {
251
- application: application,
252
- original: createVariantFor,
253
- isOpen: createVariantFor !== null,
254
- existingVariants: createVariantFor ? variantsByUuid[createVariantFor.uuid] ?? [] : [],
255
- onClose: () => setCreateVariantFor(null),
256
- onCreated: handleVariantCreated
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): React.JSX.Element;
2
+ export declare function ModalCloningJourney({ journeyId, journeyTitle, onAfterClone, onCancel, isOpen }: ModalCloningJourneyProps): import("react").JSX.Element;
@@ -1,4 +1,5 @@
1
- import React, { useEffect, useState } from 'react';
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 React.createElement(Modal, {
187
+ return _jsxs(Modal, {
187
188
  size: "medium",
188
- isOpen: isOpen
189
- }, React.createElement(ModalHeader, null, React.createElement(H3, null, lang({
190
- message: 'SMART.MODAL_CLONING_JOURNEY.HEADING'
191
- }))), React.createElement(ModalBody, null, React.createElement(Vertical, {
192
- "$gap": 24
193
- }, React.createElement(Paragraph, null, lang({
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
- onChange: handleDestinationChange,
236
- value: values.destination ? applicationsOptions.filter(app => values.destination.includes(app.value)) : []
237
- })), React.createElement(FieldBox, {
238
- title: lang({
239
- message: 'SMART.MODAL_CLONING_JOURNEY.FIELD.CONTENT'
240
- }),
241
- error: (_errors$todo = errors.todo) === null || _errors$todo === void 0 ? void 0 : _errors$todo.message
242
- }, React.createElement(Select, {
243
- isDisabled: isCloning,
244
- name: "todo",
245
- options: contentOptions,
246
- onChange: params => setValue('todo', (params === null || params === void 0 ? void 0 : params.value) ?? 'keep'),
247
- value: contentOptions.find(item => item.value === values.todo),
248
- menuPortalTarget: document.querySelector('body'),
249
- styles: {
250
- menuPortal: base => ({
251
- ...base,
252
- zIndex: 10001
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
- }), React.createElement(Vertical, {
256
- "$gap": 24
257
- }, React.createElement(Paragraph, null, howItWorks()), isCloningToAnotherProject && values.todo === 'keep' && React.createElement(Banner, {
258
- view: "ghost",
259
- type: "warning",
260
- title: lang({
261
- message: 'SMART.MODAL_CLONING_JOURNEY.BANNER.PRESET_SYNC'
262
- })
263
- }))))), React.createElement(ModalFooter, null, React.createElement(Horizontal, {
264
- "$justifyContent": "end",
265
- "$gap": 8
266
- }, React.createElement(Button, {
267
- color: "secondary",
268
- onClick: onCancel,
269
- isDisabled: isCloning
270
- }, lang({
271
- message: 'SMART.MODAL_CLONING_JOURNEY.BUTTON.CANCEL'
272
- })), React.createElement(Button, {
273
- color: "primary",
274
- onClick: onFormSubmit,
275
- isLoading: isCloning
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) => React.JSX.Element;
2
+ export declare const OpenActionsSummary: ({ openActions }: OpenActionsSummaryProps) => import("react").JSX.Element;