Query builder

Visual filter builder over a typed entity schema. Builds a JSON expression tree, POSTs it to /api/<entity>/search, renders results in a <BsDatatable>. The frontend ships only the JSON wire format — SQL/OData translation lives in apps/api.

Styling — this component renders in the light DOM

It has no shadow root. Anything you render into it — row templates, node templates, cell renderers — stays in the document, so your app's stylesheet, your own component styles and Bootstrap's utility classes reach it normally.

Its own CSS is scoped at build time onto a data-mps attribute, the same device Angular uses for _ngcontent, so it cannot leak out onto your markup.

The trade-off runs the other way: page CSS now reaches this component's internals, exactly as emulated encapsulation behaves everywhere else. ::part() and ::slotted() no longer address it — use ordinary CSS selectors instead.

Orders schema

TRUE
    • (empty group)
0 matches
Current expression tree
{  "kind": "group",  "id": "25e4011a-fd68-457a-a446-3e17f02f906f",  "logic": "and",  "children": []}

Source

<BsQueryBuilder  v-model:query="query"  v-model:root-entity="rootEntity"  v-model:selected-fields="selectedFields"  v-model:sort-by="sortBy"  :schema="schema"  multi-entity-picker-enabled  show-preview>  <!-- every field with editor: 'custom' renders its value here -->  <template #editor="{ ctx }">    <input type="date" :value="ctx.value ?? ''" @input="ctx.onChange(($event.target as HTMLInputElement).value || null)" />  </template></BsQueryBuilder><!-- watch([query, rootEntity, sortBy], ...) auto-fires the search. --><BsDatatable :columns="columns" :data="results" />