@micromag/media-gallery 0.3.517 → 0.3.519
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/es/index.js +27 -19
- package/lib/index.js +27 -19
- package/package.json +4 -4
package/es/index.js
CHANGED
|
@@ -347,17 +347,6 @@ function filters() {
|
|
|
347
347
|
value: 'audio'
|
|
348
348
|
}],
|
|
349
349
|
multiple: true
|
|
350
|
-
}, {
|
|
351
|
-
id: 'source',
|
|
352
|
-
component: 'toggle',
|
|
353
|
-
label: /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
354
|
-
id: "AX9qes",
|
|
355
|
-
defaultMessage: [{
|
|
356
|
-
"type": 0,
|
|
357
|
-
"value": "This micromag"
|
|
358
|
-
}]
|
|
359
|
-
}),
|
|
360
|
-
name: 'source'
|
|
361
350
|
},
|
|
362
351
|
// TODO: fix this on micromag.ca
|
|
363
352
|
// {
|
|
@@ -386,6 +375,17 @@ function filters() {
|
|
|
386
375
|
itemValuePath: 'id',
|
|
387
376
|
multiple: true,
|
|
388
377
|
paginated: true
|
|
378
|
+
}, {
|
|
379
|
+
id: 'source',
|
|
380
|
+
component: 'toggle',
|
|
381
|
+
label: /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
382
|
+
id: "AX9qes",
|
|
383
|
+
defaultMessage: [{
|
|
384
|
+
"type": 0,
|
|
385
|
+
"value": "This micromag"
|
|
386
|
+
}]
|
|
387
|
+
}),
|
|
388
|
+
name: 'source'
|
|
389
389
|
}];
|
|
390
390
|
}
|
|
391
391
|
|
|
@@ -410,8 +410,10 @@ var propTypes = {
|
|
|
410
410
|
isPicker: PropTypes.bool,
|
|
411
411
|
multiple: PropTypes.bool,
|
|
412
412
|
medias: PropTypes$1.medias,
|
|
413
|
-
|
|
414
|
-
|
|
413
|
+
onChange: PropTypes.func,
|
|
414
|
+
onMediaFormOpen: PropTypes.func,
|
|
415
|
+
onMediaFormClose: PropTypes.func,
|
|
416
|
+
className: PropTypes.string
|
|
415
417
|
};
|
|
416
418
|
var defaultProps = {
|
|
417
419
|
value: null,
|
|
@@ -423,8 +425,10 @@ var defaultProps = {
|
|
|
423
425
|
isPicker: false,
|
|
424
426
|
multiple: false,
|
|
425
427
|
medias: null,
|
|
426
|
-
|
|
427
|
-
|
|
428
|
+
onChange: null,
|
|
429
|
+
onMediaFormOpen: null,
|
|
430
|
+
onMediaFormClose: null,
|
|
431
|
+
className: null
|
|
428
432
|
};
|
|
429
433
|
function MediaGallery(_ref) {
|
|
430
434
|
var value = _ref.value,
|
|
@@ -436,8 +440,10 @@ function MediaGallery(_ref) {
|
|
|
436
440
|
isPicker = _ref.isPicker,
|
|
437
441
|
multiple = _ref.multiple,
|
|
438
442
|
initialMedias = _ref.medias,
|
|
439
|
-
|
|
440
|
-
|
|
443
|
+
onChange = _ref.onChange,
|
|
444
|
+
onMediaFormOpen = _ref.onMediaFormOpen,
|
|
445
|
+
onMediaFormClose = _ref.onMediaFormClose,
|
|
446
|
+
className = _ref.className;
|
|
441
447
|
var api = useApi();
|
|
442
448
|
var story = useStory();
|
|
443
449
|
var _ref2 = story || {},
|
|
@@ -518,6 +524,7 @@ function MediaGallery(_ref) {
|
|
|
518
524
|
var partialTypes = !isArray(types) ? [types] : types;
|
|
519
525
|
return types === 'video' ? videoTypes : partialTypes;
|
|
520
526
|
}, [types]);
|
|
527
|
+
console.log('value', value);
|
|
521
528
|
return /*#__PURE__*/React.createElement("div", {
|
|
522
529
|
className: classNames([styles.container, _defineProperty({}, className, className)])
|
|
523
530
|
}, isPicker ? /*#__PURE__*/React.createElement(MediasPickerContainer, {
|
|
@@ -527,13 +534,15 @@ function MediaGallery(_ref) {
|
|
|
527
534
|
theme: "dark",
|
|
528
535
|
types: finalTypes,
|
|
529
536
|
query: finalQuery,
|
|
530
|
-
multiple: multiple,
|
|
531
537
|
items: initialMedias,
|
|
532
538
|
filters: finalFilters,
|
|
533
539
|
fields: fields,
|
|
534
540
|
columns: columns,
|
|
541
|
+
multiple: multiple,
|
|
535
542
|
onChange: onChange,
|
|
536
543
|
onUpload: onUpload,
|
|
544
|
+
onMediaFormOpen: onMediaFormOpen,
|
|
545
|
+
onMediaFormClose: onMediaFormClose,
|
|
537
546
|
withStickySelection: true
|
|
538
547
|
}) : /*#__PURE__*/React.createElement(MediasBrowserContainer, {
|
|
539
548
|
className: styles.browser,
|
|
@@ -542,7 +551,6 @@ function MediaGallery(_ref) {
|
|
|
542
551
|
theme: "dark",
|
|
543
552
|
types: finalTypes,
|
|
544
553
|
query: finalQuery,
|
|
545
|
-
multiple: multiple,
|
|
546
554
|
items: initialMedias,
|
|
547
555
|
filters: finalFilters,
|
|
548
556
|
fields: fields,
|
package/lib/index.js
CHANGED
|
@@ -387,17 +387,6 @@ function filters() {
|
|
|
387
387
|
value: 'audio'
|
|
388
388
|
}],
|
|
389
389
|
multiple: true
|
|
390
|
-
}, {
|
|
391
|
-
id: 'source',
|
|
392
|
-
component: 'toggle',
|
|
393
|
-
label: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
|
|
394
|
-
id: "AX9qes",
|
|
395
|
-
defaultMessage: [{
|
|
396
|
-
"type": 0,
|
|
397
|
-
"value": "This micromag"
|
|
398
|
-
}]
|
|
399
|
-
}),
|
|
400
|
-
name: 'source'
|
|
401
390
|
},
|
|
402
391
|
// TODO: fix this on micromag.ca
|
|
403
392
|
// {
|
|
@@ -426,6 +415,17 @@ function filters() {
|
|
|
426
415
|
itemValuePath: 'id',
|
|
427
416
|
multiple: true,
|
|
428
417
|
paginated: true
|
|
418
|
+
}, {
|
|
419
|
+
id: 'source',
|
|
420
|
+
component: 'toggle',
|
|
421
|
+
label: /*#__PURE__*/React.createElement(reactIntl.FormattedMessage, {
|
|
422
|
+
id: "AX9qes",
|
|
423
|
+
defaultMessage: [{
|
|
424
|
+
"type": 0,
|
|
425
|
+
"value": "This micromag"
|
|
426
|
+
}]
|
|
427
|
+
}),
|
|
428
|
+
name: 'source'
|
|
429
429
|
}];
|
|
430
430
|
}
|
|
431
431
|
|
|
@@ -450,8 +450,10 @@ var propTypes = {
|
|
|
450
450
|
isPicker: PropTypes.bool,
|
|
451
451
|
multiple: PropTypes.bool,
|
|
452
452
|
medias: core.PropTypes.medias,
|
|
453
|
-
|
|
454
|
-
|
|
453
|
+
onChange: PropTypes.func,
|
|
454
|
+
onMediaFormOpen: PropTypes.func,
|
|
455
|
+
onMediaFormClose: PropTypes.func,
|
|
456
|
+
className: PropTypes.string
|
|
455
457
|
};
|
|
456
458
|
var defaultProps = {
|
|
457
459
|
value: null,
|
|
@@ -463,8 +465,10 @@ var defaultProps = {
|
|
|
463
465
|
isPicker: false,
|
|
464
466
|
multiple: false,
|
|
465
467
|
medias: null,
|
|
466
|
-
|
|
467
|
-
|
|
468
|
+
onChange: null,
|
|
469
|
+
onMediaFormOpen: null,
|
|
470
|
+
onMediaFormClose: null,
|
|
471
|
+
className: null
|
|
468
472
|
};
|
|
469
473
|
function MediaGallery(_ref) {
|
|
470
474
|
var value = _ref.value,
|
|
@@ -476,8 +480,10 @@ function MediaGallery(_ref) {
|
|
|
476
480
|
isPicker = _ref.isPicker,
|
|
477
481
|
multiple = _ref.multiple,
|
|
478
482
|
initialMedias = _ref.medias,
|
|
479
|
-
|
|
480
|
-
|
|
483
|
+
onChange = _ref.onChange,
|
|
484
|
+
onMediaFormOpen = _ref.onMediaFormOpen,
|
|
485
|
+
onMediaFormClose = _ref.onMediaFormClose,
|
|
486
|
+
className = _ref.className;
|
|
481
487
|
var api = data.useApi();
|
|
482
488
|
var story = contexts.useStory();
|
|
483
489
|
var _ref2 = story || {},
|
|
@@ -558,6 +564,7 @@ function MediaGallery(_ref) {
|
|
|
558
564
|
var partialTypes = !isArray(types) ? [types] : types;
|
|
559
565
|
return types === 'video' ? videoTypes : partialTypes;
|
|
560
566
|
}, [types]);
|
|
567
|
+
console.log('value', value);
|
|
561
568
|
return /*#__PURE__*/React.createElement("div", {
|
|
562
569
|
className: classNames([styles.container, _defineProperty({}, className, className)])
|
|
563
570
|
}, isPicker ? /*#__PURE__*/React.createElement(medias.MediasPickerContainer, {
|
|
@@ -567,13 +574,15 @@ function MediaGallery(_ref) {
|
|
|
567
574
|
theme: "dark",
|
|
568
575
|
types: finalTypes,
|
|
569
576
|
query: finalQuery,
|
|
570
|
-
multiple: multiple,
|
|
571
577
|
items: initialMedias,
|
|
572
578
|
filters: finalFilters,
|
|
573
579
|
fields: fields,
|
|
574
580
|
columns: columns,
|
|
581
|
+
multiple: multiple,
|
|
575
582
|
onChange: onChange,
|
|
576
583
|
onUpload: onUpload,
|
|
584
|
+
onMediaFormOpen: onMediaFormOpen,
|
|
585
|
+
onMediaFormClose: onMediaFormClose,
|
|
577
586
|
withStickySelection: true
|
|
578
587
|
}) : /*#__PURE__*/React.createElement(medias.MediasBrowserContainer, {
|
|
579
588
|
className: styles.browser,
|
|
@@ -582,7 +591,6 @@ function MediaGallery(_ref) {
|
|
|
582
591
|
theme: "dark",
|
|
583
592
|
types: finalTypes,
|
|
584
593
|
query: finalQuery,
|
|
585
|
-
multiple: multiple,
|
|
586
594
|
items: initialMedias,
|
|
587
595
|
filters: finalFilters,
|
|
588
596
|
fields: fields,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/media-gallery",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.519",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -72,8 +72,8 @@
|
|
|
72
72
|
"@fortawesome/fontawesome-svg-core": "^6.5.2",
|
|
73
73
|
"@fortawesome/free-solid-svg-icons": "^6.5.2",
|
|
74
74
|
"@fortawesome/react-fontawesome": "^0.2.0",
|
|
75
|
-
"@micromag/core": "^0.3.
|
|
76
|
-
"@micromag/data": "^0.3.
|
|
75
|
+
"@micromag/core": "^0.3.518",
|
|
76
|
+
"@micromag/data": "^0.3.518",
|
|
77
77
|
"@panneau/medias": "^3.0.163",
|
|
78
78
|
"bootstrap": "^5.3.1",
|
|
79
79
|
"classnames": "^2.2.6",
|
|
@@ -87,5 +87,5 @@
|
|
|
87
87
|
"access": "public",
|
|
88
88
|
"registry": "https://registry.npmjs.org/"
|
|
89
89
|
},
|
|
90
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "f353b7a3cec6ea46f26212655127873a4d3e3c08"
|
|
91
91
|
}
|