@webiny/app-file-manager 0.0.0-mt-2 → 0.0.0-unstable.06b2ede40f
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 +34 -0
- package/BatchFileUploader.js +87 -0
- package/BatchFileUploader.js.map +1 -0
- package/app.d.ts +2 -0
- package/app.js +11 -0
- package/app.js.map +1 -0
- package/components/BottomInfoBar/BottomInfoBar.d.ts +6 -0
- package/components/BottomInfoBar/BottomInfoBar.js +23 -0
- package/components/BottomInfoBar/BottomInfoBar.js.map +1 -0
- package/components/BottomInfoBar/ListStatus.d.ts +6 -0
- package/components/BottomInfoBar/ListStatus.js +23 -0
- package/components/BottomInfoBar/ListStatus.js.map +1 -0
- package/components/BottomInfoBar/SupportedFileTypes.d.ts +9 -0
- package/components/BottomInfoBar/SupportedFileTypes.js +60 -0
- package/components/BottomInfoBar/SupportedFileTypes.js.map +1 -0
- package/components/BottomInfoBar/index.d.ts +1 -0
- package/components/BottomInfoBar/index.js +3 -0
- package/components/BottomInfoBar/index.js.map +1 -0
- package/components/BulkActions/ActionDelete.d.ts +4 -0
- package/components/BulkActions/ActionDelete.js +80 -0
- package/components/BulkActions/ActionDelete.js.map +1 -0
- package/components/BulkActions/ActionEdit/ActionEdit.d.ts +4 -0
- package/components/BulkActions/ActionEdit/ActionEdit.js +62 -0
- package/components/BulkActions/ActionEdit/ActionEdit.js.map +1 -0
- package/components/BulkActions/ActionEdit/ActionEdit.types.d.ts +2 -0
- package/components/BulkActions/ActionEdit/ActionEdit.types.js +3 -0
- package/components/BulkActions/ActionEdit/ActionEdit.types.js.map +1 -0
- package/components/BulkActions/ActionEdit/ActionEditPresenter.d.ts +35 -0
- package/components/BulkActions/ActionEdit/ActionEditPresenter.js +55 -0
- package/components/BulkActions/ActionEdit/ActionEditPresenter.js.map +1 -0
- package/components/BulkActions/ActionEdit/ActionEditPresenter.test.d.ts +1 -0
- package/components/BulkActions/ActionEdit/ActionEditPresenter.test.js +158 -0
- package/components/BulkActions/ActionEdit/ActionEditPresenter.test.js.map +1 -0
- package/components/BulkActions/ActionEdit/BatchEditorDialog/AddOperation.d.ts +7 -0
- package/components/BulkActions/ActionEdit/BatchEditorDialog/AddOperation.js +19 -0
- package/components/BulkActions/ActionEdit/BatchEditorDialog/AddOperation.js.map +1 -0
- package/components/BulkActions/ActionEdit/BatchEditorDialog/BatchEditor.d.ts +15 -0
- package/components/BulkActions/ActionEdit/BatchEditorDialog/BatchEditor.js +45 -0
- package/components/BulkActions/ActionEdit/BatchEditorDialog/BatchEditor.js.map +1 -0
- package/components/BulkActions/ActionEdit/BatchEditorDialog/BatchEditorDialog.d.ts +15 -0
- package/components/BulkActions/ActionEdit/BatchEditorDialog/BatchEditorDialog.js +52 -0
- package/components/BulkActions/ActionEdit/BatchEditorDialog/BatchEditorDialog.js.map +1 -0
- package/components/BulkActions/ActionEdit/BatchEditorDialog/BatchEditorDialogPresenter.d.ts +61 -0
- package/components/BulkActions/ActionEdit/BatchEditorDialog/BatchEditorDialogPresenter.js +140 -0
- package/components/BulkActions/ActionEdit/BatchEditorDialog/BatchEditorDialogPresenter.js.map +1 -0
- package/components/BulkActions/ActionEdit/BatchEditorDialog/BatchEditorDialogPresenter.test.d.ts +1 -0
- package/components/BulkActions/ActionEdit/BatchEditorDialog/BatchEditorDialogPresenter.test.js +336 -0
- package/components/BulkActions/ActionEdit/BatchEditorDialog/BatchEditorDialogPresenter.test.js.map +1 -0
- package/components/BulkActions/ActionEdit/BatchEditorDialog/FieldRenderer.d.ts +8 -0
- package/components/BulkActions/ActionEdit/BatchEditorDialog/FieldRenderer.js +33 -0
- package/components/BulkActions/ActionEdit/BatchEditorDialog/FieldRenderer.js.map +1 -0
- package/components/BulkActions/ActionEdit/BatchEditorDialog/Operation.d.ts +11 -0
- package/components/BulkActions/ActionEdit/BatchEditorDialog/Operation.js +41 -0
- package/components/BulkActions/ActionEdit/BatchEditorDialog/Operation.js.map +1 -0
- package/components/BulkActions/ActionEdit/BatchEditorDialog/index.d.ts +1 -0
- package/components/BulkActions/ActionEdit/BatchEditorDialog/index.js +3 -0
- package/components/BulkActions/ActionEdit/BatchEditorDialog/index.js.map +1 -0
- package/components/BulkActions/ActionEdit/GraphQLInputMapper.d.ts +41 -0
- package/components/BulkActions/ActionEdit/GraphQLInputMapper.js +44 -0
- package/components/BulkActions/ActionEdit/GraphQLInputMapper.js.map +1 -0
- package/components/BulkActions/ActionEdit/GraphQLInputMapper.test.d.ts +1 -0
- package/components/BulkActions/ActionEdit/GraphQLInputMapper.test.js +270 -0
- package/components/BulkActions/ActionEdit/GraphQLInputMapper.test.js.map +1 -0
- package/components/BulkActions/ActionEdit/domain/Batch.d.ts +53 -0
- package/components/BulkActions/ActionEdit/domain/Batch.js +29 -0
- package/components/BulkActions/ActionEdit/domain/Batch.js.map +1 -0
- package/components/BulkActions/ActionEdit/domain/BatchMapper.d.ts +4 -0
- package/components/BulkActions/ActionEdit/domain/BatchMapper.js +13 -0
- package/components/BulkActions/ActionEdit/domain/BatchMapper.js.map +1 -0
- package/components/BulkActions/ActionEdit/domain/Field.d.ts +32 -0
- package/components/BulkActions/ActionEdit/domain/Field.js +47 -0
- package/components/BulkActions/ActionEdit/domain/Field.js.map +1 -0
- package/components/BulkActions/ActionEdit/domain/FieldMapper.d.ts +7 -0
- package/components/BulkActions/ActionEdit/domain/FieldMapper.js +22 -0
- package/components/BulkActions/ActionEdit/domain/FieldMapper.js.map +1 -0
- package/components/BulkActions/ActionEdit/domain/index.d.ts +4 -0
- package/components/BulkActions/ActionEdit/domain/index.js +6 -0
- package/components/BulkActions/ActionEdit/domain/index.js.map +1 -0
- package/components/BulkActions/ActionEdit/index.d.ts +1 -0
- package/components/BulkActions/ActionEdit/index.js +3 -0
- package/components/BulkActions/ActionEdit/index.js.map +1 -0
- package/components/BulkActions/ActionEdit/useActionEditWorker.d.ts +7 -0
- package/components/BulkActions/ActionEdit/useActionEditWorker.js +73 -0
- package/components/BulkActions/ActionEdit/useActionEditWorker.js.map +1 -0
- package/components/BulkActions/ActionMove.d.ts +4 -0
- package/components/BulkActions/ActionMove.js +91 -0
- package/components/BulkActions/ActionMove.js.map +1 -0
- package/components/BulkActions/BulkActions.d.ts +3 -0
- package/components/BulkActions/BulkActions.js +46 -0
- package/components/BulkActions/BulkActions.js.map +1 -0
- package/components/BulkActions/index.d.ts +4 -0
- package/components/BulkActions/index.js +6 -0
- package/components/BulkActions/index.js.map +1 -0
- package/components/EditFileUsingUrl/EditFileUsingUrl.d.ts +14 -0
- package/components/EditFileUsingUrl/EditFileUsingUrl.js +53 -0
- package/components/EditFileUsingUrl/EditFileUsingUrl.js.map +1 -0
- package/components/EditFileUsingUrl/EditFileUsingUrlPresenter.d.ts +18 -0
- package/components/EditFileUsingUrl/EditFileUsingUrlPresenter.js +43 -0
- package/components/EditFileUsingUrl/EditFileUsingUrlPresenter.js.map +1 -0
- package/components/EditFileUsingUrl/EditFileUsingUrlRepository.d.ts +17 -0
- package/components/EditFileUsingUrl/EditFileUsingUrlRepository.js +39 -0
- package/components/EditFileUsingUrl/EditFileUsingUrlRepository.js.map +1 -0
- package/components/EditFileUsingUrl/GetFileByUrl.d.ts +10 -0
- package/components/EditFileUsingUrl/GetFileByUrl.js +27 -0
- package/components/EditFileUsingUrl/GetFileByUrl.js.map +1 -0
- package/components/EditFileUsingUrl/Loading.d.ts +18 -0
- package/components/EditFileUsingUrl/Loading.js +42 -0
- package/components/EditFileUsingUrl/Loading.js.map +1 -0
- package/components/EditFileUsingUrl/UpdateFile.d.ts +10 -0
- package/components/EditFileUsingUrl/UpdateFile.js +10 -0
- package/components/EditFileUsingUrl/UpdateFile.js.map +1 -0
- package/components/EditFileUsingUrl/getFileByUrl.graphql.d.ts +2 -0
- package/components/EditFileUsingUrl/getFileByUrl.graphql.js +19 -0
- package/components/EditFileUsingUrl/getFileByUrl.graphql.js.map +1 -0
- package/components/EditFileUsingUrl/index.d.ts +1 -0
- package/components/EditFileUsingUrl/index.js +3 -0
- package/components/EditFileUsingUrl/index.js.map +1 -0
- package/components/Empty/Empty.d.ts +8 -0
- package/components/Empty/Empty.js +27 -0
- package/components/Empty/Empty.js.map +1 -0
- package/components/Empty/index.d.ts +1 -0
- package/components/Empty/index.js +3 -0
- package/components/Empty/index.js.map +1 -0
- package/components/FileDetails/FileDetails.d.ts +11 -0
- package/components/FileDetails/FileDetails.js +155 -0
- package/components/FileDetails/FileDetails.js.map +1 -0
- package/components/FileDetails/FileDetailsProvider.d.ts +16 -0
- package/components/FileDetails/FileDetailsProvider.js +21 -0
- package/components/FileDetails/FileDetailsProvider.js.map +1 -0
- package/components/FileDetails/components/ActionButton.d.ts +10 -0
- package/components/FileDetails/components/ActionButton.js +23 -0
- package/components/FileDetails/components/ActionButton.js.map +1 -0
- package/components/FileDetails/components/Actions.d.ts +2 -0
- package/components/FileDetails/components/Actions.js +14 -0
- package/components/FileDetails/components/Actions.js.map +1 -0
- package/components/FileDetails/components/BaseFields.d.ts +7 -0
- package/components/FileDetails/components/BaseFields.js +29 -0
- package/components/FileDetails/components/BaseFields.js.map +1 -0
- package/components/FileDetails/components/Content.d.ts +14 -0
- package/components/FileDetails/components/Content.js +35 -0
- package/components/FileDetails/components/Content.js.map +1 -0
- package/components/FileDetails/components/CreatedOn.d.ts +2 -0
- package/components/FileDetails/components/CreatedOn.js +22 -0
- package/components/FileDetails/components/CreatedOn.js.map +1 -0
- 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 +7 -0
- package/components/FileDetails/components/Extensions.js +36 -0
- package/components/FileDetails/components/Extensions.js.map +1 -0
- package/components/FileDetails/components/Preview.d.ts +2 -0
- package/components/FileDetails/components/Preview.js +12 -0
- package/components/FileDetails/components/Preview.js.map +1 -0
- package/components/FileDetails/components/Thumbnail.d.ts +2 -0
- package/components/FileDetails/components/Thumbnail.js +16 -0
- package/components/FileDetails/components/Thumbnail.js.map +1 -0
- package/components/FileDetails/index.d.ts +1 -0
- package/components/FileDetails/index.js +3 -0
- package/components/FileDetails/index.js.map +1 -0
- 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.d.ts +2 -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 +9 -0
- package/components/Grid/ActionButton.js +28 -0
- package/components/Grid/ActionButton.js.map +1 -0
- package/components/Grid/File.d.ts +32 -0
- package/components/Grid/File.js +89 -0
- package/components/Grid/File.js.map +1 -0
- package/components/Grid/Grid.d.ts +19 -0
- package/components/Grid/Grid.js +69 -0
- package/components/Grid/Grid.js.map +1 -0
- package/components/Grid/Thumbnail.d.ts +2 -0
- package/components/Grid/Thumbnail.js +16 -0
- package/components/Grid/Thumbnail.js.map +1 -0
- package/components/Grid/index.d.ts +1 -0
- package/components/Grid/index.js +3 -0
- package/components/Grid/index.js.map +1 -0
- 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.d.ts +2 -0
- package/components/LayoutSwitch/LayoutSwitch.js +22 -0
- package/components/LayoutSwitch/LayoutSwitch.js.map +1 -0
- package/components/LayoutSwitch/index.d.ts +1 -0
- package/components/LayoutSwitch/index.js +3 -0
- package/components/LayoutSwitch/index.js.map +1 -0
- 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.d.ts +2 -0
- package/components/NoResults/NoResults.js +22 -0
- package/components/NoResults/NoResults.js.map +1 -0
- package/components/NoResults/index.d.ts +1 -0
- package/components/NoResults/index.js +3 -0
- package/components/NoResults/index.js.map +1 -0
- package/components/SearchWidget/SearchWidget.d.ts +2 -0
- 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.d.ts +2 -0
- package/components/Table/Actions/CopyFile.js +26 -0
- package/components/Table/Actions/CopyFile.js.map +1 -0
- package/components/Table/Actions/DeleteFile.d.ts +2 -0
- package/components/Table/Actions/DeleteFile.js +33 -0
- package/components/Table/Actions/DeleteFile.js.map +1 -0
- package/components/Table/Actions/EditFile.d.ts +2 -0
- package/components/Table/Actions/EditFile.js +24 -0
- package/components/Table/Actions/EditFile.js.map +1 -0
- package/components/Table/Actions/MoveFile.d.ts +2 -0
- package/components/Table/Actions/MoveFile.js +22 -0
- package/components/Table/Actions/MoveFile.js.map +1 -0
- package/components/Table/Actions/index.d.ts +4 -0
- package/components/Table/Actions/index.js +6 -0
- package/components/Table/Actions/index.js.map +1 -0
- package/components/Table/Cells/CellActions.d.ts +2 -0
- package/components/Table/Cells/CellActions.js +38 -0
- package/components/Table/Cells/CellActions.js.map +1 -0
- package/components/Table/Cells/CellAuthor.d.ts +2 -0
- package/components/Table/Cells/CellAuthor.js +13 -0
- package/components/Table/Cells/CellAuthor.js.map +1 -0
- package/components/Table/Cells/CellCreated.d.ts +2 -0
- package/components/Table/Cells/CellCreated.js +16 -0
- package/components/Table/Cells/CellCreated.js.map +1 -0
- package/components/Table/Cells/CellModified.d.ts +2 -0
- package/components/Table/Cells/CellModified.js +16 -0
- package/components/Table/Cells/CellModified.js.map +1 -0
- package/components/Table/Cells/CellName.d.ts +16 -0
- package/components/Table/Cells/CellName.js +70 -0
- package/components/Table/Cells/CellName.js.map +1 -0
- package/components/Table/Cells/CellSize.d.ts +2 -0
- package/components/Table/Cells/CellSize.js +20 -0
- package/components/Table/Cells/CellSize.js.map +1 -0
- 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.d.ts +2 -0
- package/components/Table/Cells/CellType.js +17 -0
- package/components/Table/Cells/CellType.js.map +1 -0
- package/components/Table/Cells/index.d.ts +7 -0
- package/components/Table/Cells/index.js +9 -0
- package/components/Table/Cells/index.js.map +1 -0
- package/components/Table/Table.d.ts +10 -0
- package/components/Table/Table.js +30 -0
- package/components/Table/Table.js.map +1 -0
- package/components/Table/index.d.ts +3 -0
- package/components/Table/index.js +5 -0
- package/components/Table/index.js.map +1 -0
- package/components/TagsList/Empty.d.ts +6 -0
- 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/components/TagsList/Tag.d.ts +9 -0
- 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/components/TagsList/TagsList.d.ts +11 -0
- package/components/TagsList/TagsList.js +31 -0
- package/components/TagsList/TagsList.js.map +1 -0
- package/components/TagsList/index.d.ts +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 +8 -0
- package/components/UploadStatus/UploadStatus.js +38 -0
- package/components/UploadStatus/UploadStatus.js.map +1 -0
- package/components/UploadStatus/index.d.ts +1 -0
- package/components/UploadStatus/index.js +3 -0
- package/components/UploadStatus/index.js.map +1 -0
- package/components/fields/AccessControl.d.ts +7 -0
- package/components/fields/AccessControl.js +49 -0
- package/components/fields/AccessControl.js.map +1 -0
- package/components/fields/Aliases.d.ts +2 -0
- package/components/fields/Aliases.js +85 -0
- package/components/fields/Aliases.js.map +1 -0
- package/components/fields/Name.d.ts +2 -0
- package/components/fields/Name.js +29 -0
- package/components/fields/Name.js.map +1 -0
- package/components/fields/Tags.d.ts +2 -0
- package/components/fields/Tags.js +39 -0
- package/components/fields/Tags.js.map +1 -0
- package/components/fields/index.d.ts +4 -0
- package/components/fields/index.js +6 -0
- package/components/fields/index.js.map +1 -0
- package/components/fields/useAccessControlField.d.ts +7 -0
- package/components/fields/useAccessControlField.js +26 -0
- package/components/fields/useAccessControlField.js.map +1 -0
- package/components/fields/useFileOrUndefined.d.ts +3 -0
- package/components/fields/useFileOrUndefined.js +12 -0
- package/components/fields/useFileOrUndefined.js.map +1 -0
- package/constants.d.ts +4 -0
- package/constants.js +6 -0
- package/constants.js.map +1 -0
- package/contexts/FileProvider.d.ts +13 -0
- package/contexts/FileProvider.js +22 -0
- package/contexts/FileProvider.js.map +1 -0
- package/hooks/useCopyFile.d.ts +11 -0
- package/hooks/useCopyFile.js +25 -0
- package/hooks/useCopyFile.js.map +1 -0
- package/hooks/useDeleteFile.d.ts +9 -0
- package/hooks/useDeleteFile.js +44 -0
- package/hooks/useDeleteFile.js.map +1 -0
- package/hooks/useFile.d.ts +2 -0
- package/hooks/useFile.js +11 -0
- package/hooks/useFile.js.map +1 -0
- package/hooks/useFileDetails.d.ts +2 -0
- package/hooks/useFileDetails.js +11 -0
- package/hooks/useFileDetails.js.map +1 -0
- package/hooks/useFileModel.d.ts +1 -0
- package/hooks/useFileModel.js +11 -0
- package/hooks/useFileModel.js.map +1 -0
- package/hooks/useMoveFileToFolder.d.ts +2 -0
- package/hooks/useMoveFileToFolder.js +32 -0
- package/hooks/useMoveFileToFolder.js.map +1 -0
- package/index.d.ts +8 -0
- package/index.js +10 -0
- package/index.js.map +1 -0
- package/modules/Enterprise/HandleWebsocketMessages.d.ts +1 -0
- package/modules/Enterprise/HandleWebsocketMessages.js +57 -0
- package/modules/Enterprise/HandleWebsocketMessages.js.map +1 -0
- 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.d.ts +3 -0
- package/modules/Enterprise/constants.js +5 -0
- package/modules/Enterprise/constants.js.map +1 -0
- package/modules/Enterprise/index.d.ts +2 -0
- package/modules/Enterprise/index.js +40 -0
- package/modules/Enterprise/index.js.map +1 -0
- package/modules/FileManagerApiProvider/FileManagerApiContext/FileManagerApiContext.d.ts +44 -0
- package/modules/FileManagerApiProvider/FileManagerApiContext/FileManagerApiContext.js +210 -0
- package/modules/FileManagerApiProvider/FileManagerApiContext/FileManagerApiContext.js.map +1 -0
- package/modules/FileManagerApiProvider/FileManagerApiContext/FileModelContext.d.ts +6 -0
- package/modules/FileManagerApiProvider/FileManagerApiContext/FileModelContext.js +25 -0
- package/modules/FileManagerApiProvider/FileManagerApiContext/FileModelContext.js.map +1 -0
- package/modules/FileManagerApiProvider/FileManagerApiContext/getFileGraphQLSelection.d.ts +2 -0
- package/modules/FileManagerApiProvider/FileManagerApiContext/getFileGraphQLSelection.js +30 -0
- package/modules/FileManagerApiProvider/FileManagerApiContext/getFileGraphQLSelection.js.map +1 -0
- package/modules/FileManagerApiProvider/FileManagerApiContext/getFileUploader.d.ts +2 -0
- package/modules/FileManagerApiProvider/FileManagerApiContext/getFileUploader.js +10 -0
- package/modules/FileManagerApiProvider/FileManagerApiContext/getFileUploader.js.map +1 -0
- package/modules/FileManagerApiProvider/FileManagerApiContext/index.d.ts +3 -0
- package/modules/FileManagerApiProvider/FileManagerApiContext/index.js +5 -0
- package/modules/FileManagerApiProvider/FileManagerApiContext/index.js.map +1 -0
- package/modules/FileManagerApiProvider/FileManagerApiContext/useFileManagerApi.d.ts +3 -0
- package/modules/FileManagerApiProvider/FileManagerApiContext/useFileManagerApi.js +11 -0
- package/modules/FileManagerApiProvider/FileManagerApiContext/useFileManagerApi.js.map +1 -0
- package/modules/FileManagerApiProvider/graphql.d.ts +125 -0
- package/modules/FileManagerApiProvider/graphql.js +118 -0
- package/modules/FileManagerApiProvider/graphql.js.map +1 -0
- package/modules/FileManagerApiProvider/index.d.ts +2 -0
- package/modules/FileManagerApiProvider/index.js +18 -0
- package/modules/FileManagerApiProvider/index.js.map +1 -0
- package/modules/FileManagerRenderer/FileActions/FileDetails/CopyUrl.d.ts +2 -0
- package/modules/FileManagerRenderer/FileActions/FileDetails/CopyUrl.js +24 -0
- package/modules/FileManagerRenderer/FileActions/FileDetails/CopyUrl.js.map +1 -0
- package/modules/FileManagerRenderer/FileActions/FileDetails/DeleteImage.d.ts +2 -0
- package/modules/FileManagerRenderer/FileActions/FileDetails/DeleteImage.js +35 -0
- package/modules/FileManagerRenderer/FileActions/FileDetails/DeleteImage.js.map +1 -0
- package/modules/FileManagerRenderer/FileActions/FileDetails/Download.d.ts +2 -0
- package/modules/FileManagerRenderer/FileActions/FileDetails/Download.js +24 -0
- package/modules/FileManagerRenderer/FileActions/FileDetails/Download.js.map +1 -0
- package/modules/FileManagerRenderer/FileActions/FileDetails/EditImage.d.ts +2 -0
- package/modules/FileManagerRenderer/FileActions/FileDetails/EditImage.js +111 -0
- package/modules/FileManagerRenderer/FileActions/FileDetails/EditImage.js.map +1 -0
- package/modules/FileManagerRenderer/FileActions/FileDetails/MoveToFolder.d.ts +2 -0
- package/modules/FileManagerRenderer/FileActions/FileDetails/MoveToFolder.js +19 -0
- package/modules/FileManagerRenderer/FileActions/FileDetails/MoveToFolder.js.map +1 -0
- 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.d.ts +2 -0
- package/modules/FileManagerRenderer/FileActions/Grid/Download.js +24 -0
- package/modules/FileManagerRenderer/FileActions/Grid/Download.js.map +1 -0
- package/modules/FileManagerRenderer/FileActions/Grid/MoveToFolder.d.ts +2 -0
- package/modules/FileManagerRenderer/FileActions/Grid/MoveToFolder.js +19 -0
- package/modules/FileManagerRenderer/FileActions/Grid/MoveToFolder.js.map +1 -0
- package/modules/FileManagerRenderer/FileActions/Grid/Settings.d.ts +2 -0
- package/modules/FileManagerRenderer/FileActions/Grid/Settings.js +23 -0
- package/modules/FileManagerRenderer/FileActions/Grid/Settings.js.map +1 -0
- package/modules/FileManagerRenderer/FileActions/index.d.ts +2 -0
- package/modules/FileManagerRenderer/FileActions/index.js +47 -0
- package/modules/FileManagerRenderer/FileActions/index.js.map +1 -0
- package/modules/FileManagerRenderer/FileManagerView/FileManagerView.d.ts +5 -0
- package/modules/FileManagerRenderer/FileManagerView/FileManagerView.js +301 -0
- package/modules/FileManagerRenderer/FileManagerView/FileManagerView.js.map +1 -0
- package/modules/FileManagerRenderer/FileManagerView/FileManagerViewConfig.d.ts +281 -0
- package/modules/FileManagerRenderer/FileManagerView/FileManagerViewConfig.js +54 -0
- package/modules/FileManagerRenderer/FileManagerView/FileManagerViewConfig.js.map +1 -0
- package/modules/FileManagerRenderer/FileManagerView/LeftSidebar.d.ts +8 -0
- package/modules/FileManagerRenderer/FileManagerView/LeftSidebar.js +37 -0
- package/modules/FileManagerRenderer/FileManagerView/LeftSidebar.js.map +1 -0
- package/modules/FileManagerRenderer/FileManagerView/NavigateFolderProvider.d.ts +4 -0
- package/modules/FileManagerRenderer/FileManagerView/NavigateFolderProvider.js +26 -0
- package/modules/FileManagerRenderer/FileManagerView/NavigateFolderProvider.js.map +1 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/BulkAction.d.ts +26 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/BulkAction.js +66 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/BulkAction.js.map +1 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/BulkEditField.d.ts +10 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/BulkEditField.js +26 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/BulkEditField.js.map +1 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FileAction.d.ts +8 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FileAction.js +14 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FileAction.js.map +1 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Filter.d.ts +39 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Filter.js +44 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Filter.js.map +1 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FilterByTags.d.ts +5 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FilterByTags.js +17 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FilterByTags.js.map +1 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FiltersToWhere.d.ts +7 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FiltersToWhere.js +16 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FiltersToWhere.js.map +1 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FolderAction.d.ts +7 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FolderAction.js +13 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FolderAction.js.map +1 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FolderFieldDecorator.d.ts +7 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FolderFieldDecorator.js +16 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/FolderFieldDecorator.js.map +1 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Grid/Action.d.ts +31 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Grid/Action.js +38 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Grid/Action.js.map +1 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Grid/Thumbnail.d.ts +28 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Grid/Thumbnail.js +30 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Grid/Thumbnail.js.map +1 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Grid/index.d.ts +6 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Grid/index.js +3 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Grid/index.js.map +1 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Table/Column.d.ts +32 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Table/Column.js +16 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Table/Column.js.map +1 -0
- 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 +57 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Table/index.js +10 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/Table/index.js.map +1 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/index.d.ts +196 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/index.js +47 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/Browser/index.js.map +1 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/Action.d.ts +31 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/Action.js +35 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/Action.js.map +1 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/Field.d.ts +39 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/Field.js +44 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/Field.js.map +1 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/FieldDecorator.d.ts +8 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/FieldDecorator.js +25 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/FieldDecorator.js.map +1 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/GroupFields.d.ts +5 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/GroupFields.js +16 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/GroupFields.js.map +1 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/Thumbnail.d.ts +28 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/Thumbnail.js +27 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/Thumbnail.js.map +1 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/Width.d.ts +5 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/Width.js +16 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/Width.js.map +1 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/index.d.ts +87 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/index.js +23 -0
- package/modules/FileManagerRenderer/FileManagerView/configComponents/FileDetails/index.js.map +1 -0
- package/modules/FileManagerRenderer/FileManagerView/getThumbnailRenderer.d.ts +4 -0
- package/modules/FileManagerRenderer/FileManagerView/getThumbnailRenderer.js +21 -0
- package/modules/FileManagerRenderer/FileManagerView/getThumbnailRenderer.js.map +1 -0
- package/modules/FileManagerRenderer/FileManagerView/index.d.ts +13 -0
- package/modules/FileManagerRenderer/FileManagerView/index.js +88 -0
- package/modules/FileManagerRenderer/FileManagerView/index.js.map +1 -0
- package/modules/FileManagerRenderer/FileManagerView/outputFileSelectionError.d.ts +2 -0
- package/modules/FileManagerRenderer/FileManagerView/outputFileSelectionError.js +30 -0
- package/modules/FileManagerRenderer/FileManagerView/outputFileSelectionError.js.map +1 -0
- package/modules/FileManagerRenderer/FileManagerViewProvider/FileManagerViewContext.d.ts +86 -0
- package/modules/FileManagerRenderer/FileManagerViewProvider/FileManagerViewContext.js +458 -0
- package/modules/FileManagerRenderer/FileManagerViewProvider/FileManagerViewContext.js.map +1 -0
- package/modules/FileManagerRenderer/FileManagerViewProvider/index.d.ts +2 -0
- package/modules/FileManagerRenderer/FileManagerViewProvider/index.js +4 -0
- package/modules/FileManagerRenderer/FileManagerViewProvider/index.js.map +1 -0
- package/modules/FileManagerRenderer/FileManagerViewProvider/setSelection.d.ts +31 -0
- package/modules/FileManagerRenderer/FileManagerViewProvider/setSelection.js +100 -0
- package/modules/FileManagerRenderer/FileManagerViewProvider/setSelection.js.map +1 -0
- package/modules/FileManagerRenderer/FileManagerViewProvider/state.d.ts +33 -0
- package/modules/FileManagerRenderer/FileManagerViewProvider/state.js +34 -0
- package/modules/FileManagerRenderer/FileManagerViewProvider/state.js.map +1 -0
- package/modules/FileManagerRenderer/FileManagerViewProvider/useFileManagerView.d.ts +3 -0
- package/modules/FileManagerRenderer/FileManagerViewProvider/useFileManagerView.js +11 -0
- package/modules/FileManagerRenderer/FileManagerViewProvider/useFileManagerView.js.map +1 -0
- package/modules/FileManagerRenderer/FileManagerViewProvider/useListFiles.d.ts +25 -0
- package/modules/FileManagerRenderer/FileManagerViewProvider/useListFiles.js +153 -0
- package/modules/FileManagerRenderer/FileManagerViewProvider/useListFiles.js.map +1 -0
- package/modules/FileManagerRenderer/FileManagerViewProvider/useTags.d.ts +11 -0
- package/modules/FileManagerRenderer/FileManagerViewProvider/useTags.js +89 -0
- package/modules/FileManagerRenderer/FileManagerViewProvider/useTags.js.map +1 -0
- package/modules/FileManagerRenderer/filters/FilterByType.d.ts +2 -0
- package/modules/FileManagerRenderer/filters/FilterByType.js +32 -0
- package/modules/FileManagerRenderer/filters/FilterByType.js.map +1 -0
- package/modules/FileManagerRenderer/index.d.ts +2 -0
- package/modules/FileManagerRenderer/index.js +139 -0
- package/modules/FileManagerRenderer/index.js.map +1 -0
- package/modules/HeadlessCms/fileField.d.ts +2 -0
- package/modules/HeadlessCms/fileField.js +40 -0
- package/modules/HeadlessCms/fileField.js.map +1 -0
- package/modules/HeadlessCms/fileRenderer/fileField.d.ts +2 -0
- package/modules/HeadlessCms/fileRenderer/fileField.js +62 -0
- package/modules/HeadlessCms/fileRenderer/fileField.js.map +1 -0
- package/modules/HeadlessCms/fileRenderer/fileFields.d.ts +2 -0
- package/modules/HeadlessCms/fileRenderer/fileFields.js +99 -0
- package/modules/HeadlessCms/fileRenderer/fileFields.js.map +1 -0
- package/modules/HeadlessCms/fileRenderer/utils.d.ts +2 -0
- package/modules/HeadlessCms/fileRenderer/utils.js +6 -0
- package/modules/HeadlessCms/fileRenderer/utils.js.map +1 -0
- package/modules/HeadlessCms/index.d.ts +1 -0
- package/modules/HeadlessCms/index.js +13 -0
- package/modules/HeadlessCms/index.js.map +1 -0
- package/{admin → modules/Settings}/graphql.d.ts +7 -0
- package/modules/Settings/graphql.js +29 -0
- package/modules/Settings/graphql.js.map +1 -0
- package/modules/Settings/index.d.ts +2 -0
- package/modules/Settings/index.js +39 -0
- package/modules/Settings/index.js.map +1 -0
- package/modules/Settings/plugins/installation.d.ts +3 -0
- package/modules/Settings/plugins/installation.js +96 -0
- package/modules/Settings/plugins/installation.js.map +1 -0
- package/modules/Settings/plugins/permissionRenderer/FileManagerPermissions.d.ts +14 -0
- package/modules/Settings/plugins/permissionRenderer/FileManagerPermissions.js +205 -0
- package/modules/Settings/plugins/permissionRenderer/FileManagerPermissions.js.map +1 -0
- package/{admin → modules/Settings}/plugins/permissionRenderer/index.d.ts +1 -1
- package/modules/Settings/plugins/permissionRenderer/index.js +23 -0
- package/modules/Settings/plugins/permissionRenderer/index.js.map +1 -0
- package/modules/Settings/views/FileManagerSettings.d.ts +2 -0
- package/modules/Settings/views/FileManagerSettings.js +106 -0
- package/modules/Settings/views/FileManagerSettings.js.map +1 -0
- 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 +49 -32
- package/tagsHelpers.d.ts +16 -0
- package/tagsHelpers.js +35 -0
- package/tagsHelpers.js.map +1 -0
- package/types.d.ts +26 -5
- package/types.js +3 -1
- package/types.js.map +1 -0
- package/admin/graphql.js +0 -13
- package/admin/index.d.ts +0 -2
- package/admin/index.js +0 -4
- package/admin/plugins/index.d.ts +0 -2
- package/admin/plugins/index.js +0 -6
- package/admin/plugins/installation.d.ts +0 -3
- package/admin/plugins/installation.js +0 -112
- package/admin/plugins/menus.d.ts +0 -5
- package/admin/plugins/menus.js +0 -101
- package/admin/plugins/permissionRenderer/FileManagerPermissions.d.ts +0 -5
- package/admin/plugins/permissionRenderer/FileManagerPermissions.js +0 -226
- package/admin/plugins/permissionRenderer/index.js +0 -22
- package/admin/plugins/upgrades/v5.0.0.d.ts +0 -5
- package/admin/plugins/upgrades/v5.0.0.js +0 -85
- package/admin/views/FileManagerSettings.d.ts +0 -3
- package/admin/views/FileManagerSettings.js +0 -95
- /package/{admin → modules/Settings}/assets/icons/folder-open.svg +0 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import React, { useCallback } from "react";
|
|
2
|
+
import { Button, IconButton, Tooltip } from "@webiny/admin-ui";
|
|
3
|
+
import { useCreateDialog } from "@webiny/app-aco";
|
|
4
|
+
import { ReactComponent as AddIcon } from "@webiny/icons/add.svg";
|
|
5
|
+
import { ReactComponent as FileUploadIcon } from "@webiny/icons/file_upload.svg";
|
|
6
|
+
import { ReactComponent as GridIcon } from "@webiny/icons/grid_on.svg";
|
|
7
|
+
import { ReactComponent as TableIcon } from "@webiny/icons/format_list_bulleted.svg";
|
|
8
|
+
import { useFileManagerView } from "../../modules/FileManagerRenderer/FileManagerViewProvider";
|
|
9
|
+
import { useFileManagerApi } from "../../modules/FileManagerApiProvider/FileManagerApiContext";
|
|
10
|
+
import { FiltersToggle } from "@webiny/app-admin";
|
|
11
|
+
const FileAction = ({
|
|
12
|
+
browseFiles
|
|
13
|
+
}) => {
|
|
14
|
+
const view = useFileManagerView();
|
|
15
|
+
const fileManager = useFileManagerApi();
|
|
16
|
+
const renderUploadFileAction = useCallback(({
|
|
17
|
+
browseFiles
|
|
18
|
+
}) => {
|
|
19
|
+
if (!fileManager.canCreate) {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
23
|
+
onClick: browseFiles,
|
|
24
|
+
size: "md",
|
|
25
|
+
text: "Upload",
|
|
26
|
+
icon: /*#__PURE__*/React.createElement(FileUploadIcon, null)
|
|
27
|
+
});
|
|
28
|
+
}, [fileManager.canCreate]);
|
|
29
|
+
if (view.hasOnSelectCallback && view.selected.length > 0) {
|
|
30
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
31
|
+
onClick: () => view.onChange(view.selected),
|
|
32
|
+
size: "md",
|
|
33
|
+
text: `Select ${view.multiple && `(${view.selected.length})`}`
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
return renderUploadFileAction({
|
|
37
|
+
browseFiles
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
const FolderAction = () => {
|
|
41
|
+
const view = useFileManagerView();
|
|
42
|
+
const {
|
|
43
|
+
showDialog: showCreateFolderDialog
|
|
44
|
+
} = useCreateDialog();
|
|
45
|
+
const onCreateFolder = useCallback(() => {
|
|
46
|
+
showCreateFolderDialog({
|
|
47
|
+
currentParentId: view.folderId
|
|
48
|
+
});
|
|
49
|
+
}, [view.folderId]);
|
|
50
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
51
|
+
variant: "secondary",
|
|
52
|
+
size: "md",
|
|
53
|
+
onClick: onCreateFolder,
|
|
54
|
+
text: "New Folder",
|
|
55
|
+
icon: /*#__PURE__*/React.createElement(AddIcon, null),
|
|
56
|
+
"data-testid": "file-manager.create-folder-button"
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
const LayoutSwitchAction = () => {
|
|
60
|
+
const view = useFileManagerView();
|
|
61
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
62
|
+
side: "bottom",
|
|
63
|
+
content: view.listTable ? "Switch to Grid" : "Switch to Table",
|
|
64
|
+
trigger: /*#__PURE__*/React.createElement(IconButton, {
|
|
65
|
+
variant: "ghost",
|
|
66
|
+
size: "md",
|
|
67
|
+
icon: view.listTable ? /*#__PURE__*/React.createElement(GridIcon, null) : /*#__PURE__*/React.createElement(TableIcon, null),
|
|
68
|
+
onClick: () => view.setListTable(!view.listTable)
|
|
69
|
+
})
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
const ToggleFiltersAction = () => {
|
|
73
|
+
const view = useFileManagerView();
|
|
74
|
+
const toggleFilters = () => {
|
|
75
|
+
if (view.showingFilters) {
|
|
76
|
+
view.hideFilters();
|
|
77
|
+
} else {
|
|
78
|
+
view.showFilters();
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
return /*#__PURE__*/React.createElement(FiltersToggle, {
|
|
82
|
+
onFiltersToggle: toggleFilters,
|
|
83
|
+
showingFilters: view.showingFilters,
|
|
84
|
+
"data-testid": "fm.list-entries.toggle-filters"
|
|
85
|
+
});
|
|
86
|
+
};
|
|
87
|
+
export const Actions = props => {
|
|
88
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
89
|
+
className: "wby-h-full wby-flex wby-gap-sm wby-items-center wby-justify-end"
|
|
90
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
91
|
+
className: "wby-flex wby-gap-xs"
|
|
92
|
+
}, /*#__PURE__*/React.createElement(ToggleFiltersAction, null), /*#__PURE__*/React.createElement(LayoutSwitchAction, null)), /*#__PURE__*/React.createElement("div", {
|
|
93
|
+
className: "wby-flex wby-gap-xs"
|
|
94
|
+
}, /*#__PURE__*/React.createElement(FileAction, {
|
|
95
|
+
browseFiles: props.browseFiles
|
|
96
|
+
}), /*#__PURE__*/React.createElement(FolderAction, null)));
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
//# sourceMappingURL=Actions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useCallback","Button","IconButton","Tooltip","useCreateDialog","ReactComponent","AddIcon","FileUploadIcon","GridIcon","TableIcon","useFileManagerView","useFileManagerApi","FiltersToggle","FileAction","browseFiles","view","fileManager","renderUploadFileAction","canCreate","createElement","onClick","size","text","icon","hasOnSelectCallback","selected","length","onChange","multiple","FolderAction","showDialog","showCreateFolderDialog","onCreateFolder","currentParentId","folderId","variant","LayoutSwitchAction","side","content","listTable","trigger","setListTable","ToggleFiltersAction","toggleFilters","showingFilters","hideFilters","showFilters","onFiltersToggle","Actions","props","className"],"sources":["Actions.tsx"],"sourcesContent":["import React, { useCallback } from \"react\";\nimport { Button, type ButtonProps, IconButton, Tooltip } from \"@webiny/admin-ui\";\nimport { useCreateDialog } from \"@webiny/app-aco\";\nimport { ReactComponent as AddIcon } from \"@webiny/icons/add.svg\";\nimport { ReactComponent as FileUploadIcon } from \"@webiny/icons/file_upload.svg\";\nimport { ReactComponent as GridIcon } from \"@webiny/icons/grid_on.svg\";\nimport { ReactComponent as TableIcon } from \"@webiny/icons/format_list_bulleted.svg\";\nimport { useFileManagerView } from \"~/modules/FileManagerRenderer/FileManagerViewProvider\";\nimport { useFileManagerApi } from \"~/modules/FileManagerApiProvider/FileManagerApiContext\";\nimport type { BrowseFilesHandler, HeaderProps } from \"~/components/Header/Header\";\nimport { FiltersToggle } from \"@webiny/app-admin\";\n\ntype ActionsProps = Pick<HeaderProps, \"browseFiles\">;\n\nconst FileAction = ({ browseFiles }: ActionsProps) => {\n const view = useFileManagerView();\n const fileManager = useFileManagerApi();\n\n const renderUploadFileAction = useCallback(\n ({ browseFiles }: BrowseFilesHandler) => {\n if (!fileManager.canCreate) {\n return null;\n }\n return (\n <Button\n onClick={browseFiles as ButtonProps[\"onClick\"]}\n size={\"md\"}\n text={\"Upload\"}\n icon={<FileUploadIcon />}\n />\n );\n },\n [fileManager.canCreate]\n );\n\n if (view.hasOnSelectCallback && view.selected.length > 0) {\n return (\n <Button\n onClick={() => view.onChange(view.selected)}\n size={\"md\"}\n text={`Select ${view.multiple && `(${view.selected.length})`}`}\n />\n );\n }\n\n return renderUploadFileAction({\n browseFiles\n } as BrowseFilesHandler);\n};\n\nconst FolderAction = () => {\n const view = useFileManagerView();\n const { showDialog: showCreateFolderDialog } = useCreateDialog();\n\n const onCreateFolder = useCallback(() => {\n showCreateFolderDialog({ currentParentId: view.folderId });\n }, [view.folderId]);\n\n return (\n <Button\n variant={\"secondary\"}\n size={\"md\"}\n onClick={onCreateFolder}\n text={\"New Folder\"}\n icon={<AddIcon />}\n data-testid={\"file-manager.create-folder-button\"}\n />\n );\n};\n\nconst LayoutSwitchAction = () => {\n const view = useFileManagerView();\n\n return (\n <Tooltip\n side={\"bottom\"}\n content={view.listTable ? \"Switch to Grid\" : \"Switch to Table\"}\n trigger={\n <IconButton\n variant={\"ghost\"}\n size={\"md\"}\n icon={view.listTable ? <GridIcon /> : <TableIcon />}\n onClick={() => view.setListTable(!view.listTable)}\n />\n }\n />\n );\n};\n\nconst ToggleFiltersAction = () => {\n const view = useFileManagerView();\n\n const toggleFilters = () => {\n if (view.showingFilters) {\n view.hideFilters();\n } else {\n view.showFilters();\n }\n };\n\n return (\n <FiltersToggle\n onFiltersToggle={toggleFilters}\n showingFilters={view.showingFilters}\n data-testid=\"fm.list-entries.toggle-filters\"\n />\n );\n};\n\nexport const Actions = (props: ActionsProps) => {\n return (\n <div className={\"wby-h-full wby-flex wby-gap-sm wby-items-center wby-justify-end\"}>\n <div className={\"wby-flex wby-gap-xs\"}>\n <ToggleFiltersAction />\n <LayoutSwitchAction />\n </div>\n <div className={\"wby-flex wby-gap-xs\"}>\n <FileAction browseFiles={props.browseFiles} />\n <FolderAction />\n </div>\n </div>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,WAAW,QAAQ,OAAO;AAC1C,SAASC,MAAM,EAAoBC,UAAU,EAAEC,OAAO,QAAQ,kBAAkB;AAChF,SAASC,eAAe,QAAQ,iBAAiB;AACjD,SAASC,cAAc,IAAIC,OAAO,QAAQ,uBAAuB;AACjE,SAASD,cAAc,IAAIE,cAAc,QAAQ,+BAA+B;AAChF,SAASF,cAAc,IAAIG,QAAQ,QAAQ,2BAA2B;AACtE,SAASH,cAAc,IAAII,SAAS,QAAQ,wCAAwC;AACpF,SAASC,kBAAkB;AAC3B,SAASC,iBAAiB;AAE1B,SAASC,aAAa,QAAQ,mBAAmB;AAIjD,MAAMC,UAAU,GAAGA,CAAC;EAAEC;AAA0B,CAAC,KAAK;EAClD,MAAMC,IAAI,GAAGL,kBAAkB,CAAC,CAAC;EACjC,MAAMM,WAAW,GAAGL,iBAAiB,CAAC,CAAC;EAEvC,MAAMM,sBAAsB,GAAGjB,WAAW,CACtC,CAAC;IAAEc;EAAgC,CAAC,KAAK;IACrC,IAAI,CAACE,WAAW,CAACE,SAAS,EAAE;MACxB,OAAO,IAAI;IACf;IACA,oBACInB,KAAA,CAAAoB,aAAA,CAAClB,MAAM;MACHmB,OAAO,EAAEN,WAAsC;MAC/CO,IAAI,EAAE,IAAK;MACXC,IAAI,EAA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vB3C,KAAA,CAAAoB,aAAA,CAACiB,kBAAkB,MAAE,CACpB,CAAC,eACNrC,KAAA,CAAAoB,aAAA;IAAK+B,SAAS,EAAE;EAAsB,gBAClCnD,KAAA,CAAAoB,aAAA,CAACN,UAAU;IAACC,WAAW,EAAEmC,KAAK,CAACnC;EAAY,CAAE,CAAC,eAC9Cf,KAAA,CAAAoB,aAAA,CAACU,YAAY,MAAE,CACd,CACJ,CAAC;AAEd,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { FilesRenderChildren } from "react-butterfiles";
|
|
3
|
+
export interface BrowseFilesHandler {
|
|
4
|
+
browseFiles: FilesRenderChildren["browseFiles"];
|
|
5
|
+
}
|
|
6
|
+
export interface HeaderProps {
|
|
7
|
+
browseFiles: BrowseFilesHandler["browseFiles"];
|
|
8
|
+
}
|
|
9
|
+
export declare const Header: (props: HeaderProps) => React.JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Grid, Separator } from "@webiny/admin-ui";
|
|
3
|
+
import { Actions } from "./Actions";
|
|
4
|
+
import { Title } from "./Title";
|
|
5
|
+
export const Header = props => {
|
|
6
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
7
|
+
className: "wby-pl-lg wby-pr-md wby-py-sm-extra"
|
|
8
|
+
}, /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Grid.Column, {
|
|
9
|
+
span: 6
|
|
10
|
+
}, /*#__PURE__*/React.createElement(Title, null)), /*#__PURE__*/React.createElement(Grid.Column, {
|
|
11
|
+
span: 6
|
|
12
|
+
}, /*#__PURE__*/React.createElement(Actions, {
|
|
13
|
+
browseFiles: props.browseFiles
|
|
14
|
+
})))), /*#__PURE__*/React.createElement(Separator, null));
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=Header.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Grid","Separator","Actions","Title","Header","props","createElement","className","Column","span","browseFiles"],"sources":["Header.tsx"],"sourcesContent":["import React from \"react\";\nimport type { FilesRenderChildren } from \"react-butterfiles\";\nimport { Grid, Separator } from \"@webiny/admin-ui\";\n\nimport { Actions } from \"./Actions\";\nimport { Title } from \"./Title\";\n\nexport interface BrowseFilesHandler {\n browseFiles: FilesRenderChildren[\"browseFiles\"];\n}\n\nexport interface HeaderProps {\n browseFiles: BrowseFilesHandler[\"browseFiles\"];\n}\n\nexport const Header = (props: HeaderProps) => {\n return (\n <div>\n <div className={\"wby-pl-lg wby-pr-md wby-py-sm-extra\"}>\n <Grid>\n <Grid.Column span={6}>\n <Title />\n </Grid.Column>\n <Grid.Column span={6}>\n <Actions browseFiles={props.browseFiles} />\n </Grid.Column>\n </Grid>\n </div>\n <Separator />\n </div>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,IAAI,EAAEC,SAAS,QAAQ,kBAAkB;AAElD,SAASC,OAAO;AAChB,SAASC,KAAK;AAUd,OAAO,MAAMC,MAAM,GAAIC,KAAkB,IAAK;EAC1C,oBACIN,KAAA,CAAAO,aAAA,2BACIP,KAAA,CAAAO,aAAA;IAAKC,SAAS,EAAE;EAAsC,gBAClDR,KAAA,CAAAO,aAAA,CAACN,IAAI,qBACDD,KAAA,CAAAO,aAAA,CAACN,IAAI,CAACQ,MAAM;IAACC,IAAI,EAAE;EAAE,gBACjBV,KAAA,CAAAO,aAAA,CAACH,KAAK,MAAE,CACC,CAAC,eACdJ,KAAA,CAAAO,aAAA,CAACN,IAAI,CAACQ,MAAM;IAACC,IAAI,EAAE;EAAE,gBACjBV,KAAA,CAAAO,aAAA,CAACJ,OAAO;IAACQ,WAAW,EAAEL,KAAK,CAACK;EAAY,CAAE,CACjC,CACX,CACL,CAAC,eACNX,KAAA,CAAAO,aAAA,CAACL,SAAS,MAAE,CACX,CAAC;AAEd,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import React, { useMemo } from "react";
|
|
2
|
+
import { Heading, Icon, IconButton, Skeleton, Switch } from "@webiny/admin-ui";
|
|
3
|
+
import { ReactComponent as HomeIcon } from "@webiny/icons/home.svg";
|
|
4
|
+
import { ReactComponent as FolderIcon } from "@webiny/icons/folder.svg";
|
|
5
|
+
import { ReactComponent as MoreVerticalIcon } from "@webiny/icons/more_vert.svg";
|
|
6
|
+
import { useFileManagerView } from "../../modules/FileManagerRenderer/FileManagerViewProvider";
|
|
7
|
+
import { FolderProvider, useAcoConfig } from "@webiny/app-aco";
|
|
8
|
+
import { OptionsMenu } from "@webiny/app-admin";
|
|
9
|
+
export const Title = () => {
|
|
10
|
+
const {
|
|
11
|
+
isRootFolder,
|
|
12
|
+
listTitle,
|
|
13
|
+
displaySubFolders,
|
|
14
|
+
setDisplaySubFolders,
|
|
15
|
+
currentFolder,
|
|
16
|
+
folders
|
|
17
|
+
} = useFileManagerView();
|
|
18
|
+
const {
|
|
19
|
+
folder: folderConfig
|
|
20
|
+
} = useAcoConfig();
|
|
21
|
+
const icon = useMemo(() => {
|
|
22
|
+
return isRootFolder ? /*#__PURE__*/React.createElement(HomeIcon, null) : /*#__PURE__*/React.createElement(FolderIcon, null);
|
|
23
|
+
}, [isRootFolder]);
|
|
24
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, listTitle && /*#__PURE__*/React.createElement("div", {
|
|
25
|
+
className: "wby-flex wby-gap-xs wby-items-center"
|
|
26
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
27
|
+
className: "wby-flex wby-gap-sm wby-items-center wby-truncate"
|
|
28
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
29
|
+
icon: icon,
|
|
30
|
+
label: listTitle,
|
|
31
|
+
size: "md",
|
|
32
|
+
color: "neutral-strong"
|
|
33
|
+
}), /*#__PURE__*/React.createElement(Heading, {
|
|
34
|
+
level: 4,
|
|
35
|
+
as: "h1",
|
|
36
|
+
className: "wby-truncate"
|
|
37
|
+
}, listTitle)), currentFolder && /*#__PURE__*/React.createElement(FolderProvider, {
|
|
38
|
+
folder: currentFolder
|
|
39
|
+
}, /*#__PURE__*/React.createElement(OptionsMenu, {
|
|
40
|
+
actions: folderConfig.actions,
|
|
41
|
+
"data-testid": "folder.title.menu-action",
|
|
42
|
+
trigger: /*#__PURE__*/React.createElement(IconButton, {
|
|
43
|
+
icon: /*#__PURE__*/React.createElement(MoreVerticalIcon, null),
|
|
44
|
+
size: "sm",
|
|
45
|
+
iconSize: "lg",
|
|
46
|
+
variant: "ghost",
|
|
47
|
+
disabled: isRootFolder
|
|
48
|
+
})
|
|
49
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
50
|
+
className: "wby-flex wby-flex-nowrap"
|
|
51
|
+
}, /*#__PURE__*/React.createElement(Switch, {
|
|
52
|
+
label: "Display subfolders",
|
|
53
|
+
labelPosition: "end",
|
|
54
|
+
onChange: setDisplaySubFolders,
|
|
55
|
+
checked: displaySubFolders,
|
|
56
|
+
disabled: folders.length === 0
|
|
57
|
+
}))) || /*#__PURE__*/React.createElement(Skeleton, {
|
|
58
|
+
size: "xl"
|
|
59
|
+
}));
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
//# sourceMappingURL=Title.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useMemo","Heading","Icon","IconButton","Skeleton","Switch","ReactComponent","HomeIcon","FolderIcon","MoreVerticalIcon","useFileManagerView","FolderProvider","useAcoConfig","OptionsMenu","Title","isRootFolder","listTitle","displaySubFolders","setDisplaySubFolders","currentFolder","folders","folder","folderConfig","icon","createElement","Fragment","className","label","size","color","level","as","actions","trigger","iconSize","variant","disabled","labelPosition","onChange","checked","length"],"sources":["Title.tsx"],"sourcesContent":["import React, { useMemo } from \"react\";\nimport { Heading, Icon, IconButton, Skeleton, Switch } from \"@webiny/admin-ui\";\nimport { ReactComponent as HomeIcon } from \"@webiny/icons/home.svg\";\nimport { ReactComponent as FolderIcon } from \"@webiny/icons/folder.svg\";\nimport { ReactComponent as MoreVerticalIcon } from \"@webiny/icons/more_vert.svg\";\nimport { useFileManagerView } from \"~/modules/FileManagerRenderer/FileManagerViewProvider\";\nimport { FolderProvider, useAcoConfig } from \"@webiny/app-aco\";\nimport { OptionsMenu } from \"@webiny/app-admin\";\n\nexport const Title = () => {\n const {\n isRootFolder,\n listTitle,\n displaySubFolders,\n setDisplaySubFolders,\n currentFolder,\n folders\n } = useFileManagerView();\n const { folder: folderConfig } = useAcoConfig();\n\n const icon = useMemo(() => {\n return isRootFolder ? <HomeIcon /> : <FolderIcon />;\n }, [isRootFolder]);\n\n return (\n <>\n {(listTitle && (\n <div className={\"wby-flex wby-gap-xs wby-items-center\"}>\n <div className={\"wby-flex wby-gap-sm wby-items-center wby-truncate\"}>\n <Icon icon={icon} label={listTitle} size={\"md\"} color={\"neutral-strong\"} />\n <Heading level={4} as={\"h1\"} className={\"wby-truncate\"}>\n {listTitle}\n </Heading>\n </div>\n {currentFolder && (\n <FolderProvider folder={currentFolder}>\n <OptionsMenu\n actions={folderConfig.actions}\n data-testid={\"folder.title.menu-action\"}\n trigger={\n <IconButton\n icon={<MoreVerticalIcon />}\n size={\"sm\"}\n iconSize={\"lg\"}\n variant={\"ghost\"}\n disabled={isRootFolder}\n />\n }\n />\n </FolderProvider>\n )}\n <div className={\"wby-flex wby-flex-nowrap\"}>\n <Switch\n label={\"Display subfolders\"}\n labelPosition={\"end\"}\n onChange={setDisplaySubFolders}\n checked={displaySubFolders}\n disabled={folders.length === 0}\n />\n </div>\n </div>\n )) || <Skeleton size={\"xl\"} />}\n </>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,SAASC,OAAO,EAAEC,IAAI,EAAEC,UAAU,EAAEC,QAAQ,EAAEC,MAAM,QAAQ,kBAAkB;AAC9E,SAASC,cAAc,IA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AAM,EAAEF;EAAc,gBAClCpB,KAAA,CAAAyB,aAAA,CAACX,WAAW;IACRmB,OAAO,EAAEV,YAAY,CAACU,OAAQ;IAC9B,eAAa,0BAA2B;IACxCC,OAAO,eACHlC,KAAA,CAAAyB,aAAA,CAACrB,UAAU;MACPoB,IAAI,eAAExB,KAAA,CAAAyB,aAAA,CAACf,gBAAgB,MAAE,CAAE;MAC3BmB,IAAI,EAAE,IAAK;MACXM,QAAQ,EAAE,IAAK;MACfC,OAAO,EAAE,OAAQ;MACjBC,QAAQ,EAAErB;IAAa,CAC1B;EACJ,CACJ,CACW,CACnB,eACDhB,KAAA,CAAAyB,aAAA;IAAKE,SAAS,EAAE;EAA2B,gBACvC3B,KAAA,CAAAyB,aAAA,CAACnB,MAAM;IACHsB,KAAK,EAAE,oBAAqB;IAC5BU,aAAa,EAAE,KAAM;IACrBC,QAAQ,EAAEpB,oBAAqB;IAC/BqB,OAAO,EAAEtB,iBAAkB;IAC3BmB,QAAQ,EAAEhB,OAAO,CAACoB,MAAM,KAAK;EAAE,CAClC,CACA,CACJ,CACR,iBAAKzC,KAAA,CAAAyB,aAAA,CAACpB,QAAQ;IAACwB,IAAI,EAAE;EAAK,CAAE,CAC/B,CAAC;AAEX,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Header";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Header\";\n"],"mappings":"AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ImageEditorTool, ToolbarTool } from "./toolbar/types";
|
|
3
|
+
interface RenderPropArgs {
|
|
4
|
+
render: () => React.ReactNode;
|
|
5
|
+
getCanvasDataUrl: () => string;
|
|
6
|
+
activeTool: ImageEditorTool | null;
|
|
7
|
+
applyActiveTool: () => Promise<void>;
|
|
8
|
+
cancelActiveTool: () => Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
interface ImageEditorPropsPropsOptions {
|
|
11
|
+
autoEnable: boolean;
|
|
12
|
+
}
|
|
13
|
+
interface ImageEditorProps {
|
|
14
|
+
src: string;
|
|
15
|
+
tools: ToolbarTool[];
|
|
16
|
+
options?: {
|
|
17
|
+
flip: ImageEditorPropsPropsOptions;
|
|
18
|
+
filter: ImageEditorPropsPropsOptions;
|
|
19
|
+
crop: ImageEditorPropsPropsOptions;
|
|
20
|
+
rotate: ImageEditorPropsPropsOptions;
|
|
21
|
+
};
|
|
22
|
+
onToolActivate?: () => void;
|
|
23
|
+
onToolDeactivate?: () => void;
|
|
24
|
+
children?: (props: RenderPropArgs) => React.ReactNode;
|
|
25
|
+
}
|
|
26
|
+
interface ImageEditorState {
|
|
27
|
+
tool: ImageEditorTool | null;
|
|
28
|
+
src: string;
|
|
29
|
+
}
|
|
30
|
+
declare class ImageEditor extends React.Component<ImageEditorProps, ImageEditorState> {
|
|
31
|
+
static defaultProps: Partial<ImageEditorProps>;
|
|
32
|
+
state: ImageEditorState;
|
|
33
|
+
canvas: React.RefObject<HTMLCanvasElement>;
|
|
34
|
+
image?: HTMLImageElement;
|
|
35
|
+
componentDidMount(): void;
|
|
36
|
+
private readonly updateCanvas;
|
|
37
|
+
private readonly activateTool;
|
|
38
|
+
private readonly deactivateTool;
|
|
39
|
+
readonly getCanvasDataUrl: () => string;
|
|
40
|
+
private readonly applyActiveTool;
|
|
41
|
+
private readonly cancelActiveTool;
|
|
42
|
+
private readonly getToolOptions;
|
|
43
|
+
render(): React.ReactNode;
|
|
44
|
+
}
|
|
45
|
+
export { ImageEditor };
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Button } from "@webiny/admin-ui";
|
|
3
|
+
import { flip, filter, crop, rotate } from "./toolbar";
|
|
4
|
+
/**
|
|
5
|
+
* Package load-script does not have types.
|
|
6
|
+
*/
|
|
7
|
+
// @ts-expect-error
|
|
8
|
+
import loadScript from "load-script";
|
|
9
|
+
const toolbar = {
|
|
10
|
+
flip,
|
|
11
|
+
filter,
|
|
12
|
+
crop,
|
|
13
|
+
rotate
|
|
14
|
+
};
|
|
15
|
+
const initScripts = () => {
|
|
16
|
+
return new Promise(resolve => {
|
|
17
|
+
// @ts-expect-error
|
|
18
|
+
if (window.Caman) {
|
|
19
|
+
return resolve();
|
|
20
|
+
}
|
|
21
|
+
return loadScript("https://cdnjs.cloudflare.com/ajax/libs/camanjs/4.1.2/caman.full.min.js", resolve);
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
class ImageEditor extends React.Component {
|
|
25
|
+
static defaultProps = {
|
|
26
|
+
tools: ["crop", "flip", "rotate", "filter"]
|
|
27
|
+
};
|
|
28
|
+
state = {
|
|
29
|
+
tool: null,
|
|
30
|
+
src: ""
|
|
31
|
+
};
|
|
32
|
+
canvas = /*#__PURE__*/React.createRef();
|
|
33
|
+
componentDidMount() {
|
|
34
|
+
initScripts().then(() => {
|
|
35
|
+
this.updateCanvas();
|
|
36
|
+
setTimeout(() => {
|
|
37
|
+
const {
|
|
38
|
+
options
|
|
39
|
+
} = this.props;
|
|
40
|
+
if (!options || typeof options !== "object") {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
for (const key in options) {
|
|
44
|
+
const option = options[key];
|
|
45
|
+
if (option.autoEnable === true) {
|
|
46
|
+
const tool = toolbar[key];
|
|
47
|
+
tool && this.activateTool(tool);
|
|
48
|
+
break;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}, 250);
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
updateCanvas = () => {
|
|
55
|
+
const {
|
|
56
|
+
src
|
|
57
|
+
} = this.props;
|
|
58
|
+
this.image = new window.Image();
|
|
59
|
+
const canvas = this.canvas.current;
|
|
60
|
+
if (canvas) {
|
|
61
|
+
this.image.onload = () => {
|
|
62
|
+
if (this.image) {
|
|
63
|
+
canvas.width = this.image.width;
|
|
64
|
+
canvas.height = this.image.height;
|
|
65
|
+
const ctx = canvas.getContext("2d");
|
|
66
|
+
ctx.drawImage(this.image, 0, 0);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
this.image.src = src;
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
activateTool = tool => {
|
|
73
|
+
if (typeof tool === "string") {
|
|
74
|
+
tool = toolbar[tool];
|
|
75
|
+
}
|
|
76
|
+
this.setState({
|
|
77
|
+
tool
|
|
78
|
+
}, () => {
|
|
79
|
+
const tt = tool;
|
|
80
|
+
typeof tt.onActivate === "function" && tt.onActivate({
|
|
81
|
+
canvas: this.canvas,
|
|
82
|
+
options: this.getToolOptions(tt)
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
deactivateTool = () => {
|
|
87
|
+
this.setState({
|
|
88
|
+
tool: null
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
getCanvasDataUrl = () => {
|
|
92
|
+
const canvas = this.canvas.current;
|
|
93
|
+
if (canvas) {
|
|
94
|
+
const {
|
|
95
|
+
src
|
|
96
|
+
} = this.props;
|
|
97
|
+
if (src.startsWith("data:image/jpeg;")) {
|
|
98
|
+
return canvas.toDataURL("image/jpeg", 1.0);
|
|
99
|
+
}
|
|
100
|
+
return canvas.toDataURL();
|
|
101
|
+
}
|
|
102
|
+
return "";
|
|
103
|
+
};
|
|
104
|
+
applyActiveTool = async () => {
|
|
105
|
+
const {
|
|
106
|
+
tool
|
|
107
|
+
} = this.state;
|
|
108
|
+
if (!tool) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
if (tool.apply) {
|
|
112
|
+
await tool.apply({
|
|
113
|
+
canvas: this.canvas
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
this.deactivateTool();
|
|
117
|
+
};
|
|
118
|
+
cancelActiveTool = async () => {
|
|
119
|
+
const {
|
|
120
|
+
tool
|
|
121
|
+
} = this.state;
|
|
122
|
+
if (!tool) {
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
if (tool.cancel) {
|
|
126
|
+
await tool.cancel({
|
|
127
|
+
canvas: this.canvas
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
this.deactivateTool();
|
|
131
|
+
};
|
|
132
|
+
getToolOptions = tool => {
|
|
133
|
+
const {
|
|
134
|
+
options
|
|
135
|
+
} = this.props;
|
|
136
|
+
if (!options || typeof options !== "object") {
|
|
137
|
+
return {};
|
|
138
|
+
}
|
|
139
|
+
return options[tool.name] || {};
|
|
140
|
+
};
|
|
141
|
+
render() {
|
|
142
|
+
const {
|
|
143
|
+
src,
|
|
144
|
+
tools,
|
|
145
|
+
children
|
|
146
|
+
} = this.props;
|
|
147
|
+
const {
|
|
148
|
+
tool
|
|
149
|
+
} = this.state;
|
|
150
|
+
const editor = /*#__PURE__*/React.createElement("div", {
|
|
151
|
+
className: "wby-w-full wby-h-full wby-flex wby-flex-col wby-gap-md wby-overflow-hidden"
|
|
152
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
153
|
+
className: "wby-flex wby-justify-center wby-items-center wby-w-full"
|
|
154
|
+
}, tools.map(key => {
|
|
155
|
+
const tool = toolbar[key];
|
|
156
|
+
if (!tool) {
|
|
157
|
+
return null;
|
|
158
|
+
}
|
|
159
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
160
|
+
key: key,
|
|
161
|
+
className: this.state.tool ? "wby-opacity-50 wby-cursor wby-pointer-events-none" : ""
|
|
162
|
+
}, tool.icon({
|
|
163
|
+
activateTool: () => this.activateTool(tool)
|
|
164
|
+
}));
|
|
165
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
166
|
+
className: "wby-w-full"
|
|
167
|
+
}, tool ? /*#__PURE__*/React.createElement(React.Fragment, null, typeof tool.renderForm === "function" && tool.renderForm({
|
|
168
|
+
options: this.getToolOptions(tool),
|
|
169
|
+
image: this.image,
|
|
170
|
+
canvas: this.canvas
|
|
171
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
172
|
+
className: "wby-flex wby-justify-center wby-gap-sm wby-mt-sm"
|
|
173
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
174
|
+
variant: "secondary",
|
|
175
|
+
text: "Cancel",
|
|
176
|
+
"data-testid": "button-cancel",
|
|
177
|
+
onClick: () => {
|
|
178
|
+
this.cancelActiveTool();
|
|
179
|
+
}
|
|
180
|
+
}), /*#__PURE__*/React.createElement(Button, {
|
|
181
|
+
variant: "primary",
|
|
182
|
+
text: "Apply",
|
|
183
|
+
"data-testid": "button-apply",
|
|
184
|
+
onClick: () => {
|
|
185
|
+
this.applyActiveTool();
|
|
186
|
+
}
|
|
187
|
+
}))) : /*#__PURE__*/React.createElement("div", {
|
|
188
|
+
className: "wby-text-center"
|
|
189
|
+
}, "Select a tool to start working on your image.")), /*#__PURE__*/React.createElement("div", {
|
|
190
|
+
className: "wby-flex wby-justify-center wby-items-center wby-w-full wby-bg-neutral-dimmed wby-rounded-md wby-overflow-hidden",
|
|
191
|
+
style: {
|
|
192
|
+
height: "calc(100vh - 256px)"
|
|
193
|
+
}
|
|
194
|
+
}, /*#__PURE__*/React.createElement("canvas", {
|
|
195
|
+
key: src,
|
|
196
|
+
id: "canvas",
|
|
197
|
+
style: {
|
|
198
|
+
maxWidth: "100%",
|
|
199
|
+
maxHeight: "100%"
|
|
200
|
+
},
|
|
201
|
+
ref: this.canvas
|
|
202
|
+
})));
|
|
203
|
+
if (typeof children === "function") {
|
|
204
|
+
return children({
|
|
205
|
+
render: () => editor,
|
|
206
|
+
// canvas: this.canvas,
|
|
207
|
+
getCanvasDataUrl: this.getCanvasDataUrl,
|
|
208
|
+
activeTool: this.state.tool,
|
|
209
|
+
applyActiveTool: this.applyActiveTool,
|
|
210
|
+
cancelActiveTool: this.cancelActiveTool
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
return editor;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
export { ImageEditor };
|
|
217
|
+
|
|
218
|
+
//# sourceMappingURL=ImageEditor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Button","flip","filter","crop","rotate","loadScript","toolbar","initScripts","Promise","resolve","window","Caman","ImageEditor","Component","defaultProps","tools","state","tool","src","canvas","createRef","componentDidMount","then","updateCanvas","setTimeout","options","props","key","option","autoEnable","activateTool","image","Image","current","onload","width","height","ctx","getContext","drawImage","setState","tt","onActivate","getToolOptions","deactivateTool","getCanvasDataUrl","startsWith","toDataURL","applyActiveTool","apply","cancelActiveTool","cancel","name","render","children","editor","createElement","className","map","icon","Fragment","renderForm","variant","text","onClick","style","id","maxWidth","maxHeight","ref","activeTool"],"sources":["ImageEditor.tsx"],"sourcesContent":["import React from \"react\";\nimport { Button } from \"@webiny/admin-ui\";\nimport { flip, filter, crop, rotate } from \"./toolbar\";\nimport type { ImageEditorTool, ToolbarTool } from \"./toolbar/types\";\n/**\n * Package load-script does not have types.\n */\n// @ts-expect-error\nimport loadScript from \"load-script\";\n\nconst toolbar = {\n flip,\n filter,\n crop,\n rotate\n};\n\nconst initScripts = (): Promise<string> => {\n return new Promise((resolve: any) => {\n // @ts-expect-error\n if (window.Caman) {\n return resolve();\n }\n return loadScript(\n \"https://cdnjs.cloudflare.com/ajax/libs/camanjs/4.1.2/caman.full.min.js\",\n resolve\n );\n });\n};\n\ninterface RenderPropArgs {\n render: () => React.ReactNode;\n getCanvasDataUrl: () => string;\n activeTool: ImageEditorTool | null;\n applyActiveTool: () => Promise<void>;\n cancelActiveTool: () => Promise<void>;\n}\n\ninterface ImageEditorPropsPropsOptions {\n autoEnable: boolean;\n}\n\ninterface ImageEditorProps {\n src: string;\n tools: ToolbarTool[];\n options?: {\n flip: ImageEditorPropsPropsOptions;\n filter: ImageEditorPropsPropsOptions;\n crop: ImageEditorPropsPropsOptions;\n rotate: ImageEditorPropsPropsOptions;\n };\n onToolActivate?: () => void;\n onToolDeactivate?: () => void;\n children?: (props: RenderPropArgs) => React.ReactNode;\n}\n\ninterface ImageEditorState {\n tool: ImageEditorTool | null;\n src: string;\n}\n\nclass ImageEditor extends React.Component<ImageEditorProps, ImageEditorState> {\n static defaultProps: Partial<ImageEditorProps> = {\n tools: [\"crop\", \"flip\", \"rotate\", \"filter\"]\n };\n\n public override state: ImageEditorState = {\n tool: null,\n src: \"\"\n };\n\n public canvas = React.createRef<HTMLCanvasElement>();\n public image?: HTMLImageElement;\n\n public override componentDidMount() {\n initScripts().then(() => {\n this.updateCanvas();\n setTimeout(() => {\n const { options } = this.props;\n if (!options || typeof options !== \"object\") {\n return;\n }\n for (const key in options) {\n const option = options[key as ToolbarTool];\n if (option.autoEnable === true) {\n const tool: ImageEditorTool | null = toolbar[key as ToolbarTool];\n tool && this.activateTool(tool);\n break;\n }\n }\n }, 250);\n });\n }\n\n private readonly updateCanvas = (): void => {\n const { src } = this.props;\n this.image = new window.Image();\n const canvas = this.canvas.current;\n if (canvas) {\n this.image.onload = () => {\n if (this.image) {\n canvas.width = this.image.width;\n canvas.height = this.image.height;\n const ctx = canvas.getContext(\"2d\") as CanvasRenderingContext2D;\n ctx.drawImage(this.image, 0, 0);\n }\n };\n\n this.image.src = src;\n }\n };\n\n private readonly activateTool = (tool: ToolbarTool | ImageEditorTool): void => {\n if (typeof tool === \"string\") {\n tool = toolbar[tool];\n }\n\n this.setState({ tool }, () => {\n const tt = tool as ImageEditorTool;\n typeof tt.onActivate === \"function\" &&\n tt.onActivate({ canvas: this.canvas, options: this.getToolOptions(tt) });\n });\n };\n\n private readonly deactivateTool = (): void => {\n this.setState({\n tool: null\n });\n };\n\n public readonly getCanvasDataUrl = (): string => {\n const canvas = this.canvas.current as HTMLCanvasElement;\n if (canvas) {\n const { src } = this.props;\n if (src.startsWith(\"data:image/jpeg;\")) {\n return canvas.toDataURL(\"image/jpeg\", 1.0);\n }\n\n return canvas.toDataURL();\n }\n\n return \"\";\n };\n\n private readonly applyActiveTool = async (): Promise<void> => {\n const { tool } = this.state;\n if (!tool) {\n return;\n }\n\n if (tool.apply) {\n await tool.apply({\n canvas: this.canvas\n });\n }\n this.deactivateTool();\n };\n\n private readonly cancelActiveTool = async (): Promise<void> => {\n const { tool } = this.state;\n if (!tool) {\n return;\n }\n\n if (tool.cancel) {\n await tool.cancel({\n canvas: this.canvas\n });\n }\n this.deactivateTool();\n };\n\n private readonly getToolOptions = (\n tool: ImageEditorTool\n ): Partial<ImageEditorPropsPropsOptions> => {\n const { options } = this.props;\n if (!options || typeof options !== \"object\") {\n return {};\n }\n\n return options[tool.name as ToolbarTool] || {};\n };\n\n public override render(): React.ReactNode {\n const { src, tools, children } = this.props;\n const { tool } = this.state;\n const editor = (\n <div\n className={\n \"wby-w-full wby-h-full wby-flex wby-flex-col wby-gap-md wby-overflow-hidden\"\n }\n >\n <div className={\"wby-flex wby-justify-center wby-items-center wby-w-full\"}>\n {tools.map(key => {\n const tool: ImageEditorTool = toolbar[key];\n if (!tool) {\n return null;\n }\n\n return (\n <div\n key={key}\n className={\n this.state.tool\n ? \"wby-opacity-50 wby-cursor wby-pointer-events-none\"\n : \"\"\n }\n >\n {tool.icon({\n activateTool: () => this.activateTool(tool)\n })}\n </div>\n );\n })}\n </div>\n <div className={\"wby-w-full\"}>\n {tool ? (\n <>\n {typeof tool.renderForm === \"function\" &&\n tool.renderForm({\n options: this.getToolOptions(tool as ImageEditorTool),\n image: this.image as HTMLImageElement,\n canvas: this.canvas\n })}\n\n <div className={\"wby-flex wby-justify-center wby-gap-sm wby-mt-sm\"}>\n <Button\n variant={\"secondary\"}\n text={\"Cancel\"}\n data-testid=\"button-cancel\"\n onClick={() => {\n this.cancelActiveTool();\n }}\n />\n <Button\n variant={\"primary\"}\n text={\"Apply\"}\n data-testid=\"button-apply\"\n onClick={() => {\n this.applyActiveTool();\n }}\n />\n </div>\n </>\n ) : (\n <div className={\"wby-text-center\"}>\n Select a tool to start working on your image.\n </div>\n )}\n </div>\n <div\n className={\n \"wby-flex wby-justify-center wby-items-center wby-w-full wby-bg-neutral-dimmed wby-rounded-md wby-overflow-hidden\"\n }\n style={{ height: \"calc(100vh - 256px)\" }}\n >\n <canvas\n key={src}\n id={\"canvas\"}\n style={{ maxWidth: \"100%\", maxHeight: \"100%\" }}\n ref={this.canvas as React.Ref<any>}\n />\n </div>\n </div>\n );\n\n if (typeof children === \"function\") {\n return children({\n render: () => editor,\n // canvas: this.canvas,\n getCanvasDataUrl: this.getCanvasDataUrl,\n activeTool: this.state.tool,\n applyActiveTool: this.applyActiveTool,\n cancelActiveTool: this.cancelActiveTool\n });\n }\n\n return editor;\n }\n}\n\nexport { ImageEditor };\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,MAAM,QAAQ,kBAAkB;AACzC,SAASC,IAAI,EAAEC,MAAM,EAAEC,IAAI,EAAEC,MAAM;AAEnC;AACA;AACA;AACA;AACA,OAAOC,UAAU,MAAM,aAAa;AAEpC,MAAMC,OAAO,GAAG;EACZL,IAAI;EACJC,MAAM;EACNC,IAAI;EACJC;AACJ,CAAC;AAED,MAAMG,WAAW,GAAGA,CAAA,KAAuB;EACvC,OAAO,IAAIC,OAAO,CAAEC,OAAY,IAAK;IACjC;IACA,IAAIC,MAAM,CAACC,KAAK,EAAE;MACd,OAAOF,OAAO,CAAC,CAAC;IACpB;IACA,OAAOJ,UAAU,CACb,wEAAwE,EACxEI,OACJ,CAAC;EACL,CAAC,CAAC;AACN,CAAC;AAiCD,MAAMG,WAAW,SAASb,KAAK,CAACc,SAAS,CAAqC;EAC1E,OAAOC,YAAY,GAA8B;IAC7CC,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ;EAC9C,CAAC;EAEeC,KAAK,GAAqB;IACtCC,IAAI,EAAE,IAAI;IACVC,GAAG,EAAE;EACT,CAAC;EAEMC,MAAM,gBAAGpB,KAAK,CAACqB,SAAS,CAAoB,CAAC;EAGpCC,iBAAiBA,CAAA,EAAG;IAChCd,WAAW,CAAC,CAAC,CAACe,I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;QAAEE,QAAQ,EAAE,MAAM;QAAEC,SAAS,EAAE;MAAO,CAAE;MAC/CC,GAAG,EAAE,IAAI,CAAClD;IAAyB,CACtC,CACA,CACJ,CACR;IAED,IAAI,OAAOmC,QAAQ,KAAK,UAAU,EAAE;MAChC,OAAOA,QAAQ,CAAC;QACZD,MAAM,EAAEA,CAAA,KAAME,MAAM;QACpB;QACAV,gBAAgB,EAAE,IAAI,CAACA,gBAAgB;QACvCyB,UAAU,EAAE,IAAI,CAACtD,KAAK,CAACC,IAAI;QAC3B+B,eAAe,EAAE,IAAI,CAACA,eAAe;QACrCE,gBAAgB,EAAE,IAAI,CAACA;MAC3B,CAAC,CAAC;IACN;IAEA,OAAOK,MAAM;EACjB;AACJ;AAEA,SAAS3C,WAAW","ignoreList":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface ImageEditorDialogProps {
|
|
3
|
+
dialogZIndex?: number;
|
|
4
|
+
onClose?: () => void;
|
|
5
|
+
open?: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* We would need to drill down a lot to give correct options.
|
|
8
|
+
* TODO: figure out some other way.
|
|
9
|
+
*/
|
|
10
|
+
options?: any;
|
|
11
|
+
src?: string;
|
|
12
|
+
onAccept: (src: string) => void;
|
|
13
|
+
"data-testid"?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const ImageEditorDialog: (props: ImageEditorDialogProps) => React.JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import { ImageEditor } from "./ImageEditor";
|
|
3
|
+
import { Dialog, OverlayLoader } from "@webiny/admin-ui";
|
|
4
|
+
export const ImageEditorDialog = props => {
|
|
5
|
+
const {
|
|
6
|
+
src,
|
|
7
|
+
options,
|
|
8
|
+
onAccept,
|
|
9
|
+
onClose,
|
|
10
|
+
open,
|
|
11
|
+
dialogZIndex,
|
|
12
|
+
...dialogProps
|
|
13
|
+
} = props;
|
|
14
|
+
const imageEditor = /*#__PURE__*/React.createRef();
|
|
15
|
+
const [isSaving, setIsSaving] = useState(false);
|
|
16
|
+
const onSave = async () => {
|
|
17
|
+
try {
|
|
18
|
+
setIsSaving(true);
|
|
19
|
+
const url = imageEditor.current ? imageEditor.current.getCanvasDataUrl() : "";
|
|
20
|
+
await onAccept(url);
|
|
21
|
+
} catch (e) {
|
|
22
|
+
console.log(e);
|
|
23
|
+
} finally {
|
|
24
|
+
setIsSaving(false);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
return /*#__PURE__*/React.createElement(Dialog, Object.assign({
|
|
28
|
+
style: {
|
|
29
|
+
zIndex: dialogZIndex
|
|
30
|
+
},
|
|
31
|
+
title: "Edit Image",
|
|
32
|
+
size: "full",
|
|
33
|
+
open: open,
|
|
34
|
+
onClose: onClose
|
|
35
|
+
}, dialogProps, {
|
|
36
|
+
actions: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Dialog.CancelButton, null), /*#__PURE__*/React.createElement(Dialog.ConfirmButton, {
|
|
37
|
+
text: "Save",
|
|
38
|
+
"data-testid": "dialog-accept",
|
|
39
|
+
onClick: onSave,
|
|
40
|
+
disabled: isSaving
|
|
41
|
+
}))
|
|
42
|
+
}), isSaving && /*#__PURE__*/React.createElement(OverlayLoader, {
|
|
43
|
+
text: "Creating a new version of the image"
|
|
44
|
+
}), /*#__PURE__*/React.createElement(ImageEditor, {
|
|
45
|
+
ref: imageEditor,
|
|
46
|
+
src: src,
|
|
47
|
+
options: options
|
|
48
|
+
}, ({
|
|
49
|
+
render
|
|
50
|
+
}) => render()));
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
//# sourceMappingURL=ImageEditorDialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useState","ImageEditor","Dialog","OverlayLoader","ImageEditorDialog","props","src","options","onAccept","onClose","open","dialogZIndex","dialogProps","imageEditor","createRef","isSaving","setIsSaving","onSave","url","current","getCanvasDataUrl","e","console","log","createElement","Object","assign","style","zIndex","title","size","actions","Fragment","CancelButton","ConfirmButton","text","onClick","disabled","ref","render"],"sources":["ImageEditorDialog.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport { ImageEditor } from \"./ImageEditor\";\nimport { Dialog, OverlayLoader } from \"@webiny/admin-ui\";\n\ninterface ImageEditorDialogProps {\n dialogZIndex?: number;\n onClose?: () => void;\n open?: boolean;\n /**\n * We would need to drill down a lot to give correct options.\n * TODO: figure out some other way.\n */\n options?: any;\n src?: string;\n onAccept: (src: string) => void;\n \"data-testid\"?: string;\n}\n\nexport const ImageEditorDialog = (props: ImageEditorDialogProps) => {\n const { src, options, onAccept, onClose, open, dialogZIndex, ...dialogProps } = props;\n const imageEditor = React.createRef<ImageEditor>();\n const [isSaving, setIsSaving] = useState(false);\n\n const onSave = async () => {\n try {\n setIsSaving(true);\n const url = imageEditor.current ? imageEditor.current.getCanvasDataUrl() : \"\";\n await onAccept(url);\n } catch (e) {\n console.log(e);\n } finally {\n setIsSaving(false);\n }\n };\n\n return (\n <Dialog\n style={{ zIndex: dialogZIndex }}\n title={\"Edit Image\"}\n size={\"full\"}\n open={open}\n onClose={onClose}\n {...dialogProps}\n actions={\n <>\n <Dialog.CancelButton />\n <Dialog.ConfirmButton\n text={\"Save\"}\n data-testid=\"dialog-accept\"\n onClick={onSave}\n disabled={isSaving}\n />\n </>\n }\n >\n {isSaving && <OverlayLoader text={\"Creating a new version of the image\"} />}\n <ImageEditor ref={imageEditor} src={src} options={options}>\n {({ render }) => render()}\n </ImageEditor>\n </Dialog>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAASC,WAAW;AACpB,SAASC,MAAM,EAAEC,aAAa,QAAQ,kBAAkB;AAgBxD,OAAO,MAAMC,iBAAiB,GAAIC,KAA6B,IAAK;EAChE,MAAM;IAAEC,GAAG;IAAEC,OAAO;I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AI,EAAE;EAAsC,CAAE,CAAC,eAC3EpC,KAAA,CAAAyB,aAAA,CAACvB,WAAW;IAACqC,GAAG,EAAEzB,WAAY;IAACP,GAAG,EAAEA,GAAI;IAACC,OAAO,EAAEA;EAAQ,GACrD,CAAC;IAAEgC;EAAO,CAAC,KAAKA,MAAM,CAAC,CACf,CACT,CAAC;AAEjB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ImageEditor";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./ImageEditor\";\n"],"mappings":"AAAA","ignoreList":[]}
|