@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,40 +1,38 @@
|
|
|
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.RawImage = void 0;
|
|
9
|
-
require("core-js/modules/es.function.name.js");
|
|
10
8
|
var _react = _interopRequireDefault(require("react"));
|
|
11
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
10
|
var _Actions = _interopRequireDefault(require("../Actions"));
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
11
|
+
const RawImage = ({
|
|
12
|
+
url,
|
|
13
|
+
name,
|
|
14
|
+
file
|
|
15
|
+
}) => /*#__PURE__*/_react.default.createElement("div", {
|
|
16
|
+
className: "FilePreview"
|
|
17
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
18
|
+
className: "FilePreviewItem"
|
|
19
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
20
|
+
className: "FilePreviewItem__wrapper"
|
|
21
|
+
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
22
|
+
className: "FilePreviewItem__wrapper__image",
|
|
23
|
+
src: url,
|
|
24
|
+
alt: name
|
|
25
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
26
|
+
className: "FilePreviewItem__info"
|
|
27
|
+
}, /*#__PURE__*/_react.default.createElement("p", {
|
|
28
|
+
className: "FilePreviewItem__info__fileName"
|
|
29
|
+
}, name), /*#__PURE__*/_react.default.createElement(_Actions.default, {
|
|
30
|
+
file: file
|
|
31
|
+
}))));
|
|
32
|
+
exports.RawImage = RawImage;
|
|
35
33
|
RawImage.propTypes = {
|
|
36
|
-
url: _propTypes
|
|
37
|
-
name: _propTypes
|
|
38
|
-
file: _propTypes
|
|
34
|
+
url: _propTypes.default.string.isRequired,
|
|
35
|
+
name: _propTypes.default.string.isRequired,
|
|
36
|
+
file: _propTypes.default.object.isRequired
|
|
39
37
|
};
|
|
40
38
|
//# sourceMappingURL=RawImage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RawImage.js","names":["_react","_interopRequireDefault","require","_propTypes","_Actions","RawImage","
|
|
1
|
+
{"version":3,"file":"RawImage.js","names":["_react","_interopRequireDefault","require","_propTypes","_Actions","RawImage","url","name","file","default","createElement","className","src","alt","exports","propTypes","PropTypes","string","isRequired","object"],"sources":["../../../../src/components/FilePreview/Image/RawImage.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport Actions from '../Actions';\n\nconst RawImage = ({ url, name, file }) => (\n <div className=\"FilePreview\">\n <div className=\"FilePreviewItem\">\n <div className=\"FilePreviewItem__wrapper\">\n <img className=\"FilePreviewItem__wrapper__image\" src={url} alt={name} />\n </div>\n <div className=\"FilePreviewItem__info\">\n <p className=\"FilePreviewItem__info__fileName\">{name}</p>\n <Actions file={file} />\n </div>\n </div>\n </div>\n);\n\nRawImage.propTypes = {\n url: PropTypes.string.isRequired,\n name: PropTypes.string.isRequired,\n file: PropTypes.object.isRequired\n};\n\nexport { RawImage };\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,QAAA,GAAAH,sBAAA,CAAAC,OAAA;AAEA,MAAMG,QAAQ,GAAGA,CAAC;EAAEC,GAAG;EAAEC,IAAI;EAAEC;AAAK,CAAC,kBACnCR,MAAA,CAAAS,OAAA,CAAAC,aAAA;EAAKC,SAAS,EAAC;AAAa,gBAC1BX,MAAA,CAAAS,OAAA,CAAAC,aAAA;EAAKC,SAAS,EAAC;AAAiB,gBAC9BX,MAAA,CAAAS,OAAA,CAAAC,aAAA;EAAKC,SAAS,EAAC;AAA0B,gBACvCX,MAAA,CAAAS,OAAA,CAAAC,aAAA;EAAKC,SAAS,EAAC,iCAAiC;EAACC,GAAG,EAAEN,GAAI;EAACO,GAAG,EAAEN;AAAK,CAAE,CACpE,CAAC,eACNP,MAAA,CAAAS,OAAA,CAAAC,aAAA;EAAKC,SAAS,EAAC;AAAuB,gBACpCX,MAAA,CAAAS,OAAA,CAAAC,aAAA;EAAGC,SAAS,EAAC;AAAiC,GAAEJ,IAAQ,CAAC,eACzDP,MAAA,CAAAS,OAAA,CAAAC,aAAA,CAACN,QAAA,CAAAK,OAAO;EAACD,IAAI,EAAEA;AAAK,CAAE,CACnB,CACF,CACF,CACN;AAACM,OAAA,CAAAT,QAAA,GAAAA,QAAA;AAEFA,QAAQ,CAACU,SAAS,GAAG;EACnBT,GAAG,EAAEU,kBAAS,CAACC,MAAM,CAACC,UAAU;EAChCX,IAAI,EAAES,kBAAS,CAACC,MAAM,CAACC,UAAU;EACjCV,IAAI,EAAEQ,kBAAS,CAACG,MAAM,CAACD;AACzB,CAAC","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.imageSchema = void 0;
|
|
8
|
-
|
|
7
|
+
const imageSchema = exports.imageSchema = {
|
|
9
8
|
settings: {},
|
|
10
9
|
formSchema: {
|
|
11
10
|
properties: {
|
|
@@ -47,7 +46,7 @@ var imageSchema = exports.imageSchema = {
|
|
|
47
46
|
hrefUrl: {
|
|
48
47
|
type: 'string',
|
|
49
48
|
format: 'uri-template',
|
|
50
|
-
label: '
|
|
49
|
+
label: 'Image hyperlink',
|
|
51
50
|
showInForm: true,
|
|
52
51
|
formFieldType: 'text',
|
|
53
52
|
description: 'Url format is not valid'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"imageSchema.js","names":["imageSchema","exports","settings","formSchema","properties","name","type","showInForm","label","formFieldType","formPriority","storeKey","description","options","altText","caption","credits","hrefUrl","format","required"],"sources":["../../../../src/components/FilePreview/Image/imageSchema.js"],"sourcesContent":["const imageSchema = {\n settings: {},\n formSchema: {\n properties: {\n name: {\n type: 'string',\n showInForm: true,\n label: 'File name',\n formFieldType: 'text',\n formPriority: 1.0\n },\n storeKey: {\n type: 'string',\n showInForm: true,\n label: 'Store type',\n formFieldType: 'select',\n formPriority: 2.0,\n description: 'Please select store type',\n options: []\n },\n altText: {\n type: 'string',\n showInForm: true,\n label: 'Alt text',\n formFieldType: 'text',\n formPriority: 3.0\n },\n caption: {\n type: 'string',\n showInForm: true,\n formFieldType: 'text',\n formPriority: 4.0\n },\n credits: {\n type: 'string',\n showInForm: true,\n formFieldType: 'text',\n formPriority: 5.0\n },\n hrefUrl: {\n type: 'string',\n format: 'uri-template',\n label: '
|
|
1
|
+
{"version":3,"file":"imageSchema.js","names":["imageSchema","exports","settings","formSchema","properties","name","type","showInForm","label","formFieldType","formPriority","storeKey","description","options","altText","caption","credits","hrefUrl","format","required"],"sources":["../../../../src/components/FilePreview/Image/imageSchema.js"],"sourcesContent":["const imageSchema = {\n settings: {},\n formSchema: {\n properties: {\n name: {\n type: 'string',\n showInForm: true,\n label: 'File name',\n formFieldType: 'text',\n formPriority: 1.0\n },\n storeKey: {\n type: 'string',\n showInForm: true,\n label: 'Store type',\n formFieldType: 'select',\n formPriority: 2.0,\n description: 'Please select store type',\n options: []\n },\n altText: {\n type: 'string',\n showInForm: true,\n label: 'Alt text',\n formFieldType: 'text',\n formPriority: 3.0\n },\n caption: {\n type: 'string',\n showInForm: true,\n formFieldType: 'text',\n formPriority: 4.0\n },\n credits: {\n type: 'string',\n showInForm: true,\n formFieldType: 'text',\n formPriority: 5.0\n },\n hrefUrl: {\n type: 'string',\n format: 'uri-template',\n label: 'Image hyperlink',\n showInForm: true,\n formFieldType: 'text',\n description: 'Url format is not valid'\n }\n },\n required: ['name']\n }\n};\n\nexport { imageSchema };\n"],"mappings":";;;;;;AAAA,MAAMA,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAG;EAClBE,QAAQ,EAAE,CAAC,CAAC;EACZC,UAAU,EAAE;IACVC,UAAU,EAAE;MACVC,IAAI,EAAE;QACJC,IAAI,EAAE,QAAQ;QACdC,UAAU,EAAE,IAAI;QAChBC,KAAK,EAAE,WAAW;QAClBC,aAAa,EAAE,MAAM;QACrBC,YAAY,EAAE;MAChB,CAAC;MACDC,QAAQ,EAAE;QACRL,IAAI,EAAE,QAAQ;QACdC,UAAU,EAAE,IAAI;QAChBC,KAAK,EAAE,YAAY;QACnBC,aAAa,EAAE,QAAQ;QACvBC,YAAY,EAAE,GAAG;QACjBE,WAAW,EAAE,0BAA0B;QACvCC,OAAO,EAAE;MACX,CAAC;MACDC,OAAO,EAAE;QACPR,IAAI,EAAE,QAAQ;QACdC,UAAU,EAAE,IAAI;QAChBC,KAAK,EAAE,UAAU;QACjBC,aAAa,EAAE,MAAM;QACrBC,YAAY,EAAE;MAChB,CAAC;MACDK,OAAO,EAAE;QACPT,IAAI,EAAE,QAAQ;QACdC,UAAU,EAAE,IAAI;QAChBE,aAAa,EAAE,MAAM;QACrBC,YAAY,EAAE;MAChB,CAAC;MACDM,OAAO,EAAE;QACPV,IAAI,EAAE,QAAQ;QACdC,UAAU,EAAE,IAAI;QAChBE,aAAa,EAAE,MAAM;QACrBC,YAAY,EAAE;MAChB,CAAC;MACDO,OAAO,EAAE;QACPX,IAAI,EAAE,QAAQ;QACdY,MAAM,EAAE,cAAc;QACtBV,KAAK,EAAE,iBAAiB;QACxBD,UAAU,EAAE,IAAI;QAChBE,aAAa,EAAE,MAAM;QACrBG,WAAW,EAAE;MACf;IACF,CAAC;IACDO,QAAQ,EAAE,CAAC,MAAM;EACnB;AACF,CAAC","ignoreList":[]}
|
|
@@ -1,6 +1,5 @@
|
|
|
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
|
});
|
|
@@ -8,7 +7,7 @@ exports.image = void 0;
|
|
|
8
7
|
var _RawImage = require("./RawImage");
|
|
9
8
|
var _Image = require("./Image");
|
|
10
9
|
var _imageSchema = require("./imageSchema");
|
|
11
|
-
|
|
10
|
+
const image = exports.image = {
|
|
12
11
|
component: {
|
|
13
12
|
card: _Image.Image,
|
|
14
13
|
raw: _RawImage.RawImage
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_RawImage","require","_Image","_imageSchema","image","exports","component","card","Image","raw","RawImage","schema","imageSchema"],"sources":["../../../../src/components/FilePreview/Image/index.js"],"sourcesContent":["import { RawImage } from './RawImage';\nimport { Image } from './Image';\nimport { imageSchema } from './imageSchema';\n\nconst image = {\n component: {\n card: Image,\n raw: RawImage\n },\n schema: imageSchema\n};\nexport { image };\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["_RawImage","require","_Image","_imageSchema","image","exports","component","card","Image","raw","RawImage","schema","imageSchema"],"sources":["../../../../src/components/FilePreview/Image/index.js"],"sourcesContent":["import { RawImage } from './RawImage';\nimport { Image } from './Image';\nimport { imageSchema } from './imageSchema';\n\nconst image = {\n component: {\n card: Image,\n raw: RawImage\n },\n schema: imageSchema\n};\nexport { image };\n"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAEA,MAAMG,KAAK,GAAAC,OAAA,CAAAD,KAAA,GAAG;EACZE,SAAS,EAAE;IACTC,IAAI,EAAEC,YAAK;IACXC,GAAG,EAAEC;EACP,CAAC;EACDC,MAAM,EAAEC;AACV,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ModalContext = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
const ModalContext = exports.ModalContext = /*#__PURE__*/(0, _react.createContext)(false);
|
|
9
|
+
//# sourceMappingURL=ModalContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModalContext.js","names":["_react","require","ModalContext","exports","createContext"],"sources":["../../../src/components/FilePreview/ModalContext.js"],"sourcesContent":["import { createContext } from 'react';\n\nexport const ModalContext = createContext(false);\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEO,MAAMC,YAAY,GAAAC,OAAA,CAAAD,YAAA,gBAAG,IAAAE,oBAAa,EAAC,KAAK,CAAC","ignoreList":[]}
|
|
@@ -1,43 +1,56 @@
|
|
|
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.PDF = void 0;
|
|
9
|
-
require("core-js/modules/es.function.name.js");
|
|
10
8
|
var _react = _interopRequireDefault(require("react"));
|
|
11
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
10
|
+
var _button = _interopRequireDefault(require("@blaze-react/button"));
|
|
11
|
+
const PDF = ({
|
|
12
|
+
mimetype,
|
|
13
|
+
url,
|
|
14
|
+
name,
|
|
15
|
+
children,
|
|
16
|
+
handleChangeFile,
|
|
17
|
+
showChangeButton
|
|
18
|
+
}) => /*#__PURE__*/_react.default.createElement("div", {
|
|
19
|
+
className: "preview",
|
|
20
|
+
key: `pdf-${url}`
|
|
21
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
22
|
+
className: "preview__file preview__file--pdf"
|
|
23
|
+
}, /*#__PURE__*/_react.default.createElement("object", {
|
|
24
|
+
key: url,
|
|
25
|
+
data: url,
|
|
26
|
+
type: mimetype,
|
|
27
|
+
className: "preview__file--pdf"
|
|
28
|
+
}, /*#__PURE__*/_react.default.createElement("p", null, /*#__PURE__*/_react.default.createElement("a", {
|
|
29
|
+
href: url,
|
|
30
|
+
rel: "noopener noreferrer",
|
|
31
|
+
target: "_blank"
|
|
32
|
+
}, "Download ", name))), /*#__PURE__*/_react.default.createElement("div", {
|
|
33
|
+
className: "preview__details preview__details--file"
|
|
34
|
+
}, /*#__PURE__*/_react.default.createElement("p", null, /*#__PURE__*/_react.default.createElement("strong", null, "File details"), /*#__PURE__*/_react.default.createElement("a", {
|
|
35
|
+
href: url,
|
|
36
|
+
rel: "noopener noreferrer",
|
|
37
|
+
target: "_blank"
|
|
38
|
+
}, "Original")), showChangeButton && /*#__PURE__*/_react.default.createElement("div", {
|
|
39
|
+
className: "preview__change-button"
|
|
40
|
+
}, /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
41
|
+
onClick: handleChangeFile
|
|
42
|
+
}, "Change file")))), children);
|
|
43
|
+
exports.PDF = PDF;
|
|
37
44
|
PDF.propTypes = {
|
|
38
|
-
mimetype: _propTypes
|
|
39
|
-
url: _propTypes
|
|
40
|
-
name: _propTypes
|
|
41
|
-
children: _propTypes
|
|
45
|
+
mimetype: _propTypes.default.string.isRequired,
|
|
46
|
+
url: _propTypes.default.string.isRequired,
|
|
47
|
+
name: _propTypes.default.string.isRequired,
|
|
48
|
+
children: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.node), _propTypes.default.node]).isRequired,
|
|
49
|
+
handleChangeFile: _propTypes.default.func,
|
|
50
|
+
showChangeButton: _propTypes.default.bool
|
|
51
|
+
};
|
|
52
|
+
PDF.defaultProps = {
|
|
53
|
+
handleChangeFile: () => {},
|
|
54
|
+
showChangeButton: false
|
|
42
55
|
};
|
|
43
56
|
//# sourceMappingURL=PDF.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PDF.js","names":["_react","_interopRequireDefault","require","_propTypes","
|
|
1
|
+
{"version":3,"file":"PDF.js","names":["_react","_interopRequireDefault","require","_propTypes","_button","PDF","mimetype","url","name","children","handleChangeFile","showChangeButton","default","createElement","className","key","data","type","href","rel","target","onClick","exports","propTypes","PropTypes","string","isRequired","oneOfType","arrayOf","node","func","bool","defaultProps"],"sources":["../../../../src/components/FilePreview/PDF/PDF.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport Button from '@blaze-react/button';\n\nconst PDF = ({ mimetype, url, name, children, handleChangeFile, showChangeButton }) => (\n <div className=\"preview\" key={`pdf-${url}`}>\n <div className=\"preview__file preview__file--pdf\">\n <object key={url} data={url} type={mimetype} className=\"preview__file--pdf\">\n <p>\n <a href={url} rel=\"noopener noreferrer\" target=\"_blank\">\n Download {name}\n </a>\n </p>\n </object>\n <div className=\"preview__details preview__details--file\">\n <p>\n <strong>File details</strong>\n <a href={url} rel=\"noopener noreferrer\" target=\"_blank\">\n Original\n </a>\n </p>\n {showChangeButton && (\n <div className=\"preview__change-button\">\n <Button onClick={handleChangeFile}>Change file</Button>\n </div>\n )}\n </div>\n </div>\n {children}\n </div>\n);\n\nPDF.propTypes = {\n mimetype: PropTypes.string.isRequired,\n url: PropTypes.string.isRequired,\n name: PropTypes.string.isRequired,\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired,\n handleChangeFile: PropTypes.func,\n showChangeButton: PropTypes.bool\n};\n\nPDF.defaultProps = {\n handleChangeFile: () => {},\n showChangeButton: false\n};\n\nexport { PDF };\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,OAAA,GAAAH,sBAAA,CAAAC,OAAA;AAEA,MAAMG,GAAG,GAAGA,CAAC;EAAEC,QAAQ;EAAEC,GAAG;EAAEC,IAAI;EAAEC,QAAQ;EAAEC,gBAAgB;EAAEC;AAAiB,CAAC,kBAChFX,MAAA,CAAAY,OAAA,CAAAC,aAAA;EAAKC,SAAS,EAAC,SAAS;EAACC,GAAG,EAAE,OAAOR,GAAG;AAAG,gBACzCP,MAAA,CAAAY,OAAA,CAAAC,aAAA;EAAKC,SAAS,EAAC;AAAkC,gBAC/Cd,MAAA,CAAAY,OAAA,CAAAC,aAAA;EAAQE,GAAG,EAAER,GAAI;EAACS,IAAI,EAAET,GAAI;EAACU,IAAI,EAAEX,QAAS;EAACQ,SAAS,EAAC;AAAoB,gBACzEd,MAAA,CAAAY,OAAA,CAAAC,aAAA,yBACEb,MAAA,CAAAY,OAAA,CAAAC,aAAA;EAAGK,IAAI,EAAEX,GAAI;EAACY,GAAG,EAAC,qBAAqB;EAACC,MAAM,EAAC;AAAQ,GAAC,WAC7C,EAACZ,IACT,CACF,CACG,CAAC,eACTR,MAAA,CAAAY,OAAA,CAAAC,aAAA;EAAKC,SAAS,EAAC;AAAyC,gBACtDd,MAAA,CAAAY,OAAA,CAAAC,aAAA,yBACEb,MAAA,CAAAY,OAAA,CAAAC,aAAA,iBAAQ,cAAoB,CAAC,eAC7Bb,MAAA,CAAAY,OAAA,CAAAC,aAAA;EAAGK,IAAI,EAAEX,GAAI;EAACY,GAAG,EAAC,qBAAqB;EAACC,MAAM,EAAC;AAAQ,GAAC,UAErD,CACF,CAAC,EACHT,gBAAgB,iBACfX,MAAA,CAAAY,OAAA,CAAAC,aAAA;EAAKC,SAAS,EAAC;AAAwB,gBACrCd,MAAA,CAAAY,OAAA,CAAAC,aAAA,CAACT,OAAA,CAAAQ,OAAM;EAACS,OAAO,EAAEX;AAAiB,GAAC,aAAmB,CACnD,CAEJ,CACF,CAAC,EACLD,QACE,CACN;AAACa,OAAA,CAAAjB,GAAA,GAAAA,GAAA;AAEFA,GAAG,CAACkB,SAAS,GAAG;EACdjB,QAAQ,EAAEkB,kBAAS,CAACC,MAAM,CAACC,UAAU;EACrCnB,GAAG,EAAEiB,kBAAS,CAACC,MAAM,CAACC,UAAU;EAChClB,IAAI,EAAEgB,kBAAS,CAACC,MAAM,CAACC,UAAU;EACjCjB,QAAQ,EAAEe,kBAAS,CAACG,SAAS,CAAC,CAACH,kBAAS,CAACI,OAAO,CAACJ,kBAAS,CAACK,IAAI,CAAC,EAAEL,kBAAS,CAACK,IAAI,CAAC,CAAC,CAACH,UAAU;EAC7FhB,gBAAgB,EAAEc,kBAAS,CAACM,IAAI;EAChCnB,gBAAgB,EAAEa,kBAAS,CAACO;AAC9B,CAAC;AAED1B,GAAG,CAAC2B,YAAY,GAAG;EACjBtB,gBAAgB,EAAEA,CAAA,KAAM,CAAC,CAAC;EAC1BC,gBAAgB,EAAE;AACpB,CAAC","ignoreList":[]}
|
|
@@ -1,42 +1,40 @@
|
|
|
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.RawPDF = void 0;
|
|
9
|
-
require("core-js/modules/es.function.name.js");
|
|
10
8
|
var _react = _interopRequireDefault(require("react"));
|
|
11
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
10
|
var _Actions = _interopRequireDefault(require("../Actions"));
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
11
|
+
const RawPDF = ({
|
|
12
|
+
mimetype,
|
|
13
|
+
url,
|
|
14
|
+
name,
|
|
15
|
+
file
|
|
16
|
+
}) => /*#__PURE__*/_react.default.createElement("div", {
|
|
17
|
+
className: "FilePreview"
|
|
18
|
+
}, /*#__PURE__*/_react.default.createElement("object", {
|
|
19
|
+
data: url,
|
|
20
|
+
type: mimetype,
|
|
21
|
+
className: "preview__file--pdf"
|
|
22
|
+
}, /*#__PURE__*/_react.default.createElement("p", null, /*#__PURE__*/_react.default.createElement("a", {
|
|
23
|
+
href: url,
|
|
24
|
+
rel: "noopener noreferrer",
|
|
25
|
+
target: "_blank"
|
|
26
|
+
}, "Download ", name))), /*#__PURE__*/_react.default.createElement("div", {
|
|
27
|
+
className: "FilePreviewItem__info"
|
|
28
|
+
}, /*#__PURE__*/_react.default.createElement("p", {
|
|
29
|
+
className: "FilePreviewItem__info__fileName"
|
|
30
|
+
}, name), /*#__PURE__*/_react.default.createElement(_Actions.default, {
|
|
31
|
+
file: file
|
|
32
|
+
})));
|
|
33
|
+
exports.RawPDF = RawPDF;
|
|
36
34
|
RawPDF.propTypes = {
|
|
37
|
-
mimetype: _propTypes
|
|
38
|
-
url: _propTypes
|
|
39
|
-
name: _propTypes
|
|
40
|
-
file: _propTypes
|
|
35
|
+
mimetype: _propTypes.default.string.isRequired,
|
|
36
|
+
url: _propTypes.default.string.isRequired,
|
|
37
|
+
name: _propTypes.default.string.isRequired,
|
|
38
|
+
file: _propTypes.default.object.isRequired
|
|
41
39
|
};
|
|
42
40
|
//# sourceMappingURL=RawPDF.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RawPDF.js","names":["_react","_interopRequireDefault","require","_propTypes","_Actions","RawPDF","
|
|
1
|
+
{"version":3,"file":"RawPDF.js","names":["_react","_interopRequireDefault","require","_propTypes","_Actions","RawPDF","mimetype","url","name","file","default","createElement","className","data","type","href","rel","target","exports","propTypes","PropTypes","string","isRequired","object"],"sources":["../../../../src/components/FilePreview/PDF/RawPDF.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport Actions from '../Actions';\n\nconst RawPDF = ({ mimetype, url, name, file }) => (\n <div className=\"FilePreview\">\n <object data={url} type={mimetype} className=\"preview__file--pdf\">\n <p>\n <a href={url} rel=\"noopener noreferrer\" target=\"_blank\">\n Download {name}\n </a>\n </p>\n </object>\n <div className=\"FilePreviewItem__info\">\n <p className=\"FilePreviewItem__info__fileName\">{name}</p>\n <Actions file={file} />\n </div>\n </div>\n);\n\nRawPDF.propTypes = {\n mimetype: PropTypes.string.isRequired,\n url: PropTypes.string.isRequired,\n name: PropTypes.string.isRequired,\n file: PropTypes.object.isRequired\n};\n\nexport { RawPDF };\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,QAAA,GAAAH,sBAAA,CAAAC,OAAA;AAEA,MAAMG,MAAM,GAAGA,CAAC;EAAEC,QAAQ;EAAEC,GAAG;EAAEC,IAAI;EAAEC;AAAK,CAAC,kBAC3CT,MAAA,CAAAU,OAAA,CAAAC,aAAA;EAAKC,SAAS,EAAC;AAAa,gBAC1BZ,MAAA,CAAAU,OAAA,CAAAC,aAAA;EAAQE,IAAI,EAAEN,GAAI;EAACO,IAAI,EAAER,QAAS;EAACM,SAAS,EAAC;AAAoB,gBAC/DZ,MAAA,CAAAU,OAAA,CAAAC,aAAA,yBACEX,MAAA,CAAAU,OAAA,CAAAC,aAAA;EAAGI,IAAI,EAAER,GAAI;EAACS,GAAG,EAAC,qBAAqB;EAACC,MAAM,EAAC;AAAQ,GAAC,WAC7C,EAACT,IACT,CACF,CACG,CAAC,eACTR,MAAA,CAAAU,OAAA,CAAAC,aAAA;EAAKC,SAAS,EAAC;AAAuB,gBACpCZ,MAAA,CAAAU,OAAA,CAAAC,aAAA;EAAGC,SAAS,EAAC;AAAiC,GAAEJ,IAAQ,CAAC,eACzDR,MAAA,CAAAU,OAAA,CAAAC,aAAA,CAACP,QAAA,CAAAM,OAAO;EAACD,IAAI,EAAEA;AAAK,CAAE,CACnB,CACF,CACN;AAACS,OAAA,CAAAb,MAAA,GAAAA,MAAA;AAEFA,MAAM,CAACc,SAAS,GAAG;EACjBb,QAAQ,EAAEc,kBAAS,CAACC,MAAM,CAACC,UAAU;EACrCf,GAAG,EAAEa,kBAAS,CAACC,MAAM,CAACC,UAAU;EAChCd,IAAI,EAAEY,kBAAS,CAACC,MAAM,CAACC,UAAU;EACjCb,IAAI,EAAEW,kBAAS,CAACG,MAAM,CAACD;AACzB,CAAC","ignoreList":[]}
|
|
@@ -1,6 +1,5 @@
|
|
|
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
|
});
|
|
@@ -8,7 +7,7 @@ exports.pdf = void 0;
|
|
|
8
7
|
var _PDF = require("./PDF");
|
|
9
8
|
var _RawPDF = require("./RawPDF");
|
|
10
9
|
var _schema = require("./schema");
|
|
11
|
-
|
|
10
|
+
const pdf = exports.pdf = {
|
|
12
11
|
component: {
|
|
13
12
|
card: _PDF.PDF,
|
|
14
13
|
raw: _RawPDF.RawPDF
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_PDF","require","_RawPDF","_schema","pdf","exports","component","card","PDF","raw","RawPDF","schema","PDFSchema"],"sources":["../../../../src/components/FilePreview/PDF/index.js"],"sourcesContent":["import { PDF } from './PDF';\nimport { RawPDF } from './RawPDF';\nimport { PDFSchema } from './schema';\n\nconst pdf = {\n component: {\n card: PDF,\n raw: RawPDF\n },\n schema: PDFSchema\n};\n\nexport { pdf };\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["_PDF","require","_RawPDF","_schema","pdf","exports","component","card","PDF","raw","RawPDF","schema","PDFSchema"],"sources":["../../../../src/components/FilePreview/PDF/index.js"],"sourcesContent":["import { PDF } from './PDF';\nimport { RawPDF } from './RawPDF';\nimport { PDFSchema } from './schema';\n\nconst pdf = {\n component: {\n card: PDF,\n raw: RawPDF\n },\n schema: PDFSchema\n};\n\nexport { pdf };\n"],"mappings":";;;;;;AAAA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAEA,MAAMG,GAAG,GAAAC,OAAA,CAAAD,GAAA,GAAG;EACVE,SAAS,EAAE;IACTC,IAAI,EAAEC,QAAG;IACTC,GAAG,EAAEC;EACP,CAAC;EACDC,MAAM,EAAEC;AACV,CAAC","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.PDFSchema = void 0;
|
|
8
|
-
|
|
7
|
+
const PDFSchema = exports.PDFSchema = {
|
|
9
8
|
settings: {},
|
|
10
9
|
formSchema: {
|
|
11
10
|
properties: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","names":["PDFSchema","exports","settings","formSchema","properties","name","type","showInForm","label","formFieldType","caption","required"],"sources":["../../../../src/components/FilePreview/PDF/schema.js"],"sourcesContent":["const PDFSchema = {\n settings: {},\n formSchema: {\n properties: {\n name: {\n type: 'string',\n showInForm: true,\n label: 'File name',\n formFieldType: 'text'\n },\n caption: {\n type: 'string',\n showInForm: true,\n formFieldType: 'text'\n }\n },\n required: ['name']\n }\n};\n\nexport { PDFSchema };\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"schema.js","names":["PDFSchema","exports","settings","formSchema","properties","name","type","showInForm","label","formFieldType","caption","required"],"sources":["../../../../src/components/FilePreview/PDF/schema.js"],"sourcesContent":["const PDFSchema = {\n settings: {},\n formSchema: {\n properties: {\n name: {\n type: 'string',\n showInForm: true,\n label: 'File name',\n formFieldType: 'text'\n },\n caption: {\n type: 'string',\n showInForm: true,\n formFieldType: 'text'\n }\n },\n required: ['name']\n }\n};\n\nexport { PDFSchema };\n"],"mappings":";;;;;;AAAA,MAAMA,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAG;EAChBE,QAAQ,EAAE,CAAC,CAAC;EACZC,UAAU,EAAE;IACVC,UAAU,EAAE;MACVC,IAAI,EAAE;QACJC,IAAI,EAAE,QAAQ;QACdC,UAAU,EAAE,IAAI;QAChBC,KAAK,EAAE,WAAW;QAClBC,aAAa,EAAE;MACjB,CAAC;MACDC,OAAO,EAAE;QACPJ,IAAI,EAAE,QAAQ;QACdC,UAAU,EAAE,IAAI;QAChBE,aAAa,EAAE;MACjB;IACF,CAAC;IACDE,QAAQ,EAAE,CAAC,MAAM;EACnB;AACF,CAAC","ignoreList":[]}
|
|
@@ -1,6 +1,5 @@
|
|
|
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
|
});
|
|
@@ -8,7 +7,7 @@ exports.getPreview = void 0;
|
|
|
8
7
|
var _PDF = require("./PDF");
|
|
9
8
|
var _Image = require("./Image");
|
|
10
9
|
var _previewDefault = require("./previewDefault");
|
|
11
|
-
|
|
10
|
+
const schemas = {
|
|
12
11
|
'application/pdf': _PDF.pdf,
|
|
13
12
|
'image/gif': _Image.image,
|
|
14
13
|
'image/jpg': _Image.image,
|
|
@@ -18,15 +17,18 @@ var schemas = {
|
|
|
18
17
|
'image/svg+xml': _Image.image,
|
|
19
18
|
'image/tiff': _Image.image,
|
|
20
19
|
'image/webp': _Image.image,
|
|
21
|
-
|
|
20
|
+
default: _previewDefault.previewDefault
|
|
22
21
|
};
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
22
|
+
const getPreview = ({
|
|
23
|
+
mimetype,
|
|
24
|
+
previewType
|
|
25
|
+
}) => {
|
|
26
|
+
const {
|
|
27
|
+
component,
|
|
28
|
+
schema
|
|
29
|
+
} = schemas[mimetype] || schemas.default;
|
|
30
|
+
const Preview = component[previewType] || component;
|
|
30
31
|
return [Preview, schema];
|
|
31
32
|
};
|
|
33
|
+
exports.getPreview = getPreview;
|
|
32
34
|
//# sourceMappingURL=get-preview.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-preview.js","names":["_PDF","require","_Image","_previewDefault","schemas","pdf","image","
|
|
1
|
+
{"version":3,"file":"get-preview.js","names":["_PDF","require","_Image","_previewDefault","schemas","pdf","image","default","previewDefault","getPreview","mimetype","previewType","component","schema","Preview","exports"],"sources":["../../../src/components/FilePreview/get-preview.js"],"sourcesContent":["import { pdf } from './PDF';\nimport { image } from './Image';\nimport { previewDefault } from './previewDefault';\n\nconst schemas = {\n 'application/pdf': pdf,\n 'image/gif': image,\n 'image/jpg': image,\n 'image/jpeg': image,\n 'image/png': image,\n 'image/bmp': image,\n 'image/svg+xml': image,\n 'image/tiff': image,\n 'image/webp': image,\n default: previewDefault\n};\n\nconst getPreview = ({ mimetype, previewType }) => {\n const { component, schema } = schemas[mimetype] || schemas.default;\n const Preview = component[previewType] || component;\n return [Preview, schema];\n};\n\nexport { getPreview };\n"],"mappings":";;;;;;AAAA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAF,OAAA;AAEA,MAAMG,OAAO,GAAG;EACd,iBAAiB,EAAEC,QAAG;EACtB,WAAW,EAAEC,YAAK;EAClB,WAAW,EAAEA,YAAK;EAClB,YAAY,EAAEA,YAAK;EACnB,WAAW,EAAEA,YAAK;EAClB,WAAW,EAAEA,YAAK;EAClB,eAAe,EAAEA,YAAK;EACtB,YAAY,EAAEA,YAAK;EACnB,YAAY,EAAEA,YAAK;EACnBC,OAAO,EAAEC;AACX,CAAC;AAED,MAAMC,UAAU,GAAGA,CAAC;EAAEC,QAAQ;EAAEC;AAAY,CAAC,KAAK;EAChD,MAAM;IAAEC,SAAS;IAAEC;EAAO,CAAC,GAAGT,OAAO,CAACM,QAAQ,CAAC,IAAIN,OAAO,CAACG,OAAO;EAClE,MAAMO,OAAO,GAAGF,SAAS,CAACD,WAAW,CAAC,IAAIC,SAAS;EACnD,OAAO,CAACE,OAAO,EAAED,MAAM,CAAC;AAC1B,CAAC;AAACE,OAAA,CAAAN,UAAA,GAAAA,UAAA","ignoreList":[]}
|