Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[form-builder] Asset Source Plugin support (#1591)
* [form-builder] Remove upload from image input * [form-builder] Image input: Browse sources defined by part 'form-builder/input/asset-source' * [form-builder] Let asset sources be configured on type or via global part * [form-builder] Remove asset source browser and use button dropdown instead * [form-builder] Adjust default source to show in dialog * [form-builder] Add @sanity/uuid * Rename parts * [form-builder] Add default config for form builder package * [form-builder] Rename parts * [form-builder] Tweak default asset source to fit plugin conventions * [form-builder] Image field utils * [form-builder] Re-introduce uploads in image field and deal with assets given from source plugins * [form-builder] Organize and Image input code better * [example-studio] Add default formbuilder config file * [test-studio] Add default formbuilder config file * [form-builder] Only use upload props when upload component * [form-builder] Array input must respect direct uploads settings * [form-builder] Remove console.log * [form-builder] Tweak icon alignments * [form-builder] Change button copy + title of default asset source * [form-builder] Uploads should support label * [form-builder] Make image input pass through label from asset source plugin * [form-builder] Rename option: originalFilename > filename * [client] Support source and sourceId in asset client * [form-builder] Image asset to support source and sourceId * [base] Update image asset schema to support source and sourceId * [base] Update base schema to know about assetSourceData * [client] Asset client can take title, description, and source * [form-builder] Update upload props for sanityImageAsset * [base] Rename assetSource > assetSourceData
- Loading branch information
1 parent
78c9b12
commit 4c7caff
Showing
22 changed files
with
583 additions
and
192 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
export default { | ||
name: 'sanity.assetSourceData', | ||
title: 'Asset Source Data', | ||
type: 'object', | ||
fields: [ | ||
{ | ||
name: 'name', | ||
title: 'Source name', | ||
description: 'A canonical name for the source this asset is originating from', | ||
type: 'string' | ||
}, | ||
{ | ||
name: 'id', | ||
title: 'Asset Source ID', | ||
description: | ||
'The unique ID for the asset within the originating source so you can programatically find back to it', | ||
type: 'string' | ||
}, | ||
{ | ||
name: 'url', | ||
title: 'Asset information URL', | ||
description: 'A URL to find more information about this asset in the originating source', | ||
type: 'string' | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"images": { | ||
"directUploads": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.