@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,8 @@
|
|
|
1
|
+
import { createAbstraction } from "@webiny/feature/admin";
|
|
2
|
+
const GetSettingsGateway = createAbstraction("GetSettingsGateway");
|
|
3
|
+
const SaveSettingsGateway = createAbstraction("SaveSettingsGateway");
|
|
4
|
+
const GetSettingsRepository = createAbstraction("GetSettingsRepository");
|
|
5
|
+
const GetSettingsUseCase = createAbstraction("GetSettingsUseCase");
|
|
6
|
+
export { GetSettingsGateway, GetSettingsRepository, GetSettingsUseCase, SaveSettingsGateway };
|
|
7
|
+
|
|
8
|
+
//# sourceMappingURL=abstractions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/settings/abstractions.js","sources":["../../../src/features/settings/abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/admin\";\nimport type { FmSettings } from \"../shared/types.js\";\n\n// Gateway — performs the GraphQL call to retrieve settings.\nexport interface IGetSettingsGateway {\n execute(): Promise<FmSettings>;\n}\n\nexport const GetSettingsGateway = createAbstraction<IGetSettingsGateway>(\"GetSettingsGateway\");\n\nexport namespace GetSettingsGateway {\n export type Interface = IGetSettingsGateway;\n}\n\n// Gateway — performs the GraphQL mutation to save settings.\nexport interface ISaveSettingsGateway {\n execute(data: FmSettings): Promise<FmSettings>;\n}\n\nexport const SaveSettingsGateway = createAbstraction<ISaveSettingsGateway>(\"SaveSettingsGateway\");\n\nexport namespace SaveSettingsGateway {\n export type Interface = ISaveSettingsGateway;\n}\n\n// Repository — caches settings as MobX observable state.\nexport interface IGetSettingsRepository {\n execute(): Promise<FmSettings>;\n save(data: FmSettings): Promise<FmSettings>;\n readonly settings: FmSettings | null;\n}\n\nexport const GetSettingsRepository =\n createAbstraction<IGetSettingsRepository>(\"GetSettingsRepository\");\n\nexport namespace GetSettingsRepository {\n export type Interface = IGetSettingsRepository;\n}\n\n// UseCase — orchestrates a single get-settings operation.\nexport interface IGetSettingsUseCase {\n execute(): Promise<FmSettings>;\n}\n\nexport const GetSettingsUseCase = createAbstraction<IGetSettingsUseCase>(\"GetSettingsUseCase\");\n\nexport namespace GetSettingsUseCase {\n export type Interface = IGetSettingsUseCase;\n}\n"],"names":["GetSettingsGateway","createAbstraction","SaveSettingsGateway","GetSettingsRepository","GetSettingsUseCase"],"mappings":";AAQO,MAAMA,qBAAqBC,kBAAuC;AAWlE,MAAMC,sBAAsBD,kBAAwC;AAapE,MAAME,wBACTF,kBAA0C;AAWvC,MAAMG,qBAAqBH,kBAAuC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { createFeature } from "@webiny/feature/admin";
|
|
2
|
+
import { GetSettingsUseCase } from "./abstractions.js";
|
|
3
|
+
import { GetSettingsUseCase as external_GetSettingsUseCase_js_GetSettingsUseCase } from "./GetSettingsUseCase.js";
|
|
4
|
+
import { GetSettingsRepository } from "./GetSettingsRepository.js";
|
|
5
|
+
import { GetSettingsGateway } from "./GetSettingsGateway.js";
|
|
6
|
+
import { SaveSettingsGateway } from "./SaveSettingsGateway.js";
|
|
7
|
+
const GetSettingsFeature = createFeature({
|
|
8
|
+
name: "FileManager/GetSettings",
|
|
9
|
+
register (container) {
|
|
10
|
+
container.register(external_GetSettingsUseCase_js_GetSettingsUseCase);
|
|
11
|
+
container.register(GetSettingsRepository).inSingletonScope();
|
|
12
|
+
container.register(GetSettingsGateway).inSingletonScope();
|
|
13
|
+
container.register(SaveSettingsGateway).inSingletonScope();
|
|
14
|
+
},
|
|
15
|
+
resolve (container) {
|
|
16
|
+
return {
|
|
17
|
+
useCase: container.resolve(GetSettingsUseCase)
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
export { GetSettingsFeature };
|
|
22
|
+
|
|
23
|
+
//# sourceMappingURL=feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/settings/feature.js","sources":["../../../src/features/settings/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/admin\";\nimport { GetSettingsUseCase as UseCaseAbstraction } from \"./abstractions.js\";\nimport { GetSettingsUseCase } from \"./GetSettingsUseCase.js\";\nimport { GetSettingsRepository } from \"./GetSettingsRepository.js\";\nimport { GetSettingsGateway } from \"./GetSettingsGateway.js\";\nimport { SaveSettingsGateway } from \"./SaveSettingsGateway.js\";\n\nexport const GetSettingsFeature = createFeature({\n name: \"FileManager/GetSettings\",\n register(container) {\n container.register(GetSettingsUseCase);\n container.register(GetSettingsRepository).inSingletonScope();\n container.register(GetSettingsGateway).inSingletonScope();\n container.register(SaveSettingsGateway).inSingletonScope();\n },\n resolve(container) {\n return {\n useCase: container.resolve(UseCaseAbstraction)\n };\n }\n});\n"],"names":["GetSettingsFeature","createFeature","container","GetSettingsUseCase","GetSettingsRepository","GetSettingsGateway","SaveSettingsGateway","UseCaseAbstraction"],"mappings":";;;;;;AAOO,MAAMA,qBAAqBC,cAAc;IAC5C,MAAM;IACN,UAASC,SAAS;QACdA,UAAU,QAAQ,CAACC;QACnBD,UAAU,QAAQ,CAACE,uBAAuB,gBAAgB;QAC1DF,UAAU,QAAQ,CAACG,oBAAoB,gBAAgB;QACvDH,UAAU,QAAQ,CAACI,qBAAqB,gBAAgB;IAC5D;IACA,SAAQJ,SAAS;QACb,OAAO;YACH,SAASA,UAAU,OAAO,CAACK;QAC/B;IACJ;AACJ"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { GetSettingsFeature } from "./feature.js";
|
|
2
|
+
export { GetSettingsUseCase, GetSettingsRepository, GetSettingsGateway, SaveSettingsGateway } from "./abstractions.js";
|
|
3
|
+
export type { IGetSettingsUseCase, IGetSettingsRepository, IGetSettingsGateway, ISaveSettingsGateway } from "./abstractions.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const FILE_FIELDS: string[];
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
const FILE_FIELDS = [
|
|
2
|
+
"id",
|
|
3
|
+
"name",
|
|
4
|
+
"description",
|
|
5
|
+
"key",
|
|
6
|
+
"src",
|
|
7
|
+
"type",
|
|
8
|
+
"size",
|
|
9
|
+
"tags",
|
|
10
|
+
"createdOn",
|
|
11
|
+
"savedOn",
|
|
12
|
+
"modifiedOn",
|
|
13
|
+
"createdBy.id",
|
|
14
|
+
"createdBy.displayName",
|
|
15
|
+
"createdBy.type",
|
|
16
|
+
"savedBy.id",
|
|
17
|
+
"savedBy.displayName",
|
|
18
|
+
"savedBy.type",
|
|
19
|
+
"modifiedBy.id",
|
|
20
|
+
"modifiedBy.displayName",
|
|
21
|
+
"modifiedBy.type",
|
|
22
|
+
"location.folderId",
|
|
23
|
+
"metadata.image.width",
|
|
24
|
+
"metadata.image.height",
|
|
25
|
+
"metadata.image.format",
|
|
26
|
+
"metadata.image.orientation",
|
|
27
|
+
"metadata.exif",
|
|
28
|
+
"metadata.iptc"
|
|
29
|
+
];
|
|
30
|
+
export { FILE_FIELDS };
|
|
31
|
+
|
|
32
|
+
//# sourceMappingURL=FILE_FIELDS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/shared/FILE_FIELDS.js","sources":["../../../src/features/shared/FILE_FIELDS.ts"],"sourcesContent":["export const FILE_FIELDS = [\n \"id\",\n \"name\",\n \"description\",\n \"key\",\n \"src\",\n \"type\",\n \"size\",\n \"tags\",\n \"createdOn\",\n \"savedOn\",\n \"modifiedOn\",\n \"createdBy.id\",\n \"createdBy.displayName\",\n \"createdBy.type\",\n \"savedBy.id\",\n \"savedBy.displayName\",\n \"savedBy.type\",\n \"modifiedBy.id\",\n \"modifiedBy.displayName\",\n \"modifiedBy.type\",\n \"location.folderId\",\n \"metadata.image.width\",\n \"metadata.image.height\",\n \"metadata.image.format\",\n \"metadata.image.orientation\",\n \"metadata.exif\",\n \"metadata.iptc\"\n];\n"],"names":["FILE_FIELDS"],"mappings":"AAAO,MAAMA,cAAc;IACvB;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACH"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FileFieldsProvider as Abstraction } from "./abstractions.js";
|
|
2
|
+
declare class FileFieldsProviderImpl implements Abstraction.Interface {
|
|
3
|
+
execute(): Promise<string[]>;
|
|
4
|
+
}
|
|
5
|
+
export declare const FileFieldsProvider: typeof FileFieldsProviderImpl & {
|
|
6
|
+
__abstraction: import("@webiny/di").Abstraction<import("./abstractions.js").IFileFieldsProvider>;
|
|
7
|
+
};
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FILE_FIELDS } from "./FILE_FIELDS.js";
|
|
2
|
+
import { FileFieldsProvider } from "./abstractions.js";
|
|
3
|
+
class FileFieldsProviderImpl {
|
|
4
|
+
async execute() {
|
|
5
|
+
return FILE_FIELDS;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
const FileFieldsProvider_FileFieldsProvider = FileFieldsProvider.createImplementation({
|
|
9
|
+
implementation: FileFieldsProviderImpl,
|
|
10
|
+
dependencies: []
|
|
11
|
+
});
|
|
12
|
+
export { FileFieldsProvider_FileFieldsProvider as FileFieldsProvider };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=FileFieldsProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/shared/FileFieldsProvider.js","sources":["../../../src/features/shared/FileFieldsProvider.ts"],"sourcesContent":["import { FILE_FIELDS } from \"./FILE_FIELDS.js\";\nimport { FileFieldsProvider as Abstraction } from \"./abstractions.js\";\n\nclass FileFieldsProviderImpl implements Abstraction.Interface {\n async execute(): Promise<string[]> {\n return FILE_FIELDS;\n }\n}\n\nexport const FileFieldsProvider = Abstraction.createImplementation({\n implementation: FileFieldsProviderImpl,\n dependencies: []\n});\n"],"names":["FileFieldsProviderImpl","FILE_FIELDS","FileFieldsProvider","Abstraction"],"mappings":";;AAGA,MAAMA;IACF,MAAM,UAA6B;QAC/B,OAAOC;IACX;AACJ;AAEO,MAAMC,wCAAqBC,mBAAAA,oBAAgC,CAAC;IAC/D,gBAAgBH;IAChB,cAAc,EAAE;AACpB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { WcpService } from "@webiny/app-admin/features/wcp/abstractions.js";
|
|
2
|
+
import { FileFieldsProvider as Abstraction } from "./abstractions.js";
|
|
3
|
+
declare class FileFieldsProviderWithWcpImpl implements Abstraction.Interface {
|
|
4
|
+
private wcp;
|
|
5
|
+
private decoratee;
|
|
6
|
+
constructor(wcp: WcpService.Interface, decoratee: Abstraction.Interface);
|
|
7
|
+
execute(): Promise<string[]>;
|
|
8
|
+
}
|
|
9
|
+
export declare const FileFieldsProviderWithWcp: typeof FileFieldsProviderWithWcpImpl & {
|
|
10
|
+
__abstraction: import("@webiny/di").Abstraction<import("./abstractions.js").IFileFieldsProvider>;
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { WcpService } from "@webiny/app-admin/features/wcp/abstractions.js";
|
|
2
|
+
import { FileFieldsProvider } from "./abstractions.js";
|
|
3
|
+
class FileFieldsProviderWithWcpImpl {
|
|
4
|
+
constructor(wcp, decoratee){
|
|
5
|
+
this.wcp = wcp;
|
|
6
|
+
this.decoratee = decoratee;
|
|
7
|
+
}
|
|
8
|
+
async execute() {
|
|
9
|
+
const fields = await this.decoratee.execute();
|
|
10
|
+
if (this.wcp.getProject().canUsePrivateFiles()) return [
|
|
11
|
+
...fields,
|
|
12
|
+
"accessControl.type"
|
|
13
|
+
];
|
|
14
|
+
return fields;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
const FileFieldsProviderWithWcp = FileFieldsProvider.createDecorator({
|
|
18
|
+
decorator: FileFieldsProviderWithWcpImpl,
|
|
19
|
+
dependencies: [
|
|
20
|
+
WcpService
|
|
21
|
+
]
|
|
22
|
+
});
|
|
23
|
+
export { FileFieldsProviderWithWcp };
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=FileFieldsProviderWithWcp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/shared/FileFieldsProviderWithWcp.js","sources":["../../../src/features/shared/FileFieldsProviderWithWcp.ts"],"sourcesContent":["import { WcpService } from \"@webiny/app-admin/features/wcp/abstractions.js\";\nimport { FileFieldsProvider as Abstraction } from \"./abstractions.js\";\n\nclass FileFieldsProviderWithWcpImpl implements Abstraction.Interface {\n constructor(\n private wcp: WcpService.Interface,\n private decoratee: Abstraction.Interface\n ) {}\n\n async execute(): Promise<string[]> {\n const fields = await this.decoratee.execute();\n\n if (this.wcp.getProject().canUsePrivateFiles()) {\n return [...fields, \"accessControl.type\"];\n }\n\n return fields;\n }\n}\n\nexport const FileFieldsProviderWithWcp = Abstraction.createDecorator({\n decorator: FileFieldsProviderWithWcpImpl,\n dependencies: [WcpService]\n});\n"],"names":["FileFieldsProviderWithWcpImpl","wcp","decoratee","fields","FileFieldsProviderWithWcp","Abstraction","WcpService"],"mappings":";;AAGA,MAAMA;IACF,YACYC,GAAyB,EACzBC,SAAgC,CAC1C;aAFUD,GAAG,GAAHA;aACAC,SAAS,GAATA;IACT;IAEH,MAAM,UAA6B;QAC/B,MAAMC,SAAS,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO;QAE3C,IAAI,IAAI,CAAC,GAAG,CAAC,UAAU,GAAG,kBAAkB,IACxC,OAAO;eAAIA;YAAQ;SAAqB;QAG5C,OAAOA;IACX;AACJ;AAEO,MAAMC,4BAA4BC,mBAAAA,eAA2B,CAAC;IACjE,WAAWL;IACX,cAAc;QAACM;KAAW;AAC9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ListCache } from "@webiny/app-admin/features/listCache/index.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ListCache } from "@webiny/app-admin/features/listCache/index.js";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { IListCache } from "@webiny/app-admin/features/listCache/index.js";
|
|
2
|
+
import type { FmFile } from "./types.js";
|
|
3
|
+
export declare const FilesListCache: import("@webiny/di").Abstraction<IListCache<FmFile>>;
|
|
4
|
+
export declare namespace FilesListCache {
|
|
5
|
+
type Interface = IListCache<FmFile>;
|
|
6
|
+
}
|
|
7
|
+
export interface IFileFieldsProvider {
|
|
8
|
+
execute(): Promise<string[]>;
|
|
9
|
+
}
|
|
10
|
+
export declare const FileFieldsProvider: import("@webiny/di").Abstraction<IFileFieldsProvider>;
|
|
11
|
+
export declare namespace FileFieldsProvider {
|
|
12
|
+
type Interface = IFileFieldsProvider;
|
|
13
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { createAbstraction } from "@webiny/feature/admin";
|
|
2
|
+
const FilesListCache = createAbstraction("FilesListCache");
|
|
3
|
+
const FileFieldsProvider = createAbstraction("FileFieldsProvider");
|
|
4
|
+
export { FileFieldsProvider, FilesListCache };
|
|
5
|
+
|
|
6
|
+
//# sourceMappingURL=abstractions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/shared/abstractions.js","sources":["../../../src/features/shared/abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/admin\";\nimport type { IListCache } from \"@webiny/app-admin/features/listCache/index.js\";\nimport type { FmFile } from \"./types.js\";\n\n// Shared cache for file list data, used by all file CRUD repositories.\nexport const FilesListCache = createAbstraction<IListCache<FmFile>>(\"FilesListCache\");\n\nexport namespace FilesListCache {\n export type Interface = IListCache<FmFile>;\n}\n\nexport interface IFileFieldsProvider {\n execute(): Promise<string[]>;\n}\n\nexport const FileFieldsProvider = createAbstraction<IFileFieldsProvider>(\"FileFieldsProvider\");\n\nexport namespace FileFieldsProvider {\n export type Interface = IFileFieldsProvider;\n}\n"],"names":["FilesListCache","createAbstraction","FileFieldsProvider"],"mappings":";AAKO,MAAMA,iBAAiBC,kBAAsC;AAU7D,MAAMC,qBAAqBD,kBAAuC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { FmFile } from "./types.js";
|
|
2
|
+
export declare const SharedCacheFeature: import("@webiny/feature/admin").FeatureDefinition<{
|
|
3
|
+
cache: import("@webiny/app-admin/features/listCache/ListCache.js").IListCache<FmFile>;
|
|
4
|
+
fileFieldsProvider: import("./abstractions.js").IFileFieldsProvider;
|
|
5
|
+
}, []>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { createFeature } from "@webiny/feature/admin";
|
|
2
|
+
import { FileFieldsProvider, FilesListCache } from "./abstractions.js";
|
|
3
|
+
import { ListCache } from "./FilesListCache.js";
|
|
4
|
+
import { FileFieldsProvider as external_FileFieldsProvider_js_FileFieldsProvider } from "./FileFieldsProvider.js";
|
|
5
|
+
import { FileFieldsProviderWithWcp } from "./FileFieldsProviderWithWcp.js";
|
|
6
|
+
const SharedCacheFeature = createFeature({
|
|
7
|
+
name: "FileManager/SharedCache",
|
|
8
|
+
register (container) {
|
|
9
|
+
container.registerInstance(FilesListCache, new ListCache());
|
|
10
|
+
container.register(external_FileFieldsProvider_js_FileFieldsProvider).inSingletonScope();
|
|
11
|
+
container.registerDecorator(FileFieldsProviderWithWcp);
|
|
12
|
+
},
|
|
13
|
+
resolve (container) {
|
|
14
|
+
return {
|
|
15
|
+
cache: container.resolve(FilesListCache),
|
|
16
|
+
fileFieldsProvider: container.resolve(FileFieldsProvider)
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
export { SharedCacheFeature };
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/shared/feature.js","sources":["../../../src/features/shared/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/admin\";\nimport {\n FilesListCache,\n FileFieldsProvider as FileFieldsProviderAbstraction\n} from \"./abstractions.js\";\nimport { ListCache } from \"./FilesListCache.js\";\nimport { FileFieldsProvider } from \"./FileFieldsProvider.js\";\nimport { FileFieldsProviderWithWcp } from \"./FileFieldsProviderWithWcp.js\";\nimport type { FmFile } from \"./types.js\";\n\nexport const SharedCacheFeature = createFeature({\n name: \"FileManager/SharedCache\",\n register(container) {\n container.registerInstance(FilesListCache, new ListCache<FmFile>());\n container.register(FileFieldsProvider).inSingletonScope();\n container.registerDecorator(FileFieldsProviderWithWcp);\n },\n resolve(container) {\n return {\n cache: container.resolve(FilesListCache),\n fileFieldsProvider: container.resolve(FileFieldsProviderAbstraction)\n };\n }\n});\n"],"names":["SharedCacheFeature","createFeature","container","FilesListCache","ListCache","FileFieldsProvider","FileFieldsProviderWithWcp","FileFieldsProviderAbstraction"],"mappings":";;;;;AAUO,MAAMA,qBAAqBC,cAAc;IAC5C,MAAM;IACN,UAASC,SAAS;QACdA,UAAU,gBAAgB,CAACC,gBAAgB,IAAIC;QAC/CF,UAAU,QAAQ,CAACG,mDAAoB,gBAAgB;QACvDH,UAAU,iBAAiB,CAACI;IAChC;IACA,SAAQJ,SAAS;QACb,OAAO;YACH,OAAOA,UAAU,OAAO,CAACC;YACzB,oBAAoBD,UAAU,OAAO,CAACK;QAC1C;IACJ;AACJ"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { SharedCacheFeature } from "./feature.js";
|
|
2
|
+
export { FilesListCache, FileFieldsProvider } from "./abstractions.js";
|
|
3
|
+
export type { FilesListCache as FilesListCacheNs, FileFieldsProvider as FileFieldsProviderNs } from "./abstractions.js";
|
|
4
|
+
export * from "./types.js";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type { FmFile, FmIdentity, FmLocation, FmTag, FmListMeta, FmFileListWhereInput, FmFileListSorter, FmTagsListWhereInput, UploadProgress, PresignedPostPayload, PresignedPostPayloadResponse, ListFilesParams } from "@webiny/sdk";
|
|
2
|
+
import type { FmFile } from "@webiny/sdk";
|
|
3
|
+
import type { UploadProgress } from "@webiny/sdk";
|
|
4
|
+
export interface FmSettings {
|
|
5
|
+
uploadMinFileSize: string;
|
|
6
|
+
uploadMaxFileSize: string;
|
|
7
|
+
srcPrefix: string;
|
|
8
|
+
}
|
|
9
|
+
export interface UploadJob {
|
|
10
|
+
id: string;
|
|
11
|
+
fileName: string;
|
|
12
|
+
status: "pending" | "uploading" | "completed" | "failed";
|
|
13
|
+
progress: UploadProgress;
|
|
14
|
+
error?: string;
|
|
15
|
+
result?: FmFile;
|
|
16
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { beforeEach, describe, expect, it, vi } from "vitest";
|
|
2
|
+
import { Container } from "@webiny/di";
|
|
3
|
+
import { ListTagsGateway, ListTagsRepository, ListTagsUseCase } from "./abstractions.js";
|
|
4
|
+
import { ListTagsUseCase as external_ListTagsUseCase_js_ListTagsUseCase } from "./ListTagsUseCase.js";
|
|
5
|
+
import { ListTagsRepository as external_ListTagsRepository_js_ListTagsRepository } from "./ListTagsRepository.js";
|
|
6
|
+
function createTags(count) {
|
|
7
|
+
return Array.from({
|
|
8
|
+
length: count
|
|
9
|
+
}, (_, i)=>({
|
|
10
|
+
tag: `tag-${i}`,
|
|
11
|
+
count: (i + 1) * 10
|
|
12
|
+
}));
|
|
13
|
+
}
|
|
14
|
+
function createMockGateway(tags = createTags(3)) {
|
|
15
|
+
const execute = vi.fn();
|
|
16
|
+
execute.mockResolvedValue(tags);
|
|
17
|
+
return {
|
|
18
|
+
execute
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
function createContainer(mockGateway) {
|
|
22
|
+
const container = new Container();
|
|
23
|
+
container.registerInstance(ListTagsGateway, mockGateway);
|
|
24
|
+
container.register(external_ListTagsRepository_js_ListTagsRepository).inSingletonScope();
|
|
25
|
+
container.register(external_ListTagsUseCase_js_ListTagsUseCase);
|
|
26
|
+
return container;
|
|
27
|
+
}
|
|
28
|
+
describe("ListTags Feature", ()=>{
|
|
29
|
+
let mockGateway;
|
|
30
|
+
let container;
|
|
31
|
+
beforeEach(()=>{
|
|
32
|
+
mockGateway = createMockGateway();
|
|
33
|
+
container = createContainer(mockGateway);
|
|
34
|
+
});
|
|
35
|
+
it("should call gateway with the provided where params", async ()=>{
|
|
36
|
+
const useCase = container.resolve(ListTagsUseCase);
|
|
37
|
+
await useCase.execute({
|
|
38
|
+
where: {
|
|
39
|
+
tags_startsWith: "image:"
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
expect(mockGateway.execute).toHaveBeenCalledWith({
|
|
43
|
+
where: {
|
|
44
|
+
tags_startsWith: "image:"
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
it("should call gateway with undefined where when not provided", async ()=>{
|
|
49
|
+
const useCase = container.resolve(ListTagsUseCase);
|
|
50
|
+
await useCase.execute();
|
|
51
|
+
expect(mockGateway.execute).toHaveBeenCalledWith({
|
|
52
|
+
where: void 0
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
it("should return tags from the gateway", async ()=>{
|
|
56
|
+
const tags = createTags(5);
|
|
57
|
+
mockGateway.execute.mockResolvedValue(tags);
|
|
58
|
+
const useCase = container.resolve(ListTagsUseCase);
|
|
59
|
+
const result = await useCase.execute();
|
|
60
|
+
expect(result).toEqual(tags);
|
|
61
|
+
});
|
|
62
|
+
it("should cache tags in the repository after fetch", async ()=>{
|
|
63
|
+
const tags = createTags(3);
|
|
64
|
+
mockGateway.execute.mockResolvedValue(tags);
|
|
65
|
+
const repository = container.resolve(ListTagsRepository);
|
|
66
|
+
expect(repository.tags).toEqual([]);
|
|
67
|
+
await repository.execute({});
|
|
68
|
+
expect(repository.tags).toEqual(tags);
|
|
69
|
+
});
|
|
70
|
+
it("should update cached tags on subsequent fetches", async ()=>{
|
|
71
|
+
const initialTags = createTags(2);
|
|
72
|
+
const updatedTags = [
|
|
73
|
+
{
|
|
74
|
+
tag: "tag-0",
|
|
75
|
+
count: 15
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
tag: "tag-1",
|
|
79
|
+
count: 25
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
tag: "tag-2",
|
|
83
|
+
count: 5
|
|
84
|
+
}
|
|
85
|
+
];
|
|
86
|
+
mockGateway.execute.mockResolvedValueOnce(initialTags).mockResolvedValueOnce(updatedTags);
|
|
87
|
+
const repository = container.resolve(ListTagsRepository);
|
|
88
|
+
await repository.execute({});
|
|
89
|
+
expect(repository.tags).toEqual(initialTags);
|
|
90
|
+
await repository.execute({});
|
|
91
|
+
expect(repository.tags).toEqual(updatedTags);
|
|
92
|
+
});
|
|
93
|
+
it("should propagate gateway errors", async ()=>{
|
|
94
|
+
mockGateway.execute.mockRejectedValue(new Error("Network error"));
|
|
95
|
+
const useCase = container.resolve(ListTagsUseCase);
|
|
96
|
+
await expect(useCase.execute()).rejects.toThrow("Network error");
|
|
97
|
+
});
|
|
98
|
+
it("should support filtering by createdBy", async ()=>{
|
|
99
|
+
const useCase = container.resolve(ListTagsUseCase);
|
|
100
|
+
await useCase.execute({
|
|
101
|
+
where: {
|
|
102
|
+
createdBy: "user-1"
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
expect(mockGateway.execute).toHaveBeenCalledWith({
|
|
106
|
+
where: {
|
|
107
|
+
createdBy: "user-1"
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
it("should support filtering with tags_not_startsWith", async ()=>{
|
|
112
|
+
const useCase = container.resolve(ListTagsUseCase);
|
|
113
|
+
await useCase.execute({
|
|
114
|
+
where: {
|
|
115
|
+
tags_not_startsWith: "scope:"
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
expect(mockGateway.execute).toHaveBeenCalledWith({
|
|
119
|
+
where: {
|
|
120
|
+
tags_not_startsWith: "scope:"
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
//# sourceMappingURL=ListTags.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/tags/ListTags.test.js","sources":["../../../src/features/tags/ListTags.test.ts"],"sourcesContent":["import { describe, it, expect, vi, beforeEach } from \"vitest\";\nimport { Container } from \"@webiny/di\";\nimport {\n ListTagsUseCase as UseCaseAbstraction,\n ListTagsRepository as RepositoryAbstraction,\n ListTagsGateway as GatewayAbstraction,\n type IListTagsGateway,\n type ListTagsGatewayParams,\n type ListTagsGatewayResult\n} from \"./abstractions.js\";\nimport { ListTagsUseCase } from \"./ListTagsUseCase.js\";\nimport { ListTagsRepository } from \"./ListTagsRepository.js\";\nimport type { FmTag } from \"../shared/types.js\";\n\n// ---------------------------------------------------------------------------\n// Helpers\n// ---------------------------------------------------------------------------\n\nfunction createTags(count: number): FmTag[] {\n return Array.from({ length: count }, (_, i) => ({\n tag: `tag-${i}`,\n count: (i + 1) * 10\n }));\n}\n\ntype MockGateway = IListTagsGateway & { execute: ReturnType<typeof vi.fn> };\n\nfunction createMockGateway(tags: FmTag[] = createTags(3)): MockGateway {\n const execute = vi.fn<(params: ListTagsGatewayParams) => Promise<ListTagsGatewayResult>>();\n execute.mockResolvedValue(tags);\n return { execute };\n}\n\nfunction createContainer(mockGateway: MockGateway) {\n const container = new Container();\n\n // Register the mock gateway instance.\n container.registerInstance(GatewayAbstraction, mockGateway);\n\n // Register the real repository and use case.\n container.register(ListTagsRepository).inSingletonScope();\n container.register(ListTagsUseCase);\n\n return container;\n}\n\n// ---------------------------------------------------------------------------\n// Tests\n// ---------------------------------------------------------------------------\n\ndescribe(\"ListTags Feature\", () => {\n let mockGateway: MockGateway;\n let container: Container;\n\n beforeEach(() => {\n mockGateway = createMockGateway();\n container = createContainer(mockGateway);\n });\n\n // -----------------------------------------------------------------------\n // UseCase invokes gateway with correct params.\n // -----------------------------------------------------------------------\n\n it(\"should call gateway with the provided where params\", async () => {\n const useCase = container.resolve(UseCaseAbstraction);\n\n await useCase.execute({\n where: { tags_startsWith: \"image:\" }\n });\n\n expect(mockGateway.execute).toHaveBeenCalledWith({\n where: { tags_startsWith: \"image:\" }\n });\n });\n\n it(\"should call gateway with undefined where when not provided\", async () => {\n const useCase = container.resolve(UseCaseAbstraction);\n\n await useCase.execute();\n\n expect(mockGateway.execute).toHaveBeenCalledWith({\n where: undefined\n });\n });\n\n // -----------------------------------------------------------------------\n // UseCase returns tags.\n // -----------------------------------------------------------------------\n\n it(\"should return tags from the gateway\", async () => {\n const tags = createTags(5);\n mockGateway.execute.mockResolvedValue(tags);\n\n const useCase = container.resolve(UseCaseAbstraction);\n const result = await useCase.execute();\n\n expect(result).toEqual(tags);\n });\n\n // -----------------------------------------------------------------------\n // Repository caches tags as MobX observable state.\n // -----------------------------------------------------------------------\n\n it(\"should cache tags in the repository after fetch\", async () => {\n const tags = createTags(3);\n mockGateway.execute.mockResolvedValue(tags);\n\n const repository = container.resolve(RepositoryAbstraction);\n\n // Initially empty.\n expect(repository.tags).toEqual([]);\n\n await repository.execute({});\n\n // Tags should be cached.\n expect(repository.tags).toEqual(tags);\n });\n\n // -----------------------------------------------------------------------\n // Repository refreshes tags on subsequent calls.\n // -----------------------------------------------------------------------\n\n it(\"should update cached tags on subsequent fetches\", async () => {\n const initialTags = createTags(2);\n const updatedTags = [\n { tag: \"tag-0\", count: 15 },\n { tag: \"tag-1\", count: 25 },\n { tag: \"tag-2\", count: 5 }\n ];\n\n mockGateway.execute.mockResolvedValueOnce(initialTags).mockResolvedValueOnce(updatedTags);\n\n const repository = container.resolve(RepositoryAbstraction);\n\n // First fetch.\n await repository.execute({});\n expect(repository.tags).toEqual(initialTags);\n\n // Second fetch (simulating refresh after file tag update).\n await repository.execute({});\n expect(repository.tags).toEqual(updatedTags);\n });\n\n // -----------------------------------------------------------------------\n // Gateway error propagation.\n // -----------------------------------------------------------------------\n\n it(\"should propagate gateway errors\", async () => {\n mockGateway.execute.mockRejectedValue(new Error(\"Network error\"));\n\n const useCase = container.resolve(UseCaseAbstraction);\n\n await expect(useCase.execute()).rejects.toThrow(\"Network error\");\n });\n\n // -----------------------------------------------------------------------\n // Filtering with where params.\n // -----------------------------------------------------------------------\n\n it(\"should support filtering by createdBy\", async () => {\n const useCase = container.resolve(UseCaseAbstraction);\n\n await useCase.execute({\n where: { createdBy: \"user-1\" }\n });\n\n expect(mockGateway.execute).toHaveBeenCalledWith({\n where: { createdBy: \"user-1\" }\n });\n });\n\n it(\"should support filtering with tags_not_startsWith\", async () => {\n const useCase = container.resolve(UseCaseAbstraction);\n\n await useCase.execute({\n where: { tags_not_startsWith: \"scope:\" }\n });\n\n expect(mockGateway.execute).toHaveBeenCalledWith({\n where: { tags_not_startsWith: \"scope:\" }\n });\n });\n});\n"],"names":["createTags","count","Array","_","i","createMockGateway","tags","execute","vi","createContainer","mockGateway","container","Container","GatewayAbstraction","ListTagsRepository","ListTagsUseCase","describe","beforeEach","it","useCase","UseCaseAbstraction","expect","undefined","result","repository","RepositoryAbstraction","initialTags","updatedTags","Error"],"mappings":";;;;;AAkBA,SAASA,WAAWC,KAAa;IAC7B,OAAOC,MAAM,IAAI,CAAC;QAAE,QAAQD;IAAM,GAAG,CAACE,GAAGC,IAAO;YAC5C,KAAK,CAAC,IAAI,EAAEA,GAAG;YACf,OAAQA,AAAAA,CAAAA,IAAI,KAAK;QACrB;AACJ;AAIA,SAASC,kBAAkBC,OAAgBN,WAAW,EAAE;IACpD,MAAMO,UAAUC,GAAG,EAAE;IACrBD,QAAQ,iBAAiB,CAACD;IAC1B,OAAO;QAAEC;IAAQ;AACrB;AAEA,SAASE,gBAAgBC,WAAwB;IAC7C,MAAMC,YAAY,IAAIC;IAGtBD,UAAU,gBAAgB,CAACE,iBAAoBH;IAG/CC,UAAU,QAAQ,CAACG,mDAAoB,gBAAgB;IACvDH,UAAU,QAAQ,CAACI;IAEnB,OAAOJ;AACX;AAMAK,SAAS,oBAAoB;IACzB,IAAIN;IACJ,IAAIC;IAEJM,WAAW;QACPP,cAAcL;QACdM,YAAYF,gBAAgBC;IAChC;IAMAQ,GAAG,sDAAsD;QACrD,MAAMC,UAAUR,UAAU,OAAO,CAACS;QAElC,MAAMD,QAAQ,OAAO,CAAC;YAClB,OAAO;gBAAE,iBAAiB;YAAS;QACvC;QAEAE,OAAOX,YAAY,OAAO,EAAE,oBAAoB,CAAC;YAC7C,OAAO;gBAAE,iBAAiB;YAAS;QACvC;IACJ;IAEAQ,GAAG,8DAA8D;QAC7D,MAAMC,UAAUR,UAAU,OAAO,CAACS;QAElC,MAAMD,QAAQ,OAAO;QAErBE,OAAOX,YAAY,OAAO,EAAE,oBAAoB,CAAC;YAC7C,OAAOY;QACX;IACJ;IAMAJ,GAAG,uCAAuC;QACtC,MAAMZ,OAAON,WAAW;QACxBU,YAAY,OAAO,CAAC,iBAAiB,CAACJ;QAEtC,MAAMa,UAAUR,UAAU,OAAO,CAACS;QAClC,MAAMG,SAAS,MAAMJ,QAAQ,OAAO;QAEpCE,OAAOE,QAAQ,OAAO,CAACjB;IAC3B;IAMAY,GAAG,mDAAmD;QAClD,MAAMZ,OAAON,WAAW;QACxBU,YAAY,OAAO,CAAC,iBAAiB,CAACJ;QAEtC,MAAMkB,aAAab,UAAU,OAAO,CAACc;QAGrCJ,OAAOG,WAAW,IAAI,EAAE,OAAO,CAAC,EAAE;QAElC,MAAMA,WAAW,OAAO,CAAC,CAAC;QAG1BH,OAAOG,WAAW,IAAI,EAAE,OAAO,CAAClB;IACpC;IAMAY,GAAG,mDAAmD;QAClD,MAAMQ,cAAc1B,WAAW;QAC/B,MAAM2B,cAAc;YAChB;gBAAE,KAAK;gBAAS,OAAO;YAAG;YAC1B;gBAAE,KAAK;gBAAS,OAAO;YAAG;YAC1B;gBAAE,KAAK;gBAAS,OAAO;YAAE;SAC5B;QAEDjB,YAAY,OAAO,CAAC,qBAAqB,CAACgB,aAAa,qBAAqB,CAACC;QAE7E,MAAMH,aAAab,UAAU,OAAO,CAACc;QAGrC,MAAMD,WAAW,OAAO,CAAC,CAAC;QAC1BH,OAAOG,WAAW,IAAI,EAAE,OAAO,CAACE;QAGhC,MAAMF,WAAW,OAAO,CAAC,CAAC;QAC1BH,OAAOG,WAAW,IAAI,EAAE,OAAO,CAACG;IACpC;IAMAT,GAAG,mCAAmC;QAClCR,YAAY,OAAO,CAAC,iBAAiB,CAAC,IAAIkB,MAAM;QAEhD,MAAMT,UAAUR,UAAU,OAAO,CAACS;QAElC,MAAMC,OAAOF,QAAQ,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC;IACpD;IAMAD,GAAG,yCAAyC;QACxC,MAAMC,UAAUR,UAAU,OAAO,CAACS;QAElC,MAAMD,QAAQ,OAAO,CAAC;YAClB,OAAO;gBAAE,WAAW;YAAS;QACjC;QAEAE,OAAOX,YAAY,OAAO,EAAE,oBAAoB,CAAC;YAC7C,OAAO;gBAAE,WAAW;YAAS;QACjC;IACJ;IAEAQ,GAAG,qDAAqD;QACpD,MAAMC,UAAUR,UAAU,OAAO,CAACS;QAElC,MAAMD,QAAQ,OAAO,CAAC;YAClB,OAAO;gBAAE,qBAAqB;YAAS;QAC3C;QAEAE,OAAOX,YAAY,OAAO,EAAE,oBAAoB,CAAC;YAC7C,OAAO;gBAAE,qBAAqB;YAAS;QAC3C;IACJ;AACJ"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { WebinySdk } from "@webiny/app-admin/features/webinySdk/abstractions.js";
|
|
2
|
+
import { ListTagsGateway as GatewayAbstraction, type ListTagsGatewayParams, type ListTagsGatewayResult } from "./abstractions.js";
|
|
3
|
+
declare class ListTagsGatewayImpl implements GatewayAbstraction.Interface {
|
|
4
|
+
private sdk;
|
|
5
|
+
constructor(sdk: WebinySdk.Interface);
|
|
6
|
+
execute(params: ListTagsGatewayParams): Promise<ListTagsGatewayResult>;
|
|
7
|
+
}
|
|
8
|
+
export declare const ListTagsGateway: typeof ListTagsGatewayImpl & {
|
|
9
|
+
__abstraction: import("@webiny/di").Abstraction<import("./abstractions.js").IListTagsGateway>;
|
|
10
|
+
};
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { WebinySdk } from "@webiny/app-admin/features/webinySdk/abstractions.js";
|
|
2
|
+
import { ListTagsGateway } from "./abstractions.js";
|
|
3
|
+
class ListTagsGatewayImpl {
|
|
4
|
+
constructor(sdk){
|
|
5
|
+
this.sdk = sdk;
|
|
6
|
+
}
|
|
7
|
+
async execute(params) {
|
|
8
|
+
const result = await this.sdk.fileManager.listTags({
|
|
9
|
+
where: params.where
|
|
10
|
+
});
|
|
11
|
+
if (result.isFail()) throw new Error(result.error.message);
|
|
12
|
+
return result.value;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
const ListTagsGateway_ListTagsGateway = ListTagsGateway.createImplementation({
|
|
16
|
+
implementation: ListTagsGatewayImpl,
|
|
17
|
+
dependencies: [
|
|
18
|
+
WebinySdk
|
|
19
|
+
]
|
|
20
|
+
});
|
|
21
|
+
export { ListTagsGateway_ListTagsGateway as ListTagsGateway };
|
|
22
|
+
|
|
23
|
+
//# sourceMappingURL=ListTagsGateway.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/tags/ListTagsGateway.js","sources":["../../../src/features/tags/ListTagsGateway.ts"],"sourcesContent":["import { WebinySdk } from \"@webiny/app-admin/features/webinySdk/abstractions.js\";\nimport type { FmTagsListWhereInput } from \"@webiny/sdk\";\nimport {\n ListTagsGateway as GatewayAbstraction,\n type ListTagsGatewayParams,\n type ListTagsGatewayResult\n} from \"./abstractions.js\";\n\nclass ListTagsGatewayImpl implements GatewayAbstraction.Interface {\n constructor(private sdk: WebinySdk.Interface) {}\n\n async execute(params: ListTagsGatewayParams): Promise<ListTagsGatewayResult> {\n const result = await this.sdk.fileManager.listTags({\n where: params.where as FmTagsListWhereInput | undefined\n });\n\n if (result.isFail()) {\n throw new Error(result.error.message);\n }\n\n return result.value;\n }\n}\n\nexport const ListTagsGateway = GatewayAbstraction.createImplementation({\n implementation: ListTagsGatewayImpl,\n dependencies: [WebinySdk]\n});\n"],"names":["ListTagsGatewayImpl","sdk","params","result","Error","ListTagsGateway","GatewayAbstraction","WebinySdk"],"mappings":";;AAQA,MAAMA;IACF,YAAoBC,GAAwB,CAAE;aAA1BA,GAAG,GAAHA;IAA2B;IAE/C,MAAM,QAAQC,MAA6B,EAAkC;QACzE,MAAMC,SAAS,MAAM,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC;YAC/C,OAAOD,OAAO,KAAK;QACvB;QAEA,IAAIC,OAAO,MAAM,IACb,MAAM,IAAIC,MAAMD,OAAO,KAAK,CAAC,OAAO;QAGxC,OAAOA,OAAO,KAAK;IACvB;AACJ;AAEO,MAAME,kCAAkBC,gBAAAA,oBAAuC,CAAC;IACnE,gBAAgBN;IAChB,cAAc;QAACO;KAAU;AAC7B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { FmTag } from "../shared/types.js";
|
|
2
|
+
import { ListTagsRepository as RepositoryAbstraction, ListTagsGateway, type ListTagsGatewayParams, type ListTagsGatewayResult } from "./abstractions.js";
|
|
3
|
+
declare class ListTagsRepositoryImpl implements RepositoryAbstraction.Interface {
|
|
4
|
+
private gateway;
|
|
5
|
+
tags: FmTag[];
|
|
6
|
+
constructor(gateway: ListTagsGateway.Interface);
|
|
7
|
+
execute(params: ListTagsGatewayParams): Promise<ListTagsGatewayResult>;
|
|
8
|
+
}
|
|
9
|
+
export declare const ListTagsRepository: typeof ListTagsRepositoryImpl & {
|
|
10
|
+
__abstraction: import("@webiny/di").Abstraction<import("./abstractions.js").IListTagsRepository>;
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { makeAutoObservable, runInAction } from "mobx";
|
|
2
|
+
import { ListTagsGateway, ListTagsRepository } from "./abstractions.js";
|
|
3
|
+
class ListTagsRepositoryImpl {
|
|
4
|
+
constructor(gateway){
|
|
5
|
+
this.gateway = gateway;
|
|
6
|
+
this.tags = [];
|
|
7
|
+
makeAutoObservable(this);
|
|
8
|
+
}
|
|
9
|
+
async execute(params) {
|
|
10
|
+
const result = await this.gateway.execute(params);
|
|
11
|
+
runInAction(()=>{
|
|
12
|
+
this.tags = result;
|
|
13
|
+
});
|
|
14
|
+
return result;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
const ListTagsRepository_ListTagsRepository = ListTagsRepository.createImplementation({
|
|
18
|
+
implementation: ListTagsRepositoryImpl,
|
|
19
|
+
dependencies: [
|
|
20
|
+
ListTagsGateway
|
|
21
|
+
]
|
|
22
|
+
});
|
|
23
|
+
export { ListTagsRepository_ListTagsRepository as ListTagsRepository };
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=ListTagsRepository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/tags/ListTagsRepository.js","sources":["../../../src/features/tags/ListTagsRepository.ts"],"sourcesContent":["import { makeAutoObservable, runInAction } from \"mobx\";\nimport type { FmTag } from \"../shared/types.js\";\nimport {\n ListTagsRepository as RepositoryAbstraction,\n ListTagsGateway,\n type ListTagsGatewayParams,\n type ListTagsGatewayResult\n} from \"./abstractions.js\";\n\nclass ListTagsRepositoryImpl implements RepositoryAbstraction.Interface {\n tags: FmTag[] = [];\n\n constructor(private gateway: ListTagsGateway.Interface) {\n makeAutoObservable(this);\n }\n\n async execute(params: ListTagsGatewayParams): Promise<ListTagsGatewayResult> {\n const result = await this.gateway.execute(params);\n\n runInAction(() => {\n this.tags = result;\n });\n\n return result;\n }\n}\n\nexport const ListTagsRepository = RepositoryAbstraction.createImplementation({\n implementation: ListTagsRepositoryImpl,\n dependencies: [ListTagsGateway]\n});\n"],"names":["ListTagsRepositoryImpl","gateway","makeAutoObservable","params","result","runInAction","ListTagsRepository","RepositoryAbstraction","ListTagsGateway"],"mappings":";;AASA,MAAMA;IAGF,YAAoBC,OAAkC,CAAE;aAApCA,OAAO,GAAPA;aAFpB,IAAI,GAAY,EAAE;QAGdC,mBAAmB,IAAI;IAC3B;IAEA,MAAM,QAAQC,MAA6B,EAAkC;QACzE,MAAMC,SAAS,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO,CAACD;QAE1CE,YAAY;YACR,IAAI,CAAC,IAAI,GAAGD;QAChB;QAEA,OAAOA;IACX;AACJ;AAEO,MAAME,wCAAqBC,mBAAAA,oBAA0C,CAAC;IACzE,gBAAgBP;IAChB,cAAc;QAACQ;KAAgB;AACnC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ListTagsUseCase as UseCaseAbstraction, ListTagsRepository, type ListTagsUseCaseParams, type ListTagsUseCaseResult } from "./abstractions.js";
|
|
2
|
+
declare class ListTagsUseCaseImpl implements UseCaseAbstraction.Interface {
|
|
3
|
+
private repository;
|
|
4
|
+
constructor(repository: ListTagsRepository.Interface);
|
|
5
|
+
execute(params?: ListTagsUseCaseParams): Promise<ListTagsUseCaseResult>;
|
|
6
|
+
}
|
|
7
|
+
export declare const ListTagsUseCase: typeof ListTagsUseCaseImpl & {
|
|
8
|
+
__abstraction: import("@webiny/di").Abstraction<import("./abstractions.js").IListTagsUseCase>;
|
|
9
|
+
};
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ListTagsRepository, ListTagsUseCase } from "./abstractions.js";
|
|
2
|
+
class ListTagsUseCaseImpl {
|
|
3
|
+
constructor(repository){
|
|
4
|
+
this.repository = repository;
|
|
5
|
+
}
|
|
6
|
+
async execute(params = {}) {
|
|
7
|
+
return this.repository.execute({
|
|
8
|
+
where: params.where
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
const ListTagsUseCase_ListTagsUseCase = ListTagsUseCase.createImplementation({
|
|
13
|
+
implementation: ListTagsUseCaseImpl,
|
|
14
|
+
dependencies: [
|
|
15
|
+
ListTagsRepository
|
|
16
|
+
]
|
|
17
|
+
});
|
|
18
|
+
export { ListTagsUseCase_ListTagsUseCase as ListTagsUseCase };
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=ListTagsUseCase.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/tags/ListTagsUseCase.js","sources":["../../../src/features/tags/ListTagsUseCase.ts"],"sourcesContent":["import {\n ListTagsUseCase as UseCaseAbstraction,\n ListTagsRepository,\n type ListTagsUseCaseParams,\n type ListTagsUseCaseResult\n} from \"./abstractions.js\";\n\nclass ListTagsUseCaseImpl implements UseCaseAbstraction.Interface {\n constructor(private repository: ListTagsRepository.Interface) {}\n\n async execute(params: ListTagsUseCaseParams = {}): Promise<ListTagsUseCaseResult> {\n return this.repository.execute({\n where: params.where\n });\n }\n}\n\nexport const ListTagsUseCase = UseCaseAbstraction.createImplementation({\n implementation: ListTagsUseCaseImpl,\n dependencies: [ListTagsRepository]\n});\n"],"names":["ListTagsUseCaseImpl","repository","params","ListTagsUseCase","UseCaseAbstraction","ListTagsRepository"],"mappings":";AAOA,MAAMA;IACF,YAAoBC,UAAwC,CAAE;aAA1CA,UAAU,GAAVA;IAA2C;IAE/D,MAAM,QAAQC,SAAgC,CAAC,CAAC,EAAkC;QAC9E,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;YAC3B,OAAOA,OAAO,KAAK;QACvB;IACJ;AACJ;AAEO,MAAMC,kCAAkBC,gBAAAA,oBAAuC,CAAC;IACnE,gBAAgBJ;IAChB,cAAc;QAACK;KAAmB;AACtC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { FmTag } from "../shared/types.js";
|
|
2
|
+
import type { FmTagsListWhereInput } from "@webiny/sdk";
|
|
3
|
+
export interface IListTagsGateway {
|
|
4
|
+
execute(params: ListTagsGatewayParams): Promise<ListTagsGatewayResult>;
|
|
5
|
+
}
|
|
6
|
+
export interface ListTagsGatewayParams {
|
|
7
|
+
where?: FmTagsListWhereInput;
|
|
8
|
+
}
|
|
9
|
+
export type ListTagsGatewayResult = FmTag[];
|
|
10
|
+
export declare const ListTagsGateway: import("@webiny/di").Abstraction<IListTagsGateway>;
|
|
11
|
+
export declare namespace ListTagsGateway {
|
|
12
|
+
type Interface = IListTagsGateway;
|
|
13
|
+
}
|
|
14
|
+
export interface IListTagsRepository {
|
|
15
|
+
execute(params: ListTagsGatewayParams): Promise<ListTagsGatewayResult>;
|
|
16
|
+
readonly tags: FmTag[];
|
|
17
|
+
}
|
|
18
|
+
export declare const ListTagsRepository: import("@webiny/di").Abstraction<IListTagsRepository>;
|
|
19
|
+
export declare namespace ListTagsRepository {
|
|
20
|
+
type Interface = IListTagsRepository;
|
|
21
|
+
}
|
|
22
|
+
export interface ListTagsUseCaseParams {
|
|
23
|
+
where?: FmTagsListWhereInput;
|
|
24
|
+
}
|
|
25
|
+
export type ListTagsUseCaseResult = FmTag[];
|
|
26
|
+
export interface IListTagsUseCase {
|
|
27
|
+
execute(params?: ListTagsUseCaseParams): Promise<ListTagsUseCaseResult>;
|
|
28
|
+
}
|
|
29
|
+
export declare const ListTagsUseCase: import("@webiny/di").Abstraction<IListTagsUseCase>;
|
|
30
|
+
export declare namespace ListTagsUseCase {
|
|
31
|
+
type Interface = IListTagsUseCase;
|
|
32
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createAbstraction } from "@webiny/feature/admin";
|
|
2
|
+
const ListTagsGateway = createAbstraction("ListTagsGateway");
|
|
3
|
+
const ListTagsRepository = createAbstraction("ListTagsRepository");
|
|
4
|
+
const ListTagsUseCase = createAbstraction("ListTagsUseCase");
|
|
5
|
+
export { ListTagsGateway, ListTagsRepository, ListTagsUseCase };
|
|
6
|
+
|
|
7
|
+
//# sourceMappingURL=abstractions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/tags/abstractions.js","sources":["../../../src/features/tags/abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/admin\";\nimport type { FmTag } from \"../shared/types.js\";\nimport type { FmTagsListWhereInput } from \"@webiny/sdk\";\n\n// Gateway — performs the API call via @webiny/sdk.\nexport interface IListTagsGateway {\n execute(params: ListTagsGatewayParams): Promise<ListTagsGatewayResult>;\n}\n\nexport interface ListTagsGatewayParams {\n where?: FmTagsListWhereInput;\n}\n\nexport type ListTagsGatewayResult = FmTag[];\n\nexport const ListTagsGateway = createAbstraction<IListTagsGateway>(\"ListTagsGateway\");\n\nexport namespace ListTagsGateway {\n export type Interface = IListTagsGateway;\n}\n\n// Repository — manages cached tag list state and delegates I/O to the gateway.\nexport interface IListTagsRepository {\n execute(params: ListTagsGatewayParams): Promise<ListTagsGatewayResult>;\n readonly tags: FmTag[];\n}\n\nexport const ListTagsRepository = createAbstraction<IListTagsRepository>(\"ListTagsRepository\");\n\nexport namespace ListTagsRepository {\n export type Interface = IListTagsRepository;\n}\n\n// UseCase — orchestrates a single list-tags operation.\nexport interface ListTagsUseCaseParams {\n where?: FmTagsListWhereInput;\n}\n\nexport type ListTagsUseCaseResult = FmTag[];\n\nexport interface IListTagsUseCase {\n execute(params?: ListTagsUseCaseParams): Promise<ListTagsUseCaseResult>;\n}\n\nexport const ListTagsUseCase = createAbstraction<IListTagsUseCase>(\"ListTagsUseCase\");\n\nexport namespace ListTagsUseCase {\n export type Interface = IListTagsUseCase;\n}\n"],"names":["ListTagsGateway","createAbstraction","ListTagsRepository","ListTagsUseCase"],"mappings":";AAeO,MAAMA,kBAAkBC,kBAAoC;AAY5D,MAAMC,qBAAqBD,kBAAuC;AAiBlE,MAAME,kBAAkBF,kBAAoC"}
|