import{d as t,a as i}from"./dataSchema-VwIQYPJL.js";import{l as e,d as o}from"./locale-wDcg0qDg.js";import{h as a}from"./httpComponent-AiGk8DOD.js";const r=`The Expandable Filters consist in a form which allows to apply filters to a collection. Each field of the form is associated to a field of the collection and to a filter operator. Upon submitting the form:

- Inserted values for each field are used to create an array of filters with the corresponding associated collection field and filter operator. No filter is applied for fields without values.
- The need to filter the data according to such filters is signaled to other components. This is achieved by emitting a change-query event. Components such as the CRUD Client might pick up on this request. Note that, differently from the Filter Drawer, the Expandable Filters are not designed to interact with the Filters Manager.

The form is hidden/spawned whenever the request to provide support for applying filters is signaled. That is, whenever a filter event is received.

The fields within the form are organized into a grid with a maximum number of columns of 4, which shrinks to 3 or 2 depending on the window width.
`,n=`Gli Expandable Filters sono un modulo che consente di applicare filtri a una collezione. Ogni campo del modulo è collegato a un campo della collezione e a un operatore di filtro specifico. Quando il modulo viene compilato:

- I valori inseriti nei campi vengono utilizzati per creare un array di filtri, associando ogni campo della collezione con il rispettivo operatore di filtro. I campi non compilati non generano filtri.
- La necessità di applicare questi filtri ai dati viene comunicata agli altri componenti tramite l'emissione di un evento change-query. Componenti come il client CRUD possono recepire questa richiesta. A differenza del Filter Drawer, gli Expandable Filters non sono progettati per interagire con il Filters Manager.

Il modulo può essere nascosto o espanso ogni volta che viene richiesta l'applicazione dei filtri, ovvero ogni volta che viene ricevuto un evento di filtro.

I campi del modulo sono disposti in una griglia con un massimo di 4 colonne, che si riducono a 3 o 2 a seconda della larghezza della finestra.
`,l={docLink:"https://docs.mia-platform.eu/docs/microfrontend-composer/back-kit/components/expandable_filters",label:"Expandable Filters",description:"Manages the display, application, and modification of filters",descriptionLong:{en:r,it:n},example:JSON.stringify({tag:"bk-expanded-filters",properties:{dataSchema:{type:"object",properties:{dishes:{type:"array",format:"multilookup"},name:{type:"string"},orderedAt:{type:"string",format:"date-time"}}},filtersConfig:[{property:"orderedAt",operator:"between"},"dishes","name"]}}),type:"layout",definitions:{...t,dataSchema:i},properties:{dataSchema:{$ref:"#/definitions/dataSchema",__mia_configuration:{"shared-key":"back-kit/data-schema",label:"Data Schema",priority:"high",group:"content"}},filtersConfig:{__mia_configuration:{attribute:!1,label:"Filters Configuration",description:"Lists the filters to include in the component",priority:"high",group:"content"},type:"array",items:{oneOf:[{type:"string"},{type:"object",properties:{property:{type:"string",__mia_configuration:{label:"Property"}},operator:{type:"string",__mia_configuration:{label:"Operator"}}}}]}},openByDefault:{type:"boolean",default:!1,__mia_configuration:{attribute:"open-by-default",label:"Open by default",description:"Whether to show the component by default",priority:"high",group:"appearance"}},liveSearchTimeout:{type:"number",default:5e3,__mia_configuration:{attribute:"live-search-timeout",label:"Live search timeout",priority:"high",group:"interaction"}},liveSearchItemsLimit:{type:"number",default:10,__mia_configuration:{attribute:"live-search-items-limit",label:"Live search items limit",priority:"high",group:"interaction"}},readFromUrl:{type:"boolean",default:!1,__mia_configuration:{attribute:"read-from-url",label:"Read from URL",description:"Whether filters in URL should be read and applied at bootstrap time",priority:"high",group:"interaction"}},customLocale:{__mia_configuration:{attribute:!1,label:"Custom Locale",description:"Custom localized texts shown as component labels",priority:"low",group:"content"},type:"object",properties:{buttons:{type:"object",properties:{applyButton:e("Apply Button"),clearButton:e("Clear Button")}},valueInputPlaceholder:e("Value Input Placeholder"),valueSelectPlaceholder:e("Value Select Placeholder"),true:e("True"),false:e("False"),datePicker:o,dateFormat:{type:"object",__mia_configuration:{label:"Date Format"},properties:{date:e("Date"),"date-time":e("Date Time"),time:e("Time")}}}},...a}};var d=l;export{d as default};
