The QueryBuilder is a versatile utility component designed for constructing database queries. it supports multiple operation modes, including a visual UI builder and direct SQL entry. It is designed to be highly compact and embeddable within sidebar settings or small UI subsections.
valstorm-components-15/components/AppBuilder/components/Utility/QueryBuilder
LIKE '%val%', IN (a, b)).ListViewSettings).| Prop | Type | Default | Description |
|---|---|---|---|
props | object | - | Standard App Builder props including appId, node, and handleClick. |
value | object | - | (Optional) The current state object. Including this makes the component controlled. |
onChange | function | - | (Optional) Callback fired when the query configuration changes. |
showRunButton | boolean | true | Whether to display the "Run Query" button. |
defaultCollapsed | boolean | false | Whether the component should start in a collapsed state. |
value)The component manages a complex JSON object that represents both the UI state and the compiled output:
{ "query_mode": "UI Builder", "sql_query": "SELECT * FROM users WHERE status = 'active' LIMIT 25 OFFSET 0", "ui_configuration": { "select": ["*"], "from": "users", "where": { "logical_operator": "AND", "rules": [ { "field": "status", "operator": "=", "value": "active" } ] }, "limit": 25, "offset": 0 } }
import { QueryBuilder } from "./QueryBuilder.component"; const MySettings = ({ filter, onUpdate }) => { return ( <QueryBuilder value={{ query_mode: filter.query_mode, sql_query: filter.query, ui_configuration: filter.ui_configuration }} onChange={(newValue) => { onUpdate({ query_mode: newValue.query_mode, query: newValue.sql_query, ui_configuration: newValue.ui_configuration }); }} defaultCollapsed={true} showRunButton={false} /> ); }
When added to an App Builder page, the component uses the node.props.data for its state and behaves as an interactive widget.
VisualQueryBuilderHandles the rendering of the "UI Builder" mode.
The header includes an expand/collapse toggle and an Editor Mode selector. The mode selector allows users to "Eject" from the UI builder into Custom SQL.
Note: Switching from UI Builder to Custom SQL will populate the textarea with the compiled SQL. However, manually editing the SQL and then switching back to the UI Builder may result in a loss of manual SQL changes as the UI Builder state takes precedence when re-active.
The ListViewSettings component provides a comprehensive management interface for list_filter records. It allows users to configure how data is queried, displayed, and interacted with across various view modes (Table, List, Kanban).
valstorm-components-15/components/AppBuilder/components/Utility/ListViewSettings
list_filter record.QueryBuilder for visual or SQL-based data sourcing.update_list_filter events to the system, allowing other components on the page to reflect configuration changes immediately without saving.| Prop | Type | Default | Description |
|---|---|---|---|
props | object | - | Standard App Builder props including appId, node, handleClick, and componentId. |
The component uses a local filter state initialized from the selectedFilter provided by the useFilterState hook. It also listens to the eventSystem for edit_list_filter and switch_list_filter events to stay in sync with the user's focus.
The component leverages the QueryBuilder in controlled mode:
<QueryBuilder value={{ query_mode: filter.query_mode, sql_query: filter.query, ui_configuration: filter.ui_configuration }} onChange={(newValue) => { // Updates filter state and dispatches update_list_filter event }} defaultCollapsed={true} showRunButton={false} />
| Event Type | Payload | Description |
|---|---|---|
update_list_filter | filter record | Fired on any change to provide live previews. |
open_clone_record_modal | { record, schema } | Fired when clicking the Clone button. |
Typically rendered in a sidebar or configuration panel within the App Builder or a Management interface to allow users to customize their data views.
The TagCreator is a specialized AppBuilder Utility component designed to manage the creation and modification of tag records within the Valstorm platform. It streamlines the process of defining picklist options, global tags, and conditional dependencies.
In the Valstorm system, picklists and multi-select fields are driven by the tag object. Instead of manually editing JSON schemas or raw database records, this component provides a guided, two-step wizard to ensure tags are created with correct metadata, linking them to the right objects and fields.
When adding this component in the AppBuilder, the following properties can be configured:
| Property | Type | Description |
|---|---|---|
api_name | String | A unique identifier for this instance of the component. |
class_name | String | Optional CSS classes for container styling (e.g., flex flex-col p-4). |
The component is registered under the Utility category in the ComponentRegistry.ts.
It follows the standard AppBuilder architectural pattern:
record and editRecord from the appInstanceStateFamily(appId).record.id is present in the instance state.ViewFieldMeta popup, it picks up injected metadata (Object and Field API name) to pre-fill the form.name field is automatically synced based on the scope (e.g., Lead - status - Lost).KanbanColumn top-border style.useApiHook to perform POST for new tags and PATCH for updates.The Activity Feed component provides a centralized, real-time stream of high-priority items, including notifications (texts, calls, emails) and upcoming tasks.
recordsState to instantly reflect changes, completions, or deletions made anywhere in the application.Class Name field to add Tailwind utility classes for custom spacing or borders.| Property | Description |
|---|---|
| API Name | A unique identifier for this component instance. |
| Show Notifications | Toggle to include unread system notifications in the feed. |
| Max Items | The maximum number of total items to display in the list. |
| Additional Feed Items | A list of custom SQL queries to pull in other objects (e.g., Tasks, Events). |
| Class Name | Custom Tailwind CSS classes for the container. |