@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,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 { 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
|
|
131
|
+
return _jsxs(Drawer, {
|
|
131
132
|
size: "medium",
|
|
132
133
|
isOpen: isOpen,
|
|
133
|
-
onClose: onClose
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
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
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
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
|
};
|
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;
|