import{a as i}from"./manifest-J9piKNZo.js";import{l as e}from"./locale-wDcg0qDg.js";import{i as t}from"./manifest--hA2W8VB.js";const a=`The Gallery allows to visualize image files within an adaptive grid, as well as other data.

Each item of the grid is composed of:

- readonly data
   - title
   - subtitle
   - thumbnail
   - preview
   - actions (buttons, action menu, clickable image)
- The thumbnail is immediately visible in the item, while the preview is displayed inside a modal.

The Gallery listens to display-data event to retrieve the data to visualize. Each element of the dataset is mapped to one grid item.
`,o=`La Galleria permette di visualizzare i file di immagine all'interno di una griglia adattiva, così come altri dati.

Ogni elemento della griglia è composto da:

- dati di sola lettura
   - titolo
   - sottotitolo
   - thumbnail
   - anteprima
   - azioni (pulsanti, menu di azione, immagine cliccabile)
- La thumbnail è immediatamente visibile nell'elemento, mentre l'anteprima è visualizzata all'interno di un modale.

La galleria ascolta l'evento display-data per recuperare i dati da visualizzare. Ogni elemento del set di dati è mappato a un elemento della griglia.
`,n={docLink:"https://docs.mia-platform.eu/docs/microfrontend-composer/back-kit/components/gallery",type:"layout",label:"Gallery",description:"Visualize data as cards with a main picture thumbnail and provides actions",descriptionLong:{en:a,it:o},example:JSON.stringify({tag:"bk-gallery",properties:{thumbnailSource:"avatar.url",previewSource:"profileImageUrl",titleSource:"name",subTitleSource:"description"}}),definitions:{action:i,galleryAction:{type:"object",__mia_configuration:{label:"Gallery Action"},properties:{danger:{type:"boolean",__mia_configuration:{attribute:!0,label:"Danger button",description:"Flags the button as `danger`. Most often used when the action it triggers is dangerous and the button color is tipically red"}},content:{__mia_configuration:{label:"Label",description:"The label of the button","schema-hint":"localized-text",priority:"high"}},iconId:{type:"string",enum:t,__mia_configuration:{label:"Icon",description:"Defines which icon should be rendered into the button, if this property is not defined or doesn't match a provided icon, no icon will be rendered",priority:"medium",attribute:"icon-id"}},action:{$ref:"#/definitions/action",__mia_configuration:{label:"Action",oneOfGuard:"type"}}}},xPath:{oneOf:[{type:"string"},{type:"object",properties:{path:{type:"string"},default:{__mia_configuration:{"schema-hint":"localized-text"}}}}]},templateXPath:{oneOf:[{type:"string"},{type:"object",properties:{path:{type:"string"},default:{__mia_configuration:{"schema-hint":"localized-text"}}}},{type:"object",properties:{path:{type:"string"},default:{__mia_configuration:{"schema-hint":"localized-text"}},template:{type:"string"}},required:["template"]}]}},properties:{thumbnailSource:{$ref:"#/definitions/templateXPath",__mia_configuration:{priority:"high",label:"Thumbnail source",attribute:!1,group:"content"}},previewSource:{$ref:"#/definitions/templateXPath",__mia_configuration:{label:"Preview source",attribute:!1,group:"content"}},titleSource:{$ref:"#/definitions/xPath",__mia_configuration:{priority:"high",label:"Title source",attribute:!1,group:"content"}},subTitleSource:{$ref:"#/definitions/xPath",__mia_configuration:{priority:"high",label:"Subtitle source",attribute:!1,group:"content"}},disableSelection:{type:"boolean",default:!1,__mia_configuration:{attribute:"disable-selection",label:"Disable selection",description:"Whether to disable the possibility to select gallery items",group:"interaction"}},actions:{__mia_configuration:{priority:"high",attribute:!1,label:"Actions",description:"Available actions per gallery item",group:"interaction"},oneOf:[{$ref:"#/definitions/galleryAction"},{type:"array",items:{$ref:"#/definitions/galleryAction"},__mia_configuration:{arrayVisualization:{type:"table",configuration:{columns:["content"]}}}}]},onImageClick:{__mia_configuration:{attribute:!1,label:"On image click",description:"Action to execute on image thumbnail click",group:"interaction"},$ref:"#/definitions/action"},onTitleClick:{__mia_configuration:{attribute:!1,label:"On title click",description:"Action to execute on item title click",group:"interaction"},$ref:"#/definitions/action"},onSubTitleClick:{__mia_configuration:{attribute:!1,label:"On subtitle click",description:"Action to execute on item subtitle click",group:"interaction"},$ref:"#/definitions/action"},disableExpand:{type:"boolean",default:!1,__mia_configuration:{attribute:"disable-expand",label:"Disable expand",description:"Whether to disable the possibility of viewing the image inside a modal (preview)",group:"interaction"}},modalWidth:{oneOf:[{type:"string"},{type:"number"}],__mia_configuration:{label:"Modal width",description:"Width of the picture preview modal",attribute:"modal-width",group:"appearance"}},modalHeight:{oneOf:[{type:"string"},{type:"number"}],__mia_configuration:{label:"Modal height",description:"Height of the picture preview modal",attribute:"modal-height",group:"appearance"}},modalTitle:{type:"string",__mia_configuration:{label:"Modal title",description:"Title of the preview modal (if not specified, the title prop is used)",attribute:"modal-title",group:"content"}},gutter:{type:"number",default:20,__mia_configuration:{priority:"high",label:"Gutter",description:"gutter of gallery items (vertical and horizontal spacing among gallery items)",group:"appearance"}},primaryKey:{type:"string",default:"_id",__mia_configuration:{attribute:"primary-key",label:"Primary Key",priority:"medium",description:"Primary key to identify different rows",group:"content"}},itemHeight:{oneOf:[{type:"string"},{type:"number"}],__mia_configuration:{label:"Item height",description:"Height of gallery items. If not specified, items adapt to their content",attribute:"item-height",group:"appearance"}},customLocale:{__mia_configuration:{attribute:!1,label:"Custom Locale",description:"Custom localized texts shown as component labels",priority:"low",group:"content"},type:"object",properties:{modalClose:e("Close Modal Button"),expandTitle:e("Expand Title"),actionsMenuTitle:e("Actions Menu Title"),brokenFile:e("Broken File Message"),absentFile:e("Absent File Message")}}}};var c=n;export{c as default};
