@webiny/app-file-manager 0.0.0-unstable.eb196ccd2f → 0.0.0-unstable.eb81deee7e
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/README.md +7 -28
- package/app.js +74 -9
- package/app.js.map +1 -1
- package/domain/constants.d.ts +4 -0
- package/domain/constants.js +7 -0
- package/domain/constants.js.map +1 -0
- package/domain/permissionsSchema.d.ts +18 -0
- package/domain/permissionsSchema.js +32 -0
- package/domain/permissionsSchema.js.map +1 -0
- package/domain/tagsHelpers.d.ts +16 -0
- package/domain/tagsHelpers.js +25 -0
- package/domain/tagsHelpers.js.map +1 -0
- package/domain/types.d.ts +26 -0
- package/domain/types.js +0 -0
- package/exports/admin/ui/file-manager.d.ts +2 -0
- package/exports/admin/ui/file-manager.js +1 -0
- package/features/deleteFile/DeleteFile.test.js +150 -0
- package/features/deleteFile/DeleteFile.test.js.map +1 -0
- package/features/deleteFile/DeleteFileGateway.d.ts +11 -0
- package/features/deleteFile/DeleteFileGateway.js +23 -0
- package/features/deleteFile/DeleteFileGateway.js.map +1 -0
- package/features/deleteFile/DeleteFileRepository.d.ts +12 -0
- package/features/deleteFile/DeleteFileRepository.js +26 -0
- package/features/deleteFile/DeleteFileRepository.js.map +1 -0
- package/features/deleteFile/DeleteFileUseCase.d.ts +10 -0
- package/features/deleteFile/DeleteFileUseCase.js +34 -0
- package/features/deleteFile/DeleteFileUseCase.js.map +1 -0
- package/features/deleteFile/abstractions.d.ts +36 -0
- package/features/deleteFile/abstractions.js +7 -0
- package/features/deleteFile/abstractions.js.map +1 -0
- package/features/deleteFile/feature.d.ts +3 -0
- package/features/deleteFile/feature.js +21 -0
- package/features/deleteFile/feature.js.map +1 -0
- package/features/deleteFile/index.d.ts +3 -0
- package/features/deleteFile/index.js +2 -0
- package/features/fileModel/FileModelProvider.d.ts +12 -0
- package/features/fileModel/FileModelProvider.js +21 -0
- package/features/fileModel/FileModelProvider.js.map +1 -0
- package/features/fileModel/GetFileModelGqlGateway.d.ts +12 -0
- package/features/fileModel/GetFileModelGqlGateway.js +38 -0
- package/features/fileModel/GetFileModelGqlGateway.js.map +1 -0
- package/features/fileModel/GetFileModelRepository.d.ts +14 -0
- package/features/fileModel/GetFileModelRepository.js +32 -0
- package/features/fileModel/GetFileModelRepository.js.map +1 -0
- package/features/fileModel/abstractions.d.ts +24 -0
- package/features/fileModel/abstractions.js +7 -0
- package/features/fileModel/abstractions.js.map +1 -0
- package/features/fileModel/feature.d.ts +1 -0
- package/features/fileModel/feature.js +15 -0
- package/features/fileModel/feature.js.map +1 -0
- package/features/fileModel/index.d.ts +2 -0
- package/features/fileModel/index.js +2 -0
- package/features/fileUploader/FileUploader.d.ts +23 -0
- package/features/fileUploader/FileUploader.js +243 -0
- package/features/fileUploader/FileUploader.js.map +1 -0
- package/features/fileUploader/FileUploader.test.js +427 -0
- package/features/fileUploader/FileUploader.test.js.map +1 -0
- package/features/fileUploader/abstractions.d.ts +51 -0
- package/features/fileUploader/abstractions.js +5 -0
- package/features/fileUploader/abstractions.js.map +1 -0
- package/features/fileUploader/feature.d.ts +3 -0
- package/features/fileUploader/feature.js +17 -0
- package/features/fileUploader/feature.js.map +1 -0
- package/features/fileUploader/index.d.ts +3 -0
- package/features/fileUploader/index.js +2 -0
- package/features/fileUrlFormatter/FileUrlFormatter.d.ts +8 -0
- package/features/fileUrlFormatter/FileUrlFormatter.js +13 -0
- package/features/fileUrlFormatter/FileUrlFormatter.js.map +1 -0
- package/features/fileUrlFormatter/abstractions.d.ts +1 -0
- package/features/fileUrlFormatter/abstractions.js +1 -0
- package/features/fileUrlFormatter/feature.d.ts +1 -0
- package/features/fileUrlFormatter/feature.js +11 -0
- package/features/fileUrlFormatter/feature.js.map +1 -0
- package/features/getFile/GetFileGateway.d.ts +14 -0
- package/features/getFile/GetFileGateway.js +28 -0
- package/features/getFile/GetFileGateway.js.map +1 -0
- package/features/getFile/GetFileRepository.d.ts +11 -0
- package/features/getFile/GetFileRepository.js +18 -0
- package/features/getFile/GetFileRepository.js.map +1 -0
- package/features/getFile/GetFileUseCase.d.ts +10 -0
- package/features/getFile/GetFileUseCase.js +35 -0
- package/features/getFile/GetFileUseCase.js.map +1 -0
- package/features/getFile/abstractions.d.ts +38 -0
- package/features/getFile/abstractions.js +7 -0
- package/features/getFile/abstractions.js.map +1 -0
- package/features/getFile/feature.d.ts +3 -0
- package/features/getFile/feature.js +21 -0
- package/features/getFile/feature.js.map +1 -0
- package/features/getFile/index.d.ts +3 -0
- package/features/getFile/index.js +2 -0
- package/features/listFiles/ListFiles.test.js +192 -0
- package/features/listFiles/ListFiles.test.js.map +1 -0
- package/features/listFiles/ListFilesGateway.d.ts +13 -0
- package/features/listFiles/ListFilesGateway.js +35 -0
- package/features/listFiles/ListFilesGateway.js.map +1 -0
- package/features/listFiles/ListFilesRepository.d.ts +12 -0
- package/features/listFiles/ListFilesRepository.js +26 -0
- package/features/listFiles/ListFilesRepository.js.map +1 -0
- package/features/listFiles/ListFilesUseCase.d.ts +10 -0
- package/features/listFiles/ListFilesUseCase.js +28 -0
- package/features/listFiles/ListFilesUseCase.js.map +1 -0
- package/features/listFiles/abstractions.d.ts +45 -0
- package/features/listFiles/abstractions.js +7 -0
- package/features/listFiles/abstractions.js.map +1 -0
- package/features/listFiles/feature.d.ts +3 -0
- package/features/listFiles/feature.js +21 -0
- package/features/listFiles/feature.js.map +1 -0
- package/features/listFiles/index.d.ts +3 -0
- package/features/listFiles/index.js +2 -0
- package/features/permissions/abstractions.d.ts +17 -0
- package/features/permissions/abstractions.js +6 -0
- package/features/permissions/abstractions.js.map +1 -0
- package/features/permissions/feature.d.ts +14 -0
- package/features/permissions/feature.js +7 -0
- package/features/permissions/feature.js.map +1 -0
- package/features/resolveImageTool/ResolveImageTool.d.ts +40 -0
- package/features/resolveImageTool/ResolveImageTool.js +49 -0
- package/features/resolveImageTool/ResolveImageTool.js.map +1 -0
- package/features/resolveImageTool/feature.d.ts +1 -0
- package/features/resolveImageTool/feature.js +11 -0
- package/features/resolveImageTool/feature.js.map +1 -0
- package/features/settings/GetSettings.test.d.ts +1 -0
- package/features/settings/GetSettings.test.js +92 -0
- package/features/settings/GetSettings.test.js.map +1 -0
- package/features/settings/GetSettingsGateway.d.ts +12 -0
- package/features/settings/GetSettingsGateway.js +43 -0
- package/features/settings/GetSettingsGateway.js.map +1 -0
- package/features/settings/GetSettingsRepository.d.ts +14 -0
- package/features/settings/GetSettingsRepository.js +34 -0
- package/features/settings/GetSettingsRepository.js.map +1 -0
- package/features/settings/GetSettingsUseCase.d.ts +11 -0
- package/features/settings/GetSettingsUseCase.js +18 -0
- package/features/settings/GetSettingsUseCase.js.map +1 -0
- package/features/settings/SaveSettingsGateway.d.ts +12 -0
- package/features/settings/SaveSettingsGateway.js +50 -0
- package/features/settings/SaveSettingsGateway.js.map +1 -0
- package/features/settings/abstractions.d.ts +31 -0
- package/features/settings/abstractions.js +8 -0
- package/features/settings/abstractions.js.map +1 -0
- package/features/settings/feature.d.ts +3 -0
- package/features/settings/feature.js +23 -0
- package/features/settings/feature.js.map +1 -0
- package/features/settings/index.d.ts +3 -0
- package/features/settings/index.js +2 -0
- package/features/shared/FILE_FIELDS.d.ts +1 -0
- package/features/shared/FILE_FIELDS.js +36 -0
- package/features/shared/FILE_FIELDS.js.map +1 -0
- package/features/shared/FileFieldsProvider.d.ts +8 -0
- package/features/shared/FileFieldsProvider.js +14 -0
- package/features/shared/FileFieldsProvider.js.map +1 -0
- package/features/shared/FileFieldsProviderWithWcp.d.ts +12 -0
- package/features/shared/FileFieldsProviderWithWcp.js +25 -0
- package/features/shared/FileFieldsProviderWithWcp.js.map +1 -0
- package/features/shared/FilesListCache.d.ts +1 -0
- package/features/shared/FilesListCache.js +1 -0
- package/features/shared/abstractions.d.ts +13 -0
- package/features/shared/abstractions.js +6 -0
- package/features/shared/abstractions.js.map +1 -0
- package/features/shared/feature.d.ts +5 -0
- package/features/shared/feature.js +22 -0
- package/features/shared/feature.js.map +1 -0
- package/features/shared/index.d.ts +4 -0
- package/features/shared/index.js +3 -0
- package/features/shared/types.d.ts +16 -0
- package/features/shared/types.js +0 -0
- package/features/tags/ListTags.test.d.ts +1 -0
- package/features/tags/ListTags.test.js +126 -0
- package/features/tags/ListTags.test.js.map +1 -0
- package/features/tags/ListTagsGateway.d.ts +11 -0
- package/features/tags/ListTagsGateway.js +23 -0
- package/features/tags/ListTagsGateway.js.map +1 -0
- package/features/tags/ListTagsRepository.d.ts +12 -0
- package/features/tags/ListTagsRepository.js +25 -0
- package/features/tags/ListTagsRepository.js.map +1 -0
- package/features/tags/ListTagsUseCase.d.ts +10 -0
- package/features/tags/ListTagsUseCase.js +20 -0
- package/features/tags/ListTagsUseCase.js.map +1 -0
- package/features/tags/abstractions.d.ts +32 -0
- package/features/tags/abstractions.js +7 -0
- package/features/tags/abstractions.js.map +1 -0
- package/features/tags/feature.d.ts +3 -0
- package/features/tags/feature.js +21 -0
- package/features/tags/feature.js.map +1 -0
- package/features/tags/index.d.ts +3 -0
- package/features/tags/index.js +2 -0
- package/features/updateFile/UpdateFile.test.d.ts +1 -0
- package/features/updateFile/UpdateFile.test.js +260 -0
- package/features/updateFile/UpdateFile.test.js.map +1 -0
- package/features/updateFile/UpdateFileGateway.d.ts +12 -0
- package/features/updateFile/UpdateFileGateway.js +25 -0
- package/features/updateFile/UpdateFileGateway.js.map +1 -0
- package/features/updateFile/UpdateFileRepository.d.ts +14 -0
- package/features/updateFile/UpdateFileRepository.js +32 -0
- package/features/updateFile/UpdateFileRepository.js.map +1 -0
- package/features/updateFile/UpdateFileUseCase.d.ts +12 -0
- package/features/updateFile/UpdateFileUseCase.js +41 -0
- package/features/updateFile/UpdateFileUseCase.js.map +1 -0
- package/features/updateFile/abstractions.d.ts +53 -0
- package/features/updateFile/abstractions.js +7 -0
- package/features/updateFile/abstractions.js.map +1 -0
- package/features/updateFile/feature.d.ts +3 -0
- package/features/updateFile/feature.js +21 -0
- package/features/updateFile/feature.js.map +1 -0
- package/features/updateFile/index.d.ts +3 -0
- package/features/updateFile/index.js +2 -0
- package/index.d.ts +3 -8
- package/index.js +3 -10
- package/modules/AiEnrichment/AiImageEnrichmentEventHandler.d.ts +18 -0
- package/modules/AiEnrichment/AiImageEnrichmentEventHandler.js +33 -0
- package/modules/AiEnrichment/AiImageEnrichmentEventHandler.js.map +1 -0
- package/modules/AiEnrichment/AiImageEnrichmentFailedEventHandler.d.ts +19 -0
- package/modules/AiEnrichment/AiImageEnrichmentFailedEventHandler.js +26 -0
- package/modules/AiEnrichment/AiImageEnrichmentFailedEventHandler.js.map +1 -0
- package/modules/AiEnrichment/ReenrichFileGateway.d.ts +12 -0
- package/modules/AiEnrichment/ReenrichFileGateway.js +23 -0
- package/modules/AiEnrichment/ReenrichFileGateway.js.map +1 -0
- package/modules/AiEnrichment/ReenrichWithAi.d.ts +11 -0
- package/modules/AiEnrichment/ReenrichWithAi.js +57 -0
- package/modules/AiEnrichment/ReenrichWithAi.js.map +1 -0
- package/modules/AiEnrichment/ReenrichWithAiPresenter.d.ts +50 -0
- package/modules/AiEnrichment/ReenrichWithAiPresenter.js +114 -0
- package/modules/AiEnrichment/ReenrichWithAiPresenter.js.map +1 -0
- package/modules/AiEnrichment/StreamingPlaceholder.d.ts +15 -0
- package/modules/AiEnrichment/StreamingPlaceholder.js +32 -0
- package/modules/AiEnrichment/StreamingPlaceholder.js.map +1 -0
- package/modules/AiEnrichment/abstractions.d.ts +70 -0
- package/modules/AiEnrichment/abstractions.js +6 -0
- package/modules/AiEnrichment/abstractions.js.map +1 -0
- package/modules/AiEnrichment/feature.d.ts +3 -0
- package/modules/AiEnrichment/feature.js +23 -0
- package/modules/AiEnrichment/feature.js.map +1 -0
- package/modules/AiEnrichment/index.d.ts +2 -0
- package/modules/AiEnrichment/index.js +9 -0
- package/modules/AiEnrichment/index.js.map +1 -0
- package/modules/Enterprise/HandleWebsocketMessages.js +46 -50
- package/modules/Enterprise/HandleWebsocketMessages.js.map +1 -1
- package/modules/Enterprise/components/ThreatScanInProgressFileBody.js +19 -20
- package/modules/Enterprise/components/ThreatScanInProgressFileBody.js.map +1 -1
- package/modules/Enterprise/components/ThreatScanInProgressTableCell.js +16 -28
- package/modules/Enterprise/components/ThreatScanInProgressTableCell.js.map +1 -1
- package/modules/Enterprise/constants.js +3 -2
- package/modules/Enterprise/constants.js.map +1 -1
- package/modules/Enterprise/index.js +27 -37
- package/modules/Enterprise/index.js.map +1 -1
- package/modules/FileManagerRoutes.d.ts +2 -0
- package/modules/FileManagerRoutes.js +31 -0
- package/modules/FileManagerRoutes.js.map +1 -0
- package/modules/FileModelModule.d.ts +2 -0
- package/modules/FileModelModule.js +18 -0
- package/modules/FileModelModule.js.map +1 -0
- package/modules/FileUrlFormatter.d.ts +2 -0
- package/modules/FileUrlFormatter.js +9 -0
- package/modules/FileUrlFormatter.js.map +1 -0
- package/modules/HeadlessCms/fieldType/AssetFieldSettingsModifier.d.ts +26 -0
- package/modules/HeadlessCms/fieldType/AssetFieldSettingsModifier.js +39 -0
- package/modules/HeadlessCms/fieldType/AssetFieldSettingsModifier.js.map +1 -0
- package/modules/HeadlessCms/fieldType/AssetFieldType.d.ts +34 -0
- package/modules/HeadlessCms/fieldType/AssetFieldType.js +42 -0
- package/modules/HeadlessCms/fieldType/AssetFieldType.js.map +1 -0
- package/modules/HeadlessCms/fieldType/AssetFormFieldType.d.ts +21 -0
- package/modules/HeadlessCms/fieldType/AssetFormFieldType.js +42 -0
- package/modules/HeadlessCms/fieldType/AssetFormFieldType.js.map +1 -0
- package/modules/HeadlessCms/fieldType/AssetInputRenderer.d.ts +15 -0
- package/modules/HeadlessCms/fieldType/AssetInputRenderer.js +20 -0
- package/modules/HeadlessCms/fieldType/AssetInputRenderer.js.map +1 -0
- package/modules/HeadlessCms/fieldType/AssetInputsRenderer.d.ts +15 -0
- package/modules/HeadlessCms/fieldType/AssetInputsRenderer.js +20 -0
- package/modules/HeadlessCms/fieldType/AssetInputsRenderer.js.map +1 -0
- package/modules/HeadlessCms/fieldType/FileFieldSettingsModifier.d.ts +16 -0
- package/modules/HeadlessCms/fieldType/FileFieldSettingsModifier.js +33 -0
- package/modules/HeadlessCms/fieldType/FileFieldSettingsModifier.js.map +1 -0
- package/modules/HeadlessCms/fieldType/FileFieldType.d.ts +25 -0
- package/modules/HeadlessCms/fieldType/FileFieldType.js +38 -0
- package/modules/HeadlessCms/fieldType/FileFieldType.js.map +1 -0
- package/modules/HeadlessCms/fieldType/FileInputRenderer.d.ts +15 -0
- package/modules/HeadlessCms/fieldType/FileInputRenderer.js +19 -0
- package/modules/HeadlessCms/fieldType/FileInputRenderer.js.map +1 -0
- package/modules/HeadlessCms/fieldType/FileInputsRenderer.d.ts +15 -0
- package/modules/HeadlessCms/fieldType/FileInputsRenderer.js +19 -0
- package/modules/HeadlessCms/fieldType/FileInputsRenderer.js.map +1 -0
- package/modules/HeadlessCms/fieldType/feature.d.ts +1 -0
- package/modules/HeadlessCms/fieldType/feature.js +27 -0
- package/modules/HeadlessCms/fieldType/feature.js.map +1 -0
- package/modules/HeadlessCms/fieldType/isAssetField.d.ts +2 -0
- package/modules/HeadlessCms/fieldType/isAssetField.js +4 -0
- package/modules/HeadlessCms/fieldType/isAssetField.js.map +1 -0
- package/modules/SecurityPermissions.d.ts +2 -0
- package/modules/SecurityPermissions.js +15 -0
- package/modules/SecurityPermissions.js.map +1 -0
- package/modules/Settings/assets/icons/folder-open.js +19 -0
- package/modules/Settings/assets/icons/folder-open.js.map +1 -0
- package/modules/Settings/index.js +24 -36
- package/modules/Settings/index.js.map +1 -1
- package/package.json +42 -59
- package/presentation/FileActions/FileDetails/CopyUrl.js +19 -0
- package/presentation/FileActions/FileDetails/CopyUrl.js.map +1 -0
- package/presentation/FileActions/FileDetails/DeleteImage.js +24 -0
- package/presentation/FileActions/FileDetails/DeleteImage.js.map +1 -0
- package/presentation/FileActions/FileDetails/Download.js +19 -0
- package/presentation/FileActions/FileDetails/Download.js.map +1 -0
- package/presentation/FileActions/FileDetails/EditImage.js +39 -0
- package/presentation/FileActions/FileDetails/EditImage.js.map +1 -0
- package/presentation/FileActions/FileDetails/MoveToFolder.js +16 -0
- package/presentation/FileActions/FileDetails/MoveToFolder.js.map +1 -0
- package/presentation/FileActions/Grid/Delete.js +23 -0
- package/presentation/FileActions/Grid/Delete.js.map +1 -0
- package/presentation/FileActions/Grid/Download.js +19 -0
- package/presentation/FileActions/Grid/Download.js.map +1 -0
- package/presentation/FileActions/Grid/MoveToFolder.js +16 -0
- package/presentation/FileActions/Grid/MoveToFolder.js.map +1 -0
- package/presentation/FileActions/Grid/Settings.js +23 -0
- package/presentation/FileActions/Grid/Settings.js.map +1 -0
- package/presentation/FileActions/index.js +47 -0
- package/presentation/FileActions/index.js.map +1 -0
- package/presentation/FileDetails/FileDetailsPresenter.d.ts +31 -0
- package/presentation/FileDetails/FileDetailsPresenter.js +154 -0
- package/presentation/FileDetails/FileDetailsPresenter.js.map +1 -0
- package/presentation/FileDetails/FileDetailsPresenter.test.d.ts +1 -0
- package/presentation/FileDetails/FileDetailsPresenter.test.js +363 -0
- package/presentation/FileDetails/FileDetailsPresenter.test.js.map +1 -0
- package/presentation/FileDetails/abstractions.d.ts +24 -0
- package/presentation/FileDetails/abstractions.js +5 -0
- package/presentation/FileDetails/abstractions.js.map +1 -0
- package/presentation/FileDetails/components/ActionButton.d.ts +10 -0
- package/presentation/FileDetails/components/ActionButton.js +15 -0
- package/presentation/FileDetails/components/ActionButton.js.map +1 -0
- package/presentation/FileDetails/components/Actions.js +13 -0
- package/presentation/FileDetails/components/Actions.js.map +1 -0
- package/presentation/FileDetails/components/Content.d.ts +16 -0
- package/presentation/FileDetails/components/Content.js +20 -0
- package/presentation/FileDetails/components/Content.js.map +1 -0
- package/presentation/FileDetails/components/CreatedOn.js +21 -0
- package/presentation/FileDetails/components/CreatedOn.js.map +1 -0
- package/presentation/FileDetails/components/Description.js +16 -0
- package/presentation/FileDetails/components/Description.js.map +1 -0
- package/presentation/FileDetails/components/FileDetailsDrawer.d.ts +4 -0
- package/presentation/FileDetails/components/FileDetailsDrawer.js +79 -0
- package/presentation/FileDetails/components/FileDetailsDrawer.js.map +1 -0
- package/presentation/FileDetails/components/Preview.js +15 -0
- package/presentation/FileDetails/components/Preview.js.map +1 -0
- package/presentation/FileDetails/components/Thumbnail.js +12 -0
- package/presentation/FileDetails/components/Thumbnail.js.map +1 -0
- package/presentation/FileDetails/feature.d.ts +3 -0
- package/presentation/FileDetails/feature.js +17 -0
- package/presentation/FileDetails/feature.js.map +1 -0
- package/presentation/FileDetails/index.d.ts +3 -0
- package/presentation/FileDetails/index.js +2 -0
- package/presentation/FileList/FileListDataSource.d.ts +16 -0
- package/presentation/FileList/FileListDataSource.js +82 -0
- package/presentation/FileList/FileListDataSource.js.map +1 -0
- package/presentation/FileList/FileListPresenter.test.d.ts +1 -0
- package/presentation/FileList/FileListPresenter.test.js +518 -0
- package/presentation/FileList/FileListPresenter.test.js.map +1 -0
- package/presentation/FileList/FileManagerPresenter.d.ts +46 -0
- package/presentation/FileList/FileManagerPresenter.js +234 -0
- package/presentation/FileList/FileManagerPresenter.js.map +1 -0
- package/presentation/FileList/FileManagerPresenterProvider.d.ts +9 -0
- package/presentation/FileList/FileManagerPresenterProvider.js +13 -0
- package/presentation/FileList/FileManagerPresenterProvider.js.map +1 -0
- package/presentation/FileList/abstractions.d.ts +81 -0
- package/presentation/FileList/abstractions.js +5 -0
- package/presentation/FileList/abstractions.js.map +1 -0
- package/presentation/FileList/components/BottomInfoBar/BottomInfoBar.d.ts +6 -0
- package/presentation/FileList/components/BottomInfoBar/BottomInfoBar.js +12 -0
- package/presentation/FileList/components/BottomInfoBar/BottomInfoBar.js.map +1 -0
- package/presentation/FileList/components/BottomInfoBar/ListStatus.js +20 -0
- package/presentation/FileList/components/BottomInfoBar/ListStatus.js.map +1 -0
- package/presentation/FileList/components/BottomInfoBar/SupportedFileTypes.d.ts +8 -0
- package/presentation/FileList/components/BottomInfoBar/SupportedFileTypes.js +56 -0
- package/presentation/FileList/components/BottomInfoBar/SupportedFileTypes.js.map +1 -0
- package/presentation/FileList/components/BottomInfoBar/index.d.ts +1 -0
- package/presentation/FileList/components/BottomInfoBar/index.js +1 -0
- package/presentation/FileList/components/BulkActions/ActionEdit.types.d.ts +2 -0
- package/presentation/FileList/components/BulkActions/ActionEdit.types.js +0 -0
- package/presentation/FileList/components/BulkActions/ActionEditPresenter.d.ts +35 -0
- package/presentation/FileList/components/BulkActions/ActionEditPresenter.js +55 -0
- package/presentation/FileList/components/BulkActions/ActionEditPresenter.js.map +1 -0
- package/presentation/FileList/components/BulkActions/ActionEditPresenter.test.d.ts +1 -0
- package/presentation/FileList/components/BulkActions/ActionEditPresenter.test.js +170 -0
- package/presentation/FileList/components/BulkActions/ActionEditPresenter.test.js.map +1 -0
- package/presentation/FileList/components/BulkActions/BulkActionBar.d.ts +5 -0
- package/presentation/FileList/components/BulkActions/BulkActionBar.js +42 -0
- package/presentation/FileList/components/BulkActions/BulkActionBar.js.map +1 -0
- package/presentation/FileList/components/BulkActions/BulkActionDelete.d.ts +4 -0
- package/presentation/FileList/components/BulkActions/BulkActionDelete.js +65 -0
- package/presentation/FileList/components/BulkActions/BulkActionDelete.js.map +1 -0
- package/presentation/FileList/components/BulkActions/BulkActionMove.d.ts +4 -0
- package/presentation/FileList/components/BulkActions/BulkActionMove.js +87 -0
- package/presentation/FileList/components/BulkActions/BulkActionMove.js.map +1 -0
- package/presentation/FileList/components/BulkActions/GraphQLInputMapper.d.ts +23 -0
- package/presentation/FileList/components/BulkActions/GraphQLInputMapper.js +40 -0
- package/presentation/FileList/components/BulkActions/GraphQLInputMapper.js.map +1 -0
- package/presentation/FileList/components/BulkActions/GraphQLInputMapper.test.d.ts +1 -0
- package/presentation/FileList/components/BulkActions/GraphQLInputMapper.test.js +319 -0
- package/presentation/FileList/components/BulkActions/GraphQLInputMapper.test.js.map +1 -0
- package/presentation/FileList/components/BulkActions/domain/Batch.d.ts +32 -0
- package/presentation/FileList/components/BulkActions/domain/Batch.js +32 -0
- package/presentation/FileList/components/BulkActions/domain/Batch.js.map +1 -0
- package/presentation/FileList/components/BulkActions/domain/BatchMapper.d.ts +4 -0
- package/presentation/FileList/components/BulkActions/domain/BatchMapper.js +14 -0
- package/presentation/FileList/components/BulkActions/domain/BatchMapper.js.map +1 -0
- package/presentation/FileList/components/BulkActions/domain/Field.d.ts +32 -0
- package/presentation/FileList/components/BulkActions/domain/Field.js +49 -0
- package/presentation/FileList/components/BulkActions/domain/Field.js.map +1 -0
- package/presentation/FileList/components/BulkActions/domain/FieldMapper.d.ts +7 -0
- package/presentation/FileList/components/BulkActions/domain/FieldMapper.js +21 -0
- package/presentation/FileList/components/BulkActions/domain/FieldMapper.js.map +1 -0
- package/presentation/FileList/components/BulkActions/domain/index.d.ts +4 -0
- package/presentation/FileList/components/BulkActions/domain/index.js +4 -0
- package/presentation/FileList/components/BulkActions/index.d.ts +4 -0
- package/presentation/FileList/components/BulkActions/index.js +4 -0
- package/presentation/FileList/components/BulkActions/useBulkActionWorker.d.ts +17 -0
- package/presentation/FileList/components/BulkActions/useBulkActionWorker.js +37 -0
- package/presentation/FileList/components/BulkActions/useBulkActionWorker.js.map +1 -0
- package/presentation/FileList/components/Empty/Empty.d.ts +8 -0
- package/presentation/FileList/components/Empty/Empty.js +20 -0
- package/presentation/FileList/components/Empty/Empty.js.map +1 -0
- package/presentation/FileList/components/Empty/index.d.ts +1 -0
- package/presentation/FileList/components/Empty/index.js +1 -0
- package/presentation/FileList/components/FileDropArea/FileDropArea.js +62 -0
- package/presentation/FileList/components/FileDropArea/FileDropArea.js.map +1 -0
- package/presentation/FileList/components/FileDropArea/index.d.ts +1 -0
- package/presentation/FileList/components/FileDropArea/index.js +1 -0
- package/presentation/FileList/components/FileDropPlaceholder/FileDropPlaceholder.js +11 -0
- package/presentation/FileList/components/FileDropPlaceholder/FileDropPlaceholder.js.map +1 -0
- package/presentation/FileList/components/FileDropPlaceholder/index.d.ts +1 -0
- package/presentation/FileList/components/FileDropPlaceholder/index.js +1 -0
- package/presentation/FileList/components/FilePicker/FilePicker.d.ts +11 -0
- package/presentation/FileList/components/FilePicker/FilePicker.js +28 -0
- package/presentation/FileList/components/FilePicker/FilePicker.js.map +1 -0
- package/presentation/FileList/components/Filters/FilterByType.js +39 -0
- package/presentation/FileList/components/Filters/FilterByType.js.map +1 -0
- package/presentation/FileList/components/Filters/SubFoldersToggle.d.ts +9 -0
- package/presentation/FileList/components/Filters/SubFoldersToggle.js +25 -0
- package/presentation/FileList/components/Filters/SubFoldersToggle.js.map +1 -0
- package/presentation/FileList/components/Filters/TagsFilter.d.ts +9 -0
- package/presentation/FileList/components/Filters/TagsFilter.js +86 -0
- package/presentation/FileList/components/Filters/TagsFilter.js.map +1 -0
- package/presentation/FileList/components/Filters/TypeFilter.d.ts +8 -0
- package/presentation/FileList/components/Filters/TypeFilter.js +46 -0
- package/presentation/FileList/components/Filters/TypeFilter.js.map +1 -0
- package/presentation/FileList/components/Filters/index.d.ts +3 -0
- package/presentation/FileList/components/Filters/index.js +3 -0
- package/presentation/FileList/components/Grid/ActionButton.js +24 -0
- package/presentation/FileList/components/Grid/ActionButton.js.map +1 -0
- package/presentation/FileList/components/Grid/File.d.ts +32 -0
- package/presentation/FileList/components/Grid/File.js +84 -0
- package/presentation/FileList/components/Grid/File.js.map +1 -0
- package/presentation/FileList/components/Grid/FileGrid.d.ts +9 -0
- package/presentation/FileList/components/Grid/FileGrid.js +162 -0
- package/presentation/FileList/components/Grid/FileGrid.js.map +1 -0
- package/presentation/FileList/components/Grid/FileGrid.test.d.ts +1 -0
- package/presentation/FileList/components/Grid/FileGrid.test.js +400 -0
- package/presentation/FileList/components/Grid/FileGrid.test.js.map +1 -0
- package/presentation/FileList/components/Grid/index.d.ts +1 -0
- package/presentation/FileList/components/Grid/index.js +1 -0
- package/presentation/FileList/components/Header/FileManagerHeader.d.ts +7 -0
- package/presentation/FileList/components/Header/FileManagerHeader.js +114 -0
- package/presentation/FileList/components/Header/FileManagerHeader.js.map +1 -0
- package/presentation/FileList/components/LayoutSwitch/LayoutSwitch.js +24 -0
- package/presentation/FileList/components/LayoutSwitch/LayoutSwitch.js.map +1 -0
- package/presentation/FileList/components/LayoutSwitch/index.d.ts +1 -0
- package/presentation/FileList/components/LayoutSwitch/index.js +1 -0
- package/presentation/FileList/components/NoPermissions/NoPermissions.js +27 -0
- package/presentation/FileList/components/NoPermissions/NoPermissions.js.map +1 -0
- package/presentation/FileList/components/NoPermissions/index.d.ts +1 -0
- package/presentation/FileList/components/NoPermissions/index.js +1 -0
- package/presentation/FileList/components/NoResults/NoResults.js +21 -0
- package/presentation/FileList/components/NoResults/NoResults.js.map +1 -0
- package/presentation/FileList/components/NoResults/index.d.ts +1 -0
- package/presentation/FileList/components/NoResults/index.js +1 -0
- package/presentation/FileList/components/Search/SearchBar.d.ts +9 -0
- package/presentation/FileList/components/Search/SearchBar.js +33 -0
- package/presentation/FileList/components/Search/SearchBar.js.map +1 -0
- package/presentation/FileList/components/Search/index.d.ts +1 -0
- package/presentation/FileList/components/Search/index.js +1 -0
- package/presentation/FileList/components/Table/Actions/CopyFile.js +21 -0
- package/presentation/FileList/components/Table/Actions/CopyFile.js.map +1 -0
- package/presentation/FileList/components/Table/Actions/DeleteFile.js +24 -0
- package/presentation/FileList/components/Table/Actions/DeleteFile.js.map +1 -0
- package/presentation/FileList/components/Table/Actions/EditFile.js +19 -0
- package/presentation/FileList/components/Table/Actions/EditFile.js.map +1 -0
- package/presentation/FileList/components/Table/Actions/MoveFile.js +19 -0
- package/presentation/FileList/components/Table/Actions/MoveFile.js.map +1 -0
- package/presentation/FileList/components/Table/Actions/index.d.ts +4 -0
- package/presentation/FileList/components/Table/Actions/index.js +4 -0
- package/presentation/FileList/components/Table/Cells/CellActions.js +28 -0
- package/presentation/FileList/components/Table/Cells/CellActions.js.map +1 -0
- package/presentation/FileList/components/Table/Cells/CellAuthor.js +10 -0
- package/presentation/FileList/components/Table/Cells/CellAuthor.js.map +1 -0
- package/presentation/FileList/components/Table/Cells/CellCreated.js +13 -0
- package/presentation/FileList/components/Table/Cells/CellCreated.js.map +1 -0
- package/presentation/FileList/components/Table/Cells/CellModified.js +13 -0
- package/presentation/FileList/components/Table/Cells/CellModified.js.map +1 -0
- package/presentation/FileList/components/Table/Cells/CellName.d.ts +16 -0
- package/presentation/FileList/components/Table/Cells/CellName.js +59 -0
- package/presentation/FileList/components/Table/Cells/CellName.js.map +1 -0
- package/presentation/FileList/components/Table/Cells/CellSize.js +14 -0
- package/presentation/FileList/components/Table/Cells/CellSize.js.map +1 -0
- package/presentation/FileList/components/Table/Cells/CellThumbnail.js +12 -0
- package/presentation/FileList/components/Table/Cells/CellThumbnail.js.map +1 -0
- package/presentation/FileList/components/Table/Cells/CellType.js +11 -0
- package/presentation/FileList/components/Table/Cells/CellType.js.map +1 -0
- package/presentation/FileList/components/Table/Cells/index.d.ts +7 -0
- package/presentation/FileList/components/Table/Cells/index.js +7 -0
- package/presentation/FileList/components/Table/FileTable.d.ts +12 -0
- package/presentation/FileList/components/Table/FileTable.js +79 -0
- package/presentation/FileList/components/Table/FileTable.js.map +1 -0
- package/presentation/FileList/components/Table/FileTable.test.d.ts +1 -0
- package/presentation/FileList/components/Table/FileTable.test.js +372 -0
- package/presentation/FileList/components/Table/FileTable.test.js.map +1 -0
- package/presentation/FileList/components/Table/index.d.ts +4 -0
- package/presentation/FileList/components/Table/index.js +3 -0
- package/presentation/FileList/components/TagsList/Empty.js +8 -0
- package/presentation/FileList/components/TagsList/Empty.js.map +1 -0
- package/presentation/FileList/components/TagsList/FilterSelect.js +38 -0
- package/presentation/FileList/components/TagsList/FilterSelect.js.map +1 -0
- package/presentation/FileList/components/TagsList/FilterStatus.js +25 -0
- package/presentation/FileList/components/TagsList/FilterStatus.js.map +1 -0
- package/presentation/FileList/components/TagsList/Tag.d.ts +9 -0
- package/presentation/FileList/components/TagsList/Tag.js +11 -0
- package/presentation/FileList/components/TagsList/Tag.js.map +1 -0
- package/presentation/FileList/components/TagsList/Tags.d.ts +8 -0
- package/presentation/FileList/components/TagsList/Tags.js +30 -0
- package/presentation/FileList/components/TagsList/Tags.js.map +1 -0
- package/presentation/FileList/components/TagsList/TagsList.d.ts +11 -0
- package/presentation/FileList/components/TagsList/TagsList.js +24 -0
- package/presentation/FileList/components/TagsList/TagsList.js.map +1 -0
- package/presentation/FileList/components/TagsList/index.d.ts +1 -0
- package/presentation/FileList/components/TagsList/index.js +1 -0
- package/presentation/FileList/components/Thumbnail/Thumbnail.js +12 -0
- package/presentation/FileList/components/Thumbnail/Thumbnail.js.map +1 -0
- package/presentation/FileList/components/Thumbnail/index.d.ts +1 -0
- package/presentation/FileList/components/Thumbnail/index.js +1 -0
- package/presentation/FileList/components/Upload/UploadProgress.d.ts +9 -0
- package/presentation/FileList/components/Upload/UploadProgress.js +45 -0
- package/presentation/FileList/components/Upload/UploadProgress.js.map +1 -0
- package/presentation/FileList/components/Upload/index.d.ts +1 -0
- package/presentation/FileList/components/Upload/index.js +1 -0
- package/presentation/FileList/feature.d.ts +3 -0
- package/presentation/FileList/feature.js +17 -0
- package/presentation/FileList/feature.js.map +1 -0
- package/presentation/FileList/index.d.ts +5 -0
- package/presentation/FileList/index.js +3 -0
- package/presentation/FileManager/FileManagerBreadcrumbs.d.ts +12 -0
- package/presentation/FileManager/FileManagerBreadcrumbs.js +37 -0
- package/presentation/FileManager/FileManagerBreadcrumbs.js.map +1 -0
- package/presentation/FileManager/FileManagerRenderer.d.ts +2 -0
- package/presentation/FileManager/FileManagerRenderer.js +33 -0
- package/presentation/FileManager/FileManagerRenderer.js.map +1 -0
- package/presentation/FileManager/FileManagerView.d.ts +12 -0
- package/presentation/FileManager/FileManagerView.js +277 -0
- package/presentation/FileManager/FileManagerView.js.map +1 -0
- package/presentation/FileManager/OverlayContext.d.ts +14 -0
- package/presentation/FileManager/OverlayContext.js +11 -0
- package/presentation/FileManager/OverlayContext.js.map +1 -0
- package/presentation/FileManager/RouteParamsSync.d.ts +2 -0
- package/presentation/FileManager/RouteParamsSync.js +30 -0
- package/presentation/FileManager/RouteParamsSync.js.map +1 -0
- package/presentation/FileManager/outputFileSelectionError.d.ts +2 -0
- package/presentation/FileManager/outputFileSelectionError.js +27 -0
- package/presentation/FileManager/outputFileSelectionError.js.map +1 -0
- package/presentation/Settings/SettingsPresenter.d.ts +14 -0
- package/presentation/Settings/SettingsPresenter.js +78 -0
- package/presentation/Settings/SettingsPresenter.js.map +1 -0
- package/presentation/Settings/components/SettingsView.d.ts +4 -0
- package/presentation/Settings/components/SettingsView.js +45 -0
- package/presentation/Settings/components/SettingsView.js.map +1 -0
- package/presentation/config/DefaultFileManagerConfig.d.ts +2 -0
- package/presentation/config/DefaultFileManagerConfig.js +120 -0
- package/presentation/config/DefaultFileManagerConfig.js.map +1 -0
- package/presentation/config/FileManagerViewConfig.d.ts +242 -0
- package/presentation/config/FileManagerViewConfig.js +74 -0
- package/presentation/config/FileManagerViewConfig.js.map +1 -0
- package/presentation/config/configComponents/Browser/BulkAction.d.ts +28 -0
- package/presentation/config/configComponents/Browser/BulkAction.js +51 -0
- package/presentation/config/configComponents/Browser/BulkAction.js.map +1 -0
- package/presentation/config/configComponents/Browser/BulkEditField.js +24 -0
- package/presentation/config/configComponents/Browser/BulkEditField.js.map +1 -0
- package/presentation/config/configComponents/Browser/FileAction.d.ts +9 -0
- package/presentation/config/configComponents/Browser/FileAction.js +11 -0
- package/presentation/config/configComponents/Browser/FileAction.js.map +1 -0
- package/presentation/config/configComponents/Browser/Filter.js +37 -0
- package/presentation/config/configComponents/Browser/Filter.js.map +1 -0
- package/presentation/config/configComponents/Browser/FilterByTags.js +14 -0
- package/presentation/config/configComponents/Browser/FilterByTags.js.map +1 -0
- package/presentation/config/configComponents/Browser/FiltersToWhere.js +13 -0
- package/presentation/config/configComponents/Browser/FiltersToWhere.js.map +1 -0
- package/presentation/config/configComponents/Browser/FolderAction.d.ts +8 -0
- package/presentation/config/configComponents/Browser/FolderAction.js +10 -0
- package/presentation/config/configComponents/Browser/FolderAction.js.map +1 -0
- package/presentation/config/configComponents/Browser/FolderDropConfirmation.d.ts +5 -0
- package/presentation/config/configComponents/Browser/FolderDropConfirmation.js +7 -0
- package/presentation/config/configComponents/Browser/FolderDropConfirmation.js.map +1 -0
- package/presentation/config/configComponents/Browser/Grid/Action.js +33 -0
- package/presentation/config/configComponents/Browser/Grid/Action.js.map +1 -0
- package/presentation/config/configComponents/Browser/Grid/Thumbnail.d.ts +28 -0
- package/presentation/config/configComponents/Browser/Grid/Thumbnail.js +28 -0
- package/presentation/config/configComponents/Browser/Grid/Thumbnail.js.map +1 -0
- package/presentation/config/configComponents/Browser/Grid/index.d.ts +6 -0
- package/presentation/config/configComponents/Browser/Grid/index.js +0 -0
- package/presentation/config/configComponents/Browser/Table/Column.d.ts +33 -0
- package/presentation/config/configComponents/Browser/Table/Column.js +13 -0
- package/presentation/config/configComponents/Browser/Table/Column.js.map +1 -0
- package/presentation/config/configComponents/Browser/Table/Thumbnail.d.ts +28 -0
- package/presentation/config/configComponents/Browser/Table/Thumbnail.js +28 -0
- package/presentation/config/configComponents/Browser/Table/Thumbnail.js.map +1 -0
- package/presentation/config/configComponents/Browser/Table/index.d.ts +56 -0
- package/presentation/config/configComponents/Browser/Table/index.js +11 -0
- package/presentation/config/configComponents/Browser/Table/index.js.map +1 -0
- package/presentation/config/configComponents/Browser/index.d.ts +189 -0
- package/presentation/config/configComponents/Browser/index.js +39 -0
- package/presentation/config/configComponents/Browser/index.js.map +1 -0
- package/presentation/config/configComponents/FileDetails/Action.js +30 -0
- package/presentation/config/configComponents/FileDetails/Action.js.map +1 -0
- package/presentation/config/configComponents/FileDetails/Thumbnail.d.ts +28 -0
- package/presentation/config/configComponents/FileDetails/Thumbnail.js +25 -0
- package/presentation/config/configComponents/FileDetails/Thumbnail.js.map +1 -0
- package/presentation/config/configComponents/FileDetails/Width.js +13 -0
- package/presentation/config/configComponents/FileDetails/Width.js.map +1 -0
- package/presentation/config/configComponents/FileDetails/index.d.ts +54 -0
- package/presentation/config/configComponents/FileDetails/index.js +16 -0
- package/presentation/config/configComponents/FileDetails/index.js.map +1 -0
- package/presentation/config/fields/AccessControl.js +38 -0
- package/presentation/config/fields/AccessControl.js.map +1 -0
- package/presentation/config/fields/Tags.js +32 -0
- package/presentation/config/fields/Tags.js.map +1 -0
- package/presentation/config/fields/index.d.ts +2 -0
- package/presentation/config/fields/index.js +2 -0
- package/presentation/config/fields/useAccessControlField.d.ts +6 -0
- package/presentation/config/fields/useAccessControlField.js +21 -0
- package/presentation/config/fields/useAccessControlField.js.map +1 -0
- package/presentation/config/fields/useFileOrUndefined.js +13 -0
- package/presentation/config/fields/useFileOrUndefined.js.map +1 -0
- package/presentation/config/getThumbnailRenderer.d.ts +4 -0
- package/presentation/config/getThumbnailRenderer.js +16 -0
- package/presentation/config/getThumbnailRenderer.js.map +1 -0
- package/presentation/config/thumbnailRenderers/CroppedFileImage.d.ts +18 -0
- package/presentation/config/thumbnailRenderers/CroppedFileImage.js +66 -0
- package/presentation/config/thumbnailRenderers/CroppedFileImage.js.map +1 -0
- package/presentation/config/thumbnailRenderers/FilePreviewDefaultRenderer.js +11 -0
- package/presentation/config/thumbnailRenderers/FilePreviewDefaultRenderer.js.map +1 -0
- package/presentation/config/thumbnailRenderers/FilePreviewImageRenderer.js +15 -0
- package/presentation/config/thumbnailRenderers/FilePreviewImageRenderer.js.map +1 -0
- package/presentation/config/thumbnailRenderers/GridItemDefaultRenderer.js +11 -0
- package/presentation/config/thumbnailRenderers/GridItemDefaultRenderer.js.map +1 -0
- package/presentation/config/thumbnailRenderers/GridItemImageRenderer.js +15 -0
- package/presentation/config/thumbnailRenderers/GridItemImageRenderer.js.map +1 -0
- package/presentation/config/thumbnailRenderers/TableItemDefaultRenderer.js +18 -0
- package/presentation/config/thumbnailRenderers/TableItemDefaultRenderer.js.map +1 -0
- package/presentation/config/thumbnailRenderers/TableItemImageRenderer.js +15 -0
- package/presentation/config/thumbnailRenderers/TableItemImageRenderer.js.map +1 -0
- package/presentation/contexts/FileProvider.d.ts +12 -0
- package/presentation/contexts/FileProvider.js +13 -0
- package/presentation/contexts/FileProvider.js.map +1 -0
- package/presentation/fieldRenderers/CmsAssetPickerRenderer.d.ts +22 -0
- package/presentation/fieldRenderers/CmsAssetPickerRenderer.js +56 -0
- package/presentation/fieldRenderers/CmsAssetPickerRenderer.js.map +1 -0
- package/presentation/fieldRenderers/CmsFilePickerRenderer.d.ts +13 -0
- package/presentation/fieldRenderers/CmsFilePickerRenderer.js +36 -0
- package/presentation/fieldRenderers/CmsFilePickerRenderer.js.map +1 -0
- package/presentation/fieldRenderers/CmsImageEditorDialog.d.ts +7 -0
- package/presentation/fieldRenderers/CmsImageEditorDialog.js +32 -0
- package/presentation/fieldRenderers/CmsImageEditorDialog.js.map +1 -0
- package/presentation/fieldRenderers/CmsMultiAssetPickerRenderer.d.ts +18 -0
- package/presentation/fieldRenderers/CmsMultiAssetPickerRenderer.js +88 -0
- package/presentation/fieldRenderers/CmsMultiAssetPickerRenderer.js.map +1 -0
- package/presentation/fieldRenderers/CmsMultiFilePickerRenderer.d.ts +13 -0
- package/presentation/fieldRenderers/CmsMultiFilePickerRenderer.js +60 -0
- package/presentation/fieldRenderers/CmsMultiFilePickerRenderer.js.map +1 -0
- package/presentation/fieldRenderers/CroppedAssetThumb.d.ts +15 -0
- package/presentation/fieldRenderers/CroppedAssetThumb.js +25 -0
- package/presentation/fieldRenderers/CroppedAssetThumb.js.map +1 -0
- package/presentation/fieldRenderers/assetValue.d.ts +10 -0
- package/presentation/fieldRenderers/assetValue.js +94 -0
- package/presentation/fieldRenderers/assetValue.js.map +1 -0
- package/presentation/fieldRenderers/assetValue.test.d.ts +1 -0
- package/presentation/fieldRenderers/assetValue.test.js +54 -0
- package/presentation/fieldRenderers/assetValue.test.js.map +1 -0
- package/presentation/hooks/useCmsImageEditor.d.ts +10 -0
- package/presentation/hooks/useCmsImageEditor.js +76 -0
- package/presentation/hooks/useCmsImageEditor.js.map +1 -0
- package/presentation/hooks/useCopyFile.d.ts +11 -0
- package/presentation/hooks/useCopyFile.js +24 -0
- package/presentation/hooks/useCopyFile.js.map +1 -0
- package/presentation/hooks/useDeleteFile.d.ts +9 -0
- package/presentation/hooks/useDeleteFile.js +35 -0
- package/presentation/hooks/useDeleteFile.js.map +1 -0
- package/presentation/hooks/useEditImage.d.ts +14 -0
- package/presentation/hooks/useEditImage.js +67 -0
- package/presentation/hooks/useEditImage.js.map +1 -0
- package/presentation/hooks/useFile.d.ts +2 -0
- package/presentation/hooks/useFile.js +10 -0
- package/presentation/hooks/useFile.js.map +1 -0
- package/presentation/hooks/useMoveFileToFolder.d.ts +2 -0
- package/presentation/hooks/useMoveFileToFolder.js +36 -0
- package/presentation/hooks/useMoveFileToFolder.js.map +1 -0
- package/routes.d.ts +8 -0
- package/routes.js +18 -0
- package/routes.js.map +1 -0
- package/static/svg/folder-open.ae8d0fac.svg +1 -0
- package/BatchFileUploader.d.ts +0 -34
- package/BatchFileUploader.js +0 -87
- package/BatchFileUploader.js.map +0 -1
- package/components/BottomInfoBar/BottomInfoBar.d.ts +0 -6
- package/components/BottomInfoBar/BottomInfoBar.js +0 -23
- package/components/BottomInfoBar/BottomInfoBar.js.map +0 -1
- package/components/BottomInfoBar/ListStatus.js +0 -23
- package/components/BottomInfoBar/ListStatus.js.map +0 -1
- package/components/BottomInfoBar/SupportedFileTypes.d.ts +0 -9
- package/components/BottomInfoBar/SupportedFileTypes.js +0 -60
- package/components/BottomInfoBar/SupportedFileTypes.js.map +0 -1
- package/components/BottomInfoBar/index.d.ts +0 -1
- package/components/BottomInfoBar/index.js +0 -3
- package/components/BottomInfoBar/index.js.map +0 -1
- package/components/BulkActions/ActionDelete.d.ts +0 -4
- package/components/BulkActions/ActionDelete.js +0 -80
- package/components/BulkActions/ActionDelete.js.map +0 -1
- package/components/BulkActions/ActionEdit/ActionEdit.d.ts +0 -4
- package/components/BulkActions/ActionEdit/ActionEdit.js +0 -62
- package/components/BulkActions/ActionEdit/ActionEdit.js.map +0 -1
- package/components/BulkActions/ActionEdit/ActionEdit.types.d.ts +0 -2
- package/components/BulkActions/ActionEdit/ActionEdit.types.js +0 -3
- package/components/BulkActions/ActionEdit/ActionEdit.types.js.map +0 -1
- package/components/BulkActions/ActionEdit/ActionEditPresenter.d.ts +0 -35
- package/components/BulkActions/ActionEdit/ActionEditPresenter.js +0 -55
- package/components/BulkActions/ActionEdit/ActionEditPresenter.js.map +0 -1
- package/components/BulkActions/ActionEdit/ActionEditPresenter.test.js +0 -158
- package/components/BulkActions/ActionEdit/ActionEditPresenter.test.js.map +0 -1
- package/components/BulkActions/ActionEdit/BatchEditorDialog/AddOperation.d.ts +0 -7
- package/components/BulkActions/ActionEdit/BatchEditorDialog/AddOperation.js +0 -19
- package/components/BulkActions/ActionEdit/BatchEditorDialog/AddOperation.js.map +0 -1
- package/components/BulkActions/ActionEdit/BatchEditorDialog/BatchEditor.d.ts +0 -15
- package/components/BulkActions/ActionEdit/BatchEditorDialog/BatchEditor.js +0 -45
- package/components/BulkActions/ActionEdit/BatchEditorDialog/BatchEditor.js.map +0 -1
- package/components/BulkActions/ActionEdit/BatchEditorDialog/BatchEditorDialog.d.ts +0 -15
- package/components/BulkActions/ActionEdit/BatchEditorDialog/BatchEditorDialog.js +0 -52
- package/components/BulkActions/ActionEdit/BatchEditorDialog/BatchEditorDialog.js.map +0 -1
- package/components/BulkActions/ActionEdit/BatchEditorDialog/BatchEditorDialogPresenter.d.ts +0 -61
- package/components/BulkActions/ActionEdit/BatchEditorDialog/BatchEditorDialogPresenter.js +0 -140
- package/components/BulkActions/ActionEdit/BatchEditorDialog/BatchEditorDialogPresenter.js.map +0 -1
- package/components/BulkActions/ActionEdit/BatchEditorDialog/BatchEditorDialogPresenter.test.js +0 -336
- package/components/BulkActions/ActionEdit/BatchEditorDialog/BatchEditorDialogPresenter.test.js.map +0 -1
- package/components/BulkActions/ActionEdit/BatchEditorDialog/FieldRenderer.d.ts +0 -8
- package/components/BulkActions/ActionEdit/BatchEditorDialog/FieldRenderer.js +0 -33
- package/components/BulkActions/ActionEdit/BatchEditorDialog/FieldRenderer.js.map +0 -1
- package/components/BulkActions/ActionEdit/BatchEditorDialog/Operation.d.ts +0 -11
- package/components/BulkActions/ActionEdit/BatchEditorDialog/Operation.js +0 -41
- package/components/BulkActions/ActionEdit/BatchEditorDialog/Operation.js.map +0 -1
- package/components/BulkActions/ActionEdit/BatchEditorDialog/index.d.ts +0 -1
- package/components/BulkActions/ActionEdit/BatchEditorDialog/index.js +0 -3
- package/components/BulkActions/ActionEdit/BatchEditorDialog/index.js.map +0 -1
- package/components/BulkActions/ActionEdit/GraphQLInputMapper.d.ts +0 -41
- package/components/BulkActions/ActionEdit/GraphQLInputMapper.js +0 -44
- package/components/BulkActions/ActionEdit/GraphQLInputMapper.js.map +0 -1
- package/components/BulkActions/ActionEdit/GraphQLInputMapper.test.js +0 -270
- package/components/BulkActions/ActionEdit/GraphQLInputMapper.test.js.map +0 -1
- package/components/BulkActions/ActionEdit/domain/Batch.d.ts +0 -53
- package/components/BulkActions/ActionEdit/domain/Batch.js +0 -29
- package/components/BulkActions/ActionEdit/domain/Batch.js.map +0 -1
- package/components/BulkActions/ActionEdit/domain/BatchMapper.d.ts +0 -4
- package/components/BulkActions/ActionEdit/domain/BatchMapper.js +0 -13
- package/components/BulkActions/ActionEdit/domain/BatchMapper.js.map +0 -1
- package/components/BulkActions/ActionEdit/domain/Field.d.ts +0 -32
- package/components/BulkActions/ActionEdit/domain/Field.js +0 -47
- package/components/BulkActions/ActionEdit/domain/Field.js.map +0 -1
- package/components/BulkActions/ActionEdit/domain/FieldMapper.d.ts +0 -7
- package/components/BulkActions/ActionEdit/domain/FieldMapper.js +0 -22
- package/components/BulkActions/ActionEdit/domain/FieldMapper.js.map +0 -1
- package/components/BulkActions/ActionEdit/domain/index.d.ts +0 -4
- package/components/BulkActions/ActionEdit/domain/index.js +0 -6
- package/components/BulkActions/ActionEdit/domain/index.js.map +0 -1
- package/components/BulkActions/ActionEdit/index.d.ts +0 -1
- package/components/BulkActions/ActionEdit/index.js +0 -3
- package/components/BulkActions/ActionEdit/index.js.map +0 -1
- package/components/BulkActions/ActionEdit/useActionEditWorker.d.ts +0 -7
- package/components/BulkActions/ActionEdit/useActionEditWorker.js +0 -73
- package/components/BulkActions/ActionEdit/useActionEditWorker.js.map +0 -1
- package/components/BulkActions/ActionMove.d.ts +0 -4
- package/components/BulkActions/ActionMove.js +0 -91
- package/components/BulkActions/ActionMove.js.map +0 -1
- package/components/BulkActions/BulkActions.d.ts +0 -3
- package/components/BulkActions/BulkActions.js +0 -46
- package/components/BulkActions/BulkActions.js.map +0 -1
- package/components/BulkActions/index.d.ts +0 -4
- package/components/BulkActions/index.js +0 -6
- package/components/BulkActions/index.js.map +0 -1
- package/components/EditFileUsingUrl/EditFileUsingUrl.d.ts +0 -14
- package/components/EditFileUsingUrl/EditFileUsingUrl.js +0 -53
- package/components/EditFileUsingUrl/EditFileUsingUrl.js.map +0 -1
- package/components/EditFileUsingUrl/EditFileUsingUrlPresenter.d.ts +0 -18
- package/components/EditFileUsingUrl/EditFileUsingUrlPresenter.js +0 -43
- package/components/EditFileUsingUrl/EditFileUsingUrlPresenter.js.map +0 -1
- package/components/EditFileUsingUrl/EditFileUsingUrlRepository.d.ts +0 -17
- package/components/EditFileUsingUrl/EditFileUsingUrlRepository.js +0 -39
- package/components/EditFileUsingUrl/EditFileUsingUrlRepository.js.map +0 -1
- package/components/EditFileUsingUrl/GetFileByUrl.d.ts +0 -10
- package/components/EditFileUsingUrl/GetFileByUrl.js +0 -27
- package/components/EditFileUsingUrl/GetFileByUrl.js.map +0 -1
- package/components/EditFileUsingUrl/Loading.d.ts +0 -18
- package/components/EditFileUsingUrl/Loading.js +0 -42
- package/components/EditFileUsingUrl/Loading.js.map +0 -1
- package/components/EditFileUsingUrl/UpdateFile.d.ts +0 -10
- package/components/EditFileUsingUrl/UpdateFile.js +0 -10
- package/components/EditFileUsingUrl/UpdateFile.js.map +0 -1
- package/components/EditFileUsingUrl/getFileByUrl.graphql.d.ts +0 -2
- package/components/EditFileUsingUrl/getFileByUrl.graphql.js +0 -19
- package/components/EditFileUsingUrl/getFileByUrl.graphql.js.map +0 -1
- package/components/EditFileUsingUrl/index.d.ts +0 -1
- package/components/EditFileUsingUrl/index.js +0 -3
- package/components/EditFileUsingUrl/index.js.map +0 -1
- package/components/Empty/Empty.d.ts +0 -8
- package/components/Empty/Empty.js +0 -27
- package/components/Empty/Empty.js.map +0 -1
- package/components/Empty/index.d.ts +0 -1
- package/components/Empty/index.js +0 -3
- package/components/Empty/index.js.map +0 -1
- package/components/FileDetails/FileDetails.d.ts +0 -11
- package/components/FileDetails/FileDetails.js +0 -155
- package/components/FileDetails/FileDetails.js.map +0 -1
- package/components/FileDetails/FileDetailsProvider.d.ts +0 -16
- package/components/FileDetails/FileDetailsProvider.js +0 -21
- package/components/FileDetails/FileDetailsProvider.js.map +0 -1
- package/components/FileDetails/components/ActionButton.d.ts +0 -10
- package/components/FileDetails/components/ActionButton.js +0 -23
- package/components/FileDetails/components/ActionButton.js.map +0 -1
- package/components/FileDetails/components/Actions.js +0 -14
- package/components/FileDetails/components/Actions.js.map +0 -1
- package/components/FileDetails/components/BaseFields.d.ts +0 -7
- package/components/FileDetails/components/BaseFields.js +0 -29
- package/components/FileDetails/components/BaseFields.js.map +0 -1
- package/components/FileDetails/components/Content.d.ts +0 -14
- package/components/FileDetails/components/Content.js +0 -35
- package/components/FileDetails/components/Content.js.map +0 -1
- package/components/FileDetails/components/CreatedOn.js +0 -22
- package/components/FileDetails/components/CreatedOn.js.map +0 -1
- package/components/FileDetails/components/Description.js +0 -23
- package/components/FileDetails/components/Description.js.map +0 -1
- package/components/FileDetails/components/Extensions.d.ts +0 -7
- package/components/FileDetails/components/Extensions.js +0 -36
- package/components/FileDetails/components/Extensions.js.map +0 -1
- package/components/FileDetails/components/Preview.js +0 -12
- package/components/FileDetails/components/Preview.js.map +0 -1
- package/components/FileDetails/components/Thumbnail.js +0 -16
- package/components/FileDetails/components/Thumbnail.js.map +0 -1
- package/components/FileDetails/index.d.ts +0 -1
- package/components/FileDetails/index.js +0 -3
- package/components/FileDetails/index.js.map +0 -1
- package/components/FileDropArea/FileDropArea.js +0 -69
- package/components/FileDropArea/FileDropArea.js.map +0 -1
- package/components/FileDropArea/index.d.ts +0 -1
- package/components/FileDropArea/index.js +0 -3
- package/components/FileDropArea/index.js.map +0 -1
- package/components/FileDropPlaceholder/FileDropPlaceholder.js +0 -12
- package/components/FileDropPlaceholder/FileDropPlaceholder.js.map +0 -1
- package/components/FileDropPlaceholder/index.d.ts +0 -1
- package/components/FileDropPlaceholder/index.js +0 -3
- package/components/FileDropPlaceholder/index.js.map +0 -1
- package/components/Filters/Filters.d.ts +0 -2
- package/components/Filters/Filters.js +0 -26
- package/components/Filters/Filters.js.map +0 -1
- package/components/Filters/index.d.ts +0 -1
- package/components/Filters/index.js +0 -3
- package/components/Filters/index.js.map +0 -1
- package/components/Grid/ActionButton.js +0 -28
- package/components/Grid/ActionButton.js.map +0 -1
- package/components/Grid/File.d.ts +0 -32
- package/components/Grid/File.js +0 -89
- package/components/Grid/File.js.map +0 -1
- package/components/Grid/Grid.d.ts +0 -19
- package/components/Grid/Grid.js +0 -69
- package/components/Grid/Grid.js.map +0 -1
- package/components/Grid/Thumbnail.js +0 -16
- package/components/Grid/Thumbnail.js.map +0 -1
- package/components/Grid/index.d.ts +0 -1
- package/components/Grid/index.js +0 -3
- package/components/Grid/index.js.map +0 -1
- package/components/Header/Actions.d.ts +0 -5
- package/components/Header/Actions.js +0 -99
- package/components/Header/Actions.js.map +0 -1
- package/components/Header/Header.d.ts +0 -9
- package/components/Header/Header.js +0 -17
- package/components/Header/Header.js.map +0 -1
- package/components/Header/Title.d.ts +0 -2
- package/components/Header/Title.js +0 -62
- package/components/Header/Title.js.map +0 -1
- package/components/Header/index.d.ts +0 -1
- package/components/Header/index.js +0 -3
- package/components/Header/index.js.map +0 -1
- package/components/ImageEditor/ImageEditor.d.ts +0 -45
- package/components/ImageEditor/ImageEditor.js +0 -218
- package/components/ImageEditor/ImageEditor.js.map +0 -1
- package/components/ImageEditor/ImageEditorDialog.d.ts +0 -16
- package/components/ImageEditor/ImageEditorDialog.js +0 -53
- package/components/ImageEditor/ImageEditorDialog.js.map +0 -1
- package/components/ImageEditor/index.d.ts +0 -1
- package/components/ImageEditor/index.js +0 -3
- package/components/ImageEditor/index.js.map +0 -1
- package/components/ImageEditor/toolbar/crop.d.ts +0 -4
- package/components/ImageEditor/toolbar/crop.js +0 -67
- package/components/ImageEditor/toolbar/crop.js.map +0 -1
- package/components/ImageEditor/toolbar/filter.d.ts +0 -3
- package/components/ImageEditor/toolbar/filter.js +0 -167
- package/components/ImageEditor/toolbar/filter.js.map +0 -1
- package/components/ImageEditor/toolbar/flip.d.ts +0 -4
- package/components/ImageEditor/toolbar/flip.js +0 -94
- package/components/ImageEditor/toolbar/flip.js.map +0 -1
- package/components/ImageEditor/toolbar/index.d.ts +0 -4
- package/components/ImageEditor/toolbar/index.js +0 -6
- package/components/ImageEditor/toolbar/index.js.map +0 -1
- package/components/ImageEditor/toolbar/rotate.d.ts +0 -4
- package/components/ImageEditor/toolbar/rotate.js +0 -93
- package/components/ImageEditor/toolbar/rotate.js.map +0 -1
- package/components/ImageEditor/toolbar/types.d.ts +0 -32
- package/components/ImageEditor/toolbar/types.js +0 -3
- package/components/ImageEditor/toolbar/types.js.map +0 -1
- package/components/LayoutSwitch/LayoutSwitch.js +0 -22
- package/components/LayoutSwitch/LayoutSwitch.js.map +0 -1
- package/components/LayoutSwitch/index.d.ts +0 -1
- package/components/LayoutSwitch/index.js +0 -3
- package/components/LayoutSwitch/index.js.map +0 -1
- package/components/NoPermissions/NoPermissions.js +0 -28
- package/components/NoPermissions/NoPermissions.js.map +0 -1
- package/components/NoPermissions/index.d.ts +0 -1
- package/components/NoPermissions/index.js +0 -3
- package/components/NoPermissions/index.js.map +0 -1
- package/components/NoResults/NoResults.js +0 -22
- package/components/NoResults/NoResults.js.map +0 -1
- package/components/NoResults/index.d.ts +0 -1
- package/components/NoResults/index.js +0 -3
- package/components/NoResults/index.js.map +0 -1
- package/components/SearchWidget/SearchWidget.d.ts +0 -2
- package/components/SearchWidget/SearchWidget.js +0 -31
- package/components/SearchWidget/SearchWidget.js.map +0 -1
- package/components/SearchWidget/index.d.ts +0 -1
- package/components/SearchWidget/index.js +0 -3
- package/components/SearchWidget/index.js.map +0 -1
- package/components/Table/Actions/CopyFile.js +0 -26
- package/components/Table/Actions/CopyFile.js.map +0 -1
- package/components/Table/Actions/DeleteFile.js +0 -33
- package/components/Table/Actions/DeleteFile.js.map +0 -1
- package/components/Table/Actions/EditFile.js +0 -24
- package/components/Table/Actions/EditFile.js.map +0 -1
- package/components/Table/Actions/MoveFile.js +0 -22
- package/components/Table/Actions/MoveFile.js.map +0 -1
- package/components/Table/Actions/index.d.ts +0 -4
- package/components/Table/Actions/index.js +0 -6
- package/components/Table/Actions/index.js.map +0 -1
- package/components/Table/Cells/CellActions.js +0 -38
- package/components/Table/Cells/CellActions.js.map +0 -1
- package/components/Table/Cells/CellAuthor.js +0 -13
- package/components/Table/Cells/CellAuthor.js.map +0 -1
- package/components/Table/Cells/CellCreated.js +0 -16
- package/components/Table/Cells/CellCreated.js.map +0 -1
- package/components/Table/Cells/CellModified.js +0 -16
- package/components/Table/Cells/CellModified.js.map +0 -1
- package/components/Table/Cells/CellName.d.ts +0 -16
- package/components/Table/Cells/CellName.js +0 -70
- package/components/Table/Cells/CellName.js.map +0 -1
- package/components/Table/Cells/CellSize.js +0 -20
- package/components/Table/Cells/CellSize.js.map +0 -1
- package/components/Table/Cells/CellThumbnail.js +0 -16
- package/components/Table/Cells/CellThumbnail.js.map +0 -1
- package/components/Table/Cells/CellType.js +0 -17
- package/components/Table/Cells/CellType.js.map +0 -1
- package/components/Table/Cells/index.d.ts +0 -7
- package/components/Table/Cells/index.js +0 -9
- package/components/Table/Cells/index.js.map +0 -1
- package/components/Table/Table.d.ts +0 -10
- package/components/Table/Table.js +0 -30
- package/components/Table/Table.js.map +0 -1
- package/components/Table/index.d.ts +0 -3
- package/components/Table/index.js +0 -5
- package/components/Table/index.js.map +0 -1
- package/components/TagsList/Empty.js +0 -11
- package/components/TagsList/Empty.js.map +0 -1
- package/components/TagsList/FilterSelect.js +0 -28
- package/components/TagsList/FilterSelect.js.map +0 -1
- package/components/TagsList/FilterStatus.js +0 -27
- package/components/TagsList/FilterStatus.js.map +0 -1
- package/components/TagsList/Tag.d.ts +0 -9
- package/components/TagsList/Tag.js +0 -16
- package/components/TagsList/Tag.js.map +0 -1
- package/components/TagsList/Tags.d.ts +0 -8
- package/components/TagsList/Tags.js +0 -32
- package/components/TagsList/Tags.js.map +0 -1
- package/components/TagsList/TagsList.d.ts +0 -11
- package/components/TagsList/TagsList.js +0 -31
- package/components/TagsList/TagsList.js.map +0 -1
- package/components/TagsList/index.d.ts +0 -1
- package/components/TagsList/index.js +0 -3
- package/components/TagsList/index.js.map +0 -1
- package/components/Thumbnail/Thumbnail.d.ts +0 -2
- package/components/Thumbnail/Thumbnail.js +0 -16
- package/components/Thumbnail/Thumbnail.js.map +0 -1
- package/components/Thumbnail/index.d.ts +0 -1
- package/components/Thumbnail/index.js +0 -3
- package/components/Thumbnail/index.js.map +0 -1
- package/components/UploadStatus/UploadStatus.d.ts +0 -8
- package/components/UploadStatus/UploadStatus.js +0 -38
- package/components/UploadStatus/UploadStatus.js.map +0 -1
- package/components/UploadStatus/index.d.ts +0 -1
- package/components/UploadStatus/index.js +0 -3
- package/components/UploadStatus/index.js.map +0 -1
- package/components/fields/AccessControl.js +0 -49
- package/components/fields/AccessControl.js.map +0 -1
- package/components/fields/Aliases.d.ts +0 -2
- package/components/fields/Aliases.js +0 -85
- package/components/fields/Aliases.js.map +0 -1
- package/components/fields/Name.d.ts +0 -2
- package/components/fields/Name.js +0 -29
- package/components/fields/Name.js.map +0 -1
- package/components/fields/Tags.js +0 -39
- package/components/fields/Tags.js.map +0 -1
- package/components/fields/index.d.ts +0 -4
- package/components/fields/index.js +0 -6
- package/components/fields/index.js.map +0 -1
- package/components/fields/useAccessControlField.d.ts +0 -7
- package/components/fields/useAccessControlField.js +0 -26
- package/components/fields/useAccessControlField.js.map +0 -1
- package/components/fields/useFileOrUndefined.js +0 -12
- package/components/fields/useFileOrUndefined.js.map +0 -1
- package/constants.d.ts +0 -4
- package/constants.js +0 -6
- package/constants.js.map +0 -1
- package/contexts/FileProvider.d.ts +0 -13
- package/contexts/FileProvider.js +0 -22
- package/contexts/FileProvider.js.map +0 -1
- package/hooks/useCopyFile.d.ts +0 -11
- package/hooks/useCopyFile.js +0 -25
- package/hooks/useCopyFile.js.map +0 -1
- package/hooks/useDeleteFile.d.ts +0 -9
- package/hooks/useDeleteFile.js +0 -44
- package/hooks/useDeleteFile.js.map +0 -1
- package/hooks/useFile.d.ts +0 -2
- package/hooks/useFile.js +0 -11
- package/hooks/useFile.js.map +0 -1
- package/hooks/useFileDetails.d.ts +0 -2
- package/hooks/useFileDetails.js +0 -11
- package/hooks/useFileDetails.js.map +0 -1
- package/hooks/useFileModel.d.ts +0 -1
- package/hooks/useFileModel.js +0 -11
- package/hooks/useFileModel.js.map +0 -1
- package/hooks/useMoveFileToFolder.d.ts +0 -2
- package/hooks/useMoveFileToFolder.js +0 -32
- package/hooks/useMoveFileToFolder.js.map +0 -1
- package/index.js.map +0 -1
- package/modules/FileManagerApiProvider/FileManagerApiContext/FileManagerApiContext.d.ts +0 -44
- package/modules/FileManagerApiProvider/FileManagerApiContext/FileManagerApiContext.js +0 -210
- package/modules/FileManagerApiProvider/FileManagerApiContext/FileManagerApiContext.js.map +0 -1
- package/modules/FileManagerApiProvider/FileManagerApiContext/FileModelContext.d.ts +0 -6
- package/modules/FileManagerApiProvider/FileManagerApiContext/FileModelContext.js +0 -25
- package/modules/FileManagerApiProvider/FileManagerApiContext/FileModelContext.js.map +0 -1
- package/modules/FileManagerApiProvider/FileManagerApiContext/getFileGraphQLSelection.d.ts +0 -2
- package/modules/FileManagerApiProvider/FileManagerApiContext/getFileGraphQLSelection.js +0 -30
- package/modules/FileManagerApiProvider/FileManagerApiContext/getFileGraphQLSelection.js.map +0 -1
- package/modules/FileManagerApiProvider/FileManagerApiContext/getFileUploader.d.ts +0 -2
- package/modules/FileManagerApiProvider/FileManagerApiContext/getFileUploader.js +0 -10
- package/modules/FileManagerApiProvider/FileManagerApiContext/getFileUploader.js.map +0 -1
- package/modules/FileManagerApiProvider/FileManagerApiContext/index.d.ts +0 -3
- package/modules/FileManagerApiProvider/FileManagerApiContext/index.js +0 -5
- package/modules/FileManagerApiProvider/FileManagerApiContext/index.js.map +0 -1
- package/modules/FileManagerApiProvider/FileManagerApiContext/useFileManagerApi.d.ts +0 -3
- package/modules/FileManagerApiProvider/FileManagerApiContext/useFileManagerApi.js +0 -11
- package/modules/FileManagerApiProvider/FileManagerApiContext/useFileManagerApi.js.map +0 -1
- package/modules/FileManagerApiProvider/graphql.d.ts +0 -125
- package/modules/FileManagerApiProvider/graphql.js +0 -118
- package/modules/FileManagerApiProvider/graphql.js.map +0 -1
- package/modules/FileManagerApiProvider/index.d.ts +0 -2
- package/modules/FileManagerApiProvider/index.js +0 -18
- package/modules/FileManagerApiProvider/index.js.map +0 -1
- package/modules/FileManagerRenderer/FileActions/FileDetails/CopyUrl.js +0 -24
- package/modules/FileManagerRenderer/FileActions/FileDetails/CopyUrl.js.map +0 -1
- package/modules/FileManagerRenderer/FileActions/FileDetails/DeleteImage.js +0 -35
- package/modules/FileManagerRenderer/FileActions/FileDetails/DeleteImage.js.map +0 -1
- package/modules/FileManagerRenderer/FileActions/FileDetails/Download.js +0 -24
- package/modules/FileManagerRenderer/FileActions/FileDetails/Download.js.map +0 -1
- package/modules/FileManagerRenderer/FileActions/FileDetails/EditImage.js +0 -111
- package/modules/FileManagerRenderer/FileActions/FileDetails/EditImage.js.map +0 -1
- package/modules/FileManagerRenderer/FileActions/FileDetails/MoveToFolder.js +0 -19
- package/modules/FileManagerRenderer/FileActions/FileDetails/MoveToFolder.js.map +0 -1
- package/modules/FileManagerRenderer/FileActions/Grid/Delete.js +0 -29
- package/modules/FileManagerRenderer/FileActions/Grid/Delete.js.map +0 -1
- package/modules/FileManagerRenderer/FileActions/Grid/Download.js +0 -24
- package/modules/FileManagerRenderer/FileActions/Grid/Download.js.map +0 -1
- package/modules/FileManagerRenderer/FileActions/Grid/MoveToFolder.js +0 -19
- package/modules/FileManagerRenderer/FileActions/Grid/MoveToFolder.js.map +0 -1
- package/modules/FileManagerRenderer/FileActions/Grid/Settings.js +0 -23
- package/modules/FileManagerRenderer/FileActions/Grid/Settings.js.map +0 -1
- package/modules/FileManagerRenderer/FileActions/index.js +0 -47
- package/modules/FileManagerRenderer/FileActions/index.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/FileManagerView.d.ts +0 -5
- package/modules/FileManagerRenderer/FileManagerView/FileManagerView.js +0 -301
- package/modules/FileManagerRenderer/FileManagerView/FileManagerView.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/FileManagerViewConfig.d.ts +0 -281
- package/modules/FileManagerRenderer/FileManagerView/FileManagerViewConfig.js +0 -54
- package/modules/FileManagerRenderer/FileManagerView/FileManagerViewConfig.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/LeftSidebar.d.ts +0 -8
- package/modules/FileManagerRenderer/FileManagerView/LeftSidebar.js +0 -37
- package/modules/FileManagerRenderer/FileManagerView/LeftSidebar.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/NavigateFolderProvider.d.ts +0 -4
- package/modules/FileManagerRenderer/FileManagerView/NavigateFolderProvider.js +0 -26
- package/modules/FileManagerRenderer/FileManagerView/NavigateFolderProvider.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/BulkAction.d.ts +0 -26
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/BulkAction.js +0 -66
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/BulkAction.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/BulkEditField.js +0 -26
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/BulkEditField.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FileAction.d.ts +0 -8
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FileAction.js +0 -14
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FileAction.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Filter.js +0 -44
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Filter.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FilterByTags.js +0 -17
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FilterByTags.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FiltersToWhere.js +0 -16
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FiltersToWhere.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FolderAction.d.ts +0 -7
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FolderAction.js +0 -13
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FolderAction.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FolderFieldDecorator.d.ts +0 -7
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FolderFieldDecorator.js +0 -16
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FolderFieldDecorator.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Grid/Action.js +0 -38
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Grid/Action.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Grid/Thumbnail.d.ts +0 -28
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Grid/Thumbnail.js +0 -30
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Grid/Thumbnail.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Grid/index.d.ts +0 -6
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Grid/index.js +0 -3
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Grid/index.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Table/Column.d.ts +0 -32
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Table/Column.js +0 -16
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Table/Column.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Table/Thumbnail.d.ts +0 -28
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Table/Thumbnail.js +0 -30
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Table/Thumbnail.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Table/index.d.ts +0 -57
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Table/index.js +0 -10
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Table/index.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/index.d.ts +0 -196
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/index.js +0 -47
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/index.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/Action.js +0 -35
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/Action.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/Field.d.ts +0 -39
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/Field.js +0 -44
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/Field.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/FieldDecorator.d.ts +0 -8
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/FieldDecorator.js +0 -25
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/FieldDecorator.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/GroupFields.d.ts +0 -5
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/GroupFields.js +0 -16
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/GroupFields.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/Thumbnail.d.ts +0 -28
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/Thumbnail.js +0 -27
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/Thumbnail.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/Width.js +0 -16
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/Width.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/index.d.ts +0 -87
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/index.js +0 -23
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/index.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/getThumbnailRenderer.d.ts +0 -4
- package/modules/FileManagerRenderer/FileManagerView/getThumbnailRenderer.js +0 -21
- package/modules/FileManagerRenderer/FileManagerView/getThumbnailRenderer.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/index.d.ts +0 -13
- package/modules/FileManagerRenderer/FileManagerView/index.js +0 -88
- package/modules/FileManagerRenderer/FileManagerView/index.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/outputFileSelectionError.d.ts +0 -2
- package/modules/FileManagerRenderer/FileManagerView/outputFileSelectionError.js +0 -30
- package/modules/FileManagerRenderer/FileManagerView/outputFileSelectionError.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerViewProvider/FileManagerViewContext.d.ts +0 -86
- package/modules/FileManagerRenderer/FileManagerViewProvider/FileManagerViewContext.js +0 -458
- package/modules/FileManagerRenderer/FileManagerViewProvider/FileManagerViewContext.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerViewProvider/index.d.ts +0 -2
- package/modules/FileManagerRenderer/FileManagerViewProvider/index.js +0 -4
- package/modules/FileManagerRenderer/FileManagerViewProvider/index.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerViewProvider/setSelection.d.ts +0 -31
- package/modules/FileManagerRenderer/FileManagerViewProvider/setSelection.js +0 -100
- package/modules/FileManagerRenderer/FileManagerViewProvider/setSelection.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerViewProvider/state.d.ts +0 -33
- package/modules/FileManagerRenderer/FileManagerViewProvider/state.js +0 -34
- package/modules/FileManagerRenderer/FileManagerViewProvider/state.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerViewProvider/useFileManagerView.d.ts +0 -3
- package/modules/FileManagerRenderer/FileManagerViewProvider/useFileManagerView.js +0 -11
- package/modules/FileManagerRenderer/FileManagerViewProvider/useFileManagerView.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerViewProvider/useListFiles.d.ts +0 -25
- package/modules/FileManagerRenderer/FileManagerViewProvider/useListFiles.js +0 -153
- package/modules/FileManagerRenderer/FileManagerViewProvider/useListFiles.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerViewProvider/useTags.d.ts +0 -11
- package/modules/FileManagerRenderer/FileManagerViewProvider/useTags.js +0 -89
- package/modules/FileManagerRenderer/FileManagerViewProvider/useTags.js.map +0 -1
- package/modules/FileManagerRenderer/filters/FilterByType.js +0 -32
- package/modules/FileManagerRenderer/filters/FilterByType.js.map +0 -1
- package/modules/FileManagerRenderer/index.d.ts +0 -2
- package/modules/FileManagerRenderer/index.js +0 -139
- package/modules/FileManagerRenderer/index.js.map +0 -1
- package/modules/HeadlessCms/fileField.d.ts +0 -2
- package/modules/HeadlessCms/fileField.js +0 -40
- package/modules/HeadlessCms/fileField.js.map +0 -1
- package/modules/HeadlessCms/fileRenderer/fileField.d.ts +0 -2
- package/modules/HeadlessCms/fileRenderer/fileField.js +0 -62
- package/modules/HeadlessCms/fileRenderer/fileField.js.map +0 -1
- package/modules/HeadlessCms/fileRenderer/fileFields.d.ts +0 -2
- package/modules/HeadlessCms/fileRenderer/fileFields.js +0 -99
- package/modules/HeadlessCms/fileRenderer/fileFields.js.map +0 -1
- package/modules/HeadlessCms/fileRenderer/utils.d.ts +0 -2
- package/modules/HeadlessCms/fileRenderer/utils.js +0 -6
- package/modules/HeadlessCms/fileRenderer/utils.js.map +0 -1
- package/modules/HeadlessCms/index.d.ts +0 -1
- package/modules/HeadlessCms/index.js +0 -13
- package/modules/HeadlessCms/index.js.map +0 -1
- package/modules/Settings/graphql.d.ts +0 -12
- package/modules/Settings/graphql.js +0 -29
- package/modules/Settings/graphql.js.map +0 -1
- package/modules/Settings/plugins/installation.d.ts +0 -3
- package/modules/Settings/plugins/installation.js +0 -96
- package/modules/Settings/plugins/installation.js.map +0 -1
- package/modules/Settings/plugins/permissionRenderer/FileManagerPermissions.d.ts +0 -14
- package/modules/Settings/plugins/permissionRenderer/FileManagerPermissions.js +0 -205
- package/modules/Settings/plugins/permissionRenderer/FileManagerPermissions.js.map +0 -1
- package/modules/Settings/plugins/permissionRenderer/index.d.ts +0 -3
- package/modules/Settings/plugins/permissionRenderer/index.js +0 -23
- package/modules/Settings/plugins/permissionRenderer/index.js.map +0 -1
- package/modules/Settings/views/FileManagerSettings.d.ts +0 -2
- package/modules/Settings/views/FileManagerSettings.js +0 -106
- package/modules/Settings/views/FileManagerSettings.js.map +0 -1
- package/modules/ThumbnailRenderers/FilePreviewDefaultRenderer.js +0 -12
- package/modules/ThumbnailRenderers/FilePreviewDefaultRenderer.js.map +0 -1
- package/modules/ThumbnailRenderers/FilePreviewImageRenderer.js +0 -19
- package/modules/ThumbnailRenderers/FilePreviewImageRenderer.js.map +0 -1
- package/modules/ThumbnailRenderers/GridItemDefaultRenderer.js +0 -12
- package/modules/ThumbnailRenderers/GridItemDefaultRenderer.js.map +0 -1
- package/modules/ThumbnailRenderers/GridItemImageRenderer.js +0 -19
- package/modules/ThumbnailRenderers/GridItemImageRenderer.js.map +0 -1
- package/modules/ThumbnailRenderers/TableItemDefaultRenderer.js +0 -19
- package/modules/ThumbnailRenderers/TableItemDefaultRenderer.js.map +0 -1
- package/modules/ThumbnailRenderers/TableItemImageRenderer.js +0 -19
- package/modules/ThumbnailRenderers/TableItemImageRenderer.js.map +0 -1
- package/tagsHelpers.d.ts +0 -16
- package/tagsHelpers.js +0 -35
- package/tagsHelpers.js.map +0 -1
- package/types.d.ts +0 -34
- package/types.js +0 -3
- package/types.js.map +0 -1
- /package/{components/BulkActions/ActionEdit/ActionEditPresenter.test.d.ts → features/deleteFile/DeleteFile.test.d.ts} +0 -0
- /package/{components/BulkActions/ActionEdit/BatchEditorDialog/BatchEditorDialogPresenter.test.d.ts → features/fileUploader/FileUploader.test.d.ts} +0 -0
- /package/{components/BulkActions/ActionEdit/GraphQLInputMapper.test.d.ts → features/listFiles/ListFiles.test.d.ts} +0 -0
- /package/{modules/FileManagerRenderer → presentation}/FileActions/FileDetails/CopyUrl.d.ts +0 -0
- /package/{modules/FileManagerRenderer → presentation}/FileActions/FileDetails/DeleteImage.d.ts +0 -0
- /package/{modules/FileManagerRenderer → presentation}/FileActions/FileDetails/Download.d.ts +0 -0
- /package/{modules/FileManagerRenderer → presentation}/FileActions/FileDetails/EditImage.d.ts +0 -0
- /package/{modules/FileManagerRenderer → presentation}/FileActions/FileDetails/MoveToFolder.d.ts +0 -0
- /package/{modules/FileManagerRenderer → presentation}/FileActions/Grid/Delete.d.ts +0 -0
- /package/{modules/FileManagerRenderer → presentation}/FileActions/Grid/Download.d.ts +0 -0
- /package/{modules/FileManagerRenderer → presentation}/FileActions/Grid/MoveToFolder.d.ts +0 -0
- /package/{modules/FileManagerRenderer → presentation}/FileActions/Grid/Settings.d.ts +0 -0
- /package/{modules/FileManagerRenderer → presentation}/FileActions/index.d.ts +0 -0
- /package/{components → presentation}/FileDetails/components/Actions.d.ts +0 -0
- /package/{components → presentation}/FileDetails/components/CreatedOn.d.ts +0 -0
- /package/{components → presentation}/FileDetails/components/Description.d.ts +0 -0
- /package/{components → presentation}/FileDetails/components/Preview.d.ts +0 -0
- /package/{components → presentation}/FileDetails/components/Thumbnail.d.ts +0 -0
- /package/{components → presentation/FileList/components}/BottomInfoBar/ListStatus.d.ts +0 -0
- /package/{components → presentation/FileList/components}/FileDropArea/FileDropArea.d.ts +0 -0
- /package/{components → presentation/FileList/components}/FileDropPlaceholder/FileDropPlaceholder.d.ts +0 -0
- /package/{modules/FileManagerRenderer/filters → presentation/FileList/components/Filters}/FilterByType.d.ts +0 -0
- /package/{components → presentation/FileList/components}/Grid/ActionButton.d.ts +0 -0
- /package/{components → presentation/FileList/components}/LayoutSwitch/LayoutSwitch.d.ts +0 -0
- /package/{components → presentation/FileList/components}/NoPermissions/NoPermissions.d.ts +0 -0
- /package/{components → presentation/FileList/components}/NoResults/NoResults.d.ts +0 -0
- /package/{components → presentation/FileList/components}/Table/Actions/CopyFile.d.ts +0 -0
- /package/{components → presentation/FileList/components}/Table/Actions/DeleteFile.d.ts +0 -0
- /package/{components → presentation/FileList/components}/Table/Actions/EditFile.d.ts +0 -0
- /package/{components → presentation/FileList/components}/Table/Actions/MoveFile.d.ts +0 -0
- /package/{components → presentation/FileList/components}/Table/Cells/CellActions.d.ts +0 -0
- /package/{components → presentation/FileList/components}/Table/Cells/CellAuthor.d.ts +0 -0
- /package/{components → presentation/FileList/components}/Table/Cells/CellCreated.d.ts +0 -0
- /package/{components → presentation/FileList/components}/Table/Cells/CellModified.d.ts +0 -0
- /package/{components → presentation/FileList/components}/Table/Cells/CellSize.d.ts +0 -0
- /package/{components → presentation/FileList/components}/Table/Cells/CellThumbnail.d.ts +0 -0
- /package/{components → presentation/FileList/components}/Table/Cells/CellType.d.ts +0 -0
- /package/{components → presentation/FileList/components}/TagsList/Empty.d.ts +0 -0
- /package/{components → presentation/FileList/components}/TagsList/FilterSelect.d.ts +0 -0
- /package/{components → presentation/FileList/components}/TagsList/FilterStatus.d.ts +0 -0
- /package/{components/Grid → presentation/FileList/components/Thumbnail}/Thumbnail.d.ts +0 -0
- /package/{modules/FileManagerRenderer/FileManagerView → presentation/config}/configComponents/Browser/BulkEditField.d.ts +0 -0
- /package/{modules/FileManagerRenderer/FileManagerView → presentation/config}/configComponents/Browser/Filter.d.ts +0 -0
- /package/{modules/FileManagerRenderer/FileManagerView → presentation/config}/configComponents/Browser/FilterByTags.d.ts +0 -0
- /package/{modules/FileManagerRenderer/FileManagerView → presentation/config}/configComponents/Browser/FiltersToWhere.d.ts +0 -0
- /package/{modules/FileManagerRenderer/FileManagerView → presentation/config}/configComponents/Browser/Grid/Action.d.ts +0 -0
- /package/{modules/FileManagerRenderer/FileManagerView → presentation/config}/configComponents/FileDetails/Action.d.ts +0 -0
- /package/{modules/FileManagerRenderer/FileManagerView → presentation/config}/configComponents/FileDetails/Width.d.ts +0 -0
- /package/{components → presentation/config}/fields/AccessControl.d.ts +0 -0
- /package/{components → presentation/config}/fields/Tags.d.ts +0 -0
- /package/{components → presentation/config}/fields/useFileOrUndefined.d.ts +0 -0
- /package/{modules/ThumbnailRenderers → presentation/config/thumbnailRenderers}/FilePreviewDefaultRenderer.d.ts +0 -0
- /package/{modules/ThumbnailRenderers → presentation/config/thumbnailRenderers}/FilePreviewImageRenderer.d.ts +0 -0
- /package/{modules/ThumbnailRenderers → presentation/config/thumbnailRenderers}/GridItemDefaultRenderer.d.ts +0 -0
- /package/{modules/ThumbnailRenderers → presentation/config/thumbnailRenderers}/GridItemImageRenderer.d.ts +0 -0
- /package/{modules/ThumbnailRenderers → presentation/config/thumbnailRenderers}/TableItemDefaultRenderer.d.ts +0 -0
- /package/{modules/ThumbnailRenderers → presentation/config/thumbnailRenderers}/TableItemImageRenderer.d.ts +0 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import { applyImageEditToAsset, fileItemToAsset, isImageAsset } from "./assetValue.js";
|
|
3
|
+
describe("assetValue", ()=>{
|
|
4
|
+
it("fileItemToAsset writes mimeType and image dimensions at the root and in image", ()=>{
|
|
5
|
+
const asset = fileItemToAsset({
|
|
6
|
+
id: "file-1",
|
|
7
|
+
src: "https://cdn.test/files/file-1/cat.jpg",
|
|
8
|
+
name: "cat.jpg",
|
|
9
|
+
type: "image/jpeg",
|
|
10
|
+
size: 1234,
|
|
11
|
+
width: 1200,
|
|
12
|
+
height: 800
|
|
13
|
+
});
|
|
14
|
+
expect(asset.mimeType).toBe("image/jpeg");
|
|
15
|
+
expect(asset.width).toBe(1200);
|
|
16
|
+
expect(asset.height).toBe(800);
|
|
17
|
+
expect(asset.image).toEqual({
|
|
18
|
+
width: 1200,
|
|
19
|
+
height: 800
|
|
20
|
+
});
|
|
21
|
+
expect(isImageAsset(asset)).toBe(true);
|
|
22
|
+
});
|
|
23
|
+
it("applyImageEditToAsset keeps the root dimensions in sync and sets the cropped url", ()=>{
|
|
24
|
+
const asset = fileItemToAsset({
|
|
25
|
+
id: "file-1",
|
|
26
|
+
src: "https://cdn.test/files/file-1/cat.jpg",
|
|
27
|
+
name: "cat.jpg",
|
|
28
|
+
type: "image/jpeg",
|
|
29
|
+
size: 1234,
|
|
30
|
+
width: 1200,
|
|
31
|
+
height: 800
|
|
32
|
+
});
|
|
33
|
+
const edited = applyImageEditToAsset(asset, {
|
|
34
|
+
crop: {
|
|
35
|
+
top: 0.1,
|
|
36
|
+
left: 0,
|
|
37
|
+
bottom: 0.1,
|
|
38
|
+
right: 0
|
|
39
|
+
},
|
|
40
|
+
alt: "A cat"
|
|
41
|
+
});
|
|
42
|
+
expect(edited.width).toBe(1200);
|
|
43
|
+
expect(edited.height).toBe(800);
|
|
44
|
+
expect(edited.image).toMatchObject({
|
|
45
|
+
width: 1200,
|
|
46
|
+
height: 800,
|
|
47
|
+
alt: "A cat"
|
|
48
|
+
});
|
|
49
|
+
expect(edited.url).toBe("https://cdn.test/files/file-1/cat.jpg?crop=0.1,0,0.1,0");
|
|
50
|
+
expect(edited.src).toBe("https://cdn.test/files/file-1/cat.jpg");
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
//# sourceMappingURL=assetValue.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation/fieldRenderers/assetValue.test.js","sources":["../../../src/presentation/fieldRenderers/assetValue.test.ts"],"sourcesContent":["import { describe, it, expect } from \"vitest\";\nimport { applyImageEditToAsset, fileItemToAsset, isImageAsset } from \"./assetValue.js\";\n\ndescribe(\"assetValue\", () => {\n it(\"fileItemToAsset writes mimeType and image dimensions at the root and in image\", () => {\n const asset = fileItemToAsset({\n id: \"file-1\",\n src: \"https://cdn.test/files/file-1/cat.jpg\",\n name: \"cat.jpg\",\n type: \"image/jpeg\",\n size: 1234,\n width: 1200,\n height: 800\n });\n\n expect(asset.mimeType).toBe(\"image/jpeg\");\n expect(asset.width).toBe(1200);\n expect(asset.height).toBe(800);\n expect(asset.image).toEqual({ width: 1200, height: 800 });\n expect(isImageAsset(asset)).toBe(true);\n });\n\n it(\"applyImageEditToAsset keeps the root dimensions in sync and sets the cropped url\", () => {\n const asset = fileItemToAsset({\n id: \"file-1\",\n src: \"https://cdn.test/files/file-1/cat.jpg\",\n name: \"cat.jpg\",\n type: \"image/jpeg\",\n size: 1234,\n width: 1200,\n height: 800\n });\n\n const edited = applyImageEditToAsset(asset, {\n crop: { top: 0.1, left: 0, bottom: 0.1, right: 0 },\n alt: \"A cat\"\n });\n\n expect(edited.width).toBe(1200);\n expect(edited.height).toBe(800);\n expect(edited.image).toMatchObject({ width: 1200, height: 800, alt: \"A cat\" });\n expect(edited.url).toBe(\"https://cdn.test/files/file-1/cat.jpg?crop=0.1,0,0.1,0\");\n expect(edited.src).toBe(\"https://cdn.test/files/file-1/cat.jpg\");\n });\n});\n"],"names":["describe","it","asset","fileItemToAsset","expect","isImageAsset","edited","applyImageEditToAsset"],"mappings":";;AAGAA,SAAS,cAAc;IACnBC,GAAG,iFAAiF;QAChF,MAAMC,QAAQC,gBAAgB;YAC1B,IAAI;YACJ,KAAK;YACL,MAAM;YACN,MAAM;YACN,MAAM;YACN,OAAO;YACP,QAAQ;QACZ;QAEAC,OAAOF,MAAM,QAAQ,EAAE,IAAI,CAAC;QAC5BE,OAAOF,MAAM,KAAK,EAAE,IAAI,CAAC;QACzBE,OAAOF,MAAM,MAAM,EAAE,IAAI,CAAC;QAC1BE,OAAOF,MAAM,KAAK,EAAE,OAAO,CAAC;YAAE,OAAO;YAAM,QAAQ;QAAI;QACvDE,OAAOC,aAAaH,QAAQ,IAAI,CAAC;IACrC;IAEAD,GAAG,oFAAoF;QACnF,MAAMC,QAAQC,gBAAgB;YAC1B,IAAI;YACJ,KAAK;YACL,MAAM;YACN,MAAM;YACN,MAAM;YACN,OAAO;YACP,QAAQ;QACZ;QAEA,MAAMG,SAASC,sBAAsBL,OAAO;YACxC,MAAM;gBAAE,KAAK;gBAAK,MAAM;gBAAG,QAAQ;gBAAK,OAAO;YAAE;YACjD,KAAK;QACT;QAEAE,OAAOE,OAAO,KAAK,EAAE,IAAI,CAAC;QAC1BF,OAAOE,OAAO,MAAM,EAAE,IAAI,CAAC;QAC3BF,OAAOE,OAAO,KAAK,EAAE,aAAa,CAAC;YAAE,OAAO;YAAM,QAAQ;YAAK,KAAK;QAAQ;QAC5EF,OAAOE,OAAO,GAAG,EAAE,IAAI,CAAC;QACxBF,OAAOE,OAAO,GAAG,EAAE,IAAI,CAAC;IAC5B;AACJ"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ImageEditorValue } from "@webiny/admin-ui";
|
|
2
|
+
/** Whether a stored file URL points at a raster image we can crop (SVGs excluded). */
|
|
3
|
+
export declare const isEditableImageUrl: (url: string | undefined) => url is string;
|
|
4
|
+
export declare function useCmsImageEditor(): {
|
|
5
|
+
open: boolean;
|
|
6
|
+
openFor: (url: string) => Promise<void>;
|
|
7
|
+
close: () => void;
|
|
8
|
+
file: import("@webiny/sdk/index").FmFile | null;
|
|
9
|
+
save: (edit: ImageEditorValue) => Promise<void>;
|
|
10
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { useCallback, useState } from "react";
|
|
2
|
+
import { useSnackbar } from "@webiny/app-admin";
|
|
3
|
+
import { useContainer } from "@webiny/app";
|
|
4
|
+
import { GetFileUseCase } from "../../features/getFile/abstractions.js";
|
|
5
|
+
import { UpdateFileUseCase } from "../../features/updateFile/abstractions.js";
|
|
6
|
+
const IMAGE_URL = /\.(jpe?g|png|webp|avif|gif)$/i;
|
|
7
|
+
const isEditableImageUrl = (url)=>!!url && IMAGE_URL.test(url.split("?")[0]);
|
|
8
|
+
const parseFileId = (url)=>{
|
|
9
|
+
const clean = url.split("?")[0].replace(/\/+$/, "");
|
|
10
|
+
const parts = clean.split("/").filter(Boolean);
|
|
11
|
+
return parts.length >= 2 ? parts[parts.length - 2] : void 0;
|
|
12
|
+
};
|
|
13
|
+
function useCmsImageEditor() {
|
|
14
|
+
const { showSnackbar } = useSnackbar();
|
|
15
|
+
const container = useContainer();
|
|
16
|
+
const getFileUseCase = container.resolve(GetFileUseCase);
|
|
17
|
+
const updateFileUseCase = container.resolve(UpdateFileUseCase);
|
|
18
|
+
const [open, setOpen] = useState(false);
|
|
19
|
+
const [file, setFile] = useState(null);
|
|
20
|
+
const openFor = useCallback(async (url)=>{
|
|
21
|
+
const id = parseFileId(url);
|
|
22
|
+
if (!id) return void showSnackbar("Could not resolve the image to edit.");
|
|
23
|
+
const result = await getFileUseCase.execute({
|
|
24
|
+
id
|
|
25
|
+
});
|
|
26
|
+
if (result.success) {
|
|
27
|
+
setFile(result.file);
|
|
28
|
+
setOpen(true);
|
|
29
|
+
} else showSnackbar(result.error.message);
|
|
30
|
+
}, [
|
|
31
|
+
getFileUseCase,
|
|
32
|
+
showSnackbar
|
|
33
|
+
]);
|
|
34
|
+
const close = useCallback(()=>setOpen(false), []);
|
|
35
|
+
const save = useCallback(async (edit)=>{
|
|
36
|
+
if (!file) return;
|
|
37
|
+
const metadata = {
|
|
38
|
+
...file.metadata
|
|
39
|
+
};
|
|
40
|
+
const image = {
|
|
41
|
+
...metadata.image
|
|
42
|
+
};
|
|
43
|
+
image.crop = edit.crop ?? void 0;
|
|
44
|
+
image.focalPoint = edit.hotspot ? {
|
|
45
|
+
x: edit.hotspot.x,
|
|
46
|
+
y: edit.hotspot.y
|
|
47
|
+
} : void 0;
|
|
48
|
+
image.alt = edit.alt ?? void 0;
|
|
49
|
+
image.caption = edit.caption ?? void 0;
|
|
50
|
+
metadata.image = image;
|
|
51
|
+
const result = await updateFileUseCase.execute({
|
|
52
|
+
id: file.id,
|
|
53
|
+
data: {
|
|
54
|
+
metadata
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
if (result.success) {
|
|
58
|
+
showSnackbar("Image settings saved.");
|
|
59
|
+
setFile(result.file);
|
|
60
|
+
} else showSnackbar(result.error.message);
|
|
61
|
+
}, [
|
|
62
|
+
file,
|
|
63
|
+
updateFileUseCase,
|
|
64
|
+
showSnackbar
|
|
65
|
+
]);
|
|
66
|
+
return {
|
|
67
|
+
open,
|
|
68
|
+
openFor,
|
|
69
|
+
close,
|
|
70
|
+
file,
|
|
71
|
+
save
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
export { isEditableImageUrl, useCmsImageEditor };
|
|
75
|
+
|
|
76
|
+
//# sourceMappingURL=useCmsImageEditor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation/hooks/useCmsImageEditor.js","sources":["../../../src/presentation/hooks/useCmsImageEditor.ts"],"sourcesContent":["import { useCallback, useState } from \"react\";\nimport { useSnackbar } from \"@webiny/app-admin\";\nimport { useContainer } from \"@webiny/app\";\nimport type { ImageEditorValue } from \"@webiny/admin-ui\";\nimport { GetFileUseCase } from \"~/features/getFile/abstractions.js\";\nimport { UpdateFileUseCase } from \"~/features/updateFile/abstractions.js\";\nimport type { FileItem } from \"~/domain/types.js\";\n\nconst IMAGE_URL = /\\.(jpe?g|png|webp|avif|gif)$/i;\n\n/** Whether a stored file URL points at a raster image we can crop (SVGs excluded). */\nexport const isEditableImageUrl = (url: string | undefined): url is string => {\n return !!url && IMAGE_URL.test(url.split(\"?\")[0]);\n};\n\n/**\n * Resolve a File's id from its public URL. File keys are `{id}/{filename}` and the\n * URL is `{srcPrefix}{key}`, so the id is the second-to-last path segment (this is\n * the same convention the asset-delivery ObjectKey relies on).\n */\nconst parseFileId = (url: string): string | undefined => {\n const clean = url.split(\"?\")[0].replace(/\\/+$/, \"\");\n const parts = clean.split(\"/\").filter(Boolean);\n return parts.length >= 2 ? parts[parts.length - 2] : undefined;\n};\n\nexport function useCmsImageEditor() {\n const { showSnackbar } = useSnackbar();\n const container = useContainer();\n const getFileUseCase = container.resolve(GetFileUseCase);\n const updateFileUseCase = container.resolve(UpdateFileUseCase);\n\n const [open, setOpen] = useState(false);\n const [file, setFile] = useState<FileItem | null>(null);\n\n const openFor = useCallback(\n async (url: string) => {\n const id = parseFileId(url);\n if (!id) {\n showSnackbar(\"Could not resolve the image to edit.\");\n return;\n }\n const result = await getFileUseCase.execute({ id });\n if (result.success) {\n setFile(result.file);\n setOpen(true);\n } else {\n showSnackbar(result.error.message);\n }\n },\n [getFileUseCase, showSnackbar]\n );\n\n const close = useCallback(() => setOpen(false), []);\n\n const save = useCallback(\n async (edit: ImageEditorValue) => {\n if (!file) {\n return;\n }\n const metadata: Record<string, any> = { ...file.metadata };\n const image: Record<string, any> = { ...metadata.image };\n\n image.crop = edit.crop ?? undefined;\n image.focalPoint = edit.hotspot ? { x: edit.hotspot.x, y: edit.hotspot.y } : undefined;\n image.alt = edit.alt ?? undefined;\n image.caption = edit.caption ?? undefined;\n\n metadata.image = image;\n\n const result = await updateFileUseCase.execute({ id: file.id, data: { metadata } });\n if (result.success) {\n showSnackbar(\"Image settings saved.\");\n setFile(result.file);\n } else {\n showSnackbar(result.error.message);\n }\n },\n [file, updateFileUseCase, showSnackbar]\n );\n\n return { open, openFor, close, file, save };\n}\n"],"names":["IMAGE_URL","isEditableImageUrl","url","parseFileId","clean","parts","Boolean","undefined","useCmsImageEditor","showSnackbar","useSnackbar","container","useContainer","getFileUseCase","GetFileUseCase","updateFileUseCase","UpdateFileUseCase","open","setOpen","useState","file","setFile","openFor","useCallback","id","result","close","save","edit","metadata","image"],"mappings":";;;;;AAQA,MAAMA,YAAY;AAGX,MAAMC,qBAAqB,CAACC,MACxB,CAAC,CAACA,OAAOF,UAAU,IAAI,CAACE,IAAI,KAAK,CAAC,IAAI,CAAC,EAAE;AAQpD,MAAMC,cAAc,CAACD;IACjB,MAAME,QAAQF,IAAI,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,QAAQ;IAChD,MAAMG,QAAQD,MAAM,KAAK,CAAC,KAAK,MAAM,CAACE;IACtC,OAAOD,MAAM,MAAM,IAAI,IAAIA,KAAK,CAACA,MAAM,MAAM,GAAG,EAAE,GAAGE;AACzD;AAEO,SAASC;IACZ,MAAM,EAAEC,YAAY,EAAE,GAAGC;IACzB,MAAMC,YAAYC;IAClB,MAAMC,iBAAiBF,UAAU,OAAO,CAACG;IACzC,MAAMC,oBAAoBJ,UAAU,OAAO,CAACK;IAE5C,MAAM,CAACC,MAAMC,QAAQ,GAAGC,SAAS;IACjC,MAAM,CAACC,MAAMC,QAAQ,GAAGF,SAA0B;IAElD,MAAMG,UAAUC,YACZ,OAAOrB;QACH,MAAMsB,KAAKrB,YAAYD;QACvB,IAAI,CAACsB,IAAI,YACLf,aAAa;QAGjB,MAAMgB,SAAS,MAAMZ,eAAe,OAAO,CAAC;YAAEW;QAAG;QACjD,IAAIC,OAAO,OAAO,EAAE;YAChBJ,QAAQI,OAAO,IAAI;YACnBP,QAAQ;QACZ,OACIT,aAAagB,OAAO,KAAK,CAAC,OAAO;IAEzC,GACA;QAACZ;QAAgBJ;KAAa;IAGlC,MAAMiB,QAAQH,YAAY,IAAML,QAAQ,QAAQ,EAAE;IAElD,MAAMS,OAAOJ,YACT,OAAOK;QACH,IAAI,CAACR,MACD;QAEJ,MAAMS,WAAgC;YAAE,GAAGT,KAAK,QAAQ;QAAC;QACzD,MAAMU,QAA6B;YAAE,GAAGD,SAAS,KAAK;QAAC;QAEvDC,MAAM,IAAI,GAAGF,KAAK,IAAI,IAAIrB;QAC1BuB,MAAM,UAAU,GAAGF,KAAK,OAAO,GAAG;YAAE,GAAGA,KAAK,OAAO,CAAC,CAAC;YAAE,GAAGA,KAAK,OAAO,CAAC,CAAC;QAAC,IAAIrB;QAC7EuB,MAAM,GAAG,GAAGF,KAAK,GAAG,IAAIrB;QACxBuB,MAAM,OAAO,GAAGF,KAAK,OAAO,IAAIrB;QAEhCsB,SAAS,KAAK,GAAGC;QAEjB,MAAML,SAAS,MAAMV,kBAAkB,OAAO,CAAC;YAAE,IAAIK,KAAK,EAAE;YAAE,MAAM;gBAAES;YAAS;QAAE;QACjF,IAAIJ,OAAO,OAAO,EAAE;YAChBhB,aAAa;YACbY,QAAQI,OAAO,IAAI;QACvB,OACIhB,aAAagB,OAAO,KAAK,CAAC,OAAO;IAEzC,GACA;QAACL;QAAML;QAAmBN;KAAa;IAG3C,OAAO;QAAEQ;QAAMK;QAASI;QAAON;QAAMO;IAAK;AAC9C"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { FileItem } from "../../domain/types.js";
|
|
2
|
+
interface UseCopyFileParams {
|
|
3
|
+
file: {
|
|
4
|
+
key: FileItem["key"];
|
|
5
|
+
src?: FileItem["src"];
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
export declare const useCopyFile: ({ file }: UseCopyFileParams) => {
|
|
9
|
+
copyFileUrl: () => void;
|
|
10
|
+
};
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { useCallback } from "react";
|
|
2
|
+
import { i18n } from "@webiny/app/i18n/index.js";
|
|
3
|
+
import { useSnackbar } from "@webiny/app-admin";
|
|
4
|
+
import { useContainer } from "@webiny/app";
|
|
5
|
+
import { GetSettingsRepository } from "../../features/settings/abstractions.js";
|
|
6
|
+
const t = i18n.ns("app-admin/file-manager/hooks/use-copy-file");
|
|
7
|
+
const useCopyFile = ({ file })=>{
|
|
8
|
+
const container = useContainer();
|
|
9
|
+
const settingsRepository = container.resolve(GetSettingsRepository);
|
|
10
|
+
const { showSnackbar } = useSnackbar();
|
|
11
|
+
const copyFileUrl = useCallback(()=>{
|
|
12
|
+
const fileSrc = file.src || (settingsRepository.settings?.srcPrefix ?? "") + file.key;
|
|
13
|
+
navigator.clipboard.writeText(fileSrc);
|
|
14
|
+
showSnackbar(t`URL copied successfully.`);
|
|
15
|
+
}, [
|
|
16
|
+
file
|
|
17
|
+
]);
|
|
18
|
+
return {
|
|
19
|
+
copyFileUrl
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export { useCopyFile };
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=useCopyFile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation/hooks/useCopyFile.js","sources":["../../../src/presentation/hooks/useCopyFile.tsx"],"sourcesContent":["import { useCallback } from \"react\";\nimport { i18n } from \"@webiny/app/i18n/index.js\";\nimport { useSnackbar } from \"@webiny/app-admin\";\nimport { useContainer } from \"@webiny/app\";\nimport { GetSettingsRepository } from \"~/features/settings/abstractions.js\";\nimport type { FileItem } from \"~/domain/types.js\";\n\nconst t = i18n.ns(\"app-admin/file-manager/hooks/use-copy-file\");\n\ninterface UseCopyFileParams {\n file: {\n key: FileItem[\"key\"];\n src?: FileItem[\"src\"];\n };\n}\n\nexport const useCopyFile = ({ file }: UseCopyFileParams) => {\n const container = useContainer();\n const settingsRepository = container.resolve(GetSettingsRepository);\n const { showSnackbar } = useSnackbar();\n\n const copyFileUrl = useCallback(() => {\n const fileSrc = file.src || (settingsRepository.settings?.srcPrefix ?? \"\") + file.key;\n\n navigator.clipboard.writeText(fileSrc);\n showSnackbar(t`URL copied successfully.`);\n }, [file]);\n\n return {\n copyFileUrl\n };\n};\n"],"names":["t","i18n","useCopyFile","file","container","useContainer","settingsRepository","GetSettingsRepository","showSnackbar","useSnackbar","copyFileUrl","useCallback","fileSrc","navigator"],"mappings":";;;;;AAOA,MAAMA,IAAIC,KAAK,EAAE,CAAC;AASX,MAAMC,cAAc,CAAC,EAAEC,IAAI,EAAqB;IACnD,MAAMC,YAAYC;IAClB,MAAMC,qBAAqBF,UAAU,OAAO,CAACG;IAC7C,MAAM,EAAEC,YAAY,EAAE,GAAGC;IAEzB,MAAMC,cAAcC,YAAY;QAC5B,MAAMC,UAAUT,KAAK,GAAG,IAAKG,AAAAA,CAAAA,mBAAmB,QAAQ,EAAE,aAAa,EAAC,IAAKH,KAAK,GAAG;QAErFU,UAAU,SAAS,CAAC,SAAS,CAACD;QAC9BJ,aAAaR,CAAC,CAAC,wBAAwB,CAAC;IAC5C,GAAG;QAACG;KAAK;IAET,OAAO;QACHO;IACJ;AACJ"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { FileItem } from "../../domain/types.js";
|
|
2
|
+
interface UseDeleteFileParams {
|
|
3
|
+
file: Pick<FileItem, "id" | "name">;
|
|
4
|
+
onDelete?: () => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const useDeleteFile: ({ onDelete, file }: UseDeleteFileParams) => {
|
|
7
|
+
openDialogDeleteFile: () => void;
|
|
8
|
+
};
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import react, { useCallback } from "react";
|
|
2
|
+
import { i18n } from "@webiny/app/i18n/index.js";
|
|
3
|
+
import { Text } from "@webiny/admin-ui";
|
|
4
|
+
import { useConfirmationDialog, useSnackbar } from "@webiny/app-admin";
|
|
5
|
+
import { useContainer } from "@webiny/app";
|
|
6
|
+
import { DeleteFileUseCase } from "../../features/deleteFile/abstractions.js";
|
|
7
|
+
const t = i18n.ns("app-admin/file-manager/hooks/use-delete-file");
|
|
8
|
+
const useDeleteFile = ({ onDelete, file })=>{
|
|
9
|
+
const container = useContainer();
|
|
10
|
+
const deleteFileUseCase = container.resolve(DeleteFileUseCase);
|
|
11
|
+
const { showSnackbar } = useSnackbar();
|
|
12
|
+
const { showConfirmation } = useConfirmationDialog({
|
|
13
|
+
title: t`Delete file`,
|
|
14
|
+
loading: "Deleting file...",
|
|
15
|
+
message: file && /*#__PURE__*/ react.createElement(react.Fragment, null, /*#__PURE__*/ react.createElement(Text, null, t`You are about to delete file {name}. Are you sure you want to continue?`({
|
|
16
|
+
name: /*#__PURE__*/ react.createElement("strong", null, file.name)
|
|
17
|
+
}))),
|
|
18
|
+
dataTestId: "fm-delete-file-confirmation-dialog"
|
|
19
|
+
});
|
|
20
|
+
const openDialogDeleteFile = useCallback(()=>showConfirmation(async ()=>{
|
|
21
|
+
await deleteFileUseCase.execute({
|
|
22
|
+
id: file.id
|
|
23
|
+
});
|
|
24
|
+
showSnackbar(t`File deleted successfully.`);
|
|
25
|
+
if (onDelete && "function" == typeof onDelete) onDelete();
|
|
26
|
+
}), [
|
|
27
|
+
file
|
|
28
|
+
]);
|
|
29
|
+
return {
|
|
30
|
+
openDialogDeleteFile
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export { useDeleteFile };
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=useDeleteFile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation/hooks/useDeleteFile.js","sources":["../../../src/presentation/hooks/useDeleteFile.tsx"],"sourcesContent":["import React, { useCallback } from \"react\";\nimport { i18n } from \"@webiny/app/i18n/index.js\";\nimport { Text } from \"@webiny/admin-ui\";\nimport { useConfirmationDialog, useSnackbar } from \"@webiny/app-admin\";\nimport { useContainer } from \"@webiny/app\";\nimport { DeleteFileUseCase } from \"~/features/deleteFile/abstractions.js\";\nimport type { FileItem } from \"~/domain/types.js\";\n\nconst t = i18n.ns(\"app-admin/file-manager/hooks/use-delete-file\");\n\ninterface UseDeleteFileParams {\n file: Pick<FileItem, \"id\" | \"name\">;\n onDelete?: () => void;\n}\n\nexport const useDeleteFile = ({ onDelete, file }: UseDeleteFileParams) => {\n const container = useContainer();\n const deleteFileUseCase = container.resolve(DeleteFileUseCase);\n const { showSnackbar } = useSnackbar();\n\n const { showConfirmation } = useConfirmationDialog({\n title: t`Delete file`,\n loading: \"Deleting file...\",\n message: file && (\n <>\n <Text>\n {t`You are about to delete file {name}. Are you sure you want to continue?`({\n name: <strong>{file.name}</strong>\n })}\n </Text>\n </>\n ),\n dataTestId: \"fm-delete-file-confirmation-dialog\"\n });\n\n const openDialogDeleteFile = useCallback(\n () =>\n showConfirmation(async () => {\n await deleteFileUseCase.execute({ id: file.id });\n\n showSnackbar(t`File deleted successfully.`);\n\n if (onDelete && typeof onDelete === \"function\") {\n onDelete();\n }\n }),\n [file]\n );\n\n return {\n openDialogDeleteFile\n };\n};\n"],"names":["t","i18n","useDeleteFile","onDelete","file","container","useContainer","deleteFileUseCase","DeleteFileUseCase","showSnackbar","useSnackbar","showConfirmation","useConfirmationDialog","Text","openDialogDeleteFile","useCallback"],"mappings":";;;;;;AAQA,MAAMA,IAAIC,KAAK,EAAE,CAAC;AAOX,MAAMC,gBAAgB,CAAC,EAAEC,QAAQ,EAAEC,IAAI,EAAuB;IACjE,MAAMC,YAAYC;IAClB,MAAMC,oBAAoBF,UAAU,OAAO,CAACG;IAC5C,MAAM,EAAEC,YAAY,EAAE,GAAGC;IAEzB,MAAM,EAAEC,gBAAgB,EAAE,GAAGC,sBAAsB;QAC/C,OAAOZ,CAAC,CAAC,WAAW,CAAC;QACrB,SAAS;QACT,SAASI,QAAQ,WAARA,GACL,wDACI,oBAACS,MAAIA,MACAb,CAAC,CAAC,uEAAuE,CAAC,CAAC;YACxE,MAAM,WAAN,GAAM,oBAAC,gBAAQI,KAAK,IAAI;QAC5B;QAIZ,YAAY;IAChB;IAEA,MAAMU,uBAAuBC,YACzB,IACIJ,iBAAiB;YACb,MAAMJ,kBAAkB,OAAO,CAAC;gBAAE,IAAIH,KAAK,EAAE;YAAC;YAE9CK,aAAaT,CAAC,CAAC,0BAA0B,CAAC;YAE1C,IAAIG,YAAY,AAAoB,cAApB,OAAOA,UACnBA;QAER,IACJ;QAACC;KAAK;IAGV,OAAO;QACHU;IACJ;AACJ"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ImageEditorValue } from "@webiny/admin-ui";
|
|
2
|
+
import type { FileItem } from "../../domain/types.js";
|
|
3
|
+
interface UseEditImageOptions {
|
|
4
|
+
/** Called with the updated file after a successful save (e.g. to refresh the UI). */
|
|
5
|
+
onSaved?: (file: FileItem) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function useEditImage(file: FileItem, options?: UseEditImageOptions): {
|
|
8
|
+
open: boolean;
|
|
9
|
+
openEditor: () => void;
|
|
10
|
+
closeEditor: () => void;
|
|
11
|
+
value: ImageEditorValue | undefined;
|
|
12
|
+
save: (edit: ImageEditorValue) => Promise<void>;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { useCallback, useState } from "react";
|
|
2
|
+
import { useSnackbar } from "@webiny/app-admin";
|
|
3
|
+
import { useContainer } from "@webiny/app";
|
|
4
|
+
import { UpdateFileUseCase } from "../../features/updateFile/abstractions.js";
|
|
5
|
+
function useEditImage(file, options = {}) {
|
|
6
|
+
const { showSnackbar } = useSnackbar();
|
|
7
|
+
const container = useContainer();
|
|
8
|
+
const updateFileUseCase = container.resolve(UpdateFileUseCase);
|
|
9
|
+
const { onSaved } = options;
|
|
10
|
+
const [open, setOpen] = useState(false);
|
|
11
|
+
const img = file.metadata?.image;
|
|
12
|
+
const value = img ? {
|
|
13
|
+
crop: img.crop ?? void 0,
|
|
14
|
+
hotspot: img.focalPoint ? {
|
|
15
|
+
x: img.focalPoint.x,
|
|
16
|
+
y: img.focalPoint.y,
|
|
17
|
+
width: 1,
|
|
18
|
+
height: 1
|
|
19
|
+
} : void 0,
|
|
20
|
+
alt: img.alt ?? void 0,
|
|
21
|
+
caption: img.caption ?? void 0
|
|
22
|
+
} : void 0;
|
|
23
|
+
const openEditor = useCallback(()=>setOpen(true), []);
|
|
24
|
+
const closeEditor = useCallback(()=>setOpen(false), []);
|
|
25
|
+
const save = useCallback(async (edit)=>{
|
|
26
|
+
const metadata = {
|
|
27
|
+
...file.metadata
|
|
28
|
+
};
|
|
29
|
+
const image = {
|
|
30
|
+
...metadata.image
|
|
31
|
+
};
|
|
32
|
+
image.crop = edit.crop ?? void 0;
|
|
33
|
+
image.focalPoint = edit.hotspot ? {
|
|
34
|
+
x: edit.hotspot.x,
|
|
35
|
+
y: edit.hotspot.y
|
|
36
|
+
} : void 0;
|
|
37
|
+
image.alt = edit.alt ?? void 0;
|
|
38
|
+
image.caption = edit.caption ?? void 0;
|
|
39
|
+
metadata.image = image;
|
|
40
|
+
const result = await updateFileUseCase.execute({
|
|
41
|
+
id: file.id,
|
|
42
|
+
data: {
|
|
43
|
+
metadata
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
if (result.success) {
|
|
47
|
+
showSnackbar("Image settings saved.");
|
|
48
|
+
onSaved?.(result.file);
|
|
49
|
+
} else showSnackbar(result.error.message);
|
|
50
|
+
}, [
|
|
51
|
+
file.id,
|
|
52
|
+
file.metadata,
|
|
53
|
+
updateFileUseCase,
|
|
54
|
+
showSnackbar,
|
|
55
|
+
onSaved
|
|
56
|
+
]);
|
|
57
|
+
return {
|
|
58
|
+
open,
|
|
59
|
+
openEditor,
|
|
60
|
+
closeEditor,
|
|
61
|
+
value,
|
|
62
|
+
save
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
export { useEditImage };
|
|
66
|
+
|
|
67
|
+
//# sourceMappingURL=useEditImage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation/hooks/useEditImage.js","sources":["../../../src/presentation/hooks/useEditImage.ts"],"sourcesContent":["import { useCallback, useState } from \"react\";\nimport { useSnackbar } from \"@webiny/app-admin\";\nimport { useContainer } from \"@webiny/app\";\nimport type { ImageEditorValue } from \"@webiny/admin-ui\";\nimport { UpdateFileUseCase } from \"~/features/updateFile/abstractions.js\";\nimport type { FileItem } from \"~/domain/types.js\";\n\ninterface UseEditImageOptions {\n /** Called with the updated file after a successful save (e.g. to refresh the UI). */\n onSaved?: (file: FileItem) => void;\n}\n\nexport function useEditImage(file: FileItem, options: UseEditImageOptions = {}) {\n const { showSnackbar } = useSnackbar();\n const container = useContainer();\n const updateFileUseCase = container.resolve(UpdateFileUseCase);\n const { onSaved } = options;\n\n const [open, setOpen] = useState(false);\n\n const img = file.metadata?.image as Record<string, any> | undefined;\n const value: ImageEditorValue | undefined = img\n ? {\n crop: img.crop ?? undefined,\n hotspot: img.focalPoint\n ? { x: img.focalPoint.x, y: img.focalPoint.y, width: 1, height: 1 }\n : undefined,\n alt: img.alt ?? undefined,\n caption: img.caption ?? undefined\n }\n : undefined;\n\n const openEditor = useCallback(() => setOpen(true), []);\n const closeEditor = useCallback(() => setOpen(false), []);\n\n const save = useCallback(\n async (edit: ImageEditorValue) => {\n const metadata: Record<string, any> = { ...file.metadata };\n const image: Record<string, any> = { ...metadata.image };\n\n image.crop = edit.crop ?? undefined;\n image.focalPoint = edit.hotspot ? { x: edit.hotspot.x, y: edit.hotspot.y } : undefined;\n image.alt = edit.alt ?? undefined;\n image.caption = edit.caption ?? undefined;\n\n metadata.image = image;\n\n const result = await updateFileUseCase.execute({ id: file.id, data: { metadata } });\n\n if (result.success) {\n showSnackbar(`Image settings saved.`);\n onSaved?.(result.file);\n } else {\n showSnackbar(result.error.message);\n }\n },\n [file.id, file.metadata, updateFileUseCase, showSnackbar, onSaved]\n );\n\n return { open, openEditor, closeEditor, value, save };\n}\n"],"names":["useEditImage","file","options","showSnackbar","useSnackbar","container","useContainer","updateFileUseCase","UpdateFileUseCase","onSaved","open","setOpen","useState","img","value","undefined","openEditor","useCallback","closeEditor","save","edit","metadata","image","result"],"mappings":";;;;AAYO,SAASA,aAAaC,IAAc,EAAEC,UAA+B,CAAC,CAAC;IAC1E,MAAM,EAAEC,YAAY,EAAE,GAAGC;IACzB,MAAMC,YAAYC;IAClB,MAAMC,oBAAoBF,UAAU,OAAO,CAACG;IAC5C,MAAM,EAAEC,OAAO,EAAE,GAAGP;IAEpB,MAAM,CAACQ,MAAMC,QAAQ,GAAGC,SAAS;IAEjC,MAAMC,MAAMZ,KAAK,QAAQ,EAAE;IAC3B,MAAMa,QAAsCD,MACtC;QACI,MAAMA,IAAI,IAAI,IAAIE;QAClB,SAASF,IAAI,UAAU,GACjB;YAAE,GAAGA,IAAI,UAAU,CAAC,CAAC;YAAE,GAAGA,IAAI,UAAU,CAAC,CAAC;YAAE,OAAO;YAAG,QAAQ;QAAE,IAChEE;QACN,KAAKF,IAAI,GAAG,IAAIE;QAChB,SAASF,IAAI,OAAO,IAAIE;IAC5B,IACAA;IAEN,MAAMC,aAAaC,YAAY,IAAMN,QAAQ,OAAO,EAAE;IACtD,MAAMO,cAAcD,YAAY,IAAMN,QAAQ,QAAQ,EAAE;IAExD,MAAMQ,OAAOF,YACT,OAAOG;QACH,MAAMC,WAAgC;YAAE,GAAGpB,KAAK,QAAQ;QAAC;QACzD,MAAMqB,QAA6B;YAAE,GAAGD,SAAS,KAAK;QAAC;QAEvDC,MAAM,IAAI,GAAGF,KAAK,IAAI,IAAIL;QAC1BO,MAAM,UAAU,GAAGF,KAAK,OAAO,GAAG;YAAE,GAAGA,KAAK,OAAO,CAAC,CAAC;YAAE,GAAGA,KAAK,OAAO,CAAC,CAAC;QAAC,IAAIL;QAC7EO,MAAM,GAAG,GAAGF,KAAK,GAAG,IAAIL;QACxBO,MAAM,OAAO,GAAGF,KAAK,OAAO,IAAIL;QAEhCM,SAAS,KAAK,GAAGC;QAEjB,MAAMC,SAAS,MAAMhB,kBAAkB,OAAO,CAAC;YAAE,IAAIN,KAAK,EAAE;YAAE,MAAM;gBAAEoB;YAAS;QAAE;QAEjF,IAAIE,OAAO,OAAO,EAAE;YAChBpB,aAAa;YACbM,UAAUc,OAAO,IAAI;QACzB,OACIpB,aAAaoB,OAAO,KAAK,CAAC,OAAO;IAEzC,GACA;QAACtB,KAAK,EAAE;QAAEA,KAAK,QAAQ;QAAEM;QAAmBJ;QAAcM;KAAQ;IAGtE,OAAO;QAAEC;QAAMM;QAAYE;QAAaJ;QAAOK;IAAK;AACxD"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import react from "react";
|
|
2
|
+
import { FileContext } from "../contexts/FileProvider.js";
|
|
3
|
+
const useFile = ()=>{
|
|
4
|
+
const context = react.useContext(FileContext);
|
|
5
|
+
if (!context) throw Error('FileContext is missing in the component tree. Are you using "useFile()" hook in the right place?');
|
|
6
|
+
return context;
|
|
7
|
+
};
|
|
8
|
+
export { useFile };
|
|
9
|
+
|
|
10
|
+
//# sourceMappingURL=useFile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation/hooks/useFile.js","sources":["../../../src/presentation/hooks/useFile.ts"],"sourcesContent":["import React from \"react\";\nimport { FileContext } from \"~/presentation/contexts/FileProvider.js\";\n\nexport const useFile = () => {\n const context = React.useContext(FileContext);\n if (!context) {\n throw Error(\n `FileContext is missing in the component tree. Are you using \"useFile()\" hook in the right place?`\n );\n }\n\n return context;\n};\n"],"names":["useFile","context","React","FileContext","Error"],"mappings":";;AAGO,MAAMA,UAAU;IACnB,MAAMC,UAAUC,MAAAA,UAAgB,CAACC;IACjC,IAAI,CAACF,SACD,MAAMG,MACF;IAIR,OAAOH;AACX"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { useCallback } from "react";
|
|
2
|
+
import { useSnackbar } from "@webiny/app-admin";
|
|
3
|
+
import { useMoveToFolderDialog } from "@webiny/app-aco";
|
|
4
|
+
import { useContainer } from "@webiny/app";
|
|
5
|
+
import { UpdateFileUseCase } from "../../features/updateFile/abstractions.js";
|
|
6
|
+
function useMoveFileToFolder(file) {
|
|
7
|
+
const { showSnackbar } = useSnackbar();
|
|
8
|
+
const { showDialog } = useMoveToFolderDialog();
|
|
9
|
+
const container = useContainer();
|
|
10
|
+
const updateFileUseCase = container.resolve(UpdateFileUseCase);
|
|
11
|
+
return useCallback(()=>{
|
|
12
|
+
showDialog({
|
|
13
|
+
title: "Move file to a new location",
|
|
14
|
+
message: "Select a new location for this file:",
|
|
15
|
+
loadingLabel: "Moving file...",
|
|
16
|
+
acceptLabel: "Move file",
|
|
17
|
+
focusedFolderId: file.location.folderId,
|
|
18
|
+
async onAccept ({ folder }) {
|
|
19
|
+
await updateFileUseCase.execute({
|
|
20
|
+
id: file.id,
|
|
21
|
+
data: {
|
|
22
|
+
location: {
|
|
23
|
+
folderId: folder.id
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
showSnackbar(`File "${file.name}" was successfully moved to folder "${folder.label}"!`);
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}, [
|
|
31
|
+
file.id
|
|
32
|
+
]);
|
|
33
|
+
}
|
|
34
|
+
export { useMoveFileToFolder };
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=useMoveFileToFolder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation/hooks/useMoveFileToFolder.js","sources":["../../../src/presentation/hooks/useMoveFileToFolder.ts"],"sourcesContent":["import { useCallback } from \"react\";\nimport { useSnackbar } from \"@webiny/app-admin\";\nimport { useMoveToFolderDialog } from \"@webiny/app-aco\";\nimport { useContainer } from \"@webiny/app\";\nimport { UpdateFileUseCase } from \"~/features/updateFile/abstractions.js\";\nimport type { FileItem } from \"~/domain/types.js\";\n\nexport function useMoveFileToFolder(file: FileItem) {\n const { showSnackbar } = useSnackbar();\n const { showDialog } = useMoveToFolderDialog();\n const container = useContainer();\n const updateFileUseCase = container.resolve(UpdateFileUseCase);\n\n return useCallback(() => {\n showDialog({\n title: \"Move file to a new location\",\n message: \"Select a new location for this file:\",\n loadingLabel: \"Moving file...\",\n acceptLabel: \"Move file\",\n focusedFolderId: file.location.folderId,\n async onAccept({ folder }) {\n await updateFileUseCase.execute({\n id: file.id,\n data: { location: { folderId: folder.id } }\n });\n showSnackbar(\n `File \"${file.name}\" was successfully moved to folder \"${folder.label}\"!`\n );\n }\n });\n }, [file.id]);\n}\n"],"names":["useMoveFileToFolder","file","showSnackbar","useSnackbar","showDialog","useMoveToFolderDialog","container","useContainer","updateFileUseCase","UpdateFileUseCase","useCallback","folder"],"mappings":";;;;;AAOO,SAASA,oBAAoBC,IAAc;IAC9C,MAAM,EAAEC,YAAY,EAAE,GAAGC;IACzB,MAAM,EAAEC,UAAU,EAAE,GAAGC;IACvB,MAAMC,YAAYC;IAClB,MAAMC,oBAAoBF,UAAU,OAAO,CAACG;IAE5C,OAAOC,YAAY;QACfN,WAAW;YACP,OAAO;YACP,SAAS;YACT,cAAc;YACd,aAAa;YACb,iBAAiBH,KAAK,QAAQ,CAAC,QAAQ;YACvC,MAAM,UAAS,EAAEU,MAAM,EAAE;gBACrB,MAAMH,kBAAkB,OAAO,CAAC;oBAC5B,IAAIP,KAAK,EAAE;oBACX,MAAM;wBAAE,UAAU;4BAAE,UAAUU,OAAO,EAAE;wBAAC;oBAAE;gBAC9C;gBACAT,aACI,CAAC,MAAM,EAAED,KAAK,IAAI,CAAC,oCAAoC,EAAEU,OAAO,KAAK,CAAC,EAAE,CAAC;YAEjF;QACJ;IACJ,GAAG;QAACV,KAAK,EAAE;KAAC;AAChB"}
|
package/routes.d.ts
ADDED
package/routes.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Route } from "@webiny/app-admin";
|
|
2
|
+
const Routes = {
|
|
3
|
+
List: new Route({
|
|
4
|
+
name: "FileManager/List",
|
|
5
|
+
path: "/file-manager",
|
|
6
|
+
params: (zod)=>({
|
|
7
|
+
folderId: zod.string().optional(),
|
|
8
|
+
search: zod.string().optional()
|
|
9
|
+
})
|
|
10
|
+
}),
|
|
11
|
+
Settings: new Route({
|
|
12
|
+
name: "FileManager/Settings",
|
|
13
|
+
path: "/settings/file-manager/general"
|
|
14
|
+
})
|
|
15
|
+
};
|
|
16
|
+
export { Routes };
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=routes.js.map
|
package/routes.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routes.js","sources":["../src/routes.ts"],"sourcesContent":["import { Route } from \"@webiny/app-admin\";\n\nexport const Routes = {\n List: new Route({\n name: \"FileManager/List\",\n path: \"/file-manager\",\n params: zod => {\n return {\n folderId: zod.string().optional(),\n search: zod.string().optional()\n };\n }\n }),\n Settings: new Route({\n name: \"FileManager/Settings\",\n path: \"/settings/file-manager/general\"\n })\n};\n"],"names":["Routes","Route","zod"],"mappings":";AAEO,MAAMA,SAAS;IAClB,MAAM,IAAIC,MAAM;QACZ,MAAM;QACN,MAAM;QACN,QAAQC,CAAAA,MACG;gBACH,UAAUA,IAAI,MAAM,GAAG,QAAQ;gBAC/B,QAAQA,IAAI,MAAM,GAAG,QAAQ;YACjC;IAER;IACA,UAAU,IAAID,MAAM;QAChB,MAAM;QACN,MAAM;IACV;AACJ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black" width="24px" height="24px"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M20 6h-8l-1.41-1.41C10.21 4.21 9.7 4 9.17 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-1 12H5c-.55 0-1-.45-1-1V9c0-.55.45-1 1-1h14c.55 0 1 .45 1 1v8c0 .55-.45 1-1 1z"/></svg>
|
package/BatchFileUploader.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { FileItem } from "@webiny/app-admin/types";
|
|
2
|
-
import type { FileManagerViewContext } from "./modules/FileManagerRenderer/FileManagerViewProvider";
|
|
3
|
-
export interface FileError {
|
|
4
|
-
file: File;
|
|
5
|
-
e: Error;
|
|
6
|
-
}
|
|
7
|
-
interface OnUploadFinishedParams {
|
|
8
|
-
uploaded: FileItem[];
|
|
9
|
-
errors: FileError[];
|
|
10
|
-
}
|
|
11
|
-
interface OnUploadFinishedCallback {
|
|
12
|
-
(params: OnUploadFinishedParams): void;
|
|
13
|
-
}
|
|
14
|
-
declare class FileJob {
|
|
15
|
-
id: string;
|
|
16
|
-
file: File;
|
|
17
|
-
constructor(file: File);
|
|
18
|
-
}
|
|
19
|
-
export declare class BatchFileUploader {
|
|
20
|
-
private readonly uploader;
|
|
21
|
-
private fileJobs;
|
|
22
|
-
private onUploadFinishedCallback;
|
|
23
|
-
private uploading;
|
|
24
|
-
private uploadStatus;
|
|
25
|
-
constructor(uploader: FileManagerViewContext["uploadFile"]);
|
|
26
|
-
getJobs(): FileJob[];
|
|
27
|
-
addFiles(files: File[]): void;
|
|
28
|
-
reset(): void;
|
|
29
|
-
get progress(): number;
|
|
30
|
-
onUploadFinished(cb: OnUploadFinishedCallback): void;
|
|
31
|
-
private upload;
|
|
32
|
-
private getNextFile;
|
|
33
|
-
}
|
|
34
|
-
export {};
|
package/BatchFileUploader.js
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { generateId } from "@webiny/utils";
|
|
2
|
-
import { makeAutoObservable, runInAction, action } from "mobx";
|
|
3
|
-
class FileJob {
|
|
4
|
-
constructor(file) {
|
|
5
|
-
this.id = generateId();
|
|
6
|
-
this.file = file;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
export class BatchFileUploader {
|
|
10
|
-
fileJobs = [];
|
|
11
|
-
uploading = false;
|
|
12
|
-
uploadStatus = new Map();
|
|
13
|
-
constructor(uploader) {
|
|
14
|
-
this.uploader = uploader;
|
|
15
|
-
makeAutoObservable(this);
|
|
16
|
-
}
|
|
17
|
-
getJobs() {
|
|
18
|
-
return this.fileJobs;
|
|
19
|
-
}
|
|
20
|
-
addFiles(files) {
|
|
21
|
-
files.forEach(file => {
|
|
22
|
-
const fileJob = new FileJob(file);
|
|
23
|
-
this.fileJobs.push(fileJob);
|
|
24
|
-
this.uploadStatus.set(fileJob.id, 0);
|
|
25
|
-
});
|
|
26
|
-
this.upload();
|
|
27
|
-
}
|
|
28
|
-
reset() {
|
|
29
|
-
this.fileJobs = [];
|
|
30
|
-
this.uploadStatus.clear();
|
|
31
|
-
}
|
|
32
|
-
get progress() {
|
|
33
|
-
const progressInBytes = Array.from(this.uploadStatus.values());
|
|
34
|
-
const loadedBytes = progressInBytes.reduce((a, b) => a + b, 0);
|
|
35
|
-
const totalBytesToUpload = this.fileJobs.reduce((sum, job) => sum + job.file.size, 0);
|
|
36
|
-
return Math.min(100 * loadedBytes / totalBytesToUpload, 100);
|
|
37
|
-
}
|
|
38
|
-
onUploadFinished(cb) {
|
|
39
|
-
this.onUploadFinishedCallback = cb;
|
|
40
|
-
}
|
|
41
|
-
async upload() {
|
|
42
|
-
if (this.uploading) {
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
this.uploading = true;
|
|
46
|
-
const errors = [];
|
|
47
|
-
const uploaded = [];
|
|
48
|
-
while (true) {
|
|
49
|
-
const fileJob = this.getNextFile();
|
|
50
|
-
if (!fileJob) {
|
|
51
|
-
break;
|
|
52
|
-
}
|
|
53
|
-
try {
|
|
54
|
-
const newFile = await this.uploader(fileJob.file, {
|
|
55
|
-
onProgress: action("BatchFileUploader.onProgress", event => {
|
|
56
|
-
this.uploadStatus.set(fileJob.id, event.sent);
|
|
57
|
-
})
|
|
58
|
-
});
|
|
59
|
-
if (newFile) {
|
|
60
|
-
uploaded.push(newFile);
|
|
61
|
-
}
|
|
62
|
-
} catch (e) {
|
|
63
|
-
runInAction(() => {
|
|
64
|
-
this.uploadStatus.set(fileJob.id, -1);
|
|
65
|
-
});
|
|
66
|
-
errors.push({
|
|
67
|
-
file: fileJob.file,
|
|
68
|
-
e
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
runInAction(() => {
|
|
73
|
-
this.uploading = false;
|
|
74
|
-
});
|
|
75
|
-
if (this.onUploadFinishedCallback) {
|
|
76
|
-
this.onUploadFinishedCallback({
|
|
77
|
-
uploaded,
|
|
78
|
-
errors
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
getNextFile() {
|
|
83
|
-
return this.fileJobs.find(file => this.uploadStatus.get(file.id) === 0);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
//# sourceMappingURL=BatchFileUploader.js.map
|
package/BatchFileUploader.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["generateId","makeAutoObservable","runInAction","action","FileJob","constructor","file","id","BatchFileUploader","fileJobs","uploading","uploadStatus","Map","uploader","getJobs","addFiles","files","forEach","fileJob","push","set","upload","reset","clear","progress","progressInBytes","Array","from","values","loadedBytes","reduce","a","b","totalBytesToUpload","sum","job","size","Math","min","onUploadFinished","cb","onUploadFinishedCallback","errors","uploaded","getNextFile","newFile","onProgress","event","sent","e","find","get"],"sources":["BatchFileUploader.ts"],"sourcesContent":["import { generateId } from \"@webiny/utils\";\nimport { makeAutoObservable, runInAction, action } from \"mobx\";\nimport type { FileItem } from \"@webiny/app-admin/types\";\nimport type { FileManagerViewContext } from \"~/modules/FileManagerRenderer/FileManagerViewProvider\";\n\nexport interface FileError {\n file: File;\n e: Error;\n}\n\ninterface OnUploadFinishedParams {\n uploaded: FileItem[];\n errors: FileError[];\n}\n\ninterface OnUploadFinishedCallback {\n (params: OnUploadFinishedParams): void;\n}\n\nclass FileJob {\n public id: string;\n public file: File;\n\n constructor(file: File) {\n this.id = generateId();\n this.file = file;\n }\n}\n\nexport class BatchFileUploader {\n private readonly uploader: FileManagerViewContext[\"uploadFile\"];\n private fileJobs: FileJob[] = [];\n private onUploadFinishedCallback: OnUploadFinishedCallback | undefined;\n private uploading = false;\n private uploadStatus: Map<string, number> = new Map();\n\n constructor(uploader: FileManagerViewContext[\"uploadFile\"]) {\n this.uploader = uploader;\n makeAutoObservable(this);\n }\n\n public getJobs() {\n return this.fileJobs;\n }\n\n public addFiles(files: File[]) {\n files.forEach(file => {\n const fileJob = new FileJob(file);\n this.fileJobs.push(fileJob);\n this.uploadStatus.set(fileJob.id, 0);\n });\n\n this.upload();\n }\n\n public reset() {\n this.fileJobs = [];\n this.uploadStatus.clear();\n }\n\n get progress() {\n const progressInBytes = Array.from(this.uploadStatus.values());\n const loadedBytes = progressInBytes.reduce((a, b) => a + b, 0);\n const totalBytesToUpload = this.fileJobs.reduce((sum, job) => sum + job.file.size, 0);\n return Math.min((100 * loadedBytes) / totalBytesToUpload, 100);\n }\n\n public onUploadFinished(cb: OnUploadFinishedCallback) {\n this.onUploadFinishedCallback = cb;\n }\n\n private async upload() {\n if (this.uploading) {\n return;\n }\n\n this.uploading = true;\n\n const errors: FileError[] = [];\n const uploaded: FileItem[] = [];\n\n while (true) {\n const fileJob = this.getNextFile();\n\n if (!fileJob) {\n break;\n }\n\n try {\n const newFile = await this.uploader(fileJob.file, {\n onProgress: action(\"BatchFileUploader.onProgress\", event => {\n this.uploadStatus.set(fileJob.id, event.sent);\n })\n });\n\n if (newFile) {\n uploaded.push(newFile);\n }\n } catch (e) {\n runInAction(() => {\n this.uploadStatus.set(fileJob.id, -1);\n });\n\n errors.push({ file: fileJob.file, e });\n }\n }\n\n runInAction(() => {\n this.uploading = false;\n });\n\n if (this.onUploadFinishedCallback) {\n this.onUploadFinishedCallback({ uploaded, errors });\n }\n }\n\n private getNextFile() {\n return this.fileJobs.find(file => this.uploadStatus.get(file.id) === 0);\n }\n}\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,eAAe;AAC1C,SAASC,kBAAkB,EAAEC,WAAW,EAAEC,MAAM,QAAQ,MAAM;AAkB9D,MAAMC,OAAO,CAAC;EAIVC,WAAWA,CAACC,IAAU,EAAE;IACpB,IAAI,CAACC,EAAE,GAAGP,UAAU,CAAC,CAAC;IACtB,IAAI,CAACM,IAAI,GAAGA,IAAI;EACpB;AACJ;AAEA,OAAO,MAAME,iBAAiB,CAAC;EAEnBC,QAAQ,GAAc,EAAE;EAExBC,SAAS,GAAG,KAAK;EACjBC,YAAY,GAAwB,IAAIC,GAAG,CAAC,CAAC;EAErDP,WAAWA,CAACQ,QAA8C,EAAE;IACxD,IAAI,CAACA,QAAQ,GAAGA,QAAQ;IACxBZ,kBAAkB,CAAC,IAAI,CAAC;EAC5B;EAEOa,OAAOA,CAAA,EAAG;IACb,OAAO,IAAI,CAACL,QAAQ;EACxB;EAEOM,QAAQA,CAACC,KAAa,EAAE;IAC3BA,KAAK,CAACC,OAAO,CAACX,IAAI,IAAI;MAClB,MAAMY,OAAO,GAAG,IAAId,OAAO,CAACE,IAAI,CAAC;MACjC,IAAI,CAACG,QAAQ,CAACU,IAAI,CAACD,OAAO,CAAC;MAC3B,IAAI,CAACP,YAAY,CAACS,GAAG,CAACF,OAAO,CAACX,EAAE,EAAE,CAAC,CAAC;IACxC,CAAC,CAAC;IAEF,IAAI,CAACc,MAAM,CAAC,CAAC;EACjB;EAEOC,KAAKA,CAAA,EAAG;IACX,IAAI,CAACb,QAAQ,GAAG,EAAE;IAClB,IAAI,CAACE,YAAY,CAACY,KAAK,CAAC,CAAC;EAC7B;EAEA,IAAIC,QAAQA,CAAA,EAAG;IACX,MAAMC,eAAe,GAAGC,KAAK,CAACC,IAAI,CAAC,IAAI,CAAChB,YAAY,CAACiB,MAAM,CAAC,CAAC,CAAC;IAC9D,MAAMC,WAAW,GAAGJ,eAAe,CAACK,MAAM,CAAC,CAACC,CAAC,EAAEC,CAAC,KAAKD,CAAC,GAAGC,CAAC,EAAE,CAAC,CAAC;IAC9D,MAAMC,kBAAkB,GAAG,IAAI,CAACxB,QAAQ,CAACqB,MAAM,CAAC,CAACI,GAAG,EAAEC,GAAG,KAAKD,GAAG,GAAGC,GAAG,CAAC7B,IAAI,CAAC8B,IAAI,EAAE,CAAC,CAAC;IACrF,OAAOC,IAAI,CAACC,GAAG,CAAE,GAAG,GAAGT,WAAW,GAAII,kBAAkB,EAAE,GAAG,CAAC;EAClE;EAEOM,gBAAgBA,CAACC,EAA4B,EAAE;IAClD,IAAI,CAACC,wBAAwB,GAAGD,EAAE;EACtC;EAEA,MAAcnB,MAAMA,CAAA,EAAG;IACnB,IAAI,IAAI,CAACX,SAAS,EAAE;MAChB;IACJ;IAEA,IAAI,CAACA,SAAS,GAAG,IAAI;IAErB,MAAMgC,MAAmB,GAAG,EAAE;IAC9B,MAAMC,QAAoB,GAAG,EAAE;IAE/B,OAAO,IAAI,EAAE;MACT,MAAMzB,OAAO,GAAG,IAAI,CAAC0B,WAAW,CAAC,CAAC;MAElC,IAAI,CAAC1B,OAAO,EAAE;QACV;MACJ;MAEA,IAAI;QACA,MAAM2B,OAAO,GAAG,MAAM,IAAI,CAAChC,QAAQ,CAACK,OAAO,CAACZ,IAAI,EAAE;UAC9CwC,UAAU,EAAE3C,MAAM,CAAC,8BAA8B,EAAE4C,KAAK,IAAI;YACxD,IAAI,CAACpC,YAAY,CAACS,GAAG,CAACF,OAAO,CAACX,EAAE,EAAEwC,KAAK,CAACC,IAAI,CAAC;UACjD,CAAC;QACL,CAAC,CAAC;QAEF,IAAIH,OAAO,EAAE;UACTF,QAAQ,CAACxB,IAAI,CAAC0B,OAAO,CAAC;QAC1B;MACJ,CAAC,CAAC,OAAOI,CAAC,EAAE;QACR/C,WAAW,CAAC,MAAM;UACd,IAAI,CAACS,YAAY,CAACS,GAAG,CAACF,OAAO,CAACX,EAAE,EAAE,CAAC,CAAC,CAAC;QACzC,CAAC,CAAC;QAEFmC,MAAM,CAACvB,IAAI,CAAC;UAAEb,IAAI,EAAEY,OAAO,CAACZ,IAAI;UAAE2C;QAAE,CAAC,CAAC;MAC1C;IACJ;IAEA/C,WAAW,CAAC,MAAM;MACd,IAAI,CAACQ,SAAS,GAAG,KAAK;IAC1B,CAAC,CAAC;IAEF,IAAI,IAAI,CAAC+B,wBAAwB,EAAE;MAC/B,IAAI,CAACA,wBAAwB,CAAC;QAAEE,QAAQ;QAAED;MAAO,CAAC,CAAC;IACvD;EACJ;EAEQE,WAAWA,CAAA,EAAG;IAClB,OAAO,IAAI,CAACnC,QAAQ,CAACyC,IAAI,CAAC5C,IAAI,IAAI,IAAI,CAACK,YAAY,CAACwC,GAAG,CAAC7C,IAAI,CAACC,EAAE,CAAC,KAAK,CAAC,CAAC;EAC3E;AACJ","ignoreList":[]}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import type { SupportedFileTypesProps } from "./SupportedFileTypes";
|
|
3
|
-
import type { ListStatusProps } from "./ListStatus";
|
|
4
|
-
type BottomInfoBarProps = SupportedFileTypesProps & ListStatusProps;
|
|
5
|
-
export declare const BottomInfoBar: (props: BottomInfoBarProps) => React.JSX.Element;
|
|
6
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import mime from "mime/lite";
|
|
3
|
-
import { Separator } from "@webiny/admin-ui";
|
|
4
|
-
import SupportedFileTypes from "./SupportedFileTypes";
|
|
5
|
-
import ListStatus from "./ListStatus";
|
|
6
|
-
mime.define({
|
|
7
|
-
"image/x-icon": ["ico"]
|
|
8
|
-
}, true);
|
|
9
|
-
mime.define({
|
|
10
|
-
"image/jpg": ["jpg"]
|
|
11
|
-
}, true);
|
|
12
|
-
mime.define({
|
|
13
|
-
"image/vnd.microsoft.icon": ["ico"]
|
|
14
|
-
}, true);
|
|
15
|
-
export const BottomInfoBar = props => {
|
|
16
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
17
|
-
className: "wby-bg-neutral-base wby-w-full wby-overflow-hidden wby-z-5"
|
|
18
|
-
}, /*#__PURE__*/React.createElement(Separator, null), /*#__PURE__*/React.createElement("div", {
|
|
19
|
-
className: "wby-h-xl wby-px-md wby-py-sm wby-flex wby-items-center wby-justify-between"
|
|
20
|
-
}, /*#__PURE__*/React.createElement(SupportedFileTypes, props), /*#__PURE__*/React.createElement(ListStatus, props)));
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
//# sourceMappingURL=BottomInfoBar.js.map
|