@micromag/media-gallery 0.4.98 → 0.4.101
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.d.ts +7 -15
- package/es/index.js +180 -173
- package/package.json +24 -20
package/es/index.d.ts
CHANGED
|
@@ -1,21 +1,13 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { Media } from '@micromag/core';
|
|
1
|
+
import * as react from 'react';
|
|
3
2
|
import { ForwardedRef } from 'react';
|
|
3
|
+
import { Media, MediaType } from '@panneau/core';
|
|
4
|
+
import { MediasBrowserContainerProps, MediasPickerContainerProps } from '@panneau/medias';
|
|
4
5
|
import { DialogModalProps } from '@panneau/modal-dialog';
|
|
5
6
|
|
|
6
|
-
interface MediaGalleryProps {
|
|
7
|
+
interface MediaGalleryProps extends Omit<Partial<MediasBrowserContainerProps>, 'value' | 'onChange' | 'types'>, Omit<Partial<MediasPickerContainerProps>, 'value' | 'onChange' | 'types'> {
|
|
7
8
|
value?: Media | Media[] | null;
|
|
8
|
-
types?:
|
|
9
|
+
types?: MediaType | MediaType[] | null;
|
|
9
10
|
source?: string;
|
|
10
|
-
filters?: {
|
|
11
|
-
id?: string;
|
|
12
|
-
}[] | null;
|
|
13
|
-
fields?: {
|
|
14
|
-
id?: string;
|
|
15
|
-
}[] | null;
|
|
16
|
-
columns?: {
|
|
17
|
-
id?: string;
|
|
18
|
-
}[];
|
|
19
11
|
isPicker?: boolean;
|
|
20
12
|
multiple?: boolean;
|
|
21
13
|
medias?: Media[] | null;
|
|
@@ -25,7 +17,7 @@ interface MediaGalleryProps {
|
|
|
25
17
|
onMediaFormClose?: ((...args: unknown[]) => void) | null;
|
|
26
18
|
className?: string | null;
|
|
27
19
|
}
|
|
28
|
-
declare function MediaGallery({ value, types, source, filters: providedFilters, fields: providedFields, columns, isPicker, multiple, medias: initialMedias, query, onChange, onMediaFormOpen, onMediaFormClose, className, }: MediaGalleryProps):
|
|
20
|
+
declare function MediaGallery({ value, types, source, filters: providedFilters, fields: providedFields, columns, isPicker, multiple, medias: initialMedias, query, onChange, onMediaFormOpen, onMediaFormClose, className, ...props }: MediaGalleryProps): react.JSX.Element;
|
|
29
21
|
|
|
30
22
|
interface MediaGalleryModalProps extends Omit<DialogModalProps, 'id'>, MediaGalleryProps {
|
|
31
23
|
id?: string | null;
|
|
@@ -33,6 +25,6 @@ interface MediaGalleryModalProps extends Omit<DialogModalProps, 'id'>, MediaGall
|
|
|
33
25
|
withoutCloseOnComplete?: boolean;
|
|
34
26
|
formRef?: ForwardedRef<HTMLFormElement> | null;
|
|
35
27
|
}
|
|
36
|
-
declare function MediaGalleryModal({ id, title, size, visible, autoClose, multiple, requestClose: customRequestClose, onClosed, className, value: initialValue, onChange, ...props }: MediaGalleryModalProps):
|
|
28
|
+
declare function MediaGalleryModal({ id, title, size, visible, autoClose, multiple, requestClose: customRequestClose, onClosed, className, value: initialValue, onChange, ...props }: MediaGalleryModalProps): react.JSX.Element;
|
|
37
29
|
|
|
38
30
|
export { MediaGallery, MediaGalleryModal, MediaGallery as default };
|
package/es/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import _isArray from 'lodash/isArray';
|
|
2
1
|
import { c } from 'react/compiler-runtime';
|
|
3
2
|
import classNames from 'classnames';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
3
|
+
import isArray from 'lodash-es/isArray';
|
|
4
|
+
import isObject from 'lodash-es/isObject';
|
|
5
|
+
import isString from 'lodash-es/isString';
|
|
6
6
|
import { MediasPickerContainer, MediasBrowserContainer } from '@panneau/medias';
|
|
7
7
|
import { useStory } from '@micromag/core/contexts';
|
|
8
|
-
import {
|
|
8
|
+
import { useMediaCreate } from '@micromag/data';
|
|
9
9
|
import { FormattedMessage } from 'react-intl';
|
|
10
10
|
import { jsx } from 'react/jsx-runtime';
|
|
11
11
|
import { useUrlGenerator } from '@folklore/routes';
|
|
@@ -552,23 +552,73 @@ function useDefaultFields() {
|
|
|
552
552
|
var styles = {"container":"micromag-media-gallery-new-media-gallery-container","browser":"micromag-media-gallery-new-media-gallery-browser"};
|
|
553
553
|
|
|
554
554
|
function MediaGallery(t0) {
|
|
555
|
-
const $ = c(
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
555
|
+
const $ = c(63);
|
|
556
|
+
let props;
|
|
557
|
+
let t1;
|
|
558
|
+
let t10;
|
|
559
|
+
let t11;
|
|
560
|
+
let t12;
|
|
561
|
+
let t13;
|
|
562
|
+
let t14;
|
|
563
|
+
let t2;
|
|
564
|
+
let t3;
|
|
565
|
+
let t4;
|
|
566
|
+
let t5;
|
|
567
|
+
let t6;
|
|
568
|
+
let t7;
|
|
569
|
+
let t8;
|
|
570
|
+
let t9;
|
|
571
|
+
if ($[0] !== t0) {
|
|
572
|
+
({
|
|
573
|
+
value: t1,
|
|
574
|
+
types: t2,
|
|
575
|
+
source: t3,
|
|
576
|
+
filters: t4,
|
|
577
|
+
fields: t5,
|
|
578
|
+
columns: t6,
|
|
579
|
+
isPicker: t7,
|
|
580
|
+
multiple: t8,
|
|
581
|
+
medias: t9,
|
|
582
|
+
query: t10,
|
|
583
|
+
onChange: t11,
|
|
584
|
+
onMediaFormOpen: t12,
|
|
585
|
+
onMediaFormClose: t13,
|
|
586
|
+
className: t14,
|
|
587
|
+
...props
|
|
588
|
+
} = t0);
|
|
589
|
+
$[0] = t0;
|
|
590
|
+
$[1] = props;
|
|
591
|
+
$[2] = t1;
|
|
592
|
+
$[3] = t10;
|
|
593
|
+
$[4] = t11;
|
|
594
|
+
$[5] = t12;
|
|
595
|
+
$[6] = t13;
|
|
596
|
+
$[7] = t14;
|
|
597
|
+
$[8] = t2;
|
|
598
|
+
$[9] = t3;
|
|
599
|
+
$[10] = t4;
|
|
600
|
+
$[11] = t5;
|
|
601
|
+
$[12] = t6;
|
|
602
|
+
$[13] = t7;
|
|
603
|
+
$[14] = t8;
|
|
604
|
+
$[15] = t9;
|
|
605
|
+
} else {
|
|
606
|
+
props = $[1];
|
|
607
|
+
t1 = $[2];
|
|
608
|
+
t10 = $[3];
|
|
609
|
+
t11 = $[4];
|
|
610
|
+
t12 = $[5];
|
|
611
|
+
t13 = $[6];
|
|
612
|
+
t14 = $[7];
|
|
613
|
+
t2 = $[8];
|
|
614
|
+
t3 = $[9];
|
|
615
|
+
t4 = $[10];
|
|
616
|
+
t5 = $[11];
|
|
617
|
+
t6 = $[12];
|
|
618
|
+
t7 = $[13];
|
|
619
|
+
t8 = $[14];
|
|
620
|
+
t9 = $[15];
|
|
621
|
+
}
|
|
572
622
|
const value = t1 === undefined ? null : t1;
|
|
573
623
|
const types = t2 === undefined ? null : t2;
|
|
574
624
|
const source = t3 === undefined ? null : t3;
|
|
@@ -583,15 +633,14 @@ function MediaGallery(t0) {
|
|
|
583
633
|
const onMediaFormOpen = t12 === undefined ? null : t12;
|
|
584
634
|
const onMediaFormClose = t13 === undefined ? null : t13;
|
|
585
635
|
const className = t14 === undefined ? null : t14;
|
|
586
|
-
const api = useApi();
|
|
587
636
|
const story = useStory();
|
|
588
637
|
let t15;
|
|
589
|
-
if ($[
|
|
638
|
+
if ($[16] !== story) {
|
|
590
639
|
t15 = story || {};
|
|
591
|
-
$[
|
|
592
|
-
$[
|
|
640
|
+
$[16] = story;
|
|
641
|
+
$[17] = t15;
|
|
593
642
|
} else {
|
|
594
|
-
t15 = $[
|
|
643
|
+
t15 = $[17];
|
|
595
644
|
}
|
|
596
645
|
const {
|
|
597
646
|
id: t16
|
|
@@ -599,15 +648,15 @@ function MediaGallery(t0) {
|
|
|
599
648
|
const storyId = t16 === undefined ? null : t16;
|
|
600
649
|
let finalTypes;
|
|
601
650
|
let t17;
|
|
602
|
-
if ($[
|
|
651
|
+
if ($[18] !== types) {
|
|
603
652
|
finalTypes = isString(types) ? [types] : types;
|
|
604
653
|
t17 = [...(finalTypes || []).map(_temp), (finalTypes || []).indexOf("video") !== -1 ? "image/gif" : null].filter(_temp2);
|
|
605
|
-
$[
|
|
606
|
-
$[
|
|
607
|
-
$[
|
|
654
|
+
$[18] = types;
|
|
655
|
+
$[19] = finalTypes;
|
|
656
|
+
$[20] = t17;
|
|
608
657
|
} else {
|
|
609
|
-
finalTypes = $[
|
|
610
|
-
t17 = $[
|
|
658
|
+
finalTypes = $[19];
|
|
659
|
+
t17 = $[20];
|
|
611
660
|
}
|
|
612
661
|
const fileTypes = t17;
|
|
613
662
|
const defaultFields = useDefaultFields();
|
|
@@ -615,9 +664,9 @@ function MediaGallery(t0) {
|
|
|
615
664
|
const fields = providedFields ?? defaultFields;
|
|
616
665
|
const t18 = providedFilters ?? defaultFilters;
|
|
617
666
|
let t19;
|
|
618
|
-
if ($[
|
|
667
|
+
if ($[21] !== finalTypes || $[22] !== storyId || $[23] !== t18) {
|
|
619
668
|
let t20;
|
|
620
|
-
if ($[
|
|
669
|
+
if ($[25] !== finalTypes || $[26] !== storyId) {
|
|
621
670
|
t20 = filter => {
|
|
622
671
|
const {
|
|
623
672
|
id: t21,
|
|
@@ -626,7 +675,7 @@ function MediaGallery(t0) {
|
|
|
626
675
|
const id = t21 === undefined ? null : t21;
|
|
627
676
|
const options = t22 === undefined ? [] : t22;
|
|
628
677
|
if (id === "types" && finalTypes !== null) {
|
|
629
|
-
return
|
|
678
|
+
return null;
|
|
630
679
|
}
|
|
631
680
|
if (id === "source") {
|
|
632
681
|
if (storyId === null) {
|
|
@@ -653,146 +702,103 @@ function MediaGallery(t0) {
|
|
|
653
702
|
}
|
|
654
703
|
return filter;
|
|
655
704
|
};
|
|
656
|
-
$[
|
|
657
|
-
$[
|
|
658
|
-
$[
|
|
705
|
+
$[25] = finalTypes;
|
|
706
|
+
$[26] = storyId;
|
|
707
|
+
$[27] = t20;
|
|
659
708
|
} else {
|
|
660
|
-
t20 = $[
|
|
709
|
+
t20 = $[27];
|
|
661
710
|
}
|
|
662
711
|
t19 = t18.map(t20).filter(_temp3);
|
|
663
|
-
$[
|
|
664
|
-
$[
|
|
665
|
-
$[
|
|
666
|
-
$[
|
|
712
|
+
$[21] = finalTypes;
|
|
713
|
+
$[22] = storyId;
|
|
714
|
+
$[23] = t18;
|
|
715
|
+
$[24] = t19;
|
|
667
716
|
} else {
|
|
668
|
-
t19 = $[
|
|
717
|
+
t19 = $[24];
|
|
669
718
|
}
|
|
670
719
|
const filters = t19;
|
|
671
|
-
let t20;
|
|
672
|
-
if ($[12] !== api) {
|
|
673
|
-
t20 = {
|
|
674
|
-
get: (...t21) => {
|
|
675
|
-
const args = t21;
|
|
676
|
-
return api.medias.get(...args);
|
|
677
|
-
},
|
|
678
|
-
getTrashed: (...t22) => {
|
|
679
|
-
const args_0 = t22;
|
|
680
|
-
return api.medias.getTrashed(...args_0);
|
|
681
|
-
},
|
|
682
|
-
find: (...t23) => {
|
|
683
|
-
const args_1 = t23;
|
|
684
|
-
return api.medias.find(...args_1);
|
|
685
|
-
},
|
|
686
|
-
create: (...t24) => {
|
|
687
|
-
const args_2 = t24;
|
|
688
|
-
return api.medias.create(...args_2);
|
|
689
|
-
},
|
|
690
|
-
update: (...t25) => {
|
|
691
|
-
const args_3 = t25;
|
|
692
|
-
return api.medias.update(...args_3);
|
|
693
|
-
},
|
|
694
|
-
delete: (...t26) => {
|
|
695
|
-
const args_4 = t26;
|
|
696
|
-
return typeof api.medias.forceDelete !== "undefined" ? api.medias.forceDelete(...args_4) : api.medias.delete(...args_4);
|
|
697
|
-
},
|
|
698
|
-
trash: (...t27) => {
|
|
699
|
-
const args_5 = t27;
|
|
700
|
-
return api.medias.delete(...args_5);
|
|
701
|
-
},
|
|
702
|
-
restore: (...t28) => {
|
|
703
|
-
const args_6 = t28;
|
|
704
|
-
return api.medias.restore(...args_6);
|
|
705
|
-
}
|
|
706
|
-
};
|
|
707
|
-
$[12] = api;
|
|
708
|
-
$[13] = t20;
|
|
709
|
-
} else {
|
|
710
|
-
t20 = $[13];
|
|
711
|
-
}
|
|
712
|
-
const mediasApi = t20;
|
|
713
720
|
const {
|
|
714
721
|
create: createMedia
|
|
715
722
|
} = useMediaCreate();
|
|
716
|
-
let
|
|
717
|
-
if ($[
|
|
718
|
-
|
|
719
|
-
$[
|
|
720
|
-
$[
|
|
723
|
+
let t20;
|
|
724
|
+
if ($[28] !== createMedia) {
|
|
725
|
+
t20 = newMedias => Promise.all(newMedias.map(createMedia)).then(_temp4);
|
|
726
|
+
$[28] = createMedia;
|
|
727
|
+
$[29] = t20;
|
|
721
728
|
} else {
|
|
722
|
-
|
|
729
|
+
t20 = $[29];
|
|
723
730
|
}
|
|
724
|
-
const onMediaUploaded =
|
|
725
|
-
const
|
|
726
|
-
let
|
|
727
|
-
if ($[
|
|
728
|
-
|
|
729
|
-
allowedFileTypes:
|
|
731
|
+
const onMediaUploaded = t20;
|
|
732
|
+
const t21 = fileTypes !== null && fileTypes.length > 0 ? fileTypes : null;
|
|
733
|
+
let t22;
|
|
734
|
+
if ($[30] !== t21) {
|
|
735
|
+
t22 = {
|
|
736
|
+
allowedFileTypes: t21
|
|
730
737
|
};
|
|
731
|
-
$[
|
|
732
|
-
$[
|
|
738
|
+
$[30] = t21;
|
|
739
|
+
$[31] = t22;
|
|
733
740
|
} else {
|
|
734
|
-
|
|
741
|
+
t22 = $[31];
|
|
735
742
|
}
|
|
736
|
-
const uppyConfig =
|
|
737
|
-
let
|
|
738
|
-
if ($[
|
|
739
|
-
|
|
743
|
+
const uppyConfig = t22;
|
|
744
|
+
let t23;
|
|
745
|
+
if ($[32] !== source) {
|
|
746
|
+
t23 = source !== null ? {
|
|
740
747
|
source
|
|
741
748
|
} : null;
|
|
742
|
-
$[
|
|
743
|
-
$[
|
|
749
|
+
$[32] = source;
|
|
750
|
+
$[33] = t23;
|
|
744
751
|
} else {
|
|
745
|
-
|
|
752
|
+
t23 = $[33];
|
|
746
753
|
}
|
|
747
|
-
let
|
|
748
|
-
if ($[
|
|
749
|
-
|
|
754
|
+
let t24;
|
|
755
|
+
if ($[34] !== query || $[35] !== t23) {
|
|
756
|
+
t24 = {
|
|
750
757
|
...query,
|
|
751
|
-
...
|
|
758
|
+
...t23
|
|
752
759
|
};
|
|
753
|
-
$[
|
|
754
|
-
$[
|
|
755
|
-
$[
|
|
760
|
+
$[34] = query;
|
|
761
|
+
$[35] = t23;
|
|
762
|
+
$[36] = t24;
|
|
756
763
|
} else {
|
|
757
|
-
|
|
764
|
+
t24 = $[36];
|
|
758
765
|
}
|
|
759
|
-
const finalQuery =
|
|
760
|
-
let
|
|
761
|
-
if ($[
|
|
762
|
-
|
|
763
|
-
$[
|
|
764
|
-
$[
|
|
766
|
+
const finalQuery = t24;
|
|
767
|
+
let t25;
|
|
768
|
+
if ($[37] !== value) {
|
|
769
|
+
t25 = isObject(value) && !isArray(value) ? [value] : value;
|
|
770
|
+
$[37] = value;
|
|
771
|
+
$[38] = t25;
|
|
765
772
|
} else {
|
|
766
|
-
|
|
773
|
+
t25 = $[38];
|
|
767
774
|
}
|
|
768
|
-
const pickerValue =
|
|
769
|
-
let
|
|
770
|
-
if ($[
|
|
771
|
-
|
|
775
|
+
const pickerValue = t25;
|
|
776
|
+
let t26;
|
|
777
|
+
if ($[39] !== multiple || $[40] !== onChange) {
|
|
778
|
+
t26 = newValue => {
|
|
772
779
|
if (onChange !== null) {
|
|
773
|
-
onChange(!multiple &&
|
|
780
|
+
onChange(!multiple && isArray(newValue) ? newValue?.[0] ?? null : newValue);
|
|
774
781
|
}
|
|
775
782
|
};
|
|
776
|
-
$[
|
|
777
|
-
$[
|
|
778
|
-
$[
|
|
783
|
+
$[39] = multiple;
|
|
784
|
+
$[40] = onChange;
|
|
785
|
+
$[41] = t26;
|
|
779
786
|
} else {
|
|
780
|
-
|
|
787
|
+
t26 = $[41];
|
|
781
788
|
}
|
|
782
|
-
const onPickerChange =
|
|
783
|
-
let
|
|
784
|
-
if ($[
|
|
785
|
-
|
|
786
|
-
$[
|
|
787
|
-
$[
|
|
789
|
+
const onPickerChange = t26;
|
|
790
|
+
let t27;
|
|
791
|
+
if ($[42] !== className) {
|
|
792
|
+
t27 = classNames([styles.container, className]);
|
|
793
|
+
$[42] = className;
|
|
794
|
+
$[43] = t27;
|
|
788
795
|
} else {
|
|
789
|
-
|
|
796
|
+
t27 = $[43];
|
|
790
797
|
}
|
|
791
|
-
let
|
|
792
|
-
if ($[
|
|
793
|
-
|
|
798
|
+
let t28;
|
|
799
|
+
if ($[44] !== columns || $[45] !== fields || $[46] !== filters || $[47] !== finalQuery || $[48] !== finalTypes || $[49] !== initialMedias || $[50] !== isPicker || $[51] !== multiple || $[52] !== onMediaFormClose || $[53] !== onMediaFormOpen || $[54] !== onMediaUploaded || $[55] !== onPickerChange || $[56] !== pickerValue || $[57] !== props || $[58] !== uppyConfig) {
|
|
800
|
+
t28 = isPicker ? /*#__PURE__*/jsx(MediasPickerContainer, {
|
|
794
801
|
className: styles.browser,
|
|
795
|
-
api: mediasApi,
|
|
796
802
|
value: pickerValue,
|
|
797
803
|
types: finalTypes,
|
|
798
804
|
query: finalQuery,
|
|
@@ -807,10 +813,10 @@ function MediaGallery(t0) {
|
|
|
807
813
|
onMediaFormOpen: onMediaFormOpen,
|
|
808
814
|
onMediaFormClose: onMediaFormClose,
|
|
809
815
|
withStickySelection: true,
|
|
810
|
-
withTrash: true
|
|
816
|
+
withTrash: true,
|
|
817
|
+
...props
|
|
811
818
|
}) : /*#__PURE__*/jsx(MediasBrowserContainer, {
|
|
812
819
|
className: styles.browser,
|
|
813
|
-
api: mediasApi,
|
|
814
820
|
types: finalTypes,
|
|
815
821
|
query: finalQuery,
|
|
816
822
|
items: initialMedias,
|
|
@@ -822,40 +828,41 @@ function MediaGallery(t0) {
|
|
|
822
828
|
multipleSelection: true,
|
|
823
829
|
withStickySelection: true,
|
|
824
830
|
withTrash: true,
|
|
825
|
-
withReplace: true
|
|
831
|
+
withReplace: true,
|
|
832
|
+
...props
|
|
826
833
|
});
|
|
827
|
-
$[
|
|
828
|
-
$[
|
|
829
|
-
$[
|
|
830
|
-
$[
|
|
831
|
-
$[
|
|
832
|
-
$[
|
|
833
|
-
$[
|
|
834
|
-
$[
|
|
835
|
-
$[
|
|
836
|
-
$[
|
|
837
|
-
$[
|
|
838
|
-
$[
|
|
839
|
-
$[
|
|
840
|
-
$[
|
|
841
|
-
$[
|
|
842
|
-
$[
|
|
834
|
+
$[44] = columns;
|
|
835
|
+
$[45] = fields;
|
|
836
|
+
$[46] = filters;
|
|
837
|
+
$[47] = finalQuery;
|
|
838
|
+
$[48] = finalTypes;
|
|
839
|
+
$[49] = initialMedias;
|
|
840
|
+
$[50] = isPicker;
|
|
841
|
+
$[51] = multiple;
|
|
842
|
+
$[52] = onMediaFormClose;
|
|
843
|
+
$[53] = onMediaFormOpen;
|
|
844
|
+
$[54] = onMediaUploaded;
|
|
845
|
+
$[55] = onPickerChange;
|
|
846
|
+
$[56] = pickerValue;
|
|
847
|
+
$[57] = props;
|
|
848
|
+
$[58] = uppyConfig;
|
|
849
|
+
$[59] = t28;
|
|
843
850
|
} else {
|
|
844
|
-
|
|
851
|
+
t28 = $[59];
|
|
845
852
|
}
|
|
846
|
-
let
|
|
847
|
-
if ($[
|
|
848
|
-
|
|
849
|
-
className:
|
|
850
|
-
children:
|
|
853
|
+
let t29;
|
|
854
|
+
if ($[60] !== t27 || $[61] !== t28) {
|
|
855
|
+
t29 = /*#__PURE__*/jsx("div", {
|
|
856
|
+
className: t27,
|
|
857
|
+
children: t28
|
|
851
858
|
});
|
|
852
|
-
$[
|
|
853
|
-
$[
|
|
854
|
-
$[
|
|
859
|
+
$[60] = t27;
|
|
860
|
+
$[61] = t28;
|
|
861
|
+
$[62] = t29;
|
|
855
862
|
} else {
|
|
856
|
-
|
|
863
|
+
t29 = $[62];
|
|
857
864
|
}
|
|
858
|
-
return
|
|
865
|
+
return t29;
|
|
859
866
|
}
|
|
860
867
|
function _temp4(newAddedMedias) {
|
|
861
868
|
return newAddedMedias;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/media-gallery",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.101",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"type": "git",
|
|
12
12
|
"url": "git+https://github.com/urbania-media/micromag-js.git"
|
|
13
13
|
},
|
|
14
|
+
"license": "ISC",
|
|
14
15
|
"author": {
|
|
15
16
|
"name": "Folklore",
|
|
16
17
|
"email": "info@folklore.email"
|
|
@@ -29,10 +30,10 @@
|
|
|
29
30
|
"email": "jc@folklore.email"
|
|
30
31
|
}
|
|
31
32
|
],
|
|
32
|
-
"
|
|
33
|
+
"sideEffects": [
|
|
34
|
+
"**/*.css"
|
|
35
|
+
],
|
|
33
36
|
"type": "module",
|
|
34
|
-
"module": "es/index.js",
|
|
35
|
-
"style": "./assets/css/styles.css",
|
|
36
37
|
"exports": {
|
|
37
38
|
".": {
|
|
38
39
|
"types": "./es/index.d.ts",
|
|
@@ -42,23 +43,18 @@
|
|
|
42
43
|
"./assets/css/styles": "./assets/css/styles.css",
|
|
43
44
|
"./assets/css/styles.css": "./assets/css/styles.css"
|
|
44
45
|
},
|
|
46
|
+
"module": "es/index.js",
|
|
47
|
+
"types": "es/index.d.ts",
|
|
48
|
+
"style": "./assets/css/styles.css",
|
|
45
49
|
"files": [
|
|
46
50
|
"lib",
|
|
47
51
|
"es",
|
|
48
52
|
"assets"
|
|
49
53
|
],
|
|
50
54
|
"scripts": {
|
|
55
|
+
"build": "../../scripts/prepare-package.sh --types",
|
|
51
56
|
"clean": "rm -rf es && rm -rf lib && rm -rf assets && rm -rf styles",
|
|
52
|
-
"prepublishOnly": "npm run build"
|
|
53
|
-
"build": "../../scripts/prepare-package.sh --types"
|
|
54
|
-
},
|
|
55
|
-
"devDependencies": {
|
|
56
|
-
"react": "^19.0.0",
|
|
57
|
-
"react-dom": "^19.0.0"
|
|
58
|
-
},
|
|
59
|
-
"peerDependencies": {
|
|
60
|
-
"react": "^19.0.0",
|
|
61
|
-
"react-dom": "^19.0.0"
|
|
57
|
+
"prepublishOnly": "npm run build"
|
|
62
58
|
},
|
|
63
59
|
"dependencies": {
|
|
64
60
|
"@babel/runtime": "^7.28.6",
|
|
@@ -66,20 +62,28 @@
|
|
|
66
62
|
"@fortawesome/fontawesome-svg-core": "^7.2.0",
|
|
67
63
|
"@fortawesome/free-solid-svg-icons": "^7.2.0",
|
|
68
64
|
"@fortawesome/react-fontawesome": "^3.2.0",
|
|
69
|
-
"@micromag/core": "^0.4.
|
|
70
|
-
"@micromag/data": "^0.4.
|
|
71
|
-
"@panneau/
|
|
65
|
+
"@micromag/core": "^0.4.100",
|
|
66
|
+
"@micromag/data": "^0.4.101",
|
|
67
|
+
"@panneau/core": "^4.0.58",
|
|
68
|
+
"@panneau/medias": "^4.0.60",
|
|
72
69
|
"bootstrap": "^5.3.8",
|
|
73
70
|
"classnames": "^2.2.6",
|
|
74
|
-
"lodash": "^4.17.23",
|
|
71
|
+
"lodash-es": "^4.17.23",
|
|
75
72
|
"pretty-bytes": "^6.1.1",
|
|
76
73
|
"react-intl": "^8.1.3 || ^10.0.0",
|
|
77
74
|
"wouter": "^3.0.0"
|
|
78
75
|
},
|
|
76
|
+
"devDependencies": {
|
|
77
|
+
"react": "^19.0.0",
|
|
78
|
+
"react-dom": "^19.0.0"
|
|
79
|
+
},
|
|
80
|
+
"peerDependencies": {
|
|
81
|
+
"react": "^19.0.0",
|
|
82
|
+
"react-dom": "^19.0.0"
|
|
83
|
+
},
|
|
79
84
|
"publishConfig": {
|
|
80
85
|
"access": "public",
|
|
81
86
|
"registry": "https://registry.npmjs.org/"
|
|
82
87
|
},
|
|
83
|
-
"gitHead": "
|
|
84
|
-
"types": "es/index.d.ts"
|
|
88
|
+
"gitHead": "88aec42cff116b686d2331bf397ba2ada2fa393d"
|
|
85
89
|
}
|