@webiny/app-file-manager 5.43.3 → 6.0.0-alpha.1
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/BatchFileUploader.d.ts +2 -2
- package/BatchFileUploader.js +75 -112
- package/BatchFileUploader.js.map +1 -1
- package/app.js +8 -15
- package/app.js.map +1 -1
- package/components/BottomInfoBar/BottomInfoBar.d.ts +2 -2
- package/components/BottomInfoBar/BottomInfoBar.js +14 -17
- package/components/BottomInfoBar/BottomInfoBar.js.map +1 -1
- package/components/BottomInfoBar/ListStatus.js +17 -21
- package/components/BottomInfoBar/ListStatus.js.map +1 -1
- package/components/BottomInfoBar/SupportedFileTypes.js +31 -32
- package/components/BottomInfoBar/SupportedFileTypes.js.map +1 -1
- package/components/BottomInfoBar/index.js +1 -16
- package/components/BottomInfoBar/index.js.map +1 -1
- package/components/BulkActions/ActionDelete.js +70 -71
- package/components/BulkActions/ActionDelete.js.map +1 -1
- package/components/BulkActions/ActionEdit/ActionEdit.js +38 -45
- package/components/BulkActions/ActionEdit/ActionEdit.js.map +1 -1
- package/components/BulkActions/ActionEdit/ActionEdit.types.d.ts +1 -1
- package/components/BulkActions/ActionEdit/ActionEdit.types.js +1 -5
- package/components/BulkActions/ActionEdit/ActionEdit.types.js.map +1 -1
- package/components/BulkActions/ActionEdit/ActionEditPresenter.d.ts +1 -1
- package/components/BulkActions/ActionEdit/ActionEditPresenter.js +45 -80
- package/components/BulkActions/ActionEdit/ActionEditPresenter.js.map +1 -1
- package/components/BulkActions/ActionEdit/ActionEditPresenter.test.js +11 -15
- package/components/BulkActions/ActionEdit/ActionEditPresenter.test.js.map +1 -1
- package/components/BulkActions/ActionEdit/BatchEditorDialog/AddOperation.js +15 -18
- package/components/BulkActions/ActionEdit/BatchEditorDialog/AddOperation.js.map +1 -1
- package/components/BulkActions/ActionEdit/BatchEditorDialog/BatchEditor.d.ts +2 -2
- package/components/BulkActions/ActionEdit/BatchEditorDialog/BatchEditor.js +34 -54
- package/components/BulkActions/ActionEdit/BatchEditorDialog/BatchEditor.js.map +1 -1
- package/components/BulkActions/ActionEdit/BatchEditorDialog/BatchEditorDialog.d.ts +1 -1
- package/components/BulkActions/ActionEdit/BatchEditorDialog/BatchEditorDialog.js +34 -46
- package/components/BulkActions/ActionEdit/BatchEditorDialog/BatchEditorDialog.js.map +1 -1
- package/components/BulkActions/ActionEdit/BatchEditorDialog/BatchEditorDialogPresenter.d.ts +1 -1
- package/components/BulkActions/ActionEdit/BatchEditorDialog/BatchEditorDialogPresenter.js +125 -173
- package/components/BulkActions/ActionEdit/BatchEditorDialog/BatchEditorDialogPresenter.js.map +1 -1
- package/components/BulkActions/ActionEdit/BatchEditorDialog/BatchEditorDialogPresenter.test.js +56 -48
- package/components/BulkActions/ActionEdit/BatchEditorDialog/BatchEditorDialogPresenter.test.js.map +1 -1
- package/components/BulkActions/ActionEdit/BatchEditorDialog/FieldRenderer.d.ts +1 -1
- package/components/BulkActions/ActionEdit/BatchEditorDialog/FieldRenderer.js +20 -28
- package/components/BulkActions/ActionEdit/BatchEditorDialog/FieldRenderer.js.map +1 -1
- package/components/BulkActions/ActionEdit/BatchEditorDialog/Operation.d.ts +1 -1
- package/components/BulkActions/ActionEdit/BatchEditorDialog/Operation.js +34 -46
- package/components/BulkActions/ActionEdit/BatchEditorDialog/Operation.js.map +1 -1
- package/components/BulkActions/ActionEdit/BatchEditorDialog/index.js +1 -16
- package/components/BulkActions/ActionEdit/BatchEditorDialog/index.js.map +1 -1
- package/components/BulkActions/ActionEdit/GraphQLInputMapper.d.ts +2 -2
- package/components/BulkActions/ActionEdit/GraphQLInputMapper.js +41 -51
- package/components/BulkActions/ActionEdit/GraphQLInputMapper.js.map +1 -1
- package/components/BulkActions/ActionEdit/GraphQLInputMapper.test.js +88 -75
- package/components/BulkActions/ActionEdit/GraphQLInputMapper.test.js.map +1 -1
- package/components/BulkActions/ActionEdit/domain/Batch.js +23 -38
- package/components/BulkActions/ActionEdit/domain/Batch.js.map +1 -1
- package/components/BulkActions/ActionEdit/domain/BatchMapper.d.ts +1 -1
- package/components/BulkActions/ActionEdit/domain/BatchMapper.js +10 -27
- package/components/BulkActions/ActionEdit/domain/BatchMapper.js.map +1 -1
- package/components/BulkActions/ActionEdit/domain/Field.d.ts +1 -1
- package/components/BulkActions/ActionEdit/domain/Field.js +31 -53
- package/components/BulkActions/ActionEdit/domain/Field.js.map +1 -1
- package/components/BulkActions/ActionEdit/domain/FieldMapper.d.ts +1 -1
- package/components/BulkActions/ActionEdit/domain/FieldMapper.js +18 -41
- package/components/BulkActions/ActionEdit/domain/FieldMapper.js.map +1 -1
- package/components/BulkActions/ActionEdit/domain/index.js +4 -49
- package/components/BulkActions/ActionEdit/domain/index.js.map +1 -1
- package/components/BulkActions/ActionEdit/index.js +1 -16
- package/components/BulkActions/ActionEdit/index.js.map +1 -1
- package/components/BulkActions/ActionEdit/useActionEditWorker.d.ts +2 -2
- package/components/BulkActions/ActionEdit/useActionEditWorker.js +44 -48
- package/components/BulkActions/ActionEdit/useActionEditWorker.js.map +1 -1
- package/components/BulkActions/ActionMove.js +64 -61
- package/components/BulkActions/ActionMove.js.map +1 -1
- package/components/BulkActions/BulkActions.js +35 -38
- package/components/BulkActions/BulkActions.js.map +1 -1
- package/components/BulkActions/index.js +4 -43
- package/components/BulkActions/index.js.map +1 -1
- package/components/EditFileUsingUrl/EditFileUsingUrl.d.ts +1 -1
- package/components/EditFileUsingUrl/EditFileUsingUrl.js +31 -43
- package/components/EditFileUsingUrl/EditFileUsingUrl.js.map +1 -1
- package/components/EditFileUsingUrl/EditFileUsingUrlPresenter.d.ts +2 -2
- package/components/EditFileUsingUrl/EditFileUsingUrlPresenter.js +39 -49
- package/components/EditFileUsingUrl/EditFileUsingUrlPresenter.js.map +1 -1
- package/components/EditFileUsingUrl/EditFileUsingUrlRepository.d.ts +1 -1
- package/components/EditFileUsingUrl/EditFileUsingUrlRepository.js +32 -49
- package/components/EditFileUsingUrl/EditFileUsingUrlRepository.js.map +1 -1
- package/components/EditFileUsingUrl/GetFileByUrl.d.ts +4 -4
- package/components/EditFileUsingUrl/GetFileByUrl.js +22 -34
- package/components/EditFileUsingUrl/GetFileByUrl.js.map +1 -1
- package/components/EditFileUsingUrl/Loading.js +30 -53
- package/components/EditFileUsingUrl/Loading.js.map +1 -1
- package/components/EditFileUsingUrl/UpdateFile.d.ts +3 -3
- package/components/EditFileUsingUrl/UpdateFile.js +6 -19
- package/components/EditFileUsingUrl/UpdateFile.js.map +1 -1
- package/components/EditFileUsingUrl/getFileByUrl.graphql.d.ts +1 -1
- package/components/EditFileUsingUrl/getFileByUrl.graphql.js +16 -13
- package/components/EditFileUsingUrl/getFileByUrl.graphql.js.map +1 -1
- package/components/EditFileUsingUrl/index.js +1 -16
- package/components/EditFileUsingUrl/index.js.map +1 -1
- package/components/Empty/Empty.d.ts +1 -1
- package/components/Empty/Empty.js +18 -23
- package/components/Empty/Empty.js.map +1 -1
- package/components/Empty/index.js +1 -16
- package/components/Empty/index.js.map +1 -1
- package/components/FileDetails/FileDetails.d.ts +1 -1
- package/components/FileDetails/FileDetails.js +120 -131
- package/components/FileDetails/FileDetails.js.map +1 -1
- package/components/FileDetails/FileDetailsProvider.d.ts +1 -1
- package/components/FileDetails/FileDetailsProvider.js +11 -17
- package/components/FileDetails/FileDetailsProvider.js.map +1 -1
- package/components/FileDetails/components/ActionButton.d.ts +2 -1
- package/components/FileDetails/components/ActionButton.js +17 -24
- package/components/FileDetails/components/ActionButton.js.map +1 -1
- package/components/FileDetails/components/Actions.js +11 -34
- package/components/FileDetails/components/Actions.js.map +1 -1
- package/components/FileDetails/components/BaseFields.d.ts +1 -1
- package/components/FileDetails/components/BaseFields.js +14 -22
- package/components/FileDetails/components/BaseFields.js.map +1 -1
- package/components/FileDetails/components/Content.d.ts +2 -1
- package/components/FileDetails/components/Content.js +28 -41
- package/components/FileDetails/components/Content.js.map +1 -1
- package/components/FileDetails/components/CreatedOn.js +19 -52
- package/components/FileDetails/components/CreatedOn.js.map +1 -1
- package/components/FileDetails/components/Description.d.ts +2 -0
- package/components/FileDetails/components/Description.js +23 -0
- package/components/FileDetails/components/Description.js.map +1 -0
- package/components/FileDetails/components/Extensions.d.ts +1 -1
- package/components/FileDetails/components/Extensions.js +19 -47
- package/components/FileDetails/components/Extensions.js.map +1 -1
- package/components/FileDetails/components/Preview.js +9 -27
- package/components/FileDetails/components/Preview.js.map +1 -1
- package/components/FileDetails/components/Thumbnail.js +13 -18
- package/components/FileDetails/components/Thumbnail.js.map +1 -1
- package/components/FileDetails/index.js +1 -16
- package/components/FileDetails/index.js.map +1 -1
- package/components/FileDropArea/FileDropArea.d.ts +9 -0
- package/components/FileDropArea/FileDropArea.js +69 -0
- package/components/FileDropArea/FileDropArea.js.map +1 -0
- package/components/FileDropArea/index.d.ts +1 -0
- package/components/FileDropArea/index.js +3 -0
- package/components/FileDropArea/index.js.map +1 -0
- package/components/FileDropPlaceholder/FileDropPlaceholder.d.ts +2 -0
- package/components/FileDropPlaceholder/FileDropPlaceholder.js +12 -0
- package/components/FileDropPlaceholder/FileDropPlaceholder.js.map +1 -0
- package/components/FileDropPlaceholder/index.d.ts +1 -0
- package/components/FileDropPlaceholder/index.js +3 -0
- package/components/FileDropPlaceholder/index.js.map +1 -0
- package/components/Filters/Filters.js +26 -0
- package/components/Filters/Filters.js.map +1 -0
- package/components/Filters/index.d.ts +1 -0
- package/components/Filters/index.js +3 -0
- package/components/Filters/index.js.map +1 -0
- package/components/Grid/ActionButton.d.ts +2 -1
- package/components/Grid/ActionButton.js +24 -21
- package/components/Grid/ActionButton.js.map +1 -1
- package/components/Grid/File.d.ts +2 -1
- package/components/Grid/File.js +74 -60
- package/components/Grid/File.js.map +1 -1
- package/components/Grid/Grid.d.ts +4 -3
- package/components/Grid/Grid.js +58 -67
- package/components/Grid/Grid.js.map +1 -1
- package/components/Grid/Thumbnail.js +13 -18
- package/components/Grid/Thumbnail.js.map +1 -1
- package/components/Grid/index.js +1 -16
- package/components/Grid/index.js.map +1 -1
- package/components/Header/Actions.d.ts +5 -0
- package/components/Header/Actions.js +99 -0
- package/components/Header/Actions.js.map +1 -0
- package/components/Header/Header.d.ts +9 -0
- package/components/Header/Header.js +17 -0
- package/components/Header/Header.js.map +1 -0
- package/components/Header/Title.d.ts +2 -0
- package/components/Header/Title.js +62 -0
- package/components/Header/Title.js.map +1 -0
- package/components/Header/index.d.ts +1 -0
- package/components/Header/index.js +3 -0
- package/components/Header/index.js.map +1 -0
- package/components/ImageEditor/ImageEditor.d.ts +45 -0
- package/components/ImageEditor/ImageEditor.js +218 -0
- package/components/ImageEditor/ImageEditor.js.map +1 -0
- package/components/ImageEditor/ImageEditorDialog.d.ts +16 -0
- package/components/ImageEditor/ImageEditorDialog.js +53 -0
- package/components/ImageEditor/ImageEditorDialog.js.map +1 -0
- package/components/ImageEditor/index.d.ts +1 -0
- package/components/ImageEditor/index.js +3 -0
- package/components/ImageEditor/index.js.map +1 -0
- package/components/ImageEditor/toolbar/crop.d.ts +4 -0
- package/components/ImageEditor/toolbar/crop.js +67 -0
- package/components/ImageEditor/toolbar/crop.js.map +1 -0
- package/components/ImageEditor/toolbar/filter.d.ts +3 -0
- package/components/ImageEditor/toolbar/filter.js +167 -0
- package/components/ImageEditor/toolbar/filter.js.map +1 -0
- package/components/ImageEditor/toolbar/flip.d.ts +4 -0
- package/components/ImageEditor/toolbar/flip.js +94 -0
- package/components/ImageEditor/toolbar/flip.js.map +1 -0
- package/components/ImageEditor/toolbar/index.d.ts +4 -0
- package/components/ImageEditor/toolbar/index.js +6 -0
- package/components/ImageEditor/toolbar/index.js.map +1 -0
- package/components/ImageEditor/toolbar/rotate.d.ts +4 -0
- package/components/ImageEditor/toolbar/rotate.js +93 -0
- package/components/ImageEditor/toolbar/rotate.js.map +1 -0
- package/components/ImageEditor/toolbar/types.d.ts +32 -0
- package/components/ImageEditor/toolbar/types.js +3 -0
- package/components/ImageEditor/toolbar/types.js.map +1 -0
- package/components/LayoutSwitch/LayoutSwitch.js +18 -29
- package/components/LayoutSwitch/LayoutSwitch.js.map +1 -1
- package/components/LayoutSwitch/index.js +1 -16
- package/components/LayoutSwitch/index.js.map +1 -1
- package/components/NoPermissions/NoPermissions.d.ts +2 -0
- package/components/NoPermissions/NoPermissions.js +28 -0
- package/components/NoPermissions/NoPermissions.js.map +1 -0
- package/components/NoPermissions/index.d.ts +1 -0
- package/components/NoPermissions/index.js +3 -0
- package/components/NoPermissions/index.js.map +1 -0
- package/components/NoResults/NoResults.js +19 -15
- package/components/NoResults/NoResults.js.map +1 -1
- package/components/NoResults/index.js +1 -16
- package/components/NoResults/index.js.map +1 -1
- package/components/SearchWidget/SearchWidget.js +31 -0
- package/components/SearchWidget/SearchWidget.js.map +1 -0
- package/components/SearchWidget/index.d.ts +1 -0
- package/components/SearchWidget/index.js +3 -0
- package/components/SearchWidget/index.js.map +1 -0
- package/components/Table/Actions/CopyFile.js +19 -22
- package/components/Table/Actions/CopyFile.js.map +1 -1
- package/components/Table/Actions/DeleteFile.js +23 -25
- package/components/Table/Actions/DeleteFile.js.map +1 -1
- package/components/Table/Actions/EditFile.js +18 -23
- package/components/Table/Actions/EditFile.js.map +1 -1
- package/components/Table/Actions/MoveFile.js +15 -19
- package/components/Table/Actions/MoveFile.js.map +1 -1
- package/components/Table/Actions/index.js +4 -49
- package/components/Table/Actions/index.js.map +1 -1
- package/components/Table/Cells/CellActions.js +24 -28
- package/components/Table/Cells/CellActions.js.map +1 -1
- package/components/Table/Cells/CellAuthor.js +10 -17
- package/components/Table/Cells/CellAuthor.js.map +1 -1
- package/components/Table/Cells/CellCreated.js +12 -19
- package/components/Table/Cells/CellCreated.js.map +1 -1
- package/components/Table/Cells/CellModified.js +12 -19
- package/components/Table/Cells/CellModified.js.map +1 -1
- package/components/Table/Cells/CellName.d.ts +4 -4
- package/components/Table/Cells/CellName.js +55 -48
- package/components/Table/Cells/CellName.js.map +1 -1
- package/components/Table/Cells/CellSize.js +13 -18
- package/components/Table/Cells/CellSize.js.map +1 -1
- package/components/Table/Cells/CellThumbnail.d.ts +2 -0
- package/components/Table/Cells/CellThumbnail.js +16 -0
- package/components/Table/Cells/CellThumbnail.js.map +1 -0
- package/components/Table/Cells/CellType.js +12 -17
- package/components/Table/Cells/CellType.js.map +1 -1
- package/components/Table/Cells/index.js +7 -82
- package/components/Table/Cells/index.js.map +1 -1
- package/components/Table/Table.d.ts +4 -4
- package/components/Table/Table.js +17 -20
- package/components/Table/Table.js.map +1 -1
- package/components/Table/index.js +3 -38
- package/components/Table/index.js.map +1 -1
- package/components/TagsList/Empty.js +11 -0
- package/components/TagsList/Empty.js.map +1 -0
- package/components/TagsList/FilterSelect.d.ts +2 -0
- package/components/TagsList/FilterSelect.js +28 -0
- package/components/TagsList/FilterSelect.js.map +1 -0
- package/components/TagsList/FilterStatus.d.ts +7 -0
- package/components/TagsList/FilterStatus.js +27 -0
- package/components/TagsList/FilterStatus.js.map +1 -0
- package/{modules/FileManagerRenderer/FileManagerView/components → components}/TagsList/Tag.d.ts +1 -1
- package/components/TagsList/Tag.js +16 -0
- package/components/TagsList/Tag.js.map +1 -0
- package/components/TagsList/Tags.d.ts +8 -0
- package/components/TagsList/Tags.js +32 -0
- package/components/TagsList/Tags.js.map +1 -0
- package/{modules/FileManagerRenderer/FileManagerView/components → components}/TagsList/TagsList.d.ts +1 -1
- package/components/TagsList/TagsList.js +31 -0
- package/components/TagsList/TagsList.js.map +1 -0
- package/components/TagsList/index.js +3 -0
- package/components/TagsList/index.js.map +1 -0
- package/components/Thumbnail/Thumbnail.d.ts +2 -0
- package/components/Thumbnail/Thumbnail.js +16 -0
- package/components/Thumbnail/Thumbnail.js.map +1 -0
- package/components/Thumbnail/index.d.ts +1 -0
- package/components/Thumbnail/index.js +3 -0
- package/components/Thumbnail/index.js.map +1 -0
- package/components/UploadStatus/UploadStatus.d.ts +3 -1
- package/components/UploadStatus/UploadStatus.js +33 -32
- package/components/UploadStatus/UploadStatus.js.map +1 -1
- package/components/UploadStatus/index.js +1 -16
- package/components/UploadStatus/index.js.map +1 -1
- package/components/fields/AccessControl.js +31 -31
- package/components/fields/AccessControl.js.map +1 -1
- package/components/fields/Aliases.js +76 -127
- package/components/fields/Aliases.js.map +1 -1
- package/components/fields/Name.js +21 -23
- package/components/fields/Name.js.map +1 -1
- package/components/fields/Tags.js +30 -30
- package/components/fields/Tags.js.map +1 -1
- package/components/fields/index.js +4 -49
- package/components/fields/index.js.map +1 -1
- package/components/fields/useAccessControlField.d.ts +1 -1
- package/components/fields/useAccessControlField.js +9 -21
- package/components/fields/useAccessControlField.js.map +1 -1
- package/components/fields/useFileOrUndefined.js +3 -9
- package/components/fields/useFileOrUndefined.js.map +1 -1
- package/constants.js +4 -16
- package/constants.js.map +1 -1
- package/contexts/FileProvider.d.ts +1 -1
- package/contexts/FileProvider.js +12 -18
- package/contexts/FileProvider.js.map +1 -1
- package/hooks/useCopyFile.d.ts +1 -1
- package/hooks/useCopyFile.js +18 -24
- package/hooks/useCopyFile.js.map +1 -1
- package/hooks/useDeleteFile.d.ts +1 -1
- package/hooks/useDeleteFile.js +38 -62
- package/hooks/useDeleteFile.js.map +1 -1
- package/hooks/useFile.js +5 -12
- package/hooks/useFile.js.map +1 -1
- package/hooks/useFileDetails.js +5 -12
- package/hooks/useFileDetails.js.map +1 -1
- package/hooks/useFileModel.js +5 -12
- package/hooks/useFileModel.js.map +1 -1
- package/hooks/useMoveFileToFolder.d.ts +1 -1
- package/hooks/useMoveFileToFolder.js +19 -21
- package/hooks/useMoveFileToFolder.js.map +1 -1
- package/index.js +8 -101
- package/index.js.map +1 -1
- package/modules/Enterprise/HandleWebsocketMessages.js +31 -53
- package/modules/Enterprise/HandleWebsocketMessages.js.map +1 -1
- package/modules/Enterprise/components/ThreatScanInProgressFileBody.d.ts +2 -0
- package/modules/Enterprise/components/ThreatScanInProgressFileBody.js +23 -0
- package/modules/Enterprise/components/ThreatScanInProgressFileBody.js.map +1 -0
- package/modules/Enterprise/components/ThreatScanInProgressTableCell.d.ts +6 -0
- package/modules/Enterprise/components/ThreatScanInProgressTableCell.js +32 -0
- package/modules/Enterprise/components/ThreatScanInProgressTableCell.js.map +1 -0
- package/modules/Enterprise/constants.js +1 -7
- package/modules/Enterprise/constants.js.map +1 -1
- package/modules/Enterprise/index.js +29 -22
- package/modules/Enterprise/index.js.map +1 -1
- package/modules/FileManagerApiProvider/FileManagerApiContext/FileManagerApiContext.d.ts +3 -3
- package/modules/FileManagerApiProvider/FileManagerApiContext/FileManagerApiContext.js +120 -128
- package/modules/FileManagerApiProvider/FileManagerApiContext/FileManagerApiContext.js.map +1 -1
- package/modules/FileManagerApiProvider/FileManagerApiContext/FileModelContext.d.ts +1 -1
- package/modules/FileManagerApiProvider/FileManagerApiContext/FileModelContext.js +14 -25
- package/modules/FileManagerApiProvider/FileManagerApiContext/FileModelContext.js.map +1 -1
- package/modules/FileManagerApiProvider/FileManagerApiContext/getFileGraphQLSelection.d.ts +1 -1
- package/modules/FileManagerApiProvider/FileManagerApiContext/getFileGraphQLSelection.js +25 -11
- package/modules/FileManagerApiProvider/FileManagerApiContext/getFileGraphQLSelection.js.map +1 -1
- package/modules/FileManagerApiProvider/FileManagerApiContext/getFileUploader.d.ts +1 -1
- package/modules/FileManagerApiProvider/FileManagerApiContext/getFileUploader.js +3 -9
- package/modules/FileManagerApiProvider/FileManagerApiContext/getFileUploader.js.map +1 -1
- package/modules/FileManagerApiProvider/FileManagerApiContext/index.js +3 -26
- package/modules/FileManagerApiProvider/FileManagerApiContext/index.js.map +1 -1
- package/modules/FileManagerApiProvider/FileManagerApiContext/useFileManagerApi.d.ts +2 -2
- package/modules/FileManagerApiProvider/FileManagerApiContext/useFileManagerApi.js +4 -11
- package/modules/FileManagerApiProvider/FileManagerApiContext/useFileManagerApi.js.map +1 -1
- package/modules/FileManagerApiProvider/graphql.d.ts +3 -3
- package/modules/FileManagerApiProvider/graphql.js +116 -27
- package/modules/FileManagerApiProvider/graphql.js.map +1 -1
- package/modules/FileManagerApiProvider/index.js +11 -17
- package/modules/FileManagerApiProvider/index.js.map +1 -1
- package/modules/FileManagerRenderer/FileActions/FileDetails/CopyUrl.js +18 -25
- package/modules/FileManagerRenderer/FileActions/FileDetails/CopyUrl.js.map +1 -1
- package/modules/FileManagerRenderer/FileActions/FileDetails/DeleteImage.js +26 -39
- package/modules/FileManagerRenderer/FileActions/FileDetails/DeleteImage.js.map +1 -1
- package/modules/FileManagerRenderer/FileActions/FileDetails/Download.js +15 -23
- package/modules/FileManagerRenderer/FileActions/FileDetails/Download.js.map +1 -1
- package/modules/FileManagerRenderer/FileActions/FileDetails/EditImage.js +48 -59
- package/modules/FileManagerRenderer/FileActions/FileDetails/EditImage.js.map +1 -1
- package/modules/FileManagerRenderer/FileActions/FileDetails/MoveToFolder.js +14 -22
- package/modules/FileManagerRenderer/FileActions/FileDetails/MoveToFolder.js.map +1 -1
- package/modules/FileManagerRenderer/FileActions/Grid/Delete.d.ts +2 -0
- package/modules/FileManagerRenderer/FileActions/Grid/Delete.js +29 -0
- package/modules/FileManagerRenderer/FileActions/Grid/Delete.js.map +1 -0
- package/modules/FileManagerRenderer/FileActions/Grid/Download.js +16 -19
- package/modules/FileManagerRenderer/FileActions/Grid/Download.js.map +1 -1
- package/modules/FileManagerRenderer/FileActions/Grid/MoveToFolder.js +14 -17
- package/modules/FileManagerRenderer/FileActions/Grid/MoveToFolder.js.map +1 -1
- package/modules/FileManagerRenderer/FileActions/Grid/Settings.js +15 -18
- package/modules/FileManagerRenderer/FileActions/Grid/Settings.js.map +1 -1
- package/modules/FileManagerRenderer/FileActions/index.js +36 -37
- package/modules/FileManagerRenderer/FileActions/index.js.map +1 -1
- package/modules/FileManagerRenderer/FileManagerView/FileManagerView.js +172 -252
- package/modules/FileManagerRenderer/FileManagerView/FileManagerView.js.map +1 -1
- package/modules/FileManagerRenderer/FileManagerView/FileManagerViewConfig.d.ts +52 -6
- package/modules/FileManagerRenderer/FileManagerView/FileManagerViewConfig.js +47 -54
- package/modules/FileManagerRenderer/FileManagerView/FileManagerViewConfig.js.map +1 -1
- package/modules/FileManagerRenderer/FileManagerView/LeftSidebar.js +29 -56
- package/modules/FileManagerRenderer/FileManagerView/LeftSidebar.js.map +1 -1
- package/modules/FileManagerRenderer/FileManagerView/NavigateFolderProvider.js +12 -23
- package/modules/FileManagerRenderer/FileManagerView/NavigateFolderProvider.js.map +1 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/BulkAction.d.ts +2 -2
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/BulkAction.js +34 -45
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/BulkAction.js.map +1 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/BulkEditField.js +11 -17
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/BulkEditField.js.map +1 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FileAction.d.ts +2 -2
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FileAction.js +8 -19
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FileAction.js.map +1 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Filter.js +20 -29
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Filter.js.map +1 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FilterByTags.js +7 -13
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FilterByTags.js.map +1 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FiltersToWhere.js +7 -13
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FiltersToWhere.js.map +1 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FolderAction.d.ts +2 -2
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FolderAction.js +8 -19
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FolderAction.js.map +1 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FolderFieldDecorator.d.ts +2 -2
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FolderFieldDecorator.js +6 -10
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FolderFieldDecorator.js.map +1 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Grid/Action.js +18 -27
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Grid/Action.js.map +1 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Grid/Thumbnail.js +13 -19
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Grid/Thumbnail.js.map +1 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Grid/index.d.ts +2 -2
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Grid/index.js +1 -5
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Grid/index.js.map +1 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Table/Column.d.ts +28 -5
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Table/Column.js +10 -19
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Table/Column.js.map +1 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Table/Thumbnail.d.ts +28 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Table/Thumbnail.js +30 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Table/Thumbnail.js.map +1 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Table/index.d.ts +49 -3
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Table/index.js +7 -9
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Table/index.js.map +1 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/index.d.ts +55 -12
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/index.js +30 -38
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/index.js.map +1 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/Action.js +17 -26
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/Action.js.map +1 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/Field.js +20 -29
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/Field.js.map +1 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/FieldDecorator.d.ts +1 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/FieldDecorator.js +16 -24
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/FieldDecorator.js.map +1 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/GroupFields.js +8 -14
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/GroupFields.js.map +1 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/Thumbnail.js +12 -18
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/Thumbnail.js.map +1 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/Width.js +8 -14
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/Width.js.map +1 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/index.d.ts +4 -4
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/index.js +15 -21
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/index.js.map +1 -1
- package/modules/FileManagerRenderer/FileManagerView/getThumbnailRenderer.d.ts +1 -1
- package/modules/FileManagerRenderer/FileManagerView/getThumbnailRenderer.js +7 -16
- package/modules/FileManagerRenderer/FileManagerView/getThumbnailRenderer.js.map +1 -1
- package/modules/FileManagerRenderer/FileManagerView/index.d.ts +1 -1
- package/modules/FileManagerRenderer/FileManagerView/index.js +49 -57
- package/modules/FileManagerRenderer/FileManagerView/index.js.map +1 -1
- package/modules/FileManagerRenderer/FileManagerView/outputFileSelectionError.d.ts +1 -1
- package/modules/FileManagerRenderer/FileManagerView/outputFileSelectionError.js +6 -17
- package/modules/FileManagerRenderer/FileManagerView/outputFileSelectionError.js.map +1 -1
- package/modules/FileManagerRenderer/FileManagerViewProvider/FileManagerViewContext.d.ts +11 -5
- package/modules/FileManagerRenderer/FileManagerViewProvider/FileManagerViewContext.js +281 -337
- package/modules/FileManagerRenderer/FileManagerViewProvider/FileManagerViewContext.js.map +1 -1
- package/modules/FileManagerRenderer/FileManagerViewProvider/index.js +2 -27
- package/modules/FileManagerRenderer/FileManagerViewProvider/index.js.map +1 -1
- package/modules/FileManagerRenderer/FileManagerViewProvider/setSelection.d.ts +4 -2
- package/modules/FileManagerRenderer/FileManagerViewProvider/setSelection.js +30 -45
- package/modules/FileManagerRenderer/FileManagerViewProvider/setSelection.js.map +1 -1
- package/modules/FileManagerRenderer/FileManagerViewProvider/state.d.ts +5 -3
- package/modules/FileManagerRenderer/FileManagerViewProvider/state.js +5 -9
- package/modules/FileManagerRenderer/FileManagerViewProvider/state.js.map +1 -1
- package/modules/FileManagerRenderer/FileManagerViewProvider/useFileManagerView.d.ts +1 -1
- package/modules/FileManagerRenderer/FileManagerViewProvider/useFileManagerView.js +4 -10
- package/modules/FileManagerRenderer/FileManagerViewProvider/useFileManagerView.js.map +1 -1
- package/modules/FileManagerRenderer/FileManagerViewProvider/useListFiles.d.ts +5 -5
- package/modules/FileManagerRenderer/FileManagerViewProvider/useListFiles.js +79 -99
- package/modules/FileManagerRenderer/FileManagerViewProvider/useListFiles.js.map +1 -1
- package/modules/FileManagerRenderer/FileManagerViewProvider/useTags.d.ts +1 -1
- package/modules/FileManagerRenderer/FileManagerViewProvider/useTags.js +63 -81
- package/modules/FileManagerRenderer/FileManagerViewProvider/useTags.js.map +1 -1
- package/modules/FileManagerRenderer/filters/FilterByType.js +9 -16
- package/modules/FileManagerRenderer/filters/FilterByType.js.map +1 -1
- package/modules/FileManagerRenderer/index.js +89 -83
- package/modules/FileManagerRenderer/index.js.map +1 -1
- package/modules/HeadlessCms/fileField.d.ts +1 -1
- package/modules/HeadlessCms/fileField.js +11 -19
- package/modules/HeadlessCms/fileField.js.map +1 -1
- package/modules/HeadlessCms/fileRenderer/fileField.d.ts +1 -1
- package/modules/HeadlessCms/fileRenderer/fileField.js +46 -91
- package/modules/HeadlessCms/fileRenderer/fileField.js.map +1 -1
- package/modules/HeadlessCms/fileRenderer/fileFields.d.ts +1 -1
- package/modules/HeadlessCms/fileRenderer/fileFields.js +76 -146
- package/modules/HeadlessCms/fileRenderer/fileFields.js.map +1 -1
- package/modules/HeadlessCms/fileRenderer/utils.d.ts +1 -11
- package/modules/HeadlessCms/fileRenderer/utils.js +3 -53
- package/modules/HeadlessCms/fileRenderer/utils.js.map +1 -1
- package/modules/HeadlessCms/index.js +8 -14
- package/modules/HeadlessCms/index.js.map +1 -1
- package/modules/Settings/graphql.js +26 -15
- package/modules/Settings/graphql.js.map +1 -1
- package/modules/Settings/index.js +35 -32
- package/modules/Settings/index.js.map +1 -1
- package/modules/Settings/plugins/installation.d.ts +1 -1
- package/modules/Settings/plugins/installation.js +68 -68
- package/modules/Settings/plugins/installation.js.map +1 -1
- package/modules/Settings/plugins/permissionRenderer/FileManagerPermissions.js +122 -149
- package/modules/Settings/plugins/permissionRenderer/FileManagerPermissions.js.map +1 -1
- package/modules/Settings/plugins/permissionRenderer/index.d.ts +1 -1
- package/modules/Settings/plugins/permissionRenderer/index.js +16 -22
- package/modules/Settings/plugins/permissionRenderer/index.js.map +1 -1
- package/modules/Settings/views/FileManagerSettings.js +97 -110
- package/modules/Settings/views/FileManagerSettings.js.map +1 -1
- package/modules/ThumbnailRenderers/FilePreviewDefaultRenderer.d.ts +2 -0
- package/modules/ThumbnailRenderers/FilePreviewDefaultRenderer.js +12 -0
- package/modules/ThumbnailRenderers/FilePreviewDefaultRenderer.js.map +1 -0
- package/modules/ThumbnailRenderers/FilePreviewImageRenderer.d.ts +2 -0
- package/modules/ThumbnailRenderers/FilePreviewImageRenderer.js +19 -0
- package/modules/ThumbnailRenderers/FilePreviewImageRenderer.js.map +1 -0
- package/modules/ThumbnailRenderers/GridItemDefaultRenderer.d.ts +2 -0
- package/modules/ThumbnailRenderers/GridItemDefaultRenderer.js +12 -0
- package/modules/ThumbnailRenderers/GridItemDefaultRenderer.js.map +1 -0
- package/modules/ThumbnailRenderers/GridItemImageRenderer.d.ts +2 -0
- package/modules/ThumbnailRenderers/GridItemImageRenderer.js +19 -0
- package/modules/ThumbnailRenderers/GridItemImageRenderer.js.map +1 -0
- package/modules/ThumbnailRenderers/TableItemDefaultRenderer.d.ts +2 -0
- package/modules/ThumbnailRenderers/TableItemDefaultRenderer.js +19 -0
- package/modules/ThumbnailRenderers/TableItemDefaultRenderer.js.map +1 -0
- package/modules/ThumbnailRenderers/TableItemImageRenderer.d.ts +2 -0
- package/modules/ThumbnailRenderers/TableItemImageRenderer.js +19 -0
- package/modules/ThumbnailRenderers/TableItemImageRenderer.js.map +1 -0
- package/package.json +23 -24
- package/tagsHelpers.d.ts +1 -1
- package/tagsHelpers.js +31 -37
- package/tagsHelpers.js.map +1 -1
- package/types.d.ts +6 -7
- package/types.js +1 -12
- package/types.js.map +1 -1
- package/components/BottomInfoBar/styled.d.ts +0 -21
- package/components/BottomInfoBar/styled.js +0 -81
- package/components/BottomInfoBar/styled.js.map +0 -1
- package/components/BulkActions/ActionEdit/ActionEdit.styled.d.ts +0 -28
- package/components/BulkActions/ActionEdit/ActionEdit.styled.js +0 -77
- package/components/BulkActions/ActionEdit/ActionEdit.styled.js.map +0 -1
- package/components/BulkActions/ActionEdit/BatchEditorDialog/RemoveOperation.d.ts +0 -7
- package/components/BulkActions/ActionEdit/BatchEditorDialog/RemoveOperation.js +0 -26
- package/components/BulkActions/ActionEdit/BatchEditorDialog/RemoveOperation.js.map +0 -1
- package/components/BulkActions/BulkActions.styled.d.ts +0 -13
- package/components/BulkActions/BulkActions.styled.js +0 -46
- package/components/BulkActions/BulkActions.styled.js.map +0 -1
- package/components/DropFilesHere/DropFilesHere.d.ts +0 -8
- package/components/DropFilesHere/DropFilesHere.js +0 -28
- package/components/DropFilesHere/DropFilesHere.js.map +0 -1
- package/components/DropFilesHere/index.d.ts +0 -1
- package/components/DropFilesHere/index.js +0 -18
- package/components/DropFilesHere/index.js.map +0 -1
- package/components/DropFilesHere/styled.d.ts +0 -22
- package/components/DropFilesHere/styled.js +0 -61
- package/components/DropFilesHere/styled.js.map +0 -1
- package/components/FileDetails/components/Flex.d.ts +0 -7
- package/components/FileDetails/components/Flex.js +0 -48
- package/components/FileDetails/components/Flex.js.map +0 -1
- package/components/FileDetails/components/Footer.d.ts +0 -2
- package/components/FileDetails/components/Footer.js +0 -40
- package/components/FileDetails/components/Footer.js.map +0 -1
- package/components/FileDetails/components/Header.d.ts +0 -2
- package/components/FileDetails/components/Header.js +0 -40
- package/components/FileDetails/components/Header.js.map +0 -1
- package/components/FileDetails/components/PreviewMeta.d.ts +0 -2
- package/components/FileDetails/components/PreviewMeta.js +0 -31
- package/components/FileDetails/components/PreviewMeta.js.map +0 -1
- package/components/FileDetails/components/TypeAndSize.d.ts +0 -2
- package/components/FileDetails/components/TypeAndSize.js +0 -67
- package/components/FileDetails/components/TypeAndSize.js.map +0 -1
- package/components/Grid/styled.d.ts +0 -41
- package/components/Grid/styled.js +0 -137
- package/components/Grid/styled.js.map +0 -1
- package/components/NoPermission/NoPermission.d.ts +0 -2
- package/components/NoPermission/NoPermission.js +0 -25
- package/components/NoPermission/NoPermission.js.map +0 -1
- package/components/NoPermission/index.d.ts +0 -1
- package/components/NoPermission/index.js +0 -18
- package/components/NoPermission/index.js.map +0 -1
- package/components/NoPermission/styled.d.ts +0 -24
- package/components/NoPermission/styled.js +0 -97
- package/components/NoPermission/styled.js.map +0 -1
- package/components/NoResults/styled.d.ts +0 -5
- package/components/NoResults/styled.js +0 -25
- package/components/NoResults/styled.js.map +0 -1
- package/components/Table/Cells/Cells.styled.d.ts +0 -12
- package/components/Table/Cells/Cells.styled.js +0 -54
- package/components/Table/Cells/Cells.styled.js.map +0 -1
- package/components/Title/Title.d.ts +0 -5
- package/components/Title/Title.js +0 -21
- package/components/Title/Title.js.map +0 -1
- package/components/Title/index.d.ts +0 -1
- package/components/Title/index.js +0 -18
- package/components/Title/index.js.map +0 -1
- package/components/Title/styled.d.ts +0 -4
- package/components/Title/styled.js +0 -26
- package/components/Title/styled.js.map +0 -1
- package/components/UploadStatus/assets/check.svg +0 -3
- package/components/UploadStatus/assets/loading.svg +0 -17
- package/components/UploadStatus/styled.d.ts +0 -39
- package/components/UploadStatus/styled.js +0 -127
- package/components/UploadStatus/styled.js.map +0 -1
- package/modules/Enterprise/components/ThreatScanInProgress.d.ts +0 -2
- package/modules/Enterprise/components/ThreatScanInProgress.js +0 -44
- package/modules/Enterprise/components/ThreatScanInProgress.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/components/Filters.js +0 -33
- package/modules/FileManagerRenderer/FileManagerView/components/Filters.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/components/SearchWidget.js +0 -98
- package/modules/FileManagerRenderer/FileManagerView/components/SearchWidget.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/components/TagsList/Empty.js +0 -19
- package/modules/FileManagerRenderer/FileManagerView/components/TagsList/Empty.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/components/TagsList/Tag.js +0 -29
- package/modules/FileManagerRenderer/FileManagerView/components/TagsList/Tag.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/components/TagsList/TagsList.js +0 -71
- package/modules/FileManagerRenderer/FileManagerView/components/TagsList/TagsList.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/components/TagsList/index.js +0 -18
- package/modules/FileManagerRenderer/FileManagerView/components/TagsList/index.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/components/TagsList/styled.d.ts +0 -39
- package/modules/FileManagerRenderer/FileManagerView/components/TagsList/styled.js +0 -91
- package/modules/FileManagerRenderer/FileManagerView/components/TagsList/styled.js.map +0 -1
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FolderDropConfirmation.d.ts +0 -5
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FolderDropConfirmation.js +0 -15
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FolderDropConfirmation.js.map +0 -1
- package/modules/HeadlessCms/fileRenderer/File.d.ts +0 -10
- package/modules/HeadlessCms/fileRenderer/File.js +0 -86
- package/modules/HeadlessCms/fileRenderer/File.js.map +0 -1
- package/modules/ThumbnailRenderers/DefaultRenderer.d.ts +0 -2
- package/modules/ThumbnailRenderers/DefaultRenderer.js +0 -25
- package/modules/ThumbnailRenderers/DefaultRenderer.js.map +0 -1
- package/modules/ThumbnailRenderers/ImageRenderer.d.ts +0 -2
- package/modules/ThumbnailRenderers/ImageRenderer.js +0 -29
- package/modules/ThumbnailRenderers/ImageRenderer.js.map +0 -1
- /package/{modules/FileManagerRenderer/FileManagerView/components → components/Filters}/Filters.d.ts +0 -0
- /package/{modules/FileManagerRenderer/FileManagerView/components → components/SearchWidget}/SearchWidget.d.ts +0 -0
- /package/{modules/FileManagerRenderer/FileManagerView/components → components}/TagsList/Empty.d.ts +0 -0
- /package/{modules/FileManagerRenderer/FileManagerView/components → components}/TagsList/index.d.ts +0 -0
|
@@ -1,118 +1,90 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
var _excluded = ["file"];
|
|
37
|
-
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; } // @ts-expect-error This package has no types.
|
|
38
|
-
var FileDetailsDrawer = /*#__PURE__*/(0, _base.default)(_Drawer.DrawerRight, process.env.NODE_ENV === "production" ? {
|
|
39
|
-
target: "ekbey2w1"
|
|
40
|
-
} : {
|
|
41
|
-
target: "ekbey2w1",
|
|
42
|
-
label: "FileDetailsDrawer"
|
|
43
|
-
})("z-index:70;&.mdc-drawer{width:", function (props) {
|
|
44
|
-
return props.width;
|
|
45
|
-
}, ";}.mdc-drawer__content{overflow-y:hidden;}&+.mdc-drawer-scrim{z-index:65;}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkZpbGVEZXRhaWxzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE2QnFFIiwiZmlsZSI6IkZpbGVEZXRhaWxzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBSZWFjdCwgeyB1c2VNZW1vLCB1c2VSZWYgfSBmcm9tIFwicmVhY3RcIjtcbmltcG9ydCBSZWFjdERPTSBmcm9tIFwicmVhY3QtZG9tXCI7XG5pbXBvcnQgbm9vcCBmcm9tIFwibG9kYXNoL25vb3BcIjtcbi8vIEB0cy1leHBlY3QtZXJyb3IgVGhpcyBwYWNrYWdlIGhhcyBubyB0eXBlcy5cbmltcG9ydCB7IHVzZUhvdGtleXMgfSBmcm9tIFwicmVhY3QtaG90a2V5elwiO1xuaW1wb3J0IHN0eWxlZCBmcm9tIFwiQGVtb3Rpb24vc3R5bGVkXCI7XG5pbXBvcnQgeyBGaWxlSXRlbSB9IGZyb20gXCJAd2ViaW55L2FwcC1hZG1pbi90eXBlc1wiO1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zdCBiYXNpY0ZpZWxkc0VsZW1lbnQgPSAoXG4gICAgICAgIDxHcmlkPlxuICAgICAgICAgICAge2ZpbGVEZXRhaWxzLmZpZWxkcy5tYXAoZmllbGQgPT4gKFxuICAgICAgICAgICAgICAgIDxDZWxsIHNwYW49ezEyfSBrZXk9e2ZpZWxkLm5hbWV9PlxuICAgICAgICAgICAgICAgICAgICB7ZmllbGQuZWxlbWVudH1cbiAgICAgICAgICAgICAgICA8L0NlbGw+XG4gICAgICAgICAgICApKX1cbiAgICAgICAgPC9HcmlkPlxuICAgICk7XG5cbiAgICBjb25zdCBleHRlbnNpb25GaWVsZHNFbGVtZW50ID1cbiAgICAgICAgZXh0ZW5zaW9uRmllbGRzLmxlbmd0aCA+IDAgPyA8RXh0ZW5zaW9ucyBtb2RlbD17ZmlsZU1vZGVsfSAvPiA6IG51bGw7XG5cbiAgICByZXR1cm4gKFxuICAgICAgICA8Rm9ybSBkYXRhPXtmaWxlfSBvblN1Ym1pdD17b25TdWJtaXR9PlxuICAgICAgICAgICAgeygpID0+IChcbiAgICAgICAgICAgICAgICA8Rm9ybUNvbnRhaW5lcj5cbiAgICAgICAgICAgICAgICAgICAgPEhlYWRlciAvPlxuICAgICAgICAgICAgICAgICAgICA8Q29udGVudD5cbiAgICAgICAgICAgICAgICAgICAgICAgIDxDb250ZW50LlBhbmVsIGZsZXg9e3BhcnNlRmxvYXQobGVmdFBhbmVsKX0+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPEVsZXZhdGlvbiB6PXsyfSBzdHlsZT17eyBtYXJnaW46IDIwIH19PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8QWN0aW9ucyAvPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8UHJldmlldyAvPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8UHJldmlld01ldGEgLz5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L0VsZXZhdGlvbj5cbiAgICAgICAgICAgICAgICAgICAgICAgIDwvQ29udGVudC5QYW5lbD5cbiAgICAgICAgICAgICAgICAgICAgICAgIDxDb250ZW50LlBhbmVsIGZsZXg9e3BhcnNlRmxvYXQocmlnaHRQYW5lbCl9PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtmaWxlRGV0YWlscy5ncm91cEZpZWxkcyA/IChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPFRhYnM+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8VGFiIGxhYmVsPXtcIkJhc2ljIERldGFpbHNcIn0+e2Jhc2ljRmllbGRzRWxlbWVudH08L1RhYj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxUYWIgbGFiZWw9e1wiQWR2YW5jZWQgRGV0YWlsc1wifT57ZXh0ZW5zaW9uRmllbGRzRWxlbWVudH08L1RhYj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9UYWJzPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICkgOiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDw+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7YmFzaWNGaWVsZHNFbGVtZW50fVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge2V4dGVuc2lvbkZpZWxkc0VsZW1lbnR9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICl9XG4gICAgICAgICAgICAgICAgICAgICAgICA8L0NvbnRlbnQuUGFuZWw+XG4gICAgICAgICAgICAgICAgICAgIDwvQ29udGVudD5cbiAgICAgICAgICAgICAgICAgICAgPEZvb3RlciAvPlxuICAgICAgICAgICAgICAgIDwvRm9ybUNvbnRhaW5lcj5cbiAgICAgICAgICAgICl9XG4gICAgICAgIDwvRm9ybT5cbiAgICApO1xufTtcblxuZnVuY3Rpb24gZ2V0UG9ydGFsV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XG5cbmV4cG9ydCBjb25zdCBGaWxlRGV0YWlscyA9ICh7XG4gICAgb3BlbixcbiAgICBvbkNsb3NlLFxuICAgIG9uU2F2ZSxcbiAgICBsb2FkaW5nLFxuICAgIGZpbGUsXG4gICAgb25TZXRGaWxlID0gbm9vcFxufTogRmlsZURldGFpbHNQcm9wcykgPT4ge1xuICAgIHVzZUhvdGtleXMoe1xuICAgICAgICB6SW5kZXg6IDU1LFxuICAgICAgICBkaXNhYmxlZDogIW9wZW4sXG4gICAgICAgIGtleXM6IHtcbiAgICAgICAgICAgIGVzYzogb25DbG9zZVxuICAgICAgICB9XG4gICAgfSk7XG5cbiAgICBjb25zdCB7IGZpbGVEZXRhaWxzIH0gPSB1c2VGaWxlTWFuYWdlclZpZXdDb25maWcoKTtcblxuICAgIGNvbnN0IGRyYXdlcldpZHRoID0gZmlsZURldGFpbHMud2lkdGguc3BsaXQoXCIsXCIpWzBdO1xuXG4gICAgcmV0dXJuIChcbiAgICAgICAgPEZpbGVEZXRhaWxzUG9ydGFsPlxuICAgICAgICAgICAgPEZpbGVEZXRhaWxzRHJhd2VyXG4gICAgICAgICAgICAgICAgd2lkdGg9e2RyYXdlcldpZHRofVxuICAgICAgICAgICAgICAgIG1vZGFsXG4gICAgICAgICAgICAgICAgb3Blbj17b3Blbn1cbiAgICAgICAgICAgICAgICBvbkNsb3NlPXtvbkNsb3NlfVxuICAgICAgICAgICAgICAgIGRhdGEtdGVzdGlkPXtcImZtLmZpbGUtZGV0YWlscy5kcmF3ZXJcIn1cbiAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICA8RHJhd2VyQ29udGVudD5cbiAgICAgICAgICAgICAgICAgICAge2xvYWRpbmcgJiYgPENpcmN1bGFyUHJvZ3Jlc3MgbGFiZWw9e2xvYWRpbmd9IC8+fVxuICAgICAgICAgICAgICAgICAgICB7ZmlsZSAmJiAoXG4gICAgICAgICAgICAgICAgICAgICAgICA8RmlsZVByb3ZpZGVyIGZpbGU9e2ZpbGV9PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxGaWxlRGV0YWlsc1Byb3ZpZGVyIGhpZGVGaWxlRGV0YWlscz17b25DbG9zZX0gb25TZXRGaWxlPXtvblNldEZpbGV9PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8RmlsZURldGFpbHNJbm5lciBmaWxlPXtmaWxlfSBvbkNsb3NlPXtvbkNsb3NlfSBvblN1Ym1pdD17b25TYXZlfSAvPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvRmlsZURldGFpbHNQcm92aWRlcj5cbiAgICAgICAgICAgICAgICAgICAgICAgIDwvRmlsZVByb3ZpZGVyPlxuICAgICAgICAgICAgICAgICAgICApfVxuICAgICAgICAgICAgICAgIDwvRHJhd2VyQ29udGVudD5cbiAgICAgICAgICAgIDwvRmlsZURldGFpbHNEcmF3ZXI+XG4gICAgICAgIDwvRmlsZURldGFpbHNQb3J0YWw+XG4gICAgKTtcbn07XG4iXX0= */"));
|
|
46
|
-
var FormContainer = /*#__PURE__*/(0, _base.default)(_SimpleForm.SimpleForm, process.env.NODE_ENV === "production" ? {
|
|
47
|
-
target: "ekbey2w0"
|
|
48
|
-
} : {
|
|
49
|
-
target: "ekbey2w0",
|
|
50
|
-
label: "FormContainer"
|
|
51
|
-
})(process.env.NODE_ENV === "production" ? {
|
|
52
|
-
name: "ti75j2",
|
|
53
|
-
styles: "margin:0"
|
|
54
|
-
} : {
|
|
55
|
-
name: "ti75j2",
|
|
56
|
-
styles: "margin:0",
|
|
57
|
-
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkZpbGVEZXRhaWxzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEwQ3dDIiwiZmlsZSI6IkZpbGVEZXRhaWxzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBSZWFjdCwgeyB1c2VNZW1vLCB1c2VSZWYgfSB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AgICAgICAgIDxDb250ZW50LlBhbmVsIGZsZXg9e3BhcnNlRmxvYXQobGVmdFBhbmVsKX0+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPEVsZXZhdGlvbiB6PXsyfSBzdHlsZT17eyBtYXJnaW46IDIwIH19PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8QWN0aW9ucyAvPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8UHJldmlldyAvPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8UHJldmlld01ldGEgLz5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L0VsZXZhdGlvbj5cbiAgICAgICAgICAgICAgICAgICAgICAgIDwvQ29udGVudC5QYW5lbD5cbiAgICAgICAgICAgICAgICAgICAgICAgIDxDb250ZW50LlBhbmVsIGZsZXg9e3BhcnNlRmxvYXQocmlnaHRQYW5lbCl9PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtmaWxlRGV0YWlscy5ncm91cEZpZWxkcyA/IChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPFRhYnM+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8VGFiIGxhYmVsPXtcIkJhc2ljIERldGFpbHNcIn0+e2Jhc2ljRmllbGRzRWxlbWVudH08L1RhYj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxUYWIgbGFiZWw9e1wiQWR2YW5jZWQgRGV0YWlsc1wifT57ZXh0ZW5zaW9uRmllbGRzRWxlbWVudH08L1RhYj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9UYWJzPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICkgOiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDw+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7YmFzaWNGaWVsZHNFbGVtZW50fVxuICAgICAgICAgICAgICAgICAgICAgICAg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ICByZXR1cm4gUmVhY3RET00uY3JlYXRlUG9ydGFsKGNoaWxkcmVuLCBjb250YWluZXJSZWYuY3VycmVudCk7XG59O1xuXG5leHBvcnQgaW50ZXJmYWNlIEZpbGVEZXRhaWxzUHJvcHMge1xuICAgIGZpbGU/OiBGaWxlSXRlbTtcbiAgICBvcGVuOiBib29sZWFuO1xuICAgIGxvYWRpbmc6IHN0cmluZyB8IG51bGw7XG4gICAgb25DbG9zZTogKCkgPT4gdm9pZDtcbiAgICBvblNhdmU6IChmaWxlOiBGaWxlSXRlbSkgPT4gdm9pZDtcbiAgICBvblNldEZpbGU/OiAoZmlsZTogRmlsZUl0ZW0pID0+IHZvaWQ7XG59XG5cbmV4cG9ydCBjb25zdCBGaWxlRGV0YWlscyA9ICh7XG4gICAgb3BlbixcbiAgICBvbkNsb3NlLFxuICAgIG9uU2F2ZSxcbiAgICBsb2FkaW5nLFxuICAgIGZpbGUsXG4gICAgb25TZXRGaWxlID0gbm9vcFxufTogRmlsZURldGFpbHNQcm9wcykgPT4ge1xuICAgIHVzZUhvdGtleXMoe1xuICAgICAgICB6SW5kZXg6IDU1LFxuICAgICAgICBkaXNhYmxlZDogIW9wZW4sXG4gICAgICAgIGtleXM6IHtcbiAgICAgICAgICAgIGVzYzogb25DbG9zZVxuICAgICAgICB9XG4gICAgfSk7XG5cbiAgICBjb25zdCB7IGZpbGVEZXRhaWxzIH0gPSB1c2VGaWxlTWFuYWdlclZpZXdDb25maWcoKTtcblxuICAgIGNvbnN0IGRyYXdlcldpZHRoID0gZmlsZURldGFpbHMud2lkdGguc3BsaXQoXCIsXCIpWzBdO1xuXG4gICAgcmV0dXJuIChcbiAgICAgICAgPEZpbGVEZXRhaWxzUG9ydGFsPlxuICAgICAgICAgICAgPEZpbGVEZXRhaWxzRHJhd2VyXG4gICAgICAgICAgICAgICAgd2lkdGg9e2RyYXdlcldpZHRofVxuICAgICAgICAgICAgICAgIG1vZGFsXG4gICAgICAgICAgICAgICAgb3Blbj17b3Blbn1cbiAgICAgICAgICAgICAgICBvbkNsb3NlPXtvbkNsb3NlfVxuICAgICAgICAgICAgICAgIGRhdGEtdGVzdGlkPXtcImZtLmZpbGUtZGV0YWlscy5kcmF3ZXJcIn1cbiAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICA8RHJhd2VyQ29udGVudD5cbiAgICAgICAgICAgICAgICAgICAge2xvYWRpbmcgJiYgPENpcmN1bGFyUHJvZ3Jlc3MgbGFiZWw9e2xvYWRpbmd9IC8+fVxuICAgICAgICAgICAgICAgICAgICB7ZmlsZSAmJiAoXG4gICAgICAgICAgICAgICAgICAgICAgICA8RmlsZVByb3ZpZGVyIGZpbGU9e2ZpbGV9PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxGaWxlRGV0YWlsc1Byb3ZpZGVyIGhpZGVGaWxlRGV0YWlscz17b25DbG9zZX0gb25TZXRGaWxlPXtvblNldEZpbGV9PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8RmlsZURldGFpbHNJbm5lciBmaWxlPXtmaWxlfSBvbkNsb3NlPXtvbkNsb3NlfSBvblN1Ym1pdD17b25TYXZlfSAvPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvRmlsZURldGFpbHNQcm92aWRlcj5cbiAgICAgICAgICAgICAgICAgICAgICAgIDwvRmlsZVByb3ZpZGVyPlxuICAgICAgICAgICAgICAgICAgICApfVxuICAgICAgICAgICAgICAgIDwvRHJhd2VyQ29udGVudD5cbiAgICAgICAgICAgIDwvRmlsZURldGFpbHNEcmF3ZXI+XG4gICAgICAgIDwvRmlsZURldGFpbHNQb3J0YWw+XG4gICAgKTtcbn07XG4iXX0= */",
|
|
58
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
59
|
-
});
|
|
60
|
-
var FileDetailsInner = function FileDetailsInner(_ref) {
|
|
61
|
-
var file = _ref.file,
|
|
62
|
-
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
63
|
-
var fileModel = (0, _useFileModel.useFileModel)();
|
|
64
|
-
var _useFileManagerViewCo = (0, _.useFileManagerViewConfig)(),
|
|
65
|
-
fileDetails = _useFileManagerViewCo.fileDetails;
|
|
66
|
-
var _fileDetails$width$sp = fileDetails.width.split(","),
|
|
67
|
-
_fileDetails$width$sp2 = (0, _slicedToArray2.default)(_fileDetails$width$sp, 3),
|
|
68
|
-
_fileDetails$width$sp3 = _fileDetails$width$sp2[1],
|
|
69
|
-
leftPanel = _fileDetails$width$sp3 === void 0 ? "1" : _fileDetails$width$sp3,
|
|
70
|
-
_fileDetails$width$sp4 = _fileDetails$width$sp2[2],
|
|
71
|
-
rightPanel = _fileDetails$width$sp4 === void 0 ? "1" : _fileDetails$width$sp4;
|
|
72
|
-
var extensionFields = (0, _react.useMemo)(function () {
|
|
73
|
-
var fields = fileModel.fields.find(function (field) {
|
|
74
|
-
return field.fieldId === "extensions";
|
|
75
|
-
});
|
|
1
|
+
import React, { useEffect, useMemo, useRef } from "react";
|
|
2
|
+
import ReactDOM from "react-dom";
|
|
3
|
+
import noop from "lodash/noop";
|
|
4
|
+
// @ts-expect-error This package has no types.
|
|
5
|
+
import { useHotkeys } from "react-hotkeyz";
|
|
6
|
+
import { Drawer, Grid, OverlayLoader, Tabs } from "@webiny/admin-ui";
|
|
7
|
+
import { Form } from "@webiny/form";
|
|
8
|
+
import { prepareFormData } from "@webiny/app-headless-cms-common";
|
|
9
|
+
import { FileDetailsProvider } from "./FileDetailsProvider";
|
|
10
|
+
import { Preview } from "./components/Preview";
|
|
11
|
+
import { Actions } from "./components/Actions";
|
|
12
|
+
import { Content } from "./components/Content";
|
|
13
|
+
import { Extensions } from "./components/Extensions";
|
|
14
|
+
import { Description } from "./components/Description";
|
|
15
|
+
import { useFileModel } from "../../hooks/useFileModel";
|
|
16
|
+
import { useFileManagerViewConfig } from "../..";
|
|
17
|
+
import { FileProvider } from "../../contexts/FileProvider";
|
|
18
|
+
const FileDetailsInner = ({
|
|
19
|
+
file,
|
|
20
|
+
onForm,
|
|
21
|
+
...props
|
|
22
|
+
}) => {
|
|
23
|
+
const formRef = /*#__PURE__*/React.createRef();
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
if (formRef.current) {
|
|
26
|
+
onForm(formRef.current);
|
|
27
|
+
}
|
|
28
|
+
}, []);
|
|
29
|
+
const fileModel = useFileModel();
|
|
30
|
+
const {
|
|
31
|
+
fileDetails
|
|
32
|
+
} = useFileManagerViewConfig();
|
|
33
|
+
const [, leftPanel = "1", rightPanel = "1"] = fileDetails.width.split(",");
|
|
34
|
+
const extensionFields = useMemo(() => {
|
|
35
|
+
const fields = fileModel.fields.find(field => field.fieldId === "extensions");
|
|
76
36
|
if (!fields?.settings?.fields) {
|
|
77
37
|
return [];
|
|
78
38
|
}
|
|
79
39
|
return fields?.settings?.fields || [];
|
|
80
40
|
}, [fileModel]);
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
props.onSubmit(
|
|
41
|
+
const onSubmit = async data => {
|
|
42
|
+
const fileData = prepareFormData(data, fileModel.fields);
|
|
43
|
+
props.onSubmit({
|
|
44
|
+
...file,
|
|
45
|
+
...fileData
|
|
46
|
+
});
|
|
84
47
|
};
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}));
|
|
91
|
-
var extensionFieldsElement = extensionFields.length > 0 ? /*#__PURE__*/_react.default.createElement(_Extensions.Extensions, {
|
|
48
|
+
const basicFieldsElement = /*#__PURE__*/React.createElement(Grid, null, fileDetails.fields.map(field => /*#__PURE__*/React.createElement(Grid.Column, {
|
|
49
|
+
span: 12,
|
|
50
|
+
key: field.name
|
|
51
|
+
}, field.element)));
|
|
52
|
+
const extensionFieldsElement = extensionFields.length > 0 ? /*#__PURE__*/React.createElement(Extensions, {
|
|
92
53
|
model: fileModel
|
|
93
54
|
}) : null;
|
|
94
|
-
return /*#__PURE__*/
|
|
55
|
+
return /*#__PURE__*/React.createElement(Form, {
|
|
95
56
|
data: file,
|
|
96
|
-
onSubmit: onSubmit
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
57
|
+
onSubmit: onSubmit,
|
|
58
|
+
ref: formRef
|
|
59
|
+
}, () => /*#__PURE__*/React.createElement(Content, null, /*#__PURE__*/React.createElement(Content.Panel, {
|
|
60
|
+
flex: parseFloat(leftPanel)
|
|
61
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
62
|
+
className: "wby-flex wby-flex-col wby-justify-between wby-gap-md wby-h-full wby-px-lg wby-py-md"
|
|
63
|
+
}, /*#__PURE__*/React.createElement(Actions, null), /*#__PURE__*/React.createElement(Preview, null))), /*#__PURE__*/React.createElement(Content.Panel, {
|
|
64
|
+
flex: parseFloat(rightPanel)
|
|
65
|
+
}, fileDetails.groupFields ? /*#__PURE__*/React.createElement(Tabs, {
|
|
66
|
+
size: "md",
|
|
67
|
+
spacing: "lg",
|
|
68
|
+
separator: true,
|
|
69
|
+
tabs: [/*#__PURE__*/React.createElement(Tabs.Tab, {
|
|
70
|
+
key: "basic-details",
|
|
71
|
+
value: "basic-details",
|
|
72
|
+
trigger: "Basic details",
|
|
73
|
+
content: basicFieldsElement
|
|
74
|
+
}), /*#__PURE__*/React.createElement(Tabs.Tab, {
|
|
75
|
+
key: "advanced-details",
|
|
76
|
+
value: "advanced-details",
|
|
77
|
+
trigger: "Advanced details",
|
|
78
|
+
content: extensionFieldsElement
|
|
79
|
+
})]
|
|
80
|
+
}) : /*#__PURE__*/React.createElement("div", {
|
|
81
|
+
className: "wby-p-lg"
|
|
82
|
+
}, basicFieldsElement, /*#__PURE__*/React.createElement("div", {
|
|
83
|
+
className: "wby-mt-lg"
|
|
84
|
+
}, extensionFieldsElement)))));
|
|
113
85
|
};
|
|
114
86
|
function getPortalTarget() {
|
|
115
|
-
|
|
87
|
+
let target = window.document.getElementById("file-details-drawer");
|
|
116
88
|
if (!target) {
|
|
117
89
|
target = document.createElement("div");
|
|
118
90
|
target.setAttribute("id", "file-details-drawer");
|
|
@@ -120,47 +92,64 @@ function getPortalTarget() {
|
|
|
120
92
|
}
|
|
121
93
|
return target;
|
|
122
94
|
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
95
|
+
const FileDetailsPortal = ({
|
|
96
|
+
children
|
|
97
|
+
}) => {
|
|
98
|
+
const containerRef = useRef(getPortalTarget());
|
|
99
|
+
return /*#__PURE__*/ReactDOM.createPortal(children, containerRef.current);
|
|
127
100
|
};
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
zIndex:
|
|
101
|
+
export const FileDetails = ({
|
|
102
|
+
open,
|
|
103
|
+
onClose,
|
|
104
|
+
onSave,
|
|
105
|
+
loading,
|
|
106
|
+
file,
|
|
107
|
+
onSetFile = noop
|
|
108
|
+
}) => {
|
|
109
|
+
useHotkeys({
|
|
110
|
+
zIndex: 50,
|
|
138
111
|
disabled: !open,
|
|
139
112
|
keys: {
|
|
140
113
|
esc: onClose
|
|
141
114
|
}
|
|
142
115
|
});
|
|
143
|
-
|
|
144
|
-
fileDetails
|
|
145
|
-
|
|
146
|
-
|
|
116
|
+
const {
|
|
117
|
+
fileDetails
|
|
118
|
+
} = useFileManagerViewConfig();
|
|
119
|
+
const drawerWidth = fileDetails.width.split(",")[0];
|
|
120
|
+
const formRef = useRef(null);
|
|
121
|
+
return /*#__PURE__*/React.createElement(FileDetailsPortal, null, file && /*#__PURE__*/React.createElement(FileProvider, {
|
|
122
|
+
file: file
|
|
123
|
+
}, /*#__PURE__*/React.createElement(Drawer, {
|
|
124
|
+
title: file.name,
|
|
125
|
+
description: /*#__PURE__*/React.createElement(Description, null),
|
|
147
126
|
width: drawerWidth,
|
|
148
|
-
modal: true,
|
|
149
127
|
open: open,
|
|
128
|
+
modal: true,
|
|
129
|
+
bodyPadding: false,
|
|
130
|
+
headerSeparator: true,
|
|
131
|
+
footerSeparator: true,
|
|
150
132
|
onClose: onClose,
|
|
151
|
-
"data-testid": "fm.file-details.drawer"
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
133
|
+
"data-testid": "fm.file-details.drawer",
|
|
134
|
+
actions: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Drawer.CancelButton, {
|
|
135
|
+
text: "Cancel"
|
|
136
|
+
}), /*#__PURE__*/React.createElement(Drawer.ConfirmButton, {
|
|
137
|
+
text: "Update",
|
|
138
|
+
onClick: () => formRef.current?.submit()
|
|
139
|
+
}))
|
|
140
|
+
}, loading && /*#__PURE__*/React.createElement(OverlayLoader, {
|
|
141
|
+
text: loading
|
|
142
|
+
}), /*#__PURE__*/React.createElement(FileDetailsProvider, {
|
|
157
143
|
hideFileDetails: onClose,
|
|
158
144
|
onSetFile: onSetFile
|
|
159
|
-
}, /*#__PURE__*/
|
|
145
|
+
}, /*#__PURE__*/React.createElement(FileDetailsInner, {
|
|
146
|
+
onForm: form => {
|
|
147
|
+
formRef.current = form;
|
|
148
|
+
},
|
|
160
149
|
file: file,
|
|
161
150
|
onClose: onClose,
|
|
162
151
|
onSubmit: onSave
|
|
163
|
-
})))))
|
|
152
|
+
})))));
|
|
164
153
|
};
|
|
165
154
|
|
|
166
155
|
//# sourceMappingURL=FileDetails.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactDom","_interopRequireDefault","_noop","_reactHotkeyz","_form","_appHeadlessCmsCommon","_Drawer","_Progress","_Grid","_Tabs","_FileDetailsProvider","_Preview","_PreviewMeta","_Actions","_Header","_Elevation","_Content","_SimpleForm","_Footer","_Extensions","_useFileModel","_","_FileProvider","_excluded","_EMOTION_STRINGIFIED_CSS_ERROR__","FileDetailsDrawer","_base","default","DrawerRight","process","env","NODE_ENV","target","label","props","width","FormContainer","SimpleForm","name","styles","map","toString","FileDetailsInner","_ref","file","_objectWithoutProperties2","fileModel","useFileModel","_useFileManagerViewCo","useFileManagerViewConfig","fileDetails","_fileDetails$width$sp","split","_fileDetails$width$sp2","_slicedToArray2","_fileDetails$width$sp3","leftPanel","_fileDetails$width$sp4","rightPanel","extensionFields","useMemo","fields","find","field","fieldId","settings","onSubmit","data","fileData","prepareFormData","_objectSpread2","basicFieldsElement","createElement","Grid","Cell","span","key","element","extensionFieldsElement","length","Extensions","model","Form","Header","Content","Panel","flex","parseFloat","Elevation","z","style","margin","Actions","Preview","PreviewMeta","groupFields","Tabs","Tab","Fragment","Footer","getPortalTarget","window","document","getElementById","setAttribute","body","appendChild","FileDetailsPortal","_ref2","children","containerRef","useRef","ReactDOM","createPortal","current","FileDetails","exports","_ref3","open","onClose","onSave","loading","_ref3$onSetFile","onSetFile","noop","useHotkeys","zIndex","disabled","keys","esc","_useFileManagerViewCo2","drawerWidth","modal","DrawerContent","CircularProgress","FileProvider","FileDetailsProvider","hideFileDetails"],"sources":["FileDetails.tsx"],"sourcesContent":["import React, { useMemo, useRef } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport noop from \"lodash/noop\";\n// @ts-expect-error This package has no types.\nimport { useHotkeys } from \"react-hotkeyz\";\nimport styled from \"@emotion/styled\";\nimport { FileItem } from \"@webiny/app-admin/types\";\nimport { Form, FormOnSubmit } from \"@webiny/form\";\nimport { prepareFormData } from \"@webiny/app-headless-cms-common\";\nimport { DrawerRight, DrawerContent } from \"@webiny/ui/Drawer\";\nimport { CircularProgress } from \"@webiny/ui/Progress\";\nimport { Cell, Grid } from \"@webiny/ui/Grid\";\nimport { Tab, Tabs } from \"@webiny/ui/Tabs\";\nimport { FileDetailsProvider } from \"~/components/FileDetails/FileDetailsProvider\";\nimport { Preview } from \"./components/Preview\";\nimport { PreviewMeta } from \"./components/PreviewMeta\";\nimport { Actions } from \"./components/Actions\";\nimport { Header } from \"./components/Header\";\nimport { Elevation } from \"@webiny/ui/Elevation\";\nimport { Content } from \"./components/Content\";\nimport { SimpleForm } from \"@webiny/app-admin/components/SimpleForm\";\nimport { Footer } from \"./components/Footer\";\nimport { Extensions } from \"./components/Extensions\";\nimport { useFileModel } from \"~/hooks/useFileModel\";\nimport { useFileManagerViewConfig } from \"~/index\";\nimport { FileProvider } from \"~/contexts/FileProvider\";\n\ntype FileDetailsDrawerProps = React.ComponentProps<typeof DrawerRight> & { width: string };\n\nconst FileDetailsDrawer = styled(DrawerRight)<FileDetailsDrawerProps>`\n z-index: 70;\n &.mdc-drawer {\n width: ${props => props.width};\n }\n .mdc-drawer__content {\n overflow-y: hidden;\n }\n & + .mdc-drawer-scrim {\n z-index: 65;\n }\n`;\n\nconst FormContainer = styled(SimpleForm)`\n margin: 0;\n`;\n\ninterface FileDetailsInnerProps {\n file: FileItem;\n onClose: () => void;\n onSubmit: (fileData: FileItem) => void;\n}\n\nconst FileDetailsInner = ({ file, ...props }: FileDetailsInnerProps) => {\n const fileModel = useFileModel();\n const { fileDetails } = useFileManagerViewConfig();\n\n const [, leftPanel = \"1\", rightPanel = \"1\"] = fileDetails.width.split(\",\");\n\n const extensionFields = useMemo(() => {\n const fields = fileModel.fields.find(field => field.fieldId === \"extensions\");\n if (!fields?.settings?.fields) {\n return [];\n }\n return fields?.settings?.fields || [];\n }, [fileModel]);\n\n const onSubmit: FormOnSubmit<FileItem> = async data => {\n const fileData = prepareFormData(data, fileModel.fields);\n props.onSubmit({ ...file, ...fileData });\n };\n\n const basicFieldsElement = (\n <Grid>\n {fileDetails.fields.map(field => (\n <Cell span={12} key={field.name}>\n {field.element}\n </Cell>\n ))}\n </Grid>\n );\n\n const extensionFieldsElement =\n extensionFields.length > 0 ? <Extensions model={fileModel} /> : null;\n\n return (\n <Form data={file} onSubmit={onSubmit}>\n {() => (\n <FormContainer>\n <Header />\n <Content>\n <Content.Panel flex={parseFloat(leftPanel)}>\n <Elevation z={2} style={{ margin: 20 }}>\n <Actions />\n <Preview />\n <PreviewMeta />\n </Elevation>\n </Content.Panel>\n <Content.Panel flex={parseFloat(rightPanel)}>\n {fileDetails.groupFields ? (\n <Tabs>\n <Tab label={\"Basic Details\"}>{basicFieldsElement}</Tab>\n <Tab label={\"Advanced Details\"}>{extensionFieldsElement}</Tab>\n </Tabs>\n ) : (\n <>\n {basicFieldsElement}\n {extensionFieldsElement}\n </>\n )}\n </Content.Panel>\n </Content>\n <Footer />\n </FormContainer>\n )}\n </Form>\n );\n};\n\nfunction getPortalTarget() {\n let target = window.document.getElementById(\"file-details-drawer\");\n if (!target) {\n target = document.createElement(\"div\");\n target.setAttribute(\"id\", \"file-details-drawer\");\n document.body && document.body.appendChild(target);\n }\n return target;\n}\n\ninterface FileDetailsPortalProps {\n children: React.ReactNode;\n}\n\nconst FileDetailsPortal = ({ children }: FileDetailsPortalProps) => {\n const containerRef = useRef<HTMLElement>(getPortalTarget());\n\n return ReactDOM.createPortal(children, containerRef.current);\n};\n\nexport interface FileDetailsProps {\n file?: FileItem;\n open: boolean;\n loading: string | null;\n onClose: () => void;\n onSave: (file: FileItem) => void;\n onSetFile?: (file: FileItem) => void;\n}\n\nexport const FileDetails = ({\n open,\n onClose,\n onSave,\n loading,\n file,\n onSetFile = noop\n}: FileDetailsProps) => {\n useHotkeys({\n zIndex: 55,\n disabled: !open,\n keys: {\n esc: onClose\n }\n });\n\n const { fileDetails } = useFileManagerViewConfig();\n\n const drawerWidth = fileDetails.width.split(\",\")[0];\n\n return (\n <FileDetailsPortal>\n <FileDetailsDrawer\n width={drawerWidth}\n modal\n open={open}\n onClose={onClose}\n data-testid={\"fm.file-details.drawer\"}\n >\n <DrawerContent>\n {loading && <CircularProgress label={loading} />}\n {file && (\n <FileProvider file={file}>\n <FileDetailsProvider hideFileDetails={onClose} onSetFile={onSetFile}>\n <FileDetailsInner file={file} onClose={onClose} onSubmit={onSave} />\n </FileDetailsProvider>\n </FileProvider>\n )}\n </DrawerContent>\n </FileDetailsDrawer>\n </FileDetailsPortal>\n );\n};\n"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,SAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,KAAA,GAAAD,sBAAA,CAAAF,OAAA;AAEA,IAAAI,aAAA,GAAAJ,OAAA;AAGA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,qBAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AACA,IAAAQ,SAAA,GAAAR,OAAA;AACA,IAAAS,KAAA,GAAAT,OAAA;AACA,IAAAU,KAAA,GAAAV,OAAA;AACA,IAAAW,oBAAA,GAAAX,OAAA;AACA,IAAAY,QAAA,GAAAZ,OAAA;AACA,IAAAa,YAAA,GAAAb,OAAA;AACA,IAAAc,QAAA,GAAAd,OAAA;AACA,IAAAe,OAAA,GAAAf,OAAA;AACA,IAAAgB,UAAA,GAAAhB,OAAA;AACA,IAAAiB,QAAA,GAAAjB,OAAA;AACA,IAAAkB,WAAA,GAAAlB,OAAA;AACA,IAAAmB,OAAA,GAAAnB,OAAA;AACA,IAAAoB,WAAA,GAAApB,OAAA;AACA,IAAAqB,aAAA,GAAArB,OAAA;AACA,IAAAsB,CAAA,GAAAtB,OAAA;AACA,IAAAuB,aAAA,GAAAvB,OAAA;AAAuD,IAAAwB,SAAA;AAAA,SAAAC,iCAAA,gPAtBvD;AA0BA,IAAMC,iBAAiB,gBAAG,IAAAC,KAAA,CAAAC,OAAA,EAAOC,mBAAW,EAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,EAAC,mCAG5B,UAAAC,KAAK;EAAA,OAAIA,KAAK,CAACC,KAAK;AAAA,mFAAAN,OAAA,CAAA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GAAG,EAAEV;IACT;EACJ,CAAC,CAAC;EAEF,IAAAW,sBAAA,GAAwB,IAAAjF,0BAAwB,EAAC,CAAC;IAA1CC,WAAW,GAAAgF,sBAAA,CAAXhF,WAAW;EAEnB,IAAMiF,WAAW,GAAGjF,WAAW,CAACf,KAAK,CAACiB,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;EAEnD,oBACIvD,MAAA,CAAA8B,OAAA,CAAA6C,aAAA,CAACmC,iBAAiB,qBACd9G,MAAA,CAAA8B,OAAA,CAAA6C,aAAA,CAAC/C,iBAAiB;IACdU,KAAK,EAAEgG,WAAY;IACnBC,KAAK;IACLd,IAAI,EAAEA,IAAK;IACXC,OAAO,EAAEA,OAAQ;IACjB,eAAa;EAAyB,gBAEtC1H,MAAA,CAAA8B,OAAA,CAAA6C,aAAA,CAAClE,OAAA,CAAA+H,aAAa,QACTZ,OAAO,iBAAI5H,MAAA,CAAA8B,OAAA,CAAA6C,aAAA,CAACjE,SAAA,CAAA+H,gBAAgB;IAACrG,KAAK,EAAEwF;EAAQ,CAAE,CAAC,EAC/C7E,IAAI,iBACD/C,MAAA,CAAA8B,OAAA,CAAA6C,aAAA,CAAClD,aAAA,CAAAiH,YAAY;IAAC3F,IAAI,EAAEA;EAAK,gBACrB/C,MAAA,CAAA8B,OAAA,CAAA6C,aAAA,CAAC9D,oBAAA,CAAA8H,mBAAmB;IAACC,eAAe,EAAElB,OAAQ;IAACI,SAAS,EAAEA;EAAU,gBAChE9H,MAAA,CAAA8B,OAAA,CAAA6C,aAAA,CAAC9B,gBAAgB;IAACE,IAAI,EAAEA,IAAK;IAAC2E,OAAO,EAAEA,OAAQ;IAACrD,QAAQ,EAAEsD;EAAO,CAAE,CAClD,CACX,CAEP,CACA,CACJ,CAAC;AAE5B,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["React","useEffect","useMemo","useRef","ReactDOM","noop","useHotkeys","Drawer","Grid","OverlayLoader","Tabs","Form","prepareFormData","FileDetailsProvider","Preview","Actions","Content","Extensions","Description","useFileModel","useFileManagerViewConfig","FileProvider","FileDetailsInner","file","onForm","props","formRef","createRef","current","fileModel","fileDetails","leftPanel","rightPanel","width","split","extensionFields","fields","find","field","fieldId","settings","onSubmit","data","fileData","basicFieldsElement","createElement","map","Column","span","key","name","element","extensionFieldsElement","length","model","ref","Panel","flex","parseFloat","className","groupFields","size","spacing","separator","tabs","Tab","value","trigger","content","getPortalTarget","target","window","document","getElementById","setAttribute","body","appendChild","FileDetailsPortal","children","containerRef","createPortal","FileDetails","open","onClose","onSave","loading","onSetFile","zIndex","disabled","keys","esc","drawerWidth","title","description","modal","bodyPadding","headerSeparator","footerSeparator","actions","Fragment","CancelButton","text","ConfirmButton","onClick","submit","hideFileDetails","form"],"sources":["FileDetails.tsx"],"sourcesContent":["import React, { useEffect, useMemo, useRef } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport noop from \"lodash/noop\";\n// @ts-expect-error This package has no types.\nimport { useHotkeys } from \"react-hotkeyz\";\nimport { Drawer, Grid, OverlayLoader, Tabs } from \"@webiny/admin-ui\";\nimport type { FileItem } from \"@webiny/app-admin/types\";\nimport type { FormAPI, FormOnSubmit } from \"@webiny/form\";\nimport { Form } from \"@webiny/form\";\nimport { prepareFormData } from \"@webiny/app-headless-cms-common\";\nimport { FileDetailsProvider } from \"~/components/FileDetails/FileDetailsProvider\";\nimport { Preview } from \"./components/Preview\";\nimport { Actions } from \"./components/Actions\";\nimport { Content } from \"./components/Content\";\nimport { Extensions } from \"./components/Extensions\";\nimport { Description } from \"./components/Description\";\nimport { useFileModel } from \"~/hooks/useFileModel\";\nimport { useFileManagerViewConfig } from \"~/index\";\nimport { FileProvider } from \"~/contexts/FileProvider\";\n\ninterface FileDetailsInnerProps {\n file: FileItem;\n onForm: (form: FormAPI) => void;\n onClose: () => void;\n onSubmit: (fileData: FileItem) => void;\n}\n\nconst FileDetailsInner = ({ file, onForm, ...props }: FileDetailsInnerProps) => {\n const formRef = React.createRef<FormAPI>();\n\n useEffect(() => {\n if (formRef.current) {\n onForm(formRef.current);\n }\n }, []);\n\n const fileModel = useFileModel();\n const { fileDetails } = useFileManagerViewConfig();\n\n const [, leftPanel = \"1\", rightPanel = \"1\"] = fileDetails.width.split(\",\");\n\n const extensionFields = useMemo(() => {\n const fields = fileModel.fields.find(field => field.fieldId === \"extensions\");\n if (!fields?.settings?.fields) {\n return [];\n }\n return fields?.settings?.fields || [];\n }, [fileModel]);\n\n const onSubmit: FormOnSubmit<FileItem> = async data => {\n const fileData = prepareFormData(data, fileModel.fields);\n props.onSubmit({ ...file, ...fileData });\n };\n\n const basicFieldsElement = (\n <Grid>\n {fileDetails.fields.map(field => (\n <Grid.Column span={12} key={field.name}>\n {field.element}\n </Grid.Column>\n ))}\n </Grid>\n );\n\n const extensionFieldsElement =\n extensionFields.length > 0 ? <Extensions model={fileModel} /> : null;\n\n return (\n <Form data={file} onSubmit={onSubmit} ref={formRef}>\n {() => (\n <Content>\n <Content.Panel flex={parseFloat(leftPanel)}>\n <div\n className={\n \"wby-flex wby-flex-col wby-justify-between wby-gap-md wby-h-full wby-px-lg wby-py-md\"\n }\n >\n <Actions />\n <Preview />\n </div>\n </Content.Panel>\n <Content.Panel flex={parseFloat(rightPanel)}>\n {fileDetails.groupFields ? (\n <Tabs\n size={\"md\"}\n spacing={\"lg\"}\n separator={true}\n tabs={[\n <Tabs.Tab\n key={\"basic-details\"}\n value={\"basic-details\"}\n trigger={\"Basic details\"}\n content={basicFieldsElement}\n />,\n <Tabs.Tab\n key={\"advanced-details\"}\n value={\"advanced-details\"}\n trigger={\"Advanced details\"}\n content={extensionFieldsElement}\n />\n ]}\n />\n ) : (\n <div className={\"wby-p-lg\"}>\n {basicFieldsElement}\n <div className={\"wby-mt-lg\"}>{extensionFieldsElement}</div>\n </div>\n )}\n </Content.Panel>\n </Content>\n )}\n </Form>\n );\n};\n\nfunction getPortalTarget() {\n let target = window.document.getElementById(\"file-details-drawer\");\n if (!target) {\n target = document.createElement(\"div\");\n target.setAttribute(\"id\", \"file-details-drawer\");\n document.body && document.body.appendChild(target);\n }\n return target;\n}\n\ninterface FileDetailsPortalProps {\n children: React.ReactNode;\n}\n\nconst FileDetailsPortal = ({ children }: FileDetailsPortalProps) => {\n const containerRef = useRef<HTMLElement>(getPortalTarget());\n\n return ReactDOM.createPortal(children, containerRef.current);\n};\n\nexport interface FileDetailsProps {\n file?: FileItem;\n open: boolean;\n loading: string | null;\n onClose: () => void;\n onSave: (file: FileItem) => void;\n onSetFile?: (file: FileItem) => void;\n}\n\nexport const FileDetails = ({\n open,\n onClose,\n onSave,\n loading,\n file,\n onSetFile = noop\n}: FileDetailsProps) => {\n useHotkeys({\n zIndex: 50,\n disabled: !open,\n keys: {\n esc: onClose\n }\n });\n\n const { fileDetails } = useFileManagerViewConfig();\n\n const drawerWidth = fileDetails.width.split(\",\")[0];\n\n const formRef = useRef<FormAPI | null>(null);\n\n return (\n <FileDetailsPortal>\n {file && (\n <FileProvider file={file}>\n <Drawer\n title={file.name}\n description={<Description />}\n width={drawerWidth}\n open={open}\n modal={true}\n bodyPadding={false}\n headerSeparator={true}\n footerSeparator={true}\n onClose={onClose}\n data-testid={\"fm.file-details.drawer\"}\n actions={\n <>\n <Drawer.CancelButton text={\"Cancel\"} />\n <Drawer.ConfirmButton\n text={\"Update\"}\n onClick={() => formRef.current?.submit()}\n />\n </>\n }\n >\n {loading && <OverlayLoader text={loading} />}\n <FileDetailsProvider hideFileDetails={onClose} onSetFile={onSetFile}>\n <FileDetailsInner\n onForm={form => {\n formRef.current = form;\n }}\n file={file}\n onClose={onClose}\n onSubmit={onSave}\n />\n </FileDetailsProvider>\n </Drawer>\n </FileProvider>\n )}\n </FileDetailsPortal>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,OAAO,EAAEC,MAAM,QAAQ,OAAO;AACzD,OAAOC,QAAQ,MAAM,WAAW;AAChC,OAAOC,IAAI,MAAM,aAAa;AAC9B;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a;MACjBD,IAAI,EAAE,QAAS;MACfE,OAAO,EAAEA,CAAA,KAAM7E,OAAO,CAACE,OAAO,EAAE4E,MAAM,CAAC;IAAE,CAC5C,CACH;EACL,GAEAnB,OAAO,iBAAIrF,KAAA,CAAA6C,aAAA,CAACpC,aAAa;IAAC4F,IAAI,EAAEhB;EAAQ,CAAE,CAAC,eAC5CrF,KAAA,CAAA6C,aAAA,CAAChC,mBAAmB;IAAC4F,eAAe,EAAEtB,OAAQ;IAACG,SAAS,EAAEA;EAAU,gBAChEtF,KAAA,CAAA6C,aAAA,CAACvB,gBAAgB;IACbE,MAAM,EAAEkF,IAAI,IAAI;MACZhF,OAAO,CAACE,OAAO,GAAG8E,IAAI;IAC1B,CAAE;IACFnF,IAAI,EAAEA,IAAK;IACX4D,OAAO,EAAEA,OAAQ;IACjB1C,QAAQ,EAAE2C;EAAO,CACpB,CACgB,CACjB,CACE,CAEH,CAAC;AAE5B,CAAC","ignoreList":[]}
|
|
@@ -1,25 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var FileDetailsProvider = exports.FileDetailsProvider = function FileDetailsProvider(_ref) {
|
|
12
|
-
var hideFileDetails = _ref.hideFileDetails,
|
|
13
|
-
onSetFile = _ref.onSetFile,
|
|
14
|
-
children = _ref.children;
|
|
15
|
-
var view = (0, _FileManagerViewProvider.useFileManagerView)();
|
|
16
|
-
var value = {
|
|
1
|
+
import React, { createContext } from "react";
|
|
2
|
+
import { useFileManagerView } from "../../modules/FileManagerRenderer/FileManagerViewProvider";
|
|
3
|
+
export const FileDetailsContext = /*#__PURE__*/createContext(undefined);
|
|
4
|
+
export const FileDetailsProvider = ({
|
|
5
|
+
hideFileDetails,
|
|
6
|
+
onSetFile,
|
|
7
|
+
children
|
|
8
|
+
}) => {
|
|
9
|
+
const view = useFileManagerView();
|
|
10
|
+
const value = {
|
|
17
11
|
close: hideFileDetails,
|
|
18
12
|
scope: view.scope,
|
|
19
13
|
own: view.own,
|
|
20
14
|
setFile: onSetFile
|
|
21
15
|
};
|
|
22
|
-
return /*#__PURE__*/
|
|
16
|
+
return /*#__PURE__*/React.createElement(FileDetailsContext.Provider, {
|
|
23
17
|
value: value
|
|
24
18
|
}, children);
|
|
25
19
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["React","createContext","useFileManagerView","FileDetailsContext","undefined","FileDetailsProvider","hideFileDetails","onSetFile","children","view","value","close","scope","own","setFile","createElement","Provider"],"sources":["FileDetailsProvider.tsx"],"sourcesContent":["import React, { createContext } from \"react\";\nimport { useFileManagerView } from \"~/modules/FileManagerRenderer/FileManagerViewProvider\";\nimport type { FileItem } from \"@webiny/app-admin/types\";\n\nexport interface FileDetailsContext {\n close: () => void;\n setFile: (file: FileItem) => void;\n own: boolean;\n scope?: string;\n}\n\nexport const FileDetailsContext = createContext<FileDetailsContext | undefined>(undefined);\n\ninterface FileDetailsProviderProps {\n hideFileDetails: () => void;\n onSetFile: (file: FileItem) => void;\n children: React.ReactNode;\n}\n\nexport const FileDetailsProvider = ({\n hideFileDetails,\n onSetFile,\n children\n}: FileDetailsProviderProps) => {\n const view = useFileManagerView();\n\n const value: FileDetailsContext = {\n close: hideFileDetails,\n scope: view.scope,\n own: view.own,\n setFile: onSetFile\n };\n\n return <FileDetailsContext.Provider value={value}>{children}</FileDetailsContext.Provider>;\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,aAAa,QAAQ,OAAO;AAC5C,SAASC,kBAAkB;AAU3B,OAAO,MAAMC,kBAAkB,gBAAGF,aAAa,CAAiCG,SAAS,CAAC;AAQ1F,OAAO,MAAMC,mBAAmB,GAAGA,CAAC;EAChCC,eAAe;EACfC,SAAS;EACTC;AACsB,CAAC,KAAK;EAC5B,MAAMC,IAAI,GAAGP,kBAAkB,CAAC,CAAC;EAEjC,MAAMQ,KAAyB,GAAG;IAC9BC,KAAK,EAAEL,eAAe;IACtBM,KAAK,EAAEH,IAAI,CAACG,KAAK;IACjBC,GAAG,EAAEJ,IAAI,CAACI,GAAG;IACbC,OAAO,EAAEP;EACb,CAAC;EAED,oBAAOP,KAAA,CAAAe,aAAA,CAACZ,kBAAkB,CAACa,QAAQ;IAACN,KAAK,EAAEA;EAAM,GAAEF,QAAsC,CAAC;AAC9F,CAAC","ignoreList":[]}
|
|
@@ -5,5 +5,6 @@ export interface ActionButtonProps {
|
|
|
5
5
|
onAction: () => void;
|
|
6
6
|
"data-testid"?: string;
|
|
7
7
|
disabled?: boolean;
|
|
8
|
+
className?: string;
|
|
8
9
|
}
|
|
9
|
-
export declare const ActionButton: ({ label, icon, onAction, disabled, ...props }: ActionButtonProps) => React.JSX.Element;
|
|
10
|
+
export declare const ActionButton: ({ label, icon, onAction, disabled, className, ...props }: ActionButtonProps) => React.JSX.Element;
|
|
@@ -1,30 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
var ActionButton = exports.ActionButton = function ActionButton(_ref) {
|
|
14
|
-
var label = _ref.label,
|
|
15
|
-
icon = _ref.icon,
|
|
16
|
-
onAction = _ref.onAction,
|
|
17
|
-
disabled = _ref.disabled,
|
|
18
|
-
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
19
|
-
return /*#__PURE__*/_react.default.createElement(_Tooltip.Tooltip, {
|
|
20
|
-
content: /*#__PURE__*/_react.default.createElement("span", null, label),
|
|
21
|
-
placement: "bottom"
|
|
22
|
-
}, /*#__PURE__*/_react.default.createElement(_Button.IconButton, {
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Button } from "@webiny/admin-ui";
|
|
3
|
+
export const ActionButton = ({
|
|
4
|
+
label,
|
|
5
|
+
icon,
|
|
6
|
+
onAction,
|
|
7
|
+
disabled,
|
|
8
|
+
className,
|
|
9
|
+
...props
|
|
10
|
+
}) => {
|
|
11
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
12
|
+
text: label,
|
|
23
13
|
icon: icon,
|
|
24
14
|
onClick: onAction,
|
|
25
15
|
disabled: disabled,
|
|
26
|
-
"data-testid": props["data-testid"]
|
|
27
|
-
|
|
16
|
+
"data-testid": props["data-testid"],
|
|
17
|
+
containerClassName: className,
|
|
18
|
+
variant: "ghost",
|
|
19
|
+
size: "sm"
|
|
20
|
+
});
|
|
28
21
|
};
|
|
29
22
|
|
|
30
23
|
//# sourceMappingURL=ActionButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["React","Button","ActionButton","label","icon","onAction","disabled","className","props","createElement","text","onClick","containerClassName","variant","size"],"sources":["ActionButton.tsx"],"sourcesContent":["import React from \"react\";\nimport { Button } from \"@webiny/admin-ui\";\n\nexport interface ActionButtonProps {\n label: string;\n icon: JSX.Element;\n onAction: () => void;\n \"data-testid\"?: string;\n disabled?: boolean;\n className?: string;\n}\n\nexport const ActionButton = ({\n label,\n icon,\n onAction,\n disabled,\n className,\n ...props\n}: ActionButtonProps) => {\n return (\n <Button\n text={label}\n icon={icon}\n onClick={onAction}\n disabled={disabled}\n data-testid={props[\"data-testid\"]}\n containerClassName={className}\n variant={\"ghost\"}\n size={\"sm\"}\n />\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,MAAM,QAAQ,kBAAkB;AAWzC,OAAO,MAAMC,YAAY,GAAGA,CAAC;EACzBC,KAAK;EACLC,IAAI;EACJC,QAAQ;EACRC,QAAQ;EACRC,SAAS;EACT,GAAGC;AACY,CAAC,KAAK;EACrB,oBACIR,KAAA,CAAAS,aAAA,CAACR,MAAM;IACHS,IAAI,EAAEP,KAAM;IACZC,IAAI,EAAEA,IAAK;IACXO,OAAO,EAAEN,QAAS;IAClBC,QAAQ,EAAEA,QAAS;IACnB,eAAaE,KAAK,CAAC,aAAa,CAAE;IAClCI,kBAAkB,EAAEL,SAAU;IAC9BM,OAAO,EAAE,OAAQ;IACjBC,IAAI,EAAE;EAAK,CACd,CAAC;AAEV,CAAC","ignoreList":[]}
|
|
@@ -1,37 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
13
|
-
var ActionsContainer = /*#__PURE__*/(0, _base.default)("div", process.env.NODE_ENV === "production" ? {
|
|
14
|
-
target: "e151g3xw0"
|
|
15
|
-
} : {
|
|
16
|
-
target: "e151g3xw0",
|
|
17
|
-
label: "ActionsContainer"
|
|
18
|
-
})(process.env.NODE_ENV === "production" ? {
|
|
19
|
-
name: "lt3t2",
|
|
20
|
-
styles: "text-align:center;border-bottom:1px solid var(--mdc-theme-on-background)"
|
|
21
|
-
} : {
|
|
22
|
-
name: "lt3t2",
|
|
23
|
-
styles: "text-align:center;border-bottom:1px solid var(--mdc-theme-on-background)",
|
|
24
|
-
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkFjdGlvbnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUltQyIsImZpbGUiOiJBY3Rpb25zLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBSZWFjdCwgeyBGcmFnbWVudCB9IGZyb20gXCJyZWFjdFwiO1xuaW1wb3J0IHN0eWxlZCBmcm9tIFwiQGVtb3Rpb24vc3R5bGVkXCI7XG5pbXBvcnQgeyB1c2VGaWxlTWFuYWdlclZpZXdDb25maWcgfSBmcm9tIFwifi9pbmRleFwiO1xuXG5jb25zdCBBY3Rpb25zQ29udGFpbmVyID0gc3R5bGVkLmRpdmBcbiAgICB0ZXh0LWFsaWduOiBjZW50ZXI7XG4gICAgYm9yZGVyLWJvdHRvbTogMXB4IHNvbGlkIHZhcigtLW1kYy10aGVtZS1vbi1iYWNrZ3JvdW5kKTtcbmA7XG5cbmV4cG9ydCBjb25zdCBBY3Rpb25zID0gKCkgPT4ge1xuICAgIGNvbnN0IHsgZmlsZURldGFpbHMgfSA9IHVzZUZpbGVNYW5hZ2VyVmlld0NvbmZpZygpO1xuXG4gICAgcmV0dXJuIChcbiAgICAgICAgPEFjdGlvbnNDb250YWluZXI+XG4gICAgICAgICAgICB7ZmlsZURldGFpbHMuYWN0aW9ucy5tYXAoYWN0aW9uID0+IChcbiAgICAgICAgICAgICAgICA8RnJhZ21lbnQga2V5PXthY3Rpb24ubmFtZX0+e2FjdGlvbi5lbGVtZW50fTwvRnJhZ21lbnQ+XG4gICAgICAgICAgICApKX1cbiAgICAgICAgPC9BY3Rpb25zQ29udGFpbmVyPlxuICAgICk7XG59O1xuIl19 */",
|
|
25
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
26
|
-
});
|
|
27
|
-
var Actions = exports.Actions = function Actions() {
|
|
28
|
-
var _useFileManagerViewCo = (0, _.useFileManagerViewConfig)(),
|
|
29
|
-
fileDetails = _useFileManagerViewCo.fileDetails;
|
|
30
|
-
return /*#__PURE__*/_react.default.createElement(ActionsContainer, null, fileDetails.actions.map(function (action) {
|
|
31
|
-
return /*#__PURE__*/_react.default.createElement(_react.Fragment, {
|
|
32
|
-
key: action.name
|
|
33
|
-
}, action.element);
|
|
34
|
-
}));
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { useFileManagerViewConfig } from "../../..";
|
|
3
|
+
export const Actions = () => {
|
|
4
|
+
const {
|
|
5
|
+
fileDetails
|
|
6
|
+
} = useFileManagerViewConfig();
|
|
7
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
8
|
+
className: "wby-flex wby-justify-start wby-gap-xs"
|
|
9
|
+
}, fileDetails.actions.map(action => /*#__PURE__*/React.createElement(React.Fragment, {
|
|
10
|
+
key: action.name
|
|
11
|
+
}, action.element)));
|
|
35
12
|
};
|
|
36
13
|
|
|
37
14
|
//# sourceMappingURL=Actions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["React","useFileManagerViewConfig","Actions","fileDetails","createElement","className","actions","map","action","Fragment","key","name","element"],"sources":["Actions.tsx"],"sourcesContent":["import React from \"react\";\nimport { useFileManagerViewConfig } from \"~/index\";\n\nexport const Actions = () => {\n const { fileDetails } = useFileManagerViewConfig();\n\n return (\n <div className={\"wby-flex wby-justify-start wby-gap-xs\"}>\n {fileDetails.actions.map(action => (\n <React.Fragment key={action.name}>{action.element}</React.Fragment>\n ))}\n </div>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,wBAAwB;AAEjC,OAAO,MAAMC,OAAO,GAAGA,CAAA,KAAM;EACzB,MAAM;IAAEC;EAAY,CAAC,GAAGF,wBAAwB,CAAC,CAAC;EAElD,oBACID,KAAA,CAAAI,aAAA;IAAKC,SAAS,EAAE;EAAwC,GACnDF,WAAW,CAACG,OAAO,CAACC,GAAG,CAACC,MAAM,iBAC3BR,KAAA,CAAAI,aAAA,CAACJ,KAAK,CAACS,QAAQ;IAACC,GAAG,EAAEF,MAAM,CAACG;EAAK,GAAEH,MAAM,CAACI,OAAwB,CACrE,CACA,CAAC;AAEd,CAAC","ignoreList":[]}
|