@pushwoosh/smart-components-kit 1.3.0 → 1.3.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.
|
@@ -270,12 +270,12 @@ export const MediaStorage = ({
|
|
|
270
270
|
menuPlacement: "bottom-start",
|
|
271
271
|
children: _jsxs(DropdownMenuSection, {
|
|
272
272
|
children: [_jsx(DropdownMenuItem, {
|
|
273
|
-
onClick: () => onSelect(file
|
|
273
|
+
onClick: () => onSelect(file),
|
|
274
274
|
children: lang({
|
|
275
275
|
message: 'SMART.MEDIA_STORAGE.SELECT_ORIGINAL'
|
|
276
276
|
})
|
|
277
277
|
}), crops.map(crop => _jsx(DropdownMenuItem, {
|
|
278
|
-
onClick: () => onSelect(crop
|
|
278
|
+
onClick: () => onSelect(crop),
|
|
279
279
|
children: getCropCaption(crop)
|
|
280
280
|
}, crop.uuid))]
|
|
281
281
|
})
|
|
@@ -288,7 +288,7 @@ export const MediaStorage = ({
|
|
|
288
288
|
"aria-label": lang({
|
|
289
289
|
message: 'SMART.MEDIA_STORAGE.SELECT_HINT'
|
|
290
290
|
}),
|
|
291
|
-
onClick: () => onSelect(file
|
|
291
|
+
onClick: () => onSelect(file)
|
|
292
292
|
}), _jsx(Button, {
|
|
293
293
|
color: "secondary",
|
|
294
294
|
size: "compact",
|
package/MediaStorage/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { MediaFile } from '@pushwoosh/rpc-v2-http-api-data/media_files';
|
|
1
2
|
export type MediaStorageProps = {
|
|
2
3
|
/** Application code whose media files are listed. */
|
|
3
4
|
application: string;
|
|
@@ -7,8 +8,9 @@ export type MediaStorageProps = {
|
|
|
7
8
|
perPage: number;
|
|
8
9
|
/** Called when the user requests a different page. */
|
|
9
10
|
onPageChange: (page: number) => void;
|
|
10
|
-
/** Called with the chosen file
|
|
11
|
-
|
|
11
|
+
/** Called with the chosen file (original or crop) — `url` is the picked
|
|
12
|
+
* asset, `uuid` its gallery id. */
|
|
13
|
+
onSelect: (file: MediaFile) => void;
|
|
12
14
|
};
|
|
13
15
|
export type MediaStoragePaginatedProps = {
|
|
14
16
|
/** Application code whose media files are listed. */
|
|
@@ -17,6 +19,7 @@ export type MediaStoragePaginatedProps = {
|
|
|
17
19
|
initialPage?: number;
|
|
18
20
|
/** Page size. Defaults to 30. */
|
|
19
21
|
perPage?: number;
|
|
20
|
-
/** Called with the chosen file
|
|
21
|
-
|
|
22
|
+
/** Called with the chosen file (original or crop) — `url` is the picked
|
|
23
|
+
* asset, `uuid` its gallery id. */
|
|
24
|
+
onSelect: (file: MediaFile) => void;
|
|
22
25
|
};
|
package/package.json
CHANGED