feat(admin): wire summer-media-pick MediaPickerModal event in PluginField and rebuild boardwalk dist

This commit is contained in:
Jakub Zych
2026-11-27 13:27:27 +01:00
parent 27a600921f
commit 6e4471438e
7 changed files with 115 additions and 16 deletions

View File

@@ -141,6 +141,19 @@ export const FIELD_UPLOAD_EVENT = 'summer-upload'
*/
export const FIELD_UPLOAD_RESULT_EVENT = 'summer-upload-result'
/**
* Event a plugin field type's element dispatches (bubbling) to open the host
* admin Media Picker modal, with detail {id, mode?, defaultFolder?, showAlt?}.
*/
export const FIELD_MEDIA_PICK_EVENT = 'summer-media-pick'
/**
* Event the SPA dispatches on the element when the Media Picker modal closes,
* with detail {id, item: {url, alt, title, caption, width, height}} on confirm
* or {id, cancelled: true} on dismiss.
*/
export const FIELD_MEDIA_PICK_RESULT_EVENT = 'summer-media-pick-result'
/** How long a widget waits for its custom element to be defined. */
export const WIDGET_TIMEOUT = 5000