import{d as i,a}from"./dataSchema-VwIQYPJL.js";import{l as e}from"./locale-wDcg0qDg.js";const o=`The File Picker Modal renders a modal containing a drag-and-drop area to handle file uploads / downloads.

The File Picker Modal is designed to handle fields that hold metadata about storage location for files saved in a file storage service and handled by Mia-Platform's Files Service. Such fields are identifiable in a data-schema as fields of type object or array and format file, and their value is expected to extend the schema:

The File Picker Modal opens when a component signals the request to update a file field associated to the item of a collection with event link-file-to-record, and allows interaction with such field through a drag-and-drop area.

In particular, it allows:

- request the download of the corresponding file from the file storage service, via the download-file event. Such event could be handled by a component such as the File Service Client.
- the upload of new files, with consequent update of the CRUD collection item with the storage metadata of the new file. This request is signaled with the update-data-with-file event, and could be picked up by a component such as the File Manger.
`,t=`Il File Picker Modal renderizza una modale contenente un'area di drag-and-drop per gestire il caricamento/scaricamento di file.

Il File Picker Modal è progettato per gestire i campi che contengono metadati sulla posizione di archiviazione dei file salvati in un servizio di archiviazione file e gestiti dal File Service di Mia-Platform. Tali campi sono identificabili in un data-schema come campi di tipo object o array e formato file, e il loro valore dovrebbe estendere lo schema:

Il File Picker Modal si apre quando un componente segnala la richiesta di aggiornamento di un campo file associato all'elemento di una collezione con l'evento link-file-to-record, e consente l'interazione con tale campo attraverso un'area di drag-and-drop.

In particolare, consente di:

- richiedere il download del file corrispondente dal servizio di archiviazione file, tramite l'evento download-file. Tale evento potrebbe essere gestito da un componente come il File Service Client.
- il caricamento di nuovi file, con conseguente aggiornamento dell'elemento della collezione CRUD con i metadati di archiviazione del nuovo file. Questa richiesta viene segnalata con l'evento update-data-with-file e potrebbe essere raccolta da un componente come il File Manger.
`,n={docLink:"https://docs.mia-platform.eu/docs/microfrontend-composer/back-kit/components/file_picker_modal/components/data_manipulation#bk-file-picker-modal",label:"File Picker Modal",description:"Modal containing a drag-and-drop area to handle file uploads/downloads",descriptionLong:{en:o,it:t},example:JSON.stringify({tag:"bk-file-picker-modal"}),type:"layout",definitions:{...i,dataSchema:a},properties:{rootElementSelector:{type:"string",__mia_configuration:{attribute:!0,label:"Container selector",description:"Selector to specify where the modal should be appended",priority:"high"}},width:{type:"number",default:500,__mia_configuration:{label:"Width",attribute:!0,priority:"high"}},dataSchema:{$ref:"#/definitions/dataSchema",__mia_configuration:{label:"Data Schema","shared-key":"back-kit/data-schema",priority:"high"}},previewUploadedFiles:{oneOf:[{type:"boolean",default:!1,__mia_configuration:{label:"Preview Uploaded Files",description:"Allows to preview and select uploaded files",attribute:!1}},{type:"string",default:"none",enum:["fetch","preview","none"],__mia_configuration:{label:"Preview Uploaded Files",description:"Allows to preview and select uploaded files",attribute:!1}}],__mia_configuration:{label:"Preview uploaded files",priority:"high"}},customLocale:{__mia_configuration:{attribute:!1,label:"Custom Locale",description:"Custom localized texts shown as component labels",priority:"low"},type:"object",properties:{formTitle:e("Form Title"),filePickerTitle:e("File Picker Title"),ctaLabel:e("CTA Title"),filePicker:{type:"object",__mia_configuration:{label:"File Picker"},properties:{dragAndDropCaption:e("Drag And Drop Caption"),removeFile:e("Remove File"),checkboxCaption:e("Checkbox Caption"),metaDataTitle:e("Metadata Title"),preview:{type:"object",__mia_configuration:{label:"Preview"},properties:{openFile:e("Open File"),brokenFile:e("Broken File Hint"),absentFile:e("Absent File Hint"),loadMore:e("Load More")}},previewDrawer:{type:"object",__mia_configuration:{label:"Preview Drawer"},properties:{dateFormat:e("Date Format"),closeTitle:e("Close Title"),metaDataTitle:e("CTA TimetaDataTitle"),brokenFile:e("Broken File Hint"),absentFile:e("Absent File Hint"),downloadCta:e("Download CTA")}}}}}}}};var d=n;export{d as default};
