@blaze-cms/plugin-media-ui 0.146.0-node18.1 → 0.146.0-rc-eagle.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/CHANGELOG.md +10 -16
- package/lib/components/CardMedia/CardMedia.js +168 -221
- package/lib/components/CardMedia/CardMedia.js.map +1 -1
- package/lib/components/CardMedia/index.js +2 -3
- package/lib/components/CardMedia/index.js.map +1 -1
- package/lib/components/EditMediaFile/EditMediaFile.js +162 -113
- package/lib/components/EditMediaFile/EditMediaFile.js.map +1 -1
- package/lib/components/EditMediaFile/EditMediaFilePage.js +81 -97
- package/lib/components/EditMediaFile/EditMediaFilePage.js.map +1 -1
- package/lib/components/EditMediaFile/index.js +2 -3
- package/lib/components/EditMediaFile/index.js.map +1 -1
- package/lib/components/EditorAdapter/EditorAdapter.js +43 -22
- package/lib/components/EditorAdapter/EditorAdapter.js.map +1 -1
- package/lib/components/EditorAdapter/index.js +2 -3
- package/lib/components/EditorAdapter/index.js.map +1 -1
- package/lib/components/FileList/FilesListContext/index.js +3 -4
- package/lib/components/FileList/FilesListContext/index.js.map +1 -1
- package/lib/components/FileList/FilesListProvider/index.js +27 -29
- package/lib/components/FileList/FilesListProvider/index.js.map +1 -1
- package/lib/components/FileList/useFileList/index.js +3 -6
- package/lib/components/FileList/useFileList/index.js.map +1 -1
- package/lib/components/FileList/useGetFiles/getFiles.js +164 -185
- package/lib/components/FileList/useGetFiles/getFiles.js.map +1 -1
- package/lib/components/FileList/useGetFiles/index.js +2 -3
- package/lib/components/FileList/useGetFiles/index.js.map +1 -1
- package/lib/components/FileList/useGetFiles/useGetFiles.js +88 -133
- package/lib/components/FileList/useGetFiles/useGetFiles.js.map +1 -1
- package/lib/components/FileList/useGetFilesList/getCounters.js +10 -30
- package/lib/components/FileList/useGetFilesList/getCounters.js.map +1 -1
- package/lib/components/FileList/useGetFilesList/index.js +2 -3
- package/lib/components/FileList/useGetFilesList/index.js.map +1 -1
- package/lib/components/FileList/useGetFilesList/useGetFilesList.js +89 -110
- package/lib/components/FileList/useGetFilesList/useGetFilesList.js.map +1 -1
- package/lib/components/FilePreview/Actions/index.js +24 -38
- package/lib/components/FilePreview/Actions/index.js.map +1 -1
- package/lib/components/FilePreview/Image/Image.js +35 -24
- package/lib/components/FilePreview/Image/Image.js.map +1 -1
- package/lib/components/FilePreview/Image/RawImage.js +25 -27
- package/lib/components/FilePreview/Image/RawImage.js.map +1 -1
- package/lib/components/FilePreview/Image/imageSchema.js +2 -3
- package/lib/components/FilePreview/Image/imageSchema.js.map +1 -1
- package/lib/components/FilePreview/Image/index.js +1 -2
- package/lib/components/FilePreview/Image/index.js.map +1 -1
- package/lib/components/FilePreview/ModalContext.js +9 -0
- package/lib/components/FilePreview/ModalContext.js.map +1 -0
- package/lib/components/FilePreview/PDF/PDF.js +44 -31
- package/lib/components/FilePreview/PDF/PDF.js.map +1 -1
- package/lib/components/FilePreview/PDF/RawPDF.js +27 -29
- package/lib/components/FilePreview/PDF/RawPDF.js.map +1 -1
- package/lib/components/FilePreview/PDF/index.js +1 -2
- package/lib/components/FilePreview/PDF/index.js.map +1 -1
- package/lib/components/FilePreview/PDF/schema.js +1 -2
- package/lib/components/FilePreview/PDF/schema.js.map +1 -1
- package/lib/components/FilePreview/get-preview.js +12 -10
- package/lib/components/FilePreview/get-preview.js.map +1 -1
- package/lib/components/FilePreview/index.js +66 -57
- package/lib/components/FilePreview/index.js.map +1 -1
- package/lib/components/FilePreview/previewDefault/PreviewDefault.js +35 -23
- package/lib/components/FilePreview/previewDefault/PreviewDefault.js.map +1 -1
- package/lib/components/FilePreview/previewDefault/RawPreviewDefault.js +33 -27
- package/lib/components/FilePreview/previewDefault/RawPreviewDefault.js.map +1 -1
- package/lib/components/FilePreview/previewDefault/icons/DefaultIcon.js +120 -123
- package/lib/components/FilePreview/previewDefault/icons/DefaultIcon.js.map +1 -1
- package/lib/components/FilePreview/previewDefault/icons/index.js +2 -3
- package/lib/components/FilePreview/previewDefault/icons/index.js.map +1 -1
- package/lib/components/FilePreview/previewDefault/index.js +1 -2
- package/lib/components/FilePreview/previewDefault/index.js.map +1 -1
- package/lib/components/FilePreview/previewDefault/previewDefaultSchema.js +1 -2
- package/lib/components/FilePreview/previewDefault/previewDefaultSchema.js.map +1 -1
- package/lib/components/FilePreviewReadOnly/FileList.js +10 -12
- package/lib/components/FilePreviewReadOnly/FileList.js.map +1 -1
- package/lib/components/FilePreviewReadOnly/FilePreviewList.js +14 -20
- package/lib/components/FilePreviewReadOnly/FilePreviewList.js.map +1 -1
- package/lib/components/FilePreviewReadOnly/FilePreviewReadOnly.js +52 -98
- package/lib/components/FilePreviewReadOnly/FilePreviewReadOnly.js.map +1 -1
- package/lib/components/FilePreviewReadOnly/index.js +2 -3
- package/lib/components/FilePreviewReadOnly/index.js.map +1 -1
- package/lib/components/FilePreviewReadOnly/mappers/format-initial-value.js +7 -8
- package/lib/components/FilePreviewReadOnly/mappers/format-initial-value.js.map +1 -1
- package/lib/components/FilePreviewReadOnly/mappers/index.js +1 -2
- package/lib/components/FilePreviewReadOnly/mappers/index.js.map +1 -1
- package/lib/components/FileUploadAdapter/FileList.js +26 -39
- package/lib/components/FileUploadAdapter/FileList.js.map +1 -1
- package/lib/components/FileUploadAdapter/FilePreviewList.js +14 -20
- package/lib/components/FileUploadAdapter/FilePreviewList.js.map +1 -1
- package/lib/components/FileUploadAdapter/FileReorderList.js +18 -21
- package/lib/components/FileUploadAdapter/FileReorderList.js.map +1 -1
- package/lib/components/FileUploadAdapter/FileReorderListItem.js +20 -23
- package/lib/components/FileUploadAdapter/FileReorderListItem.js.map +1 -1
- package/lib/components/FileUploadAdapter/FileUploadAdapter.js +238 -338
- package/lib/components/FileUploadAdapter/FileUploadAdapter.js.map +1 -1
- package/lib/components/FileUploadAdapter/index.js +2 -3
- package/lib/components/FileUploadAdapter/index.js.map +1 -1
- package/lib/components/FileUploadAdapter/mappers/format-initial-value.js +7 -8
- package/lib/components/FileUploadAdapter/mappers/format-initial-value.js.map +1 -1
- package/lib/components/FileUploadAdapter/mappers/get-button-text.js +9 -6
- package/lib/components/FileUploadAdapter/mappers/get-button-text.js.map +1 -1
- package/lib/components/FileUploadAdapter/mappers/get-format.js +7 -13
- package/lib/components/FileUploadAdapter/mappers/get-format.js.map +1 -1
- package/lib/components/FileUploadAdapter/mappers/get-number-files-pending-to-fetch.js +6 -5
- package/lib/components/FileUploadAdapter/mappers/get-number-files-pending-to-fetch.js.map +1 -1
- package/lib/components/FileUploadAdapter/mappers/index.js +6 -7
- package/lib/components/FileUploadAdapter/mappers/index.js.map +1 -1
- package/lib/components/FileUploadAdapter/mappers/is-unselecting.js +2 -10
- package/lib/components/FileUploadAdapter/mappers/is-unselecting.js.map +1 -1
- package/lib/components/FileUploadAdapter/mappers/transform-to-array.js +2 -5
- package/lib/components/FileUploadAdapter/mappers/transform-to-array.js.map +1 -1
- package/lib/components/FileUploadAdapter/useLimit.js +4 -10
- package/lib/components/FileUploadAdapter/useLimit.js.map +1 -1
- package/lib/components/FileUploadModal/FileUploadModal.js +150 -145
- package/lib/components/FileUploadModal/FileUploadModal.js.map +1 -1
- package/lib/components/FileUploadModal/index.js +2 -3
- package/lib/components/FileUploadModal/index.js.map +1 -1
- package/lib/components/FilterPanel/FilterPanel.js +68 -88
- package/lib/components/FilterPanel/FilterPanel.js.map +1 -1
- package/lib/components/FilterPanel/index.js +2 -3
- package/lib/components/FilterPanel/index.js.map +1 -1
- package/lib/components/ListingContainer/Listing/Listing.js +58 -48
- package/lib/components/ListingContainer/Listing/Listing.js.map +1 -1
- package/lib/components/ListingContainer/Listing/MediaListing/MediaFileList/MediaFileList.js +75 -92
- package/lib/components/ListingContainer/Listing/MediaListing/MediaFileList/MediaFileList.js.map +1 -1
- package/lib/components/ListingContainer/Listing/MediaListing/MediaFileList/index.js +2 -3
- package/lib/components/ListingContainer/Listing/MediaListing/MediaFileList/index.js.map +1 -1
- package/lib/components/ListingContainer/Listing/MediaListing/MediaListing.js +22 -26
- package/lib/components/ListingContainer/Listing/MediaListing/MediaListing.js.map +1 -1
- package/lib/components/ListingContainer/Listing/MediaListing/index.js +2 -3
- package/lib/components/ListingContainer/Listing/MediaListing/index.js.map +1 -1
- package/lib/components/ListingContainer/Listing/index.js +2 -3
- package/lib/components/ListingContainer/Listing/index.js.map +1 -1
- package/lib/components/ListingContainer/ListingContainer.js +69 -92
- package/lib/components/ListingContainer/ListingContainer.js.map +1 -1
- package/lib/components/ListingContainer/index.js +2 -3
- package/lib/components/ListingContainer/index.js.map +1 -1
- package/lib/components/ListingContainer/mappers/exist-previous.js +3 -10
- package/lib/components/ListingContainer/mappers/exist-previous.js.map +1 -1
- package/lib/components/ListingContainer/mappers/index.js +2 -3
- package/lib/components/ListingContainer/mappers/index.js.map +1 -1
- package/lib/components/MediaListing.js +14 -26
- package/lib/components/MediaListing.js.map +1 -1
- package/lib/constants.js +15 -16
- package/lib/constants.js.map +1 -1
- package/lib/icons/MediaLibraryIcon.js +17 -20
- package/lib/icons/MediaLibraryIcon.js.map +1 -1
- package/lib/icons/index.js +2 -3
- package/lib/icons/index.js.map +1 -1
- package/lib/index.js +67 -92
- package/lib/index.js.map +1 -1
- package/lib/utils/available-filters/available-filters.js +1 -2
- package/lib/utils/available-filters/available-filters.js.map +1 -1
- package/lib/utils/bustUrl.js +13 -0
- package/lib/utils/bustUrl.js.map +1 -0
- package/lib/utils/media-context/index.js +4 -5
- package/lib/utils/media-context/index.js.map +1 -1
- package/lib/utils/media-context/media-context.js +3 -4
- package/lib/utils/media-context/media-context.js.map +1 -1
- package/lib/utils/media-context/useMediaContext.js +2 -4
- package/lib/utils/media-context/useMediaContext.js.map +1 -1
- package/package.json +14 -14
- package/src/components/CardMedia/CardMedia.js +27 -8
- package/src/components/EditMediaFile/EditMediaFile.js +115 -37
- package/src/components/EditMediaFile/EditMediaFilePage.js +35 -9
- package/src/components/EditorAdapter/EditorAdapter.js +31 -4
- package/src/components/FilePreview/Actions/index.js +25 -27
- package/src/components/FilePreview/Image/Image.js +15 -2
- package/src/components/FilePreview/Image/imageSchema.js +1 -1
- package/src/components/FilePreview/ModalContext.js +3 -0
- package/src/components/FilePreview/PDF/PDF.js +17 -4
- package/src/components/FilePreview/index.js +35 -6
- package/src/components/FilePreview/previewDefault/PreviewDefault.js +16 -3
- package/src/components/FilePreview/previewDefault/RawPreviewDefault.js +17 -7
- package/src/components/FilePreviewReadOnly/FileList.js +1 -3
- package/src/components/FilePreviewReadOnly/FilePreviewReadOnly.js +17 -29
- package/src/components/FileUploadAdapter/FileUploadAdapter.js +42 -18
- package/src/components/FileUploadAdapter/mappers/get-button-text.js +4 -3
- package/src/components/FileUploadAdapter/mappers/get-number-files-pending-to-fetch.js +6 -4
- package/src/components/FileUploadModal/FileUploadModal.js +88 -42
- package/src/components/ListingContainer/Listing/Listing.js +15 -5
- package/src/components/ListingContainer/Listing/MediaListing/MediaFileList/MediaFileList.js +11 -5
- package/src/components/ListingContainer/Listing/MediaListing/MediaListing.js +10 -2
- package/src/components/ListingContainer/ListingContainer.js +13 -4
- package/src/index.js +17 -14
- package/src/utils/bustUrl.js +6 -0
- package/lib-es/components/CardMedia/CardMedia.js +0 -219
- package/lib-es/components/CardMedia/CardMedia.js.map +0 -1
- package/lib-es/components/CardMedia/index.js +0 -3
- package/lib-es/components/CardMedia/index.js.map +0 -1
- package/lib-es/components/EditMediaFile/EditMediaFile.js +0 -115
- package/lib-es/components/EditMediaFile/EditMediaFile.js.map +0 -1
- package/lib-es/components/EditMediaFile/EditMediaFilePage.js +0 -86
- package/lib-es/components/EditMediaFile/EditMediaFilePage.js.map +0 -1
- package/lib-es/components/EditMediaFile/index.js +0 -3
- package/lib-es/components/EditMediaFile/index.js.map +0 -1
- package/lib-es/components/EditorAdapter/EditorAdapter.js +0 -39
- package/lib-es/components/EditorAdapter/EditorAdapter.js.map +0 -1
- package/lib-es/components/EditorAdapter/index.js +0 -3
- package/lib-es/components/EditorAdapter/index.js.map +0 -1
- package/lib-es/components/FileList/FilesListContext/index.js +0 -4
- package/lib-es/components/FileList/FilesListContext/index.js.map +0 -1
- package/lib-es/components/FileList/FilesListProvider/index.js +0 -36
- package/lib-es/components/FileList/FilesListProvider/index.js.map +0 -1
- package/lib-es/components/FileList/useFileList/index.js +0 -5
- package/lib-es/components/FileList/useFileList/index.js.map +0 -1
- package/lib-es/components/FileList/useGetFiles/getFiles.js +0 -179
- package/lib-es/components/FileList/useGetFiles/getFiles.js.map +0 -1
- package/lib-es/components/FileList/useGetFiles/index.js +0 -3
- package/lib-es/components/FileList/useGetFiles/index.js.map +0 -1
- package/lib-es/components/FileList/useGetFiles/useGetFiles.js +0 -114
- package/lib-es/components/FileList/useGetFiles/useGetFiles.js.map +0 -1
- package/lib-es/components/FileList/useGetFilesList/getCounters.js +0 -11
- package/lib-es/components/FileList/useGetFilesList/getCounters.js.map +0 -1
- package/lib-es/components/FileList/useGetFilesList/index.js +0 -3
- package/lib-es/components/FileList/useGetFilesList/index.js.map +0 -1
- package/lib-es/components/FileList/useGetFilesList/useGetFilesList.js +0 -172
- package/lib-es/components/FileList/useGetFilesList/useGetFilesList.js.map +0 -1
- package/lib-es/components/FilePreview/Actions/index.js +0 -38
- package/lib-es/components/FilePreview/Actions/index.js.map +0 -1
- package/lib-es/components/FilePreview/Image/Image.js +0 -27
- package/lib-es/components/FilePreview/Image/Image.js.map +0 -1
- package/lib-es/components/FilePreview/Image/RawImage.js +0 -31
- package/lib-es/components/FilePreview/Image/RawImage.js.map +0 -1
- package/lib-es/components/FilePreview/Image/imageSchema.js +0 -53
- package/lib-es/components/FilePreview/Image/imageSchema.js.map +0 -1
- package/lib-es/components/FilePreview/Image/index.js +0 -12
- package/lib-es/components/FilePreview/Image/index.js.map +0 -1
- package/lib-es/components/FilePreview/PDF/PDF.js +0 -34
- package/lib-es/components/FilePreview/PDF/PDF.js.map +0 -1
- package/lib-es/components/FilePreview/PDF/RawPDF.js +0 -33
- package/lib-es/components/FilePreview/PDF/RawPDF.js.map +0 -1
- package/lib-es/components/FilePreview/PDF/index.js +0 -12
- package/lib-es/components/FilePreview/PDF/index.js.map +0 -1
- package/lib-es/components/FilePreview/PDF/schema.js +0 -21
- package/lib-es/components/FilePreview/PDF/schema.js.map +0 -1
- package/lib-es/components/FilePreview/get-preview.js +0 -28
- package/lib-es/components/FilePreview/get-preview.js.map +0 -1
- package/lib-es/components/FilePreview/index.js +0 -85
- package/lib-es/components/FilePreview/index.js.map +0 -1
- package/lib-es/components/FilePreview/previewDefault/PreviewDefault.js +0 -27
- package/lib-es/components/FilePreview/previewDefault/PreviewDefault.js.map +0 -1
- package/lib-es/components/FilePreview/previewDefault/RawPreviewDefault.js +0 -31
- package/lib-es/components/FilePreview/previewDefault/RawPreviewDefault.js.map +0 -1
- package/lib-es/components/FilePreview/previewDefault/icons/DefaultIcon.js +0 -121
- package/lib-es/components/FilePreview/previewDefault/icons/DefaultIcon.js.map +0 -1
- package/lib-es/components/FilePreview/previewDefault/icons/index.js +0 -3
- package/lib-es/components/FilePreview/previewDefault/icons/index.js.map +0 -1
- package/lib-es/components/FilePreview/previewDefault/index.js +0 -12
- package/lib-es/components/FilePreview/previewDefault/index.js.map +0 -1
- package/lib-es/components/FilePreview/previewDefault/previewDefaultSchema.js +0 -25
- package/lib-es/components/FilePreview/previewDefault/previewDefaultSchema.js.map +0 -1
- package/lib-es/components/FilePreviewReadOnly/FileList.js +0 -18
- package/lib-es/components/FilePreviewReadOnly/FileList.js.map +0 -1
- package/lib-es/components/FilePreviewReadOnly/FilePreviewList.js +0 -22
- package/lib-es/components/FilePreviewReadOnly/FilePreviewList.js.map +0 -1
- package/lib-es/components/FilePreviewReadOnly/FilePreviewReadOnly.js +0 -66
- package/lib-es/components/FilePreviewReadOnly/FilePreviewReadOnly.js.map +0 -1
- package/lib-es/components/FilePreviewReadOnly/index.js +0 -3
- package/lib-es/components/FilePreviewReadOnly/index.js.map +0 -1
- package/lib-es/components/FilePreviewReadOnly/mappers/format-initial-value.js +0 -11
- package/lib-es/components/FilePreviewReadOnly/mappers/format-initial-value.js.map +0 -1
- package/lib-es/components/FilePreviewReadOnly/mappers/index.js +0 -3
- package/lib-es/components/FilePreviewReadOnly/mappers/index.js.map +0 -1
- package/lib-es/components/FileUploadAdapter/FileList.js +0 -52
- package/lib-es/components/FileUploadAdapter/FileList.js.map +0 -1
- package/lib-es/components/FileUploadAdapter/FilePreviewList.js +0 -22
- package/lib-es/components/FileUploadAdapter/FilePreviewList.js.map +0 -1
- package/lib-es/components/FileUploadAdapter/FileReorderList.js +0 -32
- package/lib-es/components/FileUploadAdapter/FileReorderList.js.map +0 -1
- package/lib-es/components/FileUploadAdapter/FileReorderListItem.js +0 -24
- package/lib-es/components/FileUploadAdapter/FileReorderListItem.js.map +0 -1
- package/lib-es/components/FileUploadAdapter/FileUploadAdapter.js +0 -367
- package/lib-es/components/FileUploadAdapter/FileUploadAdapter.js.map +0 -1
- package/lib-es/components/FileUploadAdapter/index.js +0 -3
- package/lib-es/components/FileUploadAdapter/index.js.map +0 -1
- package/lib-es/components/FileUploadAdapter/mappers/format-initial-value.js +0 -11
- package/lib-es/components/FileUploadAdapter/mappers/format-initial-value.js.map +0 -1
- package/lib-es/components/FileUploadAdapter/mappers/get-button-text.js +0 -9
- package/lib-es/components/FileUploadAdapter/mappers/get-button-text.js.map +0 -1
- package/lib-es/components/FileUploadAdapter/mappers/get-format.js +0 -12
- package/lib-es/components/FileUploadAdapter/mappers/get-format.js.map +0 -1
- package/lib-es/components/FileUploadAdapter/mappers/get-number-files-pending-to-fetch.js +0 -6
- package/lib-es/components/FileUploadAdapter/mappers/get-number-files-pending-to-fetch.js.map +0 -1
- package/lib-es/components/FileUploadAdapter/mappers/index.js +0 -8
- package/lib-es/components/FileUploadAdapter/mappers/index.js.map +0 -1
- package/lib-es/components/FileUploadAdapter/mappers/is-unselecting.js +0 -2
- package/lib-es/components/FileUploadAdapter/mappers/is-unselecting.js.map +0 -1
- package/lib-es/components/FileUploadAdapter/mappers/transform-to-array.js +0 -2
- package/lib-es/components/FileUploadAdapter/mappers/transform-to-array.js.map +0 -1
- package/lib-es/components/FileUploadAdapter/useLimit.js +0 -13
- package/lib-es/components/FileUploadAdapter/useLimit.js.map +0 -1
- package/lib-es/components/FileUploadModal/FileUploadModal.js +0 -113
- package/lib-es/components/FileUploadModal/FileUploadModal.js.map +0 -1
- package/lib-es/components/FileUploadModal/index.js +0 -3
- package/lib-es/components/FileUploadModal/index.js.map +0 -1
- package/lib-es/components/FilterPanel/FilterPanel.js +0 -135
- package/lib-es/components/FilterPanel/FilterPanel.js.map +0 -1
- package/lib-es/components/FilterPanel/index.js +0 -3
- package/lib-es/components/FilterPanel/index.js.map +0 -1
- package/lib-es/components/ListingContainer/Listing/Listing.js +0 -58
- package/lib-es/components/ListingContainer/Listing/Listing.js.map +0 -1
- package/lib-es/components/ListingContainer/Listing/MediaListing/MediaFileList/MediaFileList.js +0 -145
- package/lib-es/components/ListingContainer/Listing/MediaListing/MediaFileList/MediaFileList.js.map +0 -1
- package/lib-es/components/ListingContainer/Listing/MediaListing/MediaFileList/index.js +0 -3
- package/lib-es/components/ListingContainer/Listing/MediaListing/MediaFileList/index.js.map +0 -1
- package/lib-es/components/ListingContainer/Listing/MediaListing/MediaListing.js +0 -24
- package/lib-es/components/ListingContainer/Listing/MediaListing/MediaListing.js.map +0 -1
- package/lib-es/components/ListingContainer/Listing/MediaListing/index.js +0 -3
- package/lib-es/components/ListingContainer/Listing/MediaListing/index.js.map +0 -1
- package/lib-es/components/ListingContainer/Listing/index.js +0 -3
- package/lib-es/components/ListingContainer/Listing/index.js.map +0 -1
- package/lib-es/components/ListingContainer/ListingContainer.js +0 -106
- package/lib-es/components/ListingContainer/ListingContainer.js.map +0 -1
- package/lib-es/components/ListingContainer/index.js +0 -3
- package/lib-es/components/ListingContainer/index.js.map +0 -1
- package/lib-es/components/ListingContainer/mappers/exist-previous.js +0 -3
- package/lib-es/components/ListingContainer/mappers/exist-previous.js.map +0 -1
- package/lib-es/components/ListingContainer/mappers/index.js +0 -3
- package/lib-es/components/ListingContainer/mappers/index.js.map +0 -1
- package/lib-es/components/MediaListing.js +0 -29
- package/lib-es/components/MediaListing.js.map +0 -1
- package/lib-es/constants.js +0 -36
- package/lib-es/constants.js.map +0 -1
- package/lib-es/icons/MediaLibraryIcon.js +0 -70
- package/lib-es/icons/MediaLibraryIcon.js.map +0 -1
- package/lib-es/icons/index.js +0 -3
- package/lib-es/icons/index.js.map +0 -1
- package/lib-es/index.js +0 -61
- package/lib-es/index.js.map +0 -1
- package/lib-es/utils/available-filters/available-filters.js +0 -26
- package/lib-es/utils/available-filters/available-filters.js.map +0 -1
- package/lib-es/utils/media-context/index.js +0 -4
- package/lib-es/utils/media-context/index.js.map +0 -1
- package/lib-es/utils/media-context/media-context.js +0 -6
- package/lib-es/utils/media-context/media-context.js.map +0 -1
- package/lib-es/utils/media-context/useMediaContext.js +0 -4
- package/lib-es/utils/media-context/useMediaContext.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MediaLibraryIcon.js","names":["_react","_interopRequireDefault","require","_constants","MediaLibraryIcon","
|
|
1
|
+
{"version":3,"file":"MediaLibraryIcon.js","names":["_react","_interopRequireDefault","require","_constants","MediaLibraryIcon","width","ICON_SIZE","WIDTH","height","HEIGHT","stroke","ICON_COLOR","STROKE","default","createElement","viewBox","version","xmlns","xmlnsXlink","id","strokeWidth","fill","fillRule","transform","d","strokeLinecap","strokeLinejoin","cx","cy","rx","ry","x","y","_default","exports"],"sources":["../../src/icons/MediaLibraryIcon.js"],"sourcesContent":["import React from 'react';\nimport { ICON_SIZE, ICON_COLOR } from '../constants';\n\nfunction MediaLibraryIcon({\n width = ICON_SIZE.WIDTH,\n height = ICON_SIZE.HEIGHT,\n stroke = ICON_COLOR.STROKE\n}) {\n return (\n <svg\n width={width}\n height={height}\n viewBox=\"0 0 23 22\"\n version=\"1.1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlnsXlink=\"http://www.w3.org/1999/xlink\">\n <title>media-library</title>\n <g id=\"Page-1\" stroke=\"none\" strokeWidth=\"1\" fill=\"none\" fillRule=\"evenodd\">\n <g id=\"media-library\" transform=\"translate(1, 1.5)\">\n <g\n id=\"Group\"\n transform=\"translate(11.2707, 9.5) rotate(10) translate(-11.2707, -9.5)translate(2.7864, 1.3495)\">\n <path\n d=\"M6.97432089e-17,12.2258144 L4.86362131,7.55351567 C5.69190017,6.75805948 7.03454026,6.75805948 7.86281911,7.55351567 L12.7264404,12.2258144 M10.6053671,10.1881787 L12.2873782,8.57233353 C13.1156571,7.77687734 14.4582972,7.77687734 15.286576,8.57233353 L16.9685872,10.1881787 M2.1210734,16.3010859 L14.8475139,16.3010859 C16.0189503,16.3010859 16.9685872,15.3888053 16.9685872,14.2634501 L16.9685872,2.03763573 C16.9685872,0.912280592 16.0189503,0 14.8475139,0 L2.1210734,0 C0.949636909,0 6.97432089e-17,0.912280592 6.97432089e-17,2.03763573 L6.97432089e-17,14.2634501 C6.97432089e-17,15.3888053 0.949636909,16.3010859 2.1210734,16.3010859 Z\"\n id=\"Shape\"\n stroke={stroke}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n <ellipse\n id=\"Oval\"\n fill=\"#899BBC\"\n fillRule=\"nonzero\"\n cx=\"10.6975876\"\n cy=\"4.41487742\"\n rx=\"1.106647\"\n ry=\"1.01881787\"\n />\n </g>\n <rect\n id=\"Rectangle\"\n fill=\"#FFFFFF\"\n fillRule=\"nonzero\"\n x=\"0\"\n y=\"2.52861778\"\n width=\"16.9685872\"\n height=\"16.3010859\"\n rx=\"3\"\n />\n <g id=\"Group\" transform=\"translate(0, 2.5286)\">\n <path\n d=\"M0,12.2258144 L4.86362131,7.55351567 C5.69190017,6.75805948 7.03454026,6.75805948 7.86281911,7.55351567 L12.7264404,12.2258144 M10.6053671,10.1881787 L12.2873782,8.57233353 C13.1156571,7.77687734 14.4582972,7.77687734 15.286576,8.57233353 L16.9685872,10.1881787 M2.1210734,16.3010859 L14.8475139,16.3010859 C16.0189503,16.3010859 16.9685872,15.3888053 16.9685872,14.2634501 L16.9685872,2.03763573 C16.9685872,0.912280592 16.0189503,0 14.8475139,0 L2.1210734,0 C0.949636909,0 0,0.912280592 0,2.03763573 L0,14.2634501 C0,15.3888053 0.949636909,16.3010859 2.1210734,16.3010859 Z\"\n id=\"Shape\"\n stroke=\"#63779C\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n <ellipse\n id=\"Oval\"\n fill=\"#63779C\"\n fillRule=\"nonzero\"\n cx=\"10.6975876\"\n cy=\"4.41487742\"\n rx=\"1.106647\"\n ry=\"1.01881787\"\n />\n </g>\n </g>\n </g>\n </svg>\n );\n}\n\nexport default MediaLibraryIcon;\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAEA,SAASE,gBAAgBA,CAAC;EACxBC,KAAK,GAAGC,oBAAS,CAACC,KAAK;EACvBC,MAAM,GAAGF,oBAAS,CAACG,MAAM;EACzBC,MAAM,GAAGC,qBAAU,CAACC;AACtB,CAAC,EAAE;EACD,oBACEZ,MAAA,CAAAa,OAAA,CAAAC,aAAA;IACET,KAAK,EAAEA,KAAM;IACbG,MAAM,EAAEA,MAAO;IACfO,OAAO,EAAC,WAAW;IACnBC,OAAO,EAAC,KAAK;IACbC,KAAK,EAAC,4BAA4B;IAClCC,UAAU,EAAC;EAA8B,gBACzClB,MAAA,CAAAa,OAAA,CAAAC,aAAA,gBAAO,eAAoB,CAAC,eAC5Bd,MAAA,CAAAa,OAAA,CAAAC,aAAA;IAAGK,EAAE,EAAC,QAAQ;IAACT,MAAM,EAAC,MAAM;IAACU,WAAW,EAAC,GAAG;IAACC,IAAI,EAAC,MAAM;IAACC,QAAQ,EAAC;EAAS,gBACzEtB,MAAA,CAAAa,OAAA,CAAAC,aAAA;IAAGK,EAAE,EAAC,eAAe;IAACI,SAAS,EAAC;EAAmB,gBACjDvB,MAAA,CAAAa,OAAA,CAAAC,aAAA;IACEK,EAAE,EAAC,OAAO;IACVI,SAAS,EAAC;EAAuF,gBACjGvB,MAAA,CAAAa,OAAA,CAAAC,aAAA;IACEU,CAAC,EAAC,koBAAkoB;IACpoBL,EAAE,EAAC,OAAO;IACVT,MAAM,EAAEA,MAAO;IACfe,aAAa,EAAC,OAAO;IACrBC,cAAc,EAAC;EAAO,CACvB,CAAC,eACF1B,MAAA,CAAAa,OAAA,CAAAC,aAAA;IACEK,EAAE,EAAC,MAAM;IACTE,IAAI,EAAC,SAAS;IACdC,QAAQ,EAAC,SAAS;IAClBK,EAAE,EAAC,YAAY;IACfC,EAAE,EAAC,YAAY;IACfC,EAAE,EAAC,UAAU;IACbC,EAAE,EAAC;EAAY,CAChB,CACA,CAAC,eACJ9B,MAAA,CAAAa,OAAA,CAAAC,aAAA;IACEK,EAAE,EAAC,WAAW;IACdE,IAAI,EAAC,SAAS;IACdC,QAAQ,EAAC,SAAS;IAClBS,CAAC,EAAC,GAAG;IACLC,CAAC,EAAC,YAAY;IACd3B,KAAK,EAAC,YAAY;IAClBG,MAAM,EAAC,YAAY;IACnBqB,EAAE,EAAC;EAAG,CACP,CAAC,eACF7B,MAAA,CAAAa,OAAA,CAAAC,aAAA;IAAGK,EAAE,EAAC,OAAO;IAACI,SAAS,EAAC;EAAsB,gBAC5CvB,MAAA,CAAAa,OAAA,CAAAC,aAAA;IACEU,CAAC,EAAC,ikBAAikB;IACnkBL,EAAE,EAAC,OAAO;IACVT,MAAM,EAAC,SAAS;IAChBe,aAAa,EAAC,OAAO;IACrBC,cAAc,EAAC;EAAO,CACvB,CAAC,eACF1B,MAAA,CAAAa,OAAA,CAAAC,aAAA;IACEK,EAAE,EAAC,MAAM;IACTE,IAAI,EAAC,SAAS;IACdC,QAAQ,EAAC,SAAS;IAClBK,EAAE,EAAC,YAAY;IACfC,EAAE,EAAC,YAAY;IACfC,EAAE,EAAC,UAAU;IACbC,EAAE,EAAC;EAAY,CAChB,CACA,CACF,CACF,CACA,CAAC;AAEV;AAAC,IAAAG,QAAA,GAAAC,OAAA,CAAArB,OAAA,GAEcT,gBAAgB","ignoreList":[]}
|
package/lib/icons/index.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("core-js/modules/es.object.define-property.js");
|
|
4
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
Object.defineProperty(exports, "MediaLibraryIcon", {
|
|
9
8
|
enumerable: true,
|
|
10
|
-
get: function
|
|
11
|
-
return _MediaLibraryIcon
|
|
9
|
+
get: function () {
|
|
10
|
+
return _MediaLibraryIcon.default;
|
|
12
11
|
}
|
|
13
12
|
});
|
|
14
13
|
var _MediaLibraryIcon = _interopRequireDefault(require("./MediaLibraryIcon"));
|
package/lib/icons/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_MediaLibraryIcon","_interopRequireDefault","require"],"sources":["../../src/icons/index.js"],"sourcesContent":["import MediaLibraryIcon from './MediaLibraryIcon';\n\nexport { MediaLibraryIcon };\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["_MediaLibraryIcon","_interopRequireDefault","require"],"sources":["../../src/icons/index.js"],"sourcesContent":["import MediaLibraryIcon from './MediaLibraryIcon';\n\nexport { MediaLibraryIcon };\n"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA","ignoreList":[]}
|
package/lib/index.js
CHANGED
|
@@ -4,105 +4,80 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.
|
|
8
|
-
exports["default"] = load;
|
|
9
|
-
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
10
|
-
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
11
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
12
|
-
require("core-js/modules/es.array.iterator.js");
|
|
13
|
-
require("core-js/modules/es.object.define-property.js");
|
|
14
|
-
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
15
|
-
require("core-js/modules/es.object.to-string.js");
|
|
16
|
-
require("core-js/modules/es.promise.js");
|
|
17
|
-
require("core-js/modules/es.string.iterator.js");
|
|
18
|
-
require("core-js/modules/es.weak-map.js");
|
|
19
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
20
|
-
var _react = _interopRequireDefault(require("react"));
|
|
7
|
+
exports.default = load;
|
|
21
8
|
var _FileUploadAdapter = _interopRequireDefault(require("./components/FileUploadAdapter"));
|
|
22
9
|
var _EditorAdapter = _interopRequireDefault(require("./components/EditorAdapter"));
|
|
23
10
|
var _icons = require("./icons");
|
|
24
11
|
var _package = _interopRequireDefault(require("../package.json"));
|
|
25
12
|
var _constants = require("./constants");
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
-
|
|
13
|
+
var _FilePreviewReadOnly = _interopRequireDefault(require("./components/FilePreviewReadOnly"));
|
|
14
|
+
var _MediaListing = _interopRequireDefault(require("./components/MediaListing"));
|
|
15
|
+
var _EditMediaFilePage = _interopRequireDefault(require("./components/EditMediaFile/EditMediaFilePage"));
|
|
16
|
+
// todo: renable lazy loading after bundler optimisations, currently they are too slow in dev mode
|
|
17
|
+
// export const FilePreviewReadOnly = React.lazy(
|
|
18
|
+
// () =>
|
|
19
|
+
// import(/* webpackChunkName: 'MediaFilePreviewReadOnly' */ './components/FilePreviewReadOnly')
|
|
20
|
+
// );
|
|
21
|
+
|
|
22
|
+
// const MediaListing = React.lazy(
|
|
23
|
+
// () => import(/* webpackChunkName: 'MediaListingContainer' */ './components/MediaListing')
|
|
24
|
+
// );
|
|
25
|
+
|
|
26
|
+
// const EditMediaFilePage = React.lazy(
|
|
27
|
+
// () =>
|
|
28
|
+
// import(
|
|
29
|
+
// /* webpackChunkName: 'EditMediaFilePage' */ './components/EditMediaFile/EditMediaFilePage'
|
|
30
|
+
// )
|
|
31
|
+
// );
|
|
32
|
+
async function load(app) {
|
|
33
|
+
app.events.once('admin:menu:config:load', ({
|
|
34
|
+
addConfig
|
|
35
|
+
}) => {
|
|
36
|
+
addConfig({
|
|
37
|
+
main: {
|
|
38
|
+
items: {
|
|
39
|
+
media: {
|
|
40
|
+
label: 'Media',
|
|
41
|
+
uri: '/media',
|
|
42
|
+
icon: _icons.MediaLibraryIcon,
|
|
43
|
+
order: 30
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
});
|
|
31
48
|
});
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
49
|
+
app.events.once('load:custom:field:type', addFieldType => {
|
|
50
|
+
addFieldType({
|
|
51
|
+
type: 'fileUpload',
|
|
52
|
+
component: _FileUploadAdapter.default
|
|
53
|
+
});
|
|
54
|
+
addFieldType({
|
|
55
|
+
type: 'filePreview',
|
|
56
|
+
component: _FilePreviewReadOnly.default
|
|
57
|
+
});
|
|
58
|
+
addFieldType({
|
|
59
|
+
type: 'editor',
|
|
60
|
+
component: _EditorAdapter.default
|
|
61
|
+
});
|
|
36
62
|
});
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
main: {
|
|
56
|
-
items: {
|
|
57
|
-
media: {
|
|
58
|
-
label: 'Media',
|
|
59
|
-
uri: '/media',
|
|
60
|
-
icon: _icons.MediaLibraryIcon,
|
|
61
|
-
order: 30
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
});
|
|
67
|
-
app.events.once('load:custom:field:type', function (addFieldType) {
|
|
68
|
-
addFieldType({
|
|
69
|
-
type: 'fileUpload',
|
|
70
|
-
component: _FileUploadAdapter["default"]
|
|
71
|
-
});
|
|
72
|
-
addFieldType({
|
|
73
|
-
type: 'filePreview',
|
|
74
|
-
component: FilePreviewReadOnly
|
|
75
|
-
});
|
|
76
|
-
addFieldType({
|
|
77
|
-
type: 'editor',
|
|
78
|
-
component: _EditorAdapter["default"]
|
|
79
|
-
});
|
|
80
|
-
});
|
|
81
|
-
mediaRoute = {
|
|
82
|
-
path: '/media',
|
|
83
|
-
key: 'media',
|
|
84
|
-
component: MediaListing,
|
|
85
|
-
exact: true
|
|
86
|
-
};
|
|
87
|
-
editMediaFileRoute = {
|
|
88
|
-
path: '/media/edit/:fileId',
|
|
89
|
-
key: 'editMedia',
|
|
90
|
-
component: EditMediaFilePage,
|
|
91
|
-
exact: true
|
|
92
|
-
};
|
|
93
|
-
app.addRoute(mediaRoute);
|
|
94
|
-
app.addRoute(editMediaFileRoute);
|
|
95
|
-
return _context.abrupt("return", {
|
|
96
|
-
name: _constants.PLUGIN_NAME,
|
|
97
|
-
version: _package["default"].version
|
|
98
|
-
});
|
|
99
|
-
case 7:
|
|
100
|
-
case "end":
|
|
101
|
-
return _context.stop();
|
|
102
|
-
}
|
|
103
|
-
}, _callee);
|
|
104
|
-
}));
|
|
105
|
-
return _load.apply(this, arguments);
|
|
63
|
+
const mediaRoute = {
|
|
64
|
+
path: '/media',
|
|
65
|
+
key: 'media',
|
|
66
|
+
component: _MediaListing.default,
|
|
67
|
+
exact: true
|
|
68
|
+
};
|
|
69
|
+
const editMediaFileRoute = {
|
|
70
|
+
path: '/media/edit/:fileId',
|
|
71
|
+
key: 'editMedia',
|
|
72
|
+
component: _EditMediaFilePage.default,
|
|
73
|
+
exact: true
|
|
74
|
+
};
|
|
75
|
+
app.addRoute(mediaRoute);
|
|
76
|
+
app.addRoute(editMediaFileRoute);
|
|
77
|
+
return {
|
|
78
|
+
name: _constants.PLUGIN_NAME,
|
|
79
|
+
version: _package.default.version
|
|
80
|
+
};
|
|
106
81
|
}
|
|
107
82
|
load.pluginName = _constants.PLUGIN_NAME;
|
|
108
83
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["
|
|
1
|
+
{"version":3,"file":"index.js","names":["_FileUploadAdapter","_interopRequireDefault","require","_EditorAdapter","_icons","_package","_constants","_FilePreviewReadOnly","_MediaListing","_EditMediaFilePage","load","app","events","once","addConfig","main","items","media","label","uri","icon","MediaLibraryIcon","order","addFieldType","type","component","FileUploadAdapter","FilePreviewReadOnly","EditorAdapter","mediaRoute","path","key","MediaListing","exact","editMediaFileRoute","EditMediaFilePage","addRoute","name","PLUGIN_NAME","version","pkg","pluginName"],"sources":["../src/index.js"],"sourcesContent":["import FileUploadAdapter from './components/FileUploadAdapter';\nimport EditorAdapter from './components/EditorAdapter';\nimport { MediaLibraryIcon } from './icons';\nimport pkg from '../package.json';\nimport { PLUGIN_NAME } from './constants';\nimport FilePreviewReadOnly from './components/FilePreviewReadOnly';\nimport MediaListing from './components/MediaListing';\nimport EditMediaFilePage from './components/EditMediaFile/EditMediaFilePage';\n\n// todo: renable lazy loading after bundler optimisations, currently they are too slow in dev mode\n// export const FilePreviewReadOnly = React.lazy(\n// () =>\n// import(/* webpackChunkName: 'MediaFilePreviewReadOnly' */ './components/FilePreviewReadOnly')\n// );\n\n// const MediaListing = React.lazy(\n// () => import(/* webpackChunkName: 'MediaListingContainer' */ './components/MediaListing')\n// );\n\n// const EditMediaFilePage = React.lazy(\n// () =>\n// import(\n// /* webpackChunkName: 'EditMediaFilePage' */ './components/EditMediaFile/EditMediaFilePage'\n// )\n// );\nexport default async function load(app) {\n app.events.once('admin:menu:config:load', ({ addConfig }) => {\n addConfig({\n main: {\n items: {\n media: {\n label: 'Media',\n uri: '/media',\n icon: MediaLibraryIcon,\n order: 30\n }\n }\n }\n });\n });\n\n app.events.once('load:custom:field:type', addFieldType => {\n addFieldType({ type: 'fileUpload', component: FileUploadAdapter });\n addFieldType({ type: 'filePreview', component: FilePreviewReadOnly });\n addFieldType({ type: 'editor', component: EditorAdapter });\n });\n\n const mediaRoute = {\n path: '/media',\n key: 'media',\n component: MediaListing,\n exact: true\n };\n\n const editMediaFileRoute = {\n path: '/media/edit/:fileId',\n key: 'editMedia',\n component: EditMediaFilePage,\n exact: true\n };\n\n app.addRoute(mediaRoute);\n app.addRoute(editMediaFileRoute);\n\n return {\n name: PLUGIN_NAME,\n version: pkg.version\n };\n}\n\nload.pluginName = PLUGIN_NAME;\n"],"mappings":";;;;;;;AAAA,IAAAA,kBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,cAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,oBAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,aAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,kBAAA,GAAAR,sBAAA,CAAAC,OAAA;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACe,eAAeQ,IAAIA,CAACC,GAAG,EAAE;EACtCA,GAAG,CAACC,MAAM,CAACC,IAAI,CAAC,wBAAwB,EAAE,CAAC;IAAEC;EAAU,CAAC,KAAK;IAC3DA,SAAS,CAAC;MACRC,IAAI,EAAE;QACJC,KAAK,EAAE;UACLC,KAAK,EAAE;YACLC,KAAK,EAAE,OAAO;YACdC,GAAG,EAAE,QAAQ;YACbC,IAAI,EAAEC,uBAAgB;YACtBC,KAAK,EAAE;UACT;QACF;MACF;IACF,CAAC,CAAC;EACJ,CAAC,CAAC;EAEFX,GAAG,CAACC,MAAM,CAACC,IAAI,CAAC,wBAAwB,EAAEU,YAAY,IAAI;IACxDA,YAAY,CAAC;MAAEC,IAAI,EAAE,YAAY;MAAEC,SAAS,EAAEC;IAAkB,CAAC,CAAC;IAClEH,YAAY,CAAC;MAAEC,IAAI,EAAE,aAAa;MAAEC,SAAS,EAAEE;IAAoB,CAAC,CAAC;IACrEJ,YAAY,CAAC;MAAEC,IAAI,EAAE,QAAQ;MAAEC,SAAS,EAAEG;IAAc,CAAC,CAAC;EAC5D,CAAC,CAAC;EAEF,MAAMC,UAAU,GAAG;IACjBC,IAAI,EAAE,QAAQ;IACdC,GAAG,EAAE,OAAO;IACZN,SAAS,EAAEO,qBAAY;IACvBC,KAAK,EAAE;EACT,CAAC;EAED,MAAMC,kBAAkB,GAAG;IACzBJ,IAAI,EAAE,qBAAqB;IAC3BC,GAAG,EAAE,WAAW;IAChBN,SAAS,EAAEU,0BAAiB;IAC5BF,KAAK,EAAE;EACT,CAAC;EAEDtB,GAAG,CAACyB,QAAQ,CAACP,UAAU,CAAC;EACxBlB,GAAG,CAACyB,QAAQ,CAACF,kBAAkB,CAAC;EAEhC,OAAO;IACLG,IAAI,EAAEC,sBAAW;IACjBC,OAAO,EAAEC,gBAAG,CAACD;EACf,CAAC;AACH;AAEA7B,IAAI,CAAC+B,UAAU,GAAGH,sBAAW","ignoreList":[]}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("core-js/modules/es.object.define-property.js");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.availableFilters = void 0;
|
|
8
|
-
|
|
7
|
+
const availableFilters = exports.availableFilters = [{
|
|
9
8
|
label: 'All',
|
|
10
9
|
searchTerm: 'all',
|
|
11
10
|
id: 'all',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"available-filters.js","names":["availableFilters","exports","label","searchTerm","id","type","formats"],"sources":["../../../src/utils/available-filters/available-filters.js"],"sourcesContent":["const availableFilters = [\n {\n label: 'All',\n searchTerm: 'all',\n id: 'all',\n type: 'all',\n formats: [\n 'text/csv',\n 'text/plain',\n 'text/rtf',\n 'image/gif',\n 'image/jpeg',\n 'image/png',\n 'image/bmp',\n 'image/svg+xml',\n 'image/tiff',\n 'image/webp',\n 'application/pdf'\n ]\n },\n {\n label: 'Images',\n searchTerm: 'images',\n id: 'images',\n type: 'image',\n formats: [\n 'image/gif',\n 'image/jpeg',\n 'image/png',\n 'image/bmp',\n 'image/svg+xml',\n 'image/tiff',\n 'image/webp'\n ]\n },\n {\n label: 'Videos',\n searchTerm: 'videos',\n type: 'video',\n id: 'videos'\n },\n {\n label: 'Docs',\n searchTerm: 'documents',\n id: 'documents',\n type: 'text',\n formats: ['text/csv', 'text/plain', 'text/rtf', 'application/pdf']\n }\n];\n\nexport { availableFilters };\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"available-filters.js","names":["availableFilters","exports","label","searchTerm","id","type","formats"],"sources":["../../../src/utils/available-filters/available-filters.js"],"sourcesContent":["const availableFilters = [\n {\n label: 'All',\n searchTerm: 'all',\n id: 'all',\n type: 'all',\n formats: [\n 'text/csv',\n 'text/plain',\n 'text/rtf',\n 'image/gif',\n 'image/jpeg',\n 'image/png',\n 'image/bmp',\n 'image/svg+xml',\n 'image/tiff',\n 'image/webp',\n 'application/pdf'\n ]\n },\n {\n label: 'Images',\n searchTerm: 'images',\n id: 'images',\n type: 'image',\n formats: [\n 'image/gif',\n 'image/jpeg',\n 'image/png',\n 'image/bmp',\n 'image/svg+xml',\n 'image/tiff',\n 'image/webp'\n ]\n },\n {\n label: 'Videos',\n searchTerm: 'videos',\n type: 'video',\n id: 'videos'\n },\n {\n label: 'Docs',\n searchTerm: 'documents',\n id: 'documents',\n type: 'text',\n formats: ['text/csv', 'text/plain', 'text/rtf', 'application/pdf']\n }\n];\n\nexport { availableFilters };\n"],"mappings":";;;;;;AAAA,MAAMA,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,GAAG,CACvB;EACEE,KAAK,EAAE,KAAK;EACZC,UAAU,EAAE,KAAK;EACjBC,EAAE,EAAE,KAAK;EACTC,IAAI,EAAE,KAAK;EACXC,OAAO,EAAE,CACP,UAAU,EACV,YAAY,EACZ,UAAU,EACV,WAAW,EACX,YAAY,EACZ,WAAW,EACX,WAAW,EACX,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,iBAAiB;AAErB,CAAC,EACD;EACEJ,KAAK,EAAE,QAAQ;EACfC,UAAU,EAAE,QAAQ;EACpBC,EAAE,EAAE,QAAQ;EACZC,IAAI,EAAE,OAAO;EACbC,OAAO,EAAE,CACP,WAAW,EACX,YAAY,EACZ,WAAW,EACX,WAAW,EACX,eAAe,EACf,YAAY,EACZ,YAAY;AAEhB,CAAC,EACD;EACEJ,KAAK,EAAE,QAAQ;EACfC,UAAU,EAAE,QAAQ;EACpBE,IAAI,EAAE,OAAO;EACbD,EAAE,EAAE;AACN,CAAC,EACD;EACEF,KAAK,EAAE,MAAM;EACbC,UAAU,EAAE,WAAW;EACvBC,EAAE,EAAE,WAAW;EACfC,IAAI,EAAE,MAAM;EACZC,OAAO,EAAE,CAAC,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE,iBAAiB;AACnE,CAAC,CACF","ignoreList":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = bustUrl;
|
|
7
|
+
function bustUrl(url, updated) {
|
|
8
|
+
if (!url) return url;
|
|
9
|
+
const separator = url.includes('?') ? '&' : '?';
|
|
10
|
+
const version = updated || Date.now();
|
|
11
|
+
return `${url}${separator}v=${version}`;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=bustUrl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bustUrl.js","names":["bustUrl","url","updated","separator","includes","version","Date","now"],"sources":["../../src/utils/bustUrl.js"],"sourcesContent":["export default function bustUrl(url, updated) {\n if (!url) return url;\n const separator = url.includes('?') ? '&' : '?';\n const version = updated || Date.now();\n return `${url}${separator}v=${version}`;\n}\n"],"mappings":";;;;;;AAAe,SAASA,OAAOA,CAACC,GAAG,EAAEC,OAAO,EAAE;EAC5C,IAAI,CAACD,GAAG,EAAE,OAAOA,GAAG;EACpB,MAAME,SAAS,GAAGF,GAAG,CAACG,QAAQ,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG;EAC/C,MAAMC,OAAO,GAAGH,OAAO,IAAII,IAAI,CAACC,GAAG,CAAC,CAAC;EACrC,OAAO,GAAGN,GAAG,GAAGE,SAAS,KAAKE,OAAO,EAAE;AACzC","ignoreList":[]}
|
|
@@ -1,30 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("core-js/modules/es.object.define-property.js");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
Object.defineProperty(exports, "MediaContext", {
|
|
8
7
|
enumerable: true,
|
|
9
|
-
get: function
|
|
8
|
+
get: function () {
|
|
10
9
|
return _mediaContext.MediaContext;
|
|
11
10
|
}
|
|
12
11
|
});
|
|
13
12
|
Object.defineProperty(exports, "MediaContextConsumer", {
|
|
14
13
|
enumerable: true,
|
|
15
|
-
get: function
|
|
14
|
+
get: function () {
|
|
16
15
|
return _mediaContext.MediaContextConsumer;
|
|
17
16
|
}
|
|
18
17
|
});
|
|
19
18
|
Object.defineProperty(exports, "MediaContextProvider", {
|
|
20
19
|
enumerable: true,
|
|
21
|
-
get: function
|
|
20
|
+
get: function () {
|
|
22
21
|
return _mediaContext.MediaContextProvider;
|
|
23
22
|
}
|
|
24
23
|
});
|
|
25
24
|
Object.defineProperty(exports, "useMediaContext", {
|
|
26
25
|
enumerable: true,
|
|
27
|
-
get: function
|
|
26
|
+
get: function () {
|
|
28
27
|
return _useMediaContext.useMediaContext;
|
|
29
28
|
}
|
|
30
29
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_mediaContext","require","_useMediaContext"],"sources":["../../../src/utils/media-context/index.js"],"sourcesContent":["import { MediaContext, MediaContextProvider, MediaContextConsumer } from './media-context';\nimport { useMediaContext } from './useMediaContext';\n\nexport { MediaContext, MediaContextProvider, MediaContextConsumer, useMediaContext };\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["_mediaContext","require","_useMediaContext"],"sources":["../../../src/utils/media-context/index.js"],"sourcesContent":["import { MediaContext, MediaContextProvider, MediaContextConsumer } from './media-context';\nimport { useMediaContext } from './useMediaContext';\n\nexport { MediaContext, MediaContextProvider, MediaContextConsumer, useMediaContext };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA","ignoreList":[]}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("core-js/modules/es.object.define-property.js");
|
|
4
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.MediaContextProvider = exports.MediaContextConsumer = exports.MediaContext = void 0;
|
|
9
8
|
var _react = _interopRequireDefault(require("react"));
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
const MediaContext = exports.MediaContext = /*#__PURE__*/_react.default.createContext({});
|
|
10
|
+
const MediaContextProvider = exports.MediaContextProvider = MediaContext.Provider;
|
|
11
|
+
const MediaContextConsumer = exports.MediaContextConsumer = MediaContext.Consumer;
|
|
13
12
|
//# sourceMappingURL=media-context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media-context.js","names":["_react","_interopRequireDefault","require","MediaContext","exports","React","createContext","MediaContextProvider","Provider","MediaContextConsumer","Consumer"],"sources":["../../../src/utils/media-context/media-context.js"],"sourcesContent":["import React from 'react';\n\nconst MediaContext = React.createContext({});\nconst MediaContextProvider = MediaContext.Provider;\nconst MediaContextConsumer = MediaContext.Consumer;\n\nexport { MediaContext, MediaContextProvider, MediaContextConsumer };\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"media-context.js","names":["_react","_interopRequireDefault","require","MediaContext","exports","React","createContext","MediaContextProvider","Provider","MediaContextConsumer","Consumer"],"sources":["../../../src/utils/media-context/media-context.js"],"sourcesContent":["import React from 'react';\n\nconst MediaContext = React.createContext({});\nconst MediaContextProvider = MediaContext.Provider;\nconst MediaContextConsumer = MediaContext.Consumer;\n\nexport { MediaContext, MediaContextProvider, MediaContextConsumer };\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,MAAMC,YAAY,GAAAC,OAAA,CAAAD,YAAA,gBAAGE,cAAK,CAACC,aAAa,CAAC,CAAC,CAAC,CAAC;AAC5C,MAAMC,oBAAoB,GAAAH,OAAA,CAAAG,oBAAA,GAAGJ,YAAY,CAACK,QAAQ;AAClD,MAAMC,oBAAoB,GAAAL,OAAA,CAAAK,oBAAA,GAAGN,YAAY,CAACO,QAAQ","ignoreList":[]}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("core-js/modules/es.object.define-property.js");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.useMediaContext = void 0;
|
|
8
7
|
var _react = require("react");
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
};
|
|
8
|
+
const useMediaContext = ctx => (0, _react.useContext)(ctx);
|
|
9
|
+
exports.useMediaContext = useMediaContext;
|
|
12
10
|
//# sourceMappingURL=useMediaContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMediaContext.js","names":["_react","require","useMediaContext","
|
|
1
|
+
{"version":3,"file":"useMediaContext.js","names":["_react","require","useMediaContext","ctx","useContext","exports"],"sources":["../../../src/utils/media-context/useMediaContext.js"],"sourcesContent":["import { useContext } from 'react';\n\nconst useMediaContext = ctx => useContext(ctx);\n\nexport { useMediaContext };\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,MAAMC,eAAe,GAAGC,GAAG,IAAI,IAAAC,iBAAU,EAACD,GAAG,CAAC;AAACE,OAAA,CAAAH,eAAA,GAAAA,eAAA","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blaze-cms/plugin-media-ui",
|
|
3
|
-
"version": "0.146.0-
|
|
3
|
+
"version": "0.146.0-rc-eagle.0",
|
|
4
4
|
"description": "Blaze plugin media ui",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib-es/index.js",
|
|
7
|
-
"
|
|
7
|
+
"source": "src/index.js",
|
|
8
8
|
"directories": {
|
|
9
9
|
"src": "src/"
|
|
10
10
|
},
|
|
@@ -27,37 +27,37 @@
|
|
|
27
27
|
},
|
|
28
28
|
"license": "GPL-3.0",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@blaze-cms/admin-ui-utils": "0.146.0-
|
|
31
|
-
"@blaze-cms/core-errors": "0.146.0-
|
|
32
|
-
"@blaze-cms/plugin-search-ui": "0.146.0-
|
|
33
|
-
"@blaze-cms/react-form-builder": "0.146.0-
|
|
34
|
-
"@blaze-cms/setup-ui": "0.146.0-
|
|
30
|
+
"@blaze-cms/admin-ui-utils": "0.146.0-rc-eagle.0",
|
|
31
|
+
"@blaze-cms/core-errors": "0.146.0-rc-eagle.0",
|
|
32
|
+
"@blaze-cms/plugin-search-ui": "0.146.0-rc-eagle.0",
|
|
33
|
+
"@blaze-cms/react-form-builder": "0.146.0-rc-eagle.0",
|
|
34
|
+
"@blaze-cms/setup-ui": "0.146.0-rc-eagle.0",
|
|
35
35
|
"@blaze-react/button": "0.8.0-alpha.82",
|
|
36
36
|
"@blaze-react/dnd": "^0.7.0",
|
|
37
37
|
"@blaze-react/drafteditor": "0.7.0",
|
|
38
|
-
"@blaze-react/file-upload": "0.8.0-alpha.
|
|
38
|
+
"@blaze-react/file-upload": "0.8.0-alpha.109",
|
|
39
39
|
"@blaze-react/modal": "0.5.19",
|
|
40
40
|
"@blaze-react/more": "0.5.19",
|
|
41
|
-
"@blaze-react/select": "
|
|
41
|
+
"@blaze-react/select": "0.8.0-alpha.100",
|
|
42
42
|
"@blaze-react/toaster": "^0.7.0",
|
|
43
|
+
"@blaze-react/tooltip": "0.8.0-alpha.100",
|
|
43
44
|
"classnames": "^2.2.6",
|
|
44
45
|
"lodash.differencewith": "^4.5.0",
|
|
45
46
|
"lodash.isequal": "^4.5.0",
|
|
46
47
|
"react-tiny-virtual-list": "2.2.0"
|
|
47
48
|
},
|
|
48
49
|
"devDependencies": {
|
|
49
|
-
"@blaze-cms/core-ui": "0.146.0-
|
|
50
|
+
"@blaze-cms/core-ui": "0.146.0-rc-eagle.0"
|
|
50
51
|
},
|
|
51
52
|
"peerDependencies": {
|
|
52
53
|
"@apollo/client": "3.x",
|
|
53
|
-
"@blaze-cms/admin": "^0.
|
|
54
|
+
"@blaze-cms/admin": "^0.145.0",
|
|
54
55
|
"prop-types": "^15.7.2",
|
|
55
|
-
"react": "
|
|
56
|
+
"react": ">= 18",
|
|
56
57
|
"react-router-dom": "^5.0.1"
|
|
57
58
|
},
|
|
58
59
|
"eslintIgnore": [
|
|
59
60
|
"lib/*",
|
|
60
61
|
"lib-es/*"
|
|
61
|
-
]
|
|
62
|
-
"gitHead": "1b5ba49d185e912846cec402d39a44ef2623ca1c"
|
|
62
|
+
]
|
|
63
63
|
}
|
|
@@ -11,6 +11,7 @@ import Modal from '@blaze-react/modal';
|
|
|
11
11
|
import { createPortal } from 'react-dom';
|
|
12
12
|
import { Link } from 'react-router-dom';
|
|
13
13
|
import EditMediaFile from '../EditMediaFile';
|
|
14
|
+
import bustUrl from '../../utils/bustUrl';
|
|
14
15
|
|
|
15
16
|
const CardMedia = ({
|
|
16
17
|
onSelected,
|
|
@@ -21,10 +22,12 @@ const CardMedia = ({
|
|
|
21
22
|
selected,
|
|
22
23
|
displayLayout,
|
|
23
24
|
data,
|
|
25
|
+
updated,
|
|
24
26
|
modalTargetRef,
|
|
25
27
|
updateFile,
|
|
26
28
|
removeFile,
|
|
27
|
-
index
|
|
29
|
+
index,
|
|
30
|
+
openEditInModal
|
|
28
31
|
}) => {
|
|
29
32
|
const [displayDeleteModal, setDisplayDeleteModal] = useState(false);
|
|
30
33
|
const [displayEditModal, setDisplayEditModal] = useState(false);
|
|
@@ -82,7 +85,7 @@ const CardMedia = ({
|
|
|
82
85
|
modifiers: ['cancel']
|
|
83
86
|
},
|
|
84
87
|
{
|
|
85
|
-
textButton: '
|
|
88
|
+
textButton: 'Apply',
|
|
86
89
|
callback: () => handleFormSave(),
|
|
87
90
|
modifiers: enableSaveButton ? [] : ['disabled']
|
|
88
91
|
}
|
|
@@ -152,7 +155,7 @@ const CardMedia = ({
|
|
|
152
155
|
|
|
153
156
|
{type === 'image' ? (
|
|
154
157
|
<div className={`card__image card__image--media-${displayLayout}`}>
|
|
155
|
-
<img src={url} alt={name} />
|
|
158
|
+
<img src={bustUrl(url, updated)} alt={name} />
|
|
156
159
|
</div>
|
|
157
160
|
) : (
|
|
158
161
|
<div className="card__image card__image--media-list-document">
|
|
@@ -178,9 +181,21 @@ const CardMedia = ({
|
|
|
178
181
|
<span className="material-icons">more_vert</span>
|
|
179
182
|
</More.Avatar>
|
|
180
183
|
<More.Content isMoreMenu>
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
+
{openEditInModal ? (
|
|
185
|
+
<Button
|
|
186
|
+
onClick={event => {
|
|
187
|
+
event.preventDefault();
|
|
188
|
+
event.stopPropagation();
|
|
189
|
+
setDisplayEditModal(true);
|
|
190
|
+
}}
|
|
191
|
+
className="more-menu__link">
|
|
192
|
+
Edit
|
|
193
|
+
</Button>
|
|
194
|
+
) : (
|
|
195
|
+
<Link to={`/media/edit/${id}`} className="more-menu__link">
|
|
196
|
+
Edit
|
|
197
|
+
</Link>
|
|
198
|
+
)}
|
|
184
199
|
<Button
|
|
185
200
|
onClick={event => {
|
|
186
201
|
event.preventDefault();
|
|
@@ -207,18 +222,22 @@ CardMedia.propTypes = {
|
|
|
207
222
|
mimetype: PropTypes.string.isRequired,
|
|
208
223
|
displayLayout: PropTypes.string.isRequired,
|
|
209
224
|
data: PropTypes.object,
|
|
225
|
+
updated: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
210
226
|
onSelected: PropTypes.func,
|
|
211
227
|
updateFile: PropTypes.func.isRequired,
|
|
212
228
|
removeFile: PropTypes.func.isRequired,
|
|
213
229
|
selected: PropTypes.bool,
|
|
214
230
|
modalTargetRef: PropTypes.object.isRequired,
|
|
215
|
-
index: PropTypes.number.isRequired
|
|
231
|
+
index: PropTypes.number.isRequired,
|
|
232
|
+
openEditInModal: PropTypes.bool
|
|
216
233
|
};
|
|
217
234
|
|
|
218
235
|
CardMedia.defaultProps = {
|
|
219
236
|
onSelected: () => {},
|
|
220
237
|
selected: false,
|
|
221
|
-
data: {}
|
|
238
|
+
data: {},
|
|
239
|
+
updated: null,
|
|
240
|
+
openEditInModal: false
|
|
222
241
|
};
|
|
223
242
|
|
|
224
243
|
export default CardMedia;
|