@webiny/app-file-manager 6.3.0 → 6.4.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app.js +48 -14
- package/app.js.map +1 -1
- package/domain/constants.js +7 -0
- package/domain/constants.js.map +1 -0
- package/domain/permissionsSchema.js +28 -17
- package/domain/permissionsSchema.js.map +1 -1
- 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/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 +22 -0
- package/features/fileUploader/FileUploader.js +239 -0
- package/features/fileUploader/FileUploader.js.map +1 -0
- package/features/fileUploader/FileUploader.test.js +425 -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/getFile/GetFileGateway.js +17 -16
- package/features/getFile/GetFileGateway.js.map +1 -1
- package/features/getFile/GetFileRepository.js +13 -10
- package/features/getFile/GetFileRepository.js.map +1 -1
- package/features/getFile/GetFileUseCase.js +28 -25
- package/features/getFile/GetFileUseCase.js.map +1 -1
- package/features/getFile/abstractions.js +4 -12
- package/features/getFile/abstractions.js.map +1 -1
- package/features/getFile/feature.js +15 -14
- package/features/getFile/feature.js.map +1 -1
- package/features/getFile/index.js +1 -3
- package/features/listFiles/ListFiles.test.js +192 -0
- package/features/listFiles/ListFiles.test.js.map +1 -0
- package/features/listFiles/ListFilesGateway.d.ts +11 -0
- package/features/listFiles/ListFilesGateway.js +32 -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 +2 -2
- package/features/permissions/abstractions.js +2 -1
- package/features/permissions/abstractions.js.map +1 -1
- package/features/permissions/feature.d.ts +2 -2
- package/features/permissions/feature.js +2 -1
- package/features/permissions/feature.js.map +1 -1
- package/features/resolveImageTool/ResolveImageTool.js +49 -0
- package/features/resolveImageTool/ResolveImageTool.js.map +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.js +30 -1
- package/features/shared/FILE_FIELDS.js.map +1 -1
- package/features/shared/FilesListCache.d.ts +1 -0
- package/features/shared/FilesListCache.js +1 -0
- package/features/shared/abstractions.d.ts +6 -0
- package/features/shared/abstractions.js +5 -0
- package/features/shared/abstractions.js.map +1 -0
- package/features/shared/feature.d.ts +4 -0
- package/features/shared/feature.js +17 -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.js +0 -3
- 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 +258 -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 +13 -0
- package/features/updateFile/UpdateFileRepository.js +30 -0
- package/features/updateFile/UpdateFileRepository.js.map +1 -0
- package/features/updateFile/UpdateFileUseCase.d.ts +10 -0
- package/features/updateFile/UpdateFileUseCase.js +38 -0
- package/features/updateFile/UpdateFileUseCase.js.map +1 -0
- package/features/updateFile/abstractions.d.ts +53 -0
- package/features/updateFile/abstractions.js +7 -0
- package/features/updateFile/abstractions.js.map +1 -0
- package/features/updateFile/feature.d.ts +3 -0
- package/features/updateFile/feature.js +21 -0
- package/features/updateFile/feature.js.map +1 -0
- package/features/updateFile/index.d.ts +3 -0
- package/features/updateFile/index.js +2 -0
- package/index.d.ts +3 -8
- package/index.js +3 -10
- package/modules/Enterprise/HandleWebsocketMessages.js +46 -50
- package/modules/Enterprise/HandleWebsocketMessages.js.map +1 -1
- package/modules/Enterprise/components/ThreatScanInProgressFileBody.js +19 -20
- package/modules/Enterprise/components/ThreatScanInProgressFileBody.js.map +1 -1
- package/modules/Enterprise/components/ThreatScanInProgressTableCell.js +15 -27
- package/modules/Enterprise/components/ThreatScanInProgressTableCell.js.map +1 -1
- package/modules/Enterprise/constants.js +3 -2
- package/modules/Enterprise/constants.js.map +1 -1
- package/modules/Enterprise/index.js +21 -31
- package/modules/Enterprise/index.js.map +1 -1
- package/modules/FileManagerRoutes.d.ts +2 -0
- package/modules/FileManagerRoutes.js +31 -0
- package/modules/FileManagerRoutes.js.map +1 -0
- package/modules/FileModelModule.d.ts +2 -0
- package/modules/FileModelModule.js +18 -0
- package/modules/FileModelModule.js.map +1 -0
- package/modules/HeadlessCms/fileField.js +38 -34
- package/modules/HeadlessCms/fileField.js.map +1 -1
- package/modules/HeadlessCms/fileRenderer/fileField.js +43 -61
- package/modules/HeadlessCms/fileRenderer/fileField.js.map +1 -1
- package/modules/HeadlessCms/fileRenderer/fileFields.js +60 -92
- package/modules/HeadlessCms/fileRenderer/fileFields.js.map +1 -1
- package/modules/HeadlessCms/fileRenderer/utils.js +13 -4
- package/modules/HeadlessCms/fileRenderer/utils.js.map +1 -1
- package/modules/HeadlessCms/index.js +6 -5
- package/modules/HeadlessCms/index.js.map +1 -1
- package/modules/SecurityPermissions.js +11 -14
- package/modules/SecurityPermissions.js.map +1 -1
- package/modules/Settings/assets/icons/folder-open.js +19 -0
- package/modules/Settings/assets/icons/folder-open.js.map +1 -0
- package/modules/Settings/graphql.js +6 -5
- package/modules/Settings/graphql.js.map +1 -1
- package/modules/Settings/index.js +23 -28
- package/modules/Settings/index.js.map +1 -1
- package/modules/Settings/views/FileManagerSettings.js +121 -139
- package/modules/Settings/views/FileManagerSettings.js.map +1 -1
- package/package.json +23 -25
- package/presentation/FileActions/FileDetails/CopyUrl.js +19 -0
- package/presentation/FileActions/FileDetails/CopyUrl.js.map +1 -0
- package/presentation/FileActions/FileDetails/DeleteImage.js +24 -0
- package/presentation/FileActions/FileDetails/DeleteImage.js.map +1 -0
- package/presentation/FileActions/FileDetails/Download.js +19 -0
- package/presentation/FileActions/FileDetails/Download.js.map +1 -0
- package/presentation/FileActions/FileDetails/MoveToFolder.js +16 -0
- package/presentation/FileActions/FileDetails/MoveToFolder.js.map +1 -0
- package/presentation/FileActions/Grid/Delete.js +23 -0
- package/presentation/FileActions/Grid/Delete.js.map +1 -0
- package/presentation/FileActions/Grid/Download.js +19 -0
- package/presentation/FileActions/Grid/Download.js.map +1 -0
- package/presentation/FileActions/Grid/MoveToFolder.js +16 -0
- package/presentation/FileActions/Grid/MoveToFolder.js.map +1 -0
- package/presentation/FileActions/Grid/Settings.js +23 -0
- package/presentation/FileActions/Grid/Settings.js.map +1 -0
- package/presentation/FileActions/index.js +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.js +15 -0
- package/presentation/FileDetails/components/ActionButton.js.map +1 -0
- package/presentation/FileDetails/components/Actions.js +13 -0
- package/presentation/FileDetails/components/Actions.js.map +1 -0
- package/presentation/FileDetails/components/Content.js +20 -0
- package/presentation/FileDetails/components/Content.js.map +1 -0
- package/presentation/FileDetails/components/CreatedOn.js +21 -0
- package/presentation/FileDetails/components/CreatedOn.js.map +1 -0
- package/presentation/FileDetails/components/Description.js +16 -0
- package/presentation/FileDetails/components/Description.js.map +1 -0
- package/presentation/FileDetails/components/FileDetailsDrawer.d.ts +4 -0
- package/presentation/FileDetails/components/FileDetailsDrawer.js +73 -0
- package/presentation/FileDetails/components/FileDetailsDrawer.js.map +1 -0
- package/presentation/FileDetails/components/Preview.js +15 -0
- package/presentation/FileDetails/components/Preview.js.map +1 -0
- package/presentation/FileDetails/components/Thumbnail.js +12 -0
- package/presentation/FileDetails/components/Thumbnail.js.map +1 -0
- package/presentation/FileDetails/feature.d.ts +3 -0
- package/presentation/FileDetails/feature.js +17 -0
- package/presentation/FileDetails/feature.js.map +1 -0
- package/presentation/FileDetails/index.d.ts +3 -0
- package/presentation/FileDetails/index.js +2 -0
- package/presentation/FileList/FileListDataSource.d.ts +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 +406 -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 +75 -0
- package/presentation/FileList/abstractions.js +5 -0
- package/presentation/FileList/abstractions.js.map +1 -0
- package/presentation/FileList/components/BottomInfoBar/BottomInfoBar.js +12 -0
- package/presentation/FileList/components/BottomInfoBar/BottomInfoBar.js.map +1 -0
- package/presentation/FileList/components/BottomInfoBar/ListStatus.js +20 -0
- package/presentation/FileList/components/BottomInfoBar/ListStatus.js.map +1 -0
- package/presentation/FileList/components/BottomInfoBar/SupportedFileTypes.js +56 -0
- package/presentation/FileList/components/BottomInfoBar/SupportedFileTypes.js.map +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.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.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.js +32 -0
- package/presentation/FileList/components/BulkActions/domain/Batch.js.map +1 -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.js +49 -0
- package/presentation/FileList/components/BulkActions/domain/Field.js.map +1 -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.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.js +20 -0
- package/presentation/FileList/components/Empty/Empty.js.map +1 -0
- package/presentation/FileList/components/Empty/index.js +1 -0
- package/presentation/FileList/components/FileDropArea/FileDropArea.js +63 -0
- package/presentation/FileList/components/FileDropArea/FileDropArea.js.map +1 -0
- package/presentation/FileList/components/FileDropArea/index.js +1 -0
- package/presentation/FileList/components/FileDropPlaceholder/FileDropPlaceholder.js +11 -0
- package/presentation/FileList/components/FileDropPlaceholder/FileDropPlaceholder.js.map +1 -0
- package/presentation/FileList/components/FileDropPlaceholder/index.js +1 -0
- package/presentation/FileList/components/FilePicker/FilePicker.d.ts +11 -0
- package/presentation/FileList/components/FilePicker/FilePicker.js +28 -0
- package/presentation/FileList/components/FilePicker/FilePicker.js.map +1 -0
- package/presentation/FileList/components/Filters/FilterByType.js +39 -0
- package/presentation/FileList/components/Filters/FilterByType.js.map +1 -0
- package/presentation/FileList/components/Filters/SubFoldersToggle.d.ts +9 -0
- package/presentation/FileList/components/Filters/SubFoldersToggle.js +25 -0
- package/presentation/FileList/components/Filters/SubFoldersToggle.js.map +1 -0
- package/presentation/FileList/components/Filters/TagsFilter.d.ts +9 -0
- package/presentation/FileList/components/Filters/TagsFilter.js +86 -0
- package/presentation/FileList/components/Filters/TagsFilter.js.map +1 -0
- package/presentation/FileList/components/Filters/TypeFilter.d.ts +8 -0
- package/presentation/FileList/components/Filters/TypeFilter.js +46 -0
- package/presentation/FileList/components/Filters/TypeFilter.js.map +1 -0
- package/presentation/FileList/components/Filters/index.d.ts +3 -0
- package/presentation/FileList/components/Filters/index.js +3 -0
- package/presentation/FileList/components/Grid/ActionButton.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 +168 -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.js +24 -0
- package/presentation/FileList/components/LayoutSwitch/LayoutSwitch.js.map +1 -0
- package/presentation/FileList/components/LayoutSwitch/index.js +1 -0
- package/presentation/FileList/components/NoPermissions/NoPermissions.js +27 -0
- package/presentation/FileList/components/NoPermissions/NoPermissions.js.map +1 -0
- package/presentation/FileList/components/NoPermissions/index.js +1 -0
- package/presentation/FileList/components/NoResults/NoResults.js +21 -0
- package/presentation/FileList/components/NoResults/NoResults.js.map +1 -0
- package/presentation/FileList/components/NoResults/index.js +1 -0
- package/presentation/FileList/components/Search/SearchBar.d.ts +9 -0
- package/presentation/FileList/components/Search/SearchBar.js +33 -0
- package/presentation/FileList/components/Search/SearchBar.js.map +1 -0
- package/presentation/FileList/components/Search/index.d.ts +1 -0
- package/presentation/FileList/components/Search/index.js +1 -0
- package/presentation/FileList/components/Table/Actions/CopyFile.js +21 -0
- package/presentation/FileList/components/Table/Actions/CopyFile.js.map +1 -0
- package/presentation/FileList/components/Table/Actions/DeleteFile.js +24 -0
- package/presentation/FileList/components/Table/Actions/DeleteFile.js.map +1 -0
- package/presentation/FileList/components/Table/Actions/EditFile.js +19 -0
- package/presentation/FileList/components/Table/Actions/EditFile.js.map +1 -0
- package/presentation/FileList/components/Table/Actions/MoveFile.js +19 -0
- package/presentation/FileList/components/Table/Actions/MoveFile.js.map +1 -0
- package/presentation/FileList/components/Table/Actions/index.js +4 -0
- package/presentation/FileList/components/Table/Cells/CellActions.js +28 -0
- package/presentation/FileList/components/Table/Cells/CellActions.js.map +1 -0
- package/presentation/FileList/components/Table/Cells/CellAuthor.js +10 -0
- package/presentation/FileList/components/Table/Cells/CellAuthor.js.map +1 -0
- package/presentation/FileList/components/Table/Cells/CellCreated.js +13 -0
- package/presentation/FileList/components/Table/Cells/CellCreated.js.map +1 -0
- package/presentation/FileList/components/Table/Cells/CellModified.js +13 -0
- package/presentation/FileList/components/Table/Cells/CellModified.js.map +1 -0
- package/presentation/FileList/components/Table/Cells/CellName.d.ts +16 -0
- package/presentation/FileList/components/Table/Cells/CellName.js +59 -0
- package/presentation/FileList/components/Table/Cells/CellName.js.map +1 -0
- package/presentation/FileList/components/Table/Cells/CellSize.js +14 -0
- package/presentation/FileList/components/Table/Cells/CellSize.js.map +1 -0
- package/presentation/FileList/components/Table/Cells/CellThumbnail.js +12 -0
- package/presentation/FileList/components/Table/Cells/CellThumbnail.js.map +1 -0
- package/presentation/FileList/components/Table/Cells/CellType.js +11 -0
- package/presentation/FileList/components/Table/Cells/CellType.js.map +1 -0
- package/presentation/FileList/components/Table/Cells/index.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.js +8 -0
- package/presentation/FileList/components/TagsList/Empty.js.map +1 -0
- package/presentation/FileList/components/TagsList/FilterSelect.js +38 -0
- package/presentation/FileList/components/TagsList/FilterSelect.js.map +1 -0
- package/presentation/FileList/components/TagsList/FilterStatus.js +25 -0
- package/presentation/FileList/components/TagsList/FilterStatus.js.map +1 -0
- package/presentation/FileList/components/TagsList/Tag.js +11 -0
- package/presentation/FileList/components/TagsList/Tag.js.map +1 -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.js +24 -0
- package/presentation/FileList/components/TagsList/TagsList.js.map +1 -0
- package/presentation/FileList/components/TagsList/index.js +1 -0
- package/presentation/FileList/components/Thumbnail/Thumbnail.js +12 -0
- package/presentation/FileList/components/Thumbnail/Thumbnail.js.map +1 -0
- package/presentation/FileList/components/Thumbnail/index.js +1 -0
- package/presentation/FileList/components/Upload/DropZone.d.ts +19 -0
- package/presentation/FileList/components/Upload/DropZone.js +96 -0
- package/presentation/FileList/components/Upload/DropZone.js.map +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 +2 -0
- package/presentation/FileList/components/Upload/index.js +2 -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 +242 -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/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/adapters/toFolderDto.d.ts +3 -0
- package/presentation/adapters/toFolderDto.js +30 -0
- package/presentation/adapters/toFolderDto.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.js +24 -0
- package/presentation/config/configComponents/Browser/BulkEditField.js.map +1 -0
- package/presentation/config/configComponents/Browser/FileAction.js +11 -0
- package/presentation/config/configComponents/Browser/FileAction.js.map +1 -0
- package/presentation/config/configComponents/Browser/Filter.js +37 -0
- package/presentation/config/configComponents/Browser/Filter.js.map +1 -0
- package/presentation/config/configComponents/Browser/FilterByTags.js +14 -0
- package/presentation/config/configComponents/Browser/FilterByTags.js.map +1 -0
- package/presentation/config/configComponents/Browser/FiltersToWhere.js +13 -0
- package/presentation/config/configComponents/Browser/FiltersToWhere.js.map +1 -0
- package/presentation/config/configComponents/Browser/FolderAction.js +10 -0
- package/presentation/config/configComponents/Browser/FolderAction.js.map +1 -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.js +11 -0
- package/presentation/config/configComponents/Browser/FolderFieldDecorator.js.map +1 -0
- package/presentation/config/configComponents/Browser/Grid/Action.js +33 -0
- package/presentation/config/configComponents/Browser/Grid/Action.js.map +1 -0
- package/presentation/config/configComponents/Browser/Grid/Thumbnail.js +28 -0
- package/presentation/config/configComponents/Browser/Grid/Thumbnail.js.map +1 -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.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.js +30 -0
- package/presentation/config/configComponents/FileDetails/Action.js.map +1 -0
- package/presentation/config/configComponents/FileDetails/Thumbnail.js +25 -0
- package/presentation/config/configComponents/FileDetails/Thumbnail.js.map +1 -0
- package/presentation/config/configComponents/FileDetails/Width.js +13 -0
- package/presentation/config/configComponents/FileDetails/Width.js.map +1 -0
- package/presentation/config/configComponents/FileDetails/index.d.ts +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.js +38 -0
- package/presentation/config/fields/AccessControl.js.map +1 -0
- package/presentation/config/fields/Tags.js +32 -0
- package/presentation/config/fields/Tags.js.map +1 -0
- package/presentation/config/fields/index.d.ts +2 -0
- package/presentation/config/fields/index.js +2 -0
- package/presentation/config/fields/useAccessControlField.js +21 -0
- package/presentation/config/fields/useAccessControlField.js.map +1 -0
- package/presentation/config/fields/useFileOrUndefined.js +13 -0
- package/presentation/config/fields/useFileOrUndefined.js.map +1 -0
- package/presentation/config/getThumbnailRenderer.d.ts +4 -0
- package/presentation/config/getThumbnailRenderer.js +16 -0
- package/presentation/config/getThumbnailRenderer.js.map +1 -0
- package/presentation/config/outputFileSelectionError.js +27 -0
- package/presentation/config/outputFileSelectionError.js.map +1 -0
- package/presentation/config/thumbnailRenderers/FilePreviewDefaultRenderer.js +11 -0
- package/presentation/config/thumbnailRenderers/FilePreviewDefaultRenderer.js.map +1 -0
- package/presentation/config/thumbnailRenderers/FilePreviewImageRenderer.js +18 -0
- package/presentation/config/thumbnailRenderers/FilePreviewImageRenderer.js.map +1 -0
- package/presentation/config/thumbnailRenderers/GridItemDefaultRenderer.js +11 -0
- package/presentation/config/thumbnailRenderers/GridItemDefaultRenderer.js.map +1 -0
- package/presentation/config/thumbnailRenderers/GridItemImageRenderer.js +18 -0
- package/presentation/config/thumbnailRenderers/GridItemImageRenderer.js.map +1 -0
- package/presentation/config/thumbnailRenderers/TableItemDefaultRenderer.js +18 -0
- package/presentation/config/thumbnailRenderers/TableItemDefaultRenderer.js.map +1 -0
- package/presentation/config/thumbnailRenderers/TableItemImageRenderer.js +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 +3 -0
- package/routes.js +13 -5
- package/routes.js.map +1 -1
- package/static/svg/folder-open.ae8d0fac.svg +1 -0
- package/BatchFileUploader.d.ts +0 -34
- package/BatchFileUploader.js +0 -87
- package/BatchFileUploader.js.map +0 -1
- package/components/BottomInfoBar/BottomInfoBar.js +0 -13
- package/components/BottomInfoBar/BottomInfoBar.js.map +0 -1
- package/components/BottomInfoBar/ListStatus.js +0 -23
- package/components/BottomInfoBar/ListStatus.js.map +0 -1
- package/components/BottomInfoBar/SupportedFileTypes.js +0 -62
- package/components/BottomInfoBar/SupportedFileTypes.js.map +0 -1
- package/components/BottomInfoBar/index.js +0 -3
- package/components/BottomInfoBar/index.js.map +0 -1
- package/components/BulkActions/ActionDelete.d.ts +0 -4
- package/components/BulkActions/ActionDelete.js +0 -80
- package/components/BulkActions/ActionDelete.js.map +0 -1
- package/components/BulkActions/ActionEdit/ActionEdit.d.ts +0 -4
- package/components/BulkActions/ActionEdit/ActionEdit.js +0 -62
- package/components/BulkActions/ActionEdit/ActionEdit.js.map +0 -1
- package/components/BulkActions/ActionEdit/ActionEdit.types.d.ts +0 -2
- package/components/BulkActions/ActionEdit/ActionEdit.types.js +0 -3
- package/components/BulkActions/ActionEdit/ActionEdit.types.js.map +0 -1
- package/components/BulkActions/ActionEdit/ActionEditPresenter.d.ts +0 -35
- package/components/BulkActions/ActionEdit/ActionEditPresenter.js +0 -55
- package/components/BulkActions/ActionEdit/ActionEditPresenter.js.map +0 -1
- package/components/BulkActions/ActionEdit/ActionEditPresenter.test.js +0 -159
- package/components/BulkActions/ActionEdit/ActionEditPresenter.test.js.map +0 -1
- package/components/BulkActions/ActionEdit/BatchEditorDialog/AddOperation.js +0 -19
- package/components/BulkActions/ActionEdit/BatchEditorDialog/AddOperation.js.map +0 -1
- package/components/BulkActions/ActionEdit/BatchEditorDialog/BatchEditor.d.ts +0 -15
- package/components/BulkActions/ActionEdit/BatchEditorDialog/BatchEditor.js +0 -44
- package/components/BulkActions/ActionEdit/BatchEditorDialog/BatchEditor.js.map +0 -1
- package/components/BulkActions/ActionEdit/BatchEditorDialog/BatchEditorDialog.d.ts +0 -15
- package/components/BulkActions/ActionEdit/BatchEditorDialog/BatchEditorDialog.js +0 -54
- package/components/BulkActions/ActionEdit/BatchEditorDialog/BatchEditorDialog.js.map +0 -1
- package/components/BulkActions/ActionEdit/BatchEditorDialog/BatchEditorDialogPresenter.d.ts +0 -61
- package/components/BulkActions/ActionEdit/BatchEditorDialog/BatchEditorDialogPresenter.js +0 -140
- package/components/BulkActions/ActionEdit/BatchEditorDialog/BatchEditorDialogPresenter.js.map +0 -1
- package/components/BulkActions/ActionEdit/BatchEditorDialog/BatchEditorDialogPresenter.test.js +0 -337
- package/components/BulkActions/ActionEdit/BatchEditorDialog/BatchEditorDialogPresenter.test.js.map +0 -1
- package/components/BulkActions/ActionEdit/BatchEditorDialog/FieldRenderer.d.ts +0 -8
- package/components/BulkActions/ActionEdit/BatchEditorDialog/FieldRenderer.js +0 -33
- package/components/BulkActions/ActionEdit/BatchEditorDialog/FieldRenderer.js.map +0 -1
- package/components/BulkActions/ActionEdit/BatchEditorDialog/Operation.d.ts +0 -11
- package/components/BulkActions/ActionEdit/BatchEditorDialog/Operation.js +0 -41
- package/components/BulkActions/ActionEdit/BatchEditorDialog/Operation.js.map +0 -1
- package/components/BulkActions/ActionEdit/BatchEditorDialog/index.js +0 -3
- package/components/BulkActions/ActionEdit/BatchEditorDialog/index.js.map +0 -1
- package/components/BulkActions/ActionEdit/GraphQLInputMapper.d.ts +0 -46
- package/components/BulkActions/ActionEdit/GraphQLInputMapper.js +0 -44
- package/components/BulkActions/ActionEdit/GraphQLInputMapper.js.map +0 -1
- package/components/BulkActions/ActionEdit/GraphQLInputMapper.test.js +0 -270
- package/components/BulkActions/ActionEdit/GraphQLInputMapper.test.js.map +0 -1
- package/components/BulkActions/ActionEdit/domain/Batch.js +0 -29
- package/components/BulkActions/ActionEdit/domain/Batch.js.map +0 -1
- package/components/BulkActions/ActionEdit/domain/BatchMapper.js +0 -13
- package/components/BulkActions/ActionEdit/domain/BatchMapper.js.map +0 -1
- package/components/BulkActions/ActionEdit/domain/Field.js +0 -47
- package/components/BulkActions/ActionEdit/domain/Field.js.map +0 -1
- package/components/BulkActions/ActionEdit/domain/FieldMapper.js +0 -22
- package/components/BulkActions/ActionEdit/domain/FieldMapper.js.map +0 -1
- package/components/BulkActions/ActionEdit/domain/index.js +0 -6
- package/components/BulkActions/ActionEdit/domain/index.js.map +0 -1
- package/components/BulkActions/ActionEdit/index.d.ts +0 -1
- package/components/BulkActions/ActionEdit/index.js +0 -3
- package/components/BulkActions/ActionEdit/index.js.map +0 -1
- package/components/BulkActions/ActionEdit/useActionEditWorker.d.ts +0 -7
- package/components/BulkActions/ActionEdit/useActionEditWorker.js +0 -73
- package/components/BulkActions/ActionEdit/useActionEditWorker.js.map +0 -1
- package/components/BulkActions/ActionMove.d.ts +0 -4
- package/components/BulkActions/ActionMove.js +0 -91
- package/components/BulkActions/ActionMove.js.map +0 -1
- package/components/BulkActions/BulkActions.d.ts +0 -3
- package/components/BulkActions/BulkActions.js +0 -46
- package/components/BulkActions/BulkActions.js.map +0 -1
- package/components/BulkActions/index.d.ts +0 -4
- package/components/BulkActions/index.js +0 -6
- package/components/BulkActions/index.js.map +0 -1
- package/components/EditFileUsingUrl/EditFileUsingUrl.d.ts +0 -14
- package/components/EditFileUsingUrl/EditFileUsingUrl.js +0 -53
- package/components/EditFileUsingUrl/EditFileUsingUrl.js.map +0 -1
- package/components/EditFileUsingUrl/EditFileUsingUrlPresenter.d.ts +0 -18
- package/components/EditFileUsingUrl/EditFileUsingUrlPresenter.js +0 -43
- package/components/EditFileUsingUrl/EditFileUsingUrlPresenter.js.map +0 -1
- package/components/EditFileUsingUrl/EditFileUsingUrlRepository.d.ts +0 -17
- package/components/EditFileUsingUrl/EditFileUsingUrlRepository.js +0 -39
- package/components/EditFileUsingUrl/EditFileUsingUrlRepository.js.map +0 -1
- package/components/EditFileUsingUrl/GetFileByUrl.d.ts +0 -10
- package/components/EditFileUsingUrl/GetFileByUrl.js +0 -27
- package/components/EditFileUsingUrl/GetFileByUrl.js.map +0 -1
- package/components/EditFileUsingUrl/Loading.d.ts +0 -18
- package/components/EditFileUsingUrl/Loading.js +0 -42
- package/components/EditFileUsingUrl/Loading.js.map +0 -1
- package/components/EditFileUsingUrl/UpdateFile.d.ts +0 -10
- package/components/EditFileUsingUrl/UpdateFile.js +0 -10
- package/components/EditFileUsingUrl/UpdateFile.js.map +0 -1
- package/components/EditFileUsingUrl/getFileByUrl.graphql.d.ts +0 -2
- package/components/EditFileUsingUrl/getFileByUrl.graphql.js +0 -19
- package/components/EditFileUsingUrl/getFileByUrl.graphql.js.map +0 -1
- package/components/EditFileUsingUrl/index.d.ts +0 -1
- package/components/EditFileUsingUrl/index.js +0 -3
- package/components/EditFileUsingUrl/index.js.map +0 -1
- package/components/Empty/Empty.js +0 -27
- package/components/Empty/Empty.js.map +0 -1
- package/components/Empty/index.js +0 -3
- package/components/Empty/index.js.map +0 -1
- package/components/FileDetails/FileDetails.d.ts +0 -11
- package/components/FileDetails/FileDetails.js +0 -141
- package/components/FileDetails/FileDetails.js.map +0 -1
- package/components/FileDetails/FileDetailsProvider.d.ts +0 -16
- package/components/FileDetails/FileDetailsProvider.js +0 -21
- package/components/FileDetails/FileDetailsProvider.js.map +0 -1
- package/components/FileDetails/components/ActionButton.js +0 -23
- package/components/FileDetails/components/ActionButton.js.map +0 -1
- package/components/FileDetails/components/Actions.js +0 -14
- package/components/FileDetails/components/Actions.js.map +0 -1
- package/components/FileDetails/components/BaseFields.d.ts +0 -7
- package/components/FileDetails/components/BaseFields.js +0 -29
- package/components/FileDetails/components/BaseFields.js.map +0 -1
- package/components/FileDetails/components/Content.js +0 -35
- package/components/FileDetails/components/Content.js.map +0 -1
- package/components/FileDetails/components/CreatedOn.js +0 -22
- package/components/FileDetails/components/CreatedOn.js.map +0 -1
- package/components/FileDetails/components/Description.js +0 -23
- package/components/FileDetails/components/Description.js.map +0 -1
- package/components/FileDetails/components/Extensions.d.ts +0 -7
- package/components/FileDetails/components/Extensions.js +0 -36
- package/components/FileDetails/components/Extensions.js.map +0 -1
- package/components/FileDetails/components/Preview.js +0 -12
- package/components/FileDetails/components/Preview.js.map +0 -1
- package/components/FileDetails/components/Thumbnail.js +0 -16
- package/components/FileDetails/components/Thumbnail.js.map +0 -1
- package/components/FileDetails/index.d.ts +0 -1
- package/components/FileDetails/index.js +0 -3
- package/components/FileDetails/index.js.map +0 -1
- package/components/FileDropArea/FileDropArea.js +0 -69
- package/components/FileDropArea/FileDropArea.js.map +0 -1
- package/components/FileDropArea/index.js +0 -3
- package/components/FileDropArea/index.js.map +0 -1
- package/components/FileDropPlaceholder/FileDropPlaceholder.js +0 -12
- package/components/FileDropPlaceholder/FileDropPlaceholder.js.map +0 -1
- package/components/FileDropPlaceholder/index.js +0 -3
- package/components/FileDropPlaceholder/index.js.map +0 -1
- package/components/Filters/Filters.d.ts +0 -2
- package/components/Filters/Filters.js +0 -26
- package/components/Filters/Filters.js.map +0 -1
- package/components/Filters/index.d.ts +0 -1
- package/components/Filters/index.js +0 -3
- package/components/Filters/index.js.map +0 -1
- package/components/Grid/ActionButton.d.ts +0 -9
- package/components/Grid/ActionButton.js +0 -28
- package/components/Grid/ActionButton.js.map +0 -1
- package/components/Grid/File.d.ts +0 -32
- package/components/Grid/File.js +0 -85
- package/components/Grid/File.js.map +0 -1
- package/components/Grid/Grid.d.ts +0 -21
- package/components/Grid/Grid.js +0 -71
- package/components/Grid/Grid.js.map +0 -1
- package/components/Grid/Thumbnail.js +0 -16
- package/components/Grid/Thumbnail.js.map +0 -1
- package/components/Grid/index.d.ts +0 -1
- package/components/Grid/index.js +0 -3
- package/components/Grid/index.js.map +0 -1
- package/components/Header/Actions.d.ts +0 -5
- package/components/Header/Actions.js +0 -99
- package/components/Header/Actions.js.map +0 -1
- package/components/Header/Header.d.ts +0 -9
- package/components/Header/Header.js +0 -21
- package/components/Header/Header.js.map +0 -1
- package/components/Header/Title.d.ts +0 -2
- package/components/Header/Title.js +0 -55
- package/components/Header/Title.js.map +0 -1
- package/components/Header/index.d.ts +0 -1
- package/components/Header/index.js +0 -3
- package/components/Header/index.js.map +0 -1
- package/components/LayoutSwitch/LayoutSwitch.js +0 -22
- package/components/LayoutSwitch/LayoutSwitch.js.map +0 -1
- package/components/LayoutSwitch/index.js +0 -3
- package/components/LayoutSwitch/index.js.map +0 -1
- package/components/NoPermissions/NoPermissions.js +0 -28
- package/components/NoPermissions/NoPermissions.js.map +0 -1
- package/components/NoPermissions/index.js +0 -3
- package/components/NoPermissions/index.js.map +0 -1
- package/components/NoResults/NoResults.js +0 -22
- package/components/NoResults/NoResults.js.map +0 -1
- package/components/NoResults/index.js +0 -3
- package/components/NoResults/index.js.map +0 -1
- package/components/SearchWidget/SearchWidget.d.ts +0 -2
- package/components/SearchWidget/SearchWidget.js +0 -30
- package/components/SearchWidget/SearchWidget.js.map +0 -1
- package/components/SearchWidget/index.d.ts +0 -1
- package/components/SearchWidget/index.js +0 -3
- package/components/SearchWidget/index.js.map +0 -1
- package/components/Table/Actions/CopyFile.js +0 -26
- package/components/Table/Actions/CopyFile.js.map +0 -1
- package/components/Table/Actions/DeleteFile.js +0 -33
- package/components/Table/Actions/DeleteFile.js.map +0 -1
- package/components/Table/Actions/EditFile.js +0 -24
- package/components/Table/Actions/EditFile.js.map +0 -1
- package/components/Table/Actions/MoveFile.js +0 -22
- package/components/Table/Actions/MoveFile.js.map +0 -1
- package/components/Table/Actions/index.js +0 -6
- package/components/Table/Actions/index.js.map +0 -1
- package/components/Table/Cells/CellActions.js +0 -37
- package/components/Table/Cells/CellActions.js.map +0 -1
- package/components/Table/Cells/CellAuthor.js +0 -16
- package/components/Table/Cells/CellAuthor.js.map +0 -1
- package/components/Table/Cells/CellCreated.js +0 -19
- package/components/Table/Cells/CellCreated.js.map +0 -1
- package/components/Table/Cells/CellModified.js +0 -19
- package/components/Table/Cells/CellModified.js.map +0 -1
- package/components/Table/Cells/CellName.d.ts +0 -16
- package/components/Table/Cells/CellName.js +0 -70
- package/components/Table/Cells/CellName.js.map +0 -1
- package/components/Table/Cells/CellSize.js +0 -20
- package/components/Table/Cells/CellSize.js.map +0 -1
- package/components/Table/Cells/CellThumbnail.js +0 -16
- package/components/Table/Cells/CellThumbnail.js.map +0 -1
- package/components/Table/Cells/CellType.js +0 -17
- package/components/Table/Cells/CellType.js.map +0 -1
- package/components/Table/Cells/index.js +0 -9
- package/components/Table/Cells/index.js.map +0 -1
- package/components/Table/Table.d.ts +0 -10
- package/components/Table/Table.js +0 -35
- package/components/Table/Table.js.map +0 -1
- package/components/Table/index.d.ts +0 -3
- package/components/Table/index.js +0 -5
- package/components/Table/index.js.map +0 -1
- package/components/TagsList/Empty.js +0 -11
- package/components/TagsList/Empty.js.map +0 -1
- package/components/TagsList/FilterSelect.js +0 -28
- package/components/TagsList/FilterSelect.js.map +0 -1
- package/components/TagsList/FilterStatus.js +0 -27
- package/components/TagsList/FilterStatus.js.map +0 -1
- package/components/TagsList/Tag.js +0 -16
- package/components/TagsList/Tag.js.map +0 -1
- package/components/TagsList/Tags.js +0 -32
- package/components/TagsList/Tags.js.map +0 -1
- package/components/TagsList/TagsList.js +0 -31
- package/components/TagsList/TagsList.js.map +0 -1
- package/components/TagsList/index.js +0 -3
- package/components/TagsList/index.js.map +0 -1
- package/components/Thumbnail/Thumbnail.d.ts +0 -2
- package/components/Thumbnail/Thumbnail.js +0 -16
- package/components/Thumbnail/Thumbnail.js.map +0 -1
- package/components/Thumbnail/index.js +0 -3
- package/components/Thumbnail/index.js.map +0 -1
- package/components/UploadStatus/UploadStatus.d.ts +0 -8
- package/components/UploadStatus/UploadStatus.js +0 -38
- package/components/UploadStatus/UploadStatus.js.map +0 -1
- package/components/UploadStatus/index.d.ts +0 -1
- package/components/UploadStatus/index.js +0 -3
- package/components/UploadStatus/index.js.map +0 -1
- package/components/fields/AccessControl.js +0 -49
- package/components/fields/AccessControl.js.map +0 -1
- package/components/fields/Description.d.ts +0 -2
- package/components/fields/Description.js +0 -25
- package/components/fields/Description.js.map +0 -1
- package/components/fields/Name.d.ts +0 -2
- package/components/fields/Name.js +0 -29
- package/components/fields/Name.js.map +0 -1
- package/components/fields/Tags.js +0 -39
- package/components/fields/Tags.js.map +0 -1
- package/components/fields/index.d.ts +0 -4
- package/components/fields/index.js +0 -6
- package/components/fields/index.js.map +0 -1
- package/components/fields/useAccessControlField.js +0 -26
- package/components/fields/useAccessControlField.js.map +0 -1
- package/components/fields/useFileOrUndefined.js +0 -12
- package/components/fields/useFileOrUndefined.js.map +0 -1
- package/constants.js +0 -6
- package/constants.js.map +0 -1
- package/contexts/FileProvider.d.ts +0 -13
- package/contexts/FileProvider.js +0 -22
- package/contexts/FileProvider.js.map +0 -1
- package/features/getFile/index.js.map +0 -1
- package/features/shared/types.js.map +0 -1
- package/hooks/useCopyFile.d.ts +0 -11
- package/hooks/useCopyFile.js +0 -25
- package/hooks/useCopyFile.js.map +0 -1
- package/hooks/useDeleteFile.d.ts +0 -9
- package/hooks/useDeleteFile.js +0 -41
- package/hooks/useDeleteFile.js.map +0 -1
- package/hooks/useFile.d.ts +0 -2
- package/hooks/useFile.js +0 -11
- package/hooks/useFile.js.map +0 -1
- package/hooks/useFileDetails.d.ts +0 -2
- package/hooks/useFileDetails.js +0 -11
- package/hooks/useFileDetails.js.map +0 -1
- package/hooks/useFileModel.d.ts +0 -1
- package/hooks/useFileModel.js +0 -11
- package/hooks/useFileModel.js.map +0 -1
- package/hooks/useMoveFileToFolder.d.ts +0 -2
- package/hooks/useMoveFileToFolder.js +0 -32
- package/hooks/useMoveFileToFolder.js.map +0 -1
- package/index.js.map +0 -1
- package/modules/FileManagerApiProvider/FileManagerApiContext/FileManagerApiContext.d.ts +0 -43
- package/modules/FileManagerApiProvider/FileManagerApiContext/FileManagerApiContext.js +0 -227
- package/modules/FileManagerApiProvider/FileManagerApiContext/FileManagerApiContext.js.map +0 -1
- package/modules/FileManagerApiProvider/FileManagerApiContext/FileModelContext.d.ts +0 -6
- package/modules/FileManagerApiProvider/FileManagerApiContext/FileModelContext.js +0 -25
- package/modules/FileManagerApiProvider/FileManagerApiContext/FileModelContext.js.map +0 -1
- package/modules/FileManagerApiProvider/FileManagerApiContext/getFileGraphQLSelection.d.ts +0 -2
- package/modules/FileManagerApiProvider/FileManagerApiContext/getFileGraphQLSelection.js +0 -33
- package/modules/FileManagerApiProvider/FileManagerApiContext/getFileGraphQLSelection.js.map +0 -1
- package/modules/FileManagerApiProvider/FileManagerApiContext/getFileUploader.d.ts +0 -2
- package/modules/FileManagerApiProvider/FileManagerApiContext/getFileUploader.js +0 -10
- package/modules/FileManagerApiProvider/FileManagerApiContext/getFileUploader.js.map +0 -1
- package/modules/FileManagerApiProvider/FileManagerApiContext/index.d.ts +0 -3
- package/modules/FileManagerApiProvider/FileManagerApiContext/index.js +0 -5
- package/modules/FileManagerApiProvider/FileManagerApiContext/index.js.map +0 -1
- package/modules/FileManagerApiProvider/FileManagerApiContext/useFileManagerApi.d.ts +0 -3
- package/modules/FileManagerApiProvider/FileManagerApiContext/useFileManagerApi.js +0 -11
- package/modules/FileManagerApiProvider/FileManagerApiContext/useFileManagerApi.js.map +0 -1
- package/modules/FileManagerApiProvider/graphql.d.ts +0 -124
- package/modules/FileManagerApiProvider/graphql.js +0 -118
- package/modules/FileManagerApiProvider/graphql.js.map +0 -1
- package/modules/FileManagerApiProvider/index.d.ts +0 -2
- package/modules/FileManagerApiProvider/index.js +0 -18
- package/modules/FileManagerApiProvider/index.js.map +0 -1
- package/modules/FileManagerRenderer/FileActions/FileDetails/CopyUrl.js +0 -24
- package/modules/FileManagerRenderer/FileActions/FileDetails/CopyUrl.js.map +0 -1
- package/modules/FileManagerRenderer/FileActions/FileDetails/DeleteImage.js +0 -35
- package/modules/FileManagerRenderer/FileActions/FileDetails/DeleteImage.js.map +0 -1
- package/modules/FileManagerRenderer/FileActions/FileDetails/Download.js +0 -24
- package/modules/FileManagerRenderer/FileActions/FileDetails/Download.js.map +0 -1
- package/modules/FileManagerRenderer/FileActions/FileDetails/MoveToFolder.js +0 -19
- package/modules/FileManagerRenderer/FileActions/FileDetails/MoveToFolder.js.map +0 -1
- package/modules/FileManagerRenderer/FileActions/Grid/Delete.js +0 -29
- package/modules/FileManagerRenderer/FileActions/Grid/Delete.js.map +0 -1
- package/modules/FileManagerRenderer/FileActions/Grid/Download.js +0 -24
- package/modules/FileManagerRenderer/FileActions/Grid/Download.js.map +0 -1
- package/modules/FileManagerRenderer/FileActions/Grid/MoveToFolder.js +0 -19
- package/modules/FileManagerRenderer/FileActions/Grid/MoveToFolder.js.map +0 -1
- package/modules/FileManagerRenderer/FileActions/Grid/Settings.js +0 -23
- package/modules/FileManagerRenderer/FileActions/Grid/Settings.js.map +0 -1
- package/modules/FileManagerRenderer/FileActions/index.js +0 -43
- package/modules/FileManagerRenderer/FileActions/index.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/FileManagerView.d.ts +0 -5
- package/modules/FileManagerRenderer/FileManagerView/FileManagerView.js +0 -280
- package/modules/FileManagerRenderer/FileManagerView/FileManagerView.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/FileManagerViewConfig.d.ts +0 -281
- package/modules/FileManagerRenderer/FileManagerView/FileManagerViewConfig.js +0 -59
- package/modules/FileManagerRenderer/FileManagerView/FileManagerViewConfig.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/LeftSidebar.d.ts +0 -8
- package/modules/FileManagerRenderer/FileManagerView/LeftSidebar.js +0 -47
- package/modules/FileManagerRenderer/FileManagerView/LeftSidebar.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/BulkAction.d.ts +0 -26
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/BulkAction.js +0 -66
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/BulkAction.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/BulkEditField.js +0 -26
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/BulkEditField.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FileAction.js +0 -14
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FileAction.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Filter.js +0 -44
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Filter.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FilterByTags.js +0 -17
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FilterByTags.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FiltersToWhere.js +0 -16
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FiltersToWhere.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FolderAction.js +0 -13
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FolderAction.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FolderDropConfirmation.js +0 -10
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FolderDropConfirmation.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FolderFieldDecorator.js +0 -16
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FolderFieldDecorator.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Grid/Action.js +0 -38
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Grid/Action.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Grid/Thumbnail.js +0 -30
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Grid/Thumbnail.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Grid/index.js +0 -3
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Grid/index.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Table/Column.d.ts +0 -32
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Table/Column.js +0 -16
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Table/Column.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Table/Thumbnail.js +0 -30
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Table/Thumbnail.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Table/index.d.ts +0 -56
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Table/index.js +0 -10
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Table/index.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/index.d.ts +0 -189
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/index.js +0 -46
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/index.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/Action.js +0 -35
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/Action.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/Field.d.ts +0 -39
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/Field.js +0 -44
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/Field.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/FieldDecorator.d.ts +0 -8
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/FieldDecorator.js +0 -25
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/FieldDecorator.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/GroupFields.d.ts +0 -5
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/GroupFields.js +0 -16
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/GroupFields.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/Thumbnail.js +0 -27
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/Thumbnail.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/Width.js +0 -16
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/Width.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/index.d.ts +0 -86
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/index.js +0 -23
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/index.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/formatFileItem.d.ts +0 -6
- package/modules/FileManagerRenderer/FileManagerView/formatFileItem.js +0 -19
- package/modules/FileManagerRenderer/FileManagerView/formatFileItem.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/getThumbnailRenderer.d.ts +0 -4
- package/modules/FileManagerRenderer/FileManagerView/getThumbnailRenderer.js +0 -21
- package/modules/FileManagerRenderer/FileManagerView/getThumbnailRenderer.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/index.d.ts +0 -13
- package/modules/FileManagerRenderer/FileManagerView/index.js +0 -77
- package/modules/FileManagerRenderer/FileManagerView/index.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/outputFileSelectionError.js +0 -30
- package/modules/FileManagerRenderer/FileManagerView/outputFileSelectionError.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerViewProvider/FileManagerViewContext.d.ts +0 -89
- package/modules/FileManagerRenderer/FileManagerViewProvider/FileManagerViewContext.js +0 -459
- package/modules/FileManagerRenderer/FileManagerViewProvider/FileManagerViewContext.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerViewProvider/index.d.ts +0 -2
- package/modules/FileManagerRenderer/FileManagerViewProvider/index.js +0 -4
- package/modules/FileManagerRenderer/FileManagerViewProvider/index.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerViewProvider/setSelection.d.ts +0 -31
- package/modules/FileManagerRenderer/FileManagerViewProvider/setSelection.js +0 -100
- package/modules/FileManagerRenderer/FileManagerViewProvider/setSelection.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerViewProvider/state.d.ts +0 -33
- package/modules/FileManagerRenderer/FileManagerViewProvider/state.js +0 -34
- package/modules/FileManagerRenderer/FileManagerViewProvider/state.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerViewProvider/useFileManagerView.d.ts +0 -3
- package/modules/FileManagerRenderer/FileManagerViewProvider/useFileManagerView.js +0 -11
- package/modules/FileManagerRenderer/FileManagerViewProvider/useFileManagerView.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerViewProvider/useListFiles.d.ts +0 -24
- package/modules/FileManagerRenderer/FileManagerViewProvider/useListFiles.js +0 -153
- package/modules/FileManagerRenderer/FileManagerViewProvider/useListFiles.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerViewProvider/useTags.d.ts +0 -11
- package/modules/FileManagerRenderer/FileManagerViewProvider/useTags.js +0 -89
- package/modules/FileManagerRenderer/FileManagerViewProvider/useTags.js.map +0 -1
- package/modules/FileManagerRenderer/filters/FilterByType.js +0 -32
- package/modules/FileManagerRenderer/filters/FilterByType.js.map +0 -1
- package/modules/FileManagerRenderer/index.d.ts +0 -2
- package/modules/FileManagerRenderer/index.js +0 -140
- package/modules/FileManagerRenderer/index.js.map +0 -1
- package/modules/ThumbnailRenderers/FilePreviewDefaultRenderer.js +0 -12
- package/modules/ThumbnailRenderers/FilePreviewDefaultRenderer.js.map +0 -1
- package/modules/ThumbnailRenderers/FilePreviewImageRenderer.js +0 -19
- package/modules/ThumbnailRenderers/FilePreviewImageRenderer.js.map +0 -1
- package/modules/ThumbnailRenderers/GridItemDefaultRenderer.js +0 -12
- package/modules/ThumbnailRenderers/GridItemDefaultRenderer.js.map +0 -1
- package/modules/ThumbnailRenderers/GridItemImageRenderer.js +0 -19
- package/modules/ThumbnailRenderers/GridItemImageRenderer.js.map +0 -1
- package/modules/ThumbnailRenderers/TableItemDefaultRenderer.js +0 -19
- package/modules/ThumbnailRenderers/TableItemDefaultRenderer.js.map +0 -1
- package/modules/ThumbnailRenderers/TableItemImageRenderer.js +0 -19
- package/modules/ThumbnailRenderers/TableItemImageRenderer.js.map +0 -1
- package/presentation/resolveImageTool/ResolveImageTool.js +0 -48
- package/presentation/resolveImageTool/ResolveImageTool.js.map +0 -1
- package/presentation/resolveImageTool/feature.js +0 -10
- package/presentation/resolveImageTool/feature.js.map +0 -1
- package/tagsHelpers.js +0 -35
- package/tagsHelpers.js.map +0 -1
- package/types.d.ts +0 -78
- package/types.js +0 -3
- package/types.js.map +0 -1
- /package/{constants.d.ts → domain/constants.d.ts} +0 -0
- /package/{tagsHelpers.d.ts → domain/tagsHelpers.d.ts} +0 -0
- /package/{components/BulkActions/ActionEdit/ActionEditPresenter.test.d.ts → features/deleteFile/DeleteFile.test.d.ts} +0 -0
- /package/{components/BulkActions/ActionEdit/BatchEditorDialog/BatchEditorDialogPresenter.test.d.ts → features/fileUploader/FileUploader.test.d.ts} +0 -0
- /package/{components/BulkActions/ActionEdit/GraphQLInputMapper.test.d.ts → features/listFiles/ListFiles.test.d.ts} +0 -0
- /package/{presentation → features}/resolveImageTool/ResolveImageTool.d.ts +0 -0
- /package/{presentation → features}/resolveImageTool/feature.d.ts +0 -0
- /package/{modules/FileManagerRenderer → presentation}/FileActions/FileDetails/CopyUrl.d.ts +0 -0
- /package/{modules/FileManagerRenderer → presentation}/FileActions/FileDetails/DeleteImage.d.ts +0 -0
- /package/{modules/FileManagerRenderer → presentation}/FileActions/FileDetails/Download.d.ts +0 -0
- /package/{modules/FileManagerRenderer → presentation}/FileActions/FileDetails/MoveToFolder.d.ts +0 -0
- /package/{modules/FileManagerRenderer → presentation}/FileActions/Grid/Delete.d.ts +0 -0
- /package/{modules/FileManagerRenderer → presentation}/FileActions/Grid/Download.d.ts +0 -0
- /package/{modules/FileManagerRenderer → presentation}/FileActions/Grid/MoveToFolder.d.ts +0 -0
- /package/{modules/FileManagerRenderer → presentation}/FileActions/Grid/Settings.d.ts +0 -0
- /package/{modules/FileManagerRenderer → presentation}/FileActions/index.d.ts +0 -0
- /package/{components → presentation}/FileDetails/components/ActionButton.d.ts +0 -0
- /package/{components → presentation}/FileDetails/components/Actions.d.ts +0 -0
- /package/{components → presentation}/FileDetails/components/Content.d.ts +0 -0
- /package/{components → presentation}/FileDetails/components/CreatedOn.d.ts +0 -0
- /package/{components → presentation}/FileDetails/components/Description.d.ts +0 -0
- /package/{components → presentation}/FileDetails/components/Preview.d.ts +0 -0
- /package/{components → presentation}/FileDetails/components/Thumbnail.d.ts +0 -0
- /package/{components → presentation/FileList/components}/BottomInfoBar/BottomInfoBar.d.ts +0 -0
- /package/{components → presentation/FileList/components}/BottomInfoBar/ListStatus.d.ts +0 -0
- /package/{components → presentation/FileList/components}/BottomInfoBar/SupportedFileTypes.d.ts +0 -0
- /package/{components → presentation/FileList/components}/BottomInfoBar/index.d.ts +0 -0
- /package/{components/BulkActions/ActionEdit → presentation/FileList/components/BulkActions}/BatchEditorDialog/AddOperation.d.ts +0 -0
- /package/{components/BulkActions/ActionEdit → presentation/FileList/components/BulkActions}/BatchEditorDialog/index.d.ts +0 -0
- /package/{components/BulkActions/ActionEdit → presentation/FileList/components/BulkActions}/domain/Batch.d.ts +0 -0
- /package/{components/BulkActions/ActionEdit → presentation/FileList/components/BulkActions}/domain/BatchMapper.d.ts +0 -0
- /package/{components/BulkActions/ActionEdit → presentation/FileList/components/BulkActions}/domain/Field.d.ts +0 -0
- /package/{components/BulkActions/ActionEdit → presentation/FileList/components/BulkActions}/domain/FieldMapper.d.ts +0 -0
- /package/{components/BulkActions/ActionEdit → presentation/FileList/components/BulkActions}/domain/index.d.ts +0 -0
- /package/{components → presentation/FileList/components}/Empty/Empty.d.ts +0 -0
- /package/{components → presentation/FileList/components}/Empty/index.d.ts +0 -0
- /package/{components → presentation/FileList/components}/FileDropArea/FileDropArea.d.ts +0 -0
- /package/{components → presentation/FileList/components}/FileDropArea/index.d.ts +0 -0
- /package/{components → presentation/FileList/components}/FileDropPlaceholder/FileDropPlaceholder.d.ts +0 -0
- /package/{components → presentation/FileList/components}/FileDropPlaceholder/index.d.ts +0 -0
- /package/{modules/FileManagerRenderer/filters → presentation/FileList/components/Filters}/FilterByType.d.ts +0 -0
- /package/{components → presentation/FileList/components}/LayoutSwitch/LayoutSwitch.d.ts +0 -0
- /package/{components → presentation/FileList/components}/LayoutSwitch/index.d.ts +0 -0
- /package/{components → presentation/FileList/components}/NoPermissions/NoPermissions.d.ts +0 -0
- /package/{components → presentation/FileList/components}/NoPermissions/index.d.ts +0 -0
- /package/{components → presentation/FileList/components}/NoResults/NoResults.d.ts +0 -0
- /package/{components → presentation/FileList/components}/NoResults/index.d.ts +0 -0
- /package/{components → presentation/FileList/components}/Table/Actions/CopyFile.d.ts +0 -0
- /package/{components → presentation/FileList/components}/Table/Actions/DeleteFile.d.ts +0 -0
- /package/{components → presentation/FileList/components}/Table/Actions/EditFile.d.ts +0 -0
- /package/{components → presentation/FileList/components}/Table/Actions/MoveFile.d.ts +0 -0
- /package/{components → presentation/FileList/components}/Table/Actions/index.d.ts +0 -0
- /package/{components → presentation/FileList/components}/Table/Cells/CellActions.d.ts +0 -0
- /package/{components → presentation/FileList/components}/Table/Cells/CellAuthor.d.ts +0 -0
- /package/{components → presentation/FileList/components}/Table/Cells/CellCreated.d.ts +0 -0
- /package/{components → presentation/FileList/components}/Table/Cells/CellModified.d.ts +0 -0
- /package/{components → presentation/FileList/components}/Table/Cells/CellSize.d.ts +0 -0
- /package/{components → presentation/FileList/components}/Table/Cells/CellThumbnail.d.ts +0 -0
- /package/{components → presentation/FileList/components}/Table/Cells/CellType.d.ts +0 -0
- /package/{components → presentation/FileList/components}/Table/Cells/index.d.ts +0 -0
- /package/{components → presentation/FileList/components}/TagsList/Empty.d.ts +0 -0
- /package/{components → presentation/FileList/components}/TagsList/FilterSelect.d.ts +0 -0
- /package/{components → presentation/FileList/components}/TagsList/FilterStatus.d.ts +0 -0
- /package/{components → presentation/FileList/components}/TagsList/Tag.d.ts +0 -0
- /package/{components → presentation/FileList/components}/TagsList/Tags.d.ts +0 -0
- /package/{components → presentation/FileList/components}/TagsList/TagsList.d.ts +0 -0
- /package/{components → presentation/FileList/components}/TagsList/index.d.ts +0 -0
- /package/{components/Grid → presentation/FileList/components/Thumbnail}/Thumbnail.d.ts +0 -0
- /package/{components → presentation/FileList/components}/Thumbnail/index.d.ts +0 -0
- /package/{modules/FileManagerRenderer/FileManagerView → presentation/config}/configComponents/Browser/BulkEditField.d.ts +0 -0
- /package/{modules/FileManagerRenderer/FileManagerView → presentation/config}/configComponents/Browser/FileAction.d.ts +0 -0
- /package/{modules/FileManagerRenderer/FileManagerView → presentation/config}/configComponents/Browser/Filter.d.ts +0 -0
- /package/{modules/FileManagerRenderer/FileManagerView → presentation/config}/configComponents/Browser/FilterByTags.d.ts +0 -0
- /package/{modules/FileManagerRenderer/FileManagerView → presentation/config}/configComponents/Browser/FiltersToWhere.d.ts +0 -0
- /package/{modules/FileManagerRenderer/FileManagerView → presentation/config}/configComponents/Browser/FolderAction.d.ts +0 -0
- /package/{modules/FileManagerRenderer/FileManagerView → presentation/config}/configComponents/Browser/FolderDropConfirmation.d.ts +0 -0
- /package/{modules/FileManagerRenderer/FileManagerView → presentation/config}/configComponents/Browser/FolderFieldDecorator.d.ts +0 -0
- /package/{modules/FileManagerRenderer/FileManagerView → presentation/config}/configComponents/Browser/Grid/Action.d.ts +0 -0
- /package/{modules/FileManagerRenderer/FileManagerView → presentation/config}/configComponents/Browser/Grid/Thumbnail.d.ts +0 -0
- /package/{modules/FileManagerRenderer/FileManagerView → presentation/config}/configComponents/Browser/Grid/index.d.ts +0 -0
- /package/{modules/FileManagerRenderer/FileManagerView → presentation/config}/configComponents/Browser/Table/Thumbnail.d.ts +0 -0
- /package/{modules/FileManagerRenderer/FileManagerView → presentation/config}/configComponents/FileDetails/Action.d.ts +0 -0
- /package/{modules/FileManagerRenderer/FileManagerView → presentation/config}/configComponents/FileDetails/Thumbnail.d.ts +0 -0
- /package/{modules/FileManagerRenderer/FileManagerView → presentation/config}/configComponents/FileDetails/Width.d.ts +0 -0
- /package/{components → presentation/config}/fields/AccessControl.d.ts +0 -0
- /package/{components → presentation/config}/fields/Tags.d.ts +0 -0
- /package/{components → presentation/config}/fields/useAccessControlField.d.ts +0 -0
- /package/{components → presentation/config}/fields/useFileOrUndefined.d.ts +0 -0
- /package/{modules/FileManagerRenderer/FileManagerView → presentation/config}/outputFileSelectionError.d.ts +0 -0
- /package/{modules/ThumbnailRenderers → presentation/config/thumbnailRenderers}/FilePreviewDefaultRenderer.d.ts +0 -0
- /package/{modules/ThumbnailRenderers → presentation/config/thumbnailRenderers}/FilePreviewImageRenderer.d.ts +0 -0
- /package/{modules/ThumbnailRenderers → presentation/config/thumbnailRenderers}/GridItemDefaultRenderer.d.ts +0 -0
- /package/{modules/ThumbnailRenderers → presentation/config/thumbnailRenderers}/GridItemImageRenderer.d.ts +0 -0
- /package/{modules/ThumbnailRenderers → presentation/config/thumbnailRenderers}/TableItemDefaultRenderer.d.ts +0 -0
- /package/{modules/ThumbnailRenderers → presentation/config/thumbnailRenderers}/TableItemImageRenderer.d.ts +0 -0
|
@@ -1,270 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from "vitest";
|
|
2
|
-
import { GraphQLInputMapper } from "./GraphQLInputMapper.js";
|
|
3
|
-
import { OperatorType } from "./domain/index.js";
|
|
4
|
-
const fileMock = {
|
|
5
|
-
id: "12345678",
|
|
6
|
-
location: {
|
|
7
|
-
folderId: "root"
|
|
8
|
-
},
|
|
9
|
-
createdOn: new Date().toISOString(),
|
|
10
|
-
createdBy: {
|
|
11
|
-
id: "123",
|
|
12
|
-
displayName: "123"
|
|
13
|
-
},
|
|
14
|
-
savedOn: new Date().toISOString(),
|
|
15
|
-
savedBy: {
|
|
16
|
-
id: "123",
|
|
17
|
-
displayName: "123"
|
|
18
|
-
},
|
|
19
|
-
modifiedOn: new Date().toISOString(),
|
|
20
|
-
modifiedBy: {
|
|
21
|
-
id: "123",
|
|
22
|
-
displayName: "123"
|
|
23
|
-
},
|
|
24
|
-
src: `https://demo.website.com/files/12345678/filenameA.png`,
|
|
25
|
-
key: `12345678/filenameA.png`,
|
|
26
|
-
name: "filenameA.png",
|
|
27
|
-
size: 123456,
|
|
28
|
-
type: "image/png",
|
|
29
|
-
tags: ["sketch", "file-a", "webiny"]
|
|
30
|
-
};
|
|
31
|
-
describe("GraphQLInputMapper", () => {
|
|
32
|
-
it("should return a GraphQL formatted output based on the received BatchDTO and previous data", () => {
|
|
33
|
-
const data = {
|
|
34
|
-
...fileMock,
|
|
35
|
-
extensions: {
|
|
36
|
-
field1: "old-field1",
|
|
37
|
-
field2: "old-field2",
|
|
38
|
-
field3: ["old-field3"]
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
const batch = {
|
|
42
|
-
operations: [{
|
|
43
|
-
field: "accessControl",
|
|
44
|
-
operator: OperatorType.OVERRIDE,
|
|
45
|
-
value: {
|
|
46
|
-
accessControl: {
|
|
47
|
-
type: "private"
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}, {
|
|
51
|
-
field: "extensions.field1",
|
|
52
|
-
operator: OperatorType.OVERRIDE,
|
|
53
|
-
value: {
|
|
54
|
-
extensions: {
|
|
55
|
-
field1: "new-field1"
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}, {
|
|
59
|
-
field: "extensions.field2",
|
|
60
|
-
operator: OperatorType.REMOVE
|
|
61
|
-
}, {
|
|
62
|
-
field: "extensions.field3",
|
|
63
|
-
operator: OperatorType.APPEND,
|
|
64
|
-
value: {
|
|
65
|
-
extensions: {
|
|
66
|
-
field3: ["new-field3-1", "new-field3-2"]
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}]
|
|
70
|
-
};
|
|
71
|
-
const output = GraphQLInputMapper.applyOperations(data, batch);
|
|
72
|
-
expect(output).toEqual({
|
|
73
|
-
...data,
|
|
74
|
-
accessControl: {
|
|
75
|
-
type: "private"
|
|
76
|
-
},
|
|
77
|
-
extensions: {
|
|
78
|
-
field1: "new-field1",
|
|
79
|
-
field2: null,
|
|
80
|
-
field3: ["old-field3", "new-field3-1", "new-field3-2"]
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
|
-
it("should not override data for fields not defined in the batch", () => {
|
|
85
|
-
const data = {
|
|
86
|
-
...fileMock,
|
|
87
|
-
accessControl: {
|
|
88
|
-
type: "public"
|
|
89
|
-
},
|
|
90
|
-
extensions: {
|
|
91
|
-
field1: "old-field1",
|
|
92
|
-
field2: "old-field2"
|
|
93
|
-
}
|
|
94
|
-
};
|
|
95
|
-
const batch = {
|
|
96
|
-
operations: [{
|
|
97
|
-
field: "extensions.field1",
|
|
98
|
-
operator: OperatorType.OVERRIDE,
|
|
99
|
-
value: {
|
|
100
|
-
extensions: {
|
|
101
|
-
field1: "new-field1"
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}]
|
|
105
|
-
};
|
|
106
|
-
const output = GraphQLInputMapper.applyOperations(data, batch);
|
|
107
|
-
expect(output).toEqual({
|
|
108
|
-
...data,
|
|
109
|
-
extensions: {
|
|
110
|
-
field1: "new-field1",
|
|
111
|
-
field2: "old-field2"
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
});
|
|
115
|
-
it("should not OVERRIDE data in case of nullish value", () => {
|
|
116
|
-
const data = {
|
|
117
|
-
...fileMock,
|
|
118
|
-
extensions: {
|
|
119
|
-
field1: "old-field-1"
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
const batch = {
|
|
123
|
-
operations: [{
|
|
124
|
-
field: "extensions.field1",
|
|
125
|
-
operator: OperatorType.OVERRIDE,
|
|
126
|
-
value: {
|
|
127
|
-
extensions: {
|
|
128
|
-
field1: null
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}]
|
|
132
|
-
};
|
|
133
|
-
const output = GraphQLInputMapper.applyOperations(data, batch);
|
|
134
|
-
expect(output).toEqual({
|
|
135
|
-
...data,
|
|
136
|
-
extensions: {
|
|
137
|
-
field1: "old-field-1"
|
|
138
|
-
}
|
|
139
|
-
});
|
|
140
|
-
});
|
|
141
|
-
it("should not APPEND data in case of nullish value", () => {
|
|
142
|
-
const data = {
|
|
143
|
-
...fileMock,
|
|
144
|
-
extensions: {
|
|
145
|
-
field1: "old-field-1"
|
|
146
|
-
}
|
|
147
|
-
};
|
|
148
|
-
const batch = {
|
|
149
|
-
operations: [{
|
|
150
|
-
field: "extensions.field1",
|
|
151
|
-
operator: OperatorType.APPEND,
|
|
152
|
-
value: {
|
|
153
|
-
extensions: {
|
|
154
|
-
field1: null
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
}]
|
|
158
|
-
};
|
|
159
|
-
const output = GraphQLInputMapper.applyOperations(data, batch);
|
|
160
|
-
expect(output).toEqual({
|
|
161
|
-
...data,
|
|
162
|
-
extensions: {
|
|
163
|
-
field1: "old-field-1"
|
|
164
|
-
}
|
|
165
|
-
});
|
|
166
|
-
});
|
|
167
|
-
it("should not APPEND data in case of non-array value", () => {
|
|
168
|
-
const data = {
|
|
169
|
-
...fileMock,
|
|
170
|
-
extensions: {
|
|
171
|
-
field1: "old-field-1"
|
|
172
|
-
}
|
|
173
|
-
};
|
|
174
|
-
const batch = {
|
|
175
|
-
operations: [{
|
|
176
|
-
field: "extensions.field1",
|
|
177
|
-
operator: OperatorType.APPEND,
|
|
178
|
-
value: {
|
|
179
|
-
extensions: {
|
|
180
|
-
field1: "any-string"
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
}]
|
|
184
|
-
};
|
|
185
|
-
const output = GraphQLInputMapper.applyOperations(data, batch);
|
|
186
|
-
expect(output).toEqual({
|
|
187
|
-
...data,
|
|
188
|
-
extensions: {
|
|
189
|
-
field1: "old-field-1"
|
|
190
|
-
}
|
|
191
|
-
});
|
|
192
|
-
});
|
|
193
|
-
it("should APPEND new data to non existing envelope", () => {
|
|
194
|
-
const data = {
|
|
195
|
-
...fileMock
|
|
196
|
-
};
|
|
197
|
-
const batch = {
|
|
198
|
-
operations: [{
|
|
199
|
-
field: "extensions.field1",
|
|
200
|
-
operator: OperatorType.APPEND,
|
|
201
|
-
value: {
|
|
202
|
-
extensions: {
|
|
203
|
-
field1: ["new-field1-1", "new-field1-2"]
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
}]
|
|
207
|
-
};
|
|
208
|
-
const output = GraphQLInputMapper.applyOperations(data, batch);
|
|
209
|
-
expect(output).toEqual({
|
|
210
|
-
...data,
|
|
211
|
-
extensions: {
|
|
212
|
-
field1: ["new-field1-1", "new-field1-2"]
|
|
213
|
-
}
|
|
214
|
-
});
|
|
215
|
-
});
|
|
216
|
-
it("should APPEND new data for fields with nullish value", () => {
|
|
217
|
-
const data = {
|
|
218
|
-
...fileMock,
|
|
219
|
-
extensions: {
|
|
220
|
-
field1: null
|
|
221
|
-
}
|
|
222
|
-
};
|
|
223
|
-
const batch = {
|
|
224
|
-
operations: [{
|
|
225
|
-
field: "extensions.field1",
|
|
226
|
-
operator: OperatorType.APPEND,
|
|
227
|
-
value: {
|
|
228
|
-
extensions: {
|
|
229
|
-
field1: ["new-field1-1", "new-field1-2"]
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
}]
|
|
233
|
-
};
|
|
234
|
-
const output = GraphQLInputMapper.applyOperations(data, batch);
|
|
235
|
-
expect(output).toEqual({
|
|
236
|
-
...data,
|
|
237
|
-
extensions: {
|
|
238
|
-
field1: ["new-field1-1", "new-field1-2"]
|
|
239
|
-
}
|
|
240
|
-
});
|
|
241
|
-
});
|
|
242
|
-
it("should return existing data in case of invalid operation", () => {
|
|
243
|
-
const data = {
|
|
244
|
-
...fileMock,
|
|
245
|
-
extensions: {
|
|
246
|
-
field1: "old-field1"
|
|
247
|
-
}
|
|
248
|
-
};
|
|
249
|
-
const batch = {
|
|
250
|
-
operations: [{
|
|
251
|
-
field: "field1",
|
|
252
|
-
operator: "ANY-OPERATION",
|
|
253
|
-
value: {
|
|
254
|
-
extensions: {
|
|
255
|
-
field1: "new-field1"
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
}]
|
|
259
|
-
};
|
|
260
|
-
const output = GraphQLInputMapper.applyOperations(data, batch);
|
|
261
|
-
expect(output).toEqual({
|
|
262
|
-
...data,
|
|
263
|
-
extensions: {
|
|
264
|
-
field1: "old-field1"
|
|
265
|
-
}
|
|
266
|
-
});
|
|
267
|
-
});
|
|
268
|
-
});
|
|
269
|
-
|
|
270
|
-
//# sourceMappingURL=GraphQLInputMapper.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["describe","it","expect","GraphQLInputMapper","OperatorType","fileMock","id","location","folderId","createdOn","Date","toISOString","createdBy","displayName","savedOn","savedBy","modifiedOn","modifiedBy","src","key","name","size","type","tags","data","extensions","field1","field2","field3","batch","operations","field","operator","OVERRIDE","value","accessControl","REMOVE","APPEND","output","applyOperations","toEqual"],"sources":["GraphQLInputMapper.test.ts"],"sourcesContent":["import { describe, it, expect } from \"vitest\";\nimport { GraphQLInputMapper } from \"./GraphQLInputMapper.js\";\nimport type { BatchDTO } from \"~/components/BulkActions/ActionEdit/domain/index.js\";\nimport { OperatorType } from \"~/components/BulkActions/ActionEdit/domain/index.js\";\nimport type { FileItem } from \"~/types.js\";\n\nconst fileMock: FileItem = {\n id: \"12345678\",\n location: {\n folderId: \"root\"\n },\n createdOn: new Date().toISOString(),\n createdBy: {\n id: \"123\",\n displayName: \"123\"\n },\n savedOn: new Date().toISOString(),\n savedBy: {\n id: \"123\",\n displayName: \"123\"\n },\n modifiedOn: new Date().toISOString(),\n modifiedBy: {\n id: \"123\",\n displayName: \"123\"\n },\n src: `https://demo.website.com/files/12345678/filenameA.png`,\n key: `12345678/filenameA.png`,\n name: \"filenameA.png\",\n size: 123456,\n type: \"image/png\",\n tags: [\"sketch\", \"file-a\", \"webiny\"]\n};\n\ndescribe(\"GraphQLInputMapper\", () => {\n it(\"should return a GraphQL formatted output based on the received BatchDTO and previous data\", () => {\n const data: FileItem = {\n ...fileMock,\n extensions: {\n field1: \"old-field1\",\n field2: \"old-field2\",\n field3: [\"old-field3\"]\n }\n };\n\n const batch: BatchDTO = {\n operations: [\n {\n field: \"accessControl\",\n operator: OperatorType.OVERRIDE,\n value: {\n accessControl: {\n type: \"private\"\n }\n }\n },\n {\n field: \"extensions.field1\",\n operator: OperatorType.OVERRIDE,\n value: {\n extensions: {\n field1: \"new-field1\"\n }\n }\n },\n {\n field: \"extensions.field2\",\n operator: OperatorType.REMOVE\n },\n {\n field: \"extensions.field3\",\n operator: OperatorType.APPEND,\n value: {\n extensions: {\n field3: [\"new-field3-1\", \"new-field3-2\"]\n }\n }\n }\n ]\n };\n\n const output = GraphQLInputMapper.applyOperations(data, batch);\n\n expect(output).toEqual({\n ...data,\n accessControl: {\n type: \"private\"\n },\n extensions: {\n field1: \"new-field1\",\n field2: null,\n field3: [\"old-field3\", \"new-field3-1\", \"new-field3-2\"]\n }\n });\n });\n\n it(\"should not override data for fields not defined in the batch\", () => {\n const data: FileItem = {\n ...fileMock,\n accessControl: {\n type: \"public\"\n },\n extensions: {\n field1: \"old-field1\",\n field2: \"old-field2\"\n }\n };\n\n const batch: BatchDTO = {\n operations: [\n {\n field: \"extensions.field1\",\n operator: OperatorType.OVERRIDE,\n value: {\n extensions: {\n field1: \"new-field1\"\n }\n }\n }\n ]\n };\n\n const output = GraphQLInputMapper.applyOperations(data, batch);\n\n expect(output).toEqual({\n ...data,\n extensions: {\n field1: \"new-field1\",\n field2: \"old-field2\"\n }\n });\n });\n\n it(\"should not OVERRIDE data in case of nullish value\", () => {\n const data: FileItem = {\n ...fileMock,\n extensions: {\n field1: \"old-field-1\"\n }\n };\n\n const batch: BatchDTO = {\n operations: [\n {\n field: \"extensions.field1\",\n operator: OperatorType.OVERRIDE,\n value: {\n extensions: {\n field1: null\n }\n }\n }\n ]\n };\n\n const output = GraphQLInputMapper.applyOperations(data, batch);\n\n expect(output).toEqual({\n ...data,\n extensions: {\n field1: \"old-field-1\"\n }\n });\n });\n\n it(\"should not APPEND data in case of nullish value\", () => {\n const data: FileItem = {\n ...fileMock,\n extensions: {\n field1: \"old-field-1\"\n }\n };\n\n const batch: BatchDTO = {\n operations: [\n {\n field: \"extensions.field1\",\n operator: OperatorType.APPEND,\n value: {\n extensions: {\n field1: null\n }\n }\n }\n ]\n };\n\n const output = GraphQLInputMapper.applyOperations(data, batch);\n\n expect(output).toEqual({\n ...data,\n extensions: {\n field1: \"old-field-1\"\n }\n });\n });\n\n it(\"should not APPEND data in case of non-array value\", () => {\n const data: FileItem = {\n ...fileMock,\n extensions: {\n field1: \"old-field-1\"\n }\n };\n\n const batch: BatchDTO = {\n operations: [\n {\n field: \"extensions.field1\",\n operator: OperatorType.APPEND,\n value: {\n extensions: {\n field1: \"any-string\"\n }\n }\n }\n ]\n };\n\n const output = GraphQLInputMapper.applyOperations(data, batch);\n\n expect(output).toEqual({\n ...data,\n extensions: {\n field1: \"old-field-1\"\n }\n });\n });\n\n it(\"should APPEND new data to non existing envelope\", () => {\n const data: FileItem = { ...fileMock };\n\n const batch: BatchDTO = {\n operations: [\n {\n field: \"extensions.field1\",\n operator: OperatorType.APPEND,\n value: {\n extensions: {\n field1: [\"new-field1-1\", \"new-field1-2\"]\n }\n }\n }\n ]\n };\n\n const output = GraphQLInputMapper.applyOperations(data, batch);\n\n expect(output).toEqual({\n ...data,\n extensions: {\n field1: [\"new-field1-1\", \"new-field1-2\"]\n }\n });\n });\n\n it(\"should APPEND new data for fields with nullish value\", () => {\n const data: FileItem = {\n ...fileMock,\n extensions: {\n field1: null\n }\n };\n\n const batch: BatchDTO = {\n operations: [\n {\n field: \"extensions.field1\",\n operator: OperatorType.APPEND,\n value: {\n extensions: {\n field1: [\"new-field1-1\", \"new-field1-2\"]\n }\n }\n }\n ]\n };\n\n const output = GraphQLInputMapper.applyOperations(data, batch);\n\n expect(output).toEqual({\n ...data,\n extensions: {\n field1: [\"new-field1-1\", \"new-field1-2\"]\n }\n });\n });\n\n it(\"should return existing data in case of invalid operation\", () => {\n const data: FileItem = {\n ...fileMock,\n extensions: {\n field1: \"old-field1\"\n }\n };\n\n const batch: BatchDTO = {\n operations: [\n {\n field: \"field1\",\n operator: \"ANY-OPERATION\",\n value: {\n extensions: {\n field1: \"new-field1\"\n }\n }\n }\n ]\n };\n\n const output = GraphQLInputMapper.applyOperations(data, batch);\n\n expect(output).toEqual({\n ...data,\n extensions: {\n field1: \"old-field1\"\n }\n });\n });\n});\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import zod from "zod";
|
|
2
|
-
const operationValidationSchema = zod.object({
|
|
3
|
-
field: zod.string().trim().min(1, "Field is required."),
|
|
4
|
-
operator: zod.string().min(1, "Operator is required.")
|
|
5
|
-
});
|
|
6
|
-
export const batchValidationSchema = zod.object({
|
|
7
|
-
operations: zod.array(operationValidationSchema).min(1)
|
|
8
|
-
});
|
|
9
|
-
export class Batch {
|
|
10
|
-
static createEmpty() {
|
|
11
|
-
return new Batch([new Operation()]);
|
|
12
|
-
}
|
|
13
|
-
static validate(data) {
|
|
14
|
-
return batchValidationSchema.safeParse(data);
|
|
15
|
-
}
|
|
16
|
-
constructor(operations) {
|
|
17
|
-
this.operations = operations;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
export class Operation {
|
|
21
|
-
value = undefined;
|
|
22
|
-
constructor(field, operator, value) {
|
|
23
|
-
this.field = field;
|
|
24
|
-
this.operator = operator;
|
|
25
|
-
this.value = value;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
//# sourceMappingURL=Batch.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["zod","operationValidationSchema","object","field","string","trim","min","operator","batchValidationSchema","operations","array","Batch","createEmpty","Operation","validate","data","safeParse","constructor","value","undefined"],"sources":["Batch.ts"],"sourcesContent":["import zod from \"zod\";\n\nexport interface BatchDTO {\n operations: OperationDTO[];\n}\n\nconst operationValidationSchema = zod.object({\n field: zod.string().trim().min(1, \"Field is required.\"),\n operator: zod.string().min(1, \"Operator is required.\")\n});\n\nexport const batchValidationSchema = zod.object({\n operations: zod.array(operationValidationSchema).min(1)\n});\n\nexport class Batch {\n operations: Operation[];\n\n static createEmpty() {\n return new Batch([new Operation()]);\n }\n\n static validate(data: BatchDTO) {\n return batchValidationSchema.safeParse(data);\n }\n\n protected constructor(operations: Operation[]) {\n this.operations = operations;\n }\n}\n\nexport interface OperationDTO {\n field: string;\n operator: string;\n value?: Record<string, any>;\n}\n\nexport class Operation {\n public readonly field?: string;\n public readonly operator?: string;\n public readonly value?: Record<string, any> = undefined;\n\n constructor(field?: string, operator?: string, value?: any) {\n this.field = field;\n this.operator = operator;\n this.value = value;\n }\n}\n"],"mappings":"AAAA,OAAOA,GAAG,MAAM,KAAK;AAMrB,MAAMC,yBAAyB,GAAGD,GAAG,CAACE,MAAM,CAAC;EACzCC,KAAK,EAAEH,GAAG,CAACI,MAAM,CAAC,CAAC,CAACC,IAAI,CAAC,CAAC,CAACC,GAAG,CAAC,CAAC,EAAE,oBAAoB,CAAC;EACvDC,QAAQ,EAAEP,GAAG,CAACI,MAAM,CAAC,CAAC,CAACE,GAAG,CAAC,CAAC,EAAE,uBAAuB;AACzD,CAAC,CAAC;AAEF,OAAO,MAAME,qBAAqB,GAAGR,GAAG,CAACE,MAAM,CAAC;EAC5CO,UAAU,EAAET,GAAG,CAACU,KAAK,CAACT,yBAAyB,CAAC,CAACK,GAAG,CAAC,CAAC;AAC1D,CAAC,CAAC;AAEF,OAAO,MAAMK,KAAK,CAAC;EAGf,OAAOC,WAAWA,CAAA,EAAG;IACjB,OAAO,IAAID,KAAK,CAAC,CAAC,IAAIE,SAAS,CAAC,CAAC,CAAC,CAAC;EACvC;EAEA,OAAOC,QAAQA,CAACC,IAAc,EAAE;IAC5B,OAAOP,qBAAqB,CAACQ,SAAS,CAACD,IAAI,CAAC;EAChD;EAEUE,WAAWA,CAACR,UAAuB,EAAE;IAC3C,IAAI,CAACA,UAAU,GAAGA,UAAU;EAChC;AACJ;AAQA,OAAO,MAAMI,SAAS,CAAC;EAGHK,KAAK,GAAyBC,SAAS;EAEvDF,WAAWA,CAACd,KAAc,EAAEI,QAAiB,EAAEW,KAAW,EAAE;IACxD,IAAI,CAACf,KAAK,GAAGA,KAAK;IAClB,IAAI,CAACI,QAAQ,GAAGA,QAAQ;IACxB,IAAI,CAACW,KAAK,GAAGA,KAAK;EACtB;AACJ","ignoreList":[]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export class BatchMapper {
|
|
2
|
-
static toDTO(input) {
|
|
3
|
-
return {
|
|
4
|
-
operations: input.operations.map(operation => ({
|
|
5
|
-
operator: operation.operator || "",
|
|
6
|
-
field: operation.field || "",
|
|
7
|
-
value: operation.value || undefined
|
|
8
|
-
}))
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
//# sourceMappingURL=BatchMapper.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["BatchMapper","toDTO","input","operations","map","operation","operator","field","value","undefined"],"sources":["BatchMapper.ts"],"sourcesContent":["import type { Batch, BatchDTO } from \"./Batch.js\";\n\nexport class BatchMapper {\n static toDTO(input: Batch): BatchDTO {\n return {\n operations: input.operations.map(operation => ({\n operator: operation.operator || \"\",\n field: operation.field || \"\",\n value: operation.value || undefined\n }))\n };\n }\n}\n"],"mappings":"AAEA,OAAO,MAAMA,WAAW,CAAC;EACrB,OAAOC,KAAKA,CAACC,KAAY,EAAY;IACjC,OAAO;MACHC,UAAU,EAAED,KAAK,CAACC,UAAU,CAACC,GAAG,CAACC,SAAS,KAAK;QAC3CC,QAAQ,EAAED,SAAS,CAACC,QAAQ,IAAI,EAAE;QAClCC,KAAK,EAAEF,SAAS,CAACE,KAAK,IAAI,EAAE;QAC5BC,KAAK,EAAEH,SAAS,CAACG,KAAK,IAAIC;MAC9B,CAAC,CAAC;IACN,CAAC;EACL;AACJ","ignoreList":[]}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
export let OperatorType = /*#__PURE__*/function (OperatorType) {
|
|
2
|
-
OperatorType["OVERRIDE"] = "OVERRIDE";
|
|
3
|
-
OperatorType["APPEND"] = "APPEND";
|
|
4
|
-
OperatorType["REMOVE"] = "REMOVE";
|
|
5
|
-
return OperatorType;
|
|
6
|
-
}({});
|
|
7
|
-
export class Field {
|
|
8
|
-
static createFromRaw(field) {
|
|
9
|
-
const label = field.label;
|
|
10
|
-
const value = field.fieldId;
|
|
11
|
-
const operators = Operator.createFromField(field);
|
|
12
|
-
return new Field(label, value, operators, field);
|
|
13
|
-
}
|
|
14
|
-
constructor(label, value, operators, renderer) {
|
|
15
|
-
this.label = label;
|
|
16
|
-
this.value = value;
|
|
17
|
-
this.operators = operators;
|
|
18
|
-
this.raw = renderer;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
export class Operator {
|
|
22
|
-
static createFrom(rawData) {
|
|
23
|
-
return new Operator(rawData.label, rawData.value);
|
|
24
|
-
}
|
|
25
|
-
static createFromField(field) {
|
|
26
|
-
const operators = [{
|
|
27
|
-
label: "Override existing values",
|
|
28
|
-
value: OperatorType.OVERRIDE
|
|
29
|
-
}, {
|
|
30
|
-
label: "Clear all existing values",
|
|
31
|
-
value: OperatorType.REMOVE
|
|
32
|
-
}];
|
|
33
|
-
if (field.list) {
|
|
34
|
-
operators.push({
|
|
35
|
-
label: "Append to existing values",
|
|
36
|
-
value: OperatorType.APPEND
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
return operators.map(operator => this.createFrom(operator));
|
|
40
|
-
}
|
|
41
|
-
constructor(label, value) {
|
|
42
|
-
this.label = label;
|
|
43
|
-
this.value = value;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
//# sourceMappingURL=Field.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["OperatorType","Field","createFromRaw","field","label","value","fieldId","operators","Operator","createFromField","constructor","renderer","raw","createFrom","rawData","OVERRIDE","REMOVE","list","push","APPEND","map","operator"],"sources":["Field.ts"],"sourcesContent":["import type { CmsModelField } from \"@webiny/app-headless-cms-common/types/model.js\";\n\nexport type FieldRaw = CmsModelField;\n\nexport enum OperatorType {\n OVERRIDE = \"OVERRIDE\",\n APPEND = \"APPEND\",\n REMOVE = \"REMOVE\"\n}\n\nexport interface FieldDTO {\n label: string;\n value: string;\n operators: OperatorDTO[];\n raw: FieldRaw;\n}\n\nexport class Field {\n public readonly label: string;\n public readonly value: string;\n public readonly operators: Operator[];\n public readonly raw: FieldRaw;\n\n static createFromRaw(field: FieldRaw) {\n const label = field.label;\n const value = field.fieldId;\n const operators = Operator.createFromField(field);\n return new Field(label, value, operators, field);\n }\n\n private constructor(label: string, value: string, operators: Operator[], renderer: FieldRaw) {\n this.label = label;\n this.value = value;\n this.operators = operators;\n this.raw = renderer;\n }\n}\n\nexport interface OperatorDTO {\n label: string;\n value: string;\n}\n\nexport class Operator {\n public readonly label: string;\n public readonly value: string;\n\n static createFrom(rawData: OperatorDTO) {\n return new Operator(rawData.label, rawData.value);\n }\n\n static createFromField(field: CmsModelField) {\n const operators = [\n {\n label: \"Override existing values\",\n value: OperatorType.OVERRIDE\n },\n {\n label: \"Clear all existing values\",\n value: OperatorType.REMOVE\n }\n ];\n\n if (field.list) {\n operators.push({\n label: \"Append to existing values\",\n value: OperatorType.APPEND\n });\n }\n\n return operators.map(operator => this.createFrom(operator));\n }\n\n private constructor(label: string, value: string) {\n this.label = label;\n this.value = value;\n }\n}\n"],"mappings":"AAIA,WAAYA,YAAY,0BAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA;AAaxB,OAAO,MAAMC,KAAK,CAAC;EAMf,OAAOC,aAAaA,CAACC,KAAe,EAAE;IAClC,MAAMC,KAAK,GAAGD,KAAK,CAACC,KAAK;IACzB,MAAMC,KAAK,GAAGF,KAAK,CAACG,OAAO;IAC3B,MAAMC,SAAS,GAAGC,QAAQ,CAACC,eAAe,CAACN,KAAK,CAAC;IACjD,OAAO,IAAIF,KAAK,CAACG,KAAK,EAAEC,KAAK,EAAEE,SAAS,EAAEJ,KAAK,CAAC;EACpD;EAEQO,WAAWA,CAACN,KAAa,EAAEC,KAAa,EAAEE,SAAqB,EAAEI,QAAkB,EAAE;IACzF,IAAI,CAACP,KAAK,GAAGA,KAAK;IAClB,IAAI,CAACC,KAAK,GAAGA,KAAK;IAClB,IAAI,CAACE,SAAS,GAAGA,SAAS;IAC1B,IAAI,CAACK,GAAG,GAAGD,QAAQ;EACvB;AACJ;AAOA,OAAO,MAAMH,QAAQ,CAAC;EAIlB,OAAOK,UAAUA,CAACC,OAAoB,EAAE;IACpC,OAAO,IAAIN,QAAQ,CAACM,OAAO,CAACV,KAAK,EAAEU,OAAO,CAACT,KAAK,CAAC;EACrD;EAEA,OAAOI,eAAeA,CAACN,KAAoB,EAAE;IACzC,MAAMI,SAAS,GAAG,CACd;MACIH,KAAK,EAAE,0BAA0B;MACjCC,KAAK,EAAEL,YAAY,CAACe;IACxB,CAAC,EACD;MACIX,KAAK,EAAE,2BAA2B;MAClCC,KAAK,EAAEL,YAAY,CAACgB;IACxB,CAAC,CACJ;IAED,IAAIb,KAAK,CAACc,IAAI,EAAE;MACZV,SAAS,CAACW,IAAI,CAAC;QACXd,KAAK,EAAE,2BAA2B;QAClCC,KAAK,EAAEL,YAAY,CAACmB;MACxB,CAAC,CAAC;IACN;IAEA,OAAOZ,SAAS,CAACa,GAAG,CAACC,QAAQ,IAAI,IAAI,CAACR,UAAU,CAACQ,QAAQ,CAAC,CAAC;EAC/D;EAEQX,WAAWA,CAACN,KAAa,EAAEC,KAAa,EAAE;IAC9C,IAAI,CAACD,KAAK,GAAGA,KAAK;IAClB,IAAI,CAACC,KAAK,GAAGA,KAAK;EACtB;AACJ","ignoreList":[]}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export class FieldMapper {
|
|
2
|
-
static toDTO(configuration) {
|
|
3
|
-
return configuration.map(field => {
|
|
4
|
-
return {
|
|
5
|
-
label: field.label,
|
|
6
|
-
value: field.value,
|
|
7
|
-
operators: OperatorMapper.toDTO(field.operators),
|
|
8
|
-
raw: field.raw
|
|
9
|
-
};
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
export class OperatorMapper {
|
|
14
|
-
static toDTO(operators) {
|
|
15
|
-
return operators.map(operator => ({
|
|
16
|
-
value: operator.value || "",
|
|
17
|
-
label: operator.label || ""
|
|
18
|
-
}));
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
//# sourceMappingURL=FieldMapper.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["FieldMapper","toDTO","configuration","map","field","label","value","operators","OperatorMapper","raw","operator"],"sources":["FieldMapper.ts"],"sourcesContent":["import type { Field, FieldDTO, Operator, OperatorDTO } from \"./Field.js\";\n\nexport class FieldMapper {\n static toDTO(configuration: Field[]): FieldDTO[] {\n return configuration.map(field => {\n return {\n label: field.label,\n value: field.value,\n operators: OperatorMapper.toDTO(field.operators),\n raw: field.raw\n };\n });\n }\n}\n\nexport class OperatorMapper {\n static toDTO(operators: Operator[]): OperatorDTO[] {\n return operators.map(operator => ({\n value: operator.value || \"\",\n label: operator.label || \"\"\n }));\n }\n}\n"],"mappings":"AAEA,OAAO,MAAMA,WAAW,CAAC;EACrB,OAAOC,KAAKA,CAACC,aAAsB,EAAc;IAC7C,OAAOA,aAAa,CAACC,GAAG,CAACC,KAAK,IAAI;MAC9B,OAAO;QACHC,KAAK,EAAED,KAAK,CAACC,KAAK;QAClBC,KAAK,EAAEF,KAAK,CAACE,KAAK;QAClBC,SAAS,EAAEC,cAAc,CAACP,KAAK,CAACG,KAAK,CAACG,SAAS,CAAC;QAChDE,GAAG,EAAEL,KAAK,CAACK;MACf,CAAC;IACL,CAAC,CAAC;EACN;AACJ;AAEA,OAAO,MAAMD,cAAc,CAAC;EACxB,OAAOP,KAAKA,CAACM,SAAqB,EAAiB;IAC/C,OAAOA,SAAS,CAACJ,GAAG,CAACO,QAAQ,KAAK;MAC9BJ,KAAK,EAAEI,QAAQ,CAACJ,KAAK,IAAI,EAAE;MAC3BD,KAAK,EAAEK,QAAQ,CAACL,KAAK,IAAI;IAC7B,CAAC,CAAC,CAAC;EACP;AACJ","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Batch.js\";\nexport * from \"./BatchMapper.js\";\nexport * from \"./Field.js\";\nexport * from \"./FieldMapper.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./ActionEdit.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.tsx"],"sourcesContent":["export * from \"./ActionEdit.js\";\n"],"mappings":"AAAA","ignoreList":[]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { CmsModelField } from "@webiny/app-headless-cms-common/types/index.js";
|
|
2
|
-
import type { BatchDTO } from "../../../components/BulkActions/ActionEdit/domain/index.js";
|
|
3
|
-
export declare function useActionEditWorker(fields: CmsModelField[]): {
|
|
4
|
-
filesLabel: string;
|
|
5
|
-
canEditAll: boolean;
|
|
6
|
-
openWorkerDialog: (batch: BatchDTO) => void;
|
|
7
|
-
};
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { useMemo } from "react";
|
|
2
|
-
import omit from "lodash/omit.js";
|
|
3
|
-
import { prepareFormData } from "@webiny/app-headless-cms-common";
|
|
4
|
-
import { GraphQLInputMapper } from "./GraphQLInputMapper.js";
|
|
5
|
-
import { useFileManagerView } from "../../../modules/FileManagerRenderer/FileManagerViewProvider/index.js";
|
|
6
|
-
import { getFilesLabel } from "../index.js";
|
|
7
|
-
import { useFileManagerApi } from "../../../modules/FileManagerApiProvider/FileManagerApiContext/index.js";
|
|
8
|
-
import { FileManagerViewConfig } from "../../../modules/FileManagerRenderer/FileManagerView/FileManagerViewConfig.js";
|
|
9
|
-
const {
|
|
10
|
-
useWorker,
|
|
11
|
-
useDialog: useBulkActionDialog
|
|
12
|
-
} = FileManagerViewConfig.Browser.BulkAction;
|
|
13
|
-
export function useActionEditWorker(fields) {
|
|
14
|
-
const {
|
|
15
|
-
updateFile
|
|
16
|
-
} = useFileManagerView();
|
|
17
|
-
const {
|
|
18
|
-
showConfirmationDialog,
|
|
19
|
-
showResultsDialog
|
|
20
|
-
} = useBulkActionDialog();
|
|
21
|
-
const worker = useWorker();
|
|
22
|
-
const {
|
|
23
|
-
canEdit
|
|
24
|
-
} = useFileManagerApi();
|
|
25
|
-
const filesLabel = useMemo(() => {
|
|
26
|
-
return getFilesLabel(worker.items.length);
|
|
27
|
-
}, [worker.items.length]);
|
|
28
|
-
const canEditAll = useMemo(() => {
|
|
29
|
-
return worker.items.every(item => canEdit(item));
|
|
30
|
-
}, [worker.items]);
|
|
31
|
-
const openWorkerDialog = batch => {
|
|
32
|
-
showConfirmationDialog({
|
|
33
|
-
title: "Edit files",
|
|
34
|
-
message: `You are about to edit ${filesLabel}. Are you sure you want to continue?`,
|
|
35
|
-
loadingLabel: `Processing ${filesLabel}`,
|
|
36
|
-
execute: async () => {
|
|
37
|
-
await worker.processInSeries(async ({
|
|
38
|
-
item,
|
|
39
|
-
report
|
|
40
|
-
}) => {
|
|
41
|
-
try {
|
|
42
|
-
const modifiedFileData = GraphQLInputMapper.applyOperations(item, batch);
|
|
43
|
-
const output = omit(modifiedFileData, ["id", "createdBy", "createdOn", "src"]);
|
|
44
|
-
const fileData = prepareFormData(output, fields);
|
|
45
|
-
await updateFile(item.id, fileData);
|
|
46
|
-
report.success({
|
|
47
|
-
title: `${item.name}`,
|
|
48
|
-
message: "File successfully edited."
|
|
49
|
-
});
|
|
50
|
-
} catch (e) {
|
|
51
|
-
report.error({
|
|
52
|
-
title: `${item.name}`,
|
|
53
|
-
message: e.message
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
worker.resetItems();
|
|
58
|
-
showResultsDialog({
|
|
59
|
-
results: worker.results,
|
|
60
|
-
title: "Edit files",
|
|
61
|
-
message: "Finished editing files! See full report below:"
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
};
|
|
66
|
-
return {
|
|
67
|
-
filesLabel,
|
|
68
|
-
canEditAll,
|
|
69
|
-
openWorkerDialog
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
//# sourceMappingURL=useActionEditWorker.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["useMemo","omit","prepareFormData","GraphQLInputMapper","useFileManagerView","getFilesLabel","useFileManagerApi","FileManagerViewConfig","useWorker","useDialog","useBulkActionDialog","Browser","BulkAction","useActionEditWorker","fields","updateFile","showConfirmationDialog","showResultsDialog","worker","canEdit","filesLabel","items","length","canEditAll","every","item","openWorkerDialog","batch","title","message","loadingLabel","execute","processInSeries","report","modifiedFileData","applyOperations","output","fileData","id","success","name","e","error","resetItems","results"],"sources":["useActionEditWorker.ts"],"sourcesContent":["import { useMemo } from \"react\";\nimport omit from \"lodash/omit.js\";\nimport type { FileItem } from \"~/types.js\";\nimport { prepareFormData } from \"@webiny/app-headless-cms-common\";\nimport type { CmsModelField } from \"@webiny/app-headless-cms-common/types/index.js\";\nimport type { BatchDTO } from \"~/components/BulkActions/ActionEdit/domain/index.js\";\nimport { GraphQLInputMapper } from \"~/components/BulkActions/ActionEdit/GraphQLInputMapper.js\";\nimport { useFileManagerView } from \"~/modules/FileManagerRenderer/FileManagerViewProvider/index.js\";\nimport { getFilesLabel } from \"~/components/BulkActions/index.js\";\nimport { useFileManagerApi } from \"~/modules/FileManagerApiProvider/FileManagerApiContext/index.js\";\nimport { FileManagerViewConfig } from \"~/modules/FileManagerRenderer/FileManagerView/FileManagerViewConfig.js\";\n\nconst { useWorker, useDialog: useBulkActionDialog } = FileManagerViewConfig.Browser.BulkAction;\n\nexport function useActionEditWorker(fields: CmsModelField[]) {\n const { updateFile } = useFileManagerView();\n const { showConfirmationDialog, showResultsDialog } = useBulkActionDialog();\n const worker = useWorker();\n const { canEdit } = useFileManagerApi();\n\n const filesLabel = useMemo(() => {\n return getFilesLabel(worker.items.length);\n }, [worker.items.length]);\n\n const canEditAll = useMemo(() => {\n return worker.items.every(item => canEdit(item));\n }, [worker.items]);\n\n const openWorkerDialog = (batch: BatchDTO) => {\n showConfirmationDialog({\n title: \"Edit files\",\n message: `You are about to edit ${filesLabel}. Are you sure you want to continue?`,\n loadingLabel: `Processing ${filesLabel}`,\n execute: async () => {\n await worker.processInSeries(async ({ item, report }) => {\n try {\n const modifiedFileData = GraphQLInputMapper.applyOperations(\n item,\n batch\n ) as FileItem;\n\n const output = omit(modifiedFileData, [\n \"id\",\n \"createdBy\",\n \"createdOn\",\n \"src\"\n ]);\n\n const fileData = prepareFormData(output, fields);\n\n await updateFile(item.id, fileData);\n\n report.success({\n title: `${item.name}`,\n message: \"File successfully edited.\"\n });\n } catch (e) {\n report.error({\n title: `${item.name}`,\n message: e.message\n });\n }\n });\n\n worker.resetItems();\n\n showResultsDialog({\n results: worker.results,\n title: \"Edit files\",\n message: \"Finished editing files! See full report below:\"\n });\n }\n });\n };\n\n return { filesLabel, canEditAll, openWorkerDialog };\n}\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,OAAO;AAC/B,OAAOC,IAAI,MAAM,gBAAgB;AAEjC,SAASC,eAAe,QAAQ,iCAAiC;AAGjE,SAASC,kBAAkB;AAC3B,SAASC,kBAAkB;AAC3B,SAASC,aAAa;AACtB,SAASC,iBAAiB;AAC1B,SAASC,qBAAqB;AAE9B,MAAM;EAAEC,SAAS;EAAEC,SAAS,EAAEC;AAAoB,CAAC,GAAGH,qBAAqB,CAACI,OAAO,CAACC,UAAU;AAE9F,OAAO,SAASC,mBAAmBA,CAACC,MAAuB,EAAE;EACzD,MAAM;IAAEC;EAAW,CAAC,GAAGX,kBAAkB,CAAC,CAAC;EAC3C,MAAM;IAAEY,sBAAsB;IAAEC;EAAkB,CAAC,GAAGP,mBAAmB,CAAC,CAAC;EAC3E,MAAMQ,MAAM,GAAGV,SAAS,CAAC,CAAC;EAC1B,MAAM;IAAEW;EAAQ,CAAC,GAAGb,iBAAiB,CAAC,CAAC;EAEvC,MAAMc,UAAU,GAAGpB,OAAO,CAAC,MAAM;IAC7B,OAAOK,aAAa,CAACa,MAAM,CAACG,KAAK,CAACC,MAAM,CAAC;EAC7C,CAAC,EAAE,CAACJ,MAAM,CAACG,KAAK,CAACC,MAAM,CAAC,CAAC;EAEzB,MAAMC,UAAU,GAAGvB,OAAO,CAAC,MAAM;IAC7B,OAAOkB,MAAM,CAACG,KAAK,CAACG,KAAK,CAACC,IAAI,IAAIN,OAAO,CAACM,IAAI,CAAC,CAAC;EACpD,CAAC,EAAE,CAACP,MAAM,CAACG,KAAK,CAAC,CAAC;EAElB,MAAMK,gBAAgB,GAAIC,KAAe,IAAK;IAC1CX,sBAAsB,CAAC;MACnBY,KAAK,EAAE,YAAY;MACnBC,OAAO,EAAE,yBAAyBT,UAAU,sCAAsC;MAClFU,YAAY,EAAE,cAAcV,UAAU,EAAE;MACxCW,OAAO,EAAE,MAAAA,CAAA,KAAY;QACjB,MAAMb,MAAM,CAACc,eAAe,CAAC,OAAO;UAAEP,IAAI;UAAEQ;QAAO,CAAC,KAAK;UACrD,IAAI;YACA,MAAMC,gBAAgB,GAAG/B,kBAAkB,CAACgC,eAAe,CACvDV,IAAI,EACJE,KACJ,CAAa;YAEb,MAAMS,MAAM,GAAGnC,IAAI,CAACiC,gBAAgB,EAAE,CAClC,IAAI,EACJ,WAAW,EACX,WAAW,EACX,KAAK,CACR,CAAC;YAEF,MAAMG,QAAQ,GAAGnC,eAAe,CAACkC,MAAM,EAAEtB,MAAM,CAAC;YAEhD,MAAMC,UAAU,CAACU,IAAI,CAACa,EAAE,EAAED,QAAQ,CAAC;YAEnCJ,MAAM,CAACM,OAAO,CAAC;cACXX,KAAK,EAAE,GAAGH,IAAI,CAACe,IAAI,EAAE;cACrBX,OAAO,EAAE;YACb,CAAC,CAAC;UACN,CAAC,CAAC,OAAOY,CAAC,EAAE;YACRR,MAAM,CAACS,KAAK,CAAC;cACTd,KAAK,EAAE,GAAGH,IAAI,CAACe,IAAI,EAAE;cACrBX,OAAO,EAAEY,CAAC,CAACZ;YACf,CAAC,CAAC;UACN;QACJ,CAAC,CAAC;QAEFX,MAAM,CAACyB,UAAU,CAAC,CAAC;QAEnB1B,iBAAiB,CAAC;UACd2B,OAAO,EAAE1B,MAAM,CAAC0B,OAAO;UACvBhB,KAAK,EAAE,YAAY;UACnBC,OAAO,EAAE;QACb,CAAC,CAAC;MACN;IACJ,CAAC,CAAC;EACN,CAAC;EAED,OAAO;IAAET,UAAU;IAAEG,UAAU;IAAEG;EAAiB,CAAC;AACvD","ignoreList":[]}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import React, { useCallback, useMemo } from "react";
|
|
2
|
-
import { ReactComponent as MoveIcon } from "@webiny/icons/exit_to_app.svg";
|
|
3
|
-
import { observer } from "mobx-react-lite";
|
|
4
|
-
import { useMoveToFolderDialog, useNavigateFolder } from "@webiny/app-aco";
|
|
5
|
-
import { useFileManagerView } from "../../modules/FileManagerRenderer/FileManagerViewProvider/index.js";
|
|
6
|
-
import { FileManagerViewConfig } from "../../modules/FileManagerRenderer/FileManagerView/FileManagerViewConfig.js";
|
|
7
|
-
import { getFilesLabel } from "./BulkActions.js";
|
|
8
|
-
import { ROOT_FOLDER } from "../../constants.js";
|
|
9
|
-
import { Tooltip } from "@webiny/admin-ui";
|
|
10
|
-
export const ActionMove = observer(() => {
|
|
11
|
-
const {
|
|
12
|
-
moveFileToFolder
|
|
13
|
-
} = useFileManagerView();
|
|
14
|
-
const {
|
|
15
|
-
currentFolderId
|
|
16
|
-
} = useNavigateFolder();
|
|
17
|
-
const {
|
|
18
|
-
useWorker,
|
|
19
|
-
useButtons,
|
|
20
|
-
useDialog
|
|
21
|
-
} = FileManagerViewConfig.Browser.BulkAction;
|
|
22
|
-
const {
|
|
23
|
-
ButtonDefault
|
|
24
|
-
} = useButtons();
|
|
25
|
-
const worker = useWorker();
|
|
26
|
-
const {
|
|
27
|
-
showConfirmationDialog,
|
|
28
|
-
showResultsDialog
|
|
29
|
-
} = useDialog();
|
|
30
|
-
const {
|
|
31
|
-
showDialog: showMoveDialog
|
|
32
|
-
} = useMoveToFolderDialog();
|
|
33
|
-
const filesLabel = useMemo(() => {
|
|
34
|
-
return getFilesLabel(worker.items.length);
|
|
35
|
-
}, [worker.items.length]);
|
|
36
|
-
const openWorkerDialog = useCallback(folder => {
|
|
37
|
-
showConfirmationDialog({
|
|
38
|
-
title: "Move files",
|
|
39
|
-
message: `You are about to move ${filesLabel} to ${folder.label}. Are you sure you want to continue?`,
|
|
40
|
-
loadingLabel: `Processing ${filesLabel}`,
|
|
41
|
-
execute: async () => {
|
|
42
|
-
await worker.processInSeries(async ({
|
|
43
|
-
item,
|
|
44
|
-
report
|
|
45
|
-
}) => {
|
|
46
|
-
try {
|
|
47
|
-
await moveFileToFolder(item.id, folder.id);
|
|
48
|
-
report.success({
|
|
49
|
-
title: `${item.name}`,
|
|
50
|
-
message: "File successfully moved."
|
|
51
|
-
});
|
|
52
|
-
} catch (e) {
|
|
53
|
-
report.error({
|
|
54
|
-
title: `${item.name}`,
|
|
55
|
-
message: e.message
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
worker.resetItems();
|
|
60
|
-
showResultsDialog({
|
|
61
|
-
results: worker.results,
|
|
62
|
-
title: "Move files",
|
|
63
|
-
message: "Finished moving files! See full report below:"
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
}, [filesLabel]);
|
|
68
|
-
const openMoveDialog = () => showMoveDialog({
|
|
69
|
-
title: "Select folder",
|
|
70
|
-
message: "Select a new location for selected files:",
|
|
71
|
-
loadingLabel: `Processing ${filesLabel}`,
|
|
72
|
-
acceptLabel: `Move`,
|
|
73
|
-
focusedFolderId: currentFolderId || ROOT_FOLDER,
|
|
74
|
-
async onAccept({
|
|
75
|
-
folder
|
|
76
|
-
}) {
|
|
77
|
-
openWorkerDialog(folder);
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
81
|
-
side: "bottom",
|
|
82
|
-
content: `Move ${filesLabel}`,
|
|
83
|
-
trigger: /*#__PURE__*/React.createElement(ButtonDefault, {
|
|
84
|
-
icon: /*#__PURE__*/React.createElement(MoveIcon, null),
|
|
85
|
-
onAction: openMoveDialog,
|
|
86
|
-
size: "sm"
|
|
87
|
-
}, `Move`)
|
|
88
|
-
});
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
//# sourceMappingURL=ActionMove.js.map
|