@webiny/app-file-manager 0.0.0-unstable.78f581c1d2 → 0.0.0-unstable.7be00a75a9
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.d.ts +2 -0
- package/app.js +57 -0
- package/app.js.map +1 -0
- 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 +34 -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.d.ts +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.d.ts +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.d.ts +1 -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 +32 -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 -2
- package/index.js +3 -37
- package/modules/Enterprise/HandleWebsocketMessages.d.ts +1 -0
- package/modules/Enterprise/HandleWebsocketMessages.js +53 -0
- package/modules/Enterprise/HandleWebsocketMessages.js.map +1 -0
- package/modules/Enterprise/components/ThreatScanInProgressFileBody.d.ts +2 -0
- package/modules/Enterprise/components/ThreatScanInProgressFileBody.js +22 -0
- package/modules/Enterprise/components/ThreatScanInProgressFileBody.js.map +1 -0
- package/modules/Enterprise/components/ThreatScanInProgressTableCell.d.ts +6 -0
- package/modules/Enterprise/components/ThreatScanInProgressTableCell.js +20 -0
- package/modules/Enterprise/components/ThreatScanInProgressTableCell.js.map +1 -0
- package/modules/Enterprise/constants.d.ts +3 -0
- package/modules/Enterprise/constants.js +6 -0
- package/modules/Enterprise/constants.js.map +1 -0
- package/modules/Enterprise/index.d.ts +2 -0
- package/modules/Enterprise/index.js +30 -0
- package/modules/Enterprise/index.js.map +1 -0
- 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/fileField.d.ts +2 -0
- package/modules/HeadlessCms/fileField.js +44 -0
- package/modules/HeadlessCms/fileField.js.map +1 -0
- package/modules/HeadlessCms/fileRenderer/fileField.d.ts +2 -0
- package/modules/HeadlessCms/fileRenderer/fileField.js +53 -0
- package/modules/HeadlessCms/fileRenderer/fileField.js.map +1 -0
- package/modules/HeadlessCms/fileRenderer/fileFields.d.ts +2 -0
- package/modules/HeadlessCms/fileRenderer/fileFields.js +73 -0
- package/modules/HeadlessCms/fileRenderer/fileFields.js.map +1 -0
- package/modules/HeadlessCms/fileRenderer/utils.d.ts +2 -0
- package/modules/HeadlessCms/fileRenderer/utils.js +15 -0
- package/modules/HeadlessCms/fileRenderer/utils.js.map +1 -0
- package/modules/HeadlessCms/index.d.ts +1 -0
- package/modules/HeadlessCms/index.js +14 -0
- package/modules/HeadlessCms/index.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/{admin → modules/Settings}/graphql.d.ts +7 -0
- package/modules/Settings/graphql.js +36 -0
- package/modules/Settings/graphql.js.map +1 -0
- package/modules/Settings/index.d.ts +2 -0
- package/modules/Settings/index.js +27 -0
- package/modules/Settings/index.js.map +1 -0
- package/modules/Settings/views/FileManagerSettings.d.ts +2 -0
- package/modules/Settings/views/FileManagerSettings.js +134 -0
- package/modules/Settings/views/FileManagerSettings.js.map +1 -0
- package/package.json +46 -37
- package/presentation/FileActions/FileDetails/CopyUrl.d.ts +2 -0
- package/presentation/FileActions/FileDetails/CopyUrl.js +19 -0
- package/presentation/FileActions/FileDetails/CopyUrl.js.map +1 -0
- package/presentation/FileActions/FileDetails/DeleteImage.d.ts +2 -0
- package/presentation/FileActions/FileDetails/DeleteImage.js +24 -0
- package/presentation/FileActions/FileDetails/DeleteImage.js.map +1 -0
- package/presentation/FileActions/FileDetails/Download.d.ts +2 -0
- package/presentation/FileActions/FileDetails/Download.js +19 -0
- package/presentation/FileActions/FileDetails/Download.js.map +1 -0
- package/presentation/FileActions/FileDetails/MoveToFolder.d.ts +2 -0
- package/presentation/FileActions/FileDetails/MoveToFolder.js +16 -0
- package/presentation/FileActions/FileDetails/MoveToFolder.js.map +1 -0
- package/presentation/FileActions/Grid/Delete.d.ts +2 -0
- package/presentation/FileActions/Grid/Delete.js +23 -0
- package/presentation/FileActions/Grid/Delete.js.map +1 -0
- package/presentation/FileActions/Grid/Download.d.ts +2 -0
- package/presentation/FileActions/Grid/Download.js +19 -0
- package/presentation/FileActions/Grid/Download.js.map +1 -0
- package/presentation/FileActions/Grid/MoveToFolder.d.ts +2 -0
- package/presentation/FileActions/Grid/MoveToFolder.js +16 -0
- package/presentation/FileActions/Grid/MoveToFolder.js.map +1 -0
- package/presentation/FileActions/Grid/Settings.d.ts +2 -0
- package/presentation/FileActions/Grid/Settings.js +23 -0
- package/presentation/FileActions/Grid/Settings.js.map +1 -0
- package/presentation/FileActions/index.d.ts +2 -0
- package/presentation/FileActions/index.js +39 -0
- package/presentation/FileActions/index.js.map +1 -0
- package/presentation/FileDetails/FileDetailsPresenter.d.ts +28 -0
- package/presentation/FileDetails/FileDetailsPresenter.js +138 -0
- package/presentation/FileDetails/FileDetailsPresenter.js.map +1 -0
- package/presentation/FileDetails/FileDetailsPresenter.test.d.ts +1 -0
- package/presentation/FileDetails/FileDetailsPresenter.test.js +280 -0
- package/presentation/FileDetails/FileDetailsPresenter.test.js.map +1 -0
- package/presentation/FileDetails/abstractions.d.ts +22 -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.d.ts +2 -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 +14 -0
- package/presentation/FileDetails/components/Content.js +20 -0
- package/presentation/FileDetails/components/Content.js.map +1 -0
- package/presentation/FileDetails/components/CreatedOn.d.ts +2 -0
- package/presentation/FileDetails/components/CreatedOn.js +21 -0
- package/presentation/FileDetails/components/CreatedOn.js.map +1 -0
- package/presentation/FileDetails/components/Description.d.ts +2 -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 +73 -0
- package/presentation/FileDetails/components/FileDetailsDrawer.js.map +1 -0
- package/presentation/FileDetails/components/Preview.d.ts +2 -0
- package/presentation/FileDetails/components/Preview.js +15 -0
- package/presentation/FileDetails/components/Preview.js.map +1 -0
- package/presentation/FileDetails/components/Thumbnail.d.ts +2 -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 +20 -0
- package/presentation/FileList/FileListDataSource.js +122 -0
- package/presentation/FileList/FileListDataSource.js.map +1 -0
- package/presentation/FileList/FileListPresenter.test.d.ts +1 -0
- package/presentation/FileList/FileListPresenter.test.js +424 -0
- package/presentation/FileList/FileListPresenter.test.js.map +1 -0
- package/presentation/FileList/FileManagerPresenter.d.ts +43 -0
- package/presentation/FileList/FileManagerPresenter.js +213 -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 +76 -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.d.ts +6 -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/BatchEditorDialog/AddOperation.d.ts +7 -0
- package/presentation/FileList/components/BulkActions/BatchEditorDialog/AddOperation.js +15 -0
- package/presentation/FileList/components/BulkActions/BatchEditorDialog/AddOperation.js.map +1 -0
- package/presentation/FileList/components/BulkActions/BatchEditorDialog/BatchEditor.d.ts +15 -0
- package/presentation/FileList/components/BulkActions/BatchEditorDialog/BatchEditor.js +44 -0
- package/presentation/FileList/components/BulkActions/BatchEditorDialog/BatchEditor.js.map +1 -0
- package/presentation/FileList/components/BulkActions/BatchEditorDialog/BatchEditorDialog.d.ts +15 -0
- package/presentation/FileList/components/BulkActions/BatchEditorDialog/BatchEditorDialog.js +52 -0
- package/presentation/FileList/components/BulkActions/BatchEditorDialog/BatchEditorDialog.js.map +1 -0
- package/presentation/FileList/components/BulkActions/BatchEditorDialog/BatchEditorDialogPresenter.d.ts +61 -0
- package/presentation/FileList/components/BulkActions/BatchEditorDialog/BatchEditorDialogPresenter.js +111 -0
- package/presentation/FileList/components/BulkActions/BatchEditorDialog/BatchEditorDialogPresenter.js.map +1 -0
- package/presentation/FileList/components/BulkActions/BatchEditorDialog/BatchEditorDialogPresenter.test.d.ts +1 -0
- package/presentation/FileList/components/BulkActions/BatchEditorDialog/BatchEditorDialogPresenter.test.js +372 -0
- package/presentation/FileList/components/BulkActions/BatchEditorDialog/BatchEditorDialogPresenter.test.js.map +1 -0
- package/presentation/FileList/components/BulkActions/BatchEditorDialog/FieldRenderer.d.ts +8 -0
- package/presentation/FileList/components/BulkActions/BatchEditorDialog/FieldRenderer.js +31 -0
- package/presentation/FileList/components/BulkActions/BatchEditorDialog/FieldRenderer.js.map +1 -0
- package/presentation/FileList/components/BulkActions/BatchEditorDialog/Operation.d.ts +11 -0
- package/presentation/FileList/components/BulkActions/BatchEditorDialog/Operation.js +33 -0
- package/presentation/FileList/components/BulkActions/BatchEditorDialog/Operation.js.map +1 -0
- package/presentation/FileList/components/BulkActions/BatchEditorDialog/index.d.ts +1 -0
- package/presentation/FileList/components/BulkActions/BatchEditorDialog/index.js +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/BulkActionEdit.d.ts +4 -0
- package/presentation/FileList/components/BulkActions/BulkActionEdit.js +105 -0
- package/presentation/FileList/components/BulkActions/BulkActionEdit.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 +5 -0
- package/presentation/FileList/components/BulkActions/index.js +5 -0
- package/presentation/FileList/components/BulkActions/useBulkActionWorker.d.ts +16 -0
- package/presentation/FileList/components/BulkActions/useBulkActionWorker.js +43 -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.d.ts +9 -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.d.ts +2 -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.d.ts +2 -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.d.ts +9 -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 +387 -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.d.ts +2 -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.d.ts +2 -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.d.ts +2 -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.d.ts +2 -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.d.ts +2 -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.d.ts +2 -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.d.ts +2 -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.d.ts +2 -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.d.ts +2 -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.d.ts +2 -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.d.ts +2 -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.d.ts +2 -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.d.ts +2 -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.d.ts +2 -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 +365 -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.d.ts +6 -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.d.ts +2 -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.d.ts +7 -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.d.ts +2 -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/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 +246 -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/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 +118 -0
- package/presentation/config/DefaultFileManagerConfig.js.map +1 -0
- package/presentation/config/FileManagerViewConfig.d.ts +248 -0
- package/presentation/config/FileManagerViewConfig.js +74 -0
- package/presentation/config/FileManagerViewConfig.js.map +1 -0
- package/presentation/config/configComponents/Browser/BulkAction.d.ts +26 -0
- package/presentation/config/configComponents/Browser/BulkAction.js +57 -0
- package/presentation/config/configComponents/Browser/BulkAction.js.map +1 -0
- package/presentation/config/configComponents/Browser/BulkEditField.d.ts +10 -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 +8 -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.d.ts +39 -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.d.ts +5 -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.d.ts +7 -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 +7 -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/FolderFieldDecorator.d.ts +7 -0
- package/presentation/config/configComponents/Browser/FolderFieldDecorator.js +11 -0
- package/presentation/config/configComponents/Browser/FolderFieldDecorator.js.map +1 -0
- package/presentation/config/configComponents/Browser/Grid/Action.d.ts +31 -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 +32 -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 +47 -0
- package/presentation/config/configComponents/Browser/index.js.map +1 -0
- package/presentation/config/configComponents/FileDetails/Action.d.ts +31 -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.d.ts +5 -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 +52 -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.d.ts +7 -0
- package/presentation/config/fields/AccessControl.js +38 -0
- package/presentation/config/fields/AccessControl.js.map +1 -0
- package/presentation/config/fields/Tags.d.ts +2 -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.d.ts +3 -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/FilePreviewDefaultRenderer.d.ts +2 -0
- package/presentation/config/thumbnailRenderers/FilePreviewDefaultRenderer.js +11 -0
- package/presentation/config/thumbnailRenderers/FilePreviewDefaultRenderer.js.map +1 -0
- package/presentation/config/thumbnailRenderers/FilePreviewImageRenderer.d.ts +2 -0
- package/presentation/config/thumbnailRenderers/FilePreviewImageRenderer.js +18 -0
- package/presentation/config/thumbnailRenderers/FilePreviewImageRenderer.js.map +1 -0
- package/presentation/config/thumbnailRenderers/GridItemDefaultRenderer.d.ts +2 -0
- package/presentation/config/thumbnailRenderers/GridItemDefaultRenderer.js +11 -0
- package/presentation/config/thumbnailRenderers/GridItemDefaultRenderer.js.map +1 -0
- package/presentation/config/thumbnailRenderers/GridItemImageRenderer.d.ts +2 -0
- package/presentation/config/thumbnailRenderers/GridItemImageRenderer.js +18 -0
- package/presentation/config/thumbnailRenderers/GridItemImageRenderer.js.map +1 -0
- package/presentation/config/thumbnailRenderers/TableItemDefaultRenderer.d.ts +2 -0
- package/presentation/config/thumbnailRenderers/TableItemDefaultRenderer.js +18 -0
- package/presentation/config/thumbnailRenderers/TableItemDefaultRenderer.js.map +1 -0
- package/presentation/config/thumbnailRenderers/TableItemImageRenderer.d.ts +2 -0
- package/presentation/config/thumbnailRenderers/TableItemImageRenderer.js +18 -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/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/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 +7 -0
- package/routes.js +17 -0
- package/routes.js.map +1 -0
- package/static/svg/folder-open.ae8d0fac.svg +1 -0
- package/admin/graphql.js +0 -24
- package/admin/graphql.js.map +0 -1
- package/admin/index.d.ts +0 -2
- package/admin/index.js +0 -16
- package/admin/index.js.map +0 -1
- package/admin/plugins/index.d.ts +0 -2
- package/admin/plugins/index.js +0 -18
- package/admin/plugins/index.js.map +0 -1
- package/admin/plugins/installation.d.ts +0 -3
- package/admin/plugins/installation.js +0 -134
- package/admin/plugins/installation.js.map +0 -1
- package/admin/plugins/permissionRenderer/FileManagerPermissions.d.ts +0 -14
- package/admin/plugins/permissionRenderer/FileManagerPermissions.js +0 -249
- package/admin/plugins/permissionRenderer/FileManagerPermissions.js.map +0 -1
- package/admin/plugins/permissionRenderer/index.d.ts +0 -3
- package/admin/plugins/permissionRenderer/index.js +0 -38
- package/admin/plugins/permissionRenderer/index.js.map +0 -1
- package/admin/views/FileManagerSettings.d.ts +0 -3
- package/admin/views/FileManagerSettings.js +0 -162
- package/admin/views/FileManagerSettings.js.map +0 -1
- package/index.js.map +0 -1
- package/types.d.ts +0 -26
- package/types.js +0 -5
- package/types.js.map +0 -1
- /package/{admin → modules/Settings}/assets/icons/folder-open.svg +0 -0
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import { GraphQLInputMapper } from "./GraphQLInputMapper.js";
|
|
3
|
+
import { OperatorType } from "./domain/index.js";
|
|
4
|
+
const fileMock = {
|
|
5
|
+
id: "12345678",
|
|
6
|
+
location: {
|
|
7
|
+
folderId: "root"
|
|
8
|
+
},
|
|
9
|
+
createdOn: new Date().toISOString(),
|
|
10
|
+
createdBy: {
|
|
11
|
+
id: "123",
|
|
12
|
+
displayName: "123",
|
|
13
|
+
type: "admin"
|
|
14
|
+
},
|
|
15
|
+
savedOn: new Date().toISOString(),
|
|
16
|
+
savedBy: {
|
|
17
|
+
id: "123",
|
|
18
|
+
displayName: "123",
|
|
19
|
+
type: "admin"
|
|
20
|
+
},
|
|
21
|
+
modifiedOn: new Date().toISOString(),
|
|
22
|
+
modifiedBy: {
|
|
23
|
+
id: "123",
|
|
24
|
+
displayName: "123",
|
|
25
|
+
type: "admin"
|
|
26
|
+
},
|
|
27
|
+
src: "https://demo.website.com/files/12345678/filenameA.png",
|
|
28
|
+
key: "12345678/filenameA.png",
|
|
29
|
+
name: "filenameA.png",
|
|
30
|
+
size: 123456,
|
|
31
|
+
type: "image/png",
|
|
32
|
+
tags: [
|
|
33
|
+
"sketch",
|
|
34
|
+
"file-a",
|
|
35
|
+
"webiny"
|
|
36
|
+
],
|
|
37
|
+
metadata: {},
|
|
38
|
+
aliases: []
|
|
39
|
+
};
|
|
40
|
+
describe("GraphQLInputMapper", ()=>{
|
|
41
|
+
it("should return a GraphQL formatted output based on the received BatchDTO and previous data", ()=>{
|
|
42
|
+
const data = {
|
|
43
|
+
...fileMock,
|
|
44
|
+
extensions: {
|
|
45
|
+
field1: "old-field1",
|
|
46
|
+
field2: "old-field2",
|
|
47
|
+
field3: [
|
|
48
|
+
"old-field3"
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
const batch = {
|
|
53
|
+
operations: [
|
|
54
|
+
{
|
|
55
|
+
field: "accessControl",
|
|
56
|
+
operator: OperatorType.OVERRIDE,
|
|
57
|
+
value: {
|
|
58
|
+
accessControl: {
|
|
59
|
+
type: "private"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
field: "extensions.field1",
|
|
65
|
+
operator: OperatorType.OVERRIDE,
|
|
66
|
+
value: {
|
|
67
|
+
extensions: {
|
|
68
|
+
field1: "new-field1"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
field: "extensions.field2",
|
|
74
|
+
operator: OperatorType.REMOVE
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
field: "extensions.field3",
|
|
78
|
+
operator: OperatorType.APPEND,
|
|
79
|
+
value: {
|
|
80
|
+
extensions: {
|
|
81
|
+
field3: [
|
|
82
|
+
"new-field3-1",
|
|
83
|
+
"new-field3-2"
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
]
|
|
89
|
+
};
|
|
90
|
+
const output = GraphQLInputMapper.applyOperations(data, batch);
|
|
91
|
+
expect(output).toEqual({
|
|
92
|
+
...data,
|
|
93
|
+
accessControl: {
|
|
94
|
+
type: "private"
|
|
95
|
+
},
|
|
96
|
+
extensions: {
|
|
97
|
+
field1: "new-field1",
|
|
98
|
+
field2: null,
|
|
99
|
+
field3: [
|
|
100
|
+
"old-field3",
|
|
101
|
+
"new-field3-1",
|
|
102
|
+
"new-field3-2"
|
|
103
|
+
]
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
it("should not override data for fields not defined in the batch", ()=>{
|
|
108
|
+
const data = {
|
|
109
|
+
...fileMock,
|
|
110
|
+
accessControl: {
|
|
111
|
+
type: "public"
|
|
112
|
+
},
|
|
113
|
+
extensions: {
|
|
114
|
+
field1: "old-field1",
|
|
115
|
+
field2: "old-field2"
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
const batch = {
|
|
119
|
+
operations: [
|
|
120
|
+
{
|
|
121
|
+
field: "extensions.field1",
|
|
122
|
+
operator: OperatorType.OVERRIDE,
|
|
123
|
+
value: {
|
|
124
|
+
extensions: {
|
|
125
|
+
field1: "new-field1"
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
]
|
|
130
|
+
};
|
|
131
|
+
const output = GraphQLInputMapper.applyOperations(data, batch);
|
|
132
|
+
expect(output).toEqual({
|
|
133
|
+
...data,
|
|
134
|
+
extensions: {
|
|
135
|
+
field1: "new-field1",
|
|
136
|
+
field2: "old-field2"
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
it("should not OVERRIDE data in case of nullish value", ()=>{
|
|
141
|
+
const data = {
|
|
142
|
+
...fileMock,
|
|
143
|
+
extensions: {
|
|
144
|
+
field1: "old-field-1"
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
const batch = {
|
|
148
|
+
operations: [
|
|
149
|
+
{
|
|
150
|
+
field: "extensions.field1",
|
|
151
|
+
operator: OperatorType.OVERRIDE,
|
|
152
|
+
value: {
|
|
153
|
+
extensions: {
|
|
154
|
+
field1: null
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
]
|
|
159
|
+
};
|
|
160
|
+
const output = GraphQLInputMapper.applyOperations(data, batch);
|
|
161
|
+
expect(output).toEqual({
|
|
162
|
+
...data,
|
|
163
|
+
extensions: {
|
|
164
|
+
field1: "old-field-1"
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
});
|
|
168
|
+
it("should not APPEND data in case of nullish value", ()=>{
|
|
169
|
+
const data = {
|
|
170
|
+
...fileMock,
|
|
171
|
+
extensions: {
|
|
172
|
+
field1: "old-field-1"
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
const batch = {
|
|
176
|
+
operations: [
|
|
177
|
+
{
|
|
178
|
+
field: "extensions.field1",
|
|
179
|
+
operator: OperatorType.APPEND,
|
|
180
|
+
value: {
|
|
181
|
+
extensions: {
|
|
182
|
+
field1: null
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
]
|
|
187
|
+
};
|
|
188
|
+
const output = GraphQLInputMapper.applyOperations(data, batch);
|
|
189
|
+
expect(output).toEqual({
|
|
190
|
+
...data,
|
|
191
|
+
extensions: {
|
|
192
|
+
field1: "old-field-1"
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
});
|
|
196
|
+
it("should not APPEND data in case of non-array value", ()=>{
|
|
197
|
+
const data = {
|
|
198
|
+
...fileMock,
|
|
199
|
+
extensions: {
|
|
200
|
+
field1: "old-field-1"
|
|
201
|
+
}
|
|
202
|
+
};
|
|
203
|
+
const batch = {
|
|
204
|
+
operations: [
|
|
205
|
+
{
|
|
206
|
+
field: "extensions.field1",
|
|
207
|
+
operator: OperatorType.APPEND,
|
|
208
|
+
value: {
|
|
209
|
+
extensions: {
|
|
210
|
+
field1: "any-string"
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
]
|
|
215
|
+
};
|
|
216
|
+
const output = GraphQLInputMapper.applyOperations(data, batch);
|
|
217
|
+
expect(output).toEqual({
|
|
218
|
+
...data,
|
|
219
|
+
extensions: {
|
|
220
|
+
field1: "old-field-1"
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
});
|
|
224
|
+
it("should APPEND new data to non existing envelope", ()=>{
|
|
225
|
+
const data = {
|
|
226
|
+
...fileMock
|
|
227
|
+
};
|
|
228
|
+
const batch = {
|
|
229
|
+
operations: [
|
|
230
|
+
{
|
|
231
|
+
field: "extensions.field1",
|
|
232
|
+
operator: OperatorType.APPEND,
|
|
233
|
+
value: {
|
|
234
|
+
extensions: {
|
|
235
|
+
field1: [
|
|
236
|
+
"new-field1-1",
|
|
237
|
+
"new-field1-2"
|
|
238
|
+
]
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
]
|
|
243
|
+
};
|
|
244
|
+
const output = GraphQLInputMapper.applyOperations(data, batch);
|
|
245
|
+
expect(output).toEqual({
|
|
246
|
+
...data,
|
|
247
|
+
extensions: {
|
|
248
|
+
field1: [
|
|
249
|
+
"new-field1-1",
|
|
250
|
+
"new-field1-2"
|
|
251
|
+
]
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
});
|
|
255
|
+
it("should APPEND new data for fields with nullish value", ()=>{
|
|
256
|
+
const data = {
|
|
257
|
+
...fileMock,
|
|
258
|
+
extensions: {
|
|
259
|
+
field1: null
|
|
260
|
+
}
|
|
261
|
+
};
|
|
262
|
+
const batch = {
|
|
263
|
+
operations: [
|
|
264
|
+
{
|
|
265
|
+
field: "extensions.field1",
|
|
266
|
+
operator: OperatorType.APPEND,
|
|
267
|
+
value: {
|
|
268
|
+
extensions: {
|
|
269
|
+
field1: [
|
|
270
|
+
"new-field1-1",
|
|
271
|
+
"new-field1-2"
|
|
272
|
+
]
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
]
|
|
277
|
+
};
|
|
278
|
+
const output = GraphQLInputMapper.applyOperations(data, batch);
|
|
279
|
+
expect(output).toEqual({
|
|
280
|
+
...data,
|
|
281
|
+
extensions: {
|
|
282
|
+
field1: [
|
|
283
|
+
"new-field1-1",
|
|
284
|
+
"new-field1-2"
|
|
285
|
+
]
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
});
|
|
289
|
+
it("should return existing data in case of invalid operation", ()=>{
|
|
290
|
+
const data = {
|
|
291
|
+
...fileMock,
|
|
292
|
+
extensions: {
|
|
293
|
+
field1: "old-field1"
|
|
294
|
+
}
|
|
295
|
+
};
|
|
296
|
+
const batch = {
|
|
297
|
+
operations: [
|
|
298
|
+
{
|
|
299
|
+
field: "field1",
|
|
300
|
+
operator: "ANY-OPERATION",
|
|
301
|
+
value: {
|
|
302
|
+
extensions: {
|
|
303
|
+
field1: "new-field1"
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
]
|
|
308
|
+
};
|
|
309
|
+
const output = GraphQLInputMapper.applyOperations(data, batch);
|
|
310
|
+
expect(output).toEqual({
|
|
311
|
+
...data,
|
|
312
|
+
extensions: {
|
|
313
|
+
field1: "old-field1"
|
|
314
|
+
}
|
|
315
|
+
});
|
|
316
|
+
});
|
|
317
|
+
});
|
|
318
|
+
|
|
319
|
+
//# sourceMappingURL=GraphQLInputMapper.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation/FileList/components/BulkActions/GraphQLInputMapper.test.js","sources":["../../../../../src/presentation/FileList/components/BulkActions/GraphQLInputMapper.test.ts"],"sourcesContent":["import { describe, it, expect } from \"vitest\";\nimport { GraphQLInputMapper } from \"./GraphQLInputMapper.js\";\nimport type { BatchDTO } from \"~/presentation/FileList/components/BulkActions/domain/index.js\";\nimport { OperatorType } from \"~/presentation/FileList/components/BulkActions/domain/index.js\";\nimport type { FileItem } from \"~/domain/types.js\";\n\nconst fileMock: FileItem = {\n id: \"12345678\",\n location: {\n folderId: \"root\"\n },\n createdOn: new Date().toISOString(),\n createdBy: {\n id: \"123\",\n displayName: \"123\",\n type: \"admin\"\n },\n savedOn: new Date().toISOString(),\n savedBy: {\n id: \"123\",\n displayName: \"123\",\n type: \"admin\"\n },\n modifiedOn: new Date().toISOString(),\n modifiedBy: {\n id: \"123\",\n displayName: \"123\",\n type: \"admin\"\n },\n src: `https://demo.website.com/files/12345678/filenameA.png`,\n key: `12345678/filenameA.png`,\n name: \"filenameA.png\",\n size: 123456,\n type: \"image/png\",\n tags: [\"sketch\", \"file-a\", \"webiny\"],\n metadata: {},\n aliases: []\n};\n\ndescribe(\"GraphQLInputMapper\", () => {\n it(\"should return a GraphQL formatted output based on the received BatchDTO and previous data\", () => {\n const data: FileItem = {\n ...fileMock,\n extensions: {\n field1: \"old-field1\",\n field2: \"old-field2\",\n field3: [\"old-field3\"]\n }\n };\n\n const batch: BatchDTO = {\n operations: [\n {\n field: \"accessControl\",\n operator: OperatorType.OVERRIDE,\n value: {\n accessControl: {\n type: \"private\"\n }\n }\n },\n {\n field: \"extensions.field1\",\n operator: OperatorType.OVERRIDE,\n value: {\n extensions: {\n field1: \"new-field1\"\n }\n }\n },\n {\n field: \"extensions.field2\",\n operator: OperatorType.REMOVE\n },\n {\n field: \"extensions.field3\",\n operator: OperatorType.APPEND,\n value: {\n extensions: {\n field3: [\"new-field3-1\", \"new-field3-2\"]\n }\n }\n }\n ]\n };\n\n const output = GraphQLInputMapper.applyOperations(data, batch);\n\n expect(output).toEqual({\n ...data,\n accessControl: {\n type: \"private\"\n },\n extensions: {\n field1: \"new-field1\",\n field2: null,\n field3: [\"old-field3\", \"new-field3-1\", \"new-field3-2\"]\n }\n });\n });\n\n it(\"should not override data for fields not defined in the batch\", () => {\n const data: FileItem = {\n ...fileMock,\n accessControl: {\n type: \"public\"\n },\n extensions: {\n field1: \"old-field1\",\n field2: \"old-field2\"\n }\n };\n\n const batch: BatchDTO = {\n operations: [\n {\n field: \"extensions.field1\",\n operator: OperatorType.OVERRIDE,\n value: {\n extensions: {\n field1: \"new-field1\"\n }\n }\n }\n ]\n };\n\n const output = GraphQLInputMapper.applyOperations(data, batch);\n\n expect(output).toEqual({\n ...data,\n extensions: {\n field1: \"new-field1\",\n field2: \"old-field2\"\n }\n });\n });\n\n it(\"should not OVERRIDE data in case of nullish value\", () => {\n const data: FileItem = {\n ...fileMock,\n extensions: {\n field1: \"old-field-1\"\n }\n };\n\n const batch: BatchDTO = {\n operations: [\n {\n field: \"extensions.field1\",\n operator: OperatorType.OVERRIDE,\n value: {\n extensions: {\n field1: null\n }\n }\n }\n ]\n };\n\n const output = GraphQLInputMapper.applyOperations(data, batch);\n\n expect(output).toEqual({\n ...data,\n extensions: {\n field1: \"old-field-1\"\n }\n });\n });\n\n it(\"should not APPEND data in case of nullish value\", () => {\n const data: FileItem = {\n ...fileMock,\n extensions: {\n field1: \"old-field-1\"\n }\n };\n\n const batch: BatchDTO = {\n operations: [\n {\n field: \"extensions.field1\",\n operator: OperatorType.APPEND,\n value: {\n extensions: {\n field1: null\n }\n }\n }\n ]\n };\n\n const output = GraphQLInputMapper.applyOperations(data, batch);\n\n expect(output).toEqual({\n ...data,\n extensions: {\n field1: \"old-field-1\"\n }\n });\n });\n\n it(\"should not APPEND data in case of non-array value\", () => {\n const data: FileItem = {\n ...fileMock,\n extensions: {\n field1: \"old-field-1\"\n }\n };\n\n const batch: BatchDTO = {\n operations: [\n {\n field: \"extensions.field1\",\n operator: OperatorType.APPEND,\n value: {\n extensions: {\n field1: \"any-string\"\n }\n }\n }\n ]\n };\n\n const output = GraphQLInputMapper.applyOperations(data, batch);\n\n expect(output).toEqual({\n ...data,\n extensions: {\n field1: \"old-field-1\"\n }\n });\n });\n\n it(\"should APPEND new data to non existing envelope\", () => {\n const data: FileItem = { ...fileMock };\n\n const batch: BatchDTO = {\n operations: [\n {\n field: \"extensions.field1\",\n operator: OperatorType.APPEND,\n value: {\n extensions: {\n field1: [\"new-field1-1\", \"new-field1-2\"]\n }\n }\n }\n ]\n };\n\n const output = GraphQLInputMapper.applyOperations(data, batch);\n\n expect(output).toEqual({\n ...data,\n extensions: {\n field1: [\"new-field1-1\", \"new-field1-2\"]\n }\n });\n });\n\n it(\"should APPEND new data for fields with nullish value\", () => {\n const data: FileItem = {\n ...fileMock,\n extensions: {\n field1: null\n }\n };\n\n const batch: BatchDTO = {\n operations: [\n {\n field: \"extensions.field1\",\n operator: OperatorType.APPEND,\n value: {\n extensions: {\n field1: [\"new-field1-1\", \"new-field1-2\"]\n }\n }\n }\n ]\n };\n\n const output = GraphQLInputMapper.applyOperations(data, batch);\n\n expect(output).toEqual({\n ...data,\n extensions: {\n field1: [\"new-field1-1\", \"new-field1-2\"]\n }\n });\n });\n\n it(\"should return existing data in case of invalid operation\", () => {\n const data: FileItem = {\n ...fileMock,\n extensions: {\n field1: \"old-field1\"\n }\n };\n\n const batch: BatchDTO = {\n operations: [\n {\n field: \"field1\",\n operator: \"ANY-OPERATION\",\n value: {\n extensions: {\n field1: \"new-field1\"\n }\n }\n }\n ]\n };\n\n const output = GraphQLInputMapper.applyOperations(data, batch);\n\n expect(output).toEqual({\n ...data,\n extensions: {\n field1: \"old-field1\"\n }\n });\n });\n});\n"],"names":["fileMock","Date","describe","it","data","batch","OperatorType","output","GraphQLInputMapper","expect"],"mappings":"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"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import zod from "zod";
|
|
2
|
+
export interface BatchDTO {
|
|
3
|
+
operations: OperationDTO[];
|
|
4
|
+
}
|
|
5
|
+
export declare const batchValidationSchema: zod.ZodObject<{
|
|
6
|
+
operations: zod.ZodArray<zod.ZodObject<{
|
|
7
|
+
field: zod.ZodString;
|
|
8
|
+
operator: zod.ZodString;
|
|
9
|
+
}, zod.core.$strip>>;
|
|
10
|
+
}, zod.core.$strip>;
|
|
11
|
+
export declare class Batch {
|
|
12
|
+
operations: Operation[];
|
|
13
|
+
static createEmpty(): Batch;
|
|
14
|
+
static validate(data: BatchDTO): zod.ZodSafeParseResult<{
|
|
15
|
+
operations: {
|
|
16
|
+
field: string;
|
|
17
|
+
operator: string;
|
|
18
|
+
}[];
|
|
19
|
+
}>;
|
|
20
|
+
protected constructor(operations: Operation[]);
|
|
21
|
+
}
|
|
22
|
+
export interface OperationDTO {
|
|
23
|
+
field: string;
|
|
24
|
+
operator: string;
|
|
25
|
+
value?: Record<string, any>;
|
|
26
|
+
}
|
|
27
|
+
export declare class Operation {
|
|
28
|
+
readonly field?: string;
|
|
29
|
+
readonly operator?: string;
|
|
30
|
+
readonly value?: Record<string, any>;
|
|
31
|
+
constructor(field?: string, operator?: string, value?: any);
|
|
32
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import zod from "zod";
|
|
2
|
+
const operationValidationSchema = zod.object({
|
|
3
|
+
field: zod.string().trim().min(1, "Field is required."),
|
|
4
|
+
operator: zod.string().min(1, "Operator is required.")
|
|
5
|
+
});
|
|
6
|
+
const batchValidationSchema = zod.object({
|
|
7
|
+
operations: zod.array(operationValidationSchema).min(1)
|
|
8
|
+
});
|
|
9
|
+
class Batch {
|
|
10
|
+
static createEmpty() {
|
|
11
|
+
return new Batch([
|
|
12
|
+
new Operation()
|
|
13
|
+
]);
|
|
14
|
+
}
|
|
15
|
+
static validate(data) {
|
|
16
|
+
return batchValidationSchema.safeParse(data);
|
|
17
|
+
}
|
|
18
|
+
constructor(operations){
|
|
19
|
+
this.operations = operations;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
class Operation {
|
|
23
|
+
constructor(field, operator, value){
|
|
24
|
+
this.value = void 0;
|
|
25
|
+
this.field = field;
|
|
26
|
+
this.operator = operator;
|
|
27
|
+
this.value = value;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
export { Batch, Operation, batchValidationSchema };
|
|
31
|
+
|
|
32
|
+
//# sourceMappingURL=Batch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation/FileList/components/BulkActions/domain/Batch.js","sources":["../../../../../../src/presentation/FileList/components/BulkActions/domain/Batch.ts"],"sourcesContent":["import zod from \"zod\";\n\nexport interface BatchDTO {\n operations: OperationDTO[];\n}\n\nconst operationValidationSchema = zod.object({\n field: zod.string().trim().min(1, \"Field is required.\"),\n operator: zod.string().min(1, \"Operator is required.\")\n});\n\nexport const batchValidationSchema = zod.object({\n operations: zod.array(operationValidationSchema).min(1)\n});\n\nexport class Batch {\n operations: Operation[];\n\n static createEmpty() {\n return new Batch([new Operation()]);\n }\n\n static validate(data: BatchDTO) {\n return batchValidationSchema.safeParse(data);\n }\n\n protected constructor(operations: Operation[]) {\n this.operations = operations;\n }\n}\n\nexport interface OperationDTO {\n field: string;\n operator: string;\n value?: Record<string, any>;\n}\n\nexport class Operation {\n public readonly field?: string;\n public readonly operator?: string;\n public readonly value?: Record<string, any> = undefined;\n\n constructor(field?: string, operator?: string, value?: any) {\n this.field = field;\n this.operator = operator;\n this.value = value;\n }\n}\n"],"names":["operationValidationSchema","zod","batchValidationSchema","Batch","Operation","data","operations","field","operator","value","undefined"],"mappings":";AAMA,MAAMA,4BAA4BC,IAAI,MAAM,CAAC;IACzC,OAAOA,IAAI,MAAM,GAAG,IAAI,GAAG,GAAG,CAAC,GAAG;IAClC,UAAUA,IAAI,MAAM,GAAG,GAAG,CAAC,GAAG;AAClC;AAEO,MAAMC,wBAAwBD,IAAI,MAAM,CAAC;IAC5C,YAAYA,IAAI,KAAK,CAACD,2BAA2B,GAAG,CAAC;AACzD;AAEO,MAAMG;IAGT,OAAO,cAAc;QACjB,OAAO,IAAIA,MAAM;YAAC,IAAIC;SAAY;IACtC;IAEA,OAAO,SAASC,IAAc,EAAE;QAC5B,OAAOH,sBAAsB,SAAS,CAACG;IAC3C;IAEA,YAAsBC,UAAuB,CAAE;QAC3C,IAAI,CAAC,UAAU,GAAGA;IACtB;AACJ;AAQO,MAAMF;IAKT,YAAYG,KAAc,EAAEC,QAAiB,EAAEC,KAAW,CAAE;aAF5C,KAAK,GAAyBC;QAG1C,IAAI,CAAC,KAAK,GAAGH;QACb,IAAI,CAAC,QAAQ,GAAGC;QAChB,IAAI,CAAC,KAAK,GAAGC;IACjB;AACJ"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
class BatchMapper {
|
|
2
|
+
static toDTO(input) {
|
|
3
|
+
return {
|
|
4
|
+
operations: input.operations.map((operation)=>({
|
|
5
|
+
operator: operation.operator || "",
|
|
6
|
+
field: operation.field || "",
|
|
7
|
+
value: operation.value || void 0
|
|
8
|
+
}))
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export { BatchMapper };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=BatchMapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation/FileList/components/BulkActions/domain/BatchMapper.js","sources":["../../../../../../src/presentation/FileList/components/BulkActions/domain/BatchMapper.ts"],"sourcesContent":["import type { Batch, BatchDTO } from \"./Batch.js\";\n\nexport class BatchMapper {\n static toDTO(input: Batch): BatchDTO {\n return {\n operations: input.operations.map(operation => ({\n operator: operation.operator || \"\",\n field: operation.field || \"\",\n value: operation.value || undefined\n }))\n };\n }\n}\n"],"names":["BatchMapper","input","operation","undefined"],"mappings":"AAEO,MAAMA;IACT,OAAO,MAAMC,KAAY,EAAY;QACjC,OAAO;YACH,YAAYA,MAAM,UAAU,CAAC,GAAG,CAACC,CAAAA,YAAc;oBAC3C,UAAUA,UAAU,QAAQ,IAAI;oBAChC,OAAOA,UAAU,KAAK,IAAI;oBAC1B,OAAOA,UAAU,KAAK,IAAIC;gBAC9B;QACJ;IACJ;AACJ"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { CmsModelField } from "@webiny/app-headless-cms-common/types/model.js";
|
|
2
|
+
export type FieldRaw = CmsModelField;
|
|
3
|
+
export declare enum OperatorType {
|
|
4
|
+
OVERRIDE = "OVERRIDE",
|
|
5
|
+
APPEND = "APPEND",
|
|
6
|
+
REMOVE = "REMOVE"
|
|
7
|
+
}
|
|
8
|
+
export interface FieldDTO {
|
|
9
|
+
label: string;
|
|
10
|
+
value: string;
|
|
11
|
+
operators: OperatorDTO[];
|
|
12
|
+
raw: FieldRaw;
|
|
13
|
+
}
|
|
14
|
+
export declare class Field {
|
|
15
|
+
readonly label: string;
|
|
16
|
+
readonly value: string;
|
|
17
|
+
readonly operators: Operator[];
|
|
18
|
+
readonly raw: FieldRaw;
|
|
19
|
+
static createFromRaw(field: FieldRaw): Field;
|
|
20
|
+
private constructor();
|
|
21
|
+
}
|
|
22
|
+
export interface OperatorDTO {
|
|
23
|
+
label: string;
|
|
24
|
+
value: string;
|
|
25
|
+
}
|
|
26
|
+
export declare class Operator {
|
|
27
|
+
readonly label: string;
|
|
28
|
+
readonly value: string;
|
|
29
|
+
static createFrom(rawData: OperatorDTO): Operator;
|
|
30
|
+
static createFromField(field: CmsModelField): Operator[];
|
|
31
|
+
private constructor();
|
|
32
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
var Field_OperatorType = /*#__PURE__*/ function(OperatorType) {
|
|
2
|
+
OperatorType["OVERRIDE"] = "OVERRIDE";
|
|
3
|
+
OperatorType["APPEND"] = "APPEND";
|
|
4
|
+
OperatorType["REMOVE"] = "REMOVE";
|
|
5
|
+
return OperatorType;
|
|
6
|
+
}({});
|
|
7
|
+
class Field {
|
|
8
|
+
static createFromRaw(field) {
|
|
9
|
+
const label = field.label;
|
|
10
|
+
const value = field.fieldId;
|
|
11
|
+
const operators = Operator.createFromField(field);
|
|
12
|
+
return new Field(label, value, operators, field);
|
|
13
|
+
}
|
|
14
|
+
constructor(label, value, operators, renderer){
|
|
15
|
+
this.label = label;
|
|
16
|
+
this.value = value;
|
|
17
|
+
this.operators = operators;
|
|
18
|
+
this.raw = renderer;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
class Operator {
|
|
22
|
+
static createFrom(rawData) {
|
|
23
|
+
return new Operator(rawData.label, rawData.value);
|
|
24
|
+
}
|
|
25
|
+
static createFromField(field) {
|
|
26
|
+
const operators = [
|
|
27
|
+
{
|
|
28
|
+
label: "Override existing values",
|
|
29
|
+
value: "OVERRIDE"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
label: "Clear all existing values",
|
|
33
|
+
value: "REMOVE"
|
|
34
|
+
}
|
|
35
|
+
];
|
|
36
|
+
if (field.list) operators.push({
|
|
37
|
+
label: "Append to existing values",
|
|
38
|
+
value: "APPEND"
|
|
39
|
+
});
|
|
40
|
+
return operators.map((operator)=>this.createFrom(operator));
|
|
41
|
+
}
|
|
42
|
+
constructor(label, value){
|
|
43
|
+
this.label = label;
|
|
44
|
+
this.value = value;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
export { Field, Field_OperatorType as OperatorType, Operator };
|
|
48
|
+
|
|
49
|
+
//# sourceMappingURL=Field.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation/FileList/components/BulkActions/domain/Field.js","sources":["../../../../../../src/presentation/FileList/components/BulkActions/domain/Field.ts"],"sourcesContent":["import type { CmsModelField } from \"@webiny/app-headless-cms-common/types/model.js\";\n\nexport type FieldRaw = CmsModelField;\n\nexport enum OperatorType {\n OVERRIDE = \"OVERRIDE\",\n APPEND = \"APPEND\",\n REMOVE = \"REMOVE\"\n}\n\nexport interface FieldDTO {\n label: string;\n value: string;\n operators: OperatorDTO[];\n raw: FieldRaw;\n}\n\nexport class Field {\n public readonly label: string;\n public readonly value: string;\n public readonly operators: Operator[];\n public readonly raw: FieldRaw;\n\n static createFromRaw(field: FieldRaw) {\n const label = field.label;\n const value = field.fieldId;\n const operators = Operator.createFromField(field);\n return new Field(label, value, operators, field);\n }\n\n private constructor(label: string, value: string, operators: Operator[], renderer: FieldRaw) {\n this.label = label;\n this.value = value;\n this.operators = operators;\n this.raw = renderer;\n }\n}\n\nexport interface OperatorDTO {\n label: string;\n value: string;\n}\n\nexport class Operator {\n public readonly label: string;\n public readonly value: string;\n\n static createFrom(rawData: OperatorDTO) {\n return new Operator(rawData.label, rawData.value);\n }\n\n static createFromField(field: CmsModelField) {\n const operators = [\n {\n label: \"Override existing values\",\n value: OperatorType.OVERRIDE\n },\n {\n label: \"Clear all existing values\",\n value: OperatorType.REMOVE\n }\n ];\n\n if (field.list) {\n operators.push({\n label: \"Append to existing values\",\n value: OperatorType.APPEND\n });\n }\n\n return operators.map(operator => this.createFrom(operator));\n }\n\n private constructor(label: string, value: string) {\n this.label = label;\n this.value = value;\n }\n}\n"],"names":["OperatorType","Field","field","label","value","operators","Operator","renderer","rawData","operator"],"mappings":"AAIO,IAAKA,qBAAYA,WAAAA,GAAAA,SAAZA,YAAY;;;;WAAZA;;AAaL,MAAMC;IAMT,OAAO,cAAcC,KAAe,EAAE;QAClC,MAAMC,QAAQD,MAAM,KAAK;QACzB,MAAME,QAAQF,MAAM,OAAO;QAC3B,MAAMG,YAAYC,SAAS,eAAe,CAACJ;QAC3C,OAAO,IAAID,MAAME,OAAOC,OAAOC,WAAWH;IAC9C;IAEA,YAAoBC,KAAa,EAAEC,KAAa,EAAEC,SAAqB,EAAEE,QAAkB,CAAE;QACzF,IAAI,CAAC,KAAK,GAAGJ;QACb,IAAI,CAAC,KAAK,GAAGC;QACb,IAAI,CAAC,SAAS,GAAGC;QACjB,IAAI,CAAC,GAAG,GAAGE;IACf;AACJ;AAOO,MAAMD;IAIT,OAAO,WAAWE,OAAoB,EAAE;QACpC,OAAO,IAAIF,SAASE,QAAQ,KAAK,EAAEA,QAAQ,KAAK;IACpD;IAEA,OAAO,gBAAgBN,KAAoB,EAAE;QACzC,MAAMG,YAAY;YACd;gBACI,OAAO;gBACP,OAAO;YACX;YACA;gBACI,OAAO;gBACP,OAAO;YACX;SACH;QAED,IAAIH,MAAM,IAAI,EACVG,UAAU,IAAI,CAAC;YACX,OAAO;YACP,OAAO;QACX;QAGJ,OAAOA,UAAU,GAAG,CAACI,CAAAA,WAAY,IAAI,CAAC,UAAU,CAACA;IACrD;IAEA,YAAoBN,KAAa,EAAEC,KAAa,CAAE;QAC9C,IAAI,CAAC,KAAK,GAAGD;QACb,IAAI,CAAC,KAAK,GAAGC;IACjB;AACJ"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
class FieldMapper {
|
|
2
|
+
static toDTO(configuration) {
|
|
3
|
+
return configuration.map((field)=>({
|
|
4
|
+
label: field.label,
|
|
5
|
+
value: field.value,
|
|
6
|
+
operators: OperatorMapper.toDTO(field.operators),
|
|
7
|
+
raw: field.raw
|
|
8
|
+
}));
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
class OperatorMapper {
|
|
12
|
+
static toDTO(operators) {
|
|
13
|
+
return operators.map((operator)=>({
|
|
14
|
+
value: operator.value || "",
|
|
15
|
+
label: operator.label || ""
|
|
16
|
+
}));
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export { FieldMapper, OperatorMapper };
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=FieldMapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation/FileList/components/BulkActions/domain/FieldMapper.js","sources":["../../../../../../src/presentation/FileList/components/BulkActions/domain/FieldMapper.ts"],"sourcesContent":["import type { Field, FieldDTO, Operator, OperatorDTO } from \"./Field.js\";\n\nexport class FieldMapper {\n static toDTO(configuration: Field[]): FieldDTO[] {\n return configuration.map(field => {\n return {\n label: field.label,\n value: field.value,\n operators: OperatorMapper.toDTO(field.operators),\n raw: field.raw\n };\n });\n }\n}\n\nexport class OperatorMapper {\n static toDTO(operators: Operator[]): OperatorDTO[] {\n return operators.map(operator => ({\n value: operator.value || \"\",\n label: operator.label || \"\"\n }));\n }\n}\n"],"names":["FieldMapper","configuration","field","OperatorMapper","operators","operator"],"mappings":"AAEO,MAAMA;IACT,OAAO,MAAMC,aAAsB,EAAc;QAC7C,OAAOA,cAAc,GAAG,CAACC,CAAAA,QACd;gBACH,OAAOA,MAAM,KAAK;gBAClB,OAAOA,MAAM,KAAK;gBAClB,WAAWC,eAAe,KAAK,CAACD,MAAM,SAAS;gBAC/C,KAAKA,MAAM,GAAG;YAClB;IAER;AACJ;AAEO,MAAMC;IACT,OAAO,MAAMC,SAAqB,EAAiB;QAC/C,OAAOA,UAAU,GAAG,CAACC,CAAAA,WAAa;gBAC9B,OAAOA,SAAS,KAAK,IAAI;gBACzB,OAAOA,SAAS,KAAK,IAAI;YAC7B;IACJ;AACJ"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { BulkActionBar, getFilesLabel } from "./BulkActionBar.js";
|
|
2
|
+
export { BulkActionDelete } from "./BulkActionDelete.js";
|
|
3
|
+
export { BulkActionMove } from "./BulkActionMove.js";
|
|
4
|
+
export { BulkActionEdit } from "./BulkActionEdit.js";
|
|
5
|
+
export { BulkAction } from "./useBulkActionWorker.js";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { BulkActionBar, getFilesLabel } from "./BulkActionBar.js";
|
|
2
|
+
export { BulkActionDelete } from "./BulkActionDelete.js";
|
|
3
|
+
export { BulkActionMove } from "./BulkActionMove.js";
|
|
4
|
+
export { BulkActionEdit } from "./BulkActionEdit.js";
|
|
5
|
+
export { BulkAction } from "./useBulkActionWorker.js";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { CallbackParams } from "@webiny/app-admin";
|
|
2
|
+
import type { FmFile } from "../../../../features/shared/types.js";
|
|
3
|
+
import { getFilesLabel } from "./BulkActionBar.js";
|
|
4
|
+
export declare const BulkAction: {
|
|
5
|
+
useButtons: () => import("@webiny/app-admin/components/Buttons/useButtons.js").ButtonsProviderContext;
|
|
6
|
+
useWorker: () => {
|
|
7
|
+
items: FmFile[];
|
|
8
|
+
process: (callback: (items: FmFile[]) => void) => void;
|
|
9
|
+
processInSeries: (callback: ({ item, allItems, report }: CallbackParams<FmFile>) => Promise<void>, chunkSize?: number) => Promise<void>;
|
|
10
|
+
resetItems: () => void;
|
|
11
|
+
results: import("@webiny/app-admin").Result[];
|
|
12
|
+
resetResults: () => Promise<void>;
|
|
13
|
+
};
|
|
14
|
+
useDialog: () => import("@webiny/app-admin").UseDialogWithReportResponse;
|
|
15
|
+
};
|
|
16
|
+
export { getFilesLabel };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { useCallback, useEffect, useMemo, useRef } from "react";
|
|
2
|
+
import { Worker, useButtons, useDialogWithReport } from "@webiny/app-admin";
|
|
3
|
+
import { useFileManagerPresenter } from "../../FileManagerPresenterProvider.js";
|
|
4
|
+
const useWorker = ()=>{
|
|
5
|
+
const { vm, actions } = useFileManagerPresenter();
|
|
6
|
+
const { current: worker } = useRef(new Worker());
|
|
7
|
+
const selectedFiles = useMemo(()=>{
|
|
8
|
+
const { selectedIds } = vm.list.selection;
|
|
9
|
+
return vm.list.rows.filter((row)=>selectedIds.has(row.id));
|
|
10
|
+
}, [
|
|
11
|
+
vm.list.selection.selectedIds,
|
|
12
|
+
vm.list.rows
|
|
13
|
+
]);
|
|
14
|
+
useEffect(()=>{
|
|
15
|
+
worker.items = selectedFiles;
|
|
16
|
+
}, [
|
|
17
|
+
selectedFiles.length
|
|
18
|
+
]);
|
|
19
|
+
const resetItems = useCallback(()=>{
|
|
20
|
+
worker.items = [];
|
|
21
|
+
actions.selection.deselectAll();
|
|
22
|
+
}, []);
|
|
23
|
+
const resetResults = useCallback(async ()=>{
|
|
24
|
+
worker.resetResults();
|
|
25
|
+
}, []);
|
|
26
|
+
return {
|
|
27
|
+
items: selectedFiles,
|
|
28
|
+
process: (callback)=>worker.process(callback),
|
|
29
|
+
processInSeries: async (callback, chunkSize)=>worker.processInSeries(callback, chunkSize),
|
|
30
|
+
resetItems,
|
|
31
|
+
results: worker.results,
|
|
32
|
+
resetResults
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
const BulkAction = {
|
|
36
|
+
useButtons: useButtons,
|
|
37
|
+
useWorker: useWorker,
|
|
38
|
+
useDialog: useDialogWithReport
|
|
39
|
+
};
|
|
40
|
+
export { getFilesLabel } from "./BulkActionBar.js";
|
|
41
|
+
export { BulkAction };
|
|
42
|
+
|
|
43
|
+
//# sourceMappingURL=useBulkActionWorker.js.map
|