@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.
Files changed (58) hide show
  1. package/CampaignsConfigurationDrawer/CampaignsConfigurationDrawer.d.ts +1 -2
  2. package/CampaignsConfigurationDrawer/CampaignsConfigurationDrawer.js +103 -88
  3. package/CampaignsConfigurationDrawer/components/Card/Card.d.ts +1 -2
  4. package/CampaignsConfigurationDrawer/components/Card/Card.js +19 -13
  5. package/DocsButton/DocsButton.d.ts +1 -2
  6. package/DocsButton/DocsButton.js +21 -18
  7. package/DynamicContentPicker/DynamicContentPicker.js +76 -63
  8. package/DynamicContentPicker/Line.js +24 -22
  9. package/DynamicContentPickerForm/DynamicContentCustomPickerForm.js +18 -17
  10. package/DynamicContentPickerForm/DynamicContentEventPickerForm.js +60 -57
  11. package/DynamicContentPickerForm/DynamicContentTagPickerForm.js +60 -57
  12. package/DynamicContentPickerForm/SimpleDynamicContentPickerFormSmart.js +72 -63
  13. package/DynamicContentPickerForm/VariedDynamicContentPickerFormSmart.js +86 -74
  14. package/EmailTemplatePreview/EmailTemplatePreview.js +8 -6
  15. package/ExportCSV/ExportCsvBanner/ExportCsvBanner.d.ts +1 -2
  16. package/ExportCSV/ExportCsvBanner/ExportCsvBanner.js +54 -49
  17. package/ExportCSV/useExportService/useExportService.js +1 -0
  18. package/LanguagesSelector/LanguagesModal.js +38 -24
  19. package/LanguagesSelector/LanguagesSelectForm.js +73 -62
  20. package/LanguagesSelector/LanguagesSelectFormLoader.js +8 -7
  21. package/LanguagesSelector/LanguagesSelector.js +92 -78
  22. package/MediaStore/CreateVariantDrawer.js +134 -85
  23. package/MediaStore/MediaStore.js +137 -112
  24. package/ModalCloningJourney/ModalCloningJourney.d.ts +1 -2
  25. package/ModalCloningJourney/ModalCloningJourney.js +113 -91
  26. package/OpenActions/components/OpenActionsSummary/OpenActionsSummary.d.ts +1 -2
  27. package/OpenActions/components/OpenActionsSummary/OpenActionsSummary.js +98 -78
  28. package/OpenActions/components/OpenActionsSummaryByPreset.d.ts +1 -2
  29. package/OpenActions/components/OpenActionsSummaryByPreset.js +2 -2
  30. package/PlatformsConfigurationDrawer/PlatformsConfigurationDrawer.js +21 -17
  31. package/PlatformsConfigurationDrawer/components/DesktopPage/DesktopPage.js +112 -75
  32. package/PlatformsConfigurationDrawer/components/MainPage/MainPage.js +155 -101
  33. package/PlatformsConfigurationDrawer/components/MobilePage/MobilePage.js +138 -91
  34. package/ResendModal/ResendModal.d.ts +1 -2
  35. package/ResendModal/ResendModal.js +92 -72
  36. package/RichMessageEditorSmart/NewDynamicContentForm.js +16 -12
  37. package/RichMessageEditorSmart/RichMessageEditorSmart.js +4 -4
  38. package/SystemParcel/SystemParcel.d.ts +3 -3
  39. package/SystemParcel/SystemParcel.js +3 -2
  40. package/Table/components/DataTable/DataTable.js +80 -61
  41. package/Table/components/DataTableGetContext/DataTableGetContext.d.ts +1 -2
  42. package/Table/components/DataTableGetContext/DataTableGetContext.js +5 -2
  43. package/Table/components/DataTableList/DataTableList.d.ts +1 -2
  44. package/Table/components/DataTableList/DataTableList.js +86 -68
  45. package/Table/components/DataTablePagination/DataTablePagination.js +6 -4
  46. package/Table/components/DataTableSearchInput/DataTableSearchInput.js +3 -2
  47. package/Table/components/DataTableSortableCell/DataTableSortableCell.js +6 -4
  48. package/Table/components/Loading/Loading.d.ts +1 -2
  49. package/Table/components/Loading/Loading.js +16 -14
  50. package/Table/components/TablePagination/TablePagination.js +31 -25
  51. package/_devel/index.js +36 -24
  52. package/_devel/lib/dynamic-content-picker.d.ts +1 -2
  53. package/_devel/lib/dynamic-content-picker.js +16 -10
  54. package/_devel/lib/index.d.ts +2 -2
  55. package/_devel/lib/index.js +38 -19
  56. package/_devel/test-place.d.ts +1 -2
  57. package/_devel/test-place.js +4 -2
  58. package/package.json +2 -2
@@ -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 { Button, Drawer, DrawerBody, DrawerHeader, DrawerTitle, NativeInput, useToast } from '@pushwoosh/dumb-components';
3
4
  import { Columns, Vertical } from '@pushwoosh/kit-helpers';
4
5
  import { CloseIcon } from '@pushwoosh/kit-icons';
@@ -127,90 +128,138 @@ export const CreateVariantDrawer = ({
127
128
  setIsCreating(false);
128
129
  }
129
130
  };
130
- return React.createElement(Drawer, {
131
+ return _jsxs(Drawer, {
131
132
  size: "medium",
132
133
  isOpen: isOpen,
133
- onClose: onClose
134
- }, React.createElement(DrawerHeader, null, React.createElement(DrawerTitle, null, React.createElement("span", null, lang({
135
- message: 'SMART.MEDIA_STORE.CREATE_VARIANT.TITLE'
136
- })), React.createElement(Button, {
137
- view: "ghost",
138
- color: "secondary",
139
- size: "compact",
140
- icon: React.createElement(CloseIcon, {
141
- size: "small"
142
- }),
143
- "aria-label": lang({
144
- message: 'SMART.MEDIA_STORE.CREATE_VARIANT.CLOSE'
145
- }),
146
- onClick: onClose
147
- }))), React.createElement(DrawerBody, null, original && React.createElement(Vertical, {
148
- "$gap": 20
149
- }, React.createElement("div", null, React.createElement(FieldLabel, null, lang({
150
- message: 'SMART.MEDIA_STORE.CREATE_VARIANT.RATIO_LABEL'
151
- })), React.createElement(Chips, null, RATIOS.map(item => React.createElement(Chip, {
152
- key: item.value,
153
- type: "button",
154
- "$active": item.value === ratio,
155
- onClick: () => setRatio(item.value)
156
- }, item.label)))), React.createElement("div", null, React.createElement(FieldLabel, null, lang({
157
- message: 'SMART.MEDIA_STORE.CREATE_VARIANT.SIZE_LABEL'
158
- })), React.createElement(Columns, {
159
- "$sizes": "auto 1fr",
160
- "$gap": 8,
161
- "$alignItems": "center"
162
- }, React.createElement(Segment, null, React.createElement(SegmentItem, {
163
- type: "button",
164
- "$active": dimension === 'width',
165
- onClick: () => setDimension('width')
166
- }, lang({
167
- message: 'SMART.MEDIA_STORE.CREATE_VARIANT.WIDTH'
168
- })), React.createElement(SegmentItem, {
169
- type: "button",
170
- "$active": dimension === 'height',
171
- onClick: () => setDimension('height')
172
- }, lang({
173
- message: 'SMART.MEDIA_STORE.CREATE_VARIANT.HEIGHT'
174
- }))), React.createElement(NativeInput, {
175
- type: "number",
176
- min: 1,
177
- value: size,
178
- "$isErrored": !isSizeValid,
179
- onChange: event => setSize(event.target.value)
180
- }))), React.createElement(Vertical, {
181
- "$gap": 6
182
- }, React.createElement(PreviewStage, null, React.createElement(PreviewFrame, {
183
- "$ratio": selectedRatio.ar
184
- }, React.createElement(PreviewImage, {
185
- src: original.url,
186
- alt: original.filename
187
- }))), isSizeValid && React.createElement(Text, null, selectedRatio.label, ' · ', outputWidth, ' × ', outputHeight)), isJpeg && React.createElement("div", null, React.createElement(FieldLabel, null, lang({
188
- message: 'SMART.MEDIA_STORE.CREATE_VARIANT.QUALITY_LABEL'
189
- })), React.createElement(NativeInput, {
190
- type: "number",
191
- min: 1,
192
- max: 100,
193
- value: quality,
194
- "$isErrored": !isQualityValid,
195
- onChange: event => setQuality(event.target.value)
196
- })), ratioExists && React.createElement(Text, null, lang({
197
- message: 'SMART.MEDIA_STORE.CREATE_VARIANT.RATIO_EXISTS'
198
- })), React.createElement(Button, {
199
- color: "primary",
200
- size: "field",
201
- isDisabled: !isSizeValid || !isQualityValid || ratioExists,
202
- isLoading: isCreating,
203
- onClick: () => void handleCreate()
204
- }, lang({
205
- message: 'SMART.MEDIA_STORE.CREATE_VARIANT.CREATE_BUTTON'
206
- })), React.createElement("div", null, React.createElement(FieldLabel, null, lang({
207
- message: 'SMART.MEDIA_STORE.CREATE_VARIANT.EXISTING_LABEL'
208
- })), existingVariants.length === 0 ? React.createElement(Text, null, lang({
209
- message: 'SMART.MEDIA_STORE.CREATE_VARIANT.NO_VARIANTS'
210
- })) : React.createElement(VariantStrip, null, existingVariants.map(variant => React.createElement(VariantThumb, {
211
- key: variant.uuid
212
- }, React.createElement(TileImage, {
213
- src: getThumbUrl(variant),
214
- alt: variant.filename
215
- }), React.createElement(VariantThumbCaption, null, getRatioLabel(variant) || variant.filename))))))));
134
+ onClose: onClose,
135
+ children: [_jsx(DrawerHeader, {
136
+ children: _jsxs(DrawerTitle, {
137
+ children: [_jsx("span", {
138
+ children: lang({
139
+ message: 'SMART.MEDIA_STORE.CREATE_VARIANT.TITLE'
140
+ })
141
+ }), _jsx(Button, {
142
+ view: "ghost",
143
+ color: "secondary",
144
+ size: "compact",
145
+ icon: _jsx(CloseIcon, {
146
+ size: "small"
147
+ }),
148
+ "aria-label": lang({
149
+ message: 'SMART.MEDIA_STORE.CREATE_VARIANT.CLOSE'
150
+ }),
151
+ onClick: onClose
152
+ })]
153
+ })
154
+ }), _jsx(DrawerBody, {
155
+ children: original && _jsxs(Vertical, {
156
+ "$gap": 20,
157
+ children: [_jsxs("div", {
158
+ children: [_jsx(FieldLabel, {
159
+ children: lang({
160
+ message: 'SMART.MEDIA_STORE.CREATE_VARIANT.RATIO_LABEL'
161
+ })
162
+ }), _jsx(Chips, {
163
+ children: RATIOS.map(item => _jsx(Chip, {
164
+ type: "button",
165
+ "$active": item.value === ratio,
166
+ onClick: () => setRatio(item.value),
167
+ children: item.label
168
+ }, item.value))
169
+ })]
170
+ }), _jsxs("div", {
171
+ children: [_jsx(FieldLabel, {
172
+ children: lang({
173
+ message: 'SMART.MEDIA_STORE.CREATE_VARIANT.SIZE_LABEL'
174
+ })
175
+ }), _jsxs(Columns, {
176
+ "$sizes": "auto 1fr",
177
+ "$gap": 8,
178
+ "$alignItems": "center",
179
+ children: [_jsxs(Segment, {
180
+ children: [_jsx(SegmentItem, {
181
+ type: "button",
182
+ "$active": dimension === 'width',
183
+ onClick: () => setDimension('width'),
184
+ children: lang({
185
+ message: 'SMART.MEDIA_STORE.CREATE_VARIANT.WIDTH'
186
+ })
187
+ }), _jsx(SegmentItem, {
188
+ type: "button",
189
+ "$active": dimension === 'height',
190
+ onClick: () => setDimension('height'),
191
+ children: lang({
192
+ message: 'SMART.MEDIA_STORE.CREATE_VARIANT.HEIGHT'
193
+ })
194
+ })]
195
+ }), _jsx(NativeInput, {
196
+ type: "number",
197
+ min: 1,
198
+ value: size,
199
+ "$isErrored": !isSizeValid,
200
+ onChange: event => setSize(event.target.value)
201
+ })]
202
+ })]
203
+ }), _jsxs(Vertical, {
204
+ "$gap": 6,
205
+ children: [_jsx(PreviewStage, {
206
+ children: _jsx(PreviewFrame, {
207
+ "$ratio": selectedRatio.ar,
208
+ children: _jsx(PreviewImage, {
209
+ src: original.url,
210
+ alt: original.filename
211
+ })
212
+ })
213
+ }), isSizeValid && _jsxs(Text, {
214
+ children: [selectedRatio.label, ' · ', outputWidth, ' × ', outputHeight]
215
+ })]
216
+ }), isJpeg && _jsxs("div", {
217
+ children: [_jsx(FieldLabel, {
218
+ children: lang({
219
+ message: 'SMART.MEDIA_STORE.CREATE_VARIANT.QUALITY_LABEL'
220
+ })
221
+ }), _jsx(NativeInput, {
222
+ type: "number",
223
+ min: 1,
224
+ max: 100,
225
+ value: quality,
226
+ "$isErrored": !isQualityValid,
227
+ onChange: event => setQuality(event.target.value)
228
+ })]
229
+ }), ratioExists && _jsx(Text, {
230
+ children: lang({
231
+ message: 'SMART.MEDIA_STORE.CREATE_VARIANT.RATIO_EXISTS'
232
+ })
233
+ }), _jsx(Button, {
234
+ color: "primary",
235
+ size: "field",
236
+ isDisabled: !isSizeValid || !isQualityValid || ratioExists,
237
+ isLoading: isCreating,
238
+ onClick: () => void handleCreate(),
239
+ children: lang({
240
+ message: 'SMART.MEDIA_STORE.CREATE_VARIANT.CREATE_BUTTON'
241
+ })
242
+ }), _jsxs("div", {
243
+ children: [_jsx(FieldLabel, {
244
+ children: lang({
245
+ message: 'SMART.MEDIA_STORE.CREATE_VARIANT.EXISTING_LABEL'
246
+ })
247
+ }), existingVariants.length === 0 ? _jsx(Text, {
248
+ children: lang({
249
+ message: 'SMART.MEDIA_STORE.CREATE_VARIANT.NO_VARIANTS'
250
+ })
251
+ }) : _jsx(VariantStrip, {
252
+ children: existingVariants.map(variant => _jsxs(VariantThumb, {
253
+ children: [_jsx(TileImage, {
254
+ src: getThumbUrl(variant),
255
+ alt: variant.filename
256
+ }), _jsx(VariantThumbCaption, {
257
+ children: getRatioLabel(variant) || variant.filename
258
+ })]
259
+ }, variant.uuid))
260
+ })]
261
+ })]
262
+ })
263
+ })]
264
+ });
216
265
  };
@@ -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;